@carbon/charts 1.6.13 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/axis-chart.js +1 -1
- package/axis-chart.js.map +1 -1
- package/build/src/interfaces/charts.d.ts +6 -0
- package/build/src/tools.d.ts +2420 -151
- package/bundle.js +1 -1
- package/chart.js +1 -1
- package/chart.js.map +1 -1
- package/charts/alluvial.js +1 -1
- package/charts/alluvial.js.map +1 -1
- package/charts/area-stacked.js +1 -1
- package/charts/area-stacked.js.map +1 -1
- package/charts/area.js +1 -1
- package/charts/area.js.map +1 -1
- package/charts/bar-grouped.js +1 -1
- package/charts/bar-grouped.js.map +1 -1
- package/charts/bar-simple.js +1 -1
- package/charts/bar-simple.js.map +1 -1
- package/charts/bar-stacked.js +1 -1
- package/charts/bar-stacked.js.map +1 -1
- package/charts/boxplot.js +1 -1
- package/charts/boxplot.js.map +1 -1
- package/charts/bubble.js +1 -1
- package/charts/bubble.js.map +1 -1
- package/charts/bullet.js +1 -1
- package/charts/bullet.js.map +1 -1
- package/charts/circle-pack.js +1 -1
- package/charts/circle-pack.js.map +1 -1
- package/charts/combo.js +1 -1
- package/charts/combo.js.map +1 -1
- package/charts/donut.js +1 -1
- package/charts/donut.js.map +1 -1
- package/charts/gauge.js +1 -1
- package/charts/gauge.js.map +1 -1
- package/charts/heatmap.js +1 -1
- package/charts/heatmap.js.map +1 -1
- package/charts/histogram.js +1 -1
- package/charts/histogram.js.map +1 -1
- package/charts/line.js +1 -1
- package/charts/line.js.map +1 -1
- package/charts/lollipop.js +1 -1
- package/charts/lollipop.js.map +1 -1
- package/charts/meter.js +1 -1
- package/charts/meter.js.map +1 -1
- package/charts/pie.js +1 -1
- package/charts/pie.js.map +1 -1
- package/charts/radar.js +1 -1
- package/charts/radar.js.map +1 -1
- package/charts/scatter.js +1 -1
- package/charts/scatter.js.map +1 -1
- package/charts/tree.js +1 -1
- package/charts/tree.js.map +1 -1
- package/charts/treemap.js +1 -1
- package/charts/treemap.js.map +1 -1
- package/charts/wordcloud.js +1 -1
- package/charts/wordcloud.js.map +1 -1
- package/components/axes/axis.js +1 -1
- package/components/axes/axis.js.map +1 -1
- package/components/axes/grid.js +1 -1
- package/components/axes/grid.js.map +1 -1
- package/components/axes/hover-axis.js +1 -1
- package/components/axes/hover-axis.js.map +1 -1
- package/components/axes/ruler-binned.js +1 -1
- package/components/axes/ruler-binned.js.map +1 -1
- package/components/axes/ruler.js +1 -1
- package/components/axes/ruler.js.map +1 -1
- package/components/axes/toolbar.js +1 -1
- package/components/axes/toolbar.js.map +1 -1
- package/components/axes/two-dimensional-axes.js +1 -1
- package/components/axes/two-dimensional-axes.js.map +1 -1
- package/components/axes/zero-line.js +1 -1
- package/components/axes/zero-line.js.map +1 -1
- package/components/axes/zoom-bar.js +1 -1
- package/components/axes/zoom-bar.js.map +1 -1
- package/components/component.js +1 -1
- package/components/component.js.map +1 -1
- package/components/essentials/color-scale-legend.js +1 -1
- package/components/essentials/color-scale-legend.js.map +1 -1
- package/components/essentials/highlights.js +1 -1
- package/components/essentials/highlights.js.map +1 -1
- package/components/essentials/legend.js +1 -1
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/modal.js +1 -1
- package/components/essentials/modal.js.map +1 -1
- package/components/essentials/threshold.js +1 -1
- package/components/essentials/threshold.js.map +1 -1
- package/components/essentials/title-meter.js +1 -1
- package/components/essentials/title-meter.js.map +1 -1
- package/components/essentials/title.js +1 -1
- package/components/essentials/title.js.map +1 -1
- package/components/essentials/tooltip-axis.js +1 -1
- package/components/essentials/tooltip-axis.js.map +1 -1
- package/components/essentials/tooltip.js +1 -1
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/alluvial.js +1 -1
- package/components/graphs/alluvial.js.map +1 -1
- package/components/graphs/area-stacked.js +1 -1
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/area.js +1 -1
- package/components/graphs/area.js.map +1 -1
- package/components/graphs/bar-grouped.js +1 -1
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.js +1 -1
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.js +1 -1
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bar.js +1 -1
- package/components/graphs/bar.js.map +1 -1
- package/components/graphs/boxplot.js +1 -1
- package/components/graphs/boxplot.js.map +1 -1
- package/components/graphs/bubble.js +1 -1
- package/components/graphs/bubble.js.map +1 -1
- package/components/graphs/bullet.js +1 -1
- package/components/graphs/bullet.js.map +1 -1
- package/components/graphs/circle-pack.js +1 -1
- package/components/graphs/circle-pack.js.map +1 -1
- package/components/graphs/donut.js +1 -1
- package/components/graphs/donut.js.map +1 -1
- package/components/graphs/gauge.js +1 -1
- package/components/graphs/gauge.js.map +1 -1
- package/components/graphs/heatmap.js +1 -1
- package/components/graphs/heatmap.js.map +1 -1
- package/components/graphs/histogram.js +1 -1
- package/components/graphs/histogram.js.map +1 -1
- package/components/graphs/line.js +1 -1
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/lollipop.js +1 -1
- package/components/graphs/lollipop.js.map +1 -1
- package/components/graphs/meter.js +1 -1
- package/components/graphs/meter.js.map +1 -1
- package/components/graphs/pie.js +1 -1
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/radar.js +1 -1
- package/components/graphs/radar.js.map +1 -1
- package/components/graphs/scatter-stacked.js +1 -1
- package/components/graphs/scatter-stacked.js.map +1 -1
- package/components/graphs/scatter.js +1 -1
- package/components/graphs/scatter.js.map +1 -1
- package/components/graphs/skeleton-lines.js +1 -1
- package/components/graphs/skeleton-lines.js.map +1 -1
- package/components/graphs/skeleton.js +1 -1
- package/components/graphs/skeleton.js.map +1 -1
- package/components/graphs/tree.js +1 -1
- package/components/graphs/tree.js.map +1 -1
- package/components/graphs/treemap.js +1 -1
- package/components/graphs/treemap.js.map +1 -1
- package/components/graphs/wordcloud.js +1 -1
- package/components/graphs/wordcloud.js.map +1 -1
- package/components/layout/layout.js +1 -1
- package/components/layout/layout.js.map +1 -1
- package/configuration.js +1 -1
- package/configuration.js.map +1 -1
- package/demo/data/bar.js +60 -12
- package/demo/data/bar.js.map +1 -1
- package/demo/tsconfig.tsbuildinfo +1 -1
- package/interfaces/charts.d.ts +6 -0
- package/interfaces/charts.js.map +1 -1
- package/model/boxplot.js +1 -1
- package/model/boxplot.js.map +1 -1
- package/model/bullet.js +1 -1
- package/model/bullet.js.map +1 -1
- package/model/cartesian-charts.js +1 -1
- package/model/cartesian-charts.js.map +1 -1
- package/model/circle-pack.js +1 -1
- package/model/circle-pack.js.map +1 -1
- package/model/heatmap.js +1 -1
- package/model/heatmap.js.map +1 -1
- package/model/meter.js +1 -1
- package/model/meter.js.map +1 -1
- package/model/model.js +8 -2
- package/model/model.js.map +1 -1
- package/model/radar.js +1 -1
- package/model/radar.js.map +1 -1
- package/model/treemap.js +1 -1
- package/model/treemap.js.map +1 -1
- package/package.json +1 -1
- package/services/essentials/dom-utils.js +15 -3
- package/services/essentials/dom-utils.js.map +1 -1
- package/services/essentials/transitions.js +1 -1
- package/services/essentials/transitions.js.map +1 -1
- package/services/scales-cartesian.js +1 -1
- package/services/scales-cartesian.js.map +1 -1
- package/services/time-series.js +1 -1
- package/services/time-series.js.map +1 -1
- package/services/zoom.js +1 -1
- package/services/zoom.js.map +1 -1
- package/tools.d.ts +141 -155
- package/tools.js +315 -344
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +92 -92
package/bundle.js
CHANGED
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
|
-
***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o,a,s,l,u,c,h,d,f,p,g,v,m,y,b,x,_,E,w,O,T,S,M,A,C,P=function(){return(P=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function D(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function L(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout"}(i||(i={})),function(t){t.SHOW="show-modal",t.HIDE="hide-modal"}(o||(o={})),function(t){t.UPDATE="model-update"}(a||(a={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",t.BUTTON_CLICK="toolbar-button-click"}(s||(s={})),function(t){t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end"}(l||(l={})),function(t){t.CHANGE="zoom-domain-change"}(u||(u={})),function(t){t.CANVAS_ZOOM_IN="canvas-zoom-in",t.CANVAS_ZOOM_OUT="canvas-zoom-out"}(c||(c={})),function(t){t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout",t.LABEL_FOCUS="axis-label-focus",t.LABEL_BLUR="axis-label-blur",t.RENDER_COMPLETE="axis-render-complete"}(h||(h={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(d||(d={})),function(t){t.WORD_MOUSEOVER="wordcloud-word-mouseover",t.WORD_MOUSEMOVE="wordcloud-word-mousemove",t.WORD_CLICK="wordcloud-word-click",t.WORD_MOUSEOUT="wordcloud-word-mouseout"}(f||(f={})),function(t){t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout"}(p||(p={})),function(t){t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout"}(g||(g={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(v||(v={})),function(t){t.BOX_MOUSEOVER="box-mouseover",t.BOX_MOUSEMOVE="box-mousemove",t.BOX_CLICK="box-click",t.BOX_MOUSEOUT="box-mouseout",t.OUTLIER_MOUSEOVER="outlier-mouseover",t.OUTLIER_MOUSEMOVE="outlier-mousemove",t.OUTLIER_CLICK="outlier-click",t.OUTLIER_MOUSEOUT="outlier-mouseout"}(m||(m={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(y||(y={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(b||(b={})),function(t){t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout"}(x||(x={})),function(t){t.NODE_MOUSEOVER="tree-node-mouseover",t.NODE_CLICK="tree-node-click",t.NODE_MOUSEOUT="tree-node-mouseout"}(_||(_={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(E||(E={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(w||(w={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(O||(O={})),function(t){t.ITEM_HOVER="legend-item-onhover",t.ITEM_CLICK="legend-item-onclick",t.ITEM_MOUSEOUT="legend-item-onmouseout",t.ITEMS_UPDATE="legend-items-update"}(T||(T={})),function(t){t.CIRCLE_MOUSEOVER="circle-leaf-mouseover",t.CIRCLE_CLICK="circle-leaf-click",t.CIRCLE_MOUSEOUT="circle-leaf-mouseout",t.CIRCLE_MOUSEMOVE="circle-leaf-mousemove"}(S||(S={})),function(t){t.NODE_MOUSEOVER="alluvial-node-mouseover",t.NODE_CLICK="alluvial-node-click",t.NODE_MOUSEOUT="alluvial-node-mouseout",t.NODE_MOUSEMOVE="alluvial-node-mousemove",t.LINE_MOUSEOVER="alluvial-line-mouseover",t.LINE_CLICK="alluvial-line-click",t.LINE_MOUSEOUT="alluvial-line-mouseout",t.LINE_MOUSEMOVE="alluvial-line-mousemove"}(M||(M={})),function(t){t.METER_MOUSEOVER="meter-mouseover",t.METER_CLICK="meter-click",t.METER_MOUSEOUT="meter-mouseout",t.METER_MOUSEMOVE="meter-mousemove"}(A||(A={})),function(t){t.HEATMAP_MOUSEOVER="heatmap-mouseover",t.HEATMAP_CLICK="heatmap-click",t.HEATMAP_MOUSEOUT="heatmap-mouseout",t.HEATMAP_MOUSEMOVE="hetmap-mousemove"}(C||(C={}));var k,R,I,N,B,U,V,G,H,z,j,F,W,q,Z,Y,X,K,Q,$,J,tt,et,nt,rt,it,ot,at,st,lt,ut=Object.freeze({__proto__:null,get Chart(){return i},get Modal(){return o},get Model(){return a},get Toolbar(){return s},get ZoomBar(){return l},get ZoomDomain(){return u},get CanvasZoom(){return c},get Axis(){return h},get Area(){return d},get WordCloud(){return f},get Pie(){return p},get Gauge(){return g},get Bar(){return v},get Boxplot(){return m},get Scatter(){return y},get Line(){return b},get Radar(){return x},get Tree(){return _},get Treemap(){return E},get Tooltip(){return w},get Threshold(){return O},get Legend(){return T},get CirclePack(){return S},get Alluvial(){return M},get Meter(){return A},get Heatmap(){return C}});!function(t){t.HTML="html",t.SVG="svg"}(k||(k={})),function(t){t.WHITE="white",t.G100="g100",t.G90="g90",t.G10="g10"}(R||(R={})),function(t){t.BACKGROUND="background",t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(I||(I={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(N||(N={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(B||(B={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(U||(U={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(V||(V={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio"}(G||(G={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(H||(H={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(z||(z={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(j||(j={})),function(t){t.TREE="tree",t.DENDROGRAM="dendrogram"}(F||(F={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(W||(W={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(q||(q={})),function(t){t.CENTER="center"}(Z||(Z={})),function(t){t.LEFT="left",t.RIGHT="right"}(Y||(Y={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(X||(X={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(K||(K={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(Q||(Q={})),function(t){t.SEMI="semi",t.FULL="full"}($||($={})),function(t){t.UP="up",t.DOWN="down"}(J||(J={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(tt||(tt={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(et||(et={})),function(t){t.SCATTER="scatter",t.LINE="line",t.SIMPLE_BAR="simple-bar",t.STACKED_BAR="stacked-bar",t.GROUPED_BAR="grouped-bar",t.AREA="area",t.STACKED_AREA="stacked-area"}(nt||(nt={})),function(t){t.EXPORT_CSV="Export as CSV",t.EXPORT_PNG="Export as PNG",t.EXPORT_JPG="Export as JPG",t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom",t.MAKE_FULLSCREEN="Make fullscreen",t.SHOW_AS_DATATABLE="Show as data-table",t.CUSTOM="Custom"}(rt||(rt={})),function(t){t.LEFT="left",t.RIGHT="right"}(it||(it={})),function(t){t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom"}(ot||(ot={})),function(t){t.LINEAR="linear",t.QUANTIZE="quantize"}(at||(at={})),function(t){t.ON="on",t.AUTO="auto",t.OFF="off"}(st||(st={})),function(t){t.DEFAULT="default",t.HOVERABLE="hoverable"}(lt||(lt={}));var ct=Object.freeze({__proto__:null,get Roles(){return r},Events:ut,get RenderTypes(){return k},get ChartTheme(){return R},get ColorClassNameTypes(){return I},get AxisPositions(){return N},get ZoomBarTypes(){return B},get TruncationTypes(){return U},get CartesianOrientations(){return V},get ScaleTypes(){return G},get LegendPositions(){return H},get Alignments(){return z},get LegendOrientations(){return j},get TreeTypes(){return F},get LayoutDirection(){return W},get LayoutGrowth(){return q},get LayoutAlignItems(){return Z},get CalloutDirections(){return Y},get Skeletons(){return X},get TextAnchor(){return K},get DominantBaseline(){return Q},get GaugeTypes(){return $},get ArrowDirections(){return J},get Statuses(){return tt},get TickRotations(){return et},get ChartTypes(){return nt},get ToolbarControlTypes(){return rt},get AxisTitleOrientations(){return it},get LegendItemType(){return ot},get ColorLegendType(){return at},get DividerStatus(){return st},get AxisFlavor(){return lt}});const ht=t=>+t;function dt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ft,pt={opacity:{unselected:.05,selected:.4}},gt={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},vt={duration:1e3,ease:dt,zoomLevel:3},mt={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},yt={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},bt={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},xt={defaultBins:10},_t={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},Et={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},wt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Ot={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},Tt={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},St={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Mt={minCellDividerDimension:16,chartPadding:.5},At={default:{size:24}},Ct={horizontalOffset:10},Pt={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Dt={height:(ft={},ft[B.GRAPH_VIEW]=32,ft[B.SLIDER_VIEW]=10,ft),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Lt=[{type:ot.RADIUS,name:"Radius"},{type:ot.AREA,name:"Poor area"},{type:ot.AREA,name:"Satisfactory area"},{type:ot.AREA,name:"Great area"},{type:ot.QUARTILE,name:"Quartiles"}],kt="object"==typeof global&&global&&global.Object===Object&&global,Rt="object"==typeof self&&self&&self.Object===Object&&self,It=kt||Rt||Function("return this")(),Nt=It.Symbol,Bt=Object.prototype,Ut=Bt.hasOwnProperty,Vt=Bt.toString,Gt=Nt?Nt.toStringTag:void 0;var Ht=Object.prototype.toString;var zt=Nt?Nt.toStringTag:void 0;function jt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":zt&&zt in Object(t)?function(t){var e=Ut.call(t,Gt),n=t[Gt];try{t[Gt]=void 0;var r=!0}catch(t){}var i=Vt.call(t);return r&&(e?t[Gt]=n:delete t[Gt]),i}(t):function(t){return Ht.call(t)}(t)}function Ft(t){return null!=t&&"object"==typeof t}function Wt(t){return"symbol"==typeof t||Ft(t)&&"[object Symbol]"==jt(t)}function qt(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Zt=Array.isArray,Yt=Nt?Nt.prototype:void 0,Xt=Yt?Yt.toString:void 0;function Kt(t){if("string"==typeof t)return t;if(Zt(t))return qt(t,Kt)+"";if(Wt(t))return Xt?Xt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Qt=/\s/;var $t=/^\s+/;function Jt(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Qt.test(t.charAt(e)););return e}(t)+1).replace($t,""):t}function te(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ee=/^[-+]0x[0-9a-f]+$/i,ne=/^0b[01]+$/i,re=/^0o[0-7]+$/i,ie=parseInt;function oe(t){if("number"==typeof t)return t;if(Wt(t))return NaN;if(te(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=te(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Jt(t);var n=ne.test(t);return n||re.test(t)?ie(t.slice(2),n?2:8):ee.test(t)?NaN:+t}function ae(t){return t}function se(t){if(!te(t))return!1;var e=jt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var le,ue=It["__core-js_shared__"],ce=(le=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||""))?"Symbol(src)_1."+le:"";var he=Function.prototype.toString;function de(t){if(null!=t){try{return he.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var fe=/^\[object .+?Constructor\]$/,pe=Function.prototype,ge=Object.prototype,ve=pe.toString,me=ge.hasOwnProperty,ye=RegExp("^"+ve.call(me).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function be(t){return!(!te(t)||(e=t,ce&&ce in e))&&(se(t)?ye:fe).test(de(t));var e}function xe(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return be(n)?n:void 0}var _e=xe(It,"WeakMap"),Ee=Object.create,we=function(){function t(){}return function(e){if(!te(e))return{};if(Ee)return Ee(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Te(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Se=Date.now;function Me(t){return function(){return t}}var Ae=function(){try{var t=xe(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ce=function(t){var e=0,n=0;return function(){var r=Se(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Ae?function(t,e){return Ae(t,"toString",{configurable:!0,enumerable:!1,value:Me(e),writable:!0})}:ae);function Pe(t){return t!=t}function De(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,Pe,n)}(t,e,0)>-1}var Le=/^(?:0|[1-9]\d*)$/;function ke(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Le.test(t))&&t>-1&&t%1==0&&t<e}function Re(t,e,n){"__proto__"==e&&Ae?Ae(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ie(t,e){return t===e||t!=t&&e!=e}var Ne=Object.prototype.hasOwnProperty;function Be(t,e,n){var r=t[e];Ne.call(t,e)&&Ie(r,n)&&(void 0!==n||e in t)||Re(t,e,n)}function Ue(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=r?r(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),i?Re(n,s,l):Be(n,s,l)}return n}var Ve=Math.max;function Ge(t,e){return Ce(function(t,e,n){return e=Ve(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Ve(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),Oe(t,this,s)}}(t,e,ae),t+"")}function He(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function ze(t){return null!=t&&He(t.length)&&!se(t)}function je(t,e,n){if(!te(n))return!1;var r=typeof e;return!!("number"==r?ze(n)&&ke(e,n.length):"string"==r&&e in n)&&Ie(n[e],t)}var Fe=Object.prototype;function We(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Fe)}function qe(t){return Ft(t)&&"[object Arguments]"==jt(t)}var Ze=Object.prototype,Ye=Ze.hasOwnProperty,Xe=Ze.propertyIsEnumerable,Ke=qe(function(){return arguments}())?qe:function(t){return Ft(t)&&Ye.call(t,"callee")&&!Xe.call(t,"callee")};var Qe="object"==typeof t&&t&&!t.nodeType&&t,$e=Qe&&"object"==typeof module&&module&&!module.nodeType&&module,Je=$e&&$e.exports===Qe?It.Buffer:void 0,tn=(Je?Je.isBuffer:void 0)||function(){return!1},en={};function nn(t){return function(e){return t(e)}}en["[object Float32Array]"]=en["[object Float64Array]"]=en["[object Int8Array]"]=en["[object Int16Array]"]=en["[object Int32Array]"]=en["[object Uint8Array]"]=en["[object Uint8ClampedArray]"]=en["[object Uint16Array]"]=en["[object Uint32Array]"]=!0,en["[object Arguments]"]=en["[object Array]"]=en["[object ArrayBuffer]"]=en["[object Boolean]"]=en["[object DataView]"]=en["[object Date]"]=en["[object Error]"]=en["[object Function]"]=en["[object Map]"]=en["[object Number]"]=en["[object Object]"]=en["[object RegExp]"]=en["[object Set]"]=en["[object String]"]=en["[object WeakMap]"]=!1;var rn="object"==typeof t&&t&&!t.nodeType&&t,on=rn&&"object"==typeof module&&module&&!module.nodeType&&module,an=on&&on.exports===rn&&kt.process,sn=function(){try{var t=on&&on.require&&on.require("util").types;return t||an&&an.binding&&an.binding("util")}catch(t){}}(),ln=sn&&sn.isTypedArray,un=ln?nn(ln):function(t){return Ft(t)&&He(t.length)&&!!en[jt(t)]},cn=Object.prototype.hasOwnProperty;function hn(t,e){var n=Zt(t),r=!n&&Ke(t),i=!n&&!r&&tn(t),o=!n&&!r&&!i&&un(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=s.length;for(var u in t)!e&&!cn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ke(u,l))||s.push(u);return s}function dn(t,e){return function(n){return t(e(n))}}var fn=dn(Object.keys,Object),pn=Object.prototype.hasOwnProperty;function gn(t){if(!We(t))return fn(t);var e=[];for(var n in Object(t))pn.call(t,n)&&"constructor"!=n&&e.push(n);return e}function vn(t){return ze(t)?hn(t):gn(t)}var mn=Object.prototype.hasOwnProperty;function yn(t){if(!te(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=We(t),n=[];for(var r in t)("constructor"!=r||!e&&mn.call(t,r))&&n.push(r);return n}function bn(t){return ze(t)?hn(t,!0):yn(t)}var xn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_n=/^\w*$/;function En(t,e){if(Zt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Wt(t))||(_n.test(t)||!xn.test(t)||null!=e&&t in Object(e))}var wn=xe(Object,"create");var On=Object.prototype.hasOwnProperty;var Tn=Object.prototype.hasOwnProperty;function Sn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mn(t,e){for(var n=t.length;n--;)if(Ie(t[n][0],e))return n;return-1}Sn.prototype.clear=function(){this.__data__=wn?wn(null):{},this.size=0},Sn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Sn.prototype.get=function(t){var e=this.__data__;if(wn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return On.call(e,t)?e[t]:void 0},Sn.prototype.has=function(t){var e=this.__data__;return wn?void 0!==e[t]:Tn.call(e,t)},Sn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=wn&&void 0===e?"__lodash_hash_undefined__":e,this};var An=Array.prototype.splice;function Cn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Cn.prototype.clear=function(){this.__data__=[],this.size=0},Cn.prototype.delete=function(t){var e=this.__data__,n=Mn(e,t);return!(n<0)&&(n==e.length-1?e.pop():An.call(e,n,1),--this.size,!0)},Cn.prototype.get=function(t){var e=this.__data__,n=Mn(e,t);return n<0?void 0:e[n][1]},Cn.prototype.has=function(t){return Mn(this.__data__,t)>-1},Cn.prototype.set=function(t,e){var n=this.__data__,r=Mn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Pn=xe(It,"Map");function Dn(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function Ln(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ln.prototype.clear=function(){this.size=0,this.__data__={hash:new Sn,map:new(Pn||Cn),string:new Sn}},Ln.prototype.delete=function(t){var e=Dn(this,t).delete(t);return this.size-=e?1:0,e},Ln.prototype.get=function(t){return Dn(this,t).get(t)},Ln.prototype.has=function(t){return Dn(this,t).has(t)},Ln.prototype.set=function(t,e){var n=Dn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function kn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(kn.Cache||Ln),n}kn.Cache=Ln;var Rn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,In=/\\(\\)?/g,Nn=function(t){var e=kn(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Rn,(function(t,n,r,i){e.push(r?i.replace(In,"$1"):n||t)})),e}));function Bn(t){return null==t?"":Kt(t)}function Un(t,e){return Zt(t)?t:En(t,e)?[t]:Nn(Bn(t))}function Vn(t){if("string"==typeof t||Wt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Gn(t,e){for(var n=0,r=(e=Un(e,t)).length;null!=t&&n<r;)t=t[Vn(e[n++])];return n&&n==r?t:void 0}function Hn(t,e,n){var r=null==t?void 0:Gn(t,e);return void 0===r?n:r}function zn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var jn=Nt?Nt.isConcatSpreadable:void 0;function Fn(t){return Zt(t)||Ke(t)||!!(jn&&t&&t[jn])}function Wn(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Fn),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wn(s,e-1,n,r,i):zn(i,s):r||(i[i.length]=s)}return i}function qn(t){return(null==t?0:t.length)?Wn(t,1):[]}var Zn=dn(Object.getPrototypeOf,Object),Yn=Function.prototype,Xn=Object.prototype,Kn=Yn.toString,Qn=Xn.hasOwnProperty,$n=Kn.call(Object);function Jn(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}(t,e,n)}var tr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function er(t){return tr.test(t)}var nr="[\\ud800-\\udfff]",rr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ir="\\ud83c[\\udffb-\\udfff]",or="[^\\ud800-\\udfff]",ar="(?:\\ud83c[\\udde6-\\uddff]){2}",sr="[\\ud800-\\udbff][\\udc00-\\udfff]",lr="(?:"+rr+"|"+ir+")"+"?",ur="[\\ufe0e\\ufe0f]?"+lr+("(?:\\u200d(?:"+[or,ar,sr].join("|")+")[\\ufe0e\\ufe0f]?"+lr+")*"),cr="(?:"+[or+rr+"?",rr,ar,sr,nr].join("|")+")",hr=RegExp(ir+"(?="+ir+")|"+cr+ur,"g");function dr(t){return er(t)?function(t){return t.match(hr)||[]}(t):function(t){return t.split("")}(t)}var fr,pr=(fr="toUpperCase",function(t){var e=er(t=Bn(t))?dr(t):void 0,n=e?e[0]:t.charAt(0),r=e?Jn(e,1).join(""):t.slice(1);return n[fr]()+r});var gr=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),vr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mr=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var yr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var br=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var xr="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_r="["+xr+"]",Er="\\d+",wr="[\\u2700-\\u27bf]",Or="[a-z\\xdf-\\xf6\\xf8-\\xff]",Tr="[^\\ud800-\\udfff"+xr+Er+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Sr="(?:\\ud83c[\\udde6-\\uddff]){2}",Mr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Cr="(?:"+Or+"|"+Tr+")",Pr="(?:"+Ar+"|"+Tr+")",Dr="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Lr="[\\ufe0e\\ufe0f]?"+Dr+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Sr,Mr].join("|")+")[\\ufe0e\\ufe0f]?"+Dr+")*"),kr="(?:"+[wr,Sr,Mr].join("|")+")"+Lr,Rr=RegExp([Ar+"?"+Or+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[_r,Ar,"$"].join("|")+")",Pr+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[_r,Ar+Cr,"$"].join("|")+")",Ar+"?"+Cr+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ar+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Er,kr].join("|"),"g");function Ir(t,e,n){return t=Bn(t),void 0===(e=n?void 0:e)?function(t){return br.test(t)}(t)?function(t){return t.match(Rr)||[]}(t):function(t){return t.match(yr)||[]}(t):t.match(e)||[]}var Nr=RegExp("['’]","g");function Br(t){return function(e){return function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}(Ir(function(t){return(t=Bn(t))&&t.replace(vr,gr).replace(mr,"")}(e).replace(Nr,"")),t,"")}}var Ur=Br((function(t,e,n){return e=e.toLowerCase(),t+(n?pr(Bn(e).toLowerCase()):e)}));function Vr(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=oe(n))==n?n:0),void 0!==e&&(e=(e=oe(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(oe(t),e,n)}function Gr(t){var e=this.__data__=new Cn(t);this.size=e.size}Gr.prototype.clear=function(){this.__data__=new Cn,this.size=0},Gr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Gr.prototype.get=function(t){return this.__data__.get(t)},Gr.prototype.has=function(t){return this.__data__.has(t)},Gr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Cn){var r=n.__data__;if(!Pn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ln(r)}return n.set(t,e),this.size=n.size,this};var Hr="object"==typeof t&&t&&!t.nodeType&&t,zr=Hr&&"object"==typeof module&&module&&!module.nodeType&&module,jr=zr&&zr.exports===Hr?It.Buffer:void 0,Fr=jr?jr.allocUnsafe:void 0;function Wr(t,e){if(e)return t.slice();var n=t.length,r=Fr?Fr(n):new t.constructor(n);return t.copy(r),r}function qr(){return[]}var Zr=Object.prototype.propertyIsEnumerable,Yr=Object.getOwnPropertySymbols,Xr=Yr?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Yr(t),(function(e){return Zr.call(t,e)})))}:qr;var Kr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)zn(e,Xr(t)),t=Zn(t);return e}:qr;function Qr(t,e,n){var r=e(t);return Zt(t)?r:zn(r,n(t))}function $r(t){return Qr(t,vn,Xr)}function Jr(t){return Qr(t,bn,Kr)}var ti=xe(It,"DataView"),ei=xe(It,"Promise"),ni=xe(It,"Set"),ri=de(ti),ii=de(Pn),oi=de(ei),ai=de(ni),si=de(_e),li=jt;(ti&&"[object DataView]"!=li(new ti(new ArrayBuffer(1)))||Pn&&"[object Map]"!=li(new Pn)||ei&&"[object Promise]"!=li(ei.resolve())||ni&&"[object Set]"!=li(new ni)||_e&&"[object WeakMap]"!=li(new _e))&&(li=function(t){var e=jt(t),n="[object Object]"==e?t.constructor:void 0,r=n?de(n):"";if(r)switch(r){case ri:return"[object DataView]";case ii:return"[object Map]";case oi:return"[object Promise]";case ai:return"[object Set]";case si:return"[object WeakMap]"}return e});var ui=li,ci=Object.prototype.hasOwnProperty;var hi=It.Uint8Array;function di(t){var e=new t.constructor(t.byteLength);return new hi(e).set(new hi(t)),e}var fi=/\w*$/;var pi=Nt?Nt.prototype:void 0,gi=pi?pi.valueOf:void 0;function vi(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function mi(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return di(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return vi(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,fi.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,gi?Object(gi.call(r)):{}}}function yi(t){return"function"!=typeof t.constructor||We(t)?{}:we(Zn(t))}var bi=sn&&sn.isMap,xi=bi?nn(bi):function(t){return Ft(t)&&"[object Map]"==ui(t)};var _i=sn&&sn.isSet,Ei=_i?nn(_i):function(t){return Ft(t)&&"[object Set]"==ui(t)},wi={};function Oi(t,e,n,r,i,o){var a,s=1&e,l=2&e,u=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!te(t))return t;var c=Zt(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ci.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Te(t,a)}else{var h=ui(t),d="[object Function]"==h||"[object GeneratorFunction]"==h;if(tn(t))return Wr(t,s);if("[object Object]"==h||"[object Arguments]"==h||d&&!i){if(a=l||d?{}:yi(t),!s)return l?function(t,e){return Ue(t,Kr(t),e)}(t,function(t,e){return t&&Ue(e,bn(e),t)}(a,t)):function(t,e){return Ue(t,Xr(t),e)}(t,function(t,e){return t&&Ue(e,vn(e),t)}(a,t))}else{if(!wi[h])return i?t:{};a=mi(t,h,s)}}o||(o=new Gr);var f=o.get(t);if(f)return f;o.set(t,a),Ei(t)?t.forEach((function(r){a.add(Oi(r,e,n,r,t,o))})):xi(t)&&t.forEach((function(r,i){a.set(i,Oi(r,e,n,i,t,o))}));var p=c?void 0:(u?l?Jr:$r:l?bn:vn)(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(p||t,(function(r,i){p&&(r=t[i=r]),Be(a,i,Oi(r,e,n,i,t,o))})),a}wi["[object Arguments]"]=wi["[object Array]"]=wi["[object ArrayBuffer]"]=wi["[object DataView]"]=wi["[object Boolean]"]=wi["[object Date]"]=wi["[object Float32Array]"]=wi["[object Float64Array]"]=wi["[object Int8Array]"]=wi["[object Int16Array]"]=wi["[object Int32Array]"]=wi["[object Map]"]=wi["[object Number]"]=wi["[object Object]"]=wi["[object RegExp]"]=wi["[object Set]"]=wi["[object String]"]=wi["[object Symbol]"]=wi["[object Uint8Array]"]=wi["[object Uint8ClampedArray]"]=wi["[object Uint16Array]"]=wi["[object Uint32Array]"]=!0,wi["[object Error]"]=wi["[object Function]"]=wi["[object WeakMap]"]=!1;function Ti(t){return Oi(t,5)}function Si(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Ln;++e<n;)this.add(t[e])}function Mi(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Ai(t,e){return t.has(e)}Si.prototype.add=Si.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Si.prototype.has=function(t){return this.__data__.has(t)};function Ci(t,e,n,r,i,o){var a=1&n,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,d=!0,f=2&n?new Si:void 0;for(o.set(t,e),o.set(e,t);++h<s;){var p=t[h],g=e[h];if(r)var v=a?r(g,p,h,e,t,o):r(p,g,h,t,e,o);if(void 0!==v){if(v)continue;d=!1;break}if(f){if(!Mi(e,(function(t,e){if(!Ai(f,e)&&(p===t||i(p,t,n,r,o)))return f.push(e)}))){d=!1;break}}else if(p!==g&&!i(p,g,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Pi(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Di(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Li=Nt?Nt.prototype:void 0,ki=Li?Li.valueOf:void 0;var Ri=Object.prototype.hasOwnProperty;var Ii=Object.prototype.hasOwnProperty;function Ni(t,e,n,r,i,o){var a=Zt(t),s=Zt(e),l=a?"[object Array]":ui(t),u=s?"[object Array]":ui(e),c="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),h="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),d=l==u;if(d&&tn(t)){if(!tn(e))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new Gr),a||un(t)?Ci(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new hi(t),new hi(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ie(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Pi;case"[object Set]":var l=1&r;if(s||(s=Di),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var c=Ci(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(ki)return ki.call(t)==ki.call(e)}return!1}(t,e,l,n,r,i,o);if(!(1&n)){var f=c&&Ii.call(t,"__wrapped__"),p=h&&Ii.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,v=p?e.value():e;return o||(o=new Gr),i(g,v,n,r,o)}}return!!d&&(o||(o=new Gr),function(t,e,n,r,i,o){var a=1&n,s=$r(t),l=s.length;if(l!=$r(e).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in e:Ri.call(e,c)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=a;++u<l;){var g=t[c=s[u]],v=e[c];if(r)var m=a?r(v,g,c,e,t,o):r(g,v,c,t,e,o);if(!(void 0===m?g===v||i(g,v,n,r,o):m)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var y=t.constructor,b=e.constructor;y!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function Bi(t,e,n,r,i){return t===e||(null==t||null==e||!Ft(t)&&!Ft(e)?t!=t&&e!=e:Ni(t,e,n,r,Bi,i))}function Ui(t){return t==t&&!te(t)}function Vi(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Gi(t){var e=function(t){for(var e=vn(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Ui(i)]}return e}(t);return 1==e.length&&e[0][2]?Vi(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var l=(s=n[i])[0],u=t[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in t))return!1}else{var h=new Gr;if(r)var d=r(u,c,l,t,e,h);if(!(void 0===d?Bi(c,u,3,r,h):d))return!1}}return!0}(n,t,e)}}function Hi(t,e){return null!=t&&e in Object(t)}function zi(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Un(e,t)).length,o=!1;++r<i;){var a=Vn(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&He(i)&&ke(a,i)&&(Zt(t)||Ke(t))}(t,e,Hi)}function ji(t){return En(t)?(e=Vn(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Gn(e,t)}}(t);var e}function Fi(t){return"function"==typeof t?t:null==t?ae:"object"==typeof t?Zt(t)?function(t,e){return En(t)&&Ui(e)?Vi(Vn(t),e):function(n){var r=Hn(n,t);return void 0===r&&r===e?zi(n,t):Bi(e,r,3)}}(t[0],t[1]):Gi(t):ji(t)}function Wi(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}var qi,Zi=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[qi?a:++r];if(!1===e(i[s],s,i))break}return t};var Yi=function(t,e){return function(n,r){if(null==n)return n;if(!ze(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&Zi(t,e,vn)}));function Xi(t,e,n,r){return Yi(t,(function(t,i,o){e(r,t,n(t),o)})),r}var Ki=function(){return It.Date.now()},Qi=Math.max,$i=Math.min;function Ji(t,e,n){var r,i,o,a,s,l,u=0,c=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,u=e,a=t.apply(o,n)}function p(t){return u=t,s=setTimeout(v,e),c?f(t):a}function g(t){var n=t-l;return void 0===l||n>=e||n<0||h&&t-u>=o}function v(){var t=Ki();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-l);return h?$i(n,o-(t-u)):n}(t))}function m(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function y(){var t=Ki(),n=g(t);if(r=arguments,i=this,l=t,n){if(void 0===s)return p(l);if(h)return clearTimeout(s),s=setTimeout(v,e),f(l)}return void 0===s&&(s=setTimeout(v,e)),a}return e=oe(e)||0,te(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Qi(oe(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?a:m(Ki())},y}function to(t,e,n){(void 0===n||Ie(t[e],n))&&(void 0!==n||e in t)||Re(t,e,n)}function eo(t){return Ft(t)&&ze(t)}function no(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function ro(t,e,n,r,i,o,a){var s=no(t,n),l=no(e,n),u=a.get(l);if(u)to(t,n,u);else{var c=o?o(s,l,n+"",t,e,a):void 0,h=void 0===c;if(h){var d=Zt(l),f=!d&&tn(l),p=!d&&!f&&un(l);c=l,d||f||p?Zt(s)?c=s:eo(s)?c=Te(s):f?(h=!1,c=Wr(l,!0)):p?(h=!1,c=vi(l,!0)):c=[]:function(t){if(!Ft(t)||"[object Object]"!=jt(t))return!1;var e=Zn(t);if(null===e)return!0;var n=Qn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Kn.call(n)==$n}(l)||Ke(l)?(c=s,Ke(s)?c=function(t){return Ue(t,bn(t))}(s):te(s)&&!se(s)||(c=yi(l))):h=!1}h&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),to(t,n,c)}}function io(t,e,n,r,i){t!==e&&Zi(e,(function(o,a){if(i||(i=new Gr),te(o))ro(t,e,a,n,io,r,i);else{var s=r?r(no(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),to(t,a,s)}}),bn)}function oo(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function ao(t,e){var n=-1,r=ze(t)?Array(t.length):[];return Yi(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function so(t,e){return Wn(function(t,e){return(Zt(t)?qt:ao)(t,Fi(e))}(t,e),1/0)}function lo(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}var uo,co,ho=Object.prototype.hasOwnProperty,fo=(uo=function(t,e,n){ho.call(t,n)?t[n].push(e):Re(t,n,[e])},function(t,e){var n=Zt(t)?Wi:Xi,r=co?co():{};return n(t,uo,Fi(e),r)}),po=Object.prototype.hasOwnProperty;function go(t){if(null==t)return!0;if(ze(t)&&(Zt(t)||"string"==typeof t||"function"==typeof t.splice||tn(t)||un(t)||Ke(t)))return!t.length;var e=ui(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(We(t))return!gn(t).length;for(var n in t)if(po.call(t,n))return!1;return!0}function vo(t,e){return Bi(t,e)}var mo,yo=Br((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),bo=(mo=function(t,e,n){io(t,e,n)},Ge((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=mo.length>3&&"function"==typeof i?(r--,i):void 0,o&&je(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&mo(t,a,n,i)}return t})));function xo(t,e){var n;return Yi(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function _o(t,e,n){var r=Zt(t)?Mi:xo;return n&&je(t,e,n)&&(e=void 0),r(t,Fi(e))}var Eo=ni&&1/Di(new ni([,-0]))[1]==1/0?function(t){return new ni(t)}:function(){};function wo(t,e,n){var r=-1,i=De,o=t.length,a=!0,s=[],l=s;if(n)a=!1,i=oo;else if(o>=200){var u=e?null:Eo(t);if(u)return Di(u);a=!1,i=Ai,l=new Si}else l=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue t;e&&l.push(h),s.push(c)}else i(l,h,n)||(l!==s&&l.push(h),s.push(c))}return s}var Oo=Ge((function(t){var e=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}(t);return eo(e)&&(e=void 0),wo(Wn(t,1,eo,!0),Fi(e))}));function To(t){return t&&t.length?wo(t):[]}var So="http://www.w3.org/1999/xhtml",Mo={svg:"http://www.w3.org/2000/svg",xhtml:So,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ao(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Mo.hasOwnProperty(e)?{space:Mo[e],local:t}:t}function Co(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===So&&e.documentElement.namespaceURI===So?e.createElement(t):e.createElementNS(n,t)}}function Po(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Do(t){var e=Ao(t);return(e.local?Po:Co)(e)}function Lo(){}function ko(t){return null==t?Lo:function(){return this.querySelector(t)}}function Ro(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Io(){return[]}function No(t){return null==t?Io:function(){return this.querySelectorAll(t)}}function Bo(t){return function(){return this.matches(t)}}function Uo(t){return function(e){return e.matches(t)}}var Vo=Array.prototype.find;function Go(){return this.firstElementChild}var Ho=Array.prototype.filter;function zo(){return Array.from(this.children)}function jo(t){return new Array(t.length)}function Fo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Wo(t){return function(){return t}}function qo(t,e,n,r,i,o){for(var a,s=0,l=e.length,u=o.length;s<u;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Fo(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function Zo(t,e,n,r,i,o,a){var s,l,u,c=new Map,h=e.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(f[s]=u=a.call(l,l.__data__,s,e)+"",c.has(u)?i[s]=l:c.set(u,l));for(s=0;s<d;++s)u=a.call(t,o[s],s,o)+"",(l=c.get(u))?(r[s]=l,l.__data__=o[s],c.delete(u)):n[s]=new Fo(t,o[s]);for(s=0;s<h;++s)(l=e[s])&&c.get(f[s])===l&&(i[s]=l)}function Yo(t){return t.__data__}function Xo(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Ko(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Qo(t){return function(){this.removeAttribute(t)}}function $o(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Jo(t,e){return function(){this.setAttribute(t,e)}}function ta(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ea(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function na(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function ra(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ia(t){return function(){this.style.removeProperty(t)}}function oa(t,e,n){return function(){this.style.setProperty(t,e,n)}}function aa(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function sa(t,e){return t.style.getPropertyValue(e)||ra(t).getComputedStyle(t,null).getPropertyValue(e)}function la(t){return function(){delete this[t]}}function ua(t,e){return function(){this[t]=e}}function ca(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ha(t){return t.trim().split(/^|\s+/)}function da(t){return t.classList||new fa(t)}function fa(t){this._node=t,this._names=ha(t.getAttribute("class")||"")}function pa(t,e){for(var n=da(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ga(t,e){for(var n=da(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function va(t){return function(){pa(this,t)}}function ma(t){return function(){ga(this,t)}}function ya(t,e){return function(){(e.apply(this,arguments)?pa:ga)(this,t)}}function ba(){this.textContent=""}function xa(t){return function(){this.textContent=t}}function _a(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ea(){this.innerHTML=""}function wa(t){return function(){this.innerHTML=t}}function Oa(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ta(){this.nextSibling&&this.parentNode.appendChild(this)}function Sa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ma(){return null}function Aa(){var t=this.parentNode;t&&t.removeChild(this)}function Ca(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Pa(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Da(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function La(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function ka(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function Ra(t,e,n){var r=ra(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Ia(t,e){return function(){return Ra(this,t,e)}}function Na(t,e){return function(){return Ra(this,t,e.apply(this,arguments))}}Fo.prototype={constructor:Fo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},fa.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ba,Ua=[null];function Va(t,e){this._groups=t,this._parents=e}function Ga(){return new Va([[document.documentElement]],Ua)}function Ha(t){return"string"==typeof t?new Va([[document.querySelector(t)]],[document.documentElement]):new Va([[t]],Ua)}function za(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function ja(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Fa(t,e){return t(e={exports:{}},e.exports),e.exports}Va.prototype=Ga.prototype={constructor:Va,select:function(t){"function"!=typeof t&&(t=ko(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],l=s.length,u=r[i]=new Array(l),c=0;c<l;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),u[c]=a);return new Va(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Ro(t.apply(this,arguments))}}(t):No(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],l=s.length,u=0;u<l;++u)(a=s[u])&&(r.push(t.call(a,a.__data__,u,s)),i.push(a));return new Va(r,i)},selectChild:function(t){return this.select(null==t?Go:function(t){return function(){return Vo.call(this.children,t)}}("function"==typeof t?t:Uo(t)))},selectChildren:function(t){return this.selectAll(null==t?zo:function(t){return function(){return Ho.call(this.children,t)}}("function"==typeof t?t:Uo(t)))},filter:function(t){"function"!=typeof t&&(t=Bo(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],u=0;u<s;++u)(o=a[u])&&t.call(o,o.__data__,u,a)&&l.push(o);return new Va(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Yo);var n=e?Zo:qo,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Wo(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],h=i[u],d=h.length,f=Xo(t.call(c,c&&c.__data__,u,r)),p=f.length,g=s[u]=new Array(p),v=a[u]=new Array(p),m=l[u]=new Array(d);n(c,h,g,v,m,f,e);for(var y,b,x=0,_=0;x<p;++x)if(y=g[x]){for(x>=_&&(_=x+1);!(b=v[_])&&++_<p;);y._next=b||null}}return(a=new Va(a,r))._enter=s,a._exit=l,a},enter:function(){return new Va(this._enter||this._groups.map(jo),this._parents)},exit:function(){return new Va(this._exit||this._groups.map(jo),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u,c=n[l],h=r[l],d=c.length,f=s[l]=new Array(d),p=0;p<d;++p)(u=c[p]||h[p])&&(f[p]=u);for(;l<i;++l)s[l]=n[l];return new Va(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Ko);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,u=i[o]=new Array(l),c=0;c<l;++c)(a=s[c])&&(u[c]=a);u.sort(e)}return new Va(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=Ao(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?$o:Qo:"function"==typeof e?n.local?na:ea:n.local?ta:Jo)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?ia:"function"==typeof e?aa:oa)(t,e,null==n?"":n)):sa(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?la:"function"==typeof e?ca:ua)(t,e)):this.node()[t]},classed:function(t,e){var n=ha(t+"");if(arguments.length<2){for(var r=da(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ya:e?va:ma)(n,e))},text:function(t){return arguments.length?this.each(null==t?ba:("function"==typeof t?_a:xa)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ea:("function"==typeof t?Oa:wa)(t)):this.node().innerHTML},raise:function(){return this.each(Ta)},lower:function(){return this.each(Sa)},append:function(t){var e="function"==typeof t?t:Do(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Do(t),r=null==e?Ma:"function"==typeof e?e:ko(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Aa)},clone:function(t){return this.select(t?Pa:Ca)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Da(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?ka:La,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var l,u=0,c=s.length;u<c;++u)for(r=0,l=s[u];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Na:Ia)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}},function(t){function e(e,n){var r=t.getProperty(e,"legend","additionalItems"),i=t.getProperty(n,"legend","additionalItems");if(r&&i){var o=i.map((function(t){return t.type})),a=r.map((function(t){return t.type})),s=Lt.filter((function(t){return a.includes(t.type)&&!o.includes(t.type)}));e.legend.additionalItems=s,n.legend.additionalItems=t.unionBy(s,i,"name")}}t.debounce=Ji,t.clone=Ti,t.merge=bo,t.unionBy=Oo,t.removeArrayDuplicates=To,t.clamp=Vr,t.flatten=qn,t.groupBy=fo,t.camelCase=Ur,t.isEmpty=go,t.isEqual=vo,t.flatMapDeep=so,t.kebabCase=yo,t.fromPairs=lo,t.some=_o,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,o=arguments;i.mousePosition=za(o[0],n),clearTimeout(r),r=setTimeout((function(){t.apply(i,o)}),e)}},t.mergeDefaultChartOptions=function(n,r){var i,o,a=t.clone(n),s=Object.keys(r.axes||{});for(var l in(null===(o=null===(i=r)||void 0===i?void 0:i.toolbar)||void 0===o?void 0:o.controls)&&delete a.toolbar.controls,0===s.length&&delete a.axes,a.axes)if(s.includes(l)){var u=r.axes[l];(u.primary||u.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");var c=u.mapsTo;if(null==c){var h=u.scaleType;null==h?u.mapsTo="value":h===G.TIME?u.mapsTo="date":h===G.LABELS&&(u.mapsTo="key")}}else delete a.axes[l];return e(a,r),t.merge(a,r)},t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){if(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null}},t.getTranformOffsets=function(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}},t.formatWidthHeightValues=function(t){var e=t.toString();return e.match(/[a-z]/i)?e:e+"px"},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e,n){void 0===n&&(n="value");var r=t/e.reduce((function(t,e){return t+e[n]}),0)*100;return r%1!=0?parseFloat(r.toFixed(1)):r},t.truncateLabel=function(t,e,n){return n>t.length?t:e===U.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===U.FRONT_LINE?"..."+t.substr(-n):e===U.END_LINE?t.substr(0,n)+"...":void 0},t.updateLegendAdditionalItems=e,t.arrayDifferences=function(t,e){var n={missing:[],added:[]};return t.forEach((function(t){-1===e.indexOf(t)&&n.missing.push(t)})),e.forEach((function(e){-1===t.indexOf(e)&&n.added.push(e)})),n},t.getDuplicateValues=function(t){var e=[],n=[];return t.forEach((function(t){-1!==e.indexOf(t)&&-1===n.indexOf(t)&&n.push(t),e.push(t)})),n},t.moveToFront=function(t){return t.each((function(){this.parentNode.appendChild(this)}))},t.getProperty=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t;if(r){for(var i=0,o=e;i<o.length;i++){var a=o[i];if(null===r[a]||void 0===r[a])return null;r=r[a]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===V.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t},t.generateSVGPathString=function(e,n){var r=t.flipSVGCoordinatesBasedOnOrientation(e,n),i=r.x0,o=r.x1,a=r.y0,s=r.y1;return"M"+i+","+a+"L"+i+","+s+"L"+o+","+s+"L"+o+","+a+"L"+i+","+a},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===V.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(Ba||(Ba={}));var Wa=Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var i;r=r||{},i="string"==typeof n[t]?n[t]:1===e?n[t].one:n[t].other.replace("{{count}}",e);if(r.addSuffix)return r.comparison>0?"in "+i:i+" ago";return i};var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};t.exports=e.default}));ja(Wa);var qa=Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}},t.exports=e.default}));ja(qa);var Za=Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=qa)&&n.__esModule?n:{default:n};var i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.default=i,t.exports=e.default}));ja(Za);var Ya=Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,i){return n[t]};var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};t.exports=e.default}));ja(Ya);var Xa=Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,l=i.width?String(i.width):t.defaultWidth;r=t.values[l]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));ja(Xa);var Ka=Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Xa)&&n.__esModule?n:{default:n};var i={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};e.default=i,t.exports=e.default}));ja(Ka);var Qa=Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=r.match(t.matchPattern);if(!o)return null;var a=o[0],s=r.match(t.parsePattern);if(!s)return null;var l=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(a.length)}}},t.exports=e.default}));ja(Qa);var $a=Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var l,u=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),l=t.valueCallback?t.valueCallback(l):l,{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(u.length)}}},t.exports=e.default}));ja($a);var Ja=Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(Qa),r=i($a);function i(t){return t&&t.__esModule?t:{default:t}}var o={ordinalNumber:(0,n.default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.default=o,t.exports=e.default}));ja(Ja);var ts=ja(Fa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Wa),r=s(Za),i=s(Ya),o=s(Ka),a=s(Ja);function s(t){return t&&t.__esModule?t:{default:t}}var l={code:"en-US",formatDistance:n.default,formatLong:r.default,formatRelative:i.default,localize:o.default,match:a.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=l,t.exports=e.default}))),es={type:U.END_LINE,threshold:16,numCharacter:14},ns={enabled:!0,position:H.BOTTOM,clickable:!0,truncation:es,alignment:z.LEFT,order:null,additionalItems:[]},rs={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},is={enabled:!0},os={enabled:!0,showTotal:!0,truncation:es,groupLabel:"Group"},as={top:{visible:!0,includeZero:!0,truncation:es},bottom:{visible:!0,includeZero:!0,truncation:es},left:{visible:!0,includeZero:!0,truncation:es},right:{visible:!0,includeZero:!0,truncation:es}},ss={addSpaceOnEdges:1,showDayName:!1,localeObject:ts,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},ls="undefined"!=typeof document&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),us={width:null,height:null,resizable:!0,theme:R.WHITE,tooltip:os,legend:ns,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:L([{type:rt.SHOW_AS_DATATABLE}],ls?[{type:rt.MAKE_FULLSCREEN}]:[],[{type:rt.EXPORT_CSV},{type:rt.EXPORT_PNG},{type:rt.EXPORT_JPG}])}},cs=Ba.merge({},us,{axes:as,timeScale:ss,grid:rs,ruler:is,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:B.GRAPH_VIEW}}}),hs=Ba.merge({},cs,{bars:{maxWidth:16,spacingFactor:.25},timeScale:Ba.merge(ss,{addSpaceOnEdges:1})}),ds=Ba.merge({},hs,{}),fs=Ba.merge({},hs,{}),ps=Ba.merge({},hs,{bars:Ba.merge({},hs.bars,{dividerSize:1.5})}),gs=Ba.merge({},hs,{}),vs=Ba.merge({},cs,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),ms=vs,ys=Ba.merge({},vs,{points:{radius:3,filled:!1,enabled:!0}}),bs=Ba.merge({},ys,{timeScale:Ba.merge(ss,{addSpaceOnEdges:0})}),xs=bs,_s=Ba.merge({},cs,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:ot.RADIUS,name:"Radius"}]}}),Es=Ba.merge({},cs,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:ot.AREA,name:"Poor area"},{type:ot.AREA,name:"Satisfactory area"},{type:ot.AREA,name:"Great area"},{type:ot.QUARTILE,name:"Quartiles"}]}}),ws=Ba.merge({},hs,{bars:{dividerSize:1.5},timeScale:Ba.merge(ss,{addSpaceOnEdges:0})}),Os=Ba.merge({},us,{tooltip:Ba.merge({},os,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:function(t,e){var n=Math.min(t.width,t.height);return[20*n/400,75*n/400]},wordMapsTo:"word"}}),Ts=Ba.merge({},us,{pie:{labels:{formatter:null,enabled:!0},alignment:z.LEFT,sortFunction:null,valueMapsTo:"value"}}),Ss=Ba.merge({},us,{legend:{enabled:!1},gauge:{type:$.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:function(t){return t/8},valueFontSize:function(t){return t/2.5},numberFormatter:function(t){return t.toFixed(2)%1!=0?t.toFixed(2).toLocaleString():t.toFixed().toLocaleString()},alignment:z.LEFT}}),Ms=Ba.merge({},Ts,{donut:{center:{numberFontSize:function(t){return Math.min(t/100*24,24)+"px"},titleFontSize:function(t){return Math.min(t/100*15,15)+"px"},titleYPosition:function(t){return Math.min(t/80*20,20)},numberFormatter:function(t){return Math.floor(t).toLocaleString()}},alignment:z.LEFT}}),As=Ba.merge({},us,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),Cs={chart:us,axisChart:cs,simpleBarChart:ds,groupedBarChart:fs,stackedBarChart:ps,boxplotChart:gs,bubbleChart:_s,bulletChart:Es,histogramChart:ws,lineChart:ys,areaChart:bs,stackedAreaChart:xs,scatterChart:vs,lollipopChart:ms,pieChart:Ts,donutChart:Ms,meterChart:As,proportionalMeterChart:Ba.merge({},As,{legend:{enabled:!0}}),radarChart:Ba.merge({},us,{radar:{axes:{angle:"key",value:"value"},alignment:z.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:Ss,comboChart:Ba.merge({},hs,{comboChartTypes:[]}),treeChart:Ba.merge({tree:{type:F.TREE}},us,{}),treemapChart:Ba.merge({},us,{data:Ba.merge(us.data,{groupMapsTo:"name"})}),circlePackChart:Ba.merge({},us,mt,{data:Ba.merge(us.data,{groupMapsTo:"name"})}),wordCloudChart:Os,alluvialChart:Ba.merge({},us,{alluvial:{data:Ba.merge(us.data,{groupMapsTo:"source"}),nodeAlignment:z.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),heatmapChart:Ba.merge({},us,{axes:as,heatmap:{divider:{state:st.AUTO},colorLegend:{type:"linear"}}})},Ps=Object.freeze({__proto__:null,grid:rs,ruler:is,baseTooltip:os,timeScale:ss,options:Cs,carbonPrefix:"cds",area:pt,axis:gt,canvasZoomSettings:vt,circlePack:mt,color:yt,boxplot:bt,histogram:xt,legend:_t,lines:Et,meter:wt,pie:Ot,radar:Tt,alluvial:St,heatmap:Mt,spacers:At,tooltips:Ct,transitions:Pt,toolbar:{buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},zoomBar:Dt,defaultLegendAdditionalItems:Lt});function Ds(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ls(t){let e=t,n=t;function r(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const o=r+i>>>1;n(t[o],e)<0?r=o+1:i=o}return r}return 1===t.length&&(e=(e,n)=>t(e)-n,n=function(t){return(e,n)=>Ds(t(e),n)}(t)),{left:r,center:function(t,n,i,o){null==i&&(i=0),null==o&&(o=t.length);const a=r(t,n,i,o-1);return a>i&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const o=r+i>>>1;n(t[o],e)>0?i=o:r=o+1}return r}}}const ks=Ls(Ds).right;Ls((function(t){return null===t?NaN:+t})).center;function Rs(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Is extends Map{constructor(t,e=Bs){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Ns(this,t))}has(t){return super.has(Ns(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);t.has(r)&&(n=t.get(n),t.delete(r));return n}(this,t))}}function Ns({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Bs(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Us(t){return t}var Vs=Array.prototype.slice;function Gs(t){return function(){return t}}var Hs=Math.sqrt(50),zs=Math.sqrt(10),js=Math.sqrt(2);function Fs(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=Ws(t,e,n))||!isFinite(a))return[];if(a>0){let n=Math.round(t/a),r=Math.round(e/a);for(n*a<t&&++n,r*a>e&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)*a}else{a=-a;let n=Math.round(t*a),r=Math.round(e*a);for(n/a<t&&++n,r/a>e&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)/a}return r&&o.reverse(),o}function Ws(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Hs?10:o>=zs?5:o>=js?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Hs?10:o>=zs?5:o>=js?2:1)}function qs(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Hs?i*=10:o>=zs?i*=5:o>=js&&(i*=2),e<t?-i:i}function Zs(t){return Math.ceil(Math.log(function(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}(t))/Math.LN2)+1}function Ys(){var t=Us,e=Rs,n=Zs;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a=r.length,s=new Array(a);for(i=0;i<a;++i)s[i]=t(r[i],i,r);var l=e(s),u=l[0],c=l[1],h=n(s,u,c);if(!Array.isArray(h)){const t=c,n=+h;if(e===Rs&&([u,c]=function(t,e,n){let r;for(;;){const i=Ws(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(u,c,n)),(h=Fs(u,c,n))[h.length-1]>=c)if(t>=c&&e===Rs){const t=Ws(u,c,n);isFinite(t)&&(t>0?c=(Math.floor(c/t)+1)*t:t<0&&(c=(Math.ceil(c*-t)+1)/-t))}else h.pop()}for(var d=h.length;h[0]<=u;)h.shift(),--d;for(;h[d-1]>c;)h.pop(),--d;var f,p=new Array(d+1);for(i=0;i<=d;++i)(f=p[i]=[]).x0=i>0?h[i-1]:u,f.x1=i<d?h[i]:c;for(i=0;i<a;++i)null!=(o=s[i])&&u<=o&&o<=c&&p[ks(h,o,0,d)].push(r[i]);return p}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:Gs(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:Gs([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Gs(Vs.call(t)):Gs(t),r):n},r}function Xs(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Ks(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function Qs(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function $s(t,e,n){if(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n))).length){if((e=+e)<=0||r<2)return Ks(t);if(e>=1)return Xs(t);var r,i=(r-1)*e,o=Math.floor(i),a=Xs(function t(e,n,r=0,i=e.length-1,o=Ds){for(;i>r;){if(i-r>600){const a=i-r+1,s=n-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,n,Math.max(r,Math.floor(n-s*u/a+c)),Math.min(i,Math.floor(n+(a-s)*u/a+c)),o)}const a=e[n];let s=r,l=i;for(Qs(e,r,n),o(e[i],a)>0&&Qs(e,r,i);s<l;){for(Qs(e,s,l),++s,--l;o(e[s],a)<0;)++s;for(;o(e[l],a)>0;)--l}0===o(e[r],a)?Qs(e,r,l):(++l,Qs(e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}return e}(t,o).subarray(0,o+1));return a+(Ks(t.subarray(o+1))-a)*(i-o)}}function Js(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}function tl(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const el=Symbol("implicit");function nl(){var t=new Is,e=[],n=[],r=el;function i(i){let o=t.get(i);if(void 0===o){if(r!==el)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Is;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return nl(e,n).unknown(r)},tl.apply(i,arguments),i}function rl(){var t,e,n=nl().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,u=0,c=.5;function h(){var n=r().length,h=a<o,d=h?a:o,f=h?o:a;t=(f-d)/Math.max(1,n-l+2*u),s&&(t=Math.floor(t)),d+=(f-d-t*(n-l))*c,e=t*(1-l),s&&(d=Math.round(d),e=Math.round(e));var p=Js(n).map((function(e){return d+t*e}));return i(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),h()):r()},n.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,h()):[o,a]},n.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,s=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,h()):s},n.padding=function(t){return arguments.length?(l=Math.min(1,u=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(u=+t,h()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),h()):c},n.copy=function(){return rl(r(),[o,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},tl.apply(h(),arguments)}function il(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ol(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function al(){}var sl="\\s*([+-]?\\d+)\\s*",ll="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ul="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cl=/^#([0-9a-f]{3,8})$/,hl=new RegExp("^rgb\\("+[sl,sl,sl]+"\\)$"),dl=new RegExp("^rgb\\("+[ul,ul,ul]+"\\)$"),fl=new RegExp("^rgba\\("+[sl,sl,sl,ll]+"\\)$"),pl=new RegExp("^rgba\\("+[ul,ul,ul,ll]+"\\)$"),gl=new RegExp("^hsl\\("+[ll,ul,ul]+"\\)$"),vl=new RegExp("^hsla\\("+[ll,ul,ul,ll]+"\\)$"),ml={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function yl(){return this.rgb().formatHex()}function bl(){return this.rgb().formatRgb()}function xl(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=cl.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?_l(e):3===n?new Tl(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?El(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?El(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=hl.exec(t))?new Tl(e[1],e[2],e[3],1):(e=dl.exec(t))?new Tl(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=fl.exec(t))?El(e[1],e[2],e[3],e[4]):(e=pl.exec(t))?El(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=gl.exec(t))?Cl(e[1],e[2]/100,e[3]/100,1):(e=vl.exec(t))?Cl(e[1],e[2]/100,e[3]/100,e[4]):ml.hasOwnProperty(t)?_l(ml[t]):"transparent"===t?new Tl(NaN,NaN,NaN,0):null}function _l(t){return new Tl(t>>16&255,t>>8&255,255&t,1)}function El(t,e,n,r){return r<=0&&(t=e=n=NaN),new Tl(t,e,n,r)}function wl(t){return t instanceof al||(t=xl(t)),t?new Tl((t=t.rgb()).r,t.g,t.b,t.opacity):new Tl}function Ol(t,e,n,r){return 1===arguments.length?wl(t):new Tl(t,e,n,null==r?1:r)}function Tl(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Sl(){return"#"+Al(this.r)+Al(this.g)+Al(this.b)}function Ml(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Al(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Cl(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ll(t,e,n,r)}function Pl(t){if(t instanceof Ll)return new Ll(t.h,t.s,t.l,t.opacity);if(t instanceof al||(t=xl(t)),!t)return new Ll;if(t instanceof Ll)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ll(a,s,l,t.opacity)}function Dl(t,e,n,r){return 1===arguments.length?Pl(t):new Ll(t,e,n,null==r?1:r)}function Ll(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function kl(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}il(al,xl,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:yl,formatHex:yl,formatHsl:function(){return Pl(this).formatHsl()},formatRgb:bl,toString:bl}),il(Tl,Ol,ol(al,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Tl(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Tl(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sl,formatHex:Sl,formatRgb:Ml,toString:Ml})),il(Ll,Dl,ol(al,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ll(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ll(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Tl(kl(t>=240?t-240:t+120,i,r),kl(t,i,r),kl(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Rl=t=>()=>t;function Il(t){return 1==(t=+t)?Nl:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Rl(isNaN(e)?n:e)}}function Nl(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Rl(isNaN(t)?e:t)}var Bl=function t(e){var n=Il(e);function r(t,e){var r=n((t=Ol(t)).r,(e=Ol(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Nl(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Ul(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function Vl(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=ql(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function Gl(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Hl(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function zl(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=ql(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var jl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fl=new RegExp(jl.source,"g");function Wl(t,e){var n,r,i,o=jl.lastIndex=Fl.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=jl.exec(t))&&(r=Fl.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Hl(n,r)})),o=Fl.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function ql(t,e){var n,r=typeof e;return null==e||"boolean"===r?Rl(e):("number"===r?Hl:"string"===r?(n=xl(e))?(e=n,Bl):Wl:e instanceof xl?Bl:e instanceof Date?Gl:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Ul:Array.isArray(e)?Vl:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?zl:Hl)(t,e)}function Zl(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Yl,Xl=180/Math.PI,Kl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ql(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Xl,skewX:Math.atan(l)*Xl,scaleX:a,scaleY:s}}function $l(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],l=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var l=a.push("translate(",null,e,null,n);s.push({i:l-4,x:Hl(t,i)},{i:l-2,x:Hl(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Hl(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,l),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Hl(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,l),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Hl(t,n)},{i:s-2,x:Hl(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Jl=$l((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Kl:Ql(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),tu=$l((function(t){return null==t?Kl:(Yl||(Yl=document.createElementNS("http://www.w3.org/2000/svg","g")),Yl.setAttribute("transform",t),(t=Yl.transform.baseVal.consolidate())?Ql((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Kl)}),", ",")",")");function eu(t){return+t}var nu=[0,1];function ru(t){return t}function iu(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function ou(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=iu(i,r),o=n(a,o)):(r=iu(r,i),o=n(o,a)),function(t){return o(r(t))}}function au(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=iu(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=ks(t,e,1,r)-1;return o[n](i[n](e))}}function su(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function lu(){var t,e,n,r,i,o,a=nu,s=nu,l=ql,u=ru;function c(){var t,e,n,l=Math.min(a.length,s.length);return u!==ru&&(t=a[0],e=a[l-1],t>e&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),r=l>2?au:ou,i=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(a.map(t),s,l)))(t(u(e)))}return h.invert=function(n){return u(e((o||(o=r(s,a.map(t),Hl)))(n)))},h.domain=function(t){return arguments.length?(a=Array.from(t,eu),c()):a.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=Zl,c()},h.clamp=function(t){return arguments.length?(u=!!t||ru,c()):u!==ru},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function uu(){return lu()(ru,ru)}function cu(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function hu(t){return(t=cu(Math.abs(t)))?t[1]:NaN}var du,fu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pu(t){if(!(e=fu.exec(t)))throw new Error("invalid format: "+t);var e;return new gu({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function gu(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function vu(t,e){var n=cu(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}pu.prototype=gu.prototype,gu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var mu={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>vu(100*t,e),r:vu,s:function(t,e){var n=cu(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(du=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+cu(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function yu(t){return t}var bu,xu,_u,Eu=Array.prototype.map,wu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ou(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?yu:(e=Eu.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(t.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?yu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Eu.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=pu(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):mu[y]||(void 0===v&&(v=12),m=!0,y="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x="$"===d?o:/[%p]/.test(y)?l:"",_=mu[y],E=/[defgprs%]/.test(y);function w(t){var i,o,l,d=b,w=x;if("c"===y)w=_(t)+w,t="";else{var O=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:_(Math.abs(t),v),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),O&&0==+t&&"+"!==h&&(O=!1),d=(O?"("===h?h:u:"-"===h||"("===h?"":h)+d,w=("s"===y?wu[8+du/3]:"")+w+(O&&"("===h?")":""),E)for(i=-1,o=t.length;++i<o;)if(48>(l=t.charCodeAt(i))||l>57){w=(46===l?a+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!f&&(t=r(t,1/0));var T=d.length+t.length+w.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&f&&(t=r(S+t,S.length?p-w.length:1/0),S=""),n){case"<":t=d+t+w+S;break;case"=":t=d+S+t+w;break;case"^":t=S.slice(0,T=S.length>>1)+d+t+w+S.slice(T);break;default:t=S+d+t+w}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=pu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(hu(e)/3))),i=Math.pow(10,-r),o=wu[8+r/3];return function(t){return n(i*t)+o}}}}function Tu(t,e,n,r){var i,o=qs(t,e,n);switch((r=pu(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(hu(e)/3)))-hu(Math.abs(t)))}(o,a))||(r.precision=i),_u(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,hu(e)-hu(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-hu(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return xu(r)}function Su(t){var e=t.domain;return t.ticks=function(t){var n=e();return Fs(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Tu(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),a=0,s=o.length-1,l=o[a],u=o[s],c=10;for(u<l&&(i=l,l=u,u=i,i=a,a=s,s=i);c-- >0;){if((i=Ws(l,u,n))===r)return o[a]=l,o[s]=u,e(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function Mu(){var t=uu();return t.copy=function(){return su(t,Mu())},tl.apply(t,arguments),Su(t)}function Au(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function Cu(t){return Math.log(t)}function Pu(t){return Math.exp(t)}function Du(t){return-Math.log(-t)}function Lu(t){return-Math.exp(-t)}function ku(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ru(t){return function(e){return-t(-e)}}function Iu(t){var e,n,r=t(Cu,Pu),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?ku:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=Ru(e),n=Ru(n),t(Du,Lu)):t(Cu,Pu),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],l=a[a.length-1];(r=l<s)&&(d=s,s=l,l=d);var u,c,h,d=e(s),f=e(l),p=null==t?10:+t,g=[];if(!(o%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),s>0){for(;d<=f;++d)for(c=1,u=n(d);c<o;++c)if(!((h=u*c)<s)){if(h>l)break;g.push(h)}}else for(;d<=f;++d)for(c=o-1,u=n(d);c>=1;--c)if(!((h=u*c)<s)){if(h>l)break;g.push(h)}2*g.length<p&&(g=Fs(s,l,p))}else g=Fs(d,f,Math.min(f-d,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=xu(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(Au(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}bu=Ou({thousands:",",grouping:[3],currency:["$",""]}),xu=bu.format,_u=bu.formatPrefix;var Nu=new Date,Bu=new Date;function Uu(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return Uu((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Nu.setTime(+e),Bu.setTime(+r),t(Nu),t(Bu),Math.floor(n(Nu,Bu))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Vu=Uu((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Vu.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Uu((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Vu:null};var Gu=Uu((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),Hu=Uu((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),zu=Uu((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),ju=Uu(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1);function Fu(t){return Uu((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Wu=Fu(0),qu=Fu(1),Zu=(Fu(2),Fu(3),Fu(4)),Yu=(Fu(5),Fu(6),Uu((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),Xu=Uu((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Xu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Uu((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Ku=Uu((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}));function Qu(t){return Uu((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var $u=Qu(0),Ju=Qu(1),tc=(Qu(2),Qu(3),Qu(4)),ec=(Qu(5),Qu(6),Uu((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));ec.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Uu((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const[nc,rc]=function(t,e,n,r,i,o){const a=[[Gu,1,1e3],[Gu,5,5e3],[Gu,15,15e3],[Gu,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function s(e,n,r){const i=Math.abs(n-e)/r,o=Ls(([,,t])=>t).right(a,i);if(o===a.length)return t.every(qs(e/31536e6,n/31536e6,r));if(0===o)return Vu.every(Math.max(qs(e,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),o=i?i.range(t,+e+1):[];return r?o.reverse():o},s]}(Xu,Yu,Wu,ju,zu,Hu);function ic(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function oc(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ac(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var sc,lc,uc={"-":"",_:" ",0:"0"},cc=/^\s*\d+/,hc=/^%/,dc=/[\\^$*+?|[\]().{}]/g;function fc(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function pc(t){return t.replace(dc,"\\$&")}function gc(t){return new RegExp("^(?:"+t.map(pc).join("|")+")","i")}function vc(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function mc(t,e,n){var r=cc.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function yc(t,e,n){var r=cc.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function bc(t,e,n){var r=cc.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function xc(t,e,n){var r=cc.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function _c(t,e,n){var r=cc.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ec(t,e,n){var r=cc.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function wc(t,e,n){var r=cc.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Oc(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Tc(t,e,n){var r=cc.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Sc(t,e,n){var r=cc.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Mc(t,e,n){var r=cc.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ac(t,e,n){var r=cc.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Cc(t,e,n){var r=cc.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Pc(t,e,n){var r=cc.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Dc(t,e,n){var r=cc.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Lc(t,e,n){var r=cc.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function kc(t,e,n){var r=cc.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Rc(t,e,n){var r=hc.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ic(t,e,n){var r=cc.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Nc(t,e,n){var r=cc.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Bc(t,e){return fc(t.getDate(),e,2)}function Uc(t,e){return fc(t.getHours(),e,2)}function Vc(t,e){return fc(t.getHours()%12||12,e,2)}function Gc(t,e){return fc(1+ju.count(Xu(t),t),e,3)}function Hc(t,e){return fc(t.getMilliseconds(),e,3)}function zc(t,e){return Hc(t,e)+"000"}function jc(t,e){return fc(t.getMonth()+1,e,2)}function Fc(t,e){return fc(t.getMinutes(),e,2)}function Wc(t,e){return fc(t.getSeconds(),e,2)}function qc(t){var e=t.getDay();return 0===e?7:e}function Zc(t,e){return fc(Wu.count(Xu(t)-1,t),e,2)}function Yc(t){var e=t.getDay();return e>=4||0===e?Zu(t):Zu.ceil(t)}function Xc(t,e){return t=Yc(t),fc(Zu.count(Xu(t),t)+(4===Xu(t).getDay()),e,2)}function Kc(t){return t.getDay()}function Qc(t,e){return fc(qu.count(Xu(t)-1,t),e,2)}function $c(t,e){return fc(t.getFullYear()%100,e,2)}function Jc(t,e){return fc((t=Yc(t)).getFullYear()%100,e,2)}function th(t,e){return fc(t.getFullYear()%1e4,e,4)}function eh(t,e){var n=t.getDay();return fc((t=n>=4||0===n?Zu(t):Zu.ceil(t)).getFullYear()%1e4,e,4)}function nh(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+fc(e/60|0,"0",2)+fc(e%60,"0",2)}function rh(t,e){return fc(t.getUTCDate(),e,2)}function ih(t,e){return fc(t.getUTCHours(),e,2)}function oh(t,e){return fc(t.getUTCHours()%12||12,e,2)}function ah(t,e){return fc(1+Ku.count(ec(t),t),e,3)}function sh(t,e){return fc(t.getUTCMilliseconds(),e,3)}function lh(t,e){return sh(t,e)+"000"}function uh(t,e){return fc(t.getUTCMonth()+1,e,2)}function ch(t,e){return fc(t.getUTCMinutes(),e,2)}function hh(t,e){return fc(t.getUTCSeconds(),e,2)}function dh(t){var e=t.getUTCDay();return 0===e?7:e}function fh(t,e){return fc($u.count(ec(t)-1,t),e,2)}function ph(t){var e=t.getUTCDay();return e>=4||0===e?tc(t):tc.ceil(t)}function gh(t,e){return t=ph(t),fc(tc.count(ec(t),t)+(4===ec(t).getUTCDay()),e,2)}function vh(t){return t.getUTCDay()}function mh(t,e){return fc(Ju.count(ec(t)-1,t),e,2)}function yh(t,e){return fc(t.getUTCFullYear()%100,e,2)}function bh(t,e){return fc((t=ph(t)).getUTCFullYear()%100,e,2)}function xh(t,e){return fc(t.getUTCFullYear()%1e4,e,4)}function _h(t,e){var n=t.getUTCDay();return fc((t=n>=4||0===n?tc(t):tc.ceil(t)).getUTCFullYear()%1e4,e,4)}function Eh(){return"+0000"}function wh(){return"%"}function Oh(t){return+t}function Th(t){return Math.floor(+t/1e3)}function Sh(t){return new Date(t)}function Mh(t){return t instanceof Date?+t:+new Date(+t)}function Ah(t,e,n,r,i,o,a,s,l,u){var c=uu(),h=c.invert,d=c.domain,f=u(".%L"),p=u(":%S"),g=u("%I:%M"),v=u("%I %p"),m=u("%a %d"),y=u("%b %d"),b=u("%B"),x=u("%Y");function _(t){return(l(t)<t?f:s(t)<t?p:a(t)<t?g:o(t)<t?v:r(t)<t?i(t)<t?m:y:n(t)<t?b:x)(t)}return c.invert=function(t){return new Date(h(t))},c.domain=function(t){return arguments.length?d(Array.from(t,Mh)):d().map(Sh)},c.ticks=function(e){var n=d();return t(n[0],n[n.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?_:u(e)},c.nice=function(t){var n=d();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?d(Au(n,t)):c},c.copy=function(){return su(c,Ah(t,e,n,r,i,o,a,s,l,u))},c}function Ch(){return tl.apply(Ah(nc,rc,Xu,Yu,Wu,ju,zu,Hu,Gu,lc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}!function(t){sc=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,u=gc(i),c=vc(i),h=gc(o),d=vc(o),f=gc(a),p=vc(a),g=gc(s),v=vc(s),m=gc(l),y=vc(l),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Bc,e:Bc,f:zc,g:Jc,G:eh,H:Uc,I:Vc,j:Gc,L:Hc,m:jc,M:Fc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Oh,s:Th,S:Wc,u:qc,U:Zc,V:Xc,w:Kc,W:Qc,x:null,X:null,y:$c,Y:th,Z:nh,"%":wh},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:rh,e:rh,f:lh,g:bh,G:_h,H:ih,I:oh,j:ah,L:sh,m:uh,M:ch,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Oh,s:Th,S:hh,u:dh,U:fh,V:gh,w:vh,W:mh,x:null,X:null,y:yh,Y:xh,Z:Eh,"%":wh},_={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return O(t,e,n,r)},d:Mc,e:Mc,f:kc,g:wc,G:Ec,H:Cc,I:Cc,j:Ac,L:Lc,m:Sc,M:Pc,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:Tc,Q:Ic,s:Nc,S:Dc,u:yc,U:bc,V:xc,w:mc,W:_c,x:function(t,e,r){return O(t,n,e,r)},X:function(t,e,n){return O(t,r,e,n)},y:wc,Y:Ec,Z:Oc,"%":Rc};function E(t,e){return function(n){var r,i,o,a=[],s=-1,l=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(i=uc[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(t.slice(l,s)),a.join("")}}function w(t,e){return function(n){var r,i,o=ac(1900,void 0,1);if(O(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=oc(ac(o.y,0,1))).getUTCDay(),r=i>4||0===i?Ju.ceil(r):Ju(r),r=Ku.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=ic(ac(o.y,0,1))).getDay(),r=i>4||0===i?qu.ceil(r):qu(r),r=ju.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?oc(ac(o.y,0,1)).getUTCDay():ic(ac(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,oc(o)):ic(o)}}function O(t,e,n,r){for(var i,o,a=0,s=e.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=_[i in uc?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=E(n,b),b.X=E(r,b),b.c=E(e,b),x.x=E(n,x),x.X=E(r,x),x.c=E(e,x),{format:function(t){var e=E(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=E(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}})}(t),lc=sc.format,sc.parse,sc.utcFormat,sc.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Ph=Math.PI,Dh=2*Ph,Lh=Dh-1e-6;function kh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Rh(){return new kh}function Ih(t){return function(){return t}}kh.prototype=Rh.prototype={constructor:kh,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,l=r-e,u=o-t,c=a-e,h=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-l*u)>1e-6&&i){var d=n-o,f=r-a,p=s*s+l*l,g=d*d+f*f,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Ph-Math.acos((p+h-g)/(2*v*m)))/2),b=y/m,x=y/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>u*f)+","+(this._x1=t+x*s)+","+(this._y1=e+x*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,u=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+l+","+u),n&&(h<0&&(h=h%Dh+Dh),h>Lh?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Ph)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Nh=Math.abs,Bh=Math.atan2,Uh=Math.cos,Vh=Math.max,Gh=Math.min,Hh=Math.sin,zh=Math.sqrt,jh=Math.PI,Fh=jh/2,Wh=2*jh;function qh(t){return t>1?0:t<-1?jh:Math.acos(t)}function Zh(t){return t>=1?Fh:t<=-1?-Fh:Math.asin(t)}function Yh(t){return t.innerRadius}function Xh(t){return t.outerRadius}function Kh(t){return t.startAngle}function Qh(t){return t.endAngle}function $h(t){return t&&t.padAngle}function Jh(t,e,n,r,i,o,a,s){var l=n-t,u=r-e,c=a-i,h=s-o,d=h*l-c*u;if(!(d*d<1e-12))return[t+(d=(c*(e-o)-h*(t-i))/d)*l,e+d*u]}function td(t,e,n,r,i,o,a){var s=t-n,l=e-r,u=(a?o:-o)/zh(s*s+l*l),c=u*l,h=-u*s,d=t+c,f=e+h,p=n+c,g=r+h,v=(d+p)/2,m=(f+g)/2,y=p-d,b=g-f,x=y*y+b*b,_=i-o,E=d*g-p*f,w=(b<0?-1:1)*zh(Vh(0,_*_*x-E*E)),O=(E*b-y*w)/x,T=(-E*y-b*w)/x,S=(E*b+y*w)/x,M=(-E*y+b*w)/x,A=O-v,C=T-m,P=S-v,D=M-m;return A*A+C*C>P*P+D*D&&(O=S,T=M),{cx:O,cy:T,x01:-c,y01:-h,x11:O*(i/_-1),y11:T*(i/_-1)}}function ed(){var t=Yh,e=Xh,n=Ih(0),r=null,i=Kh,o=Qh,a=$h,s=null;function l(){var l,u,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Fh,f=o.apply(this,arguments)-Fh,p=Nh(f-d),g=f>d;if(s||(s=l=Rh()),h<c&&(u=h,h=c,c=u),h>1e-12)if(p>Wh-1e-12)s.moveTo(h*Uh(d),h*Hh(d)),s.arc(0,0,h,d,f,!g),c>1e-12&&(s.moveTo(c*Uh(f),c*Hh(f)),s.arc(0,0,c,f,d,g));else{var v,m,y=d,b=f,x=d,_=f,E=p,w=p,O=a.apply(this,arguments)/2,T=O>1e-12&&(r?+r.apply(this,arguments):zh(c*c+h*h)),S=Gh(Nh(h-c)/2,+n.apply(this,arguments)),M=S,A=S;if(T>1e-12){var C=Zh(T/c*Hh(O)),P=Zh(T/h*Hh(O));(E-=2*C)>1e-12?(x+=C*=g?1:-1,_-=C):(E=0,x=_=(d+f)/2),(w-=2*P)>1e-12?(y+=P*=g?1:-1,b-=P):(w=0,y=b=(d+f)/2)}var D=h*Uh(y),L=h*Hh(y),k=c*Uh(_),R=c*Hh(_);if(S>1e-12){var I,N=h*Uh(b),B=h*Hh(b),U=c*Uh(x),V=c*Hh(x);if(p<jh&&(I=Jh(D,L,U,V,N,B,k,R))){var G=D-I[0],H=L-I[1],z=N-I[0],j=B-I[1],F=1/Hh(qh((G*z+H*j)/(zh(G*G+H*H)*zh(z*z+j*j)))/2),W=zh(I[0]*I[0]+I[1]*I[1]);M=Gh(S,(c-W)/(F-1)),A=Gh(S,(h-W)/(F+1))}}w>1e-12?A>1e-12?(v=td(U,V,D,L,h,A,g),m=td(N,B,k,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<S?s.arc(v.cx,v.cy,A,Bh(v.y01,v.x01),Bh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,Bh(v.y01,v.x01),Bh(v.y11,v.x11),!g),s.arc(0,0,h,Bh(v.cy+v.y11,v.cx+v.x11),Bh(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Bh(m.y11,m.x11),Bh(m.y01,m.x01),!g))):(s.moveTo(D,L),s.arc(0,0,h,y,b,!g)):s.moveTo(D,L),c>1e-12&&E>1e-12?M>1e-12?(v=td(k,R,N,B,c,-M,g),m=td(D,L,U,V,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,Bh(v.y01,v.x01),Bh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,Bh(v.y01,v.x01),Bh(v.y11,v.x11),!g),s.arc(0,0,c,Bh(v.cy+v.y11,v.cx+v.x11),Bh(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,Bh(m.y11,m.x11),Bh(m.y01,m.x01),!g))):s.arc(0,0,c,_,x,g):s.lineTo(k,R)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-jh/2;return[Uh(r)*n,Hh(r)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ih(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ih(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ih(+t),l):n},l.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ih(+t),l):r},l.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ih(+t),l):i},l.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ih(+t),l):o},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ih(+t),l):a},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}var nd=Array.prototype.slice;function rd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function id(t){this._context=t}function od(t){return new id(t)}function ad(t){return t[0]}function sd(t){return t[1]}function ld(t,e){var n=Ih(!0),r=null,i=od,o=null;function a(a){var s,l,u,c=(a=rd(a)).length,h=!1;for(null==r&&(o=i(u=Rh())),s=0;s<=c;++s)!(s<c&&n(l=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(l,s,a),+e(l,s,a));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?ad:Ih(t),e="function"==typeof e?e:void 0===e?sd:Ih(e),a.x=function(e){return arguments.length?(t="function"==typeof e?e:Ih(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Ih(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ih(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}function ud(t,e,n){var r=null,i=Ih(!0),o=null,a=od,s=null;function l(l){var u,c,h,d,f,p=(l=rd(l)).length,g=!1,v=new Array(p),m=new Array(p);for(null==o&&(s=a(f=Rh())),u=0;u<=p;++u){if(!(u<p&&i(d=l[u],u,l))===g)if(g=!g)c=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=c;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[u]=+t(d,u,l),m[u]=+e(d,u,l),s.point(r?+r(d,u,l):v[u],n?+n(d,u,l):m[u]))}if(f)return s=null,f+""||null}function u(){return ld().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?ad:Ih(+t),e="function"==typeof e?e:Ih(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?sd:Ih(+n),l.x=function(e){return arguments.length?(t="function"==typeof e?e:Ih(+e),r=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:Ih(+e),l):t},l.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ih(+t),l):r},l.y=function(t){return arguments.length?(e="function"==typeof t?t:Ih(+t),n=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:Ih(+t),l):e},l.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Ih(+t),l):n},l.lineX0=l.lineY0=function(){return u().x(t).y(e)},l.lineY1=function(){return u().x(t).y(n)},l.lineX1=function(){return u().x(r).y(e)},l.defined=function(t){return arguments.length?(i="function"==typeof t?t:Ih(!!t),l):i},l.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),l):a},l.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),l):o},l}function cd(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function hd(t){return t}id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var dd=pd(od);function fd(t){this._curve=t}function pd(t){function e(e){return new fd(t(e))}return e._curve=t,e}function gd(){return t=ld().curve(dd),e=t.curve,t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(pd(t)):e()._curve},t;var t,e}function vd(t){return t.source}function md(t){return t.target}function yd(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function bd(){return function(t){var e=vd,n=md,r=ad,i=sd,o=null;function a(){var a,s=nd.call(arguments),l=e.apply(this,s),u=n.apply(this,s);if(o||(o=a=Rh()),t(o,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:Ih(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:Ih(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}(yd)}function xd(){}function _d(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Ed(t){this._context=t}function wd(t){return new Ed(t)}function Od(t){this._context=t}function Td(t){return new Od(t)}function Sd(t){this._context=t}function Md(t){return new Sd(t)}function Ad(t,e){this._basis=new Ed(t),this._beta=e}fd.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},Ed.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_d(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_d(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Od.prototype={areaStart:xd,areaEnd:xd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:_d(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:_d(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Ad.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*a),this._beta*e[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Cd=function t(e){function n(t){return 1===e?new Ed(t):new Ad(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Pd(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Dd(t,e){this._context=t,this._k=(1-e)/6}Dd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Pd(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Pd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ld=function t(e){function n(t){return new Dd(t,e)}return n.tension=function(e){return t(+e)},n}(0);function kd(t,e){this._context=t,this._k=(1-e)/6}kd.prototype={areaStart:xd,areaEnd:xd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Pd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Rd=function t(e){function n(t){return new kd(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Id(t,e){this._context=t,this._k=(1-e)/6}Id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Pd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Nd=function t(e){function n(t){return new Id(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Bd(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Ud(t,e){this._context=t,this._alpha=e}Ud.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Bd(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Vd=function t(e){function n(t){return e?new Ud(t,e):new Dd(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Gd(t,e){this._context=t,this._alpha=e}Gd.prototype={areaStart:xd,areaEnd:xd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Bd(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Hd=function t(e){function n(t){return e?new Gd(t,e):new kd(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function zd(t,e){this._context=t,this._alpha=e}zd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bd(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var jd=function t(e){function n(t){return e?new zd(t,e):new Id(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Fd(t){this._context=t}function Wd(t){return new Fd(t)}function qd(t){return t<0?-1:1}function Zd(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(qd(o)+qd(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Yd(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Xd(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Kd(t){this._context=t}function Qd(t){this._context=new $d(t)}function $d(t){this._context=t}function Jd(t){return new Kd(t)}function tf(t){return new Qd(t)}function ef(t){this._context=t}function nf(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function rf(t){return new ef(t)}function of(t,e){this._context=t,this._t=e}function af(t){return new of(t,.5)}function sf(t){return new of(t,0)}function lf(t){return new of(t,1)}function uf(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function cf(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function hf(t,e){return t[e]}function df(t){const e=[];return e.key=t,e}function ff(){var t=Ih([]),e=cf,n=uf,r=hf;function i(i){var o,a,s=Array.from(t.apply(this,arguments),df),l=s.length,u=-1;for(const t of i)for(o=0,++u;o<l;++o)(s[o][u]=[0,+r(t,s[o].key,u,i)]).data=t;for(o=0,a=rd(e(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Ih(Array.from(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Ih(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?cf:"function"==typeof t?t:Ih(Array.from(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?uf:t,i):n},i}function pf(t,e){if((s=t.length)>0)for(var n,r,i,o,a,s,l=0,u=t[e[0]].length;l<u;++l)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][l])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}function gf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function vf(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function mf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t),r=vf(e);return n.setDate(n.getDate()+r),n}function yf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t).getTime(),r=vf(e);return new Date(n+r)}Fd.prototype={areaStart:xd,areaEnd:xd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Kd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Xd(this,this._t0,Yd(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Xd(this,Yd(this,n=Zd(this,t,e)),n);break;default:Xd(this,this._t0,n=Zd(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Qd.prototype=Object.create(Kd.prototype)).point=function(t,e){Kd.prototype.point.call(this,e,t)},$d.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},ef.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=nf(t),i=nf(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},of.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};function bf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return yf(t,36e5*n)}function xf(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function _f(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=gf(t);return e.setHours(0,0,0,0),e}function Ef(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_f(t),r=_f(e),i=n.getTime()-xf(n),o=r.getTime()-xf(r);return Math.round((i-o)/864e5)}function wf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return yf(t,6e4*n)}function Of(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=gf(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function Tf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t),r=vf(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Of(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function Sf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return yf(t,1e3*n)}function Mf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return Tf(t,12*n)}function Af(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t),r=gf(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Cf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=gf(t);return!isNaN(e)}function Pf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t),r=gf(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Df(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t),r=gf(e);return n.getFullYear()-r.getFullYear()}function Lf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t),r=gf(e);return n.getTime()-r.getTime()}function kf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Lf(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Rf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Lf(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var If={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Nf(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Bf={date:Nf({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Nf({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Nf({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Uf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Vf(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,l=i.width?String(i.width):t.defaultWidth;r=t.values[l]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function Gf(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var l,u=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),l=t.valueCallback?t.valueCallback(l):l,{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(u.length)}}}var Hf,zf={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof If[t]?If[t]:1===e?If[t].one:If[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Bf,formatRelative:function(t,e,n,r){return Uf[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Vf({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Vf({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:Vf({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Vf({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Vf({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Hf={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},i=n.match(Hf.matchPattern);if(!i)return null;var o=i[0],a=n.match(Hf.parsePattern);if(!a)return null;var s=Hf.valueCallback?Hf.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Gf({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Gf({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Gf({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Gf({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Gf({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function jf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return yf(t,-n)}function Ff(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Wf=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Ff("yy"===e?r%100:r,e.length)},qf=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Ff(n+1,2)},Zf=function(t,e){return Ff(t.getUTCDate(),e.length)},Yf=function(t,e){return Ff(t.getUTCHours()%12||12,e.length)},Xf=function(t,e){return Ff(t.getUTCHours(),e.length)},Kf=function(t,e){return Ff(t.getUTCMinutes(),e.length)},Qf=function(t,e){return Ff(t.getUTCSeconds(),e.length)},$f=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Ff(Math.floor(r*Math.pow(10,n-3)),e.length)};function Jf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=gf(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function tp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=gf(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Jf(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=Jf(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function ep(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=tp(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Jf(n);return r}function np(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:vf(i),a=null==n.weekStartsOn?o:vf(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=gf(t),l=s.getUTCDay(),u=(l<a?7:0)+l-a;return s.setUTCDate(s.getUTCDate()-u),s.setUTCHours(0,0,0,0),s}function rp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=gf(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:vf(a),l=null==i.firstWeekContainsDate?s:vf(i.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(r+1,0,l),u.setUTCHours(0,0,0,0);var c=np(u,e),h=new Date(0);h.setUTCFullYear(r,0,l),h.setUTCHours(0,0,0,0);var d=np(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function ip(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:vf(i),a=null==n.firstWeekContainsDate?o:vf(n.firstWeekContainsDate),s=rp(t,e),l=new Date(0);l.setUTCFullYear(s,0,a),l.setUTCHours(0,0,0,0);var u=np(l,e);return u}var op="midnight",ap="noon",sp="morning",lp="afternoon",up="evening",cp="night",hp={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Wf(t,e)},Y:function(t,e,n,r){var i=rp(t,r),o=i>0?i:1-i;return"YY"===e?Ff(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Ff(o,e.length)},R:function(t,e){return Ff(tp(t),e.length)},u:function(t,e){return Ff(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Ff(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Ff(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return qf(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Ff(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=gf(t),r=np(n,e).getTime()-ip(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Ff(i,e.length)},I:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=gf(t),n=Jf(e).getTime()-ep(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Ff(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Zf(t,e)},D:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=gf(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):Ff(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Ff(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Ff(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return Ff(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?ap:0===i?op:i/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?up:i>=12?lp:i>=4?sp:cp,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Yf(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Xf(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Ff(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Ff(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Kf(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Qf(t,e)},S:function(t,e){return $f(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return fp(i);case"XXXX":case"XX":return pp(i);case"XXXXX":case"XXX":default:return pp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return fp(i);case"xxxx":case"xx":return pp(i);case"xxxxx":case"xxx":default:return pp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+dp(i,":");case"OOOO":default:return"GMT"+pp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+dp(i,":");case"zzzz":default:return"GMT"+pp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Ff(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Ff((r._originalDate||t).getTime(),e.length)}};function dp(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+Ff(o,2)}function fp(t,e){return t%60==0?(t>0?"-":"+")+Ff(Math.abs(t)/60,2):pp(t,e)}function pp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Ff(Math.floor(i/60),2)+n+Ff(i%60,2)}function gp(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function vp(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var mp={p:vp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return gp(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",gp(i,e)).replace("{{time}}",vp(o,e))}},yp=["D","DD"],bp=["YY","YYYY"];function xp(t){return-1!==yp.indexOf(t)}function _p(t){return-1!==bp.indexOf(t)}function Ep(t){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if("YY"===t)throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if("D"===t)throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if("DD"===t)throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}var wp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Op=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tp=/^'([^]*?)'?$/,Sp=/''/g,Mp=/[a-zA-Z]/;function Ap(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||zf,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:vf(a),l=null==i.firstWeekContainsDate?s:vf(i.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,c=null==u?0:vf(u),h=null==i.weekStartsOn?c:vf(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var d=gf(t);if(!Cf(d))throw new RangeError("Invalid time value");var f=xf(d),p=jf(d,f),g={firstWeekContainsDate:l,weekStartsOn:h,locale:o,_originalDate:d},v=r.match(Op).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,mp[e])(t,o.formatLong,g):t})).join("").match(wp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Cp(t);var n=hp[e];if(n)return!i.useAdditionalWeekYearTokens&&_p(t)&&Ep(t),!i.useAdditionalDayOfYearTokens&&xp(t)&&Ep(t),n(p,t,o.localize,g);if(e.match(Mp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Cp(t){return t.match(Tp)[1].replace(Sp,"'")}function Pp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return mf(t,-n)}function Dp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return bf(t,-n)}function Lp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return wf(t,-n)}function kp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return Tf(t,-n)}function Rp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return Sf(t,-n)}function Ip(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=vf(e);return Mf(t,-n)}var Np=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function Bp(t,e,n,r,i){var o=0===e,a=2===Number(Ap(new Date(t),"c")),s=1===Number(Ap(new Date(t),"q")),l=0!==e?n[e-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||Hp(t)||zp(t,l)||jp(t);case"daily":return i?o||a||jp(t):o||zp(t,l)||jp(t);case"monthly":return o||jp(t);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(r+" is not a valid time interval.")}}function Up(t,e,n,r,i){var o=i.showDayName,a="daily"===r&&o?"weekly":r,s=new Date(t),l=Ba.getProperty(i,"timeIntervalFormats")[a],u=Ba.getProperty(l,"primary"),c=Ba.getProperty(l,"secondary"),h=Bp(t,e,n,r,o)?u:c;return"15seconds"===r&&0!==s.getMilliseconds()&&(h=h.replace("pp","h:mm:ss.SSS a")),Ap(s,h,{locale:i.localeObject})}function Vp(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Gp(t){return 1===t.length?"15seconds":function(t){var e=Np.reduce((function(e,n,r){n[0];var i=n[1],o=Np[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Np[e][0]}(Ks(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function Hp(t){var e=Vp(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function zp(t,e){return Vp(t).M!==Vp(e).M}function jp(t){var e=Vp(t),n=e.M,r=e.d,i=e.s,o=e.m,a=e.H;return 1===n&&1===r&&0===a&&0===o&&0===i}function Fp(t){return void 0===t?"":t.toISOString()}var Wp=function(){function t(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}return t.prototype.getAllDataFromDomain=function(t){if(!this.getData())return null;var e=this.getOptions(),n=this.getData(),r=this.getDataGroups(),i=Ba.getProperty(e,"data").groupMapsTo,o=Ba.getProperty(e,"axes");return t&&(n=n.filter((function(e){return t.includes(e[i])}))),o&&Object.keys(o).forEach((function(t){var e=o[t].mapsTo,r=o[t].scaleType;if(r!==G.LINEAR&&r!==G.LOG||(n=n.map((function(t){var n;return P(P({},t),((n={})[e]=null===t[e]?t[e]:Number(t[e]),n))}))),e&&o[t].domain)if(r===G.LABELS)n=n.filter((function(n){return o[t].domain.includes(n[e])}));else{var i=o[t].domain,a=i[0],s=i[1];n=n.filter((function(t){return!(e in t)||t[e]>=a&&t[e]<=s}))}})),n.filter((function(t){return r.find((function(e){return e.name===t[i]}))}))},t.prototype.getDisplayData=function(t){if(!this.get("data"))return null;var e=_t.items.status.ACTIVE,n=this.getDataGroups(t),r=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain(t).filter((function(t){return n.find((function(n){return n.name===t[r]&&n.status===e}))}))},t.prototype.getData=function(){return this.get("data")},t.prototype.isDataEmpty=function(){return!this.getData().length},t.prototype.setData=function(t){var e=this.sanitize(Ba.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(t){return Ba.getProperty(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter((function(e){return t.includes(e.name)})):this.get("dataGroups")},t.prototype.getActiveDataGroups=function(t){var e=_t.items.status.ACTIVE;return this.getDataGroups(t).filter((function(t){return t.status===e}))},t.prototype.getDataGroupNames=function(t){return this.getDataGroups(t).map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(t){return this.getActiveDataGroups(t).map((function(t){return t.name}))},t.prototype.aggregateBinDataByGroup=function(t){return Ba.groupBy(t,"group")},t.prototype.getBinConfigurations=function(){var t=this,e=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),o=n.axes[r],a=n.data.groupMapsTo,s=o.bins,l=void 0===s?xt.defaultBins:s,u=Array.isArray(l),c=Ys().value((function(t){return t[i]})).thresholds(l)(e);if(u)c[c.length-1].x1=l[l.length-1];else{var h=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+h}var d=u?[l[0],l[l.length-1]]:[c[0].x0,c[c.length-1].x1],f=Array.from(new Set(e.map((function(t){return t[a]})))),p=[];return c.forEach((function(e){var n=e.x0+"-"+e.x1,r=t.aggregateBinDataByGroup(e);f.forEach((function(t){p.push({group:t,key:n,value:r[t]||0,bin:e.x0})}))})),{bins:c,binsDomain:d}},t.prototype.getBinnedStackedData=function(){var t=this.getOptions().data.groupMapsTo,e=this.getActiveDataGroupNames(),n=this.getBinConfigurations().bins,r=this.getDataValuesGroupedByKeys({bins:n});return ff().keys(e)(r).map((function(n,r){return Object.keys(n).filter((function(t){return!isNaN(t)})).map((function(i){var o=n[i];return o[t]=e[r],o}))}))},t.prototype.getGroupedData=function(t){var e=this.getDisplayData(t),n={},r=this.getOptions().data.groupMapsTo;return e.map((function(t){var e=t[r];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]})),Object.keys(n).map((function(t){return{name:t,data:n[t]}}))},t.prototype.getStackKeys=function(t){var e,n=this,r=void 0===t?{bins:null,groups:null}:t,i=r.bins,o=void 0===i?null:i,a=r.groups,s=void 0===a?null:a,l=this.getOptions(),u=this.getDisplayData(s);e=o?o.map((function(t){return t.x0+"-"+t.x1})):Ba.removeArrayDuplicates(u.map((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return t[e]instanceof Date?Fp(t[e]):t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]})));var c=this.services.cartesianScales.domainAxisPosition,h=l.axes[c].scaleType;return h===G.TIME?e.sort((function(t,e){return new Date(t)-new Date(e)})):h!==G.LOG&&h!==G.LINEAR||e.sort((function(t,e){return t-e})),e},t.prototype.getDataValuesGroupedByKeys=function(t){var e=this,n=t.bins,r=void 0===n?null:n,i=t.groups,o=void 0===i?null:i,a=this.getOptions().data.groupMapsTo,s=this.getDisplayData(o),l=this.getDataGroupNames(),u=this.getStackKeys({bins:r,groups:o});return r?u.map((function(t){var e=t.split("-"),n=e[0],i=e[1],o={x0:n,x1:i},s=r.find((function(t){return t.x0.toString()===n.toString()}));return l.forEach((function(t){o[t]=s.filter((function(e){return e[a]===t})).length})),o})):u.map((function(t){var n={sharedStackKey:t};return l.forEach((function(r){var i=s.find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[a]===r&&n.hasOwnProperty(i)&&(n[i]instanceof Date?Fp(n[i])===t:n[i].toString()===t)})),o=e.services.cartesianScales.getRangeIdentifier(n);n[r]=i?i[o]:null})),n}))},t.prototype.getStackedData=function(t){var e=t.percentage,n=void 0!==e&&e,r=t.groups,i=void 0===r?null:r,o=t.divergent,a=void 0!==o&&o,s=this.getOptions().data.groupMapsTo,l=this.getActiveDataGroupNames(i),u=this.getDataValuesGroupedByKeys({groups:i});if(n){var c=Ba.fromPairs(u.map((function(t){return[t.sharedStackKey,0]})));u.forEach((function(t){l.forEach((function(e){c[t.sharedStackKey]+=t[e]}))})),u.forEach((function(t){l.forEach((function(e){c[t.sharedStackKey]?t[e]=t[e]/c[t.sharedStackKey]*100:t[e]=0}))}))}return(a?ff().offset(pf):ff()).keys(l)(u).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(n){var r=t[n];return r[s]=l[e],r}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){this.state=Object.assign({},this.state,t);var n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){var e=this.getOptions();Ba.updateLegendAdditionalItems(e,t),this.set({options:Ba.merge(e,t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(ut.Model.UPDATE,{animate:t}))},t.prototype.toggleDataLabel=function(t){var e=_t.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),o=i.some((function(t){return t.status===r})),a=i.filter((function(t){return t.status===n}));if(o)if(1===a.length&&a[0].name===t)i.forEach((function(t,e){i[e].status=n}));else{var s=i.findIndex((function(e){return e.name===t}));i[s].status=i[s].status===r?n:r}else i.forEach((function(e,o){i[o].status=e.name===t?n:r}));var l=i.filter((function(t){return t.status===n})),u=this.getOptions(),c=i.some((function(t){return t.status===r}));u.data.selectedGroups=c?l.map((function(t){return t.name})):[],this.services.events.dispatchEvent(ut.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=Ba.getProperty(this.colorScale,t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=Ba.getProperty(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.isUserProvidedColorScaleValid=function(){var t=Ba.getProperty(this.getOptions(),"color","scale"),e=this.getDataGroups();return null!=t&&0!=Object.keys(t).length&&e.some((function(e){return Object.keys(t).includes(e.name)}))},t.prototype.getColorClassName=function(t){var e=this.colorClassNames(t.dataGroupName),n=t.originalClassName;return t.classNameTypes.forEach((function(r){return n=t.originalClassName?n+" "+r+"-"+e:r+"-"+e})),n},t.prototype.getStatus=function(){return null},t.prototype.getAllDataGroupsNames=function(){return this.allDataGroups},t.prototype.transformToTabularData=function(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){t.data.forEach((function(n,i){var o,a=Ba.getProperty(t,"label");if(null===a){var s=Ba.getProperty(r,i);o=s||"Ungrouped"}else o=a;var l={group:o,key:r[i]};isNaN(n)?(l.value=n.value,l.date=n.date):l.value=n,e.push(l)}))})),e},t.prototype.getTabularDataArray=function(){return[]},t.prototype.exportToCSV=function(){var t=this.getTabularDataArray().map((function(t){return t.map((function(t){return'"'+("–"===t?"–":t)+'"'}))})),e="",n="";t.forEach((function(r,i){n=r.join(","),e+=i<t.length?n+"\n":n})),this.services.files.downloadCSV(e,"myChart.csv")},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return t=this.getTabularData(t)},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=_t.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=Ba.removeArrayDuplicates(t.map((function(t){return t[e]})));o.data.selectedGroups.length&&(o.data.selectedGroups.every((function(t){return a.includes(t)}))||(o.data.selectedGroups=[]));var s=function(t){return!o.data.selectedGroups.length||o.data.selectedGroups.includes(t)?r:i};return a.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setCustomColorScale=function(){var t=this;if(this.isUserProvidedColorScaleValid()){var e=this.getOptions(),n=Ba.getProperty(e,"color","scale");Object.keys(n).forEach((function(e){t.allDataGroups.includes(e)||console.warn('"'+e+'" does not exist in data groups.')})),this.allDataGroups.filter((function(t){return n[t]})).forEach((function(e){return t.colorScale[e]=n[e]}))}},t.prototype.setColorClassNames=function(){var t=Ba.getProperty(this.getOptions(),"color","pairing"),e=Ba.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=Ba.getProperty(t,"option"),r=e>5?14:e;n=n<=yt.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.colorClassNames=nl().range(i).domain(this.allDataGroups)},t}(),qp=function(){function t(t,e){this.model=t,this.services=e,this.init()}return t.prototype.init=function(){},t.prototype.update=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t}(),Zp=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];t.call(e,i[1],i[0])}},Object.defineProperties(e.prototype,n),e}()}(),Yp="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Xp="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Kp="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Xp):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Qp=["top","right","bottom","left","width","height","size","weight"],$p="undefined"!=typeof MutationObserver,Jp=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){Kp(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};Jp.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Jp.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Jp.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Jp.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},Jp.prototype.connect_=function(){Yp&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),$p?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},Jp.prototype.disconnect_=function(){Yp&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},Jp.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Qp.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Jp.getInstance=function(){return this.instance_||(this.instance_=new Jp),this.instance_},Jp.instance_=null;var tg=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n+=1){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},eg=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Xp},ng=lg(0,0,0,0);function rg(t){return parseFloat(t)||0}function ig(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+rg(t["border-"+n+"-width"])}),0)}function og(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return ng;var r=eg(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=t["padding-"+i];e[i]=rg(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=rg(r.width),l=rg(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=ig(r,"left","right")+o),Math.round(l+a)!==n&&(l-=ig(r,"top","bottom")+a)),!function(t){return t===eg(t).document.documentElement}(t)){var u=Math.round(s+o)-e,c=Math.round(l+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return lg(i.left,i.top,s,l)}var ag="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof eg(t).SVGGraphicsElement}:function(t){return t instanceof eg(t).SVGElement&&"function"==typeof t.getBBox};function sg(t){return Yp?ag(t)?function(t){var e=t.getBBox();return lg(0,0,e.width,e.height)}(t):og(t):ng}function lg(t,e,n,r){return{x:t,y:e,width:n,height:r}}var ug=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=lg(0,0,0,0),this.target=t};ug.prototype.isActive=function(){var t=sg(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},ug.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var cg=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return tg(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);tg(this,{target:t,contentRect:n})},hg=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Zp,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n};hg.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof eg(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new ug(t)),this.controller_.addObserver(this),this.controller_.refresh())}},hg.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof eg(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},hg.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},hg.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},hg.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new cg(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},hg.prototype.clearActive=function(){this.activeObservations_.splice(0)},hg.prototype.hasActive=function(){return this.activeObservations_.length>0};var dg="undefined"!=typeof WeakMap?new WeakMap:new Zp,fg=function(t){if(!(this instanceof fg))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=Jp.getInstance(),n=new hg(t,e,this);dg.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){fg.prototype[t]=function(){return(e=dg.get(this))[t].apply(e,arguments);var e}}));var pg=void 0!==Xp.ResizeObserver?Xp.ResizeObserver:fg,gg=Fa((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){s.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4!==r.readyState)return;if(200!==r.status)return void(n?e(n):o("cannot fetch resource: "+t+", status: "+r.status));var i=new FileReader;i.onloadend=function(){var t=i.result.split(/,/)[1];e(t)},i.readAsDataURL(r.response)},r.ontimeout=function(){n?e(n):o("timeout of 30000ms occured while fetching resource: "+t)},r.responseType="blob",r.timeout=3e4,r.open("GET",t,!0),r.send(),s.impl.options.imagePlaceholder){var i=s.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(n=i[1])}function o(t){console.error(t),e("")}}))},uid:function(){var t=0;return function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+t++}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,o){return function(){return!e(t)}()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return i(e,t,n,o)}))})),r}))},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),i=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function e(i){return i instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(n.asArray(i.childNodes).map((function(t){return e(t)})))})):Promise.resolve(i)},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:l,toPng:function(t,e){return u(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return u(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return u(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return u(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:i,images:o,util:n,inliner:r,options:{}}};function l(t,e){return function(t){void 0===t.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return function t(e,r,i){return i||!r||r(e)?Promise.resolve(e).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(t){return o(e,t,r)})).then((function(t){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(i).then(o).then(a).then((function(){return e})):e;function r(){var r,i;r=window.getComputedStyle(t),i=e.style,r.cssText?i.cssText=r.cssText:function(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}(r,i)}function i(){[":before",":after"].forEach((function(r){!function(r){var i=window.getComputedStyle(t,r),o=i.getPropertyValue("content");if(""===o||"none"===o)return;var a=n.uid();e.className=e.className+" "+a;var s=document.createElement("style");s.appendChild(function(t,e,r){var i="."+t+":"+e,o=r.cssText?function(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}(r):function(t){return n.asArray(t).map((function(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")})).join("; ")+";"}(r);return document.createTextNode(i+"{"+o+"}")}(a,r,i)),e.appendChild(s)}(r)}))}function o(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function a(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(e,t)})):Promise.resolve();function o(e,r,i){var o=e.childNodes;return 0===o.length?Promise.resolve(r):a(r,n.asArray(o),i).then((function(){return r}));function a(e,n,r){var i=Promise.resolve();return n.forEach((function(n){i=i.then((function(){return t(n,r)})).then((function(t){t&&e.appendChild(t)}))})),i}}}(t,e.filter,!0)})).then(c).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function u(t,e){return l(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var i=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var i=r.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function c(t){return i.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function h(t){return o.inlineAll(t).then((function(){return t}))}t.exports=s}()})),vg=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.getHTMLElementSize=function(t){return{width:t.clientWidth,height:t.clientHeight}},e.getSVGElementSize=function(t,e){void 0===e&&(e={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}),t.attr||(t=Ha(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},l={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var u={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(l),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(u),a.width>0&&a.height>0))return u;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:Ba.getProperty(t.node(),"width","baseVal","value"),height:Ba.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(u),s(r),s(l)}return a},e.appendOrSelect=function(t,e){var n=t.select(""+e);if(n.empty()){var r=e.split("#"),i=void 0,o=void 0;return 2===r.length?(i=r[0],o=(r=r[1].split("."))[0]):i=(r=e.split("."))[0],t.append(i).attr("id",o).attr("class",r.slice(1).join(" "))}return n},e.prototype.init=function(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()},e.prototype.getChartID=function(){return this.chartID},e.prototype.generateElementIDString=function(t){return"chart-"+this.chartID+"-"+t},e.prototype.initializeID=function(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)},e.prototype.addMainContainer=function(){var t=this.model.getOptions(),e=Ba.getProperty(t,"style","prefix"),n=Ha(this.getHolder()).append("div").classed("cds--"+e+"--chart-wrapper",!0).attr("id","chart-"+this.getChartID()).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder(),e=this.model.getOptions(),n=e.width,r=e.height,i=e.theme;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r),Ha(this.getHolder()).classed("cds--chart-holder",!0).attr("data-carbon-theme",i)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.exportToJPG=function(){var t=this,e=this.getHolder(),n=Ha(e);n.classed("filled",!0),gg.toJpeg(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(e).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("cds--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.jpg"),n.classed("filled",!1)}))},e.prototype.exportToPNG=function(){var t=this,e=this.getHolder(),n=Ha(e);n.classed("filled",!0),gg.toPng(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(e).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("cds--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.png"),n.classed("filled",!1)})).catch((function(t){console.error("oops, something went wrong!",t)}))},e.prototype.toggleFullscreen=function(){var t=this.getHolder();Ha(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},e.prototype.handleFullscreenChange=function(){var t=this;document.addEventListener("fullscreenchange",(function(){var e=Ha(t.getHolder()),n=e.classed("fullscreen");e.classed("fullscreen",!n)}))},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=Ha(t.mainContainer).select("g.DONT_STYLE_ME_css_styles_verifier").node(),n=getComputedStyle(e);"hidden"===n.getPropertyValue("overflow")&&"0"===n.getPropertyValue("opacity")||console.error("Missing CSS styles for Carbon Charts. Please read the Carbon Charts getting started guide.")}))},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(Ha(this.mainContainer),{useBBox:!0}).height,n=Ha(this.mainContainer).attr("class"),r=Ha(this.mainContainer).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(Ha(t),{useBBox:!0}).height)})),i<=t?Ha(this.mainContainer).attr("height",i):Ha(this.mainContainer).attr("height","100%")}},e.prototype.getMainContainer=function(){return this.mainContainer},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Ha(e).on("mouseover",(function(){t.services.events.dispatchEvent(ut.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(ut.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=Ba.debounce((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(ut.Chart.RESIZE))}),12.5);new pg(i).observe(e)}},e}(qp),mg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){this.documentFragment=document.createDocumentFragment()},e.prototype.addEventListener=function(t,e){this.documentFragment.addEventListener(t,e)},e.prototype.removeEventListener=function(t,e){this.documentFragment.removeEventListener(t,e)},e.prototype.dispatchEvent=function(t,e){var n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)},e}(qp),yg=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype.downloadCSV=function(t,e){var n=document.createElement("a");if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:"text/csv;encoding:utf-8"}),e);else if(URL&&"download"in n){var r=URL.createObjectURL(new Blob([t],{type:"text/csv;encoding:utf-8"}));n.href=r,n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}else location.href="data:application/octet-stream,"+encodeURIComponent(t)},e.prototype.downloadImage=function(t,e){var n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e}(qp),bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return n(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener(ut.Model.UPDATE,(function(){t.pendingTransitions={}}))},e.prototype.setupTransition=function(t){var e=this,n=t.transition,r=t.name,i=t.animate;return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),!1===this.model.getOptions().animations||!1===i?n.duration(0):n.duration(Ba.getProperty(Pt,r,"duration")||Pt.default.duration)},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(qp),xg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.appendOrUpdateLinearGradient=function(t){var e=t.svg.select("defs linearGradient#"+t.id);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").remove(),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(function(t){return t.offset})).style("stop-color",(function(t){return t.color})).style("stop-opacity",(function(t){return t.opacity}))},e.getOffsetRatio=function(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"},e.getStops=function(t,n){var r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r},e}(qp),_g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return n(e,t),e.prototype.getDomainAxisPosition=function(t){var e,n=(void 0===t?{}:t).datum,r=void 0===n?null:n;if(this.dualAxes&&r){var i=this.model.getOptions(),o=i.data.groupMapsTo,a=Ba.getProperty(i,"axes",this.secondaryDomainAxisPosition),s=r[o];if((null===(e=a)||void 0===e?void 0:e.correspondingDatasets)&&a.correspondingDatasets.includes(s))return this.secondaryDomainAxisPosition}return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(t){var e,n=void 0===t?{}:t,r=n.datum,i=void 0===r?null:r,o=n.groups,a=void 0===o?null:o;if(this.dualAxes){var s=this.model.getOptions(),l=s.data.groupMapsTo,u=Ba.getProperty(s,"axes",this.secondaryRangeAxisPosition),c=void 0;if(null!==i?c=i[l]:a&&a.length>0&&(c=a[0]),(null===(e=u)||void 0===e?void 0:e.correspondingDatasets)&&u.correspondingDatasets.includes(c))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return Ba.getProperty(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.getScaleLabel=function(t){var e=this.getAxisOptions(t).title;return e||(t===N.BOTTOM||t===N.TOP?"x-value":"y-value")},e.prototype.getDomainLabel=function(){return this.getScaleLabel(this.getDomainAxisPosition())},e.prototype.getRangeLabel=function(){return this.getScaleLabel(this.getRangeAxisPosition())},e.prototype.update=function(t){var e=this;this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(N).map((function(t){return N[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==N.LEFT&&this.rangeAxisPosition!==N.RIGHT||this.domainAxisPosition!==N.BOTTOM&&this.domainAxisPosition!==N.TOP?this.orientation=V.HORIZONTAL:this.orientation=V.VERTICAL},e.prototype.isDualAxes=function(){return this.dualAxes},e.prototype.determineAxisDuality=function(){var t,e,n,r,i=this.model.getOptions(),o=Ba.getProperty(i,"axes");((null===(t=o[N.LEFT])||void 0===t?void 0:t.correspondingDatasets)&&o[N.RIGHT]||(null===(e=o[N.RIGHT])||void 0===e?void 0:e.correspondingDatasets)&&o[N.LEFT]||(null===(n=o[N.TOP])||void 0===n?void 0:n.correspondingDatasets)&&o[N.BOTTOM]||(null===(r=o[N.BOTTOM])||void 0===r?void 0:r.correspondingDatasets)&&o[N.TOP])&&(this.dualAxes=!0)},e.prototype.getCustomDomainValuesByposition=function(t){var e=Ba.getProperty(this.model.getOptions(),"axes",t,"domain");if(e&&!Array.isArray(e))throw new Error("Domain in "+t+" axis is not a valid array");if(Array.isArray(e)&&(this.scaleTypes[t]===G.LINEAR||this.scaleTypes[t]===G.TIME)&&2!==e.length)throw new Error("There can only be 2 elements in domain for scale type: "+this.scaleTypes[t]);return e},e.prototype.getOrientation=function(){return this.orientation},e.prototype.getScaleByPosition=function(t){return this.scales[t]},e.prototype.getScaleTypeByPosition=function(t){return this.scaleTypes[t]},e.prototype.getDomainAxisScaleType=function(){var t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getRangeAxisScaleType=function(){var t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[N.BOTTOM,N.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[N.LEFT,N.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainXScale=function(){return this.scales[this.getMainXAxisPosition()]},e.prototype.getMainYScale=function(){return this.scales[this.getMainYAxisPosition()]},e.prototype.getValueFromScale=function(t,e,n,r,i){var o,a=this.model.getOptions(),s=Ba.getProperty(a,"axes")[n].mapsTo,l=null!==Ba.getProperty(r,s)?r[s]:r;switch(e){case G.LABELS:o=t(l)+t.step()/2;break;case G.TIME:o=t(new Date(l));break;default:o=t(l)}return o},e.prototype.getBoundedScaledValues=function(t,e){var n=this.model.getOptions().bounds,r=this.getRangeAxisPosition({datum:t}),i=this.scales[r],o=this.model.getOptions(),a=Ba.getProperty(o,"axes")[r].mapsTo,s=void 0!==t[a]?t[a]:t;return[i(null!==Ba.getProperty(t,n.upperBoundMapsTo)?t[n.upperBoundMapsTo]:s),i(null!==Ba.getProperty(t,n.lowerBoundMapsTo)?t[n.lowerBoundMapsTo]:s)]},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){var n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getRangeValue=function(t,e){var n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(t){var e=this.model.getOptions();return Ba.getProperty(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")},e.prototype.getRangeIdentifier=function(t){var e=this.model.getOptions();return Ba.getProperty(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions(),r=Ba.getProperty(n,"axes",t);return r.scaleType===G.TIME?function(t,e){var n=new Date(t[0]),r=new Date(t[1]);if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t),r=gf(e),i=Af(n,r),o=Math.abs(Df(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Af(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Ip(n,e),Mf(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t),r=gf(e),i=Af(n,r),o=Math.abs(Pf(n,r));n.setMonth(n.getMonth()-i*o);var a=Af(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[kp(n,e),Tf(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gf(t),r=gf(e),i=Af(n,r),o=Math.abs(Ef(n,r));n.setDate(n.getDate()-i*o);var a=Af(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Pp(n,e),mf(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Lf(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Dp(n,e),bf(r,e)];if(kf(r,n)>30)return[Lp(n,30*e),wf(r,30*e)];if(kf(r,n)>1)return[Lp(n,e),wf(r,e)];if(Rf(r,n)>15)return[Rp(n,15*e),Sf(r,15*e)];if(Rf(r,n)>1)return[Rp(n,e),Sf(r,e)];return[n,r]}(e,Ba.getProperty(n,"timeScale","addSpaceOnEdges")):function(t,e,n){var r=t[0],i=t[1],o=(i-r)*e,a=i<=0&&i+o>0?0:i+o,s=r>=0&&r-o<0?0:r-o;if(n===G.LOG&&s<=0){if(r<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=r}return[s,a]}(e,gt.paddingRatio,r.scaleType)},e.prototype.findVerticalAxesPositions=function(){var t=this.model.getOptions(),e=Ba.getProperty(t,"axes"),n=this.isDualAxes();return null===Ba.getProperty(e,N.LEFT)&&null!==Ba.getProperty(e,N.RIGHT)||!0===Ba.getProperty(e,N.RIGHT,"main")||n&&Ba.getProperty(e,N.LEFT,"correspondingDatasets")?{primary:N.RIGHT,secondary:N.LEFT}:{primary:N.LEFT,secondary:N.RIGHT}},e.prototype.findHorizontalAxesPositions=function(){var t=this.model.getOptions(),e=Ba.getProperty(t,"axes"),n=this.isDualAxes();return null===Ba.getProperty(e,N.BOTTOM)&&null!==Ba.getProperty(e,N.TOP)||!0===Ba.getProperty(e,N.TOP,"main")||n&&Ba.getProperty(e,N.BOTTOM,"correspondingDatasets")?{primary:N.TOP,secondary:N.BOTTOM}:{primary:N.BOTTOM,secondary:N.TOP}},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Ba.getProperty(n,"axes",t.primary),i=Ba.getProperty(n,"axes",e.primary),o=r.scaleType||G.LINEAR,a=i.scaleType||G.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary,(a!==G.LABELS&&a!==G.TIME&&o===G.LABELS||o===G.TIME)&&(s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=Ba.getProperty(e,"axes",t),r=Ba.getProperty(e,"bounds"),i=n.includeZero,o=Ba.getProperty(n,"scaleType")||G.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned)return[0,Xs(a=this.model.getBinConfigurations().bins,(function(t){return t.length}))];if(n.limitDomainToBins){var a=this.model.getBinConfigurations().bins,s=this.model.getStackKeys({bins:a});return[s[0].split("-")[0],s[s.length-1].split("-")[1]]}var l,u,c=this.model.getDisplayData(),h=n.extendLinearDomainBy,d=n.mapsTo,f=n.percentage,p=n.thresholds,g=gt.ratio,v=g.reference,m=g.compareTo;if(n.domain)return o===G.LABELS?n.domain:(o===G.TIME&&(n.domain=n.domain.map((function(t){return void 0===t.getTime?new Date(t):t}))),this.extendsDomain(t,n.domain));if(f)return[0,100];if(n&&o===G.LABELS)return Ba.removeArrayDuplicates(c.map((function(t){return t[d]})));var y=this.model.getDataGroupNames();if(o===G.LABELS_RATIO)return c.map((function(t){return t[v]+"/"+t[m]}));if(o===G.TIME)u=c.map((function(t){return+new Date(t[d])}));else if(r&&e.axes)u=[],c.forEach((function(t){u.push(t[d]),t[r.upperBoundMapsTo]&&u.push(t[r.upperBoundMapsTo]),t[r.lowerBoundMapsTo]&&u.push(t[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&y&&t===this.getRangeAxisPosition()){var b=e.data.groupMapsTo,x=this.model.getDataValuesGroupedByKeys({groups:y}),_=c.filter((function(t){return!y.includes(t[b])})),E=[];x.forEach((function(t){t.sharedStackKey;var e=D(t,["sharedStackKey"]),n=0,r=0;Object.values(e).forEach((function(t){isNaN(t)||(t<0?r+=t:n+=t)})),E.push([r,n])})),u=L(Ba.flatten(E),_.map((function(t){return t[d]})))}else u=[],c.forEach((function(t){var e=t[d];Array.isArray(e)&&2===e.length?(u.push(e[0]),u.push(e[1])):(h&&u.push(Math.max(t[d],t[h])),u.push(e))}));return o!==G.TIME&&o!==G.LOG&&i&&u.push(0),p&&p.length>0&&p.forEach((function(t){var e=Ba.getProperty(t,"value");null!==e&&u.push(e)})),l=Rs(u),l=this.extendsDomain(t,l)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Ba.getProperty(e,"axes",t);if(!n)return null;var r,i=Ba.getProperty(n,"scaleType")||G.LINEAR;return this.scaleTypes[t]=i,(r=i===G.TIME?Ch():i===G.LOG?function t(){var e=Iu(lu()).domain([1,10]);return e.copy=function(){return su(e,t()).base(e.base())},tl.apply(e,arguments),e}().base(n.base||10):i===G.LABELS||i===G.LABELS_RATIO?rl():Mu()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=Ba.getProperty(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==G.TIME||"string"!=typeof i.value&&void 0!==i.value.getTime||(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}},e.prototype.getHighestRangeThreshold=function(){var t=Ba.getProperty(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!Array.isArray(t)||Array.isArray(t)&&!t.length)return null;var e=this.getRangeScale(),n=t.sort((function(t,e){return e.value-t.value}))[0];return{threshold:n,scaleValue:e(n.value)}},e}(qp);var Eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:od,curveLinearClosed:Wd,curveBasis:wd,curveBasisClosed:Td,curveBasisOpen:Md,curveBundle:Cd,curveCardinal:Ld,curveCardinalClosed:Rd,curveCardinalOpen:Nd,curveCatmullRom:Vd,curveCatmullRomClosed:Hd,curveCatmullRomOpen:jd,curveMonotoneX:Jd,curveMonotoneY:tf,curveNatural:rf,curveStep:af,curveStepAfter:lf,curveStepBefore:sf},e}return n(e,t),e.prototype.getD3Curve=function(){var t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){var n=this.curveTypes[t];return e&&Object.keys(e).forEach((function(t){n[t]&&(n=n[t](e[t]))})),n}return console.warn("The curve type '"+t+"' is invalid, using 'curveLinear' instead"),this.curveTypes.curveLinear},e}(qp),wg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isZoomBarEnabled=function(){if(!this.services.cartesianScales)return!1;if(!Ba.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=Ba.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===N.BOTTOM&&e===G.TIME},e.prototype.getZoomBarData=function(){var t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()},e.prototype.getDefaultZoomBarDomain=function(t){var e=t||this.services.zoom.getZoomBarData(),n=this.services.cartesianScales,r=n.getMainXAxisPosition(),i=n.getDomainIdentifier(),o=Ba.getProperty(this.model.getOptions(),"axes",r,"domain");return Array.isArray(o)&&2===o.length?o:n.extendsDomain(r,Rs(e,(function(t){return t[i]})))},e.prototype.handleDomainChange=function(t,e){void 0===e&&(e={dispatchEvent:!0}),this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&this.services.events.dispatchEvent(ut.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return Ba.getProperty(this.model.getOptions(),"zoomBar","zoomRatio")},e.prototype.filterDataForRangeAxis=function(t,e){var n=this.model.get("zoomDomain"),r=Object.assign({stacked:!1},e),i=Ba.getProperty(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&i&&n){var o=r.stacked?"sharedStackKey":this.services.cartesianScales.getDomainIdentifier(),a=t.filter((function(t){return new Date(t[o])>=n[0]&&new Date(t[o])<=n[1]}));if(a.length>0)return a}return t},e.prototype.zoomIn=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=Dt.handleWidth,r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());var i=r(e[0]),o=r(e[1]);if(!(o-i<n+1)){var a=r.range(),s=o-i,l=Math.min((a[1]-a[0])/2*(t/2),s/2),u=i+l,c=o-l;u>=c&&(u=i+s/2-n/2,c=o-s/2+n/2);var h=[r.invert(u),r.invert(c)];e[0].valueOf()===h[0].valueOf()&&e[1].valueOf()===h[1].valueOf()||this.handleDomainChange(h)}},e.prototype.zoomOut=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());var r=n(e[0]),i=n(e[1]),o=n.range(),a=(o[1]-o[0])/2*(t/2),s=Math.max(r-a,o[0]),l=Math.min(i+a,o[1]),u=[n.invert(s),n.invert(l)];e[0].valueOf()===u[0].valueOf()&&e[1].valueOf()===u[1].valueOf()||this.handleDomainChange(u)},e.prototype.resetZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();t[0].valueOf()===e[0].valueOf()&&t[1].valueOf()===e[1].valueOf()||this.handleDomainChange(e)},e.prototype.isMinZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<Ba.getProperty(this.model.getOptions(),"zoomBar","minZoomRatio")},e.prototype.isMaxZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())},e.prototype.isEmptyState=function(){return 0===this.getZoomBarData().length},e.prototype.isZoomBarLoading=function(t){return Ba.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return Ba.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(qp),Og=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.zoomIn=function(t,e,n){var r,i,o,a=n||vt;t&&(r=t.x,i=t.y,o=2);var s=vg.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0}),l=s.width,u=s.height;e.transition().duration(a.duration).ease(a.ease).attr("transform","translate("+l/2+", "+u/2+") scale("+o+") translate("+-r+","+-i+")"),this.services.events.dispatchEvent(ut.CanvasZoom.CANVAS_ZOOM_IN,{element:Ha(t)})},e.prototype.zoomOut=function(t,e){var n=e||vt;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(ut.CanvasZoom.CANVAS_ZOOM_OUT)},e}(qp),Tg=function(){function t(t,e,n){if(this.renderType=k.HTML,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){var r=Ba.getProperty(this.model.getOptions(),"style","prefix");this.id=r+"--"+this.configs.id}this.parent||this.setParent(Ha(this.services.domUtils.getMainContainer()))}return t.prototype.init=function(){},t.prototype.render=function(t){console.error("render() method is not implemented")},t.prototype.destroy=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t.prototype.setParent=function(t){var e=this.parent;if(this.parent=t,(!e||e.node()!==t.node())&&this.type){var n=Ba.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed("cds--"+n+"--"+this.type,!0),e&&e.classed("cds--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getComponentContainer=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=Ba.getProperty(this.model.getOptions(),"style","prefix"),n=this.id?"#"+this.id:"",r=vg.appendOrSelect(this.parent,(this.renderType===k.SVG?"svg":"div")+n+".cds--"+e+"--"+this.type);if(t.withinChartClip){var i=this.model.get("chartClipId");if(i){var o=Ha("#"+i).select("rect");0!==o.size()&&parseFloat(o.attr("height"))>0&&r.attr("clip-path","url(#"+i+")")}}return r.attr("width","100%").attr("height","100%")}return this.parent},t.prototype.getOptions=function(){return this.configs.options?Ba.merge({},this.model.getOptions(),this.configs.options):this.model.getOptions()},t}(),Sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e.renderType=k.HTML,e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getOptions(),n=Ba.getProperty(e,"legend"),i=Ba.getProperty(n,"alignment"),o=Ba.getProperty(e,"legend","orientation"),a=this.model.getDataGroups(),s=_t.items.status.DISABLED,l=a.some((function(t){return t.status===s})),u=Ba.getProperty(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===z.CENTER).classed("right-aligned",i===z.RIGHT).classed(o,!0).classed("has-deactivated-items",l).attr("role",r.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");u&&(a=this.sortDataGroups(a,u));var h=c.selectAll("div.legend-item").data(a,(function(t){return t.name})),d=h.enter().append("div").attr("class","legend-item");d.merge(c.selectAll("div.legend-item")).classed("active",(function(t,e){return t.status===_t.items.status.ACTIVE}));var f=Ba.getProperty(this.getOptions(),"legend","clickable");c.classed("clickable",f&&a.length>1);var p=_t.checkbox.radius,g=d.append("div").classed("checkbox",!0),v=g.merge(h.select("div.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(function(e,n){return t.services.domUtils.generateElementIDString("legend-datagroup-"+n+"-title")})).attr("aria-checked",(function(t){return t.status===_t.items.status.ACTIVE})).attr("width",2*p).attr("height",2*p).attr("class",(function(e,n){return t.model.getColorClassName({classNameTypes:[I.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"})})).style("background",(function(e){return e.status===_t.items.status.ACTIVE?t.model.getFillColor(e.name)||t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===_t.items.status.ACTIVE})),m=(g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),d.append("p").merge(h.select("p")),Ba.getProperty(e,"legend","additionalItems"));if(m&&a.length){var y=this,b=c.selectAll("div.additional-item").data(m);b.exit().remove();var x,_=b.enter().append("div").merge(b).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(function(e,n){return t.services.domUtils.generateElementIDString("legend-datagroup-"+(v.size()+n)+"-title")}));_.selectAll("*").remove();var E=1;_.append("svg").classed("icon",!0).each((function(t,e){var n=Ha(this);x&&x==t.type?E++:(x=t.type,E=1),y.addAdditionalItem(n,t,E)}));_.append("p").merge(_.select("p"));this.truncateLegendText()}h.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&d.size()>1&&this.addEventListeners()},e.prototype.sortDataGroups=function(t,e){if(t.sort((function(t,n){return e.indexOf(t.name)-e.indexOf(n.name)})),e.length<t.length){var n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t},e.prototype.addAdditionalItem=function(t,e,n){var i=_t.area,o=i.width,a=i.height;if(e.type===ot.RADIUS?t.style("width",a+"px").style("height",a+"px"):t.style("width",o+"px").style("height",a+"px"),e.type===ot.RADIUS){var s=_t.radius,l=s.iconData,u=s.fill,c=s.stroke;t.attr("fill","none").selectAll("circle").data(l).enter().append("circle").classed("radius",!0).attr("role",r.IMG).attr("aria-label","radius").attr("cx",(function(t){return t.cx})).attr("cy",(function(t){return t.cy})).attr("r",(function(t){return t.r})).style("fill",e.fill?e.fill:u).style("stroke",e.stroke?e.stroke:c)}else if(e.type===ot.LINE){var h=_t.line;t.select("line.line").empty()&&t.append("line").classed("line-"+n,!0).attr("role",r.IMG).attr("aria-label","line").attr("x1",0).attr("y1",h.yPosition).attr("x2",o).attr("y2",h.yPosition).style("stroke",e.stroke?e.stroke:h.stroke).style("stroke-width",h.strokeWidth)}else if(e.type===ot.AREA)t.select("rect.area").empty()&&t.append("rect").classed("area-"+n,!0).attr("role",r.IMG).attr("aria-label","area").attr("width",o).attr("height",a).style("fill",n>3&&!e.fill?_t.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===ot.SIZE){var d=_t.size;l=d.iconData,u=d.fill,c=d.stroke;t.attr("fill","none").attr("role",r.IMG).attr("aria-label","size").selectAll("rect").data(l).enter().append("rect").classed("size",!0).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return 0})).style("fill",e.fill?e.fill:u).style("stroke",e.stroke?e.stroke:c).style("stroke-width",1)}else if(e.type===ot.QUARTILE){l=_t.quartile.iconData;t.selectAll("rect").attr("role",r.IMG).attr("aria-label","quartile").data(l).enter().append("rect").attr("class",(function(t,e){return"quartile-"+(0===e?"wrapper":"line")})).attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height}))}else if(e.type===ot.ZOOM){var f=Ba.getProperty(Ps,"legend","zoom"),p=(l=f.iconData,f.color),g=t.attr("role",r.IMG).attr("aria-label","zoom").selectAll("g.icon").data(l).enter();g.append("g").attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",(function(t){return e.color?e.color:p})),g.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",(function(t){return e.color?e.color:p}))}},e.prototype.truncateLegendText=function(){var t=this.getComponentContainer(),e=Ba.getProperty(this.getOptions(),"legend","truncation"),n=Ba.getProperty(e,"type"),r=Ba.getProperty(e,"threshold"),i=Ba.getProperty(e,"numCharacter"),o=t.selectAll("div.legend-item p");o.attr("id",(function(t,e){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==U.NONE?o.html((function(t){return t.name.length>r?Ba.truncateLabel(t.name,n,i):t.name})):o.html((function(t){return t.name}))},e.prototype.addEventListeners=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=Ba.getProperty(n,"legend"),i=Ba.getProperty(r,"truncation");e.selectAll("div.legend-item").on("mouseover",(function(e){t.services.events.dispatchEvent(ut.Legend.ITEM_HOVER,{hoveredElement:Ha(this)});var n=Ha(this);n.select("div.checkbox").classed("hovered",!0);var r=n.datum();r.name.length>i.threshold&&i.type!==U.NONE&&t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})})).on("mousemove",(function(e){Ha(this).datum().name.length>i.threshold&&i.type!==U.NONE&&t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(){t.services.events.dispatchEvent(ut.Legend.ITEM_CLICK,{clickedElement:Ha(this)});var e=Ha(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=Ha(this);e.select("div.checkbox").classed("hovered",!1),e.datum().name.length>i.threshold&&i.type!==U.NONE&&t.services.events.dispatchEvent(ut.Tooltip.HIDE),t.services.events.dispatchEvent(ut.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e){e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(ut.Legend.ITEM_HOVER,{hoveredElement:Ha(this)})})),e.selectAll("div.legend-item div.checkbox").on("keydown",(function(e,n){e.key&&" "===e.key?(e.preventDefault(),t.model.toggleDataLabel(n.name)):e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(ut.Legend.ITEM_MOUSEOUT,{hoveredElement:Ha(this)})})),e.selectAll("g.additional-item").on("mouseover",(function(e){var n=Ha(this),r=n.datum();r.name.length>i.threshold&&t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})}))},e}(Tg);function Mg(t){return t}function Ag(t){return"translate("+t+",0)"}function Cg(t){return"translate(0,"+t+")"}function Pg(t){return e=>+t(e)}function Dg(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Lg(){return!this.__axis}function kg(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",h=1===t||3===t?Ag:Cg;function d(d){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Mg:i,g=Math.max(o,0)+s,v=e.range(),m=+v[0]+l,y=+v[v.length-1]+l,b=(e.bandwidth?Dg:Pg)(e.copy(),l),x=d.selection?d.selection():d,_=x.selectAll(".domain").data([null]),E=x.selectAll(".tick").data(f,e).order(),w=E.exit(),O=E.enter().append("g").attr("class","tick"),T=E.select("line"),S=E.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(O),T=T.merge(O.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),S=S.merge(O.append("text").attr("fill","currentColor").attr(c,u*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==x&&(_=_.transition(d),E=E.transition(d),T=T.transition(d),S=S.transition(d),w=w.transition(d).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=b(t))?h(t+l):this.getAttribute("transform")})),O.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:b(t))+l)}))),w.remove(),_.attr("d",4===t||2===t?a?"M"+u*a+","+m+"H"+l+"V"+y+"H"+u*a:"M"+l+","+m+"V"+y:a?"M"+m+","+u*a+"V"+l+"H"+y+"V"+u*a:"M"+m+","+l+"H"+y),E.attr("opacity",1).attr("transform",(function(t){return h(b(t)+l)})),T.attr(c+"2",u*o),S.attr(c,u*g).text(p),x.filter(Lg).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=b}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),d):r&&r.slice()},d.tickFormat=function(t){return arguments.length?(i=t,d):i},d.tickSize=function(t){return arguments.length?(o=a=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(a=+t,d):a},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function Rg(t){return kg(1,t)}function Ig(t){return kg(2,t)}function Ng(t){return kg(3,t)}function Bg(t){return kg(4,t)}var Ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="color-legend",e.renderType=k.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e.handleAxisCompleteEvent=function(t){var n=e.getComponentContainer(),r=vg.getSVGElementSize(n,{useAttrs:!0}).width,i=Ba.getProperty(e.getOptions(),"data","loading");if(r>_t.color.barWidth&&!i){var o=Ba.getProperty(e.getOptions(),"heatmap","colorLegend","title"),a=e.services.cartesianScales.getMainXScale().range();if(a[0]>1&&(n.select("g.legend").attr("transform","translate("+a[0]+", 0)"),o)){var s=vg.getSVGElementSize(n.select("g.legend-title").select("text"),{useBBox:!0}).width,l=a[0]-s-9;l>1?n.select("g.legend-title").attr("transform","translate("+l+", 0)"):(n.select("g.legend").attr("transform","translate("+a[0]+", 16)"),n.select("g.legend-title").attr("transform","translate("+a[0]+", 0)"))}}else n.select("g.legend-title").attr("transform","translate(0, 0)")},e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(ut.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)},e.prototype.render=function(t){var e=this.getOptions(),n=this.getComponentContainer(),r=vg.getSVGElementSize(n,{useAttrs:!0}).width,i=Ba.getProperty(e,"color","gradient","colors"),o=Ba.getProperty(e,"heatmap","colorLegend","type"),a=Ba.getProperty(e,"color","pairing","option"),s=Ba.getProperty(e,"heatmap","colorLegend","title");if(Ba.getProperty(this.getOptions(),"data","loading"))n.html("");else{var l=!Ba.isEmpty(i),u=this.model.getValueDomain(),c=!(r<=_t.color.barWidth),h=c?_t.color.barWidth:r,d=vg.appendOrSelect(n,"g.legend"),f=vg.appendOrSelect(d,"g.legend-axis");if(s){var p=vg.appendOrSelect(n,"g.legend-title");vg.appendOrSelect(p,"text").text(s).attr("dy","0.7em"),d.attr("transform","translate(0, 16)")}var g=u[0]<0&&u[1]>0?"diverge":"mono";a<1&&a>4&&"mono"===g?a=1:a<1&&a>2&&"diverge"===g&&(a=1);var v=[],m="diverge"===g?17:11;if(l)v=i;else for(var y=1;y<m+1;y++)v.push(o===at.LINEAR?"stop-color-"+g+"-"+a+"-"+y:"fill-"+g+"-"+a+"-"+y);var b=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}(Hl(u[0],u[1]),3),x=Mu().domain(u).range([0,h]),_=Ng(x).tickSize(0).tickValues(b);switch(o){case at.LINEAR:this.drawLinear(v,d,h);break;case at.QUANTIZE:var E=this.drawQuantize(v,g,l,d,h);x.range([E,h]);break;default:throw Error("Entered color legend type is not supported.")}f.attr("transform","translate(0,"+_t.color.axisYTranslation+")").call(_),f.select(".domain").remove(),f.select("g.tick:last-of-type text").style("text-anchor",c?"middle":"end"),f.select("g.tick:first-of-type text").style("text-anchor",c?"middle":"start")}},e.prototype.drawLinear=function(t,e,n){var r=100/(t.length-1);vg.appendOrSelect(e,"linearGradient").attr("id",this.gradient_id+"-legend").selectAll("stop").data(t).enter().append("stop").attr("offset",(function(t,e){return e*r+"%"})).attr("class",(function(e,n){return t[n]})).attr("stop-color",(function(t){return t})),vg.appendOrSelect(e,"rect").attr("width",n).attr("height",_t.color.barHeight).style("fill","url(#"+this.gradient_id+"-legend)")},e.prototype.drawQuantize=function(t,e,n,r,i){n||"diverge"!==e||t.splice(t.length/2,1);var o=rl().domain(t).range([0,i]);return vg.appendOrSelect(r,"g.quantized-rect").selectAll("rect").data(o.domain()).join("rect").attr("x",(function(t){return o(t)})).attr("y",0).attr("width",Math.max(0,o.bandwidth()-1)).attr("height",_t.color.barHeight).attr("class",(function(t){return t})).attr("fill",(function(t){return t})),"mono"===(!n&&e)?o.bandwidth()-1:0},e.prototype.destroy=function(){this.services.events.removeEventListener(ut.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)},e}(Sg),Vg={prefix:"bx",selectorTabbable:"\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n ",selectorFocusable:"\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex], *[contenteditable=true]\n "};function Gg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Hg(t,e,n){return e&&Gg(t.prototype,e),n&&Gg(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function zg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jg(t){return function(t){if(Array.isArray(t))return Fg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Fg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fg(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wg(t){return t.reduce((function(t,e){return Array.isArray(e)?t.push.apply(t,jg(Wg(e))):t.push(e),t}),[])}function qg(t){return(qg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Xg(t,e){return(Xg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Kg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Jg(t);if(e){var i=Jg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qg(this,n)}}function Qg(t,e){if(e&&("object"===qg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return $g(t)}function $g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jg(t){return(Jg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tv(t){return(tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ev(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rv(){return(rv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=iv(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function iv(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lv(t)););return t}function ov(t,e){return(ov=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function av(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=lv(t);if(e){var i=lv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sv(this,n)}}function sv(t,e){if(e&&("object"===tv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lv(t){return(lv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function uv(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.addEventListener.apply(t,n),{release:function(){return t.removeEventListener.apply(t,n),null}}}function cv(t){return(cv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hv(t){return function(t){if(Array.isArray(t))return dv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return dv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dv(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function fv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gv(t,e){return(gv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=yv(t);if(e){var i=yv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mv(this,n)}}function mv(t,e){if(e&&("object"===cv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yv(t){return(yv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function bv(t,e){var n=t.target,r=t.currentTarget;if("function"==typeof n.matches){if(n.matches(e))return n;if(n.matches("".concat(e," *"))){var i=n.closest(e);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function xv(t){if(!t||"function"==typeof t)return{launchingElement:null,launchingEvent:null};var e=t.delegateTarget||t.currentTarget||t,n=t.currentTarget&&t;if(e&&!e.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:e,launchingEvent:n}}function _v(t){return(_v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ev(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ov(t,e){return(Ov=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Tv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Mv(t);if(e){var i=Mv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sv(this,n)}}function Sv(t,e){if(e&&("object"===_v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Mv(t){return(Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Av(t){return(Av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Dv(t,e){return(Dv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Rv(t);if(e){var i=Rv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kv(this,n)}}function kv(t,e){if(e&&("object"===Av(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Rv(t){return(Rv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Iv(t){return(Iv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bv(t,e){return(Bv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Uv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Gv(t);if(e){var i=Gv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vv(this,n)}}function Vv(t,e){if(e&&("object"===Iv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Gv(t){return(Gv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Hv,zv,jv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bv(t,e)}(o,t);var e,n,r,i=Uv(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e))._handleFocusinListener=void 0,n._handleKeydownListener=void 0,n._handleFocusin=function(t){var e=n.element.querySelector(n.options.selectorModalContainer)||n.element;n.element.classList.contains(n.options.classVisible)&&!e.contains(t.target)&&n.options.selectorsFloatingMenus.every((function(e){return!bv(t,e)}))&&n.element.querySelector(Vg.selectorTabbable).focus()},n._hookCloseActions(),n}return e=o,r=[{key:"options",get:function(){var t=Vg.prefix;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(t,"--overflow-menu-options"),".".concat(t,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(t,"--modal-container"),classVisible:"is-visible",classBody:"".concat(t,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}],(n=[{key:"createdByLauncher",value:function(t){this.show(t)}},{key:"shouldStateBeChanged",value:function(t){return"shown"===t?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(t,e,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===t){var o="onfocusin"in this.element.ownerDocument.defaultView,a=o?"focusin":"focus";this._handleFocusinListener=this.manage(uv(this.element.ownerDocument,a,this._handleFocusin,!o))}"hidden"===t?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===t&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(uv(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===t&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(Vg.selectorTabbable)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var t=this;this.manage(uv(this.element,"click",(function(e){var n=bv(e,t.options.selectorModalClose);n&&(e.delegateTarget=n),(n||e.target===t.element)&&t.hide(e)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(uv(this.element.ownerDocument.body,"keydown",(function(e){27===e.which&&t.shouldStateBeChanged("hidden")&&(e.stopPropagation(),t.hide(e))})))}}])&&Nv(e.prototype,n),r&&Nv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o.components=new WeakMap,o}(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Wg(e).reduce((function(t,e){return e(t)}),function(){return Hg((function t(){zg(this,t)}))}())}((function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xg(t,e)}(o,t);var e,n,r,i=Kg(o);function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Zg(this,o),(e=i.call(this,t,n)).children=[],!t||t.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return e.element=t,e.options=Object.assign(Object.create(e.constructor.options),n),e.constructor.components.set(e.element,$g(e)),e}return e=o,r=[{key:"create",value:function(t,e){return this.components.get(t)||new this(t,e)}}],(n=[{key:"release",value:function(){for(var t=this.children.pop();t;t=this.children.pop())t.release();return this.constructor.components.delete(this.element),null}}])&&Yg(e.prototype,n),r&&Yg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)}),(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dv(t,e)}(o,t);var e,n,r,i=Lv(o);function o(){return Cv(this,o),i.apply(this,arguments)}return e=o,r=[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!e||e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(e.nodeType!==Node.ELEMENT_NODE||!e.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return uv(e,i,(function(e){var i=bv(e,"[".concat(r.attribInitTarget,"]"));if(i){e.delegateTarget=i;var o=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(o.length>1)throw new Error("Target widget must be unique.");if(1===o.length){"A"===i.tagName&&e.preventDefault();var a=t.create(o[0],n);"function"==typeof a.createdByLauncher&&a.createdByLauncher(e)}}}))}));return{release:function(){for(var t=i.pop();t;t=i.pop())t.release()}}}return this.create(e,n),""}}],(n=null)&&Pv(e.prototype,n),r&&Pv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o.forLazyInit=!0,o}(t)}),[function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gv(t,e)}(o,t);var e,n,r,i=vv(o);function o(){return fv(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,o=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,a="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,o)){var s={group:o&&o.group,state:i},l=[s.group,i].filter(Boolean).join("-").split("-").map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""),u=new CustomEvent(this.options["eventBefore".concat(l)],{bubbles:!0,cancelable:!0,detail:o}),c=o&&o.delegatorNode||this.element,h=!c.dispatchEvent(u);if(h){if(a){var d=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));d.canceled=!0,a(d)}}else{var f=[i,o].filter(Boolean);this._changeState.apply(this,hv(f).concat([function(){c.dispatchEvent(new CustomEvent(t.options["eventAfter".concat(l)],{bubbles:!0,cancelable:!0,detail:o})),a&&a()}]))}}else a&&a(null,!0)}}])&&pv(e.prototype,n),r&&pv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)},function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ov(t,e)}(o,t);var e,n,r,i=Tv(o);function o(){return Ev(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"show",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("shown",xv(t),e)}},{key:"hide",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("hidden",xv(t),e)}}])&&wv(e.prototype,n),r&&wv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)}],(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ov(t,e)}(o,t);var e,n,r,i=av(o);function o(){var t;ev(this,o);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).handles=new Set,t}return e=o,(n=[{key:"manage",value:function(t){return this.handles.add(t),t}},{key:"unmanage",value:function(t){return this.handles.delete(t),t}},{key:"release",value:function(){var t=this;return this.handles.forEach((function(e){e.release(),t.handles.delete(e)})),rv(lv(o.prototype),"release",this).call(this)}}])&&nv(e.prototype,n),r&&nv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)}))),Fv=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="modal",i.isEventListenerAdded=!1,i.handleShowModal=function(){i.modal.html(i.getModalHTML()),i.modal.select("div.cds--modal-footer button.cds--btn").on("click",(function(){return i.model.exportToCSV()})),jv.create(i.modal.node()).show()},i.init(),i}return n(e,t),e.prototype.addEventListeners=function(){this.services.events.addEventListener(ut.Modal.SHOW,this.handleShowModal)},e.prototype.removeEventListeners=function(){this.services.events.removeEventListener(ut.Modal.SHOW,this.handleShowModal)},e.prototype.getModalHTML=function(){var t=this.model.getOptions(),e=Ba.getProperty(t,"style","prefix"),n=this.model.getTabularDataArray();return'\n\t\t<div class="cds--modal-container cds--modal-container">\n\t\t\t<div class="cds--modal-header cds--modal-header">\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta cds--modal-header__label cds--type-delta" id="modal-title">Tabular representation</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta cds--modal-header__heading cds--type-beta" id="modal-description">'+t.title+'</p>\n\n\t\t\t\t<button class="cds--modal-close cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon cds--modal-close__icon">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-content cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border cds--data-table cds--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t'+Hn(n,0).map((function(t){return'<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label cds--table-header-label">'+t+"</div>\n\t\t\t\t\t\t\t</th>"})).join("")+"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\n\t\t\t\t\t<tbody>"+n.slice(1).map((function(t){return"\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t"+t.map((function(t){return"<td>"+t+"</td>"})).join("")+"\n\t\t\t\t\t\t\t</tr>"})).join("")+'\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-footer cds--modal-footer">\n\t\t\t <div class="cds--'+e+'-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary cds--btn cds--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>'},e.prototype.render=function(){var t=this.model.getOptions();if(!this.isEventListenerAdded){var e=Ha(this.services.domUtils.getHolder()),n=Ba.getProperty(t,"style","prefix");this.modal=vg.appendOrSelect(e,"div.cds--"+n+"--modal"),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","cds--modal cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-title").attr("aria-describedby","modal-description").attr("tabindex",-1)}},e.prototype.destroy=function(){this.removeEventListeners(),this.isEventListenerAdded=!1},e}(Tg);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(zv||(zv={}));var Wv=((Hv={})[zv.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},Hv[zv.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},Hv[zv.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Hv[zv.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Hv),qv="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Zv=function(){function t(t){void 0===t&&(t={}),this.positions=Wv,this.positions=Object.assign({},Wv,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),l=s.bottom-r().height,u=s.right-r().width;l=l<0?e.offsetHeight:l,u=u<0?e.offsetWidth:u;var c=e.offsetHeight*e.offsetWidth,h=c-l*u;return{placement:n,weight:(h=0===h?c:h)/c}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:qv.innerHeight-qv.scrollY,height:qv.innerWidth-qv.scrollX}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}(),Yv=(new Zv,function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="threshold",r.renderType=k.SVG,r.positionService=new Zv,r}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=Ba.getProperty(this.getOptions(),"axes"),r=[];Object.keys(n).forEach((function(t){var e,i;if(Object.values(N).includes(t)){var o=n[t];o.thresholds&&o.thresholds.length>0&&r.push({axisPosition:t,thresholds:o.thresholds,correspondingDatasets:null===(e=o)||void 0===e?void 0:e.correspondingDatasets,mapsTo:null===(i=o)||void 0===i?void 0:i.mapsTo})}}));var i=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(r,(function(t){return t.axisPosition}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").merge(i);o.attr("class",(function(t){return"axis-thresholds "+t.axisPosition}));var a=o.selectAll("g.threshold-group").data((function(t){return t.thresholds.map((function(n){return n.axisPosition=t.axisPosition,n.datum=e.constructDatumObj(t,n),n}))}));a.exit().attr("opacity",0).remove();var s=a.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(a).attr("class","threshold-group");var l=this;o.each((function(e){var n=e.axisPosition,r=l.services.cartesianScales.getScaleByPosition(n),i=l.services.cartesianScales.getScaleTypeByPosition(n),o=null,a=null;n===N.LEFT||n===N.RIGHT?(a=r,o=l.services.cartesianScales.getMainXScale()):(o=r,a=l.services.cartesianScales.getMainYScale());var s=i===G.LABELS,u=o.range(),c=u[0],h=u[1],d=a.range(),f=d[0],p=d[1],g=l.services.cartesianScales,v=g.getOrientation(),m=Ba.flipDomainAndRangeBasedOnOrientation((function(t){return g.getDomainValue(t)}),(function(t){return g.getRangeValue(t)}),v),y=m[0],b=m[1],x=Ha(this);n===N.TOP||n===N.BOTTOM?(x.selectAll("line.threshold-line").transition().call((function(e){return l.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("y1",p).attr("y2",f).attr("x1",(function(t){var e=t.datum;return y(e)+(s?r.step()/2:0)})).attr("x2",(function(t){var e=t.datum;return y(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),x.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(function(t){var e=t.datum;return-y(e)})).attr("width",Math.abs(f-p)).classed("rotate",!0)):(x.selectAll("line.threshold-line").transition().call((function(e){return l.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("x1",c).attr("x2",h).attr("y1",(function(t){var e=t.datum;return b(e)+(s?r.step()/2:0)})).attr("y2",(function(t){var e=t.datum;return b(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),x.selectAll("rect.threshold-hoverable-area").attr("x",c).attr("y",(function(t){var e=t.datum;return b(e)})).attr("width",Math.abs(h-c)).classed("rotate",!1))})),this.services.events.addEventListener(ut.Threshold.SHOW,(function(t){e.setThresholdLabelPosition(t.detail),e.label.classed("hidden",!1)})),this.services.events.addEventListener(ut.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(t){var e=t.value,n=t.axisPosition,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===G.TIME){var i=[N.LEFT,N.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,l=Ba.getProperty(r,"timeScale"),u=Gp(s.ticks());return Up(e,0,s.ticks(),u,l)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=Ha(this.services.domUtils.getHolder()),e=Ba.getProperty(this.getOptions(),"style","prefix");this.label=vg.appendOrSelect(t,"div.cds--"+e+"--threshold--label").classed("hidden",!0)},e.prototype.setThresholdLabelPosition=function(t){var e=t.event,n=t.datum,r=this.services.domUtils.getHolder(),i=za(e,r),o=n.valueFormatter?n.valueFormatter(n.value):this.getFormattedValue(n);this.label.html((n.label||"Threshold")+": "+o).style("background-color",n.fillColor);var a=this.label.node(),s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},a,[zv.RIGHT,zv.LEFT,zv.TOP,zv.BOTTOM],(function(){return{width:r.offsetWidth,height:r.offsetHeight}})),l=this.positionService.findPositionAt({left:i[0],top:i[1]},a,s);this.positionService.setElement(a,l)},e.prototype.constructDatumObj=function(t,e){var n={};return t.correspondingDatasets&&(n.group=Ba.getProperty(t,"correspondingDatasets",0)),n[t.mapsTo]=e.value,n},e.prototype.addEventListeners=function(){var t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(e){Ha(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(ut.Threshold.SHOW,{event:e,hoveredElement:Ha(this),datum:Ha(this).datum()})})).on("mouseout",(function(e){Ha(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(ut.Threshold.HIDE,{event:e,hoveredElement:Ha(this),datum:Ha(this).datum()})}))},e}(Tg)),Xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e.renderType=k.HTML,e}return n(e,t),e.prototype.render=function(){var t=this.getComponentContainer(),e=Ba.getProperty(this.getOptions(),"title"),n=t.selectAll("p.title").data([e]);if(n.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(n).html((function(t){return t})),n.node()&&n.node().offsetWidth<n.node().scrollWidth){var r=this;n.on("mouseover",(function(t){r.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:t,hoveredElement:n,content:n.text()})})).on("mousemove",(function(t){r.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){r.services.events.dispatchEvent(ut.Tooltip.HIDE)}))}n.exit().remove()},e.prototype.truncateTitle=function(t,e){if(!(e<=0)){var n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");var r=vg.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),o=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,o-1)).append("tspan").text("...");var a=this;t.on("mouseover",(function(e){a.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:t,content:n})})).on("mousemove",(function(t){a.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){a.services.events.dispatchEvent(ut.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return vg.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(Tg),Kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(){var t=Ba.getProperty(this.model.getDisplayData(),0),e=this.getOptions(),n=this.getComponentContainer(),r=e.data.groupMapsTo;if(Ba.getProperty(e,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{var i=n.selectAll("text.meter-title").data([t[r]]);i.enter().append("text").classed("meter-title",!0).merge(i).attr("x",0).attr("y","1em").text((function(t){return t})),i.exit().remove(),this.appendPercentage()}this.displayStatus();var o=this.getMaxTitleWidth(),a=vg.appendOrSelect(n,"text.meter-title");o>0&&a.node().getComputedTextLength()>o&&this.truncateTitle(a,o)},e.prototype.displayBreakdownTitle=function(){var t,e=this.getComponentContainer(),n=this.getOptions(),r=this.model.getMaximumDomain(this.model.getDisplayData()),i=Ba.getProperty(n,"meter","proportional","total"),o=Ba.getProperty(n,"meter","proportional","unit")?Ba.getProperty(n,"meter","proportional","unit"):"";if(r===i)t=null;else{var a=null!==i?i-r:r,s=Ba.getProperty(n,"meter","proportional","breakdownFormatter");t=null!==s?s({datasetsTotal:r,total:i}):r+" "+o+" used ("+a+" "+o+" available)"}var l=e.selectAll("text.proportional-meter-title").data([t]);l.enter().append("text").classed("proportional-meter-title",!0).merge(l).attr("x",0).attr("y","1em").text((function(t){return t})),l.exit().remove();var u=this.getMaxTitleWidth(),c=vg.appendOrSelect(e,"text.proportional-meter-title");u>0&&c.node().getComputedTextLength()>u&&this.truncateTitle(c,u)},e.prototype.displayTotal=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=Ba.getProperty(e,"meter","proportional","total"),r=n?Ba.getProperty(e,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),i=Ba.getProperty(e,"meter","proportional","unit")?Ba.getProperty(e,"meter","proportional","unit"):"",o=Ba.getProperty(e,"meter","proportional","totalFormatter"),a=null!==o?o(r):n+" "+i+" total",s=vg.getHTMLElementSize(this.services.domUtils.getMainContainer()),l=s.width?s.width:this.parent.node().getAttribute("width"),u=t.selectAll("text.proportional-meter-total").data([a]);u.enter().append("text").classed("proportional-meter-total",!0).merge(u).attr("x",this.model.getStatus()?l-wt.total.paddingRight:l).attr("y","1em").attr("text-anchor","end").text((function(t){return t})),u.exit().remove()},e.prototype.displayStatus=function(){var t=this.getComponentContainer(),e=vg.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=e.width?e.width:0,r=this.model.getStatus(),i=wt.status.indicatorSize/2,o=vg.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),a=r?[r]:[],s=o.selectAll("circle.status").data(a);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var l=o.selectAll("path.innerFill").data(a);l.enter().append("path").merge(l).attr("d",this.getStatusIconPathString(r)).attr("transform","translate(-"+i+", 0)").attr("class","innerFill"),l.exit().remove(),s.exit().remove()},e.prototype.appendPercentage=function(){var t=Ba.getProperty(this.model.getDisplayData(),0,"value"),e=this.getComponentContainer(),n=vg.appendOrSelect(e,"text.meter-title"),r=!0===Ba.getProperty(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),o=wt.statusBar.paddingRight;i.enter().append("text").classed("percent-value",!0).merge(i).text((function(t){return t+"%"})).attr("x",+n.attr("x")+n.node().getComputedTextLength()+o).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=vg.appendOrSelect(this.parent,"tspan"),i=wt.statusBar.paddingRight,o=Math.ceil(r.node().getComputedTextLength());vg.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+o+i)},e.prototype.getMaxTitleWidth=function(){var t=vg.getHTMLElementSize(this.services.domUtils.getMainContainer()),e=Ba.getProperty(this.getOptions(),"meter","proportional"),n=t.width?t.width:this.parent.node().getAttribute("width");if(null!==e){var r=vg.appendOrSelect(this.parent,"text.proportional-meter-total").node();return n-vg.getSVGElementSize(r,{useBBox:!0}).width-wt.total.paddingLeft}var i=vg.appendOrSelect(this.parent,"text.percent-value"),o=wt.statusBar.paddingRight,a=i.node().getComputedTextLength(),s=vg.appendOrSelect(this.parent,"g.status-indicator").node();return n-a-o-(vg.getSVGElementSize(s,{useBBox:!0}).width+wt.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case tt.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case tt.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case tt.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}},e}(Xv),Qv=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.renderType=k.HTML,i.isEventListenerAdded=!1,i.positionService=new Zv,i.handleShowTooltip=function(t){var e,n=t.detail.data||t.detail.items,r=i.formatItems(i.getItems(t));e=t.detail.content?'<div class="title-tooltip"><p>'+t.detail.content+"</p></div>":i.getTooltipHTML(r);var o=vg.appendOrSelect(i.tooltip,"div.content-box");if(Ba.getProperty(i.getOptions(),"tooltip","customHTML"))if(t.detail.content){var a='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";o.html(a)}else o.html(i.model.getOptions().tooltip.customHTML(n,e));else o.html(e);o.selectAll(".datapoint-tooltip").each((function(t,e){var n=r[e];r[e]&&r[e].color&&Ha(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),i.positionTooltip(t),i.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},i.handleHideTooltip=function(){i.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},i.init(),i}return n(e,t),e.prototype.addTooltipEventListener=function(){var t=this;this.services.events.addEventListener(ut.Tooltip.MOVE,(function(e){!1===t.tooltip.classed("hidden")&&t.positionTooltip(e)})),this.services.events.addEventListener(ut.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(ut.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(ut.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(ut.Tooltip.MOVE,null),this.services.events.removeEventListener(ut.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(ut.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(ut.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this,n=this.getOptions(),r=Ba.getProperty(n,"tooltip","truncation","type"),i=Ba.getProperty(n,"tooltip","truncation","threshold"),o=Ba.getProperty(n,"tooltip","truncation","numCharacter");return r!==U.NONE?t.map((function(t){var n=t.labelIcon?12:0;return t.value=t.value?e.valueFormatter(t.value,t.label):t.value,t.label&&t.label.length+n>i&&(t.label=Ba.truncateLabel(t.label,r,o)),t.value&&t.value.length>i&&(t.value=Ba.truncateLabel(t.value,r,o)),t})):t},e.prototype.getTooltipHTML=function(t){return'<ul class="multi-tooltip">'+t.map((function(t){return'<li>\n\t\t\t\t\t<div class="datapoint-tooltip'+(t.bold?" bold":"")+'">\n\t\t\t\t\t\t'+(t.class||t.color?'<div class="tooltip-color '+t.class+'"></div>':"")+'\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>'+(t.label||"")+"</p>\n\t\t\t\t\t\t"+(t.labelIcon?'<span class="label-icon"/>'+t.labelIcon+"</span>":"")+"\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t"+(void 0===t.value||null===t.value?"":'<p class="value"/>'+t.value+"</p>")+"\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.valueFormatter=function(t,e){var n=this.getOptions(),r=Ba.getProperty(n,"tooltip","valueFormatter");if(r)return r(t,e);if("function"==typeof t.getTime)return Ap(t,"MMM d, yyyy");try{if("string"==typeof t&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t))return Ap(Date.parse(t),"MMM d, yyyy")}catch(t){}return t.toLocaleString()},e.prototype.render=function(){var t=this.getOptions(),e=Ba.getProperty(t,"tooltip","enabled");if(e){var n=Ha(this.services.domUtils.getHolder()),r=Ba.getProperty(t,"style","prefix");this.tooltip=vg.appendOrSelect(n,"div.cds--"+r+"--tooltip"),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!e&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=this.getOptions(),o=Ba.getProperty(i,"zoomBar","top","enabled"),a=Ba.getProperty(t,"detail","mousePosition");if(a){var s=Ba.getProperty(i,"zoomBar","top","type"),l=Dt.height[s];o&&(a[1]+=l+Dt.spacerHeight)}else a=za(Ba.getProperty(t,"detail","event"),n);var u,c=n.offsetWidth,h=n.offsetHeight;u=a[0]/c>.9?zv.LEFT:a[0]/c<.1?zv.RIGHT:this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[zv.RIGHT,zv.LEFT,zv.TOP,zv.BOTTOM],(function(){return{width:c,height:h}}));var d=Ct.horizontalOffset;u===zv.LEFT&&(d*=-1),e=this.positionService.findPositionAt({left:a[0]+d,top:a[1]},r,u),this.positionService.setElement(r,e)},e}(Tg),$v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getItems=function(t){var e=this;if(t.detail.items)return t.detail.items;var n=t.detail.data;if(!n.length||!n[0])return[];var r,i=this.getOptions(),o=this.services.cartesianScales,a=o.getDomainIdentifier(),s=o.isDualAxes(),l=i.data.groupMapsTo,u=o.getDomainLabel(),c=o.getRangeLabel(),h=n[0][a];if(1===n.length){var d=n[0],f=o.getRangeIdentifier(d);if(s){var p=o.getRangeAxisPosition({datum:d,groups:[d[l]]});c=o.getScaleLabel(p)}var g=d[f];r=L([{label:u,value:h}],Array.isArray(g)&&2===g.length?[{label:"Start",value:g[0]},{label:"End",value:g[1]}]:[{label:c,value:d[f]}]),t.detail.additionalItems&&t.detail.additionalItems.forEach((function(t){return r.push({label:t.label,value:t.value})})),r.push({label:i.tooltip.groupLabel,value:d[l],color:this.model.getFillColor(d[l]),class:this.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:d[l]})})}else if(n.length>1&&(r=(r=[{label:u,value:h}]).concat(n.map((function(t){var n=t[o.getRangeIdentifier(t)];return{label:t[l],value:Array.isArray(n)&&2===n.length?n[0]+" - "+n[1]:n,color:e.model.getFillColor(t[l]),class:e.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:t[l]})}})).sort((function(t,e){return e.value-t.value}))),!s&&!0===Ba.getProperty(i,"tooltip","showTotal"))){var v=o.getRangeIdentifier();r.push({label:Hn(i,"tooltip.totalLabel")||"Total",value:n.reduce((function(t,e){return t+e[v]}),0),bold:!0})}return r},e}(Qv),Jv=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",i.renderType=k.SVG,i.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),i.init(),i}return n(e,t),e.prototype.init=function(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})},e.prototype.render=function(t){this.createClipPath()},e.prototype.createClipPath=function(){var t=this.parent,e=this.services.cartesianScales,n=e.getMainXScale(),r=e.getMainYScale(),i=n.range(),o=i[0],a=i[1],s=r.range(),l=s[0],u=s[1];this.chartClipPath=vg.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=vg.appendOrSelect(this.chartClipPath,"rect."+this.type);c.attr("x",o).attr("y",u).attr("width",a-o).attr("height",l-u),this.chartClipPath.merge(c).lower()},e}(Tg),tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="canvas-chart-clip",e.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.createClipPath=function(){var t=this.parent,e=vg.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;this.chartClipPath=vg.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var i=vg.appendOrSelect(this.chartClipPath,"rect."+this.type);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()},e}(Jv),em=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="highlight",r.renderType=k.SVG,r.positionService=new Zv,r.highlightStrokeWidth=1,r}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!1);var e=Ba.getProperty(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((function(t){if(Object.values(N).includes(t)){var r=e[t];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:t,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));var r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(function(t){return t.axisPosition}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").merge(r);i.attr("class",(function(t){return"axis-highlight "+t.axisPosition}));var o=i.selectAll("g.highlight-group").data((function(t){return t.highlight.map((function(e){return e.axisPosition=t.axisPosition,e.highlightStartMapsTo=t.highlightStartMapsTo,e.labelMapsTo=t.labelMapsTo,e.color=t.color,e.highlightEndMapsTo=t.highlightEndMapsTo,e}))}));o.exit().attr("opacity",0).remove();var a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");var s=this;i.each((function(e){var n=e.axisPosition,r=s.services.cartesianScales.getMainXScale(),i=s.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],l=o[1],u=i.range(),c=u[0],h=u[1],d=s.services.cartesianScales,f=d.getOrientation(),p=Ba.flipDomainAndRangeBasedOnOrientation((function(t){return d.getDomainValue(t)}),(function(t){return d.getRangeValue(t)}),f),g=p[0],v=p[1],m=Ha(this);n===N.TOP||n===N.BOTTOM?m.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("y",Math.max(h+s.highlightStrokeWidth,0)).attr("height",Math.max(c-2*s.highlightStrokeWidth,0)).attr("x",(function(t){var e=t.highlightStartMapsTo,n=D(t,["highlightStartMapsTo"]);return g(n[e])})).attr("width",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=D(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(g(r[n])-g(r[e]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=D(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=D(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})):m.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("x",a).attr("width",Math.max(l-a,0)).attr("y",(function(t){var e=t.highlightEndMapsTo,n=D(t,["highlightEndMapsTo"]);return v(n[e])})).attr("height",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=D(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(v(r[e])-v(r[n]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=D(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=D(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null}))}))},e}(Tg),nm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e.renderType=k.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.area").transition("legend-hover-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-area"})})).attr("opacity",(function(t){return t.name!==n.datum().name?pt.opacity.unselected:pt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition("legend-mouseout-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})})).attr("opacity",pt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),r=this.getOptions(),i=[0,0],o=this.services.cartesianScales,a=o.getOrientation(),s=ud().curve(this.services.curves.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];return null!=n})),l=this.model.getGroupedData(this.configs.groups),u=Ba.getProperty(r,"bounds"),c=u&&l&&1===l.length;!c&&u&&console.warn("Bounds can only be shown when having 1 single datagroup, you've supplied "+l.length);var h=0,d=function(t,e){!1===Ba.getProperty(r,"axes",t,"includeZero")&&e[0]>0&&e[1]>0&&(h=e[0])},f=function(t,e){return c?o.getBoundedScaledValues(t,e)[0]:o.getRangeValue(h)},p=function(t,e){return c?o.getBoundedScaledValues(t,e)[1]:o.getRangeValue(t,e)};a===V.VERTICAL?(i=o.getMainYScale().domain(),d(o.getMainYAxisPosition(),i),s.x((function(t,e){return o.getDomainValue(t,e)})).y0((function(t,e){return f(t,e)})).y1((function(t,e){return p(t,e)}))):(i=o.getMainXScale().domain(),d(o.getMainXAxisPosition(),i),s.x0((function(t,e){return f(t,e)})).x1((function(t,e){return p(t,e)})).y((function(t,e){return o.getDomainValue(t,e)})));var g=Ba.getProperty(r,"color","gradient","enabled"),v=l&&1===l.length&&g;l.length>1&&g&&console.error("Gradients can only be enabled when having 1 single dataset");var m=n.selectAll("path.area").data(l,(function(t){return t.name})),y=Ha(this.services.domUtils.getMainContainer());if(m.exit().attr("opacity",0).remove(),l.length){if(v){var b=y.select("path."+this.model.getColorClassName({classNameTypes:[I.STROKE],dataGroupName:l[0].name})).node(),x=void 0;if(b)x=getComputedStyle(b,null).getPropertyValue("stroke");else{var _=Ba.getProperty(this.model.getOptions(),"color","scale");if(null!==_)x=_[Object.keys(_)[0]]}xg.appendOrUpdateLinearGradient({svg:this.parent,id:this.services.domUtils.generateElementIDString(l[0].name.replace(" ","")+"_"+this.gradient_id),x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:xg.getStops(i,x)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));var E=this,w=m.enter().append("path");v?w.merge(m).style("fill",(function(t){return"url(#"+e.services.domUtils.generateElementIDString(t.name.replace(" ","")+"_"+e.gradient_id)+")"})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return s(e)})):(w.attr("opacity",0).merge(m).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL,I.STROKE],dataGroupName:t.name,originalClassName:"area"})})).style("fill",(function(t){return E.model.getFillColor(t.name)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",c?1:pt.opacity.selected).attr("d",(function(t){var e=t.data;return s(e)})),c&&w.attr("fill-opacity",pt.opacity.selected).style("stroke",(function(t){return E.model.getStrokeColor(t.name)})).style("stroke-dasharray","2, 2").attr("stroke-width","0.7px"))}},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Tg),rm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition("legend-hover-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-area"})})).attr("opacity",(function(t){return Ba.getProperty(t,0,r)!==n.datum().name?pt.opacity.unselected:pt.opacity.selected}))},e.handleLegendMouseOut=function(){e.parent.selectAll("path.area").transition("legend-mouseout-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})})).attr("opacity",pt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this,o=this.getOptions(),a=o.data.groupMapsTo,s=Object.keys(o.axes).some((function(t){return o.axes[t].percentage})),l=this.model.getStackedData({percentage:s,groups:this.configs.groups}),u=Ba.getProperty(l,0,0),c=this.services.cartesianScales.getDomainAxisPosition({firstDatum:u}),h=this.services.cartesianScales.getRangeAxisPosition({firstDatum:u}),d=this.services.cartesianScales.getScaleByPosition(h),f=n.selectAll("path.area").data(l,(function(t){return Ba.getProperty(t,0,a)}));this.areaGenerator=ud().x((function(t,n){return e.services.cartesianScales.getValueThroughAxisPosition(c,t.data.sharedStackKey,n)})).y0((function(t){return d(t[0])})).y1((function(t){return d(t[1])})).curve(this.services.curves.getD3Curve()),f.exit().attr("opacity",0).remove(),f.enter().append("path").attr("opacity",0).merge(f).data(l,(function(t){return Ba.getProperty(t,0,a)})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:Ba.getProperty(t,0,a),originalClassName:"area"})})).style("fill",(function(t){return i.model.getFillColor(Ba.getProperty(t,0,a))})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",(function(t){return Ba.getProperty(t,0,a)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",pt.opacity.selected).attr("d",this.areaGenerator)},e}(Tg),im=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.getOptions();if(e.bars.width)return e.bars.width;var n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=vg.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!r.step){var o=Ba.getProperty(e,"bars","spacingFactor");return Math.min(e.bars.maxWidth,i*o/n)}return Math.min(e.bars.maxWidth,r.step()/2)},e.prototype.isOutsideZoomedDomain=function(t,e){if(this.model.getDisplayData().length<=1)return!1;var n=this.model.get("zoomDomain");if(void 0!==n){var r=this.services.cartesianScales.getDomainScale();return t<r(n[0])||e>r(n[1])}return!1},e}(Tg),om=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-simple-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getOptions().data.groupMapsTo,i=this.getComponentContainer({withinChartClip:!0}),o=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),s=i.selectAll("path.bar").data(o,(function(t){return t[n]}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t[n],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r,i,o=e.services.cartesianScales.getRangeIdentifier(),s=e.getBarWidth(),l=t[o],u=e.services.cartesianScales.getDomainValue(t,n)-s/2,c=u+s;if(Array.isArray(l)&&2===l.length)r=e.services.cartesianScales.getRangeValue(l[0]),i=e.services.cartesianScales.getRangeValue(l[1],n);else{var h=e.services.cartesianScales.getRangeScale().domain()[0];r=e.services.cartesianScales.getRangeValue(Math.max(0,h)),i=e.services.cartesianScales.getRangeValue(t,n)}var d=Math.abs(i-r);if(0!==d&&d<2&&(i=l>0&&a===V.VERTICAL||l<0&&a===V.HORIZONTAL?r-2:r+2),!e.isOutsideZoomedDomain(u,c))return Ba.generateSVGPathString({x0:u,x1:c,y0:r,y1:i},a)})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=Ha(this);r.classed("hovered",!0),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEMOVE,{event:e,element:Ha(this),datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this);r.classed("hovered",!1),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(im),am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.renderType=k.SVG,e.padding=5,e.defaultStepFactor=70,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(this.configs.groups),i=this.getOptions().data.groupMapsTo;this.setGroupScale();var o=this.getComponentContainer({withinChartClip:!0}),a=Ba.removeArrayDuplicates(n.map((function(t){var n=e.services.cartesianScales.getDomainIdentifier(t);return t[n]&&"function"==typeof t[n].toString?t[n].toString():t[n]}))),s=o.selectAll("g.bars").data(a,(function(t){return t}));s.exit().attr("opacity",0).remove();var l=s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(s);l.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-group-update-enter",animate:t})})).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===V.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"}));var u=l.selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}),(function(t){return t[i]}));u.exit().attr("opacity",0).remove(),u.enter().append("path").attr("opacity",0).merge(u).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t,n){var r=e.groupScale(t[i]),o=e.getBarWidth(),a=r,s=r+o,l=e.services.cartesianScales.getRangeAxisPosition({datum:t}),u=e.services.cartesianScales.getValueThroughAxisPosition(l,0),c=e.services.cartesianScales.getRangeValue(t),h=e.services.cartesianScales.getDomainValue(t,n)-o/2,d=h+o;if(!e.isOutsideZoomedDomain(h,d))return Ba.generateSVGPathString({x0:a,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=Ha(this);r.classed("hovered",!0),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this);r.classed("hovered",!1),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this;return this.model.getDisplayData(this.configs.groups).filter((function(n){return n[e.services.cartesianScales.getDomainIdentifier(n)].toString()===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e},e.prototype.getDomainScaleStep=function(){var t=this.services.cartesianScales.getDomainScale(),e=this.model.getGroupedData(this.configs.groups),n=this.defaultStepFactor;if("function"==typeof t.step)n=t.step();else if(e.length>0){var r=e.find((function(t){var e;return(null===(e=t.data)||void 0===e?void 0:e.length)>1}));if(r){var i=this.services.cartesianScales.getDomainIdentifier(r.data[0]);n=Math.abs(t(r.data[1][i])-t(r.data[0][i]))}}return n},e.prototype.getTotalGroupPadding=function(){var t=this.model.getGroupedData(this.configs.groups);return 1===t.length?0:Math.min(5,this.getDomainScaleStep()/this.defaultStepFactor*5)*(t.length-1)},e.prototype.getBarWidth=function(){var t=this.getOptions(),e=Ba.getProperty(t,"bars","width"),n=Ba.getProperty(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;var r=this.model.getGroupedData(this.configs.groups).length,i=this.getTotalGroupPadding();return Math.min(n,(this.getDomainScaleStep()-i)/r)},e.prototype.setGroupScale=function(){var t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=rl().domain(t).rangeRound([0,this.getGroupWidth()])},e}(im),sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),s=this.model.getActiveDataGroupNames(),l=n.selectAll("g.bars").data(a,(function(t){return Ba.getProperty(t,0,o)}));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars");var u=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));u.exit().remove(),u.enter().append("path").merge(u).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t[o],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[o])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,o=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-o/2,l=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(a,l)){if(Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize){var h=t[0]<0&&t[1]<=0;h&&s.length>1?e.services.cartesianScales.getOrientation()===V.VERTICAL?c+=0===t[1]?2:1:c-=1:h||(e.services.cartesianScales.getOrientation()===V.VERTICAL?c+=1:c-=1)}return Ba.generateSVGPathString({x0:a,x1:l,y0:u,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n,r){var i,o=Ha(this);o.classed("hovered",!0),e.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOVER,{event:n,element:o,datum:r});var a=e.model.getDisplayData(e.configs.groups).find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[e.services.cartesianScales.getRangeIdentifier(n)]===r.data[r[t]]&&n[i].toString()===r.data.sharedStackKey&&n[t]===r[t]}));if(void 0===a){var s=e.services.cartesianScales.getDomainIdentifier(),l=e.services.cartesianScales.getRangeIdentifier();(i={})[s]=r.data.sharedStackKey,i[l]=r.data[r[t]],i[t]=r[t],a=i}e.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:n,hoveredElement:o,data:[a]})})).on("mousemove",(function(t,n){var r=Ha(this);e.services.events.dispatchEvent(ut.Bar.BAR_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ut.Bar.BAR_CLICK,{event:t,element:Ha(this),datum:n})})).on("mouseout",(function(t,n){var r=Ha(this);r.classed("hovered",!1),e.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.getBarWidth=function(){var t=this.getOptions();if(Ba.getProperty(t,"bars","width"))return t.bars.width;var e=this.services.cartesianScales.getMainXScale(),n=vg.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=this.model.getStackKeys().length,i=Ba.getProperty(t,"bars","spacingFactor");return e.step?Math.min(t.bars.maxWidth,e.step()/2):Math.min(t.bars.maxWidth,n*i/r)},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(im),lm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="boxplot",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions().data.groupMapsTo,o=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),l=a.range(),u=l[0],c=l[1],h=s.range(),d=c-u,f=h[0]-h[1];if(0!==d){var p=this.services.cartesianScales,g=p.getOrientation(),v=g===V.VERTICAL,m=Ba.flipDomainAndRangeBasedOnOrientation((function(t,n){return e.services.cartesianScales.getDomainValue(t,n)}),(function(t,n){return e.services.cartesianScales.getRangeValue(t,n)}),g),y=m[0],b=m[1],x=Math.floor((v?d:f)/o.length),_=Math.min(x/2,16),E=this.model.getBoxplotData(),w=n.selectAll(".box-group").data(E);w.exit().remove();var O=w.enter().append("g").attr("class","box-group"),T=w.merge(O);O.append("path").merge(w.select("path.vertical-line.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[I.STROKE],originalClassName:"vertical-line start"})})).attr("stroke-width",bt.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalstartline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.quartiles.q_25);return Ba.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.vertical-line.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[I.STROKE],originalClassName:"vertical-line end"})})).attr("stroke-width",bt.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalendline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.quartiles.q_75);return Ba.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.box")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[I.FILL,I.STROKE],originalClassName:"box"})})).attr("fill-opacity",bt.box.opacity.default).attr("stroke-width",bt.strokeWidth.default).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","box").attr("aria-label",(function(t){return t[i]})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-quartiles",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/2,n=e+_,r=p.getRangeValue(Math[v?"max":"min"](t.quartiles.q_75,t.quartiles.q_25)),o=r+Math.abs(p.getRangeValue(t.quartiles.q_75)-p.getRangeValue(t.quartiles.q_25));return Ba.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/2,n=e+_,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.max);return Ba.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.whisker.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[I.STROKE],originalClassName:"whisker start"})})).attr("stroke-width",bt.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-startingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/4,n=e+_/2,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.min);return Ba.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.median")).attr("fill","none").attr("class",(function(){return e.model.getColorClassName({classNameTypes:[I.STROKE],originalClassName:"median"})})).attr("stroke-width",2).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-median",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/2,n=e+_,r=p.getRangeValue(t.quartiles.q_50),o=r;return Ba.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.whisker.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[I.STROKE],originalClassName:"whisker end"})})).attr("stroke-width",bt.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-endingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/4,n=e+_/2,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.whiskers.max);return Ba.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)}));var S=T.selectAll("circle.outlier").data((function(t){return t.outliers.map((function(e){var n;return(n={min:t.whiskers.min,max:t.whiskers.max})[i]=t[i],n.value=e,n}))}));S.exit().remove();var M=S.enter().append("circle");S.merge(M).attr("r",bt.circle.radius).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[I.FILL,I.STROKE],originalClassName:"outlier"})})).attr("fill-opacity",bt.circle.opacity.default).attr("cx",y).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-circles",animate:t})})).attr("cy",b),this.addBoxEventListeners(),this.addCircleEventListeners()}},e.prototype.addBoxEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo;this.parent.selectAll("path.highlight-area").on("mouseover",(function(r,i){var o=Ha(this);Ha(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",bt.box.opacity.hovered),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:e.tooltip.groupLabel,value:i[n],class:t.model.getColorClassName({classNameTypes:[I.TOOLTIP]})},{label:"Minimum",value:i.whiskers.min},{label:"Q1",value:i.quartiles.q_25},{label:"Median",value:i.quartiles.q_50},{label:"Q3",value:i.quartiles.q_75},{label:"Maximum",value:i.whiskers.max},{label:"IQR",value:i.quartiles.q_75-i.quartiles.q_25}]}),t.services.events.dispatchEvent(ut.Boxplot.BOX_MOUSEOVER,{event:r,element:o,datum:i})})).on("mousemove",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.Boxplot.BOX_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Boxplot.BOX_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this);Ha(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",bt.box.opacity.default),t.services.events.dispatchEvent(ut.Boxplot.BOX_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.addCircleEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",(function(i,o){var a=Ha(this);a.classed("hovered",!0).attr("fill-opacity",bt.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel,value:o[n],class:t.model.getColorClassName({classNameTypes:[I.TOOLTIP]})},{label:"Outlier",value:o[r]}]}),t.services.events.dispatchEvent(ut.Boxplot.OUTLIER_MOUSEOVER,{event:i,element:a,datum:o})})).on("mousemove",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.Boxplot.OUTLIER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Boxplot.OUTLIER_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this);r.classed("hovered",!1).attr("fill-opacity",bt.circle.opacity.default),t.services.events.dispatchEvent(ut.Boxplot.OUTLIER_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e}(Tg),um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.renderType=k.SVG,e.handleChartHolderOnHover=function(t){e.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"chart-holder-hover-scatter"})})).attr("opacity",1)},e.handleChartHolderOnMouseOut=function(t){e.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"chart-holder-mouseout-scatter"})})).attr("opacity",0)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("circle.dot").transition("legend-hover-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-scatter"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-scatter"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(ut.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(ut.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(t),n=this.model.get("zoomDomain");return void 0!==n?t.filter((function(t){return t[e].getTime()>=n[0].getTime()&&t[e].getTime()<=n[1].getTime()})):t},e.prototype.getScatterData=function(){var t,e=this,n=this.getOptions();if(this.configs.stacked){var r=Object.keys(n.axes).some((function(t){return n.axes[t].percentage}));t=this.model.getStackedData({groups:this.configs.groups,percentage:r})}else t=this.model.getDisplayData(this.configs.groups).filter((function(t){var n=e.services.cartesianScales.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}));return this.filterBasedOnZoomDomain(t)},e.prototype.render=function(t){if(Ba.getProperty(this.getOptions(),"points","enabled")||Ba.getProperty(this.getOptions(),"bubble","enabled")){var e=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales.getDomainIdentifier(),i=e.selectAll("circle.dot").data(this.getScatterData(),(function(t){return t[n]+"-"+t[r]}));i.exit().attr("opacity",0).remove();var o=i.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(i);this.styleCircles(o,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){var n=this;if(!this.configs.handleThresholds)return!1;var r=this.services.cartesianScales.getOrientation(),i=Ba.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=Ba.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)}),(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)}),r),l=s[0],u=s[1],c=l(t,e),h=u(t,e);return a&&o?h<=a.scaleValue&&c>=o.scaleValue:a?h<=a.scaleValue:o?c>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.points,a=o.filled,s=o.fillOpacity,l=this.services,u=l.cartesianScales,c=(l.transitions,i.data.groupMapsTo),h=Ba.flipDomainAndRangeBasedOnOrientation((function(t,e){return u.getDomainValue(t,e)}),(function(t,e){return u.getRangeValue(t,e)}),u.getOrientation()),d=h[0],f=h[1],p=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=u.getDomainIdentifier(t),r=n.model.getIsFilled(t[c],t[e],t,a)?[I.FILL,I.STROKE]:[I.STROKE];return n.model.getColorClassName({classNameTypes:r,dataGroupName:t[c],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){var e=u.getDomainIdentifier(t);return n.model.getIsFilled(t[c],t[e],t,a)})).classed("unfilled",(function(t){var e=u.getDomainIdentifier(t);return!n.model.getIsFilled(t[c],t[e],t,a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"scatter-update-enter",animate:e})})).attr("cx",d).attr("cy",f).attr("r",i.points.radius).style("fill",(function(t){var e=u.getDomainIdentifier(t);if(n.model.getIsFilled(t[c],t[e],t,a))return n.model.getFillColor(t[c],t[e],t)})).style("stroke",(function(t){var e=u.getDomainIdentifier(t);return n.model.getStrokeColor(t[c],t[e],t)})).attr("fill-opacity",a?s:1).attr("opacity",p?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[u.getRangeIdentifier(t)]})),this.addEventListeners()},e.prototype.getTooltipAdditionalItems=function(t){return null},e.prototype.addEventListeners=function(){var t=this,e=t.getOptions().data.groupMapsTo;this.parent.selectAll("circle").on("mouseover",(function(n,r){var i=Ha(this);i.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:n[e],originalClassName:i.attr("class")})})).style("fill",(function(n){var r=t.services.cartesianScales.getDomainIdentifier(n);return t.model.getFillColor(n[e],n[r],n)})).classed("unfilled",!1),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r],additionalItems:t.getTooltipAdditionalItems(r)}),t.services.events.dispatchEvent(ut.Scatter.SCATTER_MOUSEOVER,{event:n,element:i,datum:r})})).on("mousemove",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.Scatter.SCATTER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Scatter.SCATTER_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(n,r){var i=Ha(this);if(i.classed("hovered",!1),!t.configs.filled){var o=t.getOptions().points.filled,a=t.services.cartesianScales.getDomainIdentifier(r),s=t.model.getIsFilled(r[e],r[a],r,o);i.classed("unfilled",!s).style("fill",(function(n){return s||o?t.model.getFillColor(n[e],n[a],n):null}))}t.services.events.dispatchEvent(ut.Scatter.SCATTER_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:i})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(ut.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(ut.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Tg),cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e.renderType=k.SVG,e}return n(e,t),e.prototype.getRadiusScale=function(t){var e=this.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=vg.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,s=a?Rs(i):[1,1];return Mu().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,l=this.services.cartesianScales,u=Ba.flipDomainAndRangeBasedOnOrientation((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),c=u[0],h=u[1];t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).attr("aria-label",(function(t){return t[l.getRangeIdentifier(t)]})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"bubble-update-enter",animate:e})})).attr("cx",c).attr("cy",h).attr("r",(function(t){return a(t[o]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[I.FILL,I.STROKE],dataGroupName:t[s],originalClassName:"dot"})})).style("fill",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getFillColor(t[s],t[e],t)})).style("stroke",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getStrokeColor(t[s],t[e],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)},e.prototype.getTooltipAdditionalItems=function(t){var e=Ba.getProperty(this.getOptions(),"bubble");return[{label:Ba.getProperty(e,"radiusLabel"),value:t[Ba.getProperty(e,"radiusMapsTo")]}]},e}(um),hm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-simple-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e,n=this,i=this.getOptions().data.groupMapsTo,o=this.getComponentContainer({withinChartClip:!0}),a=this.model.getDisplayData(this.configs.groups),s=this.services.cartesianScales.getRangeScale(),l=this.services.cartesianScales.getRangeIdentifier(),u=s.range(),c=u[0],h=u[1],d=s.domain(),f=(d[0],d[1]);!function(){var e=[];a.forEach((function(t){t.ranges?t.ranges.forEach((function(n,r){null!=n&&n<f&&e.push({datum:t,value:n,order:r+1})})):e.push({datum:t,order:1})}));var r=vg.appendOrSelect(o,"g.range-boxes").selectAll("path.range-box").data(e,(function(t){return t[i]+"-"+t.order}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"range-box order-"+t.order})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-range-box-update-enter",animate:t})})).attr("d",(function(t,e){var r,i,o,a;return 1===t.order?(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=h-2,a=c+1):(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=n.services.cartesianScales.getRangeValue(t.value,e),a=h),Ba.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),(e=vg.appendOrSelect(o,"g.bars").selectAll("path.bar").data(a,(function(t){return t[i]}))).exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("bar",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-bar-update-enter",animate:t})})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return n.model.getFillColor(t[i])})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-4,i=r+8,o=n.services.cartesianScales.getRangeValue(0)+1,a=n.services.cartesianScales.getRangeValue(t,e);return Ba.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),function(){var e=vg.appendOrSelect(o,"g.markers").selectAll("path.marker").data(a.filter((function(t){return null!==Ba.getProperty(t,"marker")})),(function(t){return t[i]}));e.exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("marker",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-marker-update-enter",animate:t})})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-12,i=r+24,o=n.services.cartesianScales.getRangeValue(t.marker,e),a=o;return Ba.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),function(){var e=[];a.filter((function(t){return null!==Ba.getProperty(t,"marker")})).forEach((function(t){var n=t.marker,r=t[l];e=e.concat([{datum:t,value:.25*n,barValue:r},{datum:t,value:.5*n,barValue:r},{datum:t,value:.75*n,barValue:r}])}));var r=vg.appendOrSelect(o,"g.quartiles").selectAll("path.quartile").data(e,(function(t){return t[i]}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"quartile "+(t.value<=t.barValue?"over-bar":"")})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-quartile-update-enter",animate:t})})).attr("d",(function(t,e){var r=t.datum,i=t.value,o=4;r.ranges&&-1!==r.ranges.indexOf(i)&&(o=8);var a=n.services.cartesianScales.getDomainValue(r,e)-o/2,s=a+o,l=n.services.cartesianScales.getRangeValue(i,e),u=l;return Ba.generateSVGPathString({x0:a,x1:s,y0:l,y1:u},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("path.bar").on("mouseover",(function(i,o){var a=Ha(this);a.classed("hovered",!0),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:o});var s=Ba.getProperty(e,"bullet","performanceAreaTitles"),l=t.model.getMatchingRangeIndexForDatapoint(o);t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel||"Group",value:o[n],class:t.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:o[n]})},{label:"Value",value:o[r]},{label:"Target",value:o.marker},{label:"Percentage",value:Math.floor(o[r]/o.marker*100)+"%"},{label:"Performance",value:s[l]}]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEMOVE,{event:e,element:Ha(this),datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this);r.classed("hovered",!1),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Tg),dm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),i=this.model.getOptions(),o=i.groupIdentifier,a=i.data.groupMapsTo,s=this.model.getBinnedStackedData(),l=this.services.cartesianScales.getMainXScale(),u=n.selectAll("g.bars").data(s,(function(t){return Hn(t,"0."+a)}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",r.GROUP);var c=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}));c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(o,(function(t,e){return e})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"histogram-bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t[a],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=Hn(t,"data");if(r){var o=l(r.x1)-l(r.x0)-1,a=e.services.cartesianScales.getDomainValue(r.x0,n),s=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===V.VERTICAL?c+=1:c-=1),Ba.generateSVGPathString({x0:a,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return Ba.getProperty(t,"data",t[a])})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions(),e=t.data.groupMapsTo,n=this;this.parent.selectAll("path.bar").on("mouseover",(function(r,i){var o=Ha(this);o.classed("hovered",!0);var a=parseFloat(Hn(i,"data.x0")),s=parseFloat(Hn(i,"data.x1")),l=n.services.cartesianScales.getRangeAxisPosition(),u=n.services.cartesianScales.getScaleLabel(l);n.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:Hn(t,"bins.rangeLabel")||"Range",value:a+" – "+s},{label:t.tooltip.groupLabel||"Group",value:i[e],class:n.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:i[e]})},{label:u,value:Hn(i,"data."+i[e])}]})})).on("mousemove",(function(t,e){n.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("mouseout",(function(t,e){Ha(this).classed("hovered",!1),n.services.events.dispatchEvent(ut.Tooltip.HIDE)}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Tg),fm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.line").transition("legend-hover-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-line"})})).attr("opacity",(function(t){return t.name!==n.datum().name?Et.opacity.unselected:Et.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition("legend-mouseout-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})})).attr("opacity",Et.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this.services,o=i.cartesianScales,a=i.curves,s=Ba.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),l=s[0],u=s[1],c=this.getOptions(),h=ld().x(l).y(u).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier(t)];return null!=n})),d=[];if(this.configs.stacked){var f=Object.keys(c.axes).some((function(t){return c.axes[t].percentage})),p=c.data.groupMapsTo;d=this.model.getStackedData({groups:this.configs.groups,percentage:f}).map((function(t){var n=e.services.cartesianScales.getDomainIdentifier(t),r=e.services.cartesianScales.getRangeIdentifier(t);return{name:Ba.getProperty(t,0,p),data:t.map((function(t){var e;return(e={})[n]=t.data.sharedStackKey,e[p]=t[p],e[r]=t[1],e})),hidden:!Ba.some(t,(function(t){return t[0]!==t[1]}))}}))}else d=this.model.getGroupedData(this.configs.groups);var g=n.selectAll("path.line").data(d,(function(t){return t.name}));g.exit().attr("opacity",0).remove(),g.enter().append("path").classed("line",!0).attr("opacity",0).merge(g).data(d,(function(t){return t.name})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.STROKE],dataGroupName:t.name,originalClassName:"line"})})).style("stroke",(function(t){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.data.map((function(t){return t[e.services.cartesianScales.getRangeIdentifier(t)]})).join(",")})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"line-update-enter",animate:t})})).attr("opacity",(function(t){return t.hidden?0:1})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Tg),pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="lollipop",e.renderType=k.SVG,e.handleScatterOnHover=function(t){var n=t.detail,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").attr("stroke-width",(function(t){return t[r]!==n.datum[r]?Et.weight.unselected:Et.weight.selected}))},e.handleScatterOnMouseOut=function(t){e.parent.selectAll("line.line").attr("stroke-width",Et.weight.unselected)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").transition("legend-hover-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-line"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?Et.opacity.unselected:Et.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("line.line").transition("legend-mouseout-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})})).attr("opacity",Et.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,o=this.services.cartesianScales,a=o.getMainXScale(),s=o.getMainYScale(),l=o.getDomainIdentifier(),u=o.getOrientation(),c=Ba.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),u),h=c[0],d=c[1],f=n.selectAll("line.line").data(this.getScatterData(),(function(t){return t[i]+"-"+t[l]}));f.exit().attr("opacity",0).remove();var p=f.enter().append("line").attr("opacity",0).merge(f).classed("line",!0).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.STROKE],dataGroupName:t[i],originalClassName:"line"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"lollipop-line-update-enter",animate:t})})).style("stroke",(function(t){return e.model.getFillColor(t[i],t[l],t)})).attr("opacity",1);u===V.HORIZONTAL?p.attr("y1",d).attr("y2",d).attr("x1",a.range()[0]).attr("x2",(function(t,e){return h(t,e)-r.points.radius})):p.attr("x1",h).attr("x2",h).attr("y1",s.range()[0]).attr("y2",(function(t,e){return d(t,e)+r.points.radius})),this.addScatterPointEventListeners()},e.prototype.addScatterPointEventListeners=function(){this.services.events.addEventListener(ut.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(ut.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(ut.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(ut.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e}(um),gm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this;if(Ba.getProperty(this.getOptions(),"points","enabled")){var n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),s=this.model.getStackedData({groups:this.configs.groups,percentage:a}),l=n.selectAll("g.dots").data(s,(function(t){return Ba.getProperty(t,0,o)}));l.exit().attr("opacity",0).remove();var u=l.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(l).selectAll("circle.dot").data((function(t){return t}));u.exit().attr("opacity",0).remove();var c=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u).datum((function(t){var n,r=t[o],i=e.services.cartesianScales.getDomainIdentifier(t),a=e.services.cartesianScales.getRangeIdentifier(t);return(n={})[o]=r,n[i]=t.data.sharedStackKey,n[a]=t[1],n}));this.styleCircles(c,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.getOptions(),i=r.data.groupMapsTo,o=Object.keys(r.axes).some((function(t){return r.axes[t].percentage})),a=this.model.getStackedData({groups:this.configs.groups,percentage:o}),s=[];return a.forEach((function(r,a){r.forEach((function(r,l){var u,c=r[i],h=r.data.sharedStackKey,d=r.data[c],f=r[1],p=n.services.cartesianScales.getDomainIdentifier(r),g=n.services.cartesianScales.getRangeIdentifier(r);null!=d&&t===n.services.cartesianScales.getDomainValue(h)&&e===n.services.cartesianScales.getRangeValue(f)&&(o&&(d=n.model.getStackedData({groups:n.configs.groups})[a][l].data[c]),null!==d&&s.push(((u={})[i]=c,u[p]=h,u[g]=d,u)))}))})),this.model.getDisplayData(this.configs.groups).filter((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t),r=n.services.cartesianScales.getRangeIdentifier(t);return void 0!==s.find((function(n){return n[i]==t[i]&&n[e]==t[e]&&n[r]==t[r]}))}))},e}(um);function vm(t,e){var n=this,r=ql(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return Ot.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getComponentContainer(),o=this.getOptions(),a=o.data.groupMapsTo,s=o.pie.valueMapsTo,l=this.model.getDisplayData().filter((function(t){return t[s]>0})),u=this.computeRadius();this.arc=ed().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=ed().innerRadius(this.getInnerRadius()).outerRadius(u+Ot.hoverArc.outerRadiusOffset);var c=function(){var t=hd,e=cd,n=null,r=Ih(0),i=Ih(Wh),o=Ih(0);function a(a){var s,l,u,c,h,d=(a=rd(a)).length,f=0,p=new Array(d),g=new Array(d),v=+r.apply(this,arguments),m=Math.min(Wh,Math.max(-Wh,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/d,o.apply(this,arguments)),b=y*(m<0?-1:1);for(s=0;s<d;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(f+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,u=f?(m-d*b)/f:0;s<d;++s,v=c)l=p[s],c=v+((h=g[l])>0?h*u:0)+b,g[l]={data:a[l],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Ih(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ih(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ih(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ih(+t),a):o},a}().value((function(t){return t[s]})).sort(Ba.getProperty(o,"pie","sortFunction")).padAngle(Ot.padAngle)(l),h=vg.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(c,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("slice",!0).attr("opacity",0).merge(h).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t.data[a],originalClassName:"slice"})})).style("fill",(function(t){return n.model.getFillColor(t.data[a])})).attr("d",this.arc).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"pie_slice_enter_update",animate:t})})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t[s]+", "+Ba.convertValueToPercentage(t.data[s],l,s)+"%"})).attrTween("d",(function(t){return vm.bind(this)(t,n.arc)}));var d=o.pie.labels.enabled,f=d?c.filter((function(t){return t.data[s]>0})):[],p=vg.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(f,(function(t){return t.data[a]}));p.exit().attr("opacity",0).remove();var g=p.enter().append("text").classed("pie-label",!0),v=[];g.merge(p).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):Ba.convertValueToPercentage(t.data[s],l,s)+"%"})).datum((function(t){var e=u+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=f.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<Ot.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+Ot.callout.offsetX+Ot.callout.textMargin+t.textOffsetX,o=t.yPosition-Ot.callout.offsetY,t.direction=Y.RIGHT,v.push(t)):(i=t.xPosition-Ot.callout.offsetX-t.textOffsetX-Ot.callout.textMargin,o=t.yPosition-Ot.callout.offsetY,t.direction=Y.LEFT,v.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(v);var m=Ba.getProperty(o,"donut")?"donut":"pie",y=Ba.getProperty(o,m,"alignment"),b=vg.getSVGElementSize(this.getParent(),{useAttrs:!0}).width,x=d?Ot.yOffset:0,_=u+(d?Ot.xOffset:0);y===z.CENTER?_=b/2:y===z.RIGHT&&(_=b-u-Ot.xOffset);var E=u+x;v.length>0&&(E+=Ot.yOffsetCallout),i.attr("x",_+7).attr("y",E),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=vg.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",r.GROUP).attr("data-name","callouts"),n=e.selectAll("g.callout").data(t);n.exit().remove();var i=n.enter().append("g").classed("callout",!0).attr("role",r.GROUP).attr("aria-roledescription","label callout");i.merge(n).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===Y.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+Ot.callout.offsetX,y:n-Ot.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-Ot.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-Ot.callout.offsetX,y:n-Ot.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+Ot.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return Ha(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),i.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return Ha(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e,n){var r=Ha(this);r.classed("hovered",!0).transition("pie_slice_mouseover").call((function(e){return t.services.transitions.setupTransition({transition:e,name:"pie_slice_mouseover"})})).attr("d",t.hoverArc),t.services.events.dispatchEvent(ut.Pie.SLICE_MOUSEOVER,{event:e,element:Ha(this),datum:n});var i=t.getOptions().data.groupMapsTo,o=t.getOptions().pie.valueMapsTo;t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{label:n.data[i],value:n.data[o]}]})})).on("mousemove",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.Pie.SLICE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Pie.SLICE_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this);r.classed("hovered",!1).transition("pie_slice_mouseout").call((function(e){return t.services.transitions.setupTransition({transition:e,name:"pie_slice_mouseout"})})).attr("d",t.arc),t.services.events.dispatchEvent(ut.Pie.SLICE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.computeRadius=function(){var t=vg.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height,r=this.getOptions(),i=Math.min(e,n)/2;return r.pie.labels.enabled?i+Ot.radiusOffset:i},e}(Tg),ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e.renderType=k.SVG,e}return n(e,t),e.prototype.getValue=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"value"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getValueRatio=function(){return Ba.clamp(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.getOptions();return Ba.getProperty(t,"gauge","type")===$.FULL?1:.5},e.prototype.getArcSize=function(){return this.getArcRatio()*Math.PI*2},e.prototype.getStartAngle=function(){var t=this.getArcSize();return t===2*Math.PI?0:-t/2},e.prototype.getArrow=function(t){var e=this.getOptions();switch(Ba.getProperty(e,"gauge","deltaArrow","direction")){case J.UP:return"4,10 8,6 12,10";case J.DOWN:return"12,6 8,10 4,6";default:return t>0?"4,10 8,6 12,10":"12,6 8,10 4,6"}},e.prototype.render=function(t){var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),i=this.getOptions(),o=this.getValue(),a=this.getValueRatio(),s=this.getArcSize(),l=this.getStartAngle(),u=l+a*s,c=l+s,h=this.computeRadius(),d=this.getInnerRadius();this.backgroundArc=ed().innerRadius(d).outerRadius(h).startAngle(u).endAngle(c),this.arc=ed().innerRadius(d).outerRadius(h).startAngle(l).endAngle(u),vg.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);var f=n.selectAll("path.arc-foreground").data([o]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",(function(t){return Ba.getProperty(e.getOptions(),"color","scale","value")})).attr("d",this.arc).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t})),this.drawValueNumber(),this.drawDelta(),f.exit().remove();var p=Ba.getProperty(i,"gauge","alignment"),g=vg.getSVGElementSize(this.getParent(),{useAttrs:!0}).width,v=h;p===z.CENTER?v=g/2:p===z.RIGHT&&(v=g-h),n.attr("x",v).attr("y",h),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=Ba.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=Ba.getProperty(e,"gauge","valueFontSize"),s=Ba.getProperty(e,"gauge","deltaFontSize"),l=Ba.getProperty(e,"gauge","numberSpacing"),u=Ba.getProperty(e,"gauge","showPercentageSymbol"),c=0;n!==$.FULL||i?n===$.SEMI&&i&&(c=-(s(o)+l)):c=s(o);var h=vg.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),d=a(o),f=vg.appendOrSelect(h,"g.gauge-value-number"),p=Ba.getProperty(e,"gauge","numberFormatter"),g=f.selectAll("text.gauge-value-number").data([r]);g.enter().append("text").attr("class","gauge-value-number").merge(g).style("font-size",d+"px").attr("text-anchor","middle").text((function(t){return p(t)}));var v=vg.getSVGElementSize(vg.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width,m=d/2,y=u?"%":"",b=vg.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",m+"px").attr("x",v/2).text(y),x=vg.getSVGElementSize(b,{useBBox:!0}),_=x.width,E=x.height;b.attr("y","-"+E/2+"px"),f.attr("transform","translate(-"+_/2+", 0)")},e.prototype.drawDelta=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=this.getDelta();if(r){var i=this.computeRadius(),o=r?Ba.getProperty(n,"gauge","deltaFontSize"):function(){return 0},a=r?Ba.getProperty(n,"gauge","numberFormatter"):function(){return null},s=Ba.getProperty(n,"gauge","deltaArrow","size"),l=Ba.getProperty(n,"gauge","numberSpacing"),u=Ba.getProperty(n,"gauge","showPercentageSymbol"),c=vg.appendOrSelect(e,"g.gauge-numbers"),h=(v=vg.appendOrSelect(c,"g.gauge-delta").attr("transform","translate(0, "+(o(i)+l)+")"),vg.appendOrSelect(v,"text.gauge-delta-number")),d=u?"%":"";h.data(null===r?[]:[r]),h.enter().append("text").classed("gauge-delta-number",!0).merge(h).attr("text-anchor","middle").style("font-size",o(i)+"px").text((function(t){return""+a(t)+d}));var f=vg.getSVGElementSize(vg.appendOrSelect(e,".gauge-delta-number"),{useBBox:!0}).width,p=Ba.getProperty(n,"gauge","deltaArrow","enabled"),g=v.selectAll("svg.gauge-delta-arrow").data(null!==r&&p?[r]:[]);g.enter().append("svg").merge(g).attr("class","gauge-delta-arrow").attr("x",-s(i)-f/2).attr("y",-s(i)/2-.35*o(i)).attr("width",s(i)).attr("height",s(i)).attr("viewBox","0 0 16 16").each((function(){var e=Ha(this);vg.appendOrSelect(e,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var i=Ba.getProperty(n,"gauge","status");vg.appendOrSelect(e,"polygon.gauge-delta-arrow").attr("class",null!==i?"gauge-delta-arrow status--"+i:"").attr("points",t.getArrow(r))})),g.exit().remove(),h.exit().remove()}else{var v;(v=e.select("g.gauge-delta")).empty()||v.remove()}},e.prototype.getInnerRadius=function(){return this.computeRadius()-Ba.getProperty(this.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e,n){t.services.events.dispatchEvent(ut.Gauge.ARC_MOUSEOVER,{event:e,element:Ha(this),datum:n})})).on("mousemove",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.Gauge.ARC_MOUSEMOVE,{event:e,element:r,datum:n})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Gauge.ARC_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.Gauge.ARC_MOUSEOUT,{event:e,element:r,datum:n})}))},e.prototype.computeRadius=function(){var t=this.getOptions(),e=Ba.getProperty(t,"gauge","type"),n=vg.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===$.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Tg),bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(e){var n=this;void 0===e&&(e=!0),t.prototype.render.call(this,e);var r=this;if(this.model.isDataEmpty())this.getComponentContainer().select("g.center").remove();else{var i=vg.appendOrSelect(this.getComponentContainer(),"g.center"),o=this.getOptions(),a=this.computeRadius(),s=Ba.getProperty(o,"donut","center","label");vg.appendOrSelect(i,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",(function(){return null===s||""===s?"central":"initial"})).style("font-size",(function(){return o.donut.center.numberFontSize(a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"donut-figure-enter-update",animate:e})})).tween("text",(function(){return r.centerNumberTween(Ha(this))})),null!==s&&""!==s&&vg.appendOrSelect(i,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return o.donut.center.titleFontSize(a)})).attr("y",o.donut.center.titleYPosition(a)).text(s)}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.getOptions(),n=Ba.getProperty(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,n){return t+n[e.pie.valueMapsTo]}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?Zl:Hl)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(mm),xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton",e}return n(e,t),e.prototype.render=function(){var t=Ba.getProperty(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===X.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===X.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===X.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==X.DONUT)throw new Error('"'+this.configs.skeleton+'" is not a valid Skeleton type.');this.renderDonutSkeleton(t)}},e.prototype.renderGridSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.renderVertOrHorizSkeleton=function(t){var e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===V.VERTICAL&&this.drawYGrid(t),e===V.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")},e.prototype.renderPieSkeleton=function(t){var e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.renderDonutSkeleton=function(t){var e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.setScales=function(){var t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=Mu().domain([0,1]).range(t),this.yScale=Mu().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=vg.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;this.backdrop=vg.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",r).attr("height",i);var o=vg.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var a=this.xScale.range(),s=a[0],l=(a[1],this.yScale.range()),u=(l[0],l[1]);this.backdrop.merge(o).attr("x",s).attr("y",u),o.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("width"),n=Ba.getProperty(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((function(t){return t*e})),i=vg.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2","100%"),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Ba.getProperty(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=vg.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=vg.getSVGElementSize(r,{useAttrs:!0}),o=i.width,a=i.height,s=vg.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),l=0===e?"pie":"donut",u=Ba.getProperty(this.getOptions(),l,"alignment");vg.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none");var c=ed().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(Ot.radiusOffset),d=t+(Math.min(o,a)-2*t)/2,f=vg.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+h+", "+d+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n).style("fill",n?"url(#"+this.services.domUtils.generateElementIDString("shimmer-areas")+")":null),p=t+Ot.xOffset;u===z.CENTER?p=o/2:u===z.RIGHT&&(p=o-t-Ot.xOffset);var g=t+Ot.yOffset;f.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=vg.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Ot.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=vg.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=vg.appendOrSelect(e,"defs").lower(),o=vg.appendOrSelect(i,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",0-3*.2*n).attr("x2",r).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)");o.html('\n\t\t\t<stop class="stop-bg-shimmer" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="stop-bg-shimmer" offset="0.4"></stop>\n\t\t'),function t(){o.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(ht).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Tg),_m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton-lines",e}return n(e,t),e.prototype.render=function(){var e=Ba.getProperty(this.getOptions(),"data","loading"),n=!(Ba.getProperty(this.getOptions(),"grid","x","enabled")||Ba.getProperty(this.getOptions(),"grid","y","enabled")||Ba.getProperty(this.getOptions(),"axes","bottom","visible")||Ba.getProperty(this.getOptions(),"axes","left","visible"));e&&!n?t.prototype.renderGridSkeleton.call(this,e):e&&n?this.renderSparklineSkeleton(e):this.removeSkeleton()},e.prototype.renderSparklineSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.drawSparkline=function(t){var e=this.backdrop.attr("width"),n=vg.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",e).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),n.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.updateBackdropStyle=function(){var t=this.parent;this.backdrop=vg.appendOrSelect(t,"svg.chart-skeleton.DAII"),vg.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)},e}(xm);function Em(t,e){return t.parent===e.parent?1:2}function wm(t,e){return t+e.x}function Om(t,e){return Math.max(t,e.y)}function Tm(){var t=Em,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(wm,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Om,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),l=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,l)/2,c=l.x+t(l,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(c-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Sm(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Mm(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Cm)):void 0===e&&(e=Am);for(var n,r,i,o,a,s=new Lm(t),l=[s];n=l.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new Lm(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Dm)}function Am(t){return t.children}function Cm(t){return Array.isArray(t)?t[1]:null}function Pm(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Dm(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Lm(t){this.data=t,this.depth=this.height=0,this.parent=null}function km(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Array.from(t))).length,o=[];r<i;)e=t[r],n&&Nm(n,e)?++r:(n=Um(o=Rm(o,e)),r=0);return n}function Rm(t,e){var n,r;if(Bm(e,t))return[e];for(n=0;n<t.length;++n)if(Im(e,t[n])&&Bm(Vm(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Im(Vm(t[n],t[r]),e)&&Im(Vm(t[n],e),t[r])&&Im(Vm(t[r],e),t[n])&&Bm(Gm(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Im(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Nm(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Bm(t,e){for(var n=0;n<e.length;++n)if(!Nm(t,e[n]))return!1;return!0}function Um(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return Vm(t[0],t[1]);case 3:return Gm(t[0],t[1],t[2])}var e}function Vm(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,l=o-n,u=a-r,c=s-i,h=Math.sqrt(l*l+u*u);return{x:(n+o+l/h*c)/2,y:(r+a+u/h*c)/2,r:(h+i+s)/2}}function Gm(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,l=e.r,u=n.x,c=n.y,h=n.r,d=r-a,f=r-u,p=i-s,g=i-c,v=l-o,m=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+l*l,x=y-u*u-c*c+h*h,_=f*p-d*g,E=(p*x-g*b)/(2*_)-r,w=(g*v-p*m)/_,O=(f*b-d*x)/(2*_)-i,T=(d*m-f*v)/_,S=w*w+T*T-1,M=2*(o+E*w+O*T),A=E*E+O*O-o*o,C=-(S?(M+Math.sqrt(M*M-4*S*A))/(2*S):A/M);return{x:r+E+w*C,y:i+O+T*C,r:C}}function Hm(t,e,n){var r,i,o,a,s=t.x-e.x,l=t.y-e.y,u=s*s+l*l;u?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(u+a-i)/(2*u),o=Math.sqrt(Math.max(0,a/u-r*r)),n.x=t.x-r*s-o*l,n.y=t.y-r*l+o*s):(r=(u+i-a)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-o*l,n.y=e.y+r*l+o*s)):(n.x=e.x+n.r,n.y=e.y)}function zm(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function jm(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Fm(t){this._=t,this.next=null,this.previous=null}function Wm(t){if(!(i=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var e,n,r,i,o,a,s,l,u,c,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;Hm(n,e,r=t[2]),e=new Fm(e),n=new Fm(n),r=new Fm(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){Hm(e._,n._,r=t[s]),r=new Fm(r),l=n.next,u=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(zm(l._,r._)){n=l,e.next=n,n.previous=e,--s;continue t}c+=l._.r,l=l.next}else{if(zm(u._,r._)){(e=u).next=n,n.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(l!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=jm(e);(r=r.next)!==n;)(a=jm(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=km(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function qm(t){return null==t?null:Zm(t)}function Zm(t){if("function"!=typeof t)throw new Error;return t}function Ym(){return 0}function Xm(t){return function(){return t}}function Km(t){return Math.sqrt(t.value)}function Qm(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function $m(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=Wm(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function Jm(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function ty(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ey(t,e,n,r,i){for(var o,a=t.children,s=-1,l=a.length,u=t.value&&(r-e)/t.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u}function ny(t,e){return t.parent===e.parent?1:2}function ry(t){var e=t.children;return e?e[0]:t.t}function iy(t){var e=t.children;return e?e[e.length-1]:t.t}function oy(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function ay(t,e,n){return t.a.parent===e.parent?t.a:n}function sy(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function ly(){var t=ny,e=1,n=1,r=null;function i(i){var l=function(t){for(var e,n,r,i,o,a=new sy(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new sy(r[i],i)),n.parent=e;return(a.parent=new sy(null,0)).children=[a],a}(i);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)i.eachBefore(s);else{var u=i,c=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)}));var d=u===c?1:t(u,c)/2,f=d-u.x,p=e/(c.x+d+f),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,l=o.parent.children[0],u=o.m,c=a.m,h=s.m,d=l.m;s=iy(s),o=ry(o),s&&o;)l=ry(l),(a=iy(a)).a=e,(i=s.z+h-o.z-u+t(s._,o._))>0&&(oy(ay(s,e,r),e,i),u+=i,c+=i),h+=s.m,u+=o.m,d+=l.m,c+=a.m;s&&!iy(a)&&(a.t=s,a.m+=h-c),o&&!ry(l)&&(l.t=o,l.m+=u-d,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function uy(t,e,n,r,i){for(var o,a=t.children,s=-1,l=a.length,u=t.value&&(i-n)/t.value;++s<l;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}Lm.prototype=Mm.prototype={constructor:Lm,count:function(){return this.eachAfter(Sm)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(e,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Mm(this).eachBefore(Pm)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n])}while(o.length)}},sy.prototype=Object.create(Lm.prototype);var cy=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,l,u,c,h,d,f,p,g,v,m=[],y=e.children,b=0,x=0,_=y.length,E=e.value;b<_;){l=i-n,u=o-r;do{c=y[x++].value}while(!c&&x<_);for(h=d=c,v=c*c*(g=Math.max(u/l,l/u)/(E*t)),p=Math.max(d/v,v/h);x<_;++x){if(c+=s=y[x].value,s<h&&(h=s),s>d&&(d=s),v=c*c*g,(f=Math.max(d/v,v/h))>p){c-=s;break}p=f}m.push(a={value:c,dice:l<u,children:y.slice(b,x)}),a.dice?ey(a,n,r,i,E?r+=u*c/E:o):uy(a,n,r,E?n+=l*c/E:i,o),E-=c,b=x}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);var hy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tree",e.renderType=k.SVG,e}return n(e,t),e.prototype.getLongestLabel=function(t){var e=this,n="";return t.forEach((function(t){var r=t.children?e.getLongestLabel(t.children):"";(r.length>n.length||t.name.length>n.length)&&(n=r.length>t.name.length?r:t.name)})),n},e.prototype.getMockLabelWidth=function(t,e){var n=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(e),r=vg.getSVGElementSize(n.node(),{useBBox:!0}).width;return n.remove(),r},e.prototype.render=function(t){var e=this,n=this.getComponentContainer();n.html("");var r=vg.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getOptions(),s=this.model.getDisplayData(),l=Ba.getProperty(a,"tree","rootTitle")||"Tree",u=this.getMockLabelWidth(n,l),c=this.getLongestLabel(s),h=this.getMockLabelWidth(n,c),d=0,f=u>0?u+6:24,p=Mm({name:l,children:s}),g=i/6,v=function(t){var r=p.descendants().reverse(),o=p.links(),a=p,s=p;p.eachBefore((function(t){t.x<a.x&&(a=t),t.x>s.x&&(s=t)}));var l=s.x-a.x,u=n.transition().call((function(t){return e.services.transitions.setupTransition({transition:t,name:"tree-update-viewbox",animate:!0})})).attr("viewBox",[-f,a.x,i,l]),c=E.selectAll("g").data(r,(function(t){return t.id})),h=e,d=c.enter().append("g").attr("transform",(function(){return"translate("+t.y0+","+t.x0+")"})).attr("class",(function(t){return 0!==t.depth&&t.children&&t.children.length>0?"clickable":null})).on("mouseover",(function(t,e){h.services.events.dispatchEvent(ut.Tree.NODE_MOUSEOVER,{event:t,element:Ha(this),datum:e})})).on("click",(function(t,e){0!==e.depth&&(e.children=e.children?null:e._children,v(e)),h.services.events.dispatchEvent(ut.Tree.NODE_CLICK,{event:t,element:Ha(this),datum:e})})).on("mouseout",(function(t,e){h.services.events.dispatchEvent(ut.Tree.NODE_MOUSEOUT,{event:t,element:Ha(this),datum:e})}));d.append("circle").attr("r",2.5).attr("class",(function(t){return t._children?"parent":"child"})).attr("stroke-width",10),d.append("text").attr("dy","0.31em").attr("x",(function(t){return t._children?-6:6})).attr("text-anchor",(function(t){return t._children?"end":"start"})).text((function(t){return t.data.name})).clone(!0).attr("class","text-stroke").lower(),c.merge(d).transition(u).attr("transform",(function(t){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",1).attr("stroke-opacity",1),c.exit().transition(u).remove().attr("transform",(function(){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",0).attr("stroke-opacity",0);var g=_.selectAll("path").data(o,(function(t){return t.target.id})),m=g.enter().append("path").attr("d",(function(e){var n={x:t.x0,y:t.y0};return x({source:n,target:n})}));g.merge(m).transition(u).attr("d",x),g.exit().transition(u).remove().attr("d",(function(){var e={x:t.x,y:t.y};return x({source:e,target:e})})),p.eachBefore((function(t){t.x0=t.x,t.y0=t.y}))},m=p.descendants(),y=m[m.length-1].depth,b=Ba.getProperty(a,"tree","type")===F.DENDROGRAM?Tm().size([o,i-h-6*y-u]):ly().nodeSize([10,g]).size([o,i-h-6*y-u]),x=bd().x((function(t){return t.y})).y((function(t){return t.x}));p.x0=g/2,p.y0=0,p.descendants().forEach((function(t,e){t.id=e,t._children=t.children})),b(p),n.attr("viewBox",[-f,-d,i,10]).style("user-select","none");var _=n.append("g").attr("class","links"),E=n.append("g").attr("class","nodes");v(p)}},e}(Tg),dy={black:{100:"#000000"},blue:{10:"#edf5ff",20:"#d0e2ff",30:"#a6c8ff",40:"#78a9ff",50:"#4589ff",60:"#0f62fe",70:"#0043ce",80:"#002d9c",90:"#001d6c",100:"#001141"},coolGray:{10:"#f2f4f8",20:"#dde1e6",30:"#c1c7cd",40:"#a2a9b0",50:"#878d96",60:"#697077",70:"#4d5358",80:"#343a3f",90:"#21272a",100:"#121619"},cyan:{10:"#e5f6ff",20:"#bae6ff",30:"#82cfff",40:"#33b1ff",50:"#1192e8",60:"#0072c3",70:"#00539a",80:"#003a6d",90:"#012749",100:"#061727"},gray:{10:"#f4f4f4",20:"#e0e0e0",30:"#c6c6c6",40:"#a8a8a8",50:"#8d8d8d",60:"#6f6f6f",70:"#525252",80:"#393939",90:"#262626",100:"#161616"},green:{10:"#defbe6",20:"#a7f0ba",30:"#6fdc8c",40:"#42be65",50:"#24a148",60:"#198038",70:"#0e6027",80:"#044317",90:"#022d0d",100:"#071908"},magenta:{10:"#fff0f7",20:"#ffd6e8",30:"#ffafd2",40:"#ff7eb6",50:"#ee5396",60:"#d02670",70:"#9f1853",80:"#740937",90:"#510224",100:"#2a0a18"},orange:{10:"#fff2e8",20:"#ffd9be",30:"#ffb784",40:"#ff832b",50:"#eb6200",60:"#ba4e00",70:"#8a3800",80:"#5e2900",90:"#3e1a00",100:"#231000"},purple:{10:"#f6f2ff",20:"#e8daff",30:"#d4bbff",40:"#be95ff",50:"#a56eff",60:"#8a3ffc",70:"#6929c4",80:"#491d8b",90:"#31135e",100:"#1c0f30"},red:{10:"#fff1f1",20:"#ffd7d9",30:"#ffb3b8",40:"#ff8389",50:"#fa4d56",60:"#da1e28",70:"#a2191f",80:"#750e13",90:"#520408",100:"#2d0709"},teal:{10:"#d9fbfb",20:"#9ef0f0",30:"#3ddbd9",40:"#08bdba",50:"#009d9a",60:"#007d79",70:"#005d5d",80:"#004144",90:"#022b30",100:"#081a1c"},warmGray:{10:"#f7f3f2",20:"#e5e0df",30:"#cac5c4",40:"#ada8a8",50:"#8f8b8b",60:"#726e6e",70:"#565151",80:"#3c3838",90:"#272525",100:"#171414"},white:{0:"#ffffff"},yellow:{10:"#fcf4d6",20:"#fddc69",30:"#f1c21b",40:"#d2a106",50:"#b28600",60:"#8e6a00",70:"#684e00",80:"#483700",90:"#302400",100:"#1c1500"}},fy=function(){var t,e=Ha(this.parentNode).select("rect.leaf"),n=xl(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(dy);e<n.length;e++)for(var r=n[e],i=dy[r],o=0,a=Object.keys(i);o<a.length;o++){var s=a[o];if(i[s]===t)return s}return null}(n?n.hex():null)),null==t){var r=Dl(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},py=0,gy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-treemap"})})).attr("opacity",(function(t){return t.parent.data.name===n.datum().name?1:.3}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),r=(this.model.getData(),this.model.getDisplayData()),i=this.model.getOptions(),o=Ba.getProperty(window,"location"),a=vg.getSVGElementSize(n,{useAttrs:!0}),s=a.width,l=a.height,u=Mm({name:i.title||"Treemap",children:r}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),c=function(){var t=cy,e=!1,n=1,r=1,i=[0],o=Ym,a=Ym,s=Ym,l=Ym,u=Ym;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(ty),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,d=e.y1-n;h<r&&(r=h=(r+h)/2),d<c&&(c=d=(c+d)/2),e.x0=r,e.y0=c,e.x1=h,e.y1=d,e.children&&(n=i[e.depth+1]=o(e)/2,r+=u(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(d-=l(e)-n)<c&&(c=d=(c+d)/2),t(e,r,c,h,d))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=Zm(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:Xm(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:Xm(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Xm(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:Xm(+t),c):l},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:Xm(+t),c):u},c}().size([s,l]).paddingInner(1).paddingOuter(0).round(!0)(u),h=(this.services.transitions,n.selectAll("g[data-name='leaf']").data(c.leaves(),(function(t){return t.data.name})));h.exit().attr("opacity",0).remove();var d=h.enter().append("g").attr("data-name","leaf").attr("data-uid",(function(){return py++})).merge(h);d.attr("data-name","leaf").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-group-update",animate:t})})).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"}));var f=d.selectAll("rect.leaf").data((function(t){return[t]}));f.exit().attr("width",0).attr("height",0).remove(),f.enter().append("rect").classed("leaf",!0).merge(f).attr("width",0).attr("height",0).attr("id",(function(){var t=Ha(this.parentNode).attr("data-uid");return i.style.prefix+"-leaf-"+t})).attr("class",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t.data.name,originalClassName:"leaf"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-leaf-update-enter",animate:t})})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).style("fill",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getFillColor(t.data.name)})),d.selectAll("clipPath").data((function(t){return!0!==t.data.showLabel?[]:[1]}),(function(t){return t})).join((function(t){t.append("clipPath").attr("id",(function(){var t=Ha(this.parentNode).attr("data-uid");return i.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=Ha(this.parentNode.parentNode).attr("data-uid"),e=i.style.prefix+"-leaf-"+t;return new URL("#"+e,o)+""}))}),(function(t){return null}),(function(t){return t.remove()})),d.selectAll("text").data((function(t){if(!0!==t.data.showLabel)return[];for(var n=t;n.depth>1;)n=n.parent;var r=Dl(e.model.getFillColor(n.data.name));return[{text:t.data.name,color:r.l<.5?"white":"black"}]}),(function(t){return t})).join((function(t){var e=t.append("text").text((function(t){return t.text})).style("fill",fy).attr("x",7).attr("y",18);o&&e.attr("clip-path",(function(){var t=Ha(this.parentNode).attr("data-uid"),e=i.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,o)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",fy)}),(function(t){return t.remove()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(e,n){for(var r=Ha(this),i=getComputedStyle(this,null).getPropertyValue("fill"),o=n;o.depth>1;)o=o.parent;r.transition("graph_element_mouseover_fill_update").call((function(e){return t.services.transitions.setupTransition({transition:e,name:"graph_element_mouseover_fill_update"})})).style("fill",(function(e){var n=t.model.getFillColor(e.parent.data.name);return n&&(i=n),xl(i).darker(.7).toString()})),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{color:i,label:o.data.name,bold:!0},{label:n.data.name,value:n.data.value}]}),t.services.events.dispatchEvent(ut.Treemap.LEAF_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.Treemap.LEAF_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Treemap.LEAF_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this);r.classed("hovered",!1);for(var i=n;i.depth>1;)i=i.parent;r.transition().call((function(e){return t.services.transitions.setupTransition({transition:e,name:"graph_element_mouseout_fill_update"})})).style("fill",(function(e){return t.model.getFillColor(e.parent.data.name)})),t.services.events.dispatchEvent(ut.Treemap.LEAF_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e}(Tg);function vy(t){var e,n=(yy(t)%(e=360)+e)%e;return my(n,[0,10])||my(n,[350,0])?{textAnchor:K.START,dominantBaseline:Q.MIDDLE}:my(n,[10,80])?{textAnchor:K.START,dominantBaseline:Q.HANGING}:my(n,[80,100])?{textAnchor:K.MIDDLE,dominantBaseline:Q.HANGING}:my(n,[100,170])?{textAnchor:K.END,dominantBaseline:Q.HANGING}:my(n,[170,190])?{textAnchor:K.END,dominantBaseline:Q.MIDDLE}:my(n,[190,260])?{textAnchor:K.END,dominantBaseline:Q.BASELINE}:my(n,[260,280])?{textAnchor:K.MIDDLE,dominantBaseline:Q.BASELINE}:{textAnchor:K.START,dominantBaseline:Q.BASELINE}}function my(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function yy(t){return t*(180/Math.PI)}function by(t,e,n){void 0===n&&(n={x:0,y:0});var r=e*Math.cos(t)+n.x,i=e*Math.sin(t)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}var xy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.renderType=k.SVG,e.getLabelDimensions=function(t){var n=vg.appendOrSelect(e.getComponentContainer(),"g.tmp-tick"),r=vg.appendOrSelect(n,"text").text(t),i=vg.getSVGElementSize(r.node(),{useBBox:!0}),o=i.width,a=i.height;return n.remove(),{width:o,height:a}},e.normalizeFlatData=function(t){var n=e.getOptions(),r=Ba.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Ba.getProperty(n,"data","groupMapsTo"),s=Ba.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[a]=e,n[o]=null,n}))})));return Ba.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.getOptions(),r=Ba.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Ba.getProperty(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[a]=n,e[i]=t,e[o]=null,e}));return{name:n,data:Ba.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.blobs path").transition("legend-hover-blob").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-blob"})})).style("fill-opacity",(function(t){return t.name!==n.datum().name?Tt.opacity.unselected:Tt.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?Tt.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})})).style("fill-opacity",Tt.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),i=vg.getSVGElementSize(n,{useAttrs:!0}),o=i.width,a=i.height,s=this.model.getData(),l=this.model.getGroupedData(),u=this.getOptions(),c=Ba.getProperty(u,"data","groupMapsTo"),h=Ba.getProperty(u,"radar","axes","value"),d=Ba.getProperty(u,"radar","axes"),f=d.angle,p=d.value,g=Tt.xLabelPadding,v=Tt.yLabelPadding,m=Tt.yTicksNumber,y=Tt.minRange,b=Tt.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[f]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[c]})))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(l);var x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),_=(Math.min(o,a)-x)/2;if(!(_<=0)){var E=rl().domain(this.fullDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),w=Ks(this.fullDataNormalized.map((function(t){return t[p]}))),O=Mu().domain([w>=0?0:w,Xs(this.fullDataNormalized.map((function(t){return t[p]})))]).range([y,_]).nice(m),T=O.ticks(m),S=function(t){return e.model.getFillColor(t)},M=gd().angle((function(t){return E(t[f])+Math.PI/2})).radius((function(t){return O(t[p])})).curve(Wd),A={x:Xs(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=E(t),_*Math.sin(n-Math.PI/2))})))+g,y:a/2},C=vg.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(T,(function(t){return t})),P=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[f]=e,n[p]=t,n}))};C.join((function(n){return n.append("path").attr("opacity",0).attr("transform","translate("+A.x+", "+A.y+")").attr("fill","none").call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_axes_enter",animate:t})})).attr("opacity",1).attr("d",(function(t){return M(P(t))}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_axes_update",animate:t})})).attr("opacity",1).attr("transform","translate("+A.x+", "+A.y+")").attr("d",(function(t){return M(P(t))}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_axes_exit",animate:t})})).attr("d",(function(t){return M(P(t))})).attr("opacity",0).remove()}))})),vg.appendOrSelect(n,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("opacity",0).attr("class",(function(t){return"x-axis-"+Ba.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return by(E(t),0,A).x})).attr("y1",(function(t){return by(E(t),0,A).y})).attr("x2",(function(t){return by(E(t),0,A).x})).attr("y2",(function(t){return by(E(t),0,A).y})).call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_axes_enter",animate:t})})).attr("opacity",1).attr("x1",(function(t){return by(E(t),O.range()[0],A).x})).attr("y1",(function(t){return by(E(t),O.range()[0],A).y})).attr("x2",(function(t){return by(E(t),O.range()[1],A).x})).attr("y2",(function(t){return by(E(t),O.range()[1],A).y}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_axes_update",animate:t})})).attr("opacity",1).attr("x1",(function(t){return by(E(t),O.range()[0],A).x})).attr("y1",(function(t){return by(E(t),O.range()[0],A).y})).attr("x2",(function(t){return by(E(t),O.range()[1],A).x})).attr("y2",(function(t){return by(E(t),O.range()[1],A).y}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_axes_exit",animate:t})})).attr("opacity",0).remove()}))})),vg.appendOrSelect(n,"g.x-labels").attr("role",r.GROUP).selectAll("text").data(this.uniqueKeys).join((function(n){return n.append("text").text((function(t){return t})).attr("opacity",0).attr("x",(function(t){return by(E(t),O.range()[1]+g,A).x})).attr("y",(function(t){return by(E(t),O.range()[1]+g,A).y})).style("text-anchor",(function(t){return vy(E(t)).textAnchor})).style("dominant-baseline",(function(t){return vy(E(t)).dominantBaseline})).call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_labels_enter",animate:t})})).attr("opacity",1)}))}),(function(r){return r.call((function(r){return r.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_labels_update",animate:t})})).attr("opacity",1).attr("x",(function(t){return by(E(t),O.range()[1]+g,A).x})).attr("y",(function(t){return by(E(t),O.range()[1]+g,A).y})).end().finally((function(){var t=Ba.getProperty(u,"radar","alignment"),r=e.getAlignmentXOffset(t,n,e.getParent());n.attr("x",r)}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_labels_exit",animate:t})})).attr("opacity",0).remove()}))})),vg.appendOrSelect(n,"g.blobs").attr("role",r.GROUP).selectAll("path").data(this.groupedDataNormalized,(function(t){return t.name})).join((function(n){return n.append("path").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL,I.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-label",(function(t){return t.name})).attr("opacity",0).attr("transform",t?function(){return"translate("+A.x+", "+A.y+") scale("+(1+.35*Math.random())+")"}:"translate("+A.x+", "+A.y+")").style("fill",(function(t){return S(t.name)})).style("fill-opacity",Tt.opacity.selected).style("stroke",(function(t){return S(t.name)})).call((function(n){var r=n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_blobs_enter",animate:t})}));t&&r.delay((function(){return 30*Math.random()})).attr("transform","translate("+A.x+", "+A.y+")"),r.attr("opacity",1).attr("d",(function(t){return M(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL,I.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).style("fill",(function(t){return S(t.name)})).style("stroke",(function(t){return S(t.name)})),n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_blobs_update",animate:t})})).attr("opacity",1).attr("transform","translate("+A.x+", "+A.y+")").attr("d",(function(t){return M(t.data)}))}))}),(function(n){return n.call((function(n){var r=n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_blobs_exit",animate:t})}));t&&r.delay((function(){return 30*Math.random()})).attr("transform",(function(){return"translate("+A.x+", "+A.y+") scale("+(1+.35*Math.random())+")"})),r.attr("opacity",0).remove()}))})),vg.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.fullDataNormalized.filter((function(t){return null!==Ba.getProperty(t,p)}))).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL).attr("aria-label",(function(t){return t[h]}))}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t[c],originalClassName:Ba.kebabCase(t[f])})})).attr("cx",(function(t){return by(E(t[f]),O(t[p]),A).x})).attr("cy",(function(t){return by(E(t[f]),O(t[p]),A).y})).attr("r",0).attr("opacity",0).style("fill",(function(t){return S(t[c])})),vg.appendOrSelect(n,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect")}),(function(t){return t}),(function(t){return t.remove()})).attr("x",A.x).attr("y",A.y-b/2).attr("width",O.range()[1]).attr("height",b).style("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+yy(E(t))+", "+A.x+", "+A.y+")"})),vg.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(Rs(T)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return by(-Math.PI/2,O(t),A).x+v})).attr("y",(function(t){return by(-Math.PI/2,O(t),A).y})).style("text-anchor","start").style("dominant-baseline","middle").call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_labels_enter",animate:t})})).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_labels_update",animate:t})})).text((function(t){return t})).attr("opacity",1).attr("x",(function(t){return by(-Math.PI/2,O(t),A).x+v})).attr("y",(function(t){return by(-Math.PI/2,O(t),A).y}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_labels_exit",animate:t})})).attr("opacity",0).remove()}))})),this.addEventListeners()}},e.prototype.getAlignmentXOffset=function(t,e,n){var r=vg.getSVGElementSize(e,{useBBox:!0}),i=vg.getSVGElementSize(n,{useAttrs:!0}).width,o=0;return t===z.CENTER?o=Math.floor((i-r.width)/2):t===z.RIGHT&&(o=i-r.width),o},e.prototype.destroy=function(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=Ba.getProperty(this.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n,r){var i=Ha(this);t.services.events.dispatchEvent(ut.Radar.X_AXIS_MOUSEOVER,{event:n,element:i,datum:r});var o=t.parent.select(".x-axes .x-axis-"+Ba.kebabCase(r)),a=t.parent.selectAll(".dots circle."+Ba.kebabCase(r)),s=t.model.getActiveDataGroupNames(),l=t.getOptions(),u=l.data.groupMapsTo,c=Ba.getProperty(l,"radar","axes","value");o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",(function(t){return-1!==s.indexOf(t[u])?1:0})).attr("r",Tt.dotsRadius);var h=t.fullDataNormalized.filter((function(t){return t[e]===r&&-1!==s.indexOf(t[u])}));t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:n,hoveredElement:i,items:h.filter((function(t){return"number"==typeof t[c]})).map((function(e){return{label:e[u],value:e[c],color:t.model.getFillColor(e[u]),class:t.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.Radar.X_AXIS_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Radar.X_AXIS_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this),i=t.parent.select(".x-axes .x-axis-"+Ba.kebabCase(n)),o=t.parent.selectAll(".dots circle."+Ba.kebabCase(n));i.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(ut.Radar.X_AXIS_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE)}))},e}(Tg),_y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle-pack",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.node").transition("legend-hover-circlepack").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-circlepack"})})).attr("opacity",(function(t){return t.data.dataGroupName===n.datum().name?1:mt.circles.fillOpacity}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.node").transition("legend-mouseout-circlepack").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-circlepack"})})).attr("opacity",1)},e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),r=vg.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getDisplayData(),s=this.model.hasParentNode(),l=this.model.getHierarchyLevel(),u=this.getOptions(),c=Ba.getProperty(u,"canvasZoom","enabled");s&&Ba.getProperty(a,0,"children")&&(a=Ba.getProperty(a,0,"children"));var h=Mm({children:a}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),d=function(){var t=null,e=1,n=1,r=Ym;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Qm(t)).eachAfter($m(r,.5)).eachBefore(Jm(1)):i.eachBefore(Qm(Km)).eachAfter($m(Ym,1)).eachAfter($m(r,i.r/Math.min(e,n))).eachBefore(Jm(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=qm(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Xm(+t),i):r},i}().size([i,o]).padding((function(t){return t.depth>=1?mt.padding.children+3:mt.padding.mainGroup+3}))(h).descendants().splice(1).filter((function(t){return t.depth<=l})),f=n.selectAll("circle.node").data(d);f.exit().attr("width",0).attr("height",0).remove();var p=f.enter().append("circle").classed("node",!0);p.merge(f).attr("class",(function(t){var n=c&&3===l?e.getZoomClass(t):"";return e.model.getColorClassName({classNameTypes:[I.FILL,I.STROKE],dataGroupName:t.data.dataGroupName,originalClassName:t.children?"node "+n:"node node-leaf "+n})})).style("fill",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})).transition("circlepack-leaf-update-enter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"circlepack-leaf-update-enter"})})).attr("r",(function(t){return t.r})).attr("opacity",1).attr("fill-opacity",mt.circles.fillOpacity),!0===c&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,p,vt),this.setBackgroundListeners()),s||this.addLegendListeners(),this.addEventListeners()}},e.prototype.unhighlightChildren=function(t){var e=this,n=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return n.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)}))},e.prototype.highlightChildren=function(t){var e=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return e.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",mt.circles.hover.stroke)},e.prototype.getZoomClass=function(t){return 3===this.model.getHierarchyLevel()&&this.focal&&(t.data===this.focal.data||this.focal.children.some((function(e){return e.data===t.data})))?"focal":"non-focal"},e.prototype.addLegendListeners=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.removeBackgroundListeners=function(){Ha(this.services.domUtils.getMainContainer()).on("click",(function(){return null}))},e.prototype.setBackgroundListeners=function(){var t=Ha(this.services.domUtils.getMainContainer()),e=this,n=this.parent.selectAll("circle.node"),r=Ba.getProperty(Ps,"canvasZoomSettings");t.on("click",(function(){e.focal=null,e.model.updateHierarchyLevel(2),t.classed("zoomed-in",!1),e.services.canvasZoom.zoomOut(n,r)}))},e.prototype.getZoomIcon=function(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">\n\t\t\t<polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>\n\t\t\t<path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>\n\t\t</svg>'},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle.node").on("mouseover",(function(e,n){var r=Ha(this);r.classed("hovered",!0);var i=t.model.getHierarchyLevel(),o=i>2&&!r.classed("focal"),a=Ba.getProperty(t.model.getOptions(),"canvasZoom","enabled"),s=!1;if(!o){var l=[],u=[],c=null;if(n.children)n.depth>1&&a&&(s=!0,r.classed("clickable",!0)),l=n.children.map((function(e){if(null!==e)return"number"==typeof e.data.value?{label:e.data.name,value:e.data.value}:{label:e.data.name,labelIcon:a&&i<=2?t.getZoomIcon():null,value:e.value}})),u=[{label:Hn(t.model.getOptions(),"tooltip.totalLabel")||"Total",value:n.value,bold:!0}],t.highlightChildren(n.children);else c=n.value;var h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,items:L([{color:h,label:n.data.name,labelIcon:s&&a&&i<=2?t.getZoomIcon():null,value:c}],l,u)})}t.services.events.dispatchEvent(ut.CirclePack.CIRCLE_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=Ha(this);t.services.events.dispatchEvent(ut.CirclePack.CIRCLE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("mouseout",(function(e,n){var r=Ha(this);r.classed("hovered",!1),n.children&&t.unhighlightChildren(n.children),t.services.events.dispatchEvent(ut.CirclePack.CIRCLE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})})).on("click",(function(e,n){var r=Ha(this),i=r.classed("non-focal"),o=Ba.getProperty(t.model.getOptions(),"canvasZoom","enabled");if(o&&t.model.getHierarchyLevel()>2){var a=t.parent.selectAll("circle.node");Ha(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(a,vt)}else if(2===n.depth&&n.children&&!i&&o){a=t.parent.selectAll("circle.node");Ha(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=n,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(n,a,vt),e.stopPropagation()}t.services.events.dispatchEvent(ut.CirclePack.CIRCLE_CLICK,{event:e,element:r,datum:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()},e}(Tg),Ey={value:function(){}};function wy(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Oy(r)}function Oy(t){this._=t}function Ty(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Sy(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function My(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ey,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Oy.prototype=wy.prototype={constructor:Oy,on:function(t,e){var n,r=this._,i=Ty(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=My(r[n],t.name,e);else if(null==e)for(n in r)r[n]=My(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Sy(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Oy(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Ay=Object.freeze({__proto__:null,dispatch:wy}).dispatch,Cy=Math.PI/180,Py=function(){var t=[256,256],e=Dy,n=Ly,r=Ry,i=ky,o=ky,a=Iy,s=Ny,l=Gy,u=[],c=1/0,h=Ay("word","end"),d=null,f=Math.random,p={},g=Hy;function v(e,n,r){t[0],t[1];for(var i,o,a,s,u,c=n.x,h=n.y,d=Math.sqrt(t[0]*t[0]+t[1]*t[1]),p=l(t),g=f()<.5?1:-1,v=-g;(i=p(v+=g))&&(o=~~i[0],a=~~i[1],!(Math.min(Math.abs(o),Math.abs(a))>=d));)if(n.x=c+o,n.y=h+a,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1]||r&&Uy(n,e,t[0])||r&&(u=r,!((s=n).x+s.x1>u[0].x&&s.x+s.x0<u[1].x&&s.y+s.y1>u[0].y&&s.y+s.y0<u[1].y)))){for(var m,y=n.sprite,b=n.width>>5,x=t[0]>>5,_=n.x-(b<<4),E=127&_,w=32-E,O=n.y1-n.y0,T=(n.y+n.y0)*x+(_>>5),S=0;S<O;S++){m=0;for(var M=0;M<=b;M++)e[T+M]|=m<<w|(M<b?(m=y[S*b+M])>>>E:0);T+=x}return delete n.sprite,!0}return!1}return p.canvas=function(t){return arguments.length?(g=zy(t),p):g},p.start=function(){var l=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;var n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(g()),m=function(t){var e=[],n=-1;for(;++n<t;)e[n]=0;return e}((t[0]>>5)*t[1]),y=null,b=u.length,x=-1,_=[],E=u.map((function(t,l){return t.text=e.call(this,t,l),t.font=n.call(this,t,l),t.style=i.call(this,t,l),t.weight=o.call(this,t,l),t.rotate=a.call(this,t,l),t.size=~~r.call(this,t,l),t.padding=s.call(this,t,l),t})).sort((function(t,e){return e.size-t.size}));return d&&clearInterval(d),d=setInterval(w,0),w(),p;function w(){for(var e=Date.now();Date.now()-e<c&&++x<b&&d;){var n=E[x];n.x=t[0]*(f()+.5)>>1,n.y=t[1]*(f()+.5)>>1,By(l,n,E,x),n.hasText&&v(m,n,y)&&(_.push(n),h.call("word",p,n),y?Vy(y,n):y=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=t[0]>>1,n.y-=t[1]>>1)}x>=b&&(p.stop(),h.call("end",p,_,y))}},p.stop=function(){return d&&(clearInterval(d),d=null),p},p.timeInterval=function(t){return arguments.length?(c=null==t?1/0:t,p):c},p.words=function(t){return arguments.length?(u=t,p):u},p.size=function(e){return arguments.length?(t=[+e[0],+e[1]],p):t},p.font=function(t){return arguments.length?(n=zy(t),p):n},p.fontStyle=function(t){return arguments.length?(i=zy(t),p):i},p.fontWeight=function(t){return arguments.length?(o=zy(t),p):o},p.rotate=function(t){return arguments.length?(a=zy(t),p):a},p.text=function(t){return arguments.length?(e=zy(t),p):e},p.spiral=function(t){return arguments.length?(l=jy[t]||t,p):l},p.fontSize=function(t){return arguments.length?(r=zy(t),p):r},p.padding=function(t){return arguments.length?(s=zy(t),p):s},p.random=function(t){return arguments.length?(f=t,p):f},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p};function Dy(t){return t.text}function Ly(){return"serif"}function ky(){return"normal"}function Ry(t){return Math.sqrt(t.value)}function Iy(){return 30*(~~(6*Math.random())-3)}function Ny(){return 1}function By(t,e,n,r){if(!e.sprite){var i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);var a=0,s=0,l=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;var c=i.measureText(e.text+"m").width*o,h=e.size<<1;if(e.rotate){var d=Math.sin(e.rotate*Cy),f=Math.cos(e.rotate*Cy),p=c*f,g=c*d,v=h*f,m=h*d;c=Math.max(Math.abs(p+m),Math.abs(p-m))+31>>5<<5,h=~~Math.max(Math.abs(g+v),Math.abs(g-v))}else c=c+31>>5<<5;if(h>l&&(l=h),a+c>=2048&&(a=0,s+=l,l=0),s+h>=2048)break;i.translate((a+(c>>1))/o,(s+(h>>1))/o),e.rotate&&i.rotate(e.rotate*Cy),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=c,e.height=h,e.xoff=a,e.yoff=s,e.x1=c>>1,e.y1=h>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=c}for(var y=i.getImageData(0,0,2048/o,2048/o).data,b=[];--r>=0;)if((e=n[r]).hasText){for(var x=(c=e.width)>>5,_=(h=e.y1-e.y0,0);_<h*x;_++)b[_]=0;if(null==(a=e.xoff))return;s=e.yoff;for(var E=0,w=-1,O=0;O<h;O++){for(_=0;_<c;_++){var T=x*O+(_>>5),S=y[2048*(s+O)+(a+_)<<2]?1<<31-_%32:0;b[T]|=S,E|=S}E?w=O:(e.y0++,h--,O--,s++)}e.y1=e.y0+w,e.sprite=b.slice(0,(e.y1-e.y0)*x)}}}function Uy(t,e,n){n>>=5;for(var r,i=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,l=32-s,u=t.y1-t.y0,c=(t.y+t.y0)*n+(a>>5),h=0;h<u;h++){r=0;for(var d=0;d<=o;d++)if((r<<l|(d<o?(r=i[h*o+d])>>>s:0))&e[c+d])return!0;c+=n}return!1}function Vy(t,e){var n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function Gy(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Hy(){return document.createElement("canvas")}function zy(t){return"function"==typeof t?t:function(){return t}}var jy={archimedean:Gy,rectangular:function(t){var e=4*t[0]/t[1],n=0,r=0;return function(t){var i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}},Fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="wordcloud",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("text.word").transition("legend-hover-wordcloud").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-wordcloud"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.model.getDisplayData(),i=this.getFontSizeScale(r),o=this.getOptions(),a=o.wordCloud,s=a.fontSizeMapsTo,l=a.wordMapsTo,u=o.data.groupMapsTo,c=vg.getSVGElementSize(n,{useAttrs:!0}),h=c.width,d=c.height;if(0!==h&&0!==d){var f=Py().size([h,d]).words(r.map((function(t){var e,n=t[s];if("number"!=typeof t[s])throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return(e={})[u]=t[u],e.text=t[l],e.size=n,e.value=n,e}))).padding(5).rotate(0).fontSize((function(t){return i(t.size)})).on("end",(function(r){var i=vg.appendOrSelect(n,"g.words");i.attr("transform","translate("+f.size()[0]/2+", "+f.size()[1]/2+")");var o=i.selectAll("text").data(r,(function(t){return t[u]+"-"+t.text}));o.exit().attr("opacity",0).remove(),o.enter().append("text").attr("opacity",0).merge(o).style("font-size",(function(t){return t.size+"px"})).text((function(t){return t.text})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t[u],originalClassName:"word "+(t.size>32?"light":"")})})).style("fill",(function(t){return e.model.getFillColor(t[u],t.text,t)})).attr("text-anchor","middle").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"wordcloud-text-update-enter",animate:t})})).attr("transform",(function(t){return"translate("+t.x+", "+t.y+")"})).attr("opacity",1)}));f.start(),this.addEventListeners()}},e.prototype.getFontSizeScale=function(t){var e=this.getOptions(),n=e.wordCloud.fontSizeMapsTo,r=t.map((function(t){return t[n]})).filter((function(t){return t})),i=vg.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=r.length>0,a=o?Rs(r):[1,1];return Mu().domain(a).range(o?e.wordCloud.fontSizeRange(i,t):[4,4])},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this,r=Ba.debounce((function(t){var e=n.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call((function(t){return n.services.transitions.setupTransition({transition:t,name:"wordcloud-word-mouse-highlight"})}));null===t?e.attr("opacity",1):e.attr("opacity",(function(){return t===this?1:.3}))}),6);this.parent.selectAll("text.word").on("mouseover",(function(i,o){r(this),n.services.events.dispatchEvent(ut.WordCloud.WORD_MOUSEOVER,{event:i,element:Ha(this),datum:o}),n.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:i,hoveredElement:this,items:[{label:t.tooltip.wordLabel,value:o.text},{label:t.tooltip.valueLabel,value:o.value},{label:t.tooltip.groupLabel,value:o[e],class:n.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:o[e]})}]})})).on("mousemove",(function(t,e){var r=Ha(this);n.services.events.dispatchEvent(ut.WordCloud.WORD_MOUSEMOVE,{element:r,datum:e}),n.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){n.services.events.dispatchEvent(ut.WordCloud.WORD_CLICK,{event:t,element:Ha(this),datum:e})})).on("mouseout",(function(t,e){var i=Ha(this);r(null),n.services.events.dispatchEvent(ut.WordCloud.WORD_MOUSEOUT,{event:t,element:i,datum:e}),n.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:i})}))},e}(Tg);function Wy(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function qy(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Zy(t){return t.depth}function Yy(t,e){return e-1-t.height}function Xy(t,e){return t.sourceLinks.length?t.depth:e-1}function Ky(t){return function(){return t}}function Qy(t,e){return Jy(t.source,e.source)||t.index-e.index}function $y(t,e){return Jy(t.target,e.target)||t.index-e.index}function Jy(t,e){return t.y0-e.y0}function tb(t){return t.value}function eb(t){return t.index}function nb(t){return t.nodes}function rb(t){return t.links}function ib(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function ob({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function ab(){let t,e,n,r=0,i=0,o=1,a=1,s=24,l=8,u=eb,c=Xy,h=nb,d=rb,f=6;function p(){const t={nodes:h.apply(null,arguments),links:d.apply(null,arguments)};return g(t),v(t),m(t),y(t),b(t),ob(t),t}function g({nodes:t,links:e}){for(const[e,n]of t.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];const r=new Map(t.map((e,n)=>[u(e,n,t),e]));for(const[t,n]of e.entries()){n.index=t;let{source:e,target:i}=n;"object"!=typeof e&&(e=n.source=ib(r,e)),"object"!=typeof i&&(i=n.target=ib(r,i)),e.sourceLinks.push(n),i.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:e,targetLinks:r}of t)e.sort(n),r.sort(n)}function v({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(qy(e.sourceLinks,tb),qy(e.targetLinks,tb)):e.fixedValue}function m({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.depth=i;for(const{target:e}of t.sourceLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function y({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.height=i;for(const{source:e}of t.targetLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function b(n){const u=function({nodes:t}){const n=Wy(t,t=>t.depth)+1,i=(o-r-s)/(n-1),a=new Array(n);for(const e of t){const t=Math.max(0,Math.min(n-1,Math.floor(c.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+s,a[t]?a[t].push(e):a[t]=[e]}if(e)for(const t of a)t.sort(e);return a}(n);t=Math.min(l,(a-i)/(Wy(u,t=>t.length)-1)),function(e){const n=function(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}(e,e=>(a-i-(e.length-1)*t)/qy(e,tb));for(const r of e){let e=i;for(const i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+t;for(const t of i.sourceLinks)t.width=t.value*n}e=(a-e+t)/(r.length+1);for(let t=0;t<r.length;++t){const n=r[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}S(r)}}(u);for(let t=0;t<f;++t){const e=Math.pow(.99,t),n=Math.max(1-e,(t+1)/f);_(u,e,n),x(u,e,n)}}function x(t,n,r){for(let i=1,o=t.length;i<o;++i){const o=t[i];for(const t of o){let e=0,r=0;for(const{source:n,value:i}of t.targetLinks){let o=i*(t.layer-n.layer);e+=M(n,t)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,T(t)}void 0===e&&o.sort(Jy),E(o,r)}}function _(t,n,r){for(let i=t.length-2;i>=0;--i){const o=t[i];for(const t of o){let e=0,r=0;for(const{target:n,value:i}of t.sourceLinks){let o=i*(n.layer-t.layer);e+=A(t,n)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,T(t)}void 0===e&&o.sort(Jy),E(o,r)}}function E(e,n){const r=e.length>>1,o=e[r];O(e,o.y0-t,r-1,n),w(e,o.y1+t,r+1,n),O(e,a,e.length-1,n),w(e,i,0,n)}function w(e,n,r,i){for(;r<e.length;++r){const o=e[r],a=(n-o.y0)*i;a>1e-6&&(o.y0+=a,o.y1+=a),n=o.y1+t}}function O(e,n,r,i){for(;r>=0;--r){const o=e[r],a=(o.y1-n)*i;a>1e-6&&(o.y0-=a,o.y1-=a),n=o.y0-t}}function T({sourceLinks:t,targetLinks:e}){if(void 0===n){for(const{source:{sourceLinks:t}}of e)t.sort($y);for(const{target:{targetLinks:e}}of t)e.sort(Qy)}}function S(t){if(void 0===n)for(const{sourceLinks:e,targetLinks:n}of t)e.sort($y),n.sort(Qy)}function M(e,n){let r=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:i,width:o}of e.sourceLinks){if(i===n)break;r+=o+t}for(const{source:t,width:i}of n.targetLinks){if(t===e)break;r-=i}return r}function A(e,n){let r=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:i,width:o}of n.targetLinks){if(i===e)break;r+=o+t}for(const{target:t,width:i}of e.sourceLinks){if(t===n)break;r-=i}return r}return p.update=function(t){return ob(t),t},p.nodeId=function(t){return arguments.length?(u="function"==typeof t?t:Ky(t),p):u},p.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:Ky(t),p):c},p.nodeSort=function(t){return arguments.length?(e=t,p):e},p.nodeWidth=function(t){return arguments.length?(s=+t,p):s},p.nodePadding=function(e){return arguments.length?(l=t=+e,p):l},p.nodes=function(t){return arguments.length?(h="function"==typeof t?t:Ky(t),p):h},p.links=function(t){return arguments.length?(d="function"==typeof t?t:Ky(t),p):d},p.linkSort=function(t){return arguments.length?(n=t,p):n},p.size=function(t){return arguments.length?(r=i=0,o=+t[0],a=+t[1],p):[o-r,a-i]},p.extent=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],i=+t[0][1],a=+t[1][1],p):[[r,i],[o,a]]},p.iterations=function(t){return arguments.length?(f=+t,p):f},p}var sb=Math.PI,lb=2*sb,ub=lb-1e-6;function cb(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function hb(){return new cb}function db(t){return function(){return t}}function fb(t){return t[0]}function pb(t){return t[1]}cb.prototype=hb.prototype={constructor:cb,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,l=r-e,u=o-t,c=a-e,h=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-l*u)>1e-6&&i){var d=n-o,f=r-a,p=s*s+l*l,g=d*d+f*f,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((sb-Math.acos((p+h-g)/(2*v*m)))/2),b=y/m,x=y/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>u*f)+","+(this._x1=t+x*s)+","+(this._y1=e+x*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,u=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+l+","+u),n&&(h<0&&(h=h%lb+lb),h>ub?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=sb)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var gb=Array.prototype.slice;function vb(t){return t.source}function mb(t){return t.target}function yb(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function bb(){return function(t){var e=vb,n=mb,r=fb,i=pb,o=null;function a(){var a,s=gb.call(arguments),l=e.apply(this,s),u=n.apply(this,s);if(o||(o=a=hb()),t(o,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:db(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:db(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}(yb)}function xb(t){return[t.source.x1,t.y0]}function _b(t){return[t.target.x0,t.y1]}var Eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="alluvial",e.renderType=k.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0});n.html("");var r=vg.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getOptions(),s=this.model.getDisplayData(),l=Ba.getProperty(this.getOptions(),"color","gradient","enabled"),u=St.minNodePadding;a.alluvial.nodePadding>St.minNodePadding&&(u=a.alluvial.nodePadding);var c=Ba.getProperty(a,"alluvial","nodeAlignment"),h=Xy;c===z.LEFT?h=Zy:c===z.RIGHT&&(h=Yy);var d=ab().nodeId((function(t){return t.name})).nodeWidth(St.nodeWidth).nodePadding(u).nodeAlign(h).extent([[2,30],[i-2,o]]);this.graph=d({nodes:a.alluvial.nodes.map((function(t){return Object.assign({},t)})),links:s.map((function(t){return Object.assign({},t)}))}),this.graph.nodes=this.graph.nodes.filter((function(t){return 0!==t.value}));var f={};this.graph.nodes.forEach((function(t){var e,n=t.x0;t.category&&(f[n]=null===(e=t)||void 0===e?void 0:e.category)})),n.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(f)).join("g").attr("transform",(function(t){return"translate("+t+", 0)"})).append("text").attr("id",(function(t,n){return e.services.domUtils.generateElementIDString("alluvial-category-"+n)})).style("font-size","14px").text((function(t){return f[t]?f[t]:""})).attr("y",20).attr("x",(function(t,n){var r=e.services.domUtils.generateElementIDString("alluvial-category-"+n),i=vg.getSVGElementSize(Ha("text#"+r),{useBBox:!0}).width,o=0;return t+o>=i&&(o=4-i),o}));var p=n.append("g").attr("fill","none").selectAll("g").data(this.graph.links);if(p.exit().remove(),l){var g=Ba.getProperty(this.getOptions(),"color","scale");g&&p.enter().append("linearGradient").attr("id",(function(t){return e.gradient_id+"-link-"+t.index})).attr("gradientUnits","userSpaceOnUse").call((function(t){return t.append("stop").attr("offset","0%").attr("stop-color",(function(t){return g[t.source.name]}))})).call((function(t){return t.append("stop").attr("offset","100%").attr("stop-color",(function(t){return g[t.target.name]}))})),p.exit().remove()}p.enter().append("path").classed("link",!0).attr("d",bb().source(xb).target(_b)).attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-line-"+t.index)})).attr("class",(function(t){return a.alluvial.monochrome?e.model.getColorClassName({classNameTypes:[I.STROKE],dataGroupName:0,originalClassName:"link"}):e.model.getColorClassName({classNameTypes:[I.STROKE],dataGroupName:t.source.index,originalClassName:"link"})})).style("stroke",(function(t){return l?"url(#"+e.gradient_id+"-link-"+t.index+")":e.model.getFillColor(t.source.name)})).attr("stroke-width",(function(t){return Math.max(1,t.width)})).style("stroke-opacity",St.opacity.default).attr("aria-label",(function(t){return t.source.name+" → "+t.target.name+" ("+t.value+(a.alluvial.units?" "+a.alluvial.units:"")+")"}));var v=n.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-node-"+t.index)})).classed("node-group",!0).attr("transform",(function(t){return"translate("+t.x0+", "+t.y0+")"}));v.append("rect").classed("node",!0).attr("height",(function(t){return t.y1-t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("fill","black");var m=v.append("g").attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-node-title-"+t.index)}));m.append("text").attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-node-text-"+t.index)})).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text((function(t){return t.name+" ("+t.value+")"})).attr("aria-label",(function(t){return t.name+" ("+t.value+")"})),m.append("rect").classed("node-text-bg",!0).attr("width",(function(t,n){var r=e.services.domUtils.generateElementIDString("alluvial-node-text-"+n);return vg.getSVGElementSize(Ha("text#"+r),{useBBox:!0}).width+8})).attr("height",18).attr("stroke-width",2).lower(),m.attr("transform",(function(t,n){var r=e.services.domUtils.generateElementIDString("alluvial-node-text-"+n),i=vg.getSVGElementSize(Ha("text#"+r),{useBBox:!0}).width,o=(t.y1-t.y0)/2-9,a=t.x1-t.x0;return t.x1>=i?a-=i+16:a+=4,"translate("+a+", "+o+")"})),this.addLineEventListener(),this.addNodeEventListener()}},e.prototype.addLineEventListener=function(){var t=this.getOptions(),e=this,n=Ba.debounce((function(t,n){void 0===n&&(n="mouseover");var r=e.parent.selectAll("path.link").transition().call((function(t){return e.services.transitions.setupTransition({transition:t,name:"alluvial-links-mouse-highlight"})}));"mouseout"===n?(Ha(t).lower(),r.style("stroke-opacity",St.opacity.default)):r.style("stroke-opacity",(function(){return t===this?(Ha(this).raise(),St.opacity.selected):St.opacity.unfocus}))}),33);this.parent.selectAll("path.link").on("mouseover",(function(r,i){var o=Ha(this);n(this,"mouseover"),o.classed("link-hovered",!0);var a=getComputedStyle(this).getPropertyValue("stroke");e.services.events.dispatchEvent(ut.Alluvial.LINE_MOUSEOVER,{event:r,element:o,datum:i}),e.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:i.target.name,value:i.value+(t.alluvial.units?" "+t.alluvial.units:""),color:a,labelIcon:e.getRightArrowIcon()}]})})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(ut.Alluvial.LINE_MOUSEMOVE,{event:t,element:Ha(this),datum:n}),e.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ut.Alluvial.LINE_CLICK,{event:t,element:Ha(this),datum:n})})).on("mouseout",(function(t,r){var i=Ha(this);n(this,"mouseout"),i.classed("link-hovered",!1),e.services.events.dispatchEvent(ut.Alluvial.LINE_MOUSEOUT,{event:t,element:i,datum:r}),e.services.events.dispatchEvent(ut.Tooltip.HIDE,{event:t,hoveredElement:i})}))},e.prototype.addNodeEventListener=function(){var t=this,e=this,n=Ba.debounce((function(n,r){(void 0===n&&(n=[]),void 0===r&&(r="mouseover"),"mouseout"!==r&&0!==n.length)?e.parent.selectAll("path.link").transition().call((function(e){return t.services.transitions.setupTransition({transition:e,name:"alluvial-link-mouse-highlight"})})).style("stroke-opacity",(function(t){return n.some((function(e){return e===t.index}))?(Ha(this).classed("link-hovered",!0).raise(),St.opacity.selected):St.opacity.unfocus})):e.parent.selectAll("path.link").classed("link-hovered",!1).data(t.graph.links,(function(t){return t.index})).order().style("stroke-opacity",St.opacity.default)}),66);e.parent.selectAll(".node-group").on("mouseover",(function(t,r){var i=Ha(this),o=[];if(e.traverse({link:"sourceLinks",node:"target"},r,o),e.traverse({link:"targetLinks",node:"source"},r,o),o.length){var a=Ba.getTranformOffsets(i.attr("transform"));if(i.attr("transform","translate("+(a.x-2)+", "+a.y+")"),i.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),r.x0-2==0){var s=e.services.domUtils.generateElementIDString("alluvial-node-title-"+r.index),l=e.parent.select("g#"+s),u=Ba.getTranformOffsets(l.attr("transform"));l.attr("transform","translate("+(u.x+4)+","+u.y+")")}var c=e.services.domUtils.generateElementIDString("alluvial-node-text-"+r.index);e.parent.select("text#"+c).style("font-weight","bold"),n(o,"mouseover"),e.services.events.dispatchEvent(ut.Alluvial.NODE_MOUSEOVER,{event:t,element:i,datum:r})}})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(ut.Alluvial.NODE_MOUSEMOVE,{event:t,element:Ha(this),datum:n}),e.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ut.Alluvial.NODE_CLICK,{event:t,element:Ha(this),datum:n})})).on("mouseout",(function(t,r){var i=Ha(this),o=Ba.getTranformOffsets(i.attr("transform"));if(i.classed("node-hovered",!1).attr("transform","translate("+(o.x+2)+", "+o.y+")").select("rect.node").attr("width",St.nodeWidth),r.x0-2==0){var a=e.services.domUtils.generateElementIDString("alluvial-node-title-"+r.index),s=e.parent.select("g#"+a),l=Ba.getTranformOffsets(s.attr("transform"));s.attr("transform","translate("+(l.x-4)+","+l.y+")")}var u=e.services.domUtils.generateElementIDString("alluvial-node-text-"+r.index);e.parent.select("text#"+u).style("font-weight","normal"),n([],"mouseout"),e.services.events.dispatchEvent(ut.Alluvial.NODE_MOUSEOUT,{event:t,element:i,datum:r}),e.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:i})}))},e.prototype.traverse=function(t,e,n){var r=this;void 0===n&&(n=[]),e[t.link].map((function(e){return n.push(e.index),e[t.node]})).forEach((function(e){return r.traverse(t,e,n)}))},e.prototype.getRightArrowIcon=function(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" class="arrow-right" width="32" height="32" viewBox="0 0 32 32">\n\t\t\t<polygon points="18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6"/>\n\t\t\t<rect width="32" height="32"/>\n\t\t</svg>'},e.prototype.destroy=function(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)},e}(Tg),wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e.renderType=k.SVG,e.matrix={},e.xBandwidth=0,e.yBandwidth=0,e.translationUnits={x:0,y:0},e.handleAxisOnHover=function(t){var n=t.detail,r=n.datum,i=e.model.getUniqueRanges(),o=e.model.getUniqueDomain(),a=e.services.cartesianScales.getDomainLabel(),s=e.services.cartesianScales.getRangeLabel(),l=e.services.cartesianScales.getMainXScale(),u=e.services.cartesianScales.getMainYScale(),c="",h=null,d=null,f=null;void 0!==e.matrix[r]?(c=a,i.forEach((function(t){if("number"==typeof e.matrix[r][t].value){var n=e.matrix[r][t].value;if(null===h)return h=n,d=n,void(f=n);h+=n,d=n<d?n:d,f=n>f?n:f}}))):(c=s,o.forEach((function(t){if("number"==typeof e.matrix[t][r].value){var n=e.matrix[t][r].value;if(null===h)return h=n,d=n,void(f=n);h+=n,d=n<d?n:d,f=n>f?n:f}}))),void 0!==l(r)?e.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform","translate("+l(r)+", "+Ks(u.range())+")"):void 0!==u(r)&&e.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform","translate("+Ks(l.range())+","+u(r)+")"),e.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:n.event,hoveredElement:Ha(t.detail.element),items:[{label:c,value:r,bold:!0},{label:"Min",value:null!==d?d:"-"},{label:"Max",value:null!==f?f:"-"},{label:"Average",value:null!==h?h/o.length:"-"}]})},e.handleAxisMouseOut=function(t){e.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),e.services.events.dispatchEvent(ut.Tooltip.HIDE,{event:t})},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(ut.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(ut.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(ut.Axis.LABEL_BLUR,this.handleAxisMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0});n.lower();var r=this.services.cartesianScales;if(this.matrix=this.model.getMatrix(),n.html(""),!Ba.getProperty(this.getOptions(),"data","loading")){var i=r.getMainXScale(),o=r.getMainYScale(),a=r.getDomainIdentifier(),s=r.getRangeIdentifier(),l=this.model.getUniqueDomain(),u=this.model.getUniqueRanges(),c=this.model.getMatrixAsArray(),h=i.range(),d=o.range();this.xBandwidth=Math.abs((h[1]-h[0])/l.length),this.yBandwidth=Math.abs((d[1]-d[0])/u.length);var f=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",f).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);var p=n.selectAll().data(c).enter().append("g").attr("class",(function(t){return"heat-"+t.index})).classed("cell",!0).attr("transform",(function(t){return"translate("+i(t[a])+", "+o(t[s])+")"})).append("rect").attr("class",(function(t){return e.model.getColorClassName({value:t.value,originalClassName:"heat-"+t.index})})).classed("heat",!0).classed("null-state",(function(t){return-1===t.index||null===t.value})).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",(function(t){return-1===t.index||null===t.value?"url(#"+f+")":e.model.getFillColor(Number(t.value))})).attr("aria-label",(function(t){return t.value}));this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(d[1]-d[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(h[1]-h[0]),this.yBandwidth),this.determineDividerStatus()&&(p.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}},e.prototype.createOuterBox=function(t,e,n){var r=vg.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);vg.appendOrSelect(r,"line.top").attr("x1",-1).attr("x2",e+1),vg.appendOrSelect(r,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",n+1),vg.appendOrSelect(r,"line.down").attr("x1",-1).attr("x2",e+1).attr("y1",n).attr("y2",n),vg.appendOrSelect(r,"line.right").attr("x1",e).attr("x2",e).attr("y1",-1).attr("y2",n+1)},e.prototype.determineDividerStatus=function(){var t=Ba.getProperty(this.getOptions(),"heatmap","divider","state");return t!==st.OFF&&(t===st.AUTO&&Mt.minCellDividerDimension<=this.xBandwidth&&Mt.minCellDividerDimension<=this.yBandwidth||t===st.ON)},e.prototype.addEventListener=function(){var t=this,e=this.services.cartesianScales,n=Hn(this.getOptions(),"tooltip.totalLabel"),r=e.getDomainIdentifier(),i=e.getRangeIdentifier(),o=e.getDomainLabel(),a=e.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",(function(e,s){var l=Ha(this),u=l.select("rect.heat");if(!u.classed("null-state")){var c=Ba.getTranformOffsets(l.attr("transform"));t.parent.select("g.cell-highlight").attr("transform","translate("+(c.x+t.translationUnits.x)+", "+(c.y+t.translationUnits.y)+")").classed("highlighter-hidden",!1),t.services.events.dispatchEvent(ut.Heatmap.HEATMAP_MOUSEOVER,{event:e,element:u,datum:s}),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,items:[{label:o,value:s[r]},{label:a,value:s[i]},{label:n||"Total",value:s.value,color:u.style("fill")}]})}})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ut.Heatmap.HEATMAP_MOUSEMOVE,{event:e,element:Ha(this),datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Heatmap.HEATMAP_CLICK,{event:e,element:Ha(this),datum:n})})).on("mouseout",(function(e,n){var r=Ha(this).select("rect.heat"),i=r.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),i||(t.services.events.dispatchEvent(ut.Heatmap.HEATMAP_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{event:e,hoveredElement:r}))}))},e.prototype.destroy=function(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)},e}(Tg),Ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getComponentContainer().style("width",(this.configs.size||At.default.size)+"px").style("height",(this.configs.size||At.default.size)+"px").attr("opacity",0)},e}(Tg),Tb=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,a.init(),a}return n(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("div.layout-child-"+this._instanceID).filter((function(t){var e=Ba.getProperty(t,"growth");return e===q.PREFERRED||e===q.FIXED})).each((function(t){e+=t.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("div.layout-child-"+this._instanceID).filter((function(t){return Ba.getProperty(t,"growth")===q.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=vg.getHTMLElementSize(n.node()),i=r.width,o=r.height,a=this.configs.direction===W.ROW||this.configs.direction===W.ROW_REVERSE,s=Ba.getProperty(this.model.getOptions(),"style","prefix"),l=n.classed("cds--"+s+"--layout-row",this.configs.direction===W.ROW).classed("cds--"+s+"--layout-row-reverse",this.configs.direction===W.ROW_REVERSE).classed("cds--"+s+"--layout-column",this.configs.direction===W.COLUMN).classed("cds--"+s+"--layout-column-reverse",this.configs.direction===W.COLUMN_REVERSE).classed("cds--"+s+"--layout-alignitems-center",this.configs.alignItems===Z.CENTER).selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));l.enter().append("div").merge(n.selectAll("div.layout-child-"+this._instanceID)).attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.id})).each((function(e){var n=this;e.components.forEach((function(r){var i=Ha(n),o=Ba.getProperty(e,"renderType")===k.SVG;r.setParent(o?vg.appendOrSelect(i,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):i);var a=Ba.getProperty(e,"growth");a!==q.PREFERRED&&a!==q.FIXED||r.render(t)}))})),n.selectAll("div.layout-child-"+this._instanceID).style("height",null).style("width",null).each((function(t){var e=Ba.getProperty(t,"growth"),n=Ba.getProperty(t,"renderType")===k.SVG?vg.getSVGElementSize(Ha(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):vg.getHTMLElementSize(this);if(e===q.PREFERRED){var r=a?n.width:n.height,s=a?i:o;t.size=r/s*100}})),l.exit().remove(),this.children.filter((function(t){return Ba.getProperty(t,"growth")===q.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()}));var u=n.selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));a?u.style("width",(function(t){return t.size/100*i+"px"})).style("height","100%"):u.style("height",(function(t){return t.size/100*o+"px"})).style("width","100%"),u.each((function(e,n){e.components.forEach((function(n){Ba.getProperty(e,"growth")===q.STRETCH&&n.render(t)}))}))},e.prototype.setModel=function(e){t.prototype.setModel.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setModel(e)}))}))},e.prototype.setServices=function(e){t.prototype.setServices.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setServices(e)}))}))},e.prototype.destroy=function(){this.children.forEach((function(t){t.components.forEach((function(t){return t.destroy()}))}))},e.instanceID=Math.floor(99999999999*Math.random()),e}(Tg),Sb=function(t){function e(e,n,r){var i,o=t.call(this,e,n,r)||this;return o.type="axes",o.renderType=k.SVG,o.truncation=((i={})[N.LEFT]=!1,i[N.RIGHT]=!1,i[N.TOP]=!1,i[N.BOTTOM]=!1,i),r&&(o.configs=r),o.margins=o.configs.margins,o}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i,o=this.configs.position,a=this.getOptions(),s=Ba.getProperty(a,"axes",o,"visible"),l=this.getComponentContainer(),u=vg.getSVGElementSize(l,{useAttrs:!0}),c=u.width,h=u.height,d=vg.appendOrSelect(l,"g.axis."+o);o===N.BOTTOM||o===N.TOP?(n=this.configs.axes[N.LEFT]?this.margins.left:0,i=this.configs.axes[N.RIGHT]?c-this.margins.right:c):(n=h-this.margins.bottom,i=this.margins.top);var f,p=this.services.cartesianScales.getScaleByPosition(o);switch(this.scaleType===G.LABELS||this.scaleType===G.LABELS_RATIO?p.rangeRound([n,i]):p.range([n,i]),o){case N.LEFT:f=Bg;break;case N.BOTTOM:f=Ng;break;case N.RIGHT:f=Ig;break;case N.TOP:f=Rg}d.attr("aria-label",o+" axis");var g=!d.select("g.ticks").empty(),v=vg.appendOrSelect(d,"g.ticks");g||(v.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),v.attr("aria-label",o+" ticks"));var m=vg.appendOrSelect(d,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+o+" ticks"),y=Ba.getProperty(a,"axes",o),b=this.scaleType===G.TIME||y.scaleType===G.TIME,x=o===N.LEFT||o===N.RIGHT,_=this.model.get("zoomDomain");if(_&&b&&!x&&p.domain(_),s){var E=Ba.getProperty(y,"scaleType"),w=Ba.getProperty(a,"data","loading"),O=Ba.getProperty(y,"ticks","number"),T=Ba.getProperty(y,"ticks","values"),S=Ba.getProperty(y,"truncation","type"),M=Ba.getProperty(y,"truncation","threshold"),A=Ba.getProperty(y,"truncation","numCharacter"),C=null!==O,P=Ba.getProperty(a,"timeScale"),D=vg.appendOrSelect(m,"g.tick"),L=vg.appendOrSelect(D,"text").text("0"),k=vg.getSVGElementSize(L.node(),{useBBox:!0}).height;D.remove();var R,I=this.scaleType||y.scaleType||G.LINEAR,B=f(p).tickSizeOuter(0);if(p.ticks){var V=void 0;if(C?V=O:(V=gt.ticks.number,x&&(V=this.getNumberOfFittingTicks(h,k,gt.ticks.verticalSpaceRatio))),1===p.ticks().length&&0===p.ticks()[0]&&(V=0),B.ticks(V),b)if(p.ticks(V).length){var H=Ba.getProperty(a,"timeScale","addSpaceOnEdges"),z=Ba.getProperty(a,"axes",o,"domain"),j=void 0,F=p.copy();H&&!z&&F.nice(V),j=F.ticks(V),H&&j.length>2&&!z&&(j.splice(j.length-1,1),j.splice(0,1)),B.tickValues(j)}else B.tickValues([])}var W=Ba.getProperty(y,"ticks","formatter");if(b){var q=Gp(B.tickValues());R=null===W?function(t,e){return Up(t,e,B.tickValues(),q,P)}:function(t,e){var n=Up(t,e,B.tickValues(),q,P);return W(t,e,n)}}else null===W?I===G.LINEAR&&(R=function(t){return t.toLocaleString()}):R=W;B.tickFormat(R);var Z,Y=this.services.cartesianScales.getScaleByPosition(o).domain(),X=Y[0],K=Y[1];if(T){if(b)T.forEach((function(t,e){void 0===t.getTime&&(T[e]=new Date(t))})),Z=T.filter((function(t){var e=t.getTime();return e>=new Date(X).getTime()&&e<=new Date(K).getTime()}));else if(E===G.LABELS){var Q=this.services.cartesianScales.getScaleByPosition(o).domain();Z=T.filter((function(t){return Q.includes(t)}))}else Z=T.filter((function(t){return t>=X&&t<=K}));B.tickValues(Z)}switch(o){case N.LEFT:v.attr("transform","translate("+this.margins.left+", 0)");break;case N.BOTTOM:v.attr("transform","translate(0, "+(h-this.margins.bottom)+")");break;case N.RIGHT:v.attr("transform","translate("+(c-this.margins.right)+", 0)");break;case N.TOP:v.attr("transform","translate(0, "+this.margins.top+")")}var $=this.model.isDataEmpty();if(y.title){var J=vg.appendOrSelect(d,"text.axis-title").html($||w?"":y.title),tt=Ba.getProperty(y,"titleOrientation");switch(o){case N.LEFT:tt===it.RIGHT?J.attr("transform","rotate(90)").attr("y",0).attr("x",p.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):J.attr("transform","rotate(-90)").attr("y",0).attr("x",-p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case N.BOTTOM:J.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+(h+4)+")").style("text-anchor","middle");break;case N.RIGHT:tt===it.LEFT?J.attr("transform","rotate(-90)").attr("y",c).attr("x",-p.range()[0]/2).style("text-anchor","middle"):J.attr("transform","rotate(90)").attr("y",-c).attr("x",p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case N.TOP:var nt=vg.getSVGElementSize(J,{useBBox:!0}).height;J.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+nt/2+")").style("text-anchor","middle")}}if(b){var rt=Gp(B.tickValues()),ot=P.showDayName,at=v;t&&(v=v.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})}))),v=v.call(B),at.selectAll(".tick").data(B.tickValues(),p).order().select("text").style("font-weight",(function(t,e){return Bp(t,e,B.tickValues(),rt,ot)?"bold":"normal"}))}else v=t&&g?v.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})})).call(B):v.call(B);if(m.call(B),o===N.BOTTOM||o===N.TOP){var st=!1,lt=Ba.getProperty(y,"ticks","rotation");if(lt===et.ALWAYS)st=!0;else if(lt===et.NEVER)st=!1;else if(!lt||lt===et.AUTO)if(p.step){var ut=m.selectAll("g.tick text").nodes();st=ut.some((function(t){return vg.getSVGElementSize(t,{useBBox:!0}).width>=p.step()}))}else{st=!1;var ct,ht=m.append("text").text("A"),dt=vg.getSVGElementSize(ht.node(),{useBBox:!0}).width;m.selectAll("g.tick").each((function(){var t=Ha(this),e=parseFloat(Ba.getProperty(Ba.getTranslationValues(this),"tx"));null!==e&&ct+t.text().length*dt*.8>=e&&(st=!0),ct=e})),ht.remove()}st?(C||(B.ticks(this.getNumberOfFittingTicks(c,k,gt.ticks.horizontalSpaceRatio)),m.call(B),v.call(B)),d.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",o===N.TOP?"start":"end")):d.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(w?d.attr("opacity",0):d.attr("opacity",1),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),m.selectAll("g.tick").attr("aria-label",(function(t){return t})),S!==U.NONE&&E===G.LABELS&&!T){var ft=this.services.cartesianScales.getScaleDomain(o);if(ft.length>0){var pt=l.select("g.axis."+o+" g.ticks g.tick").html();d.selectAll("g.ticks g.tick").html(pt);var vt=this;d.selectAll("g.tick text").data(ft).text((function(t){return t.length>M?(vt.truncation[o]=!0,Ba.truncateLabel(t,S,A)):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(ft).text((function(t){return t.length>M?Ba.truncateLabel(t,S,A):t})),d.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),d.selectAll("g.tick text").data(ft)}}this.addEventListeners()}else v.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=vg.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=Ba.getProperty(r,"axes",e),o=Ba.getProperty(i,"scaleType"),a=Ba.getProperty(i,"truncation","threshold"),s=this;n.selectAll("g.tick text").on("mouseover",(function(t,e){s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEOVER,{event:t,element:Ha(this),datum:e}),o===G.LABELS&&e.length>a&&s.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:t,hoveredElement:Ha(this),content:e})})).on("mousemove",(function(t,e){s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEMOVE,{event:t,element:Ha(this),datum:e}),o===G.LABELS&&e.length>a&&s.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){s.services.events.dispatchEvent(ut.Axis.LABEL_CLICK,{event:t,element:Ha(this),datum:e})})).on("mouseout",(function(t,e){s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEOUT,{event:t,element:Ha(this),datum:e}),o===G.LABELS&&s.services.events.dispatchEvent(ut.Tooltip.HIDE)}))},e.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" g.ticks.invisible")},e.prototype.getTitleRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" text.axis-title")},e.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return Ba.clamp(r,2,gt.ticks.number)},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;vg.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Tg),Mb=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e),t.prototype.destroy.call(this);var n=this.configs.position,r=this.getComponentContainer(),i=vg.appendOrSelect(r,"g.axis."+n),o=this;i.selectAll("g.tick").each((function(t,e){var r=Ha(this);r.classed("tick-hover",!0).attr("tabindex",0===e?0:-1);var i=r.select("text"),a=vg.getSVGElementSize(i,{useBBox:!0}),s=a.width,l=a.height,u=vg.appendOrSelect(r,"rect.axis-holder"),c=0,h=0;switch(n){case N.LEFT:c=-s+Number(i.attr("x")),h=-l/2;break;case N.RIGHT:c=Math.abs(Number(i.attr("x"))),h=-l/2;break;case N.TOP:c=-s/2,h=-l+Number(i.attr("y"))/2,o.truncation[n]&&(c=0,u.attr("transform","rotate(-45)"));break;case N.BOTTOM:c=-s/2,h=l/2-2,o.truncation[n]&&(c=-s,u.attr("transform","rotate(-45)"))}u.attr("x",c-gt.hover.rectanglePadding).attr("y",h).attr("width",s+2*gt.hover.rectanglePadding).attr("height",l).lower()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=vg.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=Ba.getProperty(r,"axes",e),o=Ba.getProperty(i,"scaleType"),a=Ba.getProperty(i,"truncation","threshold"),s=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(t){var e=Ha(this).select("text"),n=e.datum();s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEOVER,{event:t,element:e,datum:n}),o===G.LABELS&&n.length>a&&s.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:t,element:e,datum:n})})).on("mousemove",(function(t){var e=Ha(this).select("text"),n=e.datum();s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEMOVE,{event:t,element:e,datum:n}),s.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t){s.services.events.dispatchEvent(ut.Axis.LABEL_CLICK,{event:t,element:Ha(this).select("text"),datum:Ha(this).select("text").datum()})})).on("mouseout",(function(t){s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEOUT,{event:t,element:Ha(this).select("text"),datum:Ha(this).select("text").datum()}),o===G.LABELS&&s.services.events.dispatchEvent(ut.Tooltip.HIDE)})).on("focus",(function(t){var e={clientX:0,clientY:0};if(t.target){t.target.focus();var n=t.target.getBoundingClientRect();e.clientX=n.x,e.clientY=n.y}s.services.events.dispatchEvent(ut.Axis.LABEL_FOCUS,{event:P(P({},t),e),element:Ha(this),datum:Ha(this).select("text").datum()})})).on("blur",(function(t){s.services.events.dispatchEvent(ut.Axis.LABEL_BLUR,{event:t,element:Ha(this),datum:Ha(this).select("text").datum()})})).on("keydown",(function(t){t.key&&"Escape"===t.key&&(s.services.events.dispatchEvent(ut.Tooltip.HIDE),s.services.events.dispatchEvent(ut.Axis.LABEL_BLUR,{event:t,element:Ha(this),datum:Ha(this).select("text").datum()})),e===N.LEFT||e===N.RIGHT?t.key&&"ArrowUp"===t.key?s.goNext(this,t):t.key&&"ArrowDown"===t.key&&s.goPrevious(this,t):t.key&&"ArrowLeft"===t.key?s.goPrevious(this,t):t.key&&"ArrowRight"===t.key&&s.goNext(this,t)}))},e.prototype.goNext=function(t,e){t.nextElementSibling&&"path"!==t.nextElementSibling.tagName&&t.nextElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()},e.prototype.goPrevious=function(t,e){t.previousElementSibling&&"path"!==t.previousElementSibling.tagName&&t.previousElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;vg.appendOrSelect(t,"g.axis."+e).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)},e}(Sb),Ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.renderType=k.SVG,e.children={},e.thresholds=[],e.margins={top:0,right:0,bottom:0,left:0},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(N),i=Ba.getProperty(this.getOptions(),"axes");r.forEach((function(t){i[N[t]]&&(n[N[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=N[t];if(e.configs.axes[n]&&!e.children[n]){var r={position:n,axes:e.configs.axes,margins:e.margins},i=e.model.axisFlavor===lt.DEFAULT?new Sb(e.model,e.services,r):new Mb(e.model,e.services,r);i.setModel(e.model),i.setServices(e.services),i.setParent(e.parent),e.children[n]=i}})),Object.keys(this.children).forEach((function(n){e.children[n].render(t)}));var o={};Object.keys(this.children).forEach((function(t){var n,r=e.children[t],i=r.configs.position,a=r.getInvisibleAxisRef(),s=vg.getSVGElementSize(a,{useBBox:!0}),l=s.width,u=s.height;switch(r.getTitleRef().empty()?n=0:(n=vg.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i!==N.LEFT&&i!==N.RIGHT||(n+=5)),i){case N.TOP:o.top=u+n;break;case N.BOTTOM:o.bottom=u+n;break;case N.LEFT:o.left=l+n;break;case N.RIGHT:o.right=l+n}})),this.services.events.dispatchEvent(ut.Axis.RENDER_COMPLETE),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(ut.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Tg),Cb={value:()=>{}};function Pb(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Db(r)}function Db(t){this._=t}function Lb(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function kb(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Rb(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Cb,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Db.prototype=Pb.prototype={constructor:Db,on:function(t,e){var n,r=this._,i=Lb(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Rb(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Rb(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=kb(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Db(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};const Ib={capture:!0,passive:!1};function Nb(t){t.preventDefault(),t.stopImmediatePropagation()}function Bb(t){var e=t.document.documentElement,n=Ha(t).on("dragstart.drag",Nb,Ib);"onselectstart"in e?n.on("selectstart.drag",Nb,Ib):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ub(t,e){var n=t.document.documentElement,r=Ha(t).on("dragstart.drag",null);e&&(r.on("click.drag",Nb,Ib),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Vb,Gb,Hb=0,zb=0,jb=0,Fb=0,Wb=0,qb=0,Zb="object"==typeof performance&&performance.now?performance:Date,Yb="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Xb(){return Wb||(Yb(Kb),Wb=Zb.now()+qb)}function Kb(){Wb=0}function Qb(){this._call=this._time=this._next=null}function $b(t,e,n){var r=new Qb;return r.restart(t,e,n),r}function Jb(){Wb=(Fb=Zb.now())+qb,Hb=zb=0;try{!function(){Xb(),++Hb;for(var t,e=Vb;e;)(t=Wb-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Hb}()}finally{Hb=0,function(){var t,e,n=Vb,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Vb=e);Gb=t,ex(r)}(),Wb=0}}function tx(){var t=Zb.now(),e=t-Fb;e>1e3&&(qb-=e,Fb=t)}function ex(t){Hb||(zb&&(zb=clearTimeout(zb)),t-Wb>24?(t<1/0&&(zb=setTimeout(Jb,t-Zb.now()-qb)),jb&&(jb=clearInterval(jb))):(jb||(Fb=Zb.now(),jb=setInterval(tx,1e3)),Hb=1,Yb(Jb)))}function nx(t,e,n){var r=new Qb;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}Qb.prototype=$b.prototype={constructor:Qb,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Xb():+n)+(null==e?0:+e),this._next||Gb===this||(Gb?Gb._next=this:Vb=this,Gb=this),this._call=t,this._time=n,ex()},stop:function(){this._call&&(this._call=null,this._time=1/0,ex())}};var rx=Pb("start","end","cancel","interrupt"),ix=[];function ox(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(l){var u,c,h,d;if(1!==n.state)return s();for(u in i)if((d=i[u]).name===n.name){if(3===d.state)return nx(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[u]):+u<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[u])}if(nx((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(d=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=$b((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:rx,tween:ix,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function ax(t,e){var n=lx(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function sx(t,e){var n=lx(t,e);if(n.state>3)throw new Error("too late; already running");return n}function lx(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ux(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}function cx(t,e){var n,r;return function(){var i=sx(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function hx(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=sx(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function dx(t,e,n){var r=t._id;return t.each((function(){var t=sx(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return lx(t,r).value[e]}}function fx(t,e){var n;return("number"==typeof e?Hl:e instanceof xl?Bl:(n=xl(e))?(e=n,Bl):Wl)(t,e)}function px(t){return function(){this.removeAttribute(t)}}function gx(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vx(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function mx(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function yx(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttribute(t)}}function bx(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function xx(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function _x(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ex(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&_x(t,i)),n}return i._value=e,i}function wx(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&xx(t,i)),n}return i._value=e,i}function Ox(t,e){return function(){ax(this,t).delay=+e.apply(this,arguments)}}function Tx(t,e){return e=+e,function(){ax(this,t).delay=e}}function Sx(t,e){return function(){sx(this,t).duration=+e.apply(this,arguments)}}function Mx(t,e){return e=+e,function(){sx(this,t).duration=e}}function Ax(t,e){if("function"!=typeof e)throw new Error;return function(){sx(this,t).ease=e}}function Cx(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ax:sx;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Px=Ga.prototype.constructor;function Dx(t){return function(){this.style.removeProperty(t)}}function Lx(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function kx(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Lx(t,o,n)),r}return o._value=e,o}function Rx(t){return function(e){this.textContent=t.call(this,e)}}function Ix(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Rx(r)),e}return r._value=t,r}var Nx=0;function Bx(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ux(){return++Nx}var Vx=Ga.prototype;Bx.prototype=function(t){return Ga().transition(t)}.prototype={constructor:Bx,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ko(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,u=r[a],c=u.length,h=o[a]=new Array(c),d=0;d<c;++d)(s=u[d])&&(l=t.call(s,s.__data__,d,u))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,ox(h[d],e,n,d,h,lx(s,n)));return new Bx(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=No(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,u=r[s],c=u.length,h=0;h<c;++h)if(l=u[h]){for(var d,f=t.call(l,l.__data__,h,u),p=lx(l,n),g=0,v=f.length;g<v;++g)(d=f[g])&&ox(d,e,n,g,f,p);o.push(f),a.push(l)}return new Bx(o,a,e,n)},selectChild:Vx.selectChild,selectChildren:Vx.selectChildren,filter:function(t){"function"!=typeof t&&(t=Bo(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],u=0;u<s;++u)(o=a[u])&&t.call(o,o.__data__,u,a)&&l.push(o);return new Bx(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,u=e[s],c=n[s],h=u.length,d=a[s]=new Array(h),f=0;f<h;++f)(l=u[f]||c[f])&&(d[f]=l);for(;s<r;++s)a[s]=e[s];return new Bx(a,this._parents,this._name,this._id)},selection:function(){return new Px(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ux(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,u=0;u<l;++u)if(a=s[u]){var c=lx(a,e);ox(a,t,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Bx(r,this._parents,t,n)},call:Vx.call,nodes:Vx.nodes,node:Vx.node,size:Vx.size,empty:Vx.empty,each:Vx.each,on:function(t,e){var n=this._id;return arguments.length<2?lx(this.node(),n).on.on(t):this.each(Cx(n,t,e))},attr:function(t,e){var n=Ao(t),r="transform"===n?tu:fx;return this.attrTween(t,"function"==typeof e?(n.local?bx:yx)(n,r,dx(this,"attr."+t,e)):null==e?(n.local?gx:px)(n):(n.local?mx:vx)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Ao(t);return this.tween(n,(r.local?Ex:wx)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Jl:fx;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=sa(this,t),a=(this.style.removeProperty(t),sa(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Dx(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=sa(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=sa(this,t)),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}(t,r,dx(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var l=sx(this,t),u=l.on,c=null==l.value[a]?o||(o=Dx(e)):void 0;u===n&&i===c||(r=(n=u).copy()).on(s,i=c),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=sa(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,kx(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(dx(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ix(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=lx(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?cx:hx)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ox:Tx)(e,t)):lx(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Sx:Mx)(e,t)):lx(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ax(e,t)):lx(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;sx(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=sx(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:Vx[Symbol.iterator]};var Gx={time:null,delay:0,duration:250,ease:dt};function Hx(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Ga.prototype.interrupt=function(t){return this.each((function(){ux(this,t)}))},Ga.prototype.transition=function(t){var e,n;t instanceof Bx?(e=t._id,t=t._name):(e=Ux(),(n=Gx).time=Xb(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,u=0;u<l;++u)(a=s[u])&&ox(a,t,e,u,s,n||Hx(a,e));return new Bx(r,this._parents,t,e)};var zx=t=>()=>t;function jx(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Fx(t){t.stopImmediatePropagation()}function Wx(t){t.preventDefault(),t.stopImmediatePropagation()}var qx={name:"drag"},Zx={name:"space"},Yx={name:"handle"},Xx={name:"center"};const{abs:Kx,max:Qx,min:$x}=Math;function Jx(t){return[+t[0],+t[1]]}function t_(t){return[Jx(t[0]),Jx(t[1])]}var e_={name:"x",handles:["w","e"].map(l_),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},n_={name:"y",handles:["n","s"].map(l_),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},r_={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},i_={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},o_={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},a_={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},s_={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function l_(t){return{type:t}}function u_(t){return!t.ctrlKey&&!t.button}function c_(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function h_(){return navigator.maxTouchPoints||"ontouchstart"in this}function d_(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function f_(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function p_(){return function(t){var e,n=c_,r=u_,i=h_,o=!0,a=Pb("start","brush","end"),s=6;function l(e){var n=e.property("__brush",g).selectAll(".overlay").data([l_("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",r_.overlay).merge(n).each((function(){var t=d_(this).extent;Ha(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([l_("selection")]).enter().append("rect").attr("class","selection").attr("cursor",r_.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return r_[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Ha(this),e=d_(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,a,s,l,h,d,f,p,g,v,m,y=this,b=n.target.__data__.type,x="selection"===(o&&n.metaKey?b="overlay":b)?qx:o&&n.altKey?Xx:Yx,_=t===n_?null:a_[b],E=t===e_?null:s_[b],w=d_(y),O=w.extent,T=w.selection,S=O[0][0],M=O[0][1],A=O[1][0],C=O[1][1],P=0,D=0,L=_&&E&&o&&n.shiftKey,k=Array.from(n.touches||[n],t=>{const e=t.identifier;return(t=za(t,y)).point0=t.slice(),t.identifier=e,t});ux(y);var R=c(y,arguments,!0).beforestart();if("overlay"===b){T&&(g=!0);const e=[k[0],k[1]||k[0]];w.selection=T=[[i=t===n_?S:$x(e[0][0],e[1][0]),s=t===e_?M:$x(e[0][1],e[1][1])],[h=t===n_?A:Qx(e[0][0],e[1][0]),f=t===e_?C:Qx(e[0][1],e[1][1])]],k.length>1&&V(n)}else i=T[0][0],s=T[0][1],h=T[1][0],f=T[1][1];a=i,l=s,d=h,p=f;var I=Ha(y).attr("pointer-events","none"),N=I.selectAll(".overlay").attr("cursor",r_[b]);if(n.touches)R.moved=U,R.ended=G;else{var B=Ha(n.view).on("mousemove.brush",U,!0).on("mouseup.brush",G,!0);o&&B.on("keydown.brush",H,!0).on("keyup.brush",z,!0),Bb(n.view)}u.call(y),R.start(n,x.name)}function U(t){for(const e of t.changedTouches||[t])for(const t of k)t.identifier===e.identifier&&(t.cur=za(e,y));if(L&&!v&&!m&&1===k.length){const t=k[0];Kx(t.cur[0]-t[0])>Kx(t.cur[1]-t[1])?m=!0:v=!0}for(const t of k)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,Wx(t),V(t)}function V(t){const e=k[0],n=e.point0;var r;switch(P=e[0]-n[0],D=e[1]-n[1],x){case Zx:case qx:_&&(P=Qx(S-i,$x(A-h,P)),a=i+P,d=h+P),E&&(D=Qx(M-s,$x(C-f,D)),l=s+D,p=f+D);break;case Yx:k[1]?(_&&(a=Qx(S,$x(A,k[0][0])),d=Qx(S,$x(A,k[1][0])),_=1),E&&(l=Qx(M,$x(C,k[0][1])),p=Qx(M,$x(C,k[1][1])),E=1)):(_<0?(P=Qx(S-i,$x(A-i,P)),a=i+P,d=h):_>0&&(P=Qx(S-h,$x(A-h,P)),a=i,d=h+P),E<0?(D=Qx(M-s,$x(C-s,D)),l=s+D,p=f):E>0&&(D=Qx(M-f,$x(C-f,D)),l=s,p=f+D));break;case Xx:_&&(a=Qx(S,$x(A,i-P*_)),d=Qx(S,$x(A,h+P*_))),E&&(l=Qx(M,$x(C,s-D*E)),p=Qx(M,$x(C,f+D*E)))}d<a&&(_*=-1,r=i,i=h,h=r,r=a,a=d,d=r,b in i_&&N.attr("cursor",r_[b=i_[b]])),p<l&&(E*=-1,r=s,s=f,f=r,r=l,l=p,p=r,b in o_&&N.attr("cursor",r_[b=o_[b]])),w.selection&&(T=w.selection),v&&(a=T[0][0],d=T[1][0]),m&&(l=T[0][1],p=T[1][1]),T[0][0]===a&&T[0][1]===l&&T[1][0]===d&&T[1][1]===p||(w.selection=[[a,l],[d,p]],u.call(y),R.brush(t,x.name))}function G(t){if(Fx(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ub(t.view,g),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);I.attr("pointer-events","all"),N.attr("cursor",r_.overlay),w.selection&&(T=w.selection),f_(T)&&(w.selection=null,u.call(y)),R.end(t,x.name)}function H(t){switch(t.keyCode){case 16:L=_&&E;break;case 18:x===Yx&&(_&&(h=d-P*_,i=a+P*_),E&&(f=p-D*E,s=l+D*E),x=Xx,V(t));break;case 32:x!==Yx&&x!==Xx||(_<0?h=d-P:_>0&&(i=a-P),E<0?f=p-D:E>0&&(s=l-D),x=Zx,N.attr("cursor",r_.selection),V(t));break;default:return}Wx(t)}function z(t){switch(t.keyCode){case 16:L&&(v=m=L=!1,V(t));break;case 18:x===Xx&&(_<0?h=d:_>0&&(i=a),E<0?f=p:E>0&&(s=l),x=Yx,V(t));break;case 32:x===Zx&&(t.altKey?(_&&(h=d-P*_,i=a+P*_),E&&(f=p-D*E,s=l+D*E),x=Xx):(_<0?h=d:_>0&&(i=a),E<0?f=p:E>0&&(s=l),x=Yx),N.attr("cursor",r_[b]),V(t));break;default:return}Wx(t)}}function f(t){c(this,arguments).moved(t)}function p(t){c(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=t_(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,r){e.tween?e.on("start.brush",(function(t){c(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){c(this,arguments).end(t)})).tween("brush",(function(){var e=this,r=e.__brush,i=c(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=ql(o,a);function l(t){r.selection=1===t&&null===a?null:s(t),u.call(e),i.brush()}return null!==o&&null!==a?l:l(1)})):e.each((function(){var e=this,i=arguments,o=e.__brush,a=t.input("function"==typeof n?n.apply(e,i):n,o.extent),s=c(e,i).beforestart();ux(e),o.selection=null===a?null:a,u.call(e),s.start(r).brush(r).end(r)}))},l.clear=function(t,e){l.move(t,null,e)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=Ha(this.that).datum();a.call(e,this.that,new jx(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:zx(t_(t)),l):n},l.filter=function(t){return arguments.length?(r="function"==typeof t?t:zx(!!t),l):r},l.touchable=function(t){return arguments.length?(i="function"==typeof t?t:zx(!!t),l):i},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=a.on.apply(a,arguments);return t===a?l:t},l}(e_)}var g_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",e.renderType=k.SVG,e.selectionSelector="rect.selection",e.frontSelectionSelector="rect.frontSelection",e}return n(e,t),e.prototype.render=function(t){var n=this,r=this.parent,i=this.getComponentContainer(),o=vg.appendOrSelect(r,"svg.chart-grid-backdrop"),a=vg.appendOrSelect(o,"g."+this.type),s=vg.appendOrSelect(a,this.selectionSelector),l=vg.getSVGElementSize(o,{useAttrs:!0}),u=l.width,c=l.height,h=this.services.cartesianScales,d=h.getMainXScaleType(),f=h.getMainXScale(),p=f.range(),g=p[0];p[1];i.attr("transform","translate("+g+",0)");var v=vg.appendOrSelect(i,this.frontSelectionSelector);if(f&&d===G.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain())&&this.model.set({zoomDomain:m},{animate:!1});var y=function(t,e){var r=Ch().range([0,u]).domain(m),i=[r.invert(t),r.invert(e)];i[0].valueOf()===i[1].valueOf()&&(i=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===i[0].valueOf()&&m[1].valueOf()===i[1].valueOf()||n.services.zoom.handleDomainChange(i)},b=p_().extent([[0,0],[u-1,c]]).on("start brush end",(function(t){var n=t.selection;null!==n&&n[0]!==n[1]&&(v.attr("x",parseFloat(s.attr("x"))+parseFloat(o.attr("x"))).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),function(t){for(var n=t[1]-t[0],r="0,"+n.toString(),i=Math.floor(c/e.DASH_LENGTH),o=i*e.DASH_LENGTH,a=0;a<i;a++)r+=","+e.DASH_LENGTH;r+=","+(c-o),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+c.toString(),v.attr("stroke-dasharray",r)}(n))})).on("end.brushed",(function(t){var e=t.selection;null!==e&&(y(e[0],e[1]),a.call(b.move,null),v.style("display","none"))}));a.call(b);var x=this.services.zoom.getZoomRatio();o.on("click",(function(t){if(t.shiftKey){var e=this.services.domUtils.getHolder(),n=za(a.node(),e)[0],r=n-u*x/2;r<0&&(r=0);var i=n+u*x/2;i>u&&(i=u),y(r,i)}}))}},e.DASH_LENGTH=4,e}(Tg),v_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=Ba.getProperty(this.getOptions(),"grid","x","enabled"),n=Ba.getProperty(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(vg.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(vg.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("height"),i=Ng(this.services.cartesianScales.getMainXScale()).tickSizeInner(-r).tickSizeOuter(0);if(Ba.getProperty(this.getOptions(),"grid","x","alignWithAxisTicks")){var o=this.services.cartesianScales.getDomainAxisPosition(),a=Ba.getProperty(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=Ba.getProperty(this.getOptions(),"grid","x","numberOfTicks");i.ticks(s)}var l=n.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+r+")");t?l.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):l.call(i),this.cleanGrid(l)},e.prototype.drawYGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("width"),i=Bg(this.services.cartesianScales.getMainYScale()).tickSizeInner(-r).tickSizeOuter(0);if(Ba.getProperty(this.getOptions(),"grid","y","alignWithAxisTicks")){var o=this.services.cartesianScales.getRangeAxisPosition(),a=Ba.getProperty(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=Ba.getProperty(this.getOptions(),"grid","y","numberOfTicks");i.ticks(s)}var l=n.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");t?l.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):l.call(i),this.cleanGrid(l)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(Ba.getTranslationValues(t).tx)-Number(Ba.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+Ba.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var o,a=r[i],s=r[e];if(a)if(s)o=+Ba.getTranslationValues(s).tx-+Ba.getTranslationValues(a).tx;else{var l=n.select("rect.chart-grid-backdrop").node();o=vg.getSVGElementSize(l).width-+Ba.getTranslationValues(a).tx}else o=+Ba.getTranslationValues(s).tx;return o*this.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=Ba.getProperty(this.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Ba.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(t,e){var n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],s=o[1],l=i.range(),u=l[0],c=l[1];this.backdrop=vg.appendOrSelect(n,"svg.chart-grid-backdrop");var h=vg.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",a).attr("y",c).attr("width",Math.abs(s-a)).attr("height",Math.abs(u-c)).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){t.selectAll("text").remove(),t.select(".domain").remove()},e}(Tg);var m_,y_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.renderType=k.SVG,e.isXGridEnabled=Ba.getProperty(e.getOptions(),"grid","x","enabled"),e.isYGridEnabled=Ba.getProperty(e.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=Ba.getProperty(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()},e.prototype.removeBackdropEventListeners=function(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)},e.prototype.formatTooltipData=function(t){return t},e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.services.cartesianScales.getOrientation(),s=this.model.getDisplayData(),l=this.services.cartesianScales.getRangeScale().range(),u=l[0],c=l[1],h=a===V.HORIZONTAL?i:r,d=vg.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),f=vg.appendOrSelect(d,"line.ruler-line"),p=o.selectAll("[role=graphics-symbol]"),g=s.map((function(t){return{domainValue:n.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,h)}));if(this.pointsWithinLine&&g.length===this.pointsWithinLine.length&&g.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=g,this.services.events.dispatchEvent(ut.Tooltip.MOVE,{mousePosition:[r,i]});this.pointsWithinLine=g;var v=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(h-e.domainValue),i=Math.abs(h-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(v.length>0){var m=v.map((function(t){return t.originalData})).filter((function(t){var e=t[n.services.cartesianScales.getRangeIdentifier(t)];return null!=e})),y=v.map((function(t){return t.domainValue})),b=p.filter((function(t){var e=n.services.cartesianScales.getDomainValue(t);return y.includes(e)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Ba.isEqual(this.elementsToHighlight,b)&&this.hideRuler(),b.dispatch("mouseover"),this.elementsToHighlight=b,this.services.events.dispatchEvent(ut.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:f,data:this.formatTooltipData(m)}),d.attr("opacity",1);var x=v[0];"horizontal"===a?f.attr("x1",c).attr("x2",u).attr("y1",x.domainValue).attr("y2",x.domainValue):f.attr("y1",c).attr("y2",u).attr("x1",x.domainValue).attr("x2",x.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=vg.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(ut.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.services.domUtils.getHolder(),n=this.model.getDisplayData(),r=function(e){var n=za(e,t.parent.node());t.showRuler(e,n)};if(n.length>100){var i=n.length%50*12.5;r=Ba.debounceWithD3MousePosition((function(e){var n=this.mousePosition;t.showRuler(e,n)}),i,e)}this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent;this.backdrop=vg.appendOrSelect(t,"svg.chart-grid-backdrop")},e}(Tg),b_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler-binned",e.renderType=k.SVG,e}return n(e,t),e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.model.getOptions(),s=this.services.cartesianScales.getOrientation(),l=this.services.cartesianScales.getRangeScale().range(),u=l[0],c=l[1],h=this.services.cartesianScales.getDomainScale(),d=h.invert(s===V.VERTICAL?r:i),f=vg.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),p=vg.appendOrSelect(f,"line.ruler-line"),g=o.selectAll("[role=graphics-symbol]").filter((function(t){if(parseFloat(Hn(t,"data.x0"))<=d&&parseFloat(Hn(t,"data.x1"))>=d)return!0}));if(g.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Ba.isEqual(this.elementsToHighlight,g)&&this.hideRuler(),g.dispatch("mouseover"),this.elementsToHighlight=g;var v=Ha(g.nodes()[0]).datum(),m=parseFloat(Hn(v,"data.x0")),y=parseFloat(Hn(v,"data.x1")),b=this.model.getActiveDataGroupNames(),x=b.reverse().map((function(t){return{label:t,value:Hn(v,"data."+t),class:n.model.getColorClassName({classNameTypes:[I.TOOLTIP],dataGroupName:t})}})).filter((function(t){return 0!==t.value}));if(x.length>0){this.services.events.dispatchEvent(ut.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:p,items:L([{label:Hn(a,"bins.rangeLabel")||"Range",value:m+" – "+y}],x,!0===Ba.getProperty(a,"tooltip","showTotal")?[{label:Hn(a,"tooltip.totalLabel")||"Total",value:b.reduce((function(t,e){return t+parseFloat(Hn(v,"data."+e))}),0)}]:[])}),f.attr("opacity",1);var _=h((m+y)/2);"horizontal"===s?p.attr("x1",c).attr("x2",u).attr("y1",_).attr("y2",_):p.attr("y1",c).attr("y2",u).attr("x1",_).attr("x2",_)}else this.hideRuler()}else this.hideRuler()},e}(y_),x_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e}(y_),__=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.renderType=k.HTML,e}return n(e,t),e.prototype.init=function(){var t=this,e=function(){return t.updateOverflowMenu(!1)};this.services.events.addEventListener(ut.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(ut.Toolbar.HIDE_OVERFLOW_MENU,(function(){document.body.removeEventListener("click",e)}))},e.prototype.render=function(t){var e=this,n=this.getComponentContainer().attr("role","toolbar").attr("aria-label","chart-"+this.services.domUtils.getChartID()+" toolbar");if(Ba.getProperty(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));var r=this.getControlConfigs(),i=r.buttonList;r.overflowMenuItemList&&i.push(this.getOverflowButtonConfig());var o=n.selectAll("div.toolbar-control").data(i,(function(t){return t.id}));o.exit().remove();var a=o.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),s=this;a.merge(o).classed("disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-label",(function(t){return t.title})).html((function(t){return'\n\t\t\t<button\n\t\t\t\tclass="cds--overflow-menu__trigger cds--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="'+e.services.domUtils.generateElementIDString("control-"+t.id)+'" aria-label="'+t.title+'">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t'+t.iconSVG.content+"\n\t\t\t\t</svg>\n\t\t\t</button>"})).each((function(t,e){var n=this;Ha(this).select("svg").style("will-change","transform").style("width",void 0!==t.iconSVG.width?t.iconSVG.width:"20px").style("height",void 0!==t.iconSVG.height?t.iconSVG.height:"20px"),Ha(this).select("button").on("click",(function(e){t.shouldBeDisabled()||s.triggerFunctionAndEvent(t,e,n)})).on("keydown",(function(r){r.key&&"Enter"===r.key||" "===r.key?(r.preventDefault(),s.triggerFunctionAndEvent(t,r,n)):r.key&&"ArrowLeft"===r.key?s.focusOnPreviousEnabledToolbarItem(e):r.key&&"ArrowRight"===r.key&&s.focusOnNextEnabledToolbarItem(e)}))}));this.overflowButton=this.getComponentContainer().select("button.cds--overflow-menu__trigger#"+this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu"))}},e.prototype.renderOverflowMenu=function(){var t=this,e=this.getControlConfigs().overflowMenuItemList,n=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(e,(function(t){return Ba.getProperty(t,"id")}));n.exit().remove();var r=n.enter().append("li").attr("id",(function(e){return t.services.domUtils.generateElementIDString("control-"+e.id)})).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);r.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),r.merge(n).classed("cds--overflow-menu-options__option--disabled",(function(t){return t.shouldBeDisabled()})).classed("cds--overflow-menu-options__option--disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-disabled",(function(t){return t.shouldBeDisabled()})).selectAll("button").text((function(t){return t.text}))},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.classed("is-open")},e.prototype.updateOverflowMenu=function(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),Ha(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(ut.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(ut.Toolbar.HIDE_OVERFLOW_MENU))},e.prototype.focusOnPreviousEnabledToolbarItem=function(t){for(var e=this.getToolbarButtonItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=Ha("button#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)).node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledToolbarItem=function(t){for(var e=this.getToolbarButtonItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=Ha("button#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)).node();"focus"in i&&i.focus()}},e.prototype.focusOnPreviousEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=Ha("#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)+" button").node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=Ha("#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)+" button").node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(t){var e=this;if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var n=this;this.getOverflowMenuItems().forEach((function(r,i){var o=Ha("#"+e.services.domUtils.generateElementIDString("control-"+r.id));null!==o&&(o.on("click",(function(){n.triggerFunctionAndEvent(r,t,o.node()),n.updateOverflowMenu(!1)})),o.on("keydown",(function(e){e&&"Enter"===e.key?n.triggerFunctionAndEvent(r,t,o.node()):e&&"ArrowUp"===e.key?n.focusOnPreviousEnabledMenuItem(i):e&&"ArrowDown"===e.key?n.focusOnNextEnabledMenuItem(i):e&&"Escape"===e.key&&n.updateOverflowMenu(!1),e.preventDefault()})))})),n.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()},e.prototype.triggerFunctionAndEvent=function(t,e,n){"function"==typeof t.shouldBeDisabled&&t.shouldBeDisabled()||("function"==typeof t.clickFunction&&t.clickFunction(e),this.services.events.dispatchEvent(ut.Toolbar.BUTTON_CLICK,{control:t,event:e,element:n}))},e.prototype.getControlConfigs=function(){var t=this,n=Ba.getProperty(this.getOptions(),"toolbar","numberOfIcons")-1,r=Ba.getProperty(this.getOptions(),"toolbar","controls"),i=[],o=[],a=[];return r.forEach((function(r){var s=null;r.type===rt.CUSTOM?(null===Ba.getProperty(r,"id")&&(r.id="toolbar-button-"+e.buttonID++),null===Ba.getProperty(r,"shouldBeDisabled")&&(r.shouldBeDisabled=function(){return!1}),s=r):s=t.getControlConfigByType(r.type),s&&(s.text=r.text?r.text:r.type,-1!==s.id.indexOf("toolbar-export")?i.push(s):o.length<n?null===Ba.getProperty(s,"iconSVG","content")?a.push(s):o.push(s):a.push(s))})),a.push.apply(a,i),a.length?{buttonList:o,overflowMenuItemList:a}:{buttonList:o}},e.prototype.getToolbarButtonItems=function(){var t=this.getControlConfigs(),e=t.buttonList;return t.overflowMenuItemList&&e.push(this.getOverflowButtonConfig()),e||[]},e.prototype.getOverflowMenuItems=function(){var t=this.getControlConfigs().overflowMenuItemList;return t||[]},e.prototype.getOverflowButtonConfig=function(){var t=this;return{id:"toolbar-overflow-menu",title:"More options",shouldBeDisabled:function(){return!1},iconSVG:{content:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="24" r="2"></circle>'},clickFunction:function(e){return t.toggleOverflowMenu(e)}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),i=this.model.getDisplayData();switch(t){case rt.ZOOM_IN:r&&(e={id:"toolbar-zoomIn",title:"Zoom in",shouldBeDisabled:function(){return n.services.zoom.isMinZoomDomain()},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.zoom.zoomIn()}});break;case rt.ZOOM_OUT:r&&(e={id:"toolbar-zoomOut",title:"Zoom out",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.zoom.zoomOut()}});break;case rt.RESET_ZOOM:r&&(e={id:"toolbar-resetZoom",title:"Reset zoom",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.zoom.resetZoomDomain()}});break;case rt.MAKE_FULLSCREEN:e={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:"Make fullscreen",shouldBeDisabled:function(){return!1},clickFunction:function(){n.services.domUtils.toggleFullscreen()}};break;case rt.SHOW_AS_DATATABLE:e={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:"Show as table",shouldBeDisabled:function(){return 0===i.length},clickFunction:function(){return n.services.events.dispatchEvent(ut.Modal.SHOW)}};break;case rt.EXPORT_CSV:e={id:"toolbar-export-CSV",title:"Export as CSV",shouldBeDisabled:function(){return!1},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.model.exportToCSV()}};break;case rt.EXPORT_PNG:e={id:"toolbar-export-PNG",title:"Export as PNG",shouldBeDisabled:function(){return!1},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.domUtils.exportToPNG()}};break;case rt.EXPORT_JPG:e={id:"toolbar-export-JPG",title:"Export as JPG",shouldBeDisabled:function(){return!1},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.domUtils.exportToJPG()}};break;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case rt.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case rt.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case rt.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case rt.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case rt.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case rt.EXPORT_CSV:case rt.EXPORT_JPG:case rt.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}},e.buttonID=0,e}(Tg),E_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),r=this.services.cartesianScales.getScaleByPosition(n),i=r.domain(),o=i[0],a=i[1],s=o>0&&a<0||o<0&&a>0,l=this.getComponentContainer();if(s){var u=this.services.cartesianScales.getDomainScale().range(),c=u[0],h=u[1],d=+r(0)+.5;d||(d=r.range()[0]);var f=Ba.flipSVGCoordinatesBasedOnOrientation({x0:c,x1:h,y0:d,y1:d},this.services.cartesianScales.getOrientation());vg.appendOrSelect(l,"line.domain").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"zero-line-update",animate:t})})).attr("y1",f.y0).attr("y2",f.y1).attr("x1",f.x0).attr("x2",f.x1)}else l.selectAll("line.domain").remove()},e}(Tg),w_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.renderType=k.SVG,e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=p_(),e.highlightStrokeWidth=1,e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(ut.ZoomBar.UPDATE,this.render.bind(this));var t=Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),r=this.services.zoom.isZoomBarLoading(N.TOP),i=this.services.zoom.isZoomBarLocked(N.TOP),o=Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"type"),a=Ba.getProperty(this.getOptions(),"axes",N.BOTTOM,"highlights"),s=Dt.height[o],l=vg.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(0!==l){var u=0,c=this.model.get("axesMargins");c&&c.left&&(u=c.left);var h=vg.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",s).attr("opacity",1);vg.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",s).attr("width","100%").attr("height",Dt.spacerHeight).attr("opacity",1).attr("fill","none");if(o===B.GRAPH_VIEW?vg.appendOrSelect(h,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",l-u).attr("height","100%").classed("zoom-bg-skeleton",r).style("stroke",r?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null):o===B.SLIDER_VIEW&&vg.appendOrSelect(h,"rect.zoom-slider-bg").attr("x",u).attr("y",s/2-1).attr("width",l-u).attr("height",2).classed("zoom-slider-bg-skeleton",r).style("stroke",r?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null),r)this.renderSkeleton(h,u,l);else{var d=this.services.cartesianScales,f=d.getMainXScale(),p=d.getMainYScale(),g=d.getMainXScaleType();if(f&&g===G.TIME){var v=this.services.zoom.getZoomBarData();if(Ba.isEmpty(v)||1===v.length)return;this.xScale=f.copy(),this.yScale=p.copy();var m=this.services.zoom.getDefaultZoomBarDomain(v);v=this.compensateDataForDefaultDomain(v,m);var y=this.model.get("initialZoomDomain"),b=Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"initialZoomDomain");b&&b[0]&&b[1]&&(b[0]=new Date(b[0]),b[1]=new Date(b[1])),!b||y&&y[0].valueOf()===b[0].valueOf()&&y[1].valueOf()===b[1].valueOf()?null===b&&null!==y&&this.model.set({initialZoomDomain:null,zoomDomain:Ba.merge([],m)},{skipUpdate:!0}):this.model.set({initialZoomDomain:Ba.merge([],b),zoomDomain:b?Ba.merge([],b):m},{skipUpdate:!0}),this.xScale.range([u,l]).domain(m),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,s-6]).domain(Rs(v,(function(t){return t.value})));var x=this.model.get("zoomDomain");if(o===B.GRAPH_VIEW&&(this.renderZoomBarArea(h,"path.zoom-graph-area-unselected",v,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(h,"path.zoom-graph-area",v,this.clipId),this.renderZoomBarBaseline(h,u,l),a)){var _=a.highlightStartMapsTo,E=a.highlightEndMapsTo,w=a.color,O=a.labelMapsTo;a.data.forEach((function(t,n){vg.appendOrSelect(h,"rect.highlight-"+n).attr("height",s-2*e.highlightStrokeWidth).attr("y",e.highlightStrokeWidth).attr("x",e.xScale(t[_])).attr("width",e.xScale(t[E])-e.xScale(t[_])).style("fill",w&&w.scale[t[O]]?w.scale[t[O]]:null).style("fill-opacity",.1).style("stroke",w&&w.scale[t[O]]?w.scale[t[O]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(x,u,l);var T=vg.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===x);else if(x[0].valueOf()===x[1].valueOf())T.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range(),this.xScale.domain());else{var S=x.map((function(t){return e.xScale(t)}));S[1]-S[0]<this.MIN_SELECTION_DIFF||(T.call(this.brush.move,S),this.updateBrushHandle(this.getComponentContainer(),S,x))}i&&(this.brush.filter((function(){return!1})),T.selectAll("rect").attr("cursor","auto"))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"type"),o=Dt.height[i];this.brush.extent([[e,0],[n,o]]).on("start brush end",null).on("start brush end",(function(e){var n=e.selection;null===n?r.handleBrushedEvent(e,t,r.xScale,r.xScale.range()):n[0]===n[1]||r.handleBrushedEvent(e,t,r.xScale,n)}))},e.prototype.handleBrushedEvent=function(t,e,n,r){var i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r,i),null!=t.sourceEvent&&("mousemove"===t.sourceEvent.type||"mouseup"===t.sourceEvent.type||"mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type||"touchmove"===t.sourceEvent.type||"touchend"===t.sourceEvent.type)){void 0!==e&&e[0]===i[0]&&e[1]===i[1]||this.services.zoom.handleDomainChange(i,{dispatchEvent:!1});var o=void 0;"start"===t.type?o=ut.ZoomBar.SELECTION_START:"brush"===t.type?o=ut.ZoomBar.SELECTION_IN_PROGRESS:"end"===t.type&&(o=ut.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(ut.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(o,{selection:r,newDomain:i})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=Dt.handleWidth,o=Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"type"),a=Dt.height[o],s=-i/2,l=Dt.handleBarWidth,u=o===B.GRAPH_VIEW?Dt.handleBarHeight:6,c=-l/2,h=(a-u)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,r.maxSelectionRange[1]-i):void 0})).attr("y",0).attr("width",i).attr("height",a).attr("cursor","ew-resize").style("display",null);var d=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);d.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),d.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,r.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,r.maxSelectionRange[1]+s+c):void 0})).attr("y",h).attr("width",l).attr("height",u).attr("cursor","ew-resize"),o===B.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],a)},e.prototype.updateSliderSelectedArea=function(t){var e=Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"type"),n=Dt.height[e],r=(vg.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getComponentContainer().select("svg.zoom-container");vg.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)},e.prototype.renderZoomBarArea=function(t,e,n,r){var i=this.services.cartesianScales,o=i.getMainXAxisPosition(),a=i.getMainYAxisPosition(),s=i.getMainXScaleType(),l=i.getMainYScaleType(),u=function(t,e,n){return function(r,o){return i.getValueFromScale(t,e,n,r,o)}},c=u(this.xScale,s,o),h=u(this.yScale,l,a),d=Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"type"),f=Dt.height[d],p=ud().x((function(t,e){return c(t,e)})).y0(f).y1((function(t,e){return f-h(t,e)})),g=vg.appendOrSelect(t,e).datum(n).attr("d",p);r&&g.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,o){var a=vg.appendOrSelect(t,"clipPath").attr("id",e);vg.appendOrSelect(a,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=Ba.clone(t),i=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(r[0][i]))(n={})[i]=e[0],n[o]=0,r.unshift(n);if(Number(e[1])>Number(r[r.length-1][i]))(n={})[i]=e[1],n[o]=0,r.push(n);return r}},e.prototype.renderZoomBarBaseline=function(t,e,n,r){void 0===r&&(r=!1);var i=Ba.getProperty(this.model.getOptions(),"zoomBar",N.TOP,"type"),o=Dt.height[i],a=ld()([[e,o],[n,o]]);vg.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",a).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.renderSkeleton=function(t,e,n){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),vg.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"type")===B.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(ut.ZoomBar.UPDATE,this.render.bind(this))},e}(Tg),O_=function(){function t(t,e){this.services={domUtils:vg,files:yg,events:mg,gradientUtils:xg,transitions:bg,canvasZoom:Og},this.model=new Wp(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener(ut.Model.UPDATE,(function(t){var e=!!Ba.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(ut.Chart.RESIZE,(function(){n.update(!1)})),this.components=this.getComponents(),this.update()},t.prototype.getComponents=function(){return console.error("getComponents() method is not implemented"),null},t.prototype.update=function(t){var e=this;if(void 0===t&&(t=!0),this.components){Object.keys(this.services).forEach((function(t){e.services[t].update()})),this.components.forEach((function(e){return e.render(t)}));var n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map((function(t){return n[t].end().catch((function(t){return t}))}));Promise.all(r).then((function(){return e.services.events.dispatchEvent(ut.Chart.RENDER_FINISHED)}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})},t.prototype.getChartComponents=function(t,e){var n=this.model.getOptions(),r=Ba.getProperty(n,"toolbar","enabled"),i={id:"legend",components:[new Sg(this.model,this.services)],growth:q.PREFERRED},o=Ba.getProperty(n,"canvasZoom","enabled");o&&!0===o&&t.push(new tm(this.model,this.services));var a=!!this.model.getOptions().title,s={id:"title",components:[new Xv(this.model,this.services)],growth:q.STRETCH},l={id:"toolbar",components:[new __(this.model,this.services)],growth:q.PREFERRED},u={id:"header",components:[new Tb(this.model,this.services,L([s],r?[l]:[]),{direction:W.ROW,alignItems:Z.CENTER})],growth:q.PREFERRED},c={id:"graph-frame",components:t,growth:q.STRETCH,renderType:Ba.getProperty(e,"graphFrameRenderType")||k.SVG},h=!0!==Ba.getProperty(e,"excludeLegend")&&!1!==n.legend.enabled,d=W.COLUMN;if(h){var f=Ba.getProperty(n,"legend","position");"left"===f?(d=W.ROW,n.legend.orientation||(n.legend.orientation=j.VERTICAL)):"right"===f?(d=W.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=j.VERTICAL)):"bottom"===f&&(d=W.COLUMN_REVERSE)}var p={id:"spacer",components:[new Ob(this.model,this.services)],growth:q.PREFERRED},g={id:"full-frame",components:[new Tb(this.model,this.services,L(h?[i]:[],h?[p]:[],[c]),{direction:d})],growth:q.STRETCH},v=[];if(a||r){v.push(u);var m={id:"spacer",components:[new Ob(this.model,this.services,r?{size:15}:void 0)],growth:q.PREFERRED};v.push(m)}return v.push(g),[new Qv(this.model,this.services),new Fv(this.model,this.services),new Tb(this.model,this.services,v,{direction:W.COLUMN})]},t}(),T_=function(t){function e(e){var n=t.call(this,e)||this;return n.axisFlavor=lt.DEFAULT,n}return n(e,t),e.prototype.assignRangeAndDomains=function(){var t=this.services.cartesianScales,e=this.getOptions(),n=t.isDualAxes(),r={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=t.secondaryDomainAxisPosition,r.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(r).forEach((function(n){var i=r[n];t.scales[i]?r[n]={position:i,label:t.getScaleLabel(i),identifier:Ba.getProperty(e,"axes",i,"mapsTo")}:r[n]=null})),r},e.prototype.getTabularDataArray=function(){var t,e=this.getDisplayData(),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales,i=this.assignRangeAndDomains(),o=i.primaryDomain,a=i.primaryRange,s=i.secondaryDomain,l=i.secondaryRange;return r.getDomainAxisScaleType()===G.TIME&&(t=function(t){return Ap(t,"MMM d, yyyy")}),L([L(["Group",o.label,a.label],s?[s.label]:[],l?[l.label]:[])],e.map((function(e){return L([e[n],null===e[o.identifier]?"–":t?t(e[o.identifier]):e[o.identifier],null===e[a.identifier]||isNaN(e[a.identifier])?"–":e[a.identifier].toLocaleString()],s?[null===e[s.identifier]?"–":e[s.identifier]]:[],l?[null===e[l.identifier]||isNaN(e[l.identifier])?"–":e[l.identifier]]:[])})))},e.prototype.setData=function(e){var n;if(e&&(n=t.prototype.setData.call(this,e),Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"enabled"))){var r=Ba.getProperty(this.getOptions(),"zoomBar",N.TOP,"data");this.setZoomBarData(r)}return n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(Ba.clone(t)):this.getDisplayData(),n=e,r=this.services.cartesianScales;if(e&&r.domainAxisPosition&&r.rangeAxisPosition){var i=r.getDomainIdentifier(),o=r.getRangeIdentifier(),a=e.map((function(t){return t[i].getTime()}));n=(a=Ba.removeArrayDuplicates(a).sort()).map((function(t){var n=0,r={};return e.forEach((function(e){e[i].getTime()===t&&(n+=e[o])})),r[i]=new Date(t),r[o]=n,r}))}this.set({zoomBarData:n})},e.prototype.getZoomBarData=function(){return this.get("zoomBarData")},e.prototype.sanitizeDateValues=function(t){var e=this.getOptions();if(!e.axes)return t;var n=[];return Object.keys(N).forEach((function(t){var r=N[t],i=e.axes[r];if(i&&i.scaleType===G.TIME){var o=i.mapsTo;null===o&&void 0===o||n.push(o)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){null===Ba.getProperty(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t},e.prototype.sanitize=function(e){return e=t.prototype.sanitize.call(this,e),e=this.sanitizeDateValues(e)},e}(Wp),S_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:_g,curves:Eg,zoom:wg}),r.model=new T_(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=Ba.getProperty(n,"zoomBar",N.TOP,"enabled"),i=Ba.getProperty(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var o=this.services.cartesianScales.getMainXAxisPosition(),a=Ba.getProperty(n,"axes",o,"scaleType"),s=r&&o===N.BOTTOM&&a===G.TIME,l=this.services.zoom.isZoomBarLocked(N.TOP),u=!!this.model.getOptions().title,c={id:"title",components:[new Xv(this.model,this.services)],growth:q.STRETCH},h={id:"toolbar",components:[new __(this.model,this.services)],growth:q.PREFERRED},d={id:"header",components:[new Tb(this.model,this.services,L([c],i?[h]:[]),{direction:W.ROW,alignItems:Z.CENTER})],growth:q.PREFERRED},f={id:"legend",components:[new Sg(this.model,this.services)],growth:q.PREFERRED};s&&!l&&t.push(new Jv(this.model,this.services),new g_(this.model,this.services)),t.push(new Yv(this.model,this.services)),t.push(new em(this.model,this.services));var p={id:"graph-frame",components:t,growth:q.STRETCH,renderType:k.SVG},g=!1!==Ba.getProperty(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,v=W.COLUMN;if(g){var m=Ba.getProperty(this.model.getOptions(),"legend","position");m===H.LEFT?(v=W.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=j.VERTICAL)):m===H.RIGHT?(v=W.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=j.VERTICAL)):m===H.BOTTOM&&(v=W.COLUMN_REVERSE)}var y={id:"spacer",components:[new Ob(this.model,this.services)],growth:q.PREFERRED},b={id:"full-frame",components:[new Tb(this.model,this.services,L(g?[f]:[],g?[y]:[],[p]),{direction:v})],growth:q.STRETCH},x={id:"zoom-bar",components:[new w_(this.model,this.services)],growth:q.PREFERRED,renderType:k.SVG},_=[];if(u||i){_.push(d);var E={id:"spacer",components:[new Ob(this.model,this.services,i?{size:15}:void 0)],growth:q.PREFERRED};_.push(E)}return s&&_.push(x),_.push(b),[new $v(this.model,this.services),new Fv(this.model,this.services),new Tb(this.model,this.services,_,{direction:W.COLUMN})]},e}(O_),M_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Ba.clone(Cs.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new y_(this.model,this.services),new fm(this.model,this.services),new nm(this.model,this.services),new um(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new xm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(S_),A_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new x_(this.model,this.services),new rm(this.model,this.services),new fm(this.model,this.services,{stacked:!0}),new gm(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new xm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(S_),C_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new om(this.model,this.services),new E_(this.model,this.services),new xm(this.model,this.services,{skeleton:X.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(S_),P_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new am(this.model,this.services),new E_(this.model,this.services),new xm(this.model,this.services,{skeleton:X.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(S_),D_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new x_(this.model,this.services),new sm(this.model,this.services),new xm(this.model,this.services,{skeleton:X.VERT_OR_HORIZ}),new E_(this.model,this.services)];return this.getAxisChartComponents(t)},e}(S_),L_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getBoxQuartiles=function(t){return{q_25:$s(t,.25),q_50:$s(t,.5),q_75:$s(t,.75)}},e.prototype.getBoxplotData=function(){for(var t=this.getOptions().data.groupMapsTo,e=this.getGroupedData(),n=[],r=function(e,r){for(var o,a=i.services.cartesianScales.getRangeIdentifier(),s=r.map((function(t){return t[a]})).sort(Ds),l=((o={})[t]=e,o.counts=s,o.quartiles=i.getBoxQuartiles(s),o.outliers=null,o.whiskers=null,o),u=l.quartiles.q_25,c=l.quartiles.q_75,h=1.5*(c-u),d=u-h,f=c+h,p=[],g=[],v=0,m=s;v<m.length;v++){var y=m[v];y<d?p.push(y):y>f?p.push(y):g.push(y)}l.outliers=p;var b=Ks(g),x=Xs(g);l.whiskers={min:b||Ks([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75]),max:x||Xs([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75])},n.push(l)},i=this,o=0,a=e;o<a.length;o++){var s=a[o];r(s.name,s.data)}return n},e.prototype.getTabularDataArray=function(){var t=this.getOptions().data.groupMapsTo;return L([["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"]],this.getBoxplotData().map((function(e){var n=Ba.getProperty(e,"outliers");return null!==n&&0!==n.length||(n=["–"]),[e[t],null!==Ba.getProperty(e,"whiskers","min")?Ba.getProperty(e,"whiskers","min").toLocaleString():"–",null!==Ba.getProperty(e,"quartiles","q_25")?Ba.getProperty(e,"quartiles","q_25").toLocaleString():"–",null!==Ba.getProperty(e,"quartiles","q_50")?Ba.getProperty(e,"quartiles","q_50").toLocaleString():"–",null!==Ba.getProperty(e,"quartiles","q_75")?Ba.getProperty(e,"quartiles","q_75").toLocaleString():"–",null!==Ba.getProperty(e,"whiskers","max")?Ba.getProperty(e,"whiskers","max").toLocaleString():"–",null!==Ba.getProperty(e,"quartiles","q_75")&&null!==Ba.getProperty(e,"quartiles","q_25")?(Ba.getProperty(e,"quartiles","q_75")-Ba.getProperty(e,"quartiles","q_25")).toLocaleString():"–",n.map((function(t){return t.toLocaleString()})).join(",")]})))},e.prototype.setColorClassNames=function(){var t=Ba.getProperty(this.getOptions(),"color","pairing"),e=Ba.getProperty(t,"option");e=e<=yt.pairingOptions["1-color"]?e:1;var n=this.allDataGroups.map((function(t,n){return"1-"+e+"-1"}));this.colorClassNames=nl().range(n).domain(this.allDataGroups)},e}(T_),k_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new L_(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.boxplotChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new lm(this.model,this.services),new E_(this.model,this.services),new xm(this.model,this.services,{skeleton:X.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})},e}(S_),R_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new y_(this.model,this.services),new cm(this.model,this.services),new xm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(S_),I_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getMatchingRangeIndexForDatapoint=function(t){for(var e=t.ranges.length-1;e>0;e--){var n=t.ranges[e];if(t.value>=n)return e}return 0},e.prototype.getTabularDataArray=function(){var t=this,e=this.getDisplayData(),n=this.getOptions(),r=n.data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Ba.getProperty(n,"bullet","performanceAreaTitles");return L([["Title","Group","Value","Target","Percentage","Performance"]],e.map((function(e){return[e.title,e[r],null===e.value?"–":e.value,null===Ba.getProperty(e,"marker")?"–":e.marker,null===Ba.getProperty(e,"marker")?"–":Math.floor(e[i]/e.marker*100)+"%",o[t.getMatchingRangeIndexForDatapoint(e)]]})))},e}(T_),N_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new I_(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.bulletChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new hm(this.model,this.services),new xm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(S_),B_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this.getBinnedStackedData();return L([L([Hn(t,"bins.rangeLabel")||"Range"],n.map((function(t){return Hn(t,"0."+e)})))],Hn(n,0).map((function(t,r){return L([Hn(t,"data.x0")+" – "+Hn(t,"data.x1")],n.map((function(t){return Hn(t[r],"data."+Hn(t[r],e))})))})))},e}(T_),U_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new B_(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.histogramChart,n.options)),r.init(e,n),r.update(),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new b_(this.model,this.services),new dm(this.model,this.services)];return this.getAxisChartComponents(t)},e}(S_),V_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new y_(this.model,this.services),new fm(this.model,this.services),new um(this.model,this.services,{handleThresholds:!0}),new _m(this.model,this.services),new E_(this.model,this.services)];return this.getAxisChartComponents(t)},e}(S_),G_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.lollipopChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new y_(this.model,this.services),new pm(this.model,this.services),new um(this.model,this.services),new xm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(S_),H_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new v_(this.model,this.services),new y_(this.model,this.services),new um(this.model,this.services),new xm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(S_),z_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularData=function(e){var n=t.prototype.getTabularData.call(this,e);return e!==n&&n.forEach((function(t){t.key&&t.key!==t.group&&(t.group=t.key)})),n},e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.getOptions().data.groupMapsTo;return L([["Group","Value"]],t.map((function(t){return[t[e],null===t.value?"–":t.value.toLocaleString()]})))},e.prototype.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}(Wp),j_=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new z_(i.services),r?i:(i.model.setOptions(Ba.mergeDefaultChartOptions(Cs.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new xm(this.model,this.services,{skeleton:X.PIE})];return this.getChartComponents(t)},e}(O_),F_=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new bm(this.model,this.services),new xm(this.model,this.services,{skeleton:X.DONUT})];return this.getChartComponents(t)},e}(j_),W_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getMaximumDomain=function(t){return t.reduce((function(t,e){return t+e.value}),0)},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=Ba.getProperty(n,"color","scale"),i=this.getStatus();return r||!i?t.prototype.getFillColor.call(this,e):null},e.prototype.getStatus=function(){var t=this.getOptions(),e=Ba.getProperty(this.getDisplayData()),n=(e?e.reduce((function(t,e){return{value:t.value+e.value}})):0).value,r=Ba.getProperty(t,"meter","proportional")?n:n>100?100:n,i=Ba.getProperty(t,"meter","status","ranges");if(i){var o=i.filter((function(t){return t.range[0]<=r&&r<=t.range[1]}));if(o.length>0)return o[0].status}return null},e.prototype.getTabularDataArray=function(){var t,e=this.getDisplayData(),n=this.getOptions(),r=n.data.groupMapsTo,i=this.getStatus(),o=Ba.getProperty(n,"meter","proportional"),a=[];if(null===o){t=100;var s=e[0];a=[L(["Group","Value"],i?["Status"]:[]),L([s[r],s.value],i?[i]:[])]}else{var l=Ba.getProperty(o,"total");t=l||this.getMaximumDomain(e),a=L([["Group","Value","Percentage of total"]],e.map((function(e){return[e[r],e.value,(e.value/t*100).toFixed(2)+" %"]})))}return a},e}(Wp),q_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e.renderType=k.SVG,e}return n(e,t),e.prototype.getStackedBounds=function(t,e){var n=0;return t.map((function(t,r){return 0!==r?(n+=e(t.value),P(P({},t),{width:Math.abs(e(t.value)-wt.dividerWidth),x:n-e(t.value)})):(n=e(t.value),P(P({},t),{width:Math.abs(e(t.value)-wt.dividerWidth),x:0}))}))},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i=this,o=this.getComponentContainer(),a=this.getOptions(),s=Ba.getProperty(a,"meter","proportional"),l=this.model.getDisplayData(),u=this.model.getStatus(),c=vg.getSVGElementSize(o,{useAttrs:!0}).width,h=a.data.groupMapsTo;if(null===Ba.getProperty(a,"meter","proportional"))n=100;else{var d=Ba.getProperty(a,"meter","proportional","total");n=d||this.model.getMaximumDomain(this.model.getDisplayData())}var f=Mu().domain([0,n]).range([0,c]),p=this.getStackedBounds(l,f),g=Ba.getProperty(a,"meter","height");vg.appendOrSelect(o,"rect.container").attr("x",0).attr("y",0).attr("width",c).attr("height",g||(s?wt.height.proportional:wt.height.default)),vg.appendOrSelect(o,"line.rangeIndicator").attr("x1",c).attr("x2",c).attr("y1",0).attr("y2",g||(s?wt.height.proportional:wt.height.default));var v=o.selectAll("rect.value").data(p),m=null==u||i.model.isUserProvidedColorScaleValid()||s?"value":"value status--"+u;v.enter().append("rect").classed("value",!0).merge(v).attr("x",(function(t){return t.x})).attr("y",0).attr("height",(function(){var t=Ba.getProperty(a,"meter","height");return t||(s?wt.height.proportional:wt.height.default)})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[I.FILL],dataGroupName:t[h],originalClassName:m})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"meter-bar-update",animate:t})})).attr("width",(function(t,e){return t.value>n?f(n):t.width})).style("fill",(function(t){return i.model.getFillColor(t[h])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),v.exit().remove();var y=Ba.getProperty(a,"meter","peak"),b=y;null!==y&&(y>n?b=n:y<l[0].value&&(b=l[0].value>n?n:l[0].value));var x=o.selectAll("line.peak").data(null==b?[]:[b]);x.enter().append("line").classed("peak",!0).merge(x).attr("y1",0).attr("y2",(function(){var t=Ba.getProperty(a,"meter","height");return t||(s?wt.height.proportional:wt.height.default)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"peak-line-update",animate:t})})).attr("x1",(function(t){return f(t)})).attr("x2",(function(t){return f(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),x.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this,r=Ba.getProperty(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",(function(t,i){var o=Ha(this);n.services.events.dispatchEvent(ut.Meter.METER_MOUSEOVER,{event:t,element:o,datum:i}),r&&(o.classed("hovered",!0),n.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:t,hoveredElement:o,items:[{label:i[e],value:i.value}]}))})).on("mousemove",(function(t,e){var i=Ha(this);n.services.events.dispatchEvent(ut.Meter.METER_MOUSEMOVE,{event:t,element:i,datum:e}),r&&n.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){n.services.events.dispatchEvent(ut.Meter.METER_CLICK,{event:t,element:Ha(this),datum:e})})).on("mouseout",(function(t,e){var i=Ha(this);n.services.events.dispatchEvent(ut.Meter.METER_MOUSEOUT,{event:t,element:i,datum:e}),r&&(i.classed("hovered",!1),n.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:i}))}))},e.prototype.destroy=function(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)},e}(Tg),Z_=function(t){function e(e,n){var r=t.call(this,e,n)||this;r.model=new W_(r.services);var i=n.options.meter.proportional?Ba.merge(Ba.clone(Cs.proportionalMeterChart),n.options):Ba.merge(Ba.clone(Cs.meterChart),n.options);return r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=L(Ba.getProperty(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new Kv(this.model,this.services)],growth:q.STRETCH,renderType:k.SVG},{id:"spacer",components:[new Ob(this.model,this.services,{size:8})],growth:q.STRETCH}]:[],[{id:"meter-graph",components:[new q_(this.model,this.services)],growth:q.STRETCH,renderType:k.SVG}]),e=[new Tb(this.model,this.services,t,{direction:W.COLUMN})];return this.getChartComponents(e,{graphFrameRenderType:k.HTML})},e}(O_),Y_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getOptions(),e=this.getGroupedData(),n=Ba.getProperty(t,"radar","axes"),r=n.angle,i=n.value,o=Ba.getProperty(e,"0","data").map((function(t){return t[r]}));return L([L(["Group"],o)],e.map((function(t){return L([t.name],o.map((function(e,n){return null!==Ba.getProperty(t,"data",n,i)?Ba.getProperty(t,"data",n,i).toLocaleString():"–"})))})))},e}(T_),X_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new Y_(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.radarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new xy(this.model,this.services)];return this.getChartComponents(t)},e}(O_),K_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDataGroups=function(){return t.prototype.getDataGroups.call(this).filter((function(t){return"delta"!==t.name}))},e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.getOptions().data.groupMapsTo;return L([["Group","Value"]],t.map((function(t){return[t[e],null===t.value?"–":t.value.toLocaleString()]})))},e}(Wp),Q_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new K_(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ym(this.model,this.services)];return this.getChartComponents(t)},e}(O_),$_=((m_={})[nt.LINE]=[fm,um],m_[nt.SCATTER]=[um],m_[nt.AREA]=[nm,fm,um],m_[nt.STACKED_AREA]=[rm,fm,gm,x_],m_[nt.SIMPLE_BAR]=[om],m_[nt.GROUPED_BAR]=[am,E_],m_[nt.STACKED_BAR]=[sm,x_],m_),J_=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=Ba.mergeDefaultChartOptions(Cs.comboChart,n.options);return n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:nt.LINE,correspondingDatasets:[]}]),r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getGraphComponents=function(){var t=this,e=this.model.getOptions().comboChartTypes,n=0,r=e.map((function(e){var r,i,o=e.type;return"string"==typeof e.type?Object.keys($_).includes(e.type)?(r=Ba.merge({},Cs[Ba.camelCase(e.type)+"Chart"],t.model.getOptions(),e.options),e.type===nt.STACKED_AREA&&(i=!0),$_[e.type].map((function(o,a){return new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r,stacked:i})}))):(console.error('Invalid chart type "'+e.type+'" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.'),null):(r=Ba.merge({},t.model.getOptions(),e.options),new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r}))})).filter((function(t){return null!==t}));return Ba.flatten(r)},e.prototype.getComponents=function(){var t=this.model.getOptions().comboChartTypes.some((function(t){return t.type===nt.STACKED_BAR||t.type===nt.STACKED_AREA})),e=L([new Ab(this.model,this.services),new v_(this.model,this.services),new xm(this.model,this.services,{skeleton:X.GRID})],t?[]:[new y_(this.model,this.services)],this.getGraphComponents());return this.getAxisChartComponents(e)},e}(S_),tE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this,e=this.getDisplayData(),n=[["Child","Parent"]];return e.forEach((function(e){t.getChildrenDatums(e,n),n.push([e.name,"–"])})),n},e.prototype.getChildrenDatums=function(t,e){var n=this;void 0===e&&(e=[]),t.children&&t.children.length>0&&t.children.forEach((function(r){n.getChildrenDatums(r,e),e.push([r.name,t.name])}))},e}(Wp),eE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new tE(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.treeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new hy(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})},e}(O_),nE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=[["Child","Group","Value"]];return t.forEach((function(t){Array.isArray(t.children)?t.children.forEach((function(n){e.push([n.name,t.name,n.value])})):null!==Ba.getProperty(t.name)&&Ba.getProperty(t.value)&&e.push(["–",t.name,t.value])})),e},e}(Wp),rE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new nE(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new gy(this.model,this.services)];return this.getChartComponents(t)},e}(O_),iE=function(t){function e(e){var n=t.call(this,e)||this;return n.parentNode=!1,n.set({depth:2},{skipUpdate:!0}),n}return n(e,t),e.prototype.setData=function(e){t.prototype.setData.call(this,e),this.setDataGroups(),1===e.length&&(this.parentNode=!0),this.setZoom()},e.prototype.setOptions=function(t){var e=this.getOptions(),n=Ba.merge({},t,this.getZoomOptions(t));Ba.updateLegendAdditionalItems(e,n);var r=this.getHierarchyLevel(),i=Ba.getProperty(e,"circlePack","hierarchyLevel");this.set({options:Ba.merge(e,n),depth:i&&i<4?i:r})},e.prototype.getZoomOptions=function(t){if(!this.getDisplayData())return{};var e=this.getDisplayData(),n=t||this.getOptions(),r=1===e.length&&Ba.getProperty(e,0,"children")?Ba.getProperty(e,0,"children"):e,i=this.getHierarchyLevel();return r.some((function(t){if(t.children&&t.children.some((function(t){return t.children})))return i=3,!1})),!0===Ba.getProperty(n,"canvasZoom","enabled")&&i>2?{legend:{additionalItems:[{type:ot.ZOOM,name:"Click to zoom"}]}}:null},e.prototype.setZoom=function(t){this.setOptions(this.getZoomOptions(t))},e.prototype.updateHierarchyLevel=function(t){this.set({depth:t})},e.prototype.getHierarchyLevel=function(){return this.get("depth")},e.prototype.hasParentNode=function(){return this.parentNode},e.prototype.setDataGroups=function(){var t=this,e=this.getData(),n=this.getOptions().data.groupMapsTo,r=e.map((function(e){var r=e[n];return t.setChildrenDataGroup(e,r)}));this.set({data:r},{skipUpdate:!0})},e.prototype.setChildrenDataGroup=function(t,e){var n=this;return t.children?P(P({},t),{dataGroupName:e,children:t.children.map((function(t,r){return n.setChildrenDataGroup(t,e)}))}):P(P({},t),{dataGroupName:e})},e.prototype.getTabularDataArray=function(){var t=this,e=this.getDisplayData(),n=[["Child","Parent","Value"]];return e.forEach((function(e){var r=e.value?e.value:0;e.children&&(r+=t.getChildrenDatums(e.children,e.name,n,0)),n.push(["–",e.name,r])})),n},e.prototype.getChildrenDatums=function(t,e,n,r){var i=this;void 0===n&&(n=[]),void 0===r&&(r=0);var o=e;return t.forEach((function(t){var e=t.name,a=0;if(t.children)t.children.length>0&&("number"==typeof t.value&&(r+=t.value),a+=i.getChildrenDatums(t.children,e,n,a),n.push([e,o,a]),r+=a);else{var s=0;"number"==typeof t.value&&(s=t.value,r+=t.value),n.push([t.name,o,s])}})),r},e}(Wp),oE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new iE(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.circlePackChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new _y(this.model,this.services)];return this.getChartComponents(t)},e}(O_),aE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.getOptions(),n=e.wordCloud,r=n.fontSizeMapsTo,i=n.wordMapsTo,o=e.data.groupMapsTo;return L([[e.tooltip.wordLabel,"Group",e.tooltip.valueLabel]],t.map((function(t){return[t[i],t[o],t[r]]})))},e}(Wp),sE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new aE(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.wordCloudChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Fy(this.model,this.services),new xm(this.model,this.services,{skeleton:X.PIE})];return this.getChartComponents(t)},e}(O_),lE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getDisplayData();return t.sort((function(t,e){return t.source.localeCompare(e.source)})),L([["Source","Target","Value"]],t.map((function(t){return[t.source,t.target,t.value]})))},e}(T_),uE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new lE(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.alluvialChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Eb(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})},e}(O_),cE=function(t){function e(e){var n=t.call(this,e)||this;n.axisFlavor=lt.HOVERABLE,n._colorScale=void 0,n._domains=[],n._ranges=[],n._matrix={};var r=Ba.getProperty(n.getOptions(),"axes");if(Ba.getProperty(r,"left","scaleType")&&Ba.getProperty(r,"left","scaleType")!==G.LABELS||Ba.getProperty(r,"right","scaleType")&&Ba.getProperty(r,"right","scaleType")!==G.LABELS||Ba.getProperty(r,"top","scaleType")&&Ba.getProperty(r,"top","scaleType")!==G.LABELS||Ba.getProperty(r,"bottom","scaleType")&&Ba.getProperty(r,"bottom","scaleType")!==G.LABELS)throw Error("Heatmap only supports label scaletypes.");return n}return n(e,t),e.prototype.getValueDomain=function(){var t=Rs(this.getDisplayData(),(function(t){return t.value})),e=Mu().domain(t).nice().domain();if(e[0]>0)e[0]=0;else if(0===e[0]&&0===e[1])return[0,1];return e[0]<0&&e[1]>0&&(Math.abs(e[0])>e[1]?e[1]=Math.abs(e[0]):e[0]=-e[1]),e},e.prototype.getFillColor=function(t){return this._colorScale(t)},e.prototype.getUniqueDomain=function(){if(Ba.isEmpty(this._domains)){var t=this.getDisplayData(),e=this.services.cartesianScales,n=e.getDomainIdentifier(),r=e.getMainXAxisPosition(),i=e.getCustomDomainValuesByposition(r);if(i)return i;this._domains=Array.from(new Set(t.map((function(t){return t[n]}))))}return this._domains},e.prototype.getUniqueRanges=function(){if(Ba.isEmpty(this._ranges)){var t=this.getDisplayData(),e=this.services.cartesianScales,n=e.getRangeIdentifier(),r=e.getMainYAxisPosition(),i=e.getCustomDomainValuesByposition(r);if(i)return i;this._ranges=Array.from(new Set(t.map((function(t){return t[n]}))))}return this._ranges},e.prototype.getMatrix=function(){var t=this;if(Ba.isEmpty(this._matrix)){var e=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o={};n.forEach((function(t){o[t]={value:null,index:-1}})),e.forEach((function(e){t._matrix[e]=Ba.clone(o)})),this.getDisplayData().forEach((function(e,n){t._matrix[e[r]][e[i]]={value:e.value,index:n}}))}return this._matrix},e.prototype.setData=function(t){var e=this.sanitize(Ba.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),this._domains=[],this._ranges=[],this._matrix={},e},e.prototype.getMatrixAsArray=function(){var t=this;Ba.isEmpty(this._matrix)&&this.getMatrix();var e=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o=[];return e.forEach((function(e){n.forEach((function(n){var a={value:t._matrix[e][n].value,index:t._matrix[e][n].index};a[r]=e,a[i]=n,o.push(a)}))})),o},e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.assignRangeAndDomains(),n=e.primaryDomain,r=e.primaryRange;return L([[n.label,r.label,"Value"]],t.map((function(t){return[null===t[n.identifier]?"–":t[n.identifier],null===t[r.identifier]?"–":t[r.identifier].toLocaleString(),t.value]})))},e.prototype.getColorClassName=function(t){return t.originalClassName+" "+this._colorScale(t.value)},e.prototype.setColorClassNames=function(){var t=this.getOptions(),e=Ba.getProperty(t,"color","gradient","colors"),n=!Ba.isEmpty(e),r=Ba.getProperty(t,"color","pairing","option"),i=this.getValueDomain(),o=i[0]<0&&i[1]>0?"diverge":"mono";r<1&&r>4&&"mono"===o?r=1:r<1&&r>2&&"diverge"===o&&(r=1);var a=n?e:[];if(!n)for(var s="diverge"===o?17:11,l=1;l<s+1;l++)a.push("fill-"+o+"-"+r+"-"+l);this._colorScale=function t(){var e,n=0,r=1,i=1,o=[.5],a=[0,1];function s(t){return null!=t&&t<=t?a[ks(o,t,0,i)]:e}function l(){var t=-1;for(o=new Array(i);++t<i;)o[t]=((t+1)*r-(t-i)*n)/(i+1);return s}return s.domain=function(t){return arguments.length?([n,r]=t,n=+n,r=+r,l()):[n,r]},s.range=function(t){return arguments.length?(i=(a=Array.from(t)).length-1,l()):a.slice()},s.invertExtent=function(t){var e=a.indexOf(t);return e<0?[NaN,NaN]:e<1?[n,o[0]]:e>=i?[o[i-1],r]:[o[e-1],o[e]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return t().domain([n,r]).range(a).unknown(e)},tl.apply(Su(s),arguments)}().domain(i).range(a)},e}(T_),hE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new cE(r.services),r.model.setOptions(Ba.mergeDefaultChartOptions(Cs.heatmapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=Ba.getProperty(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var i=!!this.model.getOptions().title,o={id:"title",components:[new Xv(this.model,this.services)],growth:q.STRETCH},a={id:"toolbar",components:[new __(this.model,this.services)],growth:q.PREFERRED},s={id:"header",components:[new Tb(this.model,this.services,L([o],r?[a]:[]),{direction:W.ROW,alignItems:Z.CENTER})],growth:q.PREFERRED},l={id:"legend",components:[new Ug(this.model,this.services)],growth:q.PREFERRED,renderType:k.SVG},u={id:"graph-frame",components:t,growth:q.STRETCH,renderType:k.SVG},c=!1!==Ba.getProperty(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,h=W.COLUMN_REVERSE,d={id:"spacer",components:[new Ob(this.model,this.services,{size:15})],growth:q.PREFERRED},f={id:"full-frame",components:[new Tb(this.model,this.services,L(c?[l]:[],c?[d]:[],[u]),{direction:h})],growth:q.STRETCH},p=[];if(i||r){p.push(s);var g={id:"spacer",components:[new Ob(this.model,this.services,r?{size:15}:void 0)],growth:q.PREFERRED};p.push(g)}return p.push(f),[new $v(this.model,this.services),new Fv(this.model,this.services),new Tb(this.model,this.services,p,{direction:W.COLUMN})]},e.prototype.getComponents=function(){var t=[new Ab(this.model,this.services),new wb(this.model,this.services)];return this.getAxisChartComponents(t)},e}(S_);t.AlluvialChart=uE,t.AreaChart=M_,t.BoxplotChart=k_,t.BubbleChart=R_,t.BulletChart=N_,t.CirclePackChart=oE,t.ComboChart=J_,t.DonutChart=F_,t.GaugeChart=Q_,t.GroupedBarChart=P_,t.HeatmapChart=hE,t.HistogramChart=U_,t.LineChart=V_,t.LollipopChart=G_,t.MeterChart=Z_,t.PieChart=j_,t.RadarChart=X_,t.ScatterChart=H_,t.SimpleBarChart=C_,t.StackedAreaChart=A_,t.StackedBarChart=D_,t.TreeChart=eE,t.TreemapChart=rE,t.WordCloudChart=sE,t.configurations=Ps,t.interfaces=ct,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o,a,s,l,u,c,h,d,f,p,v,g,m,y,b,x,_,E,w,O,T,S,M,A,C,L=function(){return(L=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function D(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function k(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout"}(i||(i={})),function(t){t.SHOW="show-modal",t.HIDE="hide-modal"}(o||(o={})),function(t){t.UPDATE="model-update"}(a||(a={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",t.BUTTON_CLICK="toolbar-button-click"}(s||(s={})),function(t){t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end"}(l||(l={})),function(t){t.CHANGE="zoom-domain-change"}(u||(u={})),function(t){t.CANVAS_ZOOM_IN="canvas-zoom-in",t.CANVAS_ZOOM_OUT="canvas-zoom-out"}(c||(c={})),function(t){t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout",t.LABEL_FOCUS="axis-label-focus",t.LABEL_BLUR="axis-label-blur",t.RENDER_COMPLETE="axis-render-complete"}(h||(h={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(d||(d={})),function(t){t.WORD_MOUSEOVER="wordcloud-word-mouseover",t.WORD_MOUSEMOVE="wordcloud-word-mousemove",t.WORD_CLICK="wordcloud-word-click",t.WORD_MOUSEOUT="wordcloud-word-mouseout"}(f||(f={})),function(t){t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout"}(p||(p={})),function(t){t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout"}(v||(v={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(g||(g={})),function(t){t.BOX_MOUSEOVER="box-mouseover",t.BOX_MOUSEMOVE="box-mousemove",t.BOX_CLICK="box-click",t.BOX_MOUSEOUT="box-mouseout",t.OUTLIER_MOUSEOVER="outlier-mouseover",t.OUTLIER_MOUSEMOVE="outlier-mousemove",t.OUTLIER_CLICK="outlier-click",t.OUTLIER_MOUSEOUT="outlier-mouseout"}(m||(m={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(y||(y={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(b||(b={})),function(t){t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout"}(x||(x={})),function(t){t.NODE_MOUSEOVER="tree-node-mouseover",t.NODE_CLICK="tree-node-click",t.NODE_MOUSEOUT="tree-node-mouseout"}(_||(_={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(E||(E={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(w||(w={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(O||(O={})),function(t){t.ITEM_HOVER="legend-item-onhover",t.ITEM_CLICK="legend-item-onclick",t.ITEM_MOUSEOUT="legend-item-onmouseout",t.ITEMS_UPDATE="legend-items-update"}(T||(T={})),function(t){t.CIRCLE_MOUSEOVER="circle-leaf-mouseover",t.CIRCLE_CLICK="circle-leaf-click",t.CIRCLE_MOUSEOUT="circle-leaf-mouseout",t.CIRCLE_MOUSEMOVE="circle-leaf-mousemove"}(S||(S={})),function(t){t.NODE_MOUSEOVER="alluvial-node-mouseover",t.NODE_CLICK="alluvial-node-click",t.NODE_MOUSEOUT="alluvial-node-mouseout",t.NODE_MOUSEMOVE="alluvial-node-mousemove",t.LINE_MOUSEOVER="alluvial-line-mouseover",t.LINE_CLICK="alluvial-line-click",t.LINE_MOUSEOUT="alluvial-line-mouseout",t.LINE_MOUSEMOVE="alluvial-line-mousemove"}(M||(M={})),function(t){t.METER_MOUSEOVER="meter-mouseover",t.METER_CLICK="meter-click",t.METER_MOUSEOUT="meter-mouseout",t.METER_MOUSEMOVE="meter-mousemove"}(A||(A={})),function(t){t.HEATMAP_MOUSEOVER="heatmap-mouseover",t.HEATMAP_CLICK="heatmap-click",t.HEATMAP_MOUSEOUT="heatmap-mouseout",t.HEATMAP_MOUSEMOVE="hetmap-mousemove"}(C||(C={}));var R,I,P,N,B,U,V,H,G,z,j,F,W,q,Z,Y,X,K,Q,$,J,tt,et,nt,rt,it,ot,at,st,lt,ut=Object.freeze({__proto__:null,get Chart(){return i},get Modal(){return o},get Model(){return a},get Toolbar(){return s},get ZoomBar(){return l},get ZoomDomain(){return u},get CanvasZoom(){return c},get Axis(){return h},get Area(){return d},get WordCloud(){return f},get Pie(){return p},get Gauge(){return v},get Bar(){return g},get Boxplot(){return m},get Scatter(){return y},get Line(){return b},get Radar(){return x},get Tree(){return _},get Treemap(){return E},get Tooltip(){return w},get Threshold(){return O},get Legend(){return T},get CirclePack(){return S},get Alluvial(){return M},get Meter(){return A},get Heatmap(){return C}});!function(t){t.HTML="html",t.SVG="svg"}(R||(R={})),function(t){t.WHITE="white",t.G100="g100",t.G90="g90",t.G10="g10"}(I||(I={})),function(t){t.BACKGROUND="background",t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(P||(P={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(N||(N={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(B||(B={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(U||(U={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(V||(V={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio"}(H||(H={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(G||(G={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(z||(z={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(j||(j={})),function(t){t.TREE="tree",t.DENDROGRAM="dendrogram"}(F||(F={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(W||(W={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(q||(q={})),function(t){t.CENTER="center"}(Z||(Z={})),function(t){t.LEFT="left",t.RIGHT="right"}(Y||(Y={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(X||(X={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(K||(K={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(Q||(Q={})),function(t){t.SEMI="semi",t.FULL="full"}($||($={})),function(t){t.UP="up",t.DOWN="down"}(J||(J={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(tt||(tt={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(et||(et={})),function(t){t.SCATTER="scatter",t.LINE="line",t.SIMPLE_BAR="simple-bar",t.STACKED_BAR="stacked-bar",t.GROUPED_BAR="grouped-bar",t.AREA="area",t.STACKED_AREA="stacked-area"}(nt||(nt={})),function(t){t.EXPORT_CSV="Export as CSV",t.EXPORT_PNG="Export as PNG",t.EXPORT_JPG="Export as JPG",t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom",t.MAKE_FULLSCREEN="Make fullscreen",t.SHOW_AS_DATATABLE="Show as data-table",t.CUSTOM="Custom"}(rt||(rt={})),function(t){t.LEFT="left",t.RIGHT="right"}(it||(it={})),function(t){t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom"}(ot||(ot={})),function(t){t.LINEAR="linear",t.QUANTIZE="quantize"}(at||(at={})),function(t){t.ON="on",t.AUTO="auto",t.OFF="off"}(st||(st={})),function(t){t.DEFAULT="default",t.HOVERABLE="hoverable"}(lt||(lt={}));var ct=Object.freeze({__proto__:null,get Roles(){return r},Events:ut,get RenderTypes(){return R},get ChartTheme(){return I},get ColorClassNameTypes(){return P},get AxisPositions(){return N},get ZoomBarTypes(){return B},get TruncationTypes(){return U},get CartesianOrientations(){return V},get ScaleTypes(){return H},get LegendPositions(){return G},get Alignments(){return z},get LegendOrientations(){return j},get TreeTypes(){return F},get LayoutDirection(){return W},get LayoutGrowth(){return q},get LayoutAlignItems(){return Z},get CalloutDirections(){return Y},get Skeletons(){return X},get TextAnchor(){return K},get DominantBaseline(){return Q},get GaugeTypes(){return $},get ArrowDirections(){return J},get Statuses(){return tt},get TickRotations(){return et},get ChartTypes(){return nt},get ToolbarControlTypes(){return rt},get AxisTitleOrientations(){return it},get LegendItemType(){return ot},get ColorLegendType(){return at},get DividerStatus(){return st},get AxisFlavor(){return lt}});const ht=t=>+t;function dt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ft,pt={opacity:{unselected:.05,selected:.4}},vt={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},gt={duration:1e3,ease:dt,zoomLevel:3},mt={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},yt={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},bt={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},xt={defaultBins:10},_t={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},Et={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},wt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Ot={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},Tt={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},St={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Mt={minCellDividerDimension:16,chartPadding:.5},At={default:{size:24}},Ct={horizontalOffset:10},Lt={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Dt={height:(ft={},ft[B.GRAPH_VIEW]=32,ft[B.SLIDER_VIEW]=10,ft),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},kt=[{type:ot.RADIUS,name:"Radius"},{type:ot.AREA,name:"Poor area"},{type:ot.AREA,name:"Satisfactory area"},{type:ot.AREA,name:"Great area"},{type:ot.QUARTILE,name:"Quartiles"}],Rt="object"==typeof global&&global&&global.Object===Object&&global,It="object"==typeof self&&self&&self.Object===Object&&self,Pt=Rt||It||Function("return this")(),Nt=Pt.Symbol,Bt=Object.prototype,Ut=Bt.hasOwnProperty,Vt=Bt.toString,Ht=Nt?Nt.toStringTag:void 0;var Gt=Object.prototype.toString;var zt=Nt?Nt.toStringTag:void 0;function jt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":zt&&zt in Object(t)?function(t){var e=Ut.call(t,Ht),n=t[Ht];try{t[Ht]=void 0;var r=!0}catch(t){}var i=Vt.call(t);return r&&(e?t[Ht]=n:delete t[Ht]),i}(t):function(t){return Gt.call(t)}(t)}function Ft(t){return null!=t&&"object"==typeof t}function Wt(t){return"symbol"==typeof t||Ft(t)&&"[object Symbol]"==jt(t)}function qt(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Zt=Array.isArray,Yt=Nt?Nt.prototype:void 0,Xt=Yt?Yt.toString:void 0;function Kt(t){if("string"==typeof t)return t;if(Zt(t))return qt(t,Kt)+"";if(Wt(t))return Xt?Xt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Qt=/\s/;var $t=/^\s+/;function Jt(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Qt.test(t.charAt(e)););return e}(t)+1).replace($t,""):t}function te(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ee=/^[-+]0x[0-9a-f]+$/i,ne=/^0b[01]+$/i,re=/^0o[0-7]+$/i,ie=parseInt;function oe(t){if("number"==typeof t)return t;if(Wt(t))return NaN;if(te(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=te(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Jt(t);var n=ne.test(t);return n||re.test(t)?ie(t.slice(2),n?2:8):ee.test(t)?NaN:+t}function ae(t){return t}function se(t){if(!te(t))return!1;var e=jt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var le,ue=Pt["__core-js_shared__"],ce=(le=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||""))?"Symbol(src)_1."+le:"";var he=Function.prototype.toString;function de(t){if(null!=t){try{return he.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var fe=/^\[object .+?Constructor\]$/,pe=Function.prototype,ve=Object.prototype,ge=pe.toString,me=ve.hasOwnProperty,ye=RegExp("^"+ge.call(me).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function be(t){return!(!te(t)||(e=t,ce&&ce in e))&&(se(t)?ye:fe).test(de(t));var e}function xe(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return be(n)?n:void 0}var _e=xe(Pt,"WeakMap"),Ee=Object.create,we=function(){function t(){}return function(e){if(!te(e))return{};if(Ee)return Ee(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Te(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Se=Date.now;function Me(t){return function(){return t}}var Ae=function(){try{var t=xe(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ce=function(t){var e=0,n=0;return function(){var r=Se(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Ae?function(t,e){return Ae(t,"toString",{configurable:!0,enumerable:!1,value:Me(e),writable:!0})}:ae);function Le(t){return t!=t}function De(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,Le,n)}(t,e,0)>-1}var ke=/^(?:0|[1-9]\d*)$/;function Re(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&ke.test(t))&&t>-1&&t%1==0&&t<e}function Ie(t,e,n){"__proto__"==e&&Ae?Ae(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Pe(t,e){return t===e||t!=t&&e!=e}var Ne=Object.prototype.hasOwnProperty;function Be(t,e,n){var r=t[e];Ne.call(t,e)&&Pe(r,n)&&(void 0!==n||e in t)||Ie(t,e,n)}function Ue(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=r?r(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),i?Ie(n,s,l):Be(n,s,l)}return n}var Ve=Math.max;function He(t,e){return Ce(function(t,e,n){return e=Ve(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Ve(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),Oe(t,this,s)}}(t,e,ae),t+"")}function Ge(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function ze(t){return null!=t&&Ge(t.length)&&!se(t)}function je(t,e,n){if(!te(n))return!1;var r=typeof e;return!!("number"==r?ze(n)&&Re(e,n.length):"string"==r&&e in n)&&Pe(n[e],t)}var Fe=Object.prototype;function We(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Fe)}function qe(t){return Ft(t)&&"[object Arguments]"==jt(t)}var Ze=Object.prototype,Ye=Ze.hasOwnProperty,Xe=Ze.propertyIsEnumerable,Ke=qe(function(){return arguments}())?qe:function(t){return Ft(t)&&Ye.call(t,"callee")&&!Xe.call(t,"callee")};var Qe="object"==typeof t&&t&&!t.nodeType&&t,$e=Qe&&"object"==typeof module&&module&&!module.nodeType&&module,Je=$e&&$e.exports===Qe?Pt.Buffer:void 0,tn=(Je?Je.isBuffer:void 0)||function(){return!1},en={};function nn(t){return function(e){return t(e)}}en["[object Float32Array]"]=en["[object Float64Array]"]=en["[object Int8Array]"]=en["[object Int16Array]"]=en["[object Int32Array]"]=en["[object Uint8Array]"]=en["[object Uint8ClampedArray]"]=en["[object Uint16Array]"]=en["[object Uint32Array]"]=!0,en["[object Arguments]"]=en["[object Array]"]=en["[object ArrayBuffer]"]=en["[object Boolean]"]=en["[object DataView]"]=en["[object Date]"]=en["[object Error]"]=en["[object Function]"]=en["[object Map]"]=en["[object Number]"]=en["[object Object]"]=en["[object RegExp]"]=en["[object Set]"]=en["[object String]"]=en["[object WeakMap]"]=!1;var rn="object"==typeof t&&t&&!t.nodeType&&t,on=rn&&"object"==typeof module&&module&&!module.nodeType&&module,an=on&&on.exports===rn&&Rt.process,sn=function(){try{var t=on&&on.require&&on.require("util").types;return t||an&&an.binding&&an.binding("util")}catch(t){}}(),ln=sn&&sn.isTypedArray,un=ln?nn(ln):function(t){return Ft(t)&&Ge(t.length)&&!!en[jt(t)]},cn=Object.prototype.hasOwnProperty;function hn(t,e){var n=Zt(t),r=!n&&Ke(t),i=!n&&!r&&tn(t),o=!n&&!r&&!i&&un(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=s.length;for(var u in t)!e&&!cn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Re(u,l))||s.push(u);return s}function dn(t,e){return function(n){return t(e(n))}}var fn=dn(Object.keys,Object),pn=Object.prototype.hasOwnProperty;function vn(t){if(!We(t))return fn(t);var e=[];for(var n in Object(t))pn.call(t,n)&&"constructor"!=n&&e.push(n);return e}function gn(t){return ze(t)?hn(t):vn(t)}var mn=Object.prototype.hasOwnProperty;function yn(t){if(!te(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=We(t),n=[];for(var r in t)("constructor"!=r||!e&&mn.call(t,r))&&n.push(r);return n}function bn(t){return ze(t)?hn(t,!0):yn(t)}var xn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_n=/^\w*$/;function En(t,e){if(Zt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Wt(t))||(_n.test(t)||!xn.test(t)||null!=e&&t in Object(e))}var wn=xe(Object,"create");var On=Object.prototype.hasOwnProperty;var Tn=Object.prototype.hasOwnProperty;function Sn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mn(t,e){for(var n=t.length;n--;)if(Pe(t[n][0],e))return n;return-1}Sn.prototype.clear=function(){this.__data__=wn?wn(null):{},this.size=0},Sn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Sn.prototype.get=function(t){var e=this.__data__;if(wn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return On.call(e,t)?e[t]:void 0},Sn.prototype.has=function(t){var e=this.__data__;return wn?void 0!==e[t]:Tn.call(e,t)},Sn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=wn&&void 0===e?"__lodash_hash_undefined__":e,this};var An=Array.prototype.splice;function Cn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Cn.prototype.clear=function(){this.__data__=[],this.size=0},Cn.prototype.delete=function(t){var e=this.__data__,n=Mn(e,t);return!(n<0)&&(n==e.length-1?e.pop():An.call(e,n,1),--this.size,!0)},Cn.prototype.get=function(t){var e=this.__data__,n=Mn(e,t);return n<0?void 0:e[n][1]},Cn.prototype.has=function(t){return Mn(this.__data__,t)>-1},Cn.prototype.set=function(t,e){var n=this.__data__,r=Mn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Ln=xe(Pt,"Map");function Dn(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Sn,map:new(Ln||Cn),string:new Sn}},kn.prototype.delete=function(t){var e=Dn(this,t).delete(t);return this.size-=e?1:0,e},kn.prototype.get=function(t){return Dn(this,t).get(t)},kn.prototype.has=function(t){return Dn(this,t).has(t)},kn.prototype.set=function(t,e){var n=Dn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Rn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Rn.Cache||kn),n}Rn.Cache=kn;var In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pn=/\\(\\)?/g,Nn=function(t){var e=Rn(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(In,(function(t,n,r,i){e.push(r?i.replace(Pn,"$1"):n||t)})),e}));function Bn(t){return null==t?"":Kt(t)}function Un(t,e){return Zt(t)?t:En(t,e)?[t]:Nn(Bn(t))}function Vn(t){if("string"==typeof t||Wt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Hn(t,e){for(var n=0,r=(e=Un(e,t)).length;null!=t&&n<r;)t=t[Vn(e[n++])];return n&&n==r?t:void 0}function Gn(t,e,n){var r=null==t?void 0:Hn(t,e);return void 0===r?n:r}function zn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var jn=Nt?Nt.isConcatSpreadable:void 0;function Fn(t){return Zt(t)||Ke(t)||!!(jn&&t&&t[jn])}function Wn(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Fn),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wn(s,e-1,n,r,i):zn(i,s):r||(i[i.length]=s)}return i}function qn(t){return(null==t?0:t.length)?Wn(t,1):[]}var Zn=dn(Object.getPrototypeOf,Object),Yn=Function.prototype,Xn=Object.prototype,Kn=Yn.toString,Qn=Xn.hasOwnProperty,$n=Kn.call(Object);function Jn(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}(t,e,n)}var tr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function er(t){return tr.test(t)}var nr="[\\ud800-\\udfff]",rr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ir="\\ud83c[\\udffb-\\udfff]",or="[^\\ud800-\\udfff]",ar="(?:\\ud83c[\\udde6-\\uddff]){2}",sr="[\\ud800-\\udbff][\\udc00-\\udfff]",lr="(?:"+rr+"|"+ir+")"+"?",ur="[\\ufe0e\\ufe0f]?"+lr+("(?:\\u200d(?:"+[or,ar,sr].join("|")+")[\\ufe0e\\ufe0f]?"+lr+")*"),cr="(?:"+[or+rr+"?",rr,ar,sr,nr].join("|")+")",hr=RegExp(ir+"(?="+ir+")|"+cr+ur,"g");function dr(t){return er(t)?function(t){return t.match(hr)||[]}(t):function(t){return t.split("")}(t)}var fr,pr=(fr="toUpperCase",function(t){var e=er(t=Bn(t))?dr(t):void 0,n=e?e[0]:t.charAt(0),r=e?Jn(e,1).join(""):t.slice(1);return n[fr]()+r});var vr=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),gr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mr=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var yr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var br=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var xr="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_r="["+xr+"]",Er="\\d+",wr="[\\u2700-\\u27bf]",Or="[a-z\\xdf-\\xf6\\xf8-\\xff]",Tr="[^\\ud800-\\udfff"+xr+Er+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Sr="(?:\\ud83c[\\udde6-\\uddff]){2}",Mr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Cr="(?:"+Or+"|"+Tr+")",Lr="(?:"+Ar+"|"+Tr+")",Dr="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",kr="[\\ufe0e\\ufe0f]?"+Dr+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Sr,Mr].join("|")+")[\\ufe0e\\ufe0f]?"+Dr+")*"),Rr="(?:"+[wr,Sr,Mr].join("|")+")"+kr,Ir=RegExp([Ar+"?"+Or+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[_r,Ar,"$"].join("|")+")",Lr+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[_r,Ar+Cr,"$"].join("|")+")",Ar+"?"+Cr+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ar+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Er,Rr].join("|"),"g");function Pr(t,e,n){return t=Bn(t),void 0===(e=n?void 0:e)?function(t){return br.test(t)}(t)?function(t){return t.match(Ir)||[]}(t):function(t){return t.match(yr)||[]}(t):t.match(e)||[]}var Nr=RegExp("['’]","g");function Br(t){return function(e){return function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}(Pr(function(t){return(t=Bn(t))&&t.replace(gr,vr).replace(mr,"")}(e).replace(Nr,"")),t,"")}}var Ur=Br((function(t,e,n){return e=e.toLowerCase(),t+(n?pr(Bn(e).toLowerCase()):e)}));function Vr(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=oe(n))==n?n:0),void 0!==e&&(e=(e=oe(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(oe(t),e,n)}function Hr(t){var e=this.__data__=new Cn(t);this.size=e.size}Hr.prototype.clear=function(){this.__data__=new Cn,this.size=0},Hr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Hr.prototype.get=function(t){return this.__data__.get(t)},Hr.prototype.has=function(t){return this.__data__.has(t)},Hr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Cn){var r=n.__data__;if(!Ln||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new kn(r)}return n.set(t,e),this.size=n.size,this};var Gr="object"==typeof t&&t&&!t.nodeType&&t,zr=Gr&&"object"==typeof module&&module&&!module.nodeType&&module,jr=zr&&zr.exports===Gr?Pt.Buffer:void 0,Fr=jr?jr.allocUnsafe:void 0;function Wr(t,e){if(e)return t.slice();var n=t.length,r=Fr?Fr(n):new t.constructor(n);return t.copy(r),r}function qr(){return[]}var Zr=Object.prototype.propertyIsEnumerable,Yr=Object.getOwnPropertySymbols,Xr=Yr?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Yr(t),(function(e){return Zr.call(t,e)})))}:qr;var Kr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)zn(e,Xr(t)),t=Zn(t);return e}:qr;function Qr(t,e,n){var r=e(t);return Zt(t)?r:zn(r,n(t))}function $r(t){return Qr(t,gn,Xr)}function Jr(t){return Qr(t,bn,Kr)}var ti=xe(Pt,"DataView"),ei=xe(Pt,"Promise"),ni=xe(Pt,"Set"),ri=de(ti),ii=de(Ln),oi=de(ei),ai=de(ni),si=de(_e),li=jt;(ti&&"[object DataView]"!=li(new ti(new ArrayBuffer(1)))||Ln&&"[object Map]"!=li(new Ln)||ei&&"[object Promise]"!=li(ei.resolve())||ni&&"[object Set]"!=li(new ni)||_e&&"[object WeakMap]"!=li(new _e))&&(li=function(t){var e=jt(t),n="[object Object]"==e?t.constructor:void 0,r=n?de(n):"";if(r)switch(r){case ri:return"[object DataView]";case ii:return"[object Map]";case oi:return"[object Promise]";case ai:return"[object Set]";case si:return"[object WeakMap]"}return e});var ui=li,ci=Object.prototype.hasOwnProperty;var hi=Pt.Uint8Array;function di(t){var e=new t.constructor(t.byteLength);return new hi(e).set(new hi(t)),e}var fi=/\w*$/;var pi=Nt?Nt.prototype:void 0,vi=pi?pi.valueOf:void 0;function gi(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function mi(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return di(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return gi(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,fi.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,vi?Object(vi.call(r)):{}}}function yi(t){return"function"!=typeof t.constructor||We(t)?{}:we(Zn(t))}var bi=sn&&sn.isMap,xi=bi?nn(bi):function(t){return Ft(t)&&"[object Map]"==ui(t)};var _i=sn&&sn.isSet,Ei=_i?nn(_i):function(t){return Ft(t)&&"[object Set]"==ui(t)},wi={};function Oi(t,e,n,r,i,o){var a,s=1&e,l=2&e,u=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!te(t))return t;var c=Zt(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ci.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Te(t,a)}else{var h=ui(t),d="[object Function]"==h||"[object GeneratorFunction]"==h;if(tn(t))return Wr(t,s);if("[object Object]"==h||"[object Arguments]"==h||d&&!i){if(a=l||d?{}:yi(t),!s)return l?function(t,e){return Ue(t,Kr(t),e)}(t,function(t,e){return t&&Ue(e,bn(e),t)}(a,t)):function(t,e){return Ue(t,Xr(t),e)}(t,function(t,e){return t&&Ue(e,gn(e),t)}(a,t))}else{if(!wi[h])return i?t:{};a=mi(t,h,s)}}o||(o=new Hr);var f=o.get(t);if(f)return f;o.set(t,a),Ei(t)?t.forEach((function(r){a.add(Oi(r,e,n,r,t,o))})):xi(t)&&t.forEach((function(r,i){a.set(i,Oi(r,e,n,i,t,o))}));var p=c?void 0:(u?l?Jr:$r:l?bn:gn)(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(p||t,(function(r,i){p&&(r=t[i=r]),Be(a,i,Oi(r,e,n,i,t,o))})),a}wi["[object Arguments]"]=wi["[object Array]"]=wi["[object ArrayBuffer]"]=wi["[object DataView]"]=wi["[object Boolean]"]=wi["[object Date]"]=wi["[object Float32Array]"]=wi["[object Float64Array]"]=wi["[object Int8Array]"]=wi["[object Int16Array]"]=wi["[object Int32Array]"]=wi["[object Map]"]=wi["[object Number]"]=wi["[object Object]"]=wi["[object RegExp]"]=wi["[object Set]"]=wi["[object String]"]=wi["[object Symbol]"]=wi["[object Uint8Array]"]=wi["[object Uint8ClampedArray]"]=wi["[object Uint16Array]"]=wi["[object Uint32Array]"]=!0,wi["[object Error]"]=wi["[object Function]"]=wi["[object WeakMap]"]=!1;function Ti(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new kn;++e<n;)this.add(t[e])}function Si(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Mi(t,e){return t.has(e)}Ti.prototype.add=Ti.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ti.prototype.has=function(t){return this.__data__.has(t)};function Ai(t,e,n,r,i,o){var a=1&n,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,d=!0,f=2&n?new Ti:void 0;for(o.set(t,e),o.set(e,t);++h<s;){var p=t[h],v=e[h];if(r)var g=a?r(v,p,h,e,t,o):r(p,v,h,t,e,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!Si(e,(function(t,e){if(!Mi(f,e)&&(p===t||i(p,t,n,r,o)))return f.push(e)}))){d=!1;break}}else if(p!==v&&!i(p,v,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Ci(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Li(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Di=Nt?Nt.prototype:void 0,ki=Di?Di.valueOf:void 0;var Ri=Object.prototype.hasOwnProperty;var Ii=Object.prototype.hasOwnProperty;function Pi(t,e,n,r,i,o){var a=Zt(t),s=Zt(e),l=a?"[object Array]":ui(t),u=s?"[object Array]":ui(e),c="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),h="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),d=l==u;if(d&&tn(t)){if(!tn(e))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new Hr),a||un(t)?Ai(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new hi(t),new hi(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Pe(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Ci;case"[object Set]":var l=1&r;if(s||(s=Li),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var c=Ai(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(ki)return ki.call(t)==ki.call(e)}return!1}(t,e,l,n,r,i,o);if(!(1&n)){var f=c&&Ii.call(t,"__wrapped__"),p=h&&Ii.call(e,"__wrapped__");if(f||p){var v=f?t.value():t,g=p?e.value():e;return o||(o=new Hr),i(v,g,n,r,o)}}return!!d&&(o||(o=new Hr),function(t,e,n,r,i,o){var a=1&n,s=$r(t),l=s.length;if(l!=$r(e).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in e:Ri.call(e,c)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=a;++u<l;){var v=t[c=s[u]],g=e[c];if(r)var m=a?r(g,v,c,e,t,o):r(v,g,c,t,e,o);if(!(void 0===m?v===g||i(v,g,n,r,o):m)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var y=t.constructor,b=e.constructor;y!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function Ni(t,e,n,r,i){return t===e||(null==t||null==e||!Ft(t)&&!Ft(e)?t!=t&&e!=e:Pi(t,e,n,r,Ni,i))}function Bi(t){return t==t&&!te(t)}function Ui(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Vi(t){var e=function(t){for(var e=gn(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Bi(i)]}return e}(t);return 1==e.length&&e[0][2]?Ui(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var l=(s=n[i])[0],u=t[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in t))return!1}else{var h=new Hr;if(r)var d=r(u,c,l,t,e,h);if(!(void 0===d?Ni(c,u,3,r,h):d))return!1}}return!0}(n,t,e)}}function Hi(t,e){return null!=t&&e in Object(t)}function Gi(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Un(e,t)).length,o=!1;++r<i;){var a=Vn(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ge(i)&&Re(a,i)&&(Zt(t)||Ke(t))}(t,e,Hi)}function zi(t){return En(t)?(e=Vn(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Hn(e,t)}}(t);var e}function ji(t){return"function"==typeof t?t:null==t?ae:"object"==typeof t?Zt(t)?function(t,e){return En(t)&&Bi(e)?Ui(Vn(t),e):function(n){var r=Gn(n,t);return void 0===r&&r===e?Gi(n,t):Ni(e,r,3)}}(t[0],t[1]):Vi(t):zi(t)}function Fi(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}var Wi,qi=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Wi?a:++r];if(!1===e(i[s],s,i))break}return t};var Zi=function(t,e){return function(n,r){if(null==n)return n;if(!ze(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&qi(t,e,gn)}));function Yi(t,e,n,r){return Zi(t,(function(t,i,o){e(r,t,n(t),o)})),r}var Xi=function(){return Pt.Date.now()},Ki=Math.max,Qi=Math.min;function $i(t,e,n){var r,i,o,a,s,l,u=0,c=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,u=e,a=t.apply(o,n)}function p(t){return u=t,s=setTimeout(g,e),c?f(t):a}function v(t){var n=t-l;return void 0===l||n>=e||n<0||h&&t-u>=o}function g(){var t=Xi();if(v(t))return m(t);s=setTimeout(g,function(t){var n=e-(t-l);return h?Qi(n,o-(t-u)):n}(t))}function m(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function y(){var t=Xi(),n=v(t);if(r=arguments,i=this,l=t,n){if(void 0===s)return p(l);if(h)return clearTimeout(s),s=setTimeout(g,e),f(l)}return void 0===s&&(s=setTimeout(g,e)),a}return e=oe(e)||0,te(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Ki(oe(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?a:m(Xi())},y}function Ji(t,e,n){(void 0===n||Pe(t[e],n))&&(void 0!==n||e in t)||Ie(t,e,n)}function to(t){return Ft(t)&&ze(t)}function eo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function no(t,e,n,r,i,o,a){var s=eo(t,n),l=eo(e,n),u=a.get(l);if(u)Ji(t,n,u);else{var c=o?o(s,l,n+"",t,e,a):void 0,h=void 0===c;if(h){var d=Zt(l),f=!d&&tn(l),p=!d&&!f&&un(l);c=l,d||f||p?Zt(s)?c=s:to(s)?c=Te(s):f?(h=!1,c=Wr(l,!0)):p?(h=!1,c=gi(l,!0)):c=[]:function(t){if(!Ft(t)||"[object Object]"!=jt(t))return!1;var e=Zn(t);if(null===e)return!0;var n=Qn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Kn.call(n)==$n}(l)||Ke(l)?(c=s,Ke(s)?c=function(t){return Ue(t,bn(t))}(s):te(s)&&!se(s)||(c=yi(l))):h=!1}h&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),Ji(t,n,c)}}function ro(t,e,n,r,i){t!==e&&qi(e,(function(o,a){if(i||(i=new Hr),te(o))no(t,e,a,n,ro,r,i);else{var s=r?r(eo(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Ji(t,a,s)}}),bn)}function io(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function oo(t,e){var n=-1,r=ze(t)?Array(t.length):[];return Zi(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function ao(t,e){return Wn(function(t,e){return(Zt(t)?qt:oo)(t,ji(e))}(t,e),1/0)}var so,lo,uo=Object.prototype.hasOwnProperty,co=(so=function(t,e,n){uo.call(t,n)?t[n].push(e):Ie(t,n,[e])},function(t,e){var n=Zt(t)?Fi:Yi,r=lo?lo():{};return n(t,so,ji(e),r)}),ho=Object.prototype.hasOwnProperty;function fo(t){if(null==t)return!0;if(ze(t)&&(Zt(t)||"string"==typeof t||"function"==typeof t.splice||tn(t)||un(t)||Ke(t)))return!t.length;var e=ui(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(We(t))return!vn(t).length;for(var n in t)if(ho.call(t,n))return!1;return!0}function po(t,e){return Ni(t,e)}var vo,go=Br((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),mo=(vo=function(t,e,n){ro(t,e,n)},He((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=vo.length>3&&"function"==typeof i?(r--,i):void 0,o&&je(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&vo(t,a,n,i)}return t})));function yo(t,e){var n;return Zi(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}var bo=ni&&1/Li(new ni([,-0]))[1]==1/0?function(t){return new ni(t)}:function(){};function xo(t,e,n){var r=-1,i=De,o=t.length,a=!0,s=[],l=s;if(n)a=!1,i=io;else if(o>=200){var u=e?null:bo(t);if(u)return Li(u);a=!1,i=Mi,l=new Ti}else l=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue t;e&&l.push(h),s.push(c)}else i(l,h,n)||(l!==s&&l.push(h),s.push(c))}return s}var _o=He((function(t){var e=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}(t);return to(e)&&(e=void 0),xo(Wn(t,1,to,!0),ji(e))}));var Eo="http://www.w3.org/1999/xhtml",wo={svg:"http://www.w3.org/2000/svg",xhtml:Eo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oo(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),wo.hasOwnProperty(e)?{space:wo[e],local:t}:t}function To(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Eo&&e.documentElement.namespaceURI===Eo?e.createElement(t):e.createElementNS(n,t)}}function So(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Mo(t){var e=Oo(t);return(e.local?So:To)(e)}function Ao(){}function Co(t){return null==t?Ao:function(){return this.querySelector(t)}}function Lo(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Do(){return[]}function ko(t){return null==t?Do:function(){return this.querySelectorAll(t)}}function Ro(t){return function(){return this.matches(t)}}function Io(t){return function(e){return e.matches(t)}}var Po=Array.prototype.find;function No(){return this.firstElementChild}var Bo=Array.prototype.filter;function Uo(){return Array.from(this.children)}function Vo(t){return new Array(t.length)}function Ho(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Go(t){return function(){return t}}function zo(t,e,n,r,i,o){for(var a,s=0,l=e.length,u=o.length;s<u;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Ho(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function jo(t,e,n,r,i,o,a){var s,l,u,c=new Map,h=e.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(f[s]=u=a.call(l,l.__data__,s,e)+"",c.has(u)?i[s]=l:c.set(u,l));for(s=0;s<d;++s)u=a.call(t,o[s],s,o)+"",(l=c.get(u))?(r[s]=l,l.__data__=o[s],c.delete(u)):n[s]=new Ho(t,o[s]);for(s=0;s<h;++s)(l=e[s])&&c.get(f[s])===l&&(i[s]=l)}function Fo(t){return t.__data__}function Wo(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function qo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Zo(t){return function(){this.removeAttribute(t)}}function Yo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xo(t,e){return function(){this.setAttribute(t,e)}}function Ko(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Qo(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function $o(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Jo(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ta(t){return function(){this.style.removeProperty(t)}}function ea(t,e,n){return function(){this.style.setProperty(t,e,n)}}function na(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ra(t,e){return t.style.getPropertyValue(e)||Jo(t).getComputedStyle(t,null).getPropertyValue(e)}function ia(t){return function(){delete this[t]}}function oa(t,e){return function(){this[t]=e}}function aa(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function sa(t){return t.trim().split(/^|\s+/)}function la(t){return t.classList||new ua(t)}function ua(t){this._node=t,this._names=sa(t.getAttribute("class")||"")}function ca(t,e){for(var n=la(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ha(t,e){for(var n=la(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function da(t){return function(){ca(this,t)}}function fa(t){return function(){ha(this,t)}}function pa(t,e){return function(){(e.apply(this,arguments)?ca:ha)(this,t)}}function va(){this.textContent=""}function ga(t){return function(){this.textContent=t}}function ma(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ya(){this.innerHTML=""}function ba(t){return function(){this.innerHTML=t}}function xa(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function _a(){this.nextSibling&&this.parentNode.appendChild(this)}function Ea(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wa(){return null}function Oa(){var t=this.parentNode;t&&t.removeChild(this)}function Ta(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Sa(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ma(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Aa(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Ca(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function La(t,e,n){var r=Jo(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Da(t,e){return function(){return La(this,t,e)}}function ka(t,e){return function(){return La(this,t,e.apply(this,arguments))}}Ho.prototype={constructor:Ho,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},ua.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ra=[null];function Ia(t,e){this._groups=t,this._parents=e}function Pa(){return new Ia([[document.documentElement]],Ra)}function Na(t){return"string"==typeof t?new Ia([[document.querySelector(t)]],[document.documentElement]):new Ia([[t]],Ra)}function Ba(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}Ia.prototype=Pa.prototype={constructor:Ia,select:function(t){"function"!=typeof t&&(t=Co(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],l=s.length,u=r[i]=new Array(l),c=0;c<l;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),u[c]=a);return new Ia(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Lo(t.apply(this,arguments))}}(t):ko(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],l=s.length,u=0;u<l;++u)(a=s[u])&&(r.push(t.call(a,a.__data__,u,s)),i.push(a));return new Ia(r,i)},selectChild:function(t){return this.select(null==t?No:function(t){return function(){return Po.call(this.children,t)}}("function"==typeof t?t:Io(t)))},selectChildren:function(t){return this.selectAll(null==t?Uo:function(t){return function(){return Bo.call(this.children,t)}}("function"==typeof t?t:Io(t)))},filter:function(t){"function"!=typeof t&&(t=Ro(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],u=0;u<s;++u)(o=a[u])&&t.call(o,o.__data__,u,a)&&l.push(o);return new Ia(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Fo);var n=e?jo:zo,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Go(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],h=i[u],d=h.length,f=Wo(t.call(c,c&&c.__data__,u,r)),p=f.length,v=s[u]=new Array(p),g=a[u]=new Array(p),m=l[u]=new Array(d);n(c,h,v,g,m,f,e);for(var y,b,x=0,_=0;x<p;++x)if(y=v[x]){for(x>=_&&(_=x+1);!(b=g[_])&&++_<p;);y._next=b||null}}return(a=new Ia(a,r))._enter=s,a._exit=l,a},enter:function(){return new Ia(this._enter||this._groups.map(Vo),this._parents)},exit:function(){return new Ia(this._exit||this._groups.map(Vo),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u,c=n[l],h=r[l],d=c.length,f=s[l]=new Array(d),p=0;p<d;++p)(u=c[p]||h[p])&&(f[p]=u);for(;l<i;++l)s[l]=n[l];return new Ia(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=qo);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,u=i[o]=new Array(l),c=0;c<l;++c)(a=s[c])&&(u[c]=a);u.sort(e)}return new Ia(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=Oo(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Yo:Zo:"function"==typeof e?n.local?$o:Qo:n.local?Ko:Xo)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?ta:"function"==typeof e?na:ea)(t,e,null==n?"":n)):ra(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?ia:"function"==typeof e?aa:oa)(t,e)):this.node()[t]},classed:function(t,e){var n=sa(t+"");if(arguments.length<2){for(var r=la(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?pa:e?da:fa)(n,e))},text:function(t){return arguments.length?this.each(null==t?va:("function"==typeof t?ma:ga)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ya:("function"==typeof t?xa:ba)(t)):this.node().innerHTML},raise:function(){return this.each(_a)},lower:function(){return this.each(Ea)},append:function(t){var e="function"==typeof t?t:Mo(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Mo(t),r=null==e?wa:"function"==typeof e?e:Co(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Oa)},clone:function(t){return this.select(t?Sa:Ta)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Ma(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Ca:Aa,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var l,u=0,c=s.length;u<c;++u)for(r=0,l=s[u];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?ka:Da)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Ua=function(t){return Oi(t,5)},Va=function(t){return t&&t.length?xo(t):[]};function Ha(t,e){var n,r,i=Ua(t),o=Object.keys(e.axes||{});for(var a in(null===(r=null===(n=e)||void 0===n?void 0:n.toolbar)||void 0===r?void 0:r.controls)&&delete i.toolbar.controls,0===o.length&&delete i.axes,i.axes)if(o.includes(a)){var s=e.axes[a];(s.primary||s.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");var l=s.mapsTo;if(null==l){var u=s.scaleType;null==u?s.mapsTo="value":u===H.TIME?s.mapsTo="date":u===H.LABELS&&(s.mapsTo="key")}}else delete i.axes[a];return Wa(i,e),mo(i,e)}function Ga(t){if(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null}}function za(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}}function ja(t,e,n){void 0===n&&(n="value");var r=t/e.reduce((function(t,e){return t+e[n]}),0)*100;return r%1!=0?parseFloat(r.toFixed(1)):r}function Fa(t,e,n){return n>t.length?t:e===U.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===U.FRONT_LINE?"..."+t.substr(-n):e===U.END_LINE?t.substr(0,n)+"...":void 0}function Wa(t,e){var n=qa(t,"legend","additionalItems"),r=qa(e,"legend","additionalItems");if(n&&r){var i=r.map((function(t){return t.type})),o=n.map((function(t){return t.type})),a=kt.filter((function(t){return o.includes(t.type)&&!i.includes(t.type)}));t.legend.additionalItems=a,e.legend.additionalItems=_o(a,r,"name")}}var qa=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t;if(r){for(var i=0,o=e;i<o.length;i++){var a=o[i];if(null===r[a]||void 0===r[a])return null;r=r[a]}return r}return null},Za=function(t,e){return e===V.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t},Ya=function(t,e){var n=Za(t,e),r=n.x0,i=n.x1,o=n.y0,a=n.y1;return"M"+r+","+o+"L"+r+","+a+"L"+i+","+a+"L"+i+","+o+"L"+r+","+o};function Xa(t,e,n){return n===V.VERTICAL?[t,e]:[e,t]}function Ka(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Qa(t,e){return t(e={exports:{}},e.exports),e.exports}var $a=Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var i;r=r||{},i="string"==typeof n[t]?n[t]:1===e?n[t].one:n[t].other.replace("{{count}}",e);if(r.addSuffix)return r.comparison>0?"in "+i:i+" ago";return i};var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};t.exports=e.default}));Ka($a);var Ja=Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}},t.exports=e.default}));Ka(Ja);var ts=Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ja)&&n.__esModule?n:{default:n};var i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.default=i,t.exports=e.default}));Ka(ts);var es=Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,i){return n[t]};var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};t.exports=e.default}));Ka(es);var ns=Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,l=i.width?String(i.width):t.defaultWidth;r=t.values[l]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));Ka(ns);var rs=Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ns)&&n.__esModule?n:{default:n};var i={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};e.default=i,t.exports=e.default}));Ka(rs);var is=Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=r.match(t.matchPattern);if(!o)return null;var a=o[0],s=r.match(t.parsePattern);if(!s)return null;var l=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(a.length)}}},t.exports=e.default}));Ka(is);var os=Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var l,u=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),l=t.valueCallback?t.valueCallback(l):l,{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(u.length)}}},t.exports=e.default}));Ka(os);var as=Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(is),r=i(os);function i(t){return t&&t.__esModule?t:{default:t}}var o={ordinalNumber:(0,n.default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.default=o,t.exports=e.default}));Ka(as);var ss=Ka(Qa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s($a),r=s(ts),i=s(es),o=s(rs),a=s(as);function s(t){return t&&t.__esModule?t:{default:t}}var l={code:"en-US",formatDistance:n.default,formatLong:r.default,formatRelative:i.default,localize:o.default,match:a.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=l,t.exports=e.default}))),ls={type:U.END_LINE,threshold:16,numCharacter:14},us={enabled:!0,position:G.BOTTOM,clickable:!0,truncation:ls,alignment:z.LEFT,order:null,additionalItems:[]},cs={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},hs={enabled:!0},ds={enabled:!0,showTotal:!0,truncation:ls,groupLabel:"Group"},fs={top:{visible:!0,includeZero:!0,truncation:ls},bottom:{visible:!0,includeZero:!0,truncation:ls},left:{visible:!0,includeZero:!0,truncation:ls},right:{visible:!0,includeZero:!0,truncation:ls}},ps={addSpaceOnEdges:1,showDayName:!1,localeObject:ss,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},vs="undefined"!=typeof document&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),gs={width:null,height:null,resizable:!0,theme:I.WHITE,tooltip:ds,legend:us,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:k([{type:rt.SHOW_AS_DATATABLE}],vs?[{type:rt.MAKE_FULLSCREEN}]:[],[{type:rt.EXPORT_CSV},{type:rt.EXPORT_PNG},{type:rt.EXPORT_JPG}])}},ms=mo({},gs,{axes:fs,timeScale:ps,grid:cs,ruler:hs,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:B.GRAPH_VIEW}}}),ys=mo({},ms,{bars:{maxWidth:16,spacingFactor:.25},timeScale:mo(ps,{addSpaceOnEdges:1})}),bs=mo({},ys,{}),xs=mo({},ys,{}),_s=mo({},ys,{bars:mo({},ys.bars,{dividerSize:1.5})}),Es=mo({},ys,{}),ws=mo({},ms,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Os=ws,Ts=mo({},ws,{points:{radius:3,filled:!1,enabled:!0}}),Ss=mo({},Ts,{timeScale:mo(ps,{addSpaceOnEdges:0})}),Ms=Ss,As=mo({},ms,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:ot.RADIUS,name:"Radius"}]}}),Cs=mo({},ms,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:ot.AREA,name:"Poor area"},{type:ot.AREA,name:"Satisfactory area"},{type:ot.AREA,name:"Great area"},{type:ot.QUARTILE,name:"Quartiles"}]}}),Ls=mo({},ys,{bars:{dividerSize:1.5},timeScale:mo(ps,{addSpaceOnEdges:0})}),Ds=mo({},gs,{tooltip:mo({},ds,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:function(t,e){var n=Math.min(t.width,t.height);return[20*n/400,75*n/400]},wordMapsTo:"word"}}),ks=mo({},gs,{pie:{labels:{formatter:null,enabled:!0},alignment:z.LEFT,sortFunction:null,valueMapsTo:"value"}}),Rs=mo({},gs,{legend:{enabled:!1},gauge:{type:$.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:function(t){return t/8},valueFontSize:function(t){return t/2.5},numberFormatter:function(t){return t.toFixed(2)%1!=0?t.toFixed(2).toLocaleString():t.toFixed().toLocaleString()},alignment:z.LEFT}}),Is=mo({},ks,{donut:{center:{numberFontSize:function(t){return Math.min(t/100*24,24)+"px"},titleFontSize:function(t){return Math.min(t/100*15,15)+"px"},titleYPosition:function(t){return Math.min(t/80*20,20)},numberFormatter:function(t){return Math.floor(t).toLocaleString()}},alignment:z.LEFT}}),Ps=mo({},gs,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),Ns={chart:gs,axisChart:ms,simpleBarChart:bs,groupedBarChart:xs,stackedBarChart:_s,boxplotChart:Es,bubbleChart:As,bulletChart:Cs,histogramChart:Ls,lineChart:Ts,areaChart:Ss,stackedAreaChart:Ms,scatterChart:ws,lollipopChart:Os,pieChart:ks,donutChart:Is,meterChart:Ps,proportionalMeterChart:mo({},Ps,{legend:{enabled:!0}}),radarChart:mo({},gs,{radar:{axes:{angle:"key",value:"value"},alignment:z.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:Rs,comboChart:mo({},ys,{comboChartTypes:[]}),treeChart:mo({tree:{type:F.TREE}},gs,{}),treemapChart:mo({},gs,{data:mo(gs.data,{groupMapsTo:"name"})}),circlePackChart:mo({},gs,mt,{data:mo(gs.data,{groupMapsTo:"name"})}),wordCloudChart:Ds,alluvialChart:mo({},gs,{alluvial:{data:mo(gs.data,{groupMapsTo:"source"}),nodeAlignment:z.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),heatmapChart:mo({},gs,{axes:fs,heatmap:{divider:{state:st.AUTO},colorLegend:{type:"linear"}}})},Bs=Object.freeze({__proto__:null,grid:cs,ruler:hs,baseTooltip:ds,timeScale:ps,options:Ns,carbonPrefix:"cds",area:pt,axis:vt,canvasZoomSettings:gt,circlePack:mt,color:yt,boxplot:bt,histogram:xt,legend:_t,lines:Et,meter:wt,pie:Ot,radar:Tt,alluvial:St,heatmap:Mt,spacers:At,tooltips:Ct,transitions:Lt,toolbar:{buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},zoomBar:Dt,defaultLegendAdditionalItems:kt});function Us(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Vs(t){let e=t,n=t;function r(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const o=r+i>>>1;n(t[o],e)<0?r=o+1:i=o}return r}return 1===t.length&&(e=(e,n)=>t(e)-n,n=function(t){return(e,n)=>Us(t(e),n)}(t)),{left:r,center:function(t,n,i,o){null==i&&(i=0),null==o&&(o=t.length);const a=r(t,n,i,o-1);return a>i&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const o=r+i>>>1;n(t[o],e)>0?i=o:r=o+1}return r}}}const Hs=Vs(Us).right;Vs((function(t){return null===t?NaN:+t})).center;function Gs(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class zs extends Map{constructor(t,e=Fs){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(js(this,t))}has(t){return super.has(js(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);t.has(r)&&(n=t.get(n),t.delete(r));return n}(this,t))}}function js({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Fs(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Ws(t){return t}var qs=Array.prototype.slice;function Zs(t){return function(){return t}}var Ys=Math.sqrt(50),Xs=Math.sqrt(10),Ks=Math.sqrt(2);function Qs(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=$s(t,e,n))||!isFinite(a))return[];if(a>0){let n=Math.round(t/a),r=Math.round(e/a);for(n*a<t&&++n,r*a>e&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)*a}else{a=-a;let n=Math.round(t*a),r=Math.round(e*a);for(n/a<t&&++n,r/a>e&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)/a}return r&&o.reverse(),o}function $s(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Ys?10:o>=Xs?5:o>=Ks?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Ys?10:o>=Xs?5:o>=Ks?2:1)}function Js(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Ys?i*=10:o>=Xs?i*=5:o>=Ks&&(i*=2),e<t?-i:i}function tl(t){return Math.ceil(Math.log(function(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}(t))/Math.LN2)+1}function el(){var t=Ws,e=Gs,n=tl;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a=r.length,s=new Array(a);for(i=0;i<a;++i)s[i]=t(r[i],i,r);var l=e(s),u=l[0],c=l[1],h=n(s,u,c);if(!Array.isArray(h)){const t=c,n=+h;if(e===Gs&&([u,c]=function(t,e,n){let r;for(;;){const i=$s(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(u,c,n)),(h=Qs(u,c,n))[h.length-1]>=c)if(t>=c&&e===Gs){const t=$s(u,c,n);isFinite(t)&&(t>0?c=(Math.floor(c/t)+1)*t:t<0&&(c=(Math.ceil(c*-t)+1)/-t))}else h.pop()}for(var d=h.length;h[0]<=u;)h.shift(),--d;for(;h[d-1]>c;)h.pop(),--d;var f,p=new Array(d+1);for(i=0;i<=d;++i)(f=p[i]=[]).x0=i>0?h[i-1]:u,f.x1=i<d?h[i]:c;for(i=0;i<a;++i)null!=(o=s[i])&&u<=o&&o<=c&&p[Hs(h,o,0,d)].push(r[i]);return p}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:Zs(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:Zs([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Zs(qs.call(t)):Zs(t),r):n},r}function nl(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function rl(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function il(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ol(t,e,n){if(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n))).length){if((e=+e)<=0||r<2)return rl(t);if(e>=1)return nl(t);var r,i=(r-1)*e,o=Math.floor(i),a=nl(function t(e,n,r=0,i=e.length-1,o=Us){for(;i>r;){if(i-r>600){const a=i-r+1,s=n-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,n,Math.max(r,Math.floor(n-s*u/a+c)),Math.min(i,Math.floor(n+(a-s)*u/a+c)),o)}const a=e[n];let s=r,l=i;for(il(e,r,n),o(e[i],a)>0&&il(e,r,i);s<l;){for(il(e,s,l),++s,--l;o(e[s],a)<0;)++s;for(;o(e[l],a)>0;)--l}0===o(e[r],a)?il(e,r,l):(++l,il(e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}return e}(t,o).subarray(0,o+1));return a+(rl(t.subarray(o+1))-a)*(i-o)}}function al(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}function sl(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const ll=Symbol("implicit");function ul(){var t=new zs,e=[],n=[],r=ll;function i(i){let o=t.get(i);if(void 0===o){if(r!==ll)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new zs;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ul(e,n).unknown(r)},sl.apply(i,arguments),i}function cl(){var t,e,n=ul().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,u=0,c=.5;function h(){var n=r().length,h=a<o,d=h?a:o,f=h?o:a;t=(f-d)/Math.max(1,n-l+2*u),s&&(t=Math.floor(t)),d+=(f-d-t*(n-l))*c,e=t*(1-l),s&&(d=Math.round(d),e=Math.round(e));var p=al(n).map((function(e){return d+t*e}));return i(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),h()):r()},n.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,h()):[o,a]},n.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,s=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,h()):s},n.padding=function(t){return arguments.length?(l=Math.min(1,u=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(u=+t,h()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),h()):c},n.copy=function(){return cl(r(),[o,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},sl.apply(h(),arguments)}function hl(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function dl(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fl(){}var pl="\\s*([+-]?\\d+)\\s*",vl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",gl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ml=/^#([0-9a-f]{3,8})$/,yl=new RegExp("^rgb\\("+[pl,pl,pl]+"\\)$"),bl=new RegExp("^rgb\\("+[gl,gl,gl]+"\\)$"),xl=new RegExp("^rgba\\("+[pl,pl,pl,vl]+"\\)$"),_l=new RegExp("^rgba\\("+[gl,gl,gl,vl]+"\\)$"),El=new RegExp("^hsl\\("+[vl,gl,gl]+"\\)$"),wl=new RegExp("^hsla\\("+[vl,gl,gl,vl]+"\\)$"),Ol={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Tl(){return this.rgb().formatHex()}function Sl(){return this.rgb().formatRgb()}function Ml(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ml.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Al(e):3===n?new kl(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Cl(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Cl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=yl.exec(t))?new kl(e[1],e[2],e[3],1):(e=bl.exec(t))?new kl(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=xl.exec(t))?Cl(e[1],e[2],e[3],e[4]):(e=_l.exec(t))?Cl(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=El.exec(t))?Nl(e[1],e[2]/100,e[3]/100,1):(e=wl.exec(t))?Nl(e[1],e[2]/100,e[3]/100,e[4]):Ol.hasOwnProperty(t)?Al(Ol[t]):"transparent"===t?new kl(NaN,NaN,NaN,0):null}function Al(t){return new kl(t>>16&255,t>>8&255,255&t,1)}function Cl(t,e,n,r){return r<=0&&(t=e=n=NaN),new kl(t,e,n,r)}function Ll(t){return t instanceof fl||(t=Ml(t)),t?new kl((t=t.rgb()).r,t.g,t.b,t.opacity):new kl}function Dl(t,e,n,r){return 1===arguments.length?Ll(t):new kl(t,e,n,null==r?1:r)}function kl(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Rl(){return"#"+Pl(this.r)+Pl(this.g)+Pl(this.b)}function Il(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Pl(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Nl(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Vl(t,e,n,r)}function Bl(t){if(t instanceof Vl)return new Vl(t.h,t.s,t.l,t.opacity);if(t instanceof fl||(t=Ml(t)),!t)return new Vl;if(t instanceof Vl)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Vl(a,s,l,t.opacity)}function Ul(t,e,n,r){return 1===arguments.length?Bl(t):new Vl(t,e,n,null==r?1:r)}function Vl(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Hl(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}hl(fl,Ml,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Tl,formatHex:Tl,formatHsl:function(){return Bl(this).formatHsl()},formatRgb:Sl,toString:Sl}),hl(kl,Dl,dl(fl,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new kl(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new kl(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Rl,formatHex:Rl,formatRgb:Il,toString:Il})),hl(Vl,Ul,dl(fl,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Vl(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Vl(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new kl(Hl(t>=240?t-240:t+120,i,r),Hl(t,i,r),Hl(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Gl=t=>()=>t;function zl(t){return 1==(t=+t)?jl:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Gl(isNaN(e)?n:e)}}function jl(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Gl(isNaN(t)?e:t)}var Fl=function t(e){var n=zl(e);function r(t,e){var r=n((t=Dl(t)).r,(e=Dl(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=jl(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Wl(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function ql(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Jl(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function Zl(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Yl(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Xl(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Jl(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Kl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ql=new RegExp(Kl.source,"g");function $l(t,e){var n,r,i,o=Kl.lastIndex=Ql.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=Kl.exec(t))&&(r=Ql.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Yl(n,r)})),o=Ql.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function Jl(t,e){var n,r=typeof e;return null==e||"boolean"===r?Gl(e):("number"===r?Yl:"string"===r?(n=Ml(e))?(e=n,Fl):$l:e instanceof Ml?Fl:e instanceof Date?Zl:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Wl:Array.isArray(e)?ql:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Xl:Yl)(t,e)}function tu(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var eu,nu=180/Math.PI,ru={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function iu(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*nu,skewX:Math.atan(l)*nu,scaleX:a,scaleY:s}}function ou(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],l=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var l=a.push("translate(",null,e,null,n);s.push({i:l-4,x:Yl(t,i)},{i:l-2,x:Yl(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Yl(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,l),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Yl(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,l),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Yl(t,n)},{i:s-2,x:Yl(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var au=ou((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ru:iu(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),su=ou((function(t){return null==t?ru:(eu||(eu=document.createElementNS("http://www.w3.org/2000/svg","g")),eu.setAttribute("transform",t),(t=eu.transform.baseVal.consolidate())?iu((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ru)}),", ",")",")");function lu(t){return+t}var uu=[0,1];function cu(t){return t}function hu(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function du(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=hu(i,r),o=n(a,o)):(r=hu(r,i),o=n(o,a)),function(t){return o(r(t))}}function fu(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=hu(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Hs(t,e,1,r)-1;return o[n](i[n](e))}}function pu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function vu(){var t,e,n,r,i,o,a=uu,s=uu,l=Jl,u=cu;function c(){var t,e,n,l=Math.min(a.length,s.length);return u!==cu&&(t=a[0],e=a[l-1],t>e&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),r=l>2?fu:du,i=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(a.map(t),s,l)))(t(u(e)))}return h.invert=function(n){return u(e((o||(o=r(s,a.map(t),Yl)))(n)))},h.domain=function(t){return arguments.length?(a=Array.from(t,lu),c()):a.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=tu,c()},h.clamp=function(t){return arguments.length?(u=!!t||cu,c()):u!==cu},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function gu(){return vu()(cu,cu)}function mu(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function yu(t){return(t=mu(Math.abs(t)))?t[1]:NaN}var bu,xu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _u(t){if(!(e=xu.exec(t)))throw new Error("invalid format: "+t);var e;return new Eu({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Eu(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function wu(t,e){var n=mu(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}_u.prototype=Eu.prototype,Eu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ou={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>wu(100*t,e),r:wu,s:function(t,e){var n=mu(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(bu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+mu(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Tu(t){return t}var Su,Mu,Au,Cu=Array.prototype.map,Lu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Du(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Tu:(e=Cu.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(t.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Tu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Cu.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=_u(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,v=t.comma,g=t.precision,m=t.trim,y=t.type;"n"===y?(v=!0,y="g"):Ou[y]||(void 0===g&&(g=12),m=!0,y="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x="$"===d?o:/[%p]/.test(y)?l:"",_=Ou[y],E=/[defgprs%]/.test(y);function w(t){var i,o,l,d=b,w=x;if("c"===y)w=_(t)+w,t="";else{var O=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:_(Math.abs(t),g),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),O&&0==+t&&"+"!==h&&(O=!1),d=(O?"("===h?h:u:"-"===h||"("===h?"":h)+d,w=("s"===y?Lu[8+bu/3]:"")+w+(O&&"("===h?")":""),E)for(i=-1,o=t.length;++i<o;)if(48>(l=t.charCodeAt(i))||l>57){w=(46===l?a+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}v&&!f&&(t=r(t,1/0));var T=d.length+t.length+w.length,S=T<p?new Array(p-T+1).join(e):"";switch(v&&f&&(t=r(S+t,S.length?p-w.length:1/0),S=""),n){case"<":t=d+t+w+S;break;case"=":t=d+S+t+w;break;case"^":t=S.slice(0,T=S.length>>1)+d+t+w+S.slice(T);break;default:t=S+d+t+w}return s(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=_u(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(yu(e)/3))),i=Math.pow(10,-r),o=Lu[8+r/3];return function(t){return n(i*t)+o}}}}function ku(t,e,n,r){var i,o=Js(t,e,n);switch((r=_u(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(yu(e)/3)))-yu(Math.abs(t)))}(o,a))||(r.precision=i),Au(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,yu(e)-yu(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-yu(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Mu(r)}function Ru(t){var e=t.domain;return t.ticks=function(t){var n=e();return Qs(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ku(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),a=0,s=o.length-1,l=o[a],u=o[s],c=10;for(u<l&&(i=l,l=u,u=i,i=a,a=s,s=i);c-- >0;){if((i=$s(l,u,n))===r)return o[a]=l,o[s]=u,e(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function Iu(){var t=gu();return t.copy=function(){return pu(t,Iu())},sl.apply(t,arguments),Ru(t)}function Pu(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function Nu(t){return Math.log(t)}function Bu(t){return Math.exp(t)}function Uu(t){return-Math.log(-t)}function Vu(t){return-Math.exp(-t)}function Hu(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Gu(t){return function(e){return-t(-e)}}function zu(t){var e,n,r=t(Nu,Bu),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?Hu:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=Gu(e),n=Gu(n),t(Uu,Vu)):t(Nu,Bu),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],l=a[a.length-1];(r=l<s)&&(d=s,s=l,l=d);var u,c,h,d=e(s),f=e(l),p=null==t?10:+t,v=[];if(!(o%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),s>0){for(;d<=f;++d)for(c=1,u=n(d);c<o;++c)if(!((h=u*c)<s)){if(h>l)break;v.push(h)}}else for(;d<=f;++d)for(c=o-1,u=n(d);c>=1;--c)if(!((h=u*c)<s)){if(h>l)break;v.push(h)}2*v.length<p&&(v=Qs(s,l,p))}else v=Qs(d,f,Math.min(f-d,p)).map(n);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=Mu(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(Pu(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Su=Du({thousands:",",grouping:[3],currency:["$",""]}),Mu=Su.format,Au=Su.formatPrefix;var ju=new Date,Fu=new Date;function Wu(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return Wu((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return ju.setTime(+e),Fu.setTime(+r),t(ju),t(Fu),Math.floor(n(ju,Fu))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var qu=Wu((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));qu.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Wu((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):qu:null};var Zu=Wu((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),Yu=Wu((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),Xu=Wu((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),Ku=Wu(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1);function Qu(t){return Wu((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var $u=Qu(0),Ju=Qu(1),tc=(Qu(2),Qu(3),Qu(4)),ec=(Qu(5),Qu(6),Wu((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),nc=Wu((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));nc.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Wu((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var rc=Wu((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}));function ic(t){return Wu((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var oc=ic(0),ac=ic(1),sc=(ic(2),ic(3),ic(4)),lc=(ic(5),ic(6),Wu((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));lc.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Wu((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const[uc,cc]=function(t,e,n,r,i,o){const a=[[Zu,1,1e3],[Zu,5,5e3],[Zu,15,15e3],[Zu,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function s(e,n,r){const i=Math.abs(n-e)/r,o=Vs(([,,t])=>t).right(a,i);if(o===a.length)return t.every(Js(e/31536e6,n/31536e6,r));if(0===o)return qu.every(Math.max(Js(e,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),o=i?i.range(t,+e+1):[];return r?o.reverse():o},s]}(nc,ec,$u,Ku,Xu,Yu);function hc(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function dc(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function fc(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var pc,vc,gc={"-":"",_:" ",0:"0"},mc=/^\s*\d+/,yc=/^%/,bc=/[\\^$*+?|[\]().{}]/g;function xc(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function _c(t){return t.replace(bc,"\\$&")}function Ec(t){return new RegExp("^(?:"+t.map(_c).join("|")+")","i")}function wc(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function Oc(t,e,n){var r=mc.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Tc(t,e,n){var r=mc.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Sc(t,e,n){var r=mc.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Mc(t,e,n){var r=mc.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ac(t,e,n){var r=mc.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Cc(t,e,n){var r=mc.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Lc(t,e,n){var r=mc.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Dc(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function kc(t,e,n){var r=mc.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Rc(t,e,n){var r=mc.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ic(t,e,n){var r=mc.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Pc(t,e,n){var r=mc.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Nc(t,e,n){var r=mc.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Bc(t,e,n){var r=mc.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Uc(t,e,n){var r=mc.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Vc(t,e,n){var r=mc.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Hc(t,e,n){var r=mc.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Gc(t,e,n){var r=yc.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function zc(t,e,n){var r=mc.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jc(t,e,n){var r=mc.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Fc(t,e){return xc(t.getDate(),e,2)}function Wc(t,e){return xc(t.getHours(),e,2)}function qc(t,e){return xc(t.getHours()%12||12,e,2)}function Zc(t,e){return xc(1+Ku.count(nc(t),t),e,3)}function Yc(t,e){return xc(t.getMilliseconds(),e,3)}function Xc(t,e){return Yc(t,e)+"000"}function Kc(t,e){return xc(t.getMonth()+1,e,2)}function Qc(t,e){return xc(t.getMinutes(),e,2)}function $c(t,e){return xc(t.getSeconds(),e,2)}function Jc(t){var e=t.getDay();return 0===e?7:e}function th(t,e){return xc($u.count(nc(t)-1,t),e,2)}function eh(t){var e=t.getDay();return e>=4||0===e?tc(t):tc.ceil(t)}function nh(t,e){return t=eh(t),xc(tc.count(nc(t),t)+(4===nc(t).getDay()),e,2)}function rh(t){return t.getDay()}function ih(t,e){return xc(Ju.count(nc(t)-1,t),e,2)}function oh(t,e){return xc(t.getFullYear()%100,e,2)}function ah(t,e){return xc((t=eh(t)).getFullYear()%100,e,2)}function sh(t,e){return xc(t.getFullYear()%1e4,e,4)}function lh(t,e){var n=t.getDay();return xc((t=n>=4||0===n?tc(t):tc.ceil(t)).getFullYear()%1e4,e,4)}function uh(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+xc(e/60|0,"0",2)+xc(e%60,"0",2)}function ch(t,e){return xc(t.getUTCDate(),e,2)}function hh(t,e){return xc(t.getUTCHours(),e,2)}function dh(t,e){return xc(t.getUTCHours()%12||12,e,2)}function fh(t,e){return xc(1+rc.count(lc(t),t),e,3)}function ph(t,e){return xc(t.getUTCMilliseconds(),e,3)}function vh(t,e){return ph(t,e)+"000"}function gh(t,e){return xc(t.getUTCMonth()+1,e,2)}function mh(t,e){return xc(t.getUTCMinutes(),e,2)}function yh(t,e){return xc(t.getUTCSeconds(),e,2)}function bh(t){var e=t.getUTCDay();return 0===e?7:e}function xh(t,e){return xc(oc.count(lc(t)-1,t),e,2)}function _h(t){var e=t.getUTCDay();return e>=4||0===e?sc(t):sc.ceil(t)}function Eh(t,e){return t=_h(t),xc(sc.count(lc(t),t)+(4===lc(t).getUTCDay()),e,2)}function wh(t){return t.getUTCDay()}function Oh(t,e){return xc(ac.count(lc(t)-1,t),e,2)}function Th(t,e){return xc(t.getUTCFullYear()%100,e,2)}function Sh(t,e){return xc((t=_h(t)).getUTCFullYear()%100,e,2)}function Mh(t,e){return xc(t.getUTCFullYear()%1e4,e,4)}function Ah(t,e){var n=t.getUTCDay();return xc((t=n>=4||0===n?sc(t):sc.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ch(){return"+0000"}function Lh(){return"%"}function Dh(t){return+t}function kh(t){return Math.floor(+t/1e3)}function Rh(t){return new Date(t)}function Ih(t){return t instanceof Date?+t:+new Date(+t)}function Ph(t,e,n,r,i,o,a,s,l,u){var c=gu(),h=c.invert,d=c.domain,f=u(".%L"),p=u(":%S"),v=u("%I:%M"),g=u("%I %p"),m=u("%a %d"),y=u("%b %d"),b=u("%B"),x=u("%Y");function _(t){return(l(t)<t?f:s(t)<t?p:a(t)<t?v:o(t)<t?g:r(t)<t?i(t)<t?m:y:n(t)<t?b:x)(t)}return c.invert=function(t){return new Date(h(t))},c.domain=function(t){return arguments.length?d(Array.from(t,Ih)):d().map(Rh)},c.ticks=function(e){var n=d();return t(n[0],n[n.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?_:u(e)},c.nice=function(t){var n=d();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?d(Pu(n,t)):c},c.copy=function(){return pu(c,Ph(t,e,n,r,i,o,a,s,l,u))},c}function Nh(){return sl.apply(Ph(uc,cc,nc,ec,$u,Ku,Xu,Yu,Zu,vc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}!function(t){pc=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,u=Ec(i),c=wc(i),h=Ec(o),d=wc(o),f=Ec(a),p=wc(a),v=Ec(s),g=wc(s),m=Ec(l),y=wc(l),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Fc,e:Fc,f:Xc,g:ah,G:lh,H:Wc,I:qc,j:Zc,L:Yc,m:Kc,M:Qc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Dh,s:kh,S:$c,u:Jc,U:th,V:nh,w:rh,W:ih,x:null,X:null,y:oh,Y:sh,Z:uh,"%":Lh},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:ch,e:ch,f:vh,g:Sh,G:Ah,H:hh,I:dh,j:fh,L:ph,m:gh,M:mh,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Dh,s:kh,S:yh,u:bh,U:xh,V:Eh,w:wh,W:Oh,x:null,X:null,y:Th,Y:Mh,Z:Ch,"%":Lh},_={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return O(t,e,n,r)},d:Ic,e:Ic,f:Hc,g:Lc,G:Cc,H:Nc,I:Nc,j:Pc,L:Vc,m:Rc,M:Bc,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:kc,Q:zc,s:jc,S:Uc,u:Tc,U:Sc,V:Mc,w:Oc,W:Ac,x:function(t,e,r){return O(t,n,e,r)},X:function(t,e,n){return O(t,r,e,n)},y:Lc,Y:Cc,Z:Dc,"%":Gc};function E(t,e){return function(n){var r,i,o,a=[],s=-1,l=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(i=gc[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(t.slice(l,s)),a.join("")}}function w(t,e){return function(n){var r,i,o=fc(1900,void 0,1);if(O(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=dc(fc(o.y,0,1))).getUTCDay(),r=i>4||0===i?ac.ceil(r):ac(r),r=rc.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=hc(fc(o.y,0,1))).getDay(),r=i>4||0===i?Ju.ceil(r):Ju(r),r=Ku.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?dc(fc(o.y,0,1)).getUTCDay():hc(fc(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,dc(o)):hc(o)}}function O(t,e,n,r){for(var i,o,a=0,s=e.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=_[i in gc?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=E(n,b),b.X=E(r,b),b.c=E(e,b),x.x=E(n,x),x.X=E(r,x),x.c=E(e,x),{format:function(t){var e=E(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=E(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}})}(t),vc=pc.format,pc.parse,pc.utcFormat,pc.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Bh=Math.PI,Uh=2*Bh,Vh=Uh-1e-6;function Hh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Gh(){return new Hh}function zh(t){return function(){return t}}Hh.prototype=Gh.prototype={constructor:Hh,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,l=r-e,u=o-t,c=a-e,h=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-l*u)>1e-6&&i){var d=n-o,f=r-a,p=s*s+l*l,v=d*d+f*f,g=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Bh-Math.acos((p+h-v)/(2*g*m)))/2),b=y/m,x=y/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>u*f)+","+(this._x1=t+x*s)+","+(this._y1=e+x*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,u=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+l+","+u),n&&(h<0&&(h=h%Uh+Uh),h>Vh?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Bh)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var jh=Math.abs,Fh=Math.atan2,Wh=Math.cos,qh=Math.max,Zh=Math.min,Yh=Math.sin,Xh=Math.sqrt,Kh=Math.PI,Qh=Kh/2,$h=2*Kh;function Jh(t){return t>1?0:t<-1?Kh:Math.acos(t)}function td(t){return t>=1?Qh:t<=-1?-Qh:Math.asin(t)}function ed(t){return t.innerRadius}function nd(t){return t.outerRadius}function rd(t){return t.startAngle}function id(t){return t.endAngle}function od(t){return t&&t.padAngle}function ad(t,e,n,r,i,o,a,s){var l=n-t,u=r-e,c=a-i,h=s-o,d=h*l-c*u;if(!(d*d<1e-12))return[t+(d=(c*(e-o)-h*(t-i))/d)*l,e+d*u]}function sd(t,e,n,r,i,o,a){var s=t-n,l=e-r,u=(a?o:-o)/Xh(s*s+l*l),c=u*l,h=-u*s,d=t+c,f=e+h,p=n+c,v=r+h,g=(d+p)/2,m=(f+v)/2,y=p-d,b=v-f,x=y*y+b*b,_=i-o,E=d*v-p*f,w=(b<0?-1:1)*Xh(qh(0,_*_*x-E*E)),O=(E*b-y*w)/x,T=(-E*y-b*w)/x,S=(E*b+y*w)/x,M=(-E*y+b*w)/x,A=O-g,C=T-m,L=S-g,D=M-m;return A*A+C*C>L*L+D*D&&(O=S,T=M),{cx:O,cy:T,x01:-c,y01:-h,x11:O*(i/_-1),y11:T*(i/_-1)}}function ld(){var t=ed,e=nd,n=zh(0),r=null,i=rd,o=id,a=od,s=null;function l(){var l,u,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Qh,f=o.apply(this,arguments)-Qh,p=jh(f-d),v=f>d;if(s||(s=l=Gh()),h<c&&(u=h,h=c,c=u),h>1e-12)if(p>$h-1e-12)s.moveTo(h*Wh(d),h*Yh(d)),s.arc(0,0,h,d,f,!v),c>1e-12&&(s.moveTo(c*Wh(f),c*Yh(f)),s.arc(0,0,c,f,d,v));else{var g,m,y=d,b=f,x=d,_=f,E=p,w=p,O=a.apply(this,arguments)/2,T=O>1e-12&&(r?+r.apply(this,arguments):Xh(c*c+h*h)),S=Zh(jh(h-c)/2,+n.apply(this,arguments)),M=S,A=S;if(T>1e-12){var C=td(T/c*Yh(O)),L=td(T/h*Yh(O));(E-=2*C)>1e-12?(x+=C*=v?1:-1,_-=C):(E=0,x=_=(d+f)/2),(w-=2*L)>1e-12?(y+=L*=v?1:-1,b-=L):(w=0,y=b=(d+f)/2)}var D=h*Wh(y),k=h*Yh(y),R=c*Wh(_),I=c*Yh(_);if(S>1e-12){var P,N=h*Wh(b),B=h*Yh(b),U=c*Wh(x),V=c*Yh(x);if(p<Kh&&(P=ad(D,k,U,V,N,B,R,I))){var H=D-P[0],G=k-P[1],z=N-P[0],j=B-P[1],F=1/Yh(Jh((H*z+G*j)/(Xh(H*H+G*G)*Xh(z*z+j*j)))/2),W=Xh(P[0]*P[0]+P[1]*P[1]);M=Zh(S,(c-W)/(F-1)),A=Zh(S,(h-W)/(F+1))}}w>1e-12?A>1e-12?(g=sd(U,V,D,k,h,A,v),m=sd(N,B,R,I,h,A,v),s.moveTo(g.cx+g.x01,g.cy+g.y01),A<S?s.arc(g.cx,g.cy,A,Fh(g.y01,g.x01),Fh(m.y01,m.x01),!v):(s.arc(g.cx,g.cy,A,Fh(g.y01,g.x01),Fh(g.y11,g.x11),!v),s.arc(0,0,h,Fh(g.cy+g.y11,g.cx+g.x11),Fh(m.cy+m.y11,m.cx+m.x11),!v),s.arc(m.cx,m.cy,A,Fh(m.y11,m.x11),Fh(m.y01,m.x01),!v))):(s.moveTo(D,k),s.arc(0,0,h,y,b,!v)):s.moveTo(D,k),c>1e-12&&E>1e-12?M>1e-12?(g=sd(R,I,N,B,c,-M,v),m=sd(D,k,U,V,c,-M,v),s.lineTo(g.cx+g.x01,g.cy+g.y01),M<S?s.arc(g.cx,g.cy,M,Fh(g.y01,g.x01),Fh(m.y01,m.x01),!v):(s.arc(g.cx,g.cy,M,Fh(g.y01,g.x01),Fh(g.y11,g.x11),!v),s.arc(0,0,c,Fh(g.cy+g.y11,g.cx+g.x11),Fh(m.cy+m.y11,m.cx+m.x11),v),s.arc(m.cx,m.cy,M,Fh(m.y11,m.x11),Fh(m.y01,m.x01),!v))):s.arc(0,0,c,_,x,v):s.lineTo(R,I)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Kh/2;return[Wh(r)*n,Yh(r)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:zh(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:zh(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:zh(+t),l):n},l.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:zh(+t),l):r},l.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:zh(+t),l):i},l.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:zh(+t),l):o},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:zh(+t),l):a},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}var ud=Array.prototype.slice;function cd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function hd(t){this._context=t}function dd(t){return new hd(t)}function fd(t){return t[0]}function pd(t){return t[1]}function vd(t,e){var n=zh(!0),r=null,i=dd,o=null;function a(a){var s,l,u,c=(a=cd(a)).length,h=!1;for(null==r&&(o=i(u=Gh())),s=0;s<=c;++s)!(s<c&&n(l=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(l,s,a),+e(l,s,a));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?fd:zh(t),e="function"==typeof e?e:void 0===e?pd:zh(e),a.x=function(e){return arguments.length?(t="function"==typeof e?e:zh(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:zh(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:zh(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}function gd(t,e,n){var r=null,i=zh(!0),o=null,a=dd,s=null;function l(l){var u,c,h,d,f,p=(l=cd(l)).length,v=!1,g=new Array(p),m=new Array(p);for(null==o&&(s=a(f=Gh())),u=0;u<=p;++u){if(!(u<p&&i(d=l[u],u,l))===v)if(v=!v)c=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=c;--h)s.point(g[h],m[h]);s.lineEnd(),s.areaEnd()}v&&(g[u]=+t(d,u,l),m[u]=+e(d,u,l),s.point(r?+r(d,u,l):g[u],n?+n(d,u,l):m[u]))}if(f)return s=null,f+""||null}function u(){return vd().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?fd:zh(+t),e="function"==typeof e?e:zh(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?pd:zh(+n),l.x=function(e){return arguments.length?(t="function"==typeof e?e:zh(+e),r=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:zh(+e),l):t},l.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:zh(+t),l):r},l.y=function(t){return arguments.length?(e="function"==typeof t?t:zh(+t),n=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:zh(+t),l):e},l.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:zh(+t),l):n},l.lineX0=l.lineY0=function(){return u().x(t).y(e)},l.lineY1=function(){return u().x(t).y(n)},l.lineX1=function(){return u().x(r).y(e)},l.defined=function(t){return arguments.length?(i="function"==typeof t?t:zh(!!t),l):i},l.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),l):a},l.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),l):o},l}function md(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function yd(t){return t}hd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var bd=_d(dd);function xd(t){this._curve=t}function _d(t){function e(e){return new xd(t(e))}return e._curve=t,e}function Ed(){return t=vd().curve(bd),e=t.curve,t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(_d(t)):e()._curve},t;var t,e}function wd(t){return t.source}function Od(t){return t.target}function Td(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Sd(){return function(t){var e=wd,n=Od,r=fd,i=pd,o=null;function a(){var a,s=ud.call(arguments),l=e.apply(this,s),u=n.apply(this,s);if(o||(o=a=Gh()),t(o,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:zh(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:zh(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}(Td)}function Md(){}function Ad(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Cd(t){this._context=t}function Ld(t){return new Cd(t)}function Dd(t){this._context=t}function kd(t){return new Dd(t)}function Rd(t){this._context=t}function Id(t){return new Rd(t)}function Pd(t,e){this._basis=new Cd(t),this._beta=e}xd.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},Cd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ad(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ad(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Dd.prototype={areaStart:Md,areaEnd:Md,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Ad(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Rd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ad(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Pd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*a),this._beta*e[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Nd=function t(e){function n(t){return 1===e?new Cd(t):new Pd(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Bd(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ud(t,e){this._context=t,this._k=(1-e)/6}Ud.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bd(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Bd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Vd=function t(e){function n(t){return new Ud(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Hd(t,e){this._context=t,this._k=(1-e)/6}Hd.prototype={areaStart:Md,areaEnd:Md,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Bd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Gd=function t(e){function n(t){return new Hd(t,e)}return n.tension=function(e){return t(+e)},n}(0);function zd(t,e){this._context=t,this._k=(1-e)/6}zd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var jd=function t(e){function n(t){return new zd(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Fd(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Wd(t,e){this._context=t,this._alpha=e}Wd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Fd(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var qd=function t(e){function n(t){return e?new Wd(t,e):new Ud(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Zd(t,e){this._context=t,this._alpha=e}Zd.prototype={areaStart:Md,areaEnd:Md,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Fd(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Yd=function t(e){function n(t){return e?new Zd(t,e):new Hd(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Xd(t,e){this._context=t,this._alpha=e}Xd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fd(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Kd=function t(e){function n(t){return e?new Xd(t,e):new zd(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Qd(t){this._context=t}function $d(t){return new Qd(t)}function Jd(t){return t<0?-1:1}function tf(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Jd(o)+Jd(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function ef(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function nf(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function rf(t){this._context=t}function of(t){this._context=new af(t)}function af(t){this._context=t}function sf(t){return new rf(t)}function lf(t){return new of(t)}function uf(t){this._context=t}function cf(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function hf(t){return new uf(t)}function df(t,e){this._context=t,this._t=e}function ff(t){return new df(t,.5)}function pf(t){return new df(t,0)}function vf(t){return new df(t,1)}function gf(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function mf(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function yf(t,e){return t[e]}function bf(t){const e=[];return e.key=t,e}function xf(){var t=zh([]),e=mf,n=gf,r=yf;function i(i){var o,a,s=Array.from(t.apply(this,arguments),bf),l=s.length,u=-1;for(const t of i)for(o=0,++u;o<l;++o)(s[o][u]=[0,+r(t,s[o].key,u,i)]).data=t;for(o=0,a=cd(e(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:zh(Array.from(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:zh(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?mf:"function"==typeof t?t:zh(Array.from(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?gf:t,i):n},i}function _f(t,e){if((s=t.length)>0)for(var n,r,i,o,a,s,l=0,u=t[e[0]].length;l<u;++l)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][l])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}function Ef(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function wf(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Of(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t),r=wf(e);return n.setDate(n.getDate()+r),n}function Tf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t).getTime(),r=wf(e);return new Date(n+r)}Qd.prototype={areaStart:Md,areaEnd:Md,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},rf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nf(this,this._t0,ef(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,nf(this,ef(this,n=tf(this,t,e)),n);break;default:nf(this,this._t0,n=tf(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(of.prototype=Object.create(rf.prototype)).point=function(t,e){rf.prototype.point.call(this,e,t)},af.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},uf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=cf(t),i=cf(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},df.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};function Sf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return Tf(t,36e5*n)}function Mf(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Af(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ef(t);return e.setHours(0,0,0,0),e}function Cf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Af(t),r=Af(e),i=n.getTime()-Mf(n),o=r.getTime()-Mf(r);return Math.round((i-o)/864e5)}function Lf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return Tf(t,6e4*n)}function Df(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ef(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function kf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t),r=wf(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Df(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function Rf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return Tf(t,1e3*n)}function If(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return kf(t,12*n)}function Pf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t),r=Ef(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Nf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ef(t);return!isNaN(e)}function Bf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t),r=Ef(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Uf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t),r=Ef(e);return n.getFullYear()-r.getFullYear()}function Vf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t),r=Ef(e);return n.getTime()-r.getTime()}function Hf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Gf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var zf={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function jf(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Ff={date:jf({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:jf({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:jf({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Wf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function qf(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,l=i.width?String(i.width):t.defaultWidth;r=t.values[l]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function Zf(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var l,u=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),l=t.valueCallback?t.valueCallback(l):l,{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(u.length)}}}var Yf,Xf={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof zf[t]?zf[t]:1===e?zf[t].one:zf[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Ff,formatRelative:function(t,e,n,r){return Wf[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:qf({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:qf({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:qf({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:qf({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:qf({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Yf={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},i=n.match(Yf.matchPattern);if(!i)return null;var o=i[0],a=n.match(Yf.parsePattern);if(!a)return null;var s=Yf.valueCallback?Yf.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Zf({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Zf({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Zf({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Zf({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Zf({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Kf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return Tf(t,-n)}function Qf(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var $f=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Qf("yy"===e?r%100:r,e.length)},Jf=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Qf(n+1,2)},tp=function(t,e){return Qf(t.getUTCDate(),e.length)},ep=function(t,e){return Qf(t.getUTCHours()%12||12,e.length)},np=function(t,e){return Qf(t.getUTCHours(),e.length)},rp=function(t,e){return Qf(t.getUTCMinutes(),e.length)},ip=function(t,e){return Qf(t.getUTCSeconds(),e.length)},op=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Qf(Math.floor(r*Math.pow(10,n-3)),e.length)};function ap(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=Ef(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function sp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ef(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=ap(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=ap(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function lp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=sp(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=ap(n);return r}function up(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:wf(i),a=null==n.weekStartsOn?o:wf(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Ef(t),l=s.getUTCDay(),u=(l<a?7:0)+l-a;return s.setUTCDate(s.getUTCDate()-u),s.setUTCHours(0,0,0,0),s}function cp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ef(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:wf(a),l=null==i.firstWeekContainsDate?s:wf(i.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(r+1,0,l),u.setUTCHours(0,0,0,0);var c=up(u,e),h=new Date(0);h.setUTCFullYear(r,0,l),h.setUTCHours(0,0,0,0);var d=up(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function hp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:wf(i),a=null==n.firstWeekContainsDate?o:wf(n.firstWeekContainsDate),s=cp(t,e),l=new Date(0);l.setUTCFullYear(s,0,a),l.setUTCHours(0,0,0,0);var u=up(l,e);return u}var dp="midnight",fp="noon",pp="morning",vp="afternoon",gp="evening",mp="night",yp={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return $f(t,e)},Y:function(t,e,n,r){var i=cp(t,r),o=i>0?i:1-i;return"YY"===e?Qf(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Qf(o,e.length)},R:function(t,e){return Qf(sp(t),e.length)},u:function(t,e){return Qf(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Qf(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Qf(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return Jf(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Qf(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ef(t),r=up(n,e).getTime()-hp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Qf(i,e.length)},I:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ef(t),n=ap(e).getTime()-lp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Qf(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):tp(t,e)},D:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ef(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):Qf(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Qf(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Qf(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return Qf(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?fp:0===i?dp:i/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?gp:i>=12?vp:i>=4?pp:mp,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ep(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):np(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Qf(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Qf(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):rp(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):ip(t,e)},S:function(t,e){return op(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return xp(i);case"XXXX":case"XX":return _p(i);case"XXXXX":case"XXX":default:return _p(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return xp(i);case"xxxx":case"xx":return _p(i);case"xxxxx":case"xxx":default:return _p(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+bp(i,":");case"OOOO":default:return"GMT"+_p(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+bp(i,":");case"zzzz":default:return"GMT"+_p(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Qf(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Qf((r._originalDate||t).getTime(),e.length)}};function bp(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+Qf(o,2)}function xp(t,e){return t%60==0?(t>0?"-":"+")+Qf(Math.abs(t)/60,2):_p(t,e)}function _p(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Qf(Math.floor(i/60),2)+n+Qf(i%60,2)}function Ep(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function wp(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var Op={p:wp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return Ep(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",Ep(i,e)).replace("{{time}}",wp(o,e))}},Tp=["D","DD"],Sp=["YY","YYYY"];function Mp(t){return-1!==Tp.indexOf(t)}function Ap(t){return-1!==Sp.indexOf(t)}function Cp(t){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if("YY"===t)throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if("D"===t)throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if("DD"===t)throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}var Lp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kp=/^'([^]*?)'?$/,Rp=/''/g,Ip=/[a-zA-Z]/;function Pp(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||Xf,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:wf(a),l=null==i.firstWeekContainsDate?s:wf(i.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,c=null==u?0:wf(u),h=null==i.weekStartsOn?c:wf(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var d=Ef(t);if(!Nf(d))throw new RangeError("Invalid time value");var f=Mf(d),p=Kf(d,f),v={firstWeekContainsDate:l,weekStartsOn:h,locale:o,_originalDate:d},g=r.match(Dp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Op[e])(t,o.formatLong,v):t})).join("").match(Lp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Np(t);var n=yp[e];if(n)return!i.useAdditionalWeekYearTokens&&Ap(t)&&Cp(t),!i.useAdditionalDayOfYearTokens&&Mp(t)&&Cp(t),n(p,t,o.localize,v);if(e.match(Ip))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return g}function Np(t){return t.match(kp)[1].replace(Rp,"'")}function Bp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return Of(t,-n)}function Up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return Sf(t,-n)}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return Lf(t,-n)}function Hp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return kf(t,-n)}function Gp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return Rf(t,-n)}function zp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wf(e);return If(t,-n)}var jp=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function Fp(t,e,n,r,i){var o=0===e,a=2===Number(Pp(new Date(t),"c")),s=1===Number(Pp(new Date(t),"q")),l=0!==e?n[e-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||Yp(t)||Xp(t,l)||Kp(t);case"daily":return i?o||a||Kp(t):o||Xp(t,l)||Kp(t);case"monthly":return o||Kp(t);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(r+" is not a valid time interval.")}}function Wp(t,e,n,r,i){var o=i.showDayName,a="daily"===r&&o?"weekly":r,s=new Date(t),l=qa(i,"timeIntervalFormats")[a],u=qa(l,"primary"),c=qa(l,"secondary"),h=Fp(t,e,n,r,o)?u:c;return"15seconds"===r&&0!==s.getMilliseconds()&&(h=h.replace("pp","h:mm:ss.SSS a")),Pp(s,h,{locale:i.localeObject})}function qp(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Zp(t){return 1===t.length?"15seconds":function(t){var e=jp.reduce((function(e,n,r){n[0];var i=n[1],o=jp[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return jp[e][0]}(rl(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function Yp(t){var e=qp(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function Xp(t,e){return qp(t).M!==qp(e).M}function Kp(t){var e=qp(t),n=e.M,r=e.d,i=e.s,o=e.m,a=e.H;return 1===n&&1===r&&0===a&&0===o&&0===i}function Qp(t){return void 0===t?"":t.toISOString()}var $p=function(){function t(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}return t.prototype.getAllDataFromDomain=function(t){if(!this.getData())return null;var e=this.getOptions(),n=this.getData(),r=this.getDataGroups(),i=qa(e,"data").groupMapsTo,o=qa(e,"axes");return t&&(n=n.filter((function(e){return t.includes(e[i])}))),o&&Object.keys(o).forEach((function(t){var e=o[t].mapsTo,r=o[t].scaleType;if(r!==H.LINEAR&&r!==H.LOG||(n=n.map((function(t){var n;return L(L({},t),((n={})[e]=null===t[e]?t[e]:Number(t[e]),n))}))),e&&o[t].domain)if(r===H.LABELS)n=n.filter((function(n){return o[t].domain.includes(n[e])}));else{var i=o[t].domain,a=i[0],s=i[1];n=n.filter((function(t){return!(e in t)||t[e]>=a&&t[e]<=s}))}})),n.filter((function(t){return r.find((function(e){return e.name===t[i]}))}))},t.prototype.getDisplayData=function(t){if(!this.get("data"))return null;var e=_t.items.status.ACTIVE,n=this.getDataGroups(t),r=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain(t).filter((function(t){return n.find((function(n){return n.name===t[r]&&n.status===e}))}))},t.prototype.getData=function(){return this.get("data")},t.prototype.isDataEmpty=function(){return!this.getData().length},t.prototype.setData=function(t){var e=this.sanitize(Ua(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(t){return qa(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter((function(e){return t.includes(e.name)})):this.get("dataGroups")},t.prototype.getActiveDataGroups=function(t){var e=_t.items.status.ACTIVE;return this.getDataGroups(t).filter((function(t){return t.status===e}))},t.prototype.getDataGroupNames=function(t){return this.getDataGroups(t).map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(t){return this.getActiveDataGroups(t).map((function(t){return t.name}))},t.prototype.aggregateBinDataByGroup=function(t){return co(t,"group")},t.prototype.getBinConfigurations=function(){var t=this,e=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),o=n.axes[r],a=n.data.groupMapsTo,s=o.bins,l=void 0===s?xt.defaultBins:s,u=Array.isArray(l),c=el().value((function(t){return t[i]})).thresholds(l)(e);if(u)c[c.length-1].x1=l[l.length-1];else{var h=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+h}var d=u?[l[0],l[l.length-1]]:[c[0].x0,c[c.length-1].x1],f=Array.from(new Set(e.map((function(t){return t[a]})))),p=[];return c.forEach((function(e){var n=e.x0+"-"+e.x1,r=t.aggregateBinDataByGroup(e);f.forEach((function(t){p.push({group:t,key:n,value:r[t]||0,bin:e.x0})}))})),{bins:c,binsDomain:d}},t.prototype.getBinnedStackedData=function(){var t=this.getOptions().data.groupMapsTo,e=this.getActiveDataGroupNames(),n=this.getBinConfigurations().bins,r=this.getDataValuesGroupedByKeys({bins:n});return xf().keys(e)(r).map((function(n,r){return Object.keys(n).filter((function(t){return!isNaN(t)})).map((function(i){var o=n[i];return o[t]=e[r],o}))}))},t.prototype.getGroupedData=function(t){var e=this.getDisplayData(t),n={},r=this.getOptions().data.groupMapsTo;return e.map((function(t){var e=t[r];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]})),Object.keys(n).map((function(t){return{name:t,data:n[t]}}))},t.prototype.getStackKeys=function(t){var e,n=this,r=void 0===t?{bins:null,groups:null}:t,i=r.bins,o=void 0===i?null:i,a=r.groups,s=void 0===a?null:a,l=this.getOptions(),u=this.getDisplayData(s);e=o?o.map((function(t){return t.x0+"-"+t.x1})):Va(u.map((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return t[e]instanceof Date?Qp(t[e]):t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]})));var c=this.services.cartesianScales.domainAxisPosition,h=l.axes[c].scaleType;return h===H.TIME?e.sort((function(t,e){return new Date(t)-new Date(e)})):h!==H.LOG&&h!==H.LINEAR||e.sort((function(t,e){return t-e})),e},t.prototype.getDataValuesGroupedByKeys=function(t){var e=this,n=t.bins,r=void 0===n?null:n,i=t.groups,o=void 0===i?null:i,a=this.getOptions().data.groupMapsTo,s=this.getDisplayData(o),l=this.getDataGroupNames(),u=this.getStackKeys({bins:r,groups:o});return r?u.map((function(t){var e=t.split("-"),n=e[0],i=e[1],o={x0:n,x1:i},s=r.find((function(t){return t.x0.toString()===n.toString()}));return l.forEach((function(t){o[t]=s.filter((function(e){return e[a]===t})).length})),o})):u.map((function(t){var n={sharedStackKey:t};return l.forEach((function(r){var i=s.find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[a]===r&&n.hasOwnProperty(i)&&(n[i]instanceof Date?Qp(n[i])===t:n[i].toString()===t)})),o=e.services.cartesianScales.getRangeIdentifier(n);n[r]=i?i[o]:null})),n}))},t.prototype.getStackedData=function(t){var e=t.percentage,n=void 0!==e&&e,r=t.groups,i=void 0===r?null:r,o=t.divergent,a=void 0!==o&&o,s=this.getOptions().data.groupMapsTo,l=this.getActiveDataGroupNames(i),u=this.getDataValuesGroupedByKeys({groups:i});if(n){var c=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}(u.map((function(t){return[t.sharedStackKey,0]})));u.forEach((function(t){l.forEach((function(e){c[t.sharedStackKey]+=t[e]}))})),u.forEach((function(t){l.forEach((function(e){c[t.sharedStackKey]?t[e]=t[e]/c[t.sharedStackKey]*100:t[e]=0}))}))}return(a?xf().offset(_f):xf()).keys(l)(u).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(n){var r=t[n];return r[s]=l[e],r}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){this.state=Object.assign({},this.state,t);var n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){var e=this.getOptions();Wa(e,t),this.set({options:mo(e,t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(ut.Model.UPDATE,{animate:t}))},t.prototype.toggleDataLabel=function(t){var e=_t.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),o=i.some((function(t){return t.status===r})),a=i.filter((function(t){return t.status===n}));if(o)if(1===a.length&&a[0].name===t)i.forEach((function(t,e){i[e].status=n}));else{var s=i.findIndex((function(e){return e.name===t}));i[s].status=i[s].status===r?n:r}else i.forEach((function(e,o){i[o].status=e.name===t?n:r}));var l=i.filter((function(t){return t.status===n})),u=this.getOptions(),c=i.some((function(t){return t.status===r}));u.data.selectedGroups=c?l.map((function(t){return t.name})):[],this.services.events.dispatchEvent(ut.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=qa(this.colorScale,t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=qa(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.isUserProvidedColorScaleValid=function(){var t=qa(this.getOptions(),"color","scale"),e=this.getDataGroups();return null!=t&&0!=Object.keys(t).length&&e.some((function(e){return Object.keys(t).includes(e.name)}))},t.prototype.getColorClassName=function(t){var e=this.colorClassNames(t.dataGroupName),n=t.originalClassName;return t.classNameTypes.forEach((function(r){return n=t.originalClassName?n+" "+r+"-"+e:r+"-"+e})),n},t.prototype.getStatus=function(){return null},t.prototype.getAllDataGroupsNames=function(){return this.allDataGroups},t.prototype.transformToTabularData=function(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){t.data.forEach((function(n,i){var o,a=qa(t,"label");if(null===a){var s=qa(r,i);o=s||"Ungrouped"}else o=a;var l={group:o,key:r[i]};isNaN(n)?(l.value=n.value,l.date=n.date):l.value=n,e.push(l)}))})),e},t.prototype.getTabularDataArray=function(){return[]},t.prototype.exportToCSV=function(){var t=this.getTabularDataArray().map((function(t){return t.map((function(t){return'"'+("–"===t?"–":t)+'"'}))})),e="",n="";t.forEach((function(r,i){n=r.join(","),e+=i<t.length?n+"\n":n}));var r=this.getOptions(),i="myChart",o=qa(r,"fileDownload","fileName");"function"==typeof o&&(i=o("csv")),this.services.files.downloadCSV(e,i+".csv")},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return t=this.getTabularData(t)},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=_t.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=Va(t.map((function(t){return t[e]})));o.data.selectedGroups.length&&(o.data.selectedGroups.every((function(t){return a.includes(t)}))||(o.data.selectedGroups=[]));var s=function(t){return!o.data.selectedGroups.length||o.data.selectedGroups.includes(t)?r:i};return a.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setCustomColorScale=function(){var t=this;if(this.isUserProvidedColorScaleValid()){var e=this.getOptions(),n=qa(e,"color","scale");Object.keys(n).forEach((function(e){t.allDataGroups.includes(e)||console.warn('"'+e+'" does not exist in data groups.')})),this.allDataGroups.filter((function(t){return n[t]})).forEach((function(e){return t.colorScale[e]=n[e]}))}},t.prototype.setColorClassNames=function(){var t=qa(this.getOptions(),"color","pairing"),e=qa(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=qa(t,"option"),r=e>5?14:e;n=n<=yt.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.colorClassNames=ul().range(i).domain(this.allDataGroups)},t}(),Jp=function(){function t(t,e){this.model=t,this.services=e,this.init()}return t.prototype.init=function(){},t.prototype.update=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t}(),tv=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];t.call(e,i[1],i[0])}},Object.defineProperties(e.prototype,n),e}()}(),ev="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,nv="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),rv="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(nv):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},iv=["top","right","bottom","left","width","height","size","weight"],ov="undefined"!=typeof MutationObserver,av=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){rv(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};av.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},av.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},av.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},av.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},av.prototype.connect_=function(){ev&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ov?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},av.prototype.disconnect_=function(){ev&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},av.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),iv.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},av.getInstance=function(){return this.instance_||(this.instance_=new av),this.instance_},av.instance_=null;var sv=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n+=1){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},lv=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||nv},uv=vv(0,0,0,0);function cv(t){return parseFloat(t)||0}function hv(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+cv(t["border-"+n+"-width"])}),0)}function dv(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return uv;var r=lv(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=t["padding-"+i];e[i]=cv(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=cv(r.width),l=cv(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=hv(r,"left","right")+o),Math.round(l+a)!==n&&(l-=hv(r,"top","bottom")+a)),!function(t){return t===lv(t).document.documentElement}(t)){var u=Math.round(s+o)-e,c=Math.round(l+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return vv(i.left,i.top,s,l)}var fv="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof lv(t).SVGGraphicsElement}:function(t){return t instanceof lv(t).SVGElement&&"function"==typeof t.getBBox};function pv(t){return ev?fv(t)?function(t){var e=t.getBBox();return vv(0,0,e.width,e.height)}(t):dv(t):uv}function vv(t,e,n,r){return{x:t,y:e,width:n,height:r}}var gv=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=vv(0,0,0,0),this.target=t};gv.prototype.isActive=function(){var t=pv(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},gv.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var mv=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return sv(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);sv(this,{target:t,contentRect:n})},yv=function(t,e,n){if(this.activeObservations_=[],this.observations_=new tv,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n};yv.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof lv(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new gv(t)),this.controller_.addObserver(this),this.controller_.refresh())}},yv.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof lv(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},yv.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},yv.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},yv.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new mv(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},yv.prototype.clearActive=function(){this.activeObservations_.splice(0)},yv.prototype.hasActive=function(){return this.activeObservations_.length>0};var bv="undefined"!=typeof WeakMap?new WeakMap:new tv,xv=function(t){if(!(this instanceof xv))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=av.getInstance(),n=new yv(t,e,this);bv.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){xv.prototype[t]=function(){return(e=bv.get(this))[t].apply(e,arguments);var e}}));var _v=void 0!==nv.ResizeObserver?nv.ResizeObserver:xv,Ev=Qa((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){s.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4!==r.readyState)return;if(200!==r.status)return void(n?e(n):o("cannot fetch resource: "+t+", status: "+r.status));var i=new FileReader;i.onloadend=function(){var t=i.result.split(/,/)[1];e(t)},i.readAsDataURL(r.response)},r.ontimeout=function(){n?e(n):o("timeout of 30000ms occured while fetching resource: "+t)},r.responseType="blob",r.timeout=3e4,r.open("GET",t,!0),r.send(),s.impl.options.imagePlaceholder){var i=s.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(n=i[1])}function o(t){console.error(t),e("")}}))},uid:function(){var t=0;return function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+t++}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,o){return function(){return!e(t)}()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return i(e,t,n,o)}))})),r}))},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),i=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function e(i){return i instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(n.asArray(i.childNodes).map((function(t){return e(t)})))})):Promise.resolve(i)},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:l,toPng:function(t,e){return u(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return u(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return u(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return u(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:i,images:o,util:n,inliner:r,options:{}}};function l(t,e){return function(t){void 0===t.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return function t(e,r,i){return i||!r||r(e)?Promise.resolve(e).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(t){return o(e,t,r)})).then((function(t){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(i).then(o).then(a).then((function(){return e})):e;function r(){var r,i;r=window.getComputedStyle(t),i=e.style,r.cssText?i.cssText=r.cssText:function(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}(r,i)}function i(){[":before",":after"].forEach((function(r){!function(r){var i=window.getComputedStyle(t,r),o=i.getPropertyValue("content");if(""===o||"none"===o)return;var a=n.uid();e.className=e.className+" "+a;var s=document.createElement("style");s.appendChild(function(t,e,r){var i="."+t+":"+e,o=r.cssText?function(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}(r):function(t){return n.asArray(t).map((function(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")})).join("; ")+";"}(r);return document.createTextNode(i+"{"+o+"}")}(a,r,i)),e.appendChild(s)}(r)}))}function o(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function a(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(e,t)})):Promise.resolve();function o(e,r,i){var o=e.childNodes;return 0===o.length?Promise.resolve(r):a(r,n.asArray(o),i).then((function(){return r}));function a(e,n,r){var i=Promise.resolve();return n.forEach((function(n){i=i.then((function(){return t(n,r)})).then((function(t){t&&e.appendChild(t)}))})),i}}}(t,e.filter,!0)})).then(c).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function u(t,e){return l(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var i=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var i=r.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function c(t){return i.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function h(t){return o.inlineAll(t).then((function(){return t}))}t.exports=s}()})),wv=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.getHTMLElementSize=function(t){return{width:t.clientWidth,height:t.clientHeight}},e.getSVGElementSize=function(t,e){void 0===e&&(e={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}),t.attr||(t=Na(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},l={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var u={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(l),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(u),a.width>0&&a.height>0))return u;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:qa(t.node(),"width","baseVal","value"),height:qa(t.node(),"height","baseVal","value")})}catch(t){s(u),s(r),s(l)}return a},e.appendOrSelect=function(t,e){var n=t.select(""+e);if(n.empty()){var r=e.split("#"),i=void 0,o=void 0;return 2===r.length?(i=r[0],o=(r=r[1].split("."))[0]):i=(r=e.split("."))[0],t.append(i).attr("id",o).attr("class",r.slice(1).join(" "))}return n},e.prototype.init=function(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()},e.prototype.getChartID=function(){return this.chartID},e.prototype.generateElementIDString=function(t){return"chart-"+this.chartID+"-"+t},e.prototype.initializeID=function(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)},e.prototype.addMainContainer=function(){var t=this.model.getOptions(),e=qa(t,"style","prefix"),n=Na(this.getHolder()).append("div").classed("cds--"+e+"--chart-wrapper",!0).attr("id","chart-"+this.getChartID()).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder(),e=this.model.getOptions(),n=e.width,r=e.height,i=e.theme;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r),Na(this.getHolder()).classed("cds--chart-holder",!0).attr("data-carbon-theme",i)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.exportToJPG=function(){var t=this,e=this.model.getOptions(),n=this.getHolder(),r=Na(n);r.classed("filled",!0),Ev.toJpeg(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(n).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("cds--cc--toolbar")}}).then((function(n){var i="myChart",o=qa(e,"fileDownload","fileName");"function"==typeof o&&(i=o("jpg")),t.services.files.downloadImage(n,i+".jpg"),r.classed("filled",!1)}))},e.prototype.exportToPNG=function(){var t=this,e=this.model.getOptions(),n=this.getHolder(),r=Na(n);r.classed("filled",!0),Ev.toPng(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(n).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("cds--cc--toolbar")}}).then((function(n){var i="myChart",o=qa(e,"fileDownload","fileName");"function"==typeof o&&(i=o("png")),t.services.files.downloadImage(n,i+".png"),r.classed("filled",!1)})).catch((function(t){console.error("oops, something went wrong!",t)}))},e.prototype.toggleFullscreen=function(){var t=this.getHolder();Na(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},e.prototype.handleFullscreenChange=function(){var t=this;document.addEventListener("fullscreenchange",(function(){var e=Na(t.getHolder()),n=e.classed("fullscreen");e.classed("fullscreen",!n)}))},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=Na(t.mainContainer).select("g.DONT_STYLE_ME_css_styles_verifier").node(),n=getComputedStyle(e);"hidden"===n.getPropertyValue("overflow")&&"0"===n.getPropertyValue("opacity")||console.error("Missing CSS styles for Carbon Charts. Please read the Carbon Charts getting started guide.")}))},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(Na(this.mainContainer),{useBBox:!0}).height,n=Na(this.mainContainer).attr("class"),r=Na(this.mainContainer).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(Na(t),{useBBox:!0}).height)})),i<=t?Na(this.mainContainer).attr("height",i):Na(this.mainContainer).attr("height","100%")}},e.prototype.getMainContainer=function(){return this.mainContainer},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Na(e).on("mouseover",(function(){t.services.events.dispatchEvent(ut.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(ut.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=$i((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(ut.Chart.RESIZE))}),12.5);new _v(i).observe(e)}},e}(Jp),Ov=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){this.documentFragment=document.createDocumentFragment()},e.prototype.addEventListener=function(t,e){this.documentFragment.addEventListener(t,e)},e.prototype.removeEventListener=function(t,e){this.documentFragment.removeEventListener(t,e)},e.prototype.dispatchEvent=function(t,e){var n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)},e}(Jp),Tv=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype.downloadCSV=function(t,e){var n=document.createElement("a");if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:"text/csv;encoding:utf-8"}),e);else if(URL&&"download"in n){var r=URL.createObjectURL(new Blob([t],{type:"text/csv;encoding:utf-8"}));n.href=r,n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}else location.href="data:application/octet-stream,"+encodeURIComponent(t)},e.prototype.downloadImage=function(t,e){var n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e}(Jp),Sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return n(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener(ut.Model.UPDATE,(function(){t.pendingTransitions={}}))},e.prototype.setupTransition=function(t){var e=this,n=t.transition,r=t.name,i=t.animate;return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),!1===this.model.getOptions().animations||!1===i?n.duration(0):n.duration(qa(Lt,r,"duration")||Lt.default.duration)},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(Jp),Mv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.appendOrUpdateLinearGradient=function(t){var e=t.svg.select("defs linearGradient#"+t.id);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").remove(),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(function(t){return t.offset})).style("stop-color",(function(t){return t.color})).style("stop-opacity",(function(t){return t.opacity}))},e.getOffsetRatio=function(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"},e.getStops=function(t,n){var r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r},e}(Jp),Av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return n(e,t),e.prototype.getDomainAxisPosition=function(t){var e,n=(void 0===t?{}:t).datum,r=void 0===n?null:n;if(this.dualAxes&&r){var i=this.model.getOptions(),o=i.data.groupMapsTo,a=qa(i,"axes",this.secondaryDomainAxisPosition),s=r[o];if((null===(e=a)||void 0===e?void 0:e.correspondingDatasets)&&a.correspondingDatasets.includes(s))return this.secondaryDomainAxisPosition}return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(t){var e,n=void 0===t?{}:t,r=n.datum,i=void 0===r?null:r,o=n.groups,a=void 0===o?null:o;if(this.dualAxes){var s=this.model.getOptions(),l=s.data.groupMapsTo,u=qa(s,"axes",this.secondaryRangeAxisPosition),c=void 0;if(null!==i?c=i[l]:a&&a.length>0&&(c=a[0]),(null===(e=u)||void 0===e?void 0:e.correspondingDatasets)&&u.correspondingDatasets.includes(c))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return qa(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.getScaleLabel=function(t){var e=this.getAxisOptions(t).title;return e||(t===N.BOTTOM||t===N.TOP?"x-value":"y-value")},e.prototype.getDomainLabel=function(){return this.getScaleLabel(this.getDomainAxisPosition())},e.prototype.getRangeLabel=function(){return this.getScaleLabel(this.getRangeAxisPosition())},e.prototype.update=function(t){var e=this;this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(N).map((function(t){return N[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==N.LEFT&&this.rangeAxisPosition!==N.RIGHT||this.domainAxisPosition!==N.BOTTOM&&this.domainAxisPosition!==N.TOP?this.orientation=V.HORIZONTAL:this.orientation=V.VERTICAL},e.prototype.isDualAxes=function(){return this.dualAxes},e.prototype.determineAxisDuality=function(){var t,e,n,r,i=this.model.getOptions(),o=qa(i,"axes");((null===(t=o[N.LEFT])||void 0===t?void 0:t.correspondingDatasets)&&o[N.RIGHT]||(null===(e=o[N.RIGHT])||void 0===e?void 0:e.correspondingDatasets)&&o[N.LEFT]||(null===(n=o[N.TOP])||void 0===n?void 0:n.correspondingDatasets)&&o[N.BOTTOM]||(null===(r=o[N.BOTTOM])||void 0===r?void 0:r.correspondingDatasets)&&o[N.TOP])&&(this.dualAxes=!0)},e.prototype.getCustomDomainValuesByposition=function(t){var e=qa(this.model.getOptions(),"axes",t,"domain");if(e&&!Array.isArray(e))throw new Error("Domain in "+t+" axis is not a valid array");if(Array.isArray(e)&&(this.scaleTypes[t]===H.LINEAR||this.scaleTypes[t]===H.TIME)&&2!==e.length)throw new Error("There can only be 2 elements in domain for scale type: "+this.scaleTypes[t]);return e},e.prototype.getOrientation=function(){return this.orientation},e.prototype.getScaleByPosition=function(t){return this.scales[t]},e.prototype.getScaleTypeByPosition=function(t){return this.scaleTypes[t]},e.prototype.getDomainAxisScaleType=function(){var t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getRangeAxisScaleType=function(){var t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[N.BOTTOM,N.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[N.LEFT,N.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainXScale=function(){return this.scales[this.getMainXAxisPosition()]},e.prototype.getMainYScale=function(){return this.scales[this.getMainYAxisPosition()]},e.prototype.getValueFromScale=function(t,e,n,r,i){var o,a=this.model.getOptions(),s=qa(a,"axes")[n].mapsTo,l=null!==qa(r,s)?r[s]:r;switch(e){case H.LABELS:o=t(l)+t.step()/2;break;case H.TIME:o=t(new Date(l));break;default:o=t(l)}return o},e.prototype.getBoundedScaledValues=function(t,e){var n=this.model.getOptions().bounds,r=this.getRangeAxisPosition({datum:t}),i=this.scales[r],o=this.model.getOptions(),a=qa(o,"axes")[r].mapsTo,s=void 0!==t[a]?t[a]:t;return[i(null!==qa(t,n.upperBoundMapsTo)?t[n.upperBoundMapsTo]:s),i(null!==qa(t,n.lowerBoundMapsTo)?t[n.lowerBoundMapsTo]:s)]},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){var n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getRangeValue=function(t,e){var n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(t){var e=this.model.getOptions();return qa(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")},e.prototype.getRangeIdentifier=function(t){var e=this.model.getOptions();return qa(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions(),r=qa(n,"axes",t);return r.scaleType===H.TIME?function(t,e){var n=new Date(t[0]),r=new Date(t[1]);if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t),r=Ef(e),i=Pf(n,r),o=Math.abs(Uf(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Pf(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[zp(n,e),If(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t),r=Ef(e),i=Pf(n,r),o=Math.abs(Bf(n,r));n.setMonth(n.getMonth()-i*o);var a=Pf(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Hp(n,e),kf(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ef(t),r=Ef(e),i=Pf(n,r),o=Math.abs(Cf(n,r));n.setDate(n.getDate()-i*o);var a=Pf(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Bp(n,e),Of(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Up(n,e),Sf(r,e)];if(Hf(r,n)>30)return[Vp(n,30*e),Lf(r,30*e)];if(Hf(r,n)>1)return[Vp(n,e),Lf(r,e)];if(Gf(r,n)>15)return[Gp(n,15*e),Rf(r,15*e)];if(Gf(r,n)>1)return[Gp(n,e),Rf(r,e)];return[n,r]}(e,qa(n,"timeScale","addSpaceOnEdges")):function(t,e,n){var r=t[0],i=t[1],o=(i-r)*e,a=i<=0&&i+o>0?0:i+o,s=r>=0&&r-o<0?0:r-o;if(n===H.LOG&&s<=0){if(r<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=r}return[s,a]}(e,vt.paddingRatio,r.scaleType)},e.prototype.findVerticalAxesPositions=function(){var t=this.model.getOptions(),e=qa(t,"axes"),n=this.isDualAxes();return null===qa(e,N.LEFT)&&null!==qa(e,N.RIGHT)||!0===qa(e,N.RIGHT,"main")||n&&qa(e,N.LEFT,"correspondingDatasets")?{primary:N.RIGHT,secondary:N.LEFT}:{primary:N.LEFT,secondary:N.RIGHT}},e.prototype.findHorizontalAxesPositions=function(){var t=this.model.getOptions(),e=qa(t,"axes"),n=this.isDualAxes();return null===qa(e,N.BOTTOM)&&null!==qa(e,N.TOP)||!0===qa(e,N.TOP,"main")||n&&qa(e,N.BOTTOM,"correspondingDatasets")?{primary:N.TOP,secondary:N.BOTTOM}:{primary:N.BOTTOM,secondary:N.TOP}},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=qa(n,"axes",t.primary),i=qa(n,"axes",e.primary),o=r.scaleType||H.LINEAR,a=i.scaleType||H.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary,(a!==H.LABELS&&a!==H.TIME&&o===H.LABELS||o===H.TIME)&&(s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=qa(e,"axes",t),r=qa(e,"bounds"),i=n.includeZero,o=qa(n,"scaleType")||H.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned)return[0,nl(a=this.model.getBinConfigurations().bins,(function(t){return t.length}))];if(n.limitDomainToBins){var a=this.model.getBinConfigurations().bins,s=this.model.getStackKeys({bins:a});return[s[0].split("-")[0],s[s.length-1].split("-")[1]]}var l,u,c=this.model.getDisplayData(),h=n.extendLinearDomainBy,d=n.mapsTo,f=n.percentage,p=n.thresholds,v=vt.ratio,g=v.reference,m=v.compareTo;if(n.domain)return o===H.LABELS?n.domain:(o===H.TIME&&(n.domain=n.domain.map((function(t){return void 0===t.getTime?new Date(t):t}))),this.extendsDomain(t,n.domain));if(f)return[0,100];if(n&&o===H.LABELS)return Va(c.map((function(t){return t[d]})));var y=this.model.getDataGroupNames();if(o===H.LABELS_RATIO)return c.map((function(t){return t[g]+"/"+t[m]}));if(o===H.TIME)u=c.map((function(t){return+new Date(t[d])}));else if(r&&e.axes)u=[],c.forEach((function(t){u.push(t[d]),t[r.upperBoundMapsTo]&&u.push(t[r.upperBoundMapsTo]),t[r.lowerBoundMapsTo]&&u.push(t[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&y&&t===this.getRangeAxisPosition()){var b=e.data.groupMapsTo,x=this.model.getDataValuesGroupedByKeys({groups:y}),_=c.filter((function(t){return!y.includes(t[b])})),E=[];x.forEach((function(t){t.sharedStackKey;var e=D(t,["sharedStackKey"]),n=0,r=0;Object.values(e).forEach((function(t){isNaN(t)||(t<0?r+=t:n+=t)})),E.push([r,n])})),u=k(qn(E),_.map((function(t){return t[d]})))}else u=[],c.forEach((function(t){var e=t[d];Array.isArray(e)&&2===e.length?(u.push(e[0]),u.push(e[1])):(h&&u.push(Math.max(t[d],t[h])),u.push(e))}));return o!==H.TIME&&o!==H.LOG&&i&&u.push(0),p&&p.length>0&&p.forEach((function(t){var e=qa(t,"value");null!==e&&u.push(e)})),l=Gs(u),l=this.extendsDomain(t,l)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=qa(e,"axes",t);if(!n)return null;var r,i=qa(n,"scaleType")||H.LINEAR;return this.scaleTypes[t]=i,(r=i===H.TIME?Nh():i===H.LOG?function t(){var e=zu(vu()).domain([1,10]);return e.copy=function(){return pu(e,t()).base(e.base())},sl.apply(e,arguments),e}().base(n.base||10):i===H.LABELS||i===H.LABELS_RATIO?cl():Iu()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=qa(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==H.TIME||"string"!=typeof i.value&&void 0!==i.value.getTime||(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}},e.prototype.getHighestRangeThreshold=function(){var t=qa(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!Array.isArray(t)||Array.isArray(t)&&!t.length)return null;var e=this.getRangeScale(),n=t.sort((function(t,e){return e.value-t.value}))[0];return{threshold:n,scaleValue:e(n.value)}},e}(Jp);var Cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:dd,curveLinearClosed:$d,curveBasis:Ld,curveBasisClosed:kd,curveBasisOpen:Id,curveBundle:Nd,curveCardinal:Vd,curveCardinalClosed:Gd,curveCardinalOpen:jd,curveCatmullRom:qd,curveCatmullRomClosed:Yd,curveCatmullRomOpen:Kd,curveMonotoneX:sf,curveMonotoneY:lf,curveNatural:hf,curveStep:ff,curveStepAfter:vf,curveStepBefore:pf},e}return n(e,t),e.prototype.getD3Curve=function(){var t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){var n=this.curveTypes[t];return e&&Object.keys(e).forEach((function(t){n[t]&&(n=n[t](e[t]))})),n}return console.warn("The curve type '"+t+"' is invalid, using 'curveLinear' instead"),this.curveTypes.curveLinear},e}(Jp),Lv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isZoomBarEnabled=function(){if(!this.services.cartesianScales)return!1;if(!qa(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=qa(this.model.getOptions(),"axes",t,"scaleType");return t===N.BOTTOM&&e===H.TIME},e.prototype.getZoomBarData=function(){var t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()},e.prototype.getDefaultZoomBarDomain=function(t){var e=t||this.services.zoom.getZoomBarData(),n=this.services.cartesianScales,r=n.getMainXAxisPosition(),i=n.getDomainIdentifier(),o=qa(this.model.getOptions(),"axes",r,"domain");return Array.isArray(o)&&2===o.length?o:n.extendsDomain(r,Gs(e,(function(t){return t[i]})))},e.prototype.handleDomainChange=function(t,e){void 0===e&&(e={dispatchEvent:!0}),this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&this.services.events.dispatchEvent(ut.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return qa(this.model.getOptions(),"zoomBar","zoomRatio")},e.prototype.filterDataForRangeAxis=function(t,e){var n=this.model.get("zoomDomain"),r=Object.assign({stacked:!1},e),i=qa(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&i&&n){var o=r.stacked?"sharedStackKey":this.services.cartesianScales.getDomainIdentifier(),a=t.filter((function(t){return new Date(t[o])>=n[0]&&new Date(t[o])<=n[1]}));if(a.length>0)return a}return t},e.prototype.zoomIn=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=Dt.handleWidth,r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());var i=r(e[0]),o=r(e[1]);if(!(o-i<n+1)){var a=r.range(),s=o-i,l=Math.min((a[1]-a[0])/2*(t/2),s/2),u=i+l,c=o-l;u>=c&&(u=i+s/2-n/2,c=o-s/2+n/2);var h=[r.invert(u),r.invert(c)];e[0].valueOf()===h[0].valueOf()&&e[1].valueOf()===h[1].valueOf()||this.handleDomainChange(h)}},e.prototype.zoomOut=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());var r=n(e[0]),i=n(e[1]),o=n.range(),a=(o[1]-o[0])/2*(t/2),s=Math.max(r-a,o[0]),l=Math.min(i+a,o[1]),u=[n.invert(s),n.invert(l)];e[0].valueOf()===u[0].valueOf()&&e[1].valueOf()===u[1].valueOf()||this.handleDomainChange(u)},e.prototype.resetZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();t[0].valueOf()===e[0].valueOf()&&t[1].valueOf()===e[1].valueOf()||this.handleDomainChange(e)},e.prototype.isMinZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<qa(this.model.getOptions(),"zoomBar","minZoomRatio")},e.prototype.isMaxZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())},e.prototype.isEmptyState=function(){return 0===this.getZoomBarData().length},e.prototype.isZoomBarLoading=function(t){return qa(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return qa(this.model.getOptions(),"zoomBar",t,"locked")},e}(Jp),Dv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.zoomIn=function(t,e,n){var r,i,o,a=n||gt;t&&(r=t.x,i=t.y,o=2);var s=wv.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0}),l=s.width,u=s.height;e.transition().duration(a.duration).ease(a.ease).attr("transform","translate("+l/2+", "+u/2+") scale("+o+") translate("+-r+","+-i+")"),this.services.events.dispatchEvent(ut.CanvasZoom.CANVAS_ZOOM_IN,{element:Na(t)})},e.prototype.zoomOut=function(t,e){var n=e||gt;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(ut.CanvasZoom.CANVAS_ZOOM_OUT)},e}(Jp),kv=function(){function t(t,e,n){if(this.renderType=R.HTML,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){var r=qa(this.model.getOptions(),"style","prefix");this.id=r+"--"+this.configs.id}this.parent||this.setParent(Na(this.services.domUtils.getMainContainer()))}return t.prototype.init=function(){},t.prototype.render=function(t){console.error("render() method is not implemented")},t.prototype.destroy=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t.prototype.setParent=function(t){var e=this.parent;if(this.parent=t,(!e||e.node()!==t.node())&&this.type){var n=qa(this.model.getOptions(),"style","prefix");this.parent.classed("cds--"+n+"--"+this.type,!0),e&&e.classed("cds--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getComponentContainer=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=qa(this.model.getOptions(),"style","prefix"),n=this.id?"#"+this.id:"",r=wv.appendOrSelect(this.parent,(this.renderType===R.SVG?"svg":"div")+n+".cds--"+e+"--"+this.type);if(t.withinChartClip){var i=this.model.get("chartClipId");if(i){var o=Na("#"+i).select("rect");0!==o.size()&&parseFloat(o.attr("height"))>0&&r.attr("clip-path","url(#"+i+")")}}return r.attr("width","100%").attr("height","100%")}return this.parent},t.prototype.getOptions=function(){return this.configs.options?mo({},this.model.getOptions(),this.configs.options):this.model.getOptions()},t}(),Rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e.renderType=R.HTML,e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getOptions(),n=qa(e,"legend"),i=qa(n,"alignment"),o=qa(e,"legend","orientation"),a=this.model.getDataGroups(),s=_t.items.status.DISABLED,l=a.some((function(t){return t.status===s})),u=qa(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===z.CENTER).classed("right-aligned",i===z.RIGHT).classed(o,!0).classed("has-deactivated-items",l).attr("role",r.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");u&&(a=this.sortDataGroups(a,u));var h=c.selectAll("div.legend-item").data(a,(function(t){return t.name})),d=h.enter().append("div").attr("class","legend-item");d.merge(c.selectAll("div.legend-item")).classed("active",(function(t,e){return t.status===_t.items.status.ACTIVE}));var f=qa(this.getOptions(),"legend","clickable");c.classed("clickable",f&&a.length>1);var p=_t.checkbox.radius,v=d.append("div").classed("checkbox",!0),g=v.merge(h.select("div.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(function(e,n){return t.services.domUtils.generateElementIDString("legend-datagroup-"+n+"-title")})).attr("aria-checked",(function(t){return t.status===_t.items.status.ACTIVE})).attr("width",2*p).attr("height",2*p).attr("class",(function(e,n){return t.model.getColorClassName({classNameTypes:[P.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"})})).style("background",(function(e){return e.status===_t.items.status.ACTIVE?t.model.getFillColor(e.name)||t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===_t.items.status.ACTIVE})),m=(v.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),d.append("p").merge(h.select("p")),qa(e,"legend","additionalItems"));if(m&&a.length){var y=this,b=c.selectAll("div.additional-item").data(m);b.exit().remove();var x,_=b.enter().append("div").merge(b).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(function(e,n){return t.services.domUtils.generateElementIDString("legend-datagroup-"+(g.size()+n)+"-title")}));_.selectAll("*").remove();var E=1;_.append("svg").classed("icon",!0).each((function(t,e){var n=Na(this);x&&x==t.type?E++:(x=t.type,E=1),y.addAdditionalItem(n,t,E)}));_.append("p").merge(_.select("p"));this.truncateLegendText()}h.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&d.size()>1&&this.addEventListeners()},e.prototype.sortDataGroups=function(t,e){if(t.sort((function(t,n){return e.indexOf(t.name)-e.indexOf(n.name)})),e.length<t.length){var n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t},e.prototype.addAdditionalItem=function(t,e,n){var i=_t.area,o=i.width,a=i.height;if(e.type===ot.RADIUS?t.style("width",a+"px").style("height",a+"px"):t.style("width",o+"px").style("height",a+"px"),e.type===ot.RADIUS){var s=_t.radius,l=s.iconData,u=s.fill,c=s.stroke;t.attr("fill","none").selectAll("circle").data(l).enter().append("circle").classed("radius",!0).attr("role",r.IMG).attr("aria-label","radius").attr("cx",(function(t){return t.cx})).attr("cy",(function(t){return t.cy})).attr("r",(function(t){return t.r})).style("fill",e.fill?e.fill:u).style("stroke",e.stroke?e.stroke:c)}else if(e.type===ot.LINE){var h=_t.line;t.select("line.line").empty()&&t.append("line").classed("line-"+n,!0).attr("role",r.IMG).attr("aria-label","line").attr("x1",0).attr("y1",h.yPosition).attr("x2",o).attr("y2",h.yPosition).style("stroke",e.stroke?e.stroke:h.stroke).style("stroke-width",h.strokeWidth)}else if(e.type===ot.AREA)t.select("rect.area").empty()&&t.append("rect").classed("area-"+n,!0).attr("role",r.IMG).attr("aria-label","area").attr("width",o).attr("height",a).style("fill",n>3&&!e.fill?_t.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===ot.SIZE){var d=_t.size;l=d.iconData,u=d.fill,c=d.stroke;t.attr("fill","none").attr("role",r.IMG).attr("aria-label","size").selectAll("rect").data(l).enter().append("rect").classed("size",!0).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return 0})).style("fill",e.fill?e.fill:u).style("stroke",e.stroke?e.stroke:c).style("stroke-width",1)}else if(e.type===ot.QUARTILE){l=_t.quartile.iconData;t.selectAll("rect").attr("role",r.IMG).attr("aria-label","quartile").data(l).enter().append("rect").attr("class",(function(t,e){return"quartile-"+(0===e?"wrapper":"line")})).attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height}))}else if(e.type===ot.ZOOM){var f=qa(Bs,"legend","zoom"),p=(l=f.iconData,f.color),v=t.attr("role",r.IMG).attr("aria-label","zoom").selectAll("g.icon").data(l).enter();v.append("g").attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",(function(t){return e.color?e.color:p})),v.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",(function(t){return e.color?e.color:p}))}},e.prototype.truncateLegendText=function(){var t=this.getComponentContainer(),e=qa(this.getOptions(),"legend","truncation"),n=qa(e,"type"),r=qa(e,"threshold"),i=qa(e,"numCharacter"),o=t.selectAll("div.legend-item p");o.attr("id",(function(t,e){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==U.NONE?o.html((function(t){return t.name.length>r?Fa(t.name,n,i):t.name})):o.html((function(t){return t.name}))},e.prototype.addEventListeners=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=qa(n,"legend"),i=qa(r,"truncation");e.selectAll("div.legend-item").on("mouseover",(function(e){t.services.events.dispatchEvent(ut.Legend.ITEM_HOVER,{hoveredElement:Na(this)});var n=Na(this);n.select("div.checkbox").classed("hovered",!0);var r=n.datum();r.name.length>i.threshold&&i.type!==U.NONE&&t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})})).on("mousemove",(function(e){Na(this).datum().name.length>i.threshold&&i.type!==U.NONE&&t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(){t.services.events.dispatchEvent(ut.Legend.ITEM_CLICK,{clickedElement:Na(this)});var e=Na(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=Na(this);e.select("div.checkbox").classed("hovered",!1),e.datum().name.length>i.threshold&&i.type!==U.NONE&&t.services.events.dispatchEvent(ut.Tooltip.HIDE),t.services.events.dispatchEvent(ut.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e){e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(ut.Legend.ITEM_HOVER,{hoveredElement:Na(this)})})),e.selectAll("div.legend-item div.checkbox").on("keydown",(function(e,n){e.key&&" "===e.key?(e.preventDefault(),t.model.toggleDataLabel(n.name)):e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(ut.Legend.ITEM_MOUSEOUT,{hoveredElement:Na(this)})})),e.selectAll("g.additional-item").on("mouseover",(function(e){var n=Na(this),r=n.datum();r.name.length>i.threshold&&t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})}))},e}(kv);function Iv(t){return t}function Pv(t){return"translate("+t+",0)"}function Nv(t){return"translate(0,"+t+")"}function Bv(t){return e=>+t(e)}function Uv(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Vv(){return!this.__axis}function Hv(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",h=1===t||3===t?Pv:Nv;function d(d){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Iv:i,v=Math.max(o,0)+s,g=e.range(),m=+g[0]+l,y=+g[g.length-1]+l,b=(e.bandwidth?Uv:Bv)(e.copy(),l),x=d.selection?d.selection():d,_=x.selectAll(".domain").data([null]),E=x.selectAll(".tick").data(f,e).order(),w=E.exit(),O=E.enter().append("g").attr("class","tick"),T=E.select("line"),S=E.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(O),T=T.merge(O.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),S=S.merge(O.append("text").attr("fill","currentColor").attr(c,u*v).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==x&&(_=_.transition(d),E=E.transition(d),T=T.transition(d),S=S.transition(d),w=w.transition(d).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=b(t))?h(t+l):this.getAttribute("transform")})),O.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:b(t))+l)}))),w.remove(),_.attr("d",4===t||2===t?a?"M"+u*a+","+m+"H"+l+"V"+y+"H"+u*a:"M"+l+","+m+"V"+y:a?"M"+m+","+u*a+"V"+l+"H"+y+"V"+u*a:"M"+m+","+l+"H"+y),E.attr("opacity",1).attr("transform",(function(t){return h(b(t)+l)})),T.attr(c+"2",u*o),S.attr(c,u*v).text(p),x.filter(Vv).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=b}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),d):r&&r.slice()},d.tickFormat=function(t){return arguments.length?(i=t,d):i},d.tickSize=function(t){return arguments.length?(o=a=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(a=+t,d):a},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function Gv(t){return Hv(1,t)}function zv(t){return Hv(2,t)}function jv(t){return Hv(3,t)}function Fv(t){return Hv(4,t)}var Wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="color-legend",e.renderType=R.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e.handleAxisCompleteEvent=function(t){var n=e.getComponentContainer(),r=wv.getSVGElementSize(n,{useAttrs:!0}).width,i=qa(e.getOptions(),"data","loading");if(r>_t.color.barWidth&&!i){var o=qa(e.getOptions(),"heatmap","colorLegend","title"),a=e.services.cartesianScales.getMainXScale().range();if(a[0]>1&&(n.select("g.legend").attr("transform","translate("+a[0]+", 0)"),o)){var s=wv.getSVGElementSize(n.select("g.legend-title").select("text"),{useBBox:!0}).width,l=a[0]-s-9;l>1?n.select("g.legend-title").attr("transform","translate("+l+", 0)"):(n.select("g.legend").attr("transform","translate("+a[0]+", 16)"),n.select("g.legend-title").attr("transform","translate("+a[0]+", 0)"))}}else n.select("g.legend-title").attr("transform","translate(0, 0)")},e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(ut.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)},e.prototype.render=function(t){var e=this.getOptions(),n=this.getComponentContainer(),r=wv.getSVGElementSize(n,{useAttrs:!0}).width,i=qa(e,"color","gradient","colors"),o=qa(e,"heatmap","colorLegend","type"),a=qa(e,"color","pairing","option"),s=qa(e,"heatmap","colorLegend","title");if(qa(this.getOptions(),"data","loading"))n.html("");else{var l=!fo(i),u=this.model.getValueDomain(),c=!(r<=_t.color.barWidth),h=c?_t.color.barWidth:r,d=wv.appendOrSelect(n,"g.legend"),f=wv.appendOrSelect(d,"g.legend-axis");if(s){var p=wv.appendOrSelect(n,"g.legend-title");wv.appendOrSelect(p,"text").text(s).attr("dy","0.7em"),d.attr("transform","translate(0, 16)")}var v=u[0]<0&&u[1]>0?"diverge":"mono";a<1&&a>4&&"mono"===v?a=1:a<1&&a>2&&"diverge"===v&&(a=1);var g=[],m="diverge"===v?17:11;if(l)g=i;else for(var y=1;y<m+1;y++)g.push(o===at.LINEAR?"stop-color-"+v+"-"+a+"-"+y:"fill-"+v+"-"+a+"-"+y);var b=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}(Yl(u[0],u[1]),3),x=Iu().domain(u).range([0,h]),_=jv(x).tickSize(0).tickValues(b);switch(o){case at.LINEAR:this.drawLinear(g,d,h);break;case at.QUANTIZE:var E=this.drawQuantize(g,v,l,d,h);x.range([E,h]);break;default:throw Error("Entered color legend type is not supported.")}f.attr("transform","translate(0,"+_t.color.axisYTranslation+")").call(_),f.select(".domain").remove(),f.select("g.tick:last-of-type text").style("text-anchor",c?"middle":"end"),f.select("g.tick:first-of-type text").style("text-anchor",c?"middle":"start")}},e.prototype.drawLinear=function(t,e,n){var r=100/(t.length-1);wv.appendOrSelect(e,"linearGradient").attr("id",this.gradient_id+"-legend").selectAll("stop").data(t).enter().append("stop").attr("offset",(function(t,e){return e*r+"%"})).attr("class",(function(e,n){return t[n]})).attr("stop-color",(function(t){return t})),wv.appendOrSelect(e,"rect").attr("width",n).attr("height",_t.color.barHeight).style("fill","url(#"+this.gradient_id+"-legend)")},e.prototype.drawQuantize=function(t,e,n,r,i){n||"diverge"!==e||t.splice(t.length/2,1);var o=cl().domain(t).range([0,i]);return wv.appendOrSelect(r,"g.quantized-rect").selectAll("rect").data(o.domain()).join("rect").attr("x",(function(t){return o(t)})).attr("y",0).attr("width",Math.max(0,o.bandwidth()-1)).attr("height",_t.color.barHeight).attr("class",(function(t){return t})).attr("fill",(function(t){return t})),"mono"===(!n&&e)?o.bandwidth()-1:0},e.prototype.destroy=function(){this.services.events.removeEventListener(ut.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)},e}(Rv),qv={prefix:"bx",selectorTabbable:"\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n ",selectorFocusable:"\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex], *[contenteditable=true]\n "};function Zv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yv(t,e,n){return e&&Zv(t.prototype,e),n&&Zv(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kv(t){return function(t){if(Array.isArray(t))return Qv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Qv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qv(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $v(t){return t.reduce((function(t,e){return Array.isArray(e)?t.push.apply(t,Kv($v(e))):t.push(e),t}),[])}function Jv(t){return(Jv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function eg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ng(t,e){return(ng=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function rg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ag(t);if(e){var i=ag(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ig(this,n)}}function ig(t,e){if(e&&("object"===Jv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return og(t)}function og(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ag(t){return(ag=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function sg(t){return(sg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ug(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cg(){return(cg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=hg(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function hg(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vg(t)););return t}function dg(t,e){return(dg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=vg(t);if(e){var i=vg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pg(this,n)}}function pg(t,e){if(e&&("object"===sg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vg(t){return(vg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function gg(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.addEventListener.apply(t,n),{release:function(){return t.removeEventListener.apply(t,n),null}}}function mg(t){return(mg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yg(t){return function(t){if(Array.isArray(t))return bg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bg(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Eg(t,e){return(Eg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Tg(t);if(e){var i=Tg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Og(this,n)}}function Og(t,e){if(e&&("object"===mg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tg(t){return(Tg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Sg(t,e){var n=t.target,r=t.currentTarget;if("function"==typeof n.matches){if(n.matches(e))return n;if(n.matches("".concat(e," *"))){var i=n.closest(e);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function Mg(t){if(!t||"function"==typeof t)return{launchingElement:null,launchingEvent:null};var e=t.delegateTarget||t.currentTarget||t,n=t.currentTarget&&t;if(e&&!e.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:e,launchingEvent:n}}function Ag(t){return(Ag="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Dg(t,e){return(Dg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function kg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ig(t);if(e){var i=Ig(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Rg(this,n)}}function Rg(t,e){if(e&&("object"===Ag(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ig(t){return(Ig=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Pg(t){return(Pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ng(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ug(t,e){return(Ug=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Gg(t);if(e){var i=Gg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Hg(this,n)}}function Hg(t,e){if(e&&("object"===Pg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Gg(t){return(Gg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function zg(t){return(zg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fg(t,e){return(Fg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Wg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Zg(t);if(e){var i=Zg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qg(this,n)}}function qg(t,e){if(e&&("object"===zg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zg(t){return(Zg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Yg,Xg,Kg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fg(t,e)}(o,t);var e,n,r,i=Wg(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e))._handleFocusinListener=void 0,n._handleKeydownListener=void 0,n._handleFocusin=function(t){var e=n.element.querySelector(n.options.selectorModalContainer)||n.element;n.element.classList.contains(n.options.classVisible)&&!e.contains(t.target)&&n.options.selectorsFloatingMenus.every((function(e){return!Sg(t,e)}))&&n.element.querySelector(qv.selectorTabbable).focus()},n._hookCloseActions(),n}return e=o,r=[{key:"options",get:function(){var t=qv.prefix;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(t,"--overflow-menu-options"),".".concat(t,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(t,"--modal-container"),classVisible:"is-visible",classBody:"".concat(t,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}],(n=[{key:"createdByLauncher",value:function(t){this.show(t)}},{key:"shouldStateBeChanged",value:function(t){return"shown"===t?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(t,e,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===t){var o="onfocusin"in this.element.ownerDocument.defaultView,a=o?"focusin":"focus";this._handleFocusinListener=this.manage(gg(this.element.ownerDocument,a,this._handleFocusin,!o))}"hidden"===t?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===t&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(gg(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===t&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(qv.selectorTabbable)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var t=this;this.manage(gg(this.element,"click",(function(e){var n=Sg(e,t.options.selectorModalClose);n&&(e.delegateTarget=n),(n||e.target===t.element)&&t.hide(e)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(gg(this.element.ownerDocument.body,"keydown",(function(e){27===e.which&&t.shouldStateBeChanged("hidden")&&(e.stopPropagation(),t.hide(e))})))}}])&&jg(e.prototype,n),r&&jg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o.components=new WeakMap,o}(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return $v(e).reduce((function(t,e){return e(t)}),function(){return Yv((function t(){Xv(this,t)}))}())}((function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ng(t,e)}(o,t);var e,n,r,i=rg(o);function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(tg(this,o),(e=i.call(this,t,n)).children=[],!t||t.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return e.element=t,e.options=Object.assign(Object.create(e.constructor.options),n),e.constructor.components.set(e.element,og(e)),e}return e=o,r=[{key:"create",value:function(t,e){return this.components.get(t)||new this(t,e)}}],(n=[{key:"release",value:function(){for(var t=this.children.pop();t;t=this.children.pop())t.release();return this.constructor.components.delete(this.element),null}}])&&eg(e.prototype,n),r&&eg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)}),(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ug(t,e)}(o,t);var e,n,r,i=Vg(o);function o(){return Ng(this,o),i.apply(this,arguments)}return e=o,r=[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!e||e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(e.nodeType!==Node.ELEMENT_NODE||!e.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return gg(e,i,(function(e){var i=Sg(e,"[".concat(r.attribInitTarget,"]"));if(i){e.delegateTarget=i;var o=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(o.length>1)throw new Error("Target widget must be unique.");if(1===o.length){"A"===i.tagName&&e.preventDefault();var a=t.create(o[0],n);"function"==typeof a.createdByLauncher&&a.createdByLauncher(e)}}}))}));return{release:function(){for(var t=i.pop();t;t=i.pop())t.release()}}}return this.create(e,n),""}}],(n=null)&&Bg(e.prototype,n),r&&Bg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o.forLazyInit=!0,o}(t)}),[function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eg(t,e)}(o,t);var e,n,r,i=wg(o);function o(){return xg(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,o=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,a="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,o)){var s={group:o&&o.group,state:i},l=[s.group,i].filter(Boolean).join("-").split("-").map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""),u=new CustomEvent(this.options["eventBefore".concat(l)],{bubbles:!0,cancelable:!0,detail:o}),c=o&&o.delegatorNode||this.element,h=!c.dispatchEvent(u);if(h){if(a){var d=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));d.canceled=!0,a(d)}}else{var f=[i,o].filter(Boolean);this._changeState.apply(this,yg(f).concat([function(){c.dispatchEvent(new CustomEvent(t.options["eventAfter".concat(l)],{bubbles:!0,cancelable:!0,detail:o})),a&&a()}]))}}else a&&a(null,!0)}}])&&_g(e.prototype,n),r&&_g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)},function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dg(t,e)}(o,t);var e,n,r,i=kg(o);function o(){return Cg(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"show",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("shown",Mg(t),e)}},{key:"hide",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("hidden",Mg(t),e)}}])&&Lg(e.prototype,n),r&&Lg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)}],(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dg(t,e)}(o,t);var e,n,r,i=fg(o);function o(){var t;lg(this,o);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).handles=new Set,t}return e=o,(n=[{key:"manage",value:function(t){return this.handles.add(t),t}},{key:"unmanage",value:function(t){return this.handles.delete(t),t}},{key:"release",value:function(){var t=this;return this.handles.forEach((function(e){e.release(),t.handles.delete(e)})),cg(vg(o.prototype),"release",this).call(this)}}])&&ug(e.prototype,n),r&&ug(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)}))),Qg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="modal",i.isEventListenerAdded=!1,i.handleShowModal=function(){i.modal.html(i.getModalHTML()),i.modal.select("div.cds--modal-footer button.cds--btn").on("click",(function(){return i.model.exportToCSV()})),Kg.create(i.modal.node()).show()},i.init(),i}return n(e,t),e.prototype.addEventListeners=function(){this.services.events.addEventListener(ut.Modal.SHOW,this.handleShowModal)},e.prototype.removeEventListeners=function(){this.services.events.removeEventListener(ut.Modal.SHOW,this.handleShowModal)},e.prototype.getModalHTML=function(){var t=this.model.getOptions(),e=qa(t,"style","prefix"),n=this.model.getTabularDataArray();return'\n\t\t<div class="cds--modal-container cds--modal-container">\n\t\t\t<div class="cds--modal-header cds--modal-header">\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta cds--modal-header__label cds--type-delta" id="modal-title">Tabular representation</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta cds--modal-header__heading cds--type-beta" id="modal-description">'+t.title+'</p>\n\n\t\t\t\t<button class="cds--modal-close cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon cds--modal-close__icon">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-content cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border cds--data-table cds--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t'+Gn(n,0).map((function(t){return'<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label cds--table-header-label">'+t+"</div>\n\t\t\t\t\t\t\t</th>"})).join("")+"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\n\t\t\t\t\t<tbody>"+n.slice(1).map((function(t){return"\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t"+t.map((function(t){return"<td>"+t+"</td>"})).join("")+"\n\t\t\t\t\t\t\t</tr>"})).join("")+'\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-footer cds--modal-footer">\n\t\t\t <div class="cds--'+e+'-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary cds--btn cds--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>'},e.prototype.render=function(){var t=this.model.getOptions();if(!this.isEventListenerAdded){var e=Na(this.services.domUtils.getHolder()),n=qa(t,"style","prefix");this.modal=wv.appendOrSelect(e,"div.cds--"+n+"--modal"),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","cds--modal cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-title").attr("aria-describedby","modal-description").attr("tabindex",-1)}},e.prototype.destroy=function(){this.removeEventListeners(),this.isEventListenerAdded=!1},e}(kv);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Xg||(Xg={}));var $g=((Yg={})[Xg.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},Yg[Xg.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},Yg[Xg.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Yg[Xg.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Yg),Jg="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},tm=function(){function t(t){void 0===t&&(t={}),this.positions=$g,this.positions=Object.assign({},$g,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),l=s.bottom-r().height,u=s.right-r().width;l=l<0?e.offsetHeight:l,u=u<0?e.offsetWidth:u;var c=e.offsetHeight*e.offsetWidth,h=c-l*u;return{placement:n,weight:(h=0===h?c:h)/c}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:Jg.innerHeight-Jg.scrollY,height:Jg.innerWidth-Jg.scrollX}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}(),em=(new tm,function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="threshold",r.renderType=R.SVG,r.positionService=new tm,r}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=qa(this.getOptions(),"axes"),r=[];Object.keys(n).forEach((function(t){var e,i;if(Object.values(N).includes(t)){var o=n[t];o.thresholds&&o.thresholds.length>0&&r.push({axisPosition:t,thresholds:o.thresholds,correspondingDatasets:null===(e=o)||void 0===e?void 0:e.correspondingDatasets,mapsTo:null===(i=o)||void 0===i?void 0:i.mapsTo})}}));var i=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(r,(function(t){return t.axisPosition}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").merge(i);o.attr("class",(function(t){return"axis-thresholds "+t.axisPosition}));var a=o.selectAll("g.threshold-group").data((function(t){return t.thresholds.map((function(n){return n.axisPosition=t.axisPosition,n.datum=e.constructDatumObj(t,n),n}))}));a.exit().attr("opacity",0).remove();var s=a.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(a).attr("class","threshold-group");var l=this;o.each((function(e){var n=e.axisPosition,r=l.services.cartesianScales.getScaleByPosition(n),i=l.services.cartesianScales.getScaleTypeByPosition(n),o=null,a=null;n===N.LEFT||n===N.RIGHT?(a=r,o=l.services.cartesianScales.getMainXScale()):(o=r,a=l.services.cartesianScales.getMainYScale());var s=i===H.LABELS,u=o.range(),c=u[0],h=u[1],d=a.range(),f=d[0],p=d[1],v=l.services.cartesianScales,g=Xa((function(t){return v.getDomainValue(t)}),(function(t){return v.getRangeValue(t)}),v.getOrientation()),m=g[0],y=g[1],b=Na(this);n===N.TOP||n===N.BOTTOM?(b.selectAll("line.threshold-line").transition().call((function(e){return l.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("y1",p).attr("y2",f).attr("x1",(function(t){var e=t.datum;return m(e)+(s?r.step()/2:0)})).attr("x2",(function(t){var e=t.datum;return m(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),b.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(function(t){var e=t.datum;return-m(e)})).attr("width",Math.abs(f-p)).classed("rotate",!0)):(b.selectAll("line.threshold-line").transition().call((function(e){return l.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("x1",c).attr("x2",h).attr("y1",(function(t){var e=t.datum;return y(e)+(s?r.step()/2:0)})).attr("y2",(function(t){var e=t.datum;return y(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),b.selectAll("rect.threshold-hoverable-area").attr("x",c).attr("y",(function(t){var e=t.datum;return y(e)})).attr("width",Math.abs(h-c)).classed("rotate",!1))})),this.services.events.addEventListener(ut.Threshold.SHOW,(function(t){e.setThresholdLabelPosition(t.detail),e.label.classed("hidden",!1)})),this.services.events.addEventListener(ut.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(t){var e=t.value,n=t.axisPosition,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===H.TIME){var i=[N.LEFT,N.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,l=qa(r,"timeScale"),u=Zp(s.ticks());return Wp(e,0,s.ticks(),u,l)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=Na(this.services.domUtils.getHolder()),e=qa(this.getOptions(),"style","prefix");this.label=wv.appendOrSelect(t,"div.cds--"+e+"--threshold--label").classed("hidden",!0)},e.prototype.setThresholdLabelPosition=function(t){var e=t.event,n=t.datum,r=this.services.domUtils.getHolder(),i=Ba(e,r),o=n.valueFormatter?n.valueFormatter(n.value):this.getFormattedValue(n);this.label.html((n.label||"Threshold")+": "+o).style("background-color",n.fillColor);var a=this.label.node(),s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},a,[Xg.RIGHT,Xg.LEFT,Xg.TOP,Xg.BOTTOM],(function(){return{width:r.offsetWidth,height:r.offsetHeight}})),l=this.positionService.findPositionAt({left:i[0],top:i[1]},a,s);this.positionService.setElement(a,l)},e.prototype.constructDatumObj=function(t,e){var n={};return t.correspondingDatasets&&(n.group=qa(t,"correspondingDatasets",0)),n[t.mapsTo]=e.value,n},e.prototype.addEventListeners=function(){var t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(e){Na(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(ut.Threshold.SHOW,{event:e,hoveredElement:Na(this),datum:Na(this).datum()})})).on("mouseout",(function(e){Na(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(ut.Threshold.HIDE,{event:e,hoveredElement:Na(this),datum:Na(this).datum()})}))},e}(kv)),nm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e.renderType=R.HTML,e}return n(e,t),e.prototype.render=function(){var t=this.getComponentContainer(),e=qa(this.getOptions(),"title"),n=t.selectAll("p.title").data([e]);if(n.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(n).html((function(t){return t})),n.node()&&n.node().offsetWidth<n.node().scrollWidth){var r=this;n.on("mouseover",(function(t){r.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:t,hoveredElement:n,content:n.text()})})).on("mousemove",(function(t){r.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){r.services.events.dispatchEvent(ut.Tooltip.HIDE)}))}n.exit().remove()},e.prototype.truncateTitle=function(t,e){if(!(e<=0)){var n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");var r=wv.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),o=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,o-1)).append("tspan").text("...");var a=this;t.on("mouseover",(function(e){a.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:t,content:n})})).on("mousemove",(function(t){a.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){a.services.events.dispatchEvent(ut.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return wv.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(kv),rm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e.renderType=R.SVG,e}return n(e,t),e.prototype.render=function(){var t=qa(this.model.getDisplayData(),0),e=this.getOptions(),n=this.getComponentContainer(),r=e.data.groupMapsTo;if(qa(e,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{var i=n.selectAll("text.meter-title").data([t[r]]);i.enter().append("text").classed("meter-title",!0).merge(i).attr("x",0).attr("y","1em").text((function(t){return t})),i.exit().remove(),this.appendPercentage()}this.displayStatus();var o=this.getMaxTitleWidth(),a=wv.appendOrSelect(n,"text.meter-title");o>0&&a.node().getComputedTextLength()>o&&this.truncateTitle(a,o)},e.prototype.displayBreakdownTitle=function(){var t,e=this.getComponentContainer(),n=this.getOptions(),r=this.model.getMaximumDomain(this.model.getDisplayData()),i=qa(n,"meter","proportional","total"),o=qa(n,"meter","proportional","unit")?qa(n,"meter","proportional","unit"):"";if(r===i)t=null;else{var a=null!==i?i-r:r,s=qa(n,"meter","proportional","breakdownFormatter");t=null!==s?s({datasetsTotal:r,total:i}):r+" "+o+" used ("+a+" "+o+" available)"}var l=e.selectAll("text.proportional-meter-title").data([t]);l.enter().append("text").classed("proportional-meter-title",!0).merge(l).attr("x",0).attr("y","1em").text((function(t){return t})),l.exit().remove();var u=this.getMaxTitleWidth(),c=wv.appendOrSelect(e,"text.proportional-meter-title");u>0&&c.node().getComputedTextLength()>u&&this.truncateTitle(c,u)},e.prototype.displayTotal=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=qa(e,"meter","proportional","total"),r=n?qa(e,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),i=qa(e,"meter","proportional","unit")?qa(e,"meter","proportional","unit"):"",o=qa(e,"meter","proportional","totalFormatter"),a=null!==o?o(r):n+" "+i+" total",s=wv.getHTMLElementSize(this.services.domUtils.getMainContainer()),l=s.width?s.width:this.parent.node().getAttribute("width"),u=t.selectAll("text.proportional-meter-total").data([a]);u.enter().append("text").classed("proportional-meter-total",!0).merge(u).attr("x",this.model.getStatus()?l-wt.total.paddingRight:l).attr("y","1em").attr("text-anchor","end").text((function(t){return t})),u.exit().remove()},e.prototype.displayStatus=function(){var t=this.getComponentContainer(),e=wv.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=e.width?e.width:0,r=this.model.getStatus(),i=wt.status.indicatorSize/2,o=wv.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),a=r?[r]:[],s=o.selectAll("circle.status").data(a);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var l=o.selectAll("path.innerFill").data(a);l.enter().append("path").merge(l).attr("d",this.getStatusIconPathString(r)).attr("transform","translate(-"+i+", 0)").attr("class","innerFill"),l.exit().remove(),s.exit().remove()},e.prototype.appendPercentage=function(){var t=qa(this.model.getDisplayData(),0,"value"),e=this.getComponentContainer(),n=wv.appendOrSelect(e,"text.meter-title"),r=!0===qa(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),o=wt.statusBar.paddingRight;i.enter().append("text").classed("percent-value",!0).merge(i).text((function(t){return t+"%"})).attr("x",+n.attr("x")+n.node().getComputedTextLength()+o).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=wv.appendOrSelect(this.parent,"tspan"),i=wt.statusBar.paddingRight,o=Math.ceil(r.node().getComputedTextLength());wv.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+o+i)},e.prototype.getMaxTitleWidth=function(){var t=wv.getHTMLElementSize(this.services.domUtils.getMainContainer()),e=qa(this.getOptions(),"meter","proportional"),n=t.width?t.width:this.parent.node().getAttribute("width");if(null!==e){var r=wv.appendOrSelect(this.parent,"text.proportional-meter-total").node();return n-wv.getSVGElementSize(r,{useBBox:!0}).width-wt.total.paddingLeft}var i=wv.appendOrSelect(this.parent,"text.percent-value"),o=wt.statusBar.paddingRight,a=i.node().getComputedTextLength(),s=wv.appendOrSelect(this.parent,"g.status-indicator").node();return n-a-o-(wv.getSVGElementSize(s,{useBBox:!0}).width+wt.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case tt.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case tt.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case tt.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}},e}(nm),im=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.renderType=R.HTML,i.isEventListenerAdded=!1,i.positionService=new tm,i.handleShowTooltip=function(t){var e,n=t.detail.data||t.detail.items,r=i.formatItems(i.getItems(t));e=t.detail.content?'<div class="title-tooltip"><p>'+t.detail.content+"</p></div>":i.getTooltipHTML(r);var o=wv.appendOrSelect(i.tooltip,"div.content-box");if(qa(i.getOptions(),"tooltip","customHTML"))if(t.detail.content){var a='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";o.html(a)}else o.html(i.model.getOptions().tooltip.customHTML(n,e));else o.html(e);o.selectAll(".datapoint-tooltip").each((function(t,e){var n=r[e];r[e]&&r[e].color&&Na(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),i.positionTooltip(t),i.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},i.handleHideTooltip=function(){i.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},i.init(),i}return n(e,t),e.prototype.addTooltipEventListener=function(){var t=this;this.services.events.addEventListener(ut.Tooltip.MOVE,(function(e){!1===t.tooltip.classed("hidden")&&t.positionTooltip(e)})),this.services.events.addEventListener(ut.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(ut.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(ut.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(ut.Tooltip.MOVE,null),this.services.events.removeEventListener(ut.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(ut.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(ut.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this,n=this.getOptions(),r=qa(n,"tooltip","truncation","type"),i=qa(n,"tooltip","truncation","threshold"),o=qa(n,"tooltip","truncation","numCharacter");return r!==U.NONE?t.map((function(t){var n=t.labelIcon?12:0;return t.value=t.value?e.valueFormatter(t.value,t.label):t.value,t.label&&t.label.length+n>i&&(t.label=Fa(t.label,r,o)),t.value&&t.value.length>i&&(t.value=Fa(t.value,r,o)),t})):t},e.prototype.getTooltipHTML=function(t){return'<ul class="multi-tooltip">'+t.map((function(t){return'<li>\n\t\t\t\t\t<div class="datapoint-tooltip'+(t.bold?" bold":"")+'">\n\t\t\t\t\t\t'+(t.class||t.color?'<div class="tooltip-color '+t.class+'"></div>':"")+'\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>'+(t.label||"")+"</p>\n\t\t\t\t\t\t"+(t.labelIcon?'<span class="label-icon"/>'+t.labelIcon+"</span>":"")+"\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t"+(void 0===t.value||null===t.value?"":'<p class="value"/>'+t.value+"</p>")+"\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.valueFormatter=function(t,e){var n=this.getOptions(),r=qa(n,"tooltip","valueFormatter");if(r)return r(t,e);if("function"==typeof t.getTime)return Pp(t,"MMM d, yyyy");try{if("string"==typeof t&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t))return Pp(Date.parse(t),"MMM d, yyyy")}catch(t){}return t.toLocaleString()},e.prototype.render=function(){var t=this.getOptions(),e=qa(t,"tooltip","enabled");if(e){var n=Na(this.services.domUtils.getHolder()),r=qa(t,"style","prefix");this.tooltip=wv.appendOrSelect(n,"div.cds--"+r+"--tooltip"),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!e&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=this.getOptions(),o=qa(i,"zoomBar","top","enabled"),a=qa(t,"detail","mousePosition");if(a){var s=qa(i,"zoomBar","top","type"),l=Dt.height[s];o&&(a[1]+=l+Dt.spacerHeight)}else a=Ba(qa(t,"detail","event"),n);var u,c=n.offsetWidth,h=n.offsetHeight;u=a[0]/c>.9?Xg.LEFT:a[0]/c<.1?Xg.RIGHT:this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[Xg.RIGHT,Xg.LEFT,Xg.TOP,Xg.BOTTOM],(function(){return{width:c,height:h}}));var d=Ct.horizontalOffset;u===Xg.LEFT&&(d*=-1),e=this.positionService.findPositionAt({left:a[0]+d,top:a[1]},r,u),this.positionService.setElement(r,e)},e}(kv),om=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getItems=function(t){var e=this;if(t.detail.items)return t.detail.items;var n=t.detail.data;if(!n.length||!n[0])return[];var r,i=this.getOptions(),o=this.services.cartesianScales,a=o.getDomainIdentifier(),s=o.isDualAxes(),l=i.data.groupMapsTo,u=o.getDomainLabel(),c=o.getRangeLabel(),h=n[0][a];if(1===n.length){var d=n[0],f=o.getRangeIdentifier(d);if(s){var p=o.getRangeAxisPosition({datum:d,groups:[d[l]]});c=o.getScaleLabel(p)}var v=d[f];r=k([{label:u,value:h}],Array.isArray(v)&&2===v.length?[{label:"Start",value:v[0]},{label:"End",value:v[1]}]:[{label:c,value:d[f]}]),t.detail.additionalItems&&t.detail.additionalItems.forEach((function(t){return r.push({label:t.label,value:t.value})})),r.push({label:i.tooltip.groupLabel,value:d[l],color:this.model.getFillColor(d[l]),class:this.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:d[l]})})}else if(n.length>1&&(r=(r=[{label:u,value:h}]).concat(n.map((function(t){var n=t[o.getRangeIdentifier(t)];return{label:t[l],value:Array.isArray(n)&&2===n.length?n[0]+" - "+n[1]:n,color:e.model.getFillColor(t[l]),class:e.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:t[l]})}})).sort((function(t,e){return e.value-t.value}))),!s&&!0===qa(i,"tooltip","showTotal"))){var g=o.getRangeIdentifier();r.push({label:Gn(i,"tooltip.totalLabel")||"Total",value:n.reduce((function(t,e){return t+e[g]}),0),bold:!0})}return r},e}(im),am=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",i.renderType=R.SVG,i.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),i.init(),i}return n(e,t),e.prototype.init=function(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})},e.prototype.render=function(t){this.createClipPath()},e.prototype.createClipPath=function(){var t=this.parent,e=this.services.cartesianScales,n=e.getMainXScale(),r=e.getMainYScale(),i=n.range(),o=i[0],a=i[1],s=r.range(),l=s[0],u=s[1];this.chartClipPath=wv.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=wv.appendOrSelect(this.chartClipPath,"rect."+this.type);c.attr("x",o).attr("y",u).attr("width",a-o).attr("height",l-u),this.chartClipPath.merge(c).lower()},e}(kv),sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="canvas-chart-clip",e.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.createClipPath=function(){var t=this.parent,e=wv.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;this.chartClipPath=wv.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var i=wv.appendOrSelect(this.chartClipPath,"rect."+this.type);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()},e}(am),lm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="highlight",r.renderType=R.SVG,r.positionService=new tm,r.highlightStrokeWidth=1,r}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!1);var e=qa(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((function(t){if(Object.values(N).includes(t)){var r=e[t];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:t,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));var r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(function(t){return t.axisPosition}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").merge(r);i.attr("class",(function(t){return"axis-highlight "+t.axisPosition}));var o=i.selectAll("g.highlight-group").data((function(t){return t.highlight.map((function(e){return e.axisPosition=t.axisPosition,e.highlightStartMapsTo=t.highlightStartMapsTo,e.labelMapsTo=t.labelMapsTo,e.color=t.color,e.highlightEndMapsTo=t.highlightEndMapsTo,e}))}));o.exit().attr("opacity",0).remove();var a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");var s=this;i.each((function(e){var n=e.axisPosition,r=s.services.cartesianScales.getMainXScale(),i=s.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],l=o[1],u=i.range(),c=u[0],h=u[1],d=s.services.cartesianScales,f=Xa((function(t){return d.getDomainValue(t)}),(function(t){return d.getRangeValue(t)}),d.getOrientation()),p=f[0],v=f[1],g=Na(this);n===N.TOP||n===N.BOTTOM?g.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("y",Math.max(h+s.highlightStrokeWidth,0)).attr("height",Math.max(c-2*s.highlightStrokeWidth,0)).attr("x",(function(t){var e=t.highlightStartMapsTo,n=D(t,["highlightStartMapsTo"]);return p(n[e])})).attr("width",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=D(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(p(r[n])-p(r[e]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=D(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=D(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})):g.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("x",a).attr("width",Math.max(l-a,0)).attr("y",(function(t){var e=t.highlightEndMapsTo,n=D(t,["highlightEndMapsTo"]);return v(n[e])})).attr("height",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=D(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(v(r[e])-v(r[n]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=D(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=D(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null}))}))},e}(kv),um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e.renderType=R.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.area").transition("legend-hover-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-area"})})).attr("opacity",(function(t){return t.name!==n.datum().name?pt.opacity.unselected:pt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition("legend-mouseout-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})})).attr("opacity",pt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),r=this.getOptions(),i=[0,0],o=this.services.cartesianScales,a=o.getOrientation(),s=gd().curve(this.services.curves.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];return null!=n})),l=this.model.getGroupedData(this.configs.groups),u=qa(r,"bounds"),c=u&&l&&1===l.length;!c&&u&&console.warn("Bounds can only be shown when having 1 single datagroup, you've supplied "+l.length);var h=0,d=function(t,e){!1===qa(r,"axes",t,"includeZero")&&e[0]>0&&e[1]>0&&(h=e[0])},f=function(t,e){return c?o.getBoundedScaledValues(t,e)[0]:o.getRangeValue(h)},p=function(t,e){return c?o.getBoundedScaledValues(t,e)[1]:o.getRangeValue(t,e)};a===V.VERTICAL?(i=o.getMainYScale().domain(),d(o.getMainYAxisPosition(),i),s.x((function(t,e){return o.getDomainValue(t,e)})).y0((function(t,e){return f(t,e)})).y1((function(t,e){return p(t,e)}))):(i=o.getMainXScale().domain(),d(o.getMainXAxisPosition(),i),s.x0((function(t,e){return f(t,e)})).x1((function(t,e){return p(t,e)})).y((function(t,e){return o.getDomainValue(t,e)})));var v=qa(r,"color","gradient","enabled"),g=l&&1===l.length&&v;l.length>1&&v&&console.error("Gradients can only be enabled when having 1 single dataset");var m=n.selectAll("path.area").data(l,(function(t){return t.name})),y=Na(this.services.domUtils.getMainContainer());if(m.exit().attr("opacity",0).remove(),l.length){if(g){var b=y.select("path."+this.model.getColorClassName({classNameTypes:[P.STROKE],dataGroupName:l[0].name})).node(),x=void 0;if(b)x=getComputedStyle(b,null).getPropertyValue("stroke");else{var _=qa(this.model.getOptions(),"color","scale");if(null!==_)x=_[Object.keys(_)[0]]}Mv.appendOrUpdateLinearGradient({svg:this.parent,id:this.services.domUtils.generateElementIDString(l[0].name.replace(" ","")+"_"+this.gradient_id),x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:Mv.getStops(i,x)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));var E=this,w=m.enter().append("path");g?w.merge(m).style("fill",(function(t){return"url(#"+e.services.domUtils.generateElementIDString(t.name.replace(" ","")+"_"+e.gradient_id)+")"})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return s(e)})):(w.attr("opacity",0).merge(m).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],dataGroupName:t.name,originalClassName:"area"})})).style("fill",(function(t){return E.model.getFillColor(t.name)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",c?1:pt.opacity.selected).attr("d",(function(t){var e=t.data;return s(e)})),c&&w.attr("fill-opacity",pt.opacity.selected).style("stroke",(function(t){return E.model.getStrokeColor(t.name)})).style("stroke-dasharray","2, 2").attr("stroke-width","0.7px"))}},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(kv),cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition("legend-hover-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-area"})})).attr("opacity",(function(t){return qa(t,0,r)!==n.datum().name?pt.opacity.unselected:pt.opacity.selected}))},e.handleLegendMouseOut=function(){e.parent.selectAll("path.area").transition("legend-mouseout-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})})).attr("opacity",pt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this,o=this.getOptions(),a=o.data.groupMapsTo,s=Object.keys(o.axes).some((function(t){return o.axes[t].percentage})),l=this.model.getStackedData({percentage:s,groups:this.configs.groups}),u=qa(l,0,0),c=this.services.cartesianScales.getDomainAxisPosition({firstDatum:u}),h=this.services.cartesianScales.getRangeAxisPosition({firstDatum:u}),d=this.services.cartesianScales.getScaleByPosition(h),f=n.selectAll("path.area").data(l,(function(t){return qa(t,0,a)}));this.areaGenerator=gd().x((function(t,n){return e.services.cartesianScales.getValueThroughAxisPosition(c,t.data.sharedStackKey,n)})).y0((function(t){return d(t[0])})).y1((function(t){return d(t[1])})).curve(this.services.curves.getD3Curve()),f.exit().attr("opacity",0).remove(),f.enter().append("path").attr("opacity",0).merge(f).data(l,(function(t){return qa(t,0,a)})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:qa(t,0,a),originalClassName:"area"})})).style("fill",(function(t){return i.model.getFillColor(qa(t,0,a))})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",(function(t){return qa(t,0,a)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",pt.opacity.selected).attr("d",this.areaGenerator)},e}(kv),hm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.getOptions();if(e.bars.width)return e.bars.width;var n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=wv.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!r.step){var o=qa(e,"bars","spacingFactor");return Math.min(e.bars.maxWidth,i*o/n)}return Math.min(e.bars.maxWidth,r.step()/2)},e.prototype.isOutsideZoomedDomain=function(t,e){if(this.model.getDisplayData().length<=1)return!1;var n=this.model.get("zoomDomain");if(void 0!==n){var r=this.services.cartesianScales.getDomainScale();return t<r(n[0])||e>r(n[1])}return!1},e}(kv),dm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-simple-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getOptions().data.groupMapsTo,i=this.getComponentContainer({withinChartClip:!0}),o=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),s=i.selectAll("path.bar").data(o,(function(t){return t[n]}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[n],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r,i,o=e.services.cartesianScales.getRangeIdentifier(),s=e.getBarWidth(),l=t[o],u=e.services.cartesianScales.getDomainValue(t,n)-s/2,c=u+s;if(Array.isArray(l)&&2===l.length)r=e.services.cartesianScales.getRangeValue(l[0]),i=e.services.cartesianScales.getRangeValue(l[1],n);else{var h=e.services.cartesianScales.getRangeScale().domain()[0];r=e.services.cartesianScales.getRangeValue(Math.max(0,h)),i=e.services.cartesianScales.getRangeValue(t,n)}var d=Math.abs(i-r);if(0!==d&&d<2&&(i=l>0&&a===V.VERTICAL||l<0&&a===V.HORIZONTAL?r-2:r+2),!e.isOutsideZoomedDomain(u,c))return Ya({x0:u,x1:c,y0:r,y1:i},a)})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=Na(this);r.classed("hovered",!0),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEMOVE,{event:e,element:Na(this),datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(hm),fm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.renderType=R.SVG,e.padding=5,e.defaultStepFactor=70,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(this.configs.groups),i=this.getOptions().data.groupMapsTo;this.setGroupScale();var o=this.getComponentContainer({withinChartClip:!0}),a=Va(n.map((function(t){var n=e.services.cartesianScales.getDomainIdentifier(t);return t[n]&&"function"==typeof t[n].toString?t[n].toString():t[n]}))),s=o.selectAll("g.bars").data(a,(function(t){return t}));s.exit().attr("opacity",0).remove();var l=s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(s);l.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-group-update-enter",animate:t})})).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===V.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"}));var u=l.selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}),(function(t){return t[i]}));u.exit().attr("opacity",0).remove(),u.enter().append("path").attr("opacity",0).merge(u).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t,n){var r=e.groupScale(t[i]),o=e.getBarWidth(),a=r,s=r+o,l=e.services.cartesianScales.getRangeAxisPosition({datum:t}),u=e.services.cartesianScales.getValueThroughAxisPosition(l,0),c=e.services.cartesianScales.getRangeValue(t),h=e.services.cartesianScales.getDomainValue(t,n)-o/2,d=h+o;if(!e.isOutsideZoomedDomain(h,d))return Ya({x0:a,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=Na(this);r.classed("hovered",!0),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this;return this.model.getDisplayData(this.configs.groups).filter((function(n){return n[e.services.cartesianScales.getDomainIdentifier(n)].toString()===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e},e.prototype.getDomainScaleStep=function(){var t=this.services.cartesianScales.getDomainScale(),e=this.model.getGroupedData(this.configs.groups),n=this.defaultStepFactor;if("function"==typeof t.step)n=t.step();else if(e.length>0){var r=e.find((function(t){var e;return(null===(e=t.data)||void 0===e?void 0:e.length)>1}));if(r){var i=this.services.cartesianScales.getDomainIdentifier(r.data[0]);n=Math.abs(t(r.data[1][i])-t(r.data[0][i]))}}return n},e.prototype.getTotalGroupPadding=function(){var t=this.model.getGroupedData(this.configs.groups);return 1===t.length?0:Math.min(5,this.getDomainScaleStep()/this.defaultStepFactor*5)*(t.length-1)},e.prototype.getBarWidth=function(){var t=this.getOptions(),e=qa(t,"bars","width"),n=qa(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;var r=this.model.getGroupedData(this.configs.groups).length,i=this.getTotalGroupPadding();return Math.min(n,(this.getDomainScaleStep()-i)/r)},e.prototype.setGroupScale=function(){var t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=cl().domain(t).rangeRound([0,this.getGroupWidth()])},e}(hm),pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),s=this.model.getActiveDataGroupNames(),l=n.selectAll("g.bars").data(a,(function(t){return qa(t,0,o)}));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars");var u=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));u.exit().remove(),u.enter().append("path").merge(u).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[o],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[o])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,o=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-o/2,l=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(a,l)){if(Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize){var h=t[0]<0&&t[1]<=0;h&&s.length>1?e.services.cartesianScales.getOrientation()===V.VERTICAL?c+=0===t[1]?2:1:c-=1:h||(e.services.cartesianScales.getOrientation()===V.VERTICAL?c+=1:c-=1)}return Ya({x0:a,x1:l,y0:u,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n,r){var i,o=Na(this);o.classed("hovered",!0),e.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOVER,{event:n,element:o,datum:r});var a=e.model.getDisplayData(e.configs.groups).find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[e.services.cartesianScales.getRangeIdentifier(n)]===r.data[r[t]]&&n[i].toString()===r.data.sharedStackKey&&n[t]===r[t]}));if(void 0===a){var s=e.services.cartesianScales.getDomainIdentifier(),l=e.services.cartesianScales.getRangeIdentifier();(i={})[s]=r.data.sharedStackKey,i[l]=r.data[r[t]],i[t]=r[t],a=i}e.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:n,hoveredElement:o,data:[a]})})).on("mousemove",(function(t,n){var r=Na(this);e.services.events.dispatchEvent(ut.Bar.BAR_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ut.Bar.BAR_CLICK,{event:t,element:Na(this),datum:n})})).on("mouseout",(function(t,n){var r=Na(this);r.classed("hovered",!1),e.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.getBarWidth=function(){var t=this.getOptions();if(qa(t,"bars","width"))return t.bars.width;var e=this.services.cartesianScales.getMainXScale(),n=wv.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=this.model.getStackKeys().length,i=qa(t,"bars","spacingFactor");return e.step?Math.min(t.bars.maxWidth,e.step()/2):Math.min(t.bars.maxWidth,n*i/r)},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(hm),vm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="boxplot",e.renderType=R.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions().data.groupMapsTo,o=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),l=a.range(),u=l[0],c=l[1],h=s.range(),d=c-u,f=h[0]-h[1];if(0!==d){var p=this.services.cartesianScales,v=p.getOrientation(),g=v===V.VERTICAL,m=Xa((function(t,n){return e.services.cartesianScales.getDomainValue(t,n)}),(function(t,n){return e.services.cartesianScales.getRangeValue(t,n)}),v),y=m[0],b=m[1],x=Math.floor((g?d:f)/o.length),_=Math.min(x/2,16),E=this.model.getBoxplotData(),w=n.selectAll(".box-group").data(E);w.exit().remove();var O=w.enter().append("g").attr("class","box-group"),T=w.merge(O);O.append("path").merge(w.select("path.vertical-line.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"vertical-line start"})})).attr("stroke-width",bt.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalstartline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.quartiles.q_25);return Ya({x0:e,x1:n,y0:r,y1:o},v)})),O.append("path").merge(w.select("path.vertical-line.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"vertical-line end"})})).attr("stroke-width",bt.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalendline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.quartiles.q_75);return Ya({x0:e,x1:n,y0:r,y1:o},v)})),O.append("path").merge(w.select("path.box")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],originalClassName:"box"})})).attr("fill-opacity",bt.box.opacity.default).attr("stroke-width",bt.strokeWidth.default).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","box").attr("aria-label",(function(t){return t[i]})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-quartiles",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/2,n=e+_,r=p.getRangeValue(Math[g?"max":"min"](t.quartiles.q_75,t.quartiles.q_25)),o=r+Math.abs(p.getRangeValue(t.quartiles.q_75)-p.getRangeValue(t.quartiles.q_25));return Ya({x0:e,x1:n,y0:r,y1:o},v)})),O.append("path").merge(w.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/2,n=e+_,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.max);return Ya({x0:e,x1:n,y0:r,y1:o},v)})),O.append("path").merge(w.select("path.whisker.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"whisker start"})})).attr("stroke-width",bt.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-startingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/4,n=e+_/2,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.min);return Ya({x0:e,x1:n,y0:r,y1:o},v)})),O.append("path").merge(w.select("path.median")).attr("fill","none").attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"median"})})).attr("stroke-width",2).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-median",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/2,n=e+_,r=p.getRangeValue(t.quartiles.q_50);return Ya({x0:e,x1:n,y0:r,y1:r},v)})),O.append("path").merge(w.select("path.whisker.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"whisker end"})})).attr("stroke-width",bt.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-endingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/4,n=e+_/2,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.whiskers.max);return Ya({x0:e,x1:n,y0:r,y1:o},v)}));var S=T.selectAll("circle.outlier").data((function(t){return t.outliers.map((function(e){var n;return(n={min:t.whiskers.min,max:t.whiskers.max})[i]=t[i],n.value=e,n}))}));S.exit().remove();var M=S.enter().append("circle");S.merge(M).attr("r",bt.circle.radius).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],originalClassName:"outlier"})})).attr("fill-opacity",bt.circle.opacity.default).attr("cx",y).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-circles",animate:t})})).attr("cy",b),this.addBoxEventListeners(),this.addCircleEventListeners()}},e.prototype.addBoxEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo;this.parent.selectAll("path.highlight-area").on("mouseover",(function(r,i){var o=Na(this);Na(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",bt.box.opacity.hovered),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:e.tooltip.groupLabel,value:i[n],class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP]})},{label:"Minimum",value:i.whiskers.min},{label:"Q1",value:i.quartiles.q_25},{label:"Median",value:i.quartiles.q_50},{label:"Q3",value:i.quartiles.q_75},{label:"Maximum",value:i.whiskers.max},{label:"IQR",value:i.quartiles.q_75-i.quartiles.q_25}]}),t.services.events.dispatchEvent(ut.Boxplot.BOX_MOUSEOVER,{event:r,element:o,datum:i})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.Boxplot.BOX_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Boxplot.BOX_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);Na(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",bt.box.opacity.default),t.services.events.dispatchEvent(ut.Boxplot.BOX_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.addCircleEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",(function(i,o){var a=Na(this);a.classed("hovered",!0).attr("fill-opacity",bt.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel,value:o[n],class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP]})},{label:"Outlier",value:o[r]}]}),t.services.events.dispatchEvent(ut.Boxplot.OUTLIER_MOUSEOVER,{event:i,element:a,datum:o})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.Boxplot.OUTLIER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Boxplot.OUTLIER_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1).attr("fill-opacity",bt.circle.opacity.default),t.services.events.dispatchEvent(ut.Boxplot.OUTLIER_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e}(kv),gm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.renderType=R.SVG,e.handleChartHolderOnHover=function(t){e.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"chart-holder-hover-scatter"})})).attr("opacity",1)},e.handleChartHolderOnMouseOut=function(t){e.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"chart-holder-mouseout-scatter"})})).attr("opacity",0)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("circle.dot").transition("legend-hover-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-scatter"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-scatter"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(ut.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(ut.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(t),n=this.model.get("zoomDomain");return void 0!==n?t.filter((function(t){return t[e].getTime()>=n[0].getTime()&&t[e].getTime()<=n[1].getTime()})):t},e.prototype.getScatterData=function(){var t,e=this,n=this.getOptions();if(this.configs.stacked){var r=Object.keys(n.axes).some((function(t){return n.axes[t].percentage}));t=this.model.getStackedData({groups:this.configs.groups,percentage:r})}else t=this.model.getDisplayData(this.configs.groups).filter((function(t){var n=e.services.cartesianScales.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}));return this.filterBasedOnZoomDomain(t)},e.prototype.render=function(t){if(qa(this.getOptions(),"points","enabled")||qa(this.getOptions(),"bubble","enabled")){var e=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales.getDomainIdentifier(),i=e.selectAll("circle.dot").data(this.getScatterData(),(function(t){return t[n]+"-"+t[r]}));i.exit().attr("opacity",0).remove();var o=i.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(i);this.styleCircles(o,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){var n=this;if(!this.configs.handleThresholds)return!1;var r=this.services.cartesianScales.getOrientation(),i=Xa(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=Xa((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)}),(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)}),r),l=s[0],u=s[1],c=l(t,e),h=u(t,e);return a&&o?h<=a.scaleValue&&c>=o.scaleValue:a?h<=a.scaleValue:o?c>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.points,a=o.filled,s=o.fillOpacity,l=this.services,u=l.cartesianScales,c=(l.transitions,i.data.groupMapsTo),h=Xa((function(t,e){return u.getDomainValue(t,e)}),(function(t,e){return u.getRangeValue(t,e)}),u.getOrientation()),d=h[0],f=h[1],p=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=u.getDomainIdentifier(t),r=n.model.getIsFilled(t[c],t[e],t,a)?[P.FILL,P.STROKE]:[P.STROKE];return n.model.getColorClassName({classNameTypes:r,dataGroupName:t[c],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){var e=u.getDomainIdentifier(t);return n.model.getIsFilled(t[c],t[e],t,a)})).classed("unfilled",(function(t){var e=u.getDomainIdentifier(t);return!n.model.getIsFilled(t[c],t[e],t,a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"scatter-update-enter",animate:e})})).attr("cx",d).attr("cy",f).attr("r",i.points.radius).style("fill",(function(t){var e=u.getDomainIdentifier(t);if(n.model.getIsFilled(t[c],t[e],t,a))return n.model.getFillColor(t[c],t[e],t)})).style("stroke",(function(t){var e=u.getDomainIdentifier(t);return n.model.getStrokeColor(t[c],t[e],t)})).attr("fill-opacity",a?s:1).attr("opacity",p?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[u.getRangeIdentifier(t)]})),this.addEventListeners()},e.prototype.getTooltipAdditionalItems=function(t){return null},e.prototype.addEventListeners=function(){var t=this,e=t.getOptions().data.groupMapsTo;this.parent.selectAll("circle").on("mouseover",(function(n,r){var i=Na(this);i.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:n[e],originalClassName:i.attr("class")})})).style("fill",(function(n){var r=t.services.cartesianScales.getDomainIdentifier(n);return t.model.getFillColor(n[e],n[r],n)})).classed("unfilled",!1),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r],additionalItems:t.getTooltipAdditionalItems(r)}),t.services.events.dispatchEvent(ut.Scatter.SCATTER_MOUSEOVER,{event:n,element:i,datum:r})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.Scatter.SCATTER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Scatter.SCATTER_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(n,r){var i=Na(this);if(i.classed("hovered",!1),!t.configs.filled){var o=t.getOptions().points.filled,a=t.services.cartesianScales.getDomainIdentifier(r),s=t.model.getIsFilled(r[e],r[a],r,o);i.classed("unfilled",!s).style("fill",(function(n){return s||o?t.model.getFillColor(n[e],n[a],n):null}))}t.services.events.dispatchEvent(ut.Scatter.SCATTER_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:i})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(ut.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(ut.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(kv),mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e.renderType=R.SVG,e}return n(e,t),e.prototype.getRadiusScale=function(t){var e=this.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=wv.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,s=a?Gs(i):[1,1];return Iu().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,l=this.services.cartesianScales,u=Xa((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),c=u[0],h=u[1];t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).attr("aria-label",(function(t){return t[l.getRangeIdentifier(t)]})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"bubble-update-enter",animate:e})})).attr("cx",c).attr("cy",h).attr("r",(function(t){return a(t[o]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],dataGroupName:t[s],originalClassName:"dot"})})).style("fill",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getFillColor(t[s],t[e],t)})).style("stroke",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getStrokeColor(t[s],t[e],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)},e.prototype.getTooltipAdditionalItems=function(t){var e=qa(this.getOptions(),"bubble");return[{label:qa(e,"radiusLabel"),value:t[qa(e,"radiusMapsTo")]}]},e}(gm),ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-simple-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e,n=this,i=this.getOptions().data.groupMapsTo,o=this.getComponentContainer({withinChartClip:!0}),a=this.model.getDisplayData(this.configs.groups),s=this.services.cartesianScales.getRangeScale(),l=this.services.cartesianScales.getRangeIdentifier(),u=s.range(),c=u[0],h=u[1],d=s.domain(),f=(d[0],d[1]);!function(){var e=[];a.forEach((function(t){t.ranges?t.ranges.forEach((function(n,r){null!=n&&n<f&&e.push({datum:t,value:n,order:r+1})})):e.push({datum:t,order:1})}));var r=wv.appendOrSelect(o,"g.range-boxes").selectAll("path.range-box").data(e,(function(t){return t[i]+"-"+t.order}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"range-box order-"+t.order})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-range-box-update-enter",animate:t})})).attr("d",(function(t,e){var r,i,o,a;return 1===t.order?(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=h-2,a=c+1):(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=n.services.cartesianScales.getRangeValue(t.value,e),a=h),Ya({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),(e=wv.appendOrSelect(o,"g.bars").selectAll("path.bar").data(a,(function(t){return t[i]}))).exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("bar",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-bar-update-enter",animate:t})})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return n.model.getFillColor(t[i])})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-4,i=r+8,o=n.services.cartesianScales.getRangeValue(0)+1,a=n.services.cartesianScales.getRangeValue(t,e);return Ya({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),function(){var e=wv.appendOrSelect(o,"g.markers").selectAll("path.marker").data(a.filter((function(t){return null!==qa(t,"marker")})),(function(t){return t[i]}));e.exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("marker",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-marker-update-enter",animate:t})})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-12,i=r+24,o=n.services.cartesianScales.getRangeValue(t.marker,e);return Ya({x0:r,x1:i,y0:o,y1:o},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),function(){var e=[];a.filter((function(t){return null!==qa(t,"marker")})).forEach((function(t){var n=t.marker,r=t[l];e=e.concat([{datum:t,value:.25*n,barValue:r},{datum:t,value:.5*n,barValue:r},{datum:t,value:.75*n,barValue:r}])}));var r=wv.appendOrSelect(o,"g.quartiles").selectAll("path.quartile").data(e,(function(t){return t[i]}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"quartile "+(t.value<=t.barValue?"over-bar":"")})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-quartile-update-enter",animate:t})})).attr("d",(function(t,e){var r=t.datum,i=t.value,o=4;r.ranges&&-1!==r.ranges.indexOf(i)&&(o=8);var a=n.services.cartesianScales.getDomainValue(r,e)-o/2,s=a+o,l=n.services.cartesianScales.getRangeValue(i,e);return Ya({x0:a,x1:s,y0:l,y1:l},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("path.bar").on("mouseover",(function(i,o){var a=Na(this);a.classed("hovered",!0),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:o});var s=qa(e,"bullet","performanceAreaTitles"),l=t.model.getMatchingRangeIndexForDatapoint(o);t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel||"Group",value:o[n],class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:o[n]})},{label:"Value",value:o[r]},{label:"Target",value:o.marker},{label:"Percentage",value:Math.floor(o[r]/o.marker*100)+"%"},{label:"Performance",value:s[l]}]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEMOVE,{event:e,element:Na(this),datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Bar.BAR_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1),t.services.events.dispatchEvent(ut.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(kv),bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),i=this.model.getOptions(),o=i.groupIdentifier,a=i.data.groupMapsTo,s=this.model.getBinnedStackedData(),l=this.services.cartesianScales.getMainXScale(),u=n.selectAll("g.bars").data(s,(function(t){return Gn(t,"0."+a)}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",r.GROUP);var c=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}));c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(o,(function(t,e){return e})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"histogram-bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[a],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=Gn(t,"data");if(r){var o=l(r.x1)-l(r.x0)-1,a=e.services.cartesianScales.getDomainValue(r.x0,n),s=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===V.VERTICAL?c+=1:c-=1),Ya({x0:a,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return qa(t,"data",t[a])})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions(),e=t.data.groupMapsTo,n=this;this.parent.selectAll("path.bar").on("mouseover",(function(r,i){var o=Na(this);o.classed("hovered",!0);var a=parseFloat(Gn(i,"data.x0")),s=parseFloat(Gn(i,"data.x1")),l=n.services.cartesianScales.getRangeAxisPosition(),u=n.services.cartesianScales.getScaleLabel(l);n.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:Gn(t,"bins.rangeLabel")||"Range",value:a+" – "+s},{label:t.tooltip.groupLabel||"Group",value:i[e],class:n.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:i[e]})},{label:u,value:Gn(i,"data."+i[e])}]})})).on("mousemove",(function(t,e){n.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("mouseout",(function(t,e){Na(this).classed("hovered",!1),n.services.events.dispatchEvent(ut.Tooltip.HIDE)}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(kv),xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.line").transition("legend-hover-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-line"})})).attr("opacity",(function(t){return t.name!==n.datum().name?Et.opacity.unselected:Et.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition("legend-mouseout-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})})).attr("opacity",Et.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this.services,o=i.cartesianScales,a=i.curves,s=Xa((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),l=s[0],u=s[1],c=this.getOptions(),h=vd().x(l).y(u).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier(t)];return null!=n})),d=[];if(this.configs.stacked){var f=Object.keys(c.axes).some((function(t){return c.axes[t].percentage})),p=c.data.groupMapsTo;d=this.model.getStackedData({groups:this.configs.groups,percentage:f}).map((function(t){var n,r,i,o,a=e.services.cartesianScales.getDomainIdentifier(t),s=e.services.cartesianScales.getRangeIdentifier(t);return{name:qa(t,0,p),data:t.map((function(t){var e;return(e={})[a]=t.data.sharedStackKey,e[p]=t[p],e[s]=t[1],e})),hidden:(n=t,r=function(t){return t[0]!==t[1]},o=Zt(n)?Si:yo,i&&je(n,r,i)&&(r=void 0),!o(n,ji(r)))}}))}else d=this.model.getGroupedData(this.configs.groups);var v=n.selectAll("path.line").data(d,(function(t){return t.name}));v.exit().attr("opacity",0).remove(),v.enter().append("path").classed("line",!0).attr("opacity",0).merge(v).data(d,(function(t){return t.name})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.STROKE],dataGroupName:t.name,originalClassName:"line"})})).style("stroke",(function(t){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.data.map((function(t){return t[e.services.cartesianScales.getRangeIdentifier(t)]})).join(",")})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"line-update-enter",animate:t})})).attr("opacity",(function(t){return t.hidden?0:1})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(kv),_m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="lollipop",e.renderType=R.SVG,e.handleScatterOnHover=function(t){var n=t.detail,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").attr("stroke-width",(function(t){return t[r]!==n.datum[r]?Et.weight.unselected:Et.weight.selected}))},e.handleScatterOnMouseOut=function(t){e.parent.selectAll("line.line").attr("stroke-width",Et.weight.unselected)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").transition("legend-hover-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-line"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?Et.opacity.unselected:Et.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("line.line").transition("legend-mouseout-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})})).attr("opacity",Et.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,o=this.services.cartesianScales,a=o.getMainXScale(),s=o.getMainYScale(),l=o.getDomainIdentifier(),u=o.getOrientation(),c=Xa((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),u),h=c[0],d=c[1],f=n.selectAll("line.line").data(this.getScatterData(),(function(t){return t[i]+"-"+t[l]}));f.exit().attr("opacity",0).remove();var p=f.enter().append("line").attr("opacity",0).merge(f).classed("line",!0).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.STROKE],dataGroupName:t[i],originalClassName:"line"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"lollipop-line-update-enter",animate:t})})).style("stroke",(function(t){return e.model.getFillColor(t[i],t[l],t)})).attr("opacity",1);u===V.HORIZONTAL?p.attr("y1",d).attr("y2",d).attr("x1",a.range()[0]).attr("x2",(function(t,e){return h(t,e)-r.points.radius})):p.attr("x1",h).attr("x2",h).attr("y1",s.range()[0]).attr("y2",(function(t,e){return d(t,e)+r.points.radius})),this.addScatterPointEventListeners()},e.prototype.addScatterPointEventListeners=function(){this.services.events.addEventListener(ut.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(ut.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(ut.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(ut.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e}(gm),Em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e.renderType=R.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this;if(qa(this.getOptions(),"points","enabled")){var n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),s=this.model.getStackedData({groups:this.configs.groups,percentage:a}),l=n.selectAll("g.dots").data(s,(function(t){return qa(t,0,o)}));l.exit().attr("opacity",0).remove();var u=l.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(l).selectAll("circle.dot").data((function(t){return t}));u.exit().attr("opacity",0).remove();var c=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u).datum((function(t){var n,r=t[o],i=e.services.cartesianScales.getDomainIdentifier(t),a=e.services.cartesianScales.getRangeIdentifier(t);return(n={})[o]=r,n[i]=t.data.sharedStackKey,n[a]=t[1],n}));this.styleCircles(c,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.getOptions(),i=r.data.groupMapsTo,o=Object.keys(r.axes).some((function(t){return r.axes[t].percentage})),a=this.model.getStackedData({groups:this.configs.groups,percentage:o}),s=[];return a.forEach((function(r,a){r.forEach((function(r,l){var u,c=r[i],h=r.data.sharedStackKey,d=r.data[c],f=r[1],p=n.services.cartesianScales.getDomainIdentifier(r),v=n.services.cartesianScales.getRangeIdentifier(r);null!=d&&t===n.services.cartesianScales.getDomainValue(h)&&e===n.services.cartesianScales.getRangeValue(f)&&(o&&(d=n.model.getStackedData({groups:n.configs.groups})[a][l].data[c]),null!==d&&s.push(((u={})[i]=c,u[p]=h,u[v]=d,u)))}))})),this.model.getDisplayData(this.configs.groups).filter((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t),r=n.services.cartesianScales.getRangeIdentifier(t);return void 0!==s.find((function(n){return n[i]==t[i]&&n[e]==t[e]&&n[r]==t[r]}))}))},e}(gm);function wm(t,e){var n=this,r=Jl(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Om=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return Ot.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getComponentContainer(),o=this.getOptions(),a=o.data.groupMapsTo,s=o.pie.valueMapsTo,l=this.model.getDisplayData().filter((function(t){return t[s]>0})),u=this.computeRadius();this.arc=ld().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=ld().innerRadius(this.getInnerRadius()).outerRadius(u+Ot.hoverArc.outerRadiusOffset);var c=function(){var t=yd,e=md,n=null,r=zh(0),i=zh($h),o=zh(0);function a(a){var s,l,u,c,h,d=(a=cd(a)).length,f=0,p=new Array(d),v=new Array(d),g=+r.apply(this,arguments),m=Math.min($h,Math.max(-$h,i.apply(this,arguments)-g)),y=Math.min(Math.abs(m)/d,o.apply(this,arguments)),b=y*(m<0?-1:1);for(s=0;s<d;++s)(h=v[p[s]=s]=+t(a[s],s,a))>0&&(f+=h);for(null!=e?p.sort((function(t,n){return e(v[t],v[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,u=f?(m-d*b)/f:0;s<d;++s,g=c)l=p[s],c=g+((h=v[l])>0?h*u:0)+b,v[l]={data:a[l],index:s,value:h,startAngle:g,endAngle:c,padAngle:y};return v}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:zh(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:zh(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:zh(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:zh(+t),a):o},a}().value((function(t){return t[s]})).sort(qa(o,"pie","sortFunction")).padAngle(Ot.padAngle)(l),h=wv.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(c,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("slice",!0).attr("opacity",0).merge(h).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t.data[a],originalClassName:"slice"})})).style("fill",(function(t){return n.model.getFillColor(t.data[a])})).attr("d",this.arc).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"pie_slice_enter_update",animate:t})})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t[s]+", "+ja(t.data[s],l,s)+"%"})).attrTween("d",(function(t){return wm.bind(this)(t,n.arc)}));var d=o.pie.labels.enabled,f=d?c.filter((function(t){return t.data[s]>0})):[],p=wv.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(f,(function(t){return t.data[a]}));p.exit().attr("opacity",0).remove();var v=p.enter().append("text").classed("pie-label",!0),g=[];v.merge(p).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):ja(t.data[s],l,s)+"%"})).datum((function(t){var e=u+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=f.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<Ot.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+Ot.callout.offsetX+Ot.callout.textMargin+t.textOffsetX,o=t.yPosition-Ot.callout.offsetY,t.direction=Y.RIGHT,g.push(t)):(i=t.xPosition-Ot.callout.offsetX-t.textOffsetX-Ot.callout.textMargin,o=t.yPosition-Ot.callout.offsetY,t.direction=Y.LEFT,g.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(g);var m=qa(o,"donut")?"donut":"pie",y=qa(o,m,"alignment"),b=wv.getSVGElementSize(this.getParent(),{useAttrs:!0}).width,x=d?Ot.yOffset:0,_=u+(d?Ot.xOffset:0);y===z.CENTER?_=b/2:y===z.RIGHT&&(_=b-u-Ot.xOffset);var E=u+x;g.length>0&&(E+=Ot.yOffsetCallout),i.attr("x",_+7).attr("y",E),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=wv.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",r.GROUP).attr("data-name","callouts"),n=e.selectAll("g.callout").data(t);n.exit().remove();var i=n.enter().append("g").classed("callout",!0).attr("role",r.GROUP).attr("aria-roledescription","label callout");i.merge(n).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===Y.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+Ot.callout.offsetX,y:n-Ot.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-Ot.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-Ot.callout.offsetX,y:n-Ot.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+Ot.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return Na(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),i.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return Na(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e,n){var r=Na(this);r.classed("hovered",!0).transition("pie_slice_mouseover").call((function(e){return t.services.transitions.setupTransition({transition:e,name:"pie_slice_mouseover"})})).attr("d",t.hoverArc),t.services.events.dispatchEvent(ut.Pie.SLICE_MOUSEOVER,{event:e,element:Na(this),datum:n});var i=t.getOptions().data.groupMapsTo,o=t.getOptions().pie.valueMapsTo;t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{label:n.data[i],value:n.data[o]}]})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.Pie.SLICE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Pie.SLICE_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1).transition("pie_slice_mouseout").call((function(e){return t.services.transitions.setupTransition({transition:e,name:"pie_slice_mouseout"})})).attr("d",t.arc),t.services.events.dispatchEvent(ut.Pie.SLICE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.computeRadius=function(){var t=wv.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height,r=this.getOptions(),i=Math.min(e,n)/2;return r.pie.labels.enabled?i+Ot.radiusOffset:i},e}(kv),Tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e.renderType=R.SVG,e}return n(e,t),e.prototype.getValue=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"value"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getValueRatio=function(){return Vr(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.getOptions();return qa(t,"gauge","type")===$.FULL?1:.5},e.prototype.getArcSize=function(){return this.getArcRatio()*Math.PI*2},e.prototype.getStartAngle=function(){var t=this.getArcSize();return t===2*Math.PI?0:-t/2},e.prototype.getArrow=function(t){var e=this.getOptions();switch(qa(e,"gauge","deltaArrow","direction")){case J.UP:return"4,10 8,6 12,10";case J.DOWN:return"12,6 8,10 4,6";default:return t>0?"4,10 8,6 12,10":"12,6 8,10 4,6"}},e.prototype.render=function(t){var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),i=this.getOptions(),o=this.getValue(),a=this.getValueRatio(),s=this.getArcSize(),l=this.getStartAngle(),u=l+a*s,c=l+s,h=this.computeRadius(),d=this.getInnerRadius();this.backgroundArc=ld().innerRadius(d).outerRadius(h).startAngle(u).endAngle(c),this.arc=ld().innerRadius(d).outerRadius(h).startAngle(l).endAngle(u),wv.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);var f=n.selectAll("path.arc-foreground").data([o]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",(function(t){return qa(e.getOptions(),"color","scale","value")})).attr("d",this.arc).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t})),this.drawValueNumber(),this.drawDelta(),f.exit().remove();var p=qa(i,"gauge","alignment"),v=wv.getSVGElementSize(this.getParent(),{useAttrs:!0}).width,g=h;p===z.CENTER?g=v/2:p===z.RIGHT&&(g=v-h),n.attr("x",g).attr("y",h),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=qa(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=qa(e,"gauge","valueFontSize"),s=qa(e,"gauge","deltaFontSize"),l=qa(e,"gauge","numberSpacing"),u=qa(e,"gauge","showPercentageSymbol"),c=0;n!==$.FULL||i?n===$.SEMI&&i&&(c=-(s(o)+l)):c=s(o);var h=wv.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),d=a(o),f=wv.appendOrSelect(h,"g.gauge-value-number"),p=qa(e,"gauge","numberFormatter"),v=f.selectAll("text.gauge-value-number").data([r]);v.enter().append("text").attr("class","gauge-value-number").merge(v).style("font-size",d+"px").attr("text-anchor","middle").text((function(t){return p(t)}));var g=wv.getSVGElementSize(wv.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width,m=d/2,y=u?"%":"",b=wv.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",m+"px").attr("x",g/2).text(y),x=wv.getSVGElementSize(b,{useBBox:!0}),_=x.width,E=x.height;b.attr("y","-"+E/2+"px"),f.attr("transform","translate(-"+_/2+", 0)")},e.prototype.drawDelta=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=this.getDelta();if(r){var i=this.computeRadius(),o=r?qa(n,"gauge","deltaFontSize"):function(){return 0},a=r?qa(n,"gauge","numberFormatter"):function(){return null},s=qa(n,"gauge","deltaArrow","size"),l=qa(n,"gauge","numberSpacing"),u=qa(n,"gauge","showPercentageSymbol"),c=wv.appendOrSelect(e,"g.gauge-numbers"),h=(g=wv.appendOrSelect(c,"g.gauge-delta").attr("transform","translate(0, "+(o(i)+l)+")"),wv.appendOrSelect(g,"text.gauge-delta-number")),d=u?"%":"";h.data(null===r?[]:[r]),h.enter().append("text").classed("gauge-delta-number",!0).merge(h).attr("text-anchor","middle").style("font-size",o(i)+"px").text((function(t){return""+a(t)+d}));var f=wv.getSVGElementSize(wv.appendOrSelect(e,".gauge-delta-number"),{useBBox:!0}).width,p=qa(n,"gauge","deltaArrow","enabled"),v=g.selectAll("svg.gauge-delta-arrow").data(null!==r&&p?[r]:[]);v.enter().append("svg").merge(v).attr("class","gauge-delta-arrow").attr("x",-s(i)-f/2).attr("y",-s(i)/2-.35*o(i)).attr("width",s(i)).attr("height",s(i)).attr("viewBox","0 0 16 16").each((function(){var e=Na(this);wv.appendOrSelect(e,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var i=qa(n,"gauge","status");wv.appendOrSelect(e,"polygon.gauge-delta-arrow").attr("class",null!==i?"gauge-delta-arrow status--"+i:"").attr("points",t.getArrow(r))})),v.exit().remove(),h.exit().remove()}else{var g;(g=e.select("g.gauge-delta")).empty()||g.remove()}},e.prototype.getInnerRadius=function(){return this.computeRadius()-qa(this.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e,n){t.services.events.dispatchEvent(ut.Gauge.ARC_MOUSEOVER,{event:e,element:Na(this),datum:n})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.Gauge.ARC_MOUSEMOVE,{event:e,element:r,datum:n})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Gauge.ARC_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.Gauge.ARC_MOUSEOUT,{event:e,element:r,datum:n})}))},e.prototype.computeRadius=function(){var t=this.getOptions(),e=qa(t,"gauge","type"),n=wv.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===$.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(kv),Sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e.renderType=R.SVG,e}return n(e,t),e.prototype.render=function(e){var n=this;void 0===e&&(e=!0),t.prototype.render.call(this,e);var r=this;if(this.model.isDataEmpty())this.getComponentContainer().select("g.center").remove();else{var i=wv.appendOrSelect(this.getComponentContainer(),"g.center"),o=this.getOptions(),a=this.computeRadius(),s=qa(o,"donut","center","label");wv.appendOrSelect(i,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",(function(){return null===s||""===s?"central":"initial"})).style("font-size",(function(){return o.donut.center.numberFontSize(a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"donut-figure-enter-update",animate:e})})).tween("text",(function(){return r.centerNumberTween(Na(this))})),null!==s&&""!==s&&wv.appendOrSelect(i,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return o.donut.center.titleFontSize(a)})).attr("y",o.donut.center.titleYPosition(a)).text(s)}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.getOptions(),n=qa(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,n){return t+n[e.pie.valueMapsTo]}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?tu:Yl)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Om),Mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton",e}return n(e,t),e.prototype.render=function(){var t=qa(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===X.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===X.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===X.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==X.DONUT)throw new Error('"'+this.configs.skeleton+'" is not a valid Skeleton type.');this.renderDonutSkeleton(t)}},e.prototype.renderGridSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.renderVertOrHorizSkeleton=function(t){var e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===V.VERTICAL&&this.drawYGrid(t),e===V.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")},e.prototype.renderPieSkeleton=function(t){var e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.renderDonutSkeleton=function(t){var e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.setScales=function(){var t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=Iu().domain([0,1]).range(t),this.yScale=Iu().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=wv.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;this.backdrop=wv.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",r).attr("height",i);var o=wv.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var a=this.xScale.range(),s=a[0],l=(a[1],this.yScale.range()),u=(l[0],l[1]);this.backdrop.merge(o).attr("x",s).attr("y",u),o.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("width"),n=qa(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((function(t){return t*e})),i=wv.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2","100%"),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=qa(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=wv.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=wv.getSVGElementSize(r,{useAttrs:!0}),o=i.width,a=i.height,s=wv.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),l=0===e?"pie":"donut",u=qa(this.getOptions(),l,"alignment");wv.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none");var c=ld().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(Ot.radiusOffset),d=t+(Math.min(o,a)-2*t)/2,f=wv.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+h+", "+d+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n).style("fill",n?"url(#"+this.services.domUtils.generateElementIDString("shimmer-areas")+")":null),p=t+Ot.xOffset;u===z.CENTER?p=o/2:u===z.RIGHT&&(p=o-t-Ot.xOffset);var v=t+Ot.yOffset;f.attr("transform","translate("+p+", "+v+")")},e.prototype.computeOuterRadius=function(){var t=wv.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Ot.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=wv.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=wv.appendOrSelect(e,"defs").lower(),o=wv.appendOrSelect(i,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",0-3*.2*n).attr("x2",r).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)");o.html('\n\t\t\t<stop class="stop-bg-shimmer" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="stop-bg-shimmer" offset="0.4"></stop>\n\t\t'),function t(){o.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(ht).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(kv),Am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton-lines",e}return n(e,t),e.prototype.render=function(){var e=qa(this.getOptions(),"data","loading"),n=!(qa(this.getOptions(),"grid","x","enabled")||qa(this.getOptions(),"grid","y","enabled")||qa(this.getOptions(),"axes","bottom","visible")||qa(this.getOptions(),"axes","left","visible"));e&&!n?t.prototype.renderGridSkeleton.call(this,e):e&&n?this.renderSparklineSkeleton(e):this.removeSkeleton()},e.prototype.renderSparklineSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.drawSparkline=function(t){var e=this.backdrop.attr("width"),n=wv.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",e).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),n.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.updateBackdropStyle=function(){var t=this.parent;this.backdrop=wv.appendOrSelect(t,"svg.chart-skeleton.DAII"),wv.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)},e}(Mm);function Cm(t,e){return t.parent===e.parent?1:2}function Lm(t,e){return t+e.x}function Dm(t,e){return Math.max(t,e.y)}function km(){var t=Cm,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Lm,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Dm,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),l=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,l)/2,c=l.x+t(l,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(c-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Rm(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Im(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Nm)):void 0===e&&(e=Pm);for(var n,r,i,o,a,s=new Vm(t),l=[s];n=l.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new Vm(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Um)}function Pm(t){return t.children}function Nm(t){return Array.isArray(t)?t[1]:null}function Bm(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Um(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Vm(t){this.data=t,this.depth=this.height=0,this.parent=null}function Hm(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Array.from(t))).length,o=[];r<i;)e=t[r],n&&jm(n,e)?++r:(n=Wm(o=Gm(o,e)),r=0);return n}function Gm(t,e){var n,r;if(Fm(e,t))return[e];for(n=0;n<t.length;++n)if(zm(e,t[n])&&Fm(qm(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(zm(qm(t[n],t[r]),e)&&zm(qm(t[n],e),t[r])&&zm(qm(t[r],e),t[n])&&Fm(Zm(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function zm(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function jm(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Fm(t,e){for(var n=0;n<e.length;++n)if(!jm(t,e[n]))return!1;return!0}function Wm(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return qm(t[0],t[1]);case 3:return Zm(t[0],t[1],t[2])}var e}function qm(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,l=o-n,u=a-r,c=s-i,h=Math.sqrt(l*l+u*u);return{x:(n+o+l/h*c)/2,y:(r+a+u/h*c)/2,r:(h+i+s)/2}}function Zm(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,l=e.r,u=n.x,c=n.y,h=n.r,d=r-a,f=r-u,p=i-s,v=i-c,g=l-o,m=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+l*l,x=y-u*u-c*c+h*h,_=f*p-d*v,E=(p*x-v*b)/(2*_)-r,w=(v*g-p*m)/_,O=(f*b-d*x)/(2*_)-i,T=(d*m-f*g)/_,S=w*w+T*T-1,M=2*(o+E*w+O*T),A=E*E+O*O-o*o,C=-(S?(M+Math.sqrt(M*M-4*S*A))/(2*S):A/M);return{x:r+E+w*C,y:i+O+T*C,r:C}}function Ym(t,e,n){var r,i,o,a,s=t.x-e.x,l=t.y-e.y,u=s*s+l*l;u?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(u+a-i)/(2*u),o=Math.sqrt(Math.max(0,a/u-r*r)),n.x=t.x-r*s-o*l,n.y=t.y-r*l+o*s):(r=(u+i-a)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-o*l,n.y=e.y+r*l+o*s)):(n.x=e.x+n.r,n.y=e.y)}function Xm(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Km(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Qm(t){this._=t,this.next=null,this.previous=null}function $m(t){if(!(i=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var e,n,r,i,o,a,s,l,u,c,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;Ym(n,e,r=t[2]),e=new Qm(e),n=new Qm(n),r=new Qm(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){Ym(e._,n._,r=t[s]),r=new Qm(r),l=n.next,u=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(Xm(l._,r._)){n=l,e.next=n,n.previous=e,--s;continue t}c+=l._.r,l=l.next}else{if(Xm(u._,r._)){(e=u).next=n,n.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(l!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=Km(e);(r=r.next)!==n;)(a=Km(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Hm(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function Jm(t){return null==t?null:ty(t)}function ty(t){if("function"!=typeof t)throw new Error;return t}function ey(){return 0}function ny(t){return function(){return t}}function ry(t){return Math.sqrt(t.value)}function iy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function oy(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=$m(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function ay(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function sy(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ly(t,e,n,r,i){for(var o,a=t.children,s=-1,l=a.length,u=t.value&&(r-e)/t.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u}function uy(t,e){return t.parent===e.parent?1:2}function cy(t){var e=t.children;return e?e[0]:t.t}function hy(t){var e=t.children;return e?e[e.length-1]:t.t}function dy(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function fy(t,e,n){return t.a.parent===e.parent?t.a:n}function py(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function vy(){var t=uy,e=1,n=1,r=null;function i(i){var l=function(t){for(var e,n,r,i,o,a=new py(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new py(r[i],i)),n.parent=e;return(a.parent=new py(null,0)).children=[a],a}(i);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)i.eachBefore(s);else{var u=i,c=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)}));var d=u===c?1:t(u,c)/2,f=d-u.x,p=e/(c.x+d+f),v=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*v}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,l=o.parent.children[0],u=o.m,c=a.m,h=s.m,d=l.m;s=hy(s),o=cy(o),s&&o;)l=cy(l),(a=hy(a)).a=e,(i=s.z+h-o.z-u+t(s._,o._))>0&&(dy(fy(s,e,r),e,i),u+=i,c+=i),h+=s.m,u+=o.m,d+=l.m,c+=a.m;s&&!hy(a)&&(a.t=s,a.m+=h-c),o&&!cy(l)&&(l.t=o,l.m+=u-d,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function gy(t,e,n,r,i){for(var o,a=t.children,s=-1,l=a.length,u=t.value&&(i-n)/t.value;++s<l;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}Vm.prototype=Im.prototype={constructor:Vm,count:function(){return this.eachAfter(Rm)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(e,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Im(this).eachBefore(Bm)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n])}while(o.length)}},py.prototype=Object.create(Vm.prototype);var my=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,l,u,c,h,d,f,p,v,g,m=[],y=e.children,b=0,x=0,_=y.length,E=e.value;b<_;){l=i-n,u=o-r;do{c=y[x++].value}while(!c&&x<_);for(h=d=c,g=c*c*(v=Math.max(u/l,l/u)/(E*t)),p=Math.max(d/g,g/h);x<_;++x){if(c+=s=y[x].value,s<h&&(h=s),s>d&&(d=s),g=c*c*v,(f=Math.max(d/g,g/h))>p){c-=s;break}p=f}m.push(a={value:c,dice:l<u,children:y.slice(b,x)}),a.dice?ly(a,n,r,i,E?r+=u*c/E:o):gy(a,n,r,E?n+=l*c/E:i,o),E-=c,b=x}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);var yy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tree",e.renderType=R.SVG,e}return n(e,t),e.prototype.getLongestLabel=function(t){var e=this,n="";return t.forEach((function(t){var r=t.children?e.getLongestLabel(t.children):"";(r.length>n.length||t.name.length>n.length)&&(n=r.length>t.name.length?r:t.name)})),n},e.prototype.getMockLabelWidth=function(t,e){var n=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(e),r=wv.getSVGElementSize(n.node(),{useBBox:!0}).width;return n.remove(),r},e.prototype.render=function(t){var e=this,n=this.getComponentContainer();n.html("");var r=wv.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getOptions(),s=this.model.getDisplayData(),l=qa(a,"tree","rootTitle")||"Tree",u=this.getMockLabelWidth(n,l),c=this.getLongestLabel(s),h=this.getMockLabelWidth(n,c),d=0,f=u>0?u+6:24,p=Im({name:l,children:s}),v=i/6,g=function(t){var r=p.descendants().reverse(),o=p.links(),a=p,s=p;p.eachBefore((function(t){t.x<a.x&&(a=t),t.x>s.x&&(s=t)}));var l=s.x-a.x,u=n.transition().call((function(t){return e.services.transitions.setupTransition({transition:t,name:"tree-update-viewbox",animate:!0})})).attr("viewBox",[-f,a.x,i,l]),c=E.selectAll("g").data(r,(function(t){return t.id})),h=e,d=c.enter().append("g").attr("transform",(function(){return"translate("+t.y0+","+t.x0+")"})).attr("class",(function(t){return 0!==t.depth&&t.children&&t.children.length>0?"clickable":null})).on("mouseover",(function(t,e){h.services.events.dispatchEvent(ut.Tree.NODE_MOUSEOVER,{event:t,element:Na(this),datum:e})})).on("click",(function(t,e){0!==e.depth&&(e.children=e.children?null:e._children,g(e)),h.services.events.dispatchEvent(ut.Tree.NODE_CLICK,{event:t,element:Na(this),datum:e})})).on("mouseout",(function(t,e){h.services.events.dispatchEvent(ut.Tree.NODE_MOUSEOUT,{event:t,element:Na(this),datum:e})}));d.append("circle").attr("r",2.5).attr("class",(function(t){return t._children?"parent":"child"})).attr("stroke-width",10),d.append("text").attr("dy","0.31em").attr("x",(function(t){return t._children?-6:6})).attr("text-anchor",(function(t){return t._children?"end":"start"})).text((function(t){return t.data.name})).clone(!0).attr("class","text-stroke").lower(),c.merge(d).transition(u).attr("transform",(function(t){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",1).attr("stroke-opacity",1),c.exit().transition(u).remove().attr("transform",(function(){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",0).attr("stroke-opacity",0);var v=_.selectAll("path").data(o,(function(t){return t.target.id})),m=v.enter().append("path").attr("d",(function(e){var n={x:t.x0,y:t.y0};return x({source:n,target:n})}));v.merge(m).transition(u).attr("d",x),v.exit().transition(u).remove().attr("d",(function(){var e={x:t.x,y:t.y};return x({source:e,target:e})})),p.eachBefore((function(t){t.x0=t.x,t.y0=t.y}))},m=p.descendants(),y=m[m.length-1].depth,b=qa(a,"tree","type")===F.DENDROGRAM?km().size([o,i-h-6*y-u]):vy().nodeSize([10,v]).size([o,i-h-6*y-u]),x=Sd().x((function(t){return t.y})).y((function(t){return t.x}));p.x0=v/2,p.y0=0,p.descendants().forEach((function(t,e){t.id=e,t._children=t.children})),b(p),n.attr("viewBox",[-f,-d,i,10]).style("user-select","none");var _=n.append("g").attr("class","links"),E=n.append("g").attr("class","nodes");g(p)}},e}(kv),by={black:{100:"#000000"},blue:{10:"#edf5ff",20:"#d0e2ff",30:"#a6c8ff",40:"#78a9ff",50:"#4589ff",60:"#0f62fe",70:"#0043ce",80:"#002d9c",90:"#001d6c",100:"#001141"},coolGray:{10:"#f2f4f8",20:"#dde1e6",30:"#c1c7cd",40:"#a2a9b0",50:"#878d96",60:"#697077",70:"#4d5358",80:"#343a3f",90:"#21272a",100:"#121619"},cyan:{10:"#e5f6ff",20:"#bae6ff",30:"#82cfff",40:"#33b1ff",50:"#1192e8",60:"#0072c3",70:"#00539a",80:"#003a6d",90:"#012749",100:"#061727"},gray:{10:"#f4f4f4",20:"#e0e0e0",30:"#c6c6c6",40:"#a8a8a8",50:"#8d8d8d",60:"#6f6f6f",70:"#525252",80:"#393939",90:"#262626",100:"#161616"},green:{10:"#defbe6",20:"#a7f0ba",30:"#6fdc8c",40:"#42be65",50:"#24a148",60:"#198038",70:"#0e6027",80:"#044317",90:"#022d0d",100:"#071908"},magenta:{10:"#fff0f7",20:"#ffd6e8",30:"#ffafd2",40:"#ff7eb6",50:"#ee5396",60:"#d02670",70:"#9f1853",80:"#740937",90:"#510224",100:"#2a0a18"},orange:{10:"#fff2e8",20:"#ffd9be",30:"#ffb784",40:"#ff832b",50:"#eb6200",60:"#ba4e00",70:"#8a3800",80:"#5e2900",90:"#3e1a00",100:"#231000"},purple:{10:"#f6f2ff",20:"#e8daff",30:"#d4bbff",40:"#be95ff",50:"#a56eff",60:"#8a3ffc",70:"#6929c4",80:"#491d8b",90:"#31135e",100:"#1c0f30"},red:{10:"#fff1f1",20:"#ffd7d9",30:"#ffb3b8",40:"#ff8389",50:"#fa4d56",60:"#da1e28",70:"#a2191f",80:"#750e13",90:"#520408",100:"#2d0709"},teal:{10:"#d9fbfb",20:"#9ef0f0",30:"#3ddbd9",40:"#08bdba",50:"#009d9a",60:"#007d79",70:"#005d5d",80:"#004144",90:"#022b30",100:"#081a1c"},warmGray:{10:"#f7f3f2",20:"#e5e0df",30:"#cac5c4",40:"#ada8a8",50:"#8f8b8b",60:"#726e6e",70:"#565151",80:"#3c3838",90:"#272525",100:"#171414"},white:{0:"#ffffff"},yellow:{10:"#fcf4d6",20:"#fddc69",30:"#f1c21b",40:"#d2a106",50:"#b28600",60:"#8e6a00",70:"#684e00",80:"#483700",90:"#302400",100:"#1c1500"}},xy=function(){var t,e=Na(this.parentNode).select("rect.leaf"),n=Ml(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(by);e<n.length;e++)for(var r=n[e],i=by[r],o=0,a=Object.keys(i);o<a.length;o++){var s=a[o];if(i[s]===t)return s}return null}(n?n.hex():null)),null==t){var r=Ul(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},_y=0,Ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-treemap"})})).attr("opacity",(function(t){return t.parent.data.name===n.datum().name?1:.3}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),r=(this.model.getData(),this.model.getDisplayData()),i=this.model.getOptions(),o=qa(window,"location"),a=wv.getSVGElementSize(n,{useAttrs:!0}),s=a.width,l=a.height,u=Im({name:i.title||"Treemap",children:r}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),c=function(){var t=my,e=!1,n=1,r=1,i=[0],o=ey,a=ey,s=ey,l=ey,u=ey;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(sy),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,d=e.y1-n;h<r&&(r=h=(r+h)/2),d<c&&(c=d=(c+d)/2),e.x0=r,e.y0=c,e.x1=h,e.y1=d,e.children&&(n=i[e.depth+1]=o(e)/2,r+=u(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(d-=l(e)-n)<c&&(c=d=(c+d)/2),t(e,r,c,h,d))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=ty(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:ny(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:ny(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:ny(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:ny(+t),c):l},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:ny(+t),c):u},c}().size([s,l]).paddingInner(1).paddingOuter(0).round(!0)(u),h=(this.services.transitions,n.selectAll("g[data-name='leaf']").data(c.leaves(),(function(t){return t.data.name})));h.exit().attr("opacity",0).remove();var d=h.enter().append("g").attr("data-name","leaf").attr("data-uid",(function(){return _y++})).merge(h);d.attr("data-name","leaf").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-group-update",animate:t})})).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"}));var f=d.selectAll("rect.leaf").data((function(t){return[t]}));f.exit().attr("width",0).attr("height",0).remove(),f.enter().append("rect").classed("leaf",!0).merge(f).attr("width",0).attr("height",0).attr("id",(function(){var t=Na(this.parentNode).attr("data-uid");return i.style.prefix+"-leaf-"+t})).attr("class",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t.data.name,originalClassName:"leaf"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-leaf-update-enter",animate:t})})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).style("fill",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getFillColor(t.data.name)})),d.selectAll("clipPath").data((function(t){return!0!==t.data.showLabel?[]:[1]}),(function(t){return t})).join((function(t){t.append("clipPath").attr("id",(function(){var t=Na(this.parentNode).attr("data-uid");return i.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=Na(this.parentNode.parentNode).attr("data-uid"),e=i.style.prefix+"-leaf-"+t;return new URL("#"+e,o)+""}))}),(function(t){return null}),(function(t){return t.remove()})),d.selectAll("text").data((function(t){if(!0!==t.data.showLabel)return[];for(var n=t;n.depth>1;)n=n.parent;var r=Ul(e.model.getFillColor(n.data.name));return[{text:t.data.name,color:r.l<.5?"white":"black"}]}),(function(t){return t})).join((function(t){var e=t.append("text").text((function(t){return t.text})).style("fill",xy).attr("x",7).attr("y",18);o&&e.attr("clip-path",(function(){var t=Na(this.parentNode).attr("data-uid"),e=i.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,o)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",xy)}),(function(t){return t.remove()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(e,n){for(var r=Na(this),i=getComputedStyle(this,null).getPropertyValue("fill"),o=n;o.depth>1;)o=o.parent;r.transition("graph_element_mouseover_fill_update").call((function(e){return t.services.transitions.setupTransition({transition:e,name:"graph_element_mouseover_fill_update"})})).style("fill",(function(e){var n=t.model.getFillColor(e.parent.data.name);return n&&(i=n),Ml(i).darker(.7).toString()})),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{color:i,label:o.data.name,bold:!0},{label:n.data.name,value:n.data.value}]}),t.services.events.dispatchEvent(ut.Treemap.LEAF_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.Treemap.LEAF_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Treemap.LEAF_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1);for(var i=n;i.depth>1;)i=i.parent;r.transition().call((function(e){return t.services.transitions.setupTransition({transition:e,name:"graph_element_mouseout_fill_update"})})).style("fill",(function(e){return t.model.getFillColor(e.parent.data.name)})),t.services.events.dispatchEvent(ut.Treemap.LEAF_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})}))},e}(kv);function wy(t){var e,n=(Ty(t)%(e=360)+e)%e;return Oy(n,[0,10])||Oy(n,[350,0])?{textAnchor:K.START,dominantBaseline:Q.MIDDLE}:Oy(n,[10,80])?{textAnchor:K.START,dominantBaseline:Q.HANGING}:Oy(n,[80,100])?{textAnchor:K.MIDDLE,dominantBaseline:Q.HANGING}:Oy(n,[100,170])?{textAnchor:K.END,dominantBaseline:Q.HANGING}:Oy(n,[170,190])?{textAnchor:K.END,dominantBaseline:Q.MIDDLE}:Oy(n,[190,260])?{textAnchor:K.END,dominantBaseline:Q.BASELINE}:Oy(n,[260,280])?{textAnchor:K.MIDDLE,dominantBaseline:Q.BASELINE}:{textAnchor:K.START,dominantBaseline:Q.BASELINE}}function Oy(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function Ty(t){return t*(180/Math.PI)}function Sy(t,e,n){void 0===n&&(n={x:0,y:0});var r=e*Math.cos(t)+n.x,i=e*Math.sin(t)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}var My=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.renderType=R.SVG,e.getLabelDimensions=function(t){var n=wv.appendOrSelect(e.getComponentContainer(),"g.tmp-tick"),r=wv.appendOrSelect(n,"text").text(t),i=wv.getSVGElementSize(r.node(),{useBBox:!0}),o=i.width,a=i.height;return n.remove(),{width:o,height:a}},e.normalizeFlatData=function(t){var n=e.getOptions(),r=qa(n,"radar","axes"),i=r.angle,o=r.value,a=qa(n,"data","groupMapsTo"),s=ao(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[a]=e,n[o]=null,n}))})));return mo(s,t)},e.normalizeGroupedData=function(t){var n=e.getOptions(),r=qa(n,"radar","axes"),i=r.angle,o=r.value,a=qa(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[a]=n,e[i]=t,e[o]=null,e}));return{name:n,data:mo(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.blobs path").transition("legend-hover-blob").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-blob"})})).style("fill-opacity",(function(t){return t.name!==n.datum().name?Tt.opacity.unselected:Tt.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?Tt.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})})).style("fill-opacity",Tt.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),i=wv.getSVGElementSize(n,{useAttrs:!0}),o=i.width,a=i.height,s=this.model.getData(),l=this.model.getGroupedData(),u=this.getOptions(),c=qa(u,"data","groupMapsTo"),h=qa(u,"radar","axes","value"),d=qa(u,"radar","axes"),f=d.angle,p=d.value,v=Tt.xLabelPadding,g=Tt.yLabelPadding,m=Tt.yTicksNumber,y=Tt.minRange,b=Tt.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[f]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[c]})))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(l);var x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+g),_=(Math.min(o,a)-x)/2;if(!(_<=0)){var E=cl().domain(this.fullDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),w=rl(this.fullDataNormalized.map((function(t){return t[p]}))),O=Iu().domain([w>=0?0:w,nl(this.fullDataNormalized.map((function(t){return t[p]})))]).range([y,_]).nice(m),T=O.ticks(m),S=function(t){return e.model.getFillColor(t)},M=Ed().angle((function(t){return E(t[f])+Math.PI/2})).radius((function(t){return O(t[p])})).curve($d),A={x:nl(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=E(t),_*Math.sin(n-Math.PI/2))})))+v,y:a/2},C=wv.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(T,(function(t){return t})),L=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[f]=e,n[p]=t,n}))};C.join((function(n){return n.append("path").attr("opacity",0).attr("transform","translate("+A.x+", "+A.y+")").attr("fill","none").call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_axes_enter",animate:t})})).attr("opacity",1).attr("d",(function(t){return M(L(t))}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_axes_update",animate:t})})).attr("opacity",1).attr("transform","translate("+A.x+", "+A.y+")").attr("d",(function(t){return M(L(t))}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_axes_exit",animate:t})})).attr("d",(function(t){return M(L(t))})).attr("opacity",0).remove()}))})),wv.appendOrSelect(n,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("opacity",0).attr("class",(function(t){return"x-axis-"+go(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return Sy(E(t),0,A).x})).attr("y1",(function(t){return Sy(E(t),0,A).y})).attr("x2",(function(t){return Sy(E(t),0,A).x})).attr("y2",(function(t){return Sy(E(t),0,A).y})).call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_axes_enter",animate:t})})).attr("opacity",1).attr("x1",(function(t){return Sy(E(t),O.range()[0],A).x})).attr("y1",(function(t){return Sy(E(t),O.range()[0],A).y})).attr("x2",(function(t){return Sy(E(t),O.range()[1],A).x})).attr("y2",(function(t){return Sy(E(t),O.range()[1],A).y}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_axes_update",animate:t})})).attr("opacity",1).attr("x1",(function(t){return Sy(E(t),O.range()[0],A).x})).attr("y1",(function(t){return Sy(E(t),O.range()[0],A).y})).attr("x2",(function(t){return Sy(E(t),O.range()[1],A).x})).attr("y2",(function(t){return Sy(E(t),O.range()[1],A).y}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_axes_exit",animate:t})})).attr("opacity",0).remove()}))})),wv.appendOrSelect(n,"g.x-labels").attr("role",r.GROUP).selectAll("text").data(this.uniqueKeys).join((function(n){return n.append("text").text((function(t){return t})).attr("opacity",0).attr("x",(function(t){return Sy(E(t),O.range()[1]+v,A).x})).attr("y",(function(t){return Sy(E(t),O.range()[1]+v,A).y})).style("text-anchor",(function(t){return wy(E(t)).textAnchor})).style("dominant-baseline",(function(t){return wy(E(t)).dominantBaseline})).call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_labels_enter",animate:t})})).attr("opacity",1)}))}),(function(r){return r.call((function(r){return r.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_labels_update",animate:t})})).attr("opacity",1).attr("x",(function(t){return Sy(E(t),O.range()[1]+v,A).x})).attr("y",(function(t){return Sy(E(t),O.range()[1]+v,A).y})).end().finally((function(){var t=qa(u,"radar","alignment"),r=e.getAlignmentXOffset(t,n,e.getParent());n.attr("x",r)}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_labels_exit",animate:t})})).attr("opacity",0).remove()}))})),wv.appendOrSelect(n,"g.blobs").attr("role",r.GROUP).selectAll("path").data(this.groupedDataNormalized,(function(t){return t.name})).join((function(n){return n.append("path").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-label",(function(t){return t.name})).attr("opacity",0).attr("transform",t?function(){return"translate("+A.x+", "+A.y+") scale("+(1+.35*Math.random())+")"}:"translate("+A.x+", "+A.y+")").style("fill",(function(t){return S(t.name)})).style("fill-opacity",Tt.opacity.selected).style("stroke",(function(t){return S(t.name)})).call((function(n){var r=n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_blobs_enter",animate:t})}));t&&r.delay((function(){return 30*Math.random()})).attr("transform","translate("+A.x+", "+A.y+")"),r.attr("opacity",1).attr("d",(function(t){return M(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).style("fill",(function(t){return S(t.name)})).style("stroke",(function(t){return S(t.name)})),n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_blobs_update",animate:t})})).attr("opacity",1).attr("transform","translate("+A.x+", "+A.y+")").attr("d",(function(t){return M(t.data)}))}))}),(function(n){return n.call((function(n){var r=n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_blobs_exit",animate:t})}));t&&r.delay((function(){return 30*Math.random()})).attr("transform",(function(){return"translate("+A.x+", "+A.y+") scale("+(1+.35*Math.random())+")"})),r.attr("opacity",0).remove()}))})),wv.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.fullDataNormalized.filter((function(t){return null!==qa(t,p)}))).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL).attr("aria-label",(function(t){return t[h]}))}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[c],originalClassName:go(t[f])})})).attr("cx",(function(t){return Sy(E(t[f]),O(t[p]),A).x})).attr("cy",(function(t){return Sy(E(t[f]),O(t[p]),A).y})).attr("r",0).attr("opacity",0).style("fill",(function(t){return S(t[c])})),wv.appendOrSelect(n,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect")}),(function(t){return t}),(function(t){return t.remove()})).attr("x",A.x).attr("y",A.y-b/2).attr("width",O.range()[1]).attr("height",b).style("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+Ty(E(t))+", "+A.x+", "+A.y+")"})),wv.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(Gs(T)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return Sy(-Math.PI/2,O(t),A).x+g})).attr("y",(function(t){return Sy(-Math.PI/2,O(t),A).y})).style("text-anchor","start").style("dominant-baseline","middle").call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_labels_enter",animate:t})})).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_labels_update",animate:t})})).text((function(t){return t})).attr("opacity",1).attr("x",(function(t){return Sy(-Math.PI/2,O(t),A).x+g})).attr("y",(function(t){return Sy(-Math.PI/2,O(t),A).y}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_labels_exit",animate:t})})).attr("opacity",0).remove()}))})),this.addEventListeners()}},e.prototype.getAlignmentXOffset=function(t,e,n){var r=wv.getSVGElementSize(e,{useBBox:!0}),i=wv.getSVGElementSize(n,{useAttrs:!0}).width,o=0;return t===z.CENTER?o=Math.floor((i-r.width)/2):t===z.RIGHT&&(o=i-r.width),o},e.prototype.destroy=function(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=qa(this.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n,r){var i=Na(this);t.services.events.dispatchEvent(ut.Radar.X_AXIS_MOUSEOVER,{event:n,element:i,datum:r});var o=t.parent.select(".x-axes .x-axis-"+go(r)),a=t.parent.selectAll(".dots circle."+go(r)),s=t.model.getActiveDataGroupNames(),l=t.getOptions(),u=l.data.groupMapsTo,c=qa(l,"radar","axes","value");o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",(function(t){return-1!==s.indexOf(t[u])?1:0})).attr("r",Tt.dotsRadius);var h=t.fullDataNormalized.filter((function(t){return t[e]===r&&-1!==s.indexOf(t[u])}));t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:n,hoveredElement:i,items:h.filter((function(t){return"number"==typeof t[c]})).map((function(e){return{label:e[u],value:e[c],color:t.model.getFillColor(e[u]),class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.Radar.X_AXIS_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Radar.X_AXIS_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this),i=t.parent.select(".x-axes .x-axis-"+go(n)),o=t.parent.selectAll(".dots circle."+go(n));i.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(ut.Radar.X_AXIS_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE)}))},e}(kv),Ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle-pack",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.node").transition("legend-hover-circlepack").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-circlepack"})})).attr("opacity",(function(t){return t.data.dataGroupName===n.datum().name?1:mt.circles.fillOpacity}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.node").transition("legend-mouseout-circlepack").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-circlepack"})})).attr("opacity",1)},e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),r=wv.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getDisplayData(),s=this.model.hasParentNode(),l=this.model.getHierarchyLevel(),u=this.getOptions(),c=qa(u,"canvasZoom","enabled");s&&qa(a,0,"children")&&(a=qa(a,0,"children"));var h=Im({children:a}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),d=function(){var t=null,e=1,n=1,r=ey;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(iy(t)).eachAfter(oy(r,.5)).eachBefore(ay(1)):i.eachBefore(iy(ry)).eachAfter(oy(ey,1)).eachAfter(oy(r,i.r/Math.min(e,n))).eachBefore(ay(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Jm(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:ny(+t),i):r},i}().size([i,o]).padding((function(t){return t.depth>=1?mt.padding.children+3:mt.padding.mainGroup+3}))(h).descendants().splice(1).filter((function(t){return t.depth<=l})),f=n.selectAll("circle.node").data(d);f.exit().attr("width",0).attr("height",0).remove();var p=f.enter().append("circle").classed("node",!0);p.merge(f).attr("class",(function(t){var n=c&&3===l?e.getZoomClass(t):"";return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],dataGroupName:t.data.dataGroupName,originalClassName:t.children?"node "+n:"node node-leaf "+n})})).style("fill",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})).transition("circlepack-leaf-update-enter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"circlepack-leaf-update-enter"})})).attr("r",(function(t){return t.r})).attr("opacity",1).attr("fill-opacity",mt.circles.fillOpacity),!0===c&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,p,gt),this.setBackgroundListeners()),s||this.addLegendListeners(),this.addEventListeners()}},e.prototype.unhighlightChildren=function(t){var e=this,n=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return n.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)}))},e.prototype.highlightChildren=function(t){var e=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return e.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",mt.circles.hover.stroke)},e.prototype.getZoomClass=function(t){return 3===this.model.getHierarchyLevel()&&this.focal&&(t.data===this.focal.data||this.focal.children.some((function(e){return e.data===t.data})))?"focal":"non-focal"},e.prototype.addLegendListeners=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.removeBackgroundListeners=function(){Na(this.services.domUtils.getMainContainer()).on("click",(function(){return null}))},e.prototype.setBackgroundListeners=function(){var t=Na(this.services.domUtils.getMainContainer()),e=this,n=this.parent.selectAll("circle.node"),r=qa(Bs,"canvasZoomSettings");t.on("click",(function(){e.focal=null,e.model.updateHierarchyLevel(2),t.classed("zoomed-in",!1),e.services.canvasZoom.zoomOut(n,r)}))},e.prototype.getZoomIcon=function(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">\n\t\t\t<polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>\n\t\t\t<path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>\n\t\t</svg>'},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle.node").on("mouseover",(function(e,n){var r=Na(this);r.classed("hovered",!0);var i=t.model.getHierarchyLevel(),o=i>2&&!r.classed("focal"),a=qa(t.model.getOptions(),"canvasZoom","enabled"),s=!1;if(!o){var l=[],u=[],c=null;if(n.children)n.depth>1&&a&&(s=!0,r.classed("clickable",!0)),l=n.children.map((function(e){if(null!==e)return"number"==typeof e.data.value?{label:e.data.name,value:e.data.value}:{label:e.data.name,labelIcon:a&&i<=2?t.getZoomIcon():null,value:e.value}})),u=[{label:Gn(t.model.getOptions(),"tooltip.totalLabel")||"Total",value:n.value,bold:!0}],t.highlightChildren(n.children);else c=n.value;var h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,hoveredElement:r,items:k([{color:h,label:n.data.name,labelIcon:s&&a&&i<=2?t.getZoomIcon():null,value:c}],l,u)})}t.services.events.dispatchEvent(ut.CirclePack.CIRCLE_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ut.CirclePack.CIRCLE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1),n.children&&t.unhighlightChildren(n.children),t.services.events.dispatchEvent(ut.CirclePack.CIRCLE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:r})})).on("click",(function(e,n){var r=Na(this),i=r.classed("non-focal"),o=qa(t.model.getOptions(),"canvasZoom","enabled");if(o&&t.model.getHierarchyLevel()>2){var a=t.parent.selectAll("circle.node");Na(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(a,gt)}else if(2===n.depth&&n.children&&!i&&o){a=t.parent.selectAll("circle.node");Na(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=n,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(n,a,gt),e.stopPropagation()}t.services.events.dispatchEvent(ut.CirclePack.CIRCLE_CLICK,{event:e,element:r,datum:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()},e}(kv),Cy={value:function(){}};function Ly(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Dy(r)}function Dy(t){this._=t}function ky(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Ry(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Iy(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Cy,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Dy.prototype=Ly.prototype={constructor:Dy,on:function(t,e){var n,r=this._,i=ky(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Iy(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Iy(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Ry(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Dy(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Py=Object.freeze({__proto__:null,dispatch:Ly}).dispatch,Ny=Math.PI/180,By=function(){var t=[256,256],e=Uy,n=Vy,r=Gy,i=Hy,o=Hy,a=zy,s=jy,l=Zy,u=[],c=1/0,h=Py("word","end"),d=null,f=Math.random,p={},v=Yy;function g(e,n,r){t[0],t[1];for(var i,o,a,s,u,c=n.x,h=n.y,d=Math.sqrt(t[0]*t[0]+t[1]*t[1]),p=l(t),v=f()<.5?1:-1,g=-v;(i=p(g+=v))&&(o=~~i[0],a=~~i[1],!(Math.min(Math.abs(o),Math.abs(a))>=d));)if(n.x=c+o,n.y=h+a,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1]||r&&Wy(n,e,t[0])||r&&(u=r,!((s=n).x+s.x1>u[0].x&&s.x+s.x0<u[1].x&&s.y+s.y1>u[0].y&&s.y+s.y0<u[1].y)))){for(var m,y=n.sprite,b=n.width>>5,x=t[0]>>5,_=n.x-(b<<4),E=127&_,w=32-E,O=n.y1-n.y0,T=(n.y+n.y0)*x+(_>>5),S=0;S<O;S++){m=0;for(var M=0;M<=b;M++)e[T+M]|=m<<w|(M<b?(m=y[S*b+M])>>>E:0);T+=x}return delete n.sprite,!0}return!1}return p.canvas=function(t){return arguments.length?(v=Xy(t),p):v},p.start=function(){var l=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;var n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(v()),m=function(t){var e=[],n=-1;for(;++n<t;)e[n]=0;return e}((t[0]>>5)*t[1]),y=null,b=u.length,x=-1,_=[],E=u.map((function(t,l){return t.text=e.call(this,t,l),t.font=n.call(this,t,l),t.style=i.call(this,t,l),t.weight=o.call(this,t,l),t.rotate=a.call(this,t,l),t.size=~~r.call(this,t,l),t.padding=s.call(this,t,l),t})).sort((function(t,e){return e.size-t.size}));return d&&clearInterval(d),d=setInterval(w,0),w(),p;function w(){for(var e=Date.now();Date.now()-e<c&&++x<b&&d;){var n=E[x];n.x=t[0]*(f()+.5)>>1,n.y=t[1]*(f()+.5)>>1,Fy(l,n,E,x),n.hasText&&g(m,n,y)&&(_.push(n),h.call("word",p,n),y?qy(y,n):y=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=t[0]>>1,n.y-=t[1]>>1)}x>=b&&(p.stop(),h.call("end",p,_,y))}},p.stop=function(){return d&&(clearInterval(d),d=null),p},p.timeInterval=function(t){return arguments.length?(c=null==t?1/0:t,p):c},p.words=function(t){return arguments.length?(u=t,p):u},p.size=function(e){return arguments.length?(t=[+e[0],+e[1]],p):t},p.font=function(t){return arguments.length?(n=Xy(t),p):n},p.fontStyle=function(t){return arguments.length?(i=Xy(t),p):i},p.fontWeight=function(t){return arguments.length?(o=Xy(t),p):o},p.rotate=function(t){return arguments.length?(a=Xy(t),p):a},p.text=function(t){return arguments.length?(e=Xy(t),p):e},p.spiral=function(t){return arguments.length?(l=Ky[t]||t,p):l},p.fontSize=function(t){return arguments.length?(r=Xy(t),p):r},p.padding=function(t){return arguments.length?(s=Xy(t),p):s},p.random=function(t){return arguments.length?(f=t,p):f},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p};function Uy(t){return t.text}function Vy(){return"serif"}function Hy(){return"normal"}function Gy(t){return Math.sqrt(t.value)}function zy(){return 30*(~~(6*Math.random())-3)}function jy(){return 1}function Fy(t,e,n,r){if(!e.sprite){var i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);var a=0,s=0,l=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;var c=i.measureText(e.text+"m").width*o,h=e.size<<1;if(e.rotate){var d=Math.sin(e.rotate*Ny),f=Math.cos(e.rotate*Ny),p=c*f,v=c*d,g=h*f,m=h*d;c=Math.max(Math.abs(p+m),Math.abs(p-m))+31>>5<<5,h=~~Math.max(Math.abs(v+g),Math.abs(v-g))}else c=c+31>>5<<5;if(h>l&&(l=h),a+c>=2048&&(a=0,s+=l,l=0),s+h>=2048)break;i.translate((a+(c>>1))/o,(s+(h>>1))/o),e.rotate&&i.rotate(e.rotate*Ny),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=c,e.height=h,e.xoff=a,e.yoff=s,e.x1=c>>1,e.y1=h>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=c}for(var y=i.getImageData(0,0,2048/o,2048/o).data,b=[];--r>=0;)if((e=n[r]).hasText){for(var x=(c=e.width)>>5,_=(h=e.y1-e.y0,0);_<h*x;_++)b[_]=0;if(null==(a=e.xoff))return;s=e.yoff;for(var E=0,w=-1,O=0;O<h;O++){for(_=0;_<c;_++){var T=x*O+(_>>5),S=y[2048*(s+O)+(a+_)<<2]?1<<31-_%32:0;b[T]|=S,E|=S}E?w=O:(e.y0++,h--,O--,s++)}e.y1=e.y0+w,e.sprite=b.slice(0,(e.y1-e.y0)*x)}}}function Wy(t,e,n){n>>=5;for(var r,i=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,l=32-s,u=t.y1-t.y0,c=(t.y+t.y0)*n+(a>>5),h=0;h<u;h++){r=0;for(var d=0;d<=o;d++)if((r<<l|(d<o?(r=i[h*o+d])>>>s:0))&e[c+d])return!0;c+=n}return!1}function qy(t,e){var n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function Zy(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Yy(){return document.createElement("canvas")}function Xy(t){return"function"==typeof t?t:function(){return t}}var Ky={archimedean:Zy,rectangular:function(t){var e=4*t[0]/t[1],n=0,r=0;return function(t){var i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}},Qy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="wordcloud",e.renderType=R.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("text.word").transition("legend-hover-wordcloud").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-wordcloud"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.model.getDisplayData(),i=this.getFontSizeScale(r),o=this.getOptions(),a=o.wordCloud,s=a.fontSizeMapsTo,l=a.wordMapsTo,u=o.data.groupMapsTo,c=wv.getSVGElementSize(n,{useAttrs:!0}),h=c.width,d=c.height;if(0!==h&&0!==d){var f=By().size([h,d]).words(r.map((function(t){var e,n=t[s];if("number"!=typeof t[s])throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return(e={})[u]=t[u],e.text=t[l],e.size=n,e.value=n,e}))).padding(5).rotate(0).fontSize((function(t){return i(t.size)})).on("end",(function(r){var i=wv.appendOrSelect(n,"g.words");i.attr("transform","translate("+f.size()[0]/2+", "+f.size()[1]/2+")");var o=i.selectAll("text").data(r,(function(t){return t[u]+"-"+t.text}));o.exit().attr("opacity",0).remove(),o.enter().append("text").attr("opacity",0).merge(o).style("font-size",(function(t){return t.size+"px"})).text((function(t){return t.text})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[u],originalClassName:"word "+(t.size>32?"light":"")})})).style("fill",(function(t){return e.model.getFillColor(t[u],t.text,t)})).attr("text-anchor","middle").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"wordcloud-text-update-enter",animate:t})})).attr("transform",(function(t){return"translate("+t.x+", "+t.y+")"})).attr("opacity",1)}));f.start(),this.addEventListeners()}},e.prototype.getFontSizeScale=function(t){var e=this.getOptions(),n=e.wordCloud.fontSizeMapsTo,r=t.map((function(t){return t[n]})).filter((function(t){return t})),i=wv.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=r.length>0,a=o?Gs(r):[1,1];return Iu().domain(a).range(o?e.wordCloud.fontSizeRange(i,t):[4,4])},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this,r=$i((function(t){var e=n.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call((function(t){return n.services.transitions.setupTransition({transition:t,name:"wordcloud-word-mouse-highlight"})}));null===t?e.attr("opacity",1):e.attr("opacity",(function(){return t===this?1:.3}))}),6);this.parent.selectAll("text.word").on("mouseover",(function(i,o){r(this),n.services.events.dispatchEvent(ut.WordCloud.WORD_MOUSEOVER,{event:i,element:Na(this),datum:o}),n.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:i,hoveredElement:this,items:[{label:t.tooltip.wordLabel,value:o.text},{label:t.tooltip.valueLabel,value:o.value},{label:t.tooltip.groupLabel,value:o[e],class:n.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:o[e]})}]})})).on("mousemove",(function(t,e){var r=Na(this);n.services.events.dispatchEvent(ut.WordCloud.WORD_MOUSEMOVE,{element:r,datum:e}),n.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){n.services.events.dispatchEvent(ut.WordCloud.WORD_CLICK,{event:t,element:Na(this),datum:e})})).on("mouseout",(function(t,e){var i=Na(this);r(null),n.services.events.dispatchEvent(ut.WordCloud.WORD_MOUSEOUT,{event:t,element:i,datum:e}),n.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:i})}))},e}(kv);function $y(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Jy(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function tb(t){return t.depth}function eb(t,e){return e-1-t.height}function nb(t,e){return t.sourceLinks.length?t.depth:e-1}function rb(t){return function(){return t}}function ib(t,e){return ab(t.source,e.source)||t.index-e.index}function ob(t,e){return ab(t.target,e.target)||t.index-e.index}function ab(t,e){return t.y0-e.y0}function sb(t){return t.value}function lb(t){return t.index}function ub(t){return t.nodes}function cb(t){return t.links}function hb(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function db({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function fb(){let t,e,n,r=0,i=0,o=1,a=1,s=24,l=8,u=lb,c=nb,h=ub,d=cb,f=6;function p(){const t={nodes:h.apply(null,arguments),links:d.apply(null,arguments)};return v(t),g(t),m(t),y(t),b(t),db(t),t}function v({nodes:t,links:e}){for(const[e,n]of t.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];const r=new Map(t.map((e,n)=>[u(e,n,t),e]));for(const[t,n]of e.entries()){n.index=t;let{source:e,target:i}=n;"object"!=typeof e&&(e=n.source=hb(r,e)),"object"!=typeof i&&(i=n.target=hb(r,i)),e.sourceLinks.push(n),i.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:e,targetLinks:r}of t)e.sort(n),r.sort(n)}function g({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(Jy(e.sourceLinks,sb),Jy(e.targetLinks,sb)):e.fixedValue}function m({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.depth=i;for(const{target:e}of t.sourceLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function y({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.height=i;for(const{source:e}of t.targetLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function b(n){const u=function({nodes:t}){const n=$y(t,t=>t.depth)+1,i=(o-r-s)/(n-1),a=new Array(n);for(const e of t){const t=Math.max(0,Math.min(n-1,Math.floor(c.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+s,a[t]?a[t].push(e):a[t]=[e]}if(e)for(const t of a)t.sort(e);return a}(n);t=Math.min(l,(a-i)/($y(u,t=>t.length)-1)),function(e){const n=function(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}(e,e=>(a-i-(e.length-1)*t)/Jy(e,sb));for(const r of e){let e=i;for(const i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+t;for(const t of i.sourceLinks)t.width=t.value*n}e=(a-e+t)/(r.length+1);for(let t=0;t<r.length;++t){const n=r[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}S(r)}}(u);for(let t=0;t<f;++t){const e=Math.pow(.99,t),n=Math.max(1-e,(t+1)/f);_(u,e,n),x(u,e,n)}}function x(t,n,r){for(let i=1,o=t.length;i<o;++i){const o=t[i];for(const t of o){let e=0,r=0;for(const{source:n,value:i}of t.targetLinks){let o=i*(t.layer-n.layer);e+=M(n,t)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,T(t)}void 0===e&&o.sort(ab),E(o,r)}}function _(t,n,r){for(let i=t.length-2;i>=0;--i){const o=t[i];for(const t of o){let e=0,r=0;for(const{target:n,value:i}of t.sourceLinks){let o=i*(n.layer-t.layer);e+=A(t,n)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,T(t)}void 0===e&&o.sort(ab),E(o,r)}}function E(e,n){const r=e.length>>1,o=e[r];O(e,o.y0-t,r-1,n),w(e,o.y1+t,r+1,n),O(e,a,e.length-1,n),w(e,i,0,n)}function w(e,n,r,i){for(;r<e.length;++r){const o=e[r],a=(n-o.y0)*i;a>1e-6&&(o.y0+=a,o.y1+=a),n=o.y1+t}}function O(e,n,r,i){for(;r>=0;--r){const o=e[r],a=(o.y1-n)*i;a>1e-6&&(o.y0-=a,o.y1-=a),n=o.y0-t}}function T({sourceLinks:t,targetLinks:e}){if(void 0===n){for(const{source:{sourceLinks:t}}of e)t.sort(ob);for(const{target:{targetLinks:e}}of t)e.sort(ib)}}function S(t){if(void 0===n)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(ob),n.sort(ib)}function M(e,n){let r=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:i,width:o}of e.sourceLinks){if(i===n)break;r+=o+t}for(const{source:t,width:i}of n.targetLinks){if(t===e)break;r-=i}return r}function A(e,n){let r=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:i,width:o}of n.targetLinks){if(i===e)break;r+=o+t}for(const{target:t,width:i}of e.sourceLinks){if(t===n)break;r-=i}return r}return p.update=function(t){return db(t),t},p.nodeId=function(t){return arguments.length?(u="function"==typeof t?t:rb(t),p):u},p.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:rb(t),p):c},p.nodeSort=function(t){return arguments.length?(e=t,p):e},p.nodeWidth=function(t){return arguments.length?(s=+t,p):s},p.nodePadding=function(e){return arguments.length?(l=t=+e,p):l},p.nodes=function(t){return arguments.length?(h="function"==typeof t?t:rb(t),p):h},p.links=function(t){return arguments.length?(d="function"==typeof t?t:rb(t),p):d},p.linkSort=function(t){return arguments.length?(n=t,p):n},p.size=function(t){return arguments.length?(r=i=0,o=+t[0],a=+t[1],p):[o-r,a-i]},p.extent=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],i=+t[0][1],a=+t[1][1],p):[[r,i],[o,a]]},p.iterations=function(t){return arguments.length?(f=+t,p):f},p}var pb=Math.PI,vb=2*pb,gb=vb-1e-6;function mb(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function yb(){return new mb}function bb(t){return function(){return t}}function xb(t){return t[0]}function _b(t){return t[1]}mb.prototype=yb.prototype={constructor:mb,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,l=r-e,u=o-t,c=a-e,h=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-l*u)>1e-6&&i){var d=n-o,f=r-a,p=s*s+l*l,v=d*d+f*f,g=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((pb-Math.acos((p+h-v)/(2*g*m)))/2),b=y/m,x=y/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>u*f)+","+(this._x1=t+x*s)+","+(this._y1=e+x*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,u=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+l+","+u),n&&(h<0&&(h=h%vb+vb),h>gb?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=pb)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Eb=Array.prototype.slice;function wb(t){return t.source}function Ob(t){return t.target}function Tb(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Sb(){return function(t){var e=wb,n=Ob,r=xb,i=_b,o=null;function a(){var a,s=Eb.call(arguments),l=e.apply(this,s),u=n.apply(this,s);if(o||(o=a=yb()),t(o,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:bb(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:bb(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}(Tb)}function Mb(t){return[t.source.x1,t.y0]}function Ab(t){return[t.target.x0,t.y1]}var Cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="alluvial",e.renderType=R.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0});n.html("");var r=wv.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getOptions(),s=this.model.getDisplayData(),l=qa(this.getOptions(),"color","gradient","enabled"),u=St.minNodePadding;a.alluvial.nodePadding>St.minNodePadding&&(u=a.alluvial.nodePadding);var c=qa(a,"alluvial","nodeAlignment"),h=nb;c===z.LEFT?h=tb:c===z.RIGHT&&(h=eb);var d=fb().nodeId((function(t){return t.name})).nodeWidth(St.nodeWidth).nodePadding(u).nodeAlign(h).extent([[2,30],[i-2,o]]);this.graph=d({nodes:a.alluvial.nodes.map((function(t){return Object.assign({},t)})),links:s.map((function(t){return Object.assign({},t)}))}),this.graph.nodes=this.graph.nodes.filter((function(t){return 0!==t.value}));var f={};this.graph.nodes.forEach((function(t){var e,n=t.x0;t.category&&(f[n]=null===(e=t)||void 0===e?void 0:e.category)})),n.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(f)).join("g").attr("transform",(function(t){return"translate("+t+", 0)"})).append("text").attr("id",(function(t,n){return e.services.domUtils.generateElementIDString("alluvial-category-"+n)})).style("font-size","14px").text((function(t){return f[t]?f[t]:""})).attr("y",20).attr("x",(function(t,n){var r=e.services.domUtils.generateElementIDString("alluvial-category-"+n),i=wv.getSVGElementSize(Na("text#"+r),{useBBox:!0}).width,o=0;return t+o>=i&&(o=4-i),o}));var p=n.append("g").attr("fill","none").selectAll("g").data(this.graph.links);if(p.exit().remove(),l){var v=qa(this.getOptions(),"color","scale");v&&p.enter().append("linearGradient").attr("id",(function(t){return e.gradient_id+"-link-"+t.index})).attr("gradientUnits","userSpaceOnUse").call((function(t){return t.append("stop").attr("offset","0%").attr("stop-color",(function(t){return v[t.source.name]}))})).call((function(t){return t.append("stop").attr("offset","100%").attr("stop-color",(function(t){return v[t.target.name]}))})),p.exit().remove()}p.enter().append("path").classed("link",!0).attr("d",Sb().source(Mb).target(Ab)).attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-line-"+t.index)})).attr("class",(function(t){return a.alluvial.monochrome?e.model.getColorClassName({classNameTypes:[P.STROKE],dataGroupName:0,originalClassName:"link"}):e.model.getColorClassName({classNameTypes:[P.STROKE],dataGroupName:t.source.index,originalClassName:"link"})})).style("stroke",(function(t){return l?"url(#"+e.gradient_id+"-link-"+t.index+")":e.model.getFillColor(t.source.name)})).attr("stroke-width",(function(t){return Math.max(1,t.width)})).style("stroke-opacity",St.opacity.default).attr("aria-label",(function(t){return t.source.name+" → "+t.target.name+" ("+t.value+(a.alluvial.units?" "+a.alluvial.units:"")+")"}));var g=n.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-node-"+t.index)})).classed("node-group",!0).attr("transform",(function(t){return"translate("+t.x0+", "+t.y0+")"}));g.append("rect").classed("node",!0).attr("height",(function(t){return t.y1-t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("fill","black");var m=g.append("g").attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-node-title-"+t.index)}));m.append("text").attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-node-text-"+t.index)})).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text((function(t){return t.name+" ("+t.value+")"})).attr("aria-label",(function(t){return t.name+" ("+t.value+")"})),m.append("rect").classed("node-text-bg",!0).attr("width",(function(t,n){var r=e.services.domUtils.generateElementIDString("alluvial-node-text-"+n);return wv.getSVGElementSize(Na("text#"+r),{useBBox:!0}).width+8})).attr("height",18).attr("stroke-width",2).lower(),m.attr("transform",(function(t,n){var r=e.services.domUtils.generateElementIDString("alluvial-node-text-"+n),i=wv.getSVGElementSize(Na("text#"+r),{useBBox:!0}).width,o=(t.y1-t.y0)/2-9,a=t.x1-t.x0;return t.x1>=i?a-=i+16:a+=4,"translate("+a+", "+o+")"})),this.addLineEventListener(),this.addNodeEventListener()}},e.prototype.addLineEventListener=function(){var t=this.getOptions(),e=this,n=$i((function(t,n){void 0===n&&(n="mouseover");var r=e.parent.selectAll("path.link").transition().call((function(t){return e.services.transitions.setupTransition({transition:t,name:"alluvial-links-mouse-highlight"})}));"mouseout"===n?(Na(t).lower(),r.style("stroke-opacity",St.opacity.default)):r.style("stroke-opacity",(function(){return t===this?(Na(this).raise(),St.opacity.selected):St.opacity.unfocus}))}),33);this.parent.selectAll("path.link").on("mouseover",(function(r,i){var o=Na(this);n(this,"mouseover"),o.classed("link-hovered",!0);var a=getComputedStyle(this).getPropertyValue("stroke");e.services.events.dispatchEvent(ut.Alluvial.LINE_MOUSEOVER,{event:r,element:o,datum:i}),e.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:i.target.name,value:i.value+(t.alluvial.units?" "+t.alluvial.units:""),color:a,labelIcon:e.getRightArrowIcon()}]})})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(ut.Alluvial.LINE_MOUSEMOVE,{event:t,element:Na(this),datum:n}),e.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ut.Alluvial.LINE_CLICK,{event:t,element:Na(this),datum:n})})).on("mouseout",(function(t,r){var i=Na(this);n(this,"mouseout"),i.classed("link-hovered",!1),e.services.events.dispatchEvent(ut.Alluvial.LINE_MOUSEOUT,{event:t,element:i,datum:r}),e.services.events.dispatchEvent(ut.Tooltip.HIDE,{event:t,hoveredElement:i})}))},e.prototype.addNodeEventListener=function(){var t=this,e=this,n=$i((function(n,r){(void 0===n&&(n=[]),void 0===r&&(r="mouseover"),"mouseout"!==r&&0!==n.length)?e.parent.selectAll("path.link").transition().call((function(e){return t.services.transitions.setupTransition({transition:e,name:"alluvial-link-mouse-highlight"})})).style("stroke-opacity",(function(t){return n.some((function(e){return e===t.index}))?(Na(this).classed("link-hovered",!0).raise(),St.opacity.selected):St.opacity.unfocus})):e.parent.selectAll("path.link").classed("link-hovered",!1).data(t.graph.links,(function(t){return t.index})).order().style("stroke-opacity",St.opacity.default)}),66);e.parent.selectAll(".node-group").on("mouseover",(function(t,r){var i=Na(this),o=[];if(e.traverse({link:"sourceLinks",node:"target"},r,o),e.traverse({link:"targetLinks",node:"source"},r,o),o.length){var a=za(i.attr("transform"));if(i.attr("transform","translate("+(a.x-2)+", "+a.y+")"),i.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),r.x0-2==0){var s=e.services.domUtils.generateElementIDString("alluvial-node-title-"+r.index),l=e.parent.select("g#"+s),u=za(l.attr("transform"));l.attr("transform","translate("+(u.x+4)+","+u.y+")")}var c=e.services.domUtils.generateElementIDString("alluvial-node-text-"+r.index);e.parent.select("text#"+c).style("font-weight","bold"),n(o,"mouseover"),e.services.events.dispatchEvent(ut.Alluvial.NODE_MOUSEOVER,{event:t,element:i,datum:r})}})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(ut.Alluvial.NODE_MOUSEMOVE,{event:t,element:Na(this),datum:n}),e.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ut.Alluvial.NODE_CLICK,{event:t,element:Na(this),datum:n})})).on("mouseout",(function(t,r){var i=Na(this),o=za(i.attr("transform"));if(i.classed("node-hovered",!1).attr("transform","translate("+(o.x+2)+", "+o.y+")").select("rect.node").attr("width",St.nodeWidth),r.x0-2==0){var a=e.services.domUtils.generateElementIDString("alluvial-node-title-"+r.index),s=e.parent.select("g#"+a),l=za(s.attr("transform"));s.attr("transform","translate("+(l.x-4)+","+l.y+")")}var u=e.services.domUtils.generateElementIDString("alluvial-node-text-"+r.index);e.parent.select("text#"+u).style("font-weight","normal"),n([],"mouseout"),e.services.events.dispatchEvent(ut.Alluvial.NODE_MOUSEOUT,{event:t,element:i,datum:r}),e.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:i})}))},e.prototype.traverse=function(t,e,n){var r=this;void 0===n&&(n=[]),e[t.link].map((function(e){return n.push(e.index),e[t.node]})).forEach((function(e){return r.traverse(t,e,n)}))},e.prototype.getRightArrowIcon=function(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" class="arrow-right" width="32" height="32" viewBox="0 0 32 32">\n\t\t\t<polygon points="18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6"/>\n\t\t\t<rect width="32" height="32"/>\n\t\t</svg>'},e.prototype.destroy=function(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)},e}(kv),Lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e.renderType=R.SVG,e.matrix={},e.xBandwidth=0,e.yBandwidth=0,e.translationUnits={x:0,y:0},e.handleAxisOnHover=function(t){var n=t.detail,r=n.datum,i=e.model.getUniqueRanges(),o=e.model.getUniqueDomain(),a=e.services.cartesianScales.getDomainLabel(),s=e.services.cartesianScales.getRangeLabel(),l=e.services.cartesianScales.getMainXScale(),u=e.services.cartesianScales.getMainYScale(),c="",h=null,d=null,f=null;void 0!==e.matrix[r]?(c=a,i.forEach((function(t){if("number"==typeof e.matrix[r][t].value){var n=e.matrix[r][t].value;if(null===h)return h=n,d=n,void(f=n);h+=n,d=n<d?n:d,f=n>f?n:f}}))):(c=s,o.forEach((function(t){if("number"==typeof e.matrix[t][r].value){var n=e.matrix[t][r].value;if(null===h)return h=n,d=n,void(f=n);h+=n,d=n<d?n:d,f=n>f?n:f}}))),void 0!==l(r)?e.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform","translate("+l(r)+", "+rl(u.range())+")"):void 0!==u(r)&&e.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform","translate("+rl(l.range())+","+u(r)+")"),e.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:n.event,hoveredElement:Na(t.detail.element),items:[{label:c,value:r,bold:!0},{label:"Min",value:null!==d?d:"-"},{label:"Max",value:null!==f?f:"-"},{label:"Average",value:null!==h?h/o.length:"-"}]})},e.handleAxisMouseOut=function(t){e.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),e.services.events.dispatchEvent(ut.Tooltip.HIDE,{event:t})},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ut.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(ut.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(ut.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(ut.Axis.LABEL_BLUR,this.handleAxisMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0});n.lower();var r=this.services.cartesianScales;if(this.matrix=this.model.getMatrix(),n.html(""),!qa(this.getOptions(),"data","loading")){var i=r.getMainXScale(),o=r.getMainYScale(),a=r.getDomainIdentifier(),s=r.getRangeIdentifier(),l=this.model.getUniqueDomain(),u=this.model.getUniqueRanges(),c=this.model.getMatrixAsArray(),h=i.range(),d=o.range();this.xBandwidth=Math.abs((h[1]-h[0])/l.length),this.yBandwidth=Math.abs((d[1]-d[0])/u.length);var f=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",f).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);var p=n.selectAll().data(c).enter().append("g").attr("class",(function(t){return"heat-"+t.index})).classed("cell",!0).attr("transform",(function(t){return"translate("+i(t[a])+", "+o(t[s])+")"})).append("rect").attr("class",(function(t){return e.model.getColorClassName({value:t.value,originalClassName:"heat-"+t.index})})).classed("heat",!0).classed("null-state",(function(t){return-1===t.index||null===t.value})).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",(function(t){return-1===t.index||null===t.value?"url(#"+f+")":e.model.getFillColor(Number(t.value))})).attr("aria-label",(function(t){return t.value}));this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(d[1]-d[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(h[1]-h[0]),this.yBandwidth),this.determineDividerStatus()&&(p.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}},e.prototype.createOuterBox=function(t,e,n){var r=wv.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);wv.appendOrSelect(r,"line.top").attr("x1",-1).attr("x2",e+1),wv.appendOrSelect(r,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",n+1),wv.appendOrSelect(r,"line.down").attr("x1",-1).attr("x2",e+1).attr("y1",n).attr("y2",n),wv.appendOrSelect(r,"line.right").attr("x1",e).attr("x2",e).attr("y1",-1).attr("y2",n+1)},e.prototype.determineDividerStatus=function(){var t=qa(this.getOptions(),"heatmap","divider","state");return t!==st.OFF&&(t===st.AUTO&&Mt.minCellDividerDimension<=this.xBandwidth&&Mt.minCellDividerDimension<=this.yBandwidth||t===st.ON)},e.prototype.addEventListener=function(){var t=this,e=this.services.cartesianScales,n=Gn(this.getOptions(),"tooltip.totalLabel"),r=e.getDomainIdentifier(),i=e.getRangeIdentifier(),o=e.getDomainLabel(),a=e.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",(function(e,s){var l=Na(this),u=l.select("rect.heat");if(!u.classed("null-state")){var c=za(l.attr("transform"));t.parent.select("g.cell-highlight").attr("transform","translate("+(c.x+t.translationUnits.x)+", "+(c.y+t.translationUnits.y)+")").classed("highlighter-hidden",!1),t.services.events.dispatchEvent(ut.Heatmap.HEATMAP_MOUSEOVER,{event:e,element:u,datum:s}),t.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:e,items:[{label:o,value:s[r]},{label:a,value:s[i]},{label:n||"Total",value:s.value,color:u.style("fill")}]})}})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ut.Heatmap.HEATMAP_MOUSEMOVE,{event:e,element:Na(this),datum:n}),t.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ut.Heatmap.HEATMAP_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this).select("rect.heat"),i=r.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),i||(t.services.events.dispatchEvent(ut.Heatmap.HEATMAP_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ut.Tooltip.HIDE,{event:e,hoveredElement:r}))}))},e.prototype.destroy=function(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ut.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(ut.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)},e}(kv),Db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getComponentContainer().style("width",(this.configs.size||At.default.size)+"px").style("height",(this.configs.size||At.default.size)+"px").attr("opacity",0)},e}(kv),kb=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,a.init(),a}return n(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("div.layout-child-"+this._instanceID).filter((function(t){var e=qa(t,"growth");return e===q.PREFERRED||e===q.FIXED})).each((function(t){e+=t.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("div.layout-child-"+this._instanceID).filter((function(t){return qa(t,"growth")===q.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=wv.getHTMLElementSize(n.node()),i=r.width,o=r.height,a=this.configs.direction===W.ROW||this.configs.direction===W.ROW_REVERSE,s=qa(this.model.getOptions(),"style","prefix"),l=n.classed("cds--"+s+"--layout-row",this.configs.direction===W.ROW).classed("cds--"+s+"--layout-row-reverse",this.configs.direction===W.ROW_REVERSE).classed("cds--"+s+"--layout-column",this.configs.direction===W.COLUMN).classed("cds--"+s+"--layout-column-reverse",this.configs.direction===W.COLUMN_REVERSE).classed("cds--"+s+"--layout-alignitems-center",this.configs.alignItems===Z.CENTER).selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));l.enter().append("div").merge(n.selectAll("div.layout-child-"+this._instanceID)).attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.id})).each((function(e){var n=this;e.components.forEach((function(r){var i=Na(n),o=qa(e,"renderType")===R.SVG;r.setParent(o?wv.appendOrSelect(i,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):i);var a=qa(e,"growth");a!==q.PREFERRED&&a!==q.FIXED||r.render(t)}))})),n.selectAll("div.layout-child-"+this._instanceID).style("height",null).style("width",null).each((function(t){var e=qa(t,"growth"),n=qa(t,"renderType")===R.SVG?wv.getSVGElementSize(Na(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):wv.getHTMLElementSize(this);if(e===q.PREFERRED){var r=a?n.width:n.height,s=a?i:o;t.size=r/s*100}})),l.exit().remove(),this.children.filter((function(t){return qa(t,"growth")===q.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()}));var u=n.selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));a?u.style("width",(function(t){return t.size/100*i+"px"})).style("height","100%"):u.style("height",(function(t){return t.size/100*o+"px"})).style("width","100%"),u.each((function(e,n){e.components.forEach((function(n){qa(e,"growth")===q.STRETCH&&n.render(t)}))}))},e.prototype.setModel=function(e){t.prototype.setModel.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setModel(e)}))}))},e.prototype.setServices=function(e){t.prototype.setServices.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setServices(e)}))}))},e.prototype.destroy=function(){this.children.forEach((function(t){t.components.forEach((function(t){return t.destroy()}))}))},e.instanceID=Math.floor(99999999999*Math.random()),e}(kv),Rb=function(t){function e(e,n,r){var i,o=t.call(this,e,n,r)||this;return o.type="axes",o.renderType=R.SVG,o.truncation=((i={})[N.LEFT]=!1,i[N.RIGHT]=!1,i[N.TOP]=!1,i[N.BOTTOM]=!1,i),r&&(o.configs=r),o.margins=o.configs.margins,o}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i,o=this.configs.position,a=this.getOptions(),s=qa(a,"axes",o,"visible"),l=this.getComponentContainer(),u=wv.getSVGElementSize(l,{useAttrs:!0}),c=u.width,h=u.height,d=wv.appendOrSelect(l,"g.axis."+o);o===N.BOTTOM||o===N.TOP?(n=this.configs.axes[N.LEFT]?this.margins.left:0,i=this.configs.axes[N.RIGHT]?c-this.margins.right:c):(n=h-this.margins.bottom,i=this.margins.top);var f,p=this.services.cartesianScales.getScaleByPosition(o);switch(this.scaleType===H.LABELS||this.scaleType===H.LABELS_RATIO?p.rangeRound([n,i]):p.range([n,i]),o){case N.LEFT:f=Fv;break;case N.BOTTOM:f=jv;break;case N.RIGHT:f=zv;break;case N.TOP:f=Gv}d.attr("aria-label",o+" axis");var v=!d.select("g.ticks").empty(),g=wv.appendOrSelect(d,"g.ticks");v||(g.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),g.attr("aria-label",o+" ticks"));var m=wv.appendOrSelect(d,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+o+" ticks"),y=qa(a,"axes",o),b=this.scaleType===H.TIME||y.scaleType===H.TIME,x=o===N.LEFT||o===N.RIGHT,_=this.model.get("zoomDomain");if(_&&b&&!x&&p.domain(_),s){var E=qa(y,"scaleType"),w=qa(a,"data","loading"),O=qa(y,"ticks","number"),T=qa(y,"ticks","values"),S=qa(y,"truncation","type"),M=qa(y,"truncation","threshold"),A=qa(y,"truncation","numCharacter"),C=null!==O,L=qa(a,"timeScale"),D=wv.appendOrSelect(m,"g.tick"),k=wv.appendOrSelect(D,"text").text("0"),R=wv.getSVGElementSize(k.node(),{useBBox:!0}).height;D.remove();var I,P=this.scaleType||y.scaleType||H.LINEAR,B=f(p).tickSizeOuter(0);if(p.ticks){var V=void 0;if(C?V=O:(V=vt.ticks.number,x&&(V=this.getNumberOfFittingTicks(h,R,vt.ticks.verticalSpaceRatio))),1===p.ticks().length&&0===p.ticks()[0]&&(V=0),B.ticks(V),b)if(p.ticks(V).length){var G=qa(a,"timeScale","addSpaceOnEdges"),z=qa(a,"axes",o,"domain"),j=void 0,F=p.copy();G&&!z&&F.nice(V),j=F.ticks(V),G&&j.length>2&&!z&&(j.splice(j.length-1,1),j.splice(0,1)),B.tickValues(j)}else B.tickValues([])}var W=qa(y,"ticks","formatter");if(b){var q=Zp(B.tickValues());I=null===W?function(t,e){return Wp(t,e,B.tickValues(),q,L)}:function(t,e){var n=Wp(t,e,B.tickValues(),q,L);return W(t,e,n)}}else null===W?P===H.LINEAR&&(I=function(t){return t.toLocaleString()}):I=W;B.tickFormat(I);var Z,Y=this.services.cartesianScales.getScaleByPosition(o).domain(),X=Y[0],K=Y[1];if(T){if(b)T.forEach((function(t,e){void 0===t.getTime&&(T[e]=new Date(t))})),Z=T.filter((function(t){var e=t.getTime();return e>=new Date(X).getTime()&&e<=new Date(K).getTime()}));else if(E===H.LABELS){var Q=this.services.cartesianScales.getScaleByPosition(o).domain();Z=T.filter((function(t){return Q.includes(t)}))}else Z=T.filter((function(t){return t>=X&&t<=K}));B.tickValues(Z)}switch(o){case N.LEFT:g.attr("transform","translate("+this.margins.left+", 0)");break;case N.BOTTOM:g.attr("transform","translate(0, "+(h-this.margins.bottom)+")");break;case N.RIGHT:g.attr("transform","translate("+(c-this.margins.right)+", 0)");break;case N.TOP:g.attr("transform","translate(0, "+this.margins.top+")")}var $=this.model.isDataEmpty();if(y.title){var J=wv.appendOrSelect(d,"text.axis-title").html($||w?"":y.title),tt=qa(y,"titleOrientation");switch(o){case N.LEFT:tt===it.RIGHT?J.attr("transform","rotate(90)").attr("y",0).attr("x",p.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):J.attr("transform","rotate(-90)").attr("y",0).attr("x",-p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case N.BOTTOM:J.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+(h+4)+")").style("text-anchor","middle");break;case N.RIGHT:tt===it.LEFT?J.attr("transform","rotate(-90)").attr("y",c).attr("x",-p.range()[0]/2).style("text-anchor","middle"):J.attr("transform","rotate(90)").attr("y",-c).attr("x",p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case N.TOP:var nt=wv.getSVGElementSize(J,{useBBox:!0}).height;J.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+nt/2+")").style("text-anchor","middle")}}if(b){var rt=Zp(B.tickValues()),ot=L.showDayName,at=g;t&&(g=g.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})}))),g=g.call(B),at.selectAll(".tick").data(B.tickValues(),p).order().select("text").style("font-weight",(function(t,e){return Fp(t,e,B.tickValues(),rt,ot)?"bold":"normal"}))}else g=t&&v?g.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})})).call(B):g.call(B);if(m.call(B),o===N.BOTTOM||o===N.TOP){var st=!1,lt=qa(y,"ticks","rotation");if(lt===et.ALWAYS)st=!0;else if(lt===et.NEVER)st=!1;else if(!lt||lt===et.AUTO)if(p.step){var ut=m.selectAll("g.tick text").nodes();st=ut.some((function(t){return wv.getSVGElementSize(t,{useBBox:!0}).width>=p.step()}))}else{st=!1;var ct,ht=m.append("text").text("A"),dt=wv.getSVGElementSize(ht.node(),{useBBox:!0}).width;m.selectAll("g.tick").each((function(){var t=Na(this),e=parseFloat(qa(Ga(this),"tx"));null!==e&&ct+t.text().length*dt*.8>=e&&(st=!0),ct=e})),ht.remove()}st?(C||(B.ticks(this.getNumberOfFittingTicks(c,R,vt.ticks.horizontalSpaceRatio)),m.call(B),g.call(B)),d.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",o===N.TOP?"start":"end")):d.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(w?d.attr("opacity",0):d.attr("opacity",1),g.selectAll("g.tick").attr("aria-label",(function(t){return t})),m.selectAll("g.tick").attr("aria-label",(function(t){return t})),S!==U.NONE&&E===H.LABELS&&!T){var ft=this.services.cartesianScales.getScaleDomain(o);if(ft.length>0){var pt=l.select("g.axis."+o+" g.ticks g.tick").html();d.selectAll("g.ticks g.tick").html(pt);var gt=this;d.selectAll("g.tick text").data(ft).text((function(t){return t.length>M?(gt.truncation[o]=!0,Fa(t,S,A)):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(ft).text((function(t){return t.length>M?Fa(t,S,A):t})),d.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),d.selectAll("g.tick text").data(ft)}}this.addEventListeners()}else g.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=wv.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=qa(r,"axes",e),o=qa(i,"scaleType"),a=qa(i,"truncation","threshold"),s=this;n.selectAll("g.tick text").on("mouseover",(function(t,e){s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEOVER,{event:t,element:Na(this),datum:e}),o===H.LABELS&&e.length>a&&s.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:t,hoveredElement:Na(this),content:e})})).on("mousemove",(function(t,e){s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEMOVE,{event:t,element:Na(this),datum:e}),o===H.LABELS&&e.length>a&&s.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){s.services.events.dispatchEvent(ut.Axis.LABEL_CLICK,{event:t,element:Na(this),datum:e})})).on("mouseout",(function(t,e){s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEOUT,{event:t,element:Na(this),datum:e}),o===H.LABELS&&s.services.events.dispatchEvent(ut.Tooltip.HIDE)}))},e.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" g.ticks.invisible")},e.prototype.getTitleRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" text.axis-title")},e.prototype.getNumberOfFittingTicks=function(t,e,n){return Vr(Math.floor(t/(e*n)),2,vt.ticks.number)},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;wv.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(kv),Ib=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e),t.prototype.destroy.call(this);var n=this.configs.position,r=this.getComponentContainer(),i=wv.appendOrSelect(r,"g.axis."+n),o=this;i.selectAll("g.tick").each((function(t,e){var r=Na(this);r.classed("tick-hover",!0).attr("tabindex",0===e?0:-1);var i=r.select("text"),a=wv.getSVGElementSize(i,{useBBox:!0}),s=a.width,l=a.height,u=wv.appendOrSelect(r,"rect.axis-holder"),c=0,h=0;switch(n){case N.LEFT:c=-s+Number(i.attr("x")),h=-l/2;break;case N.RIGHT:c=Math.abs(Number(i.attr("x"))),h=-l/2;break;case N.TOP:c=-s/2,h=-l+Number(i.attr("y"))/2,o.truncation[n]&&(c=0,u.attr("transform","rotate(-45)"));break;case N.BOTTOM:c=-s/2,h=l/2-2,o.truncation[n]&&(c=-s,u.attr("transform","rotate(-45)"))}u.attr("x",c-vt.hover.rectanglePadding).attr("y",h).attr("width",s+2*vt.hover.rectanglePadding).attr("height",l).lower()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=wv.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=qa(r,"axes",e),o=qa(i,"scaleType"),a=qa(i,"truncation","threshold"),s=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(t){var e=Na(this).select("text"),n=e.datum();s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEOVER,{event:t,element:e,datum:n}),o===H.LABELS&&n.length>a&&s.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:t,element:e,datum:n})})).on("mousemove",(function(t){var e=Na(this).select("text"),n=e.datum();s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEMOVE,{event:t,element:e,datum:n}),s.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t){s.services.events.dispatchEvent(ut.Axis.LABEL_CLICK,{event:t,element:Na(this).select("text"),datum:Na(this).select("text").datum()})})).on("mouseout",(function(t){s.services.events.dispatchEvent(ut.Axis.LABEL_MOUSEOUT,{event:t,element:Na(this).select("text"),datum:Na(this).select("text").datum()}),o===H.LABELS&&s.services.events.dispatchEvent(ut.Tooltip.HIDE)})).on("focus",(function(t){var e={clientX:0,clientY:0};if(t.target){t.target.focus();var n=t.target.getBoundingClientRect();e.clientX=n.x,e.clientY=n.y}s.services.events.dispatchEvent(ut.Axis.LABEL_FOCUS,{event:L(L({},t),e),element:Na(this),datum:Na(this).select("text").datum()})})).on("blur",(function(t){s.services.events.dispatchEvent(ut.Axis.LABEL_BLUR,{event:t,element:Na(this),datum:Na(this).select("text").datum()})})).on("keydown",(function(t){t.key&&"Escape"===t.key&&(s.services.events.dispatchEvent(ut.Tooltip.HIDE),s.services.events.dispatchEvent(ut.Axis.LABEL_BLUR,{event:t,element:Na(this),datum:Na(this).select("text").datum()})),e===N.LEFT||e===N.RIGHT?t.key&&"ArrowUp"===t.key?s.goNext(this,t):t.key&&"ArrowDown"===t.key&&s.goPrevious(this,t):t.key&&"ArrowLeft"===t.key?s.goPrevious(this,t):t.key&&"ArrowRight"===t.key&&s.goNext(this,t)}))},e.prototype.goNext=function(t,e){t.nextElementSibling&&"path"!==t.nextElementSibling.tagName&&t.nextElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()},e.prototype.goPrevious=function(t,e){t.previousElementSibling&&"path"!==t.previousElementSibling.tagName&&t.previousElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;wv.appendOrSelect(t,"g.axis."+e).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)},e}(Rb),Pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.renderType=R.SVG,e.children={},e.thresholds=[],e.margins={top:0,right:0,bottom:0,left:0},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(N),i=qa(this.getOptions(),"axes");r.forEach((function(t){i[N[t]]&&(n[N[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=N[t];if(e.configs.axes[n]&&!e.children[n]){var r={position:n,axes:e.configs.axes,margins:e.margins},i=e.model.axisFlavor===lt.DEFAULT?new Rb(e.model,e.services,r):new Ib(e.model,e.services,r);i.setModel(e.model),i.setServices(e.services),i.setParent(e.parent),e.children[n]=i}})),Object.keys(this.children).forEach((function(n){e.children[n].render(t)}));var o={};Object.keys(this.children).forEach((function(t){var n,r=e.children[t],i=r.configs.position,a=r.getInvisibleAxisRef(),s=wv.getSVGElementSize(a,{useBBox:!0}),l=s.width,u=s.height;switch(r.getTitleRef().empty()?n=0:(n=wv.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i!==N.LEFT&&i!==N.RIGHT||(n+=5)),i){case N.TOP:o.top=u+n;break;case N.BOTTOM:o.bottom=u+n;break;case N.LEFT:o.left=l+n;break;case N.RIGHT:o.right=l+n}})),this.services.events.dispatchEvent(ut.Axis.RENDER_COMPLETE),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(ut.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(kv),Nb={value:()=>{}};function Bb(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Ub(r)}function Ub(t){this._=t}function Vb(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Hb(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Gb(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Nb,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Ub.prototype=Bb.prototype={constructor:Ub,on:function(t,e){var n,r=this._,i=Vb(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Gb(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Gb(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Hb(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ub(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};const zb={capture:!0,passive:!1};function jb(t){t.preventDefault(),t.stopImmediatePropagation()}function Fb(t){var e=t.document.documentElement,n=Na(t).on("dragstart.drag",jb,zb);"onselectstart"in e?n.on("selectstart.drag",jb,zb):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Wb(t,e){var n=t.document.documentElement,r=Na(t).on("dragstart.drag",null);e&&(r.on("click.drag",jb,zb),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var qb,Zb,Yb=0,Xb=0,Kb=0,Qb=0,$b=0,Jb=0,tx="object"==typeof performance&&performance.now?performance:Date,ex="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function nx(){return $b||(ex(rx),$b=tx.now()+Jb)}function rx(){$b=0}function ix(){this._call=this._time=this._next=null}function ox(t,e,n){var r=new ix;return r.restart(t,e,n),r}function ax(){$b=(Qb=tx.now())+Jb,Yb=Xb=0;try{!function(){nx(),++Yb;for(var t,e=qb;e;)(t=$b-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Yb}()}finally{Yb=0,function(){var t,e,n=qb,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:qb=e);Zb=t,lx(r)}(),$b=0}}function sx(){var t=tx.now(),e=t-Qb;e>1e3&&(Jb-=e,Qb=t)}function lx(t){Yb||(Xb&&(Xb=clearTimeout(Xb)),t-$b>24?(t<1/0&&(Xb=setTimeout(ax,t-tx.now()-Jb)),Kb&&(Kb=clearInterval(Kb))):(Kb||(Qb=tx.now(),Kb=setInterval(sx,1e3)),Yb=1,ex(ax)))}function ux(t,e,n){var r=new ix;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}ix.prototype=ox.prototype={constructor:ix,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?nx():+n)+(null==e?0:+e),this._next||Zb===this||(Zb?Zb._next=this:qb=this,Zb=this),this._call=t,this._time=n,lx()},stop:function(){this._call&&(this._call=null,this._time=1/0,lx())}};var cx=Bb("start","end","cancel","interrupt"),hx=[];function dx(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(l){var u,c,h,d;if(1!==n.state)return s();for(u in i)if((d=i[u]).name===n.name){if(3===d.state)return ux(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[u]):+u<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[u])}if(ux((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(d=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ox((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:cx,tween:hx,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function fx(t,e){var n=vx(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function px(t,e){var n=vx(t,e);if(n.state>3)throw new Error("too late; already running");return n}function vx(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function gx(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}function mx(t,e){var n,r;return function(){var i=px(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function yx(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=px(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function bx(t,e,n){var r=t._id;return t.each((function(){var t=px(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return vx(t,r).value[e]}}function xx(t,e){var n;return("number"==typeof e?Yl:e instanceof Ml?Fl:(n=Ml(e))?(e=n,Fl):$l)(t,e)}function _x(t){return function(){this.removeAttribute(t)}}function Ex(t){return function(){this.removeAttributeNS(t.space,t.local)}}function wx(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function Ox(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function Tx(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttribute(t)}}function Sx(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function Mx(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ax(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Cx(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Ax(t,i)),n}return i._value=e,i}function Lx(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Mx(t,i)),n}return i._value=e,i}function Dx(t,e){return function(){fx(this,t).delay=+e.apply(this,arguments)}}function kx(t,e){return e=+e,function(){fx(this,t).delay=e}}function Rx(t,e){return function(){px(this,t).duration=+e.apply(this,arguments)}}function Ix(t,e){return e=+e,function(){px(this,t).duration=e}}function Px(t,e){if("function"!=typeof e)throw new Error;return function(){px(this,t).ease=e}}function Nx(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?fx:px;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Bx=Pa.prototype.constructor;function Ux(t){return function(){this.style.removeProperty(t)}}function Vx(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Hx(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Vx(t,o,n)),r}return o._value=e,o}function Gx(t){return function(e){this.textContent=t.call(this,e)}}function zx(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Gx(r)),e}return r._value=t,r}var jx=0;function Fx(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Wx(){return++jx}var qx=Pa.prototype;Fx.prototype=function(t){return Pa().transition(t)}.prototype={constructor:Fx,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Co(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,u=r[a],c=u.length,h=o[a]=new Array(c),d=0;d<c;++d)(s=u[d])&&(l=t.call(s,s.__data__,d,u))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,dx(h[d],e,n,d,h,vx(s,n)));return new Fx(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ko(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,u=r[s],c=u.length,h=0;h<c;++h)if(l=u[h]){for(var d,f=t.call(l,l.__data__,h,u),p=vx(l,n),v=0,g=f.length;v<g;++v)(d=f[v])&&dx(d,e,n,v,f,p);o.push(f),a.push(l)}return new Fx(o,a,e,n)},selectChild:qx.selectChild,selectChildren:qx.selectChildren,filter:function(t){"function"!=typeof t&&(t=Ro(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],u=0;u<s;++u)(o=a[u])&&t.call(o,o.__data__,u,a)&&l.push(o);return new Fx(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,u=e[s],c=n[s],h=u.length,d=a[s]=new Array(h),f=0;f<h;++f)(l=u[f]||c[f])&&(d[f]=l);for(;s<r;++s)a[s]=e[s];return new Fx(a,this._parents,this._name,this._id)},selection:function(){return new Bx(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Wx(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,u=0;u<l;++u)if(a=s[u]){var c=vx(a,e);dx(a,t,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Fx(r,this._parents,t,n)},call:qx.call,nodes:qx.nodes,node:qx.node,size:qx.size,empty:qx.empty,each:qx.each,on:function(t,e){var n=this._id;return arguments.length<2?vx(this.node(),n).on.on(t):this.each(Nx(n,t,e))},attr:function(t,e){var n=Oo(t),r="transform"===n?su:xx;return this.attrTween(t,"function"==typeof e?(n.local?Sx:Tx)(n,r,bx(this,"attr."+t,e)):null==e?(n.local?Ex:_x)(n):(n.local?Ox:wx)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Oo(t);return this.tween(n,(r.local?Cx:Lx)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?au:xx;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=ra(this,t),a=(this.style.removeProperty(t),ra(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Ux(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=ra(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=ra(this,t)),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}(t,r,bx(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var l=px(this,t),u=l.on,c=null==l.value[a]?o||(o=Ux(e)):void 0;u===n&&i===c||(r=(n=u).copy()).on(s,i=c),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=ra(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Hx(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(bx(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,zx(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=vx(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?mx:yx)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Dx:kx)(e,t)):vx(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Rx:Ix)(e,t)):vx(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Px(e,t)):vx(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;px(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=px(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:qx[Symbol.iterator]};var Zx={time:null,delay:0,duration:250,ease:dt};function Yx(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Pa.prototype.interrupt=function(t){return this.each((function(){gx(this,t)}))},Pa.prototype.transition=function(t){var e,n;t instanceof Fx?(e=t._id,t=t._name):(e=Wx(),(n=Zx).time=nx(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,u=0;u<l;++u)(a=s[u])&&dx(a,t,e,u,s,n||Yx(a,e));return new Fx(r,this._parents,t,e)};var Xx=t=>()=>t;function Kx(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Qx(t){t.stopImmediatePropagation()}function $x(t){t.preventDefault(),t.stopImmediatePropagation()}var Jx={name:"drag"},t_={name:"space"},e_={name:"handle"},n_={name:"center"};const{abs:r_,max:i_,min:o_}=Math;function a_(t){return[+t[0],+t[1]]}function s_(t){return[a_(t[0]),a_(t[1])]}var l_={name:"x",handles:["w","e"].map(v_),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},u_={name:"y",handles:["n","s"].map(v_),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},c_={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},h_={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},d_={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},f_={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},p_={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function v_(t){return{type:t}}function g_(t){return!t.ctrlKey&&!t.button}function m_(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function y_(){return navigator.maxTouchPoints||"ontouchstart"in this}function b_(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function x_(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function __(){return function(t){var e,n=m_,r=g_,i=y_,o=!0,a=Bb("start","brush","end"),s=6;function l(e){var n=e.property("__brush",v).selectAll(".overlay").data([v_("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",c_.overlay).merge(n).each((function(){var t=b_(this).extent;Na(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([v_("selection")]).enter().append("rect").attr("class","selection").attr("cursor",c_.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return c_[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Na(this),e=b_(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,a,s,l,h,d,f,p,v,g,m,y=this,b=n.target.__data__.type,x="selection"===(o&&n.metaKey?b="overlay":b)?Jx:o&&n.altKey?n_:e_,_=t===u_?null:f_[b],E=t===l_?null:p_[b],w=b_(y),O=w.extent,T=w.selection,S=O[0][0],M=O[0][1],A=O[1][0],C=O[1][1],L=0,D=0,k=_&&E&&o&&n.shiftKey,R=Array.from(n.touches||[n],t=>{const e=t.identifier;return(t=Ba(t,y)).point0=t.slice(),t.identifier=e,t});gx(y);var I=c(y,arguments,!0).beforestart();if("overlay"===b){T&&(v=!0);const e=[R[0],R[1]||R[0]];w.selection=T=[[i=t===u_?S:o_(e[0][0],e[1][0]),s=t===l_?M:o_(e[0][1],e[1][1])],[h=t===u_?A:i_(e[0][0],e[1][0]),f=t===l_?C:i_(e[0][1],e[1][1])]],R.length>1&&V(n)}else i=T[0][0],s=T[0][1],h=T[1][0],f=T[1][1];a=i,l=s,d=h,p=f;var P=Na(y).attr("pointer-events","none"),N=P.selectAll(".overlay").attr("cursor",c_[b]);if(n.touches)I.moved=U,I.ended=H;else{var B=Na(n.view).on("mousemove.brush",U,!0).on("mouseup.brush",H,!0);o&&B.on("keydown.brush",G,!0).on("keyup.brush",z,!0),Fb(n.view)}u.call(y),I.start(n,x.name)}function U(t){for(const e of t.changedTouches||[t])for(const t of R)t.identifier===e.identifier&&(t.cur=Ba(e,y));if(k&&!g&&!m&&1===R.length){const t=R[0];r_(t.cur[0]-t[0])>r_(t.cur[1]-t[1])?m=!0:g=!0}for(const t of R)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);v=!0,$x(t),V(t)}function V(t){const e=R[0],n=e.point0;var r;switch(L=e[0]-n[0],D=e[1]-n[1],x){case t_:case Jx:_&&(L=i_(S-i,o_(A-h,L)),a=i+L,d=h+L),E&&(D=i_(M-s,o_(C-f,D)),l=s+D,p=f+D);break;case e_:R[1]?(_&&(a=i_(S,o_(A,R[0][0])),d=i_(S,o_(A,R[1][0])),_=1),E&&(l=i_(M,o_(C,R[0][1])),p=i_(M,o_(C,R[1][1])),E=1)):(_<0?(L=i_(S-i,o_(A-i,L)),a=i+L,d=h):_>0&&(L=i_(S-h,o_(A-h,L)),a=i,d=h+L),E<0?(D=i_(M-s,o_(C-s,D)),l=s+D,p=f):E>0&&(D=i_(M-f,o_(C-f,D)),l=s,p=f+D));break;case n_:_&&(a=i_(S,o_(A,i-L*_)),d=i_(S,o_(A,h+L*_))),E&&(l=i_(M,o_(C,s-D*E)),p=i_(M,o_(C,f+D*E)))}d<a&&(_*=-1,r=i,i=h,h=r,r=a,a=d,d=r,b in h_&&N.attr("cursor",c_[b=h_[b]])),p<l&&(E*=-1,r=s,s=f,f=r,r=l,l=p,p=r,b in d_&&N.attr("cursor",c_[b=d_[b]])),w.selection&&(T=w.selection),g&&(a=T[0][0],d=T[1][0]),m&&(l=T[0][1],p=T[1][1]),T[0][0]===a&&T[0][1]===l&&T[1][0]===d&&T[1][1]===p||(w.selection=[[a,l],[d,p]],u.call(y),I.brush(t,x.name))}function H(t){if(Qx(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Wb(t.view,v),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);P.attr("pointer-events","all"),N.attr("cursor",c_.overlay),w.selection&&(T=w.selection),x_(T)&&(w.selection=null,u.call(y)),I.end(t,x.name)}function G(t){switch(t.keyCode){case 16:k=_&&E;break;case 18:x===e_&&(_&&(h=d-L*_,i=a+L*_),E&&(f=p-D*E,s=l+D*E),x=n_,V(t));break;case 32:x!==e_&&x!==n_||(_<0?h=d-L:_>0&&(i=a-L),E<0?f=p-D:E>0&&(s=l-D),x=t_,N.attr("cursor",c_.selection),V(t));break;default:return}$x(t)}function z(t){switch(t.keyCode){case 16:k&&(g=m=k=!1,V(t));break;case 18:x===n_&&(_<0?h=d:_>0&&(i=a),E<0?f=p:E>0&&(s=l),x=e_,V(t));break;case 32:x===t_&&(t.altKey?(_&&(h=d-L*_,i=a+L*_),E&&(f=p-D*E,s=l+D*E),x=n_):(_<0?h=d:_>0&&(i=a),E<0?f=p:E>0&&(s=l),x=e_),N.attr("cursor",c_[b]),V(t));break;default:return}$x(t)}}function f(t){c(this,arguments).moved(t)}function p(t){c(this,arguments).ended(t)}function v(){var e=this.__brush||{selection:null};return e.extent=s_(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,r){e.tween?e.on("start.brush",(function(t){c(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){c(this,arguments).end(t)})).tween("brush",(function(){var e=this,r=e.__brush,i=c(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Jl(o,a);function l(t){r.selection=1===t&&null===a?null:s(t),u.call(e),i.brush()}return null!==o&&null!==a?l:l(1)})):e.each((function(){var e=this,i=arguments,o=e.__brush,a=t.input("function"==typeof n?n.apply(e,i):n,o.extent),s=c(e,i).beforestart();gx(e),o.selection=null===a?null:a,u.call(e),s.start(r).brush(r).end(r)}))},l.clear=function(t,e){l.move(t,null,e)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=Na(this.that).datum();a.call(e,this.that,new Kx(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:Xx(s_(t)),l):n},l.filter=function(t){return arguments.length?(r="function"==typeof t?t:Xx(!!t),l):r},l.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Xx(!!t),l):i},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=a.on.apply(a,arguments);return t===a?l:t},l}(l_)}var E_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",e.renderType=R.SVG,e.selectionSelector="rect.selection",e.frontSelectionSelector="rect.frontSelection",e}return n(e,t),e.prototype.render=function(t){var n=this,r=this.parent,i=this.getComponentContainer(),o=wv.appendOrSelect(r,"svg.chart-grid-backdrop"),a=wv.appendOrSelect(o,"g."+this.type),s=wv.appendOrSelect(a,this.selectionSelector),l=wv.getSVGElementSize(o,{useAttrs:!0}),u=l.width,c=l.height,h=this.services.cartesianScales,d=h.getMainXScaleType(),f=h.getMainXScale(),p=f.range(),v=p[0];p[1];i.attr("transform","translate("+v+",0)");var g=wv.appendOrSelect(i,this.frontSelectionSelector);if(f&&d===H.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain())&&this.model.set({zoomDomain:m},{animate:!1});var y=function(t,e){var r=Nh().range([0,u]).domain(m),i=[r.invert(t),r.invert(e)];i[0].valueOf()===i[1].valueOf()&&(i=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===i[0].valueOf()&&m[1].valueOf()===i[1].valueOf()||n.services.zoom.handleDomainChange(i)},b=__().extent([[0,0],[u-1,c]]).on("start brush end",(function(t){var n=t.selection;null!==n&&n[0]!==n[1]&&(g.attr("x",parseFloat(s.attr("x"))+parseFloat(o.attr("x"))).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),function(t){for(var n=t[1]-t[0],r="0,"+n.toString(),i=Math.floor(c/e.DASH_LENGTH),o=i*e.DASH_LENGTH,a=0;a<i;a++)r+=","+e.DASH_LENGTH;r+=","+(c-o),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+c.toString(),g.attr("stroke-dasharray",r)}(n))})).on("end.brushed",(function(t){var e=t.selection;null!==e&&(y(e[0],e[1]),a.call(b.move,null),g.style("display","none"))}));a.call(b);var x=this.services.zoom.getZoomRatio();o.on("click",(function(t){if(t.shiftKey){var e=this.services.domUtils.getHolder(),n=Ba(a.node(),e)[0],r=n-u*x/2;r<0&&(r=0);var i=n+u*x/2;i>u&&(i=u),y(r,i)}}))}},e.DASH_LENGTH=4,e}(kv),w_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e.renderType=R.SVG,e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=qa(this.getOptions(),"grid","x","enabled"),n=qa(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(wv.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(wv.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("height"),i=jv(this.services.cartesianScales.getMainXScale()).tickSizeInner(-r).tickSizeOuter(0);if(qa(this.getOptions(),"grid","x","alignWithAxisTicks")){var o=this.services.cartesianScales.getDomainAxisPosition(),a=qa(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=qa(this.getOptions(),"grid","x","numberOfTicks");i.ticks(s)}var l=n.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+r+")");t?l.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):l.call(i),this.cleanGrid(l)},e.prototype.drawYGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("width"),i=Fv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-r).tickSizeOuter(0);if(qa(this.getOptions(),"grid","y","alignWithAxisTicks")){var o=this.services.cartesianScales.getRangeAxisPosition(),a=qa(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=qa(this.getOptions(),"grid","y","numberOfTicks");i.ticks(s)}var l=n.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");t?l.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):l.call(i),this.cleanGrid(l)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(Ga(t).tx)-Number(Ga(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+Ga(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var o,a=r[i],s=r[e];if(a)if(s)o=+Ga(s).tx-+Ga(a).tx;else{var l=n.select("rect.chart-grid-backdrop").node();o=wv.getSVGElementSize(l).width-+Ga(a).tx}else o=+Ga(s).tx;return o*this.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=qa(this.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Ga(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(t,e){var n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],s=o[1],l=i.range(),u=l[0],c=l[1];this.backdrop=wv.appendOrSelect(n,"svg.chart-grid-backdrop");var h=wv.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",a).attr("y",c).attr("width",Math.abs(s-a)).attr("height",Math.abs(u-c)).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){t.selectAll("text").remove(),t.select(".domain").remove()},e}(kv);var O_,T_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.renderType=R.SVG,e.isXGridEnabled=qa(e.getOptions(),"grid","x","enabled"),e.isYGridEnabled=qa(e.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=qa(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()},e.prototype.removeBackdropEventListeners=function(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)},e.prototype.formatTooltipData=function(t){return t},e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.services.cartesianScales.getOrientation(),s=this.model.getDisplayData(),l=this.services.cartesianScales.getRangeScale().range(),u=l[0],c=l[1],h=a===V.HORIZONTAL?i:r,d=wv.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),f=wv.appendOrSelect(d,"line.ruler-line"),p=o.selectAll("[role=graphics-symbol]"),v=s.map((function(t){return{domainValue:n.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,h)}));if(this.pointsWithinLine&&v.length===this.pointsWithinLine.length&&v.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=v,this.services.events.dispatchEvent(ut.Tooltip.MOVE,{mousePosition:[r,i]});this.pointsWithinLine=v;var g=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(h-e.domainValue),i=Math.abs(h-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(g.length>0){var m=g.map((function(t){return t.originalData})).filter((function(t){var e=t[n.services.cartesianScales.getRangeIdentifier(t)];return null!=e})),y=g.map((function(t){return t.domainValue})),b=p.filter((function(t){var e=n.services.cartesianScales.getDomainValue(t);return y.includes(e)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!po(this.elementsToHighlight,b)&&this.hideRuler(),b.dispatch("mouseover"),this.elementsToHighlight=b,this.services.events.dispatchEvent(ut.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:f,data:this.formatTooltipData(m)}),d.attr("opacity",1);var x=g[0];"horizontal"===a?f.attr("x1",c).attr("x2",u).attr("y1",x.domainValue).attr("y2",x.domainValue):f.attr("y1",c).attr("y2",u).attr("x1",x.domainValue).attr("x2",x.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=wv.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(ut.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.services.domUtils.getHolder(),n=this.model.getDisplayData(),r=function(e){var n=Ba(e,t.parent.node());t.showRuler(e,n)};n.length>100&&(r=function(t,e,n){var r=null;return function(){var i=this,o=arguments;i.mousePosition=Ba(o[0],n),clearTimeout(r),r=setTimeout((function(){t.apply(i,o)}),e)}}((function(e){var n=this.mousePosition;t.showRuler(e,n)}),n.length%50*12.5,e));this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent;this.backdrop=wv.appendOrSelect(t,"svg.chart-grid-backdrop")},e}(kv),S_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler-binned",e.renderType=R.SVG,e}return n(e,t),e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.model.getOptions(),s=this.services.cartesianScales.getOrientation(),l=this.services.cartesianScales.getRangeScale().range(),u=l[0],c=l[1],h=this.services.cartesianScales.getDomainScale(),d=h.invert(s===V.VERTICAL?r:i),f=wv.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),p=wv.appendOrSelect(f,"line.ruler-line"),v=o.selectAll("[role=graphics-symbol]").filter((function(t){if(parseFloat(Gn(t,"data.x0"))<=d&&parseFloat(Gn(t,"data.x1"))>=d)return!0}));if(v.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!po(this.elementsToHighlight,v)&&this.hideRuler(),v.dispatch("mouseover"),this.elementsToHighlight=v;var g=Na(v.nodes()[0]).datum(),m=parseFloat(Gn(g,"data.x0")),y=parseFloat(Gn(g,"data.x1")),b=this.model.getActiveDataGroupNames(),x=b.reverse().map((function(t){return{label:t,value:Gn(g,"data."+t),class:n.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:t})}})).filter((function(t){return 0!==t.value}));if(x.length>0){this.services.events.dispatchEvent(ut.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:p,items:k([{label:Gn(a,"bins.rangeLabel")||"Range",value:m+" – "+y}],x,!0===qa(a,"tooltip","showTotal")?[{label:Gn(a,"tooltip.totalLabel")||"Total",value:b.reduce((function(t,e){return t+parseFloat(Gn(g,"data."+e))}),0)}]:[])}),f.attr("opacity",1);var _=h((m+y)/2);"horizontal"===s?p.attr("x1",c).attr("x2",u).attr("y1",_).attr("y2",_):p.attr("y1",c).attr("y2",u).attr("x1",_).attr("x2",_)}else this.hideRuler()}else this.hideRuler()},e}(T_),M_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e}(T_),A_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.renderType=R.HTML,e}return n(e,t),e.prototype.init=function(){var t=this,e=function(){return t.updateOverflowMenu(!1)};this.services.events.addEventListener(ut.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(ut.Toolbar.HIDE_OVERFLOW_MENU,(function(){document.body.removeEventListener("click",e)}))},e.prototype.render=function(t){var e=this,n=this.getComponentContainer().attr("role","toolbar").attr("aria-label","chart-"+this.services.domUtils.getChartID()+" toolbar");if(qa(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));var r=this.getControlConfigs(),i=r.buttonList;r.overflowMenuItemList&&i.push(this.getOverflowButtonConfig());var o=n.selectAll("div.toolbar-control").data(i,(function(t){return t.id}));o.exit().remove();var a=o.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),s=this;a.merge(o).classed("disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-label",(function(t){return t.title})).html((function(t){return'\n\t\t\t<button\n\t\t\t\tclass="cds--overflow-menu__trigger cds--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="'+e.services.domUtils.generateElementIDString("control-"+t.id)+'" aria-label="'+t.title+'">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t'+t.iconSVG.content+"\n\t\t\t\t</svg>\n\t\t\t</button>"})).each((function(t,e){var n=this;Na(this).select("svg").style("will-change","transform").style("width",void 0!==t.iconSVG.width?t.iconSVG.width:"20px").style("height",void 0!==t.iconSVG.height?t.iconSVG.height:"20px"),Na(this).select("button").on("click",(function(e){t.shouldBeDisabled()||s.triggerFunctionAndEvent(t,e,n)})).on("keydown",(function(r){r.key&&"Enter"===r.key||" "===r.key?(r.preventDefault(),s.triggerFunctionAndEvent(t,r,n)):r.key&&"ArrowLeft"===r.key?s.focusOnPreviousEnabledToolbarItem(e):r.key&&"ArrowRight"===r.key&&s.focusOnNextEnabledToolbarItem(e)}))}));this.overflowButton=this.getComponentContainer().select("button.cds--overflow-menu__trigger#"+this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu"))}},e.prototype.renderOverflowMenu=function(){var t=this,e=this.getControlConfigs().overflowMenuItemList,n=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(e,(function(t){return qa(t,"id")}));n.exit().remove();var r=n.enter().append("li").attr("id",(function(e){return t.services.domUtils.generateElementIDString("control-"+e.id)})).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);r.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),r.merge(n).classed("cds--overflow-menu-options__option--disabled",(function(t){return t.shouldBeDisabled()})).classed("cds--overflow-menu-options__option--disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-disabled",(function(t){return t.shouldBeDisabled()})).selectAll("button").text((function(t){return t.text}))},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.classed("is-open")},e.prototype.updateOverflowMenu=function(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),Na(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(ut.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(ut.Toolbar.HIDE_OVERFLOW_MENU))},e.prototype.focusOnPreviousEnabledToolbarItem=function(t){for(var e=this.getToolbarButtonItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=Na("button#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)).node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledToolbarItem=function(t){for(var e=this.getToolbarButtonItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=Na("button#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)).node();"focus"in i&&i.focus()}},e.prototype.focusOnPreviousEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=Na("#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)+" button").node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=Na("#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)+" button").node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(t){var e=this;if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var n=this;this.getOverflowMenuItems().forEach((function(r,i){var o=Na("#"+e.services.domUtils.generateElementIDString("control-"+r.id));null!==o&&(o.on("click",(function(){n.triggerFunctionAndEvent(r,t,o.node()),n.updateOverflowMenu(!1)})),o.on("keydown",(function(e){e&&"Enter"===e.key?n.triggerFunctionAndEvent(r,t,o.node()):e&&"ArrowUp"===e.key?n.focusOnPreviousEnabledMenuItem(i):e&&"ArrowDown"===e.key?n.focusOnNextEnabledMenuItem(i):e&&"Escape"===e.key&&n.updateOverflowMenu(!1),e.preventDefault()})))})),n.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()},e.prototype.triggerFunctionAndEvent=function(t,e,n){"function"==typeof t.shouldBeDisabled&&t.shouldBeDisabled()||("function"==typeof t.clickFunction&&t.clickFunction(e),this.services.events.dispatchEvent(ut.Toolbar.BUTTON_CLICK,{control:t,event:e,element:n}))},e.prototype.getControlConfigs=function(){var t=this,n=qa(this.getOptions(),"toolbar","numberOfIcons")-1,r=qa(this.getOptions(),"toolbar","controls"),i=[],o=[],a=[];return r.forEach((function(r){var s=null;r.type===rt.CUSTOM?(null===qa(r,"id")&&(r.id="toolbar-button-"+e.buttonID++),null===qa(r,"shouldBeDisabled")&&(r.shouldBeDisabled=function(){return!1}),s=r):s=t.getControlConfigByType(r.type),s&&(s.text=r.text?r.text:r.type,-1!==s.id.indexOf("toolbar-export")?i.push(s):o.length<n?null===qa(s,"iconSVG","content")?a.push(s):o.push(s):a.push(s))})),a.push.apply(a,i),a.length?{buttonList:o,overflowMenuItemList:a}:{buttonList:o}},e.prototype.getToolbarButtonItems=function(){var t=this.getControlConfigs(),e=t.buttonList;return t.overflowMenuItemList&&e.push(this.getOverflowButtonConfig()),e||[]},e.prototype.getOverflowMenuItems=function(){var t=this.getControlConfigs().overflowMenuItemList;return t||[]},e.prototype.getOverflowButtonConfig=function(){var t=this;return{id:"toolbar-overflow-menu",title:"More options",shouldBeDisabled:function(){return!1},iconSVG:{content:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="24" r="2"></circle>'},clickFunction:function(e){return t.toggleOverflowMenu(e)}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),i=this.model.getDisplayData();switch(t){case rt.ZOOM_IN:r&&(e={id:"toolbar-zoomIn",title:"Zoom in",shouldBeDisabled:function(){return n.services.zoom.isMinZoomDomain()},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.zoom.zoomIn()}});break;case rt.ZOOM_OUT:r&&(e={id:"toolbar-zoomOut",title:"Zoom out",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.zoom.zoomOut()}});break;case rt.RESET_ZOOM:r&&(e={id:"toolbar-resetZoom",title:"Reset zoom",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.zoom.resetZoomDomain()}});break;case rt.MAKE_FULLSCREEN:e={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:"Make fullscreen",shouldBeDisabled:function(){return!1},clickFunction:function(){n.services.domUtils.toggleFullscreen()}};break;case rt.SHOW_AS_DATATABLE:e={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:"Show as table",shouldBeDisabled:function(){return 0===i.length},clickFunction:function(){return n.services.events.dispatchEvent(ut.Modal.SHOW)}};break;case rt.EXPORT_CSV:e={id:"toolbar-export-CSV",title:"Export as CSV",shouldBeDisabled:function(){return!1},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.model.exportToCSV()}};break;case rt.EXPORT_PNG:e={id:"toolbar-export-PNG",title:"Export as PNG",shouldBeDisabled:function(){return!1},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.domUtils.exportToPNG()}};break;case rt.EXPORT_JPG:e={id:"toolbar-export-JPG",title:"Export as JPG",shouldBeDisabled:function(){return!1},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.domUtils.exportToJPG()}};break;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case rt.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case rt.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case rt.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case rt.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case rt.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case rt.EXPORT_CSV:case rt.EXPORT_JPG:case rt.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}},e.buttonID=0,e}(kv),C_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e.renderType=R.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),r=this.services.cartesianScales.getScaleByPosition(n),i=r.domain(),o=i[0],a=i[1],s=o>0&&a<0||o<0&&a>0,l=this.getComponentContainer();if(s){var u=this.services.cartesianScales.getDomainScale().range(),c=u[0],h=u[1],d=+r(0)+.5;d||(d=r.range()[0]);var f=Za({x0:c,x1:h,y0:d,y1:d},this.services.cartesianScales.getOrientation());wv.appendOrSelect(l,"line.domain").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"zero-line-update",animate:t})})).attr("y1",f.y0).attr("y2",f.y1).attr("x1",f.x0).attr("x2",f.x1)}else l.selectAll("line.domain").remove()},e}(kv),L_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.renderType=R.SVG,e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=__(),e.highlightStrokeWidth=1,e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(ut.ZoomBar.UPDATE,this.render.bind(this));var t=qa(this.getOptions(),"zoomBar",N.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),r=this.services.zoom.isZoomBarLoading(N.TOP),i=this.services.zoom.isZoomBarLocked(N.TOP),o=qa(this.getOptions(),"zoomBar",N.TOP,"type"),a=qa(this.getOptions(),"axes",N.BOTTOM,"highlights"),s=Dt.height[o],l=wv.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(0!==l){var u=0,c=this.model.get("axesMargins");c&&c.left&&(u=c.left);var h=wv.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",s).attr("opacity",1);wv.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",s).attr("width","100%").attr("height",Dt.spacerHeight).attr("opacity",1).attr("fill","none");if(o===B.GRAPH_VIEW?wv.appendOrSelect(h,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",l-u).attr("height","100%").classed("zoom-bg-skeleton",r).style("stroke",r?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null):o===B.SLIDER_VIEW&&wv.appendOrSelect(h,"rect.zoom-slider-bg").attr("x",u).attr("y",s/2-1).attr("width",l-u).attr("height",2).classed("zoom-slider-bg-skeleton",r).style("stroke",r?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null),r)this.renderSkeleton(h,u,l);else{var d=this.services.cartesianScales,f=d.getMainXScale(),p=d.getMainYScale(),v=d.getMainXScaleType();if(f&&v===H.TIME){var g=this.services.zoom.getZoomBarData();if(fo(g)||1===g.length)return;this.xScale=f.copy(),this.yScale=p.copy();var m=this.services.zoom.getDefaultZoomBarDomain(g);g=this.compensateDataForDefaultDomain(g,m);var y=this.model.get("initialZoomDomain"),b=qa(this.getOptions(),"zoomBar",N.TOP,"initialZoomDomain");b&&b[0]&&b[1]&&(b[0]=new Date(b[0]),b[1]=new Date(b[1])),!b||y&&y[0].valueOf()===b[0].valueOf()&&y[1].valueOf()===b[1].valueOf()?null===b&&null!==y&&this.model.set({initialZoomDomain:null,zoomDomain:mo([],m)},{skipUpdate:!0}):this.model.set({initialZoomDomain:mo([],b),zoomDomain:b?mo([],b):m},{skipUpdate:!0}),this.xScale.range([u,l]).domain(m),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,s-6]).domain(Gs(g,(function(t){return t.value})));var x=this.model.get("zoomDomain");if(o===B.GRAPH_VIEW&&(this.renderZoomBarArea(h,"path.zoom-graph-area-unselected",g,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(h,"path.zoom-graph-area",g,this.clipId),this.renderZoomBarBaseline(h,u,l),a)){var _=a.highlightStartMapsTo,E=a.highlightEndMapsTo,w=a.color,O=a.labelMapsTo;a.data.forEach((function(t,n){wv.appendOrSelect(h,"rect.highlight-"+n).attr("height",s-2*e.highlightStrokeWidth).attr("y",e.highlightStrokeWidth).attr("x",e.xScale(t[_])).attr("width",e.xScale(t[E])-e.xScale(t[_])).style("fill",w&&w.scale[t[O]]?w.scale[t[O]]:null).style("fill-opacity",.1).style("stroke",w&&w.scale[t[O]]?w.scale[t[O]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(x,u,l);var T=wv.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===x);else if(x[0].valueOf()===x[1].valueOf())T.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range(),this.xScale.domain());else{var S=x.map((function(t){return e.xScale(t)}));S[1]-S[0]<this.MIN_SELECTION_DIFF||(T.call(this.brush.move,S),this.updateBrushHandle(this.getComponentContainer(),S,x))}i&&(this.brush.filter((function(){return!1})),T.selectAll("rect").attr("cursor","auto"))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=qa(this.getOptions(),"zoomBar",N.TOP,"type"),o=Dt.height[i];this.brush.extent([[e,0],[n,o]]).on("start brush end",null).on("start brush end",(function(e){var n=e.selection;null===n?r.handleBrushedEvent(e,t,r.xScale,r.xScale.range()):n[0]===n[1]||r.handleBrushedEvent(e,t,r.xScale,n)}))},e.prototype.handleBrushedEvent=function(t,e,n,r){var i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r,i),null!=t.sourceEvent&&("mousemove"===t.sourceEvent.type||"mouseup"===t.sourceEvent.type||"mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type||"touchmove"===t.sourceEvent.type||"touchend"===t.sourceEvent.type)){void 0!==e&&e[0]===i[0]&&e[1]===i[1]||this.services.zoom.handleDomainChange(i,{dispatchEvent:!1});var o=void 0;"start"===t.type?o=ut.ZoomBar.SELECTION_START:"brush"===t.type?o=ut.ZoomBar.SELECTION_IN_PROGRESS:"end"===t.type&&(o=ut.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(ut.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(o,{selection:r,newDomain:i})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=Dt.handleWidth,o=qa(this.getOptions(),"zoomBar",N.TOP,"type"),a=Dt.height[o],s=-i/2,l=Dt.handleBarWidth,u=o===B.GRAPH_VIEW?Dt.handleBarHeight:6,c=-l/2,h=(a-u)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,r.maxSelectionRange[1]-i):void 0})).attr("y",0).attr("width",i).attr("height",a).attr("cursor","ew-resize").style("display",null);var d=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);d.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),d.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,r.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,r.maxSelectionRange[1]+s+c):void 0})).attr("y",h).attr("width",l).attr("height",u).attr("cursor","ew-resize"),o===B.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],a)},e.prototype.updateSliderSelectedArea=function(t){var e=qa(this.getOptions(),"zoomBar",N.TOP,"type"),n=Dt.height[e],r=(wv.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getComponentContainer().select("svg.zoom-container");wv.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)},e.prototype.renderZoomBarArea=function(t,e,n,r){var i=this.services.cartesianScales,o=i.getMainXAxisPosition(),a=i.getMainYAxisPosition(),s=i.getMainXScaleType(),l=i.getMainYScaleType(),u=function(t,e,n){return function(r,o){return i.getValueFromScale(t,e,n,r,o)}},c=u(this.xScale,s,o),h=u(this.yScale,l,a),d=qa(this.getOptions(),"zoomBar",N.TOP,"type"),f=Dt.height[d],p=gd().x((function(t,e){return c(t,e)})).y0(f).y1((function(t,e){return f-h(t,e)})),v=wv.appendOrSelect(t,e).datum(n).attr("d",p);r&&v.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,o){var a=wv.appendOrSelect(t,"clipPath").attr("id",e);wv.appendOrSelect(a,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=Ua(t),i=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(r[0][i]))(n={})[i]=e[0],n[o]=0,r.unshift(n);if(Number(e[1])>Number(r[r.length-1][i]))(n={})[i]=e[1],n[o]=0,r.push(n);return r}},e.prototype.renderZoomBarBaseline=function(t,e,n,r){void 0===r&&(r=!1);var i=qa(this.model.getOptions(),"zoomBar",N.TOP,"type"),o=Dt.height[i],a=vd()([[e,o],[n,o]]);wv.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",a).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.renderSkeleton=function(t,e,n){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),wv.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),qa(this.getOptions(),"zoomBar",N.TOP,"type")===B.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(ut.ZoomBar.UPDATE,this.render.bind(this))},e}(kv),D_=function(){function t(t,e){this.services={domUtils:wv,files:Tv,events:Ov,gradientUtils:Mv,transitions:Sv,canvasZoom:Dv},this.model=new $p(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener(ut.Model.UPDATE,(function(t){var e=!!qa(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(ut.Chart.RESIZE,(function(){n.update(!1)})),this.components=this.getComponents(),this.update()},t.prototype.getComponents=function(){return console.error("getComponents() method is not implemented"),null},t.prototype.update=function(t){var e=this;if(void 0===t&&(t=!0),this.components){Object.keys(this.services).forEach((function(t){e.services[t].update()})),this.components.forEach((function(e){return e.render(t)}));var n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map((function(t){return n[t].end().catch((function(t){return t}))}));Promise.all(r).then((function(){return e.services.events.dispatchEvent(ut.Chart.RENDER_FINISHED)}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})},t.prototype.getChartComponents=function(t,e){var n=this.model.getOptions(),r=qa(n,"toolbar","enabled"),i={id:"legend",components:[new Rv(this.model,this.services)],growth:q.PREFERRED},o=qa(n,"canvasZoom","enabled");o&&!0===o&&t.push(new sm(this.model,this.services));var a=!!this.model.getOptions().title,s={id:"title",components:[new nm(this.model,this.services)],growth:q.STRETCH},l={id:"toolbar",components:[new A_(this.model,this.services)],growth:q.PREFERRED},u={id:"header",components:[new kb(this.model,this.services,k([s],r?[l]:[]),{direction:W.ROW,alignItems:Z.CENTER})],growth:q.PREFERRED},c={id:"graph-frame",components:t,growth:q.STRETCH,renderType:qa(e,"graphFrameRenderType")||R.SVG},h=!0!==qa(e,"excludeLegend")&&!1!==n.legend.enabled,d=W.COLUMN;if(h){var f=qa(n,"legend","position");"left"===f?(d=W.ROW,n.legend.orientation||(n.legend.orientation=j.VERTICAL)):"right"===f?(d=W.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=j.VERTICAL)):"bottom"===f&&(d=W.COLUMN_REVERSE)}var p={id:"spacer",components:[new Db(this.model,this.services)],growth:q.PREFERRED},v={id:"full-frame",components:[new kb(this.model,this.services,k(h?[i]:[],h?[p]:[],[c]),{direction:d})],growth:q.STRETCH},g=[];if(a||r){g.push(u);var m={id:"spacer",components:[new Db(this.model,this.services,r?{size:15}:void 0)],growth:q.PREFERRED};g.push(m)}return g.push(v),[new im(this.model,this.services),new Qg(this.model,this.services),new kb(this.model,this.services,g,{direction:W.COLUMN})]},t}(),k_=function(t){function e(e){var n=t.call(this,e)||this;return n.axisFlavor=lt.DEFAULT,n}return n(e,t),e.prototype.assignRangeAndDomains=function(){var t=this.services.cartesianScales,e=this.getOptions(),n=t.isDualAxes(),r={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=t.secondaryDomainAxisPosition,r.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(r).forEach((function(n){var i=r[n];t.scales[i]?r[n]={position:i,label:t.getScaleLabel(i),identifier:qa(e,"axes",i,"mapsTo")}:r[n]=null})),r},e.prototype.getTabularDataArray=function(){var t,e=this.getDisplayData(),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales,i=this.assignRangeAndDomains(),o=i.primaryDomain,a=i.primaryRange,s=i.secondaryDomain,l=i.secondaryRange;return r.getDomainAxisScaleType()===H.TIME&&(t=function(t){return Pp(t,"MMM d, yyyy")}),k([k(["Group",o.label,a.label],s?[s.label]:[],l?[l.label]:[])],e.map((function(e){return k([e[n],null===e[o.identifier]?"–":t?t(e[o.identifier]):e[o.identifier],null===e[a.identifier]||isNaN(e[a.identifier])?"–":e[a.identifier].toLocaleString()],s?[null===e[s.identifier]?"–":e[s.identifier]]:[],l?[null===e[l.identifier]||isNaN(e[l.identifier])?"–":e[l.identifier]]:[])})))},e.prototype.setData=function(e){var n;if(e&&(n=t.prototype.setData.call(this,e),qa(this.getOptions(),"zoomBar",N.TOP,"enabled"))){var r=qa(this.getOptions(),"zoomBar",N.TOP,"data");this.setZoomBarData(r)}return n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(Ua(t)):this.getDisplayData(),n=e,r=this.services.cartesianScales;if(e&&r.domainAxisPosition&&r.rangeAxisPosition){var i=r.getDomainIdentifier(),o=r.getRangeIdentifier(),a=e.map((function(t){return t[i].getTime()}));n=(a=Va(a).sort()).map((function(t){var n=0,r={};return e.forEach((function(e){e[i].getTime()===t&&(n+=e[o])})),r[i]=new Date(t),r[o]=n,r}))}this.set({zoomBarData:n})},e.prototype.getZoomBarData=function(){return this.get("zoomBarData")},e.prototype.sanitizeDateValues=function(t){var e=this.getOptions();if(!e.axes)return t;var n=[];return Object.keys(N).forEach((function(t){var r=N[t],i=e.axes[r];if(i&&i.scaleType===H.TIME){var o=i.mapsTo;null===o&&void 0===o||n.push(o)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){null===qa(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t},e.prototype.sanitize=function(e){return e=t.prototype.sanitize.call(this,e),e=this.sanitizeDateValues(e)},e}($p),R_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Av,curves:Cv,zoom:Lv}),r.model=new k_(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=qa(n,"zoomBar",N.TOP,"enabled"),i=qa(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var o=this.services.cartesianScales.getMainXAxisPosition(),a=qa(n,"axes",o,"scaleType"),s=r&&o===N.BOTTOM&&a===H.TIME,l=this.services.zoom.isZoomBarLocked(N.TOP),u=!!this.model.getOptions().title,c={id:"title",components:[new nm(this.model,this.services)],growth:q.STRETCH},h={id:"toolbar",components:[new A_(this.model,this.services)],growth:q.PREFERRED},d={id:"header",components:[new kb(this.model,this.services,k([c],i?[h]:[]),{direction:W.ROW,alignItems:Z.CENTER})],growth:q.PREFERRED},f={id:"legend",components:[new Rv(this.model,this.services)],growth:q.PREFERRED};s&&!l&&t.push(new am(this.model,this.services),new E_(this.model,this.services)),t.push(new em(this.model,this.services)),t.push(new lm(this.model,this.services));var p={id:"graph-frame",components:t,growth:q.STRETCH,renderType:R.SVG},v=!1!==qa(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,g=W.COLUMN;if(v){var m=qa(this.model.getOptions(),"legend","position");m===G.LEFT?(g=W.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=j.VERTICAL)):m===G.RIGHT?(g=W.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=j.VERTICAL)):m===G.BOTTOM&&(g=W.COLUMN_REVERSE)}var y={id:"spacer",components:[new Db(this.model,this.services)],growth:q.PREFERRED},b={id:"full-frame",components:[new kb(this.model,this.services,k(v?[f]:[],v?[y]:[],[p]),{direction:g})],growth:q.STRETCH},x={id:"zoom-bar",components:[new L_(this.model,this.services)],growth:q.PREFERRED,renderType:R.SVG},_=[];if(u||i){_.push(d);var E={id:"spacer",components:[new Db(this.model,this.services,i?{size:15}:void 0)],growth:q.PREFERRED};_.push(E)}return s&&_.push(x),_.push(b),[new om(this.model,this.services),new Qg(this.model,this.services),new kb(this.model,this.services,_,{direction:W.COLUMN})]},e}(D_),I_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ha(Ua(Ns.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new T_(this.model,this.services),new xm(this.model,this.services),new um(this.model,this.services),new gm(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new Mm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(R_),P_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ha(Ns.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new M_(this.model,this.services),new cm(this.model,this.services),new xm(this.model,this.services,{stacked:!0}),new Em(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new Mm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(R_),N_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ha(Ns.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new dm(this.model,this.services),new C_(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(R_),B_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ha(Ns.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new fm(this.model,this.services),new C_(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(R_),U_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ha(Ns.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new M_(this.model,this.services),new pm(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.VERT_OR_HORIZ}),new C_(this.model,this.services)];return this.getAxisChartComponents(t)},e}(R_),V_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getBoxQuartiles=function(t){return{q_25:ol(t,.25),q_50:ol(t,.5),q_75:ol(t,.75)}},e.prototype.getBoxplotData=function(){for(var t=this.getOptions().data.groupMapsTo,e=this.getGroupedData(),n=[],r=function(e,r){for(var o,a=i.services.cartesianScales.getRangeIdentifier(),s=r.map((function(t){return t[a]})).sort(Us),l=((o={})[t]=e,o.counts=s,o.quartiles=i.getBoxQuartiles(s),o.outliers=null,o.whiskers=null,o),u=l.quartiles.q_25,c=l.quartiles.q_75,h=1.5*(c-u),d=u-h,f=c+h,p=[],v=[],g=0,m=s;g<m.length;g++){var y=m[g];y<d?p.push(y):y>f?p.push(y):v.push(y)}l.outliers=p;var b=rl(v),x=nl(v);l.whiskers={min:b||rl([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75]),max:x||nl([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75])},n.push(l)},i=this,o=0,a=e;o<a.length;o++){var s=a[o];r(s.name,s.data)}return n},e.prototype.getTabularDataArray=function(){var t=this.getOptions().data.groupMapsTo;return k([["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"]],this.getBoxplotData().map((function(e){var n=qa(e,"outliers");return null!==n&&0!==n.length||(n=["–"]),[e[t],null!==qa(e,"whiskers","min")?qa(e,"whiskers","min").toLocaleString():"–",null!==qa(e,"quartiles","q_25")?qa(e,"quartiles","q_25").toLocaleString():"–",null!==qa(e,"quartiles","q_50")?qa(e,"quartiles","q_50").toLocaleString():"–",null!==qa(e,"quartiles","q_75")?qa(e,"quartiles","q_75").toLocaleString():"–",null!==qa(e,"whiskers","max")?qa(e,"whiskers","max").toLocaleString():"–",null!==qa(e,"quartiles","q_75")&&null!==qa(e,"quartiles","q_25")?(qa(e,"quartiles","q_75")-qa(e,"quartiles","q_25")).toLocaleString():"–",n.map((function(t){return t.toLocaleString()})).join(",")]})))},e.prototype.setColorClassNames=function(){var t=qa(this.getOptions(),"color","pairing"),e=qa(t,"option");e=e<=yt.pairingOptions["1-color"]?e:1;var n=this.allDataGroups.map((function(t,n){return"1-"+e+"-1"}));this.colorClassNames=ul().range(n).domain(this.allDataGroups)},e}(k_),H_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new V_(r.services),r.model.setOptions(Ha(Ns.boxplotChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new vm(this.model,this.services),new C_(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})},e}(R_),G_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ha(Ns.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new T_(this.model,this.services),new mm(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(R_),z_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getMatchingRangeIndexForDatapoint=function(t){for(var e=t.ranges.length-1;e>0;e--){var n=t.ranges[e];if(t.value>=n)return e}return 0},e.prototype.getTabularDataArray=function(){var t=this,e=this.getDisplayData(),n=this.getOptions(),r=n.data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=qa(n,"bullet","performanceAreaTitles");return k([["Title","Group","Value","Target","Percentage","Performance"]],e.map((function(e){return[e.title,e[r],null===e.value?"–":e.value,null===qa(e,"marker")?"–":e.marker,null===qa(e,"marker")?"–":Math.floor(e[i]/e.marker*100)+"%",o[t.getMatchingRangeIndexForDatapoint(e)]]})))},e}(k_),j_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new z_(r.services),r.model.setOptions(Ha(Ns.bulletChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new ym(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(R_),F_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this.getBinnedStackedData();return k([k([Gn(t,"bins.rangeLabel")||"Range"],n.map((function(t){return Gn(t,"0."+e)})))],Gn(n,0).map((function(t,r){return k([Gn(t,"data.x0")+" – "+Gn(t,"data.x1")],n.map((function(t){return Gn(t[r],"data."+Gn(t[r],e))})))})))},e}(k_),W_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new F_(r.services),r.model.setOptions(Ha(Ns.histogramChart,n.options)),r.init(e,n),r.update(),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new S_(this.model,this.services),new bm(this.model,this.services)];return this.getAxisChartComponents(t)},e}(R_),q_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ha(Ns.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new T_(this.model,this.services),new xm(this.model,this.services),new gm(this.model,this.services,{handleThresholds:!0}),new Am(this.model,this.services),new C_(this.model,this.services)];return this.getAxisChartComponents(t)},e}(R_),Z_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ha(Ns.lollipopChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new T_(this.model,this.services),new _m(this.model,this.services),new gm(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(R_),Y_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ha(Ns.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new w_(this.model,this.services),new T_(this.model,this.services),new gm(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.GRID})];return this.getAxisChartComponents(t)},e}(R_),X_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularData=function(e){var n=t.prototype.getTabularData.call(this,e);return e!==n&&n.forEach((function(t){t.key&&t.key!==t.group&&(t.group=t.key)})),n},e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.getOptions().data.groupMapsTo;return k([["Group","Value"]],t.map((function(t){return[t[e],null===t.value?"–":t.value.toLocaleString()]})))},e.prototype.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}($p),K_=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new X_(i.services),r?i:(i.model.setOptions(Ha(Ns.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Om(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.PIE})];return this.getChartComponents(t)},e}(D_),Q_=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Ha(Ns.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Sm(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.DONUT})];return this.getChartComponents(t)},e}(K_),$_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getMaximumDomain=function(t){return t.reduce((function(t,e){return t+e.value}),0)},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=qa(n,"color","scale"),i=this.getStatus();return r||!i?t.prototype.getFillColor.call(this,e):null},e.prototype.getStatus=function(){var t=this.getOptions(),e=qa(this.getDisplayData()),n=(e?e.reduce((function(t,e){return{value:t.value+e.value}})):0).value,r=qa(t,"meter","proportional")?n:n>100?100:n,i=qa(t,"meter","status","ranges");if(i){var o=i.filter((function(t){return t.range[0]<=r&&r<=t.range[1]}));if(o.length>0)return o[0].status}return null},e.prototype.getTabularDataArray=function(){var t,e=this.getDisplayData(),n=this.getOptions(),r=n.data.groupMapsTo,i=this.getStatus(),o=qa(n,"meter","proportional"),a=[];if(null===o){t=100;var s=e[0];a=[k(["Group","Value"],i?["Status"]:[]),k([s[r],s.value],i?[i]:[])]}else{var l=qa(o,"total");t=l||this.getMaximumDomain(e),a=k([["Group","Value","Percentage of total"]],e.map((function(e){return[e[r],e.value,(e.value/t*100).toFixed(2)+" %"]})))}return a},e}($p),J_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e.renderType=R.SVG,e}return n(e,t),e.prototype.getStackedBounds=function(t,e){var n=0;return t.map((function(t,r){return 0!==r?(n+=e(t.value),L(L({},t),{width:Math.abs(e(t.value)-wt.dividerWidth),x:n-e(t.value)})):(n=e(t.value),L(L({},t),{width:Math.abs(e(t.value)-wt.dividerWidth),x:0}))}))},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i=this,o=this.getComponentContainer(),a=this.getOptions(),s=qa(a,"meter","proportional"),l=this.model.getDisplayData(),u=this.model.getStatus(),c=wv.getSVGElementSize(o,{useAttrs:!0}).width,h=a.data.groupMapsTo;if(null===qa(a,"meter","proportional"))n=100;else{var d=qa(a,"meter","proportional","total");n=d||this.model.getMaximumDomain(this.model.getDisplayData())}var f=Iu().domain([0,n]).range([0,c]),p=this.getStackedBounds(l,f),v=qa(a,"meter","height");wv.appendOrSelect(o,"rect.container").attr("x",0).attr("y",0).attr("width",c).attr("height",v||(s?wt.height.proportional:wt.height.default)),wv.appendOrSelect(o,"line.rangeIndicator").attr("x1",c).attr("x2",c).attr("y1",0).attr("y2",v||(s?wt.height.proportional:wt.height.default));var g=o.selectAll("rect.value").data(p),m=null==u||i.model.isUserProvidedColorScaleValid()||s?"value":"value status--"+u;g.enter().append("rect").classed("value",!0).merge(g).attr("x",(function(t){return t.x})).attr("y",0).attr("height",(function(){var t=qa(a,"meter","height");return t||(s?wt.height.proportional:wt.height.default)})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[h],originalClassName:m})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"meter-bar-update",animate:t})})).attr("width",(function(t,e){return t.value>n?f(n):t.width})).style("fill",(function(t){return i.model.getFillColor(t[h])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),g.exit().remove();var y=qa(a,"meter","peak"),b=y;null!==y&&(y>n?b=n:y<l[0].value&&(b=l[0].value>n?n:l[0].value));var x=o.selectAll("line.peak").data(null==b?[]:[b]);x.enter().append("line").classed("peak",!0).merge(x).attr("y1",0).attr("y2",(function(){var t=qa(a,"meter","height");return t||(s?wt.height.proportional:wt.height.default)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"peak-line-update",animate:t})})).attr("x1",(function(t){return f(t)})).attr("x2",(function(t){return f(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),x.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this,r=qa(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",(function(t,i){var o=Na(this);n.services.events.dispatchEvent(ut.Meter.METER_MOUSEOVER,{event:t,element:o,datum:i}),r&&(o.classed("hovered",!0),n.services.events.dispatchEvent(ut.Tooltip.SHOW,{event:t,hoveredElement:o,items:[{label:i[e],value:i.value}]}))})).on("mousemove",(function(t,e){var i=Na(this);n.services.events.dispatchEvent(ut.Meter.METER_MOUSEMOVE,{event:t,element:i,datum:e}),r&&n.services.events.dispatchEvent(ut.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){n.services.events.dispatchEvent(ut.Meter.METER_CLICK,{event:t,element:Na(this),datum:e})})).on("mouseout",(function(t,e){var i=Na(this);n.services.events.dispatchEvent(ut.Meter.METER_MOUSEOUT,{event:t,element:i,datum:e}),r&&(i.classed("hovered",!1),n.services.events.dispatchEvent(ut.Tooltip.HIDE,{hoveredElement:i}))}))},e.prototype.destroy=function(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)},e}(kv),tE=function(t){function e(e,n){var r=t.call(this,e,n)||this;r.model=new $_(r.services);var i=n.options.meter.proportional?mo(Ua(Ns.proportionalMeterChart),n.options):mo(Ua(Ns.meterChart),n.options);return r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=k(qa(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new rm(this.model,this.services)],growth:q.STRETCH,renderType:R.SVG},{id:"spacer",components:[new Db(this.model,this.services,{size:8})],growth:q.STRETCH}]:[],[{id:"meter-graph",components:[new J_(this.model,this.services)],growth:q.STRETCH,renderType:R.SVG}]),e=[new kb(this.model,this.services,t,{direction:W.COLUMN})];return this.getChartComponents(e,{graphFrameRenderType:R.HTML})},e}(D_),eE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getOptions(),e=this.getGroupedData(),n=qa(t,"radar","axes"),r=n.angle,i=n.value,o=qa(e,"0","data").map((function(t){return t[r]}));return k([k(["Group"],o)],e.map((function(t){return k([t.name],o.map((function(e,n){return null!==qa(t,"data",n,i)?qa(t,"data",n,i).toLocaleString():"–"})))})))},e}(k_),nE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new eE(r.services),r.model.setOptions(Ha(Ns.radarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new My(this.model,this.services)];return this.getChartComponents(t)},e}(D_),rE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDataGroups=function(){return t.prototype.getDataGroups.call(this).filter((function(t){return"delta"!==t.name}))},e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.getOptions().data.groupMapsTo;return k([["Group","Value"]],t.map((function(t){return[t[e],null===t.value?"–":t.value.toLocaleString()]})))},e}($p),iE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new rE(r.services),r.model.setOptions(Ha(Ns.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Tm(this.model,this.services)];return this.getChartComponents(t)},e}(D_),oE=((O_={})[nt.LINE]=[xm,gm],O_[nt.SCATTER]=[gm],O_[nt.AREA]=[um,xm,gm],O_[nt.STACKED_AREA]=[cm,xm,Em,M_],O_[nt.SIMPLE_BAR]=[dm],O_[nt.GROUPED_BAR]=[fm,C_],O_[nt.STACKED_BAR]=[pm,M_],O_),aE=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=Ha(Ns.comboChart,n.options);return n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:nt.LINE,correspondingDatasets:[]}]),r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getGraphComponents=function(){var t=this,e=this.model.getOptions().comboChartTypes,n=0;return qn(e.map((function(e){var r,i,o=e.type;return"string"==typeof e.type?Object.keys(oE).includes(e.type)?(r=mo({},Ns[Ur(e.type)+"Chart"],t.model.getOptions(),e.options),e.type===nt.STACKED_AREA&&(i=!0),oE[e.type].map((function(o,a){return new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r,stacked:i})}))):(console.error('Invalid chart type "'+e.type+'" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.'),null):(r=mo({},t.model.getOptions(),e.options),new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r}))})).filter((function(t){return null!==t})))},e.prototype.getComponents=function(){var t=this.model.getOptions().comboChartTypes.some((function(t){return t.type===nt.STACKED_BAR||t.type===nt.STACKED_AREA})),e=k([new Pb(this.model,this.services),new w_(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.GRID})],t?[]:[new T_(this.model,this.services)],this.getGraphComponents());return this.getAxisChartComponents(e)},e}(R_),sE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this,e=this.getDisplayData(),n=[["Child","Parent"]];return e.forEach((function(e){t.getChildrenDatums(e,n),n.push([e.name,"–"])})),n},e.prototype.getChildrenDatums=function(t,e){var n=this;void 0===e&&(e=[]),t.children&&t.children.length>0&&t.children.forEach((function(r){n.getChildrenDatums(r,e),e.push([r.name,t.name])}))},e}($p),lE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new sE(r.services),r.model.setOptions(Ha(Ns.treeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new yy(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})},e}(D_),uE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=[["Child","Group","Value"]];return t.forEach((function(t){Array.isArray(t.children)?t.children.forEach((function(n){e.push([n.name,t.name,n.value])})):null!==qa(t.name)&&qa(t.value)&&e.push(["–",t.name,t.value])})),e},e}($p),cE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new uE(r.services),r.model.setOptions(Ha(Ns.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ey(this.model,this.services)];return this.getChartComponents(t)},e}(D_),hE=function(t){function e(e){var n=t.call(this,e)||this;return n.parentNode=!1,n.set({depth:2},{skipUpdate:!0}),n}return n(e,t),e.prototype.setData=function(e){t.prototype.setData.call(this,e),this.setDataGroups(),1===e.length&&(this.parentNode=!0),this.setZoom()},e.prototype.setOptions=function(t){var e=this.getOptions(),n=mo({},t,this.getZoomOptions(t));Wa(e,n);var r=this.getHierarchyLevel(),i=qa(e,"circlePack","hierarchyLevel");this.set({options:mo(e,n),depth:i&&i<4?i:r})},e.prototype.getZoomOptions=function(t){if(!this.getDisplayData())return{};var e=this.getDisplayData(),n=t||this.getOptions(),r=1===e.length&&qa(e,0,"children")?qa(e,0,"children"):e,i=this.getHierarchyLevel();return r.some((function(t){if(t.children&&t.children.some((function(t){return t.children})))return i=3,!1})),!0===qa(n,"canvasZoom","enabled")&&i>2?{legend:{additionalItems:[{type:ot.ZOOM,name:"Click to zoom"}]}}:null},e.prototype.setZoom=function(t){this.setOptions(this.getZoomOptions(t))},e.prototype.updateHierarchyLevel=function(t){this.set({depth:t})},e.prototype.getHierarchyLevel=function(){return this.get("depth")},e.prototype.hasParentNode=function(){return this.parentNode},e.prototype.setDataGroups=function(){var t=this,e=this.getData(),n=this.getOptions().data.groupMapsTo,r=e.map((function(e){var r=e[n];return t.setChildrenDataGroup(e,r)}));this.set({data:r},{skipUpdate:!0})},e.prototype.setChildrenDataGroup=function(t,e){var n=this;return t.children?L(L({},t),{dataGroupName:e,children:t.children.map((function(t,r){return n.setChildrenDataGroup(t,e)}))}):L(L({},t),{dataGroupName:e})},e.prototype.getTabularDataArray=function(){var t=this,e=this.getDisplayData(),n=[["Child","Parent","Value"]];return e.forEach((function(e){var r=e.value?e.value:0;e.children&&(r+=t.getChildrenDatums(e.children,e.name,n,0)),n.push(["–",e.name,r])})),n},e.prototype.getChildrenDatums=function(t,e,n,r){var i=this;void 0===n&&(n=[]),void 0===r&&(r=0);var o=e;return t.forEach((function(t){var e=t.name,a=0;if(t.children)t.children.length>0&&("number"==typeof t.value&&(r+=t.value),a+=i.getChildrenDatums(t.children,e,n,a),n.push([e,o,a]),r+=a);else{var s=0;"number"==typeof t.value&&(s=t.value,r+=t.value),n.push([t.name,o,s])}})),r},e}($p),dE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new hE(r.services),r.model.setOptions(Ha(Ns.circlePackChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ay(this.model,this.services)];return this.getChartComponents(t)},e}(D_),fE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.getOptions(),n=e.wordCloud,r=n.fontSizeMapsTo,i=n.wordMapsTo,o=e.data.groupMapsTo;return k([[e.tooltip.wordLabel,"Group",e.tooltip.valueLabel]],t.map((function(t){return[t[i],t[o],t[r]]})))},e}($p),pE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new fE(r.services),r.model.setOptions(Ha(Ns.wordCloudChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qy(this.model,this.services),new Mm(this.model,this.services,{skeleton:X.PIE})];return this.getChartComponents(t)},e}(D_),vE=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getDisplayData();return t.sort((function(t,e){return t.source.localeCompare(e.source)})),k([["Source","Target","Value"]],t.map((function(t){return[t.source,t.target,t.value]})))},e}(k_),gE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new vE(r.services),r.model.setOptions(Ha(Ns.alluvialChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Cb(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})},e}(D_),mE=function(t){function e(e){var n=t.call(this,e)||this;n.axisFlavor=lt.HOVERABLE,n._colorScale=void 0,n._domains=[],n._ranges=[],n._matrix={};var r=qa(n.getOptions(),"axes");if(qa(r,"left","scaleType")&&qa(r,"left","scaleType")!==H.LABELS||qa(r,"right","scaleType")&&qa(r,"right","scaleType")!==H.LABELS||qa(r,"top","scaleType")&&qa(r,"top","scaleType")!==H.LABELS||qa(r,"bottom","scaleType")&&qa(r,"bottom","scaleType")!==H.LABELS)throw Error("Heatmap only supports label scaletypes.");return n}return n(e,t),e.prototype.getValueDomain=function(){var t=Gs(this.getDisplayData(),(function(t){return t.value})),e=Iu().domain(t).nice().domain();if(e[0]>0)e[0]=0;else if(0===e[0]&&0===e[1])return[0,1];return e[0]<0&&e[1]>0&&(Math.abs(e[0])>e[1]?e[1]=Math.abs(e[0]):e[0]=-e[1]),e},e.prototype.getFillColor=function(t){return this._colorScale(t)},e.prototype.getUniqueDomain=function(){if(fo(this._domains)){var t=this.getDisplayData(),e=this.services.cartesianScales,n=e.getDomainIdentifier(),r=e.getMainXAxisPosition(),i=e.getCustomDomainValuesByposition(r);if(i)return i;this._domains=Array.from(new Set(t.map((function(t){return t[n]}))))}return this._domains},e.prototype.getUniqueRanges=function(){if(fo(this._ranges)){var t=this.getDisplayData(),e=this.services.cartesianScales,n=e.getRangeIdentifier(),r=e.getMainYAxisPosition(),i=e.getCustomDomainValuesByposition(r);if(i)return i;this._ranges=Array.from(new Set(t.map((function(t){return t[n]}))))}return this._ranges},e.prototype.getMatrix=function(){var t=this;if(fo(this._matrix)){var e=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o={};n.forEach((function(t){o[t]={value:null,index:-1}})),e.forEach((function(e){t._matrix[e]=Ua(o)})),this.getDisplayData().forEach((function(e,n){t._matrix[e[r]][e[i]]={value:e.value,index:n}}))}return this._matrix},e.prototype.setData=function(t){var e=this.sanitize(Ua(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),this._domains=[],this._ranges=[],this._matrix={},e},e.prototype.getMatrixAsArray=function(){var t=this;fo(this._matrix)&&this.getMatrix();var e=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o=[];return e.forEach((function(e){n.forEach((function(n){var a={value:t._matrix[e][n].value,index:t._matrix[e][n].index};a[r]=e,a[i]=n,o.push(a)}))})),o},e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.assignRangeAndDomains(),n=e.primaryDomain,r=e.primaryRange;return k([[n.label,r.label,"Value"]],t.map((function(t){return[null===t[n.identifier]?"–":t[n.identifier],null===t[r.identifier]?"–":t[r.identifier].toLocaleString(),t.value]})))},e.prototype.getColorClassName=function(t){return t.originalClassName+" "+this._colorScale(t.value)},e.prototype.setColorClassNames=function(){var t=this.getOptions(),e=qa(t,"color","gradient","colors"),n=!fo(e),r=qa(t,"color","pairing","option"),i=this.getValueDomain(),o=i[0]<0&&i[1]>0?"diverge":"mono";r<1&&r>4&&"mono"===o?r=1:r<1&&r>2&&"diverge"===o&&(r=1);var a=n?e:[];if(!n)for(var s="diverge"===o?17:11,l=1;l<s+1;l++)a.push("fill-"+o+"-"+r+"-"+l);this._colorScale=function t(){var e,n=0,r=1,i=1,o=[.5],a=[0,1];function s(t){return null!=t&&t<=t?a[Hs(o,t,0,i)]:e}function l(){var t=-1;for(o=new Array(i);++t<i;)o[t]=((t+1)*r-(t-i)*n)/(i+1);return s}return s.domain=function(t){return arguments.length?([n,r]=t,n=+n,r=+r,l()):[n,r]},s.range=function(t){return arguments.length?(i=(a=Array.from(t)).length-1,l()):a.slice()},s.invertExtent=function(t){var e=a.indexOf(t);return e<0?[NaN,NaN]:e<1?[n,o[0]]:e>=i?[o[i-1],r]:[o[e-1],o[e]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return t().domain([n,r]).range(a).unknown(e)},sl.apply(Ru(s),arguments)}().domain(i).range(a)},e}(k_),yE=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new mE(r.services),r.model.setOptions(Ha(Ns.heatmapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=qa(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var i=!!this.model.getOptions().title,o={id:"title",components:[new nm(this.model,this.services)],growth:q.STRETCH},a={id:"toolbar",components:[new A_(this.model,this.services)],growth:q.PREFERRED},s={id:"header",components:[new kb(this.model,this.services,k([o],r?[a]:[]),{direction:W.ROW,alignItems:Z.CENTER})],growth:q.PREFERRED},l={id:"legend",components:[new Wv(this.model,this.services)],growth:q.PREFERRED,renderType:R.SVG},u={id:"graph-frame",components:t,growth:q.STRETCH,renderType:R.SVG},c=!1!==qa(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,h=W.COLUMN_REVERSE,d={id:"spacer",components:[new Db(this.model,this.services,{size:15})],growth:q.PREFERRED},f={id:"full-frame",components:[new kb(this.model,this.services,k(c?[l]:[],c?[d]:[],[u]),{direction:h})],growth:q.STRETCH},p=[];if(i||r){p.push(s);var v={id:"spacer",components:[new Db(this.model,this.services,r?{size:15}:void 0)],growth:q.PREFERRED};p.push(v)}return p.push(f),[new om(this.model,this.services),new Qg(this.model,this.services),new kb(this.model,this.services,p,{direction:W.COLUMN})]},e.prototype.getComponents=function(){var t=[new Pb(this.model,this.services),new Lb(this.model,this.services)];return this.getAxisChartComponents(t)},e}(R_);t.AlluvialChart=gE,t.AreaChart=I_,t.BoxplotChart=H_,t.BubbleChart=G_,t.BulletChart=j_,t.CirclePackChart=dE,t.ComboChart=aE,t.DonutChart=Q_,t.GaugeChart=iE,t.GroupedBarChart=B_,t.HeatmapChart=yE,t.HistogramChart=W_,t.LineChart=q_,t.LollipopChart=Z_,t.MeterChart=tE,t.PieChart=K_,t.RadarChart=nE,t.ScatterChart=Y_,t.SimpleBarChart=N_,t.StackedAreaChart=P_,t.StackedBarChart=U_,t.TreeChart=lE,t.TreemapChart=cE,t.WordCloudChart=pE,t.configurations=Bs,t.interfaces=ct,Object.defineProperty(t,"__esModule",{value:!0})}));
|