@nethru/kit 1.0.4 → 1.0.6
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/dist/index.esm.js +20 -45
- package/dist/index.js +30 -55
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { alpha, Box, keyframes, Stack, TextField, FormControl, Select, MenuItem, IconButton } from '@mui/material';
|
|
2
1
|
import React$1, { useMemo, createContext, useContext, useState, useEffect, useCallback, useRef } from 'react';
|
|
2
|
+
import { alpha, Box, keyframes, Stack, TextField, FormControl, Select, MenuItem, IconButton } from '@mui/material';
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import Highcharts
|
|
4
|
+
import Highcharts from 'highcharts';
|
|
5
5
|
import HighchartsReact from 'highcharts-react-official';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import 'highcharts/modules/pattern-fill.js';
|
|
7
|
+
import highchartsAccessibility from 'highcharts/modules/accessibility.js';
|
|
8
|
+
import highchartsAnnotations from 'highcharts/modules/annotations.js';
|
|
9
|
+
import { blue, purple, green, yellow, red, orange, lime, grey } from '@nethru/ui/base/colors/index.js';
|
|
9
10
|
import { Send } from '@mui/icons-material';
|
|
10
11
|
|
|
11
12
|
let globalConfig = {
|
|
@@ -20682,7 +20683,7 @@ function ToolContextProvider({
|
|
|
20682
20683
|
const kinds = useMemo(() => message.kinds ?? [], [message]);
|
|
20683
20684
|
const tools = useMemo(() => message.content.filter(c => c.type === 'tool'), [message]);
|
|
20684
20685
|
const configMap = useMemo(() => makeTaskConfigs(tools), [tools]);
|
|
20685
|
-
return /*#__PURE__*/React.createElement(ToolContext.Provider, {
|
|
20686
|
+
return /*#__PURE__*/React$1.createElement(ToolContext.Provider, {
|
|
20686
20687
|
value: {
|
|
20687
20688
|
kinds: kinds,
|
|
20688
20689
|
tools,
|
|
@@ -20867,32 +20868,6 @@ const formatDateInRange = (date, today) => {
|
|
|
20867
20868
|
return date.format('YYYY년 M월 D일');
|
|
20868
20869
|
};
|
|
20869
20870
|
|
|
20870
|
-
var patternFill = {exports: {}};
|
|
20871
|
-
|
|
20872
|
-
/**
|
|
20873
|
-
* Highcharts JS v11.3.0 (2024-01-10)
|
|
20874
|
-
*
|
|
20875
|
-
* Module for adding patterns and images as point fills.
|
|
20876
|
-
*
|
|
20877
|
-
* (c) 2010-2024 Highsoft AS
|
|
20878
|
-
* Author: Torstein Hønsi, Øystein Moseng
|
|
20879
|
-
*
|
|
20880
|
-
* License: www.highcharts.com/license
|
|
20881
|
-
*/
|
|
20882
|
-
|
|
20883
|
-
var hasRequiredPatternFill;
|
|
20884
|
-
|
|
20885
|
-
function requirePatternFill () {
|
|
20886
|
-
if (hasRequiredPatternFill) return patternFill.exports;
|
|
20887
|
-
hasRequiredPatternFill = 1;
|
|
20888
|
-
(function (module) {
|
|
20889
|
-
!function(t){module.exports?(t.default=t,module.exports=t):t("undefined"!=typeof Highcharts?Highcharts:void 0);}(function(t){var e=t?t._modules:{};function r(t,e,r,i){t.hasOwnProperty(e)||(t[e]=i.apply(null,r),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})));}r(e,"Extensions/PatternFill.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,r,i){let{animObject:a}=t,{getOptions:o}=e,{composed:n}=r,{addEvent:s,defined:h,erase:l,extend:p,merge:c,pick:d,pushUnique:f,removeEvent:u,wrap:g}=i,m=function(){let t=[],e=o().colors,r=0;for(let i of ["M 0 0 L 5 5 M 4.5 -0.5 L 5.5 0.5 M -0.5 4.5 L 0.5 5.5","M 0 5 L 5 0 M -0.5 0.5 L 0.5 -0.5 M 4.5 5.5 L 5.5 4.5","M 2 0 L 2 5 M 4 0 L 4 5","M 0 2 L 5 2 M 0 4 L 5 4","M 0 1.5 L 2.5 1.5 L 2.5 0 M 2.5 5 L 2.5 3.5 L 5 3.5"])t.push({path:i,color:e[r++],width:5,height:5,patternTransform:"scale(1.4 1.4)"});for(let i of(r=5,["M 0 0 L 5 10 L 10 0","M 3 3 L 8 3 L 8 8 L 3 8 Z","M 5 5 m -4 0 a 4 4 0 1 1 8 0 a 4 4 0 1 1 -8 0","M 0 0 L 10 10 M 9 -1 L 11 1 M -1 9 L 1 11","M 0 10 L 10 0 M -1 1 L 1 -1 M 9 11 L 11 9"]))t.push({path:i,color:e[r],width:10,height:10}),r+=5;return t}();function y(t,e){let r=JSON.stringify(t),i=r.length||0,a=0,o=0,n;if(e){n=Math.max(Math.floor(i/500),1);for(let t=0;t<i;t+=n)a+=r.charCodeAt(t);a&=a;}for(;o<i;++o)a=(a<<5)-a+r.charCodeAt(o),a&=a;return a.toString(16).replace("-","1")}function x(){if(this.renderer&&(this.renderer.defIds||[]).filter(t=>t&&t.indexOf&&0===t.indexOf("highcharts-pattern-")).length){for(let t of this.series)if(t.visible)for(let e of t.points){let t=e.options&&e.options.color;t&&t.pattern&&(t.pattern._width="defer",t.pattern._height="defer");}this.redraw(false);}}function w(){let t={},e=this.renderer,r=(e.defIds||[]).filter(t=>t.indexOf&&0===t.indexOf("highcharts-pattern-"));if(r.length)for(let i of([].forEach.call(this.renderTo.querySelectorAll('[color^="url("], [fill^="url("], [stroke^="url("]'),r=>{let i=r.getAttribute("fill")||r.getAttribute("color")||r.getAttribute("stroke");if(i){let r=i.replace(e.url,"").replace("url(#","").replace(")","");t[r]=true;}}),r))!t[i]&&(l(e.defIds,i),e.patternElements[i]&&(e.patternElements[i].destroy(),delete e.patternElements[i]));}function M(){let t=this.options.color;t&&t.pattern&&("string"==typeof t.pattern.path&&(t.pattern.path={d:t.pattern.path}),this.color=this.options.color=c(this.series.options.color,t));}function L(t){let e=t.args[0],r=t.args[1],i=t.args[2],a=this.chartIndex||0,o=e.pattern,n="#333333";if(void 0!==e.patternIndex&&m&&(o=m[e.patternIndex]),!o)return true;if(o.image||"string"==typeof o.path||o.path&&o.path.d){let t=i.parentNode&&i.parentNode.getAttribute("class");t=t&&t.indexOf("highcharts-legend")>-1,("defer"===o._width||"defer"===o._height)&&_.call({graphic:{element:i}},o),(t||!o.id)&&((o=c({},o)).id="highcharts-pattern-"+a+"-"+y(o)+y(o,true)),this.addPattern(o,!this.forExport&&d(o.animation,this.globalAnimation,{duration:100})),n=`url(${this.url}#${o.id+(this.forExport?"-export":"")})`;}else n=o.color||n;return i.setAttribute(r,n),e.toString=function(){return n},false}function b(){let t=this.chart.isResizing;if(this.isDirtyData||t||!this.chart.hasRendered)for(let e of this.points){let r=e.options&&e.options.color;r&&r.pattern&&(t&&!(e.shapeArgs&&e.shapeArgs.width&&e.shapeArgs.height)?(r.pattern._width="defer",r.pattern._height="defer"):e.calculatePatternDimensions(r.pattern));}}function _(t){if(t.width&&t.height)return;let e=this.graphic&&(this.graphic.getBBox&&this.graphic.getBBox(true)||this.graphic.element&&this.graphic.element.getBBox())||{},r=this.shapeArgs;if(r&&(e.width=r.width||e.width,e.height=r.height||e.height,e.x=r.x||e.x,e.y=r.y||e.y),t.image){if(!e.width||!e.height){t._width="defer",t._height="defer";let e=this.series.chart.mapView&&this.series.chart.mapView.getSVGTransform().scaleY;h(e)&&e<0&&(t._inverted=true);return}t.aspectRatio&&(e.aspectRatio=e.width/e.height,t.aspectRatio>e.aspectRatio?e.aspectWidth=e.height*t.aspectRatio:e.aspectHeight=e.width/t.aspectRatio),t._width=t.width||Math.ceil(e.aspectWidth||e.width),t._height=t.height||Math.ceil(e.aspectHeight||e.height);}t.width||(t._x=t.x||0,t._x+=e.x-Math.round(e.aspectWidth?Math.abs(e.aspectWidth-e.width)/2:0)),t.height||(t._y=t.y||0,t._y+=e.y-Math.round(e.aspectHeight?Math.abs(e.aspectHeight-e.height)/2:0));}function A(t,e){let r=d(e,true),o=a(r),n=t.color||"#333333",s=t.height||("number"==typeof t._height?t._height:0)||32,h=t.width||("number"==typeof t._width?t._width:0)||32,l,p=t.id,c;if(!p&&(this.idCounter=this.idCounter||0,p="highcharts-pattern-"+this.idCounter+"-"+(this.chartIndex||0),++this.idCounter),this.forExport&&(p+="-export"),this.defIds=this.defIds||[],this.defIds.indexOf(p)>-1)return;this.defIds.push(p);let f={id:p,patternUnits:"userSpaceOnUse",patternContentUnits:t.patternContentUnits||"userSpaceOnUse",width:h,height:s,x:t._x||t.x||0,y:t._y||t.y||0};t._inverted&&(f.patternTransform="scale(1, -1)",t.patternTransform&&(t.patternTransform+=" scale(1, -1)")),t.patternTransform&&(f.patternTransform=t.patternTransform);let g=this.createElement("pattern").attr(f).add(this.defs);if(g.id=p,t.path){if(c=i.isObject(t.path)?t.path:{d:t.path},t.backgroundColor){var m;m=t.backgroundColor,this.rect(0,0,h,s).attr({fill:m}).add(g);}l={d:c.d},this.styledMode||(l.stroke=c.stroke||n,l["stroke-width"]=d(c.strokeWidth,2),l.fill=c.fill||"none"),c.transform&&(l.transform=c.transform),this.createElement("path").attr(l).add(g),g.color=n;}else t.image&&(r?this.image(t.image,0,0,h,s,function(){this.animate({opacity:d(t.opacity,1)},o),u(this.element,"load");}).attr({opacity:0}).add(g):this.image(t.image,0,0,h,s).add(g));return t.image&&r||void 0===t.opacity||[].forEach.call(g.element.childNodes,e=>{e.setAttribute("opacity",t.opacity);}),this.patternElements=this.patternElements||{},this.patternElements[p]=g,g}function C(t){let e=this.options.color;e&&e.pattern&&!e.pattern.color?(delete this.options.color,t.apply(this,[].slice.call(arguments,1)),e.pattern.color=this.color,this.color=this.options.color=e):t.apply(this,[].slice.call(arguments,1));}function E(){if(!this.chart?.mapView)return;let t=this.chart,e=t.renderer,r=e.patternElements;e.defIds?.length&&r&&this.points.filter(function(t){return !!t.graphic&&(t.graphic.element.hasAttribute("fill")||t.graphic.element.hasAttribute("color")||t.graphic.element.hasAttribute("stroke"))&&!t.options.color?.pattern?.image&&!!t.group?.scaleX&&!!t.group?.scaleY}).map(function(t){let r=(t.graphic?.element.getAttribute("fill")||t.graphic?.element.getAttribute("color")||t.graphic?.element.getAttribute("stroke")||"").replace(e.url,"").replace("url(#","").replace(")","");return [r,{x:t.group?.scaleX||1,y:t.group?.scaleY||1}]}).filter(function([t,e],r,i){return ""!==t&&-1!==t.indexOf("highcharts-pattern-")&&!i.some(function([e,i],a){return e===t&&a<r})}).forEach(function([t,e]){r[t].scaleX=1/e.x,r[t].scaleY=1/e.y,r[t].updateTransform("patternTransform");});}return {compose:function t(e,r,i){let a=r.prototype.pointClass;f(n,t)&&(s(e,"endResize",x),s(e,"redraw",w),p(a.prototype,{calculatePatternDimensions:_}),s(a,"afterInit",M),s(r,"render",b),g(r.prototype,"getColor",C),s(r,"afterRender",E),s(r,"mapZoomComplete",E),p(i.prototype,{addPattern:A}),s(i,"complexColor",L));},patterns:m}}),r(e,"masters/modules/pattern-fill.src.js",[e["Core/Globals.js"],e["Extensions/PatternFill.js"]],function(t,e){t.patterns=e.patterns,e.compose(t.Chart,t.Series,t.SVGRenderer);});});
|
|
20890
|
-
} (patternFill));
|
|
20891
|
-
return patternFill.exports;
|
|
20892
|
-
}
|
|
20893
|
-
|
|
20894
|
-
requirePatternFill();
|
|
20895
|
-
|
|
20896
20871
|
const ColumnChart = ({
|
|
20897
20872
|
data,
|
|
20898
20873
|
width,
|
|
@@ -20985,7 +20960,7 @@ const ColumnChart = ({
|
|
|
20985
20960
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
20986
20961
|
style: styles$7.chartWrapper
|
|
20987
20962
|
}, /*#__PURE__*/React$1.createElement(HighchartsReact, {
|
|
20988
|
-
highcharts: Highcharts
|
|
20963
|
+
highcharts: Highcharts,
|
|
20989
20964
|
options: options
|
|
20990
20965
|
}));
|
|
20991
20966
|
};
|
|
@@ -21121,8 +21096,8 @@ const all = [[blue[500]], [purple[500], '#4168a6', '#81a7e1'], [green[500], '#de
|
|
|
21121
21096
|
const preset = ['#003f5c', '#a05195', '#665191', '#2f4b7c', '#d45087', '#f95d6a', '#ff7c43', '#ffa600'];
|
|
21122
21097
|
all.map(color => color[0]);
|
|
21123
21098
|
|
|
21124
|
-
highchartsAccessibility(Highcharts
|
|
21125
|
-
highchartsAnnotations(Highcharts
|
|
21099
|
+
highchartsAccessibility(Highcharts);
|
|
21100
|
+
highchartsAnnotations(Highcharts);
|
|
21126
21101
|
function Chart(props) {
|
|
21127
21102
|
const [legendLimitEnabled, setLegendLimitEnabled] = useState(props.legendLimit > 0);
|
|
21128
21103
|
const [options, setOptions] = useState(toOptions(props, legendLimitEnabled));
|
|
@@ -21131,8 +21106,8 @@ function Chart(props) {
|
|
|
21131
21106
|
// eslint-disable-next-line
|
|
21132
21107
|
}, [props]);
|
|
21133
21108
|
const handleLegendItemClick = useCallback(() => setLegendLimitEnabled(false), []);
|
|
21134
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, options && /*#__PURE__*/React.createElement(HighchartsReact, {
|
|
21135
|
-
highcharts: Highcharts
|
|
21109
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, options && /*#__PURE__*/React$1.createElement(HighchartsReact, {
|
|
21110
|
+
highcharts: Highcharts,
|
|
21136
21111
|
options: options
|
|
21137
21112
|
}));
|
|
21138
21113
|
}
|
|
@@ -21453,7 +21428,7 @@ const tooltipFormatter = (_this, props) => {
|
|
|
21453
21428
|
return tooltip;
|
|
21454
21429
|
};
|
|
21455
21430
|
function formatDate(data, format) {
|
|
21456
|
-
return Highcharts
|
|
21431
|
+
return Highcharts.dateFormat(format, data.getTime() - data.getTimezoneOffset() * 60000);
|
|
21457
21432
|
}
|
|
21458
21433
|
const ZIndex = {
|
|
21459
21434
|
AVERAGE_LINE_BASE: 10,
|
|
@@ -21503,7 +21478,7 @@ function TrendChart({
|
|
|
21503
21478
|
outside: props.tooltipOutSide,
|
|
21504
21479
|
legendColors
|
|
21505
21480
|
}), [isRealtime, isDaily, props.tooltipOutSide, legendColors]);
|
|
21506
|
-
return /*#__PURE__*/React.createElement(Chart, _extends({
|
|
21481
|
+
return /*#__PURE__*/React$1.createElement(Chart, _extends({
|
|
21507
21482
|
type: "areaspline",
|
|
21508
21483
|
categorize: true,
|
|
21509
21484
|
xAxisType: "datetime",
|
|
@@ -21545,7 +21520,7 @@ function StackedAreaTrendChart({
|
|
|
21545
21520
|
});
|
|
21546
21521
|
return result;
|
|
21547
21522
|
}, [metrics]);
|
|
21548
|
-
return /*#__PURE__*/React.createElement(TrendChart, _extends({
|
|
21523
|
+
return /*#__PURE__*/React$1.createElement(TrendChart, _extends({
|
|
21549
21524
|
dimension: "time",
|
|
21550
21525
|
stacking: "normal",
|
|
21551
21526
|
metrics: _metrics,
|
|
@@ -21744,7 +21719,7 @@ const PieChart = ({
|
|
|
21744
21719
|
zIndex: 1
|
|
21745
21720
|
}
|
|
21746
21721
|
}, /*#__PURE__*/React$1.createElement(HighchartsReact, {
|
|
21747
|
-
highcharts: Highcharts
|
|
21722
|
+
highcharts: Highcharts,
|
|
21748
21723
|
options: options
|
|
21749
21724
|
}))), /*#__PURE__*/React$1.createElement("div", {
|
|
21750
21725
|
style: styles$6.agentName
|
|
@@ -22213,7 +22188,7 @@ const {
|
|
|
22213
22188
|
apiUrl
|
|
22214
22189
|
} = getConfig();
|
|
22215
22190
|
const useChatApi = defaultMessages => {
|
|
22216
|
-
const [messages, setMessages] = useState(defaultMessages
|
|
22191
|
+
const [messages, setMessages] = useState(defaultMessages ? defaultMessages : []);
|
|
22217
22192
|
const [inputValue, setInputValue] = useState('');
|
|
22218
22193
|
const [isLoading, setIsLoading] = useState(false);
|
|
22219
22194
|
const [conversationId, setConversationId] = useState(null);
|
|
@@ -22306,16 +22281,16 @@ function AiChat({
|
|
|
22306
22281
|
chatContainerRef,
|
|
22307
22282
|
sendMessage
|
|
22308
22283
|
} = useChatApi(defaultMessages);
|
|
22309
|
-
return /*#__PURE__*/React.createElement(Stack, {
|
|
22284
|
+
return /*#__PURE__*/React$1.createElement(Stack, {
|
|
22310
22285
|
sx: {
|
|
22311
22286
|
...styles.container,
|
|
22312
22287
|
...sx
|
|
22313
22288
|
}
|
|
22314
|
-
}, /*#__PURE__*/React.createElement(ChatMessages, {
|
|
22289
|
+
}, /*#__PURE__*/React$1.createElement(ChatMessages, {
|
|
22315
22290
|
messages: messages,
|
|
22316
22291
|
isLoading: isLoading,
|
|
22317
22292
|
chatContainerRef: chatContainerRef
|
|
22318
|
-
}), /*#__PURE__*/React.createElement(ChatInput, {
|
|
22293
|
+
}), /*#__PURE__*/React$1.createElement(ChatInput, {
|
|
22319
22294
|
inputValue: inputValue,
|
|
22320
22295
|
setInputValue: setInputValue,
|
|
22321
22296
|
onSend: sendMessage,
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var material = require('@mui/material');
|
|
4
3
|
var React$1 = require('react');
|
|
4
|
+
var material = require('@mui/material');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var Highcharts
|
|
6
|
+
var Highcharts = require('highcharts');
|
|
7
7
|
var HighchartsReact = require('highcharts-react-official');
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
var
|
|
8
|
+
require('highcharts/modules/pattern-fill.js');
|
|
9
|
+
var highchartsAccessibility = require('highcharts/modules/accessibility.js');
|
|
10
|
+
var highchartsAnnotations = require('highcharts/modules/annotations.js');
|
|
11
|
+
var index_js = require('@nethru/ui/base/colors/index.js');
|
|
11
12
|
var iconsMaterial = require('@mui/icons-material');
|
|
12
13
|
|
|
13
14
|
let globalConfig = {
|
|
@@ -20684,7 +20685,7 @@ function ToolContextProvider({
|
|
|
20684
20685
|
const kinds = React$1.useMemo(() => message.kinds ?? [], [message]);
|
|
20685
20686
|
const tools = React$1.useMemo(() => message.content.filter(c => c.type === 'tool'), [message]);
|
|
20686
20687
|
const configMap = React$1.useMemo(() => makeTaskConfigs(tools), [tools]);
|
|
20687
|
-
return /*#__PURE__*/React.createElement(ToolContext.Provider, {
|
|
20688
|
+
return /*#__PURE__*/React$1.createElement(ToolContext.Provider, {
|
|
20688
20689
|
value: {
|
|
20689
20690
|
kinds: kinds,
|
|
20690
20691
|
tools,
|
|
@@ -20869,32 +20870,6 @@ const formatDateInRange = (date, today) => {
|
|
|
20869
20870
|
return date.format('YYYY년 M월 D일');
|
|
20870
20871
|
};
|
|
20871
20872
|
|
|
20872
|
-
var patternFill = {exports: {}};
|
|
20873
|
-
|
|
20874
|
-
/**
|
|
20875
|
-
* Highcharts JS v11.3.0 (2024-01-10)
|
|
20876
|
-
*
|
|
20877
|
-
* Module for adding patterns and images as point fills.
|
|
20878
|
-
*
|
|
20879
|
-
* (c) 2010-2024 Highsoft AS
|
|
20880
|
-
* Author: Torstein Hønsi, Øystein Moseng
|
|
20881
|
-
*
|
|
20882
|
-
* License: www.highcharts.com/license
|
|
20883
|
-
*/
|
|
20884
|
-
|
|
20885
|
-
var hasRequiredPatternFill;
|
|
20886
|
-
|
|
20887
|
-
function requirePatternFill () {
|
|
20888
|
-
if (hasRequiredPatternFill) return patternFill.exports;
|
|
20889
|
-
hasRequiredPatternFill = 1;
|
|
20890
|
-
(function (module) {
|
|
20891
|
-
!function(t){module.exports?(t.default=t,module.exports=t):t("undefined"!=typeof Highcharts?Highcharts:void 0);}(function(t){var e=t?t._modules:{};function r(t,e,r,i){t.hasOwnProperty(e)||(t[e]=i.apply(null,r),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})));}r(e,"Extensions/PatternFill.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,r,i){let{animObject:a}=t,{getOptions:o}=e,{composed:n}=r,{addEvent:s,defined:h,erase:l,extend:p,merge:c,pick:d,pushUnique:f,removeEvent:u,wrap:g}=i,m=function(){let t=[],e=o().colors,r=0;for(let i of ["M 0 0 L 5 5 M 4.5 -0.5 L 5.5 0.5 M -0.5 4.5 L 0.5 5.5","M 0 5 L 5 0 M -0.5 0.5 L 0.5 -0.5 M 4.5 5.5 L 5.5 4.5","M 2 0 L 2 5 M 4 0 L 4 5","M 0 2 L 5 2 M 0 4 L 5 4","M 0 1.5 L 2.5 1.5 L 2.5 0 M 2.5 5 L 2.5 3.5 L 5 3.5"])t.push({path:i,color:e[r++],width:5,height:5,patternTransform:"scale(1.4 1.4)"});for(let i of(r=5,["M 0 0 L 5 10 L 10 0","M 3 3 L 8 3 L 8 8 L 3 8 Z","M 5 5 m -4 0 a 4 4 0 1 1 8 0 a 4 4 0 1 1 -8 0","M 0 0 L 10 10 M 9 -1 L 11 1 M -1 9 L 1 11","M 0 10 L 10 0 M -1 1 L 1 -1 M 9 11 L 11 9"]))t.push({path:i,color:e[r],width:10,height:10}),r+=5;return t}();function y(t,e){let r=JSON.stringify(t),i=r.length||0,a=0,o=0,n;if(e){n=Math.max(Math.floor(i/500),1);for(let t=0;t<i;t+=n)a+=r.charCodeAt(t);a&=a;}for(;o<i;++o)a=(a<<5)-a+r.charCodeAt(o),a&=a;return a.toString(16).replace("-","1")}function x(){if(this.renderer&&(this.renderer.defIds||[]).filter(t=>t&&t.indexOf&&0===t.indexOf("highcharts-pattern-")).length){for(let t of this.series)if(t.visible)for(let e of t.points){let t=e.options&&e.options.color;t&&t.pattern&&(t.pattern._width="defer",t.pattern._height="defer");}this.redraw(false);}}function w(){let t={},e=this.renderer,r=(e.defIds||[]).filter(t=>t.indexOf&&0===t.indexOf("highcharts-pattern-"));if(r.length)for(let i of([].forEach.call(this.renderTo.querySelectorAll('[color^="url("], [fill^="url("], [stroke^="url("]'),r=>{let i=r.getAttribute("fill")||r.getAttribute("color")||r.getAttribute("stroke");if(i){let r=i.replace(e.url,"").replace("url(#","").replace(")","");t[r]=true;}}),r))!t[i]&&(l(e.defIds,i),e.patternElements[i]&&(e.patternElements[i].destroy(),delete e.patternElements[i]));}function M(){let t=this.options.color;t&&t.pattern&&("string"==typeof t.pattern.path&&(t.pattern.path={d:t.pattern.path}),this.color=this.options.color=c(this.series.options.color,t));}function L(t){let e=t.args[0],r=t.args[1],i=t.args[2],a=this.chartIndex||0,o=e.pattern,n="#333333";if(void 0!==e.patternIndex&&m&&(o=m[e.patternIndex]),!o)return true;if(o.image||"string"==typeof o.path||o.path&&o.path.d){let t=i.parentNode&&i.parentNode.getAttribute("class");t=t&&t.indexOf("highcharts-legend")>-1,("defer"===o._width||"defer"===o._height)&&_.call({graphic:{element:i}},o),(t||!o.id)&&((o=c({},o)).id="highcharts-pattern-"+a+"-"+y(o)+y(o,true)),this.addPattern(o,!this.forExport&&d(o.animation,this.globalAnimation,{duration:100})),n=`url(${this.url}#${o.id+(this.forExport?"-export":"")})`;}else n=o.color||n;return i.setAttribute(r,n),e.toString=function(){return n},false}function b(){let t=this.chart.isResizing;if(this.isDirtyData||t||!this.chart.hasRendered)for(let e of this.points){let r=e.options&&e.options.color;r&&r.pattern&&(t&&!(e.shapeArgs&&e.shapeArgs.width&&e.shapeArgs.height)?(r.pattern._width="defer",r.pattern._height="defer"):e.calculatePatternDimensions(r.pattern));}}function _(t){if(t.width&&t.height)return;let e=this.graphic&&(this.graphic.getBBox&&this.graphic.getBBox(true)||this.graphic.element&&this.graphic.element.getBBox())||{},r=this.shapeArgs;if(r&&(e.width=r.width||e.width,e.height=r.height||e.height,e.x=r.x||e.x,e.y=r.y||e.y),t.image){if(!e.width||!e.height){t._width="defer",t._height="defer";let e=this.series.chart.mapView&&this.series.chart.mapView.getSVGTransform().scaleY;h(e)&&e<0&&(t._inverted=true);return}t.aspectRatio&&(e.aspectRatio=e.width/e.height,t.aspectRatio>e.aspectRatio?e.aspectWidth=e.height*t.aspectRatio:e.aspectHeight=e.width/t.aspectRatio),t._width=t.width||Math.ceil(e.aspectWidth||e.width),t._height=t.height||Math.ceil(e.aspectHeight||e.height);}t.width||(t._x=t.x||0,t._x+=e.x-Math.round(e.aspectWidth?Math.abs(e.aspectWidth-e.width)/2:0)),t.height||(t._y=t.y||0,t._y+=e.y-Math.round(e.aspectHeight?Math.abs(e.aspectHeight-e.height)/2:0));}function A(t,e){let r=d(e,true),o=a(r),n=t.color||"#333333",s=t.height||("number"==typeof t._height?t._height:0)||32,h=t.width||("number"==typeof t._width?t._width:0)||32,l,p=t.id,c;if(!p&&(this.idCounter=this.idCounter||0,p="highcharts-pattern-"+this.idCounter+"-"+(this.chartIndex||0),++this.idCounter),this.forExport&&(p+="-export"),this.defIds=this.defIds||[],this.defIds.indexOf(p)>-1)return;this.defIds.push(p);let f={id:p,patternUnits:"userSpaceOnUse",patternContentUnits:t.patternContentUnits||"userSpaceOnUse",width:h,height:s,x:t._x||t.x||0,y:t._y||t.y||0};t._inverted&&(f.patternTransform="scale(1, -1)",t.patternTransform&&(t.patternTransform+=" scale(1, -1)")),t.patternTransform&&(f.patternTransform=t.patternTransform);let g=this.createElement("pattern").attr(f).add(this.defs);if(g.id=p,t.path){if(c=i.isObject(t.path)?t.path:{d:t.path},t.backgroundColor){var m;m=t.backgroundColor,this.rect(0,0,h,s).attr({fill:m}).add(g);}l={d:c.d},this.styledMode||(l.stroke=c.stroke||n,l["stroke-width"]=d(c.strokeWidth,2),l.fill=c.fill||"none"),c.transform&&(l.transform=c.transform),this.createElement("path").attr(l).add(g),g.color=n;}else t.image&&(r?this.image(t.image,0,0,h,s,function(){this.animate({opacity:d(t.opacity,1)},o),u(this.element,"load");}).attr({opacity:0}).add(g):this.image(t.image,0,0,h,s).add(g));return t.image&&r||void 0===t.opacity||[].forEach.call(g.element.childNodes,e=>{e.setAttribute("opacity",t.opacity);}),this.patternElements=this.patternElements||{},this.patternElements[p]=g,g}function C(t){let e=this.options.color;e&&e.pattern&&!e.pattern.color?(delete this.options.color,t.apply(this,[].slice.call(arguments,1)),e.pattern.color=this.color,this.color=this.options.color=e):t.apply(this,[].slice.call(arguments,1));}function E(){if(!this.chart?.mapView)return;let t=this.chart,e=t.renderer,r=e.patternElements;e.defIds?.length&&r&&this.points.filter(function(t){return !!t.graphic&&(t.graphic.element.hasAttribute("fill")||t.graphic.element.hasAttribute("color")||t.graphic.element.hasAttribute("stroke"))&&!t.options.color?.pattern?.image&&!!t.group?.scaleX&&!!t.group?.scaleY}).map(function(t){let r=(t.graphic?.element.getAttribute("fill")||t.graphic?.element.getAttribute("color")||t.graphic?.element.getAttribute("stroke")||"").replace(e.url,"").replace("url(#","").replace(")","");return [r,{x:t.group?.scaleX||1,y:t.group?.scaleY||1}]}).filter(function([t,e],r,i){return ""!==t&&-1!==t.indexOf("highcharts-pattern-")&&!i.some(function([e,i],a){return e===t&&a<r})}).forEach(function([t,e]){r[t].scaleX=1/e.x,r[t].scaleY=1/e.y,r[t].updateTransform("patternTransform");});}return {compose:function t(e,r,i){let a=r.prototype.pointClass;f(n,t)&&(s(e,"endResize",x),s(e,"redraw",w),p(a.prototype,{calculatePatternDimensions:_}),s(a,"afterInit",M),s(r,"render",b),g(r.prototype,"getColor",C),s(r,"afterRender",E),s(r,"mapZoomComplete",E),p(i.prototype,{addPattern:A}),s(i,"complexColor",L));},patterns:m}}),r(e,"masters/modules/pattern-fill.src.js",[e["Core/Globals.js"],e["Extensions/PatternFill.js"]],function(t,e){t.patterns=e.patterns,e.compose(t.Chart,t.Series,t.SVGRenderer);});});
|
|
20892
|
-
} (patternFill));
|
|
20893
|
-
return patternFill.exports;
|
|
20894
|
-
}
|
|
20895
|
-
|
|
20896
|
-
requirePatternFill();
|
|
20897
|
-
|
|
20898
20873
|
const ColumnChart = ({
|
|
20899
20874
|
data,
|
|
20900
20875
|
width,
|
|
@@ -20987,7 +20962,7 @@ const ColumnChart = ({
|
|
|
20987
20962
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
20988
20963
|
style: styles$7.chartWrapper
|
|
20989
20964
|
}, /*#__PURE__*/React$1.createElement(HighchartsReact, {
|
|
20990
|
-
highcharts: Highcharts
|
|
20965
|
+
highcharts: Highcharts,
|
|
20991
20966
|
options: options
|
|
20992
20967
|
}));
|
|
20993
20968
|
};
|
|
@@ -21117,14 +21092,14 @@ function format(value, type) {
|
|
|
21117
21092
|
}
|
|
21118
21093
|
}
|
|
21119
21094
|
|
|
21120
|
-
const all = [[
|
|
21121
|
-
[[
|
|
21122
|
-
[[material.alpha(
|
|
21095
|
+
const all = [[index_js.blue[500]], [index_js.purple[500], '#4168a6', '#81a7e1'], [index_js.green[500], '#debb7f', '#ecdbbe'], [index_js.yellow[500], '#1b8286', '#4ab3b6'], [index_js.red[500]], [index_js.orange[500]], [index_js.lime[500]], ['#54AAF9'], ['#BB4ECD'], ['#6DDBBA'], ['#FFE81C'], ['#FA7EBA'], ['#F55713'], ['#51B304'], ['#1559B2'], ['#733FAB'], ['#1C7B5F'], ['#D87500'], ['#C91E48'], ['#2F862F']];
|
|
21096
|
+
[[index_js.blue[400], index_js.blue[500]], [index_js.purple[400], index_js.purple[500]], [index_js.green[400], index_js.green[500]], [index_js.yellow[400], index_js.yellow[500]], [index_js.red[400], index_js.red[500]], [index_js.orange[400], index_js.orange[500]], [index_js.lime[400], index_js.lime[500]]];
|
|
21097
|
+
[[material.alpha(index_js.blue[500], 0.2), 'transparent', index_js.blue[300]], [material.alpha(index_js.purple[500], 0.2), 'transparent', index_js.purple[500]], [material.alpha(index_js.green[500], 0.2), 'transparent', index_js.green[500]], [material.alpha(index_js.yellow[500], 0.2), 'transparent', index_js.yellow[500]], [material.alpha(index_js.red[500], 0.2), 'transparent', index_js.red[500]], [material.alpha(index_js.orange[500], 0.2), 'transparent', index_js.orange[500]], [material.alpha(index_js.lime[500], 0.2), 'transparent', index_js.lime[500]]];
|
|
21123
21098
|
const preset = ['#003f5c', '#a05195', '#665191', '#2f4b7c', '#d45087', '#f95d6a', '#ff7c43', '#ffa600'];
|
|
21124
21099
|
all.map(color => color[0]);
|
|
21125
21100
|
|
|
21126
|
-
highchartsAccessibility(Highcharts
|
|
21127
|
-
highchartsAnnotations(Highcharts
|
|
21101
|
+
highchartsAccessibility(Highcharts);
|
|
21102
|
+
highchartsAnnotations(Highcharts);
|
|
21128
21103
|
function Chart(props) {
|
|
21129
21104
|
const [legendLimitEnabled, setLegendLimitEnabled] = React$1.useState(props.legendLimit > 0);
|
|
21130
21105
|
const [options, setOptions] = React$1.useState(toOptions(props, legendLimitEnabled));
|
|
@@ -21133,8 +21108,8 @@ function Chart(props) {
|
|
|
21133
21108
|
// eslint-disable-next-line
|
|
21134
21109
|
}, [props]);
|
|
21135
21110
|
const handleLegendItemClick = React$1.useCallback(() => setLegendLimitEnabled(false), []);
|
|
21136
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, options && /*#__PURE__*/React.createElement(HighchartsReact, {
|
|
21137
|
-
highcharts: Highcharts
|
|
21111
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, options && /*#__PURE__*/React$1.createElement(HighchartsReact, {
|
|
21112
|
+
highcharts: Highcharts,
|
|
21138
21113
|
options: options
|
|
21139
21114
|
}));
|
|
21140
21115
|
}
|
|
@@ -21175,7 +21150,7 @@ function toOptions(props, legendLimitEnabled, handleLegendItemClick) {
|
|
|
21175
21150
|
const pie = type === 'pie';
|
|
21176
21151
|
const centers = pieCenters(metrics.length);
|
|
21177
21152
|
const size = pieSize(metrics.length);
|
|
21178
|
-
const colors
|
|
21153
|
+
const colors = customColors ? customColors : preset;
|
|
21179
21154
|
const categories = records.map(record => record[dimension]);
|
|
21180
21155
|
const mainXAxis = records.map(r => r.time);
|
|
21181
21156
|
const chartColorHandlers = {
|
|
@@ -21208,7 +21183,7 @@ function toOptions(props, legendLimitEnabled, handleLegendItemClick) {
|
|
|
21208
21183
|
const {
|
|
21209
21184
|
color,
|
|
21210
21185
|
mainColor
|
|
21211
|
-
} = chartColorHandlers[chartType](colors
|
|
21186
|
+
} = chartColorHandlers[chartType](colors, index);
|
|
21212
21187
|
const meta = metas[metric];
|
|
21213
21188
|
let option = {
|
|
21214
21189
|
type: type,
|
|
@@ -21323,7 +21298,7 @@ function toOptions(props, legendLimitEnabled, handleLegendItemClick) {
|
|
|
21323
21298
|
subtitle: {
|
|
21324
21299
|
text: title
|
|
21325
21300
|
},
|
|
21326
|
-
colors: colors
|
|
21301
|
+
colors: colors,
|
|
21327
21302
|
xAxis: {
|
|
21328
21303
|
type: xAxisType,
|
|
21329
21304
|
labels: {
|
|
@@ -21331,14 +21306,14 @@ function toOptions(props, legendLimitEnabled, handleLegendItemClick) {
|
|
|
21331
21306
|
autoRotation: false,
|
|
21332
21307
|
format: xAxisLabelFormat ? `{value:${xAxisLabelFormat}}` : undefined,
|
|
21333
21308
|
style: {
|
|
21334
|
-
color:
|
|
21309
|
+
color: index_js.grey[600]
|
|
21335
21310
|
}
|
|
21336
21311
|
},
|
|
21337
21312
|
categories: categorize ? categories : undefined,
|
|
21338
21313
|
tickWidth: 1,
|
|
21339
21314
|
tickInterval: xAxisTickInterval ?? (xAxisType === 'datetime' ? records.length / 20 : 1),
|
|
21340
|
-
lineColor:
|
|
21341
|
-
tickColor:
|
|
21315
|
+
lineColor: index_js.grey[900],
|
|
21316
|
+
tickColor: index_js.grey[900],
|
|
21342
21317
|
crosshair: true,
|
|
21343
21318
|
startOnTick: true,
|
|
21344
21319
|
plotBands: xPlotIndex !== undefined ? xPlotBands : undefined,
|
|
@@ -21352,7 +21327,7 @@ function toOptions(props, legendLimitEnabled, handleLegendItemClick) {
|
|
|
21352
21327
|
enabled: yAxisLabelEnabled,
|
|
21353
21328
|
formatter: yAxisLabelFormat,
|
|
21354
21329
|
style: {
|
|
21355
|
-
color:
|
|
21330
|
+
color: index_js.grey[600]
|
|
21356
21331
|
}
|
|
21357
21332
|
},
|
|
21358
21333
|
tickInterval: yAxisTickInterval,
|
|
@@ -21455,7 +21430,7 @@ const tooltipFormatter = (_this, props) => {
|
|
|
21455
21430
|
return tooltip;
|
|
21456
21431
|
};
|
|
21457
21432
|
function formatDate(data, format) {
|
|
21458
|
-
return Highcharts
|
|
21433
|
+
return Highcharts.dateFormat(format, data.getTime() - data.getTimezoneOffset() * 60000);
|
|
21459
21434
|
}
|
|
21460
21435
|
const ZIndex = {
|
|
21461
21436
|
AVERAGE_LINE_BASE: 10,
|
|
@@ -21505,7 +21480,7 @@ function TrendChart({
|
|
|
21505
21480
|
outside: props.tooltipOutSide,
|
|
21506
21481
|
legendColors
|
|
21507
21482
|
}), [isRealtime, isDaily, props.tooltipOutSide, legendColors]);
|
|
21508
|
-
return /*#__PURE__*/React.createElement(Chart, _extends({
|
|
21483
|
+
return /*#__PURE__*/React$1.createElement(Chart, _extends({
|
|
21509
21484
|
type: "areaspline",
|
|
21510
21485
|
categorize: true,
|
|
21511
21486
|
xAxisType: "datetime",
|
|
@@ -21547,7 +21522,7 @@ function StackedAreaTrendChart({
|
|
|
21547
21522
|
});
|
|
21548
21523
|
return result;
|
|
21549
21524
|
}, [metrics]);
|
|
21550
|
-
return /*#__PURE__*/React.createElement(TrendChart, _extends({
|
|
21525
|
+
return /*#__PURE__*/React$1.createElement(TrendChart, _extends({
|
|
21551
21526
|
dimension: "time",
|
|
21552
21527
|
stacking: "normal",
|
|
21553
21528
|
metrics: _metrics,
|
|
@@ -21746,7 +21721,7 @@ const PieChart = ({
|
|
|
21746
21721
|
zIndex: 1
|
|
21747
21722
|
}
|
|
21748
21723
|
}, /*#__PURE__*/React$1.createElement(HighchartsReact, {
|
|
21749
|
-
highcharts: Highcharts
|
|
21724
|
+
highcharts: Highcharts,
|
|
21750
21725
|
options: options
|
|
21751
21726
|
}))), /*#__PURE__*/React$1.createElement("div", {
|
|
21752
21727
|
style: styles$6.agentName
|
|
@@ -22215,7 +22190,7 @@ const {
|
|
|
22215
22190
|
apiUrl
|
|
22216
22191
|
} = getConfig();
|
|
22217
22192
|
const useChatApi = defaultMessages => {
|
|
22218
|
-
const [messages, setMessages] = React$1.useState(defaultMessages
|
|
22193
|
+
const [messages, setMessages] = React$1.useState(defaultMessages ? defaultMessages : []);
|
|
22219
22194
|
const [inputValue, setInputValue] = React$1.useState('');
|
|
22220
22195
|
const [isLoading, setIsLoading] = React$1.useState(false);
|
|
22221
22196
|
const [conversationId, setConversationId] = React$1.useState(null);
|
|
@@ -22308,16 +22283,16 @@ function AiChat({
|
|
|
22308
22283
|
chatContainerRef,
|
|
22309
22284
|
sendMessage
|
|
22310
22285
|
} = useChatApi(defaultMessages);
|
|
22311
|
-
return /*#__PURE__*/React.createElement(material.Stack, {
|
|
22286
|
+
return /*#__PURE__*/React$1.createElement(material.Stack, {
|
|
22312
22287
|
sx: {
|
|
22313
22288
|
...styles.container,
|
|
22314
22289
|
...sx
|
|
22315
22290
|
}
|
|
22316
|
-
}, /*#__PURE__*/React.createElement(ChatMessages, {
|
|
22291
|
+
}, /*#__PURE__*/React$1.createElement(ChatMessages, {
|
|
22317
22292
|
messages: messages,
|
|
22318
22293
|
isLoading: isLoading,
|
|
22319
22294
|
chatContainerRef: chatContainerRef
|
|
22320
|
-
}), /*#__PURE__*/React.createElement(ChatInput, {
|
|
22295
|
+
}), /*#__PURE__*/React$1.createElement(ChatInput, {
|
|
22321
22296
|
inputValue: inputValue,
|
|
22322
22297
|
setInputValue: setInputValue,
|
|
22323
22298
|
onSend: sendMessage,
|