@tradingaction/tooltip 2.0.13
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/LICENSE +24 -0
- package/README.md +5 -0
- package/lib/BollingerBandTooltip.d.ts +40 -0
- package/lib/BollingerBandTooltip.js +48 -0
- package/lib/BollingerBandTooltip.js.map +1 -0
- package/lib/GroupTooltip.d.ts +41 -0
- package/lib/GroupTooltip.js +80 -0
- package/lib/GroupTooltip.js.map +1 -0
- package/lib/HoverTooltip.d.ts +57 -0
- package/lib/HoverTooltip.js +174 -0
- package/lib/HoverTooltip.js.map +1 -0
- package/lib/MACDTooltip.d.ts +46 -0
- package/lib/MACDTooltip.js +58 -0
- package/lib/MACDTooltip.js.map +1 -0
- package/lib/MovingAverageTooltip.d.ts +65 -0
- package/lib/MovingAverageTooltip.js +71 -0
- package/lib/MovingAverageTooltip.js.map +1 -0
- package/lib/OHLCTooltip.d.ts +65 -0
- package/lib/OHLCTooltip.js +78 -0
- package/lib/OHLCTooltip.js.map +1 -0
- package/lib/RSITooltip.d.ts +32 -0
- package/lib/RSITooltip.js +36 -0
- package/lib/RSITooltip.js.map +1 -0
- package/lib/SingleTooltip.d.ts +29 -0
- package/lib/SingleTooltip.js +82 -0
- package/lib/SingleTooltip.js.map +1 -0
- package/lib/SingleValueTooltip.d.ts +46 -0
- package/lib/SingleValueTooltip.js +65 -0
- package/lib/SingleValueTooltip.js.map +1 -0
- package/lib/StochasticTooltip.d.ts +43 -0
- package/lib/StochasticTooltip.js +44 -0
- package/lib/StochasticTooltip.js.map +1 -0
- package/lib/ToolTipTSpanLabel.d.ts +8 -0
- package/lib/ToolTipTSpanLabel.js +23 -0
- package/lib/ToolTipTSpanLabel.js.map +1 -0
- package/lib/ToolTipText.d.ts +9 -0
- package/lib/ToolTipText.js +24 -0
- package/lib/ToolTipText.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +13 -0
- package/lib/index.js.map +1 -0
- package/package.json +51 -0
- package/src/BollingerBandTooltip.tsx +99 -0
- package/src/GroupTooltip.tsx +152 -0
- package/src/HoverTooltip.tsx +270 -0
- package/src/MACDTooltip.tsx +116 -0
- package/src/MovingAverageTooltip.tsx +167 -0
- package/src/OHLCTooltip.tsx +150 -0
- package/src/RSITooltip.tsx +80 -0
- package/src/SingleTooltip.tsx +122 -0
- package/src/SingleValueTooltip.tsx +131 -0
- package/src/StochasticTooltip.tsx +97 -0
- package/src/ToolTipTSpanLabel.tsx +14 -0
- package/src/ToolTipText.tsx +15 -0
- package/src/index.ts +12 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SingleMAToolTipProps {
|
|
3
|
+
readonly color: string;
|
|
4
|
+
readonly displayName: string;
|
|
5
|
+
readonly fontFamily?: string;
|
|
6
|
+
readonly fontSize?: number;
|
|
7
|
+
readonly fontWeight?: number;
|
|
8
|
+
readonly forChart: number | string;
|
|
9
|
+
readonly labelFill?: string;
|
|
10
|
+
readonly labelFontWeight?: number;
|
|
11
|
+
readonly onClick?: (event: React.MouseEvent<SVGRectElement, MouseEvent>, details: any) => void;
|
|
12
|
+
readonly options: IMovingAverageTooltip;
|
|
13
|
+
readonly origin: [number, number];
|
|
14
|
+
readonly textFill?: string;
|
|
15
|
+
readonly value: string;
|
|
16
|
+
readonly icons?: SingleMATooltipIcon[];
|
|
17
|
+
}
|
|
18
|
+
interface SingleMATooltipIcon {
|
|
19
|
+
unicode: string;
|
|
20
|
+
onClick: (option: any) => void;
|
|
21
|
+
size?: any;
|
|
22
|
+
fillColor?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class SingleMAToolTip extends React.Component<SingleMAToolTipProps> {
|
|
25
|
+
render(): JSX.Element;
|
|
26
|
+
private readonly onClick;
|
|
27
|
+
}
|
|
28
|
+
interface IMovingAverageTooltip {
|
|
29
|
+
data?: any;
|
|
30
|
+
yAccessor: (data: any) => number;
|
|
31
|
+
type: string;
|
|
32
|
+
stroke: string;
|
|
33
|
+
windowSize: number;
|
|
34
|
+
icons?: SingleMATooltipIcon[];
|
|
35
|
+
}
|
|
36
|
+
interface MovingAverageTooltipProps {
|
|
37
|
+
readonly className?: string;
|
|
38
|
+
readonly displayFormat: (value: number) => string;
|
|
39
|
+
readonly origin: number[];
|
|
40
|
+
readonly displayInit?: string;
|
|
41
|
+
readonly displayValuesFor?: (props: MovingAverageTooltipProps, moreProps: any) => any;
|
|
42
|
+
readonly onClick?: (event: React.MouseEvent<SVGRectElement, MouseEvent>) => void;
|
|
43
|
+
readonly textFill?: string;
|
|
44
|
+
readonly labelFill?: string;
|
|
45
|
+
readonly fontFamily?: string;
|
|
46
|
+
readonly fontSize?: number;
|
|
47
|
+
readonly fontWeight?: number;
|
|
48
|
+
readonly width?: number;
|
|
49
|
+
readonly options: IMovingAverageTooltip[];
|
|
50
|
+
}
|
|
51
|
+
export declare class MovingAverageTooltip extends React.Component<MovingAverageTooltipProps> {
|
|
52
|
+
static defaultProps: {
|
|
53
|
+
className: string;
|
|
54
|
+
displayFormat: (n: number | {
|
|
55
|
+
valueOf(): number;
|
|
56
|
+
}) => string;
|
|
57
|
+
displayInit: string;
|
|
58
|
+
displayValuesFor: (_: any, props: any) => any;
|
|
59
|
+
origin: number[];
|
|
60
|
+
width: number;
|
|
61
|
+
};
|
|
62
|
+
render(): JSX.Element;
|
|
63
|
+
private readonly renderSVG;
|
|
64
|
+
}
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { functor, GenericChartComponent, last } from "@tradingaction/core";
|
|
2
|
+
import { format } from "d3-format";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ToolTipText } from "./ToolTipText";
|
|
5
|
+
import { ToolTipTSpanLabel } from "./ToolTipTSpanLabel";
|
|
6
|
+
export class SingleMAToolTip extends React.Component {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.onClick = (event) => {
|
|
10
|
+
const { onClick, forChart, options } = this.props;
|
|
11
|
+
if (onClick !== undefined) {
|
|
12
|
+
onClick(event, Object.assign({ chartId: forChart }, options));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
var _a;
|
|
18
|
+
const { color, displayName, fontSize, fontFamily, fontWeight, textFill, labelFill, labelFontWeight, value } = this.props;
|
|
19
|
+
const translate = "translate(" + this.props.origin[0] + ", " + this.props.origin[1] + ")";
|
|
20
|
+
const handleIconClick = (e, icon) => {
|
|
21
|
+
if (typeof icon.onClick == "function") {
|
|
22
|
+
e.stopPropagation();
|
|
23
|
+
icon.onClick(this.props.options);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
return (React.createElement("g", { transform: translate, onClick: this.onClick },
|
|
27
|
+
React.createElement("line", { x1: 0, y1: 2, x2: 0, y2: 28, stroke: color, strokeWidth: 4 }),
|
|
28
|
+
React.createElement(ToolTipText, { x: 5, y: 11, fontFamily: fontFamily, fontSize: fontSize, fontWeight: fontWeight },
|
|
29
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill, fontWeight: labelFontWeight }, displayName),
|
|
30
|
+
React.createElement("tspan", { x: 5, dy: 15, fill: textFill }, value), (_a = this.props.icons) === null || _a === void 0 ? void 0 :
|
|
31
|
+
_a.map((i) => {
|
|
32
|
+
return React.createElement("tspan", { fontSize: i.size, fill: i.fillColor || '#000', onClick: (e) => handleIconClick(e, i) },
|
|
33
|
+
"\u00A0",
|
|
34
|
+
i.unicode);
|
|
35
|
+
}))));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// tslint:disable-next-line: max-classes-per-file
|
|
39
|
+
export class MovingAverageTooltip extends React.Component {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.renderSVG = (moreProps) => {
|
|
43
|
+
var _a;
|
|
44
|
+
const { chartId, chartConfig, chartConfig: { height = 0 } = {}, fullData } = moreProps;
|
|
45
|
+
const { className, displayInit = MovingAverageTooltip.defaultProps.displayInit, onClick, width = 65, fontFamily, fontSize, fontWeight, textFill, labelFill, origin: originProp, displayFormat, displayValuesFor = MovingAverageTooltip.defaultProps.displayValuesFor, options, } = this.props;
|
|
46
|
+
const currentItem = (_a = displayValuesFor(this.props, moreProps)) !== null && _a !== void 0 ? _a : last(fullData);
|
|
47
|
+
const config = chartConfig;
|
|
48
|
+
const origin = functor(originProp);
|
|
49
|
+
const [x, y] = origin(width, height);
|
|
50
|
+
const [ox, oy] = config.origin;
|
|
51
|
+
return (React.createElement("g", { transform: `translate(${ox + x}, ${oy + y})`, className: className }, options.map((each, idx) => {
|
|
52
|
+
const yValue = currentItem && each.yAccessor(currentItem);
|
|
53
|
+
const tooltipLabel = `${each.type} (${each.windowSize})`;
|
|
54
|
+
const yDisplayValue = yValue ? displayFormat(yValue) : displayInit;
|
|
55
|
+
return (React.createElement(SingleMAToolTip, { key: idx, origin: [width * idx, 0], color: each.stroke, displayName: tooltipLabel, value: yDisplayValue, options: each, forChart: chartId, onClick: onClick, fontFamily: fontFamily, fontSize: fontSize, fontWeight: fontWeight, textFill: textFill, labelFill: labelFill, icons: each.icons }));
|
|
56
|
+
})));
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
return React.createElement(GenericChartComponent, { clip: false, svgDraw: this.renderSVG, drawOn: ["mousemove"] });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
MovingAverageTooltip.defaultProps = {
|
|
64
|
+
className: "react-financial-charts-tooltip react-financial-charts-moving-average-tooltip",
|
|
65
|
+
displayFormat: format(".2f"),
|
|
66
|
+
displayInit: "n/a",
|
|
67
|
+
displayValuesFor: (_, props) => props.currentItem,
|
|
68
|
+
origin: [0, 10],
|
|
69
|
+
width: 65,
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=MovingAverageTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MovingAverageTooltip.js","sour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AE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,YAAY,EACzB,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,IAAI,CAAC,KAAK,GACnB,CACL,CAAC;YACN,CAAC,CAAC,CACF,CACP,CAAC;QACN,CAAC,CAAC;IACN,CAAC;IA5DU,MAAM;QACT,OAAO,oBAAC,qBAAqB,IAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,WAAW,CAAC,GAAI,CAAC;IAClG,CAAC;;AAXa,iCAAY,GAAG;IACzB,SAAS,EAAE,8EAA8E;IACzF,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC;IAC5B,WAAW,EAAE,KAAK;IAClB,gBAAgB,EAAE,CAAC,CAAM,EAAE,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW;IAC3D,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;IACf,KAAK,EAAE,EAAE;CACZ,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface OHLCTooltipProps {
|
|
3
|
+
readonly accessor?: (data: any) => any;
|
|
4
|
+
readonly className?: string;
|
|
5
|
+
readonly changeFormat?: (n: number | {
|
|
6
|
+
valueOf(): number;
|
|
7
|
+
}) => string;
|
|
8
|
+
readonly displayTexts?: {
|
|
9
|
+
o: string;
|
|
10
|
+
h: string;
|
|
11
|
+
l: string;
|
|
12
|
+
c: string;
|
|
13
|
+
v: string;
|
|
14
|
+
na: string;
|
|
15
|
+
};
|
|
16
|
+
readonly displayValuesFor?: (props: OHLCTooltipProps, moreProps: any) => any;
|
|
17
|
+
readonly fontFamily?: string;
|
|
18
|
+
readonly fontSize?: number;
|
|
19
|
+
readonly fontWeight?: number;
|
|
20
|
+
readonly labelFill?: string;
|
|
21
|
+
readonly labelFontWeight?: number;
|
|
22
|
+
readonly ohlcFormat?: (n: number | {
|
|
23
|
+
valueOf(): number;
|
|
24
|
+
}) => string;
|
|
25
|
+
readonly onClick?: (event: React.MouseEvent<SVGGElement, MouseEvent>) => void;
|
|
26
|
+
readonly origin?: [number, number] | ((width: number, height: number) => [number, number]);
|
|
27
|
+
readonly percentFormat?: (n: number | {
|
|
28
|
+
valueOf(): number;
|
|
29
|
+
}) => string;
|
|
30
|
+
readonly volumeFormat?: (n: number | {
|
|
31
|
+
valueOf(): number;
|
|
32
|
+
}) => string;
|
|
33
|
+
readonly textFill?: string | ((item: any) => string);
|
|
34
|
+
}
|
|
35
|
+
export declare class OHLCTooltip extends React.Component<OHLCTooltipProps> {
|
|
36
|
+
static defaultProps: {
|
|
37
|
+
accessor: (d: unknown) => unknown;
|
|
38
|
+
changeFormat: (n: number | {
|
|
39
|
+
valueOf(): number;
|
|
40
|
+
}) => string;
|
|
41
|
+
className: string;
|
|
42
|
+
displayTexts: {
|
|
43
|
+
o: string;
|
|
44
|
+
h: string;
|
|
45
|
+
l: string;
|
|
46
|
+
c: string;
|
|
47
|
+
v: string;
|
|
48
|
+
na: string;
|
|
49
|
+
};
|
|
50
|
+
displayValuesFor: (_: any, props: any) => any;
|
|
51
|
+
fontFamily: string;
|
|
52
|
+
ohlcFormat: (n: number | {
|
|
53
|
+
valueOf(): number;
|
|
54
|
+
}) => string;
|
|
55
|
+
origin: number[];
|
|
56
|
+
percentFormat: (n: number | {
|
|
57
|
+
valueOf(): number;
|
|
58
|
+
}) => string;
|
|
59
|
+
volumeFormat: (n: number | {
|
|
60
|
+
valueOf(): number;
|
|
61
|
+
}) => string;
|
|
62
|
+
};
|
|
63
|
+
render(): JSX.Element;
|
|
64
|
+
private readonly renderSVG;
|
|
65
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { functor, GenericChartComponent, last } from "@tradingaction/core";
|
|
2
|
+
import { format } from "d3-format";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ToolTipText } from "./ToolTipText";
|
|
5
|
+
import { ToolTipTSpanLabel } from "./ToolTipTSpanLabel";
|
|
6
|
+
const displayTextsDefault = {
|
|
7
|
+
o: "O: ",
|
|
8
|
+
h: " H: ",
|
|
9
|
+
l: " L: ",
|
|
10
|
+
c: " C: ",
|
|
11
|
+
v: " Vol: ",
|
|
12
|
+
na: "n/a",
|
|
13
|
+
};
|
|
14
|
+
export class OHLCTooltip extends React.Component {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.renderSVG = (moreProps) => {
|
|
18
|
+
var _a;
|
|
19
|
+
const { accessor, changeFormat = OHLCTooltip.defaultProps.changeFormat, className, displayTexts = OHLCTooltip.defaultProps.displayTexts, displayValuesFor = OHLCTooltip.defaultProps.displayValuesFor, fontFamily, fontSize, fontWeight, labelFill, labelFontWeight, ohlcFormat = OHLCTooltip.defaultProps.ohlcFormat, onClick, percentFormat = OHLCTooltip.defaultProps.percentFormat, volumeFormat = OHLCTooltip.defaultProps.volumeFormat, textFill, } = this.props;
|
|
20
|
+
const { chartConfig: { width, height }, fullData, } = moreProps;
|
|
21
|
+
const currentItem = (_a = displayValuesFor(this.props, moreProps)) !== null && _a !== void 0 ? _a : last(fullData);
|
|
22
|
+
let open = displayTexts.na;
|
|
23
|
+
let high = displayTexts.na;
|
|
24
|
+
let low = displayTexts.na;
|
|
25
|
+
let close = displayTexts.na;
|
|
26
|
+
let change = displayTexts.na;
|
|
27
|
+
if (currentItem !== undefined && accessor !== undefined) {
|
|
28
|
+
const item = accessor(currentItem);
|
|
29
|
+
let formatForChange = `${changeFormat(item.close - item.open)}`;
|
|
30
|
+
const percent = percentFormat((item.close - item.open) / item.open);
|
|
31
|
+
if (percent) {
|
|
32
|
+
formatForChange += ` (${percent})`;
|
|
33
|
+
}
|
|
34
|
+
const volumeValue = volumeFormat(item.volume || 0).replace(/G/, "B");
|
|
35
|
+
if (volumeValue) {
|
|
36
|
+
formatForChange += ` ${displayTexts.v}${volumeValue}`;
|
|
37
|
+
}
|
|
38
|
+
if (item !== undefined) {
|
|
39
|
+
open = ohlcFormat(item.open);
|
|
40
|
+
high = ohlcFormat(item.high);
|
|
41
|
+
low = ohlcFormat(item.low);
|
|
42
|
+
close = ohlcFormat(item.close);
|
|
43
|
+
change = formatForChange;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const { origin: originProp } = this.props;
|
|
47
|
+
const [x, y] = functor(originProp)(width, height);
|
|
48
|
+
const valueFill = functor(textFill)(currentItem);
|
|
49
|
+
return (React.createElement("g", { className: className, transform: `translate(${x}, ${y})`, onClick: onClick },
|
|
50
|
+
React.createElement(ToolTipText, { x: 0, y: 0, fontFamily: fontFamily, fontSize: fontSize, fontWeight: fontWeight },
|
|
51
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill, fontWeight: labelFontWeight, key: "label_O" }, displayTexts.o),
|
|
52
|
+
React.createElement("tspan", { key: "value_O", fill: valueFill }, open),
|
|
53
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill, fontWeight: labelFontWeight, key: "label_H" }, displayTexts.h),
|
|
54
|
+
React.createElement("tspan", { key: "value_H", fill: valueFill }, high),
|
|
55
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill, fontWeight: labelFontWeight, key: "label_L" }, displayTexts.l),
|
|
56
|
+
React.createElement("tspan", { key: "value_L", fill: valueFill }, low),
|
|
57
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill, fontWeight: labelFontWeight, key: "label_C" }, displayTexts.c),
|
|
58
|
+
React.createElement("tspan", { key: "value_C", fill: valueFill }, close),
|
|
59
|
+
React.createElement("tspan", { key: "value_Change", fill: valueFill }, ` ${change}`))));
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
return React.createElement(GenericChartComponent, { clip: false, svgDraw: this.renderSVG, drawOn: ["mousemove"] });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
OHLCTooltip.defaultProps = {
|
|
67
|
+
accessor: (d) => d,
|
|
68
|
+
changeFormat: format("+.2f"),
|
|
69
|
+
className: "react-financial-charts-tooltip-hover",
|
|
70
|
+
displayTexts: displayTextsDefault,
|
|
71
|
+
displayValuesFor: (_, props) => props.currentItem,
|
|
72
|
+
fontFamily: "-apple-system, system-ui, 'Helvetica Neue', Ubuntu, sans-serif",
|
|
73
|
+
ohlcFormat: format(".2f"),
|
|
74
|
+
origin: [0, 0],
|
|
75
|
+
percentFormat: format("+.2%"),
|
|
76
|
+
volumeFormat: format("0.2s"),
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=OHLCTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OHLCTooltip.js","sourceRoot":"","sources":["../src/OHLCTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,mBAAmB,GAAG;IACxB,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,QAAQ;IACX,EAAE,EAAE,KAAK;CACZ,CAAC;AA4BF,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAA2B;IAAlE;;QAkBqB,cAAS,GAAG,CAAC,SAAc,EAAE,EAAE;;YAC5C,MAAM,EACF,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AAC,WAAW;IAC3D,UAAU,EAAE,gEAAgE;IAC5E,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RSITooltipProps {
|
|
3
|
+
readonly className?: string;
|
|
4
|
+
readonly displayFormat: (value: number) => string;
|
|
5
|
+
readonly displayInit?: string;
|
|
6
|
+
readonly displayValuesFor: (props: RSITooltipProps, moreProps: any) => any;
|
|
7
|
+
readonly fontFamily?: string;
|
|
8
|
+
readonly fontSize?: number;
|
|
9
|
+
readonly fontWeight?: number;
|
|
10
|
+
readonly labelFill?: string;
|
|
11
|
+
readonly labelFontWeight?: number;
|
|
12
|
+
readonly onClick?: (event: React.MouseEvent<SVGGElement, MouseEvent>) => void;
|
|
13
|
+
readonly origin: number[] | ((width: number, height: number) => number[]);
|
|
14
|
+
readonly options: {
|
|
15
|
+
windowSize: number;
|
|
16
|
+
};
|
|
17
|
+
readonly textFill?: string;
|
|
18
|
+
readonly yAccessor: (data: any) => number | undefined;
|
|
19
|
+
}
|
|
20
|
+
export declare class RSITooltip extends React.Component<RSITooltipProps> {
|
|
21
|
+
static defaultProps: {
|
|
22
|
+
displayFormat: (n: number | {
|
|
23
|
+
valueOf(): number;
|
|
24
|
+
}) => string;
|
|
25
|
+
displayInit: string;
|
|
26
|
+
displayValuesFor: (_: RSITooltipProps, props: any) => any;
|
|
27
|
+
origin: number[];
|
|
28
|
+
className: string;
|
|
29
|
+
};
|
|
30
|
+
render(): JSX.Element;
|
|
31
|
+
private readonly renderSVG;
|
|
32
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { functor, isDefined, GenericChartComponent } from "@tradingaction/core";
|
|
2
|
+
import { format } from "d3-format";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ToolTipText } from "./ToolTipText";
|
|
5
|
+
import { ToolTipTSpanLabel } from "./ToolTipTSpanLabel";
|
|
6
|
+
export class RSITooltip extends React.Component {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.renderSVG = (moreProps) => {
|
|
10
|
+
const { onClick, displayInit, fontFamily, fontSize, fontWeight, yAccessor, displayFormat, className, options, labelFill, labelFontWeight, textFill, displayValuesFor, } = this.props;
|
|
11
|
+
const { chartConfig: { width, height }, } = moreProps;
|
|
12
|
+
const currentItem = displayValuesFor(this.props, moreProps);
|
|
13
|
+
const rsi = isDefined(currentItem) && yAccessor(currentItem);
|
|
14
|
+
const value = (rsi && displayFormat(rsi)) || displayInit;
|
|
15
|
+
const { origin: originProp } = this.props;
|
|
16
|
+
const origin = functor(originProp);
|
|
17
|
+
const [x, y] = origin(width, height);
|
|
18
|
+
const tooltipLabel = `RSI (${options.windowSize}): `;
|
|
19
|
+
return (React.createElement("g", { className: className, transform: `translate(${x}, ${y})`, onClick: onClick },
|
|
20
|
+
React.createElement(ToolTipText, { x: 0, y: 0, fontFamily: fontFamily, fontSize: fontSize, fontWeight: fontWeight },
|
|
21
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill, fontWeight: labelFontWeight }, tooltipLabel),
|
|
22
|
+
React.createElement("tspan", { fill: textFill }, value))));
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return React.createElement(GenericChartComponent, { clip: false, svgDraw: this.renderSVG, drawOn: ["mousemove"] });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
RSITooltip.defaultProps = {
|
|
30
|
+
displayFormat: format(".2f"),
|
|
31
|
+
displayInit: "n/a",
|
|
32
|
+
displayValuesFor: (_, props) => props.currentItem,
|
|
33
|
+
origin: [0, 0],
|
|
34
|
+
className: "react-financial-charts-tooltip",
|
|
35
|
+
};
|
|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M,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAErC,MAAM,YAAY,GAAG,QAAQ,OAAO,CAAC,UAAU,KAAK,CAAC;YACrD,OAAO,CACH,2BAAG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO;gBACzE,oBAAC,WAAW,IAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU;oBACvF,oBAAC,iBAAiB,IAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,IAC1D,YAAY,CACG;oBACpB,+BAAO,IAAI,EAAE,QAAQ,IAAG,KAAK,CAAS,CAC5B,CACd,CACP,CAAC;QACN,CAAC,CAAC;IACN,CAAC;IA7CU,MAAM;QACT,OAAO,oBAAC,qBAAqB,IAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,WAAW,CAAC,GAAI,CAAC;IAClG,CAAC;;AAVa,uBAAY,GAAG;IACzB,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC;IAC5B,WAAW,EAAE,KAAK;IAClB,gBAAgB,EAAE,CAAC,CAAkB,EAAE,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW;IACvE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,SAAS,EAAE,gCAAgC;CAC9C,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type layouts = "horizontal" | "horizontalRows" | "horizontalInline" | "vertical" | "verticalRows";
|
|
3
|
+
export interface SingleTooltipProps {
|
|
4
|
+
readonly origin: [number, number];
|
|
5
|
+
readonly yLabel: string;
|
|
6
|
+
readonly yValue: string;
|
|
7
|
+
readonly onClick?: (event: React.MouseEvent, details: any) => void;
|
|
8
|
+
readonly fontFamily?: string;
|
|
9
|
+
readonly fontSize?: number;
|
|
10
|
+
readonly fontWeight?: number;
|
|
11
|
+
readonly labelFill: string;
|
|
12
|
+
readonly valueFill: string;
|
|
13
|
+
readonly forChart: number | string;
|
|
14
|
+
readonly options: any;
|
|
15
|
+
readonly layout: layouts;
|
|
16
|
+
readonly withShape: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class SingleTooltip extends React.Component<SingleTooltipProps> {
|
|
19
|
+
static defaultProps: {
|
|
20
|
+
labelFill: string;
|
|
21
|
+
valueFill: string;
|
|
22
|
+
withShape: boolean;
|
|
23
|
+
};
|
|
24
|
+
renderValueNextToLabel(): JSX.Element;
|
|
25
|
+
renderValueBeneathLabel(): JSX.Element;
|
|
26
|
+
renderInline(): JSX.Element;
|
|
27
|
+
render(): JSX.Element;
|
|
28
|
+
private readonly handleClick;
|
|
29
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ToolTipText } from "./ToolTipText";
|
|
3
|
+
import { ToolTipTSpanLabel } from "./ToolTipTSpanLabel";
|
|
4
|
+
export class SingleTooltip extends React.Component {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.handleClick = (event) => {
|
|
8
|
+
const { onClick, forChart, options } = this.props;
|
|
9
|
+
if (onClick !== undefined) {
|
|
10
|
+
onClick(event, Object.assign({ chartId: forChart }, options));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/*
|
|
15
|
+
* Renders the value next to the label.
|
|
16
|
+
*/
|
|
17
|
+
renderValueNextToLabel() {
|
|
18
|
+
const { origin, yLabel, yValue, labelFill, valueFill, withShape, fontSize, fontFamily, fontWeight } = this.props;
|
|
19
|
+
return (React.createElement("g", { transform: `translate(${origin[0]}, ${origin[1]})`, onClick: this.handleClick },
|
|
20
|
+
withShape ? React.createElement("rect", { x: "0", y: "-6", width: "6", height: "6", fill: valueFill }) : null,
|
|
21
|
+
React.createElement(ToolTipText, { x: withShape ? 8 : 0, y: 0, fontFamily: fontFamily, fontSize: fontSize, fontWeight: fontWeight },
|
|
22
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill },
|
|
23
|
+
yLabel,
|
|
24
|
+
": "),
|
|
25
|
+
React.createElement("tspan", { fill: valueFill }, yValue))));
|
|
26
|
+
}
|
|
27
|
+
/*
|
|
28
|
+
* Renders the value beneath the label.
|
|
29
|
+
*/
|
|
30
|
+
renderValueBeneathLabel() {
|
|
31
|
+
const { origin, yLabel, yValue, labelFill, valueFill, withShape, fontSize, fontFamily, fontWeight } = this.props;
|
|
32
|
+
return (React.createElement("g", { transform: `translate(${origin[0]}, ${origin[1]})`, onClick: this.handleClick },
|
|
33
|
+
withShape ? React.createElement("line", { x1: 0, y1: 2, x2: 0, y2: 28, stroke: valueFill, strokeWidth: "4px" }) : null,
|
|
34
|
+
React.createElement(ToolTipText, { x: 5, y: 11, fontFamily: fontFamily, fontSize: fontSize, fontWeight: fontWeight },
|
|
35
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill }, yLabel),
|
|
36
|
+
React.createElement("tspan", { x: "5", dy: "15", fill: valueFill }, yValue))));
|
|
37
|
+
}
|
|
38
|
+
/*
|
|
39
|
+
* Renders the value next to the label.
|
|
40
|
+
* The parent component must have a "text"-element.
|
|
41
|
+
*/
|
|
42
|
+
renderInline() {
|
|
43
|
+
const { yLabel, yValue, labelFill, valueFill, fontSize, fontFamily, fontWeight } = this.props;
|
|
44
|
+
return (React.createElement("tspan", { onClick: this.handleClick, fontFamily: fontFamily, fontSize: fontSize, fontWeight: fontWeight },
|
|
45
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill },
|
|
46
|
+
yLabel,
|
|
47
|
+
":\u00A0"),
|
|
48
|
+
React.createElement("tspan", { fill: valueFill },
|
|
49
|
+
yValue,
|
|
50
|
+
"\u00A0\u00A0")));
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
const { layout } = this.props;
|
|
54
|
+
let comp = null;
|
|
55
|
+
switch (layout) {
|
|
56
|
+
case "horizontal":
|
|
57
|
+
comp = this.renderValueNextToLabel();
|
|
58
|
+
break;
|
|
59
|
+
case "horizontalRows":
|
|
60
|
+
comp = this.renderValueBeneathLabel();
|
|
61
|
+
break;
|
|
62
|
+
case "horizontalInline":
|
|
63
|
+
comp = this.renderInline();
|
|
64
|
+
break;
|
|
65
|
+
case "vertical":
|
|
66
|
+
comp = this.renderValueNextToLabel();
|
|
67
|
+
break;
|
|
68
|
+
case "verticalRows":
|
|
69
|
+
comp = this.renderValueBeneathLabel();
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
comp = this.renderValueNextToLabel();
|
|
73
|
+
}
|
|
74
|
+
return comp;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
SingleTooltip.defaultProps = {
|
|
78
|
+
labelFill: "#4682B4",
|
|
79
|
+
valueFill: "#000000",
|
|
80
|
+
withShape: false,
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=SingleTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleTooltip.js","sourceRoot":"","sources":["../src/SingleTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAoBxD,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAA6B;IAAtE;;QA6FqB,gBAAW,GAAG,CAAC,KAAuB,EAAE,EAAE;YACvD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAClD,IAAI,OAAO,KAAK,SAAS,EAAE;gBACvB,OAAO,CAAC,KAAK,kBAAI,OAAO,EAAE,QAAQ,IAAK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,IAAI,CAAC,uBAAuB,EAAE,CAAC;gBACtC,MAAM;YACV,KAAK,kBAAkB;gBACnB,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;gBAC3B,MAAM;YACV,KAAK,UAAU;gBACX,IAAI,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;gBACrC,MAAM;YACV,KAAK,cAAc;gBACf,IAAI,GAAG,IAAI,CAAC,uBAAuB,EAAE,CAAC;gBACtC,MAAM;YACV;gBACI,IAAI,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;SAC5C;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;;AA1Fa,0BAAY,GAAG;IACzB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,KAAK;CACnB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface SingleValueTooltipIcon {
|
|
3
|
+
unicode: string;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
size?: any;
|
|
6
|
+
fillColor?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SingleValueTooltipProps {
|
|
9
|
+
readonly xDisplayFormat?: (value: number) => string;
|
|
10
|
+
readonly yDisplayFormat?: (value: number) => string;
|
|
11
|
+
readonly xInitDisplay?: string;
|
|
12
|
+
readonly yInitDisplay?: string;
|
|
13
|
+
readonly xLabel?: string;
|
|
14
|
+
readonly yLabel: string;
|
|
15
|
+
readonly labelFill?: string;
|
|
16
|
+
readonly labelFontWeight?: number;
|
|
17
|
+
readonly valueFill?: string;
|
|
18
|
+
readonly origin?: [number, number] | ((width: number, height: number) => [number, number]);
|
|
19
|
+
readonly className?: string;
|
|
20
|
+
readonly fontFamily?: string;
|
|
21
|
+
readonly fontSize?: number;
|
|
22
|
+
readonly fontWeight?: number;
|
|
23
|
+
readonly onClick?: (event: React.MouseEvent<SVGGElement, MouseEvent>) => void;
|
|
24
|
+
readonly displayValuesFor?: (props: SingleValueTooltipProps, moreProps: any) => any;
|
|
25
|
+
readonly xAccessor?: (d: any) => number;
|
|
26
|
+
readonly yAccessor?: (d: any) => number;
|
|
27
|
+
readonly icons?: SingleValueTooltipIcon[];
|
|
28
|
+
}
|
|
29
|
+
export declare class SingleValueTooltip extends React.Component<SingleValueTooltipProps> {
|
|
30
|
+
static defaultProps: {
|
|
31
|
+
className: string;
|
|
32
|
+
displayValuesFor: (_: any, props: any) => any;
|
|
33
|
+
labelFill: string;
|
|
34
|
+
origin: number[];
|
|
35
|
+
valueFill: string;
|
|
36
|
+
xAccessor: () => void;
|
|
37
|
+
xDisplayFormat: (value: number) => string;
|
|
38
|
+
xInitDisplay: string;
|
|
39
|
+
yAccessor: (d: any) => number;
|
|
40
|
+
yDisplayFormat: (value: number) => string;
|
|
41
|
+
yInitDisplay: string;
|
|
42
|
+
};
|
|
43
|
+
render(): JSX.Element;
|
|
44
|
+
private readonly renderSVG;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { functor, identity, GenericChartComponent, noop, last } from "@tradingaction/core";
|
|
2
|
+
import { format } from "d3-format";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ToolTipText } from "./ToolTipText";
|
|
5
|
+
import { ToolTipTSpanLabel } from "./ToolTipTSpanLabel";
|
|
6
|
+
export class SingleValueTooltip extends React.Component {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.renderSVG = (moreProps) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const { onClick, fontFamily, fontSize, fontWeight, labelFill, labelFontWeight, valueFill, className, displayValuesFor = SingleValueTooltip.defaultProps.displayValuesFor, origin: originProp, xDisplayFormat = SingleValueTooltip.defaultProps.xDisplayFormat, yDisplayFormat = SingleValueTooltip.defaultProps.yDisplayFormat, xLabel, yLabel, xAccessor = SingleValueTooltip.defaultProps.xAccessor, yAccessor = SingleValueTooltip.defaultProps.yAccessor, xInitDisplay, yInitDisplay, } = this.props;
|
|
12
|
+
const { chartConfig: { width, height }, fullData, } = moreProps;
|
|
13
|
+
const currentItem = (_a = displayValuesFor(this.props, moreProps)) !== null && _a !== void 0 ? _a : last(fullData);
|
|
14
|
+
let xDisplayValue = xInitDisplay;
|
|
15
|
+
let yDisplayValue = yInitDisplay;
|
|
16
|
+
if (currentItem !== undefined) {
|
|
17
|
+
const xItem = xAccessor(currentItem);
|
|
18
|
+
if (xItem !== undefined) {
|
|
19
|
+
xDisplayValue = xDisplayFormat(xItem);
|
|
20
|
+
}
|
|
21
|
+
const yItem = yAccessor(currentItem);
|
|
22
|
+
if (yItem !== undefined) {
|
|
23
|
+
yDisplayValue = yDisplayFormat(yItem);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const origin = functor(originProp);
|
|
27
|
+
const [x, y] = origin(width, height);
|
|
28
|
+
const handleIconClick = (e, icon) => {
|
|
29
|
+
if (typeof icon.onClick == "function") {
|
|
30
|
+
e.stopPropagation();
|
|
31
|
+
icon.onClick();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return (React.createElement(React.Fragment, null,
|
|
35
|
+
React.createElement("g", { className: className, transform: `translate(${x}, ${y})`, onClick: onClick },
|
|
36
|
+
React.createElement(ToolTipText, { x: 0, y: 0, fontFamily: fontFamily, fontSize: fontSize, fontWeight: fontWeight },
|
|
37
|
+
xLabel ? (React.createElement(ToolTipTSpanLabel, { x: 0, dy: "5", fill: labelFill }, `${xLabel}: `)) : null,
|
|
38
|
+
xLabel ? React.createElement("tspan", { fill: valueFill }, `${xDisplayValue} `) : null,
|
|
39
|
+
React.createElement(ToolTipTSpanLabel, { fill: labelFill, fontWeight: labelFontWeight }, `${yLabel} `),
|
|
40
|
+
React.createElement("tspan", { fill: valueFill }, yDisplayValue), (_b = this.props.icons) === null || _b === void 0 ? void 0 :
|
|
41
|
+
_b.map((i) => {
|
|
42
|
+
return React.createElement("tspan", { fill: i.fillColor || '#000', fontSize: i.size, onClick: (e) => handleIconClick(e, i) },
|
|
43
|
+
"\u00A0",
|
|
44
|
+
i.unicode);
|
|
45
|
+
})))));
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
return React.createElement(GenericChartComponent, { clip: false, svgDraw: this.renderSVG, drawOn: ["mousemove"] });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
SingleValueTooltip.defaultProps = {
|
|
53
|
+
className: "react-financial-charts-tooltip",
|
|
54
|
+
displayValuesFor: (_, props) => props.currentItem,
|
|
55
|
+
labelFill: "#4682B4",
|
|
56
|
+
origin: [0, 0],
|
|
57
|
+
valueFill: "#000000",
|
|
58
|
+
xAccessor: noop,
|
|
59
|
+
xDisplayFormat: identity,
|
|
60
|
+
xInitDisplay: "n/a",
|
|
61
|
+
yAccessor: identity,
|
|
62
|
+
yDisplayFormat: format(".2f"),
|
|
63
|
+
yInitDisplay: "n/a",
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=SingleValueTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleValueTooltip.js","sourceRoot":"","sources":["../src/SingleValueTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AA+BxD,MAAM,OAAO,kBAAmB,SAAQ,KAAK,CAAC,SAAkC;IAAhF;;QAmBqB,cAAS,GAAG,CAAC,SAAc,EAAE,EAAE;;YAC5C,MAAM,EACF,OAAO,EACP,UAAU,EACV,QAAQ,EACR,UAAU,EACV,SAAS,EACT,eAA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