@carbon/charts 0.34.4 → 0.34.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/CHANGELOG.md +34 -16
  2. package/axis-chart.d.ts +2 -2
  3. package/axis-chart.js +27 -4
  4. package/axis-chart.js.map +1 -1
  5. package/build/demo/data/bar.d.ts +23 -0
  6. package/build/demo/data/zoom-bar.d.ts +74 -0
  7. package/build/src/axis-chart.d.ts +2 -2
  8. package/build/src/components/axes/axis.d.ts +4 -0
  9. package/build/src/components/axes/chart-clip.d.ts +11 -0
  10. package/build/src/components/axes/grid-brush.d.ts +8 -0
  11. package/build/src/components/axes/ruler-stacked-bar.d.ts +1 -0
  12. package/build/src/components/axes/zoom-bar.d.ts +20 -0
  13. package/build/src/components/component.d.ts +3 -1
  14. package/build/src/components/essentials/tooltip.d.ts +1 -1
  15. package/build/src/components/graphs/bar.d.ts +1 -0
  16. package/build/src/components/graphs/scatter.d.ts +1 -0
  17. package/build/src/components/index.d.ts +3 -0
  18. package/build/src/configuration.d.ts +4 -0
  19. package/build/src/interfaces/charts.d.ts +5 -1
  20. package/build/src/interfaces/components.d.ts +26 -0
  21. package/build/src/interfaces/events.d.ts +9 -0
  22. package/build/src/model.d.ts +2 -2
  23. package/build/src/services/index.d.ts +1 -0
  24. package/build/src/services/scales-cartesian.d.ts +7 -4
  25. package/build/src/services/zoom.d.ts +5 -0
  26. package/build/src/tools.d.ts +1 -0
  27. package/bundle.js +1 -1
  28. package/chart.js +5 -4
  29. package/chart.js.map +1 -1
  30. package/charts/area-stacked.js.map +1 -1
  31. package/charts/area.js.map +1 -1
  32. package/charts/bar-grouped.js.map +1 -1
  33. package/charts/bar-simple.js.map +1 -1
  34. package/charts/bar-stacked.js.map +1 -1
  35. package/charts/bubble.js.map +1 -1
  36. package/charts/donut.js.map +1 -1
  37. package/charts/line.js.map +1 -1
  38. package/charts/meter.js +7 -15
  39. package/charts/meter.js.map +1 -1
  40. package/charts/pie.js.map +1 -1
  41. package/charts/radar.js +3 -1
  42. package/charts/radar.js.map +1 -1
  43. package/charts/scatter.js.map +1 -1
  44. package/components/axes/axis.d.ts +4 -0
  45. package/components/axes/axis.js +45 -12
  46. package/components/axes/axis.js.map +1 -1
  47. package/components/axes/chart-clip.d.ts +11 -0
  48. package/components/axes/chart-clip.js +59 -0
  49. package/components/axes/chart-clip.js.map +1 -0
  50. package/components/axes/grid-brush.d.ts +8 -0
  51. package/components/axes/grid-brush.js +163 -0
  52. package/components/axes/grid-brush.js.map +1 -0
  53. package/components/axes/ruler-stacked-bar.d.ts +1 -0
  54. package/components/axes/ruler-stacked-bar.js +8 -0
  55. package/components/axes/ruler-stacked-bar.js.map +1 -1
  56. package/components/axes/ruler.js +19 -10
  57. package/components/axes/ruler.js.map +1 -1
  58. package/components/axes/two-dimensional-axes.js +4 -0
  59. package/components/axes/two-dimensional-axes.js.map +1 -1
  60. package/components/axes/zoom-bar.d.ts +20 -0
  61. package/components/axes/zoom-bar.js +312 -0
  62. package/components/axes/zoom-bar.js.map +1 -0
  63. package/components/component.d.ts +3 -1
  64. package/components/component.js +11 -2
  65. package/components/component.js.map +1 -1
  66. package/components/essentials/legend.js.map +1 -1
  67. package/components/essentials/threshold.js +2 -1
  68. package/components/essentials/threshold.js.map +1 -1
  69. package/components/essentials/title-meter.js +28 -17
  70. package/components/essentials/title-meter.js.map +1 -1
  71. package/components/essentials/title.js +2 -1
  72. package/components/essentials/title.js.map +1 -1
  73. package/components/essentials/tooltip-axis.js +4 -1
  74. package/components/essentials/tooltip-axis.js.map +1 -1
  75. package/components/essentials/tooltip.d.ts +1 -1
  76. package/components/essentials/tooltip.js +30 -37
  77. package/components/essentials/tooltip.js.map +1 -1
  78. package/components/graphs/area-stacked.js +1 -1
  79. package/components/graphs/area-stacked.js.map +1 -1
  80. package/components/graphs/area.js +1 -1
  81. package/components/graphs/area.js.map +1 -1
  82. package/components/graphs/bar-grouped.js +5 -1
  83. package/components/graphs/bar-grouped.js.map +1 -1
  84. package/components/graphs/bar-simple.js +5 -1
  85. package/components/graphs/bar-simple.js.map +1 -1
  86. package/components/graphs/bar-stacked.js +5 -1
  87. package/components/graphs/bar-stacked.js.map +1 -1
  88. package/components/graphs/bar.d.ts +1 -0
  89. package/components/graphs/bar.js +21 -1
  90. package/components/graphs/bar.js.map +1 -1
  91. package/components/graphs/line.js +1 -1
  92. package/components/graphs/line.js.map +1 -1
  93. package/components/graphs/meter.js +13 -12
  94. package/components/graphs/meter.js.map +1 -1
  95. package/components/graphs/pie.js +17 -10
  96. package/components/graphs/pie.js.map +1 -1
  97. package/components/graphs/radar.js.map +1 -1
  98. package/components/graphs/scatter-stacked.js +1 -1
  99. package/components/graphs/scatter-stacked.js.map +1 -1
  100. package/components/graphs/scatter.d.ts +1 -0
  101. package/components/graphs/scatter.js +14 -1
  102. package/components/graphs/scatter.js.map +1 -1
  103. package/components/index.d.ts +3 -0
  104. package/components/index.js +3 -0
  105. package/components/index.js.map +1 -1
  106. package/configuration.d.ts +4 -0
  107. package/configuration.js +10 -1
  108. package/configuration.js.map +1 -1
  109. package/demo/data/bar.d.ts +23 -0
  110. package/demo/data/bar.js +34 -0
  111. package/demo/data/bar.js.map +1 -1
  112. package/demo/data/bundle.js +1 -1
  113. package/demo/data/donut.js.map +1 -1
  114. package/demo/data/index.js +78 -0
  115. package/demo/data/index.js.map +1 -1
  116. package/demo/data/line.js.map +1 -1
  117. package/demo/data/meter.js.map +1 -1
  118. package/demo/data/pie.js.map +1 -1
  119. package/demo/data/radar.js.map +1 -1
  120. package/demo/data/time-series-axis.js +6 -6
  121. package/demo/data/time-series-axis.js.map +1 -1
  122. package/demo/data/zoom-bar.d.ts +74 -0
  123. package/demo/data/zoom-bar.js +77 -0
  124. package/demo/data/zoom-bar.js.map +1 -0
  125. package/demo/styles.css +352 -4
  126. package/demo/styles.css.map +1 -1
  127. package/demo/styles.min.css +1 -1
  128. package/demo/styles.min.css.map +1 -1
  129. package/demo/tsconfig.tsbuildinfo +41 -21
  130. package/interfaces/axis-scales.js.map +1 -1
  131. package/interfaces/charts.d.ts +5 -1
  132. package/interfaces/charts.js.map +1 -1
  133. package/interfaces/components.d.ts +26 -0
  134. package/interfaces/components.js.map +1 -1
  135. package/interfaces/events.d.ts +9 -0
  136. package/interfaces/events.js +10 -0
  137. package/interfaces/events.js.map +1 -1
  138. package/model-meter.js +3 -1
  139. package/model-meter.js.map +1 -1
  140. package/model.d.ts +2 -2
  141. package/model.js +10 -8
  142. package/model.js.map +1 -1
  143. package/package.json +1 -1
  144. package/services/essentials/dom-utils.js +9 -4
  145. package/services/essentials/dom-utils.js.map +1 -1
  146. package/services/index.d.ts +1 -0
  147. package/services/index.js +1 -0
  148. package/services/index.js.map +1 -1
  149. package/services/scales-cartesian.d.ts +7 -4
  150. package/services/scales-cartesian.js +27 -12
  151. package/services/scales-cartesian.js.map +1 -1
  152. package/services/zoom.d.ts +5 -0
  153. package/services/zoom.js +73 -0
  154. package/services/zoom.js.map +1 -0
  155. package/styles/components/_grid-brush.scss +18 -0
  156. package/styles/components/_meter-title.scss +5 -1
  157. package/styles/components/_zoom-bar.scss +38 -0
  158. package/styles/components/index.scss +2 -0
  159. package/styles/graphs/_meter.scss +5 -1
  160. package/styles/styles.scss +1 -1
  161. package/styles-g10.css +41 -1
  162. package/styles-g10.css.map +1 -1
  163. package/styles-g10.min.css +1 -1
  164. package/styles-g10.min.css.map +1 -1
  165. package/styles-g100.css +41 -1
  166. package/styles-g100.css.map +1 -1
  167. package/styles-g100.min.css +1 -1
  168. package/styles-g100.min.css.map +1 -1
  169. package/styles-g90.css +41 -1
  170. package/styles-g90.css.map +1 -1
  171. package/styles-g90.min.css +1 -1
  172. package/styles-g90.min.css.map +1 -1
  173. package/styles.css +41 -1
  174. package/styles.css.map +1 -1
  175. package/styles.min.css +1 -1
  176. package/styles.min.css.map +1 -1
  177. package/tools.d.ts +1 -0
  178. package/tools.js +16 -0
  179. package/tools.js.map +1 -1
  180. package/tsconfig.tsbuildinfo +169 -74
