@fluentui/react-charting 5.25.2 → 5.25.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +105 -1
- package/CHANGELOG.md +30 -2
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/lib/components/AreaChart/AreaChart.base.js +0 -5
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.base.js +0 -1
- package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +1 -3
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +1 -3
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +24 -23
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +0 -1
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +1 -5
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +0 -2
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.base.js +0 -1
- package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.base.js +1 -1
- package/lib/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +8 -9
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +0 -4
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +1 -7
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +0 -6
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/Legends/Legends.base.js +0 -4
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +0 -10
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.js +0 -2
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.js +0 -2
- package/lib/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib/components/PieChart/PieChart.base.js +0 -1
- package/lib/components/PieChart/PieChart.base.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.base.js +2 -2
- package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.js +38 -36
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +1 -6
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js +1 -5
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.base.js +2 -17
- package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +0 -11
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +7 -6
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/utilities/image-export-utils.js +4 -2
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/utilities.js +0 -2
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js +0 -5
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js +0 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +1 -3
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +1 -3
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +24 -23
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js +0 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js +1 -5
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.js +0 -2
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.js +0 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-amd/components/GanttChart/GanttChart.base.js +1 -1
- package/lib-amd/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +8 -10
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +0 -4
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +1 -7
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +0 -6
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.js +0 -4
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +0 -10
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/PieChart/Arc/Arc.js +0 -2
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/PieChart/Pie/Pie.js +0 -2
- package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/PieChart/PieChart.base.js +0 -1
- package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.base.js +2 -2
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +37 -35
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +1 -6
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +1 -5
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/TreeChart/TreeChart.base.js +2 -17
- package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +0 -11
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +6 -5
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/utilities/image-export-utils.js +4 -2
- package/lib-amd/utilities/image-export-utils.js.map +1 -1
- package/lib-amd/utilities/utilities.js +0 -2
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +0 -5
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js +0 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +1 -3
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +1 -3
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +24 -23
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +0 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js +1 -5
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +0 -2
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +0 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.base.js +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +8 -9
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +0 -4
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +1 -7
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +0 -6
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js +0 -4
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +0 -10
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.js +0 -2
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.js +0 -2
- package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js +0 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +2 -2
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +37 -35
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +1 -6
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +1 -5
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.js +2 -17
- package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +0 -11
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +6 -5
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +4 -2
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +0 -2
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +5 -5
- package/src/components/CommonComponents/CartesianChart.types.ts +1 -1
- package/src/components/ScatterChart/ScatterChart.types.ts +0 -1
package/dist/react-charting.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var FluentUIReactCharting;!function(){"use strict";var t={40:function(t,n,i){i.d(n,{nr:function(){return s}});var e,r=i(823),o=i(638),u="__stylesheet__",a="undefined"!=typeof navigator&&/rv:11.0/.test(navigator.userAgent),l={};try{l=window||{}}catch(t){}var s=function(){function t(t,n){var i,e,o,u,a,l;this._rules=[],this._preservedRules=[],this._counter=0,this._keyToClassName={},this._onInsertRuleCallbacks=[],this._onResetCallbacks=[],this._classNameToArgs={},this._config=(0,r.Cl)({injectionMode:"undefined"==typeof document?0:1,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},t),this._classNameToArgs=null!==(i=null==n?void 0:n.classNameToArgs)&&void 0!==i?i:this._classNameToArgs,this._counter=null!==(e=null==n?void 0:n.counter)&&void 0!==e?e:this._counter,this._keyToClassName=null!==(u=null!==(o=this._config.classNameCache)&&void 0!==o?o:null==n?void 0:n.keyToClassName)&&void 0!==u?u:this._keyToClassName,this._preservedRules=null!==(a=null==n?void 0:n.preservedRules)&&void 0!==a?a:this._preservedRules,this._rules=null!==(l=null==n?void 0:n.rules)&&void 0!==l?l:this._rules}return t.getInstance=function(n){if(e=l[u],l[o.Se])return l[o.Se].getInstance(n);if(!e||e._lastStyleElement&&e._lastStyleElement.ownerDocument!==document){var i=(null==l?void 0:l.FabricConfig)||{},r=new t(i.mergeStyles,i.serializedStylesheet);e=r,l[u]=r}return e},t.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},t.prototype.setConfig=function(t){this._config=(0,r.Cl)((0,r.Cl)({},this._config),t)},t.prototype.onReset=function(t){var n=this;return this._onResetCallbacks.push(t),function(){n._onResetCallbacks=n._onResetCallbacks.filter((function(n){return n!==t}))}},t.prototype.onInsertRule=function(t){var n=this;return this._onInsertRuleCallbacks.push(t),function(){n._onInsertRuleCallbacks=n._onInsertRuleCallbacks.filter((function(n){return n!==t}))}},t.prototype.getClassName=function(t){var n=this._config.namespace,i=t||this._config.defaultPrefix;return"".concat(n?n+"-":"").concat(i,"-").concat(this._counter++)},t.prototype.cacheClassName=function(t,n,i,e){this._keyToClassName[this._getCacheKey(n)]=t,this._classNameToArgs[t]={args:i,rules:e}},t.prototype.classNameFromKey=function(t){return this._keyToClassName[this._getCacheKey(t)]},t.prototype.getClassNameCache=function(){return this._keyToClassName},t.prototype.argsFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.args},t.prototype.insertedRulesFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.rules},t.prototype.insertRule=function(t,n,i){void 0===i&&(i=o.P6);var e=this._config.injectionMode,r=0!==e?this._getStyleElement():void 0;if(n&&this._preservedRules.push(t),r)switch(e){case 1:this._insertRuleIntoSheet(r.sheet,t);break;case 2:r.appendChild(document.createTextNode(t))}else this._rules.push(t);this._config.onInsertRule&&this._config.onInsertRule(t),this._onInsertRuleCallbacks.forEach((function(n){return n({key:i,sheet:r?r.sheet:void 0,rule:t})}))},t.prototype.getRules=function(t){return(t?this._preservedRules.join(""):"")+this._rules.join("")},t.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach((function(t){return t()}))},t.prototype.resetKeys=function(){this._keyToClassName={}},t.prototype._createStyleElement=function(){var t,n=(null===(t=this._config.window)||void 0===t?void 0:t.document)||document,i=n.head,e=n.createElement("style"),r=null;e.setAttribute("data-merge-styles","true");var o=this._config.cspSettings;if(o&&o.nonce&&e.setAttribute("nonce",o.nonce),this._lastStyleElement)r=this._lastStyleElement.nextElementSibling;else{var u=this._findPlaceholderStyleTag();r=u?u.nextElementSibling:i.childNodes[0]}return i.insertBefore(e,i.contains(r)?r:null),this._lastStyleElement=e,e},t.prototype._insertRuleIntoSheet=function(t,n){if(!t)return!1;try{return t.insertRule(n,t.cssRules.length),!0}catch(t){}return!1},t.prototype._getCacheKey=function(t){return t},t.prototype._getStyleElement=function(){var t=this;return this._styleElement||(this._styleElement=this._createStyleElement(),a||(this._config.window||window).requestAnimationFrame((function(){t._styleElement=void 0}))),this._styleElement},t.prototype._findPlaceholderStyleTag=function(){var t=document.head;return t?t.querySelector("style[data-merge-styles]"):null},t}()},41:function(t,n,i){var e,r,o,u,a;i.d(n,{BO:function(){return u},Dn:function(){return e},bi:function(){return r},s:function(){return o}}),function(t){t.Arabic="Segoe UI Web (Arabic)",t.Cyrillic="Segoe UI Web (Cyrillic)",t.EastEuropean="Segoe UI Web (East European)",t.Greek="Segoe UI Web (Greek)",t.Hebrew="Segoe UI Web (Hebrew)",t.Thai="Leelawadee UI Web",t.Vietnamese="Segoe UI Web (Vietnamese)",t.WestEuropean="Segoe UI Web (West European)",t.Selawik="Selawik Web",t.Armenian="Segoe UI Web (Armenian)",t.Georgian="Segoe UI Web (Georgian)"}(e||(e={})),function(t){t.Arabic="'".concat(e.Arabic,"'"),t.ChineseSimplified="'Microsoft Yahei UI', Verdana, Simsun",t.ChineseTraditional="'Microsoft Jhenghei UI', Pmingliu",t.Cyrillic="'".concat(e.Cyrillic,"'"),t.EastEuropean="'".concat(e.EastEuropean,"'"),t.Greek="'".concat(e.Greek,"'"),t.Hebrew="'".concat(e.Hebrew,"'"),t.Hindi="'Nirmala UI'",t.Japanese="'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka",t.Korean="'Malgun Gothic', Gulim",t.Selawik="'".concat(e.Selawik,"'"),t.Thai="'Leelawadee UI Web', 'Kmer UI'",t.Vietnamese="'".concat(e.Vietnamese,"'"),t.WestEuropean="'".concat(e.WestEuropean,"'"),t.Armenian="'".concat(e.Armenian,"'"),t.Georgian="'".concat(e.Georgian,"'")}(r||(r={})),function(t){t.size10="10px",t.size12="12px",t.size14="14px",t.size16="16px",t.size18="18px",t.size20="20px",t.size24="24px",t.size28="28px",t.size32="32px",t.size42="42px",t.size68="68px",t.mini="10px",t.xSmall="10px",t.small="12px",t.smallPlus="12px",t.medium="14px",t.mediumPlus="16px",t.icon="16px",t.large="18px",t.xLarge="20px",t.xLargePlus="24px",t.xxLarge="28px",t.xxLargePlus="32px",t.superLarge="42px",t.mega="68px"}(o||(o={})),function(t){t.light=100,t.semilight=300,t.regular=400,t.semibold=600,t.bold=700}(u||(u={})),function(t){t.xSmall="10px",t.small="12px",t.medium="16px",t.large="20px"}(a||(a={}))},61:function(t,n,i){function e(t){const n=Math.round(t);return Math.abs(t-n)<1e-6?n:t}i.d(n,{Di:function(){return e},Yn:function(){return u},c$:function(){return r},c2:function(){return a}});const r=(t,n,i)=>{if(null==t||""===t||Number.isNaN(t))return t;if(n=n||void 0,"number"==typeof t){const i=Math.abs(t)>=1e4;return e(t).toLocaleString(n,{useGrouping:i})}if("string"==typeof t&&!window.isNaN(Number(t))){const i=Number(t),r=Math.abs(i)>=1e4;return e(i).toLocaleString(n,{useGrouping:r})}return t instanceof Date?u(t,n,!!i):t},o={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u=(t,n,i,e=!0,r)=>(n=n||void 0,r=r||o,i&&(r={...r,timeZone:"UTC"}),e&&(r={...r,timeZoneName:"short"}),t.toLocaleString(n,r));function a(t,n){const i={second:"2-digit"},e={minute:"2-digit",second:"2-digit"},r={hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u={weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},a={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},l={hour:"2-digit",minute:"2-digit",hour12:!0},s={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},c={month:"short",day:"2-digit",hour:"2-digit",hour12:!0},d={month:"short",day:"2-digit"},f={year:"numeric",month:"2-digit",day:"2-digit"},v=[[i,i,e,r,u,a,a,o],[o,i,e,r,u,a,a,o],[o,o,l,l,{weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},s,s,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}],[o,o,o,{hour:"2-digit",hour12:!0},{weekday:"short",day:"2-digit",hour:"2-digit",hour12:!0},c,c,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",hour12:!0}],[o,o,o,o,{weekday:"short",day:"2-digit"},d,d,f],[o,o,o,o,o,d,d,f],[o,o,o,o,o,o,{month:"long"},{month:"short",year:"numeric"}],[o,o,o,o,o,o,o,{year:"numeric"}]];return void 0===t||t<0||t>=v.length?o:void 0===n||n<t?v[t][t]:n>=v[t].length?v[t][v[t].length-1]:v[t][n]}},143:function(t,n,i){i.d(n,{a:function(){return V}});var e,r=i(302);!function(t){t.depth0="0 0 0 0 transparent",t.depth4="0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)",t.depth8="0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)",t.depth16="0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)",t.depth64="0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)"}(e||(e={}));var o={elevation4:e.depth4,elevation8:e.depth8,elevation16:e.depth16,elevation64:e.depth64,roundedCorner2:"2px",roundedCorner4:"4px",roundedCorner6:"6px"},u=i(800),a=i(40),l=i(289),s=i(41),c="'Segoe UI', '".concat(s.Dn.WestEuropean,"'"),d={ar:s.bi.Arabic,bg:s.bi.Cyrillic,cs:s.bi.EastEuropean,el:s.bi.Greek,et:s.bi.EastEuropean,he:s.bi.Hebrew,hi:s.bi.Hindi,hr:s.bi.EastEuropean,hu:s.bi.EastEuropean,ja:s.bi.Japanese,kk:s.bi.EastEuropean,ko:s.bi.Korean,lt:s.bi.EastEuropean,lv:s.bi.EastEuropean,pl:s.bi.EastEuropean,ru:s.bi.Cyrillic,sk:s.bi.EastEuropean,"sr-latn":s.bi.EastEuropean,th:s.bi.Thai,tr:s.bi.EastEuropean,uk:s.bi.Cyrillic,vi:s.bi.Vietnamese,"zh-hans":s.bi.ChineseSimplified,"zh-hant":s.bi.ChineseTraditional,hy:s.bi.Armenian,ka:s.bi.Georgian};function f(t,n,i){return{fontFamily:i,MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontSize:t,fontWeight:n}}var v,h,p,g=i(543),y=i(338),m=i(468),b="language",x=(h=function(t){for(var n in d)if(d.hasOwnProperty(n)&&t&&0===n.indexOf(t))return d[n];return c}(function(t){if(void 0===t&&(t="sessionStorage"),void 0===v){var n=(0,g.Y)(),i="localStorage"===t?function(t){var n=null;try{var i=(0,y.z)();n=i?i.localStorage.getItem(t):null}catch(t){}return n}(b):"sessionStorage"===t?m.G(b):void 0;i&&(v=i),void 0===v&&n&&(v=n.documentElement.getAttribute("lang")),void 0===v&&(v="en")}return v}()),p="".concat(h,", ").concat("'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif"),{tiny:f(s.s.mini,s.BO.regular,p),xSmall:f(s.s.xSmall,s.BO.regular,p),small:f(s.s.small,s.BO.regular,p),smallPlus:f(s.s.smallPlus,s.BO.regular,p),medium:f(s.s.medium,s.BO.regular,p),mediumPlus:f(s.s.mediumPlus,s.BO.regular,p),large:f(s.s.large,s.BO.regular,p),xLarge:f(s.s.xLarge,s.BO.semibold,p),xLargePlus:f(s.s.xLargePlus,s.BO.semibold,p),xxLarge:f(s.s.xxLarge,s.BO.semibold,p),xxLargePlus:f(s.s.xxLargePlus,s.BO.semibold,p),superLarge:f(s.s.superLarge,s.BO.semibold,p),mega:f(s.s.mega,s.BO.semibold,p)});function w(t,n,i,e){!function(t){var n=a.nr.getInstance(),i=(0,l.bz)((0,u.Iy)(),t);if(!n.classNameFromKey(i)){var e=n.getClassName();n.insertRule("@font-face{".concat(i,"}"),!0),n.cacheClassName(e,i,[],["font-face",i])}}({fontFamily:t="'".concat(t,"'"),src:(void 0!==e?"local('".concat(e,"'),"):"")+"url('".concat(n,".woff2') format('woff2'),")+"url('".concat(n,".woff') format('woff')"),fontWeight:i,fontStyle:"normal",fontDisplay:"swap"})}function M(t,n,i,e,r){void 0===e&&(e="segoeui");var o="".concat(t,"/").concat(i,"/").concat(e);w(n,o+"-light",s.BO.light,r&&r+" Light"),w(n,o+"-semilight",s.BO.semilight,r&&r+" SemiLight"),w(n,o+"-regular",s.BO.regular,r),w(n,o+"-semibold",s.BO.semibold,r&&r+" SemiBold"),w(n,o+"-bold",s.BO.bold,r&&r+" Bold")}function C(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=0,r=n;e<r.length;e++)k(t||{},r[e]);return t}function k(t,n,i){for(var e in void 0===i&&(i=[]),i.push(n),n)if(n.hasOwnProperty(e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var r=n[e];if("object"!=typeof r||null===r||Array.isArray(r))t[e]=r;else{var o=i.indexOf(r)>-1;t[e]=o?r:k(t[e]||{},r,i)}}return i.pop(),t}!function(t){if(t){var n="".concat(t,"/fonts");M(n,s.Dn.Thai,"leelawadeeui-thai","leelawadeeui"),M(n,s.Dn.Arabic,"segoeui-arabic"),M(n,s.Dn.Cyrillic,"segoeui-cyrillic"),M(n,s.Dn.EastEuropean,"segoeui-easteuropean"),M(n,s.Dn.Greek,"segoeui-greek"),M(n,s.Dn.Hebrew,"segoeui-hebrew"),M(n,s.Dn.Vietnamese,"segoeui-vietnamese"),M(n,s.Dn.WestEuropean,"segoeui-westeuropean","segoeui","Segoe UI"),M(n,s.bi.Selawik,"selawik","selawik"),M(n,s.Dn.Armenian,"segoeui-armenian"),M(n,s.Dn.Georgian,"segoeui-georgian"),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-semilight"),s.BO.light),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-bold"),s.BO.semibold)}}(function(){var t,n,i=null===(t=(0,y.z)())||void 0===t?void 0:t.FabricConfig;return null!==(n=null==i?void 0:i.fontBaseUrl)&&void 0!==n?n:"https://res-1.cdn.office.net/files/fabric-cdn-prod_20230815.002/assets"}());var A=i(823);function S(t,n,i,e,r){return void 0===r&&(r=!1),function(t,n){var i="";return!0===n&&(i=" /* @deprecated */"),t.listTextColor=t.listText+i,t.menuItemBackgroundChecked+=i,t.warningHighlight+=i,t.warningText=t.messageText+i,t.successText+=i,t}(L(t,n,(0,A.Cl)({primaryButtonBorder:"transparent",errorText:e?"#F1707B":"#a4262c",messageText:e?"#F3F2F1":"#323130",messageLink:e?"#6CB8F6":"#005A9E",messageLinkHovered:e?"#82C7FF":"#004578",infoIcon:e?"#C8C6C4":"#605e5c",errorIcon:e?"#F1707B":"#A80000",blockingIcon:e?"#442726":"#FDE7E9",warningIcon:e?"#C8C6C4":"#797775",severeWarningIcon:e?"#FCE100":"#D83B01",successIcon:e?"#92C353":"#107C10",infoBackground:e?"#323130":"#f3f2f1",errorBackground:e?"#442726":"#FDE7E9",blockingBackground:e?"#442726":"#FDE7E9",warningBackground:e?"#433519":"#FFF4CE",severeWarningBackground:e?"#4F2A0F":"#FED9CC",successBackground:e?"#393D1B":"#DFF6DD",warningHighlight:e?"#fff100":"#ffb900",successText:e?"#92c353":"#107C10"},i),e),r)}function L(t,n,i,e,r){void 0===r&&(r=!1);var o={},u=t||{},a=u.white,l=u.black,s=u.themePrimary,c=u.themeDark,d=u.themeDarker,f=u.themeDarkAlt,v=u.themeLighter,h=u.neutralLight,p=u.neutralLighter,g=u.neutralDark,y=u.neutralQuaternary,m=u.neutralQuaternaryAlt,b=u.neutralPrimary,x=u.neutralSecondary,w=u.neutralSecondaryAlt,M=u.neutralTertiary,C=u.neutralTertiaryAlt,k=u.neutralLighterAlt,S=u.accent;return a&&(o.bodyBackground=a,o.bodyFrameBackground=a,o.accentButtonText=a,o.buttonBackground=a,o.primaryButtonText=a,o.primaryButtonTextHovered=a,o.primaryButtonTextPressed=a,o.inputBackground=a,o.inputForegroundChecked=a,o.listBackground=a,o.menuBackground=a,o.cardStandoutBackground=a),l&&(o.bodyTextChecked=l,o.buttonTextCheckedHovered=l),s&&(o.link=s,o.primaryButtonBackground=s,o.inputBackgroundChecked=s,o.inputIcon=s,o.inputFocusBorderAlt=s,o.menuIcon=s,o.menuHeader=s,o.accentButtonBackground=s),c&&(o.primaryButtonBackgroundPressed=c,o.inputBackgroundCheckedHovered=c,o.inputIconHovered=c),d&&(o.linkHovered=d),f&&(o.primaryButtonBackgroundHovered=f),v&&(o.inputPlaceholderBackgroundChecked=v),h&&(o.bodyBackgroundChecked=h,o.bodyFrameDivider=h,o.bodyDivider=h,o.variantBorder=h,o.buttonBackgroundCheckedHovered=h,o.buttonBackgroundPressed=h,o.listItemBackgroundChecked=h,o.listHeaderBackgroundPressed=h,o.menuItemBackgroundPressed=h,o.menuItemBackgroundChecked=h),p&&(o.bodyBackgroundHovered=p,o.buttonBackgroundHovered=p,o.buttonBackgroundDisabled=p,o.buttonBorderDisabled=p,o.primaryButtonBackgroundDisabled=p,o.disabledBackground=p,o.listItemBackgroundHovered=p,o.listHeaderBackgroundHovered=p,o.menuItemBackgroundHovered=p),y&&(o.primaryButtonTextDisabled=y,o.disabledSubtext=y),m&&(o.listItemBackgroundCheckedHovered=m),M&&(o.disabledBodyText=M,o.variantBorderHovered=(null==i?void 0:i.variantBorderHovered)||M,o.buttonTextDisabled=M,o.inputIconDisabled=M,o.disabledText=M),b&&(o.bodyText=b,o.actionLink=b,o.buttonText=b,o.inputBorderHovered=b,o.inputText=b,o.listText=b,o.menuItemText=b),k&&(o.bodyStandoutBackground=k,o.defaultStateBackground=k),g&&(o.actionLinkHovered=g,o.buttonTextHovered=g,o.buttonTextChecked=g,o.buttonTextPressed=g,o.inputTextHovered=g,o.menuItemTextHovered=g),x&&(o.bodySubtext=x,o.focusBorder=x,o.inputBorder=x,o.smallInputBorder=x,o.inputPlaceholderText=x),w&&(o.buttonBorder=w),C&&(o.disabledBodySubtext=C,o.disabledBorder=C,o.buttonBackgroundChecked=C,o.menuDivider=C),S&&(o.accentButtonBackground=S),(null==n?void 0:n.elevation4)&&(o.cardShadow=n.elevation4),!e&&(null==n?void 0:n.elevation8)?o.cardShadowHovered=n.elevation8:o.variantBorderHovered&&(o.cardShadowHovered="0 0 1px "+o.variantBorderHovered),(0,A.Cl)((0,A.Cl)({},o),i)}var D={s2:"4px",s1:"8px",m:"16px",l1:"20px",l2:"32px"};function V(t,n){void 0===t&&(t={}),void 0===n&&(n=!1);var i=!!t.isInverted;return function(t,n){var i,e,r;void 0===n&&(n={});var o=C({},t,n,{semanticColors:L(n.palette,n.effects,n.semanticColors,void 0===n.isInverted?t.isInverted:n.isInverted)});if((null===(i=n.palette)||void 0===i?void 0:i.themePrimary)&&!(null===(e=n.palette)||void 0===e?void 0:e.accent)&&(o.palette.accent=n.palette.themePrimary),n.defaultFontStyle)for(var u=0,a=Object.keys(o.fonts);u<a.length;u++){var l=a[u];o.fonts[l]=C(o.fonts[l],n.defaultFontStyle,null===(r=null==n?void 0:n.fonts)||void 0===r?void 0:r[l])}return o}({palette:r.b,effects:o,fonts:x,spacing:D,isInverted:i,disableGlobalClassNames:!1,semanticColors:S(r.b,o,void 0,i,n),rtl:void 0},t)}},259:function(t,n,i){i.d(n,{jI:function(){return l}});var e,r=i(543),o=i(468),u=i(800),a="isRTL";function l(t){if(void 0===t&&(t={}),void 0!==t.rtl)return t.rtl;if(void 0===e){var n=(0,o.G)(a);null!==n&&function(t,n){void 0===n&&(n=!1);var i=(0,r.Y)();i&&i.documentElement.setAttribute("dir",t?"rtl":"ltr"),n&&(0,o.S)(a,t?"1":"0"),e=t,(0,u.DU)(e)}(e="1"===n);var i=(0,r.Y)();void 0===e&&i&&(e="rtl"===(i.body&&i.body.getAttribute("dir")||i.documentElement.getAttribute("dir")),(0,u.DU)(e))}return!!e}},263:function(t,n,i){i.d(n,{J:function(){return r}});var e=i(419),r=function(t){var n,i,r,o=t.color,u=t.XValue,a=t.theme,l=t.isRatioPresent,s=void 0!==l&&l;return{calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:a.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[a.fonts.small,{lineHeight:"16px",opacity:"0.85",color:a.semanticColors.bodySubtext}],calloutBlockContainer:[a.fonts.xxLarge,{marginTop:u?"13px":"unset",paddingLeft:"8px",lineHeight:"22px",color:a.semanticColors.bodyText,borderLeft:"4px solid ".concat(o),selectors:(n={},n[e.up]={forcedColorAdjust:"none"},n)}],calloutlegendText:[a.fonts.small,{lineHeight:"16px",color:a.semanticColors.bodyText,selectors:(i={},i[e.up]={color:"CanvasText"},i)}],calloutContentY:[a.fonts.xxLarge,{color:o||a.semanticColors.bodyText,fontWeight:"bold",lineHeight:"36px",selectors:(r={},r[e.up]={color:"CanvasText"},r)}],calloutInfoContainer:[s&&{display:"flex",alignItems:"flex-end"}],ratio:[a.fonts.small,{marginLeft:"6px",color:a.semanticColors.bodyText}],numerator:{fontWeight:e.BO.bold},denominator:{fontWeight:e.BO.semibold},descriptionMessage:[a.fonts.small,{color:a.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(a.semanticColors.menuDivider)}]}}},289:function(t,n,i){i.d(n,{Ae:function(){return L},bz:function(){return A},kG:function(){return D},GJ:function(){return S}});var e,r=i(823),o=i(40),u={},a={"user-select":1};function l(t,n){var i=function(){var t;if(!e){var n="undefined"!=typeof document?document:void 0,i="undefined"!=typeof navigator?navigator:void 0,r=null===(t=null==i?void 0:i.userAgent)||void 0===t?void 0:t.toLowerCase();e=n?{isWebkit:!(!n||!("WebkitAppearance"in n.documentElement.style)),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!i||!/rv:11.0/i.test(i.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return e}(),r=t[n];if(a[r]){var o=t[n+1];a[r]&&(i.isWebkit&&t.push("-webkit-"+r,o),i.isMoz&&t.push("-moz-"+r,o),i.isMs&&t.push("-ms-"+r,o),i.isOpera&&t.push("-o-"+r,o))}}var s,c=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function d(t,n){var i=t[n],e=t[n+1];if("number"==typeof e){var r=c.indexOf(i)>-1,o=i.indexOf("--")>-1,u=r||o?"":"px";t[n+1]="".concat(e).concat(u)}}var f="left",v="right",h="@noflip",p=((s={})[f]=v,s[v]=f,s),g={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function y(t,n,i){if(t.rtl){var e=n[i];if(!e)return;var r=n[i+1];if("string"==typeof r&&r.indexOf(h)>=0)n[i+1]=r.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(e.indexOf(f)>=0)n[i]=e.replace(f,v);else if(e.indexOf(v)>=0)n[i]=e.replace(v,f);else if(String(r).indexOf(f)>=0)n[i+1]=r.replace(f,v);else if(String(r).indexOf(v)>=0)n[i+1]=r.replace(v,f);else if(p[e])n[i]=p[e];else if(g[r])n[i+1]=g[r];else switch(e){case"margin":case"padding":n[i+1]=function(t){if("string"==typeof t){var n=t.split(" ");if(4===n.length)return"".concat(n[0]," ").concat(n[3]," ").concat(n[2]," ").concat(n[1])}return t}(r);break;case"box-shadow":n[i+1]=function(t){var n=t.split(" "),i=parseInt(n[0],10);return n[0]=n[0].replace(String(i),String(-1*i)),n.join(" ")}(r)}}}var m="displayName",b=/\:global\((.+?)\)/g;function x(t,n){return t.indexOf(":global(")>=0?t.replace(b,"$1"):0===t.indexOf(":host(")?t:0===t.indexOf(":")?n+t:t.indexOf("&")<0?n+" "+t:t}function w(t,n,i,e,r){void 0===n&&(n={__order:[]}),0===i.indexOf("@")?M([e],n,i=i+"{"+t,r):i.indexOf(",")>-1?function(t){if(!b.test(t))return t;for(var n=[],i=/\:global\((.+?)\)/g,e=null;e=i.exec(t);)e[1].indexOf(",")>-1&&n.push([e.index,e.index+e[0].length,e[1].split(",").map((function(t){return":global(".concat(t.trim(),")")})).join(", ")]);return n.reverse().reduce((function(t,n){var i=n[0],e=n[1],r=n[2];return t.slice(0,i)+r+t.slice(e)}),t)}(i).split(",").map((function(t){return t.trim()})).forEach((function(i){return M([e],n,x(i,t),r)})):M([e],n,x(i,t),r)}function M(t,n,i,e){void 0===n&&(n={__order:[]}),void 0===i&&(i="&");var r,o=n[i];o||(o={},n[i]=o,n.__order.push(i));for(var u=0,a=t;u<a.length;u++){var l=a[u];if("string"==typeof l){var s=e.argsFromClassName(l);s&&M(s,n,i,e)}else if(Array.isArray(l))M(l,n,i,e);else for(var c in l)if(l.hasOwnProperty(c)){var d=l[c];if("selectors"===c){var f=l.selectors;for(var v in f)f.hasOwnProperty(v)&&w(i,n,v,f[v],e)}else"object"==typeof d||(r=c).indexOf(":global(")>=0||0===r.indexOf(":")?null!=d&&w(i,n,c,d,e):void 0!==d&&("margin"===c||"padding"===c?C(o,c,d):o[c]=d)}}return n}function C(t,n,i){var e="string"==typeof i?function(t){for(var n=[],i=0,e=0,r=0;r<t.length;r++)switch(t[r]){case"(":e++;break;case")":e&&e--;break;case"\t":case" ":e||(r>i&&n.push(t.substring(i,r)),i=r+1)}return i<t.length&&n.push(t.substring(i)),n}(i):[i];0===e.length&&e.push(i),"!important"===e[e.length-1]&&(e=e.slice(0,-1).map((function(t){return t+" !important"}))),t[n+"Top"]=e[0],t[n+"Right"]=e[1]||e[0],t[n+"Bottom"]=e[2]||e[0],t[n+"Left"]=e[3]||e[1]||e[0]}function k(t,n){return n<=0?"":1===n?t:t+k(t,n-1)}function A(t,n){if(!n)return"";var i,e,r,o=[];for(var a in n)n.hasOwnProperty(a)&&a!==m&&void 0!==n[a]&&o.push(a,n[a]);for(var s=0;s<o.length;s+=2)r=void 0,"-"!==(r=(i=o)[e=s]).charAt(0)&&(i[e]=u[r]=u[r]||r.replace(/([A-Z])/g,"-$1").toLowerCase()),d(o,s),y(t,o,s),l(o,s);for(s=1;s<o.length;s+=4)o.splice(s,1,":",o[s],";");return o.join("")}function S(t){for(var n,i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];var r=null!==(n=t.stylesheet)&&void 0!==n?n:o.nr.getInstance(t.shadowConfig),u=M(i,void 0,void 0,r),a=function(t,n){for(var i=[t.rtl?"rtl":"ltr"],e=!1,r=0,o=n.__order;r<o.length;r++){var u=o[r];i.push(u);var a=n[u];for(var l in a)a.hasOwnProperty(l)&&void 0!==a[l]&&(e=!0,i.push(l,a[l]))}return e?i.join(""):void 0}(t,u);if(a){var l={className:r.classNameFromKey(a),key:a,args:i};if(!l.className){l.className=r.getClassName(function(t){var n=t&&t["&"];return n?n.displayName:void 0}(u));for(var s=[],c=0,d=u.__order;c<d.length;c++){var f=d[c];s.push(f,A(t,u[f]))}l.rulesToInsert=s}return l}}function L(t,n,i,e){void 0===n&&(n=1);var r=null!=e?e:o.nr.getInstance(i),u=t.className,a=t.key,l=t.args,s=t.rulesToInsert;if(s){for(var c=0;c<s.length;c+=2){var d=s[c+1];if(d){var f=s[c];f=f.replace(/&/g,k(".".concat(t.className),n));var v="".concat(f,"{").concat(d,"}").concat(0===f.indexOf("@")?"}":"");r.insertRule(v)}}r.cacheClassName(u,a,l,s)}}function D(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=S.apply(void 0,(0,r.fX)([t],n,!1));return e?(L(e,t.specificityMultiplier,t.shadowConfig,t.stylesheet),e.className):""}},302:function(t,n,i){i.d(n,{b:function(){return e}});var e={themeDarker:"#004578",themeDark:"#005a9e",themeDarkAlt:"#106ebe",themePrimary:"#0078d4",themeSecondary:"#2b88d8",themeTertiary:"#71afe5",themeLight:"#c7e0f4",themeLighter:"#deecf9",themeLighterAlt:"#eff6fc",black:"#000000",blackTranslucent40:"rgba(0,0,0,.4)",neutralDark:"#201f1e",neutralPrimary:"#323130",neutralPrimaryAlt:"#3b3a39",neutralSecondary:"#605e5c",neutralSecondaryAlt:"#8a8886",neutralTertiary:"#a19f9d",neutralTertiaryAlt:"#c8c6c4",neutralQuaternary:"#d2d0ce",neutralQuaternaryAlt:"#e1dfdd",neutralLight:"#edebe9",neutralLighter:"#f3f2f1",neutralLighterAlt:"#faf9f8",accent:"#0078d4",white:"#ffffff",whiteTranslucent40:"rgba(255,255,255,.4)",yellowDark:"#d29200",yellow:"#ffb900",yellowLight:"#fff100",orange:"#d83b01",orangeLight:"#ea4300",orangeLighter:"#ff8c00",redDark:"#a4262c",red:"#e81123",magentaDark:"#5c005c",magenta:"#b4009e",magentaLight:"#e3008c",purpleDark:"#32145a",purple:"#5c2d91",purpleLight:"#b4a0ff",blueDark:"#002050",blueMid:"#00188f",blue:"#0078d4",blueLight:"#00bcf2",tealDark:"#004b50",teal:"#008272",tealLight:"#00b294",greenDark:"#004b1c",green:"#107c10",greenLight:"#bad80a"}},338:function(t,n,i){i.d(n,{z:function(){return o}});var e=i(921),r=void 0;try{r=window}catch(t){}function o(t){if((0,e.S)()&&void 0!==r){var n=t;return n&&n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView:r}}},357:function(t,n,i){i.r(n),i.d(n,{ChartHoverCard:function(){return d}});var e=i(566),r=i(823),o=i(594),u=i(873),a=i(61),l=(0,u.Z)(),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.color,i=t.Legend,e=t.XValue,r=t.YValue,u=t.styles,s=t.theme,c=t.ratio,d=t.descriptionMessage,f=t.culture;return this._classNames=l(u,{theme:s,color:n,XValue:e,isRatioPresent:!!c}),o.createElement("div",{className:this._classNames.calloutContentRoot},o.createElement("div",{className:this._classNames.calloutDateTimeContainer},o.createElement("div",{className:this._classNames.calloutContentX},e," ")),o.createElement("div",{className:this._classNames.calloutInfoContainer},o.createElement("div",{className:this._classNames.calloutBlockContainer},o.createElement("div",{className:this._classNames.calloutlegendText},(0,a.c$)(i,f)),o.createElement("div",{className:this._classNames.calloutContentY},(0,a.c$)(r,f))),!!c&&o.createElement("div",{className:this._classNames.ratio},o.createElement(o.Fragment,null,o.createElement("span",{className:this._classNames.numerator},(0,a.c$)(c[0],f)),"/",o.createElement("span",{className:this._classNames.denominator},(0,a.c$)(c[1],f))))),!!d&&o.createElement("div",{className:this._classNames.descriptionMessage},d))},n}(o.Component),c=i(263),d=(0,e.I)(s,c.J)},419:function(t,n,i){i.d(n,{lw:function(){return K},bp:function(){return Ct.b},s:function(){return kt.s},BO:function(){return kt.BO},up:function(){return it},nA:function(){return nt},QN:function(){return ot},gm:function(){return rt},Km:function(){return tt},O4:function(){return Mt},dX:function(){return J},Zq:function(){return e.Z}});var e=i(916),r=i(800),o=i(40),u=i(289);function a(t){var n=o.nr.getInstance(),i=[];for(var e in t)t.hasOwnProperty(e)&&i.push(e,"{",(0,u.bz)((0,r.Iy)(),t[e]),"}");var a=i.join(""),l=n.classNameFromKey(a);if(l)return l;var s=n.getClassName();return n.insertRule("@keyframes ".concat(s,"{").concat(a,"}"),!0),n.cacheClassName(s,a,[],["keyframes",a]),s}var l="cubic-bezier(.1,.9,.2,1)",s="cubic-bezier(.1,.25,.75,.9)",c="0.167s",d="0.267s",f="0.367s",v="0.467s",h=a({from:{opacity:0},to:{opacity:1}}),p=a({from:{opacity:1},to:{opacity:0,visibility:"hidden"}}),g=G(-10),y=G(-20),m=G(-40),b=G(-400),x=G(10),w=G(20),M=G(40),C=G(400),k=U(10),A=U(20),S=U(-10),L=U(-20),D=q(10),V=q(20),N=q(40),O=q(400),T=q(-10),E=q(-20),F=q(-40),B=q(-400),P=Z(-10),_=Z(-20),H=Z(10),I=Z(20),W=a({from:{transform:"scale3d(.98,.98,1)"},to:{transform:"scale3d(1,1,1)"}}),R=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(.98,.98,1)"}}),j=a({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),z=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),$=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(90deg)"}}),Y=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(-90deg)"}});function X(t,n,i){return{animationName:t,animationDuration:n,animationTimingFunction:i,animationFillMode:"both"}}function G(t){return a({from:{transform:"translate3d(".concat(t,"px,0,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function U(t){return a({from:{transform:"translate3d(0,".concat(t,"px,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function q(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(".concat(t,"px,0,0)")}})}function Z(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(0,".concat(t,"px,0)")}})}var K=function(t){var n={},i=function(i){var r;t.hasOwnProperty(i)&&Object.defineProperty(n,i,{get:function(){return void 0===r&&(r=(0,e.Z)(t[i]).toString()),r},enumerable:!0,configurable:!0})};for(var r in t)i(r);return n}({slideRightIn10:X("".concat(h,",").concat(g),f,l),slideRightIn20:X("".concat(h,",").concat(y),f,l),slideRightIn40:X("".concat(h,",").concat(m),f,l),slideRightIn400:X("".concat(h,",").concat(b),f,l),slideLeftIn10:X("".concat(h,",").concat(x),f,l),slideLeftIn20:X("".concat(h,",").concat(w),f,l),slideLeftIn40:X("".concat(h,",").concat(M),f,l),slideLeftIn400:X("".concat(h,",").concat(C),f,l),slideUpIn10:X("".concat(h,",").concat(k),f,l),slideUpIn20:X("".concat(h,",").concat(A),f,l),slideDownIn10:X("".concat(h,",").concat(S),f,l),slideDownIn20:X("".concat(h,",").concat(L),f,l),slideRightOut10:X("".concat(p,",").concat(D),f,l),slideRightOut20:X("".concat(p,",").concat(V),f,l),slideRightOut40:X("".concat(p,",").concat(N),f,l),slideRightOut400:X("".concat(p,",").concat(O),f,l),slideLeftOut10:X("".concat(p,",").concat(T),f,l),slideLeftOut20:X("".concat(p,",").concat(E),f,l),slideLeftOut40:X("".concat(p,",").concat(F),f,l),slideLeftOut400:X("".concat(p,",").concat(B),f,l),slideUpOut10:X("".concat(p,",").concat(P),f,l),slideUpOut20:X("".concat(p,",").concat(_),f,l),slideDownOut10:X("".concat(p,",").concat(H),f,l),slideDownOut20:X("".concat(p,",").concat(I),f,l),scaleUpIn100:X("".concat(h,",").concat(W),f,l),scaleDownIn100:X("".concat(h,",").concat(j),f,l),scaleUpOut103:X("".concat(p,",").concat(z),c,s),scaleDownOut98:X("".concat(p,",").concat(R),c,s),fadeIn100:X(h,c,s),fadeIn200:X(h,d,s),fadeIn400:X(h,f,s),fadeIn500:X(h,v,s),fadeOut100:X(p,c,s),fadeOut200:X(p,d,s),fadeOut400:X(p,f,s),fadeOut500:X(p,v,s),rotate90deg:X($,"0.1s",s),rotateN90deg:X(Y,"0.1s",s)}),J={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",whiteSpace:"nowrap"},Q=(0,i(753).J9)((function(t,n){var i=o.nr.getInstance();return n?Object.keys(t).reduce((function(n,e){return n[e]=i.getClassName(t[e]),n}),{}):t}));function tt(t,n,i){return Q(t,void 0!==i?i:n.disableGlobalClassNames)}var nt,it="@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)",et=i(517);function rt(t,n,i,e,r,o,u,a){return function(t,n){var i,e;void 0===n&&(n={});var r=n.borderRadius,o=n.inset,u=void 0===o?0:o,a=n.width,l=void 0===a?1:a,s=n.position,c=void 0===s?"relative":s,d=n.highContrastStyle,f=n.borderColor,v=void 0===f?t.palette.white:f,h=n.outlineColor,p=void 0===h?t.palette.neutralSecondary:h,g=n.isFocusedOnly,y=void 0===g||g,m=n.pointerEvents;return{outline:"transparent",position:c,selectors:(i={"::-moz-focus-inner":{border:"0"}},i[".".concat(et.Y2," &").concat(y?":focus":"",":after, :host(.").concat(et.Y2,") &").concat(y?":focus":"",":after")]={content:'""',position:"absolute",pointerEvents:m,left:u+1,top:u+1,bottom:u+1,right:u+1,border:"".concat(l,"px solid ").concat(v),outline:"".concat(l,"px solid ").concat(p),zIndex:nt.FocusStyle,borderRadius:r,selectors:(e={},e[it]=d,e)},i)}}(t,"number"!=typeof n&&n?n:{inset:n,position:i,highContrastStyle:e,borderColor:r,outlineColor:o,isFocusedOnly:u,borderRadius:a})}function ot(){return{selectors:{"&::-moz-focus-inner":{border:0},"&":{outline:"transparent"}}}}!function(t){t.Nav=1,t.ScrollablePane=1,t.FocusStyle=1,t.Coachmark=1e3,t.Layer=1e6,t.KeytipLayer=1000001}(nt||(nt={}));var ut,at=i(823),lt=i(338),st=i(540),ct=function(){return ct=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},ct.apply(this,arguments)},dt="undefined"==typeof window?i.g:window,ft=dt&&dt.CSPSettings&&dt.CSPSettings.nonce,vt=((ut=dt.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]}).runState||(ut=ct({},ut,{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),ut.registeredThemableStyles||(ut=ct({},ut,{registeredThemableStyles:[]})),dt.__themeState__=ut,ut);function ht(t){vt.theme=t,function(){if(vt.theme){for(var t=[],n=0,i=vt.registeredThemableStyles;n<i.length;n++){var e=i[n];t.push(e.themableStyle)}t.length>0&&(void 0===(o=1)&&(o=3),3!==o&&2!==o||(pt(vt.registeredStyles),vt.registeredStyles=[]),3!==o&&1!==o||(pt(vt.registeredThemableStyles),vt.registeredThemableStyles=[]),r=[].concat.apply([],t),vt.loadStyles?vt.loadStyles(gt(r).styleString,r):function(t){if("undefined"!=typeof document){var n=document.getElementsByTagName("head")[0],i=document.createElement("style"),e=gt(t),r=e.styleString,o=e.themable;i.setAttribute("data-load-themed-styles","true"),i.type="text/css",ft&&i.setAttribute("nonce",ft),i.appendChild(document.createTextNode(r)),vt.perf.count++,n.appendChild(i);var u=document.createEvent("HTMLEvents");u.initEvent("styleinsert",!0,!1),u.args={newStyle:i},document.dispatchEvent(u);var a={styleElement:i,themableStyle:t};o?vt.registeredThemableStyles.push(a):vt.registeredStyles.push(a)}}(r))}var r,o}()}function pt(t){t.forEach((function(t){var n=t&&t.styleElement;n&&n.parentElement&&n.parentElement.removeChild(n)}))}function gt(t){var n=vt.theme,i=!1;return{styleString:(t||[]).map((function(t){var e=t.theme;if(e){i=!0;var r=n?n[e]:void 0,o=t.defaultValue||"inherit";return n&&!r&&console&&!(e in n)&&"undefined"!=typeof DEBUG&&DEBUG&&console.warn('Theming value not provided for "'+e+'". Falling back to "'+o+'".'),r||o}return t.rawString})).join(""),themable:i}}var yt=i(143),mt=(0,yt.a)({}),bt=[],xt="theme";function wt(){var t,n,i,e=(0,lt.z)();(null===(n=null==e?void 0:e.FabricConfig)||void 0===n?void 0:n.legacyTheme)?function(t,n){var i;void 0===n&&(n=!1),mt=(0,yt.a)(t,n),ht((0,at.Cl)((0,at.Cl)((0,at.Cl)((0,at.Cl)({},mt.palette),mt.semanticColors),mt.effects),function(t){for(var n={},i=0,e=Object.keys(t.fonts);i<e.length;i++)for(var r=e[i],o=t.fonts[r],u=0,a=Object.keys(o);u<a.length;u++){var l=a[u],s=r+l.charAt(0).toUpperCase()+l.slice(1),c=o[l];"fontSize"===l&&"number"==typeof c&&(c+="px"),n[s]=c}return n}(mt))),st.X.applySettings(((i={})[xt]=mt,i)),bt.forEach((function(t){try{t(mt)}catch(t){}}))}(e.FabricConfig.legacyTheme):st.X.getSettings([xt]).theme||((null===(i=null==e?void 0:e.FabricConfig)||void 0===i?void 0:i.theme)&&(mt=(0,yt.a)(e.FabricConfig.theme)),st.X.applySettings(((t={})[xt]=mt,t)))}function Mt(t){return void 0===t&&(t=!1),!0===t&&(mt=(0,yt.a)({},t)),mt}wt();var Ct=i(302),kt=i(41);(0,i(887).v)("@fluentui/style-utilities","8.13.4"),wt()},468:function(t,n,i){i.d(n,{G:function(){return r},S:function(){return o}});var e=i(338);function r(t){var n=null;try{var i=(0,e.z)();n=i?i.sessionStorage.getItem(t):null}catch(t){}return n}function o(t,n){var i;try{null===(i=(0,e.z)())||void 0===i||i.sessionStorage.setItem(t,n)}catch(t){}}},506:function(t,n,i){i.d(n,{T:function(){return o}});var e=i(823),r=i(638);function o(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t&&1===t.length&&t[0]&&!t[0].subComponentStyles&&!(0,r.db)(t[0]))return t[0];for(var i={},u={},a=0,l=t;a<l.length;a++){var s=l[a];if(s&&!(0,r.db)(s))for(var c in s)if(s.hasOwnProperty(c)){if("subComponentStyles"===c&&void 0!==s.subComponentStyles){var d=s.subComponentStyles;for(var f in d)d.hasOwnProperty(f)&&(u.hasOwnProperty(f)?u[f].push(d[f]):u[f]=[d[f]]);continue}var v=i[c],h=s[c];i[c]=void 0===v?h:(0,e.fX)((0,e.fX)([],Array.isArray(v)?v:[v],!0),Array.isArray(h)?h:[h],!0)}}if(Object.keys(u).length>0){i.subComponentStyles={};var p=i.subComponentStyles,g=function(t){if(u.hasOwnProperty(t)){var n=u[t];p[t]=function(t){return o.apply(void 0,n.map((function(n){return"function"==typeof n?n(t):n})))}}};for(var f in u)g(f)}return i}},517:function(t,n,i){i.d(n,{Y2:function(){return e}});var e="ms-Fabric--isFocusVisible"},540:function(t,n,i){i.d(n,{X:function(){return h}});var e=i(823),r=i(338),o="__globalSettings__",u="__callbacks__",a=0,l=function(){function t(){}return t.getValue=function(t,n){var i=s();return void 0===i[t]&&(i[t]="function"==typeof n?n():n),i[t]},t.setValue=function(t,n){var i=s(),e=i[u],r=i[t];if(n!==r){i[t]=n;var o={oldValue:r,value:n,key:t};for(var a in e)e.hasOwnProperty(a)&&e[a](o)}return n},t.addChangeListener=function(t){var n=t.__id__,i=c();n||(n=t.__id__=String(a++)),i[n]=t},t.removeChangeListener=function(t){delete c()[t.__id__]},t}();function s(){var t,n=(0,r.z)()||{};return n[o]||(n[o]=((t={})[u]={},t)),n[o]}function c(){return s()[u]}var d={settings:{},scopedSettings:{},inCustomizerContext:!1},f=l.getValue("customizations",{settings:{},scopedSettings:{},inCustomizerContext:!1}),v=[],h=function(){function t(){}return t.reset=function(){f.settings={},f.scopedSettings={}},t.applySettings=function(n){f.settings=(0,e.Cl)((0,e.Cl)({},f.settings),n),t._raiseChange()},t.applyScopedSettings=function(n,i){f.scopedSettings[n]=(0,e.Cl)((0,e.Cl)({},f.scopedSettings[n]),i),t._raiseChange()},t.getSettings=function(t,n,i){void 0===i&&(i=d);for(var e={},r=n&&i.scopedSettings[n]||{},o=n&&f.scopedSettings[n]||{},u=0,a=t;u<a.length;u++){var l=a[u];e[l]=r[l]||i.settings[l]||o[l]||f.settings[l]}return e},t.applyBatchedUpdates=function(n,i){t._suppressUpdates=!0;try{n()}catch(t){}t._suppressUpdates=!1,i||t._raiseChange()},t.observe=function(t){v.push(t)},t.unobserve=function(t){v=v.filter((function(n){return n!==t}))},t._raiseChange=function(){t._suppressUpdates||v.forEach((function(t){return t()}))},t}()},543:function(t,n,i){i.d(n,{Y:function(){return r}});var e=i(921);function r(t){if((0,e.S)()&&"undefined"!=typeof document){var n=t;return n&&n.ownerDocument?n.ownerDocument:document}}},566:function(t,n,i){i.d(n,{I:function(){return v}});var e=i(823),r=i(594),o=i(506),u=i(638),a=function(){return!1},l=function(){},s=r.createContext({stylesheets:new Map,useAdoptedStylesheetEx:a,useAdoptedStylesheet:a,useShadowConfig:function(){return u.ou},useMergeStylesShadowRootContext:l,useHasMergeStylesShadowRootContext:a,useMergeStylesRootStylesheets:function(){return new Map},useWindow:l,useStyled:l}),c=function(){var t=r.useContext(s);return{useAdoptedStylesheet:t.useAdoptedStylesheet,useAdoptedStylesheetEx:t.useAdoptedStylesheetEx,useShadowConfig:t.useShadowConfig,useMergeStylesShadowRootContext:t.useMergeStylesShadowRootContext,useHasMergeStylesShadowRootContext:t.useHasMergeStylesShadowRootContext,useMergeStylesRootStylesheets:t.useMergeStylesRootStylesheets,useWindow:t.useWindow,useStyled:t.useStyled}},d=i(927),f=["theme","styles"];function v(t,n,i,u,a){var l=(u=u||{scope:"",fields:void 0}).scope,s=u.fields,v=void 0===s?f:s,h=r.forwardRef((function(u,a){var s=r.useRef(void 0),f=(0,d.m)(v,l),h=f.styles,p=(f.dir,(0,e.Tt)(f,["styles","dir"])),g=i?i(u):void 0,y=c().useStyled,m=s.current&&s.current.__cachedInputs__||[],b=u.styles;if(!s.current||h!==m[1]||b!==m[2]){var x=function(t){return function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=[],r=0,u=n;r<u.length;r++){var a=u[r];a&&e.push("function"==typeof a?a(t):a)}return 1===e.length?e[0]:e.length?o.T.apply(void 0,e):{}}(t,n,h,b)};x.__cachedInputs__=[n,h,b],x.__noStyleOverride__=!h&&!b,s.current=x}return s.current.__shadowConfig__=y(l),r.createElement(t,(0,e.Cl)({ref:a},p,g,u,{styles:s.current}))}));h.displayName="Styled".concat(t.displayName||t.name);var p=a?r.memo(h):h;return h.displayName&&(p.displayName=h.displayName),p}},594:function(t){t.exports=React},638:function(t,n,i){i.d(n,{P6:function(){return e},Se:function(){return r},db:function(){return u},ou:function(){return o}});var e="__global__",r="__shadow_dom_stylesheet__",o={stylesheetKey:e,inShadow:!1,window:void 0,__isShadowConfig__:!0},u=function(t){return!(!t||!function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}(t))&&!0===t.__isShadowConfig__}},753:function(t,n,i){i.d(n,{J5:function(){return d},J9:function(){return c}});var e=i(40),r=!1,o=0,u={empty:!0},a={},l="undefined"==typeof WeakMap?null:WeakMap;function s(){o++}function c(t,n,i){if(void 0===n&&(n=100),void 0===i&&(i=!1),!l)return t;if(!r){var c=e.nr.getInstance();c&&c.onReset&&e.nr.getInstance().onReset(s),r=!0}var d,v=0,h=o;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var l,s=d;(void 0===d||h!==o||n>0&&v>n)&&(d=f(),v=0,h=o),s=d;for(var c=0;c<e.length;c++){var p=(l=e[c])?"object"==typeof l||"function"==typeof l?l:(a[l]||(a[l]={val:l}),a[l]):u;s.map.has(p)||s.map.set(p,f()),s=s.map.get(p)}return s.hasOwnProperty("value")||(s.value=t.apply(void 0,e),v++),!i||null!==s.value&&void 0!==s.value||(s.value=t.apply(void 0,e)),s.value}}function d(t){if(!l)return t;var n=new l;return function(i){if(!i||"function"!=typeof i&&"object"!=typeof i)return t(i);if(n.has(i))return n.get(i);var e=t(i);return n.set(i,e),e}}function f(){return{map:l?new l:null}}},770:function(t,n,i){i.d(n,{z:function(){return e}});var e=i(594).createContext({customizations:{inCustomizerContext:!1,settings:{},scopedSettings:{}}})},800:function(t,n,i){i.d(n,{DU:function(){return o},Iy:function(){return a}});var e,r=i(638);function o(t){e!==t&&(e=t)}function u(){return void 0===e&&(e="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),e}function a(){return{rtl:u(),shadowConfig:r.ou}}e=u()},823:function(t,n,i){i.d(n,{C6:function(){return r},Cl:function(){return o},Tt:function(){return u},YH:function(){return l},fX:function(){return s},sH:function(){return a}});var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},e(t,n)};function r(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var o=function(){return o=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},o.apply(this,arguments)};function u(t,n){var i={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(i[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(e=Object.getOwnPropertySymbols(t);r<e.length;r++)n.indexOf(e[r])<0&&Object.prototype.propertyIsEnumerable.call(t,e[r])&&(i[e[r]]=t[e[r]])}return i}function a(t,n,i,e){return new(i||(i=Promise))((function(r,o){function u(t){try{l(e.next(t))}catch(t){o(t)}}function a(t){try{l(e.throw(t))}catch(t){o(t)}}function l(t){t.done?r(t.value):function(t){return t instanceof i?t:new i((function(n){n(t)}))}(t.value).then(u,a)}l((e=e.apply(t,n||[])).next())}))}function l(t,n){var i,e,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(o=0)),o;)try{if(i=1,e&&(r=2&a[0]?e.return:a[0]?e.throw||((r=e.return)&&r.call(e),0):e.next)&&!(r=r.call(e,a[1])).done)return r;switch(e=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,e=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(t,o)}catch(t){a=[6,t],e=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function s(t,n,i){if(i||2===arguments.length)for(var e,r=0,o=n.length;r<o;r++)!e&&r in n||(e||(e=Array.prototype.slice.call(n,0,r)),e[r]=n[r]);return t.concat(e||Array.prototype.slice.call(n))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},873:function(t,n,i){i.d(n,{Z:function(){return g}});var e=i(40),r=i(823),o=i(506),u=i(962),a=i(289),l=i(638);var s=i(259),c=i(338),d=50,f=5,v=0,h=e.nr.getInstance();h&&h.onReset&&h.onReset((function(){return v++}));var p="__retval__";function g(t){void 0===t&&(t={});var n=new Map,i=0,h=0,g=v;return function(y,b){var x;if(void 0===b&&(b={}),t.useStaticStyles&&"function"==typeof y&&y.__noStyleOverride__)return y(b);h++;var w=y?y.__shadowConfig__:void 0,M=w&&w.window?w.window:"__default__";n.has(M)||n.set(M,new Map);var C=n.get(M),k=b.theme,A=k&&void 0!==k.rtl?k.rtl:(0,s.jI)(),S=t.disableCaching;if(g!==v&&(g=v,n.set(M,new Map),C=n.get(M),i=0),t.disableCaching||(C=m(n.get(M),y),C=m(C,b)),!S&&C[p]||(C[p]=void 0===y?{}:function(t,n){var i,s={subComponentStyles:{}},c=void 0;(0,l.db)(t[0])?(c=t[0],i=t[1]):i=t[0],null!=c||(c=null==n?void 0:n.shadowConfig);var d=(0,r.Cl)((0,r.Cl)({},n),{shadowConfig:c});if(!i&&t.length<=1)return{subComponentStyles:{}};var f=e.nr.getInstance(c);d.stylesheet=f;var v=o.T.apply(void 0,t),h=[];for(var p in v)if(v.hasOwnProperty(p)){if("subComponentStyles"===p){s.subComponentStyles=v.subComponentStyles||{};continue}if("__shadowConfig__"===p)continue;var g=v[p],y=(0,u.h)(f,g),m=y.classes,b=y.objects;(null==b?void 0:b.length)?(M=(0,a.GJ)(d||{},{displayName:p},b))&&(h.push(M),s[p]=m.concat([M.className]).join(" ")):s[p]=m.join(" ")}for(var x=0,w=h;x<w.length;x++){var M;(M=w[x])&&(0,a.Ae)(M,null==n?void 0:n.specificityMultiplier,c)}return s}(["function"==typeof y?y(b):y],{shadowConfig:y.__shadowConfig__,rtl:!!A,specificityMultiplier:t.useStaticStyles?f:void 0}),S||i++),i>(t.cacheSize||d)){var L=(0,c.z)();(null===(x=null==L?void 0:L.FabricConfig)||void 0===x?void 0:x.enableClassNameCacheFullWarning)&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(i,"/").concat(h,".")),console.trace()),n.get(M).clear(),i=0,t.disableCaching=!0}return C[p]}}function y(t,n){return n=function(t){switch(t){case void 0:return"__undefined__";case null:return"__null__";default:return t}}(n),t.has(n)||t.set(n,new Map),t.get(n)}function m(t,n){if("function"==typeof n)if(n.__cachedInputs__)for(var i=0,e=n.__cachedInputs__;i<e.length;i++)t=y(t,e[i]);else t=y(t,n);else if("object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&(t=y(t,n[r]));return t}},887:function(t,n,i){i.d(n,{v:function(){return o}});var e={},r=void 0;try{r=window}catch(t){}function o(t,n){if(void 0!==r){var i=r.__packages__=r.__packages__||{};i[t]&&e[t]||(e[t]=n,(i[t]=i[t]||[]).push(n))}}o("@fluentui/set-version","6.0.0")},916:function(t,n,i){i.d(n,{Z:function(){return l}});var e=i(962),r=i(638),o=i(800),u=i(40),a=i(289);function l(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(t,n){var i=t instanceof Array?t:[t],o=n||{};(0,r.db)(i[0])&&(o.shadowConfig=i[0]),o.stylesheet=u.nr.getInstance(o.shadowConfig);var l=(0,e.h)(o.stylesheet,i),s=l.classes,c=l.objects;return c.length&&s.push((0,a.kG)(o,c)),s.join(" ")}(t,(0,o.Iy)())}},921:function(t,n,i){function e(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}i.d(n,{S:function(){return e}})},927:function(t,n,i){i.d(n,{m:function(){return u}});var e=i(594),r=i(540),o=i(770);function u(t,n){var i,u=(i=e.useState(0)[1],function(){return i((function(t){return++t}))}),a=e.useContext(o.z).customizations,l=a.inCustomizerContext;return e.useEffect((function(){return l||r.X.observe(u),function(){l||r.X.unobserve(u)}}),[l]),r.X.getSettings(t,n,a)}},962:function(t,n,i){i.d(n,{h:function(){return r}});var e=i(638);function r(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=[],o=[],u=t;return function t(n){for(var i=0,a=n;i<a.length;i++){var l=a[i];if(l&&!(0,e.db)(l))if("string"==typeof l)if(l.indexOf(" ")>=0)t(l.split(" "));else{var s=u.argsFromClassName(l);s?t(s):-1===r.indexOf(l)&&r.push(l)}else Array.isArray(l)?t(l):"object"==typeof l&&o.push(l)}}(n),{classes:r,objects:o}}}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,{a:n}),n},i.d=function(t,n){for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};i.r(e),i.d(e,{AnnotationOnlyChart:function(){return xg},AreaChart:function(){return yh},CartesianChart:function(){return Nv},ChartHoverCard:function(){return yc.ChartHoverCard},ChartTable:function(){return ng},DataVizGradientPalette:function(){return mc},DataVizPalette:function(){return os},DeclarativeChart:function(){return cm},DonutChart:function(){return uv},FunnelChart:function(){return cg},GanttChart:function(){return Uy},GaugeChart:function(){return gg},GaugeChartVariant:function(){return sg},GaugeValueFormat:function(){return lg},GroupedVerticalBarChart:function(){return qh},HeatMapChart:function(){return Qh},HorizontalBarChart:function(){return sd},HorizontalBarChartVariant:function(){return v},HorizontalBarChartWithAxis:function(){return rg},Legends:function(){return vf},LineChart:function(){return Kv},MultiStackedBarChart:function(){return Nh},MultiStackedBarChartVariant:function(){return Mh},NodesComposition:function(){return Sp},PieChart:function(){return Sh},ResponsiveContainer:function(){return Yy},SankeyChart:function(){return Np},ScatterChart:function(){return th},Shape:function(){return Jd},Sparkline:function(){return Kp},StackedBarChart:function(){return Eh},Textbox:function(){return zv},TreeChart:function(){return Gp},TreeTraverse:function(){return Lp},VerticalBarChart:function(){return jh},VerticalStackedBarChart:function(){return Yh},getChartHoverCardStyles:function(){return Zh.J},getColorFromToken:function(){return fs},getGradientFromToken:function(){return Ac},getNextColor:function(){return ds},getNextGradient:function(){return kc},withResponsiveContainer:function(){return Xy}});var r=i(566),o=i(823),u=i(594),a=i(873),l=i(259),s=i(338),c=i(40),d="__currentId__",f=(0,s.z)()||{};void 0===f[d]&&(f[d]=0);var v,h=!1;function p(t){if(!h){var n=c.nr.getInstance();n&&n.onReset&&n.onReset(g),h=!0}return(void 0===t?"id__":t)+f[d]++}function g(t){void 0===t&&(t=0),f[d]=t}function y(t,n,i){void 0===i&&(i=0);for(var e=-1,r=i;t&&r<t.length;r++)if(n(t[r],r)){e=r;break}return e}function m(t,n){var i=y(t,n);if(!(i<0))return t[i]}!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(v||(v={}));function b(t,n){var i,e;if(void 0===n&&(n=!0),!t)return null;var r=n&&function(t){var n,i;return t&&(i=t)&&i._virtual&&(n=t._virtual.parent),n}(t);return r||("function"!=typeof t.assignedElements&&(null===(i=t.assignedSlot)||void 0===i?void 0:i.parentNode)?t.assignedSlot:11===(null===(e=t.parentNode)||void 0===e?void 0:e.nodeType)?t.parentNode.host:t.parentNode)}function x(t,n,i){return null!=i||(i=document),!t||t===i.body||t instanceof Document?null:n(t)?t:x(b(t),n)}function w(t,n,i){void 0===i&&(i=!0);var e=!1;if(t&&n)if(i)if(t===n)e=!0;else for(e=!1;n;){var r=b(n);if(r===t){e=!0;break}n=r}else t.contains&&(e=t.contains(n));return e}var M=i(543);function C(t,n,i){var e=A(t,t,!0,!1,!1,!0,void 0,void 0,n,i);return!!e&&(T(e),!0)}function k(t,n,i,e,r,o,u,a,l){var s;if(!n||!u&&n===t)return null;var c=S(n);if(r&&c&&(o||!V(n)&&!N(n))){var d=k(t,n.lastElementChild||l&&(null===(s=n.shadowRoot)||void 0===s?void 0:s.lastElementChild),!0,!0,!0,o,u,a,l);if(d){if(a&&D(d,!0,l)||!a)return d;var f=k(t,d.previousElementSibling,!0,!0,!0,o,u,a,l);if(f)return f;for(var v=d.parentElement;v&&v!==n;){var h=k(t,v.previousElementSibling,!0,!0,!0,o,u,a,l);if(h)return h;v=v.parentElement}}}return i&&c&&D(n,a,l)?n:k(t,n.previousElementSibling,!0,!0,!0,o,u,a,l)||(e?null:k(t,n.parentElement,!0,!1,!1,o,u,a,l))}function A(t,n,i,e,r,o,u,a,l,s){var c;if(!n||n===t&&r&&!u)return null;var d=(l?L:S)(n);if(i&&d&&D(n,a,s))return n;if(!r&&d&&(o||!V(n)&&!N(n))){var f=A(t,n.firstElementChild||s&&(null===(c=n.shadowRoot)||void 0===c?void 0:c.firstElementChild),!0,!0,!1,o,u,a,l,s);if(f)return f}return n===t?null:A(t,n.nextElementSibling,!0,!0,!1,o,u,a,l,s)||(e?null:A(t,n.parentElement,!1,!1,!0,o,u,a,l,s))}function S(t){if(!t||!t.getAttribute)return!1;var n=t.getAttribute("data-is-visible");return null!=n?"true"===n:0!==t.offsetHeight||null!==t.offsetParent||!0===t.isVisible}function L(t,n){var i=null!=n?n:(0,s.z)();return!!t&&S(t)&&!t.hidden&&"hidden"!==i.getComputedStyle(t).visibility}function D(t,n,i){if(void 0===i&&(i=!0),!t||t.disabled)return!1;var e=0,r=null;t&&t.getAttribute&&(r=t.getAttribute("tabIndex"))&&(e=parseInt(r,10));var o=t.getAttribute?t.getAttribute("data-is-focusable"):null,u=null!==r&&e>=0,a=!(!i||!t.shadowRoot||!t.shadowRoot.delegatesFocus),l=!!t&&"false"!==o&&("A"===t.tagName||"BUTTON"===t.tagName||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||"true"===o||u||a);return n?-1!==e&&l:l}function V(t){return!!(t&&t.getAttribute&&t.getAttribute("data-focuszone-id"))}function N(t){return!(!t||!t.getAttribute||"true"!==t.getAttribute("data-is-sub-focuszone"))}var O=void 0;function T(t){if(t){var n=(0,s.z)(t);n&&(void 0!==O&&n.cancelAnimationFrame(O),O=n.requestAnimationFrame((function(){t&&t.focus(),O=void 0})))}}function E(t,n,i,e){return t.addEventListener(n,i,e),function(){return t.removeEventListener(n,i,e)}}function F(t,n){for(var i=(0,o.Cl)({},n),e=0,r=Object.keys(t);e<r.length;e++){var u=r[e];void 0===i[u]&&(i[u]=t[u])}return i}var B=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i={},e=0,r=t;e<r.length;e++)for(var o=r[e],u=0,a=Array.isArray(o)?o:Object.keys(o);u<a.length;u++)i[a[u]]=1;return i},P=B(["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),_=B(["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","ref","role","style","tabIndex","title","translate","spellCheck","name"]),H=B(_,P),I=(B(H,["form"]),B(H,["height","loop","muted","preload","src","width"])),W=(B(I,["poster"]),B(H,["start"]),B(H,["value"]),B(H,["download","href","hrefLang","media","rel","target","type"]),B(H,["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"])),R=(B(W,["accept","alt","autoCapitalize","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","minLength","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),B(W,["autoCapitalize","cols","dirname","form","maxLength","minLength","placeholder","readOnly","required","rows","wrap"]),B(W,["form","multiple","required"]),B(H,["selected","value"]),B(H,["cellPadding","cellSpacing"]),B(H,["rowSpan","scope"]),B(H,["colSpan","headers","rowSpan","scope"]),B(H,["span"]),B(H,["span"]),B(H,["acceptCharset","action","encType","encType","method","noValidate","target"]),B(H,["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),B(H,["alt","crossOrigin","height","src","srcSet","useMap","width"]),H);function j(t,n,i){for(var e=Array.isArray(n),r={},o=0,u=Object.keys(t);o<u.length;o++){var a=u[o];!(!e&&n[a]||e&&n.indexOf(a)>=0||0===a.indexOf("data-")||0===a.indexOf("aria-"))||i&&-1!==(null==i?void 0:i.indexOf(a))||(r[a]=t[a])}return r}function z(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=[],e=0,r=t;e<r.length;e++){var o=r[e];if(o)if("string"==typeof o)i.push(o);else if(o.hasOwnProperty("toString")&&"function"==typeof o.toString)i.push(o.toString());else for(var u in o)o[u]&&i.push(u)}return i.join(" ")}function $(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return Y.apply(this,[null,t].concat(n))}function Y(t,n){for(var i=[],e=2;e<arguments.length;e++)i[e-2]=arguments[e];n=n||{};for(var r=0,o=i;r<o.length;r++){var u=o[r];if(u)for(var a in u)!u.hasOwnProperty(a)||t&&!t(a)||(n[a]=u[a])}return n}var X,G,U,q=i(916),Z=((0,q.Z)({overflow:"hidden !important"}),"data-is-scrollable");function K(t){for(var n=t,i=(0,M.Y)(t);n&&n!==i.body;){if("true"===n.getAttribute(Z))return n;n=n.parentElement}for(n=t;n&&n!==i.body;){if("false"!==n.getAttribute(Z)){var e=getComputedStyle(n),r=e?e.getPropertyValue("overflow-y"):"";if(r&&("scroll"===r||"auto"===r))return n}n=n.parentElement}return n&&n!==i.body||(n=(0,s.z)(t)),n}!function(t){t[t.top=1]="top",t[t.bottom=-1]="bottom",t[t.left=2]="left",t[t.right=-2]="right"}(G||(G={})),function(t){t[t.top=0]="top",t[t.bottom=1]="bottom",t[t.start=2]="start",t[t.end=3]="end"}(U||(U={}));var J,Q=function(){function t(t,n,i,e){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=0),this.top=i,this.bottom=e,this.left=t,this.right=n}return Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return parseFloat(this.top.toFixed(4))===parseFloat(t.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(t.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(t.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(t.right.toFixed(4))},t}();function tt(t,n,i){return{targetEdge:t,alignmentEdge:n,isAuto:i}}var nt=((J={})[0]=tt(G.top,G.left),J[1]=tt(G.top),J[2]=tt(G.top,G.right),J[3]=tt(G.top,void 0,!0),J[4]=tt(G.bottom,G.left),J[5]=tt(G.bottom),J[6]=tt(G.bottom,G.right),J[7]=tt(G.bottom,void 0,!0),J[8]=tt(G.left,G.top),J[9]=tt(G.left),J[10]=tt(G.left,G.bottom),J[11]=tt(G.right,G.top),J[12]=tt(G.right),J[13]=tt(G.right,G.bottom),J);function it(t,n){return!(t.top<n.top||t.bottom>n.bottom||t.left<n.left||t.right>n.right)}function et(t,n){var i=[];return t.top<n.top&&i.push(G.top),t.bottom>n.bottom&&i.push(G.bottom),t.left<n.left&&i.push(G.left),t.right>n.right&&i.push(G.right),i}function rt(t,n){return t[G[n]]}function ot(t,n,i){return t[G[n]]=i,t}function ut(t,n){var i=mt(n);return(rt(t,i.positiveEdge)+rt(t,i.negativeEdge))/2}function at(t,n){return t>0?n:-1*n}function lt(t,n){return at(t,rt(n,t))}function st(t,n,i){return at(i,rt(t,i)-rt(n,i))}function ct(t,n,i,e){void 0===e&&(e=!0);var r=rt(t,n)-i,o=ot(t,n,i);return e&&(o=ot(t,-1*n,rt(t,-1*n)-r)),o}function dt(t,n,i,e){return void 0===e&&(e=0),ct(t,i,rt(n,i)+at(i,e))}function ft(t,n,i){return lt(i,t)>lt(i,n)}function vt(t,n){for(var i=0,e=0,r=et(t,n);e<r.length;e++){var o=r[e];i+=Math.pow(st(t,n,o),2)}return i}function ht(t,n,i,e){return void 0===e&&(e=200),(i===G.bottom||i===G.top)&&st(t,n,i)>=e}function pt(t,n,i,e){for(var r=0,o=t;r<o.length;r++){var u=o[r],a=void 0;e&&e===-1*u?(a=ct(n.elementRectangle,u,rt(i,u),!1),n.forcedInBounds=!0):ft(a=dt(n.elementRectangle,i,u),i,-1*u)||(a=ct(a,-1*u,rt(i,-1*u),!1),n.forcedInBounds=!0),n.elementRectangle=a}return n}function gt(t,n,i){var e=mt(n).positiveEdge;return ct(t,e,i-(ut(t,n)-rt(t,e)))}function yt(t,n,i,e,r){void 0===e&&(e=0);var o=new Q(t.left,t.right,t.top,t.bottom),u=i.alignmentEdge,a=i.targetEdge,l=r?a:-1*a;return o=r?dt(o,n,a,e):function(t,n,i,e){void 0===e&&(e=0);var r=at(-1*i,e);return ct(t,-1*i,rt(n,i)+r)}(o,n,a,e),o=u?dt(o,n,u):gt(o,l,ut(n,a))}function mt(t){return t===G.top||t===G.bottom?{positiveEdge:G.left,negativeEdge:G.right}:{positiveEdge:G.top,negativeEdge:G.bottom}}function bt(t,n,i){return i&&Math.abs(st(t,i,n))>Math.abs(st(t,i,-1*n))?-1*n:n}function xt(t,n,i,e,r,o,u,a){var l,s={},c=Ct(n),d=o?i:-1*i,f=r||mt(i).positiveEdge;return u&&!function(t,n,i){return void 0!==i&&rt(t,n)===rt(i,n)}(t,(l=f,-1*l),e)||(f=bt(t,f,e)),s[G[d]]=st(t,c,d),s[G[f]]=st(t,c,f),a&&(s[G[-1*d]]=st(t,c,-1*d),s[G[-1*f]]=st(t,c,-1*f)),s}function wt(t,n,i){var e=ut(n,t),r=ut(i,t),o=mt(t),u=o.positiveEdge,a=o.negativeEdge;return e<=r?u:a}function Mt(t,n,i,e,r,o,u,a,s){void 0===o&&(o=!1);var c=yt(t,n,e,r,s);return it(c,i)?{elementRectangle:c,targetEdge:e.targetEdge,alignmentEdge:e.alignmentEdge}:function(t,n,i,e,r,o,u,a,s){void 0===r&&(r=!1),void 0===u&&(u=0);var c=e.alignmentEdge,d=e.alignTargetEdge,f={elementRectangle:t,targetEdge:e.targetEdge,alignmentEdge:c};a||s||(f=function(t,n,i,e,r,o,u){void 0===r&&(r=!1),void 0===u&&(u=0);var a=[G.left,G.right,G.bottom,G.top];(0,l.jI)()&&(a[0]*=-1,a[1]*=-1);for(var s,c=t,d=e.targetEdge,f=e.alignmentEdge,v=d,h=f,p=0;p<4;p++){if(ft(c,i,d))return{elementRectangle:c,targetEdge:d,alignmentEdge:f};if(r&&ht(n,i,d,o)){switch(d){case G.bottom:c.bottom=i.bottom;break;case G.top:c.top=i.top}return{elementRectangle:c,targetEdge:d,alignmentEdge:f,forcedInBounds:!0}}var g=vt(c,i);(!s||g<s)&&(s=g,v=d,h=f),a.splice(a.indexOf(d),1),a.length>0&&(a.indexOf(-1*d)>-1?d*=-1:(f=d,d=a.slice(-1)[0]),c=yt(t,n,{targetEdge:d,alignmentEdge:f},u))}return{elementRectangle:c=yt(t,n,{targetEdge:v,alignmentEdge:h},u),targetEdge:v,alignmentEdge:h}}(t,n,i,e,r,o,u));var v=et(f.elementRectangle,i),h=a?-f.targetEdge:void 0;if(v.length>0)if(d)if(f.alignmentEdge&&v.indexOf(-1*f.alignmentEdge)>-1){var p=function(t,n,i,e){var r=t.alignmentEdge,o=t.targetEdge,u=-1*r;return{elementRectangle:yt(t.elementRectangle,n,{targetEdge:o,alignmentEdge:u},i,e),targetEdge:o,alignmentEdge:u}}(f,n,u,s);if(it(p.elementRectangle,i))return p;f=pt(et(p.elementRectangle,i),f,i,h)}else f=pt(v,f,i,h);else f=pt(v,f,i,h);return f}(c,n,i,e,o,u,r,a,s)}function Ct(t){var n=t.getBoundingClientRect();return new Q(n.left,n.right,n.top,n.bottom)}function kt(t,n,i,e,r,u){void 0===r&&(r=!1);var a=t.gapSpace?t.gapSpace:0,s=function(t,n){var i;if(n){if(n.preventDefault){var e=n;i=new Q(e.clientX,e.clientX,e.clientY,e.clientY)}else if(n.getBoundingClientRect)i=Ct(n);else{var r=n,o=r.left||r.x,u=r.top||r.y,a=r.right||o,l=r.bottom||u;i=new Q(o,a,u,l)}if(!it(i,t))for(var s=0,c=et(i,t);s<c.length;s++){var d=c[s];i[G[d]]=t[G[d]]}}else i=new Q(0,0,0,0);return i}(i,t.target),c=function(t,n,i,e,r){return t.isAuto&&(t.alignmentEdge=wt(t.targetEdge,n,i)),t.alignTargetEdge=r,t}(function(t,n,i){if(void 0===t&&(t=7),i)return{alignmentEdge:i.alignmentEdge,isAuto:i.isAuto,targetEdge:i.targetEdge};var e=(0,o.Cl)({},nt[t]);return(0,l.jI)()?(e.alignmentEdge&&e.alignmentEdge%2==0&&(e.alignmentEdge=-1*e.alignmentEdge),void 0!==n?nt[n]:e):e}(t.directionalHint,t.directionalHintForRTL,e),s,i,t.coverTarget,t.alignTargetEdge),d=Mt(Ct(n),s,i,c,a,r,u,t.directionalHintFixed,t.coverTarget);return(0,o.Cl)((0,o.Cl)({},d),{targetRectangle:s})}function At(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=0),function(t){return Math.sqrt(t*t*2)}(t?n:0)/2+i}function St(t,n,i,e,r,u,a,l){void 0===r&&(r=!1);var c=null!=l?l:(0,s.z)(),d=t.isBeakVisible&&t.beakWidth||0,f=At(t.isBeakVisible,t.beakWidth,t.gapSpace),v=t;v.gapSpace=f;var h,p,g,y,m,b,x,w,C,k=t.bounds?(C=t.bounds,new Q(C.left,C.right,C.top,C.bottom)):new Q(0,c.innerWidth-function(){if(void 0===X){var t=(0,M.Y)(),n=t.createElement("div");n.style.setProperty("width","100px"),n.style.setProperty("height","100px"),n.style.setProperty("overflow","scroll"),n.style.setProperty("position","absolute"),n.style.setProperty("top","-9999px"),t.body.appendChild(n),X=n.offsetWidth-n.clientWidth,t.body.removeChild(n)}return X}(),0,c.innerHeight),A=kt(v,i,k,e,r,u),S=(h=A,p=function(t,n){var i=n.targetRectangle,e=mt(n.targetEdge),r=e.positiveEdge,o=e.negativeEdge,u=ut(i,n.targetEdge),a=new Q(t/2,n.elementRectangle.width-t/2,t/2,n.elementRectangle.height-t/2),l=new Q(0,t,0,t);return ft(l=gt(l=ct(l,-1*n.targetEdge,-t/2),-1*n.targetEdge,u-lt(r,n.elementRectangle)),a,r)?ft(l,a,o)||(l=dt(l,a,o)):l=dt(l,a,r),l}(d,A),g=k,y=-1*h.targetEdge,m=new Q(0,h.elementRectangle.width,0,h.elementRectangle.height),b={},x=bt(h.elementRectangle,h.alignmentEdge?h.alignmentEdge:mt(y).positiveEdge,g),w=st(h.elementRectangle,h.targetRectangle,y)>Math.abs(rt(p,y)),b[G[y]]=rt(p,y),b[G[x]]=st(p,m,x),{elementPosition:(0,o.Cl)({},b),closestEdge:wt(h.targetEdge,p,m),targetEdge:y,hideBeak:!w});return(0,o.Cl)((0,o.Cl)({},function(t,n,i,e,r){return{elementPosition:xt(t.elementRectangle,n,t.targetEdge,i,t.alignmentEdge,e,r,t.forcedInBounds),targetEdge:t.targetEdge,alignmentEdge:t.alignmentEdge}}(A,n,k,t.coverTarget,a)),{beakPosition:S})}var Lt=["TEMPLATE","STYLE","SCRIPT"];function Dt(t){var n=(0,M.Y)(t);if(!n)return function(){};for(var i=[];t!==n.body&&t.parentElement;){for(var e=0,r=t.parentElement.children;e<r.length;e++){var o=r[e],u=o.getAttribute("aria-hidden");o!==t&&"true"!==(null==u?void 0:u.toLowerCase())&&-1===Lt.indexOf(o.tagName)&&i.push([o,u])}t=t.parentElement}return i.forEach((function(t){t[0].setAttribute("aria-hidden","true")})),function(){!function(t){t.forEach((function(t){var n=t[0],i=t[1];i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}))}(i),i=[]}}var Vt=27,Nt=function(){function t(t,n){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=t||null,this._onErrorHandler=n,this._noop=function(){}}return t.prototype.dispose=function(){var t;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(t in this._timeoutIds)this._timeoutIds.hasOwnProperty(t)&&this.clearTimeout(parseInt(t,10));this._timeoutIds=null}if(this._immediateIds){for(t in this._immediateIds)this._immediateIds.hasOwnProperty(t)&&this.clearImmediate(parseInt(t,10));this._immediateIds=null}if(this._intervalIds){for(t in this._intervalIds)this._intervalIds.hasOwnProperty(t)&&this.clearInterval(parseInt(t,10));this._intervalIds=null}if(this._animationFrameIds){for(t in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(t)&&this.cancelAnimationFrame(parseInt(t,10));this._animationFrameIds=null}},t.prototype.setTimeout=function(t,n){var i=this,e=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),e=setTimeout((function(){try{i._timeoutIds&&delete i._timeoutIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._timeoutIds[e]=!0),e},t.prototype.clearTimeout=function(t){this._timeoutIds&&this._timeoutIds[t]&&(clearTimeout(t),delete this._timeoutIds[t])},t.prototype.setImmediate=function(t,n){var i=this,e=0,r=(0,s.z)(n);return this._isDisposed||(this._immediateIds||(this._immediateIds={}),e=r.setTimeout((function(){try{i._immediateIds&&delete i._immediateIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),0),this._immediateIds[e]=!0),e},t.prototype.clearImmediate=function(t,n){var i=(0,s.z)(n);this._immediateIds&&this._immediateIds[t]&&(i.clearTimeout(t),delete this._immediateIds[t])},t.prototype.setInterval=function(t,n){var i=this,e=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),e=setInterval((function(){try{t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._intervalIds[e]=!0),e},t.prototype.clearInterval=function(t){this._intervalIds&&this._intervalIds[t]&&(clearInterval(t),delete this._intervalIds[t])},t.prototype.throttle=function(t,n,i){var e=this;if(this._isDisposed)return this._noop;var r,o,u=n||0,a=!0,l=!0,s=0,c=null;i&&"boolean"==typeof i.leading&&(a=i.leading),i&&"boolean"==typeof i.trailing&&(l=i.trailing);var d=function(n){var i=Date.now(),f=i-s,v=a?u-f:u;return f>=u&&(!n||a)?(s=i,c&&(e.clearTimeout(c),c=null),r=t.apply(e._parent,o)):null===c&&l&&(c=e.setTimeout(d,v)),r};return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return o=t,d(!0)}},t.prototype.debounce=function(t,n,i){var e=this;if(this._isDisposed){var r=function(){};return r.cancel=function(){},r.flush=function(){return null},r.pending=function(){return!1},r}var o,u,a=n||0,l=!1,s=!0,c=null,d=0,f=Date.now(),v=null;i&&"boolean"==typeof i.leading&&(l=i.leading),i&&"boolean"==typeof i.trailing&&(s=i.trailing),i&&"number"==typeof i.maxWait&&!isNaN(i.maxWait)&&(c=i.maxWait);var h=function(t){v&&(e.clearTimeout(v),v=null),f=t},p=function(n){h(n),o=t.apply(e._parent,u)},g=function(t){var n=Date.now(),i=!1;t&&(l&&n-d>=a&&(i=!0),d=n);var r=n-d,u=a-r,h=n-f,y=!1;return null!==c&&(h>=c&&v?y=!0:u=Math.min(u,c-h)),r>=a||y||i?p(n):null!==v&&t||!s||(v=e.setTimeout(g,u)),o},y=function(){return!!v},m=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return u=t,g(!0)};return m.cancel=function(){y()&&h(Date.now())},m.flush=function(){return y()&&p(Date.now()),o},m.pending=y,m},t.prototype.requestAnimationFrame=function(t,n){var i=this,e=0,r=(0,s.z)(n);if(!this._isDisposed){this._animationFrameIds||(this._animationFrameIds={});var o=function(){try{i._animationFrameIds&&delete i._animationFrameIds[e],t.apply(i._parent)}catch(t){i._logError(t)}};e=r.requestAnimationFrame?r.requestAnimationFrame(o):r.setTimeout(o,0),this._animationFrameIds[e]=!0}return e},t.prototype.cancelAnimationFrame=function(t,n){var i=(0,s.z)(n);this._animationFrameIds&&this._animationFrameIds[t]&&(i.cancelAnimationFrame?i.cancelAnimationFrame(t):i.clearTimeout(t),delete this._animationFrameIds[t])},t.prototype._logError=function(t){this._onErrorHandler&&this._onErrorHandler(t)},t}();function Ot(){var t=u.useRef(void 0);return t.current||(t.current=new Nt),u.useEffect((function(){return function(){var n;null===(n=t.current)||void 0===n||n.dispose(),t.current=void 0}}),[]),t.current}function Tt(t,n,i,e){var r=u.useRef(i);r.current=i,u.useEffect((function(){var i=t&&"current"in t?t.current:t;if(i&&i.addEventListener)return E(i,n,(function(t){return r.current(t)}),e)}),[t,n,e])}function Et(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=u.useCallback((function(n){i.current=n;for(var e=0,r=t;e<r.length;e++){var o=r[e];"function"==typeof o?o(n):o&&(o.current=n)}}),(0,o.fX)([],t,!0));return i}var Ft=u.createContext({window:"object"==typeof window?window:void 0}),Bt=function(){return u.useContext(Ft).window},Pt=function(){var t;return null===(t=u.useContext(Ft).window)||void 0===t?void 0:t.document};function _t(t){var n=t.originalElement,i=t.containsFocus;n&&i&&n!==(0,s.z)()&&setTimeout((function(){var t;null===(t=n.focus)||void 0===t||t.call(n)}),0)}var Ht=u.forwardRef((function(t,n){var i=F({shouldRestoreFocus:!0,enableAriaHiddenSiblings:!0},t),e=u.useRef(void 0),r=Et(e,n);!function(t,n){var i="true"===String(t["aria-modal"]).toLowerCase()&&t.enableAriaHiddenSiblings;u.useEffect((function(){if(i&&n.current)return Dt(n.current)}),[n,i])}(i,e),function(t,n){var i=t.onRestoreFocus,e=void 0===i?_t:i,r=u.useRef(void 0),o=u.useRef(!1);u.useEffect((function(){var t,i,u;return r.current=(0,M.Y)().activeElement,t=n.current,(u=(i=(0,M.Y)(t))&&i.activeElement)&&w(t,u)&&(o.current=!0),function(){var t;null==e||e({originalElement:r.current,containsFocus:o.current,documentContainsFocus:(null===(t=(0,M.Y)())||void 0===t?void 0:t.hasFocus())||!1}),r.current=void 0}}),[]),Tt(n,"focus",u.useCallback((function(){o.current=!0}),[]),!0),Tt(n,"blur",u.useCallback((function(t){n.current&&t.relatedTarget&&!n.current.contains(t.relatedTarget)&&(o.current=!1)}),[]),!0)}(i,e);var a=i.role,l=i.className,s=i.ariaLabel,c=i.ariaLabelledBy,d=i.ariaDescribedBy,f=i.style,v=i.children,h=i.onDismiss,p=function(t,n){var i=Ot(),e=u.useState(!1),r=e[0],o=e[1];return u.useEffect((function(){return i.requestAnimationFrame((function(){var i;if(!t.style||!t.style.overflowY){var e=!1;if(n&&n.current&&(null===(i=n.current)||void 0===i?void 0:i.firstElementChild)){var u=n.current.clientHeight,a=n.current.firstElementChild.clientHeight;u>0&&a>u&&(e=a-u>1)}r!==e&&o(e)}})),function(){return i.dispose()}})),r}(i,e),g=u.useCallback((function(t){t.which===Vt&&h&&(h(t),t.preventDefault(),t.stopPropagation())}),[h]);return Tt(Bt(),"keydown",g),u.createElement("div",(0,o.Cl)({ref:r},j(i,R),{className:l,role:a,"aria-label":s,"aria-labelledby":c,"aria-describedby":d,onKeyDown:g,style:(0,o.Cl)({overflowY:p?"scroll":void 0,outline:"none"},f)}),v)}));Ht.displayName="Popup";var It=i(419);function Wt(t){var n=u.useRef(void 0);return void 0===n.current&&(n.current={value:"function"==typeof t?t():t}),n.current.value}var Rt,jt=function(){var t;return null!==(t=Bt())&&void 0!==t?t:"undefined"!=typeof window?window:void 0},zt=function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.window)||void 0===n?void 0:n.document)&&void 0!==i?i:"undefined"!=typeof document?document:void 0},$t=((Rt={})[G.top]=It.lw.slideUpIn10,Rt[G.bottom]=It.lw.slideDownIn10,Rt[G.left]=It.lw.slideLeftIn10,Rt[G.right]=It.lw.slideRightIn10,Rt),Yt={opacity:0,filter:"opacity(0)",pointerEvents:"none"},Xt=["role","aria-roledescription"],Gt={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:7},Ut=(0,a.Z)({disableCaching:!0});function qt(t,n,i,e){var r,o=t.calloutMaxHeight,a=t.finalHeight,l=t.directionalHint,s=t.directionalHintFixed,c=t.hidden,d=t.gapSpace,f=t.beakWidth,v=t.isBeakVisible,h=t.coverTarget,p=u.useState(),g=p[0],y=p[1],m=null!==(r=null==e?void 0:e.elementPosition)&&void 0!==r?r:{},b=m.top,x=m.bottom,w=(null==i?void 0:i.current)?function(t){var n,i,e,r,o=t,u=t,a=t,l=null!==(n=a.left)&&void 0!==n?n:a.x,s=null!==(i=a.top)&&void 0!==i?i:a.y,c=null!==(e=a.right)&&void 0!==e?e:l,d=null!==(r=a.bottom)&&void 0!==r?r:s;return o.stopPropagation?new Q(o.clientX,o.clientX,o.clientY,o.clientY):void 0!==l&&void 0!==s?new Q(l,c,s,d):Ct(u)}(i.current):void 0;return u.useEffect((function(){var t,i,r=null!==(t=n())&&void 0!==t?t:{},u=r.top,a=r.bottom;(null==e?void 0:e.targetEdge)===G.top&&(null==w?void 0:w.top)&&!h&&(a=w.top-function(t,n,i){return At(t,n,i)}(v,f,d)),"number"==typeof b&&a?i=a-b:"number"==typeof x&&"number"==typeof u&&a&&(i=a-u-x),y(!o&&!c||o&&i&&o>i?i:o||void 0)}),[x,o,a,l,s,n,c,e,b,d,f,v,w,h]),g}function Zt(t,n,i,e,r,a){var l,c=u.useState(),d=c[0],f=c[1],v=u.useRef(0),h=u.useRef(void 0),p=Ot(),g=t.hidden,y=t.target,m=t.finalHeight,b=t.calloutMaxHeight,x=t.onPositioned,w=t.directionalHint,M=t.hideOverflow,C=t.preferScrollResizePositioning,k=jt(),A=u.useRef(void 0);A.current!==a.current&&(A.current=a.current,l=a.current?null==k?void 0:k.getComputedStyle(a.current):void 0);var S=null==l?void 0:l.overflowY;return u.useEffect((function(){if(!g){var u=p.requestAnimationFrame((function(){var u,a,l,c;if(n.current&&i){var p=(0,o.Cl)((0,o.Cl)({},t),{target:e.current,bounds:r()}),g=i.cloneNode(!0);g.style.maxHeight=b?"".concat(b):"",g.style.visibility="hidden",null===(u=i.parentElement)||void 0===u||u.appendChild(g);var w=h.current===y?d:void 0,A=C&&!(M||"clip"===S||"hidden"===S),L=m?function(t,n,i,e,r){return function(t,n,i,e,r){return St(t,n,i,e,!1,void 0,!0,null!=r?r:(0,s.z)())}(t,n,i,e,r)}(p,n.current,g,w,k):function(t,n,i,e,r,o,u){return St(t,n,i,e,r,void 0,void 0,u)}(p,n.current,g,w,A,0,k);null===(a=i.parentElement)||void 0===a||a.removeChild(g),!d&&L||d&&L&&(c=L,!Qt((l=d).elementPosition,c.elementPosition)||!Qt(l.beakPosition.elementPosition,c.beakPosition.elementPosition))&&v.current<5?(v.current++,f(L)):v.current>0&&(v.current=0,null==x||x(d))}}),i);return h.current=y,function(){p.cancelAnimationFrame(u),h.current=void 0}}f(void 0),v.current=0}),[g,w,p,i,b,n,e,m,r,x,d,t,y,M,C,S,k]),d}var Kt=u.memo(u.forwardRef((function(t,n){var i=F(Gt,t),e=i.styles,r=i.style,a=i.ariaLabel,l=i.ariaDescribedBy,s=i.ariaLabelledBy,c=i.className,d=i.isBeakVisible,f=i.children,v=i.beakWidth,h=i.calloutWidth,p=i.calloutMaxWidth,g=i.calloutMinWidth,y=i.doNotLayer,m=i.finalHeight,b=i.hideOverflow,x=void 0===b?!!m:b,k=i.backgroundColor,A=i.calloutMaxHeight,S=i.onScroll,L=i.shouldRestoreFocus,D=void 0===L||L,V=i.target,N=i.hidden,O=i.onLayerMounted,T=i.popupProps,B=u.useRef(null),P=Et(u.useRef(null),null==T?void 0:T.ref),_=u.useState(null),H=_[0],I=_[1],W=u.useCallback((function(t){I(t)}),[]),$=Et(B,n),Y=function(t,n){var i,e,r,o=u.useRef(void 0),a=u.useRef(null),l=Bt();if(!t||t!==o.current||"string"==typeof t){var s=null==n?void 0:n.current;if(t)if("string"==typeof t)if(null===(i=null==s?void 0:s.getRootNode())||void 0===i?void 0:i.host)a.current=null!==(r=null===(e=null==s?void 0:s.getRootNode())||void 0===e?void 0:e.querySelector(t))&&void 0!==r?r:null;else{var c=(0,M.Y)(s);a.current=c?c.querySelector(t):null}else a.current="stopPropagation"in t||"getBoundingClientRect"in t?t:"current"in t?t.current:t;o.current=t}return[a,l]}(i.target,{current:H}),X=Y[0],G=Y[1],U=function(t,n,i){var e=t.bounds,r=t.minPagePadding,o=void 0===r?Gt.minPagePadding:r,a=t.target,l=u.useState(!1),s=l[0],c=l[1],d=u.useRef(void 0),f=u.useCallback((function(){if(!d.current||s){var t="function"==typeof e?i?e(a,i):void 0:e;!t&&i&&(t=function(t,n){return function(t,n){var i=void 0;if(n.getWindowSegments&&(i=n.getWindowSegments()),void 0===i||i.length<=1)return{top:0,left:0,right:n.innerWidth,bottom:n.innerHeight,width:n.innerWidth,height:n.innerHeight};var e=0,r=0;if(null!==t&&t.getBoundingClientRect){var o=t.getBoundingClientRect();e=(o.left+o.right)/2,r=(o.top+o.bottom)/2}else null!==t&&(e=t.left||t.x,r=t.top||t.y);for(var u={top:0,left:0,right:0,bottom:0,width:0,height:0},a=0,l=i;a<l.length;a++){var s=l[a];e&&s.left<=e&&s.right>=e&&r&&s.top<=r&&s.bottom>=r&&(u={top:s.top,left:s.left,right:s.right,bottom:s.bottom,width:s.width,height:s.height})}return u}(t,n)}(n.current,i),t={top:t.top+o,left:t.left+o,right:t.right-o,bottom:t.bottom-o,width:t.width-2*o,height:t.height-2*o}),d.current=t,s&&c(!1)}return d.current}),[e,o,a,n,i,s]),v=Ot();return Tt(i,"resize",v.debounce((function(){c(!0)}),500,{leading:!0})),f}(i,X,G),q=Zt(i,B,H,X,U,P),Z=qt(i,U,X,q),K=function(t,n,i,e,r){var o=t.hidden,a=t.onDismiss,l=t.preventDismissOnScroll,s=t.preventDismissOnResize,c=t.preventDismissOnLostFocus,d=t.dismissOnTargetClick,f=t.shouldDismissOnWindowFocus,v=t.preventDismissOnEvent,h=u.useRef(!1),p=Ot(),g=Wt([function(){h.current=!0},function(){h.current=!1}]),y=!!n;return u.useEffect((function(){var t=function(t){y&&!l&&g(t)},n=function(t){s||v&&v(t)||null==a||a(t)},u=function(t){c||g(t)},g=function(t){var n=t.composedPath?t.composedPath():[],o=n.length>0?n[0]:t.target,u=i.current&&!w(i.current,o);if(u&&h.current)h.current=!1;else if(!e.current&&u||t.target!==r&&u&&(!e.current||"stopPropagation"in e.current||d||o!==e.current&&!w(e.current,o))){if(v&&v(t))return;null==a||a(t)}},m=function(t){f&&((!v||v(t))&&(v||c)||(null==r?void 0:r.document.hasFocus())||null!==t.relatedTarget||null==a||a(t))},b=new Promise((function(i){p.setTimeout((function(){if(!o&&r){var e=[E(r,"scroll",t,!0),E(r,"resize",n,!0),E(r.document.documentElement,"focus",u,!0),E(r.document.documentElement,"click",u,!0),E(r,"blur",m,!0)];i((function(){e.forEach((function(t){return t()}))}))}}),0)}));return function(){b.then((function(t){return t()}))}}),[o,p,i,e,r,a,f,d,c,s,l,y,v]),g}(i,q,B,X,G),J=K[0],Q=K[1],tt=(null==q?void 0:q.elementPosition.top)&&(null==q?void 0:q.elementPosition.bottom),nt=(0,o.Cl)((0,o.Cl)({},null==q?void 0:q.elementPosition),{maxHeight:Z});if(tt&&(nt.bottom=void 0),function(t,n,i){var e=t.hidden,r=t.setInitialFocus,o=Ot(),a=!!n;u.useEffect((function(){if(!e&&r&&a&&i){var t=o.requestAnimationFrame((function(){return C(i)}),i);return function(){return o.cancelAnimationFrame(t)}}}),[e,a,o,i,r])}(i,q,H),u.useEffect((function(){N||null==O||O()}),[N]),!G)return null;var it=x,et=d&&!!V,rt=Ut(e,{theme:i.theme,className:c,overflowYHidden:it,calloutWidth:h,positions:q,beakWidth:v,backgroundColor:k,calloutMaxWidth:p,calloutMinWidth:g,doNotLayer:y}),ot=(0,o.Cl)((0,o.Cl)({maxHeight:A||"100%"},r),it&&{overflowY:"hidden"}),ut=i.hidden?{visibility:"hidden"}:void 0;return u.createElement("div",{ref:$,className:rt.container,style:ut},u.createElement("div",(0,o.Cl)({},j(i,R,Xt),{className:z(rt.root,q&&q.targetEdge&&$t[q.targetEdge]),style:q?(0,o.Cl)({},nt):Yt,tabIndex:-1,ref:W}),et&&u.createElement("div",{className:rt.beak,style:Jt(q)}),et&&u.createElement("div",{className:rt.beakCurtain}),u.createElement(Ht,(0,o.Cl)({role:i.role,"aria-roledescription":i["aria-roledescription"],ariaDescribedBy:l,ariaLabel:a,ariaLabelledBy:s,className:rt.calloutMain,onDismiss:i.onDismiss,onMouseDown:J,onMouseUp:Q,onRestoreFocus:i.onRestoreFocus,onScroll:S,shouldRestoreFocus:D,style:ot},T,{ref:P}),f)))})),(function(t,n){return!(n.shouldUpdateWhenHidden||!t.hidden||!n.hidden)||function(t,n){if(!t||!n)return!t&&!n;for(var i in t)if(t.hasOwnProperty(i)&&(!n.hasOwnProperty(i)||n[i]!==t[i]))return!1;for(var i in n)if(n.hasOwnProperty(i)&&!t.hasOwnProperty(i))return!1;return!0}(t,n)}));function Jt(t){var n,i,e=(0,o.Cl)((0,o.Cl)({},null===(n=null==t?void 0:t.beakPosition)||void 0===n?void 0:n.elementPosition),{display:(null===(i=null==t?void 0:t.beakPosition)||void 0===i?void 0:i.hideBeak)?"none":void 0});return e.top||e.bottom||e.left||e.right||(e.left=0,e.top=0),e}function Qt(t,n){for(var i in n)if(n.hasOwnProperty(i)){var e=t[i],r=n[i];if(void 0===e||void 0===r)return!1;if(e.toFixed(2)!==r.toFixed(2))return!1}return!0}function tn(t){return{height:t,width:t}}Kt.displayName="CalloutContentBase";var nn={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},en=(0,r.I)(Kt,(function(t){var n,i=t.theme,e=t.className,r=t.overflowYHidden,o=t.calloutWidth,u=t.beakWidth,a=t.backgroundColor,l=t.calloutMaxWidth,s=t.calloutMinWidth,c=t.doNotLayer,d=(0,It.Km)(nn,i),f=i.semanticColors,v=i.effects;return{container:[d.container,{position:"relative"}],root:[d.root,i.fonts.medium,{position:"absolute",display:"flex",zIndex:c?It.nA.Layer:void 0,boxSizing:"border-box",borderRadius:v.roundedCorner2,boxShadow:v.elevation16,selectors:(n={},n[It.up]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},n)},(0,It.QN)(),e,!!o&&{width:o},!!l&&{maxWidth:l},!!s&&{minWidth:s}],beak:[d.beak,{position:"absolute",backgroundColor:f.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},tn(u),a&&{backgroundColor:a}],beakCurtain:[d.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:f.menuBackground,borderRadius:v.roundedCorner2}],calloutMain:[d.calloutMain,{backgroundColor:f.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",width:"100%",borderRadius:v.roundedCorner2},r&&{overflowY:"hidden"},a&&{backgroundColor:a}]}}),void 0,{scope:"CalloutContent"}),rn=u.createContext(void 0),on=function(){return function(){}};rn.Provider;var un=ReactDOM,an=i(753);new WeakMap,new WeakMap;var ln=u.createContext(void 0),sn=function(t){var n=t.providerRef,i=t.layerRoot,e=u.useState([])[0],r=u.useContext(ln),o=void 0!==r&&!i,a=u.useMemo((function(){return o?void 0:{providerRef:n,registeredProviders:e,registerProvider:function(t){e.push(t),null==r||r.registerProvider(t)},unregisterProvider:function(t){null==r||r.unregisterProvider(t);var n=e.indexOf(t);n>=0&&e.splice(n,1)}}}),[n,e,r,o]);return u.useEffect((function(){if(a)return a.registerProvider(a.providerRef),function(){return a.unregisterProvider(a.providerRef)}}),[a]),a?u.createElement(ln.Provider,{value:a},t.children):u.createElement(u.Fragment,null,t.children)},cn=i(540),dn=i(770);function fn(t,n){void 0===t&&(t={});var i=vn(n)?n:function(t){return function(n){return t?(0,o.Cl)((0,o.Cl)({},n),t):n}}(n);return i(t)}function vn(t){return"function"==typeof t}var hn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onCustomizationChange=function(){return n.forceUpdate()},n}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){cn.X.observe(this._onCustomizationChange)},n.prototype.componentWillUnmount=function(){cn.X.unobserve(this._onCustomizationChange)},n.prototype.render=function(){var t=this,n=this.props.contextTransform;return u.createElement(dn.z.Consumer,null,(function(i){var e=function(t,n){var i,e,r,u=(n||{}).customizations,a=void 0===u?{settings:{},scopedSettings:{}}:u;return{customizations:{settings:fn(a.settings,t.settings),scopedSettings:(i=a.scopedSettings,e=t.scopedSettings,void 0===i&&(i={}),(vn(e)?e:(void 0===(r=e)&&(r={}),function(t){var n=(0,o.Cl)({},t);for(var i in r)r.hasOwnProperty(i)&&(n[i]=(0,o.Cl)((0,o.Cl)({},t[i]),r[i]));return n}))(i)),inCustomizerContext:!0}}}(t.props,i);return n&&(e=n(e)),u.createElement(dn.z.Provider,{value:e},t.props.children)}))},n}(u.Component),pn=i(143),gn=(0,a.Z)(),yn=(0,an.J9)((function(t,n){return(0,pn.a)((0,o.Cl)((0,o.Cl)({},t),{rtl:n}))})),mn=u.forwardRef((function(t,n){var i=t.className,e=t.theme,r=t.applyTheme,a=t.applyThemeToBody,s=t.styles,c=gn(s,{theme:e,applyTheme:r,className:i}),d=u.useRef(null);return function(t,n,i){var e=n.bodyThemed;u.useEffect((function(){if(t){var n=(0,M.Y)(i.current);if(n)return n.body.classList.add(e),function(){n.body.classList.remove(e)}}}),[e,t,i])}(a,c,d),u.createElement(u.Fragment,null,function(t,n,i,e){var r=n.root,a=t.as,s=void 0===a?"div":a,c=t.dir,d=t.theme,f=j(t,R,["dir"]),v=function(t){var n=t.theme,i=t.dir,e=(0,l.jI)(n)?"rtl":"ltr",r=(0,l.jI)()?"rtl":"ltr",o=i||e;return{rootDir:o!==e||o!==r?o:i,needsTheme:o!==e}}(t),h=v.rootDir,p=v.needsTheme,g=u.createElement(sn,{providerRef:i},u.createElement(s,(0,o.Cl)({dir:h},f,{className:r,ref:Et(i,e)})));return p&&(g=u.createElement(hn,{settings:{theme:yn(d,"rtl"===c)}},g)),g}(t,c,d,n))}));mn.displayName="FabricBase";var bn,xn={fontFamily:"inherit"},wn={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},Mn=(0,r.I)(mn,(function(t){var n=t.applyTheme,i=t.className,e=t.preventBlanketFontInheritance,r=t.theme;return{root:[(0,It.Km)(wn,r).root,r.fonts.medium,{color:r.palette.neutralPrimary},!e&&{"& button":xn,"& input":xn,"& textarea":xn},n&&{color:r.semanticColors.bodyText,backgroundColor:r.semanticColors.bodyBackground},i],bodyThemed:[{backgroundColor:r.semanticColors.bodyBackground}]}}),void 0,{scope:"Fabric"}),Cn=i(517),kn="data-portal-element",An={},Sn={},Ln="fluent-default-layer-host",Dn="#".concat(Ln),Vn=i(921),Nn=(0,Vn.S)()?u.useLayoutEffect:u.useEffect;function On(t){console&&console.warn&&console.warn(t)}function Tn(t,n,i,e,r){if(!0===r)for(var o=0,u=i;o<u.length;o++){var a=u[o];a in n||On("".concat(t," property '").concat(a,"' is required when '").concat(e,"' is used.'"))}}function En(t,n,i){for(var e in i)if(n&&e in n){var r="".concat(t," property '").concat(e,"' was used but has been deprecated."),o=i[e];o&&(r+=" Use '".concat(o,"' instead.")),On(r)}}function Fn(t,n){return void 0!==t[n]&&null!==t[n]}function Bn(t){var n=u.useRef(void 0);return u.useEffect((function(){n.current=t})),n.current}bn={valueOnChange:{},valueDefaultValue:{},controlledToUncontrolled:{},uncontrolledToControlled:{}};var Pn=0;function _n(t){var n=t.name,i=t.props,e=t.other,r=void 0===e?[]:e,a=t.conditionallyRequired,l=t.deprecations,s=t.mutuallyExclusive,c=t.controlledUsage,d=u.useRef(!1),f=Wt((function(){return"useWarnings_".concat(Pn++)})),v=Bn(i);if(!d.current){d.current=!0;for(var h=0,p=r;h<p.length;h++)On(p[h]);if(a)for(var g=0,y=a;g<y.length;g++){var m=y[g];Tn(n,i,m.requiredProps,m.conditionalPropName,m.condition)}l&&En(n,i,l),s&&function(t,n,i){for(var e in i)if(n&&void 0!==n[e]){var r=i[e];r&&void 0!==n[r]&&On("".concat(t," property '").concat(e,"' is mutually exclusive with '").concat(i[e],"'. ")+"Use one or the other.")}}(n,i,s)}c&&function(t){var n=t.componentId,i=t.componentName,e=t.defaultValueProp,r=t.props,o=t.oldProps,u=t.onChangeProp,a=t.readOnlyProp,l=t.valueProp,s=o?Fn(o,l):void 0,c=Fn(r,l);if(c){var d=!!r[u],f=!(!a||!r[a]);d||f||bn.valueOnChange[n]||(bn.valueOnChange[n]=!0,On("Warning: You provided a '".concat(String(l),"' prop to a ").concat(String(i)," without an '").concat(String(u),"' handler. ")+"This will render a read-only field. If the field should be mutable use '".concat(String(e),"'. ")+"Otherwise, set '".concat(String(u),"'").concat(a?" or '".concat(String(a),"'"):"","."))),null==r[e]||bn.valueDefaultValue[n]||(bn.valueDefaultValue[n]=!0,On("Warning: You provided both '".concat(String(l),"' and '").concat(String(e),"' to a ").concat(i,". ")+"Form fields must be either controlled or uncontrolled (specify either the '".concat(String(l),"' prop, ")+"or the '".concat(String(e),"' prop, but not both). Decide between using a controlled or uncontrolled ")+"".concat(i," and remove one of these props. More info: https://fb.me/react-controlled-components")))}if(o&&c!==s){var v=s?"a controlled":"an uncontrolled",h=s?"uncontrolled":"controlled",p=s?bn.controlledToUncontrolled:bn.uncontrolledToControlled;p[n]||(p[n]=!0,On("Warning: A component is changing ".concat(v," ").concat(i," to be ").concat(h,". ")+"".concat(i,"s should not switch from controlled to uncontrolled (or vice versa). ")+"Decide between using controlled or uncontrolled for the lifetime of the component. More info: https://fb.me/react-controlled-components"))}}((0,o.Cl)((0,o.Cl)({},c),{componentId:f,props:i,componentName:n,oldProps:v}))}var Hn,In=(0,a.Z)(),Wn=u.forwardRef((function(t,n){var i,e=null!==(i=u.useContext(rn))&&void 0!==i?i:on,r=u.useRef(null),a=Et(r,n),l=u.useRef(void 0),s=u.useRef(null),c=u.useContext(ln),d=u.useState(!1),f=d[0],v=d[1],h=u.useCallback((function(t){var n,i=!!(null==(n=null==c?void 0:c.providerRef)?void 0:n.current)&&n.current.classList.contains(Cn.Y2);t&&i&&t.classList.add(Cn.Y2)}),[c]),p=t.children,g=t.className,y=t.eventBubblingEnabled,m=t.fabricProps,b=t.hostId,x=t.insertFirst,w=t.onLayerDidMount,C=void 0===w?function(){}:w,k=t.onLayerMounted,A=void 0===k?function(){}:k,S=t.onLayerWillUnmount,L=t.styles,D=t.theme,V=Et(s,null==m?void 0:m.ref,h),N=In(L,{theme:D,className:g,isNotHost:!b}),O=function(){null==S||S();var t=l.current;l.current=void 0,t&&t.parentNode&&t.parentNode.removeChild(t)},T=function(){var t,n,i,e,o=(0,M.Y)(r.current),u=(null===(n=null===(t=r.current)||void 0===t?void 0:t.getRootNode())||void 0===n?void 0:n.host)?null===(i=null==r?void 0:r.current)||void 0===i?void 0:i.getRootNode():void 0;if(o&&(o||u)){var a=function(t,n){var i,e;void 0===n&&(n=null);var r=null!=n?n:t;if(b){var o=function(t){var n=Sn[t];return n&&n[0]||void 0}(b);return o?null!==(i=o.rootRef.current)&&void 0!==i?i:null:null!==(e=r.getElementById(b))&&void 0!==e?e:null}var u=Dn,a=u?r.querySelector(u):null;return a||(a=function(t,n){void 0===n&&(n=null);var i=t.createElement("div");return i.setAttribute("id",Ln),i.style.cssText="position:fixed;z-index:1000000",n?n.appendChild(i):null==t||t.body.appendChild(i),i}(t,n)),a}(o,u);if(a){a.__tabsterElementFlags||(a.__tabsterElementFlags={}),a.__tabsterElementFlags.noDirectAriaHidden=!0,O();var s=(null!==(e=a.ownerDocument)&&void 0!==e?e:o).createElement("div");s.className=N.root,s.setAttribute(kn,"true"),function(t,n){var i=t,e=n;i._virtual||(i._virtual={children:[]});var r=i._virtual.parent;if(r&&r!==n){var o=r._virtual.children.indexOf(i);o>-1&&r._virtual.children.splice(o,1)}i._virtual.parent=e||void 0,e&&(e._virtual||(e._virtual={children:[]}),e._virtual.children.push(i))}(s,r.current),x?a.insertBefore(s,a.firstChild):a.appendChild(s),l.current=s,v(!0)}}};return Nn((function(){T(),b&&function(t,n){An[t]||(An[t]=[]),An[t].push(n);var i=Sn[t];if(i)for(var e=0,r=i;e<r.length;e++)r[e].notifyLayersChanged()}(b,T);var t=l.current?e(l.current):void 0;return function(){t&&t(),O(),b&&function(t,n){var i=An[t];if(i){var e=i.indexOf(n);e>=0&&(i.splice(e,1),0===i.length&&delete An[t])}var r=Sn[t];if(r)for(var o=0,u=r;o<u.length;o++)u[o].notifyLayersChanged()}(b,T)}}),[b]),u.useEffect((function(){l.current&&f&&(null==A||A(),null==C||C(),v(!1))}),[f,A,C]),function(t){_n({name:"Layer",props:t,deprecations:{onLayerMounted:"onLayerDidMount"}})}(t),u.createElement("span",{className:"ms-layer",ref:a},l.current&&un.createPortal(u.createElement(sn,{layerRoot:!0,providerRef:V},u.createElement(Mn,(0,o.Cl)({},!y&&(Hn||(Hn={},["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","onTouchMove","onTouchStart","onTouchCancel","onTouchEnd","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit"].forEach((function(t){return Hn[t]=Rn}))),Hn),m,{className:z(N.content,null==m?void 0:m.className),ref:V}),p)),l.current))}));Wn.displayName="LayerBase";var Rn=function(t){t.eventPhase===Event.BUBBLING_PHASE&&"mouseenter"!==t.type&&"mouseleave"!==t.type&&"touchstart"!==t.type&&"touchend"!==t.type&&t.stopPropagation()},jn={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"},zn=(0,r.I)(Wn,(function(t){var n=t.className,i=t.isNotHost,e=t.theme,r=(0,It.Km)(jn,e);return{root:[r.root,e.fonts.medium,i&&[r.rootNoHost,{position:"fixed",zIndex:It.nA.Layer,top:0,left:0,bottom:0,right:0,visibility:"hidden"}],n],content:[r.content,{visibility:"visible"}]}}),void 0,{scope:"Layer",fields:["hostId","theme","styles"]}),$n=u.forwardRef((function(t,n){var i=t.layerProps,e=t.doNotLayer,r=(0,o.Tt)(t,["layerProps","doNotLayer"]),a=u.createElement(en,(0,o.Cl)({},r,{doNotLayer:e,ref:n}));return e?a:u.createElement(zn,(0,o.Cl)({},i),a)}));$n.displayName="Callout";var Yn=i(61);function Xn(t){return t}var Gn=1e-6;function Un(t){return"translate("+t+",0)"}function qn(t){return"translate(0,"+t+")"}function Zn(t){return n=>+t(n)}function Kn(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),i=>+t(i)+n}function Jn(){return!this.__axis}function Qn(t,n){var i=[],e=null,r=null,o=6,u=6,a=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",d=1===t||3===t?Un:qn;function f(f){var v=null==e?n.ticks?n.ticks.apply(n,i):n.domain():e,h=null==r?n.tickFormat?n.tickFormat.apply(n,i):Xn:r,p=Math.max(o,0)+a,g=n.range(),y=+g[0]+l,m=+g[g.length-1]+l,b=(n.bandwidth?Kn:Zn)(n.copy(),l),x=f.selection?f.selection():f,w=x.selectAll(".domain").data([null]),M=x.selectAll(".tick").data(v,n).order(),C=M.exit(),k=M.enter().append("g").attr("class","tick"),A=M.select("line"),S=M.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(k),A=A.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),S=S.merge(k.append("text").attr("fill","currentColor").attr(c,s*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==x&&(w=w.transition(f),M=M.transition(f),A=A.transition(f),S=S.transition(f),C=C.transition(f).attr("opacity",Gn).attr("transform",(function(t){return isFinite(t=b(t))?d(t+l):this.getAttribute("transform")})),k.attr("opacity",Gn).attr("transform",(function(t){var n=this.parentNode.__axis;return d((n&&isFinite(n=n(t))?n:b(t))+l)}))),C.remove(),w.attr("d",4===t||2===t?u?"M"+s*u+","+y+"H"+l+"V"+m+"H"+s*u:"M"+l+","+y+"V"+m:u?"M"+y+","+s*u+"V"+l+"H"+m+"V"+s*u:"M"+y+","+l+"H"+m),M.attr("opacity",1).attr("transform",(function(t){return d(b(t)+l)})),A.attr(c+"2",s*o),S.attr(c,s*p).text(h),x.filter(Jn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=b}))}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return i=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),f):i.slice()},f.tickValues=function(t){return arguments.length?(e=null==t?null:Array.from(t),f):e&&e.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(o=u=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(u=+t,f):u},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function ti(t){return Qn(2,t)}function ni(t){return Qn(3,t)}function ii(t){return Qn(4,t)}const ei=Math.sqrt(50),ri=Math.sqrt(10),oi=Math.sqrt(2);function ui(t,n,i){const e=(n-t)/Math.max(0,i),r=Math.floor(Math.log10(e)),o=e/Math.pow(10,r),u=o>=ei?10:o>=ri?5:o>=oi?2:1;let a,l,s;return r<0?(s=Math.pow(10,-r)/u,a=Math.round(t*s),l=Math.round(n*s),a/s<t&&++a,l/s>n&&--l,s=-s):(s=Math.pow(10,r)*u,a=Math.round(t/s),l=Math.round(n/s),a*s<t&&++a,l*s>n&&--l),l<a&&.5<=i&&i<2?ui(t,n,2*i):[a,l,s]}function ai(t,n,i){if(!((i=+i)>0))return[];if((t=+t)===(n=+n))return[t];const e=n<t,[r,o,u]=e?ui(n,t,i):ui(t,n,i);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(e)if(u<0)for(let t=0;t<a;++t)l[t]=(o-t)/-u;else for(let t=0;t<a;++t)l[t]=(o-t)*u;else if(u<0)for(let t=0;t<a;++t)l[t]=(r+t)/-u;else for(let t=0;t<a;++t)l[t]=(r+t)*u;return l}function li(t,n,i){return ui(t=+t,n=+n,i=+i)[2]}function si(t,n,i){i=+i;const e=(n=+n)<(t=+t),r=e?li(n,t,i):li(t,n,i);return(e?-1:1)*(r<0?1/-r:r)}function ci(t,n,i){let e;for(;;){const r=li(t,n,i);if(r===e||0===r||!isFinite(r))return[t,n];r>0?(t=Math.floor(t/r)*r,n=Math.ceil(n/r)*r):r<0&&(t=Math.ceil(t*r)/r,n=Math.floor(n*r)/r),e=r}}function di(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}function fi(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function vi(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function hi(t,n){let i=0,e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++i,e+=n);else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(o=+o)>=o&&(++i,e+=o)}if(i)return e/i}function pi(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function gi(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}function yi(t,n,i=0,e=1/0,r){if(n=Math.floor(n),i=Math.floor(Math.max(0,i)),e=Math.floor(Math.min(t.length-1,e)),!(i<=n&&n<=e))return t;for(r=void 0===r?gi:function(t=pi){if(t===pi)return gi;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,i)=>{const e=t(n,i);return e||0===e?e:(0===t(i,i))-(0===t(n,n))}}(r);e>i;){if(e-i>600){const o=e-i+1,u=n-i+1,a=Math.log(o),l=.5*Math.exp(2*a/3),s=.5*Math.sqrt(a*l*(o-l)/o)*(u-o/2<0?-1:1);yi(t,n,Math.max(i,Math.floor(n-u*l/o+s)),Math.min(e,Math.floor(n+(o-u)*l/o+s)),r)}const o=t[n];let u=i,a=e;for(mi(t,i,n),r(t[e],o)>0&&mi(t,i,e);u<a;){for(mi(t,u,a),++u,--a;r(t[u],o)<0;)++u;for(;r(t[a],o)>0;)--a}0===r(t[i],o)?mi(t,i,a):(++a,mi(t,a,e)),a<=n&&(i=a+1),n<=a&&(e=a-1)}return t}function mi(t,n,i){const e=t[n];t[n]=t[i],t[i]=e}function bi(t,n){return function(t,n,i){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let i=-1;for(let e of t)null!=(e=n(e,++i,t))&&(e=+e)>=e&&(yield e)}}(t,i)),(e=t.length)&&!isNaN(n=+n)){if(n<=0||e<2)return di(t);if(n>=1)return fi(t);var e,r=(e-1)*n,o=Math.floor(r),u=fi(yi(t,o).subarray(0,o+1));return u+(di(t.subarray(o+1))-u)*(r-o)}}(t,.5,n)}function xi(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function wi(t){let n,i,e;function r(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<0?r=n+1:o=n}while(r<o)}return r}return 2!==t.length?(n=pi,i=(n,i)=>pi(t(n),i),e=(n,i)=>t(n)-i):(n=t===pi||t===xi?t:Mi,i=t,e=t),{left:r,center:function(t,n,i=0,o=t.length){const u=r(t,n,i,o-1);return u>i&&e(t[u-1],n)>-e(t[u],n)?u-1:u},right:function(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<=0?r=n+1:o=n}while(r<o)}return r}}}function Mi(){return 0}const Ci=1e3,ki=6e4,Ai=36e5,Si=864e5,Li=6048e5,Di=31536e6,Vi=new Date,Ni=new Date;function Oi(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=n=>(t(n=new Date(+n)),n),r.ceil=i=>(t(i=new Date(i-1)),n(i,1),t(i),i),r.round=t=>{const n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=(t,i)=>(n(t=new Date(+t),null==i?1:Math.floor(i)),t),r.range=(i,e,o)=>{const u=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return u;let a;do{u.push(a=new Date(+i)),n(i,o),t(i)}while(a<i&&i<e);return u},r.filter=i=>Oi((n=>{if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),((t,e)=>{if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););})),i&&(r.count=(n,e)=>(Vi.setTime(+n),Ni.setTime(+e),t(Vi),t(Ni),Math.floor(i(Vi,Ni))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?n=>e(n)%t===0:n=>r.count(0,n)%t===0):r:null)),r}const Ti=Oi((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));Ti.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Oi((n=>{n.setTime(Math.floor(n/t)*t)}),((n,i)=>{n.setTime(+n+i*t)}),((n,i)=>(i-n)/t)):Ti:null),Ti.range;const Ei=Oi((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*Ci)}),((t,n)=>(n-t)/Ci),(t=>t.getUTCSeconds())),Fi=(Ei.range,Oi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ci)}),((t,n)=>{t.setTime(+t+n*ki)}),((t,n)=>(n-t)/ki),(t=>t.getMinutes()))),Bi=(Fi.range,Oi((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*ki)}),((t,n)=>(n-t)/ki),(t=>t.getUTCMinutes()))),Pi=(Bi.range,Oi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ci-t.getMinutes()*ki)}),((t,n)=>{t.setTime(+t+n*Ai)}),((t,n)=>(n-t)/Ai),(t=>t.getHours()))),_i=(Pi.range,Oi((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*Ai)}),((t,n)=>(n-t)/Ai),(t=>t.getUTCHours()))),Hi=(_i.range,Oi((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ki)/Si),(t=>t.getDate()-1))),Ii=(Hi.range,Oi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/Si),(t=>t.getUTCDate()-1))),Wi=(Ii.range,Oi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/Si),(t=>Math.floor(t/Si))));function Ri(t){return Oi((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ki)/Li))}Wi.range;const ji=Ri(0),zi=Ri(1),$i=Ri(2),Yi=Ri(3),Xi=Ri(4),Gi=Ri(5),Ui=Ri(6);function qi(t){return Oi((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/Li))}ji.range,zi.range,$i.range,Yi.range,Xi.range,Gi.range,Ui.range;const Zi=qi(0),Ki=qi(1),Ji=qi(2),Qi=qi(3),te=qi(4),ne=qi(5),ie=qi(6),ee=(Zi.range,Ki.range,Ji.range,Qi.range,te.range,ne.range,ie.range,Oi((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),re=(ee.range,Oi((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),oe=(re.range,Oi((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));oe.every=t=>isFinite(t=Math.floor(t))&&t>0?Oi((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,i)=>{n.setFullYear(n.getFullYear()+i*t)})):null,oe.range;const ue=Oi((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function ae(t,n,i,e,r,o){const u=[[Ei,1,Ci],[Ei,5,5e3],[Ei,15,15e3],[Ei,30,3e4],[o,1,ki],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,Ai],[r,3,108e5],[r,6,216e5],[r,12,432e5],[e,1,Si],[e,2,1728e5],[i,1,Li],[n,1,2592e6],[n,3,7776e6],[t,1,Di]];function a(n,i,e){const r=Math.abs(i-n)/e,o=wi((([,,t])=>t)).right(u,r);if(o===u.length)return t.every(si(n/Di,i/Di,e));if(0===o)return Ti.every(Math.max(si(n,i,e),1));const[a,l]=u[r/u[o-1][2]<u[o][2]/r?o-1:o];return a.every(l)}return[function(t,n,i){const e=n<t;e&&([t,n]=[n,t]);const r=i&&"function"==typeof i.range?i:a(t,n,i),o=r?r.range(t,+n+1):[];return e?o.reverse():o},a]}ue.every=t=>isFinite(t=Math.floor(t))&&t>0?Oi((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,i)=>{n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null,ue.range;const[le,se]=ae(ue,re,Zi,Wi,_i,Bi),[ce,de]=ae(oe,ee,ji,Hi,Pi,Fi);var fe=new Date,ve=new Date;function he(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=function(n){return t(n=new Date(+n)),n},r.ceil=function(i){return t(i=new Date(i-1)),n(i,1),t(i),i},r.round=function(t){var n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=function(t,i){return n(t=new Date(+t),null==i?1:Math.floor(i)),t},r.range=function(i,e,o){var u,a=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return a;do{a.push(u=new Date(+i)),n(i,o),t(i)}while(u<i&&i<e);return a},r.filter=function(i){return he((function(n){if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),(function(t,e){if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););}))},i&&(r.count=function(n,e){return fe.setTime(+n),ve.setTime(+e),t(fe),t(ve),Math.floor(i(fe,ve))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?function(n){return e(n)%t===0}:function(n){return r.count(0,n)%t===0}):r:null}),r}const pe=864e5,ge=6048e5;function ye(t){return he((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/ge}))}var me=ye(0),be=ye(1),xe=ye(2),we=ye(3),Me=ye(4),Ce=ye(5),ke=ye(6),Ae=(me.range,be.range,xe.range,we.range,Me.range,Ce.range,ke.range,he((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/pe}),(function(t){return t.getUTCDate()-1}))),Se=Ae;function Le(t){return he((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/ge}))}Ae.range;var De=Le(0),Ve=Le(1),Ne=Le(2),Oe=Le(3),Te=Le(4),Ee=Le(5),Fe=Le(6),Be=(De.range,Ve.range,Ne.range,Oe.range,Te.range,Ee.range,Fe.range,he((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/pe),(t=>t.getDate()-1))),Pe=Be,_e=(Be.range,he((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));_e.every=function(t){return isFinite(t=Math.floor(t))&&t>0?he((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,i){n.setFullYear(n.getFullYear()+i*t)})):null};var He=_e,Ie=(_e.range,he((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Ie.every=function(t){return isFinite(t=Math.floor(t))&&t>0?he((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,i){n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null};var We=Ie;function Re(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function je(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ze(t,n,i){return{y:t,m:n,d:i,H:0,M:0,S:0,L:0}}function $e(t){var n=t.dateTime,i=t.date,e=t.time,r=t.periods,o=t.days,u=t.shortDays,a=t.months,l=t.shortMonths,s=tr(r),c=nr(r),d=tr(o),f=nr(o),v=tr(u),h=nr(u),p=tr(a),g=nr(a),y=tr(l),m=nr(l),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Mr,e:Mr,f:Lr,g:Hr,G:Wr,H:Cr,I:kr,j:Ar,L:Sr,m:Dr,M:Vr,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:so,s:co,S:Nr,u:Or,U:Tr,V:Fr,w:Br,W:Pr,x:null,X:null,y:_r,Y:Ir,Z:Rr,"%":lo},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:jr,e:jr,f:Gr,g:ro,G:uo,H:zr,I:$r,j:Yr,L:Xr,m:Ur,M:qr,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:so,s:co,S:Zr,u:Kr,U:Jr,V:to,w:no,W:io,x:null,X:null,y:eo,Y:oo,Z:ao,"%":lo},w={a:function(t,n,i){var e=v.exec(n.slice(i));return e?(t.w=h.get(e[0].toLowerCase()),i+e[0].length):-1},A:function(t,n,i){var e=d.exec(n.slice(i));return e?(t.w=f.get(e[0].toLowerCase()),i+e[0].length):-1},b:function(t,n,i){var e=y.exec(n.slice(i));return e?(t.m=m.get(e[0].toLowerCase()),i+e[0].length):-1},B:function(t,n,i){var e=p.exec(n.slice(i));return e?(t.m=g.get(e[0].toLowerCase()),i+e[0].length):-1},c:function(t,i,e){return k(t,n,i,e)},d:fr,e:fr,f:mr,g:lr,G:ar,H:hr,I:hr,j:vr,L:yr,m:dr,M:pr,p:function(t,n,i){var e=s.exec(n.slice(i));return e?(t.p=c.get(e[0].toLowerCase()),i+e[0].length):-1},q:cr,Q:xr,s:wr,S:gr,u:er,U:rr,V:or,w:ir,W:ur,x:function(t,n,e){return k(t,i,n,e)},X:function(t,n,i){return k(t,e,n,i)},y:lr,Y:ar,Z:sr,"%":br};function M(t,n){return function(i){var e,r,o,u=[],a=-1,l=0,s=t.length;for(i instanceof Date||(i=new Date(+i));++a<s;)37===t.charCodeAt(a)&&(u.push(t.slice(l,a)),null!=(r=Ue[e=t.charAt(++a)])?e=t.charAt(++a):r="e"===e?" ":"0",(o=n[e])&&(e=o(i,r)),u.push(e),l=a+1);return u.push(t.slice(l,a)),u.join("")}}function C(t,n){return function(i){var e,r,o=ze(1900,void 0,1);if(k(o,t,i+="",0)!=i.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(n&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(e=je(ze(o.y,0,1))).getUTCDay(),e=r>4||0===r?be.ceil(e):be(e),e=Se.offset(e,7*(o.V-1)),o.y=e.getUTCFullYear(),o.m=e.getUTCMonth(),o.d=e.getUTCDate()+(o.w+6)%7):(r=(e=Re(ze(o.y,0,1))).getDay(),e=r>4||0===r?Ve.ceil(e):Ve(e),e=Pe.offset(e,7*(o.V-1)),o.y=e.getFullYear(),o.m=e.getMonth(),o.d=e.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?je(ze(o.y,0,1)).getUTCDay():Re(ze(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,je(o)):Re(o)}}function k(t,n,i,e){for(var r,o,u=0,a=n.length,l=i.length;u<a;){if(e>=l)return-1;if(37===(r=n.charCodeAt(u++))){if(r=n.charAt(u++),!(o=w[r in Ue?n.charAt(u++):r])||(e=o(t,i,e))<0)return-1}else if(r!=i.charCodeAt(e++))return-1}return e}return b.x=M(i,b),b.X=M(e,b),b.c=M(n,b),x.x=M(i,x),x.X=M(e,x),x.c=M(n,x),{format:function(t){var n=M(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=C(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=M(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=C(t+="",!0);return n.toString=function(){return t},n}}}Ie.range;var Ye,Xe,Ge,Ue={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,Ze=/^%/,Ke=/[\\^$*+?|[\]().{}]/g;function Je(t,n,i){var e=t<0?"-":"",r=(e?-t:t)+"",o=r.length;return e+(o<i?new Array(i-o+1).join(n)+r:r)}function Qe(t){return t.replace(Ke,"\\$&")}function tr(t){return new RegExp("^(?:"+t.map(Qe).join("|")+")","i")}function nr(t){return new Map(t.map(((t,n)=>[t.toLowerCase(),n])))}function ir(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.w=+e[0],i+e[0].length):-1}function er(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.u=+e[0],i+e[0].length):-1}function rr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.U=+e[0],i+e[0].length):-1}function or(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.V=+e[0],i+e[0].length):-1}function ur(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.W=+e[0],i+e[0].length):-1}function ar(t,n,i){var e=qe.exec(n.slice(i,i+4));return e?(t.y=+e[0],i+e[0].length):-1}function lr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.y=+e[0]+(+e[0]>68?1900:2e3),i+e[0].length):-1}function sr(t,n,i){var e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(i,i+6));return e?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),i+e[0].length):-1}function cr(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.q=3*e[0]-3,i+e[0].length):-1}function dr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.m=e[0]-1,i+e[0].length):-1}function fr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.d=+e[0],i+e[0].length):-1}function vr(t,n,i){var e=qe.exec(n.slice(i,i+3));return e?(t.m=0,t.d=+e[0],i+e[0].length):-1}function hr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.H=+e[0],i+e[0].length):-1}function pr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.M=+e[0],i+e[0].length):-1}function gr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.S=+e[0],i+e[0].length):-1}function yr(t,n,i){var e=qe.exec(n.slice(i,i+3));return e?(t.L=+e[0],i+e[0].length):-1}function mr(t,n,i){var e=qe.exec(n.slice(i,i+6));return e?(t.L=Math.floor(e[0]/1e3),i+e[0].length):-1}function br(t,n,i){var e=Ze.exec(n.slice(i,i+1));return e?i+e[0].length:-1}function xr(t,n,i){var e=qe.exec(n.slice(i));return e?(t.Q=+e[0],i+e[0].length):-1}function wr(t,n,i){var e=qe.exec(n.slice(i));return e?(t.s=+e[0],i+e[0].length):-1}function Mr(t,n){return Je(t.getDate(),n,2)}function Cr(t,n){return Je(t.getHours(),n,2)}function kr(t,n){return Je(t.getHours()%12||12,n,2)}function Ar(t,n){return Je(1+Pe.count(He(t),t),n,3)}function Sr(t,n){return Je(t.getMilliseconds(),n,3)}function Lr(t,n){return Sr(t,n)+"000"}function Dr(t,n){return Je(t.getMonth()+1,n,2)}function Vr(t,n){return Je(t.getMinutes(),n,2)}function Nr(t,n){return Je(t.getSeconds(),n,2)}function Or(t){var n=t.getDay();return 0===n?7:n}function Tr(t,n){return Je(De.count(He(t)-1,t),n,2)}function Er(t){var n=t.getDay();return n>=4||0===n?Te(t):Te.ceil(t)}function Fr(t,n){return t=Er(t),Je(Te.count(He(t),t)+(4===He(t).getDay()),n,2)}function Br(t){return t.getDay()}function Pr(t,n){return Je(Ve.count(He(t)-1,t),n,2)}function _r(t,n){return Je(t.getFullYear()%100,n,2)}function Hr(t,n){return Je((t=Er(t)).getFullYear()%100,n,2)}function Ir(t,n){return Je(t.getFullYear()%1e4,n,4)}function Wr(t,n){var i=t.getDay();return Je((t=i>=4||0===i?Te(t):Te.ceil(t)).getFullYear()%1e4,n,4)}function Rr(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Je(n/60|0,"0",2)+Je(n%60,"0",2)}function jr(t,n){return Je(t.getUTCDate(),n,2)}function zr(t,n){return Je(t.getUTCHours(),n,2)}function $r(t,n){return Je(t.getUTCHours()%12||12,n,2)}function Yr(t,n){return Je(1+Se.count(We(t),t),n,3)}function Xr(t,n){return Je(t.getUTCMilliseconds(),n,3)}function Gr(t,n){return Xr(t,n)+"000"}function Ur(t,n){return Je(t.getUTCMonth()+1,n,2)}function qr(t,n){return Je(t.getUTCMinutes(),n,2)}function Zr(t,n){return Je(t.getUTCSeconds(),n,2)}function Kr(t){var n=t.getUTCDay();return 0===n?7:n}function Jr(t,n){return Je(me.count(We(t)-1,t),n,2)}function Qr(t){var n=t.getUTCDay();return n>=4||0===n?Me(t):Me.ceil(t)}function to(t,n){return t=Qr(t),Je(Me.count(We(t),t)+(4===We(t).getUTCDay()),n,2)}function no(t){return t.getUTCDay()}function io(t,n){return Je(be.count(We(t)-1,t),n,2)}function eo(t,n){return Je(t.getUTCFullYear()%100,n,2)}function ro(t,n){return Je((t=Qr(t)).getUTCFullYear()%100,n,2)}function oo(t,n){return Je(t.getUTCFullYear()%1e4,n,4)}function uo(t,n){var i=t.getUTCDay();return Je((t=i>=4||0===i?Me(t):Me.ceil(t)).getUTCFullYear()%1e4,n,4)}function ao(){return"+0000"}function lo(){return"%"}function so(t){return+t}function co(t){return Math.floor(+t/1e3)}Ye=$e({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"]}),Xe=Ye.format,Ye.parse,Ge=Ye.utcFormat,Ye.utcParse;const fo=wi(pi),vo=fo.right;fo.left,wi((function(t){return null===t?NaN:+t})).center;var ho=vo;function po(t,n,i){t.prototype=n.prototype=i,i.constructor=t}function go(t,n){var i=Object.create(t.prototype);for(var e in n)i[e]=n[e];return i}function yo(){}var mo=.7,bo=1/mo,xo="\\s*([+-]?\\d+)\\s*",wo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Co=/^#([0-9a-f]{3,8})$/,ko=new RegExp(`^rgb\\(${xo},${xo},${xo}\\)$`),Ao=new RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),So=new RegExp(`^rgba\\(${xo},${xo},${xo},${wo}\\)$`),Lo=new RegExp(`^rgba\\(${Mo},${Mo},${Mo},${wo}\\)$`),Do=new RegExp(`^hsl\\(${wo},${Mo},${Mo}\\)$`),Vo=new RegExp(`^hsla\\(${wo},${Mo},${Mo},${wo}\\)$`),No={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 Oo(){return this.rgb().formatHex()}function To(){return this.rgb().formatRgb()}function Eo(t){var n,i;return t=(t+"").trim().toLowerCase(),(n=Co.exec(t))?(i=n[1].length,n=parseInt(n[1],16),6===i?Fo(n):3===i?new _o(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===i?Bo(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===i?Bo(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=ko.exec(t))?new _o(n[1],n[2],n[3],1):(n=Ao.exec(t))?new _o(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=So.exec(t))?Bo(n[1],n[2],n[3],n[4]):(n=Lo.exec(t))?Bo(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Do.exec(t))?zo(n[1],n[2]/100,n[3]/100,1):(n=Vo.exec(t))?zo(n[1],n[2]/100,n[3]/100,n[4]):No.hasOwnProperty(t)?Fo(No[t]):"transparent"===t?new _o(NaN,NaN,NaN,0):null}function Fo(t){return new _o(t>>16&255,t>>8&255,255&t,1)}function Bo(t,n,i,e){return e<=0&&(t=n=i=NaN),new _o(t,n,i,e)}function Po(t,n,i,e){return 1===arguments.length?((r=t)instanceof yo||(r=Eo(r)),r?new _o((r=r.rgb()).r,r.g,r.b,r.opacity):new _o):new _o(t,n,i,null==e?1:e);var r}function _o(t,n,i,e){this.r=+t,this.g=+n,this.b=+i,this.opacity=+e}function Ho(){return`#${jo(this.r)}${jo(this.g)}${jo(this.b)}`}function Io(){const t=Wo(this.opacity);return`${1===t?"rgb(":"rgba("}${Ro(this.r)}, ${Ro(this.g)}, ${Ro(this.b)}${1===t?")":`, ${t})`}`}function Wo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ro(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function jo(t){return((t=Ro(t))<16?"0":"")+t.toString(16)}function zo(t,n,i,e){return e<=0?t=n=i=NaN:i<=0||i>=1?t=n=NaN:n<=0&&(t=NaN),new Yo(t,n,i,e)}function $o(t){if(t instanceof Yo)return new Yo(t.h,t.s,t.l,t.opacity);if(t instanceof yo||(t=Eo(t)),!t)return new Yo;if(t instanceof Yo)return t;var n=(t=t.rgb()).r/255,i=t.g/255,e=t.b/255,r=Math.min(n,i,e),o=Math.max(n,i,e),u=NaN,a=o-r,l=(o+r)/2;return a?(u=n===o?(i-e)/a+6*(i<e):i===o?(e-n)/a+2:(n-i)/a+4,a/=l<.5?o+r:2-o-r,u*=60):a=l>0&&l<1?0:u,new Yo(u,a,l,t.opacity)}function Yo(t,n,i,e){this.h=+t,this.s=+n,this.l=+i,this.opacity=+e}function Xo(t){return(t=(t||0)%360)<0?t+360:t}function Go(t){return Math.max(0,Math.min(1,t||0))}function Uo(t,n,i){return 255*(t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n)}function qo(t,n,i,e,r){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*i+(1+3*t+3*o-3*u)*e+u*r)/6}po(yo,Eo,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Oo,formatHex:Oo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $o(this).formatHsl()},formatRgb:To,toString:To}),po(_o,Po,go(yo,{brighter(t){return t=null==t?bo:Math.pow(bo,t),new _o(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new _o(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _o(Ro(this.r),Ro(this.g),Ro(this.b),Wo(this.opacity))},displayable(){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:Ho,formatHex:Ho,formatHex8:function(){return`#${jo(this.r)}${jo(this.g)}${jo(this.b)}${jo(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Io,toString:Io})),po(Yo,(function(t,n,i,e){return 1===arguments.length?$o(t):new Yo(t,n,i,null==e?1:e)}),go(yo,{brighter(t){return t=null==t?bo:Math.pow(bo,t),new Yo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new Yo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,e=i+(i<.5?i:1-i)*n,r=2*i-e;return new _o(Uo(t>=240?t-240:t+120,r,e),Uo(t,r,e),Uo(t<120?t+240:t-120,r,e),this.opacity)},clamp(){return new Yo(Xo(this.h),Go(this.s),Go(this.l),Wo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Wo(this.opacity);return`${1===t?"hsl(":"hsla("}${Xo(this.h)}, ${100*Go(this.s)}%, ${100*Go(this.l)}%${1===t?")":`, ${t})`}`}}));var Zo=t=>()=>t;function Ko(t,n){var i=n-t;return i?function(t,n){return function(i){return t+i*n}}(t,i):Zo(isNaN(t)?n:t)}var Jo=function t(n){var i=function(t){return 1===(t=+t)?Ko:function(n,i){return i-n?function(t,n,i){return t=Math.pow(t,i),n=Math.pow(n,i)-t,i=1/i,function(e){return Math.pow(t+e*n,i)}}(n,i,t):Zo(isNaN(n)?i:n)}}(n);function e(t,n){var e=i((t=Po(t)).r,(n=Po(n)).r),r=i(t.g,n.g),o=i(t.b,n.b),u=Ko(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=r(n),t.b=o(n),t.opacity=u(n),t+""}}return e.gamma=t,e}(1);function Qo(t){return function(n){var i,e,r=n.length,o=new Array(r),u=new Array(r),a=new Array(r);for(i=0;i<r;++i)e=Po(n[i]),o[i]=e.r||0,u[i]=e.g||0,a[i]=e.b||0;return o=t(o),u=t(u),a=t(a),e.opacity=1,function(t){return e.r=o(t),e.g=u(t),e.b=a(t),e+""}}}function tu(t,n){var i,e=n?n.length:0,r=t?Math.min(e,t.length):0,o=new Array(r),u=new Array(e);for(i=0;i<r;++i)o[i]=lu(t[i],n[i]);for(;i<e;++i)u[i]=n[i];return function(t){for(i=0;i<r;++i)u[i]=o[i](t);return u}}function nu(t,n){var i=new Date;return t=+t,n=+n,function(e){return i.setTime(t*(1-e)+n*e),i}}function iu(t,n){return t=+t,n=+n,function(i){return t*(1-i)+n*i}}function eu(t,n){var i,e={},r={};for(i in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)i in t?e[i]=lu(t[i],n[i]):r[i]=n[i];return function(t){for(i in e)r[i]=e[i](t);return r}}Qo((function(t){var n=t.length-1;return function(i){var e=i<=0?i=0:i>=1?(i=1,n-1):Math.floor(i*n),r=t[e],o=t[e+1],u=e>0?t[e-1]:2*r-o,a=e<n-1?t[e+2]:2*o-r;return qo((i-e/n)*n,u,r,o,a)}})),Qo((function(t){var n=t.length;return function(i){var e=Math.floor(((i%=1)<0?++i:i)*n),r=t[(e+n-1)%n],o=t[e%n],u=t[(e+1)%n],a=t[(e+2)%n];return qo((i-e/n)*n,r,o,u,a)}}));var ru=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ou=new RegExp(ru.source,"g");function uu(t,n){var i,e,r,o=ru.lastIndex=ou.lastIndex=0,u=-1,a=[],l=[];for(t+="",n+="";(i=ru.exec(t))&&(e=ou.exec(n));)(r=e.index)>o&&(r=n.slice(o,r),a[u]?a[u]+=r:a[++u]=r),(i=i[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,l.push({i:u,x:iu(i,e)})),o=ou.lastIndex;return o<n.length&&(r=n.slice(o),a[u]?a[u]+=r:a[++u]=r),a.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var i,e=0;e<n;++e)a[(i=l[e]).i]=i.x(t);return a.join("")})}function au(t,n){n||(n=[]);var i,e=t?Math.min(n.length,t.length):0,r=n.slice();return function(o){for(i=0;i<e;++i)r[i]=t[i]*(1-o)+n[i]*o;return r}}function lu(t,n){var i,e,r=typeof n;return null==n||"boolean"===r?Zo(n):("number"===r?iu:"string"===r?(i=Eo(n))?(n=i,Jo):uu:n instanceof Eo?Jo:n instanceof Date?nu:(e=n,!ArrayBuffer.isView(e)||e instanceof DataView?Array.isArray(n)?tu:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?eu:iu:au))(t,n)}function su(t,n){return t=+t,n=+n,function(i){return Math.round(t*(1-i)+n*i)}}function cu(t){return+t}var du=[0,1];function fu(t){return t}function vu(t,n){return(n-=t=+t)?function(i){return(i-t)/n}:(i=isNaN(n)?NaN:.5,function(){return i});var i}function hu(t,n,i){var e=t[0],r=t[1],o=n[0],u=n[1];return r<e?(e=vu(r,e),o=i(u,o)):(e=vu(e,r),o=i(o,u)),function(t){return o(e(t))}}function pu(t,n,i){var e=Math.min(t.length,n.length)-1,r=new Array(e),o=new Array(e),u=-1;for(t[e]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<e;)r[u]=vu(t[u],t[u+1]),o[u]=i(n[u],n[u+1]);return function(n){var i=ho(t,n,1,e)-1;return o[i](r[i](n))}}function gu(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function yu(){var t,n,i,e,r,o,u=du,a=du,l=lu,s=fu;function c(){var t,n,i,l=Math.min(u.length,a.length);return s!==fu&&(t=u[0],n=u[l-1],t>n&&(i=t,t=n,n=i),s=function(i){return Math.max(t,Math.min(n,i))}),e=l>2?pu:hu,r=o=null,d}function d(n){return null==n||isNaN(n=+n)?i:(r||(r=e(u.map(t),a,l)))(t(s(n)))}return d.invert=function(i){return s(n((o||(o=e(a,u.map(t),iu)))(i)))},d.domain=function(t){return arguments.length?(u=Array.from(t,cu),c()):u.slice()},d.range=function(t){return arguments.length?(a=Array.from(t),c()):a.slice()},d.rangeRound=function(t){return a=Array.from(t),l=su,c()},d.clamp=function(t){return arguments.length?(s=!!t||fu,c()):s!==fu},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(i=t,d):i},function(i,e){return t=i,n=e,c()}}function mu(){return yu()(fu,fu)}function bu(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function xu(t,n){var i,e=0,r=(t=t.slice()).length-1,o=t[e],u=t[r];return u<o&&(i=e,e=r,r=i,i=o,o=u,u=i),t[e]=n.floor(o),t[r]=n.ceil(u),t}function wu(t){return new Date(t)}function Mu(t){return t instanceof Date?+t:+new Date(+t)}function Cu(t,n,i,e,r,o,u,a,l,s){var c=mu(),d=c.invert,f=c.domain,v=s(".%L"),h=s(":%S"),p=s("%I:%M"),g=s("%I %p"),y=s("%a %d"),m=s("%b %d"),b=s("%B"),x=s("%Y");function w(t){return(l(t)<t?v:a(t)<t?h:u(t)<t?p:o(t)<t?g:e(t)<t?r(t)<t?y:m:i(t)<t?b:x)(t)}return c.invert=function(t){return new Date(d(t))},c.domain=function(t){return arguments.length?f(Array.from(t,Mu)):f().map(wu)},c.ticks=function(n){var i=f();return t(i[0],i[i.length-1],null==n?10:n)},c.tickFormat=function(t,n){return null==n?w:s(n)},c.nice=function(t){var i=f();return t&&"function"==typeof t.range||(t=n(i[0],i[i.length-1],null==t?10:t)),t?f(xu(i,t)):c},c.copy=function(){return gu(c,Cu(t,n,i,e,r,o,u,a,l,s))},c}function ku(){return bu.apply(Cu(ce,de,oe,ee,ji,Hi,Pi,Fi,Ei,Xe).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Au(){return bu.apply(Cu(le,se,ue,re,Zi,Ii,_i,Bi,Ei,Ge).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Su(t,n,i){t=+t,n=+n,i=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+i;for(var e=-1,r=0|Math.max(0,Math.ceil((n-t)/i)),o=new Array(r);++e<r;)o[e]=t+e*i;return o}class Lu extends Map{constructor(t,n=Vu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Du(this,t))}has(t){return super.has(Du(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):(t.set(e,i),i)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)&&(i=t.get(i),t.delete(e)),i}(this,t))}}function Du({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):i}function Vu(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const Nu=Symbol("implicit");function Ou(){var t=new Lu,n=[],i=[],e=Nu;function r(r){let o=t.get(r);if(void 0===o){if(e!==Nu)return e;t.set(r,o=n.push(r)-1)}return i[o%i.length]}return r.domain=function(i){if(!arguments.length)return n.slice();n=[],t=new Lu;for(const e of i)t.has(e)||t.set(e,n.push(e)-1);return r},r.range=function(t){return arguments.length?(i=Array.from(t),r):i.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return Ou(n,i).unknown(e)},bu.apply(r,arguments),r}function Tu(){var t,n,i=Ou().unknown(void 0),e=i.domain,r=i.range,o=0,u=1,a=!1,l=0,s=0,c=.5;function d(){var i=e().length,d=u<o,f=d?u:o,v=d?o:u;t=(v-f)/Math.max(1,i-l+2*s),a&&(t=Math.floor(t)),f+=(v-f-t*(i-l))*c,n=t*(1-l),a&&(f=Math.round(f),n=Math.round(n));var h=Su(i).map((function(n){return f+t*n}));return r(d?h.reverse():h)}return delete i.unknown,i.domain=function(t){return arguments.length?(e(t),d()):e()},i.range=function(t){return arguments.length?([o,u]=t,o=+o,u=+u,d()):[o,u]},i.rangeRound=function(t){return[o,u]=t,o=+o,u=+u,a=!0,d()},i.bandwidth=function(){return n},i.step=function(){return t},i.round=function(t){return arguments.length?(a=!!t,d()):a},i.padding=function(t){return arguments.length?(l=Math.min(1,s=+t),d()):l},i.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),d()):l},i.paddingOuter=function(t){return arguments.length?(s=+t,d()):s},i.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),d()):c},i.copy=function(){return Tu(e(),[o,u]).round(a).paddingInner(l).paddingOuter(s).align(c)},bu.apply(d(),arguments)}var Eu,Fu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bu(t){if(!(n=Fu.exec(t)))throw new Error("invalid format: "+t);var n;return new Pu({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Pu(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 _u(t,n){if((i=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var i,e=t.slice(0,i);return[e.length>1?e[0]+e.slice(2):e,+t.slice(i+1)]}function Hu(t){return(t=_u(Math.abs(t)))?t[1]:NaN}function Iu(t,n){var i=_u(t,n);if(!i)return t+"";var e=i[0],r=i[1];return r<0?"0."+new Array(-r).join("0")+e:e.length>r+1?e.slice(0,r+1)+"."+e.slice(r+1):e+new Array(r-e.length+2).join("0")}Bu.prototype=Pu.prototype,Pu.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 Wu={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Iu(100*t,n),r:Iu,s:function(t,n){var i=_u(t,n);if(!i)return t+"";var e=i[0],r=i[1],o=r-(Eu=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,u=e.length;return o===u?e:o>u?e+new Array(o-u+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+_u(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ru(t){return t}var ju,zu,$u,Yu=Array.prototype.map,Xu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gu(){var t=mu();return t.copy=function(){return gu(t,Gu())},bu.apply(t,arguments),function(t){var n=t.domain;return t.ticks=function(t){var i=n();return ai(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var e=n();return function(t,n,i,e){var r,o=si(t,n,i);switch((e=Bu(null==e?",f":e)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=e.precision||isNaN(r=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Hu(n)/3)))-Hu(Math.abs(t)))}(o,u))||(e.precision=r),$u(e,u);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(r=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Hu(n)-Hu(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(e.precision=r-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(r=function(t){return Math.max(0,-Hu(Math.abs(t)))}(o))||(e.precision=r-2*("%"===e.type))}return zu(e)}(e[0],e[e.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var e,r,o=n(),u=0,a=o.length-1,l=o[u],s=o[a],c=10;for(s<l&&(r=l,l=s,s=r,r=u,u=a,a=r);c-- >0;){if((r=li(l,s,i))===e)return o[u]=l,o[a]=s,n(o);if(r>0)l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r}e=r}return t},t}(t)}function Uu(t){return Math.log(t)}function qu(t){return Math.exp(t)}function Zu(t){return-Math.log(-t)}function Ku(t){return-Math.exp(-t)}function Ju(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Qu(t){return(n,i)=>-t(-n,i)}function ta(){const t=function(t){const n=t(Uu,qu),i=n.domain;let e,r,o=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),r=function(t){return 10===t?Ju:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),i()[0]<0?(e=Qu(e),r=Qu(r),t(Zu,Ku)):t(Uu,qu),n}return n.base=function(t){return arguments.length?(o=+t,u()):o},n.domain=function(t){return arguments.length?(i(t),u()):i()},n.ticks=t=>{const n=i();let u=n[0],a=n[n.length-1];const l=a<u;l&&([u,a]=[a,u]);let s,c,d=e(u),f=e(a);const v=null==t?10:+t;let h=[];if(!(o%1)&&f-d<v){if(d=Math.floor(d),f=Math.ceil(f),u>0){for(;d<=f;++d)for(s=1;s<o;++s)if(c=d<0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}}else for(;d<=f;++d)for(s=o-1;s>=1;--s)if(c=d>0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}2*h.length<v&&(h=ai(u,a,v))}else h=ai(d,f,Math.min(f-d,v)).map(r);return l?h.reverse():h},n.tickFormat=(t,i)=>{if(null==t&&(t=10),null==i&&(i=10===o?"s":","),"function"!=typeof i&&(o%1||null!=(i=Bu(i)).precision||(i.trim=!0),i=zu(i)),t===1/0)return i;const u=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/r(Math.round(e(t)));return n*o<o-.5&&(n*=o),n<=u?i(t):""}},n.nice=()=>i(xu(i(),{floor:t=>r(Math.floor(e(t))),ceil:t=>r(Math.ceil(e(t)))})),n}(yu()).domain([1,10]);return t.copy=()=>gu(t,ta()).base(t.base()),bu.apply(t,arguments),t}function na(){}function ia(t){return null==t?na:function(){return this.querySelector(t)}}function ea(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function ra(){return[]}function oa(t){return function(n){return n.matches(t)}}ju=function(t){var n,i,e=void 0===t.grouping||void 0===t.thousands?Ru:(n=Yu.call(t.grouping,Number),i=t.thousands+"",function(t,e){for(var r=t.length,o=[],u=0,a=n[0],l=0;r>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),o.push(t.substring(r-=a,r+a)),!((l+=a+1)>e));)a=n[u=(u+1)%n.length];return o.reverse().join(i)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Ru:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(Yu.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t){var n=(t=Bu(t)).fill,i=t.align,d=t.sign,f=t.symbol,v=t.zero,h=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type;"n"===m?(p=!0,m="g"):Wu[m]||(void 0===g&&(g=12),y=!0,m="g"),(v||"0"===n&&"="===i)&&(v=!0,n="0",i="=");var b="$"===f?r:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===f?o:/[%p]/.test(m)?l:"",w=Wu[m],M=/[defgprs%]/.test(m);function C(t){var r,o,l,f=b,C=x;if("c"===m)C=w(t)+C,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),y&&(t=function(t){t:for(var n,i=t.length,e=1,r=-1;e<i;++e)switch(t[e]){case".":r=n=e;break;case"0":0===r&&(r=e),n=e;break;default:if(!+t[e])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(n+1):t}(t)),k&&0===+t&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,C=("s"===m?Xu[8+Eu/3]:"")+C+(k&&"("===d?")":""),M)for(r=-1,o=t.length;++r<o;)if(48>(l=t.charCodeAt(r))||l>57){C=(46===l?u+t.slice(r+1):t.slice(r))+C,t=t.slice(0,r);break}}p&&!v&&(t=e(t,1/0));var A=f.length+t.length+C.length,S=A<h?new Array(h-A+1).join(n):"";switch(p&&v&&(t=e(S+t,S.length?h-C.length:1/0),S=""),i){case"<":t=f+t+C+S;break;case"=":t=f+S+t+C;break;case"^":t=S.slice(0,A=S.length>>1)+f+t+C+S.slice(A);break;default:t=S+f+t+C}return a(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return t+""},C}return{format:d,formatPrefix:function(t,n){var i=d(((t=Bu(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(Hu(n)/3))),r=Math.pow(10,-e),o=Xu[8+e/3];return function(t){return i(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),zu=ju.format,$u=ju.formatPrefix;var ua=Array.prototype.find;function aa(){return this.firstElementChild}var la=Array.prototype.filter;function sa(){return Array.from(this.children)}function ca(t){return new Array(t.length)}function da(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function fa(t,n,i,e,r,o){for(var u,a=0,l=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],e[a]=u):i[a]=new da(t,o[a]);for(;a<l;++a)(u=n[a])&&(r[a]=u)}function va(t,n,i,e,r,o,u){var a,l,s,c=new Map,d=n.length,f=o.length,v=new Array(d);for(a=0;a<d;++a)(l=n[a])&&(v[a]=s=u.call(l,l.__data__,a,n)+"",c.has(s)?r[a]=l:c.set(s,l));for(a=0;a<f;++a)s=u.call(t,o[a],a,o)+"",(l=c.get(s))?(e[a]=l,l.__data__=o[a],c.delete(s)):i[a]=new da(t,o[a]);for(a=0;a<d;++a)(l=n[a])&&c.get(v[a])===l&&(r[a]=l)}function ha(t){return t.__data__}function pa(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ga(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}da.prototype={constructor:da,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var ya="http://www.w3.org/1999/xhtml",ma={svg:"http://www.w3.org/2000/svg",xhtml:ya,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ba(t){var n=t+="",i=n.indexOf(":");return i>=0&&"xmlns"!==(n=t.slice(0,i))&&(t=t.slice(i+1)),ma.hasOwnProperty(n)?{space:ma[n],local:t}:t}function xa(t){return function(){this.removeAttribute(t)}}function wa(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ma(t,n){return function(){this.setAttribute(t,n)}}function Ca(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function ka(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function Aa(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function Sa(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function La(t){return function(){this.style.removeProperty(t)}}function Da(t,n,i){return function(){this.style.setProperty(t,n,i)}}function Va(t,n,i){return function(){var e=n.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function Na(t){return function(){delete this[t]}}function Oa(t,n){return function(){this[t]=n}}function Ta(t,n){return function(){var i=n.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function Ea(t){return t.trim().split(/^|\s+/)}function Fa(t){return t.classList||new Ba(t)}function Ba(t){this._node=t,this._names=Ea(t.getAttribute("class")||"")}function Pa(t,n){for(var i=Fa(t),e=-1,r=n.length;++e<r;)i.add(n[e])}function _a(t,n){for(var i=Fa(t),e=-1,r=n.length;++e<r;)i.remove(n[e])}function Ha(t){return function(){Pa(this,t)}}function Ia(t){return function(){_a(this,t)}}function Wa(t,n){return function(){(n.apply(this,arguments)?Pa:_a)(this,t)}}function Ra(){this.textContent=""}function ja(t){return function(){this.textContent=t}}function za(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function $a(){this.innerHTML=""}function Ya(t){return function(){this.innerHTML=t}}function Xa(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Ga(){this.nextSibling&&this.parentNode.appendChild(this)}function Ua(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qa(t){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===ya&&n.documentElement.namespaceURI===ya?n.createElement(t):n.createElementNS(i,t)}}function Za(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ka(t){var n=ba(t);return(n.local?Za:qa)(n)}function Ja(){return null}function Qa(){var t=this.parentNode;t&&t.removeChild(this)}function tl(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function nl(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function il(t){return function(){var n=this.__on;if(n){for(var i,e=0,r=-1,o=n.length;e<o;++e)i=n[e],t.type&&i.type!==t.type||i.name!==t.name?n[++r]=i:this.removeEventListener(i.type,i.listener,i.options);++r?n.length=r:delete this.__on}}}function el(t,n,i){return function(){var e,r=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(r)for(var u=0,a=r.length;u<a;++u)if((e=r[u]).type===t.type&&e.name===t.name)return this.removeEventListener(e.type,e.listener,e.options),this.addEventListener(e.type,e.listener=o,e.options=i),void(e.value=n);this.addEventListener(t.type,o,i),e={type:t.type,name:t.name,value:n,listener:o,options:i},r?r.push(e):this.__on=[e]}}function rl(t,n,i){var e=Sa(t),r=e.CustomEvent;"function"==typeof r?r=new r(n,i):(r=e.document.createEvent("Event"),i?(r.initEvent(n,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(n,!1,!1)),t.dispatchEvent(r)}function ol(t,n){return function(){return rl(this,t,n)}}function ul(t,n){return function(){return rl(this,t,n.apply(this,arguments))}}Ba.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var al=[null];function ll(t,n){this._groups=t,this._parents=n}function sl(t){return"string"==typeof t?new ll([[document.querySelector(t)]],[document.documentElement]):new ll([[t]],al)}function cl(t){return"string"==typeof t?new ll([document.querySelectorAll(t)],[document.documentElement]):new ll([ea(t)],al)}function dl(t){var n=/[1-9]([0]+$)|\.([0-9]*)/.exec(String(t));return n?n[1]?-n[1].length:n[2]?n[2].length:0:0}function fl(t,n,i){void 0===i&&(i=10);var e=Math.pow(i,n);return Math.round(t*e)/e}function vl(t){this._context=t}function hl(t){return new vl(t)}function pl(t){this._context=t}function gl(t){var n,i,e=t.length-1,r=new Array(e),o=new Array(e),u=new Array(e);for(r[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n<e-1;++n)r[n]=1,o[n]=4,u[n]=4*t[n]+2*t[n+1];for(r[e-1]=2,o[e-1]=7,u[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=r[n]/o[n-1],o[n]-=i,u[n]-=i*u[n-1];for(r[e-1]=u[e-1]/o[e-1],n=e-2;n>=0;--n)r[n]=(u[n]-r[n+1])/o[n];for(o[e-1]=(t[e]+r[e-1])/2,n=0;n<e-1;++n)o[n]=2*t[n+1]-r[n+1];return[r,o]}function yl(t){return new pl(t)}function ml(t,n){this._context=t,this._t=n}function bl(t){return new ml(t,.5)}function xl(t){return new ml(t,0)}function wl(t){return new ml(t,1)}function Ml(t){const n=(4-t.length%4)%4;return t+"=".repeat(n)}function Cl(t){if("string"!=typeof t)return!1;if(t.length%4!=0&&(t=Ml(t)),!/^[A-Za-z0-9+/]+={0,2}$/.test(t))return!1;try{return kl(t),!0}catch{return!1}}function kl(t){if("undefined"!=typeof window&&"function"==typeof atob){const n=atob(t),i=n.length,e=new Uint8Array(i);for(let t=0;t<i;t++)e[t]=n.charCodeAt(t);return e}throw new Error("Base64 decoding is not supported in this environment.")}function Al(t,n){t=Ml(t);try{const i=kl(t);switch(n){case"f8":return Array.from(new Float64Array(i.buffer));case"i8":case"i4":return Array.from(new Int32Array(i.buffer));case"u8":return Array.from(new Uint32Array(i.buffer));case"i2":return Array.from(new Int16Array(i.buffer));case"i1":return Array.from(new Int8Array(i.buffer));default:try{return i.toString()}catch(t){return i}}}catch(n){throw new Error(`Failed to decode base64 value: ${t}`)}}function Sl(t){for(const[n,i]of Object.entries(t))if("object"!=typeof i||Array.isArray(i)||null===i){if("bdata"===n&&"string"==typeof i&&Cl(i)){const e=t.dtype||"utf-8";t[n]=Al(i,e)}else if(Array.isArray(i))for(let t=0;t<i.length;t++)"object"==typeof i[t]&&null!==i[t]&&Sl(i[t])}else Sl(i)}function Ll(t,n){if(1===n.length)return t;if(2===n.length){const[i,e]=n,r=[];for(let n=0;n<i;n++)r.push(t.slice(n*e,(n+1)*e));return r}const[i,...e]=n,r=t.length/i,o=[];for(let n=0;n<i;n++)o.push(Ll(t.slice(n*r,(n+1)*r),e));return o}function Dl(t){const n=JSON.parse(JSON.stringify(t.data));if(Sl(t.data),JSON.stringify(t.data)!==JSON.stringify(n)){for(const n of t.data||[])["y","x","z","r","theta","values"].forEach((t=>{if(n[t]&&"object"==typeof n[t]&&"bdata"in n[t]){const i=n[t].bdata;let e=n[t].shape;if("string"==typeof e){let t;try{t=JSON.parse(e),Rl(t)||(t=void 0)}catch(n){const i=e.split(",").map((t=>Number(t.trim())));i.every((t=>!isNaN(t)))?t=i:e=void 0}e=t}void 0!==e&&Rl(e)?n[t]=Ll(i,e):n[t]=i}}));return t}return t.data=n,t}ll.prototype=function(){return new ll([[document.documentElement]],al)}.prototype={constructor:ll,select:function(t){"function"!=typeof t&&(t=ia(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u,a=n[r],l=a.length,s=e[r]=new Array(l),c=0;c<l;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),s[c]=u);return new ll(e,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return ea(t.apply(this,arguments))}}(t):function(t){return null==t?ra:function(){return this.querySelectorAll(t)}}(t);for(var n=this._groups,i=n.length,e=[],r=[],o=0;o<i;++o)for(var u,a=n[o],l=a.length,s=0;s<l;++s)(u=a[s])&&(e.push(t.call(u,u.__data__,s,a)),r.push(u));return new ll(e,r)},selectChild:function(t){return this.select(null==t?aa:function(t){return function(){return ua.call(this.children,t)}}("function"==typeof t?t:oa(t)))},selectChildren:function(t){return this.selectAll(null==t?sa:function(t){return function(){return la.call(this.children,t)}}("function"==typeof t?t:oa(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u=n[r],a=u.length,l=e[r]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&l.push(o);return new ll(e,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,ha);var i,e=n?va:fa,r=this._parents,o=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var u=o.length,a=new Array(u),l=new Array(u),s=new Array(u),c=0;c<u;++c){var d=r[c],f=o[c],v=f.length,h=pa(t.call(d,d&&d.__data__,c,r)),p=h.length,g=l[c]=new Array(p),y=a[c]=new Array(p);e(d,f,g,y,s[c]=new Array(v),h,n);for(var m,b,x=0,w=0;x<p;++x)if(m=g[x]){for(x>=w&&(w=x+1);!(b=y[w])&&++w<p;);m._next=b||null}}return(a=new ll(a,r))._enter=l,a._exit=s,a},enter:function(){return new ll(this._enter||this._groups.map(ca),this._parents)},exit:function(){return new ll(this._exit||this._groups.map(ca),this._parents)},join:function(t,n,i){var e=this.enter(),r=this,o=this.exit();return"function"==typeof t?(e=t(e))&&(e=e.selection()):e=e.append(t+""),null!=n&&(r=n(r))&&(r=r.selection()),null==i?o.remove():i(o),e&&r?e.merge(r).order():r},merge:function(t){for(var n=t.selection?t.selection():t,i=this._groups,e=n._groups,r=i.length,o=e.length,u=Math.min(r,o),a=new Array(r),l=0;l<u;++l)for(var s,c=i[l],d=e[l],f=c.length,v=a[l]=new Array(f),h=0;h<f;++h)(s=c[h]||d[h])&&(v[h]=s);for(;l<r;++l)a[l]=i[l];return new ll(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,i=t.length;++n<i;)for(var e,r=t[n],o=r.length-1,u=r[o];--o>=0;)(e=r[o])&&(u&&4^e.compareDocumentPosition(u)&&u.parentNode.insertBefore(e,u),u=e);return this},sort:function(t){function n(n,i){return n&&i?t(n.__data__,i.__data__):!n-!i}t||(t=ga);for(var i=this._groups,e=i.length,r=new Array(e),o=0;o<e;++o){for(var u,a=i[o],l=a.length,s=r[o]=new Array(l),c=0;c<l;++c)(u=a[c])&&(s[c]=u);s.sort(n)}return new ll(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e=t[n],r=0,o=e.length;r<o;++r){var u=e[r];if(u)return u}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,i=0,e=n.length;i<e;++i)for(var r,o=n[i],u=0,a=o.length;u<a;++u)(r=o[u])&&t.call(r,r.__data__,u,o);return this},attr:function(t,n){var i=ba(t);if(arguments.length<2){var e=this.node();return i.local?e.getAttributeNS(i.space,i.local):e.getAttribute(i)}return this.each((null==n?i.local?wa:xa:"function"==typeof n?i.local?Aa:ka:i.local?Ca:Ma)(i,n))},style:function(t,n,i){return arguments.length>1?this.each((null==n?La:"function"==typeof n?Va:Da)(t,n,null==i?"":i)):function(t,n){return t.style.getPropertyValue(n)||Sa(t).getComputedStyle(t,null).getPropertyValue(n)}(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Na:"function"==typeof n?Ta:Oa)(t,n)):this.node()[t]},classed:function(t,n){var i=Ea(t+"");if(arguments.length<2){for(var e=Fa(this.node()),r=-1,o=i.length;++r<o;)if(!e.contains(i[r]))return!1;return!0}return this.each(("function"==typeof n?Wa:n?Ha:Ia)(i,n))},text:function(t){return arguments.length?this.each(null==t?Ra:("function"==typeof t?za:ja)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?$a:("function"==typeof t?Xa:Ya)(t)):this.node().innerHTML},raise:function(){return this.each(Ga)},lower:function(){return this.each(Ua)},append:function(t){var n="function"==typeof t?t:Ka(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var i="function"==typeof t?t:Ka(t),e=null==n?Ja:"function"==typeof n?n:ia(n);return this.select((function(){return this.insertBefore(i.apply(this,arguments),e.apply(this,arguments)||null)}))},remove:function(){return this.each(Qa)},clone:function(t){return this.select(t?nl:tl)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,i){var e,r,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?el:il,e=0;e<u;++e)this.each(a(o[e],n,i));return this}var a=this.node().__on;if(a)for(var l,s=0,c=a.length;s<c;++s)for(e=0,l=a[s];e<u;++e)if((r=o[e]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?ul:ol)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e,r=t[n],o=0,u=r.length;o<u;++o)(e=r[o])&&(yield e)}},vl.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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}},pl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=gl(t),r=gl(n),o=0,u=1;u<i;++o,++u)this._context.bezierCurveTo(e[0][o],r[0][o],e[1][o],r[1][o],t[u],n[u]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};const Vl="Unsupported chart - type :",Nl=t=>!isNaN(parseFloat(t))&&isFinite(t),Ol=t=>{if(Nl(t))return!1;const n=new Date(Date.parse(t));if(isNaN(n.getTime()))return!1;const i=n.getFullYear();return!!(/\b\d{4}\b/.test(t)||2e3!==i&&2001!==i)},Tl=(t,n,...i)=>!!Rl(t)&&0!==t.length&&(Array.isArray(t[0])?t.every((t=>t.every((t=>n(t,...i))))):t.every((t=>n(t,...i)))),El=t=>Tl(t,(t=>Ol(t)||null===t)),Fl=t=>Tl(t,(t=>"string"==typeof t&&Nl(t)||"number"==typeof t||null===t)),Bl=t=>Tl(t,(t=>(t=>{if("string"!=typeof t)return!1;const n=new Date(`${t} 1, 2000`);if(isNaN(n.getTime()))return!1;const i=[void 0,"en-US"];for(const e of i){const i=n.toLocaleString(e,{month:"long"}),r=n.toLocaleString(e,{month:"short"});if(t.toLowerCase()===i.toLowerCase()||t.toLowerCase()===r.toLowerCase())return!0}return!1})(t)||null===t)),Pl=t=>Tl(t,(t=>(t=>{if(Nl(t)){const n="string"==typeof t?parseFloat(t):Number(t);return Number.isInteger(n)&&n>=1900&&n<=2100}return!1})(t)||null===t)),_l=t=>Tl(t,(t=>"string"==typeof t||null===t)),Hl=t=>Tl(t,(t=>"object"==typeof t&&null!==t&&!Rl(t))),Il=t=>null==t||"number"==typeof t&&!isFinite(t),Wl=(t,n=0)=>{if(n>15)throw new Error("Maximum json depth exceeded");if("object"==typeof t&&null!==t)for(const i in t)t.hasOwnProperty(i)&&("string"==typeof t[i]?t[i]=t[i].replace(/</g,"<").replace(/>/g,">"):t[i]=Wl(t[i],n+1));return t};function Rl(t){return Array.isArray(t)||function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)}const jl=t=>!!t&&(!Rl(t)||t.length>0),zl=(t,n)=>{if(!(t=>!(Array.isArray(t.x)&&t.x.length>0&&Array.isArray(t.x[0])||Array.isArray(t.y)&&t.y.length>0&&Array.isArray(t.y[0])))(t))throw new Error("Invalid 2D series encountered.");if(n&&!Fl(t.y))throw new Error("Non numeric Y values encountered.")},$l=t=>["markers","text+markers","markers+text","text"].includes(t),Yl=(t,n)=>{var i,e,r;const o=null!==(i=t.mode)&&void 0!==i?i:"",u=t&&t.x&&t.x.length>0?typeof(null===(e=null==t?void 0:t.x)||void 0===e?void 0:e[0]):"undefined",a=t&&t.y&&t.y.length>0?typeof(null===(r=null==t?void 0:t.y)||void 0===r?void 0:r[0]):"undefined";if(!Fl(t.x)&&!_l(t.x)&&!El(t.x))throw new Error(`${Vl} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!Fl(t.y)&&!_l(t.y))throw new Error(`${Vl} ${t.type}, mode: ${o}, yAxisType: ${a}`);const l=Kl(t),s=Ql(t,n);if(l&&s)throw new Error(`${Vl} ${t.type}, Fallback to VerticalStackedBarChart is not allowed for Area Charts.`);if(l&&Xl(t,n))throw new Error(`${Vl} ${t.type}, log axis type not supported for AreaChart.`);if(s&&Xl(t,n))throw new Error(`${Vl} ${t.type}, log axis type not supported for VSBC fallback.`)},Xl=(t,n)=>{const i=ql(t);return Object.keys(i).some((t=>{var e;const r=Zl(t,i[t]);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)}))},Gl={indicator:[t=>{var n;if(!(null===(n=t.mode)||void 0===n?void 0:n.includes("gauge")))throw new Error(`${Vl} ${t.type}, mode: ${t.mode}`)}],histogram:[(t,n)=>{if(Xl(t,n))throw new Error(`${Vl} ${t.type}, log axis type not supported.`)},t=>zl(t,!1)],bar:[(t,n)=>{if(Xl(t,n))throw new Error(`${Vl} ${t.type}, log axis type not supported.`)},t=>{(t=>{const n=t.x&&Rl(t.x)&&0===t.x.length,i=t.y&&Rl(t.y)&&0===t.y.length;if(n||i){let t="Bar chart: ";throw n&&i?t+="both x and y arrays are empty.":n?t+="x array is empty.":i&&(t+="y array is empty."),new Error(t)}if("h"===t.orientation){if(!Fl(t.x)&&!El(t.x))throw new Error(`${Vl} ${t.type}, orientation: ${t.orientation}, string x values not supported.`);if(!Ul(t)&&El(t.x))throw new Error(`${Vl} ${t.type}, orientation: ${t.orientation}, date x values not supported in HBWA.`);zl(t,!1)}else if(!Fl(t.y)&&!_l(t.y)&&!Hl(t.y))throw new Error("Non numeric, string, or object Y values encountered, type: "+typeof t.y)})(t)}],sankey:[t=>{if(function(t){var n,i,e,r;const o={};null===(i=null===(n=t.node)||void 0===n?void 0:n.label)||void 0===i||i.forEach(((t,n)=>o[n]=[])),null===(r=null===(e=t.link)||void 0===e?void 0:e.value)||void 0===r||r.forEach(((n,i)=>{var e,r,u,a;Il(n)||Il(null===(r=null===(e=t.link)||void 0===e?void 0:e.source)||void 0===r?void 0:r[i])||Il(null===(a=null===(u=t.link)||void 0===u?void 0:u.target)||void 0===a?void 0:a[i])||o[t.link.source[i]].push(t.link.target[i])}));const u=new Set,a=new Set;function l(t,n){if(Il(t)||!o[t])return!1;if(a.has(t))return!0;if(!u.has(t)){u.add(t),a.add(t);for(const i of o[t])if(l(i,[...n,i]))return!0;return a.delete(t),!1}}for(let t=0;t<Object.keys(o).length;t++)if(l(t,[t]))return!0;return!1}(t))throw new Error(`${Vl} ${t.type}, Cycles in Sankey chart not supported`)}],scatter:[(t,n)=>Yl(t,n)],scattergl:[(t,n)=>Yl(t,n)],scatterpolar:[t=>{if(!Fl(t.theta)&&!_l(t.theta))throw new Error(`${Vl} ${t.type}, theta values must be array of numbers or strings`);if(!Fl(t.r))throw new Error(`${Vl} ${t.type}, Non numeric r values`)}],funnel:[t=>zl(t,!1)],histogram2d:[(t,n)=>{if(Xl(t,n))throw new Error(`${Vl} ${t.type}, log axis type not supported.`)}],heatmap:[(t,n)=>{if(Xl(t,n))throw new Error(`${Vl} ${t.type}, log axis type not supported.`)}]},Ul=t=>El(t.base)||Fl(t.base),ql=t=>{let n=1;"string"==typeof t.xaxis&&/^x\d+$/.test(t.xaxis)&&(n=parseInt(t.xaxis.slice(1),10));let i=1;return"string"==typeof t.yaxis&&/^y\d+$/.test(t.yaxis)&&(i=parseInt(t.yaxis.slice(1),10)),{x:n,y:i}},Zl=(t,n)=>`${t}axis${n>1?n:""}`,Kl=t=>"tonexty"===t.fill||"tozeroy"===t.fill||!!t.stackgroup,Jl=(t,n)=>{var i;const e=El(t.x),r=Fl(t.x),o=Pl(t.x),u=Bl(t.x),a=_l(t.y),l=ql(t),s=Zl("x",l.x),c="category"===(null===(i=null==n?void 0:n[s])||void 0===i?void 0:i.type);return!(!(e||r||u)||o||a||c)},Ql=(t,n)=>{var i;return!$l(null!==(i=t.mode)&&void 0!==i?i:"")&&!Jl(t,n)},ts=(t,n)=>{var i,e;if("none"===t.mode&&"toself"===t.fill){let n=!0;for(let i=0;i<t.x.length;i+=5)if(t.x[i]!==t.x[i+3]||t.x[i+1]!==t.x[i+2]||t.y[i]!==t.y[i+1]||t.y[i+2]!==t.y[i+3]||i>0&&null!==t.y[i-1]){n=!1;break}if(n)return!0}return!("markers"!==t.mode||1!==(null===(i=t.marker)||void 0===i?void 0:i.size)||0!==(null===(e=t.marker)||void 0===e?void 0:e.opacity)||""!==t.name||!1!==t.showlegend||!n)};var ns,is,es,rs,os={color1:"qualitative.1",color2:"qualitative.2",color3:"qualitative.3",color4:"qualitative.4",color5:"qualitative.5",color6:"qualitative.6",color7:"qualitative.7",color8:"qualitative.8",color9:"qualitative.9",color10:"qualitative.10",color11:"qualitative.11",color12:"qualitative.12",color13:"qualitative.13",color14:"qualitative.14",color15:"qualitative.15",color16:"qualitative.16",color17:"qualitative.17",color18:"qualitative.18",color19:"qualitative.19",color20:"qualitative.20",color21:"qualitative.21",color22:"qualitative.22",color23:"qualitative.23",color24:"qualitative.24",color25:"qualitative.25",color26:"qualitative.26",color27:"qualitative.27",color28:"qualitative.28",color29:"qualitative.29",color30:"qualitative.30",color31:"qualitative.31",color32:"qualitative.32",color33:"qualitative.33",color34:"qualitative.34",color35:"qualitative.35",color36:"qualitative.36",color37:"qualitative.37",color38:"qualitative.38",color39:"qualitative.39",color40:"qualitative.40",info:"semantic.info",disabled:"semantic.disabled",highError:"semantic.highError",error:"semantic.error",warning:"semantic.warning",success:"semantic.success",highSuccess:"semantic.highSuccess"},us={1:["#637cef"],2:["#e3008c"],3:["#2aa0a4"],4:["#9373c0"],5:["#13a10e"],6:["#3a96dd"],7:["#ca5010"],8:["#57811b"],9:["#b146c2"],10:["#ae8c00"],11:["#3c51b4","#93a4f4"],12:["#ad006a","#ee5fb7"],13:["#026467","#4cb4b7"],14:["#674c8c","#a083c9"],15:["#0e7a0b","#27ac22"],16:["#2c72a8","#4fa1e1"],17:["#9a3d0c","#d77440"],18:["#405f14","#73aa24"],19:["#863593","#c36bd1"],20:["#6d5700","#d0b232"],21:["#4f6bed"],22:["#ea38a6"],23:["#038387"],24:["#8764b8"],25:["#11910d"],26:["#3487c7"],27:["#d06228"],28:["#689920"],29:["#ba58c9"],30:["#937700","#c19c00"],31:["#2c3c85","#c8d1fa"],32:["#7f004e","#f7adda"],33:["#02494c","#9bd9db"],34:["#4c3867","#b29ad4"],35:["#0b5a08","#a7e3a5"],36:["#20547c","#83bdeb"],37:["#712d09","#df8e64"],38:["#23330b","#a4cc6c"],39:["#63276d","#cf87da"],40:["#3a2f00","#dac157"]},as={qualitative:us,semantic:{info:["#015cda"],disabled:["#dbdbdb","#4d4d4d"],highError:["#6e0811","#cc2635"],error:["#c50f1f","#dc626d"],warning:["#f7630c","#f87528"],success:["#107c10","#54b054"],highSuccess:["#094509","#218c21"]}},ls=Object.values(us),ss=Object.values(os),cs=function(t,n){if(0===t.length)return"";var i=Number(n);return i<t.length?t[i]:t[0]},ds=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=ls[(t+n)%ls.length];return cs(e,i)},fs=function(t,n){if(void 0===n&&(n=!1),ss.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=as[e][r];return cs(o,n)}return t},vs=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},hs=function(t){var n=t.r,i=t.g,e=t.b;return{r:vs(n/255),g:vs(i/255),b:vs(e/255)}},ps=function(t){return.2126*t.r+.7152*t.g+.0722*t.b},gs=function(t,n){var i=ps(hs(Po(t))),e=ps(hs(Po(n)));return(Math.max(i,e)+.05)/(Math.min(i,e)+.05)},ys="2000-01-01";function ms(t,n){void 0===n&&(n=!1);var i=$u(".2~",t);Math.abs(t)<1?i=zu(".2~g"):n&&Math.abs(t)>=1e3&&(i=$u(".1~",t));var e=i(t);return Math.abs(t)>=1e9?e.replace("G","B"):e}function bs(t){return ms(t)}function xs(t,n,i,e,r){var o=t.domainNRangeValues,u=t.showRoundOffXTickValues,a=void 0===u||u,l=t.xAxistickSize,s=void 0===l?6:l,c=t.tickPadding,d=void 0===c?10:c,f=t.xAxisCount,v=t.xAxisElement,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=t.tickStep,y=t.tick0,m=t.tickText,b=ac(r).domain([o.dStartValue,o.dEndValue]).range([o.rStartValue,o.rEndValue]);a&&b.nice();var x=null!=f?f:6,w=function(t,i,r){if(n.tickValues&&m&&void 0!==m[i])return m[i];if(n.tickFormat)return zu(n.tickFormat)(t);var o="number"==typeof t?t:t.valueOf();return""===(null==r?void 0:r(o))?"":(0,Yn.c$)(o,e)};if(h&&void 0===f){var M=p(b.ticks().map((function(t,n){return w(t,n)})))+20,C=b.range(),k=C[0],A=C[1];x=Math.min(Math.max(1,Math.floor(Math.abs(A-k)/M)),10)}var S,L=ni(b).tickSize(s).tickPadding(d).ticks(x).tickFormat((function(t,n){return w(t,n,b.tickFormat(x))}));[is.HorizontalBarChartWithAxis,is.GanttChart].includes(i)&&L.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?S=n.tickValues:g&&(S=hc(r,g,y,b.domain())),S&&L.tickValues(S),v&&sl(v).call(L).selectAll("text").attr("aria-hidden","true");var D=(null!=S?S:b.ticks(x)).map(L.tickFormat());return{xScale:b,tickValues:D}}function ws(t,n){var i,e=Ei,r=n?Bi:Fi,o=n?_i:Pi,u=n?Ii:Hi,a=n?re:ee,l=n?Zi:ji,s=n?ue:oe,c=[{formatLevel:0,condition:function(t){return e(t)<t}},{formatLevel:1,condition:function(t){return r(t)<t}},{formatLevel:2,condition:function(t){return o(t)<t}},{formatLevel:3,condition:function(t){return u(t)<t}},{formatLevel:4,condition:function(t){return a(t)<t&&l(t)<t}},{formatLevel:5,condition:function(t){return a(t)<t}},{formatLevel:6,condition:function(t){return s(t)<t}},{formatLevel:7,condition:function(){return!0}}].find((function(n){return(0,n.condition)(t)}));return null!==(i=null==c?void 0:c.formatLevel)&&void 0!==i?i:7}function Ms(t,n,i){var e,r,o=t.yMinMaxValues,u=void 0===o?{startValue:0,endValue:0}:o,a=t.yAxisElement,l=void 0===a?null:a,s=t.yMaxValue,c=void 0===s?0:s,d=t.yMinValue,f=void 0===d?0:d,v=t.containerHeight,h=t.margins,p=t.tickPadding,g=void 0===p?12:p,y=t.maxOfYVal,m=void 0===y?0:y,b=t.yAxisTickFormat,x=t.yAxisTickCount,w=void 0===x?4:x,M=t.tickValues,C=t.tickStep,k=t.tick0,A=t.tickText,S=m||u.endValue,L=S>c?S:c,D=u.startValue<f?Math.min(0,u.startValue):f,V=Gu().domain([D,L]).range([v-h.bottom,h.top]),N=(n?ti(V):ii(V)).tickPadding(g).ticks(w);return N.tickFormat((function(t,n){return M&&A&&void 0!==A[n]?A[n]:"function"==typeof b?b(t,n):"string"==typeof b?zu(b)(t):bs("number"==typeof t?t:t.valueOf())})),M?r=M:C&&(r=hc(void 0,C,k,V.domain())),r&&N.tickValues(r),l&&sl(l).call(N).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=V.domain(),i.yAxisTickText=(null!==(e=N.tickValues())&&void 0!==e?e:V.ticks(w)).map(N.tickFormat()),V}function Cs(t,n,i,e,r,o,u,a){var l;void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===u&&(u=!1);var s=t.yMinMaxValues,c=void 0===s?{startValue:0,endValue:0}:s,d=t.yAxisElement,f=void 0===d?null:d,v=t.yMaxValue,h=void 0===v?0:v,p=t.yMinValue,g=void 0===p?0:p,y=t.containerHeight,m=t.containerWidth,b=t.margins,x=t.tickPadding,w=void 0===x?12:x,M=t.maxOfYVal,C=void 0===M?0:M,k=t.yAxisTickFormat,A=t.yAxisTickCount,S=void 0===A?4:A,L=t.eventAnnotationProps,D=t.eventLabelHeight,V=t.tickValues,N=t.tickStep,O=t.tick0,T=t.tickText,E=C||c.endValue||0,F=E>h?E:h,B=o?Math.min(c.startValue||0,g||0):c.startValue<g?0:g,P=function(t,n,i,e,r){if(r)return function(t,n,i){var e,r,o=t<0&&t===n?0:n,u=ci(t>=0&&t===n?0:t,o,i),a=ai(u[0],u[u.length-1],i);return a[a.length-1]>o&&(e=o,r=(0,Yn.Di)(e),Math.log10(r)%1==0)&&a.pop(),a}(n,t,i);var o=e||(t-n)/i>=1?Math.ceil((t-n)/i):(t-n)/i,u=[n<0&&t>=0?0:n];if(u[0]===n&&u.push(n+o),n<0&&t>=0){for(;u[u.length-1]>n;)u.push(u[u.length-1]-o);u.reverse()}for(;u[u.length-1]<t;)u.push(u[u.length-1]+o);return u}(F,B,S,e,u),_=[o?P[0]:B,P[P.length-1]];if("log"===a){var H=c.startValue,I=c.endValue;g>0&&(H=Math.min(H,g)),h>0&&(I=Math.max(I,h)),_=[H,I]}var W,R=ac(a).domain(_).range([y-b.bottom,b.top+(L?D:0)]),j=(!n&&r||n&&!r?ti(R):ii(R)).tickPadding(w).tickSizeInner(-(m-b.left-b.right));return V?W=V:N&&(W=hc(a,N,O,R.domain())),W?j.tickValues(W):"log"!==a&&j.tickValues(P),j.tickFormat((function(t,n){return function(t,n,i){if(V&&T&&void 0!==T[n])return T[n];if("function"==typeof k)return k(t,n);if("string"==typeof k)return zu(k)(t);var e="number"==typeof t?t:t.valueOf();return""===(null==i?void 0:i(e))?"":bs(e)}(t,n,R.tickFormat(S))})),f&&sl(f).call(j).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=R.domain(),i.yAxisTickText=(null!==(l=j.tickValues())&&void 0!==l?l:R.ticks(S)).map(j.tickFormat()),R}!function(t){t[t.AreaChart=0]="AreaChart",t[t.LineChart=1]="LineChart",t[t.VerticalBarChart=2]="VerticalBarChart",t[t.VerticalStackedBarChart=3]="VerticalStackedBarChart",t[t.GroupedVerticalBarChart=4]="GroupedVerticalBarChart",t[t.HeatMapChart=5]="HeatMapChart",t[t.HorizontalBarChartWithAxis=6]="HorizontalBarChartWithAxis",t[t.ScatterChart=7]="ScatterChart",t[t.GanttChart=8]="GanttChart"}(is||(is={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(es||(es={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(rs||(rs={}));var ks=function(t,n,i,e,r){var o,u=t.containerHeight,a=t.tickPadding,l=void 0===a?12:a,s=t.margins,c=t.yAxisTickFormat,d=t.yAxisElement,f=t.yAxisPadding,v=t.tickValues,h=t.tickText,p=null!=f?f:.5;p=1===p?.99:p;var g=Tu().domain(n).range([u-s.bottom,s.top]).padding(p),y=i?ti(g):ii(g),m=null!==(o=v)&&void 0!==o?o:n,b=y.tickPadding(l).tickValues(m).tickFormat((function(t,n){return v&&h&&void 0!==h[n]?h[n]:"function"==typeof c?c(t,n):t}));return d&&sl(d).call(b).selectAll("text"),e.yAxisTickText=b.tickValues().map(b.tickFormat()),g},As=function(t,n,i,e,r,o){var u,a=t.containerHeight,l=t.tickPadding,s=void 0===l?12:l,c=t.margins,d=t.yAxisTickFormat,f=t.yAxisElement,v=t.yAxisPadding,h=void 0===v?0:v,p=t.containerWidth,g=t.tickValues,y=t.tickText,m=Tu().domain(n).range([a-c.bottom,c.top]).padding(h);o===is.VerticalStackedBarChart&&m.paddingInner(1).paddingOuter(0);var b=i?ti(m):ii(m),x=null!==(u=g)&&void 0!==u?u:n,w=b.tickPadding(s).tickValues(x).tickFormat((function(t,n){return g&&y&&void 0!==y[n]?y[n]:"function"==typeof d?d(t,n):t})).tickSize(0);return o===is.VerticalStackedBarChart&&b.tickSizeInner(-(p-c.left-c.right)),f&&sl(f).call(w).selectAll("text"),e.yAxisTickText=w.tickValues().map(w.tickFormat()),m};function Ss(t){var n=[];t.forEach((function(t){var i=t.data.filter((function(t){return!t.hideCallout})).map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,index:t.index})}));n=n.concat(i)}));var i={};return n.forEach((function(t){var n=t.x instanceof Date?t.x.getTime():t.x;n in i?i[n].push({legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}):i[n]=[{legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}]})),i}var Ls=function(t,n,i){var e=sl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},Ds=function(t,n){void 0===n&&(n="none");var i=0,e=document.createElement("canvas").getContext("2d");if(e){var r=document.querySelector(n);if(r){var o=window.getComputedStyle(r,null),u=o.getPropertyValue("font-weight"),a=o.getPropertyValue("font-size"),l=o.getPropertyValue("font-family");e.font="".concat(u," ").concat(a," ").concat(l)}else e.font='600 10px "Segoe UI"';t.forEach((function(t){i=Math.max(e.measureText(t.toString()).width,i)}))}return i};function Vs(t){var n=t.tooltipCls,i=t.axis,e=t.id;if(null===i)return null;for(var r=sl("body").append("div").attr("id",e).attr("class",n).style("opacity",0),o=i.selectAll("#BaseSpan")._groups[0],u=o&&Object.keys(o).length,a=[],l=0;l<u;l++){var s=o[l].dataset&&Object.values(o[l].dataset)[0];a.push(s)}var c=i.selectAll(".tick")._groups[0],d=c&&Object.keys(c).length,f=function(t){sl(c[t]).on("mouseover",(function(n,i){r.style("opacity",.9),r.text(a[t]).style("left",n.pageX+"px").style("top",n.pageY-28+"px")})).on("mouseout",(function(t){r.style("opacity",0)}))};for(l=0;l<d;l++)f(l)}function Ns(t){var n=!1;return t&&t.length>0&&t.forEach((function(t){t.data.length>0&&(n=t.data[0].x instanceof Date)})),n}function Os(t,n,i,e,r,o){var u=oc(t),a=dc(t,r),l=a[0],s=a[1];if(o){var c=lc(l,s,r);l-=c.start,s+=c.end}var d=n.left,f=i-n.right;return e?{dStartValue:u?1:s,dEndValue:u?-1:l,rStartValue:d,rEndValue:f}:{dStartValue:u?-1:l,dEndValue:u?1:s,rStartValue:d,rEndValue:f}}function Ts(t){var n={};return t.forEach((function(t){var i=t.y;n[i]||(n[i]=[]),n[i].push(t)})),Object.values(n)}function Es(t,n){var i=0,e=0;return t.forEach((function(t){var r=t.reduce((function(t,n){return t+(n.x>0?n.x:0)}),n),o=t.reduce((function(t,n){return t+(n.x<0?n.x:0)}),n);i=Math.max(i,r),e=Math.min(e,o)})),{longestPositiveBar:i,longestNegativeBar:e}}function Fs(t,n,i){var e=t.left,r=n-t.right;return i?{dStartValue:0,dEndValue:0,rStartValue:r,rEndValue:e}:{dStartValue:0,dEndValue:0,rStartValue:e,rEndValue:r}}function Bs(t,n,i,e,r,u,a,l){var s,c,d;if(void 0===r&&(r=[]),[is.AreaChart,is.LineChart,is.ScatterChart].includes(u)){if(c=(s=dc(t))[0],d=s[1],c=di((0,o.fX)((0,o.fX)([],r,!0),[c],!1)),d=fi((0,o.fX)((0,o.fX)([],r,!0),[d],!1)),l||u===is.ScatterChart){var f=lc(c.getTime(),d.getTime());c=new Date(c.getTime()-f.start),d=new Date(d.getTime()+f.end)}}else c=di(t,(function(t){return t.x})),d=fi(t,(function(t){return t.x}));var v=n.left,h=i-n.right;return e?{dStartValue:d,dEndValue:c,rStartValue:v,rEndValue:h}:{dStartValue:c,dEndValue:d,rStartValue:v,rEndValue:h}}function Ps(t,n,i,e){var r=[];return t.forEach((function(t){!i==!t.useSecondaryYScale&&t.data.forEach((function(t){sc(t.y,e)&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}}function _s(t,n,i){var e=[];return t.forEach((function(t){i||e.push(t.y),void 0!==t.lineData&&!i==!t.lineData.useSecondaryYScale&&e.push(t.lineData.y)})),{startValue:di(e),endValue:fi(e)}}function Hs(t,n){if(void 0!==n&&n===rs.NumericAxis){var i=fi(t,(function(t){return t.y}));return{startValue:di(t,(function(t){return t.y})),endValue:i}}return{startValue:0,endValue:0}}var Is,Ws,Rs=function(t,n){if(n)switch(typeof t){case"string":return es.StringAxis;case"number":return es.NumericAxis;default:return es.DateAxis}else switch(typeof t){case"string":return rs.StringAxis;case"number":return rs.NumericAxis;default:return rs.DateAxis}};!function(t){t[t.circle=0]="circle",t[t.square=1]="square",t[t.triangle=2]="triangle",t[t.diamond=3]="diamond",t[t.pyramid=4]="pyramid",t[t.hexagon=5]="hexagon",t[t.pentagon=6]="pentagon",t[t.octagon=7]="octagon"}(Is||(Is={})),function(t){t[t.dottedLine=0]="dottedLine"}(Ws||(Ws={}));var js=((ns={})[Is.circle]={widthRatio:1},ns[Is.square]={widthRatio:1},ns[Is.triangle]={widthRatio:1},ns[Is.diamond]={widthRatio:1},ns[Is.pyramid]={widthRatio:1},ns[Is.hexagon]={widthRatio:2},ns[Is.pentagon]={widthRatio:1.168},ns[Is.octagon]={widthRatio:2.414},ns),zs=function(t,n,i){return void 0===n&&(n="text"),void 0===i&&(i=!0),{role:n,"data-is-focusable":i,"aria-label":(t=null!=t?t:{}).ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy}};function $s(t){return ms(t,!0)}var Ys=function(t,n,i,e){var r;return void 0===i&&(i=16),r="auto"===t||"histogram"===e?i:"number"==typeof t?t:Math.min(i,16),"number"==typeof n&&(r=Math.min(r,n)),Math.max(r,1)},Xs=function(t,n,i){void 0===i&&(i=0);var e="number"==typeof t?t:"number"==typeof n?n:i;return Math.max(0,Math.min(e,1))},Gs=function(t,n){return"number"==typeof t||"number"==typeof n};function Us(t){return void 0===t&&(t={}),t.dangerouslySetInnerHTML,(0,o.Tt)(t,["dangerouslySetInnerHTML"])}function qs(t,n){if(t===n)return!0;if(!t&&!n)return!0;if(!t||!n||t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}var Zs=/var\((--[a-zA-Z0-9\-]+)\)/g;function Ks(t,n){var i=getComputedStyle(t);return n.replace(Zs,(function(t,n){return i.getPropertyValue(n)}))}function Js(t,n,i){var e=getComputedStyle(n);Array.isArray(t)?t.forEach((function(t){sl(i).style(t,e.getPropertyValue(t))})):Object.entries(t).forEach((function(t){var n=t[0],r=t[1];sl(i).style(r,e.getPropertyValue(n))}))}var Qs={position:"absolute",visibility:"hidden",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tc=p("measurement_span_");function nc(t,n){if(void 0===n&&(n=hl),"function"==typeof t)return t;switch(t){case"linear":return hl;case"natural":return yl;case"step":return bl;case"stepAfter":return wl;case"stepBefore":return xl;default:return n}}var ic=/(category|total|sum|min|max|mean|median) (ascending|descending)/,ec=function(t,n){if(Array.isArray(n)){var i=[],e=new Set;return n.forEach((function(n){t[n]&&!e.has(n)&&(i.push(n),e.add(n))})),Object.keys(t).forEach((function(t){e.has(t)||i.push(t)})),i}var r=null==n?void 0:n.match(ic);if(r){var o=r[1],u=r[2];if("category"===o){var a=Object.keys(t).sort();return"descending"===u?a.reverse():a}var l={min:di,max:fi,sum:vi,total:vi,mean:hi,median:bi},s=[];return Object.keys(t).forEach((function(n){s.push([n,l[o](t[n])||0])})),s.sort("descending"===u?function(t,n){return n[1]-t[1]}:function(t,n){return t[1]-n[1]}),s.map((function(t){return t[0]}))}return Object.keys(t)};function rc(t,n){var i=n.semanticColors.bodyText;return gs(i,t)<3&&(i=function(t,n){return t===n.semanticColors.bodyText?n.semanticColors.bodyBackground:n.semanticColors.bodyText}(i,n)),i}function oc(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"scatterpolar"===t.lineOptions.mode}))}var uc,ac=function(t){return"log"===t?ta():Gu()},lc=function(t,n,i){if("log"===i)return{start:.5*t,end:n};var e=.1*(n-t);return{start:e,end:e}},sc=function(t,n){return"number"!=typeof t||"log"!==n||t>0},cc=function(t,n){return!Il(t)&&!Il(n)},dc=function(t,n){var i=function(t){return sc(t.x,n)};return[di(t,(function(t){return di(t.data.filter(i),(function(t){return t.x}))})),fi(t,(function(t){return fi(t.data.filter(i),(function(t){return t.x}))}))]},fc=function(t){var n=t.data,i=t.xScale,e=t.yScalePrimary,r=t.yScaleSecondary,o=t.useSecondaryYScale,u=t.xScaleType,a=t.yScaleType,l=t.secondaryYScaleType,s=dc(n,u),c=s[0],d=s[1],f=lc(+c,+d,u),v=c instanceof Date?new Date(+c-f.start):c-f.start,h=d instanceof Date?new Date(+d+f.end):d+f.end,p=Math.min(Math.abs(i(c)-i(v)),Math.abs(i(h)-i(d))),g=o?l:a,y=Ps(n,0,o,g),m=y.startValue,b=y.endValue,x=lc(m,b,g),w=m-x.start,M=b+x.end,C=o?r:e,k=Math.min(Math.abs(C(w)-C(m)),Math.abs(C(b)-C(M)));return Math.min(p,k)},vc=function(t,n,i){for(var e=di(i),r=fi(i),o=Math.max(dl(t),dl(n)),u=Math.ceil(fl((e-t)/n,o)),a=Math.floor(fl((r-t)/n,o)),l=[],s=u;s<=a;s++)l.push(fl(t+s*n,o));return l},hc=function(t,n,i,e){var r="number"==typeof i?i:0;if("log"!==t){if("number"==typeof n&&n>0)return vc(r,n,e)}else{if("number"==typeof n&&n>0)return vc(r,n,e.map((function(t){return Math.log10(t)}))).map((function(t){return Math.pow(10,t)}));if("string"==typeof n){var o=n[0],u=Nl(n.slice(1))?Number(n.slice(1)):0;if("L"===o&&u>0)return vc(r,u,e)}}},pc=function(t,n,i,e){var r=n instanceof Date?n:new Date(ys);if("number"==typeof t&&t>0)return vc(+r,t,i.map((function(t){return+t}))).map((function(t){return new Date(t)}));if("string"==typeof t){var o=t[0],u=Nl(t.slice(1))?Number(t.slice(1)):0;if("M"===o&&u>0&&u===Math.round(u))return function(t,n,i,e){for(var r=+di(i),o=+fi(i),u=function(t){return e?t.getUTCMonth():t.getMonth()},a=function(t,n){return e?new Date(t.setUTCMonth(n)):new Date(t.setMonth(n))},l=0,s=new Date(+t);+s>r;)s=a(s,u(s)-n),l-=n;for(var c=u(t),d=[],f=l;;f+=n){var v=a(new Date(+t),c+f);if(u(v)!==((c+f)%12+12)%12&&(v=e?new Date(v.setUTCDate(0)):new Date(v.setDate(0))),+v>o)break;+v>=r&&d.push(v)}return d}(r,u,i,e)}},gc=function(t,n){if(null!==n){var i=n instanceof Date?n.getTime():n;if(t[i])return{x:n,values:t[i]}}},yc=i(357),mc={gradient1:"default.1",gradient2:"default.2",gradient3:"default.3",gradient4:"default.4",gradient5:"default.5",gradient6:"default.6",gradient7:"default.7",gradient8:"default.8",gradient9:"default.9",gradient10:"default.10",gradient1Ext:"extended.1",gradient2Ext:"extended.2",gradient3Ext:"extended.3",gradient4Ext:"extended.4",gradient5Ext:"extended.5",gradient6Ext:"extended.6",gradient7Ext:"extended.7",gradient8Ext:"extended.8",gradient9Ext:"extended.9",gradient10Ext:"extended.10",success:"semantic.success",highSuccess:"semantic.highSuccess",warning:"semantic.warning",error:"semantic.error",highError:"semantic.highError",disabled:"semantic.disabled"},bc={1:[["#4760D5","#637CEF"],["#4F6BED","#637CEF"]],2:[["#795AA6","#9373C0"],["#8764B8","#A083C9"]],3:[["#159195","#2AA0A4"],["#159195","#2AA0A4"]],4:[["#B146C2","#C36BD1"],["#B146C2","#C36BD1"]],5:[["#3487C7","#3A96DD"],["#3487C7","#3A96DD"]],6:[["#0E7A0B","#13A10E"],["#11910D","#27AC22"]],7:[["#E61C99","#EE5FB7"],["#E61C99","#EE5FB7"]],8:[["#CA5010","#D77440"],["#CA5010","#D77440"]],9:[["#57811B","#689920"],["#57811B","#689920"]],10:[["#937700","#AE8C00"],["#937700","#AE8C00"]]},xc={default:bc,semantic:{success:[["#0C5E0C","#107C10"],["#218C21","#359B35"]],highSuccess:[["#107C10","#359B35"],["#359B35","#9FD89F"]],warning:[["#DE590B","#F7630C"],["#DE590B","#F87528"]],error:[["#B10E1C","#CC2635"],["#D33F4C","#EEACB2"]],highError:[["#6E0811","#B10E1C"],["#D33F4C","#DC626D"]],disabled:[["#E6E6E6","#E6E6E6"],["#E6E6E6","#E6E6E6"]]},extended:{1:[["#2C3C85","#3C51B4"],["#93A4F4","#C8D1FA"]],2:[["#4C3867","#674C8C"],["#A083C9","#B29AD4"]],3:[["#02494C","#038387"],["#4CB4B7","#9BD9DB"]],4:[["#63276D","#863593"],["#C36BD1","#CF87DA"]],5:[["#20547C","#2C72A8"],["#4FA1E1","#83BDEB"]],6:[["#0B5A08","#0E7A0B"],["#27AC22","#5EC75A"]],7:[["#AD006A","#E3008C"],["#EE5FB7","#F7ADDA"]],8:[["#9A3D0C","#CA5010"],["#D77440","#DF8E64"]],9:[["#405F14","#57811B"],["#73AA24","#A4CC6C"]],10:[["#6D5700","#937700"],["#D0B232","#DAC157"]]}},wc=Object.values(bc),Mc=Object.values(mc),Cc=function(t,n){if(0===t.length)return["",""];var i=Number(n);return i<t.length?t[i]:t[0]},kc=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=wc[(t+n)%wc.length];return Cc(e,i)},Ac=function(t,n){if(void 0===n&&(n=!1),Mc.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=xc[e][r];return Cc(o,n)}return[t,t]};function Sc(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return n.length<2?n[0]:function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];n.forEach((function(n){return n&&n.apply(t,i)}))}}function Lc(t){!function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=Sc(t,t[i],n[i]))}(t,{componentDidMount:Dc,componentDidUpdate:Vc,componentWillUnmount:Nc})}function Dc(){Oc(this.props.componentRef,this)}function Vc(t){t.componentRef!==this.props.componentRef&&(Oc(t.componentRef,null),Oc(this.props.componentRef,this))}function Nc(){Oc(this.props.componentRef,null)}function Oc(t,n){t&&("object"==typeof t?t.current=n:"function"==typeof t&&t(n))}function Tc(t,n,i){var e,r=x(t,(function(t){var i;return n===t||!!(null===(i=t.hasAttribute)||void 0===i?void 0:i.call(t,kn))}),i);return null!==r&&!!(null===(e=r.hasAttribute)||void 0===e?void 0:e.call(r,kn))}!function(t){t[t.vertical=0]="vertical",t[t.horizontal=1]="horizontal",t[t.bidirectional=2]="bidirectional",t[t.domOrder=3]="domOrder"}(uc||(uc={}));var Ec,Fc=u.createContext(void 0),Bc="data-is-focusable",Pc="data-focuszone-id",_c="tabindex",Hc="data-no-vertical-wrap",Ic="data-no-horizontal-wrap",Wc=999999999,Rc=-999999999;function jc(t,n){var i;"function"==typeof MouseEvent?i=new MouseEvent("click",{ctrlKey:null==n?void 0:n.ctrlKey,metaKey:null==n?void 0:n.metaKey,shiftKey:null==n?void 0:n.shiftKey,altKey:null==n?void 0:n.altKey,bubbles:null==n?void 0:n.bubbles,cancelable:null==n?void 0:n.cancelable}):(i=document.createEvent("MouseEvents")).initMouseEvent("click",!!n&&n.bubbles,!!n&&n.cancelable,window,0,0,0,0,0,!!n&&n.ctrlKey,!!n&&n.altKey,!!n&&n.shiftKey,!!n&&n.metaKey,0,null),t.dispatchEvent(i)}var zc,$c={},Yc=new Set,Xc=["text","number","password","email","tel","url","search","textarea"],Gc=!1,Uc=function(t){function n(i){var e,r,o,a,s,c=t.call(this,i)||this;c._root=u.createRef(),c._mergedRef=(s={refs:[]},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s.resolver&&function(t,n){if(t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}(s.refs,t)||(s.resolver=function(t){return function(n){for(var i=0,e=t.refs;i<e.length;i++){var r=e[i];"function"==typeof r?r(n):r&&(r.current=n)}}}(s)),s.refs=t,s.resolver}),c._onFocus=function(t){if(!c._portalContainsElement(t.target)){var n,i=c.props,e=i.onActiveElementChanged,r=i.doNotAllowFocusEventToPropagate,o=i.stopFocusPropagation,u=i.onFocusNotification,a=i.onFocus,l=i.shouldFocusInnerElementWhenReceivedFocus,s=i.defaultTabbableElement,d=c._isImmediateDescendantOfZone(t.target);if(d)n=t.target;else for(var f=t.target;f&&f!==c._root.current;){if(D(f,void 0,c._inShadowRoot)&&c._isImmediateDescendantOfZone(f)){n=f;break}f=b(f,Gc)}if(l&&t.target===c._root.current){var v=s&&"function"==typeof s&&c._root.current&&s(c._root.current);v&&D(v,void 0,c._inShadowRoot)?(n=v,v.focus()):(c.focus(!0),c._activeElement&&(n=null))}var h=!c._activeElement;n&&n!==c._activeElement&&((d||h)&&c._setFocusAlignment(n,!0,!0),c._activeElement=n,h&&c._updateTabIndexes()),e&&e(c._activeElement,t),(o||r)&&t.stopPropagation(),a?a(t):u&&u()}},c._onBlur=function(){c._setParkedFocus(!1)},c._onMouseDown=function(t){if(!c._portalContainsElement(t.target)&&!c.props.disabled){for(var n=t.target,i=[];n&&n!==c._root.current;)i.push(n),n=b(n,Gc);for(;i.length&&((n=i.pop())&&D(n,void 0,c._inShadowRoot)&&c._setActiveElement(n,!0),!V(n)););}},c._onKeyDown=function(t,n){if(!c._portalContainsElement(t.target)){var i=c.props,e=i.direction,r=i.disabled,o=i.isInnerZoneKeystroke,u=i.pagingSupportDisabled,a=i.shouldEnterInnerZone;if(!(r||(c.props.onKeyDown&&c.props.onKeyDown(t),t.isDefaultPrevented()||c._getDocument().activeElement===c._root.current&&c._isInnerZone))){if((a&&a(t)||o&&o(t))&&c._isImmediateDescendantOfZone(t.target)){var s=c._getFirstInnerZone();if(s){if(!s.focus(!0))return}else{if(!N(t.target))return;if(!c.focusElement(A(t.target,t.target.firstChild,!0)))return}}else{if(t.altKey)return;switch(t.which){case 32:if(c._shouldRaiseClicksOnSpace&&c._tryInvokeClickForFocusable(t.target,t))break;return;case 37:if(e!==uc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusLeft(n)))break;return;case 39:if(e!==uc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusRight(n)))break;return;case 38:if(e!==uc.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusUp()))break;return;case 40:if(e!==uc.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusDown()))break;return;case 34:if(!u&&c._moveFocusPaging(!0))break;return;case 33:if(!u&&c._moveFocusPaging(!1))break;return;case 9:if(c.props.allowTabKey||1===c.props.handleTabKey||2===c.props.handleTabKey&&c._isElementInput(t.target)){var d=!1;if(c._processingTabKey=!0,d=e!==uc.vertical&&c._shouldWrapFocus(c._activeElement,Ic)?((0,l.jI)(n)?!t.shiftKey:t.shiftKey)?c._moveFocusLeft(n):c._moveFocusRight(n):t.shiftKey?c._moveFocusUp():c._moveFocusDown(),c._processingTabKey=!1,d)break;c.props.shouldResetActiveElementWhenTabFromZone&&(c._activeElement=null)}return;case 36:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!1))return!1;var f=c._root.current&&c._root.current.firstChild;if(c._root.current&&f&&c.focusElement(A(c._root.current,f,!0)))break;return;case 35:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!0))return!1;var v=c._root.current&&c._root.current.lastChild;if(c._root.current&&c.focusElement(k(c._root.current,v,!0,!0,!0)))break;return;case 13:if(c._shouldRaiseClicksOnEnter&&c._tryInvokeClickForFocusable(t.target,t))break;return;default:return}}t.preventDefault(),t.stopPropagation()}}},c._getHorizontalDistanceFromCenter=function(t,n,i){var e=c._focusAlignment.left||c._focusAlignment.x||0,r=Math.floor(i.top),o=Math.floor(n.bottom),u=Math.floor(i.bottom),a=Math.floor(n.top);return t&&r>o||!t&&u<a?e>=i.left&&e<=i.left+i.width?0:Math.abs(i.left+i.width/2-e):c._shouldWrapFocus(c._activeElement,Hc)?Wc:Rc},Lc(c),En("FocusZone",i,{rootProps:void 0,allowTabKey:"handleTabKey",elementType:"as",ariaDescribedBy:"aria-describedby",ariaLabelledBy:"aria-labelledby"}),c._id=p("FocusZone"),c._focusAlignment={left:0,top:0},c._processingTabKey=!1;var d=null===(r=null!==(e=i.shouldRaiseClicks)&&void 0!==e?e:n.defaultProps.shouldRaiseClicks)||void 0===r||r;return c._shouldRaiseClicksOnEnter=null!==(o=i.shouldRaiseClicksOnEnter)&&void 0!==o?o:d,c._shouldRaiseClicksOnSpace=null!==(a=i.shouldRaiseClicksOnSpace)&&void 0!==a?a:d,c}return(0,o.C6)(n,t),n.getOuterZones=function(){return Yc.size},n._onKeyDownCapture=function(t){9===t.which&&Yc.forEach((function(t){return t._updateTabIndexes()}))},n.prototype.componentDidMount=function(){var t,i=this._root.current;if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),$c[this._id]=this,i){for(var e=b(i,Gc);e&&e!==this._getDocument().body&&1===e.nodeType;){if(V(e)){this._isInnerZone=!0;break}e=b(e,Gc)}this._isInnerZone||(Yc.add(this),this._root.current&&this._root.current.addEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.addEventListener("blur",this._onBlur,!0),this._updateTabIndexes(),this.props.defaultTabbableElement&&"string"==typeof this.props.defaultTabbableElement?this._activeElement=this._getDocument().querySelector(this.props.defaultTabbableElement):this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement)),this.props.shouldFocusOnMount&&this.focus()}},n.prototype.componentDidUpdate=function(){var t,n=this._root.current,i=this._getDocument();if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),(this._activeElement&&!w(this._root.current,this._activeElement,Gc)||this._defaultFocusElement&&!w(this._root.current,this._defaultFocusElement,Gc))&&(this._activeElement=null,this._defaultFocusElement=null,this._updateTabIndexes()),!this.props.preventFocusRestoration&&i&&this._lastIndexPath&&(i.activeElement===i.body||null===i.activeElement||i.activeElement===n)){var e=function(t,n){for(var i=t,e=0,r=n;e<r.length;e++){var o=r[e],u=i.children[Math.min(o,i.children.length-1)];if(!u)break;i=u}return D(i)&&S(i)?i:A(t,i,!0)||k(t,i)}(n,this._lastIndexPath);e?(this._setActiveElement(e,!0),e.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},n.prototype.componentWillUnmount=function(){delete $c[this._id],this._isInnerZone||(Yc.delete(this),this._root.current&&this._root.current.removeEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.removeEventListener("blur",this._onBlur,!0),this._activeElement=null,this._defaultFocusElement=null},n.prototype.render=function(){var t=this,n=this.props,i=n.as,e=n.elementType,r=n.rootProps,a=n.ariaDescribedBy,l=n.ariaLabelledBy,s=n.className,c=j(this.props,H),d=i||e||"div";this._evaluateFocusBeforeRender();var f=(0,It.O4)();return u.createElement(d,(0,o.Cl)({"aria-labelledby":l,"aria-describedby":a},c,r,{className:z((Ec||(Ec=(0,q.Z)({selectors:{":focus":{outline:"none"}}},"ms-FocusZone")),Ec),s),ref:this._mergedRef(this.props.elementRef,this._root),"data-focuszone-id":this._id,onKeyDown:function(n){return t._onKeyDown(n,f)},onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},n.prototype.focus=function(t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this._root.current){if(!t&&"true"===this._root.current.getAttribute(Bc)&&this._isInnerZone){var i=this._getOwnerZone(this._root.current);if(i!==this._root.current){var e=$c[i.getAttribute(Pc)];return!!e&&e.focusElement(this._root.current)}return!1}if(!t&&this._activeElement&&w(this._root.current,this._activeElement)&&D(this._activeElement,void 0,this._inShadowRoot)&&(!n||L(this._activeElement)))return this._activeElement.focus(),!0;var r=this._root.current.firstChild;return this.focusElement(A(this._root.current,r,!0,void 0,void 0,void 0,void 0,void 0,n))}return!1},n.prototype.focusLast=function(){if(this._root.current){var t=this._root.current&&this._root.current.lastChild;return this.focusElement(k(this._root.current,t,!0,!0,!0))}return!1},n.prototype.focusElement=function(t,n){var i=this.props,e=i.onBeforeFocus,r=i.shouldReceiveFocus;return!(r&&!r(t)||e&&!e(t)||!t||(this._setActiveElement(t,n),this._activeElement&&this._activeElement.focus(),0))},n.prototype.setFocusAlignment=function(t){this._focusAlignment=t},Object.defineProperty(n.prototype,"defaultFocusElement",{get:function(){return this._defaultFocusElement},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"activeElement",{get:function(){return this._activeElement},enumerable:!1,configurable:!0}),n.prototype._evaluateFocusBeforeRender=function(){var t=this._root.current,n=this._getDocument();if(n){var i=n.activeElement;if(i!==t){var e=w(t,i,!1);this._lastIndexPath=e?function(t,n){for(var i=[];n&&t&&n!==t;){var e=b(n,!0);if(null===e)return[];i.unshift(Array.prototype.indexOf.call(e.children,n)),n=e}return i}(t,i):void 0}}},n.prototype._setParkedFocus=function(t){var n=this._root.current;n&&this._isParked!==t&&(this._isParked=t,t?(this.props.allowFocusRoot||(this._parkedTabIndex=n.getAttribute("tabindex"),n.setAttribute("tabindex","-1")),n.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(n.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):n.removeAttribute("tabindex")))},n.prototype._setActiveElement=function(t,n){var i=this._activeElement;this._activeElement=t,i&&(V(i)&&this._updateTabIndexes(i),i.tabIndex=-1),this._activeElement&&(this._focusAlignment&&!n||this._setFocusAlignment(t,!0,!0),this._activeElement.tabIndex=0)},n.prototype._preventDefaultWhenHandled=function(t){this.props.preventDefaultWhenHandled&&t.preventDefault()},n.prototype._tryInvokeClickForFocusable=function(t,n){var i=t;if(i===this._root.current)return!1;do{if("BUTTON"===i.tagName||"A"===i.tagName||"INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SUMMARY"===i.tagName)return!1;if(this._isImmediateDescendantOfZone(i)&&"true"===i.getAttribute(Bc)&&"true"!==i.getAttribute("data-disable-click-on-enter"))return jc(i,n),!0;i=b(i,Gc)}while(i!==this._root.current);return!1},n.prototype._getFirstInnerZone=function(t){if(!(t=t||this._activeElement||this._root.current))return null;if(V(t))return $c[t.getAttribute(Pc)];for(var n=t.firstElementChild;n;){if(V(n))return $c[n.getAttribute(Pc)];var i=this._getFirstInnerZone(n);if(i)return i;n=n.nextElementSibling}return null},n.prototype._moveFocus=function(t,n,i,e){void 0===e&&(e=!0);var r=this._activeElement,o=-1,u=void 0,a=!1,l=this.props.direction===uc.bidirectional;if(!r||!this._root.current)return!1;if(this._isElementInput(r)&&!this._shouldInputLoseFocus(r,t))return!1;var s=l?r.getBoundingClientRect():null;do{if(r=t?A(this._root.current,r):k(this._root.current,r),!l){u=r;break}if(r){var c=n(s,r.getBoundingClientRect());if(-1===c&&-1===o){u=r;break}if(c>-1&&(-1===o||c<o)&&(o=c,u=r),o>=0&&c<0)break}}while(r);if(u&&u!==this._activeElement)a=!0,this.focusElement(u);else if(this.props.isCircularNavigation&&e)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return a},n.prototype._moveFocusDown=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!0,(function(e,r){var o=-1,u=Math.floor(r.top),a=Math.floor(e.bottom);return u<a?t._shouldWrapFocus(t._activeElement,Hc)?Wc:Rc:((-1===n&&u>=a||u===n)&&(n=u,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusUp=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!1,(function(e,r){var o=-1,u=Math.floor(r.bottom),a=Math.floor(r.top),l=Math.floor(e.top);return u>l?t._shouldWrapFocus(t._activeElement,Hc)?Wc:Rc:((-1===n&&u<=l||a===n)&&(n=a,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusLeft=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,Ic);return!!this._moveFocus((0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)):parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)))&&r.right<=e.right&&n.props.direction!==uc.vertical?o=e.right-r.right:i||(o=Rc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusRight=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,Ic);return!!this._moveFocus(!(0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)):parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)))&&r.left>=e.left&&n.props.direction!==uc.vertical?o=r.left-e.left:i||(o=Rc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusPaging=function(t,n){void 0===n&&(n=!0);var i=this._activeElement;if(!i||!this._root.current)return!1;if(this._isElementInput(i)&&!this._shouldInputLoseFocus(i,t))return!1;var e=K(i);if(!e)return!1;var r=-1,o=void 0,u=-1,a=-1,l=e.clientHeight,s=i.getBoundingClientRect();do{if(i=t?A(this._root.current,i):k(this._root.current,i)){var c=i.getBoundingClientRect(),d=Math.floor(c.top),f=Math.floor(s.bottom),v=Math.floor(c.bottom),h=Math.floor(s.top),p=this._getHorizontalDistanceFromCenter(t,s,c);if(t&&d>f+l||!t&&v<h-l)break;p>-1&&(t&&d>u?(u=d,r=p,o=i):!t&&v<a?(a=v,r=p,o=i):(-1===r||p<=r)&&(r=p,o=i))}}while(i);var g=!1;if(o&&o!==this._activeElement)g=!0,this.focusElement(o),this._setFocusAlignment(o,!1,!0);else if(this.props.isCircularNavigation&&n)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return g},n.prototype._setFocusAlignment=function(t,n,i){if(this.props.direction===uc.bidirectional&&(!this._focusAlignment||n||i)){var e=t.getBoundingClientRect(),r=e.left+e.width/2,o=e.top+e.height/2;this._focusAlignment||(this._focusAlignment={left:r,top:o}),n&&(this._focusAlignment.left=r),i&&(this._focusAlignment.top=o)}},n.prototype._isImmediateDescendantOfZone=function(t){return this._getOwnerZone(t)===this._root.current},n.prototype._getOwnerZone=function(t){for(var n=b(t,Gc);n&&n!==this._root.current&&n!==this._getDocument().body;){if(V(n))return n;n=b(n,Gc)}return n},n.prototype._updateTabIndexes=function(t){!this._activeElement&&this.props.defaultTabbableElement&&"function"==typeof this.props.defaultTabbableElement&&(this._activeElement=this.props.defaultTabbableElement(this._root.current)),!t&&this._root.current&&(this._defaultFocusElement=null,t=this._root.current,this._activeElement&&!w(t,this._activeElement)&&(this._activeElement=null)),this._activeElement&&!D(this._activeElement,void 0,this._inShadowRoot)&&(this._activeElement=null);for(var n=t&&t.children,i=0;n&&i<n.length;i++){var e=n[i];V(e)?"true"===e.getAttribute(Bc)&&(this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(_c)&&e.setAttribute(_c,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(_c)&&e.setAttribute(_c,"0"))):(e.getAttribute&&"false"===e.getAttribute(Bc)&&e.setAttribute(_c,"-1"),D(e,void 0,this._inShadowRoot)?this.props.disabled?e.setAttribute(_c,"-1"):this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(_c)&&e.setAttribute(_c,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(_c)&&e.setAttribute(_c,"0")):"svg"===e.tagName&&"false"!==e.getAttribute("focusable")&&e.setAttribute("focusable","false")),this._updateTabIndexes(e)}},n.prototype._isContentEditableElement=function(t){return t&&"true"===t.getAttribute("contenteditable")},n.prototype._isElementInput=function(t){return!(!t||!t.tagName||"input"!==t.tagName.toLowerCase()&&"textarea"!==t.tagName.toLowerCase())},n.prototype._shouldInputLoseFocus=function(t,n){if(!this._processingTabKey&&t&&t.type&&Xc.indexOf(t.type.toLowerCase())>-1){var i=t.selectionStart,e=i!==t.selectionEnd,r=t.value,o=t.readOnly;if(e||i>0&&!n&&!o||i!==r.length&&n&&!o||this.props.handleTabKey&&(!this.props.shouldInputLoseFocusOnArrowKey||!this.props.shouldInputLoseFocusOnArrowKey(t)))return!1}return!0},n.prototype._shouldWrapFocus=function(t,n){return!this.props.checkForNoWrap||function(t,n,i){return"true"!==function(t,n,i){var e=x(t,(function(t){return t.hasAttribute(n)}),i);return e&&e.getAttribute(n)}(t,n,null!=i?i:(0,M.Y)())}(t,n)},n.prototype._portalContainsElement=function(t){return t&&!!this._root.current&&Tc(t,this._root.current)},n.prototype._getDocument=function(){return(0,M.Y)(this._root.current)},n.defaultProps={isCircularNavigation:!1,direction:uc.bidirectional,shouldRaiseClicks:!0,"data-tabster":'{"uncontrolled": {}}'},n.contextType=Fc,n}(u.Component);function qc(t){return function(t){return t.clientWidth<t.scrollWidth}(t)||function(t){return t.clientHeight<t.scrollHeight}(t)}!function(t){t[t.Parent=0]="Parent",t[t.Self=1]="Self"}(zc||(zc={}));var Zc,Kc=(0,a.Z)(),Jc=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onRenderContent=function(t){return"string"==typeof t.content?u.createElement("p",{className:n._classNames.subText},t.content):u.createElement("div",{className:n._classNames.subText},t.content)},n}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.calloutProps,e=t.directionalHint,r=t.directionalHintForRTL,a=t.styles,l=t.id,s=t.maxWidth,c=t.onRenderContent,d=void 0===c?this._onRenderContent:c,f=t.targetElement,v=t.theme;return this._classNames=Kc(a,{theme:v,className:n||i&&i.className,beakWidth:i&&i.isBeakVisible?i.beakWidth:0,gapSpace:i&&i.gapSpace,maxWidth:s}),u.createElement($n,(0,o.Cl)({target:f,directionalHint:e,directionalHintForRTL:r},i,j(this.props,R,["id"]),{className:this._classNames.root}),u.createElement("div",{className:this._classNames.content,id:l,onFocus:this.props.onFocus,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},d(this.props,this._onRenderContent)))},n.defaultProps={directionalHint:1,maxWidth:"364px",calloutProps:{isBeakVisible:!0,beakWidth:16,gapSpace:0,setInitialFocus:!0,doNotLayer:!1}},n}(u.Component),Qc=(0,r.I)(Jc,(function(t){var n=t.className,i=t.beakWidth,e=void 0===i?16:i,r=t.gapSpace,o=void 0===r?0:r,u=t.maxWidth,a=t.theme,l=a.semanticColors,s=a.fonts,c=a.effects,d=-(Math.sqrt(e*e/2)+o)+1/window.devicePixelRatio;return{root:["ms-Tooltip",a.fonts.medium,It.lw.fadeIn200,{background:l.menuBackground,boxShadow:c.elevation8,padding:"8px",maxWidth:u,selectors:{":after":{content:"''",position:"absolute",bottom:d,left:d,right:d,top:d,zIndex:0}}},n],content:["ms-Tooltip-content",s.small,{position:"relative",zIndex:1,color:l.menuItemText,wordWrap:"break-word",overflowWrap:"break-word",overflow:"hidden"}],subText:["ms-Tooltip-subtext",{fontSize:"inherit",fontWeight:"inherit",color:"inherit",margin:0}]}}),void 0,{scope:"Tooltip"});!function(t){t[t.zero=0]="zero",t[t.medium=1]="medium",t[t.long=2]="long"}(Zc||(Zc={}));var td,nd,id=(0,a.Z)(),ed=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._defaultTooltipId=p("tooltip"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._getTargetElement=function(){if(e._tooltipHost.current){var t=e.props.overflowMode;if(void 0!==t)switch(t){case zc.Parent:return e._tooltipHost.current.parentElement;case zc.Self:return e._tooltipHost.current}return e._tooltipHost.current}},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipContentFocus=function(t){n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e._clearDismissTimer(),e._clearOpenTimer()},e._onTooltipBlur=function(t){var n;e._ignoreNextFocusEvent=(null===(n=zt(e.context))||void 0===n?void 0:n.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props,r=i.overflowMode,o=i.delay,u=zt(e.context);if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,void 0!==r){var a=e._getTargetElement();if(a&&!qc(a))return}if(!t.target||!Tc(t.target,e._getTargetElement(),u))if(e._clearDismissTimer(),e._clearOpenTimer(),o!==Zc.zero){var l=e._getDelayTime(o);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),l)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Vt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t},(function(){return e.props.onTooltipToggle&&e.props.onTooltipToggle(t)}))},e._getDelayTime=function(t){switch(t){case Zc.medium:return 300;case Zc.long:return 500;default:return 0}},Lc(e),e.state={isAriaPlaceholderRendered:!1,isTooltipVisible:!1},e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.calloutProps,i=t.children,e=t.content,r=t.directionalHint,a=t.directionalHintForRTL,l=t.hostClassName,s=t.id,c=t.setAriaDescribedBy,d=void 0===c||c,f=t.tooltipProps,v=t.styles,h=t.theme;this._classNames=id(v,{theme:h,className:l});var p=this.state.isTooltipVisible,g=s||this._defaultTooltipId,y=(0,o.Cl)((0,o.Cl)({id:"".concat(g,"--tooltip"),content:e,targetElement:this._getTargetElement(),directionalHint:r,directionalHintForRTL:a,calloutProps:$({},n,{onDismiss:this._hideTooltip,onFocus:this._onTooltipContentFocus,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave}),onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},j(this.props,R,["id"])),f),m=(null==f?void 0:f.onRenderContent)?f.onRenderContent(y,(function(t){return(null==t?void 0:t.content)?u.createElement(u.Fragment,null,t.content):null})):e,b=p&&!!m,x=d&&p&&m?g:void 0;return u.createElement("div",{className:this._classNames.root,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,role:"none","aria-describedby":x},i,b&&u.createElement(Qc,(0,o.Cl)({},y)),u.createElement("div",{hidden:!0,id:g,style:It.dX},m))},n.prototype.componentDidMount=function(){this._async=new Nt(this)},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:Zc.medium},n.contextType=Ft,n}(u.Component),rd={root:"ms-TooltipHost",ariaPlaceholder:"ms-TooltipHost-aria-placeholder"},od=(0,r.I)(ed,(function(t){var n=t.className,i=t.theme;return{root:[(0,It.Km)(rd,i).root,{display:"inline"},n]}}),void 0,{scope:"TooltipHost"}),ud=function(t){function n(n){var i=t.call(this,n)||this;return i._tooltipChild=u.createRef(),i._checkTextOverflow=function(){var t=i._getTargetElement(),n=!!t&&qc(t);n!==i.state.textOverflow&&i.setState({textOverflow:n})},i._getTargetElement=function(){if(i._tooltipChild.current&&i._tooltipChild.current.parentElement)return i._tooltipChild.current.parentElement},i.state={textOverflow:!1},i._async=new Nt(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.content,e=t.accessibilityData;return u.createElement(od,{overflowMode:zc.Self,hostClassName:n,content:i},u.createElement("span",(0,o.Cl)({},zs(e),{ref:this._tooltipChild,"data-is-focusable":this.state.textOverflow}),i))},n.prototype.componentDidMount=function(){var t=this._getTargetElement();window.ResizeObserver&&t&&(this._resizeObserver=new ResizeObserver(this._async.debounce(this._checkTextOverflow,500)),this._resizeObserver.observe(t))},n.prototype.componentWillUnmount=function(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this._async.dispose()},n}(u.Component),ad=(0,a.Z)(),ld=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.state.isCalloutVisible&&i.setState({isCalloutVisible:!1,hoverValue:"",refSelected:null,lineColor:"",legend:""})},i._adjustProps=function(){i._barHeight=i.props.barHeight||12,i._classNames=ad(i.props.styles,{theme:i.props.theme,width:i.props.width,className:i.props.className,barHeight:i._barHeight,color:i.state.lineColor,variant:i.props.variant,hideLabels:i.props.hideLabels})},i._getChartDataText=function(t){return i.props.barChartCustomData?u.createElement("div",{role:"text"},i.props.barChartCustomData(t)):i._getDefaultTextData(t)},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.data,r=t.yAxisCalloutData||(t.horizontalBarChartdata?"".concat(t.horizontalBarChartdata.x,"/").concat(t.horizontalBarChartdata.y):0);return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):"")+"".concat(r,".")+(e?"with benchmark at "+"".concat(e,", "):"")},i.state={isCalloutVisible:!1,hoverValue:"",lineColor:"",legend:"",refSelected:null,color:"",xCalloutValue:"",yCalloutValue:"",barSpacingInPercent:0},i._refArray=[],i._uniqLineText="_HorizontalLine_"+Math.random().toString(36).substring(7),i._hoverOff=i._hoverOff.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_HBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.theme;this._adjustProps();var r=e.palette,a=0;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},i.map((function(n,i){a=n.chartData&&n.chartData[0]&&n.chartData[0].horizontalBarChartdata.x?n.chartData[0].horizontalBarChartdata.x:0,n.chartData[1]={legend:"",horizontalBarChartdata:{x:n.chartData[0].horizontalBarChartdata.y-a,y:n.chartData[0].horizontalBarChartdata.y},color:r.neutralLight};var e=t.props.variant===v.AbsoluteScale?null:t._getChartDataText(n),o=t._createBars(n,r,i),l=t._uniqLineText+"_"+i,s=ad(t.props.styles,{theme:t.props.theme,width:t.props.width,showTriangle:!!n.chartData[0].data,variant:t.props.variant});return u.createElement("div",{key:i},u.createElement("div",{className:s.items},u.createElement(Uc,{direction:uc.horizontal},u.createElement("div",{className:t._classNames.chartTitle},n.chartTitle&&u.createElement(ud,{className:t._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),e)),n.chartData[0].data&&t._createBenchmark(n),u.createElement(Uc,{direction:uc.horizontal,className:t._classNames.chartWrapper},u.createElement("svg",{ref:t.barChartSvgRef,className:t._classNames.chart,"aria-label":n.chartTitle},u.createElement("g",{id:l,key:l,ref:function(i){t._refCallback(i,n.chartData[0].legend)},onClick:function(){var t=n.chartData[0];t&&t.onClick&&t.onClick()}},o)))))})),u.createElement($n,(0,o.Cl)({target:this.state.refSelected,coverTarget:!0,isBeakVisible:!1,gapSpace:30,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps,zs(this.state.callOutAccessibilityData)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerHorizontalBar?this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps):u.createElement(yc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.hoverValue,color:this.state.lineColor,culture:this.props.culture}))))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._hoverOn=function(t,n){var i,e,r,o;if((!this.state.isCalloutVisible||this.state.legend!==n.legend)&&this._calloutAnchorPoint!==n){var u=m(this._refArray,(function(t){return t.index===n.legend}));this._calloutAnchorPoint=n;var a=n.color;if(this.props.enableGradient){var l=Math.max((null===(e=null===(i=this.props.data)||void 0===i?void 0:i.map((function(t){return t.chartData})))||void 0===e?void 0:e.findIndex((function(t){return(null==t?void 0:t[0].data)===n.data&&(null==t?void 0:t[0].legend)===n.legend})))||0,0);a=(null===(r=n.gradient)||void 0===r?void 0:r[0])||kc(l,0,null===(o=this.props.theme)||void 0===o?void 0:o.isInverted)[0]}this.setState({isCalloutVisible:!0,hoverValue:t,lineColor:a,legend:n.legend,refSelected:u.refElement,xCalloutValue:n.xAxisCalloutData,yCalloutValue:n.yAxisCalloutData,barCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._hoverOff=function(){},n.prototype._getDefaultTextData=function(t){var n=this.props.culture,i=this.props.chartDataMode||"default",e=t.chartData[0],r=e.horizontalBarChartdata.x,a=e.horizontalBarChartdata.y,l=zs(t.chartDataAccessibilityData,"text",!1);switch(i){case"default":return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),(0,Yn.c$)(r,n));case"fraction":return u.createElement("div",(0,o.Cl)({},l),u.createElement("span",{className:this._classNames.chartTitleRight},(0,Yn.c$)(r,n)),u.createElement("span",{className:this._classNames.chartDataTextDenominator}," / "+(0,Yn.c$)(a,n)));case"percentage":var s="".concat((0,Yn.c$)(Math.round(r/a*100),n),"%");return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),s)}},n.prototype._createBenchmark=function(t){var n=t.chartData[0].horizontalBarChartdata.y,i=t.chartData[0].data,e={left:"calc("+Math.round((i||0)/n*100)+"% - 4px)"};return u.createElement("div",{className:this._classNames.benchmarkContainer},u.createElement("div",{className:this._classNames.triangle,style:e}))},n.prototype._createBars=function(t,n,i){var e,r=this,o=(null===(e=t.chartData)||void 0===e?void 0:e.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,a=this.state.barSpacingInPercent*(o-1),l=[n.blueLight,n.blue,n.blueMid,n.red,n.black],s=[],c=t.chartData.reduce((function(t,n){return t+(n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0)}),0),d=0,f=0,h=0;t.chartData.map((function(t,n){var i=t.horizontalBarChartdata.x?t.horizontalBarChartdata.x:0;return(f=i/c*100)<0?f=0:f<1&&0!==f&&(f=1),h+=f}));var g=0!==h?(h-a)/100:1,y=t.chartData.map((function(n,e){var o,a,h,y,m=n.color?n.color:l[Math.floor(4*Math.random()+1)],b=m;r.props.enableGradient&&1!==e&&(m=(null===(o=n.gradient)||void 0===o?void 0:o[0])||kc(i,0,null===(a=r.props.theme)||void 0===a?void 0:a.isInverted)[0],b=(null===(h=n.gradient)||void 0===h?void 0:h[1])||kc(i,0,null===(y=r.props.theme)||void 0===y?void 0:y.isInverted)[1]);var x=n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0;e>0&&(d+=f),(f=x/c*100)<0?f=0:f<1&&0!==f?f=1/g:f/=g,s.push(d);var w=n.horizontalBarChartdata.x;if(1===e&&r.props.variant===v.AbsoluteScale){if(r.props.hideLabels)return u.createElement("text",{key:e});var M=t.chartData[0].horizontalBarChartdata.x;return u.createElement("text",{key:e,x:"".concat(r._isRTL?100-s[e]:s[e],"%"),y:r._barHeight/2,dominantBaseline:"central",transform:"translate(".concat(r._isRTL?-4:4,")"),className:r._classNames.barLabel,"aria-hidden":!0},$s(M))}var C=p("HBC_Gradient")+"_".concat(i,"_").concat(e);return u.createElement(u.Fragment,{key:e},r.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:C},u.createElement("stop",{offset:"0",stopColor:m}),u.createElement("stop",{offset:"100%",stopColor:b}))),u.createElement("rect",{key:e,x:"".concat(r._isRTL?100-s[e]-f-e*r.state.barSpacingInPercent:s[e]+e*r.state.barSpacingInPercent,"%"),y:0,rx:r.props.roundCorners?3:0,"data-is-focusable":""!==n.legend,width:f+"%",height:r._barHeight,fill:r.props.enableGradient?"url(#".concat(C,")"):m,onMouseOver:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,onFocus:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,role:"img","aria-label":r._getAriaLabel(n),onBlur:r._hoverOff,onMouseLeave:r._hoverOff,className:r._classNames.barWrapper}))}));return y},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n}(u.Component),sd=(0,r.I)(ld,(function(t){var n,i=t.className,e=t.theme,r=t.width,u=t.barHeight,a=t.showTriangle,l=t.variant,s=t.hideLabels,c=e.palette;return{root:[{display:"flex",flexDirection:"column",width:r||"100%"},i],items:{marginBottom:a||l===v.AbsoluteScale?"16px":"10px"},chart:{width:"100%",height:u||12,display:"block",overflow:"visible"},barWrapper:{},chartTitle:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:e.palette.neutralPrimary,marginBottom:l===v.AbsoluteScale?"4px":"5px"},chartTitleRight:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:e.palette.neutralPrimary},chartDataTextDenominator:{fontSize:It.s.medium,color:e.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},triangle:{width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c.blue,marginBottom:"4px",position:"absolute"},barLabel:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{fontWeight:It.BO.semibold,fill:e.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}),chartWrapper:{paddingRight:l!==v.AbsoluteScale||s?0:40}}})),cd={host:"ms-HoverCard-host"},dd=function(){function t(n){this._id=t._uniqueId++,this._parent=n,this._eventRecords=[]}return t.raise=function(n,i,e,r,o){var u,a=null!=o?o:(0,M.Y)();if(t._isElement(n)){if(void 0!==a&&a.createEvent){var l=a.createEvent("HTMLEvents");l.initEvent(i,r||!1,!0),$(l,e),u=n.dispatchEvent(l)}else if(void 0!==a&&a.createEventObject){var s=a.createEventObject(e);n.fireEvent("on"+i,s)}}else for(;n&&!1!==u;){var c=n.__events__,d=c?c[i]:null;if(d)for(var f in d)if(d.hasOwnProperty(f))for(var v=d[f],h=0;!1!==u&&h<v.length;h++){var p=v[h];p.objectCallback&&(u=p.objectCallback.call(p.parent,e))}n=r?n.parent:null}return u},t.isObserved=function(t,n){var i=t&&t.__events__;return!!i&&!!i[n]},t.isDeclared=function(t,n){var i=t&&t.__declaredEvents;return!!i&&!!i[n]},t.stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},t._isElement=function(t){return!!t&&(!!t.addEventListener||"undefined"!=typeof HTMLElement&&t instanceof HTMLElement)},t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.off(),this._parent=null)},t.prototype.onAll=function(t,n,i){for(var e in n)n.hasOwnProperty(e)&&this.on(t,e,n[e],i)},t.prototype.on=function(n,i,e,r){var o=this;if(i.indexOf(",")>-1)for(var u=i.split(/[ ,]+/),a=0;a<u.length;a++)this.on(n,u[a],e,r);else{var l=this._parent,s={target:n,eventName:i,parent:l,callback:e,options:r};if((u=n.__events__=n.__events__||{})[i]=u[i]||{count:0},u[i][this._id]=u[i][this._id]||[],u[i][this._id].push(s),u[i].count++,t._isElement(n)){var c=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed){var i;try{if(!1===(i=e.apply(l,t))&&t[0]){var r=t[0];r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.cancelBubble=!0}}catch(r){}return i}};s.elementCallback=c,n.addEventListener?n.addEventListener(i,c,r):n.attachEvent&&n.attachEvent("on"+i,c)}else s.objectCallback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed)return e.apply(l,t)};this._eventRecords.push(s)}},t.prototype.off=function(t,n,i,e){for(var r=0;r<this._eventRecords.length;r++){var o=this._eventRecords[r];if(!(t&&t!==o.target||n&&n!==o.eventName||i&&i!==o.callback||"boolean"==typeof e&&e!==o.options)){var u=o.target.__events__,a=u[o.eventName],l=a?a[this._id]:null;l&&(1!==l.length&&i?(a.count--,l.splice(l.indexOf(o),1)):(a.count-=l.length,delete u[o.eventName][this._id]),a.count||delete u[o.eventName]),o.elementCallback&&(o.target.removeEventListener?o.target.removeEventListener(o.eventName,o.elementCallback,o.options):o.target.detachEvent&&o.target.detachEvent("on"+o.eventName,o.elementCallback)),this._eventRecords.splice(r--,1)}}},t.prototype.raise=function(n,i,e){return t.raise(this._parent,n,i,e)},t.prototype.declare=function(t){var n=this._parent.__declaredEvents=this._parent.__declaredEvents||{};if("string"==typeof t)n[t]=!0;else for(var i=0;i<t.length;i++)n[t[i]]=!0},t._uniqueId=0,t}();!function(t){t[t.hover=0]="hover",t[t.hotKey=1]="hotKey"}(td||(td={})),function(t){t.plain="PlainCard",t.expanding="ExpandingCard"}(nd||(nd={}));var fd,vd={root:"ms-ExpandingCard-root",compactCard:"ms-ExpandingCard-compactCard",expandedCard:"ms-ExpandingCard-expandedCard",expandedCardScroll:"ms-ExpandingCard-expandedCardScrollRegion"};!function(t){t[t.compact=0]="compact",t[t.expanded=1]="expanded"}(fd||(fd={}));var hd=function(t){for(var n=t.activeElement;null==n?void 0:n.shadowRoot;)n=n.shadowRoot.activeElement;return n},pd=function(t){var n=t.target;return n&&n.shadowRoot&&(n=t.composedPath()[0]),n};function gd(t,n){var i=u.useRef(n);return i.current||(i.current=p(t)),i.current}function yd(t){var n=u.useRef((function(){throw new Error("Cannot call an event handler while rendering")}));return Nn((function(){n.current=t}),[t]),Wt((function(){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return n.current.apply(void 0,t)}}))}var md={disabled:!1,disableFirstFocus:!1,forceFocusInsideTrap:!0,isClickableOutsideFocusTrap:!1,"data-tabster":'{"uncontrolled": {"completely": true}}'},bd=u.forwardRef((function(t,n){var i,e,r,a=u.useRef(null),l=u.useRef(null),s=u.useRef(null),c=Et(a,n),d=Pt(),f=jt(),v=!!u.useContext(Fc),h=null===(i=Bn(!1))||void 0===i||i,p=F(md,t),g=Wt({hasFocus:!1,focusStackId:gd("ftz-",p.id)}),y=p.children,m=p.componentRef,b=p.disabled,x=p.disableFirstFocus,M=p.forceFocusInsideTrap,C=p.focusPreviouslyFocusedInnerElement,S=p.firstFocusableSelector,L=p.firstFocusableTarget,D=p.disableRestoreFocus,V=void 0===D?p.ignoreExternalFocusing:D,N=p.isClickableOutsideFocusTrap,O=p.enableAriaHiddenSiblings,B={"aria-hidden":!0,style:{pointerEvents:"none",position:"fixed"},tabIndex:b?-1:0,"data-is-visible":!0,"data-is-focus-trap-zone-bumper":!0},P=u.useCallback((function(t){t!==l.current&&t!==s.current&&T(t)}),[]),_=yd((function(){if(a.current){var t=g.previouslyFocusedElementInTrapZone;if(C&&t&&w(a.current,t))P(t);else{var n=null;if("string"==typeof L)n=a.current.querySelector(L);else if(L)n=L(a.current);else if(S){var i="string"==typeof S?S:S();n=a.current.querySelector("."+i)}n||(n=A(a.current,a.current.firstChild,!1,!1,!1,!0,void 0,void 0,void 0,v)),n&&P(n)}}})),H=function(t){if(!b&&a.current){var n,i=t===g.hasFocus?(void 0===(n=!1)&&(n=!0),k(a.current,s.current,n,!1,!0,!0,!1,!0,v)):function(t,n,i,e,r){return void 0===e&&(e=!0),A(t,n,e,!1,!1,!0,!1,!0,void 0,r)}(a.current,l.current,0,!1,v);i&&(i===l.current||i===s.current?_():i.focus())}},I=yd((function(t){if(bd.focusStack=bd.focusStack.filter((function(t){return g.focusStackId!==t})),d){var n=d.activeElement;V||"function"!=typeof(null==t?void 0:t.focus)||!w(a.current,n)&&n!==d.body&&!n.shadowRoot||P(t)}})),W=yd((function(t){if(!b&&g.focusStackId===bd.focusStack.slice(-1)[0]){var n=pd(t);n&&!w(a.current,n)&&(d&&hd(d)===d.body?setTimeout((function(){d&&hd(d)===d.body&&(_(),g.hasFocus=!0)}),0):(_(),g.hasFocus=!0),t.preventDefault(),t.stopPropagation())}}));return u.useEffect((function(){var t=[];return M&&t.push(E(f,"focus",W,!0)),N||t.push(E(f,"click",W,!0)),function(){t.forEach((function(t){return t()}))}}),[M,N,f]),u.useEffect((function(){if(!b&&(h||M)&&a.current){bd.focusStack.push(g.focusStackId);var t=p.elementToFocusOnDismiss||hd(d);return x||w(a.current,t)||_(),function(){return I(t)}}}),[M,b]),u.useEffect((function(){if(!b&&O)return Dt(a.current)}),[b,O,a]),e=function(){delete g.previouslyFocusedElementInTrapZone},(r=u.useRef(e)).current=e,u.useEffect((function(){return function(){var t;null===(t=r.current)||void 0===t||t.call(r)}}),[]),function(t,n,i){u.useImperativeHandle(t,(function(){return{get previouslyFocusedElement(){return n},focus:i}}),[i,n])}(m,g.previouslyFocusedElementInTrapZone,_),u.createElement("div",(0,o.Cl)({"aria-labelledby":p.ariaLabelledBy},j(p,R),{ref:c,onFocusCapture:function(t){var n;null===(n=p.onFocusCapture)||void 0===n||n.call(p,t),t.target===l.current?H(!0):t.target===s.current&&H(!1),g.hasFocus=!0,t.target!==t.currentTarget&&t.target!==l.current&&t.target!==s.current&&(g.previouslyFocusedElementInTrapZone=pd(t.nativeEvent))},onBlurCapture:function(t){var n;null===(n=p.onBlurCapture)||void 0===n||n.call(p,t);var i=t.relatedTarget;null===t.relatedTarget&&(i=hd(d)),w(a.current,i)||(g.hasFocus=!1)}}),u.createElement("div",(0,o.Cl)({},B,{ref:l})),y,u.createElement("div",(0,o.Cl)({},B,{ref:s})))}));bd.displayName="FocusTrapZone",bd.focusStack=[];var xd,wd=function(t){return u.createElement($n,(0,o.Cl)({},t),u.createElement(bd,(0,o.Cl)({disabled:t.hidden},t.focusTrapProps),t.children))},Md=function(t){var n=t.gapSpace,i=void 0===n?0:n,e=t.directionalHint,r=void 0===e?4:e,a=t.directionalHintFixed,l=t.targetElement,s=t.firstFocus,c=t.trapFocus,d=t.onLeave,f=t.className,v=t.finalHeight,h=t.content,p=t.calloutProps,g=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},j(t,R)),{className:f,target:l,isBeakVisible:!1,directionalHint:r,directionalHintFixed:a,finalHeight:v,minPagePadding:24,onDismiss:d,gapSpace:i}),p);return u.createElement(u.Fragment,null,c?u.createElement(wd,(0,o.Cl)({},g,{focusTrapProps:{forceFocusInsideTrap:!1,isClickableOutsideFocusTrap:!0,disableFirstFocus:!s}}),h):u.createElement($n,(0,o.Cl)({},g),h))},Cd=(0,a.Z)(),kd=function(t){function n(n){var i=t.call(this,n)||this;return i._expandedElem=u.createRef(),i._onKeyDown=function(t){t.which===Vt&&i.props.onLeave&&i.props.onLeave(t)},i._onRenderCompactCard=function(){return u.createElement("div",{className:i._classNames.compactCard},i.props.onRenderCompactCard(i.props.renderData))},i._onRenderExpandedCard=function(){return!i.state.firstFrameRendered&&i._async.requestAnimationFrame((function(){i.setState({firstFrameRendered:!0})})),u.createElement("div",{className:i._classNames.expandedCard,ref:i._expandedElem},u.createElement("div",{className:i._classNames.expandedCardScroll},i.props.onRenderExpandedCard&&i.props.onRenderExpandedCard(i.props.renderData)))},i._checkNeedsScroll=function(){var t=i.props.expandedCardHeight;i._async.requestAnimationFrame((function(){i._expandedElem.current&&i._expandedElem.current.scrollHeight>=t&&i.setState({needsScroll:!0})}))},i._async=new Nt(i),Lc(i),i.state={firstFrameRendered:!1,needsScroll:!1},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._checkNeedsScroll()},n.prototype.componentWillUnmount=function(){this._async.dispose()},n.prototype.render=function(){var t=this.props,n=t.styles,i=t.compactCardHeight,e=t.expandedCardHeight,r=t.theme,a=t.mode,l=t.className,s=this.state,c=s.needsScroll,d=s.firstFrameRendered,f=i+e;this._classNames=Cd(n,{theme:r,compactCardHeight:i,className:l,expandedCardHeight:e,needsScroll:c,expandedCardFirstFrameRendered:a===fd.expanded&&d});var v=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this._onRenderCompactCard(),this._onRenderExpandedCard());return u.createElement(Md,(0,o.Cl)({},this.props,{content:v,finalHeight:f,className:this._classNames.root}))},n.defaultProps={compactCardHeight:156,expandedCardHeight:384,directionalHintFixed:!0},n}(u.Component),Ad=(0,r.I)(kd,(function(t){var n,i=t.theme,e=t.needsScroll,r=t.expandedCardFirstFrameRendered,o=t.compactCardHeight,u=t.expandedCardHeight,a=t.className,l=i.palette,s=(0,It.Km)(vd,i);return{root:[s.root,{width:320,pointerEvents:"none",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},a],compactCard:[s.compactCard,{pointerEvents:"auto",position:"relative",height:o}],expandedCard:[s.expandedCard,{height:1,overflowY:"hidden",pointerEvents:"auto",transition:"height 0.467s cubic-bezier(0.5, 0, 0, 1)",selectors:{":before":{content:'""',position:"relative",display:"block",top:0,left:24,width:272,height:1,backgroundColor:l.neutralLighter}}},r&&{height:u}],expandedCardScroll:[s.expandedCardScroll,e&&{height:"100%",boxSizing:"border-box",overflowY:"auto"}]}}),void 0,{scope:"ExpandingCard"}),Sd={root:"ms-PlainCard-root"},Ld=(0,a.Z)(),Dd=function(t){function n(n){var i=t.call(this,n)||this;return i._onKeyDown=function(t){t.which===Vt&&i.props.onLeave&&i.props.onLeave(t)},Lc(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.styles,i=t.theme,e=t.className;this._classNames=Ld(n,{theme:i,className:e});var r=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this.props.onRenderPlainCard(this.props.renderData));return u.createElement(Md,(0,o.Cl)({},this.props,{content:r,className:this._classNames.root}))},n}(u.Component),Vd=(0,r.I)(Dd,(function(t){var n,i=t.theme,e=t.className;return{root:[(0,It.Km)(Sd,i).root,{pointerEvents:"auto",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},e]}}),void 0,{scope:"PlainCard"}),Nd=(0,a.Z)(),Od=function(t){function n(n){var i=t.call(this,n)||this;return i._hoverCard=u.createRef(),i.dismiss=function(t){i._async.clearTimeout(i._openTimerId),i._async.clearTimeout(i._dismissTimerId),t?i._dismissTimerId=i._async.setTimeout((function(){i._setDismissedState()}),i.props.cardDismissDelay):i._setDismissedState()},i._cardOpen=function(t){i._shouldBlockHoverCard()||"keydown"===t.type&&t.which!==i.props.openHotKey||(i._async.clearTimeout(i._dismissTimerId),"mouseenter"===t.type&&(i._currentMouseTarget=t.currentTarget),i._executeCardOpen(t))},i._executeCardOpen=function(t){i._async.clearTimeout(i._openTimerId),i._openTimerId=i._async.setTimeout((function(){i.setState((function(n){return n.isHoverCardVisible?n:{isHoverCardVisible:!0,mode:fd.compact,openMode:"keydown"===t.type?td.hotKey:td.hover}}))}),i.props.cardOpenDelay)},i._cardDismiss=function(t,n){if(t){if(!(n instanceof MouseEvent))return;if("keydown"===n.type&&n.which!==Vt)return;i.props.sticky||i._currentMouseTarget!==n.currentTarget&&n.which!==Vt||i.dismiss(!0)}else{if(i.props.sticky&&!(n instanceof MouseEvent)&&n.nativeEvent instanceof MouseEvent&&"mouseleave"===n.type)return;i.dismiss(!0)}},i._setDismissedState=function(){i.setState({isHoverCardVisible:!1,mode:fd.compact,openMode:td.hover})},i._instantOpenAsExpanded=function(t){i._async.clearTimeout(i._dismissTimerId),i.setState((function(t){return t.isHoverCardVisible?t:{isHoverCardVisible:!0,mode:fd.expanded}}))},i._setEventListeners=function(){var t=i.props,n=t.trapFocus,e=t.instantOpenOnClick,r=t.eventListenerTarget,o=r?i._getTargetElement(r):i._getTargetElement(i.props.target),u=i._nativeDismissEvent;o&&(i._events.on(o,"mouseenter",i._cardOpen),i._events.on(o,"mouseleave",u),n?i._events.on(o,"keydown",i._cardOpen):(i._events.on(o,"focus",i._cardOpen),i._events.on(o,"blur",u)),e?i._events.on(o,"click",i._instantOpenAsExpanded):(i._events.on(o,"mousedown",u),i._events.on(o,"keydown",u)))},Lc(i),i._async=new Nt(i),i._events=new dd(i),i._nativeDismissEvent=i._cardDismiss.bind(i,!0),i._childDismissEvent=i._cardDismiss.bind(i,!1),i.state={isHoverCardVisible:!1,mode:fd.compact,openMode:td.hover},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._setEventListeners()},n.prototype.componentWillUnmount=function(){this._async.dispose(),this._events.dispose()},n.prototype.componentDidUpdate=function(t,n){var i=this;t.target!==this.props.target&&(this._events.off(),this._setEventListeners()),n.isHoverCardVisible!==this.state.isHoverCardVisible&&(this.state.isHoverCardVisible?(this._async.setTimeout((function(){i.setState({mode:fd.expanded},(function(){i.props.onCardExpand&&i.props.onCardExpand()}))}),this.props.expandedCardOpenDelay),this.props.onCardVisible&&this.props.onCardVisible()):(this.setState({mode:fd.compact}),this.props.onCardHide&&this.props.onCardHide()))},n.prototype.render=function(){var t=this.props,n=t.expandingCardProps,i=t.children,e=t.id,r=t.setAriaDescribedBy,a=void 0===r||r,l=t.styles,s=t.theme,c=t.className,d=t.type,f=t.plainCardProps,v=t.trapFocus,h=t.setInitialFocus,g=this.state,y=g.isHoverCardVisible,m=g.mode,b=g.openMode,x=e||p("hoverCard");this._classNames=Nd(l,{theme:s,className:c});var w=(0,o.Cl)((0,o.Cl)({},j(this.props,R)),{id:x,trapFocus:!!v,firstFocus:h||b===td.hotKey,targetElement:this._getTargetElement(this.props.target),onEnter:this._cardOpen,onLeave:this._childDismissEvent}),M=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),w),{mode:m}),C=(0,o.Cl)((0,o.Cl)({},f),w);return u.createElement("div",{className:this._classNames.host,ref:this._hoverCard,"aria-describedby":a&&y?x:void 0,"data-is-focusable":!this.props.target},i,y&&(d===nd.expanding?u.createElement(Ad,(0,o.Cl)({},M)):u.createElement(Vd,(0,o.Cl)({},C))))},n.prototype._getTargetElement=function(t){switch(typeof t){case"string":return(0,M.Y)().querySelector(t);case"object":return t;default:return this._hoverCard.current||void 0}},n.prototype._shouldBlockHoverCard=function(){return!(!this.props.shouldBlockHoverCard||!this.props.shouldBlockHoverCard())},n.defaultProps={cardOpenDelay:500,cardDismissDelay:100,expandedCardOpenDelay:1500,instantOpenOnClick:!1,setInitialFocus:!1,openHotKey:67,type:nd.expanding},n}(u.Component),Td=(0,r.I)(Od,(function(t){var n=t.className,i=t.theme;return{host:[(0,It.Km)(cd,i).host,n]}}),void 0,{scope:"HoverCard"});!function(t){t[t.horizontal=0]="horizontal",t[t.vertical=1]="vertical"}(xd||(xd={}));var Ed=function(t){var n;void 0===t&&(n={},t={getCachedMeasurement:function(t){if(t&&t.cacheKey&&n.hasOwnProperty(t.cacheKey))return n[t.cacheKey]},addMeasurementToCache:function(t,i){t.cacheKey&&(n[t.cacheKey]=i)}});var i,e=t;function r(t,n){var i=e.getCachedMeasurement(t);if(void 0!==i)return i;var r=n();return e.addMeasurementToCache(t,r),r}function u(t,n,o){for(var u=t,a=r(t,o);a>i;){var l=n(u);if(void 0===l)return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(a=e.getCachedMeasurement(l)))return{dataToMeasure:l,resizeDirection:"shrink"};u=l}return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0}}return{getNextState:function(t,n,a,l){if(void 0!==l||void 0!==n.dataToMeasure){if(l){if(i&&n.renderedData&&!n.dataToMeasure)return(0,o.Cl)((0,o.Cl)({},n),function(t,n,e,r){var u;return u=t>i?r?{resizeDirection:"grow",dataToMeasure:r(e)}:{resizeDirection:"shrink",dataToMeasure:n}:{resizeDirection:"shrink",dataToMeasure:e},i=t,(0,o.Cl)((0,o.Cl)({},u),{measureContainer:!1})}(l,t.data,n.renderedData,t.onGrowData));i=l}var s=(0,o.Cl)((0,o.Cl)({},n),{measureContainer:!1});return n.dataToMeasure&&(s="grow"===n.resizeDirection&&t.onGrowData?(0,o.Cl)((0,o.Cl)({},s),function(t,n,a,l){for(var s=t,c=r(t,a);c<i;){var d=n(s);if(void 0===d)return{renderedData:s,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(c=e.getCachedMeasurement(d)))return{dataToMeasure:d};s=d}return(0,o.Cl)({resizeDirection:"shrink"},u(s,l,a))}(n.dataToMeasure,t.onGrowData,a,t.onReduceData)):(0,o.Cl)((0,o.Cl)({},s),u(n.dataToMeasure,t.onReduceData,a))),s}},shouldRenderDataForMeasurement:function(t){return!(!t||void 0!==e.getCachedMeasurement(t))},getInitialResizeGroupState:function(t){return{dataToMeasure:(0,o.Cl)({},t),resizeDirection:"grow",measureContainer:!0}}}},Fd=u.createContext({isMeasured:!1}),Bd={position:"fixed",visibility:"hidden"},Pd={position:"relative"};function _d(t,n){var i;switch(n.type){case"resizeData":return(0,o.Cl)({},n.value);case"dataToMeasure":return(0,o.Cl)((0,o.Cl)({},t),{dataToMeasure:n.value,resizeDirection:"grow",measureContainer:!0});default:return(0,o.Cl)((0,o.Cl)({},t),((i={})[n.type]=n.value,i))}}var Hd={isMeasured:!0},Id=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n),r=function(t,n){var i=Wt(Ed),e=u.useRef(null),r=u.useRef(null),a=u.useRef(!1),l=Ot(),s=function(t,n,i){var e=Wt((function(){return n.getInitialResizeGroupState(t.data)})),r=u.useReducer(_d,e),a=r[0],l=r[1];u.useEffect((function(){l({type:"dataToMeasure",value:t.data})}),[t.data]);var s=u.useRef(e);return s.current=(0,o.Cl)({},a),[s,u.useCallback((function(t){t&&l({type:"resizeData",value:t})}),[]),u.useCallback((function(){i.current&&l({type:"measureContainer",value:!0})}),[i])]}(t,i,n),c=s[0],d=s[1],f=s[2];u.useEffect((function(){var n;c.current.renderedData&&(a.current=!0,null===(n=t.dataDidRender)||void 0===n||n.call(t,c.current.renderedData))})),u.useEffect((function(){l.requestAnimationFrame((function(){var o=void 0;if(c.current.measureContainer&&n.current){var u=n.current.getBoundingClientRect();o=t.direction===xd.vertical?u.height:u.width}var l=i.getNextState(t,c.current,(function(){var n=a.current?r:e;if(!n.current)return 0;var i=n.current.getBoundingClientRect();return t.direction===xd.vertical?i.height:i.width}),o);d(l)}),n.current)})),Tt(Bt(),"resize",l.debounce(f,16,{leading:!0}));var v=i.shouldRenderDataForMeasurement(c.current.dataToMeasure),h=!a.current&&v;return[c.current.dataToMeasure,c.current.renderedData,f,e,r,v,h]}(t,i),a=r[0],l=r[1],s=r[2],c=r[3],d=r[4],f=r[5],v=r[6];u.useImperativeHandle(t.componentRef,(function(){return{remeasure:s}}),[s]),function(t){_n({name:"ResizeGroup",props:t,deprecations:{styles:"className"}})}(t);var h=t.className,p=t.onRenderData,g=j(t,R,["data"]);return u.createElement("div",(0,o.Cl)({},g,{className:h,ref:e}),u.createElement("div",{style:Pd},f&&!v&&u.createElement("div",{style:Bd,ref:d},u.createElement(Fd.Provider,{value:Hd},p(a))),u.createElement("div",{ref:c,style:v?Bd:void 0,"data-automation-id":"visibleContent"},v?p(a):l&&p(l))))}));Id.displayName="ResizeGroupBase";var Wd,Rd=Id;!function(t){t.KEYTIP_ADDED="keytipAdded",t.KEYTIP_REMOVED="keytipRemoved",t.KEYTIP_UPDATED="keytipUpdated",t.PERSISTED_KEYTIP_ADDED="persistedKeytipAdded",t.PERSISTED_KEYTIP_REMOVED="persistedKeytipRemoved",t.PERSISTED_KEYTIP_EXECUTE="persistedKeytipExecute",t.ENTER_KEYTIP_MODE="enterKeytipMode",t.EXIT_KEYTIP_MODE="exitKeytipMode"}(Wd||(Wd={}));var jd=function(){function t(){this.keytips={},this.persistedKeytips={},this.sequenceMapping={},this.inKeytipMode=!1,this.shouldEnterKeytipMode=!0,this.delayUpdatingKeytipChange=!1}return t.getInstance=function(){return this._instance},t.prototype.init=function(t){this.delayUpdatingKeytipChange=t},t.prototype.register=function(t,n){void 0===n&&(n=!1);var i=t;n||(i=this.addParentOverflow(t),this.sequenceMapping[i.keySequences.toString()]=i);var e=this._getUniqueKtp(i);if(n?this.persistedKeytips[e.uniqueID]=e:this.keytips[e.uniqueID]=e,this.inKeytipMode||!this.delayUpdatingKeytipChange){var r=n?Wd.PERSISTED_KEYTIP_ADDED:Wd.KEYTIP_ADDED;dd.raise(this,r,{keytip:i,uniqueID:e.uniqueID})}return e.uniqueID},t.prototype.update=function(t,n){var i=this.addParentOverflow(t),e=this._getUniqueKtp(i,n),r=this.keytips[n];r&&(e.keytip.visible=r.keytip.visible,this.keytips[n]=e,delete this.sequenceMapping[r.keytip.keySequences.toString()],this.sequenceMapping[e.keytip.keySequences.toString()]=e.keytip,!this.inKeytipMode&&this.delayUpdatingKeytipChange||dd.raise(this,Wd.KEYTIP_UPDATED,{keytip:e.keytip,uniqueID:e.uniqueID}))},t.prototype.unregister=function(t,n,i){void 0===i&&(i=!1),i?delete this.persistedKeytips[n]:delete this.keytips[n],!i&&delete this.sequenceMapping[t.keySequences.toString()];var e=i?Wd.PERSISTED_KEYTIP_REMOVED:Wd.KEYTIP_REMOVED;!this.inKeytipMode&&this.delayUpdatingKeytipChange||dd.raise(this,e,{keytip:t,uniqueID:n})},t.prototype.enterKeytipMode=function(){dd.raise(this,Wd.ENTER_KEYTIP_MODE)},t.prototype.exitKeytipMode=function(){dd.raise(this,Wd.EXIT_KEYTIP_MODE)},t.prototype.getKeytips=function(){var t=this;return Object.keys(this.keytips).map((function(n){return t.keytips[n].keytip}))},t.prototype.addParentOverflow=function(t){var n=(0,o.fX)([],t.keySequences,!0);if(n.pop(),0!==n.length){var i=this.sequenceMapping[n.toString()];if(i&&i.overflowSetSequence)return(0,o.Cl)((0,o.Cl)({},t),{overflowSetSequence:i.overflowSetSequence})}return t},t.prototype.menuExecute=function(t,n){dd.raise(this,Wd.PERSISTED_KEYTIP_EXECUTE,{overflowButtonSequences:t,keytipSequences:n})},t.prototype._getUniqueKtp=function(t,n){return void 0===n&&(n=p()),{keytip:(0,o.Cl)({},t),uniqueID:n}},t._instance=new t,t}(),zd=function(t,n,i){for(var e=0,r=t;e<r.length;e++){var o=r[e];i[n.register(o,!0)]=o}},$d=function(t,n){for(var i=0,e=Object.keys(n);i<e.length;i++){var r=e[i];t.unregister(n[r],r,!0),delete n[r]}},Yd=function(t){var n=jd.getInstance(),i=t.className,e=t.overflowItems,r=t.keytipSequences,a=t.itemSubMenuProvider,l=t.onRenderOverflowButton,s=Wt({}),c=u.useCallback((function(t){return a?a(t):t.subMenuProps?t.subMenuProps.items:void 0}),[a]),d=u.useMemo((function(){var t=[],i=[];return r?null==e||e.forEach((function(e){var u,a=e.keytipProps;if(a){var l={content:a.content,keySequences:a.keySequences,disabled:a.disabled||!(!e.disabled&&!e.isDisabled),hasDynamicChildren:a.hasDynamicChildren,hasMenu:a.hasMenu};a.hasDynamicChildren||c(e)?(l.onExecute=n.menuExecute.bind(n,r,null===(u=null==e?void 0:e.keytipProps)||void 0===u?void 0:u.keySequences),l.hasOverflowSubMenu=!0):l.onExecute=a.onExecute,t.push(l);var s=(0,o.Cl)((0,o.Cl)({},e),{keytipProps:(0,o.Cl)((0,o.Cl)({},a),{overflowSetSequence:r})});null==i||i.push(s)}else null==i||i.push(e)})):i=e,{modifiedOverflowItems:i,keytipsToRegister:t}}),[e,c,n,r]),f=d.modifiedOverflowItems;return function(t,n,i){var e=Bn(t);u.useEffect((function(){e&&($d(i,e),zd(n,i,t))})),u.useEffect((function(){return zd(n,i,t),function(){$d(i,t)}}),[])}(s,d.keytipsToRegister,n),u.createElement("div",{className:i},l(f))},Xd=(0,a.Z)(),Gd=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n);!function(t,n){var i=function(){var t;return null!==(t=Pt())&&void 0!==t?t:"undefined"!=typeof document?document:void 0}();u.useImperativeHandle(t.componentRef,(function(){return{focus:function(t,i){var e=!1;return n.current&&(e=C(n.current,i)),e},focusElement:function(t){var e=!1;return!!t&&(n.current&&w(n.current,t)&&(t.focus(),e=(null==i?void 0:i.activeElement)===t),e)}}}),[n,i])}(t,i);var r=t.items,a=t.overflowItems,l=t.className,s=t.styles,c=t.vertical,d=t.role,f=t.overflowSide,v=void 0===f?"end":f,h=t.onRenderItem,p=Xd(s,{className:l,vertical:c}),g=!!a&&a.length>0;return u.createElement("div",(0,o.Cl)({},j(t,R),{role:d||"group","aria-orientation":"menubar"===d?!0===c?"vertical":"horizontal":void 0,className:p.root,ref:e}),"start"===v&&g&&u.createElement(Yd,(0,o.Cl)({},t,{className:p.overflowButton})),r&&r.map((function(t,n){return u.createElement("div",{className:p.item,key:t.key,role:"none"},h(t))})),"end"===v&&g&&u.createElement(Yd,(0,o.Cl)({},t,{className:p.overflowButton})))}));Gd.displayName="OverflowSet";var Ud,qd={flexShrink:0,display:"inherit"},Zd=(0,r.I)(Gd,(function(t){var n=t.className;return{root:["ms-OverflowSet",{position:"relative",display:"flex",flexWrap:"nowrap"},t.vertical&&{flexDirection:"column"},n],item:["ms-OverflowSet-item",qd],overflowButton:["ms-OverflowSet-overflowButton",qd]}}),void 0,{scope:"OverflowSet"}),Kd=((Ud={})["".concat(Is[Is.circle])]="M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6",Ud["".concat(Is[Is.square])]="M1 1 L12 1 L12 12 L1 12 L1 1 Z",Ud["".concat(Is[Is.triangle])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Ud["".concat(Is[Is.pyramid])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Ud["".concat(Is[Is.diamond])]="M2 2 L10 2 L10 10 L2 10 L2 2 Z",Ud["".concat(Is[Is.hexagon])]="M9 0H3L0 5L3 10H9L12 5L9 0Z",Ud["".concat(Is[Is.pentagon])]="M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z",Ud["".concat(Is[Is.octagon])]="M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z",Ud["".concat(Ws[Ws.dottedLine])]="M0 6 H3 M5 6 H8 M10 6 H13",Ud),Jd=function(t){var n=t.svgProps,i=t.pathProps,e=t.shape,r=t.classNameForNonSvg;return-1===Object.keys(Kd).indexOf(e)?u.createElement("div",{className:r}):u.createElement("svg",(0,o.Cl)({width:14,height:14,viewBox:"-1 -1 14 14"},Us(n),{transform:"rotate(".concat(e===Is[Is.diamond]?45:e===Is[Is.pyramid]?180:0,", 0, 0)")}),u.createElement("path",(0,o.Cl)({d:Kd[e]},Us(i))))};function Qd(t){return sl(Ka(t).call(document.documentElement))}function tf(t,n){return(0,o.sH)(this,arguments,void 0,(function(t,n,i,e){var r,u,a,l,s;return void 0===i&&(i=!1),void 0===e&&(e={}),(0,o.YH)(this,(function(c){switch(c.label){case 0:if(0===t.length&&!n)throw new Error("No charts or legends to export");return[4,Promise.all(t.map((function(t){return new Promise((function(n){var e=function(t,n){if(!t)throw new Error("Chart container is not defined");var i=t.querySelector("svg");if(!i)throw new Error("SVG not found");for(var e=sl(i.cloneNode(!0)).attr("width",null).attr("height",null).attr("viewBox",null),r=i.getElementsByTagName("*"),u=e.node().getElementsByTagName("*"),a=["text"],l=["table","thead","tbody","tr","th","td"],s=0;s<r.length;s++){var c=r[s].tagName.toLowerCase();a.includes(c)||l.includes(c)?Js((0,o.fX)((0,o.fX)([],nf,!0),ef,!0),r[s],u[s]):Js(nf,r[s],u[s])}r=null,u=null;var d=i.querySelectorAll("foreignObject"),f=e.node().querySelectorAll("foreignObject");d.forEach((function(t,n){var i=f[n];if(i){var e=t.firstElementChild,r=i.firstElementChild;e&&r&&Js(rf,e,r);var o=t.querySelectorAll("*"),u=i.querySelectorAll("*");o.forEach((function(t,n){var i=u[n];i&&Js(rf,t,i)}))}}));var v=t.querySelector('[data-chart-annotation-svg="true"]'),h=null;if(v){h=v.cloneNode(!0),Js(nf,v,h);var p=v.getElementsByTagName("*"),g=h.getElementsByTagName("*");for(s=0;s<p.length;s++){var y=p[s],m=g[s],b=(c=y.tagName.toLowerCase(),y instanceof SVGElement),x=y instanceof HTMLElement;b&&Js("text"===c?(0,o.fX)((0,o.fX)([],nf,!0),ef,!0):nf,y,m),x&&Js(rf,y,m),"foreignobject"===c&&Js(of,y,m)}}var w=i.getBoundingClientRect(),M=w.width,C=w.height;e.attr("width",M).attr("height",C).attr("viewBox","0 0 ".concat(M," ").concat(C)).attr("direction",n?"rtl":"ltr"),h&&(e.selectAll('[data-chart-annotation-layer="true"]').remove(),sl(h).attr("x",0).attr("y",0).attr("width",M).attr("height",C),e.append((function(){return h})));var k={node:e.node(),width:M,height:C};return e=null,k}(t.container,i);n({dataUrl:lf(e.node),width:e.width,height:e.height})}))})))];case 1:return r=c.sent(),u=[],t.forEach((function(t,n){var i=t.row||0,e=t.col||0;u[i]||(u[i]=[]),u[i][e]=r[n]})),n&&(a=0,u.forEach((function(t){var n=0;t.forEach((function(t){n+=t.width})),a=Math.max(a,n)})),l=n(a,i),s=lf(l.node),u.push([{dataUrl:s,width:l.width,height:l.height}])),[2,af(u,e)]}}))}))}var nf=["display","fill","fill-opacity","opacity","stroke","stroke-width","transform","border-collapse"],ef=["font-family","font-size","font-weight","text-anchor","background-color","color","padding","text-align","border"],rf=["align-items","background","background-color","border","border-radius","box-shadow","box-sizing","color","column-gap","display","flex","flex-direction","font-family","font-size","font-style","font-weight","gap","height","justify-content","letter-spacing","line-height","margin","max-height","max-width","min-height","min-width","opacity","overflow","padding","pointer-events","position","row-gap","text-align","text-decoration","text-transform","top","right","bottom","left","visibility","white-space","width","z-index"],of=["overflow","pointer-events"],uf={color:"fill","font-family":"font-family","font-size":"font-size","font-weight":"font-weight"};function af(t){return(0,o.sH)(this,arguments,void 0,(function(t,n){var i,e,r,u,a,l,s,c,d,f;return void 0===n&&(n={}),(0,o.YH)(this,(function(v){switch(v.label){case 0:if(i=0,e=0,r=t.map((function(t){var n=0,r=0,u=t.map((function(t){var i=(0,o.Cl)((0,o.Cl)({},t),{x:n,y:e});return n+=t.width,r=Math.max(r,t.height),i}));return i=Math.max(i,n),e+=r,u})).flat(),u=n.scale||1,a=n.width||i,l=n.height||e,i*=s=u*a/i,e*=c=u*l/e,(d=document.createElement("canvas")).width=i,d.height=e,!(f=d.getContext("2d")))throw new Error("Canvas context is null");return f.fillStyle=n.background||"transparent",f.fillRect(0,0,i,e),[4,Promise.all(r.map((function(t){return new Promise((function(n,i){var e=new Image;e.onload=function(){f.drawImage(e,s*t.x,c*t.y,s*t.width,c*t.height),n()},e.onerror=i,e.src=t.dataUrl}))})))];case 1:return v.sent(),[2,d.toDataURL("image/png")]}}))}))}function lf(t){if(!t)throw new Error("SVG node is null");var n=(new XMLSerializer).serializeToString(t);return"data:image/svg+xml;base64,"+btoa(function(t){for(var n,i,e="",r=t.length,o=0;o<r;){if("%"===(n=t.charAt(o++)))if("u"===t.charAt(o)){if(i=t.slice(o+1,o+5),cf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=5;continue}}else if(i=t.slice(o,o+2),sf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=2;continue}e+=n}return e}(encodeURIComponent(n)))}var sf=/^[\da-f]{2}$/i,cf=/^[\da-f]{4}$/i,df=(0,a.Z)(),ff=function(t){function n(n){var i,e,r,a,l=t.call(this,n)||this;l._isLegendSelected=!1,l.toSVG=function(t,n){return void 0===n&&(n=!1),function(t,n,i,e){if(0===t.length)return{node:null,width:0,height:0};for(var r=i.selectedLegends,u=i.centerLegends,a=i.textClassName,l=i.isRTL,s=Qd("svg:g"),c=u?0:12,d=8,f=[],v=[],h=[],p=0===Object.keys(r).length,g=function(i){var o,g,y,m,b=(o=t[i].title,g=a,y=e,(m=document.getElementById(tc))||((m=document.createElement("span")).setAttribute("id",tc),m.setAttribute("aria-hidden","true"),y?y.appendChild(m):document.body.appendChild(m)),m.setAttribute("class",g),Object.assign(m.style,Qs),m.textContent="".concat(o),m),x=29+b.getBoundingClientRect().width+8,w=s.append("g");f.push({elem:w,width:x}),c+x>n&&f.length>1&&(f.pop(),v.push(f),h.push(c),f=[{elem:w,width:x}],c=u?0:12,d+=32);var M=r[t[i].title]||p;w.append("rect").attr("x",c+(l?x-8-13:8)).attr("y",d+8).attr("width",13).attr("height",13).style("fill",M?t[i].color:"transparent").style("stroke-width",1).style("stroke",t[i].color),w.append("text").attr("x",c+(l?x-29:29)).attr("y",d+8).attr("dominant-baseline","hanging").style("opacity",M?1:.67).text(t[i].title).call((function(t){return Js(uf,b,t.node())})),c+=x},y=0;y<t.length;y++)g(y);if(v.push(f),h.push(c),d+=32,u)v.forEach((function(t,i){var e=Math.max((n-h[i])/2,0),r=h[i],o=0;t.forEach((function(t){var n=e+(l?r-t.width-o:0);t.elem.attr("transform","translate(".concat(n,", 0)")),r-=t.width,o+=t.width}))}));else if(l){var m=Math.max.apply(Math,(0,o.fX)([n],h,!1));v.forEach((function(t){var n=m-12,i=12;t.forEach((function(t){var e=n-t.width-i;t.elem.attr("transform","translate(".concat(e,", 0)")),n-=t.width,i+=t.width}))}))}var b=Math.max.apply(Math,(0,o.fX)([n],h,!1)),x=d,w=Qd("svg").attr("width",b).attr("height",x).attr("viewBox","0 0 ".concat(b," ").concat(x));return w.append((function(){return s.node()})),{node:w.node(),width:b,height:x}}(l.props.legends,t,{selectedLegends:l.state.selectedLegends,centerLegends:!!l.props.centerLegends,textClassName:l._classNames.text,isRTL:n},l._rootElem)},l._onRenderData=function(t){var n=l.props,i=n.overflowProps,e=n.allowFocusOnLegends,r=void 0===e||e,a=n.canSelectMultipleLegends,s=void 0!==a&&a,c={root:{justifyContent:l.props.centerLegends?"center":"unset",flexWrap:l.props.enabledWrapLines?"wrap":"nowrap"}};return u.createElement(Uc,(0,o.Cl)({},r&&{role:"listbox","aria-label":"Legends","aria-multiselectable":s}),u.createElement(Zd,(0,o.Cl)({items:t.primary,overflowItems:t.overflow,onRenderItem:l._renderButton,onRenderOverflowButton:l._renderOverflowItems},i,{styles:(0,o.Cl)((0,o.Cl)({},c),null==i?void 0:i.styles)})))},l._onReduceData=function(t){if(0!==t.primary.length){var n=(0,o.fX)((0,o.fX)([],t.primary.slice(-1),!0),t.overflow,!0);return{primary:t.primary.slice(0,-1),overflow:n}}},l._onGrowData=function(t){if(0!==t.overflow.length){var n=t.overflow.slice(1);return{primary:(0,o.fX)((0,o.fX)([],t.primary,!0),t.overflow.slice(0,1),!0),overflow:n}}},l._getNewSelectedLegendsForMultiselect=function(t){var n=(0,o.Cl)({},l.state.selectedLegends);return n[t.title]?delete n[t.title]:(n[t.title]=!0,Object.keys(n).length===l.props.legends.length&&(n={})),n},l._getNewSelectedLegendsForSingleSelect=function(t){var n;return l.state.selectedLegends[t.title]?{}:((n={})[t.title]=!0,n)},l._onClick=function(t,n){var i,e,r,o=l.props.canSelectMultipleLegends,u=void 0!==o&&o?l._getNewSelectedLegendsForMultiselect(t):l._getNewSelectedLegendsForSingleSelect(t);l.setState({selectedLegends:u}),null===(e=(i=l.props).onChange)||void 0===e||e.call(i,Object.keys(u),n,t),null===(r=t.action)||void 0===r||r.call(t)},l._onRenderCompactCard=function(t){var n=l.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.className,a=n.styles,s=n.theme,c=n.canSelectMultipleLegends,d=void 0!==c&&c,f=[],v=df(a,{theme:s,className:r});return t.renderData.forEach((function(t,n){var i=l._renderButton(t,n,!0);f.push(i)})),u.createElement(Uc,(0,o.Cl)({},e&&{role:"listbox","aria-label":"Legends","aria-multiselectable":d},{direction:uc.vertical,handleTabKey:1,isCircularNavigation:!0},l.props.focusZonePropsInHoverCard,{className:v.hoverCardRoot}),f)},l._renderOverflowItems=function(t){var n=l.props.allowFocusOnLegends,i=void 0===n||n,e=[];t.forEach((function(t,n){e.push({key:n.toString(),name:t.title,onClick:t.action})}));var r={renderData:t},a=l.props,s=a.theme,c=a.className,d=a.styles,f=a.overflowText,v=df(d,{theme:s,className:c}),h={onRenderPlainCard:l._onRenderCompactCard,renderData:r},p=f||"more";return u.createElement(Td,{type:nd.plain,plainCardProps:h,instantOpenOnClick:!0,onCardHide:function(){l.setState({isHoverCardVisible:!1});var n=m(t,(function(t){return t.title===l.state.activeLegend}));n&&(l.setState({activeLegend:""}),n.onMouseOutAction&&n.onMouseOutAction())},setInitialFocus:!0,trapFocus:!0,onCardVisible:l._hoverCardVisible,styles:v.subComponentStyles.hoverCardStyles,cardDismissDelay:300,target:l._hoverCardRef},u.createElement("div",{role:"option"},u.createElement("div",(0,o.Cl)({className:v.overflowIndicationTextStyle,ref:function(t){l._hoverCardRef=t}},i&&{role:"button","aria-expanded":l.state.isHoverCardVisible,"aria-label":"".concat(e.length," ").concat(p)},{"data-is-focusable":i}),e.length," ",p)))},l._hoverCardVisible=function(){l.setState({isHoverCardVisible:!0})},l._onHoverOverLegend=function(t){t.hoverAction&&(l.setState({activeLegend:t.title}),t.hoverAction())},l._onLeave=function(t){t.onMouseOutAction&&(l.setState({activeLegend:""}),t.onMouseOutAction())},l._renderButton=function(t,n,i){var e=l.props.allowFocusOnLegends,r=void 0===e||e,a={title:t.title,color:t.color,shape:t.shape,action:t.action,hoverAction:t.hoverAction,onMouseOutAction:t.onMouseOutAction,stripePattern:t.stripePattern,isLineLegendInBarChart:t.isLineLegendInBarChart,opacity:t.opacity},s=l._getColor(a.title,a.color),c=l.props,d=c.theme,f=c.className,v=c.styles,h=df(v,{theme:d,className:f,colorOnSelectedState:s,borderColor:a.color,overflow:i,stripePattern:a.stripePattern,isLineLegendInBarChart:a.isLineLegendInBarChart,opacity:a.opacity}),p=function(){l._onHoverOverLegend(a)},g=function(){l._onLeave(a)},y=l._getShape(h,a,s);return u.createElement("button",(0,o.Cl)({},r&&{"aria-selected":!!l.state.selectedLegends[a.title],role:"option","aria-label":"".concat(a.title),"aria-setsize":t["aria-setsize"],"aria-posinset":t["aria-posinset"]},t.nativeButtonProps&&(0,o.Cl)({},t.nativeButtonProps),{key:n,className:h.legend,onClick:function(t){l._onClick(a,t)},onMouseOver:p,onMouseOut:g,onFocus:p,onBlur:g,"data-is-focusable":r}),y,u.createElement("div",{className:h.text},a.title))};var s=null!==(e=n.selectedLegends)&&void 0!==e?e:n.defaultSelectedLegends,c=null!==(r=n.selectedLegend)&&void 0!==r?r:n.defaultSelectedLegend,d={};return n.canSelectMultipleLegends?d=(null===(a=null!=s?s:[])||void 0===a?void 0:a.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{}))||{}:c&&((i={})[c]=!0,d=i),l.state={activeLegend:"",isHoverCardVisible:!1,selectedLegends:d},l}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e=t.selectedLegend,r=t.selectedLegends;return t.canSelectMultipleLegends&&void 0!==r?(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:r.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{})}):t.canSelectMultipleLegends||void 0===e?n:(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:(i={},i[e]=!0,i)})},n.prototype.render=function(){var t=this,n=this.props,i=n.theme,e=n.className,r=n.styles;this._classNames=df(r,{theme:i,className:e}),this._isLegendSelected=Object.keys(this.state.selectedLegends).length>0;var o=this._generateData();return u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n}},this.props.enabledWrapLines?this._onRenderData(o):u.createElement(Rd,{data:o,onReduceData:this._onReduceData,onRenderData:this._onRenderData,onGrowData:this._onGrowData}))},n.prototype._generateData=function(){var t=this,n=this.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.shape;return{primary:this.props.legends.map((function(n,i){return(0,o.Cl)((0,o.Cl)({},e&&{nativeButtonProps:j(n,W,["title"]),"aria-setsize":t.props.legends.length,"aria-posinset":i+1}),{title:n.title,action:n.action,hoverAction:n.hoverAction,onMouseOutAction:n.onMouseOutAction,color:n.color,shape:r||n.shape,stripePattern:n.stripePattern,isLineLegendInBarChart:n.isLineLegendInBarChart,opacity:n.opacity,key:i})})),overflow:[]}},n.prototype._getShape=function(t,n,i){var e={className:t.shape},r={fill:i,strokeWidth:2,stroke:n.color};return u.createElement(Jd,{svgProps:e,pathProps:r,shape:n.shape,classNameForNonSvg:t.rect})},n.prototype._getColor=function(t,n){var i=this.props.theme;return this._isLegendSelected?this.state.selectedLegends[t]?n:i.semanticColors.buttonBackground:this.state.activeLegend===t||""===this.state.activeLegend?n:i.semanticColors.buttonBackground},n}(u.Component),vf=(0,r.I)(ff,(function(t){var n,i,e=t.className,r=t.theme,u=t.isLineLegendInBarChart,a=void 0!==u&&u,l=r,s=l.palette,c=l.fonts,d={inset:void 0,position:void 0,highContrastStyle:{outlineColor:r.semanticColors.focusBorder},borderColor:"transparent",outlineColor:void 0};return{root:[{whiteSpace:"nowrap",width:"100%",alignItems:"center",margin:"-8px 0 0 -8px"},e],legend:[(0,It.gm)(r,d),{display:"flex",alignItems:"center",cursor:"pointer",border:"none",padding:"".concat(8,"px"),background:"none",textTransform:"capitalize"}],rect:{selectors:(n={},n[It.up]={content:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")"),opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":""},n),width:"".concat(12,"px"),height:a?"4px":"".concat(12,"px"),backgroundColor:t.stripePattern?"":t.colorOnSelectedState,marginRight:"".concat(8,"px"),border:"".concat(1,"px solid"),borderColor:t.borderColor?t.borderColor:null==r?void 0:r.semanticColors.buttonBorder,content:t.stripePattern?"repeating-linear-gradient(135deg, transparent, transparent 3px, ".concat(t.colorOnSelectedState," 1px, ").concat(t.colorOnSelectedState," 4px)"):""},shape:[{marginRight:"".concat(8,"px")}],triangle:{width:"0",height:"0",borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:"10.4px solid",borderTopColor:t.colorOnSelectedState,marginRight:"8px",opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":t.opacity?t.opacity:"",selectors:(i={},i[It.up]={border:"0px",height:"10.4px",width:"10.4px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")")},i)},text:(0,o.Cl)((0,o.Cl)({},c.small),{lineHeight:"16px",color:null==r?void 0:r.semanticColors.bodyText,opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"".concat(.67):""}),hoverChange:{width:"12px",height:"12px",backgroundColor:r.semanticColors.buttonBackground,marginRight:"8px",border:"1px solid",borderColor:t.borderColor?t.borderColor:s.black},overflowIndicationTextStyle:[(0,It.gm)(r,d),(0,o.Cl)((0,o.Cl)({cursor:"pointer",color:null==r?void 0:r.semanticColors.bodyText},c.small),{lineHeight:"16px",padding:"".concat(8,"px")})],hoverCardRoot:{padding:"8px",position:"relative",overflowY:"auto",maxHeight:"300px"},subComponentStyles:{hoverCardStyles:{host:[(0,It.gm)(r,d)]}}}}));function hf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function pf(t){return function(){return t}}function gf(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function yf(t){return t}Array.prototype.slice;const mf=Math.abs,bf=Math.atan2,xf=Math.cos,wf=Math.max,Mf=Math.min,Cf=Math.sin,kf=Math.sqrt,Af=1e-12,Sf=Math.PI,Lf=Sf/2,Df=2*Sf;function Vf(t){return t>=1?Lf:t<=-1?-Lf:Math.asin(t)}function Nf(){var t=yf,n=gf,i=null,e=pf(0),r=pf(Df),o=pf(0);function u(u){var a,l,s,c,d,f=(u=hf(u)).length,v=0,h=new Array(f),p=new Array(f),g=+e.apply(this,arguments),y=Math.min(Df,Math.max(-Df,r.apply(this,arguments)-g)),m=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=m*(y<0?-1:1);for(a=0;a<f;++a)(d=p[h[a]=a]=+t(u[a],a,u))>0&&(v+=d);for(null!=n?h.sort((function(t,i){return n(p[t],p[i])})):null!=i&&h.sort((function(t,n){return i(u[t],u[n])})),a=0,s=v?(y-f*b)/v:0;a<f;++a,g=c)l=h[a],c=g+((d=p[l])>0?d*s:0)+b,p[l]={data:u[l],index:a,value:d,startAngle:g,endAngle:c,padAngle:m};return p}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:pf(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,i=null,u):n},u.sort=function(t){return arguments.length?(i=t,n=null,u):i},u.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:pf(+t),u):e},u.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:pf(+t),u):r},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:pf(+t),u):o},u}const Of=Math.PI,Tf=2*Of,Ef=1e-6,Ff=Tf-Ef;function Bf(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}class Pf{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Bf:function(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Bf;const i=10**n;return function(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=Math.round(arguments[n]*i)/i+t[n]}}(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,e){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+e}`}bezierCurveTo(t,n,i,e,r,o){this._append`C${+t},${+n},${+i},${+e},${this._x1=+r},${this._y1=+o}`}arcTo(t,n,i,e,r){if(t=+t,n=+n,i=+i,e=+e,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=this._x1,u=this._y1,a=i-t,l=e-n,s=o-t,c=u-n,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=n}`;else if(d>Ef)if(Math.abs(c*a-l*s)>Ef&&r){let f=i-o,v=e-u,h=a*a+l*l,p=f*f+v*v,g=Math.sqrt(h),y=Math.sqrt(d),m=r*Math.tan((Of-Math.acos((h+d-p)/(2*g*y)))/2),b=m/y,x=m/g;Math.abs(b-1)>Ef&&this._append`L${t+b*s},${n+b*c}`,this._append`A${r},${r},0,0,${+(c*f>s*v)},${this._x1=t+x*a},${this._y1=n+x*l}`}else this._append`L${this._x1=t},${this._y1=n}`}arc(t,n,i,e,r,o){if(t=+t,n=+n,o=!!o,(i=+i)<0)throw new Error(`negative radius: ${i}`);let u=i*Math.cos(e),a=i*Math.sin(e),l=t+u,s=n+a,c=1^o,d=o?e-r:r-e;null===this._x1?this._append`M${l},${s}`:(Math.abs(this._x1-l)>Ef||Math.abs(this._y1-s)>Ef)&&this._append`L${l},${s}`,i&&(d<0&&(d=d%Tf+Tf),d>Ff?this._append`A${i},${i},0,1,${c},${t-u},${n-a}A${i},${i},0,1,${c},${this._x1=l},${this._y1=s}`:d>Ef&&this._append`A${i},${i},0,${+(d>=Of)},${c},${this._x1=t+i*Math.cos(r)},${this._y1=n+i*Math.sin(r)}`)}rect(t,n,i,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+e}h${-i}Z`}toString(){return this._}}function _f(t){let n=3;return t.digits=function(i){if(!arguments.length)return n;if(null==i)n=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);n=t}return t},()=>new Pf(n)}function Hf(t){return t.innerRadius}function If(t){return t.outerRadius}function Wf(t){return t.startAngle}function Rf(t){return t.endAngle}function jf(t){return t&&t.padAngle}function zf(t,n,i,e,r,o,u){var a=t-i,l=n-e,s=(u?o:-o)/kf(a*a+l*l),c=s*l,d=-s*a,f=t+c,v=n+d,h=i+c,p=e+d,g=(f+h)/2,y=(v+p)/2,m=h-f,b=p-v,x=m*m+b*b,w=r-o,M=f*p-h*v,C=(b<0?-1:1)*kf(wf(0,w*w*x-M*M)),k=(M*b-m*C)/x,A=(-M*m-b*C)/x,S=(M*b+m*C)/x,L=(-M*m+b*C)/x,D=k-g,V=A-y,N=S-g,O=L-y;return D*D+V*V>N*N+O*O&&(k=S,A=L),{cx:k,cy:A,x01:-c,y01:-d,x11:k*(r/w-1),y11:A*(r/w-1)}}function $f(){var t=Hf,n=If,i=pf(0),e=null,r=Wf,o=Rf,u=jf,a=null,l=_f(s);function s(){var s,c,d,f=+t.apply(this,arguments),v=+n.apply(this,arguments),h=r.apply(this,arguments)-Lf,p=o.apply(this,arguments)-Lf,g=mf(p-h),y=p>h;if(a||(a=s=l()),v<f&&(c=v,v=f,f=c),v>Af)if(g>Df-Af)a.moveTo(v*xf(h),v*Cf(h)),a.arc(0,0,v,h,p,!y),f>Af&&(a.moveTo(f*xf(p),f*Cf(p)),a.arc(0,0,f,p,h,y));else{var m,b,x=h,w=p,M=h,C=p,k=g,A=g,S=u.apply(this,arguments)/2,L=S>Af&&(e?+e.apply(this,arguments):kf(f*f+v*v)),D=Mf(mf(v-f)/2,+i.apply(this,arguments)),V=D,N=D;if(L>Af){var O=Vf(L/f*Cf(S)),T=Vf(L/v*Cf(S));(k-=2*O)>Af?(M+=O*=y?1:-1,C-=O):(k=0,M=C=(h+p)/2),(A-=2*T)>Af?(x+=T*=y?1:-1,w-=T):(A=0,x=w=(h+p)/2)}var E=v*xf(x),F=v*Cf(x),B=f*xf(C),P=f*Cf(C);if(D>Af){var _,H=v*xf(w),I=v*Cf(w),W=f*xf(M),R=f*Cf(M);if(g<Sf)if(_=function(t,n,i,e,r,o,u,a){var l=i-t,s=e-n,c=u-r,d=a-o,f=d*l-c*s;if(!(f*f<Af))return[t+(f=(c*(n-o)-d*(t-r))/f)*l,n+f*s]}(E,F,W,R,H,I,B,P)){var j=E-_[0],z=F-_[1],$=H-_[0],Y=I-_[1],X=1/Cf(((d=(j*$+z*Y)/(kf(j*j+z*z)*kf($*$+Y*Y)))>1?0:d<-1?Sf:Math.acos(d))/2),G=kf(_[0]*_[0]+_[1]*_[1]);V=Mf(D,(f-G)/(X-1)),N=Mf(D,(v-G)/(X+1))}else V=N=0}A>Af?N>Af?(m=zf(W,R,E,F,v,N,y),b=zf(H,I,B,P,v,N,y),a.moveTo(m.cx+m.x01,m.cy+m.y01),N<D?a.arc(m.cx,m.cy,N,bf(m.y01,m.x01),bf(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,N,bf(m.y01,m.x01),bf(m.y11,m.x11),!y),a.arc(0,0,v,bf(m.cy+m.y11,m.cx+m.x11),bf(b.cy+b.y11,b.cx+b.x11),!y),a.arc(b.cx,b.cy,N,bf(b.y11,b.x11),bf(b.y01,b.x01),!y))):(a.moveTo(E,F),a.arc(0,0,v,x,w,!y)):a.moveTo(E,F),f>Af&&k>Af?V>Af?(m=zf(B,P,H,I,f,-V,y),b=zf(E,F,W,R,f,-V,y),a.lineTo(m.cx+m.x01,m.cy+m.y01),V<D?a.arc(m.cx,m.cy,V,bf(m.y01,m.x01),bf(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,V,bf(m.y01,m.x01),bf(m.y11,m.x11),!y),a.arc(0,0,f,bf(m.cy+m.y11,m.cx+m.x11),bf(b.cy+b.y11,b.cx+b.x11),y),a.arc(b.cx,b.cy,V,bf(b.y11,b.x11),bf(b.y01,b.x01),!y))):a.arc(0,0,f,C,M,y):a.lineTo(B,P)}else a.moveTo(0,0);if(a.closePath(),s)return a=null,s+""||null}return s.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-Sf/2;return[xf(e)*i,Cf(e)*i]},s.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:pf(+n),s):t},s.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:pf(+t),s):n},s.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:pf(+t),s):i},s.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:pf(+t),s):e},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:pf(+t),s):r},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:pf(+t),s):o},s.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:pf(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}var Yf=function(t){var n,i=t.solidFill,e=t.gradientFill,r=t.href,o=t.theme,u=t.opacity;return{root:{fill:i,cursor:r?"pointer":"default",stroke:o.semanticColors.bodyBackground,outline:"transparent",selectors:{"::-moz-focus-inner":{border:"0"}},opacity:u},gradientArc:{width:"100%",height:"100%",background:e,opacity:u},focusRing:{stroke:o.semanticColors.focusBorder,strokeWidth:4,fill:"transparent"},arcLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:o.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},Xf=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.state={},n.currentRef=u.createRef(),n._isRTL=(0,l.jI)(),n._hoverOff=function(){n.props.hoverLeaveCallback()},n._onBlur=function(){n.props.onBlurCallback()},n._getAriaLabel=function(){var t,i=n.props.data.data,e=i.xAxisCalloutData||i.legend,r=i.yAxisCalloutData||i.data||0;return(null===(t=i.callOutAccessibilityData)||void 0===t?void 0:t.ariaLabel)||(e?"".concat(e,", "):"")+"".concat(r,".")},n._shouldHighlightArc=function(t){var i=n.props.activeArc;return!i||0===i.length||void 0===t||i.includes(t)},n._renderArcLabel=function(t){var i=n.props,e=i.arc,r=i.data,o=i.innerRadius,a=i.outerRadius,l=i.showLabelsInPercent,s=i.totalValue;if(i.hideLabels||Math.abs(r.endAngle-r.startAngle)<Math.PI/12||!n._shouldHighlightArc(r.data.legend))return null;var c=e.centroid(r),d=c[0],f=c[1],v=Math.sqrt(d*d+f*f),h=Math.max(o,a)+2,p=(r.startAngle+r.endAngle)/2,g=r.value;return u.createElement("text",{x:(0===v?0:d/v)*h,y:(0===v?0:f/v)*h,textAnchor:p>Math.PI!==n._isRTL?"end":"start",dominantBaseline:p>Math.PI/2&&p<3*Math.PI/2?"hanging":"auto",className:t,"aria-hidden":!0},l?zu(".0%")(0===s?0:g/s):$s(g))},n}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return Gf(t),null},n.prototype.updateChart=function(t){Gf(t)},n.prototype.render=function(){var t,n,i,e,r,o,l,s=this.props,c=s.arc,d=s.href,f=s.focusedArcId,v=s.activeArc,h=(0,a.Z)(),g=this.props.uniqText+("string"==typeof this.props.data.data.legend?this.props.data.data.legend.replace(/\s+/g,""):"")+this.props.data.data.data,y=v&&v.length>0?v.includes(null===(t=this.props.data)||void 0===t?void 0:t.data.legend)?1:.1:1,m=null!==(i=null===(n=this.props.data)||void 0===n?void 0:n.startAngle)&&void 0!==i?i:0,b=(null!==(r=null===(e=this.props.data)||void 0===e?void 0:e.endAngle)&&void 0!==r?r:0)-m,x=this.props.roundCorners?3:0,w=h(Yf,{solidFill:this.props.enableGradient?"transparent":this.props.color,gradientFill:"conic-gradient(\n from ".concat(m,"rad,\n ").concat(this.props.color,",\n ").concat(this.props.nextColor," ").concat(b,"rad\n )"),href:d,theme:this.props.theme,opacity:y}),M=p("Arc_clip")+"".concat(this.props.color,"_").concat(this.props.nextColor);return u.createElement("g",{ref:this.currentRef},!!f&&f===g&&u.createElement("path",{id:g+"focusRing",d:c.cornerRadius(x)(this.props.focusData),className:w.focusRing}),u.createElement("path",{id:g,d:c.cornerRadius(x)(this.props.data),onFocus:this._onFocus.bind(this,this.props.data.data,g),className:w.root,"data-is-focusable":this._shouldHighlightArc(this.props.data.data.legend)||0===(null===(o=this.props.activeArc)||void 0===o?void 0:o.length),onMouseOver:this._hoverOn.bind(this,this.props.data.data),onMouseMove:this._hoverOn.bind(this,this.props.data.data),onMouseLeave:this._hoverOff,onBlur:this._onBlur,onClick:d?this._redirectToUrl.bind(this,d):null===(l=this.props.data)||void 0===l?void 0:l.data.onClick,"aria-label":this._getAriaLabel(),role:"img"}),this._renderArcLabel(w.arcLabel),this.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:M},u.createElement("path",{d:c.cornerRadius(x)(this.props.data)})),u.createElement("foreignObject",{x:"-50%",y:"-50%",width:"100%",height:"100%",clipPath:"url(#".concat(M,")")},u.createElement("div",{className:w.gradientArc}))))},n.prototype._onFocus=function(t,n){this.props.onFocusCallback(t,n,this.currentRef.current)},n.prototype._hoverOn=function(t,n){n.persist(),this.props.hoverOnCallback(t,n)},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.defaultProps={arc:$f()},n}(u.Component);function Gf(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Uf,qf,Zf,Kf=function(t){var n,i=t.theme;return{root:{},insideDonutString:{fontSize:It.s.xLargePlus,fontWeight:It.BO.semibold,fill:i.semanticColors.bodyText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},Jf=(0,a.Z)(),Qf=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n,e,r){var o,a,l,s,c=t&&t.data&&t.data.color,d=c;return i.props.enableGradient&&(c=null!==(a=null===(o=i.props.data[n].gradient)||void 0===o?void 0:o[0])&&void 0!==a?a:kc(n,0,i.props.theme.isInverted)[0],d=null!==(s=null===(l=i.props.data[n].gradient)||void 0===l?void 0:l[1])&&void 0!==s?s:kc(n,0,i.props.theme.isInverted)[1]),u.createElement(Xf,{key:n,data:t,focusData:e,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:c,nextColor:d,enableGradient:i.props.enableGradient,roundCorners:i.props.roundCorners,onFocusCallback:i._focusCallback,hoverOnCallback:i._hoverCallback,onBlurCallback:i.props.onBlurCallback,hoverLeaveCallback:i.props.hoverLeaveCallback,uniqText:i.props.uniqText,activeArc:i.props.activeArc,href:r,calloutId:i.props.calloutId,valueInsideDonut:i.props.valueInsideDonut,theme:i.props.theme,focusedArcId:i.props.focusedArcId,showLabelsInPercent:i.props.showLabelsInPercent,totalValue:i._totalValue,hideLabels:i.props.hideLabels})},i._focusCallback=function(t,n,e){i.props.onFocusCallback(t,n,e)},i._computeTotalValue=function(){var t=0;return i.props.data.forEach((function(n){t+=n.data})),t},i._hoverCallback=i._hoverCallback.bind(i),i._pieForFocusRing=Nf().sort(null).value((function(t){return t.data})).padAngle(0),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=this._pieForFocusRing(e),o=i(e),a="translate(".concat(this.props.width/2,", ").concat(this.props.height/2,")"),l=Jf(Kf,{theme:this.props.theme});return this._totalValue=this._computeTotalValue(),u.createElement("g",{transform:a},o.map((function(n,i){return t.arcGenerator(n,i,r[i],t.props.href)})),this.props.valueInsideDonut&&u.createElement("text",{y:5,textAnchor:"middle",dominantBaseline:"middle",className:l.insideDonutString},this.props.valueInsideDonut))},n.prototype.componentDidUpdate=function(){var t,n,i;t=Jf(Kf,{theme:this.props.theme}).insideDonutString,n=2*this.props.innerRadius-5,i=0,cl(".".concat(t)).each((function(){for(var t=sl(this),e=t.text().split(/\s+/).reverse(),r="",o=[],u=0,a=t.attr("y"),l=t.text(null).append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em");r=e.pop();)o.push(r),l.text(o.join(" ")+" "),l.node().getComputedTextLength()>n&&o.length>1&&(o.pop(),l.text(o.join(" ")+" "),o=[r],l=t.append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em").text(r));i+=1}))},n.prototype._hoverCallback=function(t,n){this.props.hoverOnCallback(t,n)},n.defaultProps={pie:Nf().sort(null).value((function(t){return t.data})).padAngle(.02)},n}(u.Component),tv=(0,a.Z)(),nv=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return tf([{container:e._rootElem}],e.props.hideLegend||null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)},e._closeCallout=function(){e.setState({showHover:!1})},e._focusCallback=function(t,n,i){e._currentHoverElement=i,e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,focusedArcId:n,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})},e._hoverCallback=function(t,n){var i,r,o,u;if(e._calloutAnchorPoint!==t){e._calloutAnchorPoint=t,e._currentHoverElement=n;var a=t.color;if(e.props.enableGradient){var l=Math.max((null===(r=null===(i=e.props.data)||void 0===i?void 0:i.chartData)||void 0===r?void 0:r.findIndex((function(n){return n.legend===t.legend})))||0,0);a=(null===(o=t.gradient)||void 0===o?void 0:o[0])||kc(l,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0]}e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:a,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})}},e._onBlur=function(){e.setState({focusedArcId:""})},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({showHover:!1})},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendsHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?ds(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):fs(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},Lc(e),e.state={showHover:!1,value:"",legend:"",_width:e.props.width||200,_height:e.props.height||200,activeLegend:void 0,color:"",xCalloutValue:"",yCalloutValue:"",focusedArcId:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[]},e._hoverCallback=e._hoverCallback.bind(e),e._focusCallback=e._focusCallback.bind(e),e._hoverLeave=e._hoverLeave.bind(e),e._calloutId=p("callout"),e._uniqText=p("_Pie_"),e._emptyChartId=p("_DonutChart_empty"),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e;return t.width&&t.width!==n._width&&(i={_width:t.width}),t.height&&t.height!==n._height&&(e={_height:t.height-40}),(0,o.Cl)((0,o.Cl)({},i),e)},n.prototype.componentDidMount=function(){this._rootElem&&this.setState({_width:this._rootElem.offsetWidth,_height:this._rootElem.offsetHeight-40})},n.prototype.componentDidUpdate=function(t){var n,i,e;qs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.hideLegend,r=void 0!==e&&e,a=this._addDefaultColors(null==i?void 0:i.chartData);this._classNames=tv(this.props.styles,{theme:this.props.theme,color:this.state.color,className:this.props.className});var l=this._createLegends(a.filter((function(t){return t.data>=0}))),s=this.props.hideLabels?0:80,c=this.props.hideLabels?0:40,d=Math.min(this.state._width-s,this.state._height-c)/2,f=this._elevateToMinimums(a),v=this.props.innerRadius>1?this._valueInsideDonut(this.props.valueInsideDonut,f):"";return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n},onMouseLeave:this._handleChartMouseLeave},this.props.xAxisAnnotation&&u.createElement("text",{className:this._classNames.axisAnnotation,x:this.state._width/2,y:this.state._height-10,textAnchor:"middle"},this.props.xAxisAnnotation),u.createElement(Uc,{direction:uc.horizontal,handleTabKey:1,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,"aria-label":null==i?void 0:i.chartTitle,ref:function(n){return t._setViewBox(n)},width:this.state._width,height:this.state._height},u.createElement(Qf,{width:this.state._width,height:this.state._height,outerRadius:d,innerRadius:this.props.innerRadius,data:f,enableGradient:this.props.enableGradient,roundCorners:this.props.roundCorners,onFocusCallback:this._focusCallback,hoverOnCallback:this._hoverCallback,hoverLeaveCallback:this._hoverLeave,uniqText:this._uniqText,onBlurCallback:this._onBlur,activeArc:this._getHighlightedLegend(),focusedArcId:this.state.focusedArcId||"",href:this.props.href,calloutId:this._calloutId,valueInsideDonut:this._toLocaleString(v),theme:this.props.theme,showLabelsInPercent:this.props.showLabelsInPercent,hideLabels:this.props.hideLabels}))),u.createElement($n,(0,o.Cl)({target:this._currentHoverElement,alignTargetEdge:!0,isBeakVisible:!1,directionalHint:3,gapSpace:15,hidden:!(!this.props.hideTooltip&&this.state.showHover),id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,zs(this.state.callOutAccessibilityData,"text",!1)),this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(yc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.value,color:this.state.color,culture:this.props.culture})),!r&&u.createElement("div",{className:this._classNames.legendContainer},l))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._elevateToMinimums=function(t){var n=0,i=[];return t.forEach((function(t){n+=t.data})),t.forEach((function(t){i.push(.01*n>t.data&&t.data>0?(0,o.Cl)((0,o.Cl)({},t),{data:.01*n,yAxisCalloutData:void 0===t.yAxisCalloutData?t.data.toLocaleString():t.yAxisCalloutData}):t)})),i},n.prototype._setViewBox=function(t){var n,i;if(null!==t){var e=t.parentElement?t.parentElement.clientWidth:this.state._width,r=t.parentElement&&(null===(n=t.parentElement)||void 0===n?void 0:n.offsetHeight)>this.state._height?null===(i=t.parentElement)||void 0===i?void 0:i.offsetHeight:this.state._height,o="0 0 ".concat(e," ").concat(r);t.setAttribute("viewBox",o)}},n.prototype._createLegends=function(t){var n=this;"sorted"===this.props.order&&t.sort((function(t,n){return n.data-t.data}));var i=t.map((function(t,i){var e,r,o=n.props.enableGradient?(null===(e=t.gradient)||void 0===e?void 0:e[0])||kc(i,0,null===(r=n.props.theme)||void 0===r?void 0:r.isInverted)[0]:t.color;return{title:t.legend,color:o,hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:t.legend})},onMouseOutAction:function(){n.setState({activeLegend:void 0})}}}));return u.createElement(vf,(0,o.Cl)({legends:i,centerLegends:!0,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;this.props.legendProps&&(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._hoverLeave=function(){},n.prototype._valueInsideDonut=function(t,n){var i=this,e=this._getHighlightedLegend();if(void 0===t||1!==e.length&&!this.state.showHover){if(e.length>0){var r=0;return n.forEach((function(t){e.includes(t.legend)&&(r+=t.data)})),r}return t}var o=n.find((function(t){return i._isLegendHighlighted(t.legend)}));return o?o.yAxisCalloutData?o.yAxisCalloutData:o.data:t},n.prototype._toLocaleString=function(t){var n=(0,Yn.c$)(t,this.props.culture,this.props.useUTC);return n?null==n?void 0:n.toString():t},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.filter((function(t){return t.data>0})).length>0)},n.defaultProps={innerRadius:0,hideLabels:!0},n}(u.Component);!function(t){t.shade30="#004578",t.shade20="#005a9e",t.shade10="#106ebe",t.primary="#0078d4",t.tint10="#2b88d8",t.tint20="#c7e0f4",t.tint30="#deecf9",t.tint40="#eff6fc"}(Uf||(Uf={})),function(t){t.black="#000000",t.gray220="#11100f",t.gray210="#161514",t.gray200="#1b1a19",t.gray190="#201f1e",t.gray180="#252423",t.gray170="#292827",t.gray160="#323130",t.gray150="#3b3a39",t.gray140="#484644",t.gray130="#605e5c",t.gray120="#797775",t.gray110="#8a8886",t.gray100="#979593",t.gray90="#a19f9d",t.gray80="#b3b0ad",t.gray70="#bebbb8",t.gray60="#c8c6c4",t.gray50="#d2d0ce",t.gray40="#e1dfdd",t.gray30="#edebe9",t.gray20="#f3f2f1",t.gray10="#faf9f8",t.white="#ffffff"}(qf||(qf={})),function(t){t.pinkRed10="#750b1c",t.red20="#a4262c",t.red10="#d13438",t.redOrange20="#603d30",t.redOrange10="#da3b01",t.orange30="#8e562e",t.orange20="#ca5010",t.orange10="#ffaa44",t.yellow10="#fce100",t.orangeYellow20="#986f0b",t.orangeYellow10="#c19c00",t.yellowGreen10="#8cbd18",t.green20="#0b6a0b",t.green10="#498205",t.greenCyan10="#00ad56",t.cyan40="#005e50",t.cyan30="#005b70",t.cyan20="#038387",t.cyan10="#00b7c3",t.cyanBlue20="#004e8c",t.cyanBlue10="#0078d4",t.blue10="#4f6bed",t.blueMagenta40="#373277",t.blueMagenta30="#5c2e91",t.blueMagenta20="#8764b8",t.blueMagenta10="#8378de",t.magenta20="#881798",t.magenta10="#c239b3",t.magentaPink20="#9b0062",t.magentaPink10="#e3008c",t.gray40="#393939",t.gray30="#7a7574",t.gray20="#69797e",t.gray10="#a0aeb2"}(Zf||(Zf={}));var iv=function(t){return(0,o.Cl)((0,o.Cl)({},t.fonts.medium),{display:"flex",flexDirection:"column",padding:"8px",position:"absolute",textAlign:"center",top:"0px",background:t.semanticColors.bodyBackground,borderRadius:"2px",pointerEvents:"none",color:t.semanticColors.bodyText})},ev=function(t,n){var i;return[n,(i={textAlign:"center",fontWeight:It.BO.semibold,fontStyle:"normal",lineHeight:It.s.medium,color:qf.gray160,fill:t.semanticColors.bodyText},i[It.up]={fill:"CanvasText"},i)]},rv=function(t){var n;return{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:t.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},ov=function(t){var n;return{fontSize:It.s.medium,fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},uv=(0,r.I)(nv,(function(t){var n=t.className,i=t.theme;return{root:[i.fonts.medium,"ms-DonutChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},n],chart:{boxSizing:"content-box",overflow:"visible",alignmentAdjust:"center",display:"block"},legendContainer:{paddingTop:"16px",width:"100%"},axisAnnotation:ev(i,i.fonts.small)}}));function av(t,n){if(t=function(t){let n;for(;n=t.sourceEvent;)t=n;return t}(t),void 0===n&&(n=t.currentTarget),n){var i=n.ownerSVGElement||n;if(i.createSVGPoint){var e=i.createSVGPoint();return e.x=t.clientX,e.y=t.clientY,[(e=e.matrixTransform(n.getScreenCTM().inverse())).x,e.y]}if(n.getBoundingClientRect){var r=n.getBoundingClientRect();return[t.clientX-r.left-n.clientLeft,t.clientY-r.top-n.clientTop]}}return[t.pageX,t.pageY]}function lv(t){return t[0]}function sv(t){return t[1]}function cv(t,n){var i=pf(!0),e=null,r=hl,o=null,u=_f(a);function a(a){var l,s,c,d=(a=hf(a)).length,f=!1;for(null==e&&(o=r(c=u())),l=0;l<=d;++l)!(l<d&&i(s=a[l],l,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(s,l,a),+n(s,l,a));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?lv:pf(t),n="function"==typeof n?n:void 0===n?sv:pf(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:pf(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:pf(+t),a):n},a.defined=function(t){return arguments.length?(i="function"==typeof t?t:pf(!!t),a):i},a.curve=function(t){return arguments.length?(r=t,null!=e&&(o=r(e)),a):r},a.context=function(t){return arguments.length?(null==t?e=o=null:o=r(e=t),a):e},a}var dv=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._tooltipHostId=p("tooltip-host"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._measureText=function(){if(e._tooltipHost.current&&"function"==typeof e._tooltipHost.current.getBBox){var t=e._tooltipHost.current.getBBox();e.setState({textX:t.x,textY:t.y,textWidth:t.width,textHeight:t.height})}},e._getTargetElement=function(){if(e._tooltipHost.current)return e._tooltipHost.current},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipBlur=function(t){e._ignoreNextFocusEvent=(null===document||void 0===document?void 0:document.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props.delay;if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e.state.isOverflowing&&(!t.target||!Tc(t.target,e._getTargetElement())))if(e._clearDismissTimer(),e._clearOpenTimer(),i!==Zc.zero){var r=e._getDelayTime(i);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),r)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Vt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t})},e._getDelayTime=function(t){switch(t){case Zc.medium:return 300;case Zc.long:return 500;default:return 0}},e._wrapContent=function(){var t=e.props,n=t.content,i=t.wrapContent,r=t.maxWidth,o=void 0===r?Number.POSITIVE_INFINITY:r,u=t.maxHeight,a=!1;n&&i&&i(n,e._tooltipHostId,o,u)&&(a=!0),e.state.isOverflowing!==a&&e.setState({isOverflowing:a})},e.state={isTooltipVisible:!1,isOverflowing:!1},e._async=new Nt(e),e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.content,i=t.tooltipProps,e=t.textProps,r=t.shouldReceiveFocus,a=void 0===r||r,l=t.showBackground,s=void 0!==l&&l,c=this.state,d=c.isTooltipVisible,f=c.textWidth,v=c.textHeight,h=(0,o.Cl)({content:n,targetElement:this._getTargetElement(),calloutProps:{onDismiss:this._hideTooltip,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},i),p=!!this.props.isTooltipVisibleProp&&this.state.isOverflowing&&!!n||d&&!!n,g=("number"==typeof(null==e?void 0:e.x)?e.x:0)-(null!=f?f:0)/2-3,y=("number"==typeof(null==e?void 0:e.y)?e.y:0)-(null!=v?v:0)/2-6;return u.createElement(u.Fragment,null,s&&u.createElement("rect",{x:g,y:y,width:(null!=f?f:0)+6,height:(null!=v?v:0)+3,transform:null==e?void 0:e.transform,className:this.props.className}),u.createElement("text",(0,o.Cl)({},e,{id:this._tooltipHostId,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,"data-is-focusable":a&&this.state.isOverflowing}),n),p&&u.createElement(Qc,(0,o.Cl)({},h)))},n.prototype.componentDidMount=function(){this._wrapContent(),this._measureText()},n.prototype.componentDidUpdate=function(t){this.props.maxWidth===t.maxWidth&&this.props.maxHeight===t.maxHeight||(this._wrapContent(),this._measureText())},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:Zc.medium},n}(u.Component),fv=function(t,n){if(t){var i=Eo(t);return i?(i.opacity=Math.max(0,Math.min(1,n)),i.toString()):t}},vv=function(t){var n=t.theme,i=t.className,e=function(t){return fv(t.semanticColors.bodyBackground,.8)}(n),r=n.semanticColors.bodyText,o=n.semanticColors.bodyDivider;return{root:[{position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible",zIndex:1},i],annotation:[n.fonts.small,{position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",backgroundColor:e,color:r,padding:"4px 8px",borderRadius:4,boxShadow:n.effects.elevation4,border:"1px solid ".concat(o),whiteSpace:"pre-wrap",zIndex:2}],connectorLayer:[{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"}],measurement:[{position:"absolute",visibility:"hidden",pointerEvents:"none"}],annotationContent:[{width:"100%",height:"100%",pointerEvents:"none"}],annotationForeignObject:[{overflow:"visible",pointerEvents:"none"}],annotationContentInteractive:[{pointerEvents:"auto"}],annotationForeignObjectInteractive:[{pointerEvents:"auto"}],connectorGroup:[{pointerEvents:"none"}]}},hv=(0,a.Z)(),pv="<".codePointAt(0),gv=">".codePointAt(0),yv=function(t,n){var i,e;return null!==(e=null!==(i=t.id)&&void 0!==i?i:"string"==typeof t.text||"number"==typeof t.text?String(t.text):void 0)&&void 0!==e?e:"annotation-".concat(n)},mv=function(t,n){if(0!==n.length){var i=t[t.length-1];i&&"text"===i.type?i.content+=n:t.push({type:"text",content:n})}},bv=function(t){return t.map((function(t){return"text"===t.type?t.content:"br"===t.type?"<br />":"<".concat(t.tag,">").concat(bv(t.children),"</").concat(t.tag,">")})).join("")},xv=function(t){return t.map((function(t){return"text"===t.type?t.content:"br"===t.type?"\n":xv(t.children)})).join("")},wv=function(t,n){return t.map((function(t,i){var e="".concat(n,"-").concat(i);if("text"===t.type)return u.createElement(u.Fragment,{key:e},t.content);if("br"===t.type)return u.createElement("br",{key:e});var r="b"===t.tag?"strong":"em";return u.createElement.apply(u,(0,o.fX)([r,{key:e}],wv(t.children,e),!1))}))},Mv=function(t,n){var i,e=wv(t,n);return e.length<=1?null!==(i=e[0])&&void 0!==i?i:null:e},Cv=function(t,n){var i=null==t?void 0:t(n);if("number"==typeof i&&!Number.isNaN(i))return t&&"function"==typeof t.bandwidth?i+t.bandwidth()/2:i},kv=function(t,n,i){return Math.max(n,Math.min(i,t))},Av=u.memo((function(t){var n=t.annotations,i=t.theme,e=t.context,r=t.className,a=hv(vv,{theme:i,className:r}),l=u.useMemo((function(){return p("chart-annotation")}),[]),s=u.useState({}),c=s[0],d=s[1],f=u.useMemo((function(){return(null!=n?n:[]).map((function(t,n){return{annotation:t,key:yv(t,n)}}))}),[n]);u.useEffect((function(){d((function(t){if(0===f.length)return 0===Object.keys(t).length?t:{};var n={};if(f.forEach((function(i){var e=i.key;t[e]&&(n[e]=t[e])})),Object.keys(n).length===Object.keys(t).length){for(var i=!0,e=0,r=Object.keys(n);e<r.length;e++){var o=r[e];if(n[o]!==t[o]){i=!1;break}}if(i)return t}return n}))}),[f]);var v=u.useCallback((function(t,n,i,e){d((function(r){var u,a=r[t];return a&&a.signature===e&&Math.abs(a.width-n)<.5&&Math.abs(a.height-i)<.5||0===n&&0===i?r:(0,o.Cl)((0,o.Cl)({},r),((u={})[t]={width:n,height:i,signature:e},u))}))}),[]),h=[],g=[],y=[];if(f.forEach((function(t){var n,r,l,s,d,f,p,m,b,x,w,M,C,k,A,S,L,D,V,N,O,T,E,F,B,P,_,H,I,W,R,j,$,Y,X,G,U,q=t.annotation,Z=t.key,K=function(t,n){var i,e,r=t.coordinates,o=t.layout;if(r){var u=null!==(i=null==o?void 0:o.offsetX)&&void 0!==i?i:0,a=null!==(e=null==o?void 0:o.offsetY)&&void 0!==e?e:0,l={x:0,y:0};switch(r.type){case"data":var s=r.x,c=r.y,d=r.yAxis,f=void 0===d?"primary":d,v=n.xScale,h="secondary"===f?n.yScaleSecondary:n.yScalePrimary;if(!v||!h)return;var p=Cv(v,s instanceof Date?s.getTime():s),g=Cv(h,c instanceof Date?c.getTime():c);if("number"!=typeof p||"number"!=typeof g)return;l.x=p,l.y=g;break;case"relative":if("number"!=typeof r.x||"number"!=typeof r.y)return;l.x=n.plotRect.x+n.plotRect.width*r.x,l.y=n.plotRect.y+n.plotRect.height*r.y;break;case"pixel":if("number"!=typeof r.x||"number"!=typeof r.y)return;l.x=n.plotRect.x+r.x,l.y=n.plotRect.y+r.y;break;default:return}var y=l.x+u,m=l.y+a;return(null==o?void 0:o.clipToBounds)&&(y=kv(y,n.plotRect.x,n.plotRect.x+n.plotRect.width),m=kv(m,n.plotRect.y,n.plotRect.y+n.plotRect.height)),{anchor:l,point:{x:y,y:m}}}}(q,e);if(K){var J=function(t){var n,i;if(!t)return[];for(var e,r=function(t){var n={amp:"&",quot:'"',apos:"'",nbsp:" "},i=t.replace(/&(#x?[0-9a-f]+|#\d+|[a-z][\w-]*);/gi,(function(t,i){var e,r=i.toLowerCase();if("lt"===r||"gt"===r)return"&".concat(r,";");if(r.startsWith("#")){var o="x"===r[1],u=r.slice(o?2:1),a=Number.parseInt(u,o?16:10);return Number.isNaN(a)?t:a===pv?"<":a===gv?">":String.fromCodePoint(a)}return null!==(e=n[r])&&void 0!==e?e:t}));return i.replace(/<([^;]+)>/gi,(function(t,n){switch(n.trim().replace(/\s+/g," ").toLowerCase()){case"b":return"<b>";case"/b":return"</b>";case"i":return"<i>";case"/i":return"</i>";case"br":case"br/":case"br /":return"<br />";default:return t}}))}(t),o=[],u=[{node:null}],a=function(){var t,n;return null!==(n=null===(t=u[u.length-1].node)||void 0===t?void 0:t.children)&&void 0!==n?n:o},l=/<\/?([a-z]+)\s*\/?\s*>/gi,s=0;null!==(e=l.exec(r));){var c=e[0],d=e[1].toLowerCase(),f=c.startsWith("</"),v=/\/\s*>$/.test(c);if(mv(a(),r.slice(s,e.index)),s=e.index+c.length,"br"!==d||f)if("b"!==d&&"i"!==d||v)mv(a(),c);else if(f){var h=u[u.length-1].node;u.length>1&&(null==h?void 0:h.tag)===d?u.pop():mv(a(),c)}else{if(u.length-1>=5){mv(a(),c);continue}var p={type:"element",tag:d,children:[]};a().push(p),u.push({node:p})}else a().push({type:"br"})}for(mv(a(),r.slice(s));u.length>1;)if(p=u.pop().node){var g=null!==(i=null===(n=u[u.length-1].node)||void 0===n?void 0:n.children)&&void 0!==i?i:o;if(g[g.length-1]===p)g.pop();else{var y=g.indexOf(p);-1!==y&&g.splice(y,1)}mv(g,"<".concat(p.tag,">").concat(bv(p.children),"</").concat(p.tag,">"))}return o}(void 0===q.text||null===q.text?"":String(q.text)),Q=JSON.stringify(J),tt=xv(J),nt=q.layout,it=null!==(n=null==nt?void 0:nt.align)&&void 0!==n?n:"center",et=null!==(r=null==nt?void 0:nt.verticalAlign)&&void 0!==r?r:"middle",rt=null!==(s=null===(l=q.style)||void 0===l?void 0:l.opacity)&&void 0!==s?s:.8,ot=null!==(f=null===(d=q.style)||void 0===d?void 0:d.backgroundColor)&&void 0!==f?f:i.semanticColors.bodyBackground,ut=void 0!==(null===(p=q.style)||void 0===p?void 0:p.backgroundColor)||void 0!==(null===(m=q.style)||void 0===m?void 0:m.opacity),at=(0,o.Cl)((0,o.Cl)({maxWidth:null==nt?void 0:nt.maxWidth},ut&&{backgroundColor:fv(ot,rt)}),{borderColor:null===(b=q.style)||void 0===b?void 0:b.borderColor,borderWidth:null===(x=q.style)||void 0===x?void 0:x.borderWidth,borderStyle:null!==(M=null===(w=q.style)||void 0===w?void 0:w.borderStyle)&&void 0!==M?M:(null===(C=q.style)||void 0===C?void 0:C.borderColor)?"solid":void 0,borderRadius:null===(k=q.style)||void 0===k?void 0:k.borderRadius,padding:null===(A=q.style)||void 0===A?void 0:A.padding,boxShadow:null===(S=q.style)||void 0===S?void 0:S.boxShadow}),lt={color:null===(L=q.style)||void 0===L?void 0:L.textColor,fontSize:null===(D=q.style)||void 0===D?void 0:D.fontSize,fontWeight:null===(V=q.style)||void 0===V?void 0:V.fontWeight,opacity:1};"number"!=typeof(null===(N=q.style)||void 0===N?void 0:N.rotation)||Number.isNaN(q.style.rotation)||(at.transform="rotate(".concat(q.style.rotation,"deg)"),at.transformOrigin="50% 50%");var st=function(t,n,i,e,r){return JSON.stringify({annotationContentSignature:t,containerStyle:n,contentStyle:i,layoutClassName:null!=e?e:"",styleClassName:null!=r?r:""})}(Q,at,lt,null==nt?void 0:nt.className,null===(O=q.style)||void 0===O?void 0:O.className),ct=c[Z],dt=(null==ct?void 0:ct.signature)===st,ft=dt?ct:void 0,vt=Math.max(null!==(E=null!==(T=null==ft?void 0:ft.width)&&void 0!==T?T:null==nt?void 0:nt.maxWidth)&&void 0!==E?E:180,1),ht=Math.max(null!==(F=null==ft?void 0:ft.height)&&void 0!==F?F:60,1),pt="center"===it?-vt/2:"end"===it?-vt:0,gt="middle"===et?-ht/2:"bottom"===et?-ht:0,yt=K.point.x+pt,mt=K.point.y+gt,bt=!1!==(null==nt?void 0:nt.clipToBounds),xt=bt?e.plotRect.x:0,wt=bt?e.plotRect.y:0,Mt=bt?e.plotRect.width:null!==(B=e.svgRect.width)&&void 0!==B?B:0,Ct=bt?e.plotRect.height:null!==(P=e.svgRect.height)&&void 0!==P?P:0,kt=Mt>0?xt+Mt-vt:yt,At=Ct>0?wt+Ct-ht:mt,St=Mt>0?kv(yt,xt,Math.max(xt,kt)):yt,Lt=Ct>0?kv(mt,wt,Math.max(wt,At)):mt,Dt={x:St-pt,y:Lt-gt};if(q.connector){var Vt=null!==(_=q.connector.startPadding)&&void 0!==_?_:12,Nt=null!==(H=q.connector.endPadding)&&void 0!==H?H:0,Ot=Math.max(Vt+Nt+6,Vt),Tt=Dt.x-K.anchor.x,Et=Dt.y-K.anchor.y;if((Wt=Math.sqrt(Tt*Tt+Et*Et))<Ot){var Ft={x:0,y:-1},Bt=0===Wt?Ft.x:Tt/Wt,Pt=0===Wt?Ft.y:Et/Wt,_t=K.anchor.x+Bt*Ot+pt,Ht=K.anchor.y+Pt*Ot+gt;Dt={x:(St=_t=Mt>0?kv(_t,xt,Math.max(xt,kt)):_t)-pt,y:(Lt=Ht=Ct>0?kv(Ht,wt,Math.max(wt,At)):Ht)-gt}}}var It=(0,o.Cl)({position:"absolute",left:St,top:Lt,pointerEvents:"none",visibility:"hidden"},at);if(dt||g.push(u.createElement("div",{key:"".concat(Z,"-measurement"),ref:function(t){if(t){var n=t.getBoundingClientRect();0===n.width&&0===n.height||v(Z,n.width,n.height,st)}},className:z(a.annotation,a.measurement,null==nt?void 0:nt.className,null===(I=q.style)||void 0===I?void 0:I.className),style:It,"aria-hidden":!0,"data-annotation-key":Z,"data-chart-annotation-measurement":"true"},u.createElement("div",{className:z(a.annotationContent,null==nt?void 0:nt.className,null===(W=q.style)||void 0===W?void 0:W.className),style:lt},Mv(J,"".concat(Z,"-measurement"))))),h.push(u.createElement("foreignObject",{key:"".concat(Z,"-annotation"),x:St,y:Lt,width:vt,height:ht,className:z(a.annotationForeignObject),"data-annotation-key":Z},u.createElement("div",{className:z(a.annotation,null==nt?void 0:nt.className,null===(R=q.style)||void 0===R?void 0:R.className),style:at,"data-annotation-key":Z},u.createElement("div",{className:z(a.annotationContent,null===(j=q.style)||void 0===j?void 0:j.className),style:lt,role:null!==(Y=null===($=q.accessibility)||void 0===$?void 0:$.role)&&void 0!==Y?Y:"note","aria-label":null!==(G=null===(X=q.accessibility)||void 0===X?void 0:X.ariaLabel)&&void 0!==G?G:tt||void 0,"aria-describedby":null===(U=q.accessibility)||void 0===U?void 0:U.ariaDescribedBy,"data-chart-annotation":"true","data-annotation-key":Z},Mv(J,"".concat(Z,"-content")))))),q.connector){var Wt,Rt=q.connector,jt=Rt.startPadding,zt=(Vt=void 0===jt?12:jt,Rt.endPadding),$t=(Nt=void 0===zt?0:zt,Rt.strokeColor),Yt=void 0===$t?function(t){return t.palette.neutralPrimary}(i):$t,Xt=Rt.strokeWidth,Gt=void 0===Xt?2:Xt,Ut=Rt.dashArray,qt=Rt.arrow,Zt=void 0===qt?"end":qt,Kt=(Tt=K.anchor.x-Dt.x,Et=K.anchor.y-Dt.y,Bt=Tt/(Wt=Math.sqrt(Tt*Tt+Et*Et)||1),Pt=Et/Wt,Math.max(1,Math.min(vt,ht))),Jt=Vt>0?1.25*Vt:24,Qt=.6*Wt,tn=kv(.35*Kt,6,Math.min(24,Jt,Qt)),nn=kv(Gt,1,tn/2),en={x:Dt.x+Bt*Vt,y:Dt.y+Pt*Vt},rn={x:K.anchor.x-Bt*Nt,y:K.anchor.y-Pt*Nt};y.push({key:"".concat(Z,"-connector"),start:en,end:rn,strokeColor:Yt,strokeWidth:Gt,dashArray:Ut,arrow:Zt,markerSize:tn,markerStrokeWidth:nn})}}})),0===h.length&&0===y.length)return null;var m=e.svgRect.width||1,b=e.svgRect.height||1,x=[],w=function(t,n,i,e){var r="".concat(l,"-").concat(n,"-").concat(x.length),o=i/2,a="end"===n?i:0,s="M0 0 L ".concat(i," ").concat(o," L0 ").concat(i," Z"),c="M ".concat(i," 0 L0 ").concat(o," L ").concat(i," ").concat(i," Z"),d="end"===n?s:c;return x.push(u.createElement("marker",{key:r,id:r,markerWidth:i,markerHeight:i,viewBox:"0 0 ".concat(i," ").concat(i),refX:a,refY:o,orient:"auto",markerUnits:"userSpaceOnUse"},u.createElement("path",{d:d,fill:t,stroke:t,strokeWidth:e,strokeLinecap:"round",strokeLinejoin:"round"}))),r},M=y.map((function(t){var n,i;return"start"!==t.arrow&&"both"!==t.arrow||(n=w(t.strokeColor,"start",t.markerSize,t.markerStrokeWidth)),"end"!==t.arrow&&"both"!==t.arrow||(i=w(t.strokeColor,"end",t.markerSize,t.markerStrokeWidth)),u.createElement("line",{key:t.key,x1:t.start.x,y1:t.start.y,x2:t.end.x,y2:t.end.y,stroke:t.strokeColor,strokeWidth:t.strokeWidth,strokeDasharray:t.dashArray,strokeLinecap:"round",markerStart:n?"url(#".concat(n,")"):void 0,markerEnd:i?"url(#".concat(i,")"):void 0})})),C=y.length>0||h.length>0;return u.createElement("div",{className:a.root,role:"presentation","data-chart-annotation-layer":"true"},C&&u.createElement("svg",{className:a.connectorLayer,width:"100%",height:"100%",viewBox:"0 0 ".concat(m," ").concat(b),preserveAspectRatio:"none","data-chart-annotation-svg":"true"},x.length>0&&u.createElement("defs",null,x),M.length>0&&u.createElement("g",{"aria-hidden":"true",className:a.connectorGroup},M),h),g)}));Av.displayName="ChartAnnotationLayer";var Sv=(0,a.Z)(),Lv=u.lazy((function(){return Promise.resolve().then(i.bind(i,357)).then((function(t){return{default:t.ChartHoverCard}}))})),Dv=function(t){function n(n){var i=t.call(this,n)||this;return i.minLegendContainerHeight=32,i._isRtl=(0,l.jI)(),i._isFirstRender=!0,i._removalValueForTextTuncate=0,i._yAxisTickText=[],i.isIntegralDataset=!0,i.calculateMaxYAxisLabelLength=function(t){return Ds(i._yAxisTickText.map((function(t){return n=t,i.props.showYAxisLablesTooltip?function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.slice(0,n)+i}(n,i.props.noOfCharsToTruncate||4):n;var n})),".".concat(t," text"))},i._multiValueCallout=function(t){var n=i._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:i._classNames.calloutContentRoot},u.createElement("div",{className:i._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:i._classNames.calloutContentX},zs(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,i.props.culture,i.props.useUTC))),u.createElement("div",{className:i._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,e,r){var a=e+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},zs(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(e),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(i.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(i.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),i._getCalloutContent(t,e,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:i._classNames.descriptionMessage},t.descriptionMessage)))},i._getData=function(t,n,e){i.props.getGraphData&&i.props.getGraphData(t,n,i.state.containerHeight-i._removalValueForTextTuncate,i.state.containerWidth,i.xAxisElement,i.yAxisElement,e)},i._onChartLeave=function(){i.props.onChartMouseLeave&&i.props.onChartMouseLeave()},i._calculateChartMinWidth=function(){var t=i._calcMaxLabelWidthWithTransform(i._tickValues)+10,n=i.margins.left+i.margins.right+t*(i._tickValues.length-1);return[is.GroupedVerticalBarChart,is.VerticalBarChart,is.VerticalStackedBarChart].includes(i.props.chartType)&&(n+=16),n},i._getChartDescription=function(){return(i.props.chartTitle||"Chart. ")+i._getAxisTitle("X",i.props.xAxisTitle,i.props.xAxisType)+i._getAxisTitle("Y",i.props.yAxisTitle,i.props.yAxisType||rs.NumericAxis)+(i.props.secondaryYScaleOptions?i._getAxisTitle("secondary Y",i.props.secondaryYAxistitle,rs.NumericAxis):"")},i._getAxisTitle=function(t,n,i){return"The ".concat(t," axis displays ")+(n||(i===es.StringAxis||i===rs.StringAxis?"categories":i===es.DateAxis||i===rs.DateAxis?"time":"values"))+". "},i._calcMaxLabelWidthWithTransform=function(t){if(!i.props.wrapXAxisLables&&i.props.rotateXAxisLables&&i.props.xAxisType===es.StringAxis){var n=Ds(t,".".concat(i._classNames.xAxis," text"));return Math.ceil(n*Math.cos(Math.PI/4))}if(i.props.showXAxisLablesTooltip){var e=t.map((function(t){var n=i.props.noOfCharsToTruncate||4;return t.toString().length>n?"".concat(t.toString().slice(0,n),"..."):t})),r=Ds(e,".".concat(i._classNames.xAxis," text"));return Math.ceil(r)}if(i.props.wrapXAxisLables){var o=[];t.forEach((function(t){o.push.apply(o,t.toString().split(/\s+/))}));var u=Ds(o,".".concat(i._classNames.xAxis," text"));return Math.max(Math.ceil(u),10)}var a=Ds(t,".".concat(i._classNames.xAxis," text"));return Math.ceil(a)},i._transformXAxisLabels=function(){var t,n,e;if(i._removalValueForTextTuncate=0,i.props.wrapXAxisLables||i.props.showXAxisLablesTooltip){var r=void 0;i.props.xAxisType===es.StringAxis&&(r=((null===(t=i.props.datasetForXAxisDomain)||void 0===t?void 0:t.length)||0)>1?i._xScale.step():i.state.containerWidth);var o={node:i.xAxisElement,xAxis:i._xScale,showXAxisLablesTooltip:i.props.showXAxisLablesTooltip||!1,noOfCharsToTruncate:i.props.noOfCharsToTruncate||4,width:r};i._removalValueForTextTuncate=null!==(n=function(t){var n=t.node,i=t.xAxis,e=t.noOfCharsToTruncate,r=t.showXAxisLablesTooltip,o=t.width,u=void 0===o?10:o;if(null!==n){var a=sl(n).call(i),l=0,s=1;if(a.selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i="".concat(t.text().slice(0,e),"..."),o=t.text().length,a=t.text().split(/\s+/).reverse(),l="",c=[],d=0,f=t.attr("y"),v=parseFloat(t.attr("dy")),h=t.text(null).append("tspan").attr("x",0).attr("y",f).attr("id","BaseSpan").attr("dy",v+"em").attr("data-",n);if(r&&o>e)h=t.append("tspan").attr("id","showDots").attr("x",0).attr("y",f).attr("dy",v+"em").text(i);else if(r&&o<=e)h=t.append("tspan").attr("id","LessLength").attr("x",0).attr("y",f).attr("dy",v+"em").text(n);else for(;l=a.pop();)c.push(l),h.text(c.join(" ")),h.node().getComputedTextLength()>u&&c.length>1&&(c.pop(),h.text(c.join(" ")),c=[l],h=t.append("tspan").attr("id","WordBreakId").attr("x",0).attr("y",f).attr("dy",1.1*++d+v+"em").text(l));s=Math.max(s,d+1)})),!r){var c=12,d=document.getElementById("WordBreakId"),f=d&&d.getBoundingClientRect(),v=f&&f.height;v>c&&(c=v),l=(s-1)*c}return l>0?l:0}}(o))&&void 0!==n?n:0}if(!i.props.wrapXAxisLables&&i.props.rotateXAxisLables&&i.props.xAxisType===es.StringAxis){var u=null!==(e=function(t){var n=t.node,i=t.xAxis;if(null!==n&&null!==i){var e=0,r=[];sl(n).call(i).selectAll(".tick").each((function(){var t=this.getAttribute("transform");if(-1===(null==t?void 0:t.indexOf("rotate"))){var n=t.substring(t.indexOf("(")+1,t.indexOf(")")).split(",");2===n.length&&(r.push(n[0]),this.setAttribute("transform","translate(".concat(n[0],",0)rotate(-45)")))}var i=this.getBoundingClientRect(),o=i&&i.height;o>e&&(e=o)}));var o=0;return sl(n).call(i).selectAll(".tick").each((function(){r.length>o&&(this.setAttribute("transform","translate(".concat(r[o],",").concat(e/2,")rotate(-45)")),o+=1)})),Math.floor(e/1.414)}}({node:i.xAxisElement,xAxis:i._xScale}))&&void 0!==e?e:0;i._removalValueForTextTuncate=u+i.margins.bottom}},i._calcMargins=function(){var t=i._getDefaultMargins();return t=i._applyTitleMargins(t),t=i._applyAnnotationMargins(t),i._isRtl&&(t=i._swapRtlMargins(t)),(0,o.Cl)((0,o.Cl)({},t),i.props.margins)},i._getDefaultMargins=function(){return{top:20,bottom:35,left:Math.max(40,i.state.startFromX+20),right:i.props.secondaryYScaleOptions?40:20}},i._applyTitleMargins=function(t){var n=(0,o.Cl)({},t);return void 0!==i.props.xAxisTitle&&""!==i.props.xAxisTitle&&(n.bottom+=20),void 0!==i.props.yAxisTitle&&""!==i.props.yAxisTitle&&(n.left+=24),void 0!==i.props.secondaryYAxistitle&&""!==i.props.secondaryYAxistitle&&(n.right+=24),n},i._applyAnnotationMargins=function(t){var n=(0,o.Cl)({},t);return void 0!==i.props.xAxisAnnotation&&""!==i.props.xAxisAnnotation&&(n.top+=20),void 0===i.props.yAxisAnnotation||""===i.props.yAxisAnnotation||void 0!==i.props.secondaryYAxistitle&&""!==i.props.secondaryYAxistitle||(n.right+=24),n},i._swapRtlMargins=function(t){return(0,o.Cl)((0,o.Cl)({},t),{left:t.right,right:t.left})},i.state={containerHeight:0,containerWidth:0,_width:i.props.width||600,_height:i.props.height||350,startFromX:0},i.idForGraph=p("chart_"),i.idForDefaultTabbableElement=p("defaultTabbableElement_"),i._tooltipId=p("tooltip_"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){if(this._fitParentContainer(),this.props.showYAxisLables){var t=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==t&&this.setState({startFromX:t})}else 0!==this.state.startFromX&&this.setState({startFromX:0});this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0}))},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.componentDidUpdate=function(t){if(t.height===this.props.height&&t.width===this.props.width||this._fitParentContainer(),this.props.showYAxisLables){var n=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==n&&this.setState({startFromX:n})}else 0!==this.state.startFromX&&this.setState({startFromX:0});t.points!==this.props.points&&(this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0})))},n.prototype.render=function(){var t,n,i,e,r,a,l,s,c,d,f=this,v=this.props,h=v.calloutProps,p=v.points,g=v.chartType,y=v.chartHoverProps,m=v.svgFocusZoneProps,b=v.svgProps,x=v.culture,w=v.dateLocalizeOptions,M=v.timeFormatLocale,C=v.customDateTimeFormatter;this.props.parentRef&&this._fitParentContainer(),this.margins=this._calcMargins(),this.props.getmargins&&this.props.getmargins(this.margins),this._classNames=Sv(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,enableReflow:this.props.enableReflow});var k,A,S,L,D,V,N,O=null,T=null;if(this.props.enableFirstRenderOptimization&&this.chartContainer||!this.props.enableFirstRenderOptimization){this._isFirstRender=!1;var E=(0,o.Cl)({domainNRangeValues:this.props.getDomainNRangeValues(p,this.props.getDomainMargins?this.props.getDomainMargins(this.state.containerWidth):this.margins,this.state.containerWidth,g,this._isRtl,this.props.xAxisType,this.props.barwidth,this.props.tickValues),containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,margins:this.margins,xAxisElement:this.xAxisElement,showRoundOffXTickValues:null===(r=this.props.showRoundOffXTickValues)||void 0===r||r,xAxisCount:this.props.xAxisTickCount,xAxistickSize:this.props.xAxistickSize,tickPadding:this.props.tickPadding||this.props.showXAxisLablesTooltip?5:10,xAxisPadding:this.props.xAxisPadding,xAxisInnerPadding:this.props.xAxisInnerPadding,xAxisOuterPadding:this.props.xAxisOuterPadding,containerWidth:this.state.containerWidth,hideTickOverlap:this.props.hideTickOverlap,calcMaxLabelWidth:this._calcMaxLabelWidthWithTransform},this.props.xAxis),F=void 0,B=void 0;switch(this.props.xAxisType){case es.NumericAxis:F=(t=xs(E,this.props.tickParams,this.props.chartType,x,this.props.xScaleType)).xScale,B=t.tickValues;break;case es.DateAxis:F=(n=function(t,n,i,e,r,o,u,a){var l=t.domainNRangeValues,s=t.xAxisElement,c=t.tickPadding,d=void 0===c?6:c,f=t.xAxistickSize,v=void 0===f?6:f,h=t.xAxisCount,p=t.calcMaxLabelWidth,g=t.tickStep,y=t.tick0,m=t.tickText,b=u?Au():ku();b.domain([l.dStartValue,l.dEndValue]).range([l.rStartValue,l.rEndValue]).nice();var x=null!=h?h:6,w=100,M=-1,C=r?$e(r):void 0;b.ticks().forEach((function(t){var n=ws(t,u);n>M&&(M=n),n<w&&(w=n)}));var k=null!=e?e:(0,Yn.c2)(w,M),A=function(t,n,i,e){var r="%c",o="%a %d, %X",u="%b %d, %X",a="%-I:%M %p",l="%b %d, %-I:%M %p",s="%b %d, %-I %p",c="%b %d";return(i?e?i.utcFormat:i.format:e?Ge:Xe)([[".%L",":%S.%L","%M:%S.%L","%-I:%M:%S.%L %p",o,u,u,r],[r,":%S","%-I:%M:%S","%X",o,u,u,r],[r,r,a,a,"%a %d, %-I:%M %p",l,l,"%x, %-I:%M %p"],[r,r,r,"%-I %p","%a %d, %-I %p",s,s,"%x, %-I %p"],[r,r,r,r,"%a %d",c,c,"%x"],[r,r,r,r,r,c,c,"%x"],[r,r,r,r,r,r,"%B","%b %Y"],[r,r,r,r,r,r,r,"%Y"]][t][n])}(w,M,C,u),S=function(t,e){return n.tickValues&&m&&void 0!==m[e]?m[e]:o?o(t):r?A(t):void 0===i&&n.tickFormat?u?Ge(n.tickFormat)(t):Xe(n.tickFormat)(t):(0,Yn.Yn)(t,i,u,!1,k)},L=p(b.ticks().map(S))+40,D=b.range(),V=D[0],N=D[1],O=Math.min(Math.max(1,Math.floor(Math.abs(N-V)/L)),10);x=Math.min(O,null!=h?h:x);var T,E=ni(b).tickSize(v).tickPadding(d).ticks(x).tickFormat(S);[is.GanttChart].includes(a)&&E.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?T=n.tickValues:g&&(T=pc(g,y,b.domain(),u)),T&&E.tickValues(T),s&&sl(s).call(E).selectAll("text").attr("aria-hidden","true");var F=(null!=T?T:b.ticks(x)).map(E.tickFormat());return{xScale:b,tickValues:F}}(E,this.props.tickParams,x,w,M,C,this.props.useUTC,this.props.chartType)).xScale,B=n.tickValues;break;case es.StringAxis:i=function(t,n,i){var e,r=t.domainNRangeValues,o=t.xAxistickSize,u=void 0===o?6:o,a=t.tickPadding,l=void 0===a?10:a,s=t.xAxisPadding,c=void 0===s?.1:s,d=t.xAxisInnerPadding,f=t.xAxisOuterPadding,v=t.containerWidth,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=t.tickText,y=Tu().domain(i).range([r.rStartValue,r.rEndValue]).paddingInner(void 0!==d?d:c).paddingOuter(void 0!==f?f:c),m=null!==(e=n.tickValues)&&void 0!==e?e:i;if(h){var b=[],x=m.map((function(t){return p([t])})),w=0,M=v,C=1,k=y.range();k[1]-k[0]<0&&(w=v,M=0,C=-1);for(var A=m.length-1;A>=0;A--){var S=y(m[A]);C*(S-C*x[A]/2-w)>=0&&C*(S+C*x[A]/2-M)<=0&&(b.push(m[A]),M=S-C*(x[A]/2+10))}m=b=b.reverse()}var L=ni(y).tickSize(u).tickPadding(l).tickValues(m).tickFormat((function(t,i){return n.tickValues&&g&&void 0!==g[i]?g[i]:t}));return t.xAxisElement&&sl(t.xAxisElement).call(L).selectAll("text").attr("aria-hidden","true"),{xScale:y,tickValues:m}}(E,this.props.tickParams,this.props.datasetForXAxisDomain),F=i.xScale,B=i.tickValues;break;default:F=(e=xs(E,this.props.tickParams,this.props.chartType,x,this.props.xScaleType)).xScale,B=e.tickValues}this._xScale=F,this._tickValues=B,this._transformXAxisLabels();var P=(0,o.Cl)({margins:this.props.getYDomainMargins?this.props.getYDomainMargins(this.state.containerHeight):this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElement,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:this.props.yMinValue||0,yMaxValue:this.props.yMaxValue||0,tickPadding:10,maxOfYVal:this.props.maxOfYVal,yMinMaxValues:this.props.getMinMaxOfYAxis(p,this.props.yAxisType),yAxisPadding:this.props.yAxisPadding||0,tickValues:this.props.yAxisTickValues},this.props.yAxis),_={yAxisDomainValues:[],yAxisTickText:[]};if(this.props.yAxisType&&this.props.yAxisType===rs.StringAxis)k=this.props.createStringYAxis(P,this.props.stringDatasetForYAxisDomain,this._isRtl,_,this.props.barwidth,this.props.chartType);else{if(null===(a=this.props)||void 0===a?void 0:a.secondaryYScaleOptions){var H={margins:this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElementSecondary,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:(null===(l=this.props.secondaryYScaleOptions)||void 0===l?void 0:l.yMinValue)||0,yMaxValue:null!==(c=null===(s=this.props.secondaryYScaleOptions)||void 0===s?void 0:s.yMaxValue)&&void 0!==c?c:100,tickPadding:10,yMinMaxValues:this.props.getMinMaxOfYAxis(p,this.props.yAxisType,!0),yAxisPadding:this.props.yAxisPadding};A=this.props.createYAxis(H,this._isRtl,_,this.isIntegralDataset,!0,this.props.supportNegativeData,this.props.roundedTicks,this.props.secondaryYScaleType)}k=this.props.createYAxis(P,this._isRtl,_,this.isIntegralDataset,!1,this.props.supportNegativeData,this.props.roundedTicks,this.props.yScaleType)}if(this._yAxisTickText=_.yAxisTickText,this.props.getAxisData&&this.props.getAxisData(_),!this.props.showYAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(this.props.showYAxisLablesTooltip){k&&(S=this.yAxisElement,L=k,D=this.props.noOfCharsToTruncate||4,V=this.props.showYAxisLablesTooltip||!1,N=this._isRtl,null!==S&&sl(S).call(L).selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i=N?"...".concat(t.text().slice(0,D)):"".concat(t.text().slice(0,D),"..."),e=t.text().length,r=t.attr("y"),o=t.attr("x"),u=parseFloat(t.attr("dy"));t.text(null).append("tspan").attr("x",o).attr("y",r).attr("id","BaseSpan").attr("dy",u+"em").attr("data-",n),V&&e>D?t.append("tspan").attr("id","showDots").attr("x",o).attr("y",r).attr("dy",u+"em").attr("dx","0em").text(i):t.append("tspan").attr("id","LessLength").attr("x",o).attr("y",r).attr("dx","0em").text(n)})));var I=sl(this.yAxisElement).call(k);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var W={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:I};I&&Vs(W)}this._getData(F,k,A),T=this.props.children((0,o.Cl)((0,o.Cl)({},this.state),{xScale:F,yScalePrimary:k,yScaleSecondary:A})),!this.props.hideTooltip&&h.isCalloutVisible&&(O=this._generateCallout(h,y))}var R,j={width:this.state.containerWidth,height:this.state.containerHeight},z=Math.max(0,j.width-this.margins.left-this.margins.right),$=Math.max(0,j.height-this.margins.top-this.margins.bottom-this._removalValueForTextTuncate),Y={x:this.margins.left,y:this.margins.top,width:z,height:$},X=null!==(d=this.props.annotations)&&void 0!==d?d:[],G=X.length>0,U=G?{plotRect:Y,svgRect:j,isRtl:this._isRtl,xScale:this._xScale,yScalePrimary:k,yScaleSecondary:A}:void 0;R=this.props.focusZoneDirection===uc.vertical||this.props.focusZoneDirection?this.props.focusZoneDirection:uc.horizontal;var q=j.width-this.margins.left-this.margins.right-16,Z=j.height-this.margins.bottom-this.margins.top-this._removalValueForTextTuncate-16,K=this.margins.top+8+Z/2,J=this._isRtl?j.width-8:16,Q=this._isRtl?16:j.width-8,tt={wrapContent:Ls,theme:this.props.theme,showBackground:!0,className:this._classNames.svgTooltip};return u.createElement("div",{id:this.idForGraph,className:this._classNames.root,ref:function(t){f.chartContainer=t},onMouseLeave:this._onChartLeave},!this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement(Uc,(0,o.Cl)({direction:R,className:this._classNames.chartWrapper,defaultTabbableElement:"#".concat(this.idForDefaultTabbableElement)},m),this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement("svg",(0,o.Cl)({width:j.width,height:j.height,role:"region","aria-label":this._getChartDescription(),style:{display:"block"},className:this._classNames.chart},Us(b)),u.createElement("g",{ref:function(t){f.xAxisElement=t},id:"xAxisGElement".concat(this.idForGraph),transform:"translate(0, ".concat(j.height-this.margins.bottom-this._removalValueForTextTuncate,")"),className:this._classNames.xAxis}),void 0!==this.props.xAxisTitle&&""!==this.props.xAxisTitle&&u.createElement(dv,(0,o.Cl)({content:this.props.xAxisTitle,textProps:{x:this.margins.left+8+q/2,y:j.height-8,className:this._classNames.axisTitle,textAnchor:"middle","aria-hidden":!0},maxWidth:q},tt)),void 0!==this.props.xAxisAnnotation&&""!==this.props.xAxisAnnotation&&u.createElement(dv,(0,o.Cl)({content:this.props.xAxisAnnotation,textProps:{x:this.margins.left+8+q/2,y:12,className:this._classNames.axisAnnotation,textAnchor:"middle","aria-hidden":!0},maxWidth:q},tt)),u.createElement("g",{ref:function(t){f.yAxisElement=t},id:"yAxisGElement".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?j.width-this.margins.right:this.margins.left,", 0)"),className:this._classNames.yAxis}),this.props.secondaryYScaleOptions&&u.createElement("g",null,u.createElement("g",{ref:function(t){f.yAxisElementSecondary=t},id:"yAxisGElementSecondary".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?this.margins.left:j.width-this.margins.right,", 0)"),className:this._classNames.yAxis}),void 0!==this.props.secondaryYAxistitle&&""!==this.props.secondaryYAxistitle&&u.createElement(dv,(0,o.Cl)({content:this.props.secondaryYAxistitle,textProps:{x:Q,y:K,textAnchor:"middle",transform:"rotate(-90, ".concat(Q,", ").concat(K,")"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:Z},tt))),T,void 0!==this.props.yAxisTitle&&""!==this.props.yAxisTitle&&u.createElement(dv,(0,o.Cl)({content:this.props.yAxisTitle,textProps:{x:J,y:K,textAnchor:"middle",transform:"rotate(-90, ".concat(J,", ").concat(K,")"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:Z},tt)),void 0!==this.props.yAxisAnnotation&&""!==this.props.yAxisAnnotation&&(void 0===this.props.secondaryYAxistitle||""===this.props.secondaryYAxistitle)&&u.createElement(dv,(0,o.Cl)({content:this.props.yAxisAnnotation,textProps:{x:Q,y:K,textAnchor:"middle",transform:"rotate(-90, ".concat(Q,", ").concat(K,")"),className:this._classNames.axisAnnotation,"aria-hidden":!0},maxWidth:Z},tt))),G&&U&&u.createElement(Av,{annotations:X,context:U,theme:this.props.theme,className:this._classNames.annotationLayer})),!this.props.hideLegend&&u.createElement("div",{ref:function(t){f.legendContainer=t},className:this._classNames.legendContainer},this.props.legendBars),O&&u.createElement(u.Suspense,{fallback:u.createElement("div",null,"Loading...")},O))},n.prototype._generateCallout=function(t,n){return u.createElement($n,(0,o.Cl)({hidden:!(!this.props.hideTooltip&&t.isCalloutVisible),shouldUpdateWhenHidden:!0},t),this.props.customizedCallout&&this.props.customizedCallout,!this.props.customizedCallout&&this.props.isCalloutForStack&&this._multiValueCallout(t),!this.props.customizedCallout&&!this.props.isCalloutForStack&&u.createElement(Lv,(0,o.Cl)({XValue:t.XValue,Legend:t.legend,YValue:t.YValue,color:t.color,culture:this.props.culture},n)))},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r,o=e?{}:{marginRight:"16px"},a=void 0!==t.index&&-1!==t.index,l=Sv(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,lineColor:t.color,toDrawShape:a}),s=this.props,c=s.culture,d=s.useUTC,f=(0,Yn.c$)(t.y,c,d);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var v=t.yAxisCalloutData;return u.createElement("div",{style:o},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),Object.keys(v).map((function(t){return u.createElement("div",{key:t,className:l.calloutBlockContainer},u.createElement("div",{className:l.calloutlegendText},(0,Yn.c$)(t,c,d)),u.createElement("div",{className:l.calloutContentY},(0,Yn.c$)(v[t],c,d)))})))}return u.createElement("div",{style:i?o:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:l.calloutBlockContainer},a&&u.createElement(Jd,{svgProps:{className:l.shapeStyles},pathProps:{fill:t.color},shape:Is[t.index%Object.keys(js).length]}),u.createElement("div",null,u.createElement("div",{className:l.calloutlegendText}," ",t.legend),u.createElement("div",{className:l.calloutContentY},(0,Yn.c$)(t.yAxisCalloutData?t.yAxisCalloutData:null!==(r=t.y)&&void 0!==r?r:t.data,c,d)))))},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n;if(t.props.hideLegend)n=0;else{var r=t.legendContainer&&getComputedStyle(t.legendContainer);n=(t.legendContainer&&t.legendContainer.getBoundingClientRect().height||t.minLegendContainerHeight)+parseFloat(r&&r.marginTop||"0")+parseFloat(r&&r.marginBottom||"0")}if(t.props.parentRef||t.chartContainer){var o=t.props.parentRef?t.props.parentRef:t.chartContainer,u=t.props.enableReflow&&!t._isFirstRender?Math.max(o.getBoundingClientRect().width,t._calculateChartMinWidth()):o.getBoundingClientRect().width,a=o.getBoundingClientRect().height>n?o.getBoundingClientRect().height:350;(i!==u||e!==a-n)&&t.setState({containerWidth:u,containerHeight:a-n})}}))},n}(u.Component),Vv=function(){var t,n=(0,s.z)();return!!(null===(t=null==n?void 0:n.navigator)||void 0===t?void 0:t.userAgent)&&n.navigator.userAgent.indexOf("rv:11.0")>-1}(),Nv=(0,r.I)(Dv,(function(t){var n,i,e,r,u,a,l,s,c,d=t.className,f=t.theme,v=t.isRtl,h=t.shouldHighlight,p=t.href,g=t.lineColor,y=void 0===g?"transparent":g,m=t.toDrawShape,b=t.enableReflow,x=f.fonts;return{root:[f.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},d],chartWrapper:(0,o.Cl)({position:"relative"},b?{overflow:"auto"}:{}),plotContainer:{position:"relative",width:"100%",height:"100%"},axisTitle:ev(f,f.fonts.xSmall),axisAnnotation:ev(f,f.fonts.small),xAxis:{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}],line:{opacity:.2,stroke:f.semanticColors.bodyText,width:"1px",selectors:(i={},i[It.up]={opacity:.1,stroke:"CanvasText"},i)},path:{display:"none"}}},yAxis:{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(e={},e[It.up]={fill:"CanvasText"},e)}],path:{display:"none"},line:{opacity:.2,stroke:f.semanticColors.bodyText,selectors:(r={},r[It.up]={opacity:.1,stroke:"CanvasText"},r)},g:[v&&!Vv&&{textAnchor:"end"}]}},opacityChangeOnHover:{opacity:h?"":"0.1",cursor:p?"pointer":"default"},legendContainer:[{marginTop:"8px",marginLeft:"20px"}],calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:f.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",opacity:"0.85",color:f.semanticColors.bodySubtext})],calloutBlockContainer:[f.fonts.mediumPlus,{marginTop:"13px",color:f.semanticColors.bodyText},!m&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(y),paddingLeft:"8px"},m&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:f.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},x.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[f.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:f.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(f.semanticColors.menuDivider)}],tooltip:iv(f),svgTooltip:(c={fill:f.semanticColors.bodyBackground},c[It.up]={fill:"Canvas"},c),annotationLayer:{pointerEvents:"none"}}})),Ov=(0,an.J5)((function(t){return(0,an.J5)((function(n){var i=(0,an.J5)((function(t){return function(i){return n(i,t)}}));return function(e,r){return t(e,r?i(r):n)}}))}));function Tv(t,n){return Ov(t)(n)}var Ev=function(t){if(void 0===t)return 0;var n=0;return"scrollTop"in t?n=t.scrollTop:"scrollY"in t&&(n=t.scrollY),Math.ceil(n)},Fv=function(t,n){"scrollTop"in t?t.scrollTop=n:"scrollY"in t&&t.scrollTo(t.scrollX,n)},Bv="spacer-",Pv=1/3,_v={top:-1,bottom:-1,left:-1,right:-1,width:0,height:0},Hv=function(t){return t.getBoundingClientRect()},Iv=Hv,Wv=Hv,Rv=function(t){function n(n){var i=t.call(this,n)||this;return i._root=u.createRef(),i._surface=u.createRef(),i._pageRefs={},i._getDerivedStateFromProps=function(t,n){return t.items!==i.props.items||t.renderCount!==i.props.renderCount||t.startIndex!==i.props.startIndex||t.version!==i.props.version||!n.hasMounted&&i.props.renderEarly&&(0,Vn.S)()?(i._resetRequiredWindows(),i._requiredRect=null,i._measureVersion++,i._invalidatePageCache(),i._updatePages(t,n)):n},i._onRenderRoot=function(t){var n=t.rootRef,i=t.surfaceElement,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderSurface=function(t){var n=t.surfaceRef,i=t.pageElements,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderPage=function(t,n){for(var e,r=i.props,a=r.onRenderCell,l=r.onRenderCellConditional,s=r.role,c=t.page,d=c.items,f=void 0===d?[]:d,v=c.startIndex,h=(0,o.Tt)(t,["page"]),p=void 0===s?"listitem":"presentation",g=[],y=0;y<f.length;y++){var m=v+y,b=f[y],x=i.props.getKey?i.props.getKey(b,m):b&&b.key;null==x&&(x=m);var w=null!=l?l:a,M=null!==(e=null==w?void 0:w(b,m,i.props.ignoreScrollingState?void 0:i.state.isScrolling))&&void 0!==e?e:null;l&&!M||g.push(u.createElement("div",{role:p,className:"ms-List-cell",key:x,"data-list-index":m,"data-automationid":"ListCell"},M))}return u.createElement("div",(0,o.Cl)({},h),g)},Lc(i),i.state={pages:[],isScrolling:!1,getDerivedStateFromProps:i._getDerivedStateFromProps,hasMounted:!1},i._estimatedPageHeight=0,i._totalEstimates=0,i._requiredWindowsAhead=0,i._requiredWindowsBehind=0,i._measureVersion=0,i._cachedPageHeights={},i._estimatedPageHeight=0,i._focusedIndex=-1,i._pageCache={},i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){return n.getDerivedStateFromProps(t,n)},Object.defineProperty(n.prototype,"pageRefs",{get:function(){return this._pageRefs},enumerable:!1,configurable:!0}),n.prototype.scrollToIndex=function(t,n,i){void 0===i&&(i=0);for(var e=this.props.startIndex,r=e+this._getRenderCount(),o=this._allowedRect,u=0,a=1,l=e;l<r;l+=a){var s=this._getPageSpecification(this.props,l,o),c=s.height;if(a=s.itemCount,l<=t&&l+a>t){if(n&&this._scrollElement){for(var d=Wv(this._scrollElement),f=Ev(this._scrollElement),v={top:f,bottom:f+d.height},h=t-l,p=0;p<h;++p)u+=n(l+p);var g=u+n(t);switch(i){case 1:return void Fv(this._scrollElement,u);case 2:return void Fv(this._scrollElement,g-d.height);case 3:return void Fv(this._scrollElement,(u+g-d.height)/2)}if(u>=v.top&&g<=v.bottom)return;u<v.top||g>v.bottom&&(u=g-d.height)}return void(this._scrollElement&&Fv(this._scrollElement,u))}u+=c}},n.prototype.getStartItemIndexInView=function(t){for(var n=0,i=this.state.pages||[];n<i.length;n++){var e=i[n];if(!e.isSpacer&&(this._scrollTop||0)>=e.top&&(this._scrollTop||0)<=e.top+e.height){if(!t){var r=Math.floor(e.height/e.itemCount);return e.startIndex+Math.floor((this._scrollTop-e.top)/r)}for(var o=0,u=e.startIndex;u<e.startIndex+e.itemCount;u++){if(r=t(u),e.top+o<=this._scrollTop&&this._scrollTop<e.top+o+r)return u;o+=r}}}return 0},n.prototype.componentDidMount=function(){this._async=new Nt(this),this._events=new dd(this),this._onAsyncScrollDebounced=this._async.debounce(this._onAsyncScroll,100,{leading:!1,maxWait:500}),this._onAsyncIdleDebounced=this._async.debounce(this._onAsyncIdle,200,{leading:!1}),this._onAsyncResizeDebounced=this._async.debounce(this._onAsyncResize,16,{leading:!1}),this._onScrollingDoneDebounced=this._async.debounce(this._onScrollingDone,500,{leading:!1}),this._scrollElement=K(this._root.current),this._scrollTop=0,this.setState((0,o.Cl)((0,o.Cl)({},this._updatePages(this.props,this.state)),{hasMounted:!0})),this._measureVersion++;var t=function(t){var n;return null!==(n=null==t?void 0:t.window)&&void 0!==n?n:"undefined"!=typeof window?window:void 0}(this.context);this._events.on(t,"resize",this._onAsyncResizeDebounced),this._root.current&&this._events.on(this._root.current,"focus",this._onFocus,!0),this._scrollElement&&(this._events.on(this._scrollElement,"scroll",this._onScroll),this._events.on(this._scrollElement,"scroll",this._onAsyncScrollDebounced))},n.prototype.componentDidUpdate=function(t,n){var i=this.props,e=this.state;this.state.pagesVersion!==n.pagesVersion&&(i.getPageHeight?this._onAsyncIdleDebounced():this._updatePageMeasurements(e.pages)?(this._materializedRect=null,this._hasCompletedFirstRender?this._onAsyncScrollDebounced():(this._hasCompletedFirstRender=!0,this.setState(this._updatePages(i,e)))):this._onAsyncIdleDebounced(),i.onPagesUpdated&&i.onPagesUpdated(e.pages))},n.prototype.componentWillUnmount=function(){var t,n;null===(t=this._async)||void 0===t||t.dispose(),null===(n=this._events)||void 0===n||n.dispose(),delete this._scrollElement},n.prototype.shouldComponentUpdate=function(t,n){var i=this.state.pages,e=n.pages,r=!1;if(!n.isScrolling&&this.state.isScrolling)return!0;if(t.version!==this.props.version)return!0;if(t.className!==this.props.className)return!0;if(t.items===this.props.items&&i.length===e.length)for(var o=0;o<i.length;o++){var u=i[o],a=e[o];if(u.key!==a.key||u.itemCount!==a.itemCount){r=!0;break}}else r=!0;return r},n.prototype.forceUpdate=function(){this._invalidatePageCache(),this._updateRenderRects(this.props,this.state,!0),this.setState(this._updatePages(this.props,this.state)),this._measureVersion++,t.prototype.forceUpdate.call(this)},n.prototype.getTotalListHeight=function(){return this._surfaceRect.height},n.prototype.render=function(){for(var t=this.props,n=t.className,i=t.role,e=void 0===i?"list":i,r=t.onRenderSurface,u=t.onRenderRoot,a=this.state.pages,l=void 0===a?[]:a,s=[],c=j(this.props,R),d=0,f=l;d<f.length;d++){var v=f[d];s.push(this._renderPage(v))}var h=r?Tv(r,this._onRenderSurface):this._onRenderSurface;return(u?Tv(u,this._onRenderRoot):this._onRenderRoot)({rootRef:this._root,pages:l,surfaceElement:h({surfaceRef:this._surface,pages:l,pageElements:s,divProps:{role:"presentation",className:"ms-List-surface"}}),divProps:(0,o.Cl)((0,o.Cl)({},c),{className:z("ms-List",n),role:s.length>0?e:void 0,"aria-label":s.length>0?c["aria-label"]:void 0})})},n.prototype._shouldVirtualize=function(t){void 0===t&&(t=this.props);var n=t.onShouldVirtualize;return!n||n(t)},n.prototype._invalidatePageCache=function(){this._pageCache={}},n.prototype._renderPage=function(t){var n,i=this,e=this.props.usePageCache;if(e&&(n=this._pageCache[t.key])&&n.pageElement)return n.pageElement;var r=this._getPageStyle(t),o=this.props.onRenderPage,u=(void 0===o?this._onRenderPage:o)({page:t,className:"ms-List-page",key:t.key,ref:function(n){i._pageRefs[t.key]=n},style:r,role:"presentation"},this._onRenderPage);return e&&0===t.startIndex&&(this._pageCache[t.key]={page:t,pageElement:u}),u},n.prototype._getPageStyle=function(t){var n=this.props.getPageStyle;return(0,o.Cl)((0,o.Cl)({},n?n(t):{}),t.items?{}:{height:t.height})},n.prototype._onFocus=function(t){for(var n=t.target;n!==this._surface.current;){var i=n.getAttribute("data-list-index");if(i){this._focusedIndex=Number(i);break}n=b(n)}},n.prototype._onScroll=function(){this.state.isScrolling||this.props.ignoreScrollingState||this.setState({isScrolling:!0}),this._resetRequiredWindows(),this._onScrollingDoneDebounced()},n.prototype._resetRequiredWindows=function(){this._requiredWindowsAhead=0,this._requiredWindowsBehind=0},n.prototype._onAsyncScroll=function(){var t,n;this._updateRenderRects(this.props,this.state),this._materializedRect&&(t=this._requiredRect,n=this._materializedRect,t.top>=n.top&&t.left>=n.left&&t.bottom<=n.bottom&&t.right<=n.right)||this.setState(this._updatePages(this.props,this.state))},n.prototype._onAsyncIdle=function(){var t=this.props,n=t.renderedWindowsAhead,i=t.renderedWindowsBehind,e=this._requiredWindowsAhead,r=this._requiredWindowsBehind,o=Math.min(n,e+1),u=Math.min(i,r+1);o===e&&u===r||(this._requiredWindowsAhead=o,this._requiredWindowsBehind=u,this._updateRenderRects(this.props,this.state),this.setState(this._updatePages(this.props,this.state))),(n>o||i>u)&&this._onAsyncIdleDebounced()},n.prototype._onScrollingDone=function(){this.props.ignoreScrollingState||(this.setState({isScrolling:!1}),this._onAsyncIdle())},n.prototype._onAsyncResize=function(){this.forceUpdate()},n.prototype._updatePages=function(t,n){this._requiredRect||this._updateRenderRects(t,n);var i=this._buildPages(t,n),e=n.pages;return this._notifyPageChanges(e,i.pages,this.props),(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),i),{pagesVersion:{}})},n.prototype._notifyPageChanges=function(t,n,i){var e=i.onPageAdded,r=i.onPageRemoved;if(e||r){for(var o={},u=0,a=t;u<a.length;u++)(c=a[u]).items&&(o[c.startIndex]=c);for(var l=0,s=n;l<s.length;l++){var c;(c=s[l]).items&&(o[c.startIndex]?delete o[c.startIndex]:this._onPageAdded(c))}for(var d in o)o.hasOwnProperty(d)&&this._onPageRemoved(o[d])}},n.prototype._updatePageMeasurements=function(t){var n=!1;if(!this._shouldVirtualize())return n;for(var i=0;i<t.length;i++){var e=t[i];e.items&&(n=this._measurePage(e)||n)}return n},n.prototype._measurePage=function(t){var n=!1,i=this._pageRefs[t.key],e=this._cachedPageHeights[t.startIndex];if(i&&this._shouldVirtualize()&&(!e||e.measureVersion!==this._measureVersion)){var r={width:i.clientWidth,height:i.clientHeight};(r.height||r.width)&&(n=t.height!==r.height,t.height=r.height,this._cachedPageHeights[t.startIndex]={height:r.height,measureVersion:this._measureVersion},this._estimatedPageHeight=Math.round((this._estimatedPageHeight*this._totalEstimates+r.height)/(this._totalEstimates+1)),this._totalEstimates++)}return n},n.prototype._onPageAdded=function(t){var n=this.props.onPageAdded;n&&n(t)},n.prototype._onPageRemoved=function(t){var n=this.props.onPageRemoved;n&&n(t)},n.prototype._buildPages=function(t,n){var i=t.renderCount,e=t.items,r=t.startIndex,u=t.getPageHeight;i=this._getRenderCount(t);for(var a=(0,o.Cl)({},_v),l=[],s=1,c=0,d=null,f=this._focusedIndex,v=r+i,h=this._shouldVirtualize(t),p=0===this._estimatedPageHeight&&!u,g=this._allowedRect,m=function(i){var o=b._getPageSpecification(t,i,g),u=o.height,m=o.data,x=o.key;s=o.itemCount;var w,M,C=c+u-1,k=y(n.pages,(function(t){return!!t.items&&t.startIndex===i}))>-1,A=!g||C>=g.top&&c<=g.bottom,S=!b._requiredRect||C>=b._requiredRect.top&&c<=b._requiredRect.bottom;if(!p&&(S||A&&k)||!h||f>=i&&f<i+s||i===r){d&&(l.push(d),d=null);var L=Math.min(s,v-i),D=b._createPage(x,e.slice(i,i+L),i,void 0,void 0,m);D.top=c,D.height=u,b._visibleRect&&b._visibleRect.bottom&&(D.isVisible=C>=b._visibleRect.top&&c<=b._visibleRect.bottom),l.push(D),S&&b._allowedRect&&(w=a,M={top:c,bottom:C,height:u,left:g.left,right:g.right,width:g.width},w.top=M.top<w.top||-1===w.top?M.top:w.top,w.left=M.left<w.left||-1===w.left?M.left:w.left,w.bottom=M.bottom>w.bottom||-1===w.bottom?M.bottom:w.bottom,w.right=M.right>w.right||-1===w.right?M.right:w.right,w.width=w.right-w.left+1,w.height=w.bottom-w.top+1)}else d||(d=b._createPage(Bv+i,void 0,i,0,void 0,m,!0)),d.height=(d.height||0)+(C-c)+1,d.itemCount+=s;if(c+=C-c+1,p&&h)return"break"},b=this,x=r;x<v&&"break"!==m(x);x+=s);return d&&(d.key=Bv+"end",l.push(d)),this._materializedRect=a,(0,o.Cl)((0,o.Cl)({},n),{pages:l,measureVersion:this._measureVersion})},n.prototype._getPageSpecification=function(t,n,i){var e=t.getPageSpecification;if(e){var r=e(n,i,t.items),o=r.itemCount,u=void 0===o?this._getItemCountForPage(n,i):o,a=r.height;return{itemCount:u,height:void 0===a?this._getPageHeight(n,i,u):a,data:r.data,key:r.key}}return{itemCount:u=this._getItemCountForPage(n,i),height:this._getPageHeight(n,i,u)}},n.prototype._getPageHeight=function(t,n,i){if(this.props.getPageHeight)return this.props.getPageHeight(t,n,i,this.props.items);var e=this._cachedPageHeights[t];return e?e.height:this._estimatedPageHeight||30},n.prototype._getItemCountForPage=function(t,n){return(this.props.getItemCountForPage?this.props.getItemCountForPage(t,n):10)||10},n.prototype._createPage=function(t,n,i,e,r,o,u){void 0===i&&(i=-1),void 0===e&&(e=n?n.length:0),void 0===r&&(r={}),t=t||"page-"+i;var a=this._pageCache[t];return a&&a.page?a.page:{key:t,startIndex:i,itemCount:e,items:n,style:r,top:0,height:0,data:o,isSpacer:u||!1}},n.prototype._getRenderCount=function(t){var n=t||this.props,i=n.items,e=n.startIndex,r=n.renderCount;return void 0===r?i?i.length-e:0:r},n.prototype._updateRenderRects=function(t,n,i){var e=t.renderedWindowsAhead,r=t.renderedWindowsBehind,u=n.pages;if(this._shouldVirtualize(t)){var a=this._surfaceRect||(0,o.Cl)({},_v),l=function(t){if(void 0===t)return 0;var n=0;return"scrollHeight"in t?n=t.scrollHeight:"document"in t&&(n=t.document.documentElement.scrollHeight),n}(this._scrollElement),c=Ev(this._scrollElement);this._surface.current&&(i||!u||!this._surfaceRect||!l||l!==this._scrollHeight||Math.abs(this._scrollTop-c)>this._estimatedPageHeight*Pv)&&(a=this._surfaceRect=Iv(this._surface.current),this._scrollTop=c),!i&&l&&l===this._scrollHeight||this._measureVersion++,this._scrollHeight=l||0;var d=Math.max(0,-a.top),f=(0,s.z)(this._root.current),v={top:d,left:a.left,bottom:d+f.innerHeight,right:a.right,width:a.width,height:f.innerHeight};this._requiredRect=jv(v,this._requiredWindowsBehind,this._requiredWindowsAhead),this._allowedRect=jv(v,r,e),this._visibleRect=v}},n.defaultProps={startIndex:0,onRenderCell:function(t,n,i){return u.createElement(u.Fragment,null,t&&t.name||"")},onRenderCellConditional:void 0,renderedWindowsAhead:2,renderedWindowsBehind:2},n.contextType=Ft,n}(u.Component);function jv(t,n,i){var e=t.top-n*t.height,r=t.height+(n+i)*t.height;return{top:e,bottom:e+r,height:r,left:t.left,right:t.right,width:t.width}}var zv=function(t){var n=u.useRef(null);u.useEffect((function(){if(n.current){var i=sl(n.current),e=t.text.split(/\s+/),r=[],o=i.append("tspan"),u=0;return e.forEach((function(n){r.push(n),o.text(r.join(" "));var e=o.node();e&&e.getComputedTextLength()>t.width&&r.length>1&&(u++,r.pop(),o.text(r.join(" ")),r=[n],o=i.append("tspan").text(n).attr("dy",t.lineHeight).attr("x",t.x))})),i.attr("dy",-u*t.lineHeight),function(){i.selectAll("tspan").remove()}}})),t.lineHeight;var i=(0,o.Tt)(t,["lineHeight"]);return u.createElement("text",(0,o.Cl)({ref:n},Us(i)))},$v=function(t){var n,i,e,r=u.useRef(null),o=u.useState(!1),a=o[0],l=o[1],s=null;if(a){var c=t.labelDef.aggregatedIdx.map((function(n){return t.lineDefs[n].onRenderCard})).filter((function(t){return!!t}));c.length>0&&(s=u.createElement($n,{target:r.current,onDismiss:function(){return l(!1)},setInitialFocus:!0,role:"dialog"},u.createElement(Uc,{isCircularNavigation:!0,direction:uc.vertical},u.createElement(Rv,{items:c,role:"alert","aria-roledescription":" ",onRenderCell:function(t){return u.createElement("div",{"data-is-focusable":!0},t&&t())}}))))}var d=t.textColor?fs(t.textColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.semanticColors.messageText;return e=1===t.labelDef.aggregatedIdx.length?t.lineDefs[t.labelDef.aggregatedIdx[0]].event:t.mergedLabel(t.labelDef.aggregatedIdx.length),u.createElement(u.Fragment,null,u.createElement("g",{ref:r,onClick:function(){return l(!0)},"data-is-focusable":!0,style:{cursor:"pointer"},role:"button"},u.createElement(zv,{text:e,x:t.labelDef.x,y:t.textY,width:t.textWidth,lineHeight:t.textLineHeight,textAnchor:t.labelDef.anchor,fontSize:t.textFontSize,fill:d})),s)},Yv=function(t){var n,i,e=t.labelWidth?t.labelWidth:105,r=t.chartYTop-20,a=r+7,l=t.scale.range(),s=t.events.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{x:t.scale(n.date)})}));s.sort((function(t,n){return+t.date-+n.date}));var c=t.strokeColor?fs(t.strokeColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.palette.black,d=function(t,n){for(var i=[],e=[],r=0,o=t;r<o.length;r++){var u=o[r],a=n(u);-1===i.indexOf(a)&&(e.push(u),i.push(a))}return e}(s,(function(t){return t.date.toString()})).map((function(n,i){return u.createElement("line",{key:i,x1:n.x,x2:n.x,y1:a,y2:t.chartYBottom,stroke:c,strokeDasharray:"8"})})),f=function(t,n,i,e){var r=function(e,r){if(r===t.length)return[];var u=t[r].x,a=u-n;return u<e?[]:r===t.length-1?e<a?[{x:u,anchor:"end",aggregatedIdx:[r]}]:u+n<i?[{x:u,anchor:"start",aggregatedIdx:[r]}]:[]:o(r,e<a?"end":"start")},o=function(e,o){var u="end"===o?t[e].x:t[e].x+n,a=y(t,(function(t){return t.x>u&&(t.x-n>=u||t.x+n<i)}),e+1);-1===a&&(a=t.length);for(var l=[],s=e;s<a;s++)l.push(s);var c=r(u,a);return c.unshift({x:t[e].x,anchor:o,aggregatedIdx:l}),c};return r(e,0)}(s,e+5,l[1],l[0]).map((function(n,i){return u.createElement($v,{key:i,theme:t.theme,lineDefs:s,labelDef:n,textY:r,textWidth:e,textLineHeight:18,textFontSize:"10pt",textColor:t.labelColor,mergedLabel:t.mergedLabel})}));return u.createElement(u.Fragment,null,d,f)};function Xv(t){var n,i,e=t.xAxisScale,r=t.yAxisScale,o=t.className,a=t.lineOptions,l=t.minPixelGap,s=void 0===l?40:l,c=function(t){return t?{originXOffset:t.originXOffset,direction:"clockwise"===t.direction||"counterclockwise"===t.direction?t.direction:void 0,rotation:t.rotation,axisLabel:Array.isArray(t.axisLabel)?t.axisLabel:void 0}:void 0}(a),d=null!==(n=null==c?void 0:c.axisLabel)&&void 0!==n?n:[],f=[],v=[],h=d.length,p="clockwise"===(null==c?void 0:c.direction)?-1:1,g=(null!==(i=null==c?void 0:c.rotation)&&void 0!==i?i:0)*Math.PI/180;return d.forEach((function(t,n){var i=g+p*(2*Math.PI/h)*n,a=(null==c?void 0:c.originXOffset)||0,l=e(.7*Math.cos(i)-a/2),d=r(.7*Math.sin(i)),y=v.every((function(t){return Math.sqrt(Math.pow(l-t.x,2)+Math.pow(d-t.y,2))>=s}));(0===f.length||y)&&(f.push(u.createElement("text",{key:"scatterpolar-label-".concat(t),x:l,y:d,className:o,textAnchor:"middle",alignmentBaseline:"middle",opacity:1},t)),v.push({x:l,y:d}))})),f}var Gv,Uv=(0,a.Z)();!function(t){t[t.hoverSize=11]="hoverSize",t[t.invisibleSize=1]="invisibleSize"}(Gv||(Gv={}));var qv=wi((function(t){return t.x})).left,Zv=function(t){function n(n){var i,e,r,a,s,c=t.call(this,n)||this;return c._xAxisScale="",c._yScalePrimary="",c.eventLabelHeight=36,c._isRTL=(0,l.jI)(),c._hasMarkersMode=!1,c._isXAxisDateType=!1,c._isScatterPolar=!1,c.toImage=function(t){var n,i;return tf([{container:null===(n=c._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],c.props.hideLegend||null===(i=c._legendsRef.current)||void 0===i?void 0:i.toSVG,c._isRTL,t)},c._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===es.NumericAxis?Os(t,n,i,r,c.props.xScaleType,c._hasMarkersMode):o===es.DateAxis?Bs(t,n,i,r,a,e,0,c._hasMarkersMode):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},c._injectIndexPropertyInLineChartData=function(t,n){var i;void 0===n&&(n=!1);var e=c.props.allowMultipleShapesForPoints,r=void 0!==e&&e,u=n?null==t?void 0:t.filter((function(t){var n,i,e;return(null===(i=null===(n=c.props.legendProps)||void 0===n?void 0:n.selectedLegends)||void 0===i?void 0:i.includes(t.legend))||(null===(e=c.props.legendProps)||void 0===e?void 0:e.selectedLegend)===t.legend})):t;return c._hasMarkersMode=null!==(i=null==u?void 0:u.some((function(t){var n,i,e;return null===(e=null===(i=null===(n=t.lineOptions)||void 0===n?void 0:n.mode)||void 0===i?void 0:i.includes)||void 0===e?void 0:e.call(i,"markers")})))&&void 0!==i&&i,c._isScatterPolar=oc(u),u?u.map((function(t,n){var i,e,u;return u=void 0===t.color?ds(n,0,null===(i=c.props.theme)||void 0===i?void 0:i.isInverted):fs(t.color,null===(e=c.props.theme)||void 0===e?void 0:e.isInverted),(0,o.Cl)((0,o.Cl)({},t),{index:r?n:-1,color:u})})):[]},c._getCustomizedCallout=function(){return c.props.onRenderCalloutPerStack?c.props.onRenderCalloutPerStack(c.state.stackCalloutProps):c.props.onRenderCalloutPerDataPoint?c.props.onRenderCalloutPerDataPoint(c.state.dataPointCalloutProps):null},c._getNumericMinMaxOfY=function(t,n,i){var e=Ps(t,0,i,i?c.props.secondaryYScaleType:c.props.yScaleType),r=e.startValue,o=e.endValue,u={start:0,end:0};return c._hasMarkersMode&&(u=lc(r,o,i?c.props.secondaryYScaleType:c.props.yScaleType)),{startValue:r-u.start,endValue:o+u.end}},c._getMargins=function(t){c.margins=t},c._initializeLineChartData=function(t,n,i,e,r,o,u){c._xAxisScale=t,c._yScalePrimary=n,c._yScaleSecondary=u,c._renderedColorFillBars=c.props.colorFillBars?c._createColorFillBars(i):[],c.lines=c._createLines(r,i)},c._handleSingleLegendSelectionAction=function(t){c.state.selectedLegend===t.legend?(c.setState({selectedLegend:""}),c._handleLegendClick(t,null)):(c.setState({selectedLegend:t.legend}),c._handleLegendClick(t,t.legend))},c._onHoverCardHide=function(){c.setState({selectedLegendPoints:[],selectedColorBarLegend:[],isSelectedLegend:!1})},c._closeCallout=function(){c.setState({isCalloutVisible:!1})},c._getBoxWidthOfShape=function(t,n,i){var e=c.props,r=e.allowMultipleShapesForPoints,o=void 0!==r&&r,u=e.strokeWidth,a=void 0===u?4:u,l=c.state.activePoint;return o?l===t?Gv.hoverSize:1===n||i?2.5*a:Gv.invisibleSize:l===t?Gv.hoverSize:Gv.invisibleSize},c._getPath=function(t,n,i,e,r,o){var u=c.props.allowMultipleShapesForPoints,a=void 0!==u&&u,l=c._getBoxWidthOfShape(i,e,r),s=a?o%Object.keys(js).length:0,d=js[s].widthRatio;return function(t,n,i,e){return["M".concat(t-i/2," ").concat(n,"\n A").concat(i/2," ").concat(i/2," 0 1 0 ").concat(t+i/2," ").concat(n,"\n M").concat(t-i/2," ").concat(n,"\n A ").concat(i/2," ").concat(i/2," 0 1 1 ").concat(t+i/2," ").concat(n,"\n "),"M".concat(t-i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n+i/2,"\n Z"),"M".concat(t-i/2," ").concat(n-.2886*i,"\n H ").concat(t+i/2,"\n L").concat(t," ").concat(n+.5774*i," Z"),"M".concat(t," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n,"\n L").concat(t," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.5774*i,"\n L").concat(t+i/2," ").concat(n+.2886*i,"\n L").concat(t-i/2," ").concat(n+.2886*i," Z"),"M".concat(t-.5*i," ").concat(n-.866*i,"\n L").concat(t+.5*i," ").concat(n-.866*i,"\n L").concat(t+i," ").concat(n,"\n L").concat(t+.5*i," ").concat(n+.866*i,"\n L").concat(t-.5*i," ").concat(n+.866*i,"\n L").concat(t-i," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.851*i,"\n L").concat(t+.6884*i," ").concat(n-.2633*i,"\n L").concat(t+.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.6884*i," ").concat(n-.2633*i,"\n Z"),"M".concat(t-.5001*i," ").concat(n-1.207*i,"\n L").concat(t+.5001*i," ").concat(n-1.207*i,"\n L").concat(t+1.207*i," ").concat(n-.5001*i,"\n L").concat(t+1.207*i," ").concat(n+.5001*i,"\n L").concat(t+.5001*i," ").concat(n+1.207*i,"\n L").concat(t-.5001*i," ").concat(n+1.207*i,"\n L").concat(t-1.207*i," ").concat(n+.5001*i,"\n L").concat(t-1.207*i," ").concat(n-.5001*i,"\n Z")][e]}(t,n,l=d>1?l/d:l,s)},c._getPointFill=function(t,n,i,e){var r=c.state.activePoint,o=c.props,u=o.theme;return o.allowMultipleShapesForPoints,r===n?u.semanticColors.bodyBackground:t},c._createColorFillBars=function(t){var n,i=[];c.state.isSelectedLegend?c._colorFillBars=c.state.selectedColorBarLegend:c._colorFillBars=c.props.colorFillBars;for(var e=Ps(c._points),r=0;r<c._colorFillBars.length;r++){var o=c._colorFillBars[r],a=p("string"==typeof o.legend?o.legend.replace(/\W/g,""):""),l=fs(o.color,null===(n=c.props.theme)||void 0===n?void 0:n.isInverted);o.applyPattern&&i.push(c._getStripePattern(l,r));for(var s=0;s<o.data.length;s++){var d=o.data[s].startX,f=o.data[s].endX,v=c._legendHighlighted(o.legend)||c._noLegendHighlighted()||c.state.isSelectedLegend?c._getColorFillBarOpacity(o):.1;i.push(u.createElement("rect",{fill:o.applyPattern?"url(#".concat(c._colorFillBarPatternId,"_").concat(r,")"):l,fillOpacity:v,x:c._isRTL?c._xAxisScale(f):c._xAxisScale(d),y:c._yScalePrimary(e.endValue)-3,width:Math.abs(c._xAxisScale(f)-c._xAxisScale(d)),height:c._yScalePrimary(c.props.yMinValue||0)-c._yScalePrimary(e.endValue)+3,key:"".concat(a).concat(s)}))}}return i},c._getStripePattern=function(t,n){return u.createElement("pattern",{id:"".concat(c._colorFillBarPatternId,"_").concat(n),width:16,height:16,key:"".concat(c._colorFillBarPatternId,"_").concat(n),patternUnits:"userSpaceOnUse"},u.createElement("path",{d:"M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8",stroke:t,strokeWidth:1.25}))},c._checkInGap=function(t,n,i){for(var e=i,r=!1;e<n.length&&t>n[e].endIndex;)e++;return e<n.length&&t>n[e].startIndex&&t<=n[e].endIndex&&(r=!0),{isInGap:r,gapIndex:e}},c._onMouseOverLargeDataset=function(t,n,i,e){e.persist();var r=c.props.data.lineChartData,o=c._xAxisScale.invert(av(e)[0],document.getElementById(c._rectId)),u=qv(r[t].data,o),a=r[t].data[u-1],l=r[t].data[u],s=null,d=null;if(void 0===a&&void 0!==l)s=l.x,d=u;else if(void 0!==a&&void 0===l)s=a.x,d=u-1;else{var f=void 0,v=void 0,h=void 0;switch(Rs(r[t].data[0].x,!0)){case es.DateAxis:f=new Date(o).getTime(),v=a.x.getTime(),h=l.x.getTime(),s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1;break;case es.NumericAxis:f=o,v=a.x,h=l.x,s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1}}var p=r[t].data[d],g=p.xAxisCalloutData,y=p.xAxisCalloutAccessibilityData,m=s instanceof Date?(0,Yn.Yn)(s,c.props.culture,c.props.useUTC):s,b=gc(c._calloutPoints,s),x=r[t].data[d],w=null===c.state.nearestCircleToHighlight||null!==c.state.nearestCircleToHighlight&&null!==x&&(c.state.nearestCircleToHighlight.x!==x.x||c.state.nearestCircleToHighlight.y!==x.y);b&&w&&(c._uniqueCallOutID="#".concat(c._staticHighlightCircle,"_").concat(t),sl("#".concat(c._staticHighlightCircle,"_").concat(t)).attr("cx","".concat(c._xAxisScale(x.x))).attr("cy","".concat(i(x.y))).attr("visibility","visibility"),sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(c._xAxisScale(x.x),", ").concat(i(x.y),")")})).attr("visibility","visibility").attr("y2","".concat(n-i(x.y))),c.setState({nearestCircleToHighlight:x,isCalloutVisible:!0,refSelected:"#".concat(c._staticHighlightCircle,"_").concat(t),stackCalloutProps:b,YValueHover:b.values,dataPointCalloutProps:b,hoverXValue:g||m,xAxisCalloutAccessibilityData:y,activePoint:"",activeLine:t})),b||c.setState({isCalloutVisible:!1,nearestCircleToHighlight:x,activePoint:"",activeLine:t})},c._handleFocus=function(t,n,i,e,r){c._uniqueCallOutID=e;var o=n instanceof Date?(0,Yn.Yn)(n,c.props.culture,c.props.useUTC):n,u=gc(c._calloutPoints,n);if(u){var a=c;sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(a._xAxisScale(n),", 0)")})).attr("visibility","visibility"),c._refArray.forEach((function(n){n.index===t&&c.setState({isCalloutVisible:!0,refSelected:n.refElement,hoverXValue:i||""+o,YValueHover:u.values,stackCalloutProps:u,dataPointCalloutProps:u,activePoint:e,xAxisCalloutAccessibilityData:r})}))}else c.setState({activePoint:e})},c._handleHover=function(t,n,i,e,r,o,u,a,l,s){s.persist();var d=t instanceof Date?(0,Yn.Yn)(t,c.props.culture,c.props.useUTC):t,f=c,v=gc(c._calloutPoints,t),h=void 0;if(!1===c.props.isCalloutForStack&&(null==v?void 0:v.values)){var p=m(v.values,(function(t){return(null==t?void 0:t.y)===n}));p&&(h={x:t,values:[p]})}v?(sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(f._xAxisScale(t),", ").concat(u(n),")")})).attr("visibility","visibility").attr("y2","".concat(i-u(n))),c._uniqueCallOutID!==r&&(c._uniqueCallOutID=r,c.setState({isCalloutVisible:!0,refSelected:"#".concat(r),hoverXValue:e||""+d,YValueHover:v.values,YValue:n,legendVal:a,lineColor:l,stackCalloutProps:v,dataPointCalloutProps:h,activePoint:r,xAxisCalloutAccessibilityData:o,nearestCircleToHighlight:null,activeLine:null}))):c.setState({activePoint:r,nearestCircleToHighlight:null,activeLine:null})},c._getClickHandler=function(t){return t?{onClick:t}:{}},c._handleMouseOut=function(){sl("#".concat(c._verticalLine)).attr("visibility","hidden")},c._handleChartMouseLeave=function(){c._uniqueCallOutID=null,c.setState({isCalloutVisible:!1,activePoint:"",activeLine:null})},c._handleLegendClick=function(t,n){t.onLegendClick&&t.onLegendClick(n)},c._handleMultipleLineLegendSelectionAction=function(t){var n,i=c.state.selectedLegendPoints.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedLegendPoints,!0),[t],!1):c.state.selectedLegendPoints.slice(0,i).concat(c.state.selectedLegendPoints.slice(i+1)),c.props.data&&n.length===c.props.data.lineChartData.length&&(c.props.colorFillBars&&c.props.colorFillBars.length===c.state.selectedColorBarLegend.length||!c.props.colorFillBars)?c._clearMultipleLegendSelections():n.length||c.state.selectedColorBarLegend.length?c.setState({selectedLegendPoints:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._handleMultipleColorFillBarLegendSelectionAction=function(t){var n,i=c.state.selectedColorBarLegend.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);(n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedColorBarLegend,!0),[t],!1):c.state.selectedColorBarLegend.slice(0,i).concat(c.state.selectedColorBarLegend.slice(i+1))).length===(c.props.colorFillBars&&c.props.colorFillBars.length)&&(c.props.data&&c.props.data.lineChartData.length===c.state.selectedLegendPoints.length||!c.props.data)?c._clearMultipleLegendSelections():n.length||c.state.selectedLegendPoints.length?c.setState({selectedColorBarLegend:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._clearMultipleLegendSelections=function(){c.setState({selectedColorBarLegend:[],selectedLegendPoints:[],isSelectedLegend:!1})},c._legendHighlighted=function(t){return c.state.selectedLegend===t||""===c.state.selectedLegend&&c.state.activeLegend===t},c._noLegendHighlighted=function(){return""===c.state.selectedLegend&&""===c.state.activeLegend},c._getColorFillBarOpacity=function(t){return t.applyPattern?1:.4},c._getAriaLabel=function(t,n){var i,e=c._points[t],r=e.data[n],o=r.x instanceof Date?(0,Yn.Yn)(r.x,c.props.culture,c.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},c._getChartTitle=function(){var t=c.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Line chart with ".concat((null==i?void 0:i.length)||0," lines. ")},Lc(c),c.state={hoverXValue:"",activeLegend:"",YValueHover:[],YValue:"",legendVal:"",refSelected:"",selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",isCalloutVisible:!1,selectedLegendPoints:c._injectIndexPropertyInLineChartData(c.props.data.lineChartData,!0),selectedColorBarLegend:[],isSelectedLegend:(null!==(s=null===(a=null===(r=c.props.legendProps)||void 0===r?void 0:r.selectedLegends)||void 0===a?void 0:a.length)&&void 0!==s?s:0)>0,activePoint:"",nearestCircleToHighlight:null,activeLine:null},c._refArray=[],c._points=c._injectIndexPropertyInLineChartData(c.props.data.lineChartData),c._colorFillBars=[],c._calloutPoints=Ss(c._points)||{},c._circleId=p("circle"),c._lineId=p("lineID"),c._borderId=p("borderID"),c._verticalLine=p("verticalLine"),c._colorFillBarPatternId=p("colorFillBarPattern"),c._tooltipId=p("LineChartTooltipId_"),c._rectId=p("containerRectLD"),c._staticHighlightCircle=p("staticHighlightCircle"),c._createLegendsMemoized=(0,an.J9)((function(t){return c._createLegends(t)})),c._firstRenderOptimization=!0,c._emptyChartId=p("_LineChart_empty"),c._cartesianChartRef=u.createRef(),c._legendsRef=u.createRef(),n.eventAnnotationProps&&n.eventAnnotationProps.labelHeight&&(c.eventLabelHeight=n.eventAnnotationProps.labelHeight),c}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r,o,u,a,l,s;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)===(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&qs(null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends,null===(r=this.props.legendProps)||void 0===r?void 0:r.selectedLegends)||this.setState({selectedLegend:null!==(u=null===(o=this.props.legendProps)||void 0===o?void 0:o.selectedLegend)&&void 0!==u?u:"",selectedLegendPoints:this._injectIndexPropertyInLineChartData(this.props.data.lineChartData,!0),isSelectedLegend:(null!==(s=null===(l=null===(a=this.props.legendProps)||void 0===a?void 0:a.selectedLegends)||void 0===l?void 0:l.length)&&void 0!==s?s:0)>0}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData),this._calloutPoints=Ss(this._points)||{})},n.prototype.render=function(){var t=this,n=this.props,i=n.tickValues,e=n.tickFormat,r=n.eventAnnotationProps,a=n.legendProps,l=n.data;this._points=this._injectIndexPropertyInLineChartData(l.lineChartData),this._isXAxisDateType=Ns(this._points);var s=this._points;a&&a.canSelectMultipleLegends&&(s=this.state.selectedLegendPoints.length>=1?this.state.selectedLegendPoints:this._points,this._calloutPoints=Ss(s));var c=null;this.props.hideLegend||(c=this._createLegendsMemoized(this._points));var d=(0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,YValue:this.state.YValue,legend:this.state.legendVal,color:this.state.lineColor,XValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,onDismiss:this._closeCallout,preventDismissOnEvent:function(){return!0},hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),descriptionMessage:this.props.getCalloutDescriptionMessage&&this.state.stackCalloutProps?this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps),f={tickValues:i,tickFormat:e};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Nv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:s,chartType:is.LineChart,calloutProps:d,tickParams:f,legendBars:c,createYAxis:Cs,getmargins:this._getMargins,getMinMaxOfYAxis:this._getNumericMinMaxOfY,getGraphData:this._initializeLineChartData,xAxisType:this._isXAxisDateType?es.DateAxis:es.NumericAxis},this._isScatterPolar?{yMaxValue:1,yMinValue:-1}:{},{customizedCallout:this._getCustomizedCallout(),getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:As,onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){return t._xAxisScale=n.xScale,t._yScalePrimary=n.yScalePrimary,t._yScaleSecondary=n.yScaleSecondary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:n.containerHeight,stroke:"#323130",id:t._verticalLine,visibility:"hidden",strokeDasharray:"5,5"}),t.props.optimizeLargeData?u.createElement("rect",{id:t._rectId,width:n.containerWidth,height:n.containerHeight,fill:"transparent"}):u.createElement(u.Fragment,null),u.createElement("g",null,t._renderedColorFillBars,t.lines),r&&u.createElement(Yv,(0,o.Cl)({theme:t.props.theme},r,{scale:n.xScale,chartYTop:t.margins.top+t.eventLabelHeight,chartYBottom:n.containerHeight-35}))))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._createLegends=function(t){var n=this,i=this.props,e=i.legendProps,r=i.allowMultipleShapesForPoints,a=void 0!==r&&r,l=!(!e||!e.canSelectMultipleLegends),s={};t.forEach((function(t){t.legend&&(s[t.legend]||(s[t.legend]=[]),s[t.legend].push(t))}));var c=Object.entries(s).map((function(t){var i=t[0],e=t[1],r=e[0];return(0,o.Cl)((0,o.Cl)({title:i,color:r.color,action:function(){l?e.forEach((function(t){return n._handleMultipleLineLegendSelectionAction(t)})):e.forEach((function(t){return n._handleSingleLegendSelectionAction(t)}))},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:i})}},r.legendShape&&{shape:r.legendShape}),a&&{shape:Is[r.index%Object.keys(js).length]})})),d=this.props.colorFillBars?this.props.colorFillBars.map((function(t,i){var e,r=t.legend,o=fs(t.color,null===(e=n.props.theme)||void 0===e?void 0:e.isInverted);return{title:r,color:o,action:function(){l?n._handleMultipleColorFillBarLegendSelectionAction(t):n._handleSingleLegendSelectionAction(t)},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:r})},opacity:n._getColorFillBarOpacity(t),stripePattern:t.applyPattern}})):[];return u.createElement(vf,(0,o.Cl)({legends:(0,o.fX)((0,o.fX)([],c,!0),d,!0),enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},l&&{onLegendHoverCardLeave:this._onHoverCardHide},this.props.legendProps,{ref:this._legendsRef}))},n.prototype._createLines=function(t,n){var i,e,r,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,D,V,N,O,T,E,F,B,P,_,H,I,W,R,j,z,$,Y,X,G,U,q,Z,K,J,Q,tt,nt,it=this,et=[];this.state.isSelectedLegend?this._points=this.state.selectedLegendPoints:this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);for(var rt=fi(this._points,(function(t){return fi(t.data,(function(t){return t.markerSize}))})),ot=Uv(this.props.styles,{theme:this.props.theme}),ut=function(t){var ut=[],lt=[],st=[],ct=at._points[t].legend,dt=at._points[t].color,ft=at.state.activePoint,vt=at.props.theme,ht=n-at.margins.bottom+6,pt=!(!at._points[t].useSecondaryYScale||!at._yScaleSecondary),gt=pt?at._yScaleSecondary:at._yScalePrimary,yt=at._hasMarkersMode?fc({data:at._points,xScale:at._xAxisScale,yScalePrimary:at._yScalePrimary,yScaleSecondary:at._yScaleSecondary,useSecondaryYScale:pt,xScaleType:at.props.xScaleType,yScaleType:at.props.yScaleType,secondaryYScaleType:at.props.secondaryYScaleType}):0;if(1===at._points[t].data.length){var mt=at._points[t].data[0],bt=mt.x,xt=mt.y,wt=mt.xAxisCalloutData,Mt=mt.xAxisCalloutAccessibilityData,Ct=at._xAxisScale(bt),kt=gt(xt);if(cc(Ct,kt)){var At="".concat(at._circleId,"_").concat(t),St=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,Lt=at._points[t].data[0].markerSize,Dt=null===(e=null===(i=at._points[t].lineOptions)||void 0===i?void 0:i.mode)||void 0===e?void 0:e.includes("text"),Vt=at._points[t].data[0].text;st.push(u.createElement(u.Fragment,{key:"".concat(At,"_fragment")},u.createElement("circle",(0,o.Cl)({id:At,key:At,r:Lt?Lt*yt/rt:ft===At?5.5:3.5,cx:Ct,cy:kt,fill:ft===At?vt.semanticColors.bodyBackground:dt,opacity:St?1:.1,onMouseOver:at._handleHover.bind(at,bt,xt,ht,wt,At,Mt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,bt,xt,ht,wt,At,Mt,gt,ct,dt),onMouseOut:at._handleMouseOut,strokeWidth:ft===At?4:0,stroke:ft===At?dt:"",role:"img","aria-label":at._getAriaLabel(t,0),"data-is-focusable":St,ref:function(t){it._refCallback(t,At)},onFocus:function(){return it._handleFocus(At,bt,wt,At,Mt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[0].onDataPointClick))),!at._isScatterPolar&&Dt&&Vt&&u.createElement("text",{key:"".concat(At,"-label"),x:Ct,y:kt+Math.max(Lt?Lt*yt/rt:3.5,4)+12,className:ot.markerLabel,opacity:St?1:.1},Vt)))}}var Nt=0,Ot=null!==(a=null===(r=at._points[t].gaps)||void 0===r?void 0:r.sort((function(t,n){return t.startIndex-n.startIndex})))&&void 0!==a?a:[],Tt=null===(l=at._points[t].lineOptions)||void 0===l?void 0:l.curve;if((at.props.optimizeLargeData||Tt)&&at._points[t].data.length>1){for(var Et=cv().x((function(t){return it._xAxisScale(t[0])})).y((function(t){return gt(t[1])})).curve(nc(Tt)).defined((function(t){return cc(it._xAxisScale(t[0]),gt(t[1]))})),Ft="".concat(at._lineId,"_").concat(t),Bt="".concat(at._borderId,"_").concat(t),Pt=(null===(s=at._points[t].lineOptions)||void 0===s?void 0:s.strokeWidth)||at.props.strokeWidth||4,_t=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,Ht=[],It=0;It<at._points[t].data.length;It++)Ht.push([at._points[t].data[It].x instanceof Date?at._points[t].data[It].x.getTime():at._points[t].data[It].x,at._points[t].data[It].y]);var Wt=null===(c=at._points[t].lineOptions)||void 0===c?void 0:c.mode,Rt="markers"!==Wt;if(Rt&&_t){var jt=(null===(d=at._points[t].lineOptions)||void 0===d?void 0:d.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;jt>0&<.push(u.createElement("path",{id:Bt,key:Bt,d:Et(Ht),fill:"transparent",strokeLinecap:null!==(v=null===(f=at._points[t].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==v?v:"round",strokeWidth:Number.parseFloat(Pt.toString())+jt,stroke:(null===(h=at._points[t].lineOptions)||void 0===h?void 0:h.lineBorderColor)||vt.semanticColors.bodyBackground,opacity:1})),ut.push(u.createElement("path",(0,o.Cl)({id:Ft,key:Ft,d:Et(Ht),fill:"transparent","data-is-focusable":!0,stroke:dt,strokeWidth:Pt,strokeLinecap:null!==(g=null===(p=at._points[t].lineOptions)||void 0===p?void 0:p.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=at._points[t].lineOptions)||void 0===y?void 0:y.strokeDasharray,onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut},at._getClickHandler(at._points[t].onLineClick),{opacity:1})))}else Rt&&ut.push(u.createElement("path",{id:Ft,key:Ft,d:Et(Ht),fill:"transparent","data-is-focusable":!1,stroke:dt,strokeWidth:Pt,strokeLinecap:null!==(b=null===(m=at._points[t].lineOptions)||void 0===m?void 0:m.strokeLinecap)&&void 0!==b?b:"round",strokeDasharray:null===(x=at._points[t].lineOptions)||void 0===x?void 0:x.strokeDasharray,opacity:.1}));var zt=null!==at.state.activeLine&&at.state.activeLine===t;if(st.push(u.createElement("circle",{id:"".concat(at._staticHighlightCircle,"_").concat(t),key:"".concat(at._staticHighlightCircle,"_").concat(t),r:5.5,cx:0,cy:0,fill:vt.semanticColors.bodyBackground,strokeWidth:4,stroke:dt,visibility:zt?"visibility":"hidden",onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut})),null==Wt?void 0:Wt.includes("markers"))for(It=0;It<at._points[t].data.length;It++){var $t=at._points[t].data[It],Yt=$t.x,Xt=$t.y;if(Ct=at._xAxisScale(Yt),kt=gt(Xt),cc(Ct,kt)){var Gt=at._points[t].data[It].markerSize,Ut=null===(w=at._points[t].data[It])||void 0===w?void 0:w.markerColor;st.push(u.createElement("circle",{key:"".concat(at._circleId,"_").concat(t,"_").concat(It,"_marker"),r:Gt?Gt*yt*.3/rt:ft===at._circleId?5.5:3.5,cx:Ct,cy:kt,fill:ft===at._circleId?vt.semanticColors.bodyBackground:Ut||(null===(M=at._points[t])||void 0===M?void 0:M.color)||dt,stroke:Ut||dt,strokeWidth:1,opacity:_t?1:.1,onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut}))}}}else if(!at.props.optimizeLargeData)for(var qt=function(n){var i=at._checkInGap(n,Ot,Nt),e=i.isInGap;Nt=i.gapIndex;var r="".concat(at._lineId,"_").concat(t,"_").concat(n),a="".concat(at._borderId,"_").concat(t,"_").concat(n),l="".concat(at._circleId,"_").concat(t,"_").concat(n),s=at._points[t].data[n-1],c=s.x,d=s.y,f=s.xAxisCalloutData,v=s.xAxisCalloutAccessibilityData,h=at._points[t].data[n],p=h.x,g=h.y,y=at._xAxisScale(c),m=gt(d),b=at._xAxisScale(p),x=gt(g),w=(null===(C=at._points[t].lineOptions)||void 0===C?void 0:C.strokeWidth)||at.props.strokeWidth||4,M=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,tt=at._points[t].hideNonActiveDots&&ft!==l,nt=null===(A=null===(k=at._points[t].lineOptions)||void 0===k?void 0:k.mode)||void 0===A?void 0:A.includes("text"),et=at._points[t].data[n-1].text,pt=at._points[t].data[n-1].markerSize;if(cc(y,m)){var mt=at._getPath(y,m,l,n,!1,at._points[t].index);st.push((null===(L=null===(S=at._points[t].lineOptions)||void 0===S?void 0:S.mode)||void 0===L?void 0:L.includes("markers"))||nt?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:l,key:l,r:pt?pt*yt/rt:4,cx:y,cy:m,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,c,f,l,v)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n-1].onDataPointClick),{opacity:M&&!tt?1:.01,fill:(null===(D=at._points[t].data[n-1])||void 0===D?void 0:D.markerColor)||at._getPointFill(dt,l,n,!1),stroke:(null===(V=at._points[t].data[n-1])||void 0===V?void 0:V.markerColor)||dt,strokeWidth:w,role:"img","aria-label":null!==(N=at._points[t].data[n-1].text)&&void 0!==N?N:at._getAriaLabel(t,n-1)})),!at._isScatterPolar&&nt&&et&&u.createElement("text",{key:"".concat(l,"-label"),x:y,y:m+Math.max(pt?pt*yt/rt:4,4)+12,className:ot.markerLabel,opacity:M&&!tt?1:.01},et)):u.createElement("path",(0,o.Cl)({id:l,key:l,d:mt,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,c,f,l,v)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n-1].onDataPointClick),{opacity:M&&!tt?1:.01,fill:(null===(O=at._points[t].data[n-1])||void 0===O?void 0:O.markerColor)||at._getPointFill(dt,l,n,!1),stroke:(null===(T=at._points[t].data[n-1])||void 0===T?void 0:T.markerColor)||dt,strokeWidth:w,role:"img","aria-label":at._getAriaLabel(t,n-1)})))}if(n+1===at._points[t].data.length){var bt="".concat(l).concat(n,"L"),xt="".concat(l).concat(n,"D"),wt=at._points[t].hideNonActiveDots&&ft!==bt,Mt=at._points[t].data[n],Ct=Mt.xAxisCalloutData,kt=Mt.xAxisCalloutAccessibilityData;pt=at._points[t].data[n].markerSize;var At=null===(F=null===(E=at._points[t].lineOptions)||void 0===E?void 0:E.mode)||void 0===F?void 0:F.includes("text"),St=at._points[t].data[n].text;cc(b,x)&&(mt=at._getPath(b,x,bt,n,!0,at._points[t].index),st.push(u.createElement(u.Fragment,{key:"".concat(bt,"_container")},(null===(P=null===(B=at._points[t].lineOptions)||void 0===B?void 0:B.mode)||void 0===P?void 0:P.includes("markers"))||At?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:bt,key:bt,r:pt?pt*yt/rt:4,cx:b,cy:x,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,p,Ct,bt,kt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n].onDataPointClick),{opacity:M&&!wt?1:.01,fill:at._getPointFill(dt,bt,n,!0),stroke:dt,strokeWidth:w,role:"img","aria-label":null!==(_=at._points[t].data[n].text)&&void 0!==_?_:at._getAriaLabel(t,n)})),!at._isScatterPolar&&At&&St&&u.createElement("text",{key:"".concat(bt,"-label"),x:b,y:x+Math.max(pt?pt*yt/rt:4,4)+12,className:ot.markerLabel,opacity:M&&!tt?1:.01},et)):u.createElement("path",(0,o.Cl)({id:bt,key:bt,d:mt,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,p,Ct,bt,kt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n].onDataPointClick),{opacity:M&&!wt?1:.01,fill:(null===(H=at._points[t].data[n])||void 0===H?void 0:H.markerColor)||at._getPointFill(dt,bt,n,!0),stroke:(null===(I=at._points[t].data[n])||void 0===I?void 0:I.markerColor)||dt,strokeWidth:w,role:"img","aria-label":at._getAriaLabel(t,n)})),u.createElement("circle",{id:xt,key:xt,r:8,cx:b,cy:x,opacity:0,width:0,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,strokeWidth:0,focusable:!1,onBlur:at._handleMouseOut}))))}if(cc(y,m)&&cc(b,x)&&(!at._hasMarkersMode||(null===(R=null===(W=at._points[t].lineOptions)||void 0===W?void 0:W.mode)||void 0===R?void 0:R.includes("lines"))))if(M){if(!e){var Lt=(null===(j=at._points[t].lineOptions)||void 0===j?void 0:j.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;Lt>0&<.push(u.createElement("line",{id:a,key:a,x1:y,y1:m,x2:b,y2:x,strokeLinecap:null!==($=null===(z=at._points[t].lineOptions)||void 0===z?void 0:z.strokeLinecap)&&void 0!==$?$:"round",strokeWidth:Number.parseFloat(w.toString())+Lt,stroke:(null===(Y=at._points[t].lineOptions)||void 0===Y?void 0:Y.lineBorderColor)||vt.semanticColors.bodyBackground,opacity:1})),ut.push(u.createElement("line",(0,o.Cl)({id:r,key:r,x1:y,y1:m,x2:b,y2:x,strokeWidth:w,ref:function(t){it._refCallback(t,r)},onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,stroke:dt,strokeLinecap:null!==(G=null===(X=at._points[t].lineOptions)||void 0===X?void 0:X.strokeLinecap)&&void 0!==G?G:"round",strokeDasharray:null===(U=at._points[t].lineOptions)||void 0===U?void 0:U.strokeDasharray,strokeDashoffset:null===(q=at._points[t].lineOptions)||void 0===q?void 0:q.strokeDashoffset,opacity:1},at._getClickHandler(at._points[t].onLineClick))))}}else e||ut.push(u.createElement("line",{id:r,key:r,x1:y,y1:m,x2:b,y2:x,strokeWidth:w,stroke:dt,strokeLinecap:null!==(K=null===(Z=at._points[t].lineOptions)||void 0===Z?void 0:Z.strokeLinecap)&&void 0!==K?K:"round",strokeDasharray:null===(J=at._points[t].lineOptions)||void 0===J?void 0:J.strokeDasharray,strokeDashoffset:null===(Q=at._points[t].lineOptions)||void 0===Q?void 0:Q.strokeDashoffset,opacity:.1}))},Zt=1;Zt<at._points[t].data.length;Zt++)qt(Zt);var Kt=null===(tt=at._points[t].lineOptions)||void 0===tt?void 0:tt.fill,Jt=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend;if("toself"===Kt&&at._points[t].data.length>=3&&Jt&&at._isScatterPolar){var Qt=function(t){return it._xAxisScale((t.x,Date,t.x))},tn=cv().x((function(t){return Qt(t)})).y((function(t){return gt(t.y)})).curve(nc(Tt)).defined((function(t){return cc(Qt(t),gt(t.y))}))(at._points[t].data);tn&&ut.push(u.createElement("path",{key:"scatterpolar_fill_".concat(t),d:"".concat(tn,"Z"),fill:dt,fillOpacity:.5,stroke:dt,strokeWidth:2,strokeOpacity:.8,pointerEvents:"none"}))}at._isScatterPolar&&st.push.apply(st,Xv({xAxisScale:at._xAxisScale,yAxisScale:gt,className:ot.markerLabel||"",lineOptions:null===(nt=at._points[t])||void 0===nt?void 0:nt.lineOptions})),et.push(u.createElement("g",{key:"line_".concat(t),role:"region","aria-label":"".concat(ct,", line ").concat(t+1," of ").concat(at._points.length," with ").concat(at._points[t].data.length," data points.")},lt,ut,st))},at=this,lt=this._points.length-1;lt>=0;lt--)ut(lt);if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var st=sl(t).call(this._xAxisScale);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var ct={tooltipCls:ot.tooltip,id:this._tooltipId,axis:st};st&&Vs(ct)}return et},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&this.props.data.lineChartData.filter((function(t){return t.data.length})).length>0)},n.defaultProps={enableReflow:!0,useUTC:!0,isCalloutForStack:!0},n}(u.Component),Kv=(0,r.I)(Zv,(function(t){return{tooltip:iv(t.theme),markerLabel:ov(t.theme)}})),Jv=(0,a.Z)(),Qv=u.forwardRef((function(t,n){var i,e,r,a=u.useMemo((function(){return p("circle")}),[]),s=u.useMemo((function(){return p("seriesID")}),[]),c=u.useMemo((function(){return p("verticalLine")}),[]),d=u.useMemo((function(){return p("ScatterChartTooltipId_")}),[]),f=u.useMemo((function(){return p("_ScatterChart_empty")}),[]),v=u.useRef(lt(t.data.scatterChartData)),h=u.useMemo((function(){return Ss(v.current)||{}}),[v]),g=u.useRef(""),y=u.useRef(""),m=u.useRef(null),b=u.useMemo((function(){return[]}),[]),x=u.useRef(null),w=u.useRef([]),M=u.useRef(0),C=u.useRef(null),k=u.useRef(null),A=u.useState(""),S=A[0],L=A[1],D=u.useState(""),V=D[0],N=D[1],O=u.useState([]),T=O[0],E=O[1],F=u.useState([]),B=F[0],P=F[1],_=u.useState(!1),H=_[0],I=_[1],W=u.useState(""),R=W[0],j=W[1],z=u.useState(),$=z[0],Y=z[1],X=u.useState(!1),G=X[0],U=X[1],q=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),Z=q[0],K=q[1],J=u.useState(""),Q=J[0],tt=J[1],nt=u.useRef(void 0),it=u.useRef(!1),et=u.useRef(!1),rt=Jv(t.styles,{theme:t.theme});u.useEffect((function(){var n,i,e;nt.current&&!qs(nt.current,null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&K((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),nt.current=null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends}),[null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){var n,i;return{chartContainer:null!==(i=null===(n=C.current)||void 0===n?void 0:n.chartContainer)&&void 0!==i?i:null,toImage:function(n){var i,e;return tf([{container:null===(i=C.current)||void 0===i?void 0:i.chartContainer}],t.hideLegend||null===(e=k.current)||void 0===e?void 0:e.toSVG,(0,l.jI)(),n)}}}),[t.hideLegend]);var ot=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0?Rs(t.data.scatterChartData[0].data[0].x,!0):es.StringAxis,ut=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0&&"string"==typeof t.data.scatterChartData[0].data[0].y?rs.StringAxis:rs.NumericAxis,at=u.useRef([]);function lt(t){return t?t.map((function(t,n){var i;return i=void 0===t.color?ds(n,0):fs(t.color),(0,o.Cl)((0,o.Cl)({},t),{index:-1,color:i})})):[]}u.useEffect((function(){v.current===lt(t.data.scatterChartData)&&t.data===v.current||(at.current=lt(t.data.scatterChartData))}),[t.height,t.width,t.data,v]);var st=u.useCallback((function(t){x.current=t}),[]);function ct(){P([]),I(!1)}function dt(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?K(n):K(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}var ft=u.useCallback((function(n,i){var e=t.theme;return R===i?e.semanticColors.bodyBackground:n}),[R,t]),vt=u.useCallback((function(n,i,e,r,o,u,a,l){return u===es.NumericAxis?Os(n,i,e,o,t.xScaleType,!0):u===es.DateAxis?Bs(n,i,e,o,l,r):Fs(i,e,o)}),[t.xScaleType]),ht=u.useCallback((function(n,i,e,r,o){m.current=r;var u=i instanceof Date?(0,Yn.Yn)(i,t.culture,t.useUTC):i,a=gc(h,i);a?(sl("#".concat(c)).attr("transform",(function(){var t;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,i))+M.current,", 0)")})).attr("visibility","visibility"),b.forEach((function(t){t.index===n&&(U(!0),L(e||""+u),tt("#".concat(r)),E(a.values),j(r))}))):j(r)}),[c,g,M,h,b,t.culture,t.useUTC]),pt=u.useCallback((function(n,i,e,r,o,u,a){var l;null==a||a.persist();var s=n instanceof Date?(0,Yn.Yn)(n,t.culture,t.useUTC):n,d=gc(h,n);d?(sl("#".concat(c)).attr("transform",(function(){var t,e;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,n))+M.current,", ").concat(null===(e=y.current)||void 0===e?void 0:e.call(y,i),")")})).attr("visibility","visibility").attr("y2","".concat(e-(null===(l=y.current)||void 0===l?void 0:l.call(y,i)))),m.current!==o&&(m.current=o,U(!0),L(r||""+s),tt("#".concat(o)),E(d.values),Y(d),j(o))):j(o)}),[c,g,M,h,t.culture,t.useUTC]),gt=u.useCallback((function(){sl("#".concat(c)).attr("visibility","hidden")}),[c]),yt=u.useCallback((function(){m.current=null,j(""),G&&U(!1)}),[m,G,j,U]),mt=u.useCallback((function(){return Z.length>0?Z:V?[V]:[]}),[Z,V]),bt=u.useCallback((function(){return 0===mt().length}),[mt]),xt=u.useCallback((function(t){return mt().includes(t)}),[mt]),wt=u.useCallback((function(n,i){var e,r,o=null===(e=v.current)||void 0===e?void 0:e[n],u=o.data[i],a=u.x instanceof Date?(0,Yn.Yn)(u.x,t.culture,t.useUTC):u.x,l=u.xAxisCalloutData||a,s=o.legend,c=u.yAxisCalloutData||u.y;return(null===(r=u.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(l,". ").concat(s,", ").concat(c,".")}),[v,t.culture,t.useUTC]),Mt=u.useCallback((function(n,i){var e,r,l,c,f,h,p,m,b,w,C,k,A,S,L,D,V,N,O,T,E,F,P,_,I,W,j,z,$,Y,X,G,U,q,Z=[];v.current=H?B:lt(t.data.scatterChartData),ot===es.StringAxis&&(M.current=(null===(e=g.current)||void 0===e?void 0:e.bandwidth())/2);for(var K=fi(v.current,(function(t){return fi(t.data,(function(t){return t.markerSize}))})),J=ot!==es.StringAxis&&ut!==rs.StringAxis?fc({data:v.current,xScale:g.current,yScalePrimary:y.current,xScaleType:t.xScaleType,yScaleType:t.yScaleType}):0,Q=function(t){for(var n=[],e=null===(c=null===(l=v.current)||void 0===l?void 0:l[t])||void 0===c?void 0:c.legend,r=null===(h=null===(f=v.current)||void 0===f?void 0:f[t])||void 0===h?void 0:h.color,d=i-(null!==(m=null===(p=x.current)||void 0===p?void 0:p.bottom)&&void 0!==m?m:0)+6,B=function(i){var l=null===(A=null===(k=v.current)||void 0===k?void 0:k[t])||void 0===A?void 0:A.data[i],c=l.x,f=l.y,h=l.xAxisCalloutData,p=l.xAxisCalloutAccessibilityData,m=null===(S=g.current)||void 0===S?void 0:S.call(g,c),b=ut===rs.StringAxis?(null===(L=y.current)||void 0===L?void 0:L.call(y,f))+((null===(D=y.current)||void 0===D?void 0:D.bandwidth)?y.current.bandwidth()/2:0):null===(V=y.current)||void 0===V?void 0:V.call(y,f);if(!cc(m,b))return"continue";var x,w="".concat(s,"_").concat(t,"_").concat(i),C="".concat(a,"_").concat(t,"_").concat(i),B=(null===(O=null===(N=v.current)||void 0===N?void 0:N[t])||void 0===O?void 0:O.data[i]).markerSize,$=B&&0!==K?ot!==es.StringAxis?B*J/K:4+(B-4)/(K-4)*12:R===C?6:4,Y=xt(e)||bt()||H,X=(null===(E=null===(T=v.current)||void 0===T?void 0:T[t])||void 0===E?void 0:E.hideNonActiveDots)&&R!==C,G=null===(P=null===(F=v.current)||void 0===F?void 0:F[t].data[i])||void 0===P?void 0:P.text;et.current||n.push(u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:C,key:C,r:Math.max($,4),cx:m+M.current,cy:b,"data-is-focusable":Y,onMouseOver:function(t){return pt(c,f,d,h,C,p,t)},onMouseMove:function(t){return pt(c,f,d,h,C,p,t)},onMouseOut:gt,onFocus:function(){return ht(w,c,h,C,p)},onBlur:gt},(x=null===(W=null===(I=null===(_=v.current)||void 0===_?void 0:_[t])||void 0===I?void 0:I.data[i])||void 0===W?void 0:W.onDataPointClick)?{onClick:x}:{},{opacity:Y&&!X?1:.1,fill:ft(r,C),stroke:r,role:"img","aria-label":wt(t,i),tabIndex:""!==(null===(z=null===(j=v.current)||void 0===j?void 0:j[t])||void 0===z?void 0:z.legend)?0:void 0})))),et&&G&&n.push(u.createElement("text",{key:"".concat(C,"-label"),x:m+M.current,y:b+Math.max($+12,16),className:rt.markerLabel},G))},Q=0;Q<(null===(C=null===(w=null===(b=v.current)||void 0===b?void 0:b[t])||void 0===w?void 0:w.data)||void 0===C?void 0:C.length);Q++)B(Q);it.current&&n.push.apply(n,Xv({xAxisScale:g.current,yAxisScale:y.current,className:rt.markerLabel||"",lineOptions:null===(Y=null===($=v.current)||void 0===$?void 0:$[t])||void 0===Y?void 0:Y.lineOptions})),Z.push(u.createElement("g",{key:"series_".concat(t),role:"region","aria-label":"".concat(e,", series ").concat(t+1," of ").concat(null===(X=v.current)||void 0===X?void 0:X.length," with ").concat(null===(q=null===(U=null===(G=v.current)||void 0===G?void 0:G[t])||void 0===U?void 0:U.data)||void 0===q?void 0:q.length," data points.")},n))},tt=(null===(r=v.current)||void 0===r?void 0:r.length)-1;tt>=0;tt--)Q(tt);if(!t.showXAxisLablesTooltip)try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}if(!t.wrapXAxisLables&&t.showXAxisLablesTooltip){var nt=sl(n).call(g.current);try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}var at={tooltipCls:rt.tooltip,id:d,xAxis:nt};nt&&Vs(at)}return Z}),[g,y,t.data.scatterChartData,t.showXAxisLablesTooltip,t.wrapXAxisLables,a,wt,ft,ht,pt,gt,xt,bt,s,d,ot,ut,R,H,B,rt,t.xScaleType,t.yScaleType]),Ct=u.useCallback((function(t,n,i,e,r){g.current=t,y.current=n,it.current=oc(v.current),et.current=function(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"text"===t.lineOptions.mode}))}(v.current),w.current=Mt(r,i)}),[w,g,y,Mt]),kt=u.useCallback((function(n,i){var e=Ps(n,0,void 0,t.yScaleType),r=e.startValue,o=e.endValue,u=lc(r,o,t.yScaleType);return{startValue:r-u.start,endValue:o+u.end}}),[t.yScaleType]),At=t.legendProps,St=t.tickValues,Lt=t.tickFormat;v.current=lt(t.data.scatterChartData);var Dt=v.current;At&&At.canSelectMultipleLegends&&(Dt=B.length>=1?B:v.current,h=Ss(Dt));var Vt=null;t.hideLegend||et.current||(Vt=function(n){var i=t.legendProps,e=!(!i||!i.canSelectMultipleLegends),r={};n.forEach((function(t){t.legend&&(r[t.legend]||(r[t.legend]=[]),r[t.legend].push(t))}));var a=Object.entries(r).map((function(t){var n=t[0],i=t[1][0];return(0,o.Cl)({title:n,color:i.color,onMouseOutAction:function(){N("")},hoverAction:function(){yt(),N(n)}},i.legendShape&&{shape:i.legendShape})}));return u.createElement(vf,(0,o.Cl)({ref:k,legends:(0,o.fX)([],a,!0),enabledWrapLines:t.enabledLegendsWrapLines,overflowProps:t.legendsOverflowProps,focusZonePropsInHoverCard:t.focusZonePropsForLegendsInHoverCard,overflowText:t.legendsOverflowText},e&&{onLegendHoverCardLeave:ct},{onChange:dt},t.legendProps))}(v.current));var Nt=(0,o.Cl)({isCalloutVisible:G,directionalHint:3,YValueHover:T,hoverXValue:S,id:"toolTip".concat(m.current),target:Q,isBeakVisible:!1,gapSpace:15,onDismiss:function(){U(!1)},preventDismissOnEvent:function(){return!0},hidden:!(!t.hideTooltip&&G),descriptionMessage:t.getCalloutDescriptionMessage&&$?t.getCalloutDescriptionMessage($):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:{}},t.calloutProps),Ot={tickValues:St,tickFormat:Lt},Tt=v.current.map((function(t){return t.data.map((function(t){return t.x}))})).flat();r=Array.from(new Set(Tt));var Et=function(){var n;if(ut!==rs.StringAxis||"default"===t.yAxisCategoryOrder){for(var i=new Set,e=v.current.length-1;e>=0;e--){var r=v.current[e];if(r.data&&Array.isArray(r.data))for(var o=0,u=r.data;o<u.length;o++){var a=u[o];"string"==typeof a.y&&i.add(a.y)}}return Array.from(i)}return ec((n={},v.current.forEach((function(t){t.data&&Array.isArray(t.data)&&t.data.forEach((function(t){"string"==typeof t.y&&(n[t.y]||(n[t.y]=[]),"number"==typeof t.x&&n[t.y].push(t.x))}))})),n),t.yAxisCategoryOrder)}();return t.data&&t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData.filter((function(t){return t.data.length})).length>0?u.createElement(Nv,(0,o.Cl)({},t,{ref:C,chartTitle:t.data.chartTitle,isCalloutForStack:!0,points:Dt,chartType:is.ScatterChart,calloutProps:Nt,tickParams:Ot,legendBars:Vt,getmargins:st,getMinMaxOfYAxis:kt,getDomainNRangeValues:vt,createYAxis:Cs,createStringYAxis:As,getGraphData:Ct,xAxisType:ot,yAxisType:ut},ut===rs.StringAxis?{stringDatasetForYAxisDomain:Et}:{},{onChartMouseLeave:yt,enableFirstRenderOptimization:!0,datasetForXAxisDomain:r,componentRef:C},it.current?{yMaxValue:1,yMinValue:-1}:{},{children:function(t){return g.current=t.xScale,y.current=t.yScalePrimary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:t.containerHeight,stroke:"#323130",id:c,visibility:"hidden",strokeDasharray:"5,5"}),u.createElement("g",null,w.current)))}})):u.createElement("div",{id:f,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));Qv.displayName="ScatterChart";var th=(0,r.I)(Qv,(function(t){return{tooltip:iv(t.theme),markerLabel:ov(t.theme)}}));function nh(t,n){if((r=t.length)>1)for(var i,e,r,o=1,u=t[n[0]],a=u.length;o<r;++o)for(e=u,u=t[n[o]],i=0;i<a;++i)u[i][1]+=u[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function ih(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function eh(t,n){return t[n]}function rh(t){const n=[];return n.key=t,n}function oh(t){return t<0?-1:1}function uh(t,n,i){var e=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(e||r<0&&-0),u=(i-t._y1)/(r||e<0&&-0),a=(o*r+u*e)/(e+r);return(oh(o)+oh(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function ah(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function lh(t,n,i){var e=t._x0,r=t._y0,o=t._x1,u=t._y1,a=(o-e)/3;t._context.bezierCurveTo(e+a,r+a*n,o-a,u-a*i,o,u)}function sh(t){this._context=t}function ch(t){this._context=t}function dh(t){return new sh(t)}function fh(t,n,i){var e=null,r=pf(!0),o=null,u=hl,a=null,l=_f(s);function s(s){var c,d,f,v,h,p=(s=hf(s)).length,g=!1,y=new Array(p),m=new Array(p);for(null==o&&(a=u(h=l())),c=0;c<=p;++c){if(!(c<p&&r(v=s[c],c,s))===g)if(g=!g)d=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),f=c-1;f>=d;--f)a.point(y[f],m[f]);a.lineEnd(),a.areaEnd()}g&&(y[c]=+t(v,c,s),m[c]=+n(v,c,s),a.point(e?+e(v,c,s):y[c],i?+i(v,c,s):m[c]))}if(h)return a=null,h+""||null}function c(){return cv().defined(r).curve(u).context(o)}return t="function"==typeof t?t:void 0===t?lv:pf(+t),n="function"==typeof n?n:pf(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?sv:pf(+i),s.x=function(n){return arguments.length?(t="function"==typeof n?n:pf(+n),e=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:pf(+n),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:pf(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:pf(+t),i=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:pf(+t),s):n},s.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:pf(+t),s):i},s.lineX0=s.lineY0=function(){return c().x(t).y(n)},s.lineY1=function(){return c().x(t).y(i)},s.lineX1=function(){return c().x(e).y(n)},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:pf(!!t),s):r},s.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),s):u},s.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),s):o},s}sh.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:lh(this,this._t0,ah(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,lh(this,ah(this,i=uh(this,t,n)),i);break;default:lh(this,this._t0,i=uh(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(function(t){this._context=new ch(t)}.prototype=Object.create(sh.prototype)).point=function(t,n){sh.prototype.point.call(this,n,t)},ch.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,r,o){this._context.bezierCurveTo(n,t,e,i,o,r)}};var vh,hh=(0,a.Z)(),ph=wi((function(t){return t.x})).left;!function(t){t.show="visibility",t.hide="hidden"}(vh||(vh={}));var gh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._containsSecondaryYAxis=!1,e._hasDuplicateXValues=!1,e._hasMissingXValues=!1,e.toImage=function(t){var n,i;return tf([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},e._getMinMaxOfYAxis=function(t,n,i){return Ps(t,0,i)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===es.NumericAxis?Os(t,n,i,r):o===es.DateAxis?Bs(t,n,i,r,a,e):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},e._getMargins=function(t){e.margins=t},e._onRectMouseMove=function(t){t.persist();var n=e.props.data.lineChartData,i=e._xAxisRectScale.invert(av(t)[0],document.getElementById(e._rectId)),r=ph(n[0].data,i),u=n[0].data[r-1],a=n[0].data[r],l=null,s=null,c=n[0].data.length>0?Rs(n[0].data[0].x,!0):null;if(void 0===u&&void 0!==a)l=a.x,s=r;else if(void 0!==u&&void 0===a)l=u.x,s=r-1;else{var d=void 0,f=void 0,v=void 0;switch(c){case es.DateAxis:d=new Date(i).getTime(),f=u.x.getTime(),v=a.x.getTime(),l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1;break;case es.NumericAxis:d=i,f=u.x,v=a.x,l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1}}var h=n[0].data[s],p=h.xAxisCalloutData,g=h.xAxisCalloutAccessibilityData,y=l instanceof Date?(0,Yn.Yn)(l,e.props.culture,e.props.useUTC):l,m=gc(e._calloutPoints,l),b=c===es.DateAxis?l.getTime():l,x=e.state.nearestCircleToHighlight!==b;if(m&&x&&!e.state.isShowCalloutPending){var w=e._getFilteredLegendValues(m.values);e.setState({nearestCircleToHighlight:b,isCalloutVisible:!1,isShowCalloutPending:!0,lineXValue:e._xAxisRectScale(l),displayOfLine:vh.show,isCircleClicked:!1,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},m),{values:w}),YValueHover:w,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},m),{values:w}),hoverXValue:p||y,xAxisCalloutAccessibilityData:g,activePoint:""})}m||e.setState({isCalloutVisible:!1,nearestCircleToHighlight:b,displayOfLine:vh.hide,isCircleClicked:!1})},e._onRectMouseOut=function(){},e._handleChartMouseLeave=function(){e.setState({refSelected:null,isCalloutVisible:!1,nearestCircleToHighlight:null,lineXValue:0,displayOfLine:vh.hide,isCircleClicked:!1,stackCalloutProps:void 0,dataPointCalloutProps:void 0,hoverXValue:void 0,YValueHover:[]})},e._getDataPoints=function(t,n){var i,r=[],o=0;if(e._shouldFillToZeroY())t.forEach((function(t,i){var e=[];n.forEach((function(n){e.push({values:[0,n[t]],xVal:n.xVal}),n[t]>o&&(o=n[t])})),r.push(e)}));else{var u=function(){var t=pf([]),n=ih,i=nh,e=eh;function r(r){var o,u,a=Array.from(t.apply(this,arguments),rh),l=a.length,s=-1;for(const t of r)for(o=0,++s;o<l;++o)(a[o][s]=[0,+e(t,a[o].key,s,r)]).data=t;for(o=0,u=hf(n(a));o<l;++o)a[u[o]].index=o;return i(a,u),a}return r.keys=function(n){return arguments.length?(t="function"==typeof n?n:pf(Array.from(n)),r):t},r.value=function(t){return arguments.length?(e="function"==typeof t?t:pf(+t),r):e},r.order=function(t){return arguments.length?(n=null==t?ih:"function"==typeof t?t:pf(Array.from(t)),r):n},r.offset=function(t){return arguments.length?(i=null==t?nh:t,r):i},r}().keys(t)(n);o=fi(u[u.length-1],(function(t){return t[1]})),u.forEach((function(t){var n=[];t.forEach((function(t){n.push({values:t,xVal:t.data.xVal})})),r.push(n)}))}return e._isMultiStackChart=!!((null===(i=e.props.legendProps)||void 0===i?void 0:i.selectedLegends)?(null==r?void 0:r.length)>=1:(null==r?void 0:r.length)>1),{renderData:r,maxOfYVal:e._containsSecondaryYAxis?Ps(e.props.data.lineChartData).endValue:o}},e._createDataSet=function(t){if(e.props.enablePerfOptimization&&e._enableComputationOptimization&&!e._hasDuplicateXValues){var n=[],i=[],r=[],o=[],u=Ss(t);t&&t.length&&t.forEach((function(t){r.push(t.color),o.push(t.opacity||1),n.push.apply(n,t.data)}));var a={};n.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;a[n]?a[n].push(t):a[n]=[t]})),Object.keys(a).forEach((function(t){var n=a[t],e={};n.forEach((function(t,n){e.xVal=t.x,e["chart".concat(n)]=t.y})),i.push(e)}));for(var l=i&&Object.keys(i[0]).length,s=[],c=0;c<l-1;c++){var d="chart".concat(c);s.push(d)}var f=e._getDataPoints(s,i);return{colors:r,opacity:o,keys:s,data:f,calloutPoints:u}}var v=[],h=[],p=[],g=[],y=(u=Ss(t),f={},s=[],0);if(t&&t.length&&t.forEach((function(t){e._hasDuplicateXValues&&!t.legend&&(t.legend="chart".concat(y),++y),t.data.forEach((function(n){n.legend=t.legend})),p.push(t.color),g.push(t.opacity||1),v.push.apply(v,t.data)})),e._hasDuplicateXValues){var m=e._createDatasetForXCoordinateWithMultipleYValues(v);f=e._getDataPoints(m.keys,m.filteredDataSet)}else{for(var b=v,x=function(){var t=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x,n=b.filter((function(n){return(n.x instanceof Date?n.x.toLocaleString():n.x)===t})),i={};n.forEach((function(t,n){i.xVal=t.x,i["chart".concat(n)]=t.y})),h.push(i);var e=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x;b=b.filter((function(t){return(t.x instanceof Date?t.x.toLocaleString():t.x)!==e}))};b.length;)x();for(l=h&&Object.keys(h[0]).length,c=0;c<l-1;c++)d="chart".concat(c),s.push(d);f=e._getDataPoints(s,h)}return{colors:p,opacity:g,keys:s,data:f,calloutPoints:u}},e._createDatasetForXCoordinateWithMultipleYValues=function(t){var n=[],i={};t.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;i[n]||(i[n]=[]),i[n].push(t)})),Object.keys(i).forEach((function(t){var e=i[t];e.forEach((function(t,i){var r={xVal:e[0].x};r[t.legend?t.legend:"chart".concat(i)]=t.y,n.push(r)}))}));var e=[];n.forEach((function(t){Object.keys(t).forEach((function(t){"xVal"===t||e.includes(t)||e.push(t)}))})),n.forEach((function(t){e.forEach((function(n){t[n]||(t[n]=0)}))}));var r=n.filter((function(t){return e.some((function(n){return 0!==t[n]}))}));return{keys:Array.from(new Set(r.flatMap((function(t){return Object.keys(t).filter((function(t){return"xVal"!==t}))})))),filteredDataSet:r}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._getGraphData=function(t,n,i,r,o,u,a){e._chart=e._drawGraph(i,t,n,a,o)},e._getLegendData=function(t){var n=[];return t.forEach((function(t){var i=t.color;if(!(n.filter((function(n){return n.title===t.legend&&n.color===i})).length>0)){var r={title:t.legend,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(t.legend)},onMouseOutAction:function(){e._onLegendLeave()}};n.push(r)}})),u.createElement(vf,(0,o.Cl)({legends:n,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._onDataPointClick=function(t){t&&t(),e.setState({isCircleClicked:!0})},e._getOpacity=function(t){return e._isMultiStackChart?e._legendHighlighted(t)||e._noLegendHighlighted()?.7:.1:.7},e._getLineOpacity=function(t){if(e._isMultiStackChart){var n=.3;return e.state.isCalloutVisible&&(n=1),e._noLegendHighlighted()||(n=e._legendHighlighted(t)?0:.1),n}return 1},e._updateCircleFillColor=function(t,n,i){var r=n;return e.state.nearestCircleToHighlight!==t&&e.state.activePoint!==i||(e._highlightedCircleId=i,e.state.isCircleClicked||(r=e.props.theme.semanticColors.bodyBackground)),r},e._drawGraph=function(t,n,i,r,a){var l,s=e._addDefaultColors(e.props.data.lineChartData),c=e.props.data,d=c.pointOptions,f=c.pointLineOptions,v=[];e._data.forEach((function(t,a){var l,c,d,f,h,p,g,y,m,b,x,w,M=(null===(l=s[a])||void 0===l?void 0:l.useSecondaryYScale)&&r?r:i,C=nc(null===(d=null===(c=s[a])||void 0===c?void 0:c.lineOptions)||void 0===d?void 0:d.curve,dh),k=fh().x((function(t){return n(t.xVal)})).y0((function(t){return M(t.values[0])})).y1((function(t){return M(t.values[1])})).curve(C),A=cv().x((function(t){return n(t.xVal)})).y((function(t){return M(t.values[1])})).curve(C),S=e._shouldFillToZeroY()?.8:e._opacity[a];v.push(u.createElement(u.Fragment,{key:"".concat(a,"-graph-").concat(e._uniqueIdForGraph)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:"gradient_".concat(a),x1:"0%",x2:"0%",y1:"0%",y2:"100%"},u.createElement("stop",{offset:"0",stopColor:e._colors[a]}),u.createElement("stop",{offset:"100%",stopColor:"transparent"}))),u.createElement("path",{id:"".concat(a,"-line-").concat(e._uniqueIdForGraph),d:A(t),fill:"transparent",strokeWidth:null!==(p=null===(h=null===(f=s[a])||void 0===f?void 0:f.lineOptions)||void 0===h?void 0:h.strokeWidth)&&void 0!==p?p:3,stroke:e._colors[a],opacity:e._getLineOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove,strokeDasharray:null===(y=null===(g=s[a])||void 0===g?void 0:g.lineOptions)||void 0===y?void 0:y.strokeDasharray,strokeDashoffset:null===(b=null===(m=s[a])||void 0===m?void 0:m.lineOptions)||void 0===b?void 0:b.strokeDashoffset,strokeLinecap:null===(w=null===(x=s[a])||void 0===x?void 0:x.lineOptions)||void 0===w?void 0:w.strokeLinecap}),1===t.length?u.createElement("circle",{id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),cx:n(t[0].xVal),cy:M(t[0].values[1]),r:6,stroke:e._colors[a],strokeWidth:3,fill:e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove}):u.createElement("path",(0,o.Cl)({id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),d:k(t),fill:e.props.enableGradient?"url(#gradient_".concat(a,")"):e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e.props.optimizeLargeData&&{"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),role:"img","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")}))))}));var h=d&&d.r?Number(d.r):8;e._data.forEach((function(t,a){var c;if(s.length!==a){var f=(null===(c=s[a])||void 0===c?void 0:c.useSecondaryYScale)&&r?r:i;e.props.optimizeLargeData&&1!==t.length?t.forEach((function(t,i){var r=t.xVal instanceof Date?t.xVal.getTime():t.xVal;if(e.state.nearestCircleToHighlight===r){var c="".concat(e._circleId,"_").concat(a*e._data[0].length+i);l=s[a].color;var p=s[a].legend;v.push(u.createElement("circle",(0,o.Cl)({key:c,id:c,cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(r,l,c),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),Us(d),{r:e._getCircleRadius(r,h,c,p)})))}})):v.push(u.createElement("g",{key:"".concat(a,"-dots-").concat(e._uniqueIdForGraph),clipPath:"url(#clip)",role:"region","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")},t.map((function(t,i){var r="".concat(e._circleId,"_").concat(a*e._data[0].length+i),c=t.xVal instanceof Date?t.xVal.getTime():t.xVal;l=s[a].color;var v=s[a].legend;return u.createElement("circle",(0,o.Cl)({key:r,id:r,"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(c,l,r),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),{onFocus:function(){return e._handleFocus(a,i,r)},onBlur:e._handleBlur},Us(d),{r:e._getCircleRadius(c,h,r,v),role:"img","aria-label":!e._hasDuplicateXValues&&!e._hasMissingXValues&&e._getAriaLabel(a,i)||void 0}))}))))}})),v.push(u.createElement("line",(0,o.Cl)({id:e._verticalLineId,key:e._verticalLineId,x1:e.state.lineXValue,y1:0,x2:e.state.lineXValue,y2:t,strokeWidth:1,strokeDasharray:5.5,stroke:l,opacity:.5,visibility:e.state.displayOfLine},Us(f))));var p=hh(e.props.styles,{theme:e.props.theme});if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=sl(a).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:p.tooltip,id:e._tooltipId,axis:g};g&&Vs(y)}return v},e._getOnClickHandler=function(t,n,i){return!e._hasDuplicateXValues&&!e._hasMissingXValues&&{onClick:e._onDataPointClick.bind(e,t[n].data[i].onDataPointClick)}},e._getCircleRadius=function(t,n,i,r){var o=e.state,u=o.isCircleClicked,a=o.nearestCircleToHighlight,l=o.activePoint;return e._noLegendHighlighted()||e._legendHighlighted(r)?u&&a===t?1:a===t||l===i?n:0:0},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){if(e._hasMissingXValues){var n=new Set;t&&t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))})),t&&t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||t.data.push({x:"string"==typeof n?new Date(n):n,y:0,legend:t.legend})})),t.data.sort((function(t,n){var i=t.x instanceof Date?t.x.getTime():t.x,e=n.x instanceof Date?n.x.getTime():n.x;return i<e?-1:i>e?1:0}))}))}return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?ds(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):fs(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},e._handleFocus=function(t,n,i){var r=e.props.data.lineChartData[t].data[n],u=r.x,a=r.y,l=r.xAxisCalloutData,s=u instanceof Date?(0,Yn.Yn)(u,e.props.culture,e.props.useUTC):u,c=gc(e._calloutPoints,u);if(c){c.values=c.values.filter((function(t){return t.y===a}));var d=e._getFilteredLegendValues(c.values);e.setState({refSelected:"#".concat(i),isCalloutVisible:!0,hoverXValue:l||s,YValueHover:d,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},c),{values:d}),dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},c),{values:d}),activePoint:i})}},e._getFilteredLegendValues=function(t){return e._noLegendHighlighted()?t:t.filter((function(t){return e._legendHighlighted(t.legend)}))},e._handleBlur=function(){e.setState({refSelected:null,isCalloutVisible:!1,hoverXValue:void 0,YValueHover:[],stackCalloutProps:void 0,dataPointCalloutProps:void 0,activePoint:""})},e._getChartTitle=function(){var t=e.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Area chart with ".concat((null==i?void 0:i.length)||0," data series. ")},Lc(e),e._createSet=(0,an.J9)(e._createDataSet),e.state={selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,hoverXValue:"",isCalloutVisible:!1,refSelected:null,YValueHover:[],lineXValue:0,displayOfLine:vh.hide,isCircleClicked:!1,nearestCircleToHighlight:null,isShowCalloutPending:!1,activePoint:""},En("AREA CHART",n,{showYAxisGridLines:"Dont use this property. Lines are drawn by default"}),e._hasMissingXValues=e._containsMissingXValues(),e._uniqueIdForGraph=p("areaChart_"),e._verticalLineId=p("verticalLine_"),e._circleId=p("circle"),e._rectId=p("rectangle"),e._tooltipId=p("AreaChartTooltipID"),e._enableComputationOptimization=!0,e._firstRenderOptimization=!0,e._emptyChartId=p("_AreaChart_empty"),e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;qs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),this.state.isShowCalloutPending&&this.setState({refSelected:"#".concat(this._highlightedCircleId),isCalloutVisible:!0,isShowCalloutPending:!1})},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props.data.lineChartData,i=this._addDefaultColors(n);this._hasDuplicateXValues=this._xCoordinateContainsMultipleY(),this._containsSecondaryYAxis=!!this.props.secondaryYScaleOptions&&i.some((function(t){return t.useSecondaryYScale}));var e=this._createSet(i),r=e.colors,a=e.opacity,l=e.data,s=e.calloutPoints;this._calloutPoints=s;var c=Ns(i);this._colors=r,this._opacity=a,this._data=l.renderData;var d=this._getLegendData(i),f={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat},v=(0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible&&!this._hasDuplicateXValues&&!this._hasMissingXValues,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),gapSpace:15,isBeakVisible:!1,onDismiss:this._closeCallout,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps);return u.createElement(Nv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:i,chartType:is.AreaChart,calloutProps:v,legendBars:d,createYAxis:Cs,isCalloutForStack:!0,xAxisType:c?es.DateAxis:es.NumericAxis,tickParams:f,maxOfYVal:l.maxOfYVal,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:As,getmargins:this._getMargins,getMinMaxOfYAxis:this._getMinMaxOfYAxis,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){t._xAxisRectScale=n.xScale;var i=t._xAxisRectScale.ticks(),e=t._xAxisRectScale(i[i.length-1]),r=n.containerHeight-t.margins.top;return u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("rect",{id:t._rectId,width:e,height:r,fill:"transparent",onMouseMove:t._onRectMouseMove,onMouseOut:t._onRectMouseOut,onMouseOver:t._onRectMouseMove})),u.createElement("g",null,t._chart))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._getAriaLabel=function(t,n){var i,e=this.props.data.lineChartData[t],r=e.data[n],o=r.x instanceof Date?(0,Yn.Yn)(r.x,this.props.culture,this.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n.prototype._xCoordinateContainsMultipleY=function(){var t=this.props.data.lineChartData;if(!t)return!1;for(var n=0,i=t;n<i.length;n++)for(var e={},r=0,o=i[n].data;r<o.length;r++){var u=o[r],a=u.x instanceof Date?u.x.toLocaleString():u.x;if(e[a]||(e[a]=[]),e[a].push(u.y),e[a].length>1)return!0}return!1},n.prototype._containsMissingXValues=function(){var t=this.props.data.lineChartData;if(!t)return!1;var n=new Set;t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))}));var i=!1;return t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||(i=!0)}))})),i},n.prototype._shouldFillToZeroY=function(){return"tozeroy"===this.props.mode||this._containsSecondaryYAxis},n.defaultProps={useUTC:!0},n}(u.Component),yh=(0,r.I)(gh,(function(t){return{tooltip:iv(t.theme)}})),mh=function(t,n){var i,e=t.color;return{arcRoot:{fill:e},arcRootFocussed:{fill:e,stroke:(null==n?void 0:n.palette.black)||It.bp.black,strokeWidth:2},arc:{outline:"none"},arcText:{fill:(null==n?void 0:n.semanticColors.bodyText)||It.bp.black,outline:"none",selectors:(i={},i[It.up]={fill:"CanvasText"},i)}}},bh=function(t){function n(n){var i=t.call(this,n)||this;return i.updateChart=function(t){wh(t)},i._onFocus=function(){i.setState({isArcFocused:!0})},i._onBlur=function(){i.setState({isArcFocused:!1})},i.state={isArcFocused:!1},i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return wh(t),null},n.prototype.render=function(){var t,n=this,i=this.props.arc,e=(0,a.Z)()((function(t){return mh(t,n.props.theme)}),(0,o.Cl)({},this.props));return u.createElement("path",{d:i(this.props.data),className:"".concat(this.state.isArcFocused?e.arcRootFocussed:e.arcRoot),onClick:null===(t=this.props.data)||void 0===t?void 0:t.data.onClick})},n.defaultProps={arc:$f()},n}(u.Component),xh=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var n,i,e=this,r=this.props,o=r.data,l=r.culture,s=$f().centroid({endAngle:(null==o?void 0:o.endAngle)||0,startAngle:(null==o?void 0:o.startAngle)||0,padAngle:null==o?void 0:o.padAngle,innerRadius:(null===(n=this.props)||void 0===n?void 0:n.outerRadius)||0,outerRadius:(null===(i=this.props)||void 0===i?void 0:i.outerRadius)||4}),c=s[0],d=s[1],f=(0,a.Z)()((function(t){return mh(t,e.props.theme)})),v=(((null==o?void 0:o.startAngle)||0)+((null==o?void 0:o.endAngle)||0))/2,h="".concat(null==o?void 0:o.data.x,"-").concat((0,Yn.c$)(null==o?void 0:o.data.y,l));return u.createElement("g",{className:"".concat(f.arc," arc"),"data-is-focusable":!0,id:this._arcId,onFocus:this._onFocus,onBlur:this._onBlur,"aria-label":h,role:"img"},t.prototype.render.call(this),u.createElement(dv,{content:h,textProps:{x:c+(v>Math.PI?-10:10),y:d+(v>Math.PI/2&&v<3*Math.PI/2?10:-10),dominantBaseline:v>Math.PI/2&&v<3*Math.PI/2?"hanging":"auto",textAnchor:!this._isRTL&&v>Math.PI||this._isRTL&&v<Math.PI?"end":"start","aria-label":"".concat(null==o?void 0:o.data.x,"-").concat((0,Yn.c$)(null==o?void 0:o.data.y,l)),className:f.arcText},isTooltipVisibleProp:this.state.isArcFocused,shouldReceiveFocus:!1,maxWidth:40,wrapContent:Ls}))},n}(bh);function wh(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Mh,Ch=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n){return u.createElement(xh,{culture:i.props.culture,key:n,data:t,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:"".concat(i.colors(n)),theme:i.props.theme})},i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=n.width,o=n.height,a=n.chartTitle,l=n.theme,s=[];if(e&&!this.props.colors)for(var c=0;c<e.length;c++)s.push(ds(c,0,null==l?void 0:l.isInverted));var d=this.props.colors,f=void 0===d?s:d;this.colors=Ou().range(f.map((function(t){return fs(t)})));var v=i(e),h="translate(".concat(r/2,", ").concat(o/2,")");return u.createElement(Uc,{direction:uc.domOrder},u.createElement("svg",{width:r,height:o,"aria-label":a},u.createElement("g",{className:"pie",transform:h},v.map((function(n,i){return t.arcGenerator(n,i)})))))},n.defaultProps={pie:Nf().padAngle(.01).sort(null).value((function(t){return t.y}))},n}(u.Component),kh=(0,a.Z)(),Ah=function(t){function n(n){var i=t.call(this,n)||this;return i._emptyChartId=p("_PieChart_empty"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.data,i=t.width,e=t.height,r=t.colors,o=t.chartTitle,a=this.props,l=a.theme,s=a.className,c=a.styles,d=a.culture;this._classNames=kh(c,{theme:l,width:i,height:e,className:s});var f=Math.min(i-80,e-32)/2;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root},this.props.chartTitle&&u.createElement("p",{className:this._classNames.chartTitle},this.props.chartTitle),u.createElement(Ch,{culture:d,width:i+8,height:e+8,outerRadius:f,innerRadius:1,data:n,colors:r,chartTitle:o,theme:l}))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.filter((function(t){return t.y>0})).length>0)},n.defaultProps={data:[],width:600,height:350},n}(u.Component),Sh=(0,r.I)(Ah,(function(t){var n=t.className,i=t.theme,e=t.width+30,r=t.height+10;return{root:[i.fonts.medium,"ms-PieChart",n,{width:e+40}],chart:[{padding:20,width:e,height:r,boxSizing:"content-box"}],chartTitle:[(0,o.Cl)((0,o.Cl)({textAlign:"center"},i.fonts.mediumPlus),{color:i.semanticColors.bodyText})]}}));!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(Mh||(Mh={}));var Lh,Dh=(0,a.Z)(),Vh=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._adjustProps=function(){var t=i.props,n=t.theme,e=t.className,r=t.styles,o=t.width,u=t.barHeight;i._classNames=Dh(r,{legendColor:i.state.color,theme:n,width:o,className:e,barHeight:u})},i._getLegendData=function(t,n,e){var r=[e.blueLight,e.blue,e.blueMid,e.red,e.black],a=[];return t.forEach((function(t,e){var o=t.chartData.filter((function(t){return!t.placeHolder}));o.length<3?void 0!==n[e]&&n[e]&&o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||kc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}})):o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||kc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}}))})),u.createElement(vf,(0,o.Cl)({legends:a,overflowProps:i.props.legendsOverflowProps,focusZonePropsInHoverCard:i.props.focusZonePropsForLegendsInHoverCard,overflowText:i.props.legendsOverflowText},i.props.legendProps))},i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i._computeLongestBarTotalValue=function(){var t=0;return i.props.data.forEach((function(n){var i=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0);t=Math.max(t,i)})),t},i.state={isCalloutVisible:!1,refArray:[],selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._onLeave=i._onLeave.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i.barChartSvgRef=u.createRef(),i._emptyChartId=p("_MSBC_empty"),i._barId=p("_MSBC_rect_"),i._barIdPlaceholderPartToWhole=p("_MSBC_rect_partToWhole_"),i._barIdEmpty=p("_MSBC_rect_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.data,e=n.theme,r=n.culture;this._adjustProps();var a=e.palette,l=this._getLegendData(i,this.props.hideRatio,a),s=this.state.isCalloutVisible;this._classNames=Dh(this.props.styles,{legendColor:this.state.color,theme:e,variant:this.props.variant,hideLabels:this.props.hideLabels});var c=this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,d=this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard;this._longestBarTotalValue=this._computeLongestBarTotalValue();var f=i.map((function(n,i){var e=t._createBarsAndLegends(n,t.props.barHeight,a,t.props.hideRatio[i],t.props.hideDenominator[i],t.props.href,i);return u.createElement("div",{key:i,id:"_MSBC_bar-".concat(i)},e)}));return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},f,!this.props.hideLegend&&u.createElement("div",{className:this._classNames.legendContainer},l),u.createElement($n,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&s),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,zs(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(yc.ChartHoverCard,{Legend:c,YValue:d,color:this.state.color,culture:r}))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._createBarsAndLegends=function(t,n,i,e,r,a,l){var s,c,d=this,f=(null===(s=t.chartData)||void 0===s?void 0:s.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,v=this.state.barSpacingInPercent*(f-1),h=this.props.culture,g=[i.blueLight,i.blue,i.blueMid,i.red,i.black],y=[],m=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),b=this.props.variant===Mh.AbsoluteScale?this._longestBarTotalValue:m,x=0;if(t.chartData.map((function(t,n){var i=(t.data?t.data:0)/b*100||0;return i<1&&0!==i?i=1:i>99&&100!==i&&(i=99),x+=i})),this.props.variant===Mh.AbsoluteScale){var w=0===b?0:(b-m)/b*100;w<1&&0!==w?w=1:w>99&&100!==w&&(w=99),x+=w}var M=0!==x?x/(100-v):1,C=0,k=0,A=t.chartData.map((function(t,e){var r,o,s,c,f=t.color?t.color:t.placeHolder?i.neutralLight:g[Math.floor(4*Math.random()+1)],v=f;d.props.enableGradient&&(f=(null===(r=t.gradient)||void 0===r?void 0:r[0])||kc(e,0,null===(o=d.props.theme)||void 0===o?void 0:o.isInverted)[0],v=(null===(s=t.gradient)||void 0===s?void 0:s[1])||kc(e,0,null===(c=d.props.theme)||void 0===c?void 0:c.isInverted)[1]);var h=t.data?t.data:0;e>0&&(C+=k),(k=h/b*100?h/b*100:0)<1&&0!==k?k=1/M:k>99&&100!==k?k=99/M:k/=M,y.push(C);var m=d.props.styles,x=!(!d._legendHighlighted(t.legend)&&!d._noLegendHighlighted()),w=t.placeHolder?d.props.theme.semanticColors.bodyText:f;d._classNames=Dh(m,{theme:d.props.theme,shouldHighlight:x,href:a,variant:d.props.variant,hideLabels:d.props.hideLabels});var A=p("MSBC_Gradient")+"_".concat(l,"_").concat(e);return u.createElement("g",{key:e,className:t.placeHolder?d._classNames.placeHolderOnHover:d._classNames.opacityChangeOnHover,ref:function(n){d._refCallback(n,t.legend)},"data-is-focusable":!d.props.hideTooltip&&x,onFocus:d._onBarFocus.bind(d,h,w,t),onBlur:d._onBarLeave,role:"img","aria-label":d._getAriaLabel(t),onMouseOver:d._onBarHover.bind(d,h,w,t),onMouseMove:d._onBarHover.bind(d,h,w,t),onMouseLeave:d._onBarLeave,onClick:a?t.placeHolder?void 0:d._redirectToUrl.bind(d,a):t.onClick},d.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:A},u.createElement("stop",{offset:"0",stopColor:f}),u.createElement("stop",{offset:"100%",stopColor:v}))),u.createElement("rect",{key:e,id:"".concat(d._barId,"-").concat(l,"-").concat(e),x:"".concat(d._isRTL?100-y[e]-k-d.state.barSpacingInPercent*e:y[e]+d.state.barSpacingInPercent*e,"%"),y:0,width:k+"%",height:n,rx:d.props.roundCorners?3:0,fill:d.props.enableGradient?"url(#".concat(A,")"):f}))}));if(this.props.variant!==Mh.AbsoluteScale||this.props.hideLabels)0===t.chartData.length&&A.push(u.createElement("g",{key:0,className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdPlaceholderPartToWhole,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0}))),0===m&&A.push(u.createElement("g",{key:"empty",className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdEmpty,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0})));else{var S=!1,L=0;this._noLegendHighlighted()?(S=!0,L=m):null===(c=t.chartData)||void 0===c||c.forEach((function(t){d._legendHighlighted(t.legend)&&(S=!0,L+=t.data?t.data:0)})),S&&A.push(u.createElement("text",{key:"text",x:"".concat(this._isRTL?100-(y[y.length-1]||0)-k-v:(y[y.length-1]||0)+k+v,"%"),textAnchor:"start",y:n/2,dominantBaseline:"central",transform:"translate(".concat(this._isRTL?-4:4,")"),className:this._classNames.barLabel,"aria-label":"Total: ".concat(L),role:"img"},$s(L)))}var D=void 0!==e&&e,V=this.props.variant!==Mh.AbsoluteScale&&!D&&2===t.chartData.length,N=this.props.variant!==Mh.AbsoluteScale&&!D&&1===t.chartData.length,O=function(){return(0,Yn.c$)(t.chartData[0].data?t.chartData[0].data:0,h)};return u.createElement("div",{className:this._classNames.singleChartRoot},u.createElement(Uc,{direction:uc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},t.chartTitle&&u.createElement(ud,{className:this._classNames.chartTitleLeft,content:t.chartTitle,accessibilityData:t.chartTitleAccessibilityData}),V&&u.createElement("div",(0,o.Cl)({},zs(t.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},O()),!r&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,Yn.c$)(m,h))),N&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},zs(t.chartDataAccessibilityData,"text",!1)),O()))),u.createElement(Uc,{direction:uc.horizontal},u.createElement("div",{className:this._classNames.chartWrapper},u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==t?void 0:t.chartTitle},A))))},n.prototype._onBarFocus=function(t,n,i){var e=this;this.state.refArray.forEach((function(r){r.legendText===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._refCallback=function(t,n){this.state.refArray.push({legendText:n,refElement:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&0===this.props.data.filter((function(t){return t.chartData&&0===t.chartData.length&&(!t.chartTitle||""===t.chartTitle)})).length)},n.defaultProps={barHeight:12,hideRatio:[],hideDenominator:[]},n}(u.Component),Nh=(0,r.I)(Vh,(function(t){var n,i=t.className,e=t.width,r=t.barHeight,u=t.shouldHighlight,a=t.theme,l=t.href,s=t.variant,c=t.hideLabels;return{root:[a.fonts.medium,"ms-StackedBarChart",{display:"flex",flexDirection:"column",width:e||"100%"},i],items:{marginBottom:"11px"},chart:{width:"100%",height:r||12,display:"block",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},a.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:a.palette.neutralPrimary,marginBottom:s===Mh.AbsoluteScale?"4px":"5px"},singleChartRoot:{width:e||"100%",display:"flex",flexDirection:"column",marginBottom:s===Mh.AbsoluteScale?"16px":"10px"},opacityChangeOnHover:{opacity:u?"":"0.1",cursor:l?"pointer":"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:a.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:a.palette.neutralPrimary},placeHolderOnHover:{opacity:u?"":"0.1",cursor:"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},legendContainer:{margin:"5px 0px 0px 4px"},noData:{cursor:l?"pointer":"default"},barLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:a.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartWrapper:{paddingRight:s!==Mh.AbsoluteScale||c?0:40}}})),Oh=(0,a.Z)(),Th=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i.state={isCalloutVisible:!1,selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._refArray=[],i._onLeave=i._onLeave.bind(i),i._refCallback=i._refCallback.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_SBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){if(!this._isChartEmpty()){this._adjustProps();var t=this.props,n=t.data,i=t.benchmarkData,e=t.targetData,r=t.hideNumberDisplay,a=t.ignoreFixStyle,l=t.culture,s=this.props.theme.palette,c=a||n.chartData.length>2?this.props.barHeight:12;i&&(i.color=i.color||s.neutralTertiary),e&&(e.color=e.color||s.neutralSecondary);var d=this._createBarsAndLegends(n,c,s,i,e),f=!1===r&&!a&&2===n.chartData.length,v=!1===r&&!a&&1===n.chartData.length,h=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),p=0;i&&h&&(p=i.data/h*100);var g=0;e&&h&&(g=e.data/h*100);var y=!1===this.props.hideLegend&&(a||n.chartData.length>2);this._classNames=Oh(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,benchmarkColor:i?i.color:"",benchmarkRatio:p,targetColor:e?e.color:"",targetRatio:g,showTriangle:!(!i&&!e)});var m=function(){return(0,Yn.c$)(n.chartData[0].data?n.chartData[0].data:0,l)};return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},u.createElement(Uc,{direction:uc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},n.chartTitle&&u.createElement(ud,{className:this._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),f&&u.createElement("div",(0,o.Cl)({},zs(n.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},m()),!this.props.hideDenominator&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,Yn.c$)(h,l))),v&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},zs(n.chartDataAccessibilityData,"text",!1)),m())),(i||e)&&u.createElement("div",{className:this._classNames.benchmarkContainer},i&&u.createElement("div",{className:this._classNames.benchmark,role:"text"}),e&&u.createElement("div",{className:this._classNames.target,role:"text"}))),u.createElement(Uc,{direction:uc.horizontal},u.createElement("div",null,u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==n?void 0:n.chartTitle},u.createElement("g",null,d[0]),u.createElement($n,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,zs(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(yc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,color:this.state.color,culture:l})))))),y&&u.createElement("div",{className:this._classNames.legendContainer},d[1]))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._adjustProps=function(){this._classNames=Oh(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,width:this.props.width,barHeight:this.props.barHeight,className:this.props.className})},n.prototype._createBarsAndLegends=function(t,n,i,e,r){var a,l=this,s=(null===(a=t.chartData)||void 0===a?void 0:a.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,c=this.state.barSpacingInPercent*(s-1),d=[i.blueLight,i.blue,i.blueMid,i.red,i.black],f=[],v=[],h=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),g=0,y=0,m=0;t.chartData.map((function(t,n){var i=t.data?t.data:0;return(y=i/h*100)<1&&0!==y?y=1:y>99&&100!==y&&(y=99),m+=y}));var b=0!==m?m/(100-c):1,x=t.chartData.map((function(t,i){var e,r,o,a,s=t.color?t.color:d[Math.floor(4*Math.random()+1)],c=s;l.props.enableGradient&&(s=(null===(e=t.gradient)||void 0===e?void 0:e[0])||kc(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted)[0],c=(null===(o=t.gradient)||void 0===o?void 0:o[1])||kc(i,0,null===(a=l.props.theme)||void 0===a?void 0:a.isInverted)[1]);var m=t.data?t.data:0,x={title:t.legend,color:s,action:h>0?function(){l._onClick(t.legend)}:void 0,hoverAction:h>0?function(){l._handleChartMouseLeave(),l._onHover(t.legend)}:void 0,onMouseOutAction:h>0?function(){l._onLeave()}:void 0};t.placeHolder||f.push(x),i>0&&(g+=y),(y=m/h*100)<1&&0!==y?y=1/b:y>99&&100!==y?y=99/b:y/=b,v.push(g);var w=l.props.styles,M=!(!l._legendHighlighted(t.legend)&&!l._noLegendHighlighted()),C=t.placeHolder?l.props.theme.semanticColors.bodyText:s;l._classNames=Oh(w,{theme:l.props.theme,shouldHighlight:M,href:l.props.href});var k=p("SBC_Gradient")+"_".concat(i);return u.createElement("g",{key:i,className:l._classNames.opacityChangeOnHover,ref:function(t){l._refCallback(t,x.title)},"data-is-focusable":!l.props.hideTooltip&&M,onFocus:l._onBarFocus.bind(l,m,C,t),onBlur:l._onBarLeave,"aria-label":l._getAriaLabel(t),role:"img",onMouseOver:l._onBarHover.bind(l,m,C,t),onMouseMove:l._onBarHover.bind(l,m,C,t),onMouseLeave:l._onBarLeave,pointerEvents:"all",onClick:l.props.href?l._redirectToUrl.bind(l,l.props.href):t.onClick},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:k},u.createElement("stop",{offset:"0",stopColor:s}),u.createElement("stop",{offset:"100%",stopColor:c}))),u.createElement("rect",{key:i,id:p("_SBC_bar"),x:"".concat(l._isRTL?100-v[i]-y-l.state.barSpacingInPercent*i:v[i]+l.state.barSpacingInPercent*i,"%"),y:0,width:y+"%",height:n,rx:l.props.roundCorners?3:0,fill:l.props.enableGradient?"url(#".concat(k,")"):s}))}));this._addLegend(f,e),this._addLegend(f,r);var w=u.createElement(vf,(0,o.Cl)({legends:f,enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps));return[0===h?[this._generateEmptyBar(n,this.props.barBackgroundColor?this.props.barBackgroundColor:i.neutralLight)]:x,w]},n.prototype._onBarFocus=function(t,n,i){var e=this;this._refArray.forEach((function(r){r.index===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._addLegend=function(t,n){if(n){var i={title:n.legend,color:n.color,shape:"triangle"};t.push(i)}},n.prototype._generateEmptyBar=function(t,n){return u.createElement("g",{key:0,className:this._classNames.opacityChangeOnHover},u.createElement("rect",{key:0,id:p("_SBC_empty_bar_"),x:"0%",y:0,width:"100%",height:t,fill:n}))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.length>0)},n.defaultProps={barHeight:12,hideNumberDisplay:!1,hideLegend:!1,ignoreFixStyle:!1},n}(u.Component),Eh=(0,r.I)(Th,(function(t){var n,i,e=t.className,r=t.width,u=t.barHeight,a=t.shouldHighlight,l=t.theme,s=t.href,c=t.benchmarkColor,d=t.benchmarkRatio,f=t.targetColor,v=t.targetRatio,h=t.showTriangle;return{root:[l.fonts.medium,"ms-StackedBarChart",{width:r||"100%",display:"flex",flexDirection:"column"},e],chart:{width:"100%",height:u||12,display:"block",marginBottom:h?"16px":"10px",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},l.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:l.palette.neutralPrimary,marginBottom:"5px"},legendContainer:{margin:"4px 0px 0px 4px"},opacityChangeOnHover:{opacity:a?"":"0.1",cursor:s?"pointer":"default",selectors:{"&:focus":{stroke:l.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:l.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:l.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},benchmark:{position:"absolute",left:"calc("+d+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c,marginBottom:"4px",selectors:(n={},n[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(c,", ").concat(c,")")},n)},target:{position:"absolute",left:"calc("+v+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:f,marginBottom:"4px",selectors:(i={},i[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(f,", ").concat(f,")")},i)}}})),Fh=function(t){if(!(t.length<2)){t=t.sort((function(t,n){return t instanceof Date?t.getTime()-n.getTime():t-n}));for(var n=Number.MAX_VALUE,i=1;i<t.length;i++){var e=t[i]instanceof Date?t[i].getTime()-t[i-1].getTime():t[i]-t[i-1];n=Math.min(n,e)}return[n,t[0]instanceof Date?t[t.length-1].getTime()-t[0].getTime():t[t.length-1]-t[0]]}},Bh=function(t,n,i){var e=Fh(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1];return Math.floor(n*r*(1-i)/(o+r*(1-i)))},Ph=function(t,n,i){return void 0===i&&(i=0),t-(n.left||0)-(n.right||0)-2*i},_h=function(t,n){return t+n/(1-n)*(t-1)},Hh=function(t,n,i){return t*_h(n,i)},Ih=function(t,n,i){return t/_h(n,i)};!function(t){t.show="visibility",t.hide="hidden"}(Lh||(Lh={}));var Wh=(0,a.Z)(),Rh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.toImage=function(t){var n,i;return tf([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===es.NumericAxis?function(t,n,i,e){var r=fi(t,(function(t){return t.x})),o=di(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}:{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}}(t,n,i,r):o===es.DateAxis?Bs(t,n,i,r,a,e):Fs(n,i,r)},e._createLine=function(t,n,i,r,o){var a;void 0===i&&(i=0),void 0===r&&(r=0);var l=e._xAxisType===es.StringAxis,s=e._getScales(i,r).xBarScale,c=e._createColors(),d=e.props.theme,f=e.props,v=f.data,h=f.lineLegendColor,g=void 0===h?d.palette.yellow:h,y=f.lineLegendText,m=[],b=[];v&&v.forEach((function(t,n){var i;t.lineData&&t.lineData.y&&m.push({x:t.x,y:t.lineData.y,useSecondaryYScale:null!==(i=t.lineData.useSecondaryYScale)&&void 0!==i&&i,point:t,index:n})}));var x=cv().x((function(n){return l?s(n.x)+.5*s.bandwidth():t(n.x)})).y((function(t){return t.useSecondaryYScale&&o?o(t.y):n(t.y)})),w=!(!e._legendHighlighted(y)&&!e._noLegendHighlighted()),M=(null===(a=e.props.lineOptions)||void 0===a?void 0:a.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0;M>0&&b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3+2*M,stroke:d.semanticColors.bodyBackground})),b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3,stroke:g}));var C=m.map((function(i,r){var a,d={refElement:null};return u.createElement("circle",{key:r,id:p("_VBC_point_"),cx:l?s(i.x)+.5*s.bandwidth():t(i.x),cy:i.useSecondaryYScale&&o?o(i.y):n(i.y),onMouseOver:e._legendHighlighted(y)?e._lineHover.bind(e,i.point):e._onBarHover.bind(e,i.point,c(i.y)),onMouseOut:e._onBarLeave,r:e._getCircleVisibilityAndRadius(i.x,y).radius,stroke:g,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,visibility:e._getCircleVisibilityAndRadius(i.x,y).visibility,onClick:null===(a=i.point.lineData)||void 0===a?void 0:a.onClick,"data-is-focusable":e._legendHighlighted(y),ref:function(t){d.refElement=t},onFocus:e._lineFocus.bind(e,i.point,d),onBlur:e._handleChartMouseLeave})}));return u.createElement(u.Fragment,null,b,C)},e._getCircleVisibilityAndRadius=function(t,n){var i=e.state.activeXdataPoint;return e._noLegendHighlighted()?{visibility:i===t?Lh.show:Lh.hide,radius:8}:t===i&&e._legendHighlighted(n)?{visibility:Lh.show,radius:8}:e._legendHighlighted(n)?{visibility:Lh.show,radius:.3}:{visibility:Lh.hide,radius:0}},e._checkForLine=function(){return e.props.data.some((function(t){var n;return void 0!==(null===(n=null==t?void 0:t.lineData)||void 0===n?void 0:n.y)}))},e._getMargins=function(t){e.margins=t},e._renderContentForBothLineAndBars=function(t){var n=e._getCalloutContentForLineAndBar(t),i=n.YValueHover,r=n.hoverXValue,a=i.map((function(t,n){return u.createElement(yc.ChartHoverCard,(0,o.Cl)({key:n,Legend:t.legend},0===n&&{XValue:"".concat(r||t.data)},{color:t.color,YValue:t.data||t.y,culture:e.props.culture}))}));return u.createElement(u.Fragment,null,a)},e._renderContentForOnlyBars=function(t){var n=e.props.useSingleColor,i=void 0!==n&&n;return u.createElement(u.Fragment,null,u.createElement(yc.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x,Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:!i&&t.color?t.color:e._createColors()(t.y),culture:e.props.culture}))},e._renderCallout=function(t){return t?e._isHavingLine?e._renderContentForBothLineAndBars(t):e._renderContentForOnlyBars(t):null},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._getGraphData=function(t,n,i,r,o){return e._bars=e._xAxisType===es.NumericAxis?e._createNumericBars(i,r,o):e._xAxisType===es.DateAxis?e._createDateBars(i,r,o):e._createStringBars(i,r,o)},e._refCallback=function(t,n){e._refArray.push({index:n,refElement:t})},e._getCalloutContentForLineAndBar=function(t){var n,i,r,o,u,a=[],l=e.props,s=l.theme,c=l.useSingleColor,d=void 0!==c&&c,f=l.enableGradient,v=e.props,h=v.data,p=v.lineLegendText,g=v.lineLegendColor,y=void 0===g?s.palette.yellow:g,m=h.filter((function(n){return n.x===t.x})),b=h.indexOf(m[0]),x=d?e._createColors()(1):m[0].color?m[0].color:e._createColors()(m[0].y);e._isHavingLine&&void 0!==(null===(n=m[0].lineData)||void 0===n?void 0:n.y)&&(e._legendHighlighted(p)||e._noLegendHighlighted())&&a.push({legend:p,color:y,y:null===(i=m[0].lineData)||void 0===i?void 0:i.y,data:null===(r=m[0].lineData)||void 0===r?void 0:r.yAxisCalloutData,yAxisCalloutData:null===(o=m[0].lineData)||void 0===o?void 0:o.yAxisCalloutData}),(e._legendHighlighted(m[0].legend)||e._noLegendHighlighted())&&a.push({legend:m[0].legend,y:m[0].y,color:f?d?kc(0,0)[0]:(null===(u=m[0].gradient)||void 0===u?void 0:u[0])||kc(b,0)[0]:x,data:m[0].yAxisCalloutData,yAxisCalloutData:m[0].yAxisCalloutData});var w=t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString();return{YValueHover:a,hoverXValue:t.xAxisCalloutData||w}},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},e._onBarFocus=function(t,n,i){var r=e._getCalloutContentForLineAndBar(t),o=r.YValueHover,u=r.hoverXValue;e._refArray.forEach((function(r,a){r.index===t.legend&&n===a&&e.setState({refSelected:r.refElement,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.y,color:t.color||i,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:o,hoverXValue:u,callOutAccessibilityData:t.callOutAccessibilityData})}))},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){var i=e.props.theme,r=e.props,o=r.lineLegendText,u=void 0===o?"":o,a=r.lineLegendColor,l=void 0===a?i.palette.yellow:a;e.setState({refSelected:n,isCalloutVisible:!0,calloutLegend:u,dataForHoverCard:t.lineData.y,color:l,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.lineData.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x})},e._getScales=function(t,n){var i,r=Gu().domain([e.props.supportNegativeData?e._yMin:0,e._yMax]).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===es.NumericAxis){var o=fi(e._points,(function(t){return t.x})),u=di(e._points,(function(t){return t.x}));i=Gu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),Gs(e.props.xAxisInnerPadding,e.props.xAxisPadding)||"histogram"===e.props.mode||i.nice()}else if(e._xAxisType===es.DateAxis){var a=di(e._points,(function(t){return t.x})),l=fi(e._points,(function(t){return t.x}));(i=e.props.useUTC?Au():ku()).domain([a,l]).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin])}else i=Tu().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding);return{xBarScale:i,yBarScale:r}},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(t,n){var i=e.props,r=i.theme,a=i.useSingleColor,l=e.props,s=l.lineLegendText,c=l.lineLegendColor,d=void 0===c?r.palette.yellow:c,f=[],v={};if(t.forEach((function(t,n){var i,o,u,l=a?e._createColors()(1):t.color;if(e.props.enableGradient){var s=Math.max((null===(i=e.props.data)||void 0===i?void 0:i.findIndex((function(n){return n.legend===t.legend})))||0,0);l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||kc(s,0,null==r?void 0:r.isInverted)[0],a&&(l=kc(0,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0])}v[t.legend]=l})),Object.entries(v).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};f.push(r)})),e._isHavingLine&&s&&d){var h={title:s,color:d,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(s)},onMouseOutAction:function(){e._onLegendLeave()},isLineLegendInBarChart:!0};f.unshift(h)}return u.createElement(vf,(0,o.Cl)({legends:f,enabledWrapLines:e.props.enabledLegendsWrapLines,overflowProps:e.props.legendsOverflowProps,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard,overflowText:e.props.legendsOverflowText},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0),e._yMin=Math.min(n[0],e.props.yMinValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t){var n,i,r,o=t.xAxisCalloutData?t.xAxisCalloutData:t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x,u=t.legend,a=t.yAxisCalloutData||t.y,l=e.props.lineLegendText||"Line",s=(null===(n=t.lineData)||void 0===n?void 0:n.yAxisCalloutData)||(null===(i=t.lineData)||void 0===i?void 0:i.y);return(null===(r=t.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(o,". ")+(u?"".concat(u,", "):"")+"".concat(a,".")+(void 0!==s?" ".concat(l,", ").concat(s,"."):"")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i={};null===(n=e.props.data)||void 0===n||n.forEach((function(t){t.x instanceof Date?i[t.x.getTime()]=t.x:i[t.x]=t.x}));var r=Object.values(i),u=Ph(t,e.margins,8);if(e._xAxisType===es.StringAxis){if(Gs(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth&&"histogram"!==e.props.mode)e._barWidth=Ys(e.props.barWidth,e.props.maxBarWidth),u>=(f=Hh(e._barWidth,r.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(u-f)/2);else if(["plotly","histogram"].includes(e.props.mode)&&r.length>1){var a=Ih(u,r.length,e._xAxisInnerPadding),l=Ys(e.props.barWidth,e.props.maxBarWidth,a,e.props.mode),s=(u-(f=Hh(l,r.length,e._xAxisInnerPadding)))/2,c=Number.POSITIVE_INFINITY;if("histogram"!==e.props.mode){var d=Ds(r)+20;c=(u-(f=(r.length-e._xAxisInnerPadding)*d))/2}e._domainMargin=8+Math.max(0,Math.min(s,c))}}else{if("histogram"===e.props.mode){l=e.props.maxBarWidth;var f=Hh(l,r.length,e._xAxisInnerPadding);e._domainMargin+=Math.max(0,(u-f)/2)}e._barWidth=Ys(e.props.barWidth,e.props.maxBarWidth,Bh(r,Ph(t,e.margins,e._domainMargin),e._xAxisInnerPadding),e.props.mode),e._domainMargin+=e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," bars")+(e._isHavingLine?" and 1 line":"")+". "},e._getOrderedXAxisLabels=function(){return e._xAxisType!==es.StringAxis?[]:ec(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(){var t={};return e._points.forEach((function(n){var i=n.x;t[i]||(t[i]=[]),t[i].push(n.y),n.lineData&&t[i].push(n.lineData.y)})),t},Lc(e),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",calloutLegend:""},e._isHavingLine=e._checkForLine(),e._calloutId=p("callout"),e._tooltipId=p("VCTooltipID_"),e._refArray=[],e._emptyChartId=p("_VBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;qs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._xAxisLabels=this._getOrderedXAxisLabels(),this._yMax=Math.max(fi(this._points,(function(t){return t.y})),this.props.yMaxValue||0),this._yMin=Math.min(di(this._points,(function(t){return t.y})),this.props.yMinValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=Wh(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1},this._isHavingLine&&{YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue}),{gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0}),this.props.calloutProps),zs(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Nv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._points,supportNegativeData:this.props.supportNegativeData,chartType:is.VerticalBarChart,xAxisType:this._xAxisType,createYAxis:Cs,calloutProps:i,tickParams:e},this._isHavingLine&&(this._noLegendHighlighted()||this._getHighlightedLegend().length>1)&&{isCalloutForStack:!0},{legendBars:n,datasetForXAxisDomain:this._xAxisLabels,barwidth:this._barWidth,focusZoneDirection:uc.horizontal,customizedCallout:this._getCustomizedCallout(),createStringYAxis:As,getmargins:this._getMargins,getMinMaxOfYAxis:_s,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===es.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Gs(this.props.xAxisInnerPadding,this.props.xAxisPadding)&&"histogram"!==this.props.mode,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),t._isHavingLine&&u.createElement("g",null,t._createLine(n.xScale,n.yScalePrimary,n.containerHeight,n.containerWidth,n.yScaleSecondary)))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._xAxisType=this.props.data&&this.props.data.length>0?Rs(this.props.data[0].x,!0):es.StringAxis,this._points=this.props.data||[],this._barWidth=Ys(this.props.barWidth,this.props.maxBarWidth,void 0,this.props.mode);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark],this._isHavingLine=this._checkForLine(),this._xAxisInnerPadding="histogram"===this.props.mode?0:Xs(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===es.StringAxis?2/3:.5),this._xAxisOuterPadding=Xs(this.props.xAxisOuterPadding,this.props.xAxisPadding,0)},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._yMax);return Gu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForLineAndBar(t),r=e.YValueHover,o=e.hoverXValue;this._calloutAnchorPoint!==t&&(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:this._noLegendHighlighted()||this._legendHighlighted(t.legend),dataForHoverCard:t.y,calloutLegend:t.legend,color:t.color||n,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,this.props.culture,this.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:this._noLegendHighlighted()||this._legendHighlighted(t.legend)?t.x:null,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._calculateMinBarHeight=function(t,n,i,e){var r=n<0?Math.abs(t-i):Math.max(Math.abs(n-i),Math.abs(t-i));return Math.ceil(e(r)/100)},n.prototype._createNumericBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=Wh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x)-e._barWidth/2,C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||kc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||kc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=kc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=kc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&Vs(h)}return f},n.prototype._createStringBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=e._legendHighlighted(n.legend)||e._noLegendHighlighted();e._classNames=Wh(e.props.styles,{theme:e.props.theme,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x),C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d);e._barWidth=Ys(e.props.barWidth,e.props.maxBarWidth,l.bandwidth(),e.props.mode);var A=n.color?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||kc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||kc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=kc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=kc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i),transform:"translate(".concat(.5*(l.bandwidth()-e._barWidth),", 0)")},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,height:w,"aria-label":e._getAriaLabel(n),role:"img",ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),onMouseLeave:e._onBarLeave,onBlur:e._onBarLeave,"data-is-focusable":!e.props.hideTooltip&&y,onFocus:e._onBarFocus.bind(e,n,i,A),fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v,showTooltip:this.props.showXAxisLablesTooltip};v&&Vs(h)}return f},n.prototype._createDateBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=Wh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x)-e._barWidth/2,C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||kc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||kc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=kc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=kc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&Vs(h)}return f},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._renderBarLabel=function(t,n,i,e,r){return this.props.hideLabels||this._barWidth<16||!this._legendHighlighted(e)&&!this._noLegendHighlighted()?null:u.createElement("text",{x:t+this._barWidth/2,y:r?n+12:n-6,textAnchor:"middle",className:this._classNames.barLabel,"aria-hidden":!0},"function"==typeof this.props.yAxisTickFormat?this.props.yAxisTickFormat(i):$s(i))},n.prototype._isChartEmpty=function(){return 0===this._points.length||this._points.every((function(t){return 0===t.y}))&&!this._isHavingLine},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default"},n}(u.Component),jh=(0,r.I)(Rh,(function(t){var n=t.shouldHighlight,i=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1"},xAxisTicks:[],yAxisTicks:[{transform:"scaleX(-1)"}],yAxisDomain:[{transform:"scaleX(-1)"}],tooltip:iv(i),barLabel:rv(i)}})),zh=(0,a.Z)(),$h=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.Y_ORIGIN=0,e._yAxisLabels=[],e.toImage=function(t){var n,i;return tf([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._toFocusWholeStack=function(t){var n=e.props.isCalloutForStack,i=void 0!==n&&n;return t?1!==e._getHighlightedLegend().length:i},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===es.NumericAxis?function(t,n,i,e){var r=di(t,(function(t){return t.x})),o=fi(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}:{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}}(t,n,i,r):o===es.DateAxis?Bs(t,n,i,r,a,e):Fs(n,i,r)},e._getFormattedLineData=function(t){var n=[],i={};return t.forEach((function(t,i){t.lineData&&t.lineData.forEach((function(e){n.push((0,o.Cl)((0,o.Cl)({},e),{index:i,xItem:t}))}))})),n.forEach((function(t){i[t.legend]?i[t.legend].push(t):i[t.legend]=[t]})),i},e._getLineLegends=function(t){var n=e._lineObject,i=[];return Object.keys(n).forEach((function(t){i.push({title:t,color:n[t][0].color})})),i},e._createLines=function(t,n,i,r,a){var l,s=e._getFormattedLineData(e.props.data),c=[],d=[],f=[],v=e.props.theme,h=(null===(l=e.props.lineOptions)||void 0===l?void 0:l.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0,p=e._xAxisType!==es.StringAxis?0:t.bandwidth()/2;return Object.keys(s).forEach((function(i,r){for(var o,l,f,g,y,m=e._isLegendHighlighted(i)||e._noLegendHighlighted(),b=1;b<s[i].length;b++){var x=t(s[i][b-1].xItem.xAxisPoint),w=s[i][b-1].useSecondaryYScale&&s[i][b].useSecondaryYScale&&a,M=w?a(s[i][b-1].y):n(s[i][b-1].y),C=t(s[i][b].xItem.xAxisPoint),k=w?a(s[i][b].y):n(s[i][b].y),A=w||e._yAxisType!==rs.StringAxis?0:n.bandwidth()/2;h>0&&d.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-BorderLine"),x1:x,y1:M,x2:C,y2:k,opacity:m?1:.1,strokeWidth:3+2*h,fill:"transparent",strokeLinecap:"round",stroke:v.semanticColors.bodyBackground,transform:"translate(".concat(p,", ").concat(A,")")})),c.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-line"),x1:x,y1:M,x2:C,y2:k,opacity:m?1:.1,strokeWidth:null!==(l=null===(o=s[i][0].lineOptions)||void 0===o?void 0:o.strokeWidth)&&void 0!==l?l:3,strokeLinecap:null!==(g=null===(f=s[i][0].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=s[i][0].lineOptions)||void 0===y?void 0:y.strokeDasharray,stroke:s[i][b].color,transform:"translate(".concat(p,", ").concat(A,")"),onMouseOver:e._lineHover.bind(e,s[i][b-1]),onMouseLeave:e._handleMouseOut}))}})),Object.keys(s).forEach((function(i,r){s[i].forEach((function(l,s){var c={refElement:null},d=0===l.xItem.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length,v=l.useSecondaryYScale||e._yAxisType!==rs.StringAxis?0:n.bandwidth()/2;f.push(u.createElement("circle",(0,o.Cl)({key:"".concat(r,"-").concat(s,"-dot"),cx:t(l.xItem.xAxisPoint),cy:l.useSecondaryYScale&&a?a(l.y):n(l.y),onMouseOver:e._lineHover.bind(e,l),onMouseLeave:e._handleMouseOut,r:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).radius,stroke:l.color,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,opacity:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).opacity,transform:"translate(".concat(p,", ").concat(v,")"),ref:function(t){c.refElement=t}},d&&(e._noLegendHighlighted()||e._isLegendHighlighted(i))?{"data-is-focusable":!e.props.hideTooltip,onFocus:e._lineFocus.bind(e,l,c),onBlur:e._handleMouseOut,role:"img","aria-label":e._getAriaLabel(l.xItem,l,!0)}:{})))}))})),u.createElement(u.Fragment,null,d,c,f)},e._getCircleOpacityAndRadius=function(t,n){var i=e.state.activeXAxisDataPoint;return e._noLegendHighlighted()?{opacity:i===t?1:0,radius:8}:t===i&&e._isLegendHighlighted(n)?{opacity:1,radius:8}:e._isLegendHighlighted(n)?{opacity:1,radius:.3}:{opacity:0,radius:0}},e._getMargins=function(t){e.margins=t},e._getCustomizedCallout=function(){var t=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0}));return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint&&!t?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){1===e._getHighlightedLegend().length?(e._noLegendHighlighted()||e._isLegendHighlighted(t.legend))&&e.setState({refSelected:n,isCalloutVisible:!0,xCalloutValue:"".concat(t.xItem.xAxisPoint),yCalloutValue:"".concat(t.yAxisCalloutData||t.data||t.y),activeXAxisDataPoint:t.xItem.xAxisPoint,color:t.color}):e._onStackHoverFocus(t.xItem,n)},e._handleMouseOut=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXAxisDataPoint:""})},e._createBar=function(t,n,i,r){var a=e.props,l=a.barCornerRadius,s=void 0===l?0:l,c=a.barMinimumHeight,d=void 0===c?0:c,f=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),v=e._toFocusWholeStack(f);e._xAxisType===es.StringAxis&&(e._barWidth=Ys(e.props.barWidth,e.props.maxBarWidth,t.bandwidth()));var h=e._points.map((function(r,a){var l=t((e._xAxisType===es.NumericAxis||(e._xAxisType,es.DateAxis),r.xAxisPoint)),c=e._xAxisType!==es.StringAxis?-e._barWidth/2:(t.bandwidth()-e._barWidth)/2,f=0,h=r.chartData.filter((function(t){return 0!==t.data&&""!==t.data&&!(e._yAxisType===rs.StringAxis&&void 0===n(t.data))}));if(h.length){var g=e._getBarGapAndScale(h,n),y=g.gapHeight,m=g.heightValueScale,b=g.absStackTotal;if(!(m<0)){var x=i-e.margins.bottom-(e._yAxisType===rs.StringAxis?0:n(e.Y_ORIGIN)),w=x,M=x,C=0,k=0,A=h.map((function(t,g){var x,A,S,L,D=t.color?t.color:e._colors[g],V=D;e.props.enableGradient&&(D=(null===(x=t.gradient)||void 0===x?void 0:x[0])||kc(g,0,null===(A=e.props.theme)||void 0===A?void 0:A.isInverted)[0],V=(null===(S=t.gradient)||void 0===S?void 0:S[1])||kc(g,0,null===(L=e.props.theme)||void 0===L?void 0:L.isInverted)[1],r.chartData[g].color=D);var N={},O=!(!e._isLegendHighlighted(t.legend)&&!e._noLegendHighlighted());e._classNames=zh(e.props.styles,{theme:e.props.theme,shouldHighlight:O,href:e.props.href});var T,E=!v&&O&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r,t),onMouseOver:e._onRectHover.bind(e,r.xAxisPoint,t,D),onMouseMove:e._onRectHover.bind(e,r.xAxisPoint,t,D),onMouseLeave:e._handleMouseOut,onFocus:e._onRectFocus.bind(e,t,r.xAxisPoint,D,N),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,t),role:"img"},F=g?y:0;if(e._yAxisType===rs.StringAxis)T=Math.max(i-e.margins.bottom-(n(t.data)+n.bandwidth()/2)-F,d,1),C=w-=T+F;else{T=Math.abs(m*t.data);var B=Math.max(m*b/100,d);T<B&&(T=B),t.data>=e.Y_ORIGIN?C=w-=T+F:M=(C=M+F)+T,f+=t.data,k=g===h.length-1?T:0}var P=p("VSBC_Gradient")+"_".concat(a,"_").concat(g);return s&&T>s&&g===h.length-1?u.createElement(u.Fragment,{key:g+a+"".concat(v)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:D}),u.createElement("stop",{offset:"100%",stopColor:V}))),u.createElement("path",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,d:"\n M ".concat(l," ").concat(C+s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(-s,"\n h ").concat(e._barWidth-2*s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(s,"\n v ").concat(T-s,"\n h ").concat(-e._barWidth,"\n z\n "),fill:e.props.enableGradient?"url(#".concat(P,")"):D,rx:e.props.roundCorners?3:0,ref:function(t){N.refElement=t},transform:"translate(".concat(c,", 0)")},E))):T<0?u.createElement(u.Fragment,{key:g+a}," "):u.createElement(u.Fragment,{key:g+a},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:D}),u.createElement("stop",{offset:"100%",stopColor:V}))),u.createElement("rect",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,x:l,y:C,width:e._barWidth,height:T,fill:e.props.enableGradient?"url(#".concat(P,")"):D,rx:e.props.roundCorners?3:0,ref:function(t){N.refElement=t}},E,{transform:"translate(".concat(c,", 0)")})))})),S={},L=r.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length>0,D=v&&L&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r),onMouseOver:e._onStackHover.bind(e,r),onMouseMove:e._onStackHover.bind(e,r),onMouseLeave:e._handleMouseOut,onFocus:e._onStackFocus.bind(e,r,S),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,r),role:"img"},V=!1,N=0;return e.props.hideLabels||e._yAxisType===rs.StringAxis||(e._noLegendHighlighted()?(V=!0,N=f):h.forEach((function(t){e._isLegendHighlighted(t.legend)&&(V=!0,N+=t.data)}))),u.createElement("g",{key:a+"".concat(v)},u.createElement("g",(0,o.Cl)({id:"".concat(a,"-singleBar"),ref:function(t){S.refElement=t}},D),A),!e.props.hideLabels&&e._barWidth>=16&&V&&u.createElement("text",{x:l+e._barWidth/2,y:N>=e.Y_ORIGIN?C-6:C+k+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-label":"Total: ".concat(N),role:"img",transform:"translate(".concat(c,", 0)")},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(N):$s(N)))}}}));if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=sl(r).call(t);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:g};g&&Vs(y)}return h.filter((function(t){return!!t}))},e._getScales=function(t,n){var i=[Math.min(e.Y_ORIGIN,e._yMin),Math.max(e.Y_ORIGIN,e._yMax)],r=Gu().domain(i).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===es.NumericAxis){var o=fi(e._dataset,(function(t){return t.x})),u=di(e._dataset,(function(t){return t.x})),a=Gu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]);return Gs(e.props.xAxisInnerPadding,e.props.xAxisPadding)||a.nice(),{xBarScale:a,yBarScale:r}}if(e._xAxisType===es.DateAxis){var l=di(e._dataset,(function(t){return t.x})),s=fi(e._dataset,(function(t){return t.x})),c=e.props.useUTC?Au():ku();return c.domain(e._isRtl?[s,l]:[l,s]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),{xBarScale:c,yBarScale:r}}return{xBarScale:Tu().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding),yBarScale:r}},e._getGraphData=function(t,n,i,r,o){var u=e._getScales(i,r),a=u.xBarScale,l=u.yBarScale;return e._bars=e._createBar(a,e._yAxisType===rs.StringAxis?n:l,i,o)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||e.Y_ORIGIN),e._yMin=Math.min(n[0],e.props.yMinValue||e.Y_ORIGIN)}},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n,i){var r,o,u;if(!n){var a=t.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),l=t.chartData.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" "),s=null===(r=t.lineData)||void 0===r?void 0:r.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data||t.y;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" ");return(null===(o=t.stackCallOutAccessibilityData)||void 0===o?void 0:o.ariaLabel)||"".concat(a,". ").concat(l)+(s?" ".concat(s):"")}var c=t.xAxisCalloutData||!i&&n.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),d=n.legend,f=n.yAxisCalloutData||(i?n.data||n.y:n.data);return!i&&(null===(u=n.callOutAccessibilityData)||void 0===u?void 0:u.ariaLabel)||"".concat(c,". ").concat(d,", ").concat(f,".")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i=Ph(t,e.margins,8);if(e._xAxisType===es.StringAxis){if(Gs(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth)e._barWidth=Ys(e.props.barWidth,e.props.maxBarWidth),i>=(r=Hh(e._barWidth,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(i-r)/2);else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=Ih(i,e._xAxisLabels.length,e._xAxisInnerPadding),a=Ys(e.props.barWidth,e.props.maxBarWidth,u),l=(i-(r=Hh(a,e._xAxisLabels.length,e._xAxisInnerPadding)))/2,s=Ds(e._xAxisLabels)+20,c=(i-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*s))/2;e._domainMargin=8+Math.max(0,Math.min(l,c))}}else{var d=(null===(n=e.props.data)||void 0===n?void 0:n.map((function(t){return t.xAxisPoint})))||[];e._barWidth=Ys(e.props.barWidth,e.props.maxBarWidth,Bh(d,i,e._xAxisInnerPadding)),e._domainMargin=8+e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data,r=Object.keys(e._lineObject).length;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," stacked bars")+(r>0?" and ".concat(r," lines"):"")+". "},e._getMinMaxOfYAxis=function(t,n,i){if(!i)return function(t){var n=fi(t,(function(t){return t.y}));return{startValue:di(t,(function(t){return t.y})),endValue:n}}(t);var r=[];return e.props.data.forEach((function(t){var n;null===(n=t.lineData)||void 0===n||n.forEach((function(t){t.useSecondaryYScale&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}},e._initYAxisParams=function(){e._points[0].chartData.length>0?e._yAxisType=Rs(e._points[0].chartData[0].data,!1):Object.keys(e._lineObject).forEach((function(t){e._lineObject[t][0].useSecondaryYScale||(e._yAxisType=Rs(e._lineObject[t][0].y,!1))})),e._yAxisLabels=e._getOrderedYAxisLabels()},e._getYDomainMargins=function(t){var n=0,i=t-e.margins.bottom-e.margins.top;if(e._yAxisType===rs.StringAxis){var r=0;e._points.forEach((function(t){var n=0;t.chartData.forEach((function(t){n+=e._yAxisLabels.indexOf("".concat(t.data))+1})),r=Math.max(r,n)})),n+=(0===r?0:i/r)*(r-e._yAxisLabels.length)}return(0,o.Cl)((0,o.Cl)({},e.margins),{top:e.margins.top+n})},e._getOrderedXAxisLabels=function(){return e._xAxisType!==es.StringAxis?[]:ec(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._getOrderedYAxisLabels=function(){return e._yAxisType!==rs.StringAxis?[]:ec(e._mapCategoryToValues(!0),e.props.yAxisCategoryOrder)},e._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return e._points.forEach((function(i){var e;i.chartData.forEach((function(e){var r=t?e.data:i.xAxisPoint,o=t?i.xAxisPoint:e.data;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)})),null===(e=i.lineData)||void 0===e||e.forEach((function(e){if(!t||!e.useSecondaryYScale){var r=t?e.y:i.xAxisPoint,o=t?i.xAxisPoint:e.y;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)}}))})),n},Lc(e),e.state={isCalloutVisible:!1,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,refSelected:null,dataForHoverCard:0,color:"",hoverXValue:"",YValueHover:[],xCalloutValue:"",yCalloutValue:"",activeXAxisDataPoint:"",calloutLegend:""},En("VERTICAL STACKED BAR CHART",n,{colors:"IVSChartDataPoint.color",chartLabel:"use your own title for chart"}),e._handleMouseOut=e._handleMouseOut.bind(e),e._calloutId=p("callout"),e._tooltipId=p("VSBCTooltipId_"),e._isChartEmpty()||(e._adjustProps(),e._dataset=e._createDataSetLayer()),e._createLegendsForLine=(0,an.J9)((function(t){return e._getLineLegends(t)})),e._emptyChartId=p("_VSBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;qs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._adjustProps(),this._dataset=this._createDataSetLayer())},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){this._adjustProps();var n=this.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),i=this._toFocusWholeStack(n),e=this.props.isCalloutForStack,r=void 0!==e&&e;this._dataset=this._createDataSetLayer();var a=this._getLegendData(this._points,this.props.theme.palette,this._createLegendsForLine(this.props.data));this._classNames=zh(this.props.styles,{theme:this.props.theme,href:this.props.href});var l=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),zs(this.state.callOutAccessibilityData)),s={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(Nv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._dataset,chartType:is.VerticalStackedBarChart,xAxisType:this._xAxisType,calloutProps:l,createYAxis:Cs,tickParams:s,legendBars:a,getMinMaxOfYAxis:this._getMinMaxOfYAxis,datasetForXAxisDomain:this._xAxisLabels,isCalloutForStack:i,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:As,barwidth:this._barWidth,focusZoneDirection:r||n?uc.horizontal:uc.vertical,getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===es.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Gs(this.props.xAxisInnerPadding,this.props.xAxisPadding),yAxisType:this._yAxisType,stringDatasetForYAxisDomain:(0,o.fX)([""],this._yAxisLabels,!0),getYDomainMargins:this._getYDomainMargins,children:function(i){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),u.createElement("g",null,n&&t._createLines(i.xScale,i.yScalePrimary,i.containerHeight,i.containerWidth,i.yScaleSecondary)))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._points=this.props.data||[],this._barWidth=Ys(this.props.barWidth,this.props.maxBarWidth);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.red,t.black],this._xAxisType=Rs(this.props.data[0].xAxisPoint,!0),this._lineObject=this._getFormattedLineData(this.props.data),this._xAxisInnerPadding=Xs(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===es.StringAxis?2/3:.5),this._xAxisOuterPadding=Xs(this.props.xAxisOuterPadding,this.props.xAxisPadding,0),this._initYAxisParams()},n.prototype._createDataSetLayer=function(){var t=this,n=this._points.map((function(n){if(t._yAxisType===rs.StringAxis)return{x:n.xAxisPoint,y:0};var i=0;return n.chartData.forEach((function(t){i+=t.data})),{x:n.xAxisPoint,y:i}}));return this._xAxisLabels=this._getOrderedXAxisLabels(),n},n.prototype._renderCallout=function(t){return t?u.createElement(yc.ChartHoverCard,{XValue:t.xAxisCalloutData,Legend:t.legend,YValue:t.yAxisCalloutData,color:t.color,culture:this.props.culture}):null},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._getLegendData=function(t,n,i){var e=this;if(this.props.hideLegend)return u.createElement(u.Fragment,null);var r=[n.blueLight,n.blue,n.blueMid,n.red,n.black],a=[],l=this.props,s=l.allowHoverOnLegend,c=void 0===s||s,d=l.theme;t.forEach((function(t){t.chartData.forEach((function(n){var i,o,u=n.color?n.color:r[Math.floor(4*Math.random()+1)];if(e.props.enableGradient){var l=Math.max((null===(i=t.chartData)||void 0===i?void 0:i.findIndex((function(t){return t.legend===n.legend})))||0,0);u=(null===(o=n.gradient)||void 0===o?void 0:o[0])||kc(l,0,null==d?void 0:d.isInverted)[0]}if(!(a.filter((function(t){return t.title===n.legend&&t.color===u})).length>0)){var s={title:n.legend,color:u,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(n.legend)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};a.push(s)}}))}));var f=[];i&&i.length>0&&i.forEach((function(t){var n={title:t.title,color:t.color,isLineLegendInBarChart:!0,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(t.title)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};f.push(n)}));var v=f.concat(a);return u.createElement(vf,(0,o.Cl)({legends:v,overflowProps:this.props.legendsOverflowProps,enabledWrapLines:this.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._onRectHover=function(t,n,i,e){e.persist(),this._onRectFocusHover(t,n,i,e)},n.prototype._onRectFocusHover=function(t,n,i,e){var r,o;if((null===(r=this._calloutAnchorPoint)||void 0===r?void 0:r.chartDataPoint)!==n||(null===(o=this._calloutAnchorPoint)||void 0===o?void 0:o.xAxisDataPoint)!==t){this._calloutAnchorPoint={chartDataPoint:n,xAxisDataPoint:t instanceof Date?(0,Yn.Yn)(t,this.props.culture,this.props.useUTC):t.toString()};var u=n.xAxisCalloutData||(t instanceof Date?(0,Yn.Yn)(t,this.props.culture,this.props.useUTC):t.toString());this.setState({refSelected:e,isCalloutVisible:this._noLegendHighlighted()||this._isLegendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:i,xCalloutValue:u,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._onStackHover=function(t,n){n.persist(),this._onStackHoverFocus(t,n)},n.prototype._onStackHoverFocus=function(t,n){var i,e,r,u=this;this._noLegendHighlighted()||(t=(0,o.Cl)((0,o.Cl)({},t),{chartData:t.chartData.filter((function(t){return u._isLegendHighlighted(t.legend)})),lineData:null===(i=t.lineData)||void 0===i?void 0:i.filter((function(t){return u._isLegendHighlighted(t.legend)}))}));var a=t.lineData,l=void 0!==a&&a.length>0;l&&a.forEach((function(t){t.data=t.data||t.y,t.shouldDrawBorderBottom=!0})),this.setState({refSelected:n,isCalloutVisible:t.chartData.length>0||(null!==(r=null===(e=t.lineData)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0,YValueHover:l?(0,o.fX)((0,o.fX)([],a.sort((function(t,n){return t.data<n.data?1:-1})),!0),t.chartData.slice().reverse(),!0):t.chartData.slice().reverse(),hoverXValue:t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,this.props.culture,this.props.useUTC):t.xAxisPoint,stackCalloutProps:t,activeXAxisDataPoint:t.xAxisPoint,callOutAccessibilityData:t.stackCallOutAccessibilityData})},n.prototype._onRectFocus=function(t,n,i,e){e.refElement&&this._onRectFocusHover(n,t,i,e.refElement)},n.prototype._onStackFocus=function(t,n){n.refElement&&this._onStackHoverFocus(t,n.refElement)},n.prototype._onClick=function(t,n){var i,e;null===(e=(i=this.props).onBarClick)||void 0===e||e.call(i,n,t),this.props.href&&(window.location.href=this.props.href)},n.prototype._getBarGapAndScale=function(t,n,i){var e,r,o=this.props.barGapMax,u=void 0===o?0:o,a=0,l=0;this._yAxisType===rs.StringAxis?e=null!=i?i:t.reduce((function(t,i){return t+n(i.data)}),0):(a=t.reduce((function(t,n){return t+Math.abs(n.data)}),0),e=null!=i?i:Math.abs(n(a)-n(this.Y_ORIGIN)),t.forEach((function(t){var n=Math.abs(t.data)/a*100;n<1&&0!==n&&(n=1),l+=n})),r=0!==l?l/100:1);var s=u&&t.length-1,c=s&&Math.max(1,Math.min(u,.2*e/s));return{gapHeight:c,heightValueScale:this._yAxisType===rs.StringAxis?0:(e-c*s)/(a*r),absStackTotal:a}},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.some((function(t){return t.chartData.length>0||t.lineData&&t.lineData.length>0})))},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),Yh=(0,r.I)($h,(function(t){var n=t.shouldHighlight,i=t.href,e=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1",cursor:i?"pointer":"default"},tooltip:iv(e),barLabel:rv(e)}})),Xh=(0,a.Z)(),Gh=.1,Uh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e._legendColorMap={},e.Y_ORIGIN=0,e._uniqDotId=p("gvbc_dot_"),e.toImage=function(t){var n,i;return tf([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getMinMaxOfYAxis=function(t,n,i){var e=[];return t.forEach((function(t){t.groupSeries.forEach((function(t){!i==!t.useSecondaryYScale&&e.push(t.data)}))})),{startValue:di(e),endValue:fi(e)}},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===es.NumericAxis||o===es.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Fs(n,i,r)},e._getGraphData=function(t,n,i,r,o,u,a){var l=e._createX0Scale(r);e._barWidth=Ys(e.props.barwidth,e.props.maxBarWidth,Ih(l.bandwidth(),e._barLegends.length,Gh)),e._groupWidth=Hh(e._barWidth,e._barLegends.length,Gh);var s=e._createX1Scale(),c=[];e._datasetForBars.forEach((function(t){c.push(e._buildGraph(t,l,s,n,a,i,o))})),e._groupedVerticalBarGraph=c},e._getMargins=function(t){return e.margins=t},e._createDataSetOfGVBC=function(t,n){var i=new Set;t.forEach((function(t){t.series.forEach((function(t){i.add(t.legend)}))}));var r=new Set(n.map((function(t){return t.legend}))),o=e._getOrderedXAxisLabels(t,n),u=e._createDataset(t,n);return{barLegends:Array.from(i),lineLegends:Array.from(r),xAxisLabels:o,datasetForBars:u}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._onBarHover=function(t,n,i){i.persist(),e._calloutAnchorPoint!==t&&(e._calloutAnchorPoint=t,e._showCallout(i,t,n))},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1})},e._onBarFocus=function(t,n,i){e._showCallout(i.currentTarget,t,n)},e._redirectToUrl=function(t){t&&(window.location.href=t)},e._buildGraph=function(t,n,i,r,o,a,l){var s=[],c=[],d=e._barLegends.filter((function(n){return n in t})),f=Hh(e._barWidth,d.length,Gh),v=Tu().domain(d).range(e._isRtl?[f,0]:[0,f]).paddingInner(Gh);if(e._barLegends.forEach((function(n,i){var a,l=t[n];if(l){var d=l[0].useSecondaryYScale&&o?o:r,f=(null!==(a=v(n))&&void 0!==a?a:0)+(v.bandwidth()-e._barWidth)/2,h=e._legendHighlighted(n)||e._noLegendHighlighted(),g=h?"":"0.1",y=0,m=d(e.Y_ORIGIN),b=m,x=m,w=e.Y_ORIGIN;l.forEach((function(n,r){var o,a;if(n.data){var l=p("GVBC_Gradient")+"_".concat(t.indexNum,"_").concat(i,"_").concat(r);if(e.props.enableGradient){var c=(null===(o=n.gradient)||void 0===o?void 0:o[0])||n.color,v=(null===(a=n.gradient)||void 0===a?void 0:a[1])||n.color;s.push(u.createElement("defs",{key:"defs_".concat(l)},u.createElement("linearGradient",{id:l,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0%",stopColor:c}),u.createElement("stop",{offset:"100%",stopColor:v}))))}var m=.5*(r>0?2:0),M=Math.max(d(e.Y_ORIGIN)-d(Math.abs(n.data)),1),C=n.color;n.data>=e.Y_ORIGIN?w=b-=M+m:x=(w=x+m)+M,s.push(u.createElement("rect",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r),className:e._classNames.opacityChangeOnHover,height:M,width:e._barWidth,x:f,y:w,"data-is-focusable":!e.props.hideTooltip&&h,opacity:g,fill:e.props.enableGradient?"url(#".concat(l,")"):C,rx:e.props.roundCorners?3:0,onMouseOver:e._onBarHover.bind(e,n,t),onMouseMove:e._onBarHover.bind(e,n,t),onMouseOut:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,t),onBlur:e._onBarLeave,onClick:e.props.href?e._redirectToUrl.bind(e,e.props.href):n.onClick,"aria-label":e._getAriaLabel(n,t.xAxisPoint),role:"img"})),y+=n.data}})),null!==y&&!e.props.hideLabels&&e._barWidth>=16&&h&&c.push(u.createElement("text",{key:"".concat(t.indexNum,"-").concat(i),x:f+e._barWidth/2,y:y>=e.Y_ORIGIN?b-6:x+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-hidden":!0},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(y):$s(y)))}})),!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var h=sl(l).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var g={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:h};h&&Vs(g)}return u.createElement("g",{key:t.indexNum,transform:"translate(".concat(n(t.xAxisPoint)+(n.bandwidth()-f)/2,", 0)")},s,c)},e._createDataset=function(t,n){var i=[],e={},r=new Set;return n.forEach((function(t){t.data.forEach((function(n){e[n.x]||(e[n.x]=[]),e[n.x].push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,data:n.y,useSecondaryYScale:t.useSecondaryYScale}))}))})),t.forEach((function(t,n){var u,a={},l={};t.series.forEach((function(t){a[t.legend]?(a[t.legend].push((0,o.Cl)({},t)),l[t.legend].data+=t.data):(a[t.legend]=[(0,o.Cl)({},t)],l[t.legend]=(0,o.Cl)({},t))})),a.xAxisPoint=t.name,a.indexNum=n,a.groupSeries=(0,o.fX)((0,o.fX)([],Object.values(l),!0),null!==(u=e[t.name])&&void 0!==u?u:[],!0),a.stackCallOutAccessibilityData=t.stackCallOutAccessibilityData,i.push(a),r.add(t.name)})),Object.keys(e).forEach((function(t){r.has(t)||i.push({xAxisPoint:t,groupSeries:e[t]})})),i},e._createX0Scale=function(t){return Tu().domain(e._xAxisLabels).range(e._isRtl?[t-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,t-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding)},e._createX1Scale=function(){return Tu().domain(e._barLegends).range(e._isRtl?[e._groupWidth,0]:[0,e._groupWidth]).paddingInner(Gh)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(){var t=[],n=function(n,i){var r={title:n,color:e._legendColorMap[n][0],isLineLegendInBarChart:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};t.push(r)};return e._lineLegends.forEach((function(t){return n(t,!0)})),e._barLegends.forEach((function(t){return n(t)})),u.createElement(vf,(0,o.Cl)({legends:t,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n){var i,e=t.xAxisCalloutData||n,r=t.legend,o=t.yAxisCalloutData||t.data;return(null===(i=t.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(e,". ").concat(r,", ").concat(o,".")},e._getDomainMargins=function(t){e._domainMargin=8;var n=Ph(t,e.margins,8);if(e._xAxisType===es.StringAxis)if(Gs(e.props.xAxisOuterPadding))e._domainMargin=0;else if("auto"!==e.props.barwidth){e._barWidth=Ys(e.props.barwidth,e.props.maxBarWidth);var i=Hh(e._barWidth,e._barLegends.length,Gh);n>=(r=Hh(i,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(n-r)/2)}else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=Ih(n,e._xAxisLabels.length,e._xAxisInnerPadding),a=Ih(u,e._barLegends.length,Gh),l=Ys(e.props.barwidth,e.props.maxBarWidth,a),s=(i=Hh(l,e._barLegends.length,Gh),(n-(r=Hh(i,e._xAxisLabels.length,e._xAxisInnerPadding)))/2),c=Ds(e._xAxisLabels)+20,d=(n-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*c))/2;e._domainMargin=8+Math.max(0,Math.min(s,d))}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Vertical bar chart with ".concat(e._barLegends.length," grouped bar series")+(e._lineLegends.length>0?" and ".concat(e._lineLegends.length," line series. "):". ")},e._adjustColor=function(t,n,i,e){var r=i?e?"#000000":"#ffffff":e?"#ffffff":"#000000";return Po(Gu().domain([0,1]).range([t,r])(n)).formatRgb()},e._prepareChartData=function(){var t,n,i,r,u=e.props.data;Array.isArray(e.props.dataV2)&&e.props.dataV2.length>0&&(u=(t=e._processDataV2(e.props.dataV2)).barData,r=t.lineData),e._legendColorMap={};var a=0;return{barData:null!==(n=null==u?void 0:u.map((function(t){var n,i;return(0,o.Cl)((0,o.Cl)({},t),{series:null!==(i=null===(n=t.series)||void 0===n?void 0:n.map((function(t){var n,i,r,u,l,s,c,d=t.color?t.color:ds(a,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted),f=d;if(e.props.enableGradient)if(t.color)d=e._adjustColor(t.color||f,.2,!1,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted),f=e._adjustColor(t.color||d,.2,!0,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted);else{var v=kc(a,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted);d=(null===(l=t.gradient)||void 0===l?void 0:l[0])||v[0],f=(null===(s=t.gradient)||void 0===s?void 0:s[1])||v[1]}var h=[d,f];return e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[d,f]),a+=1,(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:null!==(c=t.color)&&void 0!==c?c:e._legendColorMap[t.legend][0]}),e.props.enableGradient?{gradient:h}:{})})))&&void 0!==i?i:[]})})))&&void 0!==n?n:[],lineData:null!==(i=null==r?void 0:r.map((function(t){var n,i,r;return r=void 0===t.color?ds(a,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted):fs(t.color,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted),e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[r,r]),a+=1,(0,o.Cl)((0,o.Cl)({},t),{color:e._legendColorMap[t.legend][0]})})))&&void 0!==i?i:[]}},e._getOrderedXAxisLabels=function(t,n){return e._xAxisType!==es.StringAxis?[]:ec(e._mapCategoryToValues(t,n),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(t,n){var i={};return t.forEach((function(t){i[t.name]||(i[t.name]=[]),t.series.forEach((function(n){i[t.name].push(n.data)}))})),n.forEach((function(t){t.data.forEach((function(t){i[t.x]||(i[t.x]=[]),i[t.x].push(t.y)}))})),i},e._createLines=function(t,n,i,r){var o=[],a=[],l=[],s=function(t){return n(t)+n.bandwidth()/2};return t.forEach((function(t,n){var c,d=[],f=[],v=[],h=(null===(c=t.lineOptions)||void 0===c?void 0:c.lineBorderWidth)?Number.parseFloat(t.lineOptions.lineBorderWidth.toString()):0,p=t.useSecondaryYScale&&r?r:i,g=e._legendHighlighted(t.legend)||e._noLegendHighlighted();t.data.forEach((function(i,r){var o,a,l,c,y,m,b,x=s(i.x),w=p(i.y);if(r>0){var M=s(t.data[r-1].x),C=p(t.data[r-1].y);h>0&&d.push(u.createElement("line",{key:"lineBorder-".concat(n,"-").concat(r),x1:M,y1:C,x2:x,y2:w,fill:"transparent",stroke:null!==(a=null===(o=t.lineOptions)||void 0===o?void 0:o.lineBorderColor)&&void 0!==a?a:e.props.theme.semanticColors.bodyBackground,strokeWidth:3+2*h,strokeLinecap:"round",opacity:g?1:.1})),f.push(u.createElement("line",{key:"line-".concat(n,"-").concat(r),x1:M,y1:C,x2:x,y2:w,stroke:t.color,strokeWidth:null!==(c=null===(l=t.lineOptions)||void 0===l?void 0:l.strokeWidth)&&void 0!==c?c:3,strokeLinecap:null!==(m=null===(y=t.lineOptions)||void 0===y?void 0:y.strokeLinecap)&&void 0!==m?m:"round",strokeDasharray:null===(b=t.lineOptions)||void 0===b?void 0:b.strokeDasharray,opacity:g?1:.1,onMouseOver:function(i){return e._onLineHover(i,t,n,r,s)},onMouseLeave:e._onBarLeave}))}var k=e._getDotId(n,r),A=e.state.activeLinePoint,S=A===i.x||A===k;v.push(u.createElement("circle",{key:k,id:k,cx:x,cy:w,r:g&&S?8:.3,fill:e.props.theme.semanticColors.bodyBackground,stroke:t.color,strokeWidth:3,opacity:g?1:.1,onMouseOver:function(i){return e._onLineHover(i,t,n,r,s)},onMouseLeave:e._onBarLeave,"data-is-focusable":g,onFocus:function(i){return e._onLineFocus(i,t,n,r)},onBlur:e._onBarLeave,role:"img","aria-label":e._getAriaLabel({xAxisCalloutData:i.xAxisCalloutData,legend:t.legend,yAxisCalloutData:i.yAxisCalloutData,data:i.y,callOutAccessibilityData:i.callOutAccessibilityData},i.x)}))})),o.push(u.createElement("g",{key:"lineBorderGroup-".concat(n)},d)),a.push(u.createElement("g",{key:"lineGroup-".concat(n)},f)),l.push(u.createElement("g",{key:"dotGroup-".concat(n)},v))})),l.length>0?u.createElement("g",null,o.length>0?u.createElement("g",null,o):null,a.length>0?u.createElement("g",null,a):null,u.createElement("g",null,l)):null},e._onLineHover=function(t,n,i,r,o){var u=av(t,e._rectRef.current)[0],a=r;if(r>0){var l=o(n.data[r].x),s=o(n.data[r-1].x);Math.abs(s-u)<Math.abs(l-u)&&(a=r-1)}t.persist(),e._showCalloutForLines(t,n,i,a)},e._onLineFocus=function(t,n,i,r){e._showCalloutForLines(t.currentTarget,n,i,r)},e._showCalloutForLines=function(t,n,i,r){var u=n.data[r],a=(0,o.Cl)((0,o.Cl)({},u),{legend:n.legend,color:n.color,key:n.legend,data:u.y,yAxisCalloutData:u.yAxisCalloutData}),l=e._datasetForBars.find((function(t){return t.xAxisPoint===u.x}));e._showCallout(t,a,l,e._getDotId(i,r))},e._showCallout=function(t,n,i,r){var o,u;void 0===r&&(r=""),e.setState({refSelected:t,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:n.color,xCalloutValue:null!==(o=n.xAxisCalloutData)&&void 0!==o?o:i.xAxisPoint,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:e.props.isCalloutForStack?i.stackCallOutAccessibilityData:n.callOutAccessibilityData,YValueHover:i.groupSeries.filter((function(t){return e._noLegendHighlighted()||e._legendHighlighted(t.legend)})),hoverXValue:null!==(u=n.xAxisCalloutData)&&void 0!==u?u:i.xAxisPoint,activeLinePoint:e.props.isCalloutForStack?i.xAxisPoint:r})},e._getDotId=function(t,n){return e._uniqDotId+"-".concat(t,"-").concat(n)},e._processDataV2=function(t){var n={},i=[];return t.forEach((function(t){"bar"===t.type?t.data.forEach((function(i){var e,r;n[i.x]||(n[i.x]={name:i.x,series:[]}),n[i.x].series.push({key:null!==(e=t.key)&&void 0!==e?e:t.legend,data:i.y,color:null!==(r=i.color)&&void 0!==r?r:t.color,gradient:t.gradient,legend:t.legend,xAxisCalloutData:i.xAxisCalloutData,yAxisCalloutData:i.yAxisCalloutData,onClick:i.onClick,useSecondaryYScale:t.useSecondaryYScale})})):"line"===t.type&&i.push(t)})),{barData:Object.values(n),lineData:i}},Lc(e),e._createSet=(0,an.J9)((function(t,n){return e._createDataSetOfGVBC(t,n)})),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],xCalloutValue:"",yCalloutValue:"",YValueHover:[],hoverXValue:"",calloutLegend:"",activeLegend:"",activeLinePoint:""},En("GROUPED VERTICAL BAR CHART",n,{showYAxisGridLines:"Dont use this property. Lines are drawn by default",showXAxisPath:"Dont use this property. Axis line removed default.",showYAxisPath:"Dont use this property. No need to display Y axis path. Handling default",showXAxisGridLines:"Dont use this property. Handling with default value.",legendColor:"Dont use this property. colour will pick from given data."}),e._calloutId=p("callout"),e._tooltipId=p("GVBCTooltipId_"),e._emptyChartId=p("_GVBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e._rectRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;qs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this,n=this._prepareChartData(),i=n.barData,e=n.lineData;this._xAxisType=Rs(i[0].name,!0);var r=this._createSet(i,e),a=r.barLegends,l=r.lineLegends,s=r.xAxisLabels,c=r.datasetForBars;this._barLegends=a,this._lineLegends=l,this._xAxisLabels=s,this._datasetForBars=c;var d=this._getLegendData();this._adjustProps();var f=this._getMinMaxOfYAxis(this._datasetForBars).endValue;this._yMax=Math.max(f,this.props.yMaxValue||0),this._classNames=Xh(this.props.styles,{theme:this.props.theme,href:this.props.href});var v=(0,o.Cl)((0,o.Cl)((0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),gapSpace:15,isBeakVisible:!1,setInitialFocus:!0,color:this.state.color,Legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout},this.props.calloutProps),{preventDismissOnLostFocus:!0}),zs(this.state.callOutAccessibilityData,"text",!1)),h={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty(i,e)?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Nv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._datasetForBars,chartType:is.GroupedVerticalBarChart,calloutProps:v,legendBars:d,xAxisType:this._xAxisType,createYAxis:Cs,datasetForXAxisDomain:this._xAxisLabels,tickParams:h,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,createStringYAxis:As,tickPadding:this.props.tickPadding||5,maxOfYVal:this._yMax,svgFocusZoneProps:{direction:uc.horizontal},customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===es.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{barwidth:this._barWidth,ref:this._cartesianChartRef,children:function(n){return u.createElement(u.Fragment,null,u.createElement("rect",{ref:t._rectRef,width:"100%",height:"100%",fill:"transparent",style:{pointerEvents:"none"}}),u.createElement("g",null,t._groupedVerticalBarGraph),t._createLines(e,n.xScale,n.yScalePrimary,n.yScaleSecondary))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(t,n){return!(t&&t.length>0&&t.filter((function(t){return t.series.length})).length>0||n&&n.length>0&&n.some((function(t){return t.data.length>0})))},n.prototype._adjustProps=function(){this._barWidth=Ys(this.props.barwidth,this.props.maxBarWidth),this._xAxisInnerPadding=Xs(this.props.xAxisInnerPadding,void 0,2/(2+_h(this._barLegends.length,Gh))),this._xAxisOuterPadding=Xs(this.props.xAxisOuterPadding)},n.defaultProps={maxBarWidth:24,xAxisCategoryOrder:"default"},n}(u.Component),qh=(0,r.I)(Uh,(function(t){var n=t.theme;return{opacityChangeOnHover:{cursor:t.href?"pointer":"default"},tooltip:iv(n),barLabel:rv(n)}})),Zh=i(263),Kh=(0,a.Z)(),Jh=function(t){function n(n){var i,e,r=t.call(this,n)||this;return r._rectRefArray={},r.toImage=function(t){var n,i;return tf([{container:null===(n=r._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],r.props.hideLegend||null===(i=r._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},r._getMinMaxOfYAxis=function(){return{startValue:0,endValue:0}},r._getDomainNRangeValues=function(t,n,i,e,o,u,a,l){return u===es.NumericAxis||u===es.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Fs(r.margins,i,o)},r._getXandY=function(){var t="",n="";return r.props.data.forEach((function(i){if(i.data&&i.data.length>0)return t=i.data[0].x,n=i.data[0].y,{x:t,y:n}})),{x:t,y:n}},r._getMargins=function(t){r.margins=t},r._getOpacity=function(t){return r._legendHighlighted(t)||r._noLegendHighlighted()?"1":"0.1"},r._rectRefCallback=function(t,n,i){r._rectRefArray[n]={data:i,refElement:t}},r._onRectFocus=function(t,n){r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData})},r._onRectMouseOver=function(t,n,i){i.persist(),r._calloutAnchorPoint!==n&&(r._calloutAnchorPoint=n,r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData}))},r._onRectBlurOrMouseOut=function(){},r._handleChartMouseLeave=function(){r._calloutAnchorPoint=null,r.setState({isCalloutVisible:!1})},r._createRectangles=function(){var t=[];return r._stringYAxisDataPoints.slice().reverse().forEach((function(n){var i=0;r._stringXAxisDataPoints.forEach((function(e){var o,a,l,s="x".concat(e,"y").concat(n);if((null===(o=r._dataSet[n][i])||void 0===o?void 0:o.x)===e&&"number"==typeof(null===(a=r._dataSet[n][i])||void 0===a?void 0:a.value)){var c=r._dataSet[n][i],d=rc(r._colorScale(c.value),r.props.theme);l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(c),"data-is-focusable":r._legendHighlighted(c.legend)||r._noLegendHighlighted(),fillOpacity:r._getOpacity(c.legend),transform:"translate(".concat(r._xAxisScale(c.x),", ").concat(r._yAxisScale(c.y),")"),ref:function(t){r._rectRefCallback(t,s,c)},onFocus:r._onRectFocus.bind(r,s,c),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,c),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:r._colorScale(c.value),width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth(),onClick:c.onClick}),u.createElement("text",{dominantBaseline:"middle",textAnchor:"middle",className:r._classNames.text,transform:"translate(".concat(r._xAxisScale.bandwidth()/2,", ").concat(r._yAxisScale.bandwidth()/2,")"),fill:d},(0,Yn.c$)(c.rectText,r.props.culture,r.props.useUTC))),i++}else{var f={x:e,y:n,value:NaN,rectText:"No data available",legend:""};l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(f),"data-is-focusable":r._noLegendHighlighted(),transform:"translate(".concat(r._xAxisScale(f.x),", ").concat(r._yAxisScale(f.y),")"),ref:function(t){r._rectRefCallback(t,s,f)},onFocus:r._onRectFocus.bind(r,s,f),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,f),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:"transparent",width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth()}))}t.push(l)}))})),t},r._createLegendBars=function(){var t=r.props,n=t.data,i=t.legendProps,e=[];return n.forEach((function(t){var n={title:t.legend,color:r._colorScale(t.value),action:function(){r._onLegendClick(t.legend)},hoverAction:function(){r._handleChartMouseLeave(),r._onLegendHover(t.legend)},onMouseOutAction:function(){r._onLegendLeave()}};e.push(n)})),u.createElement(vf,(0,o.Cl)({},i,{legends:e,ref:r._legendsRef}))},r._getColorScale=function(){var t=r.props,n=t.domainValuesForColorScale,i=t.rangeValuesForColorScale;return Gu().domain(n).range(i)},r._getXIndex=function(t){return r._xAxisType===es.DateAxis?"".concat(t.getTime()):r._xAxisType===es.StringAxis?t:r._xAxisType===es.NumericAxis?"".concat(t):""},r._getYIndex=function(t){return r._yAxisType===rs.DateAxis?"".concat(t.getTime()):r._yAxisType===rs.StringAxis?t:r._yAxisType===rs.NumericAxis?"".concat(t):""},r._createNewDataSet=function(t,n,i,e,u){var a=[];t.forEach((function(t){t.data.forEach((function(n){a.push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend}))}))}));var l={},s={},c={};return a.forEach((function(t){var n=r._getXIndex(t.x),i=r._getYIndex(t.y);c[n]="1",s[i]="1",l[i]?l[i]=(0,o.fX)((0,o.fX)([],l[i],!0),[t],!1):l[i]=[t]})),Object.keys(l).forEach((function(t){l[t]=r._getOrderedXPoints(l[t]),l[t].forEach((function(t){r._xAxisType===es.DateAxis&&(t.x=r._getStringFormattedDate(t.x,n)),r._xAxisType===es.NumericAxis&&(t.x=r._getStringFormattedNumber(t.x,i)),r._xAxisType===es.StringAxis&&(t.x=r._getFormattedLabelForXAxisDataPoint(t.x)),r._yAxisType===rs.DateAxis&&(t.y=r._getStringFormattedDate(t.y,e)),r._yAxisType===rs.NumericAxis&&(t.y=r._getStringFormattedNumber(t.y,u)),r._yAxisType===rs.StringAxis&&(t.y=r._getFormattedLabelForYAxisDataPoint(t.y))}))})),Object.keys(l).forEach((function(t){r._yAxisType===rs.DateAxis?l[r._getStringFormattedDate(t,e)]=l[t]:r._yAxisType===rs.NumericAxis?l["".concat(r._getStringFormattedNumber(t,u))]=l[t]:l[r._getFormattedLabelForYAxisDataPoint(t)]=l[t]})),{dataSet:l,yAxisPoints:r._getYAxisDataPoints(s),xAxisPoints:r._getXAxisDataPoints(c)}},r._getXAxisDataPoints=function(t){return r._getOrderedXAxisLabels(t).map((function(t){return r._xAxisType===es.DateAxis?r._getStringFormattedDate(t,r.props.xAxisDateFormatString):r._xAxisType===es.NumericAxis?r._getStringFormattedNumber(t,r.props.xAxisNumberFormatString):r._getFormattedLabelForXAxisDataPoint(t)}))},r._getYAxisDataPoints=function(t){return r._getOrderedYAxisLabels(t).map((function(t){return r._yAxisType===rs.DateAxis?r._getStringFormattedDate(t,r.props.yAxisDateFormatString):r._yAxisType===rs.NumericAxis?r._getStringFormattedNumber(t,r.props.yAxisNumberFormatString):r._getFormattedLabelForYAxisDataPoint(t)}))},r._getStringFormattedDate=function(t,n){var i=new Date;return i.setTime(+t),Xe(n||"%b/%d")(i)},r._getStringFormattedNumber=function(t,n){return zu(n||".2~s")(+t)},r._getFormattedLabelForXAxisDataPoint=function(t){var n=r.props.xAxisStringFormatter;return n?n(t):t},r._getFormattedLabelForYAxisDataPoint=function(t){var n=r.props.yAxisStringFormatter;return n?n(t):t},r._closeCallout=function(){r.setState({isCalloutVisible:!1})},r._legendHighlighted=function(t){return r.state.selectedLegend===t||""===r.state.selectedLegend&&r.state.activeLegend===t},r._noLegendHighlighted=function(){return""===r.state.selectedLegend&&""===r.state.activeLegend},r._getAriaLabel=function(t){var n,i=t.x,e=t.y,r=t.legend,o=t.ratio?"".concat(t.ratio[0],"/").concat(t.ratio[1]):t.rectText||t.value,u=t.descriptionMessage;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,", ").concat(e,". ").concat(r,", ").concat(o,".")+(u?" ".concat(u,"."):"")},r._getChartTitle=function(){var t=r.props.chartTitle,n=r.props.data.reduce((function(t,n){return t+n.data.length}),0);return(t?"".concat(t,". "):"")+"Heat map chart with ".concat(n," data points. ")},r._getOrderedXAxisLabels=function(t){return r._shouldOrderXAxisLabelsByCategoryOrder()?ec(r._mapCategoryToValues(),r.props.xAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._xAxisType===es.DateAxis||r._xAxisType===es.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedYAxisLabels=function(t){return r._shouldOrderYAxisLabelsByCategoryOrder()?ec(r._mapCategoryToValues(!0),r.props.yAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._yAxisType===rs.DateAxis||r._yAxisType===rs.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedXPoints=function(t){if(!r._shouldOrderXAxisLabelsByCategoryOrder())return t.sort((function(t,n){return r._xAxisType===es.StringAxis?"none"===r.props.sortOrder?0:t.x.toLowerCase()>n.x.toLowerCase()?1:-1:r._xAxisType===es.DateAxis?t.x.getTime()-n.x.getTime():r._xAxisType===es.NumericAxis?+t.x>+n.x?1:-1:t.x>n.x?1:-1}));var n=[],i={};return t.forEach((function(t){var n=t.x;i[n]||(i[n]=[]),i[n].push(t)})),r._getOrderedXAxisLabels({}).forEach((function(t){i[t]&&n.push.apply(n,i[t])})),n},r._shouldOrderXAxisLabelsByCategoryOrder=function(){return r._xAxisType===es.StringAxis&&"default"!==r.props.xAxisCategoryOrder},r._shouldOrderYAxisLabelsByCategoryOrder=function(){return r._yAxisType===rs.StringAxis&&"default"!==r.props.yAxisCategoryOrder},r._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return r.props.data.forEach((function(i){i.data.forEach((function(i){var e=t?i.y:i.x;n[e]||(n[e]=[]),n[e].push(i.value)}))})),n},Lc(r),r._createSet=(0,an.J9)((function(t,n,i,e,o){return r._createNewDataSet(t,n,i,e,o)})),r.state={selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",activeLegend:"",isCalloutVisible:!1,target:null,calloutLegend:"",calloutTextColor:"",calloutYValue:"",ratio:null,descriptionMessage:"",calloutId:""},r._emptyChartId=p("_HeatMap_empty"),r._cartesianChartRef=u.createRef(),r._legendsRef=u.createRef(),r}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)!==(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&this.setState({selectedLegend:null!==(r=null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegend)&&void 0!==r?r:""})},n.prototype.render=function(){var t=this,n=this._getXandY(),i=n.x,e=n.y;this._xAxisType=Rs(i,!0),this._yAxisType=Rs(e,!1);var r=this.props,a=r.data,l=r.xAxisDateFormatString,s=r.xAxisNumberFormatString,c=r.yAxisDateFormatString,d=r.yAxisNumberFormatString;this._colorScale=this._getColorScale();var f=this._createSet(a,l,s,c,d),v=f.dataSet,h=f.xAxisPoints,p=f.yAxisPoints;this._dataSet=v,this._stringYAxisDataPoints=p,this._stringXAxisDataPoints=h,this._classNames=Kh(this.props.styles,{theme:this.props.theme});var g=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isBeakVisible:!1,gapSpace:8},this.props.calloutProps),{isCalloutVisible:this.state.isCalloutVisible,id:this.state.calloutId,YValue:this.state.calloutYValue,legend:this.state.calloutLegend,color:this.state.calloutTextColor,target:this.state.target,styles:this._classNames.subComponentStyles.calloutStyles,directionalHint:3,onDismiss:this._closeCallout}),zs(this.state.callOutAccessibilityData,"text",!1)),{preventDismissOnLostFocus:!0,calloutMaxWidth:238}),y=(0,o.Cl)((0,o.Cl)({},this.state.ratio&&{ratio:this.state.ratio}),{descriptionMessage:this.state.descriptionMessage}),m={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Nv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:a,chartType:is.HeatMapChart,xAxisType:es.StringAxis,yAxisType:rs.StringAxis,calloutProps:g,createYAxis:Cs,chartHoverProps:y,styles:this._classNames.subComponentStyles.cartesianStyles,datasetForXAxisDomain:this._stringXAxisDataPoints,stringDatasetForYAxisDomain:this._stringYAxisDataPoints,createStringYAxis:As,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,getmargins:this._getMargins,xAxisTickCount:this._stringXAxisDataPoints.length,xAxistickSize:0,xAxisPadding:.02,yAxisPadding:.02,svgFocusZoneProps:{direction:uc.bidirectional},legendBars:this._createLegendBars(),onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,tickParams:m,children:function(n){return t._xAxisScale=n.xScale,t._yAxisScale=n.yScalePrimary,t._createRectangles()}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n.defaultProps={xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),Qh=(0,r.I)(Jh,(function(t){return{root:{},text:[t.theme.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold}],subComponentStyles:{}}})),tp=/[\{\}]/g,np=/\{\d+\}/g;function ip(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=n;return t.replace(np,(function(t){var n=e[t.replace(tp,"")];return null==n&&(n=""),n}))}function ep(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function rp(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function op(t,n){return n-1-t.height}function up(t,n){return t.sourceLinks.length?t.depth:n-1}function ap(t){return function(){return t}}function lp(t,n){return cp(t.source,n.source)||t.index-n.index}function sp(t,n){return cp(t.target,n.target)||t.index-n.index}function cp(t,n){return t.y0-n.y0}function dp(t){return t.value}function fp(t){return t.index}function vp(t){return t.nodes}function hp(t){return t.links}function pp(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function gp({nodes:t}){for(const n of t){let t=n.y0,i=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const t of n.targetLinks)t.y1=i+t.width/2,i+=t.width}}function yp(){let t,n,i,e=0,r=0,o=1,u=1,a=24,l=8,s=fp,c=up,d=vp,f=hp,v=6;function h(){const h={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,i]of t.entries())i.index=n,i.sourceLinks=[],i.targetLinks=[];const e=new Map(t.map(((n,i)=>[s(n,i,t),n])));for(const[t,i]of n.entries()){i.index=t;let{source:n,target:r}=i;"object"!=typeof n&&(n=i.source=pp(e,n)),"object"!=typeof r&&(r=i.target=pp(e,r)),n.sourceLinks.push(i),r.targetLinks.push(i)}if(null!=i)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(i),e.sort(i)}(h),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(ep(n.sourceLinks,dp),ep(n.targetLinks,dp)):n.fixedValue}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.depth=r;for(const{target:n}of t.sourceLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.height=r;for(const{source:n}of t.targetLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function(i){const s=function({nodes:t}){const i=rp(t,(t=>t.depth))+1,r=(o-e-a)/(i-1),u=new Array(i);for(const n of t){const t=Math.max(0,Math.min(i-1,Math.floor(c.call(null,n,i))));n.layer=t,n.x0=e+t*r,n.x1=n.x0+a,u[t]?u[t].push(n):u[t]=[n]}if(n)for(const t of u)t.sort(n);return u}(i);t=Math.min(l,(u-r)/(rp(s,(t=>t.length))-1)),function(n){const i=function(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}(n,(n=>(u-r-(n.length-1)*t)/ep(n,dp)));for(const e of n){let n=r;for(const r of e){r.y0=n,r.y1=n+r.value*i,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*i}n=(u-n+t)/(e.length+1);for(let t=0;t<e.length;++t){const i=e[t];i.y0+=n*(t+1),i.y1+=n*(t+1)}w(e)}}(s);for(let t=0;t<v;++t){const n=Math.pow(.99,t),i=Math.max(1-n,(t+1)/v);g(s,n,i),p(s,n,i)}}(h),gp(h),h}function p(t,i,e){for(let r=1,o=t.length;r<o;++r){const o=t[r];for(const t of o){let n=0,e=0;for(const{source:i,value:r}of t.targetLinks){let o=r*(t.layer-i.layer);n+=M(i,t)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(cp),y(o,e)}}function g(t,i,e){for(let r=t.length-2;r>=0;--r){const o=t[r];for(const t of o){let n=0,e=0;for(const{target:i,value:r}of t.sourceLinks){let o=r*(i.layer-t.layer);n+=C(t,i)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(cp),y(o,e)}}function y(n,i){const e=n.length>>1,o=n[e];b(n,o.y0-t,e-1,i),m(n,o.y1+t,e+1,i),b(n,u,n.length-1,i),m(n,r,0,i)}function m(n,i,e,r){for(;e<n.length;++e){const o=n[e],u=(i-o.y0)*r;u>1e-6&&(o.y0+=u,o.y1+=u),i=o.y1+t}}function b(n,i,e,r){for(;e>=0;--e){const o=n[e],u=(o.y1-i)*r;u>1e-6&&(o.y0-=u,o.y1-=u),i=o.y0-t}}function x({sourceLinks:t,targetLinks:n}){if(void 0===i){for(const{source:{sourceLinks:t}}of n)t.sort(sp);for(const{target:{targetLinks:n}}of t)n.sort(lp)}}function w(t){if(void 0===i)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(sp),i.sort(lp)}function M(n,i){let e=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:o}of n.sourceLinks){if(r===i)break;e+=o+t}for(const{source:t,width:r}of i.targetLinks){if(t===n)break;e-=r}return e}function C(n,i){let e=i.y0-(i.targetLinks.length-1)*t/2;for(const{source:r,width:o}of i.targetLinks){if(r===n)break;e+=o+t}for(const{target:t,width:r}of n.sourceLinks){if(t===i)break;e-=r}return e}return h.update=function(t){return gp(t),t},h.nodeId=function(t){return arguments.length?(s="function"==typeof t?t:ap(t),h):s},h.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:ap(t),h):c},h.nodeSort=function(t){return arguments.length?(n=t,h):n},h.nodeWidth=function(t){return arguments.length?(a=+t,h):a},h.nodePadding=function(n){return arguments.length?(l=t=+n,h):l},h.nodes=function(t){return arguments.length?(d="function"==typeof t?t:ap(t),h):d},h.links=function(t){return arguments.length?(f="function"==typeof t?t:ap(t),h):f},h.linkSort=function(t){return arguments.length?(i=t,h):i},h.size=function(t){return arguments.length?(e=r=0,o=+t[0],u=+t[1],h):[o-e,u-r]},h.extent=function(t){return arguments.length?(e=+t[0][0],o=+t[1][0],r=+t[0][1],u=+t[1][1],h):[[e,r],[o,u]]},h.iterations=function(t){return arguments.length?(v=+t,h):v},h}class mp{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}var bp=(0,a.Z)(),xp="#757575",wp=[{fillColor:"#00758F",borderColor:"#002E39"},{fillColor:"#77004D",borderColor:"#43002C"},{fillColor:"#4F6BED",borderColor:"#3B52B4"},{fillColor:"#937600",borderColor:"#6D5700"},{fillColor:"#286EA8",borderColor:"#00457E"},{fillColor:"#A43FB1",borderColor:"#7C158A"},{fillColor:"#CC3595",borderColor:"#7F215D"},{fillColor:"#0E7878",borderColor:"#004E4E"},{fillColor:"#8764B8",borderColor:"#4B3867"},{fillColor:"#9C663F",borderColor:"#6D4123"}];function Mp(t){return"number"==typeof t?t:t.nodeId}function Cp(t,n){return t[Mp(n.source)][Mp(n.target)]}var kp="...";function Ap(t,n){var i;try{return t.text(n),null===(i=t.node())||void 0===i?void 0:i.getComputedTextLength()}finally{t.text(null)}}var Sp,Lp,Dp=fh().x((function(t){return t.x})).y0((function(t){return t.y0})).y1((function(t){return t.y1})).curve((function(t){return new mp(t,!0)})),Vp=function(t){function n(n){var i=t.call(this,n)||this;return i._isRtl=(0,l.jI)(),i._numColumns=0,i.toImage=function(t){return tf([{container:i.chartContainer}],void 0,i._isRtl,t)},i._onCloseCallout=function(){i.setState({isCalloutVisible:!1,refSelected:void 0,descriptionMessage:""})},i._onBlur=function(){},i._fillNodeColors=function(t){var n=i.state;if(!n.selectedState)return t.color;var e=n.selectedNode;return e&&n.selectedNodes.has(t.index)?e.color:e?void 0:t.color},i._fillNodeBorder=function(t){var n=i.state;if(n.selectedState){if(n.selectedNodes.has(t.index)){var e=n.selectedNode;return e?e.borderColor:t.borderColor}return t.borderColor}return t.borderColor},i._calculateChartMinWidth=function(){return i._margins.left+i._margins.right+124*i._numColumns+62*(i._numColumns-1)},Lc(i),i.state={containerHeight:468,containerWidth:912,selectedState:!1,selectedLinks:new Set,selectedNodes:new Set,shouldOverflow:!1,isCalloutVisible:!1},i._calloutId=p("callout"),i._linkId=p("link"),i._chartId=p("sankeyChart"),i._emptyChartId=p("_SankeyChart_empty"),i._labelTooltipId=p("tooltip"),i._margins={top:36,right:48,bottom:32,left:48},i._computeClassNamesProps=(0,an.J9)((function(t,n,i,e,r,o){return{theme:t,width:e,height:r,pathColor:n,className:i,enableReflow:o}})),i._computeClassNames=(0,an.J9)((function(t,n){return bp(t,n)})),i._normalizeData=(0,an.J9)((function(t,n,e,r,o){return i._normalizeSankeyData(t,n,e,r,o)})),i._fetchTooltip=(0,an.J9)((function(t){return i._labelTooltipDiv(t)})),i._strings=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkFrom)||"From {0}";return{linkFrom:function(t){return ip(n,t.name)}}}))(n.strings),i._accessibility=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkAriaLabel)||"link from {0} to {1} with weight {2}",e=(null==t?void 0:t.nodeAriaLabel)||"node {0} with weight {1}";return{emptyAriaLabel:(null==t?void 0:t.emptyAriaLabel)||"Graph has no data to display",linkAriaLabel:function(t){return ip(n,t.source.name,t.target.name,t.unnormalizedValue?i._formatNumber(t.unnormalizedValue):t.unnormalizedValue)},nodeAriaLabel:function(t,n){return ip(e,t.name,i._formatNumber(n))}}}))(n.accessibility),i._nodeAttributes=(0,an.J9)((function(t,n){return i._computeNodeAttributes(t,n)})),i._fetchNodes=function(t,n,e,r){return i._createNodes(t,n,e,r)},i._linkAttributes=(0,an.J9)((function(t,n,i){return function(t,n,i){var e={};return t.forEach((function(t){var r=Mp(t.source),o=e[r];o||(o={},e[r]=o),o[Mp(t.target)]={reactId:p("link"),from:n(t.source),aria:i(t)}})),e}(t,n,i)})),i._fetchLinks=function(t,n){return i._createLinks(t,n)},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._fitParentContainer()},n.prototype.componentDidUpdate=function(t){t.shouldResize!==this.props.shouldResize&&this._fitParentContainer()},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.theme,e=n.className,r=n.styles,a=n.pathColor,l=n.colorsForNodes,s=n.borderColorsForNodes,c=this.state,d=this._computeClassNamesProps(i,a,e,c.containerWidth,c.containerHeight,this.props.enableReflow),f=this._computeClassNames(r,d),v=this._normalizeData(this.props.data.SankeyChartData,c.containerWidth,c.containerHeight,l,s),h=v.nodes,p=v.links,g=v.width,y=v.height,m=[];h.sort((function(t,n){return t.x0!==n.x0?t.x0-n.x0:t.y0-n.y0})),h.forEach((function(t,n){m.push({layer:t.layer,type:"node",index:n})})),p.sort((function(t,n){var i=t.source.x0,e=n.source.x0;return i!==e?i-e:t.y0-n.y0})),p.forEach((function(t,n){m.push({layer:t.source.layer,type:"link",index:n})})),m.sort((function(t,n){return t.layer!==n.layer?t.layer-n.layer:t.type>n.type?-1:t.type<n.type?1:0}));var b=this._fetchTooltip(f),x=this._nodeAttributes(h,this._accessibility.nodeAriaLabel),w=this._fetchNodes(f,h,x,b),M=this._linkAttributes(p,this._strings.linkFrom,this._accessibility.linkAriaLabel),C=this._fetchLinks(p,M),k=(0,o.Cl)({isCalloutVisible:c.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:c.refSelected,color:c.color,XValue:c.xCalloutValue,YValue:c.yCalloutValue?c.yCalloutValue:c.dataForHoverCard,descriptionMessage:c.descriptionMessage,isBeakVisible:!1,gapSpace:15,onDismiss:this._onCloseCallout,className:f.calloutContentRoot,preventDismissOnLostFocus:!0},this.props.calloutProps);return u.createElement("div",{className:f.root,role:"presentation",ref:function(n){t.chartContainer=n},onMouseLeave:this._onCloseCallout},u.createElement(Uc,{direction:uc.vertical,className:f.chartWrapper},u.createElement("svg",{width:g,height:y,id:this._chartId,className:f.chart},m.map((function(t){return"node"===t.type?u.createElement("g",{key:h[t.index].nodeId,className:f.nodes},w[t.index]):u.createElement("g",{key:"".concat(p[t.index].source.nodeId,"-").concat(p[t.index].target.nodeId),className:f.links,strokeOpacity:1},C[t.index])})),k.isCalloutVisible&&u.createElement($n,(0,o.Cl)({},k),u.createElement(yc.ChartHoverCard,{XValue:k.XValue,YValue:k.YValue,color:k.color,descriptionMessage:k.descriptionMessage?k.descriptionMessage:""})))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":this._accessibility.emptyAriaLabel})},n.prototype._computeNodeAttributes=function(t,n){var i=this,e={},r=sl(".nodeName").append("text").attr("class","tempText").append("tspan").text(null),o=sl(".nodeName").append("text").attr("class","tempText").attr("font-size","10").append("tspan").text(null);return t.forEach((function(t){var u=Math.max(t.y1-t.y0,0),a=8,l=0,s=t.actualValue;if(u<36){a+=6;var c=Ap(r,i._formatNumber(s));void 0!==c&&(a+=l=c)}var d=function(t,n,i,e){var r=i-e;if(function(t,n,i){var e=Ap(t,n);return void 0!==e&&e<=i}(t,n,r))return n;for(var o=function(t){var n=Ap(t,kp);return void 0===n?0:n}(t),u="",a=0;a<n.length;a++){u+=n[a],t.text(u);var l=t.node();if(null!==l&&l.getComputedTextLength()>=r-o){u=u.slice(0,-1),u+=kp;break}}return t.text(null),u}(o,t.name,116,a),f=d.slice(-3)===kp;e[t.nodeId]={reactId:p("nodeBar"),gElementId:p("nodeGElement"),name:d,aria:n(t,s),trimmed:f,height:u,weightOffset:l}})),cl(".tempText").remove(),e},n.prototype._linkCalloutAttributes=function(t,n){return{selectedLink:t,isCalloutVisible:!0,color:t.source.color,xCalloutValue:t.target.name,yCalloutValue:this._formatNumber(t.unnormalizedValue),descriptionMessage:n}},n.prototype._normalizeSankeyData=function(t,n,i,e,r){var u=function(t,n,i,e){var r=t.left,o=t.right,u=t.top,a=t.bottom;return{sankey:yp().nodeWidth(124).extent([[r,u],[n-o,i-a]]).nodeAlign(e?op:up),height:i,width:n}}(this._margins,n,i,this._isRtl),a=u.sankey,l=u.height,s=u.width,c=function(t){return{nodes:t.nodes.map((function(t){return(0,o.Cl)({},t)})),links:t.links.map((function(t){return(0,o.Cl)({},t)}))}}(t);a(c);var d=function(t){var n={};return t.nodes.forEach((function(t){var i=t.layer;n[i]?n[i].push(t):n[i]=[t]})),n}(c);this._numColumns=Object.keys(d).length;var f,v,h=(f=c.nodes,v={},f.forEach((function(t){v[t.nodeId]=t.value})),v),p=function(t){var n={};return t.forEach((function(t){var i=Mp(t.source),e=n[i];e||(e={},n[i]=e),e[Mp(t.target)]=t.value})),n}(c.links);return function(t,n,i){Object.values(t).map((function(t){return vi(t,(function(t){return t.value}))})).forEach((function(e,r){var o=0,u=.01*e,a=t[r];a.forEach((function(t){var i=n[t.nodeId],r=i/e*100;t.actualValue=i,r<1?(t.value=u,o+=1):o+=r}));var l=0!==o?o/100:1;l>1&&a.forEach((function(t){var e=t.value=t.value/l;!function(t,n,i,e){var r=function(t){var r=Cp(e,t);t.unnormalizedValue=r;var o=r/n;t.value=Math.max(i*o,t.value)};t.sourceLinks.forEach(r),t.targetLinks.forEach(r)}(t,n[t.nodeId],e,i)}))}))}(d,h,p),function(t,n,i){var e=t.nodePadding(),r=.3*n;Object.values(i).forEach((function(t){var i=n-vi(t,(function(t){return t.y1-t.y0}));r<i&&(e=Math.min(e,r/(t.length-1)))})),t.nodePadding(e)}(a,i-this._margins.top-this._margins.bottom,d),a(c),function(t,n,i){t.links.forEach((function(t){t.unnormalizedValue||(t.unnormalizedValue=Cp(i,t))})),t.nodes.forEach((function(t){t.actualValue=n[t.nodeId]}))}(c,h,p),function(t,n,i){var e,r;n&&i?(e=n,r=i):(e=wp.map((function(t){return t.fillColor})),r=wp.map((function(t){return t.borderColor})));var o=0;t.forEach((function(t){t.color||t.borderColor?t.color&&!t.borderColor?t.borderColor="#757575":t.borderColor&&!t.color&&(t.color="#F5F5F5"):(t.color=e[o],t.borderColor=r[o]),o=(o+1)%e.length}))}(c.nodes,e,r),{width:s,height:l,nodes:c.nodes,links:c.links}},n.prototype._labelTooltipDiv=function(t){var n=sl("#".concat(this._labelTooltipId));return n.empty()&&(n=sl("body").append("div").attr("id",this._labelTooltipId).attr("class",t.toolTip).style("opacity",0)),n.attr("class",t.toolTip),n},n.prototype._createLinks=function(t,n){var i=this;if(t){var e=this._linkId;return t.map((function(t,r){var o,a,l,s,c=Cp(n,t),d=c.reactId,f=c.from,v=c.aria,h=(a=.5*(o=t).width,l=o.y0,s=o.y1,[{x:o.source.x1,y0:l+a,y1:l-a},{x:o.target.x0,y0:s+a,y1:s-a}]),p="".concat(e,"-").concat(r),g="gradient-".concat(p),y="url(#".concat(g,")"),m=t.source,b=t.target;return u.createElement("g",{key:p},u.createElement("defs",null,u.createElement("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:m.color}),u.createElement("stop",{offset:"100%",stopColor:b.color}))),u.createElement("path",{d:Dp(h),id:d,fill:i._fillStreamColors(t,y),stroke:i._fillStreamBorder(t,y),strokeWidth:"2",strokeOpacity:i._getOpacityStreamBorder(t),onMouseOver:function(n){return i._onStreamHover(n,t,f)},onMouseOut:function(){i._onStreamLeave(t)},onFocus:function(n){return i._onFocusLink(n,t,f)},onBlur:i._onBlur,fillOpacity:i._getOpacityStream(t),"data-is-focusable":!0,"aria-label":v,role:"img"}))}))}return[]},n.prototype._createNodes=function(t,n,i,e){var r=this;if(n){var o=this.state,a=this._isRtl?"end":"start";return n.map((function(n,l){var s=i[n.nodeId],c=s.reactId,d=s.gElementId,f=s.height,v=s.trimmed,h=s.name,p=s.weightOffset,g=s.aria,y=f>36,m=n.name,b=n.actualValue,x=n.x0,w=n.x1,M=n.y0,C=function(t,n){return!t.selectedState||t.selectedNodes.has(n.index)&&t.selectedNode||!t.selectedNode?"#FFFFFF":"#323130"}(o,n);return u.createElement("g",{key:l,id:d},u.createElement("rect",{x:x,y:M,height:f,width:w-x,fill:r._fillNodeColors(n),id:c,onMouseOver:r._onHover.bind(r,n),onMouseOut:function(){r._onLeave(n)},onFocus:r._onCloseCallout.bind(r),stroke:r._fillNodeBorder(n),strokeWidth:"2",opacity:"1","data-is-focusable":!0,"aria-label":g,role:"img"}),f>24&&u.createElement("g",{className:t.nodeTextContainer},u.createElement("g",{className:"nodeName"},u.createElement("text",{id:"".concat(c,"-name"),x:x,y:M,dy:"1.2em",dx:"0.4em",textAnchor:a,fontWeight:"regular","aria-hidden":"true",fill:C,fontSize:10,onMouseOver:r._showTooltip.bind(r,m,v,e),onMouseOut:r._hideTooltip.bind(r,e)},h)),u.createElement("text",{x:y?x:w-p-8,y:M,dy:y?"2em":"1em",dx:y?"0.4em":"0em",textAnchor:a,fontWeight:"bold","aria-hidden":"true",fill:C,fontSize:14},b?r._formatNumber(b):b)))}))}},n.prototype._onLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedNode:void 0})},n.prototype._onHover=function(t,n){if(n.persist(),this._onCloseCallout(),!this.state.selectedState){var i=function(t){var n=new Array,i=new Set;for(t.sourceLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;)(e=n.shift().target)&&e.sourceLinks&&e.sourceLinks.forEach((function(t){i.add(t),n.push(t)}));for(t.targetLinks&&t.targetLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;){var e;(e=n.shift().source)&&e.targetLinks&&e.targetLinks.forEach((function(t){i.add(t),n.push(t)}))}return i}(t),e=function(t){var n=[];return t.forEach((function(t){n.push(t.target),-1===n.indexOf(t.source)&&n.push(t.source)})),n}(i);e.push(t),this.setState({selectedState:!0,selectedNodes:new Set(Array.from(e).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(i).map((function(t){return t.index}))),selectedNode:t,refSelected:n,isCalloutVisible:t.y1-t.y0<24,color:t.color,xCalloutValue:t.name,yCalloutValue:this._formatNumber(t.actualValue)})}},n.prototype._formatNumber=function(t){return this.props.formatNumberOptions?t.toLocaleString(void 0,this.props.formatNumberOptions):t.toString()},n.prototype._onStreamHover=function(t,n,i){if(t.persist(),this._onCloseCallout(),!this.state.selectedState){var e=function(t){var n=new Array,i=new Set,e=new Set;for(n.push(t.source),i.add(t);n.length>0;){var r=n.shift();e.add(r),r.targetLinks&&r.targetLinks.length>0&&r.targetLinks.forEach((function(t){n.push(t.source),i.add(t)}))}for(n.push(t.target);n.length>0;)r=n.shift(),e.add(r),r.sourceLinks&&r.sourceLinks.length>0&&r.sourceLinks.forEach((function(t){n.push(t.target),i.add(t)}));return{selectedLinks:i,selectedNodes:e}}(n),r=e.selectedLinks,u=e.selectedNodes;this.setState((0,o.Cl)({selectedState:!0,selectedNodes:new Set(Array.from(u).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(r).map((function(t){return t.index}))),refSelected:t},this._linkCalloutAttributes(n,i)))}},n.prototype._onStreamLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedLink:void 0})},n.prototype._onFocusLink=function(t,n,i){t.persist(),this._onCloseCallout(),this.setState((0,o.Cl)({refSelected:t.currentTarget},this._linkCalloutAttributes(n,i)))},n.prototype._fillStreamColors=function(t,n){var i=this.state;if(i.selectedState&&i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.color:n}},n.prototype._fillStreamBorder=function(t,n){var i=this.state;if(i.selectedState){if(i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.borderColor:n}return xp}return xp},n.prototype._getOpacityStream=function(t){var n=this.state;if(n.selectedState){if(!n.selectedLinks.has(t.index))return 1;if(!n.selectedNode)return.3}return 1},n.prototype._getOpacityStreamBorder=function(t){var n=this.state;return!n.selectedState||n.selectedLinks.has(t.index)||n.selectedNode?1:.5},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n=t.props.parentRef?t.props.parentRef:t.chartContainer,r=n&&(t.props.enableReflow?Math.max(n.getBoundingClientRect().width,t._calculateChartMinWidth()):n.getBoundingClientRect().width),o=n&&n.getBoundingClientRect().height;(i!==r||e!==o)&&t.setState({containerWidth:r,containerHeight:o})}))},n.prototype._showTooltip=function(t,n,i,e){n&&(i.style("opacity",.9).style("color",this.props.theme.palette.neutralPrimary),i.html(t).style("left",e.pageX+"px").style("top",e.pageY-28+"px"))},n.prototype._hideTooltip=function(t){t.style("opacity",0)},n.prototype._isChartEmpty=function(){var t,n=null===(t=this.props.data)||void 0===t?void 0:t.SankeyChartData;return!(n&&n.nodes.length>0&&n.links.length>0)},n.defaultProps={enableReflow:!0},n}(u.Component),Np=(0,r.I)(Vp,(function(t){var n,i,e,r=t.className,u=t.theme,a=t.pathColor,l=t.enableReflow,s=u.effects;return{root:[u.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},r],links:{stroke:a||u.palette.black,fill:u?u.semanticColors.bodyBackground:"#F5F5F5",strokeWidth:3,selectors:(n={},n[It.up]={fill:"Canvas"},n)},nodes:{fill:"#F5F5F5",selectors:(i={},i[It.up]={fill:"Canvas"},i)},toolTip:iv(t.theme),nodeTextContainer:{selectors:{text:{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}},marginTop:"4px",marginLeft:"8px",marginBottom:"4px",marginRight:"8px"},calloutContentRoot:{boxShadow:s.elevation4},chartWrapper:(0,o.Cl)({},l?{overflow:"auto"}:{}),chart:{display:"block"}}}));function Op(t){var n=0,i=t.children,e=i&&i.length;if(e)for(;--e>=0;)n+=i[e].value;else n=1;t.value=n}function Tp(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=Fp)):void 0===n&&(n=Ep);for(var i,e,r,o,u,a=new _p(t),l=[a];i=l.pop();)if((r=n(i.data))&&(u=(r=Array.from(r)).length))for(i.children=r,o=u-1;o>=0;--o)l.push(e=r[o]=new _p(r[o])),e.parent=i,e.depth=i.depth+1;return a.eachBefore(Pp)}function Ep(t){return t.children}function Fp(t){return Array.isArray(t)?t[1]:null}function Bp(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Pp(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function _p(t){this.data=t,this.depth=this.height=0,this.parent=null}function Hp(t,n){return t.parent===n.parent?1:2}function Ip(t){var n=t.children;return n?n[0]:t.t}function Wp(t){var n=t.children;return n?n[n.length-1]:t.t}function Rp(t,n,i){var e=i/(n.i-t.i);n.c-=e,n.s+=i,t.c+=e,n.z+=i,n.m+=i}function jp(t,n,i){return t.a.parent===n.parent?t.a:i}function zp(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}!function(t){t[t.long=1]="long",t[t.compact=0]="compact"}(Sp||(Sp={})),function(t){t[t.preOrder=1]="preOrder",t[t.levelOrder=0]="levelOrder"}(Lp||(Lp={})),_p.prototype=Tp.prototype={constructor:_p,count:function(){return this.eachAfter(Op)},each:function(t,n){let i=-1;for(const e of this)t.call(n,e,++i,this);return this},eachAfter:function(t,n){for(var i,e,r,o=this,u=[o],a=[],l=-1;o=u.pop();)if(a.push(o),i=o.children)for(e=0,r=i.length;e<r;++e)u.push(i[e]);for(;o=a.pop();)t.call(n,o,++l,this);return this},eachBefore:function(t,n){for(var i,e,r=this,o=[r],u=-1;r=o.pop();)if(t.call(n,r,++u,this),i=r.children)for(e=i.length-1;e>=0;--e)o.push(i[e]);return this},find:function(t,n){let i=-1;for(const e of this)if(t.call(n,e,++i,this))return e},sum:function(t){return this.eachAfter((function(n){for(var i=+t(n.data)||0,e=n.children,r=e&&e.length;--r>=0;)i+=e[r].value;n.value=i}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,i=function(t,n){if(t===n)return t;var i=t.ancestors(),e=n.ancestors(),r=null;for(t=i.pop(),n=e.pop();t===n;)r=t,t=i.pop(),n=e.pop();return r}(n,t),e=[n];n!==i;)n=n.parent,e.push(n);for(var r=e.length;t!==i;)e.splice(r,0,t),t=t.parent;return e},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(i){i!==t&&n.push({source:i.parent,target:i})})),n},copy:function(){return Tp(this).eachBefore(Bp)},[Symbol.iterator]:function*(){var t,n,i,e,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,n=r.children)for(i=0,e=n.length;i<e;++i)o.push(n[i])}while(o.length)}},zp.prototype=Object.create(_p.prototype);var $p=(0,a.Z)(),Yp=function(t){function n(n,i,e,r,o,u){void 0===r&&(r=[]),void 0===o&&(o=[]);var a=t.call(this,n,e,r,o)||this;return a.composition=i,a._treeTraversal=u,a}return(0,o.C6)(n,t),n.prototype.C=function(t,n){var i,e,r,o,u,a,l=(t=t<65?65:t>90?90:t)||75,s=Tp(this.treeData,(function(t){return t.children})),c=(null==s?void 0:s.height)+1;(function(){var t=Hp,n=1,i=1,e=null;function r(r){var l=function(t){for(var n,i,e,r,o,u=new zp(t,0),a=[u];n=a.pop();)if(e=n._.children)for(n.children=new Array(o=e.length),r=o-1;r>=0;--r)a.push(i=n.children[r]=new zp(e[r],r)),i.parent=n;return(u.parent=new zp(null,0)).children=[u],u}(r);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(u),e)r.eachBefore(a);else{var s=r,c=r,d=r;r.eachBefore((function(t){t.x<s.x&&(s=t),t.x>c.x&&(c=t),t.depth>d.depth&&(d=t)}));var f=s===c?1:t(s,c)/2,v=f-s.x,h=n/(c.x+f+v),p=i/(d.depth||1);r.eachBefore((function(t){t.x=(t.x+v)*h,t.y=t.depth*p}))}return r}function o(n){var i=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(i){!function(t){for(var n,i=0,e=0,r=t.children,o=r.length;--o>=0;)(n=r[o]).z+=i,n.m+=i,i+=n.s+(e+=n.c)}(n);var o=(i[0].z+i[i.length-1].z)/2;r?(n.z=r.z+t(n._,r._),n.m=n.z-o):n.z=o}else r&&(n.z=r.z+t(n._,r._));n.parent.A=function(n,i,e){if(i){for(var r,o=n,u=n,a=i,l=o.parent.children[0],s=o.m,c=u.m,d=a.m,f=l.m;a=Wp(a),o=Ip(o),a&&o;)l=Ip(l),(u=Wp(u)).a=n,(r=a.z+d-o.z-s+t(a._,o._))>0&&(Rp(jp(a,n,e),n,r),s+=r,c+=r),d+=a.m,s+=o.m,f+=l.m,c+=u.m;a&&!Wp(u)&&(u.t=a,u.m+=d-c),o&&!Ip(l)&&(l.t=o,l.m+=s-f,e=n)}return e}(n,r,n.parent.A||e[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*i}return r.separation=function(n){return arguments.length?(t=n,r):t},r.size=function(t){return arguments.length?(e=!1,n=+t[0],i=+t[1],r):e?null:[n,i]},r.nodeSize=function(t){return arguments.length?(e=!0,n=+t[0],i=+t[1],r):e?[n,i]:null},r})().nodeSize([l,l/1.5]).separation((function(t,n){return t.parent===s&&n.parent===s?3.5:1}))(s).descendants().forEach((function(t){t.y=0===t.depth?10:130*t.depth,t.x+=n/2}));var d=[],f=0,v=function(t){var n,i;t.id=f,d.push({id:f,children:t.children,dataName:t.data.name,subName:t.data.subname,bodyText:t.data.bodytext,metricName:null===(n=t.data)||void 0===n?void 0:n.metric,fill:t.data.fill,x:t.x,y:t.y,parentID:null===(i=t.parent)||void 0===i?void 0:i.id}),f++};0===this._treeTraversal?s.each((function(t){v(t)})):s.eachBefore((function(t){v(t)}));for(var h=3*l,p=h/3.45,g=20,y=new Set,m=0,b=d;m<b.length;m++){var x=b[m],w=0===x.id?"Root Node":"Parent info parentId: ".concat(x.parentID,"\n ").concat(d[x.parentID].dataName,"\n ").concat(d[x.parentID].subName);if(!x.children&&!y.has(x.parentID)&&3===c){var M=(h-g)/2,C=p;y.add(x.parentID),this.D(x.id,d[x.parentID].x,d[x.parentID].y,d[x.id].x,d[x.id].y,!0,h,p,g);for(var k=null===(i=d[x.parentID])||void 0===i?void 0:i.children,A=(null===(e=d[x.parentID])||void 0===e?void 0:e.x)-M/2-10,S=(null===(r=d[x.parentID])||void 0===r?void 0:r.x)+M/2+10,L=null===(o=d[x.parentID])||void 0===o?void 0:o.x,D=null===(u=k[0])||void 0===u?void 0:u.y,V=0;V<k.length;++V){var N=k[V];void 0!==this.composition?0===this.composition?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,V%2==0?1===k.length?L:A:S,D,N.data.fill,1===k.length?h:M,p,N.id,w),V%2==1&&(D+=C+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,D,N.data.fill,h,p,N.id,w),D+=C+g):k.length>2?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,V%2==0?A:S,D,N.data.fill,1===k.length?h:M,p,N.id,w),V%2==1&&(D+=C+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,D,N.data.fill,h,p,N.id,w),D+=C+g)}}if((x.children||c<=2)&&(this.N(x.dataName,x.subName,x.bodyText,x.metricName,x.x,x.y,x.fill,h,p,x.id,w),0===x.id&&x.children)){var O=di(k=null===(a=d[x.id])||void 0===a?void 0:a.children,(function(t){return t.x})),T=fi(k,(function(t){return t.x}));this.D(x.id,x.x,x.y,O,x.children[0].y,!1,h,p,g,T)}}},n}(function(){function t(t,n,i,e){void 0===i&&(i=[]),void 0===e&&(e=[]),this._nodeElements=[],this._linkElements=[],this.treeData=t,this.styleClassNames=n,this._nodeElements=i,this._linkElements=e}return t.prototype.O=function(t,n,i,e){var r,o=t.split(/\s+/).reverse(),u="",a=sl(".svgTree").append("text").attr("class","tempText").append("tspan").text(null);e&&a.attr("class",e);for(var l=[];u=o.pop();)if(l.push(u),a.text(l.join(" ")+" "),null!==a.node()&&a.node().getComputedTextLength()>n-i){l.pop(),l.push("...");break}return r=l.join(" ")+" ",a.text(null),cl(".tempText").remove(),r},t.prototype.N=function(t,n,i,e,r,o,a,l,s,c,d){var f="nodeId: ".concat(c," \nnodeMainText: ").concat(t,"\nsubText ").concat(n," ").concat(d),v=r-l/2;!e&&0===c&&i||this._nodeElements.push(u.createElement("rect",{width:l,height:s,x:v,y:o,tabIndex:0,role:"text","data-is-focusable":!0,"aria-label":f,className:this.styleClassNames.rectNode,stroke:a,key:"".concat(c).concat(this.styleClassNames.rectNode)})),n&&(n=this.O(n,l,l/4,this.styleClassNames.rectSubText)),i&&(i=this.O(i,l,l/4,this.styleClassNames.rectBodyText)),e&&(e=this.O(e,l,l/4,this.styleClassNames.rectMetricText)),t=this.O(t,l,l/4,this.styleClassNames.rectText);var h=e?u.createElement("tspan",{className:this.styleClassNames.rectMetricText,dy:"1.4em",x:v+l/2},e):i?u.createElement(u.Fragment,null,u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n),u.createElement("tspan",{className:this.styleClassNames.rectBodyText,dy:"1.4em",x:v+l/2},i)):u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n);n||e||i?this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:e?this.styleClassNames.rectSubText:this.styleClassNames.rectText,dy:e?o+s/2.5:o+s/2,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t,h)):this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:this.styleClassNames.rectMetricText,dy:o+s/1.6,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t))},t.prototype.F=function(t,n,i,e,r,o,u,a,l){var s="M".concat(i-o/2,",").concat(e-a," H").concat(l+o/2," M").concat(t,",").concat(e-a,"\n V").concat(n+u+a/2),c="M".concat(t,",").concat(n+u+a/2," V").concat(n+5*a,"\n H").concat(t-o/2," H").concat(t+o/2);return r?c:s},t.prototype.D=function(t,n,i,e,r,o,a,l,s,c){void 0===c&&(c=0),this._linkElements.push(u.createElement("path",{className:this.styleClassNames.link,d:this.F(n,i,e,r,o,a,l,s,c),key:"".concat(t).concat(this.styleClassNames.link)}))},t}()),Xp=function(t){function n(n){var i,e,r,o,u,a=t.call(this,n)||this;return a._nodeElements=[],a._linkElements=[],a._margin={top:(null===(i=a.props.margins)||void 0===i?void 0:i.top)||30,bottom:(null===(e=a.props.margins)||void 0===e?void 0:e.bottom)||30,left:(null===(r=a.props.margins)||void 0===r?void 0:r.left)||50,right:(null===(o=a.props.margins)||void 0===o?void 0:o.right)||20},a._width=a.props.width||1500,a._height=a.props.height||700,a._treeData=a.props.treeData,a._composition=null===(u=a.props)||void 0===u?void 0:u.composition,a._treeTraversal=a.props.treeTraversal,a.state={_width:a._width,_height:a._height},a}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.theme,i=t.className,e=t.styles;this._classNames=$p(e,{theme:n,className:i}),this.P(),this.setState({_width:this.props.width||1500,_height:this.props.height||700})},n.prototype.componentDidUpdate=function(t){if(t.layoutWidth!==this.props.layoutWidth){var n=cl("text"),i=cl("rect"),e=cl("path");0===this._nodeElements.length&&0===this._linkElements.length&&(n.remove(),i.remove(),e.remove()),this.P()}},n.prototype.P=function(){var t=[],n=[],i=new Yp(this._treeData,this._composition,this._classNames,t,n,this._treeTraversal),e=this.state._width-this._margin.left-this._margin.right;i.C(this.props.layoutWidth,e),this._nodeElements=t,this._linkElements=n},n.prototype.render=function(){var t;return u.createElement(Uc,null,u.createElement("div",{className:null===(t=this._classNames)||void 0===t?void 0:t.root},u.createElement("svg",{className:"svgTree",width:this.state._width-this._margin.left-this._margin.right,height:this.state._height-this._margin.top-this._margin.bottom},u.createElement("g",{className:"svgNode"},this._nodeElements.map((function(t){return t}))),u.createElement("g",{className:"svgLink"},this._linkElements.map((function(t){return t}))))))},n}(u.Component),Gp=(0,r.I)(Xp,(function(t){var n,i,e,r,u;return{root:[t.theme.spacing,"ms-TreeChart",t.className,{overflow:"scroll"}],link:{fill:"none",stroke:t.theme.palette.neutralSecondary,strokeWidth:"2px"},rectNode:{strokeWidth:"2px",fill:t.theme.semanticColors.bodyBackground,padding:"10px",rx:"2px",selectors:(n={},n[It.up]={fill:"Canvas"},n)},rectText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.large),{selectors:(i={},i[It.up]={fill:"CanvasText"},i)}),rectSubText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimary},t.theme.fonts.medium),{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}),rectBodyText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimaryAlt},t.theme.fonts.xSmall),{selectors:(r={},r[It.up]={fill:"CanvasText"},r)}),rectMetricText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.xLarge),{selectors:(u={},u[It.up]={fill:"CanvasText"},u)})}}));function Up(t,n){let i,e;if(void 0===n)for(const n of t)null!=n&&(void 0===i?n>=n&&(i=e=n):(i>n&&(i=n),e<n&&(e=n)));else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(void 0===i?o>=o&&(i=e=o):(i>o&&(i=o),e<o&&(e=o)))}return[i,e]}var qp=(0,a.Z)(),Zp=function(t){function n(n){var i=t.call(this,n)||this;return i.margin={top:2,right:0,bottom:0,left:0},i._isRTL=(0,l.jI)(),i.state={_points:null,_width:i.props.width||80,_height:i.props.height||20,_valueTextWidth:i.props.valueTextWidth||80},i._emptyChartId=p("_SparklineChart_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this;if(!this._isChartEmpty()){var n=fh().x((function(n){return t.x(n.x)})).y0(this.state._height).y1((function(n){return t.y(n.y)})).curve(hl);this.area=n;var i=cv().x((function(n){return t.x(n.x)})).y((function(n){return t.y(n.y)})).curve(hl);this.line=i;var e=this.props.data.lineChartData[0].data,r=Up(e,(function(t){return t.x})),o=r[0],u=r[1];this.x=Gu().domain([o,u]).range([this.margin.left,this.state._width-this.margin.right]),this.y=Gu().domain([0,fi(e,(function(t){return t.y}))]).range([this.state._height-this.margin.bottom,this.margin.top]),this.setState({_points:e})}},n.prototype.drawSparkline=function(){return u.createElement(u.Fragment,null,u.createElement("path",{className:"line",d:this.line(this.state._points),fill:"transparent",opacity:1,strokeWidth:2,stroke:this.props.data.lineChartData[0].color}),u.createElement("path",{className:"area",d:this.area(this.state._points),opacity:1,fillOpacity:.2,fill:this.props.data.lineChartData[0].color,role:"img","aria-hidden":!0}))},n.prototype.render=function(){var t=qp(this.props.styles,{theme:this.props.theme});return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Uc,{direction:uc.horizontal,isCircularNavigation:!0,className:t.inlineBlock},u.createElement("div",{className:t.inlineBlock},this.state._width>=50&&this.state._height>=16?u.createElement("svg",{width:this.state._width,height:this.state._height,"data-is-focusable":!0,"aria-label":"Sparkline with label ".concat(this.props.data.lineChartData[0].legend)},this.state._points?this.drawSparkline():null):u.createElement(u.Fragment,null),this.props.showLegend&&this.props.data.lineChartData[0].legend?u.createElement("svg",{width:this.state._valueTextWidth,height:this.state._height,"data-is-focusable":!0},u.createElement("text",{x:"0%",textAnchor:this._isRTL?"end":"start",dx:8,y:"100%",dy:-5,className:t.valueText},this.props.data.lineChartData[0].legend)):u.createElement(u.Fragment,null)))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n}(u.Component),Kp=(0,r.I)(Zp,(function(t){var n;return{inlineBlock:{display:"inline"},valueText:(0,o.Cl)((0,o.Cl)({},t.theme.fonts.smallPlus),{fill:t.theme.semanticColors.messageText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)})}}));function Jp(t,n,i,e){var r=t.semanticColors.bodyText,o=t.semanticColors.bodyBackground;if(!n)return o;var u=Ks(n,i||r),a=Ks(n,e||o),l=Eo(u),s=Eo(a);if(!l||!s)return a;if(gs(l.formatHex(),s.formatHex())>=3)return s.formatHex();var c=function(t,n){var i=Eo(t);if(!i)return n.semanticColors.bodyText;var e=i.rgb();return Po(255-e.r,255-e.g,255-e.b).formatHex()}(s.formatHex(),t);return gs(l.formatHex(),c)>=3?c:o}var Qp=(0,a.Z)(),tg=function(t){function n(n){var i=t.call(this,n)||this;return i.toImage=function(t){return tf([{container:i._rootElem}],void 0,i._isRTL,t)},Lc(i),i._isRTL=(0,l.jI)(n.theme),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t,n=this,i=this.props,e=i.headers,r=i.rows,a=i.width,l=i.height,s=i.styles,c=i.theme,d=Qp(s,{theme:c});if(!e||0===e.length)return u.createElement("div",null,"No data available");var f,v=new Set;e.forEach((function(t){var n,i,e=null===(i=Eo((null===(n=null==t?void 0:t.style)||void 0===n?void 0:n.backgroundColor)||""))||void 0===i?void 0:i.formatHex();e&&v.add(e)}));var h=!1;if(1===v.size||2===v.size)for(var p=1===v.size?Array.from(v)[0]:Array.from(v)[1],g=0,y=e;g<y.length;g++){var m=y[g],b=null===(t=null==m?void 0:m.style)||void 0===t?void 0:t.color;if(b&&gs(b,p)>=3){f=p,h=!0;break}}return u.createElement("div",{ref:function(t){n._rootElem=t},className:d.root,style:{height:l?"".concat(l,"px"):"650px",overflow:"hidden"}},u.createElement("svg",{width:null!=a?a:"100%",height:null!=l?l:"650px",className:d.chart},u.createElement("foreignObject",{x:"0",y:"0",width:"100%",height:"100%"},u.createElement("div",{style:{maxHeight:l?"".concat(l,"px"):"650px",overflowY:"auto",overflowX:"auto"}},u.createElement("table",{className:d.table,style:{width:a?"".concat(a,"px"):"100%"}},u.createElement("thead",null,u.createElement("tr",null,e.map((function(t,i){var e=(0,o.Cl)({},null==t?void 0:t.style),r=e.color,a=e.backgroundColor;return h?e.backgroundColor=f:(r||a)&&(e.backgroundColor=Jp(c,n._rootElem,r,a)),u.createElement("th",{key:i,className:d.headerCell,style:e},t.value)})))),r&&r.length>0&&u.createElement("tbody",null,r.map((function(t,i){return u.createElement("tr",{key:i},t.map((function(t,i){var e=(0,o.Cl)({},null==t?void 0:t.style),r=e.color,a=e.backgroundColor;return(r||a)&&(e.backgroundColor=Jp(c,n._rootElem,r,a)),u.createElement("td",{key:i,className:d.bodyCell,style:e},t.value)})))}))))))))},n}(u.Component),ng=(0,r.I)(tg,(function(t){var n,i,e=t.theme,r=e.fonts;return{root:{width:"100%",overflowX:"auto"},table:{borderCollapse:"collapse"},headerCell:(0,o.Cl)((0,o.Cl)({},r.small),{fontWeight:It.BO.semibold,backgroundColor:e.palette.neutralQuaternary,color:e.semanticColors.bodyText,padding:"8px",textAlign:"left",border:"2px solid ".concat(e.palette.neutralLighter),selectors:(n={},n[It.up]={backgroundColor:"Window",color:"WindowText"},n)}),bodyCell:(0,o.Cl)((0,o.Cl)({},r.small),{padding:"8px",border:"2px solid ".concat(e.palette.neutralLighter),color:e.semanticColors.bodyText,textAlign:"left",selectors:(i={},i[It.up]={color:"WindowText"},i)})}})),ig=(0,a.Z)(),eg=function(t){function n(n){var i,e,r,a,s,c,d=t.call(this,n)||this;return d._isRtl=(0,l.jI)(),d.X_ORIGIN=0,d.toImage=function(t){var n,i;return tf([{container:null===(n=d._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],d.props.hideLegend||null===(i=d._legendsRef.current)||void 0===i?void 0:i.toSVG,d._isRtl,t)},d._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){var l;return l=o===es.NumericAxis?function(t,n,i,e,r){var o=Es(Ts(t),r),u=o.longestPositiveBar,a=o.longestNegativeBar,l=n.left,s=i-n.right;return e?{dStartValue:u,dEndValue:Math.min(a,r),rStartValue:l,rEndValue:s}:{dStartValue:Math.min(a,r),dEndValue:u,rStartValue:l,rEndValue:s}}(t,n,i,r,d.X_ORIGIN):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0},l},d._getMargins=function(t){d.margins=t},d._renderContentForOnlyBars=function(t){var n,i,e,r,o=d.props,a=o.useSingleColor,l=void 0!==a&&a,s=o.enableGradient,c=void 0!==s&&s,f=0;return d.props.data.forEach((function(n,i){n.y===t.y&&(f=i)})),l?(r=d.props.colors?d._createColors()(1):ds(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=kc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=t.color?t.color:d.props.colors?d._createColors()(t.x):ds(f,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),u.createElement(u.Fragment,null,u.createElement(yc.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x.toString(),Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:r,culture:d.props.culture}))},d._renderCallout=function(t){return t?d._renderContentForOnlyBars(t):null},d._getCustomizedCallout=function(){return d.props.onRenderCalloutPerDataPoint?d.props.onRenderCalloutPerDataPoint(d.state.dataPointCalloutProps,d._renderCallout):null},d._getGraphData=function(t,n,i,e,r,o){var u=Ts(d._points),a=Es(u,d.X_ORIGIN);d._longestBarPositiveTotalValue=a.longestPositiveBar,d._longestBarNegativeTotalValue=a.longestNegativeBar;var l=d._yAxisType===rs.NumericAxis?d._getScales(i,e,!0):d._getScales(i,e,!1),s=l.xBarScale,c=l.yBarScale,f=s.range(),v=[];return f[0]<f[1]&&(v=u.map((function(t){return d._yAxisType===rs.NumericAxis?d._createNumericBars(i,e,r,o,t,s,c):d._createStringBars(i,e,r,o,t,s,c)})).flat()),d._bars=v},d._refCallback=function(t,n){d._refArray.push({index:n,refElement:t})},d._getCalloutContentForBar=function(t){var n,i,e,r,o=[],u=d.props,a=u.useSingleColor,l=void 0!==a&&a,s=u.enableGradient,c=void 0!==s&&s,f=d.props.data,v=f.filter((function(n){return n.y===t.y})),h=0;return f.forEach((function(n,i){n.y===t.y&&(h=i)})),l?(r=d.props.colors?d._createColors()(1):ds(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=kc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=v[0].color?v[0].color:d.props.colors?d._createColors()(v[0].x):ds(h,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),o.push({legend:v[0].legend,y:v[0].x,color:r,data:v[0].yAxisCalloutData,yAxisCalloutData:v[0].yAxisCalloutData}),{YValueHover:o,hoverXValue:t.yAxisCalloutData||t.y.toString()}},d._onBarLeave=function(){},d._handleChartMouseLeave=function(){d._calloutAnchorPoint=null,d.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},d._onBarFocus=function(t,n,i){if((!1===d.state.isLegendSelected||d._isLegendHighlighted(t.legend))&&d._calloutAnchorPoint!==t){var e=d._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;d._refArray.forEach((function(e,u){n===u&&d.setState({refSelected:e.refElement,isCalloutVisible:!0,selectedLegendTitle:t.legend,dataForHoverCard:t.x,color:d.props.useSingleColor?i:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData})}))}},d._getScales=function(t,n,i){var e=d._longestBarPositiveTotalValue,r=d._longestBarNegativeTotalValue,o=[Math.min(d.X_ORIGIN,r),Math.max(d.X_ORIGIN,e)];if(i){var u=fi(d._points,(function(t){return t.y})),a=di(d._points,(function(t){return t.y})),l=Math.max(u,d.props.yMaxValue||0),s=d.props.yMinValue||0,c=Math.min(a,s);return{xBarScale:Gu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f=Gu().domain([c,l]).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin])}}var f=Tu().domain(d._yAxisLabels).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin]).padding(d._yAxisPadding);return{xBarScale:Gu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f}},d._calculateAppropriateBarHeight=function(t,n,i){var e=Fh(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1],u=fi(d._points,(function(t){return t.y}));return o=Math.max(o,u),Math.floor(n*r*(1-i)/(o+r*(1-i)))},d._getDomainMarginsForHorizontalBarChart=function(t){d._domainMargin=8;var n=d._getUniqueYValues();d._yAxisPadding=1===d._yAxisPadding?.99:d._yAxisPadding;var i=d._yAxisPadding/(1-d._yAxisPadding),e=n.length+(n.length-1)*i,r=t-(d.margins.top+8)-(d.margins.bottom+8);if(d._yAxisType!==rs.StringAxis)d._barHeight=d.props.barHeight||d._calculateAppropriateBarHeight(n,r,d._yAxisPadding),d._barHeight=Math.max(d._barHeight,1),d._domainMargin+=d._barHeight/2;else{d._barHeight=d.props.barHeight||r/e;var u=e*d._barHeight;r>=u&&(d._domainMargin=8+(r-u)/2)}return(0,o.Cl)((0,o.Cl)({},d.margins),{top:d.margins.top+d._domainMargin,bottom:d.margins.bottom+d._domainMargin})},d._closeCallout=function(){d.setState({isCalloutVisible:!1})},d._getLegendData=function(t,n){var i=d.props.useSingleColor,e=[],r={};return t.forEach((function(t,n){var e,o,u,a,l=i?d.props.colors?d._createColors()(1):ds(1,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted):t.color;d.props.enableGradient&&(l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||kc(n,0,null===(u=d.props.theme)||void 0===u?void 0:u.isInverted)[0],i&&(l=kc(0,0,null===(a=d.props.theme)||void 0===a?void 0:a.isInverted)[0])),r[t.legend]=l})),Object.entries(r).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){d._handleChartMouseLeave(),d._onLegendHover(n)},onMouseOutAction:function(t){d._onLegendLeave(t)}};e.push(r)})),u.createElement(vf,(0,o.Cl)({legends:e,enabledWrapLines:d.props.enabledLegendsWrapLines,overflowProps:d.props.legendsOverflowProps,focusZonePropsInHoverCard:d.props.focusZonePropsForLegendsInHoverCard,overflowText:d.props.legendsOverflowText},d.props.legendProps,{onChange:d._onLegendSelectionChange.bind(d),ref:d._legendsRef}))},d._isLegendSelected=function(){return d.state.isLegendSelected},d._isLegendHighlighted=function(t){return d._getHighlightedLegend().includes(t)},d._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;d._xMax=Math.max(n[n.length-1],d.props.xMaxValue||0)}},d._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.x,e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,". ")+"".concat(e,".")},d._getChartTitle=function(){var t=d.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Horizontal bar chart with ".concat((null==i?void 0:i.length)||0," bars. ")},d._getOrderedYAxisLabels=function(){return d._yAxisType===rs.StringAxis&&"default"!==d.props.yAxisCategoryOrder?ec(d._mapCategoryToValues(),d.props.yAxisCategoryOrder):(0,o.fX)([],d._points,!0).reverse().map((function(t){return t.y}))},d._mapCategoryToValues=function(){var t={};return d._points.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(n.x)})),t},Lc(d),d.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,isLegendSelected:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)&&n.legendProps.selectedLegends.length>0||void 0!==(null===(e=n.legendProps)||void 0===e?void 0:e.selectedLegend),isLegendHovered:!1,refSelected:null,selectedLegendTitle:null!==(a=null===(r=n.legendProps)||void 0===r?void 0:r.selectedLegend)&&void 0!==a?a:"",xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",selectedLegends:(null===(s=n.legendProps)||void 0===s?void 0:s.selectedLegends)||[]},d._calloutId=p("callout"),d._refArray=[],d._xAxisType=d.props.data&&d.props.data.length>0?Rs(d.props.data[0].x,!0):es.NumericAxis,d._yAxisType=d.props.data&&d.props.data.length>0?Rs(d.props.data[0].y,!1):rs.StringAxis,d._cartesianChartRef=u.createRef(),d._legendsRef=u.createRef(),d._domainMargin=8,d._yAxisPadding=null!==(c=d.props.yAxisPadding)&&void 0!==c?c:.5,d}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;qs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._yAxisLabels=this._getOrderedYAxisLabels(),this._xMax=Math.max(fi(this._points,(function(t){return t.x})),this.props.xMaxValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=ig(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.selectedLegendTitle,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),zs(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(Nv,(0,o.Cl)({},this.props,{yAxisPadding:this._yAxisPadding,chartTitle:this._getChartTitle(),points:this._points,chartType:is.HorizontalBarChartWithAxis,xAxisType:this._xAxisType,yAxisType:this._yAxisType,stringDatasetForYAxisDomain:this._yAxisLabels,calloutProps:i,tickParams:e,legendBars:n,createYAxis:Ms,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:ks,getMinMaxOfYAxis:Hs,barwidth:this._barHeight,focusZoneDirection:uc.vertical,customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getYDomainMargins:this._getDomainMarginsForHorizontalBarChart,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._points=this.props.data||[],this._barHeight=this.props.barHeight||32;var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark]},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._xMax);return Gu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;!1!==this.state.isLegendSelected&&!this._isLegendHighlighted(t.legend)||this._calloutAnchorPoint===t||(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:!0,dataForHoverCard:t.x,selectedLegendTitle:t.legend,color:this.props.useSingleColor||this.props.enableGradient?n:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._createNumericBars=function(t,n,i,e,r,a,l){var s=this,c=this.props.useSingleColor,d=void 0!==c&&c,f=(0,o.fX)([],r,!0);f.sort((function(t,n){var i="number"==typeof t.y?t.y:parseFloat(t.y);return("number"==typeof n.y?n.y:parseFloat(n.y))-i}));var v=0,h=0,g=0,y=r.filter((function(t){return t.x>=s.X_ORIGIN})).length,m=r.length-y,b=0,x=0,w=f.map((function(t,i){var e,r,o,c,f,w,M,C,k=!0;(s.state.isLegendHovered||s.state.isLegendSelected)&&(k=s._isLegendHighlighted(t.legend)),s._classNames=ig(s.props.styles,{theme:s.props.theme,legendColor:s.state.color,shouldHighlight:k}),t.x>=s.X_ORIGIN&&++b,t.x<s.X_ORIGIN&&++x;var A,S=s._isRtl?n-(s.margins.right+Math.max(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN))-s.margins.left):Math.min(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN));if(Math.max(l(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");A=d?s.props.colors?s._createColors()(1):ds(1,0,null===(e=s.props.theme)||void 0===e?void 0:e.isInverted):s.props.colors?s._createColors()(t.x):ds(i,0,null===(r=s.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!d?t.color:A;if(s.props.enableGradient){var D=Math.max(s._points.findIndex((function(n){return n===t})),0);A=(null===(o=t.gradient)||void 0===o?void 0:o[0])||kc(D,0,null===(c=s.props.theme)||void 0===c?void 0:c.isInverted)[0],L=(null===(f=t.gradient)||void 0===f?void 0:f[1])||kc(D,0,null===(w=s.props.theme)||void 0===w?void 0:w.isInverted)[1],d&&(A=kc(0,0,null===(M=s.props.theme)||void 0===M?void 0:M.isInverted)[0],L=kc(0,0,null===(C=s.props.theme)||void 0===C?void 0:C.isInverted)[1]),s._points[D].color=A}var V=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(a(g+s.X_ORIGIN)-a(s.X_ORIGIN));g>s.X_ORIGIN?v+=N:h+=N;var O=Math.abs(a(t.x+s.X_ORIGIN)-a(s.X_ORIGIN)),T=O>2&&(t.x>s.X_ORIGIN&&b!==y||t.x<s.X_ORIGIN&&(0!==y||x>1))?2:0,E=O>2&&(t.x>s.X_ORIGIN&&(0!==m||b>1)||t.x<s.X_ORIGIN&&x!==m)?2:0,F=s.X_ORIGIN;return F=s._isRtl?t.x>s.X_ORIGIN?S-v:S+h:t.x>s.X_ORIGIN?S+v:S-h,g=t.x,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},s.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:V},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{key:t.y,x:F,className:s._classNames.opacityChangeOnHover,y:l(t.y)-s._barHeight/2,"data-is-focusable":k,width:O-(s._isRtl?E:T),height:s._barHeight,ref:function(n){s._refCallback(n,t.legend)},rx:s.props.roundCorners?3:0,onClick:t.onClick,onMouseOver:s._onBarHover.bind(s,t,A),"aria-label":s._getAriaLabel(t),role:"img","aria-labelledby":"toolTip".concat(s._calloutId),onMouseLeave:s._onBarLeave,onFocus:s._onBarFocus.bind(s,t,i,A),onBlur:s._onBarLeave,fill:s.props.enableGradient?"url(#".concat(V,")"):A}))}));return w},n.prototype._getUniqueYValues=function(){var t,n={};return null===(t=this.props.data)||void 0===t||t.forEach((function(t){n[t.y]=t.y})),Object.values(n)},n.prototype._createStringBars=function(t,n,i,e,r,o,a){var l=this,s=this.props.useSingleColor,c=void 0!==s&&s,d=0,f=0,v=0,h=r.filter((function(t){return t.x>=l.X_ORIGIN})).length,g=r.length-h,y=0,m=0,b=r.map((function(t,i){var e,r,s,b,x,w,M,C,k=!0;(l.state.isLegendHovered||l.state.isLegendSelected)&&(k=l._isLegendHighlighted(t.legend)),l._classNames=ig(l.props.styles,{theme:l.props.theme,legendColor:l.state.color,shouldHighlight:k}),t.x>=l.X_ORIGIN&&++y,t.x<l.X_ORIGIN&&++m;var A,S=l._isRtl?n-(l.margins.right+Math.max(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN))-l.margins.left):Math.min(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN));if(Math.max(a(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");A=c?l.props.colors?l._createColors()(1):ds(1,0,null===(e=l.props.theme)||void 0===e?void 0:e.isInverted):l.props.colors?l._createColors()(t.x):ds(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!c?t.color:A;if(l.props.enableGradient){var D=l._points.findIndex((function(n){return n===t}));A=(null===(s=t.gradient)||void 0===s?void 0:s[0])||kc(D,0,null===(b=l.props.theme)||void 0===b?void 0:b.isInverted)[0],L=(null===(x=t.gradient)||void 0===x?void 0:x[1])||kc(D,0,null===(w=l.props.theme)||void 0===w?void 0:w.isInverted)[1],c&&(A=kc(0,0,null===(M=l.props.theme)||void 0===M?void 0:M.isInverted)[0],L=kc(0,0,null===(C=l.props.theme)||void 0===C?void 0:C.isInverted)[1]),l._points[D].color=A}var V=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(o(v+l.X_ORIGIN)-o(l.X_ORIGIN));v>0?d+=N:f+=N;var O=Math.abs(o(t.x+l.X_ORIGIN)-o(l.X_ORIGIN)),T=O>2&&(t.x>l.X_ORIGIN&&y!==h||t.x<l.X_ORIGIN&&(0!==h||m>1))?2:0,E=O>2&&(t.x>l.X_ORIGIN&&(0!==g||y>1)||t.x<l.X_ORIGIN&&m!==g)?2:0;v=t.x;var F=l.X_ORIGIN;return F=l._isRtl?t.x>l.X_ORIGIN?S-d:S+f:t.x>l.X_ORIGIN?S+d:S-f,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:V},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{transform:"translate(0,".concat(.5*(a.bandwidth()-l._barHeight),")"),key:t.x,className:l._classNames.opacityChangeOnHover,x:F,y:a(t.y),rx:l.props.roundCorners?3:0,width:O-(l._isRtl?E:T),height:l._barHeight,"aria-labelledby":"toolTip".concat(l._calloutId),"aria-label":l._getAriaLabel(t),role:"img",ref:function(n){l._refCallback(n,t.legend)},onClick:t.onClick,onMouseOver:l._onBarHover.bind(l,t,A),onMouseLeave:l._onBarLeave,onBlur:l._onBarLeave,"data-is-focusable":k,onFocus:l._onBarFocus.bind(l,t,i,A),fill:l.props.enableGradient?"url(#".concat(V,")"):A}))}));return b},n.prototype._onLegendHover=function(t){this._isLegendSelected()||this.setState({isLegendHovered:!0,selectedLegendTitle:t})},n.prototype._onLegendLeave=function(t){!t&&this._isLegendSelected()||this.setState({isLegendHovered:!1,selectedLegendTitle:"",isLegendSelected:!t&&this._isLegendSelected()})},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.selectedLegendTitle?[this.state.selectedLegendTitle]:[]},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t,selectedLegendTitle:null==i?void 0:i.title}):this.setState({selectedLegends:t.slice(-1),selectedLegendTitle:null==i?void 0:i.title}),this.setState({isLegendSelected:t.length>0}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.defaultProps={yAxisCategoryOrder:"default"},n}(u.Component),rg=(0,r.I)(eg,(function(t){return{opacityChangeOnHover:{opacity:t.shouldHighlight?"":"0.1"},xAxisTicks:[]}}));function og(t){var n=t.availableWidth,i=t.minTextWidth;return{show:n>(void 0===i?24:i)&&n>0,x:t.textX,y:t.textY,value:t.value,culture:t.culture,onMouseOver:t.onMouseOver,onMouseMove:t.onMouseMove,onMouseOut:t.onMouseOut}}var ug=(0,a.Z)(),ag=u.forwardRef((function(t,n){var i,e=t.orientation,r=void 0===e?"vertical":e,a=(0,o.Tt)(t,["orientation"]),s=p("FunnelChartTooltipId_"),c=p("_FunnelChart_empty"),d=(0,l.jI)(),f=u.useState(null),v=f[0],h=f[1],g=u.useState(!1),y=g[0],m=g[1],b=u.useState(null),x=b[0],w=b[1],M=u.useState(null),C=M[0],k=M[1],A=u.useState([]),S=A[0],L=A[1],D=u.useRef(null),V=u.useRef(null),N=W(a.data);function O(t,n){null==n||n.persist(),h(t.stage),w(t),m(!0),k(n.currentTarget)}function T(t,n,i){null==i||i.persist(),h(n.category),w({stage:t,value:n.value,color:n.color,category:n.category}),m(!0),k(i.currentTarget)}function E(){h(null),m(!1),w(null),k(null)}u.useEffect((function(){var t;(null===(t=a.legendProps)||void 0===t?void 0:t.selectedLegends)&&L(a.legendProps.selectedLegends)}),[null===(i=a.legendProps)||void 0===i?void 0:i.selectedLegends]),u.useImperativeHandle(a.componentRef,(function(){return{chartContainer:null!=D?D:null,toImage:function(t){var n;return tf([{container:D.current}],a.hideLegend||null===(n=V.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)}}}),[a.hideLegend]);var F=u.useCallback((function(t,n,i){var e,r;(null===(e=a.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?L(t):L(t.slice(-1)),(null===(r=a.legendProps)||void 0===r?void 0:r.onChange)&&a.legendProps.onChange(t,n,i)}),[a.legendProps]);function B(){return S.length>0?S:v?[v]:[]}function P(t){return B().includes(t)}function _(){return 0===B().length}function H(t,n){return"subValue"in t?{culture:a.culture,onMouseOver:1===n?function(n){return T(t.stage,t.subValue,n)}:void 0,onMouseMove:1===n?function(n){return T(t.stage,t.subValue,n)}:void 0,onFocus:function(n){return i=t.stage,e=t.subValue,null==(r=n)||r.persist(),w({stage:i,value:e.value,color:e.color,category:e.category}),m(!0),void k(r.currentTarget);var i,e,r},onBlur:function(){return E()},onMouseOut:function(){return E()}}:{culture:a.culture,onMouseOver:1===n?function(n){return O(t,n)}:void 0,onMouseMove:1===n?function(n){return O(t,n)}:void 0,onFocus:function(n){return function(t,n){null==n||n.persist(),w(t),m(!0),k(n.currentTarget)}(t,n)},onBlur:function(){return E()},onMouseOut:function(){return E()}}}function I(t){var n=t.key,i=t.pathD,e=t.fill,r=t.opacity,l=t.textProps,s=t.data,c=t.isFocusable,f=H(s,r),v=rc(e,a.theme);return u.createElement("g",{key:n},u.createElement("path",(0,o.Cl)({d:i,fill:e,opacity:r},f,{"data-is-focusable":c})),l&&u.createElement("g",(0,o.Cl)({},f),function(t){var n=t.show,i=t.x,e=t.y,r=t.value,o=t.textColor;if(!n)return null;var l=u.createElement("text",{x:d?X-i:i,y:e,textAnchor:"middle",alignmentBaseline:"middle",fill:o},(0,Yn.c$)(r.toString(),a.culture));return d?u.createElement("g",{transform:"scale(-1,1) translate(".concat(-X,",0)")},l):l}((0,o.Cl)((0,o.Cl)({},l),{textColor:v}))))}function W(t){return Array.isArray(t)&&t.every((function(t){return Array.isArray(t.subValues)}))}function R(t,n,i,e,u){var l=u.stages.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{subValues:t.subValues||[]})})),s="vertical"===r?function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight/o.length,c=o[e],d=o[e+1]||{subValues:[]},f=u[e]||1,v=u[e+1]||0,h=0,p=0,g=function(t){var i=c.subValues[t],e=null===(n=d.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;h+=r/f*(f/a)*l,p+=(o/v||0)*(v/a)*l},y=0;y<r;y++)g(y);var m,b=c.subValues[r],x=null===(i=d.subValues)||void 0===i?void 0:i.find((function(t){return t.category===b.category})),w=b.value,M=x?x.value:0,C=w/f*(f/a)*l,k=(M/v||0)*(v/a)*l,A=(l-f/a*l)/2+h,S=A+C,L=(l-v/a*l)/2+p,D=L+k,V=(A+S+L+D)/4,N=e===o.length-1,O=N?e*s+.33*s:(e+.5)*s;return m=N?C*(1-(O-e*s)/s):Math.min(C,k),{pathD:"M".concat(A,",").concat(e*s,"\n L").concat(S,",").concat(e*s,"\n L").concat(D,",").concat((e+1)*s,"\n L").concat(L,",").concat((e+1)*s,"\n Z"),textX:V,textY:O,availableWidth:m}}((0,o.Cl)((0,o.Cl)({},u),{stages:l,i:i,k:e})):function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight,c=l/o.length,d=o[e],f=o[e+1]||{subValues:[]},v=u[e]||1,h=u[e+1]||0,p=0,g=0,y=function(t){var i=d.subValues[t],e=null===(n=f.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;p+=r/v*(v/a)*s,g+=(o/h||0)*(h/a)*s},m=0;m<r;m++)y(m);var b,x,w,M=d.subValues[r],C=null===(i=f.subValues)||void 0===i?void 0:i.find((function(t){return t.category===M.category})),k=M.value,A=C?C.value:0,S=k/v*(v/a)*s,L=(A/h||0)*(h/a)*s,D=e*c,V=(e+1)*c,N=(s-v/a*s)/2+p,O=N+S,T=(s-h/a*s)/2+g,E=T+L;return e===o.length-1?(b=D+.25*(V-D),x=(N+O)/2,w=.5*(V-D)*.8,(S<24||S*c/2<600)&&(w=0)):(b=(D+V)/2,x=(N+O+T+E)/4,w=.9*Math.abs(V-D),(S+L)/2<20&&(w=0)),{pathD:"M".concat(D,",").concat(N,"\n L").concat(V,",").concat(T,"\n L").concat(V,",").concat(E,"\n L").concat(D,",").concat(O,"\n Z"),textX:b,textY:x,availableWidth:w}}((0,o.Cl)((0,o.Cl)({},u),{stages:l,i:i,k:e})),c=H({stage:t.stage,subValue:n}),d=og((0,o.Cl)({availableWidth:s.availableWidth,minTextWidth:16,textX:s.textX,textY:s.textY,value:n.value},c));return I({key:"".concat(i,"-").concat(e),pathD:s.pathD,fill:n.color,opacity:W(a.data)&&P(n.category)||_()?1:.1,textProps:d,data:{stage:t.stage,subValue:n},isFocusable:!!(W(a.data)&&P(n.category)||_())})}var j=(0,o.Cl)({isCalloutVisible:y,directionalHint:3,id:"toolTip".concat(s),target:C,color:null==x?void 0:x.color,XValue:null==x?void 0:x.stage,YValue:null==x?void 0:x.value,isBeakVisible:!1,gapSpace:15,onDismiss:function(){m(!1)},preventDismissOnLostFocus:!0},a.calloutProps),z=a.width||350,$=a.height||500,Y=ug(a.styles,{theme:a.theme,className:a.className,chartWidth:z,chartHeight:$}),X=.8*z,G=(z-X)/2;return a.data&&a.data.length>0?u.createElement("div",{ref:D,className:Y.root},u.createElement(Uc,{direction:uc.horizontal},u.createElement("svg",{width:z,height:$,className:Y.chart,role:"img","aria-label":a.chartTitle},u.createElement("g",{transform:d?"translate(".concat(G+X,", ").concat(40,") scale(-1,1)"):"translate(".concat(G,", ").concat(40,")")},N?function(t,n){for(var i,e,r=a.data,o=r.map((function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.subValues)||void 0===n?void 0:n.reduce((function(t,n){return t+n.value}),0))&&void 0!==i?i:0})),u=[],l={stages:r,totals:o,maxTotal:Math.max.apply(Math,o),funnelWidth:n,funnelHeight:.8*t,isRTL:d},s=0;s<r.length;s++)for(var c=r[s],f=0;f<(null!==(i=c.subValues)&&void 0!==i?i:[]).length;f++){var v=null===(e=c.subValues)||void 0===e?void 0:e[f];v&&u.push(R(c,v,s,f,l))}return u}($-40,X):function(t,n){var i=a.data,e=n,u=.8*t;return i.map((function(t,n){var a="vertical"===r?function(t){var n=t.d,i=t.i,e=t.data,r=t.funnelWidth,o=t.isRTL,u=t.funnelHeight/e.length,a=function(t){return t/Math.max.apply(Math,e.map((function(t){return t.value})))*r},l=a(n.value),s=i<e.length-1?a(e[i+1].value):0,c=(r-l)/2,d=(r-s)/2,f=o?r-c:c,v=o?r-d:d,h=i===e.length-1,p=h?i*u+.33*u:i*u+u/2,g=r/2,y=l;if(h){var m=l*(1-(p-i*u)/u);y=Math.max(.8*m,0)}else y=.9*Math.min(l,s);return{pathD:"M".concat(f,",").concat(i*u,"\n L").concat(r-f,",").concat(i*u,"\n L").concat(r-v,",").concat((i+1)*u,"\n L").concat(v,",").concat((i+1)*u,"\n Z"),textX:g,textY:p,availableWidth:y}}({d:t,i:n,data:i,funnelWidth:e,funnelHeight:u,isRTL:d}):function(t){var n,i,e=t.d,r=t.i,o=t.data,u=t.funnelHeight,a=t.funnelWidth/o.length,l=function(t){return t/Math.max.apply(Math,o.map((function(t){return t.value})))*u},s=l(e.value),c=r<o.length-1?l(o[r+1].value):0,d=(u-s)/2,f=(u-c)/2,v=r*a,h=(r+1)*a,p=.8*a;return r===o.length-1?(n=v+.25*(h-v),i=u/2,p=s<40||s*a/2<800?0:.75*(h-v)*.6):(n=(v+h)/2,i=u/2,p=Math.min(s,c)>20?.8*a:0),{pathD:"M".concat(v,",").concat(d,"\n L").concat(h,",").concat(f,"\n L").concat(h,",").concat(u-f,"\n L").concat(v,",").concat(u-d,"\n Z"),textX:n,textY:i,availableWidth:p}}({d:t,i:n,data:i,funnelWidth:e,funnelHeight:u,isRTL:d}),l=a.pathD,s=a.textX,c=a.textY,f=a.availableWidth,v=H(t),h=og((0,o.Cl)({availableWidth:f,minTextWidth:16,textX:s,textY:c,value:t.value},v));return I({key:n,pathD:l,fill:t.color,opacity:P(t.stage)||_()?1:.1,textProps:h,data:t,isFocusable:!(!P(t.stage)&&!_())})}))}($-40,X)),y&&u.createElement($n,(0,o.Cl)({},j),u.createElement(yc.ChartHoverCard,{XValue:null==j?void 0:j.XValue,YValue:null==j?void 0:j.YValue,color:null==j?void 0:j.color})))),function(){if(a.hideLegend)return u.createElement(u.Fragment,null);var t;if(N){var n={};a.data.forEach((function(t){(t.subValues||[]).forEach((function(t){t.category in n||(n[t.category]=t.color)}))})),t=Object.entries(n).map((function(t){var n=t[0],i=t[1];return{title:n,color:i,hoverAction:function(){return h(n)},onMouseOutAction:function(){return h(null)}}}))}else t=a.data.map((function(t){return{title:t.stage,color:t.color,hoverAction:function(){return h(t.stage)},onMouseOutAction:function(){return h(null)}}}));return u.createElement("div",{style:{display:"flex",justifyContent:"center"}},u.createElement(vf,(0,o.Cl)({ref:V,legends:t,centerLegends:!0,onChange:F},a.legendProps)))}()):u.createElement("div",{id:c,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));ag.displayName="FunnelChart";var lg,sg,cg=(0,r.I)(ag,(function(t){var n=t.theme,i=t.className,e=t.chartWidth,r=t.chartHeight;return{root:[n.fonts.medium,"ms-FunnelChart",{alignItems:"center",width:"100%",height:"100%"},i],chart:{display:"block",width:e,height:r},text:[n.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary}],subComponentStyles:{calloutStyles:{root:{maxWidth:"238px"}}}}}));!function(t){t.Percentage="percentage",t.Fraction="fraction"}(lg||(lg={})),function(t){t.SingleSegment="single-segment",t.MultipleSegments="multiple-segments"}(sg||(sg={}));var dg=[{minRadius:52,arcWidth:12,fontSize:20},{minRadius:70,arcWidth:16,fontSize:24},{minRadius:88,arcWidth:20,fontSize:32},{minRadius:106,arcWidth:24,fontSize:32},{minRadius:124,arcWidth:28,fontSize:40},{minRadius:142,arcWidth:32,fontSize:40}],fg=(0,a.Z)(),vg=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0===n&&e===sg.SingleSegment?"".concat(t.legend,", ").concat(t.size," out of ").concat(i," or ").concat((t.size/i*100).toFixed(),"%"):"".concat(t.legend,", ").concat(t.start," to ").concat(t.end):0===n&&e===sg.SingleSegment?"".concat(t.size," (").concat((t.size/i*100).toFixed(),"%)"):"".concat(t.start," - ").concat(t.end)},hg=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0!==n?t.toString():e===lg.Fraction?"".concat((t/i*100).toFixed(),"%"):"".concat(t,"/").concat(i):"function"==typeof e?e([t-n,i-n]):0!==n?t.toString():e===lg.Fraction?"".concat(t,"/").concat(i):"".concat((t/i*100).toFixed(),"%")},pg=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return tf([{container:e._rootElem}],e.props.hideLegend||null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,e._isRTL,t)},e._getMargins=function(){var t=e.props,n=t.hideMinMax;return{left:16+(n?0:40),right:16+(n?0:40),top:16+(t.chartTitle?27:2),bottom:16+(t.sublabel?20:0)}},e._getStylesBasedOnBreakpoint=function(){for(var t=dg.length-1;t>=0;t-=1)if(e._outerRadius>=dg[t].minRadius)return{arcWidth:dg[t].arcWidth,chartValueSize:dg[t].fontSize};return{arcWidth:dg[0].arcWidth,chartValueSize:dg[0].fontSize}},e._processProps=function(){var t=e.props,n=t.minValue,i=void 0===n?0:n,r=t.maxValue,o=t.theme,u=i,a=e.props.segments.map((function(t,n){var i,e=Math.max(t.size,0);return u+=e,{legend:t.legend,size:e,color:void 0!==t.color?fs(t.color,o.isInverted):ds(n,0,o.isInverted),gradient:null!==(i=t.gradient)&&void 0!==i?i:kc(n,0,o.isInverted),accessibilityData:t.accessibilityData,start:u-e,end:u}}));void 0!==r&&u<r&&(a.push({legend:"Unknown",size:r-u,color:o.palette.neutralLight,start:u,end:r}),u=r);var l=$f().cornerRadius(e.props.roundCorners?3:0).padAngle(2/e._outerRadius).padRadius(e._outerRadius),s=e._isRTL?Array.from(a).reverse():a,c=-Math.PI/2,d=s.map((function(t,n){var r=c+t.size/(u-i)*Math.PI,o=l({innerRadius:e._innerRadius,outerRadius:e._outerRadius,startAngle:c,endAngle:r});return c=r,{d:o,segmentIndex:e._isRTL?a.length-1-n:n,startAngle:c-t.size/(u-i)*Math.PI,endAngle:r}}));return e._minValue=i,e._maxValue=u,e._segments=a,{arcs:d}},e._renderNeedle=function(){var t=function(t,n,i){var e=(t-n)/(i-n)*180;return e<0?e=0:e>180&&(e=180),e}(e.props.chartValue,e._minValue,e._maxValue),n=e._isRTL?180-t:t,i=e._outerRadius-e._innerRadius+4;return u.createElement("g",{transform:"rotate(".concat(n,", 0, 0)")},u.createElement("path",{d:"\n M 0,".concat(-4,"\n L ").concat(-i,",").concat(-2,"\n A ").concat(2,",").concat(2,",0,0,0,").concat(-i,",").concat(2,"\n L 0,").concat(4,"\n A ").concat(4,",").concat(4,",0,0,0,0,").concat(-4,"\n "),strokeWidth:2,className:e._classNames.needle,transform:"translate(".concat(2-e._innerRadius,")"),"data-is-focusable":!0,onFocus:function(t){return e._handleFocus(t,"Needle")},onBlur:e._handleBlur,onMouseEnter:function(t){return e._handleMouseOver(t,"Needle")},onMouseMove:function(t){return e._handleMouseOver(t,"Needle")},role:"img","aria-label":"Current value: "+hg(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat)}))},e._renderLegends=function(){if(e.props.hideLegend)return null;var t=e._segments.map((function(t,n){var i,r=e.props.enableGradient?(null===(i=t.gradient)||void 0===i?void 0:i[0])||kc(n,0,e.props.theme.isInverted)[0]:t.color||ds(n,0,e.props.theme.isInverted);return{title:t.legend,color:r,hoverAction:function(){e.setState({hoveredLegend:t.legend})},onMouseOutAction:function(){e.setState({hoveredLegend:""})}}}));return u.createElement("div",{className:e._classNames.legendsContainer},u.createElement(vf,(0,o.Cl)({legends:t,centerLegends:!0},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef})))},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._handleFocus=function(t,n){e._showCallout(t.target,n,!0)},e._handleBlur=function(){e._hideCallout(!0)},e._handleMouseOver=function(t,n){e._showCallout(t.target,n,!1)},e._handleMouseOut=function(){e._hideCallout(!1)},e._handleCalloutDismiss=function(){e._hideCallout(!1)},e._showCallout=function(t,n,i){if(e._calloutAnchor!==n){e._calloutAnchor=n;var r="Current value is "+hg(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat,!0),u=e._segments.map((function(t){var n;return{legend:t.legend,y:vg(t,e._minValue,e._maxValue,e.props.variant),color:e.props.enableGradient?null===(n=t.gradient)||void 0===n?void 0:n[0]:t.color}}));e.setState((0,o.Cl)({calloutTarget:t,isCalloutVisible:["Needle","Chart value"].includes(n)||e._noLegendHighlighted()||e._legendHighlighted(n),hoverXValue:r,hoverYValues:u},i?{focusedElement:n}:{}))}},e._hideCallout=function(t){e._calloutAnchor="",e.setState((0,o.Cl)({calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[]},t?{focusedElement:""}:{}))},e._wrapContent=function(t,n,i){var e=sl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},e._multiValueCallout=function(t){var n=e._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:e._classNames.calloutContentRoot},u.createElement("div",{className:e._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:e._classNames.calloutContentX},zs(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,e.props.culture))),u.createElement("div",{className:e._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,r){var a=i+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},zs(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),e._getCalloutContent(t,i,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:e._classNames.descriptionMessage},t.descriptionMessage)))},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Gauge chart with ".concat(e._segments.length," segments. ")},Lc(e),e._margins=e._getMargins(),e._legendsHeight=n.hideLegend?0:24,e.state={hoveredLegend:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],focusedElement:"",calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[],width:140+e._margins.left+e._margins.right,height:70+e._margins.top+e._margins.bottom+e._legendsHeight},e._isRTL=(0,l.jI)(n.theme),e._calloutAnchor="",e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._rootElem&&this.setState({width:this._rootElem.clientWidth,height:this._rootElem.clientHeight})},n.prototype.componentDidUpdate=function(t){var n,i,e;qs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._margins=this._getMargins(),this._legendsHeight=this.props.hideLegend?0:24;var n=this.props.width||this.state.width,i=this.props.height||this.state.height;this._outerRadius=Math.min((n-(this._margins.left+this._margins.right))/2,i-(this._margins.top+this._margins.bottom+this._legendsHeight));var e=this._getStylesBasedOnBreakpoint(),r=e.arcWidth,a=e.chartValueSize;this._innerRadius=this._outerRadius-r;var l=this._processProps().arcs;return this._classNames=fg(this.props.styles,{theme:this.props.theme,className:this.props.className,chartValueSize:a}),u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n}},u.createElement(Uc,{direction:uc.horizontal,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,role:"region","aria-label":this._getChartTitle(),onMouseLeave:this._handleMouseOut,width:n,height:i-this._legendsHeight},u.createElement("g",{transform:"translate(".concat(n/2,", ").concat(i-(this._margins.bottom+this._legendsHeight),")")},this.props.chartTitle&&u.createElement("text",{x:0,y:-(this._outerRadius+11),textAnchor:"middle",className:this._classNames.chartTitle,"aria-hidden":!0},this.props.chartTitle),!this.props.hideMinMax&&u.createElement(u.Fragment,null,u.createElement("text",{x:(this._isRTL?1:-1)*(this._outerRadius+4),y:0,textAnchor:"end",className:this._classNames.limits,role:"img","aria-label":"Min value: ".concat(this._minValue)},$s(this._minValue)),u.createElement("text",{x:(this._isRTL?-1:1)*(this._outerRadius+4),y:0,textAnchor:"start",className:this._classNames.limits,role:"img","aria-label":"Max value: ".concat(this._maxValue)},$s(this._maxValue))),l.map((function(n,i){var e,r,a=t._segments[n.segmentIndex],l=p("Arc_clip")+"".concat(i,"_").concat(n.startAngle,"_").concat(n.endAngle),s=fg(t.props.styles,{theme:t.props.theme,solidFill:t.props.enableGradient?"transparent":a.color,gradientFill:"conic-gradient(\n from ".concat(n.startAngle,"rad at 50% 100%,\n ").concat(null===(e=a.gradient)||void 0===e?void 0:e[0],",\n ").concat(null===(r=a.gradient)||void 0===r?void 0:r[1]," ").concat(n.endAngle-n.startAngle,"rad\n )"),opacity:t._legendHighlighted(a.legend)||t._noLegendHighlighted()?1:.1});return u.createElement(u.Fragment,{key:i},u.createElement("path",(0,o.Cl)({d:n.d,strokeWidth:t.state.focusedElement===a.legend?2:0,className:s.segment},zs((0,o.Cl)({ariaLabel:vg(a,t._minValue,t._maxValue,t.props.variant,!0)},a.accessibilityData),"img",!0),{onFocus:function(n){return t._handleFocus(n,a.legend)},onBlur:t._handleBlur,onMouseEnter:function(n){return t._handleMouseOver(n,a.legend)},onMouseMove:function(n){return t._handleMouseOver(n,a.legend)},"data-is-focusable":t._legendHighlighted(a.legend)||t._noLegendHighlighted()})),t.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:l},u.createElement("path",{d:n.d})),u.createElement("foreignObject",{x:"-50%",y:"-100%",width:"100%",height:"100%",clipPath:"url(#".concat(l,")")},u.createElement("div",{className:s.gradientSegment}))))})),this._renderNeedle(),u.createElement("g",{onMouseEnter:function(n){return t._handleMouseOver(n,"Chart value")},onMouseMove:function(n){return t._handleMouseOver(n,"Chart value")}},u.createElement(dv,{content:hg(this.props.chartValue,this._minValue,this._maxValue,this.props.chartValueFormat),textProps:{x:0,y:0,textAnchor:"middle",className:this._classNames.chartValue,"aria-hidden":"true"},maxWidth:2*this._innerRadius-24,wrapContent:this._wrapContent})),this.props.sublabel&&u.createElement(dv,{content:this.props.sublabel,textProps:{x:0,y:4,textAnchor:"middle",dominantBaseline:"hanging",className:this._classNames.sublabel},maxWidth:2*this._innerRadius,wrapContent:this._wrapContent})))),this._renderLegends(),!this.props.hideTooltip&&this.state.isCalloutVisible&&u.createElement($n,(0,o.Cl)({target:this.state.calloutTarget,directionalHint:3,gapSpace:15,isBeakVisible:!1,onDismiss:this._handleCalloutDismiss},this.props.calloutProps),this._multiValueCallout({hoverXValue:this.state.hoverXValue,YValueHover:this.state.hoverYValues})))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.hoveredLegend?[this.state.hoveredLegend]:[]},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r=e?{}:{marginRight:"16px"},o=void 0!==t.index&&-1!==t.index,a=fg(this.props.styles,{theme:this.props.theme,lineColor:t.color,toDrawShape:o}),l=this.props.culture,s=(0,Yn.c$)(t.y,l);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var c=t.yAxisCalloutData;return u.createElement("div",{style:r},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),Object.keys(c).map((function(t){return u.createElement("div",{key:t,className:a.calloutBlockContainer},u.createElement("div",{className:a.calloutlegendText}," ",(0,Yn.c$)(t,l)),u.createElement("div",{className:a.calloutContentY},(0,Yn.c$)(c[t],l)))})))}return u.createElement("div",{style:i?r:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:a.calloutBlockContainer},o&&u.createElement(Jd,{svgProps:{className:a.shapeStyles},pathProps:{fill:t.color},shape:Is[t.index%Object.keys(js).length]}),u.createElement("div",null,u.createElement("div",{className:a.calloutlegendText}," ",t.legend),u.createElement("div",{className:a.calloutContentY},(0,Yn.c$)(t.yAxisCalloutData?t.yAxisCalloutData:t.y||t.data,l)))))},n}(u.Component),gg=(0,r.I)(pg,(function(t){var n,i,e,r,u,a,l,s,c=t.theme,d=t.chartValueSize,f=t.className,v=t.lineColor,h=t.toDrawShape,p=t.solidFill,g=t.gradientFill,y=t.opacity;return{root:[c.fonts.medium,"ms-GaugeChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},f],chart:{display:"block"},limits:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartValue:{fontSize:d,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(i={},i[It.up]={fill:"CanvasText"},i)},sublabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(e={},e[It.up]={fill:"CanvasText"},e)},needle:{fill:c.palette.black,stroke:c.semanticColors.bodyBackground},chartTitle:{fontSize:It.s.small,fill:c.palette.neutralPrimary,selectors:(r={},r[It.up]={fill:"CanvasText"},r)},segment:{outline:"none",stroke:c.semanticColors.focusBorder,fill:p,fillOpacity:y},gradientSegment:{width:"100%",height:"100%",background:g,opacity:y},legendsContainer:{width:"100%"},calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:c.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",opacity:"0.85",color:c.semanticColors.bodySubtext})],calloutBlockContainer:[c.fonts.mediumPlus,{marginTop:"13px",color:c.semanticColors.bodyText},!h&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(v),paddingLeft:"8px"},h&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:c.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},c.fonts.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[c.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:c.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(c.semanticColors.menuDivider)}]}})),yg=i(927),mg=u.createContext(void 0),bg=function(){var t=u.useContext(mg),n=(0,yg.m)(["theme"]).theme;return t||n||(0,pn.a)({})},xg=function(t){var n=t.annotations,i=t.chartTitle,e=t.description,r=t.width,o=t.height,a=t.paperBackgroundColor,s=t.plotBackgroundColor,c=t.fontColor,d=t.fontFamily,f=t.margin,v=t.componentRef,h=bg(),p=u.useRef(null),g=u.useRef(null),y=u.useState(null!=r?r:0),m=y[0],b=y[1],x=u.useState(null!=o?o:650),w=x[0],M=x[1];u.useEffect((function(){if("number"==typeof r&&r>0)b(r);else{var t=p.current;if(t&&"undefined"!=typeof ResizeObserver){var n=new ResizeObserver((function(t){var n=t[0];if(n){var i=n.contentRect.width;i>0&&Math.abs(i-m)>.5&&b(i)}})),i=t.getBoundingClientRect();return i.width>0&&b(i.width),n.observe(t),function(){return n.disconnect()}}var e=null==t?void 0:t.getBoundingClientRect();e&&e.width>0?b(e.width):b((function(t){return t>0?t:400}))}}),[r,m]);var C=Math.max(m||400,1),k=Math.max(null!=o?o:650,1);u.useEffect((function(){var t=g.current;if(t){if("undefined"!=typeof ResizeObserver){var n=new ResizeObserver((function(t){var n=t[0];if(n){var i=n.contentRect.height;i>0&&M((function(t){return Math.abs(t-i)>.5?i:t}))}})),i=t.getBoundingClientRect();return M((function(t){return i.height>0?i.height:t>0?t:k})),n.observe(t),function(){return n.disconnect()}}var e=t.getBoundingClientRect();M((function(t){return e.height>0?e.height:t>0?t:k}))}else M((function(t){return t>0?t:k}))}),[k,C,n,i,e,f,s,a,c,d,h]);var A=Math.max(Math.ceil(w||0),k),S={plotRect:{x:0,y:0,width:C,height:k},svgRect:{width:C,height:k},isRtl:null==h?void 0:h.rtl},L=function(t){var n,i,e,r;if(t){var o=null!==(n=t.t)&&void 0!==n?n:0,u=null!==(i=t.r)&&void 0!==i?i:0,a=null!==(e=t.b)&&void 0!==e?e:0,l=null!==(r=t.l)&&void 0!==r?r:0;if(0!==o||0!==u||0!==a||0!==l)return"".concat(o,"px ").concat(u,"px ").concat(a,"px ").concat(l,"px")}}(f),D=u.useMemo((function(){return(0,It.Zq)({position:"relative",width:r?"".concat(r,"px"):"100%",minHeight:k,backgroundColor:null!=a?a:h.semanticColors.bodyBackground,color:null!=c?c:h.semanticColors.bodyText,fontFamily:null!=d?d:h.fonts.medium.fontFamily,padding:L,display:"flex",flexDirection:"column",rowGap:"8px"})}),[c,d,a,L,k,h,r]),V=u.useMemo((function(){var t;return(0,It.Zq)({position:"relative",flexGrow:1,backgroundColor:null!=s?s:"transparent",borderRadius:null!==(t=h.effects.roundedCorner2)&&void 0!==t?t:4,boxSizing:"border-box"})}),[s,h.effects.roundedCorner2]),N=u.useMemo((function(){return(0,It.Zq)({textAlign:"center"})}),[]),O=null!=n?n:[],T=O.length>0,E=T?null!=e?e:i:void 0;return u.useImperativeHandle(v,(function(){return{chartContainer:p.current,toImage:function(t){return tf([{container:p.current}],void 0,(0,l.jI)(),t)}}}),[]),u.createElement("div",{ref:p,"data-chart-annotation-container":"true"},u.createElement("svg",{width:C,height:A,viewBox:"0 0 ".concat(C," ").concat(A),style:{width:r?"".concat(r,"px"):"100%",height:"".concat(A,"px"),display:"block"},role:E?"img":void 0,"aria-label":E},u.createElement("foreignObject",{x:0,y:0,width:C,height:A},u.createElement("div",{ref:g,className:D,"data-chart-annotation-only":"true","aria-label":E},i&&u.createElement("span",{className:N,"aria-hidden":"true"},i),u.createElement("div",{className:V,role:"presentation"},T?u.createElement(Av,{annotations:O,context:S,theme:h}):null)))))};xg.displayName="AnnotationOnlyChart";var wg=Array.prototype,Mg=wg.slice;function Cg(t){return()=>t}function kg(t){return t}function Ag(t){return Math.max(1,Math.ceil(Math.log(function(t){let n=0;for(let i of t)null!=i&&(i=+i)>=i&&++n;return n}(t))/Math.LN2)+1)}function Sg(t,n,i){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-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Lg(t,n){this._context=t,this._k=(1-n)/6}wg.map,Lg.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:Sg(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Sg(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Dg=function t(n){function i(t){return new Lg(t,n)}return i.tension=function(n){return t(+n)},i}(0),Vg=["#636efa","#ef553b","#00cc96","#ab63fa","#ffa15a","#19d3f3","#ff6692","#b6e880","#ff97ff","#fecb52"],Ng=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Og=[os.color1,os.warning,os.color8,os.color4,os.color7,os.color6,os.color2,os.color5,os.color9,os.color10],Tg=[os.color26,os.warning,os.color5,os.error,os.color4,os.color17,os.color22,os.disabled,os.color10,os.color3];function Eg(t,n){if(void 0===n&&(n=!1),!t||!Rl(t))return"others";var i=t.map((function(t){return t.toLowerCase()}));return n&&qs(i,Tg)?"d3":qs(i,Vg)?"plotly":"others"}function Fg(t,n,i,e){if("plotly"!==n)return t;var r=Vg,o=Og;e&&(r="plotly"===n?Vg:Ng,o="plotly"===n?Og:Tg);var u=r.indexOf(t.toLowerCase());return-1!==u?fs(o[u],!!i):t}var Bg=function(t,n,i,e,r){if(!n.current.has(t)){var o,u=r?"plotly"===i?Og:Tg:Og;return o=n.current.size<u.length?fs(u[n.current.size],e):ds(n.current.size,0,e),n.current.set(t,o),o}return n.current.get(t)},Pg=function(t,n,i,e,r,o){return"default"===n&&i?function(t,n,i,e,r){var o=[];if(n){var u=Eg(t,r);if(Rl(n))n.forEach((function(t,n){var a=null==t?void 0:t.toString().trim(),l=Bg("Label_".concat(n),i,u,e,r);if(a){var s=Eo(a);o.push(s?Fg(s.formatHex(),u,e):l)}else o.push(l)}));else if("string"==typeof n){var a=Eo(n);return a?Fg(a.formatHex(),u,e):Bg("Label_0",i,u,e,r)}return o}}(t,i,e,r,o):void 0},_g=function(t,n,i,e,r,o,u){var a=Eg(r,u);return t&&Rl(t)&&t.length>0?t[n%t.length]:"string"==typeof t?t:Bg(i,e,a,o,u)},Hg=function(t,n){var i,e,r,o,u,a;return(null===(i=t.marker)||void 0===i?void 0:i.opacity)?Rl(null===(e=t.marker)||void 0===e?void 0:e.opacity)?(null===(r=t.marker)||void 0===r?void 0:r.opacity)[n%(null===(o=t.marker)||void 0===o?void 0:o.opacity).length]:null===(u=t.marker)||void 0===u?void 0:u.opacity:null!==(a=t.opacity)&&void 0!==a?a:1},Ig=function(t,n,i){var e,r,o,u,a,l,s,c,d,f,v,h;if((null===(r=null===(e=null==t?void 0:t.coloraxis)||void 0===e?void 0:e.colorscale)||void 0===r?void 0:r.length)&&Rl(null===(o=n.marker)||void 0===o?void 0:o.color)&&(null===(u=n.marker)||void 0===u?void 0:u.color).length>0&&"number"==typeof(null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[0])){var p=null===(s=null==t?void 0:t.coloraxis)||void 0===s?void 0:s.colorscale,g=null===(c=n.marker)||void 0===c?void 0:c.color,y=[null!==(f=null===(d=null==t?void 0:t.coloraxis)||void 0===d?void 0:d.cmin)&&void 0!==f?f:Math.min.apply(Math,g),null!==(h=null===(v=null==t?void 0:t.coloraxis)||void 0===v?void 0:v.cmax)&&void 0!==h?h:Math.max.apply(Math,g)],m=y[0],b=y[1],x=p.map((function(t){var n=t[0];return m+n*(b-m)})),w=p.map((function(t){return t[1]}));return Gu().domain(x).range(w)}return i},Wg="nonplot_",Rg="repeat(1, 1fr)",jg={dot:{strokeDasharray:"1, 5",strokeLinecap:"round",strokeWidth:"2",lineBorderWidth:"4"},dash:{strokeDasharray:"5, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdash:{strokeDasharray:"10, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},dashdot:{strokeDasharray:"5, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdashdot:{strokeDasharray:"10, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},solid:{strokeDasharray:"0",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"}};function zg(t){var n,i,e,r,o,u,a,l,s,c,d,f;return{chartTitle:"string"==typeof(null==t?void 0:t.title)?t.title:null!==(i=null===(n=null==t?void 0:t.title)||void 0===n?void 0:n.text)&&void 0!==i?i:"",xAxisTitle:"string"==typeof(null===(e=null==t?void 0:t.xaxis)||void 0===e?void 0:e.title)?null===(r=null==t?void 0:t.xaxis)||void 0===r?void 0:r.title:null!==(a=null===(u=null===(o=null==t?void 0:t.xaxis)||void 0===o?void 0:o.title)||void 0===u?void 0:u.text)&&void 0!==a?a:"",yAxisTitle:"string"==typeof(null===(l=null==t?void 0:t.yaxis)||void 0===l?void 0:l.title)?null===(s=null==t?void 0:t.yaxis)||void 0===s?void 0:s.title:null!==(f=null===(d=null===(c=null==t?void 0:t.yaxis)||void 0===c?void 0:c.title)||void 0===d?void 0:d.text)&&void 0!==f?f:""}}var $g=function(t,n){var i=Ug(t,n);return(null==i?void 0:i.tickformat)?{tickFormat:null==i?void 0:i.tickformat}:{}},Yg=function(t,n){var i=Gg(t,n);return(null==i?void 0:i.tickformat)?{yAxisTickFormat:zu(null==i?void 0:i.tickformat)}:{}},Xg=function(t,n){var i,e=null===(i=Gg(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{yMinValue:e[0],yMaxValue:e[1]}:{}},Gg=function(t,n){return null==n?void 0:n.yaxis},Ug=function(t,n){return null==n?void 0:n.xaxis},qg=function(t,n){return"function"==typeof(null==n?void 0:n.yAxisTickFormat)&&"number"==typeof t?n.yAxisTickFormat(t):(0,Yn.c$)(t)},Zg=function(t){var n=(new Date).getFullYear();if(t.length>0&&Array.isArray(t[0]))throw new Error("updateXValues:: 2D array not supported");for(var i=t.map((function(t){var i="".concat(t," 01, ").concat(n);return Ol(i)?new Date(i):null})),e=i.map((function(t,n){return[t,n]})).filter((function(t){return null!==t[0]})),r=e.length-1;r>0;r--){var o=e[r][0],u=e[r-1][0],a=o.getMonth(),l=u.getMonth(),s=o.getFullYear(),c=u.getFullYear();l>=a?e[r-1][0].setFullYear(s-1):c>s&&e[r-1][0].setFullYear(s),i[e[r-1][1]]=e[r-1][0]}return t.map((function(t,n){return null===i[n]?null:"".concat(t," 01, ").concat(i[n].getFullYear())}))},Kg=function(t,n){var i,e;return"y2"===t.yaxis&&("x"===(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.anchor)||"right"===(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.side))},Jg=function(t,n){var i,e,r,o,u,a,l=!1,s=!0;return t.forEach((function(t){if(Kg(t,n)){l=!0;var i=t.y;i&&(u=Math.min.apply(Math,i),a=Math.max.apply(Math,i)),("scatter"!==t.type||Kl(t))&&(s=!1)}})),l?(s||("number"==typeof u&&(u=Math.min(u,0)),"number"==typeof a&&(a=Math.max(a,0))),(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.range)&&(u=n.yaxis2.range[0],a=n.yaxis2.range[1]),{secondaryYAxistitle:"string"==typeof(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.title)?n.yaxis2.title:"string"==typeof(null===(o=null===(r=null==n?void 0:n.yaxis2)||void 0===r?void 0:r.title)||void 0===o?void 0:o.text)?n.yaxis2.title.text:void 0,secondaryYScaleOptions:{yMinValue:u,yMaxValue:a}}):{}},Qg=function(t,n,i,e,r){var o=Pg(t,n,i,e,r);return _g(o,0,"",e,t,r)},ty=function(t){return Array.from(new Set((null!=t?t:[]).flatMap((function(t){var n=t.x;return n&&Array.isArray(n)?n.flat().map((function(t){return t})):[]})).filter((function(t){return null!=t}))))},ny=function(t,n){void 0===n&&(n="");var i={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=n?"".concat(n,".").concat(e):e,o=t[e];"object"!=typeof o||null===o||Array.isArray(o)||o instanceof Date?i[r]=o:Object.assign(i,ny(o,r))}return i},iy=function(t){if(null!=t){var n="number"==typeof t?t:Number(t);return Number.isFinite(n)?n:void 0}},ey=function(t,n){if(!t)return n;var i=t.toLowerCase();if(i===n||i==="".concat(n,"axis")||i==="".concat(n,"axis1")||i==="".concat(n,"1"))return n;var e=i.match(/^([xy])(axis)?(\d+)$/);return e&&e[1]===n&&e[3]?"1"===e[3]?n:"".concat(n).concat(e[3]):i},ry=function(t,n,i,e){if(e&&0!==e.length){var r,o,u=cy(i,n,t),a=ey(n,t),l="x"===t?"xaxis":"yaxis";if(e.forEach((function(n){var i=n;if(ey(i[l],t)===a){var e="x"===t?i.x:i.y;if(Rl(e))for(var s=e,c=0;c<s.length;c++){var d=s[c],f=fy(dy(d,u));void 0===f||Number.isNaN(f)||(r=void 0===r?f:Math.min(r,f),o=void 0===o?f:Math.max(o,f))}}})),void 0!==r&&void 0!==o&&r!==o)return[r,o]}},oy=function(t){if(void 0!==t&&Number.isFinite(t))return 1-t},uy=function(t){switch((null!=t?t:"").toLowerCase()){case"left":return"start";case"center":return"center";case"right":return"end";default:return}},ay=function(t){switch((null!=t?t:"").toLowerCase()){case"top":return"top";case"middle":return"middle";case"bottom":return"bottom";default:return}},ly=function(t){if(null!=t)return"string"==typeof t?t:"number"==typeof t&&Number.isFinite(t)?"".concat(t,"px"):void 0},sy=function(t,n){if(!t)return"axis";var i=t.toLowerCase();if("pixel"===i)return"pixel";if("paper"===i)return"relative";if(i.endsWith(" domain"))return i.startsWith(n)?"relative":void 0;var e=i.match(/^([xy])(\d*)$/);return e&&e[1]===n?"axis":void 0},cy=function(t,n,i){if(t){var e="".concat(i,"axis");if(!n)return t[e];var r=n.toLowerCase();if("paper"===r||"pixel"===r||r.endsWith(" domain"))return t[e];var o=r.match(/^([xy])(\d*)$/);if(o&&o[1]===i){var u=o[2];return u&&""!==u&&"1"!==u?t["".concat(i,"axis").concat(u)]:t[e]}return t[e]}},dy=function(t,n){if(null!=t){if("date"===(null==n?void 0:n.type)||Ol(t)){var i=t instanceof Date?t:new Date(t);return Number.isNaN(i.getTime())?void 0:i}if("number"==typeof t)return t;if("linear"===(null==n?void 0:n.type)||"log"===(null==n?void 0:n.type)){var e=Number(t);return Number.isFinite(e)?e:void 0}return Date,t}},fy=function(t){if(t instanceof Date){var n=t.getTime();return Number.isFinite(n)?n:void 0}if("number"==typeof t)return Number.isFinite(t)?t:void 0;if("string"==typeof t){var i=Number(t);return Number.isFinite(i)?i:void 0}},vy=function(t,n,i){var e=Array.isArray(null==n?void 0:n.range)?n.range:void 0,r=e&&e.length>=2?fy(dy(e[0],n)):void 0,o=e&&e.length>=2?fy(dy(e[1],n)):void 0;void 0!==r&&void 0!==o&&r!==o||!i||(r=i[0],o=i[1]);var u=fy(dy(t,n));if(void 0!==r&&void 0!==o&&void 0!==u&&r!==o){var a=(u-r)/(o-r);return Number.isFinite(a)?a:void 0}},hy=function(t,n){var i=t.replace(/\s+/g," ").trim();if(i){var e=i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32);if(e)return"annotation-".concat(n,"-").concat(e)}return"annotation-".concat(n)},py=function(t){var n=!1,i=!1,e="string"==typeof(null==t?void 0:t.arrowside)?null==t?void 0:t.arrowside.toLowerCase():void 0;e&&(n=e.includes("start"),i=e.includes("end"));var r=iy(null==t?void 0:t.arrowhead),o=iy(t.startarrowhead);return void 0!==r&&r>0&&(i=!0),void 0!==o&&o>0&&(n=!0),n&&i?"both":n?"start":i?"end":"none"},gy=function(t,n,i){if(!i&&(null==t?void 0:t.annotations)){var e=(Array.isArray(t.annotations)?t.annotations:[t.annotations]).map((function(i,e){return function(t,n,i,e){var r;if(t&&!1!==t.visible){var u=sy(t.xref,"x"),a=sy(t.yref,"y");if(u&&a){var l;if("axis"===u&&"axis"===a){var s=cy(n,t.xref,"x"),c=cy(n,t.yref,"y"),d=dy(t.x,s),f=dy(t.y,c);if(void 0===d||void 0===f)return;var v="string"==typeof t.yref?t.yref.toLowerCase():void 0;l=(0,o.Cl)({type:"data",x:d,y:f},"y2"===v?{yAxis:"secondary"}:{})}else if("relative"===u&&"relative"===a){d=iy(t.x),f=iy(t.y);var h=oy(f);if(void 0===d||void 0===h)return;l={type:"relative",x:d,y:h}}else if("relative"===u&&"axis"===a){d=iy(t.x),c=cy(n,t.yref,"y");var p=ry("y",t.yref,n,i),g=vy(t.y,c,p);if(h=oy(g),void 0===d||void 0===h)return;l={type:"relative",x:d,y:h}}else if("axis"===u&&"relative"===a){f=iy(t.y),s=cy(n,t.xref,"x");var y=ry("x",t.xref,n,i),m=vy(t.x,s,y);if(h=oy(f),void 0===m||void 0===h)return;l={type:"relative",x:m,y:h}}else{if("pixel"!==u||"pixel"!==a)return;if(d=iy(t.x),f=iy(t.y),void 0===d||void 0===f)return;l={type:"pixel",x:d,y:f}}var b=t.text,x=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}(null==b?"":String(b)),w={id:hy(x,e),text:x,coordinates:l},M={},C={},k=void 0!==t.showarrow&&!!t.showarrow,A=t.cliponaxis;void 0!==A?M.clipToBounds=!!A:"data"===l.type&&(M.clipToBounds=!0);var S=uy(t.xanchor);if(S&&(M.align=S),!M.align){var L=uy(t.align);L&&(M.align=L)}var D=ay(t.yanchor);if(D&&(M.verticalAlign=D),!M.verticalAlign){var V=ay(t.valign);V&&(M.verticalAlign=V)}var N=[],O=!1,T=iy(t.ax),E="string"==typeof t.axref?t.axref.toLowerCase():void 0;void 0===T||void 0!==E&&"pixel"!==E||(N.push(T),O=!0);var F=iy(t.xshift);if(void 0!==F&&(N.push(F),O=!0),N.length>0){var B=N.reduce((function(t,n){return t+n}),0);0!==B&&(M.offsetX=B)}var P=[],_=iy(t.ay),H="string"==typeof t.ayref?t.ayref.toLowerCase():void 0;void 0===_||void 0!==H&&"pixel"!==H||(P.push(_),O=!0);var I=iy(t.yshift);if(void 0!==I&&(P.push(I),O=!0),P.length>0){var W=P.reduce((function(t,n){return t+n}),0);0!==W&&(M.offsetY=W)}k&&!O&&void 0===M.offsetY&&(M.offsetY=-40);var R=iy(t.width);void 0!==R&&(M.maxWidth=R),t.bgcolor&&(C.backgroundColor=t.bgcolor),t.bordercolor&&(C.borderColor=t.bordercolor);var j=iy(t.borderwidth);void 0!==j&&(C.borderWidth=j);var z=ly(t.borderpad);z&&(C.padding=z);var $=iy(t.opacity);if(void 0!==$&&(C.opacity=$),t.font){var Y=t.font;(null==Y?void 0:Y.color)&&(C.textColor=Y.color);var X=ly(null==Y?void 0:Y.size);X&&(C.fontSize=X),(null==Y?void 0:Y.weight)&&(C.fontWeight=Y.weight)}var G=null==t?void 0:t.textangle;if("number"!=typeof G||Number.isNaN(G)){if("string"==typeof G&&"auto"!==G.toLowerCase()){var U=Number(G);Number.isNaN(U)||(C.rotation=U)}}else C.rotation=G;if(Object.keys(M).length>0&&(w.layout=M),Object.keys(C).length>0&&(w.style=C),k){var q=null!==(r=t.arrowcolor)&&void 0!==r?r:C.textColor,Z=iy(t.arrowwidth),K=iy(t.standoff),J=iy(t.startstandoff),Q=function(t){if(t){var n=t.trim().toLowerCase();switch(n){case"solid":return;case"dot":return"1, 5";case"dash":return"5, 5";case"longdash":return"10, 5";case"dashdot":return"5, 5, 1, 5";case"longdashdot":return"10, 5, 1, 5";default:return/^\d+(\s|,)*\d*$/.test(n.replace(/\s+/g," "))?n.replace(/\s+/g," "):t}}}(t.arrowdash);w.connector=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},q?{strokeColor:q}:{}),void 0!==Z?{strokeWidth:Z}:{}),void 0!==K?{endPadding:Math.max(K,0)}:{}),void 0!==J?{startPadding:Math.max(J,0)}:{}),Q?{dashArray:Q}:{}),{arrow:py(t)})}return w}}}(i,t,n,e)})).filter((function(t){return void 0!==t}));return e.length>0?e:void 0}},yy=function(t,n,i,e,r,u){var a,l,s,c,d,f,v={},h=0,p=0,g=Jg(t.data,t.layout),y=Vy(t.data,t.layout,n),m=y.legends,b=y.hideLegend,x=void 0,w=Yg(t.data[0],t.layout),M=$y(zy(t.data,jy(t.data,t.layout).x));t.data.forEach((function(n,a){var l,s,c,d,f,g,y,b;x=Ig(t.layout,n,x);var C=Pg(null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null===(d=n.marker)||void 0===d?void 0:d.color,i,r),k=Pg(null===(y=null===(g=null===(f=t.layout)||void 0===f?void 0:f.template)||void 0===g?void 0:g.layout)||void 0===y?void 0:y.colorway,e,null===(b=n.line)||void 0===b?void 0:b.color,i,r),A=Oy(n,M);A.forEach((function(e,l){var s=e[0],c=e[1],d=n.x.slice(s,c),f=n.y.slice(s,c);d.forEach((function(e,s){var c,d,g,y,b,S,L,D,V,N,O,T;v[e]||(v[e]={xAxisPoint:M(e),chartData:[],lineData:[]});var E=m[a],F=x?x(Rl(null===(c=n.marker)||void 0===c?void 0:c.color)?null===(g=null===(d=n.marker)||void 0===d?void 0:d.color)||void 0===g?void 0:g[s%(null===(y=n.marker)||void 0===y?void 0:y.color).length]:0):_g(C,s,E,i,null===(L=null===(S=null===(b=t.layout)||void 0===b?void 0:b.template)||void 0===S?void 0:S.layout)||void 0===L?void 0:L.colorway,r),B=Hg(n,s),P=f[s],_=qg(P,w);if("bar"===n.type)v[e].chartData.push({legend:E,data:P,color:null!==(D=Po(F).copy({opacity:B}).formatHex8())&&void 0!==D?D:F,yAxisCalloutData:_}),"number"==typeof P&&(h=Math.max(h,P));else if("scatter"===n.type||u){var H=_g(k,a,E,i,null===(O=null===(N=null===(V=t.layout)||void 0===V?void 0:V.template)||void 0===N?void 0:N.layout)||void 0===O?void 0:O.colorway,r),I=wy(n.line),W=Dy(n);v[e].lineData.push({legend:E+(A.length>1?".".concat(l+1):""),legendShape:W,y:P,color:null!==(T=Po(H).copy({opacity:B}).formatHex8())&&void 0!==T?T:F,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=I?I:{}),{mode:n.mode}),useSecondaryYScale:Kg(n,t.layout),yAxisCalloutData:_}),Kg(n,t.layout)||"number"!=typeof P||(h=Math.max(h,P),p=Math.min(p,P))}}))}))}));var C=ty(t.data);(null!==(l=null===(a=t.layout)||void 0===a?void 0:a.shapes)&&void 0!==l?l:[]).filter((function(t){return"line"===t.type})).forEach((function(t,n){var i,e,r,o=null===(i=t.line)||void 0===i?void 0:i.color,u=function(t){return"number"==typeof t&&Array.isArray(C)?void 0!==C[t]?C[t]:C[n]:t},a=u(t.x0),l=u(t.x1),s=function(n){return"paper"===t.yref?0===n?p:1===n?h:"number"==typeof n?p+n*(h-p):n:n},c=s(t.y0),d=s(t.y1);v[a]&&v[a].lineData.push({legend:"Reference_".concat(n),y:c,color:null!==(e=Po(o).formatHex8())&&void 0!==e?e:o,lineOptions:wy(t.line),useSecondaryYScale:!1}),v[l]&&v[l].lineData.push({legend:"Reference_".concat(n),y:d,color:null!==(r=Po(o).formatHex8())&&void 0!==r?r:o,lineOptions:wy(t.line),useSecondaryYScale:!1})}));var k=Object.values(v),A=gy(t.layout,t.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:k,width:null===(s=t.layout)||void 0===s?void 0:s.width,height:null!==(d=null===(c=t.layout)||void 0===c?void 0:c.height)&&void 0!==d?d:350,barWidth:"auto",yMaxValue:h,yMinValue:p,mode:"plotly"},g),{hideTickOverlap:!0,hideLegend:b,roundCorners:!0,supportNegativeData:!0,barGapMax:2,showYAxisLables:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:"string"==typeof(null===(f=k[0])||void 0===f?void 0:f.xAxisPoint)}),zg(t.layout)),Fy(t.data,t.layout)),Xg(t.data[0],t.layout)),$g(t.data[0],t.layout)),w),_y(t.data,t.layout)),Iy(t.data,t.layout)),A?{annotations:A}:{})},my=function(t,n,i,e,r,u){var a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=["text","markers","text+markers","markers+text","lines+markers","markers+line","text+lines+markers","lines+markers+text"].includes(null===(a=t.data[0])||void 0===a?void 0:a.mode),M="area"===i,C="scatter"===i,k=Jg(t.data,t.layout),A="tonexty",S=Vy(t.data,t.layout,n),L=S.legends,D=S.hideLegend,V=Yg(t.data[0],t.layout),N=zy(t.data,jy(t.data,t.layout).x),O=$y(N),T="category"===N,E=t.data.map((function(n,i){var a,l,s,c,d,f,v,h,p,g,y,m=w?(null===(a=null==n?void 0:n.mode)||void 0===a?void 0:a.includes("line"))?null===(l=n.line)||void 0===l?void 0:l.color:null===(s=n.marker)||void 0===s?void 0:s.color:null===(c=n.line)||void 0===c?void 0:c.color,b=Pg(null===(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===f?void 0:f.layout)||void 0===v?void 0:v.colorway,r,m,e,u),x=n.x,M=L[i],C=_g(b,i,M,e,null===(g=null===(p=null===(h=t.layout)||void 0===h?void 0:h.template)||void 0===p?void 0:p.layout)||void 0===g?void 0:g.colorway,u),k=Hg(n,i);A="tozeroy"===n.fill?"tozeroy":"tonexty";var S=(null===(y=n.mode)||void 0===y?void 0:y.includes("text"))||"scatterpolar"===n.type?void 0:wy(n.line),D=Dy(n);return Oy(n,O).map((function(i,e){var r,u,a,l,s,c,d,f,v,h,p,g=i[0],y=i[1],m=x.slice(g,y),b=n.y.slice(g,y),w=Rl(null===(r=n.marker)||void 0===r?void 0:r.size)?n.marker.size.slice(g,y):[],A=Rl(null===(u=n.marker)||void 0===u?void 0:u.color)||Array.isArray(null===(a=n.marker)||void 0===a?void 0:a.color)?n.marker.color.slice(g,y):void 0,L=Array.isArray(n.text)?n.text.slice(g,y):void 0;return{legend:M,legendShape:D,data:m.map((function(t,i){var e,r;return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({x:O(t),y:b[i]},Array.isArray(null===(e=n.marker)||void 0===e?void 0:e.size)?{markerSize:w[i]}:"number"==typeof(null===(r=n.marker)||void 0===r?void 0:r.size)?{markerSize:n.marker.size}:{}),A?{markerColor:A[i]}:{}),L?{text:L[i]}:{}),{yAxisCalloutData:qg(b[i],V)})})),color:null!==(l=Po(C).copy({opacity:k}).formatHex8())&&void 0!==l?l:C,lineOptions:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},null!=S?S:{}),{mode:"scatterpolar"!==n.type?n.mode:"scatterpolar"}),"scatterpolar"===n.type?{originXOffset:null===(s=t.layout)||void 0===s?void 0:s.__polarOriginX,direction:null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.polar)||void 0===d?void 0:d.angularaxis)||void 0===f?void 0:f.direction,rotation:null===(p=null===(h=null===(v=t.layout)||void 0===v?void 0:v.polar)||void 0===h?void 0:h.angularaxis)||void 0===p?void 0:p.rotation,axisLabel:n.__axisLabel?n.__axisLabel:{},fill:n.fill}:{}),useSecondaryYScale:Kg(n,t.layout)}}))})).flat(),F=null===(s=null===(l=E[0])||void 0===l?void 0:l.data[0])||void 0===s?void 0:s.x,B=null===(d=null===(c=E[0])||void 0===c?void 0:c.data[E[0].data.length-1])||void 0===d?void 0:d.x,P=null===(v=null===(f=E[0])||void 0===f?void 0:f.data[0])||void 0===v?void 0:v.y,_=null===(p=null===(h=E[0])||void 0===h?void 0:h.data[E[0].data.length-1])||void 0===p?void 0:p.y,H=ty(t.data),I=(null!==(y=null===(g=t.layout)||void 0===g?void 0:g.shapes)&&void 0!==y?y:[]).filter((function(t){return"line"===t.type})).map((function(t,n){var i,e,r=null===(i=t.line)||void 0===i?void 0:i.color,o=function(i){return"number"==typeof i&&Array.isArray(H)?void 0!==H[i]?H[i]:H[n]:"paper"===t.xref?0===i?F:1===i?B:"number"==typeof F&&"number"==typeof B&&"number"==typeof i?F+i*(B-F):i:i},u=function(n){return"paper"===t.yref?0===n?P:1===n?_:"number"==typeof n?P+n*(_-P):n:n};return{legend:"Reference_".concat(n),data:[{x:O(o(t.x0)),y:u(t.y0)},{x:O(o(t.x1)),y:u(t.y1)}],color:null!==(e=Po(r).formatHex8())&&void 0!==e?e:r,lineOptions:wy(t.line),useSecondaryYScale:!1}})),W=Xg(t.data[0],t.layout);if(void 0===W.yMinValue&&void 0===W.yMaxValue){var R=Ps(E);W.yMinValue=R.startValue,W.yMaxValue=R.endValue}var j,z,$=E.reduce((function(t,n){return t+n.data.length}),0),Y={lineChartData:(0,o.fX)((0,o.fX)([],E,!0),I,!0)},X={scatterChartData:(0,o.fX)((0,o.fX)([],E,!0),I,!0)},G=gy(t.layout,t.data,n),U=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({supportNegativeData:!0},k),{width:null===(m=t.layout)||void 0===m?void 0:m.width,height:null!==(x=null===(b=t.layout)||void 0===b?void 0:b.height)&&void 0!==x?x:350,hideTickOverlap:!0,hideLegend:D,useUTC:!1,optimizeLargeData:$>1e3,wrapXAxisLables:T,showYAxisLables:!0}),zg(t.layout)),$g(t.data[0],t.layout)),V),Hy(t.data,t.layout)),Iy(t.data,t.layout)),G?{annotations:G}:{});return M?(0,o.Cl)({data:Y,mode:A},U):(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:C?X:Y,roundedTicks:!0,enableReflow:!1},U),W),C?(0,o.Cl)({showYAxisLablesTooltip:!0},Fy(t.data,t.layout)):{}),!C&&(j=t.layout,(z=Array.isArray(null==j?void 0:j.shapes)?j.shapes.filter((function(t){return"rect"===t.type})).map((function(t){return"string"==typeof t.x0||"string"==typeof t.x1?null:{color:t.fillcolor,data:[{startX:t.x0,endX:t.x1}],applyPattern:!1}})):[])&&!z.includes(null)?{colorFillBars:z}:{}))},by=function(t){return t.replace(/<[^&]*?>/g,"").replace(/<[^>]*>/g,"").replace(/<br>|\\u003cbr\\u003e|<br>/gi,"").replace(/\$[^$]*\$/g,"$").trim()};function xy(t,n,i){var e,r;if(Array.isArray(t)){var o=null!==(e=t[i])&&void 0!==e?e:t[0];return Array.isArray(o)?null!==(r=o[n])&&void 0!==r?r:o[0]:o}return t}function wy(t){if(t){var n={};switch(t.dash&&(n=(0,o.Cl)((0,o.Cl)({},n),jg[t.dash])),t.shape){case"spline":var i="number"==typeof t.smoothing?t.smoothing:1;n.curve=Dg.tension(1-i/1.3);break;case"hv":n.curve="stepAfter";break;case"vh":n.curve="stepBefore";break;case"hvh":n.curve="step";break;default:n.curve="linear"}return Object.keys(n).length>0?n:void 0}}var My=function(t,n,i){return null==n?-1:i?t.findIndex((function(t){return t.includes(n)})):t.findIndex((function(i,e){return n>=i.x0&&(e===t.length-1?n<=i.x1:n<i.x1)}))},Cy=function(t){return t.x1-t.x0},ky=function(t){return(t.x1+t.x0)/2},Ay=function(t,n,i,e){if(!t||0===t.length)return[];if(_l(t)){var r=Array.from(new Set(t)),o="number"==typeof n?Math.ceil(n):0,u="number"==typeof i?Math.floor(i)+1:r.length,a="number"==typeof e?e:1;return Su(o,u,a).map((function(t){return r.slice(t,t+a)}))}var l=Gu().domain(Up(t)).nice().domain(),s=l[0],c=l[1];s="number"==typeof n?n:s,c="number"==typeof i?i:c;var d=function(){var t=kg,n=Up,i=Ag;function e(e){Array.isArray(e)||(e=Array.from(e));var r,o,u,a=e.length,l=new Array(a);for(r=0;r<a;++r)l[r]=t(e[r],r,e);var s=n(l),c=s[0],d=s[1],f=i(l,c,d);if(!Array.isArray(f)){const t=d,i=+f;if(n===Up&&([c,d]=ci(c,d,i)),(f=ai(c,d,i))[0]<=c&&(u=li(c,d,i)),f[f.length-1]>=d)if(t>=d&&n===Up){const t=li(c,d,i);isFinite(t)&&(t>0?d=(Math.floor(d/t)+1)*t:t<0&&(d=(Math.ceil(d*-t)+1)/-t))}else f.pop()}for(var v=f.length,h=0,p=v;f[h]<=c;)++h;for(;f[p-1]>d;)--p;(h||p<v)&&(f=f.slice(h,p),v=p-h);var g,y=new Array(v+1);for(r=0;r<=v;++r)(g=y[r]=[]).x0=r>0?f[r-1]:c,g.x1=r<v?f[r]:d;if(isFinite(u)){if(u>0)for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[Math.min(v,Math.floor((o-c)/u))].push(e[r]);else if(u<0)for(r=0;r<a;++r)if(null!=(o=l[r])&&c<=o&&o<=d){const t=Math.floor((c-o)*u);y[Math.min(v,t+(f[t]<=o))].push(e[r])}}else for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[ho(f,o,0,v)].push(e[r]);return y}return e.value=function(n){return arguments.length?(t="function"==typeof n?n:Cg(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:Cg([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(i="function"==typeof t?t:Cg(Array.isArray(t)?Mg.call(t):t),e):i},e}().domain([s,c]);if("number"==typeof e&&e>0){for(var f=[],v=Math.max(dl(s),dl(e)),h=fl(s,v);h<fl(c+e,v);)f.push(h),h=fl(h+e,v);return s=f[0],c=f[f.length-1],d.domain([s,c]).thresholds(f),d(t).slice(0,-1)}return d(t)},Sy=function(t,n){var i,e;switch(t){case"sum":return vi(n);case"avg":return 0===n.length?0:vi(n)/n.length;case"min":return null!==(i=di(n))&&void 0!==i?i:0;case"max":return null!==(e=fi(n))&&void 0!==e?e:0;default:return n.length}},Ly=function(t,n,i,e,r){switch(void 0===r&&(r=1),t){case"percent":return 0===i?0:n/i*100;case"probability":return 0===i?0:n/i;case"density":return e*r===0?0:n/(e*r);case"probability density":return i*e*r===0?0:n/(i*e*r);default:return n}},Dy=function(t){var n,i,e=(null===(n=t.line)||void 0===n?void 0:n.dash)||"solid";return"dot"===e||"dash"===e||"dashdot"===e?"dottedLine":(null===(i=t.mode)||void 0===i?void 0:i.includes("markers"))?"circle":"default"},Vy=function(t,n,i){var e=[];1===t.length?e.push(t[0].name||""):t.forEach((function(t,n){e.push(t.name||"Series ".concat(n+1))}));var r=t.every((function(t){return!1===t.showlegend})),o=!1===(null==n?void 0:n.showlegend)||!0!==(null==n?void 0:n.showlegend)&&e.length<2;return{legends:e,hideLegend:i||o||r}},Ny=function(t,n){if(Rl(t)){if("number"!=typeof t[n]||!isFinite(t[n]))return;return t[n]}return 1},Oy=function(t,n,i){if(!Rl(t.x)||!Rl(t.y))return[];for(var e=[],r=0,o=0;o<t.x.length;o++)(Il(t.x[o])||"function"==typeof n&&Il(n(t.x[o]))||Il(t.y[o])||"function"==typeof i&&Il(i(t.y[o])))&&(o-r>0&&e.push([r,o]),r=o+1);return o-r>0&&e.push([r,o]),e},Ty=function(t,n){var i=""===t.replace(n,"")?"1":t.replace(n,"");return parseInt(i,10)-1},Ey=function(t){return["donut","sankey","pie","annotation"].includes(t)},Fy=function(t,n){var i={},e={x:null==n?void 0:n.xaxis,y:null==n?void 0:n.yaxis};return Object.keys(e).forEach((function(n){var r=e[n],o=n[0],u="".concat(o,"AxisCategoryOrder"),a=[];if(t.forEach((function(t){var n;null===(n=t[o])||void 0===n||n.forEach((function(t){Il(t)||a.push(t)}))})),"category"===(null==r?void 0:r.type)||_l(a)&&!Fl(a)&&!El(a))if(!(Rl(null==r?void 0:r.categoryarray)&&r.categoryarray.length>0)||(null==r?void 0:r.categoryorder)&&"array"!==r.categoryorder)if((null==r?void 0:r.categoryorder)&&"trace"!==r.categoryorder&&"array"!==r.categoryorder)i[u]=r.categoryorder;else{var l=Array.from(new Set(a));i[u]="reversed"===(null==r?void 0:r.autorange)?l.reverse():l}else i[u]=r.categoryarray;else i[u]="data"})),i},By=/^\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z)?)?$/,Py=function(t){if("string"==typeof t){var n=t.match(By);n&&(n[3]?n[6]&&(t=t.replace("Z","")):t+="T00:00")}return new Date(t)},_y=function(t,n,i){var e;"number"==typeof(null==n?void 0:n.bargap)&&(e=n.bargap>=0&&n.bargap<=1?n.bargap:.2);var r=fi(t.map((function(t){return"bar"!==t.type||!Rl(t.width)&&"number"!=typeof t.width?[]:t.width})).flat());return"number"==typeof r&&(e=1-r,e=Math.max(0,Math.min(e,1))),void 0===e?{}:i?{maxBarHeight:1e3,yAxisPadding:e}:{barWidth:"auto",maxBarWidth:1e3,xAxisInnerPadding:e,xAxisOuterPadding:e/2}},Hy=function(t,n){var i,e,r,o={},u=jy(t,n);return"log"===(null===(i=u.x)||void 0===i?void 0:i.type)&&(o.xScaleType="log"),"log"===(null===(e=u.y)||void 0===e?void 0:e.type)&&(o.yScaleType="log"),"log"===(null===(r=u.y2)||void 0===r?void 0:r.type)&&(o.secondaryYScaleType="log"),o},Iy=function(t,n){var i={},e=jy(t,n);return Object.keys(e).forEach((function(n){var r=e[n];if(r){var o=zy(t,r);if(r.tickmode&&"array"!==r.tickmode||!Rl(r.tickvals))if(r.tickmode&&"linear"!==r.tickmode||!r.dtick)(!r.tickmode||"auto"===r.tickmode)&&"number"==typeof r.nticks&&r.nticks>=0&&("x"===n?i.xAxisTickCount=r.nticks:"y"===n&&(i.yAxisTickCount=r.nticks));else{var u=Wy(r.dtick,o),a=Ry(r.tick0,o,u);"x"===n?i.xAxis={tickStep:u,tick0:a}:"y"===n&&(i.yAxis={tickStep:u,tick0:a})}else{var l="date"===o?r.tickvals.map((function(t){return new Date(t)})):r.tickvals;"x"===n?(i.tickValues=l,i.xAxis={tickText:r.ticktext}):"y"===n&&(i.yAxisTickValues=l,i.yAxis={tickText:r.ticktext})}}})),i},Wy=function(t,n){var i="log"===n,e="date"===n,r="category"===n,o=e?864e5:1;if(!t)return o;if(Nl(t))return(t=Number(t))<=0?o:r?Math.max(1,Math.round(t)):e?Math.max(.1,t):t;if("string"!=typeof t||!e&&!i)return o;var u=t.charAt(0),a=Nl(t.slice(1))?Number(t.slice(1)):0;return a<=0||!(e&&"M"===u&&a===Math.round(a)||i&&"L"===u||i&&"D"===u&&(1===a||2===a))?o:t},Ry=function(t,n,i){return"date"===n?Ol(t)?new Date(t):new Date(ys):"D1"!==i&&"D2"!==i?Nl(t)?Number(t):0:void 0},jy=function(t,n){var i,e=new Set;t.forEach((function(t){var n=ql(t);i=n.x,e.add(n.y)}));var r=function(t,i){return(0,o.Cl)((0,o.Cl)({},null==n?void 0:n[Zl(t,i)]),{_id:"".concat(t).concat(i>1?i:"")})},u={};"number"==typeof i&&(u.x=r("x",i));var a=Array.from(e).sort();return a.length>0&&(u.y=r("y",a[0])),a.length>1&&(u.y2=r("y",a[1])),u},zy=function(t,n){var i;if(!n)return"category";if(["linear","log","date","category"].includes(null!==(i=n.type)&&void 0!==i?i:""))return n.type;var e=n._id[0],r=[];return t.forEach((function(t){var i,o=t["".concat(e,"axis")];(o===n._id||!o&&n._id===e)&&(null===(i=t[e])||void 0===i||i.forEach((function(t){Il(t)||r.push(t)})))})),Fl(r)&&!Pl(r)?"linear":El(r)?"date":"category"},$y=function(t,n){var i=function(t){var i=n?n(t):new Date(t);return isNaN(i.getTime())?null:i};return function(n){if(Il(n))return null;switch(t){case"linear":case"log":return Nl(n)?+n:null;case"date":return Nl(n)?i(+n):"string"==typeof n?i(n):null;case"category":return"".concat(n);default:return null}}},Yy=function(t){var n,i,e=u.useRef(null),r=u.useRef(void 0),a=u.useState({}),l=a[0],c=a[1];r.current=t.onResize,u.useEffect((function(){var t,n,i=(0,s.z)(e.current);return i&&i.ResizeObserver&&(n=new i.ResizeObserver((function(n){var e,o=n[0].contentRect,u=o.width,a=o.height;t=null==i?void 0:i.requestAnimationFrame((function(){c((function(t){var n=Math.floor(u),i=Math.floor(a);return t.containerWidth===n&&t.containerHeight===i?t:{containerWidth:n,containerHeight:i}}))})),null===(e=r.current)||void 0===e||e.call(r,u,a)})),e.current&&n.observe(e.current)),function(){t&&(null==i||i.cancelAnimationFrame(t)),null==n||n.disconnect()}}),[]);var d=u.useMemo((function(){var n=l.containerWidth,i=l.containerHeight;return"number"==typeof t.aspect&&t.aspect>0&&(n?i=n/t.aspect:i&&(n=i*t.aspect),"number"==typeof t.maxHeight&&i&&i>t.maxHeight&&(i=t.maxHeight)),u.Children.map(t.children,(function(t){var e,r,a,l,s,c,d={root:(0,o.Cl)((0,o.Cl)({},null===(e=t.props.styles)||void 0===e?void 0:e.root),{width:"100%",height:"100%"}),chartWrapper:(0,o.Cl)((0,o.Cl)({},null===(r=t.props.styles)||void 0===r?void 0:r.chartWrapper),{width:"100%"}),chart:(0,o.Cl)((0,o.Cl)({},null===(a=t.props.styles)||void 0===a?void 0:a.chart),{width:"100%"})};return u.cloneElement(t,{width:n,height:i,shouldResize:(null!=n?n:0)+(null!=i?i:0),styles:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t.props.styles),d),{subComponentStyles:(0,o.Cl)((0,o.Cl)({},null===(l=t.props.styles)||void 0===l?void 0:l.subComponentStyles),{cartesianStyles:(0,o.Cl)((0,o.Cl)({},null===(c=null===(s=t.props.styles)||void 0===s?void 0:s.subComponentStyles)||void 0===c?void 0:c.cartesianStyles),d)})})})}))}),[l,t.aspect,t.maxHeight,t.children]);return u.createElement("div",{ref:e,style:{width:null!==(n=t.width)&&void 0!==n?n:"100%",height:null!==(i=t.height)&&void 0!==i?i:"100%",minWidth:t.minWidth,minHeight:t.minHeight,maxHeight:t.maxHeight}},d)};function Xy(t){return function(n){var i=n.aspect,e=n.width,r=n.height,a=n.minWidth,l=n.minHeight,s=n.maxHeight,c=n.onResize,d=(0,o.Tt)(n,["aspect","width","height","minWidth","minHeight","maxHeight","onResize"]);return u.createElement(Yy,{aspect:i,width:e,height:r,minWidth:a,minHeight:l,maxHeight:s,onResize:c},u.createElement(t,(0,o.Cl)({},d)))}}var Gy=u.forwardRef((function(t,n){var i,e,r=t.useUTC,a=void 0===r||r,s=t.yAxisCategoryOrder,c=void 0===s?"default":s,d=t.maxBarHeight,f=void 0===d?24:d,v=(0,o.Tt)(t,["useUTC","yAxisCategoryOrder","maxBarHeight"]),h=u.useRef(24),g=u.useRef(p("callout")),y=u.useRef({}),m=u.useRef(null),b=u.useRef(null),x=u.useRef(null),w=u.useRef(p("Gantt_empty")),M=u.useRef({}),C=u.useRef({}),k=u.useState(""),A=k[0],S=k[1],L=u.useState(!1),D=L[0],V=L[1],N=u.useState(""),O=N[0],T=N[1],E=u.useState(null),F=E[0],B=E[1],P=u.useState(""),_=P[0],H=P[1],I=u.useState(""),W=I[0],R=I[1],j=u.useState(""),z=j[0],$=j[1],Y=u.useState((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),X=Y[0],G=Y[1],U=u.useState(),q=U[0],Z=U[1];u.useEffect((function(){var t,n,i;qs(null===(t=C.current.legendProps)||void 0===t?void 0:t.selectedLegends,null===(n=v.legendProps)||void 0===n?void 0:n.selectedLegends)||G((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),C.current=v}),[v]),u.useImperativeHandle(v.componentRef,(function(){var t,n;return{chartContainer:null!==(n=null===(t=b.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return tf([{container:null===(n=b.current)||void 0===n?void 0:n.chartContainer}],v.hideLegend||null===(i=x.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[v.hideLegend]);var K=u.useMemo((function(){var t,n;M.current={};var i=0;return null!==(n=null===(t=v.data)||void 0===t?void 0:t.map((function(t){var n,e,r,u,a,l="".concat(t.legend);if(!M.current[l]){var s=t.color?fs(t.color,null===(n=v.theme)||void 0===n?void 0:n.isInverted):ds(i,0,null===(e=v.theme)||void 0===e?void 0:e.isInverted),c=s;if(v.enableGradient){var d=kc(i,0,null===(r=v.theme)||void 0===r?void 0:r.isInverted);s=(null===(u=t.gradient)||void 0===u?void 0:u[0])||d[0],c=(null===(a=t.gradient)||void 0===a?void 0:a[1])||d[1]}M.current[l]={id:p("legend"),startColor:s,endColor:c},i+=1}var f=M.current[l],h=f.startColor,g=f.endColor;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:h}),v.enableGradient?{gradient:[h,g]}:{})})))&&void 0!==n?n:[]}),[v.data,null===(e=v.theme)||void 0===e?void 0:e.isInverted,v.enableGradient]),J=u.useMemo((function(){return K.length>0?Rs(K[0].x.start,!0):es.DateAxis}),[K]),Q=u.useMemo((function(){return K.length>0?Rs(K[0].y,!1):rs.StringAxis}),[K]),tt=u.useMemo((function(){return Xs(v.yAxisPadding,void 0,.5)}),[v.yAxisPadding]),nt=u.useMemo((function(){if(J===es.DateAxis){var t=100,n=-1;return K.forEach((function(i){var e=ws(i.x.start,a),r=ws(i.x.end,a);t=Math.min(t,e,r),n=Math.max(n,e,r)})),(0,Yn.c2)(t,n)}}),[a,K,J]),it=u.useCallback((function(){var t={};return K.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(+n.x.end-+n.x.start)})),t}),[K]),et=u.useCallback((function(){var t=it();return Q!==rs.StringAxis?Object.keys(t).sort((function(t,n){return+t-+n})):"default"===c?Object.keys(t).reverse():ec(t,c)}),[it,Q,c]),rt=u.useMemo((function(){return et()}),[et]),ot=u.useCallback((function(t,n,i,e,r,o,u,a){var l=[];t.forEach((function(t){l.push(t.x.start,t.x.end)}));var s=di(l)||0,c=fi(l)||0;return{dStartValue:r?c:s,dEndValue:r?s:c,rStartValue:n.left,rEndValue:i-n.right}}),[]),ut=u.useCallback((function(t){y.current=t}),[]),at=u.useCallback((function(t){var n,i;return J===es.DateAxis?(n=(0,Yn.Yn)(t.x.start,v.culture,a,!1,nt),i=(0,Yn.Yn)(t.x.end,v.culture,a,!1,nt)):(n=t.x.start.toString(),i=t.x.end.toString()),"".concat(n," - ").concat(i)}),[v.culture,a,nt,J]),lt=u.useCallback((function(){return v.onRenderCalloutPerDataPoint?v.onRenderCalloutPerDataPoint(q,(function(t){return t?u.createElement(yc.ChartHoverCard,{XValue:t.yAxisCalloutData||t.y.toString(),Legend:t.legend,YValue:t.xAxisCalloutData||at(t),color:t.color,culture:v.culture}):null})):null}),[at,q,v.culture,v.onRenderCalloutPerDataPoint]),st=u.useCallback((function(t){var n,i=t.xAxisCalloutData||at(t),e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(e,". ")+(t.legend?"".concat(t.legend,", "):"")+"".concat(i,".")}),[at]),ct=u.useCallback((function(){return X.length>0?X:O?[O]:[]}),[O,X]),dt=u.useCallback((function(t){return ct().includes("".concat(t))}),[ct]),ft=u.useCallback((function(){return 0===ct().length}),[ct]),vt=u.useCallback((function(t,n){(ft()||dt(n.legend))&&m.current!==n&&(m.current=n,B(t),V(!0),H(n.legend),S(n.color),R(n.yAxisCalloutData||n.y.toString()),$(n.xAxisCalloutData||at(n)),Z(n))}),[at,dt,ft]),ht=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),pt=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),gt=u.useCallback((function(){}),[]),yt=u.useCallback((function(){m.current=null,B(null),V(!1),H(""),S(""),R(""),$(""),Z(void 0)}),[]),mt=u.useCallback((function(){V(!1)}),[]),bt=u.useCallback((function(t){var n;return n="number"==typeof v.barHeight?v.barHeight:t,"number"==typeof f&&(n=Math.min(n,f)),Math.max(n,1)}),[f,v.barHeight]),xt=u.useCallback((function(){var t=[],n={};K.forEach((function(t){n[t.y]||(n[t.y]=[]),n[t.y].push(t)}));for(var i=rt.length-1;i>=0;i--){var e=rt[i];n[e]&&t.push.apply(t,n[e].sort((function(t,n){return+t.x.start-+n.x.start})))}return t}),[K,rt]),wt=u.useCallback((function(t){var n=t.xScale,i=t.yScalePrimary,e=function(t){var n=M.current["".concat(t)].id;return"".concat(n,"_gradient")},r=[];v.enableGradient&&Object.keys(M.current).forEach((function(t,n){var i=M.current[t],o=i.startColor,a=i.endColor;r.push(u.createElement("linearGradient",{key:n,id:e(t)},u.createElement("stop",{offset:"0",stopColor:o}),u.createElement("stop",{offset:"100%",stopColor:a})))}));var o=0;Q===rs.StringAxis&&(o=i.bandwidth(),h.current=bt(o));var a=xt().map((function(t,r){var a=n(t.x.start),l=n(t.x.end),s=i(t.y)+(o-h.current)/2,c=ft()||dt(t.legend);return u.createElement("rect",{key:r,x:Math.min(a,l),y:s,width:Math.abs(l-a),height:h.current,rx:v.roundCorners?3:0,fill:v.enableGradient?"url(#".concat(e(t.legend),")"):t.color,opacity:c?1:.1,onClick:t.onClick,onMouseOver:function(n){return pt(t,n)},onMouseLeave:gt,onFocus:function(n){return ht(t,n)},onBlur:gt,"data-is-focusable":c,role:"img","aria-label":st(t)})}));return u.createElement("g",null,r.length>0?u.createElement("defs",null,r):null,a)}),[st,bt,xt,dt,ft,ht,pt,gt,Q,v.enableGradient,v.roundCorners]),Mt=u.useCallback((function(t){T(t)}),[]),Ct=u.useCallback((function(){T("")}),[]),kt=u.useCallback((function(t,n,i){var e,r;(null===(e=v.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?G(t):G(t.slice(-1)),(null===(r=v.legendProps)||void 0===r?void 0:r.onChange)&&v.legendProps.onChange(t,n,i)}),[v.legendProps]),At=u.useCallback((function(){var t=[];return Object.keys(M.current).forEach((function(n){var i={title:n,color:M.current[n].startColor,hoverAction:function(){yt(),Mt(n)},onMouseOutAction:function(){Ct()}};t.push(i)})),u.createElement(vf,(0,o.Cl)({legends:t,enabledWrapLines:v.enabledLegendsWrapLines,overflowProps:v.legendsOverflowProps,focusZonePropsInHoverCard:v.focusZonePropsForLegendsInHoverCard,overflowText:v.legendsOverflowText,onChange:kt,ref:x},v.legendProps))}),[yt,Mt,Ct,kt,v.enabledLegendsWrapLines,v.focusZonePropsForLegendsInHoverCard,v.legendProps,v.legendsOverflowProps,v.legendsOverflowText]),St=u.useCallback((function(){return(v.chartTitle?"".concat(v.chartTitle,". "):"")+"Gantt chart with ".concat(K.length," data points. ")}),[K.length,v.chartTitle]),Lt=u.useCallback((function(){return 0===K.length}),[K.length]),Dt=u.useCallback((function(t){var n=8,i=new Set;K.forEach((function(t){i.add(t.y)}));var e=Array.from(i),r=t-(y.current.top+8)-(y.current.bottom+8);return Q!==rs.StringAxis&&(h.current=bt(Bh(e,r,tt)),n+=h.current/2),(0,o.Cl)((0,o.Cl)({},y.current),{top:y.current.top+n,bottom:y.current.bottom+n})}),[bt,K,tt,Q]);if(Lt())return u.createElement("div",{id:w.current,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"});h.current=bt(24);var Vt=(0,o.Cl)({isCalloutVisible:D,directionalHint:3,id:"toolTip".concat(g.current),target:F,isBeakVisible:!1,gapSpace:15,color:A,legend:_,XValue:W,YValue:z,onDismiss:mt,preventDismissOnLostFocus:!0},v.calloutProps),Nt={tickValues:v.tickValues,tickFormat:v.tickFormat};return u.createElement(Nv,(0,o.Cl)({},v,{yAxisPadding:tt,chartTitle:St(),points:K,chartType:is.GanttChart,xAxisType:J,yAxisType:Q,stringDatasetForYAxisDomain:rt,calloutProps:Vt,tickParams:Nt,legendBars:At(),createYAxis:Ms,getDomainNRangeValues:ot,createStringYAxis:ks,getMinMaxOfYAxis:Hs,focusZoneDirection:uc.bidirectional,customizedCallout:lt(),getmargins:ut,getYDomainMargins:Dt,onChartMouseLeave:yt,ref:b,useUTC:a,children:wt}))}));Gy.displayName="GanttChart";var Uy=(0,r.I)(Gy,(function(t){return{}})),qy=Xy(uv),Zy=Xy(Yh),Ky=Xy(Kv),Jy=Xy(rg),Qy=Xy(yh),tm=Xy(Qh),nm=Xy(Np),im=Xy(gg),em=Xy(qh),rm=Xy(jh),om=Xy(th),um=Xy(ng),am=Xy(Uy),lm=function(t){var n=t.data[0].x,i=Bl(n),e=t.data;return i&&(e=t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{x:Zg(t.x)})}))),{data:e,layout:t.layout}},sm={annotation:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,d,f,v,h,p,g=null!==(o=gy(t.layout,t.data,n))&&void 0!==o?o:[],y=zg(t.layout).chartTitle||void 0,m=t.layout;return{annotations:g,chartTitle:y,description:"string"==typeof(null===(u=null==m?void 0:m.meta)||void 0===u?void 0:u.description)?m.meta.description:void 0,width:"number"==typeof(null===(a=t.layout)||void 0===a?void 0:a.width)?t.layout.width:void 0,height:"number"==typeof(null===(l=t.layout)||void 0===l?void 0:l.height)?t.layout.height:void 0,paperBackgroundColor:"string"==typeof(null===(s=t.layout)||void 0===s?void 0:s.paper_bgcolor)?t.layout.paper_bgcolor:void 0,plotBackgroundColor:"string"==typeof(null===(c=t.layout)||void 0===c?void 0:c.plot_bgcolor)?t.layout.plot_bgcolor:void 0,fontColor:"string"==typeof(null===(f=null===(d=t.layout)||void 0===d?void 0:d.font)||void 0===f?void 0:f.color)?t.layout.font.color:void 0,fontFamily:"string"==typeof(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.family)?t.layout.font.family:void 0,margin:null===(p=t.layout)||void 0===p?void 0:p.margin}},renderer:xg},donut:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=t.data[0],M=Pg(null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null!==(f=null===(d=t.layout)||void 0===d?void 0:d.piecolorway)&&void 0!==f?f:null===(v=null==w?void 0:w.marker)||void 0===v?void 0:v.colors,i,r,!0),C={};if(i.current.clear(),w.labels&&w.values){var k=(null===(h=w.marker)||void 0===h?void 0:h.colors)||void 0,A=Array.isArray(k)&&k.length>=w.labels.length,S=w.labels.map((function(t,n){return{label:t,value:Ny(w.values,n),index:n,color:A?k[n]:void 0}})).filter((function(t){return!Il(t.value)}));S.sort((function(t,n){return n.value-t.value})),S.forEach((function(n,e){var o,u,a,l,s,c,d="".concat(n.label),f=null!==(o=n.color)&&void 0!==o?o:_g(M,e,d,i,null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,r,!0);C[d]?C[d].data+=n.value:C[d]={legend:d,data:n.value,color:f}}))}var L=null!==(g=null===(p=t.layout)||void 0===p?void 0:p.width)&&void 0!==g?g:440,D=null!==(m=null===(y=t.layout)||void 0===y?void 0:y.height)&&void 0!==m?m:220,V=!!w.textinfo&&!["value","percent","label+percent"].includes(w.textinfo),N=V?0:80,O=40+(V?0:40),T=w.hole?w.hole*(Math.min(L-N,D-O)/2):1,E=zg(t.layout).chartTitle,F=Object.keys(C);return{data:{chartTitle:E,chartData:(F.length>1?(0,o.fX)([[F[0],C[F[0]]]],F.slice(1).reverse().map((function(t){return[t,C[t]]})),!0):F.map((function(t){return[t,C[t]]}))).map((function(t){return t[1]}))},hideLegend:n||!1===(null===(b=t.layout)||void 0===b?void 0:b.showlegend),width:null===(x=t.layout)||void 0===x?void 0:x.width,height:D,innerRadius:T,hideLabels:V,showLabelsInPercent:!w.textinfo||["percent","label+percent"].includes(w.textinfo),roundCorners:!0,order:"sorted"}},renderer:qy},sankey:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y=t.data[0],m=y.link,b=y.node,x=(null!==(u=null==m?void 0:m.value)&&void 0!==u?u:[]).map((function(t,n){var i,e;return Il(t)||Il(null===(i=null==m?void 0:m.source)||void 0===i?void 0:i[n])||Il(null===(e=null==m?void 0:m.target)||void 0===e?void 0:e[n])?null:{value:t,source:null==m?void 0:m.source[n],target:null==m?void 0:m.target[n]}})).filter((function(t){return null!==t&&t.source>=0&&t.target>=0&&t.source!==t.target})),w=Pg(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null==b?void 0:b.color,i,r),M={nodes:null===(c=b.label)||void 0===c?void 0:c.map((function(n,e){var o,u,a;return{nodeId:e,name:n,color:_g(w,e,n,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r)}})),links:x.map((function(t,n){return(0,o.Cl)({},t)}))},C={root:(0,o.Cl)({},(null===(f=null===(d=t.layout)||void 0===d?void 0:d.font)||void 0===f?void 0:f.size)?{fontSize:null===(v=t.layout.font)||void 0===v?void 0:v.size}:{})};return{data:{chartTitle:zg(t.layout).chartTitle,SankeyChartData:M},width:null===(h=t.layout)||void 0===h?void 0:h.width,height:null!==(g=null===(p=t.layout)||void 0===p?void 0:p.height)&&void 0!==g?g:468,styles:C,enableReflow:!1}},renderer:nm},table:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,D,V,N,O=t.data[0],T=null!==(a=null===(u=O.cells)||void 0===u?void 0:u.values)&&void 0!==a?a:[],E=function(t,n){var i,e,r,u,a,l,s,c,d,f;return{values:null!==(e=null!==(i=null==t?void 0:t.values)&&void 0!==i?i:null==n?void 0:n.values)&&void 0!==e?e:[],align:null!==(r=null==t?void 0:t.align)&&void 0!==r?r:null==n?void 0:n.align,fill:(0,o.Cl)((0,o.Cl)({},null!==(u=null==n?void 0:n.fill)&&void 0!==u?u:{}),null!==(a=null==t?void 0:t.fill)&&void 0!==a?a:{}),font:(0,o.Cl)((0,o.Cl)({},null!==(l=null==n?void 0:n.font)&&void 0!==l?l:{}),null!==(s=null==t?void 0:t.font)&&void 0!==s?s:{}),format:null!==(c=null==t?void 0:t.format)&&void 0!==c?c:null==n?void 0:n.format,prefix:null!==(d=null==t?void 0:t.prefix)&&void 0!==d?d:null==n?void 0:n.prefix,suffix:null!==(f=null==t?void 0:t.suffix)&&void 0!==f?f:null==n?void 0:n.suffix}}(O.cells,null===(f=null===(d=null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.data)||void 0===c?void 0:c.table)||void 0===d?void 0:d[0])||void 0===f?void 0:f.cells),F=T[0].map((function(t,n){return T.map((function(t,i){var e,r,u,a=t[n],l="string"==typeof a?by(a):a,s="string"==typeof l||"number"==typeof l?function(t,n,i){if(null===t||"boolean"==typeof t)return t;var e=Array.isArray(i.format)?i.format[n]:i.format,r=Array.isArray(i.prefix)?i.prefix[n]:i.prefix,o=Array.isArray(i.suffix)?i.suffix[n]:i.suffix,u=t;if("number"==typeof t)if("string"==typeof e)try{u=zu(e)(t)}catch(n){u=$s(t)}else u=$s(t);return"".concat(null!=r?r:"").concat(u).concat(null!=o?o:"")}(l,i,E):l,c=xy(null===(e=null==E?void 0:E.font)||void 0===e?void 0:e.color,n,i),d=xy(null===(r=null==E?void 0:E.font)||void 0===r?void 0:r.size,n,i),f=xy(null===(u=null==E?void 0:E.fill)||void 0===u?void 0:u.color,n,i),v=xy(null==E?void 0:E.align,n,i);return{value:s,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},c?{color:c}:{}),"number"==typeof d?{fontSize:d}:{}),f?{backgroundColor:f}:{}),v?{textAlign:v}:{})}}))})),B={root:(0,o.Cl)({},(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.size)?{fontSize:t.layout.font.size}:{})},P=null===(b=null===(m=null===(y=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.data)||void 0===y?void 0:y.table)||void 0===m?void 0:m[0])||void 0===b?void 0:b.header,_=O.header,H={align:null!==(x=null==_?void 0:_.align)&&void 0!==x?x:null==P?void 0:P.align,fill:(0,o.Cl)((0,o.Cl)({},null!==(w=null==P?void 0:P.fill)&&void 0!==w?w:{}),null!==(M=null==_?void 0:_.fill)&&void 0!==M?M:{}),font:(0,o.Cl)((0,o.Cl)({},null!==(C=null==P?void 0:P.font)&&void 0!==C?C:{}),null!==(k=null==_?void 0:_.font)&&void 0!==k?k:{}),values:null!==(S=null!==(A=null==_?void 0:_.values)&&void 0!==A?A:null==P?void 0:P.values)&&void 0!==S?S:[]};return{headers:function(t,n){return(Array.isArray(t[0])?t.map((function(t){return t.map((function(t){return by(t)})).filter(Boolean).join(" ")})):t.map((function(t){return by(t)}))).map((function(t,i){var e,r,u,a=xy(null===(e=null==n?void 0:n.font)||void 0===e?void 0:e.color,0,i),l=xy(null===(r=null==n?void 0:n.font)||void 0===r?void 0:r.size,0,i),s=xy(null===(u=null==n?void 0:n.fill)||void 0===u?void 0:u.color,0,i),c=xy(null==n?void 0:n.align,0,i);return{value:t,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},"string"==typeof a?{color:a}:{}),"number"==typeof l?{fontSize:l}:{}),"string"==typeof s?{backgroundColor:s}:{}),c?{textAlign:c}:{})}}))}(null!==(D=null===(L=O.header)||void 0===L?void 0:L.values)&&void 0!==D?D:[],H),rows:F,width:null===(V=t.layout)||void 0===V?void 0:V.width,height:null===(N=t.layout)||void 0===N?void 0:N.height,styles:B}},renderer:um},horizontalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M=Vy(t.data,t.layout,n),C=M.legends,k=M.hideLegend,A=void 0,S=t.data.map((function(n,o){var u,a,l,s;A=Ig(t.layout,n,A);var c=Pg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r),d=C[o];return n.y.map((function(e,o){var u,a,l,s,f,v,h,p,g;if(Il(e))return null;var y=A?A(Rl(null===(u=n.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[o%(null===(s=n.marker)||void 0===s?void 0:s.color).length]:0):_g(c,o,d,i,null===(h=null===(v=null===(f=t.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===h?void 0:h.colorway,r),m=Hg(n,o);return{x:Il(null===(p=n.x)||void 0===p?void 0:p[o])?0:n.x[o],y:e,legend:d,color:null!==(g=Po(y).copy({opacity:m}).formatHex8())&&void 0!==g?g:y}})).filter((function(t){return null!==t}))})).flat(),L=null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:450,D=L-(null!==(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.margin)||void 0===s?void 0:s.l)&&void 0!==c?c:0)-(null!==(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.margin)||void 0===f?void 0:f.pad)&&void 0!==v?v:0),V=new Set(S.map((function(t){return t.y}))).size||1,N=D/(V*(1+1/(1+.01*V)));return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:S,secondaryYAxistitle:"string"==typeof(null===(p=null===(h=t.layout)||void 0===h?void 0:h.yaxis2)||void 0===p?void 0:p.title)?null===(y=null===(g=t.layout)||void 0===g?void 0:g.yaxis2)||void 0===y?void 0:y.title:(null===(x=null===(b=null===(m=t.layout)||void 0===m?void 0:m.yaxis2)||void 0===b?void 0:b.title)||void 0===x?void 0:x.text)||"",barHeight:N,showYAxisLables:!0,height:L,width:null===(w=t.layout)||void 0===w?void 0:w.width,hideTickOverlap:!0,hideLegend:k,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0},zg(t.layout)),Fy(t.data,t.layout)),_y(t.data,t.layout,!0)),Iy(t.data,t.layout))},renderer:Jy},groupedverticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s=(0,o.Cl)({},t);if(t.data.some((function(t){return"bar"===t.type&&Hl(t.y)}))){var c=t.data.map((function(t,n){return"bar"===t.type&&Hl(t.y)?function(t,n){if(!t||0===t.length)return{traces:[],x:[]};var i=n&&n.length===t.length?n:t.map((function(t,n){return"Item ".concat(n+1)})),e=t.map((function(t,n){var e;if("object"==typeof t&&null!==t){var r=ny(t),o={};return Object.keys(r).forEach((function(t){var n=r[t];!function(t){var n=t.toLowerCase();return!(!n.includes("style")&&"style"!==n&&!new RegExp("^(color|fill|stroke|border|background|font|shadow|outline|margin|padding|gap|align|justify|display|flex|grid|text|line|letter|word|vertical|horizontal|overflow|position|top|right|bottom|left|zindex|z-index|opacity|filter|clip|cursor|resize|transition|animation|transform|box|column|row|direction|visibility|content|width|height|aspect|image|user|pointer|caret|scroll|%)|(-webkit-|-moz-|-ms-|-o-)","i").test(n))}(t)&&("number"==typeof n||"string"==typeof n&&Nl(n))&&(o[t]=n)})),o}return"number"==typeof t||"string"==typeof t&&Nl(t)?((e={})[i[n]||"item_".concat(n)]=t,e):{}})),r=new Set;e.forEach((function(t){Object.keys(t).forEach((function(t){return r.add(t)}))}));var o=[];return r.forEach((function(t){var n=[],r=!1,u=!1;if(e.forEach((function(i,e){var o=i[t];"number"==typeof o?(n.push(o),r=!0,u=!0):"string"==typeof o&&Nl(o)&&(n.push(parseFloat(o)),r=!0,u=!0)})),r&&u){var a={type:"bar",name:t,x:i,y:n};o.push(a)}})),{traces:o,x:i}}(t.y,Array.isArray(t.x)?t.x:void 0).traces.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{marker:t.marker})})):[t]})).flat();s=(0,o.Cl)((0,o.Cl)({},t),{data:c})}var d=[],f=Jg(s.data,s.layout),v=Vy(s.data,s.layout,n),h=v.legends,p=v.hideLegend,g=void 0,y=Yg(s.data[0],s.layout);s.data.forEach((function(t,n){var u,a,l,c,f,v,p,m,b,x,w;g=Ig(s.layout,t,g);var M=h[n],C=Dy(t);if("bar"===t.type){var k=Pg(null===(l=null===(a=null===(u=s.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(c=t.marker)||void 0===c?void 0:c.color,i,r);d.push({type:"bar",legend:M,key:M,data:t.x.map((function(n,e){var o,u,a,l,c,d,f,v,h;if(!Il(n)&&!Il(null===(o=t.y)||void 0===o?void 0:o[e])){var p=g?g(Rl(null===(u=t.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=t.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[e%(null===(c=t.marker)||void 0===c?void 0:c.color).length]:0):_g(k,e,M,i,null===(v=null===(f=null===(d=s.layout)||void 0===d?void 0:d.template)||void 0===f?void 0:f.layout)||void 0===v?void 0:v.colorway,r),m=Hg(t,e),b=t.y[e];return{x:n.toString(),y:b,yAxisCalloutData:qg(b,y),color:null!==(h=Po(p).copy({opacity:m}).formatHex8())&&void 0!==h?h:p}}})).filter((function(t){return void 0!==t})),useSecondaryYScale:Kg(t,s.layout)})}else if("scatter"===t.type){var A=Pg(null===(p=null===(v=null===(f=s.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===p?void 0:p.colorway,e,null===(m=t.line)||void 0===m?void 0:m.color,i,r),S=_g(A,n,M,i,null===(w=null===(x=null===(b=s.layout)||void 0===b?void 0:b.template)||void 0===x?void 0:x.layout)||void 0===w?void 0:w.colorway,r),L=wy(t.line),D=Hg(t,n);Oy(t).forEach((function(n){var i,e=n[0],r=n[1],u=t.x.slice(e,r),a=t.y.slice(e,r);d.push({type:"line",legend:M,legendShape:C,data:u.map((function(t,n){var i=a[n];return{x:t.toString(),y:i,yAxisCalloutData:qg(i,y)}})),color:null!==(i=Po(S).copy({opacity:D}).formatHex8())&&void 0!==i?i:S,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=L?L:{}),{mode:t.mode}),useSecondaryYScale:Kg(t,s.layout)})}))}}));var m=gy(s.layout,s.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({dataV2:d,width:null===(u=s.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=s.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,barwidth:"auto",mode:"plotly"},f),{hideTickOverlap:!0,hideLegend:p,roundCorners:!0,wrapXAxisLables:!0,showYAxisLables:!0}),zg(s.layout)),Fy(s.data,s.layout)),Xg(s.data[0],s.layout)),$g(s.data[0],s.layout)),y),_y(s.data,s.layout)),Iy(s.data,s.layout)),m?{annotations:m}:{})},renderer:em},verticalstackedbar:{transformer:yy,renderer:Zy},heatmap:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,D,V,N,O,T,E,F,B,P,_,H,I=t.data[0],W=[],R=Number.POSITIVE_INFINITY,j=Number.NEGATIVE_INFINITY;if("histogram2d"===I.type){var z=[],$=[],Y=[];null===(u=I.x)||void 0===u||u.forEach((function(t,n){var i,e,r=null!==(i=Ny(I.z,n))&&void 0!==i?i:0;Il(t)||Il(null===(e=I.y)||void 0===e?void 0:e[n])||(z.push(t),$.push(I.y[n]),Y.push(r))}));var X=_l(z),G=_l($),U=Ay(z,null===(a=I.xbins)||void 0===a?void 0:a.start,null===(l=I.xbins)||void 0===l?void 0:l.end,null===(s=I.xbins)||void 0===s?void 0:s.size),q=Ay($,null===(c=I.ybins)||void 0===c?void 0:c.start,null===(d=I.ybins)||void 0===d?void 0:d.end,null===(f=I.ybins)||void 0===f?void 0:f.size),Z=q.map((function(){return U.map((function(){return[]}))})),K=0;z.forEach((function(t,n){var i=My(U,t,X),e=My(q,$[n],G);-1!==i&&-1!==e&&Z[e][i].push(Y[n])}));var J=Z.map((function(t){return t.map((function(t){var n=Sy(I.histfunc,t);return K+=n,n}))}));U.forEach((function(t,n){q.forEach((function(i,e){var r=Ly(I.histnorm,J[e][n],K,X?t.length:Cy(t),G?i.length:Cy(i));W.push({x:X?t.join(", "):ky(t),y:G?i.join(", "):ky(i),value:r,rectText:r}),"number"==typeof r&&(R=Math.min(R,r),j=Math.max(j,r))}))}))}else null===(v=I.x)||void 0===v||v.forEach((function(n,i){var e;null===(e=I.y)||void 0===e||e.forEach((function(e,r){var o,u,a,l,s,c,d=null===(u=null===(o=I.z)||void 0===o?void 0:o[r])||void 0===u?void 0:u[i];W.push({x:"date"===(null===(l=null===(a=t.layout)||void 0===a?void 0:a.xaxis)||void 0===l?void 0:l.type)||null!=n?n:0,y:(null===(c=null===(s=t.layout)||void 0===s?void 0:s.yaxis)||void 0===c||c.type,e),value:d,rectText:d}),"number"==typeof d&&(R=Math.min(R,d),j=Math.max(j,d))}))}));var Q={legend:null!==(h=I.name)&&void 0!==h?h:"",data:W,value:0},tt=[R,(j+R)/2,j],nt=[fs(os.color1),fs(os.color2),fs(os.color3)],it=null!==(N=null!==(k=null!==(x=null!==(y=null!==(p=null==I?void 0:I.colorscale)&&void 0!==p?p:null===(g=t.layout)||void 0===g?void 0:g.colorscale)&&void 0!==y?y:null===(b=null===(m=t.layout)||void 0===m?void 0:m.coloraxis)||void 0===b?void 0:b.colorscale)&&void 0!==x?x:null===(C=null===(M=null===(w=t.layout)||void 0===w?void 0:w.template)||void 0===M?void 0:M.layout)||void 0===C?void 0:C.colorscale)&&void 0!==k?k:"histogram2d"===I.type&&(null===(V=null===(D=null===(L=null===(S=null===(A=t.layout)||void 0===A?void 0:A.template)||void 0===S?void 0:S.data)||void 0===L?void 0:L.histogram2d)||void 0===D?void 0:D[0])||void 0===V?void 0:V.colorscale))&&void 0!==N?N:null===(B=null===(F=null===(E=null===(T=null===(O=t.layout)||void 0===O?void 0:O.template)||void 0===T?void 0:T.data)||void 0===E?void 0:E.heatmap)||void 0===F?void 0:F[0])||void 0===B?void 0:B.colorscale;if(it&&"object"==typeof it&&("diverging"in it||"sequential"in it||"sequentialminus"in it)){var et=R>=0,rt=j<=0;R<0&&j>0?it=null==it?void 0:it.diverging:et?it=null==it?void 0:it.sequential:rt&&(it=null==it?void 0:it.sequentialminus)}var ot=Array.isArray(it)?it.map((function(t){return t[0]*(j-R)+R})):tt,ut=Array.isArray(it)?it.map((function(t){return t[1]})):nt;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:[Q],domainValuesForColorScale:ot,rangeValuesForColorScale:ut,hideLegend:!0,showYAxisLables:!0,sortOrder:"none",width:null===(P=t.layout)||void 0===P?void 0:P.width,height:null!==(H=null===(_=t.layout)||void 0===_?void 0:_.height)&&void 0!==H?H:350,hideTickOverlap:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:!0},zg(t.layout)),Fy([I],t.layout)),Iy(t.data,t.layout))},renderer:tm},gauge:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,D,V,N,O,T,E,F,B,P,_,H,I,W,R,j,z,$,Y,X,G,U,q,Z,K,J,Q,tt,nt,it,et,rt,ot,ut,at,lt,st=t.data[0],ct=(null===(o=st.gauge)||void 0===o?void 0:o.steps)?st.gauge.steps.map((function(t){return t.color})):void 0,dt=Pg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,ct,i,r),ft=(null===(c=null===(s=st.gauge)||void 0===s?void 0:s.steps)||void 0===c?void 0:c.length)?st.gauge.steps.map((function(n,e){var o,u,a,l,s,c=n.name||"Segment ".concat(e+1),d=_g(dt,e,c,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r);return{legend:c,size:(null===(l=n.range)||void 0===l?void 0:l[1])-(null===(s=n.range)||void 0===s?void 0:s[0]),color:d}})):[{legend:"Current",size:null!==(d=st.value)&&void 0!==d?d:0-(null!==(p=null===(h=null===(v=null===(f=st.gauge)||void 0===f?void 0:f.axis)||void 0===v?void 0:v.range)||void 0===h?void 0:h[0])&&void 0!==p?p:0),color:Qg(null===(m=null===(y=null===(g=t.layout)||void 0===g?void 0:g.template)||void 0===y?void 0:y.layout)||void 0===m?void 0:m.colorway,e,null===(x=null===(b=st.gauge)||void 0===b?void 0:b.axis)||void 0===x?void 0:x.color,i,r)},{legend:"Target",size:(null!==(k=null===(C=null===(M=null===(w=st.gauge)||void 0===w?void 0:w.axis)||void 0===M?void 0:M.range)||void 0===C?void 0:C[1])&&void 0!==k?k:100)-(null!==(A=st.value)&&void 0!==A?A:0),color:os.disabled}];if(null===(S=st.delta)||void 0===S?void 0:S.reference){var vt=st.value-st.delta.reference;if(vt>=0){at="▲ ".concat(vt);var ht=Pg(null===(V=null===(D=null===(L=t.layout)||void 0===L?void 0:L.template)||void 0===D?void 0:D.layout)||void 0===V?void 0:V.colorway,e,null===(O=null===(N=st.delta)||void 0===N?void 0:N.increasing)||void 0===O?void 0:O.color,i,r);lt=_g(ht,0,"",i,null===(F=null===(E=null===(T=t.layout)||void 0===T?void 0:T.template)||void 0===E?void 0:E.layout)||void 0===F?void 0:F.colorway,r)}else{at="▼ ".concat(Math.abs(vt));var pt=Pg(null===(_=null===(P=null===(B=t.layout)||void 0===B?void 0:B.template)||void 0===P?void 0:P.layout)||void 0===_?void 0:_.colorway,e,null===(I=null===(H=st.delta)||void 0===H?void 0:H.decreasing)||void 0===I?void 0:I.color,i,r);lt=_g(pt,0,"",i,null===(j=null===(R=null===(W=t.layout)||void 0===W?void 0:W.template)||void 0===R?void 0:R.layout)||void 0===j?void 0:j.colorway,r)}}var gt={sublabel:{fill:lt}},yt=zg(t.layout).chartTitle;return{segments:ft,chartValue:null!==(z=st.value)&&void 0!==z?z:0,chartTitle:yt,sublabel:at,minValue:"number"==typeof(null===(X=null===(Y=null===($=st.gauge)||void 0===$?void 0:$.axis)||void 0===Y?void 0:Y.range)||void 0===X?void 0:X[0])?null===(q=null===(U=null===(G=st.gauge)||void 0===G?void 0:G.axis)||void 0===U?void 0:U.range)||void 0===q?void 0:q[0]:void 0,maxValue:"number"==typeof(null===(J=null===(K=null===(Z=st.gauge)||void 0===Z?void 0:Z.axis)||void 0===K?void 0:K.range)||void 0===J?void 0:J[1])?null===(nt=null===(tt=null===(Q=st.gauge)||void 0===Q?void 0:Q.axis)||void 0===tt?void 0:tt.range)||void 0===nt?void 0:nt[1]:void 0,chartValueFormat:function(){var t,n;return null!==(n=null===(t=st.value)||void 0===t?void 0:t.toString())&&void 0!==n?n:""},width:null===(it=t.layout)||void 0===it?void 0:it.width,height:null!==(rt=null===(et=t.layout)||void 0===et?void 0:et.height)&&void 0!==rt?rt:220,styles:gt,variant:(null===(ut=null===(ot=st.gauge)||void 0===ot?void 0:ot.steps)||void 0===ut?void 0:ut.length)?sg.MultipleSegments:sg.SingleSegment,roundCorners:!0}},renderer:im},verticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c=[],d=Vy(t.data,t.layout,n),f=d.legends,v=d.hideLegend,h=void 0;t.data.forEach((function(n,u){var a,l,s,d,v,p,g;if(n.x){h=Ig(t.layout,n,h);var y=Pg(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null===(d=n.marker)||void 0===d?void 0:d.color,i,r),m=[],b=[];n.x.forEach((function(t,i){var e,r=null!==(e=Ny(n.y,i))&&void 0!==e?e:0;Il(t)||(m.push(t),b.push(r))}));var x=_l(m),w=Ay(m,null===(v=n.xbins)||void 0===v?void 0:v.start,null===(p=n.xbins)||void 0===p?void 0:p.end,null===(g=n.xbins)||void 0===g?void 0:g.size),M=w.map((function(){return[]})),C=0;m.forEach((function(t,n){var i=My(w,t,x);-1!==i&&M[i].push(b[n])}));var k=M.map((function(t){var i=Sy(n.histfunc,t);return C+=i,i}));w.forEach((function(e,a){var l,s,d,v,p,g,m,b,w=f[u],M=h?h(Rl(null===(l=n.marker)||void 0===l?void 0:l.color)?null===(d=null===(s=n.marker)||void 0===s?void 0:s.color)||void 0===d?void 0:d[a%(null===(v=n.marker)||void 0===v?void 0:v.color).length]:0):_g(y,a,w,i,null===(m=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.layout)||void 0===m?void 0:m.colorway,r),A=Hg(n,a),S=Ly(n.histnorm,k[a],C,x?e.length:Cy(e));c.push((0,o.Cl)({x:x?e.join(", "):ky(e),y:S,legend:w,color:null!==(b=Po(M).copy({opacity:A}).formatHex8())&&void 0!==b?b:M},x?{}:{xAxisCalloutData:"[".concat(e.x0," - ").concat(e.x1,")")}))}))}}));var p=gy(t.layout,t.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:c,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=t.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,supportNegativeData:!0,mode:"histogram",hideTickOverlap:!0,maxBarWidth:50,hideLegend:v,roundCorners:!0,wrapXAxisLables:"string"==typeof(null===(s=c[0])||void 0===s?void 0:s.x),showYAxisLables:!0},zg(t.layout)),Fy(t.data,t.layout)),Xg(t.data[0],t.layout)),p?{annotations:p}:{})},renderer:rm},area:{transformer:function(t,n,i,e,r){return my(t,n,"area",i,e,r)},renderer:Qy,preTransformOperation:lm},line:{transformer:function(t,n,i,e,r){return my(t,n,"line",i,e,r)},renderer:Ky,preTransformOperation:lm},scatter:{transformer:function(t,n,i,e,r){return my(t,n,"scatter",i,e,r)},renderer:om,preTransformOperation:lm},funnel:{transformer:function(t,n,i,e,r){var o,u,a,l,s=[],c=t.data.length>1&&t.data.every((function(t){var n,i,e,r,o=null!==(i=null!==(n=t.values)&&void 0!==n?n:t.x)&&void 0!==i?i:t.value,u=null!==(r=null!==(e=t.labels)&&void 0!==e?e:t.y)&&void 0!==r?r:t.stage;return Array.isArray(u)&&Array.isArray(o)&&o.length>1&&u.length>1}));if(c){var d={};t.data.forEach((function(n,o){var u,a,l,c,f,v,h,p,g,y,m,b,x,w=n.name||"Category ".concat(o+1),M=Pg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(f=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==f?f:null===(v=n.marker)||void 0===v?void 0:v.color,i,r),C=_g(M,0,w,i,null===(g=null===(p=null===(h=t.layout)||void 0===h?void 0:h.template)||void 0===p?void 0:p.layout)||void 0===g?void 0:g.colorway,r);d[w]=C;var k=null!==(m=null!==(y=n.labels)&&void 0!==y?y:n.y)&&void 0!==m?m:n.stage,A=null!==(x=null!==(b=n.values)&&void 0!==b?b:n.x)&&void 0!==x?x:n.value;Rl(k)&&Rl(A)&&k&&Rl(k)&&k.length>0&&k.forEach((function(t,n){var i=s.findIndex((function(n){return n.stage===t})),e=Number(A[n]);isNaN(e)||(-1===i?s.push({stage:t,subValues:[{category:w,value:e,color:C}]}):s[i].subValues.push({category:w,value:e,color:C}))}))}))}else t.data.forEach((function(n,o){var u,a,l,c,d,f,v=function(t){var n,i,e,r,o=t.orientation||"h",u=null!==(i=null!==(n=t.labels)&&void 0!==n?n:t.y)&&void 0!==i?i:t.stage,a=null!==(r=null!==(e=t.values)&&void 0!==e?e:t.x)&&void 0!==r?r:t.value,l=_l(a),s=_l(u),c=Fl(a),d=Fl(u),f=function(t){return Array.isArray(t)?t:"string"==typeof t||"number"==typeof t?[t]:[]};return"h"===o?s&&c?{categories:f(u),values:f(a)}:l&&d?{categories:f(a),values:f(u)}:{categories:f(s?u:a),values:f(s?a:u)}:l&&d?{categories:f(a),values:f(u)}:s&&c?{categories:f(u),values:f(a)}:{categories:f(l?a:u),values:f(l?u:a)}}(n),h=v.categories,p=v.values;if(Rl(h)&&Rl(p)){var g=Pg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(d=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==d?d:null===(f=n.marker)||void 0===f?void 0:f.color,i,r);h.forEach((function(n,e){var o,u,a,l=_g(g,e,n,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r),c=Number(p[e]);isNaN(c)||s.push({stage:n,value:c,color:l})}))}}));return{data:s,width:null===(o=t.layout)||void 0===o?void 0:o.width,height:null===(u=t.layout)||void 0===u?void 0:u.height,orientation:"v"===(null===(a=t.data[0])||void 0===a?void 0:a.orientation)?"horizontal":"vertical",hideLegend:n||!1===(null===(l=t.layout)||void 0===l?void 0:l.showlegend)}},renderer:cg},gantt:{transformer:function(t,n,i,e,r){var u,a,l,s=t.data.filter((function(t){return"scatter"!==t.type||"markers"!==t.mode})),c=Vy(s,t.layout,n),d=c.legends,f=c.hideLegend,v=void 0,h=zy(s,jy(s,t.layout).x),p=$y(h,Py),g=function(t){var n=p(t);return"string"==typeof n?0:null!=n?n:0},y="date"===h,m=[];return s.forEach((function(n,o){var u,a,l,s,c=d[o];if("bar"===n.type){v=Ig(t.layout,n,v);var f=Pg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r);n.y.forEach((function(e,o){var u,a,l,s,d,h,p,b,x,w;if(!Il(e)){var M=v?v(Rl(null===(u=n.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[o%(null===(s=n.marker)||void 0===s?void 0:s.color).length]:0):_g(f,o,c,i,null===(p=null===(h=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===h?void 0:h.layout)||void 0===p?void 0:p.colorway,r),C=Hg(n,o),k=+g(null===(b=n.base)||void 0===b?void 0:b[o]),A=+g(null===(x=n.x)||void 0===x?void 0:x[o]);m.push({x:{start:y?new Date(k):k,end:y?new Date(k+A):k+A},y:e,legend:c,color:null!==(w=Po(M).copy({opacity:C}).formatHex8())&&void 0!==w?w:M})}}))}else if("scatter"===n.type&&"none"===n.mode&&"toself"===n.fill)for(var h=0;h<n.y.length;h+=5)if(!Il(n.y[h])&&!Il(n.y[h+3])){var p=g(n.x[h]),b=g(n.x[h+1]),x=n.y[h],w=n.y[h+3];m.push({x:{start:p,end:b},y:Math.round((x+w)/2),legend:c,color:n.fillcolor})}})),(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:m,showYAxisLables:!0,height:null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:350,width:null===(l=t.layout)||void 0===l?void 0:l.width,hideTickOverlap:!0,hideLegend:f,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,useUTC:!1},zg(t.layout)),Fy(s,t.layout)),_y(s,t.layout,!0)),Iy(s,t.layout))},renderer:am},fallback:{transformer:yy,renderer:Zy}},cm=u.forwardRef((function(t,n){var i,e=t.colorwayType,r=void 0===e?"default":e,a=t.onSchemaChange,s=(0,o.Tt)(t,["colorwayType","onSchemaChange"]),c=Wl(s.chartSchema).plotlySchema,d=(t=>{var n;try{Wl(t)}catch(t){return{isValid:!1,errorMessage:`Invalid JSON: ${t}`}}try{let i=(t=>{var n;try{const i=t;if(!i)throw new Error("Plotly input is null or undefined");if("object"!=typeof i)throw new Error("Plotly input is not an object. Input type: "+typeof i);const e=jl(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.annotations);if(!Rl(i.data)){if(e)return{...i,data:[]};throw new Error("Plotly input data is not a valid array or typed array")}if(0===i.data.length){if(e)return{...i,data:[]};throw new Error("Plotly input data is empty")}return i}catch(t){throw new Error(`Invalid plotly schema: ${t}`)}})(t);try{i=Dl(i)}catch(t){return{isValid:!1,errorMessage:`Failed to decode plotly schema: ${t}`}}const e=jl(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.annotations),r=Rl(i.data)&&i.data.length>0,o=r?((t,n)=>{const i=[],e=t.map(((t,e)=>{const r=t.type;if(r&&Gl[r]){const o=Gl[r];for(const r of o)try{r(t,n)}catch(n){return i.push(`data[${e}] - type: ${t.type}, ${n}`),[-1,""]}}return[e,null!=r?r:""]})).filter((t=>t[0]>=0));if(0===e.length)throw new Error(i.join("; "));return e})(i.data,i.layout):[];if(!r&&e)return{isValid:!0,type:"annotation",validTracesInfo:[]};let u=!1,a=o.map((t=>{var n,e,r;const o=t[0],a=i.data[o];switch(a.type){case"pie":return{isValid:!0,traceIndex:o,type:"donut"};case"histogram2d":case"heatmap":return{isValid:!0,traceIndex:o,type:"heatmap"};case"sankey":return{isValid:!0,traceIndex:o,type:"sankey"};case"indicator":case"gauge":return{isValid:!0,traceIndex:o,type:"gauge"};case"histogram":return{isValid:!0,traceIndex:o,type:"verticalbar"};case"scatterpolar":return{isValid:!0,traceIndex:o,type:"scatterpolar"};case"table":return{isValid:!0,traceIndex:o,type:"table"};case"bar":const t=a;return"h"===t.orientation?Ul(t)?{isValid:!0,traceIndex:o,type:"gantt"}:{isValid:!0,traceIndex:o,type:"horizontalbar"}:Hl(t.y)?{isValid:!0,traceIndex:o,type:"groupedverticalbar"}:["group","overlay"].includes(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.barmode)?Fl(t.y)?{isValid:!0,traceIndex:o,type:"groupedverticalbar"}:{isValid:!1,errorMessage:"GVBC does not support string y-axis."}:{isValid:!0,traceIndex:o,type:"verticalstackedbar"};case"funnel":case"funnelarea":return{isValid:!0,traceIndex:o,type:"funnel"};case"scatter":case"scattergl":const l=a;if(ts(l,u))return u=!0,{isValid:!0,traceIndex:o,type:"gantt"};const s=$l(null!==(e=l.mode)&&void 0!==e?e:""),c=Array.isArray(null===(r=null==i?void 0:i.layout)||void 0===r?void 0:r.shapes)&&i.layout.shapes.some((t=>"line"===t.type));if(s)return{isValid:!0,traceIndex:o,type:c&&Jl(l,i.layout)?"line":"scatter"};const d=Kl(l);return Ql(l,i.layout)?{isValid:!0,traceIndex:o,type:"fallback"}:{isValid:!0,traceIndex:o,type:d?"area":"line"};default:return{isValid:!1,errorMessage:`${Vl} ${a.type}`}}}));if(a.every((t=>!t.isValid)))return{isValid:!1,errorMessage:a.filter((t=>!t.isValid)).map((t=>t.errorMessage)).filter(((t,n,i)=>t&&i.indexOf(t)===n)).join("; ")};a=a.filter((t=>t.isValid));const l=a.map((t=>({index:t.traceIndex,type:t.type}))),s=a.some((t=>"groupedverticalbar"===t.type||"verticalstackedbar"===t.type));if(a.some((t=>"line"===t.type||"fallback"===t.type))){if(s)return{isValid:!0,type:a.some((t=>"verticalstackedbar"===t.type))?"fallback":"groupedverticalbar",validTracesInfo:l};if(a.some((t=>"fallback"===t.type)))return{isValid:!0,type:"fallback",validTracesInfo:l}}const c=new Set(a.map((t=>t.type)));return c.size>1?{isValid:!0,type:"composite",validTracesInfo:l}:{isValid:!0,type:Array.from(c)[0],validTracesInfo:l}}catch(t){return{isValid:!1,errorMessage:`Invalid plotly schema: ${t}`}}})(c);if(!d.isValid)throw new Error("Invalid chart schema: ".concat(d.errorMessage));var f=c;try{f=Dl(f)}catch(t){throw new Error("Failed to decode plotly schema: ".concat(t))}var v=(0,o.Cl)((0,o.Cl)({},f),{data:d.validTracesInfo.map((function(t){return f.data[t.index]}))}),h=d.validTracesInfo.map((function(t,n){return{index:n,type:t.type}})),p=c.selectedLegends,g=u.useRef(new Map),y=bg(),m=null!==(i=null==y?void 0:y.isInverted)&&void 0!==i&&i,b=u.useRef([]),x=u.useRef(!1),w=u.useRef(null),M=u.useRef(null);Rl(p)||(p=[]);var C=u.useState(p),k=C[0],A=C[1],S=u.useCallback((function(t){A(t),a&&a({plotlySchema:{plotlyInput:f,selectedLegends:t}})}),[a,f]);u.useEffect((function(){var t=Wl(s.chartSchema).plotlySchema.selectedLegends;A(null!=t?t:[])}),[s.chartSchema]);var L={legendProps:{canSelectMultipleLegends:!0,onChange:S,selectedLegends:k},calloutProps:{layerProps:{eventBubblingEnabled:!0}}},D=u.useCallback((function(t){return(0,o.sH)(void 0,void 0,void 0,(function(){var n,i,e,r;return(0,o.YH)(this,(function(u){if(!M.current)throw new Error("Container reference is null");if(n=(0,o.Cl)({background:Ks(M.current,y.semanticColors.bodyBackground),scale:5},t),!x.current){if(!(null===(e=null===(i=b.current[0])||void 0===i?void 0:i.compRef)||void 0===e?void 0:e.toImage))throw new Error("Chart cannot be exported as image");return[2,b.current[0].compRef.toImage(n)]}return[2,tf(b.current.map((function(t){var n;return{container:null===(n=t.compRef)||void 0===n?void 0:n.chartContainer,row:t.row,col:t.col}})),null===(r=w.current)||void 0===r?void 0:r.toSVG,(0,l.jI)(),(0,o.Cl)({background:Ks(M.current,y.semanticColors.bodyBackground),scale:5},t))]}))}))}),[y]);if(u.useImperativeHandle(s.componentRef,(function(){return{exportAsImage:D}}),[D]),"scatterpolar"===d.type){var V=function(t){for(var n,i,e,r,u,a,l,s,c,d=(0,o.Cl)({},t),f=0,v=0,h=0;h<t.data.length;h++){var p=t.data[h].r;if(p&&Rl(p))for(var g=0;g<p.length;g++)Il(p[g])||(f=Math.min(f,p[g]),v=Math.max(v,p[g]))}var y=f<0?-f:0,m=new Set;for(h=0;h<t.data.length;h++)(A=t.data[h]).theta&&Rl(A.theta)&&A.theta.forEach((function(t){return m.add(String(t))}));var b=[],x=[],w=null,M=function(s){var c=t.data[s];Rl(c.theta)&&(c.__axisLabel=Array.from(m)),c.x=[],c.y=[];var f=c.theta,v=c.r;if(!Rl(v)||!Rl(f))return d.data[s]=c,"continue";var h="clockwise"===(null===(e=null===(i=null===(n=t.layout)||void 0===n?void 0:n.polar)||void 0===i?void 0:i.angularaxis)||void 0===e?void 0:e.direction)?-1:1,p=(null!==(l=null===(a=null===(u=null===(r=t.layout)||void 0===r?void 0:r.polar)||void 0===u?void 0:u.angularaxis)||void 0===a?void 0:a.rotation)&&void 0!==l?l:0)*Math.PI/180,g=[],M=!1;Fl(f)||(g=Array.from(new Set(f)),M=!0);for(var C=0;C<v.length;C++)if(!Il(null==f?void 0:f[C])&&!Il(null==v?void 0:v[C])){var k;k=M?p+h*g.indexOf(f[C])*(2*Math.PI/g.length):p+h*(f[C]*Math.PI/180);var A=v[C]+y,S=A*Math.cos(k),L=A*Math.sin(k);0===s&&0===C&&(w=y),c.x.push(S),c.y.push(L),b.push(S),x.push(L)}c.x&&c.y&&(c.data=c.x.map((function(t,n){return(0,o.Cl)({x:t,y:c.y[n]},c.text?{text:c.text[n]}:{})}))),d.data[s]=c};for(h=0;h<t.data.length;h++)M(h);if(null!==w){for(h=0;h<d.data.length;h++)(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t-w})));for(var C=0;C<b.length;C++)b[C]=b[C]-w}var k=Math.max.apply(Math,(0,o.fX)((0,o.fX)([],b.map(Math.abs),!1),x.map(Math.abs),!1));for(k=0===k?1:k,h=0;h<d.data.length;h++){var A;(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t/(2*k)})),A.y=A.y.map((function(t){return t/(2*k)})))}var S=(null===(s=t.layout)||void 0===s?void 0:s.width)||(null===(c=t.layout)||void 0===c?void 0:c.height)||500;return d.layout=(0,o.Cl)((0,o.Cl)({},d.layout),{width:S,height:S}),d.layout.__polarOriginX=null!=w?w:void 0,d}(v);v.data=V.data,v.layout=V.layout,h.forEach((function(t,n){var i,e;if("scatterpolar"===t.type){var r=null!==(e=null===(i=v.data[n])||void 0===i?void 0:i.mode)&&void 0!==e?e:"";r.includes("line")?h[n].type="line":r.includes("markers")||"text"===r?h[n].type="scatter":h[n].type="line"}}))}var N={},O=0;"annotation"===d.type?N.x=[]:v.data.forEach((function(t,n){var i,e="";Ey(d.validTracesInfo[n].type)?(e="".concat(Wg).concat(O+1),O++):e=null!==(i=t.xaxis)&&void 0!==i?i:"x",N[e]||(N[e]=[]),N[e].push(n)})),x.current=Object.keys(N).length>1;var T=function(t,n,i){var e,r,o=[],u=[],a={},l="1fr",s="1fr",c={};if(!n)return{templateRows:l,templateColumns:s,layout:c};var d=null==t?void 0:t.layout;if(null!=d&&Object.keys(d).length>0&&Object.keys(null!=d?d:{}).forEach((function(t){var n,i,e,r,a;if(t.startsWith("xaxis")){var c=Ty(t,"xaxis"),f=null!==(i=null===(n=d[t])||void 0===n?void 0:n.anchor)&&void 0!==i?i:"y";if(c!==(p=Ty(f,"y")))throw new Error("Invalid layout: xaxis ".concat(c+1," anchor should be y").concat(p+1));var v=d[t],h={start:(null==v?void 0:v.domain)?v.domain[0]:0,end:(null==v?void 0:v.domain)?v.domain[1]:1};o.push(h)}else if(t.startsWith("yaxis")){var p;if(c=Ty(t,"yaxis"),f=null!==(r=null===(e=d[t])||void 0===e?void 0:e.anchor)&&void 0!==r?r:"x",c!==(p=Ty(f,"x"))){if(1===c&&0===p||"right"===(null===(a=d.yaxis2)||void 0===a?void 0:a.side))return{templateRows:l,templateColumns:s};throw new Error("Invalid layout: yaxis ".concat(c+1," anchor should be x").concat(p+1))}var g=d[t],y={start:(null==g?void 0:g.domain)?g.domain[0]:0,end:(null==g?void 0:g.domain)?g.domain[1]:1};u.push(y)}})),r=o.length,i.forEach((function(n,i){var e,r,a,l,s;if(Ey(n.type)){var c=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e[i],d={start:(null===(r=c.domain)||void 0===r?void 0:r.x)?c.domain.x[0]:0,end:(null===(a=c.domain)||void 0===a?void 0:a.x)?c.domain.x[1]:1},f={start:(null===(l=c.domain)||void 0===l?void 0:l.y)?c.domain.y[0]:0,end:(null===(s=c.domain)||void 0===s?void 0:s.y)?c.domain.y[1]:1};o.push(d),u.push(f)}})),null!=d&&Object.keys(d).length>0&&(null===(e=d.annotations)||void 0===e||e.forEach((function(t){var n=o.flatMap((function(n,i){return(null==t?void 0:t.x)>=n.start&&(null==t?void 0:t.x)<=n.end?[i]:[]})),i=u.findIndex((function(i,e){return n.includes(e)&&(null==t?void 0:t.y)>=i.start&&(null==t?void 0:t.y)<=i.end}));-1!==i&&(void 0===a[i]&&(a[i]={}),90===(null==t?void 0:t.textangle)?a[i].yAnnotation=t.text:a[i].xAnnotation=t.text)}))),o.length>0){var f=new Map;o.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);f.has(n)||f.set(n,t)}));var v=Array.from(f.values()).map((function(t){return t.start})).sort();s="repeat(".concat(v.length,", 1fr)"),o.forEach((function(t,n){var i=n>=r?"".concat(Wg).concat(n-r+1):"x".concat(0===n?"":n+1),e=v.findIndex((function(n){return n===t.start}))+1,o=a[n],u={row:-1,column:e,xAnnotation:null==o?void 0:o.xAnnotation,xDomain:t,yDomain:{start:0,end:1}};c[i]=u}))}if(u.length>0){var h=new Map;u.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);h.has(n)||h.set(n,t)}));var p=Array.from(h.values()).map((function(t){return t.start})).sort(),g=p.length;l="repeat(".concat(g,", 1fr)"),u.forEach((function(t,n){var i=n>=r?"".concat(Wg).concat(n-r+1):"x".concat(0===n?"":n+1),e=p.findIndex((function(n){return n===t.start})),o=g-e,u=a[n],l=null==u?void 0:u.yAnnotation,s=c[i];void 0!==s&&(s.row=o,s.yAnnotation=l,s.yDomain=t)}))}return{templateRows:l,templateColumns:s,layout:c}}(v,x.current,d.validTracesInfo);if(x.current&&T.templateRows===Rg&&T.templateColumns===Rg){if("donut"===d.type){var E=Object.keys(N);E.forEach((function(t,n){n<E.length-1&&delete N[t]}))}else Object.keys(N).forEach((function(t,n){n>0&&delete N[t]}));x.current=!1}var F,B=function(t,n,i,e,r){var o=[];return t.data.reduce((function(t,n){return t||!0===n.showlegend||void 0===n.showlegend}),!1)&&t.data.forEach((function(u,a){var l,s,c,d,f,v,h,p,g,y,m,b,x,w;if("donut"===e[a].type){var M=u,C=Pg(null!==(s=null===(l=t.layout)||void 0===l?void 0:l.piecolorway)&&void 0!==s?s:null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===f?void 0:f.colorway,i,null!==(h=null===(v=t.layout)||void 0===v?void 0:v.piecolorway)&&void 0!==h?h:null===(p=null==M?void 0:M.marker)||void 0===p?void 0:p.colors,n,r,!0);null===(g=M.labels)||void 0===g||g.forEach((function(i,e){var u,a,l,s,c,d="".concat(i),f=_g(C,e,d,n,null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,r,!0);""!==d&&!1===o.some((function(t){return t.title===d}))&&o.push({title:d,color:f})}))}else if(!1===Ey(e[a].type)){var k=u,A=k.legendgroup,S=(null===(y=k.line)||void 0===y?void 0:y.color)||(null===(m=k.marker)||void 0===m?void 0:m.color),L=Dy(k),D=Pg(null===(w=null===(x=null===(b=t.layout)||void 0===b?void 0:b.template)||void 0===x?void 0:x.layout)||void 0===w?void 0:w.colorway,i,S,n,r);void 0!==A&&""!==A&&!1===o.some((function(t){return t.title===A}))&&o.push({title:A,color:D,shape:L})}})),{legends:o,centerLegends:!0,enabledWrapLines:!0,canSelectMultipleLegends:!0}}(v,g,r,d.validTracesInfo,m);return u.createElement(u.Fragment,null,u.createElement("div",{style:{display:"grid",gridTemplateRows:T.templateRows,gridTemplateColumns:T.templateColumns},ref:M},Object.entries(N).map((function(t,n){var i,e,a,l,s,c=t[0],f=t[1],p=(0,o.Cl)((0,o.Cl)({},v),{data:f.map((function(t){return v.data[t]}))}),y=h.filter((function(t){return f.includes(t.index)})),w="fallback"===d.type||"groupedverticalbar"===d.type?d.type:null!==(e=null===(i=y[0])||void 0===i?void 0:i.type)&&void 0!==e?e:d.type;h.some((function(t){return"line"===t.type}))&&h.some((function(t){return"scatter"===t.type}))&&(w="line");var M=sm[w];if(M){var C=M.transformer,k=M.renderer,A=M.preTransformCondition,S=M.preTransformOperation;if(void 0===A||A(p)){var D=S?S(p):p,V=T.layout[c],N="annotation"===w?{}:(0,o.Cl)((0,o.Cl)({},L),{xAxisAnnotation:null==V?void 0:V.xAnnotation,yAxisAnnotation:null==V?void 0:V.yAnnotation});return function(t,n,i,e,r,a){var l=n.apply(void 0,i);return u.createElement("div",{key:"".concat(r,"_").concat(a),style:{gridRowStart:r,gridRowEnd:r+1,gridColumnStart:a,gridColumnEnd:a+1}},u.createElement(t,(0,o.Cl)({},l,e)))}(k,C,[D,x.current,g,r,m],(0,o.Cl)((0,o.Cl)({},N),{xAxisAnnotation:null==V?void 0:V.xAnnotation,yAxisAnnotation:null==V?void 0:V.yAnnotation,componentRef:function(t){var i,e;b.current[n]={compRef:t,row:null!==(i=null==V?void 0:V.row)&&void 0!==i?i:1,col:null!==(e=null==V?void 0:V.column)&&void 0!==e?e:1}}}),null!==(a=null==V?void 0:V.row)&&void 0!==a?a:1,null!==(l=null==V?void 0:V.column)&&void 0!==l?l:1)}return u.createElement(u.Fragment,null)}throw new Error("Unsupported chart type :".concat(null===(s=p.data[0])||void 0===s?void 0:s.type))}))),x.current&&(F=B,u.createElement(vf,(0,o.Cl)({},F,{selectedLegends:k,onChange:S,ref:w}))))}));cm.displayName="DeclarativeChart",(0,i(887).v)("@fluentui/react-charting","0.0.0"),FluentUIReactCharting=e}();
|
|
1
|
+
var FluentUIReactCharting;!function(){"use strict";var t={40:function(t,n,i){i.d(n,{nr:function(){return s}});var e,r=i(823),o=i(638),u="__stylesheet__",a="undefined"!=typeof navigator&&/rv:11.0/.test(navigator.userAgent),l={};try{l=window||{}}catch(t){}var s=function(){function t(t,n){var i,e,o,u,a,l;this._rules=[],this._preservedRules=[],this._counter=0,this._keyToClassName={},this._onInsertRuleCallbacks=[],this._onResetCallbacks=[],this._classNameToArgs={},this._config=(0,r.Cl)({injectionMode:"undefined"==typeof document?0:1,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},t),this._classNameToArgs=null!==(i=null==n?void 0:n.classNameToArgs)&&void 0!==i?i:this._classNameToArgs,this._counter=null!==(e=null==n?void 0:n.counter)&&void 0!==e?e:this._counter,this._keyToClassName=null!==(u=null!==(o=this._config.classNameCache)&&void 0!==o?o:null==n?void 0:n.keyToClassName)&&void 0!==u?u:this._keyToClassName,this._preservedRules=null!==(a=null==n?void 0:n.preservedRules)&&void 0!==a?a:this._preservedRules,this._rules=null!==(l=null==n?void 0:n.rules)&&void 0!==l?l:this._rules}return t.getInstance=function(n){if(e=l[u],l[o.Se])return l[o.Se].getInstance(n);if(!e||e._lastStyleElement&&e._lastStyleElement.ownerDocument!==document){var i=(null==l?void 0:l.FabricConfig)||{},r=new t(i.mergeStyles,i.serializedStylesheet);e=r,l[u]=r}return e},t.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},t.prototype.setConfig=function(t){this._config=(0,r.Cl)((0,r.Cl)({},this._config),t)},t.prototype.onReset=function(t){var n=this;return this._onResetCallbacks.push(t),function(){n._onResetCallbacks=n._onResetCallbacks.filter((function(n){return n!==t}))}},t.prototype.onInsertRule=function(t){var n=this;return this._onInsertRuleCallbacks.push(t),function(){n._onInsertRuleCallbacks=n._onInsertRuleCallbacks.filter((function(n){return n!==t}))}},t.prototype.getClassName=function(t){var n=this._config.namespace,i=t||this._config.defaultPrefix;return"".concat(n?n+"-":"").concat(i,"-").concat(this._counter++)},t.prototype.cacheClassName=function(t,n,i,e){this._keyToClassName[this._getCacheKey(n)]=t,this._classNameToArgs[t]={args:i,rules:e}},t.prototype.classNameFromKey=function(t){return this._keyToClassName[this._getCacheKey(t)]},t.prototype.getClassNameCache=function(){return this._keyToClassName},t.prototype.argsFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.args},t.prototype.insertedRulesFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.rules},t.prototype.insertRule=function(t,n,i){void 0===i&&(i=o.P6);var e=this._config.injectionMode,r=0!==e?this._getStyleElement():void 0;if(n&&this._preservedRules.push(t),r)switch(e){case 1:this._insertRuleIntoSheet(r.sheet,t);break;case 2:r.appendChild(document.createTextNode(t))}else this._rules.push(t);this._config.onInsertRule&&this._config.onInsertRule(t),this._onInsertRuleCallbacks.forEach((function(n){return n({key:i,sheet:r?r.sheet:void 0,rule:t})}))},t.prototype.getRules=function(t){return(t?this._preservedRules.join(""):"")+this._rules.join("")},t.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach((function(t){return t()}))},t.prototype.resetKeys=function(){this._keyToClassName={}},t.prototype._createStyleElement=function(){var t,n=(null===(t=this._config.window)||void 0===t?void 0:t.document)||document,i=n.head,e=n.createElement("style"),r=null;e.setAttribute("data-merge-styles","true");var o=this._config.cspSettings;if(o&&o.nonce&&e.setAttribute("nonce",o.nonce),this._lastStyleElement)r=this._lastStyleElement.nextElementSibling;else{var u=this._findPlaceholderStyleTag();r=u?u.nextElementSibling:i.childNodes[0]}return i.insertBefore(e,i.contains(r)?r:null),this._lastStyleElement=e,e},t.prototype._insertRuleIntoSheet=function(t,n){if(!t)return!1;try{return t.insertRule(n,t.cssRules.length),!0}catch(t){}return!1},t.prototype._getCacheKey=function(t){return t},t.prototype._getStyleElement=function(){var t=this;return this._styleElement||(this._styleElement=this._createStyleElement(),a||(this._config.window||window).requestAnimationFrame((function(){t._styleElement=void 0}))),this._styleElement},t.prototype._findPlaceholderStyleTag=function(){var t=document.head;return t?t.querySelector("style[data-merge-styles]"):null},t}()},41:function(t,n,i){var e,r,o,u,a;i.d(n,{BO:function(){return u},Dn:function(){return e},bi:function(){return r},s:function(){return o}}),function(t){t.Arabic="Segoe UI Web (Arabic)",t.Cyrillic="Segoe UI Web (Cyrillic)",t.EastEuropean="Segoe UI Web (East European)",t.Greek="Segoe UI Web (Greek)",t.Hebrew="Segoe UI Web (Hebrew)",t.Thai="Leelawadee UI Web",t.Vietnamese="Segoe UI Web (Vietnamese)",t.WestEuropean="Segoe UI Web (West European)",t.Selawik="Selawik Web",t.Armenian="Segoe UI Web (Armenian)",t.Georgian="Segoe UI Web (Georgian)"}(e||(e={})),function(t){t.Arabic="'".concat(e.Arabic,"'"),t.ChineseSimplified="'Microsoft Yahei UI', Verdana, Simsun",t.ChineseTraditional="'Microsoft Jhenghei UI', Pmingliu",t.Cyrillic="'".concat(e.Cyrillic,"'"),t.EastEuropean="'".concat(e.EastEuropean,"'"),t.Greek="'".concat(e.Greek,"'"),t.Hebrew="'".concat(e.Hebrew,"'"),t.Hindi="'Nirmala UI'",t.Japanese="'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka",t.Korean="'Malgun Gothic', Gulim",t.Selawik="'".concat(e.Selawik,"'"),t.Thai="'Leelawadee UI Web', 'Kmer UI'",t.Vietnamese="'".concat(e.Vietnamese,"'"),t.WestEuropean="'".concat(e.WestEuropean,"'"),t.Armenian="'".concat(e.Armenian,"'"),t.Georgian="'".concat(e.Georgian,"'")}(r||(r={})),function(t){t.size10="10px",t.size12="12px",t.size14="14px",t.size16="16px",t.size18="18px",t.size20="20px",t.size24="24px",t.size28="28px",t.size32="32px",t.size42="42px",t.size68="68px",t.mini="10px",t.xSmall="10px",t.small="12px",t.smallPlus="12px",t.medium="14px",t.mediumPlus="16px",t.icon="16px",t.large="18px",t.xLarge="20px",t.xLargePlus="24px",t.xxLarge="28px",t.xxLargePlus="32px",t.superLarge="42px",t.mega="68px"}(o||(o={})),function(t){t.light=100,t.semilight=300,t.regular=400,t.semibold=600,t.bold=700}(u||(u={})),function(t){t.xSmall="10px",t.small="12px",t.medium="16px",t.large="20px"}(a||(a={}))},61:function(t,n,i){function e(t){const n=Math.round(t);return Math.abs(t-n)<1e-6?n:t}i.d(n,{Di:function(){return e},Yn:function(){return u},c$:function(){return r},c2:function(){return a}});const r=(t,n,i)=>{if(null==t||""===t||Number.isNaN(t))return t;if(n=n||void 0,"number"==typeof t){const i=Math.abs(t)>=1e4;return e(t).toLocaleString(n,{useGrouping:i})}if("string"==typeof t&&!window.isNaN(Number(t))){const i=Number(t),r=Math.abs(i)>=1e4;return e(i).toLocaleString(n,{useGrouping:r})}return t instanceof Date?u(t,n,!!i):t},o={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u=(t,n,i,e=!0,r)=>(n=n||void 0,r=r||o,i&&(r={...r,timeZone:"UTC"}),e&&(r={...r,timeZoneName:"short"}),t.toLocaleString(n,r));function a(t,n){const i={second:"2-digit"},e={minute:"2-digit",second:"2-digit"},r={hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u={weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},a={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},l={hour:"2-digit",minute:"2-digit",hour12:!0},s={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},c={month:"short",day:"2-digit",hour:"2-digit",hour12:!0},d={month:"short",day:"2-digit"},f={year:"numeric",month:"2-digit",day:"2-digit"},v=[[i,i,e,r,u,a,a,o],[o,i,e,r,u,a,a,o],[o,o,l,l,{weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},s,s,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}],[o,o,o,{hour:"2-digit",hour12:!0},{weekday:"short",day:"2-digit",hour:"2-digit",hour12:!0},c,c,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",hour12:!0}],[o,o,o,o,{weekday:"short",day:"2-digit"},d,d,f],[o,o,o,o,o,d,d,f],[o,o,o,o,o,o,{month:"long"},{month:"short",year:"numeric"}],[o,o,o,o,o,o,o,{year:"numeric"}]];return void 0===t||t<0||t>=v.length?o:void 0===n||n<t?v[t][t]:n>=v[t].length?v[t][v[t].length-1]:v[t][n]}},143:function(t,n,i){i.d(n,{a:function(){return V}});var e,r=i(302);!function(t){t.depth0="0 0 0 0 transparent",t.depth4="0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)",t.depth8="0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)",t.depth16="0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)",t.depth64="0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)"}(e||(e={}));var o={elevation4:e.depth4,elevation8:e.depth8,elevation16:e.depth16,elevation64:e.depth64,roundedCorner2:"2px",roundedCorner4:"4px",roundedCorner6:"6px"},u=i(800),a=i(40),l=i(289),s=i(41),c="'Segoe UI', '".concat(s.Dn.WestEuropean,"'"),d={ar:s.bi.Arabic,bg:s.bi.Cyrillic,cs:s.bi.EastEuropean,el:s.bi.Greek,et:s.bi.EastEuropean,he:s.bi.Hebrew,hi:s.bi.Hindi,hr:s.bi.EastEuropean,hu:s.bi.EastEuropean,ja:s.bi.Japanese,kk:s.bi.EastEuropean,ko:s.bi.Korean,lt:s.bi.EastEuropean,lv:s.bi.EastEuropean,pl:s.bi.EastEuropean,ru:s.bi.Cyrillic,sk:s.bi.EastEuropean,"sr-latn":s.bi.EastEuropean,th:s.bi.Thai,tr:s.bi.EastEuropean,uk:s.bi.Cyrillic,vi:s.bi.Vietnamese,"zh-hans":s.bi.ChineseSimplified,"zh-hant":s.bi.ChineseTraditional,hy:s.bi.Armenian,ka:s.bi.Georgian};function f(t,n,i){return{fontFamily:i,MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontSize:t,fontWeight:n}}var v,h,p,g=i(543),y=i(338),m=i(468),b="language",x=(h=function(t){for(var n in d)if(d.hasOwnProperty(n)&&t&&0===n.indexOf(t))return d[n];return c}(function(t){if(void 0===t&&(t="sessionStorage"),void 0===v){var n=(0,g.Y)(),i="localStorage"===t?function(t){var n=null;try{var i=(0,y.z)();n=i?i.localStorage.getItem(t):null}catch(t){}return n}(b):"sessionStorage"===t?m.G(b):void 0;i&&(v=i),void 0===v&&n&&(v=n.documentElement.getAttribute("lang")),void 0===v&&(v="en")}return v}()),p="".concat(h,", ").concat("'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif"),{tiny:f(s.s.mini,s.BO.regular,p),xSmall:f(s.s.xSmall,s.BO.regular,p),small:f(s.s.small,s.BO.regular,p),smallPlus:f(s.s.smallPlus,s.BO.regular,p),medium:f(s.s.medium,s.BO.regular,p),mediumPlus:f(s.s.mediumPlus,s.BO.regular,p),large:f(s.s.large,s.BO.regular,p),xLarge:f(s.s.xLarge,s.BO.semibold,p),xLargePlus:f(s.s.xLargePlus,s.BO.semibold,p),xxLarge:f(s.s.xxLarge,s.BO.semibold,p),xxLargePlus:f(s.s.xxLargePlus,s.BO.semibold,p),superLarge:f(s.s.superLarge,s.BO.semibold,p),mega:f(s.s.mega,s.BO.semibold,p)});function w(t,n,i,e){!function(t){var n=a.nr.getInstance(),i=(0,l.bz)((0,u.Iy)(),t);if(!n.classNameFromKey(i)){var e=n.getClassName();n.insertRule("@font-face{".concat(i,"}"),!0),n.cacheClassName(e,i,[],["font-face",i])}}({fontFamily:t="'".concat(t,"'"),src:(void 0!==e?"local('".concat(e,"'),"):"")+"url('".concat(n,".woff2') format('woff2'),")+"url('".concat(n,".woff') format('woff')"),fontWeight:i,fontStyle:"normal",fontDisplay:"swap"})}function M(t,n,i,e,r){void 0===e&&(e="segoeui");var o="".concat(t,"/").concat(i,"/").concat(e);w(n,o+"-light",s.BO.light,r&&r+" Light"),w(n,o+"-semilight",s.BO.semilight,r&&r+" SemiLight"),w(n,o+"-regular",s.BO.regular,r),w(n,o+"-semibold",s.BO.semibold,r&&r+" SemiBold"),w(n,o+"-bold",s.BO.bold,r&&r+" Bold")}function C(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=0,r=n;e<r.length;e++)k(t||{},r[e]);return t}function k(t,n,i){for(var e in void 0===i&&(i=[]),i.push(n),n)if(n.hasOwnProperty(e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var r=n[e];if("object"!=typeof r||null===r||Array.isArray(r))t[e]=r;else{var o=i.indexOf(r)>-1;t[e]=o?r:k(t[e]||{},r,i)}}return i.pop(),t}!function(t){if(t){var n="".concat(t,"/fonts");M(n,s.Dn.Thai,"leelawadeeui-thai","leelawadeeui"),M(n,s.Dn.Arabic,"segoeui-arabic"),M(n,s.Dn.Cyrillic,"segoeui-cyrillic"),M(n,s.Dn.EastEuropean,"segoeui-easteuropean"),M(n,s.Dn.Greek,"segoeui-greek"),M(n,s.Dn.Hebrew,"segoeui-hebrew"),M(n,s.Dn.Vietnamese,"segoeui-vietnamese"),M(n,s.Dn.WestEuropean,"segoeui-westeuropean","segoeui","Segoe UI"),M(n,s.bi.Selawik,"selawik","selawik"),M(n,s.Dn.Armenian,"segoeui-armenian"),M(n,s.Dn.Georgian,"segoeui-georgian"),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-semilight"),s.BO.light),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-bold"),s.BO.semibold)}}(function(){var t,n,i=null===(t=(0,y.z)())||void 0===t?void 0:t.FabricConfig;return null!==(n=null==i?void 0:i.fontBaseUrl)&&void 0!==n?n:"https://res-1.cdn.office.net/files/fabric-cdn-prod_20230815.002/assets"}());var A=i(823);function S(t,n,i,e,r){return void 0===r&&(r=!1),function(t,n){var i="";return!0===n&&(i=" /* @deprecated */"),t.listTextColor=t.listText+i,t.menuItemBackgroundChecked+=i,t.warningHighlight+=i,t.warningText=t.messageText+i,t.successText+=i,t}(L(t,n,(0,A.Cl)({primaryButtonBorder:"transparent",errorText:e?"#F1707B":"#a4262c",messageText:e?"#F3F2F1":"#323130",messageLink:e?"#6CB8F6":"#005A9E",messageLinkHovered:e?"#82C7FF":"#004578",infoIcon:e?"#C8C6C4":"#605e5c",errorIcon:e?"#F1707B":"#A80000",blockingIcon:e?"#442726":"#FDE7E9",warningIcon:e?"#C8C6C4":"#797775",severeWarningIcon:e?"#FCE100":"#D83B01",successIcon:e?"#92C353":"#107C10",infoBackground:e?"#323130":"#f3f2f1",errorBackground:e?"#442726":"#FDE7E9",blockingBackground:e?"#442726":"#FDE7E9",warningBackground:e?"#433519":"#FFF4CE",severeWarningBackground:e?"#4F2A0F":"#FED9CC",successBackground:e?"#393D1B":"#DFF6DD",warningHighlight:e?"#fff100":"#ffb900",successText:e?"#92c353":"#107C10"},i),e),r)}function L(t,n,i,e,r){void 0===r&&(r=!1);var o={},u=t||{},a=u.white,l=u.black,s=u.themePrimary,c=u.themeDark,d=u.themeDarker,f=u.themeDarkAlt,v=u.themeLighter,h=u.neutralLight,p=u.neutralLighter,g=u.neutralDark,y=u.neutralQuaternary,m=u.neutralQuaternaryAlt,b=u.neutralPrimary,x=u.neutralSecondary,w=u.neutralSecondaryAlt,M=u.neutralTertiary,C=u.neutralTertiaryAlt,k=u.neutralLighterAlt,S=u.accent;return a&&(o.bodyBackground=a,o.bodyFrameBackground=a,o.accentButtonText=a,o.buttonBackground=a,o.primaryButtonText=a,o.primaryButtonTextHovered=a,o.primaryButtonTextPressed=a,o.inputBackground=a,o.inputForegroundChecked=a,o.listBackground=a,o.menuBackground=a,o.cardStandoutBackground=a),l&&(o.bodyTextChecked=l,o.buttonTextCheckedHovered=l),s&&(o.link=s,o.primaryButtonBackground=s,o.inputBackgroundChecked=s,o.inputIcon=s,o.inputFocusBorderAlt=s,o.menuIcon=s,o.menuHeader=s,o.accentButtonBackground=s),c&&(o.primaryButtonBackgroundPressed=c,o.inputBackgroundCheckedHovered=c,o.inputIconHovered=c),d&&(o.linkHovered=d),f&&(o.primaryButtonBackgroundHovered=f),v&&(o.inputPlaceholderBackgroundChecked=v),h&&(o.bodyBackgroundChecked=h,o.bodyFrameDivider=h,o.bodyDivider=h,o.variantBorder=h,o.buttonBackgroundCheckedHovered=h,o.buttonBackgroundPressed=h,o.listItemBackgroundChecked=h,o.listHeaderBackgroundPressed=h,o.menuItemBackgroundPressed=h,o.menuItemBackgroundChecked=h),p&&(o.bodyBackgroundHovered=p,o.buttonBackgroundHovered=p,o.buttonBackgroundDisabled=p,o.buttonBorderDisabled=p,o.primaryButtonBackgroundDisabled=p,o.disabledBackground=p,o.listItemBackgroundHovered=p,o.listHeaderBackgroundHovered=p,o.menuItemBackgroundHovered=p),y&&(o.primaryButtonTextDisabled=y,o.disabledSubtext=y),m&&(o.listItemBackgroundCheckedHovered=m),M&&(o.disabledBodyText=M,o.variantBorderHovered=(null==i?void 0:i.variantBorderHovered)||M,o.buttonTextDisabled=M,o.inputIconDisabled=M,o.disabledText=M),b&&(o.bodyText=b,o.actionLink=b,o.buttonText=b,o.inputBorderHovered=b,o.inputText=b,o.listText=b,o.menuItemText=b),k&&(o.bodyStandoutBackground=k,o.defaultStateBackground=k),g&&(o.actionLinkHovered=g,o.buttonTextHovered=g,o.buttonTextChecked=g,o.buttonTextPressed=g,o.inputTextHovered=g,o.menuItemTextHovered=g),x&&(o.bodySubtext=x,o.focusBorder=x,o.inputBorder=x,o.smallInputBorder=x,o.inputPlaceholderText=x),w&&(o.buttonBorder=w),C&&(o.disabledBodySubtext=C,o.disabledBorder=C,o.buttonBackgroundChecked=C,o.menuDivider=C),S&&(o.accentButtonBackground=S),(null==n?void 0:n.elevation4)&&(o.cardShadow=n.elevation4),!e&&(null==n?void 0:n.elevation8)?o.cardShadowHovered=n.elevation8:o.variantBorderHovered&&(o.cardShadowHovered="0 0 1px "+o.variantBorderHovered),(0,A.Cl)((0,A.Cl)({},o),i)}var D={s2:"4px",s1:"8px",m:"16px",l1:"20px",l2:"32px"};function V(t,n){void 0===t&&(t={}),void 0===n&&(n=!1);var i=!!t.isInverted;return function(t,n){var i,e,r;void 0===n&&(n={});var o=C({},t,n,{semanticColors:L(n.palette,n.effects,n.semanticColors,void 0===n.isInverted?t.isInverted:n.isInverted)});if((null===(i=n.palette)||void 0===i?void 0:i.themePrimary)&&!(null===(e=n.palette)||void 0===e?void 0:e.accent)&&(o.palette.accent=n.palette.themePrimary),n.defaultFontStyle)for(var u=0,a=Object.keys(o.fonts);u<a.length;u++){var l=a[u];o.fonts[l]=C(o.fonts[l],n.defaultFontStyle,null===(r=null==n?void 0:n.fonts)||void 0===r?void 0:r[l])}return o}({palette:r.b,effects:o,fonts:x,spacing:D,isInverted:i,disableGlobalClassNames:!1,semanticColors:S(r.b,o,void 0,i,n),rtl:void 0},t)}},259:function(t,n,i){i.d(n,{jI:function(){return l}});var e,r=i(543),o=i(468),u=i(800),a="isRTL";function l(t){if(void 0===t&&(t={}),void 0!==t.rtl)return t.rtl;if(void 0===e){var n=(0,o.G)(a);null!==n&&function(t,n){void 0===n&&(n=!1);var i=(0,r.Y)();i&&i.documentElement.setAttribute("dir",t?"rtl":"ltr"),n&&(0,o.S)(a,t?"1":"0"),e=t,(0,u.DU)(e)}(e="1"===n);var i=(0,r.Y)();void 0===e&&i&&(e="rtl"===(i.body&&i.body.getAttribute("dir")||i.documentElement.getAttribute("dir")),(0,u.DU)(e))}return!!e}},263:function(t,n,i){i.d(n,{J:function(){return r}});var e=i(419),r=function(t){var n,i,r,o=t.color,u=t.XValue,a=t.theme,l=t.isRatioPresent,s=void 0!==l&&l;return{calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:a.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[a.fonts.small,{lineHeight:"16px",opacity:"0.85",color:a.semanticColors.bodySubtext}],calloutBlockContainer:[a.fonts.xxLarge,{marginTop:u?"13px":"unset",paddingLeft:"8px",lineHeight:"22px",color:a.semanticColors.bodyText,borderLeft:"4px solid ".concat(o),selectors:(n={},n[e.up]={forcedColorAdjust:"none"},n)}],calloutlegendText:[a.fonts.small,{lineHeight:"16px",color:a.semanticColors.bodyText,selectors:(i={},i[e.up]={color:"CanvasText"},i)}],calloutContentY:[a.fonts.xxLarge,{color:o||a.semanticColors.bodyText,fontWeight:"bold",lineHeight:"36px",selectors:(r={},r[e.up]={color:"CanvasText"},r)}],calloutInfoContainer:[s&&{display:"flex",alignItems:"flex-end"}],ratio:[a.fonts.small,{marginLeft:"6px",color:a.semanticColors.bodyText}],numerator:{fontWeight:e.BO.bold},denominator:{fontWeight:e.BO.semibold},descriptionMessage:[a.fonts.small,{color:a.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(a.semanticColors.menuDivider)}]}}},289:function(t,n,i){i.d(n,{Ae:function(){return L},bz:function(){return A},kG:function(){return D},GJ:function(){return S}});var e,r=i(823),o=i(40),u={},a={"user-select":1};function l(t,n){var i=function(){var t;if(!e){var n="undefined"!=typeof document?document:void 0,i="undefined"!=typeof navigator?navigator:void 0,r=null===(t=null==i?void 0:i.userAgent)||void 0===t?void 0:t.toLowerCase();e=n?{isWebkit:!(!n||!("WebkitAppearance"in n.documentElement.style)),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!i||!/rv:11.0/i.test(i.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return e}(),r=t[n];if(a[r]){var o=t[n+1];a[r]&&(i.isWebkit&&t.push("-webkit-"+r,o),i.isMoz&&t.push("-moz-"+r,o),i.isMs&&t.push("-ms-"+r,o),i.isOpera&&t.push("-o-"+r,o))}}var s,c=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function d(t,n){var i=t[n],e=t[n+1];if("number"==typeof e){var r=c.indexOf(i)>-1,o=i.indexOf("--")>-1,u=r||o?"":"px";t[n+1]="".concat(e).concat(u)}}var f="left",v="right",h="@noflip",p=((s={})[f]=v,s[v]=f,s),g={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function y(t,n,i){if(t.rtl){var e=n[i];if(!e)return;var r=n[i+1];if("string"==typeof r&&r.indexOf(h)>=0)n[i+1]=r.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(e.indexOf(f)>=0)n[i]=e.replace(f,v);else if(e.indexOf(v)>=0)n[i]=e.replace(v,f);else if(String(r).indexOf(f)>=0)n[i+1]=r.replace(f,v);else if(String(r).indexOf(v)>=0)n[i+1]=r.replace(v,f);else if(p[e])n[i]=p[e];else if(g[r])n[i+1]=g[r];else switch(e){case"margin":case"padding":n[i+1]=function(t){if("string"==typeof t){var n=t.split(" ");if(4===n.length)return"".concat(n[0]," ").concat(n[3]," ").concat(n[2]," ").concat(n[1])}return t}(r);break;case"box-shadow":n[i+1]=function(t){var n=t.split(" "),i=parseInt(n[0],10);return n[0]=n[0].replace(String(i),String(-1*i)),n.join(" ")}(r)}}}var m="displayName",b=/\:global\((.+?)\)/g;function x(t,n){return t.indexOf(":global(")>=0?t.replace(b,"$1"):0===t.indexOf(":host(")?t:0===t.indexOf(":")?n+t:t.indexOf("&")<0?n+" "+t:t}function w(t,n,i,e,r){void 0===n&&(n={__order:[]}),0===i.indexOf("@")?M([e],n,i=i+"{"+t,r):i.indexOf(",")>-1?function(t){if(!b.test(t))return t;for(var n=[],i=/\:global\((.+?)\)/g,e=null;e=i.exec(t);)e[1].indexOf(",")>-1&&n.push([e.index,e.index+e[0].length,e[1].split(",").map((function(t){return":global(".concat(t.trim(),")")})).join(", ")]);return n.reverse().reduce((function(t,n){var i=n[0],e=n[1],r=n[2];return t.slice(0,i)+r+t.slice(e)}),t)}(i).split(",").map((function(t){return t.trim()})).forEach((function(i){return M([e],n,x(i,t),r)})):M([e],n,x(i,t),r)}function M(t,n,i,e){void 0===n&&(n={__order:[]}),void 0===i&&(i="&");var r,o=n[i];o||(o={},n[i]=o,n.__order.push(i));for(var u=0,a=t;u<a.length;u++){var l=a[u];if("string"==typeof l){var s=e.argsFromClassName(l);s&&M(s,n,i,e)}else if(Array.isArray(l))M(l,n,i,e);else for(var c in l)if(l.hasOwnProperty(c)){var d=l[c];if("selectors"===c){var f=l.selectors;for(var v in f)f.hasOwnProperty(v)&&w(i,n,v,f[v],e)}else"object"==typeof d||(r=c).indexOf(":global(")>=0||0===r.indexOf(":")?null!=d&&w(i,n,c,d,e):void 0!==d&&("margin"===c||"padding"===c?C(o,c,d):o[c]=d)}}return n}function C(t,n,i){var e="string"==typeof i?function(t){for(var n=[],i=0,e=0,r=0;r<t.length;r++)switch(t[r]){case"(":e++;break;case")":e&&e--;break;case"\t":case" ":e||(r>i&&n.push(t.substring(i,r)),i=r+1)}return i<t.length&&n.push(t.substring(i)),n}(i):[i];0===e.length&&e.push(i),"!important"===e[e.length-1]&&(e=e.slice(0,-1).map((function(t){return t+" !important"}))),t[n+"Top"]=e[0],t[n+"Right"]=e[1]||e[0],t[n+"Bottom"]=e[2]||e[0],t[n+"Left"]=e[3]||e[1]||e[0]}function k(t,n){return n<=0?"":1===n?t:t+k(t,n-1)}function A(t,n){if(!n)return"";var i,e,r,o=[];for(var a in n)n.hasOwnProperty(a)&&a!==m&&void 0!==n[a]&&o.push(a,n[a]);for(var s=0;s<o.length;s+=2)r=void 0,"-"!==(r=(i=o)[e=s]).charAt(0)&&(i[e]=u[r]=u[r]||r.replace(/([A-Z])/g,"-$1").toLowerCase()),d(o,s),y(t,o,s),l(o,s);for(s=1;s<o.length;s+=4)o.splice(s,1,":",o[s],";");return o.join("")}function S(t){for(var n,i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];var r=null!==(n=t.stylesheet)&&void 0!==n?n:o.nr.getInstance(t.shadowConfig),u=M(i,void 0,void 0,r),a=function(t,n){for(var i=[t.rtl?"rtl":"ltr"],e=!1,r=0,o=n.__order;r<o.length;r++){var u=o[r];i.push(u);var a=n[u];for(var l in a)a.hasOwnProperty(l)&&void 0!==a[l]&&(e=!0,i.push(l,a[l]))}return e?i.join(""):void 0}(t,u);if(a){var l={className:r.classNameFromKey(a),key:a,args:i};if(!l.className){l.className=r.getClassName(function(t){var n=t&&t["&"];return n?n.displayName:void 0}(u));for(var s=[],c=0,d=u.__order;c<d.length;c++){var f=d[c];s.push(f,A(t,u[f]))}l.rulesToInsert=s}return l}}function L(t,n,i,e){void 0===n&&(n=1);var r=null!=e?e:o.nr.getInstance(i),u=t.className,a=t.key,l=t.args,s=t.rulesToInsert;if(s){for(var c=0;c<s.length;c+=2){var d=s[c+1];if(d){var f=s[c];f=f.replace(/&/g,k(".".concat(t.className),n));var v="".concat(f,"{").concat(d,"}").concat(0===f.indexOf("@")?"}":"");r.insertRule(v)}}r.cacheClassName(u,a,l,s)}}function D(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=S.apply(void 0,(0,r.fX)([t],n,!1));return e?(L(e,t.specificityMultiplier,t.shadowConfig,t.stylesheet),e.className):""}},302:function(t,n,i){i.d(n,{b:function(){return e}});var e={themeDarker:"#004578",themeDark:"#005a9e",themeDarkAlt:"#106ebe",themePrimary:"#0078d4",themeSecondary:"#2b88d8",themeTertiary:"#71afe5",themeLight:"#c7e0f4",themeLighter:"#deecf9",themeLighterAlt:"#eff6fc",black:"#000000",blackTranslucent40:"rgba(0,0,0,.4)",neutralDark:"#201f1e",neutralPrimary:"#323130",neutralPrimaryAlt:"#3b3a39",neutralSecondary:"#605e5c",neutralSecondaryAlt:"#8a8886",neutralTertiary:"#a19f9d",neutralTertiaryAlt:"#c8c6c4",neutralQuaternary:"#d2d0ce",neutralQuaternaryAlt:"#e1dfdd",neutralLight:"#edebe9",neutralLighter:"#f3f2f1",neutralLighterAlt:"#faf9f8",accent:"#0078d4",white:"#ffffff",whiteTranslucent40:"rgba(255,255,255,.4)",yellowDark:"#d29200",yellow:"#ffb900",yellowLight:"#fff100",orange:"#d83b01",orangeLight:"#ea4300",orangeLighter:"#ff8c00",redDark:"#a4262c",red:"#e81123",magentaDark:"#5c005c",magenta:"#b4009e",magentaLight:"#e3008c",purpleDark:"#32145a",purple:"#5c2d91",purpleLight:"#b4a0ff",blueDark:"#002050",blueMid:"#00188f",blue:"#0078d4",blueLight:"#00bcf2",tealDark:"#004b50",teal:"#008272",tealLight:"#00b294",greenDark:"#004b1c",green:"#107c10",greenLight:"#bad80a"}},338:function(t,n,i){i.d(n,{z:function(){return o}});var e=i(921),r=void 0;try{r=window}catch(t){}function o(t){if((0,e.S)()&&void 0!==r){var n=t;return n&&n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView:r}}},357:function(t,n,i){i.r(n),i.d(n,{ChartHoverCard:function(){return d}});var e=i(566),r=i(823),o=i(594),u=i(873),a=i(61),l=(0,u.Z)(),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.color,i=t.Legend,e=t.XValue,r=t.YValue,u=t.styles,s=t.theme,c=t.ratio,d=t.descriptionMessage,f=t.culture;return this._classNames=l(u,{theme:s,color:n,XValue:e,isRatioPresent:!!c}),o.createElement("div",{className:this._classNames.calloutContentRoot},o.createElement("div",{className:this._classNames.calloutDateTimeContainer},o.createElement("div",{className:this._classNames.calloutContentX},e," ")),o.createElement("div",{className:this._classNames.calloutInfoContainer},o.createElement("div",{className:this._classNames.calloutBlockContainer},o.createElement("div",{className:this._classNames.calloutlegendText},(0,a.c$)(i,f)),o.createElement("div",{className:this._classNames.calloutContentY},(0,a.c$)(r,f))),!!c&&o.createElement("div",{className:this._classNames.ratio},o.createElement(o.Fragment,null,o.createElement("span",{className:this._classNames.numerator},(0,a.c$)(c[0],f)),"/",o.createElement("span",{className:this._classNames.denominator},(0,a.c$)(c[1],f))))),!!d&&o.createElement("div",{className:this._classNames.descriptionMessage},d))},n}(o.Component),c=i(263),d=(0,e.I)(s,c.J)},419:function(t,n,i){i.d(n,{lw:function(){return K},bp:function(){return Ct.b},s:function(){return kt.s},BO:function(){return kt.BO},up:function(){return it},nA:function(){return nt},QN:function(){return ot},gm:function(){return rt},Km:function(){return tt},O4:function(){return Mt},dX:function(){return J},Zq:function(){return e.Z}});var e=i(916),r=i(800),o=i(40),u=i(289);function a(t){var n=o.nr.getInstance(),i=[];for(var e in t)t.hasOwnProperty(e)&&i.push(e,"{",(0,u.bz)((0,r.Iy)(),t[e]),"}");var a=i.join(""),l=n.classNameFromKey(a);if(l)return l;var s=n.getClassName();return n.insertRule("@keyframes ".concat(s,"{").concat(a,"}"),!0),n.cacheClassName(s,a,[],["keyframes",a]),s}var l="cubic-bezier(.1,.9,.2,1)",s="cubic-bezier(.1,.25,.75,.9)",c="0.167s",d="0.267s",f="0.367s",v="0.467s",h=a({from:{opacity:0},to:{opacity:1}}),p=a({from:{opacity:1},to:{opacity:0,visibility:"hidden"}}),g=G(-10),y=G(-20),m=G(-40),b=G(-400),x=G(10),w=G(20),M=G(40),C=G(400),k=U(10),A=U(20),S=U(-10),L=U(-20),D=q(10),V=q(20),N=q(40),O=q(400),T=q(-10),E=q(-20),F=q(-40),B=q(-400),P=Z(-10),_=Z(-20),H=Z(10),I=Z(20),W=a({from:{transform:"scale3d(.98,.98,1)"},to:{transform:"scale3d(1,1,1)"}}),R=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(.98,.98,1)"}}),z=a({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),j=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),$=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(90deg)"}}),Y=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(-90deg)"}});function X(t,n,i){return{animationName:t,animationDuration:n,animationTimingFunction:i,animationFillMode:"both"}}function G(t){return a({from:{transform:"translate3d(".concat(t,"px,0,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function U(t){return a({from:{transform:"translate3d(0,".concat(t,"px,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function q(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(".concat(t,"px,0,0)")}})}function Z(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(0,".concat(t,"px,0)")}})}var K=function(t){var n={},i=function(i){var r;t.hasOwnProperty(i)&&Object.defineProperty(n,i,{get:function(){return void 0===r&&(r=(0,e.Z)(t[i]).toString()),r},enumerable:!0,configurable:!0})};for(var r in t)i(r);return n}({slideRightIn10:X("".concat(h,",").concat(g),f,l),slideRightIn20:X("".concat(h,",").concat(y),f,l),slideRightIn40:X("".concat(h,",").concat(m),f,l),slideRightIn400:X("".concat(h,",").concat(b),f,l),slideLeftIn10:X("".concat(h,",").concat(x),f,l),slideLeftIn20:X("".concat(h,",").concat(w),f,l),slideLeftIn40:X("".concat(h,",").concat(M),f,l),slideLeftIn400:X("".concat(h,",").concat(C),f,l),slideUpIn10:X("".concat(h,",").concat(k),f,l),slideUpIn20:X("".concat(h,",").concat(A),f,l),slideDownIn10:X("".concat(h,",").concat(S),f,l),slideDownIn20:X("".concat(h,",").concat(L),f,l),slideRightOut10:X("".concat(p,",").concat(D),f,l),slideRightOut20:X("".concat(p,",").concat(V),f,l),slideRightOut40:X("".concat(p,",").concat(N),f,l),slideRightOut400:X("".concat(p,",").concat(O),f,l),slideLeftOut10:X("".concat(p,",").concat(T),f,l),slideLeftOut20:X("".concat(p,",").concat(E),f,l),slideLeftOut40:X("".concat(p,",").concat(F),f,l),slideLeftOut400:X("".concat(p,",").concat(B),f,l),slideUpOut10:X("".concat(p,",").concat(P),f,l),slideUpOut20:X("".concat(p,",").concat(_),f,l),slideDownOut10:X("".concat(p,",").concat(H),f,l),slideDownOut20:X("".concat(p,",").concat(I),f,l),scaleUpIn100:X("".concat(h,",").concat(W),f,l),scaleDownIn100:X("".concat(h,",").concat(z),f,l),scaleUpOut103:X("".concat(p,",").concat(j),c,s),scaleDownOut98:X("".concat(p,",").concat(R),c,s),fadeIn100:X(h,c,s),fadeIn200:X(h,d,s),fadeIn400:X(h,f,s),fadeIn500:X(h,v,s),fadeOut100:X(p,c,s),fadeOut200:X(p,d,s),fadeOut400:X(p,f,s),fadeOut500:X(p,v,s),rotate90deg:X($,"0.1s",s),rotateN90deg:X(Y,"0.1s",s)}),J={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",whiteSpace:"nowrap"},Q=(0,i(753).J9)((function(t,n){var i=o.nr.getInstance();return n?Object.keys(t).reduce((function(n,e){return n[e]=i.getClassName(t[e]),n}),{}):t}));function tt(t,n,i){return Q(t,void 0!==i?i:n.disableGlobalClassNames)}var nt,it="@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)",et=i(517);function rt(t,n,i,e,r,o,u,a){return function(t,n){var i,e;void 0===n&&(n={});var r=n.borderRadius,o=n.inset,u=void 0===o?0:o,a=n.width,l=void 0===a?1:a,s=n.position,c=void 0===s?"relative":s,d=n.highContrastStyle,f=n.borderColor,v=void 0===f?t.palette.white:f,h=n.outlineColor,p=void 0===h?t.palette.neutralSecondary:h,g=n.isFocusedOnly,y=void 0===g||g,m=n.pointerEvents;return{outline:"transparent",position:c,selectors:(i={"::-moz-focus-inner":{border:"0"}},i[".".concat(et.Y2," &").concat(y?":focus":"",":after, :host(.").concat(et.Y2,") &").concat(y?":focus":"",":after")]={content:'""',position:"absolute",pointerEvents:m,left:u+1,top:u+1,bottom:u+1,right:u+1,border:"".concat(l,"px solid ").concat(v),outline:"".concat(l,"px solid ").concat(p),zIndex:nt.FocusStyle,borderRadius:r,selectors:(e={},e[it]=d,e)},i)}}(t,"number"!=typeof n&&n?n:{inset:n,position:i,highContrastStyle:e,borderColor:r,outlineColor:o,isFocusedOnly:u,borderRadius:a})}function ot(){return{selectors:{"&::-moz-focus-inner":{border:0},"&":{outline:"transparent"}}}}!function(t){t.Nav=1,t.ScrollablePane=1,t.FocusStyle=1,t.Coachmark=1e3,t.Layer=1e6,t.KeytipLayer=1000001}(nt||(nt={}));var ut,at=i(823),lt=i(338),st=i(540),ct=function(){return ct=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},ct.apply(this,arguments)},dt="undefined"==typeof window?i.g:window,ft=dt&&dt.CSPSettings&&dt.CSPSettings.nonce,vt=((ut=dt.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]}).runState||(ut=ct({},ut,{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),ut.registeredThemableStyles||(ut=ct({},ut,{registeredThemableStyles:[]})),dt.__themeState__=ut,ut);function ht(t){vt.theme=t,function(){if(vt.theme){for(var t=[],n=0,i=vt.registeredThemableStyles;n<i.length;n++){var e=i[n];t.push(e.themableStyle)}t.length>0&&(void 0===(o=1)&&(o=3),3!==o&&2!==o||(pt(vt.registeredStyles),vt.registeredStyles=[]),3!==o&&1!==o||(pt(vt.registeredThemableStyles),vt.registeredThemableStyles=[]),r=[].concat.apply([],t),vt.loadStyles?vt.loadStyles(gt(r).styleString,r):function(t){if("undefined"!=typeof document){var n=document.getElementsByTagName("head")[0],i=document.createElement("style"),e=gt(t),r=e.styleString,o=e.themable;i.setAttribute("data-load-themed-styles","true"),i.type="text/css",ft&&i.setAttribute("nonce",ft),i.appendChild(document.createTextNode(r)),vt.perf.count++,n.appendChild(i);var u=document.createEvent("HTMLEvents");u.initEvent("styleinsert",!0,!1),u.args={newStyle:i},document.dispatchEvent(u);var a={styleElement:i,themableStyle:t};o?vt.registeredThemableStyles.push(a):vt.registeredStyles.push(a)}}(r))}var r,o}()}function pt(t){t.forEach((function(t){var n=t&&t.styleElement;n&&n.parentElement&&n.parentElement.removeChild(n)}))}function gt(t){var n=vt.theme,i=!1;return{styleString:(t||[]).map((function(t){var e=t.theme;if(e){i=!0;var r=n?n[e]:void 0,o=t.defaultValue||"inherit";return n&&!r&&console&&!(e in n)&&"undefined"!=typeof DEBUG&&DEBUG&&console.warn('Theming value not provided for "'+e+'". Falling back to "'+o+'".'),r||o}return t.rawString})).join(""),themable:i}}var yt=i(143),mt=(0,yt.a)({}),bt=[],xt="theme";function wt(){var t,n,i,e=(0,lt.z)();(null===(n=null==e?void 0:e.FabricConfig)||void 0===n?void 0:n.legacyTheme)?function(t,n){var i;void 0===n&&(n=!1),mt=(0,yt.a)(t,n),ht((0,at.Cl)((0,at.Cl)((0,at.Cl)((0,at.Cl)({},mt.palette),mt.semanticColors),mt.effects),function(t){for(var n={},i=0,e=Object.keys(t.fonts);i<e.length;i++)for(var r=e[i],o=t.fonts[r],u=0,a=Object.keys(o);u<a.length;u++){var l=a[u],s=r+l.charAt(0).toUpperCase()+l.slice(1),c=o[l];"fontSize"===l&&"number"==typeof c&&(c+="px"),n[s]=c}return n}(mt))),st.X.applySettings(((i={})[xt]=mt,i)),bt.forEach((function(t){try{t(mt)}catch(t){}}))}(e.FabricConfig.legacyTheme):st.X.getSettings([xt]).theme||((null===(i=null==e?void 0:e.FabricConfig)||void 0===i?void 0:i.theme)&&(mt=(0,yt.a)(e.FabricConfig.theme)),st.X.applySettings(((t={})[xt]=mt,t)))}function Mt(t){return void 0===t&&(t=!1),!0===t&&(mt=(0,yt.a)({},t)),mt}wt();var Ct=i(302),kt=i(41);(0,i(887).v)("@fluentui/style-utilities","8.13.6"),wt()},468:function(t,n,i){i.d(n,{G:function(){return r},S:function(){return o}});var e=i(338);function r(t){var n=null;try{var i=(0,e.z)();n=i?i.sessionStorage.getItem(t):null}catch(t){}return n}function o(t,n){var i;try{null===(i=(0,e.z)())||void 0===i||i.sessionStorage.setItem(t,n)}catch(t){}}},506:function(t,n,i){i.d(n,{T:function(){return o}});var e=i(823),r=i(638);function o(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t&&1===t.length&&t[0]&&!t[0].subComponentStyles&&!(0,r.db)(t[0]))return t[0];for(var i={},u={},a=0,l=t;a<l.length;a++){var s=l[a];if(s&&!(0,r.db)(s))for(var c in s)if(s.hasOwnProperty(c)){if("subComponentStyles"===c&&void 0!==s.subComponentStyles){var d=s.subComponentStyles;for(var f in d)d.hasOwnProperty(f)&&(u.hasOwnProperty(f)?u[f].push(d[f]):u[f]=[d[f]]);continue}var v=i[c],h=s[c];i[c]=void 0===v?h:(0,e.fX)((0,e.fX)([],Array.isArray(v)?v:[v],!0),Array.isArray(h)?h:[h],!0)}}if(Object.keys(u).length>0){i.subComponentStyles={};var p=i.subComponentStyles,g=function(t){if(u.hasOwnProperty(t)){var n=u[t];p[t]=function(t){return o.apply(void 0,n.map((function(n){return"function"==typeof n?n(t):n})))}}};for(var f in u)g(f)}return i}},517:function(t,n,i){i.d(n,{Y2:function(){return e}});var e="ms-Fabric--isFocusVisible"},540:function(t,n,i){i.d(n,{X:function(){return h}});var e=i(823),r=i(338),o="__globalSettings__",u="__callbacks__",a=0,l=function(){function t(){}return t.getValue=function(t,n){var i=s();return void 0===i[t]&&(i[t]="function"==typeof n?n():n),i[t]},t.setValue=function(t,n){var i=s(),e=i[u],r=i[t];if(n!==r){i[t]=n;var o={oldValue:r,value:n,key:t};for(var a in e)e.hasOwnProperty(a)&&e[a](o)}return n},t.addChangeListener=function(t){var n=t.__id__,i=c();n||(n=t.__id__=String(a++)),i[n]=t},t.removeChangeListener=function(t){delete c()[t.__id__]},t}();function s(){var t,n=(0,r.z)()||{};return n[o]||(n[o]=((t={})[u]={},t)),n[o]}function c(){return s()[u]}var d={settings:{},scopedSettings:{},inCustomizerContext:!1},f=l.getValue("customizations",{settings:{},scopedSettings:{},inCustomizerContext:!1}),v=[],h=function(){function t(){}return t.reset=function(){f.settings={},f.scopedSettings={}},t.applySettings=function(n){f.settings=(0,e.Cl)((0,e.Cl)({},f.settings),n),t._raiseChange()},t.applyScopedSettings=function(n,i){f.scopedSettings[n]=(0,e.Cl)((0,e.Cl)({},f.scopedSettings[n]),i),t._raiseChange()},t.getSettings=function(t,n,i){void 0===i&&(i=d);for(var e={},r=n&&i.scopedSettings[n]||{},o=n&&f.scopedSettings[n]||{},u=0,a=t;u<a.length;u++){var l=a[u];e[l]=r[l]||i.settings[l]||o[l]||f.settings[l]}return e},t.applyBatchedUpdates=function(n,i){t._suppressUpdates=!0;try{n()}catch(t){}t._suppressUpdates=!1,i||t._raiseChange()},t.observe=function(t){v.push(t)},t.unobserve=function(t){v=v.filter((function(n){return n!==t}))},t._raiseChange=function(){t._suppressUpdates||v.forEach((function(t){return t()}))},t}()},543:function(t,n,i){i.d(n,{Y:function(){return r}});var e=i(921);function r(t){if((0,e.S)()&&"undefined"!=typeof document){var n=t;return n&&n.ownerDocument?n.ownerDocument:document}}},566:function(t,n,i){i.d(n,{I:function(){return v}});var e=i(823),r=i(594),o=i(506),u=i(638),a=function(){return!1},l=function(){},s=r.createContext({stylesheets:new Map,useAdoptedStylesheetEx:a,useAdoptedStylesheet:a,useShadowConfig:function(){return u.ou},useMergeStylesShadowRootContext:l,useHasMergeStylesShadowRootContext:a,useMergeStylesRootStylesheets:function(){return new Map},useWindow:l,useStyled:l}),c=function(){var t=r.useContext(s);return{useAdoptedStylesheet:t.useAdoptedStylesheet,useAdoptedStylesheetEx:t.useAdoptedStylesheetEx,useShadowConfig:t.useShadowConfig,useMergeStylesShadowRootContext:t.useMergeStylesShadowRootContext,useHasMergeStylesShadowRootContext:t.useHasMergeStylesShadowRootContext,useMergeStylesRootStylesheets:t.useMergeStylesRootStylesheets,useWindow:t.useWindow,useStyled:t.useStyled}},d=i(927),f=["theme","styles"];function v(t,n,i,u,a){var l=(u=u||{scope:"",fields:void 0}).scope,s=u.fields,v=void 0===s?f:s,h=r.forwardRef((function(u,a){var s=r.useRef(void 0),f=(0,d.m)(v,l),h=f.styles,p=(f.dir,(0,e.Tt)(f,["styles","dir"])),g=i?i(u):void 0,y=c().useStyled,m=s.current&&s.current.__cachedInputs__||[],b=u.styles;if(!s.current||h!==m[1]||b!==m[2]){var x=function(t){return function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=[],r=0,u=n;r<u.length;r++){var a=u[r];a&&e.push("function"==typeof a?a(t):a)}return 1===e.length?e[0]:e.length?o.T.apply(void 0,e):{}}(t,n,h,b)};x.__cachedInputs__=[n,h,b],x.__noStyleOverride__=!h&&!b,s.current=x}return s.current.__shadowConfig__=y(l),r.createElement(t,(0,e.Cl)({ref:a},p,g,u,{styles:s.current}))}));h.displayName="Styled".concat(t.displayName||t.name);var p=a?r.memo(h):h;return h.displayName&&(p.displayName=h.displayName),p}},594:function(t){t.exports=React},638:function(t,n,i){i.d(n,{P6:function(){return e},Se:function(){return r},db:function(){return u},ou:function(){return o}});var e="__global__",r="__shadow_dom_stylesheet__",o={stylesheetKey:e,inShadow:!1,window:void 0,__isShadowConfig__:!0},u=function(t){return!(!t||!function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}(t))&&!0===t.__isShadowConfig__}},753:function(t,n,i){i.d(n,{J5:function(){return d},J9:function(){return c}});var e=i(40),r=!1,o=0,u={empty:!0},a={},l="undefined"==typeof WeakMap?null:WeakMap;function s(){o++}function c(t,n,i){if(void 0===n&&(n=100),void 0===i&&(i=!1),!l)return t;if(!r){var c=e.nr.getInstance();c&&c.onReset&&e.nr.getInstance().onReset(s),r=!0}var d,v=0,h=o;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var l,s=d;(void 0===d||h!==o||n>0&&v>n)&&(d=f(),v=0,h=o),s=d;for(var c=0;c<e.length;c++){var p=(l=e[c])?"object"==typeof l||"function"==typeof l?l:(a[l]||(a[l]={val:l}),a[l]):u;s.map.has(p)||s.map.set(p,f()),s=s.map.get(p)}return s.hasOwnProperty("value")||(s.value=t.apply(void 0,e),v++),!i||null!==s.value&&void 0!==s.value||(s.value=t.apply(void 0,e)),s.value}}function d(t){if(!l)return t;var n=new l;return function(i){if(!i||"function"!=typeof i&&"object"!=typeof i)return t(i);if(n.has(i))return n.get(i);var e=t(i);return n.set(i,e),e}}function f(){return{map:l?new l:null}}},770:function(t,n,i){i.d(n,{z:function(){return e}});var e=i(594).createContext({customizations:{inCustomizerContext:!1,settings:{},scopedSettings:{}}})},800:function(t,n,i){i.d(n,{DU:function(){return o},Iy:function(){return a}});var e,r=i(638);function o(t){e!==t&&(e=t)}function u(){return void 0===e&&(e="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),e}function a(){return{rtl:u(),shadowConfig:r.ou}}e=u()},823:function(t,n,i){i.d(n,{C6:function(){return r},Cl:function(){return o},Tt:function(){return u},YH:function(){return l},fX:function(){return s},sH:function(){return a}});var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},e(t,n)};function r(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var o=function(){return o=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},o.apply(this,arguments)};function u(t,n){var i={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(i[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(e=Object.getOwnPropertySymbols(t);r<e.length;r++)n.indexOf(e[r])<0&&Object.prototype.propertyIsEnumerable.call(t,e[r])&&(i[e[r]]=t[e[r]])}return i}function a(t,n,i,e){return new(i||(i=Promise))((function(r,o){function u(t){try{l(e.next(t))}catch(t){o(t)}}function a(t){try{l(e.throw(t))}catch(t){o(t)}}function l(t){t.done?r(t.value):function(t){return t instanceof i?t:new i((function(n){n(t)}))}(t.value).then(u,a)}l((e=e.apply(t,n||[])).next())}))}function l(t,n){var i,e,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(o=0)),o;)try{if(i=1,e&&(r=2&a[0]?e.return:a[0]?e.throw||((r=e.return)&&r.call(e),0):e.next)&&!(r=r.call(e,a[1])).done)return r;switch(e=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,e=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(t,o)}catch(t){a=[6,t],e=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function s(t,n,i){if(i||2===arguments.length)for(var e,r=0,o=n.length;r<o;r++)!e&&r in n||(e||(e=Array.prototype.slice.call(n,0,r)),e[r]=n[r]);return t.concat(e||Array.prototype.slice.call(n))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},873:function(t,n,i){i.d(n,{Z:function(){return g}});var e=i(40),r=i(823),o=i(506),u=i(962),a=i(289),l=i(638);var s=i(259),c=i(338),d=50,f=5,v=0,h=e.nr.getInstance();h&&h.onReset&&h.onReset((function(){return v++}));var p="__retval__";function g(t){void 0===t&&(t={});var n=new Map,i=0,h=0,g=v;return function(y,b){var x;if(void 0===b&&(b={}),t.useStaticStyles&&"function"==typeof y&&y.__noStyleOverride__)return y(b);h++;var w=y?y.__shadowConfig__:void 0,M=w&&w.window?w.window:"__default__";n.has(M)||n.set(M,new Map);var C=n.get(M),k=b.theme,A=k&&void 0!==k.rtl?k.rtl:(0,s.jI)(),S=t.disableCaching;if(g!==v&&(g=v,n.set(M,new Map),C=n.get(M),i=0),t.disableCaching||(C=m(n.get(M),y),C=m(C,b)),!S&&C[p]||(C[p]=void 0===y?{}:function(t,n){var i,s={subComponentStyles:{}},c=void 0;(0,l.db)(t[0])?(c=t[0],i=t[1]):i=t[0],null!=c||(c=null==n?void 0:n.shadowConfig);var d=(0,r.Cl)((0,r.Cl)({},n),{shadowConfig:c});if(!i&&t.length<=1)return{subComponentStyles:{}};var f=e.nr.getInstance(c);d.stylesheet=f;var v=o.T.apply(void 0,t),h=[];for(var p in v)if(v.hasOwnProperty(p)){if("subComponentStyles"===p){s.subComponentStyles=v.subComponentStyles||{};continue}if("__shadowConfig__"===p)continue;var g=v[p],y=(0,u.h)(f,g),m=y.classes,b=y.objects;(null==b?void 0:b.length)?(M=(0,a.GJ)(d||{},{displayName:p},b))&&(h.push(M),s[p]=m.concat([M.className]).join(" ")):s[p]=m.join(" ")}for(var x=0,w=h;x<w.length;x++){var M;(M=w[x])&&(0,a.Ae)(M,null==n?void 0:n.specificityMultiplier,c)}return s}(["function"==typeof y?y(b):y],{shadowConfig:y.__shadowConfig__,rtl:!!A,specificityMultiplier:t.useStaticStyles?f:void 0}),S||i++),i>(t.cacheSize||d)){var L=(0,c.z)();(null===(x=null==L?void 0:L.FabricConfig)||void 0===x?void 0:x.enableClassNameCacheFullWarning)&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(i,"/").concat(h,".")),console.trace()),n.get(M).clear(),i=0,t.disableCaching=!0}return C[p]}}function y(t,n){return n=function(t){switch(t){case void 0:return"__undefined__";case null:return"__null__";default:return t}}(n),t.has(n)||t.set(n,new Map),t.get(n)}function m(t,n){if("function"==typeof n)if(n.__cachedInputs__)for(var i=0,e=n.__cachedInputs__;i<e.length;i++)t=y(t,e[i]);else t=y(t,n);else if("object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&(t=y(t,n[r]));return t}},887:function(t,n,i){i.d(n,{v:function(){return o}});var e={},r=void 0;try{r=window}catch(t){}function o(t,n){if(void 0!==r){var i=r.__packages__=r.__packages__||{};i[t]&&e[t]||(e[t]=n,(i[t]=i[t]||[]).push(n))}}o("@fluentui/set-version","6.0.0")},916:function(t,n,i){i.d(n,{Z:function(){return l}});var e=i(962),r=i(638),o=i(800),u=i(40),a=i(289);function l(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(t,n){var i=t instanceof Array?t:[t],o=n||{};(0,r.db)(i[0])&&(o.shadowConfig=i[0]),o.stylesheet=u.nr.getInstance(o.shadowConfig);var l=(0,e.h)(o.stylesheet,i),s=l.classes,c=l.objects;return c.length&&s.push((0,a.kG)(o,c)),s.join(" ")}(t,(0,o.Iy)())}},921:function(t,n,i){function e(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}i.d(n,{S:function(){return e}})},927:function(t,n,i){i.d(n,{m:function(){return u}});var e=i(594),r=i(540),o=i(770);function u(t,n){var i,u=(i=e.useState(0)[1],function(){return i((function(t){return++t}))}),a=e.useContext(o.z).customizations,l=a.inCustomizerContext;return e.useEffect((function(){return l||r.X.observe(u),function(){l||r.X.unobserve(u)}}),[l]),r.X.getSettings(t,n,a)}},962:function(t,n,i){i.d(n,{h:function(){return r}});var e=i(638);function r(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=[],o=[],u=t;return function t(n){for(var i=0,a=n;i<a.length;i++){var l=a[i];if(l&&!(0,e.db)(l))if("string"==typeof l)if(l.indexOf(" ")>=0)t(l.split(" "));else{var s=u.argsFromClassName(l);s?t(s):-1===r.indexOf(l)&&r.push(l)}else Array.isArray(l)?t(l):"object"==typeof l&&o.push(l)}}(n),{classes:r,objects:o}}}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,{a:n}),n},i.d=function(t,n){for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};i.r(e),i.d(e,{AnnotationOnlyChart:function(){return mg},AreaChart:function(){return ph},CartesianChart:function(){return Dv},ChartHoverCard:function(){return pc.ChartHoverCard},ChartTable:function(){return Qp},DataVizGradientPalette:function(){return gc},DataVizPalette:function(){return es},DeclarativeChart:function(){return lm},DonutChart:function(){return rv},FunnelChart:function(){return lg},GanttChart:function(){return Xy},GaugeChart:function(){return hg},GaugeChartVariant:function(){return ag},GaugeValueFormat:function(){return ug},GroupedVerticalBarChart:function(){return Gh},HeatMapChart:function(){return Kh},HorizontalBarChart:function(){return ad},HorizontalBarChartVariant:function(){return v},HorizontalBarChartWithAxis:function(){return ig},Legends:function(){return df},LineChart:function(){return qv},MultiStackedBarChart:function(){return Dh},MultiStackedBarChartVariant:function(){return xh},NodesComposition:function(){return kp},PieChart:function(){return kh},ResponsiveContainer:function(){return jy},SankeyChart:function(){return Dp},ScatterChart:function(){return Jv},Shape:function(){return Zd},Sparkline:function(){return qp},StackedBarChart:function(){return Oh},Textbox:function(){return Rv},TreeChart:function(){return Yp},TreeTraverse:function(){return Ap},VerticalBarChart:function(){return Wh},VerticalStackedBarChart:function(){return jh},getChartHoverCardStyles:function(){return Uh.J},getColorFromToken:function(){return cs},getGradientFromToken:function(){return Cc},getNextColor:function(){return ss},getNextGradient:function(){return Mc},withResponsiveContainer:function(){return $y}});var r=i(566),o=i(823),u=i(594),a=i(873),l=i(259),s=i(338),c=i(40),d="__currentId__",f=(0,s.z)()||{};void 0===f[d]&&(f[d]=0);var v,h=!1;function p(t){if(!h){var n=c.nr.getInstance();n&&n.onReset&&n.onReset(g),h=!0}return(void 0===t?"id__":t)+f[d]++}function g(t){void 0===t&&(t=0),f[d]=t}function y(t,n,i){void 0===i&&(i=0);for(var e=-1,r=i;t&&r<t.length;r++)if(n(t[r],r)){e=r;break}return e}function m(t,n){var i=y(t,n);if(!(i<0))return t[i]}!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(v||(v={}));function b(t,n){var i,e;if(void 0===n&&(n=!0),!t)return null;var r=n&&function(t){var n,i;return t&&(i=t)&&i._virtual&&(n=t._virtual.parent),n}(t);return r||("function"!=typeof t.assignedElements&&(null===(i=t.assignedSlot)||void 0===i?void 0:i.parentNode)?t.assignedSlot:11===(null===(e=t.parentNode)||void 0===e?void 0:e.nodeType)?t.parentNode.host:t.parentNode)}function x(t,n,i){return null!=i||(i=document),!t||t===i.body||t instanceof Document?null:n(t)?t:x(b(t),n)}function w(t,n,i){void 0===i&&(i=!0);var e=!1;if(t&&n)if(i)if(t===n)e=!0;else for(e=!1;n;){var r=b(n);if(r===t){e=!0;break}n=r}else t.contains&&(e=t.contains(n));return e}var M=i(543);function C(t,n,i){var e=A(t,t,!0,!1,!1,!0,void 0,void 0,n,i);return!!e&&(T(e),!0)}function k(t,n,i,e,r,o,u,a,l){var s;if(!n||!u&&n===t)return null;var c=S(n);if(r&&c&&(o||!V(n)&&!N(n))){var d=k(t,n.lastElementChild||l&&(null===(s=n.shadowRoot)||void 0===s?void 0:s.lastElementChild),!0,!0,!0,o,u,a,l);if(d){if(a&&D(d,!0,l)||!a)return d;var f=k(t,d.previousElementSibling,!0,!0,!0,o,u,a,l);if(f)return f;for(var v=d.parentElement;v&&v!==n;){var h=k(t,v.previousElementSibling,!0,!0,!0,o,u,a,l);if(h)return h;v=v.parentElement}}}return i&&c&&D(n,a,l)?n:k(t,n.previousElementSibling,!0,!0,!0,o,u,a,l)||(e?null:k(t,n.parentElement,!0,!1,!1,o,u,a,l))}function A(t,n,i,e,r,o,u,a,l,s){var c;if(!n||n===t&&r&&!u)return null;var d=(l?L:S)(n);if(i&&d&&D(n,a,s))return n;if(!r&&d&&(o||!V(n)&&!N(n))){var f=A(t,n.firstElementChild||s&&(null===(c=n.shadowRoot)||void 0===c?void 0:c.firstElementChild),!0,!0,!1,o,u,a,l,s);if(f)return f}return n===t?null:A(t,n.nextElementSibling,!0,!0,!1,o,u,a,l,s)||(e?null:A(t,n.parentElement,!1,!1,!0,o,u,a,l,s))}function S(t){if(!t||!t.getAttribute)return!1;var n=t.getAttribute("data-is-visible");return null!=n?"true"===n:0!==t.offsetHeight||null!==t.offsetParent||!0===t.isVisible}function L(t,n){var i=null!=n?n:(0,s.z)();return!!t&&S(t)&&!t.hidden&&"hidden"!==i.getComputedStyle(t).visibility}function D(t,n,i){if(void 0===i&&(i=!0),!t||t.disabled)return!1;var e=0,r=null;t&&t.getAttribute&&(r=t.getAttribute("tabIndex"))&&(e=parseInt(r,10));var o=t.getAttribute?t.getAttribute("data-is-focusable"):null,u=null!==r&&e>=0,a=!(!i||!t.shadowRoot||!t.shadowRoot.delegatesFocus),l=!!t&&"false"!==o&&("A"===t.tagName||"BUTTON"===t.tagName||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||"true"===o||u||a);return n?-1!==e&&l:l}function V(t){return!!(t&&t.getAttribute&&t.getAttribute("data-focuszone-id"))}function N(t){return!(!t||!t.getAttribute||"true"!==t.getAttribute("data-is-sub-focuszone"))}var O=void 0;function T(t){if(t){var n=(0,s.z)(t);n&&(void 0!==O&&n.cancelAnimationFrame(O),O=n.requestAnimationFrame((function(){t&&t.focus(),O=void 0})))}}function E(t,n,i,e){return t.addEventListener(n,i,e),function(){return t.removeEventListener(n,i,e)}}function F(t,n){for(var i=(0,o.Cl)({},n),e=0,r=Object.keys(t);e<r.length;e++){var u=r[e];void 0===i[u]&&(i[u]=t[u])}return i}var B=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i={},e=0,r=t;e<r.length;e++)for(var o=r[e],u=0,a=Array.isArray(o)?o:Object.keys(o);u<a.length;u++)i[a[u]]=1;return i},P=B(["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),_=B(["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","ref","role","style","tabIndex","title","translate","spellCheck","name"]),H=B(_,P),I=(B(H,["form"]),B(H,["height","loop","muted","preload","src","width"])),W=(B(I,["poster"]),B(H,["start"]),B(H,["value"]),B(H,["download","href","hrefLang","media","rel","target","type"]),B(H,["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"])),R=(B(W,["accept","alt","autoCapitalize","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","minLength","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),B(W,["autoCapitalize","cols","dirname","form","maxLength","minLength","placeholder","readOnly","required","rows","wrap"]),B(W,["form","multiple","required"]),B(H,["selected","value"]),B(H,["cellPadding","cellSpacing"]),B(H,["rowSpan","scope"]),B(H,["colSpan","headers","rowSpan","scope"]),B(H,["span"]),B(H,["span"]),B(H,["acceptCharset","action","encType","encType","method","noValidate","target"]),B(H,["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),B(H,["alt","crossOrigin","height","src","srcSet","useMap","width"]),H);function z(t,n,i){for(var e=Array.isArray(n),r={},o=0,u=Object.keys(t);o<u.length;o++){var a=u[o];!(!e&&n[a]||e&&n.indexOf(a)>=0||0===a.indexOf("data-")||0===a.indexOf("aria-"))||i&&-1!==(null==i?void 0:i.indexOf(a))||(r[a]=t[a])}return r}function j(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=[],e=0,r=t;e<r.length;e++){var o=r[e];if(o)if("string"==typeof o)i.push(o);else if(o.hasOwnProperty("toString")&&"function"==typeof o.toString)i.push(o.toString());else for(var u in o)o[u]&&i.push(u)}return i.join(" ")}function $(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return Y.apply(this,[null,t].concat(n))}function Y(t,n){for(var i=[],e=2;e<arguments.length;e++)i[e-2]=arguments[e];n=n||{};for(var r=0,o=i;r<o.length;r++){var u=o[r];if(u)for(var a in u)!u.hasOwnProperty(a)||t&&!t(a)||(n[a]=u[a])}return n}var X,G,U,q=i(916),Z=((0,q.Z)({overflow:"hidden !important"}),"data-is-scrollable");function K(t){for(var n=t,i=(0,M.Y)(t);n&&n!==i.body;){if("true"===n.getAttribute(Z))return n;n=n.parentElement}for(n=t;n&&n!==i.body;){if("false"!==n.getAttribute(Z)){var e=getComputedStyle(n),r=e?e.getPropertyValue("overflow-y"):"";if(r&&("scroll"===r||"auto"===r))return n}n=n.parentElement}return n&&n!==i.body||(n=(0,s.z)(t)),n}!function(t){t[t.top=1]="top",t[t.bottom=-1]="bottom",t[t.left=2]="left",t[t.right=-2]="right"}(G||(G={})),function(t){t[t.top=0]="top",t[t.bottom=1]="bottom",t[t.start=2]="start",t[t.end=3]="end"}(U||(U={}));var J,Q=function(){function t(t,n,i,e){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=0),this.top=i,this.bottom=e,this.left=t,this.right=n}return Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return parseFloat(this.top.toFixed(4))===parseFloat(t.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(t.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(t.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(t.right.toFixed(4))},t}();function tt(t,n,i){return{targetEdge:t,alignmentEdge:n,isAuto:i}}var nt=((J={})[0]=tt(G.top,G.left),J[1]=tt(G.top),J[2]=tt(G.top,G.right),J[3]=tt(G.top,void 0,!0),J[4]=tt(G.bottom,G.left),J[5]=tt(G.bottom),J[6]=tt(G.bottom,G.right),J[7]=tt(G.bottom,void 0,!0),J[8]=tt(G.left,G.top),J[9]=tt(G.left),J[10]=tt(G.left,G.bottom),J[11]=tt(G.right,G.top),J[12]=tt(G.right),J[13]=tt(G.right,G.bottom),J);function it(t,n){return!(t.top<n.top||t.bottom>n.bottom||t.left<n.left||t.right>n.right)}function et(t,n){var i=[];return t.top<n.top&&i.push(G.top),t.bottom>n.bottom&&i.push(G.bottom),t.left<n.left&&i.push(G.left),t.right>n.right&&i.push(G.right),i}function rt(t,n){return t[G[n]]}function ot(t,n,i){return t[G[n]]=i,t}function ut(t,n){var i=mt(n);return(rt(t,i.positiveEdge)+rt(t,i.negativeEdge))/2}function at(t,n){return t>0?n:-1*n}function lt(t,n){return at(t,rt(n,t))}function st(t,n,i){return at(i,rt(t,i)-rt(n,i))}function ct(t,n,i,e){void 0===e&&(e=!0);var r=rt(t,n)-i,o=ot(t,n,i);return e&&(o=ot(t,-1*n,rt(t,-1*n)-r)),o}function dt(t,n,i,e){return void 0===e&&(e=0),ct(t,i,rt(n,i)+at(i,e))}function ft(t,n,i){return lt(i,t)>lt(i,n)}function vt(t,n){for(var i=0,e=0,r=et(t,n);e<r.length;e++){var o=r[e];i+=Math.pow(st(t,n,o),2)}return i}function ht(t,n,i,e){return void 0===e&&(e=200),(i===G.bottom||i===G.top)&&st(t,n,i)>=e}function pt(t,n,i,e){for(var r=0,o=t;r<o.length;r++){var u=o[r],a=void 0;e&&e===-1*u?(a=ct(n.elementRectangle,u,rt(i,u),!1),n.forcedInBounds=!0):ft(a=dt(n.elementRectangle,i,u),i,-1*u)||(a=ct(a,-1*u,rt(i,-1*u),!1),n.forcedInBounds=!0),n.elementRectangle=a}return n}function gt(t,n,i){var e=mt(n).positiveEdge;return ct(t,e,i-(ut(t,n)-rt(t,e)))}function yt(t,n,i,e,r){void 0===e&&(e=0);var o=new Q(t.left,t.right,t.top,t.bottom),u=i.alignmentEdge,a=i.targetEdge,l=r?a:-1*a;return o=r?dt(o,n,a,e):function(t,n,i,e){void 0===e&&(e=0);var r=at(-1*i,e);return ct(t,-1*i,rt(n,i)+r)}(o,n,a,e),o=u?dt(o,n,u):gt(o,l,ut(n,a))}function mt(t){return t===G.top||t===G.bottom?{positiveEdge:G.left,negativeEdge:G.right}:{positiveEdge:G.top,negativeEdge:G.bottom}}function bt(t,n,i){return i&&Math.abs(st(t,i,n))>Math.abs(st(t,i,-1*n))?-1*n:n}function xt(t,n,i,e,r,o,u,a){var l,s={},c=Ct(n),d=o?i:-1*i,f=r||mt(i).positiveEdge;return u&&!function(t,n,i){return void 0!==i&&rt(t,n)===rt(i,n)}(t,(l=f,-1*l),e)||(f=bt(t,f,e)),s[G[d]]=st(t,c,d),s[G[f]]=st(t,c,f),a&&(s[G[-1*d]]=st(t,c,-1*d),s[G[-1*f]]=st(t,c,-1*f)),s}function wt(t,n,i){var e=ut(n,t),r=ut(i,t),o=mt(t),u=o.positiveEdge,a=o.negativeEdge;return e<=r?u:a}function Mt(t,n,i,e,r,o,u,a,s){void 0===o&&(o=!1);var c=yt(t,n,e,r,s);return it(c,i)?{elementRectangle:c,targetEdge:e.targetEdge,alignmentEdge:e.alignmentEdge}:function(t,n,i,e,r,o,u,a,s){void 0===r&&(r=!1),void 0===u&&(u=0);var c=e.alignmentEdge,d=e.alignTargetEdge,f={elementRectangle:t,targetEdge:e.targetEdge,alignmentEdge:c};a||s||(f=function(t,n,i,e,r,o,u){void 0===r&&(r=!1),void 0===u&&(u=0);var a=[G.left,G.right,G.bottom,G.top];(0,l.jI)()&&(a[0]*=-1,a[1]*=-1);for(var s,c=t,d=e.targetEdge,f=e.alignmentEdge,v=d,h=f,p=0;p<4;p++){if(ft(c,i,d))return{elementRectangle:c,targetEdge:d,alignmentEdge:f};if(r&&ht(n,i,d,o)){switch(d){case G.bottom:c.bottom=i.bottom;break;case G.top:c.top=i.top}return{elementRectangle:c,targetEdge:d,alignmentEdge:f,forcedInBounds:!0}}var g=vt(c,i);(!s||g<s)&&(s=g,v=d,h=f),a.splice(a.indexOf(d),1),a.length>0&&(a.indexOf(-1*d)>-1?d*=-1:(f=d,d=a.slice(-1)[0]),c=yt(t,n,{targetEdge:d,alignmentEdge:f},u))}return{elementRectangle:c=yt(t,n,{targetEdge:v,alignmentEdge:h},u),targetEdge:v,alignmentEdge:h}}(t,n,i,e,r,o,u));var v=et(f.elementRectangle,i),h=a?-f.targetEdge:void 0;if(v.length>0)if(d)if(f.alignmentEdge&&v.indexOf(-1*f.alignmentEdge)>-1){var p=function(t,n,i,e){var r=t.alignmentEdge,o=t.targetEdge,u=-1*r;return{elementRectangle:yt(t.elementRectangle,n,{targetEdge:o,alignmentEdge:u},i,e),targetEdge:o,alignmentEdge:u}}(f,n,u,s);if(it(p.elementRectangle,i))return p;f=pt(et(p.elementRectangle,i),f,i,h)}else f=pt(v,f,i,h);else f=pt(v,f,i,h);return f}(c,n,i,e,o,u,r,a,s)}function Ct(t){var n=t.getBoundingClientRect();return new Q(n.left,n.right,n.top,n.bottom)}function kt(t,n,i,e,r,u){void 0===r&&(r=!1);var a=t.gapSpace?t.gapSpace:0,s=function(t,n){var i;if(n){if(n.preventDefault){var e=n;i=new Q(e.clientX,e.clientX,e.clientY,e.clientY)}else if(n.getBoundingClientRect)i=Ct(n);else{var r=n,o=r.left||r.x,u=r.top||r.y,a=r.right||o,l=r.bottom||u;i=new Q(o,a,u,l)}if(!it(i,t))for(var s=0,c=et(i,t);s<c.length;s++){var d=c[s];i[G[d]]=t[G[d]]}}else i=new Q(0,0,0,0);return i}(i,t.target),c=function(t,n,i,e,r){return t.isAuto&&(t.alignmentEdge=wt(t.targetEdge,n,i)),t.alignTargetEdge=r,t}(function(t,n,i){if(void 0===t&&(t=7),i)return{alignmentEdge:i.alignmentEdge,isAuto:i.isAuto,targetEdge:i.targetEdge};var e=(0,o.Cl)({},nt[t]);return(0,l.jI)()?(e.alignmentEdge&&e.alignmentEdge%2==0&&(e.alignmentEdge=-1*e.alignmentEdge),void 0!==n?nt[n]:e):e}(t.directionalHint,t.directionalHintForRTL,e),s,i,t.coverTarget,t.alignTargetEdge),d=Mt(Ct(n),s,i,c,a,r,u,t.directionalHintFixed,t.coverTarget);return(0,o.Cl)((0,o.Cl)({},d),{targetRectangle:s})}function At(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=0),function(t){return Math.sqrt(t*t*2)}(t?n:0)/2+i}function St(t,n,i,e,r,u,a,l){void 0===r&&(r=!1);var c=null!=l?l:(0,s.z)(),d=t.isBeakVisible&&t.beakWidth||0,f=At(t.isBeakVisible,t.beakWidth,t.gapSpace),v=t;v.gapSpace=f;var h,p,g,y,m,b,x,w,C,k=t.bounds?(C=t.bounds,new Q(C.left,C.right,C.top,C.bottom)):new Q(0,c.innerWidth-function(){if(void 0===X){var t=(0,M.Y)(),n=t.createElement("div");n.style.setProperty("width","100px"),n.style.setProperty("height","100px"),n.style.setProperty("overflow","scroll"),n.style.setProperty("position","absolute"),n.style.setProperty("top","-9999px"),t.body.appendChild(n),X=n.offsetWidth-n.clientWidth,t.body.removeChild(n)}return X}(),0,c.innerHeight),A=kt(v,i,k,e,r,u),S=(h=A,p=function(t,n){var i=n.targetRectangle,e=mt(n.targetEdge),r=e.positiveEdge,o=e.negativeEdge,u=ut(i,n.targetEdge),a=new Q(t/2,n.elementRectangle.width-t/2,t/2,n.elementRectangle.height-t/2),l=new Q(0,t,0,t);return ft(l=gt(l=ct(l,-1*n.targetEdge,-t/2),-1*n.targetEdge,u-lt(r,n.elementRectangle)),a,r)?ft(l,a,o)||(l=dt(l,a,o)):l=dt(l,a,r),l}(d,A),g=k,y=-1*h.targetEdge,m=new Q(0,h.elementRectangle.width,0,h.elementRectangle.height),b={},x=bt(h.elementRectangle,h.alignmentEdge?h.alignmentEdge:mt(y).positiveEdge,g),w=st(h.elementRectangle,h.targetRectangle,y)>Math.abs(rt(p,y)),b[G[y]]=rt(p,y),b[G[x]]=st(p,m,x),{elementPosition:(0,o.Cl)({},b),closestEdge:wt(h.targetEdge,p,m),targetEdge:y,hideBeak:!w});return(0,o.Cl)((0,o.Cl)({},function(t,n,i,e,r){return{elementPosition:xt(t.elementRectangle,n,t.targetEdge,i,t.alignmentEdge,e,r,t.forcedInBounds),targetEdge:t.targetEdge,alignmentEdge:t.alignmentEdge}}(A,n,k,t.coverTarget,a)),{beakPosition:S})}var Lt=["TEMPLATE","STYLE","SCRIPT"];function Dt(t){var n=(0,M.Y)(t);if(!n)return function(){};for(var i=[];t!==n.body&&t.parentElement;){for(var e=0,r=t.parentElement.children;e<r.length;e++){var o=r[e],u=o.getAttribute("aria-hidden");o!==t&&"true"!==(null==u?void 0:u.toLowerCase())&&-1===Lt.indexOf(o.tagName)&&i.push([o,u])}t=t.parentElement}return i.forEach((function(t){t[0].setAttribute("aria-hidden","true")})),function(){!function(t){t.forEach((function(t){var n=t[0],i=t[1];i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}))}(i),i=[]}}var Vt=27,Nt=function(){function t(t,n){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=t||null,this._onErrorHandler=n,this._noop=function(){}}return t.prototype.dispose=function(){var t;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(t in this._timeoutIds)this._timeoutIds.hasOwnProperty(t)&&this.clearTimeout(parseInt(t,10));this._timeoutIds=null}if(this._immediateIds){for(t in this._immediateIds)this._immediateIds.hasOwnProperty(t)&&this.clearImmediate(parseInt(t,10));this._immediateIds=null}if(this._intervalIds){for(t in this._intervalIds)this._intervalIds.hasOwnProperty(t)&&this.clearInterval(parseInt(t,10));this._intervalIds=null}if(this._animationFrameIds){for(t in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(t)&&this.cancelAnimationFrame(parseInt(t,10));this._animationFrameIds=null}},t.prototype.setTimeout=function(t,n){var i=this,e=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),e=setTimeout((function(){try{i._timeoutIds&&delete i._timeoutIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._timeoutIds[e]=!0),e},t.prototype.clearTimeout=function(t){this._timeoutIds&&this._timeoutIds[t]&&(clearTimeout(t),delete this._timeoutIds[t])},t.prototype.setImmediate=function(t,n){var i=this,e=0,r=(0,s.z)(n);return this._isDisposed||(this._immediateIds||(this._immediateIds={}),e=r.setTimeout((function(){try{i._immediateIds&&delete i._immediateIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),0),this._immediateIds[e]=!0),e},t.prototype.clearImmediate=function(t,n){var i=(0,s.z)(n);this._immediateIds&&this._immediateIds[t]&&(i.clearTimeout(t),delete this._immediateIds[t])},t.prototype.setInterval=function(t,n){var i=this,e=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),e=setInterval((function(){try{t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._intervalIds[e]=!0),e},t.prototype.clearInterval=function(t){this._intervalIds&&this._intervalIds[t]&&(clearInterval(t),delete this._intervalIds[t])},t.prototype.throttle=function(t,n,i){var e=this;if(this._isDisposed)return this._noop;var r,o,u=n||0,a=!0,l=!0,s=0,c=null;i&&"boolean"==typeof i.leading&&(a=i.leading),i&&"boolean"==typeof i.trailing&&(l=i.trailing);var d=function(n){var i=Date.now(),f=i-s,v=a?u-f:u;return f>=u&&(!n||a)?(s=i,c&&(e.clearTimeout(c),c=null),r=t.apply(e._parent,o)):null===c&&l&&(c=e.setTimeout(d,v)),r};return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return o=t,d(!0)}},t.prototype.debounce=function(t,n,i){var e=this;if(this._isDisposed){var r=function(){};return r.cancel=function(){},r.flush=function(){return null},r.pending=function(){return!1},r}var o,u,a=n||0,l=!1,s=!0,c=null,d=0,f=Date.now(),v=null;i&&"boolean"==typeof i.leading&&(l=i.leading),i&&"boolean"==typeof i.trailing&&(s=i.trailing),i&&"number"==typeof i.maxWait&&!isNaN(i.maxWait)&&(c=i.maxWait);var h=function(t){v&&(e.clearTimeout(v),v=null),f=t},p=function(n){h(n),o=t.apply(e._parent,u)},g=function(t){var n=Date.now(),i=!1;t&&(l&&n-d>=a&&(i=!0),d=n);var r=n-d,u=a-r,h=n-f,y=!1;return null!==c&&(h>=c&&v?y=!0:u=Math.min(u,c-h)),r>=a||y||i?p(n):null!==v&&t||!s||(v=e.setTimeout(g,u)),o},y=function(){return!!v},m=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return u=t,g(!0)};return m.cancel=function(){y()&&h(Date.now())},m.flush=function(){return y()&&p(Date.now()),o},m.pending=y,m},t.prototype.requestAnimationFrame=function(t,n){var i=this,e=0,r=(0,s.z)(n);if(!this._isDisposed){this._animationFrameIds||(this._animationFrameIds={});var o=function(){try{i._animationFrameIds&&delete i._animationFrameIds[e],t.apply(i._parent)}catch(t){i._logError(t)}};e=r.requestAnimationFrame?r.requestAnimationFrame(o):r.setTimeout(o,0),this._animationFrameIds[e]=!0}return e},t.prototype.cancelAnimationFrame=function(t,n){var i=(0,s.z)(n);this._animationFrameIds&&this._animationFrameIds[t]&&(i.cancelAnimationFrame?i.cancelAnimationFrame(t):i.clearTimeout(t),delete this._animationFrameIds[t])},t.prototype._logError=function(t){this._onErrorHandler&&this._onErrorHandler(t)},t}();function Ot(){var t=u.useRef(void 0);return t.current||(t.current=new Nt),u.useEffect((function(){return function(){var n;null===(n=t.current)||void 0===n||n.dispose(),t.current=void 0}}),[]),t.current}function Tt(t,n,i,e){var r=u.useRef(i);r.current=i,u.useEffect((function(){var i=t&&"current"in t?t.current:t;if(i&&i.addEventListener)return E(i,n,(function(t){return r.current(t)}),e)}),[t,n,e])}function Et(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=u.useCallback((function(n){i.current=n;for(var e=0,r=t;e<r.length;e++){var o=r[e];"function"==typeof o?o(n):o&&(o.current=n)}}),(0,o.fX)([],t,!0));return i}var Ft=u.createContext({window:"object"==typeof window?window:void 0}),Bt=function(){return u.useContext(Ft).window},Pt=function(){var t;return null===(t=u.useContext(Ft).window)||void 0===t?void 0:t.document};function _t(t){var n=t.originalElement,i=t.containsFocus;n&&i&&n!==(0,s.z)()&&setTimeout((function(){var t;null===(t=n.focus)||void 0===t||t.call(n)}),0)}var Ht=u.forwardRef((function(t,n){var i=F({shouldRestoreFocus:!0,enableAriaHiddenSiblings:!0},t),e=u.useRef(void 0),r=Et(e,n);!function(t,n){var i="true"===String(t["aria-modal"]).toLowerCase()&&t.enableAriaHiddenSiblings;u.useEffect((function(){if(i&&n.current)return Dt(n.current)}),[n,i])}(i,e),function(t,n){var i=t.onRestoreFocus,e=void 0===i?_t:i,r=u.useRef(void 0),o=u.useRef(!1);u.useEffect((function(){var t,i,u;return r.current=(0,M.Y)().activeElement,t=n.current,(u=(i=(0,M.Y)(t))&&i.activeElement)&&w(t,u)&&(o.current=!0),function(){var t;null==e||e({originalElement:r.current,containsFocus:o.current,documentContainsFocus:(null===(t=(0,M.Y)())||void 0===t?void 0:t.hasFocus())||!1}),r.current=void 0}}),[]),Tt(n,"focus",u.useCallback((function(){o.current=!0}),[]),!0),Tt(n,"blur",u.useCallback((function(t){n.current&&t.relatedTarget&&!n.current.contains(t.relatedTarget)&&(o.current=!1)}),[]),!0)}(i,e);var a=i.role,l=i.className,s=i.ariaLabel,c=i.ariaLabelledBy,d=i.ariaDescribedBy,f=i.style,v=i.children,h=i.onDismiss,p=function(t,n){var i=Ot(),e=u.useState(!1),r=e[0],o=e[1];return u.useEffect((function(){return i.requestAnimationFrame((function(){var i;if(!t.style||!t.style.overflowY){var e=!1;if(n&&n.current&&(null===(i=n.current)||void 0===i?void 0:i.firstElementChild)){var u=n.current.clientHeight,a=n.current.firstElementChild.clientHeight;u>0&&a>u&&(e=a-u>1)}r!==e&&o(e)}})),function(){return i.dispose()}})),r}(i,e),g=u.useCallback((function(t){t.which===Vt&&h&&(h(t),t.preventDefault(),t.stopPropagation())}),[h]);return Tt(Bt(),"keydown",g),u.createElement("div",(0,o.Cl)({ref:r},z(i,R),{className:l,role:a,"aria-label":s,"aria-labelledby":c,"aria-describedby":d,onKeyDown:g,style:(0,o.Cl)({overflowY:p?"scroll":void 0,outline:"none"},f)}),v)}));Ht.displayName="Popup";var It=i(419);function Wt(t){var n=u.useRef(void 0);return void 0===n.current&&(n.current={value:"function"==typeof t?t():t}),n.current.value}var Rt,zt=function(){var t;return null!==(t=Bt())&&void 0!==t?t:"undefined"!=typeof window?window:void 0},jt=function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.window)||void 0===n?void 0:n.document)&&void 0!==i?i:"undefined"!=typeof document?document:void 0},$t=((Rt={})[G.top]=It.lw.slideUpIn10,Rt[G.bottom]=It.lw.slideDownIn10,Rt[G.left]=It.lw.slideLeftIn10,Rt[G.right]=It.lw.slideRightIn10,Rt),Yt={opacity:0,filter:"opacity(0)",pointerEvents:"none"},Xt=["role","aria-roledescription"],Gt={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:7},Ut=(0,a.Z)({disableCaching:!0});function qt(t,n,i,e){var r,o=t.calloutMaxHeight,a=t.finalHeight,l=t.directionalHint,s=t.directionalHintFixed,c=t.hidden,d=t.gapSpace,f=t.beakWidth,v=t.isBeakVisible,h=t.coverTarget,p=u.useState(),g=p[0],y=p[1],m=null!==(r=null==e?void 0:e.elementPosition)&&void 0!==r?r:{},b=m.top,x=m.bottom,w=(null==i?void 0:i.current)?function(t){var n,i,e,r,o=t,u=t,a=t,l=null!==(n=a.left)&&void 0!==n?n:a.x,s=null!==(i=a.top)&&void 0!==i?i:a.y,c=null!==(e=a.right)&&void 0!==e?e:l,d=null!==(r=a.bottom)&&void 0!==r?r:s;return o.stopPropagation?new Q(o.clientX,o.clientX,o.clientY,o.clientY):void 0!==l&&void 0!==s?new Q(l,c,s,d):Ct(u)}(i.current):void 0;return u.useEffect((function(){var t,i,r=null!==(t=n())&&void 0!==t?t:{},u=r.top,a=r.bottom;(null==e?void 0:e.targetEdge)===G.top&&(null==w?void 0:w.top)&&!h&&(a=w.top-function(t,n,i){return At(t,n,i)}(v,f,d)),"number"==typeof b&&a?i=a-b:"number"==typeof x&&"number"==typeof u&&a&&(i=a-u-x),y(!o&&!c||o&&i&&o>i?i:o||void 0)}),[x,o,a,l,s,n,c,e,b,d,f,v,w,h]),g}function Zt(t,n,i,e,r,a){var l,c=u.useState(),d=c[0],f=c[1],v=u.useRef(0),h=u.useRef(void 0),p=Ot(),g=t.hidden,y=t.target,m=t.finalHeight,b=t.calloutMaxHeight,x=t.onPositioned,w=t.directionalHint,M=t.hideOverflow,C=t.preferScrollResizePositioning,k=zt(),A=u.useRef(void 0);A.current!==a.current&&(A.current=a.current,l=a.current?null==k?void 0:k.getComputedStyle(a.current):void 0);var S=null==l?void 0:l.overflowY;return u.useEffect((function(){if(!g){var u=p.requestAnimationFrame((function(){var u,a,l,c;if(n.current&&i){var p=(0,o.Cl)((0,o.Cl)({},t),{target:e.current,bounds:r()}),g=i.cloneNode(!0);g.style.maxHeight=b?"".concat(b):"",g.style.visibility="hidden",null===(u=i.parentElement)||void 0===u||u.appendChild(g);var w=h.current===y?d:void 0,A=C&&!(M||"clip"===S||"hidden"===S),L=m?function(t,n,i,e,r){return function(t,n,i,e,r){return St(t,n,i,e,!1,void 0,!0,null!=r?r:(0,s.z)())}(t,n,i,e,r)}(p,n.current,g,w,k):function(t,n,i,e,r,o,u){return St(t,n,i,e,r,void 0,void 0,u)}(p,n.current,g,w,A,0,k);null===(a=i.parentElement)||void 0===a||a.removeChild(g),!d&&L||d&&L&&(c=L,!Qt((l=d).elementPosition,c.elementPosition)||!Qt(l.beakPosition.elementPosition,c.beakPosition.elementPosition))&&v.current<5?(v.current++,f(L)):v.current>0&&(v.current=0,null==x||x(d))}}),i);return h.current=y,function(){p.cancelAnimationFrame(u),h.current=void 0}}f(void 0),v.current=0}),[g,w,p,i,b,n,e,m,r,x,d,t,y,M,C,S,k]),d}var Kt=u.memo(u.forwardRef((function(t,n){var i=F(Gt,t),e=i.styles,r=i.style,a=i.ariaLabel,l=i.ariaDescribedBy,s=i.ariaLabelledBy,c=i.className,d=i.isBeakVisible,f=i.children,v=i.beakWidth,h=i.calloutWidth,p=i.calloutMaxWidth,g=i.calloutMinWidth,y=i.doNotLayer,m=i.finalHeight,b=i.hideOverflow,x=void 0===b?!!m:b,k=i.backgroundColor,A=i.calloutMaxHeight,S=i.onScroll,L=i.shouldRestoreFocus,D=void 0===L||L,V=i.target,N=i.hidden,O=i.onLayerMounted,T=i.popupProps,B=u.useRef(null),P=Et(u.useRef(null),null==T?void 0:T.ref),_=u.useState(null),H=_[0],I=_[1],W=u.useCallback((function(t){I(t)}),[]),$=Et(B,n),Y=function(t,n){var i,e,r,o=u.useRef(void 0),a=u.useRef(null),l=Bt();if(!t||t!==o.current||"string"==typeof t){var s=null==n?void 0:n.current;if(t)if("string"==typeof t)if(null===(i=null==s?void 0:s.getRootNode())||void 0===i?void 0:i.host)a.current=null!==(r=null===(e=null==s?void 0:s.getRootNode())||void 0===e?void 0:e.querySelector(t))&&void 0!==r?r:null;else{var c=(0,M.Y)(s);a.current=c?c.querySelector(t):null}else a.current="stopPropagation"in t||"getBoundingClientRect"in t?t:"current"in t?t.current:t;o.current=t}return[a,l]}(i.target,{current:H}),X=Y[0],G=Y[1],U=function(t,n,i){var e=t.bounds,r=t.minPagePadding,o=void 0===r?Gt.minPagePadding:r,a=t.target,l=u.useState(!1),s=l[0],c=l[1],d=u.useRef(void 0),f=u.useCallback((function(){if(!d.current||s){var t="function"==typeof e?i?e(a,i):void 0:e;!t&&i&&(t=function(t,n){return function(t,n){var i=void 0;if(n.getWindowSegments&&(i=n.getWindowSegments()),void 0===i||i.length<=1)return{top:0,left:0,right:n.innerWidth,bottom:n.innerHeight,width:n.innerWidth,height:n.innerHeight};var e=0,r=0;if(null!==t&&t.getBoundingClientRect){var o=t.getBoundingClientRect();e=(o.left+o.right)/2,r=(o.top+o.bottom)/2}else null!==t&&(e=t.left||t.x,r=t.top||t.y);for(var u={top:0,left:0,right:0,bottom:0,width:0,height:0},a=0,l=i;a<l.length;a++){var s=l[a];e&&s.left<=e&&s.right>=e&&r&&s.top<=r&&s.bottom>=r&&(u={top:s.top,left:s.left,right:s.right,bottom:s.bottom,width:s.width,height:s.height})}return u}(t,n)}(n.current,i),t={top:t.top+o,left:t.left+o,right:t.right-o,bottom:t.bottom-o,width:t.width-2*o,height:t.height-2*o}),d.current=t,s&&c(!1)}return d.current}),[e,o,a,n,i,s]),v=Ot();return Tt(i,"resize",v.debounce((function(){c(!0)}),500,{leading:!0})),f}(i,X,G),q=Zt(i,B,H,X,U,P),Z=qt(i,U,X,q),K=function(t,n,i,e,r){var o=t.hidden,a=t.onDismiss,l=t.preventDismissOnScroll,s=t.preventDismissOnResize,c=t.preventDismissOnLostFocus,d=t.dismissOnTargetClick,f=t.shouldDismissOnWindowFocus,v=t.preventDismissOnEvent,h=u.useRef(!1),p=Ot(),g=Wt([function(){h.current=!0},function(){h.current=!1}]),y=!!n;return u.useEffect((function(){var t=function(t){y&&!l&&g(t)},n=function(t){s||v&&v(t)||null==a||a(t)},u=function(t){c||g(t)},g=function(t){var n=t.composedPath?t.composedPath():[],o=n.length>0?n[0]:t.target,u=i.current&&!w(i.current,o);if(u&&h.current)h.current=!1;else if(!e.current&&u||t.target!==r&&u&&(!e.current||"stopPropagation"in e.current||d||o!==e.current&&!w(e.current,o))){if(v&&v(t))return;null==a||a(t)}},m=function(t){f&&((!v||v(t))&&(v||c)||(null==r?void 0:r.document.hasFocus())||null!==t.relatedTarget||null==a||a(t))},b=new Promise((function(i){p.setTimeout((function(){if(!o&&r){var e=[E(r,"scroll",t,!0),E(r,"resize",n,!0),E(r.document.documentElement,"focus",u,!0),E(r.document.documentElement,"click",u,!0),E(r,"blur",m,!0)];i((function(){e.forEach((function(t){return t()}))}))}}),0)}));return function(){b.then((function(t){return t()}))}}),[o,p,i,e,r,a,f,d,c,s,l,y,v]),g}(i,q,B,X,G),J=K[0],Q=K[1],tt=(null==q?void 0:q.elementPosition.top)&&(null==q?void 0:q.elementPosition.bottom),nt=(0,o.Cl)((0,o.Cl)({},null==q?void 0:q.elementPosition),{maxHeight:Z});if(tt&&(nt.bottom=void 0),function(t,n,i){var e=t.hidden,r=t.setInitialFocus,o=Ot(),a=!!n;u.useEffect((function(){if(!e&&r&&a&&i){var t=o.requestAnimationFrame((function(){return C(i)}),i);return function(){return o.cancelAnimationFrame(t)}}}),[e,a,o,i,r])}(i,q,H),u.useEffect((function(){N||null==O||O()}),[N]),!G)return null;var it=x,et=d&&!!V,rt=Ut(e,{theme:i.theme,className:c,overflowYHidden:it,calloutWidth:h,positions:q,beakWidth:v,backgroundColor:k,calloutMaxWidth:p,calloutMinWidth:g,doNotLayer:y}),ot=(0,o.Cl)((0,o.Cl)({maxHeight:A||"100%"},r),it&&{overflowY:"hidden"}),ut=i.hidden?{visibility:"hidden"}:void 0;return u.createElement("div",{ref:$,className:rt.container,style:ut},u.createElement("div",(0,o.Cl)({},z(i,R,Xt),{className:j(rt.root,q&&q.targetEdge&&$t[q.targetEdge]),style:q?(0,o.Cl)({},nt):Yt,tabIndex:-1,ref:W}),et&&u.createElement("div",{className:rt.beak,style:Jt(q)}),et&&u.createElement("div",{className:rt.beakCurtain}),u.createElement(Ht,(0,o.Cl)({role:i.role,"aria-roledescription":i["aria-roledescription"],ariaDescribedBy:l,ariaLabel:a,ariaLabelledBy:s,className:rt.calloutMain,onDismiss:i.onDismiss,onMouseDown:J,onMouseUp:Q,onRestoreFocus:i.onRestoreFocus,onScroll:S,shouldRestoreFocus:D,style:ot},T,{ref:P}),f)))})),(function(t,n){return!(n.shouldUpdateWhenHidden||!t.hidden||!n.hidden)||function(t,n){if(!t||!n)return!t&&!n;for(var i in t)if(t.hasOwnProperty(i)&&(!n.hasOwnProperty(i)||n[i]!==t[i]))return!1;for(var i in n)if(n.hasOwnProperty(i)&&!t.hasOwnProperty(i))return!1;return!0}(t,n)}));function Jt(t){var n,i,e=(0,o.Cl)((0,o.Cl)({},null===(n=null==t?void 0:t.beakPosition)||void 0===n?void 0:n.elementPosition),{display:(null===(i=null==t?void 0:t.beakPosition)||void 0===i?void 0:i.hideBeak)?"none":void 0});return e.top||e.bottom||e.left||e.right||(e.left=0,e.top=0),e}function Qt(t,n){for(var i in n)if(n.hasOwnProperty(i)){var e=t[i],r=n[i];if(void 0===e||void 0===r)return!1;if(e.toFixed(2)!==r.toFixed(2))return!1}return!0}function tn(t){return{height:t,width:t}}Kt.displayName="CalloutContentBase";var nn={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},en=(0,r.I)(Kt,(function(t){var n,i=t.theme,e=t.className,r=t.overflowYHidden,o=t.calloutWidth,u=t.beakWidth,a=t.backgroundColor,l=t.calloutMaxWidth,s=t.calloutMinWidth,c=t.doNotLayer,d=(0,It.Km)(nn,i),f=i.semanticColors,v=i.effects;return{container:[d.container,{position:"relative"}],root:[d.root,i.fonts.medium,{position:"absolute",display:"flex",zIndex:c?It.nA.Layer:void 0,boxSizing:"border-box",borderRadius:v.roundedCorner2,boxShadow:v.elevation16,selectors:(n={},n[It.up]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},n)},(0,It.QN)(),e,!!o&&{width:o},!!l&&{maxWidth:l},!!s&&{minWidth:s}],beak:[d.beak,{position:"absolute",backgroundColor:f.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},tn(u),a&&{backgroundColor:a}],beakCurtain:[d.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:f.menuBackground,borderRadius:v.roundedCorner2}],calloutMain:[d.calloutMain,{backgroundColor:f.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",width:"100%",borderRadius:v.roundedCorner2},r&&{overflowY:"hidden"},a&&{backgroundColor:a}]}}),void 0,{scope:"CalloutContent"}),rn=u.createContext(void 0),on=function(){return function(){}};rn.Provider;var un=ReactDOM,an=i(753);new WeakMap,new WeakMap;var ln=u.createContext(void 0),sn=function(t){var n=t.providerRef,i=t.layerRoot,e=u.useState([])[0],r=u.useContext(ln),o=void 0!==r&&!i,a=u.useMemo((function(){return o?void 0:{providerRef:n,registeredProviders:e,registerProvider:function(t){e.push(t),null==r||r.registerProvider(t)},unregisterProvider:function(t){null==r||r.unregisterProvider(t);var n=e.indexOf(t);n>=0&&e.splice(n,1)}}}),[n,e,r,o]);return u.useEffect((function(){if(a)return a.registerProvider(a.providerRef),function(){return a.unregisterProvider(a.providerRef)}}),[a]),a?u.createElement(ln.Provider,{value:a},t.children):u.createElement(u.Fragment,null,t.children)},cn=i(540),dn=i(770);function fn(t,n){void 0===t&&(t={});var i=vn(n)?n:function(t){return function(n){return t?(0,o.Cl)((0,o.Cl)({},n),t):n}}(n);return i(t)}function vn(t){return"function"==typeof t}var hn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onCustomizationChange=function(){return n.forceUpdate()},n}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){cn.X.observe(this._onCustomizationChange)},n.prototype.componentWillUnmount=function(){cn.X.unobserve(this._onCustomizationChange)},n.prototype.render=function(){var t=this,n=this.props.contextTransform;return u.createElement(dn.z.Consumer,null,(function(i){var e=function(t,n){var i,e,r,u=(n||{}).customizations,a=void 0===u?{settings:{},scopedSettings:{}}:u;return{customizations:{settings:fn(a.settings,t.settings),scopedSettings:(i=a.scopedSettings,e=t.scopedSettings,void 0===i&&(i={}),(vn(e)?e:(void 0===(r=e)&&(r={}),function(t){var n=(0,o.Cl)({},t);for(var i in r)r.hasOwnProperty(i)&&(n[i]=(0,o.Cl)((0,o.Cl)({},t[i]),r[i]));return n}))(i)),inCustomizerContext:!0}}}(t.props,i);return n&&(e=n(e)),u.createElement(dn.z.Provider,{value:e},t.props.children)}))},n}(u.Component),pn=i(143),gn=(0,a.Z)(),yn=(0,an.J9)((function(t,n){return(0,pn.a)((0,o.Cl)((0,o.Cl)({},t),{rtl:n}))})),mn=u.forwardRef((function(t,n){var i=t.className,e=t.theme,r=t.applyTheme,a=t.applyThemeToBody,s=t.styles,c=gn(s,{theme:e,applyTheme:r,className:i}),d=u.useRef(null);return function(t,n,i){var e=n.bodyThemed;u.useEffect((function(){if(t){var n=(0,M.Y)(i.current);if(n)return n.body.classList.add(e),function(){n.body.classList.remove(e)}}}),[e,t,i])}(a,c,d),u.createElement(u.Fragment,null,function(t,n,i,e){var r=n.root,a=t.as,s=void 0===a?"div":a,c=t.dir,d=t.theme,f=z(t,R,["dir"]),v=function(t){var n=t.theme,i=t.dir,e=(0,l.jI)(n)?"rtl":"ltr",r=(0,l.jI)()?"rtl":"ltr",o=i||e;return{rootDir:o!==e||o!==r?o:i,needsTheme:o!==e}}(t),h=v.rootDir,p=v.needsTheme,g=u.createElement(sn,{providerRef:i},u.createElement(s,(0,o.Cl)({dir:h},f,{className:r,ref:Et(i,e)})));return p&&(g=u.createElement(hn,{settings:{theme:yn(d,"rtl"===c)}},g)),g}(t,c,d,n))}));mn.displayName="FabricBase";var bn,xn={fontFamily:"inherit"},wn={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},Mn=(0,r.I)(mn,(function(t){var n=t.applyTheme,i=t.className,e=t.preventBlanketFontInheritance,r=t.theme;return{root:[(0,It.Km)(wn,r).root,r.fonts.medium,{color:r.palette.neutralPrimary},!e&&{"& button":xn,"& input":xn,"& textarea":xn},n&&{color:r.semanticColors.bodyText,backgroundColor:r.semanticColors.bodyBackground},i],bodyThemed:[{backgroundColor:r.semanticColors.bodyBackground}]}}),void 0,{scope:"Fabric"}),Cn=i(517),kn="data-portal-element",An={},Sn={},Ln="fluent-default-layer-host",Dn="#".concat(Ln),Vn=i(921),Nn=(0,Vn.S)()?u.useLayoutEffect:u.useEffect;function On(t){console&&console.warn&&console.warn(t)}function Tn(t,n,i,e,r){if(!0===r)for(var o=0,u=i;o<u.length;o++){var a=u[o];a in n||On("".concat(t," property '").concat(a,"' is required when '").concat(e,"' is used.'"))}}function En(t,n,i){for(var e in i)if(n&&e in n){var r="".concat(t," property '").concat(e,"' was used but has been deprecated."),o=i[e];o&&(r+=" Use '".concat(o,"' instead.")),On(r)}}function Fn(t,n){return void 0!==t[n]&&null!==t[n]}function Bn(t){var n=u.useRef(void 0);return u.useEffect((function(){n.current=t})),n.current}bn={valueOnChange:{},valueDefaultValue:{},controlledToUncontrolled:{},uncontrolledToControlled:{}};var Pn=0;function _n(t){var n=t.name,i=t.props,e=t.other,r=void 0===e?[]:e,a=t.conditionallyRequired,l=t.deprecations,s=t.mutuallyExclusive,c=t.controlledUsage,d=u.useRef(!1),f=Wt((function(){return"useWarnings_".concat(Pn++)})),v=Bn(i);if(!d.current){d.current=!0;for(var h=0,p=r;h<p.length;h++)On(p[h]);if(a)for(var g=0,y=a;g<y.length;g++){var m=y[g];Tn(n,i,m.requiredProps,m.conditionalPropName,m.condition)}l&&En(n,i,l),s&&function(t,n,i){for(var e in i)if(n&&void 0!==n[e]){var r=i[e];r&&void 0!==n[r]&&On("".concat(t," property '").concat(e,"' is mutually exclusive with '").concat(i[e],"'. ")+"Use one or the other.")}}(n,i,s)}c&&function(t){var n=t.componentId,i=t.componentName,e=t.defaultValueProp,r=t.props,o=t.oldProps,u=t.onChangeProp,a=t.readOnlyProp,l=t.valueProp,s=o?Fn(o,l):void 0,c=Fn(r,l);if(c){var d=!!r[u],f=!(!a||!r[a]);d||f||bn.valueOnChange[n]||(bn.valueOnChange[n]=!0,On("Warning: You provided a '".concat(String(l),"' prop to a ").concat(String(i)," without an '").concat(String(u),"' handler. ")+"This will render a read-only field. If the field should be mutable use '".concat(String(e),"'. ")+"Otherwise, set '".concat(String(u),"'").concat(a?" or '".concat(String(a),"'"):"","."))),null==r[e]||bn.valueDefaultValue[n]||(bn.valueDefaultValue[n]=!0,On("Warning: You provided both '".concat(String(l),"' and '").concat(String(e),"' to a ").concat(i,". ")+"Form fields must be either controlled or uncontrolled (specify either the '".concat(String(l),"' prop, ")+"or the '".concat(String(e),"' prop, but not both). Decide between using a controlled or uncontrolled ")+"".concat(i," and remove one of these props. More info: https://fb.me/react-controlled-components")))}if(o&&c!==s){var v=s?"a controlled":"an uncontrolled",h=s?"uncontrolled":"controlled",p=s?bn.controlledToUncontrolled:bn.uncontrolledToControlled;p[n]||(p[n]=!0,On("Warning: A component is changing ".concat(v," ").concat(i," to be ").concat(h,". ")+"".concat(i,"s should not switch from controlled to uncontrolled (or vice versa). ")+"Decide between using controlled or uncontrolled for the lifetime of the component. More info: https://fb.me/react-controlled-components"))}}((0,o.Cl)((0,o.Cl)({},c),{componentId:f,props:i,componentName:n,oldProps:v}))}var Hn,In=(0,a.Z)(),Wn=u.forwardRef((function(t,n){var i,e=null!==(i=u.useContext(rn))&&void 0!==i?i:on,r=u.useRef(null),a=Et(r,n),l=u.useRef(void 0),s=u.useRef(null),c=u.useContext(ln),d=u.useState(!1),f=d[0],v=d[1],h=u.useCallback((function(t){var n,i=!!(null==(n=null==c?void 0:c.providerRef)?void 0:n.current)&&n.current.classList.contains(Cn.Y2);t&&i&&t.classList.add(Cn.Y2)}),[c]),p=t.children,g=t.className,y=t.eventBubblingEnabled,m=t.fabricProps,b=t.hostId,x=t.insertFirst,w=t.onLayerDidMount,C=void 0===w?function(){}:w,k=t.onLayerMounted,A=void 0===k?function(){}:k,S=t.onLayerWillUnmount,L=t.styles,D=t.theme,V=Et(s,null==m?void 0:m.ref,h),N=In(L,{theme:D,className:g,isNotHost:!b}),O=function(){null==S||S();var t=l.current;l.current=void 0,t&&t.parentNode&&t.parentNode.removeChild(t)},T=function(){var t,n,i,e,o=(0,M.Y)(r.current),u=(null===(n=null===(t=r.current)||void 0===t?void 0:t.getRootNode())||void 0===n?void 0:n.host)?null===(i=null==r?void 0:r.current)||void 0===i?void 0:i.getRootNode():void 0;if(o&&(o||u)){var a=function(t,n){var i,e;void 0===n&&(n=null);var r=null!=n?n:t;if(b){var o=function(t){var n=Sn[t];return n&&n[0]||void 0}(b);return o?null!==(i=o.rootRef.current)&&void 0!==i?i:null:null!==(e=r.getElementById(b))&&void 0!==e?e:null}var u=Dn,a=u?r.querySelector(u):null;return a||(a=function(t,n){void 0===n&&(n=null);var i=t.createElement("div");return i.setAttribute("id",Ln),i.style.cssText="position:fixed;z-index:1000000",n?n.appendChild(i):null==t||t.body.appendChild(i),i}(t,n)),a}(o,u);if(a){a.__tabsterElementFlags||(a.__tabsterElementFlags={}),a.__tabsterElementFlags.noDirectAriaHidden=!0,O();var s=(null!==(e=a.ownerDocument)&&void 0!==e?e:o).createElement("div");s.className=N.root,s.setAttribute(kn,"true"),function(t,n){var i=t,e=n;i._virtual||(i._virtual={children:[]});var r=i._virtual.parent;if(r&&r!==n){var o=r._virtual.children.indexOf(i);o>-1&&r._virtual.children.splice(o,1)}i._virtual.parent=e||void 0,e&&(e._virtual||(e._virtual={children:[]}),e._virtual.children.push(i))}(s,r.current),x?a.insertBefore(s,a.firstChild):a.appendChild(s),l.current=s,v(!0)}}};return Nn((function(){T(),b&&function(t,n){An[t]||(An[t]=[]),An[t].push(n);var i=Sn[t];if(i)for(var e=0,r=i;e<r.length;e++)r[e].notifyLayersChanged()}(b,T);var t=l.current?e(l.current):void 0;return function(){t&&t(),O(),b&&function(t,n){var i=An[t];if(i){var e=i.indexOf(n);e>=0&&(i.splice(e,1),0===i.length&&delete An[t])}var r=Sn[t];if(r)for(var o=0,u=r;o<u.length;o++)u[o].notifyLayersChanged()}(b,T)}}),[b]),u.useEffect((function(){l.current&&f&&(null==A||A(),null==C||C(),v(!1))}),[f,A,C]),function(t){_n({name:"Layer",props:t,deprecations:{onLayerMounted:"onLayerDidMount"}})}(t),u.createElement("span",{className:"ms-layer",ref:a},l.current&&un.createPortal(u.createElement(sn,{layerRoot:!0,providerRef:V},u.createElement(Mn,(0,o.Cl)({},!y&&(Hn||(Hn={},["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","onTouchMove","onTouchStart","onTouchCancel","onTouchEnd","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit"].forEach((function(t){return Hn[t]=Rn}))),Hn),m,{className:j(N.content,null==m?void 0:m.className),ref:V}),p)),l.current))}));Wn.displayName="LayerBase";var Rn=function(t){t.eventPhase===Event.BUBBLING_PHASE&&"mouseenter"!==t.type&&"mouseleave"!==t.type&&"touchstart"!==t.type&&"touchend"!==t.type&&t.stopPropagation()},zn={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"},jn=(0,r.I)(Wn,(function(t){var n=t.className,i=t.isNotHost,e=t.theme,r=(0,It.Km)(zn,e);return{root:[r.root,e.fonts.medium,i&&[r.rootNoHost,{position:"fixed",zIndex:It.nA.Layer,top:0,left:0,bottom:0,right:0,visibility:"hidden"}],n],content:[r.content,{visibility:"visible"}]}}),void 0,{scope:"Layer",fields:["hostId","theme","styles"]}),$n=u.forwardRef((function(t,n){var i=t.layerProps,e=t.doNotLayer,r=(0,o.Tt)(t,["layerProps","doNotLayer"]),a=u.createElement(en,(0,o.Cl)({},r,{doNotLayer:e,ref:n}));return e?a:u.createElement(jn,(0,o.Cl)({},i),a)}));$n.displayName="Callout";var Yn=i(61);function Xn(t){return t}var Gn=1e-6;function Un(t){return"translate("+t+",0)"}function qn(t){return"translate(0,"+t+")"}function Zn(t){return n=>+t(n)}function Kn(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),i=>+t(i)+n}function Jn(){return!this.__axis}function Qn(t,n){var i=[],e=null,r=null,o=6,u=6,a=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",d=1===t||3===t?Un:qn;function f(f){var v=null==e?n.ticks?n.ticks.apply(n,i):n.domain():e,h=null==r?n.tickFormat?n.tickFormat.apply(n,i):Xn:r,p=Math.max(o,0)+a,g=n.range(),y=+g[0]+l,m=+g[g.length-1]+l,b=(n.bandwidth?Kn:Zn)(n.copy(),l),x=f.selection?f.selection():f,w=x.selectAll(".domain").data([null]),M=x.selectAll(".tick").data(v,n).order(),C=M.exit(),k=M.enter().append("g").attr("class","tick"),A=M.select("line"),S=M.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(k),A=A.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),S=S.merge(k.append("text").attr("fill","currentColor").attr(c,s*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==x&&(w=w.transition(f),M=M.transition(f),A=A.transition(f),S=S.transition(f),C=C.transition(f).attr("opacity",Gn).attr("transform",(function(t){return isFinite(t=b(t))?d(t+l):this.getAttribute("transform")})),k.attr("opacity",Gn).attr("transform",(function(t){var n=this.parentNode.__axis;return d((n&&isFinite(n=n(t))?n:b(t))+l)}))),C.remove(),w.attr("d",4===t||2===t?u?"M"+s*u+","+y+"H"+l+"V"+m+"H"+s*u:"M"+l+","+y+"V"+m:u?"M"+y+","+s*u+"V"+l+"H"+m+"V"+s*u:"M"+y+","+l+"H"+m),M.attr("opacity",1).attr("transform",(function(t){return d(b(t)+l)})),A.attr(c+"2",s*o),S.attr(c,s*p).text(h),x.filter(Jn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=b}))}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return i=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),f):i.slice()},f.tickValues=function(t){return arguments.length?(e=null==t?null:Array.from(t),f):e&&e.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(o=u=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(u=+t,f):u},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function ti(t){return Qn(2,t)}function ni(t){return Qn(3,t)}function ii(t){return Qn(4,t)}const ei=Math.sqrt(50),ri=Math.sqrt(10),oi=Math.sqrt(2);function ui(t,n,i){const e=(n-t)/Math.max(0,i),r=Math.floor(Math.log10(e)),o=e/Math.pow(10,r),u=o>=ei?10:o>=ri?5:o>=oi?2:1;let a,l,s;return r<0?(s=Math.pow(10,-r)/u,a=Math.round(t*s),l=Math.round(n*s),a/s<t&&++a,l/s>n&&--l,s=-s):(s=Math.pow(10,r)*u,a=Math.round(t/s),l=Math.round(n/s),a*s<t&&++a,l*s>n&&--l),l<a&&.5<=i&&i<2?ui(t,n,2*i):[a,l,s]}function ai(t,n,i){if(!((i=+i)>0))return[];if((t=+t)===(n=+n))return[t];const e=n<t,[r,o,u]=e?ui(n,t,i):ui(t,n,i);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(e)if(u<0)for(let t=0;t<a;++t)l[t]=(o-t)/-u;else for(let t=0;t<a;++t)l[t]=(o-t)*u;else if(u<0)for(let t=0;t<a;++t)l[t]=(r+t)/-u;else for(let t=0;t<a;++t)l[t]=(r+t)*u;return l}function li(t,n,i){return ui(t=+t,n=+n,i=+i)[2]}function si(t,n,i){i=+i;const e=(n=+n)<(t=+t),r=e?li(n,t,i):li(t,n,i);return(e?-1:1)*(r<0?1/-r:r)}function ci(t,n,i){let e;for(;;){const r=li(t,n,i);if(r===e||0===r||!isFinite(r))return[t,n];r>0?(t=Math.floor(t/r)*r,n=Math.ceil(n/r)*r):r<0&&(t=Math.ceil(t*r)/r,n=Math.floor(n*r)/r),e=r}}function di(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}function fi(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function vi(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function hi(t,n){let i=0,e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++i,e+=n);else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(o=+o)>=o&&(++i,e+=o)}if(i)return e/i}function pi(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function gi(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}function yi(t,n,i=0,e=1/0,r){if(n=Math.floor(n),i=Math.floor(Math.max(0,i)),e=Math.floor(Math.min(t.length-1,e)),!(i<=n&&n<=e))return t;for(r=void 0===r?gi:function(t=pi){if(t===pi)return gi;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,i)=>{const e=t(n,i);return e||0===e?e:(0===t(i,i))-(0===t(n,n))}}(r);e>i;){if(e-i>600){const o=e-i+1,u=n-i+1,a=Math.log(o),l=.5*Math.exp(2*a/3),s=.5*Math.sqrt(a*l*(o-l)/o)*(u-o/2<0?-1:1);yi(t,n,Math.max(i,Math.floor(n-u*l/o+s)),Math.min(e,Math.floor(n+(o-u)*l/o+s)),r)}const o=t[n];let u=i,a=e;for(mi(t,i,n),r(t[e],o)>0&&mi(t,i,e);u<a;){for(mi(t,u,a),++u,--a;r(t[u],o)<0;)++u;for(;r(t[a],o)>0;)--a}0===r(t[i],o)?mi(t,i,a):(++a,mi(t,a,e)),a<=n&&(i=a+1),n<=a&&(e=a-1)}return t}function mi(t,n,i){const e=t[n];t[n]=t[i],t[i]=e}function bi(t,n){return function(t,n,i){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let i=-1;for(let e of t)null!=(e=n(e,++i,t))&&(e=+e)>=e&&(yield e)}}(t,i)),(e=t.length)&&!isNaN(n=+n)){if(n<=0||e<2)return di(t);if(n>=1)return fi(t);var e,r=(e-1)*n,o=Math.floor(r),u=fi(yi(t,o).subarray(0,o+1));return u+(di(t.subarray(o+1))-u)*(r-o)}}(t,.5,n)}function xi(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function wi(t){let n,i,e;function r(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<0?r=n+1:o=n}while(r<o)}return r}return 2!==t.length?(n=pi,i=(n,i)=>pi(t(n),i),e=(n,i)=>t(n)-i):(n=t===pi||t===xi?t:Mi,i=t,e=t),{left:r,center:function(t,n,i=0,o=t.length){const u=r(t,n,i,o-1);return u>i&&e(t[u-1],n)>-e(t[u],n)?u-1:u},right:function(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<=0?r=n+1:o=n}while(r<o)}return r}}}function Mi(){return 0}const Ci=1e3,ki=6e4,Ai=36e5,Si=864e5,Li=6048e5,Di=31536e6,Vi=new Date,Ni=new Date;function Oi(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=n=>(t(n=new Date(+n)),n),r.ceil=i=>(t(i=new Date(i-1)),n(i,1),t(i),i),r.round=t=>{const n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=(t,i)=>(n(t=new Date(+t),null==i?1:Math.floor(i)),t),r.range=(i,e,o)=>{const u=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return u;let a;do{u.push(a=new Date(+i)),n(i,o),t(i)}while(a<i&&i<e);return u},r.filter=i=>Oi((n=>{if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),((t,e)=>{if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););})),i&&(r.count=(n,e)=>(Vi.setTime(+n),Ni.setTime(+e),t(Vi),t(Ni),Math.floor(i(Vi,Ni))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?n=>e(n)%t===0:n=>r.count(0,n)%t===0):r:null)),r}const Ti=Oi((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));Ti.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Oi((n=>{n.setTime(Math.floor(n/t)*t)}),((n,i)=>{n.setTime(+n+i*t)}),((n,i)=>(i-n)/t)):Ti:null),Ti.range;const Ei=Oi((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*Ci)}),((t,n)=>(n-t)/Ci),(t=>t.getUTCSeconds())),Fi=(Ei.range,Oi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ci)}),((t,n)=>{t.setTime(+t+n*ki)}),((t,n)=>(n-t)/ki),(t=>t.getMinutes()))),Bi=(Fi.range,Oi((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*ki)}),((t,n)=>(n-t)/ki),(t=>t.getUTCMinutes()))),Pi=(Bi.range,Oi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ci-t.getMinutes()*ki)}),((t,n)=>{t.setTime(+t+n*Ai)}),((t,n)=>(n-t)/Ai),(t=>t.getHours()))),_i=(Pi.range,Oi((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*Ai)}),((t,n)=>(n-t)/Ai),(t=>t.getUTCHours()))),Hi=(_i.range,Oi((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ki)/Si),(t=>t.getDate()-1))),Ii=(Hi.range,Oi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/Si),(t=>t.getUTCDate()-1))),Wi=(Ii.range,Oi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/Si),(t=>Math.floor(t/Si))));function Ri(t){return Oi((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ki)/Li))}Wi.range;const zi=Ri(0),ji=Ri(1),$i=Ri(2),Yi=Ri(3),Xi=Ri(4),Gi=Ri(5),Ui=Ri(6);function qi(t){return Oi((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/Li))}zi.range,ji.range,$i.range,Yi.range,Xi.range,Gi.range,Ui.range;const Zi=qi(0),Ki=qi(1),Ji=qi(2),Qi=qi(3),te=qi(4),ne=qi(5),ie=qi(6),ee=(Zi.range,Ki.range,Ji.range,Qi.range,te.range,ne.range,ie.range,Oi((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),re=(ee.range,Oi((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),oe=(re.range,Oi((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));oe.every=t=>isFinite(t=Math.floor(t))&&t>0?Oi((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,i)=>{n.setFullYear(n.getFullYear()+i*t)})):null,oe.range;const ue=Oi((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function ae(t,n,i,e,r,o){const u=[[Ei,1,Ci],[Ei,5,5e3],[Ei,15,15e3],[Ei,30,3e4],[o,1,ki],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,Ai],[r,3,108e5],[r,6,216e5],[r,12,432e5],[e,1,Si],[e,2,1728e5],[i,1,Li],[n,1,2592e6],[n,3,7776e6],[t,1,Di]];function a(n,i,e){const r=Math.abs(i-n)/e,o=wi((([,,t])=>t)).right(u,r);if(o===u.length)return t.every(si(n/Di,i/Di,e));if(0===o)return Ti.every(Math.max(si(n,i,e),1));const[a,l]=u[r/u[o-1][2]<u[o][2]/r?o-1:o];return a.every(l)}return[function(t,n,i){const e=n<t;e&&([t,n]=[n,t]);const r=i&&"function"==typeof i.range?i:a(t,n,i),o=r?r.range(t,+n+1):[];return e?o.reverse():o},a]}ue.every=t=>isFinite(t=Math.floor(t))&&t>0?Oi((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,i)=>{n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null,ue.range;const[le,se]=ae(ue,re,Zi,Wi,_i,Bi),[ce,de]=ae(oe,ee,zi,Hi,Pi,Fi);var fe=new Date,ve=new Date;function he(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=function(n){return t(n=new Date(+n)),n},r.ceil=function(i){return t(i=new Date(i-1)),n(i,1),t(i),i},r.round=function(t){var n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=function(t,i){return n(t=new Date(+t),null==i?1:Math.floor(i)),t},r.range=function(i,e,o){var u,a=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return a;do{a.push(u=new Date(+i)),n(i,o),t(i)}while(u<i&&i<e);return a},r.filter=function(i){return he((function(n){if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),(function(t,e){if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););}))},i&&(r.count=function(n,e){return fe.setTime(+n),ve.setTime(+e),t(fe),t(ve),Math.floor(i(fe,ve))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?function(n){return e(n)%t===0}:function(n){return r.count(0,n)%t===0}):r:null}),r}const pe=864e5,ge=6048e5;function ye(t){return he((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/ge}))}var me=ye(0),be=ye(1),xe=ye(2),we=ye(3),Me=ye(4),Ce=ye(5),ke=ye(6),Ae=(me.range,be.range,xe.range,we.range,Me.range,Ce.range,ke.range,he((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/pe}),(function(t){return t.getUTCDate()-1}))),Se=Ae;function Le(t){return he((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/ge}))}Ae.range;var De=Le(0),Ve=Le(1),Ne=Le(2),Oe=Le(3),Te=Le(4),Ee=Le(5),Fe=Le(6),Be=(De.range,Ve.range,Ne.range,Oe.range,Te.range,Ee.range,Fe.range,he((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/pe),(t=>t.getDate()-1))),Pe=Be,_e=(Be.range,he((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));_e.every=function(t){return isFinite(t=Math.floor(t))&&t>0?he((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,i){n.setFullYear(n.getFullYear()+i*t)})):null};var He=_e,Ie=(_e.range,he((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Ie.every=function(t){return isFinite(t=Math.floor(t))&&t>0?he((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,i){n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null};var We=Ie;function Re(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ze(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function je(t,n,i){return{y:t,m:n,d:i,H:0,M:0,S:0,L:0}}function $e(t){var n=t.dateTime,i=t.date,e=t.time,r=t.periods,o=t.days,u=t.shortDays,a=t.months,l=t.shortMonths,s=tr(r),c=nr(r),d=tr(o),f=nr(o),v=tr(u),h=nr(u),p=tr(a),g=nr(a),y=tr(l),m=nr(l),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Mr,e:Mr,f:Lr,g:Hr,G:Wr,H:Cr,I:kr,j:Ar,L:Sr,m:Dr,M:Vr,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:so,s:co,S:Nr,u:Or,U:Tr,V:Fr,w:Br,W:Pr,x:null,X:null,y:_r,Y:Ir,Z:Rr,"%":lo},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:zr,e:zr,f:Gr,g:ro,G:uo,H:jr,I:$r,j:Yr,L:Xr,m:Ur,M:qr,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:so,s:co,S:Zr,u:Kr,U:Jr,V:to,w:no,W:io,x:null,X:null,y:eo,Y:oo,Z:ao,"%":lo},w={a:function(t,n,i){var e=v.exec(n.slice(i));return e?(t.w=h.get(e[0].toLowerCase()),i+e[0].length):-1},A:function(t,n,i){var e=d.exec(n.slice(i));return e?(t.w=f.get(e[0].toLowerCase()),i+e[0].length):-1},b:function(t,n,i){var e=y.exec(n.slice(i));return e?(t.m=m.get(e[0].toLowerCase()),i+e[0].length):-1},B:function(t,n,i){var e=p.exec(n.slice(i));return e?(t.m=g.get(e[0].toLowerCase()),i+e[0].length):-1},c:function(t,i,e){return k(t,n,i,e)},d:fr,e:fr,f:mr,g:lr,G:ar,H:hr,I:hr,j:vr,L:yr,m:dr,M:pr,p:function(t,n,i){var e=s.exec(n.slice(i));return e?(t.p=c.get(e[0].toLowerCase()),i+e[0].length):-1},q:cr,Q:xr,s:wr,S:gr,u:er,U:rr,V:or,w:ir,W:ur,x:function(t,n,e){return k(t,i,n,e)},X:function(t,n,i){return k(t,e,n,i)},y:lr,Y:ar,Z:sr,"%":br};function M(t,n){return function(i){var e,r,o,u=[],a=-1,l=0,s=t.length;for(i instanceof Date||(i=new Date(+i));++a<s;)37===t.charCodeAt(a)&&(u.push(t.slice(l,a)),null!=(r=Ue[e=t.charAt(++a)])?e=t.charAt(++a):r="e"===e?" ":"0",(o=n[e])&&(e=o(i,r)),u.push(e),l=a+1);return u.push(t.slice(l,a)),u.join("")}}function C(t,n){return function(i){var e,r,o=je(1900,void 0,1);if(k(o,t,i+="",0)!=i.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(n&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(e=ze(je(o.y,0,1))).getUTCDay(),e=r>4||0===r?be.ceil(e):be(e),e=Se.offset(e,7*(o.V-1)),o.y=e.getUTCFullYear(),o.m=e.getUTCMonth(),o.d=e.getUTCDate()+(o.w+6)%7):(r=(e=Re(je(o.y,0,1))).getDay(),e=r>4||0===r?Ve.ceil(e):Ve(e),e=Pe.offset(e,7*(o.V-1)),o.y=e.getFullYear(),o.m=e.getMonth(),o.d=e.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?ze(je(o.y,0,1)).getUTCDay():Re(je(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ze(o)):Re(o)}}function k(t,n,i,e){for(var r,o,u=0,a=n.length,l=i.length;u<a;){if(e>=l)return-1;if(37===(r=n.charCodeAt(u++))){if(r=n.charAt(u++),!(o=w[r in Ue?n.charAt(u++):r])||(e=o(t,i,e))<0)return-1}else if(r!=i.charCodeAt(e++))return-1}return e}return b.x=M(i,b),b.X=M(e,b),b.c=M(n,b),x.x=M(i,x),x.X=M(e,x),x.c=M(n,x),{format:function(t){var n=M(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=C(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=M(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=C(t+="",!0);return n.toString=function(){return t},n}}}Ie.range;var Ye,Xe,Ge,Ue={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,Ze=/^%/,Ke=/[\\^$*+?|[\]().{}]/g;function Je(t,n,i){var e=t<0?"-":"",r=(e?-t:t)+"",o=r.length;return e+(o<i?new Array(i-o+1).join(n)+r:r)}function Qe(t){return t.replace(Ke,"\\$&")}function tr(t){return new RegExp("^(?:"+t.map(Qe).join("|")+")","i")}function nr(t){return new Map(t.map(((t,n)=>[t.toLowerCase(),n])))}function ir(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.w=+e[0],i+e[0].length):-1}function er(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.u=+e[0],i+e[0].length):-1}function rr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.U=+e[0],i+e[0].length):-1}function or(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.V=+e[0],i+e[0].length):-1}function ur(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.W=+e[0],i+e[0].length):-1}function ar(t,n,i){var e=qe.exec(n.slice(i,i+4));return e?(t.y=+e[0],i+e[0].length):-1}function lr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.y=+e[0]+(+e[0]>68?1900:2e3),i+e[0].length):-1}function sr(t,n,i){var e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(i,i+6));return e?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),i+e[0].length):-1}function cr(t,n,i){var e=qe.exec(n.slice(i,i+1));return e?(t.q=3*e[0]-3,i+e[0].length):-1}function dr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.m=e[0]-1,i+e[0].length):-1}function fr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.d=+e[0],i+e[0].length):-1}function vr(t,n,i){var e=qe.exec(n.slice(i,i+3));return e?(t.m=0,t.d=+e[0],i+e[0].length):-1}function hr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.H=+e[0],i+e[0].length):-1}function pr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.M=+e[0],i+e[0].length):-1}function gr(t,n,i){var e=qe.exec(n.slice(i,i+2));return e?(t.S=+e[0],i+e[0].length):-1}function yr(t,n,i){var e=qe.exec(n.slice(i,i+3));return e?(t.L=+e[0],i+e[0].length):-1}function mr(t,n,i){var e=qe.exec(n.slice(i,i+6));return e?(t.L=Math.floor(e[0]/1e3),i+e[0].length):-1}function br(t,n,i){var e=Ze.exec(n.slice(i,i+1));return e?i+e[0].length:-1}function xr(t,n,i){var e=qe.exec(n.slice(i));return e?(t.Q=+e[0],i+e[0].length):-1}function wr(t,n,i){var e=qe.exec(n.slice(i));return e?(t.s=+e[0],i+e[0].length):-1}function Mr(t,n){return Je(t.getDate(),n,2)}function Cr(t,n){return Je(t.getHours(),n,2)}function kr(t,n){return Je(t.getHours()%12||12,n,2)}function Ar(t,n){return Je(1+Pe.count(He(t),t),n,3)}function Sr(t,n){return Je(t.getMilliseconds(),n,3)}function Lr(t,n){return Sr(t,n)+"000"}function Dr(t,n){return Je(t.getMonth()+1,n,2)}function Vr(t,n){return Je(t.getMinutes(),n,2)}function Nr(t,n){return Je(t.getSeconds(),n,2)}function Or(t){var n=t.getDay();return 0===n?7:n}function Tr(t,n){return Je(De.count(He(t)-1,t),n,2)}function Er(t){var n=t.getDay();return n>=4||0===n?Te(t):Te.ceil(t)}function Fr(t,n){return t=Er(t),Je(Te.count(He(t),t)+(4===He(t).getDay()),n,2)}function Br(t){return t.getDay()}function Pr(t,n){return Je(Ve.count(He(t)-1,t),n,2)}function _r(t,n){return Je(t.getFullYear()%100,n,2)}function Hr(t,n){return Je((t=Er(t)).getFullYear()%100,n,2)}function Ir(t,n){return Je(t.getFullYear()%1e4,n,4)}function Wr(t,n){var i=t.getDay();return Je((t=i>=4||0===i?Te(t):Te.ceil(t)).getFullYear()%1e4,n,4)}function Rr(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Je(n/60|0,"0",2)+Je(n%60,"0",2)}function zr(t,n){return Je(t.getUTCDate(),n,2)}function jr(t,n){return Je(t.getUTCHours(),n,2)}function $r(t,n){return Je(t.getUTCHours()%12||12,n,2)}function Yr(t,n){return Je(1+Se.count(We(t),t),n,3)}function Xr(t,n){return Je(t.getUTCMilliseconds(),n,3)}function Gr(t,n){return Xr(t,n)+"000"}function Ur(t,n){return Je(t.getUTCMonth()+1,n,2)}function qr(t,n){return Je(t.getUTCMinutes(),n,2)}function Zr(t,n){return Je(t.getUTCSeconds(),n,2)}function Kr(t){var n=t.getUTCDay();return 0===n?7:n}function Jr(t,n){return Je(me.count(We(t)-1,t),n,2)}function Qr(t){var n=t.getUTCDay();return n>=4||0===n?Me(t):Me.ceil(t)}function to(t,n){return t=Qr(t),Je(Me.count(We(t),t)+(4===We(t).getUTCDay()),n,2)}function no(t){return t.getUTCDay()}function io(t,n){return Je(be.count(We(t)-1,t),n,2)}function eo(t,n){return Je(t.getUTCFullYear()%100,n,2)}function ro(t,n){return Je((t=Qr(t)).getUTCFullYear()%100,n,2)}function oo(t,n){return Je(t.getUTCFullYear()%1e4,n,4)}function uo(t,n){var i=t.getUTCDay();return Je((t=i>=4||0===i?Me(t):Me.ceil(t)).getUTCFullYear()%1e4,n,4)}function ao(){return"+0000"}function lo(){return"%"}function so(t){return+t}function co(t){return Math.floor(+t/1e3)}Ye=$e({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"]}),Xe=Ye.format,Ye.parse,Ge=Ye.utcFormat,Ye.utcParse;const fo=wi(pi),vo=fo.right;fo.left,wi((function(t){return null===t?NaN:+t})).center;var ho=vo;function po(t,n,i){t.prototype=n.prototype=i,i.constructor=t}function go(t,n){var i=Object.create(t.prototype);for(var e in n)i[e]=n[e];return i}function yo(){}var mo=.7,bo=1/mo,xo="\\s*([+-]?\\d+)\\s*",wo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Co=/^#([0-9a-f]{3,8})$/,ko=new RegExp(`^rgb\\(${xo},${xo},${xo}\\)$`),Ao=new RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),So=new RegExp(`^rgba\\(${xo},${xo},${xo},${wo}\\)$`),Lo=new RegExp(`^rgba\\(${Mo},${Mo},${Mo},${wo}\\)$`),Do=new RegExp(`^hsl\\(${wo},${Mo},${Mo}\\)$`),Vo=new RegExp(`^hsla\\(${wo},${Mo},${Mo},${wo}\\)$`),No={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 Oo(){return this.rgb().formatHex()}function To(){return this.rgb().formatRgb()}function Eo(t){var n,i;return t=(t+"").trim().toLowerCase(),(n=Co.exec(t))?(i=n[1].length,n=parseInt(n[1],16),6===i?Fo(n):3===i?new _o(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===i?Bo(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===i?Bo(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=ko.exec(t))?new _o(n[1],n[2],n[3],1):(n=Ao.exec(t))?new _o(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=So.exec(t))?Bo(n[1],n[2],n[3],n[4]):(n=Lo.exec(t))?Bo(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Do.exec(t))?jo(n[1],n[2]/100,n[3]/100,1):(n=Vo.exec(t))?jo(n[1],n[2]/100,n[3]/100,n[4]):No.hasOwnProperty(t)?Fo(No[t]):"transparent"===t?new _o(NaN,NaN,NaN,0):null}function Fo(t){return new _o(t>>16&255,t>>8&255,255&t,1)}function Bo(t,n,i,e){return e<=0&&(t=n=i=NaN),new _o(t,n,i,e)}function Po(t,n,i,e){return 1===arguments.length?((r=t)instanceof yo||(r=Eo(r)),r?new _o((r=r.rgb()).r,r.g,r.b,r.opacity):new _o):new _o(t,n,i,null==e?1:e);var r}function _o(t,n,i,e){this.r=+t,this.g=+n,this.b=+i,this.opacity=+e}function Ho(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}`}function Io(){const t=Wo(this.opacity);return`${1===t?"rgb(":"rgba("}${Ro(this.r)}, ${Ro(this.g)}, ${Ro(this.b)}${1===t?")":`, ${t})`}`}function Wo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ro(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function zo(t){return((t=Ro(t))<16?"0":"")+t.toString(16)}function jo(t,n,i,e){return e<=0?t=n=i=NaN:i<=0||i>=1?t=n=NaN:n<=0&&(t=NaN),new Yo(t,n,i,e)}function $o(t){if(t instanceof Yo)return new Yo(t.h,t.s,t.l,t.opacity);if(t instanceof yo||(t=Eo(t)),!t)return new Yo;if(t instanceof Yo)return t;var n=(t=t.rgb()).r/255,i=t.g/255,e=t.b/255,r=Math.min(n,i,e),o=Math.max(n,i,e),u=NaN,a=o-r,l=(o+r)/2;return a?(u=n===o?(i-e)/a+6*(i<e):i===o?(e-n)/a+2:(n-i)/a+4,a/=l<.5?o+r:2-o-r,u*=60):a=l>0&&l<1?0:u,new Yo(u,a,l,t.opacity)}function Yo(t,n,i,e){this.h=+t,this.s=+n,this.l=+i,this.opacity=+e}function Xo(t){return(t=(t||0)%360)<0?t+360:t}function Go(t){return Math.max(0,Math.min(1,t||0))}function Uo(t,n,i){return 255*(t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n)}function qo(t,n,i,e,r){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*i+(1+3*t+3*o-3*u)*e+u*r)/6}po(yo,Eo,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Oo,formatHex:Oo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $o(this).formatHsl()},formatRgb:To,toString:To}),po(_o,Po,go(yo,{brighter(t){return t=null==t?bo:Math.pow(bo,t),new _o(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new _o(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _o(Ro(this.r),Ro(this.g),Ro(this.b),Wo(this.opacity))},displayable(){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:Ho,formatHex:Ho,formatHex8:function(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}${zo(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Io,toString:Io})),po(Yo,(function(t,n,i,e){return 1===arguments.length?$o(t):new Yo(t,n,i,null==e?1:e)}),go(yo,{brighter(t){return t=null==t?bo:Math.pow(bo,t),new Yo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new Yo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,e=i+(i<.5?i:1-i)*n,r=2*i-e;return new _o(Uo(t>=240?t-240:t+120,r,e),Uo(t,r,e),Uo(t<120?t+240:t-120,r,e),this.opacity)},clamp(){return new Yo(Xo(this.h),Go(this.s),Go(this.l),Wo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Wo(this.opacity);return`${1===t?"hsl(":"hsla("}${Xo(this.h)}, ${100*Go(this.s)}%, ${100*Go(this.l)}%${1===t?")":`, ${t})`}`}}));var Zo=t=>()=>t;function Ko(t,n){var i=n-t;return i?function(t,n){return function(i){return t+i*n}}(t,i):Zo(isNaN(t)?n:t)}var Jo=function t(n){var i=function(t){return 1===(t=+t)?Ko:function(n,i){return i-n?function(t,n,i){return t=Math.pow(t,i),n=Math.pow(n,i)-t,i=1/i,function(e){return Math.pow(t+e*n,i)}}(n,i,t):Zo(isNaN(n)?i:n)}}(n);function e(t,n){var e=i((t=Po(t)).r,(n=Po(n)).r),r=i(t.g,n.g),o=i(t.b,n.b),u=Ko(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=r(n),t.b=o(n),t.opacity=u(n),t+""}}return e.gamma=t,e}(1);function Qo(t){return function(n){var i,e,r=n.length,o=new Array(r),u=new Array(r),a=new Array(r);for(i=0;i<r;++i)e=Po(n[i]),o[i]=e.r||0,u[i]=e.g||0,a[i]=e.b||0;return o=t(o),u=t(u),a=t(a),e.opacity=1,function(t){return e.r=o(t),e.g=u(t),e.b=a(t),e+""}}}function tu(t,n){var i,e=n?n.length:0,r=t?Math.min(e,t.length):0,o=new Array(r),u=new Array(e);for(i=0;i<r;++i)o[i]=lu(t[i],n[i]);for(;i<e;++i)u[i]=n[i];return function(t){for(i=0;i<r;++i)u[i]=o[i](t);return u}}function nu(t,n){var i=new Date;return t=+t,n=+n,function(e){return i.setTime(t*(1-e)+n*e),i}}function iu(t,n){return t=+t,n=+n,function(i){return t*(1-i)+n*i}}function eu(t,n){var i,e={},r={};for(i in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)i in t?e[i]=lu(t[i],n[i]):r[i]=n[i];return function(t){for(i in e)r[i]=e[i](t);return r}}Qo((function(t){var n=t.length-1;return function(i){var e=i<=0?i=0:i>=1?(i=1,n-1):Math.floor(i*n),r=t[e],o=t[e+1],u=e>0?t[e-1]:2*r-o,a=e<n-1?t[e+2]:2*o-r;return qo((i-e/n)*n,u,r,o,a)}})),Qo((function(t){var n=t.length;return function(i){var e=Math.floor(((i%=1)<0?++i:i)*n),r=t[(e+n-1)%n],o=t[e%n],u=t[(e+1)%n],a=t[(e+2)%n];return qo((i-e/n)*n,r,o,u,a)}}));var ru=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ou=new RegExp(ru.source,"g");function uu(t,n){var i,e,r,o=ru.lastIndex=ou.lastIndex=0,u=-1,a=[],l=[];for(t+="",n+="";(i=ru.exec(t))&&(e=ou.exec(n));)(r=e.index)>o&&(r=n.slice(o,r),a[u]?a[u]+=r:a[++u]=r),(i=i[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,l.push({i:u,x:iu(i,e)})),o=ou.lastIndex;return o<n.length&&(r=n.slice(o),a[u]?a[u]+=r:a[++u]=r),a.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var i,e=0;e<n;++e)a[(i=l[e]).i]=i.x(t);return a.join("")})}function au(t,n){n||(n=[]);var i,e=t?Math.min(n.length,t.length):0,r=n.slice();return function(o){for(i=0;i<e;++i)r[i]=t[i]*(1-o)+n[i]*o;return r}}function lu(t,n){var i,e,r=typeof n;return null==n||"boolean"===r?Zo(n):("number"===r?iu:"string"===r?(i=Eo(n))?(n=i,Jo):uu:n instanceof Eo?Jo:n instanceof Date?nu:(e=n,!ArrayBuffer.isView(e)||e instanceof DataView?Array.isArray(n)?tu:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?eu:iu:au))(t,n)}function su(t,n){return t=+t,n=+n,function(i){return Math.round(t*(1-i)+n*i)}}function cu(t){return+t}var du=[0,1];function fu(t){return t}function vu(t,n){return(n-=t=+t)?function(i){return(i-t)/n}:(i=isNaN(n)?NaN:.5,function(){return i});var i}function hu(t,n,i){var e=t[0],r=t[1],o=n[0],u=n[1];return r<e?(e=vu(r,e),o=i(u,o)):(e=vu(e,r),o=i(o,u)),function(t){return o(e(t))}}function pu(t,n,i){var e=Math.min(t.length,n.length)-1,r=new Array(e),o=new Array(e),u=-1;for(t[e]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<e;)r[u]=vu(t[u],t[u+1]),o[u]=i(n[u],n[u+1]);return function(n){var i=ho(t,n,1,e)-1;return o[i](r[i](n))}}function gu(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function yu(){var t,n,i,e,r,o,u=du,a=du,l=lu,s=fu;function c(){var t,n,i,l=Math.min(u.length,a.length);return s!==fu&&(t=u[0],n=u[l-1],t>n&&(i=t,t=n,n=i),s=function(i){return Math.max(t,Math.min(n,i))}),e=l>2?pu:hu,r=o=null,d}function d(n){return null==n||isNaN(n=+n)?i:(r||(r=e(u.map(t),a,l)))(t(s(n)))}return d.invert=function(i){return s(n((o||(o=e(a,u.map(t),iu)))(i)))},d.domain=function(t){return arguments.length?(u=Array.from(t,cu),c()):u.slice()},d.range=function(t){return arguments.length?(a=Array.from(t),c()):a.slice()},d.rangeRound=function(t){return a=Array.from(t),l=su,c()},d.clamp=function(t){return arguments.length?(s=!!t||fu,c()):s!==fu},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(i=t,d):i},function(i,e){return t=i,n=e,c()}}function mu(){return yu()(fu,fu)}function bu(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function xu(t,n){var i,e=0,r=(t=t.slice()).length-1,o=t[e],u=t[r];return u<o&&(i=e,e=r,r=i,i=o,o=u,u=i),t[e]=n.floor(o),t[r]=n.ceil(u),t}function wu(t){return new Date(t)}function Mu(t){return t instanceof Date?+t:+new Date(+t)}function Cu(t,n,i,e,r,o,u,a,l,s){var c=mu(),d=c.invert,f=c.domain,v=s(".%L"),h=s(":%S"),p=s("%I:%M"),g=s("%I %p"),y=s("%a %d"),m=s("%b %d"),b=s("%B"),x=s("%Y");function w(t){return(l(t)<t?v:a(t)<t?h:u(t)<t?p:o(t)<t?g:e(t)<t?r(t)<t?y:m:i(t)<t?b:x)(t)}return c.invert=function(t){return new Date(d(t))},c.domain=function(t){return arguments.length?f(Array.from(t,Mu)):f().map(wu)},c.ticks=function(n){var i=f();return t(i[0],i[i.length-1],null==n?10:n)},c.tickFormat=function(t,n){return null==n?w:s(n)},c.nice=function(t){var i=f();return t&&"function"==typeof t.range||(t=n(i[0],i[i.length-1],null==t?10:t)),t?f(xu(i,t)):c},c.copy=function(){return gu(c,Cu(t,n,i,e,r,o,u,a,l,s))},c}function ku(){return bu.apply(Cu(ce,de,oe,ee,zi,Hi,Pi,Fi,Ei,Xe).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Au(){return bu.apply(Cu(le,se,ue,re,Zi,Ii,_i,Bi,Ei,Ge).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Su(t,n,i){t=+t,n=+n,i=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+i;for(var e=-1,r=0|Math.max(0,Math.ceil((n-t)/i)),o=new Array(r);++e<r;)o[e]=t+e*i;return o}class Lu extends Map{constructor(t,n=Vu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Du(this,t))}has(t){return super.has(Du(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):(t.set(e,i),i)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)&&(i=t.get(i),t.delete(e)),i}(this,t))}}function Du({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):i}function Vu(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const Nu=Symbol("implicit");function Ou(){var t=new Lu,n=[],i=[],e=Nu;function r(r){let o=t.get(r);if(void 0===o){if(e!==Nu)return e;t.set(r,o=n.push(r)-1)}return i[o%i.length]}return r.domain=function(i){if(!arguments.length)return n.slice();n=[],t=new Lu;for(const e of i)t.has(e)||t.set(e,n.push(e)-1);return r},r.range=function(t){return arguments.length?(i=Array.from(t),r):i.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return Ou(n,i).unknown(e)},bu.apply(r,arguments),r}function Tu(){var t,n,i=Ou().unknown(void 0),e=i.domain,r=i.range,o=0,u=1,a=!1,l=0,s=0,c=.5;function d(){var i=e().length,d=u<o,f=d?u:o,v=d?o:u;t=(v-f)/Math.max(1,i-l+2*s),a&&(t=Math.floor(t)),f+=(v-f-t*(i-l))*c,n=t*(1-l),a&&(f=Math.round(f),n=Math.round(n));var h=Su(i).map((function(n){return f+t*n}));return r(d?h.reverse():h)}return delete i.unknown,i.domain=function(t){return arguments.length?(e(t),d()):e()},i.range=function(t){return arguments.length?([o,u]=t,o=+o,u=+u,d()):[o,u]},i.rangeRound=function(t){return[o,u]=t,o=+o,u=+u,a=!0,d()},i.bandwidth=function(){return n},i.step=function(){return t},i.round=function(t){return arguments.length?(a=!!t,d()):a},i.padding=function(t){return arguments.length?(l=Math.min(1,s=+t),d()):l},i.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),d()):l},i.paddingOuter=function(t){return arguments.length?(s=+t,d()):s},i.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),d()):c},i.copy=function(){return Tu(e(),[o,u]).round(a).paddingInner(l).paddingOuter(s).align(c)},bu.apply(d(),arguments)}var Eu,Fu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bu(t){if(!(n=Fu.exec(t)))throw new Error("invalid format: "+t);var n;return new Pu({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Pu(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 _u(t,n){if((i=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var i,e=t.slice(0,i);return[e.length>1?e[0]+e.slice(2):e,+t.slice(i+1)]}function Hu(t){return(t=_u(Math.abs(t)))?t[1]:NaN}function Iu(t,n){var i=_u(t,n);if(!i)return t+"";var e=i[0],r=i[1];return r<0?"0."+new Array(-r).join("0")+e:e.length>r+1?e.slice(0,r+1)+"."+e.slice(r+1):e+new Array(r-e.length+2).join("0")}Bu.prototype=Pu.prototype,Pu.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 Wu={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Iu(100*t,n),r:Iu,s:function(t,n){var i=_u(t,n);if(!i)return t+"";var e=i[0],r=i[1],o=r-(Eu=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,u=e.length;return o===u?e:o>u?e+new Array(o-u+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+_u(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ru(t){return t}var zu,ju,$u,Yu=Array.prototype.map,Xu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gu(){var t=mu();return t.copy=function(){return gu(t,Gu())},bu.apply(t,arguments),function(t){var n=t.domain;return t.ticks=function(t){var i=n();return ai(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var e=n();return function(t,n,i,e){var r,o=si(t,n,i);switch((e=Bu(null==e?",f":e)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=e.precision||isNaN(r=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Hu(n)/3)))-Hu(Math.abs(t)))}(o,u))||(e.precision=r),$u(e,u);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(r=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Hu(n)-Hu(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(e.precision=r-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(r=function(t){return Math.max(0,-Hu(Math.abs(t)))}(o))||(e.precision=r-2*("%"===e.type))}return ju(e)}(e[0],e[e.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var e,r,o=n(),u=0,a=o.length-1,l=o[u],s=o[a],c=10;for(s<l&&(r=l,l=s,s=r,r=u,u=a,a=r);c-- >0;){if((r=li(l,s,i))===e)return o[u]=l,o[a]=s,n(o);if(r>0)l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r}e=r}return t},t}(t)}function Uu(t){return Math.log(t)}function qu(t){return Math.exp(t)}function Zu(t){return-Math.log(-t)}function Ku(t){return-Math.exp(-t)}function Ju(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Qu(t){return(n,i)=>-t(-n,i)}function ta(){const t=function(t){const n=t(Uu,qu),i=n.domain;let e,r,o=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),r=function(t){return 10===t?Ju:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),i()[0]<0?(e=Qu(e),r=Qu(r),t(Zu,Ku)):t(Uu,qu),n}return n.base=function(t){return arguments.length?(o=+t,u()):o},n.domain=function(t){return arguments.length?(i(t),u()):i()},n.ticks=t=>{const n=i();let u=n[0],a=n[n.length-1];const l=a<u;l&&([u,a]=[a,u]);let s,c,d=e(u),f=e(a);const v=null==t?10:+t;let h=[];if(!(o%1)&&f-d<v){if(d=Math.floor(d),f=Math.ceil(f),u>0){for(;d<=f;++d)for(s=1;s<o;++s)if(c=d<0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}}else for(;d<=f;++d)for(s=o-1;s>=1;--s)if(c=d>0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}2*h.length<v&&(h=ai(u,a,v))}else h=ai(d,f,Math.min(f-d,v)).map(r);return l?h.reverse():h},n.tickFormat=(t,i)=>{if(null==t&&(t=10),null==i&&(i=10===o?"s":","),"function"!=typeof i&&(o%1||null!=(i=Bu(i)).precision||(i.trim=!0),i=ju(i)),t===1/0)return i;const u=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/r(Math.round(e(t)));return n*o<o-.5&&(n*=o),n<=u?i(t):""}},n.nice=()=>i(xu(i(),{floor:t=>r(Math.floor(e(t))),ceil:t=>r(Math.ceil(e(t)))})),n}(yu()).domain([1,10]);return t.copy=()=>gu(t,ta()).base(t.base()),bu.apply(t,arguments),t}function na(){}function ia(t){return null==t?na:function(){return this.querySelector(t)}}function ea(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function ra(){return[]}function oa(t){return function(n){return n.matches(t)}}zu=function(t){var n,i,e=void 0===t.grouping||void 0===t.thousands?Ru:(n=Yu.call(t.grouping,Number),i=t.thousands+"",function(t,e){for(var r=t.length,o=[],u=0,a=n[0],l=0;r>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),o.push(t.substring(r-=a,r+a)),!((l+=a+1)>e));)a=n[u=(u+1)%n.length];return o.reverse().join(i)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Ru:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(Yu.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t){var n=(t=Bu(t)).fill,i=t.align,d=t.sign,f=t.symbol,v=t.zero,h=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type;"n"===m?(p=!0,m="g"):Wu[m]||(void 0===g&&(g=12),y=!0,m="g"),(v||"0"===n&&"="===i)&&(v=!0,n="0",i="=");var b="$"===f?r:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===f?o:/[%p]/.test(m)?l:"",w=Wu[m],M=/[defgprs%]/.test(m);function C(t){var r,o,l,f=b,C=x;if("c"===m)C=w(t)+C,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),y&&(t=function(t){t:for(var n,i=t.length,e=1,r=-1;e<i;++e)switch(t[e]){case".":r=n=e;break;case"0":0===r&&(r=e),n=e;break;default:if(!+t[e])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(n+1):t}(t)),k&&0===+t&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,C=("s"===m?Xu[8+Eu/3]:"")+C+(k&&"("===d?")":""),M)for(r=-1,o=t.length;++r<o;)if(48>(l=t.charCodeAt(r))||l>57){C=(46===l?u+t.slice(r+1):t.slice(r))+C,t=t.slice(0,r);break}}p&&!v&&(t=e(t,1/0));var A=f.length+t.length+C.length,S=A<h?new Array(h-A+1).join(n):"";switch(p&&v&&(t=e(S+t,S.length?h-C.length:1/0),S=""),i){case"<":t=f+t+C+S;break;case"=":t=f+S+t+C;break;case"^":t=S.slice(0,A=S.length>>1)+f+t+C+S.slice(A);break;default:t=S+f+t+C}return a(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return t+""},C}return{format:d,formatPrefix:function(t,n){var i=d(((t=Bu(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(Hu(n)/3))),r=Math.pow(10,-e),o=Xu[8+e/3];return function(t){return i(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),ju=zu.format,$u=zu.formatPrefix;var ua=Array.prototype.find;function aa(){return this.firstElementChild}var la=Array.prototype.filter;function sa(){return Array.from(this.children)}function ca(t){return new Array(t.length)}function da(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function fa(t,n,i,e,r,o){for(var u,a=0,l=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],e[a]=u):i[a]=new da(t,o[a]);for(;a<l;++a)(u=n[a])&&(r[a]=u)}function va(t,n,i,e,r,o,u){var a,l,s,c=new Map,d=n.length,f=o.length,v=new Array(d);for(a=0;a<d;++a)(l=n[a])&&(v[a]=s=u.call(l,l.__data__,a,n)+"",c.has(s)?r[a]=l:c.set(s,l));for(a=0;a<f;++a)s=u.call(t,o[a],a,o)+"",(l=c.get(s))?(e[a]=l,l.__data__=o[a],c.delete(s)):i[a]=new da(t,o[a]);for(a=0;a<d;++a)(l=n[a])&&c.get(v[a])===l&&(r[a]=l)}function ha(t){return t.__data__}function pa(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ga(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}da.prototype={constructor:da,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var ya="http://www.w3.org/1999/xhtml",ma={svg:"http://www.w3.org/2000/svg",xhtml:ya,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ba(t){var n=t+="",i=n.indexOf(":");return i>=0&&"xmlns"!==(n=t.slice(0,i))&&(t=t.slice(i+1)),ma.hasOwnProperty(n)?{space:ma[n],local:t}:t}function xa(t){return function(){this.removeAttribute(t)}}function wa(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ma(t,n){return function(){this.setAttribute(t,n)}}function Ca(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function ka(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function Aa(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function Sa(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function La(t){return function(){this.style.removeProperty(t)}}function Da(t,n,i){return function(){this.style.setProperty(t,n,i)}}function Va(t,n,i){return function(){var e=n.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function Na(t){return function(){delete this[t]}}function Oa(t,n){return function(){this[t]=n}}function Ta(t,n){return function(){var i=n.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function Ea(t){return t.trim().split(/^|\s+/)}function Fa(t){return t.classList||new Ba(t)}function Ba(t){this._node=t,this._names=Ea(t.getAttribute("class")||"")}function Pa(t,n){for(var i=Fa(t),e=-1,r=n.length;++e<r;)i.add(n[e])}function _a(t,n){for(var i=Fa(t),e=-1,r=n.length;++e<r;)i.remove(n[e])}function Ha(t){return function(){Pa(this,t)}}function Ia(t){return function(){_a(this,t)}}function Wa(t,n){return function(){(n.apply(this,arguments)?Pa:_a)(this,t)}}function Ra(){this.textContent=""}function za(t){return function(){this.textContent=t}}function ja(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function $a(){this.innerHTML=""}function Ya(t){return function(){this.innerHTML=t}}function Xa(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Ga(){this.nextSibling&&this.parentNode.appendChild(this)}function Ua(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qa(t){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===ya&&n.documentElement.namespaceURI===ya?n.createElement(t):n.createElementNS(i,t)}}function Za(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ka(t){var n=ba(t);return(n.local?Za:qa)(n)}function Ja(){return null}function Qa(){var t=this.parentNode;t&&t.removeChild(this)}function tl(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function nl(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function il(t){return function(){var n=this.__on;if(n){for(var i,e=0,r=-1,o=n.length;e<o;++e)i=n[e],t.type&&i.type!==t.type||i.name!==t.name?n[++r]=i:this.removeEventListener(i.type,i.listener,i.options);++r?n.length=r:delete this.__on}}}function el(t,n,i){return function(){var e,r=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(r)for(var u=0,a=r.length;u<a;++u)if((e=r[u]).type===t.type&&e.name===t.name)return this.removeEventListener(e.type,e.listener,e.options),this.addEventListener(e.type,e.listener=o,e.options=i),void(e.value=n);this.addEventListener(t.type,o,i),e={type:t.type,name:t.name,value:n,listener:o,options:i},r?r.push(e):this.__on=[e]}}function rl(t,n,i){var e=Sa(t),r=e.CustomEvent;"function"==typeof r?r=new r(n,i):(r=e.document.createEvent("Event"),i?(r.initEvent(n,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(n,!1,!1)),t.dispatchEvent(r)}function ol(t,n){return function(){return rl(this,t,n)}}function ul(t,n){return function(){return rl(this,t,n.apply(this,arguments))}}Ba.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var al=[null];function ll(t,n){this._groups=t,this._parents=n}function sl(t){return"string"==typeof t?new ll([[document.querySelector(t)]],[document.documentElement]):new ll([[t]],al)}function cl(t){return"string"==typeof t?new ll([document.querySelectorAll(t)],[document.documentElement]):new ll([ea(t)],al)}function dl(t){var n=/[1-9]([0]+$)|\.([0-9]*)/.exec(String(t));return n?n[1]?-n[1].length:n[2]?n[2].length:0:0}function fl(t,n,i){void 0===i&&(i=10);var e=Math.pow(i,n);return Math.round(t*e)/e}function vl(t){this._context=t}function hl(t){return new vl(t)}function pl(t){this._context=t}function gl(t){var n,i,e=t.length-1,r=new Array(e),o=new Array(e),u=new Array(e);for(r[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n<e-1;++n)r[n]=1,o[n]=4,u[n]=4*t[n]+2*t[n+1];for(r[e-1]=2,o[e-1]=7,u[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=r[n]/o[n-1],o[n]-=i,u[n]-=i*u[n-1];for(r[e-1]=u[e-1]/o[e-1],n=e-2;n>=0;--n)r[n]=(u[n]-r[n+1])/o[n];for(o[e-1]=(t[e]+r[e-1])/2,n=0;n<e-1;++n)o[n]=2*t[n+1]-r[n+1];return[r,o]}function yl(t){return new pl(t)}function ml(t,n){this._context=t,this._t=n}function bl(t){return new ml(t,.5)}function xl(t){return new ml(t,0)}function wl(t){return new ml(t,1)}function Ml(t){const n=(4-t.length%4)%4;return t+"=".repeat(n)}function Cl(t){if("undefined"!=typeof window&&"function"==typeof atob){const n=atob(t),i=n.length,e=new Uint8Array(i);for(let t=0;t<i;t++)e[t]=n.charCodeAt(t);return e}throw new Error("Base64 decoding is not supported in this environment.")}function kl(t,n){if(1===n.length)return t;if(2===n.length){const[i,e]=n,r=[];for(let n=0;n<i;n++)r.push(t.slice(n*e,(n+1)*e));return r}const[i,...e]=n,r=t.length/i,o=[];for(let n=0;n<i;n++)o.push(kl(t.slice(n*r,(n+1)*r),e));return o}function Al(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map((t=>Al(t)));if("bdata"in t&&"string"==typeof t.bdata&&function(t){if("string"!=typeof t)return!1;if(t.length%4!=0&&(t=Ml(t)),!/^[A-Za-z0-9+/]+={0,2}$/.test(t))return!1;try{return Cl(t),!0}catch{return!1}}(t.bdata)){const n=t.dtype||"utf-8",i=function(t,n){t=Ml(t);try{const i=Cl(t);switch(n){case"f8":return Array.from(new Float64Array(i.buffer));case"i8":case"i4":return Array.from(new Int32Array(i.buffer));case"u8":return Array.from(new Uint32Array(i.buffer));case"i2":return Array.from(new Int16Array(i.buffer));case"i1":return Array.from(new Int8Array(i.buffer));default:try{return i.toString()}catch(t){return i}}}catch(n){throw new Error(`Failed to decode base64 value: ${t}`)}}(t.bdata,n);let e=t.shape;if("string"==typeof e){let t;try{t=JSON.parse(e),Il(t)||(t=void 0)}catch{const n=e.split(",").map((t=>Number(t.trim())));n.every((t=>!isNaN(t)))&&(t=n)}e=t}return e&&Il(e)?kl(i,e):i}const n={};for(const i of Object.keys(t))n[i]=Al(t[i]);return n}function Sl(t){return t.data=Al(t.data),t}ll.prototype=function(){return new ll([[document.documentElement]],al)}.prototype={constructor:ll,select:function(t){"function"!=typeof t&&(t=ia(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u,a=n[r],l=a.length,s=e[r]=new Array(l),c=0;c<l;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),s[c]=u);return new ll(e,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return ea(t.apply(this,arguments))}}(t):function(t){return null==t?ra:function(){return this.querySelectorAll(t)}}(t);for(var n=this._groups,i=n.length,e=[],r=[],o=0;o<i;++o)for(var u,a=n[o],l=a.length,s=0;s<l;++s)(u=a[s])&&(e.push(t.call(u,u.__data__,s,a)),r.push(u));return new ll(e,r)},selectChild:function(t){return this.select(null==t?aa:function(t){return function(){return ua.call(this.children,t)}}("function"==typeof t?t:oa(t)))},selectChildren:function(t){return this.selectAll(null==t?sa:function(t){return function(){return la.call(this.children,t)}}("function"==typeof t?t:oa(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u=n[r],a=u.length,l=e[r]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&l.push(o);return new ll(e,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,ha);var i,e=n?va:fa,r=this._parents,o=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var u=o.length,a=new Array(u),l=new Array(u),s=new Array(u),c=0;c<u;++c){var d=r[c],f=o[c],v=f.length,h=pa(t.call(d,d&&d.__data__,c,r)),p=h.length,g=l[c]=new Array(p),y=a[c]=new Array(p);e(d,f,g,y,s[c]=new Array(v),h,n);for(var m,b,x=0,w=0;x<p;++x)if(m=g[x]){for(x>=w&&(w=x+1);!(b=y[w])&&++w<p;);m._next=b||null}}return(a=new ll(a,r))._enter=l,a._exit=s,a},enter:function(){return new ll(this._enter||this._groups.map(ca),this._parents)},exit:function(){return new ll(this._exit||this._groups.map(ca),this._parents)},join:function(t,n,i){var e=this.enter(),r=this,o=this.exit();return"function"==typeof t?(e=t(e))&&(e=e.selection()):e=e.append(t+""),null!=n&&(r=n(r))&&(r=r.selection()),null==i?o.remove():i(o),e&&r?e.merge(r).order():r},merge:function(t){for(var n=t.selection?t.selection():t,i=this._groups,e=n._groups,r=i.length,o=e.length,u=Math.min(r,o),a=new Array(r),l=0;l<u;++l)for(var s,c=i[l],d=e[l],f=c.length,v=a[l]=new Array(f),h=0;h<f;++h)(s=c[h]||d[h])&&(v[h]=s);for(;l<r;++l)a[l]=i[l];return new ll(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,i=t.length;++n<i;)for(var e,r=t[n],o=r.length-1,u=r[o];--o>=0;)(e=r[o])&&(u&&4^e.compareDocumentPosition(u)&&u.parentNode.insertBefore(e,u),u=e);return this},sort:function(t){function n(n,i){return n&&i?t(n.__data__,i.__data__):!n-!i}t||(t=ga);for(var i=this._groups,e=i.length,r=new Array(e),o=0;o<e;++o){for(var u,a=i[o],l=a.length,s=r[o]=new Array(l),c=0;c<l;++c)(u=a[c])&&(s[c]=u);s.sort(n)}return new ll(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e=t[n],r=0,o=e.length;r<o;++r){var u=e[r];if(u)return u}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,i=0,e=n.length;i<e;++i)for(var r,o=n[i],u=0,a=o.length;u<a;++u)(r=o[u])&&t.call(r,r.__data__,u,o);return this},attr:function(t,n){var i=ba(t);if(arguments.length<2){var e=this.node();return i.local?e.getAttributeNS(i.space,i.local):e.getAttribute(i)}return this.each((null==n?i.local?wa:xa:"function"==typeof n?i.local?Aa:ka:i.local?Ca:Ma)(i,n))},style:function(t,n,i){return arguments.length>1?this.each((null==n?La:"function"==typeof n?Va:Da)(t,n,null==i?"":i)):function(t,n){return t.style.getPropertyValue(n)||Sa(t).getComputedStyle(t,null).getPropertyValue(n)}(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Na:"function"==typeof n?Ta:Oa)(t,n)):this.node()[t]},classed:function(t,n){var i=Ea(t+"");if(arguments.length<2){for(var e=Fa(this.node()),r=-1,o=i.length;++r<o;)if(!e.contains(i[r]))return!1;return!0}return this.each(("function"==typeof n?Wa:n?Ha:Ia)(i,n))},text:function(t){return arguments.length?this.each(null==t?Ra:("function"==typeof t?ja:za)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?$a:("function"==typeof t?Xa:Ya)(t)):this.node().innerHTML},raise:function(){return this.each(Ga)},lower:function(){return this.each(Ua)},append:function(t){var n="function"==typeof t?t:Ka(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var i="function"==typeof t?t:Ka(t),e=null==n?Ja:"function"==typeof n?n:ia(n);return this.select((function(){return this.insertBefore(i.apply(this,arguments),e.apply(this,arguments)||null)}))},remove:function(){return this.each(Qa)},clone:function(t){return this.select(t?nl:tl)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,i){var e,r,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?el:il,e=0;e<u;++e)this.each(a(o[e],n,i));return this}var a=this.node().__on;if(a)for(var l,s=0,c=a.length;s<c;++s)for(e=0,l=a[s];e<u;++e)if((r=o[e]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?ul:ol)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e,r=t[n],o=0,u=r.length;o<u;++o)(e=r[o])&&(yield e)}},vl.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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}},pl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=gl(t),r=gl(n),o=0,u=1;u<i;++o,++u)this._context.bezierCurveTo(e[0][o],r[0][o],e[1][o],r[1][o],t[u],n[u]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};const Ll="Unsupported chart - type :",Dl=t=>!isNaN(parseFloat(t))&&isFinite(t),Vl=t=>{if(Dl(t))return!1;const n=new Date(Date.parse(t));if(isNaN(n.getTime()))return!1;const i=n.getFullYear();return!!(/\b\d{4}\b/.test(t)||2e3!==i&&2001!==i)},Nl=(t,n,...i)=>!!Il(t)&&0!==t.length&&(Array.isArray(t[0])?t.every((t=>t.every((t=>n(t,...i))))):t.every((t=>n(t,...i)))),Ol=t=>Nl(t,(t=>Vl(t)||null===t)),Tl=t=>Nl(t,(t=>"string"==typeof t&&Dl(t)||"number"==typeof t||null===t)),El=t=>Nl(t,(t=>(t=>{if("string"!=typeof t)return!1;const n=new Date(`${t} 1, 2000`);if(isNaN(n.getTime()))return!1;const i=[void 0,"en-US"];for(const e of i){const i=n.toLocaleString(e,{month:"long"}),r=n.toLocaleString(e,{month:"short"});if(t.toLowerCase()===i.toLowerCase()||t.toLowerCase()===r.toLowerCase())return!0}return!1})(t)||null===t)),Fl=t=>Nl(t,(t=>(t=>{if(Dl(t)){const n="string"==typeof t?parseFloat(t):Number(t);return Number.isInteger(n)&&n>=1900&&n<=2100}return!1})(t)||null===t)),Bl=t=>Nl(t,(t=>"string"==typeof t||null===t)),Pl=t=>Nl(t,(t=>"object"==typeof t&&null!==t&&!Il(t))),_l=t=>null==t||"number"==typeof t&&!isFinite(t),Hl=(t,n=0)=>{if(n>15)throw new Error("Maximum json depth exceeded");if("object"==typeof t&&null!==t)for(const i in t)t.hasOwnProperty(i)&&("string"==typeof t[i]?t[i]=t[i].replace(/</g,"<").replace(/>/g,">"):t[i]=Hl(t[i],n+1));return t};function Il(t){return Array.isArray(t)||function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)}const Wl=t=>!!t&&(!Il(t)||t.length>0),Rl=(t,n)=>{if(!(t=>!(Array.isArray(t.x)&&t.x.length>0&&Array.isArray(t.x[0])||Array.isArray(t.y)&&t.y.length>0&&Array.isArray(t.y[0])))(t))throw new Error("Invalid 2D series encountered.");if(n&&!Tl(t.y))throw new Error("Non numeric Y values encountered.")},zl=t=>["markers","text+markers","markers+text","text"].includes(t),jl=(t,n)=>{var i,e,r;const o=null!==(i=t.mode)&&void 0!==i?i:"",u=t&&t.x&&t.x.length>0?typeof(null===(e=null==t?void 0:t.x)||void 0===e?void 0:e[0]):"undefined",a=t&&t.y&&t.y.length>0?typeof(null===(r=null==t?void 0:t.y)||void 0===r?void 0:r[0]):"undefined";if(!Tl(t.x)&&!Bl(t.x)&&!Ol(t.x))throw new Error(`${Ll} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!Tl(t.y)&&!Bl(t.y))throw new Error(`${Ll} ${t.type}, mode: ${o}, yAxisType: ${a}`);const l=ql(t),s=Kl(t,n);if(l&&s)throw new Error(`${Ll} ${t.type}, Fallback to VerticalStackedBarChart is not allowed for Area Charts.`);if(l&&$l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported for AreaChart.`);if(s&&$l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported for VSBC fallback.`)},$l=(t,n)=>{const i=Gl(t);return Object.keys(i).some((t=>{var e;const r=Ul(t,i[t]);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)}))},Yl={indicator:[t=>{var n;if(!(null===(n=t.mode)||void 0===n?void 0:n.includes("gauge")))throw new Error(`${Ll} ${t.type}, mode: ${t.mode}`)}],histogram:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)},t=>Rl(t,!1)],bar:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)},t=>{(t=>{const n=t.x&&Il(t.x)&&0===t.x.length,i=t.y&&Il(t.y)&&0===t.y.length;if(n||i){let t="Bar chart: ";throw n&&i?t+="both x and y arrays are empty.":n?t+="x array is empty.":i&&(t+="y array is empty."),new Error(t)}if("h"===t.orientation){if(!Tl(t.x)&&!Ol(t.x))throw new Error(`${Ll} ${t.type}, orientation: ${t.orientation}, string x values not supported.`);if(!Xl(t)&&Ol(t.x))throw new Error(`${Ll} ${t.type}, orientation: ${t.orientation}, date x values not supported in HBWA.`);Rl(t,!1)}else if(!Tl(t.y)&&!Bl(t.y)&&!Pl(t.y))throw new Error("Non numeric, string, or object Y values encountered, type: "+typeof t.y)})(t)}],sankey:[t=>{if(function(t){var n,i,e,r;const o={};null===(i=null===(n=t.node)||void 0===n?void 0:n.label)||void 0===i||i.forEach(((t,n)=>o[n]=[])),null===(r=null===(e=t.link)||void 0===e?void 0:e.value)||void 0===r||r.forEach(((n,i)=>{var e,r,u,a;_l(n)||_l(null===(r=null===(e=t.link)||void 0===e?void 0:e.source)||void 0===r?void 0:r[i])||_l(null===(a=null===(u=t.link)||void 0===u?void 0:u.target)||void 0===a?void 0:a[i])||o[t.link.source[i]].push(t.link.target[i])}));const u=new Set,a=new Set;function l(t,n){if(_l(t)||!o[t])return!1;if(a.has(t))return!0;if(!u.has(t)){u.add(t),a.add(t);for(const i of o[t])if(l(i,[...n,i]))return!0;return a.delete(t),!1}}for(let t=0;t<Object.keys(o).length;t++)if(l(t,[t]))return!0;return!1}(t))throw new Error(`${Ll} ${t.type}, Cycles in Sankey chart not supported`)}],scatter:[(t,n)=>jl(t,n)],scattergl:[(t,n)=>jl(t,n)],scatterpolar:[t=>{if(!Tl(t.theta)&&!Bl(t.theta))throw new Error(`${Ll} ${t.type}, theta values must be array of numbers or strings`);if(!Tl(t.r))throw new Error(`${Ll} ${t.type}, Non numeric r values`)}],funnel:[t=>Rl(t,!1)],histogram2d:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)}],heatmap:[(t,n)=>{if($l(t,n))throw new Error(`${Ll} ${t.type}, log axis type not supported.`)}]},Xl=t=>Ol(t.base)||Tl(t.base)||Vl(t.base)||Dl(t.base),Gl=t=>{let n=1;"string"==typeof t.xaxis&&/^x\d+$/.test(t.xaxis)&&(n=parseInt(t.xaxis.slice(1),10));let i=1;return"string"==typeof t.yaxis&&/^y\d+$/.test(t.yaxis)&&(i=parseInt(t.yaxis.slice(1),10)),{x:n,y:i}},Ul=(t,n)=>`${t}axis${n>1?n:""}`,ql=t=>"tonexty"===t.fill||"tozeroy"===t.fill||!!t.stackgroup,Zl=(t,n)=>{var i;const e=Ol(t.x),r=Tl(t.x),o=Fl(t.x),u=El(t.x),a=Bl(t.y),l=Gl(t),s=Ul("x",l.x),c="category"===(null===(i=null==n?void 0:n[s])||void 0===i?void 0:i.type);return!(!(e||r||u)||o||a||c)},Kl=(t,n)=>{var i;return!zl(null!==(i=t.mode)&&void 0!==i?i:"")&&!Zl(t,n)},Jl=(t,n)=>{var i,e;if("none"===t.mode&&"toself"===t.fill){let n=!0;for(let i=0;i<t.x.length;i+=5)if(t.x[i]!==t.x[i+3]||t.x[i+1]!==t.x[i+2]||t.y[i]!==t.y[i+1]||t.y[i+2]!==t.y[i+3]||i>0&&null!==t.y[i-1]){n=!1;break}if(n)return!0}return!("markers"!==t.mode||1!==(null===(i=t.marker)||void 0===i?void 0:i.size)||0!==(null===(e=t.marker)||void 0===e?void 0:e.opacity)||""!==t.name||!1!==t.showlegend||!n)};var Ql,ts,ns,is,es={color1:"qualitative.1",color2:"qualitative.2",color3:"qualitative.3",color4:"qualitative.4",color5:"qualitative.5",color6:"qualitative.6",color7:"qualitative.7",color8:"qualitative.8",color9:"qualitative.9",color10:"qualitative.10",color11:"qualitative.11",color12:"qualitative.12",color13:"qualitative.13",color14:"qualitative.14",color15:"qualitative.15",color16:"qualitative.16",color17:"qualitative.17",color18:"qualitative.18",color19:"qualitative.19",color20:"qualitative.20",color21:"qualitative.21",color22:"qualitative.22",color23:"qualitative.23",color24:"qualitative.24",color25:"qualitative.25",color26:"qualitative.26",color27:"qualitative.27",color28:"qualitative.28",color29:"qualitative.29",color30:"qualitative.30",color31:"qualitative.31",color32:"qualitative.32",color33:"qualitative.33",color34:"qualitative.34",color35:"qualitative.35",color36:"qualitative.36",color37:"qualitative.37",color38:"qualitative.38",color39:"qualitative.39",color40:"qualitative.40",info:"semantic.info",disabled:"semantic.disabled",highError:"semantic.highError",error:"semantic.error",warning:"semantic.warning",success:"semantic.success",highSuccess:"semantic.highSuccess"},rs={1:["#637cef"],2:["#e3008c"],3:["#2aa0a4"],4:["#9373c0"],5:["#13a10e"],6:["#3a96dd"],7:["#ca5010"],8:["#57811b"],9:["#b146c2"],10:["#ae8c00"],11:["#3c51b4","#93a4f4"],12:["#ad006a","#ee5fb7"],13:["#026467","#4cb4b7"],14:["#674c8c","#a083c9"],15:["#0e7a0b","#27ac22"],16:["#2c72a8","#4fa1e1"],17:["#9a3d0c","#d77440"],18:["#405f14","#73aa24"],19:["#863593","#c36bd1"],20:["#6d5700","#d0b232"],21:["#4f6bed"],22:["#ea38a6"],23:["#038387"],24:["#8764b8"],25:["#11910d"],26:["#3487c7"],27:["#d06228"],28:["#689920"],29:["#ba58c9"],30:["#937700","#c19c00"],31:["#2c3c85","#c8d1fa"],32:["#7f004e","#f7adda"],33:["#02494c","#9bd9db"],34:["#4c3867","#b29ad4"],35:["#0b5a08","#a7e3a5"],36:["#20547c","#83bdeb"],37:["#712d09","#df8e64"],38:["#23330b","#a4cc6c"],39:["#63276d","#cf87da"],40:["#3a2f00","#dac157"]},os={qualitative:rs,semantic:{info:["#015cda"],disabled:["#dbdbdb","#4d4d4d"],highError:["#6e0811","#cc2635"],error:["#c50f1f","#dc626d"],warning:["#f7630c","#f87528"],success:["#107c10","#54b054"],highSuccess:["#094509","#218c21"]}},us=Object.values(rs),as=Object.values(es),ls=function(t,n){if(0===t.length)return"";var i=Number(n);return i<t.length?t[i]:t[0]},ss=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=us[(t+n)%us.length];return ls(e,i)},cs=function(t,n){if(void 0===n&&(n=!1),as.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=os[e][r];return ls(o,n)}return t},ds=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},fs=function(t){var n=t.r,i=t.g,e=t.b;return{r:ds(n/255),g:ds(i/255),b:ds(e/255)}},vs=function(t){return.2126*t.r+.7152*t.g+.0722*t.b},hs=function(t,n){var i=vs(fs(Po(t))),e=vs(fs(Po(n)));return(Math.max(i,e)+.05)/(Math.min(i,e)+.05)},ps="2000-01-01";function gs(t,n){void 0===n&&(n=!1);var i=$u(".2~",t);Math.abs(t)<1?i=ju(".2~g"):n&&Math.abs(t)>=1e3&&(i=$u(".1~",t));var e=i(t);return Math.abs(t)>=1e9?e.replace("G","B"):e}function ys(t){return gs(t)}function ms(t,n,i,e,r){var o=t.domainNRangeValues,u=t.showRoundOffXTickValues,a=void 0===u||u,l=t.xAxistickSize,s=void 0===l?6:l,c=t.tickPadding,d=void 0===c?10:c,f=t.xAxisCount,v=t.xAxisElement,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=t.tickStep,y=t.tick0,m=t.tickText,b=oc(r).domain([o.dStartValue,o.dEndValue]).range([o.rStartValue,o.rEndValue]);a&&b.nice();var x=null!=f?f:6,w=function(t,i,r){if(n.tickValues&&m&&void 0!==m[i])return m[i];if(n.tickFormat)return ju(n.tickFormat)(t);var o="number"==typeof t?t:t.valueOf();return""===(null==r?void 0:r(o))?"":(0,Yn.c$)(o,e)};if(h&&void 0===f){var M=p(b.ticks().map((function(t,n){return w(t,n)})))+20,C=b.range(),k=C[0],A=C[1];x=Math.min(Math.max(1,Math.floor(Math.abs(A-k)/M)),10)}var S,L=ni(b).tickSize(s).tickPadding(d).ticks(x).tickFormat((function(t,n){return w(t,n,b.tickFormat(x))}));[ts.HorizontalBarChartWithAxis,ts.GanttChart].includes(i)&&L.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?S=n.tickValues:g&&(S=fc(r,g,y,b.domain())),S&&L.tickValues(S),v&&sl(v).call(L).selectAll("text").attr("aria-hidden","true");var D=(null!=S?S:b.ticks(x)).map(L.tickFormat());return{xScale:b,tickValues:D}}function bs(t,n){var i,e=Ei,r=n?Bi:Fi,o=n?_i:Pi,u=n?Ii:Hi,a=n?re:ee,l=n?Zi:zi,s=n?ue:oe,c=[{formatLevel:0,condition:function(t){return e(t)<t}},{formatLevel:1,condition:function(t){return r(t)<t}},{formatLevel:2,condition:function(t){return o(t)<t}},{formatLevel:3,condition:function(t){return u(t)<t}},{formatLevel:4,condition:function(t){return a(t)<t&&l(t)<t}},{formatLevel:5,condition:function(t){return a(t)<t}},{formatLevel:6,condition:function(t){return s(t)<t}},{formatLevel:7,condition:function(){return!0}}].find((function(n){return(0,n.condition)(t)}));return null!==(i=null==c?void 0:c.formatLevel)&&void 0!==i?i:7}function xs(t,n,i){var e,r,o=t.yMinMaxValues,u=void 0===o?{startValue:0,endValue:0}:o,a=t.yAxisElement,l=void 0===a?null:a,s=t.yMaxValue,c=void 0===s?0:s,d=t.yMinValue,f=void 0===d?0:d,v=t.containerHeight,h=t.margins,p=t.tickPadding,g=void 0===p?12:p,y=t.maxOfYVal,m=void 0===y?0:y,b=t.yAxisTickFormat,x=t.yAxisTickCount,w=void 0===x?4:x,M=t.tickValues,C=t.tickStep,k=t.tick0,A=t.tickText,S=m||u.endValue,L=S>c?S:c,D=u.startValue<f?Math.min(0,u.startValue):f,V=Gu().domain([D,L]).range([v-h.bottom,h.top]),N=(n?ti(V):ii(V)).tickPadding(g).ticks(w);return N.tickFormat((function(t,n){return M&&A&&void 0!==A[n]?A[n]:"function"==typeof b?b(t,n):"string"==typeof b?ju(b)(t):ys("number"==typeof t?t:t.valueOf())})),M?r=M:C&&(r=fc(void 0,C,k,V.domain())),r&&N.tickValues(r),l&&sl(l).call(N).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=V.domain(),i.yAxisTickText=(null!==(e=N.tickValues())&&void 0!==e?e:V.ticks(w)).map(N.tickFormat()),V}function ws(t,n,i,e,r,o,u,a){var l;void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===u&&(u=!1);var s=t.yMinMaxValues,c=void 0===s?{startValue:0,endValue:0}:s,d=t.yAxisElement,f=void 0===d?null:d,v=t.yMaxValue,h=void 0===v?0:v,p=t.yMinValue,g=void 0===p?0:p,y=t.containerHeight,m=t.containerWidth,b=t.margins,x=t.tickPadding,w=void 0===x?12:x,M=t.maxOfYVal,C=void 0===M?0:M,k=t.yAxisTickFormat,A=t.yAxisTickCount,S=void 0===A?4:A,L=t.eventAnnotationProps,D=t.eventLabelHeight,V=t.tickValues,N=t.tickStep,O=t.tick0,T=t.tickText,E=C||c.endValue||0,F=E>h?E:h,B=o?Math.min(c.startValue||0,g||0):c.startValue<g?0:g,P=function(t,n,i,e,r){if(r)return function(t,n,i){var e,r,o=t<0&&t===n?0:n,u=ci(t>=0&&t===n?0:t,o,i),a=ai(u[0],u[u.length-1],i);return a[a.length-1]>o&&(e=o,r=(0,Yn.Di)(e),Math.log10(r)%1==0)&&a.pop(),a}(n,t,i);var o=e||(t-n)/i>=1?Math.ceil((t-n)/i):(t-n)/i,u=[n<0&&t>=0?0:n];if(u[0]===n&&u.push(n+o),n<0&&t>=0){for(;u[u.length-1]>n;)u.push(u[u.length-1]-o);u.reverse()}for(;u[u.length-1]<t;)u.push(u[u.length-1]+o);return u}(F,B,S,e,u),_=[o?P[0]:B,P[P.length-1]];if("log"===a){var H=c.startValue,I=c.endValue;g>0&&(H=Math.min(H,g)),h>0&&(I=Math.max(I,h)),_=[H,I]}var W,R=oc(a).domain(_).range([y-b.bottom,b.top+(L?D:0)]),z=(!n&&r||n&&!r?ti(R):ii(R)).tickPadding(w).tickSizeInner(-(m-b.left-b.right));return V?W=V:N&&(W=fc(a,N,O,R.domain())),W?z.tickValues(W):"log"!==a&&z.tickValues(P),z.tickFormat((function(t,n){return function(t,n,i){if(V&&T&&void 0!==T[n])return T[n];if("function"==typeof k)return k(t,n);if("string"==typeof k)return ju(k)(t);var e="number"==typeof t?t:t.valueOf();return""===(null==i?void 0:i(e))?"":ys(e)}(t,n,R.tickFormat(S))})),f&&sl(f).call(z).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=R.domain(),i.yAxisTickText=(null!==(l=z.tickValues())&&void 0!==l?l:R.ticks(S)).map(z.tickFormat()),R}!function(t){t[t.AreaChart=0]="AreaChart",t[t.LineChart=1]="LineChart",t[t.VerticalBarChart=2]="VerticalBarChart",t[t.VerticalStackedBarChart=3]="VerticalStackedBarChart",t[t.GroupedVerticalBarChart=4]="GroupedVerticalBarChart",t[t.HeatMapChart=5]="HeatMapChart",t[t.HorizontalBarChartWithAxis=6]="HorizontalBarChartWithAxis",t[t.ScatterChart=7]="ScatterChart",t[t.GanttChart=8]="GanttChart"}(ts||(ts={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(ns||(ns={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(is||(is={}));var Ms=function(t,n,i,e,r){var o,u=t.containerHeight,a=t.tickPadding,l=void 0===a?12:a,s=t.margins,c=t.yAxisTickFormat,d=t.yAxisElement,f=t.yAxisPadding,v=t.tickValues,h=t.tickText,p=null!=f?f:.5;p=1===p?.99:p;var g=Tu().domain(n).range([u-s.bottom,s.top]).padding(p),y=i?ti(g):ii(g),m=null!==(o=v)&&void 0!==o?o:n,b=y.tickPadding(l).tickValues(m).tickFormat((function(t,n){return v&&h&&void 0!==h[n]?h[n]:"function"==typeof c?c(t,n):t}));return d&&sl(d).call(b).selectAll("text"),e.yAxisTickText=b.tickValues().map(b.tickFormat()),g},Cs=function(t,n,i,e,r,o){var u,a=t.containerHeight,l=t.tickPadding,s=void 0===l?12:l,c=t.margins,d=t.yAxisTickFormat,f=t.yAxisElement,v=t.yAxisPadding,h=void 0===v?0:v,p=t.containerWidth,g=t.tickValues,y=t.tickText,m=Tu().domain(n).range([a-c.bottom,c.top]).padding(h);o===ts.VerticalStackedBarChart&&m.paddingInner(1).paddingOuter(0);var b=i?ti(m):ii(m),x=null!==(u=g)&&void 0!==u?u:n,w=b.tickPadding(s).tickValues(x).tickFormat((function(t,n){return g&&y&&void 0!==y[n]?y[n]:"function"==typeof d?d(t,n):t})).tickSize(0);return o===ts.VerticalStackedBarChart&&b.tickSizeInner(-(p-c.left-c.right)),f&&sl(f).call(w).selectAll("text"),e.yAxisTickText=w.tickValues().map(w.tickFormat()),m};function ks(t){var n=[];t.forEach((function(t){var i=t.data.filter((function(t){return!t.hideCallout})).map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,index:t.index})}));n=n.concat(i)}));var i={};return n.forEach((function(t){var n=t.x instanceof Date?t.x.getTime():t.x;n in i?i[n].push({legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}):i[n]=[{legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}]})),i}var As=function(t,n,i){var e=sl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},Ss=function(t,n){void 0===n&&(n="none");var i=0,e=document.createElement("canvas").getContext("2d");if(e){var r=document.querySelector(n);if(r){var o=window.getComputedStyle(r,null),u=o.getPropertyValue("font-weight"),a=o.getPropertyValue("font-size"),l=o.getPropertyValue("font-family");e.font="".concat(u," ").concat(a," ").concat(l)}else e.font='600 10px "Segoe UI"';t.forEach((function(t){i=Math.max(e.measureText(t.toString()).width,i)}))}return i};function Ls(t){var n=t.tooltipCls,i=t.axis,e=t.id;if(null===i)return null;for(var r=sl("body").append("div").attr("id",e).attr("class",n).style("opacity",0),o=i.selectAll("#BaseSpan")._groups[0],u=o&&Object.keys(o).length,a=[],l=0;l<u;l++){var s=o[l].dataset&&Object.values(o[l].dataset)[0];a.push(s)}var c=i.selectAll(".tick")._groups[0],d=c&&Object.keys(c).length,f=function(t){sl(c[t]).on("mouseover",(function(n,i){r.style("opacity",.9),r.text(a[t]).style("left",n.pageX+"px").style("top",n.pageY-28+"px")})).on("mouseout",(function(t){r.style("opacity",0)}))};for(l=0;l<d;l++)f(l)}function Ds(t){var n=!1;return t&&t.length>0&&t.forEach((function(t){t.data.length>0&&(n=t.data[0].x instanceof Date)})),n}function Vs(t,n,i,e,r,o){var u=ec(t),a=sc(t,r),l=a[0],s=a[1];if(o){var c=uc(l,s,r);l-=c.start,s+=c.end}var d=n.left,f=i-n.right;return e?{dStartValue:u?1:s,dEndValue:u?-1:l,rStartValue:d,rEndValue:f}:{dStartValue:u?-1:l,dEndValue:u?1:s,rStartValue:d,rEndValue:f}}function Ns(t){var n={};return t.forEach((function(t){var i=t.y;n[i]||(n[i]=[]),n[i].push(t)})),Object.values(n)}function Os(t,n){var i=0,e=0;return t.forEach((function(t){var r=t.reduce((function(t,n){return t+(n.x>0?n.x:0)}),n),o=t.reduce((function(t,n){return t+(n.x<0?n.x:0)}),n);i=Math.max(i,r),e=Math.min(e,o)})),{longestPositiveBar:i,longestNegativeBar:e}}function Ts(t,n,i){var e=t.left,r=n-t.right;return i?{dStartValue:0,dEndValue:0,rStartValue:r,rEndValue:e}:{dStartValue:0,dEndValue:0,rStartValue:e,rEndValue:r}}function Es(t,n,i,e,r,u,a,l){var s,c,d;if(void 0===r&&(r=[]),[ts.AreaChart,ts.LineChart,ts.ScatterChart].includes(u)){if(c=(s=sc(t))[0],d=s[1],c=di((0,o.fX)((0,o.fX)([],r,!0),[c],!1)),d=fi((0,o.fX)((0,o.fX)([],r,!0),[d],!1)),l||u===ts.ScatterChart){var f=uc(c.getTime(),d.getTime());c=new Date(c.getTime()-f.start),d=new Date(d.getTime()+f.end)}}else c=di(t,(function(t){return t.x})),d=fi(t,(function(t){return t.x}));var v=n.left,h=i-n.right;return e?{dStartValue:d,dEndValue:c,rStartValue:v,rEndValue:h}:{dStartValue:c,dEndValue:d,rStartValue:v,rEndValue:h}}function Fs(t,n,i,e){var r=[];return t.forEach((function(t){!i==!t.useSecondaryYScale&&t.data.forEach((function(t){ac(t.y,e)&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}}function Bs(t,n,i){var e=[];return t.forEach((function(t){i||e.push(t.y),void 0!==t.lineData&&!i==!t.lineData.useSecondaryYScale&&e.push(t.lineData.y)})),{startValue:di(e),endValue:fi(e)}}function Ps(t,n){if(void 0!==n&&n===is.NumericAxis){var i=fi(t,(function(t){return t.y}));return{startValue:di(t,(function(t){return t.y})),endValue:i}}return{startValue:0,endValue:0}}var _s,Hs,Is=function(t,n){if(n)switch(typeof t){case"string":return ns.StringAxis;case"number":return ns.NumericAxis;default:return ns.DateAxis}else switch(typeof t){case"string":return is.StringAxis;case"number":return is.NumericAxis;default:return is.DateAxis}};!function(t){t[t.circle=0]="circle",t[t.square=1]="square",t[t.triangle=2]="triangle",t[t.diamond=3]="diamond",t[t.pyramid=4]="pyramid",t[t.hexagon=5]="hexagon",t[t.pentagon=6]="pentagon",t[t.octagon=7]="octagon"}(_s||(_s={})),function(t){t[t.dottedLine=0]="dottedLine"}(Hs||(Hs={}));var Ws=((Ql={})[_s.circle]={widthRatio:1},Ql[_s.square]={widthRatio:1},Ql[_s.triangle]={widthRatio:1},Ql[_s.diamond]={widthRatio:1},Ql[_s.pyramid]={widthRatio:1},Ql[_s.hexagon]={widthRatio:2},Ql[_s.pentagon]={widthRatio:1.168},Ql[_s.octagon]={widthRatio:2.414},Ql),Rs=function(t,n,i){return void 0===n&&(n="text"),void 0===i&&(i=!0),{role:n,"data-is-focusable":i,"aria-label":(t=null!=t?t:{}).ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy}};function zs(t){return gs(t,!0)}var js=function(t,n,i,e){var r;return void 0===i&&(i=16),r="auto"===t||"histogram"===e?i:"number"==typeof t?t:Math.min(i,16),"number"==typeof n&&(r=Math.min(r,n)),Math.max(r,1)},$s=function(t,n,i){void 0===i&&(i=0);var e="number"==typeof t?t:"number"==typeof n?n:i;return Math.max(0,Math.min(e,1))},Ys=function(t,n){return"number"==typeof t||"number"==typeof n};function Xs(t){return void 0===t&&(t={}),t.dangerouslySetInnerHTML,(0,o.Tt)(t,["dangerouslySetInnerHTML"])}function Gs(t,n){if(t===n)return!0;if(!t&&!n)return!0;if(!t||!n||t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}var Us=/var\((--[a-zA-Z0-9\-]+)\)/g;function qs(t,n){var i=getComputedStyle(t);return n.replace(Us,(function(t,n){return i.getPropertyValue(n)}))}function Zs(t,n,i){var e=getComputedStyle(n);Array.isArray(t)?t.forEach((function(t){sl(i).style(t,e.getPropertyValue(t))})):Object.entries(t).forEach((function(t){var n=t[0],r=t[1];sl(i).style(r,e.getPropertyValue(n))}))}var Ks={position:"absolute",visibility:"hidden",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Js=p("measurement_span_");function Qs(t,n){if(void 0===n&&(n=hl),"function"==typeof t)return t;switch(t){case"linear":return hl;case"natural":return yl;case"step":return bl;case"stepAfter":return wl;case"stepBefore":return xl;default:return n}}var tc=/(category|total|sum|min|max|mean|median) (ascending|descending)/,nc=function(t,n){if(Array.isArray(n)){var i=[],e=new Set;return n.forEach((function(n){t[n]&&!e.has(n)&&(i.push(n),e.add(n))})),Object.keys(t).forEach((function(t){e.has(t)||i.push(t)})),i}var r=null==n?void 0:n.match(tc);if(r){var o=r[1],u=r[2];if("category"===o){var a=Object.keys(t).sort();return"descending"===u?a.reverse():a}var l={min:di,max:fi,sum:vi,total:vi,mean:hi,median:bi},s=[];return Object.keys(t).forEach((function(n){s.push([n,l[o](t[n])||0])})),s.sort("descending"===u?function(t,n){return n[1]-t[1]}:function(t,n){return t[1]-n[1]}),s.map((function(t){return t[0]}))}return Object.keys(t)};function ic(t,n){var i=n.semanticColors.bodyText;return hs(i,t)<3&&(i=function(t,n){return t===n.semanticColors.bodyText?n.semanticColors.bodyBackground:n.semanticColors.bodyText}(i,n)),i}function ec(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"scatterpolar"===t.lineOptions.mode}))}var rc,oc=function(t){return"log"===t?ta():Gu()},uc=function(t,n,i){if("log"===i)return{start:.5*t,end:n};var e=.1*(n-t);return{start:e,end:e}},ac=function(t,n){return"number"!=typeof t||"log"!==n||t>0},lc=function(t,n){return!_l(t)&&!_l(n)},sc=function(t,n){var i=function(t){return ac(t.x,n)};return[di(t,(function(t){return di(t.data.filter(i),(function(t){return t.x}))})),fi(t,(function(t){return fi(t.data.filter(i),(function(t){return t.x}))}))]},cc=function(t){var n=t.data,i=t.xScale,e=t.yScalePrimary,r=t.yScaleSecondary,o=t.useSecondaryYScale,u=t.xScaleType,a=t.yScaleType,l=t.secondaryYScaleType,s=sc(n,u),c=s[0],d=s[1],f=uc(+c,+d,u),v=c instanceof Date?new Date(+c-f.start):c-f.start,h=d instanceof Date?new Date(+d+f.end):d+f.end,p=Math.min(Math.abs(i(c)-i(v)),Math.abs(i(h)-i(d))),g=o?l:a,y=Fs(n,0,o,g),m=y.startValue,b=y.endValue,x=uc(m,b,g),w=m-x.start,M=b+x.end,C=o?r:e,k=Math.min(Math.abs(C(w)-C(m)),Math.abs(C(b)-C(M)));return Math.min(p,k)},dc=function(t,n,i){for(var e=di(i),r=fi(i),o=Math.max(dl(t),dl(n)),u=Math.ceil(fl((e-t)/n,o)),a=Math.floor(fl((r-t)/n,o)),l=[],s=u;s<=a;s++)l.push(fl(t+s*n,o));return l},fc=function(t,n,i,e){var r="number"==typeof i?i:0;if("log"!==t){if("number"==typeof n&&n>0)return dc(r,n,e)}else{if("number"==typeof n&&n>0)return dc(r,n,e.map((function(t){return Math.log10(t)}))).map((function(t){return Math.pow(10,t)}));if("string"==typeof n){var o=n[0],u=Dl(n.slice(1))?Number(n.slice(1)):0;if("L"===o&&u>0)return dc(r,u,e)}}},vc=function(t,n,i,e){var r=n instanceof Date?n:new Date(ps);if("number"==typeof t&&t>0)return dc(+r,t,i.map((function(t){return+t}))).map((function(t){return new Date(t)}));if("string"==typeof t){var o=t[0],u=Dl(t.slice(1))?Number(t.slice(1)):0;if("M"===o&&u>0&&u===Math.round(u))return function(t,n,i,e){for(var r=+di(i),o=+fi(i),u=function(t){return e?t.getUTCMonth():t.getMonth()},a=function(t,n){return e?new Date(t.setUTCMonth(n)):new Date(t.setMonth(n))},l=0,s=new Date(+t);+s>r;)s=a(s,u(s)-n),l-=n;for(var c=u(t),d=[],f=l;;f+=n){var v=a(new Date(+t),c+f);if(u(v)!==((c+f)%12+12)%12&&(v=e?new Date(v.setUTCDate(0)):new Date(v.setDate(0))),+v>o)break;+v>=r&&d.push(v)}return d}(r,u,i,e)}},hc=function(t,n){if(null!==n){var i=n instanceof Date?n.getTime():n;if(t[i])return{x:n,values:t[i]}}},pc=i(357),gc={gradient1:"default.1",gradient2:"default.2",gradient3:"default.3",gradient4:"default.4",gradient5:"default.5",gradient6:"default.6",gradient7:"default.7",gradient8:"default.8",gradient9:"default.9",gradient10:"default.10",gradient1Ext:"extended.1",gradient2Ext:"extended.2",gradient3Ext:"extended.3",gradient4Ext:"extended.4",gradient5Ext:"extended.5",gradient6Ext:"extended.6",gradient7Ext:"extended.7",gradient8Ext:"extended.8",gradient9Ext:"extended.9",gradient10Ext:"extended.10",success:"semantic.success",highSuccess:"semantic.highSuccess",warning:"semantic.warning",error:"semantic.error",highError:"semantic.highError",disabled:"semantic.disabled"},yc={1:[["#4760D5","#637CEF"],["#4F6BED","#637CEF"]],2:[["#795AA6","#9373C0"],["#8764B8","#A083C9"]],3:[["#159195","#2AA0A4"],["#159195","#2AA0A4"]],4:[["#B146C2","#C36BD1"],["#B146C2","#C36BD1"]],5:[["#3487C7","#3A96DD"],["#3487C7","#3A96DD"]],6:[["#0E7A0B","#13A10E"],["#11910D","#27AC22"]],7:[["#E61C99","#EE5FB7"],["#E61C99","#EE5FB7"]],8:[["#CA5010","#D77440"],["#CA5010","#D77440"]],9:[["#57811B","#689920"],["#57811B","#689920"]],10:[["#937700","#AE8C00"],["#937700","#AE8C00"]]},mc={default:yc,semantic:{success:[["#0C5E0C","#107C10"],["#218C21","#359B35"]],highSuccess:[["#107C10","#359B35"],["#359B35","#9FD89F"]],warning:[["#DE590B","#F7630C"],["#DE590B","#F87528"]],error:[["#B10E1C","#CC2635"],["#D33F4C","#EEACB2"]],highError:[["#6E0811","#B10E1C"],["#D33F4C","#DC626D"]],disabled:[["#E6E6E6","#E6E6E6"],["#E6E6E6","#E6E6E6"]]},extended:{1:[["#2C3C85","#3C51B4"],["#93A4F4","#C8D1FA"]],2:[["#4C3867","#674C8C"],["#A083C9","#B29AD4"]],3:[["#02494C","#038387"],["#4CB4B7","#9BD9DB"]],4:[["#63276D","#863593"],["#C36BD1","#CF87DA"]],5:[["#20547C","#2C72A8"],["#4FA1E1","#83BDEB"]],6:[["#0B5A08","#0E7A0B"],["#27AC22","#5EC75A"]],7:[["#AD006A","#E3008C"],["#EE5FB7","#F7ADDA"]],8:[["#9A3D0C","#CA5010"],["#D77440","#DF8E64"]],9:[["#405F14","#57811B"],["#73AA24","#A4CC6C"]],10:[["#6D5700","#937700"],["#D0B232","#DAC157"]]}},bc=Object.values(yc),xc=Object.values(gc),wc=function(t,n){if(0===t.length)return["",""];var i=Number(n);return i<t.length?t[i]:t[0]},Mc=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=bc[(t+n)%bc.length];return wc(e,i)},Cc=function(t,n){if(void 0===n&&(n=!1),xc.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=mc[e][r];return wc(o,n)}return[t,t]};function kc(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return n.length<2?n[0]:function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];n.forEach((function(n){return n&&n.apply(t,i)}))}}function Ac(t){!function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=kc(t,t[i],n[i]))}(t,{componentDidMount:Sc,componentDidUpdate:Lc,componentWillUnmount:Dc})}function Sc(){Vc(this.props.componentRef,this)}function Lc(t){t.componentRef!==this.props.componentRef&&(Vc(t.componentRef,null),Vc(this.props.componentRef,this))}function Dc(){Vc(this.props.componentRef,null)}function Vc(t,n){t&&("object"==typeof t?t.current=n:"function"==typeof t&&t(n))}function Nc(t,n,i){var e,r=x(t,(function(t){var i;return n===t||!!(null===(i=t.hasAttribute)||void 0===i?void 0:i.call(t,kn))}),i);return null!==r&&!!(null===(e=r.hasAttribute)||void 0===e?void 0:e.call(r,kn))}!function(t){t[t.vertical=0]="vertical",t[t.horizontal=1]="horizontal",t[t.bidirectional=2]="bidirectional",t[t.domOrder=3]="domOrder"}(rc||(rc={}));var Oc,Tc=u.createContext(void 0),Ec="data-is-focusable",Fc="data-focuszone-id",Bc="tabindex",Pc="data-no-vertical-wrap",_c="data-no-horizontal-wrap",Hc=999999999,Ic=-999999999;function Wc(t,n){var i;"function"==typeof MouseEvent?i=new MouseEvent("click",{ctrlKey:null==n?void 0:n.ctrlKey,metaKey:null==n?void 0:n.metaKey,shiftKey:null==n?void 0:n.shiftKey,altKey:null==n?void 0:n.altKey,bubbles:null==n?void 0:n.bubbles,cancelable:null==n?void 0:n.cancelable}):(i=document.createEvent("MouseEvents")).initMouseEvent("click",!!n&&n.bubbles,!!n&&n.cancelable,window,0,0,0,0,0,!!n&&n.ctrlKey,!!n&&n.altKey,!!n&&n.shiftKey,!!n&&n.metaKey,0,null),t.dispatchEvent(i)}var Rc,zc={},jc=new Set,$c=["text","number","password","email","tel","url","search","textarea"],Yc=!1,Xc=function(t){function n(i){var e,r,o,a,s,c=t.call(this,i)||this;c._root=u.createRef(),c._mergedRef=(s={refs:[]},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s.resolver&&function(t,n){if(t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}(s.refs,t)||(s.resolver=function(t){return function(n){for(var i=0,e=t.refs;i<e.length;i++){var r=e[i];"function"==typeof r?r(n):r&&(r.current=n)}}}(s)),s.refs=t,s.resolver}),c._onFocus=function(t){if(!c._portalContainsElement(t.target)){var n,i=c.props,e=i.onActiveElementChanged,r=i.doNotAllowFocusEventToPropagate,o=i.stopFocusPropagation,u=i.onFocusNotification,a=i.onFocus,l=i.shouldFocusInnerElementWhenReceivedFocus,s=i.defaultTabbableElement,d=c._isImmediateDescendantOfZone(t.target);if(d)n=t.target;else for(var f=t.target;f&&f!==c._root.current;){if(D(f,void 0,c._inShadowRoot)&&c._isImmediateDescendantOfZone(f)){n=f;break}f=b(f,Yc)}if(l&&t.target===c._root.current){var v=s&&"function"==typeof s&&c._root.current&&s(c._root.current);v&&D(v,void 0,c._inShadowRoot)?(n=v,v.focus()):(c.focus(!0),c._activeElement&&(n=null))}var h=!c._activeElement;n&&n!==c._activeElement&&((d||h)&&c._setFocusAlignment(n,!0,!0),c._activeElement=n,h&&c._updateTabIndexes()),e&&e(c._activeElement,t),(o||r)&&t.stopPropagation(),a?a(t):u&&u()}},c._onBlur=function(){c._setParkedFocus(!1)},c._onMouseDown=function(t){if(!c._portalContainsElement(t.target)&&!c.props.disabled){for(var n=t.target,i=[];n&&n!==c._root.current;)i.push(n),n=b(n,Yc);for(;i.length&&((n=i.pop())&&D(n,void 0,c._inShadowRoot)&&c._setActiveElement(n,!0),!V(n)););}},c._onKeyDown=function(t,n){if(!c._portalContainsElement(t.target)){var i=c.props,e=i.direction,r=i.disabled,o=i.isInnerZoneKeystroke,u=i.pagingSupportDisabled,a=i.shouldEnterInnerZone;if(!(r||(c.props.onKeyDown&&c.props.onKeyDown(t),t.isDefaultPrevented()||c._getDocument().activeElement===c._root.current&&c._isInnerZone))){if((a&&a(t)||o&&o(t))&&c._isImmediateDescendantOfZone(t.target)){var s=c._getFirstInnerZone();if(s){if(!s.focus(!0))return}else{if(!N(t.target))return;if(!c.focusElement(A(t.target,t.target.firstChild,!0)))return}}else{if(t.altKey)return;switch(t.which){case 32:if(c._shouldRaiseClicksOnSpace&&c._tryInvokeClickForFocusable(t.target,t))break;return;case 37:if(e!==rc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusLeft(n)))break;return;case 39:if(e!==rc.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusRight(n)))break;return;case 38:if(e!==rc.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusUp()))break;return;case 40:if(e!==rc.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusDown()))break;return;case 34:if(!u&&c._moveFocusPaging(!0))break;return;case 33:if(!u&&c._moveFocusPaging(!1))break;return;case 9:if(c.props.allowTabKey||1===c.props.handleTabKey||2===c.props.handleTabKey&&c._isElementInput(t.target)){var d=!1;if(c._processingTabKey=!0,d=e!==rc.vertical&&c._shouldWrapFocus(c._activeElement,_c)?((0,l.jI)(n)?!t.shiftKey:t.shiftKey)?c._moveFocusLeft(n):c._moveFocusRight(n):t.shiftKey?c._moveFocusUp():c._moveFocusDown(),c._processingTabKey=!1,d)break;c.props.shouldResetActiveElementWhenTabFromZone&&(c._activeElement=null)}return;case 36:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!1))return!1;var f=c._root.current&&c._root.current.firstChild;if(c._root.current&&f&&c.focusElement(A(c._root.current,f,!0)))break;return;case 35:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!0))return!1;var v=c._root.current&&c._root.current.lastChild;if(c._root.current&&c.focusElement(k(c._root.current,v,!0,!0,!0)))break;return;case 13:if(c._shouldRaiseClicksOnEnter&&c._tryInvokeClickForFocusable(t.target,t))break;return;default:return}}t.preventDefault(),t.stopPropagation()}}},c._getHorizontalDistanceFromCenter=function(t,n,i){var e=c._focusAlignment.left||c._focusAlignment.x||0,r=Math.floor(i.top),o=Math.floor(n.bottom),u=Math.floor(i.bottom),a=Math.floor(n.top);return t&&r>o||!t&&u<a?e>=i.left&&e<=i.left+i.width?0:Math.abs(i.left+i.width/2-e):c._shouldWrapFocus(c._activeElement,Pc)?Hc:Ic},Ac(c),En("FocusZone",i,{rootProps:void 0,allowTabKey:"handleTabKey",elementType:"as",ariaDescribedBy:"aria-describedby",ariaLabelledBy:"aria-labelledby"}),c._id=p("FocusZone"),c._focusAlignment={left:0,top:0},c._processingTabKey=!1;var d=null===(r=null!==(e=i.shouldRaiseClicks)&&void 0!==e?e:n.defaultProps.shouldRaiseClicks)||void 0===r||r;return c._shouldRaiseClicksOnEnter=null!==(o=i.shouldRaiseClicksOnEnter)&&void 0!==o?o:d,c._shouldRaiseClicksOnSpace=null!==(a=i.shouldRaiseClicksOnSpace)&&void 0!==a?a:d,c}return(0,o.C6)(n,t),n.getOuterZones=function(){return jc.size},n._onKeyDownCapture=function(t){9===t.which&&jc.forEach((function(t){return t._updateTabIndexes()}))},n.prototype.componentDidMount=function(){var t,i=this._root.current;if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),zc[this._id]=this,i){for(var e=b(i,Yc);e&&e!==this._getDocument().body&&1===e.nodeType;){if(V(e)){this._isInnerZone=!0;break}e=b(e,Yc)}this._isInnerZone||(jc.add(this),this._root.current&&this._root.current.addEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.addEventListener("blur",this._onBlur,!0),this._updateTabIndexes(),this.props.defaultTabbableElement&&"string"==typeof this.props.defaultTabbableElement?this._activeElement=this._getDocument().querySelector(this.props.defaultTabbableElement):this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement)),this.props.shouldFocusOnMount&&this.focus()}},n.prototype.componentDidUpdate=function(){var t,n=this._root.current,i=this._getDocument();if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),(this._activeElement&&!w(this._root.current,this._activeElement,Yc)||this._defaultFocusElement&&!w(this._root.current,this._defaultFocusElement,Yc))&&(this._activeElement=null,this._defaultFocusElement=null,this._updateTabIndexes()),!this.props.preventFocusRestoration&&i&&this._lastIndexPath&&(i.activeElement===i.body||null===i.activeElement||i.activeElement===n)){var e=function(t,n){for(var i=t,e=0,r=n;e<r.length;e++){var o=r[e],u=i.children[Math.min(o,i.children.length-1)];if(!u)break;i=u}return D(i)&&S(i)?i:A(t,i,!0)||k(t,i)}(n,this._lastIndexPath);e?(this._setActiveElement(e,!0),e.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},n.prototype.componentWillUnmount=function(){delete zc[this._id],this._isInnerZone||(jc.delete(this),this._root.current&&this._root.current.removeEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.removeEventListener("blur",this._onBlur,!0),this._activeElement=null,this._defaultFocusElement=null},n.prototype.render=function(){var t=this,n=this.props,i=n.as,e=n.elementType,r=n.rootProps,a=n.ariaDescribedBy,l=n.ariaLabelledBy,s=n.className,c=z(this.props,H),d=i||e||"div";this._evaluateFocusBeforeRender();var f=(0,It.O4)();return u.createElement(d,(0,o.Cl)({"aria-labelledby":l,"aria-describedby":a},c,r,{className:j((Oc||(Oc=(0,q.Z)({selectors:{":focus":{outline:"none"}}},"ms-FocusZone")),Oc),s),ref:this._mergedRef(this.props.elementRef,this._root),"data-focuszone-id":this._id,onKeyDown:function(n){return t._onKeyDown(n,f)},onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},n.prototype.focus=function(t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this._root.current){if(!t&&"true"===this._root.current.getAttribute(Ec)&&this._isInnerZone){var i=this._getOwnerZone(this._root.current);if(i!==this._root.current){var e=zc[i.getAttribute(Fc)];return!!e&&e.focusElement(this._root.current)}return!1}if(!t&&this._activeElement&&w(this._root.current,this._activeElement)&&D(this._activeElement,void 0,this._inShadowRoot)&&(!n||L(this._activeElement)))return this._activeElement.focus(),!0;var r=this._root.current.firstChild;return this.focusElement(A(this._root.current,r,!0,void 0,void 0,void 0,void 0,void 0,n))}return!1},n.prototype.focusLast=function(){if(this._root.current){var t=this._root.current&&this._root.current.lastChild;return this.focusElement(k(this._root.current,t,!0,!0,!0))}return!1},n.prototype.focusElement=function(t,n){var i=this.props,e=i.onBeforeFocus,r=i.shouldReceiveFocus;return!(r&&!r(t)||e&&!e(t)||!t||(this._setActiveElement(t,n),this._activeElement&&this._activeElement.focus(),0))},n.prototype.setFocusAlignment=function(t){this._focusAlignment=t},Object.defineProperty(n.prototype,"defaultFocusElement",{get:function(){return this._defaultFocusElement},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"activeElement",{get:function(){return this._activeElement},enumerable:!1,configurable:!0}),n.prototype._evaluateFocusBeforeRender=function(){var t=this._root.current,n=this._getDocument();if(n){var i=n.activeElement;if(i!==t){var e=w(t,i,!1);this._lastIndexPath=e?function(t,n){for(var i=[];n&&t&&n!==t;){var e=b(n,!0);if(null===e)return[];i.unshift(Array.prototype.indexOf.call(e.children,n)),n=e}return i}(t,i):void 0}}},n.prototype._setParkedFocus=function(t){var n=this._root.current;n&&this._isParked!==t&&(this._isParked=t,t?(this.props.allowFocusRoot||(this._parkedTabIndex=n.getAttribute("tabindex"),n.setAttribute("tabindex","-1")),n.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(n.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):n.removeAttribute("tabindex")))},n.prototype._setActiveElement=function(t,n){var i=this._activeElement;this._activeElement=t,i&&(V(i)&&this._updateTabIndexes(i),i.tabIndex=-1),this._activeElement&&(this._focusAlignment&&!n||this._setFocusAlignment(t,!0,!0),this._activeElement.tabIndex=0)},n.prototype._preventDefaultWhenHandled=function(t){this.props.preventDefaultWhenHandled&&t.preventDefault()},n.prototype._tryInvokeClickForFocusable=function(t,n){var i=t;if(i===this._root.current)return!1;do{if("BUTTON"===i.tagName||"A"===i.tagName||"INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SUMMARY"===i.tagName)return!1;if(this._isImmediateDescendantOfZone(i)&&"true"===i.getAttribute(Ec)&&"true"!==i.getAttribute("data-disable-click-on-enter"))return Wc(i,n),!0;i=b(i,Yc)}while(i!==this._root.current);return!1},n.prototype._getFirstInnerZone=function(t){if(!(t=t||this._activeElement||this._root.current))return null;if(V(t))return zc[t.getAttribute(Fc)];for(var n=t.firstElementChild;n;){if(V(n))return zc[n.getAttribute(Fc)];var i=this._getFirstInnerZone(n);if(i)return i;n=n.nextElementSibling}return null},n.prototype._moveFocus=function(t,n,i,e){void 0===e&&(e=!0);var r=this._activeElement,o=-1,u=void 0,a=!1,l=this.props.direction===rc.bidirectional;if(!r||!this._root.current)return!1;if(this._isElementInput(r)&&!this._shouldInputLoseFocus(r,t))return!1;var s=l?r.getBoundingClientRect():null;do{if(r=t?A(this._root.current,r):k(this._root.current,r),!l){u=r;break}if(r){var c=n(s,r.getBoundingClientRect());if(-1===c&&-1===o){u=r;break}if(c>-1&&(-1===o||c<o)&&(o=c,u=r),o>=0&&c<0)break}}while(r);if(u&&u!==this._activeElement)a=!0,this.focusElement(u);else if(this.props.isCircularNavigation&&e)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return a},n.prototype._moveFocusDown=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!0,(function(e,r){var o=-1,u=Math.floor(r.top),a=Math.floor(e.bottom);return u<a?t._shouldWrapFocus(t._activeElement,Pc)?Hc:Ic:((-1===n&&u>=a||u===n)&&(n=u,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusUp=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!1,(function(e,r){var o=-1,u=Math.floor(r.bottom),a=Math.floor(r.top),l=Math.floor(e.top);return u>l?t._shouldWrapFocus(t._activeElement,Pc)?Hc:Ic:((-1===n&&u<=l||a===n)&&(n=a,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusLeft=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,_c);return!!this._moveFocus((0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)):parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)))&&r.right<=e.right&&n.props.direction!==rc.vertical?o=e.right-r.right:i||(o=Ic),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusRight=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,_c);return!!this._moveFocus(!(0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)):parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)))&&r.left>=e.left&&n.props.direction!==rc.vertical?o=r.left-e.left:i||(o=Ic),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusPaging=function(t,n){void 0===n&&(n=!0);var i=this._activeElement;if(!i||!this._root.current)return!1;if(this._isElementInput(i)&&!this._shouldInputLoseFocus(i,t))return!1;var e=K(i);if(!e)return!1;var r=-1,o=void 0,u=-1,a=-1,l=e.clientHeight,s=i.getBoundingClientRect();do{if(i=t?A(this._root.current,i):k(this._root.current,i)){var c=i.getBoundingClientRect(),d=Math.floor(c.top),f=Math.floor(s.bottom),v=Math.floor(c.bottom),h=Math.floor(s.top),p=this._getHorizontalDistanceFromCenter(t,s,c);if(t&&d>f+l||!t&&v<h-l)break;p>-1&&(t&&d>u?(u=d,r=p,o=i):!t&&v<a?(a=v,r=p,o=i):(-1===r||p<=r)&&(r=p,o=i))}}while(i);var g=!1;if(o&&o!==this._activeElement)g=!0,this.focusElement(o),this._setFocusAlignment(o,!1,!0);else if(this.props.isCircularNavigation&&n)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return g},n.prototype._setFocusAlignment=function(t,n,i){if(this.props.direction===rc.bidirectional&&(!this._focusAlignment||n||i)){var e=t.getBoundingClientRect(),r=e.left+e.width/2,o=e.top+e.height/2;this._focusAlignment||(this._focusAlignment={left:r,top:o}),n&&(this._focusAlignment.left=r),i&&(this._focusAlignment.top=o)}},n.prototype._isImmediateDescendantOfZone=function(t){return this._getOwnerZone(t)===this._root.current},n.prototype._getOwnerZone=function(t){for(var n=b(t,Yc);n&&n!==this._root.current&&n!==this._getDocument().body;){if(V(n))return n;n=b(n,Yc)}return n},n.prototype._updateTabIndexes=function(t){!this._activeElement&&this.props.defaultTabbableElement&&"function"==typeof this.props.defaultTabbableElement&&(this._activeElement=this.props.defaultTabbableElement(this._root.current)),!t&&this._root.current&&(this._defaultFocusElement=null,t=this._root.current,this._activeElement&&!w(t,this._activeElement)&&(this._activeElement=null)),this._activeElement&&!D(this._activeElement,void 0,this._inShadowRoot)&&(this._activeElement=null);for(var n=t&&t.children,i=0;n&&i<n.length;i++){var e=n[i];V(e)?"true"===e.getAttribute(Ec)&&(this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(Bc)&&e.setAttribute(Bc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(Bc)&&e.setAttribute(Bc,"0"))):(e.getAttribute&&"false"===e.getAttribute(Ec)&&e.setAttribute(Bc,"-1"),D(e,void 0,this._inShadowRoot)?this.props.disabled?e.setAttribute(Bc,"-1"):this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(Bc)&&e.setAttribute(Bc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(Bc)&&e.setAttribute(Bc,"0")):"svg"===e.tagName&&"false"!==e.getAttribute("focusable")&&e.setAttribute("focusable","false")),this._updateTabIndexes(e)}},n.prototype._isContentEditableElement=function(t){return t&&"true"===t.getAttribute("contenteditable")},n.prototype._isElementInput=function(t){return!(!t||!t.tagName||"input"!==t.tagName.toLowerCase()&&"textarea"!==t.tagName.toLowerCase())},n.prototype._shouldInputLoseFocus=function(t,n){if(!this._processingTabKey&&t&&t.type&&$c.indexOf(t.type.toLowerCase())>-1){var i=t.selectionStart,e=i!==t.selectionEnd,r=t.value,o=t.readOnly;if(e||i>0&&!n&&!o||i!==r.length&&n&&!o||this.props.handleTabKey&&(!this.props.shouldInputLoseFocusOnArrowKey||!this.props.shouldInputLoseFocusOnArrowKey(t)))return!1}return!0},n.prototype._shouldWrapFocus=function(t,n){return!this.props.checkForNoWrap||function(t,n,i){return"true"!==function(t,n,i){var e=x(t,(function(t){return t.hasAttribute(n)}),i);return e&&e.getAttribute(n)}(t,n,null!=i?i:(0,M.Y)())}(t,n)},n.prototype._portalContainsElement=function(t){return t&&!!this._root.current&&Nc(t,this._root.current)},n.prototype._getDocument=function(){return(0,M.Y)(this._root.current)},n.defaultProps={isCircularNavigation:!1,direction:rc.bidirectional,shouldRaiseClicks:!0,"data-tabster":'{"uncontrolled": {}}'},n.contextType=Tc,n}(u.Component);function Gc(t){return function(t){return t.clientWidth<t.scrollWidth}(t)||function(t){return t.clientHeight<t.scrollHeight}(t)}!function(t){t[t.Parent=0]="Parent",t[t.Self=1]="Self"}(Rc||(Rc={}));var Uc,qc=(0,a.Z)(),Zc=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onRenderContent=function(t){return"string"==typeof t.content?u.createElement("p",{className:n._classNames.subText},t.content):u.createElement("div",{className:n._classNames.subText},t.content)},n}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.calloutProps,e=t.directionalHint,r=t.directionalHintForRTL,a=t.styles,l=t.id,s=t.maxWidth,c=t.onRenderContent,d=void 0===c?this._onRenderContent:c,f=t.targetElement,v=t.theme;return this._classNames=qc(a,{theme:v,className:n||i&&i.className,beakWidth:i&&i.isBeakVisible?i.beakWidth:0,gapSpace:i&&i.gapSpace,maxWidth:s}),u.createElement($n,(0,o.Cl)({target:f,directionalHint:e,directionalHintForRTL:r},i,z(this.props,R,["id"]),{className:this._classNames.root}),u.createElement("div",{className:this._classNames.content,id:l,onFocus:this.props.onFocus,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},d(this.props,this._onRenderContent)))},n.defaultProps={directionalHint:1,maxWidth:"364px",calloutProps:{isBeakVisible:!0,beakWidth:16,gapSpace:0,setInitialFocus:!0,doNotLayer:!1}},n}(u.Component),Kc=(0,r.I)(Zc,(function(t){var n=t.className,i=t.beakWidth,e=void 0===i?16:i,r=t.gapSpace,o=void 0===r?0:r,u=t.maxWidth,a=t.theme,l=a.semanticColors,s=a.fonts,c=a.effects,d=-(Math.sqrt(e*e/2)+o)+1/window.devicePixelRatio;return{root:["ms-Tooltip",a.fonts.medium,It.lw.fadeIn200,{background:l.menuBackground,boxShadow:c.elevation8,padding:"8px",maxWidth:u,selectors:{":after":{content:"''",position:"absolute",bottom:d,left:d,right:d,top:d,zIndex:0}}},n],content:["ms-Tooltip-content",s.small,{position:"relative",zIndex:1,color:l.menuItemText,wordWrap:"break-word",overflowWrap:"break-word",overflow:"hidden"}],subText:["ms-Tooltip-subtext",{fontSize:"inherit",fontWeight:"inherit",color:"inherit",margin:0}]}}),void 0,{scope:"Tooltip"});!function(t){t[t.zero=0]="zero",t[t.medium=1]="medium",t[t.long=2]="long"}(Uc||(Uc={}));var Jc,Qc,td=(0,a.Z)(),nd=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._defaultTooltipId=p("tooltip"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._getTargetElement=function(){if(e._tooltipHost.current){var t=e.props.overflowMode;if(void 0!==t)switch(t){case Rc.Parent:return e._tooltipHost.current.parentElement;case Rc.Self:return e._tooltipHost.current}return e._tooltipHost.current}},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipContentFocus=function(t){n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e._clearDismissTimer(),e._clearOpenTimer()},e._onTooltipBlur=function(t){var n;e._ignoreNextFocusEvent=(null===(n=jt(e.context))||void 0===n?void 0:n.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props,r=i.overflowMode,o=i.delay,u=jt(e.context);if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,void 0!==r){var a=e._getTargetElement();if(a&&!Gc(a))return}if(!t.target||!Nc(t.target,e._getTargetElement(),u))if(e._clearDismissTimer(),e._clearOpenTimer(),o!==Uc.zero){var l=e._getDelayTime(o);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),l)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Vt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t},(function(){return e.props.onTooltipToggle&&e.props.onTooltipToggle(t)}))},e._getDelayTime=function(t){switch(t){case Uc.medium:return 300;case Uc.long:return 500;default:return 0}},Ac(e),e.state={isAriaPlaceholderRendered:!1,isTooltipVisible:!1},e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.calloutProps,i=t.children,e=t.content,r=t.directionalHint,a=t.directionalHintForRTL,l=t.hostClassName,s=t.id,c=t.setAriaDescribedBy,d=void 0===c||c,f=t.tooltipProps,v=t.styles,h=t.theme;this._classNames=td(v,{theme:h,className:l});var p=this.state.isTooltipVisible,g=s||this._defaultTooltipId,y=(0,o.Cl)((0,o.Cl)({id:"".concat(g,"--tooltip"),content:e,targetElement:this._getTargetElement(),directionalHint:r,directionalHintForRTL:a,calloutProps:$({},n,{onDismiss:this._hideTooltip,onFocus:this._onTooltipContentFocus,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave}),onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},z(this.props,R,["id"])),f),m=(null==f?void 0:f.onRenderContent)?f.onRenderContent(y,(function(t){return(null==t?void 0:t.content)?u.createElement(u.Fragment,null,t.content):null})):e,b=p&&!!m,x=d&&p&&m?g:void 0;return u.createElement("div",{className:this._classNames.root,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,role:"none","aria-describedby":x},i,b&&u.createElement(Kc,(0,o.Cl)({},y)),u.createElement("div",{hidden:!0,id:g,style:It.dX},m))},n.prototype.componentDidMount=function(){this._async=new Nt(this)},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:Uc.medium},n.contextType=Ft,n}(u.Component),id={root:"ms-TooltipHost",ariaPlaceholder:"ms-TooltipHost-aria-placeholder"},ed=(0,r.I)(nd,(function(t){var n=t.className,i=t.theme;return{root:[(0,It.Km)(id,i).root,{display:"inline"},n]}}),void 0,{scope:"TooltipHost"}),rd=function(t){function n(n){var i=t.call(this,n)||this;return i._tooltipChild=u.createRef(),i._checkTextOverflow=function(){var t=i._getTargetElement(),n=!!t&&Gc(t);n!==i.state.textOverflow&&i.setState({textOverflow:n})},i._getTargetElement=function(){if(i._tooltipChild.current&&i._tooltipChild.current.parentElement)return i._tooltipChild.current.parentElement},i.state={textOverflow:!1},i._async=new Nt(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.content,e=t.accessibilityData;return u.createElement(ed,{overflowMode:Rc.Self,hostClassName:n,content:i},u.createElement("span",(0,o.Cl)({},Rs(e),{ref:this._tooltipChild,"data-is-focusable":this.state.textOverflow}),i))},n.prototype.componentDidMount=function(){var t=this._getTargetElement();window.ResizeObserver&&t&&(this._resizeObserver=new ResizeObserver(this._async.debounce(this._checkTextOverflow,500)),this._resizeObserver.observe(t))},n.prototype.componentWillUnmount=function(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this._async.dispose()},n}(u.Component),od=(0,a.Z)(),ud=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.state.isCalloutVisible&&i.setState({isCalloutVisible:!1,hoverValue:"",refSelected:null,lineColor:"",legend:""})},i._adjustProps=function(){i._barHeight=i.props.barHeight||12,i._classNames=od(i.props.styles,{theme:i.props.theme,width:i.props.width,className:i.props.className,barHeight:i._barHeight,color:i.state.lineColor,variant:i.props.variant,hideLabels:i.props.hideLabels})},i._getChartDataText=function(t){return i.props.barChartCustomData?u.createElement("div",{role:"text"},i.props.barChartCustomData(t)):i._getDefaultTextData(t)},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.data,r=t.yAxisCalloutData||(t.horizontalBarChartdata?"".concat(t.horizontalBarChartdata.x,"/").concat(t.horizontalBarChartdata.y):0);return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):"")+"".concat(r,".")+(e?"with benchmark at "+"".concat(e,", "):"")},i.state={isCalloutVisible:!1,hoverValue:"",lineColor:"",legend:"",refSelected:null,color:"",xCalloutValue:"",yCalloutValue:"",barSpacingInPercent:0},i._refArray=[],i._uniqLineText="_HorizontalLine_"+Math.random().toString(36).substring(7),i._hoverOff=i._hoverOff.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_HBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.theme;this._adjustProps();var r=e.palette,a=0;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},i.map((function(n,i){a=n.chartData&&n.chartData[0]&&n.chartData[0].horizontalBarChartdata.x?n.chartData[0].horizontalBarChartdata.x:0,n.chartData[1]={legend:"",horizontalBarChartdata:{x:n.chartData[0].horizontalBarChartdata.y-a,y:n.chartData[0].horizontalBarChartdata.y},color:r.neutralLight};var e=t.props.variant===v.AbsoluteScale?null:t._getChartDataText(n),o=t._createBars(n,r,i),l=t._uniqLineText+"_"+i,s=od(t.props.styles,{theme:t.props.theme,width:t.props.width,showTriangle:!!n.chartData[0].data,variant:t.props.variant});return u.createElement("div",{key:i},u.createElement("div",{className:s.items},u.createElement(Xc,{direction:rc.horizontal},u.createElement("div",{className:t._classNames.chartTitle},n.chartTitle&&u.createElement(rd,{className:t._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),e)),n.chartData[0].data&&t._createBenchmark(n),u.createElement(Xc,{direction:rc.horizontal,className:t._classNames.chartWrapper},u.createElement("svg",{ref:t.barChartSvgRef,className:t._classNames.chart,"aria-label":n.chartTitle},u.createElement("g",{id:l,key:l,ref:function(i){t._refCallback(i,n.chartData[0].legend)},onClick:function(){var t=n.chartData[0];t&&t.onClick&&t.onClick()}},o)))))})),u.createElement($n,(0,o.Cl)({target:this.state.refSelected,coverTarget:!0,isBeakVisible:!1,gapSpace:30,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps,Rs(this.state.callOutAccessibilityData)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerHorizontalBar?this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps):u.createElement(pc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.hoverValue,color:this.state.lineColor,culture:this.props.culture}))))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._hoverOn=function(t,n){var i,e,r,o;if((!this.state.isCalloutVisible||this.state.legend!==n.legend)&&this._calloutAnchorPoint!==n){var u=m(this._refArray,(function(t){return t.index===n.legend}));this._calloutAnchorPoint=n;var a=n.color;if(this.props.enableGradient){var l=Math.max((null===(e=null===(i=this.props.data)||void 0===i?void 0:i.map((function(t){return t.chartData})))||void 0===e?void 0:e.findIndex((function(t){return(null==t?void 0:t[0].data)===n.data&&(null==t?void 0:t[0].legend)===n.legend})))||0,0);a=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Mc(l,0,null===(o=this.props.theme)||void 0===o?void 0:o.isInverted)[0]}this.setState({isCalloutVisible:!0,hoverValue:t,lineColor:a,legend:n.legend,refSelected:u.refElement,xCalloutValue:n.xAxisCalloutData,yCalloutValue:n.yAxisCalloutData,barCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._hoverOff=function(){},n.prototype._getDefaultTextData=function(t){var n=this.props.culture,i=this.props.chartDataMode||"default",e=t.chartData[0],r=e.horizontalBarChartdata.x,a=e.horizontalBarChartdata.y,l=Rs(t.chartDataAccessibilityData,"text",!1);switch(i){case"default":return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),(0,Yn.c$)(r,n));case"fraction":return u.createElement("div",(0,o.Cl)({},l),u.createElement("span",{className:this._classNames.chartTitleRight},(0,Yn.c$)(r,n)),u.createElement("span",{className:this._classNames.chartDataTextDenominator}," / "+(0,Yn.c$)(a,n)));case"percentage":var s="".concat((0,Yn.c$)(Math.round(r/a*100),n),"%");return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),s)}},n.prototype._createBenchmark=function(t){var n=t.chartData[0].horizontalBarChartdata.y,i=t.chartData[0].data,e={left:"calc("+Math.round((i||0)/n*100)+"% - 4px)"};return u.createElement("div",{className:this._classNames.benchmarkContainer},u.createElement("div",{className:this._classNames.triangle,style:e}))},n.prototype._createBars=function(t,n,i){var e,r=this,o=(null===(e=t.chartData)||void 0===e?void 0:e.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,a=this.state.barSpacingInPercent*(o-1),l=[n.blueLight,n.blue,n.blueMid,n.red,n.black],s=[],c=t.chartData.reduce((function(t,n){return t+(n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0)}),0),d=0,f=0,h=0;t.chartData.map((function(t,n){var i=t.horizontalBarChartdata.x?t.horizontalBarChartdata.x:0;return(f=i/c*100)<0?f=0:f<1&&0!==f&&(f=1),h+=f}));var g=0!==h?(h-a)/100:1,y=t.chartData.map((function(n,e){var o,a,h,y,m=n.color?n.color:l[Math.floor(4*Math.random()+1)],b=m;r.props.enableGradient&&1!==e&&(m=(null===(o=n.gradient)||void 0===o?void 0:o[0])||Mc(i,0,null===(a=r.props.theme)||void 0===a?void 0:a.isInverted)[0],b=(null===(h=n.gradient)||void 0===h?void 0:h[1])||Mc(i,0,null===(y=r.props.theme)||void 0===y?void 0:y.isInverted)[1]);var x=n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0;e>0&&(d+=f),(f=x/c*100)<0?f=0:f<1&&0!==f?f=1/g:f/=g,s.push(d);var w=n.horizontalBarChartdata.x;if(1===e&&r.props.variant===v.AbsoluteScale){if(r.props.hideLabels)return u.createElement("text",{key:e});var M=t.chartData[0].horizontalBarChartdata.x;return u.createElement("text",{key:e,x:"".concat(r._isRTL?100-s[e]:s[e],"%"),y:r._barHeight/2,dominantBaseline:"central",transform:"translate(".concat(r._isRTL?-4:4,")"),className:r._classNames.barLabel,"aria-hidden":!0},zs(M))}var C=p("HBC_Gradient")+"_".concat(i,"_").concat(e);return u.createElement(u.Fragment,{key:e},r.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:C},u.createElement("stop",{offset:"0",stopColor:m}),u.createElement("stop",{offset:"100%",stopColor:b}))),u.createElement("rect",{key:e,x:"".concat(r._isRTL?100-s[e]-f-e*r.state.barSpacingInPercent:s[e]+e*r.state.barSpacingInPercent,"%"),y:0,rx:r.props.roundCorners?3:0,"data-is-focusable":""!==n.legend,width:f+"%",height:r._barHeight,fill:r.props.enableGradient?"url(#".concat(C,")"):m,onMouseOver:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,onFocus:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,role:"img","aria-label":r._getAriaLabel(n),onBlur:r._hoverOff,onMouseLeave:r._hoverOff,className:r._classNames.barWrapper}))}));return y},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n}(u.Component),ad=(0,r.I)(ud,(function(t){var n,i=t.className,e=t.theme,r=t.width,u=t.barHeight,a=t.showTriangle,l=t.variant,s=t.hideLabels,c=e.palette;return{root:[{display:"flex",flexDirection:"column",width:r||"100%"},i],items:{marginBottom:a||l===v.AbsoluteScale?"16px":"10px"},chart:{width:"100%",height:u||12,display:"block",overflow:"visible"},barWrapper:{},chartTitle:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:e.palette.neutralPrimary,marginBottom:l===v.AbsoluteScale?"4px":"5px"},chartTitleRight:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:e.palette.neutralPrimary},chartDataTextDenominator:{fontSize:It.s.medium,color:e.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},triangle:{width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c.blue,marginBottom:"4px",position:"absolute"},barLabel:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{fontWeight:It.BO.semibold,fill:e.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}),chartWrapper:{paddingRight:l!==v.AbsoluteScale||s?0:40}}})),ld={host:"ms-HoverCard-host"},sd=function(){function t(n){this._id=t._uniqueId++,this._parent=n,this._eventRecords=[]}return t.raise=function(n,i,e,r,o){var u,a=null!=o?o:(0,M.Y)();if(t._isElement(n)){if(void 0!==a&&a.createEvent){var l=a.createEvent("HTMLEvents");l.initEvent(i,r||!1,!0),$(l,e),u=n.dispatchEvent(l)}else if(void 0!==a&&a.createEventObject){var s=a.createEventObject(e);n.fireEvent("on"+i,s)}}else for(;n&&!1!==u;){var c=n.__events__,d=c?c[i]:null;if(d)for(var f in d)if(d.hasOwnProperty(f))for(var v=d[f],h=0;!1!==u&&h<v.length;h++){var p=v[h];p.objectCallback&&(u=p.objectCallback.call(p.parent,e))}n=r?n.parent:null}return u},t.isObserved=function(t,n){var i=t&&t.__events__;return!!i&&!!i[n]},t.isDeclared=function(t,n){var i=t&&t.__declaredEvents;return!!i&&!!i[n]},t.stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},t._isElement=function(t){return!!t&&(!!t.addEventListener||"undefined"!=typeof HTMLElement&&t instanceof HTMLElement)},t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.off(),this._parent=null)},t.prototype.onAll=function(t,n,i){for(var e in n)n.hasOwnProperty(e)&&this.on(t,e,n[e],i)},t.prototype.on=function(n,i,e,r){var o=this;if(i.indexOf(",")>-1)for(var u=i.split(/[ ,]+/),a=0;a<u.length;a++)this.on(n,u[a],e,r);else{var l=this._parent,s={target:n,eventName:i,parent:l,callback:e,options:r};if((u=n.__events__=n.__events__||{})[i]=u[i]||{count:0},u[i][this._id]=u[i][this._id]||[],u[i][this._id].push(s),u[i].count++,t._isElement(n)){var c=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed){var i;try{if(!1===(i=e.apply(l,t))&&t[0]){var r=t[0];r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.cancelBubble=!0}}catch(r){}return i}};s.elementCallback=c,n.addEventListener?n.addEventListener(i,c,r):n.attachEvent&&n.attachEvent("on"+i,c)}else s.objectCallback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed)return e.apply(l,t)};this._eventRecords.push(s)}},t.prototype.off=function(t,n,i,e){for(var r=0;r<this._eventRecords.length;r++){var o=this._eventRecords[r];if(!(t&&t!==o.target||n&&n!==o.eventName||i&&i!==o.callback||"boolean"==typeof e&&e!==o.options)){var u=o.target.__events__,a=u[o.eventName],l=a?a[this._id]:null;l&&(1!==l.length&&i?(a.count--,l.splice(l.indexOf(o),1)):(a.count-=l.length,delete u[o.eventName][this._id]),a.count||delete u[o.eventName]),o.elementCallback&&(o.target.removeEventListener?o.target.removeEventListener(o.eventName,o.elementCallback,o.options):o.target.detachEvent&&o.target.detachEvent("on"+o.eventName,o.elementCallback)),this._eventRecords.splice(r--,1)}}},t.prototype.raise=function(n,i,e){return t.raise(this._parent,n,i,e)},t.prototype.declare=function(t){var n=this._parent.__declaredEvents=this._parent.__declaredEvents||{};if("string"==typeof t)n[t]=!0;else for(var i=0;i<t.length;i++)n[t[i]]=!0},t._uniqueId=0,t}();!function(t){t[t.hover=0]="hover",t[t.hotKey=1]="hotKey"}(Jc||(Jc={})),function(t){t.plain="PlainCard",t.expanding="ExpandingCard"}(Qc||(Qc={}));var cd,dd={root:"ms-ExpandingCard-root",compactCard:"ms-ExpandingCard-compactCard",expandedCard:"ms-ExpandingCard-expandedCard",expandedCardScroll:"ms-ExpandingCard-expandedCardScrollRegion"};!function(t){t[t.compact=0]="compact",t[t.expanded=1]="expanded"}(cd||(cd={}));var fd=function(t){for(var n=t.activeElement;null==n?void 0:n.shadowRoot;)n=n.shadowRoot.activeElement;return n},vd=function(t){var n=t.target;return n&&n.shadowRoot&&(n=t.composedPath()[0]),n};function hd(t,n){var i=u.useRef(n);return i.current||(i.current=p(t)),i.current}function pd(t){var n=u.useRef((function(){throw new Error("Cannot call an event handler while rendering")}));return Nn((function(){n.current=t}),[t]),Wt((function(){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return n.current.apply(void 0,t)}}))}var gd={disabled:!1,disableFirstFocus:!1,forceFocusInsideTrap:!0,isClickableOutsideFocusTrap:!1,"data-tabster":'{"uncontrolled": {"completely": true}}'},yd=u.forwardRef((function(t,n){var i,e,r,a=u.useRef(null),l=u.useRef(null),s=u.useRef(null),c=Et(a,n),d=Pt(),f=zt(),v=!!u.useContext(Tc),h=null===(i=Bn(!1))||void 0===i||i,p=F(gd,t),g=Wt({hasFocus:!1,focusStackId:hd("ftz-",p.id)}),y=p.children,m=p.componentRef,b=p.disabled,x=p.disableFirstFocus,M=p.forceFocusInsideTrap,C=p.focusPreviouslyFocusedInnerElement,S=p.firstFocusableSelector,L=p.firstFocusableTarget,D=p.disableRestoreFocus,V=void 0===D?p.ignoreExternalFocusing:D,N=p.isClickableOutsideFocusTrap,O=p.enableAriaHiddenSiblings,B={"aria-hidden":!0,style:{pointerEvents:"none",position:"fixed"},tabIndex:b?-1:0,"data-is-visible":!0,"data-is-focus-trap-zone-bumper":!0},P=u.useCallback((function(t){t!==l.current&&t!==s.current&&T(t)}),[]),_=pd((function(){if(a.current){var t=g.previouslyFocusedElementInTrapZone;if(C&&t&&w(a.current,t))P(t);else{var n=null;if("string"==typeof L)n=a.current.querySelector(L);else if(L)n=L(a.current);else if(S){var i="string"==typeof S?S:S();n=a.current.querySelector("."+i)}n||(n=A(a.current,a.current.firstChild,!1,!1,!1,!0,void 0,void 0,void 0,v)),n&&P(n)}}})),H=function(t){if(!b&&a.current){var n,i=t===g.hasFocus?(void 0===(n=!1)&&(n=!0),k(a.current,s.current,n,!1,!0,!0,!1,!0,v)):function(t,n,i,e,r){return void 0===e&&(e=!0),A(t,n,e,!1,!1,!0,!1,!0,void 0,r)}(a.current,l.current,0,!1,v);i&&(i===l.current||i===s.current?_():i.focus())}},I=pd((function(t){if(yd.focusStack=yd.focusStack.filter((function(t){return g.focusStackId!==t})),d){var n=d.activeElement;V||"function"!=typeof(null==t?void 0:t.focus)||!w(a.current,n)&&n!==d.body&&!n.shadowRoot||P(t)}})),W=pd((function(t){if(!b&&g.focusStackId===yd.focusStack.slice(-1)[0]){var n=vd(t);n&&!w(a.current,n)&&(d&&fd(d)===d.body?setTimeout((function(){d&&fd(d)===d.body&&(_(),g.hasFocus=!0)}),0):(_(),g.hasFocus=!0),t.preventDefault(),t.stopPropagation())}}));return u.useEffect((function(){var t=[];return M&&t.push(E(f,"focus",W,!0)),N||t.push(E(f,"click",W,!0)),function(){t.forEach((function(t){return t()}))}}),[M,N,f]),u.useEffect((function(){if(!b&&(h||M)&&a.current){yd.focusStack.push(g.focusStackId);var t=p.elementToFocusOnDismiss||fd(d);return x||w(a.current,t)||_(),function(){return I(t)}}}),[M,b]),u.useEffect((function(){if(!b&&O)return Dt(a.current)}),[b,O,a]),e=function(){delete g.previouslyFocusedElementInTrapZone},(r=u.useRef(e)).current=e,u.useEffect((function(){return function(){var t;null===(t=r.current)||void 0===t||t.call(r)}}),[]),function(t,n,i){u.useImperativeHandle(t,(function(){return{get previouslyFocusedElement(){return n},focus:i}}),[i,n])}(m,g.previouslyFocusedElementInTrapZone,_),u.createElement("div",(0,o.Cl)({"aria-labelledby":p.ariaLabelledBy},z(p,R),{ref:c,onFocusCapture:function(t){var n;null===(n=p.onFocusCapture)||void 0===n||n.call(p,t),t.target===l.current?H(!0):t.target===s.current&&H(!1),g.hasFocus=!0,t.target!==t.currentTarget&&t.target!==l.current&&t.target!==s.current&&(g.previouslyFocusedElementInTrapZone=vd(t.nativeEvent))},onBlurCapture:function(t){var n;null===(n=p.onBlurCapture)||void 0===n||n.call(p,t);var i=t.relatedTarget;null===t.relatedTarget&&(i=fd(d)),w(a.current,i)||(g.hasFocus=!1)}}),u.createElement("div",(0,o.Cl)({},B,{ref:l})),y,u.createElement("div",(0,o.Cl)({},B,{ref:s})))}));yd.displayName="FocusTrapZone",yd.focusStack=[];var md,bd=function(t){return u.createElement($n,(0,o.Cl)({},t),u.createElement(yd,(0,o.Cl)({disabled:t.hidden},t.focusTrapProps),t.children))},xd=function(t){var n=t.gapSpace,i=void 0===n?0:n,e=t.directionalHint,r=void 0===e?4:e,a=t.directionalHintFixed,l=t.targetElement,s=t.firstFocus,c=t.trapFocus,d=t.onLeave,f=t.className,v=t.finalHeight,h=t.content,p=t.calloutProps,g=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},z(t,R)),{className:f,target:l,isBeakVisible:!1,directionalHint:r,directionalHintFixed:a,finalHeight:v,minPagePadding:24,onDismiss:d,gapSpace:i}),p);return u.createElement(u.Fragment,null,c?u.createElement(bd,(0,o.Cl)({},g,{focusTrapProps:{forceFocusInsideTrap:!1,isClickableOutsideFocusTrap:!0,disableFirstFocus:!s}}),h):u.createElement($n,(0,o.Cl)({},g),h))},wd=(0,a.Z)(),Md=function(t){function n(n){var i=t.call(this,n)||this;return i._expandedElem=u.createRef(),i._onKeyDown=function(t){t.which===Vt&&i.props.onLeave&&i.props.onLeave(t)},i._onRenderCompactCard=function(){return u.createElement("div",{className:i._classNames.compactCard},i.props.onRenderCompactCard(i.props.renderData))},i._onRenderExpandedCard=function(){return!i.state.firstFrameRendered&&i._async.requestAnimationFrame((function(){i.setState({firstFrameRendered:!0})})),u.createElement("div",{className:i._classNames.expandedCard,ref:i._expandedElem},u.createElement("div",{className:i._classNames.expandedCardScroll},i.props.onRenderExpandedCard&&i.props.onRenderExpandedCard(i.props.renderData)))},i._checkNeedsScroll=function(){var t=i.props.expandedCardHeight;i._async.requestAnimationFrame((function(){i._expandedElem.current&&i._expandedElem.current.scrollHeight>=t&&i.setState({needsScroll:!0})}))},i._async=new Nt(i),Ac(i),i.state={firstFrameRendered:!1,needsScroll:!1},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._checkNeedsScroll()},n.prototype.componentWillUnmount=function(){this._async.dispose()},n.prototype.render=function(){var t=this.props,n=t.styles,i=t.compactCardHeight,e=t.expandedCardHeight,r=t.theme,a=t.mode,l=t.className,s=this.state,c=s.needsScroll,d=s.firstFrameRendered,f=i+e;this._classNames=wd(n,{theme:r,compactCardHeight:i,className:l,expandedCardHeight:e,needsScroll:c,expandedCardFirstFrameRendered:a===cd.expanded&&d});var v=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this._onRenderCompactCard(),this._onRenderExpandedCard());return u.createElement(xd,(0,o.Cl)({},this.props,{content:v,finalHeight:f,className:this._classNames.root}))},n.defaultProps={compactCardHeight:156,expandedCardHeight:384,directionalHintFixed:!0},n}(u.Component),Cd=(0,r.I)(Md,(function(t){var n,i=t.theme,e=t.needsScroll,r=t.expandedCardFirstFrameRendered,o=t.compactCardHeight,u=t.expandedCardHeight,a=t.className,l=i.palette,s=(0,It.Km)(dd,i);return{root:[s.root,{width:320,pointerEvents:"none",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},a],compactCard:[s.compactCard,{pointerEvents:"auto",position:"relative",height:o}],expandedCard:[s.expandedCard,{height:1,overflowY:"hidden",pointerEvents:"auto",transition:"height 0.467s cubic-bezier(0.5, 0, 0, 1)",selectors:{":before":{content:'""',position:"relative",display:"block",top:0,left:24,width:272,height:1,backgroundColor:l.neutralLighter}}},r&&{height:u}],expandedCardScroll:[s.expandedCardScroll,e&&{height:"100%",boxSizing:"border-box",overflowY:"auto"}]}}),void 0,{scope:"ExpandingCard"}),kd={root:"ms-PlainCard-root"},Ad=(0,a.Z)(),Sd=function(t){function n(n){var i=t.call(this,n)||this;return i._onKeyDown=function(t){t.which===Vt&&i.props.onLeave&&i.props.onLeave(t)},Ac(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.styles,i=t.theme,e=t.className;this._classNames=Ad(n,{theme:i,className:e});var r=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this.props.onRenderPlainCard(this.props.renderData));return u.createElement(xd,(0,o.Cl)({},this.props,{content:r,className:this._classNames.root}))},n}(u.Component),Ld=(0,r.I)(Sd,(function(t){var n,i=t.theme,e=t.className;return{root:[(0,It.Km)(kd,i).root,{pointerEvents:"auto",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},e]}}),void 0,{scope:"PlainCard"}),Dd=(0,a.Z)(),Vd=function(t){function n(n){var i=t.call(this,n)||this;return i._hoverCard=u.createRef(),i.dismiss=function(t){i._async.clearTimeout(i._openTimerId),i._async.clearTimeout(i._dismissTimerId),t?i._dismissTimerId=i._async.setTimeout((function(){i._setDismissedState()}),i.props.cardDismissDelay):i._setDismissedState()},i._cardOpen=function(t){i._shouldBlockHoverCard()||"keydown"===t.type&&t.which!==i.props.openHotKey||(i._async.clearTimeout(i._dismissTimerId),"mouseenter"===t.type&&(i._currentMouseTarget=t.currentTarget),i._executeCardOpen(t))},i._executeCardOpen=function(t){i._async.clearTimeout(i._openTimerId),i._openTimerId=i._async.setTimeout((function(){i.setState((function(n){return n.isHoverCardVisible?n:{isHoverCardVisible:!0,mode:cd.compact,openMode:"keydown"===t.type?Jc.hotKey:Jc.hover}}))}),i.props.cardOpenDelay)},i._cardDismiss=function(t,n){if(t){if(!(n instanceof MouseEvent))return;if("keydown"===n.type&&n.which!==Vt)return;i.props.sticky||i._currentMouseTarget!==n.currentTarget&&n.which!==Vt||i.dismiss(!0)}else{if(i.props.sticky&&!(n instanceof MouseEvent)&&n.nativeEvent instanceof MouseEvent&&"mouseleave"===n.type)return;i.dismiss(!0)}},i._setDismissedState=function(){i.setState({isHoverCardVisible:!1,mode:cd.compact,openMode:Jc.hover})},i._instantOpenAsExpanded=function(t){i._async.clearTimeout(i._dismissTimerId),i.setState((function(t){return t.isHoverCardVisible?t:{isHoverCardVisible:!0,mode:cd.expanded}}))},i._setEventListeners=function(){var t=i.props,n=t.trapFocus,e=t.instantOpenOnClick,r=t.eventListenerTarget,o=r?i._getTargetElement(r):i._getTargetElement(i.props.target),u=i._nativeDismissEvent;o&&(i._events.on(o,"mouseenter",i._cardOpen),i._events.on(o,"mouseleave",u),n?i._events.on(o,"keydown",i._cardOpen):(i._events.on(o,"focus",i._cardOpen),i._events.on(o,"blur",u)),e?i._events.on(o,"click",i._instantOpenAsExpanded):(i._events.on(o,"mousedown",u),i._events.on(o,"keydown",u)))},Ac(i),i._async=new Nt(i),i._events=new sd(i),i._nativeDismissEvent=i._cardDismiss.bind(i,!0),i._childDismissEvent=i._cardDismiss.bind(i,!1),i.state={isHoverCardVisible:!1,mode:cd.compact,openMode:Jc.hover},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._setEventListeners()},n.prototype.componentWillUnmount=function(){this._async.dispose(),this._events.dispose()},n.prototype.componentDidUpdate=function(t,n){var i=this;t.target!==this.props.target&&(this._events.off(),this._setEventListeners()),n.isHoverCardVisible!==this.state.isHoverCardVisible&&(this.state.isHoverCardVisible?(this._async.setTimeout((function(){i.setState({mode:cd.expanded},(function(){i.props.onCardExpand&&i.props.onCardExpand()}))}),this.props.expandedCardOpenDelay),this.props.onCardVisible&&this.props.onCardVisible()):(this.setState({mode:cd.compact}),this.props.onCardHide&&this.props.onCardHide()))},n.prototype.render=function(){var t=this.props,n=t.expandingCardProps,i=t.children,e=t.id,r=t.setAriaDescribedBy,a=void 0===r||r,l=t.styles,s=t.theme,c=t.className,d=t.type,f=t.plainCardProps,v=t.trapFocus,h=t.setInitialFocus,g=this.state,y=g.isHoverCardVisible,m=g.mode,b=g.openMode,x=e||p("hoverCard");this._classNames=Dd(l,{theme:s,className:c});var w=(0,o.Cl)((0,o.Cl)({},z(this.props,R)),{id:x,trapFocus:!!v,firstFocus:h||b===Jc.hotKey,targetElement:this._getTargetElement(this.props.target),onEnter:this._cardOpen,onLeave:this._childDismissEvent}),M=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),w),{mode:m}),C=(0,o.Cl)((0,o.Cl)({},f),w);return u.createElement("div",{className:this._classNames.host,ref:this._hoverCard,"aria-describedby":a&&y?x:void 0,"data-is-focusable":!this.props.target},i,y&&(d===Qc.expanding?u.createElement(Cd,(0,o.Cl)({},M)):u.createElement(Ld,(0,o.Cl)({},C))))},n.prototype._getTargetElement=function(t){switch(typeof t){case"string":return(0,M.Y)().querySelector(t);case"object":return t;default:return this._hoverCard.current||void 0}},n.prototype._shouldBlockHoverCard=function(){return!(!this.props.shouldBlockHoverCard||!this.props.shouldBlockHoverCard())},n.defaultProps={cardOpenDelay:500,cardDismissDelay:100,expandedCardOpenDelay:1500,instantOpenOnClick:!1,setInitialFocus:!1,openHotKey:67,type:Qc.expanding},n}(u.Component),Nd=(0,r.I)(Vd,(function(t){var n=t.className,i=t.theme;return{host:[(0,It.Km)(ld,i).host,n]}}),void 0,{scope:"HoverCard"});!function(t){t[t.horizontal=0]="horizontal",t[t.vertical=1]="vertical"}(md||(md={}));var Od=function(t){var n;void 0===t&&(n={},t={getCachedMeasurement:function(t){if(t&&t.cacheKey&&n.hasOwnProperty(t.cacheKey))return n[t.cacheKey]},addMeasurementToCache:function(t,i){t.cacheKey&&(n[t.cacheKey]=i)}});var i,e=t;function r(t,n){var i=e.getCachedMeasurement(t);if(void 0!==i)return i;var r=n();return e.addMeasurementToCache(t,r),r}function u(t,n,o){for(var u=t,a=r(t,o);a>i;){var l=n(u);if(void 0===l)return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(a=e.getCachedMeasurement(l)))return{dataToMeasure:l,resizeDirection:"shrink"};u=l}return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0}}return{getNextState:function(t,n,a,l){if(void 0!==l||void 0!==n.dataToMeasure){if(l){if(i&&n.renderedData&&!n.dataToMeasure)return(0,o.Cl)((0,o.Cl)({},n),function(t,n,e,r){var u;return u=t>i?r?{resizeDirection:"grow",dataToMeasure:r(e)}:{resizeDirection:"shrink",dataToMeasure:n}:{resizeDirection:"shrink",dataToMeasure:e},i=t,(0,o.Cl)((0,o.Cl)({},u),{measureContainer:!1})}(l,t.data,n.renderedData,t.onGrowData));i=l}var s=(0,o.Cl)((0,o.Cl)({},n),{measureContainer:!1});return n.dataToMeasure&&(s="grow"===n.resizeDirection&&t.onGrowData?(0,o.Cl)((0,o.Cl)({},s),function(t,n,a,l){for(var s=t,c=r(t,a);c<i;){var d=n(s);if(void 0===d)return{renderedData:s,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(c=e.getCachedMeasurement(d)))return{dataToMeasure:d};s=d}return(0,o.Cl)({resizeDirection:"shrink"},u(s,l,a))}(n.dataToMeasure,t.onGrowData,a,t.onReduceData)):(0,o.Cl)((0,o.Cl)({},s),u(n.dataToMeasure,t.onReduceData,a))),s}},shouldRenderDataForMeasurement:function(t){return!(!t||void 0!==e.getCachedMeasurement(t))},getInitialResizeGroupState:function(t){return{dataToMeasure:(0,o.Cl)({},t),resizeDirection:"grow",measureContainer:!0}}}},Td=u.createContext({isMeasured:!1}),Ed={position:"fixed",visibility:"hidden"},Fd={position:"relative"};function Bd(t,n){var i;switch(n.type){case"resizeData":return(0,o.Cl)({},n.value);case"dataToMeasure":return(0,o.Cl)((0,o.Cl)({},t),{dataToMeasure:n.value,resizeDirection:"grow",measureContainer:!0});default:return(0,o.Cl)((0,o.Cl)({},t),((i={})[n.type]=n.value,i))}}var Pd={isMeasured:!0},_d=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n),r=function(t,n){var i=Wt(Od),e=u.useRef(null),r=u.useRef(null),a=u.useRef(!1),l=Ot(),s=function(t,n,i){var e=Wt((function(){return n.getInitialResizeGroupState(t.data)})),r=u.useReducer(Bd,e),a=r[0],l=r[1];u.useEffect((function(){l({type:"dataToMeasure",value:t.data})}),[t.data]);var s=u.useRef(e);return s.current=(0,o.Cl)({},a),[s,u.useCallback((function(t){t&&l({type:"resizeData",value:t})}),[]),u.useCallback((function(){i.current&&l({type:"measureContainer",value:!0})}),[i])]}(t,i,n),c=s[0],d=s[1],f=s[2];u.useEffect((function(){var n;c.current.renderedData&&(a.current=!0,null===(n=t.dataDidRender)||void 0===n||n.call(t,c.current.renderedData))})),u.useEffect((function(){l.requestAnimationFrame((function(){var o=void 0;if(c.current.measureContainer&&n.current){var u=n.current.getBoundingClientRect();o=t.direction===md.vertical?u.height:u.width}var l=i.getNextState(t,c.current,(function(){var n=a.current?r:e;if(!n.current)return 0;var i=n.current.getBoundingClientRect();return t.direction===md.vertical?i.height:i.width}),o);d(l)}),n.current)})),Tt(Bt(),"resize",l.debounce(f,16,{leading:!0}));var v=i.shouldRenderDataForMeasurement(c.current.dataToMeasure),h=!a.current&&v;return[c.current.dataToMeasure,c.current.renderedData,f,e,r,v,h]}(t,i),a=r[0],l=r[1],s=r[2],c=r[3],d=r[4],f=r[5],v=r[6];u.useImperativeHandle(t.componentRef,(function(){return{remeasure:s}}),[s]),function(t){_n({name:"ResizeGroup",props:t,deprecations:{styles:"className"}})}(t);var h=t.className,p=t.onRenderData,g=z(t,R,["data"]);return u.createElement("div",(0,o.Cl)({},g,{className:h,ref:e}),u.createElement("div",{style:Fd},f&&!v&&u.createElement("div",{style:Ed,ref:d},u.createElement(Td.Provider,{value:Pd},p(a))),u.createElement("div",{ref:c,style:v?Ed:void 0,"data-automation-id":"visibleContent"},v?p(a):l&&p(l))))}));_d.displayName="ResizeGroupBase";var Hd,Id=_d;!function(t){t.KEYTIP_ADDED="keytipAdded",t.KEYTIP_REMOVED="keytipRemoved",t.KEYTIP_UPDATED="keytipUpdated",t.PERSISTED_KEYTIP_ADDED="persistedKeytipAdded",t.PERSISTED_KEYTIP_REMOVED="persistedKeytipRemoved",t.PERSISTED_KEYTIP_EXECUTE="persistedKeytipExecute",t.ENTER_KEYTIP_MODE="enterKeytipMode",t.EXIT_KEYTIP_MODE="exitKeytipMode"}(Hd||(Hd={}));var Wd=function(){function t(){this.keytips={},this.persistedKeytips={},this.sequenceMapping={},this.inKeytipMode=!1,this.shouldEnterKeytipMode=!0,this.delayUpdatingKeytipChange=!1}return t.getInstance=function(){return this._instance},t.prototype.init=function(t){this.delayUpdatingKeytipChange=t},t.prototype.register=function(t,n){void 0===n&&(n=!1);var i=t;n||(i=this.addParentOverflow(t),this.sequenceMapping[i.keySequences.toString()]=i);var e=this._getUniqueKtp(i);if(n?this.persistedKeytips[e.uniqueID]=e:this.keytips[e.uniqueID]=e,this.inKeytipMode||!this.delayUpdatingKeytipChange){var r=n?Hd.PERSISTED_KEYTIP_ADDED:Hd.KEYTIP_ADDED;sd.raise(this,r,{keytip:i,uniqueID:e.uniqueID})}return e.uniqueID},t.prototype.update=function(t,n){var i=this.addParentOverflow(t),e=this._getUniqueKtp(i,n),r=this.keytips[n];r&&(e.keytip.visible=r.keytip.visible,this.keytips[n]=e,delete this.sequenceMapping[r.keytip.keySequences.toString()],this.sequenceMapping[e.keytip.keySequences.toString()]=e.keytip,!this.inKeytipMode&&this.delayUpdatingKeytipChange||sd.raise(this,Hd.KEYTIP_UPDATED,{keytip:e.keytip,uniqueID:e.uniqueID}))},t.prototype.unregister=function(t,n,i){void 0===i&&(i=!1),i?delete this.persistedKeytips[n]:delete this.keytips[n],!i&&delete this.sequenceMapping[t.keySequences.toString()];var e=i?Hd.PERSISTED_KEYTIP_REMOVED:Hd.KEYTIP_REMOVED;!this.inKeytipMode&&this.delayUpdatingKeytipChange||sd.raise(this,e,{keytip:t,uniqueID:n})},t.prototype.enterKeytipMode=function(){sd.raise(this,Hd.ENTER_KEYTIP_MODE)},t.prototype.exitKeytipMode=function(){sd.raise(this,Hd.EXIT_KEYTIP_MODE)},t.prototype.getKeytips=function(){var t=this;return Object.keys(this.keytips).map((function(n){return t.keytips[n].keytip}))},t.prototype.addParentOverflow=function(t){var n=(0,o.fX)([],t.keySequences,!0);if(n.pop(),0!==n.length){var i=this.sequenceMapping[n.toString()];if(i&&i.overflowSetSequence)return(0,o.Cl)((0,o.Cl)({},t),{overflowSetSequence:i.overflowSetSequence})}return t},t.prototype.menuExecute=function(t,n){sd.raise(this,Hd.PERSISTED_KEYTIP_EXECUTE,{overflowButtonSequences:t,keytipSequences:n})},t.prototype._getUniqueKtp=function(t,n){return void 0===n&&(n=p()),{keytip:(0,o.Cl)({},t),uniqueID:n}},t._instance=new t,t}(),Rd=function(t,n,i){for(var e=0,r=t;e<r.length;e++){var o=r[e];i[n.register(o,!0)]=o}},zd=function(t,n){for(var i=0,e=Object.keys(n);i<e.length;i++){var r=e[i];t.unregister(n[r],r,!0),delete n[r]}},jd=function(t){var n=Wd.getInstance(),i=t.className,e=t.overflowItems,r=t.keytipSequences,a=t.itemSubMenuProvider,l=t.onRenderOverflowButton,s=Wt({}),c=u.useCallback((function(t){return a?a(t):t.subMenuProps?t.subMenuProps.items:void 0}),[a]),d=u.useMemo((function(){var t=[],i=[];return r?null==e||e.forEach((function(e){var u,a=e.keytipProps;if(a){var l={content:a.content,keySequences:a.keySequences,disabled:a.disabled||!(!e.disabled&&!e.isDisabled),hasDynamicChildren:a.hasDynamicChildren,hasMenu:a.hasMenu};a.hasDynamicChildren||c(e)?(l.onExecute=n.menuExecute.bind(n,r,null===(u=null==e?void 0:e.keytipProps)||void 0===u?void 0:u.keySequences),l.hasOverflowSubMenu=!0):l.onExecute=a.onExecute,t.push(l);var s=(0,o.Cl)((0,o.Cl)({},e),{keytipProps:(0,o.Cl)((0,o.Cl)({},a),{overflowSetSequence:r})});null==i||i.push(s)}else null==i||i.push(e)})):i=e,{modifiedOverflowItems:i,keytipsToRegister:t}}),[e,c,n,r]),f=d.modifiedOverflowItems;return function(t,n,i){var e=Bn(t);u.useEffect((function(){e&&(zd(i,e),Rd(n,i,t))})),u.useEffect((function(){return Rd(n,i,t),function(){zd(i,t)}}),[])}(s,d.keytipsToRegister,n),u.createElement("div",{className:i},l(f))},$d=(0,a.Z)(),Yd=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n);!function(t,n){var i=function(){var t;return null!==(t=Pt())&&void 0!==t?t:"undefined"!=typeof document?document:void 0}();u.useImperativeHandle(t.componentRef,(function(){return{focus:function(t,i){var e=!1;return n.current&&(e=C(n.current,i)),e},focusElement:function(t){var e=!1;return!!t&&(n.current&&w(n.current,t)&&(t.focus(),e=(null==i?void 0:i.activeElement)===t),e)}}}),[n,i])}(t,i);var r=t.items,a=t.overflowItems,l=t.className,s=t.styles,c=t.vertical,d=t.role,f=t.overflowSide,v=void 0===f?"end":f,h=t.onRenderItem,p=$d(s,{className:l,vertical:c}),g=!!a&&a.length>0;return u.createElement("div",(0,o.Cl)({},z(t,R),{role:d||"group","aria-orientation":"menubar"===d?!0===c?"vertical":"horizontal":void 0,className:p.root,ref:e}),"start"===v&&g&&u.createElement(jd,(0,o.Cl)({},t,{className:p.overflowButton})),r&&r.map((function(t,n){return u.createElement("div",{className:p.item,key:t.key,role:"none"},h(t))})),"end"===v&&g&&u.createElement(jd,(0,o.Cl)({},t,{className:p.overflowButton})))}));Yd.displayName="OverflowSet";var Xd,Gd={flexShrink:0,display:"inherit"},Ud=(0,r.I)(Yd,(function(t){var n=t.className;return{root:["ms-OverflowSet",{position:"relative",display:"flex",flexWrap:"nowrap"},t.vertical&&{flexDirection:"column"},n],item:["ms-OverflowSet-item",Gd],overflowButton:["ms-OverflowSet-overflowButton",Gd]}}),void 0,{scope:"OverflowSet"}),qd=((Xd={})["".concat(_s[_s.circle])]="M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6",Xd["".concat(_s[_s.square])]="M1 1 L12 1 L12 12 L1 12 L1 1 Z",Xd["".concat(_s[_s.triangle])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Xd["".concat(_s[_s.pyramid])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Xd["".concat(_s[_s.diamond])]="M2 2 L10 2 L10 10 L2 10 L2 2 Z",Xd["".concat(_s[_s.hexagon])]="M9 0H3L0 5L3 10H9L12 5L9 0Z",Xd["".concat(_s[_s.pentagon])]="M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z",Xd["".concat(_s[_s.octagon])]="M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z",Xd["".concat(Hs[Hs.dottedLine])]="M0 6 H3 M5 6 H8 M10 6 H13",Xd),Zd=function(t){var n=t.svgProps,i=t.pathProps,e=t.shape,r=t.classNameForNonSvg;return-1===Object.keys(qd).indexOf(e)?u.createElement("div",{className:r}):u.createElement("svg",(0,o.Cl)({width:14,height:14,viewBox:"-1 -1 14 14"},Xs(n),{transform:"rotate(".concat(e===_s[_s.diamond]?45:e===_s[_s.pyramid]?180:0,", 0, 0)")}),u.createElement("path",(0,o.Cl)({d:qd[e]},Xs(i))))};function Kd(t){return sl(Ka(t).call(document.documentElement))}function Jd(t,n){return(0,o.sH)(this,arguments,void 0,(function(t,n,i,e){var r,u,a,l,s;return void 0===i&&(i=!1),void 0===e&&(e={}),(0,o.YH)(this,(function(c){switch(c.label){case 0:if(0===t.length&&!n)throw new Error("No charts or legends to export");return[4,Promise.all(t.map((function(t){return new Promise((function(n){var e=function(t,n){if(!t)throw new Error("Chart container is not defined");var i=t.querySelector("svg");if(!i)throw new Error("SVG not found");for(var e=sl(i.cloneNode(!0)).attr("width",null).attr("height",null).attr("viewBox",null),r=i.getElementsByTagName("*"),u=e.node().getElementsByTagName("*"),a=["text"],l=["table","thead","tbody","tr","th","td"],s=0;s<r.length;s++){var c=r[s].tagName.toLowerCase();a.includes(c)||l.includes(c)?Zs((0,o.fX)((0,o.fX)([],Qd,!0),tf,!0),r[s],u[s]):Zs(Qd,r[s],u[s])}r=null,u=null;var d=i.querySelectorAll("foreignObject"),f=e.node().querySelectorAll("foreignObject");d.forEach((function(t,n){var i=f[n];if(i){var e=t.firstElementChild,r=i.firstElementChild;e&&r&&Zs(nf,e,r);var o=t.querySelectorAll("*"),u=i.querySelectorAll("*");o.forEach((function(t,n){var i=u[n];i&&Zs(nf,t,i)}))}}));var v=t.querySelector('[data-chart-annotation-svg="true"]'),h=null;if(v){h=v.cloneNode(!0),Zs(Qd,v,h);var p=v.getElementsByTagName("*"),g=h.getElementsByTagName("*");for(s=0;s<p.length;s++){var y=p[s],m=g[s],b=(c=y.tagName.toLowerCase(),y instanceof SVGElement),x=y instanceof HTMLElement;b&&Zs("text"===c?(0,o.fX)((0,o.fX)([],Qd,!0),tf,!0):Qd,y,m),x&&Zs(nf,y,m),"foreignobject"===c&&Zs(ef,y,m)}}var w=i.getBoundingClientRect(),M=w.width,C=w.height;e.attr("width",M).attr("height",C).attr("viewBox","0 0 ".concat(M," ").concat(C)).attr("direction",n?"rtl":"ltr"),h&&(e.selectAll('[data-chart-annotation-layer="true"]').remove(),sl(h).attr("x",0).attr("y",0).attr("width",M).attr("height",C),e.append((function(){return h})));var k={node:e.node(),width:M,height:C};return e=null,k}(t.container,i);n({dataUrl:uf(e.node),width:e.width,height:e.height})}))})))];case 1:return r=c.sent(),u=[],t.forEach((function(t,n){var i=t.row||0,e=t.col||0;u[i]||(u[i]=[]),u[i][e]=r[n]})),n&&(a=0,u.forEach((function(t){var n=0;t.forEach((function(t){n+=t.width})),a=Math.max(a,n)})),(l=n(a,i)).node&&(s=uf(l.node),u.push([{dataUrl:s,width:l.width,height:l.height}]))),[2,of(u,e)]}}))}))}var Qd=["display","fill","fill-opacity","opacity","stroke","stroke-width","transform","border-collapse"],tf=["font-family","font-size","font-weight","text-anchor","background-color","color","padding","text-align","border"],nf=["align-items","background","background-color","border","border-radius","box-shadow","box-sizing","color","column-gap","display","flex","flex-direction","font-family","font-size","font-style","font-weight","gap","height","justify-content","letter-spacing","line-height","margin","max-height","max-width","min-height","min-width","opacity","overflow","padding","pointer-events","position","row-gap","text-align","text-decoration","text-transform","top","right","bottom","left","visibility","white-space","width","z-index"],ef=["overflow","pointer-events"],rf={color:"fill","font-family":"font-family","font-size":"font-size","font-weight":"font-weight"};function of(t){return(0,o.sH)(this,arguments,void 0,(function(t,n){var i,e,r,u,a,l,s,c,d,f;return void 0===n&&(n={}),(0,o.YH)(this,(function(v){switch(v.label){case 0:if(i=0,e=0,r=t.map((function(t){var n=0,r=0,u=t.map((function(t){var i=(0,o.Cl)((0,o.Cl)({},t),{x:n,y:e});return n+=t.width,r=Math.max(r,t.height),i}));return i=Math.max(i,n),e+=r,u})).flat(),u=n.scale||1,a=n.width||i,l=n.height||e,i*=s=u*a/i,e*=c=u*l/e,(d=document.createElement("canvas")).width=i,d.height=e,!(f=d.getContext("2d")))throw new Error("Canvas context is null");return f.fillStyle=n.background||"transparent",f.fillRect(0,0,i,e),[4,Promise.all(r.map((function(t){return new Promise((function(n,i){var e=new Image;e.onload=function(){f.drawImage(e,s*t.x,c*t.y,s*t.width,c*t.height),n()},e.onerror=i,e.src=t.dataUrl}))})))];case 1:return v.sent(),[2,d.toDataURL("image/png")]}}))}))}function uf(t){if(!t)throw new Error("SVG node is null");var n=(new XMLSerializer).serializeToString(t);return"data:image/svg+xml;base64,"+btoa(function(t){for(var n,i,e="",r=t.length,o=0;o<r;){if("%"===(n=t.charAt(o++)))if("u"===t.charAt(o)){if(i=t.slice(o+1,o+5),lf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=5;continue}}else if(i=t.slice(o,o+2),af.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=2;continue}e+=n}return e}(encodeURIComponent(n)))}var af=/^[\da-f]{2}$/i,lf=/^[\da-f]{4}$/i,sf=(0,a.Z)(),cf=function(t){function n(n){var i,e,r,a,l=t.call(this,n)||this;l._isLegendSelected=!1,l.toSVG=function(t,n){return void 0===n&&(n=!1),function(t,n,i,e){if(0===t.length)return{node:null,width:0,height:0};for(var r=i.selectedLegends,u=i.centerLegends,a=i.textClassName,l=i.isRTL,s=Kd("svg:g"),c=u?0:12,d=8,f=[],v=[],h=[],p=0===Object.keys(r).length,g=function(i){var o,g,y,m,b=(o=t[i].title,g=a,y=e,(m=document.getElementById(Js))||((m=document.createElement("span")).setAttribute("id",Js),m.setAttribute("aria-hidden","true"),y?y.appendChild(m):document.body.appendChild(m)),m.setAttribute("class",g),Object.assign(m.style,Ks),m.textContent="".concat(o),m),x=29+b.getBoundingClientRect().width+8,w=s.append("g");f.push({elem:w,width:x}),c+x>n&&f.length>1&&(f.pop(),v.push(f),h.push(c),f=[{elem:w,width:x}],c=u?0:12,d+=32);var M=r[t[i].title]||p;w.append("rect").attr("x",c+(l?x-8-13:8)).attr("y",d+8).attr("width",13).attr("height",13).style("fill",M?t[i].color:"transparent").style("stroke-width",1).style("stroke",t[i].color),w.append("text").attr("x",c+(l?x-29:29)).attr("y",d+8).attr("dominant-baseline","hanging").style("opacity",M?1:.67).text(t[i].title).call((function(t){return Zs(rf,b,t.node())})),c+=x},y=0;y<t.length;y++)g(y);if(v.push(f),h.push(c),d+=32,u)v.forEach((function(t,i){var e=Math.max((n-h[i])/2,0),r=h[i],o=0;t.forEach((function(t){var n=e+(l?r-t.width-o:0);t.elem.attr("transform","translate(".concat(n,", 0)")),r-=t.width,o+=t.width}))}));else if(l){var m=Math.max.apply(Math,(0,o.fX)([n],h,!1));v.forEach((function(t){var n=m-12,i=12;t.forEach((function(t){var e=n-t.width-i;t.elem.attr("transform","translate(".concat(e,", 0)")),n-=t.width,i+=t.width}))}))}var b=Math.max.apply(Math,(0,o.fX)([n],h,!1)),x=d,w=Kd("svg").attr("width",b).attr("height",x).attr("viewBox","0 0 ".concat(b," ").concat(x));return w.append((function(){return s.node()})),{node:w.node(),width:b,height:x}}(l.props.legends,t,{selectedLegends:l.state.selectedLegends,centerLegends:!!l.props.centerLegends,textClassName:l._classNames.text,isRTL:n},l._rootElem)},l._onRenderData=function(t){var n=l.props,i=n.overflowProps,e=n.allowFocusOnLegends,r=void 0===e||e,a=n.canSelectMultipleLegends,s=void 0!==a&&a,c={root:{justifyContent:l.props.centerLegends?"center":"unset",flexWrap:l.props.enabledWrapLines?"wrap":"nowrap"}};return u.createElement(Xc,(0,o.Cl)({},r&&{role:"listbox","aria-label":"Legends","aria-multiselectable":s}),u.createElement(Ud,(0,o.Cl)({items:t.primary,overflowItems:t.overflow,onRenderItem:l._renderButton,onRenderOverflowButton:l._renderOverflowItems},i,{styles:(0,o.Cl)((0,o.Cl)({},c),null==i?void 0:i.styles)})))},l._onReduceData=function(t){if(0!==t.primary.length){var n=(0,o.fX)((0,o.fX)([],t.primary.slice(-1),!0),t.overflow,!0);return{primary:t.primary.slice(0,-1),overflow:n}}},l._onGrowData=function(t){if(0!==t.overflow.length){var n=t.overflow.slice(1);return{primary:(0,o.fX)((0,o.fX)([],t.primary,!0),t.overflow.slice(0,1),!0),overflow:n}}},l._getNewSelectedLegendsForMultiselect=function(t){var n=(0,o.Cl)({},l.state.selectedLegends);return n[t.title]?delete n[t.title]:(n[t.title]=!0,Object.keys(n).length===l.props.legends.length&&(n={})),n},l._getNewSelectedLegendsForSingleSelect=function(t){var n;return l.state.selectedLegends[t.title]?{}:((n={})[t.title]=!0,n)},l._onClick=function(t,n){var i,e,r,o=l.props.canSelectMultipleLegends,u=void 0!==o&&o?l._getNewSelectedLegendsForMultiselect(t):l._getNewSelectedLegendsForSingleSelect(t);l.setState({selectedLegends:u}),null===(e=(i=l.props).onChange)||void 0===e||e.call(i,Object.keys(u),n,t),null===(r=t.action)||void 0===r||r.call(t)},l._onRenderCompactCard=function(t){var n=l.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.className,a=n.styles,s=n.theme,c=n.canSelectMultipleLegends,d=void 0!==c&&c,f=[],v=sf(a,{theme:s,className:r});return t.renderData.forEach((function(t,n){var i=l._renderButton(t,n,!0);f.push(i)})),u.createElement(Xc,(0,o.Cl)({},e&&{role:"listbox","aria-label":"Legends","aria-multiselectable":d},{direction:rc.vertical,handleTabKey:1,isCircularNavigation:!0},l.props.focusZonePropsInHoverCard,{className:v.hoverCardRoot}),f)},l._renderOverflowItems=function(t){var n=l.props.allowFocusOnLegends,i=void 0===n||n,e=[];t.forEach((function(t,n){e.push({key:n.toString(),name:t.title,onClick:t.action})}));var r={renderData:t},a=l.props,s=a.theme,c=a.className,d=a.styles,f=a.overflowText,v=sf(d,{theme:s,className:c}),h={onRenderPlainCard:l._onRenderCompactCard,renderData:r},p=f||"more";return u.createElement(Nd,{type:Qc.plain,plainCardProps:h,instantOpenOnClick:!0,onCardHide:function(){l.setState({isHoverCardVisible:!1});var n=m(t,(function(t){return t.title===l.state.activeLegend}));n&&(l.setState({activeLegend:""}),n.onMouseOutAction&&n.onMouseOutAction())},setInitialFocus:!0,trapFocus:!0,onCardVisible:l._hoverCardVisible,styles:v.subComponentStyles.hoverCardStyles,cardDismissDelay:300,target:l._hoverCardRef},u.createElement("div",{role:"option"},u.createElement("div",(0,o.Cl)({className:v.overflowIndicationTextStyle,ref:function(t){l._hoverCardRef=t}},i&&{role:"button","aria-expanded":l.state.isHoverCardVisible,"aria-label":"".concat(e.length," ").concat(p)},{"data-is-focusable":i}),e.length," ",p)))},l._hoverCardVisible=function(){l.setState({isHoverCardVisible:!0})},l._onHoverOverLegend=function(t){t.hoverAction&&(l.setState({activeLegend:t.title}),t.hoverAction())},l._onLeave=function(t){t.onMouseOutAction&&(l.setState({activeLegend:""}),t.onMouseOutAction())},l._renderButton=function(t,n,i){var e=l.props.allowFocusOnLegends,r=void 0===e||e,a={title:t.title,color:t.color,shape:t.shape,action:t.action,hoverAction:t.hoverAction,onMouseOutAction:t.onMouseOutAction,stripePattern:t.stripePattern,isLineLegendInBarChart:t.isLineLegendInBarChart,opacity:t.opacity},s=l._getColor(a.title,a.color),c=l.props,d=c.theme,f=c.className,v=c.styles,h=sf(v,{theme:d,className:f,colorOnSelectedState:s,borderColor:a.color,overflow:i,stripePattern:a.stripePattern,isLineLegendInBarChart:a.isLineLegendInBarChart,opacity:a.opacity}),p=function(){l._onHoverOverLegend(a)},g=function(){l._onLeave(a)},y=l._getShape(h,a,s);return u.createElement("button",(0,o.Cl)({},r&&{"aria-selected":!!l.state.selectedLegends[a.title],role:"option","aria-label":"".concat(a.title),"aria-setsize":t["aria-setsize"],"aria-posinset":t["aria-posinset"]},t.nativeButtonProps&&(0,o.Cl)({},t.nativeButtonProps),{key:n,className:h.legend,onClick:function(t){l._onClick(a,t)},onMouseOver:p,onMouseOut:g,onFocus:p,onBlur:g,"data-is-focusable":r}),y,u.createElement("div",{className:h.text},a.title))};var s=null!==(e=n.selectedLegends)&&void 0!==e?e:n.defaultSelectedLegends,c=null!==(r=n.selectedLegend)&&void 0!==r?r:n.defaultSelectedLegend,d={};return n.canSelectMultipleLegends?d=(null===(a=null!=s?s:[])||void 0===a?void 0:a.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{}))||{}:c&&((i={})[c]=!0,d=i),l.state={activeLegend:"",isHoverCardVisible:!1,selectedLegends:d},l}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e=t.selectedLegend,r=t.selectedLegends;return t.canSelectMultipleLegends&&void 0!==r?(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:r.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{})}):t.canSelectMultipleLegends||void 0===e?n:(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:(i={},i[e]=!0,i)})},n.prototype.render=function(){var t=this,n=this.props,i=n.theme,e=n.className,r=n.styles;this._classNames=sf(r,{theme:i,className:e}),this._isLegendSelected=Object.keys(this.state.selectedLegends).length>0;var o=this._generateData();return u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n}},this.props.enabledWrapLines?this._onRenderData(o):u.createElement(Id,{data:o,onReduceData:this._onReduceData,onRenderData:this._onRenderData,onGrowData:this._onGrowData}))},n.prototype._generateData=function(){var t=this,n=this.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.shape;return{primary:this.props.legends.map((function(n,i){return(0,o.Cl)((0,o.Cl)({},e&&{nativeButtonProps:z(n,W,["title"]),"aria-setsize":t.props.legends.length,"aria-posinset":i+1}),{title:n.title,action:n.action,hoverAction:n.hoverAction,onMouseOutAction:n.onMouseOutAction,color:n.color,shape:r||n.shape,stripePattern:n.stripePattern,isLineLegendInBarChart:n.isLineLegendInBarChart,opacity:n.opacity,key:i})})),overflow:[]}},n.prototype._getShape=function(t,n,i){var e={className:t.shape},r={fill:i,strokeWidth:2,stroke:n.color};return u.createElement(Zd,{svgProps:e,pathProps:r,shape:n.shape,classNameForNonSvg:t.rect})},n.prototype._getColor=function(t,n){var i=this.props.theme;return this._isLegendSelected?this.state.selectedLegends[t]?n:i.semanticColors.buttonBackground:this.state.activeLegend===t||""===this.state.activeLegend?n:i.semanticColors.buttonBackground},n}(u.Component),df=(0,r.I)(cf,(function(t){var n,i,e=t.className,r=t.theme,u=t.isLineLegendInBarChart,a=void 0!==u&&u,l=r,s=l.palette,c=l.fonts,d={inset:void 0,position:void 0,highContrastStyle:{outlineColor:r.semanticColors.focusBorder},borderColor:"transparent",outlineColor:void 0};return{root:[{whiteSpace:"nowrap",width:"100%",alignItems:"center",margin:"-8px 0 0 -8px"},e],legend:[(0,It.gm)(r,d),{display:"flex",alignItems:"center",cursor:"pointer",border:"none",padding:"".concat(8,"px"),background:"none",textTransform:"capitalize"}],rect:{selectors:(n={},n[It.up]={content:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")"),opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":""},n),width:"".concat(12,"px"),height:a?"4px":"".concat(12,"px"),backgroundColor:t.stripePattern?"":t.colorOnSelectedState,marginRight:"".concat(8,"px"),border:"".concat(1,"px solid"),borderColor:t.borderColor?t.borderColor:null==r?void 0:r.semanticColors.buttonBorder,content:t.stripePattern?"repeating-linear-gradient(135deg, transparent, transparent 3px, ".concat(t.colorOnSelectedState," 1px, ").concat(t.colorOnSelectedState," 4px)"):""},shape:[{marginRight:"".concat(8,"px")}],triangle:{width:"0",height:"0",borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:"10.4px solid",borderTopColor:t.colorOnSelectedState,marginRight:"8px",opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":t.opacity?t.opacity:"",selectors:(i={},i[It.up]={border:"0px",height:"10.4px",width:"10.4px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")")},i)},text:(0,o.Cl)((0,o.Cl)({},c.small),{lineHeight:"16px",color:null==r?void 0:r.semanticColors.bodyText,opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"".concat(.67):""}),hoverChange:{width:"12px",height:"12px",backgroundColor:r.semanticColors.buttonBackground,marginRight:"8px",border:"1px solid",borderColor:t.borderColor?t.borderColor:s.black},overflowIndicationTextStyle:[(0,It.gm)(r,d),(0,o.Cl)((0,o.Cl)({cursor:"pointer",color:null==r?void 0:r.semanticColors.bodyText},c.small),{lineHeight:"16px",padding:"".concat(8,"px")})],hoverCardRoot:{padding:"8px",position:"relative",overflowY:"auto",maxHeight:"300px"},subComponentStyles:{hoverCardStyles:{host:[(0,It.gm)(r,d)]}}}}));function ff(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function vf(t){return function(){return t}}function hf(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function pf(t){return t}Array.prototype.slice;const gf=Math.abs,yf=Math.atan2,mf=Math.cos,bf=Math.max,xf=Math.min,wf=Math.sin,Mf=Math.sqrt,Cf=1e-12,kf=Math.PI,Af=kf/2,Sf=2*kf;function Lf(t){return t>=1?Af:t<=-1?-Af:Math.asin(t)}function Df(){var t=pf,n=hf,i=null,e=vf(0),r=vf(Sf),o=vf(0);function u(u){var a,l,s,c,d,f=(u=ff(u)).length,v=0,h=new Array(f),p=new Array(f),g=+e.apply(this,arguments),y=Math.min(Sf,Math.max(-Sf,r.apply(this,arguments)-g)),m=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=m*(y<0?-1:1);for(a=0;a<f;++a)(d=p[h[a]=a]=+t(u[a],a,u))>0&&(v+=d);for(null!=n?h.sort((function(t,i){return n(p[t],p[i])})):null!=i&&h.sort((function(t,n){return i(u[t],u[n])})),a=0,s=v?(y-f*b)/v:0;a<f;++a,g=c)l=h[a],c=g+((d=p[l])>0?d*s:0)+b,p[l]={data:u[l],index:a,value:d,startAngle:g,endAngle:c,padAngle:m};return p}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:vf(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,i=null,u):n},u.sort=function(t){return arguments.length?(i=t,n=null,u):i},u.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:vf(+t),u):e},u.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:vf(+t),u):r},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:vf(+t),u):o},u}const Vf=Math.PI,Nf=2*Vf,Of=1e-6,Tf=Nf-Of;function Ef(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}class Ff{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Ef:function(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Ef;const i=10**n;return function(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=Math.round(arguments[n]*i)/i+t[n]}}(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,e){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+e}`}bezierCurveTo(t,n,i,e,r,o){this._append`C${+t},${+n},${+i},${+e},${this._x1=+r},${this._y1=+o}`}arcTo(t,n,i,e,r){if(t=+t,n=+n,i=+i,e=+e,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=this._x1,u=this._y1,a=i-t,l=e-n,s=o-t,c=u-n,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=n}`;else if(d>Of)if(Math.abs(c*a-l*s)>Of&&r){let f=i-o,v=e-u,h=a*a+l*l,p=f*f+v*v,g=Math.sqrt(h),y=Math.sqrt(d),m=r*Math.tan((Vf-Math.acos((h+d-p)/(2*g*y)))/2),b=m/y,x=m/g;Math.abs(b-1)>Of&&this._append`L${t+b*s},${n+b*c}`,this._append`A${r},${r},0,0,${+(c*f>s*v)},${this._x1=t+x*a},${this._y1=n+x*l}`}else this._append`L${this._x1=t},${this._y1=n}`}arc(t,n,i,e,r,o){if(t=+t,n=+n,o=!!o,(i=+i)<0)throw new Error(`negative radius: ${i}`);let u=i*Math.cos(e),a=i*Math.sin(e),l=t+u,s=n+a,c=1^o,d=o?e-r:r-e;null===this._x1?this._append`M${l},${s}`:(Math.abs(this._x1-l)>Of||Math.abs(this._y1-s)>Of)&&this._append`L${l},${s}`,i&&(d<0&&(d=d%Nf+Nf),d>Tf?this._append`A${i},${i},0,1,${c},${t-u},${n-a}A${i},${i},0,1,${c},${this._x1=l},${this._y1=s}`:d>Of&&this._append`A${i},${i},0,${+(d>=Vf)},${c},${this._x1=t+i*Math.cos(r)},${this._y1=n+i*Math.sin(r)}`)}rect(t,n,i,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+e}h${-i}Z`}toString(){return this._}}function Bf(t){let n=3;return t.digits=function(i){if(!arguments.length)return n;if(null==i)n=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);n=t}return t},()=>new Ff(n)}function Pf(t){return t.innerRadius}function _f(t){return t.outerRadius}function Hf(t){return t.startAngle}function If(t){return t.endAngle}function Wf(t){return t&&t.padAngle}function Rf(t,n,i,e,r,o,u){var a=t-i,l=n-e,s=(u?o:-o)/Mf(a*a+l*l),c=s*l,d=-s*a,f=t+c,v=n+d,h=i+c,p=e+d,g=(f+h)/2,y=(v+p)/2,m=h-f,b=p-v,x=m*m+b*b,w=r-o,M=f*p-h*v,C=(b<0?-1:1)*Mf(bf(0,w*w*x-M*M)),k=(M*b-m*C)/x,A=(-M*m-b*C)/x,S=(M*b+m*C)/x,L=(-M*m+b*C)/x,D=k-g,V=A-y,N=S-g,O=L-y;return D*D+V*V>N*N+O*O&&(k=S,A=L),{cx:k,cy:A,x01:-c,y01:-d,x11:k*(r/w-1),y11:A*(r/w-1)}}function zf(){var t=Pf,n=_f,i=vf(0),e=null,r=Hf,o=If,u=Wf,a=null,l=Bf(s);function s(){var s,c,d,f=+t.apply(this,arguments),v=+n.apply(this,arguments),h=r.apply(this,arguments)-Af,p=o.apply(this,arguments)-Af,g=gf(p-h),y=p>h;if(a||(a=s=l()),v<f&&(c=v,v=f,f=c),v>Cf)if(g>Sf-Cf)a.moveTo(v*mf(h),v*wf(h)),a.arc(0,0,v,h,p,!y),f>Cf&&(a.moveTo(f*mf(p),f*wf(p)),a.arc(0,0,f,p,h,y));else{var m,b,x=h,w=p,M=h,C=p,k=g,A=g,S=u.apply(this,arguments)/2,L=S>Cf&&(e?+e.apply(this,arguments):Mf(f*f+v*v)),D=xf(gf(v-f)/2,+i.apply(this,arguments)),V=D,N=D;if(L>Cf){var O=Lf(L/f*wf(S)),T=Lf(L/v*wf(S));(k-=2*O)>Cf?(M+=O*=y?1:-1,C-=O):(k=0,M=C=(h+p)/2),(A-=2*T)>Cf?(x+=T*=y?1:-1,w-=T):(A=0,x=w=(h+p)/2)}var E=v*mf(x),F=v*wf(x),B=f*mf(C),P=f*wf(C);if(D>Cf){var _,H=v*mf(w),I=v*wf(w),W=f*mf(M),R=f*wf(M);if(g<kf)if(_=function(t,n,i,e,r,o,u,a){var l=i-t,s=e-n,c=u-r,d=a-o,f=d*l-c*s;if(!(f*f<Cf))return[t+(f=(c*(n-o)-d*(t-r))/f)*l,n+f*s]}(E,F,W,R,H,I,B,P)){var z=E-_[0],j=F-_[1],$=H-_[0],Y=I-_[1],X=1/wf(((d=(z*$+j*Y)/(Mf(z*z+j*j)*Mf($*$+Y*Y)))>1?0:d<-1?kf:Math.acos(d))/2),G=Mf(_[0]*_[0]+_[1]*_[1]);V=xf(D,(f-G)/(X-1)),N=xf(D,(v-G)/(X+1))}else V=N=0}A>Cf?N>Cf?(m=Rf(W,R,E,F,v,N,y),b=Rf(H,I,B,P,v,N,y),a.moveTo(m.cx+m.x01,m.cy+m.y01),N<D?a.arc(m.cx,m.cy,N,yf(m.y01,m.x01),yf(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,N,yf(m.y01,m.x01),yf(m.y11,m.x11),!y),a.arc(0,0,v,yf(m.cy+m.y11,m.cx+m.x11),yf(b.cy+b.y11,b.cx+b.x11),!y),a.arc(b.cx,b.cy,N,yf(b.y11,b.x11),yf(b.y01,b.x01),!y))):(a.moveTo(E,F),a.arc(0,0,v,x,w,!y)):a.moveTo(E,F),f>Cf&&k>Cf?V>Cf?(m=Rf(B,P,H,I,f,-V,y),b=Rf(E,F,W,R,f,-V,y),a.lineTo(m.cx+m.x01,m.cy+m.y01),V<D?a.arc(m.cx,m.cy,V,yf(m.y01,m.x01),yf(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,V,yf(m.y01,m.x01),yf(m.y11,m.x11),!y),a.arc(0,0,f,yf(m.cy+m.y11,m.cx+m.x11),yf(b.cy+b.y11,b.cx+b.x11),y),a.arc(b.cx,b.cy,V,yf(b.y11,b.x11),yf(b.y01,b.x01),!y))):a.arc(0,0,f,C,M,y):a.lineTo(B,P)}else a.moveTo(0,0);if(a.closePath(),s)return a=null,s+""||null}return s.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-kf/2;return[mf(e)*i,wf(e)*i]},s.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:vf(+n),s):t},s.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:vf(+t),s):n},s.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:vf(+t),s):i},s.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:vf(+t),s):e},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:vf(+t),s):r},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:vf(+t),s):o},s.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:vf(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}var jf=function(t){var n,i=t.solidFill,e=t.gradientFill,r=t.href,o=t.theme,u=t.opacity;return{root:{fill:i,cursor:r?"pointer":"default",stroke:o.semanticColors.bodyBackground,outline:"transparent",selectors:{"::-moz-focus-inner":{border:"0"}},opacity:u},gradientArc:{width:"100%",height:"100%",background:e,opacity:u},focusRing:{stroke:o.semanticColors.focusBorder,strokeWidth:4,fill:"transparent"},arcLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:o.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},$f=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.state={},n.currentRef=u.createRef(),n._isRTL=(0,l.jI)(),n._hoverOff=function(){n.props.hoverLeaveCallback()},n._onBlur=function(){n.props.onBlurCallback()},n._getAriaLabel=function(){var t,i=n.props.data.data,e=i.xAxisCalloutData||i.legend,r=i.yAxisCalloutData||i.data||0;return(null===(t=i.callOutAccessibilityData)||void 0===t?void 0:t.ariaLabel)||(e?"".concat(e,", "):"")+"".concat(r,".")},n._shouldHighlightArc=function(t){var i=n.props.activeArc;return!i||0===i.length||void 0===t||i.includes(t)},n._renderArcLabel=function(t){var i=n.props,e=i.arc,r=i.data,o=i.innerRadius,a=i.outerRadius,l=i.showLabelsInPercent,s=i.totalValue;if(i.hideLabels||Math.abs(r.endAngle-r.startAngle)<Math.PI/12||!n._shouldHighlightArc(r.data.legend))return null;var c=e.centroid(r),d=c[0],f=c[1],v=Math.sqrt(d*d+f*f),h=Math.max(o,a)+2,p=(r.startAngle+r.endAngle)/2,g=r.value;return u.createElement("text",{x:(0===v?0:d/v)*h,y:(0===v?0:f/v)*h,textAnchor:p>Math.PI!==n._isRTL?"end":"start",dominantBaseline:p>Math.PI/2&&p<3*Math.PI/2?"hanging":"auto",className:t,"aria-hidden":!0},l?ju(".0%")(0===s?0:g/s):zs(g))},n}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return Yf(t),null},n.prototype.updateChart=function(t){Yf(t)},n.prototype.render=function(){var t,n,i,e,r,o,l,s=this.props,c=s.arc,d=s.href,f=s.focusedArcId,v=s.activeArc,h=(0,a.Z)(),g=this.props.uniqText+("string"==typeof this.props.data.data.legend?this.props.data.data.legend.replace(/\s+/g,""):"")+this.props.data.data.data,y=v&&v.length>0?v.includes(null===(t=this.props.data)||void 0===t?void 0:t.data.legend)?1:.1:1,m=null!==(i=null===(n=this.props.data)||void 0===n?void 0:n.startAngle)&&void 0!==i?i:0,b=(null!==(r=null===(e=this.props.data)||void 0===e?void 0:e.endAngle)&&void 0!==r?r:0)-m,x=this.props.roundCorners?3:0,w=h(jf,{solidFill:this.props.enableGradient?"transparent":this.props.color,gradientFill:"conic-gradient(\n from ".concat(m,"rad,\n ").concat(this.props.color,",\n ").concat(this.props.nextColor," ").concat(b,"rad\n )"),href:d,theme:this.props.theme,opacity:y}),M=p("Arc_clip")+"".concat(this.props.color,"_").concat(this.props.nextColor);return u.createElement("g",{ref:this.currentRef},!!f&&f===g&&u.createElement("path",{id:g+"focusRing",d:c.cornerRadius(x)(this.props.focusData),className:w.focusRing}),u.createElement("path",{id:g,d:c.cornerRadius(x)(this.props.data),onFocus:this._onFocus.bind(this,this.props.data.data,g),className:w.root,"data-is-focusable":this._shouldHighlightArc(this.props.data.data.legend)||0===(null===(o=this.props.activeArc)||void 0===o?void 0:o.length),onMouseOver:this._hoverOn.bind(this,this.props.data.data),onMouseMove:this._hoverOn.bind(this,this.props.data.data),onMouseLeave:this._hoverOff,onBlur:this._onBlur,onClick:d?this._redirectToUrl.bind(this,d):null===(l=this.props.data)||void 0===l?void 0:l.data.onClick,"aria-label":this._getAriaLabel(),role:"img"}),this._renderArcLabel(w.arcLabel),this.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:M},u.createElement("path",{d:c.cornerRadius(x)(this.props.data)})),u.createElement("foreignObject",{x:"-50%",y:"-50%",width:"100%",height:"100%",clipPath:"url(#".concat(M,")")},u.createElement("div",{className:w.gradientArc}))))},n.prototype._onFocus=function(t,n){this.props.onFocusCallback(t,n,this.currentRef.current)},n.prototype._hoverOn=function(t,n){n.persist(),this.props.hoverOnCallback(t,n)},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.defaultProps={arc:zf()},n}(u.Component);function Yf(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Xf,Gf,Uf,qf=function(t){var n,i=t.theme;return{root:{},insideDonutString:{fontSize:It.s.xLargePlus,fontWeight:It.BO.semibold,fill:i.semanticColors.bodyText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},Zf=(0,a.Z)(),Kf=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n,e,r){var o,a,l,s,c=t&&t.data&&t.data.color,d=c;return i.props.enableGradient&&(c=null!==(a=null===(o=i.props.data[n].gradient)||void 0===o?void 0:o[0])&&void 0!==a?a:Mc(n,0,i.props.theme.isInverted)[0],d=null!==(s=null===(l=i.props.data[n].gradient)||void 0===l?void 0:l[1])&&void 0!==s?s:Mc(n,0,i.props.theme.isInverted)[1]),u.createElement($f,{key:n,data:t,focusData:e,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:c,nextColor:d,enableGradient:i.props.enableGradient,roundCorners:i.props.roundCorners,onFocusCallback:i._focusCallback,hoverOnCallback:i._hoverCallback,onBlurCallback:i.props.onBlurCallback,hoverLeaveCallback:i.props.hoverLeaveCallback,uniqText:i.props.uniqText,activeArc:i.props.activeArc,href:r,calloutId:i.props.calloutId,valueInsideDonut:i.props.valueInsideDonut,theme:i.props.theme,focusedArcId:i.props.focusedArcId,showLabelsInPercent:i.props.showLabelsInPercent,totalValue:i._totalValue,hideLabels:i.props.hideLabels})},i._focusCallback=function(t,n,e){i.props.onFocusCallback(t,n,e)},i._computeTotalValue=function(){var t=0;return i.props.data.forEach((function(n){t+=n.data})),t},i._hoverCallback=i._hoverCallback.bind(i),i._pieForFocusRing=Df().sort(null).value((function(t){return t.data})).padAngle(0),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=this._pieForFocusRing(e),o=i(e),a="translate(".concat(this.props.width/2,", ").concat(this.props.height/2,")"),l=Zf(qf,{theme:this.props.theme});return this._totalValue=this._computeTotalValue(),u.createElement("g",{transform:a},o.map((function(n,i){return t.arcGenerator(n,i,r[i],t.props.href)})),this.props.valueInsideDonut&&u.createElement("text",{y:5,textAnchor:"middle",dominantBaseline:"middle",className:l.insideDonutString},this.props.valueInsideDonut))},n.prototype.componentDidUpdate=function(){var t,n,i;t=Zf(qf,{theme:this.props.theme}).insideDonutString,n=2*this.props.innerRadius-5,i=0,cl(".".concat(t)).each((function(){for(var t=sl(this),e=t.text().split(/\s+/).reverse(),r="",o=[],u=0,a=t.attr("y"),l=t.text(null).append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em");r=e.pop();)o.push(r),l.text(o.join(" ")+" "),l.node().getComputedTextLength()>n&&o.length>1&&(o.pop(),l.text(o.join(" ")+" "),o=[r],l=t.append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em").text(r));i+=1}))},n.prototype._hoverCallback=function(t,n){this.props.hoverOnCallback(t,n)},n.defaultProps={pie:Df().sort(null).value((function(t){return t.data})).padAngle(.02)},n}(u.Component),Jf=(0,a.Z)(),Qf=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Jd([{container:e._rootElem}],e.props.hideLegend||null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)},e._closeCallout=function(){e.setState({showHover:!1})},e._focusCallback=function(t,n,i){e._currentHoverElement=i,e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,focusedArcId:n,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})},e._hoverCallback=function(t,n){var i,r,o,u;if(e._calloutAnchorPoint!==t){e._calloutAnchorPoint=t,e._currentHoverElement=n;var a=t.color;if(e.props.enableGradient){var l=Math.max((null===(r=null===(i=e.props.data)||void 0===i?void 0:i.chartData)||void 0===r?void 0:r.findIndex((function(n){return n.legend===t.legend})))||0,0);a=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Mc(l,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0]}e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:a,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})}},e._onBlur=function(){e.setState({focusedArcId:""})},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({showHover:!1})},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendsHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?ss(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):cs(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},Ac(e),e.state={showHover:!1,value:"",legend:"",_width:e.props.width||200,_height:e.props.height||200,activeLegend:void 0,color:"",xCalloutValue:"",yCalloutValue:"",focusedArcId:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[]},e._hoverCallback=e._hoverCallback.bind(e),e._focusCallback=e._focusCallback.bind(e),e._hoverLeave=e._hoverLeave.bind(e),e._calloutId=p("callout"),e._uniqText=p("_Pie_"),e._emptyChartId=p("_DonutChart_empty"),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e;return t.width&&t.width!==n._width&&(i={_width:t.width}),t.height&&t.height!==n._height&&(e={_height:t.height-40}),(0,o.Cl)((0,o.Cl)({},i),e)},n.prototype.componentDidMount=function(){this._rootElem&&this.setState({_width:this._rootElem.offsetWidth,_height:this._rootElem.offsetHeight-40})},n.prototype.componentDidUpdate=function(t){var n,i,e;Gs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.hideLegend,r=void 0!==e&&e,a=this._addDefaultColors(null==i?void 0:i.chartData);this._classNames=Jf(this.props.styles,{theme:this.props.theme,color:this.state.color,className:this.props.className});var l=this._createLegends(a.filter((function(t){return t.data>=0}))),s=this.props.hideLabels?0:80,c=this.props.hideLabels?0:40,d=Math.min(this.state._width-s,this.state._height-c)/2,f=this._elevateToMinimums(a),v=this.props.innerRadius>1?this._valueInsideDonut(this.props.valueInsideDonut,f):"";return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n},onMouseLeave:this._handleChartMouseLeave},this.props.xAxisAnnotation&&u.createElement("text",{className:this._classNames.axisAnnotation,x:this.state._width/2,y:this.state._height-10,textAnchor:"middle"},this.props.xAxisAnnotation),u.createElement(Xc,{direction:rc.horizontal,handleTabKey:1,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,"aria-label":null==i?void 0:i.chartTitle,ref:function(n){return t._setViewBox(n)},width:this.state._width,height:this.state._height},u.createElement(Kf,{width:this.state._width,height:this.state._height,outerRadius:d,innerRadius:this.props.innerRadius,data:f,enableGradient:this.props.enableGradient,roundCorners:this.props.roundCorners,onFocusCallback:this._focusCallback,hoverOnCallback:this._hoverCallback,hoverLeaveCallback:this._hoverLeave,uniqText:this._uniqText,onBlurCallback:this._onBlur,activeArc:this._getHighlightedLegend(),focusedArcId:this.state.focusedArcId||"",href:this.props.href,calloutId:this._calloutId,valueInsideDonut:this._toLocaleString(v),theme:this.props.theme,showLabelsInPercent:this.props.showLabelsInPercent,hideLabels:this.props.hideLabels}))),u.createElement($n,(0,o.Cl)({target:this._currentHoverElement,alignTargetEdge:!0,isBeakVisible:!1,directionalHint:3,gapSpace:15,hidden:!(!this.props.hideTooltip&&this.state.showHover),id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,Rs(this.state.callOutAccessibilityData,"text",!1)),this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(pc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.value,color:this.state.color,culture:this.props.culture})),!r&&u.createElement("div",{className:this._classNames.legendContainer},l))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._elevateToMinimums=function(t){var n=0,i=[];return t.forEach((function(t){n+=t.data})),t.forEach((function(t){i.push(.01*n>t.data&&t.data>0?(0,o.Cl)((0,o.Cl)({},t),{data:.01*n,yAxisCalloutData:void 0===t.yAxisCalloutData?t.data.toLocaleString():t.yAxisCalloutData}):t)})),i},n.prototype._setViewBox=function(t){var n,i;if(null!==t){var e=t.parentElement?t.parentElement.clientWidth:this.state._width,r=t.parentElement&&(null===(n=t.parentElement)||void 0===n?void 0:n.offsetHeight)>this.state._height?null===(i=t.parentElement)||void 0===i?void 0:i.offsetHeight:this.state._height,o="0 0 ".concat(e," ").concat(r);t.setAttribute("viewBox",o)}},n.prototype._createLegends=function(t){var n=this;"sorted"===this.props.order&&t.sort((function(t,n){return n.data-t.data}));var i=t.map((function(t,i){var e,r,o=n.props.enableGradient?(null===(e=t.gradient)||void 0===e?void 0:e[0])||Mc(i,0,null===(r=n.props.theme)||void 0===r?void 0:r.isInverted)[0]:t.color;return{title:t.legend,color:o,hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:t.legend})},onMouseOutAction:function(){n.setState({activeLegend:void 0})}}}));return u.createElement(df,(0,o.Cl)({legends:i,centerLegends:!0,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;this.props.legendProps&&(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._hoverLeave=function(){},n.prototype._valueInsideDonut=function(t,n){var i=this,e=this._getHighlightedLegend();if(void 0===t||1!==e.length&&!this.state.showHover){if(e.length>0){var r=0;return n.forEach((function(t){e.includes(t.legend)&&(r+=t.data)})),r}return t}var o=n.find((function(t){return i._isLegendHighlighted(t.legend)}));return o?o.yAxisCalloutData?o.yAxisCalloutData:o.data:t},n.prototype._toLocaleString=function(t){var n=(0,Yn.c$)(t,this.props.culture,this.props.useUTC);return n?null==n?void 0:n.toString():t},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.filter((function(t){return t.data>0})).length>0)},n.defaultProps={innerRadius:0,hideLabels:!0},n}(u.Component);!function(t){t.shade30="#004578",t.shade20="#005a9e",t.shade10="#106ebe",t.primary="#0078d4",t.tint10="#2b88d8",t.tint20="#c7e0f4",t.tint30="#deecf9",t.tint40="#eff6fc"}(Xf||(Xf={})),function(t){t.black="#000000",t.gray220="#11100f",t.gray210="#161514",t.gray200="#1b1a19",t.gray190="#201f1e",t.gray180="#252423",t.gray170="#292827",t.gray160="#323130",t.gray150="#3b3a39",t.gray140="#484644",t.gray130="#605e5c",t.gray120="#797775",t.gray110="#8a8886",t.gray100="#979593",t.gray90="#a19f9d",t.gray80="#b3b0ad",t.gray70="#bebbb8",t.gray60="#c8c6c4",t.gray50="#d2d0ce",t.gray40="#e1dfdd",t.gray30="#edebe9",t.gray20="#f3f2f1",t.gray10="#faf9f8",t.white="#ffffff"}(Gf||(Gf={})),function(t){t.pinkRed10="#750b1c",t.red20="#a4262c",t.red10="#d13438",t.redOrange20="#603d30",t.redOrange10="#da3b01",t.orange30="#8e562e",t.orange20="#ca5010",t.orange10="#ffaa44",t.yellow10="#fce100",t.orangeYellow20="#986f0b",t.orangeYellow10="#c19c00",t.yellowGreen10="#8cbd18",t.green20="#0b6a0b",t.green10="#498205",t.greenCyan10="#00ad56",t.cyan40="#005e50",t.cyan30="#005b70",t.cyan20="#038387",t.cyan10="#00b7c3",t.cyanBlue20="#004e8c",t.cyanBlue10="#0078d4",t.blue10="#4f6bed",t.blueMagenta40="#373277",t.blueMagenta30="#5c2e91",t.blueMagenta20="#8764b8",t.blueMagenta10="#8378de",t.magenta20="#881798",t.magenta10="#c239b3",t.magentaPink20="#9b0062",t.magentaPink10="#e3008c",t.gray40="#393939",t.gray30="#7a7574",t.gray20="#69797e",t.gray10="#a0aeb2"}(Uf||(Uf={}));var tv=function(t){return(0,o.Cl)((0,o.Cl)({},t.fonts.medium),{display:"flex",flexDirection:"column",padding:"8px",position:"absolute",textAlign:"center",top:"0px",background:t.semanticColors.bodyBackground,borderRadius:"2px",pointerEvents:"none",color:t.semanticColors.bodyText})},nv=function(t,n){var i;return[n,(i={textAlign:"center",fontWeight:It.BO.semibold,fontStyle:"normal",lineHeight:It.s.medium,color:Gf.gray160,fill:t.semanticColors.bodyText},i[It.up]={fill:"CanvasText"},i)]},iv=function(t){var n;return{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:t.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},ev=function(t){var n;return{fontSize:It.s.medium,fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},rv=(0,r.I)(Qf,(function(t){var n=t.className,i=t.theme;return{root:[i.fonts.medium,"ms-DonutChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},n],chart:{boxSizing:"content-box",overflow:"visible",alignmentAdjust:"center",display:"block"},legendContainer:{paddingTop:"16px",width:"100%"},axisAnnotation:nv(i,i.fonts.small)}}));function ov(t,n){if(t=function(t){let n;for(;n=t.sourceEvent;)t=n;return t}(t),void 0===n&&(n=t.currentTarget),n){var i=n.ownerSVGElement||n;if(i.createSVGPoint){var e=i.createSVGPoint();return e.x=t.clientX,e.y=t.clientY,[(e=e.matrixTransform(n.getScreenCTM().inverse())).x,e.y]}if(n.getBoundingClientRect){var r=n.getBoundingClientRect();return[t.clientX-r.left-n.clientLeft,t.clientY-r.top-n.clientTop]}}return[t.pageX,t.pageY]}function uv(t){return t[0]}function av(t){return t[1]}function lv(t,n){var i=vf(!0),e=null,r=hl,o=null,u=Bf(a);function a(a){var l,s,c,d=(a=ff(a)).length,f=!1;for(null==e&&(o=r(c=u())),l=0;l<=d;++l)!(l<d&&i(s=a[l],l,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(s,l,a),+n(s,l,a));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?uv:vf(t),n="function"==typeof n?n:void 0===n?av:vf(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:vf(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:vf(+t),a):n},a.defined=function(t){return arguments.length?(i="function"==typeof t?t:vf(!!t),a):i},a.curve=function(t){return arguments.length?(r=t,null!=e&&(o=r(e)),a):r},a.context=function(t){return arguments.length?(null==t?e=o=null:o=r(e=t),a):e},a}var sv=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._tooltipHostId=p("tooltip-host"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._measureText=function(){if(e._tooltipHost.current&&"function"==typeof e._tooltipHost.current.getBBox){var t=e._tooltipHost.current.getBBox();e.setState({textX:t.x,textY:t.y,textWidth:t.width,textHeight:t.height})}},e._getTargetElement=function(){if(e._tooltipHost.current)return e._tooltipHost.current},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipBlur=function(t){e._ignoreNextFocusEvent=(null===document||void 0===document?void 0:document.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props.delay;if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e.state.isOverflowing&&(!t.target||!Nc(t.target,e._getTargetElement())))if(e._clearDismissTimer(),e._clearOpenTimer(),i!==Uc.zero){var r=e._getDelayTime(i);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),r)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Vt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t})},e._getDelayTime=function(t){switch(t){case Uc.medium:return 300;case Uc.long:return 500;default:return 0}},e._wrapContent=function(){var t=e.props,n=t.content,i=t.wrapContent,r=t.maxWidth,o=void 0===r?Number.POSITIVE_INFINITY:r,u=t.maxHeight,a=!1;n&&i&&i(n,e._tooltipHostId,o,u)&&(a=!0),e.state.isOverflowing!==a&&e.setState({isOverflowing:a})},e.state={isTooltipVisible:!1,isOverflowing:!1},e._async=new Nt(e),e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.content,i=t.tooltipProps,e=t.textProps,r=t.shouldReceiveFocus,a=void 0===r||r,l=t.showBackground,s=void 0!==l&&l,c=this.state,d=c.isTooltipVisible,f=c.textWidth,v=c.textHeight,h=(0,o.Cl)({content:n,targetElement:this._getTargetElement(),calloutProps:{onDismiss:this._hideTooltip,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},i),p=!!this.props.isTooltipVisibleProp&&this.state.isOverflowing&&!!n||d&&!!n,g=("number"==typeof(null==e?void 0:e.x)?e.x:0)-(null!=f?f:0)/2-3,y=("number"==typeof(null==e?void 0:e.y)?e.y:0)-(null!=v?v:0)/2-6;return u.createElement(u.Fragment,null,s&&u.createElement("rect",{x:g,y:y,width:(null!=f?f:0)+6,height:(null!=v?v:0)+3,transform:null==e?void 0:e.transform,className:this.props.className}),u.createElement("text",(0,o.Cl)({},e,{id:this._tooltipHostId,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,"data-is-focusable":a&&this.state.isOverflowing}),n),p&&u.createElement(Kc,(0,o.Cl)({},h)))},n.prototype.componentDidMount=function(){this._wrapContent(),this._measureText()},n.prototype.componentDidUpdate=function(t){this.props.maxWidth===t.maxWidth&&this.props.maxHeight===t.maxHeight||(this._wrapContent(),this._measureText())},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:Uc.medium},n}(u.Component),cv=function(t,n){if(t){var i=Eo(t);return i?(i.opacity=Math.max(0,Math.min(1,n)),i.toString()):t}},dv=function(t){var n=t.theme,i=t.className,e=function(t){return cv(t.semanticColors.bodyBackground,.8)}(n),r=n.semanticColors.bodyText,o=n.semanticColors.bodyDivider;return{root:[{position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible",zIndex:1},i],annotation:[n.fonts.small,{position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",backgroundColor:e,color:r,padding:"4px 8px",borderRadius:4,boxShadow:n.effects.elevation4,border:"1px solid ".concat(o),whiteSpace:"pre-wrap",zIndex:2}],connectorLayer:[{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"}],measurement:[{position:"absolute",visibility:"hidden",pointerEvents:"none"}],annotationContent:[{width:"100%",height:"100%",pointerEvents:"none"}],annotationForeignObject:[{overflow:"visible",pointerEvents:"none"}],annotationContentInteractive:[{pointerEvents:"auto"}],annotationForeignObjectInteractive:[{pointerEvents:"auto"}],connectorGroup:[{pointerEvents:"none"}]}},fv=(0,a.Z)(),vv="<".codePointAt(0),hv=">".codePointAt(0),pv=function(t,n){var i,e;return null!==(e=null!==(i=t.id)&&void 0!==i?i:"string"==typeof t.text||"number"==typeof t.text?String(t.text):void 0)&&void 0!==e?e:"annotation-".concat(n)},gv=function(t,n){if(0!==n.length){var i=t[t.length-1];i&&"text"===i.type?i.content+=n:t.push({type:"text",content:n})}},yv=function(t){return t.map((function(t){return"text"===t.type?t.content:"br"===t.type?"<br />":"<".concat(t.tag,">").concat(yv(t.children),"</").concat(t.tag,">")})).join("")},mv=function(t){return t.map((function(t){return"text"===t.type?t.content:"br"===t.type?"\n":mv(t.children)})).join("")},bv=function(t,n){return t.map((function(t,i){var e="".concat(n,"-").concat(i);if("text"===t.type)return u.createElement(u.Fragment,{key:e},t.content);if("br"===t.type)return u.createElement("br",{key:e});var r="b"===t.tag?"strong":"em";return u.createElement.apply(u,(0,o.fX)([r,{key:e}],bv(t.children,e),!1))}))},xv=function(t,n){var i,e=bv(t,n);return e.length<=1?null!==(i=e[0])&&void 0!==i?i:null:e},wv=function(t,n){var i=null==t?void 0:t(n);if("number"==typeof i&&!Number.isNaN(i))return t&&"function"==typeof t.bandwidth?i+t.bandwidth()/2:i},Mv=function(t,n,i){return Math.max(n,Math.min(i,t))},Cv=u.memo((function(t){var n=t.annotations,i=t.theme,e=t.context,r=t.className,a=fv(dv,{theme:i,className:r}),l=u.useMemo((function(){return p("chart-annotation")}),[]),s=u.useState({}),c=s[0],d=s[1],f=u.useMemo((function(){return(null!=n?n:[]).map((function(t,n){return{annotation:t,key:pv(t,n)}}))}),[n]);u.useEffect((function(){d((function(t){if(0===f.length)return 0===Object.keys(t).length?t:{};var n={};if(f.forEach((function(i){var e=i.key;t[e]&&(n[e]=t[e])})),Object.keys(n).length===Object.keys(t).length){for(var i=!0,e=0,r=Object.keys(n);e<r.length;e++){var o=r[e];if(n[o]!==t[o]){i=!1;break}}if(i)return t}return n}))}),[f]);var v=u.useCallback((function(t,n,i,e){d((function(r){var u,a=r[t];return a&&a.signature===e&&Math.abs(a.width-n)<.5&&Math.abs(a.height-i)<.5||0===n&&0===i?r:(0,o.Cl)((0,o.Cl)({},r),((u={})[t]={width:n,height:i,signature:e},u))}))}),[]),h=[],g=[],y=[];if(f.forEach((function(t){var n,r,l,s,d,f,p,m,b,x,w,M,C,k,A,S,L,D,V,N,O,T,E,F,B,P,_,H,I,W,R,z,$,Y,X,G,U,q=t.annotation,Z=t.key,K=function(t,n){var i,e,r=t.coordinates,o=t.layout;if(r){var u=null!==(i=null==o?void 0:o.offsetX)&&void 0!==i?i:0,a=null!==(e=null==o?void 0:o.offsetY)&&void 0!==e?e:0,l={x:0,y:0};switch(r.type){case"data":var s=r.x,c=r.y,d=r.yAxis,f=void 0===d?"primary":d,v=n.xScale,h="secondary"===f?n.yScaleSecondary:n.yScalePrimary;if(!v||!h)return;var p=wv(v,s instanceof Date?s.getTime():s),g=wv(h,c instanceof Date?c.getTime():c);if("number"!=typeof p||"number"!=typeof g)return;l.x=p,l.y=g;break;case"relative":if("number"!=typeof r.x||"number"!=typeof r.y)return;l.x=n.plotRect.x+n.plotRect.width*r.x,l.y=n.plotRect.y+n.plotRect.height*r.y;break;case"pixel":if("number"!=typeof r.x||"number"!=typeof r.y)return;l.x=n.plotRect.x+r.x,l.y=n.plotRect.y+r.y;break;default:return}var y=l.x+u,m=l.y+a;return(null==o?void 0:o.clipToBounds)&&(y=Mv(y,n.plotRect.x,n.plotRect.x+n.plotRect.width),m=Mv(m,n.plotRect.y,n.plotRect.y+n.plotRect.height)),{anchor:l,point:{x:y,y:m}}}}(q,e);if(K){var J=function(t){var n,i;if(!t)return[];for(var e,r=function(t){var n={amp:"&",quot:'"',apos:"'",nbsp:" "},i=t.replace(/&(#x?[0-9a-f]+|#\d+|[a-z][\w-]*);/gi,(function(t,i){var e,r=i.toLowerCase();if("lt"===r||"gt"===r)return"&".concat(r,";");if(r.startsWith("#")){var o="x"===r[1],u=r.slice(o?2:1),a=Number.parseInt(u,o?16:10);return Number.isNaN(a)?t:a===vv?"<":a===hv?">":String.fromCodePoint(a)}return null!==(e=n[r])&&void 0!==e?e:t}));return i.replace(/<([^;]+)>/gi,(function(t,n){switch(n.trim().replace(/\s+/g," ").toLowerCase()){case"b":return"<b>";case"/b":return"</b>";case"i":return"<i>";case"/i":return"</i>";case"br":case"br/":case"br /":return"<br />";default:return t}}))}(t),o=[],u=[{node:null}],a=function(){var t,n;return null!==(n=null===(t=u[u.length-1].node)||void 0===t?void 0:t.children)&&void 0!==n?n:o},l=/<\/?([a-z]+)\s*\/?\s*>/gi,s=0;null!==(e=l.exec(r));){var c=e[0],d=e[1].toLowerCase(),f=c.startsWith("</"),v=/\/\s*>$/.test(c);if(gv(a(),r.slice(s,e.index)),s=e.index+c.length,"br"!==d||f)if("b"!==d&&"i"!==d||v)gv(a(),c);else if(f){var h=u[u.length-1].node;u.length>1&&(null==h?void 0:h.tag)===d?u.pop():gv(a(),c)}else{if(u.length-1>=5){gv(a(),c);continue}var p={type:"element",tag:d,children:[]};a().push(p),u.push({node:p})}else a().push({type:"br"})}for(gv(a(),r.slice(s));u.length>1;)if(p=u.pop().node){var g=null!==(i=null===(n=u[u.length-1].node)||void 0===n?void 0:n.children)&&void 0!==i?i:o;if(g[g.length-1]===p)g.pop();else{var y=g.indexOf(p);-1!==y&&g.splice(y,1)}gv(g,"<".concat(p.tag,">").concat(yv(p.children),"</").concat(p.tag,">"))}return o}(void 0===q.text||null===q.text?"":String(q.text)),Q=JSON.stringify(J),tt=mv(J),nt=q.layout,it=null!==(n=null==nt?void 0:nt.align)&&void 0!==n?n:"center",et=null!==(r=null==nt?void 0:nt.verticalAlign)&&void 0!==r?r:"middle",rt=null!==(s=null===(l=q.style)||void 0===l?void 0:l.opacity)&&void 0!==s?s:.8,ot=null!==(f=null===(d=q.style)||void 0===d?void 0:d.backgroundColor)&&void 0!==f?f:i.semanticColors.bodyBackground,ut=void 0!==(null===(p=q.style)||void 0===p?void 0:p.backgroundColor)||void 0!==(null===(m=q.style)||void 0===m?void 0:m.opacity),at=(0,o.Cl)((0,o.Cl)({maxWidth:null==nt?void 0:nt.maxWidth},ut&&{backgroundColor:cv(ot,rt)}),{borderColor:null===(b=q.style)||void 0===b?void 0:b.borderColor,borderWidth:null===(x=q.style)||void 0===x?void 0:x.borderWidth,borderStyle:null!==(M=null===(w=q.style)||void 0===w?void 0:w.borderStyle)&&void 0!==M?M:(null===(C=q.style)||void 0===C?void 0:C.borderColor)?"solid":void 0,borderRadius:null===(k=q.style)||void 0===k?void 0:k.borderRadius,padding:null===(A=q.style)||void 0===A?void 0:A.padding,boxShadow:null===(S=q.style)||void 0===S?void 0:S.boxShadow}),lt={color:null===(L=q.style)||void 0===L?void 0:L.textColor,fontSize:null===(D=q.style)||void 0===D?void 0:D.fontSize,fontWeight:null===(V=q.style)||void 0===V?void 0:V.fontWeight,opacity:1};"number"!=typeof(null===(N=q.style)||void 0===N?void 0:N.rotation)||Number.isNaN(q.style.rotation)||(at.transform="rotate(".concat(q.style.rotation,"deg)"),at.transformOrigin="50% 50%");var st=function(t,n,i,e,r){return JSON.stringify({annotationContentSignature:t,containerStyle:n,contentStyle:i,layoutClassName:null!=e?e:"",styleClassName:null!=r?r:""})}(Q,at,lt,null==nt?void 0:nt.className,null===(O=q.style)||void 0===O?void 0:O.className),ct=c[Z],dt=(null==ct?void 0:ct.signature)===st,ft=dt?ct:void 0,vt=Math.max(null!==(E=null!==(T=null==ft?void 0:ft.width)&&void 0!==T?T:null==nt?void 0:nt.maxWidth)&&void 0!==E?E:180,1),ht=Math.max(null!==(F=null==ft?void 0:ft.height)&&void 0!==F?F:60,1),pt="center"===it?-vt/2:"end"===it?-vt:0,gt="middle"===et?-ht/2:"bottom"===et?-ht:0,yt=K.point.x+pt,mt=K.point.y+gt,bt=!1!==(null==nt?void 0:nt.clipToBounds),xt=bt?e.plotRect.x:0,wt=bt?e.plotRect.y:0,Mt=bt?e.plotRect.width:null!==(B=e.svgRect.width)&&void 0!==B?B:0,Ct=bt?e.plotRect.height:null!==(P=e.svgRect.height)&&void 0!==P?P:0,kt=Mt>0?xt+Mt-vt:yt,At=Ct>0?wt+Ct-ht:mt,St=Mt>0?Mv(yt,xt,Math.max(xt,kt)):yt,Lt=Ct>0?Mv(mt,wt,Math.max(wt,At)):mt,Dt={x:St-pt,y:Lt-gt};if(q.connector){var Vt=null!==(_=q.connector.startPadding)&&void 0!==_?_:12,Nt=null!==(H=q.connector.endPadding)&&void 0!==H?H:0,Ot=Math.max(Vt+Nt+6,Vt),Tt=Dt.x-K.anchor.x,Et=Dt.y-K.anchor.y;if((Wt=Math.sqrt(Tt*Tt+Et*Et))<Ot){var Ft={x:0,y:-1},Bt=0===Wt?Ft.x:Tt/Wt,Pt=0===Wt?Ft.y:Et/Wt,_t=K.anchor.x+Bt*Ot+pt,Ht=K.anchor.y+Pt*Ot+gt;Dt={x:(St=_t=Mt>0?Mv(_t,xt,Math.max(xt,kt)):_t)-pt,y:(Lt=Ht=Ct>0?Mv(Ht,wt,Math.max(wt,At)):Ht)-gt}}}var It=(0,o.Cl)({position:"absolute",left:St,top:Lt,pointerEvents:"none",visibility:"hidden"},at);if(dt||g.push(u.createElement("div",{key:"".concat(Z,"-measurement"),ref:function(t){if(t){var n=t.getBoundingClientRect();0===n.width&&0===n.height||v(Z,n.width,n.height,st)}},className:j(a.annotation,a.measurement,null==nt?void 0:nt.className,null===(I=q.style)||void 0===I?void 0:I.className),style:It,"aria-hidden":!0,"data-annotation-key":Z,"data-chart-annotation-measurement":"true"},u.createElement("div",{className:j(a.annotationContent,null==nt?void 0:nt.className,null===(W=q.style)||void 0===W?void 0:W.className),style:lt},xv(J,"".concat(Z,"-measurement"))))),h.push(u.createElement("foreignObject",{key:"".concat(Z,"-annotation"),x:St,y:Lt,width:vt,height:ht,className:j(a.annotationForeignObject),"data-annotation-key":Z},u.createElement("div",{className:j(a.annotation,null==nt?void 0:nt.className,null===(R=q.style)||void 0===R?void 0:R.className),style:at,"data-annotation-key":Z},u.createElement("div",{className:j(a.annotationContent,null===(z=q.style)||void 0===z?void 0:z.className),style:lt,role:null!==(Y=null===($=q.accessibility)||void 0===$?void 0:$.role)&&void 0!==Y?Y:"note","aria-label":null!==(G=null===(X=q.accessibility)||void 0===X?void 0:X.ariaLabel)&&void 0!==G?G:tt||void 0,"aria-describedby":null===(U=q.accessibility)||void 0===U?void 0:U.ariaDescribedBy,"data-chart-annotation":"true","data-annotation-key":Z},xv(J,"".concat(Z,"-content")))))),q.connector){var Wt,Rt=q.connector,zt=Rt.startPadding,jt=(Vt=void 0===zt?12:zt,Rt.endPadding),$t=(Nt=void 0===jt?0:jt,Rt.strokeColor),Yt=void 0===$t?function(t){return t.palette.neutralPrimary}(i):$t,Xt=Rt.strokeWidth,Gt=void 0===Xt?2:Xt,Ut=Rt.dashArray,qt=Rt.arrow,Zt=void 0===qt?"end":qt,Kt=(Tt=K.anchor.x-Dt.x,Et=K.anchor.y-Dt.y,Bt=Tt/(Wt=Math.sqrt(Tt*Tt+Et*Et)||1),Pt=Et/Wt,Math.max(1,Math.min(vt,ht))),Jt=Vt>0?1.25*Vt:24,Qt=.6*Wt,tn=Mv(.35*Kt,6,Math.min(24,Jt,Qt)),nn=Mv(Gt,1,tn/2),en={x:Dt.x+Bt*Vt,y:Dt.y+Pt*Vt},rn={x:K.anchor.x-Bt*Nt,y:K.anchor.y-Pt*Nt};y.push({key:"".concat(Z,"-connector"),start:en,end:rn,strokeColor:Yt,strokeWidth:Gt,dashArray:Ut,arrow:Zt,markerSize:tn,markerStrokeWidth:nn})}}})),0===h.length&&0===y.length)return null;var m=e.svgRect.width||1,b=e.svgRect.height||1,x=[],w=function(t,n,i,e){var r="".concat(l,"-").concat(n,"-").concat(x.length),o=i/2,a="end"===n?i:0,s="M0 0 L ".concat(i," ").concat(o," L0 ").concat(i," Z"),c="M ".concat(i," 0 L0 ").concat(o," L ").concat(i," ").concat(i," Z"),d="end"===n?s:c;return x.push(u.createElement("marker",{key:r,id:r,markerWidth:i,markerHeight:i,viewBox:"0 0 ".concat(i," ").concat(i),refX:a,refY:o,orient:"auto",markerUnits:"userSpaceOnUse"},u.createElement("path",{d:d,fill:t,stroke:t,strokeWidth:e,strokeLinecap:"round",strokeLinejoin:"round"}))),r},M=y.map((function(t){var n,i;return"start"!==t.arrow&&"both"!==t.arrow||(n=w(t.strokeColor,"start",t.markerSize,t.markerStrokeWidth)),"end"!==t.arrow&&"both"!==t.arrow||(i=w(t.strokeColor,"end",t.markerSize,t.markerStrokeWidth)),u.createElement("line",{key:t.key,x1:t.start.x,y1:t.start.y,x2:t.end.x,y2:t.end.y,stroke:t.strokeColor,strokeWidth:t.strokeWidth,strokeDasharray:t.dashArray,strokeLinecap:"round",markerStart:n?"url(#".concat(n,")"):void 0,markerEnd:i?"url(#".concat(i,")"):void 0})})),C=y.length>0||h.length>0;return u.createElement("div",{className:a.root,role:"presentation","data-chart-annotation-layer":"true"},C&&u.createElement("svg",{className:a.connectorLayer,width:"100%",height:"100%",viewBox:"0 0 ".concat(m," ").concat(b),preserveAspectRatio:"none","data-chart-annotation-svg":"true"},x.length>0&&u.createElement("defs",null,x),M.length>0&&u.createElement("g",{"aria-hidden":"true",className:a.connectorGroup},M),h),g)}));Cv.displayName="ChartAnnotationLayer";var kv=(0,a.Z)(),Av=u.lazy((function(){return Promise.resolve().then(i.bind(i,357)).then((function(t){return{default:t.ChartHoverCard}}))})),Sv=function(t){function n(n){var i=t.call(this,n)||this;return i.minLegendContainerHeight=32,i._isRtl=(0,l.jI)(),i._isFirstRender=!0,i._removalValueForTextTuncate=0,i._yAxisTickText=[],i.isIntegralDataset=!0,i.calculateMaxYAxisLabelLength=function(t){return Ss(i._yAxisTickText.map((function(t){return n=t,i.props.showYAxisLablesTooltip?function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.slice(0,n)+i}(n,i.props.noOfCharsToTruncate||4):n;var n})),".".concat(t," text"))},i._multiValueCallout=function(t){var n=i._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:i._classNames.calloutContentRoot},u.createElement("div",{className:i._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:i._classNames.calloutContentX},Rs(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,i.props.culture,i.props.useUTC))),u.createElement("div",{className:i._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,e,r){var a=e+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},Rs(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(e),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(i.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(i.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),i._getCalloutContent(t,e,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:i._classNames.descriptionMessage},t.descriptionMessage)))},i._getData=function(t,n,e){i.props.getGraphData&&i.props.getGraphData(t,n,i.state.containerHeight-i._removalValueForTextTuncate,i.state.containerWidth,i.xAxisElement,i.yAxisElement,e)},i._onChartLeave=function(){i.props.onChartMouseLeave&&i.props.onChartMouseLeave()},i._calculateChartMinWidth=function(){var t=i._calcMaxLabelWidthWithTransform(i._tickValues)+10,n=i.margins.left+i.margins.right+t*(i._tickValues.length-1);return[ts.GroupedVerticalBarChart,ts.VerticalBarChart,ts.VerticalStackedBarChart].includes(i.props.chartType)&&(n+=16),n},i._getChartDescription=function(){return(i.props.chartTitle||"Chart. ")+i._getAxisTitle("X",i.props.xAxisTitle,i.props.xAxisType)+i._getAxisTitle("Y",i.props.yAxisTitle,i.props.yAxisType||is.NumericAxis)+(i.props.secondaryYScaleOptions?i._getAxisTitle("secondary Y",i.props.secondaryYAxistitle,is.NumericAxis):"")},i._getAxisTitle=function(t,n,i){return"The ".concat(t," axis displays ")+(n||(i===ns.StringAxis||i===is.StringAxis?"categories":i===ns.DateAxis||i===is.DateAxis?"time":"values"))+". "},i._calcMaxLabelWidthWithTransform=function(t){if(!i.props.wrapXAxisLables&&i.props.rotateXAxisLables&&i.props.xAxisType===ns.StringAxis){var n=Ss(t,".".concat(i._classNames.xAxis," text"));return Math.ceil(n*Math.cos(Math.PI/4))}if(i.props.showXAxisLablesTooltip){var e=t.map((function(t){var n=i.props.noOfCharsToTruncate||4;return t.toString().length>n?"".concat(t.toString().slice(0,n),"..."):t})),r=Ss(e,".".concat(i._classNames.xAxis," text"));return Math.ceil(r)}if(i.props.wrapXAxisLables){var o=[];t.forEach((function(t){o.push.apply(o,t.toString().split(/\s+/))}));var u=Ss(o,".".concat(i._classNames.xAxis," text"));return Math.max(Math.ceil(u),10)}var a=Ss(t,".".concat(i._classNames.xAxis," text"));return Math.ceil(a)},i._transformXAxisLabels=function(){var t,n,e;if(i._removalValueForTextTuncate=0,i.props.wrapXAxisLables||i.props.showXAxisLablesTooltip){var r=void 0;i.props.xAxisType===ns.StringAxis&&(r=((null===(t=i.props.datasetForXAxisDomain)||void 0===t?void 0:t.length)||0)>1?i._xScale.step():i.state.containerWidth);var o={node:i.xAxisElement,xAxis:i._xScale,showXAxisLablesTooltip:i.props.showXAxisLablesTooltip||!1,noOfCharsToTruncate:i.props.noOfCharsToTruncate||4,width:r};i._removalValueForTextTuncate=null!==(n=function(t){var n=t.node,i=t.xAxis,e=t.noOfCharsToTruncate,r=t.showXAxisLablesTooltip,o=t.width,u=void 0===o?10:o;if(null!==n){var a=sl(n).call(i),l=0,s=1;if(a.selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i="".concat(t.text().slice(0,e),"..."),o=t.text().length,a=t.text().split(/\s+/).reverse(),l="",c=[],d=0,f=t.attr("y"),v=parseFloat(t.attr("dy")),h=t.text(null).append("tspan").attr("x",0).attr("y",f).attr("id","BaseSpan").attr("dy",v+"em").attr("data-",n);if(r&&o>e)h=t.append("tspan").attr("id","showDots").attr("x",0).attr("y",f).attr("dy",v+"em").text(i);else if(r&&o<=e)h=t.append("tspan").attr("id","LessLength").attr("x",0).attr("y",f).attr("dy",v+"em").text(n);else for(;l=a.pop();)c.push(l),h.text(c.join(" ")),h.node().getComputedTextLength()>u&&c.length>1&&(c.pop(),h.text(c.join(" ")),c=[l],h=t.append("tspan").attr("id","WordBreakId").attr("x",0).attr("y",f).attr("dy",1.1*++d+v+"em").text(l));s=Math.max(s,d+1)})),!r){var c=12,d=document.getElementById("WordBreakId"),f=d&&d.getBoundingClientRect(),v=f&&f.height;v>c&&(c=v),l=(s-1)*c}return l>0?l:0}}(o))&&void 0!==n?n:0}if(!i.props.wrapXAxisLables&&i.props.rotateXAxisLables&&i.props.xAxisType===ns.StringAxis){var u=null!==(e=function(t){var n=t.node,i=t.xAxis;if(null!==n&&null!==i){var e=0,r=[];sl(n).call(i).selectAll(".tick").each((function(){var t=this.getAttribute("transform");if(-1===(null==t?void 0:t.indexOf("rotate"))){var n=t.substring(t.indexOf("(")+1,t.indexOf(")")).split(",");2===n.length&&(r.push(n[0]),this.setAttribute("transform","translate(".concat(n[0],",0)rotate(-45)")))}var i=this.getBoundingClientRect(),o=i&&i.height;o>e&&(e=o)}));var o=0;return sl(n).call(i).selectAll(".tick").each((function(){r.length>o&&(this.setAttribute("transform","translate(".concat(r[o],",").concat(e/2,")rotate(-45)")),o+=1)})),Math.floor(e/1.414)}}({node:i.xAxisElement,xAxis:i._xScale}))&&void 0!==e?e:0;i._removalValueForTextTuncate=u+i.margins.bottom}},i._calcMargins=function(){var t=i._getDefaultMargins();return t=i._applyTitleMargins(t),t=i._applyAnnotationMargins(t),i._isRtl&&(t=i._swapRtlMargins(t)),(0,o.Cl)((0,o.Cl)({},t),i.props.margins)},i._getDefaultMargins=function(){return{top:20,bottom:35,left:Math.max(40,i.state.startFromX+20),right:i.props.secondaryYScaleOptions?40:20}},i._applyTitleMargins=function(t){var n=(0,o.Cl)({},t);return void 0!==i.props.xAxisTitle&&""!==i.props.xAxisTitle&&(n.bottom+=20),void 0!==i.props.yAxisTitle&&""!==i.props.yAxisTitle&&(n.left+=24),void 0!==i.props.secondaryYAxistitle&&""!==i.props.secondaryYAxistitle&&(n.right+=24),n},i._applyAnnotationMargins=function(t){var n=(0,o.Cl)({},t);return void 0!==i.props.xAxisAnnotation&&""!==i.props.xAxisAnnotation&&(n.top+=20),void 0===i.props.yAxisAnnotation||""===i.props.yAxisAnnotation||void 0!==i.props.secondaryYAxistitle&&""!==i.props.secondaryYAxistitle||(n.right+=24),n},i._swapRtlMargins=function(t){return(0,o.Cl)((0,o.Cl)({},t),{left:t.right,right:t.left})},i.state={containerHeight:0,containerWidth:0,_width:i.props.width||600,_height:i.props.height||350,startFromX:0},i.idForGraph=p("chart_"),i.idForDefaultTabbableElement=p("defaultTabbableElement_"),i._tooltipId=p("tooltip_"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){if(this._fitParentContainer(),this.props.showYAxisLables){var t=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==t&&this.setState({startFromX:t})}else 0!==this.state.startFromX&&this.setState({startFromX:0});this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0}))},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.componentDidUpdate=function(t){if(t.height===this.props.height&&t.width===this.props.width||this._fitParentContainer(),this.props.showYAxisLables){var n=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==n&&this.setState({startFromX:n})}else 0!==this.state.startFromX&&this.setState({startFromX:0});t.points!==this.props.points&&(this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0})))},n.prototype.render=function(){var t,n,i,e,r,a,l,s,c,d,f=this,v=this.props,h=v.calloutProps,p=v.points,g=v.chartType,y=v.chartHoverProps,m=v.svgFocusZoneProps,b=v.svgProps,x=v.culture,w=v.dateLocalizeOptions,M=v.timeFormatLocale,C=v.customDateTimeFormatter;this.props.parentRef&&this._fitParentContainer(),this.margins=this._calcMargins(),this.props.getmargins&&this.props.getmargins(this.margins),this._classNames=kv(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,enableReflow:this.props.enableReflow});var k,A,S,L,D,V,N,O=null,T=null;if(this.props.enableFirstRenderOptimization&&this.chartContainer||!this.props.enableFirstRenderOptimization){this._isFirstRender=!1;var E=(0,o.Cl)({domainNRangeValues:this.props.getDomainNRangeValues(p,this.props.getDomainMargins?this.props.getDomainMargins(this.state.containerWidth):this.margins,this.state.containerWidth,g,this._isRtl,this.props.xAxisType,this.props.barwidth,this.props.tickValues),containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,margins:this.margins,xAxisElement:this.xAxisElement,showRoundOffXTickValues:null===(r=this.props.showRoundOffXTickValues)||void 0===r||r,xAxisCount:this.props.xAxisTickCount,xAxistickSize:this.props.xAxistickSize,tickPadding:this.props.tickPadding||this.props.showXAxisLablesTooltip?5:10,xAxisPadding:this.props.xAxisPadding,xAxisInnerPadding:this.props.xAxisInnerPadding,xAxisOuterPadding:this.props.xAxisOuterPadding,containerWidth:this.state.containerWidth,hideTickOverlap:this.props.hideTickOverlap,calcMaxLabelWidth:this._calcMaxLabelWidthWithTransform},this.props.xAxis),F=void 0,B=void 0;switch(this.props.xAxisType){case ns.NumericAxis:F=(t=ms(E,this.props.tickParams,this.props.chartType,x,this.props.xScaleType)).xScale,B=t.tickValues;break;case ns.DateAxis:F=(n=function(t,n,i,e,r,o,u,a){var l=t.domainNRangeValues,s=t.xAxisElement,c=t.tickPadding,d=void 0===c?6:c,f=t.xAxistickSize,v=void 0===f?6:f,h=t.xAxisCount,p=t.calcMaxLabelWidth,g=t.tickStep,y=t.tick0,m=t.tickText,b=u?Au():ku();b.domain([l.dStartValue,l.dEndValue]).range([l.rStartValue,l.rEndValue]).nice();var x=null!=h?h:6,w=100,M=-1,C=r?$e(r):void 0;b.ticks().forEach((function(t){var n=bs(t,u);n>M&&(M=n),n<w&&(w=n)}));var k=null!=e?e:(0,Yn.c2)(w,M),A=function(t,n,i,e){var r="%c",o="%a %d, %X",u="%b %d, %X",a="%-I:%M %p",l="%b %d, %-I:%M %p",s="%b %d, %-I %p",c="%b %d";return(i?e?i.utcFormat:i.format:e?Ge:Xe)([[".%L",":%S.%L","%M:%S.%L","%-I:%M:%S.%L %p",o,u,u,r],[r,":%S","%-I:%M:%S","%X",o,u,u,r],[r,r,a,a,"%a %d, %-I:%M %p",l,l,"%x, %-I:%M %p"],[r,r,r,"%-I %p","%a %d, %-I %p",s,s,"%x, %-I %p"],[r,r,r,r,"%a %d",c,c,"%x"],[r,r,r,r,r,c,c,"%x"],[r,r,r,r,r,r,"%B","%b %Y"],[r,r,r,r,r,r,r,"%Y"]][t][n])}(w,M,C,u),S=function(t,e){return n.tickValues&&m&&void 0!==m[e]?m[e]:o?o(t):r?A(t):void 0===i&&n.tickFormat?u?Ge(n.tickFormat)(t):Xe(n.tickFormat)(t):(0,Yn.Yn)(t,i,u,!1,k)},L=p(b.ticks().map(S))+40,D=b.range(),V=D[0],N=D[1],O=Math.min(Math.max(1,Math.floor(Math.abs(N-V)/L)),10);x=Math.min(O,null!=h?h:x);var T,E=ni(b).tickSize(v).tickPadding(d).ticks(x).tickFormat(S);[ts.GanttChart].includes(a)&&E.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues?T=n.tickValues:g&&(T=vc(g,y,b.domain(),u)),T&&E.tickValues(T),s&&sl(s).call(E).selectAll("text").attr("aria-hidden","true");var F=(null!=T?T:b.ticks(x)).map(E.tickFormat());return{xScale:b,tickValues:F}}(E,this.props.tickParams,x,w,M,C,this.props.useUTC,this.props.chartType)).xScale,B=n.tickValues;break;case ns.StringAxis:i=function(t,n,i){var e,r=t.domainNRangeValues,o=t.xAxistickSize,u=void 0===o?6:o,a=t.tickPadding,l=void 0===a?10:a,s=t.xAxisPadding,c=void 0===s?.1:s,d=t.xAxisInnerPadding,f=t.xAxisOuterPadding,v=t.containerWidth,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=t.tickText,y=Tu().domain(i).range([r.rStartValue,r.rEndValue]).paddingInner(void 0!==d?d:c).paddingOuter(void 0!==f?f:c),m=null!==(e=n.tickValues)&&void 0!==e?e:i;if(h){var b=[],x=m.map((function(t){return p([t])})),w=0,M=v,C=1,k=y.range();k[1]-k[0]<0&&(w=v,M=0,C=-1);for(var A=m.length-1;A>=0;A--){var S=y(m[A]);C*(S-C*x[A]/2-w)>=0&&C*(S+C*x[A]/2-M)<=0&&(b.push(m[A]),M=S-C*(x[A]/2+10))}m=b=b.reverse()}var L=ni(y).tickSize(u).tickPadding(l).tickValues(m).tickFormat((function(t,i){return n.tickValues&&g&&void 0!==g[i]?g[i]:t}));return t.xAxisElement&&sl(t.xAxisElement).call(L).selectAll("text").attr("aria-hidden","true"),{xScale:y,tickValues:m}}(E,this.props.tickParams,this.props.datasetForXAxisDomain),F=i.xScale,B=i.tickValues;break;default:F=(e=ms(E,this.props.tickParams,this.props.chartType,x,this.props.xScaleType)).xScale,B=e.tickValues}this._xScale=F,this._tickValues=B,this._transformXAxisLabels();var P=(0,o.Cl)({margins:this.props.getYDomainMargins?this.props.getYDomainMargins(this.state.containerHeight):this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElement,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:this.props.yMinValue||0,yMaxValue:this.props.yMaxValue||0,tickPadding:10,maxOfYVal:this.props.maxOfYVal,yMinMaxValues:this.props.getMinMaxOfYAxis(p,this.props.yAxisType),yAxisPadding:this.props.yAxisPadding||0,tickValues:this.props.yAxisTickValues},this.props.yAxis),_={yAxisDomainValues:[],yAxisTickText:[]};if(this.props.yAxisType&&this.props.yAxisType===is.StringAxis)k=this.props.createStringYAxis(P,this.props.stringDatasetForYAxisDomain,this._isRtl,_,this.props.barwidth,this.props.chartType);else{if(null===(a=this.props)||void 0===a?void 0:a.secondaryYScaleOptions){var H={margins:this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElementSecondary,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:(null===(l=this.props.secondaryYScaleOptions)||void 0===l?void 0:l.yMinValue)||0,yMaxValue:null!==(c=null===(s=this.props.secondaryYScaleOptions)||void 0===s?void 0:s.yMaxValue)&&void 0!==c?c:100,tickPadding:10,yMinMaxValues:this.props.getMinMaxOfYAxis(p,this.props.yAxisType,!0),yAxisPadding:this.props.yAxisPadding};A=this.props.createYAxis(H,this._isRtl,_,this.isIntegralDataset,!0,this.props.supportNegativeData,this.props.roundedTicks,this.props.secondaryYScaleType)}k=this.props.createYAxis(P,this._isRtl,_,this.isIntegralDataset,!1,this.props.supportNegativeData,this.props.roundedTicks,this.props.yScaleType)}if(this._yAxisTickText=_.yAxisTickText,this.props.getAxisData&&this.props.getAxisData(_),!this.props.showYAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(this.props.showYAxisLablesTooltip){k&&(S=this.yAxisElement,L=k,D=this.props.noOfCharsToTruncate||4,V=this.props.showYAxisLablesTooltip||!1,N=this._isRtl,null!==S&&sl(S).call(L).selectAll(".tick text").each((function(){var t=sl(this),n=t.text(),i=N?"...".concat(t.text().slice(0,D)):"".concat(t.text().slice(0,D),"..."),e=t.text().length,r=t.attr("y"),o=t.attr("x"),u=parseFloat(t.attr("dy"));t.text(null).append("tspan").attr("x",o).attr("y",r).attr("id","BaseSpan").attr("dy",u+"em").attr("data-",n),V&&e>D?t.append("tspan").attr("id","showDots").attr("x",o).attr("y",r).attr("dy",u+"em").attr("dx","0em").text(i):t.append("tspan").attr("id","LessLength").attr("x",o).attr("y",r).attr("dx","0em").text(n)})));var I=sl(this.yAxisElement).call(k);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var W={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:I};I&&Ls(W)}this._getData(F,k,A),T=this.props.children((0,o.Cl)((0,o.Cl)({},this.state),{xScale:F,yScalePrimary:k,yScaleSecondary:A})),!this.props.hideTooltip&&h.isCalloutVisible&&(O=this._generateCallout(h,y))}var R,z={width:this.state.containerWidth,height:this.state.containerHeight},j=Math.max(0,z.width-this.margins.left-this.margins.right),$=Math.max(0,z.height-this.margins.top-this.margins.bottom-this._removalValueForTextTuncate),Y={x:this.margins.left,y:this.margins.top,width:j,height:$},X=null!==(d=this.props.annotations)&&void 0!==d?d:[],G=X.length>0,U=G?{plotRect:Y,svgRect:z,isRtl:this._isRtl,xScale:this._xScale,yScalePrimary:k,yScaleSecondary:A}:void 0;R=this.props.focusZoneDirection===rc.vertical||this.props.focusZoneDirection?this.props.focusZoneDirection:rc.horizontal;var q=z.width-this.margins.left-this.margins.right-16,Z=z.height-this.margins.bottom-this.margins.top-this._removalValueForTextTuncate-16,K=this.margins.top+8+Z/2,J=this._isRtl?z.width-8:16,Q=this._isRtl?16:z.width-8,tt={wrapContent:As,theme:this.props.theme,showBackground:!0,className:this._classNames.svgTooltip};return u.createElement("div",{id:this.idForGraph,className:this._classNames.root,ref:function(t){f.chartContainer=t},onMouseLeave:this._onChartLeave},!this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement(Xc,(0,o.Cl)({direction:R,className:this._classNames.chartWrapper,defaultTabbableElement:"#".concat(this.idForDefaultTabbableElement)},m),this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement("svg",(0,o.Cl)({width:z.width,height:z.height,role:"region","aria-label":this._getChartDescription(),style:{display:"block"},className:this._classNames.chart},Xs(b)),u.createElement("g",{ref:function(t){f.xAxisElement=t},id:"xAxisGElement".concat(this.idForGraph),transform:"translate(0, ".concat(z.height-this.margins.bottom-this._removalValueForTextTuncate,")"),className:this._classNames.xAxis}),void 0!==this.props.xAxisTitle&&""!==this.props.xAxisTitle&&u.createElement(sv,(0,o.Cl)({content:this.props.xAxisTitle,textProps:{x:this.margins.left+8+q/2,y:z.height-8,className:this._classNames.axisTitle,textAnchor:"middle","aria-hidden":!0},maxWidth:q},tt)),void 0!==this.props.xAxisAnnotation&&""!==this.props.xAxisAnnotation&&u.createElement(sv,(0,o.Cl)({content:this.props.xAxisAnnotation,textProps:{x:this.margins.left+8+q/2,y:12,className:this._classNames.axisAnnotation,textAnchor:"middle","aria-hidden":!0},maxWidth:q},tt)),u.createElement("g",{ref:function(t){f.yAxisElement=t},id:"yAxisGElement".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?z.width-this.margins.right:this.margins.left,", 0)"),className:this._classNames.yAxis}),this.props.secondaryYScaleOptions&&u.createElement("g",null,u.createElement("g",{ref:function(t){f.yAxisElementSecondary=t},id:"yAxisGElementSecondary".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?this.margins.left:z.width-this.margins.right,", 0)"),className:this._classNames.yAxis}),void 0!==this.props.secondaryYAxistitle&&""!==this.props.secondaryYAxistitle&&u.createElement(sv,(0,o.Cl)({content:this.props.secondaryYAxistitle,textProps:{x:Q,y:K,textAnchor:"middle",transform:"rotate(-90, ".concat(Q,", ").concat(K,")"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:Z},tt))),T,void 0!==this.props.yAxisTitle&&""!==this.props.yAxisTitle&&u.createElement(sv,(0,o.Cl)({content:this.props.yAxisTitle,textProps:{x:J,y:K,textAnchor:"middle",transform:"rotate(-90, ".concat(J,", ").concat(K,")"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:Z},tt)),void 0!==this.props.yAxisAnnotation&&""!==this.props.yAxisAnnotation&&(void 0===this.props.secondaryYAxistitle||""===this.props.secondaryYAxistitle)&&u.createElement(sv,(0,o.Cl)({content:this.props.yAxisAnnotation,textProps:{x:Q,y:K,textAnchor:"middle",transform:"rotate(-90, ".concat(Q,", ").concat(K,")"),className:this._classNames.axisAnnotation,"aria-hidden":!0},maxWidth:Z},tt))),G&&U&&u.createElement(Cv,{annotations:X,context:U,theme:this.props.theme,className:this._classNames.annotationLayer})),!this.props.hideLegend&&u.createElement("div",{ref:function(t){f.legendContainer=t},className:this._classNames.legendContainer},this.props.legendBars),O&&u.createElement(u.Suspense,{fallback:u.createElement("div",null,"Loading...")},O))},n.prototype._generateCallout=function(t,n){return u.createElement($n,(0,o.Cl)({hidden:!(!this.props.hideTooltip&&t.isCalloutVisible),shouldUpdateWhenHidden:!0},t),this.props.customizedCallout&&this.props.customizedCallout,!this.props.customizedCallout&&this.props.isCalloutForStack&&this._multiValueCallout(t),!this.props.customizedCallout&&!this.props.isCalloutForStack&&u.createElement(Av,(0,o.Cl)({XValue:t.XValue,Legend:t.legend,YValue:t.YValue,color:t.color,culture:this.props.culture},n)))},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r,o=e?{}:{marginRight:"16px"},a=void 0!==t.index&&-1!==t.index,l=kv(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,lineColor:t.color,toDrawShape:a}),s=this.props,c=s.culture,d=s.useUTC,f=(0,Yn.c$)(t.y,c,d);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var v=t.yAxisCalloutData;return u.createElement("div",{style:o},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),Object.keys(v).map((function(t){return u.createElement("div",{key:t,className:l.calloutBlockContainer},u.createElement("div",{className:l.calloutlegendText},(0,Yn.c$)(t,c,d)),u.createElement("div",{className:l.calloutContentY},(0,Yn.c$)(v[t],c,d)))})))}return u.createElement("div",{style:i?o:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:l.calloutBlockContainer},a&&u.createElement(Zd,{svgProps:{className:l.shapeStyles},pathProps:{fill:t.color},shape:_s[t.index%Object.keys(Ws).length]}),u.createElement("div",null,u.createElement("div",{className:l.calloutlegendText}," ",t.legend),u.createElement("div",{className:l.calloutContentY},(0,Yn.c$)(t.yAxisCalloutData?t.yAxisCalloutData:null!==(r=t.y)&&void 0!==r?r:t.data,c,d)))))},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n;if(t.props.hideLegend)n=0;else{var r=t.legendContainer&&getComputedStyle(t.legendContainer);n=(t.legendContainer&&t.legendContainer.getBoundingClientRect().height||t.minLegendContainerHeight)+parseFloat(r&&r.marginTop||"0")+parseFloat(r&&r.marginBottom||"0")}if(t.props.parentRef||t.chartContainer){var o=t.props.parentRef?t.props.parentRef:t.chartContainer,u=t.props.enableReflow&&!t._isFirstRender?Math.max(o.getBoundingClientRect().width,t._calculateChartMinWidth()):o.getBoundingClientRect().width,a=o.getBoundingClientRect().height>n?o.getBoundingClientRect().height:350;(i!==u||e!==a-n)&&t.setState({containerWidth:u,containerHeight:a-n})}}))},n}(u.Component),Lv=function(){var t,n=(0,s.z)();return!!(null===(t=null==n?void 0:n.navigator)||void 0===t?void 0:t.userAgent)&&n.navigator.userAgent.indexOf("rv:11.0")>-1}(),Dv=(0,r.I)(Sv,(function(t){var n,i,e,r,u,a,l,s,c,d=t.className,f=t.theme,v=t.isRtl,h=t.shouldHighlight,p=t.href,g=t.lineColor,y=void 0===g?"transparent":g,m=t.toDrawShape,b=t.enableReflow,x=f.fonts;return{root:[f.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},d],chartWrapper:(0,o.Cl)({position:"relative"},b?{overflow:"auto"}:{}),plotContainer:{position:"relative",width:"100%",height:"100%"},axisTitle:nv(f,f.fonts.xSmall),axisAnnotation:nv(f,f.fonts.small),xAxis:{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}],line:{opacity:.2,stroke:f.semanticColors.bodyText,width:"1px",selectors:(i={},i[It.up]={opacity:.1,stroke:"CanvasText"},i)},path:{display:"none"}}},yAxis:{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(e={},e[It.up]={fill:"CanvasText"},e)}],path:{display:"none"},line:{opacity:.2,stroke:f.semanticColors.bodyText,selectors:(r={},r[It.up]={opacity:.1,stroke:"CanvasText"},r)},g:[v&&!Lv&&{textAnchor:"end"}]}},opacityChangeOnHover:{opacity:h?"":"0.1",cursor:p?"pointer":"default"},legendContainer:[{marginTop:"8px",marginLeft:"20px"}],calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:f.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",opacity:"0.85",color:f.semanticColors.bodySubtext})],calloutBlockContainer:[f.fonts.mediumPlus,{marginTop:"13px",color:f.semanticColors.bodyText},!m&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(y),paddingLeft:"8px"},m&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:f.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},x.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[f.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:f.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(f.semanticColors.menuDivider)}],tooltip:tv(f),svgTooltip:(c={fill:f.semanticColors.bodyBackground},c[It.up]={fill:"Canvas"},c),annotationLayer:{pointerEvents:"none"}}})),Vv=(0,an.J5)((function(t){return(0,an.J5)((function(n){var i=(0,an.J5)((function(t){return function(i){return n(i,t)}}));return function(e,r){return t(e,r?i(r):n)}}))}));function Nv(t,n){return Vv(t)(n)}var Ov=function(t){if(void 0===t)return 0;var n=0;return"scrollTop"in t?n=t.scrollTop:"scrollY"in t&&(n=t.scrollY),Math.ceil(n)},Tv=function(t,n){"scrollTop"in t?t.scrollTop=n:"scrollY"in t&&t.scrollTo(t.scrollX,n)},Ev="spacer-",Fv=1/3,Bv={top:-1,bottom:-1,left:-1,right:-1,width:0,height:0},Pv=function(t){return t.getBoundingClientRect()},_v=Pv,Hv=Pv,Iv=function(t){function n(n){var i=t.call(this,n)||this;return i._root=u.createRef(),i._surface=u.createRef(),i._pageRefs={},i._getDerivedStateFromProps=function(t,n){return t.items!==i.props.items||t.renderCount!==i.props.renderCount||t.startIndex!==i.props.startIndex||t.version!==i.props.version||!n.hasMounted&&i.props.renderEarly&&(0,Vn.S)()?(i._resetRequiredWindows(),i._requiredRect=null,i._measureVersion++,i._invalidatePageCache(),i._updatePages(t,n)):n},i._onRenderRoot=function(t){var n=t.rootRef,i=t.surfaceElement,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderSurface=function(t){var n=t.surfaceRef,i=t.pageElements,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderPage=function(t,n){for(var e,r=i.props,a=r.onRenderCell,l=r.onRenderCellConditional,s=r.role,c=t.page,d=c.items,f=void 0===d?[]:d,v=c.startIndex,h=(0,o.Tt)(t,["page"]),p=void 0===s?"listitem":"presentation",g=[],y=0;y<f.length;y++){var m=v+y,b=f[y],x=i.props.getKey?i.props.getKey(b,m):b&&b.key;null==x&&(x=m);var w=null!=l?l:a,M=null!==(e=null==w?void 0:w(b,m,i.props.ignoreScrollingState?void 0:i.state.isScrolling))&&void 0!==e?e:null;l&&!M||g.push(u.createElement("div",{role:p,className:"ms-List-cell",key:x,"data-list-index":m,"data-automationid":"ListCell"},M))}return u.createElement("div",(0,o.Cl)({},h),g)},Ac(i),i.state={pages:[],isScrolling:!1,getDerivedStateFromProps:i._getDerivedStateFromProps,hasMounted:!1},i._estimatedPageHeight=0,i._totalEstimates=0,i._requiredWindowsAhead=0,i._requiredWindowsBehind=0,i._measureVersion=0,i._cachedPageHeights={},i._estimatedPageHeight=0,i._focusedIndex=-1,i._pageCache={},i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){return n.getDerivedStateFromProps(t,n)},Object.defineProperty(n.prototype,"pageRefs",{get:function(){return this._pageRefs},enumerable:!1,configurable:!0}),n.prototype.scrollToIndex=function(t,n,i){void 0===i&&(i=0);for(var e=this.props.startIndex,r=e+this._getRenderCount(),o=this._allowedRect,u=0,a=1,l=e;l<r;l+=a){var s=this._getPageSpecification(this.props,l,o),c=s.height;if(a=s.itemCount,l<=t&&l+a>t){if(n&&this._scrollElement){for(var d=Hv(this._scrollElement),f=Ov(this._scrollElement),v={top:f,bottom:f+d.height},h=t-l,p=0;p<h;++p)u+=n(l+p);var g=u+n(t);switch(i){case 1:return void Tv(this._scrollElement,u);case 2:return void Tv(this._scrollElement,g-d.height);case 3:return void Tv(this._scrollElement,(u+g-d.height)/2)}if(u>=v.top&&g<=v.bottom)return;u<v.top||g>v.bottom&&(u=g-d.height)}return void(this._scrollElement&&Tv(this._scrollElement,u))}u+=c}},n.prototype.getStartItemIndexInView=function(t){for(var n=0,i=this.state.pages||[];n<i.length;n++){var e=i[n];if(!e.isSpacer&&(this._scrollTop||0)>=e.top&&(this._scrollTop||0)<=e.top+e.height){if(!t){var r=Math.floor(e.height/e.itemCount);return e.startIndex+Math.floor((this._scrollTop-e.top)/r)}for(var o=0,u=e.startIndex;u<e.startIndex+e.itemCount;u++){if(r=t(u),e.top+o<=this._scrollTop&&this._scrollTop<e.top+o+r)return u;o+=r}}}return 0},n.prototype.componentDidMount=function(){this._async=new Nt(this),this._events=new sd(this),this._onAsyncScrollDebounced=this._async.debounce(this._onAsyncScroll,100,{leading:!1,maxWait:500}),this._onAsyncIdleDebounced=this._async.debounce(this._onAsyncIdle,200,{leading:!1}),this._onAsyncResizeDebounced=this._async.debounce(this._onAsyncResize,16,{leading:!1}),this._onScrollingDoneDebounced=this._async.debounce(this._onScrollingDone,500,{leading:!1}),this._scrollElement=K(this._root.current),this._scrollTop=0,this.setState((0,o.Cl)((0,o.Cl)({},this._updatePages(this.props,this.state)),{hasMounted:!0})),this._measureVersion++;var t=function(t){var n;return null!==(n=null==t?void 0:t.window)&&void 0!==n?n:"undefined"!=typeof window?window:void 0}(this.context);this._events.on(t,"resize",this._onAsyncResizeDebounced),this._root.current&&this._events.on(this._root.current,"focus",this._onFocus,!0),this._scrollElement&&(this._events.on(this._scrollElement,"scroll",this._onScroll),this._events.on(this._scrollElement,"scroll",this._onAsyncScrollDebounced))},n.prototype.componentDidUpdate=function(t,n){var i=this.props,e=this.state;this.state.pagesVersion!==n.pagesVersion&&(i.getPageHeight?this._onAsyncIdleDebounced():this._updatePageMeasurements(e.pages)?(this._materializedRect=null,this._hasCompletedFirstRender?this._onAsyncScrollDebounced():(this._hasCompletedFirstRender=!0,this.setState(this._updatePages(i,e)))):this._onAsyncIdleDebounced(),i.onPagesUpdated&&i.onPagesUpdated(e.pages))},n.prototype.componentWillUnmount=function(){var t,n;null===(t=this._async)||void 0===t||t.dispose(),null===(n=this._events)||void 0===n||n.dispose(),delete this._scrollElement},n.prototype.shouldComponentUpdate=function(t,n){var i=this.state.pages,e=n.pages,r=!1;if(!n.isScrolling&&this.state.isScrolling)return!0;if(t.version!==this.props.version)return!0;if(t.className!==this.props.className)return!0;if(t.items===this.props.items&&i.length===e.length)for(var o=0;o<i.length;o++){var u=i[o],a=e[o];if(u.key!==a.key||u.itemCount!==a.itemCount){r=!0;break}}else r=!0;return r},n.prototype.forceUpdate=function(){this._invalidatePageCache(),this._updateRenderRects(this.props,this.state,!0),this.setState(this._updatePages(this.props,this.state)),this._measureVersion++,t.prototype.forceUpdate.call(this)},n.prototype.getTotalListHeight=function(){return this._surfaceRect.height},n.prototype.render=function(){for(var t=this.props,n=t.className,i=t.role,e=void 0===i?"list":i,r=t.onRenderSurface,u=t.onRenderRoot,a=this.state.pages,l=void 0===a?[]:a,s=[],c=z(this.props,R),d=0,f=l;d<f.length;d++){var v=f[d];s.push(this._renderPage(v))}var h=r?Nv(r,this._onRenderSurface):this._onRenderSurface;return(u?Nv(u,this._onRenderRoot):this._onRenderRoot)({rootRef:this._root,pages:l,surfaceElement:h({surfaceRef:this._surface,pages:l,pageElements:s,divProps:{role:"presentation",className:"ms-List-surface"}}),divProps:(0,o.Cl)((0,o.Cl)({},c),{className:j("ms-List",n),role:s.length>0?e:void 0,"aria-label":s.length>0?c["aria-label"]:void 0})})},n.prototype._shouldVirtualize=function(t){void 0===t&&(t=this.props);var n=t.onShouldVirtualize;return!n||n(t)},n.prototype._invalidatePageCache=function(){this._pageCache={}},n.prototype._renderPage=function(t){var n,i=this,e=this.props.usePageCache;if(e&&(n=this._pageCache[t.key])&&n.pageElement)return n.pageElement;var r=this._getPageStyle(t),o=this.props.onRenderPage,u=(void 0===o?this._onRenderPage:o)({page:t,className:"ms-List-page",key:t.key,ref:function(n){i._pageRefs[t.key]=n},style:r,role:"presentation"},this._onRenderPage);return e&&0===t.startIndex&&(this._pageCache[t.key]={page:t,pageElement:u}),u},n.prototype._getPageStyle=function(t){var n=this.props.getPageStyle;return(0,o.Cl)((0,o.Cl)({},n?n(t):{}),t.items?{}:{height:t.height})},n.prototype._onFocus=function(t){for(var n=t.target;n!==this._surface.current;){var i=n.getAttribute("data-list-index");if(i){this._focusedIndex=Number(i);break}n=b(n)}},n.prototype._onScroll=function(){this.state.isScrolling||this.props.ignoreScrollingState||this.setState({isScrolling:!0}),this._resetRequiredWindows(),this._onScrollingDoneDebounced()},n.prototype._resetRequiredWindows=function(){this._requiredWindowsAhead=0,this._requiredWindowsBehind=0},n.prototype._onAsyncScroll=function(){var t,n;this._updateRenderRects(this.props,this.state),this._materializedRect&&(t=this._requiredRect,n=this._materializedRect,t.top>=n.top&&t.left>=n.left&&t.bottom<=n.bottom&&t.right<=n.right)||this.setState(this._updatePages(this.props,this.state))},n.prototype._onAsyncIdle=function(){var t=this.props,n=t.renderedWindowsAhead,i=t.renderedWindowsBehind,e=this._requiredWindowsAhead,r=this._requiredWindowsBehind,o=Math.min(n,e+1),u=Math.min(i,r+1);o===e&&u===r||(this._requiredWindowsAhead=o,this._requiredWindowsBehind=u,this._updateRenderRects(this.props,this.state),this.setState(this._updatePages(this.props,this.state))),(n>o||i>u)&&this._onAsyncIdleDebounced()},n.prototype._onScrollingDone=function(){this.props.ignoreScrollingState||(this.setState({isScrolling:!1}),this._onAsyncIdle())},n.prototype._onAsyncResize=function(){this.forceUpdate()},n.prototype._updatePages=function(t,n){this._requiredRect||this._updateRenderRects(t,n);var i=this._buildPages(t,n),e=n.pages;return this._notifyPageChanges(e,i.pages,this.props),(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),i),{pagesVersion:{}})},n.prototype._notifyPageChanges=function(t,n,i){var e=i.onPageAdded,r=i.onPageRemoved;if(e||r){for(var o={},u=0,a=t;u<a.length;u++)(c=a[u]).items&&(o[c.startIndex]=c);for(var l=0,s=n;l<s.length;l++){var c;(c=s[l]).items&&(o[c.startIndex]?delete o[c.startIndex]:this._onPageAdded(c))}for(var d in o)o.hasOwnProperty(d)&&this._onPageRemoved(o[d])}},n.prototype._updatePageMeasurements=function(t){var n=!1;if(!this._shouldVirtualize())return n;for(var i=0;i<t.length;i++){var e=t[i];e.items&&(n=this._measurePage(e)||n)}return n},n.prototype._measurePage=function(t){var n=!1,i=this._pageRefs[t.key],e=this._cachedPageHeights[t.startIndex];if(i&&this._shouldVirtualize()&&(!e||e.measureVersion!==this._measureVersion)){var r={width:i.clientWidth,height:i.clientHeight};(r.height||r.width)&&(n=t.height!==r.height,t.height=r.height,this._cachedPageHeights[t.startIndex]={height:r.height,measureVersion:this._measureVersion},this._estimatedPageHeight=Math.round((this._estimatedPageHeight*this._totalEstimates+r.height)/(this._totalEstimates+1)),this._totalEstimates++)}return n},n.prototype._onPageAdded=function(t){var n=this.props.onPageAdded;n&&n(t)},n.prototype._onPageRemoved=function(t){var n=this.props.onPageRemoved;n&&n(t)},n.prototype._buildPages=function(t,n){var i=t.renderCount,e=t.items,r=t.startIndex,u=t.getPageHeight;i=this._getRenderCount(t);for(var a=(0,o.Cl)({},Bv),l=[],s=1,c=0,d=null,f=this._focusedIndex,v=r+i,h=this._shouldVirtualize(t),p=0===this._estimatedPageHeight&&!u,g=this._allowedRect,m=function(i){var o=b._getPageSpecification(t,i,g),u=o.height,m=o.data,x=o.key;s=o.itemCount;var w,M,C=c+u-1,k=y(n.pages,(function(t){return!!t.items&&t.startIndex===i}))>-1,A=!g||C>=g.top&&c<=g.bottom,S=!b._requiredRect||C>=b._requiredRect.top&&c<=b._requiredRect.bottom;if(!p&&(S||A&&k)||!h||f>=i&&f<i+s||i===r){d&&(l.push(d),d=null);var L=Math.min(s,v-i),D=b._createPage(x,e.slice(i,i+L),i,void 0,void 0,m);D.top=c,D.height=u,b._visibleRect&&b._visibleRect.bottom&&(D.isVisible=C>=b._visibleRect.top&&c<=b._visibleRect.bottom),l.push(D),S&&b._allowedRect&&(w=a,M={top:c,bottom:C,height:u,left:g.left,right:g.right,width:g.width},w.top=M.top<w.top||-1===w.top?M.top:w.top,w.left=M.left<w.left||-1===w.left?M.left:w.left,w.bottom=M.bottom>w.bottom||-1===w.bottom?M.bottom:w.bottom,w.right=M.right>w.right||-1===w.right?M.right:w.right,w.width=w.right-w.left+1,w.height=w.bottom-w.top+1)}else d||(d=b._createPage(Ev+i,void 0,i,0,void 0,m,!0)),d.height=(d.height||0)+(C-c)+1,d.itemCount+=s;if(c+=C-c+1,p&&h)return"break"},b=this,x=r;x<v&&"break"!==m(x);x+=s);return d&&(d.key=Ev+"end",l.push(d)),this._materializedRect=a,(0,o.Cl)((0,o.Cl)({},n),{pages:l,measureVersion:this._measureVersion})},n.prototype._getPageSpecification=function(t,n,i){var e=t.getPageSpecification;if(e){var r=e(n,i,t.items),o=r.itemCount,u=void 0===o?this._getItemCountForPage(n,i):o,a=r.height;return{itemCount:u,height:void 0===a?this._getPageHeight(n,i,u):a,data:r.data,key:r.key}}return{itemCount:u=this._getItemCountForPage(n,i),height:this._getPageHeight(n,i,u)}},n.prototype._getPageHeight=function(t,n,i){if(this.props.getPageHeight)return this.props.getPageHeight(t,n,i,this.props.items);var e=this._cachedPageHeights[t];return e?e.height:this._estimatedPageHeight||30},n.prototype._getItemCountForPage=function(t,n){return(this.props.getItemCountForPage?this.props.getItemCountForPage(t,n):10)||10},n.prototype._createPage=function(t,n,i,e,r,o,u){void 0===i&&(i=-1),void 0===e&&(e=n?n.length:0),void 0===r&&(r={}),t=t||"page-"+i;var a=this._pageCache[t];return a&&a.page?a.page:{key:t,startIndex:i,itemCount:e,items:n,style:r,top:0,height:0,data:o,isSpacer:u||!1}},n.prototype._getRenderCount=function(t){var n=t||this.props,i=n.items,e=n.startIndex,r=n.renderCount;return void 0===r?i?i.length-e:0:r},n.prototype._updateRenderRects=function(t,n,i){var e=t.renderedWindowsAhead,r=t.renderedWindowsBehind,u=n.pages;if(this._shouldVirtualize(t)){var a=this._surfaceRect||(0,o.Cl)({},Bv),l=function(t){if(void 0===t)return 0;var n=0;return"scrollHeight"in t?n=t.scrollHeight:"document"in t&&(n=t.document.documentElement.scrollHeight),n}(this._scrollElement),c=Ov(this._scrollElement);this._surface.current&&(i||!u||!this._surfaceRect||!l||l!==this._scrollHeight||Math.abs(this._scrollTop-c)>this._estimatedPageHeight*Fv)&&(a=this._surfaceRect=_v(this._surface.current),this._scrollTop=c),!i&&l&&l===this._scrollHeight||this._measureVersion++,this._scrollHeight=l||0;var d=Math.max(0,-a.top),f=(0,s.z)(this._root.current),v={top:d,left:a.left,bottom:d+f.innerHeight,right:a.right,width:a.width,height:f.innerHeight};this._requiredRect=Wv(v,this._requiredWindowsBehind,this._requiredWindowsAhead),this._allowedRect=Wv(v,r,e),this._visibleRect=v}},n.defaultProps={startIndex:0,onRenderCell:function(t,n,i){return u.createElement(u.Fragment,null,t&&t.name||"")},onRenderCellConditional:void 0,renderedWindowsAhead:2,renderedWindowsBehind:2},n.contextType=Ft,n}(u.Component);function Wv(t,n,i){var e=t.top-n*t.height,r=t.height+(n+i)*t.height;return{top:e,bottom:e+r,height:r,left:t.left,right:t.right,width:t.width}}var Rv=function(t){var n=u.useRef(null);u.useEffect((function(){if(n.current){var i=sl(n.current),e=t.text.split(/\s+/),r=[],o=i.append("tspan"),u=0;return e.forEach((function(n){r.push(n),o.text(r.join(" "));var e=o.node();e&&e.getComputedTextLength()>t.width&&r.length>1&&(u++,r.pop(),o.text(r.join(" ")),r=[n],o=i.append("tspan").text(n).attr("dy",t.lineHeight).attr("x",t.x))})),i.attr("dy",-u*t.lineHeight),function(){i.selectAll("tspan").remove()}}})),t.lineHeight;var i=(0,o.Tt)(t,["lineHeight"]);return u.createElement("text",(0,o.Cl)({ref:n},Xs(i)))},zv=function(t){var n,i,e,r=u.useRef(null),o=u.useState(!1),a=o[0],l=o[1],s=null;if(a){var c=t.labelDef.aggregatedIdx.map((function(n){return t.lineDefs[n].onRenderCard})).filter((function(t){return!!t}));c.length>0&&(s=u.createElement($n,{target:r.current,onDismiss:function(){return l(!1)},setInitialFocus:!0,role:"dialog"},u.createElement(Xc,{isCircularNavigation:!0,direction:rc.vertical},u.createElement(Iv,{items:c,role:"alert","aria-roledescription":" ",onRenderCell:function(t){return u.createElement("div",{"data-is-focusable":!0},t&&t())}}))))}var d=t.textColor?cs(t.textColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.semanticColors.messageText;return e=1===t.labelDef.aggregatedIdx.length?t.lineDefs[t.labelDef.aggregatedIdx[0]].event:t.mergedLabel(t.labelDef.aggregatedIdx.length),u.createElement(u.Fragment,null,u.createElement("g",{ref:r,onClick:function(){return l(!0)},"data-is-focusable":!0,style:{cursor:"pointer"},role:"button"},u.createElement(Rv,{text:e,x:t.labelDef.x,y:t.textY,width:t.textWidth,lineHeight:t.textLineHeight,textAnchor:t.labelDef.anchor,fontSize:t.textFontSize,fill:d})),s)},jv=function(t){var n,i,e=t.labelWidth?t.labelWidth:105,r=t.chartYTop-20,a=r+7,l=t.scale.range(),s=t.events.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{x:t.scale(n.date)})}));s.sort((function(t,n){return+t.date-+n.date}));var c=t.strokeColor?cs(t.strokeColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.palette.black,d=function(t,n){for(var i=[],e=[],r=0,o=t;r<o.length;r++){var u=o[r],a=n(u);-1===i.indexOf(a)&&(e.push(u),i.push(a))}return e}(s,(function(t){return t.date.toString()})).map((function(n,i){return u.createElement("line",{key:i,x1:n.x,x2:n.x,y1:a,y2:t.chartYBottom,stroke:c,strokeDasharray:"8"})})),f=function(t,n,i,e){var r=function(e,r){if(r===t.length)return[];var u=t[r].x,a=u-n;return u<e?[]:r===t.length-1?e<a?[{x:u,anchor:"end",aggregatedIdx:[r]}]:u+n<i?[{x:u,anchor:"start",aggregatedIdx:[r]}]:[]:o(r,e<a?"end":"start")},o=function(e,o){var u="end"===o?t[e].x:t[e].x+n,a=y(t,(function(t){return t.x>u&&(t.x-n>=u||t.x+n<i)}),e+1);-1===a&&(a=t.length);for(var l=[],s=e;s<a;s++)l.push(s);var c=r(u,a);return c.unshift({x:t[e].x,anchor:o,aggregatedIdx:l}),c};return r(e,0)}(s,e+5,l[1],l[0]).map((function(n,i){return u.createElement(zv,{key:i,theme:t.theme,lineDefs:s,labelDef:n,textY:r,textWidth:e,textLineHeight:18,textFontSize:"10pt",textColor:t.labelColor,mergedLabel:t.mergedLabel})}));return u.createElement(u.Fragment,null,d,f)};function $v(t){var n,i,e=t.xAxisScale,r=t.yAxisScale,o=t.className,a=t.lineOptions,l=t.minPixelGap,s=void 0===l?40:l,c=function(t){return t?{originXOffset:t.originXOffset,direction:"clockwise"===t.direction||"counterclockwise"===t.direction?t.direction:void 0,rotation:t.rotation,axisLabel:Array.isArray(t.axisLabel)?t.axisLabel:void 0}:void 0}(a),d=null!==(n=null==c?void 0:c.axisLabel)&&void 0!==n?n:[],f=[],v=[],h=d.length,p="clockwise"===(null==c?void 0:c.direction)?-1:1,g=(null!==(i=null==c?void 0:c.rotation)&&void 0!==i?i:0)*Math.PI/180;return d.forEach((function(t,n){var i=g+p*(2*Math.PI/h)*n,a=(null==c?void 0:c.originXOffset)||0,l=e(.7*Math.cos(i)-a/2),d=r(.7*Math.sin(i)),y=v.every((function(t){return Math.sqrt(Math.pow(l-t.x,2)+Math.pow(d-t.y,2))>=s}));(0===f.length||y)&&(f.push(u.createElement("text",{key:"scatterpolar-label-".concat(t),x:l,y:d,className:o,textAnchor:"middle",alignmentBaseline:"middle",opacity:1},t)),v.push({x:l,y:d}))})),f}var Yv,Xv=(0,a.Z)();!function(t){t[t.hoverSize=11]="hoverSize",t[t.invisibleSize=1]="invisibleSize"}(Yv||(Yv={}));var Gv=wi((function(t){return t.x})).left,Uv=function(t){function n(n){var i,e,r,a,s,c=t.call(this,n)||this;return c._xAxisScale="",c._yScalePrimary="",c.eventLabelHeight=36,c._isRTL=(0,l.jI)(),c._hasMarkersMode=!1,c._isXAxisDateType=!1,c._isScatterPolar=!1,c.toImage=function(t){var n,i;return Jd([{container:null===(n=c._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],c.props.hideLegend||null===(i=c._legendsRef.current)||void 0===i?void 0:i.toSVG,c._isRTL,t)},c._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?Vs(t,n,i,r,c.props.xScaleType,c._hasMarkersMode):o===ns.DateAxis?Es(t,n,i,r,a,e,0,c._hasMarkersMode):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},c._injectIndexPropertyInLineChartData=function(t,n){var i;void 0===n&&(n=!1);var e=c.props.allowMultipleShapesForPoints,r=void 0!==e&&e,u=n?null==t?void 0:t.filter((function(t){var n,i,e;return(null===(i=null===(n=c.props.legendProps)||void 0===n?void 0:n.selectedLegends)||void 0===i?void 0:i.includes(t.legend))||(null===(e=c.props.legendProps)||void 0===e?void 0:e.selectedLegend)===t.legend})):t;return c._hasMarkersMode=null!==(i=null==u?void 0:u.some((function(t){var n,i,e;return null===(e=null===(i=null===(n=t.lineOptions)||void 0===n?void 0:n.mode)||void 0===i?void 0:i.includes)||void 0===e?void 0:e.call(i,"markers")})))&&void 0!==i&&i,c._isScatterPolar=ec(u),u?u.map((function(t,n){var i,e,u;return u=void 0===t.color?ss(n,0,null===(i=c.props.theme)||void 0===i?void 0:i.isInverted):cs(t.color,null===(e=c.props.theme)||void 0===e?void 0:e.isInverted),(0,o.Cl)((0,o.Cl)({},t),{index:r?n:-1,color:u})})):[]},c._getCustomizedCallout=function(){return c.props.onRenderCalloutPerStack?c.props.onRenderCalloutPerStack(c.state.stackCalloutProps):c.props.onRenderCalloutPerDataPoint?c.props.onRenderCalloutPerDataPoint(c.state.dataPointCalloutProps):null},c._getNumericMinMaxOfY=function(t,n,i){var e=Fs(t,0,i,i?c.props.secondaryYScaleType:c.props.yScaleType),r=e.startValue,o=e.endValue,u={start:0,end:0};return c._hasMarkersMode&&(u=uc(r,o,i?c.props.secondaryYScaleType:c.props.yScaleType)),{startValue:r-u.start,endValue:o+u.end}},c._getMargins=function(t){c.margins=t},c._initializeLineChartData=function(t,n,i,e,r,o,u){c._xAxisScale=t,c._yScalePrimary=n,c._yScaleSecondary=u,c._renderedColorFillBars=c.props.colorFillBars?c._createColorFillBars(i):[],c.lines=c._createLines(r,i)},c._handleSingleLegendSelectionAction=function(t){c.state.selectedLegend===t.legend?(c.setState({selectedLegend:""}),c._handleLegendClick(t,null)):(c.setState({selectedLegend:t.legend}),c._handleLegendClick(t,t.legend))},c._onHoverCardHide=function(){c.setState({selectedLegendPoints:[],selectedColorBarLegend:[],isSelectedLegend:!1})},c._closeCallout=function(){c.setState({isCalloutVisible:!1})},c._getBoxWidthOfShape=function(t,n,i){var e=c.props,r=e.allowMultipleShapesForPoints,o=void 0!==r&&r,u=e.strokeWidth,a=void 0===u?4:u,l=c.state.activePoint;return o?l===t?Yv.hoverSize:1===n||i?2.5*a:Yv.invisibleSize:l===t?Yv.hoverSize:Yv.invisibleSize},c._getPath=function(t,n,i,e,r,o){var u=c.props.allowMultipleShapesForPoints,a=void 0!==u&&u,l=c._getBoxWidthOfShape(i,e,r),s=a?o%Object.keys(Ws).length:0,d=Ws[s].widthRatio;return function(t,n,i,e){return["M".concat(t-i/2," ").concat(n,"\n A").concat(i/2," ").concat(i/2," 0 1 0 ").concat(t+i/2," ").concat(n,"\n M").concat(t-i/2," ").concat(n,"\n A ").concat(i/2," ").concat(i/2," 0 1 1 ").concat(t+i/2," ").concat(n,"\n "),"M".concat(t-i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n+i/2,"\n Z"),"M".concat(t-i/2," ").concat(n-.2886*i,"\n H ").concat(t+i/2,"\n L").concat(t," ").concat(n+.5774*i," Z"),"M".concat(t," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n,"\n L").concat(t," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.5774*i,"\n L").concat(t+i/2," ").concat(n+.2886*i,"\n L").concat(t-i/2," ").concat(n+.2886*i," Z"),"M".concat(t-.5*i," ").concat(n-.866*i,"\n L").concat(t+.5*i," ").concat(n-.866*i,"\n L").concat(t+i," ").concat(n,"\n L").concat(t+.5*i," ").concat(n+.866*i,"\n L").concat(t-.5*i," ").concat(n+.866*i,"\n L").concat(t-i," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.851*i,"\n L").concat(t+.6884*i," ").concat(n-.2633*i,"\n L").concat(t+.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.6884*i," ").concat(n-.2633*i,"\n Z"),"M".concat(t-.5001*i," ").concat(n-1.207*i,"\n L").concat(t+.5001*i," ").concat(n-1.207*i,"\n L").concat(t+1.207*i," ").concat(n-.5001*i,"\n L").concat(t+1.207*i," ").concat(n+.5001*i,"\n L").concat(t+.5001*i," ").concat(n+1.207*i,"\n L").concat(t-.5001*i," ").concat(n+1.207*i,"\n L").concat(t-1.207*i," ").concat(n+.5001*i,"\n L").concat(t-1.207*i," ").concat(n-.5001*i,"\n Z")][e]}(t,n,l=d>1?l/d:l,s)},c._getPointFill=function(t,n,i,e){var r=c.state.activePoint,o=c.props,u=o.theme;return o.allowMultipleShapesForPoints,r===n?u.semanticColors.bodyBackground:t},c._createColorFillBars=function(t){var n,i=[];c.state.isSelectedLegend?c._colorFillBars=c.state.selectedColorBarLegend:c._colorFillBars=c.props.colorFillBars;for(var e=Fs(c._points),r=0;r<c._colorFillBars.length;r++){var o=c._colorFillBars[r],a=p("string"==typeof o.legend?o.legend.replace(/\W/g,""):""),l=cs(o.color,null===(n=c.props.theme)||void 0===n?void 0:n.isInverted);o.applyPattern&&i.push(c._getStripePattern(l,r));for(var s=0;s<o.data.length;s++){var d=o.data[s].startX,f=o.data[s].endX,v=c._legendHighlighted(o.legend)||c._noLegendHighlighted()||c.state.isSelectedLegend?c._getColorFillBarOpacity(o):.1;i.push(u.createElement("rect",{fill:o.applyPattern?"url(#".concat(c._colorFillBarPatternId,"_").concat(r,")"):l,fillOpacity:v,x:c._isRTL?c._xAxisScale(f):c._xAxisScale(d),y:c._yScalePrimary(e.endValue)-3,width:Math.abs(c._xAxisScale(f)-c._xAxisScale(d)),height:c._yScalePrimary(c.props.yMinValue||0)-c._yScalePrimary(e.endValue)+3,key:"".concat(a).concat(s)}))}}return i},c._getStripePattern=function(t,n){return u.createElement("pattern",{id:"".concat(c._colorFillBarPatternId,"_").concat(n),width:16,height:16,key:"".concat(c._colorFillBarPatternId,"_").concat(n),patternUnits:"userSpaceOnUse"},u.createElement("path",{d:"M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8",stroke:t,strokeWidth:1.25}))},c._checkInGap=function(t,n,i){for(var e=i,r=!1;e<n.length&&t>n[e].endIndex;)e++;return e<n.length&&t>n[e].startIndex&&t<=n[e].endIndex&&(r=!0),{isInGap:r,gapIndex:e}},c._onMouseOverLargeDataset=function(t,n,i,e){e.persist();var r=c.props.data.lineChartData,o=c._xAxisScale.invert(ov(e)[0],document.getElementById(c._rectId)),u=Gv(r[t].data,o),a=r[t].data[u-1],l=r[t].data[u],s=null,d=null;if(void 0===a&&void 0!==l)s=l.x,d=u;else if(void 0!==a&&void 0===l)s=a.x,d=u-1;else{var f=void 0,v=void 0,h=void 0;switch(Is(r[t].data[0].x,!0)){case ns.DateAxis:f=new Date(o).getTime(),v=a.x.getTime(),h=l.x.getTime(),s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1;break;case ns.NumericAxis:f=o,v=a.x,h=l.x,s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1}}var p=r[t].data[d],g=p.xAxisCalloutData,y=p.xAxisCalloutAccessibilityData,m=s instanceof Date?(0,Yn.Yn)(s,c.props.culture,c.props.useUTC):s,b=hc(c._calloutPoints,s),x=r[t].data[d],w=null===c.state.nearestCircleToHighlight||null!==c.state.nearestCircleToHighlight&&null!==x&&(c.state.nearestCircleToHighlight.x!==x.x||c.state.nearestCircleToHighlight.y!==x.y);b&&w&&(c._uniqueCallOutID="#".concat(c._staticHighlightCircle,"_").concat(t),sl("#".concat(c._staticHighlightCircle,"_").concat(t)).attr("cx","".concat(c._xAxisScale(x.x))).attr("cy","".concat(i(x.y))).attr("visibility","visibility"),sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(c._xAxisScale(x.x),", ").concat(i(x.y),")")})).attr("visibility","visibility").attr("y2","".concat(n-i(x.y))),c.setState({nearestCircleToHighlight:x,isCalloutVisible:!0,refSelected:"#".concat(c._staticHighlightCircle,"_").concat(t),stackCalloutProps:b,YValueHover:b.values,dataPointCalloutProps:b,hoverXValue:g||m,xAxisCalloutAccessibilityData:y,activePoint:"",activeLine:t})),b||c.setState({isCalloutVisible:!1,nearestCircleToHighlight:x,activePoint:"",activeLine:t})},c._handleFocus=function(t,n,i,e,r){c._uniqueCallOutID=e;var o=n instanceof Date?(0,Yn.Yn)(n,c.props.culture,c.props.useUTC):n,u=hc(c._calloutPoints,n);if(u){var a=c;sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(a._xAxisScale(n),", 0)")})).attr("visibility","visibility"),c._refArray.forEach((function(n){n.index===t&&c.setState({isCalloutVisible:!0,refSelected:n.refElement,hoverXValue:i||""+o,YValueHover:u.values,stackCalloutProps:u,dataPointCalloutProps:u,activePoint:e,xAxisCalloutAccessibilityData:r})}))}else c.setState({activePoint:e})},c._handleHover=function(t,n,i,e,r,o,u,a,l,s){s.persist();var d=t instanceof Date?(0,Yn.Yn)(t,c.props.culture,c.props.useUTC):t,f=c,v=hc(c._calloutPoints,t),h=void 0;if(!1===c.props.isCalloutForStack&&(null==v?void 0:v.values)){var p=m(v.values,(function(t){return(null==t?void 0:t.y)===n}));p&&(h={x:t,values:[p]})}v?(sl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(f._xAxisScale(t),", ").concat(u(n),")")})).attr("visibility","visibility").attr("y2","".concat(i-u(n))),c._uniqueCallOutID!==r&&(c._uniqueCallOutID=r,c.setState({isCalloutVisible:!0,refSelected:"#".concat(r),hoverXValue:e||""+d,YValueHover:v.values,YValue:n,legendVal:a,lineColor:l,stackCalloutProps:v,dataPointCalloutProps:h,activePoint:r,xAxisCalloutAccessibilityData:o,nearestCircleToHighlight:null,activeLine:null}))):c.setState({activePoint:r,nearestCircleToHighlight:null,activeLine:null})},c._getClickHandler=function(t){return t?{onClick:t}:{}},c._handleMouseOut=function(){sl("#".concat(c._verticalLine)).attr("visibility","hidden")},c._handleChartMouseLeave=function(){c._uniqueCallOutID=null,c.setState({isCalloutVisible:!1,activePoint:"",activeLine:null})},c._handleLegendClick=function(t,n){t.onLegendClick&&t.onLegendClick(n)},c._handleMultipleLineLegendSelectionAction=function(t){var n,i=c.state.selectedLegendPoints.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedLegendPoints,!0),[t],!1):c.state.selectedLegendPoints.slice(0,i).concat(c.state.selectedLegendPoints.slice(i+1)),c.props.data&&n.length===c.props.data.lineChartData.length&&(c.props.colorFillBars&&c.props.colorFillBars.length===c.state.selectedColorBarLegend.length||!c.props.colorFillBars)?c._clearMultipleLegendSelections():n.length||c.state.selectedColorBarLegend.length?c.setState({selectedLegendPoints:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._handleMultipleColorFillBarLegendSelectionAction=function(t){var n,i=c.state.selectedColorBarLegend.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);(n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedColorBarLegend,!0),[t],!1):c.state.selectedColorBarLegend.slice(0,i).concat(c.state.selectedColorBarLegend.slice(i+1))).length===(c.props.colorFillBars&&c.props.colorFillBars.length)&&(c.props.data&&c.props.data.lineChartData.length===c.state.selectedLegendPoints.length||!c.props.data)?c._clearMultipleLegendSelections():n.length||c.state.selectedLegendPoints.length?c.setState({selectedColorBarLegend:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._clearMultipleLegendSelections=function(){c.setState({selectedColorBarLegend:[],selectedLegendPoints:[],isSelectedLegend:!1})},c._legendHighlighted=function(t){return c.state.selectedLegend===t||""===c.state.selectedLegend&&c.state.activeLegend===t},c._noLegendHighlighted=function(){return""===c.state.selectedLegend&&""===c.state.activeLegend},c._getColorFillBarOpacity=function(t){return t.applyPattern?1:.4},c._getAriaLabel=function(t,n){var i,e=c._points[t],r=e.data[n],o=r.x instanceof Date?(0,Yn.Yn)(r.x,c.props.culture,c.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},c._getChartTitle=function(){var t=c.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Line chart with ".concat((null==i?void 0:i.length)||0," lines. ")},Ac(c),c.state={hoverXValue:"",activeLegend:"",YValueHover:[],YValue:"",legendVal:"",refSelected:"",selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",isCalloutVisible:!1,selectedLegendPoints:c._injectIndexPropertyInLineChartData(c.props.data.lineChartData,!0),selectedColorBarLegend:[],isSelectedLegend:(null!==(s=null===(a=null===(r=c.props.legendProps)||void 0===r?void 0:r.selectedLegends)||void 0===a?void 0:a.length)&&void 0!==s?s:0)>0,activePoint:"",nearestCircleToHighlight:null,activeLine:null},c._refArray=[],c._points=c._injectIndexPropertyInLineChartData(c.props.data.lineChartData),c._colorFillBars=[],c._calloutPoints=ks(c._points)||{},c._circleId=p("circle"),c._lineId=p("lineID"),c._borderId=p("borderID"),c._verticalLine=p("verticalLine"),c._colorFillBarPatternId=p("colorFillBarPattern"),c._tooltipId=p("LineChartTooltipId_"),c._rectId=p("containerRectLD"),c._staticHighlightCircle=p("staticHighlightCircle"),c._createLegendsMemoized=(0,an.J9)((function(t){return c._createLegends(t)})),c._firstRenderOptimization=!0,c._emptyChartId=p("_LineChart_empty"),c._cartesianChartRef=u.createRef(),c._legendsRef=u.createRef(),n.eventAnnotationProps&&n.eventAnnotationProps.labelHeight&&(c.eventLabelHeight=n.eventAnnotationProps.labelHeight),c}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r,o,u,a,l,s;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)===(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&Gs(null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends,null===(r=this.props.legendProps)||void 0===r?void 0:r.selectedLegends)||this.setState({selectedLegend:null!==(u=null===(o=this.props.legendProps)||void 0===o?void 0:o.selectedLegend)&&void 0!==u?u:"",selectedLegendPoints:this._injectIndexPropertyInLineChartData(this.props.data.lineChartData,!0),isSelectedLegend:(null!==(s=null===(l=null===(a=this.props.legendProps)||void 0===a?void 0:a.selectedLegends)||void 0===l?void 0:l.length)&&void 0!==s?s:0)>0}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData),this._calloutPoints=ks(this._points)||{})},n.prototype.render=function(){var t=this,n=this.props,i=n.tickValues,e=n.tickFormat,r=n.eventAnnotationProps,a=n.legendProps,l=n.data;this._points=this._injectIndexPropertyInLineChartData(l.lineChartData),this._isXAxisDateType=Ds(this._points);var s=this._points;a&&a.canSelectMultipleLegends&&(s=this.state.selectedLegendPoints.length>=1?this.state.selectedLegendPoints:this._points,this._calloutPoints=ks(s));var c=null;this.props.hideLegend||(c=this._createLegendsMemoized(this._points));var d=(0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,YValue:this.state.YValue,legend:this.state.legendVal,color:this.state.lineColor,XValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,onDismiss:this._closeCallout,preventDismissOnEvent:function(){return!0},hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),descriptionMessage:this.props.getCalloutDescriptionMessage&&this.state.stackCalloutProps?this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps),f={tickValues:i,tickFormat:e};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Dv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:s,chartType:ts.LineChart,calloutProps:d,tickParams:f,legendBars:c,createYAxis:ws,getmargins:this._getMargins,getMinMaxOfYAxis:this._getNumericMinMaxOfY,getGraphData:this._initializeLineChartData,xAxisType:this._isXAxisDateType?ns.DateAxis:ns.NumericAxis},this._isScatterPolar?{yMaxValue:1,yMinValue:-1}:{},{customizedCallout:this._getCustomizedCallout(),getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Cs,onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){return t._xAxisScale=n.xScale,t._yScalePrimary=n.yScalePrimary,t._yScaleSecondary=n.yScaleSecondary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:n.containerHeight,stroke:"#323130",id:t._verticalLine,visibility:"hidden",strokeDasharray:"5,5"}),t.props.optimizeLargeData?u.createElement("rect",{id:t._rectId,width:n.containerWidth,height:n.containerHeight,fill:"transparent"}):u.createElement(u.Fragment,null),u.createElement("g",null,t._renderedColorFillBars,t.lines),r&&u.createElement(jv,(0,o.Cl)({theme:t.props.theme},r,{scale:n.xScale,chartYTop:t.margins.top+t.eventLabelHeight,chartYBottom:n.containerHeight-35}))))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._createLegends=function(t){var n=this,i=this.props,e=i.legendProps,r=i.allowMultipleShapesForPoints,a=void 0!==r&&r,l=!(!e||!e.canSelectMultipleLegends),s={};t.forEach((function(t){t.legend&&(s[t.legend]||(s[t.legend]=[]),s[t.legend].push(t))}));var c=Object.entries(s).map((function(t){var i=t[0],e=t[1],r=e[0];return(0,o.Cl)((0,o.Cl)({title:i,color:r.color,action:function(){l?e.forEach((function(t){return n._handleMultipleLineLegendSelectionAction(t)})):e.forEach((function(t){return n._handleSingleLegendSelectionAction(t)}))},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:i})}},r.legendShape&&{shape:r.legendShape}),a&&{shape:_s[r.index%Object.keys(Ws).length]})})),d=this.props.colorFillBars?this.props.colorFillBars.map((function(t,i){var e,r=t.legend,o=cs(t.color,null===(e=n.props.theme)||void 0===e?void 0:e.isInverted);return{title:r,color:o,action:function(){l?n._handleMultipleColorFillBarLegendSelectionAction(t):n._handleSingleLegendSelectionAction(t)},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:r})},opacity:n._getColorFillBarOpacity(t),stripePattern:t.applyPattern}})):[];return u.createElement(df,(0,o.Cl)({legends:(0,o.fX)((0,o.fX)([],c,!0),d,!0),enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},l&&{onLegendHoverCardLeave:this._onHoverCardHide},this.props.legendProps,{ref:this._legendsRef}))},n.prototype._createLines=function(t,n){var i,e,r,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,D,V,N,O,T,E,F,B,P,_,H,I,W,R,z,j,$,Y,X,G,U,q,Z,K,J,Q,tt,nt,it=this,et=[];this.state.isSelectedLegend?this._points=this.state.selectedLegendPoints:this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);for(var rt=fi(this._points,(function(t){return fi(t.data,(function(t){return t.markerSize}))})),ot=Xv(this.props.styles,{theme:this.props.theme}),ut=function(t){var ut=[],lt=[],st=[],ct=at._points[t].legend,dt=at._points[t].color,ft=at.state.activePoint,vt=at.props.theme,ht=n-at.margins.bottom+6,pt=!(!at._points[t].useSecondaryYScale||!at._yScaleSecondary),gt=pt?at._yScaleSecondary:at._yScalePrimary,yt=at._hasMarkersMode?cc({data:at._points,xScale:at._xAxisScale,yScalePrimary:at._yScalePrimary,yScaleSecondary:at._yScaleSecondary,useSecondaryYScale:pt,xScaleType:at.props.xScaleType,yScaleType:at.props.yScaleType,secondaryYScaleType:at.props.secondaryYScaleType}):0;if(1===at._points[t].data.length){var mt=at._points[t].data[0],bt=mt.x,xt=mt.y,wt=mt.xAxisCalloutData,Mt=mt.xAxisCalloutAccessibilityData,Ct=at._xAxisScale(bt),kt=gt(xt);if(lc(Ct,kt)){var At="".concat(at._circleId,"_").concat(t),St=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,Lt=at._points[t].data[0].markerSize,Dt=null===(e=null===(i=at._points[t].lineOptions)||void 0===i?void 0:i.mode)||void 0===e?void 0:e.includes("text"),Vt=at._points[t].data[0].text;st.push(u.createElement(u.Fragment,{key:"".concat(At,"_fragment")},u.createElement("circle",(0,o.Cl)({id:At,key:At,r:Lt?Lt*yt/rt:ft===At?5.5:3.5,cx:Ct,cy:kt,fill:ft===At?vt.semanticColors.bodyBackground:dt,opacity:St?1:.1,onMouseOver:at._handleHover.bind(at,bt,xt,ht,wt,At,Mt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,bt,xt,ht,wt,At,Mt,gt,ct,dt),onMouseOut:at._handleMouseOut,strokeWidth:ft===At?4:0,stroke:ft===At?dt:"",role:"img","aria-label":at._getAriaLabel(t,0),"data-is-focusable":St,ref:function(t){it._refCallback(t,At)},onFocus:function(){return it._handleFocus(At,bt,wt,At,Mt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[0].onDataPointClick))),!at._isScatterPolar&&Dt&&Vt&&u.createElement("text",{key:"".concat(At,"-label"),x:Ct,y:kt+Math.max(Lt?Lt*yt/rt:3.5,4)+12,className:ot.markerLabel,opacity:St?1:.1},Vt)))}}var Nt=0,Ot=null!==(a=null===(r=at._points[t].gaps)||void 0===r?void 0:r.sort((function(t,n){return t.startIndex-n.startIndex})))&&void 0!==a?a:[],Tt=null===(l=at._points[t].lineOptions)||void 0===l?void 0:l.curve;if((at.props.optimizeLargeData||Tt)&&at._points[t].data.length>1){for(var Et=lv().x((function(t){return it._xAxisScale(t[0])})).y((function(t){return gt(t[1])})).curve(Qs(Tt)).defined((function(t){return lc(it._xAxisScale(t[0]),gt(t[1]))})),Ft="".concat(at._lineId,"_").concat(t),Bt="".concat(at._borderId,"_").concat(t),Pt=(null===(s=at._points[t].lineOptions)||void 0===s?void 0:s.strokeWidth)||at.props.strokeWidth||4,_t=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,Ht=[],It=0;It<at._points[t].data.length;It++)Ht.push([at._points[t].data[It].x instanceof Date?at._points[t].data[It].x.getTime():at._points[t].data[It].x,at._points[t].data[It].y]);var Wt=null===(c=at._points[t].lineOptions)||void 0===c?void 0:c.mode,Rt="markers"!==Wt;if(Rt&&_t){var zt=(null===(d=at._points[t].lineOptions)||void 0===d?void 0:d.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;zt>0&<.push(u.createElement("path",{id:Bt,key:Bt,d:Et(Ht),fill:"transparent",strokeLinecap:null!==(v=null===(f=at._points[t].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==v?v:"round",strokeWidth:Number.parseFloat(Pt.toString())+zt,stroke:(null===(h=at._points[t].lineOptions)||void 0===h?void 0:h.lineBorderColor)||vt.semanticColors.bodyBackground,opacity:1})),ut.push(u.createElement("path",(0,o.Cl)({id:Ft,key:Ft,d:Et(Ht),fill:"transparent","data-is-focusable":!0,stroke:dt,strokeWidth:Pt,strokeLinecap:null!==(g=null===(p=at._points[t].lineOptions)||void 0===p?void 0:p.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=at._points[t].lineOptions)||void 0===y?void 0:y.strokeDasharray,onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut},at._getClickHandler(at._points[t].onLineClick),{opacity:1})))}else Rt&&ut.push(u.createElement("path",{id:Ft,key:Ft,d:Et(Ht),fill:"transparent","data-is-focusable":!1,stroke:dt,strokeWidth:Pt,strokeLinecap:null!==(b=null===(m=at._points[t].lineOptions)||void 0===m?void 0:m.strokeLinecap)&&void 0!==b?b:"round",strokeDasharray:null===(x=at._points[t].lineOptions)||void 0===x?void 0:x.strokeDasharray,opacity:.1}));var jt=null!==at.state.activeLine&&at.state.activeLine===t;if(st.push(u.createElement("circle",{id:"".concat(at._staticHighlightCircle,"_").concat(t),key:"".concat(at._staticHighlightCircle,"_").concat(t),r:5.5,cx:0,cy:0,fill:vt.semanticColors.bodyBackground,strokeWidth:4,stroke:dt,visibility:jt?"visibility":"hidden",onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut})),null==Wt?void 0:Wt.includes("markers"))for(It=0;It<at._points[t].data.length;It++){var $t=at._points[t].data[It],Yt=$t.x,Xt=$t.y;if(Ct=at._xAxisScale(Yt),kt=gt(Xt),lc(Ct,kt)){var Gt=at._points[t].data[It].markerSize,Ut=null===(w=at._points[t].data[It])||void 0===w?void 0:w.markerColor;st.push(u.createElement("circle",{key:"".concat(at._circleId,"_").concat(t,"_").concat(It,"_marker"),r:Gt?Gt*yt*.3/rt:ft===at._circleId?5.5:3.5,cx:Ct,cy:kt,fill:ft===at._circleId?vt.semanticColors.bodyBackground:Ut||(null===(M=at._points[t])||void 0===M?void 0:M.color)||dt,stroke:Ut||dt,strokeWidth:1,opacity:_t?1:.1,onMouseMove:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOver:at._onMouseOverLargeDataset.bind(at,t,ht,gt),onMouseOut:at._handleMouseOut}))}}}else if(!at.props.optimizeLargeData)for(var qt=function(n){var i=at._checkInGap(n,Ot,Nt),e=i.isInGap;Nt=i.gapIndex;var r="".concat(at._lineId,"_").concat(t,"_").concat(n),a="".concat(at._borderId,"_").concat(t,"_").concat(n),l="".concat(at._circleId,"_").concat(t,"_").concat(n),s=at._points[t].data[n-1],c=s.x,d=s.y,f=s.xAxisCalloutData,v=s.xAxisCalloutAccessibilityData,h=at._points[t].data[n],p=h.x,g=h.y,y=at._xAxisScale(c),m=gt(d),b=at._xAxisScale(p),x=gt(g),w=(null===(C=at._points[t].lineOptions)||void 0===C?void 0:C.strokeWidth)||at.props.strokeWidth||4,M=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend,tt=at._points[t].hideNonActiveDots&&ft!==l,nt=null===(A=null===(k=at._points[t].lineOptions)||void 0===k?void 0:k.mode)||void 0===A?void 0:A.includes("text"),et=at._points[t].data[n-1].text,pt=at._points[t].data[n-1].markerSize;if(lc(y,m)){var mt=at._getPath(y,m,l,n,!1,at._points[t].index);st.push((null===(L=null===(S=at._points[t].lineOptions)||void 0===S?void 0:S.mode)||void 0===L?void 0:L.includes("markers"))||nt?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:l,key:l,r:pt?pt*yt/rt:4,cx:y,cy:m,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,c,f,l,v)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n-1].onDataPointClick),{opacity:M&&!tt?1:.01,fill:(null===(D=at._points[t].data[n-1])||void 0===D?void 0:D.markerColor)||at._getPointFill(dt,l,n,!1),stroke:(null===(V=at._points[t].data[n-1])||void 0===V?void 0:V.markerColor)||dt,strokeWidth:w,role:"img","aria-label":null!==(N=at._points[t].data[n-1].text)&&void 0!==N?N:at._getAriaLabel(t,n-1)})),!at._isScatterPolar&&nt&&et&&u.createElement("text",{key:"".concat(l,"-label"),x:y,y:m+Math.max(pt?pt*yt/rt:4,4)+12,className:ot.markerLabel,opacity:M&&!tt?1:.01},et)):u.createElement("path",(0,o.Cl)({id:l,key:l,d:mt,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,c,f,l,v)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n-1].onDataPointClick),{opacity:M&&!tt?1:.01,fill:(null===(O=at._points[t].data[n-1])||void 0===O?void 0:O.markerColor)||at._getPointFill(dt,l,n,!1),stroke:(null===(T=at._points[t].data[n-1])||void 0===T?void 0:T.markerColor)||dt,strokeWidth:w,role:"img","aria-label":at._getAriaLabel(t,n-1)})))}if(n+1===at._points[t].data.length){var bt="".concat(l).concat(n,"L"),xt="".concat(l).concat(n,"D"),wt=at._points[t].hideNonActiveDots&&ft!==bt,Mt=at._points[t].data[n],Ct=Mt.xAxisCalloutData,kt=Mt.xAxisCalloutAccessibilityData;pt=at._points[t].data[n].markerSize;var At=null===(F=null===(E=at._points[t].lineOptions)||void 0===E?void 0:E.mode)||void 0===F?void 0:F.includes("text"),St=at._points[t].data[n].text;lc(b,x)&&(mt=at._getPath(b,x,bt,n,!0,at._points[t].index),st.push(u.createElement(u.Fragment,{key:"".concat(bt,"_container")},(null===(P=null===(B=at._points[t].lineOptions)||void 0===B?void 0:B.mode)||void 0===P?void 0:P.includes("markers"))||At?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:bt,key:bt,r:pt?pt*yt/rt:4,cx:b,cy:x,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,p,Ct,bt,kt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n].onDataPointClick),{opacity:M&&!wt?1:.01,fill:at._getPointFill(dt,bt,n,!0),stroke:dt,strokeWidth:w,role:"img","aria-label":null!==(_=at._points[t].data[n].text)&&void 0!==_?_:at._getAriaLabel(t,n)})),!at._isScatterPolar&&At&&St&&u.createElement("text",{key:"".concat(bt,"-label"),x:b,y:x+Math.max(pt?pt*yt/rt:4,4)+12,className:ot.markerLabel,opacity:M&&!tt?1:.01},et)):u.createElement("path",(0,o.Cl)({id:bt,key:bt,d:mt,"data-is-focusable":M,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,onFocus:function(){return it._handleFocus(r,p,Ct,bt,kt)},onBlur:at._handleMouseOut},at._getClickHandler(at._points[t].data[n].onDataPointClick),{opacity:M&&!wt?1:.01,fill:(null===(H=at._points[t].data[n])||void 0===H?void 0:H.markerColor)||at._getPointFill(dt,bt,n,!0),stroke:(null===(I=at._points[t].data[n])||void 0===I?void 0:I.markerColor)||dt,strokeWidth:w,role:"img","aria-label":at._getAriaLabel(t,n)})),u.createElement("circle",{id:xt,key:xt,r:8,cx:b,cy:x,opacity:0,width:0,onMouseOver:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseMove:at._handleHover.bind(at,p,g,ht,Ct,bt,kt,gt,ct,dt),onMouseOut:at._handleMouseOut,strokeWidth:0,focusable:!1,onBlur:at._handleMouseOut}))))}if(lc(y,m)&&lc(b,x)&&(!at._hasMarkersMode||(null===(R=null===(W=at._points[t].lineOptions)||void 0===W?void 0:W.mode)||void 0===R?void 0:R.includes("lines"))))if(M){if(!e){var Lt=(null===(z=at._points[t].lineOptions)||void 0===z?void 0:z.lineBorderWidth)?Number.parseFloat(at._points[t].lineOptions.lineBorderWidth.toString()):0;Lt>0&<.push(u.createElement("line",{id:a,key:a,x1:y,y1:m,x2:b,y2:x,strokeLinecap:null!==($=null===(j=at._points[t].lineOptions)||void 0===j?void 0:j.strokeLinecap)&&void 0!==$?$:"round",strokeWidth:Number.parseFloat(w.toString())+Lt,stroke:(null===(Y=at._points[t].lineOptions)||void 0===Y?void 0:Y.lineBorderColor)||vt.semanticColors.bodyBackground,opacity:1})),ut.push(u.createElement("line",(0,o.Cl)({id:r,key:r,x1:y,y1:m,x2:b,y2:x,strokeWidth:w,ref:function(t){it._refCallback(t,r)},onMouseOver:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseMove:at._handleHover.bind(at,c,d,ht,f,l,v,gt,ct,dt),onMouseOut:at._handleMouseOut,stroke:dt,strokeLinecap:null!==(G=null===(X=at._points[t].lineOptions)||void 0===X?void 0:X.strokeLinecap)&&void 0!==G?G:"round",strokeDasharray:null===(U=at._points[t].lineOptions)||void 0===U?void 0:U.strokeDasharray,strokeDashoffset:null===(q=at._points[t].lineOptions)||void 0===q?void 0:q.strokeDashoffset,opacity:1},at._getClickHandler(at._points[t].onLineClick))))}}else e||ut.push(u.createElement("line",{id:r,key:r,x1:y,y1:m,x2:b,y2:x,strokeWidth:w,stroke:dt,strokeLinecap:null!==(K=null===(Z=at._points[t].lineOptions)||void 0===Z?void 0:Z.strokeLinecap)&&void 0!==K?K:"round",strokeDasharray:null===(J=at._points[t].lineOptions)||void 0===J?void 0:J.strokeDasharray,strokeDashoffset:null===(Q=at._points[t].lineOptions)||void 0===Q?void 0:Q.strokeDashoffset,opacity:.1}))},Zt=1;Zt<at._points[t].data.length;Zt++)qt(Zt);var Kt=null===(tt=at._points[t].lineOptions)||void 0===tt?void 0:tt.fill,Jt=at._legendHighlighted(ct)||at._noLegendHighlighted()||at.state.isSelectedLegend;if("toself"===Kt&&at._points[t].data.length>=3&&Jt&&at._isScatterPolar){var Qt=function(t){return it._xAxisScale((t.x,Date,t.x))},tn=lv().x((function(t){return Qt(t)})).y((function(t){return gt(t.y)})).curve(Qs(Tt)).defined((function(t){return lc(Qt(t),gt(t.y))}))(at._points[t].data);tn&&ut.push(u.createElement("path",{key:"scatterpolar_fill_".concat(t),d:"".concat(tn,"Z"),fill:dt,fillOpacity:.5,stroke:dt,strokeWidth:2,strokeOpacity:.8,pointerEvents:"none"}))}at._isScatterPolar&&st.push.apply(st,$v({xAxisScale:at._xAxisScale,yAxisScale:gt,className:ot.markerLabel||"",lineOptions:null===(nt=at._points[t])||void 0===nt?void 0:nt.lineOptions})),et.push(u.createElement("g",{key:"line_".concat(t),role:"region","aria-label":"".concat(ct,", line ").concat(t+1," of ").concat(at._points.length," with ").concat(at._points[t].data.length," data points.")},lt,ut,st))},at=this,lt=this._points.length-1;lt>=0;lt--)ut(lt);if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var st=sl(t).call(this._xAxisScale);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var ct={tooltipCls:ot.tooltip,id:this._tooltipId,axis:st};st&&Ls(ct)}return et},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&this.props.data.lineChartData.filter((function(t){return t.data.length})).length>0)},n.defaultProps={enableReflow:!0,useUTC:!0,isCalloutForStack:!0},n}(u.Component),qv=(0,r.I)(Uv,(function(t){return{tooltip:tv(t.theme),markerLabel:ev(t.theme)}})),Zv=(0,a.Z)(),Kv=u.forwardRef((function(t,n){var i,e,r,a=u.useMemo((function(){return p("circle")}),[]),s=u.useMemo((function(){return p("seriesID")}),[]),c=u.useMemo((function(){return p("verticalLine")}),[]),d=u.useMemo((function(){return p("ScatterChartTooltipId_")}),[]),f=u.useMemo((function(){return p("_ScatterChart_empty")}),[]),v=u.useRef(lt(t.data.scatterChartData)),h=u.useMemo((function(){return ks(v.current)||{}}),[v]),g=u.useRef(""),y=u.useRef(""),m=u.useRef(null),b=u.useMemo((function(){return[]}),[]),x=u.useRef(null),w=u.useRef([]),M=u.useRef(0),C=u.useRef(null),k=u.useRef(null),A=u.useState(""),S=A[0],L=A[1],D=u.useState(""),V=D[0],N=D[1],O=u.useState([]),T=O[0],E=O[1],F=u.useState([]),B=F[0],P=F[1],_=u.useState(!1),H=_[0],I=_[1],W=u.useState(""),R=W[0],z=W[1],j=u.useState(),$=j[0],Y=j[1],X=u.useState(!1),G=X[0],U=X[1],q=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),Z=q[0],K=q[1],J=u.useState(""),Q=J[0],tt=J[1],nt=u.useRef(void 0),it=u.useRef(!1),et=u.useRef(!1),rt=Zv(t.styles,{theme:t.theme});u.useEffect((function(){var n,i,e;nt.current&&!Gs(nt.current,null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&K((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),nt.current=null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends}),[null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){var n,i;return{chartContainer:null!==(i=null===(n=C.current)||void 0===n?void 0:n.chartContainer)&&void 0!==i?i:null,toImage:function(n){var i,e;return Jd([{container:null===(i=C.current)||void 0===i?void 0:i.chartContainer}],t.hideLegend||null===(e=k.current)||void 0===e?void 0:e.toSVG,(0,l.jI)(),n)}}}),[t.hideLegend]);var ot=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0?Is(t.data.scatterChartData[0].data[0].x,!0):ns.StringAxis,ut=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0&&"string"==typeof t.data.scatterChartData[0].data[0].y?is.StringAxis:is.NumericAxis,at=u.useRef([]);function lt(t){return t?t.map((function(t,n){var i;return i=void 0===t.color?ss(n,0):cs(t.color),(0,o.Cl)((0,o.Cl)({},t),{index:-1,color:i})})):[]}u.useEffect((function(){v.current===lt(t.data.scatterChartData)&&t.data===v.current||(at.current=lt(t.data.scatterChartData))}),[t.height,t.width,t.data,v]);var st=u.useCallback((function(t){x.current=t}),[]);function ct(){P([]),I(!1)}function dt(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?K(n):K(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}var ft=u.useCallback((function(n,i){var e=t.theme;return R===i?e.semanticColors.bodyBackground:n}),[R,t]),vt=u.useCallback((function(n,i,e,r,o,u,a,l){return u===ns.NumericAxis?Vs(n,i,e,o,t.xScaleType,!0):u===ns.DateAxis?Es(n,i,e,o,l,r):Ts(i,e,o)}),[t.xScaleType]),ht=u.useCallback((function(n,i,e,r,o){m.current=r;var u=i instanceof Date?(0,Yn.Yn)(i,t.culture,t.useUTC):i,a=hc(h,i);a?(sl("#".concat(c)).attr("transform",(function(){var t;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,i))+M.current,", 0)")})).attr("visibility","visibility"),b.forEach((function(t){t.index===n&&(U(!0),L(e||""+u),tt("#".concat(r)),E(a.values),z(r))}))):z(r)}),[c,g,M,h,b,t.culture,t.useUTC]),pt=u.useCallback((function(n,i,e,r,o,u,a){var l;null==a||a.persist();var s=n instanceof Date?(0,Yn.Yn)(n,t.culture,t.useUTC):n,d=hc(h,n);d?(sl("#".concat(c)).attr("transform",(function(){var t,e;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,n))+M.current,", ").concat(null===(e=y.current)||void 0===e?void 0:e.call(y,i),")")})).attr("visibility","visibility").attr("y2","".concat(e-(null===(l=y.current)||void 0===l?void 0:l.call(y,i)))),m.current!==o&&(m.current=o,U(!0),L(r||""+s),tt("#".concat(o)),E(d.values),Y(d),z(o))):z(o)}),[c,g,M,h,t.culture,t.useUTC]),gt=u.useCallback((function(){sl("#".concat(c)).attr("visibility","hidden")}),[c]),yt=u.useCallback((function(){m.current=null,z(""),G&&U(!1)}),[m,G,z,U]),mt=u.useCallback((function(){return Z.length>0?Z:V?[V]:[]}),[Z,V]),bt=u.useCallback((function(){return 0===mt().length}),[mt]),xt=u.useCallback((function(t){return mt().includes(t)}),[mt]),wt=u.useCallback((function(n,i){var e,r,o=null===(e=v.current)||void 0===e?void 0:e[n],u=o.data[i],a=u.x instanceof Date?(0,Yn.Yn)(u.x,t.culture,t.useUTC):u.x,l=u.xAxisCalloutData||a,s=o.legend,c=u.yAxisCalloutData||u.y;return(null===(r=u.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(l,". ").concat(s,", ").concat(c,".")}),[v,t.culture,t.useUTC]),Mt=u.useCallback((function(n,i){var e,r,l,c,f,h,p,m,b,w,C,k,A,S,L,D,V,N,O,T,E,F,P,_,I,W,z,j,$,Y,X,G,U,q,Z,K,J=[];v.current=H?B:lt(t.data.scatterChartData),ot===ns.StringAxis&&(M.current=(null===(e=g.current)||void 0===e?void 0:e.bandwidth())/2);for(var Q=null!==(r=di(v.current,(function(t){return di(t.data,(function(t){return t.markerSize}))})))&&void 0!==r?r:0,tt=null!==(l=fi(v.current,(function(t){return fi(t.data,(function(t){return t.markerSize}))})))&&void 0!==l?l:0,nt=ot!==ns.StringAxis&&ut!==is.StringAxis,at=nt?cc({data:v.current,xScale:g.current,yScalePrimary:y.current,xScaleType:t.xScaleType,yScaleType:t.yScaleType}):0,st=function(t){for(var n=[],e=null===(h=null===(f=v.current)||void 0===f?void 0:f[t])||void 0===h?void 0:h.legend,r=null===(m=null===(p=v.current)||void 0===p?void 0:p[t])||void 0===m?void 0:m.color,l=i-(null!==(w=null===(b=x.current)||void 0===b?void 0:b.bottom)&&void 0!==w?w:0)+6,c=function(i){var c=null===(L=null===(S=v.current)||void 0===S?void 0:S[t])||void 0===L?void 0:L.data[i],d=c.x,f=c.y,h=c.xAxisCalloutData,p=c.xAxisCalloutAccessibilityData,m=null===(D=g.current)||void 0===D?void 0:D.call(g,d),b=ut===is.StringAxis?(null===(V=y.current)||void 0===V?void 0:V.call(y,f))+((null===(N=y.current)||void 0===N?void 0:N.bandwidth)?y.current.bandwidth()/2:0):null===(O=y.current)||void 0===O?void 0:O.call(y,f);if(!lc(m,b))return"continue";var x="".concat(s,"_").concat(t,"_").concat(i),w="".concat(a,"_").concat(t,"_").concat(i),C=(null===(E=null===(T=v.current)||void 0===T?void 0:T[t])||void 0===E?void 0:E.data[i]).markerSize,k=R===w?6:4;C&&(nt&&0!==tt?k=C*at/tt:nt||tt===Q||(k=4+(C-Q)/(tt-Q)*12));var A,B=xt(e)||bt()||H,X=(null===(P=null===(F=v.current)||void 0===F?void 0:F[t])||void 0===P?void 0:P.hideNonActiveDots)&&R!==w,G=null===(I=null===(_=v.current)||void 0===_?void 0:_[t].data[i])||void 0===I?void 0:I.text;et.current||n.push(u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:w,key:w,r:Math.max(k,4),cx:m+M.current,cy:b,"data-is-focusable":B,onMouseOver:function(t){return pt(d,f,l,h,w,p,t)},onMouseMove:function(t){return pt(d,f,l,h,w,p,t)},onMouseOut:gt,onFocus:function(){return ht(x,d,h,w,p)},onBlur:gt},(A=null===(j=null===(z=null===(W=v.current)||void 0===W?void 0:W[t])||void 0===z?void 0:z.data[i])||void 0===j?void 0:j.onDataPointClick)?{onClick:A}:{},{opacity:B&&!X?1:.1,fill:ft(r,w),stroke:r,role:"img","aria-label":wt(t,i),tabIndex:""!==(null===(Y=null===($=v.current)||void 0===$?void 0:$[t])||void 0===Y?void 0:Y.legend)?0:void 0})))),et&&G&&n.push(u.createElement("text",{key:"".concat(w,"-label"),x:m+M.current,y:b+Math.max(k+12,16),className:rt.markerLabel},G))},d=0;d<(null===(A=null===(k=null===(C=v.current)||void 0===C?void 0:C[t])||void 0===k?void 0:k.data)||void 0===A?void 0:A.length);d++)c(d);it.current&&n.push.apply(n,$v({xAxisScale:g.current,yAxisScale:y.current,className:rt.markerLabel||"",lineOptions:null===(G=null===(X=v.current)||void 0===X?void 0:X[t])||void 0===G?void 0:G.lineOptions})),J.push(u.createElement("g",{key:"series_".concat(t),role:"region","aria-label":"".concat(e,", series ").concat(t+1," of ").concat(null===(U=v.current)||void 0===U?void 0:U.length," with ").concat(null===(K=null===(Z=null===(q=v.current)||void 0===q?void 0:q[t])||void 0===Z?void 0:Z.data)||void 0===K?void 0:K.length," data points.")},n))},ct=(null===(c=v.current)||void 0===c?void 0:c.length)-1;ct>=0;ct--)st(ct);if(!t.showXAxisLablesTooltip)try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}if(!t.wrapXAxisLables&&t.showXAxisLablesTooltip){var dt=sl(n).call(g.current);try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}var vt={tooltipCls:rt.tooltip,id:d,xAxis:dt};dt&&Ls(vt)}return J}),[g,y,t.data.scatterChartData,t.showXAxisLablesTooltip,t.wrapXAxisLables,a,wt,ft,ht,pt,gt,xt,bt,s,d,ot,ut,R,H,B,rt,t.xScaleType,t.yScaleType]),Ct=u.useCallback((function(t,n,i,e,r){g.current=t,y.current=n,it.current=ec(v.current),et.current=function(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"text"===t.lineOptions.mode}))}(v.current),w.current=Mt(r,i)}),[w,g,y,Mt]),kt=u.useCallback((function(n,i){var e=Fs(n,0,void 0,t.yScaleType),r=e.startValue,o=e.endValue,u=uc(r,o,t.yScaleType);return{startValue:r-u.start,endValue:o+u.end}}),[t.yScaleType]),At=t.legendProps,St=t.tickValues,Lt=t.tickFormat;v.current=lt(t.data.scatterChartData);var Dt=v.current;At&&At.canSelectMultipleLegends&&(Dt=B.length>=1?B:v.current,h=ks(Dt));var Vt=null;t.hideLegend||et.current||(Vt=function(n){var i=t.legendProps,e=!(!i||!i.canSelectMultipleLegends),r={};n.forEach((function(t){t.legend&&(r[t.legend]||(r[t.legend]=[]),r[t.legend].push(t))}));var a=Object.entries(r).map((function(t){var n=t[0],i=t[1][0];return(0,o.Cl)({title:n,color:i.color,onMouseOutAction:function(){N("")},hoverAction:function(){yt(),N(n)}},i.legendShape&&{shape:i.legendShape})}));return u.createElement(df,(0,o.Cl)({ref:k,legends:(0,o.fX)([],a,!0),enabledWrapLines:t.enabledLegendsWrapLines,overflowProps:t.legendsOverflowProps,focusZonePropsInHoverCard:t.focusZonePropsForLegendsInHoverCard,overflowText:t.legendsOverflowText},e&&{onLegendHoverCardLeave:ct},{onChange:dt},t.legendProps))}(v.current));var Nt=(0,o.Cl)({isCalloutVisible:G,directionalHint:3,YValueHover:T,hoverXValue:S,id:"toolTip".concat(m.current),target:Q,isBeakVisible:!1,gapSpace:15,onDismiss:function(){U(!1)},preventDismissOnEvent:function(){return!0},hidden:!(!t.hideTooltip&&G),descriptionMessage:t.getCalloutDescriptionMessage&&$?t.getCalloutDescriptionMessage($):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:{}},t.calloutProps),Ot={tickValues:St,tickFormat:Lt},Tt=v.current.map((function(t){return t.data.map((function(t){return t.x}))})).flat();r=Array.from(new Set(Tt));var Et=function(){var n;if(ut!==is.StringAxis||"default"===t.yAxisCategoryOrder){for(var i=new Set,e=v.current.length-1;e>=0;e--){var r=v.current[e];if(r.data&&Array.isArray(r.data))for(var o=0,u=r.data;o<u.length;o++){var a=u[o];"string"==typeof a.y&&i.add(a.y)}}return Array.from(i)}return nc((n={},v.current.forEach((function(t){t.data&&Array.isArray(t.data)&&t.data.forEach((function(t){"string"==typeof t.y&&(n[t.y]||(n[t.y]=[]),"number"==typeof t.x&&n[t.y].push(t.x))}))})),n),t.yAxisCategoryOrder)}();return t.data&&t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData.filter((function(t){return t.data.length})).length>0?u.createElement(Dv,(0,o.Cl)({},t,{ref:C,chartTitle:t.data.chartTitle,isCalloutForStack:!0,points:Dt,chartType:ts.ScatterChart,calloutProps:Nt,tickParams:Ot,legendBars:Vt,getmargins:st,getMinMaxOfYAxis:kt,getDomainNRangeValues:vt,createYAxis:ws,createStringYAxis:Cs,getGraphData:Ct,xAxisType:ot,yAxisType:ut},ut===is.StringAxis?{stringDatasetForYAxisDomain:Et}:{},{onChartMouseLeave:yt,enableFirstRenderOptimization:!0,datasetForXAxisDomain:r,componentRef:C},it.current?{yMaxValue:1,yMinValue:-1}:{},{children:function(t){return g.current=t.xScale,y.current=t.yScalePrimary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:t.containerHeight,stroke:"#323130",id:c,visibility:"hidden",strokeDasharray:"5,5"}),u.createElement("g",null,w.current)))}})):u.createElement("div",{id:f,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));Kv.displayName="ScatterChart";var Jv=(0,r.I)(Kv,(function(t){return{tooltip:tv(t.theme),markerLabel:ev(t.theme)}}));function Qv(t,n){if((r=t.length)>1)for(var i,e,r,o=1,u=t[n[0]],a=u.length;o<r;++o)for(e=u,u=t[n[o]],i=0;i<a;++i)u[i][1]+=u[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function th(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function nh(t,n){return t[n]}function ih(t){const n=[];return n.key=t,n}function eh(t){return t<0?-1:1}function rh(t,n,i){var e=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(e||r<0&&-0),u=(i-t._y1)/(r||e<0&&-0),a=(o*r+u*e)/(e+r);return(eh(o)+eh(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function oh(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function uh(t,n,i){var e=t._x0,r=t._y0,o=t._x1,u=t._y1,a=(o-e)/3;t._context.bezierCurveTo(e+a,r+a*n,o-a,u-a*i,o,u)}function ah(t){this._context=t}function lh(t){this._context=t}function sh(t){return new ah(t)}function ch(t,n,i){var e=null,r=vf(!0),o=null,u=hl,a=null,l=Bf(s);function s(s){var c,d,f,v,h,p=(s=ff(s)).length,g=!1,y=new Array(p),m=new Array(p);for(null==o&&(a=u(h=l())),c=0;c<=p;++c){if(!(c<p&&r(v=s[c],c,s))===g)if(g=!g)d=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),f=c-1;f>=d;--f)a.point(y[f],m[f]);a.lineEnd(),a.areaEnd()}g&&(y[c]=+t(v,c,s),m[c]=+n(v,c,s),a.point(e?+e(v,c,s):y[c],i?+i(v,c,s):m[c]))}if(h)return a=null,h+""||null}function c(){return lv().defined(r).curve(u).context(o)}return t="function"==typeof t?t:void 0===t?uv:vf(+t),n="function"==typeof n?n:vf(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?av:vf(+i),s.x=function(n){return arguments.length?(t="function"==typeof n?n:vf(+n),e=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:vf(+n),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:vf(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:vf(+t),i=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:vf(+t),s):n},s.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:vf(+t),s):i},s.lineX0=s.lineY0=function(){return c().x(t).y(n)},s.lineY1=function(){return c().x(t).y(i)},s.lineX1=function(){return c().x(e).y(n)},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:vf(!!t),s):r},s.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),s):u},s.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),s):o},s}ah.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:uh(this,this._t0,oh(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,uh(this,oh(this,i=rh(this,t,n)),i);break;default:uh(this,this._t0,i=rh(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(function(t){this._context=new lh(t)}.prototype=Object.create(ah.prototype)).point=function(t,n){ah.prototype.point.call(this,n,t)},lh.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,r,o){this._context.bezierCurveTo(n,t,e,i,o,r)}};var dh,fh=(0,a.Z)(),vh=wi((function(t){return t.x})).left;!function(t){t.show="visibility",t.hide="hidden"}(dh||(dh={}));var hh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._containsSecondaryYAxis=!1,e._hasDuplicateXValues=!1,e._hasMissingXValues=!1,e.toImage=function(t){var n,i;return Jd([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},e._getMinMaxOfYAxis=function(t,n,i){return Fs(t,0,i)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?Vs(t,n,i,r):o===ns.DateAxis?Es(t,n,i,r,a,e):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},e._getMargins=function(t){e.margins=t},e._onRectMouseMove=function(t){t.persist();var n=e.props.data.lineChartData,i=e._xAxisRectScale.invert(ov(t)[0],document.getElementById(e._rectId)),r=vh(n[0].data,i),u=n[0].data[r-1],a=n[0].data[r],l=null,s=null,c=n[0].data.length>0?Is(n[0].data[0].x,!0):null;if(void 0===u&&void 0!==a)l=a.x,s=r;else if(void 0!==u&&void 0===a)l=u.x,s=r-1;else{var d=void 0,f=void 0,v=void 0;switch(c){case ns.DateAxis:d=new Date(i).getTime(),f=u.x.getTime(),v=a.x.getTime(),l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1;break;case ns.NumericAxis:d=i,f=u.x,v=a.x,l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1}}var h=n[0].data[s],p=h.xAxisCalloutData,g=h.xAxisCalloutAccessibilityData,y=l instanceof Date?(0,Yn.Yn)(l,e.props.culture,e.props.useUTC):l,m=hc(e._calloutPoints,l),b=c===ns.DateAxis?l.getTime():l,x=e.state.nearestCircleToHighlight!==b;if(m&&x&&!e.state.isShowCalloutPending){var w=e._getFilteredLegendValues(m.values);e.setState({nearestCircleToHighlight:b,isCalloutVisible:!1,isShowCalloutPending:!0,lineXValue:e._xAxisRectScale(l),displayOfLine:dh.show,isCircleClicked:!1,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},m),{values:w}),YValueHover:w,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},m),{values:w}),hoverXValue:p||y,xAxisCalloutAccessibilityData:g,activePoint:""})}m||e.setState({isCalloutVisible:!1,nearestCircleToHighlight:b,displayOfLine:dh.hide,isCircleClicked:!1})},e._onRectMouseOut=function(){},e._handleChartMouseLeave=function(){e.setState({refSelected:null,isCalloutVisible:!1,nearestCircleToHighlight:null,lineXValue:0,displayOfLine:dh.hide,isCircleClicked:!1,stackCalloutProps:void 0,dataPointCalloutProps:void 0,hoverXValue:void 0,YValueHover:[]})},e._getDataPoints=function(t,n){var i,r=[],o=0;if(e._shouldFillToZeroY())t.forEach((function(t,i){var e=[];n.forEach((function(n){e.push({values:[0,n[t]],xVal:n.xVal}),n[t]>o&&(o=n[t])})),r.push(e)}));else{var u=function(){var t=vf([]),n=th,i=Qv,e=nh;function r(r){var o,u,a=Array.from(t.apply(this,arguments),ih),l=a.length,s=-1;for(const t of r)for(o=0,++s;o<l;++o)(a[o][s]=[0,+e(t,a[o].key,s,r)]).data=t;for(o=0,u=ff(n(a));o<l;++o)a[u[o]].index=o;return i(a,u),a}return r.keys=function(n){return arguments.length?(t="function"==typeof n?n:vf(Array.from(n)),r):t},r.value=function(t){return arguments.length?(e="function"==typeof t?t:vf(+t),r):e},r.order=function(t){return arguments.length?(n=null==t?th:"function"==typeof t?t:vf(Array.from(t)),r):n},r.offset=function(t){return arguments.length?(i=null==t?Qv:t,r):i},r}().keys(t)(n);o=fi(u[u.length-1],(function(t){return t[1]})),u.forEach((function(t){var n=[];t.forEach((function(t){n.push({values:t,xVal:t.data.xVal})})),r.push(n)}))}return e._isMultiStackChart=!!((null===(i=e.props.legendProps)||void 0===i?void 0:i.selectedLegends)?(null==r?void 0:r.length)>=1:(null==r?void 0:r.length)>1),{renderData:r,maxOfYVal:e._containsSecondaryYAxis?Fs(e.props.data.lineChartData).endValue:o}},e._createDataSet=function(t){if(e.props.enablePerfOptimization&&e._enableComputationOptimization&&!e._hasDuplicateXValues){var n=[],i=[],r=[],o=[],u=ks(t);t&&t.length&&t.forEach((function(t){r.push(t.color),o.push(t.opacity||1),n.push.apply(n,t.data)}));var a={};n.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;a[n]?a[n].push(t):a[n]=[t]})),Object.keys(a).forEach((function(t){var n=a[t],e={};n.forEach((function(t,n){e.xVal=t.x,e["chart".concat(n)]=t.y})),i.push(e)}));for(var l=i&&Object.keys(i[0]).length,s=[],c=0;c<l-1;c++){var d="chart".concat(c);s.push(d)}var f=e._getDataPoints(s,i);return{colors:r,opacity:o,keys:s,data:f,calloutPoints:u}}var v=[],h=[],p=[],g=[],y=(u=ks(t),f={},s=[],0);if(t&&t.length&&t.forEach((function(t){e._hasDuplicateXValues&&!t.legend&&(t.legend="chart".concat(y),++y),t.data.forEach((function(n){n.legend=t.legend})),p.push(t.color),g.push(t.opacity||1),v.push.apply(v,t.data)})),e._hasDuplicateXValues){var m=e._createDatasetForXCoordinateWithMultipleYValues(v);f=e._getDataPoints(m.keys,m.filteredDataSet)}else{for(var b=v,x=function(){var t=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x,n=b.filter((function(n){return(n.x instanceof Date?n.x.toLocaleString():n.x)===t})),i={};n.forEach((function(t,n){i.xVal=t.x,i["chart".concat(n)]=t.y})),h.push(i);var e=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x;b=b.filter((function(t){return(t.x instanceof Date?t.x.toLocaleString():t.x)!==e}))};b.length;)x();for(l=h&&Object.keys(h[0]).length,c=0;c<l-1;c++)d="chart".concat(c),s.push(d);f=e._getDataPoints(s,h)}return{colors:p,opacity:g,keys:s,data:f,calloutPoints:u}},e._createDatasetForXCoordinateWithMultipleYValues=function(t){var n=[],i={};t.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;i[n]||(i[n]=[]),i[n].push(t)})),Object.keys(i).forEach((function(t){var e=i[t];e.forEach((function(t,i){var r={xVal:e[0].x};r[t.legend?t.legend:"chart".concat(i)]=t.y,n.push(r)}))}));var e=[];n.forEach((function(t){Object.keys(t).forEach((function(t){"xVal"===t||e.includes(t)||e.push(t)}))})),n.forEach((function(t){e.forEach((function(n){t[n]||(t[n]=0)}))}));var r=n.filter((function(t){return e.some((function(n){return 0!==t[n]}))}));return{keys:Array.from(new Set(r.flatMap((function(t){return Object.keys(t).filter((function(t){return"xVal"!==t}))})))),filteredDataSet:r}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._getGraphData=function(t,n,i,r,o,u,a){e._chart=e._drawGraph(i,t,n,a,o)},e._getLegendData=function(t){var n=[];return t.forEach((function(t){var i=t.color;if(!(n.filter((function(n){return n.title===t.legend&&n.color===i})).length>0)){var r={title:t.legend,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(t.legend)},onMouseOutAction:function(){e._onLegendLeave()}};n.push(r)}})),u.createElement(df,(0,o.Cl)({legends:n,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._onDataPointClick=function(t){t&&t(),e.setState({isCircleClicked:!0})},e._getOpacity=function(t){return e._isMultiStackChart?e._legendHighlighted(t)||e._noLegendHighlighted()?.7:.1:.7},e._getLineOpacity=function(t){if(e._isMultiStackChart){var n=.3;return e.state.isCalloutVisible&&(n=1),e._noLegendHighlighted()||(n=e._legendHighlighted(t)?0:.1),n}return 1},e._updateCircleFillColor=function(t,n,i){var r=n;return e.state.nearestCircleToHighlight!==t&&e.state.activePoint!==i||(e._highlightedCircleId=i,e.state.isCircleClicked||(r=e.props.theme.semanticColors.bodyBackground)),r},e._drawGraph=function(t,n,i,r,a){var l,s=e._addDefaultColors(e.props.data.lineChartData),c=e.props.data,d=c.pointOptions,f=c.pointLineOptions,v=[];e._data.forEach((function(t,a){var l,c,d,f,h,p,g,y,m,b,x,w,M=(null===(l=s[a])||void 0===l?void 0:l.useSecondaryYScale)&&r?r:i,C=Qs(null===(d=null===(c=s[a])||void 0===c?void 0:c.lineOptions)||void 0===d?void 0:d.curve,sh),k=ch().x((function(t){return n(t.xVal)})).y0((function(t){return M(t.values[0])})).y1((function(t){return M(t.values[1])})).curve(C),A=lv().x((function(t){return n(t.xVal)})).y((function(t){return M(t.values[1])})).curve(C),S=e._shouldFillToZeroY()?.8:e._opacity[a];v.push(u.createElement(u.Fragment,{key:"".concat(a,"-graph-").concat(e._uniqueIdForGraph)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:"gradient_".concat(a),x1:"0%",x2:"0%",y1:"0%",y2:"100%"},u.createElement("stop",{offset:"0",stopColor:e._colors[a]}),u.createElement("stop",{offset:"100%",stopColor:"transparent"}))),u.createElement("path",{id:"".concat(a,"-line-").concat(e._uniqueIdForGraph),d:A(t),fill:"transparent",strokeWidth:null!==(p=null===(h=null===(f=s[a])||void 0===f?void 0:f.lineOptions)||void 0===h?void 0:h.strokeWidth)&&void 0!==p?p:3,stroke:e._colors[a],opacity:e._getLineOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove,strokeDasharray:null===(y=null===(g=s[a])||void 0===g?void 0:g.lineOptions)||void 0===y?void 0:y.strokeDasharray,strokeDashoffset:null===(b=null===(m=s[a])||void 0===m?void 0:m.lineOptions)||void 0===b?void 0:b.strokeDashoffset,strokeLinecap:null===(w=null===(x=s[a])||void 0===x?void 0:x.lineOptions)||void 0===w?void 0:w.strokeLinecap}),1===t.length?u.createElement("circle",{id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),cx:n(t[0].xVal),cy:M(t[0].values[1]),r:6,stroke:e._colors[a],strokeWidth:3,fill:e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove}):u.createElement("path",(0,o.Cl)({id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),d:k(t),fill:e.props.enableGradient?"url(#gradient_".concat(a,")"):e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e.props.optimizeLargeData&&{"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),role:"img","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")}))))}));var h=d&&d.r?Number(d.r):8;e._data.forEach((function(t,a){var c;if(s.length!==a){var f=(null===(c=s[a])||void 0===c?void 0:c.useSecondaryYScale)&&r?r:i;e.props.optimizeLargeData&&1!==t.length?t.forEach((function(t,i){var r=t.xVal instanceof Date?t.xVal.getTime():t.xVal;if(e.state.nearestCircleToHighlight===r){var c="".concat(e._circleId,"_").concat(a*e._data[0].length+i);l=s[a].color;var p=s[a].legend;v.push(u.createElement("circle",(0,o.Cl)({key:c,id:c,cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(r,l,c),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),Xs(d),{r:e._getCircleRadius(r,h,c,p)})))}})):v.push(u.createElement("g",{key:"".concat(a,"-dots-").concat(e._uniqueIdForGraph),clipPath:"url(#clip)",role:"region","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")},t.map((function(t,i){var r="".concat(e._circleId,"_").concat(a*e._data[0].length+i),c=t.xVal instanceof Date?t.xVal.getTime():t.xVal;l=s[a].color;var v=s[a].legend;return u.createElement("circle",(0,o.Cl)({key:r,id:r,"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(c,l,r),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),{onFocus:function(){return e._handleFocus(a,i,r)},onBlur:e._handleBlur},Xs(d),{r:e._getCircleRadius(c,h,r,v),role:"img","aria-label":!e._hasDuplicateXValues&&!e._hasMissingXValues&&e._getAriaLabel(a,i)||void 0}))}))))}})),v.push(u.createElement("line",(0,o.Cl)({id:e._verticalLineId,key:e._verticalLineId,x1:e.state.lineXValue,y1:0,x2:e.state.lineXValue,y2:t,strokeWidth:1,strokeDasharray:5.5,stroke:l,opacity:.5,visibility:e.state.displayOfLine},Xs(f))));var p=fh(e.props.styles,{theme:e.props.theme});if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=sl(a).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:p.tooltip,id:e._tooltipId,axis:g};g&&Ls(y)}return v},e._getOnClickHandler=function(t,n,i){return!e._hasDuplicateXValues&&!e._hasMissingXValues&&{onClick:e._onDataPointClick.bind(e,t[n].data[i].onDataPointClick)}},e._getCircleRadius=function(t,n,i,r){var o=e.state,u=o.isCircleClicked,a=o.nearestCircleToHighlight,l=o.activePoint;return e._noLegendHighlighted()||e._legendHighlighted(r)?u&&a===t?1:a===t||l===i?n:0:0},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){if(e._hasMissingXValues){var n=new Set;t&&t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))})),t&&t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||t.data.push({x:"string"==typeof n?new Date(n):n,y:0,legend:t.legend})})),t.data.sort((function(t,n){var i=t.x instanceof Date?t.x.getTime():t.x,e=n.x instanceof Date?n.x.getTime():n.x;return i<e?-1:i>e?1:0}))}))}return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?ss(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):cs(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},e._handleFocus=function(t,n,i){var r=e.props.data.lineChartData[t].data[n],u=r.x,a=r.y,l=r.xAxisCalloutData,s=u instanceof Date?(0,Yn.Yn)(u,e.props.culture,e.props.useUTC):u,c=hc(e._calloutPoints,u);if(c){c.values=c.values.filter((function(t){return t.y===a}));var d=e._getFilteredLegendValues(c.values);e.setState({refSelected:"#".concat(i),isCalloutVisible:!0,hoverXValue:l||s,YValueHover:d,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},c),{values:d}),dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},c),{values:d}),activePoint:i})}},e._getFilteredLegendValues=function(t){return e._noLegendHighlighted()?t:t.filter((function(t){return e._legendHighlighted(t.legend)}))},e._handleBlur=function(){e.setState({refSelected:null,isCalloutVisible:!1,hoverXValue:void 0,YValueHover:[],stackCalloutProps:void 0,dataPointCalloutProps:void 0,activePoint:""})},e._getChartTitle=function(){var t=e.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Area chart with ".concat((null==i?void 0:i.length)||0," data series. ")},Ac(e),e._createSet=(0,an.J9)(e._createDataSet),e.state={selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,hoverXValue:"",isCalloutVisible:!1,refSelected:null,YValueHover:[],lineXValue:0,displayOfLine:dh.hide,isCircleClicked:!1,nearestCircleToHighlight:null,isShowCalloutPending:!1,activePoint:""},En("AREA CHART",n,{showYAxisGridLines:"Dont use this property. Lines are drawn by default"}),e._hasMissingXValues=e._containsMissingXValues(),e._uniqueIdForGraph=p("areaChart_"),e._verticalLineId=p("verticalLine_"),e._circleId=p("circle"),e._rectId=p("rectangle"),e._tooltipId=p("AreaChartTooltipID"),e._enableComputationOptimization=!0,e._firstRenderOptimization=!0,e._emptyChartId=p("_AreaChart_empty"),e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Gs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),this.state.isShowCalloutPending&&this.setState({refSelected:"#".concat(this._highlightedCircleId),isCalloutVisible:!0,isShowCalloutPending:!1})},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props.data.lineChartData,i=this._addDefaultColors(n);this._hasDuplicateXValues=this._xCoordinateContainsMultipleY(),this._containsSecondaryYAxis=!!this.props.secondaryYScaleOptions&&i.some((function(t){return t.useSecondaryYScale}));var e=this._createSet(i),r=e.colors,a=e.opacity,l=e.data,s=e.calloutPoints;this._calloutPoints=s;var c=Ds(i);this._colors=r,this._opacity=a,this._data=l.renderData;var d=this._getLegendData(i),f={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat},v=(0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible&&!this._hasDuplicateXValues&&!this._hasMissingXValues,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),gapSpace:15,isBeakVisible:!1,onDismiss:this._closeCallout,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps);return u.createElement(Dv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:i,chartType:ts.AreaChart,calloutProps:v,legendBars:d,createYAxis:ws,isCalloutForStack:!0,xAxisType:c?ns.DateAxis:ns.NumericAxis,tickParams:f,maxOfYVal:l.maxOfYVal,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Cs,getmargins:this._getMargins,getMinMaxOfYAxis:this._getMinMaxOfYAxis,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){t._xAxisRectScale=n.xScale;var i=t._xAxisRectScale.ticks(),e=t._xAxisRectScale(i[i.length-1]),r=n.containerHeight-t.margins.top;return u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("rect",{id:t._rectId,width:e,height:r,fill:"transparent",onMouseMove:t._onRectMouseMove,onMouseOut:t._onRectMouseOut,onMouseOver:t._onRectMouseMove})),u.createElement("g",null,t._chart))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._getAriaLabel=function(t,n){var i,e=this.props.data.lineChartData[t],r=e.data[n],o=r.x instanceof Date?(0,Yn.Yn)(r.x,this.props.culture,this.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n.prototype._xCoordinateContainsMultipleY=function(){var t=this.props.data.lineChartData;if(!t)return!1;for(var n=0,i=t;n<i.length;n++)for(var e={},r=0,o=i[n].data;r<o.length;r++){var u=o[r],a=u.x instanceof Date?u.x.toLocaleString():u.x;if(e[a]||(e[a]=[]),e[a].push(u.y),e[a].length>1)return!0}return!1},n.prototype._containsMissingXValues=function(){var t=this.props.data.lineChartData;if(!t)return!1;var n=new Set;t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))}));var i=!1;return t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||(i=!0)}))})),i},n.prototype._shouldFillToZeroY=function(){return"tozeroy"===this.props.mode||this._containsSecondaryYAxis},n.defaultProps={useUTC:!0},n}(u.Component),ph=(0,r.I)(hh,(function(t){return{tooltip:tv(t.theme)}})),gh=function(t,n){var i,e=t.color;return{arcRoot:{fill:e},arcRootFocussed:{fill:e,stroke:(null==n?void 0:n.palette.black)||It.bp.black,strokeWidth:2},arc:{outline:"none"},arcText:{fill:(null==n?void 0:n.semanticColors.bodyText)||It.bp.black,outline:"none",selectors:(i={},i[It.up]={fill:"CanvasText"},i)}}},yh=function(t){function n(n){var i=t.call(this,n)||this;return i.updateChart=function(t){bh(t)},i._onFocus=function(){i.setState({isArcFocused:!0})},i._onBlur=function(){i.setState({isArcFocused:!1})},i.state={isArcFocused:!1},i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return bh(t),null},n.prototype.render=function(){var t,n=this,i=this.props.arc,e=(0,a.Z)()((function(t){return gh(t,n.props.theme)}),(0,o.Cl)({},this.props));return u.createElement("path",{d:i(this.props.data),className:"".concat(this.state.isArcFocused?e.arcRootFocussed:e.arcRoot),onClick:null===(t=this.props.data)||void 0===t?void 0:t.data.onClick})},n.defaultProps={arc:zf()},n}(u.Component),mh=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var n,i,e=this,r=this.props,o=r.data,l=r.culture,s=zf().centroid({endAngle:(null==o?void 0:o.endAngle)||0,startAngle:(null==o?void 0:o.startAngle)||0,padAngle:null==o?void 0:o.padAngle,innerRadius:(null===(n=this.props)||void 0===n?void 0:n.outerRadius)||0,outerRadius:(null===(i=this.props)||void 0===i?void 0:i.outerRadius)||4}),c=s[0],d=s[1],f=(0,a.Z)()((function(t){return gh(t,e.props.theme)})),v=(((null==o?void 0:o.startAngle)||0)+((null==o?void 0:o.endAngle)||0))/2,h="".concat(null==o?void 0:o.data.x,"-").concat((0,Yn.c$)(null==o?void 0:o.data.y,l));return u.createElement("g",{className:"".concat(f.arc," arc"),"data-is-focusable":!0,id:this._arcId,onFocus:this._onFocus,onBlur:this._onBlur,"aria-label":h,role:"img"},t.prototype.render.call(this),u.createElement(sv,{content:h,textProps:{x:c+(v>Math.PI?-10:10),y:d+(v>Math.PI/2&&v<3*Math.PI/2?10:-10),dominantBaseline:v>Math.PI/2&&v<3*Math.PI/2?"hanging":"auto",textAnchor:!this._isRTL&&v>Math.PI||this._isRTL&&v<Math.PI?"end":"start","aria-label":"".concat(null==o?void 0:o.data.x,"-").concat((0,Yn.c$)(null==o?void 0:o.data.y,l)),className:f.arcText},isTooltipVisibleProp:this.state.isArcFocused,shouldReceiveFocus:!1,maxWidth:40,wrapContent:As}))},n}(yh);function bh(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var xh,wh=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n){return u.createElement(mh,{culture:i.props.culture,key:n,data:t,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:"".concat(i.colors(n)),theme:i.props.theme})},i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=n.width,o=n.height,a=n.chartTitle,l=n.theme,s=[];if(e&&!this.props.colors)for(var c=0;c<e.length;c++)s.push(ss(c,0,null==l?void 0:l.isInverted));var d=this.props.colors,f=void 0===d?s:d;this.colors=Ou().range(f.map((function(t){return cs(t)})));var v=i(e),h="translate(".concat(r/2,", ").concat(o/2,")");return u.createElement(Xc,{direction:rc.domOrder},u.createElement("svg",{width:r,height:o,"aria-label":a},u.createElement("g",{className:"pie",transform:h},v.map((function(n,i){return t.arcGenerator(n,i)})))))},n.defaultProps={pie:Df().padAngle(.01).sort(null).value((function(t){return t.y}))},n}(u.Component),Mh=(0,a.Z)(),Ch=function(t){function n(n){var i=t.call(this,n)||this;return i._emptyChartId=p("_PieChart_empty"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.data,i=t.width,e=t.height,r=t.colors,o=t.chartTitle,a=this.props,l=a.theme,s=a.className,c=a.styles,d=a.culture;this._classNames=Mh(c,{theme:l,width:i,height:e,className:s});var f=Math.min(i-80,e-32)/2;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root},this.props.chartTitle&&u.createElement("p",{className:this._classNames.chartTitle},this.props.chartTitle),u.createElement(wh,{culture:d,width:i+8,height:e+8,outerRadius:f,innerRadius:1,data:n,colors:r,chartTitle:o,theme:l}))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.filter((function(t){return t.y>0})).length>0)},n.defaultProps={data:[],width:600,height:350},n}(u.Component),kh=(0,r.I)(Ch,(function(t){var n=t.className,i=t.theme,e=t.width+30,r=t.height+10;return{root:[i.fonts.medium,"ms-PieChart",n,{width:e+40}],chart:[{padding:20,width:e,height:r,boxSizing:"content-box"}],chartTitle:[(0,o.Cl)((0,o.Cl)({textAlign:"center"},i.fonts.mediumPlus),{color:i.semanticColors.bodyText})]}}));!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(xh||(xh={}));var Ah,Sh=(0,a.Z)(),Lh=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._adjustProps=function(){var t=i.props,n=t.theme,e=t.className,r=t.styles,o=t.width,u=t.barHeight;i._classNames=Sh(r,{legendColor:i.state.color,theme:n,width:o,className:e,barHeight:u})},i._getLegendData=function(t,n,e){var r=[e.blueLight,e.blue,e.blueMid,e.red,e.black],a=[];return t.forEach((function(t,e){var o=t.chartData.filter((function(t){return!t.placeHolder}));o.length<3?void 0!==n[e]&&n[e]&&o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||Mc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}})):o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||Mc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}}))})),u.createElement(df,(0,o.Cl)({legends:a,overflowProps:i.props.legendsOverflowProps,focusZonePropsInHoverCard:i.props.focusZonePropsForLegendsInHoverCard,overflowText:i.props.legendsOverflowText},i.props.legendProps))},i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i._computeLongestBarTotalValue=function(){var t=0;return i.props.data.forEach((function(n){var i=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0);t=Math.max(t,i)})),t},i.state={isCalloutVisible:!1,refArray:[],selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._onLeave=i._onLeave.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i.barChartSvgRef=u.createRef(),i._emptyChartId=p("_MSBC_empty"),i._barId=p("_MSBC_rect_"),i._barIdPlaceholderPartToWhole=p("_MSBC_rect_partToWhole_"),i._barIdEmpty=p("_MSBC_rect_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.data,e=n.theme,r=n.culture;this._adjustProps();var a=e.palette,l=this._getLegendData(i,this.props.hideRatio,a),s=this.state.isCalloutVisible;this._classNames=Sh(this.props.styles,{legendColor:this.state.color,theme:e,variant:this.props.variant,hideLabels:this.props.hideLabels});var c=this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,d=this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard;this._longestBarTotalValue=this._computeLongestBarTotalValue();var f=i.map((function(n,i){var e=t._createBarsAndLegends(n,t.props.barHeight,a,t.props.hideRatio[i],t.props.hideDenominator[i],t.props.href,i);return u.createElement("div",{key:i,id:"_MSBC_bar-".concat(i)},e)}));return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},f,!this.props.hideLegend&&u.createElement("div",{className:this._classNames.legendContainer},l),u.createElement($n,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&s),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,Rs(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(pc.ChartHoverCard,{Legend:c,YValue:d,color:this.state.color,culture:r}))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._createBarsAndLegends=function(t,n,i,e,r,a,l){var s,c,d=this,f=(null===(s=t.chartData)||void 0===s?void 0:s.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,v=this.state.barSpacingInPercent*(f-1),h=this.props.culture,g=[i.blueLight,i.blue,i.blueMid,i.red,i.black],y=[],m=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),b=this.props.variant===xh.AbsoluteScale?this._longestBarTotalValue:m,x=0;if(t.chartData.map((function(t,n){var i=(t.data?t.data:0)/b*100||0;return i<1&&0!==i?i=1:i>99&&100!==i&&(i=99),x+=i})),this.props.variant===xh.AbsoluteScale){var w=0===b?0:(b-m)/b*100;w<1&&0!==w?w=1:w>99&&100!==w&&(w=99),x+=w}var M=0!==x?x/(100-v):1,C=0,k=0,A=t.chartData.map((function(t,e){var r,o,s,c,f=t.color?t.color:t.placeHolder?i.neutralLight:g[Math.floor(4*Math.random()+1)],v=f;d.props.enableGradient&&(f=(null===(r=t.gradient)||void 0===r?void 0:r[0])||Mc(e,0,null===(o=d.props.theme)||void 0===o?void 0:o.isInverted)[0],v=(null===(s=t.gradient)||void 0===s?void 0:s[1])||Mc(e,0,null===(c=d.props.theme)||void 0===c?void 0:c.isInverted)[1]);var h=t.data?t.data:0;e>0&&(C+=k),(k=h/b*100?h/b*100:0)<1&&0!==k?k=1/M:k>99&&100!==k?k=99/M:k/=M,y.push(C);var m=d.props.styles,x=!(!d._legendHighlighted(t.legend)&&!d._noLegendHighlighted()),w=t.placeHolder?d.props.theme.semanticColors.bodyText:f;d._classNames=Sh(m,{theme:d.props.theme,shouldHighlight:x,href:a,variant:d.props.variant,hideLabels:d.props.hideLabels});var A=p("MSBC_Gradient")+"_".concat(l,"_").concat(e);return u.createElement("g",{key:e,className:t.placeHolder?d._classNames.placeHolderOnHover:d._classNames.opacityChangeOnHover,ref:function(n){d._refCallback(n,t.legend)},"data-is-focusable":!d.props.hideTooltip&&x,onFocus:d._onBarFocus.bind(d,h,w,t),onBlur:d._onBarLeave,role:"img","aria-label":d._getAriaLabel(t),onMouseOver:d._onBarHover.bind(d,h,w,t),onMouseMove:d._onBarHover.bind(d,h,w,t),onMouseLeave:d._onBarLeave,onClick:a?t.placeHolder?void 0:d._redirectToUrl.bind(d,a):t.onClick},d.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:A},u.createElement("stop",{offset:"0",stopColor:f}),u.createElement("stop",{offset:"100%",stopColor:v}))),u.createElement("rect",{key:e,id:"".concat(d._barId,"-").concat(l,"-").concat(e),x:"".concat(d._isRTL?100-y[e]-k-d.state.barSpacingInPercent*e:y[e]+d.state.barSpacingInPercent*e,"%"),y:0,width:k+"%",height:n,rx:d.props.roundCorners?3:0,fill:d.props.enableGradient?"url(#".concat(A,")"):f}))}));if(this.props.variant!==xh.AbsoluteScale||this.props.hideLabels)0===t.chartData.length&&A.push(u.createElement("g",{key:0,className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdPlaceholderPartToWhole,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0}))),0===m&&A.push(u.createElement("g",{key:"empty",className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdEmpty,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0})));else{var S=!1,L=0;this._noLegendHighlighted()?(S=!0,L=m):null===(c=t.chartData)||void 0===c||c.forEach((function(t){d._legendHighlighted(t.legend)&&(S=!0,L+=t.data?t.data:0)})),S&&A.push(u.createElement("text",{key:"text",x:"".concat(this._isRTL?100-(y[y.length-1]||0)-k-v:(y[y.length-1]||0)+k+v,"%"),textAnchor:"start",y:n/2,dominantBaseline:"central",transform:"translate(".concat(this._isRTL?-4:4,")"),className:this._classNames.barLabel,"aria-label":"Total: ".concat(L),role:"img"},zs(L)))}var D=void 0!==e&&e,V=this.props.variant!==xh.AbsoluteScale&&!D&&2===t.chartData.length,N=this.props.variant!==xh.AbsoluteScale&&!D&&1===t.chartData.length,O=function(){return(0,Yn.c$)(t.chartData[0].data?t.chartData[0].data:0,h)};return u.createElement("div",{className:this._classNames.singleChartRoot},u.createElement(Xc,{direction:rc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},t.chartTitle&&u.createElement(rd,{className:this._classNames.chartTitleLeft,content:t.chartTitle,accessibilityData:t.chartTitleAccessibilityData}),V&&u.createElement("div",(0,o.Cl)({},Rs(t.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},O()),!r&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,Yn.c$)(m,h))),N&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},Rs(t.chartDataAccessibilityData,"text",!1)),O()))),u.createElement(Xc,{direction:rc.horizontal},u.createElement("div",{className:this._classNames.chartWrapper},u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==t?void 0:t.chartTitle},A))))},n.prototype._onBarFocus=function(t,n,i){var e=this;this.state.refArray.forEach((function(r){r.legendText===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._refCallback=function(t,n){this.state.refArray.push({legendText:n,refElement:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&0===this.props.data.filter((function(t){return t.chartData&&0===t.chartData.length&&(!t.chartTitle||""===t.chartTitle)})).length)},n.defaultProps={barHeight:12,hideRatio:[],hideDenominator:[]},n}(u.Component),Dh=(0,r.I)(Lh,(function(t){var n,i=t.className,e=t.width,r=t.barHeight,u=t.shouldHighlight,a=t.theme,l=t.href,s=t.variant,c=t.hideLabels;return{root:[a.fonts.medium,"ms-StackedBarChart",{display:"flex",flexDirection:"column",width:e||"100%"},i],items:{marginBottom:"11px"},chart:{width:"100%",height:r||12,display:"block",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},a.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:a.palette.neutralPrimary,marginBottom:s===xh.AbsoluteScale?"4px":"5px"},singleChartRoot:{width:e||"100%",display:"flex",flexDirection:"column",marginBottom:s===xh.AbsoluteScale?"16px":"10px"},opacityChangeOnHover:{opacity:u?"":"0.1",cursor:l?"pointer":"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:a.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:a.palette.neutralPrimary},placeHolderOnHover:{opacity:u?"":"0.1",cursor:"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},legendContainer:{margin:"5px 0px 0px 4px"},noData:{cursor:l?"pointer":"default"},barLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:a.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartWrapper:{paddingRight:s!==xh.AbsoluteScale||c?0:40}}})),Vh=(0,a.Z)(),Nh=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i.state={isCalloutVisible:!1,selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._refArray=[],i._onLeave=i._onLeave.bind(i),i._refCallback=i._refCallback.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_SBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){if(!this._isChartEmpty()){this._adjustProps();var t=this.props,n=t.data,i=t.benchmarkData,e=t.targetData,r=t.hideNumberDisplay,a=t.ignoreFixStyle,l=t.culture,s=this.props.theme.palette,c=a||n.chartData.length>2?this.props.barHeight:12;i&&(i.color=i.color||s.neutralTertiary),e&&(e.color=e.color||s.neutralSecondary);var d=this._createBarsAndLegends(n,c,s,i,e),f=!1===r&&!a&&2===n.chartData.length,v=!1===r&&!a&&1===n.chartData.length,h=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),p=0;i&&h&&(p=i.data/h*100);var g=0;e&&h&&(g=e.data/h*100);var y=!1===this.props.hideLegend&&(a||n.chartData.length>2);this._classNames=Vh(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,benchmarkColor:i?i.color:"",benchmarkRatio:p,targetColor:e?e.color:"",targetRatio:g,showTriangle:!(!i&&!e)});var m=function(){return(0,Yn.c$)(n.chartData[0].data?n.chartData[0].data:0,l)};return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},u.createElement(Xc,{direction:rc.horizontal},u.createElement("div",{className:this._classNames.chartTitle},n.chartTitle&&u.createElement(rd,{className:this._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),f&&u.createElement("div",(0,o.Cl)({},Rs(n.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},m()),!this.props.hideDenominator&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,Yn.c$)(h,l))),v&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},Rs(n.chartDataAccessibilityData,"text",!1)),m())),(i||e)&&u.createElement("div",{className:this._classNames.benchmarkContainer},i&&u.createElement("div",{className:this._classNames.benchmark,role:"text"}),e&&u.createElement("div",{className:this._classNames.target,role:"text"}))),u.createElement(Xc,{direction:rc.horizontal},u.createElement("div",null,u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==n?void 0:n.chartTitle},u.createElement("g",null,d[0]),u.createElement($n,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,Rs(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(pc.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,color:this.state.color,culture:l})))))),y&&u.createElement("div",{className:this._classNames.legendContainer},d[1]))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._adjustProps=function(){this._classNames=Vh(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,width:this.props.width,barHeight:this.props.barHeight,className:this.props.className})},n.prototype._createBarsAndLegends=function(t,n,i,e,r){var a,l=this,s=(null===(a=t.chartData)||void 0===a?void 0:a.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,c=this.state.barSpacingInPercent*(s-1),d=[i.blueLight,i.blue,i.blueMid,i.red,i.black],f=[],v=[],h=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),g=0,y=0,m=0;t.chartData.map((function(t,n){var i=t.data?t.data:0;return(y=i/h*100)<1&&0!==y?y=1:y>99&&100!==y&&(y=99),m+=y}));var b=0!==m?m/(100-c):1,x=t.chartData.map((function(t,i){var e,r,o,a,s=t.color?t.color:d[Math.floor(4*Math.random()+1)],c=s;l.props.enableGradient&&(s=(null===(e=t.gradient)||void 0===e?void 0:e[0])||Mc(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted)[0],c=(null===(o=t.gradient)||void 0===o?void 0:o[1])||Mc(i,0,null===(a=l.props.theme)||void 0===a?void 0:a.isInverted)[1]);var m=t.data?t.data:0,x={title:t.legend,color:s,action:h>0?function(){l._onClick(t.legend)}:void 0,hoverAction:h>0?function(){l._handleChartMouseLeave(),l._onHover(t.legend)}:void 0,onMouseOutAction:h>0?function(){l._onLeave()}:void 0};t.placeHolder||f.push(x),i>0&&(g+=y),(y=m/h*100)<1&&0!==y?y=1/b:y>99&&100!==y?y=99/b:y/=b,v.push(g);var w=l.props.styles,M=!(!l._legendHighlighted(t.legend)&&!l._noLegendHighlighted()),C=t.placeHolder?l.props.theme.semanticColors.bodyText:s;l._classNames=Vh(w,{theme:l.props.theme,shouldHighlight:M,href:l.props.href});var k=p("SBC_Gradient")+"_".concat(i);return u.createElement("g",{key:i,className:l._classNames.opacityChangeOnHover,ref:function(t){l._refCallback(t,x.title)},"data-is-focusable":!l.props.hideTooltip&&M,onFocus:l._onBarFocus.bind(l,m,C,t),onBlur:l._onBarLeave,"aria-label":l._getAriaLabel(t),role:"img",onMouseOver:l._onBarHover.bind(l,m,C,t),onMouseMove:l._onBarHover.bind(l,m,C,t),onMouseLeave:l._onBarLeave,pointerEvents:"all",onClick:l.props.href?l._redirectToUrl.bind(l,l.props.href):t.onClick},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:k},u.createElement("stop",{offset:"0",stopColor:s}),u.createElement("stop",{offset:"100%",stopColor:c}))),u.createElement("rect",{key:i,id:p("_SBC_bar"),x:"".concat(l._isRTL?100-v[i]-y-l.state.barSpacingInPercent*i:v[i]+l.state.barSpacingInPercent*i,"%"),y:0,width:y+"%",height:n,rx:l.props.roundCorners?3:0,fill:l.props.enableGradient?"url(#".concat(k,")"):s}))}));this._addLegend(f,e),this._addLegend(f,r);var w=u.createElement(df,(0,o.Cl)({legends:f,enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps));return[0===h?[this._generateEmptyBar(n,this.props.barBackgroundColor?this.props.barBackgroundColor:i.neutralLight)]:x,w]},n.prototype._onBarFocus=function(t,n,i){var e=this;this._refArray.forEach((function(r){r.index===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._addLegend=function(t,n){if(n){var i={title:n.legend,color:n.color,shape:"triangle"};t.push(i)}},n.prototype._generateEmptyBar=function(t,n){return u.createElement("g",{key:0,className:this._classNames.opacityChangeOnHover},u.createElement("rect",{key:0,id:p("_SBC_empty_bar_"),x:"0%",y:0,width:"100%",height:t,fill:n}))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.length>0)},n.defaultProps={barHeight:12,hideNumberDisplay:!1,hideLegend:!1,ignoreFixStyle:!1},n}(u.Component),Oh=(0,r.I)(Nh,(function(t){var n,i,e=t.className,r=t.width,u=t.barHeight,a=t.shouldHighlight,l=t.theme,s=t.href,c=t.benchmarkColor,d=t.benchmarkRatio,f=t.targetColor,v=t.targetRatio,h=t.showTriangle;return{root:[l.fonts.medium,"ms-StackedBarChart",{width:r||"100%",display:"flex",flexDirection:"column"},e],chart:{width:"100%",height:u||12,display:"block",marginBottom:h?"16px":"10px",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},l.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:l.palette.neutralPrimary,marginBottom:"5px"},legendContainer:{margin:"4px 0px 0px 4px"},opacityChangeOnHover:{opacity:a?"":"0.1",cursor:s?"pointer":"default",selectors:{"&:focus":{stroke:l.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:l.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:l.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},benchmark:{position:"absolute",left:"calc("+d+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c,marginBottom:"4px",selectors:(n={},n[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(c,", ").concat(c,")")},n)},target:{position:"absolute",left:"calc("+v+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:f,marginBottom:"4px",selectors:(i={},i[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(f,", ").concat(f,")")},i)}}})),Th=function(t){if(!(t.length<2)){t=t.sort((function(t,n){return t instanceof Date?t.getTime()-n.getTime():t-n}));for(var n=Number.MAX_VALUE,i=1;i<t.length;i++){var e=t[i]instanceof Date?t[i].getTime()-t[i-1].getTime():t[i]-t[i-1];n=Math.min(n,e)}return[n,t[0]instanceof Date?t[t.length-1].getTime()-t[0].getTime():t[t.length-1]-t[0]]}},Eh=function(t,n,i){var e=Th(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1];return Math.floor(n*r*(1-i)/(o+r*(1-i)))},Fh=function(t,n,i){return void 0===i&&(i=0),t-(n.left||0)-(n.right||0)-2*i},Bh=function(t,n){return t+n/(1-n)*(t-1)},Ph=function(t,n,i){return t*Bh(n,i)},_h=function(t,n,i){return t/Bh(n,i)};!function(t){t.show="visibility",t.hide="hidden"}(Ah||(Ah={}));var Hh=(0,a.Z)(),Ih=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.toImage=function(t){var n,i;return Jd([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?function(t,n,i,e){var r=fi(t,(function(t){return t.x})),o=di(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}:{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}}(t,n,i,r):o===ns.DateAxis?Es(t,n,i,r,a,e):Ts(n,i,r)},e._createLine=function(t,n,i,r,o){var a;void 0===i&&(i=0),void 0===r&&(r=0);var l=e._xAxisType===ns.StringAxis,s=e._getScales(i,r).xBarScale,c=e._createColors(),d=e.props.theme,f=e.props,v=f.data,h=f.lineLegendColor,g=void 0===h?d.palette.yellow:h,y=f.lineLegendText,m=[],b=[];v&&v.forEach((function(t,n){var i;t.lineData&&t.lineData.y&&m.push({x:t.x,y:t.lineData.y,useSecondaryYScale:null!==(i=t.lineData.useSecondaryYScale)&&void 0!==i&&i,point:t,index:n})}));var x=lv().x((function(n){return l?s(n.x)+.5*s.bandwidth():t(n.x)})).y((function(t){return t.useSecondaryYScale&&o?o(t.y):n(t.y)})),w=!(!e._legendHighlighted(y)&&!e._noLegendHighlighted()),M=(null===(a=e.props.lineOptions)||void 0===a?void 0:a.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0;M>0&&b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3+2*M,stroke:d.semanticColors.bodyBackground})),b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3,stroke:g}));var C=m.map((function(i,r){var a,d={refElement:null};return u.createElement("circle",{key:r,id:p("_VBC_point_"),cx:l?s(i.x)+.5*s.bandwidth():t(i.x),cy:i.useSecondaryYScale&&o?o(i.y):n(i.y),onMouseOver:e._legendHighlighted(y)?e._lineHover.bind(e,i.point):e._onBarHover.bind(e,i.point,c(i.y)),onMouseOut:e._onBarLeave,r:e._getCircleVisibilityAndRadius(i.x,y).radius,stroke:g,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,visibility:e._getCircleVisibilityAndRadius(i.x,y).visibility,onClick:null===(a=i.point.lineData)||void 0===a?void 0:a.onClick,"data-is-focusable":e._legendHighlighted(y),ref:function(t){d.refElement=t},onFocus:e._lineFocus.bind(e,i.point,d),onBlur:e._handleChartMouseLeave})}));return u.createElement(u.Fragment,null,b,C)},e._getCircleVisibilityAndRadius=function(t,n){var i=e.state.activeXdataPoint;return e._noLegendHighlighted()?{visibility:i===t?Ah.show:Ah.hide,radius:8}:t===i&&e._legendHighlighted(n)?{visibility:Ah.show,radius:8}:e._legendHighlighted(n)?{visibility:Ah.show,radius:.3}:{visibility:Ah.hide,radius:0}},e._checkForLine=function(){return e.props.data.some((function(t){var n;return void 0!==(null===(n=null==t?void 0:t.lineData)||void 0===n?void 0:n.y)}))},e._getMargins=function(t){e.margins=t},e._renderContentForBothLineAndBars=function(t){var n=e._getCalloutContentForLineAndBar(t),i=n.YValueHover,r=n.hoverXValue,a=i.map((function(t,n){return u.createElement(pc.ChartHoverCard,(0,o.Cl)({key:n,Legend:t.legend},0===n&&{XValue:"".concat(r||t.data)},{color:t.color,YValue:t.data||t.y,culture:e.props.culture}))}));return u.createElement(u.Fragment,null,a)},e._renderContentForOnlyBars=function(t){var n=e.props.useSingleColor,i=void 0!==n&&n;return u.createElement(u.Fragment,null,u.createElement(pc.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x,Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:!i&&t.color?t.color:e._createColors()(t.y),culture:e.props.culture}))},e._renderCallout=function(t){return t?e._isHavingLine?e._renderContentForBothLineAndBars(t):e._renderContentForOnlyBars(t):null},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._getGraphData=function(t,n,i,r,o){return e._bars=e._xAxisType===ns.NumericAxis?e._createNumericBars(i,r,o):e._xAxisType===ns.DateAxis?e._createDateBars(i,r,o):e._createStringBars(i,r,o)},e._refCallback=function(t,n){e._refArray.push({index:n,refElement:t})},e._getCalloutContentForLineAndBar=function(t){var n,i,r,o,u,a=[],l=e.props,s=l.theme,c=l.useSingleColor,d=void 0!==c&&c,f=l.enableGradient,v=e.props,h=v.data,p=v.lineLegendText,g=v.lineLegendColor,y=void 0===g?s.palette.yellow:g,m=h.filter((function(n){return n.x===t.x})),b=h.indexOf(m[0]),x=d?e._createColors()(1):m[0].color?m[0].color:e._createColors()(m[0].y);e._isHavingLine&&void 0!==(null===(n=m[0].lineData)||void 0===n?void 0:n.y)&&(e._legendHighlighted(p)||e._noLegendHighlighted())&&a.push({legend:p,color:y,y:null===(i=m[0].lineData)||void 0===i?void 0:i.y,data:null===(r=m[0].lineData)||void 0===r?void 0:r.yAxisCalloutData,yAxisCalloutData:null===(o=m[0].lineData)||void 0===o?void 0:o.yAxisCalloutData}),(e._legendHighlighted(m[0].legend)||e._noLegendHighlighted())&&a.push({legend:m[0].legend,y:m[0].y,color:f?d?Mc(0,0)[0]:(null===(u=m[0].gradient)||void 0===u?void 0:u[0])||Mc(b,0)[0]:x,data:m[0].yAxisCalloutData,yAxisCalloutData:m[0].yAxisCalloutData});var w=t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString();return{YValueHover:a,hoverXValue:t.xAxisCalloutData||w}},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},e._onBarFocus=function(t,n,i){var r=e._getCalloutContentForLineAndBar(t),o=r.YValueHover,u=r.hoverXValue;e._refArray.forEach((function(r,a){r.index===t.legend&&n===a&&e.setState({refSelected:r.refElement,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.y,color:t.color||i,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:o,hoverXValue:u,callOutAccessibilityData:t.callOutAccessibilityData})}))},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){var i=e.props.theme,r=e.props,o=r.lineLegendText,u=void 0===o?"":o,a=r.lineLegendColor,l=void 0===a?i.palette.yellow:a;e.setState({refSelected:n,isCalloutVisible:!0,calloutLegend:u,dataForHoverCard:t.lineData.y,color:l,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.lineData.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x})},e._getScales=function(t,n){var i,r=Gu().domain([e.props.supportNegativeData?e._yMin:0,e._yMax]).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===ns.NumericAxis){var o=fi(e._points,(function(t){return t.x})),u=di(e._points,(function(t){return t.x}));i=Gu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),Ys(e.props.xAxisInnerPadding,e.props.xAxisPadding)||"histogram"===e.props.mode||i.nice()}else if(e._xAxisType===ns.DateAxis){var a=di(e._points,(function(t){return t.x})),l=fi(e._points,(function(t){return t.x}));(i=e.props.useUTC?Au():ku()).domain([a,l]).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin])}else i=Tu().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding);return{xBarScale:i,yBarScale:r}},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(t,n){var i=e.props,r=i.theme,a=i.useSingleColor,l=e.props,s=l.lineLegendText,c=l.lineLegendColor,d=void 0===c?r.palette.yellow:c,f=[],v={};if(t.forEach((function(t,n){var i,o,u,l=a?e._createColors()(1):t.color;if(e.props.enableGradient){var s=Math.max((null===(i=e.props.data)||void 0===i?void 0:i.findIndex((function(n){return n.legend===t.legend})))||0,0);l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Mc(s,0,null==r?void 0:r.isInverted)[0],a&&(l=Mc(0,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0])}v[t.legend]=l})),Object.entries(v).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};f.push(r)})),e._isHavingLine&&s&&d){var h={title:s,color:d,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(s)},onMouseOutAction:function(){e._onLegendLeave()},isLineLegendInBarChart:!0};f.unshift(h)}return u.createElement(df,(0,o.Cl)({legends:f,enabledWrapLines:e.props.enabledLegendsWrapLines,overflowProps:e.props.legendsOverflowProps,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard,overflowText:e.props.legendsOverflowText},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0),e._yMin=Math.min(n[0],e.props.yMinValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t){var n,i,r,o=t.xAxisCalloutData?t.xAxisCalloutData:t.x instanceof Date?(0,Yn.Yn)(t.x,e.props.culture,e.props.useUTC):t.x,u=t.legend,a=t.yAxisCalloutData||t.y,l=e.props.lineLegendText||"Line",s=(null===(n=t.lineData)||void 0===n?void 0:n.yAxisCalloutData)||(null===(i=t.lineData)||void 0===i?void 0:i.y);return(null===(r=t.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(o,". ")+(u?"".concat(u,", "):"")+"".concat(a,".")+(void 0!==s?" ".concat(l,", ").concat(s,"."):"")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i={};null===(n=e.props.data)||void 0===n||n.forEach((function(t){t.x instanceof Date?i[t.x.getTime()]=t.x:i[t.x]=t.x}));var r=Object.values(i),u=Fh(t,e.margins,8);if(e._xAxisType===ns.StringAxis){if(Ys(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth&&"histogram"!==e.props.mode)e._barWidth=js(e.props.barWidth,e.props.maxBarWidth),u>=(f=Ph(e._barWidth,r.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(u-f)/2);else if(["plotly","histogram"].includes(e.props.mode)&&r.length>1){var a=_h(u,r.length,e._xAxisInnerPadding),l=js(e.props.barWidth,e.props.maxBarWidth,a,e.props.mode),s=(u-(f=Ph(l,r.length,e._xAxisInnerPadding)))/2,c=Number.POSITIVE_INFINITY;if("histogram"!==e.props.mode){var d=Ss(r)+20;c=(u-(f=(r.length-e._xAxisInnerPadding)*d))/2}e._domainMargin=8+Math.max(0,Math.min(s,c))}}else{if("histogram"===e.props.mode){l=e.props.maxBarWidth;var f=Ph(l,r.length,e._xAxisInnerPadding);e._domainMargin+=Math.max(0,(u-f)/2)}e._barWidth=js(e.props.barWidth,e.props.maxBarWidth,Eh(r,Fh(t,e.margins,e._domainMargin),e._xAxisInnerPadding),e.props.mode),e._domainMargin+=e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," bars")+(e._isHavingLine?" and 1 line":"")+". "},e._getOrderedXAxisLabels=function(){return e._xAxisType!==ns.StringAxis?[]:nc(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(){var t={};return e._points.forEach((function(n){var i=n.x;t[i]||(t[i]=[]),t[i].push(n.y),n.lineData&&t[i].push(n.lineData.y)})),t},Ac(e),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",calloutLegend:""},e._isHavingLine=e._checkForLine(),e._calloutId=p("callout"),e._tooltipId=p("VCTooltipID_"),e._refArray=[],e._emptyChartId=p("_VBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Gs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._xAxisLabels=this._getOrderedXAxisLabels(),this._yMax=Math.max(fi(this._points,(function(t){return t.y})),this.props.yMaxValue||0),this._yMin=Math.min(di(this._points,(function(t){return t.y})),this.props.yMinValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=Hh(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1},this._isHavingLine&&{YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue}),{gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0}),this.props.calloutProps),Rs(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Dv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._points,supportNegativeData:this.props.supportNegativeData,chartType:ts.VerticalBarChart,xAxisType:this._xAxisType,createYAxis:ws,calloutProps:i,tickParams:e},this._isHavingLine&&(this._noLegendHighlighted()||this._getHighlightedLegend().length>1)&&{isCalloutForStack:!0},{legendBars:n,datasetForXAxisDomain:this._xAxisLabels,barwidth:this._barWidth,focusZoneDirection:rc.horizontal,customizedCallout:this._getCustomizedCallout(),createStringYAxis:Cs,getmargins:this._getMargins,getMinMaxOfYAxis:Bs,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ns.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Ys(this.props.xAxisInnerPadding,this.props.xAxisPadding)&&"histogram"!==this.props.mode,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),t._isHavingLine&&u.createElement("g",null,t._createLine(n.xScale,n.yScalePrimary,n.containerHeight,n.containerWidth,n.yScaleSecondary)))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._xAxisType=this.props.data&&this.props.data.length>0?Is(this.props.data[0].x,!0):ns.StringAxis,this._points=this.props.data||[],this._barWidth=js(this.props.barWidth,this.props.maxBarWidth,void 0,this.props.mode);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark],this._isHavingLine=this._checkForLine(),this._xAxisInnerPadding="histogram"===this.props.mode?0:$s(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ns.StringAxis?2/3:.5),this._xAxisOuterPadding=$s(this.props.xAxisOuterPadding,this.props.xAxisPadding,0)},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._yMax);return Gu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForLineAndBar(t),r=e.YValueHover,o=e.hoverXValue;this._calloutAnchorPoint!==t&&(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:this._noLegendHighlighted()||this._legendHighlighted(t.legend),dataForHoverCard:t.y,calloutLegend:t.legend,color:t.color||n,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,Yn.Yn)(t.x,this.props.culture,this.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:this._noLegendHighlighted()||this._legendHighlighted(t.legend)?t.x:null,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._calculateMinBarHeight=function(t,n,i,e){var r=n<0?Math.abs(t-i):Math.max(Math.abs(n-i),Math.abs(t-i));return Math.ceil(e(r)/100)},n.prototype._createNumericBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=Hh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x)-e._barWidth/2,C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Mc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||Mc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Mc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Mc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&Ls(h)}return f},n.prototype._createStringBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=e._legendHighlighted(n.legend)||e._noLegendHighlighted();e._classNames=Hh(e.props.styles,{theme:e.props.theme,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x),C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d);e._barWidth=js(e.props.barWidth,e.props.maxBarWidth,l.bandwidth(),e.props.mode);var A=n.color?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Mc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||Mc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Mc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Mc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i),transform:"translate(".concat(.5*(l.bandwidth()-e._barWidth),", 0)")},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,height:w,"aria-label":e._getAriaLabel(n),role:"img",ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),onMouseLeave:e._onBarLeave,onBlur:e._onBarLeave,"data-is-focusable":!e.props.hideTooltip&&y,onFocus:e._onBarFocus.bind(e,n,i,A),fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v,showTooltip:this.props.showXAxisLablesTooltip};v&&Ls(h)}return f},n.prototype._createDateBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=Hh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var M=l(n.x)-e._barWidth/2,C=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||Mc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||Mc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=Mc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=Mc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:M,className:e._classNames.opacityChangeOnHover,y:b?k:C,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(M,C,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=sl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&Ls(h)}return f},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._renderBarLabel=function(t,n,i,e,r){return this.props.hideLabels||this._barWidth<16||!this._legendHighlighted(e)&&!this._noLegendHighlighted()?null:u.createElement("text",{x:t+this._barWidth/2,y:r?n+12:n-6,textAnchor:"middle",className:this._classNames.barLabel,"aria-hidden":!0},"function"==typeof this.props.yAxisTickFormat?this.props.yAxisTickFormat(i):zs(i))},n.prototype._isChartEmpty=function(){return 0===this._points.length||this._points.every((function(t){return 0===t.y}))&&!this._isHavingLine},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default"},n}(u.Component),Wh=(0,r.I)(Ih,(function(t){var n=t.shouldHighlight,i=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1"},xAxisTicks:[],yAxisTicks:[{transform:"scaleX(-1)"}],yAxisDomain:[{transform:"scaleX(-1)"}],tooltip:tv(i),barLabel:iv(i)}})),Rh=(0,a.Z)(),zh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.Y_ORIGIN=0,e._yAxisLabels=[],e.toImage=function(t){var n,i;return Jd([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._toFocusWholeStack=function(t){var n=e.props.isCalloutForStack,i=void 0!==n&&n;return t?1!==e._getHighlightedLegend().length:i},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis?function(t,n,i,e){var r=di(t,(function(t){return t.x})),o=fi(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}:{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}}(t,n,i,r):o===ns.DateAxis?Es(t,n,i,r,a,e):Ts(n,i,r)},e._getFormattedLineData=function(t){var n=[],i={};return t.forEach((function(t,i){t.lineData&&t.lineData.forEach((function(e){n.push((0,o.Cl)((0,o.Cl)({},e),{index:i,xItem:t}))}))})),n.forEach((function(t){i[t.legend]?i[t.legend].push(t):i[t.legend]=[t]})),i},e._getLineLegends=function(t){var n=e._lineObject,i=[];return Object.keys(n).forEach((function(t){i.push({title:t,color:n[t][0].color})})),i},e._createLines=function(t,n,i,r,a){var l,s=e._getFormattedLineData(e.props.data),c=[],d=[],f=[],v=e.props.theme,h=(null===(l=e.props.lineOptions)||void 0===l?void 0:l.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0,p=e._xAxisType!==ns.StringAxis?0:t.bandwidth()/2;return Object.keys(s).forEach((function(i,r){for(var o,l,f,g,y,m=e._isLegendHighlighted(i)||e._noLegendHighlighted(),b=1;b<s[i].length;b++){var x=t(s[i][b-1].xItem.xAxisPoint),w=s[i][b-1].useSecondaryYScale&&s[i][b].useSecondaryYScale&&a,M=w?a(s[i][b-1].y):n(s[i][b-1].y),C=t(s[i][b].xItem.xAxisPoint),k=w?a(s[i][b].y):n(s[i][b].y),A=w||e._yAxisType!==is.StringAxis?0:n.bandwidth()/2;h>0&&d.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-BorderLine"),x1:x,y1:M,x2:C,y2:k,opacity:m?1:.1,strokeWidth:3+2*h,fill:"transparent",strokeLinecap:"round",stroke:v.semanticColors.bodyBackground,transform:"translate(".concat(p,", ").concat(A,")")})),c.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-line"),x1:x,y1:M,x2:C,y2:k,opacity:m?1:.1,strokeWidth:null!==(l=null===(o=s[i][0].lineOptions)||void 0===o?void 0:o.strokeWidth)&&void 0!==l?l:3,strokeLinecap:null!==(g=null===(f=s[i][0].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=s[i][0].lineOptions)||void 0===y?void 0:y.strokeDasharray,stroke:s[i][b].color,transform:"translate(".concat(p,", ").concat(A,")"),onMouseOver:e._lineHover.bind(e,s[i][b-1]),onMouseLeave:e._handleMouseOut}))}})),Object.keys(s).forEach((function(i,r){s[i].forEach((function(l,s){var c={refElement:null},d=0===l.xItem.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length,v=l.useSecondaryYScale||e._yAxisType!==is.StringAxis?0:n.bandwidth()/2;f.push(u.createElement("circle",(0,o.Cl)({key:"".concat(r,"-").concat(s,"-dot"),cx:t(l.xItem.xAxisPoint),cy:l.useSecondaryYScale&&a?a(l.y):n(l.y),onMouseOver:e._lineHover.bind(e,l),onMouseLeave:e._handleMouseOut,r:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).radius,stroke:l.color,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,opacity:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).opacity,transform:"translate(".concat(p,", ").concat(v,")"),ref:function(t){c.refElement=t}},d&&(e._noLegendHighlighted()||e._isLegendHighlighted(i))?{"data-is-focusable":!e.props.hideTooltip,onFocus:e._lineFocus.bind(e,l,c),onBlur:e._handleMouseOut,role:"img","aria-label":e._getAriaLabel(l.xItem,l,!0)}:{})))}))})),u.createElement(u.Fragment,null,d,c,f)},e._getCircleOpacityAndRadius=function(t,n){var i=e.state.activeXAxisDataPoint;return e._noLegendHighlighted()?{opacity:i===t?1:0,radius:8}:t===i&&e._isLegendHighlighted(n)?{opacity:1,radius:8}:e._isLegendHighlighted(n)?{opacity:1,radius:.3}:{opacity:0,radius:0}},e._getMargins=function(t){e.margins=t},e._getCustomizedCallout=function(){var t=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0}));return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint&&!t?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){1===e._getHighlightedLegend().length?(e._noLegendHighlighted()||e._isLegendHighlighted(t.legend))&&e.setState({refSelected:n,isCalloutVisible:!0,xCalloutValue:"".concat(t.xItem.xAxisPoint),yCalloutValue:"".concat(t.yAxisCalloutData||t.data||t.y),activeXAxisDataPoint:t.xItem.xAxisPoint,color:t.color}):e._onStackHoverFocus(t.xItem,n)},e._handleMouseOut=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXAxisDataPoint:""})},e._createBar=function(t,n,i,r){var a=e.props,l=a.barCornerRadius,s=void 0===l?0:l,c=a.barMinimumHeight,d=void 0===c?0:c,f=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),v=e._toFocusWholeStack(f);e._xAxisType===ns.StringAxis&&(e._barWidth=js(e.props.barWidth,e.props.maxBarWidth,t.bandwidth()));var h=e._points.map((function(r,a){var l=t((e._xAxisType===ns.NumericAxis||(e._xAxisType,ns.DateAxis),r.xAxisPoint)),c=e._xAxisType!==ns.StringAxis?-e._barWidth/2:(t.bandwidth()-e._barWidth)/2,f=0,h=r.chartData.filter((function(t){return 0!==t.data&&""!==t.data&&!(e._yAxisType===is.StringAxis&&void 0===n(t.data))}));if(h.length){var g=e._getBarGapAndScale(h,n),y=g.gapHeight,m=g.heightValueScale,b=g.absStackTotal;if(!(m<0)){var x=i-e.margins.bottom-(e._yAxisType===is.StringAxis?0:n(e.Y_ORIGIN)),w=x,M=x,C=0,k=0,A=h.map((function(t,g){var x,A,S,L,D=t.color?t.color:e._colors[g],V=D;e.props.enableGradient&&(D=(null===(x=t.gradient)||void 0===x?void 0:x[0])||Mc(g,0,null===(A=e.props.theme)||void 0===A?void 0:A.isInverted)[0],V=(null===(S=t.gradient)||void 0===S?void 0:S[1])||Mc(g,0,null===(L=e.props.theme)||void 0===L?void 0:L.isInverted)[1],r.chartData[g].color=D);var N={},O=!(!e._isLegendHighlighted(t.legend)&&!e._noLegendHighlighted());e._classNames=Rh(e.props.styles,{theme:e.props.theme,shouldHighlight:O,href:e.props.href});var T,E=!v&&O&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r,t),onMouseOver:e._onRectHover.bind(e,r.xAxisPoint,t,D),onMouseMove:e._onRectHover.bind(e,r.xAxisPoint,t,D),onMouseLeave:e._handleMouseOut,onFocus:e._onRectFocus.bind(e,t,r.xAxisPoint,D,N),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,t),role:"img"},F=g?y:0;if(e._yAxisType===is.StringAxis)T=Math.max(i-e.margins.bottom-(n(t.data)+n.bandwidth()/2)-F,d,1),C=w-=T+F;else{T=Math.abs(m*t.data);var B=Math.max(m*b/100,d);T<B&&(T=B),t.data>=e.Y_ORIGIN?C=w-=T+F:M=(C=M+F)+T,f+=t.data,k=g===h.length-1?T:0}var P=p("VSBC_Gradient")+"_".concat(a,"_").concat(g);return s&&T>s&&g===h.length-1?u.createElement(u.Fragment,{key:g+a+"".concat(v)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:D}),u.createElement("stop",{offset:"100%",stopColor:V}))),u.createElement("path",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,d:"\n M ".concat(l," ").concat(C+s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(-s,"\n h ").concat(e._barWidth-2*s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(s,"\n v ").concat(T-s,"\n h ").concat(-e._barWidth,"\n z\n "),fill:e.props.enableGradient?"url(#".concat(P,")"):D,rx:e.props.roundCorners?3:0,ref:function(t){N.refElement=t},transform:"translate(".concat(c,", 0)")},E))):T<0?u.createElement(u.Fragment,{key:g+a}," "):u.createElement(u.Fragment,{key:g+a},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:D}),u.createElement("stop",{offset:"100%",stopColor:V}))),u.createElement("rect",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,x:l,y:C,width:e._barWidth,height:T,fill:e.props.enableGradient?"url(#".concat(P,")"):D,rx:e.props.roundCorners?3:0,ref:function(t){N.refElement=t}},E,{transform:"translate(".concat(c,", 0)")})))})),S={},L=r.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length>0,D=v&&L&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r),onMouseOver:e._onStackHover.bind(e,r),onMouseMove:e._onStackHover.bind(e,r),onMouseLeave:e._handleMouseOut,onFocus:e._onStackFocus.bind(e,r,S),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,r),role:"img"},V=!1,N=0;return e.props.hideLabels||e._yAxisType===is.StringAxis||(e._noLegendHighlighted()?(V=!0,N=f):h.forEach((function(t){e._isLegendHighlighted(t.legend)&&(V=!0,N+=t.data)}))),u.createElement("g",{key:a+"".concat(v)},u.createElement("g",(0,o.Cl)({id:"".concat(a,"-singleBar"),ref:function(t){S.refElement=t}},D),A),!e.props.hideLabels&&e._barWidth>=16&&V&&u.createElement("text",{x:l+e._barWidth/2,y:N>=e.Y_ORIGIN?C-6:C+k+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-label":"Total: ".concat(N),role:"img",transform:"translate(".concat(c,", 0)")},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(N):zs(N)))}}}));if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=sl(r).call(t);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:g};g&&Ls(y)}return h.filter((function(t){return!!t}))},e._getScales=function(t,n){var i=[Math.min(e.Y_ORIGIN,e._yMin),Math.max(e.Y_ORIGIN,e._yMax)],r=Gu().domain(i).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===ns.NumericAxis){var o=fi(e._dataset,(function(t){return t.x})),u=di(e._dataset,(function(t){return t.x})),a=Gu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]);return Ys(e.props.xAxisInnerPadding,e.props.xAxisPadding)||a.nice(),{xBarScale:a,yBarScale:r}}if(e._xAxisType===ns.DateAxis){var l=di(e._dataset,(function(t){return t.x})),s=fi(e._dataset,(function(t){return t.x})),c=e.props.useUTC?Au():ku();return c.domain(e._isRtl?[s,l]:[l,s]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),{xBarScale:c,yBarScale:r}}return{xBarScale:Tu().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding),yBarScale:r}},e._getGraphData=function(t,n,i,r,o){var u=e._getScales(i,r),a=u.xBarScale,l=u.yBarScale;return e._bars=e._createBar(a,e._yAxisType===is.StringAxis?n:l,i,o)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||e.Y_ORIGIN),e._yMin=Math.min(n[0],e.props.yMinValue||e.Y_ORIGIN)}},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n,i){var r,o,u;if(!n){var a=t.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),l=t.chartData.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" "),s=null===(r=t.lineData)||void 0===r?void 0:r.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data||t.y;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" ");return(null===(o=t.stackCallOutAccessibilityData)||void 0===o?void 0:o.ariaLabel)||"".concat(a,". ").concat(l)+(s?" ".concat(s):"")}var c=t.xAxisCalloutData||!i&&n.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),d=n.legend,f=n.yAxisCalloutData||(i?n.data||n.y:n.data);return!i&&(null===(u=n.callOutAccessibilityData)||void 0===u?void 0:u.ariaLabel)||"".concat(c,". ").concat(d,", ").concat(f,".")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i=Fh(t,e.margins,8);if(e._xAxisType===ns.StringAxis){if(Ys(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth)e._barWidth=js(e.props.barWidth,e.props.maxBarWidth),i>=(r=Ph(e._barWidth,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(i-r)/2);else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=_h(i,e._xAxisLabels.length,e._xAxisInnerPadding),a=js(e.props.barWidth,e.props.maxBarWidth,u),l=(i-(r=Ph(a,e._xAxisLabels.length,e._xAxisInnerPadding)))/2,s=Ss(e._xAxisLabels)+20,c=(i-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*s))/2;e._domainMargin=8+Math.max(0,Math.min(l,c))}}else{var d=(null===(n=e.props.data)||void 0===n?void 0:n.map((function(t){return t.xAxisPoint})))||[];e._barWidth=js(e.props.barWidth,e.props.maxBarWidth,Eh(d,i,e._xAxisInnerPadding)),e._domainMargin=8+e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data,r=Object.keys(e._lineObject).length;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," stacked bars")+(r>0?" and ".concat(r," lines"):"")+". "},e._getMinMaxOfYAxis=function(t,n,i){if(!i)return function(t){var n=fi(t,(function(t){return t.y}));return{startValue:di(t,(function(t){return t.y})),endValue:n}}(t);var r=[];return e.props.data.forEach((function(t){var n;null===(n=t.lineData)||void 0===n||n.forEach((function(t){t.useSecondaryYScale&&r.push(t.y)}))})),{startValue:di(r),endValue:fi(r)}},e._initYAxisParams=function(){e._points[0].chartData.length>0?e._yAxisType=Is(e._points[0].chartData[0].data,!1):Object.keys(e._lineObject).forEach((function(t){e._lineObject[t][0].useSecondaryYScale||(e._yAxisType=Is(e._lineObject[t][0].y,!1))})),e._yAxisLabels=e._getOrderedYAxisLabels()},e._getYDomainMargins=function(t){var n=0,i=t-e.margins.bottom-e.margins.top;if(e._yAxisType===is.StringAxis){var r=0;e._points.forEach((function(t){var n=0;t.chartData.forEach((function(t){n+=e._yAxisLabels.indexOf("".concat(t.data))+1})),r=Math.max(r,n)})),n+=(0===r?0:i/r)*(r-e._yAxisLabels.length)}return(0,o.Cl)((0,o.Cl)({},e.margins),{top:e.margins.top+n})},e._getOrderedXAxisLabels=function(){return e._xAxisType!==ns.StringAxis?[]:nc(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._getOrderedYAxisLabels=function(){return e._yAxisType!==is.StringAxis?[]:nc(e._mapCategoryToValues(!0),e.props.yAxisCategoryOrder)},e._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return e._points.forEach((function(i){var e;i.chartData.forEach((function(e){var r=t?e.data:i.xAxisPoint,o=t?i.xAxisPoint:e.data;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)})),null===(e=i.lineData)||void 0===e||e.forEach((function(e){if(!t||!e.useSecondaryYScale){var r=t?e.y:i.xAxisPoint,o=t?i.xAxisPoint:e.y;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)}}))})),n},Ac(e),e.state={isCalloutVisible:!1,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,refSelected:null,dataForHoverCard:0,color:"",hoverXValue:"",YValueHover:[],xCalloutValue:"",yCalloutValue:"",activeXAxisDataPoint:"",calloutLegend:""},En("VERTICAL STACKED BAR CHART",n,{colors:"IVSChartDataPoint.color",chartLabel:"use your own title for chart"}),e._handleMouseOut=e._handleMouseOut.bind(e),e._calloutId=p("callout"),e._tooltipId=p("VSBCTooltipId_"),e._isChartEmpty()||(e._adjustProps(),e._dataset=e._createDataSetLayer()),e._createLegendsForLine=(0,an.J9)((function(t){return e._getLineLegends(t)})),e._emptyChartId=p("_VSBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Gs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._adjustProps(),this._dataset=this._createDataSetLayer())},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){this._adjustProps();var n=this.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),i=this._toFocusWholeStack(n),e=this.props.isCalloutForStack,r=void 0!==e&&e;this._dataset=this._createDataSetLayer();var a=this._getLegendData(this._points,this.props.theme.palette,this._createLegendsForLine(this.props.data));this._classNames=Rh(this.props.styles,{theme:this.props.theme,href:this.props.href});var l=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),Rs(this.state.callOutAccessibilityData)),s={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(Dv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._dataset,chartType:ts.VerticalStackedBarChart,xAxisType:this._xAxisType,calloutProps:l,createYAxis:ws,tickParams:s,legendBars:a,getMinMaxOfYAxis:this._getMinMaxOfYAxis,datasetForXAxisDomain:this._xAxisLabels,isCalloutForStack:i,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Cs,barwidth:this._barWidth,focusZoneDirection:r||n?rc.horizontal:rc.vertical,getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ns.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Ys(this.props.xAxisInnerPadding,this.props.xAxisPadding),yAxisType:this._yAxisType,stringDatasetForYAxisDomain:(0,o.fX)([""],this._yAxisLabels,!0),getYDomainMargins:this._getYDomainMargins,children:function(i){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),u.createElement("g",null,n&&t._createLines(i.xScale,i.yScalePrimary,i.containerHeight,i.containerWidth,i.yScaleSecondary)))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){var t;this._points=this.props.data||[],this._barWidth=js(this.props.barWidth,this.props.maxBarWidth);var n=this.props.theme.palette;this._colors=this.props.colors||[n.blueLight,n.blue,n.blueMid,n.red,n.black];var i=null===(t=this._points[0])||void 0===t?void 0:t.xAxisPoint;this._xAxisType=_l(i)?ns.StringAxis:Is(i,!0),this._lineObject=this._getFormattedLineData(this.props.data),this._xAxisInnerPadding=$s(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===ns.StringAxis?2/3:.5),this._xAxisOuterPadding=$s(this.props.xAxisOuterPadding,this.props.xAxisPadding,0),this._initYAxisParams()},n.prototype._createDataSetLayer=function(){var t=this,n=this._points.map((function(n){if(t._yAxisType===is.StringAxis)return{x:n.xAxisPoint,y:0};var i=0;return n.chartData.forEach((function(t){i+=t.data})),{x:n.xAxisPoint,y:i}}));return this._xAxisLabels=this._getOrderedXAxisLabels(),n},n.prototype._renderCallout=function(t){return t?u.createElement(pc.ChartHoverCard,{XValue:t.xAxisCalloutData,Legend:t.legend,YValue:t.yAxisCalloutData,color:t.color,culture:this.props.culture}):null},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._getLegendData=function(t,n,i){var e=this;if(this.props.hideLegend)return u.createElement(u.Fragment,null);var r=[n.blueLight,n.blue,n.blueMid,n.red,n.black],a=[],l=this.props,s=l.allowHoverOnLegend,c=void 0===s||s,d=l.theme;t.forEach((function(t){t.chartData.forEach((function(n){var i,o,u=n.color?n.color:r[Math.floor(4*Math.random()+1)];if(e.props.enableGradient){var l=Math.max((null===(i=t.chartData)||void 0===i?void 0:i.findIndex((function(t){return t.legend===n.legend})))||0,0);u=(null===(o=n.gradient)||void 0===o?void 0:o[0])||Mc(l,0,null==d?void 0:d.isInverted)[0]}if(!(a.filter((function(t){return t.title===n.legend&&t.color===u})).length>0)){var s={title:n.legend,color:u,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(n.legend)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};a.push(s)}}))}));var f=[];i&&i.length>0&&i.forEach((function(t){var n={title:t.title,color:t.color,isLineLegendInBarChart:!0,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(t.title)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};f.push(n)}));var v=a.concat(f);return u.createElement(df,(0,o.Cl)({legends:v,overflowProps:this.props.legendsOverflowProps,enabledWrapLines:this.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._onRectHover=function(t,n,i,e){e.persist(),this._onRectFocusHover(t,n,i,e)},n.prototype._onRectFocusHover=function(t,n,i,e){var r,o;if((null===(r=this._calloutAnchorPoint)||void 0===r?void 0:r.chartDataPoint)!==n||(null===(o=this._calloutAnchorPoint)||void 0===o?void 0:o.xAxisDataPoint)!==t){this._calloutAnchorPoint={chartDataPoint:n,xAxisDataPoint:t instanceof Date?(0,Yn.Yn)(t,this.props.culture,this.props.useUTC):t.toString()};var u=n.xAxisCalloutData||(t instanceof Date?(0,Yn.Yn)(t,this.props.culture,this.props.useUTC):t.toString());this.setState({refSelected:e,isCalloutVisible:this._noLegendHighlighted()||this._isLegendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:i,xCalloutValue:u,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._onStackHover=function(t,n){n.persist(),this._onStackHoverFocus(t,n)},n.prototype._onStackHoverFocus=function(t,n){var i,e,r,u=this;this._noLegendHighlighted()||(t=(0,o.Cl)((0,o.Cl)({},t),{chartData:t.chartData.filter((function(t){return u._isLegendHighlighted(t.legend)})),lineData:null===(i=t.lineData)||void 0===i?void 0:i.filter((function(t){return u._isLegendHighlighted(t.legend)}))}));var a=t.lineData,l=void 0!==a&&a.length>0;l&&a.forEach((function(t){t.data=t.data||t.y,t.shouldDrawBorderBottom=!0})),this.setState({refSelected:n,isCalloutVisible:t.chartData.length>0||(null!==(r=null===(e=t.lineData)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0,YValueHover:l?(0,o.fX)((0,o.fX)([],a.sort((function(t,n){return t.data<n.data?1:-1})),!0),t.chartData.slice().reverse(),!0):t.chartData.slice().reverse(),hoverXValue:t.xAxisPoint instanceof Date?(0,Yn.Yn)(t.xAxisPoint,this.props.culture,this.props.useUTC):t.xAxisPoint,stackCalloutProps:t,activeXAxisDataPoint:t.xAxisPoint,callOutAccessibilityData:t.stackCallOutAccessibilityData})},n.prototype._onRectFocus=function(t,n,i,e){e.refElement&&this._onRectFocusHover(n,t,i,e.refElement)},n.prototype._onStackFocus=function(t,n){n.refElement&&this._onStackHoverFocus(t,n.refElement)},n.prototype._onClick=function(t,n){var i,e;null===(e=(i=this.props).onBarClick)||void 0===e||e.call(i,n,t),this.props.href&&(window.location.href=this.props.href)},n.prototype._getBarGapAndScale=function(t,n,i){var e,r,o=this.props.barGapMax,u=void 0===o?0:o,a=0,l=0;this._yAxisType===is.StringAxis?e=null!=i?i:t.reduce((function(t,i){return t+n(i.data)}),0):(a=t.reduce((function(t,n){return t+Math.abs(n.data)}),0),e=null!=i?i:Math.abs(n(a)-n(this.Y_ORIGIN)),t.forEach((function(t){var n=Math.abs(t.data)/a*100;n<1&&0!==n&&(n=1),l+=n})),r=0!==l?l/100:1);var s=u&&t.length-1,c=s&&Math.max(1,Math.min(u,.2*e/s));return{gapHeight:c,heightValueScale:this._yAxisType===is.StringAxis?0:(e-c*s)/(a*r),absStackTotal:a}},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.some((function(t){return t.chartData.length>0||t.lineData&&t.lineData.length>0})))},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),jh=(0,r.I)(zh,(function(t){var n=t.shouldHighlight,i=t.href,e=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1",cursor:i?"pointer":"default"},tooltip:tv(e),barLabel:iv(e)}})),$h=(0,a.Z)(),Yh=.1,Xh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e._legendColorMap={},e.Y_ORIGIN=0,e._uniqDotId=p("gvbc_dot_"),e.toImage=function(t){var n,i;return Jd([{container:null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],e.props.hideLegend||null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getMinMaxOfYAxis=function(t,n,i){var e=[];return t.forEach((function(t){t.groupSeries.forEach((function(t){!i==!t.useSecondaryYScale&&e.push(t.data)}))})),{startValue:di(e),endValue:fi(e)}},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===ns.NumericAxis||o===ns.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Ts(n,i,r)},e._getGraphData=function(t,n,i,r,o,u,a){var l=e._createX0Scale(r);e._barWidth=js(e.props.barwidth,e.props.maxBarWidth,_h(l.bandwidth(),e._barLegends.length,Yh)),e._groupWidth=Ph(e._barWidth,e._barLegends.length,Yh);var s=e._createX1Scale(),c=[];e._datasetForBars.forEach((function(t){c.push(e._buildGraph(t,l,s,n,a,i,o))})),e._groupedVerticalBarGraph=c},e._getMargins=function(t){return e.margins=t},e._createDataSetOfGVBC=function(t,n){var i=new Set;t.forEach((function(t){t.series.forEach((function(t){i.add(t.legend)}))}));var r=new Set(n.map((function(t){return t.legend}))),o=e._getOrderedXAxisLabels(t,n),u=e._createDataset(t,n);return{barLegends:Array.from(i),lineLegends:Array.from(r),xAxisLabels:o,datasetForBars:u}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._onBarHover=function(t,n,i){i.persist(),e._calloutAnchorPoint!==t&&(e._calloutAnchorPoint=t,e._showCallout(i,t,n))},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1})},e._onBarFocus=function(t,n,i){e._showCallout(i.currentTarget,t,n)},e._redirectToUrl=function(t){t&&(window.location.href=t)},e._buildGraph=function(t,n,i,r,o,a,l){var s=[],c=[],d=e._barLegends.filter((function(n){return n in t})),f=Ph(e._barWidth,d.length,Yh),v=Tu().domain(d).range(e._isRtl?[f,0]:[0,f]).paddingInner(Yh);if(e._barLegends.forEach((function(n,i){var a,l=t[n];if(l){var d=l[0].useSecondaryYScale&&o?o:r,f=(null!==(a=v(n))&&void 0!==a?a:0)+(v.bandwidth()-e._barWidth)/2,h=e._legendHighlighted(n)||e._noLegendHighlighted(),g=h?"":"0.1",y=0,m=d(e.Y_ORIGIN),b=m,x=m,w=e.Y_ORIGIN;l.forEach((function(n,r){var o,a;if(n.data){var l=p("GVBC_Gradient")+"_".concat(t.indexNum,"_").concat(i,"_").concat(r);if(e.props.enableGradient){var c=(null===(o=n.gradient)||void 0===o?void 0:o[0])||n.color,v=(null===(a=n.gradient)||void 0===a?void 0:a[1])||n.color;s.push(u.createElement("defs",{key:"defs_".concat(l)},u.createElement("linearGradient",{id:l,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0%",stopColor:c}),u.createElement("stop",{offset:"100%",stopColor:v}))))}var m=.5*(r>0?2:0),M=Math.max(d(e.Y_ORIGIN)-d(Math.abs(n.data)),1),C=n.color;n.data>=e.Y_ORIGIN?w=b-=M+m:x=(w=x+m)+M,s.push(u.createElement("rect",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r),className:e._classNames.opacityChangeOnHover,height:M,width:e._barWidth,x:f,y:w,"data-is-focusable":!e.props.hideTooltip&&h,opacity:g,fill:e.props.enableGradient?"url(#".concat(l,")"):C,rx:e.props.roundCorners?3:0,onMouseOver:e._onBarHover.bind(e,n,t),onMouseMove:e._onBarHover.bind(e,n,t),onMouseOut:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,t),onBlur:e._onBarLeave,onClick:e.props.href?e._redirectToUrl.bind(e,e.props.href):n.onClick,"aria-label":e._getAriaLabel(n,t.xAxisPoint),role:"img"})),y+=n.data}})),null!==y&&!e.props.hideLabels&&e._barWidth>=16&&h&&c.push(u.createElement("text",{key:"".concat(t.indexNum,"-").concat(i),x:f+e._barWidth/2,y:y>=e.Y_ORIGIN?b-6:x+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-hidden":!0},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(y):zs(y)))}})),!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var h=sl(l).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var g={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:h};h&&Ls(g)}return u.createElement("g",{key:t.indexNum,transform:"translate(".concat(n(t.xAxisPoint)+(n.bandwidth()-f)/2,", 0)")},s,c)},e._createDataset=function(t,n){var i=[],e={},r=new Set;return n.forEach((function(t){t.data.forEach((function(n){e[n.x]||(e[n.x]=[]),e[n.x].push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,data:n.y,useSecondaryYScale:t.useSecondaryYScale}))}))})),t.forEach((function(t,n){var u,a={},l={};t.series.forEach((function(t){a[t.legend]?(a[t.legend].push((0,o.Cl)({},t)),l[t.legend].data+=t.data):(a[t.legend]=[(0,o.Cl)({},t)],l[t.legend]=(0,o.Cl)({},t))})),a.xAxisPoint=t.name,a.indexNum=n,a.groupSeries=(0,o.fX)((0,o.fX)([],Object.values(l),!0),null!==(u=e[t.name])&&void 0!==u?u:[],!0),a.stackCallOutAccessibilityData=t.stackCallOutAccessibilityData,i.push(a),r.add(t.name)})),Object.keys(e).forEach((function(t){r.has(t)||i.push({xAxisPoint:t,groupSeries:e[t]})})),i},e._createX0Scale=function(t){return Tu().domain(e._xAxisLabels).range(e._isRtl?[t-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,t-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding)},e._createX1Scale=function(){return Tu().domain(e._barLegends).range(e._isRtl?[e._groupWidth,0]:[0,e._groupWidth]).paddingInner(Yh)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(){var t=[],n=function(n,i){var r={title:n,color:e._legendColorMap[n][0],isLineLegendInBarChart:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};t.push(r)};return e._lineLegends.forEach((function(t){return n(t,!0)})),e._barLegends.forEach((function(t){return n(t)})),u.createElement(df,(0,o.Cl)({legends:t,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n){var i,e=t.xAxisCalloutData||n,r=t.legend,o=t.yAxisCalloutData||t.data;return(null===(i=t.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(e,". ").concat(r,", ").concat(o,".")},e._getDomainMargins=function(t){e._domainMargin=8;var n=Fh(t,e.margins,8);if(e._xAxisType===ns.StringAxis)if(Ys(e.props.xAxisOuterPadding))e._domainMargin=0;else if("auto"!==e.props.barwidth){e._barWidth=js(e.props.barwidth,e.props.maxBarWidth);var i=Ph(e._barWidth,e._barLegends.length,Yh);n>=(r=Ph(i,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(n-r)/2)}else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=_h(n,e._xAxisLabels.length,e._xAxisInnerPadding),a=_h(u,e._barLegends.length,Yh),l=js(e.props.barwidth,e.props.maxBarWidth,a),s=(i=Ph(l,e._barLegends.length,Yh),(n-(r=Ph(i,e._xAxisLabels.length,e._xAxisInnerPadding)))/2),c=Ss(e._xAxisLabels)+20,d=(n-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*c))/2;e._domainMargin=8+Math.max(0,Math.min(s,d))}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Vertical bar chart with ".concat(e._barLegends.length," grouped bar series")+(e._lineLegends.length>0?" and ".concat(e._lineLegends.length," line series. "):". ")},e._adjustColor=function(t,n,i,e){var r=i?e?"#000000":"#ffffff":e?"#ffffff":"#000000";return Po(Gu().domain([0,1]).range([t,r])(n)).formatRgb()},e._prepareChartData=function(){var t,n,i,r,u=e.props.data;Array.isArray(e.props.dataV2)&&e.props.dataV2.length>0&&(u=(t=e._processDataV2(e.props.dataV2)).barData,r=t.lineData),e._legendColorMap={};var a=0;return{barData:null!==(n=null==u?void 0:u.map((function(t){var n,i;return(0,o.Cl)((0,o.Cl)({},t),{series:null!==(i=null===(n=t.series)||void 0===n?void 0:n.map((function(t){var n,i,r,u,l,s,c,d=t.color?t.color:ss(a,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted),f=d;if(e.props.enableGradient)if(t.color)d=e._adjustColor(t.color||f,.2,!1,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted),f=e._adjustColor(t.color||d,.2,!0,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted);else{var v=Mc(a,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted);d=(null===(l=t.gradient)||void 0===l?void 0:l[0])||v[0],f=(null===(s=t.gradient)||void 0===s?void 0:s[1])||v[1]}var h=[d,f];return e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[d,f]),a+=1,(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:null!==(c=t.color)&&void 0!==c?c:e._legendColorMap[t.legend][0]}),e.props.enableGradient?{gradient:h}:{})})))&&void 0!==i?i:[]})})))&&void 0!==n?n:[],lineData:null!==(i=null==r?void 0:r.map((function(t){var n,i,r;return r=void 0===t.color?ss(a,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted):cs(t.color,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted),e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[r,r]),a+=1,(0,o.Cl)((0,o.Cl)({},t),{color:e._legendColorMap[t.legend][0]})})))&&void 0!==i?i:[]}},e._getOrderedXAxisLabels=function(t,n){return e._xAxisType!==ns.StringAxis?[]:nc(e._mapCategoryToValues(t,n),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(t,n){var i={};return t.forEach((function(t){i[t.name]||(i[t.name]=[]),t.series.forEach((function(n){i[t.name].push(n.data)}))})),n.forEach((function(t){t.data.forEach((function(t){i[t.x]||(i[t.x]=[]),i[t.x].push(t.y)}))})),i},e._createLines=function(t,n,i,r){var o=[],a=[],l=[],s=function(t){return n(t)+n.bandwidth()/2};return t.forEach((function(t,n){var c,d=[],f=[],v=[],h=(null===(c=t.lineOptions)||void 0===c?void 0:c.lineBorderWidth)?Number.parseFloat(t.lineOptions.lineBorderWidth.toString()):0,p=t.useSecondaryYScale&&r?r:i,g=e._legendHighlighted(t.legend)||e._noLegendHighlighted();t.data.forEach((function(i,r){var o,a,l,c,y,m,b,x=s(i.x),w=p(i.y);if(r>0){var M=s(t.data[r-1].x),C=p(t.data[r-1].y);h>0&&d.push(u.createElement("line",{key:"lineBorder-".concat(n,"-").concat(r),x1:M,y1:C,x2:x,y2:w,fill:"transparent",stroke:null!==(a=null===(o=t.lineOptions)||void 0===o?void 0:o.lineBorderColor)&&void 0!==a?a:e.props.theme.semanticColors.bodyBackground,strokeWidth:3+2*h,strokeLinecap:"round",opacity:g?1:.1})),f.push(u.createElement("line",{key:"line-".concat(n,"-").concat(r),x1:M,y1:C,x2:x,y2:w,stroke:t.color,strokeWidth:null!==(c=null===(l=t.lineOptions)||void 0===l?void 0:l.strokeWidth)&&void 0!==c?c:3,strokeLinecap:null!==(m=null===(y=t.lineOptions)||void 0===y?void 0:y.strokeLinecap)&&void 0!==m?m:"round",strokeDasharray:null===(b=t.lineOptions)||void 0===b?void 0:b.strokeDasharray,opacity:g?1:.1,onMouseOver:function(i){return e._onLineHover(i,t,n,r,s)},onMouseLeave:e._onBarLeave}))}var k=e._getDotId(n,r),A=e.state.activeLinePoint,S=A===i.x||A===k;v.push(u.createElement("circle",{key:k,id:k,cx:x,cy:w,r:g&&S?8:.3,fill:e.props.theme.semanticColors.bodyBackground,stroke:t.color,strokeWidth:3,opacity:g?1:.1,onMouseOver:function(i){return e._onLineHover(i,t,n,r,s)},onMouseLeave:e._onBarLeave,"data-is-focusable":g,onFocus:function(i){return e._onLineFocus(i,t,n,r)},onBlur:e._onBarLeave,role:"img","aria-label":e._getAriaLabel({xAxisCalloutData:i.xAxisCalloutData,legend:t.legend,yAxisCalloutData:i.yAxisCalloutData,data:i.y,callOutAccessibilityData:i.callOutAccessibilityData},i.x)}))})),o.push(u.createElement("g",{key:"lineBorderGroup-".concat(n)},d)),a.push(u.createElement("g",{key:"lineGroup-".concat(n)},f)),l.push(u.createElement("g",{key:"dotGroup-".concat(n)},v))})),l.length>0?u.createElement("g",null,o.length>0?u.createElement("g",null,o):null,a.length>0?u.createElement("g",null,a):null,u.createElement("g",null,l)):null},e._onLineHover=function(t,n,i,r,o){var u=ov(t,e._rectRef.current)[0],a=r;if(r>0){var l=o(n.data[r].x),s=o(n.data[r-1].x);Math.abs(s-u)<Math.abs(l-u)&&(a=r-1)}t.persist(),e._showCalloutForLines(t,n,i,a)},e._onLineFocus=function(t,n,i,r){e._showCalloutForLines(t.currentTarget,n,i,r)},e._showCalloutForLines=function(t,n,i,r){var u=n.data[r],a=(0,o.Cl)((0,o.Cl)({},u),{legend:n.legend,color:n.color,key:n.legend,data:u.y,yAxisCalloutData:u.yAxisCalloutData}),l=e._datasetForBars.find((function(t){return t.xAxisPoint===u.x}));e._showCallout(t,a,l,e._getDotId(i,r))},e._showCallout=function(t,n,i,r){var o,u;void 0===r&&(r=""),e.setState({refSelected:t,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:n.color,xCalloutValue:null!==(o=n.xAxisCalloutData)&&void 0!==o?o:i.xAxisPoint,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:e.props.isCalloutForStack?i.stackCallOutAccessibilityData:n.callOutAccessibilityData,YValueHover:i.groupSeries.filter((function(t){return e._noLegendHighlighted()||e._legendHighlighted(t.legend)})),hoverXValue:null!==(u=n.xAxisCalloutData)&&void 0!==u?u:i.xAxisPoint,activeLinePoint:e.props.isCalloutForStack?i.xAxisPoint:r})},e._getDotId=function(t,n){return e._uniqDotId+"-".concat(t,"-").concat(n)},e._processDataV2=function(t){var n={},i=[];return t.forEach((function(t){"bar"===t.type?t.data.forEach((function(i){var e,r;n[i.x]||(n[i.x]={name:i.x,series:[]}),n[i.x].series.push({key:null!==(e=t.key)&&void 0!==e?e:t.legend,data:i.y,color:null!==(r=i.color)&&void 0!==r?r:t.color,gradient:t.gradient,legend:t.legend,xAxisCalloutData:i.xAxisCalloutData,yAxisCalloutData:i.yAxisCalloutData,onClick:i.onClick,useSecondaryYScale:t.useSecondaryYScale})})):"line"===t.type&&i.push(t)})),{barData:Object.values(n),lineData:i}},Ac(e),e._createSet=(0,an.J9)((function(t,n){return e._createDataSetOfGVBC(t,n)})),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],xCalloutValue:"",yCalloutValue:"",YValueHover:[],hoverXValue:"",calloutLegend:"",activeLegend:"",activeLinePoint:""},En("GROUPED VERTICAL BAR CHART",n,{showYAxisGridLines:"Dont use this property. Lines are drawn by default",showXAxisPath:"Dont use this property. Axis line removed default.",showYAxisPath:"Dont use this property. No need to display Y axis path. Handling default",showXAxisGridLines:"Dont use this property. Handling with default value.",legendColor:"Dont use this property. colour will pick from given data."}),e._calloutId=p("callout"),e._tooltipId=p("GVBCTooltipId_"),e._emptyChartId=p("_GVBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e._rectRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Gs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t,n,i,e,r=this,a=this._prepareChartData(),l=a.barData,s=a.lineData,c=null!==(n=null===(t=l[0])||void 0===t?void 0:t.name)&&void 0!==n?n:null===(e=null===(i=s[0])||void 0===i?void 0:i.data[0])||void 0===e?void 0:e.x;this._xAxisType=_l(c)?ns.StringAxis:Is(c,!0);var d=this._createSet(l,s),f=d.barLegends,v=d.lineLegends,h=d.xAxisLabels,p=d.datasetForBars;this._barLegends=f,this._lineLegends=v,this._xAxisLabels=h,this._datasetForBars=p;var g=this._getLegendData();this._adjustProps();var y=this._getMinMaxOfYAxis(this._datasetForBars).endValue;this._yMax=Math.max(y,this.props.yMaxValue||0),this._classNames=$h(this.props.styles,{theme:this.props.theme,href:this.props.href});var m=(0,o.Cl)((0,o.Cl)((0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),gapSpace:15,isBeakVisible:!1,setInitialFocus:!0,color:this.state.color,Legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout},this.props.calloutProps),{preventDismissOnLostFocus:!0}),Rs(this.state.callOutAccessibilityData,"text",!1)),b={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty(l,s)?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Dv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._datasetForBars,chartType:ts.GroupedVerticalBarChart,calloutProps:m,legendBars:g,xAxisType:this._xAxisType,createYAxis:ws,datasetForXAxisDomain:this._xAxisLabels,tickParams:b,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,createStringYAxis:Cs,tickPadding:this.props.tickPadding||5,maxOfYVal:this._yMax,svgFocusZoneProps:{direction:rc.horizontal},customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===ns.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{barwidth:this._barWidth,ref:this._cartesianChartRef,children:function(t){return u.createElement(u.Fragment,null,u.createElement("rect",{ref:r._rectRef,width:"100%",height:"100%",fill:"transparent",style:{pointerEvents:"none"}}),u.createElement("g",null,r._groupedVerticalBarGraph),r._createLines(s,t.xScale,t.yScalePrimary,t.yScaleSecondary))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(t,n){return!(t&&t.length>0&&t.filter((function(t){return t.series.length})).length>0||n&&n.length>0&&n.some((function(t){return t.data.length>0})))},n.prototype._adjustProps=function(){this._barWidth=js(this.props.barwidth,this.props.maxBarWidth),this._xAxisInnerPadding=$s(this.props.xAxisInnerPadding,void 0,2/(2+Bh(this._barLegends.length,Yh))),this._xAxisOuterPadding=$s(this.props.xAxisOuterPadding)},n.defaultProps={maxBarWidth:24,xAxisCategoryOrder:"default"},n}(u.Component),Gh=(0,r.I)(Xh,(function(t){var n=t.theme;return{opacityChangeOnHover:{cursor:t.href?"pointer":"default"},tooltip:tv(n),barLabel:iv(n)}})),Uh=i(263),qh=(0,a.Z)(),Zh=function(t){function n(n){var i,e,r=t.call(this,n)||this;return r._rectRefArray={},r.toImage=function(t){var n,i;return Jd([{container:null===(n=r._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],r.props.hideLegend||null===(i=r._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},r._getMinMaxOfYAxis=function(){return{startValue:0,endValue:0}},r._getDomainNRangeValues=function(t,n,i,e,o,u,a,l){return u===ns.NumericAxis||u===ns.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:Ts(r.margins,i,o)},r._getXandY=function(){var t="",n="";return r.props.data.forEach((function(i){if(i.data&&i.data.length>0)return t=i.data[0].x,n=i.data[0].y,{x:t,y:n}})),{x:t,y:n}},r._getMargins=function(t){r.margins=t},r._getOpacity=function(t){return r._legendHighlighted(t)||r._noLegendHighlighted()?"1":"0.1"},r._rectRefCallback=function(t,n,i){r._rectRefArray[n]={data:i,refElement:t}},r._onRectFocus=function(t,n){r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData})},r._onRectMouseOver=function(t,n,i){i.persist(),r._calloutAnchorPoint!==n&&(r._calloutAnchorPoint=n,r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData}))},r._onRectBlurOrMouseOut=function(){},r._handleChartMouseLeave=function(){r._calloutAnchorPoint=null,r.setState({isCalloutVisible:!1})},r._createRectangles=function(){var t=[];return r._stringYAxisDataPoints.slice().reverse().forEach((function(n){var i=0;r._stringXAxisDataPoints.forEach((function(e){var o,a,l,s="x".concat(e,"y").concat(n);if((null===(o=r._dataSet[n][i])||void 0===o?void 0:o.x)===e&&"number"==typeof(null===(a=r._dataSet[n][i])||void 0===a?void 0:a.value)){var c=r._dataSet[n][i],d=ic(r._colorScale(c.value),r.props.theme);l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(c),"data-is-focusable":r._legendHighlighted(c.legend)||r._noLegendHighlighted(),fillOpacity:r._getOpacity(c.legend),transform:"translate(".concat(r._xAxisScale(c.x),", ").concat(r._yAxisScale(c.y),")"),ref:function(t){r._rectRefCallback(t,s,c)},onFocus:r._onRectFocus.bind(r,s,c),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,c),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:r._colorScale(c.value),width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth(),onClick:c.onClick}),u.createElement("text",{dominantBaseline:"middle",textAnchor:"middle",className:r._classNames.text,transform:"translate(".concat(r._xAxisScale.bandwidth()/2,", ").concat(r._yAxisScale.bandwidth()/2,")"),fill:d},(0,Yn.c$)(c.rectText,r.props.culture,r.props.useUTC))),i++}else{var f={x:e,y:n,value:NaN,rectText:"No data available",legend:""};l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(f),"data-is-focusable":r._noLegendHighlighted(),transform:"translate(".concat(r._xAxisScale(f.x),", ").concat(r._yAxisScale(f.y),")"),ref:function(t){r._rectRefCallback(t,s,f)},onFocus:r._onRectFocus.bind(r,s,f),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,f),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:"transparent",width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth()}))}t.push(l)}))})),t},r._createLegendBars=function(){var t=r.props,n=t.data,i=t.legendProps,e=[];return n.forEach((function(t){var n={title:t.legend,color:r._colorScale(t.value),action:function(){r._onLegendClick(t.legend)},hoverAction:function(){r._handleChartMouseLeave(),r._onLegendHover(t.legend)},onMouseOutAction:function(){r._onLegendLeave()}};e.push(n)})),u.createElement(df,(0,o.Cl)({},i,{legends:e,ref:r._legendsRef}))},r._getColorScale=function(){var t=r.props,n=t.domainValuesForColorScale,i=t.rangeValuesForColorScale;return Gu().domain(n).range(i)},r._getXIndex=function(t){return r._xAxisType===ns.DateAxis?"".concat(t.getTime()):r._xAxisType===ns.StringAxis?t:r._xAxisType===ns.NumericAxis?"".concat(t):""},r._getYIndex=function(t){return r._yAxisType===is.DateAxis?"".concat(t.getTime()):r._yAxisType===is.StringAxis?t:r._yAxisType===is.NumericAxis?"".concat(t):""},r._createNewDataSet=function(t,n,i,e,u){var a=[];t.forEach((function(t){t.data.forEach((function(n){a.push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend}))}))}));var l={},s={},c={};return a.forEach((function(t){var n=r._getXIndex(t.x),i=r._getYIndex(t.y);c[n]="1",s[i]="1",l[i]?l[i]=(0,o.fX)((0,o.fX)([],l[i],!0),[t],!1):l[i]=[t]})),Object.keys(l).forEach((function(t){l[t]=r._getOrderedXPoints(l[t]),l[t].forEach((function(t){r._xAxisType===ns.DateAxis&&(t.x=r._getStringFormattedDate(t.x,n)),r._xAxisType===ns.NumericAxis&&(t.x=r._getStringFormattedNumber(t.x,i)),r._xAxisType===ns.StringAxis&&(t.x=r._getFormattedLabelForXAxisDataPoint(t.x)),r._yAxisType===is.DateAxis&&(t.y=r._getStringFormattedDate(t.y,e)),r._yAxisType===is.NumericAxis&&(t.y=r._getStringFormattedNumber(t.y,u)),r._yAxisType===is.StringAxis&&(t.y=r._getFormattedLabelForYAxisDataPoint(t.y))}))})),Object.keys(l).forEach((function(t){r._yAxisType===is.DateAxis?l[r._getStringFormattedDate(t,e)]=l[t]:r._yAxisType===is.NumericAxis?l["".concat(r._getStringFormattedNumber(t,u))]=l[t]:l[r._getFormattedLabelForYAxisDataPoint(t)]=l[t]})),{dataSet:l,yAxisPoints:r._getYAxisDataPoints(s),xAxisPoints:r._getXAxisDataPoints(c)}},r._getXAxisDataPoints=function(t){return r._getOrderedXAxisLabels(t).map((function(t){return r._xAxisType===ns.DateAxis?r._getStringFormattedDate(t,r.props.xAxisDateFormatString):r._xAxisType===ns.NumericAxis?r._getStringFormattedNumber(t,r.props.xAxisNumberFormatString):r._getFormattedLabelForXAxisDataPoint(t)}))},r._getYAxisDataPoints=function(t){return r._getOrderedYAxisLabels(t).map((function(t){return r._yAxisType===is.DateAxis?r._getStringFormattedDate(t,r.props.yAxisDateFormatString):r._yAxisType===is.NumericAxis?r._getStringFormattedNumber(t,r.props.yAxisNumberFormatString):r._getFormattedLabelForYAxisDataPoint(t)}))},r._getStringFormattedDate=function(t,n){var i=new Date;return i.setTime(+t),Xe(n||"%b/%d")(i)},r._getStringFormattedNumber=function(t,n){return ju(n||".2~s")(+t)},r._getFormattedLabelForXAxisDataPoint=function(t){var n=r.props.xAxisStringFormatter;return n?n(t):t},r._getFormattedLabelForYAxisDataPoint=function(t){var n=r.props.yAxisStringFormatter;return n?n(t):t},r._closeCallout=function(){r.setState({isCalloutVisible:!1})},r._legendHighlighted=function(t){return r.state.selectedLegend===t||""===r.state.selectedLegend&&r.state.activeLegend===t},r._noLegendHighlighted=function(){return""===r.state.selectedLegend&&""===r.state.activeLegend},r._getAriaLabel=function(t){var n,i=t.x,e=t.y,r=t.legend,o=t.ratio?"".concat(t.ratio[0],"/").concat(t.ratio[1]):t.rectText||t.value,u=t.descriptionMessage;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,", ").concat(e,". ").concat(r,", ").concat(o,".")+(u?" ".concat(u,"."):"")},r._getChartTitle=function(){var t=r.props.chartTitle,n=r.props.data.reduce((function(t,n){return t+n.data.length}),0);return(t?"".concat(t,". "):"")+"Heat map chart with ".concat(n," data points. ")},r._getOrderedXAxisLabels=function(t){return r._shouldOrderXAxisLabelsByCategoryOrder()?nc(r._mapCategoryToValues(),r.props.xAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._xAxisType===ns.DateAxis||r._xAxisType===ns.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedYAxisLabels=function(t){return r._shouldOrderYAxisLabelsByCategoryOrder()?nc(r._mapCategoryToValues(!0),r.props.yAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._yAxisType===is.DateAxis||r._yAxisType===is.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedXPoints=function(t){if(!r._shouldOrderXAxisLabelsByCategoryOrder())return t.sort((function(t,n){return r._xAxisType===ns.StringAxis?"none"===r.props.sortOrder?0:t.x.toLowerCase()>n.x.toLowerCase()?1:-1:r._xAxisType===ns.DateAxis?t.x.getTime()-n.x.getTime():r._xAxisType===ns.NumericAxis?+t.x>+n.x?1:-1:t.x>n.x?1:-1}));var n=[],i={};return t.forEach((function(t){var n=t.x;i[n]||(i[n]=[]),i[n].push(t)})),r._getOrderedXAxisLabels({}).forEach((function(t){i[t]&&n.push.apply(n,i[t])})),n},r._shouldOrderXAxisLabelsByCategoryOrder=function(){return r._xAxisType===ns.StringAxis&&"default"!==r.props.xAxisCategoryOrder},r._shouldOrderYAxisLabelsByCategoryOrder=function(){return r._yAxisType===is.StringAxis&&"default"!==r.props.yAxisCategoryOrder},r._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return r.props.data.forEach((function(i){i.data.forEach((function(i){var e=t?i.y:i.x;n[e]||(n[e]=[]),n[e].push(i.value)}))})),n},Ac(r),r._createSet=(0,an.J9)((function(t,n,i,e,o){return r._createNewDataSet(t,n,i,e,o)})),r.state={selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",activeLegend:"",isCalloutVisible:!1,target:null,calloutLegend:"",calloutTextColor:"",calloutYValue:"",ratio:null,descriptionMessage:"",calloutId:""},r._emptyChartId=p("_HeatMap_empty"),r._cartesianChartRef=u.createRef(),r._legendsRef=u.createRef(),r}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)!==(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&this.setState({selectedLegend:null!==(r=null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegend)&&void 0!==r?r:""})},n.prototype.render=function(){var t=this,n=this._getXandY(),i=n.x,e=n.y;this._xAxisType=Is(i,!0),this._yAxisType=Is(e,!1);var r=this.props,a=r.data,l=r.xAxisDateFormatString,s=r.xAxisNumberFormatString,c=r.yAxisDateFormatString,d=r.yAxisNumberFormatString;this._colorScale=this._getColorScale();var f=this._createSet(a,l,s,c,d),v=f.dataSet,h=f.xAxisPoints,p=f.yAxisPoints;this._dataSet=v,this._stringYAxisDataPoints=p,this._stringXAxisDataPoints=h,this._classNames=qh(this.props.styles,{theme:this.props.theme});var g=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isBeakVisible:!1,gapSpace:8},this.props.calloutProps),{isCalloutVisible:this.state.isCalloutVisible,id:this.state.calloutId,YValue:this.state.calloutYValue,legend:this.state.calloutLegend,color:this.state.calloutTextColor,target:this.state.target,styles:this._classNames.subComponentStyles.calloutStyles,directionalHint:3,onDismiss:this._closeCallout}),Rs(this.state.callOutAccessibilityData,"text",!1)),{preventDismissOnLostFocus:!0,calloutMaxWidth:238}),y=(0,o.Cl)((0,o.Cl)({},this.state.ratio&&{ratio:this.state.ratio}),{descriptionMessage:this.state.descriptionMessage}),m={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Dv,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:a,chartType:ts.HeatMapChart,xAxisType:ns.StringAxis,yAxisType:is.StringAxis,calloutProps:g,createYAxis:ws,chartHoverProps:y,styles:this._classNames.subComponentStyles.cartesianStyles,datasetForXAxisDomain:this._stringXAxisDataPoints,stringDatasetForYAxisDomain:this._stringYAxisDataPoints,createStringYAxis:Cs,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,getmargins:this._getMargins,xAxisTickCount:this._stringXAxisDataPoints.length,xAxistickSize:0,xAxisPadding:.02,yAxisPadding:.02,svgFocusZoneProps:{direction:rc.bidirectional},legendBars:this._createLegendBars(),onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,tickParams:m,children:function(n){return t._xAxisScale=n.xScale,t._yAxisScale=n.yScalePrimary,t._createRectangles()}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n.defaultProps={xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),Kh=(0,r.I)(Zh,(function(t){return{root:{},text:[t.theme.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold}],subComponentStyles:{}}})),Jh=/[\{\}]/g,Qh=/\{\d+\}/g;function tp(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=n;return t.replace(Qh,(function(t){var n=e[t.replace(Jh,"")];return null==n&&(n=""),n}))}function np(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function ip(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function ep(t,n){return n-1-t.height}function rp(t,n){return t.sourceLinks.length?t.depth:n-1}function op(t){return function(){return t}}function up(t,n){return lp(t.source,n.source)||t.index-n.index}function ap(t,n){return lp(t.target,n.target)||t.index-n.index}function lp(t,n){return t.y0-n.y0}function sp(t){return t.value}function cp(t){return t.index}function dp(t){return t.nodes}function fp(t){return t.links}function vp(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function hp({nodes:t}){for(const n of t){let t=n.y0,i=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const t of n.targetLinks)t.y1=i+t.width/2,i+=t.width}}function pp(){let t,n,i,e=0,r=0,o=1,u=1,a=24,l=8,s=cp,c=rp,d=dp,f=fp,v=6;function h(){const h={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,i]of t.entries())i.index=n,i.sourceLinks=[],i.targetLinks=[];const e=new Map(t.map(((n,i)=>[s(n,i,t),n])));for(const[t,i]of n.entries()){i.index=t;let{source:n,target:r}=i;"object"!=typeof n&&(n=i.source=vp(e,n)),"object"!=typeof r&&(r=i.target=vp(e,r)),n.sourceLinks.push(i),r.targetLinks.push(i)}if(null!=i)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(i),e.sort(i)}(h),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(np(n.sourceLinks,sp),np(n.targetLinks,sp)):n.fixedValue}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.depth=r;for(const{target:n}of t.sourceLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.height=r;for(const{source:n}of t.targetLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function(i){const s=function({nodes:t}){const i=ip(t,(t=>t.depth))+1,r=(o-e-a)/(i-1),u=new Array(i);for(const n of t){const t=Math.max(0,Math.min(i-1,Math.floor(c.call(null,n,i))));n.layer=t,n.x0=e+t*r,n.x1=n.x0+a,u[t]?u[t].push(n):u[t]=[n]}if(n)for(const t of u)t.sort(n);return u}(i);t=Math.min(l,(u-r)/(ip(s,(t=>t.length))-1)),function(n){const i=function(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}(n,(n=>(u-r-(n.length-1)*t)/np(n,sp)));for(const e of n){let n=r;for(const r of e){r.y0=n,r.y1=n+r.value*i,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*i}n=(u-n+t)/(e.length+1);for(let t=0;t<e.length;++t){const i=e[t];i.y0+=n*(t+1),i.y1+=n*(t+1)}w(e)}}(s);for(let t=0;t<v;++t){const n=Math.pow(.99,t),i=Math.max(1-n,(t+1)/v);g(s,n,i),p(s,n,i)}}(h),hp(h),h}function p(t,i,e){for(let r=1,o=t.length;r<o;++r){const o=t[r];for(const t of o){let n=0,e=0;for(const{source:i,value:r}of t.targetLinks){let o=r*(t.layer-i.layer);n+=M(i,t)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(lp),y(o,e)}}function g(t,i,e){for(let r=t.length-2;r>=0;--r){const o=t[r];for(const t of o){let n=0,e=0;for(const{target:i,value:r}of t.sourceLinks){let o=r*(i.layer-t.layer);n+=C(t,i)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(lp),y(o,e)}}function y(n,i){const e=n.length>>1,o=n[e];b(n,o.y0-t,e-1,i),m(n,o.y1+t,e+1,i),b(n,u,n.length-1,i),m(n,r,0,i)}function m(n,i,e,r){for(;e<n.length;++e){const o=n[e],u=(i-o.y0)*r;u>1e-6&&(o.y0+=u,o.y1+=u),i=o.y1+t}}function b(n,i,e,r){for(;e>=0;--e){const o=n[e],u=(o.y1-i)*r;u>1e-6&&(o.y0-=u,o.y1-=u),i=o.y0-t}}function x({sourceLinks:t,targetLinks:n}){if(void 0===i){for(const{source:{sourceLinks:t}}of n)t.sort(ap);for(const{target:{targetLinks:n}}of t)n.sort(up)}}function w(t){if(void 0===i)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(ap),i.sort(up)}function M(n,i){let e=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:o}of n.sourceLinks){if(r===i)break;e+=o+t}for(const{source:t,width:r}of i.targetLinks){if(t===n)break;e-=r}return e}function C(n,i){let e=i.y0-(i.targetLinks.length-1)*t/2;for(const{source:r,width:o}of i.targetLinks){if(r===n)break;e+=o+t}for(const{target:t,width:r}of n.sourceLinks){if(t===i)break;e-=r}return e}return h.update=function(t){return hp(t),t},h.nodeId=function(t){return arguments.length?(s="function"==typeof t?t:op(t),h):s},h.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:op(t),h):c},h.nodeSort=function(t){return arguments.length?(n=t,h):n},h.nodeWidth=function(t){return arguments.length?(a=+t,h):a},h.nodePadding=function(n){return arguments.length?(l=t=+n,h):l},h.nodes=function(t){return arguments.length?(d="function"==typeof t?t:op(t),h):d},h.links=function(t){return arguments.length?(f="function"==typeof t?t:op(t),h):f},h.linkSort=function(t){return arguments.length?(i=t,h):i},h.size=function(t){return arguments.length?(e=r=0,o=+t[0],u=+t[1],h):[o-e,u-r]},h.extent=function(t){return arguments.length?(e=+t[0][0],o=+t[1][0],r=+t[0][1],u=+t[1][1],h):[[e,r],[o,u]]},h.iterations=function(t){return arguments.length?(v=+t,h):v},h}class gp{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}var yp=(0,a.Z)(),mp="#757575",bp=[{fillColor:"#00758F",borderColor:"#002E39"},{fillColor:"#77004D",borderColor:"#43002C"},{fillColor:"#4F6BED",borderColor:"#3B52B4"},{fillColor:"#937600",borderColor:"#6D5700"},{fillColor:"#286EA8",borderColor:"#00457E"},{fillColor:"#A43FB1",borderColor:"#7C158A"},{fillColor:"#CC3595",borderColor:"#7F215D"},{fillColor:"#0E7878",borderColor:"#004E4E"},{fillColor:"#8764B8",borderColor:"#4B3867"},{fillColor:"#9C663F",borderColor:"#6D4123"}];function xp(t){return"number"==typeof t?t:t.nodeId}function wp(t,n){return t[xp(n.source)][xp(n.target)]}var Mp="...";function Cp(t,n){var i;try{return t.text(n),null===(i=t.node())||void 0===i?void 0:i.getComputedTextLength()}finally{t.text(null)}}var kp,Ap,Sp=ch().x((function(t){return t.x})).y0((function(t){return t.y0})).y1((function(t){return t.y1})).curve((function(t){return new gp(t,!0)})),Lp=function(t){function n(n){var i=t.call(this,n)||this;return i._isRtl=(0,l.jI)(),i._numColumns=0,i.toImage=function(t){return Jd([{container:i.chartContainer}],void 0,i._isRtl,t)},i._onCloseCallout=function(){i.setState({isCalloutVisible:!1,refSelected:void 0,descriptionMessage:""})},i._onBlur=function(){},i._fillNodeColors=function(t){var n=i.state;if(!n.selectedState)return t.color;var e=n.selectedNode;return e&&n.selectedNodes.has(t.index)?e.color:e?void 0:t.color},i._fillNodeBorder=function(t){var n=i.state;if(n.selectedState){if(n.selectedNodes.has(t.index)){var e=n.selectedNode;return e?e.borderColor:t.borderColor}return t.borderColor}return t.borderColor},i._calculateChartMinWidth=function(){return i._margins.left+i._margins.right+124*i._numColumns+62*(i._numColumns-1)},Ac(i),i.state={containerHeight:468,containerWidth:912,selectedState:!1,selectedLinks:new Set,selectedNodes:new Set,shouldOverflow:!1,isCalloutVisible:!1},i._calloutId=p("callout"),i._linkId=p("link"),i._chartId=p("sankeyChart"),i._emptyChartId=p("_SankeyChart_empty"),i._labelTooltipId=p("tooltip"),i._margins={top:36,right:48,bottom:32,left:48},i._computeClassNamesProps=(0,an.J9)((function(t,n,i,e,r,o){return{theme:t,width:e,height:r,pathColor:n,className:i,enableReflow:o}})),i._computeClassNames=(0,an.J9)((function(t,n){return yp(t,n)})),i._normalizeData=(0,an.J9)((function(t,n,e,r,o){return i._normalizeSankeyData(t,n,e,r,o)})),i._fetchTooltip=(0,an.J9)((function(t){return i._labelTooltipDiv(t)})),i._strings=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkFrom)||"From {0}";return{linkFrom:function(t){return tp(n,t.name)}}}))(n.strings),i._accessibility=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkAriaLabel)||"link from {0} to {1} with weight {2}",e=(null==t?void 0:t.nodeAriaLabel)||"node {0} with weight {1}";return{emptyAriaLabel:(null==t?void 0:t.emptyAriaLabel)||"Graph has no data to display",linkAriaLabel:function(t){return tp(n,t.source.name,t.target.name,t.unnormalizedValue?i._formatNumber(t.unnormalizedValue):t.unnormalizedValue)},nodeAriaLabel:function(t,n){return tp(e,t.name,i._formatNumber(n))}}}))(n.accessibility),i._nodeAttributes=(0,an.J9)((function(t,n){return i._computeNodeAttributes(t,n)})),i._fetchNodes=function(t,n,e,r){return i._createNodes(t,n,e,r)},i._linkAttributes=(0,an.J9)((function(t,n,i){return function(t,n,i){var e={};return t.forEach((function(t){var r=xp(t.source),o=e[r];o||(o={},e[r]=o),o[xp(t.target)]={reactId:p("link"),from:n(t.source),aria:i(t)}})),e}(t,n,i)})),i._fetchLinks=function(t,n){return i._createLinks(t,n)},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._fitParentContainer()},n.prototype.componentDidUpdate=function(t){t.shouldResize!==this.props.shouldResize&&this._fitParentContainer()},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.theme,e=n.className,r=n.styles,a=n.pathColor,l=n.colorsForNodes,s=n.borderColorsForNodes,c=this.state,d=this._computeClassNamesProps(i,a,e,c.containerWidth,c.containerHeight,this.props.enableReflow),f=this._computeClassNames(r,d),v=this._normalizeData(this.props.data.SankeyChartData,c.containerWidth,c.containerHeight,l,s),h=v.nodes,p=v.links,g=v.width,y=v.height,m=[];h.sort((function(t,n){return t.x0!==n.x0?t.x0-n.x0:t.y0-n.y0})),h.forEach((function(t,n){m.push({layer:t.layer,type:"node",index:n})})),p.sort((function(t,n){var i=t.source.x0,e=n.source.x0;return i!==e?i-e:t.y0-n.y0})),p.forEach((function(t,n){m.push({layer:t.source.layer,type:"link",index:n})})),m.sort((function(t,n){return t.layer!==n.layer?t.layer-n.layer:t.type>n.type?-1:t.type<n.type?1:0}));var b=this._fetchTooltip(f),x=this._nodeAttributes(h,this._accessibility.nodeAriaLabel),w=this._fetchNodes(f,h,x,b),M=this._linkAttributes(p,this._strings.linkFrom,this._accessibility.linkAriaLabel),C=this._fetchLinks(p,M),k=(0,o.Cl)({isCalloutVisible:c.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:c.refSelected,color:c.color,XValue:c.xCalloutValue,YValue:c.yCalloutValue?c.yCalloutValue:c.dataForHoverCard,descriptionMessage:c.descriptionMessage,isBeakVisible:!1,gapSpace:15,onDismiss:this._onCloseCallout,className:f.calloutContentRoot,preventDismissOnLostFocus:!0},this.props.calloutProps);return u.createElement("div",{className:f.root,role:"presentation",ref:function(n){t.chartContainer=n},onMouseLeave:this._onCloseCallout},u.createElement(Xc,{direction:rc.vertical,className:f.chartWrapper},u.createElement("svg",{width:g,height:y,id:this._chartId,className:f.chart},m.map((function(t){return"node"===t.type?u.createElement("g",{key:h[t.index].nodeId,className:f.nodes},w[t.index]):u.createElement("g",{key:"".concat(p[t.index].source.nodeId,"-").concat(p[t.index].target.nodeId),className:f.links,strokeOpacity:1},C[t.index])})),k.isCalloutVisible&&u.createElement($n,(0,o.Cl)({},k),u.createElement(pc.ChartHoverCard,{XValue:k.XValue,YValue:k.YValue,color:k.color,descriptionMessage:k.descriptionMessage?k.descriptionMessage:""})))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":this._accessibility.emptyAriaLabel})},n.prototype._computeNodeAttributes=function(t,n){var i=this,e={},r=sl(".nodeName").append("text").attr("class","tempText").append("tspan").text(null),o=sl(".nodeName").append("text").attr("class","tempText").attr("font-size","10").append("tspan").text(null);return t.forEach((function(t){var u=Math.max(t.y1-t.y0,0),a=8,l=0,s=t.actualValue;if(u<36){a+=6;var c=Cp(r,i._formatNumber(s));void 0!==c&&(a+=l=c)}var d=function(t,n,i,e){var r=i-e;if(function(t,n,i){var e=Cp(t,n);return void 0!==e&&e<=i}(t,n,r))return n;for(var o=function(t){var n=Cp(t,Mp);return void 0===n?0:n}(t),u="",a=0;a<n.length;a++){u+=n[a],t.text(u);var l=t.node();if(null!==l&&l.getComputedTextLength()>=r-o){u=u.slice(0,-1),u+=Mp;break}}return t.text(null),u}(o,t.name,116,a),f=d.slice(-3)===Mp;e[t.nodeId]={reactId:p("nodeBar"),gElementId:p("nodeGElement"),name:d,aria:n(t,s),trimmed:f,height:u,weightOffset:l}})),cl(".tempText").remove(),e},n.prototype._linkCalloutAttributes=function(t,n){return{selectedLink:t,isCalloutVisible:!0,color:t.source.color,xCalloutValue:t.target.name,yCalloutValue:this._formatNumber(t.unnormalizedValue),descriptionMessage:n}},n.prototype._normalizeSankeyData=function(t,n,i,e,r){var u=function(t,n,i,e){var r=t.left,o=t.right,u=t.top,a=t.bottom;return{sankey:pp().nodeWidth(124).extent([[r,u],[n-o,i-a]]).nodeAlign(e?ep:rp),height:i,width:n}}(this._margins,n,i,this._isRtl),a=u.sankey,l=u.height,s=u.width,c=function(t){return{nodes:t.nodes.map((function(t){return(0,o.Cl)({},t)})),links:t.links.map((function(t){return(0,o.Cl)({},t)}))}}(t);a(c);var d=function(t){var n={};return t.nodes.forEach((function(t){var i=t.layer;n[i]?n[i].push(t):n[i]=[t]})),n}(c);this._numColumns=Object.keys(d).length;var f,v,h=(f=c.nodes,v={},f.forEach((function(t){v[t.nodeId]=t.value})),v),p=function(t){var n={};return t.forEach((function(t){var i=xp(t.source),e=n[i];e||(e={},n[i]=e),e[xp(t.target)]=t.value})),n}(c.links);return function(t,n,i){Object.values(t).map((function(t){return vi(t,(function(t){return t.value}))})).forEach((function(e,r){var o=0,u=.01*e,a=t[r];a.forEach((function(t){var i=n[t.nodeId],r=i/e*100;t.actualValue=i,r<1?(t.value=u,o+=1):o+=r}));var l=0!==o?o/100:1;l>1&&a.forEach((function(t){var e=t.value=t.value/l;!function(t,n,i,e){var r=function(t){var r=wp(e,t);t.unnormalizedValue=r;var o=r/n;t.value=Math.max(i*o,t.value)};t.sourceLinks.forEach(r),t.targetLinks.forEach(r)}(t,n[t.nodeId],e,i)}))}))}(d,h,p),function(t,n,i){var e=t.nodePadding(),r=.3*n;Object.values(i).forEach((function(t){var i=n-vi(t,(function(t){return t.y1-t.y0}));r<i&&(e=Math.min(e,r/(t.length-1)))})),t.nodePadding(e)}(a,i-this._margins.top-this._margins.bottom,d),a(c),function(t,n,i){t.links.forEach((function(t){t.unnormalizedValue||(t.unnormalizedValue=wp(i,t))})),t.nodes.forEach((function(t){t.actualValue=n[t.nodeId]}))}(c,h,p),function(t,n,i){var e,r;n&&i?(e=n,r=i):(e=bp.map((function(t){return t.fillColor})),r=bp.map((function(t){return t.borderColor})));var o=0;t.forEach((function(t){t.color||t.borderColor?t.color&&!t.borderColor?t.borderColor="#757575":t.borderColor&&!t.color&&(t.color="#F5F5F5"):(t.color=e[o],t.borderColor=r[o]),o=(o+1)%e.length}))}(c.nodes,e,r),{width:s,height:l,nodes:c.nodes,links:c.links}},n.prototype._labelTooltipDiv=function(t){var n=sl("#".concat(this._labelTooltipId));return n.empty()&&(n=sl("body").append("div").attr("id",this._labelTooltipId).attr("class",t.toolTip).style("opacity",0)),n.attr("class",t.toolTip),n},n.prototype._createLinks=function(t,n){var i=this;if(t){var e=this._linkId;return t.map((function(t,r){var o,a,l,s,c=wp(n,t),d=c.reactId,f=c.from,v=c.aria,h=(a=.5*(o=t).width,l=o.y0,s=o.y1,[{x:o.source.x1,y0:l+a,y1:l-a},{x:o.target.x0,y0:s+a,y1:s-a}]),p="".concat(e,"-").concat(r),g="gradient-".concat(p),y="url(#".concat(g,")"),m=t.source,b=t.target;return u.createElement("g",{key:p},u.createElement("defs",null,u.createElement("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:m.color}),u.createElement("stop",{offset:"100%",stopColor:b.color}))),u.createElement("path",{d:Sp(h),id:d,fill:i._fillStreamColors(t,y),stroke:i._fillStreamBorder(t,y),strokeWidth:"2",strokeOpacity:i._getOpacityStreamBorder(t),onMouseOver:function(n){return i._onStreamHover(n,t,f)},onMouseOut:function(){i._onStreamLeave(t)},onFocus:function(n){return i._onFocusLink(n,t,f)},onBlur:i._onBlur,fillOpacity:i._getOpacityStream(t),"data-is-focusable":!0,"aria-label":v,role:"img"}))}))}return[]},n.prototype._createNodes=function(t,n,i,e){var r=this;if(n){var o=this.state,a=this._isRtl?"end":"start";return n.map((function(n,l){var s=i[n.nodeId],c=s.reactId,d=s.gElementId,f=s.height,v=s.trimmed,h=s.name,p=s.weightOffset,g=s.aria,y=f>36,m=n.name,b=n.actualValue,x=n.x0,w=n.x1,M=n.y0,C=function(t,n){return!t.selectedState||t.selectedNodes.has(n.index)&&t.selectedNode||!t.selectedNode?"#FFFFFF":"#323130"}(o,n);return u.createElement("g",{key:l,id:d},u.createElement("rect",{x:x,y:M,height:f,width:w-x,fill:r._fillNodeColors(n),id:c,onMouseOver:r._onHover.bind(r,n),onMouseOut:function(){r._onLeave(n)},onFocus:r._onCloseCallout.bind(r),stroke:r._fillNodeBorder(n),strokeWidth:"2",opacity:"1","data-is-focusable":!0,"aria-label":g,role:"img"}),f>24&&u.createElement("g",{className:t.nodeTextContainer},u.createElement("g",{className:"nodeName"},u.createElement("text",{id:"".concat(c,"-name"),x:x,y:M,dy:"1.2em",dx:"0.4em",textAnchor:a,fontWeight:"regular","aria-hidden":"true",fill:C,fontSize:10,onMouseOver:r._showTooltip.bind(r,m,v,e),onMouseOut:r._hideTooltip.bind(r,e)},h)),u.createElement("text",{x:y?x:w-p-8,y:M,dy:y?"2em":"1em",dx:y?"0.4em":"0em",textAnchor:a,fontWeight:"bold","aria-hidden":"true",fill:C,fontSize:14},b?r._formatNumber(b):b)))}))}},n.prototype._onLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedNode:void 0})},n.prototype._onHover=function(t,n){if(n.persist(),this._onCloseCallout(),!this.state.selectedState){var i=function(t){var n=new Array,i=new Set;for(t.sourceLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;)(e=n.shift().target)&&e.sourceLinks&&e.sourceLinks.forEach((function(t){i.add(t),n.push(t)}));for(t.targetLinks&&t.targetLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;){var e;(e=n.shift().source)&&e.targetLinks&&e.targetLinks.forEach((function(t){i.add(t),n.push(t)}))}return i}(t),e=function(t){var n=[];return t.forEach((function(t){n.push(t.target),-1===n.indexOf(t.source)&&n.push(t.source)})),n}(i);e.push(t),this.setState({selectedState:!0,selectedNodes:new Set(Array.from(e).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(i).map((function(t){return t.index}))),selectedNode:t,refSelected:n,isCalloutVisible:t.y1-t.y0<24,color:t.color,xCalloutValue:t.name,yCalloutValue:this._formatNumber(t.actualValue)})}},n.prototype._formatNumber=function(t){return this.props.formatNumberOptions?t.toLocaleString(void 0,this.props.formatNumberOptions):t.toString()},n.prototype._onStreamHover=function(t,n,i){if(t.persist(),this._onCloseCallout(),!this.state.selectedState){var e=function(t){var n=new Array,i=new Set,e=new Set;for(n.push(t.source),i.add(t);n.length>0;){var r=n.shift();e.add(r),r.targetLinks&&r.targetLinks.length>0&&r.targetLinks.forEach((function(t){n.push(t.source),i.add(t)}))}for(n.push(t.target);n.length>0;)r=n.shift(),e.add(r),r.sourceLinks&&r.sourceLinks.length>0&&r.sourceLinks.forEach((function(t){n.push(t.target),i.add(t)}));return{selectedLinks:i,selectedNodes:e}}(n),r=e.selectedLinks,u=e.selectedNodes;this.setState((0,o.Cl)({selectedState:!0,selectedNodes:new Set(Array.from(u).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(r).map((function(t){return t.index}))),refSelected:t},this._linkCalloutAttributes(n,i)))}},n.prototype._onStreamLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedLink:void 0})},n.prototype._onFocusLink=function(t,n,i){t.persist(),this._onCloseCallout(),this.setState((0,o.Cl)({refSelected:t.currentTarget},this._linkCalloutAttributes(n,i)))},n.prototype._fillStreamColors=function(t,n){var i=this.state;if(i.selectedState&&i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.color:n}},n.prototype._fillStreamBorder=function(t,n){var i=this.state;if(i.selectedState){if(i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.borderColor:n}return mp}return mp},n.prototype._getOpacityStream=function(t){var n=this.state;if(n.selectedState){if(!n.selectedLinks.has(t.index))return 1;if(!n.selectedNode)return.3}return 1},n.prototype._getOpacityStreamBorder=function(t){var n=this.state;return!n.selectedState||n.selectedLinks.has(t.index)||n.selectedNode?1:.5},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n=t.props.parentRef?t.props.parentRef:t.chartContainer,r=n&&(t.props.enableReflow?Math.max(n.getBoundingClientRect().width,t._calculateChartMinWidth()):n.getBoundingClientRect().width),o=n&&n.getBoundingClientRect().height;(i!==r||e!==o)&&t.setState({containerWidth:r,containerHeight:o})}))},n.prototype._showTooltip=function(t,n,i,e){n&&(i.style("opacity",.9).style("color",this.props.theme.palette.neutralPrimary),i.html(t).style("left",e.pageX+"px").style("top",e.pageY-28+"px"))},n.prototype._hideTooltip=function(t){t.style("opacity",0)},n.prototype._isChartEmpty=function(){var t,n=null===(t=this.props.data)||void 0===t?void 0:t.SankeyChartData;return!(n&&n.nodes.length>0&&n.links.length>0)},n.defaultProps={enableReflow:!0},n}(u.Component),Dp=(0,r.I)(Lp,(function(t){var n,i,e,r=t.className,u=t.theme,a=t.pathColor,l=t.enableReflow,s=u.effects;return{root:[u.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},r],links:{stroke:a||u.palette.black,fill:u?u.semanticColors.bodyBackground:"#F5F5F5",strokeWidth:3,selectors:(n={},n[It.up]={fill:"Canvas"},n)},nodes:{fill:"#F5F5F5",selectors:(i={},i[It.up]={fill:"Canvas"},i)},toolTip:tv(t.theme),nodeTextContainer:{selectors:{text:{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}},marginTop:"4px",marginLeft:"8px",marginBottom:"4px",marginRight:"8px"},calloutContentRoot:{boxShadow:s.elevation4},chartWrapper:(0,o.Cl)({},l?{overflow:"auto"}:{}),chart:{display:"block"}}}));function Vp(t){var n=0,i=t.children,e=i&&i.length;if(e)for(;--e>=0;)n+=i[e].value;else n=1;t.value=n}function Np(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=Tp)):void 0===n&&(n=Op);for(var i,e,r,o,u,a=new Bp(t),l=[a];i=l.pop();)if((r=n(i.data))&&(u=(r=Array.from(r)).length))for(i.children=r,o=u-1;o>=0;--o)l.push(e=r[o]=new Bp(r[o])),e.parent=i,e.depth=i.depth+1;return a.eachBefore(Fp)}function Op(t){return t.children}function Tp(t){return Array.isArray(t)?t[1]:null}function Ep(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Fp(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function Bp(t){this.data=t,this.depth=this.height=0,this.parent=null}function Pp(t,n){return t.parent===n.parent?1:2}function _p(t){var n=t.children;return n?n[0]:t.t}function Hp(t){var n=t.children;return n?n[n.length-1]:t.t}function Ip(t,n,i){var e=i/(n.i-t.i);n.c-=e,n.s+=i,t.c+=e,n.z+=i,n.m+=i}function Wp(t,n,i){return t.a.parent===n.parent?t.a:i}function Rp(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}!function(t){t[t.long=1]="long",t[t.compact=0]="compact"}(kp||(kp={})),function(t){t[t.preOrder=1]="preOrder",t[t.levelOrder=0]="levelOrder"}(Ap||(Ap={})),Bp.prototype=Np.prototype={constructor:Bp,count:function(){return this.eachAfter(Vp)},each:function(t,n){let i=-1;for(const e of this)t.call(n,e,++i,this);return this},eachAfter:function(t,n){for(var i,e,r,o=this,u=[o],a=[],l=-1;o=u.pop();)if(a.push(o),i=o.children)for(e=0,r=i.length;e<r;++e)u.push(i[e]);for(;o=a.pop();)t.call(n,o,++l,this);return this},eachBefore:function(t,n){for(var i,e,r=this,o=[r],u=-1;r=o.pop();)if(t.call(n,r,++u,this),i=r.children)for(e=i.length-1;e>=0;--e)o.push(i[e]);return this},find:function(t,n){let i=-1;for(const e of this)if(t.call(n,e,++i,this))return e},sum:function(t){return this.eachAfter((function(n){for(var i=+t(n.data)||0,e=n.children,r=e&&e.length;--r>=0;)i+=e[r].value;n.value=i}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,i=function(t,n){if(t===n)return t;var i=t.ancestors(),e=n.ancestors(),r=null;for(t=i.pop(),n=e.pop();t===n;)r=t,t=i.pop(),n=e.pop();return r}(n,t),e=[n];n!==i;)n=n.parent,e.push(n);for(var r=e.length;t!==i;)e.splice(r,0,t),t=t.parent;return e},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(i){i!==t&&n.push({source:i.parent,target:i})})),n},copy:function(){return Np(this).eachBefore(Ep)},[Symbol.iterator]:function*(){var t,n,i,e,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,n=r.children)for(i=0,e=n.length;i<e;++i)o.push(n[i])}while(o.length)}},Rp.prototype=Object.create(Bp.prototype);var zp=(0,a.Z)(),jp=function(t){function n(n,i,e,r,o,u){void 0===r&&(r=[]),void 0===o&&(o=[]);var a=t.call(this,n,e,r,o)||this;return a.composition=i,a._treeTraversal=u,a}return(0,o.C6)(n,t),n.prototype.C=function(t,n){var i,e,r,o,u,a,l=(t=t<65?65:t>90?90:t)||75,s=Np(this.treeData,(function(t){return t.children})),c=(null==s?void 0:s.height)+1;(function(){var t=Pp,n=1,i=1,e=null;function r(r){var l=function(t){for(var n,i,e,r,o,u=new Rp(t,0),a=[u];n=a.pop();)if(e=n._.children)for(n.children=new Array(o=e.length),r=o-1;r>=0;--r)a.push(i=n.children[r]=new Rp(e[r],r)),i.parent=n;return(u.parent=new Rp(null,0)).children=[u],u}(r);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(u),e)r.eachBefore(a);else{var s=r,c=r,d=r;r.eachBefore((function(t){t.x<s.x&&(s=t),t.x>c.x&&(c=t),t.depth>d.depth&&(d=t)}));var f=s===c?1:t(s,c)/2,v=f-s.x,h=n/(c.x+f+v),p=i/(d.depth||1);r.eachBefore((function(t){t.x=(t.x+v)*h,t.y=t.depth*p}))}return r}function o(n){var i=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(i){!function(t){for(var n,i=0,e=0,r=t.children,o=r.length;--o>=0;)(n=r[o]).z+=i,n.m+=i,i+=n.s+(e+=n.c)}(n);var o=(i[0].z+i[i.length-1].z)/2;r?(n.z=r.z+t(n._,r._),n.m=n.z-o):n.z=o}else r&&(n.z=r.z+t(n._,r._));n.parent.A=function(n,i,e){if(i){for(var r,o=n,u=n,a=i,l=o.parent.children[0],s=o.m,c=u.m,d=a.m,f=l.m;a=Hp(a),o=_p(o),a&&o;)l=_p(l),(u=Hp(u)).a=n,(r=a.z+d-o.z-s+t(a._,o._))>0&&(Ip(Wp(a,n,e),n,r),s+=r,c+=r),d+=a.m,s+=o.m,f+=l.m,c+=u.m;a&&!Hp(u)&&(u.t=a,u.m+=d-c),o&&!_p(l)&&(l.t=o,l.m+=s-f,e=n)}return e}(n,r,n.parent.A||e[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*i}return r.separation=function(n){return arguments.length?(t=n,r):t},r.size=function(t){return arguments.length?(e=!1,n=+t[0],i=+t[1],r):e?null:[n,i]},r.nodeSize=function(t){return arguments.length?(e=!0,n=+t[0],i=+t[1],r):e?[n,i]:null},r})().nodeSize([l,l/1.5]).separation((function(t,n){return t.parent===s&&n.parent===s?3.5:1}))(s).descendants().forEach((function(t){t.y=0===t.depth?10:130*t.depth,t.x+=n/2}));var d=[],f=0,v=function(t){var n,i;t.id=f,d.push({id:f,children:t.children,dataName:t.data.name,subName:t.data.subname,bodyText:t.data.bodytext,metricName:null===(n=t.data)||void 0===n?void 0:n.metric,fill:t.data.fill,x:t.x,y:t.y,parentID:null===(i=t.parent)||void 0===i?void 0:i.id}),f++};0===this._treeTraversal?s.each((function(t){v(t)})):s.eachBefore((function(t){v(t)}));for(var h=3*l,p=h/3.45,g=20,y=new Set,m=0,b=d;m<b.length;m++){var x=b[m],w=0===x.id?"Root Node":"Parent info parentId: ".concat(x.parentID,"\n ").concat(d[x.parentID].dataName,"\n ").concat(d[x.parentID].subName);if(!x.children&&!y.has(x.parentID)&&3===c){var M=(h-g)/2,C=p;y.add(x.parentID),this.D(x.id,d[x.parentID].x,d[x.parentID].y,d[x.id].x,d[x.id].y,!0,h,p,g);for(var k=null===(i=d[x.parentID])||void 0===i?void 0:i.children,A=(null===(e=d[x.parentID])||void 0===e?void 0:e.x)-M/2-10,S=(null===(r=d[x.parentID])||void 0===r?void 0:r.x)+M/2+10,L=null===(o=d[x.parentID])||void 0===o?void 0:o.x,D=null===(u=k[0])||void 0===u?void 0:u.y,V=0;V<k.length;++V){var N=k[V];void 0!==this.composition?0===this.composition?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,V%2==0?1===k.length?L:A:S,D,N.data.fill,1===k.length?h:M,p,N.id,w),V%2==1&&(D+=C+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,D,N.data.fill,h,p,N.id,w),D+=C+g):k.length>2?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,V%2==0?A:S,D,N.data.fill,1===k.length?h:M,p,N.id,w),V%2==1&&(D+=C+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,D,N.data.fill,h,p,N.id,w),D+=C+g)}}if((x.children||c<=2)&&(this.N(x.dataName,x.subName,x.bodyText,x.metricName,x.x,x.y,x.fill,h,p,x.id,w),0===x.id&&x.children)){var O=di(k=null===(a=d[x.id])||void 0===a?void 0:a.children,(function(t){return t.x})),T=fi(k,(function(t){return t.x}));this.D(x.id,x.x,x.y,O,x.children[0].y,!1,h,p,g,T)}}},n}(function(){function t(t,n,i,e){void 0===i&&(i=[]),void 0===e&&(e=[]),this._nodeElements=[],this._linkElements=[],this.treeData=t,this.styleClassNames=n,this._nodeElements=i,this._linkElements=e}return t.prototype.O=function(t,n,i,e){var r,o=t.split(/\s+/).reverse(),u="",a=sl(".svgTree").append("text").attr("class","tempText").append("tspan").text(null);e&&a.attr("class",e);for(var l=[];u=o.pop();)if(l.push(u),a.text(l.join(" ")+" "),null!==a.node()&&a.node().getComputedTextLength()>n-i){l.pop(),l.push("...");break}return r=l.join(" ")+" ",a.text(null),cl(".tempText").remove(),r},t.prototype.N=function(t,n,i,e,r,o,a,l,s,c,d){var f="nodeId: ".concat(c," \nnodeMainText: ").concat(t,"\nsubText ").concat(n," ").concat(d),v=r-l/2;!e&&0===c&&i||this._nodeElements.push(u.createElement("rect",{width:l,height:s,x:v,y:o,tabIndex:0,role:"text","data-is-focusable":!0,"aria-label":f,className:this.styleClassNames.rectNode,stroke:a,key:"".concat(c).concat(this.styleClassNames.rectNode)})),n&&(n=this.O(n,l,l/4,this.styleClassNames.rectSubText)),i&&(i=this.O(i,l,l/4,this.styleClassNames.rectBodyText)),e&&(e=this.O(e,l,l/4,this.styleClassNames.rectMetricText)),t=this.O(t,l,l/4,this.styleClassNames.rectText);var h=e?u.createElement("tspan",{className:this.styleClassNames.rectMetricText,dy:"1.4em",x:v+l/2},e):i?u.createElement(u.Fragment,null,u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n),u.createElement("tspan",{className:this.styleClassNames.rectBodyText,dy:"1.4em",x:v+l/2},i)):u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n);n||e||i?this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:e?this.styleClassNames.rectSubText:this.styleClassNames.rectText,dy:e?o+s/2.5:o+s/2,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t,h)):this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:this.styleClassNames.rectMetricText,dy:o+s/1.6,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t))},t.prototype.F=function(t,n,i,e,r,o,u,a,l){var s="M".concat(i-o/2,",").concat(e-a," H").concat(l+o/2," M").concat(t,",").concat(e-a,"\n V").concat(n+u+a/2),c="M".concat(t,",").concat(n+u+a/2," V").concat(n+5*a,"\n H").concat(t-o/2," H").concat(t+o/2);return r?c:s},t.prototype.D=function(t,n,i,e,r,o,a,l,s,c){void 0===c&&(c=0),this._linkElements.push(u.createElement("path",{className:this.styleClassNames.link,d:this.F(n,i,e,r,o,a,l,s,c),key:"".concat(t).concat(this.styleClassNames.link)}))},t}()),$p=function(t){function n(n){var i,e,r,o,u,a=t.call(this,n)||this;return a._nodeElements=[],a._linkElements=[],a._margin={top:(null===(i=a.props.margins)||void 0===i?void 0:i.top)||30,bottom:(null===(e=a.props.margins)||void 0===e?void 0:e.bottom)||30,left:(null===(r=a.props.margins)||void 0===r?void 0:r.left)||50,right:(null===(o=a.props.margins)||void 0===o?void 0:o.right)||20},a._width=a.props.width||1500,a._height=a.props.height||700,a._treeData=a.props.treeData,a._composition=null===(u=a.props)||void 0===u?void 0:u.composition,a._treeTraversal=a.props.treeTraversal,a.state={_width:a._width,_height:a._height},a}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.theme,i=t.className,e=t.styles;this._classNames=zp(e,{theme:n,className:i}),this.P(),this.setState({_width:this.props.width||1500,_height:this.props.height||700})},n.prototype.componentDidUpdate=function(t){if(t.layoutWidth!==this.props.layoutWidth){var n=cl("text"),i=cl("rect"),e=cl("path");0===this._nodeElements.length&&0===this._linkElements.length&&(n.remove(),i.remove(),e.remove()),this.P()}},n.prototype.P=function(){var t=[],n=[],i=new jp(this._treeData,this._composition,this._classNames,t,n,this._treeTraversal),e=this.state._width-this._margin.left-this._margin.right;i.C(this.props.layoutWidth,e),this._nodeElements=t,this._linkElements=n},n.prototype.render=function(){var t;return u.createElement(Xc,null,u.createElement("div",{className:null===(t=this._classNames)||void 0===t?void 0:t.root},u.createElement("svg",{className:"svgTree",width:this.state._width-this._margin.left-this._margin.right,height:this.state._height-this._margin.top-this._margin.bottom},u.createElement("g",{className:"svgNode"},this._nodeElements.map((function(t){return t}))),u.createElement("g",{className:"svgLink"},this._linkElements.map((function(t){return t}))))))},n}(u.Component),Yp=(0,r.I)($p,(function(t){var n,i,e,r,u;return{root:[t.theme.spacing,"ms-TreeChart",t.className,{overflow:"scroll"}],link:{fill:"none",stroke:t.theme.palette.neutralSecondary,strokeWidth:"2px"},rectNode:{strokeWidth:"2px",fill:t.theme.semanticColors.bodyBackground,padding:"10px",rx:"2px",selectors:(n={},n[It.up]={fill:"Canvas"},n)},rectText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.large),{selectors:(i={},i[It.up]={fill:"CanvasText"},i)}),rectSubText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimary},t.theme.fonts.medium),{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}),rectBodyText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimaryAlt},t.theme.fonts.xSmall),{selectors:(r={},r[It.up]={fill:"CanvasText"},r)}),rectMetricText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.xLarge),{selectors:(u={},u[It.up]={fill:"CanvasText"},u)})}}));function Xp(t,n){let i,e;if(void 0===n)for(const n of t)null!=n&&(void 0===i?n>=n&&(i=e=n):(i>n&&(i=n),e<n&&(e=n)));else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(void 0===i?o>=o&&(i=e=o):(i>o&&(i=o),e<o&&(e=o)))}return[i,e]}var Gp=(0,a.Z)(),Up=function(t){function n(n){var i=t.call(this,n)||this;return i.margin={top:2,right:0,bottom:0,left:0},i._isRTL=(0,l.jI)(),i.state={_points:null,_width:i.props.width||80,_height:i.props.height||20,_valueTextWidth:i.props.valueTextWidth||80},i._emptyChartId=p("_SparklineChart_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this;if(!this._isChartEmpty()){var n=ch().x((function(n){return t.x(n.x)})).y0(this.state._height).y1((function(n){return t.y(n.y)})).curve(hl);this.area=n;var i=lv().x((function(n){return t.x(n.x)})).y((function(n){return t.y(n.y)})).curve(hl);this.line=i;var e=this.props.data.lineChartData[0].data,r=Xp(e,(function(t){return t.x})),o=r[0],u=r[1];this.x=Gu().domain([o,u]).range([this.margin.left,this.state._width-this.margin.right]),this.y=Gu().domain([0,fi(e,(function(t){return t.y}))]).range([this.state._height-this.margin.bottom,this.margin.top]),this.setState({_points:e})}},n.prototype.drawSparkline=function(){return u.createElement(u.Fragment,null,u.createElement("path",{className:"line",d:this.line(this.state._points),fill:"transparent",opacity:1,strokeWidth:2,stroke:this.props.data.lineChartData[0].color}),u.createElement("path",{className:"area",d:this.area(this.state._points),opacity:1,fillOpacity:.2,fill:this.props.data.lineChartData[0].color,role:"img","aria-hidden":!0}))},n.prototype.render=function(){var t=Gp(this.props.styles,{theme:this.props.theme});return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Xc,{direction:rc.horizontal,isCircularNavigation:!0,className:t.inlineBlock},u.createElement("div",{className:t.inlineBlock},this.state._width>=50&&this.state._height>=16?u.createElement("svg",{width:this.state._width,height:this.state._height,"data-is-focusable":!0,"aria-label":"Sparkline with label ".concat(this.props.data.lineChartData[0].legend)},this.state._points?this.drawSparkline():null):u.createElement(u.Fragment,null),this.props.showLegend&&this.props.data.lineChartData[0].legend?u.createElement("svg",{width:this.state._valueTextWidth,height:this.state._height,"data-is-focusable":!0},u.createElement("text",{x:"0%",textAnchor:this._isRTL?"end":"start",dx:8,y:"100%",dy:-5,className:t.valueText},this.props.data.lineChartData[0].legend)):u.createElement(u.Fragment,null)))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n}(u.Component),qp=(0,r.I)(Up,(function(t){var n;return{inlineBlock:{display:"inline"},valueText:(0,o.Cl)((0,o.Cl)({},t.theme.fonts.smallPlus),{fill:t.theme.semanticColors.messageText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)})}}));function Zp(t,n,i,e){var r=t.semanticColors.bodyText,o=t.semanticColors.bodyBackground;if(!n)return o;var u=qs(n,i||r),a=qs(n,e||o),l=Eo(u),s=Eo(a);if(!l||!s)return a;if(hs(l.formatHex(),s.formatHex())>=3)return s.formatHex();var c=function(t,n){var i=Eo(t);if(!i)return n.semanticColors.bodyText;var e=i.rgb();return Po(255-e.r,255-e.g,255-e.b).formatHex()}(s.formatHex(),t);return hs(l.formatHex(),c)>=3?c:o}var Kp=(0,a.Z)(),Jp=function(t){function n(n){var i=t.call(this,n)||this;return i.toImage=function(t){return Jd([{container:i._rootElem}],void 0,i._isRTL,t)},Ac(i),i._isRTL=(0,l.jI)(n.theme),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t,n=this,i=this.props,e=i.headers,r=i.rows,a=i.width,l=i.height,s=i.styles,c=i.theme,d=Kp(s,{theme:c});if(!e||0===e.length)return u.createElement("div",null,"No data available");var f,v=new Set;e.forEach((function(t){var n,i,e=null===(i=Eo((null===(n=null==t?void 0:t.style)||void 0===n?void 0:n.backgroundColor)||""))||void 0===i?void 0:i.formatHex();e&&v.add(e)}));var h=!1;if(1===v.size||2===v.size)for(var p=1===v.size?Array.from(v)[0]:Array.from(v)[1],g=0,y=e;g<y.length;g++){var m=y[g],b=null===(t=null==m?void 0:m.style)||void 0===t?void 0:t.color;if(b&&hs(b,p)>=3){f=p,h=!0;break}}return u.createElement("div",{ref:function(t){n._rootElem=t},className:d.root,style:{height:l?"".concat(l,"px"):"650px",overflow:"hidden"}},u.createElement("svg",{width:null!=a?a:"100%",height:null!=l?l:"650px",className:d.chart},u.createElement("foreignObject",{x:"0",y:"0",width:"100%",height:"100%"},u.createElement("div",{style:{maxHeight:l?"".concat(l,"px"):"650px",overflowY:"auto",overflowX:"auto"}},u.createElement("table",{className:d.table,style:{width:a?"".concat(a,"px"):"100%"}},u.createElement("thead",null,u.createElement("tr",null,e.map((function(t,i){var e=(0,o.Cl)({},null==t?void 0:t.style),r=e.color,a=e.backgroundColor;return h?e.backgroundColor=f:(r||a)&&(e.backgroundColor=Zp(c,n._rootElem,r,a)),u.createElement("th",{key:i,className:d.headerCell,style:e},t.value)})))),r&&r.length>0&&u.createElement("tbody",null,r.map((function(t,i){return u.createElement("tr",{key:i},t.map((function(t,i){var e=(0,o.Cl)({},null==t?void 0:t.style),r=e.color,a=e.backgroundColor;return(r||a)&&(e.backgroundColor=Zp(c,n._rootElem,r,a)),u.createElement("td",{key:i,className:d.bodyCell,style:e},t.value)})))}))))))))},n}(u.Component),Qp=(0,r.I)(Jp,(function(t){var n,i,e=t.theme,r=e.fonts;return{root:{width:"100%",overflowX:"auto"},table:{borderCollapse:"collapse"},headerCell:(0,o.Cl)((0,o.Cl)({},r.small),{fontWeight:It.BO.semibold,backgroundColor:e.palette.neutralQuaternary,color:e.semanticColors.bodyText,padding:"8px",textAlign:"left",border:"2px solid ".concat(e.palette.neutralLighter),selectors:(n={},n[It.up]={backgroundColor:"Window",color:"WindowText"},n)}),bodyCell:(0,o.Cl)((0,o.Cl)({},r.small),{padding:"8px",border:"2px solid ".concat(e.palette.neutralLighter),color:e.semanticColors.bodyText,textAlign:"left",selectors:(i={},i[It.up]={color:"WindowText"},i)})}})),tg=(0,a.Z)(),ng=function(t){function n(n){var i,e,r,a,s,c,d=t.call(this,n)||this;return d._isRtl=(0,l.jI)(),d.X_ORIGIN=0,d.toImage=function(t){var n,i;return Jd([{container:null===(n=d._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer}],d.props.hideLegend||null===(i=d._legendsRef.current)||void 0===i?void 0:i.toSVG,d._isRtl,t)},d._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){var l;return l=o===ns.NumericAxis?function(t,n,i,e,r){var o=Os(Ns(t),r),u=o.longestPositiveBar,a=o.longestNegativeBar,l=n.left,s=i-n.right;return e?{dStartValue:u,dEndValue:Math.min(a,r),rStartValue:l,rEndValue:s}:{dStartValue:Math.min(a,r),dEndValue:u,rStartValue:l,rEndValue:s}}(t,n,i,r,d.X_ORIGIN):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0},l},d._getMargins=function(t){d.margins=t},d._renderContentForOnlyBars=function(t){var n,i,e,r,o=d.props,a=o.useSingleColor,l=void 0!==a&&a,s=o.enableGradient,c=void 0!==s&&s,f=0;return d.props.data.forEach((function(n,i){n.y===t.y&&(f=i)})),l?(r=d.props.colors?d._createColors()(1):ss(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=Mc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=t.color?t.color:d.props.colors?d._createColors()(t.x):ss(f,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),u.createElement(u.Fragment,null,u.createElement(pc.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x.toString(),Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:r,culture:d.props.culture}))},d._renderCallout=function(t){return t?d._renderContentForOnlyBars(t):null},d._getCustomizedCallout=function(){return d.props.onRenderCalloutPerDataPoint?d.props.onRenderCalloutPerDataPoint(d.state.dataPointCalloutProps,d._renderCallout):null},d._getGraphData=function(t,n,i,e,r,o){var u=Ns(d._points),a=Os(u,d.X_ORIGIN);d._longestBarPositiveTotalValue=a.longestPositiveBar,d._longestBarNegativeTotalValue=a.longestNegativeBar;var l=d._yAxisType===is.NumericAxis?d._getScales(i,e,!0):d._getScales(i,e,!1),s=l.xBarScale,c=l.yBarScale,f=s.range(),v=[];return f[0]<f[1]&&(v=u.map((function(t){return d._yAxisType===is.NumericAxis?d._createNumericBars(i,e,r,o,t,s,c):d._createStringBars(i,e,r,o,t,s,c)})).flat()),d._bars=v},d._refCallback=function(t,n){d._refArray.push({index:n,refElement:t})},d._getCalloutContentForBar=function(t){var n,i,e,r,o=[],u=d.props,a=u.useSingleColor,l=void 0!==a&&a,s=u.enableGradient,c=void 0!==s&&s,f=d.props.data,v=f.filter((function(n){return n.y===t.y})),h=0;return f.forEach((function(n,i){n.y===t.y&&(h=i)})),l?(r=d.props.colors?d._createColors()(1):ss(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=Mc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=v[0].color?v[0].color:d.props.colors?d._createColors()(v[0].x):ss(h,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),o.push({legend:v[0].legend,y:v[0].x,color:r,data:v[0].yAxisCalloutData,yAxisCalloutData:v[0].yAxisCalloutData}),{YValueHover:o,hoverXValue:t.yAxisCalloutData||t.y.toString()}},d._onBarLeave=function(){},d._handleChartMouseLeave=function(){d._calloutAnchorPoint=null,d.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},d._onBarFocus=function(t,n,i){if((!1===d.state.isLegendSelected||d._isLegendHighlighted(t.legend))&&d._calloutAnchorPoint!==t){var e=d._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;d._refArray.forEach((function(e,u){n===u&&d.setState({refSelected:e.refElement,isCalloutVisible:!0,selectedLegendTitle:t.legend,dataForHoverCard:t.x,color:d.props.useSingleColor?i:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData})}))}},d._getScales=function(t,n,i){var e=d._longestBarPositiveTotalValue,r=d._longestBarNegativeTotalValue,o=[Math.min(d.X_ORIGIN,r),Math.max(d.X_ORIGIN,e)];if(i){var u=fi(d._points,(function(t){return t.y})),a=di(d._points,(function(t){return t.y})),l=Math.max(u,d.props.yMaxValue||0),s=d.props.yMinValue||0,c=Math.min(a,s);return{xBarScale:Gu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f=Gu().domain([c,l]).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin])}}var f=Tu().domain(d._yAxisLabels).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin]).padding(d._yAxisPadding);return{xBarScale:Gu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f}},d._calculateAppropriateBarHeight=function(t,n,i){var e=Th(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1],u=fi(d._points,(function(t){return t.y}));return o=Math.max(o,u),Math.floor(n*r*(1-i)/(o+r*(1-i)))},d._getDomainMarginsForHorizontalBarChart=function(t){d._domainMargin=8;var n=d._getUniqueYValues();d._yAxisPadding=1===d._yAxisPadding?.99:d._yAxisPadding;var i=d._yAxisPadding/(1-d._yAxisPadding),e=n.length+(n.length-1)*i,r=t-(d.margins.top+8)-(d.margins.bottom+8);if(d._yAxisType!==is.StringAxis)d._barHeight=d.props.barHeight||d._calculateAppropriateBarHeight(n,r,d._yAxisPadding),d._barHeight=Math.max(d._barHeight,1),d._domainMargin+=d._barHeight/2;else{d._barHeight=d.props.barHeight||r/e;var u=e*d._barHeight;r>=u&&(d._domainMargin=8+(r-u)/2)}return(0,o.Cl)((0,o.Cl)({},d.margins),{top:d.margins.top+d._domainMargin,bottom:d.margins.bottom+d._domainMargin})},d._closeCallout=function(){d.setState({isCalloutVisible:!1})},d._getLegendData=function(t,n){var i=d.props.useSingleColor,e=[],r={};return t.forEach((function(t,n){var e,o,u,a,l=i?d.props.colors?d._createColors()(1):ss(1,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted):t.color;d.props.enableGradient&&(l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Mc(n,0,null===(u=d.props.theme)||void 0===u?void 0:u.isInverted)[0],i&&(l=Mc(0,0,null===(a=d.props.theme)||void 0===a?void 0:a.isInverted)[0])),r[t.legend]=l})),Object.entries(r).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){d._handleChartMouseLeave(),d._onLegendHover(n)},onMouseOutAction:function(t){d._onLegendLeave(t)}};e.push(r)})),u.createElement(df,(0,o.Cl)({legends:e,enabledWrapLines:d.props.enabledLegendsWrapLines,overflowProps:d.props.legendsOverflowProps,focusZonePropsInHoverCard:d.props.focusZonePropsForLegendsInHoverCard,overflowText:d.props.legendsOverflowText},d.props.legendProps,{onChange:d._onLegendSelectionChange.bind(d),ref:d._legendsRef}))},d._isLegendSelected=function(){return d.state.isLegendSelected},d._isLegendHighlighted=function(t){return d._getHighlightedLegend().includes(t)},d._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;d._xMax=Math.max(n[n.length-1],d.props.xMaxValue||0)}},d._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.x,e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,". ")+"".concat(e,".")},d._getChartTitle=function(){var t=d.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Horizontal bar chart with ".concat((null==i?void 0:i.length)||0," bars. ")},d._getOrderedYAxisLabels=function(){return d._yAxisType===is.StringAxis&&"default"!==d.props.yAxisCategoryOrder?nc(d._mapCategoryToValues(),d.props.yAxisCategoryOrder):(0,o.fX)([],d._points,!0).reverse().map((function(t){return t.y}))},d._mapCategoryToValues=function(){var t={};return d._points.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(n.x)})),t},Ac(d),d.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,isLegendSelected:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)&&n.legendProps.selectedLegends.length>0||void 0!==(null===(e=n.legendProps)||void 0===e?void 0:e.selectedLegend),isLegendHovered:!1,refSelected:null,selectedLegendTitle:null!==(a=null===(r=n.legendProps)||void 0===r?void 0:r.selectedLegend)&&void 0!==a?a:"",xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",selectedLegends:(null===(s=n.legendProps)||void 0===s?void 0:s.selectedLegends)||[]},d._calloutId=p("callout"),d._refArray=[],d._xAxisType=d.props.data&&d.props.data.length>0?Is(d.props.data[0].x,!0):ns.NumericAxis,d._yAxisType=d.props.data&&d.props.data.length>0?Is(d.props.data[0].y,!1):is.StringAxis,d._cartesianChartRef=u.createRef(),d._legendsRef=u.createRef(),d._domainMargin=8,d._yAxisPadding=null!==(c=d.props.yAxisPadding)&&void 0!==c?c:.5,d}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Gs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._yAxisLabels=this._getOrderedYAxisLabels(),this._xMax=Math.max(fi(this._points,(function(t){return t.x})),this.props.xMaxValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=tg(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.selectedLegendTitle,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),Rs(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(Dv,(0,o.Cl)({},this.props,{yAxisPadding:this._yAxisPadding,chartTitle:this._getChartTitle(),points:this._points,chartType:ts.HorizontalBarChartWithAxis,xAxisType:this._xAxisType,yAxisType:this._yAxisType,stringDatasetForYAxisDomain:this._yAxisLabels,calloutProps:i,tickParams:e,legendBars:n,createYAxis:xs,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:Ms,getMinMaxOfYAxis:Ps,barwidth:this._barHeight,focusZoneDirection:rc.vertical,customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getYDomainMargins:this._getDomainMarginsForHorizontalBarChart,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._points=this.props.data||[],this._barHeight=this.props.barHeight||32;var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark]},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._xMax);return Gu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;!1!==this.state.isLegendSelected&&!this._isLegendHighlighted(t.legend)||this._calloutAnchorPoint===t||(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:!0,dataForHoverCard:t.x,selectedLegendTitle:t.legend,color:this.props.useSingleColor||this.props.enableGradient?n:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._createNumericBars=function(t,n,i,e,r,a,l){var s=this,c=this.props.useSingleColor,d=void 0!==c&&c,f=(0,o.fX)([],r,!0);f.sort((function(t,n){var i="number"==typeof t.y?t.y:parseFloat(t.y);return("number"==typeof n.y?n.y:parseFloat(n.y))-i}));var v=0,h=0,g=0,y=r.filter((function(t){return t.x>=s.X_ORIGIN})).length,m=r.length-y,b=0,x=0,w=f.map((function(t,i){var e,r,o,c,f,w,M,C,k=!0;(s.state.isLegendHovered||s.state.isLegendSelected)&&(k=s._isLegendHighlighted(t.legend)),s._classNames=tg(s.props.styles,{theme:s.props.theme,legendColor:s.state.color,shouldHighlight:k}),t.x>=s.X_ORIGIN&&++b,t.x<s.X_ORIGIN&&++x;var A,S=s._isRtl?n-(s.margins.right+Math.max(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN))-s.margins.left):Math.min(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN));if(Math.max(l(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");A=d?s.props.colors?s._createColors()(1):ss(1,0,null===(e=s.props.theme)||void 0===e?void 0:e.isInverted):s.props.colors?s._createColors()(t.x):ss(i,0,null===(r=s.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!d?t.color:A;if(s.props.enableGradient){var D=Math.max(s._points.findIndex((function(n){return n===t})),0);A=(null===(o=t.gradient)||void 0===o?void 0:o[0])||Mc(D,0,null===(c=s.props.theme)||void 0===c?void 0:c.isInverted)[0],L=(null===(f=t.gradient)||void 0===f?void 0:f[1])||Mc(D,0,null===(w=s.props.theme)||void 0===w?void 0:w.isInverted)[1],d&&(A=Mc(0,0,null===(M=s.props.theme)||void 0===M?void 0:M.isInverted)[0],L=Mc(0,0,null===(C=s.props.theme)||void 0===C?void 0:C.isInverted)[1]),s._points[D].color=A}var V=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(a(g+s.X_ORIGIN)-a(s.X_ORIGIN));g>s.X_ORIGIN?v+=N:h+=N;var O=Math.abs(a(t.x+s.X_ORIGIN)-a(s.X_ORIGIN)),T=O>2&&(t.x>s.X_ORIGIN&&b!==y||t.x<s.X_ORIGIN&&(0!==y||x>1))?2:0,E=O>2&&(t.x>s.X_ORIGIN&&(0!==m||b>1)||t.x<s.X_ORIGIN&&x!==m)?2:0,F=s.X_ORIGIN;return F=s._isRtl?t.x>s.X_ORIGIN?S-v:S+h:t.x>s.X_ORIGIN?S+v:S-h,g=t.x,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},s.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:V},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{key:t.y,x:F,className:s._classNames.opacityChangeOnHover,y:l(t.y)-s._barHeight/2,"data-is-focusable":k,width:O-(s._isRtl?E:T),height:s._barHeight,ref:function(n){s._refCallback(n,t.legend)},rx:s.props.roundCorners?3:0,onClick:t.onClick,onMouseOver:s._onBarHover.bind(s,t,A),"aria-label":s._getAriaLabel(t),role:"img","aria-labelledby":"toolTip".concat(s._calloutId),onMouseLeave:s._onBarLeave,onFocus:s._onBarFocus.bind(s,t,i,A),onBlur:s._onBarLeave,fill:s.props.enableGradient?"url(#".concat(V,")"):A}))}));return w},n.prototype._getUniqueYValues=function(){var t,n={};return null===(t=this.props.data)||void 0===t||t.forEach((function(t){n[t.y]=t.y})),Object.values(n)},n.prototype._createStringBars=function(t,n,i,e,r,o,a){var l=this,s=this.props.useSingleColor,c=void 0!==s&&s,d=0,f=0,v=0,h=r.filter((function(t){return t.x>=l.X_ORIGIN})).length,g=r.length-h,y=0,m=0,b=r.map((function(t,i){var e,r,s,b,x,w,M,C,k=!0;(l.state.isLegendHovered||l.state.isLegendSelected)&&(k=l._isLegendHighlighted(t.legend)),l._classNames=tg(l.props.styles,{theme:l.props.theme,legendColor:l.state.color,shouldHighlight:k}),t.x>=l.X_ORIGIN&&++y,t.x<l.X_ORIGIN&&++m;var A,S=l._isRtl?n-(l.margins.right+Math.max(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN))-l.margins.left):Math.min(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN));if(Math.max(a(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");A=c?l.props.colors?l._createColors()(1):ss(1,0,null===(e=l.props.theme)||void 0===e?void 0:e.isInverted):l.props.colors?l._createColors()(t.x):ss(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!c?t.color:A;if(l.props.enableGradient){var D=l._points.findIndex((function(n){return n===t}));A=(null===(s=t.gradient)||void 0===s?void 0:s[0])||Mc(D,0,null===(b=l.props.theme)||void 0===b?void 0:b.isInverted)[0],L=(null===(x=t.gradient)||void 0===x?void 0:x[1])||Mc(D,0,null===(w=l.props.theme)||void 0===w?void 0:w.isInverted)[1],c&&(A=Mc(0,0,null===(M=l.props.theme)||void 0===M?void 0:M.isInverted)[0],L=Mc(0,0,null===(C=l.props.theme)||void 0===C?void 0:C.isInverted)[1]),l._points[D].color=A}var V=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(o(v+l.X_ORIGIN)-o(l.X_ORIGIN));v>0?d+=N:f+=N;var O=Math.abs(o(t.x+l.X_ORIGIN)-o(l.X_ORIGIN)),T=O>2&&(t.x>l.X_ORIGIN&&y!==h||t.x<l.X_ORIGIN&&(0!==h||m>1))?2:0,E=O>2&&(t.x>l.X_ORIGIN&&(0!==g||y>1)||t.x<l.X_ORIGIN&&m!==g)?2:0;v=t.x;var F=l.X_ORIGIN;return F=l._isRtl?t.x>l.X_ORIGIN?S-d:S+f:t.x>l.X_ORIGIN?S+d:S-f,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:V},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{transform:"translate(0,".concat(.5*(a.bandwidth()-l._barHeight),")"),key:t.x,className:l._classNames.opacityChangeOnHover,x:F,y:a(t.y),rx:l.props.roundCorners?3:0,width:O-(l._isRtl?E:T),height:l._barHeight,"aria-labelledby":"toolTip".concat(l._calloutId),"aria-label":l._getAriaLabel(t),role:"img",ref:function(n){l._refCallback(n,t.legend)},onClick:t.onClick,onMouseOver:l._onBarHover.bind(l,t,A),onMouseLeave:l._onBarLeave,onBlur:l._onBarLeave,"data-is-focusable":k,onFocus:l._onBarFocus.bind(l,t,i,A),fill:l.props.enableGradient?"url(#".concat(V,")"):A}))}));return b},n.prototype._onLegendHover=function(t){this._isLegendSelected()||this.setState({isLegendHovered:!0,selectedLegendTitle:t})},n.prototype._onLegendLeave=function(t){!t&&this._isLegendSelected()||this.setState({isLegendHovered:!1,selectedLegendTitle:"",isLegendSelected:!t&&this._isLegendSelected()})},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.selectedLegendTitle?[this.state.selectedLegendTitle]:[]},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t,selectedLegendTitle:null==i?void 0:i.title}):this.setState({selectedLegends:t.slice(-1),selectedLegendTitle:null==i?void 0:i.title}),this.setState({isLegendSelected:t.length>0}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.defaultProps={yAxisCategoryOrder:"default"},n}(u.Component),ig=(0,r.I)(ng,(function(t){return{opacityChangeOnHover:{opacity:t.shouldHighlight?"":"0.1"},xAxisTicks:[]}}));function eg(t){var n=t.availableWidth,i=t.minTextWidth;return{show:n>(void 0===i?24:i)&&n>0,x:t.textX,y:t.textY,value:t.value,culture:t.culture,onMouseOver:t.onMouseOver,onMouseMove:t.onMouseMove,onMouseOut:t.onMouseOut}}var rg=(0,a.Z)(),og=u.forwardRef((function(t,n){var i,e=t.orientation,r=void 0===e?"vertical":e,a=(0,o.Tt)(t,["orientation"]),s=p("FunnelChartTooltipId_"),c=p("_FunnelChart_empty"),d=(0,l.jI)(),f=u.useState(null),v=f[0],h=f[1],g=u.useState(!1),y=g[0],m=g[1],b=u.useState(null),x=b[0],w=b[1],M=u.useState(null),C=M[0],k=M[1],A=u.useState([]),S=A[0],L=A[1],D=u.useRef(null),V=u.useRef(null),N=W(a.data);function O(t,n){null==n||n.persist(),h(t.stage),w(t),m(!0),k(n.currentTarget)}function T(t,n,i){null==i||i.persist(),h(n.category),w({stage:t,value:n.value,color:n.color,category:n.category}),m(!0),k(i.currentTarget)}function E(){h(null),m(!1),w(null),k(null)}u.useEffect((function(){var t;(null===(t=a.legendProps)||void 0===t?void 0:t.selectedLegends)&&L(a.legendProps.selectedLegends)}),[null===(i=a.legendProps)||void 0===i?void 0:i.selectedLegends]),u.useImperativeHandle(a.componentRef,(function(){return{chartContainer:null!=D?D:null,toImage:function(t){var n;return Jd([{container:D.current}],a.hideLegend||null===(n=V.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)}}}),[a.hideLegend]);var F=u.useCallback((function(t,n,i){var e,r;(null===(e=a.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?L(t):L(t.slice(-1)),(null===(r=a.legendProps)||void 0===r?void 0:r.onChange)&&a.legendProps.onChange(t,n,i)}),[a.legendProps]);function B(){return S.length>0?S:v?[v]:[]}function P(t){return B().includes(t)}function _(){return 0===B().length}function H(t,n){return"subValue"in t?{culture:a.culture,onMouseOver:1===n?function(n){return T(t.stage,t.subValue,n)}:void 0,onMouseMove:1===n?function(n){return T(t.stage,t.subValue,n)}:void 0,onFocus:function(n){return i=t.stage,e=t.subValue,null==(r=n)||r.persist(),w({stage:i,value:e.value,color:e.color,category:e.category}),m(!0),void k(r.currentTarget);var i,e,r},onBlur:function(){return E()},onMouseOut:function(){return E()}}:{culture:a.culture,onMouseOver:1===n?function(n){return O(t,n)}:void 0,onMouseMove:1===n?function(n){return O(t,n)}:void 0,onFocus:function(n){return function(t,n){null==n||n.persist(),w(t),m(!0),k(n.currentTarget)}(t,n)},onBlur:function(){return E()},onMouseOut:function(){return E()}}}function I(t){var n=t.key,i=t.pathD,e=t.fill,r=t.opacity,l=t.textProps,s=t.data,c=t.isFocusable,f=H(s,r),v=ic(e,a.theme);return u.createElement("g",{key:n},u.createElement("path",(0,o.Cl)({d:i,fill:e,opacity:r},f,{"data-is-focusable":c})),l&&u.createElement("g",(0,o.Cl)({},f),function(t){var n=t.show,i=t.x,e=t.y,r=t.value,o=t.textColor;if(!n)return null;var l=u.createElement("text",{x:d?X-i:i,y:e,textAnchor:"middle",alignmentBaseline:"middle",fill:o},(0,Yn.c$)(r.toString(),a.culture));return d?u.createElement("g",{transform:"scale(-1,1) translate(".concat(-X,",0)")},l):l}((0,o.Cl)((0,o.Cl)({},l),{textColor:v}))))}function W(t){return Array.isArray(t)&&t.every((function(t){return Array.isArray(t.subValues)}))}function R(t,n,i,e,u){var l=u.stages.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{subValues:t.subValues||[]})})),s="vertical"===r?function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight/o.length,c=o[e],d=o[e+1]||{subValues:[]},f=u[e]||1,v=u[e+1]||0,h=0,p=0,g=function(t){var i=c.subValues[t],e=null===(n=d.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;h+=r/f*(f/a)*l,p+=(o/v||0)*(v/a)*l},y=0;y<r;y++)g(y);var m,b=c.subValues[r],x=null===(i=d.subValues)||void 0===i?void 0:i.find((function(t){return t.category===b.category})),w=b.value,M=x?x.value:0,C=w/f*(f/a)*l,k=(M/v||0)*(v/a)*l,A=(l-f/a*l)/2+h,S=A+C,L=(l-v/a*l)/2+p,D=L+k,V=(A+S+L+D)/4,N=e===o.length-1,O=N?e*s+.33*s:(e+.5)*s;return m=N?C*(1-(O-e*s)/s):Math.min(C,k),{pathD:"M".concat(A,",").concat(e*s,"\n L").concat(S,",").concat(e*s,"\n L").concat(D,",").concat((e+1)*s,"\n L").concat(L,",").concat((e+1)*s,"\n Z"),textX:V,textY:O,availableWidth:m}}((0,o.Cl)((0,o.Cl)({},u),{stages:l,i:i,k:e})):function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight,c=l/o.length,d=o[e],f=o[e+1]||{subValues:[]},v=u[e]||1,h=u[e+1]||0,p=0,g=0,y=function(t){var i=d.subValues[t],e=null===(n=f.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;p+=r/v*(v/a)*s,g+=(o/h||0)*(h/a)*s},m=0;m<r;m++)y(m);var b,x,w,M=d.subValues[r],C=null===(i=f.subValues)||void 0===i?void 0:i.find((function(t){return t.category===M.category})),k=M.value,A=C?C.value:0,S=k/v*(v/a)*s,L=(A/h||0)*(h/a)*s,D=e*c,V=(e+1)*c,N=(s-v/a*s)/2+p,O=N+S,T=(s-h/a*s)/2+g,E=T+L;return e===o.length-1?(b=D+.25*(V-D),x=(N+O)/2,w=.5*(V-D)*.8,(S<24||S*c/2<600)&&(w=0)):(b=(D+V)/2,x=(N+O+T+E)/4,w=.9*Math.abs(V-D),(S+L)/2<20&&(w=0)),{pathD:"M".concat(D,",").concat(N,"\n L").concat(V,",").concat(T,"\n L").concat(V,",").concat(E,"\n L").concat(D,",").concat(O,"\n Z"),textX:b,textY:x,availableWidth:w}}((0,o.Cl)((0,o.Cl)({},u),{stages:l,i:i,k:e})),c=H({stage:t.stage,subValue:n}),d=eg((0,o.Cl)({availableWidth:s.availableWidth,minTextWidth:16,textX:s.textX,textY:s.textY,value:n.value},c));return I({key:"".concat(i,"-").concat(e),pathD:s.pathD,fill:n.color,opacity:W(a.data)&&P(n.category)||_()?1:.1,textProps:d,data:{stage:t.stage,subValue:n},isFocusable:!!(W(a.data)&&P(n.category)||_())})}var z=(0,o.Cl)({isCalloutVisible:y,directionalHint:3,id:"toolTip".concat(s),target:C,color:null==x?void 0:x.color,XValue:null==x?void 0:x.stage,YValue:null==x?void 0:x.value,isBeakVisible:!1,gapSpace:15,onDismiss:function(){m(!1)},preventDismissOnLostFocus:!0},a.calloutProps),j=a.width||350,$=a.height||500,Y=rg(a.styles,{theme:a.theme,className:a.className,chartWidth:j,chartHeight:$}),X=.8*j,G=(j-X)/2;return a.data&&a.data.length>0?u.createElement("div",{ref:D,className:Y.root},u.createElement(Xc,{direction:rc.horizontal},u.createElement("svg",{width:j,height:$,className:Y.chart,role:"img","aria-label":a.chartTitle},u.createElement("g",{transform:d?"translate(".concat(G+X,", ").concat(40,") scale(-1,1)"):"translate(".concat(G,", ").concat(40,")")},N?function(t,n){for(var i,e,r=a.data,o=r.map((function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.subValues)||void 0===n?void 0:n.reduce((function(t,n){return t+n.value}),0))&&void 0!==i?i:0})),u=[],l={stages:r,totals:o,maxTotal:Math.max.apply(Math,o),funnelWidth:n,funnelHeight:.8*t,isRTL:d},s=0;s<r.length;s++)for(var c=r[s],f=0;f<(null!==(i=c.subValues)&&void 0!==i?i:[]).length;f++){var v=null===(e=c.subValues)||void 0===e?void 0:e[f];v&&u.push(R(c,v,s,f,l))}return u}($-40,X):function(t,n){var i=a.data,e=n,u=.8*t;return i.map((function(t,n){var a="vertical"===r?function(t){var n=t.d,i=t.i,e=t.data,r=t.funnelWidth,o=t.isRTL,u=t.funnelHeight/e.length,a=function(t){return t/Math.max.apply(Math,e.map((function(t){return t.value})))*r},l=a(n.value),s=i<e.length-1?a(e[i+1].value):0,c=(r-l)/2,d=(r-s)/2,f=o?r-c:c,v=o?r-d:d,h=i===e.length-1,p=h?i*u+.33*u:i*u+u/2,g=r/2,y=l;if(h){var m=l*(1-(p-i*u)/u);y=Math.max(.8*m,0)}else y=.9*Math.min(l,s);return{pathD:"M".concat(f,",").concat(i*u,"\n L").concat(r-f,",").concat(i*u,"\n L").concat(r-v,",").concat((i+1)*u,"\n L").concat(v,",").concat((i+1)*u,"\n Z"),textX:g,textY:p,availableWidth:y}}({d:t,i:n,data:i,funnelWidth:e,funnelHeight:u,isRTL:d}):function(t){var n,i,e=t.d,r=t.i,o=t.data,u=t.funnelHeight,a=t.funnelWidth/o.length,l=function(t){return t/Math.max.apply(Math,o.map((function(t){return t.value})))*u},s=l(e.value),c=r<o.length-1?l(o[r+1].value):0,d=(u-s)/2,f=(u-c)/2,v=r*a,h=(r+1)*a,p=.8*a;return r===o.length-1?(n=v+.25*(h-v),i=u/2,p=s<40||s*a/2<800?0:.75*(h-v)*.6):(n=(v+h)/2,i=u/2,p=Math.min(s,c)>20?.8*a:0),{pathD:"M".concat(v,",").concat(d,"\n L").concat(h,",").concat(f,"\n L").concat(h,",").concat(u-f,"\n L").concat(v,",").concat(u-d,"\n Z"),textX:n,textY:i,availableWidth:p}}({d:t,i:n,data:i,funnelWidth:e,funnelHeight:u,isRTL:d}),l=a.pathD,s=a.textX,c=a.textY,f=a.availableWidth,v=H(t),h=eg((0,o.Cl)({availableWidth:f,minTextWidth:16,textX:s,textY:c,value:t.value},v));return I({key:n,pathD:l,fill:t.color,opacity:P(t.stage)||_()?1:.1,textProps:h,data:t,isFocusable:!(!P(t.stage)&&!_())})}))}($-40,X)),y&&u.createElement($n,(0,o.Cl)({},z),u.createElement(pc.ChartHoverCard,{XValue:null==z?void 0:z.XValue,YValue:null==z?void 0:z.YValue,color:null==z?void 0:z.color})))),function(){if(a.hideLegend)return u.createElement(u.Fragment,null);var t;if(N){var n={};a.data.forEach((function(t){(t.subValues||[]).forEach((function(t){t.category in n||(n[t.category]=t.color)}))})),t=Object.entries(n).map((function(t){var n=t[0],i=t[1];return{title:n,color:i,hoverAction:function(){return h(n)},onMouseOutAction:function(){return h(null)}}}))}else t=a.data.map((function(t){return{title:t.stage,color:t.color,hoverAction:function(){return h(t.stage)},onMouseOutAction:function(){return h(null)}}}));return u.createElement("div",{style:{display:"flex",justifyContent:"center"}},u.createElement(df,(0,o.Cl)({ref:V,legends:t,centerLegends:!0,onChange:F},a.legendProps)))}()):u.createElement("div",{id:c,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));og.displayName="FunnelChart";var ug,ag,lg=(0,r.I)(og,(function(t){var n=t.theme,i=t.className,e=t.chartWidth,r=t.chartHeight;return{root:[n.fonts.medium,"ms-FunnelChart",{alignItems:"center",width:"100%",height:"100%"},i],chart:{display:"block",width:e,height:r},text:[n.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary}],subComponentStyles:{calloutStyles:{root:{maxWidth:"238px"}}}}}));!function(t){t.Percentage="percentage",t.Fraction="fraction"}(ug||(ug={})),function(t){t.SingleSegment="single-segment",t.MultipleSegments="multiple-segments"}(ag||(ag={}));var sg=[{minRadius:52,arcWidth:12,fontSize:20},{minRadius:70,arcWidth:16,fontSize:24},{minRadius:88,arcWidth:20,fontSize:32},{minRadius:106,arcWidth:24,fontSize:32},{minRadius:124,arcWidth:28,fontSize:40},{minRadius:142,arcWidth:32,fontSize:40}],cg=(0,a.Z)(),dg=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0===n&&e===ag.SingleSegment?"".concat(t.legend,", ").concat(t.size," out of ").concat(i," or ").concat((t.size/i*100).toFixed(),"%"):"".concat(t.legend,", ").concat(t.start," to ").concat(t.end):0===n&&e===ag.SingleSegment?"".concat(t.size," (").concat((t.size/i*100).toFixed(),"%)"):"".concat(t.start," - ").concat(t.end)},fg=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0!==n?t.toString():e===ug.Fraction?"".concat((t/i*100).toFixed(),"%"):"".concat(t,"/").concat(i):"function"==typeof e?e([t-n,i-n]):0!==n?t.toString():e===ug.Fraction?"".concat(t,"/").concat(i):"".concat((t/i*100).toFixed(),"%")},vg=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Jd([{container:e._rootElem}],e.props.hideLegend||null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,e._isRTL,t)},e._getMargins=function(){var t=e.props,n=t.hideMinMax;return{left:16+(n?0:40),right:16+(n?0:40),top:16+(t.chartTitle?27:2),bottom:16+(t.sublabel?20:0)}},e._getStylesBasedOnBreakpoint=function(){for(var t=sg.length-1;t>=0;t-=1)if(e._outerRadius>=sg[t].minRadius)return{arcWidth:sg[t].arcWidth,chartValueSize:sg[t].fontSize};return{arcWidth:sg[0].arcWidth,chartValueSize:sg[0].fontSize}},e._processProps=function(){var t=e.props,n=t.minValue,i=void 0===n?0:n,r=t.maxValue,o=t.theme,u=i,a=e.props.segments.map((function(t,n){var i,e=Math.max(t.size,0);return u+=e,{legend:t.legend,size:e,color:void 0!==t.color?cs(t.color,o.isInverted):ss(n,0,o.isInverted),gradient:null!==(i=t.gradient)&&void 0!==i?i:Mc(n,0,o.isInverted),accessibilityData:t.accessibilityData,start:u-e,end:u}}));void 0!==r&&u<r&&(a.push({legend:"Unknown",size:r-u,color:o.palette.neutralLight,start:u,end:r}),u=r);var l=zf().cornerRadius(e.props.roundCorners?3:0).padAngle(2/e._outerRadius).padRadius(e._outerRadius),s=e._isRTL?Array.from(a).reverse():a,c=-Math.PI/2,d=s.map((function(t,n){var r=c+t.size/(u-i)*Math.PI,o=l({innerRadius:e._innerRadius,outerRadius:e._outerRadius,startAngle:c,endAngle:r});return c=r,{d:o,segmentIndex:e._isRTL?a.length-1-n:n,startAngle:c-t.size/(u-i)*Math.PI,endAngle:r}}));return e._minValue=i,e._maxValue=u,e._segments=a,{arcs:d}},e._renderNeedle=function(){var t=function(t,n,i){var e=(t-n)/(i-n)*180;return e<0?e=0:e>180&&(e=180),e}(e.props.chartValue,e._minValue,e._maxValue),n=e._isRTL?180-t:t,i=e._outerRadius-e._innerRadius+4;return u.createElement("g",{transform:"rotate(".concat(n,", 0, 0)")},u.createElement("path",{d:"\n M 0,".concat(-4,"\n L ").concat(-i,",").concat(-2,"\n A ").concat(2,",").concat(2,",0,0,0,").concat(-i,",").concat(2,"\n L 0,").concat(4,"\n A ").concat(4,",").concat(4,",0,0,0,0,").concat(-4,"\n "),strokeWidth:2,className:e._classNames.needle,transform:"translate(".concat(2-e._innerRadius,")"),"data-is-focusable":!0,onFocus:function(t){return e._handleFocus(t,"Needle")},onBlur:e._handleBlur,onMouseEnter:function(t){return e._handleMouseOver(t,"Needle")},onMouseMove:function(t){return e._handleMouseOver(t,"Needle")},role:"img","aria-label":"Current value: "+fg(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat)}))},e._renderLegends=function(){if(e.props.hideLegend)return null;var t=e._segments.map((function(t,n){var i,r=e.props.enableGradient?(null===(i=t.gradient)||void 0===i?void 0:i[0])||Mc(n,0,e.props.theme.isInverted)[0]:t.color||ss(n,0,e.props.theme.isInverted);return{title:t.legend,color:r,hoverAction:function(){e.setState({hoveredLegend:t.legend})},onMouseOutAction:function(){e.setState({hoveredLegend:""})}}}));return u.createElement("div",{className:e._classNames.legendsContainer},u.createElement(df,(0,o.Cl)({legends:t,centerLegends:!0},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef})))},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._handleFocus=function(t,n){e._showCallout(t.target,n,!0)},e._handleBlur=function(){e._hideCallout(!0)},e._handleMouseOver=function(t,n){e._showCallout(t.target,n,!1)},e._handleMouseOut=function(){e._hideCallout(!1)},e._handleCalloutDismiss=function(){e._hideCallout(!1)},e._showCallout=function(t,n,i){if(e._calloutAnchor!==n){e._calloutAnchor=n;var r="Current value is "+fg(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat,!0),u=e._segments.map((function(t){var n;return{legend:t.legend,y:dg(t,e._minValue,e._maxValue,e.props.variant),color:e.props.enableGradient?null===(n=t.gradient)||void 0===n?void 0:n[0]:t.color}}));e.setState((0,o.Cl)({calloutTarget:t,isCalloutVisible:["Needle","Chart value"].includes(n)||e._noLegendHighlighted()||e._legendHighlighted(n),hoverXValue:r,hoverYValues:u},i?{focusedElement:n}:{}))}},e._hideCallout=function(t){e._calloutAnchor="",e.setState((0,o.Cl)({calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[]},t?{focusedElement:""}:{}))},e._wrapContent=function(t,n,i){var e=sl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},e._multiValueCallout=function(t){var n=e._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:e._classNames.calloutContentRoot},u.createElement("div",{className:e._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:e._classNames.calloutContentX},Rs(t.xAxisCalloutAccessibilityData,"text",!1)),(0,Yn.c$)(t.hoverXValue,e.props.culture))),u.createElement("div",{className:e._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,r){var a=i+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},Rs(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),e._getCalloutContent(t,i,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:e._classNames.descriptionMessage},t.descriptionMessage)))},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Gauge chart with ".concat(e._segments.length," segments. ")},Ac(e),e._margins=e._getMargins(),e._legendsHeight=n.hideLegend?0:24,e.state={hoveredLegend:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],focusedElement:"",calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[],width:140+e._margins.left+e._margins.right,height:70+e._margins.top+e._margins.bottom+e._legendsHeight},e._isRTL=(0,l.jI)(n.theme),e._calloutAnchor="",e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._rootElem&&this.setState({width:this._rootElem.clientWidth,height:this._rootElem.clientHeight})},n.prototype.componentDidUpdate=function(t){var n,i,e;Gs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._margins=this._getMargins(),this._legendsHeight=this.props.hideLegend?0:24;var n=this.props.width||this.state.width,i=this.props.height||this.state.height;this._outerRadius=Math.min((n-(this._margins.left+this._margins.right))/2,i-(this._margins.top+this._margins.bottom+this._legendsHeight));var e=this._getStylesBasedOnBreakpoint(),r=e.arcWidth,a=e.chartValueSize;this._innerRadius=this._outerRadius-r;var l=this._processProps().arcs;return this._classNames=cg(this.props.styles,{theme:this.props.theme,className:this.props.className,chartValueSize:a}),u.createElement("div",{className:this._classNames.root,ref:function(n){t._rootElem=n}},u.createElement(Xc,{direction:rc.horizontal,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,role:"region","aria-label":this._getChartTitle(),onMouseLeave:this._handleMouseOut,width:n,height:i-this._legendsHeight},u.createElement("g",{transform:"translate(".concat(n/2,", ").concat(i-(this._margins.bottom+this._legendsHeight),")")},this.props.chartTitle&&u.createElement("text",{x:0,y:-(this._outerRadius+11),textAnchor:"middle",className:this._classNames.chartTitle,"aria-hidden":!0},this.props.chartTitle),!this.props.hideMinMax&&u.createElement(u.Fragment,null,u.createElement("text",{x:(this._isRTL?1:-1)*(this._outerRadius+4),y:0,textAnchor:"end",className:this._classNames.limits,role:"img","aria-label":"Min value: ".concat(this._minValue)},zs(this._minValue)),u.createElement("text",{x:(this._isRTL?-1:1)*(this._outerRadius+4),y:0,textAnchor:"start",className:this._classNames.limits,role:"img","aria-label":"Max value: ".concat(this._maxValue)},zs(this._maxValue))),l.map((function(n,i){var e,r,a=t._segments[n.segmentIndex],l=p("Arc_clip")+"".concat(i,"_").concat(n.startAngle,"_").concat(n.endAngle),s=cg(t.props.styles,{theme:t.props.theme,solidFill:t.props.enableGradient?"transparent":a.color,gradientFill:"conic-gradient(\n from ".concat(n.startAngle,"rad at 50% 100%,\n ").concat(null===(e=a.gradient)||void 0===e?void 0:e[0],",\n ").concat(null===(r=a.gradient)||void 0===r?void 0:r[1]," ").concat(n.endAngle-n.startAngle,"rad\n )"),opacity:t._legendHighlighted(a.legend)||t._noLegendHighlighted()?1:.1});return u.createElement(u.Fragment,{key:i},u.createElement("path",(0,o.Cl)({d:n.d,strokeWidth:t.state.focusedElement===a.legend?2:0,className:s.segment},Rs((0,o.Cl)({ariaLabel:dg(a,t._minValue,t._maxValue,t.props.variant,!0)},a.accessibilityData),"img",!0),{onFocus:function(n){return t._handleFocus(n,a.legend)},onBlur:t._handleBlur,onMouseEnter:function(n){return t._handleMouseOver(n,a.legend)},onMouseMove:function(n){return t._handleMouseOver(n,a.legend)},"data-is-focusable":t._legendHighlighted(a.legend)||t._noLegendHighlighted()})),t.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:l},u.createElement("path",{d:n.d})),u.createElement("foreignObject",{x:"-50%",y:"-100%",width:"100%",height:"100%",clipPath:"url(#".concat(l,")")},u.createElement("div",{className:s.gradientSegment}))))})),this._renderNeedle(),u.createElement("g",{onMouseEnter:function(n){return t._handleMouseOver(n,"Chart value")},onMouseMove:function(n){return t._handleMouseOver(n,"Chart value")}},u.createElement(sv,{content:fg(this.props.chartValue,this._minValue,this._maxValue,this.props.chartValueFormat),textProps:{x:0,y:0,textAnchor:"middle",className:this._classNames.chartValue,"aria-hidden":"true"},maxWidth:2*this._innerRadius-24,wrapContent:this._wrapContent})),this.props.sublabel&&u.createElement(sv,{content:this.props.sublabel,textProps:{x:0,y:4,textAnchor:"middle",dominantBaseline:"hanging",className:this._classNames.sublabel},maxWidth:2*this._innerRadius,wrapContent:this._wrapContent})))),this._renderLegends(),!this.props.hideTooltip&&this.state.isCalloutVisible&&u.createElement($n,(0,o.Cl)({target:this.state.calloutTarget,directionalHint:3,gapSpace:15,isBeakVisible:!1,onDismiss:this._handleCalloutDismiss},this.props.calloutProps),this._multiValueCallout({hoverXValue:this.state.hoverXValue,YValueHover:this.state.hoverYValues})))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.hoveredLegend?[this.state.hoveredLegend]:[]},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r=e?{}:{marginRight:"16px"},o=void 0!==t.index&&-1!==t.index,a=cg(this.props.styles,{theme:this.props.theme,lineColor:t.color,toDrawShape:o}),l=this.props.culture,s=(0,Yn.c$)(t.y,l);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var c=t.yAxisCalloutData;return u.createElement("div",{style:r},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),Object.keys(c).map((function(t){return u.createElement("div",{key:t,className:a.calloutBlockContainer},u.createElement("div",{className:a.calloutlegendText}," ",(0,Yn.c$)(t,l)),u.createElement("div",{className:a.calloutContentY},(0,Yn.c$)(c[t],l)))})))}return u.createElement("div",{style:i?r:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:a.calloutBlockContainer},o&&u.createElement(Zd,{svgProps:{className:a.shapeStyles},pathProps:{fill:t.color},shape:_s[t.index%Object.keys(Ws).length]}),u.createElement("div",null,u.createElement("div",{className:a.calloutlegendText}," ",t.legend),u.createElement("div",{className:a.calloutContentY},(0,Yn.c$)(t.yAxisCalloutData?t.yAxisCalloutData:t.y||t.data,l)))))},n}(u.Component),hg=(0,r.I)(vg,(function(t){var n,i,e,r,u,a,l,s,c=t.theme,d=t.chartValueSize,f=t.className,v=t.lineColor,h=t.toDrawShape,p=t.solidFill,g=t.gradientFill,y=t.opacity;return{root:[c.fonts.medium,"ms-GaugeChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},f],chart:{display:"block"},limits:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartValue:{fontSize:d,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(i={},i[It.up]={fill:"CanvasText"},i)},sublabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(e={},e[It.up]={fill:"CanvasText"},e)},needle:{fill:c.palette.black,stroke:c.semanticColors.bodyBackground},chartTitle:{fontSize:It.s.small,fill:c.palette.neutralPrimary,selectors:(r={},r[It.up]={fill:"CanvasText"},r)},segment:{outline:"none",stroke:c.semanticColors.focusBorder,fill:p,fillOpacity:y},gradientSegment:{width:"100%",height:"100%",background:g,opacity:y},legendsContainer:{width:"100%"},calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:c.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",opacity:"0.85",color:c.semanticColors.bodySubtext})],calloutBlockContainer:[c.fonts.mediumPlus,{marginTop:"13px",color:c.semanticColors.bodyText},!h&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(v),paddingLeft:"8px"},h&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:c.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},c.fonts.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[c.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:c.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(c.semanticColors.menuDivider)}]}})),pg=i(927),gg=u.createContext(void 0),yg=function(){var t=u.useContext(gg),n=(0,pg.m)(["theme"]).theme;return t||n||(0,pn.a)({})},mg=function(t){var n=t.annotations,i=t.chartTitle,e=t.description,r=t.width,o=t.height,a=t.paperBackgroundColor,s=t.plotBackgroundColor,c=t.fontColor,d=t.fontFamily,f=t.margin,v=t.componentRef,h=yg(),p=u.useRef(null),g=u.useRef(null),y=u.useState(null!=r?r:0),m=y[0],b=y[1],x=u.useState(null!=o?o:650),w=x[0],M=x[1];u.useEffect((function(){if("number"==typeof r&&r>0)b(r);else{var t=p.current;if(t&&"undefined"!=typeof ResizeObserver){var n=new ResizeObserver((function(t){var n=t[0];if(n){var i=n.contentRect.width;i>0&&Math.abs(i-m)>.5&&b(i)}})),i=t.getBoundingClientRect();return i.width>0&&b(i.width),n.observe(t),function(){return n.disconnect()}}var e=null==t?void 0:t.getBoundingClientRect();e&&e.width>0?b(e.width):b((function(t){return t>0?t:400}))}}),[r,m]);var C=Math.max(m||400,1),k=Math.max(null!=o?o:650,1);u.useEffect((function(){var t=g.current;if(t){if("undefined"!=typeof ResizeObserver){var n=new ResizeObserver((function(t){var n=t[0];if(n){var i=n.contentRect.height;i>0&&M((function(t){return Math.abs(t-i)>.5?i:t}))}})),i=t.getBoundingClientRect();return M((function(t){return i.height>0?i.height:t>0?t:k})),n.observe(t),function(){return n.disconnect()}}var e=t.getBoundingClientRect();M((function(t){return e.height>0?e.height:t>0?t:k}))}else M((function(t){return t>0?t:k}))}),[k,C,n,i,e,f,s,a,c,d,h]);var A=Math.max(Math.ceil(w||0),k),S={plotRect:{x:0,y:0,width:C,height:k},svgRect:{width:C,height:k},isRtl:null==h?void 0:h.rtl},L=function(t){var n,i,e,r;if(t){var o=null!==(n=t.t)&&void 0!==n?n:0,u=null!==(i=t.r)&&void 0!==i?i:0,a=null!==(e=t.b)&&void 0!==e?e:0,l=null!==(r=t.l)&&void 0!==r?r:0;if(0!==o||0!==u||0!==a||0!==l)return"".concat(o,"px ").concat(u,"px ").concat(a,"px ").concat(l,"px")}}(f),D=u.useMemo((function(){return(0,It.Zq)({position:"relative",width:r?"".concat(r,"px"):"100%",minHeight:k,backgroundColor:null!=a?a:h.semanticColors.bodyBackground,color:null!=c?c:h.semanticColors.bodyText,fontFamily:null!=d?d:h.fonts.medium.fontFamily,padding:L,display:"flex",flexDirection:"column",rowGap:"8px"})}),[c,d,a,L,k,h,r]),V=u.useMemo((function(){var t;return(0,It.Zq)({position:"relative",flexGrow:1,backgroundColor:null!=s?s:"transparent",borderRadius:null!==(t=h.effects.roundedCorner2)&&void 0!==t?t:4,boxSizing:"border-box"})}),[s,h.effects.roundedCorner2]),N=u.useMemo((function(){return(0,It.Zq)({textAlign:"center"})}),[]),O=null!=n?n:[],T=O.length>0,E=T?null!=e?e:i:void 0;return u.useImperativeHandle(v,(function(){return{chartContainer:p.current,toImage:function(t){return Jd([{container:p.current}],void 0,(0,l.jI)(),t)}}}),[]),u.createElement("div",{ref:p,"data-chart-annotation-container":"true"},u.createElement("svg",{width:C,height:A,viewBox:"0 0 ".concat(C," ").concat(A),style:{width:r?"".concat(r,"px"):"100%",height:"".concat(A,"px"),display:"block"},role:E?"img":void 0,"aria-label":E},u.createElement("foreignObject",{x:0,y:0,width:C,height:A},u.createElement("div",{ref:g,className:D,"data-chart-annotation-only":"true","aria-label":E},i&&u.createElement("span",{className:N,"aria-hidden":"true"},i),u.createElement("div",{className:V,role:"presentation"},T?u.createElement(Cv,{annotations:O,context:S,theme:h}):null)))))};mg.displayName="AnnotationOnlyChart";var bg=Array.prototype,xg=bg.slice;function wg(t){return()=>t}function Mg(t){return t}function Cg(t){return Math.max(1,Math.ceil(Math.log(function(t){let n=0;for(let i of t)null!=i&&(i=+i)>=i&&++n;return n}(t))/Math.LN2)+1)}function kg(t,n,i){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-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Ag(t,n){this._context=t,this._k=(1-n)/6}bg.map,Ag.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:kg(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:kg(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Sg=function t(n){function i(t){return new Ag(t,n)}return i.tension=function(n){return t(+n)},i}(0),Lg=["#636efa","#ef553b","#00cc96","#ab63fa","#ffa15a","#19d3f3","#ff6692","#b6e880","#ff97ff","#fecb52"],Dg=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Vg=[es.color1,es.warning,es.color8,es.color4,es.color7,es.color6,es.color2,es.color5,es.color9,es.color10],Ng=[es.color26,es.warning,es.color5,es.error,es.color4,es.color17,es.color22,es.disabled,es.color10,es.color3];function Og(t,n){if(void 0===n&&(n=!1),!t||!Il(t))return"others";var i=t.map((function(t){return t.toLowerCase()}));return n&&Gs(i,Ng)?"d3":Gs(i,Lg)?"plotly":"others"}function Tg(t,n,i,e){if("plotly"!==n)return t;var r=Lg,o=Vg;e&&(r="plotly"===n?Lg:Dg,o="plotly"===n?Vg:Ng);var u=r.indexOf(t.toLowerCase());return-1!==u?cs(o[u],!!i):t}var Eg=function(t,n,i,e,r){if(!n.current.has(t)){var o,u=r?"plotly"===i?Vg:Ng:Vg;return o=n.current.size<u.length?cs(u[n.current.size],e):ss(n.current.size,0,e),n.current.set(t,o),o}return n.current.get(t)},Fg=function(t,n,i,e,r,o){return"default"===n&&i?function(t,n,i,e,r){var o=[];if(n){var u=Og(t,r);if(Il(n))n.forEach((function(t,n){var a=null==t?void 0:t.toString().trim(),l=Eg("Label_".concat(n),i,u,e,r);if(a){var s=Eo(a);o.push(s?Tg(s.formatHex(),u,e):l)}else o.push(l)}));else if("string"==typeof n){var a=Eo(n);return a?Tg(a.formatHex(),u,e):Eg("Label_0",i,u,e,r)}return o}}(t,i,e,r,o):void 0},Bg=function(t,n,i,e,r,o,u){var a=Og(r,u);return t&&Il(t)&&t.length>0?t[n%t.length]:"string"==typeof t?t:Eg(i,e,a,o,u)},Pg=function(t,n){var i,e,r,o,u,a;return(null===(i=t.marker)||void 0===i?void 0:i.opacity)?Il(null===(e=t.marker)||void 0===e?void 0:e.opacity)?(null===(r=t.marker)||void 0===r?void 0:r.opacity)[n%(null===(o=t.marker)||void 0===o?void 0:o.opacity).length]:null===(u=t.marker)||void 0===u?void 0:u.opacity:null!==(a=t.opacity)&&void 0!==a?a:1},_g=function(t,n,i){var e,r,o,u,a,l,s,c,d,f,v,h;if((null===(r=null===(e=null==t?void 0:t.coloraxis)||void 0===e?void 0:e.colorscale)||void 0===r?void 0:r.length)&&Il(null===(o=n.marker)||void 0===o?void 0:o.color)&&(null===(u=n.marker)||void 0===u?void 0:u.color).length>0&&"number"==typeof(null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[0])){var p=null===(s=null==t?void 0:t.coloraxis)||void 0===s?void 0:s.colorscale,g=null===(c=n.marker)||void 0===c?void 0:c.color,y=[null!==(f=null===(d=null==t?void 0:t.coloraxis)||void 0===d?void 0:d.cmin)&&void 0!==f?f:Math.min.apply(Math,g),null!==(h=null===(v=null==t?void 0:t.coloraxis)||void 0===v?void 0:v.cmax)&&void 0!==h?h:Math.max.apply(Math,g)],m=y[0],b=y[1],x=p.map((function(t){var n=t[0];return m+n*(b-m)})),w=p.map((function(t){return t[1]}));return Gu().domain(x).range(w)}return i},Hg="nonplot_",Ig="repeat(1, 1fr)",Wg={dot:{strokeDasharray:"1, 5",strokeLinecap:"round",strokeWidth:"2",lineBorderWidth:"4"},dash:{strokeDasharray:"5, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdash:{strokeDasharray:"10, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},dashdot:{strokeDasharray:"5, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdashdot:{strokeDasharray:"10, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},solid:{strokeDasharray:"0",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"}};function Rg(t){var n,i,e,r,o,u,a,l,s,c,d,f;return{chartTitle:"string"==typeof(null==t?void 0:t.title)?t.title:null!==(i=null===(n=null==t?void 0:t.title)||void 0===n?void 0:n.text)&&void 0!==i?i:"",xAxisTitle:"string"==typeof(null===(e=null==t?void 0:t.xaxis)||void 0===e?void 0:e.title)?null===(r=null==t?void 0:t.xaxis)||void 0===r?void 0:r.title:null!==(a=null===(u=null===(o=null==t?void 0:t.xaxis)||void 0===o?void 0:o.title)||void 0===u?void 0:u.text)&&void 0!==a?a:"",yAxisTitle:"string"==typeof(null===(l=null==t?void 0:t.yaxis)||void 0===l?void 0:l.title)?null===(s=null==t?void 0:t.yaxis)||void 0===s?void 0:s.title:null!==(f=null===(d=null===(c=null==t?void 0:t.yaxis)||void 0===c?void 0:c.title)||void 0===d?void 0:d.text)&&void 0!==f?f:""}}var zg=function(t,n){var i=Xg(t,n);return(null==i?void 0:i.tickformat)?{tickFormat:null==i?void 0:i.tickformat}:{}},jg=function(t,n){var i=Yg(t,n);return(null==i?void 0:i.tickformat)?{yAxisTickFormat:ju(null==i?void 0:i.tickformat)}:{}},$g=function(t,n){var i,e=null===(i=Yg(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{yMinValue:e[0],yMaxValue:e[1]}:{}},Yg=function(t,n){return null==n?void 0:n.yaxis},Xg=function(t,n){return null==n?void 0:n.xaxis},Gg=function(t,n){return"function"==typeof(null==n?void 0:n.yAxisTickFormat)&&"number"==typeof t?n.yAxisTickFormat(t):(0,Yn.c$)(t)},Ug=function(t){var n=(new Date).getFullYear();if(t.length>0&&Array.isArray(t[0]))throw new Error("updateXValues:: 2D array not supported");for(var i=t.map((function(t){var i="".concat(t," 01, ").concat(n);return Vl(i)?new Date(i):null})),e=i.map((function(t,n){return[t,n]})).filter((function(t){return null!==t[0]})),r=e.length-1;r>0;r--){var o=e[r][0],u=e[r-1][0],a=o.getMonth(),l=u.getMonth(),s=o.getFullYear(),c=u.getFullYear();l>=a?e[r-1][0].setFullYear(s-1):c>s&&e[r-1][0].setFullYear(s),i[e[r-1][1]]=e[r-1][0]}return t.map((function(t,n){return null===i[n]?null:"".concat(t," 01, ").concat(i[n].getFullYear())}))},qg=function(t,n){var i,e;return"y2"===t.yaxis&&("x"===(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.anchor)||"right"===(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.side))},Zg=function(t,n){var i,e,r,o,u,a,l=!1,s=!0;return t.forEach((function(t){if(qg(t,n)){l=!0;var i=t.y;i&&(u=Math.min.apply(Math,i),a=Math.max.apply(Math,i)),("scatter"!==t.type||ql(t))&&(s=!1)}})),l?(s||("number"==typeof u&&(u=Math.min(u,0)),"number"==typeof a&&(a=Math.max(a,0))),(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.range)&&(u=n.yaxis2.range[0],a=n.yaxis2.range[1]),{secondaryYAxistitle:"string"==typeof(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.title)?n.yaxis2.title:"string"==typeof(null===(o=null===(r=null==n?void 0:n.yaxis2)||void 0===r?void 0:r.title)||void 0===o?void 0:o.text)?n.yaxis2.title.text:void 0,secondaryYScaleOptions:{yMinValue:u,yMaxValue:a}}):{}},Kg=function(t,n,i,e,r){var o=Fg(t,n,i,e,r);return Bg(o,0,"",e,t,r)},Jg=function(t){return Array.from(new Set((null!=t?t:[]).flatMap((function(t){var n=t.x;return n&&Array.isArray(n)?n.flat().map((function(t){return t})):[]})).filter((function(t){return null!=t}))))},Qg=function(t,n){void 0===n&&(n="");var i={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=n?"".concat(n,".").concat(e):e,o=t[e];"object"!=typeof o||null===o||Array.isArray(o)||o instanceof Date?i[r]=o:Object.assign(i,Qg(o,r))}return i},ty=function(t){if(null!=t){var n="number"==typeof t?t:Number(t);return Number.isFinite(n)?n:void 0}},ny=function(t,n){if(!t)return n;var i=t.toLowerCase();if(i===n||i==="".concat(n,"axis")||i==="".concat(n,"axis1")||i==="".concat(n,"1"))return n;var e=i.match(/^([xy])(axis)?(\d+)$/);return e&&e[1]===n&&e[3]?"1"===e[3]?n:"".concat(n).concat(e[3]):i},iy=function(t,n,i,e){if(e&&0!==e.length){var r,o,u=ly(i,n,t),a=ny(n,t),l="x"===t?"xaxis":"yaxis";if(e.forEach((function(n){var i=n;if(ny(i[l],t)===a){var e="x"===t?i.x:i.y;if(Il(e))for(var s=e,c=0;c<s.length;c++){var d=s[c],f=cy(sy(d,u));void 0===f||Number.isNaN(f)||(r=void 0===r?f:Math.min(r,f),o=void 0===o?f:Math.max(o,f))}}})),void 0!==r&&void 0!==o&&r!==o)return[r,o]}},ey=function(t){if(void 0!==t&&Number.isFinite(t))return 1-t},ry=function(t){switch((null!=t?t:"").toLowerCase()){case"left":return"start";case"center":return"center";case"right":return"end";default:return}},oy=function(t){switch((null!=t?t:"").toLowerCase()){case"top":return"top";case"middle":return"middle";case"bottom":return"bottom";default:return}},uy=function(t){if(null!=t)return"string"==typeof t?t:"number"==typeof t&&Number.isFinite(t)?"".concat(t,"px"):void 0},ay=function(t,n){if(!t)return"axis";var i=t.toLowerCase();if("pixel"===i)return"pixel";if("paper"===i)return"relative";if(i.endsWith(" domain"))return i.startsWith(n)?"relative":void 0;var e=i.match(/^([xy])(\d*)$/);return e&&e[1]===n?"axis":void 0},ly=function(t,n,i){if(t){var e="".concat(i,"axis");if(!n)return t[e];var r=n.toLowerCase();if("paper"===r||"pixel"===r||r.endsWith(" domain"))return t[e];var o=r.match(/^([xy])(\d*)$/);if(o&&o[1]===i){var u=o[2];return u&&""!==u&&"1"!==u?t["".concat(i,"axis").concat(u)]:t[e]}return t[e]}},sy=function(t,n){if(null!=t){if("date"===(null==n?void 0:n.type)||Vl(t)){var i=t instanceof Date?t:new Date(t);return Number.isNaN(i.getTime())?void 0:i}if("number"==typeof t)return t;if("linear"===(null==n?void 0:n.type)||"log"===(null==n?void 0:n.type)){var e=Number(t);return Number.isFinite(e)?e:void 0}return Date,t}},cy=function(t){if(t instanceof Date){var n=t.getTime();return Number.isFinite(n)?n:void 0}if("number"==typeof t)return Number.isFinite(t)?t:void 0;if("string"==typeof t){var i=Number(t);return Number.isFinite(i)?i:void 0}},dy=function(t,n,i){var e=Array.isArray(null==n?void 0:n.range)?n.range:void 0,r=e&&e.length>=2?cy(sy(e[0],n)):void 0,o=e&&e.length>=2?cy(sy(e[1],n)):void 0;void 0!==r&&void 0!==o&&r!==o||!i||(r=i[0],o=i[1]);var u=cy(sy(t,n));if(void 0!==r&&void 0!==o&&void 0!==u&&r!==o){var a=(u-r)/(o-r);return Number.isFinite(a)?a:void 0}},fy=function(t,n){var i=t.replace(/\s+/g," ").trim();if(i){var e=i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32);if(e)return"annotation-".concat(n,"-").concat(e)}return"annotation-".concat(n)},vy=function(t){var n=!1,i=!1,e="string"==typeof(null==t?void 0:t.arrowside)?null==t?void 0:t.arrowside.toLowerCase():void 0;e&&(n=e.includes("start"),i=e.includes("end"));var r=ty(null==t?void 0:t.arrowhead),o=ty(t.startarrowhead);return void 0!==r&&r>0&&(i=!0),void 0!==o&&o>0&&(n=!0),n&&i?"both":n?"start":i?"end":"none"},hy=function(t,n,i){if(!i&&(null==t?void 0:t.annotations)){var e=(Array.isArray(t.annotations)?t.annotations:[t.annotations]).map((function(i,e){return function(t,n,i,e){var r;if(t&&!1!==t.visible){var u=ay(t.xref,"x"),a=ay(t.yref,"y");if(u&&a){var l;if("axis"===u&&"axis"===a){var s=ly(n,t.xref,"x"),c=ly(n,t.yref,"y"),d=sy(t.x,s),f=sy(t.y,c);if(void 0===d||void 0===f)return;var v="string"==typeof t.yref?t.yref.toLowerCase():void 0;l=(0,o.Cl)({type:"data",x:d,y:f},"y2"===v?{yAxis:"secondary"}:{})}else if("relative"===u&&"relative"===a){d=ty(t.x),f=ty(t.y);var h=ey(f);if(void 0===d||void 0===h)return;l={type:"relative",x:d,y:h}}else if("relative"===u&&"axis"===a){d=ty(t.x),c=ly(n,t.yref,"y");var p=iy("y",t.yref,n,i),g=dy(t.y,c,p);if(h=ey(g),void 0===d||void 0===h)return;l={type:"relative",x:d,y:h}}else if("axis"===u&&"relative"===a){f=ty(t.y),s=ly(n,t.xref,"x");var y=iy("x",t.xref,n,i),m=dy(t.x,s,y);if(h=ey(f),void 0===m||void 0===h)return;l={type:"relative",x:m,y:h}}else{if("pixel"!==u||"pixel"!==a)return;if(d=ty(t.x),f=ty(t.y),void 0===d||void 0===f)return;l={type:"pixel",x:d,y:f}}var b=t.text,x=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}(null==b?"":String(b)),w={id:fy(x,e),text:x,coordinates:l},M={},C={},k=void 0!==t.showarrow&&!!t.showarrow,A=t.cliponaxis;void 0!==A?M.clipToBounds=!!A:"data"===l.type&&(M.clipToBounds=!0);var S=ry(t.xanchor);if(S&&(M.align=S),!M.align){var L=ry(t.align);L&&(M.align=L)}var D=oy(t.yanchor);if(D&&(M.verticalAlign=D),!M.verticalAlign){var V=oy(t.valign);V&&(M.verticalAlign=V)}var N=[],O=!1,T=ty(t.ax),E="string"==typeof t.axref?t.axref.toLowerCase():void 0;void 0===T||void 0!==E&&"pixel"!==E||(N.push(T),O=!0);var F=ty(t.xshift);if(void 0!==F&&(N.push(F),O=!0),N.length>0){var B=N.reduce((function(t,n){return t+n}),0);0!==B&&(M.offsetX=B)}var P=[],_=ty(t.ay),H="string"==typeof t.ayref?t.ayref.toLowerCase():void 0;void 0===_||void 0!==H&&"pixel"!==H||(P.push(_),O=!0);var I=ty(t.yshift);if(void 0!==I&&(P.push(I),O=!0),P.length>0){var W=P.reduce((function(t,n){return t+n}),0);0!==W&&(M.offsetY=W)}k&&!O&&void 0===M.offsetY&&(M.offsetY=-40);var R=ty(t.width);void 0!==R&&(M.maxWidth=R),t.bgcolor&&(C.backgroundColor=t.bgcolor),t.bordercolor&&(C.borderColor=t.bordercolor);var z=ty(t.borderwidth);void 0!==z&&(C.borderWidth=z);var j=uy(t.borderpad);j&&(C.padding=j);var $=ty(t.opacity);if(void 0!==$&&(C.opacity=$),t.font){var Y=t.font;(null==Y?void 0:Y.color)&&(C.textColor=Y.color);var X=uy(null==Y?void 0:Y.size);X&&(C.fontSize=X),(null==Y?void 0:Y.weight)&&(C.fontWeight=Y.weight)}var G=null==t?void 0:t.textangle;if("number"!=typeof G||Number.isNaN(G)){if("string"==typeof G&&"auto"!==G.toLowerCase()){var U=Number(G);Number.isNaN(U)||(C.rotation=U)}}else C.rotation=G;if(Object.keys(M).length>0&&(w.layout=M),Object.keys(C).length>0&&(w.style=C),k){var q=null!==(r=t.arrowcolor)&&void 0!==r?r:C.textColor,Z=ty(t.arrowwidth),K=ty(t.standoff),J=ty(t.startstandoff),Q=function(t){if(t){var n=t.trim().toLowerCase();switch(n){case"solid":return;case"dot":return"1, 5";case"dash":return"5, 5";case"longdash":return"10, 5";case"dashdot":return"5, 5, 1, 5";case"longdashdot":return"10, 5, 1, 5";default:return/^\d+(\s|,)*\d*$/.test(n.replace(/\s+/g," "))?n.replace(/\s+/g," "):t}}}(t.arrowdash);w.connector=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},q?{strokeColor:q}:{}),void 0!==Z?{strokeWidth:Z}:{}),void 0!==K?{endPadding:Math.max(K,0)}:{}),void 0!==J?{startPadding:Math.max(J,0)}:{}),Q?{dashArray:Q}:{}),{arrow:vy(t)})}return w}}}(i,t,n,e)})).filter((function(t){return void 0!==t}));return e.length>0?e:void 0}},py=function(t,n,i,e,r,u){var a,l,s,c,d,f,v={},h=0,p=0,g=Zg(t.data,t.layout),y=Ly(t.data,t.layout,n),m=y.legends,b=y.hideLegend,x=void 0,w=jg(t.data[0],t.layout),M=zy(Ry(t.data,Wy(t.data,t.layout).x));t.data.forEach((function(n,a){var l,s,c,d,f,g,y,b;x=_g(t.layout,n,x);var C=Fg(null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null===(d=n.marker)||void 0===d?void 0:d.color,i,r),k=Fg(null===(y=null===(g=null===(f=t.layout)||void 0===f?void 0:f.template)||void 0===g?void 0:g.layout)||void 0===y?void 0:y.colorway,e,null===(b=n.line)||void 0===b?void 0:b.color,i,r),A=Vy(n,M);A.forEach((function(e,l){var s=e[0],c=e[1],d=n.x.slice(s,c),f=n.y.slice(s,c);d.forEach((function(e,s){var c,d,g,y,b,S,L,D,V,N,O,T;v[e]||(v[e]={xAxisPoint:M(e),chartData:[],lineData:[]});var E=m[a],F=x?x(Il(null===(c=n.marker)||void 0===c?void 0:c.color)?null===(g=null===(d=n.marker)||void 0===d?void 0:d.color)||void 0===g?void 0:g[s%(null===(y=n.marker)||void 0===y?void 0:y.color).length]:0):Bg(C,s,E,i,null===(L=null===(S=null===(b=t.layout)||void 0===b?void 0:b.template)||void 0===S?void 0:S.layout)||void 0===L?void 0:L.colorway,r),B=Pg(n,s),P=f[s],_=Gg(P,w);if("bar"===n.type)v[e].chartData.push({legend:E,data:P,color:null!==(D=Po(F).copy({opacity:B}).formatHex8())&&void 0!==D?D:F,yAxisCalloutData:_}),"number"==typeof P&&(h=Math.max(h,P));else if("scatter"===n.type||u){var H=Bg(k,a,E,i,null===(O=null===(N=null===(V=t.layout)||void 0===V?void 0:V.template)||void 0===N?void 0:N.layout)||void 0===O?void 0:O.colorway,r),I=by(n.line),W=Sy(n);v[e].lineData.push({legend:E+(A.length>1?".".concat(l+1):""),legendShape:W,y:P,color:null!==(T=Po(H).copy({opacity:B}).formatHex8())&&void 0!==T?T:F,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=I?I:{}),{mode:n.mode}),useSecondaryYScale:qg(n,t.layout),yAxisCalloutData:_}),qg(n,t.layout)||"number"!=typeof P||(h=Math.max(h,P),p=Math.min(p,P))}}))}))}));var C=Jg(t.data);(null!==(l=null===(a=t.layout)||void 0===a?void 0:a.shapes)&&void 0!==l?l:[]).filter((function(t){return"line"===t.type})).forEach((function(t,n){var i,e,r,o=null===(i=t.line)||void 0===i?void 0:i.color,u=function(t){return"number"==typeof t&&Array.isArray(C)?void 0!==C[t]?C[t]:C[n]:t},a=u(t.x0),l=u(t.x1),s=function(n){return"paper"===t.yref?0===n?p:1===n?h:"number"==typeof n?p+n*(h-p):n:n},c=s(t.y0),d=s(t.y1);v[a]&&v[a].lineData.push({legend:"Reference_".concat(n),y:c,color:null!==(e=Po(o).formatHex8())&&void 0!==e?e:o,lineOptions:by(t.line),useSecondaryYScale:!1}),v[l]&&v[l].lineData.push({legend:"Reference_".concat(n),y:d,color:null!==(r=Po(o).formatHex8())&&void 0!==r?r:o,lineOptions:by(t.line),useSecondaryYScale:!1})}));var k=Object.values(v),A=hy(t.layout,t.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:k,width:null===(s=t.layout)||void 0===s?void 0:s.width,height:null!==(d=null===(c=t.layout)||void 0===c?void 0:c.height)&&void 0!==d?d:350,barWidth:"auto",yMaxValue:h,yMinValue:p,mode:"plotly"},g),{hideTickOverlap:!0,hideLegend:b,roundCorners:!0,supportNegativeData:!0,barGapMax:2,showYAxisLables:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:"string"==typeof(null===(f=k[0])||void 0===f?void 0:f.xAxisPoint)}),Rg(t.layout)),Ty(t.data,t.layout)),$g(t.data[0],t.layout)),zg(t.data[0],t.layout)),w),By(t.data,t.layout)),_y(t.data,t.layout)),A?{annotations:A}:{})},gy=function(t,n,i,e,r,u){var a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=["text","markers","text+markers","markers+text","lines+markers","markers+line","text+lines+markers","lines+markers+text"].includes(null===(a=t.data[0])||void 0===a?void 0:a.mode),M="area"===i,C="scatter"===i,k=Zg(t.data,t.layout),A="tonexty",S=Ly(t.data,t.layout,n),L=S.legends,D=S.hideLegend,V=jg(t.data[0],t.layout),N=Ry(t.data,Wy(t.data,t.layout).x),O=zy(N),T="category"===N,E=t.data.map((function(n,i){var a,l,s,c,d,f,v,h,p,g,y,m=w?(null===(a=null==n?void 0:n.mode)||void 0===a?void 0:a.includes("line"))?null===(l=n.line)||void 0===l?void 0:l.color:null===(s=n.marker)||void 0===s?void 0:s.color:null===(c=n.line)||void 0===c?void 0:c.color,b=Fg(null===(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===f?void 0:f.layout)||void 0===v?void 0:v.colorway,r,m,e,u),x=n.x,M=L[i],C=Bg(b,i,M,e,null===(g=null===(p=null===(h=t.layout)||void 0===h?void 0:h.template)||void 0===p?void 0:p.layout)||void 0===g?void 0:g.colorway,u),k=Pg(n,i);A="tozeroy"===n.fill?"tozeroy":"tonexty";var S=(null===(y=n.mode)||void 0===y?void 0:y.includes("text"))||"scatterpolar"===n.type?void 0:by(n.line),D=Sy(n);return Vy(n,O).map((function(i,e){var r,u,a,l,s,c,d,f,v,h,p,g=i[0],y=i[1],m=x.slice(g,y),b=n.y.slice(g,y),w=Il(null===(r=n.marker)||void 0===r?void 0:r.size)?n.marker.size.slice(g,y):[],A=Il(null===(u=n.marker)||void 0===u?void 0:u.color)||Array.isArray(null===(a=n.marker)||void 0===a?void 0:a.color)?n.marker.color.slice(g,y):void 0,L=Array.isArray(n.text)?n.text.slice(g,y):void 0;return{legend:M,legendShape:D,data:m.map((function(t,i){var e,r;return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({x:O(t),y:b[i]},Array.isArray(null===(e=n.marker)||void 0===e?void 0:e.size)?{markerSize:w[i]}:"number"==typeof(null===(r=n.marker)||void 0===r?void 0:r.size)?{markerSize:n.marker.size}:{}),A?{markerColor:A[i]}:{}),L?{text:L[i]}:{}),{yAxisCalloutData:Gg(b[i],V)})})),color:null!==(l=Po(C).copy({opacity:k}).formatHex8())&&void 0!==l?l:C,lineOptions:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},null!=S?S:{}),{mode:"scatterpolar"!==n.type?n.mode:"scatterpolar"}),"scatterpolar"===n.type?{originXOffset:null===(s=t.layout)||void 0===s?void 0:s.__polarOriginX,direction:null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.polar)||void 0===d?void 0:d.angularaxis)||void 0===f?void 0:f.direction,rotation:null===(p=null===(h=null===(v=t.layout)||void 0===v?void 0:v.polar)||void 0===h?void 0:h.angularaxis)||void 0===p?void 0:p.rotation,axisLabel:n.__axisLabel?n.__axisLabel:{},fill:n.fill}:{}),useSecondaryYScale:qg(n,t.layout)}}))})).flat(),F=null===(s=null===(l=E[0])||void 0===l?void 0:l.data[0])||void 0===s?void 0:s.x,B=null===(d=null===(c=E[0])||void 0===c?void 0:c.data[E[0].data.length-1])||void 0===d?void 0:d.x,P=null===(v=null===(f=E[0])||void 0===f?void 0:f.data[0])||void 0===v?void 0:v.y,_=null===(p=null===(h=E[0])||void 0===h?void 0:h.data[E[0].data.length-1])||void 0===p?void 0:p.y,H=Jg(t.data),I=(null!==(y=null===(g=t.layout)||void 0===g?void 0:g.shapes)&&void 0!==y?y:[]).filter((function(t){return"line"===t.type})).map((function(t,n){var i,e,r=null===(i=t.line)||void 0===i?void 0:i.color,o=function(i){return"number"==typeof i&&Array.isArray(H)?void 0!==H[i]?H[i]:H[n]:"paper"===t.xref?0===i?F:1===i?B:"number"==typeof F&&"number"==typeof B&&"number"==typeof i?F+i*(B-F):i:i},u=function(n){return"paper"===t.yref?0===n?P:1===n?_:"number"==typeof n?P+n*(_-P):n:n};return{legend:"Reference_".concat(n),data:[{x:O(o(t.x0)),y:u(t.y0)},{x:O(o(t.x1)),y:u(t.y1)}],color:null!==(e=Po(r).formatHex8())&&void 0!==e?e:r,lineOptions:by(t.line),useSecondaryYScale:!1}})),W=$g(t.data[0],t.layout);if(void 0===W.yMinValue&&void 0===W.yMaxValue){var R=Fs(E);W.yMinValue=R.startValue,W.yMaxValue=R.endValue}var z,j,$=E.reduce((function(t,n){return t+n.data.length}),0),Y={lineChartData:(0,o.fX)((0,o.fX)([],E,!0),I,!0)},X={scatterChartData:(0,o.fX)((0,o.fX)([],E,!0),I,!0)},G=hy(t.layout,t.data,n),U=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({supportNegativeData:!0},k),{width:null===(m=t.layout)||void 0===m?void 0:m.width,height:null!==(x=null===(b=t.layout)||void 0===b?void 0:b.height)&&void 0!==x?x:350,hideTickOverlap:!0,hideLegend:D,useUTC:!1,optimizeLargeData:$>1e3,wrapXAxisLables:T,showYAxisLables:!0}),Rg(t.layout)),zg(t.data[0],t.layout)),V),Py(t.data,t.layout)),_y(t.data,t.layout)),G?{annotations:G}:{});return M?(0,o.Cl)({data:Y,mode:A},U):(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:C?X:Y,roundedTicks:!0,enableReflow:!1},U),W),C?(0,o.Cl)({showYAxisLablesTooltip:!0},Ty(t.data,t.layout)):{}),!C&&(z=t.layout,(j=Array.isArray(null==z?void 0:z.shapes)?z.shapes.filter((function(t){return"rect"===t.type})).map((function(t){return"string"==typeof t.x0||"string"==typeof t.x1?null:{color:t.fillcolor,data:[{startX:t.x0,endX:t.x1}],applyPattern:!1}})):[])&&!j.includes(null)?{colorFillBars:j}:{}))},yy=function(t){return t.replace(/<[^&]*?>/g,"").replace(/<[^>]*>/g,"").replace(/<br>|\\u003cbr\\u003e|<br>/gi,"").replace(/\$[^$]*\$/g,"$").trim()};function my(t,n,i){var e,r;if(Array.isArray(t)){var o=null!==(e=t[i])&&void 0!==e?e:t[0];return Array.isArray(o)?null!==(r=o[n])&&void 0!==r?r:o[0]:o}return t}function by(t){if(t){var n={};switch(t.dash&&(n=(0,o.Cl)((0,o.Cl)({},n),Wg[t.dash])),t.shape){case"spline":var i="number"==typeof t.smoothing?t.smoothing:1;n.curve=Sg.tension(1-i/1.3);break;case"hv":n.curve="stepAfter";break;case"vh":n.curve="stepBefore";break;case"hvh":n.curve="step";break;default:n.curve="linear"}return Object.keys(n).length>0?n:void 0}}var xy=function(t,n,i){return null==n?-1:i?t.findIndex((function(t){return t.includes(n)})):t.findIndex((function(i,e){return n>=i.x0&&(e===t.length-1?n<=i.x1:n<i.x1)}))},wy=function(t){return t.x1-t.x0},My=function(t){return(t.x1+t.x0)/2},Cy=function(t,n,i,e){if(!t||0===t.length)return[];if(Bl(t)){var r=Array.from(new Set(t)),o="number"==typeof n?Math.ceil(n):0,u="number"==typeof i?Math.floor(i)+1:r.length,a="number"==typeof e?e:1;return Su(o,u,a).map((function(t){return r.slice(t,t+a)}))}var l=Gu().domain(Xp(t)).nice().domain(),s=l[0],c=l[1];s="number"==typeof n?n:s,c="number"==typeof i?i:c;var d=function(){var t=Mg,n=Xp,i=Cg;function e(e){Array.isArray(e)||(e=Array.from(e));var r,o,u,a=e.length,l=new Array(a);for(r=0;r<a;++r)l[r]=t(e[r],r,e);var s=n(l),c=s[0],d=s[1],f=i(l,c,d);if(!Array.isArray(f)){const t=d,i=+f;if(n===Xp&&([c,d]=ci(c,d,i)),(f=ai(c,d,i))[0]<=c&&(u=li(c,d,i)),f[f.length-1]>=d)if(t>=d&&n===Xp){const t=li(c,d,i);isFinite(t)&&(t>0?d=(Math.floor(d/t)+1)*t:t<0&&(d=(Math.ceil(d*-t)+1)/-t))}else f.pop()}for(var v=f.length,h=0,p=v;f[h]<=c;)++h;for(;f[p-1]>d;)--p;(h||p<v)&&(f=f.slice(h,p),v=p-h);var g,y=new Array(v+1);for(r=0;r<=v;++r)(g=y[r]=[]).x0=r>0?f[r-1]:c,g.x1=r<v?f[r]:d;if(isFinite(u)){if(u>0)for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[Math.min(v,Math.floor((o-c)/u))].push(e[r]);else if(u<0)for(r=0;r<a;++r)if(null!=(o=l[r])&&c<=o&&o<=d){const t=Math.floor((c-o)*u);y[Math.min(v,t+(f[t]<=o))].push(e[r])}}else for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[ho(f,o,0,v)].push(e[r]);return y}return e.value=function(n){return arguments.length?(t="function"==typeof n?n:wg(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:wg([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(i="function"==typeof t?t:wg(Array.isArray(t)?xg.call(t):t),e):i},e}().domain([s,c]);if("number"==typeof e&&e>0){for(var f=[],v=Math.max(dl(s),dl(e)),h=fl(s,v);h<fl(c+e,v);)f.push(h),h=fl(h+e,v);return s=f[0],c=f[f.length-1],d.domain([s,c]).thresholds(f),d(t).slice(0,-1)}return d(t)},ky=function(t,n){var i,e;switch(t){case"sum":return vi(n);case"avg":return 0===n.length?0:vi(n)/n.length;case"min":return null!==(i=di(n))&&void 0!==i?i:0;case"max":return null!==(e=fi(n))&&void 0!==e?e:0;default:return n.length}},Ay=function(t,n,i,e,r){switch(void 0===r&&(r=1),t){case"percent":return 0===i?0:n/i*100;case"probability":return 0===i?0:n/i;case"density":return e*r===0?0:n/(e*r);case"probability density":return i*e*r===0?0:n/(i*e*r);default:return n}},Sy=function(t){var n,i,e=(null===(n=t.line)||void 0===n?void 0:n.dash)||"solid";return"dot"===e||"dash"===e||"dashdot"===e?"dottedLine":(null===(i=t.mode)||void 0===i?void 0:i.includes("markers"))?"circle":"default"},Ly=function(t,n,i){var e=[];1===t.length?e.push(t[0].name||""):t.forEach((function(t,n){e.push(t.name||"Series ".concat(n+1))}));var r=t.every((function(t){return!1===t.showlegend})),o=!1===(null==n?void 0:n.showlegend)||!0!==(null==n?void 0:n.showlegend)&&e.length<2;return{legends:e,hideLegend:i||o||r}},Dy=function(t,n){if(Il(t)){if("number"!=typeof t[n]||!isFinite(t[n]))return;return t[n]}return 1},Vy=function(t,n,i){if(!Il(t.x)||!Il(t.y))return[];for(var e=[],r=0,o=0;o<t.x.length;o++)(_l(t.x[o])||"function"==typeof n&&_l(n(t.x[o]))||_l(t.y[o])||"function"==typeof i&&_l(i(t.y[o])))&&(o-r>0&&e.push([r,o]),r=o+1);return o-r>0&&e.push([r,o]),e},Ny=function(t,n){var i=""===t.replace(n,"")?"1":t.replace(n,"");return parseInt(i,10)-1},Oy=function(t){return["donut","sankey","pie","annotation"].includes(t)},Ty=function(t,n){var i={},e={x:null==n?void 0:n.xaxis,y:null==n?void 0:n.yaxis};return Object.keys(e).forEach((function(n){var r=e[n],o=n[0],u="".concat(o,"AxisCategoryOrder"),a=[];if(t.forEach((function(t){var n;null===(n=t[o])||void 0===n||n.forEach((function(t){_l(t)||a.push(t)}))})),"category"===(null==r?void 0:r.type)||Bl(a)&&!Tl(a)&&!Ol(a))if(!(Il(null==r?void 0:r.categoryarray)&&r.categoryarray.length>0)||(null==r?void 0:r.categoryorder)&&"array"!==r.categoryorder)if((null==r?void 0:r.categoryorder)&&"trace"!==r.categoryorder&&"array"!==r.categoryorder)i[u]=r.categoryorder;else{var l=Array.from(new Set(a));i[u]="reversed"===(null==r?void 0:r.autorange)?l.reverse():l}else i[u]="reversed"===(null==r?void 0:r.autorange)?r.categoryarray.slice().reverse():r.categoryarray;else i[u]="data"})),i},Ey=/^\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z)?)?$/,Fy=function(t){if("string"==typeof t){var n=t.match(Ey);n&&(n[3]?n[6]&&(t=t.replace("Z","")):t+="T00:00")}return new Date(t)},By=function(t,n,i){var e;"number"==typeof(null==n?void 0:n.bargap)&&(e=n.bargap>=0&&n.bargap<=1?n.bargap:.2);var r=fi(t.map((function(t){return"bar"!==t.type||!Il(t.width)&&"number"!=typeof t.width?[]:t.width})).flat());return"number"==typeof r&&(e=1-r,e=Math.max(0,Math.min(e,1))),void 0===e?{}:i?{maxBarHeight:1e3,yAxisPadding:e}:{barWidth:"auto",maxBarWidth:1e3,xAxisInnerPadding:e,xAxisOuterPadding:e/2}},Py=function(t,n){var i,e,r,o={},u=Wy(t,n);return"log"===(null===(i=u.x)||void 0===i?void 0:i.type)&&(o.xScaleType="log"),"log"===(null===(e=u.y)||void 0===e?void 0:e.type)&&(o.yScaleType="log"),"log"===(null===(r=u.y2)||void 0===r?void 0:r.type)&&(o.secondaryYScaleType="log"),o},_y=function(t,n){var i={},e=Wy(t,n);return Object.keys(e).forEach((function(n){var r=e[n];if(r){var o=Ry(t,r);if(r.tickmode&&"array"!==r.tickmode||!Il(r.tickvals))if(r.tickmode&&"linear"!==r.tickmode||!r.dtick)(!r.tickmode||"auto"===r.tickmode)&&"number"==typeof r.nticks&&r.nticks>=0&&("x"===n?i.xAxisTickCount=r.nticks:"y"===n&&(i.yAxisTickCount=r.nticks));else{var u=Hy(r.dtick,o),a=Iy(r.tick0,o,u);"x"===n?i.xAxis={tickStep:u,tick0:a}:"y"===n&&(i.yAxis={tickStep:u,tick0:a})}else{var l="date"===o?r.tickvals.map((function(t){return new Date(t)})):r.tickvals;"x"===n?(i.tickValues=l,i.xAxis={tickText:r.ticktext}):"y"===n&&(i.yAxisTickValues=l,i.yAxis={tickText:r.ticktext})}}})),i},Hy=function(t,n){var i="log"===n,e="date"===n,r="category"===n,o=e?864e5:1;if(!t)return o;if(Dl(t))return(t=Number(t))<=0?o:r?Math.max(1,Math.round(t)):e?Math.max(.1,t):t;if("string"!=typeof t||!e&&!i)return o;var u=t.charAt(0),a=Dl(t.slice(1))?Number(t.slice(1)):0;return a<=0||!(e&&"M"===u&&a===Math.round(a)||i&&"L"===u||i&&"D"===u&&(1===a||2===a))?o:t},Iy=function(t,n,i){return"date"===n?Vl(t)?new Date(t):new Date(ps):"D1"!==i&&"D2"!==i?Dl(t)?Number(t):0:void 0},Wy=function(t,n){var i,e=new Set;t.forEach((function(t){var n=Gl(t);i=n.x,e.add(n.y)}));var r=function(t,i){return(0,o.Cl)((0,o.Cl)({},null==n?void 0:n[Ul(t,i)]),{_id:"".concat(t).concat(i>1?i:"")})},u={};"number"==typeof i&&(u.x=r("x",i));var a=Array.from(e).sort();return a.length>0&&(u.y=r("y",a[0])),a.length>1&&(u.y2=r("y",a[1])),u},Ry=function(t,n){var i;if(!n)return"category";if(["linear","log","date","category"].includes(null!==(i=n.type)&&void 0!==i?i:""))return n.type;var e=n._id[0],r=[];return t.forEach((function(t){var i=t["".concat(e,"axis")];(i===n._id||!i&&n._id===e)&&Il(t[e])&&t[e].forEach((function(t){_l(t)||r.push(t)}))})),Tl(r)&&!Fl(r)?"linear":Ol(r)?"date":"category"},zy=function(t,n){var i=function(t){var i=n?n(t):new Date(t);return isNaN(i.getTime())?null:i};return function(n){if(_l(n))return null;switch(t){case"linear":case"log":return Dl(n)?+n:null;case"date":return Dl(n)?i(+n):"string"==typeof n?i(n):null;case"category":return"".concat(n);default:return null}}},jy=function(t){var n,i,e=u.useRef(null),r=u.useRef(void 0),a=u.useState({}),l=a[0],c=a[1];r.current=t.onResize,u.useEffect((function(){var t,n,i=(0,s.z)(e.current);return i&&i.ResizeObserver&&(n=new i.ResizeObserver((function(n){var e,o=n[0].contentRect,u=o.width,a=o.height;t=null==i?void 0:i.requestAnimationFrame((function(){c((function(t){var n=Math.floor(u),i=Math.floor(a);return t.containerWidth===n&&t.containerHeight===i?t:{containerWidth:n,containerHeight:i}}))})),null===(e=r.current)||void 0===e||e.call(r,u,a)})),e.current&&n.observe(e.current)),function(){t&&(null==i||i.cancelAnimationFrame(t)),null==n||n.disconnect()}}),[]);var d=u.useMemo((function(){var n=l.containerWidth,i=l.containerHeight;return"number"==typeof t.aspect&&t.aspect>0&&(n?i=n/t.aspect:i&&(n=i*t.aspect),"number"==typeof t.maxHeight&&i&&i>t.maxHeight&&(i=t.maxHeight)),u.Children.map(t.children,(function(t){var e,r,a,l,s,c,d={root:(0,o.Cl)((0,o.Cl)({},null===(e=t.props.styles)||void 0===e?void 0:e.root),{width:"100%",height:"100%"}),chartWrapper:(0,o.Cl)((0,o.Cl)({},null===(r=t.props.styles)||void 0===r?void 0:r.chartWrapper),{width:"100%"}),chart:(0,o.Cl)((0,o.Cl)({},null===(a=t.props.styles)||void 0===a?void 0:a.chart),{width:"100%"})};return u.cloneElement(t,{width:n,height:i,shouldResize:(null!=n?n:0)+(null!=i?i:0),styles:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t.props.styles),d),{subComponentStyles:(0,o.Cl)((0,o.Cl)({},null===(l=t.props.styles)||void 0===l?void 0:l.subComponentStyles),{cartesianStyles:(0,o.Cl)((0,o.Cl)({},null===(c=null===(s=t.props.styles)||void 0===s?void 0:s.subComponentStyles)||void 0===c?void 0:c.cartesianStyles),d)})})})}))}),[l,t.aspect,t.maxHeight,t.children]);return u.createElement("div",{ref:e,style:{width:null!==(n=t.width)&&void 0!==n?n:"100%",height:null!==(i=t.height)&&void 0!==i?i:"100%",minWidth:t.minWidth,minHeight:t.minHeight,maxHeight:t.maxHeight}},d)};function $y(t){return function(n){var i=n.aspect,e=n.width,r=n.height,a=n.minWidth,l=n.minHeight,s=n.maxHeight,c=n.onResize,d=(0,o.Tt)(n,["aspect","width","height","minWidth","minHeight","maxHeight","onResize"]);return u.createElement(jy,{aspect:i,width:e,height:r,minWidth:a,minHeight:l,maxHeight:s,onResize:c},u.createElement(t,(0,o.Cl)({},d)))}}var Yy=u.forwardRef((function(t,n){var i,e,r=t.useUTC,a=void 0===r||r,s=t.yAxisCategoryOrder,c=void 0===s?"default":s,d=t.maxBarHeight,f=void 0===d?24:d,v=(0,o.Tt)(t,["useUTC","yAxisCategoryOrder","maxBarHeight"]),h=u.useRef(24),g=u.useRef(p("callout")),y=u.useRef({}),m=u.useRef(null),b=u.useRef(null),x=u.useRef(null),w=u.useRef(p("Gantt_empty")),M=u.useRef({}),C=u.useRef({}),k=u.useState(""),A=k[0],S=k[1],L=u.useState(!1),D=L[0],V=L[1],N=u.useState(""),O=N[0],T=N[1],E=u.useState(null),F=E[0],B=E[1],P=u.useState(""),_=P[0],H=P[1],I=u.useState(""),W=I[0],R=I[1],z=u.useState(""),j=z[0],$=z[1],Y=u.useState((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),X=Y[0],G=Y[1],U=u.useState(),q=U[0],Z=U[1];u.useEffect((function(){var t,n,i;Gs(null===(t=C.current.legendProps)||void 0===t?void 0:t.selectedLegends,null===(n=v.legendProps)||void 0===n?void 0:n.selectedLegends)||G((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),C.current=v}),[v]),u.useImperativeHandle(v.componentRef,(function(){var t,n;return{chartContainer:null!==(n=null===(t=b.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return Jd([{container:null===(n=b.current)||void 0===n?void 0:n.chartContainer}],v.hideLegend||null===(i=x.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[v.hideLegend]);var K=u.useMemo((function(){var t,n;M.current={};var i=0;return null!==(n=null===(t=v.data)||void 0===t?void 0:t.map((function(t){var n,e,r,u,a,l="".concat(t.legend);if(!M.current[l]){var s=t.color?cs(t.color,null===(n=v.theme)||void 0===n?void 0:n.isInverted):ss(i,0,null===(e=v.theme)||void 0===e?void 0:e.isInverted),c=s;if(v.enableGradient){var d=Mc(i,0,null===(r=v.theme)||void 0===r?void 0:r.isInverted);s=(null===(u=t.gradient)||void 0===u?void 0:u[0])||d[0],c=(null===(a=t.gradient)||void 0===a?void 0:a[1])||d[1]}M.current[l]={id:p("legend"),startColor:s,endColor:c},i+=1}var f=M.current[l],h=f.startColor,g=f.endColor;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:h}),v.enableGradient?{gradient:[h,g]}:{})})))&&void 0!==n?n:[]}),[v.data,null===(e=v.theme)||void 0===e?void 0:e.isInverted,v.enableGradient]),J=u.useMemo((function(){return K.length>0?Is(K[0].x.start,!0):ns.DateAxis}),[K]),Q=u.useMemo((function(){return K.length>0?Is(K[0].y,!1):is.StringAxis}),[K]),tt=u.useMemo((function(){return $s(v.yAxisPadding,void 0,.5)}),[v.yAxisPadding]),nt=u.useMemo((function(){if(J===ns.DateAxis){var t=100,n=-1;return K.forEach((function(i){var e=bs(i.x.start,a),r=bs(i.x.end,a);t=Math.min(t,e,r),n=Math.max(n,e,r)})),(0,Yn.c2)(t,n)}}),[a,K,J]),it=u.useCallback((function(){var t={};return K.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(+n.x.end-+n.x.start)})),t}),[K]),et=u.useCallback((function(){var t=it();return Q!==is.StringAxis?Object.keys(t).sort((function(t,n){return+t-+n})):"default"===c?Object.keys(t).reverse():nc(t,c)}),[it,Q,c]),rt=u.useMemo((function(){return et()}),[et]),ot=u.useCallback((function(t,n,i,e,r,o,u,a){var l=[];t.forEach((function(t){l.push(t.x.start,t.x.end)}));var s=di(l)||0,c=fi(l)||0;return{dStartValue:r?c:s,dEndValue:r?s:c,rStartValue:n.left,rEndValue:i-n.right}}),[]),ut=u.useCallback((function(t){y.current=t}),[]),at=u.useCallback((function(t){var n,i;return J===ns.DateAxis?(n=(0,Yn.Yn)(t.x.start,v.culture,a,!1,nt),i=(0,Yn.Yn)(t.x.end,v.culture,a,!1,nt)):(n=t.x.start.toString(),i=t.x.end.toString()),"".concat(n," - ").concat(i)}),[v.culture,a,nt,J]),lt=u.useCallback((function(){return v.onRenderCalloutPerDataPoint?v.onRenderCalloutPerDataPoint(q,(function(t){return t?u.createElement(pc.ChartHoverCard,{XValue:t.yAxisCalloutData||t.y.toString(),Legend:t.legend,YValue:t.xAxisCalloutData||at(t),color:t.color,culture:v.culture}):null})):null}),[at,q,v.culture,v.onRenderCalloutPerDataPoint]),st=u.useCallback((function(t){var n,i=t.xAxisCalloutData||at(t),e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(e,". ")+(t.legend?"".concat(t.legend,", "):"")+"".concat(i,".")}),[at]),ct=u.useCallback((function(){return X.length>0?X:O?[O]:[]}),[O,X]),dt=u.useCallback((function(t){return ct().includes("".concat(t))}),[ct]),ft=u.useCallback((function(){return 0===ct().length}),[ct]),vt=u.useCallback((function(t,n){(ft()||dt(n.legend))&&m.current!==n&&(m.current=n,B(t),V(!0),H(n.legend),S(n.color),R(n.yAxisCalloutData||n.y.toString()),$(n.xAxisCalloutData||at(n)),Z(n))}),[at,dt,ft]),ht=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),pt=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),gt=u.useCallback((function(){}),[]),yt=u.useCallback((function(){m.current=null,B(null),V(!1),H(""),S(""),R(""),$(""),Z(void 0)}),[]),mt=u.useCallback((function(){V(!1)}),[]),bt=u.useCallback((function(t){var n;return n="number"==typeof v.barHeight?v.barHeight:t,"number"==typeof f&&(n=Math.min(n,f)),Math.max(n,1)}),[f,v.barHeight]),xt=u.useCallback((function(){var t=[],n={};K.forEach((function(t){n[t.y]||(n[t.y]=[]),n[t.y].push(t)}));for(var i=rt.length-1;i>=0;i--){var e=rt[i];n[e]&&t.push.apply(t,n[e].sort((function(t,n){return+t.x.start-+n.x.start})))}return t}),[K,rt]),wt=u.useCallback((function(t){var n=t.xScale,i=t.yScalePrimary,e=function(t){var n=M.current["".concat(t)].id;return"".concat(n,"_gradient")},r=[];v.enableGradient&&Object.keys(M.current).forEach((function(t,n){var i=M.current[t],o=i.startColor,a=i.endColor;r.push(u.createElement("linearGradient",{key:n,id:e(t)},u.createElement("stop",{offset:"0",stopColor:o}),u.createElement("stop",{offset:"100%",stopColor:a})))}));var o=0;Q===is.StringAxis&&(o=i.bandwidth(),h.current=bt(o));var a=xt().map((function(t,r){var a=n(t.x.start),l=n(t.x.end),s=i(t.y)+(o-h.current)/2,c=ft()||dt(t.legend);return u.createElement("rect",{key:r,x:Math.min(a,l),y:s,width:Math.max(Math.abs(l-a),2),height:h.current,rx:v.roundCorners?3:0,fill:v.enableGradient?"url(#".concat(e(t.legend),")"):t.color,opacity:c?1:.1,onClick:t.onClick,onMouseOver:function(n){return pt(t,n)},onMouseLeave:gt,onFocus:function(n){return ht(t,n)},onBlur:gt,"data-is-focusable":c,role:"img","aria-label":st(t)})}));return u.createElement("g",null,r.length>0?u.createElement("defs",null,r):null,a)}),[st,bt,xt,dt,ft,ht,pt,gt,Q,v.enableGradient,v.roundCorners]),Mt=u.useCallback((function(t){T(t)}),[]),Ct=u.useCallback((function(){T("")}),[]),kt=u.useCallback((function(t,n,i){var e,r;(null===(e=v.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?G(t):G(t.slice(-1)),(null===(r=v.legendProps)||void 0===r?void 0:r.onChange)&&v.legendProps.onChange(t,n,i)}),[v.legendProps]),At=u.useCallback((function(){var t=[];return Object.keys(M.current).forEach((function(n){var i={title:n,color:M.current[n].startColor,hoverAction:function(){yt(),Mt(n)},onMouseOutAction:function(){Ct()}};t.push(i)})),u.createElement(df,(0,o.Cl)({legends:t,enabledWrapLines:v.enabledLegendsWrapLines,overflowProps:v.legendsOverflowProps,focusZonePropsInHoverCard:v.focusZonePropsForLegendsInHoverCard,overflowText:v.legendsOverflowText,onChange:kt,ref:x},v.legendProps))}),[yt,Mt,Ct,kt,v.enabledLegendsWrapLines,v.focusZonePropsForLegendsInHoverCard,v.legendProps,v.legendsOverflowProps,v.legendsOverflowText]),St=u.useCallback((function(){return(v.chartTitle?"".concat(v.chartTitle,". "):"")+"Gantt chart with ".concat(K.length," data points. ")}),[K.length,v.chartTitle]),Lt=u.useCallback((function(){return 0===K.length}),[K.length]),Dt=u.useCallback((function(t){var n=8,i=new Set;K.forEach((function(t){i.add(t.y)}));var e=Array.from(i),r=t-(y.current.top+8)-(y.current.bottom+8);return Q!==is.StringAxis&&(h.current=bt(Eh(e,r,tt)),n+=h.current/2),(0,o.Cl)((0,o.Cl)({},y.current),{top:y.current.top+n,bottom:y.current.bottom+n})}),[bt,K,tt,Q]);if(Lt())return u.createElement("div",{id:w.current,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"});h.current=bt(24);var Vt=(0,o.Cl)({isCalloutVisible:D,directionalHint:3,id:"toolTip".concat(g.current),target:F,isBeakVisible:!1,gapSpace:15,color:A,legend:_,XValue:W,YValue:j,onDismiss:mt,preventDismissOnLostFocus:!0},v.calloutProps),Nt={tickValues:v.tickValues,tickFormat:v.tickFormat};return u.createElement(Dv,(0,o.Cl)({},v,{yAxisPadding:tt,chartTitle:St(),points:K,chartType:ts.GanttChart,xAxisType:J,yAxisType:Q,stringDatasetForYAxisDomain:rt,calloutProps:Vt,tickParams:Nt,legendBars:At(),createYAxis:xs,getDomainNRangeValues:ot,createStringYAxis:Ms,getMinMaxOfYAxis:Ps,focusZoneDirection:rc.bidirectional,customizedCallout:lt(),getmargins:ut,getYDomainMargins:Dt,onChartMouseLeave:yt,ref:b,useUTC:a,children:wt}))}));Yy.displayName="GanttChart";var Xy=(0,r.I)(Yy,(function(t){return{}})),Gy=$y(rv),Uy=$y(jh),qy=$y(qv),Zy=$y(ig),Ky=$y(ph),Jy=$y(Kh),Qy=$y(Dp),tm=$y(hg),nm=$y(Gh),im=$y(Wh),em=$y(Jv),rm=$y(Qp),om=$y(Xy),um=function(t){var n=t.data[0].x,i=El(n),e=t.data;return i&&(e=t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{x:Ug(t.x)})}))),{data:e,layout:t.layout}},am={annotation:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,d,f,v,h,p,g=null!==(o=hy(t.layout,t.data,n))&&void 0!==o?o:[],y=Rg(t.layout).chartTitle||void 0,m=t.layout;return{annotations:g,chartTitle:y,description:"string"==typeof(null===(u=null==m?void 0:m.meta)||void 0===u?void 0:u.description)?m.meta.description:void 0,width:"number"==typeof(null===(a=t.layout)||void 0===a?void 0:a.width)?t.layout.width:void 0,height:"number"==typeof(null===(l=t.layout)||void 0===l?void 0:l.height)?t.layout.height:void 0,paperBackgroundColor:"string"==typeof(null===(s=t.layout)||void 0===s?void 0:s.paper_bgcolor)?t.layout.paper_bgcolor:void 0,plotBackgroundColor:"string"==typeof(null===(c=t.layout)||void 0===c?void 0:c.plot_bgcolor)?t.layout.plot_bgcolor:void 0,fontColor:"string"==typeof(null===(f=null===(d=t.layout)||void 0===d?void 0:d.font)||void 0===f?void 0:f.color)?t.layout.font.color:void 0,fontFamily:"string"==typeof(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.family)?t.layout.font.family:void 0,margin:null===(p=t.layout)||void 0===p?void 0:p.margin}},renderer:mg},donut:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w=t.data[0],M=Fg(null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null!==(f=null===(d=t.layout)||void 0===d?void 0:d.piecolorway)&&void 0!==f?f:null===(v=null==w?void 0:w.marker)||void 0===v?void 0:v.colors,i,r,!0),C={};if(i.current.clear(),w.labels&&w.values){var k=(null===(h=w.marker)||void 0===h?void 0:h.colors)||void 0,A=Array.isArray(k)&&k.length>=w.labels.length,S=w.labels.map((function(t,n){return{label:t,value:Dy(w.values,n),index:n,color:A?k[n]:void 0}})).filter((function(t){return!_l(t.value)}));S.sort((function(t,n){return n.value-t.value})),S.forEach((function(n,e){var o,u,a,l,s,c,d="".concat(n.label),f=null!==(o=n.color)&&void 0!==o?o:Bg(M,e,d,i,null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,r,!0);C[d]?C[d].data+=n.value:C[d]={legend:d,data:n.value,color:f}}))}var L=null!==(g=null===(p=t.layout)||void 0===p?void 0:p.width)&&void 0!==g?g:440,D=null!==(m=null===(y=t.layout)||void 0===y?void 0:y.height)&&void 0!==m?m:220,V=!!w.textinfo&&!["value","percent","label+percent"].includes(w.textinfo),N=V?0:80,O=40+(V?0:40),T=w.hole?w.hole*(Math.min(L-N,D-O)/2):1,E=Rg(t.layout).chartTitle,F=Object.keys(C);return{data:{chartTitle:E,chartData:(F.length>1?(0,o.fX)([[F[0],C[F[0]]]],F.slice(1).reverse().map((function(t){return[t,C[t]]})),!0):F.map((function(t){return[t,C[t]]}))).map((function(t){return t[1]}))},hideLegend:n||!1===(null===(b=t.layout)||void 0===b?void 0:b.showlegend),width:null===(x=t.layout)||void 0===x?void 0:x.width,height:D,innerRadius:T,hideLabels:V,showLabelsInPercent:!w.textinfo||["percent","label+percent"].includes(w.textinfo),roundCorners:!0,order:"sorted"}},renderer:Gy},sankey:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y=t.data[0],m=y.link,b=y.node,x=(null!==(u=null==m?void 0:m.value)&&void 0!==u?u:[]).map((function(t,n){var i,e;return _l(t)||_l(null===(i=null==m?void 0:m.source)||void 0===i?void 0:i[n])||_l(null===(e=null==m?void 0:m.target)||void 0===e?void 0:e[n])?null:{value:t,source:null==m?void 0:m.source[n],target:null==m?void 0:m.target[n]}})).filter((function(t){return null!==t&&t.source>=0&&t.target>=0&&t.source!==t.target})),w=Fg(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null==b?void 0:b.color,i,r),M={nodes:null===(c=b.label)||void 0===c?void 0:c.map((function(n,e){var o,u,a;return{nodeId:e,name:n,color:Bg(w,e,n,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r)}})),links:x.map((function(t,n){return(0,o.Cl)({},t)}))},C={root:(0,o.Cl)({},(null===(f=null===(d=t.layout)||void 0===d?void 0:d.font)||void 0===f?void 0:f.size)?{fontSize:null===(v=t.layout.font)||void 0===v?void 0:v.size}:{})};return{data:{chartTitle:Rg(t.layout).chartTitle,SankeyChartData:M},width:null===(h=t.layout)||void 0===h?void 0:h.width,height:null!==(g=null===(p=t.layout)||void 0===p?void 0:p.height)&&void 0!==g?g:468,styles:C,enableReflow:!1}},renderer:Qy},table:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,D,V,N,O=t.data[0],T=null!==(a=null===(u=O.cells)||void 0===u?void 0:u.values)&&void 0!==a?a:[],E=function(t,n){var i,e,r,u,a,l,s,c,d,f;return{values:null!==(e=null!==(i=null==t?void 0:t.values)&&void 0!==i?i:null==n?void 0:n.values)&&void 0!==e?e:[],align:null!==(r=null==t?void 0:t.align)&&void 0!==r?r:null==n?void 0:n.align,fill:(0,o.Cl)((0,o.Cl)({},null!==(u=null==n?void 0:n.fill)&&void 0!==u?u:{}),null!==(a=null==t?void 0:t.fill)&&void 0!==a?a:{}),font:(0,o.Cl)((0,o.Cl)({},null!==(l=null==n?void 0:n.font)&&void 0!==l?l:{}),null!==(s=null==t?void 0:t.font)&&void 0!==s?s:{}),format:null!==(c=null==t?void 0:t.format)&&void 0!==c?c:null==n?void 0:n.format,prefix:null!==(d=null==t?void 0:t.prefix)&&void 0!==d?d:null==n?void 0:n.prefix,suffix:null!==(f=null==t?void 0:t.suffix)&&void 0!==f?f:null==n?void 0:n.suffix}}(O.cells,null===(f=null===(d=null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.data)||void 0===c?void 0:c.table)||void 0===d?void 0:d[0])||void 0===f?void 0:f.cells),F=T[0].map((function(t,n){return T.map((function(t,i){var e,r,u,a=t[n],l="string"==typeof a?yy(a):a,s="string"==typeof l||"number"==typeof l?function(t,n,i){if(null===t||"boolean"==typeof t)return t;var e=Array.isArray(i.format)?i.format[n]:i.format,r=Array.isArray(i.prefix)?i.prefix[n]:i.prefix,o=Array.isArray(i.suffix)?i.suffix[n]:i.suffix,u=t;if("number"==typeof t)if("string"==typeof e)try{u=ju(e)(t)}catch(n){u=zs(t)}else u=zs(t);return"".concat(null!=r?r:"").concat(u).concat(null!=o?o:"")}(l,i,E):l,c=my(null===(e=null==E?void 0:E.font)||void 0===e?void 0:e.color,n,i),d=my(null===(r=null==E?void 0:E.font)||void 0===r?void 0:r.size,n,i),f=my(null===(u=null==E?void 0:E.fill)||void 0===u?void 0:u.color,n,i),v=my(null==E?void 0:E.align,n,i);return{value:s,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},c?{color:c}:{}),"number"==typeof d?{fontSize:d}:{}),f?{backgroundColor:f}:{}),v?{textAlign:v}:{})}}))})),B={root:(0,o.Cl)({},(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.size)?{fontSize:t.layout.font.size}:{})},P=null===(b=null===(m=null===(y=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.data)||void 0===y?void 0:y.table)||void 0===m?void 0:m[0])||void 0===b?void 0:b.header,_=O.header,H={align:null!==(x=null==_?void 0:_.align)&&void 0!==x?x:null==P?void 0:P.align,fill:(0,o.Cl)((0,o.Cl)({},null!==(w=null==P?void 0:P.fill)&&void 0!==w?w:{}),null!==(M=null==_?void 0:_.fill)&&void 0!==M?M:{}),font:(0,o.Cl)((0,o.Cl)({},null!==(C=null==P?void 0:P.font)&&void 0!==C?C:{}),null!==(k=null==_?void 0:_.font)&&void 0!==k?k:{}),values:null!==(S=null!==(A=null==_?void 0:_.values)&&void 0!==A?A:null==P?void 0:P.values)&&void 0!==S?S:[]};return{headers:function(t,n){return(Array.isArray(t[0])?t.map((function(t){return t.map((function(t){return yy(t)})).filter(Boolean).join(" ")})):t.map((function(t){return yy(t)}))).map((function(t,i){var e,r,u,a=my(null===(e=null==n?void 0:n.font)||void 0===e?void 0:e.color,0,i),l=my(null===(r=null==n?void 0:n.font)||void 0===r?void 0:r.size,0,i),s=my(null===(u=null==n?void 0:n.fill)||void 0===u?void 0:u.color,0,i),c=my(null==n?void 0:n.align,0,i);return{value:t,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},"string"==typeof a?{color:a}:{}),"number"==typeof l?{fontSize:l}:{}),"string"==typeof s?{backgroundColor:s}:{}),c?{textAlign:c}:{})}}))}(null!==(D=null===(L=O.header)||void 0===L?void 0:L.values)&&void 0!==D?D:[],H),rows:F,width:null===(V=t.layout)||void 0===V?void 0:V.width,height:null===(N=t.layout)||void 0===N?void 0:N.height,styles:B}},renderer:rm},horizontalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M=Ly(t.data,t.layout,n),C=M.legends,k=M.hideLegend,A=void 0,S=t.data.map((function(n,o){var u,a,l,s;A=_g(t.layout,n,A);var c=Fg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r),d=C[o];return n.y.map((function(e,o){var u,a,l,s,f,v,h,p,g;if(_l(e))return null;var y=A?A(Il(null===(u=n.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[o%(null===(s=n.marker)||void 0===s?void 0:s.color).length]:0):Bg(c,o,d,i,null===(h=null===(v=null===(f=t.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===h?void 0:h.colorway,r),m=Pg(n,o);return{x:_l(null===(p=n.x)||void 0===p?void 0:p[o])?0:n.x[o],y:e,legend:d,color:null!==(g=Po(y).copy({opacity:m}).formatHex8())&&void 0!==g?g:y}})).filter((function(t){return null!==t}))})).flat(),L=null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:450,D=L-(null!==(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.margin)||void 0===s?void 0:s.l)&&void 0!==c?c:0)-(null!==(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.margin)||void 0===f?void 0:f.pad)&&void 0!==v?v:0),V=new Set(S.map((function(t){return t.y}))).size||1,N=D/(V*(1+1/(1+.01*V)));return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:S,secondaryYAxistitle:"string"==typeof(null===(p=null===(h=t.layout)||void 0===h?void 0:h.yaxis2)||void 0===p?void 0:p.title)?null===(y=null===(g=t.layout)||void 0===g?void 0:g.yaxis2)||void 0===y?void 0:y.title:(null===(x=null===(b=null===(m=t.layout)||void 0===m?void 0:m.yaxis2)||void 0===b?void 0:b.title)||void 0===x?void 0:x.text)||"",barHeight:N,showYAxisLables:!0,height:L,width:null===(w=t.layout)||void 0===w?void 0:w.width,hideTickOverlap:!0,hideLegend:k,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0},Rg(t.layout)),Ty(t.data,t.layout)),By(t.data,t.layout,!0)),_y(t.data,t.layout))},renderer:Zy},groupedverticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s=(0,o.Cl)({},t);if(t.data.some((function(t){return"bar"===t.type&&Pl(t.y)}))){var c=t.data.map((function(t,n){return"bar"===t.type&&Pl(t.y)?function(t,n){if(!t||0===t.length)return{traces:[],x:[]};var i=n&&n.length===t.length?n:t.map((function(t,n){return"Item ".concat(n+1)})),e=t.map((function(t,n){var e;if("object"==typeof t&&null!==t){var r=Qg(t),o={};return Object.keys(r).forEach((function(t){var n=r[t];!function(t){var n=t.toLowerCase();return!(!n.includes("style")&&"style"!==n&&!new RegExp("^(color|fill|stroke|border|background|font|shadow|outline|margin|padding|gap|align|justify|display|flex|grid|text|line|letter|word|vertical|horizontal|overflow|position|top|right|bottom|left|zindex|z-index|opacity|filter|clip|cursor|resize|transition|animation|transform|box|column|row|direction|visibility|content|width|height|aspect|image|user|pointer|caret|scroll|%)|(-webkit-|-moz-|-ms-|-o-)","i").test(n))}(t)&&("number"==typeof n||"string"==typeof n&&Dl(n))&&(o[t]=n)})),o}return"number"==typeof t||"string"==typeof t&&Dl(t)?((e={})[i[n]||"item_".concat(n)]=t,e):{}})),r=new Set;e.forEach((function(t){Object.keys(t).forEach((function(t){return r.add(t)}))}));var o=[];return r.forEach((function(t){var n=[],r=!1,u=!1;if(e.forEach((function(i,e){var o=i[t];"number"==typeof o?(n.push(o),r=!0,u=!0):"string"==typeof o&&Dl(o)&&(n.push(parseFloat(o)),r=!0,u=!0)})),r&&u){var a={type:"bar",name:t,x:i,y:n};o.push(a)}})),{traces:o,x:i}}(t.y,Array.isArray(t.x)?t.x:void 0).traces.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{marker:t.marker})})):[t]})).flat();s=(0,o.Cl)((0,o.Cl)({},t),{data:c})}var d=[],f=Zg(s.data,s.layout),v=Ly(s.data,s.layout,n),h=v.legends,p=v.hideLegend,g=void 0,y=jg(s.data[0],s.layout);s.data.forEach((function(t,n){var u,a,l,c,f,v,p,m,b,x,w;g=_g(s.layout,t,g);var M=h[n],C=Sy(t);if("bar"===t.type){var k=Fg(null===(l=null===(a=null===(u=s.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(c=t.marker)||void 0===c?void 0:c.color,i,r);d.push({type:"bar",legend:M,key:M,data:t.x.map((function(n,e){var o,u,a,l,c,d,f,v,h;if(!_l(n)&&!_l(null===(o=t.y)||void 0===o?void 0:o[e])){var p=g?g(Il(null===(u=t.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=t.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[e%(null===(c=t.marker)||void 0===c?void 0:c.color).length]:0):Bg(k,e,M,i,null===(v=null===(f=null===(d=s.layout)||void 0===d?void 0:d.template)||void 0===f?void 0:f.layout)||void 0===v?void 0:v.colorway,r),m=Pg(t,e),b=t.y[e];return{x:n.toString(),y:b,yAxisCalloutData:Gg(b,y),color:null!==(h=Po(p).copy({opacity:m}).formatHex8())&&void 0!==h?h:p}}})).filter((function(t){return void 0!==t})),useSecondaryYScale:qg(t,s.layout)})}else if("scatter"===t.type){var A=Fg(null===(p=null===(v=null===(f=s.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===p?void 0:p.colorway,e,null===(m=t.line)||void 0===m?void 0:m.color,i,r),S=Bg(A,n,M,i,null===(w=null===(x=null===(b=s.layout)||void 0===b?void 0:b.template)||void 0===x?void 0:x.layout)||void 0===w?void 0:w.colorway,r),L=by(t.line),D=Pg(t,n);Vy(t).forEach((function(n){var i,e=n[0],r=n[1],u=t.x.slice(e,r),a=t.y.slice(e,r);d.push({type:"line",legend:M,legendShape:C,data:u.map((function(t,n){var i=a[n];return{x:t.toString(),y:i,yAxisCalloutData:Gg(i,y)}})),color:null!==(i=Po(S).copy({opacity:D}).formatHex8())&&void 0!==i?i:S,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=L?L:{}),{mode:t.mode}),useSecondaryYScale:qg(t,s.layout)})}))}}));var m=hy(s.layout,s.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({dataV2:d,width:null===(u=s.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=s.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,barwidth:"auto",mode:"plotly"},f),{hideTickOverlap:!0,hideLegend:p,roundCorners:!0,wrapXAxisLables:!0,showYAxisLables:!0}),Rg(s.layout)),Ty(s.data,s.layout)),$g(s.data[0],s.layout)),zg(s.data[0],s.layout)),y),By(s.data,s.layout)),_y(s.data,s.layout)),m?{annotations:m}:{})},renderer:nm},verticalstackedbar:{transformer:py,renderer:Uy},heatmap:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,D,V,N,O,T,E,F,B,P,_,H,I=t.data[0],W=[],R=Number.POSITIVE_INFINITY,z=Number.NEGATIVE_INFINITY;if("histogram2d"===I.type){var j=[],$=[],Y=[];null===(u=I.x)||void 0===u||u.forEach((function(t,n){var i,e,r=null!==(i=Dy(I.z,n))&&void 0!==i?i:0;_l(t)||_l(null===(e=I.y)||void 0===e?void 0:e[n])||(j.push(t),$.push(I.y[n]),Y.push(r))}));var X=Bl(j),G=Bl($),U=Cy(j,null===(a=I.xbins)||void 0===a?void 0:a.start,null===(l=I.xbins)||void 0===l?void 0:l.end,null===(s=I.xbins)||void 0===s?void 0:s.size),q=Cy($,null===(c=I.ybins)||void 0===c?void 0:c.start,null===(d=I.ybins)||void 0===d?void 0:d.end,null===(f=I.ybins)||void 0===f?void 0:f.size),Z=q.map((function(){return U.map((function(){return[]}))})),K=0;j.forEach((function(t,n){var i=xy(U,t,X),e=xy(q,$[n],G);-1!==i&&-1!==e&&Z[e][i].push(Y[n])}));var J=Z.map((function(t){return t.map((function(t){var n=ky(I.histfunc,t);return K+=n,n}))}));U.forEach((function(t,n){q.forEach((function(i,e){var r=Ay(I.histnorm,J[e][n],K,X?t.length:wy(t),G?i.length:wy(i));W.push({x:X?t.join(", "):My(t),y:G?i.join(", "):My(i),value:r,rectText:r}),"number"==typeof r&&(R=Math.min(R,r),z=Math.max(z,r))}))}))}else null===(v=I.x)||void 0===v||v.forEach((function(n,i){var e;null===(e=I.y)||void 0===e||e.forEach((function(e,r){var o,u,a,l,s,c,d=null===(u=null===(o=I.z)||void 0===o?void 0:o[r])||void 0===u?void 0:u[i];W.push({x:"date"===(null===(l=null===(a=t.layout)||void 0===a?void 0:a.xaxis)||void 0===l?void 0:l.type)||null!=n?n:0,y:(null===(c=null===(s=t.layout)||void 0===s?void 0:s.yaxis)||void 0===c||c.type,e),value:d,rectText:d}),"number"==typeof d&&(R=Math.min(R,d),z=Math.max(z,d))}))}));var Q={legend:null!==(h=I.name)&&void 0!==h?h:"",data:W,value:0},tt=[R,(z+R)/2,z],nt=[cs(es.color1),cs(es.color2),cs(es.color3)],it=null!==(N=null!==(k=null!==(x=null!==(y=null!==(p=null==I?void 0:I.colorscale)&&void 0!==p?p:null===(g=t.layout)||void 0===g?void 0:g.colorscale)&&void 0!==y?y:null===(b=null===(m=t.layout)||void 0===m?void 0:m.coloraxis)||void 0===b?void 0:b.colorscale)&&void 0!==x?x:null===(C=null===(M=null===(w=t.layout)||void 0===w?void 0:w.template)||void 0===M?void 0:M.layout)||void 0===C?void 0:C.colorscale)&&void 0!==k?k:"histogram2d"===I.type&&(null===(V=null===(D=null===(L=null===(S=null===(A=t.layout)||void 0===A?void 0:A.template)||void 0===S?void 0:S.data)||void 0===L?void 0:L.histogram2d)||void 0===D?void 0:D[0])||void 0===V?void 0:V.colorscale))&&void 0!==N?N:null===(B=null===(F=null===(E=null===(T=null===(O=t.layout)||void 0===O?void 0:O.template)||void 0===T?void 0:T.data)||void 0===E?void 0:E.heatmap)||void 0===F?void 0:F[0])||void 0===B?void 0:B.colorscale;if(it&&"object"==typeof it&&("diverging"in it||"sequential"in it||"sequentialminus"in it)){var et=R>=0,rt=z<=0;R<0&&z>0?it=null==it?void 0:it.diverging:et?it=null==it?void 0:it.sequential:rt&&(it=null==it?void 0:it.sequentialminus)}var ot=Array.isArray(it)?it.map((function(t){return t[0]*(z-R)+R})):tt,ut=Array.isArray(it)?it.map((function(t){return t[1]})):nt;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:[Q],domainValuesForColorScale:ot,rangeValuesForColorScale:ut,hideLegend:!0,showYAxisLables:!0,sortOrder:"none",width:null===(P=t.layout)||void 0===P?void 0:P.width,height:null!==(H=null===(_=t.layout)||void 0===_?void 0:_.height)&&void 0!==H?H:350,hideTickOverlap:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:!0},Rg(t.layout)),Ty([I],t.layout)),_y(t.data,t.layout))},renderer:Jy},gauge:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,M,C,k,A,S,L,D,V,N,O,T,E,F,B,P,_,H,I,W,R,z,j,$,Y,X,G,U,q,Z,K,J,Q,tt,nt,it,et,rt,ot,ut,at,lt,st=t.data[0],ct=(null===(o=st.gauge)||void 0===o?void 0:o.steps)?st.gauge.steps.map((function(t){return t.color})):void 0,dt=Fg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,ct,i,r),ft=(null===(c=null===(s=st.gauge)||void 0===s?void 0:s.steps)||void 0===c?void 0:c.length)?st.gauge.steps.map((function(n,e){var o,u,a,l,s,c=n.name||"Segment ".concat(e+1),d=Bg(dt,e,c,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r);return{legend:c,size:(null===(l=n.range)||void 0===l?void 0:l[1])-(null===(s=n.range)||void 0===s?void 0:s[0]),color:d}})):[{legend:"Current",size:null!==(d=st.value)&&void 0!==d?d:0-(null!==(p=null===(h=null===(v=null===(f=st.gauge)||void 0===f?void 0:f.axis)||void 0===v?void 0:v.range)||void 0===h?void 0:h[0])&&void 0!==p?p:0),color:Kg(null===(m=null===(y=null===(g=t.layout)||void 0===g?void 0:g.template)||void 0===y?void 0:y.layout)||void 0===m?void 0:m.colorway,e,null===(x=null===(b=st.gauge)||void 0===b?void 0:b.axis)||void 0===x?void 0:x.color,i,r)},{legend:"Target",size:(null!==(k=null===(C=null===(M=null===(w=st.gauge)||void 0===w?void 0:w.axis)||void 0===M?void 0:M.range)||void 0===C?void 0:C[1])&&void 0!==k?k:100)-(null!==(A=st.value)&&void 0!==A?A:0),color:es.disabled}];if(null===(S=st.delta)||void 0===S?void 0:S.reference){var vt=st.value-st.delta.reference;if(vt>=0){at="▲ ".concat(vt);var ht=Fg(null===(V=null===(D=null===(L=t.layout)||void 0===L?void 0:L.template)||void 0===D?void 0:D.layout)||void 0===V?void 0:V.colorway,e,null===(O=null===(N=st.delta)||void 0===N?void 0:N.increasing)||void 0===O?void 0:O.color,i,r);lt=Bg(ht,0,"",i,null===(F=null===(E=null===(T=t.layout)||void 0===T?void 0:T.template)||void 0===E?void 0:E.layout)||void 0===F?void 0:F.colorway,r)}else{at="▼ ".concat(Math.abs(vt));var pt=Fg(null===(_=null===(P=null===(B=t.layout)||void 0===B?void 0:B.template)||void 0===P?void 0:P.layout)||void 0===_?void 0:_.colorway,e,null===(I=null===(H=st.delta)||void 0===H?void 0:H.decreasing)||void 0===I?void 0:I.color,i,r);lt=Bg(pt,0,"",i,null===(z=null===(R=null===(W=t.layout)||void 0===W?void 0:W.template)||void 0===R?void 0:R.layout)||void 0===z?void 0:z.colorway,r)}}var gt={sublabel:{fill:lt}},yt=Rg(t.layout).chartTitle;return{segments:ft,chartValue:null!==(j=st.value)&&void 0!==j?j:0,chartTitle:yt,sublabel:at,minValue:"number"==typeof(null===(X=null===(Y=null===($=st.gauge)||void 0===$?void 0:$.axis)||void 0===Y?void 0:Y.range)||void 0===X?void 0:X[0])?null===(q=null===(U=null===(G=st.gauge)||void 0===G?void 0:G.axis)||void 0===U?void 0:U.range)||void 0===q?void 0:q[0]:void 0,maxValue:"number"==typeof(null===(J=null===(K=null===(Z=st.gauge)||void 0===Z?void 0:Z.axis)||void 0===K?void 0:K.range)||void 0===J?void 0:J[1])?null===(nt=null===(tt=null===(Q=st.gauge)||void 0===Q?void 0:Q.axis)||void 0===tt?void 0:tt.range)||void 0===nt?void 0:nt[1]:void 0,chartValueFormat:function(){var t,n;return null!==(n=null===(t=st.value)||void 0===t?void 0:t.toString())&&void 0!==n?n:""},width:null===(it=t.layout)||void 0===it?void 0:it.width,height:null!==(rt=null===(et=t.layout)||void 0===et?void 0:et.height)&&void 0!==rt?rt:220,styles:gt,variant:(null===(ut=null===(ot=st.gauge)||void 0===ot?void 0:ot.steps)||void 0===ut?void 0:ut.length)?ag.MultipleSegments:ag.SingleSegment,roundCorners:!0}},renderer:tm},verticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c=[],d=Ly(t.data,t.layout,n),f=d.legends,v=d.hideLegend,h=void 0;t.data.forEach((function(n,u){var a,l,s,d,v,p,g;if(n.x){h=_g(t.layout,n,h);var y=Fg(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null===(d=n.marker)||void 0===d?void 0:d.color,i,r),m=[],b=[];n.x.forEach((function(t,i){var e,r=null!==(e=Dy(n.y,i))&&void 0!==e?e:0;_l(t)||(m.push(t),b.push(r))}));var x=Bl(m),w=Cy(m,null===(v=n.xbins)||void 0===v?void 0:v.start,null===(p=n.xbins)||void 0===p?void 0:p.end,null===(g=n.xbins)||void 0===g?void 0:g.size),M=w.map((function(){return[]})),C=0;m.forEach((function(t,n){var i=xy(w,t,x);-1!==i&&M[i].push(b[n])}));var k=M.map((function(t){var i=ky(n.histfunc,t);return C+=i,i}));w.forEach((function(e,a){var l,s,d,v,p,g,m,b,w=f[u],M=h?h(Il(null===(l=n.marker)||void 0===l?void 0:l.color)?null===(d=null===(s=n.marker)||void 0===s?void 0:s.color)||void 0===d?void 0:d[a%(null===(v=n.marker)||void 0===v?void 0:v.color).length]:0):Bg(y,a,w,i,null===(m=null===(g=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===g?void 0:g.layout)||void 0===m?void 0:m.colorway,r),A=Pg(n,a),S=Ay(n.histnorm,k[a],C,x?e.length:wy(e));c.push((0,o.Cl)({x:x?e.join(", "):My(e),y:S,legend:w,color:null!==(b=Po(M).copy({opacity:A}).formatHex8())&&void 0!==b?b:M},x?{}:{xAxisCalloutData:"[".concat(e.x0," - ").concat(e.x1,")")}))}))}}));var p=hy(t.layout,t.data,n);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:c,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=t.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,supportNegativeData:!0,mode:"histogram",hideTickOverlap:!0,maxBarWidth:50,hideLegend:v,roundCorners:!0,wrapXAxisLables:"string"==typeof(null===(s=c[0])||void 0===s?void 0:s.x),showYAxisLables:!0},Rg(t.layout)),Ty(t.data,t.layout)),$g(t.data[0],t.layout)),p?{annotations:p}:{})},renderer:im},area:{transformer:function(t,n,i,e,r){return gy(t,n,"area",i,e,r)},renderer:Ky,preTransformOperation:um},line:{transformer:function(t,n,i,e,r){return gy(t,n,"line",i,e,r)},renderer:qy,preTransformOperation:um},scatter:{transformer:function(t,n,i,e,r){return gy(t,n,"scatter",i,e,r)},renderer:em,preTransformOperation:um},funnel:{transformer:function(t,n,i,e,r){var o,u,a,l,s=[],c=t.data.length>1&&t.data.every((function(t){var n,i,e,r,o=null!==(i=null!==(n=t.values)&&void 0!==n?n:t.x)&&void 0!==i?i:t.value,u=null!==(r=null!==(e=t.labels)&&void 0!==e?e:t.y)&&void 0!==r?r:t.stage;return Array.isArray(u)&&Array.isArray(o)&&o.length>1&&u.length>1}));if(c){var d={};t.data.forEach((function(n,o){var u,a,l,c,f,v,h,p,g,y,m,b,x,w=n.name||"Category ".concat(o+1),M=Fg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(f=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==f?f:null===(v=n.marker)||void 0===v?void 0:v.color,i,r),C=Bg(M,0,w,i,null===(g=null===(p=null===(h=t.layout)||void 0===h?void 0:h.template)||void 0===p?void 0:p.layout)||void 0===g?void 0:g.colorway,r);d[w]=C;var k=null!==(m=null!==(y=n.labels)&&void 0!==y?y:n.y)&&void 0!==m?m:n.stage,A=null!==(x=null!==(b=n.values)&&void 0!==b?b:n.x)&&void 0!==x?x:n.value;Il(k)&&Il(A)&&k&&Il(k)&&k.length>0&&k.forEach((function(t,n){var i=s.findIndex((function(n){return n.stage===t})),e=Number(A[n]);isNaN(e)||(-1===i?s.push({stage:t,subValues:[{category:w,value:e,color:C}]}):s[i].subValues.push({category:w,value:e,color:C}))}))}))}else t.data.forEach((function(n,o){var u,a,l,c,d,f,v=function(t){var n,i,e,r,o=t.orientation||"h",u=null!==(i=null!==(n=t.labels)&&void 0!==n?n:t.y)&&void 0!==i?i:t.stage,a=null!==(r=null!==(e=t.values)&&void 0!==e?e:t.x)&&void 0!==r?r:t.value,l=Bl(a),s=Bl(u),c=Tl(a),d=Tl(u),f=function(t){return Array.isArray(t)?t:"string"==typeof t||"number"==typeof t?[t]:[]};return"h"===o?s&&c?{categories:f(u),values:f(a)}:l&&d?{categories:f(a),values:f(u)}:{categories:f(s?u:a),values:f(s?a:u)}:l&&d?{categories:f(a),values:f(u)}:s&&c?{categories:f(u),values:f(a)}:{categories:f(l?a:u),values:f(l?u:a)}}(n),h=v.categories,p=v.values;if(Il(h)&&Il(p)){var g=Fg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(d=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==d?d:null===(f=n.marker)||void 0===f?void 0:f.color,i,r);h.forEach((function(n,e){var o,u,a,l=Bg(g,e,n,i,null===(a=null===(u=null===(o=t.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,r),c=Number(p[e]);isNaN(c)||s.push({stage:n,value:c,color:l})}))}}));return{data:s,width:null===(o=t.layout)||void 0===o?void 0:o.width,height:null===(u=t.layout)||void 0===u?void 0:u.height,orientation:"v"===(null===(a=t.data[0])||void 0===a?void 0:a.orientation)?"horizontal":"vertical",hideLegend:n||!1===(null===(l=t.layout)||void 0===l?void 0:l.showlegend)}},renderer:lg},gantt:{transformer:function(t,n,i,e,r){var u,a,l,s=t.data.filter((function(t){return"scatter"!==t.type||"markers"!==t.mode})),c=Ly(s,t.layout,n),d=c.legends,f=c.hideLegend,v=void 0,h=Ry(s,Wy(s,t.layout).x),p=zy(h,Fy),g=function(t){var n=p(t);return"string"==typeof n?0:null!=n?n:0},y="date"===h,m=[];return s.forEach((function(n,o){var u,a,l,s,c=d[o];if("bar"===n.type){v=_g(t.layout,n,v);var f=Fg(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r);n.y.forEach((function(e,o){var u,a,l,s,d,h,p,b,x;if(!_l(e)){var w=v?v(Il(null===(u=n.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[o%(null===(s=n.marker)||void 0===s?void 0:s.color).length]:0):Bg(f,o,c,i,null===(p=null===(h=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===h?void 0:h.layout)||void 0===p?void 0:p.colorway,r),M=Pg(n,o),C=+g(Il(n.base)?n.base[o]:n.base),k=+g(null===(b=n.x)||void 0===b?void 0:b[o]);m.push({x:{start:y?new Date(C):C,end:y?new Date(C+k):C+k},y:e,legend:c,color:null!==(x=Po(w).copy({opacity:M}).formatHex8())&&void 0!==x?x:w})}}))}else if("scatter"===n.type&&"none"===n.mode&&"toself"===n.fill)for(var h=0;h<n.y.length;h+=5)if(!_l(n.y[h])&&!_l(n.y[h+3])){var p=g(n.x[h]),b=g(n.x[h+1]),x=n.y[h],w=n.y[h+3];m.push({x:{start:p,end:b},y:Math.round((x+w)/2),legend:c,color:n.fillcolor})}})),(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:m,showYAxisLables:!0,height:null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:350,width:null===(l=t.layout)||void 0===l?void 0:l.width,hideTickOverlap:!0,hideLegend:f,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,useUTC:!1},Rg(t.layout)),Ty(s,t.layout)),By(s,t.layout,!0)),_y(s,t.layout))},renderer:om},fallback:{transformer:py,renderer:Uy}},lm=u.forwardRef((function(t,n){var i,e=t.colorwayType,r=void 0===e?"default":e,a=t.onSchemaChange,s=(0,o.Tt)(t,["colorwayType","onSchemaChange"]),c=Hl(s.chartSchema).plotlySchema,d=(t=>{var n;try{Hl(t)}catch(t){return{isValid:!1,errorMessage:`Invalid JSON: ${t}`}}try{let i=(t=>{var n;try{const i=t;if(!i)throw new Error("Plotly input is null or undefined");if("object"!=typeof i)throw new Error("Plotly input is not an object. Input type: "+typeof i);const e=Wl(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.annotations);if(!Il(i.data)){if(e)return{...i,data:[]};throw new Error("Plotly input data is not a valid array or typed array")}if(0===i.data.length){if(e)return{...i,data:[]};throw new Error("Plotly input data is empty")}return i}catch(t){throw new Error(`Invalid plotly schema: ${t}`)}})(t);try{i=Sl(i)}catch(t){return{isValid:!1,errorMessage:`Failed to decode plotly schema: ${t}`}}const e=Wl(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.annotations),r=Il(i.data)&&i.data.length>0,o=r?((t,n)=>{const i=[],e=t.map(((t,e)=>{const r=t.type;if(r&&Yl[r]){const o=Yl[r];for(const r of o)try{r(t,n)}catch(n){return i.push(`data[${e}] - type: ${t.type}, ${n}`),[-1,""]}}return[e,null!=r?r:""]})).filter((t=>t[0]>=0));if(0===e.length)throw new Error(i.join("; "));return e})(i.data,i.layout):[];if(!r&&e)return{isValid:!0,type:"annotation",validTracesInfo:[]};let u=!1,a=o.map((t=>{var n,e,r;const o=t[0],a=i.data[o];switch(a.type){case"pie":return{isValid:!0,traceIndex:o,type:"donut"};case"histogram2d":case"heatmap":return{isValid:!0,traceIndex:o,type:"heatmap"};case"sankey":return{isValid:!0,traceIndex:o,type:"sankey"};case"indicator":case"gauge":return{isValid:!0,traceIndex:o,type:"gauge"};case"histogram":return{isValid:!0,traceIndex:o,type:"verticalbar"};case"scatterpolar":return{isValid:!0,traceIndex:o,type:"scatterpolar"};case"table":return{isValid:!0,traceIndex:o,type:"table"};case"bar":const t=a;return"h"===t.orientation?Xl(t)?{isValid:!0,traceIndex:o,type:"gantt"}:{isValid:!0,traceIndex:o,type:"horizontalbar"}:Pl(t.y)?{isValid:!0,traceIndex:o,type:"groupedverticalbar"}:["group","overlay"].includes(null===(n=null==i?void 0:i.layout)||void 0===n?void 0:n.barmode)?Tl(t.y)?{isValid:!0,traceIndex:o,type:"groupedverticalbar"}:{isValid:!1,errorMessage:"GVBC does not support string y-axis."}:{isValid:!0,traceIndex:o,type:"verticalstackedbar"};case"funnel":case"funnelarea":return{isValid:!0,traceIndex:o,type:"funnel"};case"scatter":case"scattergl":const l=a;if(Jl(l,u))return u=!0,{isValid:!0,traceIndex:o,type:"gantt"};const s=zl(null!==(e=l.mode)&&void 0!==e?e:""),c=Array.isArray(null===(r=null==i?void 0:i.layout)||void 0===r?void 0:r.shapes)&&i.layout.shapes.some((t=>"line"===t.type));if(s)return{isValid:!0,traceIndex:o,type:c&&Zl(l,i.layout)?"line":"scatter"};const d=ql(l);return Kl(l,i.layout)?{isValid:!0,traceIndex:o,type:"fallback"}:{isValid:!0,traceIndex:o,type:d?"area":"line"};default:return{isValid:!1,errorMessage:`${Ll} ${a.type}`}}}));if(a.every((t=>!t.isValid)))return{isValid:!1,errorMessage:a.filter((t=>!t.isValid)).map((t=>t.errorMessage)).filter(((t,n,i)=>t&&i.indexOf(t)===n)).join("; ")};a=a.filter((t=>t.isValid));const l=a.map((t=>({index:t.traceIndex,type:t.type}))),s=a.some((t=>"groupedverticalbar"===t.type||"verticalstackedbar"===t.type));if(a.some((t=>"line"===t.type||"fallback"===t.type))){if(s)return{isValid:!0,type:a.some((t=>"verticalstackedbar"===t.type))?"fallback":"groupedverticalbar",validTracesInfo:l};if(a.some((t=>"fallback"===t.type)))return{isValid:!0,type:"fallback",validTracesInfo:l}}const c=new Set(a.map((t=>t.type)));return c.size>1?{isValid:!0,type:"composite",validTracesInfo:l}:{isValid:!0,type:Array.from(c)[0],validTracesInfo:l}}catch(t){return{isValid:!1,errorMessage:`Invalid plotly schema: ${t}`}}})(c);if(!d.isValid)throw new Error("Invalid chart schema: ".concat(d.errorMessage));var f=c;try{f=Sl(f)}catch(t){throw new Error("Failed to decode plotly schema: ".concat(t))}var v=(0,o.Cl)((0,o.Cl)({},f),{data:d.validTracesInfo.map((function(t){return f.data[t.index]}))}),h=d.validTracesInfo.map((function(t,n){return{index:n,type:t.type}})),p=c.selectedLegends,g=u.useRef(new Map),y=yg(),m=null!==(i=null==y?void 0:y.isInverted)&&void 0!==i&&i,b=u.useRef([]),x=u.useRef(!1),w=u.useRef(null),M=u.useRef(null);Il(p)||(p=[]);var C=u.useState(p),k=C[0],A=C[1],S=u.useCallback((function(t){A(t),a&&a({plotlySchema:{plotlyInput:f,selectedLegends:t}})}),[a,f]);u.useEffect((function(){var t=Hl(s.chartSchema).plotlySchema.selectedLegends;A(null!=t?t:[])}),[s.chartSchema]);var L={legendProps:{canSelectMultipleLegends:!0,onChange:S,selectedLegends:k},calloutProps:{layerProps:{eventBubblingEnabled:!0}}},D=u.useCallback((function(t){return(0,o.sH)(void 0,void 0,void 0,(function(){var n,i,e,r;return(0,o.YH)(this,(function(u){if(!M.current)throw new Error("Container reference is null");if(n=(0,o.Cl)({background:qs(M.current,y.semanticColors.bodyBackground),scale:5},t),!x.current){if(!(null===(e=null===(i=b.current[0])||void 0===i?void 0:i.compRef)||void 0===e?void 0:e.toImage))throw new Error("Chart cannot be exported as image");return[2,b.current[0].compRef.toImage(n)]}return[2,Jd(b.current.map((function(t){var n;return{container:null===(n=t.compRef)||void 0===n?void 0:n.chartContainer,row:t.row,col:t.col}})),null===(r=w.current)||void 0===r?void 0:r.toSVG,(0,l.jI)(),n)]}))}))}),[y]);if(u.useImperativeHandle(s.componentRef,(function(){return{exportAsImage:D}}),[D]),"scatterpolar"===d.type){var V=function(t){for(var n,i,e,r,u,a,l,s,c,d=(0,o.Cl)({},t),f=0,v=0,h=0;h<t.data.length;h++){var p=t.data[h].r;if(p&&Il(p))for(var g=0;g<p.length;g++)_l(p[g])||(f=Math.min(f,p[g]),v=Math.max(v,p[g]))}var y=f<0?-f:0,m=new Set;for(h=0;h<t.data.length;h++)(A=t.data[h]).theta&&Il(A.theta)&&A.theta.forEach((function(t){return m.add(String(t))}));var b=[],x=[],w=null,M=function(s){var c=t.data[s];Il(c.theta)&&(c.__axisLabel=Array.from(m)),c.x=[],c.y=[];var f=c.theta,v=c.r;if(!Il(v)||!Il(f))return d.data[s]=c,"continue";var h="clockwise"===(null===(e=null===(i=null===(n=t.layout)||void 0===n?void 0:n.polar)||void 0===i?void 0:i.angularaxis)||void 0===e?void 0:e.direction)?-1:1,p=(null!==(l=null===(a=null===(u=null===(r=t.layout)||void 0===r?void 0:r.polar)||void 0===u?void 0:u.angularaxis)||void 0===a?void 0:a.rotation)&&void 0!==l?l:0)*Math.PI/180,g=[],M=!1;Tl(f)||(g=Array.from(new Set(f)),M=!0);for(var C=0;C<v.length;C++)if(!_l(null==f?void 0:f[C])&&!_l(null==v?void 0:v[C])){var k;k=M?p+h*g.indexOf(f[C])*(2*Math.PI/g.length):p+h*(f[C]*Math.PI/180);var A=v[C]+y,S=A*Math.cos(k),L=A*Math.sin(k);0===s&&0===C&&(w=y),c.x.push(S),c.y.push(L),b.push(S),x.push(L)}c.x&&c.y&&(c.data=c.x.map((function(t,n){return(0,o.Cl)({x:t,y:c.y[n]},c.text?{text:c.text[n]}:{})}))),d.data[s]=c};for(h=0;h<t.data.length;h++)M(h);if(null!==w){for(h=0;h<d.data.length;h++)(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t-w})));for(var C=0;C<b.length;C++)b[C]=b[C]-w}var k=Math.max.apply(Math,(0,o.fX)((0,o.fX)([],b.map(Math.abs),!1),x.map(Math.abs),!1));for(k=0===k?1:k,h=0;h<d.data.length;h++){var A;(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t/(2*k)})),A.y=A.y.map((function(t){return t/(2*k)})))}var S=(null===(s=t.layout)||void 0===s?void 0:s.width)||(null===(c=t.layout)||void 0===c?void 0:c.height)||500;return d.layout=(0,o.Cl)((0,o.Cl)({},d.layout),{width:S,height:S}),d.layout.__polarOriginX=null!=w?w:void 0,d}(v);v.data=V.data,v.layout=V.layout,h.forEach((function(t,n){var i,e;if("scatterpolar"===t.type){var r=null!==(e=null===(i=v.data[n])||void 0===i?void 0:i.mode)&&void 0!==e?e:"";r.includes("line")?h[n].type="line":r.includes("markers")||"text"===r?h[n].type="scatter":h[n].type="line"}}))}var N={},O=0;"annotation"===d.type?N.x=[]:v.data.forEach((function(t,n){var i,e="";Oy(d.validTracesInfo[n].type)?(e="".concat(Hg).concat(O+1),O++):e=null!==(i=t.xaxis)&&void 0!==i?i:"x",N[e]||(N[e]=[]),N[e].push(n)})),x.current=Object.keys(N).length>1;var T=function(t,n,i){var e,r,o=[],u=[],a={},l="1fr",s="1fr",c={};if(!n)return{templateRows:l,templateColumns:s,layout:c};var d=null==t?void 0:t.layout;if(null!=d&&Object.keys(d).length>0&&Object.keys(null!=d?d:{}).forEach((function(t){var n,i,e,r,a;if(t.startsWith("xaxis")){var c=Ny(t,"xaxis"),f=null!==(i=null===(n=d[t])||void 0===n?void 0:n.anchor)&&void 0!==i?i:"y";if(c!==(p=Ny(f,"y")))throw new Error("Invalid layout: xaxis ".concat(c+1," anchor should be y").concat(p+1));var v=d[t],h={start:(null==v?void 0:v.domain)?v.domain[0]:0,end:(null==v?void 0:v.domain)?v.domain[1]:1};o.push(h)}else if(t.startsWith("yaxis")){var p;if(c=Ny(t,"yaxis"),f=null!==(r=null===(e=d[t])||void 0===e?void 0:e.anchor)&&void 0!==r?r:"x",c!==(p=Ny(f,"x"))){if(1===c&&0===p||"right"===(null===(a=d.yaxis2)||void 0===a?void 0:a.side))return{templateRows:l,templateColumns:s};throw new Error("Invalid layout: yaxis ".concat(c+1," anchor should be x").concat(p+1))}var g=d[t],y={start:(null==g?void 0:g.domain)?g.domain[0]:0,end:(null==g?void 0:g.domain)?g.domain[1]:1};u.push(y)}})),r=o.length,i.forEach((function(n,i){var e,r,a,l,s;if(Oy(n.type)){var c=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e[i],d={start:(null===(r=c.domain)||void 0===r?void 0:r.x)?c.domain.x[0]:0,end:(null===(a=c.domain)||void 0===a?void 0:a.x)?c.domain.x[1]:1},f={start:(null===(l=c.domain)||void 0===l?void 0:l.y)?c.domain.y[0]:0,end:(null===(s=c.domain)||void 0===s?void 0:s.y)?c.domain.y[1]:1};o.push(d),u.push(f)}})),null!=d&&Object.keys(d).length>0&&(null===(e=d.annotations)||void 0===e||e.forEach((function(t){var n=o.flatMap((function(n,i){return(null==t?void 0:t.x)>=n.start&&(null==t?void 0:t.x)<=n.end?[i]:[]})),i=u.findIndex((function(i,e){return n.includes(e)&&(null==t?void 0:t.y)>=i.start&&(null==t?void 0:t.y)<=i.end}));-1!==i&&(void 0===a[i]&&(a[i]={}),90===(null==t?void 0:t.textangle)?a[i].yAnnotation=t.text:a[i].xAnnotation=t.text)}))),o.length>0){var f=new Map;o.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);f.has(n)||f.set(n,t)}));var v=Array.from(f.values()).map((function(t){return t.start})).sort();s="repeat(".concat(v.length,", 1fr)"),o.forEach((function(t,n){var i=n>=r?"".concat(Hg).concat(n-r+1):"x".concat(0===n?"":n+1),e=v.findIndex((function(n){return n===t.start}))+1,o=a[n],u={row:-1,column:e,xAnnotation:null==o?void 0:o.xAnnotation,xDomain:t,yDomain:{start:0,end:1}};c[i]=u}))}if(u.length>0){var h=new Map;u.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);h.has(n)||h.set(n,t)}));var p=Array.from(h.values()).map((function(t){return t.start})).sort(),g=p.length;l="repeat(".concat(g,", 1fr)"),u.forEach((function(t,n){var i=n>=r?"".concat(Hg).concat(n-r+1):"x".concat(0===n?"":n+1),e=p.findIndex((function(n){return n===t.start})),o=g-e,u=a[n],l=null==u?void 0:u.yAnnotation,s=c[i];void 0!==s&&(s.row=o,s.yAnnotation=l,s.yDomain=t)}))}return{templateRows:l,templateColumns:s,layout:c}}(v,x.current,d.validTracesInfo);if(x.current&&T.templateRows===Ig&&T.templateColumns===Ig){if("donut"===d.type){var E=Object.keys(N);E.forEach((function(t,n){n<E.length-1&&delete N[t]}))}else Object.keys(N).forEach((function(t,n){n>0&&delete N[t]}));x.current=!1}var F,B=function(t,n,i,e,r){var o=[];return t.data.reduce((function(t,n){return t||!0===n.showlegend||void 0===n.showlegend}),!1)&&t.data.forEach((function(u,a){var l,s,c,d,f,v,h,p,g,y,m,b,x;if("donut"===e[a].type){var w=u,M=Fg(null!==(s=null===(l=t.layout)||void 0===l?void 0:l.piecolorway)&&void 0!==s?s:null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===f?void 0:f.colorway,i,null!==(h=null===(v=t.layout)||void 0===v?void 0:v.piecolorway)&&void 0!==h?h:null===(p=null==w?void 0:w.marker)||void 0===p?void 0:p.colors,n,r,!0);Il(w.labels)&&w.labels.forEach((function(i,e){var u,a,l,s,c,d="".concat(i),f=Bg(M,e,d,n,null!==(a=null===(u=t.layout)||void 0===u?void 0:u.piecolorway)&&void 0!==a?a:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,r,!0);""!==d&&!1===o.some((function(t){return t.title===d}))&&o.push({title:d,color:f})}))}else if(!1===Oy(e[a].type)){var C=u,k=C.legendgroup,A=(null===(g=C.line)||void 0===g?void 0:g.color)||(null===(y=C.marker)||void 0===y?void 0:y.color),S=Sy(C),L=Fg(null===(x=null===(b=null===(m=t.layout)||void 0===m?void 0:m.template)||void 0===b?void 0:b.layout)||void 0===x?void 0:x.colorway,i,A,n,r);void 0!==k&&""!==k&&!1===o.some((function(t){return t.title===k}))&&o.push({title:k,color:L,shape:S})}})),{legends:o,centerLegends:!0,enabledWrapLines:!0,canSelectMultipleLegends:!0}}(v,g,r,d.validTracesInfo,m);return u.createElement(u.Fragment,null,u.createElement("div",{style:{display:"grid",gridTemplateRows:T.templateRows,gridTemplateColumns:T.templateColumns},ref:M},Object.entries(N).map((function(t,n){var i,e,a,l,s,c=t[0],f=t[1],p=(0,o.Cl)((0,o.Cl)({},v),{data:f.map((function(t){return v.data[t]}))}),y=h.filter((function(t){return f.includes(t.index)})),w="fallback"===d.type||"groupedverticalbar"===d.type?d.type:null!==(e=null===(i=y[0])||void 0===i?void 0:i.type)&&void 0!==e?e:d.type;h.some((function(t){return"line"===t.type}))&&h.some((function(t){return"scatter"===t.type}))&&(w="line");var M=am[w];if(M){var C=M.transformer,k=M.renderer,A=M.preTransformCondition,S=M.preTransformOperation;if(void 0===A||A(p)){var D=S?S(p):p,V=T.layout[c],N="annotation"===w?{}:(0,o.Cl)((0,o.Cl)({},L),{xAxisAnnotation:null==V?void 0:V.xAnnotation,yAxisAnnotation:null==V?void 0:V.yAnnotation});return function(t,n,i,e,r,a){var l=n.apply(void 0,i);return u.createElement("div",{key:"".concat(r,"_").concat(a),style:{gridRowStart:r,gridRowEnd:r+1,gridColumnStart:a,gridColumnEnd:a+1}},u.createElement(t,(0,o.Cl)({},l,e)))}(k,C,[D,x.current,g,r,m],(0,o.Cl)((0,o.Cl)({},N),{xAxisAnnotation:null==V?void 0:V.xAnnotation,yAxisAnnotation:null==V?void 0:V.yAnnotation,componentRef:function(t){var i,e;b.current[n]={compRef:t,row:null!==(i=null==V?void 0:V.row)&&void 0!==i?i:1,col:null!==(e=null==V?void 0:V.column)&&void 0!==e?e:1}}}),null!==(a=null==V?void 0:V.row)&&void 0!==a?a:1,null!==(l=null==V?void 0:V.column)&&void 0!==l?l:1)}return u.createElement(u.Fragment,null)}throw new Error("Unsupported chart type :".concat(null===(s=p.data[0])||void 0===s?void 0:s.type))}))),x.current&&(F=B,u.createElement(df,(0,o.Cl)({},F,{selectedLegends:k,onChange:S,ref:w}))))}));lm.displayName="DeclarativeChart",(0,i(887).v)("@fluentui/react-charting","0.0.0"),FluentUIReactCharting=e}();
|