@carbon/charts 0.41.92 → 0.41.93

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/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,u,l,c,h,d,f,p,g,v,m,y,b,_,x,w,O,E,T,S=function(){return(S=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 M(){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"}(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"}(u||(u={})),function(t){t.CHANGE="zoom-domain-change"}(l||(l={})),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"}(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"}(_||(_={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(x||(x={})),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"}(E||(E={})),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"}(T||(T={}));var C,A,P,L,D,k,R,I,N,B,V,U,G,H,z,j,F,W,q,Z,Y,X,K,$,Q,J,tt=Object.freeze({__proto__:null,get Chart(){return i},get Modal(){return o},get Model(){return a},get Toolbar(){return s},get ZoomBar(){return u},get ZoomDomain(){return l},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 _},get Treemap(){return x},get Tooltip(){return w},get Threshold(){return O},get Legend(){return E},get CirclePack(){return T}});!function(t){t.HTML="html",t.SVG="svg"}(C||(C={})),function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(A||(A={})),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"}(L||(L={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(D||(D={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(k||(k={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(R||(R={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio"}(I||(I={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(N||(N={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(B||(B={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(V||(V={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(U||(U={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(G||(G={})),function(t){t.CENTER="center"}(H||(H={})),function(t){t.LEFT="left",t.RIGHT="right"}(z||(z={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(j||(j={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(F||(F={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(W||(W={})),function(t){t.SEMI="semi",t.FULL="full"}(q||(q={})),function(t){t.UP="up",t.DOWN="down"}(Z||(Z={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(Y||(Y={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(X||(X={})),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"}(K||(K={})),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"}($||($={})),function(t){t.LEFT="left",t.RIGHT="right"}(Q||(Q={})),function(t){t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom"}(J||(J={}));var et,nt=Object.freeze({__proto__:null,get Roles(){return r},Events:tt,get RenderTypes(){return C},get ChartTheme(){return A},get ColorClassNameTypes(){return P},get AxisPositions(){return L},get ZoomBarTypes(){return D},get TruncationTypes(){return k},get CartesianOrientations(){return R},get ScaleTypes(){return I},get LegendPositions(){return N},get Alignments(){return B},get LegendOrientations(){return V},get LayoutDirection(){return U},get LayoutGrowth(){return G},get LayoutAlignItems(){return H},get CalloutDirections(){return z},get Skeletons(){return j},get TextAnchor(){return F},get DominantBaseline(){return W},get GaugeTypes(){return q},get ArrowDirections(){return Z},get Statuses(){return Y},get TickRotations(){return X},get ChartTypes(){return K},get ToolbarControlTypes(){return $},get AxisTitleOrientations(){return Q},get LegendItemType(){return J}});function rt(t){return+t}function it(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ot={opacity:{unselected:.05,selected:.4}},at={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1},st={duration:1e3,ease:it,zoomLevel:3},ut={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},lt={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},ct={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},ht={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"}},dt={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},ft={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15}},pt={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}},gt={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},vt={default:{size:24}},mt={horizontalOffset:10},yt={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}},bt={height:(et={},et[D.GRAPH_VIEW]=32,et[D.SLIDER_VIEW]=10,et),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},_t=[{type:J.RADIUS,name:"Radius"},{type:J.AREA,name:"Poor area"},{type:J.AREA,name:"Satisfactory area"},{type:J.AREA,name:"Great area"},{type:J.QUARTILE,name:"Quartiles"}],xt="object"==typeof global&&global&&global.Object===Object&&global,wt="object"==typeof self&&self&&self.Object===Object&&self,Ot=xt||wt||Function("return this")(),Et=Ot.Symbol,Tt=Object.prototype,St=Tt.hasOwnProperty,Mt=Tt.toString,Ct=Et?Et.toStringTag:void 0;var At=Object.prototype.toString;var Pt=Et?Et.toStringTag:void 0;function Lt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Pt&&Pt in Object(t)?function(t){var e=St.call(t,Ct),n=t[Ct];try{t[Ct]=void 0;var r=!0}catch(t){}var i=Mt.call(t);return r&&(e?t[Ct]=n:delete t[Ct]),i}(t):function(t){return At.call(t)}(t)}function Dt(t){return null!=t&&"object"==typeof t}function kt(t){return"symbol"==typeof t||Dt(t)&&"[object Symbol]"==Lt(t)}function Rt(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 It=Array.isArray,Nt=Et?Et.prototype:void 0,Bt=Nt?Nt.toString:void 0;function Vt(t){if("string"==typeof t)return t;if(It(t))return Rt(t,Vt)+"";if(kt(t))return Bt?Bt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Ut=/\s/;var Gt=/^\s+/;function Ht(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Ut.test(t.charAt(e)););return e}(t)+1).replace(Gt,""):t}function zt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var jt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Wt=/^0o[0-7]+$/i,qt=parseInt;function Zt(t){if("number"==typeof t)return t;if(kt(t))return NaN;if(zt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=zt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ht(t);var n=Ft.test(t);return n||Wt.test(t)?qt(t.slice(2),n?2:8):jt.test(t)?NaN:+t}function Yt(t){return t}function Xt(t){if(!zt(t))return!1;var e=Lt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Kt,$t=Ot["__core-js_shared__"],Qt=(Kt=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||""))?"Symbol(src)_1."+Kt:"";var Jt=Function.prototype.toString;function te(t){if(null!=t){try{return Jt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var ee=/^\[object .+?Constructor\]$/,ne=Function.prototype,re=Object.prototype,ie=ne.toString,oe=re.hasOwnProperty,ae=RegExp("^"+ie.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function se(t){return!(!zt(t)||(e=t,Qt&&Qt in e))&&(Xt(t)?ae:ee).test(te(t));var e}function ue(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return se(n)?n:void 0}var le=ue(Ot,"WeakMap"),ce=Object.create,he=function(){function t(){}return function(e){if(!zt(e))return{};if(ce)return ce(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function de(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 fe(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var pe=Date.now;var ge=function(){try{var t=ue(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),ve=function(t){var e=0,n=0;return function(){var r=pe(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ge?function(t,e){return ge(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:Yt);function me(t){return t!=t}function ye(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,me,n)}(t,e,0)>-1}var be=/^(?:0|[1-9]\d*)$/;function _e(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&be.test(t))&&t>-1&&t%1==0&&t<e}function xe(t,e,n){"__proto__"==e&&ge?ge(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function we(t,e){return t===e||t!=t&&e!=e}var Oe=Object.prototype.hasOwnProperty;function Ee(t,e,n){var r=t[e];Oe.call(t,e)&&we(r,n)&&(void 0!==n||e in t)||xe(t,e,n)}function Te(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?xe(n,s,u):Ee(n,s,u)}return n}var Se=Math.max;function Me(t,e){return ve(function(t,e,n){return e=Se(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Se(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),de(t,this,s)}}(t,e,Yt),t+"")}function Ce(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Ae(t){return null!=t&&Ce(t.length)&&!Xt(t)}function Pe(t,e,n){if(!zt(n))return!1;var r=typeof e;return!!("number"==r?Ae(n)&&_e(e,n.length):"string"==r&&e in n)&&we(n[e],t)}var Le=Object.prototype;function De(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Le)}function ke(t){return Dt(t)&&"[object Arguments]"==Lt(t)}var Re=Object.prototype,Ie=Re.hasOwnProperty,Ne=Re.propertyIsEnumerable,Be=ke(function(){return arguments}())?ke:function(t){return Dt(t)&&Ie.call(t,"callee")&&!Ne.call(t,"callee")};var Ve="object"==typeof t&&t&&!t.nodeType&&t,Ue=Ve&&"object"==typeof module&&module&&!module.nodeType&&module,Ge=Ue&&Ue.exports===Ve?Ot.Buffer:void 0,He=(Ge?Ge.isBuffer:void 0)||function(){return!1},ze={};function je(t){return function(e){return t(e)}}ze["[object Float32Array]"]=ze["[object Float64Array]"]=ze["[object Int8Array]"]=ze["[object Int16Array]"]=ze["[object Int32Array]"]=ze["[object Uint8Array]"]=ze["[object Uint8ClampedArray]"]=ze["[object Uint16Array]"]=ze["[object Uint32Array]"]=!0,ze["[object Arguments]"]=ze["[object Array]"]=ze["[object ArrayBuffer]"]=ze["[object Boolean]"]=ze["[object DataView]"]=ze["[object Date]"]=ze["[object Error]"]=ze["[object Function]"]=ze["[object Map]"]=ze["[object Number]"]=ze["[object Object]"]=ze["[object RegExp]"]=ze["[object Set]"]=ze["[object String]"]=ze["[object WeakMap]"]=!1;var Fe="object"==typeof t&&t&&!t.nodeType&&t,We=Fe&&"object"==typeof module&&module&&!module.nodeType&&module,qe=We&&We.exports===Fe&&xt.process,Ze=function(){try{var t=We&&We.require&&We.require("util").types;return t||qe&&qe.binding&&qe.binding("util")}catch(t){}}(),Ye=Ze&&Ze.isTypedArray,Xe=Ye?je(Ye):function(t){return Dt(t)&&Ce(t.length)&&!!ze[Lt(t)]},Ke=Object.prototype.hasOwnProperty;function $e(t,e){var n=It(t),r=!n&&Be(t),i=!n&&!r&&He(t),o=!n&&!r&&!i&&Xe(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):[],u=s.length;for(var l in t)!e&&!Ke.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_e(l,u))||s.push(l);return s}function Qe(t,e){return function(n){return t(e(n))}}var Je=Qe(Object.keys,Object),tn=Object.prototype.hasOwnProperty;function en(t){if(!De(t))return Je(t);var e=[];for(var n in Object(t))tn.call(t,n)&&"constructor"!=n&&e.push(n);return e}function nn(t){return Ae(t)?$e(t):en(t)}var rn=Object.prototype.hasOwnProperty;function on(t){if(!zt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=De(t),n=[];for(var r in t)("constructor"!=r||!e&&rn.call(t,r))&&n.push(r);return n}function an(t){return Ae(t)?$e(t,!0):on(t)}var sn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,un=/^\w*$/;function ln(t,e){if(It(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!kt(t))||(un.test(t)||!sn.test(t)||null!=e&&t in Object(e))}var cn=ue(Object,"create");var hn=Object.prototype.hasOwnProperty;var dn=Object.prototype.hasOwnProperty;function fn(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 pn(t,e){for(var n=t.length;n--;)if(we(t[n][0],e))return n;return-1}fn.prototype.clear=function(){this.__data__=cn?cn(null):{},this.size=0},fn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},fn.prototype.get=function(t){var e=this.__data__;if(cn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return hn.call(e,t)?e[t]:void 0},fn.prototype.has=function(t){var e=this.__data__;return cn?void 0!==e[t]:dn.call(e,t)},fn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=cn&&void 0===e?"__lodash_hash_undefined__":e,this};var gn=Array.prototype.splice;function vn(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])}}vn.prototype.clear=function(){this.__data__=[],this.size=0},vn.prototype.delete=function(t){var e=this.__data__,n=pn(e,t);return!(n<0)&&(n==e.length-1?e.pop():gn.call(e,n,1),--this.size,!0)},vn.prototype.get=function(t){var e=this.__data__,n=pn(e,t);return n<0?void 0:e[n][1]},vn.prototype.has=function(t){return pn(this.__data__,t)>-1},vn.prototype.set=function(t,e){var n=this.__data__,r=pn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var mn=ue(Ot,"Map");function yn(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 bn(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])}}bn.prototype.clear=function(){this.size=0,this.__data__={hash:new fn,map:new(mn||vn),string:new fn}},bn.prototype.delete=function(t){var e=yn(this,t).delete(t);return this.size-=e?1:0,e},bn.prototype.get=function(t){return yn(this,t).get(t)},bn.prototype.has=function(t){return yn(this,t).has(t)},bn.prototype.set=function(t,e){var n=yn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function _n(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(_n.Cache||bn),n}_n.Cache=bn;var xn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wn=/\\(\\)?/g,On=function(t){var e=_n(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(xn,(function(t,n,r,i){e.push(r?i.replace(wn,"$1"):n||t)})),e}));function En(t){return null==t?"":Vt(t)}function Tn(t,e){return It(t)?t:ln(t,e)?[t]:On(En(t))}function Sn(t){if("string"==typeof t||kt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Mn(t,e){for(var n=0,r=(e=Tn(e,t)).length;null!=t&&n<r;)t=t[Sn(e[n++])];return n&&n==r?t:void 0}function Cn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var An=Et?Et.isConcatSpreadable:void 0;function Pn(t){return It(t)||Be(t)||!!(An&&t&&t[An])}function Ln(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Pn),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Ln(s,e-1,n,r,i):Cn(i,s):r||(i[i.length]=s)}return i}function Dn(t){return(null==t?0:t.length)?Ln(t,1):[]}var kn=Qe(Object.getPrototypeOf,Object),Rn=Function.prototype,In=Object.prototype,Nn=Rn.toString,Bn=In.hasOwnProperty,Vn=Nn.call(Object);function Un(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 Gn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Hn(t){return Gn.test(t)}var zn="[\\ud800-\\udfff]",jn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Fn="\\ud83c[\\udffb-\\udfff]",Wn="[^\\ud800-\\udfff]",qn="(?:\\ud83c[\\udde6-\\uddff]){2}",Zn="[\\ud800-\\udbff][\\udc00-\\udfff]",Yn="(?:"+jn+"|"+Fn+")"+"?",Xn="[\\ufe0e\\ufe0f]?"+Yn+("(?:\\u200d(?:"+[Wn,qn,Zn].join("|")+")[\\ufe0e\\ufe0f]?"+Yn+")*"),Kn="(?:"+[Wn+jn+"?",jn,qn,Zn,zn].join("|")+")",$n=RegExp(Fn+"(?="+Fn+")|"+Kn+Xn,"g");function Qn(t){return Hn(t)?function(t){return t.match($n)||[]}(t):function(t){return t.split("")}(t)}var Jn,tr=(Jn="toUpperCase",function(t){var e=Hn(t=En(t))?Qn(t):void 0,n=e?e[0]:t.charAt(0),r=e?Un(e,1).join(""):t.slice(1);return n[Jn]()+r});var er=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"}),nr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rr=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var ir=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var or=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var ar="\\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",sr="["+ar+"]",ur="\\d+",lr="[\\u2700-\\u27bf]",cr="[a-z\\xdf-\\xf6\\xf8-\\xff]",hr="[^\\ud800-\\udfff"+ar+ur+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",dr="(?:\\ud83c[\\udde6-\\uddff]){2}",fr="[\\ud800-\\udbff][\\udc00-\\udfff]",pr="[A-Z\\xc0-\\xd6\\xd8-\\xde]",gr="(?:"+cr+"|"+hr+")",vr="(?:"+pr+"|"+hr+")",mr="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",yr="[\\ufe0e\\ufe0f]?"+mr+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",dr,fr].join("|")+")[\\ufe0e\\ufe0f]?"+mr+")*"),br="(?:"+[lr,dr,fr].join("|")+")"+yr,_r=RegExp([pr+"?"+cr+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[sr,pr,"$"].join("|")+")",vr+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[sr,pr+gr,"$"].join("|")+")",pr+"?"+gr+"+(?:['’](?:d|ll|m|re|s|t|ve))?",pr+"+(?:['’](?: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_])",ur,br].join("|"),"g");function xr(t,e,n){return t=En(t),void 0===(e=n?void 0:e)?function(t){return or.test(t)}(t)?function(t){return t.match(_r)||[]}(t):function(t){return t.match(ir)||[]}(t):t.match(e)||[]}var wr=RegExp("['’]","g");function Or(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}(xr(function(t){return(t=En(t))&&t.replace(nr,er).replace(rr,"")}(e).replace(wr,"")),t,"")}}var Er=Or((function(t,e,n){return e=e.toLowerCase(),t+(n?tr(En(e).toLowerCase()):e)}));function Tr(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=Zt(n))==n?n:0),void 0!==e&&(e=(e=Zt(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}(Zt(t),e,n)}function Sr(t){var e=this.__data__=new vn(t);this.size=e.size}Sr.prototype.clear=function(){this.__data__=new vn,this.size=0},Sr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Sr.prototype.get=function(t){return this.__data__.get(t)},Sr.prototype.has=function(t){return this.__data__.has(t)},Sr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!mn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new bn(r)}return n.set(t,e),this.size=n.size,this};var Mr="object"==typeof t&&t&&!t.nodeType&&t,Cr=Mr&&"object"==typeof module&&module&&!module.nodeType&&module,Ar=Cr&&Cr.exports===Mr?Ot.Buffer:void 0,Pr=Ar?Ar.allocUnsafe:void 0;function Lr(t,e){if(e)return t.slice();var n=t.length,r=Pr?Pr(n):new t.constructor(n);return t.copy(r),r}function Dr(){return[]}var kr=Object.prototype.propertyIsEnumerable,Rr=Object.getOwnPropertySymbols,Ir=Rr?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}(Rr(t),(function(e){return kr.call(t,e)})))}:Dr;var Nr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Cn(e,Ir(t)),t=kn(t);return e}:Dr;function Br(t,e,n){var r=e(t);return It(t)?r:Cn(r,n(t))}function Vr(t){return Br(t,nn,Ir)}function Ur(t){return Br(t,an,Nr)}var Gr=ue(Ot,"DataView"),Hr=ue(Ot,"Promise"),zr=ue(Ot,"Set"),jr=te(Gr),Fr=te(mn),Wr=te(Hr),qr=te(zr),Zr=te(le),Yr=Lt;(Gr&&"[object DataView]"!=Yr(new Gr(new ArrayBuffer(1)))||mn&&"[object Map]"!=Yr(new mn)||Hr&&"[object Promise]"!=Yr(Hr.resolve())||zr&&"[object Set]"!=Yr(new zr)||le&&"[object WeakMap]"!=Yr(new le))&&(Yr=function(t){var e=Lt(t),n="[object Object]"==e?t.constructor:void 0,r=n?te(n):"";if(r)switch(r){case jr:return"[object DataView]";case Fr:return"[object Map]";case Wr:return"[object Promise]";case qr:return"[object Set]";case Zr:return"[object WeakMap]"}return e});var Xr=Yr,Kr=Object.prototype.hasOwnProperty;var $r=Ot.Uint8Array;function Qr(t){var e=new t.constructor(t.byteLength);return new $r(e).set(new $r(t)),e}var Jr=/\w*$/;var ti=Et?Et.prototype:void 0,ei=ti?ti.valueOf:void 0;function ni(t,e){var n=e?Qr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ri(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return Qr(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?Qr(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 ni(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,Jr.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,ei?Object(ei.call(r)):{}}}function ii(t){return"function"!=typeof t.constructor||De(t)?{}:he(kn(t))}var oi=Ze&&Ze.isMap,ai=oi?je(oi):function(t){return Dt(t)&&"[object Map]"==Xr(t)};var si=Ze&&Ze.isSet,ui=si?je(si):function(t){return Dt(t)&&"[object Set]"==Xr(t)},li={};function ci(t,e,n,r,i,o){var a,s=1&e,u=2&e,l=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!zt(t))return t;var c=It(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Kr.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return fe(t,a)}else{var h=Xr(t),d="[object Function]"==h||"[object GeneratorFunction]"==h;if(He(t))return Lr(t,s);if("[object Object]"==h||"[object Arguments]"==h||d&&!i){if(a=u||d?{}:ii(t),!s)return u?function(t,e){return Te(t,Nr(t),e)}(t,function(t,e){return t&&Te(e,an(e),t)}(a,t)):function(t,e){return Te(t,Ir(t),e)}(t,function(t,e){return t&&Te(e,nn(e),t)}(a,t))}else{if(!li[h])return i?t:{};a=ri(t,h,s)}}o||(o=new Sr);var f=o.get(t);if(f)return f;o.set(t,a),ui(t)?t.forEach((function(r){a.add(ci(r,e,n,r,t,o))})):ai(t)&&t.forEach((function(r,i){a.set(i,ci(r,e,n,i,t,o))}));var p=c?void 0:(l?u?Ur:Vr:u?an:nn)(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]),Ee(a,i,ci(r,e,n,i,t,o))})),a}li["[object Arguments]"]=li["[object Array]"]=li["[object ArrayBuffer]"]=li["[object DataView]"]=li["[object Boolean]"]=li["[object Date]"]=li["[object Float32Array]"]=li["[object Float64Array]"]=li["[object Int8Array]"]=li["[object Int16Array]"]=li["[object Int32Array]"]=li["[object Map]"]=li["[object Number]"]=li["[object Object]"]=li["[object RegExp]"]=li["[object Set]"]=li["[object String]"]=li["[object Symbol]"]=li["[object Uint8Array]"]=li["[object Uint8ClampedArray]"]=li["[object Uint16Array]"]=li["[object Uint32Array]"]=!0,li["[object Error]"]=li["[object Function]"]=li["[object WeakMap]"]=!1;function hi(t){return ci(t,5)}function di(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new bn;++e<n;)this.add(t[e])}function fi(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 pi(t,e){return t.has(e)}di.prototype.add=di.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},di.prototype.has=function(t){return this.__data__.has(t)};function gi(t,e,n,r,i,o){var a=1&n,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var h=-1,d=!0,f=2&n?new di: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(!fi(e,(function(t,e){if(!pi(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 vi(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function mi(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var yi=Et?Et.prototype:void 0,bi=yi?yi.valueOf:void 0;var _i=Object.prototype.hasOwnProperty;var xi=Object.prototype.hasOwnProperty;function wi(t,e,n,r,i,o){var a=It(t),s=It(e),u=a?"[object Array]":Xr(t),l=s?"[object Array]":Xr(e),c="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),d=u==l;if(d&&He(t)){if(!He(e))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new Sr),a||Xe(t)?gi(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 $r(t),new $r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return we(+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=vi;case"[object Set]":var u=1&r;if(s||(s=mi),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=gi(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(bi)return bi.call(t)==bi.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var f=c&&xi.call(t,"__wrapped__"),p=h&&xi.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,v=p?e.value():e;return o||(o=new Sr),i(g,v,n,r,o)}}return!!d&&(o||(o=new Sr),function(t,e,n,r,i,o){var a=1&n,s=Vr(t),u=s.length;if(u!=Vr(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:_i.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;++l<u;){var g=t[c=s[l]],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 Oi(t,e,n,r,i){return t===e||(null==t||null==e||!Dt(t)&&!Dt(e)?t!=t&&e!=e:wi(t,e,n,r,Oi,i))}function Ei(t){return t==t&&!zt(t)}function Ti(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Si(t){var e=function(t){for(var e=nn(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Ei(i)]}return e}(t);return 1==e.length&&e[0][2]?Ti(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 u=(s=n[i])[0],l=t[u],c=s[1];if(a&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new Sr;if(r)var d=r(l,c,u,t,e,h);if(!(void 0===d?Oi(c,l,3,r,h):d))return!1}}return!0}(n,t,e)}}function Mi(t,e){return null!=t&&e in Object(t)}function Ci(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Tn(e,t)).length,o=!1;++r<i;){var a=Sn(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ce(i)&&_e(a,i)&&(It(t)||Be(t))}(t,e,Mi)}function Ai(t,e){return ln(t)&&Ei(e)?Ti(Sn(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Mn(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Ci(n,t):Oi(e,r,3)}}function Pi(t){return ln(t)?(e=Sn(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Mn(e,t)}}(t);var e}function Li(t){return"function"==typeof t?t:null==t?Yt:"object"==typeof t?It(t)?Ai(t[0],t[1]):Si(t):Pi(t)}var Di,ki=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Di?a:++r];if(!1===e(i[s],s,i))break}return t};var Ri=function(t,e){return function(n,r){if(null==n)return n;if(!Ae(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&&ki(t,e,nn)})),Ii=function(){return Ot.Date.now()},Ni=Math.max,Bi=Math.min;function Vi(t,e,n){var r,i,o,a,s,u,l=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,l=e,a=t.apply(o,n)}function p(t){return l=t,s=setTimeout(v,e),c?f(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=o}function v(){var t=Ii();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Bi(n,o-(t-l)):n}(t))}function m(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function y(){var t=Ii(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(v,e),f(u)}return void 0===s&&(s=setTimeout(v,e)),a}return e=Zt(e)||0,zt(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Ni(Zt(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(Ii())},y}function Ui(t,e,n){(void 0===n||we(t[e],n))&&(void 0!==n||e in t)||xe(t,e,n)}function Gi(t){return Dt(t)&&Ae(t)}function Hi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function zi(t,e,n,r,i,o,a){var s=Hi(t,n),u=Hi(e,n),l=a.get(u);if(l)Ui(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,d=void 0===h;if(d){var f=It(u),p=!f&&He(u),g=!f&&!p&&Xe(u);h=u,f||p||g?It(s)?h=s:Gi(s)?h=fe(s):p?(d=!1,h=Lr(u,!0)):g?(d=!1,h=ni(u,!0)):h=[]:function(t){if(!Dt(t)||"[object Object]"!=Lt(t))return!1;var e=kn(t);if(null===e)return!0;var n=Bn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nn.call(n)==Vn}(u)||Be(u)?(h=s,Be(s)?h=Te(c=s,an(c)):zt(s)&&!Xt(s)||(h=ii(u))):d=!1}d&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),Ui(t,n,h)}}function ji(t,e,n,r,i){t!==e&&ki(e,(function(o,a){if(i||(i=new Sr),zt(o))zi(t,e,a,n,ji,r,i);else{var s=r?r(Hi(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Ui(t,a,s)}}),an)}function Fi(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 Wi(t,e){var n=-1,r=Ae(t)?Array(t.length):[];return Ri(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function qi(t,e){return Ln(function(t,e){return(It(t)?Rt:Wi)(t,Li(e))}(t,e),1/0)}function Zi(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 Yi=Object.prototype.hasOwnProperty;function Xi(t){if(null==t)return!0;if(Ae(t)&&(It(t)||"string"==typeof t||"function"==typeof t.splice||He(t)||Xe(t)||Be(t)))return!t.length;var e=Xr(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(De(t))return!en(t).length;for(var n in t)if(Yi.call(t,n))return!1;return!0}function Ki(t,e){return Oi(t,e)}var $i,Qi=Or((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ji=($i=function(t,e,n){ji(t,e,n)},Me((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=$i.length>3&&"function"==typeof i?(r--,i):void 0,o&&Pe(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&$i(t,a,n,i)}return t})));function to(t,e){var n;return Ri(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function eo(t,e,n){var r=It(t)?fi:to;return n&&Pe(t,e,n)&&(e=void 0),r(t,Li(e))}var no=zr&&1/mi(new zr([,-0]))[1]==1/0?function(t){return new zr(t)}:function(){};function ro(t,e,n){var r=-1,i=ye,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Fi;else if(o>=200){var l=e?null:no(t);if(l)return mi(l);a=!1,i=pi,u=new di}else u=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=u.length;d--;)if(u[d]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}var io=Me((function(t){var e=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}(t);return Gi(e)&&(e=void 0),ro(Ln(t,1,Gi,!0),Li(e))}));function oo(t){return t&&t.length?ro(t):[]}var ao="http://www.w3.org/1999/xhtml",so={svg:"http://www.w3.org/2000/svg",xhtml:ao,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function uo(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),so.hasOwnProperty(e)?{space:so[e],local:t}:t}function lo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ao&&e.documentElement.namespaceURI===ao?e.createElement(t):e.createElementNS(n,t)}}function co(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ho(t){var e=uo(t);return(e.local?co:lo)(e)}function fo(){}function po(t){return null==t?fo:function(){return this.querySelector(t)}}function go(){return[]}function vo(t){return null==t?go:function(){return this.querySelectorAll(t)}}function mo(t){return function(){return this.matches(t)}}function yo(t){return new Array(t.length)}function bo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}bo.prototype={constructor:bo,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)}};function _o(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new bo(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function xo(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(f[s]=l="$"+a.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<d;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):n[s]=new bo(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[f[s]]===u&&(i[s]=u)}function wo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Oo(t){return function(){this.removeAttribute(t)}}function Eo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function To(t,e){return function(){this.setAttribute(t,e)}}function So(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mo(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Co(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 Ao(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Po(t){return function(){this.style.removeProperty(t)}}function Lo(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Do(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ko(t,e){return t.style.getPropertyValue(e)||Ao(t).getComputedStyle(t,null).getPropertyValue(e)}function Ro(t){return function(){delete this[t]}}function Io(t,e){return function(){this[t]=e}}function No(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Bo(t){return t.trim().split(/^|\s+/)}function Vo(t){return t.classList||new Uo(t)}function Uo(t){this._node=t,this._names=Bo(t.getAttribute("class")||"")}function Go(t,e){for(var n=Vo(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ho(t,e){for(var n=Vo(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function zo(t){return function(){Go(this,t)}}function jo(t){return function(){Ho(this,t)}}function Fo(t,e){return function(){(e.apply(this,arguments)?Go:Ho)(this,t)}}function Wo(){this.textContent=""}function qo(t){return function(){this.textContent=t}}function Zo(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Yo(){this.innerHTML=""}function Xo(t){return function(){this.innerHTML=t}}function Ko(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function $o(){this.nextSibling&&this.parentNode.appendChild(this)}function Qo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Jo(){return null}function ta(){var t=this.parentNode;t&&t.removeChild(this)}function ea(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function na(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Uo.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={},ia=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ra={mouseenter:"mouseover",mouseleave:"mouseout"}));function oa(t,e,n){return t=aa(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function aa(t,e,n){return function(r){var i=ia;ia=r;try{t.call(this,this.__data__,e,n)}finally{ia=i}}}function sa(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 ua(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.capture);++i?e.length=i:delete this.__on}}}function la(t,e,n){var r=ra.hasOwnProperty(t.type)?oa:aa;return function(i,o,a){var s,u=this.__on,l=r(e,o,a);if(u)for(var c=0,h=u.length;c<h;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function ca(t,e,n){var r=Ao(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 ha(t,e){return function(){return ca(this,t,e)}}function da(t,e){return function(){return ca(this,t,e.apply(this,arguments))}}var fa,pa=[null];function ga(t,e){this._groups=t,this._parents=e}function va(){return new ga([[document.documentElement]],pa)}function ma(t){return"string"==typeof t?new ga([[document.querySelector(t)]],[document.documentElement]):new ga([[t]],pa)}function ya(){for(var t,e=ia;t=e.sourceEvent;)e=t;return e}function ba(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function _a(t){var e=ya();return e.changedTouches&&(e=e.changedTouches[0]),ba(t,e)}function xa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wa(t,e){return t(e={exports:{}},e.exports),e.exports}ga.prototype=va.prototype={constructor:ga,select:function(t){"function"!=typeof t&&(t=po(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],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new ga(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=vo(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new ga(r,i)},filter:function(t){"function"!=typeof t&&(t=mo(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,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new ga(r,this._parents)},data:function(t,e){if(!t)return f=new Array(this.size()),l=-1,this.each((function(t){f[++l]=t})),f;var n=e?xo:_o,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],d=h.length,f=t.call(c,c&&c.__data__,l,r),p=f.length,g=s[l]=new Array(p),v=a[l]=new Array(p);n(c,h,g,v,u[l]=new Array(d),f,e);for(var m,y,b=0,_=0;b<p;++b)if(m=g[b]){for(b>=_&&(_=b+1);!(y=v[_])&&++_<p;);m._next=y||null}}return(a=new ga(a,r))._enter=s,a._exit=u,a},enter:function(){return new ga(this._enter||this._groups.map(yo),this._parents)},exit:function(){return new ga(this._exit||this._groups.map(yo),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){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 u,l=e[s],c=n[s],h=l.length,d=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(d[f]=u);for(;s<r;++s)a[s]=e[s];return new ga(a,this._parents)},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=wo);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new ga(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},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(){var t=0;return this.each((function(){++t})),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=uo(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?Eo:Oo:"function"==typeof e?n.local?Co:Mo:n.local?So:To)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Po:"function"==typeof e?Do:Lo)(t,e,null==n?"":n)):ko(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ro:"function"==typeof e?No:Io)(t,e)):this.node()[t]},classed:function(t,e){var n=Bo(t+"");if(arguments.length<2){for(var r=Vo(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Fo:e?zo:jo)(n,e))},text:function(t){return arguments.length?this.each(null==t?Wo:("function"==typeof t?Zo:qo)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Yo:("function"==typeof t?Ko:Xo)(t)):this.node().innerHTML},raise:function(){return this.each($o)},lower:function(){return this.each(Qo)},append:function(t){var e="function"==typeof t?t:ho(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ho(t),r=null==e?Jo:"function"==typeof e?e:po(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ta)},clone:function(t){return this.select(t?na:ea)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=sa(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?la:ua,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?da:ha)(t,e))}},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=_t.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=Vi,t.clone=hi,t.merge=Ji,t.unionBy=io,t.removeArrayDuplicates=oo,t.clamp=Tr,t.flatten=Dn,t.camelCase=Er,t.isEmpty=Xi,t.isEqual=Ki,t.flatMapDeep=qi,t.kebabCase=Qi,t.fromPairs=Zi,t.some=eo,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,o=arguments;i.mousePosition=_a(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,o)}),e)}},t.mergeDefaultChartOptions=function(n,r){n=t.clone(n);var i=Object.keys(r.axes||{});for(var o in 0===i.length&&delete n.axes,n.axes)if(i.includes(o)){var a=r.axes[o];(a.primary||a.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 s=a.mapsTo;if(null==s){var u=a.scaleType;null==u?a.mapsTo="value":u===I.TIME?a.mapsTo="date":u===I.LABELS&&(a.mapsTo="key")}}else delete n.axes[o];return e(n,r),t.merge(n,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){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n%1!=0?parseFloat(n.toFixed(1)):n},t.truncateLabel=function(t,e,n){return n>t.length?t:e===k.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===k.FRONT_LINE?"..."+t.substr(-n):e===k.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===R.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===R.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(fa||(fa={}));var Oa=wa((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}));xa(Oa);var Ea=wa((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}));xa(Ea);var Ta=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ea)&&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}));xa(Ta);var Sa=wa((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}));xa(Sa);var Ma=wa((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,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));xa(Ma);var Ca=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ma)&&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}));xa(Ca);var Aa=wa((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 u=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(a.length)}}},t.exports=e.default}));xa(Aa);var Pa=wa((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 u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[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)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}},t.exports=e.default}));xa(Pa);var La=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(Aa),r=i(Pa);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}));xa(La);var Da=xa(wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Oa),r=s(Ta),i=s(Sa),o=s(Ca),a=s(La);function s(t){return t&&t.__esModule?t:{default:t}}var u={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=u,t.exports=e.default}))),ka={type:k.END_LINE,threshold:16,numCharacter:14},Ra={enabled:!0,position:N.BOTTOM,clickable:!0,truncation:ka,alignment:B.LEFT,order:null,additionalItems:[]},Ia={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},Na={enabled:!0},Ba={enabled:!0,showTotal:!0,truncation:ka,groupLabel:"Group"},Va={top:{visible:!0,includeZero:!0,truncation:ka},bottom:{visible:!0,includeZero:!0,truncation:ka},left:{visible:!0,includeZero:!0,truncation:ka},right:{visible:!0,includeZero:!0,truncation:ka}},Ua={addSpaceOnEdges:1,showDayName:!1,localeObject:Da,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"}}},Ga="undefined"!=typeof document&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),Ha={width:null,height:null,resizable:!0,tooltip:Ba,legend:Ra,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:M([{type:$.SHOW_AS_DATATABLE}],Ga?[{type:$.MAKE_FULLSCREEN}]:[],[{type:$.EXPORT_CSV},{type:$.EXPORT_PNG},{type:$.EXPORT_JPG}])}},za=fa.merge({},Ha,{axes:Va,timeScale:Ua,grid:Ia,ruler:Na,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:D.GRAPH_VIEW}}}),ja=fa.merge({},za,{bars:{maxWidth:16},timeScale:fa.merge(Ua,{addSpaceOnEdges:1})}),Fa=fa.merge({},ja,{}),Wa=fa.merge({},ja,{}),qa=fa.merge({},ja,{bars:fa.merge({},ja.bars,{dividerSize:1.5})}),Za=fa.merge({},ja,{}),Ya=fa.merge({},za,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Xa=Ya,Ka=fa.merge({},Ya,{points:{radius:3,filled:!1,enabled:!0}}),$a=fa.merge({},Ka,{timeScale:fa.merge(Ua,{addSpaceOnEdges:0})}),Qa=$a,Ja=fa.merge({},za,{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:J.RADIUS,name:"Radius"}]}}),ts=fa.merge({},za,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:J.AREA,name:"Poor area"},{type:J.AREA,name:"Satisfactory area"},{type:J.AREA,name:"Great area"},{type:J.QUARTILE,name:"Quartiles"}]}}),es=fa.merge({},Ha,{tooltip:fa.merge({},Ba,{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"}}),ns=fa.merge({},Ha,{pie:{labels:{formatter:null,enabled:!0},alignment:B.LEFT,sortFunction:null}}),rs=fa.merge({},Ha,{legend:{enabled:!1},gauge:{type:q.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:B.LEFT}}),is={chart:Ha,axisChart:za,simpleBarChart:Fa,groupedBarChart:Wa,stackedBarChart:qa,boxplotChart:Za,bubbleChart:Ja,bulletChart:ts,lineChart:Ka,areaChart:$a,stackedAreaChart:Qa,scatterChart:Ya,lollipopChart:Xa,pieChart:ns,donutChart:fa.merge({},ns,{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:B.LEFT}}),meterChart:fa.merge({},Ha,{legend:{enabled:!1},meter:{height:8,statusBar:{percentageIndicator:{enabled:!0}}}}),radarChart:fa.merge({},Ha,{radar:{axes:{angle:"key",value:"value"},alignment:B.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:rs,comboChart:fa.merge({},ja,{comboChartTypes:[]}),treemapChart:fa.merge({},Ha,{data:fa.merge(Ha.data,{groupMapsTo:"name"})}),circlePackChart:fa.merge({},Ha,ut,{data:fa.merge(Ha.data,{groupMapsTo:"name"})}),wordCloudChart:es},os=Object.freeze({__proto__:null,grid:Ia,ruler:Na,baseTooltip:Ba,timeScale:Ua,options:is,area:ot,axis:at,canvasZoomSettings:st,circlePack:ut,color:lt,boxplot:ct,legend:ht,lines:dt,meter:ft,pie:pt,radar:gt,spacers:vt,tooltips:mt,transitions:yt,toolbar:{buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},zoomBar:bt,defaultLegendAdditionalItems:_t});function as(){}function ss(t,e){var n=new as;if(t instanceof as)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function us(){}as.prototype=ss.prototype={constructor:as,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var ls=ss.prototype;function cs(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function hs(t){var e;return 1===t.length&&(e=t,t=function(t,n){return cs(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}us.prototype=function(t,e){var n=new us;if(t instanceof us)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:us,has:ls.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ls.remove,clear:ls.clear,values:ls.keys,size:ls.size,empty:ls.empty,each:ls.each};var ds=hs(cs).right;function fs(t){return null===t?NaN:+t}function ps(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function gs(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}var vs=Math.sqrt(50),ms=Math.sqrt(10),ys=Math.sqrt(2);function bs(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)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-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>=vs?10:o>=ms?5:o>=ys?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=vs?10:o>=ms?5:o>=ys?2:1)}function xs(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>=vs?i*=10:o>=ms?i*=5:o>=ys&&(i*=2),e<t?-i:i}function ws(t,e,n){if(null==n&&(n=fs),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}}function Os(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r}function Es(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}function Ts(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}function Ss(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Ms=Array.prototype,Cs=Ms.map,As=Ms.slice,Ps={name:"implicit"};function Ls(){var t=ss(),e=[],n=[],r=Ps;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Ps)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=ss();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=As.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ls(e,n).unknown(r)},Ss.apply(i,arguments),i}function Ds(){var t,e,n=Ls().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],h=o[c-0],d=o[1-c];t=(d-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(d-h-t*(n-s))*l,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var f=gs(n).map((function(e){return h+t*e}));return i(c?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),c()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,c()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),c()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),c()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,c()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},n.copy=function(){return Ds(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},Ss.apply(c(),arguments)}function ks(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Rs(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Is(){}var Ns="\\s*([+-]?\\d+)\\s*",Bs="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vs="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Us=/^#([0-9a-f]{3,8})$/,Gs=new RegExp("^rgb\\("+[Ns,Ns,Ns]+"\\)$"),Hs=new RegExp("^rgb\\("+[Vs,Vs,Vs]+"\\)$"),zs=new RegExp("^rgba\\("+[Ns,Ns,Ns,Bs]+"\\)$"),js=new RegExp("^rgba\\("+[Vs,Vs,Vs,Bs]+"\\)$"),Fs=new RegExp("^hsl\\("+[Bs,Vs,Vs]+"\\)$"),Ws=new RegExp("^hsla\\("+[Bs,Vs,Vs,Bs]+"\\)$"),qs={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 Zs(){return this.rgb().formatHex()}function Ys(){return this.rgb().formatRgb()}function Xs(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Us.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ks(e):3===n?new tu(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new tu(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new tu(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=Gs.exec(t))?new tu(e[1],e[2],e[3],1):(e=Hs.exec(t))?new tu(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zs.exec(t))?$s(e[1],e[2],e[3],e[4]):(e=js.exec(t))?$s(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Fs.exec(t))?iu(e[1],e[2]/100,e[3]/100,1):(e=Ws.exec(t))?iu(e[1],e[2]/100,e[3]/100,e[4]):qs.hasOwnProperty(t)?Ks(qs[t]):"transparent"===t?new tu(NaN,NaN,NaN,0):null}function Ks(t){return new tu(t>>16&255,t>>8&255,255&t,1)}function $s(t,e,n,r){return r<=0&&(t=e=n=NaN),new tu(t,e,n,r)}function Qs(t){return t instanceof Is||(t=Xs(t)),t?new tu((t=t.rgb()).r,t.g,t.b,t.opacity):new tu}function Js(t,e,n,r){return 1===arguments.length?Qs(t):new tu(t,e,n,null==r?1:r)}function tu(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function eu(){return"#"+ru(this.r)+ru(this.g)+ru(this.b)}function nu(){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 ru(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function iu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new su(t,e,n,r)}function ou(t){if(t instanceof su)return new su(t.h,t.s,t.l,t.opacity);if(t instanceof Is||(t=Xs(t)),!t)return new su;if(t instanceof su)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,u=(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/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new su(a,s,u,t.opacity)}function au(t,e,n,r){return 1===arguments.length?ou(t):new su(t,e,n,null==r?1:r)}function su(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function uu(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function lu(t){return function(){return t}}function cu(t){return 1==(t=+t)?hu: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):lu(isNaN(e)?n:e)}}function hu(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):lu(isNaN(t)?e:t)}ks(Is,Xs,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Zs,formatHex:Zs,formatHsl:function(){return ou(this).formatHsl()},formatRgb:Ys,toString:Ys}),ks(tu,Js,Rs(Is,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new tu(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new tu(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:eu,formatHex:eu,formatRgb:nu,toString:nu})),ks(su,au,Rs(Is,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new su(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new su(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 tu(uu(t>=240?t-240:t+120,i,r),uu(t,i,r),uu(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 du=function t(e){var n=cu(e);function r(t,e){var r=n((t=Js(t)).r,(e=Js(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=hu(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 fu(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 pu(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]=xu(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 gu(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function vu(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function mu(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]=xu(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var yu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bu=new RegExp(yu.source,"g");function _u(t,e){var n,r,i,o=yu.lastIndex=bu.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=yu.exec(t))&&(r=bu.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,u.push({i:a,x:vu(n,r)})),o=bu.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function xu(t,e){var n,r=typeof e;return null==e||"boolean"===r?lu(e):("number"===r?vu:"string"===r?(n=Xs(e))?(e=n,du):_u:e instanceof Xs?du:e instanceof Date?gu:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?fu:Array.isArray(e)?pu:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?mu:vu)(t,e)}function wu(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ou,Eu,Tu,Su,Mu=180/Math.PI,Cu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Au(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Mu,skewX:Math.atan(u)*Mu,scaleX:a,scaleY:s}}function Pu(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:vu(t,i)},{i:u-2,x:vu(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),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:vu(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:vu(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),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:vu(t,n)},{i:s-2,x:vu(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Lu=Pu((function(t){return"none"===t?Cu:(Ou||(Ou=document.createElement("DIV"),Eu=document.documentElement,Tu=document.defaultView),Ou.style.transform=t,t=Tu.getComputedStyle(Eu.appendChild(Ou),null).getPropertyValue("transform"),Eu.removeChild(Ou),Au(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Du=Pu((function(t){return null==t?Cu:(Su||(Su=document.createElementNS("http://www.w3.org/2000/svg","g")),Su.setAttribute("transform",t),(t=Su.transform.baseVal.consolidate())?Au((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Cu)}),", ",")",")");function ku(t){return+t}var Ru=[0,1];function Iu(t){return t}function Nu(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Bu(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Vu(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Nu(i,r),o=n(a,o)):(r=Nu(r,i),o=n(o,a)),function(t){return o(r(t))}}function Uu(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]=Nu(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=ds(t,e,1,r)-1;return o[n](i[n](e))}}function Gu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Hu(){var t,e,n,r,i,o,a=Ru,s=Ru,u=xu,l=Iu;function c(){return r=Math.min(a.length,s.length)>2?Uu:Vu,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),vu)))(n)))},h.domain=function(t){return arguments.length?(a=Cs.call(t,ku),l===Iu||(l=Bu(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=As.call(t),c()):s.slice()},h.rangeRound=function(t){return s=As.call(t),u=wu,c()},h.clamp=function(t){return arguments.length?(l=t?Bu(a):Iu,h):l!==Iu},h.interpolate=function(t){return arguments.length?(u=t,c()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function zu(t,e){return Hu()(t,e)}function ju(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 Fu(t){return(t=ju(Math.abs(t)))?t[1]:NaN}var Wu,qu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zu(t){if(!(e=qu.exec(t)))throw new Error("invalid format: "+t);var e;return new Yu({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 Yu(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 Xu(t,e){var n=ju(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")}Zu.prototype=Yu.prototype,Yu.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 Ku={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Xu(100*t,e)},r:Xu,s:function(t,e){var n=ju(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Wu=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")+ju(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function $u(t){return t}var Qu,Ju,tl,el=Array.prototype.map,nl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rl(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?$u:(e=el.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=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?$u:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(el.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Zu(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"):Ku[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():"",_="$"===d?o:/[%p]/.test(y)?u:"",x=Ku[y],w=/[defgprs%]/.test(y);function O(t){var i,o,u,d=b,O=_;if("c"===y)O=x(t)+O,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?c:x(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)),E&&0==+t&&(E=!1),d=(E?"("===h?h:l:"-"===h||"("===h?"":h)+d,O=("s"===y?nl[8+Wu/3]:"")+O+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){O=(46===u?a+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!f&&(t=r(t,1/0));var T=d.length+t.length+O.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&f&&(t=r(S+t,S.length?p-O.length:1/0),S=""),n){case"<":t=d+t+O+S;break;case"=":t=d+S+t+O;break;case"^":t=S.slice(0,T=S.length>>1)+d+t+O+S.slice(T);break;default:t=S+d+t+O}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)),O.toString=function(){return t+""},O}return{format:h,formatPrefix:function(t,e){var n=h(((t=Zu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Fu(e)/3))),i=Math.pow(10,-r),o=nl[8+r/3];return function(t){return n(i*t)+o}}}}function il(t,e,n,r){var i,o=xs(t,e,n);switch((r=Zu(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(Fu(e)/3)))-Fu(Math.abs(t)))}(o,a))||(r.precision=i),tl(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,Fu(e)-Fu(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,-Fu(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Ju(r)}function ol(t){var e=t.domain;return t.ticks=function(t){var n=e();return bs(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return il(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=_s(s,u,n))>0?r=_s(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=_s(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function al(){var t=zu(Iu,Iu);return t.copy=function(){return Gu(t,al())},Ss.apply(t,arguments),ol(t)}function sl(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 ul(t){return Math.log(t)}function ll(t){return Math.exp(t)}function cl(t){return-Math.log(-t)}function hl(t){return-Math.exp(-t)}function dl(t){return isFinite(t)?+("1e"+t):t<0?0:t}function fl(t){return function(e){return-t(-e)}}function pl(t){var e,n,r=t(ul,ll),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?dl:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=fl(e),n=fl(n),t(cl,hl)):t(ul,ll),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],u=a[a.length-1];(r=u<s)&&(d=s,s=u,u=d);var l,c,h,d=e(s),f=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&f-d<p){if(d=Math.round(d)-1,f=Math.round(f)+1,s>0){for(;d<f;++d)for(c=1,l=n(d);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;d<f;++d)for(c=o-1,l=n(d);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=bs(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=Ju(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(sl(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Qu=rl({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Ju=Qu.format,tl=Qu.formatPrefix;var gl=new Date,vl=new Date;function ml(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 ml((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 gl.setTime(+e),vl.setTime(+r),t(gl),t(vl),Math.floor(n(gl,vl))},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 yl=ml((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));yl.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ml((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):yl:null};var bl=ml((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()})),_l=ml((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()})),xl=ml((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()})),wl=ml((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}));function Ol(t){return ml((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 El=Ol(0),Tl=Ol(1),Sl=(Ol(2),Ol(3),Ol(4)),Ml=(Ol(5),Ol(6),ml((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()}))),Cl=ml((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()}));Cl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ml((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 Al=ml((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 Pl(t){return ml((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 Ll=Pl(0),Dl=Pl(1),kl=(Pl(2),Pl(3),Pl(4)),Rl=(Pl(5),Pl(6),ml((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()})));function Il(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 Nl(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 Bl(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Rl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ml((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};var Vl,Ul,Gl={"-":"",_:" ",0:"0"},Hl=/^\s*\d+/,zl=/^%/,jl=/[\\^$*+?|[\]().{}]/g;function Fl(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 Wl(t){return t.replace(jl,"\\$&")}function ql(t){return new RegExp("^(?:"+t.map(Wl).join("|")+")","i")}function Zl(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Yl(t,e,n){var r=Hl.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Xl(t,e,n){var r=Hl.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Kl(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function $l(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ql(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Jl(t,e,n){var r=Hl.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function tc(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ec(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 nc(t,e,n){var r=Hl.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=Hl.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=Hl.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function oc(t,e,n){var r=Hl.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ac(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function sc(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function uc(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function lc(t,e,n){var r=Hl.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function cc(t,e,n){var r=Hl.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function hc(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function dc(t,e,n){var r=Hl.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function fc(t,e,n){var r=Hl.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function pc(t,e){return Fl(t.getDate(),e,2)}function gc(t,e){return Fl(t.getHours(),e,2)}function vc(t,e){return Fl(t.getHours()%12||12,e,2)}function mc(t,e){return Fl(1+wl.count(Cl(t),t),e,3)}function yc(t,e){return Fl(t.getMilliseconds(),e,3)}function bc(t,e){return yc(t,e)+"000"}function _c(t,e){return Fl(t.getMonth()+1,e,2)}function xc(t,e){return Fl(t.getMinutes(),e,2)}function wc(t,e){return Fl(t.getSeconds(),e,2)}function Oc(t){var e=t.getDay();return 0===e?7:e}function Ec(t,e){return Fl(El.count(Cl(t)-1,t),e,2)}function Tc(t,e){var n=t.getDay();return t=n>=4||0===n?Sl(t):Sl.ceil(t),Fl(Sl.count(Cl(t),t)+(4===Cl(t).getDay()),e,2)}function Sc(t){return t.getDay()}function Mc(t,e){return Fl(Tl.count(Cl(t)-1,t),e,2)}function Cc(t,e){return Fl(t.getFullYear()%100,e,2)}function Ac(t,e){return Fl(t.getFullYear()%1e4,e,4)}function Pc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Fl(e/60|0,"0",2)+Fl(e%60,"0",2)}function Lc(t,e){return Fl(t.getUTCDate(),e,2)}function Dc(t,e){return Fl(t.getUTCHours(),e,2)}function kc(t,e){return Fl(t.getUTCHours()%12||12,e,2)}function Rc(t,e){return Fl(1+Al.count(Rl(t),t),e,3)}function Ic(t,e){return Fl(t.getUTCMilliseconds(),e,3)}function Nc(t,e){return Ic(t,e)+"000"}function Bc(t,e){return Fl(t.getUTCMonth()+1,e,2)}function Vc(t,e){return Fl(t.getUTCMinutes(),e,2)}function Uc(t,e){return Fl(t.getUTCSeconds(),e,2)}function Gc(t){var e=t.getUTCDay();return 0===e?7:e}function Hc(t,e){return Fl(Ll.count(Rl(t)-1,t),e,2)}function zc(t,e){var n=t.getUTCDay();return t=n>=4||0===n?kl(t):kl.ceil(t),Fl(kl.count(Rl(t),t)+(4===Rl(t).getUTCDay()),e,2)}function jc(t){return t.getUTCDay()}function Fc(t,e){return Fl(Dl.count(Rl(t)-1,t),e,2)}function Wc(t,e){return Fl(t.getUTCFullYear()%100,e,2)}function qc(t,e){return Fl(t.getUTCFullYear()%1e4,e,4)}function Zc(){return"+0000"}function Yc(){return"%"}function Xc(t){return+t}function Kc(t){return Math.floor(+t/1e3)}!function(t){Vl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=ql(i),c=Zl(i),h=ql(o),d=Zl(o),f=ql(a),p=Zl(a),g=ql(s),v=Zl(s),m=ql(u),y=Zl(u),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:pc,e:pc,f:bc,H:gc,I:vc,j:mc,L:yc,m:_c,M:xc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Xc,s:Kc,S:wc,u:Oc,U:Ec,V:Tc,w:Sc,W:Mc,x:null,X:null,y:Cc,Y:Ac,Z:Pc,"%":Yc},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Lc,e:Lc,f:Nc,H:Dc,I:kc,j:Rc,L:Ic,m:Bc,M:Vc,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Xc,s:Kc,S:Uc,u:Gc,U:Hc,V:zc,w:jc,W:Fc,x:null,X:null,y:Wc,Y:qc,Z:Zc,"%":Yc},x={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p[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[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[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[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:ic,e:ic,f:cc,H:ac,I:ac,j:oc,L:lc,m:rc,M:sc,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:nc,Q:dc,s:fc,S:uc,u:Xl,U:Kl,V:$l,w:Yl,W:Ql,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:tc,Y:Jl,Z:ec,"%":hc};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=Gl[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function O(t,e){return function(n){var r,i,o=Bl(1900,void 0,1);if(E(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=Nl(Bl(o.y,0,1))).getUTCDay(),r=i>4||0===i?Dl.ceil(r):Dl(r),r=Al.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Il(Bl(o.y,0,1))).getDay(),r=i>4||0===i?Tl.ceil(r):Tl(r),r=wl.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?Nl(Bl(o.y,0,1)).getUTCDay():Il(Bl(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,Nl(o)):Il(o)}}function E(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=x[i in Gl?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=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=O(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}})}(t),Ul=Vl.format,Vl.parse,Vl.utcFormat,Vl.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"]});function $c(t){return new Date(t)}function Qc(t){return t instanceof Date?+t:+new Date(+t)}function Jc(t,e,n,r,i,o,a,s,u){var l=zu(Iu,Iu),c=l.invert,h=l.domain,d=u(".%L"),f=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),b=u("%Y"),_=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,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 x(s){return(a(s)<s?d:o(s)<s?f:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:b)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=hs((function(t){return t[2]})).right(_,o);a===_.length?(i=xs(n/31536e6,r/31536e6,e),e=t):a?(i=(a=_[o/_[a-1][2]<_[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(xs(n,r,e),1),e=s)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(c(t))},l.domain=function(t){return arguments.length?h(Cs.call(t,Qc)):h().map($c)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(sl(n,t)):l},l.copy=function(){return Gu(l,Jc(t,e,n,r,i,o,a,s,u))},l}function th(){return Ss.apply(Jc(Cl,Ml,El,wl,xl,_l,bl,yl,Ul).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var eh=Math.PI,nh=2*eh,rh=nh-1e-6;function ih(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function oh(){return new ih}function ah(t){return function(){return t}}ih.prototype=oh.prototype={constructor:ih,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,u=r-e,l=o-t,c=a-e,h=l*l+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-u*l)>1e-6&&i){var d=n-o,f=r-a,p=s*s+u*u,g=d*d+f*f,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((eh-Math.acos((p+h-g)/(2*v*m)))/2),b=y/m,_=y/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*l)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>l*f)+","+(this._x1=t+_*s)+","+(this._y1=e+_*u)}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),u=t+a,l=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"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%nh+nh),h>rh?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=eh)+","+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 sh=Math.abs,uh=Math.atan2,lh=Math.cos,ch=Math.max,hh=Math.min,dh=Math.sin,fh=Math.sqrt,ph=Math.PI,gh=ph/2,vh=2*ph;function mh(t){return t>1?0:t<-1?ph:Math.acos(t)}function yh(t){return t>=1?gh:t<=-1?-gh:Math.asin(t)}function bh(t){return t.innerRadius}function _h(t){return t.outerRadius}function xh(t){return t.startAngle}function wh(t){return t.endAngle}function Oh(t){return t&&t.padAngle}function Eh(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,d=h*u-c*l;if(!(d*d<1e-12))return[t+(d=(c*(e-o)-h*(t-i))/d)*u,e+d*l]}function Th(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/fh(s*s+u*u),c=l*u,h=-l*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,_=y*y+b*b,x=i-o,w=d*g-p*f,O=(b<0?-1:1)*fh(ch(0,x*x*_-w*w)),E=(w*b-y*O)/_,T=(-w*y-b*O)/_,S=(w*b+y*O)/_,M=(-w*y+b*O)/_,C=E-v,A=T-m,P=S-v,L=M-m;return C*C+A*A>P*P+L*L&&(E=S,T=M),{cx:E,cy:T,x01:-c,y01:-h,x11:E*(i/x-1),y11:T*(i/x-1)}}function Sh(){var t=bh,e=_h,n=ah(0),r=null,i=xh,o=wh,a=Oh,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-gh,f=o.apply(this,arguments)-gh,p=sh(f-d),g=f>d;if(s||(s=u=oh()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>vh-1e-12)s.moveTo(h*lh(d),h*dh(d)),s.arc(0,0,h,d,f,!g),c>1e-12&&(s.moveTo(c*lh(f),c*dh(f)),s.arc(0,0,c,f,d,g));else{var v,m,y=d,b=f,_=d,x=f,w=p,O=p,E=a.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):fh(c*c+h*h)),S=hh(sh(h-c)/2,+n.apply(this,arguments)),M=S,C=S;if(T>1e-12){var A=yh(T/c*dh(E)),P=yh(T/h*dh(E));(w-=2*A)>1e-12?(_+=A*=g?1:-1,x-=A):(w=0,_=x=(d+f)/2),(O-=2*P)>1e-12?(y+=P*=g?1:-1,b-=P):(O=0,y=b=(d+f)/2)}var L=h*lh(y),D=h*dh(y),k=c*lh(x),R=c*dh(x);if(S>1e-12){var I,N=h*lh(b),B=h*dh(b),V=c*lh(_),U=c*dh(_);if(p<ph&&(I=Eh(L,D,V,U,N,B,k,R))){var G=L-I[0],H=D-I[1],z=N-I[0],j=B-I[1],F=1/dh(mh((G*z+H*j)/(fh(G*G+H*H)*fh(z*z+j*j)))/2),W=fh(I[0]*I[0]+I[1]*I[1]);M=hh(S,(c-W)/(F-1)),C=hh(S,(h-W)/(F+1))}}O>1e-12?C>1e-12?(v=Th(V,U,L,D,h,C,g),m=Th(N,B,k,R,h,C,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),C<S?s.arc(v.cx,v.cy,C,uh(v.y01,v.x01),uh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,C,uh(v.y01,v.x01),uh(v.y11,v.x11),!g),s.arc(0,0,h,uh(v.cy+v.y11,v.cx+v.x11),uh(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,C,uh(m.y11,m.x11),uh(m.y01,m.x01),!g))):(s.moveTo(L,D),s.arc(0,0,h,y,b,!g)):s.moveTo(L,D),c>1e-12&&w>1e-12?M>1e-12?(v=Th(k,R,N,B,c,-M,g),m=Th(L,D,V,U,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,uh(v.y01,v.x01),uh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,uh(v.y01,v.x01),uh(v.y11,v.x11),!g),s.arc(0,0,c,uh(v.cy+v.y11,v.cx+v.x11),uh(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,uh(m.y11,m.x11),uh(m.y01,m.x01),!g))):s.arc(0,0,c,x,_,g):s.lineTo(k,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ph/2;return[lh(r)*n,dh(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:ah(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:ah(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:ah(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ah(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:ah(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:ah(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ah(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Mh(t){this._context=t}function Ch(t){return new Mh(t)}function Ah(t){return t[0]}function Ph(t){return t[1]}function Lh(){var t=Ah,e=Ph,n=ah(!0),r=null,i=Ch,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=oh())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(l)return o=null,l+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:ah(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:ah(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:ah(!!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 Dh(){var t=Ah,e=null,n=ah(0),r=Ph,i=ah(!0),o=null,a=Ch,s=null;function u(u){var l,c,h,d,f,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==o&&(s=a(f=oh())),l=0;l<=p;++l){if(!(l<p&&i(d=u[l],l,u))===g)if(g=!g)c=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=c;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[l]=+t(d,l,u),m[l]=+n(d,l,u),s.point(e?+e(d,l,u):v[l],r?+r(d,l,u):m[l]))}if(f)return s=null,f+""||null}function l(){return Lh().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:ah(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:ah(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:ah(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:ah(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:ah(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ah(+t),u):r},u.lineX0=u.lineY0=function(){return l().x(t).y(n)},u.lineY1=function(){return l().x(t).y(r)},u.lineX1=function(){return l().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:ah(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u}function kh(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Rh(t){return t}Mh.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 Ih=Bh(Ch);function Nh(t){this._curve=t}function Bh(t){function e(e){return new Nh(t(e))}return e._curve=t,e}function Vh(){return t=Lh().curve(Ih),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(Bh(t)):e()._curve},t;var t,e}Nh.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))}};var Uh=Array.prototype.slice;function Gh(){}function Hh(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 zh(t){this._context=t}function jh(t){return new zh(t)}function Fh(t){this._context=t}function Wh(t){return new Fh(t)}function qh(t){this._context=t}function Zh(t){return new qh(t)}function Yh(t,e){this._basis=new zh(t),this._beta=e}zh.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:Hh(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:Hh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Fh.prototype={areaStart:Gh,areaEnd:Gh,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:Hh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},qh.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:Hh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Yh.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,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(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 Xh=function t(e){function n(t){return 1===e?new zh(t):new Yh(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Kh(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 $h(t,e){this._context=t,this._k=(1-e)/6}$h.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:Kh(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:Kh(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 Qh=function t(e){function n(t){return new $h(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Jh(t,e){this._context=t,this._k=(1-e)/6}Jh.prototype={areaStart:Gh,areaEnd:Gh,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:Kh(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 td=function t(e){function n(t){return new Jh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ed(t,e){this._context=t,this._k=(1-e)/6}ed.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:Kh(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 ed(t,e)}return n.tension=function(e){return t(+e)},n}(0);function rd(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,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var l=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*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function id(t,e){this._context=t,this._alpha=e}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._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:rd(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 od=function t(e){function n(t){return e?new id(t,e):new $h(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ad(t,e){this._context=t,this._alpha=e}ad.prototype={areaStart:Gh,areaEnd:Gh,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:rd(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 sd=function t(e){function n(t){return e?new ad(t,e):new Jh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);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(){(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:rd(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 ld=function t(e){function n(t){return e?new ud(t,e):new ed(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function cd(t){this._context=t}function hd(t){return new cd(t)}function dd(t){return t<0?-1:1}function fd(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(dd(o)+dd(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function pd(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function gd(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 vd(t){this._context=t}function md(t){this._context=new yd(t)}function yd(t){this._context=t}function bd(t){return new vd(t)}function _d(t){return new md(t)}function xd(t){this._context=t}function wd(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 Od(t){return new xd(t)}function Ed(t,e){this._context=t,this._t=e}function Td(t){return new Ed(t,.5)}function Sd(t){return new Ed(t,0)}function Md(t){return new Ed(t,1)}function Cd(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 Ad(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Pd(t,e){return t[e]}cd.prototype={areaStart:Gh,areaEnd:Gh,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))}},vd.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:gd(this,this._t0,pd(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,gd(this,pd(this,n=fd(this,t,e)),n);break;default:gd(this,this._t0,n=fd(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(md.prototype=Object.create(vd.prototype)).point=function(t,e){vd.prototype.point.call(this,e,t)},yd.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)}},xd.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=wd(t),i=wd(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)}},Ed.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}};var Ld=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=fa.getProperty(e,"data").groupMapsTo,o=fa.getProperty(e,"axes");return t&&(n=n.filter((function(e){return t.includes(e.group)}))),o&&Object.keys(o).forEach((function(t){var e=o[t].mapsTo,r=o[t].scaleType;if(r!==I.LINEAR&&r!==I.LOG||(n=n.map((function(t){var n;return S(S({},t),((n={})[e]=null===t[e]?t[e]:Number(t[e]),n))}))),e&&o[t].domain)if(r===I.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=ht.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(fa.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(t){return fa.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=ht.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.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.getDataValuesGroupedByKeys=function(t){var e=this,n=this.getOptions(),r=n.data.groupMapsTo,i=this.getDisplayData(t),o=ss(i,(function(t){return t[e.services.cartesianScales.getDomainIdentifier(t)]})).keys(),a=this.services.cartesianScales.domainAxisPosition,s=n.axes[a].scaleType;s===I.TIME?o.sort((function(t,e){return new Date(t)-new Date(e)})):s!==I.LOG&&s!==I.LINEAR||o.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return o.map((function(t){var n={sharedStackKey:t};return u.forEach((function(o){var a=i.find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[r]===o&&n[i].toString()===t})),s=e.services.cartesianScales.getRangeIdentifier(n);n[o]=a?a[s]: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=this.getOptions().data.groupMapsTo,a=this.getDataGroupNames(i),s=this.getDataValuesGroupedByKeys(i);if(n){var u=fa.fromPairs(s.map((function(t){return[t.sharedStackKey,0]})));s.forEach((function(t){a.forEach((function(e){u[t.sharedStackKey]+=t[e]}))})),s.forEach((function(t){a.forEach((function(e){u[t.sharedStackKey]?t[e]=t[e]/u[t.sharedStackKey]*100:t[e]=0}))}))}return function(){var t=ah([]),e=Ad,n=Cd,r=Pd;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var h,d=s[o],f=c[o]=new Array(u),p=0;p<u;++p)f[p]=h=[0,+r(i[p],d,p,i)],h.data=i[p];f.key=d}for(o=0,a=e(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:ah(Uh.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:ah(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Ad:"function"==typeof t?t:ah(Uh.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Cd:t,i):n},i}().keys(a)(s).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(n){var r=t[n];return r[o]=a[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();fa.updateLegendAdditionalItems(e,t),this.set({options:fa.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(tt.Model.UPDATE,{animate:t}))},t.prototype.toggleDataLabel=function(t){var e=ht.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 u=i.filter((function(t){return t.status===n})),l=this.getOptions(),c=i.some((function(t){return t.status===r}));l.data.selectedGroups=c?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(tt.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=fa.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=fa.getProperty(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.isUserProvidedColorScaleValid=function(){var t=fa.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=fa.getProperty(t,"label");if(null===a){var s=fa.getProperty(r,i);o=s||"Ungrouped"}else o=a;var u={group:o,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},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=ht.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=ss(t,(function(t){return t[e]})).keys();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=fa.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=fa.getProperty(this.getOptions(),"color","pairing"),e=fa.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=fa.getProperty(t,"option"),r=e>5?14:e;n=n<=lt.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.colorClassNames=Ls().range(i).domain(this.allDataGroups)},t}(),Dd=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}(),kd={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 "},Rd=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}()}(),Id="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Nd="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Bd="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Nd):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Vd=["top","right","bottom","left","width","height","size","weight"],Ud="undefined"!=typeof MutationObserver,Gd=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(){Bd(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)};Gd.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Gd.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Gd.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Gd.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},Gd.prototype.connect_=function(){Id&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ud?(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)},Gd.prototype.disconnect_=function(){Id&&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)},Gd.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Vd.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Gd.getInstance=function(){return this.instance_||(this.instance_=new Gd),this.instance_},Gd.instance_=null;var Hd=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},zd=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Nd},jd=Xd(0,0,0,0);function Fd(t){return parseFloat(t)||0}function Wd(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Fd(t["border-"+n+"-width"])}),0)}function qd(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return jd;var r=zd(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]=Fd(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Fd(r.width),u=Fd(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Wd(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Wd(r,"top","bottom")+a)),!function(t){return t===zd(t).document.documentElement}(t)){var l=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return Xd(i.left,i.top,s,u)}var Zd="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof zd(t).SVGGraphicsElement}:function(t){return t instanceof zd(t).SVGElement&&"function"==typeof t.getBBox};function Yd(t){return Id?Zd(t)?function(t){var e=t.getBBox();return Xd(0,0,e.width,e.height)}(t):qd(t):jd}function Xd(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Kd=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Xd(0,0,0,0),this.target=t};Kd.prototype.isActive=function(){var t=Yd(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Kd.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var $d=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 Hd(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Hd(this,{target:t,contentRect:n})},Qd=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Rd,"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};Qd.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 zd(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Kd(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Qd.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 zd(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))}},Qd.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Qd.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Qd.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new $d(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Qd.prototype.clearActive=function(){this.activeObservations_.splice(0)},Qd.prototype.hasActive=function(){return this.activeObservations_.length>0};var Jd="undefined"!=typeof WeakMap?new WeakMap:new Rd,tf=function(t){if(!(this instanceof tf))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=Gd.getInstance(),n=new Qd(t,e,this);Jd.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){tf.prototype[t]=function(){return(e=Jd.get(this))[t].apply(e,arguments);var e}}));var ef=void 0!==Nd.ResizeObserver?Nd.ResizeObserver:tf,nf=wa((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:u,toPng:function(t,e){return l(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return l(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return l(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return l(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 u(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 l(t,e){return u(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}()})),rf=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){t.attr||(t=ma(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)}}))},u={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 l={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(l),a.width>0&&a.height>0))return l;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:fa.getProperty(t.node(),"width","baseVal","value"),height:fa.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}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.addMainContainer(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.addMainContainer=function(){var t=this.model.getOptions(),e=fa.getProperty(t,"style","prefix"),n=ma(this.getHolder()).append("div").classed(kd.prefix+"--"+e+"--chart-wrapper",!0).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();ma(this.getHolder()).classed(kd.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.exportToJPG=function(){var t=this;nf.toJpeg(this.getMainContainer(),{quality:1,filter:function(t){return!t.classList||!t.classList.contains("bx--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.jpg")}))},e.prototype.exportToPNG=function(){var t=this;nf.toPng(this.getMainContainer(),{quality:1,filter:function(t){return!t.classList||!t.classList.contains("bx--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.png")})).catch((function(t){console.error("oops, something went wrong!",t)}))},e.prototype.toggleFullscreen=function(){var t=this.getHolder(),e=ma(t),n=e.classed("fullscreen");e.classed("fullscreen",!n),n?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.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=ma(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(ma(this.mainContainer),{useBBox:!0}).height,n=ma(this.mainContainer).attr("class"),r=ma(this.mainContainer).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(ma(t),{useBBox:!0}).height)})),i<=t?ma(this.mainContainer).attr("height",i):ma(this.mainContainer).attr("height","100%")}},e.prototype.getMainContainer=function(){return this.mainContainer},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&ma(e).on("mouseover",(function(){t.services.events.dispatchEvent(tt.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(tt.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=fa.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(tt.Chart.RESIZE))}),12.5);new ef(i).observe(e)}},e}(Dd),of=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}(Dd),af=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype.downloadCSV=function(t,e,n){var r=document.createElement("a");navigator.msSaveBlob?navigator.msSaveBlob(new Blob([t],{type:"text/csv;encoding:utf-8"}),e):URL&&"download"in r?(r.href=URL.createObjectURL(new Blob([t],{type:"text/csv;encoding:utf-8"})),r.setAttribute("download",e),document.body.appendChild(r),r.click(),document.body.removeChild(r)):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}(Dd),sf={value:function(){}};function uf(){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 lf(r)}function lf(t){this._=t}function cf(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 hf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function df(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=sf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}lf.prototype=uf.prototype={constructor:lf,on:function(t,e){var n,r=this._,i=cf(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]=df(r[n],t.name,e);else if(null==e)for(n in r)r[n]=df(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=hf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new lf(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 ff,pf,gf=Object.freeze({__proto__:null,dispatch:uf}),vf=0,mf=0,yf=0,bf=0,_f=0,xf=0,wf="object"==typeof performance&&performance.now?performance:Date,Of="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ef(){return _f||(Of(Tf),_f=wf.now()+xf)}function Tf(){_f=0}function Sf(){this._call=this._time=this._next=null}function Mf(t,e,n){var r=new Sf;return r.restart(t,e,n),r}function Cf(){_f=(bf=wf.now())+xf,vf=mf=0;try{!function(){Ef(),++vf;for(var t,e=ff;e;)(t=_f-e._time)>=0&&e._call.call(null,t),e=e._next;--vf}()}finally{vf=0,function(){var t,e,n=ff,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:ff=e);pf=t,Pf(r)}(),_f=0}}function Af(){var t=wf.now(),e=t-bf;e>1e3&&(xf-=e,bf=t)}function Pf(t){vf||(mf&&(mf=clearTimeout(mf)),t-_f>24?(t<1/0&&(mf=setTimeout(Cf,t-wf.now()-xf)),yf&&(yf=clearInterval(yf))):(yf||(bf=wf.now(),yf=setInterval(Af,1e3)),vf=1,Of(Cf)))}function Lf(t,e,n){var r=new Sf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Sf.prototype=Mf.prototype={constructor:Sf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Ef():+n)+(null==e?0:+e),this._next||pf===this||(pf?pf._next=this:ff=this,pf=this),this._call=t,this._time=n,Pf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pf())}};var Df=uf("start","end","cancel","interrupt"),kf=[];function Rf(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(u){var l,c,h,d;if(1!==n.state)return s();for(l in i)if((d=i[l]).name===n.name){if(3===d.state)return Lf(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[l]):+l<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[l])}if(Lf((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),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),l=0,c=-1;l<h;++l)(d=n.tween[l].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=Mf((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:Df,tween:kf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function If(t,e){var n=Bf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Nf(t,e){var n=Bf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Bf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Vf(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 Uf(t,e){var n,r;return function(){var i=Nf(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 Gf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Nf(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function Hf(t,e,n){var r=t._id;return t.each((function(){var t=Nf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Bf(t,r).value[e]}}function zf(t,e){var n;return("number"==typeof e?vu:e instanceof Xs?du:(n=Xs(e))?(e=n,du):_u)(t,e)}function jf(t){return function(){this.removeAttribute(t)}}function Ff(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Wf(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 qf(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 Zf(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function Yf(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Xf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Kf(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function $f(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Kf(t,i)),n}return i._value=e,i}function Qf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Xf(t,i)),n}return i._value=e,i}function Jf(t,e){return function(){If(this,t).delay=+e.apply(this,arguments)}}function tp(t,e){return e=+e,function(){If(this,t).delay=e}}function ep(t,e){return function(){Nf(this,t).duration=+e.apply(this,arguments)}}function np(t,e){return e=+e,function(){Nf(this,t).duration=e}}function rp(t,e){if("function"!=typeof e)throw new Error;return function(){Nf(this,t).ease=e}}function ip(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)?If:Nf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var op=va.prototype.constructor;function ap(t){return function(){this.style.removeProperty(t)}}function sp(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function up(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&sp(t,o,n)),r}return o._value=e,o}function lp(t){return function(e){this.textContent=t.call(this,e)}}function cp(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&lp(r)),e}return r._value=t,r}var hp=0;function dp(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function fp(t){return va().transition(t)}function pp(){return++hp}var gp=va.prototype;dp.prototype=fp.prototype={constructor:dp,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=po(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,h=o[a]=new Array(c),d=0;d<c;++d)(s=l[d])&&(u=t.call(s,s.__data__,d,l))&&("__data__"in s&&(u.__data__=s.__data__),h[d]=u,Rf(h[d],e,n,d,h,Bf(s,n)));return new dp(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=vo(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var d,f=t.call(u,u.__data__,h,l),p=Bf(u,n),g=0,v=f.length;g<v;++g)(d=f[g])&&Rf(d,e,n,g,f,p);o.push(f),a.push(u)}return new dp(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=mo(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,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new dp(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 u,l=e[s],c=n[s],h=l.length,d=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(d[f]=u);for(;s<r;++s)a[s]=e[s];return new dp(a,this._parents,this._name,this._id)},selection:function(){return new op(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=pp(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=Bf(a,e);Rf(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new dp(r,this._parents,t,n)},call:gp.call,nodes:gp.nodes,node:gp.node,size:gp.size,empty:gp.empty,each:gp.each,on:function(t,e){var n=this._id;return arguments.length<2?Bf(this.node(),n).on.on(t):this.each(ip(n,t,e))},attr:function(t,e){var n=uo(t),r="transform"===n?Du:zf;return this.attrTween(t,"function"==typeof e?(n.local?Yf:Zf)(n,r,Hf(this,"attr."+t,e)):null==e?(n.local?Ff:jf)(n):(n.local?qf:Wf)(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=uo(t);return this.tween(n,(r.local?$f:Qf)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Lu:zf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=ko(this,t),a=(this.style.removeProperty(t),ko(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,ap(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=ko(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=ko(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Hf(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Nf(this,t),l=u.on,c=null==u.value[a]?o||(o=ap(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=ko(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,up(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}}(Hf(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,cp(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=Bf(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?Uf:Gf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Jf:tp)(e,t)):Bf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ep:np)(e,t)):Bf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(rp(e,t)):Bf(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=Nf(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}))}))}};var vp={time:null,delay:0,duration:250,ease:it};function mp(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return vp.time=Ef(),vp;return n}va.prototype.interrupt=function(t){return this.each((function(){Vf(this,t)}))},va.prototype.transition=function(t){var e,n;t instanceof dp?(e=t._id,t=t._name):(e=pp(),(n=vp).time=Ef(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&Rf(a,t,e,l,s,n||mp(a,e));return new dp(r,this._parents,t,e)};var yp=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(tt.Model.UPDATE,(function(){t.pendingTransitions={}}))},e.prototype.getTransition=function(t,e){var n=this;if(!1===this.model.getOptions().animations||!1===e)return this.getInstantTransition(t);var r=fp(t).duration(fa.getProperty(yt,t,"duration")||yt.default.duration);return this.pendingTransitions[r._id]=r,r.on("end interrupt cancel",(function(){delete n.pendingTransitions[r._id]})),r},e.prototype.getInstantTransition=function(t){var e=this,n=fp(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(Dd),bp=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}(Dd);function _p(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 xp(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 wp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=xp(e);return n.setDate(n.getDate()+r),n}function Op(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t).getTime(),r=xp(e);return new Date(n+r)}function Ep(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Op(t,36e5*n)}function Tp(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Sp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_p(t);return e.setHours(0,0,0,0),e}function Mp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sp(t),r=Sp(e),i=n.getTime()-Tp(n),o=r.getTime()-Tp(r);return Math.round((i-o)/864e5)}function Cp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Op(t,6e4*n)}function Ap(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_p(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 Pp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=xp(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Ap(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function Lp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Op(t,1e3*n)}function Dp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Pp(t,12*n)}function kp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Rp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_p(t);return!isNaN(e)}function Ip(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Np(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e);return n.getFullYear()-r.getFullYear()}function Bp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e);return n.getTime()-r.getTime()}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Bp(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Bp(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Gp={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 Hp(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var zp={date:Hp({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Hp({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:Hp({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},jp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Fp(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,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function Wp(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 u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[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)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}}var qp,Zp={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Gp[t]?Gp[t]:1===e?Gp[t].one:Gp[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:zp,formatRelative:function(t,e,n,r){return jp[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:Fp({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Fp({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:Fp({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:Fp({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:Fp({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:(qp={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(qp.matchPattern);if(!i)return null;var o=i[0],a=n.match(qp.parsePattern);if(!a)return null;var s=qp.valueCallback?qp.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Wp({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:Wp({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:Wp({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:Wp({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:Wp({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 Yp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Op(t,-n)}function Xp(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Kp=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Xp("yy"===e?r%100:r,e.length)},$p=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Xp(n+1,2)},Qp=function(t,e){return Xp(t.getUTCDate(),e.length)},Jp=function(t,e){return Xp(t.getUTCHours()%12||12,e.length)},tg=function(t,e){return Xp(t.getUTCHours(),e.length)},eg=function(t,e){return Xp(t.getUTCMinutes(),e.length)},ng=function(t,e){return Xp(t.getUTCSeconds(),e.length)},rg=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Xp(Math.floor(r*Math.pow(10,n-3)),e.length)};function ig(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=_p(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 og(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_p(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=ig(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=ig(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function ag(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=og(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=ig(n);return r}function sg(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:xp(i),a=null==n.weekStartsOn?o:xp(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=_p(t),u=s.getUTCDay(),l=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function ug(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=_p(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:xp(a),u=null==i.firstWeekContainsDate?s:xp(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=new Date(0);l.setUTCFullYear(r+1,0,u),l.setUTCHours(0,0,0,0);var c=sg(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var d=sg(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function lg(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:xp(i),a=null==n.firstWeekContainsDate?o:xp(n.firstWeekContainsDate),s=ug(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=sg(u,e);return l}var cg="midnight",hg="noon",dg="morning",fg="afternoon",pg="evening",gg="night",vg={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 Kp(t,e)},Y:function(t,e,n,r){var i=ug(t,r),o=i>0?i:1-i;return"YY"===e?Xp(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Xp(o,e.length)},R:function(t,e){return Xp(og(t),e.length)},u:function(t,e){return Xp(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 Xp(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 Xp(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 $p(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 Xp(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=_p(t),r=sg(n,e).getTime()-lg(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Xp(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=_p(t),n=ig(e).getTime()-ag(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Xp(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Qp(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=_p(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"}):Xp(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 Xp(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 Xp(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 Xp(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?hg:0===i?cg: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?pg:i>=12?fg:i>=4?dg:gg,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 Jp(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):tg(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Xp(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Xp(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):eg(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):ng(t,e)},S:function(t,e){return rg(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return yg(i);case"XXXX":case"XX":return bg(i);case"XXXXX":case"XXX":default:return bg(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return yg(i);case"xxxx":case"xx":return bg(i);case"xxxxx":case"xxx":default:return bg(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+mg(i,":");case"OOOO":default:return"GMT"+bg(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+mg(i,":");case"zzzz":default:return"GMT"+bg(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Xp(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Xp((r._originalDate||t).getTime(),e.length)}};function mg(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+Xp(o,2)}function yg(t,e){return t%60==0?(t>0?"-":"+")+Xp(Math.abs(t)/60,2):bg(t,e)}function bg(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Xp(Math.floor(i/60),2)+n+Xp(i%60,2)}function _g(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 xg(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 wg={p:xg,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return _g(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}}",_g(i,e)).replace("{{time}}",xg(o,e))}},Og=["D","DD"],Eg=["YY","YYYY"];function Tg(t){return-1!==Og.indexOf(t)}function Sg(t){return-1!==Eg.indexOf(t)}function Mg(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 Cg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ag=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pg=/^'([^]*?)'?$/,Lg=/''/g,Dg=/[a-zA-Z]/;function kg(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||Zp,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:xp(a),u=null==i.firstWeekContainsDate?s:xp(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=o.options&&o.options.weekStartsOn,c=null==l?0:xp(l),h=null==i.weekStartsOn?c:xp(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=_p(t);if(!Rp(d))throw new RangeError("Invalid time value");var f=Tp(d),p=Yp(d,f),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:d},v=r.match(Ag).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,wg[e])(t,o.formatLong,g):t})).join("").match(Cg).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Rg(t);var n=vg[e];if(n)return!i.useAdditionalWeekYearTokens&&Sg(t)&&Mg(t),!i.useAdditionalDayOfYearTokens&&Tg(t)&&Mg(t),n(p,t,o.localize,g);if(e.match(Dg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Rg(t){return t.match(Pg)[1].replace(Lg,"'")}function Ig(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return wp(t,-n)}function Ng(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Ep(t,-n)}function Bg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Cp(t,-n)}function Vg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Pp(t,-n)}function Ug(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Lp(t,-n)}function Gg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Dp(t,-n)}var Hg=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=fa.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(),u=s.data.groupMapsTo,l=fa.getProperty(s,"axes",this.secondaryRangeAxisPosition),c=void 0;if(null!==i?c=i[u]:a&&a.length>0&&(c=a[0]),(null===(e=l)||void 0===e?void 0:e.correspondingDatasets)&&l.correspondingDatasets.includes(c))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return fa.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===L.BOTTOM||t===L.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(L).map((function(t){return L[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!==L.LEFT&&this.rangeAxisPosition!==L.RIGHT||this.domainAxisPosition!==L.BOTTOM&&this.domainAxisPosition!==L.TOP?this.orientation=R.HORIZONTAL:this.orientation=R.VERTICAL},e.prototype.isDualAxes=function(){return this.dualAxes},e.prototype.determineAxisDuality=function(){var t,e,n,r,i=this.model.getOptions(),o=fa.getProperty(i,"axes");((null===(t=o[L.LEFT])||void 0===t?void 0:t.correspondingDatasets)&&o[L.RIGHT]||(null===(e=o[L.RIGHT])||void 0===e?void 0:e.correspondingDatasets)&&o[L.LEFT]||(null===(n=o[L.TOP])||void 0===n?void 0:n.correspondingDatasets)&&o[L.BOTTOM]||(null===(r=o[L.BOTTOM])||void 0===r?void 0:r.correspondingDatasets)&&o[L.TOP])&&(this.dualAxes=!0)},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=[L.BOTTOM,L.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[L.LEFT,L.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=fa.getProperty(a,"axes")[n].mapsTo,u=null!==fa.getProperty(r,s)?r[s]:r;switch(e){case I.LABELS:o=t(u)+t.step()/2;break;case I.TIME:o=t(new Date(u));break;default:o=t(u)}return o},e.prototype.getBoundedScaledValues=function(t,e){var n=this.model.getOptions().bounds,r=this.scales[this.rangeAxisPosition],i=this.model.getOptions(),o=fa.getProperty(i,"axes")[this.rangeAxisPosition].mapsTo,a=void 0!==t[o]?t[o]:t;return[r(null!==fa.getProperty(t,n.upperBoundMapsTo)?t[n.upperBoundMapsTo]:a),r(null!==fa.getProperty(t,n.lowerBoundMapsTo)?t[n.lowerBoundMapsTo]:a)]},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 fa.getProperty(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")},e.prototype.getRangeIdentifier=function(t){var e=this.model.getOptions();return fa.getProperty(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions(),r=fa.getProperty(n,"axes",t);return r.scaleType===I.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=_p(t),r=_p(e),i=kp(n,r),o=Math.abs(Np(n,r));n.setFullYear(n.getFullYear()-i*o);var a=kp(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Gg(n,e),Dp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e),i=kp(n,r),o=Math.abs(Ip(n,r));n.setMonth(n.getMonth()-i*o);var a=kp(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Vg(n,e),Pp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e),i=kp(n,r),o=Math.abs(Mp(n,r));n.setDate(n.getDate()-i*o);var a=kp(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Ig(n,e),wp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Bp(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Ng(n,e),Ep(r,e)];if(Vp(r,n)>30)return[Bg(n,30*e),Cp(r,30*e)];if(Vp(r,n)>1)return[Bg(n,e),Cp(r,e)];if(Up(r,n)>15)return[Ug(n,15*e),Lp(r,15*e)];if(Up(r,n)>1)return[Ug(n,e),Lp(r,e)];return[n,r]}(e,fa.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===I.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,at.paddingRatio,r.scaleType)},e.prototype.findVerticalAxesPositions=function(){var t=this.model.getOptions(),e=fa.getProperty(t,"axes"),n=this.isDualAxes();return null===fa.getProperty(e,L.LEFT)&&null!==fa.getProperty(e,L.RIGHT)||!0===fa.getProperty(e,L.RIGHT,"main")||n&&fa.getProperty(e,L.LEFT,"correspondingDatasets")?{primary:L.RIGHT,secondary:L.LEFT}:{primary:L.LEFT,secondary:L.RIGHT}},e.prototype.findHorizontalAxesPositions=function(){var t=this.model.getOptions(),e=fa.getProperty(t,"axes"),n=this.isDualAxes();return null===fa.getProperty(e,L.BOTTOM)&&null!==fa.getProperty(e,L.TOP)||!0===fa.getProperty(e,L.TOP,"main")||n&&fa.getProperty(e,L.BOTTOM,"correspondingDatasets")?{primary:L.TOP,secondary:L.BOTTOM}:{primary:L.BOTTOM,secondary:L.TOP}},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=fa.getProperty(n,"axes",t.primary),i=fa.getProperty(n,"axes",e.primary),o=r.scaleType||I.LINEAR,a=i.scaleType||I.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!==I.LABELS&&a!==I.TIME&&o===I.LABELS||o===I.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=fa.getProperty(e,"axes",t),r=fa.getProperty(e,"bounds"),i=n.includeZero,o=fa.getProperty(n,"scaleType")||I.LINEAR;if(this.model.isDataEmpty())return[];var a,s,u=this.model.getDisplayData(),l=n.extendLinearDomainBy,c=n.mapsTo,h=n.percentage,d=n.thresholds,f=at.ratio,p=f.reference,g=f.compareTo;if(n.domain)return o===I.LABELS?n.domain:(o===I.TIME&&(n.domain=n.domain.map((function(t){return void 0===t.getTime?new Date(t):t}))),this.extendsDomain(t,n.domain));if(h)return[0,100];if(n&&o===I.LABELS)return ss(u,(function(t){return t[c]})).keys();var v=this.model.getDataGroupNames();if(o===I.LABELS_RATIO)return u.map((function(t){return t[p]+"/"+t[g]}));if(o===I.TIME)s=u.map((function(t){return+new Date(t[c])}));else if(r&&e.axes)s=[],u.forEach((function(t){s.push(t[c]),t[r.upperBoundMapsTo]&&s.push(t[r.upperBoundMapsTo]),t[r.lowerBoundMapsTo]&&s.push(t[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&v&&t===this.getRangeAxisPosition()){var m=e.data.groupMapsTo,y=this.model.getDataValuesGroupedByKeys(v),b=u.filter((function(t){return!v.includes(t[m])})),_=y.map((function(t){t.sharedStackKey;return Ts(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(function(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}(t,["sharedStackKey"])))}));s=M(_,b.map((function(t){return t[c]})))}else s=[],u.forEach((function(t){var e=t[c];Array.isArray(e)&&2===e.length?(s.push(e[0]),s.push(e[1])):(l&&s.push(Math.max(t[c],t[l])),s.push(e))}));return o!==I.TIME&&o!==I.LOG&&i&&s.push(0),d&&d.length>0&&d.forEach((function(t){var e=fa.getProperty(t,"value");null!==e&&s.push(e)})),a=ps(s),a=this.extendsDomain(t,a)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=fa.getProperty(e,"axes",t);if(!n)return null;var r,i=fa.getProperty(n,"scaleType")||I.LINEAR;return this.scaleTypes[t]=i,(r=i===I.TIME?th():i===I.LOG?function t(){var e=pl(Hu()).domain([1,10]);return e.copy=function(){return Gu(e,t()).base(e.base())},Ss.apply(e,arguments),e}().base(n.base||10):i===I.LABELS||i===I.LABELS_RATIO?Ds():al()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=fa.getProperty(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!n)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==I.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=fa.getProperty(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!t)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}(Dd);var zg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Ch,curveLinearClosed:hd,curveBasis:jh,curveBasisClosed:Wh,curveBasisOpen:Zh,curveBundle:Xh,curveCardinal:Qh,curveCardinalClosed:td,curveCardinalOpen:nd,curveCatmullRom:od,curveCatmullRomClosed:sd,curveCatmullRomOpen:ld,curveMonotoneX:bd,curveMonotoneY:_d,curveNatural:Od,curveStep:Td,curveStepAfter:Md,curveStepBefore:Sd},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}(Dd),jg=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(!fa.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=fa.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===L.BOTTOM&&e===I.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();return n.extendsDomain(r,ps(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(tt.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return fa.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=fa.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=bt.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,u=Math.min((a[1]-a[0])/2*(t/2),s/2),l=i+u,c=o-u;l>=c&&(l=i+s/2-n/2,c=o-s/2+n/2);var h=[r.invert(l),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]),u=Math.min(i+a,o[1]),l=[n.invert(s),n.invert(u)];e[0].valueOf()===l[0].valueOf()&&e[1].valueOf()===l[1].valueOf()||this.handleDomainChange(l)},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())<fa.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 fa.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return fa.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(Dd),Fg=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||st;t&&(r=t.x,i=t.y,o=2);var s=rf.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0}),u=s.width,l=s.height;e.transition().duration(a.duration).ease(a.ease).attr("transform","translate("+u/2+", "+l/2+") scale("+o+") translate("+-r+","+-i+")"),this.services.events.dispatchEvent(tt.CanvasZoom.CANVAS_ZOOM_IN,{element:ma(t)})},e.prototype.zoomOut=function(t,e){var n=e||st;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(tt.CanvasZoom.CANVAS_ZOOM_OUT)},e}(Dd),Wg=function(){function t(t,e,n){if(this.renderType=C.HTML,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){var r=fa.getProperty(this.model.getOptions(),"style","prefix");this.id=r+"--"+this.configs.id}this.parent||this.setParent(ma(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=fa.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(kd.prefix+"--"+n+"--"+this.type,!0).attr("id",this.id),e&&e.classed(kd.prefix+"--"+n+"--"+this.type,!1).attr("id",this.id)}},t.prototype.getParent=function(){return this.parent},t.prototype.getComponentContainer=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=fa.getProperty(this.model.getOptions(),"style","prefix"),n=this.id?"#"+this.id:"",r=rf.appendOrSelect(this.parent,(this.renderType===C.SVG?"svg":"div")+n+"."+kd.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var i=this.model.get("chartClipId");if(i){var o=ma("#"+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?fa.merge({},this.model.getOptions(),this.configs.options):this.model.getOptions()},t}(),qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e.renderType=C.HTML,e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getOptions(),n=fa.getProperty(e,"legend"),i=fa.getProperty(n,"alignment"),o=fa.getProperty(e,"legend","orientation"),a=this.model.getDataGroups(),s=ht.items.status.DISABLED,u=a.some((function(t){return t.status===s})),l=fa.getProperty(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===B.CENTER).classed(o,!0).classed("has-deactivated-items",u).attr("role",r.GROUP).attr("data-name","legend-items");l&&(a=this.sortDataGroups(a,l));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===ht.items.status.ACTIVE}));var f=fa.getProperty(this.getOptions(),"legend","clickable");c.classed("clickable",f);var p=ht.checkbox.radius,g=d.append("div").classed("checkbox",!0);g.merge(h.select("div.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-label",(function(t){return t.name})).attr("aria-checked",(function(t){return t.status===ht.items.status.ACTIVE})).attr("width",2*p).attr("height",2*p).attr("rx",1).attr("ry",1).attr("class",(function(e,n){return t.model.getColorClassName({classNameTypes:[P.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"})})).style("background",(function(e){return e.status===ht.items.status.ACTIVE?t.model.getFillColor(e.name)||t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===ht.items.status.ACTIVE}));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");var v=d.append("p").merge(h.select("p"));this.truncateLegendText(v);var m=fa.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);x.selectAll("*").remove();var w=1;x.append("svg").classed("icon",!0).each((function(t,e){var n=ma(this);_&&_==t.type?w++:(_=t.type,w=1),y.addAdditionalItem(n,t,w)}));var O=x.append("p").merge(x.select("p"));this.truncateLegendText(O)}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=ht.area,o=i.width,a=i.height;if(e.type===J.RADIUS?t.style("width",a+"px").style("height",a+"px"):t.style("width",o+"px").style("height",a+"px"),e.type===J.RADIUS){var s=ht.radius,u=s.iconData,l=s.fill,c=s.stroke;t.attr("fill","none").selectAll("circle").data(u).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:l).style("stroke",e.stroke?e.stroke:c)}else if(e.type===J.LINE){var h=ht.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===J.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?ht.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===J.SIZE){var d=ht.size;u=d.iconData,l=d.fill,c=d.stroke;t.attr("fill","none").attr("role",r.IMG).attr("aria-label","size").selectAll("rect").data(u).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:l).style("stroke",e.stroke?e.stroke:c).style("stroke-width",1)}else if(e.type===J.QUARTILE){u=ht.quartile.iconData;t.selectAll("rect").attr("role",r.IMG).attr("aria-label","quartile").data(u).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===J.ZOOM){var f=fa.getProperty(os,"legend","zoom"),p=(u=f.iconData,f.color),g=t.attr("role",r.IMG).attr("aria-label","zoom").selectAll("g.icon").data(u).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(t){var e=fa.getProperty(this.getOptions(),"legend","truncation"),n=fa.getProperty(e,"type"),r=fa.getProperty(e,"threshold"),i=fa.getProperty(e,"numCharacter");n!==k.NONE?t.html((function(t){return t.name.length>r?fa.truncateLabel(t.name,n,i):t.name})):t.html((function(t){return t.name}))},e.prototype.addEventListeners=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=fa.getProperty(n,"legend"),i=fa.getProperty(r,"truncation","threshold");e.selectAll("div.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(tt.Legend.ITEM_HOVER,{hoveredElement:ma(this)});var e=ma(this);e.select("div.checkbox").classed("hovered",!0);var n=e.datum();n.name.length>i&&t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:e,content:n.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(tt.Legend.ITEM_CLICK,{clickedElement:ma(this)});var e=ma(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=ma(this);e.select("div.checkbox").classed("hovered",!1),t.services.events.dispatchEvent(tt.Tooltip.HIDE),t.services.events.dispatchEvent(tt.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e){!ia.key||"Enter"!==ia.key&&" "!==ia.key||(ia.preventDefault(),t.model.toggleDataLabel(e.name))})),e.selectAll("g.additional-item").on("mouseover",(function(){var e=ma(this),n=e.datum();n.name.length>i&&t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:e,content:n.name})}))},e}(Wg);function Zg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yg(t){return function(t){if(Array.isArray(t))return Xg(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 Xg(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 Xg(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 Xg(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 Kg(t){return t.reduce((function(t,e){return Array.isArray(e)?t.push.apply(t,Yg(Kg(e))):t.push(e),t}),[])}function $g(t){return($g="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 Qg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 tv(t,e){return(tv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ev(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=iv(t);if(e){var i=iv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nv(this,n)}}function nv(t,e){return!e||"object"!==$g(e)&&"function"!=typeof e?rv(t):e}function rv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function iv(t){return(iv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ov(t){return(ov="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 av(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sv(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 uv(t,e,n){return(uv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=dv(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function lv(t,e){return(lv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cv(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=dv(t);if(e){var i=dv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hv(this,n)}}function hv(t,e){return!e||"object"!==ov(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function dv(t){return(dv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function fv(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 pv(t){return(pv="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 gv(t){return function(t){if(Array.isArray(t))return vv(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 vv(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 vv(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 vv(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 mv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yv(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 _v(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=wv(t);if(e){var i=wv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xv(this,n)}}function xv(t,e){return!e||"object"!==pv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function wv(t){return(wv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ov(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 Ev(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 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 Sv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mv(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 Cv(t,e){return(Cv=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 Pv(this,n)}}function Pv(t,e){return!e||"object"!==Tv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Lv(t){return(Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Dv(t){return(Dv="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 kv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rv(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 Iv(t,e){return(Iv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nv(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=Vv(t);if(e){var i=Vv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bv(this,n)}}function Bv(t,e){return!e||"object"!==Dv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Vv(t){return(Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Uv(t){return(Uv="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 Gv(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 Hv(t,e){return(Hv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function zv(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=Fv(t);if(e){var i=Fv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jv(this,n)}}function jv(t,e){return!e||"object"!==Uv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Fv(t){return(Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wv,qv,Zv=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}}),e&&Hv(t,e)}(o,t);var e,n,r,i=zv(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!Ov(t,e)}))&&n.element.querySelector(kd.selectorTabbable).focus()},n._hookCloseActions(),n}return e=o,r=[{key:"options",get:function(){var t=kd.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(fv(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(fv(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(kd.selectorTabbable)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var t=this;this.manage(fv(this.element,"click",(function(e){var n=Ov(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(fv(this.element.ownerDocument.body,"keydown",(function(e){27===e.which&&t.shouldStateBeChanged("hidden")&&(e.stopPropagation(),t.hide(e))})))}}])&&Gv(e.prototype,n),r&&Gv(e,r),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 Kg(e).reduce((function(t,e){return e(t)}),function(){return 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}}),e&&tv(t,e)}(o,t);var e,n,r,i=ev(o);function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Qg(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,rv(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}}])&&Jg(e.prototype,n),r&&Jg(e,r),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}}),e&&Iv(t,e)}(o,t);var e,n,r,i=Nv(o);function o(){return kv(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 fv(e,i,(function(e){var i=Ov(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)&&Rv(e.prototype,n),r&&Rv(e,r),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}}),e&&bv(t,e)}(o,t);var e,n,r,i=_v(o);function o(){return mv(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"_changeState",value:function(){throw new Error("_changeState() should be overriden 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},u=[s.group,i].filter(Boolean).join("-").split("-").map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""),l=new CustomEvent(this.options["eventBefore".concat(u)],{bubbles:!0,cancelable:!0,detail:o}),c=o&&o.delegatorNode||this.element,h=!c.dispatchEvent(l);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,gv(f).concat([function(){c.dispatchEvent(new CustomEvent(t.options["eventAfter".concat(u)],{bubbles:!0,cancelable:!0,detail:o})),a&&a()}]))}}else a&&a(null,!0)}}])&&yv(e.prototype,n),r&&yv(e,r),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}}),e&&Cv(t,e)}(o,t);var e,n,r,i=Av(o);function o(){return Sv(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",Ev(t),e)}},{key:"hide",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("hidden",Ev(t),e)}}])&&Mv(e.prototype,n),r&&Mv(e,r),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}}),e&&lv(t,e)}(o,t);var e,n,r,i=cv(o);function o(){var t;av(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)})),uv(dv(o.prototype),"release",this).call(this)}}])&&sv(e.prototype,n),r&&sv(e,r),o}(t)}))),Yv=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.bx--modal-footer button.bx--btn").on("click",(function(){return i.model.exportToCSV()})),Zv.create(i.modal.node()).show()},i.handleHideModal=function(){},i.init(),i}return n(e,t),e.prototype.addEventListeners=function(){this.services.events.addEventListener(tt.Modal.SHOW,this.handleShowModal),this.services.events.addEventListener(tt.Modal.HIDE,this.handleHideModal)},e.prototype.removeEventListeners=function(){this.services.events.removeEventListener(tt.Modal.SHOW,this.handleShowModal),this.services.events.removeEventListener(tt.Modal.HIDE,this.handleHideModal)},e.prototype.assignRangeAndDomains=function(){var t=this.services.cartesianScales,e=this.model.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:fa.getProperty(e,"axes",i,"mapsTo")}:r[n]=null})),r},e.prototype.getModalHTML=function(){var t,e=this.model.getDisplayData(),n=this.model.getOptions(),r=n.data.groupMapsTo,i=this.services.cartesianScales,o=this.assignRangeAndDomains(),a=o.primaryDomain,s=o.primaryRange,u=o.secondaryDomain,l=o.secondaryRange;i.getDomainAxisScaleType()===I.TIME&&(t=function(t){return kg(t,"MMM d, yyyy")});var c=fa.getProperty(n,"style","prefix");return'\n\t\t<div class="bx--modal-container">\n\t\t\t<div class="bx--modal-header">\n\t\t\t\t<p class="bx--modal-header__label bx--type-delta">Tabular representation</p>\n\t\t\t\t<p class="bx--modal-header__heading bx--type-beta">'+n.title+'</p>\n\t\t\t\t<button class="bx--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="bx--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\t\t\t<div class="bx--modal-content"><table class="bx--data-table bx--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<th scope="col">\n\t\t\t\t\t\t\t\t<div class="bx--table-header-label">Group</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th scope="col">\n\t\t\t\t\t\t\t\t<div class="bx--table-header-label">'+a.label+'</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th scope="col">\n\t\t\t\t\t\t\t\t<div class="bx--table-header-label">'+s.label+"</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t"+(u?'<th scope="col"><div class="bx--table-header-label">'+u.label+"</div></th>":"")+"\n\t\t\t\t\t\t\t"+(l?'<th scope="col"><div class="bx--table-header-label">'+l.label+"</div></th>":"")+"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>"+e.map((function(e){return"\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>"+e[r]+"</td>\n\t\t\t\t\t\t\t\t<td>"+(null===e[a.identifier]?"&ndash;":t?t(e[a.identifier]):e[a.identifier])+"</td>\n\t\t\t\t\t\t\t\t\t\t<td>"+(null===e[s.identifier]||isNaN(e[s.identifier])?"&ndash;":e[s.identifier].toLocaleString())+"</td>\n\t\t\t\t\t\t\t\t"+(u?"<td>"+(null===e[u.identifier]?"&ndash;":e[u.identifier])+"\n\t\t\t\t\t\t\t\t</td>":"")+"\n\t\t\t\t\t\t\t\t"+(l?"<td>"+(null===e[l.identifier]||isNaN(e[l.identifier])?"&ndash;":e[l.identifier])+"\n\t\t\t\t\t\t\t\t</td>":"")+"\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t"})).join("")+'\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class="bx--modal-footer">\n\t\t\t <div class="'+kd.prefix+"--"+c+'-modal-footer-spacer"></div>\n\t\t\t <button class="bx--btn bx--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=ma(this.services.domUtils.getHolder()),n=fa.getProperty(t,"style","prefix");this.modal=rf.appendOrSelect(e,"div."+kd.prefix+"--"+n+"--modal"),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","bx--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-5ppouesvfhc-label").attr("aria-describedby","modal-5ppouesvfhc-heading").attr("tabindex",-1)}},e.prototype.destroy=function(){this.removeEventListeners(),this.isEventListenerAdded=!1},e}(Wg);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(qv||(qv={}));var Xv=((Wv={})[qv.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)}},Wv[qv.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)}},Wv[qv.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)}},Wv[qv.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)}},Wv),Kv="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},$v=function(){function t(t){void 0===t&&(t={}),this.positions=Xv,this.positions=Object.assign({},Xv,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),u=s.bottom-r().height,l=s.right-r().width;u=u<0?e.offsetHeight:u,l=l<0?e.offsetWidth:l;var c=e.offsetHeight*e.offsetWidth,h=c-u*l;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:Kv.innerHeight-Kv.scrollY,height:Kv.innerWidth-Kv.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}(),Qv=(new $v,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function Jv(t,e,n,r,i){var o=0===e,a=2===Number(kg(new Date(t),"c")),s=1===Number(kg(new Date(t),"q")),u=0!==e?n[e-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||rm(t)||im(t,u)||om(t);case"daily":return i?o||a||om(t):o||im(t,u)||om(t);case"monthly":return o||om(t);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(r+" is not a valid time interval.")}}function tm(t,e,n,r,i){var o=i.showDayName,a="daily"===r&&o?"weekly":r,s=new Date(t),u=fa.getProperty(i,"timeIntervalFormats")[a],l=fa.getProperty(u,"primary"),c=fa.getProperty(u,"secondary");return kg(s,Jv(t,e,n,r,o)?l:c,{locale:i.localeObject})}function em(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function nm(t){return 1===t.length?"15seconds":function(t){var e=Qv.reduce((function(e,n,r){n[0];var i=n[1],o=Qv[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Qv[e][0]}(Es(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function rm(t){var e=em(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function im(t,e){return em(t).M!==em(e).M}function om(t){var e=em(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}var am=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="threshold",r.renderType=C.SVG,r.positionService=new $v,r}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=fa.getProperty(this.getOptions(),"axes"),r=[];Object.keys(n).forEach((function(t){if(Object.values(L).includes(t)){var e=n[t];e.thresholds&&e.thresholds.length>0&&r.push({axisPosition:t,thresholds:e.thresholds})}}));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(e){return e.axisPosition=t.axisPosition,e}))}));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 u=this;o.each((function(e){var n=e.axisPosition,r=u.services.cartesianScales.getScaleByPosition(n),i=u.services.cartesianScales.getScaleTypeByPosition(n),o=u.services.cartesianScales.getMainXScale(),a=u.services.cartesianScales.getMainYScale(),s=i===I.LABELS,l=o.range(),c=l[0],h=l[1],d=a.range(),f=d[0],p=d[1],g=u.services.cartesianScales,v=g.getOrientation(),m=fa.flipDomainAndRangeBasedOnOrientation((function(t){return g.getDomainValue(t)}),(function(t){return g.getRangeValue(t)}),v),y=m[0],b=m[1],_=ma(this);n===L.TOP||n===L.BOTTOM?(_.selectAll("line.threshold-line").transition(u.services.transitions.getTransition("threshold-line-update",t)).attr("y1",p).attr("y2",f).attr("x1",(function(t){var e=t.value;return y(e)+(s?r.step()/2:0)})).attr("x2",(function(t){var e=t.value;return y(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),_.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(function(t){var e=t.value;return-y(e)})).attr("width",Math.abs(f-p)).classed("rotate",!0)):(_.selectAll("line.threshold-line").transition(u.services.transitions.getTransition("threshold-line-update",t)).attr("x1",c).attr("x2",h).attr("y1",(function(t){var e=t.value;return b(e)+(s?r.step()/2:0)})).attr("y2",(function(t){var e=t.value;return b(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),_.selectAll("rect.threshold-hoverable-area").attr("x",c).attr("y",(function(t){var e=t.value;return b(e)})).attr("width",Math.abs(h-c)).classed("rotate",!1))})),this.services.events.addEventListener(tt.Threshold.SHOW,(function(t){e.setThresholdLabelPosition(t.detail.datum),e.label.classed("hidden",!1)})),this.services.events.addEventListener(tt.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)===I.TIME){var i=[L.LEFT,L.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=fa.getProperty(r,"timeScale"),l=nm(s.ticks());return tm(e,0,s.ticks(),l,u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=ma(this.services.domUtils.getHolder()),e=fa.getProperty(this.getOptions(),"style","prefix");this.label=rf.appendOrSelect(t,"div."+kd.prefix+"--"+e+"--threshold--label").classed("hidden",!0)},e.prototype.setThresholdLabelPosition=function(t){var e=this.services.domUtils.getHolder(),n=_a(e),r=t.valueFormatter?t.valueFormatter(t.value):this.getFormattedValue(t);this.label.html((t.label||"Threshold")+": "+r).style("background-color",t.fillColor);var i=this.label.node(),o=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},i,[qv.RIGHT,qv.LEFT,qv.TOP,qv.BOTTOM],(function(){return{width:e.offsetWidth,height:e.offsetHeight}})),a=this.positionService.findPositionAt({left:n[0],top:n[1]},i,o);this.positionService.setElement(i,a)},e.prototype.addEventListeners=function(){var t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(){ma(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(tt.Threshold.SHOW,{hoveredElement:ma(this),datum:ma(this).datum()})})).on("mouseout",(function(){ma(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(tt.Threshold.HIDE,{hoveredElement:ma(this),datum:ma(this).datum()})}))},e}(Wg),sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e.renderType=C.HTML,e}return n(e,t),e.prototype.render=function(){var t=this.getComponentContainer().selectAll("p.title").data([this.getOptions().title]);if(t.enter().append("p").classed("title",!0).merge(t).attr("x",0).attr("y","1em").html((function(t){return t})),t.node()&&t.node().offsetWidth<t.node().scrollWidth){var e=this;t.on("mouseover",(function(){e.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:t,content:t.text()})})).on("mousemove",(function(){e.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("mouseout",(function(){e.services.events.dispatchEvent(tt.Tooltip.HIDE)}))}t.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=rf.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(){a.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){a.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("mouseout",(function(){a.services.events.dispatchEvent(tt.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return rf.getSVGElementSize(this.parent.node(),{useAttr:!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}(Wg),um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(){var t=this.model.getDisplayData(),e=this.getOptions(),n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=e.data.groupMapsTo,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=rf.appendOrSelect(n,"text.meter-title");o>0&&a.node().getComputedTextLength()>o&&this.truncateTitle(a,o)},e.prototype.displayStatus=function(){var t=this.getComponentContainer(),e=rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=e.width?e.width:this.parent.node().getAttribute("width"),r=this.model.getStatus(),i=ft.status.indicatorSize/2,o=rf.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 u=o.selectAll("path.innerFill").data(a);u.enter().append("path").merge(u).attr("d",this.getStatusIconPathString(r)).attr("transform","translate(-"+i+", 0)").attr("class","innerFill"),u.exit().remove(),s.exit().remove()},e.prototype.appendPercentage=function(){var t=this.model.getDisplayData().value,e=this.getComponentContainer(),n=rf.appendOrSelect(e,"text.meter-title"),r=!0===fa.getProperty(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),o=ft.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=rf.appendOrSelect(this.parent,"tspan"),i=ft.statusBar.paddingRight,o=Math.ceil(r.node().getComputedTextLength());rf.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+o+i)},e.prototype.getMaxTitleWidth=function(){var t=rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),e=t.width?t.width:this.parent.node().getAttribute("width"),n=rf.appendOrSelect(this.parent,"text.percent-value"),r=ft.statusBar.paddingRight,i=n.node().getComputedTextLength(),o=rf.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(rf.getSVGElementSize(o,{useBBox:!0}).width+ft.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case Y.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 Y.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case Y.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}(sm),lm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.renderType=C.HTML,i.isEventListenerAdded=!1,i.positionService=new $v,i.handleShowTooltip=function(t){var e=t.detail.data||t.detail.items,n=i.getTooltipHTML(t),r=rf.appendOrSelect(i.tooltip,"div.content-box");if(fa.getProperty(i.getOptions(),"tooltip","customHTML"))if(t.detail.content){var o='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";r.html(o)}else r.html(i.model.getOptions().tooltip.customHTML(e,n));else r.html(n);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(tt.Tooltip.MOVE,(function(e){!1===t.tooltip.classed("hidden")&&t.positionTooltip(e)})),this.services.events.addEventListener(tt.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(tt.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(tt.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(tt.Tooltip.MOVE,null),this.services.events.removeEventListener(tt.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(tt.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(tt.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=fa.getProperty(n,"tooltip","truncation","type"),i=fa.getProperty(n,"tooltip","truncation","threshold"),o=fa.getProperty(n,"tooltip","truncation","numCharacter");return r!==k.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.truncateLabel(t.label,r,o)),t.value&&t.value.length>i&&(t.value=fa.truncateLabel(t.value,r,o)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";else{var n=this.getItems(t);e="<ul class='multi-tooltip'>"+this.formatItems(n).map((function(t){return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.class?'<a class="tooltip-color '+t.class+'"></a>':"")+"\n\t\t\t\t\t\t\t\t"+(t.color?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t\t\t<p>'+(t.label||"")+"</p>\n\t\t\t\t\t\t\t\t"+(t.labelIcon?'<span class="label-icon"/>'+t.labelIcon+"</span>":"")+"\n\t\t\t\t\t\t\t\t</div>\n\t\t\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\t\t</div>\n\t\t\t\t\t\t</li>"})).join("")+"</ul>"}return e},e.prototype.valueFormatter=function(t,e){var n=this.getOptions(),r=fa.getProperty(n,"tooltip","valueFormatter");return r?r(t,e):"function"==typeof t.getTime?kg(t,"MMM d, yyyy"):t.toLocaleString()},e.prototype.render=function(){var t=this.getOptions(),e=fa.getProperty(t,"tooltip","enabled");if(e){var n=ma(this.services.domUtils.getHolder()),r=fa.getProperty(t,"style","prefix");this.tooltip=rf.appendOrSelect(n,"div."+kd.prefix+"--"+r+"--tooltip"),this.tooltip.style("max-width",null),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=fa.getProperty(i,"zoomBar","top","enabled"),a=fa.getProperty(t,"detail","mousePosition");if(a){var s=fa.getProperty(i,"zoomBar","top","type"),u=bt.height[s];o&&(a[1]+=u+bt.spacerHeight)}else a=_a(n);var l,c=n.offsetWidth,h=n.offsetHeight;l=a[0]/c>.9?qv.LEFT:a[0]/c<.1?qv.RIGHT:this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[qv.RIGHT,qv.LEFT,qv.TOP,qv.BOTTOM],(function(){return{width:c,height:h}}));var d=mt.horizontalOffset;l===qv.LEFT&&(d*=-1),e=this.positionService.findPositionAt({left:a[0]+d,top:a[1]},r,l),this.positionService.setElement(r,e)},e}(Wg),cm=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.getDomainAxisOptions(),o.getDomainIdentifier()),s=i.data.groupMapsTo,u=o.getDomainLabel(),l=o.getRangeLabel(),c=n[0][a];if(1===n.length){var h=n[0],d=o.getRangeIdentifier(h),f=h[d];r=M([{label:u,value:c}],Array.isArray(f)&&2===f.length?[{label:"Start",value:f[0]},{label:"End",value:f[1]}]:[{label:l,value:h[d]}]),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:h[s],color:this.model.getFillColor(h[s]),class:this.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:h[s]})})}else if(n.length>1){if(r=(r=[{label:u,value:c}]).concat(n.map((function(t){return{label:t[s],value:t[o.getRangeIdentifier(t)],color:e.model.getFillColor(t[s]),class:e.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:t[s]})}})).sort((function(t,e){return e.value-t.value}))),!o.isDualAxes()&&!0===fa.getProperty(i,"tooltip","showTotal")){var p=o.getRangeIdentifier();r.push({label:i.tooltip.totalLabel||"Total",value:n.reduce((function(t,e){return t+e[p]}),0),bold:!0})}}return r},e}(lm),hm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",i.renderType=C.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(),u=s[0],l=s[1];this.chartClipPath=rf.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=rf.appendOrSelect(this.chartClipPath,"rect."+this.type);c.attr("x",o).attr("y",l).attr("width",a-o).attr("height",u-l),this.chartClipPath.merge(c).lower()},e}(Wg),dm=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=rf.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;this.chartClipPath=rf.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var i=rf.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}(hm),fm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e.renderType=C.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(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t.name!==n.datum().name?ot.opacity.unselected:ot.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",ot.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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=[0,0],i=this.services.cartesianScales,o=i.getOrientation(),a=Dh().curve(this.services.curves.getD3Curve()).defined((function(t,e){var n=t[i.getRangeIdentifier()];return null!=n})),s=this.model.getGroupedData(this.configs.groups),u=fa.getProperty(this.getOptions(),"bounds"),l=u&&s&&1===s.length;!l&&u&&console.warn("Bounds can only be shown when having 1 single datagroup, you've supplied "+s.length);var c=function(t,e){return l?i.getBoundedScaledValues(t,e)[0]:i.getRangeValue(0)},h=function(t,e){return l?i.getBoundedScaledValues(t,e)[1]:i.getRangeValue(t,e)};o===R.VERTICAL?(r=this.services.cartesianScales.getMainYScale().domain(),a.x((function(t,e){return i.getDomainValue(t,e)})).y0((function(t,e){return c(t,e)})).y1((function(t,e){return h(t,e)}))):(r=this.services.cartesianScales.getMainXScale().domain(),a.x0((function(t,e){return c(t,e)})).x1((function(t,e){return h(t,e)})).y((function(t,e){return i.getDomainValue(t,e)})));var d=fa.getProperty(this.getOptions(),"color","gradient","enabled"),f=s&&1===s.length&&d;s.length>1&&d&&console.error("Gradients can only be enabled when having 1 single dataset");var p=n.selectAll("path.area").data(s,(function(t){return t.name})),g=ma(this.services.domUtils.getMainContainer());if(p.exit().attr("opacity",0).remove(),s.length){if(f){var v=g.select("path."+this.model.getColorClassName({classNameTypes:[P.STROKE],dataGroupName:s[0].name})).node(),m=void 0;if(v)m=getComputedStyle(v,null).getPropertyValue("stroke");else{var y=fa.getProperty(this.model.getOptions(),"color","scale");if(null!==y)m=y[Object.keys(y)[0]]}bp.appendOrUpdateLinearGradient({svg:this.parent,id:s[0].name.replace(" ","")+"_"+this.gradient_id,x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:bp.getStops(r,m)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));var b=this,_=p.enter().append("path");f?_.merge(p).style("fill",(function(t){return"url(#"+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 a(e)})):(_.attr("opacity",0).merge(p).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 b.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",l?1:ot.opacity.selected).attr("d",(function(t){var e=t.data;return a(e)})),l&&_.attr("fill-opacity",ot.opacity.selected).style("stroke",(function(t){return b.model.getStrokeColor(t.name)})).style("stroke-dasharray","2, 2").attr("stroke-width","0.7px"))}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wg),pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return fa.getProperty(t,0,r)!==n.datum().name?ot.opacity.unselected:ot.opacity.selected}))},e.handleLegendMouseOut=function(){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",ot.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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})),u=this.model.getStackedData({percentage:s,groups:this.configs.groups}),l=fa.getProperty(u,0,0),c=this.services.cartesianScales.getDomainAxisPosition({firstDatum:l}),h=this.services.cartesianScales.getRangeAxisPosition({firstDatum:l}),d=this.services.cartesianScales.getScaleByPosition(h),f=n.selectAll("path.area").data(u,(function(t){return fa.getProperty(t,0,a)}));this.areaGenerator=Dh().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(u,(function(t){return fa.getProperty(t,0,a)})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:fa.getProperty(t,0,a),originalClassName:"area"})})).style("fill",(function(t){return i.model.getFillColor(fa.getProperty(t,0,a))})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",ot.opacity.selected).attr("d",this.areaGenerator)},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Wg),gm=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=rf.getSVGElementSize(this.parent,{useAttrs:!0}).width;return r.step?Math.min(e.bars.maxWidth,r.step()/2):Math.min(e.bars.maxWidth,.25*i/n)},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}(Wg),vm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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(this.services.transitions.getTransition("bar-update-enter",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(),u=t[o],l=e.services.cartesianScales.getDomainValue(t,n)-s/2,c=l+s;if(Array.isArray(u)&&2===u.length)r=e.services.cartesianScales.getRangeValue(u[0]),i=e.services.cartesianScales.getRangeValue(u[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=u>0&&a===R.VERTICAL||u<0&&a===R.HORIZONTAL?r-2:r+2),!e.isOutsideZoomedDomain(l,c))return fa.generateSVGPathString({x0:l,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){var n=ma(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){ma(this);t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEMOVE,{element:ma(this),datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Bar.BAR_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(gm),mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.renderType=C.SVG,e.padding=5,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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=ss(n,(function(t){return t[e.services.cartesianScales.getDomainIdentifier(t)]})).keys(),s=o.selectAll("g.bars").data(a,(function(t){return t}));s.exit().attr("opacity",0).remove();var u=s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(s);u.transition(this.services.transitions.getTransition("bar-group-update-enter",t)).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===R.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"}));var l=u.selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}),(function(t){return t[i]}));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",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){var n=e.groupScale(t[i]),r=n,o=n+e.getBarWidth(),a=e.services.cartesianScales.getRangeAxisPosition({datum:t}),s=e.services.cartesianScales.getValueThroughAxisPosition(a,0),u=e.services.cartesianScales.getRangeValue(t);if(!e.isOutsideZoomedDomain(r,o))return fa.generateSVGPathString({x0:r,x1:o,y0:s,y1:u},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){var n=ma(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Bar.BAR_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.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)]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getGroupedData(this.configs.groups);if(1===t.length)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t.length-1)},e.prototype.getBarWidth=function(){var t=this.getOptions(),e=fa.getProperty(t,"bars","width"),n=fa.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(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},e.prototype.setGroupScale=function(){var t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=Ds().domain(t).rangeRound([0,this.getGroupWidth()])},e}(gm),ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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}),s=n.selectAll("g.bars").data(a,(function(t){return fa.getProperty(t,0,o)}));s.exit().attr("opacity",0).remove(),s.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(this.services.transitions.getTransition("bar-update-enter",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,s=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),l=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(a,s))return Math.abs(l-u)>0&&Math.abs(l-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===R.VERTICAL?l+=1:l-=1),fa.generateSVGPathString({x0:a,x1:s,y0:u,y1:l},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){var r,i=ma(this);i.classed("hovered",!0),i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")),e.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOVER,{element:i,datum:n});var o=e.model.getDisplayData(e.configs.groups).find((function(r){var i=e.services.cartesianScales.getDomainIdentifier(r);return r[e.services.cartesianScales.getRangeIdentifier(r)]===n.data[n.group]&&r[i].toString()===n.data.sharedStackKey&&r[t]===n.group}));if(void 0===o){var a=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier();(r={})[a]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,o=r}e.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:i,data:[o]})})).on("mousemove",(function(t){var n=ma(this);e.services.events.dispatchEvent(tt.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(tt.Bar.BAR_CLICK,{element:ma(this),datum:t})})).on("mouseout",(function(t){var n=ma(this);n.classed("hovered",!1),e.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOUT,{element:n,datum:t}),e.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(gm),bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="boxplot",e.renderType=C.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(),u=a.range(),l=u[0],c=u[1],h=s.range(),d=c-l,f=h[0]-h[1];if(0!==d){var p=this.services.cartesianScales,g=p.getOrientation(),v=g===R.VERTICAL,m=fa.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],_=Math.floor((v?d:f)/o.length),x=Math.min(_/2,16),w=this.model.getBoxplotData(),O=n.selectAll(".box-group").data(w);O.exit().remove();var E=O.enter().append("g").attr("class","box-group"),T=O.merge(E);E.append("path").merge(O.select("path.vertical-line.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"vertical-line start"})})).attr("stroke-width",ct.strokeWidth.default).attr("fill","none").transition(this.services.transitions.getTransition("boxplot-update-verticalstartline",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 fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.vertical-line.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"vertical-line end"})})).attr("stroke-width",ct.strokeWidth.default).attr("fill","none").transition(this.services.transitions.getTransition("boxplot-update-verticalendline",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 fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.box")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],originalClassName:"box"})})).attr("fill-opacity",ct.box.opacity.default).attr("stroke-width",ct.strokeWidth.default).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","box").transition(this.services.transitions.getTransition("boxplot-update-quartiles",t)).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,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 fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.max);return fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.whisker.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"whisker start"})})).attr("stroke-width",ct.strokeWidth.thicker).attr("fill","none").transition(this.services.transitions.getTransition("boxplot-update-startingwhisker",t)).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/4,n=e+x/2,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.min);return fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.median")).attr("fill","none").attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"median"})})).attr("stroke-width",2).transition(this.services.transitions.getTransition("boxplot-update-median",t)).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(t.quartiles.q_50),o=r;return fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.whisker.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"whisker end"})})).attr("stroke-width",ct.strokeWidth.thicker).attr("fill","none").transition(this.services.transitions.getTransition("boxplot-update-endingwhisker",t)).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/4,n=e+x/2,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.whiskers.max);return fa.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",ct.circle.radius).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],originalClassName:"outlier"})})).attr("fill-opacity",ct.circle.opacity.default).attr("cx",y).transition(this.services.transitions.getTransition("boxplot-update-circles",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){var i=ma(this);ma(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",ct.box.opacity.hovered),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:i,items:[{label:e.tooltip.groupLabel,value:r[n],class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP]})},{label:"Minimum",value:r.whiskers.min},{label:"Q1",value:r.quartiles.q_25},{label:"Median",value:r.quartiles.q_50},{label:"Q3",value:r.quartiles.q_75},{label:"Maximum",value:r.whiskers.max},{label:"IQR",value:r.quartiles.q_75-r.quartiles.q_25}]}),t.services.events.dispatchEvent(tt.Boxplot.BOX_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Boxplot.BOX_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Boxplot.BOX_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);ma(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",ct.box.opacity.default),t.services.events.dispatchEvent(tt.Boxplot.BOX_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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){var o=ma(this);o.classed("hovered",!0).attr("fill-opacity",ct.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:o,items:[{label:e.tooltip.groupLabel,value:i[n],class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP]})},{label:"Outlier",value:i[r]}]}),t.services.events.dispatchEvent(tt.Boxplot.OUTLIER_MOUSEOVER,{element:o,datum:i})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Boxplot.OUTLIER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Boxplot.OUTLIER_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1).attr("fill-opacity",ct.circle.opacity.default),t.services.events.dispatchEvent(tt.Boxplot.OUTLIER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},e}(Wg),_m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.renderType=C.SVG,e.handleChartHolderOnHover=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-hover-scatter")).attr("opacity",1)},e.handleChartHolderOnMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(tt.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(tt.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(fa.getProperty(this.getOptions(),"points","enabled")||fa.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=fa.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)}),(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)}),r),u=s[0],l=s[1],c=u(t,e),h=l(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,u=this.services,l=u.cartesianScales,c=u.transitions,h=i.data.groupMapsTo,d=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),f=d[0],p=d[1],g=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=l.getDomainIdentifier(t),r=n.model.getIsFilled(t[h],t[e],t,a)?[P.FILL,P.STROKE]:[P.STROKE];return n.model.getColorClassName({classNameTypes:r,dataGroupName:t[h],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){var e=l.getDomainIdentifier(t);return n.model.getIsFilled(t[h],t[e],t,a)})).classed("unfilled",(function(t){var e=l.getDomainIdentifier(t);return!n.model.getIsFilled(t[h],t[e],t,a)})).transition(c.getTransition("scatter-update-enter",e)).attr("cx",f).attr("cy",p).attr("r",i.points.radius).style("fill",(function(t){var e=l.getDomainIdentifier(t);if(n.model.getIsFilled(t[h],t[e],t,a))return n.model.getFillColor(t[h],t[e],t)})).style("stroke",(function(t){var e=l.getDomainIdentifier(t);return n.model.getStrokeColor(t[h],t[e],t)})).attr("fill-opacity",a?s:1).attr("opacity",g?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[l.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){var r=ma(this);r.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:n[e],originalClassName:r.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(tt.Tooltip.SHOW,{hoveredElement:r,data:[n],additionalItems:t.getTooltipAdditionalItems(n)}),t.services.events.dispatchEvent(tt.Scatter.SCATTER_MOUSEOVER,{element:r,datum:n})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Scatter.SCATTER_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(n){var r=ma(this);if(r.classed("hovered",!1),!t.configs.filled){var i=t.getOptions().points.filled,o=t.services.cartesianScales.getDomainIdentifier(n),a=t.model.getIsFilled(n[e],n[o],n,i);r.classed("unfilled",!a).style("fill",(function(n){return a||i?t.model.getFillColor(n[e],n[o],n):null}))}t.services.events.dispatchEvent(tt.Scatter.SCATTER_MOUSEOUT,{element:r,datum:n}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(tt.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(tt.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Wg),xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e.renderType=C.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=rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,s=a?ps(i):[1,1];return al().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,u=this.services.cartesianScales,l=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return u.getDomainValue(t,e)}),(function(t,e){return u.getRangeValue(t,e)}),u.getOrientation()),c=l[0],h=l[1];t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).transition(this.services.transitions.getTransition("bubble-update-enter",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=fa.getProperty(this.getOptions(),"bubble");return[{label:fa.getProperty(e,"radiusLabel"),value:t[fa.getProperty(e,"radiusMapsTo")]}]},e}(_m),wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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(),u=this.services.cartesianScales.getRangeIdentifier(),l=s.range(),c=l[0],h=l[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=rf.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(n.services.transitions.getTransition("bullet-range-box-update-enter",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),fa.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),(e=rf.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(n.services.transitions.getTransition("bullet-bar-update-enter",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 fa.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=rf.appendOrSelect(o,"g.markers").selectAll("path.marker").data(a.filter((function(t){return null!==fa.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(n.services.transitions.getTransition("bullet-marker-update-enter",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 fa.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!==fa.getProperty(t,"marker")})).forEach((function(t){var n=t.marker,r=t[u];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=rf.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(n.services.transitions.getTransition("bullet-quartile-update-enter",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,u=n.services.cartesianScales.getRangeValue(i,e),l=u;return fa.generateSVGPathString({x0:a,x1:s,y0:u,y1:l},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),this.addEventListeners()},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.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){var o=ma(this);o.classed("hovered",!0),o.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOVER,{element:o,datum:i});var a=fa.getProperty(e,"bullet","performanceAreaTitles"),s=t.getMatchingRangeIndexForDatapoint(i);t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:o,items:[{label:e.tooltip.groupLabel||"Group",value:i[n],class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:i[n]})},{label:"Value",value:i[r]},{label:"Target",value:i.marker},{label:"Percentage",value:Math.floor(i[r]/i.marker*100)+"%"},{label:"Performance",value:a[s]}]})})).on("mousemove",(function(e){t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEMOVE,{element:ma(this),datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Bar.BAR_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wg),Om=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?dt.opacity.unselected:dt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",dt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],l=s[1],c=this.getOptions(),h=Lh().x(u).y(l).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:fa.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:!fa.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:[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(this.services.transitions.getTransition("line-update-enter",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(){this.parent.selectAll("path.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wg),Em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="lollipop",e.renderType=C.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]?dt.weight.unselected:dt.weight.selected}))},e.handleScatterOnMouseOut=function(t){e.parent.selectAll("line.line").attr("stroke-width",dt.weight.unselected)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t[r]!==n.datum().name?dt.opacity.unselected:dt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("line.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",dt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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(),u=o.getDomainIdentifier(),l=o.getOrientation(),c=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),l),h=c[0],d=c[1],f=n.selectAll("line.line").data(this.getScatterData(),(function(t){return t[i]+"-"+t[u]}));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(this.services.transitions.getTransition("lollipop-line-update-enter",t)).style("stroke",(function(t){return e.model.getFillColor(t[i],t[u],t)})).attr("opacity",1);l===R.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(tt.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(tt.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e.prototype.destroy=function(){this.parent.selectAll("line.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(tt.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(tt.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e}(_m),Tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this;if(fa.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}),u=n.selectAll("g.dots").data(s,(function(t){return fa.getProperty(t,0,o)}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(u).selectAll("circle.dot").data((function(t){return t}));l.exit().attr("opacity",0).remove();var c=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).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,u){var l,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][u].data[c]),null!==d&&s.push(((l={})[i]=c,l[p]=h,l[g]=d,l)))}))})),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}(_m);function Sm(t,e){var n=this,r=xu(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=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return pt.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getComponentContainer(),o=this.model.getDisplayData().filter((function(t){return t.value>0})),a=this.getOptions(),s=a.data.groupMapsTo,u=this.computeRadius();this.arc=Sh().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=Sh().innerRadius(this.getInnerRadius()).outerRadius(u+pt.hoverArc.outerRadiusOffset);var l=function(){var t=Rh,e=kh,n=null,r=ah(0),i=ah(vh),o=ah(0);function a(a){var s,u,l,c,h,d=a.length,f=0,p=new Array(d),g=new Array(d),v=+r.apply(this,arguments),m=Math.min(vh,Math.max(-vh,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,l=f?(m-d*b)/f:0;s<d;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+b,g[u]={data:a[u],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:ah(+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:ah(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:ah(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:ah(+t),a):o},a}().value((function(t){return t.value})).sort(fa.getProperty(a,"pie","sortFunction")).padAngle(pt.padAngle)(o),c=rf.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,(function(t){return t.data[s]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t.data[s],originalClassName:"slice"})})).style("fill",(function(t){return n.model.getFillColor(t.data[s])})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+fa.convertValueToPercentage(t.data.value,o)+"%"})).attrTween("d",(function(t){return Sm.bind(this)(t,n.arc)}));var h=a.pie.labels.enabled,d=h?l.filter((function(t){return t.value>0})):[],f=rf.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(d,(function(t){return t.data[s]}));f.exit().attr("opacity",0).remove();var p=f.enter().append("text").classed("pie-label",!0),g=[];p.merge(f).style("text-anchor","middle").text((function(t){return a.pie.labels.formatter?a.pie.labels.formatter(t):fa.convertValueToPercentage(t.data.value,o)+"%"})).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=d.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<pt.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+pt.callout.offsetX+pt.callout.textMargin+t.textOffsetX,o=t.yPosition-pt.callout.offsetY,t.direction=z.RIGHT,g.push(t)):(i=t.xPosition-pt.callout.offsetX-t.textOffsetX-pt.callout.textMargin,o=t.yPosition-pt.callout.offsetY,t.direction=z.LEFT,g.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(g);var v=fa.getProperty(a,"donut")?"donut":"pie",m=fa.getProperty(a,v,"alignment"),y=rf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,b=h?pt.yOffset:0,_=u+(h?pt.xOffset:0);m===B.CENTER?_=y/2:m===B.RIGHT&&(_=y-u-pt.xOffset);var x=u+b;g.length>0&&(x+=pt.yOffsetCallout),i.attr("x",_+7).attr("y",x),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=rf.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.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");i.merge(n).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===z.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+pt.callout.offsetX,y:n-pt.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-pt.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-pt.callout.offsetX,y:n-pt.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+pt.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return ma(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 ma(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){var n=ma(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(tt.Pie.SLICE_MOUSEOVER,{element:ma(this),datum:e});var r=t.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value}]})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Pie.SLICE_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(tt.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=rf.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+pt.radiusOffset:i},e}(Wg),Cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e.renderType=C.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 fa.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 fa.getProperty(t,"gauge","type")===q.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(fa.getProperty(e,"gauge","deltaArrow","direction")){case Z.UP:return"4,10 8,6 12,10";case Z.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(),u=this.getStartAngle(),l=u+a*s,c=u+s,h=this.computeRadius(),d=this.getInnerRadius();this.backgroundArc=Sh().innerRadius(d).outerRadius(h).startAngle(l).endAngle(c),this.arc=Sh().innerRadius(d).outerRadius(h).startAngle(u).endAngle(l),rf.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);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 fa.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.value})),this.drawValueNumber(),this.drawDelta(),f.exit().remove();var p=fa.getProperty(i,"gauge","alignment"),g=rf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,v=h;p===B.CENTER?v=g/2:p===B.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=fa.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=fa.getProperty(e,"gauge","valueFontSize"),s=fa.getProperty(e,"gauge","deltaFontSize"),u=fa.getProperty(e,"gauge","numberSpacing"),l=fa.getProperty(e,"gauge","showPercentageSymbol"),c=0;n!==q.FULL||i?n===q.SEMI&&i&&(c=-(s(o)+u)):c=s(o);var h=rf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),d=a(o),f=rf.appendOrSelect(h,"g.gauge-value-number"),p=fa.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=rf.getSVGElementSize(rf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width,m=d/2,y=l?"%":"",b=rf.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",m+"px").attr("x",v/2).text(y),_=rf.getSVGElementSize(b,{useBBox:!0}),x=_.width,w=_.height;b.attr("y","-"+w/2+"px"),f.attr("transform","translate(-"+x/2+", 0)")},e.prototype.drawDelta=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=this.getDelta(),i=this.computeRadius(),o=r?fa.getProperty(n,"gauge","deltaFontSize"):function(){return 0},a=r?fa.getProperty(n,"gauge","numberFormatter"):function(){return null},s=fa.getProperty(n,"gauge","deltaArrow","size"),u=fa.getProperty(n,"gauge","numberSpacing"),l=fa.getProperty(n,"gauge","showPercentageSymbol"),c=rf.appendOrSelect(e,"g.gauge-numbers"),h=rf.appendOrSelect(c,"g.gauge-delta").attr("transform","translate(0, "+(o(i)+u)+")"),d=rf.appendOrSelect(h,"text.gauge-delta-number"),f=l?"%":"";d.data(null===r?[]:[r]),d.enter().append("text").classed("gauge-delta-number",!0).merge(d).attr("text-anchor","middle").style("font-size",o(i)+"px").text((function(t){return""+a(t)+f}));var p=rf.getSVGElementSize(rf.appendOrSelect(e,".gauge-delta-number"),{useBBox:!0}).width,g=fa.getProperty(n,"gauge","deltaArrow","enabled"),v=h.selectAll("svg.gauge-delta-arrow").data(null!==r&&g?[r]:[]);v.enter().append("svg").merge(v).attr("class","gauge-delta-arrow").attr("x",-s(i)-p/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=ma(this);rf.appendOrSelect(e,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var i=fa.getProperty(n,"gauge","status");rf.appendOrSelect(e,"polygon.gauge-delta-arrow").attr("class",null!==i?"gauge-delta-arrow status--"+i:"").attr("points",t.getArrow(r))})),v.exit().remove(),d.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-fa.getProperty(this.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e){t.services.events.dispatchEvent(tt.Gauge.ARC_MOUSEOVER,{element:ma(this),datum:e})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(tt.Gauge.ARC_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.getOptions(),e=fa.getProperty(t,"gauge","type"),n=rf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===q.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Wg),Am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this;if(this.model.isDataEmpty())this.getComponentContainer().select("g.center").remove();else{var r=rf.appendOrSelect(this.getComponentContainer(),"g.center"),i=this.getOptions(),o=this.computeRadius();rf.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(ma(this))})),rf.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text(fa.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.getOptions(),n=fa.getProperty(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,e){return t+e.value}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?wu:vu)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Mm),Pm=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=fa.getProperty(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===j.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===j.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===j.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==j.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===R.VERTICAL&&this.drawYGrid(t),e===R.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=al().domain([0,1]).range(t),this.yScale=al().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=rf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;this.backdrop=rf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",r).attr("height",i);var o=rf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var a=this.xScale.range(),s=a[0],u=(a[1],this.yScale.range()),l=(u[0],u[1]);this.backdrop.merge(o).attr("x",s).attr("y",l),o.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("width"),n=fa.getProperty(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((function(t){return t*e})),i=rf.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)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=fa.getProperty(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=rf.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)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=rf.getSVGElementSize(r,{useAttrs:!0}),o=i.width,a=i.height,s=rf.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=0===e?"pie":"donut",l=fa.getProperty(this.getOptions(),u,"alignment");rf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none");var c=Sh().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(pt.radiusOffset),d=t+(Math.min(o,a)-2*t)/2,f=rf.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),p=t+pt.xOffset;l===B.CENTER?p=o/2:l===B.RIGHT&&(p=o-t-pt.xOffset);var g=t+pt.yOffset;f.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=rf.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+pt.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=rf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=rf.appendOrSelect(e,"defs").lower(),o=rf.appendOrSelect(i,"linearGradient").attr("id",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(rt).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Wg),Lm=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=fa.getProperty(this.getOptions(),"data","loading"),n=!(fa.getProperty(this.getOptions(),"grid","x","enabled")||fa.getProperty(this.getOptions(),"grid","y","enabled")||fa.getProperty(this.getOptions(),"axes","bottom","visible")||fa.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=rf.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)},e.prototype.updateBackdropStyle=function(){var t=this.parent;this.backdrop=rf.appendOrSelect(t,"svg.chart-skeleton.DAII");var e=rf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");e.classed("shimmer-effect-lines",!1),e.classed("shimmer-effect-sparkline",!0)},e}(Pm);function Dm(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 km(t,e){var n,r,i,o,a,s=new Bm(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Rm);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Bm(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Nm)}function Rm(t){return t.children}function Im(t){t.data=t.data.data}function Nm(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Bm(t){this.data=t,this.depth=this.height=0,this.parent=null}Bm.prototype=km.prototype={constructor:Bm,count:function(){return this.eachAfter(Dm)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},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(){var t=[];return this.each((function(e){t.push(e)})),t},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 km(this).eachBefore(Im)}};var Vm=Array.prototype.slice;function Um(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}(Vm.call(t))).length,o=[];r<i;)e=t[r],n&&zm(n,e)?++r:(n=Fm(o=Gm(o,e)),r=0);return n}function Gm(t,e){var n,r;if(jm(e,t))return[e];for(n=0;n<t.length;++n)if(Hm(e,t[n])&&jm(Wm(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(Hm(Wm(t[n],t[r]),e)&&Hm(Wm(t[n],e),t[r])&&Hm(Wm(t[r],e),t[n])&&jm(qm(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Hm(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 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,e){for(var n=0;n<e.length;++n)if(!zm(t,e[n]))return!1;return!0}function Fm(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return Wm(t[0],t[1]);case 3:return qm(t[0],t[1],t[2])}var e}function Wm(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,l=a-r,c=s-i,h=Math.sqrt(u*u+l*l);return{x:(n+o+u/h*c)/2,y:(r+a+l/h*c)/2,r:(h+i+s)/2}}function qm(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,h=n.r,d=r-a,f=r-l,p=i-s,g=i-c,v=u-o,m=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+u*u,_=y-l*l-c*c+h*h,x=f*p-d*g,w=(p*_-g*b)/(2*x)-r,O=(g*v-p*m)/x,E=(f*b-d*_)/(2*x)-i,T=(d*m-f*v)/x,S=O*O+T*T-1,M=2*(o+w*O+E*T),C=w*w+E*E-o*o,A=-(S?(M+Math.sqrt(M*M-4*S*C))/(2*S):C/M);return{x:r+w+O*A,y:i+E+T*A,r:A}}function Zm(t,e,n){var r,i,o,a,s=t.x-e.x,u=t.y-e.y,l=s*s+u*u;l?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(l+a-i)/(2*l),o=Math.sqrt(Math.max(0,a/l-r*r)),n.x=t.x-r*s-o*u,n.y=t.y-r*u+o*s):(r=(l+i-a)/(2*l),o=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-o*u,n.y=e.y+r*u+o*s)):(n.x=e.x+n.r,n.y=e.y)}function Ym(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 Xm(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 Km(t){this._=t,this.next=null,this.previous=null}function $m(t){return null==t?null:Qm(t)}function Qm(t){if("function"!=typeof t)throw new Error;return t}function Jm(){return 0}function ty(t){return function(){return t}}function ey(t){return Math.sqrt(t.value)}function ny(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function ry(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=function(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,u,l,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;Zm(n,e,r=t[2]),e=new Km(e),n=new Km(n),r=new Km(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){Zm(e._,n._,r=t[s]),r=new Km(r),u=n.next,l=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(Ym(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}c+=u._.r,u=u.next}else{if(Ym(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(u!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=Xm(e);(r=r.next)!==n;)(a=Xm(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Um(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function iy(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 oy(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 ay(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function sy(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var uy=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,l,c,h,d,f,p,g,v,m=[],y=e.children,b=0,_=0,x=y.length,w=e.value;b<x;){u=i-n,l=o-r;do{c=y[_++].value}while(!c&&_<x);for(h=d=c,v=c*c*(g=Math.max(l/u,u/l)/(w*t)),p=Math.max(d/v,v/h);_<x;++_){if(c+=s=y[_].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:u<l,children:y.slice(b,_)}),a.dice?ay(a,n,r,i,w?r+=l*c/w:o):sy(a,n,r,w?n+=u*c/w:i,o),w-=c,b=_}}(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 ly={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"}},cy=function(){var t,e=ma(this.parentNode).select("rect.leaf"),n=Xs(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(ly);e<n.length;e++)for(var r=n[e],i=ly[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=au(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},hy=0,dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-treemap")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=fa.getProperty(window,"location"),s=rf.getSVGElementSize(n,{useAttrs:!0}),u=s.width,l=s.height,c=km({name:o.title||"Treemap",children:i}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),h=(Ts(r,(function(t){return Ts(t.children,(function(t){return t.value}))})),function(){var t=uy,e=!1,n=1,r=1,i=[0],o=Jm,a=Jm,s=Jm,u=Jm,l=Jm;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(oy),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+=l(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(d-=u(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=Qm(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:ty(+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:ty(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:ty(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:ty(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:ty(+t),c):l},c}().size([u,l]).paddingInner(1).paddingOuter(0).round(!0)(c)),d=this.services.transitions,f=n.selectAll("g[data-name='leaf']").data(h.leaves(),(function(t){return t.data.name}));f.exit().attr("opacity",0).remove();var p=f.enter().append("g").attr("data-name","leaf").attr("data-uid",(function(){return hy++})).merge(f);p.attr("data-name","leaf").transition(d.getTransition("treemap-group-update",t)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"}));var g=p.selectAll("rect.leaf").data((function(t){return[t]}));g.exit().attr("width",0).attr("height",0).remove(),g.enter().append("rect").classed("leaf",!0).merge(g).attr("width",0).attr("height",0).attr("id",(function(){var t=ma(this.parentNode).attr("data-uid");return o.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(this.services.transitions.getTransition("treemap-leaf-update-enter",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)})),p.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=ma(this.parentNode).attr("data-uid");return o.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=ma(this.parentNode.parentNode).attr("data-uid"),e=o.style.prefix+"-leaf-"+t;return new URL("#"+e,a)+""}))}),(function(t){return null}),(function(t){return t.remove()})),p.selectAll("text").data((function(t){if(!0!==t.data.showLabel)return[];for(var n=t;n.depth>1;)n=n.parent;var r=au(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",cy).attr("x",7).attr("y",18);a&&e.attr("clip-path",(function(){var t=ma(this.parentNode).attr("data-uid"),e=o.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,a)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",cy)}),(function(t){return t.remove()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(e){for(var n=ma(this),r=getComputedStyle(this,null).getPropertyValue("fill"),i=e;i.depth>1;)i=i.parent;n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).style("fill",(function(e){var n=t.model.getFillColor(e.parent.data.name);return n&&(r=n),Xs(r).darker(.7).toString()})),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,items:[{color:r,label:i.data.name,bold:!0},{label:e.data.name,value:e.data.value}]}),t.services.events.dispatchEvent(tt.Treemap.LEAF_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Treemap.LEAF_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Treemap.LEAF_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1);for(var r=e;r.depth>1;)r=r.parent;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).style("fill",(function(e){return t.model.getFillColor(e.parent.data.name)})),t.services.events.dispatchEvent(tt.Treemap.LEAF_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},e}(Wg);function fy(t){var e,n=(gy(t)%(e=360)+e)%e;return py(n,[0,10])||py(n,[350,0])?{textAnchor:F.START,dominantBaseline:W.MIDDLE}:py(n,[10,80])?{textAnchor:F.START,dominantBaseline:W.HANGING}:py(n,[80,100])?{textAnchor:F.MIDDLE,dominantBaseline:W.HANGING}:py(n,[100,170])?{textAnchor:F.END,dominantBaseline:W.HANGING}:py(n,[170,190])?{textAnchor:F.END,dominantBaseline:W.MIDDLE}:py(n,[190,260])?{textAnchor:F.END,dominantBaseline:W.BASELINE}:py(n,[260,280])?{textAnchor:F.MIDDLE,dominantBaseline:W.BASELINE}:{textAnchor:F.START,dominantBaseline:W.BASELINE}}function py(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function gy(t){return t*(180/Math.PI)}function vy(t,e,n){return void 0===n&&(n={x:0,y:0}),{x:e*Math.cos(t)+n.x,y:e*Math.sin(t)+n.y}}var my=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.renderType=C.SVG,e.getLabelDimensions=function(t){var n=rf.appendOrSelect(e.getComponentContainer(),"g.tmp-tick"),r=rf.appendOrSelect(n,"text").text(t),i=rf.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=fa.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=fa.getProperty(n,"data","groupMapsTo"),s=fa.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 fa.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.getOptions(),r=fa.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=fa.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:fa.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?gt.opacity.unselected:gt.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?gt.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",gt.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),i=rf.getSVGElementSize(n,{useAttrs:!0}),o=i.width,a=i.height,s=this.model.getData(),u=this.model.getGroupedData(),l=this.getOptions(),c=fa.getProperty(l,"radar","axes"),h=c.angle,d=c.value,f=fa.getProperty(l,"data","groupMapsTo"),p=gt.xLabelPadding,g=gt.yLabelPadding,v=gt.yTicksNumber,m=gt.minRange,y=gt.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[f]})))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+g),_=(Math.min(o,a)-b)/2;if(!(_<=0)){var x=Ds().domain(this.fullDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),w=Es(this.fullDataNormalized.map((function(t){return t[d]}))),O=al().domain([w>=0?0:w,Os(this.fullDataNormalized.map((function(t){return t[d]})))]).range([m,_]).nice(v),E=O.ticks(v),T=function(t){return e.model.getFillColor(t)},S=Vh().angle((function(t){return x(t[h])+Math.PI/2})).radius((function(t){return O(t[d])})).curve(hd),M={x:Os(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=x(t),_*Math.sin(n-Math.PI/2))})))+p,y:a/2},C=rf.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(E,(function(t){return t})),A=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[h]=e,n[d]=t,n}))};C.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+M.x+", "+M.y+")").attr("fill","none").call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return S(A(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_update",t)).attr("opacity",1).attr("transform","translate("+M.x+", "+M.y+")").attr("d",(function(t){return S(A(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_exit",t)).attr("d",(function(t){return S(A(t))})).attr("opacity",0).remove()}))})),rf.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("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+fa.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return vy(x(t),0,M).x})).attr("y1",(function(t){return vy(x(t),0,M).y})).attr("x2",(function(t){return vy(x(t),0,M).x})).attr("y2",(function(t){return vy(x(t),0,M).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return vy(x(t),O.range()[0],M).x})).attr("y1",(function(t){return vy(x(t),O.range()[0],M).y})).attr("x2",(function(t){return vy(x(t),O.range()[1],M).x})).attr("y2",(function(t){return vy(x(t),O.range()[1],M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_update",t)).attr("opacity",1).attr("x1",(function(t){return vy(x(t),O.range()[0],M).x})).attr("y1",(function(t){return vy(x(t),O.range()[0],M).y})).attr("x2",(function(t){return vy(x(t),O.range()[1],M).x})).attr("y2",(function(t){return vy(x(t),O.range()[1],M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),rf.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 vy(x(t),O.range()[1]+p,M).x})).attr("y",(function(t){return vy(x(t),O.range()[1]+p,M).y})).style("text-anchor",(function(t){return fy(x(t)).textAnchor})).style("dominant-baseline",(function(t){return fy(x(t)).dominantBaseline})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_update",t)).attr("opacity",1).attr("x",(function(t){return vy(x(t),O.range()[1]+p,M).x})).attr("y",(function(t){return vy(x(t),O.range()[1]+p,M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),rf.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("opacity",0).attr("transform",t?function(){return"translate("+M.x+", "+M.y+") scale("+(1+.35*Math.random())+")"}:"translate("+M.x+", "+M.y+")").style("fill",(function(t){return T(t.name)})).style("fill-opacity",gt.opacity.selected).style("stroke",(function(t){return T(t.name)})).call((function(n){var r=n.transition(e.services.transitions.getTransition("radar_blobs_enter",t));t&&r.delay((function(){return 30*Math.random()})).attr("transform","translate("+M.x+", "+M.y+")"),r.attr("opacity",1).attr("d",(function(t){return S(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 T(t.name)})).style("stroke",(function(t){return T(t.name)})),n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+M.x+", "+M.y+")").attr("d",(function(t){return S(t.data)}))}))}),(function(n){return n.call((function(n){var r=n.transition(e.services.transitions.getTransition("radar_blobs_exit",t));t&&r.delay((function(){return 30*Math.random()})).attr("transform",(function(){return"translate("+M.x+", "+M.y+") scale("+(1+.35*Math.random())+")"})),r.attr("opacity",0).remove()}))})),rf.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.fullDataNormalized).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[f],originalClassName:fa.kebabCase(t[h])})})).attr("cx",(function(t){return vy(x(t[h]),O(t[d]),M).x})).attr("cy",(function(t){return vy(x(t[h]),O(t[d]),M).y})).attr("r",0).attr("opacity",0).style("fill",(function(t){return T(t[f])})),rf.appendOrSelect(n,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("x",M.x).attr("y",M.y-y/2).attr("width",O.range()[1]).attr("height",y).style("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+gy(x(t))+", "+M.x+", "+M.y+")"})),rf.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(ps(E)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return vy(-Math.PI/2,O(t),M).x+g})).attr("y",(function(t){return vy(-Math.PI/2,O(t),M).y})).style("text-anchor","start").style("dominant-baseline","middle").call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_update",t)).text((function(t){return t})).attr("opacity",1).attr("x",(function(t){return vy(-Math.PI/2,O(t),M).x+g})).attr("y",(function(t){return vy(-Math.PI/2,O(t),M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))}));var L=fa.getProperty(l,"radar","alignment"),D=this.getAlignmentXOffset(L,n,this.getParent());n.attr("x",D),this.addEventListeners()}},e.prototype.getAlignmentXOffset=function(t,e,n){var r=rf.getSVGElementSize(e,{useBBox:!0}),i=rf.getSVGElementSize(n,{useAttr:!0}).width,o=0;return t===B.CENTER?o=Math.floor((i-r.width)/2):t===B.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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=fa.getProperty(this.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n){var r=ma(this);t.services.events.dispatchEvent(tt.Radar.X_AXIS_MOUSEOVER,{element:r,datum:n});var i=t.parent.select(".x-axes .x-axis-"+fa.kebabCase(n)),o=t.parent.selectAll(".dots circle."+fa.kebabCase(n));i.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",1).attr("r",gt.dotsRadius);var a=t.fullDataNormalized.filter((function(t){return t[e]===n})),s=t.getOptions(),u=s.data.groupMapsTo,l=fa.getProperty(s,"radar","axes","value");t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:r,items:a.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[u],value:e[l],color:t.model.getFillColor(e[u]),class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Radar.X_AXIS_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this),r=t.parent.select(".x-axes .x-axis-"+fa.kebabCase(e)),i=t.parent.selectAll(".dots circle."+fa.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(tt.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE)}))},e}(Wg),yy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle-pack",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.node").transition(e.services.transitions.getTransition("legend-hover-circlepack")).attr("opacity",(function(t){return t.data.dataGroupName===n.datum().name?1:ut.circles.fillOpacity}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.node").transition(e.services.transitions.getTransition("legend-mouseout-circlepack")).attr("opacity",1)},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),r=rf.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(),u=this.model.getHierarchyLevel(),l=this.getOptions(),c=fa.getProperty(l,"canvasZoom","enabled");s&&fa.getProperty(a,0,"children")&&(a=fa.getProperty(a,0,"children"));var h=km({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=Jm;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(ny(t)).eachAfter(ry(r,.5)).eachBefore(iy(1)):i.eachBefore(ny(ey)).eachAfter(ry(Jm,1)).eachAfter(ry(r,i.r/Math.min(e,n))).eachBefore(iy(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=$m(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:ty(+t),i):r},i}().size([i,o]).padding((function(t){return t.depth>=1?ut.padding.children+3:ut.padding.mainGroup+3}))(h).descendants().splice(1).filter((function(t){return t.depth<=u})),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===u?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(this.services.transitions.getTransition("circlepack-leaf-update-enter",t)).attr("r",(function(t){return t.r})).attr("opacity",1).attr("fill-opacity",ut.circles.fillOpacity),!0===c&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,p,st),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",ut.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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.removeBackgroundListeners=function(){ma(this.services.domUtils.getMainContainer()).on("click",(function(){return null}))},e.prototype.setBackgroundListeners=function(){var t=ma(this.services.domUtils.getMainContainer()),e=this,n=this.parent.selectAll("circle.node"),r=fa.getProperty(os,"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){var n=ma(this);n.classed("hovered",!0);var r=t.model.getHierarchyLevel(),i=r>2&&!n.classed("focal"),o=fa.getProperty(t.model.getOptions(),"canvasZoom","enabled"),a=!1;if(!i){var s=[],u=[],l=null;e.children?(e.depth>1&&o&&(a=!0,n.classed("clickable",!0)),s=e.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:o&&r<=2?t.getZoomIcon():null,value:e.value}})),u=[{label:"Total",value:e.value,bold:!0}],t.highlightChildren(e.children)):l=e.value;var c=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,items:M([{color:c,label:e.data.name,labelIcon:a&&o&&r<=2?t.getZoomIcon():null,value:l}],s,u)})}t.services.events.dispatchEvent(tt.CirclePack.CIRCLE_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.CirclePack.CIRCLE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),e.children&&t.unhighlightChildren(e.children),t.services.events.dispatchEvent(tt.CirclePack.CIRCLE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})})).on("click",(function(e){var n=ma(this),r=n.classed("non-focal");if(fa.getProperty(t.getOptions(),"canvasZoom","enabled")&&t.model.getHierarchyLevel()>2){var i=t.parent.selectAll("circle.node");ma(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(i,st)}else if(2===e.depth&&e.children&&!r){i=t.parent.selectAll("circle.node");ma(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=e,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(e,i,st),ia.stopPropagation()}t.services.events.dispatchEvent(tt.CirclePack.CIRCLE_CLICK,{element:n,datum:e})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()},e}(Wg),by=gf.dispatch,_y=Math.PI/180,xy=function(){var t=[256,256],e=wy,n=Oy,r=Ty,i=Ey,o=Ey,a=Sy,s=My,u=Ly,l=[],c=1/0,h=by("word","end"),d=null,f=Math.random,p={},g=Dy;function v(e,n,r){t[0],t[1];for(var i,o,a,s,l,c=n.x,h=n.y,d=Math.sqrt(t[0]*t[0]+t[1]*t[1]),p=u(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&&Ay(n,e,t[0])||r&&(l=r,!((s=n).x+s.x1>l[0].x&&s.x+s.x0<l[1].x&&s.y+s.y1>l[0].y&&s.y+s.y0<l[1].y)))){for(var m,y=n.sprite,b=n.width>>5,_=t[0]>>5,x=n.x-(b<<4),w=127&x,O=32-w,E=n.y1-n.y0,T=(n.y+n.y0)*_+(x>>5),S=0;S<E;S++){m=0;for(var M=0;M<=b;M++)e[T+M]|=m<<O|(M<b?(m=y[S*b+M])>>>w:0);T+=_}return delete n.sprite,!0}return!1}return p.canvas=function(t){return arguments.length?(g=ky(t),p):g},p.start=function(){var u=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=l.length,_=-1,x=[],w=l.map((function(t,u){return t.text=e.call(this,t,u),t.font=n.call(this,t,u),t.style=i.call(this,t,u),t.weight=o.call(this,t,u),t.rotate=a.call(this,t,u),t.size=~~r.call(this,t,u),t.padding=s.call(this,t,u),t})).sort((function(t,e){return e.size-t.size}));return d&&clearInterval(d),d=setInterval(O,0),O(),p;function O(){for(var e=Date.now();Date.now()-e<c&&++_<b&&d;){var n=w[_];n.x=t[0]*(f()+.5)>>1,n.y=t[1]*(f()+.5)>>1,Cy(u,n,w,_),n.hasText&&v(m,n,y)&&(x.push(n),h.call("word",p,n),y?Py(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)}_>=b&&(p.stop(),h.call("end",p,x,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?(l=t,p):l},p.size=function(e){return arguments.length?(t=[+e[0],+e[1]],p):t},p.font=function(t){return arguments.length?(n=ky(t),p):n},p.fontStyle=function(t){return arguments.length?(i=ky(t),p):i},p.fontWeight=function(t){return arguments.length?(o=ky(t),p):o},p.rotate=function(t){return arguments.length?(a=ky(t),p):a},p.text=function(t){return arguments.length?(e=ky(t),p):e},p.spiral=function(t){return arguments.length?(u=Ry[t]||t,p):u},p.fontSize=function(t){return arguments.length?(r=ky(t),p):r},p.padding=function(t){return arguments.length?(s=ky(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 wy(t){return t.text}function Oy(){return"serif"}function Ey(){return"normal"}function Ty(t){return Math.sqrt(t.value)}function Sy(){return 30*(~~(6*Math.random())-3)}function My(){return 1}function Cy(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,u=0,l=n.length;for(--r;++r<l;){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*_y),f=Math.cos(e.rotate*_y),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>u&&(u=h),a+c>=2048&&(a=0,s+=u,u=0),s+h>=2048)break;i.translate((a+(c>>1))/o,(s+(h>>1))/o),e.rotate&&i.rotate(e.rotate*_y),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 _=(c=e.width)>>5,x=(h=e.y1-e.y0,0);x<h*_;x++)b[x]=0;if(null==(a=e.xoff))return;s=e.yoff;for(var w=0,O=-1,E=0;E<h;E++){for(x=0;x<c;x++){var T=_*E+(x>>5),S=y[2048*(s+E)+(a+x)<<2]?1<<31-x%32:0;b[T]|=S,w|=S}w?O=E:(e.y0++,h--,E--,s++)}e.y1=e.y0+O,e.sprite=b.slice(0,(e.y1-e.y0)*_)}}}function Ay(t,e,n){n>>=5;for(var r,i=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,u=32-s,l=t.y1-t.y0,c=(t.y+t.y0)*n+(a>>5),h=0;h<l;h++){r=0;for(var d=0;d<=o;d++)if((r<<u|(d<o?(r=i[h*o+d])>>>s:0))&e[c+d])return!0;c+=n}return!1}function Py(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 Ly(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Dy(){return document.createElement("canvas")}function ky(t){return"function"==typeof t?t:function(){return t}}var Ry={archimedean:Ly,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]}}},Iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="wordcloud",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("text.word").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-wordcloud")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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,u=a.wordMapsTo,l=o.data.groupMapsTo,c=rf.getSVGElementSize(n,{useAttrs:!0}),h=c.width,d=c.height;if(0!==h&&0!==d){var f=xy().size([h,d]).words(r.map((function(t){var e;return(e={})[l]=t[l],e.text=t[u],e.size=t[s],e.value=t[s],e}))).padding(5).rotate(0).fontSize((function(t){return i(t.size)})).on("end",(function(r){var i=rf.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[l]+"-"+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[l],originalClassName:"word "+(t.size>32?"light":"")})})).style("fill",(function(t){return e.model.getFillColor(t[l],t.text,t)})).attr("text-anchor","middle").transition(e.services.transitions.getTransition("wordcloud-text-update-enter",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=rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=r.length>0,a=o?ps(r):[1,1];return al().domain(a).range(o?e.wordCloud.fontSizeRange(i,t):[4,4])},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=fa.debounce((function(t){var e=r.parent.selectAll("text.word").transition(r.services.transitions.getTransition("wordcloud-word-mouse-highlight"));null===t?e.attr("opacity",1):e.attr("opacity",(function(){return t===this?1:.3}))}),6),r=this;this.parent.selectAll("text.word").on("mouseover",(function(i){n(this),r.services.events.dispatchEvent(tt.WordCloud.WORD_MOUSEOVER,{element:ma(this),datum:i}),r.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:this,items:[{label:t.tooltip.wordLabel,value:i.text},{label:t.tooltip.valueLabel,value:i.value},{label:t.tooltip.groupLabel,value:i[e],class:r.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:i[e]})}]})})).on("mousemove",(function(t){var e=ma(this);r.services.events.dispatchEvent(tt.WordCloud.WORD_MOUSEMOVE,{element:e,datum:t}),r.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(t){r.services.events.dispatchEvent(tt.WordCloud.WORD_CLICK,{element:ma(this),datum:t})})).on("mouseout",(function(t){var e=ma(this);n(null),r.services.events.dispatchEvent(tt.WordCloud.WORD_MOUSEOUT,{element:e,datum:t}),r.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:e})}))},e}(Wg),Ny=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||vt.default.size)+"px").style("height",(this.configs.size||vt.default.size)+"px").attr("opacity",0)},e}(Wg),By=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=fa.getProperty(t,"growth");return e===G.PREFERRED||e===G.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 fa.getProperty(t,"growth")===G.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=rf.getHTMLElementSize(n.node()),i=r.width,o=r.height,a=this.configs.direction===U.ROW||this.configs.direction===U.ROW_REVERSE,s=fa.getProperty(this.model.getOptions(),"style","prefix"),u=n.classed(kd.prefix+"--"+s+"--layout-row",this.configs.direction===U.ROW).classed(kd.prefix+"--"+s+"--layout-row-reverse",this.configs.direction===U.ROW_REVERSE).classed(kd.prefix+"--"+s+"--layout-column",this.configs.direction===U.COLUMN).classed(kd.prefix+"--"+s+"--layout-column-reverse",this.configs.direction===U.COLUMN_REVERSE).classed(kd.prefix+"--"+s+"--layout-alignitems-center",this.configs.alignItems===H.CENTER).selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));u.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=ma(n),o=fa.getProperty(e,"renderType")===C.SVG;r.setParent(o?rf.appendOrSelect(i,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):i);var a=fa.getProperty(e,"growth");a!==G.PREFERRED&&a!==G.FIXED||r.render(t)}))})),n.selectAll("div.layout-child-"+this._instanceID).style("height",null).style("width",null).each((function(t){var e=fa.getProperty(t,"growth"),n=fa.getProperty(t,"renderType")===C.SVG?rf.getSVGElementSize(ma(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):rf.getHTMLElementSize(this);if(e===G.PREFERRED){var r=a?n.width:n.height,s=a?i:o;t.size=r/s*100}})),u.exit().remove(),this.children.filter((function(t){return fa.getProperty(t,"growth")===G.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()}));var l=n.selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));a?l.style("width",(function(t){return t.size/100*i+"px"})).style("height","100%"):l.style("height",(function(t){return t.size/100*o+"px"})).style("width","100%"),l.each((function(e,n){e.components.forEach((function(n){fa.getProperty(e,"growth")===G.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}(Wg),Vy=Array.prototype.slice;function Uy(t){return t}function Gy(t){return"translate("+(t+.5)+",0)"}function Hy(t){return"translate(0,"+(t+.5)+")"}function zy(t){return function(e){return+t(e)}}function jy(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Fy(){return!this.__axis}function Wy(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?Gy:Hy;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,f=null==i?e.tickFormat?e.tickFormat.apply(e,n):Uy:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?jy:zy)(e.copy()),b=h.selection?h.selection():h,_=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(d,e).order(),w=x.exit(),O=x.enter().append("g").attr("class","tick"),E=x.select("line"),T=x.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(O),E=E.merge(O.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),T=T.merge(O.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(_=_.transition(h),x=x.transition(h),E=E.transition(h),T=T.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),O.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),_.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),E.attr(l+"2",u*o),T.attr(l,u*p).text(f),b.filter(Fy).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Vy.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Vy.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Vy.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function qy(t){return Wy(1,t)}function Zy(t){return Wy(2,t)}function Yy(t){return Wy(3,t)}function Xy(t){return Wy(4,t)}var Ky=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",i.renderType=C.SVG,r&&(i.configs=r),i.margins=i.configs.margins,i}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e,n,i=this.configs.position,o=this.getOptions(),a=fa.getProperty(o,"axes",i,"visible"),s=this.getComponentContainer(),u=rf.getSVGElementSize(s,{useAttrs:!0}),l=u.width,c=u.height,h=rf.appendOrSelect(s,"g.axis."+i);i===L.BOTTOM||i===L.TOP?(e=this.configs.axes[L.LEFT]?this.margins.left:0,n=this.configs.axes[L.RIGHT]?l-this.margins.right:l):(e=c-this.margins.bottom,n=this.margins.top);var d,f=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===I.LABELS||this.scaleType===I.LABELS_RATIO?f.rangeRound([e,n]):f.range([e,n]),i){case L.LEFT:d=Xy;break;case L.BOTTOM:d=Yy;break;case L.RIGHT:d=Zy;break;case L.TOP:d=qy}h.attr("aria-label",i+" axis");var p=!h.select("g.ticks").empty(),g=rf.appendOrSelect(h,"g.ticks");p||(g.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),g.attr("aria-label",i+" ticks"));var v=rf.appendOrSelect(h,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),m=fa.getProperty(o,"axes",i),y=this.scaleType===I.TIME||m.scaleType===I.TIME,b=i===L.LEFT||i===L.RIGHT,_=this.model.get("zoomDomain");if(_&&y&&!b&&f.domain(_),a){var x=fa.getProperty(m,"scaleType"),w=fa.getProperty(o,"data","loading"),O=fa.getProperty(m,"ticks","number"),E=fa.getProperty(m,"ticks","values"),T=fa.getProperty(m,"truncation","type"),S=fa.getProperty(m,"truncation","threshold"),M=fa.getProperty(m,"truncation","numCharacter"),C=null!==O,A=fa.getProperty(o,"timeScale"),P=rf.appendOrSelect(v,"g.tick"),D=rf.appendOrSelect(P,"text").text("0"),R=rf.getSVGElementSize(D.node(),{useBBox:!0}).height;P.remove();var N,B=this.scaleType||m.scaleType||I.LINEAR,V=d(f).tickSizeOuter(0);if(f.ticks){var U=void 0;if(C?U=O:(U=at.ticks.number,b&&(U=this.getNumberOfFittingTicks(c,R,at.ticks.verticalSpaceRatio))),1===f.ticks().length&&0===f.ticks()[0]&&(U=0),V.ticks(U),y)if(f.ticks(U).length){var G=fa.getProperty(o,"timeScale","addSpaceOnEdges"),H=fa.getProperty(o,"axes",i,"domain"),z=void 0,j=f.copy();G&&!H&&j.nice(U),z=j.ticks(U),G&&z.length>2&&!H&&(z.splice(z.length-1,1),z.splice(0,1)),V.tickValues(z)}else V.tickValues([])}var F=fa.getProperty(m,"ticks","formatter");if(y){var W=nm(V.tickValues());N=null===F?function(t,e){return tm(t,e,V.tickValues(),W,A)}:function(t,e){var n=tm(t,e,V.tickValues(),W,A);return F(t,e,n)}}else null===F?B===I.LINEAR&&(N=function(t){return t.toLocaleString()}):N=F;V.tickFormat(N);var q,Z=this.services.cartesianScales.getScaleByPosition(i).domain(),Y=Z[0],K=Z[1];if(E){if(y)E.forEach((function(t,e){void 0===t.getTime&&(E[e]=new Date(t))})),q=E.filter((function(t){var e=t.getTime();return e>=new Date(Y).getTime()&&e<=new Date(K).getTime()}));else if(x===I.LABELS){var $=this.services.cartesianScales.getScaleByPosition(i).domain();q=E.filter((function(t){return $.includes(t)}))}else q=E.filter((function(t){return t>=Y&&t<=K}));V.tickValues(q)}switch(i){case L.LEFT:g.attr("transform","translate("+this.margins.left+", 0)");break;case L.BOTTOM:g.attr("transform","translate(0, "+(c-this.margins.bottom)+")");break;case L.RIGHT:g.attr("transform","translate("+(l-this.margins.right)+", 0)");break;case L.TOP:g.attr("transform","translate(0, "+this.margins.top+")")}var J=this.model.isDataEmpty();if(m.title){var tt=rf.appendOrSelect(h,"text.axis-title").html(J||w?"":m.title),et=fa.getProperty(m,"titleOrientation");switch(i){case L.LEFT:et===Q.RIGHT?tt.attr("transform","rotate(90)").attr("y",0).attr("x",f.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):tt.attr("transform","rotate(-90)").attr("y",0).attr("x",-f.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case L.BOTTOM:tt.attr("transform","translate("+(this.margins.left/2+f.range()[1]/2)+", "+(c+4)+")").style("text-anchor","middle");break;case L.RIGHT:et===Q.LEFT?tt.attr("transform","rotate(-90)").attr("y",l).attr("x",-f.range()[0]/2).style("text-anchor","middle"):tt.attr("transform","rotate(90)").attr("y",-l).attr("x",f.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case L.TOP:var nt=rf.getSVGElementSize(tt,{useBBox:!0}).height;tt.attr("transform","translate("+(this.margins.left/2+f.range()[1]/2)+", "+nt/2+")").style("text-anchor","middle")}}if(y){var rt=nm(V.tickValues()),it=A.showDayName,ot=g;t&&(g=g.transition(this.services.transitions.getTransition("axis-update",t))),g=g.call(V),ot.selectAll(".tick").data(V.tickValues(),f).order().select("text").style("font-weight",(function(t,e){return Jv(t,e,V.tickValues(),rt,it)?"bold":"normal"}))}else g=t&&p?g.transition(this.services.transitions.getTransition("axis-update")).call(V):g.call(V);if(v.call(V),i===L.BOTTOM||i===L.TOP){var st=!1,ut=fa.getProperty(m,"ticks","rotation");if(ut===X.ALWAYS)st=!0;else if(ut===X.NEVER)st=!1;else if(!ut||ut===X.AUTO)if(f.step){var lt=v.selectAll("g.tick text").nodes();st=lt.some((function(t){return rf.getSVGElementSize(t,{useBBox:!0}).width>=f.step()}))}else{st=!1;var ct,ht=v.append("text").text("A").node().getBBox().width;v.selectAll("g.tick").each((function(){var t=ma(this),e=parseFloat(fa.getProperty(fa.getTranslationValues(this),"tx"));null!==e&&ct+t.text().length*ht*.8>=e&&(st=!0),ct=e}))}st?(C||(V.ticks(this.getNumberOfFittingTicks(l,R,at.ticks.horizontalSpaceRatio)),v.call(V),g.call(V)),h.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===L.TOP?"start":"end")):h.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(w?h.attr("opacity",0):h.attr("opacity",1),g.selectAll("g.tick").attr("aria-label",(function(t){return t})),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),T!==k.NONE&&x===I.LABELS&&!E){var dt=this.services.cartesianScales.getScaleDomain(i);if(dt.length>0){var ft=s.select("g.axis."+i+" g.ticks g.tick").html();h.selectAll("g.ticks g.tick").html(ft),h.selectAll("g.tick text").data(dt).text((function(t){return t.length>S?fa.truncateLabel(t,T,M):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(dt).text((function(t){return t.length>S?fa.truncateLabel(t,T,M):t})),h.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),h.selectAll("g.tick text").data(dt)}}this.addEventListeners()}else g.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=rf.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=fa.getProperty(r,"axes",e),o=fa.getProperty(i,"scaleType"),a=fa.getProperty(i,"truncation","threshold"),s=(this.scaleType===I.TIME||(i.scaleType,I.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(tt.Axis.LABEL_MOUSEOVER,{element:ma(this),datum:t}),o===I.LABELS&&t.length>a&&s.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:ma(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(tt.Axis.LABEL_MOUSEMOVE,{element:ma(this),datum:t}),o===I.LABELS&&t.length>a&&s.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(tt.Axis.LABEL_CLICK,{element:ma(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(tt.Axis.LABEL_MOUSEOUT,{element:ma(this),datum:t}),o===I.LABELS&&s.services.events.dispatchEvent(tt.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 fa.clamp(r,2,at.ticks.number)},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;rf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Wg),$y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.renderType=C.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(L),i=fa.getProperty(this.getOptions(),"axes");r.forEach((function(t){i[L[t]]&&(n[L[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=L[t];if(e.configs.axes[n]&&!e.children[n]){var r=new Ky(e.model,e.services,{position:n,axes:e.configs.axes,margins:e.margins});r.setModel(e.model),r.setServices(e.services),r.setParent(e.parent),e.children[n]=r}})),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=rf.getSVGElementSize(a,{useBBox:!0}),u=s.width,l=s.height;switch(r.getTitleRef().empty()?n=0:(n=rf.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i!==L.LEFT&&i!==L.RIGHT||(n+=5)),i){case L.TOP:o.top=l+n;break;case L.BOTTOM:o.bottom=l+n;break;case L.LEFT:o.left=u+n;break;case L.RIGHT:o.right=u+n}})),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(tt.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Wg);function Qy(){ia.preventDefault(),ia.stopImmediatePropagation()}function Jy(t){var e=t.document.documentElement,n=ma(t).on("dragstart.drag",Qy,!0);"onselectstart"in e?n.on("selectstart.drag",Qy,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function tb(t,e){var n=t.document.documentElement,r=ma(t).on("dragstart.drag",null);e&&(r.on("click.drag",Qy,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function eb(t){return function(){return t}}function nb(t,e,n){this.target=t,this.type=e,this.selection=n}function rb(){ia.stopImmediatePropagation()}function ib(){ia.preventDefault(),ia.stopImmediatePropagation()}var ob={name:"drag"},ab={name:"space"},sb={name:"handle"},ub={name:"center"};function lb(t){return[+t[0],+t[1]]}function cb(t){return[lb(t[0]),lb(t[1])]}function hb(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=ya().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return ba(t,r);return null}(e,ia.touches,t)}}var db={name:"x",handles:["w","e"].map(bb),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]]}},fb={name:"y",handles:["n","s"].map(bb),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]]}},pb={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"},gb={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},vb={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mb={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},yb={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function bb(t){return{type:t}}function _b(){return!ia.ctrlKey&&!ia.button}function xb(){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 wb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ob(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Eb(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Tb(){return function(t){var e,n=xb,r=_b,i=wb,o=!0,a=uf("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([bb("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pb.overlay).merge(n).each((function(){var t=Ob(this).extent;ma(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([bb("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pb.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 pb[t.type]})),e.each(l).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 l(){var t=ma(this),e=Ob(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){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function d(){if((!e||ia.touches)&&r.apply(this,arguments)){var n,i,a,s,u,h,d,f,p,g,v,m=this,y=ia.target.__data__.type,b="selection"===(o&&ia.metaKey?y="overlay":y)?ob:o&&ia.altKey?ub:sb,_=t===fb?null:mb[y],x=t===db?null:yb[y],w=Ob(m),O=w.extent,E=w.selection,T=O[0][0],S=O[0][1],M=O[1][0],C=O[1][1],A=0,P=0,L=_&&x&&o&&ia.shiftKey,D=ia.touches?hb(ia.changedTouches[0].identifier):_a,k=D(m),R=k,I=c(m,arguments,!0).beforestart();"overlay"===y?(E&&(p=!0),w.selection=E=[[n=t===fb?T:k[0],a=t===db?S:k[1]],[u=t===fb?M:n,d=t===db?C:a]]):(n=E[0][0],a=E[0][1],u=E[1][0],d=E[1][1]),i=n,s=a,h=u,f=d;var N=ma(m).attr("pointer-events","none"),B=N.selectAll(".overlay").attr("cursor",pb[y]);if(ia.touches)I.moved=U,I.ended=H;else{var V=ma(ia.view).on("mousemove.brush",U,!0).on("mouseup.brush",H,!0);o&&V.on("keydown.brush",z,!0).on("keyup.brush",j,!0),Jy(ia.view)}rb(),Vf(m),l.call(m),I.start()}function U(){var t=D(m);!L||g||v||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?v=!0:g=!0),R=t,p=!0,ib(),G()}function G(){var t;switch(A=R[0]-k[0],P=R[1]-k[1],b){case ab:case ob:_&&(A=Math.max(T-n,Math.min(M-u,A)),i=n+A,h=u+A),x&&(P=Math.max(S-a,Math.min(C-d,P)),s=a+P,f=d+P);break;case sb:_<0?(A=Math.max(T-n,Math.min(M-n,A)),i=n+A,h=u):_>0&&(A=Math.max(T-u,Math.min(M-u,A)),i=n,h=u+A),x<0?(P=Math.max(S-a,Math.min(C-a,P)),s=a+P,f=d):x>0&&(P=Math.max(S-d,Math.min(C-d,P)),s=a,f=d+P);break;case ub:_&&(i=Math.max(T,Math.min(M,n-A*_)),h=Math.max(T,Math.min(M,u+A*_))),x&&(s=Math.max(S,Math.min(C,a-P*x)),f=Math.max(S,Math.min(C,d+P*x)))}h<i&&(_*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in gb&&B.attr("cursor",pb[y=gb[y]])),f<s&&(x*=-1,t=a,a=d,d=t,t=s,s=f,f=t,y in vb&&B.attr("cursor",pb[y=vb[y]])),w.selection&&(E=w.selection),g&&(i=E[0][0],h=E[1][0]),v&&(s=E[0][1],f=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===f||(w.selection=[[i,s],[h,f]],l.call(m),I.brush())}function H(){if(rb(),ia.touches){if(ia.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else tb(ia.view,p),V.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),B.attr("cursor",pb.overlay),w.selection&&(E=w.selection),Eb(E)&&(w.selection=null,l.call(m)),I.end()}function z(){switch(ia.keyCode){case 16:L=_&&x;break;case 18:b===sb&&(_&&(u=h-A*_,n=i+A*_),x&&(d=f-P*x,a=s+P*x),b=ub,G());break;case 32:b!==sb&&b!==ub||(_<0?u=h-A:_>0&&(n=i-A),x<0?d=f-P:x>0&&(a=s-P),b=ab,B.attr("cursor",pb.selection),G());break;default:return}ib()}function j(){switch(ia.keyCode){case 16:L&&(g=v=L=!1,G());break;case 18:b===ub&&(_<0?u=h:_>0&&(n=i),x<0?d=f:x>0&&(a=s),b=sb,G());break;case 32:b===ab&&(ia.altKey?(_&&(u=h-A*_,n=i+A*_),x&&(d=f-P*x,a=s+P*x),b=ub):(_<0?u=h:_>0&&(n=i),x<0?d=f:x>0&&(a=s),b=sb),B.attr("cursor",pb[y]),G());break;default:return}ib()}}function f(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=cb(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){c(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){c(this,arguments).end()})).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=xu(o,a);function u(t){r.selection=1===t&&null===a?null:s(t),l.call(e),i.brush()}return null!==o&&null!==a?u:u(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,o=t.input("function"==typeof n?n.apply(e,r):n,i.extent),a=c(e,r).beforestart();Vf(e),i.selection=null===o?null:o,l.call(e),a.start().brush().end()}))},u.clear=function(t){u.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){!function(t,e,n,r){var i=ia;t.sourceEvent=ia,ia=t;try{e.apply(n,r)}finally{ia=i}}(new nb(u,e,t.output(this.state.selection)),a.apply,a,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:eb(cb(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:eb(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:eb(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(o=!!t,u):o},u.on=function(){var t=a.on.apply(a,arguments);return t===a?u:t},u}(db)}var Sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",e.renderType=C.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=rf.appendOrSelect(r,"svg.chart-grid-backdrop"),a=rf.appendOrSelect(o,"g."+this.type),s=rf.appendOrSelect(a,this.selectionSelector),u=rf.getSVGElementSize(o,{useAttrs:!0}),l=u.width,c=u.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=rf.appendOrSelect(i,this.frontSelectionSelector);if(f&&d===I.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=th().range([0,l]).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=Tb().extent([[0,0],[l-1,c]]).on("start brush end",(function(){var t=ia.selection;null!==t&&t[0]!==t[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)}(t))})).on("end.brushed",(function(){var t=ia.selection;null!==t&&(y(t[0],t[1]),a.call(b.move,null),v.style("display","none"))}));a.call(b);var _=this.services.zoom.getZoomRatio();o.on("click",(function(){if(ia.shiftKey){var t=_a(a.node())[0],e=t-l*_/2;e<0&&(e=0);var n=t+l*_/2;n>l&&(n=l),y(e,n)}}))}},e.DASH_LENGTH=4,e}(Wg),Mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=fa.getProperty(this.getOptions(),"grid","x","enabled"),n=fa.getProperty(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(rf.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(rf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=Yy(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(fa.getProperty(this.getOptions(),"grid","x","alignWithAxisTicks")){var i=this.services.cartesianScales.getDomainAxisPosition(),o=fa.getProperty(this.getOptions(),"axes",i,"ticks","values");o&&r.tickValues(o)}else{var a=fa.getProperty(this.getOptions(),"grid","x","numberOfTicks");r.ticks(a)}var s=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var u=this.services.transitions.getTransition("grid-update");s.transition(u).call(r)}else s.call(r);this.cleanGrid(s)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=Xy(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(fa.getProperty(this.getOptions(),"grid","y","alignWithAxisTicks")){var i=this.services.cartesianScales.getRangeAxisPosition(),o=fa.getProperty(this.getOptions(),"axes",i,"ticks","values");o&&r.tickValues(o)}else{var a=fa.getProperty(this.getOptions(),"grid","y","numberOfTicks");r.ticks(a)}var s=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var u=this.services.transitions.getTransition("grid-update");s.transition(u).call(r)}else s.call(r);this.cleanGrid(s)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(fa.getTranslationValues(t).tx)-Number(fa.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+fa.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=+fa.getTranslationValues(s).tx-+fa.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=rf.getSVGElementSize(u).width-+fa.getTranslationValues(a).tx}else o=+fa.getTranslationValues(s).tx;return o*this.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=fa.getProperty(this.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=fa.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],u=i.range(),l=u[0],c=u[1];this.backdrop=rf.appendOrSelect(n,"svg.chart-grid-backdrop");var h=rf.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(l-c)).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){t.selectAll("text").remove(),t.select(".domain").remove()},e}(Wg);var Cb,Ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.renderType=C.SVG,e.isXGridEnabled=fa.getProperty(e.getOptions(),"grid","x","enabled"),e.isYGridEnabled=fa.getProperty(e.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=fa.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){var e=this,n=t[0],r=t[1],i=this.parent,o=this.services.cartesianScales.getOrientation(),a=o===R.HORIZONTAL?r:n,s=rf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=rf.appendOrSelect(s,"line.ruler-line"),l=i.selectAll("[role=graphics-symbol]"),c=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),d=h[0],f=h[1],p=c.map((function(t){return{domainValue:e.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,a)}));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(tt.Tooltip.MOVE,{mousePosition:[n,r]});this.pointsWithinLine=p;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(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(g.length>0){var v=g.map((function(t){return t.originalData})).filter((function(t){var n=t[e.services.cartesianScales.getRangeIdentifier(t)];return null!=n})),m=g.map((function(t){return t.domainValue})),y=l.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return m.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!fa.isEqual(this.elementsToHighlight,y)&&this.hideRuler(),y.dispatch("mouseover"),this.elementsToHighlight=y,this.services.events.dispatchEvent(tt.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(v)}),s.attr("opacity",1);var b=g[0];"horizontal"===o?u.attr("x1",f).attr("x2",d).attr("y1",b.domainValue).attr("y2",b.domainValue):u.attr("y1",f).attr("y2",d).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=rf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(tt.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.model.getDisplayData(),n=function(){var e=_a(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=fa.debounceWithD3MousePosition((function(){var e=this.mousePosition;t.showRuler(e)}),r,this.parent.node())}this.backdrop.on("mousemove mouseover",n).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=(r[0],r[1],n.range());i[0],i[1];this.backdrop=rf.appendOrSelect(t,"svg.chart-grid-backdrop");rf.appendOrSelect(this.backdrop,this.isXGridEnabled||this.isYGridEnabled?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop")},e}(Wg),Pb=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}(Ab),Lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.renderType=C.HTML,e}return n(e,t),e.prototype.init=function(){var t=this,e=function(){return t.updateOverflowMenu(!1)};this.services.events.addEventListener(tt.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(tt.Toolbar.HIDE_OVERFLOW_MENU,(function(){document.body.removeEventListener("click",e)}))},e.prototype.render=function(t){var e=this.getComponentContainer();this.overflowMenu||(this.overflowMenu=e.append("div").attr("class","bx--overflow-menu-options bx--overflow-menu--flip").attr("tabindex",-1).attr("role","menu").html("<ul></ul>"));var n=this.getControlConfigs(),r=n.buttonList;n.overflowMenuItemList&&r.push(this.getOverflowButtonConfig());var i=e.selectAll("div.toolbar-control").data(r,(function(t){return t.id}));i.exit().remove();i.enter().append("div").attr("class","toolbar-control bx--overflow-menu").merge(i).classed("disabled",(function(t){return!!t.shouldBeDisabled&&t.shouldBeDisabled()})).html((function(t){return'\n\t\t\t<button\n\t\t\t\tclass="bx--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="'+t.id+'">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" style="will-change: transform; width: '+(void 0!==t.iconWidth?t.iconWidth:"20px")+"; height: "+(void 0!==t.iconWidth?t.iconHeight:"20px")+'" xmlns="http://www.w3.org/2000/svg" class="bx--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t'+t.iconSVGContent+"\n\t\t\t\t</svg>\n\t\t\t</button>"})).each((function(t){ma(this).select("button").on("click",t.clickFunction).on("keyup",(function(){(ia.key&&"Enter"===ia.key||" "===ia.key)&&(ia.preventDefault(),t.clickFunction())}))}));this.overflowButton=this.getComponentContainer().select("button.bx--overflow-menu__trigger#toolbar-overflow-menu")},e.prototype.renderOverflowMenu=function(){var t=this.getControlConfigs().overflowMenuItemList,e=this.overflowMenu.select("ul").selectAll("li.bx--overflow-menu-options__option").data(t,(function(t){return fa.getProperty(t,"id")}));e.exit().remove();var n=e.enter().append("li").attr("id",(function(t){return t.id})).attr("class","bx--overflow-menu-options__option");n.append("button").attr("class","bx--overflow-menu-options__btn").attr("role","menuitem"),n.merge(e).classed("bx--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.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),ma(this.overflowButton.node().parentNode).classed("bx--overflow-menu--open",t)),t?this.services.events.dispatchEvent(tt.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(tt.Toolbar.HIDE_OVERFLOW_MENU)},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=ma("#"+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=ma("#"+e[n].id+" button").node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var t=this;this.getOverflowMenuItems().forEach((function(e,n){var r=ma("#"+e.id);null!==r&&(r.on("click",(function(){e.clickFunction(),t.updateOverflowMenu(!1)})),r.on("keyup",(function(){"Enter"===ia.key?e.clickFunction():"ArrowUp"===ia.key?t.focusOnPreviousEnabledMenuItem(n):"ArrowDown"===ia.key&&t.focusOnNextEnabledMenuItem(n)})))})),t.focusOnNextEnabledMenuItem(-1)}ia.stopImmediatePropagation()},e.prototype.getControlConfigs=function(){var t=this,e=fa.getProperty(this.getOptions(),"toolbar","numberOfIcons"),n=fa.getProperty(this.getOptions(),"toolbar","controls"),r=[],i=[];return n.forEach((function(e){var n=t.getControlConfigByType(e.type);n&&(n.text=e.text?e.text:e.type,-1!==n.id.indexOf("toolbar-export")?i.push(n):r.push(n))})),r.length<=e&&0===i.length?{buttonList:r}:{buttonList:r.splice(0,e-1),overflowMenuItemList:r.concat(i)}},e.prototype.getOverflowMenuItems=function(){var t=this.getControlConfigs().overflowMenuItemList;return t||[]},e.prototype.getOverflowButtonConfig=function(){var t=this;return{id:"toolbar-overflow-menu",shouldBeDisabled:function(){return!1},iconSVGContent:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="24" r="2"></circle>',clickFunction:function(){return t.toggleOverflowMenu()}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState();switch(t){case $.ZOOM_IN:r&&(e={id:"toolbar-zoomIn",shouldBeDisabled:function(){return n.services.zoom.isMinZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomIn()}});break;case $.ZOOM_OUT:r&&(e={id:"toolbar-zoomOut",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomOut()}});break;case $.RESET_ZOOM:r&&(e={id:"toolbar-resetZoom",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.resetZoomDomain()}});break;case $.MAKE_FULLSCREEN:e={id:"toolbar-makefullscreen",iconSVGContent:this.getControlIconByType(t),iconWidth:"15px",iconHight:"15px",shouldBeDisabled:function(){return!1},clickFunction:function(){n.services.domUtils.toggleFullscreen()}};break;case $.SHOW_AS_DATATABLE:e={id:"toolbar-showasdatatable",iconSVGContent:this.getControlIconByType(t),shouldBeDisabled:!1,clickFunction:function(){return n.services.events.dispatchEvent(tt.Modal.SHOW)}};break;case $.EXPORT_CSV:e={id:"toolbar-export-CSV",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.model.exportToCSV()}};break;case $.EXPORT_PNG:e={id:"toolbar-export-PNG",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.domUtils.exportToPNG()}};break;case $.EXPORT_JPG:e={id:"toolbar-export-JPG",shouldBeDisabled:function(){return!1},iconSVGContent: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 $.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 $.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 $.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 $.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 $.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 $.EXPORT_CSV:case $.EXPORT_JPG:case $.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}(Wg),Db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(e),r=n.domain(),i=r[0],o=r[1],a=i>0&&o<0||i<0&&o>0,s=this.getComponentContainer();if(a){var u=this.services.cartesianScales.getDomainScale().range(),l=u[0],c=u[1],h=+n(0)+.5;h||(h=n.range()[0]);var d=fa.flipSVGCoordinatesBasedOnOrientation({x0:l,x1:c,y0:h,y1:h},this.services.cartesianScales.getOrientation());rf.appendOrSelect(s,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",d.y0).attr("y2",d.y1).attr("x1",d.x0).attr("x2",d.x1)}else s.selectAll("line.domain").remove()},e}(Wg),kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.renderType=C.SVG,e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=Tb(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(tt.ZoomBar.UPDATE,this.render.bind(this));var t=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),r=this.services.zoom.isZoomBarLoading(L.TOP),i=this.services.zoom.isZoomBarLocked(L.TOP),o=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),a=bt.height[o],s=rf.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(0!==s){var u=0,l=this.model.get("axesMargins");l&&l.left&&(u=l.left);var c=rf.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",a).attr("opacity",1);rf.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",a).attr("width","100%").attr("height",bt.spacerHeight).attr("opacity",1).attr("fill","none");if(o===D.GRAPH_VIEW?rf.appendOrSelect(c,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",s-u).attr("height","100%").classed("zoom-bg-skeleton",r):o===D.SLIDER_VIEW&&rf.appendOrSelect(c,"rect.zoom-slider-bg").attr("x",u).attr("y",a/2-1).attr("width",s-u).attr("height",2).classed("zoom-slider-bg-skeleton",r),r)this.renderSkeleton(c,u,s);else{var h=this.services.cartesianScales,d=h.getMainXScale(),f=h.getMainYScale(),p=h.getMainXScaleType();if(d&&p===I.TIME){var g=this.services.zoom.getZoomBarData();if(fa.isEmpty(g))return;this.xScale=d.copy(),this.yScale=f.copy();var v=this.services.zoom.getDefaultZoomBarDomain(g);g=this.compensateDataForDefaultDomain(g,v);var m=this.model.get("initialZoomDomain"),y=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"initialZoomDomain");y&&y[0]&&y[1]&&(y[0]=new Date(y[0]),y[1]=new Date(y[1])),!y||m&&m[0].valueOf()===y[0].valueOf()&&m[1].valueOf()===y[1].valueOf()?null===y&&null!=m&&this.model.set({initialZoomDomain:null,zoomDomain:fa.merge([],v)},{skipUpdate:!0}):this.model.set({initialZoomDomain:fa.merge([],y),zoomDomain:y?fa.merge([],y):v},{skipUpdate:!0}),this.xScale.range([u,s]).domain(v),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,a-6]).domain(ps(g,(function(t){return t.value})));var b=this.model.get("zoomDomain");o===D.GRAPH_VIEW&&(this.renderZoomBarArea(c,"path.zoom-graph-area-unselected",g,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(c,"path.zoom-graph-area",g,this.clipId),this.renderZoomBarBaseline(c,u,s)),this.addBrushEventListener(b,u,s);var _=rf.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===b);else if(b[0].valueOf()===b[1].valueOf())_.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range(),this.xScale.domain());else{var x=b.map((function(t){return e.xScale(t)}));x[1]-x[0]<this.MIN_SELECTION_DIFF||(_.call(this.brush.move,x),this.updateBrushHandle(this.getComponentContainer(),x,b))}i&&(this.brush.filter((function(){return!1})),_.selectAll("rect").attr("cursor","auto"))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),o=bt.height[i];this.brush.extent([[e,0],[n,o]]).on("start brush end",null).on("start brush end",(function(){var e=ia.selection;null===e?r.handleBrushedEvent(t,r.xScale,r.xScale.range()):e[0]===e[1]||r.handleBrushedEvent(t,r.xScale,e)}))},e.prototype.handleBrushedEvent=function(t,e,n){var r=[e.invert(n[0]),e.invert(n[1])];if(this.updateBrushHandle(this.getComponentContainer(),n,r),null!=ia.sourceEvent&&("mousemove"===ia.sourceEvent.type||"mouseup"===ia.sourceEvent.type||"mousedown"===ia.sourceEvent.type||"touchstart"===ia.sourceEvent.type||"touchmove"===ia.sourceEvent.type||"touchend"===ia.sourceEvent.type)){void 0!==t&&t[0]===r[0]&&t[1]===r[1]||this.services.zoom.handleDomainChange(r,{dispatchEvent:!1});var i=void 0;"start"===ia.type?i=tt.ZoomBar.SELECTION_START:"brush"===ia.type?i=tt.ZoomBar.SELECTION_IN_PROGRESS:"end"===ia.type&&(i=tt.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(tt.ZoomDomain.CHANGE,{newDomain:r})),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=bt.handleWidth,o=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),a=bt.height[o],s=-i/2,u=bt.handleBarWidth,l=o===D.GRAPH_VIEW?bt.handleBarHeight:6,c=-u/2,h=(a-l)/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",u).attr("height",l).attr("cursor","ew-resize"),o===D.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=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),n=bt.height[e],r=(rf.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getComponentContainer().select("svg.zoom-container");rf.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(),u=i.getMainYScaleType(),l=function(t,e,n){return function(r,o){return i.getValueFromScale(t,e,n,r,o)}},c=l(this.xScale,s,o),h=l(this.yScale,u,a),d=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),f=bt.height[d],p=Dh().x((function(t,e){return c(t,e)})).y0(f).y1((function(t,e){return f-h(t,e)})),g=rf.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=rf.appendOrSelect(t,"clipPath").attr("id",e);rf.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=fa.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=fa.getProperty(this.model.getOptions(),"zoomBar",L.TOP,"type"),o=bt.height[i],a=Lh()([[e,o],[n,o]]);rf.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",a).classed("zoom-bg-baseline-skeleton",r)},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),rf.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type")===D.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(tt.ZoomBar.UPDATE,this.render.bind(this))},e}(Wg),Rb=function(){function t(t,e){this.services={domUtils:rf,files:af,events:of,gradientUtils:bp,transitions:yp,canvasZoom:Fg},this.model=new Ld(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(tt.Model.UPDATE,(function(t){var e=!!fa.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(tt.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(tt.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){void 0===e&&(e=C.SVG);var n={id:"title",components:[new sm(this.model,this.services)],growth:G.PREFERRED},r={id:"legend",components:[new qg(this.model,this.services)],growth:G.PREFERRED},i=fa.getProperty(this.model.getOptions(),"canvasZoom","enabled");i&&!0===i&&t.push(new dm(this.model,this.services));var o={id:"graph-frame",components:t,growth:G.STRETCH,renderType:e},a=!1!==this.model.getOptions().legend.enabled,s=U.COLUMN;if(a){var u=fa.getProperty(this.model.getOptions(),"legend","position");"left"===u?(s=U.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):"right"===u?(s=U.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):"bottom"===u&&(s=U.COLUMN_REVERSE)}var l={id:"spacer",components:[new Ny(this.model,this.services)],growth:G.PREFERRED},c={id:"full-frame",components:[new By(this.model,this.services,M(a?[r]:[],a?[l]:[],[o]),{direction:s})],growth:G.STRETCH},h=[];if(this.model.getOptions().title){h.push(n);var d={id:"spacer",components:[new Ny(this.model,this.services)],growth:G.PREFERRED};h.push(d)}return h.push(c),[new lm(this.model,this.services),new Yv(this.model,this.services),new By(this.model,this.services,h,{direction:U.COLUMN})]},t}(),Ib=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.exportToCSV=function(){var t,e=this.getDisplayData(),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales,i=r.getDomainIdentifier(),o=r.getRangeIdentifier();r.getDomainAxisScaleType()===I.TIME&&(t=function(t){return kg(t,"MMM d, yyyy")});var a=[["Group",r.getDomainLabel(),r.getRangeLabel()]];a=a.concat(e.map((function(e){return['"'+e[n]+'"','"'+(null===e[i]?"–":t?t(e[i]):e[i])+'"','"'+(null===e[o]?"–":e[o].toLocaleString())+'"']})));var s="",u="";a.forEach((function(t,e){u=t.join(","),s+=e<a.length?u+"\n":u})),this.services.files.downloadCSV(s,"myChart.csv")},e.prototype.setData=function(e){var n;if(e&&(n=t.prototype.setData.call(this,e),fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"enabled"))){var r=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"data");this.setZoomBarData(r)}return n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(fa.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=fa.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(L).forEach((function(t){var r=L[t],i=e.axes[r];if(i&&i.scaleType===I.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===fa.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}(Ld),Nb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Hg,curves:zg,zoom:jg}),r.model=new Ib(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=fa.getProperty(n,"zoomBar",L.TOP,"enabled"),i=fa.getProperty(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var o=this.services.cartesianScales.getMainXAxisPosition(),a=fa.getProperty(n,"axes",o,"scaleType"),s=r&&o===L.BOTTOM&&a===I.TIME,u=this.services.zoom.isZoomBarLocked(L.TOP),l=!!this.model.getOptions().title,c={id:"title",components:[new sm(this.model,this.services)],growth:G.STRETCH},h={id:"toolbar",components:[new Lb(this.model,this.services)],growth:G.PREFERRED},d={id:"header",components:[new By(this.model,this.services,M([c],i?[h]:[]),{direction:U.ROW,alignItems:H.CENTER})],growth:G.PREFERRED},f={id:"legend",components:[new qg(this.model,this.services)],growth:G.PREFERRED};s&&!u&&t.push(new hm(this.model,this.services),new Sb(this.model,this.services)),t.push(new am(this.model,this.services));var p={id:"graph-frame",components:t,growth:G.STRETCH,renderType:C.SVG},g=!1!==fa.getProperty(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,v=U.COLUMN;if(g){var m=fa.getProperty(this.model.getOptions(),"legend","position");m===N.LEFT?(v=U.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):m===N.RIGHT?(v=U.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):m===N.BOTTOM&&(v=U.COLUMN_REVERSE)}var y={id:"spacer",components:[new Ny(this.model,this.services)],growth:G.PREFERRED},b={id:"full-frame",components:[new By(this.model,this.services,M(g?[f]:[],g?[y]:[],[p]),{direction:v})],growth:G.STRETCH},_={id:"zoom-bar",components:[new kb(this.model,this.services)],growth:G.PREFERRED,renderType:C.SVG},x=[];if(l||i){x.push(d);var w={id:"spacer",components:[new Ny(this.model,this.services,i?{size:15}:void 0)],growth:G.PREFERRED};x.push(w)}return s&&x.push(_),x.push(b),[new cm(this.model,this.services),new Yv(this.model,this.services),new By(this.model,this.services,x,{direction:U.COLUMN})]},e}(Rb),Bb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(fa.clone(is.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new Om(this.model,this.services),new fm(this.model,this.services),new _m(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Vb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Pb(this.model,this.services),new pm(this.model,this.services),new Om(this.model,this.services,{stacked:!0}),new Tm(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Ub=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new vm(this.model,this.services),new Db(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Nb),Gb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new mm(this.model,this.services),new Db(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Nb),Hb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Pb(this.model,this.services),new ym(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Nb),zb=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getBoxQuartiles=function(t){return{q_25:ws(t,.25),q_50:ws(t,.5),q_75:ws(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(cs),u=((o={})[t]=e,o.counts=s,o.quartiles=i.getBoxQuartiles(s),o.outliers=null,o.whiskers=null,o),l=u.quartiles.q_25,c=u.quartiles.q_75,h=1.5*(c-l),d=l-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)}u.outliers=p;var b=Es(g),_=Os(g);u.whiskers={min:b||Es([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75]),max:_||Os([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75])},n.push(u)},i=this,o=0,a=e;o<a.length;o++){var s=a[o];r(s.name,s.data)}return n},e.prototype.setColorClassNames=function(){var t=fa.getProperty(this.getOptions(),"color","pairing"),e=fa.getProperty(t,"option");e=e<=lt.pairingOptions["1-color"]?e:1;var n=this.allDataGroups.map((function(t,n){return"1-"+e+"-1"}));this.colorClassNames=Ls().range(n).domain(this.allDataGroups)},e}(Ib),jb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new zb(r.services),r.model.setOptions(fa.mergeDefaultChartOptions(is.boxplotChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new bm(this.model,this.services),new Db(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})},e}(Nb),Fb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new xm(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Wb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.bulletChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new wm(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),qb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new Om(this.model,this.services),new _m(this.model,this.services,{handleThresholds:!0}),new Lm(this.model,this.services)];return this.getAxisChartComponents(t)},e}(Nb),Zb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.lollipopChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new Em(this.model,this.services),new _m(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Yb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new _m(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Xb=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.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}(Ld),Kb=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new Xb(i.services),r?i:(i.model.setOptions(fa.mergeDefaultChartOptions(is.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 Pm(this.model,this.services,{skeleton:j.PIE})];return this.getChartComponents(t)},e}(Rb),$b=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Am(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.DONUT})];return this.getChartComponents(t)},e}(Kb),Qb=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.generateDataLabels=function(t){var e={};return e[t.label]=ht.items.status.ACTIVE,e},e.prototype.getDisplayData=function(){return this.get("data")?this.get("data")[0]:null},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=fa.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=this.getDisplayData().value,n=e>100?100:e,r=fa.getProperty(t,"meter","status","ranges");if(r){var i=r.filter((function(t){return t.range[0]<=n&&n<=t.range[1]}));if(i.length>0)return i[0].status}return null},e}(Ld),Jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getComponentContainer(),o=this.getOptions(),a=this.model.getDisplayData(),s=this.model.getStatus(),u=rf.getSVGElementSize(i,{useAttrs:!0}).width,l=o.data.groupMapsTo,c=al().domain([0,100]).range([0,u]);rf.appendOrSelect(i,"rect.container").attr("x",0).attr("y",0).attr("width",u).attr("height",fa.getProperty(o,"meter","height"));var h=a.value>=100,d=i.selectAll("rect.value").data([a]),f=null==s||n.model.isUserProvidedColorScaleValid()?"value":"value status--"+s;d.enter().append("rect").classed("value",!0).merge(d).attr("x",0).attr("y",0).attr("height",fa.getProperty(o,"meter","height")).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[l],originalClassName:f})})).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(h?100:t.value)})).style("fill",(function(t){return n.model.getFillColor(t[l])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var p=fa.getProperty(o,"meter","peak"),g=null!==p&&p<a.value?a.value:p,v=null===g||h?[]:[g],m=i.selectAll("line.peak").data(v);m.enter().append("line").classed("peak",!0).merge(m).attr("y1",0).attr("y2",fa.getProperty(o,"meter","height")).transition(this.services.transitions.getTransition("peak-line-update",t)).attr("x1",(function(t){return c(t)})).attr("x2",(function(t){return c(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),m.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(Wg),t_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new Qb(r.services),r.model.setOptions(fa.merge(fa.clone(is.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new Jb(this.model,this.services)],growth:G.STRETCH,renderType:C.SVG},e={id:"meter-title",components:[new um(this.model,this.services)],growth:G.PREFERRED,renderType:C.SVG},n={id:"spacer",components:[new Ny(this.model,this.services,{size:8})],growth:G.PREFERRED},r=[new By(this.model,this.services,[e,n,t],{direction:U.COLUMN})];return this.getChartComponents(r,C.HTML)},e}(Rb),e_=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return r?i:(i.model.setOptions(fa.mergeDefaultChartOptions(is.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new my(this.model,this.services)];return this.getChartComponents(t)},e}(Rb),n_=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}(Ld),r_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new n_(r.services),r.model.setOptions(fa.mergeDefaultChartOptions(is.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Cm(this.model,this.services)];return this.getChartComponents(t)},e}(Rb),i_=((Cb={})[K.LINE]=[Om,_m],Cb[K.SCATTER]=[_m],Cb[K.AREA]=[fm,Om,_m],Cb[K.STACKED_AREA]=[pm,Om,Tm,Pb],Cb[K.SIMPLE_BAR]=[vm],Cb[K.GROUPED_BAR]=[mm,Db],Cb[K.STACKED_BAR]=[ym,Pb],Cb),o_=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=fa.mergeDefaultChartOptions(is.comboChart,n.options);return n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:K.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(i_).includes(e.type)?(r=fa.merge({},is[fa.camelCase(e.type)+"Chart"],t.model.getOptions(),e.options),e.type===K.STACKED_AREA&&(i=!0),i_[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=fa.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 fa.flatten(r)},e.prototype.getComponents=function(){var t=this.model.getOptions().comboChartTypes.some((function(t){return t.type===K.STACKED_BAR||t.type===K.STACKED_AREA})),e=M([new $y(this.model,this.services),new Mb(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})],t?[]:[new Ab(this.model,this.services)],this.getGraphComponents());return this.getAxisChartComponents(e)},e}(Nb),a_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dy(this.model,this.services)];return this.getChartComponents(t)},e}(Rb),s_=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=fa.merge({},t,this.getZoomOptions(t));fa.updateLegendAdditionalItems(e,n);var r=this.getHierarchyLevel(),i=fa.getProperty(e,"circlePack","hierarchyLevel");this.set({options:fa.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&&fa.getProperty(e,0,"children")?fa.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===fa.getProperty(n,"canvasZoom","enabled")&&i>2?{legend:{additionalItems:[{type:J.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?S(S({},t),{dataGroupName:e,children:t.children.map((function(t,r){return n.setChildrenDataGroup(t,e)}))}):S(S({},t),{dataGroupName:e})},e}(Ld),u_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new s_(r.services),r.model.setOptions(fa.mergeDefaultChartOptions(is.circlePackChart,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)},e}(Rb),l_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.wordCloudChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iy(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.PIE})];return this.getChartComponents(t)},e}(Rb);t.AreaChart=Bb,t.BoxplotChart=jb,t.BubbleChart=Fb,t.BulletChart=Wb,t.CirclePackChart=u_,t.ComboChart=o_,t.DonutChart=$b,t.GaugeChart=r_,t.GroupedBarChart=Gb,t.LineChart=qb,t.LollipopChart=Zb,t.MeterChart=t_,t.PieChart=Kb,t.RadarChart=e_,t.ScatterChart=Yb,t.SimpleBarChart=Ub,t.StackedAreaChart=Vb,t.StackedBarChart=Hb,t.TreemapChart=a_,t.WordCloudChart=l_,t.configurations=os,t.interfaces=nt,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,u,l,c,h,d,f,p,g,v,m,y,b,_,x,w,O,E,T,S=function(){return(S=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 M(){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"}(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"}(u||(u={})),function(t){t.CHANGE="zoom-domain-change"}(l||(l={})),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"}(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"}(_||(_={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(x||(x={})),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"}(E||(E={})),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"}(T||(T={}));var C,A,P,L,D,k,R,I,N,B,V,U,G,H,z,j,F,W,q,Z,Y,X,K,$,Q,J,tt=Object.freeze({__proto__:null,get Chart(){return i},get Modal(){return o},get Model(){return a},get Toolbar(){return s},get ZoomBar(){return u},get ZoomDomain(){return l},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 _},get Treemap(){return x},get Tooltip(){return w},get Threshold(){return O},get Legend(){return E},get CirclePack(){return T}});!function(t){t.HTML="html",t.SVG="svg"}(C||(C={})),function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(A||(A={})),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"}(L||(L={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(D||(D={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(k||(k={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(R||(R={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio"}(I||(I={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(N||(N={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(B||(B={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(V||(V={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(U||(U={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(G||(G={})),function(t){t.CENTER="center"}(H||(H={})),function(t){t.LEFT="left",t.RIGHT="right"}(z||(z={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(j||(j={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(F||(F={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(W||(W={})),function(t){t.SEMI="semi",t.FULL="full"}(q||(q={})),function(t){t.UP="up",t.DOWN="down"}(Z||(Z={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(Y||(Y={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(X||(X={})),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"}(K||(K={})),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"}($||($={})),function(t){t.LEFT="left",t.RIGHT="right"}(Q||(Q={})),function(t){t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom"}(J||(J={}));var et,nt=Object.freeze({__proto__:null,get Roles(){return r},Events:tt,get RenderTypes(){return C},get ChartTheme(){return A},get ColorClassNameTypes(){return P},get AxisPositions(){return L},get ZoomBarTypes(){return D},get TruncationTypes(){return k},get CartesianOrientations(){return R},get ScaleTypes(){return I},get LegendPositions(){return N},get Alignments(){return B},get LegendOrientations(){return V},get LayoutDirection(){return U},get LayoutGrowth(){return G},get LayoutAlignItems(){return H},get CalloutDirections(){return z},get Skeletons(){return j},get TextAnchor(){return F},get DominantBaseline(){return W},get GaugeTypes(){return q},get ArrowDirections(){return Z},get Statuses(){return Y},get TickRotations(){return X},get ChartTypes(){return K},get ToolbarControlTypes(){return $},get AxisTitleOrientations(){return Q},get LegendItemType(){return J}});function rt(t){return+t}function it(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ot={opacity:{unselected:.05,selected:.4}},at={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1},st={duration:1e3,ease:it,zoomLevel:3},ut={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},lt={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},ct={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},ht={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"}},dt={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},ft={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15}},pt={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}},gt={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},vt={default:{size:24}},mt={horizontalOffset:10},yt={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}},bt={height:(et={},et[D.GRAPH_VIEW]=32,et[D.SLIDER_VIEW]=10,et),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},_t=[{type:J.RADIUS,name:"Radius"},{type:J.AREA,name:"Poor area"},{type:J.AREA,name:"Satisfactory area"},{type:J.AREA,name:"Great area"},{type:J.QUARTILE,name:"Quartiles"}],xt="object"==typeof global&&global&&global.Object===Object&&global,wt="object"==typeof self&&self&&self.Object===Object&&self,Ot=xt||wt||Function("return this")(),Et=Ot.Symbol,Tt=Object.prototype,St=Tt.hasOwnProperty,Mt=Tt.toString,Ct=Et?Et.toStringTag:void 0;var At=Object.prototype.toString;var Pt=Et?Et.toStringTag:void 0;function Lt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Pt&&Pt in Object(t)?function(t){var e=St.call(t,Ct),n=t[Ct];try{t[Ct]=void 0;var r=!0}catch(t){}var i=Mt.call(t);return r&&(e?t[Ct]=n:delete t[Ct]),i}(t):function(t){return At.call(t)}(t)}function Dt(t){return null!=t&&"object"==typeof t}function kt(t){return"symbol"==typeof t||Dt(t)&&"[object Symbol]"==Lt(t)}function Rt(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 It=Array.isArray,Nt=Et?Et.prototype:void 0,Bt=Nt?Nt.toString:void 0;function Vt(t){if("string"==typeof t)return t;if(It(t))return Rt(t,Vt)+"";if(kt(t))return Bt?Bt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Ut=/\s/;var Gt=/^\s+/;function Ht(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Ut.test(t.charAt(e)););return e}(t)+1).replace(Gt,""):t}function zt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var jt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Wt=/^0o[0-7]+$/i,qt=parseInt;function Zt(t){if("number"==typeof t)return t;if(kt(t))return NaN;if(zt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=zt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ht(t);var n=Ft.test(t);return n||Wt.test(t)?qt(t.slice(2),n?2:8):jt.test(t)?NaN:+t}function Yt(t){return t}function Xt(t){if(!zt(t))return!1;var e=Lt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Kt,$t=Ot["__core-js_shared__"],Qt=(Kt=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||""))?"Symbol(src)_1."+Kt:"";var Jt=Function.prototype.toString;function te(t){if(null!=t){try{return Jt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var ee=/^\[object .+?Constructor\]$/,ne=Function.prototype,re=Object.prototype,ie=ne.toString,oe=re.hasOwnProperty,ae=RegExp("^"+ie.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function se(t){return!(!zt(t)||(e=t,Qt&&Qt in e))&&(Xt(t)?ae:ee).test(te(t));var e}function ue(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return se(n)?n:void 0}var le=ue(Ot,"WeakMap"),ce=Object.create,he=function(){function t(){}return function(e){if(!zt(e))return{};if(ce)return ce(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function de(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 fe(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var pe=Date.now;var ge=function(){try{var t=ue(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),ve=function(t){var e=0,n=0;return function(){var r=pe(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ge?function(t,e){return ge(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:Yt);function me(t){return t!=t}function ye(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,me,n)}(t,e,0)>-1}var be=/^(?:0|[1-9]\d*)$/;function _e(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&be.test(t))&&t>-1&&t%1==0&&t<e}function xe(t,e,n){"__proto__"==e&&ge?ge(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function we(t,e){return t===e||t!=t&&e!=e}var Oe=Object.prototype.hasOwnProperty;function Ee(t,e,n){var r=t[e];Oe.call(t,e)&&we(r,n)&&(void 0!==n||e in t)||xe(t,e,n)}function Te(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?xe(n,s,u):Ee(n,s,u)}return n}var Se=Math.max;function Me(t,e){return ve(function(t,e,n){return e=Se(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Se(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),de(t,this,s)}}(t,e,Yt),t+"")}function Ce(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Ae(t){return null!=t&&Ce(t.length)&&!Xt(t)}function Pe(t,e,n){if(!zt(n))return!1;var r=typeof e;return!!("number"==r?Ae(n)&&_e(e,n.length):"string"==r&&e in n)&&we(n[e],t)}var Le=Object.prototype;function De(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Le)}function ke(t){return Dt(t)&&"[object Arguments]"==Lt(t)}var Re=Object.prototype,Ie=Re.hasOwnProperty,Ne=Re.propertyIsEnumerable,Be=ke(function(){return arguments}())?ke:function(t){return Dt(t)&&Ie.call(t,"callee")&&!Ne.call(t,"callee")};var Ve="object"==typeof t&&t&&!t.nodeType&&t,Ue=Ve&&"object"==typeof module&&module&&!module.nodeType&&module,Ge=Ue&&Ue.exports===Ve?Ot.Buffer:void 0,He=(Ge?Ge.isBuffer:void 0)||function(){return!1},ze={};function je(t){return function(e){return t(e)}}ze["[object Float32Array]"]=ze["[object Float64Array]"]=ze["[object Int8Array]"]=ze["[object Int16Array]"]=ze["[object Int32Array]"]=ze["[object Uint8Array]"]=ze["[object Uint8ClampedArray]"]=ze["[object Uint16Array]"]=ze["[object Uint32Array]"]=!0,ze["[object Arguments]"]=ze["[object Array]"]=ze["[object ArrayBuffer]"]=ze["[object Boolean]"]=ze["[object DataView]"]=ze["[object Date]"]=ze["[object Error]"]=ze["[object Function]"]=ze["[object Map]"]=ze["[object Number]"]=ze["[object Object]"]=ze["[object RegExp]"]=ze["[object Set]"]=ze["[object String]"]=ze["[object WeakMap]"]=!1;var Fe="object"==typeof t&&t&&!t.nodeType&&t,We=Fe&&"object"==typeof module&&module&&!module.nodeType&&module,qe=We&&We.exports===Fe&&xt.process,Ze=function(){try{var t=We&&We.require&&We.require("util").types;return t||qe&&qe.binding&&qe.binding("util")}catch(t){}}(),Ye=Ze&&Ze.isTypedArray,Xe=Ye?je(Ye):function(t){return Dt(t)&&Ce(t.length)&&!!ze[Lt(t)]},Ke=Object.prototype.hasOwnProperty;function $e(t,e){var n=It(t),r=!n&&Be(t),i=!n&&!r&&He(t),o=!n&&!r&&!i&&Xe(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):[],u=s.length;for(var l in t)!e&&!Ke.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_e(l,u))||s.push(l);return s}function Qe(t,e){return function(n){return t(e(n))}}var Je=Qe(Object.keys,Object),tn=Object.prototype.hasOwnProperty;function en(t){if(!De(t))return Je(t);var e=[];for(var n in Object(t))tn.call(t,n)&&"constructor"!=n&&e.push(n);return e}function nn(t){return Ae(t)?$e(t):en(t)}var rn=Object.prototype.hasOwnProperty;function on(t){if(!zt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=De(t),n=[];for(var r in t)("constructor"!=r||!e&&rn.call(t,r))&&n.push(r);return n}function an(t){return Ae(t)?$e(t,!0):on(t)}var sn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,un=/^\w*$/;function ln(t,e){if(It(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!kt(t))||(un.test(t)||!sn.test(t)||null!=e&&t in Object(e))}var cn=ue(Object,"create");var hn=Object.prototype.hasOwnProperty;var dn=Object.prototype.hasOwnProperty;function fn(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 pn(t,e){for(var n=t.length;n--;)if(we(t[n][0],e))return n;return-1}fn.prototype.clear=function(){this.__data__=cn?cn(null):{},this.size=0},fn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},fn.prototype.get=function(t){var e=this.__data__;if(cn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return hn.call(e,t)?e[t]:void 0},fn.prototype.has=function(t){var e=this.__data__;return cn?void 0!==e[t]:dn.call(e,t)},fn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=cn&&void 0===e?"__lodash_hash_undefined__":e,this};var gn=Array.prototype.splice;function vn(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])}}vn.prototype.clear=function(){this.__data__=[],this.size=0},vn.prototype.delete=function(t){var e=this.__data__,n=pn(e,t);return!(n<0)&&(n==e.length-1?e.pop():gn.call(e,n,1),--this.size,!0)},vn.prototype.get=function(t){var e=this.__data__,n=pn(e,t);return n<0?void 0:e[n][1]},vn.prototype.has=function(t){return pn(this.__data__,t)>-1},vn.prototype.set=function(t,e){var n=this.__data__,r=pn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var mn=ue(Ot,"Map");function yn(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 bn(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])}}bn.prototype.clear=function(){this.size=0,this.__data__={hash:new fn,map:new(mn||vn),string:new fn}},bn.prototype.delete=function(t){var e=yn(this,t).delete(t);return this.size-=e?1:0,e},bn.prototype.get=function(t){return yn(this,t).get(t)},bn.prototype.has=function(t){return yn(this,t).has(t)},bn.prototype.set=function(t,e){var n=yn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function _n(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(_n.Cache||bn),n}_n.Cache=bn;var xn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wn=/\\(\\)?/g,On=function(t){var e=_n(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(xn,(function(t,n,r,i){e.push(r?i.replace(wn,"$1"):n||t)})),e}));function En(t){return null==t?"":Vt(t)}function Tn(t,e){return It(t)?t:ln(t,e)?[t]:On(En(t))}function Sn(t){if("string"==typeof t||kt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Mn(t,e){for(var n=0,r=(e=Tn(e,t)).length;null!=t&&n<r;)t=t[Sn(e[n++])];return n&&n==r?t:void 0}function Cn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var An=Et?Et.isConcatSpreadable:void 0;function Pn(t){return It(t)||Be(t)||!!(An&&t&&t[An])}function Ln(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Pn),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Ln(s,e-1,n,r,i):Cn(i,s):r||(i[i.length]=s)}return i}function Dn(t){return(null==t?0:t.length)?Ln(t,1):[]}var kn=Qe(Object.getPrototypeOf,Object),Rn=Function.prototype,In=Object.prototype,Nn=Rn.toString,Bn=In.hasOwnProperty,Vn=Nn.call(Object);function Un(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 Gn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Hn(t){return Gn.test(t)}var zn="[\\ud800-\\udfff]",jn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Fn="\\ud83c[\\udffb-\\udfff]",Wn="[^\\ud800-\\udfff]",qn="(?:\\ud83c[\\udde6-\\uddff]){2}",Zn="[\\ud800-\\udbff][\\udc00-\\udfff]",Yn="(?:"+jn+"|"+Fn+")"+"?",Xn="[\\ufe0e\\ufe0f]?"+Yn+("(?:\\u200d(?:"+[Wn,qn,Zn].join("|")+")[\\ufe0e\\ufe0f]?"+Yn+")*"),Kn="(?:"+[Wn+jn+"?",jn,qn,Zn,zn].join("|")+")",$n=RegExp(Fn+"(?="+Fn+")|"+Kn+Xn,"g");function Qn(t){return Hn(t)?function(t){return t.match($n)||[]}(t):function(t){return t.split("")}(t)}var Jn,tr=(Jn="toUpperCase",function(t){var e=Hn(t=En(t))?Qn(t):void 0,n=e?e[0]:t.charAt(0),r=e?Un(e,1).join(""):t.slice(1);return n[Jn]()+r});var er=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"}),nr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rr=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var ir=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var or=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var ar="\\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",sr="["+ar+"]",ur="\\d+",lr="[\\u2700-\\u27bf]",cr="[a-z\\xdf-\\xf6\\xf8-\\xff]",hr="[^\\ud800-\\udfff"+ar+ur+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",dr="(?:\\ud83c[\\udde6-\\uddff]){2}",fr="[\\ud800-\\udbff][\\udc00-\\udfff]",pr="[A-Z\\xc0-\\xd6\\xd8-\\xde]",gr="(?:"+cr+"|"+hr+")",vr="(?:"+pr+"|"+hr+")",mr="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",yr="[\\ufe0e\\ufe0f]?"+mr+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",dr,fr].join("|")+")[\\ufe0e\\ufe0f]?"+mr+")*"),br="(?:"+[lr,dr,fr].join("|")+")"+yr,_r=RegExp([pr+"?"+cr+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[sr,pr,"$"].join("|")+")",vr+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[sr,pr+gr,"$"].join("|")+")",pr+"?"+gr+"+(?:['’](?:d|ll|m|re|s|t|ve))?",pr+"+(?:['’](?: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_])",ur,br].join("|"),"g");function xr(t,e,n){return t=En(t),void 0===(e=n?void 0:e)?function(t){return or.test(t)}(t)?function(t){return t.match(_r)||[]}(t):function(t){return t.match(ir)||[]}(t):t.match(e)||[]}var wr=RegExp("['’]","g");function Or(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}(xr(function(t){return(t=En(t))&&t.replace(nr,er).replace(rr,"")}(e).replace(wr,"")),t,"")}}var Er=Or((function(t,e,n){return e=e.toLowerCase(),t+(n?tr(En(e).toLowerCase()):e)}));function Tr(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=Zt(n))==n?n:0),void 0!==e&&(e=(e=Zt(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}(Zt(t),e,n)}function Sr(t){var e=this.__data__=new vn(t);this.size=e.size}Sr.prototype.clear=function(){this.__data__=new vn,this.size=0},Sr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Sr.prototype.get=function(t){return this.__data__.get(t)},Sr.prototype.has=function(t){return this.__data__.has(t)},Sr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!mn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new bn(r)}return n.set(t,e),this.size=n.size,this};var Mr="object"==typeof t&&t&&!t.nodeType&&t,Cr=Mr&&"object"==typeof module&&module&&!module.nodeType&&module,Ar=Cr&&Cr.exports===Mr?Ot.Buffer:void 0,Pr=Ar?Ar.allocUnsafe:void 0;function Lr(t,e){if(e)return t.slice();var n=t.length,r=Pr?Pr(n):new t.constructor(n);return t.copy(r),r}function Dr(){return[]}var kr=Object.prototype.propertyIsEnumerable,Rr=Object.getOwnPropertySymbols,Ir=Rr?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}(Rr(t),(function(e){return kr.call(t,e)})))}:Dr;var Nr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Cn(e,Ir(t)),t=kn(t);return e}:Dr;function Br(t,e,n){var r=e(t);return It(t)?r:Cn(r,n(t))}function Vr(t){return Br(t,nn,Ir)}function Ur(t){return Br(t,an,Nr)}var Gr=ue(Ot,"DataView"),Hr=ue(Ot,"Promise"),zr=ue(Ot,"Set"),jr=te(Gr),Fr=te(mn),Wr=te(Hr),qr=te(zr),Zr=te(le),Yr=Lt;(Gr&&"[object DataView]"!=Yr(new Gr(new ArrayBuffer(1)))||mn&&"[object Map]"!=Yr(new mn)||Hr&&"[object Promise]"!=Yr(Hr.resolve())||zr&&"[object Set]"!=Yr(new zr)||le&&"[object WeakMap]"!=Yr(new le))&&(Yr=function(t){var e=Lt(t),n="[object Object]"==e?t.constructor:void 0,r=n?te(n):"";if(r)switch(r){case jr:return"[object DataView]";case Fr:return"[object Map]";case Wr:return"[object Promise]";case qr:return"[object Set]";case Zr:return"[object WeakMap]"}return e});var Xr=Yr,Kr=Object.prototype.hasOwnProperty;var $r=Ot.Uint8Array;function Qr(t){var e=new t.constructor(t.byteLength);return new $r(e).set(new $r(t)),e}var Jr=/\w*$/;var ti=Et?Et.prototype:void 0,ei=ti?ti.valueOf:void 0;function ni(t,e){var n=e?Qr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ri(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return Qr(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?Qr(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 ni(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,Jr.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,ei?Object(ei.call(r)):{}}}function ii(t){return"function"!=typeof t.constructor||De(t)?{}:he(kn(t))}var oi=Ze&&Ze.isMap,ai=oi?je(oi):function(t){return Dt(t)&&"[object Map]"==Xr(t)};var si=Ze&&Ze.isSet,ui=si?je(si):function(t){return Dt(t)&&"[object Set]"==Xr(t)},li={};function ci(t,e,n,r,i,o){var a,s=1&e,u=2&e,l=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!zt(t))return t;var c=It(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Kr.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return fe(t,a)}else{var h=Xr(t),d="[object Function]"==h||"[object GeneratorFunction]"==h;if(He(t))return Lr(t,s);if("[object Object]"==h||"[object Arguments]"==h||d&&!i){if(a=u||d?{}:ii(t),!s)return u?function(t,e){return Te(t,Nr(t),e)}(t,function(t,e){return t&&Te(e,an(e),t)}(a,t)):function(t,e){return Te(t,Ir(t),e)}(t,function(t,e){return t&&Te(e,nn(e),t)}(a,t))}else{if(!li[h])return i?t:{};a=ri(t,h,s)}}o||(o=new Sr);var f=o.get(t);if(f)return f;o.set(t,a),ui(t)?t.forEach((function(r){a.add(ci(r,e,n,r,t,o))})):ai(t)&&t.forEach((function(r,i){a.set(i,ci(r,e,n,i,t,o))}));var p=c?void 0:(l?u?Ur:Vr:u?an:nn)(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]),Ee(a,i,ci(r,e,n,i,t,o))})),a}li["[object Arguments]"]=li["[object Array]"]=li["[object ArrayBuffer]"]=li["[object DataView]"]=li["[object Boolean]"]=li["[object Date]"]=li["[object Float32Array]"]=li["[object Float64Array]"]=li["[object Int8Array]"]=li["[object Int16Array]"]=li["[object Int32Array]"]=li["[object Map]"]=li["[object Number]"]=li["[object Object]"]=li["[object RegExp]"]=li["[object Set]"]=li["[object String]"]=li["[object Symbol]"]=li["[object Uint8Array]"]=li["[object Uint8ClampedArray]"]=li["[object Uint16Array]"]=li["[object Uint32Array]"]=!0,li["[object Error]"]=li["[object Function]"]=li["[object WeakMap]"]=!1;function hi(t){return ci(t,5)}function di(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new bn;++e<n;)this.add(t[e])}function fi(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 pi(t,e){return t.has(e)}di.prototype.add=di.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},di.prototype.has=function(t){return this.__data__.has(t)};function gi(t,e,n,r,i,o){var a=1&n,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var h=-1,d=!0,f=2&n?new di: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(!fi(e,(function(t,e){if(!pi(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 vi(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function mi(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var yi=Et?Et.prototype:void 0,bi=yi?yi.valueOf:void 0;var _i=Object.prototype.hasOwnProperty;var xi=Object.prototype.hasOwnProperty;function wi(t,e,n,r,i,o){var a=It(t),s=It(e),u=a?"[object Array]":Xr(t),l=s?"[object Array]":Xr(e),c="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),d=u==l;if(d&&He(t)){if(!He(e))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new Sr),a||Xe(t)?gi(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 $r(t),new $r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return we(+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=vi;case"[object Set]":var u=1&r;if(s||(s=mi),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=gi(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(bi)return bi.call(t)==bi.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var f=c&&xi.call(t,"__wrapped__"),p=h&&xi.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,v=p?e.value():e;return o||(o=new Sr),i(g,v,n,r,o)}}return!!d&&(o||(o=new Sr),function(t,e,n,r,i,o){var a=1&n,s=Vr(t),u=s.length;if(u!=Vr(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:_i.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;++l<u;){var g=t[c=s[l]],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 Oi(t,e,n,r,i){return t===e||(null==t||null==e||!Dt(t)&&!Dt(e)?t!=t&&e!=e:wi(t,e,n,r,Oi,i))}function Ei(t){return t==t&&!zt(t)}function Ti(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Si(t){var e=function(t){for(var e=nn(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Ei(i)]}return e}(t);return 1==e.length&&e[0][2]?Ti(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 u=(s=n[i])[0],l=t[u],c=s[1];if(a&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new Sr;if(r)var d=r(l,c,u,t,e,h);if(!(void 0===d?Oi(c,l,3,r,h):d))return!1}}return!0}(n,t,e)}}function Mi(t,e){return null!=t&&e in Object(t)}function Ci(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Tn(e,t)).length,o=!1;++r<i;){var a=Sn(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ce(i)&&_e(a,i)&&(It(t)||Be(t))}(t,e,Mi)}function Ai(t,e){return ln(t)&&Ei(e)?Ti(Sn(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Mn(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Ci(n,t):Oi(e,r,3)}}function Pi(t){return ln(t)?(e=Sn(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Mn(e,t)}}(t);var e}function Li(t){return"function"==typeof t?t:null==t?Yt:"object"==typeof t?It(t)?Ai(t[0],t[1]):Si(t):Pi(t)}var Di,ki=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Di?a:++r];if(!1===e(i[s],s,i))break}return t};var Ri=function(t,e){return function(n,r){if(null==n)return n;if(!Ae(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&&ki(t,e,nn)})),Ii=function(){return Ot.Date.now()},Ni=Math.max,Bi=Math.min;function Vi(t,e,n){var r,i,o,a,s,u,l=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,l=e,a=t.apply(o,n)}function p(t){return l=t,s=setTimeout(v,e),c?f(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=o}function v(){var t=Ii();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Bi(n,o-(t-l)):n}(t))}function m(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function y(){var t=Ii(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(v,e),f(u)}return void 0===s&&(s=setTimeout(v,e)),a}return e=Zt(e)||0,zt(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Ni(Zt(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(Ii())},y}function Ui(t,e,n){(void 0===n||we(t[e],n))&&(void 0!==n||e in t)||xe(t,e,n)}function Gi(t){return Dt(t)&&Ae(t)}function Hi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function zi(t,e,n,r,i,o,a){var s=Hi(t,n),u=Hi(e,n),l=a.get(u);if(l)Ui(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,d=void 0===h;if(d){var f=It(u),p=!f&&He(u),g=!f&&!p&&Xe(u);h=u,f||p||g?It(s)?h=s:Gi(s)?h=fe(s):p?(d=!1,h=Lr(u,!0)):g?(d=!1,h=ni(u,!0)):h=[]:function(t){if(!Dt(t)||"[object Object]"!=Lt(t))return!1;var e=kn(t);if(null===e)return!0;var n=Bn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nn.call(n)==Vn}(u)||Be(u)?(h=s,Be(s)?h=Te(c=s,an(c)):zt(s)&&!Xt(s)||(h=ii(u))):d=!1}d&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),Ui(t,n,h)}}function ji(t,e,n,r,i){t!==e&&ki(e,(function(o,a){if(i||(i=new Sr),zt(o))zi(t,e,a,n,ji,r,i);else{var s=r?r(Hi(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Ui(t,a,s)}}),an)}function Fi(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 Wi(t,e){var n=-1,r=Ae(t)?Array(t.length):[];return Ri(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function qi(t,e){return Ln(function(t,e){return(It(t)?Rt:Wi)(t,Li(e))}(t,e),1/0)}function Zi(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 Yi=Object.prototype.hasOwnProperty;function Xi(t){if(null==t)return!0;if(Ae(t)&&(It(t)||"string"==typeof t||"function"==typeof t.splice||He(t)||Xe(t)||Be(t)))return!t.length;var e=Xr(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(De(t))return!en(t).length;for(var n in t)if(Yi.call(t,n))return!1;return!0}function Ki(t,e){return Oi(t,e)}var $i,Qi=Or((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ji=($i=function(t,e,n){ji(t,e,n)},Me((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=$i.length>3&&"function"==typeof i?(r--,i):void 0,o&&Pe(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&$i(t,a,n,i)}return t})));function to(t,e){var n;return Ri(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function eo(t,e,n){var r=It(t)?fi:to;return n&&Pe(t,e,n)&&(e=void 0),r(t,Li(e))}var no=zr&&1/mi(new zr([,-0]))[1]==1/0?function(t){return new zr(t)}:function(){};function ro(t,e,n){var r=-1,i=ye,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Fi;else if(o>=200){var l=e?null:no(t);if(l)return mi(l);a=!1,i=pi,u=new di}else u=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=u.length;d--;)if(u[d]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}var io=Me((function(t){var e=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}(t);return Gi(e)&&(e=void 0),ro(Ln(t,1,Gi,!0),Li(e))}));function oo(t){return t&&t.length?ro(t):[]}var ao="http://www.w3.org/1999/xhtml",so={svg:"http://www.w3.org/2000/svg",xhtml:ao,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function uo(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),so.hasOwnProperty(e)?{space:so[e],local:t}:t}function lo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ao&&e.documentElement.namespaceURI===ao?e.createElement(t):e.createElementNS(n,t)}}function co(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ho(t){var e=uo(t);return(e.local?co:lo)(e)}function fo(){}function po(t){return null==t?fo:function(){return this.querySelector(t)}}function go(){return[]}function vo(t){return null==t?go:function(){return this.querySelectorAll(t)}}function mo(t){return function(){return this.matches(t)}}function yo(t){return new Array(t.length)}function bo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}bo.prototype={constructor:bo,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)}};function _o(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new bo(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function xo(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(f[s]=l="$"+a.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<d;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):n[s]=new bo(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[f[s]]===u&&(i[s]=u)}function wo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Oo(t){return function(){this.removeAttribute(t)}}function Eo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function To(t,e){return function(){this.setAttribute(t,e)}}function So(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mo(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Co(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 Ao(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Po(t){return function(){this.style.removeProperty(t)}}function Lo(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Do(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ko(t,e){return t.style.getPropertyValue(e)||Ao(t).getComputedStyle(t,null).getPropertyValue(e)}function Ro(t){return function(){delete this[t]}}function Io(t,e){return function(){this[t]=e}}function No(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Bo(t){return t.trim().split(/^|\s+/)}function Vo(t){return t.classList||new Uo(t)}function Uo(t){this._node=t,this._names=Bo(t.getAttribute("class")||"")}function Go(t,e){for(var n=Vo(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ho(t,e){for(var n=Vo(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function zo(t){return function(){Go(this,t)}}function jo(t){return function(){Ho(this,t)}}function Fo(t,e){return function(){(e.apply(this,arguments)?Go:Ho)(this,t)}}function Wo(){this.textContent=""}function qo(t){return function(){this.textContent=t}}function Zo(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Yo(){this.innerHTML=""}function Xo(t){return function(){this.innerHTML=t}}function Ko(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function $o(){this.nextSibling&&this.parentNode.appendChild(this)}function Qo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Jo(){return null}function ta(){var t=this.parentNode;t&&t.removeChild(this)}function ea(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function na(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Uo.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={},ia=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ra={mouseenter:"mouseover",mouseleave:"mouseout"}));function oa(t,e,n){return t=aa(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function aa(t,e,n){return function(r){var i=ia;ia=r;try{t.call(this,this.__data__,e,n)}finally{ia=i}}}function sa(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 ua(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.capture);++i?e.length=i:delete this.__on}}}function la(t,e,n){var r=ra.hasOwnProperty(t.type)?oa:aa;return function(i,o,a){var s,u=this.__on,l=r(e,o,a);if(u)for(var c=0,h=u.length;c<h;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function ca(t,e,n){var r=Ao(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 ha(t,e){return function(){return ca(this,t,e)}}function da(t,e){return function(){return ca(this,t,e.apply(this,arguments))}}var fa,pa=[null];function ga(t,e){this._groups=t,this._parents=e}function va(){return new ga([[document.documentElement]],pa)}function ma(t){return"string"==typeof t?new ga([[document.querySelector(t)]],[document.documentElement]):new ga([[t]],pa)}function ya(){for(var t,e=ia;t=e.sourceEvent;)e=t;return e}function ba(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function _a(t){var e=ya();return e.changedTouches&&(e=e.changedTouches[0]),ba(t,e)}function xa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wa(t,e){return t(e={exports:{}},e.exports),e.exports}ga.prototype=va.prototype={constructor:ga,select:function(t){"function"!=typeof t&&(t=po(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],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new ga(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=vo(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new ga(r,i)},filter:function(t){"function"!=typeof t&&(t=mo(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,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new ga(r,this._parents)},data:function(t,e){if(!t)return f=new Array(this.size()),l=-1,this.each((function(t){f[++l]=t})),f;var n=e?xo:_o,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],d=h.length,f=t.call(c,c&&c.__data__,l,r),p=f.length,g=s[l]=new Array(p),v=a[l]=new Array(p);n(c,h,g,v,u[l]=new Array(d),f,e);for(var m,y,b=0,_=0;b<p;++b)if(m=g[b]){for(b>=_&&(_=b+1);!(y=v[_])&&++_<p;);m._next=y||null}}return(a=new ga(a,r))._enter=s,a._exit=u,a},enter:function(){return new ga(this._enter||this._groups.map(yo),this._parents)},exit:function(){return new ga(this._exit||this._groups.map(yo),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){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 u,l=e[s],c=n[s],h=l.length,d=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(d[f]=u);for(;s<r;++s)a[s]=e[s];return new ga(a,this._parents)},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=wo);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new ga(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},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(){var t=0;return this.each((function(){++t})),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=uo(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?Eo:Oo:"function"==typeof e?n.local?Co:Mo:n.local?So:To)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Po:"function"==typeof e?Do:Lo)(t,e,null==n?"":n)):ko(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ro:"function"==typeof e?No:Io)(t,e)):this.node()[t]},classed:function(t,e){var n=Bo(t+"");if(arguments.length<2){for(var r=Vo(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Fo:e?zo:jo)(n,e))},text:function(t){return arguments.length?this.each(null==t?Wo:("function"==typeof t?Zo:qo)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Yo:("function"==typeof t?Ko:Xo)(t)):this.node().innerHTML},raise:function(){return this.each($o)},lower:function(){return this.each(Qo)},append:function(t){var e="function"==typeof t?t:ho(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ho(t),r=null==e?Jo:"function"==typeof e?e:po(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ta)},clone:function(t){return this.select(t?na:ea)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=sa(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?la:ua,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?da:ha)(t,e))}},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=_t.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=Vi,t.clone=hi,t.merge=Ji,t.unionBy=io,t.removeArrayDuplicates=oo,t.clamp=Tr,t.flatten=Dn,t.camelCase=Er,t.isEmpty=Xi,t.isEqual=Ki,t.flatMapDeep=qi,t.kebabCase=Qi,t.fromPairs=Zi,t.some=eo,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,o=arguments;i.mousePosition=_a(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,o)}),e)}},t.mergeDefaultChartOptions=function(n,r){n=t.clone(n);var i=Object.keys(r.axes||{});for(var o in 0===i.length&&delete n.axes,n.axes)if(i.includes(o)){var a=r.axes[o];(a.primary||a.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 s=a.mapsTo;if(null==s){var u=a.scaleType;null==u?a.mapsTo="value":u===I.TIME?a.mapsTo="date":u===I.LABELS&&(a.mapsTo="key")}}else delete n.axes[o];return e(n,r),t.merge(n,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){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n%1!=0?parseFloat(n.toFixed(1)):n},t.truncateLabel=function(t,e,n){return n>t.length?t:e===k.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===k.FRONT_LINE?"..."+t.substr(-n):e===k.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===R.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===R.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(fa||(fa={}));var Oa=wa((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}));xa(Oa);var Ea=wa((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}));xa(Ea);var Ta=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ea)&&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}));xa(Ta);var Sa=wa((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}));xa(Sa);var Ma=wa((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,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));xa(Ma);var Ca=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ma)&&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}));xa(Ca);var Aa=wa((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 u=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(a.length)}}},t.exports=e.default}));xa(Aa);var Pa=wa((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 u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[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)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}},t.exports=e.default}));xa(Pa);var La=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(Aa),r=i(Pa);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}));xa(La);var Da=xa(wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Oa),r=s(Ta),i=s(Sa),o=s(Ca),a=s(La);function s(t){return t&&t.__esModule?t:{default:t}}var u={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=u,t.exports=e.default}))),ka={type:k.END_LINE,threshold:16,numCharacter:14},Ra={enabled:!0,position:N.BOTTOM,clickable:!0,truncation:ka,alignment:B.LEFT,order:null,additionalItems:[]},Ia={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},Na={enabled:!0},Ba={enabled:!0,showTotal:!0,truncation:ka,groupLabel:"Group"},Va={top:{visible:!0,includeZero:!0,truncation:ka},bottom:{visible:!0,includeZero:!0,truncation:ka},left:{visible:!0,includeZero:!0,truncation:ka},right:{visible:!0,includeZero:!0,truncation:ka}},Ua={addSpaceOnEdges:1,showDayName:!1,localeObject:Da,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"}}},Ga="undefined"!=typeof document&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),Ha={width:null,height:null,resizable:!0,tooltip:Ba,legend:Ra,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:M([{type:$.SHOW_AS_DATATABLE}],Ga?[{type:$.MAKE_FULLSCREEN}]:[],[{type:$.EXPORT_CSV},{type:$.EXPORT_PNG},{type:$.EXPORT_JPG}])}},za=fa.merge({},Ha,{axes:Va,timeScale:Ua,grid:Ia,ruler:Na,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:D.GRAPH_VIEW}}}),ja=fa.merge({},za,{bars:{maxWidth:16},timeScale:fa.merge(Ua,{addSpaceOnEdges:1})}),Fa=fa.merge({},ja,{}),Wa=fa.merge({},ja,{}),qa=fa.merge({},ja,{bars:fa.merge({},ja.bars,{dividerSize:1.5})}),Za=fa.merge({},ja,{}),Ya=fa.merge({},za,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Xa=Ya,Ka=fa.merge({},Ya,{points:{radius:3,filled:!1,enabled:!0}}),$a=fa.merge({},Ka,{timeScale:fa.merge(Ua,{addSpaceOnEdges:0})}),Qa=$a,Ja=fa.merge({},za,{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:J.RADIUS,name:"Radius"}]}}),ts=fa.merge({},za,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:J.AREA,name:"Poor area"},{type:J.AREA,name:"Satisfactory area"},{type:J.AREA,name:"Great area"},{type:J.QUARTILE,name:"Quartiles"}]}}),es=fa.merge({},Ha,{tooltip:fa.merge({},Ba,{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"}}),ns=fa.merge({},Ha,{pie:{labels:{formatter:null,enabled:!0},alignment:B.LEFT,sortFunction:null}}),rs=fa.merge({},Ha,{legend:{enabled:!1},gauge:{type:q.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:B.LEFT}}),is={chart:Ha,axisChart:za,simpleBarChart:Fa,groupedBarChart:Wa,stackedBarChart:qa,boxplotChart:Za,bubbleChart:Ja,bulletChart:ts,lineChart:Ka,areaChart:$a,stackedAreaChart:Qa,scatterChart:Ya,lollipopChart:Xa,pieChart:ns,donutChart:fa.merge({},ns,{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:B.LEFT}}),meterChart:fa.merge({},Ha,{legend:{enabled:!1},meter:{height:8,statusBar:{percentageIndicator:{enabled:!0}}}}),radarChart:fa.merge({},Ha,{radar:{axes:{angle:"key",value:"value"},alignment:B.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:rs,comboChart:fa.merge({},ja,{comboChartTypes:[]}),treemapChart:fa.merge({},Ha,{data:fa.merge(Ha.data,{groupMapsTo:"name"})}),circlePackChart:fa.merge({},Ha,ut,{data:fa.merge(Ha.data,{groupMapsTo:"name"})}),wordCloudChart:es},os=Object.freeze({__proto__:null,grid:Ia,ruler:Na,baseTooltip:Ba,timeScale:Ua,options:is,area:ot,axis:at,canvasZoomSettings:st,circlePack:ut,color:lt,boxplot:ct,legend:ht,lines:dt,meter:ft,pie:pt,radar:gt,spacers:vt,tooltips:mt,transitions:yt,toolbar:{buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},zoomBar:bt,defaultLegendAdditionalItems:_t});function as(){}function ss(t,e){var n=new as;if(t instanceof as)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function us(){}as.prototype=ss.prototype={constructor:as,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var ls=ss.prototype;function cs(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function hs(t){var e;return 1===t.length&&(e=t,t=function(t,n){return cs(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}us.prototype=function(t,e){var n=new us;if(t instanceof us)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:us,has:ls.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ls.remove,clear:ls.clear,values:ls.keys,size:ls.size,empty:ls.empty,each:ls.each};var ds=hs(cs).right;function fs(t){return null===t?NaN:+t}function ps(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function gs(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}var vs=Math.sqrt(50),ms=Math.sqrt(10),ys=Math.sqrt(2);function bs(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)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-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>=vs?10:o>=ms?5:o>=ys?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=vs?10:o>=ms?5:o>=ys?2:1)}function xs(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>=vs?i*=10:o>=ms?i*=5:o>=ys&&(i*=2),e<t?-i:i}function ws(t,e,n){if(null==n&&(n=fs),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}}function Os(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r}function Es(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}function Ts(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}function Ss(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Ms=Array.prototype,Cs=Ms.map,As=Ms.slice,Ps={name:"implicit"};function Ls(){var t=ss(),e=[],n=[],r=Ps;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Ps)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=ss();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=As.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ls(e,n).unknown(r)},Ss.apply(i,arguments),i}function Ds(){var t,e,n=Ls().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],h=o[c-0],d=o[1-c];t=(d-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(d-h-t*(n-s))*l,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var f=gs(n).map((function(e){return h+t*e}));return i(c?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),c()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,c()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),c()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),c()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,c()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},n.copy=function(){return Ds(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},Ss.apply(c(),arguments)}function ks(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Rs(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Is(){}var Ns="\\s*([+-]?\\d+)\\s*",Bs="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vs="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Us=/^#([0-9a-f]{3,8})$/,Gs=new RegExp("^rgb\\("+[Ns,Ns,Ns]+"\\)$"),Hs=new RegExp("^rgb\\("+[Vs,Vs,Vs]+"\\)$"),zs=new RegExp("^rgba\\("+[Ns,Ns,Ns,Bs]+"\\)$"),js=new RegExp("^rgba\\("+[Vs,Vs,Vs,Bs]+"\\)$"),Fs=new RegExp("^hsl\\("+[Bs,Vs,Vs]+"\\)$"),Ws=new RegExp("^hsla\\("+[Bs,Vs,Vs,Bs]+"\\)$"),qs={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 Zs(){return this.rgb().formatHex()}function Ys(){return this.rgb().formatRgb()}function Xs(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Us.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ks(e):3===n?new tu(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new tu(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new tu(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=Gs.exec(t))?new tu(e[1],e[2],e[3],1):(e=Hs.exec(t))?new tu(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zs.exec(t))?$s(e[1],e[2],e[3],e[4]):(e=js.exec(t))?$s(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Fs.exec(t))?iu(e[1],e[2]/100,e[3]/100,1):(e=Ws.exec(t))?iu(e[1],e[2]/100,e[3]/100,e[4]):qs.hasOwnProperty(t)?Ks(qs[t]):"transparent"===t?new tu(NaN,NaN,NaN,0):null}function Ks(t){return new tu(t>>16&255,t>>8&255,255&t,1)}function $s(t,e,n,r){return r<=0&&(t=e=n=NaN),new tu(t,e,n,r)}function Qs(t){return t instanceof Is||(t=Xs(t)),t?new tu((t=t.rgb()).r,t.g,t.b,t.opacity):new tu}function Js(t,e,n,r){return 1===arguments.length?Qs(t):new tu(t,e,n,null==r?1:r)}function tu(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function eu(){return"#"+ru(this.r)+ru(this.g)+ru(this.b)}function nu(){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 ru(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function iu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new su(t,e,n,r)}function ou(t){if(t instanceof su)return new su(t.h,t.s,t.l,t.opacity);if(t instanceof Is||(t=Xs(t)),!t)return new su;if(t instanceof su)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,u=(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/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new su(a,s,u,t.opacity)}function au(t,e,n,r){return 1===arguments.length?ou(t):new su(t,e,n,null==r?1:r)}function su(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function uu(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function lu(t){return function(){return t}}function cu(t){return 1==(t=+t)?hu: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):lu(isNaN(e)?n:e)}}function hu(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):lu(isNaN(t)?e:t)}ks(Is,Xs,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Zs,formatHex:Zs,formatHsl:function(){return ou(this).formatHsl()},formatRgb:Ys,toString:Ys}),ks(tu,Js,Rs(Is,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new tu(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new tu(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:eu,formatHex:eu,formatRgb:nu,toString:nu})),ks(su,au,Rs(Is,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new su(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new su(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 tu(uu(t>=240?t-240:t+120,i,r),uu(t,i,r),uu(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 du=function t(e){var n=cu(e);function r(t,e){var r=n((t=Js(t)).r,(e=Js(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=hu(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 fu(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 pu(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]=xu(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 gu(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function vu(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function mu(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]=xu(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var yu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bu=new RegExp(yu.source,"g");function _u(t,e){var n,r,i,o=yu.lastIndex=bu.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=yu.exec(t))&&(r=bu.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,u.push({i:a,x:vu(n,r)})),o=bu.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function xu(t,e){var n,r=typeof e;return null==e||"boolean"===r?lu(e):("number"===r?vu:"string"===r?(n=Xs(e))?(e=n,du):_u:e instanceof Xs?du:e instanceof Date?gu:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?fu:Array.isArray(e)?pu:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?mu:vu)(t,e)}function wu(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ou,Eu,Tu,Su,Mu=180/Math.PI,Cu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Au(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Mu,skewX:Math.atan(u)*Mu,scaleX:a,scaleY:s}}function Pu(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:vu(t,i)},{i:u-2,x:vu(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),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:vu(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:vu(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),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:vu(t,n)},{i:s-2,x:vu(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Lu=Pu((function(t){return"none"===t?Cu:(Ou||(Ou=document.createElement("DIV"),Eu=document.documentElement,Tu=document.defaultView),Ou.style.transform=t,t=Tu.getComputedStyle(Eu.appendChild(Ou),null).getPropertyValue("transform"),Eu.removeChild(Ou),Au(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Du=Pu((function(t){return null==t?Cu:(Su||(Su=document.createElementNS("http://www.w3.org/2000/svg","g")),Su.setAttribute("transform",t),(t=Su.transform.baseVal.consolidate())?Au((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Cu)}),", ",")",")");function ku(t){return+t}var Ru=[0,1];function Iu(t){return t}function Nu(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Bu(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Vu(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Nu(i,r),o=n(a,o)):(r=Nu(r,i),o=n(o,a)),function(t){return o(r(t))}}function Uu(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]=Nu(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=ds(t,e,1,r)-1;return o[n](i[n](e))}}function Gu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Hu(){var t,e,n,r,i,o,a=Ru,s=Ru,u=xu,l=Iu;function c(){return r=Math.min(a.length,s.length)>2?Uu:Vu,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),vu)))(n)))},h.domain=function(t){return arguments.length?(a=Cs.call(t,ku),l===Iu||(l=Bu(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=As.call(t),c()):s.slice()},h.rangeRound=function(t){return s=As.call(t),u=wu,c()},h.clamp=function(t){return arguments.length?(l=t?Bu(a):Iu,h):l!==Iu},h.interpolate=function(t){return arguments.length?(u=t,c()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function zu(t,e){return Hu()(t,e)}function ju(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 Fu(t){return(t=ju(Math.abs(t)))?t[1]:NaN}var Wu,qu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zu(t){if(!(e=qu.exec(t)))throw new Error("invalid format: "+t);var e;return new Yu({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 Yu(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 Xu(t,e){var n=ju(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")}Zu.prototype=Yu.prototype,Yu.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 Ku={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Xu(100*t,e)},r:Xu,s:function(t,e){var n=ju(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Wu=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")+ju(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function $u(t){return t}var Qu,Ju,tl,el=Array.prototype.map,nl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rl(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?$u:(e=el.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=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?$u:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(el.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Zu(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"):Ku[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():"",_="$"===d?o:/[%p]/.test(y)?u:"",x=Ku[y],w=/[defgprs%]/.test(y);function O(t){var i,o,u,d=b,O=_;if("c"===y)O=x(t)+O,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?c:x(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)),E&&0==+t&&(E=!1),d=(E?"("===h?h:l:"-"===h||"("===h?"":h)+d,O=("s"===y?nl[8+Wu/3]:"")+O+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){O=(46===u?a+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!f&&(t=r(t,1/0));var T=d.length+t.length+O.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&f&&(t=r(S+t,S.length?p-O.length:1/0),S=""),n){case"<":t=d+t+O+S;break;case"=":t=d+S+t+O;break;case"^":t=S.slice(0,T=S.length>>1)+d+t+O+S.slice(T);break;default:t=S+d+t+O}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)),O.toString=function(){return t+""},O}return{format:h,formatPrefix:function(t,e){var n=h(((t=Zu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Fu(e)/3))),i=Math.pow(10,-r),o=nl[8+r/3];return function(t){return n(i*t)+o}}}}function il(t,e,n,r){var i,o=xs(t,e,n);switch((r=Zu(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(Fu(e)/3)))-Fu(Math.abs(t)))}(o,a))||(r.precision=i),tl(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,Fu(e)-Fu(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,-Fu(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Ju(r)}function ol(t){var e=t.domain;return t.ticks=function(t){var n=e();return bs(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return il(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=_s(s,u,n))>0?r=_s(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=_s(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function al(){var t=zu(Iu,Iu);return t.copy=function(){return Gu(t,al())},Ss.apply(t,arguments),ol(t)}function sl(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 ul(t){return Math.log(t)}function ll(t){return Math.exp(t)}function cl(t){return-Math.log(-t)}function hl(t){return-Math.exp(-t)}function dl(t){return isFinite(t)?+("1e"+t):t<0?0:t}function fl(t){return function(e){return-t(-e)}}function pl(t){var e,n,r=t(ul,ll),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?dl:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=fl(e),n=fl(n),t(cl,hl)):t(ul,ll),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],u=a[a.length-1];(r=u<s)&&(d=s,s=u,u=d);var l,c,h,d=e(s),f=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&f-d<p){if(d=Math.round(d)-1,f=Math.round(f)+1,s>0){for(;d<f;++d)for(c=1,l=n(d);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;d<f;++d)for(c=o-1,l=n(d);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=bs(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=Ju(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(sl(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Qu=rl({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Ju=Qu.format,tl=Qu.formatPrefix;var gl=new Date,vl=new Date;function ml(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 ml((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 gl.setTime(+e),vl.setTime(+r),t(gl),t(vl),Math.floor(n(gl,vl))},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 yl=ml((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));yl.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ml((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):yl:null};var bl=ml((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()})),_l=ml((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()})),xl=ml((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()})),wl=ml((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}));function Ol(t){return ml((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 El=Ol(0),Tl=Ol(1),Sl=(Ol(2),Ol(3),Ol(4)),Ml=(Ol(5),Ol(6),ml((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()}))),Cl=ml((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()}));Cl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ml((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 Al=ml((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 Pl(t){return ml((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 Ll=Pl(0),Dl=Pl(1),kl=(Pl(2),Pl(3),Pl(4)),Rl=(Pl(5),Pl(6),ml((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()})));function Il(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 Nl(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 Bl(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Rl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ml((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};var Vl,Ul,Gl={"-":"",_:" ",0:"0"},Hl=/^\s*\d+/,zl=/^%/,jl=/[\\^$*+?|[\]().{}]/g;function Fl(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 Wl(t){return t.replace(jl,"\\$&")}function ql(t){return new RegExp("^(?:"+t.map(Wl).join("|")+")","i")}function Zl(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Yl(t,e,n){var r=Hl.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Xl(t,e,n){var r=Hl.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Kl(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function $l(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ql(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Jl(t,e,n){var r=Hl.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function tc(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ec(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 nc(t,e,n){var r=Hl.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=Hl.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=Hl.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function oc(t,e,n){var r=Hl.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ac(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function sc(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function uc(t,e,n){var r=Hl.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function lc(t,e,n){var r=Hl.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function cc(t,e,n){var r=Hl.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function hc(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function dc(t,e,n){var r=Hl.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function fc(t,e,n){var r=Hl.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function pc(t,e){return Fl(t.getDate(),e,2)}function gc(t,e){return Fl(t.getHours(),e,2)}function vc(t,e){return Fl(t.getHours()%12||12,e,2)}function mc(t,e){return Fl(1+wl.count(Cl(t),t),e,3)}function yc(t,e){return Fl(t.getMilliseconds(),e,3)}function bc(t,e){return yc(t,e)+"000"}function _c(t,e){return Fl(t.getMonth()+1,e,2)}function xc(t,e){return Fl(t.getMinutes(),e,2)}function wc(t,e){return Fl(t.getSeconds(),e,2)}function Oc(t){var e=t.getDay();return 0===e?7:e}function Ec(t,e){return Fl(El.count(Cl(t)-1,t),e,2)}function Tc(t,e){var n=t.getDay();return t=n>=4||0===n?Sl(t):Sl.ceil(t),Fl(Sl.count(Cl(t),t)+(4===Cl(t).getDay()),e,2)}function Sc(t){return t.getDay()}function Mc(t,e){return Fl(Tl.count(Cl(t)-1,t),e,2)}function Cc(t,e){return Fl(t.getFullYear()%100,e,2)}function Ac(t,e){return Fl(t.getFullYear()%1e4,e,4)}function Pc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Fl(e/60|0,"0",2)+Fl(e%60,"0",2)}function Lc(t,e){return Fl(t.getUTCDate(),e,2)}function Dc(t,e){return Fl(t.getUTCHours(),e,2)}function kc(t,e){return Fl(t.getUTCHours()%12||12,e,2)}function Rc(t,e){return Fl(1+Al.count(Rl(t),t),e,3)}function Ic(t,e){return Fl(t.getUTCMilliseconds(),e,3)}function Nc(t,e){return Ic(t,e)+"000"}function Bc(t,e){return Fl(t.getUTCMonth()+1,e,2)}function Vc(t,e){return Fl(t.getUTCMinutes(),e,2)}function Uc(t,e){return Fl(t.getUTCSeconds(),e,2)}function Gc(t){var e=t.getUTCDay();return 0===e?7:e}function Hc(t,e){return Fl(Ll.count(Rl(t)-1,t),e,2)}function zc(t,e){var n=t.getUTCDay();return t=n>=4||0===n?kl(t):kl.ceil(t),Fl(kl.count(Rl(t),t)+(4===Rl(t).getUTCDay()),e,2)}function jc(t){return t.getUTCDay()}function Fc(t,e){return Fl(Dl.count(Rl(t)-1,t),e,2)}function Wc(t,e){return Fl(t.getUTCFullYear()%100,e,2)}function qc(t,e){return Fl(t.getUTCFullYear()%1e4,e,4)}function Zc(){return"+0000"}function Yc(){return"%"}function Xc(t){return+t}function Kc(t){return Math.floor(+t/1e3)}!function(t){Vl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=ql(i),c=Zl(i),h=ql(o),d=Zl(o),f=ql(a),p=Zl(a),g=ql(s),v=Zl(s),m=ql(u),y=Zl(u),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:pc,e:pc,f:bc,H:gc,I:vc,j:mc,L:yc,m:_c,M:xc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Xc,s:Kc,S:wc,u:Oc,U:Ec,V:Tc,w:Sc,W:Mc,x:null,X:null,y:Cc,Y:Ac,Z:Pc,"%":Yc},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Lc,e:Lc,f:Nc,H:Dc,I:kc,j:Rc,L:Ic,m:Bc,M:Vc,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Xc,s:Kc,S:Uc,u:Gc,U:Hc,V:zc,w:jc,W:Fc,x:null,X:null,y:Wc,Y:qc,Z:Zc,"%":Yc},x={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p[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[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[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[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:ic,e:ic,f:cc,H:ac,I:ac,j:oc,L:lc,m:rc,M:sc,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:nc,Q:dc,s:fc,S:uc,u:Xl,U:Kl,V:$l,w:Yl,W:Ql,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:tc,Y:Jl,Z:ec,"%":hc};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=Gl[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function O(t,e){return function(n){var r,i,o=Bl(1900,void 0,1);if(E(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=Nl(Bl(o.y,0,1))).getUTCDay(),r=i>4||0===i?Dl.ceil(r):Dl(r),r=Al.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Il(Bl(o.y,0,1))).getDay(),r=i>4||0===i?Tl.ceil(r):Tl(r),r=wl.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?Nl(Bl(o.y,0,1)).getUTCDay():Il(Bl(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,Nl(o)):Il(o)}}function E(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=x[i in Gl?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=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=O(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}})}(t),Ul=Vl.format,Vl.parse,Vl.utcFormat,Vl.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"]});function $c(t){return new Date(t)}function Qc(t){return t instanceof Date?+t:+new Date(+t)}function Jc(t,e,n,r,i,o,a,s,u){var l=zu(Iu,Iu),c=l.invert,h=l.domain,d=u(".%L"),f=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),b=u("%Y"),_=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,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 x(s){return(a(s)<s?d:o(s)<s?f:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:b)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=hs((function(t){return t[2]})).right(_,o);a===_.length?(i=xs(n/31536e6,r/31536e6,e),e=t):a?(i=(a=_[o/_[a-1][2]<_[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(xs(n,r,e),1),e=s)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(c(t))},l.domain=function(t){return arguments.length?h(Cs.call(t,Qc)):h().map($c)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(sl(n,t)):l},l.copy=function(){return Gu(l,Jc(t,e,n,r,i,o,a,s,u))},l}function th(){return Ss.apply(Jc(Cl,Ml,El,wl,xl,_l,bl,yl,Ul).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var eh=Math.PI,nh=2*eh,rh=nh-1e-6;function ih(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function oh(){return new ih}function ah(t){return function(){return t}}ih.prototype=oh.prototype={constructor:ih,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,u=r-e,l=o-t,c=a-e,h=l*l+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-u*l)>1e-6&&i){var d=n-o,f=r-a,p=s*s+u*u,g=d*d+f*f,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((eh-Math.acos((p+h-g)/(2*v*m)))/2),b=y/m,_=y/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*l)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>l*f)+","+(this._x1=t+_*s)+","+(this._y1=e+_*u)}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),u=t+a,l=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"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%nh+nh),h>rh?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=eh)+","+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 sh=Math.abs,uh=Math.atan2,lh=Math.cos,ch=Math.max,hh=Math.min,dh=Math.sin,fh=Math.sqrt,ph=Math.PI,gh=ph/2,vh=2*ph;function mh(t){return t>1?0:t<-1?ph:Math.acos(t)}function yh(t){return t>=1?gh:t<=-1?-gh:Math.asin(t)}function bh(t){return t.innerRadius}function _h(t){return t.outerRadius}function xh(t){return t.startAngle}function wh(t){return t.endAngle}function Oh(t){return t&&t.padAngle}function Eh(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,d=h*u-c*l;if(!(d*d<1e-12))return[t+(d=(c*(e-o)-h*(t-i))/d)*u,e+d*l]}function Th(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/fh(s*s+u*u),c=l*u,h=-l*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,_=y*y+b*b,x=i-o,w=d*g-p*f,O=(b<0?-1:1)*fh(ch(0,x*x*_-w*w)),E=(w*b-y*O)/_,T=(-w*y-b*O)/_,S=(w*b+y*O)/_,M=(-w*y+b*O)/_,C=E-v,A=T-m,P=S-v,L=M-m;return C*C+A*A>P*P+L*L&&(E=S,T=M),{cx:E,cy:T,x01:-c,y01:-h,x11:E*(i/x-1),y11:T*(i/x-1)}}function Sh(){var t=bh,e=_h,n=ah(0),r=null,i=xh,o=wh,a=Oh,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-gh,f=o.apply(this,arguments)-gh,p=sh(f-d),g=f>d;if(s||(s=u=oh()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>vh-1e-12)s.moveTo(h*lh(d),h*dh(d)),s.arc(0,0,h,d,f,!g),c>1e-12&&(s.moveTo(c*lh(f),c*dh(f)),s.arc(0,0,c,f,d,g));else{var v,m,y=d,b=f,_=d,x=f,w=p,O=p,E=a.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):fh(c*c+h*h)),S=hh(sh(h-c)/2,+n.apply(this,arguments)),M=S,C=S;if(T>1e-12){var A=yh(T/c*dh(E)),P=yh(T/h*dh(E));(w-=2*A)>1e-12?(_+=A*=g?1:-1,x-=A):(w=0,_=x=(d+f)/2),(O-=2*P)>1e-12?(y+=P*=g?1:-1,b-=P):(O=0,y=b=(d+f)/2)}var L=h*lh(y),D=h*dh(y),k=c*lh(x),R=c*dh(x);if(S>1e-12){var I,N=h*lh(b),B=h*dh(b),V=c*lh(_),U=c*dh(_);if(p<ph&&(I=Eh(L,D,V,U,N,B,k,R))){var G=L-I[0],H=D-I[1],z=N-I[0],j=B-I[1],F=1/dh(mh((G*z+H*j)/(fh(G*G+H*H)*fh(z*z+j*j)))/2),W=fh(I[0]*I[0]+I[1]*I[1]);M=hh(S,(c-W)/(F-1)),C=hh(S,(h-W)/(F+1))}}O>1e-12?C>1e-12?(v=Th(V,U,L,D,h,C,g),m=Th(N,B,k,R,h,C,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),C<S?s.arc(v.cx,v.cy,C,uh(v.y01,v.x01),uh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,C,uh(v.y01,v.x01),uh(v.y11,v.x11),!g),s.arc(0,0,h,uh(v.cy+v.y11,v.cx+v.x11),uh(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,C,uh(m.y11,m.x11),uh(m.y01,m.x01),!g))):(s.moveTo(L,D),s.arc(0,0,h,y,b,!g)):s.moveTo(L,D),c>1e-12&&w>1e-12?M>1e-12?(v=Th(k,R,N,B,c,-M,g),m=Th(L,D,V,U,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,uh(v.y01,v.x01),uh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,uh(v.y01,v.x01),uh(v.y11,v.x11),!g),s.arc(0,0,c,uh(v.cy+v.y11,v.cx+v.x11),uh(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,uh(m.y11,m.x11),uh(m.y01,m.x01),!g))):s.arc(0,0,c,x,_,g):s.lineTo(k,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ph/2;return[lh(r)*n,dh(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:ah(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:ah(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:ah(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ah(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:ah(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:ah(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ah(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Mh(t){this._context=t}function Ch(t){return new Mh(t)}function Ah(t){return t[0]}function Ph(t){return t[1]}function Lh(){var t=Ah,e=Ph,n=ah(!0),r=null,i=Ch,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=oh())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(l)return o=null,l+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:ah(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:ah(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:ah(!!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 Dh(){var t=Ah,e=null,n=ah(0),r=Ph,i=ah(!0),o=null,a=Ch,s=null;function u(u){var l,c,h,d,f,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==o&&(s=a(f=oh())),l=0;l<=p;++l){if(!(l<p&&i(d=u[l],l,u))===g)if(g=!g)c=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=c;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[l]=+t(d,l,u),m[l]=+n(d,l,u),s.point(e?+e(d,l,u):v[l],r?+r(d,l,u):m[l]))}if(f)return s=null,f+""||null}function l(){return Lh().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:ah(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:ah(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:ah(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:ah(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:ah(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ah(+t),u):r},u.lineX0=u.lineY0=function(){return l().x(t).y(n)},u.lineY1=function(){return l().x(t).y(r)},u.lineX1=function(){return l().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:ah(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u}function kh(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Rh(t){return t}Mh.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 Ih=Bh(Ch);function Nh(t){this._curve=t}function Bh(t){function e(e){return new Nh(t(e))}return e._curve=t,e}function Vh(){return t=Lh().curve(Ih),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(Bh(t)):e()._curve},t;var t,e}Nh.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))}};var Uh=Array.prototype.slice;function Gh(){}function Hh(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 zh(t){this._context=t}function jh(t){return new zh(t)}function Fh(t){this._context=t}function Wh(t){return new Fh(t)}function qh(t){this._context=t}function Zh(t){return new qh(t)}function Yh(t,e){this._basis=new zh(t),this._beta=e}zh.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:Hh(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:Hh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Fh.prototype={areaStart:Gh,areaEnd:Gh,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:Hh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},qh.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:Hh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Yh.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,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(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 Xh=function t(e){function n(t){return 1===e?new zh(t):new Yh(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Kh(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 $h(t,e){this._context=t,this._k=(1-e)/6}$h.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:Kh(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:Kh(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 Qh=function t(e){function n(t){return new $h(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Jh(t,e){this._context=t,this._k=(1-e)/6}Jh.prototype={areaStart:Gh,areaEnd:Gh,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:Kh(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 td=function t(e){function n(t){return new Jh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ed(t,e){this._context=t,this._k=(1-e)/6}ed.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:Kh(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 ed(t,e)}return n.tension=function(e){return t(+e)},n}(0);function rd(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,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var l=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*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function id(t,e){this._context=t,this._alpha=e}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._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:rd(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 od=function t(e){function n(t){return e?new id(t,e):new $h(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ad(t,e){this._context=t,this._alpha=e}ad.prototype={areaStart:Gh,areaEnd:Gh,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:rd(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 sd=function t(e){function n(t){return e?new ad(t,e):new Jh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);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(){(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:rd(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 ld=function t(e){function n(t){return e?new ud(t,e):new ed(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function cd(t){this._context=t}function hd(t){return new cd(t)}function dd(t){return t<0?-1:1}function fd(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(dd(o)+dd(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function pd(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function gd(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 vd(t){this._context=t}function md(t){this._context=new yd(t)}function yd(t){this._context=t}function bd(t){return new vd(t)}function _d(t){return new md(t)}function xd(t){this._context=t}function wd(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 Od(t){return new xd(t)}function Ed(t,e){this._context=t,this._t=e}function Td(t){return new Ed(t,.5)}function Sd(t){return new Ed(t,0)}function Md(t){return new Ed(t,1)}function Cd(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 Ad(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Pd(t,e){return t[e]}cd.prototype={areaStart:Gh,areaEnd:Gh,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))}},vd.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:gd(this,this._t0,pd(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,gd(this,pd(this,n=fd(this,t,e)),n);break;default:gd(this,this._t0,n=fd(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(md.prototype=Object.create(vd.prototype)).point=function(t,e){vd.prototype.point.call(this,e,t)},yd.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)}},xd.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=wd(t),i=wd(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)}},Ed.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}};var Ld=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=fa.getProperty(e,"data").groupMapsTo,o=fa.getProperty(e,"axes");return t&&(n=n.filter((function(e){return t.includes(e.group)}))),o&&Object.keys(o).forEach((function(t){var e=o[t].mapsTo,r=o[t].scaleType;if(r!==I.LINEAR&&r!==I.LOG||(n=n.map((function(t){var n;return S(S({},t),((n={})[e]=null===t[e]?t[e]:Number(t[e]),n))}))),e&&o[t].domain)if(r===I.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=ht.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(fa.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(t){return fa.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=ht.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.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.getDataValuesGroupedByKeys=function(t){var e=this,n=this.getOptions(),r=n.data.groupMapsTo,i=this.getDisplayData(t),o=ss(i,(function(t){return t[e.services.cartesianScales.getDomainIdentifier(t)]})).keys(),a=this.services.cartesianScales.domainAxisPosition,s=n.axes[a].scaleType;s===I.TIME?o.sort((function(t,e){return new Date(t)-new Date(e)})):s!==I.LOG&&s!==I.LINEAR||o.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return o.map((function(t){var n={sharedStackKey:t};return u.forEach((function(o){var a=i.find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[r]===o&&n[i].toString()===t})),s=e.services.cartesianScales.getRangeIdentifier(n);n[o]=a?a[s]: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=this.getOptions().data.groupMapsTo,a=this.getDataGroupNames(i),s=this.getDataValuesGroupedByKeys(i);if(n){var u=fa.fromPairs(s.map((function(t){return[t.sharedStackKey,0]})));s.forEach((function(t){a.forEach((function(e){u[t.sharedStackKey]+=t[e]}))})),s.forEach((function(t){a.forEach((function(e){u[t.sharedStackKey]?t[e]=t[e]/u[t.sharedStackKey]*100:t[e]=0}))}))}return function(){var t=ah([]),e=Ad,n=Cd,r=Pd;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var h,d=s[o],f=c[o]=new Array(u),p=0;p<u;++p)f[p]=h=[0,+r(i[p],d,p,i)],h.data=i[p];f.key=d}for(o=0,a=e(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:ah(Uh.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:ah(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Ad:"function"==typeof t?t:ah(Uh.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Cd:t,i):n},i}().keys(a)(s).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(n){var r=t[n];return r[o]=a[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();fa.updateLegendAdditionalItems(e,t),this.set({options:fa.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(tt.Model.UPDATE,{animate:t}))},t.prototype.toggleDataLabel=function(t){var e=ht.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 u=i.filter((function(t){return t.status===n})),l=this.getOptions(),c=i.some((function(t){return t.status===r}));l.data.selectedGroups=c?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(tt.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=fa.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=fa.getProperty(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.isUserProvidedColorScaleValid=function(){var t=fa.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=fa.getProperty(t,"label");if(null===a){var s=fa.getProperty(r,i);o=s||"Ungrouped"}else o=a;var u={group:o,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},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=ht.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=ss(t,(function(t){return t[e]})).keys();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=fa.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=fa.getProperty(this.getOptions(),"color","pairing"),e=fa.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=fa.getProperty(t,"option"),r=e>5?14:e;n=n<=lt.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.colorClassNames=Ls().range(i).domain(this.allDataGroups)},t}(),Dd=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}(),kd={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 "},Rd=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}()}(),Id="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Nd="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Bd="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Nd):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Vd=["top","right","bottom","left","width","height","size","weight"],Ud="undefined"!=typeof MutationObserver,Gd=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(){Bd(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)};Gd.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Gd.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Gd.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Gd.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},Gd.prototype.connect_=function(){Id&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ud?(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)},Gd.prototype.disconnect_=function(){Id&&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)},Gd.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Vd.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Gd.getInstance=function(){return this.instance_||(this.instance_=new Gd),this.instance_},Gd.instance_=null;var Hd=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},zd=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Nd},jd=Xd(0,0,0,0);function Fd(t){return parseFloat(t)||0}function Wd(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Fd(t["border-"+n+"-width"])}),0)}function qd(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return jd;var r=zd(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]=Fd(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Fd(r.width),u=Fd(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Wd(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Wd(r,"top","bottom")+a)),!function(t){return t===zd(t).document.documentElement}(t)){var l=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return Xd(i.left,i.top,s,u)}var Zd="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof zd(t).SVGGraphicsElement}:function(t){return t instanceof zd(t).SVGElement&&"function"==typeof t.getBBox};function Yd(t){return Id?Zd(t)?function(t){var e=t.getBBox();return Xd(0,0,e.width,e.height)}(t):qd(t):jd}function Xd(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Kd=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Xd(0,0,0,0),this.target=t};Kd.prototype.isActive=function(){var t=Yd(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Kd.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var $d=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 Hd(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Hd(this,{target:t,contentRect:n})},Qd=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Rd,"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};Qd.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 zd(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Kd(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Qd.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 zd(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))}},Qd.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Qd.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Qd.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new $d(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Qd.prototype.clearActive=function(){this.activeObservations_.splice(0)},Qd.prototype.hasActive=function(){return this.activeObservations_.length>0};var Jd="undefined"!=typeof WeakMap?new WeakMap:new Rd,tf=function(t){if(!(this instanceof tf))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=Gd.getInstance(),n=new Qd(t,e,this);Jd.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){tf.prototype[t]=function(){return(e=Jd.get(this))[t].apply(e,arguments);var e}}));var ef=void 0!==Nd.ResizeObserver?Nd.ResizeObserver:tf,nf=wa((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:u,toPng:function(t,e){return l(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return l(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return l(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return l(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 u(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 l(t,e){return u(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}()})),rf=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){t.attr||(t=ma(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)}}))},u={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 l={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(l),a.width>0&&a.height>0))return l;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:fa.getProperty(t.node(),"width","baseVal","value"),height:fa.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}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.addMainContainer(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.addMainContainer=function(){var t=this.model.getOptions(),e=fa.getProperty(t,"style","prefix"),n=ma(this.getHolder()).append("div").classed(kd.prefix+"--"+e+"--chart-wrapper",!0).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();ma(this.getHolder()).classed(kd.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.exportToJPG=function(){var t=this;nf.toJpeg(this.getMainContainer(),{quality:1,filter:function(t){return!t.classList||!t.classList.contains("bx--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.jpg")}))},e.prototype.exportToPNG=function(){var t=this;nf.toPng(this.getMainContainer(),{quality:1,filter:function(t){return!t.classList||!t.classList.contains("bx--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.png")})).catch((function(t){console.error("oops, something went wrong!",t)}))},e.prototype.toggleFullscreen=function(){var t=this.getHolder(),e=ma(t),n=e.classed("fullscreen");e.classed("fullscreen",!n),n?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.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=ma(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(ma(this.mainContainer),{useBBox:!0}).height,n=ma(this.mainContainer).attr("class"),r=ma(this.mainContainer).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(ma(t),{useBBox:!0}).height)})),i<=t?ma(this.mainContainer).attr("height",i):ma(this.mainContainer).attr("height","100%")}},e.prototype.getMainContainer=function(){return this.mainContainer},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&ma(e).on("mouseover",(function(){t.services.events.dispatchEvent(tt.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(tt.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=fa.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(tt.Chart.RESIZE))}),12.5);new ef(i).observe(e)}},e}(Dd),of=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}(Dd),af=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype.downloadCSV=function(t,e,n){var r=document.createElement("a");if("text/csv;encoding:utf-8",navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:"text/csv;encoding:utf-8"}),e);else if(URL&&"download"in r){var i=URL.createObjectURL(new Blob([t],{type:"text/csv;encoding:utf-8"}));r.href=i,r.setAttribute("download",e),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i)}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}(Dd),sf={value:function(){}};function uf(){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 lf(r)}function lf(t){this._=t}function cf(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 hf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function df(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=sf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}lf.prototype=uf.prototype={constructor:lf,on:function(t,e){var n,r=this._,i=cf(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]=df(r[n],t.name,e);else if(null==e)for(n in r)r[n]=df(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=hf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new lf(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 ff,pf,gf=Object.freeze({__proto__:null,dispatch:uf}),vf=0,mf=0,yf=0,bf=0,_f=0,xf=0,wf="object"==typeof performance&&performance.now?performance:Date,Of="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ef(){return _f||(Of(Tf),_f=wf.now()+xf)}function Tf(){_f=0}function Sf(){this._call=this._time=this._next=null}function Mf(t,e,n){var r=new Sf;return r.restart(t,e,n),r}function Cf(){_f=(bf=wf.now())+xf,vf=mf=0;try{!function(){Ef(),++vf;for(var t,e=ff;e;)(t=_f-e._time)>=0&&e._call.call(null,t),e=e._next;--vf}()}finally{vf=0,function(){var t,e,n=ff,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:ff=e);pf=t,Pf(r)}(),_f=0}}function Af(){var t=wf.now(),e=t-bf;e>1e3&&(xf-=e,bf=t)}function Pf(t){vf||(mf&&(mf=clearTimeout(mf)),t-_f>24?(t<1/0&&(mf=setTimeout(Cf,t-wf.now()-xf)),yf&&(yf=clearInterval(yf))):(yf||(bf=wf.now(),yf=setInterval(Af,1e3)),vf=1,Of(Cf)))}function Lf(t,e,n){var r=new Sf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Sf.prototype=Mf.prototype={constructor:Sf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Ef():+n)+(null==e?0:+e),this._next||pf===this||(pf?pf._next=this:ff=this,pf=this),this._call=t,this._time=n,Pf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pf())}};var Df=uf("start","end","cancel","interrupt"),kf=[];function Rf(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(u){var l,c,h,d;if(1!==n.state)return s();for(l in i)if((d=i[l]).name===n.name){if(3===d.state)return Lf(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[l]):+l<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[l])}if(Lf((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),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),l=0,c=-1;l<h;++l)(d=n.tween[l].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=Mf((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:Df,tween:kf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function If(t,e){var n=Bf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Nf(t,e){var n=Bf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Bf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Vf(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 Uf(t,e){var n,r;return function(){var i=Nf(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 Gf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Nf(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function Hf(t,e,n){var r=t._id;return t.each((function(){var t=Nf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Bf(t,r).value[e]}}function zf(t,e){var n;return("number"==typeof e?vu:e instanceof Xs?du:(n=Xs(e))?(e=n,du):_u)(t,e)}function jf(t){return function(){this.removeAttribute(t)}}function Ff(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Wf(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 qf(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 Zf(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function Yf(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Xf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Kf(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function $f(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Kf(t,i)),n}return i._value=e,i}function Qf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Xf(t,i)),n}return i._value=e,i}function Jf(t,e){return function(){If(this,t).delay=+e.apply(this,arguments)}}function tp(t,e){return e=+e,function(){If(this,t).delay=e}}function ep(t,e){return function(){Nf(this,t).duration=+e.apply(this,arguments)}}function np(t,e){return e=+e,function(){Nf(this,t).duration=e}}function rp(t,e){if("function"!=typeof e)throw new Error;return function(){Nf(this,t).ease=e}}function ip(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)?If:Nf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var op=va.prototype.constructor;function ap(t){return function(){this.style.removeProperty(t)}}function sp(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function up(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&sp(t,o,n)),r}return o._value=e,o}function lp(t){return function(e){this.textContent=t.call(this,e)}}function cp(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&lp(r)),e}return r._value=t,r}var hp=0;function dp(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function fp(t){return va().transition(t)}function pp(){return++hp}var gp=va.prototype;dp.prototype=fp.prototype={constructor:dp,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=po(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,h=o[a]=new Array(c),d=0;d<c;++d)(s=l[d])&&(u=t.call(s,s.__data__,d,l))&&("__data__"in s&&(u.__data__=s.__data__),h[d]=u,Rf(h[d],e,n,d,h,Bf(s,n)));return new dp(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=vo(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var d,f=t.call(u,u.__data__,h,l),p=Bf(u,n),g=0,v=f.length;g<v;++g)(d=f[g])&&Rf(d,e,n,g,f,p);o.push(f),a.push(u)}return new dp(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=mo(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,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new dp(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 u,l=e[s],c=n[s],h=l.length,d=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(d[f]=u);for(;s<r;++s)a[s]=e[s];return new dp(a,this._parents,this._name,this._id)},selection:function(){return new op(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=pp(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=Bf(a,e);Rf(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new dp(r,this._parents,t,n)},call:gp.call,nodes:gp.nodes,node:gp.node,size:gp.size,empty:gp.empty,each:gp.each,on:function(t,e){var n=this._id;return arguments.length<2?Bf(this.node(),n).on.on(t):this.each(ip(n,t,e))},attr:function(t,e){var n=uo(t),r="transform"===n?Du:zf;return this.attrTween(t,"function"==typeof e?(n.local?Yf:Zf)(n,r,Hf(this,"attr."+t,e)):null==e?(n.local?Ff:jf)(n):(n.local?qf:Wf)(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=uo(t);return this.tween(n,(r.local?$f:Qf)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Lu:zf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=ko(this,t),a=(this.style.removeProperty(t),ko(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,ap(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=ko(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=ko(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Hf(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Nf(this,t),l=u.on,c=null==u.value[a]?o||(o=ap(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=ko(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,up(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}}(Hf(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,cp(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=Bf(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?Uf:Gf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Jf:tp)(e,t)):Bf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ep:np)(e,t)):Bf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(rp(e,t)):Bf(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=Nf(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}))}))}};var vp={time:null,delay:0,duration:250,ease:it};function mp(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return vp.time=Ef(),vp;return n}va.prototype.interrupt=function(t){return this.each((function(){Vf(this,t)}))},va.prototype.transition=function(t){var e,n;t instanceof dp?(e=t._id,t=t._name):(e=pp(),(n=vp).time=Ef(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&Rf(a,t,e,l,s,n||mp(a,e));return new dp(r,this._parents,t,e)};var yp=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(tt.Model.UPDATE,(function(){t.pendingTransitions={}}))},e.prototype.getTransition=function(t,e){var n=this;if(!1===this.model.getOptions().animations||!1===e)return this.getInstantTransition(t);var r=fp(t).duration(fa.getProperty(yt,t,"duration")||yt.default.duration);return this.pendingTransitions[r._id]=r,r.on("end interrupt cancel",(function(){delete n.pendingTransitions[r._id]})),r},e.prototype.getInstantTransition=function(t){var e=this,n=fp(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(Dd),bp=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}(Dd);function _p(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 xp(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 wp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=xp(e);return n.setDate(n.getDate()+r),n}function Op(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t).getTime(),r=xp(e);return new Date(n+r)}function Ep(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Op(t,36e5*n)}function Tp(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Sp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_p(t);return e.setHours(0,0,0,0),e}function Mp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sp(t),r=Sp(e),i=n.getTime()-Tp(n),o=r.getTime()-Tp(r);return Math.round((i-o)/864e5)}function Cp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Op(t,6e4*n)}function Ap(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_p(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 Pp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=xp(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Ap(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function Lp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Op(t,1e3*n)}function Dp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Pp(t,12*n)}function kp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Rp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_p(t);return!isNaN(e)}function Ip(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Np(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e);return n.getFullYear()-r.getFullYear()}function Bp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e);return n.getTime()-r.getTime()}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Bp(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Bp(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Gp={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 Hp(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var zp={date:Hp({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Hp({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:Hp({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},jp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Fp(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,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function Wp(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 u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[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)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}}var qp,Zp={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Gp[t]?Gp[t]:1===e?Gp[t].one:Gp[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:zp,formatRelative:function(t,e,n,r){return jp[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:Fp({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Fp({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:Fp({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:Fp({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:Fp({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:(qp={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(qp.matchPattern);if(!i)return null;var o=i[0],a=n.match(qp.parsePattern);if(!a)return null;var s=qp.valueCallback?qp.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Wp({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:Wp({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:Wp({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:Wp({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:Wp({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 Yp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Op(t,-n)}function Xp(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Kp=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Xp("yy"===e?r%100:r,e.length)},$p=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Xp(n+1,2)},Qp=function(t,e){return Xp(t.getUTCDate(),e.length)},Jp=function(t,e){return Xp(t.getUTCHours()%12||12,e.length)},tg=function(t,e){return Xp(t.getUTCHours(),e.length)},eg=function(t,e){return Xp(t.getUTCMinutes(),e.length)},ng=function(t,e){return Xp(t.getUTCSeconds(),e.length)},rg=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Xp(Math.floor(r*Math.pow(10,n-3)),e.length)};function ig(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=_p(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 og(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_p(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=ig(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=ig(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function ag(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=og(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=ig(n);return r}function sg(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:xp(i),a=null==n.weekStartsOn?o:xp(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=_p(t),u=s.getUTCDay(),l=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function ug(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=_p(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:xp(a),u=null==i.firstWeekContainsDate?s:xp(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=new Date(0);l.setUTCFullYear(r+1,0,u),l.setUTCHours(0,0,0,0);var c=sg(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var d=sg(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function lg(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:xp(i),a=null==n.firstWeekContainsDate?o:xp(n.firstWeekContainsDate),s=ug(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=sg(u,e);return l}var cg="midnight",hg="noon",dg="morning",fg="afternoon",pg="evening",gg="night",vg={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 Kp(t,e)},Y:function(t,e,n,r){var i=ug(t,r),o=i>0?i:1-i;return"YY"===e?Xp(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Xp(o,e.length)},R:function(t,e){return Xp(og(t),e.length)},u:function(t,e){return Xp(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 Xp(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 Xp(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 $p(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 Xp(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=_p(t),r=sg(n,e).getTime()-lg(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Xp(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=_p(t),n=ig(e).getTime()-ag(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Xp(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Qp(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=_p(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"}):Xp(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 Xp(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 Xp(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 Xp(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?hg:0===i?cg: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?pg:i>=12?fg:i>=4?dg:gg,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 Jp(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):tg(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Xp(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Xp(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):eg(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):ng(t,e)},S:function(t,e){return rg(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return yg(i);case"XXXX":case"XX":return bg(i);case"XXXXX":case"XXX":default:return bg(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return yg(i);case"xxxx":case"xx":return bg(i);case"xxxxx":case"xxx":default:return bg(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+mg(i,":");case"OOOO":default:return"GMT"+bg(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+mg(i,":");case"zzzz":default:return"GMT"+bg(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Xp(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Xp((r._originalDate||t).getTime(),e.length)}};function mg(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+Xp(o,2)}function yg(t,e){return t%60==0?(t>0?"-":"+")+Xp(Math.abs(t)/60,2):bg(t,e)}function bg(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Xp(Math.floor(i/60),2)+n+Xp(i%60,2)}function _g(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 xg(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 wg={p:xg,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return _g(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}}",_g(i,e)).replace("{{time}}",xg(o,e))}},Og=["D","DD"],Eg=["YY","YYYY"];function Tg(t){return-1!==Og.indexOf(t)}function Sg(t){return-1!==Eg.indexOf(t)}function Mg(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 Cg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ag=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pg=/^'([^]*?)'?$/,Lg=/''/g,Dg=/[a-zA-Z]/;function kg(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||Zp,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:xp(a),u=null==i.firstWeekContainsDate?s:xp(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=o.options&&o.options.weekStartsOn,c=null==l?0:xp(l),h=null==i.weekStartsOn?c:xp(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=_p(t);if(!Rp(d))throw new RangeError("Invalid time value");var f=Tp(d),p=Yp(d,f),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:d},v=r.match(Ag).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,wg[e])(t,o.formatLong,g):t})).join("").match(Cg).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Rg(t);var n=vg[e];if(n)return!i.useAdditionalWeekYearTokens&&Sg(t)&&Mg(t),!i.useAdditionalDayOfYearTokens&&Tg(t)&&Mg(t),n(p,t,o.localize,g);if(e.match(Dg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Rg(t){return t.match(Pg)[1].replace(Lg,"'")}function Ig(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return wp(t,-n)}function Ng(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Ep(t,-n)}function Bg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Cp(t,-n)}function Vg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Pp(t,-n)}function Ug(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Lp(t,-n)}function Gg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xp(e);return Dp(t,-n)}var Hg=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=fa.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(),u=s.data.groupMapsTo,l=fa.getProperty(s,"axes",this.secondaryRangeAxisPosition),c=void 0;if(null!==i?c=i[u]:a&&a.length>0&&(c=a[0]),(null===(e=l)||void 0===e?void 0:e.correspondingDatasets)&&l.correspondingDatasets.includes(c))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return fa.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===L.BOTTOM||t===L.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(L).map((function(t){return L[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!==L.LEFT&&this.rangeAxisPosition!==L.RIGHT||this.domainAxisPosition!==L.BOTTOM&&this.domainAxisPosition!==L.TOP?this.orientation=R.HORIZONTAL:this.orientation=R.VERTICAL},e.prototype.isDualAxes=function(){return this.dualAxes},e.prototype.determineAxisDuality=function(){var t,e,n,r,i=this.model.getOptions(),o=fa.getProperty(i,"axes");((null===(t=o[L.LEFT])||void 0===t?void 0:t.correspondingDatasets)&&o[L.RIGHT]||(null===(e=o[L.RIGHT])||void 0===e?void 0:e.correspondingDatasets)&&o[L.LEFT]||(null===(n=o[L.TOP])||void 0===n?void 0:n.correspondingDatasets)&&o[L.BOTTOM]||(null===(r=o[L.BOTTOM])||void 0===r?void 0:r.correspondingDatasets)&&o[L.TOP])&&(this.dualAxes=!0)},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=[L.BOTTOM,L.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[L.LEFT,L.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=fa.getProperty(a,"axes")[n].mapsTo,u=null!==fa.getProperty(r,s)?r[s]:r;switch(e){case I.LABELS:o=t(u)+t.step()/2;break;case I.TIME:o=t(new Date(u));break;default:o=t(u)}return o},e.prototype.getBoundedScaledValues=function(t,e){var n=this.model.getOptions().bounds,r=this.scales[this.rangeAxisPosition],i=this.model.getOptions(),o=fa.getProperty(i,"axes")[this.rangeAxisPosition].mapsTo,a=void 0!==t[o]?t[o]:t;return[r(null!==fa.getProperty(t,n.upperBoundMapsTo)?t[n.upperBoundMapsTo]:a),r(null!==fa.getProperty(t,n.lowerBoundMapsTo)?t[n.lowerBoundMapsTo]:a)]},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 fa.getProperty(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")},e.prototype.getRangeIdentifier=function(t){var e=this.model.getOptions();return fa.getProperty(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions(),r=fa.getProperty(n,"axes",t);return r.scaleType===I.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=_p(t),r=_p(e),i=kp(n,r),o=Math.abs(Np(n,r));n.setFullYear(n.getFullYear()-i*o);var a=kp(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Gg(n,e),Dp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e),i=kp(n,r),o=Math.abs(Ip(n,r));n.setMonth(n.getMonth()-i*o);var a=kp(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Vg(n,e),Pp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_p(t),r=_p(e),i=kp(n,r),o=Math.abs(Mp(n,r));n.setDate(n.getDate()-i*o);var a=kp(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Ig(n,e),wp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Bp(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Ng(n,e),Ep(r,e)];if(Vp(r,n)>30)return[Bg(n,30*e),Cp(r,30*e)];if(Vp(r,n)>1)return[Bg(n,e),Cp(r,e)];if(Up(r,n)>15)return[Ug(n,15*e),Lp(r,15*e)];if(Up(r,n)>1)return[Ug(n,e),Lp(r,e)];return[n,r]}(e,fa.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===I.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,at.paddingRatio,r.scaleType)},e.prototype.findVerticalAxesPositions=function(){var t=this.model.getOptions(),e=fa.getProperty(t,"axes"),n=this.isDualAxes();return null===fa.getProperty(e,L.LEFT)&&null!==fa.getProperty(e,L.RIGHT)||!0===fa.getProperty(e,L.RIGHT,"main")||n&&fa.getProperty(e,L.LEFT,"correspondingDatasets")?{primary:L.RIGHT,secondary:L.LEFT}:{primary:L.LEFT,secondary:L.RIGHT}},e.prototype.findHorizontalAxesPositions=function(){var t=this.model.getOptions(),e=fa.getProperty(t,"axes"),n=this.isDualAxes();return null===fa.getProperty(e,L.BOTTOM)&&null!==fa.getProperty(e,L.TOP)||!0===fa.getProperty(e,L.TOP,"main")||n&&fa.getProperty(e,L.BOTTOM,"correspondingDatasets")?{primary:L.TOP,secondary:L.BOTTOM}:{primary:L.BOTTOM,secondary:L.TOP}},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=fa.getProperty(n,"axes",t.primary),i=fa.getProperty(n,"axes",e.primary),o=r.scaleType||I.LINEAR,a=i.scaleType||I.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!==I.LABELS&&a!==I.TIME&&o===I.LABELS||o===I.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=fa.getProperty(e,"axes",t),r=fa.getProperty(e,"bounds"),i=n.includeZero,o=fa.getProperty(n,"scaleType")||I.LINEAR;if(this.model.isDataEmpty())return[];var a,s,u=this.model.getDisplayData(),l=n.extendLinearDomainBy,c=n.mapsTo,h=n.percentage,d=n.thresholds,f=at.ratio,p=f.reference,g=f.compareTo;if(n.domain)return o===I.LABELS?n.domain:(o===I.TIME&&(n.domain=n.domain.map((function(t){return void 0===t.getTime?new Date(t):t}))),this.extendsDomain(t,n.domain));if(h)return[0,100];if(n&&o===I.LABELS)return ss(u,(function(t){return t[c]})).keys();var v=this.model.getDataGroupNames();if(o===I.LABELS_RATIO)return u.map((function(t){return t[p]+"/"+t[g]}));if(o===I.TIME)s=u.map((function(t){return+new Date(t[c])}));else if(r&&e.axes)s=[],u.forEach((function(t){s.push(t[c]),t[r.upperBoundMapsTo]&&s.push(t[r.upperBoundMapsTo]),t[r.lowerBoundMapsTo]&&s.push(t[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&v&&t===this.getRangeAxisPosition()){var m=e.data.groupMapsTo,y=this.model.getDataValuesGroupedByKeys(v),b=u.filter((function(t){return!v.includes(t[m])})),_=y.map((function(t){t.sharedStackKey;return Ts(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(function(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}(t,["sharedStackKey"])))}));s=M(_,b.map((function(t){return t[c]})))}else s=[],u.forEach((function(t){var e=t[c];Array.isArray(e)&&2===e.length?(s.push(e[0]),s.push(e[1])):(l&&s.push(Math.max(t[c],t[l])),s.push(e))}));return o!==I.TIME&&o!==I.LOG&&i&&s.push(0),d&&d.length>0&&d.forEach((function(t){var e=fa.getProperty(t,"value");null!==e&&s.push(e)})),a=ps(s),a=this.extendsDomain(t,a)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=fa.getProperty(e,"axes",t);if(!n)return null;var r,i=fa.getProperty(n,"scaleType")||I.LINEAR;return this.scaleTypes[t]=i,(r=i===I.TIME?th():i===I.LOG?function t(){var e=pl(Hu()).domain([1,10]);return e.copy=function(){return Gu(e,t()).base(e.base())},Ss.apply(e,arguments),e}().base(n.base||10):i===I.LABELS||i===I.LABELS_RATIO?Ds():al()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=fa.getProperty(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!n)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==I.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=fa.getProperty(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!t)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}(Dd);var zg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Ch,curveLinearClosed:hd,curveBasis:jh,curveBasisClosed:Wh,curveBasisOpen:Zh,curveBundle:Xh,curveCardinal:Qh,curveCardinalClosed:td,curveCardinalOpen:nd,curveCatmullRom:od,curveCatmullRomClosed:sd,curveCatmullRomOpen:ld,curveMonotoneX:bd,curveMonotoneY:_d,curveNatural:Od,curveStep:Td,curveStepAfter:Md,curveStepBefore:Sd},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}(Dd),jg=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(!fa.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=fa.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===L.BOTTOM&&e===I.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();return n.extendsDomain(r,ps(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(tt.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return fa.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=fa.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=bt.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,u=Math.min((a[1]-a[0])/2*(t/2),s/2),l=i+u,c=o-u;l>=c&&(l=i+s/2-n/2,c=o-s/2+n/2);var h=[r.invert(l),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]),u=Math.min(i+a,o[1]),l=[n.invert(s),n.invert(u)];e[0].valueOf()===l[0].valueOf()&&e[1].valueOf()===l[1].valueOf()||this.handleDomainChange(l)},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())<fa.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 fa.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return fa.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(Dd),Fg=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||st;t&&(r=t.x,i=t.y,o=2);var s=rf.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0}),u=s.width,l=s.height;e.transition().duration(a.duration).ease(a.ease).attr("transform","translate("+u/2+", "+l/2+") scale("+o+") translate("+-r+","+-i+")"),this.services.events.dispatchEvent(tt.CanvasZoom.CANVAS_ZOOM_IN,{element:ma(t)})},e.prototype.zoomOut=function(t,e){var n=e||st;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(tt.CanvasZoom.CANVAS_ZOOM_OUT)},e}(Dd),Wg=function(){function t(t,e,n){if(this.renderType=C.HTML,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){var r=fa.getProperty(this.model.getOptions(),"style","prefix");this.id=r+"--"+this.configs.id}this.parent||this.setParent(ma(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=fa.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(kd.prefix+"--"+n+"--"+this.type,!0).attr("id",this.id),e&&e.classed(kd.prefix+"--"+n+"--"+this.type,!1).attr("id",this.id)}},t.prototype.getParent=function(){return this.parent},t.prototype.getComponentContainer=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=fa.getProperty(this.model.getOptions(),"style","prefix"),n=this.id?"#"+this.id:"",r=rf.appendOrSelect(this.parent,(this.renderType===C.SVG?"svg":"div")+n+"."+kd.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var i=this.model.get("chartClipId");if(i){var o=ma("#"+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?fa.merge({},this.model.getOptions(),this.configs.options):this.model.getOptions()},t}(),qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e.renderType=C.HTML,e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getOptions(),n=fa.getProperty(e,"legend"),i=fa.getProperty(n,"alignment"),o=fa.getProperty(e,"legend","orientation"),a=this.model.getDataGroups(),s=ht.items.status.DISABLED,u=a.some((function(t){return t.status===s})),l=fa.getProperty(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===B.CENTER).classed(o,!0).classed("has-deactivated-items",u).attr("role",r.GROUP).attr("data-name","legend-items");l&&(a=this.sortDataGroups(a,l));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===ht.items.status.ACTIVE}));var f=fa.getProperty(this.getOptions(),"legend","clickable");c.classed("clickable",f);var p=ht.checkbox.radius,g=d.append("div").classed("checkbox",!0);g.merge(h.select("div.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-label",(function(t){return t.name})).attr("aria-checked",(function(t){return t.status===ht.items.status.ACTIVE})).attr("width",2*p).attr("height",2*p).attr("rx",1).attr("ry",1).attr("class",(function(e,n){return t.model.getColorClassName({classNameTypes:[P.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"})})).style("background",(function(e){return e.status===ht.items.status.ACTIVE?t.model.getFillColor(e.name)||t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===ht.items.status.ACTIVE}));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");var v=d.append("p").merge(h.select("p"));this.truncateLegendText(v);var m=fa.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);x.selectAll("*").remove();var w=1;x.append("svg").classed("icon",!0).each((function(t,e){var n=ma(this);_&&_==t.type?w++:(_=t.type,w=1),y.addAdditionalItem(n,t,w)}));var O=x.append("p").merge(x.select("p"));this.truncateLegendText(O)}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=ht.area,o=i.width,a=i.height;if(e.type===J.RADIUS?t.style("width",a+"px").style("height",a+"px"):t.style("width",o+"px").style("height",a+"px"),e.type===J.RADIUS){var s=ht.radius,u=s.iconData,l=s.fill,c=s.stroke;t.attr("fill","none").selectAll("circle").data(u).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:l).style("stroke",e.stroke?e.stroke:c)}else if(e.type===J.LINE){var h=ht.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===J.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?ht.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===J.SIZE){var d=ht.size;u=d.iconData,l=d.fill,c=d.stroke;t.attr("fill","none").attr("role",r.IMG).attr("aria-label","size").selectAll("rect").data(u).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:l).style("stroke",e.stroke?e.stroke:c).style("stroke-width",1)}else if(e.type===J.QUARTILE){u=ht.quartile.iconData;t.selectAll("rect").attr("role",r.IMG).attr("aria-label","quartile").data(u).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===J.ZOOM){var f=fa.getProperty(os,"legend","zoom"),p=(u=f.iconData,f.color),g=t.attr("role",r.IMG).attr("aria-label","zoom").selectAll("g.icon").data(u).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(t){var e=fa.getProperty(this.getOptions(),"legend","truncation"),n=fa.getProperty(e,"type"),r=fa.getProperty(e,"threshold"),i=fa.getProperty(e,"numCharacter");n!==k.NONE?t.html((function(t){return t.name.length>r?fa.truncateLabel(t.name,n,i):t.name})):t.html((function(t){return t.name}))},e.prototype.addEventListeners=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=fa.getProperty(n,"legend"),i=fa.getProperty(r,"truncation","threshold");e.selectAll("div.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(tt.Legend.ITEM_HOVER,{hoveredElement:ma(this)});var e=ma(this);e.select("div.checkbox").classed("hovered",!0);var n=e.datum();n.name.length>i&&t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:e,content:n.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(tt.Legend.ITEM_CLICK,{clickedElement:ma(this)});var e=ma(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=ma(this);e.select("div.checkbox").classed("hovered",!1),t.services.events.dispatchEvent(tt.Tooltip.HIDE),t.services.events.dispatchEvent(tt.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e){!ia.key||"Enter"!==ia.key&&" "!==ia.key||(ia.preventDefault(),t.model.toggleDataLabel(e.name))})),e.selectAll("g.additional-item").on("mouseover",(function(){var e=ma(this),n=e.datum();n.name.length>i&&t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:e,content:n.name})}))},e}(Wg);function Zg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yg(t){return function(t){if(Array.isArray(t))return Xg(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 Xg(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 Xg(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 Xg(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 Kg(t){return t.reduce((function(t,e){return Array.isArray(e)?t.push.apply(t,Yg(Kg(e))):t.push(e),t}),[])}function $g(t){return($g="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 Qg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 tv(t,e){return(tv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ev(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=iv(t);if(e){var i=iv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nv(this,n)}}function nv(t,e){return!e||"object"!==$g(e)&&"function"!=typeof e?rv(t):e}function rv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function iv(t){return(iv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ov(t){return(ov="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 av(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sv(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 uv(t,e,n){return(uv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=dv(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function lv(t,e){return(lv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cv(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=dv(t);if(e){var i=dv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hv(this,n)}}function hv(t,e){return!e||"object"!==ov(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function dv(t){return(dv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function fv(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 pv(t){return(pv="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 gv(t){return function(t){if(Array.isArray(t))return vv(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 vv(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 vv(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 vv(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 mv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yv(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 _v(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=wv(t);if(e){var i=wv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xv(this,n)}}function xv(t,e){return!e||"object"!==pv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function wv(t){return(wv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ov(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 Ev(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 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 Sv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mv(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 Cv(t,e){return(Cv=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 Pv(this,n)}}function Pv(t,e){return!e||"object"!==Tv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Lv(t){return(Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Dv(t){return(Dv="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 kv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rv(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 Iv(t,e){return(Iv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nv(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=Vv(t);if(e){var i=Vv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bv(this,n)}}function Bv(t,e){return!e||"object"!==Dv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Vv(t){return(Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Uv(t){return(Uv="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 Gv(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 Hv(t,e){return(Hv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function zv(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=Fv(t);if(e){var i=Fv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jv(this,n)}}function jv(t,e){return!e||"object"!==Uv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Fv(t){return(Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wv,qv,Zv=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}}),e&&Hv(t,e)}(o,t);var e,n,r,i=zv(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!Ov(t,e)}))&&n.element.querySelector(kd.selectorTabbable).focus()},n._hookCloseActions(),n}return e=o,r=[{key:"options",get:function(){var t=kd.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(fv(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(fv(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(kd.selectorTabbable)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var t=this;this.manage(fv(this.element,"click",(function(e){var n=Ov(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(fv(this.element.ownerDocument.body,"keydown",(function(e){27===e.which&&t.shouldStateBeChanged("hidden")&&(e.stopPropagation(),t.hide(e))})))}}])&&Gv(e.prototype,n),r&&Gv(e,r),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 Kg(e).reduce((function(t,e){return e(t)}),function(){return 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}}),e&&tv(t,e)}(o,t);var e,n,r,i=ev(o);function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Qg(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,rv(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}}])&&Jg(e.prototype,n),r&&Jg(e,r),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}}),e&&Iv(t,e)}(o,t);var e,n,r,i=Nv(o);function o(){return kv(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 fv(e,i,(function(e){var i=Ov(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)&&Rv(e.prototype,n),r&&Rv(e,r),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}}),e&&bv(t,e)}(o,t);var e,n,r,i=_v(o);function o(){return mv(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"_changeState",value:function(){throw new Error("_changeState() should be overriden 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},u=[s.group,i].filter(Boolean).join("-").split("-").map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""),l=new CustomEvent(this.options["eventBefore".concat(u)],{bubbles:!0,cancelable:!0,detail:o}),c=o&&o.delegatorNode||this.element,h=!c.dispatchEvent(l);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,gv(f).concat([function(){c.dispatchEvent(new CustomEvent(t.options["eventAfter".concat(u)],{bubbles:!0,cancelable:!0,detail:o})),a&&a()}]))}}else a&&a(null,!0)}}])&&yv(e.prototype,n),r&&yv(e,r),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}}),e&&Cv(t,e)}(o,t);var e,n,r,i=Av(o);function o(){return Sv(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",Ev(t),e)}},{key:"hide",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("hidden",Ev(t),e)}}])&&Mv(e.prototype,n),r&&Mv(e,r),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}}),e&&lv(t,e)}(o,t);var e,n,r,i=cv(o);function o(){var t;av(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)})),uv(dv(o.prototype),"release",this).call(this)}}])&&sv(e.prototype,n),r&&sv(e,r),o}(t)}))),Yv=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.bx--modal-footer button.bx--btn").on("click",(function(){return i.model.exportToCSV()})),Zv.create(i.modal.node()).show()},i.handleHideModal=function(){},i.init(),i}return n(e,t),e.prototype.addEventListeners=function(){this.services.events.addEventListener(tt.Modal.SHOW,this.handleShowModal),this.services.events.addEventListener(tt.Modal.HIDE,this.handleHideModal)},e.prototype.removeEventListeners=function(){this.services.events.removeEventListener(tt.Modal.SHOW,this.handleShowModal),this.services.events.removeEventListener(tt.Modal.HIDE,this.handleHideModal)},e.prototype.assignRangeAndDomains=function(){var t=this.services.cartesianScales,e=this.model.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:fa.getProperty(e,"axes",i,"mapsTo")}:r[n]=null})),r},e.prototype.getModalHTML=function(){var t,e=this.model.getDisplayData(),n=this.model.getOptions(),r=n.data.groupMapsTo,i=this.services.cartesianScales,o=this.assignRangeAndDomains(),a=o.primaryDomain,s=o.primaryRange,u=o.secondaryDomain,l=o.secondaryRange;i.getDomainAxisScaleType()===I.TIME&&(t=function(t){return kg(t,"MMM d, yyyy")});var c=fa.getProperty(n,"style","prefix");return'\n\t\t<div class="bx--modal-container">\n\t\t\t<div class="bx--modal-header">\n\t\t\t\t<p class="bx--modal-header__label bx--type-delta">Tabular representation</p>\n\t\t\t\t<p class="bx--modal-header__heading bx--type-beta">'+n.title+'</p>\n\t\t\t\t<button class="bx--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="bx--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\t\t\t<div class="bx--modal-content"><table class="bx--data-table bx--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<th scope="col">\n\t\t\t\t\t\t\t\t<div class="bx--table-header-label">Group</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th scope="col">\n\t\t\t\t\t\t\t\t<div class="bx--table-header-label">'+a.label+'</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th scope="col">\n\t\t\t\t\t\t\t\t<div class="bx--table-header-label">'+s.label+"</div>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t"+(u?'<th scope="col"><div class="bx--table-header-label">'+u.label+"</div></th>":"")+"\n\t\t\t\t\t\t\t"+(l?'<th scope="col"><div class="bx--table-header-label">'+l.label+"</div></th>":"")+"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>"+e.map((function(e){return"\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>"+e[r]+"</td>\n\t\t\t\t\t\t\t\t<td>"+(null===e[a.identifier]?"&ndash;":t?t(e[a.identifier]):e[a.identifier])+"</td>\n\t\t\t\t\t\t\t\t\t\t<td>"+(null===e[s.identifier]||isNaN(e[s.identifier])?"&ndash;":e[s.identifier].toLocaleString())+"</td>\n\t\t\t\t\t\t\t\t"+(u?"<td>"+(null===e[u.identifier]?"&ndash;":e[u.identifier])+"\n\t\t\t\t\t\t\t\t</td>":"")+"\n\t\t\t\t\t\t\t\t"+(l?"<td>"+(null===e[l.identifier]||isNaN(e[l.identifier])?"&ndash;":e[l.identifier])+"\n\t\t\t\t\t\t\t\t</td>":"")+"\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t"})).join("")+'\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class="bx--modal-footer">\n\t\t\t <div class="'+kd.prefix+"--"+c+'-modal-footer-spacer"></div>\n\t\t\t <button class="bx--btn bx--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=ma(this.services.domUtils.getHolder()),n=fa.getProperty(t,"style","prefix");this.modal=rf.appendOrSelect(e,"div."+kd.prefix+"--"+n+"--modal"),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","bx--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-5ppouesvfhc-label").attr("aria-describedby","modal-5ppouesvfhc-heading").attr("tabindex",-1)}},e.prototype.destroy=function(){this.removeEventListeners(),this.isEventListenerAdded=!1},e}(Wg);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(qv||(qv={}));var Xv=((Wv={})[qv.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)}},Wv[qv.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)}},Wv[qv.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)}},Wv[qv.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)}},Wv),Kv="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},$v=function(){function t(t){void 0===t&&(t={}),this.positions=Xv,this.positions=Object.assign({},Xv,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),u=s.bottom-r().height,l=s.right-r().width;u=u<0?e.offsetHeight:u,l=l<0?e.offsetWidth:l;var c=e.offsetHeight*e.offsetWidth,h=c-u*l;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:Kv.innerHeight-Kv.scrollY,height:Kv.innerWidth-Kv.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}(),Qv=(new $v,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function Jv(t,e,n,r,i){var o=0===e,a=2===Number(kg(new Date(t),"c")),s=1===Number(kg(new Date(t),"q")),u=0!==e?n[e-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||rm(t)||im(t,u)||om(t);case"daily":return i?o||a||om(t):o||im(t,u)||om(t);case"monthly":return o||om(t);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(r+" is not a valid time interval.")}}function tm(t,e,n,r,i){var o=i.showDayName,a="daily"===r&&o?"weekly":r,s=new Date(t),u=fa.getProperty(i,"timeIntervalFormats")[a],l=fa.getProperty(u,"primary"),c=fa.getProperty(u,"secondary");return kg(s,Jv(t,e,n,r,o)?l:c,{locale:i.localeObject})}function em(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function nm(t){return 1===t.length?"15seconds":function(t){var e=Qv.reduce((function(e,n,r){n[0];var i=n[1],o=Qv[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Qv[e][0]}(Es(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function rm(t){var e=em(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function im(t,e){return em(t).M!==em(e).M}function om(t){var e=em(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}var am=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="threshold",r.renderType=C.SVG,r.positionService=new $v,r}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=fa.getProperty(this.getOptions(),"axes"),r=[];Object.keys(n).forEach((function(t){if(Object.values(L).includes(t)){var e=n[t];e.thresholds&&e.thresholds.length>0&&r.push({axisPosition:t,thresholds:e.thresholds})}}));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(e){return e.axisPosition=t.axisPosition,e}))}));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 u=this;o.each((function(e){var n=e.axisPosition,r=u.services.cartesianScales.getScaleByPosition(n),i=u.services.cartesianScales.getScaleTypeByPosition(n),o=u.services.cartesianScales.getMainXScale(),a=u.services.cartesianScales.getMainYScale(),s=i===I.LABELS,l=o.range(),c=l[0],h=l[1],d=a.range(),f=d[0],p=d[1],g=u.services.cartesianScales,v=g.getOrientation(),m=fa.flipDomainAndRangeBasedOnOrientation((function(t){return g.getDomainValue(t)}),(function(t){return g.getRangeValue(t)}),v),y=m[0],b=m[1],_=ma(this);n===L.TOP||n===L.BOTTOM?(_.selectAll("line.threshold-line").transition(u.services.transitions.getTransition("threshold-line-update",t)).attr("y1",p).attr("y2",f).attr("x1",(function(t){var e=t.value;return y(e)+(s?r.step()/2:0)})).attr("x2",(function(t){var e=t.value;return y(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),_.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(function(t){var e=t.value;return-y(e)})).attr("width",Math.abs(f-p)).classed("rotate",!0)):(_.selectAll("line.threshold-line").transition(u.services.transitions.getTransition("threshold-line-update",t)).attr("x1",c).attr("x2",h).attr("y1",(function(t){var e=t.value;return b(e)+(s?r.step()/2:0)})).attr("y2",(function(t){var e=t.value;return b(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),_.selectAll("rect.threshold-hoverable-area").attr("x",c).attr("y",(function(t){var e=t.value;return b(e)})).attr("width",Math.abs(h-c)).classed("rotate",!1))})),this.services.events.addEventListener(tt.Threshold.SHOW,(function(t){e.setThresholdLabelPosition(t.detail.datum),e.label.classed("hidden",!1)})),this.services.events.addEventListener(tt.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)===I.TIME){var i=[L.LEFT,L.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=fa.getProperty(r,"timeScale"),l=nm(s.ticks());return tm(e,0,s.ticks(),l,u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=ma(this.services.domUtils.getHolder()),e=fa.getProperty(this.getOptions(),"style","prefix");this.label=rf.appendOrSelect(t,"div."+kd.prefix+"--"+e+"--threshold--label").classed("hidden",!0)},e.prototype.setThresholdLabelPosition=function(t){var e=this.services.domUtils.getHolder(),n=_a(e),r=t.valueFormatter?t.valueFormatter(t.value):this.getFormattedValue(t);this.label.html((t.label||"Threshold")+": "+r).style("background-color",t.fillColor);var i=this.label.node(),o=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},i,[qv.RIGHT,qv.LEFT,qv.TOP,qv.BOTTOM],(function(){return{width:e.offsetWidth,height:e.offsetHeight}})),a=this.positionService.findPositionAt({left:n[0],top:n[1]},i,o);this.positionService.setElement(i,a)},e.prototype.addEventListeners=function(){var t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(){ma(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(tt.Threshold.SHOW,{hoveredElement:ma(this),datum:ma(this).datum()})})).on("mouseout",(function(){ma(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(tt.Threshold.HIDE,{hoveredElement:ma(this),datum:ma(this).datum()})}))},e}(Wg),sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e.renderType=C.HTML,e}return n(e,t),e.prototype.render=function(){var t=this.getComponentContainer().selectAll("p.title").data([this.getOptions().title]);if(t.enter().append("p").classed("title",!0).merge(t).attr("x",0).attr("y","1em").html((function(t){return t})),t.node()&&t.node().offsetWidth<t.node().scrollWidth){var e=this;t.on("mouseover",(function(){e.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:t,content:t.text()})})).on("mousemove",(function(){e.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("mouseout",(function(){e.services.events.dispatchEvent(tt.Tooltip.HIDE)}))}t.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=rf.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(){a.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){a.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("mouseout",(function(){a.services.events.dispatchEvent(tt.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return rf.getSVGElementSize(this.parent.node(),{useAttr:!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}(Wg),um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(){var t=this.model.getDisplayData(),e=this.getOptions(),n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=e.data.groupMapsTo,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=rf.appendOrSelect(n,"text.meter-title");o>0&&a.node().getComputedTextLength()>o&&this.truncateTitle(a,o)},e.prototype.displayStatus=function(){var t=this.getComponentContainer(),e=rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=e.width?e.width:this.parent.node().getAttribute("width"),r=this.model.getStatus(),i=ft.status.indicatorSize/2,o=rf.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 u=o.selectAll("path.innerFill").data(a);u.enter().append("path").merge(u).attr("d",this.getStatusIconPathString(r)).attr("transform","translate(-"+i+", 0)").attr("class","innerFill"),u.exit().remove(),s.exit().remove()},e.prototype.appendPercentage=function(){var t=this.model.getDisplayData().value,e=this.getComponentContainer(),n=rf.appendOrSelect(e,"text.meter-title"),r=!0===fa.getProperty(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),o=ft.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=rf.appendOrSelect(this.parent,"tspan"),i=ft.statusBar.paddingRight,o=Math.ceil(r.node().getComputedTextLength());rf.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+o+i)},e.prototype.getMaxTitleWidth=function(){var t=rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),e=t.width?t.width:this.parent.node().getAttribute("width"),n=rf.appendOrSelect(this.parent,"text.percent-value"),r=ft.statusBar.paddingRight,i=n.node().getComputedTextLength(),o=rf.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(rf.getSVGElementSize(o,{useBBox:!0}).width+ft.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case Y.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 Y.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case Y.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}(sm),lm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.renderType=C.HTML,i.isEventListenerAdded=!1,i.positionService=new $v,i.handleShowTooltip=function(t){var e=t.detail.data||t.detail.items,n=i.getTooltipHTML(t),r=rf.appendOrSelect(i.tooltip,"div.content-box");if(fa.getProperty(i.getOptions(),"tooltip","customHTML"))if(t.detail.content){var o='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";r.html(o)}else r.html(i.model.getOptions().tooltip.customHTML(e,n));else r.html(n);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(tt.Tooltip.MOVE,(function(e){!1===t.tooltip.classed("hidden")&&t.positionTooltip(e)})),this.services.events.addEventListener(tt.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(tt.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(tt.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(tt.Tooltip.MOVE,null),this.services.events.removeEventListener(tt.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(tt.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(tt.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=fa.getProperty(n,"tooltip","truncation","type"),i=fa.getProperty(n,"tooltip","truncation","threshold"),o=fa.getProperty(n,"tooltip","truncation","numCharacter");return r!==k.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.truncateLabel(t.label,r,o)),t.value&&t.value.length>i&&(t.value=fa.truncateLabel(t.value,r,o)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";else{var n=this.getItems(t);e="<ul class='multi-tooltip'>"+this.formatItems(n).map((function(t){return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.class?'<a class="tooltip-color '+t.class+'"></a>':"")+"\n\t\t\t\t\t\t\t\t"+(t.color?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t\t\t<p>'+(t.label||"")+"</p>\n\t\t\t\t\t\t\t\t"+(t.labelIcon?'<span class="label-icon"/>'+t.labelIcon+"</span>":"")+"\n\t\t\t\t\t\t\t\t</div>\n\t\t\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\t\t</div>\n\t\t\t\t\t\t</li>"})).join("")+"</ul>"}return e},e.prototype.valueFormatter=function(t,e){var n=this.getOptions(),r=fa.getProperty(n,"tooltip","valueFormatter");return r?r(t,e):"function"==typeof t.getTime?kg(t,"MMM d, yyyy"):t.toLocaleString()},e.prototype.render=function(){var t=this.getOptions(),e=fa.getProperty(t,"tooltip","enabled");if(e){var n=ma(this.services.domUtils.getHolder()),r=fa.getProperty(t,"style","prefix");this.tooltip=rf.appendOrSelect(n,"div."+kd.prefix+"--"+r+"--tooltip"),this.tooltip.style("max-width",null),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=fa.getProperty(i,"zoomBar","top","enabled"),a=fa.getProperty(t,"detail","mousePosition");if(a){var s=fa.getProperty(i,"zoomBar","top","type"),u=bt.height[s];o&&(a[1]+=u+bt.spacerHeight)}else a=_a(n);var l,c=n.offsetWidth,h=n.offsetHeight;l=a[0]/c>.9?qv.LEFT:a[0]/c<.1?qv.RIGHT:this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[qv.RIGHT,qv.LEFT,qv.TOP,qv.BOTTOM],(function(){return{width:c,height:h}}));var d=mt.horizontalOffset;l===qv.LEFT&&(d*=-1),e=this.positionService.findPositionAt({left:a[0]+d,top:a[1]},r,l),this.positionService.setElement(r,e)},e}(Wg),cm=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.getDomainAxisOptions(),o.getDomainIdentifier()),s=i.data.groupMapsTo,u=o.getDomainLabel(),l=o.getRangeLabel(),c=n[0][a];if(1===n.length){var h=n[0],d=o.getRangeIdentifier(h),f=h[d];r=M([{label:u,value:c}],Array.isArray(f)&&2===f.length?[{label:"Start",value:f[0]},{label:"End",value:f[1]}]:[{label:l,value:h[d]}]),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:h[s],color:this.model.getFillColor(h[s]),class:this.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:h[s]})})}else if(n.length>1){if(r=(r=[{label:u,value:c}]).concat(n.map((function(t){return{label:t[s],value:t[o.getRangeIdentifier(t)],color:e.model.getFillColor(t[s]),class:e.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:t[s]})}})).sort((function(t,e){return e.value-t.value}))),!o.isDualAxes()&&!0===fa.getProperty(i,"tooltip","showTotal")){var p=o.getRangeIdentifier();r.push({label:i.tooltip.totalLabel||"Total",value:n.reduce((function(t,e){return t+e[p]}),0),bold:!0})}}return r},e}(lm),hm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",i.renderType=C.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(),u=s[0],l=s[1];this.chartClipPath=rf.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=rf.appendOrSelect(this.chartClipPath,"rect."+this.type);c.attr("x",o).attr("y",l).attr("width",a-o).attr("height",u-l),this.chartClipPath.merge(c).lower()},e}(Wg),dm=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=rf.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;this.chartClipPath=rf.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var i=rf.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}(hm),fm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e.renderType=C.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(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t.name!==n.datum().name?ot.opacity.unselected:ot.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",ot.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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=[0,0],i=this.services.cartesianScales,o=i.getOrientation(),a=Dh().curve(this.services.curves.getD3Curve()).defined((function(t,e){var n=t[i.getRangeIdentifier()];return null!=n})),s=this.model.getGroupedData(this.configs.groups),u=fa.getProperty(this.getOptions(),"bounds"),l=u&&s&&1===s.length;!l&&u&&console.warn("Bounds can only be shown when having 1 single datagroup, you've supplied "+s.length);var c=function(t,e){return l?i.getBoundedScaledValues(t,e)[0]:i.getRangeValue(0)},h=function(t,e){return l?i.getBoundedScaledValues(t,e)[1]:i.getRangeValue(t,e)};o===R.VERTICAL?(r=this.services.cartesianScales.getMainYScale().domain(),a.x((function(t,e){return i.getDomainValue(t,e)})).y0((function(t,e){return c(t,e)})).y1((function(t,e){return h(t,e)}))):(r=this.services.cartesianScales.getMainXScale().domain(),a.x0((function(t,e){return c(t,e)})).x1((function(t,e){return h(t,e)})).y((function(t,e){return i.getDomainValue(t,e)})));var d=fa.getProperty(this.getOptions(),"color","gradient","enabled"),f=s&&1===s.length&&d;s.length>1&&d&&console.error("Gradients can only be enabled when having 1 single dataset");var p=n.selectAll("path.area").data(s,(function(t){return t.name})),g=ma(this.services.domUtils.getMainContainer());if(p.exit().attr("opacity",0).remove(),s.length){if(f){var v=g.select("path."+this.model.getColorClassName({classNameTypes:[P.STROKE],dataGroupName:s[0].name})).node(),m=void 0;if(v)m=getComputedStyle(v,null).getPropertyValue("stroke");else{var y=fa.getProperty(this.model.getOptions(),"color","scale");if(null!==y)m=y[Object.keys(y)[0]]}bp.appendOrUpdateLinearGradient({svg:this.parent,id:s[0].name.replace(" ","")+"_"+this.gradient_id,x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:bp.getStops(r,m)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));var b=this,_=p.enter().append("path");f?_.merge(p).style("fill",(function(t){return"url(#"+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 a(e)})):(_.attr("opacity",0).merge(p).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 b.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",l?1:ot.opacity.selected).attr("d",(function(t){var e=t.data;return a(e)})),l&&_.attr("fill-opacity",ot.opacity.selected).style("stroke",(function(t){return b.model.getStrokeColor(t.name)})).style("stroke-dasharray","2, 2").attr("stroke-width","0.7px"))}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wg),pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return fa.getProperty(t,0,r)!==n.datum().name?ot.opacity.unselected:ot.opacity.selected}))},e.handleLegendMouseOut=function(){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",ot.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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})),u=this.model.getStackedData({percentage:s,groups:this.configs.groups}),l=fa.getProperty(u,0,0),c=this.services.cartesianScales.getDomainAxisPosition({firstDatum:l}),h=this.services.cartesianScales.getRangeAxisPosition({firstDatum:l}),d=this.services.cartesianScales.getScaleByPosition(h),f=n.selectAll("path.area").data(u,(function(t){return fa.getProperty(t,0,a)}));this.areaGenerator=Dh().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(u,(function(t){return fa.getProperty(t,0,a)})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:fa.getProperty(t,0,a),originalClassName:"area"})})).style("fill",(function(t){return i.model.getFillColor(fa.getProperty(t,0,a))})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",ot.opacity.selected).attr("d",this.areaGenerator)},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Wg),gm=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=rf.getSVGElementSize(this.parent,{useAttrs:!0}).width;return r.step?Math.min(e.bars.maxWidth,r.step()/2):Math.min(e.bars.maxWidth,.25*i/n)},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}(Wg),vm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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(this.services.transitions.getTransition("bar-update-enter",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(),u=t[o],l=e.services.cartesianScales.getDomainValue(t,n)-s/2,c=l+s;if(Array.isArray(u)&&2===u.length)r=e.services.cartesianScales.getRangeValue(u[0]),i=e.services.cartesianScales.getRangeValue(u[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=u>0&&a===R.VERTICAL||u<0&&a===R.HORIZONTAL?r-2:r+2),!e.isOutsideZoomedDomain(l,c))return fa.generateSVGPathString({x0:l,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){var n=ma(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){ma(this);t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEMOVE,{element:ma(this),datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Bar.BAR_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(gm),mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.renderType=C.SVG,e.padding=5,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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=ss(n,(function(t){return t[e.services.cartesianScales.getDomainIdentifier(t)]})).keys(),s=o.selectAll("g.bars").data(a,(function(t){return t}));s.exit().attr("opacity",0).remove();var u=s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(s);u.transition(this.services.transitions.getTransition("bar-group-update-enter",t)).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===R.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"}));var l=u.selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}),(function(t){return t[i]}));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",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){var n=e.groupScale(t[i]),r=n,o=n+e.getBarWidth(),a=e.services.cartesianScales.getRangeAxisPosition({datum:t}),s=e.services.cartesianScales.getValueThroughAxisPosition(a,0),u=e.services.cartesianScales.getRangeValue(t);if(!e.isOutsideZoomedDomain(r,o))return fa.generateSVGPathString({x0:r,x1:o,y0:s,y1:u},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){var n=ma(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Bar.BAR_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.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)]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getGroupedData(this.configs.groups);if(1===t.length)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t.length-1)},e.prototype.getBarWidth=function(){var t=this.getOptions(),e=fa.getProperty(t,"bars","width"),n=fa.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(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},e.prototype.setGroupScale=function(){var t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=Ds().domain(t).rangeRound([0,this.getGroupWidth()])},e}(gm),ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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}),s=n.selectAll("g.bars").data(a,(function(t){return fa.getProperty(t,0,o)}));s.exit().attr("opacity",0).remove(),s.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(this.services.transitions.getTransition("bar-update-enter",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,s=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),l=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(a,s))return Math.abs(l-u)>0&&Math.abs(l-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===R.VERTICAL?l+=1:l-=1),fa.generateSVGPathString({x0:a,x1:s,y0:u,y1:l},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){var r,i=ma(this);i.classed("hovered",!0),i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")),e.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOVER,{element:i,datum:n});var o=e.model.getDisplayData(e.configs.groups).find((function(r){var i=e.services.cartesianScales.getDomainIdentifier(r);return r[e.services.cartesianScales.getRangeIdentifier(r)]===n.data[n.group]&&r[i].toString()===n.data.sharedStackKey&&r[t]===n.group}));if(void 0===o){var a=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier();(r={})[a]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,o=r}e.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:i,data:[o]})})).on("mousemove",(function(t){var n=ma(this);e.services.events.dispatchEvent(tt.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(tt.Bar.BAR_CLICK,{element:ma(this),datum:t})})).on("mouseout",(function(t){var n=ma(this);n.classed("hovered",!1),e.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOUT,{element:n,datum:t}),e.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(gm),bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="boxplot",e.renderType=C.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(),u=a.range(),l=u[0],c=u[1],h=s.range(),d=c-l,f=h[0]-h[1];if(0!==d){var p=this.services.cartesianScales,g=p.getOrientation(),v=g===R.VERTICAL,m=fa.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],_=Math.floor((v?d:f)/o.length),x=Math.min(_/2,16),w=this.model.getBoxplotData(),O=n.selectAll(".box-group").data(w);O.exit().remove();var E=O.enter().append("g").attr("class","box-group"),T=O.merge(E);E.append("path").merge(O.select("path.vertical-line.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"vertical-line start"})})).attr("stroke-width",ct.strokeWidth.default).attr("fill","none").transition(this.services.transitions.getTransition("boxplot-update-verticalstartline",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 fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.vertical-line.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"vertical-line end"})})).attr("stroke-width",ct.strokeWidth.default).attr("fill","none").transition(this.services.transitions.getTransition("boxplot-update-verticalendline",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 fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.box")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],originalClassName:"box"})})).attr("fill-opacity",ct.box.opacity.default).attr("stroke-width",ct.strokeWidth.default).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","box").transition(this.services.transitions.getTransition("boxplot-update-quartiles",t)).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,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 fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.max);return fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.whisker.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"whisker start"})})).attr("stroke-width",ct.strokeWidth.thicker).attr("fill","none").transition(this.services.transitions.getTransition("boxplot-update-startingwhisker",t)).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/4,n=e+x/2,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.min);return fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.median")).attr("fill","none").attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"median"})})).attr("stroke-width",2).transition(this.services.transitions.getTransition("boxplot-update-median",t)).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(t.quartiles.q_50),o=r;return fa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.whisker.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.STROKE],originalClassName:"whisker end"})})).attr("stroke-width",ct.strokeWidth.thicker).attr("fill","none").transition(this.services.transitions.getTransition("boxplot-update-endingwhisker",t)).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/4,n=e+x/2,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.whiskers.max);return fa.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",ct.circle.radius).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[P.FILL,P.STROKE],originalClassName:"outlier"})})).attr("fill-opacity",ct.circle.opacity.default).attr("cx",y).transition(this.services.transitions.getTransition("boxplot-update-circles",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){var i=ma(this);ma(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",ct.box.opacity.hovered),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:i,items:[{label:e.tooltip.groupLabel,value:r[n],class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP]})},{label:"Minimum",value:r.whiskers.min},{label:"Q1",value:r.quartiles.q_25},{label:"Median",value:r.quartiles.q_50},{label:"Q3",value:r.quartiles.q_75},{label:"Maximum",value:r.whiskers.max},{label:"IQR",value:r.quartiles.q_75-r.quartiles.q_25}]}),t.services.events.dispatchEvent(tt.Boxplot.BOX_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Boxplot.BOX_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Boxplot.BOX_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);ma(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",ct.box.opacity.default),t.services.events.dispatchEvent(tt.Boxplot.BOX_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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){var o=ma(this);o.classed("hovered",!0).attr("fill-opacity",ct.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:o,items:[{label:e.tooltip.groupLabel,value:i[n],class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP]})},{label:"Outlier",value:i[r]}]}),t.services.events.dispatchEvent(tt.Boxplot.OUTLIER_MOUSEOVER,{element:o,datum:i})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Boxplot.OUTLIER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Boxplot.OUTLIER_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1).attr("fill-opacity",ct.circle.opacity.default),t.services.events.dispatchEvent(tt.Boxplot.OUTLIER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},e}(Wg),_m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.renderType=C.SVG,e.handleChartHolderOnHover=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-hover-scatter")).attr("opacity",1)},e.handleChartHolderOnMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(tt.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(tt.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(fa.getProperty(this.getOptions(),"points","enabled")||fa.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=fa.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)}),(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)}),r),u=s[0],l=s[1],c=u(t,e),h=l(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,u=this.services,l=u.cartesianScales,c=u.transitions,h=i.data.groupMapsTo,d=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),f=d[0],p=d[1],g=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=l.getDomainIdentifier(t),r=n.model.getIsFilled(t[h],t[e],t,a)?[P.FILL,P.STROKE]:[P.STROKE];return n.model.getColorClassName({classNameTypes:r,dataGroupName:t[h],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){var e=l.getDomainIdentifier(t);return n.model.getIsFilled(t[h],t[e],t,a)})).classed("unfilled",(function(t){var e=l.getDomainIdentifier(t);return!n.model.getIsFilled(t[h],t[e],t,a)})).transition(c.getTransition("scatter-update-enter",e)).attr("cx",f).attr("cy",p).attr("r",i.points.radius).style("fill",(function(t){var e=l.getDomainIdentifier(t);if(n.model.getIsFilled(t[h],t[e],t,a))return n.model.getFillColor(t[h],t[e],t)})).style("stroke",(function(t){var e=l.getDomainIdentifier(t);return n.model.getStrokeColor(t[h],t[e],t)})).attr("fill-opacity",a?s:1).attr("opacity",g?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[l.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){var r=ma(this);r.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:n[e],originalClassName:r.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(tt.Tooltip.SHOW,{hoveredElement:r,data:[n],additionalItems:t.getTooltipAdditionalItems(n)}),t.services.events.dispatchEvent(tt.Scatter.SCATTER_MOUSEOVER,{element:r,datum:n})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Scatter.SCATTER_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(n){var r=ma(this);if(r.classed("hovered",!1),!t.configs.filled){var i=t.getOptions().points.filled,o=t.services.cartesianScales.getDomainIdentifier(n),a=t.model.getIsFilled(n[e],n[o],n,i);r.classed("unfilled",!a).style("fill",(function(n){return a||i?t.model.getFillColor(n[e],n[o],n):null}))}t.services.events.dispatchEvent(tt.Scatter.SCATTER_MOUSEOUT,{element:r,datum:n}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(tt.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(tt.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Wg),xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e.renderType=C.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=rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,s=a?ps(i):[1,1];return al().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,u=this.services.cartesianScales,l=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return u.getDomainValue(t,e)}),(function(t,e){return u.getRangeValue(t,e)}),u.getOrientation()),c=l[0],h=l[1];t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).transition(this.services.transitions.getTransition("bubble-update-enter",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=fa.getProperty(this.getOptions(),"bubble");return[{label:fa.getProperty(e,"radiusLabel"),value:t[fa.getProperty(e,"radiusMapsTo")]}]},e}(_m),wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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(),u=this.services.cartesianScales.getRangeIdentifier(),l=s.range(),c=l[0],h=l[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=rf.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(n.services.transitions.getTransition("bullet-range-box-update-enter",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),fa.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),(e=rf.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(n.services.transitions.getTransition("bullet-bar-update-enter",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 fa.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=rf.appendOrSelect(o,"g.markers").selectAll("path.marker").data(a.filter((function(t){return null!==fa.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(n.services.transitions.getTransition("bullet-marker-update-enter",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 fa.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!==fa.getProperty(t,"marker")})).forEach((function(t){var n=t.marker,r=t[u];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=rf.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(n.services.transitions.getTransition("bullet-quartile-update-enter",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,u=n.services.cartesianScales.getRangeValue(i,e),l=u;return fa.generateSVGPathString({x0:a,x1:s,y0:u,y1:l},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),this.addEventListeners()},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.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){var o=ma(this);o.classed("hovered",!0),o.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOVER,{element:o,datum:i});var a=fa.getProperty(e,"bullet","performanceAreaTitles"),s=t.getMatchingRangeIndexForDatapoint(i);t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:o,items:[{label:e.tooltip.groupLabel||"Group",value:i[n],class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:i[n]})},{label:"Value",value:i[r]},{label:"Target",value:i.marker},{label:"Percentage",value:Math.floor(i[r]/i.marker*100)+"%"},{label:"Performance",value:a[s]}]})})).on("mousemove",(function(e){t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEMOVE,{element:ma(this),datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Bar.BAR_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(tt.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wg),Om=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?dt.opacity.unselected:dt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",dt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],l=s[1],c=this.getOptions(),h=Lh().x(u).y(l).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:fa.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:!fa.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:[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(this.services.transitions.getTransition("line-update-enter",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(){this.parent.selectAll("path.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wg),Em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="lollipop",e.renderType=C.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]?dt.weight.unselected:dt.weight.selected}))},e.handleScatterOnMouseOut=function(t){e.parent.selectAll("line.line").attr("stroke-width",dt.weight.unselected)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t[r]!==n.datum().name?dt.opacity.unselected:dt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("line.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",dt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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(),u=o.getDomainIdentifier(),l=o.getOrientation(),c=fa.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),l),h=c[0],d=c[1],f=n.selectAll("line.line").data(this.getScatterData(),(function(t){return t[i]+"-"+t[u]}));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(this.services.transitions.getTransition("lollipop-line-update-enter",t)).style("stroke",(function(t){return e.model.getFillColor(t[i],t[u],t)})).attr("opacity",1);l===R.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(tt.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(tt.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e.prototype.destroy=function(){this.parent.selectAll("line.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(tt.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(tt.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e}(_m),Tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this;if(fa.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}),u=n.selectAll("g.dots").data(s,(function(t){return fa.getProperty(t,0,o)}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(u).selectAll("circle.dot").data((function(t){return t}));l.exit().attr("opacity",0).remove();var c=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).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,u){var l,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][u].data[c]),null!==d&&s.push(((l={})[i]=c,l[p]=h,l[g]=d,l)))}))})),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}(_m);function Sm(t,e){var n=this,r=xu(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=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return pt.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getComponentContainer(),o=this.model.getDisplayData().filter((function(t){return t.value>0})),a=this.getOptions(),s=a.data.groupMapsTo,u=this.computeRadius();this.arc=Sh().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=Sh().innerRadius(this.getInnerRadius()).outerRadius(u+pt.hoverArc.outerRadiusOffset);var l=function(){var t=Rh,e=kh,n=null,r=ah(0),i=ah(vh),o=ah(0);function a(a){var s,u,l,c,h,d=a.length,f=0,p=new Array(d),g=new Array(d),v=+r.apply(this,arguments),m=Math.min(vh,Math.max(-vh,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,l=f?(m-d*b)/f:0;s<d;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+b,g[u]={data:a[u],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:ah(+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:ah(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:ah(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:ah(+t),a):o},a}().value((function(t){return t.value})).sort(fa.getProperty(a,"pie","sortFunction")).padAngle(pt.padAngle)(o),c=rf.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,(function(t){return t.data[s]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t.data[s],originalClassName:"slice"})})).style("fill",(function(t){return n.model.getFillColor(t.data[s])})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+fa.convertValueToPercentage(t.data.value,o)+"%"})).attrTween("d",(function(t){return Sm.bind(this)(t,n.arc)}));var h=a.pie.labels.enabled,d=h?l.filter((function(t){return t.value>0})):[],f=rf.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(d,(function(t){return t.data[s]}));f.exit().attr("opacity",0).remove();var p=f.enter().append("text").classed("pie-label",!0),g=[];p.merge(f).style("text-anchor","middle").text((function(t){return a.pie.labels.formatter?a.pie.labels.formatter(t):fa.convertValueToPercentage(t.data.value,o)+"%"})).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=d.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<pt.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+pt.callout.offsetX+pt.callout.textMargin+t.textOffsetX,o=t.yPosition-pt.callout.offsetY,t.direction=z.RIGHT,g.push(t)):(i=t.xPosition-pt.callout.offsetX-t.textOffsetX-pt.callout.textMargin,o=t.yPosition-pt.callout.offsetY,t.direction=z.LEFT,g.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(g);var v=fa.getProperty(a,"donut")?"donut":"pie",m=fa.getProperty(a,v,"alignment"),y=rf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,b=h?pt.yOffset:0,_=u+(h?pt.xOffset:0);m===B.CENTER?_=y/2:m===B.RIGHT&&(_=y-u-pt.xOffset);var x=u+b;g.length>0&&(x+=pt.yOffsetCallout),i.attr("x",_+7).attr("y",x),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=rf.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.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");i.merge(n).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===z.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+pt.callout.offsetX,y:n-pt.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-pt.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-pt.callout.offsetX,y:n-pt.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+pt.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return ma(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 ma(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){var n=ma(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(tt.Pie.SLICE_MOUSEOVER,{element:ma(this),datum:e});var r=t.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value}]})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Pie.SLICE_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(tt.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=rf.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+pt.radiusOffset:i},e}(Wg),Cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e.renderType=C.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 fa.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 fa.getProperty(t,"gauge","type")===q.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(fa.getProperty(e,"gauge","deltaArrow","direction")){case Z.UP:return"4,10 8,6 12,10";case Z.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(),u=this.getStartAngle(),l=u+a*s,c=u+s,h=this.computeRadius(),d=this.getInnerRadius();this.backgroundArc=Sh().innerRadius(d).outerRadius(h).startAngle(l).endAngle(c),this.arc=Sh().innerRadius(d).outerRadius(h).startAngle(u).endAngle(l),rf.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);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 fa.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.value})),this.drawValueNumber(),this.drawDelta(),f.exit().remove();var p=fa.getProperty(i,"gauge","alignment"),g=rf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,v=h;p===B.CENTER?v=g/2:p===B.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=fa.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=fa.getProperty(e,"gauge","valueFontSize"),s=fa.getProperty(e,"gauge","deltaFontSize"),u=fa.getProperty(e,"gauge","numberSpacing"),l=fa.getProperty(e,"gauge","showPercentageSymbol"),c=0;n!==q.FULL||i?n===q.SEMI&&i&&(c=-(s(o)+u)):c=s(o);var h=rf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),d=a(o),f=rf.appendOrSelect(h,"g.gauge-value-number"),p=fa.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=rf.getSVGElementSize(rf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width,m=d/2,y=l?"%":"",b=rf.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",m+"px").attr("x",v/2).text(y),_=rf.getSVGElementSize(b,{useBBox:!0}),x=_.width,w=_.height;b.attr("y","-"+w/2+"px"),f.attr("transform","translate(-"+x/2+", 0)")},e.prototype.drawDelta=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=this.getDelta(),i=this.computeRadius(),o=r?fa.getProperty(n,"gauge","deltaFontSize"):function(){return 0},a=r?fa.getProperty(n,"gauge","numberFormatter"):function(){return null},s=fa.getProperty(n,"gauge","deltaArrow","size"),u=fa.getProperty(n,"gauge","numberSpacing"),l=fa.getProperty(n,"gauge","showPercentageSymbol"),c=rf.appendOrSelect(e,"g.gauge-numbers"),h=rf.appendOrSelect(c,"g.gauge-delta").attr("transform","translate(0, "+(o(i)+u)+")"),d=rf.appendOrSelect(h,"text.gauge-delta-number"),f=l?"%":"";d.data(null===r?[]:[r]),d.enter().append("text").classed("gauge-delta-number",!0).merge(d).attr("text-anchor","middle").style("font-size",o(i)+"px").text((function(t){return""+a(t)+f}));var p=rf.getSVGElementSize(rf.appendOrSelect(e,".gauge-delta-number"),{useBBox:!0}).width,g=fa.getProperty(n,"gauge","deltaArrow","enabled"),v=h.selectAll("svg.gauge-delta-arrow").data(null!==r&&g?[r]:[]);v.enter().append("svg").merge(v).attr("class","gauge-delta-arrow").attr("x",-s(i)-p/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=ma(this);rf.appendOrSelect(e,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var i=fa.getProperty(n,"gauge","status");rf.appendOrSelect(e,"polygon.gauge-delta-arrow").attr("class",null!==i?"gauge-delta-arrow status--"+i:"").attr("points",t.getArrow(r))})),v.exit().remove(),d.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-fa.getProperty(this.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e){t.services.events.dispatchEvent(tt.Gauge.ARC_MOUSEOVER,{element:ma(this),datum:e})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(tt.Gauge.ARC_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.getOptions(),e=fa.getProperty(t,"gauge","type"),n=rf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===q.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Wg),Am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this;if(this.model.isDataEmpty())this.getComponentContainer().select("g.center").remove();else{var r=rf.appendOrSelect(this.getComponentContainer(),"g.center"),i=this.getOptions(),o=this.computeRadius();rf.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(ma(this))})),rf.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text(fa.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.getOptions(),n=fa.getProperty(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,e){return t+e.value}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?wu:vu)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Mm),Pm=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=fa.getProperty(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===j.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===j.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===j.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==j.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===R.VERTICAL&&this.drawYGrid(t),e===R.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=al().domain([0,1]).range(t),this.yScale=al().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=rf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;this.backdrop=rf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",r).attr("height",i);var o=rf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var a=this.xScale.range(),s=a[0],u=(a[1],this.yScale.range()),l=(u[0],u[1]);this.backdrop.merge(o).attr("x",s).attr("y",l),o.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("width"),n=fa.getProperty(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((function(t){return t*e})),i=rf.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)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=fa.getProperty(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=rf.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)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=rf.getSVGElementSize(r,{useAttrs:!0}),o=i.width,a=i.height,s=rf.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=0===e?"pie":"donut",l=fa.getProperty(this.getOptions(),u,"alignment");rf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none");var c=Sh().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(pt.radiusOffset),d=t+(Math.min(o,a)-2*t)/2,f=rf.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),p=t+pt.xOffset;l===B.CENTER?p=o/2:l===B.RIGHT&&(p=o-t-pt.xOffset);var g=t+pt.yOffset;f.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=rf.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+pt.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=rf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=rf.appendOrSelect(e,"defs").lower(),o=rf.appendOrSelect(i,"linearGradient").attr("id",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(rt).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Wg),Lm=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=fa.getProperty(this.getOptions(),"data","loading"),n=!(fa.getProperty(this.getOptions(),"grid","x","enabled")||fa.getProperty(this.getOptions(),"grid","y","enabled")||fa.getProperty(this.getOptions(),"axes","bottom","visible")||fa.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=rf.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)},e.prototype.updateBackdropStyle=function(){var t=this.parent;this.backdrop=rf.appendOrSelect(t,"svg.chart-skeleton.DAII");var e=rf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");e.classed("shimmer-effect-lines",!1),e.classed("shimmer-effect-sparkline",!0)},e}(Pm);function Dm(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 km(t,e){var n,r,i,o,a,s=new Bm(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Rm);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Bm(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Nm)}function Rm(t){return t.children}function Im(t){t.data=t.data.data}function Nm(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Bm(t){this.data=t,this.depth=this.height=0,this.parent=null}Bm.prototype=km.prototype={constructor:Bm,count:function(){return this.eachAfter(Dm)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},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(){var t=[];return this.each((function(e){t.push(e)})),t},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 km(this).eachBefore(Im)}};var Vm=Array.prototype.slice;function Um(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}(Vm.call(t))).length,o=[];r<i;)e=t[r],n&&zm(n,e)?++r:(n=Fm(o=Gm(o,e)),r=0);return n}function Gm(t,e){var n,r;if(jm(e,t))return[e];for(n=0;n<t.length;++n)if(Hm(e,t[n])&&jm(Wm(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(Hm(Wm(t[n],t[r]),e)&&Hm(Wm(t[n],e),t[r])&&Hm(Wm(t[r],e),t[n])&&jm(qm(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Hm(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 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,e){for(var n=0;n<e.length;++n)if(!zm(t,e[n]))return!1;return!0}function Fm(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return Wm(t[0],t[1]);case 3:return qm(t[0],t[1],t[2])}var e}function Wm(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,l=a-r,c=s-i,h=Math.sqrt(u*u+l*l);return{x:(n+o+u/h*c)/2,y:(r+a+l/h*c)/2,r:(h+i+s)/2}}function qm(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,h=n.r,d=r-a,f=r-l,p=i-s,g=i-c,v=u-o,m=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+u*u,_=y-l*l-c*c+h*h,x=f*p-d*g,w=(p*_-g*b)/(2*x)-r,O=(g*v-p*m)/x,E=(f*b-d*_)/(2*x)-i,T=(d*m-f*v)/x,S=O*O+T*T-1,M=2*(o+w*O+E*T),C=w*w+E*E-o*o,A=-(S?(M+Math.sqrt(M*M-4*S*C))/(2*S):C/M);return{x:r+w+O*A,y:i+E+T*A,r:A}}function Zm(t,e,n){var r,i,o,a,s=t.x-e.x,u=t.y-e.y,l=s*s+u*u;l?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(l+a-i)/(2*l),o=Math.sqrt(Math.max(0,a/l-r*r)),n.x=t.x-r*s-o*u,n.y=t.y-r*u+o*s):(r=(l+i-a)/(2*l),o=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-o*u,n.y=e.y+r*u+o*s)):(n.x=e.x+n.r,n.y=e.y)}function Ym(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 Xm(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 Km(t){this._=t,this.next=null,this.previous=null}function $m(t){return null==t?null:Qm(t)}function Qm(t){if("function"!=typeof t)throw new Error;return t}function Jm(){return 0}function ty(t){return function(){return t}}function ey(t){return Math.sqrt(t.value)}function ny(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function ry(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=function(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,u,l,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;Zm(n,e,r=t[2]),e=new Km(e),n=new Km(n),r=new Km(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){Zm(e._,n._,r=t[s]),r=new Km(r),u=n.next,l=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(Ym(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}c+=u._.r,u=u.next}else{if(Ym(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(u!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=Xm(e);(r=r.next)!==n;)(a=Xm(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Um(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function iy(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 oy(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 ay(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function sy(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var uy=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,l,c,h,d,f,p,g,v,m=[],y=e.children,b=0,_=0,x=y.length,w=e.value;b<x;){u=i-n,l=o-r;do{c=y[_++].value}while(!c&&_<x);for(h=d=c,v=c*c*(g=Math.max(l/u,u/l)/(w*t)),p=Math.max(d/v,v/h);_<x;++_){if(c+=s=y[_].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:u<l,children:y.slice(b,_)}),a.dice?ay(a,n,r,i,w?r+=l*c/w:o):sy(a,n,r,w?n+=u*c/w:i,o),w-=c,b=_}}(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 ly={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"}},cy=function(){var t,e=ma(this.parentNode).select("rect.leaf"),n=Xs(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(ly);e<n.length;e++)for(var r=n[e],i=ly[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=au(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},hy=0,dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-treemap")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=fa.getProperty(window,"location"),s=rf.getSVGElementSize(n,{useAttrs:!0}),u=s.width,l=s.height,c=km({name:o.title||"Treemap",children:i}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),h=(Ts(r,(function(t){return Ts(t.children,(function(t){return t.value}))})),function(){var t=uy,e=!1,n=1,r=1,i=[0],o=Jm,a=Jm,s=Jm,u=Jm,l=Jm;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(oy),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+=l(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(d-=u(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=Qm(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:ty(+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:ty(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:ty(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:ty(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:ty(+t),c):l},c}().size([u,l]).paddingInner(1).paddingOuter(0).round(!0)(c)),d=this.services.transitions,f=n.selectAll("g[data-name='leaf']").data(h.leaves(),(function(t){return t.data.name}));f.exit().attr("opacity",0).remove();var p=f.enter().append("g").attr("data-name","leaf").attr("data-uid",(function(){return hy++})).merge(f);p.attr("data-name","leaf").transition(d.getTransition("treemap-group-update",t)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"}));var g=p.selectAll("rect.leaf").data((function(t){return[t]}));g.exit().attr("width",0).attr("height",0).remove(),g.enter().append("rect").classed("leaf",!0).merge(g).attr("width",0).attr("height",0).attr("id",(function(){var t=ma(this.parentNode).attr("data-uid");return o.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(this.services.transitions.getTransition("treemap-leaf-update-enter",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)})),p.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=ma(this.parentNode).attr("data-uid");return o.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=ma(this.parentNode.parentNode).attr("data-uid"),e=o.style.prefix+"-leaf-"+t;return new URL("#"+e,a)+""}))}),(function(t){return null}),(function(t){return t.remove()})),p.selectAll("text").data((function(t){if(!0!==t.data.showLabel)return[];for(var n=t;n.depth>1;)n=n.parent;var r=au(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",cy).attr("x",7).attr("y",18);a&&e.attr("clip-path",(function(){var t=ma(this.parentNode).attr("data-uid"),e=o.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,a)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",cy)}),(function(t){return t.remove()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(e){for(var n=ma(this),r=getComputedStyle(this,null).getPropertyValue("fill"),i=e;i.depth>1;)i=i.parent;n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).style("fill",(function(e){var n=t.model.getFillColor(e.parent.data.name);return n&&(r=n),Xs(r).darker(.7).toString()})),t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,items:[{color:r,label:i.data.name,bold:!0},{label:e.data.name,value:e.data.value}]}),t.services.events.dispatchEvent(tt.Treemap.LEAF_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Treemap.LEAF_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Treemap.LEAF_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1);for(var r=e;r.depth>1;)r=r.parent;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).style("fill",(function(e){return t.model.getFillColor(e.parent.data.name)})),t.services.events.dispatchEvent(tt.Treemap.LEAF_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})}))},e}(Wg);function fy(t){var e,n=(gy(t)%(e=360)+e)%e;return py(n,[0,10])||py(n,[350,0])?{textAnchor:F.START,dominantBaseline:W.MIDDLE}:py(n,[10,80])?{textAnchor:F.START,dominantBaseline:W.HANGING}:py(n,[80,100])?{textAnchor:F.MIDDLE,dominantBaseline:W.HANGING}:py(n,[100,170])?{textAnchor:F.END,dominantBaseline:W.HANGING}:py(n,[170,190])?{textAnchor:F.END,dominantBaseline:W.MIDDLE}:py(n,[190,260])?{textAnchor:F.END,dominantBaseline:W.BASELINE}:py(n,[260,280])?{textAnchor:F.MIDDLE,dominantBaseline:W.BASELINE}:{textAnchor:F.START,dominantBaseline:W.BASELINE}}function py(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function gy(t){return t*(180/Math.PI)}function vy(t,e,n){return void 0===n&&(n={x:0,y:0}),{x:e*Math.cos(t)+n.x,y:e*Math.sin(t)+n.y}}var my=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.renderType=C.SVG,e.getLabelDimensions=function(t){var n=rf.appendOrSelect(e.getComponentContainer(),"g.tmp-tick"),r=rf.appendOrSelect(n,"text").text(t),i=rf.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=fa.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=fa.getProperty(n,"data","groupMapsTo"),s=fa.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 fa.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.getOptions(),r=fa.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=fa.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:fa.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?gt.opacity.unselected:gt.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?gt.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",gt.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),i=rf.getSVGElementSize(n,{useAttrs:!0}),o=i.width,a=i.height,s=this.model.getData(),u=this.model.getGroupedData(),l=this.getOptions(),c=fa.getProperty(l,"radar","axes"),h=c.angle,d=c.value,f=fa.getProperty(l,"data","groupMapsTo"),p=gt.xLabelPadding,g=gt.yLabelPadding,v=gt.yTicksNumber,m=gt.minRange,y=gt.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[f]})))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+g),_=(Math.min(o,a)-b)/2;if(!(_<=0)){var x=Ds().domain(this.fullDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),w=Es(this.fullDataNormalized.map((function(t){return t[d]}))),O=al().domain([w>=0?0:w,Os(this.fullDataNormalized.map((function(t){return t[d]})))]).range([m,_]).nice(v),E=O.ticks(v),T=function(t){return e.model.getFillColor(t)},S=Vh().angle((function(t){return x(t[h])+Math.PI/2})).radius((function(t){return O(t[d])})).curve(hd),M={x:Os(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=x(t),_*Math.sin(n-Math.PI/2))})))+p,y:a/2},C=rf.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(E,(function(t){return t})),A=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[h]=e,n[d]=t,n}))};C.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+M.x+", "+M.y+")").attr("fill","none").call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return S(A(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_update",t)).attr("opacity",1).attr("transform","translate("+M.x+", "+M.y+")").attr("d",(function(t){return S(A(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_exit",t)).attr("d",(function(t){return S(A(t))})).attr("opacity",0).remove()}))})),rf.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("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+fa.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return vy(x(t),0,M).x})).attr("y1",(function(t){return vy(x(t),0,M).y})).attr("x2",(function(t){return vy(x(t),0,M).x})).attr("y2",(function(t){return vy(x(t),0,M).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return vy(x(t),O.range()[0],M).x})).attr("y1",(function(t){return vy(x(t),O.range()[0],M).y})).attr("x2",(function(t){return vy(x(t),O.range()[1],M).x})).attr("y2",(function(t){return vy(x(t),O.range()[1],M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_update",t)).attr("opacity",1).attr("x1",(function(t){return vy(x(t),O.range()[0],M).x})).attr("y1",(function(t){return vy(x(t),O.range()[0],M).y})).attr("x2",(function(t){return vy(x(t),O.range()[1],M).x})).attr("y2",(function(t){return vy(x(t),O.range()[1],M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),rf.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 vy(x(t),O.range()[1]+p,M).x})).attr("y",(function(t){return vy(x(t),O.range()[1]+p,M).y})).style("text-anchor",(function(t){return fy(x(t)).textAnchor})).style("dominant-baseline",(function(t){return fy(x(t)).dominantBaseline})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_update",t)).attr("opacity",1).attr("x",(function(t){return vy(x(t),O.range()[1]+p,M).x})).attr("y",(function(t){return vy(x(t),O.range()[1]+p,M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),rf.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("opacity",0).attr("transform",t?function(){return"translate("+M.x+", "+M.y+") scale("+(1+.35*Math.random())+")"}:"translate("+M.x+", "+M.y+")").style("fill",(function(t){return T(t.name)})).style("fill-opacity",gt.opacity.selected).style("stroke",(function(t){return T(t.name)})).call((function(n){var r=n.transition(e.services.transitions.getTransition("radar_blobs_enter",t));t&&r.delay((function(){return 30*Math.random()})).attr("transform","translate("+M.x+", "+M.y+")"),r.attr("opacity",1).attr("d",(function(t){return S(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 T(t.name)})).style("stroke",(function(t){return T(t.name)})),n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+M.x+", "+M.y+")").attr("d",(function(t){return S(t.data)}))}))}),(function(n){return n.call((function(n){var r=n.transition(e.services.transitions.getTransition("radar_blobs_exit",t));t&&r.delay((function(){return 30*Math.random()})).attr("transform",(function(){return"translate("+M.x+", "+M.y+") scale("+(1+.35*Math.random())+")"})),r.attr("opacity",0).remove()}))})),rf.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.fullDataNormalized).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[f],originalClassName:fa.kebabCase(t[h])})})).attr("cx",(function(t){return vy(x(t[h]),O(t[d]),M).x})).attr("cy",(function(t){return vy(x(t[h]),O(t[d]),M).y})).attr("r",0).attr("opacity",0).style("fill",(function(t){return T(t[f])})),rf.appendOrSelect(n,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("x",M.x).attr("y",M.y-y/2).attr("width",O.range()[1]).attr("height",y).style("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+gy(x(t))+", "+M.x+", "+M.y+")"})),rf.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(ps(E)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return vy(-Math.PI/2,O(t),M).x+g})).attr("y",(function(t){return vy(-Math.PI/2,O(t),M).y})).style("text-anchor","start").style("dominant-baseline","middle").call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_update",t)).text((function(t){return t})).attr("opacity",1).attr("x",(function(t){return vy(-Math.PI/2,O(t),M).x+g})).attr("y",(function(t){return vy(-Math.PI/2,O(t),M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))}));var L=fa.getProperty(l,"radar","alignment"),D=this.getAlignmentXOffset(L,n,this.getParent());n.attr("x",D),this.addEventListeners()}},e.prototype.getAlignmentXOffset=function(t,e,n){var r=rf.getSVGElementSize(e,{useBBox:!0}),i=rf.getSVGElementSize(n,{useAttr:!0}).width,o=0;return t===B.CENTER?o=Math.floor((i-r.width)/2):t===B.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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=fa.getProperty(this.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n){var r=ma(this);t.services.events.dispatchEvent(tt.Radar.X_AXIS_MOUSEOVER,{element:r,datum:n});var i=t.parent.select(".x-axes .x-axis-"+fa.kebabCase(n)),o=t.parent.selectAll(".dots circle."+fa.kebabCase(n));i.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",1).attr("r",gt.dotsRadius);var a=t.fullDataNormalized.filter((function(t){return t[e]===n})),s=t.getOptions(),u=s.data.groupMapsTo,l=fa.getProperty(s,"radar","axes","value");t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:r,items:a.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[u],value:e[l],color:t.model.getFillColor(e[u]),class:t.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(tt.Radar.X_AXIS_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this),r=t.parent.select(".x-axes .x-axis-"+fa.kebabCase(e)),i=t.parent.selectAll(".dots circle."+fa.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(tt.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE)}))},e}(Wg),yy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle-pack",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.node").transition(e.services.transitions.getTransition("legend-hover-circlepack")).attr("opacity",(function(t){return t.data.dataGroupName===n.datum().name?1:ut.circles.fillOpacity}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.node").transition(e.services.transitions.getTransition("legend-mouseout-circlepack")).attr("opacity",1)},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),r=rf.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(),u=this.model.getHierarchyLevel(),l=this.getOptions(),c=fa.getProperty(l,"canvasZoom","enabled");s&&fa.getProperty(a,0,"children")&&(a=fa.getProperty(a,0,"children"));var h=km({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=Jm;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(ny(t)).eachAfter(ry(r,.5)).eachBefore(iy(1)):i.eachBefore(ny(ey)).eachAfter(ry(Jm,1)).eachAfter(ry(r,i.r/Math.min(e,n))).eachBefore(iy(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=$m(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:ty(+t),i):r},i}().size([i,o]).padding((function(t){return t.depth>=1?ut.padding.children+3:ut.padding.mainGroup+3}))(h).descendants().splice(1).filter((function(t){return t.depth<=u})),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===u?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(this.services.transitions.getTransition("circlepack-leaf-update-enter",t)).attr("r",(function(t){return t.r})).attr("opacity",1).attr("fill-opacity",ut.circles.fillOpacity),!0===c&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,p,st),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",ut.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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.removeBackgroundListeners=function(){ma(this.services.domUtils.getMainContainer()).on("click",(function(){return null}))},e.prototype.setBackgroundListeners=function(){var t=ma(this.services.domUtils.getMainContainer()),e=this,n=this.parent.selectAll("circle.node"),r=fa.getProperty(os,"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){var n=ma(this);n.classed("hovered",!0);var r=t.model.getHierarchyLevel(),i=r>2&&!n.classed("focal"),o=fa.getProperty(t.model.getOptions(),"canvasZoom","enabled"),a=!1;if(!i){var s=[],u=[],l=null;e.children?(e.depth>1&&o&&(a=!0,n.classed("clickable",!0)),s=e.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:o&&r<=2?t.getZoomIcon():null,value:e.value}})),u=[{label:"Total",value:e.value,bold:!0}],t.highlightChildren(e.children)):l=e.value;var c=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:n,items:M([{color:c,label:e.data.name,labelIcon:a&&o&&r<=2?t.getZoomIcon():null,value:l}],s,u)})}t.services.events.dispatchEvent(tt.CirclePack.CIRCLE_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(tt.CirclePack.CIRCLE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),e.children&&t.unhighlightChildren(e.children),t.services.events.dispatchEvent(tt.CirclePack.CIRCLE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:n})})).on("click",(function(e){var n=ma(this),r=n.classed("non-focal");if(fa.getProperty(t.getOptions(),"canvasZoom","enabled")&&t.model.getHierarchyLevel()>2){var i=t.parent.selectAll("circle.node");ma(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(i,st)}else if(2===e.depth&&e.children&&!r){i=t.parent.selectAll("circle.node");ma(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=e,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(e,i,st),ia.stopPropagation()}t.services.events.dispatchEvent(tt.CirclePack.CIRCLE_CLICK,{element:n,datum:e})}))},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(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tt.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()},e}(Wg),by=gf.dispatch,_y=Math.PI/180,xy=function(){var t=[256,256],e=wy,n=Oy,r=Ty,i=Ey,o=Ey,a=Sy,s=My,u=Ly,l=[],c=1/0,h=by("word","end"),d=null,f=Math.random,p={},g=Dy;function v(e,n,r){t[0],t[1];for(var i,o,a,s,l,c=n.x,h=n.y,d=Math.sqrt(t[0]*t[0]+t[1]*t[1]),p=u(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&&Ay(n,e,t[0])||r&&(l=r,!((s=n).x+s.x1>l[0].x&&s.x+s.x0<l[1].x&&s.y+s.y1>l[0].y&&s.y+s.y0<l[1].y)))){for(var m,y=n.sprite,b=n.width>>5,_=t[0]>>5,x=n.x-(b<<4),w=127&x,O=32-w,E=n.y1-n.y0,T=(n.y+n.y0)*_+(x>>5),S=0;S<E;S++){m=0;for(var M=0;M<=b;M++)e[T+M]|=m<<O|(M<b?(m=y[S*b+M])>>>w:0);T+=_}return delete n.sprite,!0}return!1}return p.canvas=function(t){return arguments.length?(g=ky(t),p):g},p.start=function(){var u=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=l.length,_=-1,x=[],w=l.map((function(t,u){return t.text=e.call(this,t,u),t.font=n.call(this,t,u),t.style=i.call(this,t,u),t.weight=o.call(this,t,u),t.rotate=a.call(this,t,u),t.size=~~r.call(this,t,u),t.padding=s.call(this,t,u),t})).sort((function(t,e){return e.size-t.size}));return d&&clearInterval(d),d=setInterval(O,0),O(),p;function O(){for(var e=Date.now();Date.now()-e<c&&++_<b&&d;){var n=w[_];n.x=t[0]*(f()+.5)>>1,n.y=t[1]*(f()+.5)>>1,Cy(u,n,w,_),n.hasText&&v(m,n,y)&&(x.push(n),h.call("word",p,n),y?Py(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)}_>=b&&(p.stop(),h.call("end",p,x,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?(l=t,p):l},p.size=function(e){return arguments.length?(t=[+e[0],+e[1]],p):t},p.font=function(t){return arguments.length?(n=ky(t),p):n},p.fontStyle=function(t){return arguments.length?(i=ky(t),p):i},p.fontWeight=function(t){return arguments.length?(o=ky(t),p):o},p.rotate=function(t){return arguments.length?(a=ky(t),p):a},p.text=function(t){return arguments.length?(e=ky(t),p):e},p.spiral=function(t){return arguments.length?(u=Ry[t]||t,p):u},p.fontSize=function(t){return arguments.length?(r=ky(t),p):r},p.padding=function(t){return arguments.length?(s=ky(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 wy(t){return t.text}function Oy(){return"serif"}function Ey(){return"normal"}function Ty(t){return Math.sqrt(t.value)}function Sy(){return 30*(~~(6*Math.random())-3)}function My(){return 1}function Cy(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,u=0,l=n.length;for(--r;++r<l;){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*_y),f=Math.cos(e.rotate*_y),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>u&&(u=h),a+c>=2048&&(a=0,s+=u,u=0),s+h>=2048)break;i.translate((a+(c>>1))/o,(s+(h>>1))/o),e.rotate&&i.rotate(e.rotate*_y),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 _=(c=e.width)>>5,x=(h=e.y1-e.y0,0);x<h*_;x++)b[x]=0;if(null==(a=e.xoff))return;s=e.yoff;for(var w=0,O=-1,E=0;E<h;E++){for(x=0;x<c;x++){var T=_*E+(x>>5),S=y[2048*(s+E)+(a+x)<<2]?1<<31-x%32:0;b[T]|=S,w|=S}w?O=E:(e.y0++,h--,E--,s++)}e.y1=e.y0+O,e.sprite=b.slice(0,(e.y1-e.y0)*_)}}}function Ay(t,e,n){n>>=5;for(var r,i=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,u=32-s,l=t.y1-t.y0,c=(t.y+t.y0)*n+(a>>5),h=0;h<l;h++){r=0;for(var d=0;d<=o;d++)if((r<<u|(d<o?(r=i[h*o+d])>>>s:0))&e[c+d])return!0;c+=n}return!1}function Py(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 Ly(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Dy(){return document.createElement("canvas")}function ky(t){return"function"==typeof t?t:function(){return t}}var Ry={archimedean:Ly,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]}}},Iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="wordcloud",e.renderType=C.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("text.word").transition(e.services.transitions.getTransition("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(e.services.transitions.getTransition("legend-mouseout-wordcloud")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(tt.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tt.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,u=a.wordMapsTo,l=o.data.groupMapsTo,c=rf.getSVGElementSize(n,{useAttrs:!0}),h=c.width,d=c.height;if(0!==h&&0!==d){var f=xy().size([h,d]).words(r.map((function(t){var e;return(e={})[l]=t[l],e.text=t[u],e.size=t[s],e.value=t[s],e}))).padding(5).rotate(0).fontSize((function(t){return i(t.size)})).on("end",(function(r){var i=rf.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[l]+"-"+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[l],originalClassName:"word "+(t.size>32?"light":"")})})).style("fill",(function(t){return e.model.getFillColor(t[l],t.text,t)})).attr("text-anchor","middle").transition(e.services.transitions.getTransition("wordcloud-text-update-enter",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=rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=r.length>0,a=o?ps(r):[1,1];return al().domain(a).range(o?e.wordCloud.fontSizeRange(i,t):[4,4])},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=fa.debounce((function(t){var e=r.parent.selectAll("text.word").transition(r.services.transitions.getTransition("wordcloud-word-mouse-highlight"));null===t?e.attr("opacity",1):e.attr("opacity",(function(){return t===this?1:.3}))}),6),r=this;this.parent.selectAll("text.word").on("mouseover",(function(i){n(this),r.services.events.dispatchEvent(tt.WordCloud.WORD_MOUSEOVER,{element:ma(this),datum:i}),r.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:this,items:[{label:t.tooltip.wordLabel,value:i.text},{label:t.tooltip.valueLabel,value:i.value},{label:t.tooltip.groupLabel,value:i[e],class:r.model.getColorClassName({classNameTypes:[P.TOOLTIP],dataGroupName:i[e]})}]})})).on("mousemove",(function(t){var e=ma(this);r.services.events.dispatchEvent(tt.WordCloud.WORD_MOUSEMOVE,{element:e,datum:t}),r.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(t){r.services.events.dispatchEvent(tt.WordCloud.WORD_CLICK,{element:ma(this),datum:t})})).on("mouseout",(function(t){var e=ma(this);n(null),r.services.events.dispatchEvent(tt.WordCloud.WORD_MOUSEOUT,{element:e,datum:t}),r.services.events.dispatchEvent(tt.Tooltip.HIDE,{hoveredElement:e})}))},e}(Wg),Ny=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||vt.default.size)+"px").style("height",(this.configs.size||vt.default.size)+"px").attr("opacity",0)},e}(Wg),By=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=fa.getProperty(t,"growth");return e===G.PREFERRED||e===G.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 fa.getProperty(t,"growth")===G.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=rf.getHTMLElementSize(n.node()),i=r.width,o=r.height,a=this.configs.direction===U.ROW||this.configs.direction===U.ROW_REVERSE,s=fa.getProperty(this.model.getOptions(),"style","prefix"),u=n.classed(kd.prefix+"--"+s+"--layout-row",this.configs.direction===U.ROW).classed(kd.prefix+"--"+s+"--layout-row-reverse",this.configs.direction===U.ROW_REVERSE).classed(kd.prefix+"--"+s+"--layout-column",this.configs.direction===U.COLUMN).classed(kd.prefix+"--"+s+"--layout-column-reverse",this.configs.direction===U.COLUMN_REVERSE).classed(kd.prefix+"--"+s+"--layout-alignitems-center",this.configs.alignItems===H.CENTER).selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));u.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=ma(n),o=fa.getProperty(e,"renderType")===C.SVG;r.setParent(o?rf.appendOrSelect(i,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):i);var a=fa.getProperty(e,"growth");a!==G.PREFERRED&&a!==G.FIXED||r.render(t)}))})),n.selectAll("div.layout-child-"+this._instanceID).style("height",null).style("width",null).each((function(t){var e=fa.getProperty(t,"growth"),n=fa.getProperty(t,"renderType")===C.SVG?rf.getSVGElementSize(ma(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):rf.getHTMLElementSize(this);if(e===G.PREFERRED){var r=a?n.width:n.height,s=a?i:o;t.size=r/s*100}})),u.exit().remove(),this.children.filter((function(t){return fa.getProperty(t,"growth")===G.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()}));var l=n.selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));a?l.style("width",(function(t){return t.size/100*i+"px"})).style("height","100%"):l.style("height",(function(t){return t.size/100*o+"px"})).style("width","100%"),l.each((function(e,n){e.components.forEach((function(n){fa.getProperty(e,"growth")===G.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}(Wg),Vy=Array.prototype.slice;function Uy(t){return t}function Gy(t){return"translate("+(t+.5)+",0)"}function Hy(t){return"translate(0,"+(t+.5)+")"}function zy(t){return function(e){return+t(e)}}function jy(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Fy(){return!this.__axis}function Wy(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?Gy:Hy;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,f=null==i?e.tickFormat?e.tickFormat.apply(e,n):Uy:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?jy:zy)(e.copy()),b=h.selection?h.selection():h,_=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(d,e).order(),w=x.exit(),O=x.enter().append("g").attr("class","tick"),E=x.select("line"),T=x.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(O),E=E.merge(O.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),T=T.merge(O.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(_=_.transition(h),x=x.transition(h),E=E.transition(h),T=T.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),O.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),_.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),E.attr(l+"2",u*o),T.attr(l,u*p).text(f),b.filter(Fy).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Vy.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Vy.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Vy.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function qy(t){return Wy(1,t)}function Zy(t){return Wy(2,t)}function Yy(t){return Wy(3,t)}function Xy(t){return Wy(4,t)}var Ky=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",i.renderType=C.SVG,r&&(i.configs=r),i.margins=i.configs.margins,i}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e,n,i=this.configs.position,o=this.getOptions(),a=fa.getProperty(o,"axes",i,"visible"),s=this.getComponentContainer(),u=rf.getSVGElementSize(s,{useAttrs:!0}),l=u.width,c=u.height,h=rf.appendOrSelect(s,"g.axis."+i);i===L.BOTTOM||i===L.TOP?(e=this.configs.axes[L.LEFT]?this.margins.left:0,n=this.configs.axes[L.RIGHT]?l-this.margins.right:l):(e=c-this.margins.bottom,n=this.margins.top);var d,f=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===I.LABELS||this.scaleType===I.LABELS_RATIO?f.rangeRound([e,n]):f.range([e,n]),i){case L.LEFT:d=Xy;break;case L.BOTTOM:d=Yy;break;case L.RIGHT:d=Zy;break;case L.TOP:d=qy}h.attr("aria-label",i+" axis");var p=!h.select("g.ticks").empty(),g=rf.appendOrSelect(h,"g.ticks");p||(g.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),g.attr("aria-label",i+" ticks"));var v=rf.appendOrSelect(h,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),m=fa.getProperty(o,"axes",i),y=this.scaleType===I.TIME||m.scaleType===I.TIME,b=i===L.LEFT||i===L.RIGHT,_=this.model.get("zoomDomain");if(_&&y&&!b&&f.domain(_),a){var x=fa.getProperty(m,"scaleType"),w=fa.getProperty(o,"data","loading"),O=fa.getProperty(m,"ticks","number"),E=fa.getProperty(m,"ticks","values"),T=fa.getProperty(m,"truncation","type"),S=fa.getProperty(m,"truncation","threshold"),M=fa.getProperty(m,"truncation","numCharacter"),C=null!==O,A=fa.getProperty(o,"timeScale"),P=rf.appendOrSelect(v,"g.tick"),D=rf.appendOrSelect(P,"text").text("0"),R=rf.getSVGElementSize(D.node(),{useBBox:!0}).height;P.remove();var N,B=this.scaleType||m.scaleType||I.LINEAR,V=d(f).tickSizeOuter(0);if(f.ticks){var U=void 0;if(C?U=O:(U=at.ticks.number,b&&(U=this.getNumberOfFittingTicks(c,R,at.ticks.verticalSpaceRatio))),1===f.ticks().length&&0===f.ticks()[0]&&(U=0),V.ticks(U),y)if(f.ticks(U).length){var G=fa.getProperty(o,"timeScale","addSpaceOnEdges"),H=fa.getProperty(o,"axes",i,"domain"),z=void 0,j=f.copy();G&&!H&&j.nice(U),z=j.ticks(U),G&&z.length>2&&!H&&(z.splice(z.length-1,1),z.splice(0,1)),V.tickValues(z)}else V.tickValues([])}var F=fa.getProperty(m,"ticks","formatter");if(y){var W=nm(V.tickValues());N=null===F?function(t,e){return tm(t,e,V.tickValues(),W,A)}:function(t,e){var n=tm(t,e,V.tickValues(),W,A);return F(t,e,n)}}else null===F?B===I.LINEAR&&(N=function(t){return t.toLocaleString()}):N=F;V.tickFormat(N);var q,Z=this.services.cartesianScales.getScaleByPosition(i).domain(),Y=Z[0],K=Z[1];if(E){if(y)E.forEach((function(t,e){void 0===t.getTime&&(E[e]=new Date(t))})),q=E.filter((function(t){var e=t.getTime();return e>=new Date(Y).getTime()&&e<=new Date(K).getTime()}));else if(x===I.LABELS){var $=this.services.cartesianScales.getScaleByPosition(i).domain();q=E.filter((function(t){return $.includes(t)}))}else q=E.filter((function(t){return t>=Y&&t<=K}));V.tickValues(q)}switch(i){case L.LEFT:g.attr("transform","translate("+this.margins.left+", 0)");break;case L.BOTTOM:g.attr("transform","translate(0, "+(c-this.margins.bottom)+")");break;case L.RIGHT:g.attr("transform","translate("+(l-this.margins.right)+", 0)");break;case L.TOP:g.attr("transform","translate(0, "+this.margins.top+")")}var J=this.model.isDataEmpty();if(m.title){var tt=rf.appendOrSelect(h,"text.axis-title").html(J||w?"":m.title),et=fa.getProperty(m,"titleOrientation");switch(i){case L.LEFT:et===Q.RIGHT?tt.attr("transform","rotate(90)").attr("y",0).attr("x",f.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):tt.attr("transform","rotate(-90)").attr("y",0).attr("x",-f.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case L.BOTTOM:tt.attr("transform","translate("+(this.margins.left/2+f.range()[1]/2)+", "+(c+4)+")").style("text-anchor","middle");break;case L.RIGHT:et===Q.LEFT?tt.attr("transform","rotate(-90)").attr("y",l).attr("x",-f.range()[0]/2).style("text-anchor","middle"):tt.attr("transform","rotate(90)").attr("y",-l).attr("x",f.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case L.TOP:var nt=rf.getSVGElementSize(tt,{useBBox:!0}).height;tt.attr("transform","translate("+(this.margins.left/2+f.range()[1]/2)+", "+nt/2+")").style("text-anchor","middle")}}if(y){var rt=nm(V.tickValues()),it=A.showDayName,ot=g;t&&(g=g.transition(this.services.transitions.getTransition("axis-update",t))),g=g.call(V),ot.selectAll(".tick").data(V.tickValues(),f).order().select("text").style("font-weight",(function(t,e){return Jv(t,e,V.tickValues(),rt,it)?"bold":"normal"}))}else g=t&&p?g.transition(this.services.transitions.getTransition("axis-update")).call(V):g.call(V);if(v.call(V),i===L.BOTTOM||i===L.TOP){var st=!1,ut=fa.getProperty(m,"ticks","rotation");if(ut===X.ALWAYS)st=!0;else if(ut===X.NEVER)st=!1;else if(!ut||ut===X.AUTO)if(f.step){var lt=v.selectAll("g.tick text").nodes();st=lt.some((function(t){return rf.getSVGElementSize(t,{useBBox:!0}).width>=f.step()}))}else{st=!1;var ct,ht=v.append("text").text("A").node().getBBox().width;v.selectAll("g.tick").each((function(){var t=ma(this),e=parseFloat(fa.getProperty(fa.getTranslationValues(this),"tx"));null!==e&&ct+t.text().length*ht*.8>=e&&(st=!0),ct=e}))}st?(C||(V.ticks(this.getNumberOfFittingTicks(l,R,at.ticks.horizontalSpaceRatio)),v.call(V),g.call(V)),h.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===L.TOP?"start":"end")):h.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(w?h.attr("opacity",0):h.attr("opacity",1),g.selectAll("g.tick").attr("aria-label",(function(t){return t})),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),T!==k.NONE&&x===I.LABELS&&!E){var dt=this.services.cartesianScales.getScaleDomain(i);if(dt.length>0){var ft=s.select("g.axis."+i+" g.ticks g.tick").html();h.selectAll("g.ticks g.tick").html(ft),h.selectAll("g.tick text").data(dt).text((function(t){return t.length>S?fa.truncateLabel(t,T,M):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(dt).text((function(t){return t.length>S?fa.truncateLabel(t,T,M):t})),h.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),h.selectAll("g.tick text").data(dt)}}this.addEventListeners()}else g.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=rf.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=fa.getProperty(r,"axes",e),o=fa.getProperty(i,"scaleType"),a=fa.getProperty(i,"truncation","threshold"),s=(this.scaleType===I.TIME||(i.scaleType,I.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(tt.Axis.LABEL_MOUSEOVER,{element:ma(this),datum:t}),o===I.LABELS&&t.length>a&&s.services.events.dispatchEvent(tt.Tooltip.SHOW,{hoveredElement:ma(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(tt.Axis.LABEL_MOUSEMOVE,{element:ma(this),datum:t}),o===I.LABELS&&t.length>a&&s.services.events.dispatchEvent(tt.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(tt.Axis.LABEL_CLICK,{element:ma(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(tt.Axis.LABEL_MOUSEOUT,{element:ma(this),datum:t}),o===I.LABELS&&s.services.events.dispatchEvent(tt.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 fa.clamp(r,2,at.ticks.number)},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;rf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Wg),$y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.renderType=C.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(L),i=fa.getProperty(this.getOptions(),"axes");r.forEach((function(t){i[L[t]]&&(n[L[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=L[t];if(e.configs.axes[n]&&!e.children[n]){var r=new Ky(e.model,e.services,{position:n,axes:e.configs.axes,margins:e.margins});r.setModel(e.model),r.setServices(e.services),r.setParent(e.parent),e.children[n]=r}})),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=rf.getSVGElementSize(a,{useBBox:!0}),u=s.width,l=s.height;switch(r.getTitleRef().empty()?n=0:(n=rf.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i!==L.LEFT&&i!==L.RIGHT||(n+=5)),i){case L.TOP:o.top=l+n;break;case L.BOTTOM:o.bottom=l+n;break;case L.LEFT:o.left=u+n;break;case L.RIGHT:o.right=u+n}})),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(tt.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Wg);function Qy(){ia.preventDefault(),ia.stopImmediatePropagation()}function Jy(t){var e=t.document.documentElement,n=ma(t).on("dragstart.drag",Qy,!0);"onselectstart"in e?n.on("selectstart.drag",Qy,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function tb(t,e){var n=t.document.documentElement,r=ma(t).on("dragstart.drag",null);e&&(r.on("click.drag",Qy,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function eb(t){return function(){return t}}function nb(t,e,n){this.target=t,this.type=e,this.selection=n}function rb(){ia.stopImmediatePropagation()}function ib(){ia.preventDefault(),ia.stopImmediatePropagation()}var ob={name:"drag"},ab={name:"space"},sb={name:"handle"},ub={name:"center"};function lb(t){return[+t[0],+t[1]]}function cb(t){return[lb(t[0]),lb(t[1])]}function hb(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=ya().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return ba(t,r);return null}(e,ia.touches,t)}}var db={name:"x",handles:["w","e"].map(bb),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]]}},fb={name:"y",handles:["n","s"].map(bb),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]]}},pb={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"},gb={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},vb={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mb={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},yb={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function bb(t){return{type:t}}function _b(){return!ia.ctrlKey&&!ia.button}function xb(){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 wb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ob(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Eb(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Tb(){return function(t){var e,n=xb,r=_b,i=wb,o=!0,a=uf("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([bb("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pb.overlay).merge(n).each((function(){var t=Ob(this).extent;ma(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([bb("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pb.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 pb[t.type]})),e.each(l).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 l(){var t=ma(this),e=Ob(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){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function d(){if((!e||ia.touches)&&r.apply(this,arguments)){var n,i,a,s,u,h,d,f,p,g,v,m=this,y=ia.target.__data__.type,b="selection"===(o&&ia.metaKey?y="overlay":y)?ob:o&&ia.altKey?ub:sb,_=t===fb?null:mb[y],x=t===db?null:yb[y],w=Ob(m),O=w.extent,E=w.selection,T=O[0][0],S=O[0][1],M=O[1][0],C=O[1][1],A=0,P=0,L=_&&x&&o&&ia.shiftKey,D=ia.touches?hb(ia.changedTouches[0].identifier):_a,k=D(m),R=k,I=c(m,arguments,!0).beforestart();"overlay"===y?(E&&(p=!0),w.selection=E=[[n=t===fb?T:k[0],a=t===db?S:k[1]],[u=t===fb?M:n,d=t===db?C:a]]):(n=E[0][0],a=E[0][1],u=E[1][0],d=E[1][1]),i=n,s=a,h=u,f=d;var N=ma(m).attr("pointer-events","none"),B=N.selectAll(".overlay").attr("cursor",pb[y]);if(ia.touches)I.moved=U,I.ended=H;else{var V=ma(ia.view).on("mousemove.brush",U,!0).on("mouseup.brush",H,!0);o&&V.on("keydown.brush",z,!0).on("keyup.brush",j,!0),Jy(ia.view)}rb(),Vf(m),l.call(m),I.start()}function U(){var t=D(m);!L||g||v||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?v=!0:g=!0),R=t,p=!0,ib(),G()}function G(){var t;switch(A=R[0]-k[0],P=R[1]-k[1],b){case ab:case ob:_&&(A=Math.max(T-n,Math.min(M-u,A)),i=n+A,h=u+A),x&&(P=Math.max(S-a,Math.min(C-d,P)),s=a+P,f=d+P);break;case sb:_<0?(A=Math.max(T-n,Math.min(M-n,A)),i=n+A,h=u):_>0&&(A=Math.max(T-u,Math.min(M-u,A)),i=n,h=u+A),x<0?(P=Math.max(S-a,Math.min(C-a,P)),s=a+P,f=d):x>0&&(P=Math.max(S-d,Math.min(C-d,P)),s=a,f=d+P);break;case ub:_&&(i=Math.max(T,Math.min(M,n-A*_)),h=Math.max(T,Math.min(M,u+A*_))),x&&(s=Math.max(S,Math.min(C,a-P*x)),f=Math.max(S,Math.min(C,d+P*x)))}h<i&&(_*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in gb&&B.attr("cursor",pb[y=gb[y]])),f<s&&(x*=-1,t=a,a=d,d=t,t=s,s=f,f=t,y in vb&&B.attr("cursor",pb[y=vb[y]])),w.selection&&(E=w.selection),g&&(i=E[0][0],h=E[1][0]),v&&(s=E[0][1],f=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===f||(w.selection=[[i,s],[h,f]],l.call(m),I.brush())}function H(){if(rb(),ia.touches){if(ia.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else tb(ia.view,p),V.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),B.attr("cursor",pb.overlay),w.selection&&(E=w.selection),Eb(E)&&(w.selection=null,l.call(m)),I.end()}function z(){switch(ia.keyCode){case 16:L=_&&x;break;case 18:b===sb&&(_&&(u=h-A*_,n=i+A*_),x&&(d=f-P*x,a=s+P*x),b=ub,G());break;case 32:b!==sb&&b!==ub||(_<0?u=h-A:_>0&&(n=i-A),x<0?d=f-P:x>0&&(a=s-P),b=ab,B.attr("cursor",pb.selection),G());break;default:return}ib()}function j(){switch(ia.keyCode){case 16:L&&(g=v=L=!1,G());break;case 18:b===ub&&(_<0?u=h:_>0&&(n=i),x<0?d=f:x>0&&(a=s),b=sb,G());break;case 32:b===ab&&(ia.altKey?(_&&(u=h-A*_,n=i+A*_),x&&(d=f-P*x,a=s+P*x),b=ub):(_<0?u=h:_>0&&(n=i),x<0?d=f:x>0&&(a=s),b=sb),B.attr("cursor",pb[y]),G());break;default:return}ib()}}function f(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=cb(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){c(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){c(this,arguments).end()})).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=xu(o,a);function u(t){r.selection=1===t&&null===a?null:s(t),l.call(e),i.brush()}return null!==o&&null!==a?u:u(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,o=t.input("function"==typeof n?n.apply(e,r):n,i.extent),a=c(e,r).beforestart();Vf(e),i.selection=null===o?null:o,l.call(e),a.start().brush().end()}))},u.clear=function(t){u.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){!function(t,e,n,r){var i=ia;t.sourceEvent=ia,ia=t;try{e.apply(n,r)}finally{ia=i}}(new nb(u,e,t.output(this.state.selection)),a.apply,a,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:eb(cb(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:eb(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:eb(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(o=!!t,u):o},u.on=function(){var t=a.on.apply(a,arguments);return t===a?u:t},u}(db)}var Sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",e.renderType=C.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=rf.appendOrSelect(r,"svg.chart-grid-backdrop"),a=rf.appendOrSelect(o,"g."+this.type),s=rf.appendOrSelect(a,this.selectionSelector),u=rf.getSVGElementSize(o,{useAttrs:!0}),l=u.width,c=u.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=rf.appendOrSelect(i,this.frontSelectionSelector);if(f&&d===I.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=th().range([0,l]).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=Tb().extent([[0,0],[l-1,c]]).on("start brush end",(function(){var t=ia.selection;null!==t&&t[0]!==t[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)}(t))})).on("end.brushed",(function(){var t=ia.selection;null!==t&&(y(t[0],t[1]),a.call(b.move,null),v.style("display","none"))}));a.call(b);var _=this.services.zoom.getZoomRatio();o.on("click",(function(){if(ia.shiftKey){var t=_a(a.node())[0],e=t-l*_/2;e<0&&(e=0);var n=t+l*_/2;n>l&&(n=l),y(e,n)}}))}},e.DASH_LENGTH=4,e}(Wg),Mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=fa.getProperty(this.getOptions(),"grid","x","enabled"),n=fa.getProperty(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(rf.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(rf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=Yy(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(fa.getProperty(this.getOptions(),"grid","x","alignWithAxisTicks")){var i=this.services.cartesianScales.getDomainAxisPosition(),o=fa.getProperty(this.getOptions(),"axes",i,"ticks","values");o&&r.tickValues(o)}else{var a=fa.getProperty(this.getOptions(),"grid","x","numberOfTicks");r.ticks(a)}var s=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var u=this.services.transitions.getTransition("grid-update");s.transition(u).call(r)}else s.call(r);this.cleanGrid(s)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=Xy(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(fa.getProperty(this.getOptions(),"grid","y","alignWithAxisTicks")){var i=this.services.cartesianScales.getRangeAxisPosition(),o=fa.getProperty(this.getOptions(),"axes",i,"ticks","values");o&&r.tickValues(o)}else{var a=fa.getProperty(this.getOptions(),"grid","y","numberOfTicks");r.ticks(a)}var s=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var u=this.services.transitions.getTransition("grid-update");s.transition(u).call(r)}else s.call(r);this.cleanGrid(s)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(fa.getTranslationValues(t).tx)-Number(fa.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+fa.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=+fa.getTranslationValues(s).tx-+fa.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=rf.getSVGElementSize(u).width-+fa.getTranslationValues(a).tx}else o=+fa.getTranslationValues(s).tx;return o*this.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=fa.getProperty(this.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=fa.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],u=i.range(),l=u[0],c=u[1];this.backdrop=rf.appendOrSelect(n,"svg.chart-grid-backdrop");var h=rf.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(l-c)).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){t.selectAll("text").remove(),t.select(".domain").remove()},e}(Wg);var Cb,Ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.renderType=C.SVG,e.isXGridEnabled=fa.getProperty(e.getOptions(),"grid","x","enabled"),e.isYGridEnabled=fa.getProperty(e.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=fa.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){var e=this,n=t[0],r=t[1],i=this.parent,o=this.services.cartesianScales.getOrientation(),a=o===R.HORIZONTAL?r:n,s=rf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=rf.appendOrSelect(s,"line.ruler-line"),l=i.selectAll("[role=graphics-symbol]"),c=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),d=h[0],f=h[1],p=c.map((function(t){return{domainValue:e.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,a)}));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(tt.Tooltip.MOVE,{mousePosition:[n,r]});this.pointsWithinLine=p;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(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(g.length>0){var v=g.map((function(t){return t.originalData})).filter((function(t){var n=t[e.services.cartesianScales.getRangeIdentifier(t)];return null!=n})),m=g.map((function(t){return t.domainValue})),y=l.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return m.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!fa.isEqual(this.elementsToHighlight,y)&&this.hideRuler(),y.dispatch("mouseover"),this.elementsToHighlight=y,this.services.events.dispatchEvent(tt.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(v)}),s.attr("opacity",1);var b=g[0];"horizontal"===o?u.attr("x1",f).attr("x2",d).attr("y1",b.domainValue).attr("y2",b.domainValue):u.attr("y1",f).attr("y2",d).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=rf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(tt.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.model.getDisplayData(),n=function(){var e=_a(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=fa.debounceWithD3MousePosition((function(){var e=this.mousePosition;t.showRuler(e)}),r,this.parent.node())}this.backdrop.on("mousemove mouseover",n).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=(r[0],r[1],n.range());i[0],i[1];this.backdrop=rf.appendOrSelect(t,"svg.chart-grid-backdrop");rf.appendOrSelect(this.backdrop,this.isXGridEnabled||this.isYGridEnabled?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop")},e}(Wg),Pb=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}(Ab),Lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.renderType=C.HTML,e}return n(e,t),e.prototype.init=function(){var t=this,e=function(){return t.updateOverflowMenu(!1)};this.services.events.addEventListener(tt.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(tt.Toolbar.HIDE_OVERFLOW_MENU,(function(){document.body.removeEventListener("click",e)}))},e.prototype.render=function(t){var e=this.getComponentContainer();this.overflowMenu||(this.overflowMenu=e.append("div").attr("class","bx--overflow-menu-options bx--overflow-menu--flip").attr("tabindex",-1).attr("role","menu").html("<ul></ul>"));var n=this.getControlConfigs(),r=n.buttonList;n.overflowMenuItemList&&r.push(this.getOverflowButtonConfig());var i=e.selectAll("div.toolbar-control").data(r,(function(t){return t.id}));i.exit().remove();i.enter().append("div").attr("class","toolbar-control bx--overflow-menu").merge(i).classed("disabled",(function(t){return!!t.shouldBeDisabled&&t.shouldBeDisabled()})).html((function(t){return'\n\t\t\t<button\n\t\t\t\tclass="bx--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="'+t.id+'">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" style="will-change: transform; width: '+(void 0!==t.iconWidth?t.iconWidth:"20px")+"; height: "+(void 0!==t.iconWidth?t.iconHeight:"20px")+'" xmlns="http://www.w3.org/2000/svg" class="bx--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t'+t.iconSVGContent+"\n\t\t\t\t</svg>\n\t\t\t</button>"})).each((function(t){ma(this).select("button").on("click",t.clickFunction).on("keyup",(function(){(ia.key&&"Enter"===ia.key||" "===ia.key)&&(ia.preventDefault(),t.clickFunction())}))}));this.overflowButton=this.getComponentContainer().select("button.bx--overflow-menu__trigger#toolbar-overflow-menu")},e.prototype.renderOverflowMenu=function(){var t=this.getControlConfigs().overflowMenuItemList,e=this.overflowMenu.select("ul").selectAll("li.bx--overflow-menu-options__option").data(t,(function(t){return fa.getProperty(t,"id")}));e.exit().remove();var n=e.enter().append("li").attr("id",(function(t){return t.id})).attr("class","bx--overflow-menu-options__option");n.append("button").attr("class","bx--overflow-menu-options__btn").attr("role","menuitem"),n.merge(e).classed("bx--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.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),ma(this.overflowButton.node().parentNode).classed("bx--overflow-menu--open",t)),t?this.services.events.dispatchEvent(tt.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(tt.Toolbar.HIDE_OVERFLOW_MENU)},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=ma("#"+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=ma("#"+e[n].id+" button").node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var t=this;this.getOverflowMenuItems().forEach((function(e,n){var r=ma("#"+e.id);null!==r&&(r.on("click",(function(){e.clickFunction(),t.updateOverflowMenu(!1)})),r.on("keyup",(function(){"Enter"===ia.key?e.clickFunction():"ArrowUp"===ia.key?t.focusOnPreviousEnabledMenuItem(n):"ArrowDown"===ia.key&&t.focusOnNextEnabledMenuItem(n)})))})),t.focusOnNextEnabledMenuItem(-1)}ia.stopImmediatePropagation()},e.prototype.getControlConfigs=function(){var t=this,e=fa.getProperty(this.getOptions(),"toolbar","numberOfIcons"),n=fa.getProperty(this.getOptions(),"toolbar","controls"),r=[],i=[];return n.forEach((function(e){var n=t.getControlConfigByType(e.type);n&&(n.text=e.text?e.text:e.type,-1!==n.id.indexOf("toolbar-export")?i.push(n):r.push(n))})),r.length<=e&&0===i.length?{buttonList:r}:{buttonList:r.splice(0,e-1),overflowMenuItemList:r.concat(i)}},e.prototype.getOverflowMenuItems=function(){var t=this.getControlConfigs().overflowMenuItemList;return t||[]},e.prototype.getOverflowButtonConfig=function(){var t=this;return{id:"toolbar-overflow-menu",shouldBeDisabled:function(){return!1},iconSVGContent:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="24" r="2"></circle>',clickFunction:function(){return t.toggleOverflowMenu()}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState();switch(t){case $.ZOOM_IN:r&&(e={id:"toolbar-zoomIn",shouldBeDisabled:function(){return n.services.zoom.isMinZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomIn()}});break;case $.ZOOM_OUT:r&&(e={id:"toolbar-zoomOut",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomOut()}});break;case $.RESET_ZOOM:r&&(e={id:"toolbar-resetZoom",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.resetZoomDomain()}});break;case $.MAKE_FULLSCREEN:e={id:"toolbar-makefullscreen",iconSVGContent:this.getControlIconByType(t),iconWidth:"15px",iconHight:"15px",shouldBeDisabled:function(){return!1},clickFunction:function(){n.services.domUtils.toggleFullscreen()}};break;case $.SHOW_AS_DATATABLE:e={id:"toolbar-showasdatatable",iconSVGContent:this.getControlIconByType(t),shouldBeDisabled:!1,clickFunction:function(){return n.services.events.dispatchEvent(tt.Modal.SHOW)}};break;case $.EXPORT_CSV:e={id:"toolbar-export-CSV",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.model.exportToCSV()}};break;case $.EXPORT_PNG:e={id:"toolbar-export-PNG",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.domUtils.exportToPNG()}};break;case $.EXPORT_JPG:e={id:"toolbar-export-JPG",shouldBeDisabled:function(){return!1},iconSVGContent: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 $.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 $.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 $.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 $.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 $.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 $.EXPORT_CSV:case $.EXPORT_JPG:case $.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}(Wg),Db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(e),r=n.domain(),i=r[0],o=r[1],a=i>0&&o<0||i<0&&o>0,s=this.getComponentContainer();if(a){var u=this.services.cartesianScales.getDomainScale().range(),l=u[0],c=u[1],h=+n(0)+.5;h||(h=n.range()[0]);var d=fa.flipSVGCoordinatesBasedOnOrientation({x0:l,x1:c,y0:h,y1:h},this.services.cartesianScales.getOrientation());rf.appendOrSelect(s,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",d.y0).attr("y2",d.y1).attr("x1",d.x0).attr("x2",d.x1)}else s.selectAll("line.domain").remove()},e}(Wg),kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.renderType=C.SVG,e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=Tb(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(tt.ZoomBar.UPDATE,this.render.bind(this));var t=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),r=this.services.zoom.isZoomBarLoading(L.TOP),i=this.services.zoom.isZoomBarLocked(L.TOP),o=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),a=bt.height[o],s=rf.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(0!==s){var u=0,l=this.model.get("axesMargins");l&&l.left&&(u=l.left);var c=rf.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",a).attr("opacity",1);rf.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",a).attr("width","100%").attr("height",bt.spacerHeight).attr("opacity",1).attr("fill","none");if(o===D.GRAPH_VIEW?rf.appendOrSelect(c,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",s-u).attr("height","100%").classed("zoom-bg-skeleton",r):o===D.SLIDER_VIEW&&rf.appendOrSelect(c,"rect.zoom-slider-bg").attr("x",u).attr("y",a/2-1).attr("width",s-u).attr("height",2).classed("zoom-slider-bg-skeleton",r),r)this.renderSkeleton(c,u,s);else{var h=this.services.cartesianScales,d=h.getMainXScale(),f=h.getMainYScale(),p=h.getMainXScaleType();if(d&&p===I.TIME){var g=this.services.zoom.getZoomBarData();if(fa.isEmpty(g))return;this.xScale=d.copy(),this.yScale=f.copy();var v=this.services.zoom.getDefaultZoomBarDomain(g);g=this.compensateDataForDefaultDomain(g,v);var m=this.model.get("initialZoomDomain"),y=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"initialZoomDomain");y&&y[0]&&y[1]&&(y[0]=new Date(y[0]),y[1]=new Date(y[1])),!y||m&&m[0].valueOf()===y[0].valueOf()&&m[1].valueOf()===y[1].valueOf()?null===y&&null!=m&&this.model.set({initialZoomDomain:null,zoomDomain:fa.merge([],v)},{skipUpdate:!0}):this.model.set({initialZoomDomain:fa.merge([],y),zoomDomain:y?fa.merge([],y):v},{skipUpdate:!0}),this.xScale.range([u,s]).domain(v),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,a-6]).domain(ps(g,(function(t){return t.value})));var b=this.model.get("zoomDomain");o===D.GRAPH_VIEW&&(this.renderZoomBarArea(c,"path.zoom-graph-area-unselected",g,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(c,"path.zoom-graph-area",g,this.clipId),this.renderZoomBarBaseline(c,u,s)),this.addBrushEventListener(b,u,s);var _=rf.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===b);else if(b[0].valueOf()===b[1].valueOf())_.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range(),this.xScale.domain());else{var x=b.map((function(t){return e.xScale(t)}));x[1]-x[0]<this.MIN_SELECTION_DIFF||(_.call(this.brush.move,x),this.updateBrushHandle(this.getComponentContainer(),x,b))}i&&(this.brush.filter((function(){return!1})),_.selectAll("rect").attr("cursor","auto"))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),o=bt.height[i];this.brush.extent([[e,0],[n,o]]).on("start brush end",null).on("start brush end",(function(){var e=ia.selection;null===e?r.handleBrushedEvent(t,r.xScale,r.xScale.range()):e[0]===e[1]||r.handleBrushedEvent(t,r.xScale,e)}))},e.prototype.handleBrushedEvent=function(t,e,n){var r=[e.invert(n[0]),e.invert(n[1])];if(this.updateBrushHandle(this.getComponentContainer(),n,r),null!=ia.sourceEvent&&("mousemove"===ia.sourceEvent.type||"mouseup"===ia.sourceEvent.type||"mousedown"===ia.sourceEvent.type||"touchstart"===ia.sourceEvent.type||"touchmove"===ia.sourceEvent.type||"touchend"===ia.sourceEvent.type)){void 0!==t&&t[0]===r[0]&&t[1]===r[1]||this.services.zoom.handleDomainChange(r,{dispatchEvent:!1});var i=void 0;"start"===ia.type?i=tt.ZoomBar.SELECTION_START:"brush"===ia.type?i=tt.ZoomBar.SELECTION_IN_PROGRESS:"end"===ia.type&&(i=tt.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(tt.ZoomDomain.CHANGE,{newDomain:r})),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=bt.handleWidth,o=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),a=bt.height[o],s=-i/2,u=bt.handleBarWidth,l=o===D.GRAPH_VIEW?bt.handleBarHeight:6,c=-u/2,h=(a-l)/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",u).attr("height",l).attr("cursor","ew-resize"),o===D.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=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),n=bt.height[e],r=(rf.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getComponentContainer().select("svg.zoom-container");rf.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(),u=i.getMainYScaleType(),l=function(t,e,n){return function(r,o){return i.getValueFromScale(t,e,n,r,o)}},c=l(this.xScale,s,o),h=l(this.yScale,u,a),d=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type"),f=bt.height[d],p=Dh().x((function(t,e){return c(t,e)})).y0(f).y1((function(t,e){return f-h(t,e)})),g=rf.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=rf.appendOrSelect(t,"clipPath").attr("id",e);rf.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=fa.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=fa.getProperty(this.model.getOptions(),"zoomBar",L.TOP,"type"),o=bt.height[i],a=Lh()([[e,o],[n,o]]);rf.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",a).classed("zoom-bg-baseline-skeleton",r)},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),rf.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"type")===D.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(tt.ZoomBar.UPDATE,this.render.bind(this))},e}(Wg),Rb=function(){function t(t,e){this.services={domUtils:rf,files:af,events:of,gradientUtils:bp,transitions:yp,canvasZoom:Fg},this.model=new Ld(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(tt.Model.UPDATE,(function(t){var e=!!fa.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(tt.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(tt.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){void 0===e&&(e=C.SVG);var n={id:"title",components:[new sm(this.model,this.services)],growth:G.PREFERRED},r={id:"legend",components:[new qg(this.model,this.services)],growth:G.PREFERRED},i=fa.getProperty(this.model.getOptions(),"canvasZoom","enabled");i&&!0===i&&t.push(new dm(this.model,this.services));var o={id:"graph-frame",components:t,growth:G.STRETCH,renderType:e},a=!1!==this.model.getOptions().legend.enabled,s=U.COLUMN;if(a){var u=fa.getProperty(this.model.getOptions(),"legend","position");"left"===u?(s=U.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):"right"===u?(s=U.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):"bottom"===u&&(s=U.COLUMN_REVERSE)}var l={id:"spacer",components:[new Ny(this.model,this.services)],growth:G.PREFERRED},c={id:"full-frame",components:[new By(this.model,this.services,M(a?[r]:[],a?[l]:[],[o]),{direction:s})],growth:G.STRETCH},h=[];if(this.model.getOptions().title){h.push(n);var d={id:"spacer",components:[new Ny(this.model,this.services)],growth:G.PREFERRED};h.push(d)}return h.push(c),[new lm(this.model,this.services),new Yv(this.model,this.services),new By(this.model,this.services,h,{direction:U.COLUMN})]},t}(),Ib=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.exportToCSV=function(){var t,e=this.getDisplayData(),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales,i=r.getDomainIdentifier(),o=r.getRangeIdentifier();r.getDomainAxisScaleType()===I.TIME&&(t=function(t){return kg(t,"MMM d, yyyy")});var a=[["Group",r.getDomainLabel(),r.getRangeLabel()]];a=a.concat(e.map((function(e){return['"'+e[n]+'"','"'+(null===e[i]?"–":t?t(e[i]):e[i])+'"','"'+(null===e[o]?"–":e[o].toLocaleString())+'"']})));var s="",u="";a.forEach((function(t,e){u=t.join(","),s+=e<a.length?u+"\n":u})),this.services.files.downloadCSV(s,"myChart.csv")},e.prototype.setData=function(e){var n;if(e&&(n=t.prototype.setData.call(this,e),fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"enabled"))){var r=fa.getProperty(this.getOptions(),"zoomBar",L.TOP,"data");this.setZoomBarData(r)}return n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(fa.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=fa.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(L).forEach((function(t){var r=L[t],i=e.axes[r];if(i&&i.scaleType===I.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===fa.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}(Ld),Nb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Hg,curves:zg,zoom:jg}),r.model=new Ib(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=fa.getProperty(n,"zoomBar",L.TOP,"enabled"),i=fa.getProperty(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var o=this.services.cartesianScales.getMainXAxisPosition(),a=fa.getProperty(n,"axes",o,"scaleType"),s=r&&o===L.BOTTOM&&a===I.TIME,u=this.services.zoom.isZoomBarLocked(L.TOP),l=!!this.model.getOptions().title,c={id:"title",components:[new sm(this.model,this.services)],growth:G.STRETCH},h={id:"toolbar",components:[new Lb(this.model,this.services)],growth:G.PREFERRED},d={id:"header",components:[new By(this.model,this.services,M([c],i?[h]:[]),{direction:U.ROW,alignItems:H.CENTER})],growth:G.PREFERRED},f={id:"legend",components:[new qg(this.model,this.services)],growth:G.PREFERRED};s&&!u&&t.push(new hm(this.model,this.services),new Sb(this.model,this.services)),t.push(new am(this.model,this.services));var p={id:"graph-frame",components:t,growth:G.STRETCH,renderType:C.SVG},g=!1!==fa.getProperty(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,v=U.COLUMN;if(g){var m=fa.getProperty(this.model.getOptions(),"legend","position");m===N.LEFT?(v=U.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):m===N.RIGHT?(v=U.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):m===N.BOTTOM&&(v=U.COLUMN_REVERSE)}var y={id:"spacer",components:[new Ny(this.model,this.services)],growth:G.PREFERRED},b={id:"full-frame",components:[new By(this.model,this.services,M(g?[f]:[],g?[y]:[],[p]),{direction:v})],growth:G.STRETCH},_={id:"zoom-bar",components:[new kb(this.model,this.services)],growth:G.PREFERRED,renderType:C.SVG},x=[];if(l||i){x.push(d);var w={id:"spacer",components:[new Ny(this.model,this.services,i?{size:15}:void 0)],growth:G.PREFERRED};x.push(w)}return s&&x.push(_),x.push(b),[new cm(this.model,this.services),new Yv(this.model,this.services),new By(this.model,this.services,x,{direction:U.COLUMN})]},e}(Rb),Bb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(fa.clone(is.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new Om(this.model,this.services),new fm(this.model,this.services),new _m(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Vb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Pb(this.model,this.services),new pm(this.model,this.services),new Om(this.model,this.services,{stacked:!0}),new Tm(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Ub=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new vm(this.model,this.services),new Db(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Nb),Gb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new mm(this.model,this.services),new Db(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Nb),Hb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Pb(this.model,this.services),new ym(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Nb),zb=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getBoxQuartiles=function(t){return{q_25:ws(t,.25),q_50:ws(t,.5),q_75:ws(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(cs),u=((o={})[t]=e,o.counts=s,o.quartiles=i.getBoxQuartiles(s),o.outliers=null,o.whiskers=null,o),l=u.quartiles.q_25,c=u.quartiles.q_75,h=1.5*(c-l),d=l-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)}u.outliers=p;var b=Es(g),_=Os(g);u.whiskers={min:b||Es([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75]),max:_||Os([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75])},n.push(u)},i=this,o=0,a=e;o<a.length;o++){var s=a[o];r(s.name,s.data)}return n},e.prototype.setColorClassNames=function(){var t=fa.getProperty(this.getOptions(),"color","pairing"),e=fa.getProperty(t,"option");e=e<=lt.pairingOptions["1-color"]?e:1;var n=this.allDataGroups.map((function(t,n){return"1-"+e+"-1"}));this.colorClassNames=Ls().range(n).domain(this.allDataGroups)},e}(Ib),jb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new zb(r.services),r.model.setOptions(fa.mergeDefaultChartOptions(is.boxplotChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new bm(this.model,this.services),new Db(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})},e}(Nb),Fb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new xm(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Wb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.bulletChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new wm(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),qb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new Om(this.model,this.services),new _m(this.model,this.services,{handleThresholds:!0}),new Lm(this.model,this.services)];return this.getAxisChartComponents(t)},e}(Nb),Zb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.lollipopChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new Em(this.model,this.services),new _m(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Yb=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services),new Mb(this.model,this.services),new Ab(this.model,this.services),new _m(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})];return this.getAxisChartComponents(t)},e}(Nb),Xb=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.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}(Ld),Kb=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new Xb(i.services),r?i:(i.model.setOptions(fa.mergeDefaultChartOptions(is.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 Pm(this.model,this.services,{skeleton:j.PIE})];return this.getChartComponents(t)},e}(Rb),$b=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Am(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.DONUT})];return this.getChartComponents(t)},e}(Kb),Qb=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.generateDataLabels=function(t){var e={};return e[t.label]=ht.items.status.ACTIVE,e},e.prototype.getDisplayData=function(){return this.get("data")?this.get("data")[0]:null},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=fa.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=this.getDisplayData().value,n=e>100?100:e,r=fa.getProperty(t,"meter","status","ranges");if(r){var i=r.filter((function(t){return t.range[0]<=n&&n<=t.range[1]}));if(i.length>0)return i[0].status}return null},e}(Ld),Jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e.renderType=C.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getComponentContainer(),o=this.getOptions(),a=this.model.getDisplayData(),s=this.model.getStatus(),u=rf.getSVGElementSize(i,{useAttrs:!0}).width,l=o.data.groupMapsTo,c=al().domain([0,100]).range([0,u]);rf.appendOrSelect(i,"rect.container").attr("x",0).attr("y",0).attr("width",u).attr("height",fa.getProperty(o,"meter","height"));var h=a.value>=100,d=i.selectAll("rect.value").data([a]),f=null==s||n.model.isUserProvidedColorScaleValid()?"value":"value status--"+s;d.enter().append("rect").classed("value",!0).merge(d).attr("x",0).attr("y",0).attr("height",fa.getProperty(o,"meter","height")).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[P.FILL],dataGroupName:t[l],originalClassName:f})})).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(h?100:t.value)})).style("fill",(function(t){return n.model.getFillColor(t[l])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var p=fa.getProperty(o,"meter","peak"),g=null!==p&&p<a.value?a.value:p,v=null===g||h?[]:[g],m=i.selectAll("line.peak").data(v);m.enter().append("line").classed("peak",!0).merge(m).attr("y1",0).attr("y2",fa.getProperty(o,"meter","height")).transition(this.services.transitions.getTransition("peak-line-update",t)).attr("x1",(function(t){return c(t)})).attr("x2",(function(t){return c(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),m.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(Wg),t_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new Qb(r.services),r.model.setOptions(fa.merge(fa.clone(is.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new Jb(this.model,this.services)],growth:G.STRETCH,renderType:C.SVG},e={id:"meter-title",components:[new um(this.model,this.services)],growth:G.PREFERRED,renderType:C.SVG},n={id:"spacer",components:[new Ny(this.model,this.services,{size:8})],growth:G.PREFERRED},r=[new By(this.model,this.services,[e,n,t],{direction:U.COLUMN})];return this.getChartComponents(r,C.HTML)},e}(Rb),e_=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return r?i:(i.model.setOptions(fa.mergeDefaultChartOptions(is.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new my(this.model,this.services)];return this.getChartComponents(t)},e}(Rb),n_=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}(Ld),r_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new n_(r.services),r.model.setOptions(fa.mergeDefaultChartOptions(is.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Cm(this.model,this.services)];return this.getChartComponents(t)},e}(Rb),i_=((Cb={})[K.LINE]=[Om,_m],Cb[K.SCATTER]=[_m],Cb[K.AREA]=[fm,Om,_m],Cb[K.STACKED_AREA]=[pm,Om,Tm,Pb],Cb[K.SIMPLE_BAR]=[vm],Cb[K.GROUPED_BAR]=[mm,Db],Cb[K.STACKED_BAR]=[ym,Pb],Cb),o_=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=fa.mergeDefaultChartOptions(is.comboChart,n.options);return n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:K.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(i_).includes(e.type)?(r=fa.merge({},is[fa.camelCase(e.type)+"Chart"],t.model.getOptions(),e.options),e.type===K.STACKED_AREA&&(i=!0),i_[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=fa.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 fa.flatten(r)},e.prototype.getComponents=function(){var t=this.model.getOptions().comboChartTypes.some((function(t){return t.type===K.STACKED_BAR||t.type===K.STACKED_AREA})),e=M([new $y(this.model,this.services),new Mb(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.GRID})],t?[]:[new Ab(this.model,this.services)],this.getGraphComponents());return this.getAxisChartComponents(e)},e}(Nb),a_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dy(this.model,this.services)];return this.getChartComponents(t)},e}(Rb),s_=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=fa.merge({},t,this.getZoomOptions(t));fa.updateLegendAdditionalItems(e,n);var r=this.getHierarchyLevel(),i=fa.getProperty(e,"circlePack","hierarchyLevel");this.set({options:fa.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&&fa.getProperty(e,0,"children")?fa.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===fa.getProperty(n,"canvasZoom","enabled")&&i>2?{legend:{additionalItems:[{type:J.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?S(S({},t),{dataGroupName:e,children:t.children.map((function(t,r){return n.setChildrenDataGroup(t,e)}))}):S(S({},t),{dataGroupName:e})},e}(Ld),u_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new s_(r.services),r.model.setOptions(fa.mergeDefaultChartOptions(is.circlePackChart,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)},e}(Rb),l_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fa.mergeDefaultChartOptions(is.wordCloudChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iy(this.model,this.services),new Pm(this.model,this.services,{skeleton:j.PIE})];return this.getChartComponents(t)},e}(Rb);t.AreaChart=Bb,t.BoxplotChart=jb,t.BubbleChart=Fb,t.BulletChart=Wb,t.CirclePackChart=u_,t.ComboChart=o_,t.DonutChart=$b,t.GaugeChart=r_,t.GroupedBarChart=Gb,t.LineChart=qb,t.LollipopChart=Zb,t.MeterChart=t_,t.PieChart=Kb,t.RadarChart=e_,t.ScatterChart=Yb,t.SimpleBarChart=Ub,t.StackedAreaChart=Vb,t.StackedBarChart=Hb,t.TreemapChart=a_,t.WordCloudChart=l_,t.configurations=os,t.interfaces=nt,Object.defineProperty(t,"__esModule",{value:!0})}));