package/bundle.js CHANGED
@@ -12,4 +12,4 @@
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,a,o,s,u,c,l,h,f,d,p,g,v,m=function(){return(m=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 y(){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"}(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.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout"}(o||(o={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(s||(s={})),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"}(u||(u={})),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"}(c||(c={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(l||(l={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(h||(h={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(f||(f={})),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"}(d||(d={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(p||(p={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(g||(g={})),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"}(v||(v={}));var _,b,x,w,E,O,T,S,M,A,C,P,k,D,L,R,I,V,N=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return a},get Axis(){return o},get Area(){return s},get Pie(){return u},get Gauge(){return c},get Bar(){return l},get Scatter(){return h},get Line(){return f},get Radar(){return d},get Tooltip(){return p},get Threshold(){return g},get Legend(){return v}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(_||(_={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(b||(b={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(x||(x={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(w||(w={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(E||(E={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(O||(O={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(T||(T={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(S||(S={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(M||(M={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(A||(A={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(C||(C={})),function(t){t.LEFT="left",t.RIGHT="right"}(P||(P={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(k||(k={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(D||(D={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(L||(L={})),function(t){t.SEMI="semi",t.FULL="full"}(R||(R={})),function(t){t.UP="up",t.DOWN="down"}(I||(I={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(V||(V={}));var U=Object.freeze({__proto__:null,get Roles(){return r},Events:N,get ChartTheme(){return _},get AxisPositions(){return b},get TruncationTypes(){return x},get CartesianOrientations(){return w},get ScaleTypes(){return E},get TooltipPosition(){return O},get LegendPositions(){return T},get Alignments(){return S},get LegendOrientations(){return M},get LayoutDirection(){return A},get LayoutGrowth(){return C},get CalloutDirections(){return P},get Skeletons(){return k},get TextAnchor(){return D},get DominantBaseline(){return L},get GaugeTypes(){return R},get ArrowDirections(){return I},get Statuses(){return V}}),j="object"==typeof global&&global&&global.Object===Object&&global,G="object"==typeof self&&self&&self.Object===Object&&self,H=j||G||Function("return this")(),B=H.Symbol,F=Object.prototype,z=F.hasOwnProperty,W=F.toString,Y=B?B.toStringTag:void 0;var q=Object.prototype.toString;var X=B?B.toStringTag:void 0;function Z(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":X&&X in Object(t)?function(t){var e=z.call(t,Y),n=t[Y];try{t[Y]=void 0;var r=!0}catch(t){}var i=W.call(t);return r&&(e?t[Y]=n:delete t[Y]),i}(t):function(t){return q.call(t)}(t)}function K(t){return null!=t&&"object"==typeof t}function $(t){return"symbol"==typeof t||K(t)&&"[object Symbol]"==Z(t)}function Q(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 J=Array.isArray,tt=B?B.prototype:void 0,et=tt?tt.toString:void 0;function nt(t){if("string"==typeof t)return t;if(J(t))return Q(t,nt)+"";if($(t))return et?et.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function rt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var it=/^\s+|\s+$/g,at=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,st=/^0o[0-7]+$/i,ut=parseInt;function ct(t){if("number"==typeof t)return t;if($(t))return NaN;if(rt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=rt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(it,"");var n=ot.test(t);return n||st.test(t)?ut(t.slice(2),n?2:8):at.test(t)?NaN:+t}function lt(t){return t}function ht(t){if(!rt(t))return!1;var e=Z(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var ft,dt=H["__core-js_shared__"],pt=(ft=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ft:"";var gt=Function.prototype.toString;function vt(t){if(null!=t){try{return gt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var mt=/^\[object .+?Constructor\]$/,yt=Function.prototype,_t=Object.prototype,bt=yt.toString,xt=_t.hasOwnProperty,wt=RegExp("^"+bt.call(xt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Et(t){return!(!rt(t)||(e=t,pt&&pt in e))&&(ht(t)?wt:mt).test(vt(t));var e}function Ot(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Et(n)?n:void 0}var Tt=Ot(H,"WeakMap"),St=Object.create,Mt=function(){function t(){}return function(e){if(!rt(e))return{};if(St)return St(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function At(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 Ct(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Pt=Date.now;var kt=function(){try{var t=Ot(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Dt=function(t){var e=0,n=0;return function(){var r=Pt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(kt?function(t,e){return kt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:lt);function Lt(t){return t!=t}function Rt(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,Lt,n)}(t,e,0)>-1}var It=/^(?:0|[1-9]\d*)$/;function Vt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&It.test(t))&&t>-1&&t%1==0&&t<e}function Nt(t,e,n){"__proto__"==e&&kt?kt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ut(t,e){return t===e||t!=t&&e!=e}var jt=Object.prototype.hasOwnProperty;function Gt(t,e,n){var r=t[e];jt.call(t,e)&&Ut(r,n)&&(void 0!==n||e in t)||Nt(t,e,n)}function Ht(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?Nt(n,s,u):Gt(n,s,u)}return n}var Bt=Math.max;function Ft(t,e){return Dt(function(t,e,n){return e=Bt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=Bt(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),At(t,this,s)}}(t,e,lt),t+"")}function zt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Wt(t){return null!=t&&zt(t.length)&&!ht(t)}function Yt(t,e,n){if(!rt(n))return!1;var r=typeof e;return!!("number"==r?Wt(n)&&Vt(e,n.length):"string"==r&&e in n)&&Ut(n[e],t)}var qt=Object.prototype;function Xt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||qt)}function Zt(t){return K(t)&&"[object Arguments]"==Z(t)}var Kt=Object.prototype,$t=Kt.hasOwnProperty,Qt=Kt.propertyIsEnumerable,Jt=Zt(function(){return arguments}())?Zt:function(t){return K(t)&&$t.call(t,"callee")&&!Qt.call(t,"callee")};var te="object"==typeof t&&t&&!t.nodeType&&t,ee=te&&"object"==typeof module&&module&&!module.nodeType&&module,ne=ee&&ee.exports===te?H.Buffer:void 0,re=(ne?ne.isBuffer:void 0)||function(){return!1},ie={};function ae(t){return function(e){return t(e)}}ie["[object Float32Array]"]=ie["[object Float64Array]"]=ie["[object Int8Array]"]=ie["[object Int16Array]"]=ie["[object Int32Array]"]=ie["[object Uint8Array]"]=ie["[object Uint8ClampedArray]"]=ie["[object Uint16Array]"]=ie["[object Uint32Array]"]=!0,ie["[object Arguments]"]=ie["[object Array]"]=ie["[object ArrayBuffer]"]=ie["[object Boolean]"]=ie["[object DataView]"]=ie["[object Date]"]=ie["[object Error]"]=ie["[object Function]"]=ie["[object Map]"]=ie["[object Number]"]=ie["[object Object]"]=ie["[object RegExp]"]=ie["[object Set]"]=ie["[object String]"]=ie["[object WeakMap]"]=!1;var oe="object"==typeof t&&t&&!t.nodeType&&t,se=oe&&"object"==typeof module&&module&&!module.nodeType&&module,ue=se&&se.exports===oe&&j.process,ce=function(){try{var t=se&&se.require&&se.require("util").types;return t||ue&&ue.binding&&ue.binding("util")}catch(t){}}(),le=ce&&ce.isTypedArray,he=le?ae(le):function(t){return K(t)&&zt(t.length)&&!!ie[Z(t)]},fe=Object.prototype.hasOwnProperty;function de(t,e){var n=J(t),r=!n&&Jt(t),i=!n&&!r&&re(t),a=!n&&!r&&!i&&he(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 c in t)!e&&!fe.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Vt(c,u))||s.push(c);return s}function pe(t,e){return function(n){return t(e(n))}}var ge=pe(Object.keys,Object),ve=Object.prototype.hasOwnProperty;function me(t){return Wt(t)?de(t):function(t){if(!Xt(t))return ge(t);var e=[];for(var n in Object(t))ve.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var ye=Object.prototype.hasOwnProperty;function _e(t){if(!rt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Xt(t),n=[];for(var r in t)("constructor"!=r||!e&&ye.call(t,r))&&n.push(r);return n}function be(t){return Wt(t)?de(t,!0):_e(t)}var xe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,we=/^\w*$/;function Ee(t,e){if(J(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!$(t))||(we.test(t)||!xe.test(t)||null!=e&&t in Object(e))}var Oe=Ot(Object,"create");var Te=Object.prototype.hasOwnProperty;var Se=Object.prototype.hasOwnProperty;function Me(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 Ae(t,e){for(var n=t.length;n--;)if(Ut(t[n][0],e))return n;return-1}Me.prototype.clear=function(){this.__data__=Oe?Oe(null):{},this.size=0},Me.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Me.prototype.get=function(t){var e=this.__data__;if(Oe){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Te.call(e,t)?e[t]:void 0},Me.prototype.has=function(t){var e=this.__data__;return Oe?void 0!==e[t]:Se.call(e,t)},Me.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Oe&&void 0===e?"__lodash_hash_undefined__":e,this};var Ce=Array.prototype.splice;function Pe(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])}}Pe.prototype.clear=function(){this.__data__=[],this.size=0},Pe.prototype.delete=function(t){var e=this.__data__,n=Ae(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ce.call(e,n,1),--this.size,!0)},Pe.prototype.get=function(t){var e=this.__data__,n=Ae(e,t);return n<0?void 0:e[n][1]},Pe.prototype.has=function(t){return Ae(this.__data__,t)>-1},Pe.prototype.set=function(t,e){var n=this.__data__,r=Ae(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ke=Ot(H,"Map");function De(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Le(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])}}Le.prototype.clear=function(){this.size=0,this.__data__={hash:new Me,map:new(ke||Pe),string:new Me}},Le.prototype.delete=function(t){var e=De(this,t).delete(t);return this.size-=e?1:0,e},Le.prototype.get=function(t){return De(this,t).get(t)},Le.prototype.has=function(t){return De(this,t).has(t)},Le.prototype.set=function(t,e){var n=De(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Re(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(Re.Cache||Le),n}Re.Cache=Le;var Ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ve=/\\(\\)?/g,Ne=function(t){var e=Re(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(Ie,(function(t,n,r,i){e.push(r?i.replace(Ve,"$1"):n||t)})),e}));function Ue(t){return null==t?"":nt(t)}function je(t,e){return J(t)?t:Ee(t,e)?[t]:Ne(Ue(t))}function Ge(t){if("string"==typeof t||$(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function He(t,e){for(var n=0,r=(e=je(e,t)).length;null!=t&&n<r;)t=t[Ge(e[n++])];return n&&n==r?t:void 0}function Be(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Fe=B?B.isConcatSpreadable:void 0;function ze(t){return J(t)||Jt(t)||!!(Fe&&t&&t[Fe])}var We=pe(Object.getPrototypeOf,Object),Ye=Function.prototype,qe=Object.prototype,Xe=Ye.toString,Ze=qe.hasOwnProperty,Ke=Xe.call(Object);var $e=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Je=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var tn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var en=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var nn="\\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",rn="["+nn+"]",an="\\d+",on="[\\u2700-\\u27bf]",sn="[a-z\\xdf-\\xf6\\xf8-\\xff]",un="[^\\ud800-\\udfff"+nn+an+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",cn="(?:\\ud83c[\\udde6-\\uddff]){2}",ln="[\\ud800-\\udbff][\\udc00-\\udfff]",hn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",fn="(?:"+sn+"|"+un+")",dn="(?:"+hn+"|"+un+")",pn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",gn="[\\ufe0e\\ufe0f]?"+pn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",cn,ln].join("|")+")[\\ufe0e\\ufe0f]?"+pn+")*"),vn="(?:"+[on,cn,ln].join("|")+")"+gn,mn=RegExp([hn+"?"+sn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[rn,hn,"$"].join("|")+")",dn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[rn,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_])",an,vn].join("|"),"g");function yn(t,e,n){return t=Ue(t),void 0===(e=n?void 0:e)?function(t){return en.test(t)}(t)?function(t){return t.match(mn)||[]}(t):function(t){return t.match(tn)||[]}(t):t.match(e)||[]}var _n=RegExp("['’]","g");function bn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=ct(n))==n?n:0),void 0!==e&&(e=(e=ct(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}(ct(t),e,n)}function xn(t){var e=this.__data__=new Pe(t);this.size=e.size}xn.prototype.clear=function(){this.__data__=new Pe,this.size=0},xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},xn.prototype.get=function(t){return this.__data__.get(t)},xn.prototype.has=function(t){return this.__data__.has(t)},xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Pe){var r=n.__data__;if(!ke||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Le(r)}return n.set(t,e),this.size=n.size,this};var wn="object"==typeof t&&t&&!t.nodeType&&t,En=wn&&"object"==typeof module&&module&&!module.nodeType&&module,On=En&&En.exports===wn?H.Buffer:void 0,Tn=On?On.allocUnsafe:void 0;function Sn(t,e){if(e)return t.slice();var n=t.length,r=Tn?Tn(n):new t.constructor(n);return t.copy(r),r}function Mn(){return[]}var An=Object.prototype.propertyIsEnumerable,Cn=Object.getOwnPropertySymbols,Pn=Cn?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}(Cn(t),(function(e){return An.call(t,e)})))}:Mn;var kn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Be(e,Pn(t)),t=We(t);return e}:Mn;function Dn(t,e,n){var r=e(t);return J(t)?r:Be(r,n(t))}function Ln(t){return Dn(t,me,Pn)}function Rn(t){return Dn(t,be,kn)}var In=Ot(H,"DataView"),Vn=Ot(H,"Promise"),Nn=Ot(H,"Set"),Un=vt(In),jn=vt(ke),Gn=vt(Vn),Hn=vt(Nn),Bn=vt(Tt),Fn=Z;(In&&"[object DataView]"!=Fn(new In(new ArrayBuffer(1)))||ke&&"[object Map]"!=Fn(new ke)||Vn&&"[object Promise]"!=Fn(Vn.resolve())||Nn&&"[object Set]"!=Fn(new Nn)||Tt&&"[object WeakMap]"!=Fn(new Tt))&&(Fn=function(t){var e=Z(t),n="[object Object]"==e?t.constructor:void 0,r=n?vt(n):"";if(r)switch(r){case Un:return"[object DataView]";case jn:return"[object Map]";case Gn:return"[object Promise]";case Hn:return"[object Set]";case Bn:return"[object WeakMap]"}return e});var zn=Fn,Wn=Object.prototype.hasOwnProperty;var Yn=H.Uint8Array;function qn(t){var e=new t.constructor(t.byteLength);return new Yn(e).set(new Yn(t)),e}var Xn=/\w*$/;var Zn=B?B.prototype:void 0,Kn=Zn?Zn.valueOf:void 0;function $n(t,e){var n=e?qn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Qn(t,e,n){var r,i,a,o=t.constructor;switch(e){case"[object ArrayBuffer]":return qn(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return function(t,e){var n=e?qn(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 $n(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,Xn.exec(i))).lastIndex=i.lastIndex,a;case"[object Set]":return new o;case"[object Symbol]":return r=t,Kn?Object(Kn.call(r)):{}}}function Jn(t){return"function"!=typeof t.constructor||Xt(t)?{}:Mt(We(t))}var tr=ce&&ce.isMap,er=tr?ae(tr):function(t){return K(t)&&"[object Map]"==zn(t)};var nr=ce&&ce.isSet,rr=nr?ae(nr):function(t){return K(t)&&"[object Set]"==zn(t)},ir={};function ar(t,e,n,r,i,a){var o,s=1&e,u=2&e,c=4&e;if(n&&(o=i?n(t,r,i,a):n(t)),void 0!==o)return o;if(!rt(t))return t;var l=J(t);if(l){if(o=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Wn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Ct(t,o)}else{var h=zn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(re(t))return Sn(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(o=u||f?{}:Jn(t),!s)return u?function(t,e){return Ht(t,kn(t),e)}(t,function(t,e){return t&&Ht(e,be(e),t)}(o,t)):function(t,e){return Ht(t,Pn(t),e)}(t,function(t,e){return t&&Ht(e,me(e),t)}(o,t))}else{if(!ir[h])return i?t:{};o=Qn(t,h,s)}}a||(a=new xn);var d=a.get(t);if(d)return d;a.set(t,o),rr(t)?t.forEach((function(r){o.add(ar(r,e,n,r,t,a))})):er(t)&&t.forEach((function(r,i){o.set(i,ar(r,e,n,i,t,a))}));var p=c?u?Rn:Ln:u?keysIn:me,g=l?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]),Gt(o,i,ar(r,e,n,i,t,a))})),o}ir["[object Arguments]"]=ir["[object Array]"]=ir["[object ArrayBuffer]"]=ir["[object DataView]"]=ir["[object Boolean]"]=ir["[object Date]"]=ir["[object Float32Array]"]=ir["[object Float64Array]"]=ir["[object Int8Array]"]=ir["[object Int16Array]"]=ir["[object Int32Array]"]=ir["[object Map]"]=ir["[object Number]"]=ir["[object Object]"]=ir["[object RegExp]"]=ir["[object Set]"]=ir["[object String]"]=ir["[object Symbol]"]=ir["[object Uint8Array]"]=ir["[object Uint8ClampedArray]"]=ir["[object Uint16Array]"]=ir["[object Uint32Array]"]=!0,ir["[object Error]"]=ir["[object Function]"]=ir["[object WeakMap]"]=!1;function or(t){return ar(t,5)}function sr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Le;++e<n;)this.add(t[e])}function ur(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 cr(t,e){return t.has(e)}sr.prototype.add=sr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},sr.prototype.has=function(t){return this.__data__.has(t)};function lr(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 c=a.get(t);if(c&&a.get(e))return c==e;var l=-1,h=!0,f=2&n?new sr:void 0;for(a.set(t,e),a.set(e,t);++l<s;){var d=t[l],p=e[l];if(r)var g=o?r(p,d,l,e,t,a):r(d,p,l,t,e,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!ur(e,(function(t,e){if(!cr(f,e)&&(d===t||i(d,t,n,r,a)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function hr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function fr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var dr=B?B.prototype:void 0,pr=dr?dr.valueOf:void 0;var gr=Object.prototype.hasOwnProperty;var vr=Object.prototype.hasOwnProperty;function mr(t,e,n,r,i,a){var o=J(t),s=J(e),u=o?"[object Array]":zn(t),c=s?"[object Array]":zn(e),l="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f=u==c;if(f&&re(t)){if(!re(e))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new xn),o||he(t)?lr(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 Yn(t),new Yn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ut(+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=hr;case"[object Set]":var u=1&r;if(s||(s=fr),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var l=lr(s(t),s(e),r,i,a,o);return o.delete(t),l;case"[object Symbol]":if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(1&n)){var d=l&&vr.call(t,"__wrapped__"),p=h&&vr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return a||(a=new xn),i(g,v,n,r,a)}}return!!f&&(a||(a=new xn),function(t,e,n,r,i,a){var o=1&n,s=Ln(t),u=s.length;if(u!=Ln(e).length&&!o)return!1;for(var c=u;c--;){var l=s[c];if(!(o?l in e:gr.call(e,l)))return!1}var h=a.get(t);if(h&&a.get(e))return h==e;var f=!0;a.set(t,e),a.set(e,t);for(var d=o;++c<u;){var p=t[l=s[c]],g=e[l];if(r)var v=o?r(g,p,l,e,t,a):r(p,g,l,t,e,a);if(!(void 0===v?p===g||i(p,g,n,r,a):v)){f=!1;break}d||(d="constructor"==l)}if(f&&!d){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)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}function yr(t,e,n,r,i){return t===e||(null==t||null==e||!K(t)&&!K(e)?t!=t&&e!=e:mr(t,e,n,r,yr,i))}function _r(t){return t==t&&!rt(t)}function br(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function xr(t){var e=function(t){for(var e=me(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,_r(i)]}return e}(t);return 1==e.length&&e[0][2]?br(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],c=t[u],l=s[1];if(o&&s[2]){if(void 0===c&&!(u in t))return!1}else{var h=new xn;if(r)var f=r(c,l,u,t,e,h);if(!(void 0===f?yr(l,c,3,r,h):f))return!1}}return!0}(n,t,e)}}function wr(t,e){return null!=t&&e in Object(t)}function Er(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=je(e,t)).length,a=!1;++r<i;){var o=Ge(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&zt(i)&&Vt(o,i)&&(J(t)||Jt(t))}(t,e,wr)}function Or(t,e){return Ee(t)&&_r(e)?br(Ge(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:He(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Er(n,t):yr(e,r,3)}}function Tr(t){return Ee(t)?(e=Ge(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return He(e,t)}}(t);var e}function Sr(t){return"function"==typeof t?t:null==t?lt:"object"==typeof t?J(t)?Or(t[0],t[1]):xr(t):Tr(t)}var Mr,Ar=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[Mr?o:++r];if(!1===e(i[s],s,i))break}return t};var Cr=function(t,e){return function(n,r){if(null==n)return n;if(!Wt(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&&Ar(t,e,me)})),Pr=function(){return H.Date.now()},kr=Math.max,Dr=Math.min;function Lr(t,e,n){var r,i,a,o,s,u,c=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,a=i;return r=i=void 0,c=e,o=t.apply(a,n)}function p(t){return c=t,s=setTimeout(v,e),l?d(t):o}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=a}function v(){var t=Pr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Dr(n,a-(t-c)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,o)}function y(){var t=Pr(),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),d(u)}return void 0===s&&(s=setTimeout(v,e)),o}return e=ct(e)||0,rt(n)&&(l=!!n.leading,a=(h="maxWait"in n)?kr(ct(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?o:m(Pr())},y}function Rr(t,e,n){(void 0===n||Ut(t[e],n))&&(void 0!==n||e in t)||Nt(t,e,n)}function Ir(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Vr(t,e,n,r,i,a,o){var s=Ir(t,n),u=Ir(e,n),c=o.get(u);if(c)Rr(t,n,c);else{var l,h=a?a(s,u,n+"",t,e,o):void 0,f=void 0===h;if(f){var d=J(u),p=!d&&re(u),g=!d&&!p&&he(u);h=u,d||p||g?J(s)?h=s:K(l=s)&&Wt(l)?h=Ct(s):p?(f=!1,h=Sn(u,!0)):g?(f=!1,h=$n(u,!0)):h=[]:function(t){if(!K(t)||"[object Object]"!=Z(t))return!1;var e=We(t);if(null===e)return!0;var n=Ze.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Xe.call(n)==Ke}(u)||Jt(u)?(h=s,Jt(s)?h=function(t){return Ht(t,be(t))}(s):rt(s)&&!ht(s)||(h=Jn(u))):f=!1}f&&(o.set(u,h),i(h,u,r,a,o),o.delete(u)),Rr(t,n,h)}}function Nr(t,e,n,r,i){t!==e&&Ar(e,(function(a,o){if(i||(i=new xn),rt(a))Vr(t,e,o,n,Nr,r,i);else{var s=r?r(Ir(t,o),a,o+"",t,e,i):void 0;void 0===s&&(s=a),Rr(t,o,s)}}),be)}function Ur(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 jr(t,e){var n=-1,r=Wt(t)?Array(t.length):[];return Cr(t,(function(t,i,a){r[++n]=e(t,i,a)})),r}function Gr(t,e){return function t(e,n,r,i,a){var o=-1,s=e.length;for(r||(r=ze),a||(a=[]);++o<s;){var u=e[o];n>0&&r(u)?n>1?t(u,n-1,r,i,a):Be(a,u):i||(a[a.length]=u)}return a}(function(t,e){return(J(t)?Q:jr)(t,Sr(e))}(t,e),1/0)}function Hr(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}function Br(t,e){return yr(t,e)}var Fr,zr,Wr=(Fr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){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}(yn(function(t){return(t=Ue(t))&&t.replace(Qe,$e).replace(Je,"")}(t).replace(_n,"")),Fr,"")}),Yr=(zr=function(t,e,n){Nr(t,e,n)},Ft((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=zr.length>3&&"function"==typeof i?(r--,i):void 0,a&&Yt(e[0],e[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var o=e[n];o&&zr(t,o,n,i)}return t})));function qr(t,e){var n;return Cr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Xr(t,e,n){var r=J(t)?ur:qr;return n&&Yt(t,e,n)&&(e=void 0),r(t,Sr(e))}var Zr,Kr=Nn&&1/fr(new Nn([,-0]))[1]==1/0?function(t){return new Nn(t)}:function(){};function $r(t){return t&&t.length?function(t,e,n){var r=-1,i=Rt,a=t.length,o=!0,s=[],u=s;if(n)o=!1,i=Ur;else if(a>=200){var c=e?null:Kr(t);if(c)return fr(c);o=!1,i=cr,u=new sr}else u=e?[]:s;t:for(;++r<a;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,o&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}(t):[]}function Qr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Jr(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){t.debounce=Lr,t.clone=or,t.merge=Yr,t.removeArrayDuplicates=$r,t.clamp=bn,t.isEqual=Br,t.flatMapDeep=Gr,t.kebabCase=Wr,t.fromPairs=Hr,t.some=Xr,t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)if(r.includes(i)){var a=n.axes[i];(a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var o=a.mapsTo;if(null==o){var s=a.scaleType;null==s?a.mapsTo="value":s===E.TIME?a.mapsTo="date":s===E.LABELS&&(a.mapsTo="key")}}else delete e.axes[i];return t.merge(e,n)},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===x.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===x.FRONT_LINE?"..."+t.substr(-n):e===x.END_LINE?t.substr(0,n)+"...":void 0},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===w.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===w.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(Zr||(Zr={}));var ti=Jr((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}));Qr(ti);var ei=Jr((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}));Qr(ei);var ni=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ei)&&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}));Qr(ni);var ri=Jr((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}));Qr(ri);var ii=Jr((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}));Qr(ii);var ai=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ii)&&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}));Qr(ai);var oi=Jr((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}));Qr(oi);var si=Jr((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,c=s[0],l=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}},t.exports=e.default}));Qr(si);var ui=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(oi),r=i(si);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}));Qr(ui);var ci=Qr(Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(ti),r=s(ni),i=s(ri),a=s(ai),o=s(ui);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}))),li={type:x.END_LINE,threshold:16,numCharacter:14},hi={enabled:!0,position:T.BOTTOM,clickable:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4},truncation:li,alignment:S.LEFT},fi={x:{numberOfTicks:5},y:{numberOfTicks:5}},di={horizontalOffset:10,showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:li},pi={top:{includeZero:!0,truncation:li},bottom:{includeZero:!0,truncation:li},left:{includeZero:!0,truncation:li},right:{includeZero:!0,truncation:li}},gi={addSpaceOnEdges:1,showDayName:!1,localeObject:ci,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"}}},vi={width:null,height:null,resizable:!0,tooltip:di,legend:hi,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null}},mi=Zr.merge({},vi,{axes:pi,timeScale:gi,grid:fi}),yi=Zr.merge({},mi,{bars:{maxWidth:16},timeScale:Zr.merge(gi,{addSpaceOnEdges:1})}),_i=Zr.merge({},yi,{}),bi=Zr.merge({},yi,{}),xi=Zr.merge({},yi,{bars:Zr.merge({},yi.bars,{dividerSize:1.5})}),wi=Zr.merge({},mi,{points:{radius:3,filled:!1}}),Ei=Zr.merge({},wi,{timeScale:Zr.merge(gi,{addSpaceOnEdges:0})}),Oi=Ei,Ti=Zr.merge({},mi,{points:{radius:4,fillOpacity:.3,filled:!0}}),Si=Zr.merge({},mi,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),Mi=Zr.merge({},vi,{pie:{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},labels:{formatter:null},alignment:S.LEFT}}),Ai=Zr.merge({},vi,{legend:{enabled:!1},gauge:{type:R.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},status:null,numberSpacing:10,deltaFontSize:function(t){return t/8},valueFontSize:function(t){return t/2.5},numberFormatter:function(t){return t.toFixed(2)%1!=0?t.toFixed(2).toLocaleString():t.toFixed().toLocaleString()}}}),Ci={chart:vi,axisChart:mi,simpleBarChart:_i,groupedBarChart:bi,stackedBarChart:xi,bubbleChart:Si,lineChart:wi,areaChart:Ei,stackedAreaChart:Oi,scatterChart:Ti,pieChart:Mi,donutChart:Zr.merge({},Mi,{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:S.LEFT}}),meterChart:Zr.merge({},vi,{legend:{enabled:!1},meter:{height:8,statusBar:{paddingRight:5,percentageIndicator:{enabled:!0}},status:{indicatorSize:16,paddingLeft:15}}}),radarChart:Zr.merge({},vi,{radar:{axes:{angle:"key",value:"value"},opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5,alignment:S.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:Ai},Pi={opacity:{unselected:.3,selected:1}},ki={opacity:{unselected:0,selected:.4}},Di={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}},Li={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},Ri={default:{size:24}},Ii=Object.freeze({__proto__:null,legend:hi,grid:fi,baseTooltip:di,timeScale:gi,options:Ci,lines:Pi,area:ki,areas:{opacity:{unselected:.3,selected:1}},transitions:Di,axis:Li,spacers:Ri,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),Vi={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},Ni={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},Ui={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},ji={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},Gi={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},Hi={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},Bi={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},Fi=function(t,e){return t[e]},zi=function(t){return Fi(ji,t)},Wi=function(t){return Fi(Gi,t)},Yi=function(t){return Fi(Bi,t)},qi=function(t){return Fi(Ni,t)},Xi=function(t){return Fi(Ui,t)},Zi=function(t){return Fi(Vi,t)},Ki=function(t){return Fi(Hi,t)},$i=[Xi(70),Wi(50),Ki(70),qi(70),Zi(50),Zi(90),Yi(60),zi(80),qi(50),"#b28600",Ki(50),Wi(90),"#8a3800",Xi(50)],Qi=[Xi(60),Wi(40),Ki(60),qi(40),Zi(50),Zi(10),Yi(30),zi(50),qi(60),"#d2a106",Ki(40),Wi(20),"#ba4e00",Xi(30)],Ji=$i,ta=Qi,ea=Qi,na=$i,ra=Object.freeze({__proto__:null,WHITE:$i,DARK:Qi,G10:Ji,G90:ta,G100:ea,DEFAULT:na});function ia(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function aa(t){var e;return 1===t.length&&(e=t,t=function(t,n){return ia(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}}}var oa=aa(ia).right;function sa(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 ua(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 ca=Math.sqrt(50),la=Math.sqrt(10),ha=Math.sqrt(2);function fa(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=da(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 da(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>=ca?10:a>=la?5:a>=ha?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=ca?10:a>=la?5:a>=ha?2:1)}function pa(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>=ca?i*=10:a>=la?i*=5:a>=ha&&(i*=2),e<t?-i:i}function ga(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 va(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function ma(){}function ya(t,e){var n=new ma;if(t instanceof ma)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 _a(){}ma.prototype=ya.prototype={constructor:ma,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 ba=ya.prototype;_a.prototype=function(t,e){var n=new _a;if(t instanceof _a)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:_a,has:ba.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ba.remove,clear:ba.clear,values:ba.keys,size:ba.size,empty:ba.empty,each:ba.each};var xa=Array.prototype,wa=xa.map,Ea=xa.slice,Oa={name:"implicit"};function Ta(){var t=ya(),e=[],n=[],r=Oa;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Oa)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=ya();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=Ea.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ta(e,n).unknown(r)},va.apply(i,arguments),i}function Sa(){var t,e,n=Ta().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*u),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*c,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=ua(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return Sa(r(),a).round(o).paddingInner(s).paddingOuter(u).align(c)},va.apply(l(),arguments)}function Ma(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Aa(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ca(){}var Pa="\\s*([+-]?\\d+)\\s*",ka="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Da="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",La=/^#([0-9a-f]{3,8})$/,Ra=new RegExp("^rgb\\("+[Pa,Pa,Pa]+"\\)$"),Ia=new RegExp("^rgb\\("+[Da,Da,Da]+"\\)$"),Va=new RegExp("^rgba\\("+[Pa,Pa,Pa,ka]+"\\)$"),Na=new RegExp("^rgba\\("+[Da,Da,Da,ka]+"\\)$"),Ua=new RegExp("^hsl\\("+[ka,Da,Da]+"\\)$"),ja=new RegExp("^hsla\\("+[ka,Da,Da,ka]+"\\)$"),Ga={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 Ha(){return this.rgb().formatHex()}function Ba(){return this.rgb().formatRgb()}function Fa(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=La.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?za(e):3===n?new Xa(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Xa(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Xa(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=Ra.exec(t))?new Xa(e[1],e[2],e[3],1):(e=Ia.exec(t))?new Xa(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Va.exec(t))?Wa(e[1],e[2],e[3],e[4]):(e=Na.exec(t))?Wa(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ua.exec(t))?Qa(e[1],e[2]/100,e[3]/100,1):(e=ja.exec(t))?Qa(e[1],e[2]/100,e[3]/100,e[4]):Ga.hasOwnProperty(t)?za(Ga[t]):"transparent"===t?new Xa(NaN,NaN,NaN,0):null}function za(t){return new Xa(t>>16&255,t>>8&255,255&t,1)}function Wa(t,e,n,r){return r<=0&&(t=e=n=NaN),new Xa(t,e,n,r)}function Ya(t){return t instanceof Ca||(t=Fa(t)),t?new Xa((t=t.rgb()).r,t.g,t.b,t.opacity):new Xa}function qa(t,e,n,r){return 1===arguments.length?Ya(t):new Xa(t,e,n,null==r?1:r)}function Xa(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Za(){return"#"+$a(this.r)+$a(this.g)+$a(this.b)}function Ka(){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 $a(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qa(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new to(t,e,n,r)}function Ja(t){if(t instanceof to)return new to(t.h,t.s,t.l,t.opacity);if(t instanceof Ca||(t=Fa(t)),!t)return new to;if(t instanceof to)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 to(o,s,u,t.opacity)}function to(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function eo(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 no(t){return function(){return t}}function ro(t){return 1==(t=+t)?io: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):no(isNaN(e)?n:e)}}function io(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):no(isNaN(t)?e:t)}Ma(Ca,Fa,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ha,formatHex:Ha,formatHsl:function(){return Ja(this).formatHsl()},formatRgb:Ba,toString:Ba}),Ma(Xa,qa,Aa(Ca,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Xa(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Xa(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:Za,formatHex:Za,formatRgb:Ka,toString:Ka})),Ma(to,(function(t,e,n,r){return 1===arguments.length?Ja(t):new to(t,e,n,null==r?1:r)}),Aa(Ca,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new to(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new to(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 Xa(eo(t>=240?t-240:t+120,i,r),eo(t,i,r),eo(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 ao=function t(e){var n=ro(e);function r(t,e){var r=n((t=qa(t)).r,(e=qa(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=io(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 oo(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 so(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]=go(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 uo(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function co(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function lo(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]=go(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var ho=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fo=new RegExp(ho.source,"g");function po(t,e){var n,r,i,a=ho.lastIndex=fo.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=ho.exec(t))&&(r=fo.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:co(n,r)})),a=fo.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 go(t,e){var n,r=typeof e;return null==e||"boolean"===r?no(e):("number"===r?co:"string"===r?(n=Fa(e))?(e=n,ao):po:e instanceof Fa?ao:e instanceof Date?uo:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?oo:Array.isArray(e)?so:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?lo:co)(t,e)}function vo(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var mo,yo,_o,bo,xo=180/Math.PI,wo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Eo(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)*xo,skewX:Math.atan(u)*xo,scaleX:o,scaleY:s}}function Oo(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:co(t,i)},{i:u-2,x:co(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:co(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:co(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:co(t,n)},{i:s-2,x:co(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 To=Oo((function(t){return"none"===t?wo:(mo||(mo=document.createElement("DIV"),yo=document.documentElement,_o=document.defaultView),mo.style.transform=t,t=_o.getComputedStyle(yo.appendChild(mo),null).getPropertyValue("transform"),yo.removeChild(mo),Eo(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),So=Oo((function(t){return null==t?wo:(bo||(bo=document.createElementNS("http://www.w3.org/2000/svg","g")),bo.setAttribute("transform",t),(t=bo.transform.baseVal.consolidate())?Eo((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):wo)}),", ",")",")");function Mo(t){return+t}var Ao=[0,1];function Co(t){return t}function Po(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function ko(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 Do(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Po(i,r),a=n(o,a)):(r=Po(r,i),a=n(a,o)),function(t){return a(r(t))}}function Lo(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]=Po(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=oa(t,e,1,r)-1;return a[n](i[n](e))}}function Ro(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Io(){var t,e,n,r,i,a,o=Ao,s=Ao,u=go,c=Co;function l(){return r=Math.min(o.length,s.length)>2?Lo:Do,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((a||(a=r(s,o.map(t),co)))(n)))},h.domain=function(t){return arguments.length?(o=wa.call(t,Mo),c===Co||(c=ko(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=Ea.call(t),l()):s.slice()},h.rangeRound=function(t){return s=Ea.call(t),u=vo,l()},h.clamp=function(t){return arguments.length?(c=t?ko(o):Co,h):c!==Co},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Vo(t,e){return Io()(t,e)}function No(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 Uo(t){return(t=No(Math.abs(t)))?t[1]:NaN}var jo,Go=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ho(t){if(!(e=Go.exec(t)))throw new Error("invalid format: "+t);var e;return new Bo({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 Bo(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 Fo(t,e){var n=No(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")}Ho.prototype=Bo.prototype,Bo.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 zo={"%":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 Fo(100*t,e)},r:Fo,s:function(t,e){var n=No(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(jo=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")+No(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 Wo(t){return t}var Yo,qo,Xo,Zo=Array.prototype.map,Ko=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $o(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Wo:(e=Zo.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?Wo:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Zo.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ho(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):zo[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?a:/[%p]/.test(y)?u:"",x=zo[y],w=/[defgprs%]/.test(y);function E(t){var i,a,u,f=_,E=b;if("c"===y)E=x(t)+E,t="";else{var O=(t=+t)<0;if(t=isNaN(t)?l: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)),O&&0==+t&&(O=!1),f=(O?"("===h?h:c:"-"===h||"("===h?"":h)+f,E=("s"===y?Ko[8+jo/3]:"")+E+(O&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){E=(46===u?o+t.slice(i+1):t.slice(i))+E,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var T=f.length+t.length+E.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&d&&(t=r(S+t,S.length?p-E.length:1/0),S=""),n){case"<":t=f+t+E+S;break;case"=":t=f+S+t+E;break;case"^":t=S.slice(0,T=S.length>>1)+f+t+E+S.slice(T);break;default:t=S+f+t+E}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)),E.toString=function(){return t+""},E}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ho(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Uo(e)/3))),i=Math.pow(10,-r),a=Ko[8+r/3];return function(t){return n(i*t)+a}}}}function Qo(t,e,n,r){var i,a=pa(t,e,n);switch((r=Ho(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(Uo(e)/3)))-Uo(Math.abs(t)))}(a,o))||(r.precision=i),Xo(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,Uo(e)-Uo(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,-Uo(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return qo(r)}function Jo(t){var e=t.domain;return t.ticks=function(t){var n=e();return fa(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Qo(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=da(s,u,n))>0?r=da(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=da(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 ts(){var t=Vo(Co,Co);return t.copy=function(){return Ro(t,ts())},va.apply(t,arguments),Jo(t)}function es(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 ns(t){return Math.log(t)}function rs(t){return Math.exp(t)}function is(t){return-Math.log(-t)}function as(t){return-Math.exp(-t)}function os(t){return isFinite(t)?+("1e"+t):t<0?0:t}function ss(t){return function(e){return-t(-e)}}function us(t){var e,n,r=t(ns,rs),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?os:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=ss(e),n=ss(n),t(is,as)):t(ns,rs),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)&&(f=s,s=u,u=f);var c,l,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,c=n(f);l<a;++l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(l=a-1,c=n(f);l>=1;--l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else g=fa(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=qo(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(es(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Yo=$o({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),qo=Yo.format,Xo=Yo.formatPrefix;var cs=new Date,ls=new Date;function hs(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 hs((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 cs.setTime(+e),ls.setTime(+r),t(cs),t(ls),Math.floor(n(cs,ls))},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 fs=hs((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));fs.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?hs((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):fs:null};var ds=hs((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()})),ps=hs((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()})),gs=hs((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()})),vs=hs((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 ms(t){return hs((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 ys=ms(0),_s=ms(1),bs=(ms(2),ms(3),ms(4)),xs=(ms(5),ms(6),hs((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()}))),ws=hs((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()}));ws.every=function(t){return isFinite(t=Math.floor(t))&&t>0?hs((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 Es=hs((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 Os(t){return hs((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 Ts=Os(0),Ss=Os(1),Ms=(Os(2),Os(3),Os(4)),As=(Os(5),Os(6),hs((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 Cs(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 Ps(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 ks(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}As.every=function(t){return isFinite(t=Math.floor(t))&&t>0?hs((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 Ds,Ls,Rs={"-":"",_:" ",0:"0"},Is=/^\s*\d+/,Vs=/^%/,Ns=/[\\^$*+?|[\]().{}]/g;function Us(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 js(t){return t.replace(Ns,"\\$&")}function Gs(t){return new RegExp("^(?:"+t.map(js).join("|")+")","i")}function Hs(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Bs(t,e,n){var r=Is.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Fs(t,e,n){var r=Is.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function zs(t,e,n){var r=Is.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ws(t,e,n){var r=Is.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ys(t,e,n){var r=Is.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function qs(t,e,n){var r=Is.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Xs(t,e,n){var r=Is.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Zs(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 Ks(t,e,n){var r=Is.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function $s(t,e,n){var r=Is.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Qs(t,e,n){var r=Is.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Js(t,e,n){var r=Is.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function tu(t,e,n){var r=Is.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function eu(t,e,n){var r=Is.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function nu(t,e,n){var r=Is.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ru(t,e,n){var r=Is.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function iu(t,e,n){var r=Is.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function au(t,e,n){var r=Vs.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ou(t,e,n){var r=Is.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function su(t,e,n){var r=Is.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function uu(t,e){return Us(t.getDate(),e,2)}function cu(t,e){return Us(t.getHours(),e,2)}function lu(t,e){return Us(t.getHours()%12||12,e,2)}function hu(t,e){return Us(1+vs.count(ws(t),t),e,3)}function fu(t,e){return Us(t.getMilliseconds(),e,3)}function du(t,e){return fu(t,e)+"000"}function pu(t,e){return Us(t.getMonth()+1,e,2)}function gu(t,e){return Us(t.getMinutes(),e,2)}function vu(t,e){return Us(t.getSeconds(),e,2)}function mu(t){var e=t.getDay();return 0===e?7:e}function yu(t,e){return Us(ys.count(ws(t)-1,t),e,2)}function _u(t,e){var n=t.getDay();return t=n>=4||0===n?bs(t):bs.ceil(t),Us(bs.count(ws(t),t)+(4===ws(t).getDay()),e,2)}function bu(t){return t.getDay()}function xu(t,e){return Us(_s.count(ws(t)-1,t),e,2)}function wu(t,e){return Us(t.getFullYear()%100,e,2)}function Eu(t,e){return Us(t.getFullYear()%1e4,e,4)}function Ou(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Us(e/60|0,"0",2)+Us(e%60,"0",2)}function Tu(t,e){return Us(t.getUTCDate(),e,2)}function Su(t,e){return Us(t.getUTCHours(),e,2)}function Mu(t,e){return Us(t.getUTCHours()%12||12,e,2)}function Au(t,e){return Us(1+Es.count(As(t),t),e,3)}function Cu(t,e){return Us(t.getUTCMilliseconds(),e,3)}function Pu(t,e){return Cu(t,e)+"000"}function ku(t,e){return Us(t.getUTCMonth()+1,e,2)}function Du(t,e){return Us(t.getUTCMinutes(),e,2)}function Lu(t,e){return Us(t.getUTCSeconds(),e,2)}function Ru(t){var e=t.getUTCDay();return 0===e?7:e}function Iu(t,e){return Us(Ts.count(As(t)-1,t),e,2)}function Vu(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Ms(t):Ms.ceil(t),Us(Ms.count(As(t),t)+(4===As(t).getUTCDay()),e,2)}function Nu(t){return t.getUTCDay()}function Uu(t,e){return Us(Ss.count(As(t)-1,t),e,2)}function ju(t,e){return Us(t.getUTCFullYear()%100,e,2)}function Gu(t,e){return Us(t.getUTCFullYear()%1e4,e,4)}function Hu(){return"+0000"}function Bu(){return"%"}function Fu(t){return+t}function zu(t){return Math.floor(+t/1e3)}!function(t){Ds=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,c=Gs(i),l=Hs(i),h=Gs(a),f=Hs(a),d=Gs(o),p=Hs(o),g=Gs(s),v=Hs(s),m=Gs(u),y=Hs(u),_={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:uu,e:uu,f:du,H:cu,I:lu,j:hu,L:fu,m:pu,M:gu,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Fu,s:zu,S:vu,u:mu,U:yu,V:_u,w:bu,W:xu,x:null,X:null,y:wu,Y:Eu,Z:Ou,"%":Bu},b={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:Tu,e:Tu,f:Pu,H:Su,I:Mu,j:Au,L:Cu,m:ku,M:Du,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Fu,s:zu,S:Lu,u:Ru,U:Iu,V:Vu,w:Nu,W:Uu,x:null,X:null,y:ju,Y:Gu,Z:Hu,"%":Bu},x={a:function(t,e,n){var r=d.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=f[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 O(t,e,n,r)},d:Qs,e:Qs,f:iu,H:tu,I:tu,j:Js,L:ru,m:$s,M:eu,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:Ks,Q:ou,s:su,S:nu,u:Fs,U:zs,V:Ws,w:Bs,W:Ys,x:function(t,e,r){return O(t,n,e,r)},X:function(t,e,n){return O(t,r,e,n)},y:Xs,Y:qs,Z:Zs,"%":au};function w(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(i=Rs[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 E(t,e){return function(n){var r,i,a=ks(1900,void 0,1);if(O(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=Ps(ks(a.y,0,1))).getUTCDay(),r=i>4||0===i?Ss.ceil(r):Ss(r),r=Es.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Cs(ks(a.y,0,1))).getDay(),r=i>4||0===i?_s.ceil(r):_s(r),r=vs.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?Ps(ks(a.y,0,1)).getUTCDay():Cs(ks(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,Ps(a)):Cs(a)}}function O(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 Rs?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=E(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=E(t+="",!0);return e.toString=function(){return t},e}})}(t),Ls=Ds.format,Ds.parse,Ds.utcFormat,Ds.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 Wu(t){return new Date(t)}function Yu(t){return t instanceof Date?+t:+new Date(+t)}function qu(t,e,n,r,i,a,o,s,u){var c=Vo(Co,Co),l=c.invert,h=c.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[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?f:a(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(r-n)/e,o=aa((function(t){return t[2]})).right(b,a);o===b.length?(i=pa(n/31536e6,r/31536e6,e),e=t):o?(i=(o=b[a/b[o-1][2]<b[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(pa(n,r,e),1),e=s)}return null==i?e:e.every(i)}return c.invert=function(t){return new Date(l(t))},c.domain=function(t){return arguments.length?h(wa.call(t,Yu)):h().map(Wu)},c.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=w(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},c.tickFormat=function(t,e){return null==e?x:u(e)},c.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(es(n,t)):c},c.copy=function(){return Ro(c,qu(t,e,n,r,i,a,o,s,u))},c}var Xu=Math.PI,Zu=2*Xu,Ku=Zu-1e-6;function $u(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Qu(){return new $u}function Ju(t){return function(){return t}}$u.prototype=Qu.prototype={constructor:$u,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,c=a-t,l=o-e,h=c*c+l*l;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(l*s-u*c)>1e-6&&i){var f=n-a,d=r-o,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Xu-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*c)+","+(e+_*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*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,c=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%Zu+Zu),h>Ku?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Xu)+","+l+","+(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 tc=Math.abs,ec=Math.atan2,nc=Math.cos,rc=Math.max,ic=Math.min,ac=Math.sin,oc=Math.sqrt,sc=Math.PI,uc=sc/2,cc=2*sc;function lc(t){return t>1?0:t<-1?sc:Math.acos(t)}function hc(t){return t>=1?uc:t<=-1?-uc:Math.asin(t)}function fc(t){return t.innerRadius}function dc(t){return t.outerRadius}function pc(t){return t.startAngle}function gc(t){return t.endAngle}function vc(t){return t&&t.padAngle}function mc(t,e,n,r,i,a,o,s){var u=n-t,c=r-e,l=o-i,h=s-a,f=h*u-l*c;if(!(f*f<1e-12))return[t+(f=(l*(e-a)-h*(t-i))/f)*u,e+f*c]}function yc(t,e,n,r,i,a,o){var s=t-n,u=e-r,c=(o?a:-a)/oc(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-a,w=f*g-p*d,E=(_<0?-1:1)*oc(rc(0,x*x*b-w*w)),O=(w*_-y*E)/b,T=(-w*y-_*E)/b,S=(w*_+y*E)/b,M=(-w*y+_*E)/b,A=O-v,C=T-m,P=S-v,k=M-m;return A*A+C*C>P*P+k*k&&(O=S,T=M),{cx:O,cy:T,x01:-l,y01:-h,x11:O*(i/x-1),y11:T*(i/x-1)}}function _c(){var t=fc,e=dc,n=Ju(0),r=null,i=pc,a=gc,o=vc,s=null;function u(){var u,c,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-uc,d=a.apply(this,arguments)-uc,p=tc(d-f),g=d>f;if(s||(s=u=Qu()),h<l&&(c=h,h=l,l=c),h>1e-12)if(p>cc-1e-12)s.moveTo(h*nc(f),h*ac(f)),s.arc(0,0,h,f,d,!g),l>1e-12&&(s.moveTo(l*nc(d),l*ac(d)),s.arc(0,0,l,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,E=p,O=o.apply(this,arguments)/2,T=O>1e-12&&(r?+r.apply(this,arguments):oc(l*l+h*h)),S=ic(tc(h-l)/2,+n.apply(this,arguments)),M=S,A=S;if(T>1e-12){var C=hc(T/l*ac(O)),P=hc(T/h*ac(O));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(E-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(E=0,y=_=(f+d)/2)}var k=h*nc(y),D=h*ac(y),L=l*nc(x),R=l*ac(x);if(S>1e-12){var I,V=h*nc(_),N=h*ac(_),U=l*nc(b),j=l*ac(b);if(p<sc&&(I=mc(k,D,U,j,V,N,L,R))){var G=k-I[0],H=D-I[1],B=V-I[0],F=N-I[1],z=1/ac(lc((G*B+H*F)/(oc(G*G+H*H)*oc(B*B+F*F)))/2),W=oc(I[0]*I[0]+I[1]*I[1]);M=ic(S,(l-W)/(z-1)),A=ic(S,(h-W)/(z+1))}}E>1e-12?A>1e-12?(v=yc(U,j,k,D,h,A,g),m=yc(V,N,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<S?s.arc(v.cx,v.cy,A,ec(v.y01,v.x01),ec(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,ec(v.y01,v.x01),ec(v.y11,v.x11),!g),s.arc(0,0,h,ec(v.cy+v.y11,v.cx+v.x11),ec(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,ec(m.y11,m.x11),ec(m.y01,m.x01),!g))):(s.moveTo(k,D),s.arc(0,0,h,y,_,!g)):s.moveTo(k,D),l>1e-12&&w>1e-12?M>1e-12?(v=yc(L,R,V,N,l,-M,g),m=yc(k,D,U,j,l,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,ec(v.y01,v.x01),ec(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,ec(v.y01,v.x01),ec(v.y11,v.x11),!g),s.arc(0,0,l,ec(v.cy+v.y11,v.cx+v.x11),ec(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,ec(m.y11,m.x11),ec(m.y01,m.x01),!g))):s.arc(0,0,l,x,b,g):s.lineTo(L,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-sc/2;return[nc(r)*n,ac(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ju(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ju(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ju(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ju(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ju(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ju(+t),u):a},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ju(+t),u):o},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function bc(t){this._context=t}function xc(t){return new bc(t)}function wc(t){return t[0]}function Ec(t){return t[1]}function Oc(){var t=wc,e=Ec,n=Ju(!0),r=null,i=xc,a=null;function o(o){var s,u,c,l=o.length,h=!1;for(null==r&&(a=i(c=Qu())),s=0;s<=l;++s)!(s<l&&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(c)return a=null,c+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Ju(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Ju(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ju(!!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 Tc(){var t=wc,e=null,n=Ju(0),r=Ec,i=Ju(!0),a=null,o=xc,s=null;function u(u){var c,l,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==a&&(s=o(d=Qu())),c=0;c<=p;++c){if(!(c<p&&i(f=u[c],c,u))===g)if(g=!g)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=c-1;h>=l;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[c]=+t(f,c,u),m[c]=+n(f,c,u),s.point(e?+e(f,c,u):v[c],r?+r(f,c,u):m[c]))}if(d)return s=null,d+""||null}function c(){return Oc().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:Ju(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Ju(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Ju(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:Ju(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:Ju(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ju(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:Ju(!!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 Sc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Mc(t){return t}bc.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 Ac=Pc(xc);function Cc(t){this._curve=t}function Pc(t){function e(e){return new Cc(t(e))}return e._curve=t,e}function kc(){return t=Oc().curve(Ac),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(Pc(t)):e()._curve},t;var t,e}Cc.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 Dc=Array.prototype.slice;function Lc(){}function Rc(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 Ic(t){this._context=t}function Vc(t){return new Ic(t)}function Nc(t){this._context=t}function Uc(t){return new Nc(t)}function jc(t){this._context=t}function Gc(t){return new jc(t)}function Hc(t,e){this._basis=new Ic(t),this._beta=e}Ic.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:Rc(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:Rc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Nc.prototype={areaStart:Lc,areaEnd:Lc,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:Rc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},jc.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:Rc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Hc.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 Bc=function t(e){function n(t){return 1===e?new Ic(t):new Hc(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Fc(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 zc(t,e){this._context=t,this._k=(1-e)/6}zc.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:Fc(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:Fc(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 Wc=function t(e){function n(t){return new zc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Yc(t,e){this._context=t,this._k=(1-e)/6}Yc.prototype={areaStart:Lc,areaEnd:Lc,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:Fc(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 qc=function t(e){function n(t){return new Yc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Xc(t,e){this._context=t,this._k=(1-e)/6}Xc.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:Fc(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 Zc=function t(e){function n(t){return new Xc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Kc(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 c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function $c(t,e){this._context=t,this._alpha=e}$c.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:Kc(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 Qc=function t(e){function n(t){return e?new $c(t,e):new zc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Jc(t,e){this._context=t,this._alpha=e}Jc.prototype={areaStart:Lc,areaEnd:Lc,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:Kc(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 tl=function t(e){function n(t){return e?new Jc(t,e):new Yc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function el(t,e){this._context=t,this._alpha=e}el.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:Kc(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 nl=function t(e){function n(t){return e?new el(t,e):new Xc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function rl(t){this._context=t}function il(t){return new rl(t)}function al(t){return t<0?-1:1}function ol(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(al(a)+al(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function sl(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ul(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 cl(t){this._context=t}function ll(t){this._context=new hl(t)}function hl(t){this._context=t}function fl(t){return new cl(t)}function dl(t){return new ll(t)}function pl(t){this._context=t}function gl(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 vl(t){return new pl(t)}function ml(t,e){this._context=t,this._t=e}function yl(t){return new ml(t,.5)}function _l(t){return new ml(t,0)}function bl(t){return new ml(t,1)}function xl(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 wl(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function El(t,e){return t[e]}rl.prototype={areaStart:Lc,areaEnd:Lc,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))}},cl.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:ul(this,this._t0,sl(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,ul(this,sl(this,n=ol(this,t,e)),n);break;default:ul(this,this._t0,n=ol(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(ll.prototype=Object.create(cl.prototype)).point=function(t,e){cl.prototype.point.call(this,e,t)},hl.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)}},pl.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=gl(t),i=gl(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)}},ml.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 Ol=function(){function t(t){this.state={options:{}},this.colorScale={},this.services=t}return t.prototype.getAllDataFromDomain=function(){if(!this.get("data"))return null;var t=this.getDataGroups(),e=Zr.clone(this.get("data")),n=this.getOptions().data.groupMapsTo,r=this.getOptions().axes;return r&&Object.keys(r).forEach((function(t){if(r[t].mapsTo&&r[t].domain){var n=r[t].mapsTo;if(r[t].scaleType===E.LABELS)e=e.filter((function(e){return r[t].domain.includes(e[n])}));else{var i=r[t].domain,a=i[0],o=i[1];e=e.filter((function(t){return t[n]>=a&&t[n]<=o}))}}})),e.filter((function(e){return t.find((function(t){return t.name===e[n]}))}))},t.prototype.getDisplayData=function(){if(!this.get("data"))return null;var t=hi.items.status.ACTIVE,e=this.getDataGroups(),n=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain().filter((function(r){return e.find((function(t){return t.name===r[n]})).status===t}))},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(Zr.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=hi.items.status.ACTIVE;return this.getDataGroups().filter((function(e){return e.status===t}))},t.prototype.getDataGroupNames=function(){return this.getDataGroups().map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(){return this.getActiveDataGroups().map((function(t){return t.name}))},t.prototype.getGroupedData=function(){var t=this.getDisplayData(),e={},n=this.getOptions().data.groupMapsTo;return t.map((function(t){var r=t[n];null!==e[r]&&void 0!==e[r]?e[r].push(t):e[r]=[t]})),Object.keys(e).map((function(t){return{name:t,data:e[t]}}))},t.prototype.getDataValuesGroupedByKeys=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this.getDisplayData(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),a=ya(n,(function(t){return t[r]})).keys(),o=this.services.cartesianScales.domainAxisPosition,s=t.axes[o].scaleType;s===E.TIME?a.sort((function(t,e){return new Date(t)-new Date(e)})):s!==E.LOG&&s!==E.LINEAR||a.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return a.map((function(t){var a={sharedStackKey:t};return u.forEach((function(o){var s=n.find((function(n){return n[e]===o&&n[r].toString()===t}));a[o]=s?s[i]:null})),a}))},t.prototype.getStackedData=function(t){var e=(void 0===t?{percentage:!1}:t).percentage,n=this.getOptions().data.groupMapsTo,r=this.getDataGroupNames(),i=this.getDataValuesGroupedByKeys();if(e){var a=Zr.fromPairs(i.map((function(t){return[t.sharedStackKey,0]})));i.forEach((function(t){r.forEach((function(e){a[t.sharedStackKey]+=t[e]}))})),i.forEach((function(t){r.forEach((function(e){t[e]=t[e]/a[t.sharedStackKey]*100}))}))}return function(){var t=Ju([]),e=wl,n=xl,r=El;function i(i){var a,o,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(a=0;a<c;++a){for(var h,f=s[a],d=l[a]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(l);a<c;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Ju(Dc.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Ju(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?wl:"function"==typeof t?t:Ju(Dc.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?xl:t,i):n},i}().keys(r)(i).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(i){var a=t[i];return a[n]=r[e],a}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){void 0===e&&(e=!1),this.state=Object.assign({},this.state,t),e||this.update()},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:Zr.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(N.Model.UPDATE))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=hi.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})),c=this.getOptions(),l=i.some((function(t){return t.status===r}));c.data.selectedGroups=l?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(N.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=this.getFillScale()(t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale(t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.getStatus=function(){return null},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/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=Zr.getProperty(t,"label");if(null===o){var s=Zr.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 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=hi.items.status,r=n.ACTIVE,i=n.DISABLED,a=this.getOptions(),o=ya(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.setColorScale=function(){var t=na,e=this.getOptions(),n=Zr.getProperty(e,"color","scale");if(null!==n&&0!==Object.keys(n).length){var r=[],i=0;this.allDataGroups.forEach((function(e){n[e]?r.push(n[e]):r.push(t[i]),i===t.length-1?i=0:i++})),this.colorScale=Ta().range(r).domain(this.allDataGroups)}else this.colorScale=Ta().range(t).domain(this.allDataGroups)},t}(),Tl=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}(),Sl="http://www.w3.org/1999/xhtml",Ml={svg:"http://www.w3.org/2000/svg",xhtml:Sl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Al(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ml.hasOwnProperty(e)?{space:Ml[e],local:t}:t}function Cl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Sl&&e.documentElement.namespaceURI===Sl?e.createElement(t):e.createElementNS(n,t)}}function Pl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kl(t){var e=Al(t);return(e.local?Pl:Cl)(e)}function Dl(){}function Ll(t){return null==t?Dl:function(){return this.querySelector(t)}}function Rl(){return[]}function Il(t){return null==t?Rl:function(){return this.querySelectorAll(t)}}function Vl(t){return function(){return this.matches(t)}}function Nl(t){return new Array(t.length)}function Ul(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ul.prototype={constructor:Ul,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 jl(t,e,n,r,i,a){for(var o,s=0,u=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new Ul(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function Gl(t,e,n,r,i,a,o){var s,u,c,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=c="$"+o.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<f;++s)(u=l[c="$"+o.call(t,a[s],s,a)])?(r[s]=u,u.__data__=a[s],l[c]=null):n[s]=new Ul(t,a[s]);for(s=0;s<h;++s)(u=e[s])&&l[d[s]]===u&&(i[s]=u)}function Hl(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Bl(t){return function(){this.removeAttribute(t)}}function Fl(t){return function(){this.removeAttributeNS(t.space,t.local)}}function zl(t,e){return function(){this.setAttribute(t,e)}}function Wl(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Yl(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ql(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 Xl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Zl(t){return function(){this.style.removeProperty(t)}}function Kl(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $l(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ql(t,e){return t.style.getPropertyValue(e)||Xl(t).getComputedStyle(t,null).getPropertyValue(e)}function Jl(t){return function(){delete this[t]}}function th(t,e){return function(){this[t]=e}}function eh(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function nh(t){return t.trim().split(/^|\s+/)}function rh(t){return t.classList||new ih(t)}function ih(t){this._node=t,this._names=nh(t.getAttribute("class")||"")}function ah(t,e){for(var n=rh(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function oh(t,e){for(var n=rh(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function sh(t){return function(){ah(this,t)}}function uh(t){return function(){oh(this,t)}}function ch(t,e){return function(){(e.apply(this,arguments)?ah:oh)(this,t)}}function lh(){this.textContent=""}function hh(t){return function(){this.textContent=t}}function fh(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function dh(){this.innerHTML=""}function ph(t){return function(){this.innerHTML=t}}function gh(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function vh(){this.nextSibling&&this.parentNode.appendChild(this)}function mh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yh(){return null}function _h(){var t=this.parentNode;t&&t.removeChild(this)}function bh(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xh(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}ih.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 wh={},Eh=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(wh={mouseenter:"mouseover",mouseleave:"mouseout"}));function Oh(t,e,n){return t=Th(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Th(t,e,n){return function(r){var i=Eh;Eh=r;try{t.call(this,this.__data__,e,n)}finally{Eh=i}}}function Sh(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 Mh(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 Ah(t,e,n){var r=wh.hasOwnProperty(t.type)?Oh:Th;return function(i,a,o){var s,u=this.__on,c=r(e,a,o);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function Ch(t,e,n){var r=Xl(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 Ph(t,e){return function(){return Ch(this,t,e)}}function kh(t,e){return function(){return Ch(this,t,e.apply(this,arguments))}}var Dh=[null];function Lh(t,e){this._groups=t,this._parents=e}function Rh(){return new Lh([[document.documentElement]],Dh)}function Ih(t){return"string"==typeof t?new Lh([[document.querySelector(t)]],[document.documentElement]):new Lh([[t]],Dh)}function Vh(){for(var t,e=Eh;t=e.sourceEvent;)e=t;return e}function Nh(t){var e=Vh();return e.changedTouches&&(e=e.changedTouches[0]),function(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]}(t,e)}Lh.prototype=Rh.prototype={constructor:Lh,select:function(t){"function"!=typeof t&&(t=Ll(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,c=r[i]=new Array(u),l=0;l<u;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),c[l]=o);return new Lh(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Il(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,c=0;c<u;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new Lh(r,i)},filter:function(t){"function"!=typeof t&&(t=Vl(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]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Lh(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n=e?Gl:jl,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),c=0;c<a;++c){var l=r[c],h=i[c],f=h.length,d=t.call(l,l&&l.__data__,c,r),p=d.length,g=s[c]=new Array(p),v=o[c]=new Array(p);n(l,h,g,v,u[c]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(o=new Lh(o,r))._enter=s,o._exit=u,o},enter:function(){return new Lh(this._enter||this._groups.map(Nl),this._parents)},exit:function(){return new Lh(this._exit||this._groups.map(Nl),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,c=e[s],l=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new Lh(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=Hl);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,c=i[a]=new Array(u),l=0;l<u;++l)(o=s[l])&&(c[l]=o);c.sort(e)}return new Lh(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=Al(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?Fl:Bl:"function"==typeof e?n.local?ql:Yl:n.local?Wl:zl)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Zl:"function"==typeof e?$l:Kl)(t,e,null==n?"":n)):Ql(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Jl:"function"==typeof e?eh:th)(t,e)):this.node()[t]},classed:function(t,e){var n=nh(t+"");if(arguments.length<2){for(var r=rh(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ch:e?sh:uh)(n,e))},text:function(t){return arguments.length?this.each(null==t?lh:("function"==typeof t?fh:hh)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?dh:("function"==typeof t?gh:ph)(t)):this.node().innerHTML},raise:function(){return this.each(vh)},lower:function(){return this.each(mh)},append:function(t){var e="function"==typeof t?t:kl(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:kl(t),r=null==e?yh:"function"==typeof e?e:Ll(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(_h)},clone:function(t){return this.select(t?xh:bh)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Sh(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Ah:Mh,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,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];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?kh:Ph)(t,e))}};var Uh={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 "},jh=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}()}(),Gh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Hh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Bh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Hh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Fh=["top","right","bottom","left","width","height","size","weight"],zh="undefined"!=typeof MutationObserver,Wh=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(){Bh(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)};Wh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Wh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Wh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Wh.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},Wh.prototype.connect_=function(){Gh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),zh?(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)},Wh.prototype.disconnect_=function(){Gh&&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)},Wh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Fh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Wh.getInstance=function(){return this.instance_||(this.instance_=new Wh),this.instance_},Wh.instance_=null;var Yh=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},qh=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Hh},Xh=tf(0,0,0,0);function Zh(t){return parseFloat(t)||0}function Kh(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Zh(t["border-"+n+"-width"])}),0)}function $h(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Xh;var r=qh(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]=Zh(a)}return e}(r),a=i.left+i.right,o=i.top+i.bottom,s=Zh(r.width),u=Zh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==e&&(s-=Kh(r,"left","right")+a),Math.round(u+o)!==n&&(u-=Kh(r,"top","bottom")+o)),!function(t){return t===qh(t).document.documentElement}(t)){var c=Math.round(s+a)-e,l=Math.round(u+o)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return tf(i.left,i.top,s,u)}var Qh="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof qh(t).SVGGraphicsElement}:function(t){return t instanceof qh(t).SVGElement&&"function"==typeof t.getBBox};function Jh(t){return Gh?Qh(t)?function(t){var e=t.getBBox();return tf(0,0,e.width,e.height)}(t):$h(t):Xh}function tf(t,e,n,r){return{x:t,y:e,width:n,height:r}}var ef=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=tf(0,0,0,0),this.target=t};ef.prototype.isActive=function(){var t=Jh(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},ef.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var nf=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 Yh(o,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),o}(e);Yh(this,{target:t,contentRect:n})},rf=function(t,e,n){if(this.activeObservations_=[],this.observations_=new jh,"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};rf.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 qh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new ef(t)),this.controller_.addObserver(this),this.controller_.refresh())}},rf.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 qh(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))}},rf.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},rf.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},rf.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new nf(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},rf.prototype.clearActive=function(){this.activeObservations_.splice(0)},rf.prototype.hasActive=function(){return this.activeObservations_.length>0};var af="undefined"!=typeof WeakMap?new WeakMap:new jh,of=function(t){if(!(this instanceof of))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=Wh.getInstance(),n=new rf(t,e,this);af.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){of.prototype[t]=function(){return(e=af.get(this))[t].apply(e,arguments);var e}}));var sf=void 0!==Hh.ResizeObserver?Hh.ResizeObserver:of,uf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=Ih(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 c={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(c),o.width>0&&o.height>0))return c;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:Zr.getProperty(t.node(),"width","baseVal","value"),height:Zr.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(c),s(r),s(u)}return o},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.getAlignmentOffset=function(t,n,r){var i=e.getSVGElementSize(n,{useBBox:!0}),a=e.getSVGElementSize(r,{useAttr:!0}).width,o=0;return t===S.CENTER?o=Math.floor((a-i.width)/2):t===S.RIGHT&&(o=a-i.width),o},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();Ih(this.getHolder()).classed(Uh.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=Zr.getProperty(t,"style","prefix"),n=Ih(this.getHolder()).append("svg").classed(Uh.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");n.append("title").text(Zr.getProperty(t,"title")||"Chart"),this.svg=n.node()},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(Ih(this.svg),{useBBox:!0}).height,n=Ih(this.svg).attr("class"),r=Ih(this.svg).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(Ih(t),{useBBox:!0}).height)})),i<=t?Ih(this.svg).attr("height",i):Ih(this.svg).attr("height","100%")}},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Ih(e).on("mouseover",(function(){t.services.events.dispatchEvent(N.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(N.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=Zr.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(N.Chart.RESIZE))}),12.5);new sf(i).observe(e)}},e}(Tl),cf=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}(Tl),lf={value:function(){}};function hf(){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 ff(r)}function ff(t){this._=t}function df(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 pf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function gf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=lf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ff.prototype=hf.prototype={constructor:ff,on:function(t,e){var n,r=this._,i=df(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]=gf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=gf(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=pf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ff(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 vf,mf,yf=0,_f=0,bf=0,xf=0,wf=0,Ef=0,Of="object"==typeof performance&&performance.now?performance:Date,Tf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Sf(){return wf||(Tf(Mf),wf=Of.now()+Ef)}function Mf(){wf=0}function Af(){this._call=this._time=this._next=null}function Cf(t,e,n){var r=new Af;return r.restart(t,e,n),r}function Pf(){wf=(xf=Of.now())+Ef,yf=_f=0;try{!function(){Sf(),++yf;for(var t,e=vf;e;)(t=wf-e._time)>=0&&e._call.call(null,t),e=e._next;--yf}()}finally{yf=0,function(){var t,e,n=vf,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:vf=e);mf=t,Df(r)}(),wf=0}}function kf(){var t=Of.now(),e=t-xf;e>1e3&&(Ef-=e,xf=t)}function Df(t){yf||(_f&&(_f=clearTimeout(_f)),t-wf>24?(t<1/0&&(_f=setTimeout(Pf,t-Of.now()-Ef)),bf&&(bf=clearInterval(bf))):(bf||(xf=Of.now(),bf=setInterval(kf,1e3)),yf=1,Tf(Pf)))}function Lf(t,e,n){var r=new Af;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Af.prototype=Cf.prototype={constructor:Af,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Sf():+n)+(null==e?0:+e),this._next||mf===this||(mf?mf._next=this:vf=this,mf=this),this._call=t,this._time=n,Df()},stop:function(){this._call&&(this._call=null,this._time=1/0,Df())}};var Rf=hf("start","end","cancel","interrupt"),If=[];function Vf(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 c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return Lf(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(Lf((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),c=0,l=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+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=Cf((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:Rf,tween:If,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Nf(t,e){var n=jf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Uf(t,e){var n=jf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function jf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Gf(t,e){var n,r;return function(){var i=Uf(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 Hf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Uf(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}a.tween=i}}function Bf(t,e,n){var r=t._id;return t.each((function(){var t=Uf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return jf(t,r).value[e]}}function Ff(t,e){var n;return("number"==typeof e?co:e instanceof Fa?ao:(n=Fa(e))?(e=n,ao):po)(t,e)}function zf(t){return function(){this.removeAttribute(t)}}function Wf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Yf(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 qf(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 Xf(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 Zf(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 Kf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function $f(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Qf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&$f(t,i)),n}return i._value=e,i}function Jf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Kf(t,i)),n}return i._value=e,i}function td(t,e){return function(){Nf(this,t).delay=+e.apply(this,arguments)}}function ed(t,e){return e=+e,function(){Nf(this,t).delay=e}}function nd(t,e){return function(){Uf(this,t).duration=+e.apply(this,arguments)}}function rd(t,e){return e=+e,function(){Uf(this,t).duration=e}}function id(t,e){if("function"!=typeof e)throw new Error;return function(){Uf(this,t).ease=e}}function ad(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)?Nf:Uf;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var od=Rh.prototype.constructor;function sd(t){return function(){this.style.removeProperty(t)}}function ud(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function cd(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&ud(t,a,n)),r}return a._value=e,a}function ld(t){return function(e){this.textContent=t.call(this,e)}}function hd(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&ld(r)),e}return r._value=t,r}var fd=0;function dd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function pd(t){return Rh().transition(t)}function gd(){return++fd}var vd=Rh.prototype;function md(t){return+t}dd.prototype=pd.prototype={constructor:dd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ll(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,c=r[o],l=c.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,Vf(h[f],e,n,f,h,jf(s,n)));return new dd(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Il(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,h=0;h<l;++h)if(u=c[h]){for(var f,d=t.call(u,u.__data__,h,c),p=jf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&Vf(f,e,n,g,d,p);a.push(d),o.push(u)}return new dd(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=Vl(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]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new dd(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,c=e[s],l=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new dd(o,this._parents,this._name,this._id)},selection:function(){return new od(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=gd(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)if(o=s[c]){var l=jf(o,e);Vf(o,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new dd(r,this._parents,t,n)},call:vd.call,nodes:vd.nodes,node:vd.node,size:vd.size,empty:vd.empty,each:vd.each,on:function(t,e){var n=this._id;return arguments.length<2?jf(this.node(),n).on.on(t):this.each(ad(n,t,e))},attr:function(t,e){var n=Al(t),r="transform"===n?So:Ff;return this.attrTween(t,"function"==typeof e?(n.local?Zf:Xf)(n,r,Bf(this,"attr."+t,e)):null==e?(n.local?Wf:zf)(n):(n.local?qf:Yf)(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=Al(t);return this.tween(n,(r.local?Qf:Jf)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?To:Ff;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Ql(this,t),o=(this.style.removeProperty(t),Ql(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,sd(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Ql(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Ql(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,Bf(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=Uf(this,t),c=u.on,l=null==u.value[o]?a||(a=sd(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Ql(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,cd(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}}(Bf(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,hd(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=jf(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?Gf:Hf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?td:ed)(e,t)):jf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?nd:rd)(e,t)):jf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(id(e,t)):jf(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=Uf(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 yd={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function _d(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return yd.time=Sf(),yd;return n}Rh.prototype.interrupt=function(t){return this.each((function(){!function(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}}(this,t)}))},Rh.prototype.transition=function(t){var e,n;t instanceof dd?(e=t._id,t=t._name):(e=gd(),(n=yd).time=Sf(),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,c=0;c<u;++c)(o=s[c])&&Vf(o,t,e,c,s,n||_d(o,e));return new dd(r,this._parents,t,e)};var bd=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(N.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=pd(t).duration(Zr.getProperty(Di,t,"duration")||Di.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=pd(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}(Tl);function xd(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 wd(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 Ed(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=wd(e);return n.setDate(n.getDate()+r),n}function Od(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t).getTime(),r=wd(e);return new Date(n+r)}function Td(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Od(t,36e5*n)}function Sd(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Md(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=xd(t);return e.setHours(0,0,0,0),e}function Ad(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(t),r=Md(e),i=n.getTime()-Sd(n),a=r.getTime()-Sd(r);return Math.round((i-a)/864e5)}function Cd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Od(t,6e4*n)}function Pd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=xd(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 kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=wd(e),i=n.getMonth()+r,a=new Date(0);a.setFullYear(n.getFullYear(),i,1),a.setHours(0,0,0,0);var o=Pd(a);return n.setMonth(i,Math.min(o,n.getDate())),n}function Dd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Od(t,1e3*n)}function Ld(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return kd(t,12*n)}function Rd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Id(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=xd(t);return!isNaN(e)}function Vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return 12*i+a}function Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e);return n.getFullYear()-r.getFullYear()}function Ud(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e);return n.getTime()-r.getTime()}function jd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Gd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Hd={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 Bd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Fd={date:Bd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Bd({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:Bd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},zd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Wd(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 Yd(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,c=s[0],l=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}}var qd,Xd={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Hd[t]?Hd[t]:1===e?Hd[t].one:Hd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Fd,formatRelative:function(t,e,n,r){return zd[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:Wd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Wd({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:Wd({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:Wd({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:Wd({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:(qd={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(qd.matchPattern);if(!i)return null;var a=i[0],o=n.match(qd.parsePattern);if(!o)return null;var s=qd.valueCallback?qd.valueCallback(o[0]):o[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:Yd({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:Yd({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:Yd({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:Yd({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:Yd({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 Zd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Od(t,-n)}function Kd(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var $d=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Kd("yy"===e?r%100:r,e.length)},Qd=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Kd(n+1,2)},Jd=function(t,e){return Kd(t.getUTCDate(),e.length)},tp=function(t,e){return Kd(t.getUTCHours()%12||12,e.length)},ep=function(t,e){return Kd(t.getUTCHours(),e.length)},np=function(t,e){return Kd(t.getUTCMinutes(),e.length)},rp=function(t,e){return Kd(t.getUTCSeconds(),e.length)},ip=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Kd(Math.floor(r*Math.pow(10,n-3)),e.length)};function ap(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=xd(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 op(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=xd(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=ap(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=ap(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function sp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=op(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=ap(n);return r}function up(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,a=null==i?0:wd(i),o=null==n.weekStartsOn?a:wd(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=xd(t),u=s.getUTCDay(),c=(u<o?7:0)+u-o;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function cp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=xd(t,e),r=n.getUTCFullYear(),i=e||{},a=i.locale,o=a&&a.options&&a.options.firstWeekContainsDate,s=null==o?1:wd(o),u=null==i.firstWeekContainsDate?s:wd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=up(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=up(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function lp(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:wd(i),o=null==n.firstWeekContainsDate?a:wd(n.firstWeekContainsDate),s=cp(t,e),u=new Date(0);u.setUTCFullYear(s,0,o),u.setUTCHours(0,0,0,0);var c=up(u,e);return c}var hp="midnight",fp="noon",dp="morning",pp="afternoon",gp="evening",vp="night",mp={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 $d(t,e)},Y:function(t,e,n,r){var i=cp(t,r),a=i>0?i:1-i;return"YY"===e?Kd(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):Kd(a,e.length)},R:function(t,e){return Kd(op(t),e.length)},u:function(t,e){return Kd(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 Kd(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 Kd(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 Qd(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 Kd(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=xd(t),r=up(n,e).getTime()-lp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Kd(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=xd(t),n=ap(e).getTime()-sp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Kd(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Jd(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=xd(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"}):Kd(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 Kd(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 Kd(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 Kd(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?fp:0===i?hp:i/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?gp:i>=12?pp:i>=4?dp:vp,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 tp(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ep(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Kd(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Kd(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):np(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):rp(t,e)},S:function(t,e){return ip(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return _p(i);case"XXXX":case"XX":return bp(i);case"XXXXX":case"XXX":default:return bp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return _p(i);case"xxxx":case"xx":return bp(i);case"xxxxx":case"xxx":default:return bp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+yp(i,":");case"OOOO":default:return"GMT"+bp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+yp(i,":");case"zzzz":default:return"GMT"+bp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Kd(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Kd((r._originalDate||t).getTime(),e.length)}};function yp(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+Kd(a,2)}function _p(t,e){return t%60==0?(t>0?"-":"+")+Kd(Math.abs(t)/60,2):bp(t,e)}function bp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Kd(Math.floor(i/60),2)+n+Kd(i%60,2)}function xp(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function wp(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var Ep={p:wp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],a=r[2];if(!a)return xp(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}}",xp(i,e)).replace("{{time}}",wp(a,e))}},Op=["D","DD"],Tp=["YY","YYYY"];function Sp(t){return-1!==Op.indexOf(t)}function Mp(t){return-1!==Tp.indexOf(t)}function Ap(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 Cp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Pp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kp=/^'([^]*?)'?$/,Dp=/''/g,Lp=/[a-zA-Z]/;function Rp(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||Xd,o=a.options&&a.options.firstWeekContainsDate,s=null==o?1:wd(o),u=null==i.firstWeekContainsDate?s:wd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=a.options&&a.options.weekStartsOn,l=null==c?0:wd(c),h=null==i.weekStartsOn?l:wd(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 f=xd(t);if(!Id(f))throw new RangeError("Invalid time value");var d=Sd(f),p=Zd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:a,_originalDate:f},v=r.match(Pp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Ep[e])(t,a.formatLong,g):t})).join("").match(Cp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Ip(t);var n=mp[e];if(n)return!i.useAdditionalWeekYearTokens&&Mp(t)&&Ap(t),!i.useAdditionalDayOfYearTokens&&Sp(t)&&Ap(t),n(p,t,a.localize,g);if(e.match(Lp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Ip(t){return t.match(kp)[1].replace(Dp,"'")}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Ed(t,-n)}function Np(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Td(t,-n)}function Up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Cd(t,-n)}function jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return kd(t,-n)}function Gp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Dd(t,-n)}function Hp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Ld(t,-n)}var Bp=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(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return Zr.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.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(b).map((function(t){return b[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findMainVerticalAxisPosition(),e=this.findMainHorizontalAxisPosition(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.domainAxisPosition,this.rangeAxisPosition=n.rangeAxisPosition},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==b.LEFT&&this.rangeAxisPosition!==b.RIGHT||this.domainAxisPosition!==b.BOTTOM&&this.domainAxisPosition!==b.TOP?this.orientation=w.HORIZONTAL:this.orientation=w.VERTICAL},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=[b.BOTTOM,b.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[b.LEFT,b.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){var r=this.model.getOptions(),i=Zr.getProperty(r,"axes",t),a=this.scaleTypes[t],o=this.scales[t],s=i.mapsTo,u=void 0!==e[s]?e[s]:e;return a===E.LABELS?o(u)+o.step()/2:a===E.TIME?o(new Date(u)):o(u)},e.prototype.getDomainValue=function(t,e){return this.getValueFromScale(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueFromScale(this.rangeAxisPosition,t,e)},e.prototype.getDomainIdentifier=function(){var t=this.model.getOptions();return Zr.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return Zr.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===E.TIME?e.filter((function(e){var r=e[n];return"string"!=typeof r&&void 0!==r.getTime||(r=new Date(r)),r.getTime()===t.getTime()})):e.filter((function(e){return e[n]===t}))},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return Zr.getProperty(n,"axes",t).scaleType===E.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=xd(t),r=xd(e),i=Rd(n,r),a=Math.abs(Nd(n,r));n.setFullYear(n.getFullYear()-i*a);var o=Rd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Hp(n,e),Ld(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e),i=Rd(n,r),a=Math.abs(Vd(n,r));n.setMonth(n.getMonth()-i*a);var o=Rd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[jp(n,e),kd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e),i=Rd(n,r),a=Math.abs(Ad(n,r));n.setDate(n.getDate()-i*a);var o=Rd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Vp(n,e),Ed(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Np(n,e),Td(r,e)];if(jd(r,n)>30)return[Up(n,30*e),Cd(r,30*e)];if(jd(r,n)>1)return[Up(n,e),Cd(r,e)];if(Gd(r,n)>15)return[Gp(n,15*e),Dd(r,15*e)];if(Gd(r,n)>1)return[Gp(n,e),Dd(r,e)];return[n,r]}(e,Zr.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,Li.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=Zr.getProperty(t,"axes");return null===Zr.getProperty(e,b.LEFT)&&null!==Zr.getProperty(e,b.RIGHT)||!0===Zr.getProperty(e,b.RIGHT,"main")?b.RIGHT:b.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=Zr.getProperty(t,"axes");return null===Zr.getProperty(e,b.BOTTOM)&&null!==Zr.getProperty(e,b.TOP)||!0===Zr.getProperty(e,b.TOP,"main")?b.TOP:b.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Zr.getProperty(n,"axes",t),i=Zr.getProperty(n,"axes",e),a=r.scaleType||E.LINEAR,o=i.scaleType||E.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return o===E.LABELS||o===E.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):a===E.LABELS||a===E.TIME?(s.domainAxisPosition=t,s.rangeAxisPosition=e):(s.domainAxisPosition=e,s.rangeAxisPosition=t),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=Zr.getProperty(e,"axes",t),r=n.includeZero,i=Zr.getProperty(n,"scaleType")||E.LINEAR;if(this.model.isDataEmpty())return[];var a,o,s=this.model.getDisplayData(),u=n.mapsTo,c=n.percentage;if(n.domain)return i===E.LABELS?n.domain:this.extendsDomain(t,n.domain);if(c)return[0,100];if(n&&i===E.LABELS)return ya(s,(function(t){return t[u]})).keys();n.stacked?o=this.model.getDataValuesGroupedByKeys().map((function(t){return function(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(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):o=s.map((function(t){return t[u]}));return i!==E.TIME&&r&&o.push(0),a=sa(o),a=this.extendsDomain(t,a)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Zr.getProperty(e,"axes",t);if(!n)return null;var r,i=Zr.getProperty(n,"scaleType")||E.LINEAR;return this.scaleTypes[t]=i,(r=i===E.TIME?function(){return va.apply(qu(ws,xs,ys,vs,gs,ps,ds,fs,Ls).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===E.LOG?function t(){var e=us(Io()).domain([1,10]);return e.copy=function(){return Ro(e,t()).base(e.base())},va.apply(e,arguments),e}().base(n.base||10):i===E.LABELS?Sa():ts()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=Zr.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)!==E.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=Zr.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}(Tl);var Fp,zp,Wp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:xc,curveLinearClosed:il,curveBasis:Vc,curveBasisClosed:Uc,curveBasisOpen:Gc,curveBundle:Bc,curveCardinal:Wc,curveCardinalClosed:qc,curveCardinalOpen:Zc,curveCatmullRom:Qc,curveCatmullRomClosed:tl,curveCatmullRomOpen:nl,curveMonotoneX:fl,curveMonotoneY:dl,curveNatural:vl,curveStep:yl,curveStepAfter:bl,curveStepBefore:_l},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}(Tl),Yp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(Ih(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=Zr.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Uh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Uh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=Zr.getProperty(this.model.getOptions(),"style","prefix");return uf.appendOrSelect(this.parent,"g."+Uh.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),qp=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.GRAPHICS_DOCUMENT+" "+r.DOCUMENT),n=this.model.getOptions(),i=Zr.getProperty(n,"legend"),a=e.selectAll("g.legend-item").data(this.model.getDataGroups(),(function(t){return t.name})),o=a.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===n.legend.items.status.ACTIVE})),s=n.legend.checkbox.radius,u=Zr.getProperty(i,"truncation","type"),c=Zr.getProperty(i,"truncation","threshold"),l=Zr.getProperty(i,"truncation","numCharacter");o.append("rect").classed("checkbox",!0).merge(a.select("rect.checkbox")).attr("width",2*s).attr("height",2*s).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.status===n.legend.items.status.ACTIVE?t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===n.legend.items.status.ACTIVE}));var h=o.append("text").merge(a.select("text"));u!==x.NONE?h.html((function(t){return t.name.length>c?Zr.truncateLabel(t.name,u,l):t.name})):h.html((function(t){return t.name})),this.breakItemsIntoLines(o),a.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var f=Zr.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",f),f&&o.size()>0&&this.addEventListeners();var d=Zr.getProperty(i,"alignment"),p=uf.getAlignmentOffset(d,e,this.getParent());e.attr("transform","translate("+p+", 0)")},e.prototype.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.legend.checkbox.radius,a=r.legend.items.horizontalSpace,o=r.legend.items.verticalSpace,s=r.legend.items.textYOffset,u=2*i+r.legend.checkbox.spaceAfter,c=r.legend.items.status.DISABLED,l=this.model.getDataGroups().some((function(t){return t.status===c})),h=Zr.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var c=Ih(this),g=Ih(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===M.VERTICAL)h===M.VERTICAL&&0!==r&&d++;else{var v=uf.getSVGElementSize(e.parent,{useAttr:!0}),m=uf.getSVGElementSize(Ih(this).select("text"),{useBBox:!0}),y=uf.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+a)+u+m.width>v.width&&(d++,f=0,p=0)}c.select("rect.checkbox").attr("x",f).attr("y",0+d*o);var _=s+d*o;c.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===M.HORIZONTAL)&&"0"===c.select("rect.checkbox").attr("y"),x=h===M.VERTICAL&&"0"===c.select("rect.checkbox").attr("x"),w=b||x;l&&c.select("g.check").empty()&&w?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\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\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):l||c.select("g.check").empty()||c.select("g.check").remove(),p++}))},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions(),r=Zr.getProperty(n,"legend"),i=Zr.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(N.Legend.ITEM_HOVER,{hoveredElement:Ih(this)});var e=n.legend.checkbox.radius,r=Ih(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower();var a=r.datum();a.name.length>i&&t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:r,content:a.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(N.Legend.ITEM_CLICK,{clickedElement:Ih(this)});var e=Ih(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=Ih(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(N.Tooltip.HIDE),t.services.events.dispatchEvent(N.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},e}(Yp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(zp||(zp={}));var Xp=((Fp={})[zp.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)}},Fp[zp.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)}},Fp[zp.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)}},Fp[zp.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)}},Fp),Zp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Kp=function(){function t(t){void 0===t&&(t={}),this.positions=Xp,this.positions=Object.assign({},Xp,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,c=s.right-r().width;u=u<0?e.offsetHeight:u,c=c<0?e.offsetWidth:c;var l=e.offsetHeight*e.offsetWidth,h=l-u*c;return{placement:n,weight:(h=0===h?l:h)/l}}));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:Zp.innerHeight-Zp.scrollY,height:Zp.innerWidth-Zp.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}(),$p=(new Kp,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function Qp(t,e,n,r){var i=0===e,a=2===Number(Rp(new Date(t),"c")),o=1===Number(Rp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||ng(t)||rg(t)||ig(t);case"daily":return r?i||a||ig(t):i||rg(t)||ig(t);case"monthly":return i||ig(t);case"quarterly":return i||o;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function Jp(t,e,n,r){var i=r.showDayName,a="daily"===n&&i?"weekly":n,o=new Date(t),s=Zr.getProperty(r,"timeIntervalFormats")[a],u=Zr.getProperty(s,"primary"),c=Zr.getProperty(s,"secondary");return Rp(o,Qp(t,e,n,i)?u:c,{locale:r.localeObject})}function tg(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function eg(t){return 1===t.length?"15seconds":function(t){var e=$p.reduce((function(e,n,r){n[0];var i=n[1],a=$p[e][1];return Math.abs(a-t)<Math.abs(i-t)?e:r}),0);return $p[e][0]}(function(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(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function ng(t){var e=tg(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function rg(t){var e=tg(t),n=e.d,r=e.s,i=e.m,a=e.H;return 1===n&&0===a&&0===i&&0===r}function ig(t){var e=tg(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 ag=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new Kp,i}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=this.configs,r=n.value,i=n.fillColor,a=n.axisPosition,o=n.index,s=Zr.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Uh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=a+"-"+o,this.threshold=uf.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=uf.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),c=uf.appendOrSelect(this.threshold,"line.threshold-line");c.style("stroke",i);var l=this.services.cartesianScales.getScaleByPosition(a),h=this.services.cartesianScales.getScaleTypeByPosition(a),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===E.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],x=y[1],w=this.services.cartesianScales,O=w.getOrientation(),T=Zr.flipDomainAndRangeBasedOnOrientation((function(t){return w.getDomainValue(t)}),(function(t){return w.getRangeValue(t)}),O),S=T[0],M=T[1];if(a===b.TOP||a===b.BOTTOM){var A=S(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+A+", "+x+")"),c.attr("y2",_-x),u.attr("width",_-x).classed("rotate",!0)}else{A=M(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+A+")"),c.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(N.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(N.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(){var t=this.configs,e=t.value,n=t.axisPosition,r=this.model.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===E.TIME){var i=[b.LEFT,b.RIGHT].includes(n),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=i?o:a,u=Zr.getProperty(r,"timeScale");return Jp(e,0,eg(s.ticks()),u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=this.configs,e=t.value,n=t.valueFormatter,r=t.fillColor,i=t.label,a=void 0===i?"Threshold":i,o=Ih(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=uf.appendOrSelect(o,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(a+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=Nh(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[zp.RIGHT,zp.LEFT,zp.TOP,zp.BOTTOM],(function(){return{width:t.offsetWidth,height:t.offsetHeight}})),i=this.positionService.findPositionAt({left:n[0],top:n[1]},e,r);this.positionService.setElement(e,i)},e.prototype.addEventListeners=function(){var t=this;uf.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(N.Threshold.SHOW,{hoveredElement:Ih(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(N.Threshold.HIDE,{hoveredElement:Ih(t.threshold)})}))},e}(Yp),og=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.model.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=uf.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=uf.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(N.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){o.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("mouseout",(function(){o.services.events.dispatchEvent(N.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return uf.getSVGElementSize(this.services.domUtils.getMainSVG(),{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}(Yp),sg=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.model.getDisplayData(),e=this.model.getOptions(),n=this.getContainerSVG(),r=e.data.groupMapsTo,i=n.selectAll("text.meter-title").data([t[r]]);i.enter().append("text").classed("meter-title",!0).merge(i).attr("x",0).attr("y","1em").text((function(t){return t})),i.exit().remove(),this.appendPercentage(),this.displayStatus();var a=this.getMaxTitleWidth(),o=uf.appendOrSelect(n,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)},e.prototype.displayStatus=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=uf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),r=n.width?n.width:this.parent.node().getAttribute("width"),i=this.model.getStatus(),a=Zr.getProperty(e,"meter","status","indicatorSize")/2,o=uf.appendOrSelect(t,"g.status-indicator").classed("status--"+i,null!==i).attr("transform","translate("+(r-a)+", 0)"),s=i?[i]:[],u=o.selectAll("circle.status").data(s);u.enter().append("circle").merge(u).attr("class","status").attr("r",a).attr("cx",0).attr("cy","calc(1em / 2)");var c=o.selectAll("path.innerFill").data(s);c.enter().append("path").merge(c).attr("d",this.getStatusIconPathString(i)).attr("transform","translate(-"+a+", 0)").attr("class","innerFill"),c.exit().remove(),u.exit().remove()},e.prototype.appendPercentage=function(){var t=this.model.getDisplayData().value,e=this.getContainerSVG(),n=uf.appendOrSelect(e,"text.meter-title"),r=!0===Zr.getProperty(this.model.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),a=Zr.getProperty(this.model.getOptions(),"meter","statusBar","paddingRight");i.enter().append("text").classed("percent-value",!0).merge(i).text((function(t){return t+"%"})).attr("x",+n.attr("x")+n.node().getComputedTextLength()+a).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=uf.appendOrSelect(this.parent,"tspan"),i=Zr.getProperty(this.model.getOptions(),"meter","statusBar","paddingRight"),a=Math.ceil(r.node().getComputedTextLength());uf.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+a+i)},e.prototype.getMaxTitleWidth=function(){var t=uf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),e=t.width?t.width:this.parent.node().getAttribute("width"),n=uf.appendOrSelect(this.parent,"text.percent-value"),r=Zr.getProperty(this.model.getOptions(),"meter","statusBar","paddingRight"),i=n.node().getComputedTextLength(),a=uf.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(uf.getSVGElementSize(a,{useBBox:!0}).width+Zr.getProperty(this.model.getOptions(),"meter","status","paddingLeft"))},e.prototype.getStatusIconPathString=function(t){switch(t){case V.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 V.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case V.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}(og),ug=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new Kp,i.init(),i}return n(e,t),e.prototype.init=function(){var t=this,e=Ih(this.services.domUtils.getHolder()),n=Zr.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=uf.appendOrSelect(e,"div."+Uh.prefix+"--"+n+"--tooltip");var r=uf.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(N.Tooltip.MOVE,(function(){t.positionTooltip()})),this.services.events.addEventListener(N.Tooltip.SHOW,(function(e){var n=e.detail.data,i=t.getTooltipHTML(e);Zr.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(n,i)):r.html(i),t.positionTooltip(),t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(N.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this.model.getOptions(),n=Zr.getProperty(e,"tooltip","truncation","type"),r=Zr.getProperty(e,"tooltip","truncation","threshold"),i=Zr.getProperty(e,"tooltip","truncation","numCharacter");return n!==x.NONE?t.map((function(t){return t.label&&t.label.length>r&&(t.label=Zr.truncateLabel(t.label,n,i)),t.value&&t.value.length>r&&(t.value=Zr.truncateLabel(t.value,n,i)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip">'+t.detail.content+"</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.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">'+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){var e=this.model.getOptions(),n=Zr.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=Nh(n);if(t){var a=t.placement===O.TOP?zp.TOP:zp.BOTTOM;e=this.positionService.findPositionAt(t.position,r,a)}else{var o=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[zp.RIGHT,zp.LEFT,zp.TOP,zp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.horizontalOffset;o===zp.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,o)}this.positionService.setElement(r,e)},e}(Yp),cg=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=this.model.getOptions(),r=t.detail.data,i=this.services.cartesianScales,a=i.getDomainAxisOptions(),o=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=i.getRangeAxisOptions(),c=i.getRangeIdentifier(),l=i.getRangeAxisScaleType(),h=n.data.groupMapsTo,f=a.title;if(!f){var d=i.getDomainAxisPosition();f=d===b.BOTTOM||d===b.TOP?"x-value":"y-value"}var p,g=r[0][o];if(s===E.TIME?g=Rp(new Date(r[0][o]),"MMM d, yyyy"):s===E.LINEAR&&(g=g.toLocaleString()),1===r.length){var v=r[0],m=u.title;if(!m){var y=i.getRangeAxisPosition();m=y===b.LEFT||y===b.RIGHT?"y-value":"x-value"}var _=v[c];l===E.LINEAR&&(_=_.toLocaleString()),p=[{label:f,value:g},{label:m,value:_},{label:"Group",value:v[h],color:this.model.getStrokeColor(v[h])}]}else r.length>1&&(p=(p=[{label:f,value:this.valueFormatter(g)}]).concat(r.map((function(t){return{label:t[h],value:e.valueFormatter(t[c]),color:e.model.getStrokeColor(t[h])}})).sort((function(t,e){return e.value-t.value}))),!0===Zr.getProperty(n,"tooltip","showTotal")&&p.push({label:"Total",value:this.valueFormatter(r.reduce((function(t,e){return t+e[c]}),0)),bold:!0}));return p},e}(ug),lg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",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?ki.opacity.unselected:ki.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",ki.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),r=this.services.cartesianScales,i=r.getOrientation(),a=Tc().curve(this.services.curves.getD3Curve());i===w.VERTICAL?a.x((function(t,e){return r.getDomainValue(t,e)})).y0(r.getRangeValue(0)).y1((function(t,e){return r.getRangeValue(t,e)})):a.x0(r.getRangeValue(0)).x1((function(t,e){return r.getRangeValue(t,e)})).y((function(t,e){return r.getDomainValue(t,e)}));var o=this.model.getGroupedData(),s=n.selectAll("path.area").data(o,(function(t){return t.name}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).attr("fill",(function(t){return e.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",ki.opacity.selected).attr("class","area").attr("d",(function(t){var e=t.data;return a(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Yp),hg=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.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t[0][r]!==n.datum().name?ki.opacity.unselected:ki.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",ki.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this.getContainerSVG(),n=this,i=this.model.getOptions(),a=i.data.groupMapsTo,o=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),u=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(u)===E.TIME){var c=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),l=this.model.getStackedData({percentage:c}),h=e.selectAll("path.area").data(l,(function(t){return t[0][a]}));this.areaGenerator=Tc().x((function(t){return o(new Date(t.data.sharedStackKey))})).y0((function(t){return s(t[0])})).y1((function(t){return s(t[1])})).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(l,(function(t){return t[0][a]})).attr("fill",(function(t){return n.model.getFillColor(t[0][a])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",ki.opacity.selected).attr("class","area").attr("d",this.areaGenerator)}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Yp),fg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.model.getOptions(),n=this.services.cartesianScales.getMainXScale();return n.step?Math.min(e.bars.maxWidth,n.step()/2):Math.min(e.bars.maxWidth,5/n.ticks().length*e.bars.maxWidth)},e}(Yp),dg=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.model.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG().selectAll("path.bar").data(this.model.getDisplayData(),(function(t){return t[n]}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r=e.getBarWidth(),i=e.services.cartesianScales.getDomainValue(t,n)-r/2,a=i+r,o=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);return Zr.generateSVGPathString({x0:i,x1:a,y0:o,y1:s},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.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=Ih(this);r.classed("hovered",!0),r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Fa(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(N.Bar.BAR_MOUSEOVER,{element:r,datum:n}),e.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(t){Ih(this);e.services.events.dispatchEvent(N.Bar.BAR_MOUSEMOVE,{element:Ih(this),datum:t}),e.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(N.Bar.BAR_CLICK,{element:Ih(this),datum:t})})).on("mouseout",(function(n){var r=Ih(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(N.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(N.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(fg),pg=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.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var o=this.getContainerSVG(),s=ya(n,(function(t){return t[a]})).keys(),u=o.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var c=u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-labelledby",(function(t){return t})).merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===w.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("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.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);return Zr.generateSVGPathString({x0:r,x1:a,y0:o,y1:s},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,e=this.model.getOptions().data.groupMapsTo;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=Ih(this);r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Fa(t.model.getFillColor(n[e])).darker(.7).toString()})),t.services.events.dispatchEvent(N.Bar.BAR_MOUSEOVER,{element:r,datum:n}),t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(e){var n=Ih(this);t.services.events.dispatchEvent(N.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Bar.BAR_CLICK,{element:Ih(this),datum:e})})).on("mouseout",(function(e){var n=Ih(this);n.classed("hovered",!1);var r=t.model.getOptions().data.groupMapsTo;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillColor(e[r])})),t.services.events.dispatchEvent(N.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier();return e.filter((function(e){return e[n]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getActiveDataGroupNames().length,e=this.getTotalGroupPadding();return this.getBarWidth()*t+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getActiveDataGroupNames().length;if(1===t)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t-1)},e.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=Zr.getProperty(t,"bars","width"),n=Zr.getProperty(t,"bars","maxWidth");if(null!==e){if(null===n)return e;if(e<=n)return e}var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),a=this.services.cartesianScales.getDomainScale();return Math.min(n,(a.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=Sa().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(fg),gg=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;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),i=(this.model.getDisplayData(),this.model.getOptions()),a=i.data.groupMapsTo,o=(this.services.cartesianScales.getDomainIdentifier(),this.model.getStackedData()),s=n.selectAll("g.bars").data(o,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-label","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("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),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===w.VERTICAL?c+=1:c-=1),Zr.generateSVGPathString({x0:o,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r,i=Ih(this);i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Fa(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(N.Bar.BAR_MOUSEOVER,{element:i,datum:n});var a=e.model.getDisplayData(),o=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier(),u=a.find((function(e){return e[s]===n.data[n.group]&&e[o].toString()===n.data.sharedStackKey&&e[t]===n.group}));void 0===u&&((r={})[o]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,u=r),e.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:i,data:[u]})})).on("mousemove",(function(t){var n=Ih(this);e.services.events.dispatchEvent(N.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(N.Bar.BAR_CLICK,{element:Ih(this),datum:t})})).on("mouseout",(function(n){var r=Ih(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(N.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(N.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(fg),vg=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.model.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(N.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(N.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.render=function(t){var e,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier();if(this.configs.stacked){var s=Object.keys(r.axes).some((function(t){return r.axes[t].percentage}));e=this.model.getStackedData({percentage:s})}else e=this.model.getDisplayData().filter((function(t){return void 0!==t[o]&&null!==t[o]}));var u=n.selectAll("circle.dot").data(e,(function(t){return t[i]+"-"+t[a]}));u.exit().attr("opacity",0).remove();var c=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u);this.styleCircles(c,t),this.addEventListeners()},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=Zr.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),a=i[0],o=i[1],s=Zr.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.getRangeValue(t,e)}),r),u=s[0],c=s[1],l=u(t,e),h=c(t,e);return o&&a?h<=o.scaleValue&&l>=a.scaleValue:o?h<=o.scaleValue:a?l>=a.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.points,o=a.filled,s=a.fillOpacity,u=this.services,c=u.cartesianScales,l=u.transitions,h=i.data.groupMapsTo,f=c.getDomainIdentifier(),d=c.getRangeIdentifier(),p=Zr.flipDomainAndRangeBasedOnOrientation((function(t,e){return c.getDomainValue(t,e)}),(function(t,e){return c.getRangeValue(t,e)}),c.getOrientation()),g=p[0],v=p[1],m=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[h],t[f],t,o)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[h],t[f],t,o)})).transition(l.getTransition("scatter-update-enter",e)).attr("cx",g).attr("cy",v).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[h],t[f],t,o))return n.model.getFillColor(t[h],t[f],t)})).attr("fill-opacity",o?s:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[h],t[f],t)})).attr("opacity",m?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[d]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover",(function(r){var i=Ih(this);i.classed("hovered",!0).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)}));var a=t.services.cartesianScales.getDomainValue(r),o=t.services.cartesianScales.getRangeValue(r),s=t.model.getDisplayData().filter((function(e){return a===t.services.cartesianScales.getDomainValue(e)&&o===t.services.cartesianScales.getRangeValue(e)}));t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:i,data:s}),t.services.events.dispatchEvent(N.Scatter.SCATTER_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=Ih(this);t.services.events.dispatchEvent(N.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Scatter.SCATTER_CLICK,{element:Ih(this),datum:e})})).on("mouseout",(function(e){var n=Ih(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(N.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(N.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(N.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Yp),mg=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.model.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),a=uf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),o=i.length>0,s=o?sa(i):[1,1];return ts().domain(s).range(o?e.bubble.radiusRange(a,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.bubble.radiusMapsTo,o=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales.getDomainIdentifier();t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return o(t[a]||1)})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("opacity",1)},e}(vg),yg=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?Pi.opacity.unselected:Pi.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Pi.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=this.services,a=i.cartesianScales,o=i.curves,s=Zr.flipDomainAndRangeBasedOnOrientation((function(t,e){return a.getDomainValue(t,e)}),(function(t,e){return a.getRangeValue(t,e)}),a.getOrientation()),u=s[0],c=s[1],l=this.model.getOptions(),h=Oc().x(u).y(c).curve(o.getD3Curve()).defined((function(t,e){var n=t[a.getRangeIdentifier()];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(l.axes).some((function(t){return l.axes[t].percentage})),p=l.data.groupMapsTo,g=this.model.getStackedData({percentage:d}),v=this.services.cartesianScales.getDomainIdentifier(),m=this.services.cartesianScales.getRangeIdentifier();f=g.map((function(t){return{name:t[0][p],data:t.map((function(t){var e;return(e={})[v]=t.data.sharedStackKey,e[p]=t[p],e[m]=t[1],e})),hidden:!Zr.some(t,(function(t){return t[0]!==t[1]}))}}))}else f=this.model.getGroupedData();var y=n.selectAll("path.line").data(f,(function(t){return t.name}));y.exit().attr("opacity",0).remove(),y.enter().append("path").classed("line",!0).attr("opacity",0).merge(y).data(f,(function(t){return t.name})).attr("stroke",(function(t,n){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){var n=t.data,r=e.services.cartesianScales.getRangeIdentifier();return n.map((function(t){return t[r]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",(function(t){return t.hidden?0:1})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Yp),_g=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.getContainerSVG(),n=this.model.getOptions(),i=n.data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier(),s=Object.keys(n.axes).some((function(t){return n.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),c=e.selectAll("g.dots").data(u,(function(t){return t[0][i]}));c.exit().attr("opacity",0).remove();var l=c.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(c).selectAll("circle.dot").data((function(t){return t}));l.exit().attr("opacity",0).remove();var h=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).datum((function(t){var e,n=t[i];return(e={})[i]=n,e[a]=t.data.sharedStackKey,e[o]=t[1],e}));this.styleCircles(h,t),this.addEventListeners()},e}(vg);function bg(t,e){var n=this,r=go(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var xg=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.model.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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),a=this.model.getOptions(),o=a.data.groupMapsTo,s=this.computeRadius();this.arc=_c().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=_c().innerRadius(this.getInnerRadius()).outerRadius(s+a.pie.hoverArc.outerRadiusOffset);var u=function(){var t=Mc,e=Sc,n=null,r=Ju(0),i=Ju(cc),a=Ju(0);function o(o){var s,u,c,l,h,f=o.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(cc,Math.max(-cc,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,a.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=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,c=d?(m-f*_)/d:0;s<f;++s,v=l)u=p[s],l=v+((h=g[u])>0?h*c:0)+_,g[u]={data:o[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:y};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Ju(+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:Ju(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ju(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ju(+t),o):a},o}().value((function(t){return t.value})).sort(null).padAngle(a.pie.padAngle)(i).sort((function(t,e){return t.index-e.index})),c=uf.appendOrSelect(n,"g.slices").attr("role",r.GROUP).attr("aria-label","slices").selectAll("path.slice").data(u,(function(t){return t.data[o]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return e.model.getFillColor(t.data[o])})).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+", "+Zr.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return bg.bind(this)(t,e.arc)}));var l=u.filter((function(t){return t.value>0})),h=uf.appendOrSelect(n,"g.labels").attr("role",r.GROUP).attr("aria-label","labels").selectAll("text.pie-label").data(l,(function(t){return t.data[o]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return a.pie.labels.formatter?a.pie.labels.formatter(t):Zr.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+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=l.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<a.pie.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+a.pie.callout.offsetX+a.pie.callout.textMargin+t.textOffsetX,o=t.yPosition-a.pie.callout.offsetY,t.direction=P.RIGHT,d.push(t)):(i=t.xPosition-a.pie.callout.offsetX-t.textOffsetX-a.pie.callout.textMargin,o=t.yPosition-a.pie.callout.offsetY,t.direction=P.LEFT,d.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(d);var p=Zr.getProperty(a,"donut")?"donut":"pie",g=Zr.getProperty(a,p,"alignment"),v=uf.getAlignmentOffset(g,n,this.getParent()),m=s+a.pie.xOffset+v,y=s+a.pie.yOffset;d.length>0&&(y+=a.pie.yOffsetCallout),n.attr("transform","translate("+m+", "+y+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=uf.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP).attr("aria-label","callouts"),n=this.model.getOptions(),i=e.selectAll("g.callout").data(t);i.exit().remove();var a=i.enter().append("g").classed("callout",!0).attr("role",r.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");a.merge(i).datum((function(t){var e=t.xPosition,r=t.yPosition;return t.direction===P.RIGHT?(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e+n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-n.pie.callout.horizontalLineLength):(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e-n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+n.pie.callout.horizontalLineLength),t})),a.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return Ih(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})),a.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return Ih(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=Ih(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(N.Pie.SLICE_MOUSEOVER,{element:Ih(this),datum:e});var r=t.model.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value,color:t.model.getStrokeColor(e.data[r])}]})})).on("mousemove",(function(e){var n=Ih(this);t.services.events.dispatchEvent(N.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Pie.SLICE_CLICK,{element:Ih(this),datum:e})})).on("mouseout",(function(e){var n=Ih(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(N.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=uf.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e}(Yp),wg=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(){return Zr.clamp(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.model.getOptions();return Zr.getProperty(t,"gauge","type")===R.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.model.getOptions();switch(Zr.getProperty(e,"gauge","deltaArrow","direction")){case I.UP:return"4,10 8,6 12,10";case I.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.model.getOptions().data.groupMapsTo,a=this.getValue(),o=this.getValueRatio(),s=this.getArcSize(),u=this.getStartAngle(),c=u+o*s,l=u+s,h=this.computeRadius(),f=this.getInnerRadius();this.backgroundArc=_c().innerRadius(f).outerRadius(h).startAngle(c).endAngle(l),this.arc=_c().innerRadius(f).outerRadius(h).startAngle(u).endAngle(c),uf.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var d=n.selectAll("path.arc-foreground").data([a]);d.enter().append("path").attr("class","arc-foreground").merge(d).attr("d",this.arc).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),n.attr("transform","translate("+h+", "+h+")"),this.drawValueNumber(),this.drawDelta(),d.exit().remove(),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=Zr.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),a=this.computeRadius(),o=Zr.getProperty(e,"gauge","valueFontSize"),s=Zr.getProperty(e,"gauge","deltaFontSize"),u=Zr.getProperty(e,"gauge","numberSpacing"),c=0;n!==R.FULL||i?n===R.SEMI&&i&&(c=-(s(a)+u)):c=s(a);var l=uf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),h=uf.appendOrSelect(l,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=Zr.getProperty(e,"gauge","numberFormatter"),d=h.selectAll("text.gauge-value-number").data([r]);d.enter().append("text").attr("class","gauge-value-number").merge(d).style("font-size",o(a)+"px").attr("text-anchor","middle").text((function(t){return f(t)}));var p=uf.getSVGElementSize(uf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;uf.appendOrSelect(h,"text.gauge-value-symbol").style("font-size",o(a)/2+"px").attr("x",p/2).text("%")},e.prototype.drawDelta=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=this.getDelta(),r=this.computeRadius(),i=n?Zr.getProperty(e,"gauge","deltaFontSize"):function(){return 0},a=n?Zr.getProperty(e,"gauge","numberFormatter"):function(){return null},o=Zr.getProperty(e,"gauge","deltaArrow","size"),s=Zr.getProperty(e,"gauge","numberSpacing"),u=uf.appendOrSelect(t,"g.gauge-numbers"),c=uf.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),l=uf.appendOrSelect(c,"text.gauge-delta-number");l.data(null===n?[]:[n]),l.enter().append("text").classed("gauge-delta-number",!0).merge(l).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return a(t)+"%"}));var h=uf.getSVGElementSize(uf.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=Zr.getProperty(e,"gauge","deltaArrow","enabled"),d=c.selectAll("svg.gauge-delta-arrow").data(null!==n&&f?[n]:[]);d.enter().append("svg").merge(d).attr("class","gauge-delta-arrow").attr("x",-o(r)-h/2).attr("y",-o(r)/2-.35*i(r)).attr("width",o(r)).attr("height",o(r)).attr("viewBox","0 0 16 16"),uf.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=Zr.getProperty(e,"gauge","status");uf.appendOrSelect(d,"polygon.gauge-delta-arrow").classed("status--"+p,null!==p).attr("fill",(function(){return null===p?"currentColor":null})).attr("points",this.getArrow(n)),d.exit().remove(),l.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-Zr.getProperty(this.model.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc").on("mouseover",(function(e){t.services.events.dispatchEvent(N.Gauge.ARC_MOUSEOVER,{element:Ih(this),datum:e})})).on("mousemove",(function(e){var n=Ih(this);t.services.events.dispatchEvent(N.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(N.Gauge.ARC_CLICK,{element:Ih(this),datum:e})})).on("mouseout",(function(e){var n=Ih(this);t.services.events.dispatchEvent(N.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=Zr.getProperty(t,"gauge","type"),n=uf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===R.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Yp),Eg=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=uf.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),a=this.computeRadius();uf.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(Ih(this))})),uf.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(Zr.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=Zr.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?vo:co)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(xg),Og=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=uf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var a=Zr.getProperty(this.model.getOptions(),"data","loading");a?this.renderSkeleton(a):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===k.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===k.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===k.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==k.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===w.VERTICAL&&this.drawYGrid(t),e===w.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=ts().domain([0,1]).range(t),this.yScale=ts().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=uf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;this.backdrop=uf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",a);var o=uf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],c=(s[1],this.yScale.range()),l=(c[0],c[1]);this.backdrop.merge(o).attr("x",u).attr("y",l),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=Zr.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),a=uf.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=Zr.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),a=uf.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=uf.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),a=i.width,o=i.height,s=uf.appendOrSelect(r,"svg.chart-skeleton").attr("width",a).attr("height",o),u=this.model.getOptions().pie,c=(uf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",a).attr("height",o).attr("fill","none"),_c().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI)),l=t+Math.abs(u.radiusOffset),h=t+(Math.min(a,o)-2*t)/2;uf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+l+", "+h+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n)},e.prototype.computeOuterRadius=function(){var t=this.model.getOptions(),e=uf.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=uf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=uf.appendOrSelect(e,"defs").lower(),a=uf.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(md).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Yp),Tg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||Ri.default.size).attr("height",this.configs.size||Ri.default.size).attr("opacity",0)},e}(Yp);function Sg(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 Mg(t,e){var n,r,i,a,o,s=new kg(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Ag);n=c.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)c.push(r=n.children[a]=new kg(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Pg)}function Ag(t){return t.children}function Cg(t){t.data=t.data.data}function Pg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function kg(t){this.data=t,this.depth=this.height=0,this.parent=null}function Dg(t){if("function"!=typeof t)throw new Error;return t}function Lg(){return 0}function Rg(t){return function(){return t}}function Ig(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 Vg(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function Ng(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}kg.prototype=Mg.prototype={constructor:kg,count:function(){return this.eachAfter(Sg)},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 Mg(this).eachBefore(Cg)}};var Ug=function t(e){function n(t,n,r,i,a){!function(t,e,n,r,i,a){for(var o,s,u,c,l,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,c=a-r;do{l=y[b++].value}while(!l&&b<x);for(h=f=l,v=l*l*(g=Math.max(c/u,u/c)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(l+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=l*l*g,(d=Math.max(f/v,v/h))>p){l-=s;break}p=d}m.push(o={value:l,dice:u<c,children:y.slice(_,b)}),o.dice?Vg(o,n,r,i,w?r+=c*l/w:a):Ng(o,n,r,w?n+=u*l/w:i,a),w-=l,_=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 jg(){var t=Ug,e=!1,n=1,r=1,i=[0],a=Lg,o=Lg,s=Lg,u=Lg,c=Lg;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Ig),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=c(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Dg(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Rg(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Rg(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Rg(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Rg(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:Rg(+t),l):c},l}var Gg=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===A.ROW_REVERSE||o.configs.direction===A.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=Zr.getProperty(t,"data","growth","x");return e===C.PREFERRED||e===C.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 Zr.getProperty(t,"data","growth","x")===C.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=uf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height,o=Mg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===A.ROW||this.configs.direction===A.ROW_REVERSE?Vg:Ng;jg().tile(s).size([i,a])(o);var u=this.configs.direction===A.ROW||this.configs.direction===A.ROW_REVERSE,c=n.selectAll("svg.layout-child-"+this._instanceID).data(o.leaves(),(function(t){return t.data.id}));c.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),c.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(Ih(n));var i=Zr.getProperty(e,"data","growth","x");i!==C.PREFERRED&&i!==C.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=Zr.getProperty(t,"data","growth","x"),n=uf.getSVGElementSize(Ih(this),{useBBox:!0});if("legend"===t.data.id){var r=uf.getSVGElementSize(Ih(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===C.PREFERRED){var o=u?n.width:n.height,s=u?i:a;t.data.size=o/s*100}})),c.exit().remove(),this.children.filter((function(t){return Zr.getProperty(t,"growth","x")===C.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),o=Mg({children:this.children}).sum((function(t){return t.size})),jg().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){Zr.getProperty(e,"data","growth","x")===C.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}(Yp),Hg=Array.prototype.slice;function Bg(t){return t}function Fg(t){return"translate("+(t+.5)+",0)"}function zg(t){return"translate(0,"+(t+.5)+")"}function Wg(t){return function(e){return+t(e)}}function Yg(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function qg(){return!this.__axis}function Xg(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",l=1===t||3===t?Fg:zg;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Bg:i,p=Math.max(a,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?Yg:Wg)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),E=x.enter().append("g").attr("class","tick"),O=x.select("line"),T=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),O=O.merge(E.append("line").attr("stroke","currentColor").attr(c+"2",u*a)),T=T.merge(E.append("text").attr("fill","currentColor").attr(c,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),O=O.transition(h),T=T.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?l(t):this.getAttribute("transform")})),E.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.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 l(y(t))})),O.attr(c+"2",u*a),T.attr(c,u*p).text(d),_.filter(qg).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Hg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Hg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Hg.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 Zg(t){return Xg(1,t)}function Kg(t){return Xg(2,t)}function $g(t){return Xg(3,t)}function Qg(t){return Xg(4,t)}var Jg=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.model.getOptions(),o=Zr.getProperty(a,"axes",i),s=Zr.getProperty(o,"scaleType"),u=Zr.getProperty(a,"data","loading"),c=Zr.getProperty(o,"ticks","number"),l=Zr.getProperty(o,"ticks","values"),h=Zr.getProperty(o,"truncation","type"),f=Zr.getProperty(o,"truncation","threshold"),d=Zr.getProperty(o,"truncation","numCharacter"),p=null!==c,g=i===b.LEFT||i===b.RIGHT,v=Zr.getProperty(a,"timeScale"),m=this.getContainerSVG(),y=uf.getSVGElementSize(this.parent,{useAttrs:!0}),_=y.width,w=y.height;i===b.BOTTOM||i===b.TOP?(e=this.configs.axes[b.LEFT]?this.margins.left:0,n=this.configs.axes[b.RIGHT]?_-this.margins.right:_):(e=w-this.margins.bottom,n=this.margins.top);var O,T=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===E.LABELS?T.rangeRound([e,n]):T.range([e,n]),i){case b.LEFT:O=Qg;break;case b.BOTTOM:O=$g;break;case b.RIGHT:O=Kg;break;case b.TOP:O=Zg}var S=uf.appendOrSelect(m,"g.axis."+i);S.attr("aria-label",i+" axis");var M=!S.select("g.ticks").empty(),A=uf.appendOrSelect(S,"g.ticks");M||(A.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),A.attr("aria-label",i+" ticks"));var C=uf.appendOrSelect(S,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),P=uf.appendOrSelect(C,"g.tick"),k=uf.appendOrSelect(P,"text").text("0"),D=uf.getSVGElementSize(k.node(),{useBBox:!0}).height;P.remove();var L,R=this.scaleType===E.TIME||o.scaleType===E.TIME,I=this.scaleType||o.scaleType||E.LINEAR,V=O(T).tickSizeOuter(0);if(T.ticks){var N=void 0;if(p?N=c:(N=Li.ticks.number,g&&(N=this.getNumberOfFittingTicks(w,D,2.5))),1===T.ticks().length&&0===T.ticks()[0]&&(N=0),V.ticks(N),R)if(T.ticks(N).length){var U=Zr.getProperty(a,"timeScale","addSpaceOnEdges"),j=void 0;U&&(j=T.nice(N)),j=T.ticks(N),U&&j.length>2&&(j.splice(j.length-1,1),j.splice(0,1)),V.tickValues(j)}else V.tickValues([])}var G=Zr.getProperty(o,"ticks","formatter");if(R){var H=eg(V.tickValues());L=null===G?function(t,e){return Jp(t,e,H,v)}:function(t,e){var n=Jp(t,e,H,v);return G(t,e,n)}}else null===G?I===E.LINEAR&&(L=function(t){return t.toLocaleString()}):L=G;switch(V.tickFormat(L),l&&V.tickValues(l),i){case b.LEFT:A.attr("transform","translate("+this.margins.left+", 0)");break;case b.BOTTOM:A.attr("transform","translate(0, "+(w-this.margins.bottom)+")");break;case b.RIGHT:A.attr("transform","translate("+(_-this.margins.right)+", 0)");break;case b.TOP:A.attr("transform","translate(0, "+this.margins.top+")")}var B=this.model.isDataEmpty();if(o.title){var F=uf.appendOrSelect(S,"text.axis-title").html(B||u?"":o.title);switch(i){case b.LEFT:F.attr("transform","rotate(-90)").attr("y",0).attr("x",-T.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.BOTTOM:F.attr("transform","translate("+(this.margins.left/2+T.range()[1]/2)+", "+w+")").style("text-anchor","middle");break;case b.RIGHT:F.attr("transform","rotate(90)").attr("y",-_).attr("x",T.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.TOP:var z=uf.getSVGElementSize(F,{useBBox:!0}).height;F.attr("transform","translate("+(this.margins.left/2+T.range()[1]/2)+", "+z/2+")").style("text-anchor","middle")}}if(R){var W=eg(V.tickValues()),Y=v.showDayName,q=A;t&&(A=A.transition(this.services.transitions.getTransition("axis-update",t))),A=A.call(V),q.selectAll(".tick").data(V.tickValues(),T).order().select("text").style("font-weight",(function(t,e){return Qp(t,e,W,Y)?"bold":"normal"}))}else A=t&&M?A.transition(this.services.transitions.getTransition("axis-update")).call(V):A.call(V);if(C.call(V),i===b.BOTTOM||i===b.TOP){var X=!1;if(T.step){X=C.selectAll("g.tick text").nodes().some((function(t){return uf.getSVGElementSize(t,{useBBox:!0}).width>=T.step()}))}else{var Z=Zr.getProperty(o,"ticks","rotateIfSmallerThan")||Li.ticks.rotateIfSmallerThan;X=_/(R?V.tickValues().length:T.ticks().length)/2<Z}X?(p||(V.ticks(this.getNumberOfFittingTicks(_,D,3.5)),C.call(V),A.call(V)),S.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===b.TOP?"start":"end")):S.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(u&&S.attr("opacity",0),A.selectAll("g.tick").attr("aria-label",(function(t){return t})),C.selectAll("g.tick").attr("aria-label",(function(t){return t})),h!==x.NONE&&s===E.LABELS&&!l){var K=this.model.getDataValuesGroupedByKeys();if(K.length>0){var $=K.map((function(t){return t.sharedStackKey})),Q=m.select("g.axis."+i+" g.ticks g.tick").html();S.selectAll("g.ticks g.tick").html(Q),S.selectAll("g.tick text").data($).text((function(t){return t.length>f?Zr.truncateLabel(t,h,d):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data($).text((function(t){return t.length>f?Zr.truncateLabel(t,h,d):t})),S.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),S.selectAll("g.tick text").data($)}}this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=uf.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=Zr.getProperty(r,"axes",e),a=Zr.getProperty(i,"scaleType"),o=Zr.getProperty(i,"truncation","threshold"),s=(this.scaleType===E.TIME||(i.scaleType,E.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_MOUSEOVER,{element:Ih(this),datum:t}),a===E.LABELS&&t.length>o&&s.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:Ih(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_MOUSEMOVE,{element:Ih(this),datum:t}),a===E.LABELS&&t.length>o&&s.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_CLICK,{element:Ih(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(N.Axis.LABEL_MOUSEOUT,{element:Ih(this),datum:t}),a===E.LABELS&&s.services.events.dispatchEvent(N.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 Zr.clamp(r,2,Li.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;uf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Yp),tv=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(b),i=Zr.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[b[t]]&&(n[b[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=b[t];if(e.configs.axes[n]&&!e.children[n]){var r=new Jg(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(n){var r,i=e.children[n],o=i.configs.position,s=i.getInvisibleAxisRef(),u=uf.getSVGElementSize(s,{useBBox:!0}),c=u.width,l=u.height;switch(r=i.getTitleRef().empty()?0:uf.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,o){case b.TOP:a.top=l+r;break;case b.BOTTOM:a.bottom=l+r;break;case b.LEFT:a.left=c+r;break;case b.RIGHT:a.right=c+r}e.addAxisThresholds(t,o)})),Object.keys(a).some((function(t){return e.margins[t]!==a[t]}))&&(this.margins=Object.assign(this.margins,a),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e.prototype.addAxisThresholds=function(t,e){var n=this,r=Zr.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new ag(n.model,n.services,m(m({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(Yp),ev=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),this.drawBackdrop(),uf.appendOrSelect(this.backdrop,"g.x.grid"),uf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(t),this.drawYGrid(t)},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=$g(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=Zr.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var a=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=Qg(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=Zr.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var a=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(Zr.getTranslationValues(t).tx)-Number(Zr.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+Zr.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=+Zr.getTranslationValues(s).tx-+Zr.getTranslationValues(o).tx;else{var u=n.select("rect.chart-grid-backdrop").node();a=uf.getSVGElementSize(u).width-+Zr.getTranslationValues(o).tx}else a=+Zr.getTranslationValues(s).tx;return a*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=Zr.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Zr.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],a=r[1],o=n.range(),s=o[0],u=o[1];this.backdrop=uf.appendOrSelect(t,"svg.chart-grid-backdrop");var c=uf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",a-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(Yp);var nv,rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e}return n(e,t),e.prototype.render=function(){this.drawBackdrop(),this.addBackdropEventListeners()},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===w.HORIZONTAL?r:n,s=uf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=uf.appendOrSelect(s,"line.ruler-line"),c=i.selectAll("[role=graphics-symbol]"),l=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=l.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(N.Tooltip.MOVE);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=this.services.cartesianScales.getRangeIdentifier(),m=g.map((function(t){return t.originalData})).filter((function(t){var e=t[v];return null!=e})),y=g.map((function(t){return t.domainValue})),_=c.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Zr.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:u,data:this.formatTooltipData(m)}),s.attr("opacity",1);var b=g[0];"horizontal"===a?u.attr("x1",d).attr("x2",f).attr("y1",b.domainValue).attr("y2",b.domainValue):u.attr("y1",d).attr("y2",f).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=uf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(N.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){var t=this;this.backdrop.on("mousemove mouseover",(function(){var e=Nh(t.parent.node());t.showRuler(e)})).on("mouseout",(function(){t.hideRuler()}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],a=r[1],o=n.range(),s=o[0],u=o[1];this.backdrop=uf.appendOrSelect(t,"svg.chart-grid-backdrop");var c=uf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",a-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e}(Yp),iv=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}(rv),av=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.getRangeScale().domain(),n=e[0],r=e[1];if(n>0&&r<0||n<0&&r>0){var i=this.getContainerSVG(),a=this.services.cartesianScales.getDomainScale().range(),o=a[0],s=a[1],u=+this.services.cartesianScales.getRangeValue(0)+.5;if(!u){var c=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(c).range()[0]}var l=Zr.flipSVGCoordinatesBasedOnOrientation({x0:o,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());uf.appendOrSelect(i,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",l.y0).attr("y2",l.y1).attr("x1",l.x0).attr("x2",l.x1)}},e}(Yp),ov=function(){function t(t,e){this.services={domUtils:uf,events:cf,transitions:bd},this.model=new Ol(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},!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(N.Model.UPDATE,(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener(N.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(N.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},!0)},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new og(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},n={id:"legend",components:[new qp(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},r={id:"graph-frame",components:t,growth:{x:C.STRETCH,y:C.FIXED}},i=!1!==this.model.getOptions().legend.enabled,a=A.COLUMN;if(i){var o=Zr.getProperty(this.model.getOptions(),"legend","position");"left"===o?(a=A.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):"right"===o?(a=A.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):"bottom"===o&&(a=A.COLUMN_REVERSE)}var s={id:"spacer",components:[new Tg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},u={id:"full-frame",components:[new Gg(this.model,this.services,y(i?[n]:[],i?[s]:[],[r]),{direction:a})],growth:{x:C.STRETCH,y:C.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Tg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}};c.push(l)}return c.push(u),[new ug(this.model,this.services),new Gg(this.model,this.services,c,{direction:A.COLUMN})]},t}(),sv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Bp,curves:Wp}),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new og(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},n={id:"legend",components:[new qp(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},r={id:"graph-frame",components:t,growth:{x:C.STRETCH,y:C.FIXED}},i=Zr.getProperty(this.model.getOptions(),"data","loading"),a=!1!==this.model.getOptions().legend.enabled&&!i,o=A.COLUMN;if(a){var s=Zr.getProperty(this.model.getOptions(),"legend","position");s===T.LEFT?(o=A.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):s===T.RIGHT?(o=A.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):s===T.BOTTOM&&(o=A.COLUMN_REVERSE)}var u={id:"spacer",components:[new Tg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},c={id:"full-frame",components:[new Gg(this.model,this.services,y(a?[n]:[],a?[u]:[],[r]),{direction:o})],growth:{x:C.STRETCH,y:C.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var h={id:"spacer",components:[new Tg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}};l.push(h)}return l.push(c),[new cg(this.model,this.services),new Gg(this.model,this.services,l,{direction:A.COLUMN})]},e}(ov),uv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Zr.clone(Ci.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new ev(this.model,this.services),new rv(this.model,this.services),new yg(this.model,this.services),new lg(this.model,this.services),new vg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}(sv),cv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Ci.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new ev(this.model,this.services),new rv(this.model,this.services),new hg(this.model,this.services),new yg(this.model,this.services,{stacked:!0}),new _g(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}(sv),lv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Ci.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new ev(this.model,this.services),new dg(this.model,this.services),new av(this.model,this.services),new Og(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(sv),hv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Ci.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new ev(this.model,this.services),new pg(this.model,this.services),new av(this.model,this.services),new Og(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(sv),fv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Ci.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new ev(this.model,this.services),new iv(this.model,this.services),new gg(this.model,this.services),new Og(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(sv),dv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Ci.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new ev(this.model,this.services),new rv(this.model,this.services),new mg(this.model,this.services),new Og(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}(sv),pv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Ci.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new ev(this.model,this.services),new rv(this.model,this.services),new yg(this.model,this.services),new vg(this.model,this.services,{handleThresholds:!0}),new Og(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}(sv),gv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Ci.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new ev(this.model,this.services),new rv(this.model,this.services),new vg(this.model,this.services),new Og(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}(sv),vv=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}(Ol),mv=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new vv(i.services),r?i:(i.model.setOptions(Zr.mergeDefaultChartOptions(Ci.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new xg(this.model,this.services),new Og(this.model,this.services,{skeleton:k.PIE})];return this.getChartComponents(t)},e}(ov),yv=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Ci.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Eg(this.model,this.services),new Og(this.model,this.services,{skeleton:k.DONUT})];return this.getChartComponents(t)},e}(mv),_v=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]=hi.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=Zr.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=Zr.getProperty(t,"meter","status","ranges");if(n){var r=n.filter((function(t){return t.range[0]<=e&&e<=t.range[1]}));if(r.length>0)return r[0].status}return null},e}(Ol),bv=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){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getOptions(),a=this.model.getDisplayData(),o=this.model.getStatus(),s=uf.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=i.data.groupMapsTo,c=ts().domain([0,100]).range([0,s]);uf.appendOrSelect(n,"rect.container").attr("x",0).attr("y",0).attr("width",s).attr("height",Zr.getProperty(i,"meter","height"));var l=a.value<=100?a:a.value=100,h=n.selectAll("rect.value").data([l]),f=Zr.getProperty(i,"color","scale");h.enter().append("rect").classed("value",!0).merge(h).attr("x",0).attr("y",0).attr("height",Zr.getProperty(i,"meter","height")).classed("status--"+o,null!=o&&!f).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(t.value)})).attr("fill",(function(t){return e.model.getFillColor(t[u])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var d=Zr.getProperty(i,"meter","peak"),p=null!==d&&d<l.value?l.value:d,g=null===p?[]:[p],v=n.selectAll("line.peak").data(g);v.enter().append("line").classed("peak",!0).merge(v).attr("y1",0).attr("y2",Zr.getProperty(i,"meter","height")).transition(this.services.transitions.getTransition("peak-line-update",t)).attr("x1",(function(t){return c(t)})).attr("x2",(function(t){return c(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),v.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(Yp),xv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new _v(r.services),r.model.setOptions(Zr.merge(Zr.clone(Ci.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new bv(this.model,this.services)],growth:{x:C.STRETCH,y:C.FIXED}},e={id:"title",components:[new sg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},n={id:"spacer",components:[new Tg(this.model,this.services,{size:8})],growth:{x:C.PREFERRED,y:C.FIXED}},r=[new Gg(this.model,this.services,[e,n,t],{direction:A.COLUMN})];return this.getChartComponents(r)},e}(ov);function wv(t){var e,n=(Ov(t)%(e=360)+e)%e;return Ev(n,[0,10])||Ev(n,[350,0])?{textAnchor:D.START,dominantBaseline:L.MIDDLE}:Ev(n,[10,80])?{textAnchor:D.START,dominantBaseline:L.HANGING}:Ev(n,[80,100])?{textAnchor:D.MIDDLE,dominantBaseline:L.HANGING}:Ev(n,[100,170])?{textAnchor:D.END,dominantBaseline:L.HANGING}:Ev(n,[170,190])?{textAnchor:D.END,dominantBaseline:L.MIDDLE}:Ev(n,[190,260])?{textAnchor:D.END,dominantBaseline:L.BASELINE}:Ev(n,[260,280])?{textAnchor:D.MIDDLE,dominantBaseline:L.BASELINE}:{textAnchor:D.START,dominantBaseline:L.BASELINE}}function Ev(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function Ov(t){return t*(180/Math.PI)}function Tv(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 Sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=uf.appendOrSelect(e.getContainerSVG(),"g.tmp-tick"),r=uf.appendOrSelect(n,"text").text(t),i=uf.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.model.getOptions(),r=Zr.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=Zr.getProperty(n,"data","groupMapsTo"),s=Zr.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 Zr.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=Zr.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=Zr.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:Zr.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=Zr.getProperty(e.model.getOptions(),"radar","opacity");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?Zr.getProperty(r,"unselected"):Zr.getProperty(r,"selected")}))},e.handleLegendMouseOut=function(t){var n=Zr.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",Zr.getProperty(n,"selected"))},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=uf.getSVGElementSize(this.parent,{useAttrs:!0}),a=i.width,o=i.height,s=this.model.getData(),u=this.model.getDisplayData(),c=this.model.getGroupedData(),l=this.model.getOptions(),h=Zr.getProperty(l,"radar","axes"),f=h.angle,d=h.value,p=Zr.getProperty(l,"data","groupMapsTo"),g=Zr.getProperty(l,"radar"),v=g.xLabelPadding,m=g.yLabelPadding,y=g.yTicksNumber,_=g.minRange,b=g.xAxisRectHeight,x=g.opacity;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[f]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[p]})))),this.displayDataNormalized=this.normalizeFlatData(u),this.groupedDataNormalized=this.normalizeGroupedData(c);var w=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+m),E=(Math.min(a,o)-w)/2;if(!(E<=0)){var O=Sa().domain(this.displayDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),T=ts().domain([0,ga(this.displayDataNormalized.map((function(t){return t[d]})))]).range([_,E]).nice(y),S=T.ticks(y),M=function(t){return e.model.getFillColor(t)},A=kc().angle((function(t){return O(t[f])+Math.PI/2})).radius((function(t){return T(t[d])})).curve(il),C=kc().angle(A.angle()).radius((function(t){return nv?nv(t[d]):_})).curve(A.curve()),P={x:ga(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=O(t),E*Math.sin(n-Math.PI/2))})))+v,y:o/2},k=uf.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(S,(function(t){return t})),D=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[f]=e,n[d]=t,n}))};k.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+P.x+", "+P.y+")").attr("fill","none").attr("d",(function(t){return C(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 A(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("+P.x+", "+P.y+")").attr("d",(function(t){return A(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 A(D(t))})).attr("opacity",0).remove()}))})),uf.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(sa(S)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return Tv(-Math.PI/2,T(t),P).x+m})).attr("y",(function(t){return Tv(-Math.PI/2,T(t),P).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 Tv(-Math.PI/2,T(t),P).x+m})).attr("y",(function(t){return Tv(-Math.PI/2,T(t),P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))})),uf.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-"+Zr.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return Tv(O(t),0,P).x})).attr("y1",(function(t){return Tv(O(t),0,P).y})).attr("x2",(function(t){return Tv(O(t),0,P).x})).attr("y2",(function(t){return Tv(O(t),0,P).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return Tv(O(t),T.range()[0],P).x})).attr("y1",(function(t){return Tv(O(t),T.range()[0],P).y})).attr("x2",(function(t){return Tv(O(t),T.range()[1],P).x})).attr("y2",(function(t){return Tv(O(t),T.range()[1],P).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 Tv(O(t),T.range()[0],P).x})).attr("y1",(function(t){return Tv(O(t),T.range()[0],P).y})).attr("x2",(function(t){return Tv(O(t),T.range()[1],P).x})).attr("y2",(function(t){return Tv(O(t),T.range()[1],P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),uf.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 Tv(O(t),T.range()[1]+v,P).x})).attr("y",(function(t){return Tv(O(t),T.range()[1]+v,P).y})).style("text-anchor",(function(t){return wv(O(t)).textAnchor})).style("dominant-baseline",(function(t){return wv(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 Tv(O(t),T.range()[1]+v,P).x})).attr("y",(function(t){return Tv(O(t),T.range()[1]+v,P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),uf.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","blob").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+P.x+", "+P.y+")").attr("fill",(function(t){return M(t.name)})).style("fill-opacity",x.selected).attr("stroke",(function(t){return M(t.name)})).attr("d",(function(t){return C(t.data)})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_enter",t)).attr("opacity",1).attr("d",(function(t){return A(t.data)}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+P.x+", "+P.y+")").attr("d",(function(t){return A(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 A(t.data)})).attr("opacity",0).remove()}))})),uf.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 Zr.kebabCase(t[f])})).attr("cx",(function(t){return Tv(O(t[f]),T(t[d]),P).x})).attr("cy",(function(t){return Tv(O(t[f]),T(t[d]),P).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return M(t[p])})),uf.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",P.x).attr("y",P.y-b/2).attr("width",T.range()[1]).attr("height",b).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+Ov(O(t))+", "+P.x+", "+P.y+")"}));var L=Zr.getProperty(l,"radar","alignment"),R=uf.getAlignmentOffset(L,n,this.getParent());n.attr("transform","translate("+R+", 0)"),this.addEventListeners(),nv=T}},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(N.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(N.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=Zr.getProperty(this.model.getOptions(),"radar"),n=e.axes.angle,r=e.dotsRadius;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(e){var i=Ih(this);t.services.events.dispatchEvent(N.Radar.X_AXIS_MOUSEOVER,{element:i,datum:e});var a=t.parent.select(".x-axes .x-axis-"+Zr.kebabCase(e)),o=t.parent.selectAll(".dots circle."+Zr.kebabCase(e));a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",1).attr("r",r);var s=t.displayDataNormalized.filter((function(t){return t[n]===e})),u=t.model.getOptions(),c=u.data.groupMapsTo,l=Zr.getProperty(u,"radar","axes","value");t.services.events.dispatchEvent(N.Tooltip.SHOW,{hoveredElement:i,items:s.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[c],value:e[l],color:t.model.getStrokeColor(e[c])}}))})})).on("mousemove",(function(e){var n=Ih(this);t.services.events.dispatchEvent(N.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(N.Radar.X_AXIS_CLICK,{element:Ih(this),datum:e})})).on("mouseout",(function(e){var n=Ih(this),r=t.parent.select(".x-axes .x-axis-"+Zr.kebabCase(e)),i=t.parent.selectAll(".dots circle."+Zr.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(N.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(N.Tooltip.HIDE)}))},e}(Yp),Mv=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(Zr.mergeDefaultChartOptions(Ci.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Sv(this.model,this.services)];return this.getChartComponents(t)},e}(ov),Av=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Ci.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new wg(this.model,this.services)];return this.getChartComponents(t)},e}(ov),Cv=na;t.AreaChart=uv,t.BubbleChart=dv,t.DonutChart=yv,t.GaugeChart=Av,t.GroupedBarChart=hv,t.LineChart=pv,t.MeterChart=xv,t.PieChart=mv,t.RadarChart=Mv,t.ScatterChart=gv,t.SimpleBarChart=lv,t.StackedAreaChart=cv,t.StackedBarChart=fv,t.colorPalettes=ra,t.configurations=Ii,t.defaultColors=Cv,t.interfaces=U,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,a,o,s,u,c,l,h,f,d,p,g,v,m,y=function(){return(y=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 _(){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"}(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.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"}(o||(o={})),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"}(s||(s={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(u||(u={})),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"}(c||(c={})),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"}(l||(l={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(h||(h={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(f||(f={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(d||(d={})),function(t){t.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"}(p||(p={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(g||(g={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(v||(v={})),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"}(m||(m={}));var b,x,w,E,S,O,T,M,A,C,P,D,k,L,R,I,N,V,U=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return a},get ZoomBar(){return o},get Axis(){return s},get Area(){return u},get Pie(){return c},get Gauge(){return l},get Bar(){return h},get Scatter(){return f},get Line(){return d},get Radar(){return p},get Tooltip(){return g},get Threshold(){return v},get Legend(){return m}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(b||(b={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(x||(x={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(w||(w={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(E||(E={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(S||(S={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(O||(O={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(T||(T={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(M||(M={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(A||(A={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(C||(C={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(P||(P={})),function(t){t.LEFT="left",t.RIGHT="right"}(D||(D={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(k||(k={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(L||(L={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(R||(R={})),function(t){t.SEMI="semi",t.FULL="full"}(I||(I={})),function(t){t.UP="up",t.DOWN="down"}(N||(N={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(V||(V={}));var B=Object.freeze({__proto__:null,get Roles(){return r},Events:U,get ChartTheme(){return b},get AxisPositions(){return x},get TruncationTypes(){return w},get CartesianOrientations(){return E},get ScaleTypes(){return S},get TooltipPosition(){return O},get LegendPositions(){return T},get Alignments(){return M},get LegendOrientations(){return A},get LayoutDirection(){return C},get LayoutGrowth(){return P},get CalloutDirections(){return D},get Skeletons(){return k},get TextAnchor(){return L},get DominantBaseline(){return R},get GaugeTypes(){return I},get ArrowDirections(){return N},get Statuses(){return V}}),G="object"==typeof global&&global&&global.Object===Object&&global,j="object"==typeof self&&self&&self.Object===Object&&self,H=G||j||Function("return this")(),z=H.Symbol,F=Object.prototype,W=F.hasOwnProperty,Y=F.toString,q=z?z.toStringTag:void 0;var X=Object.prototype.toString;var Z=z?z.toStringTag:void 0;function K(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Z&&Z in Object(t)?function(t){var e=W.call(t,q),n=t[q];try{t[q]=void 0;var r=!0}catch(t){}var i=Y.call(t);return r&&(e?t[q]=n:delete t[q]),i}(t):function(t){return X.call(t)}(t)}function $(t){return null!=t&&"object"==typeof t}function Q(t){return"symbol"==typeof t||$(t)&&"[object Symbol]"==K(t)}function J(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 tt=Array.isArray,et=z?z.prototype:void 0,nt=et?et.toString:void 0;function rt(t){if("string"==typeof t)return t;if(tt(t))return J(t,rt)+"";if(Q(t))return nt?nt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function it(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var at=/^\s+|\s+$/g,ot=/^[-+]0x[0-9a-f]+$/i,st=/^0b[01]+$/i,ut=/^0o[0-7]+$/i,ct=parseInt;function lt(t){if("number"==typeof t)return t;if(Q(t))return NaN;if(it(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=it(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(at,"");var n=st.test(t);return n||ut.test(t)?ct(t.slice(2),n?2:8):ot.test(t)?NaN:+t}function ht(t){return t}function ft(t){if(!it(t))return!1;var e=K(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var dt,pt=H["__core-js_shared__"],gt=(dt=/[^.]+$/.exec(pt&&pt.keys&&pt.keys.IE_PROTO||""))?"Symbol(src)_1."+dt:"";var vt=Function.prototype.toString;function mt(t){if(null!=t){try{return vt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var yt=/^\[object .+?Constructor\]$/,_t=Function.prototype,bt=Object.prototype,xt=_t.toString,wt=bt.hasOwnProperty,Et=RegExp("^"+xt.call(wt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function St(t){return!(!it(t)||(e=t,gt&&gt in e))&&(ft(t)?Et:yt).test(mt(t));var e}function Ot(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return St(n)?n:void 0}var Tt=Ot(H,"WeakMap"),Mt=Object.create,At=function(){function t(){}return function(e){if(!it(e))return{};if(Mt)return Mt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Ct(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 Pt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Dt=Date.now;var kt=function(){try{var t=Ot(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Lt=function(t){var e=0,n=0;return function(){var r=Dt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(kt?function(t,e){return kt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:ht);function Rt(t){return t!=t}function It(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,Rt,n)}(t,e,0)>-1}var Nt=/^(?:0|[1-9]\d*)$/;function Vt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Nt.test(t))&&t>-1&&t%1==0&&t<e}function Ut(t,e,n){"__proto__"==e&&kt?kt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Bt(t,e){return t===e||t!=t&&e!=e}var Gt=Object.prototype.hasOwnProperty;function jt(t,e,n){var r=t[e];Gt.call(t,e)&&Bt(r,n)&&(void 0!==n||e in t)||Ut(t,e,n)}function Ht(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?Ut(n,s,u):jt(n,s,u)}return n}var zt=Math.max;function Ft(t,e){return Lt(function(t,e,n){return e=zt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=zt(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),Ct(t,this,s)}}(t,e,ht),t+"")}function Wt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Yt(t){return null!=t&&Wt(t.length)&&!ft(t)}function qt(t,e,n){if(!it(n))return!1;var r=typeof e;return!!("number"==r?Yt(n)&&Vt(e,n.length):"string"==r&&e in n)&&Bt(n[e],t)}var Xt=Object.prototype;function Zt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Xt)}function Kt(t){return $(t)&&"[object Arguments]"==K(t)}var $t=Object.prototype,Qt=$t.hasOwnProperty,Jt=$t.propertyIsEnumerable,te=Kt(function(){return arguments}())?Kt:function(t){return $(t)&&Qt.call(t,"callee")&&!Jt.call(t,"callee")};var ee="object"==typeof t&&t&&!t.nodeType&&t,ne=ee&&"object"==typeof module&&module&&!module.nodeType&&module,re=ne&&ne.exports===ee?H.Buffer:void 0,ie=(re?re.isBuffer:void 0)||function(){return!1},ae={};function oe(t){return function(e){return t(e)}}ae["[object Float32Array]"]=ae["[object Float64Array]"]=ae["[object Int8Array]"]=ae["[object Int16Array]"]=ae["[object Int32Array]"]=ae["[object Uint8Array]"]=ae["[object Uint8ClampedArray]"]=ae["[object Uint16Array]"]=ae["[object Uint32Array]"]=!0,ae["[object Arguments]"]=ae["[object Array]"]=ae["[object ArrayBuffer]"]=ae["[object Boolean]"]=ae["[object DataView]"]=ae["[object Date]"]=ae["[object Error]"]=ae["[object Function]"]=ae["[object Map]"]=ae["[object Number]"]=ae["[object Object]"]=ae["[object RegExp]"]=ae["[object Set]"]=ae["[object String]"]=ae["[object WeakMap]"]=!1;var se="object"==typeof t&&t&&!t.nodeType&&t,ue=se&&"object"==typeof module&&module&&!module.nodeType&&module,ce=ue&&ue.exports===se&&G.process,le=function(){try{var t=ue&&ue.require&&ue.require("util").types;return t||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),he=le&&le.isTypedArray,fe=he?oe(he):function(t){return $(t)&&Wt(t.length)&&!!ae[K(t)]},de=Object.prototype.hasOwnProperty;function pe(t,e){var n=tt(t),r=!n&&te(t),i=!n&&!r&&ie(t),a=!n&&!r&&!i&&fe(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 c in t)!e&&!de.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Vt(c,u))||s.push(c);return s}function ge(t,e){return function(n){return t(e(n))}}var ve=ge(Object.keys,Object),me=Object.prototype.hasOwnProperty;function ye(t){return Yt(t)?pe(t):function(t){if(!Zt(t))return ve(t);var e=[];for(var n in Object(t))me.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var _e=Object.prototype.hasOwnProperty;function be(t){if(!it(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Zt(t),n=[];for(var r in t)("constructor"!=r||!e&&_e.call(t,r))&&n.push(r);return n}function xe(t){return Yt(t)?pe(t,!0):be(t)}var we=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ee=/^\w*$/;function Se(t,e){if(tt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Q(t))||(Ee.test(t)||!we.test(t)||null!=e&&t in Object(e))}var Oe=Ot(Object,"create");var Te=Object.prototype.hasOwnProperty;var Me=Object.prototype.hasOwnProperty;function Ae(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 Ce(t,e){for(var n=t.length;n--;)if(Bt(t[n][0],e))return n;return-1}Ae.prototype.clear=function(){this.__data__=Oe?Oe(null):{},this.size=0},Ae.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ae.prototype.get=function(t){var e=this.__data__;if(Oe){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Te.call(e,t)?e[t]:void 0},Ae.prototype.has=function(t){var e=this.__data__;return Oe?void 0!==e[t]:Me.call(e,t)},Ae.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Oe&&void 0===e?"__lodash_hash_undefined__":e,this};var Pe=Array.prototype.splice;function De(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])}}De.prototype.clear=function(){this.__data__=[],this.size=0},De.prototype.delete=function(t){var e=this.__data__,n=Ce(e,t);return!(n<0)&&(n==e.length-1?e.pop():Pe.call(e,n,1),--this.size,!0)},De.prototype.get=function(t){var e=this.__data__,n=Ce(e,t);return n<0?void 0:e[n][1]},De.prototype.has=function(t){return Ce(this.__data__,t)>-1},De.prototype.set=function(t,e){var n=this.__data__,r=Ce(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ke=Ot(H,"Map");function Le(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 Re(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])}}Re.prototype.clear=function(){this.size=0,this.__data__={hash:new Ae,map:new(ke||De),string:new Ae}},Re.prototype.delete=function(t){var e=Le(this,t).delete(t);return this.size-=e?1:0,e},Re.prototype.get=function(t){return Le(this,t).get(t)},Re.prototype.has=function(t){return Le(this,t).has(t)},Re.prototype.set=function(t,e){var n=Le(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Ie(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(Ie.Cache||Re),n}Ie.Cache=Re;var Ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ve=/\\(\\)?/g,Ue=function(t){var e=Ie(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(Ne,(function(t,n,r,i){e.push(r?i.replace(Ve,"$1"):n||t)})),e}));function Be(t){return null==t?"":rt(t)}function Ge(t,e){return tt(t)?t:Se(t,e)?[t]:Ue(Be(t))}function je(t){if("string"==typeof t||Q(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function He(t,e){for(var n=0,r=(e=Ge(e,t)).length;null!=t&&n<r;)t=t[je(e[n++])];return n&&n==r?t:void 0}function ze(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Fe=z?z.isConcatSpreadable:void 0;function We(t){return tt(t)||te(t)||!!(Fe&&t&&t[Fe])}var Ye=ge(Object.getPrototypeOf,Object),qe=Function.prototype,Xe=Object.prototype,Ze=qe.toString,Ke=Xe.hasOwnProperty,$e=Ze.call(Object);var Qe=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Je=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var en=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var nn=/[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",an="["+rn+"]",on="\\d+",sn="[\\u2700-\\u27bf]",un="[a-z\\xdf-\\xf6\\xf8-\\xff]",cn="[^\\ud800-\\udfff"+rn+on+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ln="(?:\\ud83c[\\udde6-\\uddff]){2}",hn="[\\ud800-\\udbff][\\udc00-\\udfff]",fn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",dn="(?:"+un+"|"+cn+")",pn="(?:"+fn+"|"+cn+")",gn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",vn="[\\ufe0e\\ufe0f]?"+gn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",ln,hn].join("|")+")[\\ufe0e\\ufe0f]?"+gn+")*"),mn="(?:"+[sn,ln,hn].join("|")+")"+vn,yn=RegExp([fn+"?"+un+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[an,fn,"$"].join("|")+")",pn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[an,fn+dn,"$"].join("|")+")",fn+"?"+dn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",fn+"+(?:['’](?: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_])",on,mn].join("|"),"g");function _n(t,e,n){return t=Be(t),void 0===(e=n?void 0:e)?function(t){return nn.test(t)}(t)?function(t){return t.match(yn)||[]}(t):function(t){return t.match(en)||[]}(t):t.match(e)||[]}var bn=RegExp("['’]","g");function xn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=lt(n))==n?n:0),void 0!==e&&(e=(e=lt(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}(lt(t),e,n)}function wn(t){var e=this.__data__=new De(t);this.size=e.size}wn.prototype.clear=function(){this.__data__=new De,this.size=0},wn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},wn.prototype.get=function(t){return this.__data__.get(t)},wn.prototype.has=function(t){return this.__data__.has(t)},wn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof De){var r=n.__data__;if(!ke||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Re(r)}return n.set(t,e),this.size=n.size,this};var En="object"==typeof t&&t&&!t.nodeType&&t,Sn=En&&"object"==typeof module&&module&&!module.nodeType&&module,On=Sn&&Sn.exports===En?H.Buffer:void 0,Tn=On?On.allocUnsafe:void 0;function Mn(t,e){if(e)return t.slice();var n=t.length,r=Tn?Tn(n):new t.constructor(n);return t.copy(r),r}function An(){return[]}var Cn=Object.prototype.propertyIsEnumerable,Pn=Object.getOwnPropertySymbols,Dn=Pn?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}(Pn(t),(function(e){return Cn.call(t,e)})))}:An;var kn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ze(e,Dn(t)),t=Ye(t);return e}:An;function Ln(t,e,n){var r=e(t);return tt(t)?r:ze(r,n(t))}function Rn(t){return Ln(t,ye,Dn)}function In(t){return Ln(t,xe,kn)}var Nn=Ot(H,"DataView"),Vn=Ot(H,"Promise"),Un=Ot(H,"Set"),Bn=mt(Nn),Gn=mt(ke),jn=mt(Vn),Hn=mt(Un),zn=mt(Tt),Fn=K;(Nn&&"[object DataView]"!=Fn(new Nn(new ArrayBuffer(1)))||ke&&"[object Map]"!=Fn(new ke)||Vn&&"[object Promise]"!=Fn(Vn.resolve())||Un&&"[object Set]"!=Fn(new Un)||Tt&&"[object WeakMap]"!=Fn(new Tt))&&(Fn=function(t){var e=K(t),n="[object Object]"==e?t.constructor:void 0,r=n?mt(n):"";if(r)switch(r){case Bn:return"[object DataView]";case Gn:return"[object Map]";case jn:return"[object Promise]";case Hn:return"[object Set]";case zn:return"[object WeakMap]"}return e});var Wn=Fn,Yn=Object.prototype.hasOwnProperty;var qn=H.Uint8Array;function Xn(t){var e=new t.constructor(t.byteLength);return new qn(e).set(new qn(t)),e}var Zn=/\w*$/;var Kn=z?z.prototype:void 0,$n=Kn?Kn.valueOf:void 0;function Qn(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Jn(t,e,n){var r,i,a,o=t.constructor;switch(e){case"[object ArrayBuffer]":return Xn(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return function(t,e){var n=e?Xn(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 Qn(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,Zn.exec(i))).lastIndex=i.lastIndex,a;case"[object Set]":return new o;case"[object Symbol]":return r=t,$n?Object($n.call(r)):{}}}function tr(t){return"function"!=typeof t.constructor||Zt(t)?{}:At(Ye(t))}var er=le&&le.isMap,nr=er?oe(er):function(t){return $(t)&&"[object Map]"==Wn(t)};var rr=le&&le.isSet,ir=rr?oe(rr):function(t){return $(t)&&"[object Set]"==Wn(t)},ar={};function or(t,e,n,r,i,a){var o,s=1&e,u=2&e,c=4&e;if(n&&(o=i?n(t,r,i,a):n(t)),void 0!==o)return o;if(!it(t))return t;var l=tt(t);if(l){if(o=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Yn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Pt(t,o)}else{var h=Wn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(ie(t))return Mn(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(o=u||f?{}:tr(t),!s)return u?function(t,e){return Ht(t,kn(t),e)}(t,function(t,e){return t&&Ht(e,xe(e),t)}(o,t)):function(t,e){return Ht(t,Dn(t),e)}(t,function(t,e){return t&&Ht(e,ye(e),t)}(o,t))}else{if(!ar[h])return i?t:{};o=Jn(t,h,s)}}a||(a=new wn);var d=a.get(t);if(d)return d;a.set(t,o),ir(t)?t.forEach((function(r){o.add(or(r,e,n,r,t,a))})):nr(t)&&t.forEach((function(r,i){o.set(i,or(r,e,n,i,t,a))}));var p=c?u?In:Rn:u?keysIn:ye,g=l?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]),jt(o,i,or(r,e,n,i,t,a))})),o}ar["[object Arguments]"]=ar["[object Array]"]=ar["[object ArrayBuffer]"]=ar["[object DataView]"]=ar["[object Boolean]"]=ar["[object Date]"]=ar["[object Float32Array]"]=ar["[object Float64Array]"]=ar["[object Int8Array]"]=ar["[object Int16Array]"]=ar["[object Int32Array]"]=ar["[object Map]"]=ar["[object Number]"]=ar["[object Object]"]=ar["[object RegExp]"]=ar["[object Set]"]=ar["[object String]"]=ar["[object Symbol]"]=ar["[object Uint8Array]"]=ar["[object Uint8ClampedArray]"]=ar["[object Uint16Array]"]=ar["[object Uint32Array]"]=!0,ar["[object Error]"]=ar["[object Function]"]=ar["[object WeakMap]"]=!1;function sr(t){return or(t,5)}function ur(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Re;++e<n;)this.add(t[e])}function cr(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 lr(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 hr(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 c=a.get(t);if(c&&a.get(e))return c==e;var l=-1,h=!0,f=2&n?new ur:void 0;for(a.set(t,e),a.set(e,t);++l<s;){var d=t[l],p=e[l];if(r)var g=o?r(p,d,l,e,t,a):r(d,p,l,t,e,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!cr(e,(function(t,e){if(!lr(f,e)&&(d===t||i(d,t,n,r,a)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function fr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function dr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var pr=z?z.prototype:void 0,gr=pr?pr.valueOf:void 0;var vr=Object.prototype.hasOwnProperty;var mr=Object.prototype.hasOwnProperty;function yr(t,e,n,r,i,a){var o=tt(t),s=tt(e),u=o?"[object Array]":Wn(t),c=s?"[object Array]":Wn(e),l="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f=u==c;if(f&&ie(t)){if(!ie(e))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new wn),o||fe(t)?hr(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 qn(t),new qn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Bt(+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=fr;case"[object Set]":var u=1&r;if(s||(s=dr),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var l=hr(s(t),s(e),r,i,a,o);return o.delete(t),l;case"[object Symbol]":if(gr)return gr.call(t)==gr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(1&n)){var d=l&&mr.call(t,"__wrapped__"),p=h&&mr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return a||(a=new wn),i(g,v,n,r,a)}}return!!f&&(a||(a=new wn),function(t,e,n,r,i,a){var o=1&n,s=Rn(t),u=s.length;if(u!=Rn(e).length&&!o)return!1;for(var c=u;c--;){var l=s[c];if(!(o?l in e:vr.call(e,l)))return!1}var h=a.get(t);if(h&&a.get(e))return h==e;var f=!0;a.set(t,e),a.set(e,t);for(var d=o;++c<u;){var p=t[l=s[c]],g=e[l];if(r)var v=o?r(g,p,l,e,t,a):r(p,g,l,t,e,a);if(!(void 0===v?p===g||i(p,g,n,r,a):v)){f=!1;break}d||(d="constructor"==l)}if(f&&!d){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)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}function _r(t,e,n,r,i){return t===e||(null==t||null==e||!$(t)&&!$(e)?t!=t&&e!=e:yr(t,e,n,r,_r,i))}function br(t){return t==t&&!it(t)}function xr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function wr(t){var e=function(t){for(var e=ye(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,br(i)]}return e}(t);return 1==e.length&&e[0][2]?xr(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],c=t[u],l=s[1];if(o&&s[2]){if(void 0===c&&!(u in t))return!1}else{var h=new wn;if(r)var f=r(c,l,u,t,e,h);if(!(void 0===f?_r(l,c,3,r,h):f))return!1}}return!0}(n,t,e)}}function Er(t,e){return null!=t&&e in Object(t)}function Sr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Ge(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)&&Wt(i)&&Vt(o,i)&&(tt(t)||te(t))}(t,e,Er)}function Or(t,e){return Se(t)&&br(e)?xr(je(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:He(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Sr(n,t):_r(e,r,3)}}function Tr(t){return Se(t)?(e=je(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return He(e,t)}}(t);var e}function Mr(t){return"function"==typeof t?t:null==t?ht:"object"==typeof t?tt(t)?Or(t[0],t[1]):wr(t):Tr(t)}var Ar,Cr=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[Ar?o:++r];if(!1===e(i[s],s,i))break}return t};var Pr=function(t,e){return function(n,r){if(null==n)return n;if(!Yt(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&&Cr(t,e,ye)})),Dr=function(){return H.Date.now()},kr=Math.max,Lr=Math.min;function Rr(t,e,n){var r,i,a,o,s,u,c=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,a=i;return r=i=void 0,c=e,o=t.apply(a,n)}function p(t){return c=t,s=setTimeout(v,e),l?d(t):o}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=a}function v(){var t=Dr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Lr(n,a-(t-c)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,o)}function y(){var t=Dr(),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),d(u)}return void 0===s&&(s=setTimeout(v,e)),o}return e=lt(e)||0,it(n)&&(l=!!n.leading,a=(h="maxWait"in n)?kr(lt(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?o:m(Dr())},y}function Ir(t,e,n){(void 0===n||Bt(t[e],n))&&(void 0!==n||e in t)||Ut(t,e,n)}function Nr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Vr(t,e,n,r,i,a,o){var s=Nr(t,n),u=Nr(e,n),c=o.get(u);if(c)Ir(t,n,c);else{var l,h=a?a(s,u,n+"",t,e,o):void 0,f=void 0===h;if(f){var d=tt(u),p=!d&&ie(u),g=!d&&!p&&fe(u);h=u,d||p||g?tt(s)?h=s:$(l=s)&&Yt(l)?h=Pt(s):p?(f=!1,h=Mn(u,!0)):g?(f=!1,h=Qn(u,!0)):h=[]:function(t){if(!$(t)||"[object Object]"!=K(t))return!1;var e=Ye(t);if(null===e)return!0;var n=Ke.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ze.call(n)==$e}(u)||te(u)?(h=s,te(s)?h=function(t){return Ht(t,xe(t))}(s):it(s)&&!ft(s)||(h=tr(u))):f=!1}f&&(o.set(u,h),i(h,u,r,a,o),o.delete(u)),Ir(t,n,h)}}function Ur(t,e,n,r,i){t!==e&&Cr(e,(function(a,o){if(i||(i=new wn),it(a))Vr(t,e,o,n,Ur,r,i);else{var s=r?r(Nr(t,o),a,o+"",t,e,i):void 0;void 0===s&&(s=a),Ir(t,o,s)}}),xe)}function Br(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 Gr(t,e){var n=-1,r=Yt(t)?Array(t.length):[];return Pr(t,(function(t,i,a){r[++n]=e(t,i,a)})),r}function jr(t,e){return function t(e,n,r,i,a){var o=-1,s=e.length;for(r||(r=We),a||(a=[]);++o<s;){var u=e[o];n>0&&r(u)?n>1?t(u,n-1,r,i,a):ze(a,u):i||(a[a.length]=u)}return a}(function(t,e){return(tt(t)?J:Gr)(t,Mr(e))}(t,e),1/0)}function Hr(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}function zr(t,e){return _r(t,e)}var Fr,Wr,Yr=(Fr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){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}(_n(function(t){return(t=Be(t))&&t.replace(Je,Qe).replace(tn,"")}(t).replace(bn,"")),Fr,"")}),qr=(Wr=function(t,e,n){Ur(t,e,n)},Ft((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=Wr.length>3&&"function"==typeof i?(r--,i):void 0,a&&qt(e[0],e[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var o=e[n];o&&Wr(t,o,n,i)}return t})));function Xr(t,e){var n;return Pr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Zr(t,e,n){var r=tt(t)?cr:Xr;return n&&qt(t,e,n)&&(e=void 0),r(t,Mr(e))}var Kr=Un&&1/dr(new Un([,-0]))[1]==1/0?function(t){return new Un(t)}:function(){};function $r(t){return t&&t.length?function(t,e,n){var r=-1,i=It,a=t.length,o=!0,s=[],u=s;if(n)o=!1,i=Br;else if(a>=200){var c=e?null:Kr(t);if(c)return dr(c);o=!1,i=lr,u=new ur}else u=e?[]:s;t:for(;++r<a;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,o&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}(t):[]}var Qr="http://www.w3.org/1999/xhtml",Jr={svg:"http://www.w3.org/2000/svg",xhtml:Qr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ti(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Jr.hasOwnProperty(e)?{space:Jr[e],local:t}:t}function ei(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Qr&&e.documentElement.namespaceURI===Qr?e.createElement(t):e.createElementNS(n,t)}}function ni(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ri(t){var e=ti(t);return(e.local?ni:ei)(e)}function ii(){}function ai(t){return null==t?ii:function(){return this.querySelector(t)}}function oi(){return[]}function si(t){return null==t?oi:function(){return this.querySelectorAll(t)}}function ui(t){return function(){return this.matches(t)}}function ci(t){return new Array(t.length)}function li(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}li.prototype={constructor:li,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 hi(t,e,n,r,i,a){for(var o,s=0,u=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new li(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function fi(t,e,n,r,i,a,o){var s,u,c,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=c="$"+o.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<f;++s)(u=l[c="$"+o.call(t,a[s],s,a)])?(r[s]=u,u.__data__=a[s],l[c]=null):n[s]=new li(t,a[s]);for(s=0;s<h;++s)(u=e[s])&&l[d[s]]===u&&(i[s]=u)}function di(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function pi(t){return function(){this.removeAttribute(t)}}function gi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vi(t,e){return function(){this.setAttribute(t,e)}}function mi(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function yi(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function _i(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 bi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function xi(t){return function(){this.style.removeProperty(t)}}function wi(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ei(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Si(t,e){return t.style.getPropertyValue(e)||bi(t).getComputedStyle(t,null).getPropertyValue(e)}function Oi(t){return function(){delete this[t]}}function Ti(t,e){return function(){this[t]=e}}function Mi(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ai(t){return t.trim().split(/^|\s+/)}function Ci(t){return t.classList||new Pi(t)}function Pi(t){this._node=t,this._names=Ai(t.getAttribute("class")||"")}function Di(t,e){for(var n=Ci(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ki(t,e){for(var n=Ci(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Li(t){return function(){Di(this,t)}}function Ri(t){return function(){ki(this,t)}}function Ii(t,e){return function(){(e.apply(this,arguments)?Di:ki)(this,t)}}function Ni(){this.textContent=""}function Vi(t){return function(){this.textContent=t}}function Ui(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Bi(){this.innerHTML=""}function Gi(t){return function(){this.innerHTML=t}}function ji(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Hi(){this.nextSibling&&this.parentNode.appendChild(this)}function zi(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Fi(){return null}function Wi(){var t=this.parentNode;t&&t.removeChild(this)}function Yi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function qi(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Pi.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 Xi={},Zi=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Xi={mouseenter:"mouseover",mouseleave:"mouseout"}));function Ki(t,e,n){return t=$i(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function $i(t,e,n){return function(r){var i=Zi;Zi=r;try{t.call(this,this.__data__,e,n)}finally{Zi=i}}}function Qi(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 Ji(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 ta(t,e,n){var r=Xi.hasOwnProperty(t.type)?Ki:$i;return function(i,a,o){var s,u=this.__on,c=r(e,a,o);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function ea(t,e,n){var r=bi(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 na(t,e){return function(){return ea(this,t,e)}}function ra(t,e){return function(){return ea(this,t,e.apply(this,arguments))}}var ia,aa=[null];function oa(t,e){this._groups=t,this._parents=e}function sa(){return new oa([[document.documentElement]],aa)}function ua(t){return"string"==typeof t?new oa([[document.querySelector(t)]],[document.documentElement]):new oa([[t]],aa)}function ca(){for(var t,e=Zi;t=e.sourceEvent;)e=t;return e}function la(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 ha(t){var e=ca();return e.changedTouches&&(e=e.changedTouches[0]),la(t,e)}function fa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function da(t,e){return t(e={exports:{}},e.exports),e.exports}oa.prototype=sa.prototype={constructor:oa,select:function(t){"function"!=typeof t&&(t=ai(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,c=r[i]=new Array(u),l=0;l<u;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),c[l]=o);return new oa(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=si(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,c=0;c<u;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new oa(r,i)},filter:function(t){"function"!=typeof t&&(t=ui(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]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new oa(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n=e?fi:hi,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),c=0;c<a;++c){var l=r[c],h=i[c],f=h.length,d=t.call(l,l&&l.__data__,c,r),p=d.length,g=s[c]=new Array(p),v=o[c]=new Array(p);n(l,h,g,v,u[c]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(o=new oa(o,r))._enter=s,o._exit=u,o},enter:function(){return new oa(this._enter||this._groups.map(ci),this._parents)},exit:function(){return new oa(this._exit||this._groups.map(ci),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,c=e[s],l=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new oa(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=di);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,c=i[a]=new Array(u),l=0;l<u;++l)(o=s[l])&&(c[l]=o);c.sort(e)}return new oa(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=ti(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?gi:pi:"function"==typeof e?n.local?_i:yi:n.local?mi:vi)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?xi:"function"==typeof e?Ei:wi)(t,e,null==n?"":n)):Si(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Oi:"function"==typeof e?Mi:Ti)(t,e)):this.node()[t]},classed:function(t,e){var n=Ai(t+"");if(arguments.length<2){for(var r=Ci(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Ii:e?Li:Ri)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ni:("function"==typeof t?Ui:Vi)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Bi:("function"==typeof t?ji:Gi)(t)):this.node().innerHTML},raise:function(){return this.each(Hi)},lower:function(){return this.each(zi)},append:function(t){var e="function"==typeof t?t:ri(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ri(t),r=null==e?Fi:"function"==typeof e?e:ai(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Wi)},clone:function(t){return this.select(t?qi:Yi)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Qi(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?ta:Ji,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,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];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?ra:na)(t,e))}},function(t){t.debounce=Rr,t.clone=sr,t.merge=qr,t.removeArrayDuplicates=$r,t.clamp=xn,t.isEqual=zr,t.flatMapDeep=jr,t.kebabCase=Yr,t.fromPairs=Hr,t.some=Zr,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,a=arguments;i.mousePosition=ha(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,a)}),e)}},t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)if(r.includes(i)){var a=n.axes[i];(a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var o=a.mapsTo;if(null==o){var s=a.scaleType;null==s?a.mapsTo="value":s===S.TIME?a.mapsTo="date":s===S.LABELS&&(a.mapsTo="key")}}else delete e.axes[i];return t.merge(e,n)},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===w.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===w.FRONT_LINE?"..."+t.substr(-n):e===w.END_LINE?t.substr(0,n)+"...":void 0},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===E.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===E.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(ia||(ia={}));var pa=da((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}));fa(pa);var ga=da((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}));fa(ga);var va=da((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ga)&&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}));fa(va);var ma=da((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}));fa(ma);var ya=da((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}));fa(ya);var _a=da((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ya)&&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}));fa(_a);var ba=da((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}));fa(ba);var xa=da((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,c=s[0],l=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}},t.exports=e.default}));fa(xa);var wa=da((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(ba),r=i(xa);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}));fa(wa);var Ea=fa(da((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(pa),r=s(va),i=s(ma),a=s(_a),o=s(wa);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}))),Sa={type:w.END_LINE,threshold:16,numCharacter:14},Oa={enabled:!0,position:T.BOTTOM,clickable:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4},truncation:Sa,alignment:M.LEFT},Ta={x:{numberOfTicks:5},y:{numberOfTicks:5}},Ma={horizontalOffset:10,showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:Sa},Aa={top:{includeZero:!0,truncation:Sa},bottom:{includeZero:!0,truncation:Sa},left:{includeZero:!0,truncation:Sa},right:{includeZero:!0,truncation:Sa}},Ca={addSpaceOnEdges:1,showDayName:!1,localeObject:Ea,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"}}},Pa={width:null,height:null,resizable:!0,tooltip:Ma,legend:Oa,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null}},Da=ia.merge({},Pa,{axes:Aa,timeScale:Ca,grid:Ta,zoomBar:{top:{enabled:!1}}}),ka=ia.merge({},Da,{bars:{maxWidth:16},timeScale:ia.merge(Ca,{addSpaceOnEdges:1})}),La=ia.merge({},ka,{}),Ra=ia.merge({},ka,{}),Ia=ia.merge({},ka,{bars:ia.merge({},ka.bars,{dividerSize:1.5})}),Na=ia.merge({},Da,{points:{radius:3,filled:!1}}),Va=ia.merge({},Na,{timeScale:ia.merge(Ca,{addSpaceOnEdges:0})}),Ua=Va,Ba=ia.merge({},Da,{points:{radius:4,fillOpacity:.3,filled:!0}}),Ga=ia.merge({},Da,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),ja=ia.merge({},Pa,{pie:{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},labels:{formatter:null},alignment:M.LEFT}}),Ha=ia.merge({},Pa,{legend:{enabled:!1},gauge:{type:I.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},status:null,numberSpacing:10,deltaFontSize:function(t){return t/8},valueFontSize:function(t){return t/2.5},numberFormatter:function(t){return t.toFixed(2)%1!=0?t.toFixed(2).toLocaleString():t.toFixed().toLocaleString()}}}),za={chart:Pa,axisChart:Da,simpleBarChart:La,groupedBarChart:Ra,stackedBarChart:Ia,bubbleChart:Ga,lineChart:Na,areaChart:Va,stackedAreaChart:Ua,scatterChart:Ba,pieChart:ja,donutChart:ia.merge({},ja,{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:M.LEFT}}),meterChart:ia.merge({},Pa,{legend:{enabled:!1},meter:{height:8,statusBar:{paddingRight:5,percentageIndicator:{enabled:!0}},status:{indicatorSize:16,paddingLeft:15}}}),radarChart:ia.merge({},Pa,{radar:{axes:{angle:"key",value:"value"},opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5,alignment:M.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:Ha},Fa={opacity:{unselected:.3,selected:1}},Wa={opacity:{unselected:0,selected:.4}},Ya={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}},qa={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},Xa={default:{size:24}},Za={height:32,spacerHeight:20},Ka=Object.freeze({__proto__:null,legend:Oa,grid:Ta,baseTooltip:Ma,timeScale:Ca,options:za,lines:Fa,area:Wa,areas:{opacity:{unselected:.3,selected:1}},transitions:Ya,axis:qa,spacers:Xa,zoomBar:Za,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),$a={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},Qa={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},Ja={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},to={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},eo={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},no={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},ro={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},io=function(t,e){return t[e]},ao=function(t){return io(to,t)},oo=function(t){return io(eo,t)},so=function(t){return io(ro,t)},uo=function(t){return io(Qa,t)},co=function(t){return io(Ja,t)},lo=function(t){return io($a,t)},ho=function(t){return io(no,t)},fo=[co(70),oo(50),ho(70),uo(70),lo(50),lo(90),so(60),ao(80),uo(50),"#b28600",ho(50),oo(90),"#8a3800",co(50)],po=[co(60),oo(40),ho(60),uo(40),lo(50),lo(10),so(30),ao(50),uo(60),"#d2a106",ho(40),oo(20),"#ba4e00",co(30)],go=fo,vo=po,mo=po,yo=fo,_o=Object.freeze({__proto__:null,WHITE:fo,DARK:po,G10:go,G90:vo,G100:mo,DEFAULT:yo});function bo(){}function xo(t,e){var n=new bo;if(t instanceof bo)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 wo(){}bo.prototype=xo.prototype={constructor:bo,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 Eo=xo.prototype;function So(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Oo(t){var e;return 1===t.length&&(e=t,t=function(t,n){return So(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}}}wo.prototype=function(t,e){var n=new wo;if(t instanceof wo)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:wo,has:Eo.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Eo.remove,clear:Eo.clear,values:Eo.keys,size:Eo.size,empty:Eo.empty,each:Eo.each};var To=Oo(So).right;function Mo(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 Ao(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 Co=Math.sqrt(50),Po=Math.sqrt(10),Do=Math.sqrt(2);function ko(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=Lo(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 Lo(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>=Co?10:a>=Po?5:a>=Do?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Co?10:a>=Po?5:a>=Do?2:1)}function Ro(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>=Co?i*=10:a>=Po?i*=5:a>=Do&&(i*=2),e<t?-i:i}function Io(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 No(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Vo=Array.prototype,Uo=Vo.map,Bo=Vo.slice,Go={name:"implicit"};function jo(){var t=xo(),e=[],n=[],r=Go;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Go)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=Bo.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return jo(e,n).unknown(r)},No.apply(i,arguments),i}function Ho(){var t,e,n=jo().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*u),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*c,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=Ao(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return Ho(r(),a).round(o).paddingInner(s).paddingOuter(u).align(c)},No.apply(l(),arguments)}function zo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Fo(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Wo(){}var Yo="\\s*([+-]?\\d+)\\s*",qo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zo=/^#([0-9a-f]{3,8})$/,Ko=new RegExp("^rgb\\("+[Yo,Yo,Yo]+"\\)$"),$o=new RegExp("^rgb\\("+[Xo,Xo,Xo]+"\\)$"),Qo=new RegExp("^rgba\\("+[Yo,Yo,Yo,qo]+"\\)$"),Jo=new RegExp("^rgba\\("+[Xo,Xo,Xo,qo]+"\\)$"),ts=new RegExp("^hsl\\("+[qo,Xo,Xo]+"\\)$"),es=new RegExp("^hsla\\("+[qo,Xo,Xo,qo]+"\\)$"),ns={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 as(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Zo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?os(e):3===n?new ls(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new ls(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new ls(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=Ko.exec(t))?new ls(e[1],e[2],e[3],1):(e=$o.exec(t))?new ls(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Qo.exec(t))?ss(e[1],e[2],e[3],e[4]):(e=Jo.exec(t))?ss(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ts.exec(t))?ps(e[1],e[2]/100,e[3]/100,1):(e=es.exec(t))?ps(e[1],e[2]/100,e[3]/100,e[4]):ns.hasOwnProperty(t)?os(ns[t]):"transparent"===t?new ls(NaN,NaN,NaN,0):null}function os(t){return new ls(t>>16&255,t>>8&255,255&t,1)}function ss(t,e,n,r){return r<=0&&(t=e=n=NaN),new ls(t,e,n,r)}function us(t){return t instanceof Wo||(t=as(t)),t?new ls((t=t.rgb()).r,t.g,t.b,t.opacity):new ls}function cs(t,e,n,r){return 1===arguments.length?us(t):new ls(t,e,n,null==r?1:r)}function ls(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function hs(){return"#"+ds(this.r)+ds(this.g)+ds(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 ds(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ps(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new vs(t,e,n,r)}function gs(t){if(t instanceof vs)return new vs(t.h,t.s,t.l,t.opacity);if(t instanceof Wo||(t=as(t)),!t)return new vs;if(t instanceof vs)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 vs(o,s,u,t.opacity)}function vs(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ms(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 ys(t){return function(){return t}}function _s(t){return 1==(t=+t)?bs: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):ys(isNaN(e)?n:e)}}function bs(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ys(isNaN(t)?e:t)}zo(Wo,as,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rs,formatHex:rs,formatHsl:function(){return gs(this).formatHsl()},formatRgb:is,toString:is}),zo(ls,cs,Fo(Wo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ls(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ls(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})),zo(vs,(function(t,e,n,r){return 1===arguments.length?gs(t):new vs(t,e,n,null==r?1:r)}),Fo(Wo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vs(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vs(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 ls(ms(t>=240?t-240:t+120,i,r),ms(t,i,r),ms(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 xs=function t(e){var n=_s(e);function r(t,e){var r=n((t=cs(t)).r,(e=cs(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=bs(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 ws(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 Es(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]=Ps(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 Ss(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Os(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ts(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]=Ps(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Ms=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,As=new RegExp(Ms.source,"g");function Cs(t,e){var n,r,i,a=Ms.lastIndex=As.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=Ms.exec(t))&&(r=As.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:Os(n,r)})),a=As.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 Ps(t,e){var n,r=typeof e;return null==e||"boolean"===r?ys(e):("number"===r?Os:"string"===r?(n=as(e))?(e=n,xs):Cs:e instanceof as?xs:e instanceof Date?Ss:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?ws:Array.isArray(e)?Es:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ts:Os)(t,e)}function Ds(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var ks,Ls,Rs,Is,Ns=180/Math.PI,Vs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Us(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)*Ns,skewX:Math.atan(u)*Ns,scaleX:o,scaleY:s}}function Bs(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:Os(t,i)},{i:u-2,x:Os(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:Os(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:Os(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:Os(t,n)},{i:s-2,x:Os(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 Gs=Bs((function(t){return"none"===t?Vs:(ks||(ks=document.createElement("DIV"),Ls=document.documentElement,Rs=document.defaultView),ks.style.transform=t,t=Rs.getComputedStyle(Ls.appendChild(ks),null).getPropertyValue("transform"),Ls.removeChild(ks),Us(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),js=Bs((function(t){return null==t?Vs:(Is||(Is=document.createElementNS("http://www.w3.org/2000/svg","g")),Is.setAttribute("transform",t),(t=Is.transform.baseVal.consolidate())?Us((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Vs)}),", ",")",")");function Hs(t){return+t}var zs=[0,1];function Fs(t){return t}function Ws(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Ys(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 qs(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Ws(i,r),a=n(o,a)):(r=Ws(r,i),a=n(a,o)),function(t){return a(r(t))}}function Xs(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]=Ws(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=To(t,e,1,r)-1;return a[n](i[n](e))}}function Zs(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ks(){var t,e,n,r,i,a,o=zs,s=zs,u=Ps,c=Fs;function l(){return r=Math.min(o.length,s.length)>2?Xs:qs,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((a||(a=r(s,o.map(t),Os)))(n)))},h.domain=function(t){return arguments.length?(o=Uo.call(t,Hs),c===Fs||(c=Ys(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=Bo.call(t),l()):s.slice()},h.rangeRound=function(t){return s=Bo.call(t),u=Ds,l()},h.clamp=function(t){return arguments.length?(c=t?Ys(o):Fs,h):c!==Fs},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function $s(t,e){return Ks()(t,e)}function Qs(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 Js(t){return(t=Qs(Math.abs(t)))?t[1]:NaN}var tu,eu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nu(t){if(!(e=eu.exec(t)))throw new Error("invalid format: "+t);var e;return new ru({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 ru(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 iu(t,e){var n=Qs(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")}nu.prototype=ru.prototype,ru.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 au={"%":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 iu(100*t,e)},r:iu,s:function(t,e){var n=Qs(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(tu=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")+Qs(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 ou(t){return t}var su,uu,cu,lu=Array.prototype.map,hu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function fu(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ou:(e=lu.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?ou:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(lu.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=nu(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):au[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?a:/[%p]/.test(y)?u:"",x=au[y],w=/[defgprs%]/.test(y);function E(t){var i,a,u,f=_,E=b;if("c"===y)E=x(t)+E,t="";else{var S=(t=+t)<0;if(t=isNaN(t)?l: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)),S&&0==+t&&(S=!1),f=(S?"("===h?h:c:"-"===h||"("===h?"":h)+f,E=("s"===y?hu[8+tu/3]:"")+E+(S&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){E=(46===u?o+t.slice(i+1):t.slice(i))+E,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var O=f.length+t.length+E.length,T=O<p?new Array(p-O+1).join(e):"";switch(g&&d&&(t=r(T+t,T.length?p-E.length:1/0),T=""),n){case"<":t=f+t+E+T;break;case"=":t=f+T+t+E;break;case"^":t=T.slice(0,O=T.length>>1)+f+t+E+T.slice(O);break;default:t=T+f+t+E}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)),E.toString=function(){return t+""},E}return{format:h,formatPrefix:function(t,e){var n=h(((t=nu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Js(e)/3))),i=Math.pow(10,-r),a=hu[8+r/3];return function(t){return n(i*t)+a}}}}function du(t,e,n,r){var i,a=Ro(t,e,n);switch((r=nu(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(Js(e)/3)))-Js(Math.abs(t)))}(a,o))||(r.precision=i),cu(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,Js(e)-Js(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,-Js(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return uu(r)}function pu(t){var e=t.domain;return t.ticks=function(t){var n=e();return ko(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return du(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=Lo(s,u,n))>0?r=Lo(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Lo(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 gu(){var t=$s(Fs,Fs);return t.copy=function(){return Zs(t,gu())},No.apply(t,arguments),pu(t)}function vu(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 mu(t){return Math.log(t)}function yu(t){return Math.exp(t)}function _u(t){return-Math.log(-t)}function bu(t){return-Math.exp(-t)}function xu(t){return isFinite(t)?+("1e"+t):t<0?0:t}function wu(t){return function(e){return-t(-e)}}function Eu(t){var e,n,r=t(mu,yu),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?xu:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=wu(e),n=wu(n),t(_u,bu)):t(mu,yu),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)&&(f=s,s=u,u=f);var c,l,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,c=n(f);l<a;++l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(l=a-1,c=n(f);l>=1;--l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else g=ko(f,d,Math.min(d-f,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(vu(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}su=fu({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),uu=su.format,cu=su.formatPrefix;var Su=new Date,Ou=new Date;function Tu(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 Tu((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 Su.setTime(+e),Ou.setTime(+r),t(Su),t(Ou),Math.floor(n(Su,Ou))},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 Mu=Tu((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Mu.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Tu((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Mu:null};var Au=Tu((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()})),Cu=Tu((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()})),Pu=Tu((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()})),Du=Tu((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 ku(t){return Tu((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 Lu=ku(0),Ru=ku(1),Iu=(ku(2),ku(3),ku(4)),Nu=(ku(5),ku(6),Tu((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()}))),Vu=Tu((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()}));Vu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Tu((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 Uu=Tu((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 Bu(t){return Tu((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 Gu=Bu(0),ju=Bu(1),Hu=(Bu(2),Bu(3),Bu(4)),zu=(Bu(5),Bu(6),Tu((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 Fu(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 Wu(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 Yu(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}zu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Tu((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 qu,Xu,Zu={"-":"",_:" ",0:"0"},Ku=/^\s*\d+/,$u=/^%/,Qu=/[\\^$*+?|[\]().{}]/g;function Ju(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 tc(t){return t.replace(Qu,"\\$&")}function ec(t){return new RegExp("^(?:"+t.map(tc).join("|")+")","i")}function nc(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function rc(t,e,n){var r=Ku.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ic(t,e,n){var r=Ku.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function ac(t,e,n){var r=Ku.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function oc(t,e,n){var r=Ku.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function sc(t,e,n){var r=Ku.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function uc(t,e,n){var r=Ku.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function cc(t,e,n){var r=Ku.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function lc(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 hc(t,e,n){var r=Ku.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function fc(t,e,n){var r=Ku.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function dc(t,e,n){var r=Ku.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function pc(t,e,n){var r=Ku.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function gc(t,e,n){var r=Ku.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function vc(t,e,n){var r=Ku.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function mc(t,e,n){var r=Ku.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function yc(t,e,n){var r=Ku.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function _c(t,e,n){var r=Ku.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function bc(t,e,n){var r=$u.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function xc(t,e,n){var r=Ku.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function wc(t,e,n){var r=Ku.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ec(t,e){return Ju(t.getDate(),e,2)}function Sc(t,e){return Ju(t.getHours(),e,2)}function Oc(t,e){return Ju(t.getHours()%12||12,e,2)}function Tc(t,e){return Ju(1+Du.count(Vu(t),t),e,3)}function Mc(t,e){return Ju(t.getMilliseconds(),e,3)}function Ac(t,e){return Mc(t,e)+"000"}function Cc(t,e){return Ju(t.getMonth()+1,e,2)}function Pc(t,e){return Ju(t.getMinutes(),e,2)}function Dc(t,e){return Ju(t.getSeconds(),e,2)}function kc(t){var e=t.getDay();return 0===e?7:e}function Lc(t,e){return Ju(Lu.count(Vu(t)-1,t),e,2)}function Rc(t,e){var n=t.getDay();return t=n>=4||0===n?Iu(t):Iu.ceil(t),Ju(Iu.count(Vu(t),t)+(4===Vu(t).getDay()),e,2)}function Ic(t){return t.getDay()}function Nc(t,e){return Ju(Ru.count(Vu(t)-1,t),e,2)}function Vc(t,e){return Ju(t.getFullYear()%100,e,2)}function Uc(t,e){return Ju(t.getFullYear()%1e4,e,4)}function Bc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ju(e/60|0,"0",2)+Ju(e%60,"0",2)}function Gc(t,e){return Ju(t.getUTCDate(),e,2)}function jc(t,e){return Ju(t.getUTCHours(),e,2)}function Hc(t,e){return Ju(t.getUTCHours()%12||12,e,2)}function zc(t,e){return Ju(1+Uu.count(zu(t),t),e,3)}function Fc(t,e){return Ju(t.getUTCMilliseconds(),e,3)}function Wc(t,e){return Fc(t,e)+"000"}function Yc(t,e){return Ju(t.getUTCMonth()+1,e,2)}function qc(t,e){return Ju(t.getUTCMinutes(),e,2)}function Xc(t,e){return Ju(t.getUTCSeconds(),e,2)}function Zc(t){var e=t.getUTCDay();return 0===e?7:e}function Kc(t,e){return Ju(Gu.count(zu(t)-1,t),e,2)}function $c(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Hu(t):Hu.ceil(t),Ju(Hu.count(zu(t),t)+(4===zu(t).getUTCDay()),e,2)}function Qc(t){return t.getUTCDay()}function Jc(t,e){return Ju(ju.count(zu(t)-1,t),e,2)}function tl(t,e){return Ju(t.getUTCFullYear()%100,e,2)}function el(t,e){return Ju(t.getUTCFullYear()%1e4,e,4)}function nl(){return"+0000"}function rl(){return"%"}function il(t){return+t}function al(t){return Math.floor(+t/1e3)}!function(t){qu=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,c=ec(i),l=nc(i),h=ec(a),f=nc(a),d=ec(o),p=nc(o),g=ec(s),v=nc(s),m=ec(u),y=nc(u),_={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:Ac,H:Sc,I:Oc,j:Tc,L:Mc,m:Cc,M:Pc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:il,s:al,S:Dc,u:kc,U:Lc,V:Rc,w:Ic,W:Nc,x:null,X:null,y:Vc,Y:Uc,Z:Bc,"%":rl},b={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:Gc,e:Gc,f:Wc,H:jc,I:Hc,j:zc,L:Fc,m:Yc,M:qc,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:il,s:al,S:Xc,u:Zc,U:Kc,V:$c,w:Qc,W:Jc,x:null,X:null,y:tl,Y:el,Z:nl,"%":rl},x={a:function(t,e,n){var r=d.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=f[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 S(t,e,n,r)},d:dc,e:dc,f:_c,H:gc,I:gc,j:pc,L:yc,m:fc,M:vc,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:hc,Q:xc,s:wc,S:mc,u:ic,U:ac,V:oc,w:rc,W:sc,x:function(t,e,r){return S(t,n,e,r)},X:function(t,e,n){return S(t,r,e,n)},y:cc,Y:uc,Z:lc,"%":bc};function w(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(i=Zu[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 E(t,e){return function(n){var r,i,a=Yu(1900,void 0,1);if(S(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=Wu(Yu(a.y,0,1))).getUTCDay(),r=i>4||0===i?ju.ceil(r):ju(r),r=Uu.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Fu(Yu(a.y,0,1))).getDay(),r=i>4||0===i?Ru.ceil(r):Ru(r),r=Du.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?Wu(Yu(a.y,0,1)).getUTCDay():Fu(Yu(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,Wu(a)):Fu(a)}}function S(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 Zu?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=E(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=E(t+="",!0);return e.toString=function(){return t},e}})}(t),Xu=qu.format,qu.parse,qu.utcFormat,qu.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 ol(t){return new Date(t)}function sl(t){return t instanceof Date?+t:+new Date(+t)}function ul(t,e,n,r,i,a,o,s,u){var c=$s(Fs,Fs),l=c.invert,h=c.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[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?f:a(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(r-n)/e,o=Oo((function(t){return t[2]})).right(b,a);o===b.length?(i=Ro(n/31536e6,r/31536e6,e),e=t):o?(i=(o=b[a/b[o-1][2]<b[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(Ro(n,r,e),1),e=s)}return null==i?e:e.every(i)}return c.invert=function(t){return new Date(l(t))},c.domain=function(t){return arguments.length?h(Uo.call(t,sl)):h().map(ol)},c.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=w(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},c.tickFormat=function(t,e){return null==e?x:u(e)},c.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(vu(n,t)):c},c.copy=function(){return Zs(c,ul(t,e,n,r,i,a,o,s,u))},c}function cl(){return No.apply(ul(Vu,Nu,Lu,Du,Pu,Cu,Au,Mu,Xu).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var ll=Math.PI,hl=2*ll,fl=hl-1e-6;function dl(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pl(){return new dl}function gl(t){return function(){return t}}dl.prototype=pl.prototype={constructor:dl,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,c=a-t,l=o-e,h=c*c+l*l;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(l*s-u*c)>1e-6&&i){var f=n-a,d=r-o,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((ll-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*c)+","+(e+_*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*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,c=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%hl+hl),h>fl?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=ll)+","+l+","+(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 vl=Math.abs,ml=Math.atan2,yl=Math.cos,_l=Math.max,bl=Math.min,xl=Math.sin,wl=Math.sqrt,El=Math.PI,Sl=El/2,Ol=2*El;function Tl(t){return t>1?0:t<-1?El:Math.acos(t)}function Ml(t){return t>=1?Sl:t<=-1?-Sl:Math.asin(t)}function Al(t){return t.innerRadius}function Cl(t){return t.outerRadius}function Pl(t){return t.startAngle}function Dl(t){return t.endAngle}function kl(t){return t&&t.padAngle}function Ll(t,e,n,r,i,a,o,s){var u=n-t,c=r-e,l=o-i,h=s-a,f=h*u-l*c;if(!(f*f<1e-12))return[t+(f=(l*(e-a)-h*(t-i))/f)*u,e+f*c]}function Rl(t,e,n,r,i,a,o){var s=t-n,u=e-r,c=(o?a:-a)/wl(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-a,w=f*g-p*d,E=(_<0?-1:1)*wl(_l(0,x*x*b-w*w)),S=(w*_-y*E)/b,O=(-w*y-_*E)/b,T=(w*_+y*E)/b,M=(-w*y+_*E)/b,A=S-v,C=O-m,P=T-v,D=M-m;return A*A+C*C>P*P+D*D&&(S=T,O=M),{cx:S,cy:O,x01:-l,y01:-h,x11:S*(i/x-1),y11:O*(i/x-1)}}function Il(){var t=Al,e=Cl,n=gl(0),r=null,i=Pl,a=Dl,o=kl,s=null;function u(){var u,c,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Sl,d=a.apply(this,arguments)-Sl,p=vl(d-f),g=d>f;if(s||(s=u=pl()),h<l&&(c=h,h=l,l=c),h>1e-12)if(p>Ol-1e-12)s.moveTo(h*yl(f),h*xl(f)),s.arc(0,0,h,f,d,!g),l>1e-12&&(s.moveTo(l*yl(d),l*xl(d)),s.arc(0,0,l,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,E=p,S=o.apply(this,arguments)/2,O=S>1e-12&&(r?+r.apply(this,arguments):wl(l*l+h*h)),T=bl(vl(h-l)/2,+n.apply(this,arguments)),M=T,A=T;if(O>1e-12){var C=Ml(O/l*xl(S)),P=Ml(O/h*xl(S));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(E-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(E=0,y=_=(f+d)/2)}var D=h*yl(y),k=h*xl(y),L=l*yl(x),R=l*xl(x);if(T>1e-12){var I,N=h*yl(_),V=h*xl(_),U=l*yl(b),B=l*xl(b);if(p<El&&(I=Ll(D,k,U,B,N,V,L,R))){var G=D-I[0],j=k-I[1],H=N-I[0],z=V-I[1],F=1/xl(Tl((G*H+j*z)/(wl(G*G+j*j)*wl(H*H+z*z)))/2),W=wl(I[0]*I[0]+I[1]*I[1]);M=bl(T,(l-W)/(F-1)),A=bl(T,(h-W)/(F+1))}}E>1e-12?A>1e-12?(v=Rl(U,B,D,k,h,A,g),m=Rl(N,V,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<T?s.arc(v.cx,v.cy,A,ml(v.y01,v.x01),ml(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,ml(v.y01,v.x01),ml(v.y11,v.x11),!g),s.arc(0,0,h,ml(v.cy+v.y11,v.cx+v.x11),ml(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,ml(m.y11,m.x11),ml(m.y01,m.x01),!g))):(s.moveTo(D,k),s.arc(0,0,h,y,_,!g)):s.moveTo(D,k),l>1e-12&&w>1e-12?M>1e-12?(v=Rl(L,R,N,V,l,-M,g),m=Rl(D,k,U,B,l,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,ml(v.y01,v.x01),ml(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,ml(v.y01,v.x01),ml(v.y11,v.x11),!g),s.arc(0,0,l,ml(v.cy+v.y11,v.cx+v.x11),ml(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,ml(m.y11,m.x11),ml(m.y01,m.x01),!g))):s.arc(0,0,l,x,b,g):s.lineTo(L,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-El/2;return[yl(r)*n,xl(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:gl(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:gl(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:gl(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:gl(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:gl(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:gl(+t),u):a},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:gl(+t),u):o},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Nl(t){this._context=t}function Vl(t){return new Nl(t)}function Ul(t){return t[0]}function Bl(t){return t[1]}function Gl(){var t=Ul,e=Bl,n=gl(!0),r=null,i=Vl,a=null;function o(o){var s,u,c,l=o.length,h=!1;for(null==r&&(a=i(c=pl())),s=0;s<=l;++s)!(s<l&&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(c)return a=null,c+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:gl(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:gl(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:gl(!!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 jl(){var t=Ul,e=null,n=gl(0),r=Bl,i=gl(!0),a=null,o=Vl,s=null;function u(u){var c,l,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==a&&(s=o(d=pl())),c=0;c<=p;++c){if(!(c<p&&i(f=u[c],c,u))===g)if(g=!g)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=c-1;h>=l;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[c]=+t(f,c,u),m[c]=+n(f,c,u),s.point(e?+e(f,c,u):v[c],r?+r(f,c,u):m[c]))}if(d)return s=null,d+""||null}function c(){return Gl().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:gl(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:gl(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:gl(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:gl(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:gl(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:gl(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:gl(!!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 Hl(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function zl(t){return t}Nl.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 Fl=Yl(Vl);function Wl(t){this._curve=t}function Yl(t){function e(e){return new Wl(t(e))}return e._curve=t,e}function ql(){return t=Gl().curve(Fl),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(Yl(t)):e()._curve},t;var t,e}Wl.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 Xl=Array.prototype.slice;function Zl(){}function Kl(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 $l(t){this._context=t}function Ql(t){return new $l(t)}function Jl(t){this._context=t}function th(t){return new Jl(t)}function eh(t){this._context=t}function nh(t){return new eh(t)}function rh(t,e){this._basis=new $l(t),this._beta=e}$l.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:Kl(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:Kl(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Jl.prototype={areaStart:Zl,areaEnd:Zl,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:Kl(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},eh.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:Kl(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},rh.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 ih=function t(e){function n(t){return 1===e?new $l(t):new rh(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function ah(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 oh(t,e){this._context=t,this._k=(1-e)/6}oh.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:ah(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:ah(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 sh=function t(e){function n(t){return new oh(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:Zl,areaEnd:Zl,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:ah(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 ch=function t(e){function n(t){return new uh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function lh(t,e){this._context=t,this._k=(1-e)/6}lh.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:ah(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 hh=function t(e){function n(t){return new lh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function fh(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 c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function dh(t,e){this._context=t,this._alpha=e}dh.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:fh(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 ph=function t(e){function n(t){return e?new dh(t,e):new oh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function gh(t,e){this._context=t,this._alpha=e}gh.prototype={areaStart:Zl,areaEnd:Zl,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:fh(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 vh=function t(e){function n(t){return e?new gh(t,e):new uh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function mh(t,e){this._context=t,this._alpha=e}mh.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:fh(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 yh=function t(e){function n(t){return e?new mh(t,e):new lh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function _h(t){this._context=t}function bh(t){return new _h(t)}function xh(t){return t<0?-1:1}function wh(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(xh(a)+xh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Eh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Sh(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 Oh(t){this._context=t}function Th(t){this._context=new Mh(t)}function Mh(t){this._context=t}function Ah(t){return new Oh(t)}function Ch(t){return new Th(t)}function Ph(t){this._context=t}function Dh(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 kh(t){return new Ph(t)}function Lh(t,e){this._context=t,this._t=e}function Rh(t){return new Lh(t,.5)}function Ih(t){return new Lh(t,0)}function Nh(t){return new Lh(t,1)}function Vh(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 Uh(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Bh(t,e){return t[e]}_h.prototype={areaStart:Zl,areaEnd:Zl,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))}},Oh.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:Sh(this,this._t0,Eh(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,Sh(this,Eh(this,n=wh(this,t,e)),n);break;default:Sh(this,this._t0,n=wh(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Th.prototype=Object.create(Oh.prototype)).point=function(t,e){Oh.prototype.point.call(this,e,t)},Mh.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)}},Ph.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=Dh(t),i=Dh(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)}},Lh.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 Gh=function(){function t(t){this.state={options:{}},this.colorScale={},this.services=t}return t.prototype.getAllDataFromDomain=function(){if(!this.get("data"))return null;var t=this.getDataGroups(),e=ia.clone(this.get("data")),n=this.getOptions().data.groupMapsTo,r=this.getOptions().axes;return r&&Object.keys(r).forEach((function(t){if(r[t].mapsTo&&r[t].domain){var n=r[t].mapsTo;if(r[t].scaleType===S.LABELS)e=e.filter((function(e){return r[t].domain.includes(e[n])}));else{var i=r[t].domain,a=i[0],o=i[1];e=e.filter((function(t){return t[n]>=a&&t[n]<=o}))}}})),e.filter((function(e){return t.find((function(t){return t.name===e[n]}))}))},t.prototype.getDisplayData=function(){if(!this.get("data"))return null;var t=Oa.items.status.ACTIVE,e=this.getDataGroups(),n=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain().filter((function(r){return e.find((function(t){return t.name===r[n]})).status===t}))},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(ia.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=Oa.items.status.ACTIVE;return this.getDataGroups().filter((function(e){return e.status===t}))},t.prototype.getDataGroupNames=function(){return this.getDataGroups().map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(){return this.getActiveDataGroups().map((function(t){return t.name}))},t.prototype.getGroupedData=function(){var t=this.getDisplayData(),e={},n=this.getOptions().data.groupMapsTo;return t.map((function(t){var r=t[n];null!==e[r]&&void 0!==e[r]?e[r].push(t):e[r]=[t]})),Object.keys(e).map((function(t){return{name:t,data:e[t]}}))},t.prototype.getDataValuesGroupedByKeys=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this.getDisplayData(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),a=xo(n,(function(t){return t[r]})).keys(),o=this.services.cartesianScales.domainAxisPosition,s=t.axes[o].scaleType;s===S.TIME?a.sort((function(t,e){return new Date(t)-new Date(e)})):s!==S.LOG&&s!==S.LINEAR||a.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return a.map((function(t){var a={sharedStackKey:t};return u.forEach((function(o){var s=n.find((function(n){return n[e]===o&&n[r].toString()===t}));a[o]=s?s[i]:null})),a}))},t.prototype.getStackedData=function(t){var e=(void 0===t?{percentage:!1}:t).percentage,n=this.getOptions().data.groupMapsTo,r=this.getDataGroupNames(),i=this.getDataValuesGroupedByKeys();if(e){var a=ia.fromPairs(i.map((function(t){return[t.sharedStackKey,0]})));i.forEach((function(t){r.forEach((function(e){a[t.sharedStackKey]+=t[e]}))})),i.forEach((function(t){r.forEach((function(e){t[e]=t[e]/a[t.sharedStackKey]*100}))}))}return function(){var t=gl([]),e=Uh,n=Vh,r=Bh;function i(i){var a,o,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(a=0;a<c;++a){for(var h,f=s[a],d=l[a]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(l);a<c;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:gl(Xl.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:gl(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Uh:"function"==typeof t?t:gl(Xl.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Vh:t,i):n},i}().keys(r)(i).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(i){var a=t[i];return a[n]=r[e],a}))}))},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){this.set({options:ia.merge(this.getOptions(),t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(U.Model.UPDATE,{animate:t}))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Oa.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})),c=this.getOptions(),l=i.some((function(t){return t.status===r}));c.data.selectedGroups=l?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(U.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=this.getFillScale()(t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale(t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.getStatus=function(){return null},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/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=ia.getProperty(t,"label");if(null===o){var s=ia.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 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=Oa.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.setColorScale=function(){var t=yo,e=this.getOptions(),n=ia.getProperty(e,"color","scale");if(null!==n&&0!==Object.keys(n).length){var r=[],i=0;this.allDataGroups.forEach((function(e){n[e]?r.push(n[e]):r.push(t[i]),i===t.length-1?i=0:i++})),this.colorScale=jo().range(r).domain(this.allDataGroups)}else this.colorScale=jo().range(t).domain(this.allDataGroups)},t}(),jh=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}(),Hh={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 "},zh=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}()}(),Fh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Wh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Yh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Wh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},qh=["top","right","bottom","left","width","height","size","weight"],Xh="undefined"!=typeof MutationObserver,Zh=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(){Yh(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)};Zh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Zh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Zh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Zh.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},Zh.prototype.connect_=function(){Fh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Xh?(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)},Zh.prototype.disconnect_=function(){Fh&&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)},Zh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),qh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Zh.getInstance=function(){return this.instance_||(this.instance_=new Zh),this.instance_},Zh.instance_=null;var Kh=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},$h=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Wh},Qh=af(0,0,0,0);function Jh(t){return parseFloat(t)||0}function tf(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Jh(t["border-"+n+"-width"])}),0)}function ef(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Qh;var r=$h(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]=Jh(a)}return e}(r),a=i.left+i.right,o=i.top+i.bottom,s=Jh(r.width),u=Jh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==e&&(s-=tf(r,"left","right")+a),Math.round(u+o)!==n&&(u-=tf(r,"top","bottom")+o)),!function(t){return t===$h(t).document.documentElement}(t)){var c=Math.round(s+a)-e,l=Math.round(u+o)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return af(i.left,i.top,s,u)}var nf="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof $h(t).SVGGraphicsElement}:function(t){return t instanceof $h(t).SVGElement&&"function"==typeof t.getBBox};function rf(t){return Fh?nf(t)?function(t){var e=t.getBBox();return af(0,0,e.width,e.height)}(t):ef(t):Qh}function af(t,e,n,r){return{x:t,y:e,width:n,height:r}}var of=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=af(0,0,0,0),this.target=t};of.prototype.isActive=function(){var t=rf(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},of.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var sf=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 Kh(o,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),o}(e);Kh(this,{target:t,contentRect:n})},uf=function(t,e,n){if(this.activeObservations_=[],this.observations_=new zh,"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};uf.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 $h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new of(t)),this.controller_.addObserver(this),this.controller_.refresh())}},uf.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 $h(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))}},uf.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},uf.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},uf.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new sf(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},uf.prototype.clearActive=function(){this.activeObservations_.splice(0)},uf.prototype.hasActive=function(){return this.activeObservations_.length>0};var cf="undefined"!=typeof WeakMap?new WeakMap:new zh,lf=function(t){if(!(this instanceof lf))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=Zh.getInstance(),n=new uf(t,e,this);cf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){lf.prototype[t]=function(){return(e=cf.get(this))[t].apply(e,arguments);var e}}));var hf=void 0!==Wh.ResizeObserver?Wh.ResizeObserver:lf,ff=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=ua(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 c={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(c),o.width>0&&o.height>0))return c;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:ia.getProperty(t.node(),"width","baseVal","value"),height:ia.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(c),s(r),s(u)}return o},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.getAlignmentOffset=function(t,n,r){var i=e.getSVGElementSize(n,{useBBox:!0}),a=e.getSVGElementSize(r,{useAttr:!0}).width,o=0;return t===M.CENTER?o=Math.floor((a-i.width)/2):t===M.RIGHT&&(o=a-i.width),o},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();ua(this.getHolder()).classed(Hh.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=ia.getProperty(t,"style","prefix"),n=ua(this.getHolder()).append("svg").classed(Hh.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=n.node()},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(ua(this.svg),{useBBox:!0}).height,n=ua(this.svg).attr("class"),r=ua(this.svg).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(ua(t),{useBBox:!0}).height)})),i<=t?ua(this.svg).attr("height",i):ua(this.svg).attr("height","100%")}},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&ua(e).on("mouseover",(function(){t.services.events.dispatchEvent(U.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(U.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=ia.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(U.Chart.RESIZE))}),12.5);new hf(i).observe(e)}},e}(jh),df=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}(jh),pf={value:function(){}};function gf(){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 vf(r)}function vf(t){this._=t}function mf(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 yf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function _f(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=pf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}vf.prototype=gf.prototype={constructor:vf,on:function(t,e){var n,r=this._,i=mf(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]=_f(r[n],t.name,e);else if(null==e)for(n in r)r[n]=_f(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=yf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new vf(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 bf,xf,wf=0,Ef=0,Sf=0,Of=0,Tf=0,Mf=0,Af="object"==typeof performance&&performance.now?performance:Date,Cf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Pf(){return Tf||(Cf(Df),Tf=Af.now()+Mf)}function Df(){Tf=0}function kf(){this._call=this._time=this._next=null}function Lf(t,e,n){var r=new kf;return r.restart(t,e,n),r}function Rf(){Tf=(Of=Af.now())+Mf,wf=Ef=0;try{!function(){Pf(),++wf;for(var t,e=bf;e;)(t=Tf-e._time)>=0&&e._call.call(null,t),e=e._next;--wf}()}finally{wf=0,function(){var t,e,n=bf,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:bf=e);xf=t,Nf(r)}(),Tf=0}}function If(){var t=Af.now(),e=t-Of;e>1e3&&(Mf-=e,Of=t)}function Nf(t){wf||(Ef&&(Ef=clearTimeout(Ef)),t-Tf>24?(t<1/0&&(Ef=setTimeout(Rf,t-Af.now()-Mf)),Sf&&(Sf=clearInterval(Sf))):(Sf||(Of=Af.now(),Sf=setInterval(If,1e3)),wf=1,Cf(Rf)))}function Vf(t,e,n){var r=new kf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}kf.prototype=Lf.prototype={constructor:kf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Pf():+n)+(null==e?0:+e),this._next||xf===this||(xf?xf._next=this:bf=this,xf=this),this._call=t,this._time=n,Nf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nf())}};var Uf=gf("start","end","cancel","interrupt"),Bf=[];function Gf(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 c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return Vf(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}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),c=0,l=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+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=Lf((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:Uf,tween:Bf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function jf(t,e){var n=zf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Hf(t,e){var n=zf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function zf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ff(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 Wf(t,e){var n,r;return function(){var i=Hf(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 Yf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Hf(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}a.tween=i}}function qf(t,e,n){var r=t._id;return t.each((function(){var t=Hf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return zf(t,r).value[e]}}function Xf(t,e){var n;return("number"==typeof e?Os:e instanceof as?xs:(n=as(e))?(e=n,xs):Cs)(t,e)}function Zf(t){return function(){this.removeAttribute(t)}}function Kf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $f(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 Qf(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 Jf(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 td(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 ed(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function nd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function rd(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&nd(t,i)),n}return i._value=e,i}function id(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ed(t,i)),n}return i._value=e,i}function ad(t,e){return function(){jf(this,t).delay=+e.apply(this,arguments)}}function od(t,e){return e=+e,function(){jf(this,t).delay=e}}function sd(t,e){return function(){Hf(this,t).duration=+e.apply(this,arguments)}}function ud(t,e){return e=+e,function(){Hf(this,t).duration=e}}function cd(t,e){if("function"!=typeof e)throw new Error;return function(){Hf(this,t).ease=e}}function ld(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)?jf:Hf;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var hd=sa.prototype.constructor;function fd(t){return function(){this.style.removeProperty(t)}}function dd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function pd(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&dd(t,a,n)),r}return a._value=e,a}function gd(t){return function(e){this.textContent=t.call(this,e)}}function vd(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&gd(r)),e}return r._value=t,r}var md=0;function yd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function _d(t){return sa().transition(t)}function bd(){return++md}var xd=sa.prototype;function wd(t){return+t}yd.prototype=_d.prototype={constructor:yd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ai(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,c=r[o],l=c.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,Gf(h[f],e,n,f,h,zf(s,n)));return new yd(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=si(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,h=0;h<l;++h)if(u=c[h]){for(var f,d=t.call(u,u.__data__,h,c),p=zf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&Gf(f,e,n,g,d,p);a.push(d),o.push(u)}return new yd(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=ui(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]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new yd(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,c=e[s],l=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new yd(o,this._parents,this._name,this._id)},selection:function(){return new hd(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=bd(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)if(o=s[c]){var l=zf(o,e);Gf(o,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new yd(r,this._parents,t,n)},call:xd.call,nodes:xd.nodes,node:xd.node,size:xd.size,empty:xd.empty,each:xd.each,on:function(t,e){var n=this._id;return arguments.length<2?zf(this.node(),n).on.on(t):this.each(ld(n,t,e))},attr:function(t,e){var n=ti(t),r="transform"===n?js:Xf;return this.attrTween(t,"function"==typeof e?(n.local?td:Jf)(n,r,qf(this,"attr."+t,e)):null==e?(n.local?Kf:Zf)(n):(n.local?Qf:$f)(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=ti(t);return this.tween(n,(r.local?rd:id)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Gs:Xf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Si(this,t),o=(this.style.removeProperty(t),Si(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,fd(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Si(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Si(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,qf(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=Hf(this,t),c=u.on,l=null==u.value[o]?a||(a=fd(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Si(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,pd(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}}(qf(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,vd(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=zf(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?Wf:Yf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ad:od)(e,t)):zf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?sd:ud)(e,t)):zf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(cd(e,t)):zf(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=Hf(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 Ed={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Sd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Ed.time=Pf(),Ed;return n}sa.prototype.interrupt=function(t){return this.each((function(){Ff(this,t)}))},sa.prototype.transition=function(t){var e,n;t instanceof yd?(e=t._id,t=t._name):(e=bd(),(n=Ed).time=Pf(),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,c=0;c<u;++c)(o=s[c])&&Gf(o,t,e,c,s,n||Sd(o,e));return new yd(r,this._parents,t,e)};var Od=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(U.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=_d(t).duration(ia.getProperty(Ya,t,"duration")||Ya.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=_d(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}(jh);function Td(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 Md(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 Ad(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Md(e);return n.setDate(n.getDate()+r),n}function Cd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t).getTime(),r=Md(e);return new Date(n+r)}function Pd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Cd(t,36e5*n)}function Dd(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function kd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Td(t);return e.setHours(0,0,0,0),e}function Ld(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t),r=kd(e),i=n.getTime()-Dd(n),a=r.getTime()-Dd(r);return Math.round((i-a)/864e5)}function Rd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Cd(t,6e4*n)}function Id(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Td(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 Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Md(e),i=n.getMonth()+r,a=new Date(0);a.setFullYear(n.getFullYear(),i,1),a.setHours(0,0,0,0);var o=Id(a);return n.setMonth(i,Math.min(o,n.getDate())),n}function Vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Cd(t,1e3*n)}function Ud(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Nd(t,12*n)}function Bd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Gd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Td(t);return!isNaN(e)}function jd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return 12*i+a}function Hd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e);return n.getFullYear()-r.getFullYear()}function zd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e);return n.getTime()-r.getTime()}function Fd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=zd(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Wd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=zd(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Yd={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 qd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Xd={date:qd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:qd({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:qd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Zd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Kd(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 $d(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,c=s[0],l=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}}var Qd,Jd={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Yd[t]?Yd[t]:1===e?Yd[t].one:Yd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Xd,formatRelative:function(t,e,n,r){return Zd[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:Kd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Kd({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:Kd({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:Kd({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:Kd({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:(Qd={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(Qd.matchPattern);if(!i)return null;var a=i[0],o=n.match(Qd.parsePattern);if(!o)return null;var s=Qd.valueCallback?Qd.valueCallback(o[0]):o[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:$d({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:$d({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:$d({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:$d({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:$d({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 tp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Cd(t,-n)}function ep(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 ep("yy"===e?r%100:r,e.length)},rp=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):ep(n+1,2)},ip=function(t,e){return ep(t.getUTCDate(),e.length)},ap=function(t,e){return ep(t.getUTCHours()%12||12,e.length)},op=function(t,e){return ep(t.getUTCHours(),e.length)},sp=function(t,e){return ep(t.getUTCMinutes(),e.length)},up=function(t,e){return ep(t.getUTCSeconds(),e.length)},cp=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return ep(Math.floor(r*Math.pow(10,n-3)),e.length)};function lp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=Td(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 hp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Td(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=lp(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=lp(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function fp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=hp(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=lp(n);return r}function dp(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:Md(i),o=null==n.weekStartsOn?a:Md(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Td(t),u=s.getUTCDay(),c=(u<o?7:0)+u-o;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function pp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Td(t,e),r=n.getUTCFullYear(),i=e||{},a=i.locale,o=a&&a.options&&a.options.firstWeekContainsDate,s=null==o?1:Md(o),u=null==i.firstWeekContainsDate?s:Md(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=dp(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=dp(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function gp(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:Md(i),o=null==n.firstWeekContainsDate?a:Md(n.firstWeekContainsDate),s=pp(t,e),u=new Date(0);u.setUTCFullYear(s,0,o),u.setUTCHours(0,0,0,0);var c=dp(u,e);return c}var vp="midnight",mp="noon",yp="morning",_p="afternoon",bp="evening",xp="night",wp={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=pp(t,r),a=i>0?i:1-i;return"YY"===e?ep(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):ep(a,e.length)},R:function(t,e){return ep(hp(t),e.length)},u:function(t,e){return ep(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 ep(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 ep(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 rp(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 ep(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=Td(t),r=dp(n,e).getTime()-gp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):ep(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=Td(t),n=lp(e).getTime()-fp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):ep(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):ip(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=Td(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"}):ep(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 ep(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 ep(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 ep(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?mp:0===i?vp: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?bp:i>=12?_p:i>=4?yp:xp,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 ap(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):op(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):ep(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):ep(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):sp(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):up(t,e)},S:function(t,e){return cp(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Sp(i);case"XXXX":case"XX":return Op(i);case"XXXXX":case"XXX":default:return Op(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Sp(i);case"xxxx":case"xx":return Op(i);case"xxxxx":case"xxx":default:return Op(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ep(i,":");case"OOOO":default:return"GMT"+Op(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ep(i,":");case"zzzz":default:return"GMT"+Op(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return ep(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return ep((r._originalDate||t).getTime(),e.length)}};function Ep(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+ep(a,2)}function Sp(t,e){return t%60==0?(t>0?"-":"+")+ep(Math.abs(t)/60,2):Op(t,e)}function Op(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+ep(Math.floor(i/60),2)+n+ep(i%60,2)}function Tp(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 Mp(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 Ap={p:Mp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],a=r[2];if(!a)return Tp(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}}",Tp(i,e)).replace("{{time}}",Mp(a,e))}},Cp=["D","DD"],Pp=["YY","YYYY"];function Dp(t){return-1!==Cp.indexOf(t)}function kp(t){return-1!==Pp.indexOf(t)}function Lp(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 Rp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ip=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Np=/^'([^]*?)'?$/,Vp=/''/g,Up=/[a-zA-Z]/;function Bp(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||Jd,o=a.options&&a.options.firstWeekContainsDate,s=null==o?1:Md(o),u=null==i.firstWeekContainsDate?s:Md(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=a.options&&a.options.weekStartsOn,l=null==c?0:Md(c),h=null==i.weekStartsOn?l:Md(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 f=Td(t);if(!Gd(f))throw new RangeError("Invalid time value");var d=Dd(f),p=tp(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:a,_originalDate:f},v=r.match(Ip).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Ap[e])(t,a.formatLong,g):t})).join("").match(Rp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Gp(t);var n=wp[e];if(n)return!i.useAdditionalWeekYearTokens&&kp(t)&&Lp(t),!i.useAdditionalDayOfYearTokens&&Dp(t)&&Lp(t),n(p,t,a.localize,g);if(e.match(Up))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Gp(t){return t.match(Np)[1].replace(Vp,"'")}function jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Ad(t,-n)}function Hp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Pd(t,-n)}function zp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Rd(t,-n)}function Fp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Nd(t,-n)}function Wp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Vd(t,-n)}function Yp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(e);return Ud(t,-n)}var qp=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(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return ia.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.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(x).map((function(t){return x[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findMainVerticalAxisPosition(),e=this.findMainHorizontalAxisPosition(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.domainAxisPosition,this.rangeAxisPosition=n.rangeAxisPosition},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==x.LEFT&&this.rangeAxisPosition!==x.RIGHT||this.domainAxisPosition!==x.BOTTOM&&this.domainAxisPosition!==x.TOP?this.orientation=E.HORIZONTAL:this.orientation=E.VERTICAL},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=[x.BOTTOM,x.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[x.LEFT,x.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=ia.getProperty(o,"axes")[n].mapsTo,u=void 0!==r[s]?r[s]:r;switch(e){case S.LABELS:a=t(u)+t.step()/2;break;case S.TIME:a=t(new Date(u));break;default:a=t(u)}return a},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){return this.getValueThroughAxisPosition(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueThroughAxisPosition(this.rangeAxisPosition,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(){var t=this.model.getOptions();return ia.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return ia.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===S.TIME?e.filter((function(e){var r=e[n];return"string"!=typeof r&&void 0!==r.getTime||(r=new Date(r)),r.getTime()===t.getTime()})):e.filter((function(e){return e[n]===t}))},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return ia.getProperty(n,"axes",t).scaleType===S.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=Td(t),r=Td(e),i=Bd(n,r),a=Math.abs(Hd(n,r));n.setFullYear(n.getFullYear()-i*a);var o=Bd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Yp(n,e),Ud(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e),i=Bd(n,r),a=Math.abs(jd(n,r));n.setMonth(n.getMonth()-i*a);var o=Bd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Fp(n,e),Nd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e),i=Bd(n,r),a=Math.abs(Ld(n,r));n.setDate(n.getDate()-i*a);var o=Bd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[jp(n,e),Ad(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=zd(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Hp(n,e),Pd(r,e)];if(Fd(r,n)>30)return[zp(n,30*e),Rd(r,30*e)];if(Fd(r,n)>1)return[zp(n,e),Rd(r,e)];if(Wd(r,n)>15)return[Wp(n,15*e),Vd(r,15*e)];if(Wd(r,n)>1)return[Wp(n,e),Vd(r,e)];return[n,r]}(e,ia.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,qa.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=ia.getProperty(t,"axes");return null===ia.getProperty(e,x.LEFT)&&null!==ia.getProperty(e,x.RIGHT)||!0===ia.getProperty(e,x.RIGHT,"main")?x.RIGHT:x.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=ia.getProperty(t,"axes");return null===ia.getProperty(e,x.BOTTOM)&&null!==ia.getProperty(e,x.TOP)||!0===ia.getProperty(e,x.TOP,"main")?x.TOP:x.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=ia.getProperty(n,"axes",t),i=ia.getProperty(n,"axes",e),a=r.scaleType||S.LINEAR,o=i.scaleType||S.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return o===S.LABELS||o===S.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):a===S.LABELS||a===S.TIME?(s.domainAxisPosition=t,s.rangeAxisPosition=e):(s.domainAxisPosition=e,s.rangeAxisPosition=t),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=ia.getProperty(e,"axes",t),r=n.includeZero,i=ia.getProperty(n,"scaleType")||S.LINEAR;if(this.model.isDataEmpty())return[];var a,o,s=this.model.getDisplayData(),u=n.mapsTo,c=n.percentage;if(n.domain)return i===S.LABELS?n.domain:this.extendsDomain(t,n.domain);if(c)return[0,100];if(n&&i===S.LABELS)return xo(s,(function(t){return t[u]})).keys();n.stacked?o=this.model.getDataValuesGroupedByKeys().map((function(t){return function(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(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):o=s.map((function(t){return t[u]}));return i!==S.TIME&&r&&o.push(0),a=Mo(o),a=this.extendsDomain(t,a)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=ia.getProperty(e,"axes",t);if(!n)return null;var r,i=ia.getProperty(n,"scaleType")||S.LINEAR;return this.scaleTypes[t]=i,(r=i===S.TIME?cl():i===S.LOG?function t(){var e=Eu(Ks()).domain([1,10]);return e.copy=function(){return Zs(e,t()).base(e.base())},No.apply(e,arguments),e}().base(n.base||10):i===S.LABELS?Ho():gu()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=ia.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)!==S.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=ia.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}(jh);var Xp,Zp,Kp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Vl,curveLinearClosed:bh,curveBasis:Ql,curveBasisClosed:th,curveBasisOpen:nh,curveBundle:ih,curveCardinal:sh,curveCardinalClosed:ch,curveCardinalOpen:hh,curveCatmullRom:ph,curveCatmullRomClosed:vh,curveCatmullRomOpen:yh,curveMonotoneX:Ah,curveMonotoneY:Ch,curveNatural:kh,curveStep:Rh,curveStepAfter:Nh,curveStepBefore:Ih},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}(jh),$p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getZoomBarData=function(){var t,e=this.services.cartesianScales,n=e.getDomainIdentifier(),r=e.getRangeIdentifier(),i=ia.getProperty(this.model.getOptions(),"zoomBar","top","data");t=i&&i.length>1?i:this.model.getDisplayData();var a=[];return t.forEach((function(t){a=a.concat(Number(t[n]))})),(a=ia.removeArrayDuplicates(a).sort()).map((function(e){var i=0,a={};return t.forEach((function(t){Number(t[n])===e&&(i+=t[r])})),a[n]=new Date(e),a[r]=i,a}))},e.prototype.getDefaultZoomBarDomain=function(){var t=this.services.zoom.getZoomBarData(),e=this.services.cartesianScales,n=e.getMainXAxisPosition(),r=e.getDomainIdentifier();return e.extendsDomain(n,Mo(t,(function(t){return t[r]})))},e}(jh),Qp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(ua(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=ia.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Hh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Hh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=ia.getProperty(this.model.getOptions(),"style","prefix"),n=ff.appendOrSelect(this.parent,"g."+Hh.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var r=this.model.get("chartClipId");r&&n.attr("clip-path","url(#"+r+")")}return n}return this.parent},t}(),Jp=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.GRAPHICS_DOCUMENT+" "+r.DOCUMENT),n=this.model.getOptions(),i=ia.getProperty(n,"legend"),a=e.selectAll("g.legend-item").data(this.model.getDataGroups(),(function(t){return t.name})),o=a.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===n.legend.items.status.ACTIVE})),s=n.legend.checkbox.radius,u=ia.getProperty(i,"truncation","type"),c=ia.getProperty(i,"truncation","threshold"),l=ia.getProperty(i,"truncation","numCharacter");o.append("rect").classed("checkbox",!0).merge(a.select("rect.checkbox")).attr("width",2*s).attr("height",2*s).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.status===n.legend.items.status.ACTIVE?t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===n.legend.items.status.ACTIVE}));var h=o.append("text").merge(a.select("text"));u!==w.NONE?h.html((function(t){return t.name.length>c?ia.truncateLabel(t.name,u,l):t.name})):h.html((function(t){return t.name})),this.breakItemsIntoLines(o),a.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var f=ia.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",f),f&&o.size()>0&&this.addEventListeners();var d=ia.getProperty(i,"alignment"),p=ff.getAlignmentOffset(d,e,this.getParent());e.attr("transform","translate("+p+", 0)")},e.prototype.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.legend.checkbox.radius,a=r.legend.items.horizontalSpace,o=r.legend.items.verticalSpace,s=r.legend.items.textYOffset,u=2*i+r.legend.checkbox.spaceAfter,c=r.legend.items.status.DISABLED,l=this.model.getDataGroups().some((function(t){return t.status===c})),h=ia.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var c=ua(this),g=ua(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===A.VERTICAL)h===A.VERTICAL&&0!==r&&d++;else{var v=ff.getSVGElementSize(e.parent,{useAttr:!0}),m=ff.getSVGElementSize(ua(this).select("text"),{useBBox:!0}),y=ff.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+a)+u+m.width>v.width&&(d++,f=0,p=0)}c.select("rect.checkbox").attr("x",f).attr("y",0+d*o);var _=s+d*o;c.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===A.HORIZONTAL)&&"0"===c.select("rect.checkbox").attr("y"),x=h===A.VERTICAL&&"0"===c.select("rect.checkbox").attr("x"),w=b||x;l&&c.select("g.check").empty()&&w?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\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\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):l||c.select("g.check").empty()||c.select("g.check").remove(),p++}))},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions(),r=ia.getProperty(n,"legend"),i=ia.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(U.Legend.ITEM_HOVER,{hoveredElement:ua(this)});var e=n.legend.checkbox.radius,r=ua(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower();var a=r.datum();a.name.length>i&&t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:r,content:a.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(U.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(U.Legend.ITEM_CLICK,{clickedElement:ua(this)});var e=ua(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=ua(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(U.Tooltip.HIDE),t.services.events.dispatchEvent(U.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},e}(Qp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Zp||(Zp={}));var tg=((Xp={})[Zp.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)}},Xp[Zp.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)}},Xp[Zp.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)}},Xp[Zp.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)}},Xp),eg="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},ng=function(){function t(t){void 0===t&&(t={}),this.positions=tg,this.positions=Object.assign({},tg,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,c=s.right-r().width;u=u<0?e.offsetHeight:u,c=c<0?e.offsetWidth:c;var l=e.offsetHeight*e.offsetWidth,h=l-u*c;return{placement:n,weight:(h=0===h?l:h)/l}}));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:eg.innerHeight-eg.scrollY,height:eg.innerWidth-eg.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}(),rg=(new ng,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function ig(t,e,n,r){var i=0===e,a=2===Number(Bp(new Date(t),"c")),o=1===Number(Bp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||ug(t)||cg(t)||lg(t);case"daily":return r?i||a||lg(t):i||cg(t)||lg(t);case"monthly":return i||lg(t);case"quarterly":return i||o;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function ag(t,e,n,r){var i=r.showDayName,a="daily"===n&&i?"weekly":n,o=new Date(t),s=ia.getProperty(r,"timeIntervalFormats")[a],u=ia.getProperty(s,"primary"),c=ia.getProperty(s,"secondary");return Bp(o,ig(t,e,n,i)?u:c,{locale:r.localeObject})}function og(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function sg(t){return 1===t.length?"15seconds":function(t){var e=rg.reduce((function(e,n,r){n[0];var i=n[1],a=rg[e][1];return Math.abs(a-t)<Math.abs(i-t)?e:r}),0);return rg[e][0]}(function(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(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function ug(t){var e=og(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function cg(t){var e=og(t),n=e.d,r=e.s,i=e.m,a=e.H;return 1===n&&0===a&&0===i&&0===r}function lg(t){var e=og(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 hg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new ng,i}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=this.configs,r=n.value,i=n.fillColor,a=n.axisPosition,o=n.index,s=ia.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Hh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=a+"-"+o,this.threshold=ff.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=ff.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),c=ff.appendOrSelect(this.threshold,"line.threshold-line");c.style("stroke",i);var l=this.services.cartesianScales.getScaleByPosition(a),h=this.services.cartesianScales.getScaleTypeByPosition(a),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===S.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],b=y[1],w=this.services.cartesianScales,E=w.getOrientation(),O=ia.flipDomainAndRangeBasedOnOrientation((function(t){return w.getDomainValue(t)}),(function(t){return w.getRangeValue(t)}),E),T=O[0],M=O[1];if(a===x.TOP||a===x.BOTTOM){var A=T(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+A+", "+b+")"),c.attr("y2",_-b),u.attr("width",_-b).classed("rotate",!0)}else{A=M(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+A+")"),c.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(U.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(U.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(){var t=this.configs,e=t.value,n=t.axisPosition,r=this.model.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===S.TIME){var i=[x.LEFT,x.RIGHT].includes(n),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=i?o:a,u=ia.getProperty(r,"timeScale");return ag(e,0,sg(s.ticks()),u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=this.configs,e=t.value,n=t.valueFormatter,r=t.fillColor,i=t.label,a=void 0===i?"Threshold":i,o=ua(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=ff.appendOrSelect(o,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(a+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=ha(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[Zp.RIGHT,Zp.LEFT,Zp.TOP,Zp.BOTTOM],(function(){return{width:t.offsetWidth,height:t.offsetHeight}})),i=this.positionService.findPositionAt({left:n[0],top:n[1]},e,r);this.positionService.setElement(e,i)},e.prototype.addEventListeners=function(){var t=this;ff.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(U.Threshold.SHOW,{hoveredElement:ua(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(U.Threshold.HIDE,{hoveredElement:ua(t.threshold)})}))},e}(Qp),fg=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.model.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=ff.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=ff.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(U.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){o.services.events.dispatchEvent(U.Tooltip.MOVE)})).on("mouseout",(function(){o.services.events.dispatchEvent(U.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return ff.getSVGElementSize(this.services.domUtils.getMainSVG(),{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}(Qp),dg=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.model.getDisplayData(),e=this.model.getOptions(),n=this.getContainerSVG(),r=e.data.groupMapsTo,i=n.selectAll("text.meter-title").data([t[r]]);i.enter().append("text").classed("meter-title",!0).merge(i).attr("x",0).attr("y","1em").text((function(t){return t})),i.exit().remove(),this.appendPercentage(),this.displayStatus();var a=this.getMaxTitleWidth(),o=ff.appendOrSelect(n,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)},e.prototype.displayStatus=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=ff.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),r=n.width?n.width:this.parent.node().getAttribute("width"),i=this.model.getStatus(),a=ia.getProperty(e,"meter","status","indicatorSize")/2,o=ff.appendOrSelect(t,"g.status-indicator").classed("status--"+i,null!==i).attr("transform","translate("+(r-a)+", 0)"),s=i?[i]:[],u=o.selectAll("circle.status").data(s);u.enter().append("circle").merge(u).attr("class","status").attr("r",a).attr("cx",0).attr("cy","calc(1em / 2)");var c=o.selectAll("path.innerFill").data(s);c.enter().append("path").merge(c).attr("d",this.getStatusIconPathString(i)).attr("transform","translate(-"+a+", 0)").attr("class","innerFill"),c.exit().remove(),u.exit().remove()},e.prototype.appendPercentage=function(){var t=this.model.getDisplayData().value,e=this.getContainerSVG(),n=ff.appendOrSelect(e,"text.meter-title"),r=!0===ia.getProperty(this.model.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),a=ia.getProperty(this.model.getOptions(),"meter","statusBar","paddingRight");i.enter().append("text").classed("percent-value",!0).merge(i).text((function(t){return t+"%"})).attr("x",+n.attr("x")+n.node().getComputedTextLength()+a).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=ff.appendOrSelect(this.parent,"tspan"),i=ia.getProperty(this.model.getOptions(),"meter","statusBar","paddingRight"),a=Math.ceil(r.node().getComputedTextLength());ff.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+a+i)},e.prototype.getMaxTitleWidth=function(){var t=ff.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),e=t.width?t.width:this.parent.node().getAttribute("width"),n=ff.appendOrSelect(this.parent,"text.percent-value"),r=ia.getProperty(this.model.getOptions(),"meter","statusBar","paddingRight"),i=n.node().getComputedTextLength(),a=ff.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(ff.getSVGElementSize(a,{useBBox:!0}).width+ia.getProperty(this.model.getOptions(),"meter","status","paddingLeft"))},e.prototype.getStatusIconPathString=function(t){switch(t){case V.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 V.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case V.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}(fg),pg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new ng,i.init(),i}return n(e,t),e.prototype.init=function(){var t=this,e=ua(this.services.domUtils.getHolder()),n=ia.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=ff.appendOrSelect(e,"div."+Hh.prefix+"--"+n+"--tooltip");var r=ff.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(U.Tooltip.MOVE,(function(e){t.positionTooltip(e)})),this.services.events.addEventListener(U.Tooltip.SHOW,(function(e){var n=e.detail.data,i=t.getTooltipHTML(e);ia.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(n,i)):r.html(i),t.positionTooltip(e),t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(U.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this.model.getOptions(),n=ia.getProperty(e,"tooltip","truncation","type"),r=ia.getProperty(e,"tooltip","truncation","threshold"),i=ia.getProperty(e,"tooltip","truncation","numCharacter");return n!==w.NONE?t.map((function(t){return t.label&&t.label.length>r&&(t.label=ia.truncateLabel(t.label,n,i)),t.value&&t.value.length>r&&(t.value=ia.truncateLabel(t.value,n,i)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip">'+t.detail.content+"</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.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">'+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){var e=this.model.getOptions(),n=ia.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=ia.getProperty(t,"detail","mousePosition");i||(i=ha(n));var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Zp.RIGHT,Zp.LEFT,Zp.TOP,Zp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),o=this.model.getOptions().tooltip.horizontalOffset;a===Zp.LEFT&&(o*=-1),e=this.positionService.findPositionAt({left:i[0]+o,top:i[1]},r,a),this.positionService.setElement(r,e)},e}(Qp),gg=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.model.getOptions(),i=this.services.cartesianScales,a=i.getDomainAxisOptions(),o=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=i.getRangeAxisOptions(),c=i.getRangeIdentifier(),l=i.getRangeAxisScaleType(),h=r.data.groupMapsTo,f=a.title;if(!f){var d=i.getDomainAxisPosition();f=d===x.BOTTOM||d===x.TOP?"x-value":"y-value"}var p,g=n[0][o];if(s===S.TIME?g=Bp(new Date(n[0][o]),"MMM d, yyyy"):s===S.LINEAR&&(g=g.toLocaleString()),1===n.length){var v=n[0],m=u.title;if(!m){var y=i.getRangeAxisPosition();m=y===x.LEFT||y===x.RIGHT?"y-value":"x-value"}var _=v[c];l===S.LINEAR&&(_=_.toLocaleString()),p=[{label:f,value:g},{label:m,value:_},{label:"Group",value:v[h],color:this.model.getStrokeColor(v[h])}]}else n.length>1&&(p=(p=[{label:f,value:this.valueFormatter(g)}]).concat(n.map((function(t){return{label:t[h],value:e.valueFormatter(t[c]),color:e.model.getStrokeColor(t[h])}})).sort((function(t,e){return e.value-t.value}))),!0===ia.getProperty(r,"tooltip","showTotal")&&p.push({label:"Total",value:this.valueFormatter(n.reduce((function(t,e){return t+e[c]}),0)),bold:!0}));return p},e}(pg),vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",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?Wa.opacity.unselected:Wa.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Wa.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.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=this.services.cartesianScales,i=r.getOrientation(),a=jl().curve(this.services.curves.getD3Curve());i===E.VERTICAL?a.x((function(t,e){return r.getDomainValue(t,e)})).y0(r.getRangeValue(0)).y1((function(t,e){return r.getRangeValue(t,e)})):a.x0(r.getRangeValue(0)).x1((function(t,e){return r.getRangeValue(t,e)})).y((function(t,e){return r.getDomainValue(t,e)}));var o=this.model.getGroupedData(),s=n.selectAll("path.area").data(o,(function(t){return t.name}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).attr("fill",(function(t){return e.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Wa.opacity.selected).attr("class","area").attr("d",(function(t){var e=t.data;return a(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Qp),mg=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.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t[0][r]!==n.datum().name?Wa.opacity.unselected:Wa.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Wa.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this.getContainerSVG({withinChartClip:!0}),n=this,i=this.model.getOptions(),a=i.data.groupMapsTo,o=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),u=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(u)===S.TIME){var c=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),l=this.model.getStackedData({percentage:c}),h=e.selectAll("path.area").data(l,(function(t){return t[0][a]}));this.areaGenerator=jl().x((function(t){return o(new Date(t.data.sharedStackKey))})).y0((function(t){return s(t[0])})).y1((function(t){return s(t[1])})).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(l,(function(t){return t[0][a]})).attr("fill",(function(t){return n.model.getFillColor(t[0][a])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Wa.opacity.selected).attr("class","area").attr("d",this.areaGenerator)}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Qp),yg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.model.getOptions(),n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=ff.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}(Qp),_g=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.model.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG({withinChartClip:!0}).selectAll("path.bar").data(this.model.getDisplayData(),(function(t){return t[n]}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r=e.getBarWidth(),i=e.services.cartesianScales.getDomainValue(t,n)-r/2,a=i+r,o=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);if(!e.isOutsideZoomedDomain(i,a))return ia.generateSVGPathString({x0:i,x1:a,y0:o,y1:s},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.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=ua(this);r.classed("hovered",!0),r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return as(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOVER,{element:r,datum:n}),e.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(t){ua(this);e.services.events.dispatchEvent(U.Bar.BAR_MOUSEMOVE,{element:ua(this),datum:t}),e.services.events.dispatchEvent(U.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(U.Bar.BAR_CLICK,{element:ua(this),datum:t})})).on("mouseout",(function(n){var r=ua(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(yg),bg=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.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var o=this.getContainerSVG({withinChartClip:!0}),s=xo(n,(function(t){return t[a]})).keys(),u=o.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var c=u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-labelledby",(function(t){return t})).merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===E.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("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.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);if(!e.isOutsideZoomedDomain(r,a))return ia.generateSVGPathString({x0:r,x1:a,y0:o,y1:s},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,e=this.model.getOptions().data.groupMapsTo;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=ua(this);r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return as(t.model.getFillColor(n[e])).darker(.7).toString()})),t.services.events.dispatchEvent(U.Bar.BAR_MOUSEOVER,{element:r,datum:n}),t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(e){var n=ua(this);t.services.events.dispatchEvent(U.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(U.Bar.BAR_CLICK,{element:ua(this),datum:e})})).on("mouseout",(function(e){var n=ua(this);n.classed("hovered",!1);var r=t.model.getOptions().data.groupMapsTo;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillColor(e[r])})),t.services.events.dispatchEvent(U.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier();return e.filter((function(e){return e[n]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getActiveDataGroupNames().length,e=this.getTotalGroupPadding();return this.getBarWidth()*t+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getActiveDataGroupNames().length;if(1===t)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t-1)},e.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=ia.getProperty(t,"bars","width"),n=ia.getProperty(t,"bars","maxWidth");if(null!==e){if(null===n)return e;if(e<=n)return e}var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),a=this.services.cartesianScales.getDomainScale();return Math.min(n,(a.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=Ho().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(yg),xg=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;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG({withinChartClip:!0}),i=(this.model.getDisplayData(),this.model.getOptions()),a=i.data.groupMapsTo,o=(this.services.cartesianScales.getDomainIdentifier(),this.model.getStackedData()),s=n.selectAll("g.bars").data(o,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-label","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("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),c=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(o,s))return Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===E.VERTICAL?c+=1:c-=1),ia.generateSVGPathString({x0:o,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r,i=ua(this);i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return as(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOVER,{element:i,datum:n});var a=e.model.getDisplayData(),o=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier(),u=a.find((function(e){return e[s]===n.data[n.group]&&e[o].toString()===n.data.sharedStackKey&&e[t]===n.group}));void 0===u&&((r={})[o]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,u=r),e.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:i,data:[u]})})).on("mousemove",(function(t){var n=ua(this);e.services.events.dispatchEvent(U.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(U.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(U.Bar.BAR_CLICK,{element:ua(this),datum:t})})).on("mouseout",(function(n){var r=ua(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(yg),wg=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.model.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(U.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(U.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(),n=this.model.get("zoomDomain");return void 0!==n?t.filter((function(t){return t[e]>n[0]&&t[e]<n[1]})):t},e.prototype.render=function(t){var e,n=this.getContainerSVG({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier();if(this.configs.stacked){var s=Object.keys(r.axes).some((function(t){return r.axes[t].percentage}));e=this.model.getStackedData({percentage:s})}else e=this.model.getDisplayData().filter((function(t){return void 0!==t[o]&&null!==t[o]}));e=this.filterBasedOnZoomDomain(e);var u=n.selectAll("circle.dot").data(e,(function(t){return t[i]+"-"+t[a]}));u.exit().attr("opacity",0).remove();var c=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u);this.styleCircles(c,t),this.addEventListeners()},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=ia.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),a=i[0],o=i[1],s=ia.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.getRangeValue(t,e)}),r),u=s[0],c=s[1],l=u(t,e),h=c(t,e);return o&&a?h<=o.scaleValue&&l>=a.scaleValue:o?h<=o.scaleValue:a?l>=a.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.points,o=a.filled,s=a.fillOpacity,u=this.services,c=u.cartesianScales,l=u.transitions,h=i.data.groupMapsTo,f=c.getDomainIdentifier(),d=c.getRangeIdentifier(),p=ia.flipDomainAndRangeBasedOnOrientation((function(t,e){return c.getDomainValue(t,e)}),(function(t,e){return c.getRangeValue(t,e)}),c.getOrientation()),g=p[0],v=p[1],m=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[h],t[f],t,o)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[h],t[f],t,o)})).transition(l.getTransition("scatter-update-enter",e)).attr("cx",g).attr("cy",v).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[h],t[f],t,o))return n.model.getFillColor(t[h],t[f],t)})).attr("fill-opacity",o?s:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[h],t[f],t)})).attr("opacity",m?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[d]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover",(function(r){var i=ua(this);i.classed("hovered",!0).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)}));var a=t.services.cartesianScales.getDomainValue(r),o=t.services.cartesianScales.getRangeValue(r),s=t.model.getDisplayData().filter((function(e){return a===t.services.cartesianScales.getDomainValue(e)&&o===t.services.cartesianScales.getRangeValue(e)}));t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:i,data:s}),t.services.events.dispatchEvent(U.Scatter.SCATTER_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=ua(this);t.services.events.dispatchEvent(U.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(U.Scatter.SCATTER_CLICK,{element:ua(this),datum:e})})).on("mouseout",(function(e){var n=ua(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(U.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(U.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(U.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Qp),Eg=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.model.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),a=ff.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),o=i.length>0,s=o?Mo(i):[1,1];return gu().domain(s).range(o?e.bubble.radiusRange(a,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.bubble.radiusMapsTo,o=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales.getDomainIdentifier();t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return o(t[a]||1)})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("opacity",1)},e}(wg),Sg=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?Fa.opacity.unselected:Fa.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Fa.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.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=ia.flipDomainAndRangeBasedOnOrientation((function(t,e){return a.getDomainValue(t,e)}),(function(t,e){return a.getRangeValue(t,e)}),a.getOrientation()),u=s[0],c=s[1],l=this.model.getOptions(),h=Gl().x(u).y(c).curve(o.getD3Curve()).defined((function(t,e){var n=t[a.getRangeIdentifier()];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(l.axes).some((function(t){return l.axes[t].percentage})),p=l.data.groupMapsTo,g=this.model.getStackedData({percentage:d}),v=this.services.cartesianScales.getDomainIdentifier(),m=this.services.cartesianScales.getRangeIdentifier();f=g.map((function(t){return{name:t[0][p],data:t.map((function(t){var e;return(e={})[v]=t.data.sharedStackKey,e[p]=t[p],e[m]=t[1],e})),hidden:!ia.some(t,(function(t){return t[0]!==t[1]}))}}))}else f=this.model.getGroupedData();var y=n.selectAll("path.line").data(f,(function(t){return t.name}));y.exit().attr("opacity",0).remove(),y.enter().append("path").classed("line",!0).attr("opacity",0).merge(y).data(f,(function(t){return t.name})).attr("stroke",(function(t,n){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){var n=t.data,r=e.services.cartesianScales.getRangeIdentifier();return n.map((function(t){return t[r]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",(function(t){return t.hidden?0:1})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Qp),Og=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.getContainerSVG({withinChartClip:!0}),n=this.model.getOptions(),i=n.data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier(),s=Object.keys(n.axes).some((function(t){return n.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),c=e.selectAll("g.dots").data(u,(function(t){return t[0][i]}));c.exit().attr("opacity",0).remove();var l=c.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(c).selectAll("circle.dot").data((function(t){return t}));l.exit().attr("opacity",0).remove();var h=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).datum((function(t){var e,n=t[i];return(e={})[i]=n,e[a]=t.data.sharedStackKey,e[o]=t[1],e}));this.styleCircles(h,t),this.addEventListeners()},e}(wg);function Tg(t,e){var n=this,r=Ps(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Mg=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.model.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),a=this.model.getOptions(),o=a.data.groupMapsTo,s=this.computeRadius();this.arc=Il().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=Il().innerRadius(this.getInnerRadius()).outerRadius(s+a.pie.hoverArc.outerRadiusOffset);var u=function(){var t=zl,e=Hl,n=null,r=gl(0),i=gl(Ol),a=gl(0);function o(o){var s,u,c,l,h,f=o.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(Ol,Math.max(-Ol,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,a.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=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,c=d?(m-f*_)/d:0;s<f;++s,v=l)u=p[s],l=v+((h=g[u])>0?h*c:0)+_,g[u]={data:o[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:y};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:gl(+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:gl(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:gl(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:gl(+t),o):a},o}().value((function(t){return t.value})).sort(null).padAngle(a.pie.padAngle)(i).sort((function(t,e){return t.index-e.index})),c=ff.appendOrSelect(n,"g.slices").attr("role",r.GROUP).attr("aria-label","slices").selectAll("path.slice").data(u,(function(t){return t.data[o]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return e.model.getFillColor(t.data[o])})).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+", "+ia.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return Tg.bind(this)(t,e.arc)}));var l=u.filter((function(t){return t.value>0})),h=ff.appendOrSelect(n,"g.labels").attr("role",r.GROUP).attr("aria-label","labels").selectAll("text.pie-label").data(l,(function(t){return t.data[o]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return a.pie.labels.formatter?a.pie.labels.formatter(t):ia.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+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=l.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<a.pie.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+a.pie.callout.offsetX+a.pie.callout.textMargin+t.textOffsetX,o=t.yPosition-a.pie.callout.offsetY,t.direction=D.RIGHT,d.push(t)):(i=t.xPosition-a.pie.callout.offsetX-t.textOffsetX-a.pie.callout.textMargin,o=t.yPosition-a.pie.callout.offsetY,t.direction=D.LEFT,d.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(d);var p=ia.getProperty(a,"donut")?"donut":"pie",g=ia.getProperty(a,p,"alignment"),v=ff.getSVGElementSize(this.getParent(),{useAttr:!0}).width,m=s+a.pie.xOffset;g===M.CENTER?m=v/2:g===M.RIGHT&&(m=v-s-a.pie.xOffset);var y=s+a.pie.yOffset;d.length>0&&(y+=a.pie.yOffsetCallout),n.attr("transform","translate("+m+", "+y+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=ff.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP).attr("aria-label","callouts"),n=this.model.getOptions(),i=e.selectAll("g.callout").data(t);i.exit().remove();var a=i.enter().append("g").classed("callout",!0).attr("role",r.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");a.merge(i).datum((function(t){var e=t.xPosition,r=t.yPosition;return t.direction===D.RIGHT?(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e+n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-n.pie.callout.horizontalLineLength):(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e-n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+n.pie.callout.horizontalLineLength),t})),a.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return ua(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})),a.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return ua(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=ua(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(U.Pie.SLICE_MOUSEOVER,{element:ua(this),datum:e});var r=t.model.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value,color:t.model.getStrokeColor(e.data[r])}]})})).on("mousemove",(function(e){var n=ua(this);t.services.events.dispatchEvent(U.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(U.Pie.SLICE_CLICK,{element:ua(this),datum:e})})).on("mouseout",(function(e){var n=ua(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(U.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=ff.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e}(Qp),Ag=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(){return ia.clamp(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.model.getOptions();return ia.getProperty(t,"gauge","type")===I.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.model.getOptions();switch(ia.getProperty(e,"gauge","deltaArrow","direction")){case N.UP:return"4,10 8,6 12,10";case N.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.model.getOptions().data.groupMapsTo,a=this.getValue(),o=this.getValueRatio(),s=this.getArcSize(),u=this.getStartAngle(),c=u+o*s,l=u+s,h=this.computeRadius(),f=this.getInnerRadius();this.backgroundArc=Il().innerRadius(f).outerRadius(h).startAngle(c).endAngle(l),this.arc=Il().innerRadius(f).outerRadius(h).startAngle(u).endAngle(c),ff.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var d=n.selectAll("path.arc-foreground").data([a]);d.enter().append("path").attr("class","arc-foreground").merge(d).attr("d",this.arc).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),n.attr("transform","translate("+h+", "+h+")"),this.drawValueNumber(),this.drawDelta(),d.exit().remove(),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=ia.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),a=this.computeRadius(),o=ia.getProperty(e,"gauge","valueFontSize"),s=ia.getProperty(e,"gauge","deltaFontSize"),u=ia.getProperty(e,"gauge","numberSpacing"),c=0;n!==I.FULL||i?n===I.SEMI&&i&&(c=-(s(a)+u)):c=s(a);var l=ff.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),h=ff.appendOrSelect(l,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=ia.getProperty(e,"gauge","numberFormatter"),d=h.selectAll("text.gauge-value-number").data([r]);d.enter().append("text").attr("class","gauge-value-number").merge(d).style("font-size",o(a)+"px").attr("text-anchor","middle").text((function(t){return f(t)}));var p=ff.getSVGElementSize(ff.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;ff.appendOrSelect(h,"text.gauge-value-symbol").style("font-size",o(a)/2+"px").attr("x",p/2).text("%")},e.prototype.drawDelta=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=this.getDelta(),r=this.computeRadius(),i=n?ia.getProperty(e,"gauge","deltaFontSize"):function(){return 0},a=n?ia.getProperty(e,"gauge","numberFormatter"):function(){return null},o=ia.getProperty(e,"gauge","deltaArrow","size"),s=ia.getProperty(e,"gauge","numberSpacing"),u=ff.appendOrSelect(t,"g.gauge-numbers"),c=ff.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),l=ff.appendOrSelect(c,"text.gauge-delta-number");l.data(null===n?[]:[n]),l.enter().append("text").classed("gauge-delta-number",!0).merge(l).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return a(t)+"%"}));var h=ff.getSVGElementSize(ff.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=ia.getProperty(e,"gauge","deltaArrow","enabled"),d=c.selectAll("svg.gauge-delta-arrow").data(null!==n&&f?[n]:[]);d.enter().append("svg").merge(d).attr("class","gauge-delta-arrow").attr("x",-o(r)-h/2).attr("y",-o(r)/2-.35*i(r)).attr("width",o(r)).attr("height",o(r)).attr("viewBox","0 0 16 16"),ff.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=ia.getProperty(e,"gauge","status");ff.appendOrSelect(d,"polygon.gauge-delta-arrow").classed("status--"+p,null!==p).attr("fill",(function(){return null===p?"currentColor":null})).attr("points",this.getArrow(n)),d.exit().remove(),l.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-ia.getProperty(this.model.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc").on("mouseover",(function(e){t.services.events.dispatchEvent(U.Gauge.ARC_MOUSEOVER,{element:ua(this),datum:e})})).on("mousemove",(function(e){var n=ua(this);t.services.events.dispatchEvent(U.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(U.Gauge.ARC_CLICK,{element:ua(this),datum:e})})).on("mouseout",(function(e){var n=ua(this);t.services.events.dispatchEvent(U.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=ia.getProperty(t,"gauge","type"),n=ff.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===I.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Qp),Cg=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=ff.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),a=this.computeRadius();ff.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(ua(this))})),ff.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(ia.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=ia.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?Ds:Os)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Mg),Pg=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=ff.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var a=ia.getProperty(this.model.getOptions(),"data","loading");a?this.renderSkeleton(a):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===k.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===k.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===k.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==k.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===E.VERTICAL&&this.drawYGrid(t),e===E.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=gu().domain([0,1]).range(t),this.yScale=gu().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=ff.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;this.backdrop=ff.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",a);var o=ff.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],c=(s[1],this.yScale.range()),l=(c[0],c[1]);this.backdrop.merge(o).attr("x",u).attr("y",l),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=ia.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),a=ff.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=ia.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),a=ff.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=ff.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),a=i.width,o=i.height,s=ff.appendOrSelect(r,"svg.chart-skeleton").attr("width",a).attr("height",o),u=this.model.getOptions().pie,c=(ff.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",a).attr("height",o).attr("fill","none"),Il().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI)),l=t+Math.abs(u.radiusOffset),h=t+(Math.min(a,o)-2*t)/2;ff.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+l+", "+h+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n)},e.prototype.computeOuterRadius=function(){var t=this.model.getOptions(),e=ff.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=ff.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=ff.appendOrSelect(e,"defs").lower(),a=ff.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(wd).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Qp),Dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||Xa.default.size).attr("height",this.configs.size||Xa.default.size).attr("opacity",0)},e}(Qp);function kg(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 Lg(t,e){var n,r,i,a,o,s=new Vg(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Rg);n=c.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)c.push(r=n.children[a]=new Vg(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ng)}function Rg(t){return t.children}function Ig(t){t.data=t.data.data}function Ng(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Vg(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ug(t){if("function"!=typeof t)throw new Error;return t}function Bg(){return 0}function Gg(t){return function(){return t}}function jg(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 Hg(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function zg(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}Vg.prototype=Lg.prototype={constructor:Vg,count:function(){return this.eachAfter(kg)},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 Lg(this).eachBefore(Ig)}};var Fg=function t(e){function n(t,n,r,i,a){!function(t,e,n,r,i,a){for(var o,s,u,c,l,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,c=a-r;do{l=y[b++].value}while(!l&&b<x);for(h=f=l,v=l*l*(g=Math.max(c/u,u/c)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(l+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=l*l*g,(d=Math.max(f/v,v/h))>p){l-=s;break}p=d}m.push(o={value:l,dice:u<c,children:y.slice(_,b)}),o.dice?Hg(o,n,r,i,w?r+=c*l/w:a):zg(o,n,r,w?n+=u*l/w:i,a),w-=l,_=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 Wg(){var t=Fg,e=!1,n=1,r=1,i=[0],a=Bg,o=Bg,s=Bg,u=Bg,c=Bg;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(jg),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=c(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Ug(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Gg(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Gg(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Gg(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Gg(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:Gg(+t),l):c},l}var Yg=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===C.ROW_REVERSE||o.configs.direction===C.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=ia.getProperty(t,"data","growth","x");return e===P.PREFERRED||e===P.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 ia.getProperty(t,"data","growth","x")===P.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=ff.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height,o=Lg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===C.ROW||this.configs.direction===C.ROW_REVERSE?Hg:zg;Wg().tile(s).size([i,a])(o);var u=this.configs.direction===C.ROW||this.configs.direction===C.ROW_REVERSE,c=n.selectAll("svg.layout-child-"+this._instanceID).data(o.leaves(),(function(t){return t.data.id}));c.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),c.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(ua(n));var i=ia.getProperty(e,"data","growth","x");i!==P.PREFERRED&&i!==P.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=ia.getProperty(t,"data","growth","x"),n=ff.getSVGElementSize(ua(this),{useBBox:!0});if("legend"===t.data.id){var r=ff.getSVGElementSize(ua(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===P.PREFERRED){var o=u?n.width:n.height,s=u?i:a;t.data.size=o/s*100}})),c.exit().remove(),this.children.filter((function(t){return ia.getProperty(t,"growth","x")===P.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),o=Lg({children:this.children}).sum((function(t){return t.size})),Wg().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){ia.getProperty(e,"data","growth","x")===P.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}(Qp),qg=Array.prototype.slice;function Xg(t){return t}function Zg(t){return"translate("+(t+.5)+",0)"}function Kg(t){return"translate(0,"+(t+.5)+")"}function $g(t){return function(e){return+t(e)}}function Qg(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Jg(){return!this.__axis}function tv(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",l=1===t||3===t?Zg:Kg;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Xg:i,p=Math.max(a,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?Qg:$g)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),E=x.enter().append("g").attr("class","tick"),S=x.select("line"),O=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),S=S.merge(E.append("line").attr("stroke","currentColor").attr(c+"2",u*a)),O=O.merge(E.append("text").attr("fill","currentColor").attr(c,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),S=S.transition(h),O=O.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?l(t):this.getAttribute("transform")})),E.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.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 l(y(t))})),S.attr(c+"2",u*a),O.attr(c,u*p).text(d),_.filter(Jg).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=qg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:qg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:qg.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 ev(t){return tv(1,t)}function nv(t){return tv(2,t)}function rv(t){return tv(3,t)}function iv(t){return tv(4,t)}var av=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",i.zoomDomainChanging=!1,i.handleZoomBarSelectionStart=function(){i.zoomDomainChanging=!0},i.handleZoomBarSelectionEnd=function(){i.zoomDomainChanging=!1,i.services.events.dispatchEvent(U.Model.UPDATE)},r&&(i.configs=r),i.margins=i.configs.margins,i.init(),i}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(U.ZoomBar.SELECTION_START,this.handleZoomBarSelectionStart),this.services.events.addEventListener(U.ZoomBar.SELECTION_END,this.handleZoomBarSelectionEnd)},e.prototype.render=function(t){void 0===t&&(t=!0);var e,n,i=this.configs.position,a=this.model.getOptions(),o=ia.getProperty(a,"axes",i),s=ia.getProperty(o,"scaleType"),u=ia.getProperty(a,"data","loading"),c=ia.getProperty(o,"ticks","number"),l=ia.getProperty(o,"ticks","values"),h=ia.getProperty(o,"truncation","type"),f=ia.getProperty(o,"truncation","threshold"),d=ia.getProperty(o,"truncation","numCharacter"),p=null!==c,g=i===x.LEFT||i===x.RIGHT,v=ia.getProperty(a,"timeScale"),m=this.getContainerSVG(),y=ff.getSVGElementSize(this.parent,{useAttrs:!0}),_=y.width,b=y.height;i===x.BOTTOM||i===x.TOP?(e=this.configs.axes[x.LEFT]?this.margins.left:0,n=this.configs.axes[x.RIGHT]?_-this.margins.right:_):(e=b-this.margins.bottom,n=this.margins.top);var E,O=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===S.LABELS?O.rangeRound([e,n]):O.range([e,n]),i){case x.LEFT:E=iv;break;case x.BOTTOM:E=rv;break;case x.RIGHT:E=nv;break;case x.TOP:E=ev}var T=ff.appendOrSelect(m,"g.axis."+i);T.attr("aria-label",i+" axis");var M=!T.select("g.ticks").empty(),A=ff.appendOrSelect(T,"g.ticks");M||(A.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),A.attr("aria-label",i+" ticks"));var C=ff.appendOrSelect(T,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),P=ff.appendOrSelect(C,"g.tick"),D=ff.appendOrSelect(P,"text").text("0"),k=ff.getSVGElementSize(D.node(),{useBBox:!0}).height;P.remove();var L=this.scaleType===S.TIME||o.scaleType===S.TIME,R=this.scaleType||o.scaleType||S.LINEAR,I=this.model.get("zoomDomain");I&&L&&!g&&O.domain(I);var N,V=E(O).tickSizeOuter(0);if(O.ticks){var U=void 0;if(p?U=c:(U=qa.ticks.number,g&&(U=this.getNumberOfFittingTicks(b,k,2.5))),1===O.ticks().length&&0===O.ticks()[0]&&(U=0),V.ticks(U),L)if(O.ticks(U).length){var B=ia.getProperty(a,"timeScale","addSpaceOnEdges"),G=ia.getProperty(a,"axes",i,"domain"),j=void 0,H=O.copy();B&&!G&&H.nice(U),j=H.ticks(U),B&&j.length>2&&!G&&(j.splice(j.length-1,1),j.splice(0,1)),V.tickValues(j)}else V.tickValues([])}var z=ia.getProperty(o,"ticks","formatter");if(L){var F=sg(V.tickValues());N=null===z?function(t,e){return ag(t,e,F,v)}:function(t,e){var n=ag(t,e,F,v);return z(t,e,n)}}else null===z?R===S.LINEAR&&(N=function(t){return t.toLocaleString()}):N=z;switch(V.tickFormat(N),l&&V.tickValues(l),i){case x.LEFT:A.attr("transform","translate("+this.margins.left+", 0)");break;case x.BOTTOM:A.attr("transform","translate(0, "+(b-this.margins.bottom)+")");break;case x.RIGHT:A.attr("transform","translate("+(_-this.margins.right)+", 0)");break;case x.TOP:A.attr("transform","translate(0, "+this.margins.top+")")}var W=this.model.isDataEmpty();if(o.title){var Y=ff.appendOrSelect(T,"text.axis-title").html(W||u?"":o.title);switch(i){case x.LEFT:Y.attr("transform","rotate(-90)").attr("y",0).attr("x",-O.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case x.BOTTOM:Y.attr("transform","translate("+(this.margins.left/2+O.range()[1]/2)+", "+b+")").style("text-anchor","middle");break;case x.RIGHT:Y.attr("transform","rotate(90)").attr("y",-_).attr("x",O.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case x.TOP:var q=ff.getSVGElementSize(Y,{useBBox:!0}).height;Y.attr("transform","translate("+(this.margins.left/2+O.range()[1]/2)+", "+q/2+")").style("text-anchor","middle")}}if(L){var X=sg(V.tickValues()),Z=v.showDayName,K=A;t&&(A=A.transition(this.services.transitions.getTransition("axis-update",t))),A=A.call(V),K.selectAll(".tick").data(V.tickValues(),O).order().select("text").style("font-weight",(function(t,e){return ig(t,e,X,Z)?"bold":"normal"}))}else A=t&&M?A.transition(this.services.transitions.getTransition("axis-update")).call(V):A.call(V);if(C.call(V),i===x.BOTTOM||i===x.TOP){var $=!1;if(O.step){$=C.selectAll("g.tick text").nodes().some((function(t){return ff.getSVGElementSize(t,{useBBox:!0}).width>=O.step()}))}else{var Q=ia.getProperty(o,"ticks","rotateIfSmallerThan")||qa.ticks.rotateIfSmallerThan,J=_/(L?V.tickValues().length:O.ticks().length)/2;$=L?J<2*Q:J<Q}$||this.zoomDomainChanging?(p||(V.ticks(this.getNumberOfFittingTicks(_,k,3.5)),C.call(V),A.call(V)),T.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===x.TOP?"start":"end")):T.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(u?T.attr("opacity",0):T.attr("opacity",1),A.selectAll("g.tick").attr("aria-label",(function(t){return t})),C.selectAll("g.tick").attr("aria-label",(function(t){return t})),h!==w.NONE&&s===S.LABELS&&!l){var tt=this.model.getDataValuesGroupedByKeys();if(tt.length>0){var et=tt.map((function(t){return t.sharedStackKey})),nt=m.select("g.axis."+i+" g.ticks g.tick").html();T.selectAll("g.ticks g.tick").html(nt),T.selectAll("g.tick text").data(et).text((function(t){return t.length>f?ia.truncateLabel(t,h,d):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(et).text((function(t){return t.length>f?ia.truncateLabel(t,h,d):t})),T.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),T.selectAll("g.tick text").data(et)}}this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=ff.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=ia.getProperty(r,"axes",e),a=ia.getProperty(i,"scaleType"),o=ia.getProperty(i,"truncation","threshold"),s=(this.scaleType===S.TIME||(i.scaleType,S.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_MOUSEOVER,{element:ua(this),datum:t}),a===S.LABELS&&t.length>o&&s.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:ua(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_MOUSEMOVE,{element:ua(this),datum:t}),a===S.LABELS&&t.length>o&&s.services.events.dispatchEvent(U.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_CLICK,{element:ua(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_MOUSEOUT,{element:ua(this),datum:t}),a===S.LABELS&&s.services.events.dispatchEvent(U.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 ia.clamp(r,2,qa.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;ff.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null),this.services.events.removeEventListener(U.ZoomBar.SELECTION_START,this.handleZoomBarSelectionStart),this.services.events.removeEventListener(U.ZoomBar.SELECTION_END,this.handleZoomBarSelectionEnd)},e}(Qp),ov=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(x),i=ia.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[x[t]]&&(n[x[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=x[t];if(e.configs.axes[n]&&!e.children[n]){var r=new av(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(n){var r,i=e.children[n],o=i.configs.position,s=i.getInvisibleAxisRef(),u=ff.getSVGElementSize(s,{useBBox:!0}),c=u.width,l=u.height;switch(r=i.getTitleRef().empty()?0:ff.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,o){case x.TOP:a.top=l+r;break;case x.BOTTOM:a.bottom=l+r;break;case x.LEFT:a.left=c+r;break;case x.RIGHT:a.right=c+r}e.addAxisThresholds(t,o)})),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(U.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e.prototype.addAxisThresholds=function(t,e){var n=this,r=ia.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new hg(n.model,n.services,y(y({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(Qp);function sv(){Zi.preventDefault(),Zi.stopImmediatePropagation()}function uv(t){var e=t.document.documentElement,n=ua(t).on("dragstart.drag",sv,!0);"onselectstart"in e?n.on("selectstart.drag",sv,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function cv(t,e){var n=t.document.documentElement,r=ua(t).on("dragstart.drag",null);e&&(r.on("click.drag",sv,!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 lv(t){return function(){return t}}function hv(t,e,n){this.target=t,this.type=e,this.selection=n}function fv(){Zi.stopImmediatePropagation()}function dv(){Zi.preventDefault(),Zi.stopImmediatePropagation()}var pv={name:"drag"},gv={name:"space"},vv={name:"handle"},mv={name:"center"};function yv(t){return[+t[0],+t[1]]}function _v(t){return[yv(t[0]),yv(t[1])]}function bv(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=ca().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return la(t,r);return null}(e,Zi.touches,t)}}var xv={name:"x",handles:["w","e"].map(Av),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]]}},wv={name:"y",handles:["n","s"].map(Av),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]]}},Ev={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"},Sv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Ov={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Tv={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Mv={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Av(t){return{type:t}}function Cv(){return!Zi.ctrlKey&&!Zi.button}function Pv(){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 Dv(){return navigator.maxTouchPoints||"ontouchstart"in this}function kv(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Lv(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Rv(){return function(t){var e,n=Pv,r=Cv,i=Dv,a=!0,o=gf("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([Av("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ev.overlay).merge(n).each((function(){var t=kv(this).extent;ua(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([Av("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ev.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 Ev[t.type]})),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=ua(this),e=kv(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 l(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 f(){if((!e||Zi.touches)&&r.apply(this,arguments)){var n,i,o,s,u,h,f,d,p,g,v,m=this,y=Zi.target.__data__.type,_="selection"===(a&&Zi.metaKey?y="overlay":y)?pv:a&&Zi.altKey?mv:vv,b=t===wv?null:Tv[y],x=t===xv?null:Mv[y],w=kv(m),E=w.extent,S=w.selection,O=E[0][0],T=E[0][1],M=E[1][0],A=E[1][1],C=0,P=0,D=b&&x&&a&&Zi.shiftKey,k=Zi.touches?bv(Zi.changedTouches[0].identifier):ha,L=k(m),R=L,I=l(m,arguments,!0).beforestart();"overlay"===y?(S&&(p=!0),w.selection=S=[[n=t===wv?O:L[0],o=t===xv?T:L[1]],[u=t===wv?M:n,f=t===xv?A:o]]):(n=S[0][0],o=S[0][1],u=S[1][0],f=S[1][1]),i=n,s=o,h=u,d=f;var N=ua(m).attr("pointer-events","none"),V=N.selectAll(".overlay").attr("cursor",Ev[y]);if(Zi.touches)I.moved=B,I.ended=j;else{var U=ua(Zi.view).on("mousemove.brush",B,!0).on("mouseup.brush",j,!0);a&&U.on("keydown.brush",H,!0).on("keyup.brush",z,!0),uv(Zi.view)}fv(),Ff(m),c.call(m),I.start()}function B(){var t=k(m);!D||g||v||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?v=!0:g=!0),R=t,p=!0,dv(),G()}function G(){var t;switch(C=R[0]-L[0],P=R[1]-L[1],_){case gv:case pv:b&&(C=Math.max(O-n,Math.min(M-u,C)),i=n+C,h=u+C),x&&(P=Math.max(T-o,Math.min(A-f,P)),s=o+P,d=f+P);break;case vv:b<0?(C=Math.max(O-n,Math.min(M-n,C)),i=n+C,h=u):b>0&&(C=Math.max(O-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,d=f):x>0&&(P=Math.max(T-f,Math.min(A-f,P)),s=o,d=f+P);break;case mv:b&&(i=Math.max(O,Math.min(M,n-C*b)),h=Math.max(O,Math.min(M,u+C*b))),x&&(s=Math.max(T,Math.min(A,o-P*x)),d=Math.max(T,Math.min(A,f+P*x)))}h<i&&(b*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in Sv&&V.attr("cursor",Ev[y=Sv[y]])),d<s&&(x*=-1,t=o,o=f,f=t,t=s,s=d,d=t,y in Ov&&V.attr("cursor",Ev[y=Ov[y]])),w.selection&&(S=w.selection),g&&(i=S[0][0],h=S[1][0]),v&&(s=S[0][1],d=S[1][1]),S[0][0]===i&&S[0][1]===s&&S[1][0]===h&&S[1][1]===d||(w.selection=[[i,s],[h,d]],c.call(m),I.brush())}function j(){if(fv(),Zi.touches){if(Zi.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else cv(Zi.view,p),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),V.attr("cursor",Ev.overlay),w.selection&&(S=w.selection),Lv(S)&&(w.selection=null,c.call(m)),I.end()}function H(){switch(Zi.keyCode){case 16:D=b&&x;break;case 18:_===vv&&(b&&(u=h-C*b,n=i+C*b),x&&(f=d-P*x,o=s+P*x),_=mv,G());break;case 32:_!==vv&&_!==mv||(b<0?u=h-C:b>0&&(n=i-C),x<0?f=d-P:x>0&&(o=s-P),_=gv,V.attr("cursor",Ev.selection),G());break;default:return}dv()}function z(){switch(Zi.keyCode){case 16:D&&(g=v=D=!1,G());break;case 18:_===mv&&(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=vv,G());break;case 32:_===gv&&(Zi.altKey?(b&&(u=h-C*b,n=i+C*b),x&&(f=d-P*x,o=s+P*x),_=mv):(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=vv),V.attr("cursor",Ev[y]),G());break;default:return}dv()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=_v(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Ps(a,o);function u(t){r.selection=1===t&&null===o?null:s(t),c.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=l(e,r).beforestart();Ff(e),i.selection=null===a?null:a,c.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=Zi;t.sourceEvent=Zi,Zi=t;try{e.apply(n,r)}finally{Zi=i}}(new hv(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:lv(_v(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:lv(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:lv(!!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}(xv)}var Iv=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=ff.appendOrSelect(r,"svg.chart-grid-backdrop"),o=ff.appendOrSelect(a,"g."+this.type),s=ff.appendOrSelect(o,this.selectionSelector),u=ff.getSVGElementSize(a,{useAttrs:!0}),c=u.width,l=u.height,h=this.services.cartesianScales,f=h.getMainXScaleType(),d=h.getMainXScale(),p=d.range(),g=p[0];p[1];i.attr("transform","translate("+g+",0)");var v=ff.appendOrSelect(i,this.frontSelectionSelector);if(d&&f===S.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain(),this.model.set({zoomDomain:m},{animate:!1}));var y=Rv().extent([[0,0],[c-1,l]]).on("start brush end",(function(){var t=Zi.selection;if(null!==t){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(l/e.DASH_LENGTH),a=i*e.DASH_LENGTH,o=0;o<i;o++)r+=","+e.DASH_LENGTH;r+=","+(l-a),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+l.toString(),v.attr("stroke-dasharray",r)}(t);var r=cl().range([0,c]).domain(m),i=[r.invert(t[0]),r.invert(t[1])];if(null!=t&&null!=Zi.sourceEvent&&("mousemove"===Zi.sourceEvent.type||"mouseup"===Zi.sourceEvent.type||"mousedown"===Zi.sourceEvent.type)){var a=void 0;"start"===Zi.type?a=U.ZoomBar.SELECTION_START:"brush"===Zi.type?a=U.ZoomBar.SELECTION_IN_PROGRESS:"end"===Zi.type&&(a=U.ZoomBar.SELECTION_END),n.services.events.dispatchEvent(a,{selection:t,newDomain:i})}}})).on("end.brushed",(function(){var t=Zi.selection;if(null!==t){var e=cl().range([0,c]).domain(m),r=[e.invert(t[0]),e.invert(t[1])];r[0].valueOf()===r[1].valueOf()&&(r=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===r[0].valueOf()&&m[1].valueOf()===r[1].valueOf()||n.model.set({zoomDomain:r},{animate:!1}),o.call(y.move,null),v.style("display","none")}}));o.call(y)}},e.DASH_LENGTH=4,e}(Qp),Nv=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],c=s[1];this.chartClipPath=ff.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var l=ff.appendOrSelect(this.chartClipPath,"rect."+this.type);l.attr("x",a).attr("y",c).attr("width",o-a).attr("height",u-c),this.chartClipPath.merge(l).lower()},e}(Qp),Vv=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),this.drawBackdrop(),ff.appendOrSelect(this.backdrop,"g.x.grid"),ff.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(t),this.drawYGrid(t)},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=rv(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=ia.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var a=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=iv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=ia.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var a=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(ia.getTranslationValues(t).tx)-Number(ia.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+ia.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=+ia.getTranslationValues(s).tx-+ia.getTranslationValues(o).tx;else{var u=n.select("rect.chart-grid-backdrop").node();a=ff.getSVGElementSize(u).width-+ia.getTranslationValues(o).tx}else a=+ia.getTranslationValues(s).tx;return a*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=ia.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=ia.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],a=r[1],o=n.range(),s=o[0],u=o[1];this.backdrop=ff.appendOrSelect(t,"svg.chart-grid-backdrop");var c=ff.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",a-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(Qp);var Uv,Bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e}return n(e,t),e.prototype.render=function(){this.drawBackdrop(),this.addBackdropEventListeners()},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===E.HORIZONTAL?r:n,s=ff.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=ff.appendOrSelect(s,"line.ruler-line"),c=i.selectAll("[role=graphics-symbol]"),l=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=l.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(U.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=this.services.cartesianScales.getRangeIdentifier(),m=g.map((function(t){return t.originalData})).filter((function(t){var e=t[v];return null!=e})),y=g.map((function(t){return t.domainValue})),_=c.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!ia.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent(U.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(m)}),s.attr("opacity",1);var b=g[0];"horizontal"===a?u.attr("x1",d).attr("x2",f).attr("y1",b.domainValue).attr("y2",b.domainValue):u.attr("y1",d).attr("y2",f).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=ff.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(U.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){var t=this,e=this.model.getDisplayData(),n=function(){var e=ha(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=ia.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],a=r[1],o=n.range(),s=o[0],u=o[1];this.backdrop=ff.appendOrSelect(t,"svg.chart-grid-backdrop");var c=ff.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",a-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e}(Qp),Gv=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.prototype.hideRuler=function(){var t=this.parent,e=ff.appendOrSelect(t,"g.ruler");this.services.events.dispatchEvent(U.Tooltip.HIDE),e.attr("opacity",0)},e}(Bv),jv=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.getRangeScale().domain(),n=e[0],r=e[1];if(n>0&&r<0||n<0&&r>0){var i=this.getContainerSVG(),a=this.services.cartesianScales.getDomainScale().range(),o=a[0],s=a[1],u=+this.services.cartesianScales.getRangeValue(0)+.5;if(!u){var c=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(c).range()[0]}var l=ia.flipSVGCoordinatesBasedOnOrientation({x0:o,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());ff.appendOrSelect(i,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",l.y0).attr("y2",l.y1).attr("x1",l.x0).attr("x2",l.x1)}},e}(Qp),Hv=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=Rv(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(U.ZoomBar.UPDATE,this.render.bind(this));var t=ia.getProperty(this.model.getOptions(),"zoomBar","top","initialZoomDomain");null!==t&&this.model.set({zoomDomain:t},{skipUpdate:!0})},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),r=ia.getProperty(this.model.getOptions(),"data","loading"),i=ff.getSVGElementSize(this.parent,{useAttrs:!0}).width,a=0,o=this.model.get("axesMargins");o&&o.left&&(a=o.left);var s=ff.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",Za.height).attr("opacity",1);ff.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",Za.height).attr("width","100%").attr("height",Za.spacerHeight).attr("opacity",1).attr("fill","none"),ff.appendOrSelect(s,"rect.zoom-bg").attr("x",a).attr("y",0).attr("width",i-a).attr("height","100%");if(!r){var u=this.services.cartesianScales,c=u.getMainXScale(),l=u.getMainYScale(),h=u.getMainXScaleType();if(c&&h===S.TIME){var f=this.services.zoom.getZoomBarData();this.xScale=c.copy(),this.yScale=l.copy();var d=this.services.zoom.getDefaultZoomBarDomain();this.compensateDataForDefaultDomain(f,d),this.xScale.range([a,i]).domain(d),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,Za.height-6]).domain(Mo(f,(function(t){return t.value})));var p=this.model.get("zoomDomain");this.renderZoomBarArea(s,"path.zoom-graph-area-unselected",f,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(s,"path.zoom-graph-area",f,this.clipId);var g=Gl()([[a,Za.height],[i,Za.height]]);ff.appendOrSelect(s,"path.zoom-bg-baseline").attr("d",g);this.addBrushEventListener(p,a,i);var v=ff.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===p);else if(p[0].valueOf()===p[1].valueOf())v.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getContainerSVG(),this.xScale.range(),this.xScale.domain());else{var m=p.map((function(t){return e.xScale(t)}));m[1]-m[0]<this.MIN_SELECTION_DIFF||(v.call(this.brush.move,m),this.updateBrushHandle(this.getContainerSVG(),m,p))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this;this.brush.extent([[e,0],[n,Za.height]]).on("start brush end",null).on("start brush end",(function(){var e=Zi.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!=Zi.sourceEvent&&("mousemove"===Zi.sourceEvent.type||"mouseup"===Zi.sourceEvent.type||"mousedown"===Zi.sourceEvent.type)){void 0!==t&&t[0]===r[0]&&t[1]===r[1]||this.model.set({zoomDomain:r},{animate:!1});var i=void 0;"start"===Zi.type?i=U.ZoomBar.SELECTION_START:"brush"===Zi.type?i=U.ZoomBar.SELECTION_IN_PROGRESS:"end"===Zi.type&&(i=U.ZoomBar.SELECTION_END),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=Za.height,a=(i-12)/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]+-2.5,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+-2.5,r.maxSelectionRange[1]-5):void 0})).attr("y",0).attr("width",5).attr("height",i).attr("cursor","pointer").style("display",null),t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]).join("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+-.5,r.maxSelectionRange[0]- -2.5-.5):"e"===t.type?Math.min(e[1]+-.5,r.maxSelectionRange[1]+-2.5+-.5):void 0})).attr("y",a).attr("width",1).attr("height",12).attr("cursor","pointer"),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],Za.height)},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(),c=function(t,e,n){return function(r,a){return i.getValueFromScale(t,e,n,r,a)}},l=c(this.xScale,s,a),h=c(this.yScale,u,o),f=jl().x((function(t,e){return l(t,e)})).y0(Za.height).y1((function(t,e){return Za.height-h(t,e)})),d=ff.appendOrSelect(t,e).datum(n).attr("d",f);r&&d.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,a){var o=ff.appendOrSelect(t,"clipPath").attr("id",e);ff.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=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(t[0][r]))(n={})[r]=e[0],n[i]=0,t.unshift(n);if(Number(e[1])>Number(t[t.length-1][r]))(n={})[r]=e[1],n[i]=0,t.push(n)}},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(U.ZoomBar.UPDATE,this.render.bind(this))},e}(Qp),zv=function(){function t(t,e){this.services={domUtils:ff,events:df,transitions:Od},this.model=new Gh(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(U.Model.UPDATE,(function(t){var e=!!ia.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(U.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(U.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 fg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},n={id:"legend",components:[new Jp(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},r={id:"graph-frame",components:t,growth:{x:P.STRETCH,y:P.FIXED}},i=!1!==this.model.getOptions().legend.enabled,a=C.COLUMN;if(i){var o=ia.getProperty(this.model.getOptions(),"legend","position");"left"===o?(a=C.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):"right"===o?(a=C.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):"bottom"===o&&(a=C.COLUMN_REVERSE)}var s={id:"spacer",components:[new Dg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},u={id:"full-frame",components:[new Yg(this.model,this.services,_(i?[n]:[],i?[s]:[],[r]),{direction:a})],growth:{x:P.STRETCH,y:P.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Dg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}};c.push(l)}return c.push(u),[new pg(this.model,this.services),new Yg(this.model,this.services,c,{direction:C.COLUMN})]},t}(),Fv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:qp,curves:Kp,zoom:$p}),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e=ia.getProperty(this.model.getOptions(),"zoomBar","top","enabled");this.services.cartesianScales.findDomainAndRangeAxes();var n=this.services.cartesianScales.getMainXAxisPosition(),r=ia.getProperty(this.model.getOptions(),"axes",n,"scaleType"),i=e&&n===x.BOTTOM&&r===S.TIME,a={id:"title",components:[new fg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},o={id:"legend",components:[new Jp(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}};i&&t.push(new Nv(this.model,this.services),new Iv(this.model,this.services));var s={id:"graph-frame",components:t,growth:{x:P.STRETCH,y:P.FIXED}},u=ia.getProperty(this.model.getOptions(),"data","loading"),c=!1!==this.model.getOptions().legend.enabled&&!u,l=C.COLUMN;if(c){var h=ia.getProperty(this.model.getOptions(),"legend","position");h===T.LEFT?(l=C.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):h===T.RIGHT?(l=C.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):h===T.BOTTOM&&(l=C.COLUMN_REVERSE)}var f={id:"spacer",components:[new Dg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},d={id:"full-frame",components:[new Yg(this.model,this.services,_(c?[o]:[],c?[f]:[],[s]),{direction:l})],growth:{x:P.STRETCH,y:P.FIXED}},p={id:"zoom-bar",components:[new Hv(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},g=[];if(this.model.getOptions().title){g.push(a);var v={id:"spacer",components:[new Dg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}};g.push(v)}return i&&g.push(p),g.push(d),[new gg(this.model,this.services),new Yg(this.model,this.services,g,{direction:C.COLUMN})]},e}(zv),Wv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(ia.clone(za.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ov(this.model,this.services),new Vv(this.model,this.services),new Bv(this.model,this.services),new Sg(this.model,this.services),new vg(this.model,this.services),new wg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}(Fv),Yv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(za.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ov(this.model,this.services),new Vv(this.model,this.services),new Bv(this.model,this.services),new mg(this.model,this.services),new Sg(this.model,this.services,{stacked:!0}),new Og(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}(Fv),qv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(za.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ov(this.model,this.services),new Vv(this.model,this.services),new _g(this.model,this.services),new jv(this.model,this.services),new Pg(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Fv),Xv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(za.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ov(this.model,this.services),new Vv(this.model,this.services),new bg(this.model,this.services),new jv(this.model,this.services),new Pg(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Fv),Zv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(za.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ov(this.model,this.services),new Vv(this.model,this.services),new Gv(this.model,this.services),new xg(this.model,this.services),new Pg(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Fv),Kv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(za.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ov(this.model,this.services),new Vv(this.model,this.services),new Bv(this.model,this.services),new Eg(this.model,this.services),new Pg(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}(Fv),$v=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(za.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ov(this.model,this.services),new Vv(this.model,this.services),new Bv(this.model,this.services),new Sg(this.model,this.services),new wg(this.model,this.services,{handleThresholds:!0}),new Pg(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}(Fv),Qv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(za.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ov(this.model,this.services),new Vv(this.model,this.services),new Bv(this.model,this.services),new wg(this.model,this.services),new Pg(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}(Fv),Jv=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}(Gh),tm=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new Jv(i.services),r?i:(i.model.setOptions(ia.mergeDefaultChartOptions(za.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Mg(this.model,this.services),new Pg(this.model,this.services,{skeleton:k.PIE})];return this.getChartComponents(t)},e}(zv),em=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(za.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Cg(this.model,this.services),new Pg(this.model,this.services,{skeleton:k.DONUT})];return this.getChartComponents(t)},e}(tm),nm=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]=Oa.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=ia.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=ia.getProperty(t,"meter","status","ranges");if(n){var r=n.filter((function(t){return t.range[0]<=e&&e<=t.range[1]}));if(r.length>0)return r[0].status}return null},e}(Gh),rm=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){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getOptions(),a=this.model.getDisplayData(),o=this.model.getStatus(),s=ff.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=i.data.groupMapsTo,c=gu().domain([0,100]).range([0,s]);ff.appendOrSelect(n,"rect.container").attr("x",0).attr("y",0).attr("width",s).attr("height",ia.getProperty(i,"meter","height"));var l=a.value<=100?a:a.value=100,h=n.selectAll("rect.value").data([l]),f=ia.getProperty(i,"color","scale");h.enter().append("rect").classed("value",!0).merge(h).attr("x",0).attr("y",0).attr("height",ia.getProperty(i,"meter","height")).classed("status--"+o,null!=o&&!f).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(t.value)})).attr("fill",(function(t){return e.model.getFillColor(t[u])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var d=ia.getProperty(i,"meter","peak"),p=null!==d&&d<l.value?l.value:d,g=null===p?[]:[p],v=n.selectAll("line.peak").data(g);v.enter().append("line").classed("peak",!0).merge(v).attr("y1",0).attr("y2",ia.getProperty(i,"meter","height")).transition(this.services.transitions.getTransition("peak-line-update",t)).attr("x1",(function(t){return c(t)})).attr("x2",(function(t){return c(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),v.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(Qp),im=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new nm(r.services),r.model.setOptions(ia.merge(ia.clone(za.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new rm(this.model,this.services)],growth:{x:P.STRETCH,y:P.FIXED}},e={id:"title",components:[new dg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},n={id:"spacer",components:[new Dg(this.model,this.services,{size:8})],growth:{x:P.PREFERRED,y:P.FIXED}},r=[new Yg(this.model,this.services,[e,n,t],{direction:C.COLUMN})];return this.getChartComponents(r)},e}(zv);function am(t){var e,n=(sm(t)%(e=360)+e)%e;return om(n,[0,10])||om(n,[350,0])?{textAnchor:L.START,dominantBaseline:R.MIDDLE}:om(n,[10,80])?{textAnchor:L.START,dominantBaseline:R.HANGING}:om(n,[80,100])?{textAnchor:L.MIDDLE,dominantBaseline:R.HANGING}:om(n,[100,170])?{textAnchor:L.END,dominantBaseline:R.HANGING}:om(n,[170,190])?{textAnchor:L.END,dominantBaseline:R.MIDDLE}:om(n,[190,260])?{textAnchor:L.END,dominantBaseline:R.BASELINE}:om(n,[260,280])?{textAnchor:L.MIDDLE,dominantBaseline:R.BASELINE}:{textAnchor:L.START,dominantBaseline:R.BASELINE}}function om(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function sm(t){return t*(180/Math.PI)}function um(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 cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=ff.appendOrSelect(e.getContainerSVG(),"g.tmp-tick"),r=ff.appendOrSelect(n,"text").text(t),i=ff.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.model.getOptions(),r=ia.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=ia.getProperty(n,"data","groupMapsTo"),s=ia.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 ia.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=ia.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=ia.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:ia.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=ia.getProperty(e.model.getOptions(),"radar","opacity");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?ia.getProperty(r,"unselected"):ia.getProperty(r,"selected")}))},e.handleLegendMouseOut=function(t){var n=ia.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",ia.getProperty(n,"selected"))},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=ff.getSVGElementSize(this.parent,{useAttrs:!0}),a=i.width,o=i.height,s=this.model.getData(),u=this.model.getDisplayData(),c=this.model.getGroupedData(),l=this.model.getOptions(),h=ia.getProperty(l,"radar","axes"),f=h.angle,d=h.value,p=ia.getProperty(l,"data","groupMapsTo"),g=ia.getProperty(l,"radar"),v=g.xLabelPadding,m=g.yLabelPadding,y=g.yTicksNumber,_=g.minRange,b=g.xAxisRectHeight,x=g.opacity;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[f]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[p]})))),this.displayDataNormalized=this.normalizeFlatData(u),this.groupedDataNormalized=this.normalizeGroupedData(c);var w=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+m),E=(Math.min(a,o)-w)/2;if(!(E<=0)){var S=Ho().domain(this.displayDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),O=gu().domain([0,Io(this.displayDataNormalized.map((function(t){return t[d]})))]).range([_,E]).nice(y),T=O.ticks(y),M=function(t){return e.model.getFillColor(t)},A=ql().angle((function(t){return S(t[f])+Math.PI/2})).radius((function(t){return O(t[d])})).curve(bh),C=ql().angle(A.angle()).radius((function(t){return Uv?Uv(t[d]):_})).curve(A.curve()),P={x:Io(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=S(t),E*Math.sin(n-Math.PI/2))})))+v,y:o/2},D=ff.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(T,(function(t){return t})),k=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[f]=e,n[d]=t,n}))};D.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+P.x+", "+P.y+")").attr("fill","none").attr("d",(function(t){return C(k(t))})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return A(k(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("+P.x+", "+P.y+")").attr("d",(function(t){return A(k(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 A(k(t))})).attr("opacity",0).remove()}))})),ff.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(Mo(T)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return um(-Math.PI/2,O(t),P).x+m})).attr("y",(function(t){return um(-Math.PI/2,O(t),P).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 um(-Math.PI/2,O(t),P).x+m})).attr("y",(function(t){return um(-Math.PI/2,O(t),P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))})),ff.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-"+ia.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return um(S(t),0,P).x})).attr("y1",(function(t){return um(S(t),0,P).y})).attr("x2",(function(t){return um(S(t),0,P).x})).attr("y2",(function(t){return um(S(t),0,P).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return um(S(t),O.range()[0],P).x})).attr("y1",(function(t){return um(S(t),O.range()[0],P).y})).attr("x2",(function(t){return um(S(t),O.range()[1],P).x})).attr("y2",(function(t){return um(S(t),O.range()[1],P).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 um(S(t),O.range()[0],P).x})).attr("y1",(function(t){return um(S(t),O.range()[0],P).y})).attr("x2",(function(t){return um(S(t),O.range()[1],P).x})).attr("y2",(function(t){return um(S(t),O.range()[1],P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),ff.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 um(S(t),O.range()[1]+v,P).x})).attr("y",(function(t){return um(S(t),O.range()[1]+v,P).y})).style("text-anchor",(function(t){return am(S(t)).textAnchor})).style("dominant-baseline",(function(t){return am(S(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 um(S(t),O.range()[1]+v,P).x})).attr("y",(function(t){return um(S(t),O.range()[1]+v,P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),ff.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","blob").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+P.x+", "+P.y+")").attr("fill",(function(t){return M(t.name)})).style("fill-opacity",x.selected).attr("stroke",(function(t){return M(t.name)})).attr("d",(function(t){return C(t.data)})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_enter",t)).attr("opacity",1).attr("d",(function(t){return A(t.data)}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+P.x+", "+P.y+")").attr("d",(function(t){return A(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 A(t.data)})).attr("opacity",0).remove()}))})),ff.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 ia.kebabCase(t[f])})).attr("cx",(function(t){return um(S(t[f]),O(t[d]),P).x})).attr("cy",(function(t){return um(S(t[f]),O(t[d]),P).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return M(t[p])})),ff.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",P.x).attr("y",P.y-b/2).attr("width",O.range()[1]).attr("height",b).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+sm(S(t))+", "+P.x+", "+P.y+")"}));var L=ia.getProperty(l,"radar","alignment"),R=ff.getAlignmentOffset(L,n,this.getParent());n.attr("transform","translate("+R+", 0)"),this.addEventListeners(),Uv=O}},e.prototype.destroy=function(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=ia.getProperty(this.model.getOptions(),"radar"),n=e.axes.angle,r=e.dotsRadius;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(e){var i=ua(this);t.services.events.dispatchEvent(U.Radar.X_AXIS_MOUSEOVER,{element:i,datum:e});var a=t.parent.select(".x-axes .x-axis-"+ia.kebabCase(e)),o=t.parent.selectAll(".dots circle."+ia.kebabCase(e));a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",1).attr("r",r);var s=t.displayDataNormalized.filter((function(t){return t[n]===e})),u=t.model.getOptions(),c=u.data.groupMapsTo,l=ia.getProperty(u,"radar","axes","value");t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:i,items:s.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[c],value:e[l],color:t.model.getStrokeColor(e[c])}}))})})).on("mousemove",(function(e){var n=ua(this);t.services.events.dispatchEvent(U.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(U.Radar.X_AXIS_CLICK,{element:ua(this),datum:e})})).on("mouseout",(function(e){var n=ua(this),r=t.parent.select(".x-axes .x-axis-"+ia.kebabCase(e)),i=t.parent.selectAll(".dots circle."+ia.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(U.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.HIDE)}))},e}(Qp),lm=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(ia.mergeDefaultChartOptions(za.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new cm(this.model,this.services)];return this.getChartComponents(t)},e}(zv),hm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ia.mergeDefaultChartOptions(za.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ag(this.model,this.services)];return this.getChartComponents(t)},e}(zv),fm=yo;t.AreaChart=Wv,t.BubbleChart=Kv,t.DonutChart=em,t.GaugeChart=hm,t.GroupedBarChart=Xv,t.LineChart=$v,t.MeterChart=im,t.PieChart=tm,t.RadarChart=lm,t.ScatterChart=Qv,t.SimpleBarChart=qv,t.StackedAreaChart=Yv,t.StackedBarChart=Zv,t.colorPalettes=_o,t.configurations=Ka,t.defaultColors=fm,t.interfaces=B,Object.defineProperty(t,"__esModule",{value:!0})}));