/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/@rocketsoftware/charts@1.3.0/bundle.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Charts={})}(this,(function(t){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0

    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.

    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */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,a,o,s,u,l,c,h,d,f,p,g,v,m,y,b,_,x,O,w=function(){return(w=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 E(){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 a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];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.UPDATE="model-update"}(a||(a={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu"}(o||(o={})),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"}(s||(s={})),function(t){t.CHANGE="zoom-domain-change"}(u||(u={})),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"}(l||(l={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(c||(c={})),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"}(h||(h={})),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"}(d||(d={})),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"}(f||(f={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(p||(p={})),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"}(g||(g={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(v||(v={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout",t.LINE_MOUSEOVER="line-mouseover",t.LINE_MOUSEMOVE="line-mousemove",t.LINE_CLICK="line-click",t.LINE_MOUSEOUT="line-mouseout"}(m||(m={})),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"}(y||(y={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(b||(b={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(_||(_={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(x||(x={})),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"}(O||(O={}));var S,T,M,A,C,P,D,L,k,R,I,N,V,B,G,U,z,H,F,j,W,q,Y,X,Z=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return a},get Toolbar(){return o},get ZoomBar(){return s},get ZoomDomain(){return u},get Axis(){return l},get Area(){return c},get WordCloud(){return h},get Pie(){return d},get Gauge(){return f},get Bar(){return p},get Boxplot(){return g},get Scatter(){return v},get Line(){return m},get Radar(){return y},get Treemap(){return b},get Tooltip(){return _},get Threshold(){return x},get Legend(){return O}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(S||(S={})),function(t){t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(T||(T={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(M||(M={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(A||(A={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(C||(C={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(P||(P={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio"}(D||(D={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(L||(L={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(k||(k={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(R||(R={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(I||(I={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(N||(N={})),function(t){t.LEFT="left",t.RIGHT="right"}(V||(V={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(B||(B={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(G||(G={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(U||(U={})),function(t){t.SEMI="semi",t.FULL="full"}(z||(z={})),function(t){t.UP="up",t.DOWN="down"}(H||(H={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(F||(F={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(j||(j={})),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"}(W||(W={})),function(t){t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom"}(q||(q={})),function(t){t.LEFT="left",t.RIGHT="right"}(Y||(Y={})),function(t){t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile"}(X||(X={}));var K=Object.freeze({__proto__:null,get Roles(){return r},Events:Z,get ChartTheme(){return S},get ColorClassNameTypes(){return T},get AxisPositions(){return M},get ZoomBarTypes(){return A},get TruncationTypes(){return C},get CartesianOrientations(){return P},get ScaleTypes(){return D},get LegendPositions(){return L},get Alignments(){return k},get LegendOrientations(){return R},get LayoutDirection(){return I},get LayoutGrowth(){return N},get CalloutDirections(){return V},get Skeletons(){return B},get TextAnchor(){return G},get DominantBaseline(){return U},get GaugeTypes(){return z},get ArrowDirections(){return H},get Statuses(){return F},get TickRotations(){return j},get ChartTypes(){return W},get ToolbarControlTypes(){return q},get AxisTitleOrientations(){return Y},get LegendItemType(){return X}}),$="object"==typeof global&&global&&global.Object===Object&&global,Q="object"==typeof self&&self&&self.Object===Object&&self,J=$||Q||Function("return this")(),tt=J.Symbol,et=Object.prototype,nt=et.hasOwnProperty,rt=et.toString,it=tt?tt.toStringTag:void 0;var at=Object.prototype.toString;var ot=tt?tt.toStringTag:void 0;function st(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ot&&ot in Object(t)?function(t){var e=nt.call(t,it),n=t[it];try{t[it]=void 0;var r=!0}catch(t){}var i=rt.call(t);return r&&(e?t[it]=n:delete t[it]),i}(t):function(t){return at.call(t)}(t)}function ut(t){return null!=t&&"object"==typeof t}function lt(t){return"symbol"==typeof t||ut(t)&&"[object Symbol]"==st(t)}function ct(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 ht=Array.isArray,dt=tt?tt.prototype:void 0,ft=dt?dt.toString:void 0;function pt(t){if("string"==typeof t)return t;if(ht(t))return ct(t,pt)+"";if(lt(t))return ft?ft.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function gt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var vt=/^\s+|\s+$/g,mt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,bt=/^0o[0-7]+$/i,_t=parseInt;function xt(t){if("number"==typeof t)return t;if(lt(t))return NaN;if(gt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=gt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(vt,"");var n=yt.test(t);return n||bt.test(t)?_t(t.slice(2),n?2:8):mt.test(t)?NaN:+t}function Ot(t){return t}function wt(t){if(!gt(t))return!1;var e=st(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Et,St=J["__core-js_shared__"],Tt=(Et=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||""))?"Symbol(src)_1."+Et:"";var Mt=Function.prototype.toString;function At(t){if(null!=t){try{return Mt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Ct=/^\[object .+?Constructor\]$/,Pt=Function.prototype,Dt=Object.prototype,Lt=Pt.toString,kt=Dt.hasOwnProperty,Rt=RegExp("^"+Lt.call(kt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function It(t){return!(!gt(t)||(e=t,Tt&&Tt in e))&&(wt(t)?Rt:Ct).test(At(t));var e}function Nt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return It(n)?n:void 0}var Vt=Nt(J,"WeakMap"),Bt=Object.create,Gt=function(){function t(){}return function(e){if(!gt(e))return{};if(Bt)return Bt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Ut(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 zt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Ht=Date.now;var Ft=function(){try{var t=Nt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),jt=function(t){var e=0,n=0;return function(){var r=Ht(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Ft?function(t,e){return Ft(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:Ot);function Wt(t){return t!=t}function qt(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,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}(t,Wt,n)}(t,e,0)>-1}var Yt=/^(?:0|[1-9]\d*)$/;function Xt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Zt(t,e,n){"__proto__"==e&&Ft?Ft(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Kt(t,e){return t===e||t!=t&&e!=e}var $t=Object.prototype.hasOwnProperty;function Qt(t,e,n){var r=t[e];$t.call(t,e)&&Kt(r,n)&&(void 0!==n||e in t)||Zt(t,e,n)}function Jt(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var s=e[a],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?Zt(n,s,u):Qt(n,s,u)}return n}var te=Math.max;function ee(t,e){return jt(function(t,e,n){return e=te(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=te(r.length-e,0),o=Array(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),Ut(t,this,s)}}(t,e,Ot),t+"")}function ne(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function re(t){return null!=t&&ne(t.length)&&!wt(t)}function ie(t,e,n){if(!gt(n))return!1;var r=typeof e;return!!("number"==r?re(n)&&Xt(e,n.length):"string"==r&&e in n)&&Kt(n[e],t)}var ae=Object.prototype;function oe(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ae)}function se(t){return ut(t)&&"[object Arguments]"==st(t)}var ue=Object.prototype,le=ue.hasOwnProperty,ce=ue.propertyIsEnumerable,he=se(function(){return arguments}())?se:function(t){return ut(t)&&le.call(t,"callee")&&!ce.call(t,"callee")};var de="object"==typeof t&&t&&!t.nodeType&&t,fe=de&&"object"==typeof module&&module&&!module.nodeType&&module,pe=fe&&fe.exports===de?J.Buffer:void 0,ge=(pe?pe.isBuffer:void 0)||function(){return!1},ve={};function me(t){return function(e){return t(e)}}ve["[object Float32Array]"]=ve["[object Float64Array]"]=ve["[object Int8Array]"]=ve["[object Int16Array]"]=ve["[object Int32Array]"]=ve["[object Uint8Array]"]=ve["[object Uint8ClampedArray]"]=ve["[object Uint16Array]"]=ve["[object Uint32Array]"]=!0,ve["[object Arguments]"]=ve["[object Array]"]=ve["[object ArrayBuffer]"]=ve["[object Boolean]"]=ve["[object DataView]"]=ve["[object Date]"]=ve["[object Error]"]=ve["[object Function]"]=ve["[object Map]"]=ve["[object Number]"]=ve["[object Object]"]=ve["[object RegExp]"]=ve["[object Set]"]=ve["[object String]"]=ve["[object WeakMap]"]=!1;var ye="object"==typeof t&&t&&!t.nodeType&&t,be=ye&&"object"==typeof module&&module&&!module.nodeType&&module,_e=be&&be.exports===ye&&$.process,xe=function(){try{var t=be&&be.require&&be.require("util").types;return t||_e&&_e.binding&&_e.binding("util")}catch(t){}}(),Oe=xe&&xe.isTypedArray,we=Oe?me(Oe):function(t){return ut(t)&&ne(t.length)&&!!ve[st(t)]},Ee=Object.prototype.hasOwnProperty;function Se(t,e){var n=ht(t),r=!n&&he(t),i=!n&&!r&&ge(t),a=!n&&!r&&!i&&we(t),o=n||r||i||a,s=o?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&&!Ee.call(t,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Xt(l,u))||s.push(l);return s}function Te(t,e){return function(n){return t(e(n))}}var Me=Te(Object.keys,Object),Ae=Object.prototype.hasOwnProperty;function Ce(t){if(!oe(t))return Me(t);var e=[];for(var n in Object(t))Ae.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Pe(t){return re(t)?Se(t):Ce(t)}var De=Object.prototype.hasOwnProperty;function Le(t){if(!gt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=oe(t),n=[];for(var r in t)("constructor"!=r||!e&&De.call(t,r))&&n.push(r);return n}function ke(t){return re(t)?Se(t,!0):Le(t)}var Re=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ie=/^\w*$/;function Ne(t,e){if(ht(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!lt(t))||(Ie.test(t)||!Re.test(t)||null!=e&&t in Object(e))}var Ve=Nt(Object,"create");var Be=Object.prototype.hasOwnProperty;var Ge=Object.prototype.hasOwnProperty;function Ue(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 ze(t,e){for(var n=t.length;n--;)if(Kt(t[n][0],e))return n;return-1}Ue.prototype.clear=function(){this.__data__=Ve?Ve(null):{},this.size=0},Ue.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ue.prototype.get=function(t){var e=this.__data__;if(Ve){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Be.call(e,t)?e[t]:void 0},Ue.prototype.has=function(t){var e=this.__data__;return Ve?void 0!==e[t]:Ge.call(e,t)},Ue.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ve&&void 0===e?"__lodash_hash_undefined__":e,this};var He=Array.prototype.splice;function Fe(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])}}Fe.prototype.clear=function(){this.__data__=[],this.size=0},Fe.prototype.delete=function(t){var e=this.__data__,n=ze(e,t);return!(n<0)&&(n==e.length-1?e.pop():He.call(e,n,1),--this.size,!0)},Fe.prototype.get=function(t){var e=this.__data__,n=ze(e,t);return n<0?void 0:e[n][1]},Fe.prototype.has=function(t){return ze(this.__data__,t)>-1},Fe.prototype.set=function(t,e){var n=this.__data__,r=ze(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var je=Nt(J,"Map");function We(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 qe(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])}}qe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ue,map:new(je||Fe),string:new Ue}},qe.prototype.delete=function(t){var e=We(this,t).delete(t);return this.size-=e?1:0,e},qe.prototype.get=function(t){return We(this,t).get(t)},qe.prototype.has=function(t){return We(this,t).has(t)},qe.prototype.set=function(t,e){var n=We(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Ye(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],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Ye.Cache||qe),n}Ye.Cache=qe;var Xe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ze=/\\(\\)?/g,Ke=function(t){var e=Ye(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(Xe,(function(t,n,r,i){e.push(r?i.replace(Ze,"$1"):n||t)})),e}));function $e(t){return null==t?"":pt(t)}function Qe(t,e){return ht(t)?t:Ne(t,e)?[t]:Ke($e(t))}function Je(t){if("string"==typeof t||lt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function tn(t,e){for(var n=0,r=(e=Qe(e,t)).length;null!=t&&n<r;)t=t[Je(e[n++])];return n&&n==r?t:void 0}function en(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var nn=tt?tt.isConcatSpreadable:void 0;function rn(t){return ht(t)||he(t)||!!(nn&&t&&t[nn])}function an(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=rn),i||(i=[]);++a<o;){var s=t[a];e>0&&n(s)?e>1?an(s,e-1,n,r,i):en(i,s):r||(i[i.length]=s)}return i}function on(t){return(null==t?0:t.length)?an(t,1):[]}var sn=Te(Object.getPrototypeOf,Object),un=Function.prototype,ln=Object.prototype,cn=un.toString,hn=ln.hasOwnProperty,dn=cn.call(Object);function fn(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 a=Array(i);++r<i;)a[r]=t[r+e];return a}(t,e,n)}var pn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function gn(t){return pn.test(t)}var vn="[\\ud800-\\udfff]",mn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",yn="\\ud83c[\\udffb-\\udfff]",bn="[^\\ud800-\\udfff]",_n="(?:\\ud83c[\\udde6-\\uddff]){2}",xn="[\\ud800-\\udbff][\\udc00-\\udfff]",On="(?:"+mn+"|"+yn+")"+"?",wn="[\\ufe0e\\ufe0f]?"+On+("(?:\\u200d(?:"+[bn,_n,xn].join("|")+")[\\ufe0e\\ufe0f]?"+On+")*"),En="(?:"+[bn+mn+"?",mn,_n,xn,vn].join("|")+")",Sn=RegExp(yn+"(?="+yn+")|"+En+wn,"g");function Tn(t){return gn(t)?function(t){return t.match(Sn)||[]}(t):function(t){return t.split("")}(t)}var Mn,An=(Mn="toUpperCase",function(t){var e=gn(t=$e(t))?Tn(t):void 0,n=e?e[0]:t.charAt(0),r=e?fn(e,1).join(""):t.slice(1);return n[Mn]()+r});var Cn=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","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),Pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Dn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Ln=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var kn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Rn="\\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",In="["+Rn+"]",Nn="\\d+",Vn="[\\u2700-\\u27bf]",Bn="[a-z\\xdf-\\xf6\\xf8-\\xff]",Gn="[^\\ud800-\\udfff"+Rn+Nn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Un="(?:\\ud83c[\\udde6-\\uddff]){2}",zn="[\\ud800-\\udbff][\\udc00-\\udfff]",Hn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Fn="(?:"+Bn+"|"+Gn+")",jn="(?:"+Hn+"|"+Gn+")",Wn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",qn="[\\ufe0e\\ufe0f]?"+Wn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Un,zn].join("|")+")[\\ufe0e\\ufe0f]?"+Wn+")*"),Yn="(?:"+[Vn,Un,zn].join("|")+")"+qn,Xn=RegExp([Hn+"?"+Bn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[In,Hn,"$"].join("|")+")",jn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[In,Hn+Fn,"$"].join("|")+")",Hn+"?"+Fn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Hn+"+(?:['’](?: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_])",Nn,Yn].join("|"),"g");function Zn(t,e,n){return t=$e(t),void 0===(e=n?void 0:e)?function(t){return kn.test(t)}(t)?function(t){return t.match(Xn)||[]}(t):function(t){return t.match(Ln)||[]}(t):t.match(e)||[]}var Kn=RegExp("['’]","g");function $n(t){return function(e){return function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}(Zn(function(t){return(t=$e(t))&&t.replace(Pn,Cn).replace(Dn,"")}(e).replace(Kn,"")),t,"")}}var Qn=$n((function(t,e,n){return e=e.toLowerCase(),t+(n?An($e(e).toLowerCase()):e)}));function Jn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=xt(n))==n?n:0),void 0!==e&&(e=(e=xt(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}(xt(t),e,n)}function tr(t){var e=this.__data__=new Fe(t);this.size=e.size}tr.prototype.clear=function(){this.__data__=new Fe,this.size=0},tr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},tr.prototype.get=function(t){return this.__data__.get(t)},tr.prototype.has=function(t){return this.__data__.has(t)},tr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Fe){var r=n.__data__;if(!je||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new qe(r)}return n.set(t,e),this.size=n.size,this};var er="object"==typeof t&&t&&!t.nodeType&&t,nr=er&&"object"==typeof module&&module&&!module.nodeType&&module,rr=nr&&nr.exports===er?J.Buffer:void 0,ir=rr?rr.allocUnsafe:void 0;function ar(t,e){if(e)return t.slice();var n=t.length,r=ir?ir(n):new t.constructor(n);return t.copy(r),r}function or(){return[]}var sr=Object.prototype.propertyIsEnumerable,ur=Object.getOwnPropertySymbols,lr=ur?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}(ur(t),(function(e){return sr.call(t,e)})))}:or;var cr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)en(e,lr(t)),t=sn(t);return e}:or;function hr(t,e,n){var r=e(t);return ht(t)?r:en(r,n(t))}function dr(t){return hr(t,Pe,lr)}function fr(t){return hr(t,ke,cr)}var pr=Nt(J,"DataView"),gr=Nt(J,"Promise"),vr=Nt(J,"Set"),mr=At(pr),yr=At(je),br=At(gr),_r=At(vr),xr=At(Vt),Or=st;(pr&&"[object DataView]"!=Or(new pr(new ArrayBuffer(1)))||je&&"[object Map]"!=Or(new je)||gr&&"[object Promise]"!=Or(gr.resolve())||vr&&"[object Set]"!=Or(new vr)||Vt&&"[object WeakMap]"!=Or(new Vt))&&(Or=function(t){var e=st(t),n="[object Object]"==e?t.constructor:void 0,r=n?At(n):"";if(r)switch(r){case mr:return"[object DataView]";case yr:return"[object Map]";case br:return"[object Promise]";case _r:return"[object Set]";case xr:return"[object WeakMap]"}return e});var wr=Or,Er=Object.prototype.hasOwnProperty;var Sr=J.Uint8Array;function Tr(t){var e=new t.constructor(t.byteLength);return new Sr(e).set(new Sr(t)),e}var Mr=/\w*$/;var Ar=tt?tt.prototype:void 0,Cr=Ar?Ar.valueOf:void 0;function Pr(t,e){var n=e?Tr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Dr(t,e,n){var r,i,a,o=t.constructor;switch(e){case"[object ArrayBuffer]":return Tr(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return function(t,e){var n=e?Tr(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 Pr(t,n);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(a=new(i=t).constructor(i.source,Mr.exec(i))).lastIndex=i.lastIndex,a;case"[object Set]":return new o;case"[object Symbol]":return r=t,Cr?Object(Cr.call(r)):{}}}function Lr(t){return"function"!=typeof t.constructor||oe(t)?{}:Gt(sn(t))}var kr=xe&&xe.isMap,Rr=kr?me(kr):function(t){return ut(t)&&"[object Map]"==wr(t)};var Ir=xe&&xe.isSet,Nr=Ir?me(Ir):function(t){return ut(t)&&"[object Set]"==wr(t)},Vr={};function Br(t,e,n,r,i,a){var o,s=1&e,u=2&e,l=4&e;if(n&&(o=i?n(t,r,i,a):n(t)),void 0!==o)return o;if(!gt(t))return t;var c=ht(t);if(c){if(o=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Er.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return zt(t,o)}else{var h=wr(t),d="[object Function]"==h||"[object GeneratorFunction]"==h;if(ge(t))return ar(t,s);if("[object Object]"==h||"[object Arguments]"==h||d&&!i){if(o=u||d?{}:Lr(t),!s)return u?function(t,e){return Jt(t,cr(t),e)}(t,function(t,e){return t&&Jt(e,ke(e),t)}(o,t)):function(t,e){return Jt(t,lr(t),e)}(t,function(t,e){return t&&Jt(e,Pe(e),t)}(o,t))}else{if(!Vr[h])return i?t:{};o=Dr(t,h,s)}}a||(a=new tr);var f=a.get(t);if(f)return f;a.set(t,o),Nr(t)?t.forEach((function(r){o.add(Br(r,e,n,r,t,a))})):Rr(t)&&t.forEach((function(r,i){o.set(i,Br(r,e,n,i,t,a))}));var p=l?u?fr:dr:u?keysIn:Pe,g=c?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),Qt(o,i,Br(r,e,n,i,t,a))})),o}Vr["[object Arguments]"]=Vr["[object Array]"]=Vr["[object ArrayBuffer]"]=Vr["[object DataView]"]=Vr["[object Boolean]"]=Vr["[object Date]"]=Vr["[object Float32Array]"]=Vr["[object Float64Array]"]=Vr["[object Int8Array]"]=Vr["[object Int16Array]"]=Vr["[object Int32Array]"]=Vr["[object Map]"]=Vr["[object Number]"]=Vr["[object Object]"]=Vr["[object RegExp]"]=Vr["[object Set]"]=Vr["[object String]"]=Vr["[object Symbol]"]=Vr["[object Uint8Array]"]=Vr["[object Uint8ClampedArray]"]=Vr["[object Uint16Array]"]=Vr["[object Uint32Array]"]=!0,Vr["[object Error]"]=Vr["[object Function]"]=Vr["[object WeakMap]"]=!1;function Gr(t){return Br(t,5)}function Ur(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new qe;++e<n;)this.add(t[e])}function zr(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 Hr(t,e){return t.has(e)}Ur.prototype.add=Ur.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ur.prototype.has=function(t){return this.__data__.has(t)};function Fr(t,e,n,r,i,a){var o=1&n,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var c=-1,h=!0,d=2&n?new Ur:void 0;for(a.set(t,e),a.set(e,t);++c<s;){var f=t[c],p=e[c];if(r)var g=o?r(p,f,c,e,t,a):r(f,p,c,t,e,a);if(void 0!==g){if(g)continue;h=!1;break}if(d){if(!zr(e,(function(t,e){if(!Hr(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)}))){h=!1;break}}else if(f!==p&&!i(f,p,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function jr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Wr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var qr=tt?tt.prototype:void 0,Yr=qr?qr.valueOf:void 0;var Xr=Object.prototype.hasOwnProperty;var Zr=Object.prototype.hasOwnProperty;function Kr(t,e,n,r,i,a){var o=ht(t),s=ht(e),u=o?"[object Array]":wr(t),l=s?"[object Array]":wr(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&&ge(t)){if(!ge(e))return!1;o=!0,c=!1}if(d&&!c)return a||(a=new tr),o||we(t)?Fr(t,e,n,r,i,a):function(t,e,n,r,i,a,o){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||!a(new Sr(t),new Sr(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Kt(+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=jr;case"[object Set]":var u=1&r;if(s||(s=Wr),t.size!=e.size&&!u)return!1;var l=o.get(t);if(l)return l==e;r|=2,o.set(t,e);var c=Fr(s(t),s(e),r,i,a,o);return o.delete(t),c;case"[object Symbol]":if(Yr)return Yr.call(t)==Yr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(1&n)){var f=c&&Zr.call(t,"__wrapped__"),p=h&&Zr.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,v=p?e.value():e;return a||(a=new tr),i(g,v,n,r,a)}}return!!d&&(a||(a=new tr),function(t,e,n,r,i,a){var o=1&n,s=dr(t),u=s.length;if(u!=dr(e).length&&!o)return!1;for(var l=u;l--;){var c=s[l];if(!(o?c in e:Xr.call(e,c)))return!1}var h=a.get(t);if(h&&a.get(e))return h==e;var d=!0;a.set(t,e),a.set(e,t);for(var f=o;++l<u;){var p=t[c=s[l]],g=e[c];if(r)var v=o?r(g,p,c,e,t,a):r(p,g,c,t,e,a);if(!(void 0===v?p===g||i(p,g,n,r,a):v)){d=!1;break}f||(f="constructor"==c)}if(d&&!f){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(d=!1)}return a.delete(t),a.delete(e),d}(t,e,n,r,i,a))}function $r(t,e,n,r,i){return t===e||(null==t||null==e||!ut(t)&&!ut(e)?t!=t&&e!=e:Kr(t,e,n,r,$r,i))}function Qr(t){return t==t&&!gt(t)}function Jr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function ti(t){var e=function(t){for(var e=Pe(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Qr(i)]}return e}(t);return 1==e.length&&e[0][2]?Jr(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var u=(s=n[i])[0],l=t[u],c=s[1];if(o&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new tr;if(r)var d=r(l,c,u,t,e,h);if(!(void 0===d?$r(c,l,3,r,h):d))return!1}}return!0}(n,t,e)}}function ei(t,e){return null!=t&&e in Object(t)}function ni(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Qe(e,t)).length,a=!1;++r<i;){var o=Je(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&ne(i)&&Xt(o,i)&&(ht(t)||he(t))}(t,e,ei)}function ri(t,e){return Ne(t)&&Qr(e)?Jr(Je(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:tn(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?ni(n,t):$r(e,r,3)}}function ii(t){return Ne(t)?(e=Je(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return tn(e,t)}}(t);var e}function ai(t){return"function"==typeof t?t:null==t?Ot:"object"==typeof t?ht(t)?ri(t[0],t[1]):ti(t):ii(t)}var oi,si=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[oi?o:++r];if(!1===e(i[s],s,i))break}return t};var ui=function(t,e){return function(n,r){if(null==n)return n;if(!re(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}((function(t,e){return t&&si(t,e,Pe)})),li=function(){return J.Date.now()},ci=Math.max,hi=Math.min;function di(t,e,n){var r,i,a,o,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,a=i;return r=i=void 0,l=e,o=t.apply(a,n)}function p(t){return l=t,s=setTimeout(v,e),c?f(t):o}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=a}function v(){var t=li();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?hi(n,a-(t-l)):n}(t))}function m(t){return s=void 0,d&&r?f(t):(r=i=void 0,o)}function y(){var t=li(),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)),o}return e=xt(e)||0,gt(n)&&(c=!!n.leading,a=(h="maxWait"in n)?ci(xt(n.maxWait)||0,e):a,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?o:m(li())},y}function fi(t,e,n){(void 0===n||Kt(t[e],n))&&(void 0!==n||e in t)||Zt(t,e,n)}function pi(t){return ut(t)&&re(t)}function gi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function vi(t,e,n,r,i,a,o){var s=gi(t,n),u=gi(e,n),l=o.get(u);if(l)fi(t,n,l);else{var c,h=a?a(s,u,n+"",t,e,o):void 0,d=void 0===h;if(d){var f=ht(u),p=!f&&ge(u),g=!f&&!p&&we(u);h=u,f||p||g?ht(s)?h=s:pi(s)?h=zt(s):p?(d=!1,h=ar(u,!0)):g?(d=!1,h=Pr(u,!0)):h=[]:function(t){if(!ut(t)||"[object Object]"!=st(t))return!1;var e=sn(t);if(null===e)return!0;var n=hn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&cn.call(n)==dn}(u)||he(u)?(h=s,he(s)?h=Jt(c=s,ke(c)):gt(s)&&!wt(s)||(h=Lr(u))):d=!1}d&&(o.set(u,h),i(h,u,r,a,o),o.delete(u)),fi(t,n,h)}}function mi(t,e,n,r,i){t!==e&&si(e,(function(a,o){if(i||(i=new tr),gt(a))vi(t,e,o,n,mi,r,i);else{var s=r?r(gi(t,o),a,o+"",t,e,i):void 0;void 0===s&&(s=a),fi(t,o,s)}}),ke)}function yi(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 bi(t,e){var n=-1,r=re(t)?Array(t.length):[];return ui(t,(function(t,i,a){r[++n]=e(t,i,a)})),r}function _i(t,e){return an(function(t,e){return(ht(t)?ct:bi)(t,ai(e))}(t,e),1/0)}function xi(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 Oi=Object.prototype.hasOwnProperty;function wi(t){if(null==t)return!0;if(re(t)&&(ht(t)||"string"==typeof t||"function"==typeof t.splice||ge(t)||we(t)||he(t)))return!t.length;var e=wr(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(oe(t))return!Ce(t).length;for(var n in t)if(Oi.call(t,n))return!1;return!0}function Ei(t,e){return $r(t,e)}var Si,Ti=$n((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Mi=(Si=function(t,e,n){mi(t,e,n)},ee((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,a=r>2?e[2]:void 0;for(i=Si.length>3&&"function"==typeof i?(r--,i):void 0,a&&ie(e[0],e[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var o=e[n];o&&Si(t,o,n,i)}return t})));function Ai(t,e){var n;return ui(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Ci(t,e,n){var r=ht(t)?zr:Ai;return n&&ie(t,e,n)&&(e=void 0),r(t,ai(e))}var Pi=vr&&1/Wr(new vr([,-0]))[1]==1/0?function(t){return new vr(t)}:function(){};function Di(t,e,n){var r=-1,i=qt,a=t.length,o=!0,s=[],u=s;if(n)o=!1,i=yi;else if(a>=200){var l=e?null:Pi(t);if(l)return Wr(l);o=!1,i=Hr,u=new Ur}else u=e?[]:s;t:for(;++r<a;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,o&&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 Li=ee((function(t){var e=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}(t);return pi(e)&&(e=void 0),Di(an(t,1,pi,!0),ai(e))}));function ki(t){return t&&t.length?Di(t):[]}var Ri="http://www.w3.org/1999/xhtml",Ii={svg:"http://www.w3.org/2000/svg",xhtml:Ri,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ni(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ii.hasOwnProperty(e)?{space:Ii[e],local:t}:t}function Vi(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ri&&e.documentElement.namespaceURI===Ri?e.createElement(t):e.createElementNS(n,t)}}function Bi(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Gi(t){var e=Ni(t);return(e.local?Bi:Vi)(e)}function Ui(){}function zi(t){return null==t?Ui:function(){return this.querySelector(t)}}function Hi(){return[]}function Fi(t){return null==t?Hi:function(){return this.querySelectorAll(t)}}function ji(t){return function(){return this.matches(t)}}function Wi(t){return new Array(t.length)}function qi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}qi.prototype={constructor:qi,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 Yi(t,e,n,r,i,a){for(var o,s=0,u=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new qi(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function Xi(t,e,n,r,i,a,o){var s,u,l,c={},h=e.length,d=a.length,f=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(f[s]=l="$"+o.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<d;++s)(u=c[l="$"+o.call(t,a[s],s,a)])?(r[s]=u,u.__data__=a[s],c[l]=null):n[s]=new qi(t,a[s]);for(s=0;s<h;++s)(u=e[s])&&c[f[s]]===u&&(i[s]=u)}function Zi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ki(t){return function(){this.removeAttribute(t)}}function $i(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Qi(t,e){return function(){this.setAttribute(t,e)}}function Ji(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ta(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ea(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 na(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ra(t){return function(){this.style.removeProperty(t)}}function ia(t,e,n){return function(){this.style.setProperty(t,e,n)}}function aa(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function oa(t,e){return t.style.getPropertyValue(e)||na(t).getComputedStyle(t,null).getPropertyValue(e)}function sa(t){return function(){delete this[t]}}function ua(t,e){return function(){this[t]=e}}function la(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ca(t){return t.trim().split(/^|\s+/)}function ha(t){return t.classList||new da(t)}function da(t){this._node=t,this._names=ca(t.getAttribute("class")||"")}function fa(t,e){for(var n=ha(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function pa(t,e){for(var n=ha(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ga(t){return function(){fa(this,t)}}function va(t){return function(){pa(this,t)}}function ma(t,e){return function(){(e.apply(this,arguments)?fa:pa)(this,t)}}function ya(){this.textContent=""}function ba(t){return function(){this.textContent=t}}function _a(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function xa(){this.innerHTML=""}function Oa(t){return function(){this.innerHTML=t}}function wa(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ea(){this.nextSibling&&this.parentNode.appendChild(this)}function Sa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ta(){return null}function Ma(){var t=this.parentNode;t&&t.removeChild(this)}function Aa(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ca(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}da.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 Pa={},Da=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Pa={mouseenter:"mouseover",mouseleave:"mouseout"}));function La(t,e,n){return t=ka(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ka(t,e,n){return function(r){var i=Da;Da=r;try{t.call(this,this.__data__,e,n)}finally{Da=i}}}function Ra(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 Ia(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++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 Na(t,e,n){var r=Pa.hasOwnProperty(t.type)?La:ka;return function(i,a,o){var s,u=this.__on,l=r(e,a,o);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 Va(t,e,n){var r=na(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 Ba(t,e){return function(){return Va(this,t,e)}}function Ga(t,e){return function(){return Va(this,t,e.apply(this,arguments))}}var Ua,za=[null];function Ha(t,e){this._groups=t,this._parents=e}function Fa(){return new Ha([[document.documentElement]],za)}function ja(t){return"string"==typeof t?new Ha([[document.querySelector(t)]],[document.documentElement]):new Ha([[t]],za)}function Wa(){for(var t,e=Da;t=e.sourceEvent;)e=t;return e}function qa(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 Ya(t){var e=Wa();return e.changedTouches&&(e=e.changedTouches[0]),qa(t,e)}function Xa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Za(t,e){return t(e={exports:{}},e.exports),e.exports}Ha.prototype=Fa.prototype={constructor:Ha,select:function(t){"function"!=typeof t&&(t=zi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(a=s[c])&&(o=t.call(a,a.__data__,c,s))&&("__data__"in a&&(o.__data__=a.__data__),l[c]=o);return new Ha(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Fi(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,l=0;l<u;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new Ha(r,i)},filter:function(t){"function"!=typeof t&&(t=ji(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new Ha(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?Xi:Yi,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),l=0;l<a;++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=o[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(o=new Ha(o,r))._enter=s,o._exit=u,o},enter:function(){return new Ha(this._enter||this._groups.map(Wi),this._parents)},exit:function(){return new Ha(this._exit||this._groups.map(Wi),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,l=e[s],c=n[s],h=l.length,d=o[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(d[f]=u);for(;s<r;++s)o[s]=e[s];return new Ha(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Zi);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,l=i[a]=new Array(u),c=0;c<u;++c)(o=s[c])&&(l[c]=o);l.sort(e)}return new Ha(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,a=r.length;i<a;++i){var o=r[i];if(o)return o}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,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Ni(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?$i:Ki:"function"==typeof e?n.local?ea:ta:n.local?Ji:Qi)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?ra:"function"==typeof e?aa:ia)(t,e,null==n?"":n)):oa(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?sa:"function"==typeof e?la:ua)(t,e)):this.node()[t]},classed:function(t,e){var n=ca(t+"");if(arguments.length<2){for(var r=ha(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ma:e?ga:va)(n,e))},text:function(t){return arguments.length?this.each(null==t?ya:("function"==typeof t?_a:ba)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?xa:("function"==typeof t?wa:Oa)(t)):this.node().innerHTML},raise:function(){return this.each(Ea)},lower:function(){return this.each(Sa)},append:function(t){var e="function"==typeof t?t:Gi(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Gi(t),r=null==e?Ta:"function"==typeof e?e:zi(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Ma)},clone:function(t){return this.select(t?Ca:Aa)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Ra(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Na:Ia,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[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<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ga:Ba)(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 a=i.map((function(t){return t.type}));r=r.filter((function(t){return!a.includes(t.type)&&t.type===X.RADIUS})),n.legend.additionalItems=t.unionBy(r,i,"name"),e.legend.additionalItems=[]}}t.debounce=di,t.clone=Gr,t.merge=Mi,t.unionBy=Li,t.removeArrayDuplicates=ki,t.clamp=Jn,t.flatten=on,t.camelCase=Qn,t.isEmpty=wi,t.isEqual=Ei,t.flatMapDeep=_i,t.kebabCase=Ti,t.fromPairs=xi,t.some=Ci,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,a=arguments;i.mousePosition=Ya(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,a)}),e)}},t.mergeDefaultChartOptions=function(n,r){n=t.clone(n);var i=Object.keys(r.axes||{});for(var a in 0===i.length&&delete n.axes,n.axes)if(i.includes(a)){var o=r.axes[a];(o.primary||o.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=o.mapsTo;if(null==s){var u=o.scaleType;null==u?o.mapsTo="value":u===D.TIME?o.mapsTo="date":u===D.LABELS&&(o.mapsTo="key")}}else delete n.axes[a];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===C.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===C.FRONT_LINE?"..."+t.substr(-n):e===C.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,a=e;i<a.length;i++){var o=a[i];if(null===r[o]||void 0===r[o])return null;r=r[o]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===P.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,a=r.x1,o=r.y0,s=r.y1;return"M"+i+","+o+"L"+i+","+s+"L"+a+","+s+"L"+a+","+o+"L"+i+","+o},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===P.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(Ua||(Ua={}));var Ka=Za((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(Ka);var $a=Za((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($a);var Qa=Za((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=$a)&&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(Qa);var Ja=Za((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(Ja);var to=Za((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 a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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(to);var eo=Za((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=to)&&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(eo);var no=Za((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=r.match(t.matchPattern);if(!a)return null;var o=a[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(o.length)}}},t.exports=e.default}));Xa(no);var ro=Za((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,l=s[0],c=a&&t.parsePatterns[a]||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(ro);var io=Za((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(no),r=i(ro);function i(t){return t&&t.__esModule?t:{default:t}}var a={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=a,t.exports=e.default}));Xa(io);var ao,oo=Xa(Za((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Ka),r=s(Qa),i=s(Ja),a=s(eo),o=s(io);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:a.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),so={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},uo={opacity:{unselected:.05,selected:.4}},lo={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1},co={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},ho={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:13,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}]}},fo={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},po={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15}},go={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}},vo={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},mo={default:{size:24}},yo={horizontalOffset:10},bo={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}},_o={buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},xo={height:(ao={},ao[A.GRAPH_VIEW]=32,ao[A.SLIDER_VIEW]=10,ao),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Oo={type:C.END_LINE,threshold:16,numCharacter:14},wo={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},Eo={enabled:!0},So={enabled:!0,showTotal:!0,truncation:Oo,groupLabel:"Group"},To={top:{visible:!0,includeZero:!0,truncation:Oo},bottom:{visible:!0,includeZero:!0,truncation:Oo},left:{visible:!0,includeZero:!0,truncation:Oo},right:{visible:!0,includeZero:!0,truncation:Oo}},Mo={addSpaceOnEdges:1,showDayName:!1,localeObject:oo,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"}}},Ao={width:null,height:null,resizable:!0,tooltip:So,legend:{enabled:!0,position:L.BOTTOM,clickable:!0,truncation:Oo,alignment:k.LEFT,order:null,additionalItems:[]},style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}}},Co=Ua.merge({},Ao,{axes:To,timeScale:Mo,grid:wo,ruler:Eo,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:A.GRAPH_VIEW}},toolbar:{enabled:!1,numberOfIcons:3,controls:[]}}),Po=Ua.merge({},Co,{bars:{maxWidth:16},timeScale:Ua.merge(Mo,{addSpaceOnEdges:1})}),Do=Ua.merge({},Po,{}),Lo=Ua.merge({},Po,{}),ko=Ua.merge({},Po,{bars:Ua.merge({},Po.bars,{dividerSize:1.5})}),Ro=Ua.merge({},Po,{}),Io=Ua.merge({},Co,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),No=Io,Vo=Ua.merge({},Io,{points:{radius:3,filled:!1,enabled:!0}}),Bo=Ua.merge({},Vo,{timeScale:Ua.merge(Mo,{addSpaceOnEdges:0})}),Go=Bo,Uo=Ua.merge({},Co,{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:X.RADIUS,name:"Radius"}]}}),zo=Ua.merge({},Co,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}}}),Ho=Ua.merge({},Ao,{tooltip:Ua.merge({},So,{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"}}),Fo=Ua.merge({},Ao,{pie:{labels:{formatter:null,enabled:!0},alignment:k.LEFT}}),jo=Ua.merge({},Ao,{legend:{enabled:!1},gauge:{type:z.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,minMaxFontSize:function(t){return t/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:k.LEFT}}),Wo={chart:Ao,axisChart:Co,simpleBarChart:Do,groupedBarChart:Lo,stackedBarChart:ko,boxplotChart:Ro,bubbleChart:Uo,bulletChart:zo,lineChart:Vo,areaChart:Bo,stackedAreaChart:Go,scatterChart:Io,lollipopChart:No,pieChart:Fo,donutChart:Ua.merge({},Fo,{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:k.LEFT}}),meterChart:Ua.merge({},Ao,{legend:{enabled:!1},meter:{height:8,statusBar:{percentageIndicator:{enabled:!0,removePercentage:!1}}}}),radarChart:Ua.merge({},Ao,{radar:{axes:{angle:"key",value:"value"},alignment:k.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:jo,comboChart:Ua.merge({},Po,{comboChartTypes:[]}),treemapChart:Ua.merge({},Ao,{data:Ua.merge(Ao.data,{groupMapsTo:"name"})}),wordCloudChart:Ho},qo=Object.freeze({__proto__:null,grid:wo,ruler:Eo,baseTooltip:So,timeScale:Mo,options:Wo,color:so,area:uo,axis:lo,boxplot:co,legend:ho,lines:fo,meter:po,pie:go,radar:vo,spacers:mo,tooltips:yo,transitions:bo,toolbar:_o,zoomBar:xo});function Yo(){}function Xo(t,e){var n=new Yo;if(t instanceof Yo)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}function Zo(){}Yo.prototype=Xo.prototype={constructor:Yo,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 Ko=Xo.prototype;function $o(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Qo(t){var e;return 1===t.length&&(e=t,t=function(t,n){return $o(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}Zo.prototype=function(t,e){var n=new Zo;if(t instanceof Zo)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:Zo,has:Ko.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Ko.remove,clear:Ko.clear,values:Ko.keys,size:Ko.size,empty:Ko.empty,each:Ko.each};var Jo=Qo($o).right;function ts(t){return null===t?NaN:+t}function es(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function ns(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)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var rs=Math.sqrt(50),is=Math.sqrt(10),as=Math.sqrt(2);function os(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=ss(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function ss(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=rs?10:a>=is?5:a>=as?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=rs?10:a>=is?5:a>=as?2:1)}function us(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=rs?i*=10:a>=is?i*=5:a>=as&&(i*=2),e<t?-i:i}function ls(t,e,n){if(null==n&&(n=ts),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,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function cs(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function hs(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r}function ds(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}function fs(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var ps=Array.prototype,gs=ps.map,vs=ps.slice,ms={name:"implicit"};function ys(){var t=Xo(),e=[],n=[],r=ms;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==ms)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Xo();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=vs.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ys(e,n).unknown(r)},fs.apply(i,arguments),i}function bs(){var t,e,n=ys().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=a[1]<a[0],h=a[c-0],d=a[1-c];t=(d-h)/Math.max(1,n-s+2*u),o&&(t=Math.floor(t)),h+=(d-h-t*(n-s))*l,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var f=ns(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?(a=[+t[0],+t[1]],c()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,c()):o},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 bs(r(),a).round(o).paddingInner(s).paddingOuter(u).align(l)},fs.apply(c(),arguments)}function _s(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function xs(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Os(){}var ws="\\s*([+-]?\\d+)\\s*",Es="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ss="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ts=/^#([0-9a-f]{3,8})$/,Ms=new RegExp("^rgb\\("+[ws,ws,ws]+"\\)$"),As=new RegExp("^rgb\\("+[Ss,Ss,Ss]+"\\)$"),Cs=new RegExp("^rgba\\("+[ws,ws,ws,Es]+"\\)$"),Ps=new RegExp("^rgba\\("+[Ss,Ss,Ss,Es]+"\\)$"),Ds=new RegExp("^hsl\\("+[Es,Ss,Ss]+"\\)$"),Ls=new RegExp("^hsla\\("+[Es,Ss,Ss,Es]+"\\)$"),ks={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 Rs(){return this.rgb().formatHex()}function Is(){return this.rgb().formatRgb()}function Ns(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ts.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Vs(e):3===n?new zs(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new zs(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new zs(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=Ms.exec(t))?new zs(e[1],e[2],e[3],1):(e=As.exec(t))?new zs(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Cs.exec(t))?Bs(e[1],e[2],e[3],e[4]):(e=Ps.exec(t))?Bs(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ds.exec(t))?Ws(e[1],e[2]/100,e[3]/100,1):(e=Ls.exec(t))?Ws(e[1],e[2]/100,e[3]/100,e[4]):ks.hasOwnProperty(t)?Vs(ks[t]):"transparent"===t?new zs(NaN,NaN,NaN,0):null}function Vs(t){return new zs(t>>16&255,t>>8&255,255&t,1)}function Bs(t,e,n,r){return r<=0&&(t=e=n=NaN),new zs(t,e,n,r)}function Gs(t){return t instanceof Os||(t=Ns(t)),t?new zs((t=t.rgb()).r,t.g,t.b,t.opacity):new zs}function Us(t,e,n,r){return 1===arguments.length?Gs(t):new zs(t,e,n,null==r?1:r)}function zs(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Hs(){return"#"+js(this.r)+js(this.g)+js(this.b)}function Fs(){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 js(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ws(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Xs(t,e,n,r)}function qs(t){if(t instanceof Xs)return new Xs(t.h,t.s,t.l,t.opacity);if(t instanceof Os||(t=Ns(t)),!t)return new Xs;if(t instanceof Xs)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new Xs(o,s,u,t.opacity)}function Ys(t,e,n,r){return 1===arguments.length?qs(t):new Xs(t,e,n,null==r?1:r)}function Xs(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Zs(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 Ks(t){return function(){return t}}function $s(t){return 1==(t=+t)?Qs: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):Ks(isNaN(e)?n:e)}}function Qs(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ks(isNaN(t)?e:t)}_s(Os,Ns,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Rs,formatHex:Rs,formatHsl:function(){return qs(this).formatHsl()},formatRgb:Is,toString:Is}),_s(zs,Us,xs(Os,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new zs(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new zs(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:Hs,formatHex:Hs,formatRgb:Fs,toString:Fs})),_s(Xs,Ys,xs(Os,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Xs(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Xs(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 zs(Zs(t>=240?t-240:t+120,i,r),Zs(t,i,r),Zs(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 Js=function t(e){var n=$s(e);function r(t,e){var r=n((t=Us(t)).r,(e=Us(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Qs(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function tu(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function eu(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=uu(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function nu(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ru(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function iu(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]=uu(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var au=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ou=new RegExp(au.source,"g");function su(t,e){var n,r,i,a=au.lastIndex=ou.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=au.exec(t))&&(r=ou.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:ru(n,r)})),a=ou.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=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 uu(t,e){var n,r=typeof e;return null==e||"boolean"===r?Ks(e):("number"===r?ru:"string"===r?(n=Ns(e))?(e=n,Js):su:e instanceof Ns?Js:e instanceof Date?nu:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?tu:Array.isArray(e)?eu:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?iu:ru)(t,e)}function lu(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var cu,hu,du,fu,pu=180/Math.PI,gu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vu(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(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,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*pu,skewX:Math.atan(u)*pu,scaleX:o,scaleY:s}}function mu(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:ru(t,i)},{i:u-2,x:ru(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ru(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ru(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ru(t,n)},{i:s-2,x:ru(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=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 yu=mu((function(t){return"none"===t?gu:(cu||(cu=document.createElement("DIV"),hu=document.documentElement,du=document.defaultView),cu.style.transform=t,t=du.getComputedStyle(hu.appendChild(cu),null).getPropertyValue("transform"),hu.removeChild(cu),vu(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),bu=mu((function(t){return null==t?gu:(fu||(fu=document.createElementNS("http://www.w3.org/2000/svg","g")),fu.setAttribute("transform",t),(t=fu.transform.baseVal.consolidate())?vu((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):gu)}),", ",")",")");function _u(t){return+t}var xu=[0,1];function Ou(t){return t}function wu(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Eu(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 Su(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=wu(i,r),a=n(o,a)):(r=wu(r,i),a=n(a,o)),function(t){return a(r(t))}}function Tu(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=wu(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Jo(t,e,1,r)-1;return a[n](i[n](e))}}function Mu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Au(){var t,e,n,r,i,a,o=xu,s=xu,u=uu,l=Ou;function c(){return r=Math.min(o.length,s.length)>2?Tu:Su,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,o.map(t),ru)))(n)))},h.domain=function(t){return arguments.length?(o=gs.call(t,_u),l===Ou||(l=Eu(o)),c()):o.slice()},h.range=function(t){return arguments.length?(s=vs.call(t),c()):s.slice()},h.rangeRound=function(t){return s=vs.call(t),u=lu,c()},h.clamp=function(t){return arguments.length?(l=t?Eu(o):Ou,h):l!==Ou},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 Cu(t,e){return Au()(t,e)}function Pu(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 Du(t){return(t=Pu(Math.abs(t)))?t[1]:NaN}var Lu,ku=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ru(t){if(!(e=ku.exec(t)))throw new Error("invalid format: "+t);var e;return new Iu({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 Iu(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 Nu(t,e){var n=Pu(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")}Ru.prototype=Iu.prototype,Iu.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 Vu={"%":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 Nu(100*t,e)},r:Nu,s:function(t,e){var n=Pu(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Lu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Pu(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Bu(t){return t}var Gu,Uu,zu,Hu=Array.prototype.map,Fu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ju(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Bu:(e=Hu.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Bu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Hu.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=Ru(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"):Vu[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?a:/[%p]/.test(y)?u:"",x=Vu[y],O=/[defgprs%]/.test(y);function w(t){var i,a,u,d=b,w=_;if("c"===y)w=x(t)+w,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,w=("s"===y?Fu[8+Lu/3]:"")+w+(E&&"("===h?")":""),O)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){w=(46===u?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!f&&(t=r(t,1/0));var S=d.length+t.length+w.length,T=S<p?new Array(p-S+1).join(e):"";switch(g&&f&&(t=r(T+t,T.length?p-w.length:1/0),T=""),n){case"<":t=d+t+w+T;break;case"=":t=d+T+t+w;break;case"^":t=T.slice(0,S=T.length>>1)+d+t+w+T.slice(S);break;default:t=T+d+t+w}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ru(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Du(e)/3))),i=Math.pow(10,-r),a=Fu[8+r/3];return function(t){return n(i*t)+a}}}}function Wu(t,e,n,r){var i,a=us(t,e,n);switch((r=Ru(null==r?",f":r)).type){case"s":var o=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(Du(e)/3)))-Du(Math.abs(t)))}(a,o))||(r.precision=i),zu(r,o);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,Du(e)-Du(t))+1}(a,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,-Du(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Uu(r)}function qu(t){var e=t.domain;return t.ticks=function(t){var n=e();return os(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Wu(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],u=i[o];return u<s&&(r=s,s=u,u=r,r=a,a=o,o=r),(r=ss(s,u,n))>0?r=ss(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=ss(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function Yu(){var t=Cu(Ou,Ou);return t.copy=function(){return Mu(t,Yu())},fs.apply(t,arguments),qu(t)}function Xu(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Zu(t){return Math.log(t)}function Ku(t){return Math.exp(t)}function $u(t){return-Math.log(-t)}function Qu(t){return-Math.exp(-t)}function Ju(t){return isFinite(t)?+("1e"+t):t<0?0:t}function tl(t){return function(e){return-t(-e)}}function el(t){var e,n,r=t(Zu,Ku),i=r.domain,a=10;function o(){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})}(a),n=function(t){return 10===t?Ju:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=tl(e),n=tl(n),t($u,Qu)):t(Zu,Ku),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],u=o[o.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(!(a%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<a;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;d<f;++d)for(c=a-1,l=n(d);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=os(d,f,Math.min(f-d,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Uu(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Xu(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Gu=ju({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Uu=Gu.format,zu=Gu.formatPrefix;var nl=new Date,rl=new Date;function il(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,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return il((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 nl.setTime(+e),rl.setTime(+r),t(nl),t(rl),Math.floor(n(nl,rl))},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 al=il((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));al.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?il((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):al:null};var ol=il((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()})),sl=il((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()})),ul=il((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()})),ll=il((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 cl(t){return il((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 hl=cl(0),dl=cl(1),fl=(cl(2),cl(3),cl(4)),pl=(cl(5),cl(6),il((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()}))),gl=il((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()}));gl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?il((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 vl=il((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 ml(t){return il((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 yl=ml(0),bl=ml(1),_l=(ml(2),ml(3),ml(4)),xl=(ml(5),ml(6),il((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 Ol(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 wl(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 El(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}xl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?il((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 Sl,Tl,Ml={"-":"",_:" ",0:"0"},Al=/^\s*\d+/,Cl=/^%/,Pl=/[\\^$*+?|[\]().{}]/g;function Dl(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Ll(t){return t.replace(Pl,"\\$&")}function kl(t){return new RegExp("^(?:"+t.map(Ll).join("|")+")","i")}function Rl(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Il(t,e,n){var r=Al.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Nl(t,e,n){var r=Al.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Vl(t,e,n){var r=Al.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Bl(t,e,n){var r=Al.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Gl(t,e,n){var r=Al.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ul(t,e,n){var r=Al.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function zl(t,e,n){var r=Al.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Hl(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 Fl(t,e,n){var r=Al.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function jl(t,e,n){var r=Al.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Wl(t,e,n){var r=Al.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ql(t,e,n){var r=Al.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Yl(t,e,n){var r=Al.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Xl(t,e,n){var r=Al.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Zl(t,e,n){var r=Al.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Kl(t,e,n){var r=Al.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function $l(t,e,n){var r=Al.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ql(t,e,n){var r=Cl.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Jl(t,e,n){var r=Al.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function tc(t,e,n){var r=Al.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ec(t,e){return Dl(t.getDate(),e,2)}function nc(t,e){return Dl(t.getHours(),e,2)}function rc(t,e){return Dl(t.getHours()%12||12,e,2)}function ic(t,e){return Dl(1+ll.count(gl(t),t),e,3)}function ac(t,e){return Dl(t.getMilliseconds(),e,3)}function oc(t,e){return ac(t,e)+"000"}function sc(t,e){return Dl(t.getMonth()+1,e,2)}function uc(t,e){return Dl(t.getMinutes(),e,2)}function lc(t,e){return Dl(t.getSeconds(),e,2)}function cc(t){var e=t.getDay();return 0===e?7:e}function hc(t,e){return Dl(hl.count(gl(t)-1,t),e,2)}function dc(t,e){var n=t.getDay();return t=n>=4||0===n?fl(t):fl.ceil(t),Dl(fl.count(gl(t),t)+(4===gl(t).getDay()),e,2)}function fc(t){return t.getDay()}function pc(t,e){return Dl(dl.count(gl(t)-1,t),e,2)}function gc(t,e){return Dl(t.getFullYear()%100,e,2)}function vc(t,e){return Dl(t.getFullYear()%1e4,e,4)}function mc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Dl(e/60|0,"0",2)+Dl(e%60,"0",2)}function yc(t,e){return Dl(t.getUTCDate(),e,2)}function bc(t,e){return Dl(t.getUTCHours(),e,2)}function _c(t,e){return Dl(t.getUTCHours()%12||12,e,2)}function xc(t,e){return Dl(1+vl.count(xl(t),t),e,3)}function Oc(t,e){return Dl(t.getUTCMilliseconds(),e,3)}function wc(t,e){return Oc(t,e)+"000"}function Ec(t,e){return Dl(t.getUTCMonth()+1,e,2)}function Sc(t,e){return Dl(t.getUTCMinutes(),e,2)}function Tc(t,e){return Dl(t.getUTCSeconds(),e,2)}function Mc(t){var e=t.getUTCDay();return 0===e?7:e}function Ac(t,e){return Dl(yl.count(xl(t)-1,t),e,2)}function Cc(t,e){var n=t.getUTCDay();return t=n>=4||0===n?_l(t):_l.ceil(t),Dl(_l.count(xl(t),t)+(4===xl(t).getUTCDay()),e,2)}function Pc(t){return t.getUTCDay()}function Dc(t,e){return Dl(bl.count(xl(t)-1,t),e,2)}function Lc(t,e){return Dl(t.getUTCFullYear()%100,e,2)}function kc(t,e){return Dl(t.getUTCFullYear()%1e4,e,4)}function Rc(){return"+0000"}function Ic(){return"%"}function Nc(t){return+t}function Vc(t){return Math.floor(+t/1e3)}!function(t){Sl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,l=kl(i),c=Rl(i),h=kl(a),d=Rl(a),f=kl(o),p=Rl(o),g=kl(s),v=Rl(s),m=kl(u),y=Rl(u),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:ec,e:ec,f:oc,H:nc,I:rc,j:ic,L:ac,m:sc,M:uc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Nc,s:Vc,S:lc,u:cc,U:hc,V:dc,w:fc,W:pc,x:null,X:null,y:gc,Y:vc,Z:mc,"%":Ic},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:yc,e:yc,f:wc,H:bc,I:_c,j:xc,L:Oc,m:Ec,M:Sc,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Nc,s:Vc,S:Tc,u:Mc,U:Ac,V:Cc,w:Pc,W:Dc,x:null,X:null,y:Lc,Y:kc,Z:Rc,"%":Ic},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:Wl,e:Wl,f:$l,H:Yl,I:Yl,j:ql,L:Kl,m:jl,M:Xl,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:Fl,Q:Jl,s:tc,S:Zl,u:Nl,U:Vl,V:Bl,w:Il,W:Gl,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:zl,Y:Ul,Z:Hl,"%":Ql};function O(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(i=Ml[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=s+1);return o.push(t.slice(u,s)),o.join("")}}function w(t,e){return function(n){var r,i,a=El(1900,void 0,1);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=wl(El(a.y,0,1))).getUTCDay(),r=i>4||0===i?bl.ceil(r):bl(r),r=vl.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Ol(El(a.y,0,1))).getDay(),r=i>4||0===i?dl.ceil(r):dl(r),r=ll.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?wl(El(a.y,0,1)).getUTCDay():Ol(El(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,wl(a)):Ol(a)}}function E(t,e,n,r){for(var i,a,o=0,s=e.length,u=n.length;o<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in Ml?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=O(n,b),b.X=O(r,b),b.c=O(e,b),_.x=O(n,_),_.X=O(r,_),_.c=O(e,_),{format:function(t){var e=O(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=O(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}})}(t),Tl=Sl.format,Sl.parse,Sl.utcFormat,Sl.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 Bc(t){return new Date(t)}function Gc(t){return t instanceof Date?+t:+new Date(+t)}function Uc(t,e,n,r,i,a,o,s,u){var l=Cu(Ou,Ou),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"),_=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,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(o(s)<s?d:a(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 O(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(r-n)/e,o=Qo((function(t){return t[2]})).right(_,a);o===_.length?(i=us(n/31536e6,r/31536e6,e),e=t):o?(i=(o=_[a/_[o-1][2]<_[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(us(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(gs.call(t,Gc)):h().map(Bc)},l.ticks=function(t,e){var n,r=h(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=O(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t,e){var n=h();return(t=O(t,n[0],n[n.length-1],e))?h(Xu(n,t)):l},l.copy=function(){return Mu(l,Uc(t,e,n,r,i,a,o,s,u))},l}function zc(){return fs.apply(Uc(gl,pl,hl,ll,ul,sl,ol,al,Tl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Hc=Math.PI,Fc=2*Hc,jc=Fc-1e-6;function Wc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function qc(){return new Wc}function Yc(t){return function(){return t}}Wc.prototype=qc.prototype={constructor:Wc,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,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,u=r-e,l=a-t,c=o-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-a,f=r-o,p=s*s+u*u,g=d*d+f*f,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Hc-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,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+o,l=e+s,c=1^a,h=a?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%Fc+Fc),h>jc?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Hc)+","+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 Xc=Math.abs,Zc=Math.atan2,Kc=Math.cos,$c=Math.max,Qc=Math.min,Jc=Math.sin,th=Math.sqrt,eh=Math.PI,nh=eh/2,rh=2*eh;function ih(t){return t>1?0:t<-1?eh:Math.acos(t)}function ah(t){return t>=1?nh:t<=-1?-nh:Math.asin(t)}function oh(t){return t.innerRadius}function sh(t){return t.outerRadius}function uh(t){return t.startAngle}function lh(t){return t.endAngle}function ch(t){return t&&t.padAngle}function hh(t,e,n,r,i,a,o,s){var u=n-t,l=r-e,c=o-i,h=s-a,d=h*u-c*l;if(!(d*d<1e-12))return[t+(d=(c*(e-a)-h*(t-i))/d)*u,e+d*l]}function dh(t,e,n,r,i,a,o){var s=t-n,u=e-r,l=(o?a:-a)/th(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-a,O=d*g-p*f,w=(b<0?-1:1)*th($c(0,x*x*_-O*O)),E=(O*b-y*w)/_,S=(-O*y-b*w)/_,T=(O*b+y*w)/_,M=(-O*y+b*w)/_,A=E-v,C=S-m,P=T-v,D=M-m;return A*A+C*C>P*P+D*D&&(E=T,S=M),{cx:E,cy:S,x01:-c,y01:-h,x11:E*(i/x-1),y11:S*(i/x-1)}}function fh(){var t=oh,e=sh,n=Yc(0),r=null,i=uh,a=lh,o=ch,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-nh,f=a.apply(this,arguments)-nh,p=Xc(f-d),g=f>d;if(s||(s=u=qc()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>rh-1e-12)s.moveTo(h*Kc(d),h*Jc(d)),s.arc(0,0,h,d,f,!g),c>1e-12&&(s.moveTo(c*Kc(f),c*Jc(f)),s.arc(0,0,c,f,d,g));else{var v,m,y=d,b=f,_=d,x=f,O=p,w=p,E=o.apply(this,arguments)/2,S=E>1e-12&&(r?+r.apply(this,arguments):th(c*c+h*h)),T=Qc(Xc(h-c)/2,+n.apply(this,arguments)),M=T,A=T;if(S>1e-12){var C=ah(S/c*Jc(E)),P=ah(S/h*Jc(E));(O-=2*C)>1e-12?(_+=C*=g?1:-1,x-=C):(O=0,_=x=(d+f)/2),(w-=2*P)>1e-12?(y+=P*=g?1:-1,b-=P):(w=0,y=b=(d+f)/2)}var D=h*Kc(y),L=h*Jc(y),k=c*Kc(x),R=c*Jc(x);if(T>1e-12){var I,N=h*Kc(b),V=h*Jc(b),B=c*Kc(_),G=c*Jc(_);if(p<eh&&(I=hh(D,L,B,G,N,V,k,R))){var U=D-I[0],z=L-I[1],H=N-I[0],F=V-I[1],j=1/Jc(ih((U*H+z*F)/(th(U*U+z*z)*th(H*H+F*F)))/2),W=th(I[0]*I[0]+I[1]*I[1]);M=Qc(T,(c-W)/(j-1)),A=Qc(T,(h-W)/(j+1))}}w>1e-12?A>1e-12?(v=dh(B,G,D,L,h,A,g),m=dh(N,V,k,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<T?s.arc(v.cx,v.cy,A,Zc(v.y01,v.x01),Zc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,Zc(v.y01,v.x01),Zc(v.y11,v.x11),!g),s.arc(0,0,h,Zc(v.cy+v.y11,v.cx+v.x11),Zc(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Zc(m.y11,m.x11),Zc(m.y01,m.x01),!g))):(s.moveTo(D,L),s.arc(0,0,h,y,b,!g)):s.moveTo(D,L),c>1e-12&&O>1e-12?M>1e-12?(v=dh(k,R,N,V,c,-M,g),m=dh(D,L,B,G,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,Zc(v.y01,v.x01),Zc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,Zc(v.y01,v.x01),Zc(v.y11,v.x11),!g),s.arc(0,0,c,Zc(v.cy+v.y11,v.cx+v.x11),Zc(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,Zc(m.y11,m.x11),Zc(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)+ +a.apply(this,arguments))/2-eh/2;return[Kc(r)*n,Jc(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Yc(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Yc(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Yc(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Yc(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Yc(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Yc(+t),u):a},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Yc(+t),u):o},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function ph(t){this._context=t}function gh(t){return new ph(t)}function vh(t){return t[0]}function mh(t){return t[1]}function yh(){var t=vh,e=mh,n=Yc(!0),r=null,i=gh,a=null;function o(o){var s,u,l,c=o.length,h=!1;for(null==r&&(a=i(l=qc())),s=0;s<=c;++s)!(s<c&&n(u=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(u,s,o),+e(u,s,o));if(l)return a=null,l+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Yc(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Yc(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Yc(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function bh(){var t=vh,e=null,n=Yc(0),r=mh,i=Yc(!0),a=null,o=gh,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==a&&(s=o(f=qc())),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 yh().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:Yc(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Yc(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Yc(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:Yc(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:Yc(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Yc(+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:Yc(!!t),u):i},u.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),u):o},u.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),u):a},u}function _h(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function xh(t){return t}ph.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 Oh=Eh(gh);function wh(t){this._curve=t}function Eh(t){function e(e){return new wh(t(e))}return e._curve=t,e}function Sh(){return t=yh().curve(Oh),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(Eh(t)):e()._curve},t;var t,e}wh.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 Th=Array.prototype.slice;function Mh(){}function Ah(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 Ch(t){this._context=t}function Ph(t){return new Ch(t)}function Dh(t){this._context=t}function Lh(t){return new Dh(t)}function kh(t){this._context=t}function Rh(t){return new kh(t)}function Ih(t,e){this._basis=new Ch(t),this._beta=e}Ch.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:Ah(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:Ah(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Dh.prototype={areaStart:Mh,areaEnd:Mh,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:Ah(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},kh.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:Ah(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Ih.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],a=e[0],o=t[n]-i,s=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Nh=function t(e){function n(t){return 1===e?new Ch(t):new Ih(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Vh(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 Bh(t,e){this._context=t,this._k=(1-e)/6}Bh.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:Vh(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:Vh(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 Gh=function t(e){function n(t){return new Bh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Uh(t,e){this._context=t,this._k=(1-e)/6}Uh.prototype={areaStart:Mh,areaEnd:Mh,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:Vh(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 zh=function t(e){function n(t){return new Uh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Hh(t,e){this._context=t,this._k=(1-e)/6}Hh.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:Vh(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 Fh=function t(e){function n(t){return new Hh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function jh(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=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);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function Wh(t,e){this._context=t,this._alpha=e}Wh.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:jh(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 qh=function t(e){function n(t){return e?new Wh(t,e):new Bh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Yh(t,e){this._context=t,this._alpha=e}Yh.prototype={areaStart:Mh,areaEnd:Mh,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:jh(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 Xh=function t(e){function n(t){return e?new Yh(t,e):new Uh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Zh(t,e){this._context=t,this._alpha=e}Zh.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:jh(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 Kh=function t(e){function n(t){return e?new Zh(t,e):new Hh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $h(t){this._context=t}function Qh(t){return new $h(t)}function Jh(t){return t<0?-1:1}function td(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Jh(a)+Jh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ed(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function nd(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function rd(t){this._context=t}function id(t){this._context=new ad(t)}function ad(t){this._context=t}function od(t){return new rd(t)}function sd(t){return new id(t)}function ud(t){this._context=t}function ld(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function cd(t){return new ud(t)}function hd(t,e){this._context=t,this._t=e}function dd(t){return new hd(t,.5)}function fd(t){return new hd(t,0)}function pd(t){return new hd(t,1)}function gd(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function vd(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function md(t,e){return t[e]}$h.prototype={areaStart:Mh,areaEnd:Mh,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))}},rd.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:nd(this,this._t0,ed(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,nd(this,ed(this,n=td(this,t,e)),n);break;default:nd(this,this._t0,n=td(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(id.prototype=Object.create(rd.prototype)).point=function(t,e){rd.prototype.point.call(this,e,t)},ad.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,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},ud.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=ld(t),i=ld(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(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)}},hd.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 yd=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=Ua.getProperty(e,"data").groupMapsTo,a=Ua.getProperty(e,"axes");return t&&(n=n.filter((function(e){return t.includes(e.group)}))),a&&Object.keys(a).forEach((function(t){var e=a[t].mapsTo,r=a[t].scaleType;if(r!==D.LINEAR&&r!==D.LOG||(n=n.map((function(t){var n;return w(w({},t),((n={})[e]=null===t[e]?t[e]:Number(t[e]),n))}))),e&&a[t].domain)if(r===D.LABELS)n=n.filter((function(n){return a[t].domain.includes(n[e])}));else{var i=a[t].domain,o=i[0],s=i[1];n=n.filter((function(t){return!(e in t)||t[e]>=o&&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=ho.items.status.ACTIVE,n=this.getDataGroups(t),r=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain(t).filter((function(t){return n.find((function(n){return n.name===t[r]&&n.status===e}))}))},t.prototype.getData=function(){return this.get("data")},t.prototype.isDataEmpty=function(){return!this.getData().length},t.prototype.setData=function(t){var e=this.sanitize(Ua.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(t){return Ua.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=ho.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),a=Xo(i,(function(t){return t[e.services.cartesianScales.getDomainIdentifier(t)]})).keys(),o=this.services.cartesianScales.domainAxisPosition,s=n.axes[o].scaleType;s===D.TIME?a.sort((function(t,e){return new Date(t)-new Date(e)})):s!==D.LOG&&s!==D.LINEAR||a.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return a.map((function(t){var n={sharedStackKey:t};return u.forEach((function(a){var o=i.find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[r]===a&&n[i].toString()===t})),s=e.services.cartesianScales.getRangeIdentifier(n);n[a]=o?o[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,a=this.getOptions().data.groupMapsTo,o=this.getDataGroupNames(i),s=this.getDataValuesGroupedByKeys(i);if(n){var u=Ua.fromPairs(s.map((function(t){return[t.sharedStackKey,0]})));s.forEach((function(t){o.forEach((function(e){u[t.sharedStackKey]+=t[e]}))})),s.forEach((function(t){o.forEach((function(e){u[t.sharedStackKey]?t[e]=t[e]/u[t.sharedStackKey]*100:t[e]=0}))}))}return function(){var t=Yc([]),e=vd,n=gd,r=md;function i(i){var a,o,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(a=0;a<l;++a){for(var h,d=s[a],f=c[a]=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(a=0,o=e(c);a<l;++a)c[o[a]].index=a;return n(c,o),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Yc(Th.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Yc(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?vd:"function"==typeof t?t:Yc(Th.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?gd:t,i):n},i}().keys(o)(s).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(n){var r=t[n];return r[a]=o[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();Ua.updateLegendAdditionalItems(e,t),this.set({options:Ua.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(Z.Model.UPDATE,{animate:t}))},t.prototype.toggleDataLabel=function(t){var e=ho.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),a=i.some((function(t){return t.status===r})),o=i.filter((function(t){return t.status===n}));if(a)if(1===o.length&&o[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,a){i[a].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(Z.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=Ua.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=Ua.getProperty(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.isUserProvidedColorScaleValid=function(){var t=Ua.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 a,o=Ua.getProperty(t,"label");if(null===o){var s=Ua.getProperty(r,i);a=s||"Ungrouped"}else a=o;var u={group:a,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=ho.items.status,r=n.ACTIVE,i=n.DISABLED,a=this.getOptions(),o=Xo(t,(function(t){return t[e]})).keys();a.data.selectedGroups.length&&(a.data.selectedGroups.every((function(t){return o.includes(t)}))||(a.data.selectedGroups=[]));var s=function(t){return!a.data.selectedGroups.length||a.data.selectedGroups.includes(t)?r:i};return o.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setCustomColorScale=function(){var t=this;if(this.isUserProvidedColorScaleValid()){var e=this.getOptions(),n=Ua.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=Ua.getProperty(this.getOptions(),"color","pairing"),e=Ua.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=Ua.getProperty(t,"option"),r=e>5?14:e;n=n<=so.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.colorClassNames=ys().range(i).domain(this.allDataGroups)},t}(),bd=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}(),_d={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  "},xd=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}()}(),Od="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,wd="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Ed="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(wd):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Sd=["top","right","bottom","left","width","height","size","weight"],Td="undefined"!=typeof MutationObserver,Md=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 a(){n&&(n=!1,t()),r&&s()}function o(){Ed(a)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(o,e);i=t}return s}(this.refresh.bind(this),20)};Md.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Md.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Md.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Md.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},Md.prototype.connect_=function(){Od&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Td?(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)},Md.prototype.disconnect_=function(){Od&&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)},Md.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Sd.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Md.getInstance=function(){return this.instance_||(this.instance_=new Md),this.instance_},Md.instance_=null;var Ad=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},Cd=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||wd},Pd=Nd(0,0,0,0);function Dd(t){return parseFloat(t)||0}function Ld(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Dd(t["border-"+n+"-width"])}),0)}function kd(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Pd;var r=Cd(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],a=t["padding-"+i];e[i]=Dd(a)}return e}(r),a=i.left+i.right,o=i.top+i.bottom,s=Dd(r.width),u=Dd(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==e&&(s-=Ld(r,"left","right")+a),Math.round(u+o)!==n&&(u-=Ld(r,"top","bottom")+o)),!function(t){return t===Cd(t).document.documentElement}(t)){var l=Math.round(s+a)-e,c=Math.round(u+o)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return Nd(i.left,i.top,s,u)}var Rd="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Cd(t).SVGGraphicsElement}:function(t){return t instanceof Cd(t).SVGElement&&"function"==typeof t.getBBox};function Id(t){return Od?Rd(t)?function(t){var e=t.getBBox();return Nd(0,0,e.width,e.height)}(t):kd(t):Pd}function Nd(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Vd=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Nd(0,0,0,0),this.target=t};Vd.prototype.isActive=function(){var t=Id(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Vd.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Bd=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(a.prototype);return Ad(o,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),o}(e);Ad(this,{target:t,contentRect:n})},Gd=function(t,e,n){if(this.activeObservations_=[],this.observations_=new xd,"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};Gd.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 Cd(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Vd(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Gd.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 Cd(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))}},Gd.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Gd.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Gd.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Bd(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Gd.prototype.clearActive=function(){this.activeObservations_.splice(0)},Gd.prototype.hasActive=function(){return this.activeObservations_.length>0};var Ud="undefined"!=typeof WeakMap?new WeakMap:new xd,zd=function(t){if(!(this instanceof zd))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=Md.getInstance(),n=new Gd(t,e,this);Ud.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){zd.prototype[t]=function(){return(e=Ud.get(this))[t].apply(e,arguments);var e}}));var Hd=void 0!==wd.ResizeObserver?wd.ResizeObserver:zd,Fd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=ja(t));var n,r,i,a,o={width:0,height:0},s=function(t){t&&Object.keys(o).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>o[e]&&-1===(""+n).indexOf("%")&&(o[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{a={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),o.width>0&&o.height>0))return o;if(e.useClientDimensions&&(s(l),o.width>0&&o.height>0))return l;if(e.useBBox&&(s(r),o.width>0&&o.height>0))return r;if(e.useBoundingRect&&(s(a),o.width>0&&o.height>0))return a}try{s({width:Ua.getProperty(t.node(),"width","baseVal","value"),height:Ua.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return o},e.appendOrSelect=function(t,e){var n=t.select(""+e);if(n.empty()){var r=e.split("#"),i=void 0,a=void 0;return 2===r.length?(i=r[0],a=(r=r[1].split("."))[0]):i=(r=e.split("."))[0],t.append(i).attr("id",a).attr("class",r.slice(1).join(" "))}return n},e.getAlignmentOffset=function(t,n,r){var i=e.getSVGElementSize(n,{useBBox:!0}),a=e.getSVGElementSize(r,{useAttr:!0}).width,o=0;return t===k.CENTER?o=Math.floor((a-i.width)/2):t===k.RIGHT&&(o=a-i.width),o},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();ja(this.getHolder()).classed(_d.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.addSVGElement=function(){var t=this.model.getOptions(),e=Ua.getProperty(t,"style","prefix"),n=ja(this.getHolder()).append("svg").classed(_d.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.svg=n.node()},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=ja(t.svg).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(ja(this.svg),{useBBox:!0}).height,n=ja(this.svg).attr("class"),r=ja(this.svg).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(ja(t),{useBBox:!0}).height)})),i<=t?ja(this.svg).attr("height",i):ja(this.svg).attr("height","100%")}},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&ja(e).on("mouseover",(function(){t.services.events.dispatchEvent(Z.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(Z.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=Ua.debounce((function(i,a){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(Z.Chart.RESIZE))}),12.5);new Hd(i).observe(e)}},e}(bd),jd=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}(bd),Wd={value:function(){}};function qd(){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 Yd(r)}function Yd(t){this._=t}function Xd(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 Zd(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Kd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Wd,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Yd.prototype=qd.prototype={constructor:Yd,on:function(t,e){var n,r=this._,i=Xd(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Kd(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Kd(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Zd(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Yd(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].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,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var $d,Qd,Jd=Object.freeze({__proto__:null,dispatch:qd}),tf=0,ef=0,nf=0,rf=0,af=0,of=0,sf="object"==typeof performance&&performance.now?performance:Date,uf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function lf(){return af||(uf(cf),af=sf.now()+of)}function cf(){af=0}function hf(){this._call=this._time=this._next=null}function df(t,e,n){var r=new hf;return r.restart(t,e,n),r}function ff(){af=(rf=sf.now())+of,tf=ef=0;try{!function(){lf(),++tf;for(var t,e=$d;e;)(t=af-e._time)>=0&&e._call.call(null,t),e=e._next;--tf}()}finally{tf=0,function(){var t,e,n=$d,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:$d=e);Qd=t,gf(r)}(),af=0}}function pf(){var t=sf.now(),e=t-rf;e>1e3&&(of-=e,rf=t)}function gf(t){tf||(ef&&(ef=clearTimeout(ef)),t-af>24?(t<1/0&&(ef=setTimeout(ff,t-sf.now()-of)),nf&&(nf=clearInterval(nf))):(nf||(rf=sf.now(),nf=setInterval(pf,1e3)),tf=1,uf(ff)))}function vf(t,e,n){var r=new hf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}hf.prototype=df.prototype={constructor:hf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?lf():+n)+(null==e?0:+e),this._next||Qd===this||(Qd?Qd._next=this:$d=this,Qd=this),this._call=t,this._time=n,gf()},stop:function(){this._call&&(this._call=null,this._time=1/0,gf())}};var mf=qd("start","end","cancel","interrupt"),yf=[];function bf(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(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 vf(a);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(vf((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(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 o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].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=df((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:mf,tween:yf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function _f(t,e){var n=Of(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function xf(t,e){var n=Of(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Of(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function wf(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[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 a[i]):o=!1;o&&delete t.__transition}}function Ef(t,e){var n,r;return function(){var i=xf(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Sf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=xf(this,t),o=a.tween;if(o!==r){i=(r=o).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)}a.tween=i}}function Tf(t,e,n){var r=t._id;return t.each((function(){var t=xf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Of(t,r).value[e]}}function Mf(t,e){var n;return("number"==typeof e?ru:e instanceof Ns?Js:(n=Ns(e))?(e=n,Js):su)(t,e)}function Af(t){return function(){this.removeAttribute(t)}}function Cf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pf(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function Df(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Lf(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttribute(t)}}function kf(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function Rf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function If(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Nf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&If(t,i)),n}return i._value=e,i}function Vf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Rf(t,i)),n}return i._value=e,i}function Bf(t,e){return function(){_f(this,t).delay=+e.apply(this,arguments)}}function Gf(t,e){return e=+e,function(){_f(this,t).delay=e}}function Uf(t,e){return function(){xf(this,t).duration=+e.apply(this,arguments)}}function zf(t,e){return e=+e,function(){xf(this,t).duration=e}}function Hf(t,e){if("function"!=typeof e)throw new Error;return function(){xf(this,t).ease=e}}function Ff(t,e,n){var r,i,a=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)?_f:xf;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var jf=Fa.prototype.constructor;function Wf(t){return function(){this.style.removeProperty(t)}}function qf(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Yf(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&qf(t,a,n)),r}return a._value=e,a}function Xf(t){return function(e){this.textContent=t.call(this,e)}}function Zf(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Xf(r)),e}return r._value=t,r}var Kf=0;function $f(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Qf(t){return Fa().transition(t)}function Jf(){return++Kf}var tp=Fa.prototype;function ep(t){return+t}$f.prototype=Qf.prototype={constructor:$f,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=zi(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,l=r[o],c=l.length,h=a[o]=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,bf(h[d],e,n,d,h,Of(s,n)));return new $f(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Fi(t));for(var r=this._groups,i=r.length,a=[],o=[],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=Of(u,n),g=0,v=f.length;g<v;++g)(d=f[g])&&bf(d,e,n,g,f,p);a.push(f),o.push(u)}return new $f(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=ji(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new $f(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,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,l=e[s],c=n[s],h=l.length,d=o[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(d[f]=u);for(;s<r;++s)o[s]=e[s];return new $f(o,this._parents,this._name,this._id)},selection:function(){return new jf(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Jf(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)if(o=s[l]){var c=Of(o,e);bf(o,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new $f(r,this._parents,t,n)},call:tp.call,nodes:tp.nodes,node:tp.node,size:tp.size,empty:tp.empty,each:tp.each,on:function(t,e){var n=this._id;return arguments.length<2?Of(this.node(),n).on.on(t):this.each(Ff(n,t,e))},attr:function(t,e){var n=Ni(t),r="transform"===n?bu:Mf;return this.attrTween(t,"function"==typeof e?(n.local?kf:Lf)(n,r,Tf(this,"attr."+t,e)):null==e?(n.local?Cf:Af)(n):(n.local?Df:Pf)(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=Ni(t);return this.tween(n,(r.local?Nf:Vf)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?yu:Mf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=oa(this,t),o=(this.style.removeProperty(t),oa(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Wf(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=oa(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=oa(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,Tf(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=xf(this,t),l=u.on,c=null==u.value[o]?a||(a=Wf(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,a=n+"";return function(){var o=oa(this,t);return o===a?null:o===r?i:i=e(r=o,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,Yf(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}}(Tf(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,Zf(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=Of(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Ef:Sf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Bf:Gf)(e,t)):Of(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Uf:zf)(e,t)):Of(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Hf(e,t)):Of(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=xf(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 np={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function rp(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return np.time=lf(),np;return n}Fa.prototype.interrupt=function(t){return this.each((function(){wf(this,t)}))},Fa.prototype.transition=function(t){var e,n;t instanceof $f?(e=t._id,t=t._name):(e=Jf(),(n=np).time=lf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)(o=s[l])&&bf(o,t,e,l,s,n||rp(o,e));return new $f(r,this._parents,t,e)};var ip=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(Z.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=Qf(t).duration(Ua.getProperty(bo,t,"duration")||bo.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=Qf(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}(bd),ap=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}(bd);function op(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 sp(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 up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=op(t),r=sp(e);return n.setDate(n.getDate()+r),n}function lp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=op(t).getTime(),r=sp(e);return new Date(n+r)}function cp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return lp(t,36e5*n)}function hp(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function dp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=op(t);return e.setHours(0,0,0,0),e}function fp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=dp(t),r=dp(e),i=n.getTime()-hp(n),a=r.getTime()-hp(r);return Math.round((i-a)/864e5)}function pp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return lp(t,6e4*n)}function gp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=op(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 vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=op(t),r=sp(e),i=n.getMonth()+r,a=new Date(0);a.setFullYear(n.getFullYear(),i,1),a.setHours(0,0,0,0);var o=gp(a);return n.setMonth(i,Math.min(o,n.getDate())),n}function mp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return lp(t,1e3*n)}function yp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return vp(t,12*n)}function bp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=op(t),r=op(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function _p(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=op(t);return!isNaN(e)}function xp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=op(t),r=op(e),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return 12*i+a}function Op(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=op(t),r=op(e);return n.getFullYear()-r.getFullYear()}function wp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=op(t),r=op(e);return n.getTime()-r.getTime()}function Ep(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wp(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Sp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wp(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Tp={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 Mp(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Ap={date:Mp({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Mp({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:Mp({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Cp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Pp(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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 Dp(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,l=s[0],c=a&&t.parsePatterns[a]||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 Lp,kp={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Tp[t]?Tp[t]:1===e?Tp[t].one:Tp[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Ap,formatRelative:function(t,e,n,r){return Cp[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:Pp({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Pp({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:Pp({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:Pp({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:Pp({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:(Lp={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(Lp.matchPattern);if(!i)return null;var a=i[0],o=n.match(Lp.parsePattern);if(!o)return null;var s=Lp.valueCallback?Lp.valueCallback(o[0]):o[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:Dp({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:Dp({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:Dp({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:Dp({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:Dp({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 Rp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return lp(t,-n)}function Ip(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Np=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Ip("yy"===e?r%100:r,e.length)},Vp=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Ip(n+1,2)},Bp=function(t,e){return Ip(t.getUTCDate(),e.length)},Gp=function(t,e){return Ip(t.getUTCHours()%12||12,e.length)},Up=function(t,e){return Ip(t.getUTCHours(),e.length)},zp=function(t,e){return Ip(t.getUTCMinutes(),e.length)},Hp=function(t,e){return Ip(t.getUTCSeconds(),e.length)},Fp=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Ip(Math.floor(r*Math.pow(10,n-3)),e.length)};function jp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=op(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 Wp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=op(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=jp(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=jp(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function qp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Wp(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=jp(n);return r}function Yp(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,a=null==i?0:sp(i),o=null==n.weekStartsOn?a:sp(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=op(t),u=s.getUTCDay(),l=(u<o?7:0)+u-o;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function Xp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=op(t,e),r=n.getUTCFullYear(),i=e||{},a=i.locale,o=a&&a.options&&a.options.firstWeekContainsDate,s=null==o?1:sp(o),u=null==i.firstWeekContainsDate?s:sp(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=Yp(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var d=Yp(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Zp(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,a=null==i?1:sp(i),o=null==n.firstWeekContainsDate?a:sp(n.firstWeekContainsDate),s=Xp(t,e),u=new Date(0);u.setUTCFullYear(s,0,o),u.setUTCHours(0,0,0,0);var l=Yp(u,e);return l}var Kp="midnight",$p="noon",Qp="morning",Jp="afternoon",tg="evening",eg="night",ng={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 Np(t,e)},Y:function(t,e,n,r){var i=Xp(t,r),a=i>0?i:1-i;return"YY"===e?Ip(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):Ip(a,e.length)},R:function(t,e){return Ip(Wp(t),e.length)},u:function(t,e){return Ip(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 Ip(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 Ip(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 Vp(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 Ip(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=op(t),r=Yp(n,e).getTime()-Zp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Ip(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=op(t),n=jp(e).getTime()-qp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Ip(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Bp(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=op(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"}):Ip(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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return Ip(a,2);case"eo":return n.ordinalNumber(a,{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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return Ip(a,e.length);case"co":return n.ordinalNumber(a,{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 Ip(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?$p:0===i?Kp: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?tg:i>=12?Jp:i>=4?Qp:eg,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 Gp(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Up(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Ip(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Ip(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):zp(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Hp(t,e)},S:function(t,e){return Fp(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return ig(i);case"XXXX":case"XX":return ag(i);case"XXXXX":case"XXX":default:return ag(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return ig(i);case"xxxx":case"xx":return ag(i);case"xxxxx":case"xxx":default:return ag(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+rg(i,":");case"OOOO":default:return"GMT"+ag(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+rg(i,":");case"zzzz":default:return"GMT"+ag(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Ip(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Ip((r._originalDate||t).getTime(),e.length)}};function rg(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+Ip(a,2)}function ig(t,e){return t%60==0?(t>0?"-":"+")+Ip(Math.abs(t)/60,2):ag(t,e)}function ag(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Ip(Math.floor(i/60),2)+n+Ip(i%60,2)}function og(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 sg(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 ug={p:sg,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],a=r[2];if(!a)return og(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}}",og(i,e)).replace("{{time}}",sg(a,e))}},lg=["D","DD"],cg=["YY","YYYY"];function hg(t){return-1!==lg.indexOf(t)}function dg(t){return-1!==cg.indexOf(t)}function fg(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 pg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vg=/^'([^]*?)'?$/,mg=/''/g,yg=/[a-zA-Z]/;function bg(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},a=i.locale||kp,o=a.options&&a.options.firstWeekContainsDate,s=null==o?1:sp(o),u=null==i.firstWeekContainsDate?s:sp(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=a.options&&a.options.weekStartsOn,c=null==l?0:sp(l),h=null==i.weekStartsOn?c:sp(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!a.localize)throw new RangeError("locale must contain localize property");if(!a.formatLong)throw new RangeError("locale must contain formatLong property");var d=op(t);if(!_p(d))throw new RangeError("Invalid time value");var f=hp(d),p=Rp(d,f),g={firstWeekContainsDate:u,weekStartsOn:h,locale:a,_originalDate:d},v=r.match(gg).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,ug[e])(t,a.formatLong,g):t})).join("").match(pg).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return _g(t);var n=ng[e];if(n)return!i.useAdditionalWeekYearTokens&&dg(t)&&fg(t),!i.useAdditionalDayOfYearTokens&&hg(t)&&fg(t),n(p,t,a.localize,g);if(e.match(yg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function _g(t){return t.match(vg)[1].replace(mg,"'")}function xg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return up(t,-n)}function Og(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return cp(t,-n)}function wg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return pp(t,-n)}function Eg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return vp(t,-n)}function Sg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return mp(t,-n)}function Tg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(e);return yp(t,-n)}var Mg=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(),a=i.data.groupMapsTo,o=Ua.getProperty(i,"axes",this.secondaryDomainAxisPosition),s=r[a];if((null===(e=o)||void 0===e?void 0:e.correspondingDatasets)&&o.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,a=n.groups,o=void 0===a?null:a;if(this.dualAxes){var s=this.model.getOptions(),u=s.data.groupMapsTo,l=Ua.getProperty(s,"axes",this.secondaryRangeAxisPosition),c=void 0;if(null!==i?c=i[u]:o&&o.length>0&&(c=o[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 Ua.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.update=function(t){var e=this;this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(M).map((function(t){return M[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!==M.LEFT&&this.rangeAxisPosition!==M.RIGHT||this.domainAxisPosition!==M.BOTTOM&&this.domainAxisPosition!==M.TOP?this.orientation=P.HORIZONTAL:this.orientation=P.VERTICAL},e.prototype.isDualAxes=function(){return this.dualAxes},e.prototype.determineAxisDuality=function(){var t,e,n,r,i=this.model.getOptions(),a=Ua.getProperty(i,"axes");((null===(t=a[M.LEFT])||void 0===t?void 0:t.correspondingDatasets)&&a[M.RIGHT]||(null===(e=a[M.RIGHT])||void 0===e?void 0:e.correspondingDatasets)&&a[M.LEFT]||(null===(n=a[M.TOP])||void 0===n?void 0:n.correspondingDatasets)&&a[M.BOTTOM]||(null===(r=a[M.BOTTOM])||void 0===r?void 0:r.correspondingDatasets)&&a[M.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=[M.BOTTOM,M.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[M.LEFT,M.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 a,o=this.model.getOptions(),s=Ua.getProperty(o,"axes")[n].mapsTo,u=null!==Ua.getProperty(r,s)?r[s]:r;switch(e){case D.LABELS:a=t(u)+t.step()/2;break;case D.TIME:a=t(new Date(u));break;default:a=t(u)}return a},e.prototype.getBoundedScaledValues=function(t,e){var n=this.model.getOptions().bounds,r=this.scales[this.rangeAxisPosition],i=this.model.getOptions(),a=Ua.getProperty(i,"axes")[this.rangeAxisPosition].mapsTo,o=void 0!==t[a]?t[a]:t;return[r(null!==Ua.getProperty(t,n.upperBoundMapsTo)?t[n.upperBoundMapsTo]:o),r(null!==Ua.getProperty(t,n.lowerBoundMapsTo)?t[n.lowerBoundMapsTo]:o)]},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 Ua.getProperty(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")},e.prototype.getRangeIdentifier=function(t){var e=this.model.getOptions();return Ua.getProperty(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return Ua.getProperty(n,"axes",t).scaleType===D.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=op(t),r=op(e),i=bp(n,r),a=Math.abs(Op(n,r));n.setFullYear(n.getFullYear()-i*a);var o=bp(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Tg(n,e),yp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=op(t),r=op(e),i=bp(n,r),a=Math.abs(xp(n,r));n.setMonth(n.getMonth()-i*a);var o=bp(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Eg(n,e),vp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=op(t),r=op(e),i=bp(n,r),a=Math.abs(fp(n,r));n.setDate(n.getDate()-i*a);var o=bp(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[xg(n,e),up(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wp(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Og(n,e),cp(r,e)];if(Ep(r,n)>30)return[wg(n,30*e),pp(r,30*e)];if(Ep(r,n)>1)return[wg(n,e),pp(r,e)];if(Sp(r,n)>15)return[Sg(n,15*e),mp(r,15*e)];if(Sp(r,n)>1)return[Sg(n,e),mp(r,e)];return[n,r]}(e,Ua.getProperty(n,"timeScale","addSpaceOnEdges")):function(t,e){var n=t[0],r=t[1],i=(r-n)*e;return[n>=0&&n-i<0?0:n-i,r<=0&&r+i>0?0:r+i]}(e,lo.paddingRatio)},e.prototype.findVerticalAxesPositions=function(){var t=this.model.getOptions(),e=Ua.getProperty(t,"axes"),n=this.isDualAxes();return null===Ua.getProperty(e,M.LEFT)&&null!==Ua.getProperty(e,M.RIGHT)||!0===Ua.getProperty(e,M.RIGHT,"main")||n&&Ua.getProperty(e,M.LEFT,"correspondingDatasets")?{primary:M.RIGHT,secondary:M.LEFT}:{primary:M.LEFT,secondary:M.RIGHT}},e.prototype.findHorizontalAxesPositions=function(){var t=this.model.getOptions(),e=Ua.getProperty(t,"axes"),n=this.isDualAxes();return null===Ua.getProperty(e,M.BOTTOM)&&null!==Ua.getProperty(e,M.TOP)||!0===Ua.getProperty(e,M.TOP,"main")||n&&Ua.getProperty(e,M.BOTTOM,"correspondingDatasets")?{primary:M.TOP,secondary:M.BOTTOM}:{primary:M.BOTTOM,secondary:M.TOP}},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Ua.getProperty(n,"axes",t.primary),i=Ua.getProperty(n,"axes",e.primary),a=r.scaleType||D.LINEAR,o=i.scaleType||D.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,(o!==D.LABELS&&o!==D.TIME&&a===D.LABELS||a===D.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=Ua.getProperty(e,"axes",t),r=Ua.getProperty(e,"bounds"),i=n.includeZero,a=Ua.getProperty(n,"scaleType")||D.LINEAR;if(this.model.isDataEmpty())return[];var o,s,u=this.model.getDisplayData(),l=n.extendLinearDomainBy,c=n.mapsTo,h=n.percentage,d=lo.ratio,f=d.reference,p=d.compareTo;if(n.domain)return a===D.LABELS?n.domain:(a===D.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&&a===D.LABELS)return Xo(u,(function(t){return t[c]})).keys();var g=this.model.getDataGroupNames();if(a===D.LABELS_RATIO)return u.map((function(t){return t[f]+"/"+t[p]}));if(a===D.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&&g&&t===this.getRangeAxisPosition()){var v=e.data.groupMapsTo,m=this.model.getDataValuesGroupedByKeys(g),y=u.filter((function(t){return!g.includes(t[v])})),b=m.map((function(t){t.sharedStackKey;return ds(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=E(b,y.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 a!==D.TIME&&i&&s.push(0),o=es(s),o=this.extendsDomain(t,o)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Ua.getProperty(e,"axes",t);if(!n)return null;var r,i=Ua.getProperty(n,"scaleType")||D.LINEAR;return this.scaleTypes[t]=i,(r=i===D.TIME?zc():i===D.LOG?function t(){var e=el(Au()).domain([1,10]);return e.copy=function(){return Mu(e,t()).base(e.base())},fs.apply(e,arguments),e}().base(n.base||10):i===D.LABELS||i===D.LABELS_RATIO?bs():Yu()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=Ua.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)!==D.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=Ua.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}(bd);var Ag,Cg,Pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:gh,curveLinearClosed:Qh,curveBasis:Ph,curveBasisClosed:Lh,curveBasisOpen:Rh,curveBundle:Nh,curveCardinal:Gh,curveCardinalClosed:zh,curveCardinalOpen:Fh,curveCatmullRom:qh,curveCatmullRomClosed:Xh,curveCatmullRomOpen:Kh,curveMonotoneX:od,curveMonotoneY:sd,curveNatural:cd,curveStep:dd,curveStepAfter:pd,curveStepBefore:fd},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}(bd),Dg=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(!Ua.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=Ua.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===M.BOTTOM&&e===D.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,es(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(Z.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return Ua.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=Ua.getProperty(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&i&&n){var a=r.stacked?"sharedStackKey":this.services.cartesianScales.getDomainIdentifier(),o=t.filter((function(t){return new Date(t[a])>=n[0]&&new Date(t[a])<=n[1]}));if(o.length>0)return o}return t},e.prototype.zoomIn=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=xo.handleWidth,r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());var i=r(e[0]),a=r(e[1]);if(!(a-i<n+1)){var o=r.range(),s=a-i,u=Math.min((o[1]-o[0])/2*(t/2),s/2),l=i+u,c=a-u;l>=c&&(l=i+s/2-n/2,c=a-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]),a=n.range(),o=(a[1]-a[0])/2*(t/2),s=Math.max(r-o,a[0]),u=Math.min(i+o,a[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())<Ua.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 Ua.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return Ua.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(bd),Lg=function(){function t(t,e,n){if(this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){var r=Ua.getProperty(this.model.getOptions(),"style","prefix");this.id=r+"--"+this.configs.id}this.parent||this.setParent(ja(this.services.domUtils.getMainSVG()))}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=Ua.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(_d.prefix+"--"+n+"--"+this.type,!0).attr("id",this.id),e&&e.classed(_d.prefix+"--"+n+"--"+this.type,!1).attr("id",this.id)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=Ua.getProperty(this.model.getOptions(),"style","prefix"),n=this.id?"#"+this.id:"",r=Fd.appendOrSelect(this.parent,"g"+n+"."+_d.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var i=this.model.get("chartClipId");i&&r.attr("clip-path","url(#"+i+")")}return r}return this.parent},t.prototype.getOptions=function(){return this.configs.options?Ua.merge({},this.model.getOptions(),this.configs.options):this.model.getOptions()},t}(),kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getContainerSVG().attr("role",r.GROUP).attr("data-name","legend-items"),n=this.getOptions(),i=Ua.getProperty(n,"legend"),a=this.model.getDataGroups(),o=Ua.getProperty(i,"order");o&&(a=this.sortDataGroups(a,o));var s=e.selectAll("g.legend-item").data(a,(function(t){return t.name})),u=s.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===ho.items.status.ACTIVE})),l=Ua.getProperty(this.getOptions(),"legend","clickable");e.classed("clickable",l);var c=ho.checkbox.radius;u.append("rect").classed("checkbox",!0).merge(s.select("rect.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",l?0:-1).attr("aria-label",(function(t){return t.name})).attr("aria-checked",(function(t){return t.status===ho.items.status.ACTIVE})).attr("width",2*c).attr("height",2*c).attr("rx",1).attr("ry",1).attr("class",(function(e,n){return t.model.getColorClassName({classNameTypes:[T.FILL],dataGroupName:e.name,originalClassName:"checkbox"})})).style("fill",(function(e){return e.status===ho.items.status.ACTIVE?t.model.getFillColor(e.name)||t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===ho.items.status.ACTIVE}));var h=u.append("text").merge(s.select("text"));this.truncateLegendText(h);var d={startingPoint:0,itemIndexInLine:0,lineNumber:0,lastLegendItemTextWidth:0};this.breakItemsIntoLines(u,"legend-item",d);var f=Ua.getProperty(n,"legend","additionalItems");if(f&&a.length){var p=this,g=e.selectAll("g.additional-item").data(f);g.exit().remove();var v,m=g.enter().append("g").merge(g).classed("additional-item",!0);m.selectAll("*").remove();var y=1;m.append("g").classed("icon",!0).each((function(t,e){var n=ja(this);v&&v==t.type?y++:(v=t.type,y=1),p.addAdditionalItem(n,t,y)}));var b=m.append("text").merge(m.select("text"));p.truncateLegendText(b),this.breakItemsIntoLines(m,"additional-item",d)}s.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),l&&u.size()>0&&this.addEventListeners();var _=Ua.getProperty(i,"alignment"),x=Fd.getAlignmentOffset(_,e,this.getParent());e.attr("transform","translate("+x+", 0)")},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=ho.area,a=i.width,o=i.height;if(e.type===X.RADIUS){var s=ho.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===X.LINE){var h=ho.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",a).attr("y2",h.yPosition).style("stroke",e.stroke?e.stroke:h.stroke).style("stroke-width",h.strokeWidth)}else if(e.type===X.AREA)t.select("rect.area").empty()&&t.append("rect").classed("area-"+n,!0).attr("role",r.IMG).attr("aria-label","area").attr("width",a).attr("height",o).style("fill",n>3&&!e.fill?ho.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===X.SIZE){var d=ho.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 24-t.height})).style("fill",e.fill?e.fill:l).style("stroke",e.stroke?e.stroke:c).style("stroke-width",1)}else if(e.type===X.QUARTILE){u=ho.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}))}},e.prototype.truncateLegendText=function(t){var e=Ua.getProperty(this.getOptions(),"legend","truncation"),n=Ua.getProperty(e,"type"),r=Ua.getProperty(e,"threshold"),i=Ua.getProperty(e,"numCharacter");n!==C.NONE?t.html((function(t){return t.name.length>r?Ua.truncateLabel(t.name,n,i):t.name})):t.html((function(t){return t.name}))},e.prototype.breakItemsIntoLines=function(t,e,n){var r=this,i=this.getContainerSVG(),a=ho.items.status.DISABLED,o=this.model.getDataGroups().some((function(t){return t.status===a}));t.merge(i.selectAll("g."+e)).each((function(t){var e=ja(this),i=Fd.getSVGElementSize(r.parent,{useAttr:!0});t.type?r.setLegendItemPosition(e,i,n,t.type):(n.hasDeactivatedItems=o,r.setLegendItemPosition(e,i,n,X.CHECKBOX))}))},e.prototype.setLegendItemPosition=function(t,e,n,r){var i=Ua.getProperty(this.getOptions(),"legend","orientation"),a=ho.items.horizontalSpace,o=ho.items.verticalSpace,s=ho.items.textYOffset,u=r===X.CHECKBOX||r===X.RADIUS?2*ho.checkbox.radius:ho.area.width,l=ho.items.spaceAfter,c=Fd.getSVGElementSize(t.select("text"),{useBBox:!0}),h=ho.area.width/2-1;0===n.itemIndexInLine||0===n.lastLegendItemTextWidth||i===R.VERTICAL?n.itemIndexInLine>0&&n.lineNumber++:(n.startingPoint+=n.lastLegendItemTextWidth+u+l+a,n.startingPoint+u+l+c.width>e.width&&(n.lineNumber++,n.startingPoint=24===u?h:0,n.itemIndexInLine=0)),n.lastLegendItemTextWidth=c.width;var d=n.lineNumber*o,f=s+d+3;if(r===X.CHECKBOX){t.select("rect.checkbox").attr("x",n.startingPoint).attr("y",d),t.select("text").attr("x",n.startingPoint+u+l).attr("y",f);var p=(!i||i===R.HORIZONTAL)&&parseInt(t.select("rect.checkbox").attr("y"))%24==0,g=i===R.VERTICAL&&"0"===t.select("rect.checkbox").attr("x"),v=p||g;n.hasDeactivatedItems&&t.select("g.check").empty()&&v?(t.append("g").classed("check",!0).html('\n\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t<path 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"></path>\n\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t'),t.select("g.check svg").attr("width",u-1).attr("height",u-1).attr("x",parseFloat(t.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(t.select("rect.checkbox").attr("y"))+.5)):n.hasDeactivatedItems||t.select("g.check").empty()||t.select("g.check").remove()}else r===X.RADIUS?(t.selectAll("circle.radius").attr("cx",(function(t){return n.startingPoint+t.cx})).attr("cy",(function(t){return d+t.cy})),t.select("text").attr("x",n.startingPoint+u+l).attr("y",f)):r===X.SIZE?(t.selectAll("g.icon").attr("transform","translate("+(n.startingPoint-h)+", "+(d-12)+")"),t.select("text").attr("x",n.startingPoint+u+l-h).attr("y",f)):(t.selectAll("g.icon").attr("transform","translate("+(n.startingPoint-h)+", "+d+")"),t.select("text").attr("x",n.startingPoint+u+l-h).attr("y",f));n.itemIndexInLine++},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.getOptions(),r=Ua.getProperty(n,"legend"),i=Ua.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(Z.Legend.ITEM_HOVER,{hoveredElement:ja(this)});var e=ho.checkbox.radius,n=ja(this);n.select("rect.checkbox").classed("hovered",!0),n.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(n.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(n.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower();var r=n.datum();r.name.length>i&&t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:n,content:r.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(Z.Legend.ITEM_CLICK,{clickedElement:ja(this)});var e=ja(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=ja(this);e.select("rect.hover-stroke").remove(),e.select("rect.checkbox").classed("hovered",!1),t.services.events.dispatchEvent(Z.Tooltip.HIDE),t.services.events.dispatchEvent(Z.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("g.legend-item rect.checkbox").on("keyup",(function(e){!Da.key||"Enter"!==Da.key&&" "!==Da.key||(Da.preventDefault(),t.model.toggleDataLabel(e.name))})),e.selectAll("g.additional-item").on("mouseover",(function(){var e=ja(this),n=e.datum();n.name.length>i&&t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:e,content:n.name})}))},e}(Lg);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Cg||(Cg={}));var Rg=((Ag={})[Cg.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)}},Ag[Cg.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)}},Ag[Cg.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)}},Ag[Cg.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)}},Ag),Ig="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Ng=function(){function t(t){void 0===t&&(t={}),this.positions=Rg,this.positions=Object.assign({},Rg,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(),a=document.body.getBoundingClientRect();return{top:i.top-a.top+n.top,left:i.left-a.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),a=t.getBoundingClientRect();return this.calculatePosition(i,a,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 a=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var o=n.map((function(n){var o=i(t,e,n),s=a.getPlacementBox(e,o),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 o.sort((function(t,e){return e.weight-t.weight})),o[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:Ig.innerHeight-Ig.scrollY,height:Ig.innerWidth-Ig.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}(),Vg=(new Ng,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function Bg(t,e,n,r,i){var a=0===e,o=2===Number(bg(new Date(t),"c")),s=1===Number(bg(new Date(t),"q")),u=0!==e?n[e-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return a||Hg(t)||Fg(t,u)||jg(t);case"daily":return i?a||o||jg(t):a||Fg(t,u)||jg(t);case"monthly":return a||jg(t);case"quarterly":return a||s;case"yearly":return!1;default:throw new Error(r+" is not a valid time interval.")}}function Gg(t,e,n,r,i){var a=i.showDayName,o="daily"===r&&a?"weekly":r,s=new Date(t),u=Ua.getProperty(i,"timeIntervalFormats")[o],l=Ua.getProperty(u,"primary"),c=Ua.getProperty(u,"secondary");return bg(s,Bg(t,e,n,r,a)?l:c,{locale:i.localeObject})}function Ug(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function zg(t){return 1===t.length?"15seconds":function(t){var e=Vg.reduce((function(e,n,r){n[0];var i=n[1],a=Vg[e][1];return Math.abs(a-t)<Math.abs(i-t)?e:r}),0);return Vg[e][0]}(hs(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function Hg(t){var e=Ug(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function Fg(t,e){return Ug(t).M!==Ug(e).M}function jg(t){var e=Ug(t),n=e.M,r=e.d,i=e.s,a=e.m,o=e.H;return 1===n&&1===r&&0===o&&0===a&&0===i}var Wg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="threshold",r.positionService=new Ng,r}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=Ua.getProperty(this.getOptions(),"axes"),r=[];Object.keys(n).forEach((function(t){if(Object.values(M).includes(t)){var e=n[t];e.thresholds&&e.thresholds.length>0&&r.push({axisPosition:t,thresholds:e.thresholds})}}));var i=this.getContainerSVG({withinChartClip:!0}).selectAll("g.axis-thresholds").data(r,(function(t){return t.axisPosition}));i.exit().attr("opacity",0).remove();var a=i.enter().append("g").merge(i);a.attr("class",(function(t){return"axis-thresholds "+t.axisPosition}));var o=a.selectAll("g.threshold-group").data((function(t){return t.thresholds.map((function(e){return e.axisPosition=t.axisPosition,e}))}));o.exit().attr("opacity",0).remove();var s=o.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(o).attr("class","threshold-group");var u=this;a.each((function(e){var n=e.axisPosition,r=u.services.cartesianScales.getScaleByPosition(n),i=u.services.cartesianScales.getScaleTypeByPosition(n),a=u.services.cartesianScales.getMainXScale(),o=u.services.cartesianScales.getMainYScale(),s=i===D.LABELS,l=a.range(),c=l[0],h=l[1],d=o.range(),f=d[0],p=d[1],g=u.services.cartesianScales,v=g.getOrientation(),m=Ua.flipDomainAndRangeBasedOnOrientation((function(t){return g.getDomainValue(t)}),(function(t){return g.getRangeValue(t)}),v),y=m[0],b=m[1],_=ja(this);n===M.TOP||n===M.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(Z.Threshold.SHOW,(function(t){e.setThresholdLabelPosition(t.detail.datum),e.label.classed("hidden",!1)})),this.services.events.addEventListener(Z.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)===D.TIME){var i=[M.LEFT,M.RIGHT].includes(n),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=i?o:a,u=Ua.getProperty(r,"timeScale"),l=zg(s.ticks());return Gg(e,0,s.ticks(),l,u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=ja(this.services.domUtils.getHolder()),e=Ua.getProperty(this.getOptions(),"style","prefix");this.label=Fd.appendOrSelect(t,"div."+_d.prefix+"--"+e+"--threshold--label").classed("hidden",!0)},e.prototype.setThresholdLabelPosition=function(t){var e=this.services.domUtils.getHolder(),n=Ya(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(),a=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},i,[Cg.RIGHT,Cg.LEFT,Cg.TOP,Cg.BOTTOM],(function(){return{width:e.offsetWidth,height:e.offsetHeight}})),o=this.positionService.findPositionAt({left:n[0],top:n[1]},i,a);this.positionService.setElement(i,o)},e.prototype.addEventListeners=function(){var t=this;this.getContainerSVG({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(){ja(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(Z.Threshold.SHOW,{hoveredElement:ja(this),datum:ja(this).datum()})})).on("mouseout",(function(){ja(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(Z.Threshold.HIDE,{hoveredElement:ja(this),datum:ja(this).datum()})}))},e}(Lg),qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return n(e,t),e.prototype.render=function(){var t=this.getContainerSVG(),e=t.selectAll("text.title").data([this.getOptions().title]);e.enter().append("text").classed("title",!0).merge(e).attr("x",0).attr("y","1em").html((function(t){return t}));var n=this.getMaxTitleWidth(),r=Fd.appendOrSelect(t,"text.title");r.node().getComputedTextLength()>n&&n>0&&this.truncateTitle(r,n),e.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=Fd.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),a=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,a-1)).append("tspan").text("...");var o=this;t.on("mouseover",(function(){o.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){o.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("mouseout",(function(){o.services.events.dispatchEvent(Z.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return Fd.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}(Lg),Yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e}return n(e,t),e.prototype.render=function(){var t=this,e=this.model.getDisplayData(),n=this.getOptions(),r=this.getContainerSVG(),i=n.data.groupMapsTo,a=parseFloat(getComputedStyle(Fd.appendOrSelect(r,"text.percent-value").node()).fontSize).toString().replace(/[^0-9]/g,""),o=r.selectAll("text.meter-title").data([e[i]]);o.enter().append("text").classed("meter-title",!0).merge(o).attr("x",0).attr("y","1em").text((function(t){return t})),o.exit().remove(),this.appendPercentage();var s=Ua.getProperty(n,"meter","statusBar","percentageIndicator","useValueColor"),u=Ua.getProperty(n,"meter","statusBar","percentageIndicator","useStatusColor");s&&1!=u&&Fd.appendOrSelect(r,"text.percent-value").style("fill",(function(){return t.model.getFillColor(e[i])}));o.attr("y",a),this.displayStatus();var l=this.getMaxTitleWidth(),c=Fd.appendOrSelect(r,"text.meter-title");l>0&&c.node().getComputedTextLength()>l&&this.truncateTitle(c,l)},e.prototype.displayStatus=function(){var t=this.getContainerSVG(),e=(this.getOptions(),Fd.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0})),n=e.width?e.width:this.parent.node().getAttribute("width"),r=this.model.getStatus(),i=po.status.indicatorSize/2,a=Fd.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),o=r?[r]:[],s=a.selectAll("circle.status").data(o);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var u=a.selectAll("path.innerFill").data(o);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.getOptions(),e=this.model.getStatus(),n=Ua.getProperty(t,"color","scale"),r=Ua.getProperty(t,"meter","statusBar","percentageIndicator","useStatusColor"),i=this.model.getDisplayData().value,a=this.getContainerSVG(),o=Fd.appendOrSelect(a,"text.meter-title"),s=Ua.getProperty(this.model.getOptions(),"meter","statusBar","percentageIndicator","removePercentage"),u=Ua.getProperty(this.model.getOptions(),"meter","statusBar","percentageIndicator","fontSize"),l=!0===Ua.getProperty(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[i]:[],c=a.selectAll("text.percent-value").data(l),h=po.statusBar.paddingRight;c.enter().append("text").classed("percent-value",!0).merge(c).text((function(t){return t+(s?"":"%")})).style("font-size",u).attr("class",!0!==r||null==e&&n?"percent-value":"percent-value "+e).attr("x",+o.attr("x")+o.node().getComputedTextLength()+h).attr("y",o.attr("y")),c.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=Fd.appendOrSelect(this.parent,"tspan"),i=po.statusBar.paddingRight,a=Math.ceil(r.node().getComputedTextLength());Fd.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+a+i)},e.prototype.getMaxTitleWidth=function(){var t=Fd.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),e=t.width?t.width:this.parent.node().getAttribute("width"),n=Fd.appendOrSelect(this.parent,"text.percent-value"),r=po.statusBar.paddingRight,i=n.node().getComputedTextLength(),a=Fd.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(Fd.getSVGElementSize(a,{useBBox:!0}).width+po.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case F.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 F.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case F.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}(qg),Xg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.isEventListenerAdded=!1,i.positionService=new Ng,i.handleShowTooltip=function(t){var e=t.detail.data||t.detail.items,n=i.getTooltipHTML(t),r=Fd.appendOrSelect(i.tooltip,"div.content-box");if(Ua.getProperty(i.getOptions(),"tooltip","customHTML"))if(t.detail.content){var a='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";r.html(a)}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(Z.Tooltip.MOVE,(function(e){t.positionTooltip(e)})),this.services.events.addEventListener(Z.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(Z.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(Z.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(Z.Tooltip.MOVE,null),this.services.events.removeEventListener(Z.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(Z.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(Z.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=Ua.getProperty(n,"tooltip","truncation","type"),i=Ua.getProperty(n,"tooltip","truncation","threshold"),a=Ua.getProperty(n,"tooltip","truncation","numCharacter");return r!==C.NONE?t.map((function(t){return t.value=t.value?e.valueFormatter(t.value,t.label):t.value,t.label&&t.label.length>i&&(t.label=Ua.truncateLabel(t.label,r,a)),t.value&&t.value.length>i&&(t.value=Ua.truncateLabel(t.value,r,a)),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<p class="label">'+(t.label||"")+'</p>\n\t\t\t\t\t\t\t\t<p class="value">'+(void 0===t.value||null===t.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=Ua.getProperty(n,"tooltip","valueFormatter");return r?r(t,e):"function"==typeof t.getTime?bg(t,"MMM d, yyyy"):t.toLocaleString()},e.prototype.render=function(){var t=this.getOptions(),e=Ua.getProperty(t,"tooltip","enabled");if(e){var n=ja(this.services.domUtils.getHolder()),r=Ua.getProperty(t,"style","prefix");this.tooltip=Fd.appendOrSelect(n,"div."+_d.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(),a=Ua.getProperty(i,"zoomBar","top","enabled"),o=Ua.getProperty(t,"detail","mousePosition");if(o){var s=Ua.getProperty(i,"zoomBar","top","type"),u=xo.height[s];a&&(o[1]+=u+xo.spacerHeight)}else o=Ya(n);var l=this.positionService.findBestPlacementAt({left:o[0],top:o[1]},r,[Cg.RIGHT,Cg.LEFT,Cg.TOP,Cg.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),c=yo.horizontalOffset;l===Cg.LEFT&&(c*=-1),e=this.positionService.findPositionAt({left:o[0]+c,top:o[1]},r,l),this.positionService.setElement(r,e)},e}(Lg),Zg=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=this.getOptions(),i=this.services.cartesianScales,a=i.getDomainAxisOptions(),o=i.getDomainIdentifier(),s=r.data.groupMapsTo,u=a.title;if(!u){var l=i.getDomainAxisPosition();u=l===M.BOTTOM||l===M.TOP?"x-value":"y-value"}var c,h=n[0][o];if(1===n.length){var d=n[0],f=i.getRangeAxisPosition({datum:d}),p=i.getRangeIdentifier(d),g=i.getAxisOptions(f),v=d[p],m=g.title;m||(m=f===M.LEFT||f===M.RIGHT?"y-value":"x-value"),c=E([{label:u,value:h}],Array.isArray(v)&&2===v.length?[{label:"Start",value:v[0]},{label:"End",value:v[1]}]:[{label:m,value:d[p]}]),t.detail.additionalItems&&t.detail.additionalItems.forEach((function(t){return c.push({label:t.label,value:t.value})})),c.push({label:r.tooltip.groupLabel,value:d[s],color:this.model.getFillColor(d[s]),class:this.model.getColorClassName({classNameTypes:[T.TOOLTIP],dataGroupName:d[s]})})}else if(n.length>1){if(c=(c=[{label:u,value:h}]).concat(n.map((function(t){return{label:t[s],value:t[i.getRangeIdentifier(t)],color:e.model.getFillColor(t[s]),class:e.model.getColorClassName({classNameTypes:[T.TOOLTIP],dataGroupName:t[s]})}})).sort((function(t,e){return e.value-t.value}))),!i.isDualAxes()&&!0===Ua.getProperty(r,"tooltip","showTotal")){var y=i.getRangeIdentifier();c.push({label:r.tooltip.totalLabel||"Total",value:n.reduce((function(t,e){return t+e[y]}),0),bold:!0})}}return c},e}(Xg),Kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",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?uo.opacity.unselected:uo.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",uo.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),r=[0,0],i=this.services.cartesianScales,a=i.getOrientation(),o=bh().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=Ua.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)};a===P.VERTICAL?(r=this.services.cartesianScales.getMainYScale().domain(),o.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(),o.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=Ua.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=Ua.getProperty(this.getOptions(),"style","prefix"),v=Fd.appendOrSelect(ja(this.services.domUtils.getHolder()),"svg."+_d.prefix+"--"+g+"--chart-svg");if(p.exit().attr("opacity",0).remove(),s.length){if(f){var m=v.select("path."+this.model.getColorClassName({classNameTypes:[T.STROKE],dataGroupName:s[0].name})).node(),y=void 0;if(m)y=getComputedStyle(m,null).getPropertyValue("stroke");else{var b=Ua.getProperty(this.model.getOptions(),"color","scale");y=b[Object.keys(b)[0]]}ap.appendOrUpdateLinearGradient({svg:this.parent,id:s[0].name.replace(" ","")+"_"+this.gradient_id,x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:ap.getStops(r,y)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));var _=this,x=p.enter().append("path");f?x.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:[T.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return o(e)})):(x.attr("opacity",0).merge(p).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[T.FILL,T.STROKE],dataGroupName:t.name,originalClassName:"area"})})).style("fill",(function(t){return _.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",l?1:uo.opacity.selected).attr("d",(function(t){var e=t.data;return o(e)})),l&&x.attr("fill-opacity",uo.opacity.selected).style("stroke",(function(t){return _.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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Lg),$g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",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 Ua.getProperty(t,0,r)!==n.datum().name?uo.opacity.unselected:uo.opacity.selected}))},e.handleLegendMouseOut=function(){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",uo.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this,a=this.getOptions(),o=a.data.groupMapsTo,s=Object.keys(a.axes).some((function(t){return a.axes[t].percentage})),u=this.model.getStackedData({percentage:s,groups:this.configs.groups}),l=Ua.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 Ua.getProperty(t,0,o)}));this.areaGenerator=bh().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 Ua.getProperty(t,0,o)})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[T.FILL],dataGroupName:Ua.getProperty(t,0,o),originalClassName:"area"})})).style("fill",(function(t){return i.model.getFillColor(Ua.getProperty(t,0,o))})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",uo.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}(Lg),Qg=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=Fd.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}(Lg),Jg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getOptions().data.groupMapsTo,i=this.getContainerSVG({withinChartClip:!0}),a=this.model.getDisplayData(this.configs.groups),o=i.selectAll("path.bar").data(a,(function(t){return t[n]}));o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).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:[T.FILL],dataGroupName:t[n],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r,i,a=e.services.cartesianScales.getRangeIdentifier(),o=e.getBarWidth(),s=t[a],u=e.services.cartesianScales.getDomainValue(t,n)-o/2,l=u+o;if(Array.isArray(s)&&2===s.length?(r=e.services.cartesianScales.getRangeValue(s[0]),i=e.services.cartesianScales.getRangeValue(s[1],n)):(r=e.services.cartesianScales.getRangeValue(0),i=e.services.cartesianScales.getRangeValue(t,n)),!e.isOutsideZoomedDomain(u,l))return Ua.generateSVGPathString({x0:u,x1:l,y0:r,y1:i},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=ja(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(Z.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){ja(this);t.services.events.dispatchEvent(Z.Bar.BAR_MOUSEMOVE,{element:ja(this),datum:e}),t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(Z.Bar.BAR_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(Z.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(Z.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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Qg),tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.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 a=this.getContainerSVG({withinChartClip:!0}),o=Xo(n,(function(t){return t[e.services.cartesianScales.getDomainIdentifier(t)]})).keys(),s=a.selectAll("g.bars").data(o,(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()===P.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:[T.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,a=n+e.getBarWidth(),o=e.services.cartesianScales.getRangeAxisPosition({datum:t}),s=e.services.cartesianScales.getValueThroughAxisPosition(o,0),u=e.services.cartesianScales.getRangeValue(t);if(!e.isOutsideZoomedDomain(r,a))return Ua.generateSVGPathString({x0:r,x1:a,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=ja(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(Z.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){var n=ja(this);t.services.events.dispatchEvent(Z.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(Z.Bar.BAR_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(Z.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(Z.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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Z.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=Ua.getProperty(t,"bars","width"),n=Ua.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(),a=this.services.cartesianScales.getDomainScale();return Math.min(n,(a.step()-i)/r)},e.prototype.setGroupScale=function(){var t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=bs().domain(t).rangeRound([0,this.getGroupWidth()])},e}(Qg),ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG({withinChartClip:!0}),i=this.getOptions(),a=i.data.groupMapsTo,o=this.model.getStackedData({groups:this.configs.groups}),s=n.selectAll("g.bars").data(o,(function(t){return Ua.getProperty(t,0,a)}));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:[T.FILL],dataGroupName:t[a],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,a=e.getBarWidth(),o=e.services.cartesianScales.getDomainValue(r,n)-a/2,s=o+a,u=e.services.cartesianScales.getRangeValue(t[0],n),l=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(o,s))return Math.abs(l-u)>0&&Math.abs(l-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===P.VERTICAL?l+=1:l-=1),Ua.generateSVGPathString({x0:o,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=ja(this);i.classed("hovered",!0),i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")),e.services.events.dispatchEvent(Z.Bar.BAR_MOUSEOVER,{element:i,datum:n});var a=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===a){var o=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier();(r={})[o]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,a=r}e.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:i,data:[a]})})).on("mousemove",(function(t){var n=ja(this);e.services.events.dispatchEvent(Z.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(Z.Bar.BAR_CLICK,{element:ja(this),datum:t})})).on("mouseout",(function(t){var n=ja(this);n.classed("hovered",!1),e.services.events.dispatchEvent(Z.Bar.BAR_MOUSEOUT,{element:n,datum:t}),e.services.events.dispatchEvent(Z.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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Qg),nv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="boxplot",e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getContainerSVG({withinChartClip:!0}),i=this.getOptions().data.groupMapsTo,a=this.model.getDataGroupNames(),o=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),u=o.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===P.VERTICAL,m=Ua.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)/a.length),x=Math.min(_/2,16),O=this.model.getBoxplotData(),w=n.selectAll(".box-group").data(O);w.exit().remove();var E=w.enter().append("g").attr("class","box-group"),S=w.merge(E);E.append("path").merge(w.select("path.vertical-line.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[T.STROKE],originalClassName:"vertical-line start"})})).attr("stroke-width",co.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),a=p.getRangeValue(t.quartiles.q_25);return Ua.generateSVGPathString({x0:e,x1:n,y0:r,y1:a},g)})),E.append("path").merge(w.select("path.vertical-line.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[T.STROKE],originalClassName:"vertical-line end"})})).attr("stroke-width",co.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),a=p.getRangeValue(t.quartiles.q_75);return Ua.generateSVGPathString({x0:e,x1:n,y0:r,y1:a},g)})),E.append("path").merge(w.select("path.box")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[T.FILL,T.STROKE],originalClassName:"box"})})).attr("fill-opacity",co.box.opacity.default).attr("stroke-width",co.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)),a=r+Math.abs(p.getRangeValue(t.quartiles.q_75)-p.getRangeValue(t.quartiles.q_25));return Ua.generateSVGPathString({x0:e,x1:n,y0:r,y1:a},g)})),E.append("path").merge(w.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(t.whiskers.min),a=p.getRangeValue(t.whiskers.max);return Ua.generateSVGPathString({x0:e,x1:n,y0:r,y1:a},g)})),E.append("path").merge(w.select("path.whisker.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[T.STROKE],originalClassName:"whisker start"})})).attr("stroke-width",co.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),a=p.getRangeValue(t.whiskers.min);return Ua.generateSVGPathString({x0:e,x1:n,y0:r,y1:a},g)})),E.append("path").merge(w.select("path.median")).attr("fill","none").attr("class",(function(){return e.model.getColorClassName({classNameTypes:[T.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),a=r;return Ua.generateSVGPathString({x0:e,x1:n,y0:r,y1:a},g)})),E.append("path").merge(w.select("path.whisker.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[T.STROKE],originalClassName:"whisker end"})})).attr("stroke-width",co.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),a=p.getRangeValue(t.whiskers.max);return Ua.generateSVGPathString({x0:e,x1:n,y0:r,y1:a},g)}));var M=S.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}))}));M.exit().remove();var A=M.enter().append("circle");M.merge(A).attr("r",co.circle.radius).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[T.FILL,T.STROKE],originalClassName:"outlier"})})).attr("fill-opacity",co.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=ja(this);ja(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",co.box.opacity.hovered),t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:i,items:[{label:e.tooltip.groupLabel,value:r[n],class:t.model.getColorClassName({classNameTypes:[T.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(Z.Boxplot.BOX_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=ja(this);t.services.events.dispatchEvent(Z.Boxplot.BOX_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(Z.Boxplot.BOX_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(this);ja(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",co.box.opacity.default),t.services.events.dispatchEvent(Z.Boxplot.BOX_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(Z.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 a=ja(this);a.classed("hovered",!0).attr("fill-opacity",co.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:a,items:[{label:e.tooltip.groupLabel,value:i[n],class:t.model.getColorClassName({classNameTypes:[T.TOOLTIP]})},{label:"Outlier",value:i[r]}]}),t.services.events.dispatchEvent(Z.Boxplot.OUTLIER_MOUSEOVER,{element:a,datum:i})})).on("mousemove",(function(e){var n=ja(this);t.services.events.dispatchEvent(Z.Boxplot.OUTLIER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(Z.Boxplot.OUTLIER_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(this);n.classed("hovered",!1).attr("fill-opacity",co.circle.opacity.default),t.services.events.dispatchEvent(Z.Boxplot.OUTLIER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.HIDE,{hoveredElement:n})}))},e}(Lg),rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(Z.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(Z.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(Ua.getProperty(this.getOptions(),"points","enabled")||Ua.getProperty(this.getOptions(),"bubble","enabled")){var e=this.getContainerSVG({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 a=i.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(i);this.styleCircles(a,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=Ua.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),a=i[0],o=i[1],s=Ua.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 o&&a?h<=o.scaleValue&&c>=a.scaleValue:o?h<=o.scaleValue:a?c>=a.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),a=i.points,o=a.filled,s=a.fillOpacity,u=this.services,l=u.cartesianScales,c=u.transitions,h=i.data.groupMapsTo,d=Ua.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,o)?[T.FILL,T.STROKE]:[T.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,o)})).classed("unfilled",(function(t){var e=l.getDomainIdentifier(t);return!n.model.getIsFilled(t[h],t[e],t,o)})).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,o))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",o?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.addEventListeners=function(){var t=this,e=t.getOptions().data.groupMapsTo;this.parent.selectAll("circle").on("mouseover",(function(n){var r=ja(this);r.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[T.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);var i=Ua.getProperty(t.getOptions(),"bubble");t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:r,data:[n],additionalItems:[{label:Ua.getProperty(i,"radiusLabel"),value:n[Ua.getProperty(i,"radiusMapsTo")]}]}),t.services.events.dispatchEvent(Z.Scatter.SCATTER_MOUSEOVER,{element:r,datum:n})})).on("mousemove",(function(e){var n=ja(this);t.services.events.dispatchEvent(Z.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(Z.Scatter.SCATTER_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(n){var r=ja(this);if(r.classed("hovered",!1),!t.configs.filled){var i=t.getOptions().points.filled,a=t.services.cartesianScales.getDomainIdentifier(n);r.classed("unfilled",!t.model.getIsFilled(n[e],n[a],n,i)).style("fill",(function(n){return i?t.model.getFillColor(n[e],n[a],n):null}))}t.services.events.dispatchEvent(Z.Scatter.SCATTER_MOUSEOUT,{element:r,datum:n}),t.services.events.dispatchEvent(Z.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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(Z.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(Z.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Lg),iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",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})),a=Fd.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),o=i.length>0,s=o?es(i):[1,1];return Yu().domain(s).range(o?e.bubble.radiusRange(a,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),a=i.bubble.radiusMapsTo,o=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales,l=Ua.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 o(t[a]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[T.FILL,T.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}(rv),av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e,n=this,i=this.getOptions().data.groupMapsTo,a=this.getContainerSVG({withinChartClip:!0}),o=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=[];o.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=Fd.appendOrSelect(a,"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,a,o;return 1===t.order?(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,a=h-2,o=c+1):(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,a=n.services.cartesianScales.getRangeValue(t.value,e),o=h),Ua.generateSVGPathString({x0:r,x1:i,y0:a,y1:o},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),(e=Fd.appendOrSelect(a,"g.bars").selectAll("path.bar").data(o,(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:[T.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,a=n.services.cartesianScales.getRangeValue(0)+1,o=n.services.cartesianScales.getRangeValue(t,e);return Ua.generateSVGPathString({x0:r,x1:i,y0:a,y1:o},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=Fd.appendOrSelect(a,"g.markers").selectAll("path.marker").data(o.filter((function(t){return null!==Ua.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,a=n.services.cartesianScales.getRangeValue(t.marker,e),o=a;return Ua.generateSVGPathString({x0:r,x1:i,y0:a,y1:o},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),function(){var e=[];o.filter((function(t){return null!==Ua.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=Fd.appendOrSelect(a,"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,a=4;r.ranges&&-1!==r.ranges.indexOf(i)&&(a=8);var o=n.services.cartesianScales.getDomainValue(r,e)-a/2,s=o+a,u=n.services.cartesianScales.getRangeValue(i,e),l=u;return Ua.generateSVGPathString({x0:o,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 a=ja(this);a.classed("hovered",!0),a.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(Z.Bar.BAR_MOUSEOVER,{element:a,datum:i});var o=Ua.getProperty(e,"bullet","performanceAreaTitles"),s=t.getMatchingRangeIndexForDatapoint(i);t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:a,items:[{label:e.tooltip.groupLabel||"Group",value:i[n],class:t.model.getColorClassName({classNameTypes:[T.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:o[s]}]})})).on("mousemove",(function(e){t.services.events.dispatchEvent(Z.Bar.BAR_MOUSEMOVE,{element:ja(this),datum:e}),t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(Z.Bar.BAR_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(Z.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(Z.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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Lg),ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",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?fo.opacity.unselected:fo.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",fo.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this.services,a=i.cartesianScales,o=i.curves,s=Ua.flipDomainAndRangeBasedOnOrientation((function(t,e){return a.getDomainValue(t,e)}),(function(t,e){return a.getRangeValue(t,e)}),a.getOrientation()),u=s[0],l=s[1],c=this.getOptions(),h=yh().x(u).y(l).curve(o.getD3Curve()).defined((function(t,e){var n=t[a.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:Ua.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:!Ua.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:[T.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)})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.line").on("mouseover",(function(e){var n=ja(this);n.classed("hovered",!0),t.services.events.dispatchEvent(Z.Line.LINE_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){t.services.events.dispatchEvent(Z.Line.LINE_MOUSEMOVE,{element:ja(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(Z.Line.LINE_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(this);n.classed("hovered",!1),t.services.events.dispatchEvent(Z.Line.LINE_MOUSEOUT,{element:n,datum:e})}))},e.prototype.destroy=function(){this.parent.selectAll("path.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Lg),sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="lollipop",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]?fo.weight.unselected:fo.weight.selected}))},e.handleScatterOnMouseOut=function(t){e.parent.selectAll("line.line").attr("stroke-width",fo.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?fo.opacity.unselected:fo.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("line.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",fo.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,a=this.services.cartesianScales,o=a.getMainXScale(),s=a.getMainYScale(),u=a.getDomainIdentifier(),l=a.getOrientation(),c=Ua.flipDomainAndRangeBasedOnOrientation((function(t,e){return a.getDomainValue(t,e)}),(function(t,e){return a.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:[T.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===P.HORIZONTAL?p.attr("y1",d).attr("y2",d).attr("x1",o.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(Z.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(Z.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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(Z.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(Z.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e}(rv),uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e}return n(e,t),e.prototype.render=function(t){var e=this;if(Ua.getProperty(this.getOptions(),"points","enabled")){var n=this.getContainerSVG({withinChartClip:!0}),i=this.getOptions(),a=i.data.groupMapsTo,o=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),s=this.model.getStackedData({groups:this.configs.groups,percentage:o}),u=n.selectAll("g.dots").data(s,(function(t){return Ua.getProperty(t,0,a)}));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[a],i=e.services.cartesianScales.getDomainIdentifier(t),o=e.services.cartesianScales.getRangeIdentifier(t);return(n={})[a]=r,n[i]=t.data.sharedStackKey,n[o]=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,a=Object.keys(r.axes).some((function(t){return r.axes[t].percentage})),o=this.model.getStackedData({groups:this.configs.groups,percentage:a}),s=[];return o.forEach((function(r,o){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)&&(a&&(d=n.model.getStackedData({groups:n.configs.groups})[o][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}(rv);function lv(t,e){var n=this,r=uu(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return go.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),a=this.model.getDisplayData().filter((function(t){return t.value>0})),o=this.getOptions(),s=o.data.groupMapsTo,u=this.computeRadius();this.arc=fh().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=fh().innerRadius(this.getInnerRadius()).outerRadius(u+go.hoverArc.outerRadiusOffset);var l=function(){var t=xh,e=_h,n=null,r=Yc(0),i=Yc(rh),a=Yc(0);function o(o){var s,u,l,c,h,d=o.length,f=0,p=new Array(d),g=new Array(d),v=+r.apply(this,arguments),m=Math.min(rh,Math.max(-rh,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/d,a.apply(this,arguments)),b=y*(m<0?-1:1);for(s=0;s<d;++s)(h=g[p[s]=s]=+t(o[s],s,o))>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(o[t],o[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:o[u],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Yc(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Yc(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Yc(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Yc(+t),o):a},o}().value((function(t){return t.value})).sort(null).padAngle(go.padAngle)(a).sort((function(t,e){return t.index-e.index})),c=Fd.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:[T.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+", "+Ua.convertValueToPercentage(t.data.value,a)+"%"})).attrTween("d",(function(t){return lv.bind(this)(t,n.arc)}));var h=o.pie.labels.enabled,d=h?l.filter((function(t){return t.value>0})):[],f=Fd.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 o.pie.labels.formatter?o.pie.labels.formatter(t):Ua.convertValueToPercentage(t.data.value,a)+"%"})).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<go.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+go.callout.offsetX+go.callout.textMargin+t.textOffsetX,a=t.yPosition-go.callout.offsetY,t.direction=V.RIGHT,g.push(t)):(i=t.xPosition-go.callout.offsetX-t.textOffsetX-go.callout.textMargin,a=t.yPosition-go.callout.offsetY,t.direction=V.LEFT,g.push(t)),"translate("+i+", "+a+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(g);var v=Ua.getProperty(o,"donut")?"donut":"pie",m=Ua.getProperty(o,v,"alignment"),y=Fd.getSVGElementSize(this.getParent(),{useAttr:!0}).width,b=h?go.yOffset:0,_=u+(h?go.xOffset:0);m===k.CENTER?_=y/2:m===k.RIGHT&&(_=y-u-go.xOffset);var x=u+b;g.length>0&&(x+=go.yOffsetCallout),i.attr("transform","translate("+_+", "+x+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=Fd.appendOrSelect(this.getContainerSVG(),"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===V.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+go.callout.offsetX,y:n-go.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-go.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-go.callout.offsetX,y:n-go.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+go.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return ja(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 ja(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=ja(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(Z.Pie.SLICE_MOUSEOVER,{element:ja(this),datum:e});var r=t.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value}]})})).on("mousemove",(function(e){var n=ja(this);t.services.events.dispatchEvent(Z.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(Z.Pie.SLICE_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(Z.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=Fd.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+go.radiusOffset:i},e}(Lg),hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e}return n(e,t),e.prototype.init=function(){this.services.events},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(){var t=this.model.getOptions(),e=Ua.clamp(this.getValue(),0,100),n=Ua.getProperty(t,"min"),r=Ua.getProperty(t,"max");return null!=n&&null!=r?((e=Ua.clamp(this.getValue(),n,r))-n)/(r-n):e/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 Ua.getProperty(t,"gauge","type")===z.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(Ua.getProperty(e,"gauge","deltaArrow","direction")){case H.UP:return"4,10 8,6 12,10";case H.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.getContainerSVG(),i=this.getOptions(),a=(i.data.groupMapsTo,this.getValue()),o=this.getValueRatio(),s=this.getArcSize(),u=this.getStartAngle(),l=u+o*s,c=u+s,h=this.computeRadius(),d=this.getInnerRadius();this.backgroundArc=fh().innerRadius(d).outerRadius(h).startAngle(l).endAngle(c),this.arc=fh().innerRadius(d).outerRadius(h).startAngle(u).endAngle(l);var f=Ua.getProperty(i,"subranges");null!=f&&this.drawSubranges(this.mapSubranges(f)),Fd.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var p=n.selectAll("path.arc-foreground").data([a]);p.enter().append("path").merge(p).attr("class",this.model.getColorClassName({classNameTypes:[T.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",(function(t){return Ua.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(),null!=i.min&&null!=i.max&&this.drawMinMax(),p.exit().remove();var g=Ua.getProperty(i,"gauge","alignment"),v=Fd.getSVGElementSize(this.getParent(),{useAttr:!0}).width,m=h;g===k.CENTER?m=v/2:g===k.RIGHT&&(m=v-h),n.attr("transform","translate("+m+", "+h+")"),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getContainerSVG(),e=this.getOptions(),n=Ua.getProperty(e,"gauge","type"),r=Ua.getProperty(e,"disablePercentage"),i=this.getValue(),a=this.getDelta(),o=this.computeRadius(),s=Ua.getProperty(e,"gauge","valueFontSize"),u=Ua.getProperty(e,"gauge","deltaFontSize"),l=Ua.getProperty(e,"gauge","numberSpacing"),c=Ua.getProperty(e,"gauge","showPercentageSymbol"),h=0;n!==z.FULL||a?n===z.SEMI&&a&&(h=-(u(o)+l)):h=u(o);var d=Fd.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+h+")"),f=s(o),p=Fd.appendOrSelect(d,"g.gauge-value-number"),g=Ua.getProperty(e,"gauge","numberFormatter"),v=p.selectAll("text.gauge-value-number").data([i]);v.enter().append("text").attr("class","gauge-value-number").merge(v).style("font-size",f+"px").attr("text-anchor","middle").text((function(t){return g(t)}));var m=Fd.getSVGElementSize(Fd.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width,y=f/2,b=c||r?"%":"",_=Fd.appendOrSelect(p,"text.gauge-value-symbol").style("font-size",y+"px").attr("x",m/2).text(b),x=Fd.getSVGElementSize(_,{useBBox:!0}),O=x.width,w=x.height;_.attr("y","-"+w/2+"px"),p.attr("transform","translate(-"+O/2+", 0)")},e.prototype.drawDelta=function(){var t=this.getContainerSVG(),e=this.getOptions(),n=this.getDelta(),r=(Ua.getProperty(e,"disablePercentage"),this.computeRadius()),i=n?Ua.getProperty(e,"gauge","deltaFontSize"):function(){return 0},a=n?Ua.getProperty(e,"gauge","numberFormatter"):function(){return null},o=Ua.getProperty(e,"gauge","deltaArrow","size"),s=Ua.getProperty(e,"gauge","numberSpacing"),u=Ua.getProperty(e,"gauge","showPercentageSymbol"),l=Fd.appendOrSelect(t,"g.gauge-numbers"),c=Fd.appendOrSelect(l,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),h=Fd.appendOrSelect(c,"text.gauge-delta-number"),d=u?"%":"";h.data(null===n?[]:[n]),h.enter().append("text").classed("gauge-delta-number",!0).merge(h).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return""+a(t)+d}));var f=Fd.getSVGElementSize(Fd.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,p=Ua.getProperty(e,"gauge","deltaArrow","enabled"),g=c.selectAll("svg.gauge-delta-arrow").data(null!==n&&p?[n]:[]);g.enter().append("svg").merge(g).attr("class","gauge-delta-arrow").attr("x",-o(r)-f/2).attr("y",-o(r)/2-.35*i(r)).attr("width",o(r)).attr("height",o(r)).attr("viewBox","0 0 16 16"),Fd.appendOrSelect(g,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var v=Ua.getProperty(e,"gauge","status");Fd.appendOrSelect(g,"polygon.gauge-delta-arrow").attr("class",null!==v?"gauge-delta-arrow status--"+v:"").attr("points",this.getArrow(n)),g.exit().remove(),h.exit().remove()},e.prototype.drawMinMax=function(){var t=this.getContainerSVG(),e=this.computeRadius(),n=this.getInnerRadius(),r=e-n,i=this.model.getOptions(),a=Ua.getProperty(i,"min"),o=Ua.getProperty(i,"max"),s=Ua.getProperty(i,"gauge","minMaxFontSize"),u=Ua.getProperty(i,"gauge","numberFormatter"),l=Fd.appendOrSelect(t,"g.guage-min-max"),c=Fd.appendOrSelect(l,"g.gauge-min"),h=Fd.appendOrSelect(c,"text.min-group-number");h.data(null===a?[]:[a]),h.enter().append("text").merge(h).attr("text-anchor","middle").style("font-size",s(e)/1.5+"px").text((function(t){return""+u(t)})).attr("x",-n+r+h.node().getBBox().width/2).attr("y",0);var d=Fd.appendOrSelect(l,"g.gauge-max"),f=Fd.appendOrSelect(d,"text.max-group-number");f.data(null===o?[]:[o]),f.enter().append("text").merge(f).attr("text-anchor","middle").style("font-size",s(e)/1.5+"px").text((function(t){return""+u(t)})).attr("x",n-r-f.node().getBBox().width/2).attr("y",0)},e.prototype.mapSubranges=function(t){var e=this.model.getOptions(),n=Ua.getProperty(e,"min"),r=Ua.getProperty(e,"max"),i=this.getStartAngle(),a=this.getArcSize();return t.map((function(t,e){var o,s;if(null!=n&&null!=r){var u=Ua.clamp(t.begin,n,r),l=Ua.clamp(t.end,n,r);o=(u-n)/(r-n)*a,s=(l-n)/(r-n)*a}else{u=Ua.clamp(t.begin,0,100)/100,l=Ua.clamp(t.end,0,100)/100;o=u*a,s=l*a}return{begin:i+o,end:i+s,color:t.color,beginLabel:t.begin,endLabel:t.end}}))},e.prototype.drawSubranges=function(t){var e=this.model.getOptions(),n=this.getContainerSVG(),r=this.computeRadius(),i=this.getInnerRadius(),a=Ua.getProperty(e,"min"),o=Ua.getProperty(e,"max"),s=fh().innerRadius(i-10).outerRadius(r+10).startAngle((function(t){return t.begin})).endAngle((function(t){return t.end})),u=Fd.appendOrSelect(n,"g.subrange-group"),l=u.selectAll("path.subrange").data(t);l.enter().append("path").merge(l).attr("class","subrange").attr("d",s).attr("fill",(function(t){return t.color}));var c=u.selectAll("text.subrange-label-begin").data(t);c.enter().append("text").attr("class","subrange-label-begin").merge(c).style("fill",(function(t){return t.beginLabel===a?"#00000000":""})).attr("transform",(function(t){var e=180*t.begin/Math.PI;return"rotate("+e+") translate(0, "+(25-i)+") rotate("+-e+")"})).text((function(t){return t.beginLabel}));var h=u.selectAll("text.subrange-label-end").data(t);h.enter().append("text").attr("class","subrange-label-end").merge(h).style("fill",(function(t){return t.endLabel===o?"#00000000":""})).attr("transform",(function(t){var e=180*t.end/Math.PI;return"rotate("+e+") translate(0, "+(25-i)+") rotate("+-e+")"})).text((function(t){return t.endLabel}))},e.prototype.getInnerRadius=function(){return this.computeRadius()-Ua.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(Z.Gauge.ARC_MOUSEOVER,{element:ja(this),datum:e})})).on("mousemove",(function(e){var n=ja(this);t.services.events.dispatchEvent(Z.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(Z.Gauge.ARC_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(this);t.services.events.dispatchEvent(Z.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.getOptions(),e=Ua.getProperty(t,"gauge","type"),n=Fd.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===z.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Lg),dv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",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.getContainerSVG().select("g.center").remove();else{var r=Fd.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.getOptions(),a=this.computeRadius();Fd.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(a)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(ja(this))})),Fd.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(a)})).attr("y",i.donut.center.titleYPosition(a)).text(Ua.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.getOptions(),n=Ua.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?lu:ru)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(cv),fv=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=this.parent,e=t.node().parentNode,n=Fd.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var a=Ua.getProperty(this.getOptions(),"data","loading");a?this.renderSkeleton(a):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===B.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===B.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===B.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==B.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===P.VERTICAL&&this.drawYGrid(t),e===P.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=Yu().domain([0,1]).range(t),this.yScale=Yu().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=Fd.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;this.backdrop=Fd.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",a);var o=Fd.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],l=(s[1],this.yScale.range()),c=(l[0],l[1]);this.backdrop.merge(o).attr("x",u).attr("y",c),o.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Ua.getProperty(this.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),a=Fd.appendOrSelect(this.backdrop,"g.x.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),a.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=Ua.getProperty(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),a=Fd.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),a.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=Fd.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),a=i.width,o=i.height,s=Fd.appendOrSelect(r,"svg.chart-skeleton").attr("width",a).attr("height",o),u=0===e?"pie":"donut",l=Ua.getProperty(this.getOptions(),u,"alignment");Fd.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",a).attr("height",o).attr("fill","none");var c=fh().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(go.radiusOffset),d=t+(Math.min(a,o)-2*t)/2,f=Fd.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+go.xOffset;l===k.CENTER?p=a/2:l===k.RIGHT&&(p=a-t-go.xOffset);var g=t+go.yOffset;f.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=Fd.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+go.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=Fd.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=Fd.appendOrSelect(e,"defs").lower(),a=Fd.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)");a.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(){a.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(ep).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Lg),pv=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=this.parent,n=e.node().parentNode,r=Fd.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;e.attr("width",i).attr("height",a);var o=Ua.getProperty(this.getOptions(),"data","loading"),s=!(Ua.getProperty(this.getOptions(),"grid","x","enabled")||Ua.getProperty(this.getOptions(),"grid","y","enabled")||Ua.getProperty(this.getOptions(),"axes","bottom","visible")||Ua.getProperty(this.getOptions(),"axes","left","visible"));o&&!s?t.prototype.renderGridSkeleton.call(this,o):o&&s?this.renderSparklineSkeleton(o):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=Fd.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=Fd.appendOrSelect(t,"svg.chart-skeleton.DAII");var e=Fd.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");e.classed("shimmer-effect-lines",!1),e.classed("shimmer-effect-sparkline",!0)},e}(fv);function gv(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 vv(t,e){var n,r,i,a,o,s=new _v(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=mv);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)l.push(r=n.children[a]=new _v(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(bv)}function mv(t){return t.children}function yv(t){t.data=t.data.data}function bv(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function _v(t){this.data=t,this.depth=this.height=0,this.parent=null}function xv(t){if("function"!=typeof t)throw new Error;return t}function Ov(){return 0}function wv(t){return function(){return t}}function Ev(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 Sv(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,l=t.value&&(r-e)/t.value;++s<u;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l}function Tv(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,l=t.value&&(i-n)/t.value;++s<u;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l}_v.prototype=vv.prototype={constructor:_v,count:function(){return this.eachAfter(gv)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.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 vv(this).eachBefore(yv)}};var Mv=function t(e){function n(t,n,r,i,a){!function(t,e,n,r,i,a){for(var o,s,u,l,c,h,d,f,p,g,v,m=[],y=e.children,b=0,_=0,x=y.length,O=e.value;b<x;){u=i-n,l=a-r;do{c=y[_++].value}while(!c&&_<x);for(h=d=c,v=c*c*(g=Math.max(l/u,u/l)/(O*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(o={value:c,dice:u<l,children:y.slice(b,_)}),o.dice?Sv(o,n,r,i,O?r+=l*c/O:a):Tv(o,n,r,O?n+=u*c/O:i,a),O-=c,b=_}}(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Av(){var t=Mv,e=!1,n=1,r=1,i=[0],a=Ov,o=Ov,s=Ov,u=Ov,l=Ov;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Ev),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]=a(e)/2,r+=l(e)-n,c+=o(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=xv(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:wv(+t),c):a},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?(o="function"==typeof t?t:wv(+t),c):o},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:wv(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:wv(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:wv(+t),c):l},c}var Cv,Pv={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:{40:"#ff832b",60:"#ba4e00",70:"#8a3800"},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:{20:"#fdd13a",30:"#f1c21b",40:"#d2a106",50:"#b28600"}},Dv=function(){var t,e=ja(this.parentNode).select("rect.leaf"),n=Ns(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(Pv);e<n.length;e++)for(var r=n[e],i=Pv[r],a=0,o=Object.keys(i);a<o.length;a++){var s=o[a];if(i[s]===t)return s}return null}(n?n.hex():null)),null==t){var r=Ys(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},Lv=0,kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),r=this.model.getData(),i=this.model.getDisplayData(),a=this.model.getOptions(),o=Ua.getProperty(window,"location"),s=Fd.getSVGElementSize(this.parent,{useAttrs:!0}),u=s.width,l=s.height,c=vv({name:a.title||"Treemap",children:i}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),h=(ds(r,(function(t){return ds(t.children,(function(t){return t.value}))})),Av().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 Lv++})).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=ja(this.parentNode).attr("data-uid");return a.style.prefix+"-leaf-"+t})).attr("class",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getColorClassName({classNameTypes:[T.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=ja(this.parentNode).attr("data-uid");return a.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=ja(this.parentNode.parentNode).attr("data-uid"),e=a.style.prefix+"-leaf-"+t;return new URL("#"+e,o)+""}))}),(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=Ys(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",Dv).attr("x",7).attr("y",18);o&&e.attr("clip-path",(function(){var t=ja(this.parentNode).attr("data-uid"),e=a.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,o)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",Dv)}),(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=ja(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),Ns(r).darker(.7).toString()})),t.services.events.dispatchEvent(Z.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(Z.Treemap.LEAF_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=ja(this);t.services.events.dispatchEvent(Z.Treemap.LEAF_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(Z.Treemap.LEAF_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(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(Z.Treemap.LEAF_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.HIDE,{hoveredElement:n})}))},e}(Lg);function Rv(t){var e,n=(Nv(t)%(e=360)+e)%e;return Iv(n,[0,10])||Iv(n,[350,0])?{textAnchor:G.START,dominantBaseline:U.MIDDLE}:Iv(n,[10,80])?{textAnchor:G.START,dominantBaseline:U.HANGING}:Iv(n,[80,100])?{textAnchor:G.MIDDLE,dominantBaseline:U.HANGING}:Iv(n,[100,170])?{textAnchor:G.END,dominantBaseline:U.HANGING}:Iv(n,[170,190])?{textAnchor:G.END,dominantBaseline:U.MIDDLE}:Iv(n,[190,260])?{textAnchor:G.END,dominantBaseline:U.BASELINE}:Iv(n,[260,280])?{textAnchor:G.MIDDLE,dominantBaseline:U.BASELINE}:{textAnchor:G.START,dominantBaseline:U.BASELINE}}function Iv(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function Nv(t){return t*(180/Math.PI)}function Vv(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 Bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=Fd.appendOrSelect(e.getContainerSVG(),"g.tmp-tick"),r=Fd.appendOrSelect(n,"text").text(t),i=Fd.getSVGElementSize(r.node(),{useBBox:!0}),a=i.width,o=i.height;return n.remove(),{width:a,height:o}},e.normalizeFlatData=function(t){var n=e.getOptions(),r=Ua.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=Ua.getProperty(n,"data","groupMapsTo"),s=Ua.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[o]=e,n[a]=null,n}))})));return Ua.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.getOptions(),r=Ua.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=Ua.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={})[o]=n,e[i]=t,e[a]=null,e}));return{name:n,data:Ua.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?vo.opacity.unselected:vo.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?vo.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",vo.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=Fd.getSVGElementSize(this.parent,{useAttrs:!0}),a=i.width,o=i.height,s=this.model.getData(),u=this.model.getDisplayData(),l=this.model.getGroupedData(),c=this.getOptions(),h=Ua.getProperty(c,"radar","axes"),d=h.angle,f=h.value,p=Ua.getProperty(c,"data","groupMapsTo"),g=vo.xLabelPadding,v=vo.yLabelPadding,m=vo.yTicksNumber,y=vo.minRange,b=vo.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[d]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[p]})))),this.displayDataNormalized=this.normalizeFlatData(u),this.groupedDataNormalized=this.normalizeGroupedData(l);var _=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),x=(Math.min(a,o)-_)/2;if(!(x<=0)){var O=bs().domain(this.displayDataNormalized.map((function(t){return t[d]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),w=Yu().domain([0,cs(this.displayDataNormalized.map((function(t){return t[f]})))]).range([y,x]).nice(m),E=w.ticks(m),S=function(t){return e.model.getFillColor(t)},M=Sh().angle((function(t){return O(t[d])+Math.PI/2})).radius((function(t){return w(t[f])})).curve(Qh),A=Sh().angle(M.angle()).radius((function(t){return Cv?Cv(t[f]):y})).curve(M.curve()),C={x:cs(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=O(t),x*Math.sin(n-Math.PI/2))})))+g,y:o/2},P=Fd.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(E,(function(t){return t})),D=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[d]=e,n[f]=t,n}))};P.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill","none").attr("d",(function(t){return A(D(t))})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return M(D(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("+C.x+", "+C.y+")").attr("d",(function(t){return M(D(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 M(D(t))})).attr("opacity",0).remove()}))})),Fd.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-"+Ua.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return Vv(O(t),0,C).x})).attr("y1",(function(t){return Vv(O(t),0,C).y})).attr("x2",(function(t){return Vv(O(t),0,C).x})).attr("y2",(function(t){return Vv(O(t),0,C).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return Vv(O(t),w.range()[0],C).x})).attr("y1",(function(t){return Vv(O(t),w.range()[0],C).y})).attr("x2",(function(t){return Vv(O(t),w.range()[1],C).x})).attr("y2",(function(t){return Vv(O(t),w.range()[1],C).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 Vv(O(t),w.range()[0],C).x})).attr("y1",(function(t){return Vv(O(t),w.range()[0],C).y})).attr("x2",(function(t){return Vv(O(t),w.range()[1],C).x})).attr("y2",(function(t){return Vv(O(t),w.range()[1],C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),Fd.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 Vv(O(t),w.range()[1]+g,C).x})).attr("y",(function(t){return Vv(O(t),w.range()[1]+g,C).y})).style("text-anchor",(function(t){return Rv(O(t)).textAnchor})).style("dominant-baseline",(function(t){return Rv(O(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 Vv(O(t),w.range()[1]+g,C).x})).attr("y",(function(t){return Vv(O(t),w.range()[1]+g,C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),Fd.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:[T.FILL,T.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").style("fill",(function(t){return S(t.name)})).style("fill-opacity",vo.opacity.selected).style("stroke",(function(t){return S(t.name)})).attr("d",(function(t){return A(t.data)})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_enter",t)).attr("opacity",1).attr("d",(function(t){return M(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[T.FILL,T.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).style("fill",(function(t){return S(t.name)})).style("stroke",(function(t){return S(t.name)})),n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+C.x+", "+C.y+")").attr("d",(function(t){return M(t.data)}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_exit",t)).attr("d",(function(t){return M(t.data)})).attr("opacity",0).remove()}))})),Fd.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.displayDataNormalized).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:[T.FILL],dataGroupName:t[p],originalClassName:Ua.kebabCase(t[d])})})).attr("cx",(function(t){return Vv(O(t[d]),w(t[f]),C).x})).attr("cy",(function(t){return Vv(O(t[d]),w(t[f]),C).y})).attr("r",0).attr("opacity",0).style("fill",(function(t){return S(t[p])})),Fd.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",C.x).attr("y",C.y-b/2).attr("width",w.range()[1]).attr("height",b).style("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+Nv(O(t))+", "+C.x+", "+C.y+")"})),Fd.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(es(E)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return Vv(-Math.PI/2,w(t),C).x+v})).attr("y",(function(t){return Vv(-Math.PI/2,w(t),C).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 Vv(-Math.PI/2,w(t),C).x+v})).attr("y",(function(t){return Vv(-Math.PI/2,w(t),C).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=Ua.getProperty(c,"radar","alignment"),k=Fd.getAlignmentOffset(L,n,this.getParent());n.attr("transform","translate("+k+", 0)"),this.addEventListeners(),Cv=w}},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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=Ua.getProperty(this.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n){var r=ja(this);t.services.events.dispatchEvent(Z.Radar.X_AXIS_MOUSEOVER,{element:r,datum:n});var i=t.parent.select(".x-axes .x-axis-"+Ua.kebabCase(n)),a=t.parent.selectAll(".dots circle."+Ua.kebabCase(n));i.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",vo.dotsRadius);var o=t.displayDataNormalized.filter((function(t){return t[e]===n})),s=t.getOptions(),u=s.data.groupMapsTo,l=Ua.getProperty(s,"radar","axes","value");t.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:r,items:o.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:[T.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e){var n=ja(this);t.services.events.dispatchEvent(Z.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(Z.Radar.X_AXIS_CLICK,{element:ja(this),datum:e})})).on("mouseout",(function(e){var n=ja(this),r=t.parent.select(".x-axes .x-axis-"+Ua.kebabCase(e)),i=t.parent.selectAll(".dots circle."+Ua.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(Z.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(Z.Tooltip.HIDE)}))},e}(Lg),Gv=Jd.dispatch,Uv=Math.PI/180,zv=function(){var t=[256,256],e=Hv,n=Fv,r=Wv,i=jv,a=jv,o=qv,s=Yv,u=$v,l=[],c=1/0,h=Gv("word","end"),d=null,f=Math.random,p={},g=Qv;function v(e,n,r){t[0],t[1];for(var i,a,o,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))&&(a=~~i[0],o=~~i[1],!(Math.min(Math.abs(a),Math.abs(o))>=d));)if(n.x=c+a,n.y=h+o,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1]||r&&Zv(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),O=127&x,w=32-O,E=n.y1-n.y0,S=(n.y+n.y0)*_+(x>>5),T=0;T<E;T++){m=0;for(var M=0;M<=b;M++)e[S+M]|=m<<w|(M<b?(m=y[T*b+M])>>>O:0);S+=_}return delete n.sprite,!0}return!1}return p.canvas=function(t){return arguments.length?(g=Jv(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=[],O=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=a.call(this,t,u),t.rotate=o.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(w,0),w(),p;function w(){for(var e=Date.now();Date.now()-e<c&&++_<b&&d;){var n=O[_];n.x=t[0]*(f()+.5)>>1,n.y=t[1]*(f()+.5)>>1,Xv(u,n,O,_),n.hasText&&v(m,n,y)&&(x.push(n),h.call("word",p,n),y?Kv(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=Jv(t),p):n},p.fontStyle=function(t){return arguments.length?(i=Jv(t),p):i},p.fontWeight=function(t){return arguments.length?(a=Jv(t),p):a},p.rotate=function(t){return arguments.length?(o=Jv(t),p):o},p.text=function(t){return arguments.length?(e=Jv(t),p):e},p.spiral=function(t){return arguments.length?(u=tm[t]||t,p):u},p.fontSize=function(t){return arguments.length?(r=Jv(t),p):r},p.padding=function(t){return arguments.length?(s=Jv(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 Hv(t){return t.text}function Fv(){return"serif"}function jv(){return"normal"}function Wv(t){return Math.sqrt(t.value)}function qv(){return 30*(~~(6*Math.random())-3)}function Yv(){return 1}function Xv(t,e,n,r){if(!e.sprite){var i=t.context,a=t.ratio;i.clearRect(0,0,2048/a,2048/a);var o=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)/a)+"px "+e.font;var c=i.measureText(e.text+"m").width*a,h=e.size<<1;if(e.rotate){var d=Math.sin(e.rotate*Uv),f=Math.cos(e.rotate*Uv),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),o+c>=2048&&(o=0,s+=u,u=0),s+h>=2048)break;i.translate((o+(c>>1))/a,(s+(h>>1))/a),e.rotate&&i.rotate(e.rotate*Uv),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=o,e.yoff=s,e.x1=c>>1,e.y1=h>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,o+=c}for(var y=i.getImageData(0,0,2048/a,2048/a).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==(o=e.xoff))return;s=e.yoff;for(var O=0,w=-1,E=0;E<h;E++){for(x=0;x<c;x++){var S=_*E+(x>>5),T=y[2048*(s+E)+(o+x)<<2]?1<<31-x%32:0;b[S]|=T,O|=T}O?w=E:(e.y0++,h--,E--,s++)}e.y1=e.y0+w,e.sprite=b.slice(0,(e.y1-e.y0)*_)}}}function Zv(t,e,n){n>>=5;for(var r,i=t.sprite,a=t.width>>5,o=t.x-(a<<4),s=127&o,u=32-s,l=t.y1-t.y0,c=(t.y+t.y0)*n+(o>>5),h=0;h<l;h++){r=0;for(var d=0;d<=a;d++)if((r<<u|(d<a?(r=i[h*a+d])>>>s:0))&e[c+d])return!0;c+=n}return!1}function Kv(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 $v(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Qv(){return document.createElement("canvas")}function Jv(t){return"function"==typeof t?t:function(){return t}}var tm={archimedean:$v,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]}}},em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="wordcloud",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(Z.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(Z.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},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=Fd.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=r.length>0,o=a?es(r):[1,1];return Yu().domain(o).range(a?e.wordCloud.fontSizeRange(i,t):[4,4])},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),r=this.model.getDisplayData(),i=this.getFontSizeScale(r),a=this.getOptions(),o=a.wordCloud,s=o.fontSizeMapsTo,u=o.wordMapsTo,l=a.data.groupMapsTo,c=Fd.getSVGElementSize(this.parent,{useAttrs:!0}),h=c.width,d=c.height;if(0!==h&&0!==d){var f=zv().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=Fd.appendOrSelect(n,"g.words");i.attr("transform","translate("+f.size()[0]/2+", "+f.size()[1]/2+")");var a=i.selectAll("text").data(r,(function(t){return t[l]+"-"+t.text}));a.exit().attr("opacity",0).remove(),a.enter().append("text").attr("opacity",0).merge(a).style("font-size",(function(t){return t.size+"px"})).text((function(t){return t.text})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[T.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.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=Ua.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(Z.WordCloud.WORD_MOUSEOVER,{element:ja(this),datum:i}),r.services.events.dispatchEvent(Z.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:[T.TOOLTIP],dataGroupName:i[e]})}]})})).on("mousemove",(function(t){var e=ja(this);r.services.events.dispatchEvent(Z.WordCloud.WORD_MOUSEMOVE,{element:e,datum:t}),r.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(t){r.services.events.dispatchEvent(Z.WordCloud.WORD_CLICK,{element:ja(this),datum:t})})).on("mouseout",(function(t){var e=ja(this);n(null),r.services.events.dispatchEvent(Z.WordCloud.WORD_MOUSEOUT,{element:e,datum:t}),r.services.events.dispatchEvent(Z.Tooltip.HIDE,{hoveredElement:e})}))},e}(Lg),nm=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(){Fd.appendOrSelect(this.getContainerSVG(),"rect").attr("x",0).attr("y",0).attr("width",this.configs.size||mo.default.size).attr("height",this.configs.size||mo.default.size).attr("opacity",0)},e}(Lg),rm=function(t){function e(n,r,i,a){var o=t.call(this,n,r,a)||this;return o.type="layout",o.configs=a,o.children=i,o._instanceID=e.instanceID++,(o.configs.direction===I.ROW_REVERSE||o.configs.direction===I.COLUMN_REVERSE)&&(o.children=o.children.reverse()),o.init(),o}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("svg.layout-child-"+this._instanceID).filter((function(t){var e=Ua.getProperty(t,"data","growth","x");return e===N.PREFERRED||e===N.FIXED})).each((function(t){e+=t.data.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){return Ua.getProperty(t,"data","growth","x")===N.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Fd.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height,o=vv({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===I.ROW||this.configs.direction===I.ROW_REVERSE?Sv:Tv;Av().tile(s).size([i,a])(o);var u=this.configs.direction===I.ROW||this.configs.direction===I.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(o.leaves(),(function(t){return t.data.id}));l.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),l.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(ja(n));var i=Ua.getProperty(e,"data","growth","x");i!==N.PREFERRED&&i!==N.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=Ua.getProperty(t,"data","growth","x"),n=Fd.getSVGElementSize(ja(this),{useBBox:!0});if(e===N.PREFERRED){var r=u?n.width:n.height,o=u?i:a;t.data.size=r/o*100}})),l.exit().remove(),this.children.filter((function(t){return Ua.getProperty(t,"growth","x")===N.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),o=vv({children:this.children}).sum((function(t){return t.size})),Av().tile(s).size([i,a]).padding(0)(o),n.selectAll("svg.layout-child-"+this._instanceID).data(o.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){Ua.getProperty(e,"data","growth","x")===N.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}(Lg),im=Array.prototype.slice;function am(t){return t}function om(t){return"translate("+(t+.5)+",0)"}function sm(t){return"translate(0,"+(t+.5)+")"}function um(t){return function(e){return+t(e)}}function lm(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function cm(){return!this.__axis}function hm(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?om:sm;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):am:i,p=Math.max(a,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?lm:um)(e.copy()),b=h.selection?h.selection():h,_=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(d,e).order(),O=x.exit(),w=x.enter().append("g").attr("class","tick"),E=x.select("line"),S=x.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(w),E=E.merge(w.append("line").attr("stroke","currentColor").attr(l+"2",u*a)),S=S.merge(w.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),S=S.transition(h),O=O.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),w.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:y(t))}))),O.remove(),_.attr("d",4===t||2==t?o?"M"+u*o+","+v+"H0.5V"+m+"H"+u*o:"M0.5,"+v+"V"+m:o?"M"+v+","+u*o+"V0.5H"+m+"V"+u*o:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),E.attr(l+"2",u*a),S.attr(l,u*p).text(f),b.filter(cm).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=im.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:im.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:im.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function dm(t){return hm(1,t)}function fm(t){return hm(2,t)}function pm(t){return hm(3,t)}function gm(t){return hm(4,t)}var vm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",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,a=this.getOptions(),o=Ua.getProperty(a,"axes",i,"visible"),s=this.getContainerSVG(),u=Fd.getSVGElementSize(this.parent,{useAttrs:!0}),l=u.width,c=u.height,h=Fd.appendOrSelect(s,"g.axis."+i);i===M.BOTTOM||i===M.TOP?(e=this.configs.axes[M.LEFT]?this.margins.left:0,n=this.configs.axes[M.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===D.LABELS||this.scaleType===D.LABELS_RATIO?f.rangeRound([e,n]):f.range([e,n]),i){case M.LEFT:d=gm;break;case M.BOTTOM:d=pm;break;case M.RIGHT:d=fm;break;case M.TOP:d=dm}h.attr("aria-label",i+" axis");var p=!h.select("g.ticks").empty(),g=Fd.appendOrSelect(h,"g.ticks");p||(g.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),g.attr("aria-label",i+" ticks"));var v=Fd.appendOrSelect(h,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),m=Ua.getProperty(a,"axes",i),y=this.scaleType===D.TIME||m.scaleType===D.TIME,b=i===M.LEFT||i===M.RIGHT,_=this.model.get("zoomDomain");if(_&&y&&!b&&f.domain(_),o){var x=Ua.getProperty(m,"scaleType"),O=Ua.getProperty(a,"data","loading"),w=Ua.getProperty(m,"ticks","number"),E=Ua.getProperty(m,"ticks","values"),S=Ua.getProperty(m,"truncation","type"),T=Ua.getProperty(m,"truncation","threshold"),A=Ua.getProperty(m,"truncation","numCharacter"),P=null!==w,L=Ua.getProperty(a,"timeScale"),k=Fd.appendOrSelect(v,"g.tick"),R=Fd.appendOrSelect(k,"text").text("0"),I=Fd.getSVGElementSize(R.node(),{useBBox:!0}).height;k.remove();var N,V=this.scaleType||m.scaleType||D.LINEAR,B=d(f).tickSizeOuter(0);if(f.ticks){var G=void 0;if(P?G=w:(G=lo.ticks.number,b&&(G=this.getNumberOfFittingTicks(c,I,lo.ticks.verticalSpaceRatio))),1===f.ticks().length&&0===f.ticks()[0]&&(G=0),B.ticks(G),y)if(f.ticks(G).length){var U=Ua.getProperty(a,"timeScale","addSpaceOnEdges"),z=Ua.getProperty(a,"axes",i,"domain"),H=void 0,F=f.copy();U&&!z&&F.nice(G),H=F.ticks(G),U&&H.length>2&&!z&&(H.splice(H.length-1,1),H.splice(0,1)),B.tickValues(H)}else B.tickValues([])}var W=Ua.getProperty(m,"ticks","formatter");if(y){var q=zg(B.tickValues());N=null===W?function(t,e){return Gg(t,e,B.tickValues(),q,L)}:function(t,e){var n=Gg(t,e,B.tickValues(),q,L);return W(t,e,n)}}else null===W?V===D.LINEAR&&(N=function(t){return t.toLocaleString()}):N=W;B.tickFormat(N);var X,Z=this.services.cartesianScales.getScaleByPosition(i).domain(),K=Z[0],$=Z[1];if(E){if(y)E.forEach((function(t,e){void 0===t.getTime&&(E[e]=new Date(t))})),X=E.filter((function(t){var e=t.getTime();return e>=new Date(K).getTime()&&e<=new Date($).getTime()}));else if(x===D.LABELS){var Q=this.services.cartesianScales.getScaleByPosition(i).domain();X=E.filter((function(t){return Q.includes(t)}))}else X=E.filter((function(t){return t>=K&&t<=$}));B.tickValues(X)}switch(i){case M.LEFT:g.attr("transform","translate("+this.margins.left+", 0)");break;case M.BOTTOM:g.attr("transform","translate(0, "+(c-this.margins.bottom)+")");break;case M.RIGHT:g.attr("transform","translate("+(l-this.margins.right)+", 0)");break;case M.TOP:g.attr("transform","translate(0, "+this.margins.top+")")}var J=this.model.isDataEmpty();if(m.title){var tt=Fd.appendOrSelect(h,"text.axis-title").html(J||O?"":m.title),et=Ua.getProperty(m,"titleOrientation");switch(i){case M.LEFT:et===Y.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 M.BOTTOM:tt.attr("transform","translate("+(this.margins.left/2+f.range()[1]/2)+", "+(c+4)+")").style("text-anchor","middle");break;case M.RIGHT:et===Y.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 M.TOP:var nt=Fd.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=zg(B.tickValues()),it=L.showDayName,at=g;t&&(g=g.transition(this.services.transitions.getTransition("axis-update",t))),g=g.call(B),at.selectAll(".tick").data(B.tickValues(),f).order().select("text").style("font-weight",(function(t,e){return Bg(t,e,B.tickValues(),rt,it)?"bold":"normal"}))}else g=t&&p?g.transition(this.services.transitions.getTransition("axis-update")).call(B):g.call(B);if(v.call(B),i===M.BOTTOM||i===M.TOP){var ot=!1,st=Ua.getProperty(m,"ticks","rotation");if(st===j.ALWAYS)ot=!0;else if(st===j.NEVER)ot=!1;else if(!st||st===j.AUTO)if(f.step){ot=v.selectAll("g.tick text").nodes().some((function(t){return Fd.getSVGElementSize(t,{useBBox:!0}).width>=f.step()}))}else{var ut=Ua.getProperty(m,"ticks","rotateIfSmallerThan")||lo.ticks.rotateIfSmallerThan,lt=l/(y?B.tickValues().length:f.ticks().length)/2;ot=y?lt<2*ut:lt<ut}ot?(P||(B.ticks(this.getNumberOfFittingTicks(l,I,lo.ticks.horizontalSpaceRatio)),v.call(B),g.call(B)),h.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===M.TOP?"start":"end")):h.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(O?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})),S!==C.NONE&&x===D.LABELS&&!E){var ct=this.services.cartesianScales.getScaleDomain(i);if(ct.length>0){var ht=s.select("g.axis."+i+" g.ticks g.tick").html();h.selectAll("g.ticks g.tick").html(ht),h.selectAll("g.tick text").data(ct).text((function(t){return t.length>T?Ua.truncateLabel(t,S,A):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(ct).text((function(t){return t.length>T?Ua.truncateLabel(t,S,A):t})),h.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),h.selectAll("g.tick text").data(ct)}}this.addEventListeners()}else g.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=Fd.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=Ua.getProperty(r,"axes",e),a=Ua.getProperty(i,"scaleType"),o=Ua.getProperty(i,"truncation","threshold"),s=(this.scaleType===D.TIME||(i.scaleType,D.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(Z.Axis.LABEL_MOUSEOVER,{element:ja(this),datum:t}),a===D.LABELS&&t.length>o&&s.services.events.dispatchEvent(Z.Tooltip.SHOW,{hoveredElement:ja(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(Z.Axis.LABEL_MOUSEMOVE,{element:ja(this),datum:t}),a===D.LABELS&&t.length>o&&s.services.events.dispatchEvent(Z.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(Z.Axis.LABEL_CLICK,{element:ja(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(Z.Axis.LABEL_MOUSEOUT,{element:ja(this),datum:t}),a===D.LABELS&&s.services.events.dispatchEvent(Z.Tooltip.HIDE)}))},e.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},e.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},e.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return Ua.clamp(r,2,lo.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;Fd.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Lg),mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",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(M),i=Ua.getProperty(this.getOptions(),"axes");r.forEach((function(t){i[M[t]]&&(n[M[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=M[t];if(e.configs.axes[n]&&!e.children[n]){var r=new vm(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 a={};Object.keys(this.children).forEach((function(t){var n,r=e.children[t],i=r.configs.position,o=r.getInvisibleAxisRef(),s=Fd.getSVGElementSize(o,{useBBox:!0}),u=s.width,l=s.height;switch(r.getTitleRef().empty()?n=0:(n=Fd.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i!==M.LEFT&&i!==M.RIGHT||(n+=5)),i){case M.TOP:a.top=l+n;break;case M.BOTTOM:a.bottom=l+n;break;case M.LEFT:a.left=u+n;break;case M.RIGHT:a.right=u+n}})),Object.keys(a).some((function(t){return e.margins[t]!==a[t]}))&&(this.margins=Object.assign(this.margins,a),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(Z.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Lg);function ym(){Da.preventDefault(),Da.stopImmediatePropagation()}function bm(t){var e=t.document.documentElement,n=ja(t).on("dragstart.drag",ym,!0);"onselectstart"in e?n.on("selectstart.drag",ym,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function _m(t,e){var n=t.document.documentElement,r=ja(t).on("dragstart.drag",null);e&&(r.on("click.drag",ym,!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 xm(t){return function(){return t}}function Om(t,e,n){this.target=t,this.type=e,this.selection=n}function wm(){Da.stopImmediatePropagation()}function Em(){Da.preventDefault(),Da.stopImmediatePropagation()}var Sm={name:"drag"},Tm={name:"space"},Mm={name:"handle"},Am={name:"center"};function Cm(t){return[+t[0],+t[1]]}function Pm(t){return[Cm(t[0]),Cm(t[1])]}function Dm(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=Wa().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return qa(t,r);return null}(e,Da.touches,t)}}var Lm={name:"x",handles:["w","e"].map(Gm),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]]}},km={name:"y",handles:["n","s"].map(Gm),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]]}},Rm={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"},Im={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Nm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Vm={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Bm={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Gm(t){return{type:t}}function Um(){return!Da.ctrlKey&&!Da.button}function zm(){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 Hm(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fm(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function jm(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Wm(){return function(t){var e,n=zm,r=Um,i=Hm,a=!0,o=qd("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([Gm("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Rm.overlay).merge(n).each((function(){var t=Fm(this).extent;ja(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([Gm("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Rm.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 Rm[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=ja(this),e=Fm(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||Da.touches)&&r.apply(this,arguments)){var n,i,o,s,u,h,d,f,p,g,v,m=this,y=Da.target.__data__.type,b="selection"===(a&&Da.metaKey?y="overlay":y)?Sm:a&&Da.altKey?Am:Mm,_=t===km?null:Vm[y],x=t===Lm?null:Bm[y],O=Fm(m),w=O.extent,E=O.selection,S=w[0][0],T=w[0][1],M=w[1][0],A=w[1][1],C=0,P=0,D=_&&x&&a&&Da.shiftKey,L=Da.touches?Dm(Da.changedTouches[0].identifier):Ya,k=L(m),R=k,I=c(m,arguments,!0).beforestart();"overlay"===y?(E&&(p=!0),O.selection=E=[[n=t===km?S:k[0],o=t===Lm?T:k[1]],[u=t===km?M:n,d=t===Lm?A:o]]):(n=E[0][0],o=E[0][1],u=E[1][0],d=E[1][1]),i=n,s=o,h=u,f=d;var N=ja(m).attr("pointer-events","none"),V=N.selectAll(".overlay").attr("cursor",Rm[y]);if(Da.touches)I.moved=G,I.ended=z;else{var B=ja(Da.view).on("mousemove.brush",G,!0).on("mouseup.brush",z,!0);a&&B.on("keydown.brush",H,!0).on("keyup.brush",F,!0),bm(Da.view)}wm(),wf(m),l.call(m),I.start()}function G(){var t=L(m);!D||g||v||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?v=!0:g=!0),R=t,p=!0,Em(),U()}function U(){var t;switch(C=R[0]-k[0],P=R[1]-k[1],b){case Tm:case Sm:_&&(C=Math.max(S-n,Math.min(M-u,C)),i=n+C,h=u+C),x&&(P=Math.max(T-o,Math.min(A-d,P)),s=o+P,f=d+P);break;case Mm:_<0?(C=Math.max(S-n,Math.min(M-n,C)),i=n+C,h=u):_>0&&(C=Math.max(S-u,Math.min(M-u,C)),i=n,h=u+C),x<0?(P=Math.max(T-o,Math.min(A-o,P)),s=o+P,f=d):x>0&&(P=Math.max(T-d,Math.min(A-d,P)),s=o,f=d+P);break;case Am:_&&(i=Math.max(S,Math.min(M,n-C*_)),h=Math.max(S,Math.min(M,u+C*_))),x&&(s=Math.max(T,Math.min(A,o-P*x)),f=Math.max(T,Math.min(A,d+P*x)))}h<i&&(_*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in Im&&V.attr("cursor",Rm[y=Im[y]])),f<s&&(x*=-1,t=o,o=d,d=t,t=s,s=f,f=t,y in Nm&&V.attr("cursor",Rm[y=Nm[y]])),O.selection&&(E=O.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||(O.selection=[[i,s],[h,f]],l.call(m),I.brush())}function z(){if(wm(),Da.touches){if(Da.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else _m(Da.view,p),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),V.attr("cursor",Rm.overlay),O.selection&&(E=O.selection),jm(E)&&(O.selection=null,l.call(m)),I.end()}function H(){switch(Da.keyCode){case 16:D=_&&x;break;case 18:b===Mm&&(_&&(u=h-C*_,n=i+C*_),x&&(d=f-P*x,o=s+P*x),b=Am,U());break;case 32:b!==Mm&&b!==Am||(_<0?u=h-C:_>0&&(n=i-C),x<0?d=f-P:x>0&&(o=s-P),b=Tm,V.attr("cursor",Rm.selection),U());break;default:return}Em()}function F(){switch(Da.keyCode){case 16:D&&(g=v=D=!1,U());break;case 18:b===Am&&(_<0?u=h:_>0&&(n=i),x<0?d=f:x>0&&(o=s),b=Mm,U());break;case 32:b===Tm&&(Da.altKey?(_&&(u=h-C*_,n=i+C*_),x&&(d=f-P*x,o=s+P*x),b=Am):(_<0?u=h:_>0&&(n=i),x<0?d=f:x>0&&(o=s),b=Mm),V.attr("cursor",Rm[y]),U());break;default:return}Em()}}function f(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=Pm(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),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=uu(a,o);function u(t){r.selection=1===t&&null===o?null:s(t),l.call(e),i.brush()}return null!==a&&null!==o?u:u(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=c(e,r).beforestart();wf(e),i.selection=null===a?null:a,l.call(e),o.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=Da;t.sourceEvent=Da,Da=t;try{e.apply(n,r)}finally{Da=i}}(new Om(u,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:xm(Pm(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:xm(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:xm(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(a=!!t,u):a},u.on=function(){var t=o.on.apply(o,arguments);return t===o?u:t},u}(Lm)}var qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",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.getContainerSVG(),a=Fd.appendOrSelect(r,"svg.chart-grid-backdrop"),o=Fd.appendOrSelect(a,"g."+this.type),s=Fd.appendOrSelect(o,this.selectionSelector),u=Fd.getSVGElementSize(a,{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=Fd.appendOrSelect(i,this.frontSelectionSelector);if(f&&d===D.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=zc().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=Wm().extent([[0,0],[l-1,c]]).on("start brush end",(function(){var t=Da.selection;null!==t&&t[0]!==t[1]&&(v.attr("x",s.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),a=i*e.DASH_LENGTH,o=0;o<i;o++)r+=","+e.DASH_LENGTH;r+=","+(c-a),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+c.toString(),v.attr("stroke-dasharray",r)}(t))})).on("end.brushed",(function(){var t=Da.selection;null!==t&&(y(t[0],t[1]),o.call(b.move,null),v.style("display","none"))}));o.call(b);var _=this.services.zoom.getZoomRatio();a.on("click",(function(){if(Da.shiftKey){var t=Ya(o.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}(Lg),Ym=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",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(),a=i[0],o=i[1],s=r.range(),u=s[0],l=s[1];this.chartClipPath=Fd.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=Fd.appendOrSelect(this.chartClipPath,"rect."+this.type);c.attr("x",a).attr("y",l).attr("width",o-a).attr("height",u-l),this.chartClipPath.merge(c).lower()},e}(Lg),Xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=Ua.getProperty(this.getOptions(),"grid","x","enabled"),n=Ua.getProperty(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(Fd.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(Fd.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=pm(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(Ua.getProperty(this.getOptions(),"grid","x","alignWithAxisTicks")){var i=this.services.cartesianScales.getDomainAxisPosition(),a=Ua.getProperty(this.getOptions(),"axes",i,"ticks","values");a&&r.tickValues(a)}else{var o=Ua.getProperty(this.getOptions(),"grid","x","numberOfTicks");r.ticks(o)}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=gm(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(Ua.getProperty(this.getOptions(),"grid","y","alignWithAxisTicks")){var i=this.services.cartesianScales.getRangeAxisPosition(),a=Ua.getProperty(this.getOptions(),"axes",i,"ticks","values");a&&r.tickValues(a)}else{var o=Ua.getProperty(this.getOptions(),"grid","y","numberOfTicks");r.ticks(o)}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(Ua.getTranslationValues(t).tx)-Number(Ua.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+Ua.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var a,o=r[i],s=r[e];if(o)if(s)a=+Ua.getTranslationValues(s).tx-+Ua.getTranslationValues(o).tx;else{var u=n.select("rect.chart-grid-backdrop").node();a=Fd.getSVGElementSize(u).width-+Ua.getTranslationValues(o).tx}else a=+Ua.getTranslationValues(s).tx;return a*this.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=Ua.getProperty(this.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Ua.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(),a=r.range(),o=a[0],s=a[1],u=i.range(),l=u[0],c=u[1];this.backdrop=Fd.appendOrSelect(n,"svg.chart-grid-backdrop");var h=Fd.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",o).attr("y",c).attr("width",Math.abs(s-o)).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}(Lg);var Zm,Km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.isXGridEnabled=Ua.getProperty(e.getOptions(),"grid","x","enabled"),e.isYGridEnabled=Ua.getProperty(e.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=Ua.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,a=this.services.cartesianScales.getOrientation(),o=a===P.HORIZONTAL?r:n,s=Fd.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=Fd.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,o)}));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(Z.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(o-e.domainValue),i=Math.abs(o-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&&!Ua.isEqual(this.elementsToHighlight,y)&&this.hideRuler(),y.dispatch("mouseover"),this.elementsToHighlight=y,this.services.events.dispatchEvent(Z.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(v)}),s.attr("opacity",1);var b=g[0];"horizontal"===a?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=Fd.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(Z.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.model.getDisplayData(),n=function(){var e=Ya(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=Ua.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=Fd.appendOrSelect(t,"svg.chart-grid-backdrop");Fd.appendOrSelect(this.backdrop,this.isXGridEnabled||this.isYGridEnabled?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop")},e}(Lg),$m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e}(Km),Qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.overflowMenuX=0,e.overflowMenuY=0,e.overflowMenuItemId=Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.init=function(){var t=this,e=this.getOptions(),n=ja(this.services.domUtils.getHolder()),r=Ua.getProperty(e,"style","prefix");this.overflowMenu=Fd.appendOrSelect(n,"div."+_d.prefix+"--"+r+"--overflowMenu"),this.overflowMenu.style("max-width",null),this.services.events.addEventListener(Z.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.overflowMenu.html(t.getOverflowMenuHTML())})),this.services.events.addEventListener(Z.Toolbar.HIDE_OVERFLOW_MENU,(function(){t.overflowMenu.html(null)})),document.body.addEventListener("click",(function(){return t.updateOverflowMenu(!1)}))},e.prototype.render=function(t){var e=Ua.getProperty(this.getOptions(),"data","loading"),n=_o.buttonSize,i=parseFloat(this.parent.node().getAttribute("y")),a=this.getContainerSVG();a.attr("transform","translate(0, "+(i+-6)+")");var o=Fd.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttrs:!0}).width;this.overflowMenuX=o-160,this.overflowMenuY=i+-6+n;var s=Fd.appendOrSelect(a,"svg.toolbar-container").attr("width","100%").attr("height",_o.height).attr("opacity",1);s.html(null);var u=this.getControlConfigs(),l=u.buttonList;if(u.overflowMenuItemList&&l.push(this.getOverflowButtonConfig()),e||0===l.length)Fd.appendOrSelect(s,"svg.toolbar-loading-spacer").append("rect").attr("height",_o.height).attr("width",3*n).attr("opacity",0);else{var c=0;l.forEach((function(t){var e=Fd.appendOrSelect(s,"svg."+t.id).classed("toolbar-button",!0),i=Fd.appendOrSelect(e,"rect.toolbar-button-background").attr("x",c).attr("y",0).attr("width",n).attr("height",n),a=Fd.appendOrSelect(e,"svg.toolbar-button-icon").attr("x",c+_o.iconPadding).attr("y",_o.iconPadding).attr("width",_o.iconSize).attr("height",_o.iconSize).attr("viewBox","0 0 32 32").attr("role",r.IMG);a.html(t.iconSVGContent),t.shouldBeDisabled()?(e.classed("toolbar-button--disabled",!0).classed("toolbar-button--focusable",!1).attr("tabindex",-1).attr("role",null),a.classed("toolbar-button-icon--disabled",!0),i.classed("toolbar-button-background--disabled",!0),e.on("click",null).on("keyup",null)):(e.classed("toolbar-button--disabled",!1).classed("toolbar-button--focusable",!0).attr("tabindex",0).attr("role",r.BUTTON),a.classed("toolbar-button-icon--disabled",!1),i.classed("toolbar-button-background--disabled",!1),e.on("click",t.clickFunction).on("keyup",(function(){(Da.key&&"Enter"===Da.key||" "===Da.key)&&(Da.preventDefault(),t.clickFunction())}))),c+=n})),this.overflowButton=this.getContainerSVG().select("svg.toolbar-overflow-menu"),this.isOverflowMenuOpen()&&this.updateOverflowMenu(!0)}},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.selectAll("ul.bx--overflow-menu-options--open").size()>0},e.prototype.updateOverflowMenu=function(t){this.overflowButton&&this.overflowButton.classed("toolbar-button--hovered",t),t?this.services.events.dispatchEvent(Z.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(Z.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=ja("#"+e[n].id+this.overflowMenuItemId).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=ja("#"+e[n].id+this.overflowMenuItemId).node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(){var t=this;if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var e=this;this.getOverflowMenuItems().forEach((function(n,r){var i=ja("#"+n.id+t.overflowMenuItemId);null!==i&&(i.on("click",(function(){n.clickFunction(),e.updateOverflowMenu(!1)})),i.on("keyup",(function(){"Enter"===Da.key?n.clickFunction():"ArrowUp"===Da.key?e.focusOnPreviousEnabledMenuItem(r):"ArrowDown"===Da.key&&e.focusOnNextEnabledMenuItem(r)})))})),e.focusOnNextEnabledMenuItem(-1)}Da.stopImmediatePropagation()},e.prototype.getOverflowMenuHTML=function(){var t,e=this,n=this.getOverflowMenuItems();return n&&0!==n.length?(t='<div data-floating-menu-container="true" data-floating-menu-direction="bottom" role="main">\n\t\t\t<ul class="bx--overflow-menu-options bx--overflow-menu--flip bx--overflow-menu-options--open"\n\t\t\t\ttabindex="-1" role="'+r.MENU+'" aria-label="Menu" data-floating-menu-direction="bottom"\n\t\t\t\tstyle="left:'+this.overflowMenuX+"px; top:"+this.overflowMenuY+'px;">',n.forEach((function(n,i){var a="bx--overflow-menu-options__option".concat(n.shouldBeDisabled()?" bx--overflow-menu-options__option--disabled":"");t+='<li class="'+a+'" role="'+r.MENU_ITEM+'">\n\t\t\t\t<button class="bx--overflow-menu-options__btn"\n\t\t\t\t\tdata-floating-menu-primary-focus="'+(0===i)+'"\n\t\t\t\t\ttabindex="-1" index="'+i+'" title="'+n.text+'"\n\t\t\t\t\tid="'+(n.id+e.overflowMenuItemId)+'">\n\t\t\t\t\t<div class="bx--overflow-menu-options__option-content">\n\t\t\t\t\t\t'+n.text+"\n\t\t\t\t\t</div>\n\t\t\t\t</button>\n\t\t\t</li>"})),t+="</ul></div>"):""},e.prototype.getControlConfigs=function(){var t=this,e=Ua.getProperty(this.getOptions(),"toolbar","numberOfIcons"),n=Ua.getProperty(this.getOptions(),"toolbar","controls"),r=[];return n.forEach((function(e){var n=t.getControlConfigByType(e.type);n&&(n.text=e.text?e.text:e.type,r.push(n))})),r.length<=e?{buttonList:r}:{buttonList:r.splice(0,e-1),overflowMenuItemList:r}},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.isZoomBarEnabled()&&!this.services.zoom.isEmptyState();switch(t){case q.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 q.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 q.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;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case q.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<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 q.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 q.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"/>';default:throw Error("Not supported toolbar control type: "+t)}},e}(Lg),Jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",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],a=r[1],o=i>0&&a<0||i<0&&a>0,s=this.getContainerSVG();if(o){var u=this.services.cartesianScales.getDomainScale().range(),l=u[0],c=u[1],h=+n(0)+.5;h||(h=n.range()[0]);var d=Ua.flipSVGCoordinatesBasedOnOrientation({x0:l,x1:c,y0:h,y1:h},this.services.cartesianScales.getOrientation());Fd.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}(Lg),ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=Wm(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(Z.ZoomBar.UPDATE,this.render.bind(this));var t=Ua.getProperty(this.getOptions(),"zoomBar",M.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),r=this.services.zoom.isZoomBarLoading(M.TOP),i=this.services.zoom.isZoomBarLocked(M.TOP),a=Ua.getProperty(this.getOptions(),"zoomBar",M.TOP,"type"),o=xo.height[a],s=Fd.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=Fd.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);Fd.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",xo.spacerHeight).attr("opacity",1).attr("fill","none");if(a===A.GRAPH_VIEW?Fd.appendOrSelect(c,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",s-u).attr("height","100%").classed("zoom-bg-skeleton",r):a===A.SLIDER_VIEW&&Fd.appendOrSelect(c,"rect.zoom-slider-bg").attr("x",u).attr("y",o/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===D.TIME){var g=this.services.zoom.getZoomBarData();if(Ua.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=Ua.getProperty(this.getOptions(),"zoomBar",M.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:Ua.merge([],v)},{skipUpdate:!0}):this.model.set({initialZoomDomain:Ua.merge([],y),zoomDomain:y?Ua.merge([],y):v},{skipUpdate:!0}),this.xScale.range([u,s]).domain(v),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,o-6]).domain(es(g,(function(t){return t.value})));var b=this.model.get("zoomDomain");a===A.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 _=Fd.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.getContainerSVG(),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.getContainerSVG(),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=Ua.getProperty(this.getOptions(),"zoomBar",M.TOP,"type"),a=xo.height[i];this.brush.extent([[e,0],[n,a]]).on("start brush end",null).on("start brush end",(function(){var e=Da.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.getContainerSVG(),n,r),null!=Da.sourceEvent&&("mousemove"===Da.sourceEvent.type||"mouseup"===Da.sourceEvent.type||"mousedown"===Da.sourceEvent.type||"touchstart"===Da.sourceEvent.type||"touchmove"===Da.sourceEvent.type||"touchend"===Da.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"===Da.type?i=Z.ZoomBar.SELECTION_START:"brush"===Da.type?i=Z.ZoomBar.SELECTION_IN_PROGRESS:"end"===Da.type&&(i=Z.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(Z.ZoomDomain.CHANGE,{newDomain:r})),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=xo.handleWidth,a=Ua.getProperty(this.getOptions(),"zoomBar",M.TOP,"type"),o=xo.height[a],s=-i/2,u=xo.handleBarWidth,l=a===A.GRAPH_VIEW?xo.handleBarHeight:6,c=-u/2,h=(o-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",o).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"),a===A.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],o)},e.prototype.updateSliderSelectedArea=function(t){var e=Ua.getProperty(this.getOptions(),"zoomBar",M.TOP,"type"),n=xo.height[e],r=(Fd.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getContainerSVG().select("svg.zoom-container");Fd.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,a=i.getMainXAxisPosition(),o=i.getMainYAxisPosition(),s=i.getMainXScaleType(),u=i.getMainYScaleType(),l=function(t,e,n){return function(r,a){return i.getValueFromScale(t,e,n,r,a)}},c=l(this.xScale,s,a),h=l(this.yScale,u,o),d=Ua.getProperty(this.getOptions(),"zoomBar",M.TOP,"type"),f=xo.height[d],p=bh().x((function(t,e){return c(t,e)})).y0(f).y1((function(t,e){return f-h(t,e)})),g=Fd.appendOrSelect(t,e).datum(n).attr("d",p);r&&g.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,a){var o=Fd.appendOrSelect(t,"clipPath").attr("id",e);Fd.appendOrSelect(o,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",a)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=Ua.clone(t),i=this.services.cartesianScales.getDomainIdentifier(),a=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(r[0][i]))(n={})[i]=e[0],n[a]=0,r.unshift(n);if(Number(e[1])>Number(r[r.length-1][i]))(n={})[i]=e[1],n[a]=0,r.push(n);return r}},e.prototype.renderZoomBarBaseline=function(t,e,n,r){void 0===r&&(r=!1);var i=Ua.getProperty(this.model.getOptions(),"zoomBar",M.TOP,"type"),a=xo.height[i],o=yh()([[e,a],[n,a]]);Fd.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",o).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),Fd.appendOrSelect(this.getContainerSVG(),this.brushSelector).html(null),Ua.getProperty(this.getOptions(),"zoomBar",M.TOP,"type")===A.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(Z.ZoomBar.UPDATE,this.render.bind(this))},e}(Lg),ey=function(){function t(t,e){this.services={domUtils:Fd,events:jd,gradientUtils:ap,transitions:ip},this.model=new yd(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(Z.Model.UPDATE,(function(t){var e=!!Ua.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(Z.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(Z.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){var e={id:"title",components:[new qg(this.model,this.services)],growth:{x:N.PREFERRED,y:N.FIXED}},n={id:"legend",components:[new kg(this.model,this.services)],growth:{x:N.PREFERRED,y:N.PREFERRED}},r={id:"graph-frame",components:t,growth:{x:N.STRETCH,y:N.FIXED}},i=!1!==this.model.getOptions().legend.enabled,a=I.COLUMN;if(i){var o=Ua.getProperty(this.model.getOptions(),"legend","position");"left"===o?(a=I.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=R.VERTICAL)):"right"===o?(a=I.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=R.VERTICAL)):"bottom"===o&&(a=I.COLUMN_REVERSE)}var s={id:"spacer",components:[new nm(this.model,this.services)],growth:{x:N.PREFERRED,y:N.FIXED}},u={id:"full-frame",components:[new rm(this.model,this.services,E(i?[n]:[],i?[s]:[],[r]),{direction:a})],growth:{x:N.STRETCH,y:N.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new nm(this.model,this.services)],growth:{x:N.PREFERRED,y:N.FIXED}};l.push(c)}return l.push(u),[new Xg(this.model,this.services),new rm(this.model,this.services,l,{direction:I.COLUMN})]},t}(),ny=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.setData=function(e){var n;if(e&&(n=t.prototype.setData.call(this,e),Ua.getProperty(this.getOptions(),"zoomBar",M.TOP,"enabled"))){var r=Ua.getProperty(this.getOptions(),"zoomBar",M.TOP,"data");this.setZoomBarData(r)}return n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(Ua.clone(t)):this.getDisplayData(),n=e,r=this.services.cartesianScales;if(e&&r.domainAxisPosition&&r.rangeAxisPosition){var i=r.getDomainIdentifier(),a=r.getRangeIdentifier(),o=e.map((function(t){return t[i].getTime()}));n=(o=Ua.removeArrayDuplicates(o).sort()).map((function(t){var n=0,r={};return e.forEach((function(e){e[i].getTime()===t&&(n+=e[a])})),r[i]=new Date(t),r[a]=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(M).forEach((function(t){var r=M[t],i=e.axes[r];if(i&&i.scaleType===D.TIME){var a=i.mapsTo;null===a&&void 0===a||n.push(a)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){null===Ua.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}(yd),ry=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Mg,curves:Pg,zoom:Dg}),r.model=new ny(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=Ua.getProperty(n,"zoomBar",M.TOP,"enabled"),i=Ua.getProperty(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var a=this.services.cartesianScales.getMainXAxisPosition(),o=Ua.getProperty(n,"axes",a,"scaleType"),s=r&&a===M.BOTTOM&&o===D.TIME,u=this.services.zoom.isZoomBarLocked(M.TOP),l=!!this.model.getOptions().title,c={id:"title",components:[new qg(this.model,this.services)],growth:{x:N.STRETCH,y:N.FIXED}},h={id:"toolbar",components:[new Qm(this.model,this.services)],growth:{x:N.PREFERRED,y:N.FIXED}},d={id:"header",components:[new rm(this.model,this.services,E([c],i?[h]:[]),{direction:I.ROW})],growth:{x:N.PREFERRED,y:N.FIXED}},f={id:"legend",components:[new kg(this.model,this.services)],growth:{x:N.PREFERRED,y:N.PREFERRED}};s&&!u&&t.push(new Ym(this.model,this.services),new qm(this.model,this.services)),t.push(new Wg(this.model,this.services));var p={id:"graph-frame",components:t,growth:{x:N.STRETCH,y:N.STRETCH}},g=!1!==Ua.getProperty(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,v=I.COLUMN;if(g){var m=Ua.getProperty(this.model.getOptions(),"legend","position");m===L.LEFT?(v=I.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=R.VERTICAL)):m===L.RIGHT?(v=I.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=R.VERTICAL)):m===L.BOTTOM&&(v=I.COLUMN_REVERSE)}var y={id:"spacer",components:[new nm(this.model,this.services)],growth:{x:N.PREFERRED,y:N.FIXED}},b={id:"full-frame",components:[new rm(this.model,this.services,E(g?[f]:[],g?[y]:[],[p]),{direction:v})],growth:{x:N.STRETCH,y:N.FIXED}},_={id:"zoom-bar",components:[new ty(this.model,this.services)],growth:{x:N.PREFERRED,y:N.FIXED}},x=[];if(l||i){x.push(d);var O={id:"spacer",components:[new nm(this.model,this.services,i?{size:15}:void 0)],growth:{x:N.PREFERRED,y:N.FIXED}};x.push(O)}return s&&x.push(_),x.push(b),[new Zg(this.model,this.services),new rm(this.model,this.services,x,{direction:I.COLUMN})]},e}(ey),iy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Ua.clone(Wo.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new Km(this.model,this.services),new ov(this.model,this.services),new Kg(this.model,this.services),new rv(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new fv(this.model,this.services,{skeleton:B.GRID})];return this.getAxisChartComponents(t)},e}(ry),ay=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new $m(this.model,this.services),new $g(this.model,this.services),new ov(this.model,this.services,{stacked:!0}),new uv(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new fv(this.model,this.services,{skeleton:B.GRID})];return this.getAxisChartComponents(t)},e}(ry),oy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new Jg(this.model,this.services),new Jm(this.model,this.services),new fv(this.model,this.services,{skeleton:B.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(ry),sy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new tv(this.model,this.services),new Jm(this.model,this.services),new fv(this.model,this.services,{skeleton:B.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(ry),uy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new $m(this.model,this.services),new ev(this.model,this.services),new fv(this.model,this.services,{skeleton:B.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(ry),ly=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getBoxQuartiles=function(t){return{q_25:ls(t,.25),q_50:ls(t,.5),q_75:ls(t,.75)}},e.prototype.getBoxplotData=function(){for(var t=this.getOptions().data.groupMapsTo,e=this.getGroupedData(),n=[],r=function(e,r){for(var a,o=i.services.cartesianScales.getRangeIdentifier(),s=r.map((function(t){return t[o]})).sort($o),u=((a={})[t]=e,a.counts=s,a.quartiles=i.getBoxQuartiles(s),a.outliers=null,a.whiskers=null,a),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=hs(g),_=cs(g);u.whiskers={min:b||hs([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75]),max:_||cs([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75])},n.push(u)},i=this,a=0,o=e;a<o.length;a++){var s=o[a];r(s.name,s.data)}return n},e.prototype.setColorClassNames=function(){var t=Ua.getProperty(this.getOptions(),"color","pairing"),e=Ua.getProperty(t,"option");e=e<=so.pairingOptions["1-color"]?e:1;var n=this.allDataGroups.map((function(t,n){return"1-"+e+"-1"}));this.colorClassNames=ys().range(n).domain(this.allDataGroups)},e}(ny),cy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new ly(r.services),r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.boxplotChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new nv(this.model,this.services),new Jm(this.model,this.services),new fv(this.model,this.services,{skeleton:B.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})},e}(ry),hy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new Km(this.model,this.services),new iv(this.model,this.services),new fv(this.model,this.services,{skeleton:B.GRID})];return this.getAxisChartComponents(t)},e}(ry),dy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.bulletChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new av(this.model,this.services),new fv(this.model,this.services,{skeleton:B.GRID})];return this.getAxisChartComponents(t)},e}(ry),fy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new Km(this.model,this.services),new ov(this.model,this.services),new rv(this.model,this.services,{handleThresholds:!0}),new pv(this.model,this.services)];return this.getAxisChartComponents(t)},e}(ry),py=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.lollipopChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new Km(this.model,this.services),new sv(this.model,this.services),new rv(this.model,this.services),new fv(this.model,this.services,{skeleton:B.GRID})];return this.getAxisChartComponents(t)},e}(ry),gy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new mm(this.model,this.services),new Xm(this.model,this.services),new Km(this.model,this.services),new rv(this.model,this.services),new fv(this.model,this.services,{skeleton:B.GRID})];return this.getAxisChartComponents(t)},e}(ry),vy=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}(yd),my=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new vy(i.services),r?i:(i.model.setOptions(Ua.mergeDefaultChartOptions(Wo.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new cv(this.model,this.services),new fv(this.model,this.services,{skeleton:B.PIE})];return this.getChartComponents(t)},e}(ey),yy=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dv(this.model,this.services),new fv(this.model,this.services,{skeleton:B.DONUT})];return this.getChartComponents(t)},e}(my),by=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]=ho.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=Ua.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=Ua.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}(yd),_y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),a=this.getOptions(),o=this.model.getDisplayData(),s=this.model.getStatus(),u=Fd.getSVGElementSize(this.parent,{useAttrs:!0}).width,l=a.data.groupMapsTo,c=Ua.getProperty(a,"meter","min"),h=Ua.getProperty(a,"meter","max"),d=Ua.getProperty(a,"meter","subranges");null!=d&&this.drawSubrange();var f=Yu().domain([null!=c?c:0,null!=h?h:100]).range([0,u]);Fd.appendOrSelect(i,"rect.container").attr("x",0).attr("y",0).attr("width",u).attr("height",Ua.getProperty(a,"meter","height"));var p=o.value>=(null!=h?h:100),g=i.selectAll("rect.value").data([o]),v=null==s||n.model.isUserProvidedColorScaleValid()?"value":"value status--"+s;g.enter().append("rect").classed("value",!0).merge(g).attr("x",0).attr("y",0).attr("height",Ua.getProperty(a,"meter","height")).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[T.FILL],dataGroupName:t[l],originalClassName:v})})).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return f(p?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 m=Ua.getProperty(a,"meter","peak"),y=null!==m&&m<o.value?o.value:m,b=null===y||p?[]:[y],_=i.selectAll("line.peak").data(b);if(_.enter().append("line").classed("peak",!0).merge(_).attr("y1",0).attr("y2",Ua.getProperty(a,"meter","height")).transition(this.services.transitions.getTransition("peak-line-update",t)).attr("x1",(function(t){return f(t)})).attr("x2",(function(t){return f(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),_.exit().remove(),null!=c&&null!=h){var x=Fd.appendOrSelect(i,"text.minimum");x.data(c),x.enter().append("text").attr("class","minimum").merge(x).text(c).attr("x",0).attr("y",null!=d?30:20),x.exit().remove();var O=Fd.appendOrSelect(i,"text.maximum");O.data(h),O.enter().append("text").attr("class","maximum").merge(O).text(h).attr("x",f(h)-15).attr("y",null!=d?30:20),O.exit().remove()}if(null!=d){var w=i.selectAll("text.subrange-label-begin").data(d);w.enter().append("text").merge(w).attr("class","subrange-label-begin").attr("x",(function(t){return f(t.begin)-15})).attr("y",30).text((function(t){return t.begin}));var E=i.selectAll("text.subrange-label-end").data(d);E.enter().append("text").merge(E).attr("class","subrange-label-end").attr("x",(function(t){return f(t.end)-15})).attr("y",30).text((function(t){return t.end}))}this.services.domUtils.setSVGMaxHeight()},e.prototype.drawSubrange=function(){var t=this.model.getOptions(),e=Ua.getProperty(t,"meter","subranges"),n=Ua.getProperty(t,"meter","min"),i=Ua.getProperty(t,"meter","max"),a=this.model.getDisplayData(),o=this.getContainerSVG(),s=Fd.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=Yu().domain([null!=n?n:0,null!=i?i:100]).range([0,s]),l=a.value>=(null!=i?i:100),c=Fd.appendOrSelect(o,"g.subrange-group").selectAll("rect.subrange").data(e);c.enter().append("rect").classed("subrange",!0).merge(c).attr("x",(function(t){return u(t.begin)})).attr("y",-5).attr("height",Ua.getProperty(t,"meter","height")+10).attr("width",(function(t){return u(l?100:t.end-t.begin)})).attr("fill",(function(t){return t.color})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","subrange").attr("aria-label",(function(t){return t.value}))},e}(Lg),xy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new by(r.services),r.model.setOptions(Ua.merge(Ua.clone(Wo.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new _y(this.model,this.services)],growth:{x:N.STRETCH,y:N.FIXED}},e={id:"title",components:[new Yg(this.model,this.services)],growth:{x:N.PREFERRED,y:N.FIXED}},n={id:"spacer",components:[new nm(this.model,this.services,{size:8})],growth:{x:N.PREFERRED,y:N.FIXED}},r=[new rm(this.model,this.services,[e,n,t],{direction:I.COLUMN})];return this.getChartComponents(r)},e}(ey),Oy=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(Ua.mergeDefaultChartOptions(Wo.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Bv(this.model,this.services)];return this.getChartComponents(t)},e}(ey),wy=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}(yd),Ey=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new wy(r.services),r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new hv(this.model,this.services)];return this.getChartComponents(t)},e}(ey),Sy=((Zm={})[W.LINE]=[ov,rv],Zm[W.SCATTER]=[rv],Zm[W.AREA]=[Kg,ov,rv],Zm[W.STACKED_AREA]=[$g,ov,uv,$m],Zm[W.SIMPLE_BAR]=[Jg],Zm[W.GROUPED_BAR]=[tv,Jm],Zm[W.STACKED_BAR]=[ev,$m],Zm),Ty=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=Ua.mergeDefaultChartOptions(Wo.comboChart,n.options);return n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:W.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,a=e.type;return"string"==typeof e.type?Object.keys(Sy).includes(e.type)?(r=Ua.merge({},Wo[Ua.camelCase(e.type)+"Chart"],t.model.getOptions(),e.options),e.type===W.STACKED_AREA&&(i=!0),Sy[e.type].map((function(a,o){return new a(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=Ua.merge({},t.model.getOptions(),e.options),new a(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r}))})).filter((function(t){return null!==t}));return Ua.flatten(r)},e.prototype.getComponents=function(){var t=this.model.getOptions().comboChartTypes.some((function(t){return t.type===W.STACKED_BAR||t.type===W.STACKED_AREA})),e=E([new mm(this.model,this.services),new Xm(this.model,this.services),new fv(this.model,this.services,{skeleton:B.GRID})],t?[]:[new Km(this.model,this.services)],this.getGraphComponents());return this.getAxisChartComponents(e)},e}(ry),My=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new kv(this.model,this.services)];return this.getChartComponents(t)},e}(ey),Ay=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Ua.mergeDefaultChartOptions(Wo.wordCloudChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new em(this.model,this.services),new fv(this.model,this.services,{skeleton:B.PIE})];return this.getChartComponents(t)},e}(ey);t.AreaChart=iy,t.BoxplotChart=cy,t.BubbleChart=hy,t.BulletChart=dy,t.ComboChart=Ty,t.DonutChart=yy,t.GaugeChart=Ey,t.GroupedBarChart=sy,t.LineChart=fy,t.LollipopChart=py,t.MeterChart=xy,t.PieChart=my,t.RadarChart=Oy,t.ScatterChart=gy,t.SimpleBarChart=oy,t.StackedAreaChart=ay,t.StackedBarChart=uy,t.TreemapChart=My,t.WordCloudChart=Ay,t.configurations=qo,t.interfaces=K,Object.defineProperty(t,"__esModule",{value:!0})}));
