@363045841yyt/klinechart 0.7.6 → 0.7.7
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/README.md +4 -4
- package/dist/components/ChartSettingsDialog.vue.d.ts +14 -0
- package/dist/components/ChartSettingsDialog.vue.d.ts.map +1 -0
- package/dist/components/ColorPresetPanel.vue.d.ts +12 -0
- package/dist/components/ColorPresetPanel.vue.d.ts.map +1 -0
- package/dist/components/IndicatorSelector.vue.d.ts.map +1 -1
- package/dist/components/KLineChart.vue.d.ts +2 -0
- package/dist/components/KLineChart.vue.d.ts.map +1 -1
- package/dist/components/KLineTooltip.vue.d.ts +8 -1
- package/dist/components/KLineTooltip.vue.d.ts.map +1 -1
- package/dist/components/LeftToolbar.vue.d.ts +4 -3
- package/dist/components/LeftToolbar.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +973 -796
- package/package.json +1 -1
- package/src/components/ChartSettingsDialog.vue +624 -0
- package/src/components/ColorPresetPanel.vue +289 -0
- package/src/components/DrawingStyleToolbar.vue +11 -11
- package/src/components/IndicatorParams.vue +56 -56
- package/src/components/IndicatorSelector.vue +88 -83
- package/src/components/KLineChart.vue +74 -19
- package/src/components/KLineTooltip.vue +17 -11
- package/src/components/LeftToolbar.vue +35 -393
- package/src/components/MarkerTooltip.vue +4 -4
- package/src/components/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,13 +1,81 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as
|
|
2
|
-
import { VERSION as
|
|
3
|
-
import { DrawingInteractionController as
|
|
4
|
-
import { SemanticChartController as
|
|
5
|
-
import { DEFAULT_SETTINGS as
|
|
6
|
-
//#region src/components/
|
|
7
|
-
var
|
|
1
|
+
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelCheckbox as A, vModelSelect as j, watch as M, withCtx as N, withDirectives as P, withModifiers as F } from "vue";
|
|
2
|
+
import { COLOR_PRESET_ITEMS as I, VERSION as L, createChartController as R, createIndicatorSelectorController as z, darkTheme as B, lightTheme as ee, normalizeColorPresetSettings as V, resolveThemeColors as te, themeToCssVars as H } from "@363045841yyt/klinechart-core";
|
|
3
|
+
import { DrawingInteractionController as ne, SUB_PANE_INDICATORS as re, SUB_PANE_INDICATOR_CONFIGS as ie, allIndicators as U, createChartController as ae, createIndicatorSelectorController as oe, findIndicator as se, getPhysicalKLineConfig as ce, isSubIndicatorId as W, kGapFromKWidth as le, zoomLevelToKWidth as ue } from "@363045841yyt/klinechart-core/controllers";
|
|
4
|
+
import { SemanticChartController as de, __setDataFetcher as fe } from "@363045841yyt/klinechart-core/semantic";
|
|
5
|
+
import { DEFAULT_SETTINGS as G, SETTINGS_STORAGE_KEY as K } from "@363045841yyt/klinechart-core/config";
|
|
6
|
+
//#region src/components/ColorPresetPanel.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var pe = { class: "color-preset-tools" }, me = {
|
|
8
|
+
class: "theme-tabs",
|
|
9
|
+
role: "tablist",
|
|
10
|
+
"aria-label": "颜色主题"
|
|
11
|
+
}, he = ["onClick"], ge = { class: "color-group-label" }, _e = { class: "color-grid" }, ve = ["value", "onInput"], ye = /* @__PURE__ */ u({
|
|
12
|
+
__name: "ColorPresetPanel",
|
|
13
|
+
props: { colorPresetSettings: {} },
|
|
14
|
+
emits: ["update:colorPresetSettings"],
|
|
15
|
+
setup(t, { emit: n }) {
|
|
16
|
+
let i = t, a = n, c = [{
|
|
17
|
+
value: "light",
|
|
18
|
+
label: "浅色"
|
|
19
|
+
}, {
|
|
20
|
+
value: "dark",
|
|
21
|
+
label: "深色"
|
|
22
|
+
}], l = {
|
|
23
|
+
canvas: "画布",
|
|
24
|
+
candle: "K线 / 成交量",
|
|
25
|
+
axis: "坐标轴",
|
|
26
|
+
interaction: "交互 / 标记"
|
|
27
|
+
}, u = r(() => Object.keys(l).map((e) => ({
|
|
28
|
+
group: e,
|
|
29
|
+
label: l[e],
|
|
30
|
+
items: I.filter((t) => t.group === e)
|
|
31
|
+
})).filter((e) => e.items.length > 0)), d = w("light");
|
|
32
|
+
function f(e, t) {
|
|
33
|
+
return (e === "dark" ? B : ee).colors[t];
|
|
34
|
+
}
|
|
35
|
+
function p(e) {
|
|
36
|
+
return V(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
|
|
37
|
+
}
|
|
38
|
+
function m(e, t) {
|
|
39
|
+
let n = V(i.colorPresetSettings);
|
|
40
|
+
a("update:colorPresetSettings", {
|
|
41
|
+
...n,
|
|
42
|
+
[d.value]: {
|
|
43
|
+
...n[d.value],
|
|
44
|
+
[e]: t
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function h() {
|
|
49
|
+
let e = { ...V(i.colorPresetSettings) };
|
|
50
|
+
delete e[d.value], a("update:colorPresetSettings", e);
|
|
51
|
+
}
|
|
52
|
+
return (t, n) => (S(), o("div", null, [s("div", pe, [s("div", me, [(S(), o(e, null, T(c, (e) => s("button", {
|
|
53
|
+
key: e.value,
|
|
54
|
+
type: "button",
|
|
55
|
+
class: g(["theme-tab", { active: d.value === e.value }]),
|
|
56
|
+
onClick: (t) => d.value = e.value
|
|
57
|
+
}, O(e.label), 11, he)), 64))]), s("button", {
|
|
58
|
+
type: "button",
|
|
59
|
+
class: "color-reset-btn",
|
|
60
|
+
onClick: h
|
|
61
|
+
}, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div", ge, O(t.label), 1), s("div", _e, [(S(!0), o(e, null, T(t.items, (e) => (S(), o("label", {
|
|
62
|
+
key: e.key,
|
|
63
|
+
class: "color-item"
|
|
64
|
+
}, [s("span", null, O(e.label), 1), s("input", {
|
|
65
|
+
type: "color",
|
|
66
|
+
class: "color-input",
|
|
67
|
+
value: p(e.key),
|
|
68
|
+
onInput: (t) => m(e.key, t.target.value)
|
|
69
|
+
}, null, 40, ve)]))), 128))])], 64))), 128))]));
|
|
70
|
+
}
|
|
71
|
+
}), q = (e, t) => {
|
|
72
|
+
let n = e.__vccOpts || e;
|
|
73
|
+
for (let [e, r] of t) n[e] = r;
|
|
74
|
+
return n;
|
|
75
|
+
}, be = /* @__PURE__ */ q(ye, [["__scopeId", "data-v-a52947a4"]]), xe = {
|
|
8
76
|
class: "toolbar-item color-item",
|
|
9
77
|
title: "颜色"
|
|
10
|
-
},
|
|
78
|
+
}, Se = ["value"], Ce = ["value"], J = ["value"], we = /* @__PURE__ */ q(/* @__PURE__ */ u({
|
|
11
79
|
__name: "DrawingStyleToolbar",
|
|
12
80
|
props: { drawing: {} },
|
|
13
81
|
emits: ["updateStyle", "delete"],
|
|
@@ -16,7 +84,7 @@ var ue = {
|
|
|
16
84
|
function r(e) {
|
|
17
85
|
e.key === "Delete" && (e.preventDefault(), n("delete"));
|
|
18
86
|
}
|
|
19
|
-
|
|
87
|
+
y(() => document.addEventListener("keydown", r)), x(() => document.removeEventListener("keydown", r));
|
|
20
88
|
function i(e) {
|
|
21
89
|
n("updateStyle", { stroke: e });
|
|
22
90
|
}
|
|
@@ -26,13 +94,13 @@ var ue = {
|
|
|
26
94
|
function c(e) {
|
|
27
95
|
n("updateStyle", { strokeStyle: e });
|
|
28
96
|
}
|
|
29
|
-
return (t, n) => (
|
|
97
|
+
return (t, n) => (S(), o("div", {
|
|
30
98
|
class: "drawing-style-toolbar",
|
|
31
|
-
onPointerdown: n[4] ||=
|
|
32
|
-
onPointermove: n[5] ||=
|
|
33
|
-
onPointerup: n[6] ||=
|
|
99
|
+
onPointerdown: n[4] ||= F(() => {}, ["stop"]),
|
|
100
|
+
onPointermove: n[5] ||= F(() => {}, ["stop"]),
|
|
101
|
+
onPointerup: n[6] ||= F(() => {}, ["stop"])
|
|
34
102
|
}, [
|
|
35
|
-
s("div",
|
|
103
|
+
s("div", xe, [s("span", {
|
|
36
104
|
class: "color-swatch",
|
|
37
105
|
style: _({ background: e.drawing.style.stroke ?? "#2962ff" })
|
|
38
106
|
}, null, 4), s("input", {
|
|
@@ -40,7 +108,7 @@ var ue = {
|
|
|
40
108
|
class: "color-input",
|
|
41
109
|
value: e.drawing.style.stroke ?? "#2962ff",
|
|
42
110
|
onInput: n[0] ||= (e) => i(e.target.value)
|
|
43
|
-
}, null, 40,
|
|
111
|
+
}, null, 40, Se)]),
|
|
44
112
|
s("select", {
|
|
45
113
|
class: "toolbar-select",
|
|
46
114
|
value: e.drawing.style.strokeWidth ?? 1,
|
|
@@ -51,7 +119,7 @@ var ue = {
|
|
|
51
119
|
s("option", { value: 2 }, "2px", -1),
|
|
52
120
|
s("option", { value: 3 }, "3px", -1),
|
|
53
121
|
s("option", { value: 4 }, "4px", -1)
|
|
54
|
-
]], 40,
|
|
122
|
+
]], 40, Ce),
|
|
55
123
|
s("select", {
|
|
56
124
|
class: "toolbar-select",
|
|
57
125
|
value: e.drawing.style.strokeStyle ?? "solid",
|
|
@@ -61,7 +129,7 @@ var ue = {
|
|
|
61
129
|
s("option", { value: "solid" }, "实线", -1),
|
|
62
130
|
s("option", { value: "dashed" }, "虚线", -1),
|
|
63
131
|
s("option", { value: "dotted" }, "点线", -1)
|
|
64
|
-
]], 40,
|
|
132
|
+
]], 40, J),
|
|
65
133
|
s("button", {
|
|
66
134
|
type: "button",
|
|
67
135
|
class: "toolbar-btn delete-btn",
|
|
@@ -83,36 +151,32 @@ var ue = {
|
|
|
83
151
|
], -1)]])
|
|
84
152
|
], 32));
|
|
85
153
|
}
|
|
86
|
-
}),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return n;
|
|
90
|
-
}, fe = /* @__PURE__ */ q(K, [["__scopeId", "data-v-a2cb0547"]]), pe = Symbol("fullscreen-teleport-target");
|
|
91
|
-
function me(e) {
|
|
92
|
-
S(pe, e);
|
|
154
|
+
}), [["__scopeId", "data-v-02a1f4d6"]]), Y = Symbol("fullscreen-teleport-target");
|
|
155
|
+
function Te(e) {
|
|
156
|
+
C(Y, e);
|
|
93
157
|
}
|
|
94
|
-
function
|
|
95
|
-
let e = p(
|
|
158
|
+
function Ee() {
|
|
159
|
+
let e = p(Y, null);
|
|
96
160
|
return r(() => e?.value ?? "body");
|
|
97
161
|
}
|
|
98
162
|
//#endregion
|
|
99
163
|
//#region src/components/IndicatorParams.vue?vue&type=script&setup=true&lang.ts
|
|
100
|
-
var
|
|
164
|
+
var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class: "params-title" }, Ae = { class: "header-right" }, je = {
|
|
101
165
|
key: 0,
|
|
102
166
|
class: "indicator-description"
|
|
103
|
-
},
|
|
167
|
+
}, Me = { class: "params-body" }, Ne = { class: "param-header" }, Pe = { class: "param-label" }, Fe = { class: "param-label-text" }, Ie = {
|
|
104
168
|
key: 0,
|
|
105
169
|
class: "param-range"
|
|
106
|
-
},
|
|
170
|
+
}, Le = { class: "input-wrapper" }, Re = ["disabled", "onClick"], ze = [
|
|
107
171
|
"value",
|
|
108
172
|
"min",
|
|
109
173
|
"max",
|
|
110
174
|
"step",
|
|
111
175
|
"onInput"
|
|
112
|
-
],
|
|
176
|
+
], Be = ["disabled", "onClick"], Ve = {
|
|
113
177
|
key: 0,
|
|
114
178
|
class: "param-description"
|
|
115
|
-
},
|
|
179
|
+
}, He = { class: "params-footer" }, Ue = { class: "footer-right" }, We = /* @__PURE__ */ q(/* @__PURE__ */ u({
|
|
116
180
|
__name: "IndicatorParams",
|
|
117
181
|
props: {
|
|
118
182
|
visible: { type: Boolean },
|
|
@@ -124,13 +188,13 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
124
188
|
},
|
|
125
189
|
emits: ["close", "confirm"],
|
|
126
190
|
setup(r, { emit: u }) {
|
|
127
|
-
let d = r, f = u, p =
|
|
128
|
-
|
|
191
|
+
let d = r, f = u, p = w({ ...d.values }), m = w(!0), h = Ee();
|
|
192
|
+
M(() => d.values, (e) => {
|
|
129
193
|
p.value = { ...e };
|
|
130
194
|
}, {
|
|
131
195
|
deep: !0,
|
|
132
196
|
immediate: !0
|
|
133
|
-
}),
|
|
197
|
+
}), M(() => d.visible, (e) => {
|
|
134
198
|
e && (p.value = { ...d.values });
|
|
135
199
|
});
|
|
136
200
|
function _(e, t) {
|
|
@@ -141,26 +205,26 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
141
205
|
let n = e.step || 1, r = (p.value[e.key] || 0) + t * n;
|
|
142
206
|
e.min !== void 0 && (r = Math.max(e.min, r)), e.max !== void 0 && (r = Math.min(e.max, r)), p.value[e.key] = parseFloat(r.toFixed(10));
|
|
143
207
|
}
|
|
144
|
-
function
|
|
208
|
+
function y() {
|
|
145
209
|
let e = {};
|
|
146
210
|
d.params.forEach((t) => {
|
|
147
211
|
e[t.key] = t.default ?? d.values[t.key] ?? 0;
|
|
148
212
|
}), p.value = e;
|
|
149
213
|
}
|
|
150
|
-
function
|
|
214
|
+
function b() {
|
|
151
215
|
f("confirm", { ...p.value });
|
|
152
216
|
}
|
|
153
|
-
return (u, d) => (
|
|
154
|
-
default:
|
|
217
|
+
return (u, d) => (S(), i(t, { to: k(h) }, [l(n, { name: "overlay" }, {
|
|
218
|
+
default: N(() => [r.visible ? (S(), o("div", {
|
|
155
219
|
key: 0,
|
|
156
220
|
class: "params-overlay",
|
|
157
221
|
onClick: d[4] ||= (e) => u.$emit("close")
|
|
158
222
|
}, [l(n, { name: "modal" }, {
|
|
159
|
-
default:
|
|
223
|
+
default: N(() => [s("div", {
|
|
160
224
|
class: "indicator-params",
|
|
161
|
-
onClick: d[3] ||=
|
|
225
|
+
onClick: d[3] ||= F(() => {}, ["stop"])
|
|
162
226
|
}, [
|
|
163
|
-
s("div",
|
|
227
|
+
s("div", De, [s("div", Oe, [s("span", ke, O(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Ae, [s("button", {
|
|
164
228
|
class: g(["toggle-desc-btn", { active: m.value }]),
|
|
165
229
|
onClick: d[0] ||= (e) => m.value = !m.value,
|
|
166
230
|
title: "显示/隐藏说明"
|
|
@@ -177,19 +241,19 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
177
241
|
"stroke-width": "2"
|
|
178
242
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
179
243
|
l(n, { name: "slide" }, {
|
|
180
|
-
default:
|
|
244
|
+
default: N(() => [m.value && r.indicatorDescription ? (S(), o("div", je, [s("p", null, O(r.indicatorDescription), 1)])) : a("", !0)]),
|
|
181
245
|
_: 1
|
|
182
246
|
}),
|
|
183
|
-
s("div",
|
|
247
|
+
s("div", Me, [(S(!0), o(e, null, T(r.params, (e) => (S(), o("div", {
|
|
184
248
|
key: e.key,
|
|
185
249
|
class: g(["param-item", { "has-desc": m.value && e.description }])
|
|
186
|
-
}, [s("div",
|
|
250
|
+
}, [s("div", Ne, [s("label", Pe, [s("span", Fe, O(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (S(), o("span", Ie, O(e.min ?? "-∞") + " ~ " + O(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", Le, [
|
|
187
251
|
s("button", {
|
|
188
252
|
class: "stepper-btn",
|
|
189
253
|
disabled: e.min !== void 0 && (p.value[e.key] ?? 0) <= e.min,
|
|
190
254
|
onClick: (t) => v(e, -1)
|
|
191
|
-
}, " − ", 8,
|
|
192
|
-
e.type === "number" ? (
|
|
255
|
+
}, " − ", 8, Re),
|
|
256
|
+
e.type === "number" ? (S(), o("input", {
|
|
193
257
|
key: 0,
|
|
194
258
|
type: "number",
|
|
195
259
|
class: "param-input",
|
|
@@ -198,30 +262,30 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
198
262
|
max: e.max,
|
|
199
263
|
step: e.step || 1,
|
|
200
264
|
onInput: (t) => _(e.key, t)
|
|
201
|
-
}, null, 40,
|
|
265
|
+
}, null, 40, ze)) : a("", !0),
|
|
202
266
|
s("button", {
|
|
203
267
|
class: "stepper-btn",
|
|
204
268
|
disabled: e.max !== void 0 && (p.value[e.key] ?? 0) >= e.max,
|
|
205
269
|
onClick: (t) => v(e, 1)
|
|
206
|
-
}, " + ", 8,
|
|
270
|
+
}, " + ", 8, Be)
|
|
207
271
|
])]), l(n, { name: "slide" }, {
|
|
208
|
-
default:
|
|
272
|
+
default: N(() => [m.value && e.description ? (S(), o("div", Ve, O(e.description), 1)) : a("", !0)]),
|
|
209
273
|
_: 2
|
|
210
274
|
}, 1024)], 2))), 128))]),
|
|
211
|
-
s("div",
|
|
275
|
+
s("div", He, [s("button", {
|
|
212
276
|
class: "params-btn reset",
|
|
213
|
-
onClick:
|
|
277
|
+
onClick: y
|
|
214
278
|
}, [...d[8] ||= [s("svg", {
|
|
215
279
|
viewBox: "0 0 24 24",
|
|
216
280
|
fill: "none",
|
|
217
281
|
stroke: "currentColor",
|
|
218
282
|
"stroke-width": "2"
|
|
219
|
-
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div",
|
|
283
|
+
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", Ue, [s("button", {
|
|
220
284
|
class: "params-btn cancel",
|
|
221
285
|
onClick: d[2] ||= (e) => u.$emit("close")
|
|
222
286
|
}, "取消"), s("button", {
|
|
223
287
|
class: "params-btn confirm",
|
|
224
|
-
onClick:
|
|
288
|
+
onClick: b
|
|
225
289
|
}, [...d[9] ||= [s("svg", {
|
|
226
290
|
viewBox: "0 0 24 24",
|
|
227
291
|
fill: "none",
|
|
@@ -234,49 +298,49 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
234
298
|
_: 1
|
|
235
299
|
})], 8, ["to"]));
|
|
236
300
|
}
|
|
237
|
-
}), [["__scopeId", "data-v-
|
|
301
|
+
}), [["__scopeId", "data-v-30f2f611"]]), Ge = { class: "indicator-selector" }, Ke = { class: "indicator-scroll-container" }, qe = { class: "indicator-list" }, Je = {
|
|
238
302
|
key: 0,
|
|
239
303
|
class: "indicator-divider",
|
|
240
304
|
"aria-hidden": "true"
|
|
241
|
-
},
|
|
305
|
+
}, Ye = [
|
|
242
306
|
"draggable",
|
|
243
307
|
"onDragstart",
|
|
244
308
|
"onDragover",
|
|
245
309
|
"onDrop"
|
|
246
|
-
],
|
|
310
|
+
], Xe = ["onMouseenter"], Ze = { class: "btn-content" }, Qe = {
|
|
247
311
|
key: 0,
|
|
248
312
|
class: "param-hint"
|
|
249
|
-
},
|
|
313
|
+
}, $e = {
|
|
250
314
|
key: 0,
|
|
251
315
|
class: "hover-overlay"
|
|
252
|
-
},
|
|
316
|
+
}, et = ["onClick"], tt = {
|
|
253
317
|
key: 1,
|
|
254
318
|
class: "divider"
|
|
255
|
-
},
|
|
319
|
+
}, nt = ["onClick"], rt = { class: "indicator-item" }, it = { class: "modal-header" }, at = { class: "header-title" }, ot = { class: "title-sub" }, st = { class: "header-actions" }, ct = {
|
|
256
320
|
key: 0,
|
|
257
321
|
viewBox: "0 0 24 24",
|
|
258
322
|
width: "16",
|
|
259
323
|
height: "16",
|
|
260
324
|
fill: "currentColor"
|
|
261
|
-
},
|
|
325
|
+
}, lt = {
|
|
262
326
|
key: 1,
|
|
263
327
|
viewBox: "0 0 24 24",
|
|
264
328
|
width: "16",
|
|
265
329
|
height: "16",
|
|
266
330
|
fill: "currentColor"
|
|
267
|
-
},
|
|
331
|
+
}, X = { class: "modal-body" }, Z = { class: "search-box" }, ut = ["value"], dt = {
|
|
268
332
|
key: 0,
|
|
269
333
|
class: "indicator-section"
|
|
270
|
-
},
|
|
334
|
+
}, ft = { class: "section-header" }, pt = { class: "section-count" }, mt = ["onClick"], ht = { class: "card-label" }, gt = { class: "card-tooltip" }, _t = { class: "card-header" }, vt = { class: "card-label" }, yt = { class: "card-header-actions" }, bt = ["onClick"], xt = { class: "card-name" }, St = {
|
|
271
335
|
key: 1,
|
|
272
336
|
class: "section-divider"
|
|
273
|
-
},
|
|
337
|
+
}, Ct = {
|
|
274
338
|
key: 2,
|
|
275
339
|
class: "no-results"
|
|
276
|
-
},
|
|
340
|
+
}, wt = {
|
|
277
341
|
key: 3,
|
|
278
342
|
class: "indicator-section"
|
|
279
|
-
},
|
|
343
|
+
}, Tt = { class: "section-header" }, Et = { class: "section-count" }, Dt = ["onClick"], Ot = { class: "card-label" }, kt = { class: "card-tooltip" }, At = { class: "card-header" }, jt = { class: "card-label" }, Mt = { class: "card-header-actions" }, Nt = ["onClick"], Pt = { class: "card-name" }, Ft = { class: "modal-footer" }, It = { class: "footer-info" }, Lt = { class: "info-text" }, Rt = /* @__PURE__ */ q(/* @__PURE__ */ u({
|
|
280
344
|
__name: "IndicatorSelector",
|
|
281
345
|
props: {
|
|
282
346
|
activeIndicators: {},
|
|
@@ -307,23 +371,23 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
307
371
|
}))
|
|
308
372
|
}));
|
|
309
373
|
}
|
|
310
|
-
let h =
|
|
374
|
+
let h = oe({ catalog: m(U) }), _ = $(h.menuOpen), v = $(h.searchQuery), b = $(h.filteredMain), C = $(h.filteredSub), E = r(() => b.value.length > 0 || C.value.length > 0), D = h.catalog.peek().length, A = w(null), j = w(!1), M = w(null), P = w(null), I = w(null), L = w(null), R = w(!1), z = Ee(), B = r(() => f.activeIndicators?.length ? f.activeIndicators.map((e) => se(e)).filter((e) => e !== void 0).sort((e, t) => e.pane === t.pane ? 0 : e.pane === "main" ? -1 : 1) : []), ee = r(() => B.value.some((e) => e.pane === "main") ? B.value.find((e) => e.pane === "sub")?.id ?? null : null), V = r(() => M.value ? se(M.value) : null), te = r(() => f.activeIndicators?.length ?? 0);
|
|
311
375
|
function H(e) {
|
|
312
376
|
return f.activeIndicators?.includes(e) ?? !1;
|
|
313
377
|
}
|
|
314
|
-
function
|
|
378
|
+
function ne(e) {
|
|
315
379
|
if (H(e)) return;
|
|
316
|
-
let t =
|
|
317
|
-
t && (t.pane === "main" &&
|
|
380
|
+
let t = se(e);
|
|
381
|
+
t && (t.pane === "main" && U.filter((t) => t.id !== e && H(t.id) && t.pane === "main").forEach((e) => p("toggle", e.id, !1)), p("toggle", e, !0));
|
|
318
382
|
}
|
|
319
|
-
function
|
|
383
|
+
function re(e) {
|
|
320
384
|
p("toggle", e, !1);
|
|
321
385
|
}
|
|
322
|
-
function
|
|
323
|
-
|
|
386
|
+
function ie(e) {
|
|
387
|
+
M.value = e, j.value = !0;
|
|
324
388
|
}
|
|
325
|
-
function
|
|
326
|
-
let t =
|
|
389
|
+
function ae(e) {
|
|
390
|
+
let t = se(e);
|
|
327
391
|
if (!t?.params) return {};
|
|
328
392
|
let n = {};
|
|
329
393
|
for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
|
|
@@ -331,105 +395,105 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
331
395
|
for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
|
|
332
396
|
return i;
|
|
333
397
|
}
|
|
334
|
-
function
|
|
335
|
-
let t =
|
|
398
|
+
function ce(e) {
|
|
399
|
+
let t = ae(e.id);
|
|
336
400
|
return e.params ? e.params.map((e) => t[e.key] ?? "").join(",") : "";
|
|
337
401
|
}
|
|
338
|
-
function
|
|
339
|
-
|
|
402
|
+
function le(e) {
|
|
403
|
+
M.value && p("updateParams", M.value, e), j.value = !1;
|
|
340
404
|
}
|
|
341
|
-
function
|
|
342
|
-
if (!
|
|
405
|
+
function ue(e, t) {
|
|
406
|
+
if (!W(t)) {
|
|
343
407
|
e.preventDefault();
|
|
344
408
|
return;
|
|
345
409
|
}
|
|
346
|
-
|
|
410
|
+
L.value = t, I.value = null, e.dataTransfer?.setData("text/plain", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
|
|
347
411
|
}
|
|
348
|
-
function
|
|
349
|
-
!
|
|
412
|
+
function de(e, t) {
|
|
413
|
+
!L.value || !W(t) || L.value === t || (I.value = t, e.dataTransfer && (e.dataTransfer.dropEffect = "move"));
|
|
350
414
|
}
|
|
351
|
-
function
|
|
352
|
-
let n =
|
|
415
|
+
function fe(e, t) {
|
|
416
|
+
let n = L.value || e.dataTransfer?.getData("text/plain") || "";
|
|
353
417
|
if (!n || n === t) {
|
|
354
|
-
|
|
418
|
+
G();
|
|
355
419
|
return;
|
|
356
420
|
}
|
|
357
|
-
if (!
|
|
358
|
-
|
|
421
|
+
if (!W(n) || !W(t)) {
|
|
422
|
+
G();
|
|
359
423
|
return;
|
|
360
424
|
}
|
|
361
|
-
let r =
|
|
425
|
+
let r = B.value.findIndex((e) => e.id === n), i = B.value.findIndex((e) => e.id === t);
|
|
362
426
|
if (r < 0 || i < 0) {
|
|
363
|
-
|
|
427
|
+
G();
|
|
364
428
|
return;
|
|
365
429
|
}
|
|
366
|
-
let a = [...
|
|
430
|
+
let a = [...B.value.map((e) => e.id)], [o] = a.splice(r, 1);
|
|
367
431
|
if (!o) {
|
|
368
|
-
|
|
432
|
+
G();
|
|
369
433
|
return;
|
|
370
434
|
}
|
|
371
|
-
a.splice(i, 0, o), p("reorderSubIndicators", a.filter((e) =>
|
|
435
|
+
a.splice(i, 0, o), p("reorderSubIndicators", a.filter((e) => W(e))), G();
|
|
372
436
|
}
|
|
373
|
-
function
|
|
374
|
-
|
|
437
|
+
function G() {
|
|
438
|
+
I.value = null, L.value = null;
|
|
375
439
|
}
|
|
376
|
-
function
|
|
440
|
+
function K(e) {
|
|
377
441
|
e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
|
|
378
442
|
}
|
|
379
|
-
return
|
|
380
|
-
document.addEventListener("keydown",
|
|
381
|
-
}),
|
|
382
|
-
document.removeEventListener("keydown",
|
|
383
|
-
}), (r, u) => (
|
|
384
|
-
s("div",
|
|
443
|
+
return y(() => {
|
|
444
|
+
document.addEventListener("keydown", K);
|
|
445
|
+
}), x(() => {
|
|
446
|
+
document.removeEventListener("keydown", K);
|
|
447
|
+
}), (r, u) => (S(), o("div", Ge, [
|
|
448
|
+
s("div", Ke, [s("div", qe, [(S(!0), o(e, null, T(B.value, (t) => (S(), o(e, { key: t.id }, [t.id === ee.value ? (S(), o("div", Je)) : a("", !0), s("div", {
|
|
385
449
|
class: g(["indicator-item", {
|
|
386
|
-
draggable:
|
|
387
|
-
"drag-over":
|
|
388
|
-
"is-dragging":
|
|
450
|
+
draggable: k(W)(t.id),
|
|
451
|
+
"drag-over": I.value === t.id,
|
|
452
|
+
"is-dragging": L.value === t.id
|
|
389
453
|
}]),
|
|
390
|
-
draggable:
|
|
391
|
-
onDragstart: (e) =>
|
|
392
|
-
onDragover:
|
|
393
|
-
onDrop:
|
|
394
|
-
onDragend:
|
|
454
|
+
draggable: k(W)(t.id),
|
|
455
|
+
onDragstart: (e) => ue(e, t.id),
|
|
456
|
+
onDragover: F((e) => de(e, t.id), ["prevent"]),
|
|
457
|
+
onDrop: F((e) => fe(e, t.id), ["prevent"]),
|
|
458
|
+
onDragend: G
|
|
395
459
|
}, [s("div", {
|
|
396
460
|
class: "indicator-btn-wrapper",
|
|
397
|
-
onMouseenter: (e) =>
|
|
398
|
-
onMouseleave: u[0] ||= (e) =>
|
|
461
|
+
onMouseenter: (e) => P.value = t.id,
|
|
462
|
+
onMouseleave: u[0] ||= (e) => P.value = null
|
|
399
463
|
}, [s("button", { class: g(["indicator-btn", {
|
|
400
464
|
active: !0,
|
|
401
|
-
hovering:
|
|
402
|
-
}]) }, [s("span",
|
|
403
|
-
default:
|
|
404
|
-
t.params?.length ? (
|
|
465
|
+
hovering: P.value === t.id
|
|
466
|
+
}]) }, [s("span", Ze, [c(O(t.label) + " ", 1), t.params?.length ? (S(), o("span", Qe, " (" + O(ce(t)) + ") ", 1)) : a("", !0)]), l(n, { name: "fade" }, {
|
|
467
|
+
default: N(() => [P.value === t.id ? (S(), o("div", $e, [
|
|
468
|
+
t.params?.length ? (S(), o("button", {
|
|
405
469
|
key: 0,
|
|
406
470
|
class: "action-btn settings-btn",
|
|
407
|
-
onClick:
|
|
471
|
+
onClick: F((e) => ie(t.id), ["stop"]),
|
|
408
472
|
title: "编辑参数"
|
|
409
473
|
}, [...u[9] ||= [s("svg", {
|
|
410
474
|
viewBox: "0 0 24 24",
|
|
411
475
|
width: "14",
|
|
412
476
|
height: "14",
|
|
413
477
|
fill: "currentColor"
|
|
414
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8,
|
|
415
|
-
t.params?.length ? (
|
|
478
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, et)) : a("", !0),
|
|
479
|
+
t.params?.length ? (S(), o("span", tt)) : a("", !0),
|
|
416
480
|
s("button", {
|
|
417
481
|
class: "action-btn remove-btn",
|
|
418
|
-
onClick:
|
|
482
|
+
onClick: F((e) => re(t.id), ["stop"]),
|
|
419
483
|
title: "移除指标"
|
|
420
484
|
}, [...u[10] ||= [s("svg", {
|
|
421
485
|
viewBox: "0 0 24 24",
|
|
422
486
|
width: "14",
|
|
423
487
|
height: "14",
|
|
424
488
|
fill: "currentColor"
|
|
425
|
-
}, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]], 8,
|
|
489
|
+
}, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]], 8, nt)
|
|
426
490
|
])) : a("", !0)]),
|
|
427
491
|
_: 2
|
|
428
|
-
}, 1024)], 2)], 40,
|
|
492
|
+
}, 1024)], 2)], 40, Xe)], 42, Ye)], 64))), 128)), s("div", rt, [s("button", {
|
|
429
493
|
ref_key: "addBtnRef",
|
|
430
|
-
ref:
|
|
494
|
+
ref: A,
|
|
431
495
|
class: "add-btn",
|
|
432
|
-
onClick: u[1] ||=
|
|
496
|
+
onClick: u[1] ||= F((e) => k(h).toggleMenu(), ["stop"]),
|
|
433
497
|
title: "添加指标"
|
|
434
498
|
}, [...u[11] ||= [s("svg", {
|
|
435
499
|
viewBox: "0 0 24 24",
|
|
@@ -437,24 +501,24 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
437
501
|
height: "16",
|
|
438
502
|
fill: "currentColor"
|
|
439
503
|
}, [s("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" })], -1)]], 512)])])]),
|
|
440
|
-
(
|
|
441
|
-
default:
|
|
504
|
+
(S(), i(t, { to: k(z) }, [l(n, { name: "overlay" }, {
|
|
505
|
+
default: N(() => [k(_) ? (S(), o("div", {
|
|
442
506
|
key: 0,
|
|
443
507
|
class: "selector-overlay",
|
|
444
|
-
onClick: u[7] ||= (e) =>
|
|
508
|
+
onClick: u[7] ||= (e) => k(h).closeMenu()
|
|
445
509
|
}, [l(n, { name: "modal" }, {
|
|
446
|
-
default:
|
|
510
|
+
default: N(() => [k(_) ? (S(), o("div", {
|
|
447
511
|
key: 0,
|
|
448
512
|
class: "selector-modal",
|
|
449
|
-
onClick: u[6] ||=
|
|
513
|
+
onClick: u[6] ||= F(() => {}, ["stop"])
|
|
450
514
|
}, [
|
|
451
|
-
s("div",
|
|
452
|
-
class: g(["view-toggle-btn", { active:
|
|
453
|
-
onClick: u[2] ||= (e) =>
|
|
515
|
+
s("div", it, [s("div", at, [u[12] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", ot, O(k(D)) + " 个可用指标", 1)]), s("div", st, [s("button", {
|
|
516
|
+
class: g(["view-toggle-btn", { active: R.value }]),
|
|
517
|
+
onClick: u[2] ||= (e) => R.value = !R.value,
|
|
454
518
|
title: "简洁模式"
|
|
455
|
-
}, [
|
|
519
|
+
}, [R.value ? (S(), o("svg", lt, [...u[14] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", ct, [...u[13] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
|
|
456
520
|
class: "modal-close",
|
|
457
|
-
onClick: u[3] ||= (e) =>
|
|
521
|
+
onClick: u[3] ||= (e) => k(h).closeMenu(),
|
|
458
522
|
title: "关闭"
|
|
459
523
|
}, [...u[15] ||= [s("svg", {
|
|
460
524
|
viewBox: "0 0 24 24",
|
|
@@ -462,40 +526,40 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
462
526
|
height: "14",
|
|
463
527
|
fill: "currentColor"
|
|
464
528
|
}, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])])]),
|
|
465
|
-
s("div",
|
|
466
|
-
s("div",
|
|
529
|
+
s("div", X, [
|
|
530
|
+
s("div", Z, [u[16] ||= s("svg", {
|
|
467
531
|
class: "search-icon",
|
|
468
532
|
viewBox: "0 0 24 24",
|
|
469
533
|
width: "16",
|
|
470
534
|
height: "16",
|
|
471
535
|
fill: "currentColor"
|
|
472
536
|
}, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1), s("input", {
|
|
473
|
-
value:
|
|
474
|
-
onInput: u[4] ||= (e) =>
|
|
537
|
+
value: k(v),
|
|
538
|
+
onInput: u[4] ||= (e) => k(h).setSearchQuery(e.target.value),
|
|
475
539
|
type: "text",
|
|
476
540
|
class: "search-input",
|
|
477
541
|
placeholder: "搜索指标名称..."
|
|
478
|
-
}, null, 40,
|
|
479
|
-
|
|
542
|
+
}, null, 40, ut)]),
|
|
543
|
+
k(b).length > 0 ? (S(), o("div", dt, [s("div", ft, [u[17] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", pt, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: R.value }]) }, [(S(!0), o(e, null, T(k(b), (t) => (S(), o("button", {
|
|
480
544
|
key: t.id,
|
|
481
545
|
class: g(["indicator-card", {
|
|
482
546
|
active: H(t.id),
|
|
483
|
-
compact:
|
|
547
|
+
compact: R.value
|
|
484
548
|
}]),
|
|
485
|
-
onClick: (e) => H(t.id) ?
|
|
486
|
-
}, [
|
|
549
|
+
onClick: (e) => H(t.id) ? re(t.id) : ne(t.id)
|
|
550
|
+
}, [R.value ? (S(), o(e, { key: 0 }, [s("span", ht, O(t.label), 1), s("span", gt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", _t, [s("span", vt, O(t.label), 1), s("div", yt, [t.params?.length ? (S(), o("button", {
|
|
487
551
|
key: 0,
|
|
488
552
|
class: "card-settings-btn",
|
|
489
|
-
onClick:
|
|
553
|
+
onClick: F((e) => ie(t.id), ["stop"]),
|
|
490
554
|
title: "编辑参数"
|
|
491
555
|
}, [...u[18] ||= [s("svg", {
|
|
492
556
|
viewBox: "0 0 24 24",
|
|
493
557
|
width: "14",
|
|
494
558
|
height: "14",
|
|
495
559
|
fill: "currentColor"
|
|
496
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8,
|
|
497
|
-
|
|
498
|
-
!
|
|
560
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, bt)) : a("", !0)])]), s("div", xt, O(t.name), 1)], 64))], 10, mt))), 128))], 2)])) : a("", !0),
|
|
561
|
+
k(b).length > 0 && k(C).length > 0 ? (S(), o("div", St)) : a("", !0),
|
|
562
|
+
!E.value && k(v).trim() ? (S(), o("div", Ct, [...u[19] ||= [
|
|
499
563
|
s("svg", {
|
|
500
564
|
viewBox: "0 0 24 24",
|
|
501
565
|
width: "48",
|
|
@@ -505,44 +569,44 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
505
569
|
s("p", null, "未找到匹配的指标", -1),
|
|
506
570
|
s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
|
|
507
571
|
]])) : a("", !0),
|
|
508
|
-
|
|
572
|
+
k(C).length > 0 ? (S(), o("div", wt, [s("div", Tt, [u[20] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", Et, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact: R.value }]) }, [(S(!0), o(e, null, T(k(C), (t) => (S(), o("button", {
|
|
509
573
|
key: t.id,
|
|
510
574
|
class: g(["indicator-card", {
|
|
511
575
|
active: H(t.id),
|
|
512
|
-
compact:
|
|
576
|
+
compact: R.value
|
|
513
577
|
}]),
|
|
514
|
-
onClick: (e) => H(t.id) ?
|
|
515
|
-
}, [
|
|
578
|
+
onClick: (e) => H(t.id) ? re(t.id) : ne(t.id)
|
|
579
|
+
}, [R.value ? (S(), o(e, { key: 0 }, [s("span", Ot, O(t.label), 1), s("span", kt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", At, [s("span", jt, O(t.label), 1), s("div", Mt, [t.params?.length ? (S(), o("button", {
|
|
516
580
|
key: 0,
|
|
517
581
|
class: "card-settings-btn",
|
|
518
|
-
onClick:
|
|
582
|
+
onClick: F((e) => ie(t.id), ["stop"]),
|
|
519
583
|
title: "编辑参数"
|
|
520
584
|
}, [...u[21] ||= [s("svg", {
|
|
521
585
|
viewBox: "0 0 24 24",
|
|
522
586
|
width: "14",
|
|
523
587
|
height: "14",
|
|
524
588
|
fill: "currentColor"
|
|
525
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8,
|
|
589
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, Nt)) : a("", !0)])]), s("div", Pt, O(t.name), 1)], 64))], 10, Dt))), 128))], 2)])) : a("", !0)
|
|
526
590
|
]),
|
|
527
|
-
s("div",
|
|
591
|
+
s("div", Ft, [s("div", It, [s("span", Lt, "已激活 " + O(te.value) + " 个指标", 1)]), s("button", {
|
|
528
592
|
class: "btn btn-confirm",
|
|
529
|
-
onClick: u[5] ||= (e) =>
|
|
593
|
+
onClick: u[5] ||= (e) => k(h).closeMenu()
|
|
530
594
|
}, "确认")])
|
|
531
595
|
])) : a("", !0)]),
|
|
532
596
|
_: 1
|
|
533
597
|
})])) : a("", !0)]),
|
|
534
598
|
_: 1
|
|
535
599
|
})], 8, ["to"])),
|
|
536
|
-
|
|
600
|
+
V.value ? (S(), i(We, {
|
|
537
601
|
key: 0,
|
|
538
|
-
visible:
|
|
539
|
-
"indicator-id":
|
|
540
|
-
"indicator-name":
|
|
541
|
-
"indicator-description":
|
|
542
|
-
params:
|
|
543
|
-
values:
|
|
544
|
-
onClose: u[8] ||= (e) =>
|
|
545
|
-
onConfirm:
|
|
602
|
+
visible: j.value,
|
|
603
|
+
"indicator-id": V.value.id,
|
|
604
|
+
"indicator-name": V.value.name,
|
|
605
|
+
"indicator-description": V.value.description,
|
|
606
|
+
params: V.value.params || [],
|
|
607
|
+
values: ae(V.value.id),
|
|
608
|
+
onClose: u[8] ||= (e) => j.value = !1,
|
|
609
|
+
onConfirm: le
|
|
546
610
|
}, null, 8, [
|
|
547
611
|
"visible",
|
|
548
612
|
"indicator-id",
|
|
@@ -553,25 +617,25 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
553
617
|
])) : a("", !0)
|
|
554
618
|
]));
|
|
555
619
|
}
|
|
556
|
-
}), [["__scopeId", "data-v-
|
|
620
|
+
}), [["__scopeId", "data-v-01a99263"]]), zt = { class: "kline-tooltip__title" }, Bt = { key: 0 }, Vt = { class: "kline-tooltip__grid" }, Ht = { class: "row" }, Ut = { class: "row" }, Wt = { class: "row" }, Gt = { class: "row" }, Kt = {
|
|
557
621
|
key: 0,
|
|
558
622
|
class: "row"
|
|
559
|
-
},
|
|
623
|
+
}, qt = {
|
|
560
624
|
key: 1,
|
|
561
625
|
class: "row"
|
|
562
|
-
},
|
|
626
|
+
}, Jt = {
|
|
563
627
|
key: 2,
|
|
564
628
|
class: "row"
|
|
565
|
-
},
|
|
629
|
+
}, Yt = {
|
|
566
630
|
key: 3,
|
|
567
631
|
class: "row"
|
|
568
|
-
},
|
|
632
|
+
}, Xt = {
|
|
569
633
|
key: 4,
|
|
570
634
|
class: "row"
|
|
571
|
-
},
|
|
635
|
+
}, Zt = {
|
|
572
636
|
key: 5,
|
|
573
637
|
class: "row"
|
|
574
|
-
},
|
|
638
|
+
}, Qt = "#6b7280", $t = /* @__PURE__ */ q(/* @__PURE__ */ u({
|
|
575
639
|
__name: "KLineTooltip",
|
|
576
640
|
props: {
|
|
577
641
|
k: {},
|
|
@@ -580,7 +644,9 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
580
644
|
pos: {},
|
|
581
645
|
useAnchor: { type: Boolean },
|
|
582
646
|
anchorPlacement: {},
|
|
583
|
-
setEl: {
|
|
647
|
+
setEl: {},
|
|
648
|
+
upColor: { default: "#ef4444" },
|
|
649
|
+
downColor: { default: "#22c55e" }
|
|
584
650
|
},
|
|
585
651
|
setup(e) {
|
|
586
652
|
let t = e, n = r(() => t.useAnchor === !0), i = r(() => t.anchorPlacement === "left-bottom" ? "anchor-left-bottom" : "anchor-right-bottom");
|
|
@@ -604,21 +670,21 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
604
670
|
}
|
|
605
671
|
let p = r(() => {
|
|
606
672
|
let e = t.k;
|
|
607
|
-
if (!e) return
|
|
673
|
+
if (!e) return Qt;
|
|
608
674
|
let n = f(e, t.data, t.index);
|
|
609
|
-
return n > 0 ?
|
|
675
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Qt;
|
|
610
676
|
}), m = r(() => {
|
|
611
677
|
let e = t.k;
|
|
612
|
-
if (!e) return
|
|
678
|
+
if (!e) return Qt;
|
|
613
679
|
let n = e.close - e.open;
|
|
614
|
-
return n > 0 ?
|
|
680
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Qt;
|
|
615
681
|
}), h = r(() => {
|
|
616
682
|
let e = t.k;
|
|
617
|
-
if (!e) return
|
|
683
|
+
if (!e) return Qt;
|
|
618
684
|
let n = e.changePercent ?? (e.close - e.open) / e.open * 100;
|
|
619
|
-
return n > 0 ?
|
|
685
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Qt;
|
|
620
686
|
});
|
|
621
|
-
return (t, r) => e.k ? (
|
|
687
|
+
return (t, r) => e.k ? (S(), o("div", {
|
|
622
688
|
key: 0,
|
|
623
689
|
ref: c,
|
|
624
690
|
class: g(["kline-tooltip", [{ "use-anchor": n.value }, i.value]]),
|
|
@@ -626,23 +692,23 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
626
692
|
left: `${e.pos.x}px`,
|
|
627
693
|
top: `${e.pos.y}px`
|
|
628
694
|
})
|
|
629
|
-
}, [s("div",
|
|
630
|
-
s("div",
|
|
631
|
-
s("div",
|
|
632
|
-
s("div",
|
|
633
|
-
s("div",
|
|
634
|
-
typeof e.k.volume == "number" ? (
|
|
635
|
-
typeof e.k.turnover == "number" ? (
|
|
636
|
-
typeof e.k.amplitude == "number" ? (
|
|
637
|
-
typeof e.k.changePercent == "number" ? (
|
|
638
|
-
typeof e.k.changeAmount == "number" ? (
|
|
639
|
-
typeof e.k.turnoverRate == "number" ? (
|
|
695
|
+
}, [s("div", zt, [e.k.stockCode ? (S(), o("span", Bt, O(e.k.stockCode), 1)) : a("", !0), s("span", null, O(l(e.k.timestamp)), 1)]), s("div", Vt, [
|
|
696
|
+
s("div", Ht, [r[0] ||= s("span", null, "开", -1), s("span", { style: _({ color: p.value }) }, O(e.k.open.toFixed(2)), 5)]),
|
|
697
|
+
s("div", Ut, [r[1] ||= s("span", null, "高", -1), s("span", null, O(e.k.high.toFixed(2)), 1)]),
|
|
698
|
+
s("div", Wt, [r[2] ||= s("span", null, "低", -1), s("span", null, O(e.k.low.toFixed(2)), 1)]),
|
|
699
|
+
s("div", Gt, [r[3] ||= s("span", null, "收", -1), s("span", { style: _({ color: m.value }) }, O(e.k.close.toFixed(2)), 5)]),
|
|
700
|
+
typeof e.k.volume == "number" ? (S(), o("div", Kt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, O(u(e.k.volume)), 1)])) : a("", !0),
|
|
701
|
+
typeof e.k.turnover == "number" ? (S(), o("div", qt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, O(u(e.k.turnover)), 1)])) : a("", !0),
|
|
702
|
+
typeof e.k.amplitude == "number" ? (S(), o("div", Jt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, O(e.k.amplitude) + "%", 1)])) : a("", !0),
|
|
703
|
+
typeof e.k.changePercent == "number" ? (S(), o("div", Yt, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changePercent, "%")), 5)])) : a("", !0),
|
|
704
|
+
typeof e.k.changeAmount == "number" ? (S(), o("div", Xt, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changeAmount, "")), 5)])) : a("", !0),
|
|
705
|
+
typeof e.k.turnoverRate == "number" ? (S(), o("div", Zt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, O(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
|
|
640
706
|
])], 6)) : a("", !0);
|
|
641
707
|
}
|
|
642
|
-
}), [["__scopeId", "data-v-
|
|
708
|
+
}), [["__scopeId", "data-v-a068b75e"]]), en = { class: "marker-tooltip__title" }, tn = {
|
|
643
709
|
key: 0,
|
|
644
710
|
class: "marker-tooltip__content"
|
|
645
|
-
},
|
|
711
|
+
}, nn = /* @__PURE__ */ q(/* @__PURE__ */ u({
|
|
646
712
|
__name: "MarkerTooltip",
|
|
647
713
|
props: {
|
|
648
714
|
marker: {},
|
|
@@ -683,7 +749,7 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
683
749
|
function h(e) {
|
|
684
750
|
return typeof e == "number" ? e.toFixed(2) : String(e);
|
|
685
751
|
}
|
|
686
|
-
return (n, r) => t.marker ? (
|
|
752
|
+
return (n, r) => t.marker ? (S(), o("div", {
|
|
687
753
|
key: 0,
|
|
688
754
|
ref: u,
|
|
689
755
|
class: g(["marker-tooltip", [{ "use-anchor": c.value }, l.value]]),
|
|
@@ -691,18 +757,18 @@ var Y = { class: "params-header" }, he = { class: "header-left" }, ge = { class:
|
|
|
691
757
|
left: `${t.pos.x + 12}px`,
|
|
692
758
|
top: `${t.pos.y + 12}px`
|
|
693
759
|
})
|
|
694
|
-
}, [s("div",
|
|
760
|
+
}, [s("div", en, O(f.value), 1), m.value ? (S(), o("div", tn, [(S(!0), o(e, null, T(p.value, (e, t) => (S(), o("div", {
|
|
695
761
|
key: t,
|
|
696
762
|
class: "row"
|
|
697
|
-
}, [s("span", null,
|
|
763
|
+
}, [s("span", null, O(t), 1), s("span", null, O(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
|
|
698
764
|
}
|
|
699
|
-
}), [["__scopeId", "data-v-
|
|
765
|
+
}), [["__scopeId", "data-v-f2a21012"]]), rn = {
|
|
700
766
|
viewBox: "0 0 24 24",
|
|
701
767
|
width: "1.2em",
|
|
702
768
|
height: "1.2em"
|
|
703
769
|
};
|
|
704
|
-
function
|
|
705
|
-
return
|
|
770
|
+
function an(e, t) {
|
|
771
|
+
return S(), o("svg", rn, [...t[0] ||= [s("path", {
|
|
706
772
|
fill: "none",
|
|
707
773
|
stroke: "currentColor",
|
|
708
774
|
"stroke-linecap": "round",
|
|
@@ -711,16 +777,16 @@ function qt(e, t) {
|
|
|
711
777
|
d: "M7.904 17.563a1.2 1.2 0 0 0 2.228.308l2.09-3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047-1.047a1.067 1.067 0 0 0 0-1.509l-4.907-4.907l3.113-2.09a1.2 1.2 0 0 0-.309-2.228L4 4z"
|
|
712
778
|
}, null, -1)]]);
|
|
713
779
|
}
|
|
714
|
-
var
|
|
780
|
+
var on = m({
|
|
715
781
|
name: "tabler-pointer",
|
|
716
|
-
render:
|
|
717
|
-
}),
|
|
782
|
+
render: an
|
|
783
|
+
}), sn = {
|
|
718
784
|
viewBox: "0 0 24 24",
|
|
719
785
|
width: "1.2em",
|
|
720
786
|
height: "1.2em"
|
|
721
787
|
};
|
|
722
|
-
function
|
|
723
|
-
return
|
|
788
|
+
function cn(e, t) {
|
|
789
|
+
return S(), o("svg", sn, [...t[0] ||= [s("path", {
|
|
724
790
|
fill: "none",
|
|
725
791
|
stroke: "currentColor",
|
|
726
792
|
"stroke-linecap": "round",
|
|
@@ -729,16 +795,16 @@ function Xt(e, t) {
|
|
|
729
795
|
d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
|
|
730
796
|
}, null, -1)]]);
|
|
731
797
|
}
|
|
732
|
-
var
|
|
798
|
+
var ln = m({
|
|
733
799
|
name: "tabler-chart-line",
|
|
734
|
-
render:
|
|
735
|
-
}),
|
|
800
|
+
render: cn
|
|
801
|
+
}), un = {
|
|
736
802
|
viewBox: "0 0 24 24",
|
|
737
803
|
width: "1.2em",
|
|
738
804
|
height: "1.2em"
|
|
739
805
|
};
|
|
740
|
-
function
|
|
741
|
-
return
|
|
806
|
+
function dn(e, t) {
|
|
807
|
+
return S(), o("svg", un, [...t[0] ||= [s("path", {
|
|
742
808
|
fill: "none",
|
|
743
809
|
stroke: "currentColor",
|
|
744
810
|
"stroke-linecap": "round",
|
|
@@ -747,16 +813,16 @@ function $t(e, t) {
|
|
|
747
813
|
d: "M17 7L7 17M8 7h9v9"
|
|
748
814
|
}, null, -1)]]);
|
|
749
815
|
}
|
|
750
|
-
var
|
|
816
|
+
var fn = m({
|
|
751
817
|
name: "tabler-arrow-up-right",
|
|
752
|
-
render:
|
|
753
|
-
}),
|
|
818
|
+
render: dn
|
|
819
|
+
}), pn = {
|
|
754
820
|
viewBox: "0 0 24 24",
|
|
755
821
|
width: "1.2em",
|
|
756
822
|
height: "1.2em"
|
|
757
823
|
};
|
|
758
|
-
function
|
|
759
|
-
return
|
|
824
|
+
function mn(e, t) {
|
|
825
|
+
return S(), o("svg", pn, [...t[0] ||= [s("path", {
|
|
760
826
|
fill: "none",
|
|
761
827
|
stroke: "currentColor",
|
|
762
828
|
"stroke-linecap": "round",
|
|
@@ -765,16 +831,16 @@ function nn(e, t) {
|
|
|
765
831
|
d: "M5 12h14m-6 6l6-6m-6-6l6 6"
|
|
766
832
|
}, null, -1)]]);
|
|
767
833
|
}
|
|
768
|
-
var
|
|
834
|
+
var hn = m({
|
|
769
835
|
name: "tabler-arrow-right",
|
|
770
|
-
render:
|
|
771
|
-
}),
|
|
836
|
+
render: mn
|
|
837
|
+
}), gn = {
|
|
772
838
|
viewBox: "0 0 24 24",
|
|
773
839
|
width: "1.2em",
|
|
774
840
|
height: "1.2em"
|
|
775
841
|
};
|
|
776
|
-
function
|
|
777
|
-
return
|
|
842
|
+
function _n(e, t) {
|
|
843
|
+
return S(), o("svg", gn, [...t[0] ||= [s("path", {
|
|
778
844
|
fill: "none",
|
|
779
845
|
stroke: "currentColor",
|
|
780
846
|
"stroke-linecap": "round",
|
|
@@ -783,16 +849,16 @@ function on(e, t) {
|
|
|
783
849
|
d: "M5 12h14"
|
|
784
850
|
}, null, -1)]]);
|
|
785
851
|
}
|
|
786
|
-
var
|
|
852
|
+
var vn = m({
|
|
787
853
|
name: "tabler-minus",
|
|
788
|
-
render:
|
|
789
|
-
}),
|
|
854
|
+
render: _n
|
|
855
|
+
}), yn = {
|
|
790
856
|
viewBox: "0 0 24 24",
|
|
791
857
|
width: "1.2em",
|
|
792
858
|
height: "1.2em"
|
|
793
859
|
};
|
|
794
|
-
function
|
|
795
|
-
return
|
|
860
|
+
function bn(e, t) {
|
|
861
|
+
return S(), o("svg", yn, [...t[0] ||= [s("path", {
|
|
796
862
|
fill: "none",
|
|
797
863
|
stroke: "currentColor",
|
|
798
864
|
"stroke-linecap": "round",
|
|
@@ -801,16 +867,16 @@ function ln(e, t) {
|
|
|
801
867
|
d: "M3 12v.01M7 12h10m4 0v.01"
|
|
802
868
|
}, null, -1)]]);
|
|
803
869
|
}
|
|
804
|
-
var
|
|
870
|
+
var xn = m({
|
|
805
871
|
name: "tabler-separator",
|
|
806
|
-
render:
|
|
807
|
-
}),
|
|
872
|
+
render: bn
|
|
873
|
+
}), Sn = {
|
|
808
874
|
viewBox: "0 0 24 24",
|
|
809
875
|
width: "1.2em",
|
|
810
876
|
height: "1.2em"
|
|
811
877
|
};
|
|
812
|
-
function
|
|
813
|
-
return
|
|
878
|
+
function Cn(e, t) {
|
|
879
|
+
return S(), o("svg", Sn, [...t[0] ||= [s("path", {
|
|
814
880
|
fill: "none",
|
|
815
881
|
stroke: "currentColor",
|
|
816
882
|
"stroke-linecap": "round",
|
|
@@ -819,16 +885,16 @@ function fn(e, t) {
|
|
|
819
885
|
d: "M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2M9 12h6m-3-3v6"
|
|
820
886
|
}, null, -1)]]);
|
|
821
887
|
}
|
|
822
|
-
var
|
|
888
|
+
var wn = m({
|
|
823
889
|
name: "tabler-crosshair",
|
|
824
|
-
render:
|
|
825
|
-
}),
|
|
890
|
+
render: Cn
|
|
891
|
+
}), Tn = {
|
|
826
892
|
viewBox: "0 0 24 24",
|
|
827
893
|
width: "1.2em",
|
|
828
894
|
height: "1.2em"
|
|
829
895
|
};
|
|
830
|
-
function
|
|
831
|
-
return
|
|
896
|
+
function En(e, t) {
|
|
897
|
+
return S(), o("svg", Tn, [...t[0] ||= [s("g", {
|
|
832
898
|
fill: "none",
|
|
833
899
|
stroke: "currentColor",
|
|
834
900
|
"stroke-linecap": "round",
|
|
@@ -836,16 +902,16 @@ function hn(e, t) {
|
|
|
836
902
|
"stroke-width": "2"
|
|
837
903
|
}, [s("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01" }), s("path", { d: "M11 12h1v4h1" })], -1)]]);
|
|
838
904
|
}
|
|
839
|
-
var
|
|
905
|
+
var Dn = m({
|
|
840
906
|
name: "tabler-info-circle",
|
|
841
|
-
render:
|
|
842
|
-
}),
|
|
907
|
+
render: En
|
|
908
|
+
}), On = {
|
|
843
909
|
viewBox: "0 0 24 24",
|
|
844
910
|
width: "1.2em",
|
|
845
911
|
height: "1.2em"
|
|
846
912
|
};
|
|
847
|
-
function
|
|
848
|
-
return
|
|
913
|
+
function kn(e, t) {
|
|
914
|
+
return S(), o("svg", On, [...t[0] ||= [s("path", {
|
|
849
915
|
fill: "none",
|
|
850
916
|
stroke: "currentColor",
|
|
851
917
|
"stroke-linecap": "round",
|
|
@@ -854,16 +920,16 @@ function vn(e, t) {
|
|
|
854
920
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
|
|
855
921
|
}, null, -1)]]);
|
|
856
922
|
}
|
|
857
|
-
var
|
|
923
|
+
var An = m({
|
|
858
924
|
name: "tabler-zoom-in",
|
|
859
|
-
render:
|
|
860
|
-
}),
|
|
925
|
+
render: kn
|
|
926
|
+
}), jn = {
|
|
861
927
|
viewBox: "0 0 24 24",
|
|
862
928
|
width: "1.2em",
|
|
863
929
|
height: "1.2em"
|
|
864
930
|
};
|
|
865
|
-
function
|
|
866
|
-
return
|
|
931
|
+
function Mn(e, t) {
|
|
932
|
+
return S(), o("svg", jn, [...t[0] ||= [s("path", {
|
|
867
933
|
fill: "none",
|
|
868
934
|
stroke: "currentColor",
|
|
869
935
|
"stroke-linecap": "round",
|
|
@@ -872,16 +938,16 @@ function xn(e, t) {
|
|
|
872
938
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
|
|
873
939
|
}, null, -1)]]);
|
|
874
940
|
}
|
|
875
|
-
var
|
|
941
|
+
var Nn = m({
|
|
876
942
|
name: "tabler-zoom-out",
|
|
877
|
-
render:
|
|
878
|
-
}),
|
|
943
|
+
render: Mn
|
|
944
|
+
}), Pn = {
|
|
879
945
|
viewBox: "0 0 24 24",
|
|
880
946
|
width: "1.2em",
|
|
881
947
|
height: "1.2em"
|
|
882
948
|
};
|
|
883
|
-
function
|
|
884
|
-
return
|
|
949
|
+
function Fn(e, t) {
|
|
950
|
+
return S(), o("svg", Pn, [...t[0] ||= [s("path", {
|
|
885
951
|
fill: "none",
|
|
886
952
|
stroke: "currentColor",
|
|
887
953
|
"stroke-linecap": "round",
|
|
@@ -890,16 +956,16 @@ function wn(e, t) {
|
|
|
890
956
|
d: "M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2"
|
|
891
957
|
}, null, -1)]]);
|
|
892
958
|
}
|
|
893
|
-
var
|
|
959
|
+
var In = m({
|
|
894
960
|
name: "tabler-maximize",
|
|
895
|
-
render:
|
|
896
|
-
}),
|
|
961
|
+
render: Fn
|
|
962
|
+
}), Ln = {
|
|
897
963
|
viewBox: "0 0 24 24",
|
|
898
964
|
width: "1.2em",
|
|
899
965
|
height: "1.2em"
|
|
900
966
|
};
|
|
901
|
-
function
|
|
902
|
-
return
|
|
967
|
+
function Rn(e, t) {
|
|
968
|
+
return S(), o("svg", Ln, [...t[0] ||= [s("path", {
|
|
903
969
|
fill: "none",
|
|
904
970
|
stroke: "currentColor",
|
|
905
971
|
"stroke-linecap": "round",
|
|
@@ -908,16 +974,16 @@ function Dn(e, t) {
|
|
|
908
974
|
d: "M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"
|
|
909
975
|
}, null, -1)]]);
|
|
910
976
|
}
|
|
911
|
-
var
|
|
977
|
+
var zn = m({
|
|
912
978
|
name: "tabler-minimize",
|
|
913
|
-
render:
|
|
914
|
-
}),
|
|
979
|
+
render: Rn
|
|
980
|
+
}), Bn = {
|
|
915
981
|
viewBox: "0 0 24 24",
|
|
916
982
|
width: "1.2em",
|
|
917
983
|
height: "1.2em"
|
|
918
984
|
};
|
|
919
|
-
function
|
|
920
|
-
return
|
|
985
|
+
function Vn(e, t) {
|
|
986
|
+
return S(), o("svg", Bn, [...t[0] ||= [s("g", {
|
|
921
987
|
fill: "none",
|
|
922
988
|
stroke: "currentColor",
|
|
923
989
|
"stroke-linecap": "round",
|
|
@@ -925,16 +991,16 @@ function An(e, t) {
|
|
|
925
991
|
"stroke-width": "2"
|
|
926
992
|
}, [s("path", { d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065" }), s("path", { d: "M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0" })], -1)]]);
|
|
927
993
|
}
|
|
928
|
-
var
|
|
994
|
+
var Hn = m({
|
|
929
995
|
name: "tabler-settings",
|
|
930
|
-
render:
|
|
931
|
-
}),
|
|
996
|
+
render: Vn
|
|
997
|
+
}), Un = {
|
|
932
998
|
viewBox: "0 0 24 24",
|
|
933
999
|
width: "1.2em",
|
|
934
1000
|
height: "1.2em"
|
|
935
1001
|
};
|
|
936
|
-
function
|
|
937
|
-
return
|
|
1002
|
+
function Wn(e, t) {
|
|
1003
|
+
return S(), o("svg", Un, [...t[0] ||= [s("path", {
|
|
938
1004
|
fill: "none",
|
|
939
1005
|
stroke: "currentColor",
|
|
940
1006
|
"stroke-linecap": "round",
|
|
@@ -943,16 +1009,16 @@ function Nn(e, t) {
|
|
|
943
1009
|
d: "M3 5a2 2 0 1 0 4 0a2 2 0 1 0-4 0m14 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0M3 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0m14 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0M5 7v10M7 5h10M7 19h10m2-12v10"
|
|
944
1010
|
}, null, -1)]]);
|
|
945
1011
|
}
|
|
946
|
-
var
|
|
1012
|
+
var Gn = m({
|
|
947
1013
|
name: "tabler-shape",
|
|
948
|
-
render:
|
|
949
|
-
}),
|
|
1014
|
+
render: Wn
|
|
1015
|
+
}), Kn = {
|
|
950
1016
|
viewBox: "0 0 24 24",
|
|
951
1017
|
width: "1.2em",
|
|
952
1018
|
height: "1.2em"
|
|
953
1019
|
};
|
|
954
|
-
function
|
|
955
|
-
return
|
|
1020
|
+
function qn(e, t) {
|
|
1021
|
+
return S(), o("svg", Kn, [...t[0] ||= [s("path", {
|
|
956
1022
|
fill: "none",
|
|
957
1023
|
stroke: "currentColor",
|
|
958
1024
|
"stroke-linecap": "round",
|
|
@@ -961,16 +1027,16 @@ function In(e, t) {
|
|
|
961
1027
|
d: "M3 7a2 2 0 1 0 4 0a2 2 0 1 0-4 0m11 8a2 2 0 1 0 4 0a2 2 0 1 0-4 0m1-9a3 3 0 1 0 6 0a3 3 0 1 0-6 0M3 18a3 3 0 1 0 6 0a3 3 0 1 0-6 0m6-1l5-1.5m-7.5-7l7.81 5.37M7 7l8-1"
|
|
962
1028
|
}, null, -1)]]);
|
|
963
1029
|
}
|
|
964
|
-
var
|
|
1030
|
+
var Jn = m({
|
|
965
1031
|
name: "tabler-chart-dots-3",
|
|
966
|
-
render:
|
|
967
|
-
}),
|
|
1032
|
+
render: qn
|
|
1033
|
+
}), Yn = {
|
|
968
1034
|
viewBox: "0 0 24 24",
|
|
969
1035
|
width: "1.2em",
|
|
970
1036
|
height: "1.2em"
|
|
971
1037
|
};
|
|
972
|
-
function
|
|
973
|
-
return
|
|
1038
|
+
function Xn(e, t) {
|
|
1039
|
+
return S(), o("svg", Yn, [...t[0] ||= [s("path", {
|
|
974
1040
|
fill: "none",
|
|
975
1041
|
stroke: "currentColor",
|
|
976
1042
|
"stroke-linecap": "round",
|
|
@@ -979,16 +1045,16 @@ function zn(e, t) {
|
|
|
979
1045
|
d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
|
|
980
1046
|
}, null, -1)]]);
|
|
981
1047
|
}
|
|
982
|
-
var
|
|
1048
|
+
var Zn = m({
|
|
983
1049
|
name: "tabler-caret-up-down",
|
|
984
|
-
render:
|
|
985
|
-
}),
|
|
1050
|
+
render: Xn
|
|
1051
|
+
}), Qn = {
|
|
986
1052
|
viewBox: "0 0 24 24",
|
|
987
1053
|
width: "1.2em",
|
|
988
1054
|
height: "1.2em"
|
|
989
1055
|
};
|
|
990
|
-
function
|
|
991
|
-
return
|
|
1056
|
+
function $n(e, t) {
|
|
1057
|
+
return S(), o("svg", Qn, [...t[0] ||= [s("path", {
|
|
992
1058
|
fill: "none",
|
|
993
1059
|
stroke: "currentColor",
|
|
994
1060
|
"stroke-linecap": "round",
|
|
@@ -997,34 +1063,34 @@ function Hn(e, t) {
|
|
|
997
1063
|
d: "M8 4H5v16h3m8-16h3v16h-3"
|
|
998
1064
|
}, null, -1)]]);
|
|
999
1065
|
}
|
|
1000
|
-
var
|
|
1066
|
+
var er = m({
|
|
1001
1067
|
name: "tabler-brackets",
|
|
1002
|
-
render:
|
|
1068
|
+
render: $n
|
|
1003
1069
|
});
|
|
1004
1070
|
//#endregion
|
|
1005
1071
|
//#region src/debug/canvasProfiler.ts
|
|
1006
|
-
function
|
|
1072
|
+
function tr() {
|
|
1007
1073
|
return Object.create(null);
|
|
1008
1074
|
}
|
|
1009
|
-
function
|
|
1075
|
+
function nr() {
|
|
1010
1076
|
return {
|
|
1011
|
-
ctxMethods:
|
|
1012
|
-
ctxProps:
|
|
1013
|
-
canvasProps:
|
|
1077
|
+
ctxMethods: tr(),
|
|
1078
|
+
ctxProps: tr(),
|
|
1079
|
+
canvasProps: tr(),
|
|
1014
1080
|
ctxMethodSources: Object.create(null)
|
|
1015
1081
|
};
|
|
1016
1082
|
}
|
|
1017
|
-
function
|
|
1083
|
+
function rr(e, t, n) {
|
|
1018
1084
|
let r = e[t] ??= {
|
|
1019
1085
|
count: 0,
|
|
1020
1086
|
totalTime: 0
|
|
1021
1087
|
};
|
|
1022
1088
|
r.count += 1, r.totalTime += n;
|
|
1023
1089
|
}
|
|
1024
|
-
function
|
|
1025
|
-
|
|
1090
|
+
function ir(e, t, n, r) {
|
|
1091
|
+
rr(e.ctxMethodSources[t] ??= tr(), n, r);
|
|
1026
1092
|
}
|
|
1027
|
-
function
|
|
1093
|
+
function ar(e) {
|
|
1028
1094
|
return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
|
|
1029
1095
|
name: e,
|
|
1030
1096
|
count: t.count,
|
|
@@ -1032,12 +1098,12 @@ function Jn(e) {
|
|
|
1032
1098
|
averageTime: (t.totalTime / t.count).toFixed(4)
|
|
1033
1099
|
})).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
|
|
1034
1100
|
}
|
|
1035
|
-
var
|
|
1036
|
-
function
|
|
1037
|
-
|
|
1101
|
+
var or = !1, sr = /* @__PURE__ */ new Map(), cr = /* @__PURE__ */ new Map();
|
|
1102
|
+
function lr(e) {
|
|
1103
|
+
or = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && fr() : pr();
|
|
1038
1104
|
}
|
|
1039
|
-
function
|
|
1040
|
-
if (!
|
|
1105
|
+
function ur() {
|
|
1106
|
+
if (!or) return "disabled";
|
|
1041
1107
|
let e = (/* @__PURE__ */ Error()).stack;
|
|
1042
1108
|
if (!e) return "unknown";
|
|
1043
1109
|
let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
@@ -1052,80 +1118,236 @@ function $n() {
|
|
|
1052
1118
|
}
|
|
1053
1119
|
function Q(e, t, n, r) {
|
|
1054
1120
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1055
|
-
if (
|
|
1121
|
+
if (sr.has(i)) return;
|
|
1056
1122
|
let a = Reflect.get(e, t);
|
|
1057
|
-
typeof a == "function" && (
|
|
1058
|
-
if (!
|
|
1059
|
-
let i = r?.captureSource ?
|
|
1060
|
-
return
|
|
1123
|
+
typeof a == "function" && (sr.set(i, a), Reflect.set(e, t, function(...e) {
|
|
1124
|
+
if (!or) return a.apply(this, e);
|
|
1125
|
+
let i = r?.captureSource ? ur() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
|
|
1126
|
+
return rr(n.ctxMethods, t, c), i && ir(n, t, i, c), s;
|
|
1061
1127
|
}));
|
|
1062
1128
|
}
|
|
1063
|
-
function
|
|
1129
|
+
function dr(e, t, n) {
|
|
1064
1130
|
let r = Object.getOwnPropertyDescriptor(e, t);
|
|
1065
1131
|
if (!r?.set || !r.configurable) return;
|
|
1066
1132
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1067
|
-
|
|
1133
|
+
cr.has(i) || (cr.set(i, r), Object.defineProperty(e, t, {
|
|
1068
1134
|
configurable: !0,
|
|
1069
1135
|
enumerable: r.enumerable ?? !1,
|
|
1070
1136
|
get: r.get,
|
|
1071
1137
|
set(e) {
|
|
1072
|
-
if (!
|
|
1138
|
+
if (!or) {
|
|
1073
1139
|
r.set.call(this, e);
|
|
1074
1140
|
return;
|
|
1075
1141
|
}
|
|
1076
1142
|
let i = performance.now();
|
|
1077
|
-
r.set.call(this, e),
|
|
1143
|
+
r.set.call(this, e), rr(n, t, performance.now() - i);
|
|
1078
1144
|
}
|
|
1079
1145
|
}));
|
|
1080
1146
|
}
|
|
1081
|
-
function
|
|
1147
|
+
function fr() {
|
|
1082
1148
|
if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1083
1149
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1084
1150
|
if (!e || !t) return;
|
|
1085
|
-
let n =
|
|
1086
|
-
Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n),
|
|
1151
|
+
let n = nr();
|
|
1152
|
+
Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n), dr(e, "font", n.ctxProps), dr(e, "filter", n.ctxProps), dr(e, "shadowBlur", n.ctxProps), dr(e, "lineWidth", n.ctxProps), dr(t, "width", n.canvasProps), dr(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
|
|
1087
1153
|
let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
|
|
1088
1154
|
if (e) {
|
|
1089
|
-
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(
|
|
1155
|
+
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(ar(e.ctxMethods)), console.log("ctx props"), console.table(ar(e.ctxProps)), console.log("canvas props"), console.table(ar(e.canvasProps));
|
|
1090
1156
|
for (let t of ["fillText", "measureText"]) {
|
|
1091
1157
|
let n = e.ctxMethodSources[t];
|
|
1092
|
-
n && (console.log(`${t} sources`), console.table(
|
|
1158
|
+
n && (console.log(`${t} sources`), console.table(ar(n).slice(0, 20)));
|
|
1093
1159
|
}
|
|
1094
1160
|
console.groupEnd();
|
|
1095
1161
|
}
|
|
1096
1162
|
}, window.resetCanvasReport = () => {
|
|
1097
|
-
window.__KMAP_CANVAS_PROFILER_METRICS__ =
|
|
1163
|
+
window.__KMAP_CANVAS_PROFILER_METRICS__ = nr();
|
|
1098
1164
|
}, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
|
|
1099
1165
|
}
|
|
1100
|
-
function
|
|
1166
|
+
function pr() {
|
|
1101
1167
|
if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1102
1168
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1103
|
-
|
|
1169
|
+
sr.forEach((n, r) => {
|
|
1104
1170
|
let i = r.match(/^(.+):(.+)$/);
|
|
1105
1171
|
if (!i) return;
|
|
1106
1172
|
let [, a, o] = i, s = null;
|
|
1107
1173
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
|
|
1108
|
-
}),
|
|
1174
|
+
}), sr.clear(), cr.forEach((n, r) => {
|
|
1109
1175
|
let i = r.match(/^(.+):(.+)$/);
|
|
1110
1176
|
if (!i) return;
|
|
1111
1177
|
let [, a, o] = i, s = null;
|
|
1112
1178
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
|
|
1113
|
-
}),
|
|
1179
|
+
}), cr.clear(), window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !1, window.__KMAP_CANVAS_PROFILER_METRICS__ = void 0, window.showCanvasReport = void 0, window.resetCanvasReport = void 0, console.info("[kmap] Canvas profiler disabled.");
|
|
1114
1180
|
}
|
|
1115
1181
|
//#endregion
|
|
1116
|
-
//#region src/components/
|
|
1117
|
-
var
|
|
1182
|
+
//#region src/components/ChartSettingsDialog.vue?vue&type=script&setup=true&lang.ts
|
|
1183
|
+
var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["onUpdate:modelValue"], _r = ["onUpdate:modelValue"], vr = ["value"], yr = { class: "settings-label" }, br = ["onUpdate:modelValue"], xr = ["onUpdate:modelValue"], Sr = ["value"], Cr = { class: "settings-header" }, wr = { class: "header-right" }, Tr = { class: "settings-body" }, Er = /* @__PURE__ */ q(/* @__PURE__ */ u({
|
|
1184
|
+
__name: "ChartSettingsDialog",
|
|
1185
|
+
props: { show: { type: Boolean } },
|
|
1186
|
+
emits: ["close", "confirm"],
|
|
1187
|
+
setup(u, { emit: d }) {
|
|
1188
|
+
let f = u, p = d, m = Ee(), h = r(() => G.filter((e) => e.group === "main")), g = r(() => G.filter((e) => e.group === "experimental")), _ = w(!1);
|
|
1189
|
+
function v() {
|
|
1190
|
+
try {
|
|
1191
|
+
let e = localStorage.getItem(K);
|
|
1192
|
+
if (e) {
|
|
1193
|
+
let t = JSON.parse(e), n = {};
|
|
1194
|
+
return G.forEach((e) => {
|
|
1195
|
+
n[e.key] = t[e.key] ?? e.default;
|
|
1196
|
+
}), n.colorPresetSettings = V(t.colorPresetSettings), n;
|
|
1197
|
+
}
|
|
1198
|
+
} catch {}
|
|
1199
|
+
let e = {};
|
|
1200
|
+
return G.forEach((t) => {
|
|
1201
|
+
e[t.key] = t.default;
|
|
1202
|
+
}), e.colorPresetSettings = {}, e;
|
|
1203
|
+
}
|
|
1204
|
+
let y = w(v());
|
|
1205
|
+
M(() => f.show, (e) => {
|
|
1206
|
+
e && (y.value = v());
|
|
1207
|
+
});
|
|
1208
|
+
function b() {
|
|
1209
|
+
p("close");
|
|
1210
|
+
}
|
|
1211
|
+
function x() {
|
|
1212
|
+
let e = {};
|
|
1213
|
+
G.forEach((t) => {
|
|
1214
|
+
e[t.key] = t.default;
|
|
1215
|
+
}), e.colorPresetSettings = {}, y.value = e;
|
|
1216
|
+
}
|
|
1217
|
+
function C() {
|
|
1218
|
+
p("confirm", { ...y.value });
|
|
1219
|
+
}
|
|
1220
|
+
return (r, d) => (S(), i(t, { to: k(m) }, [l(n, { name: "overlay" }, {
|
|
1221
|
+
default: N(() => [u.show ? (S(), o("div", {
|
|
1222
|
+
key: 0,
|
|
1223
|
+
class: "settings-overlay",
|
|
1224
|
+
onClick: b
|
|
1225
|
+
}, [l(n, { name: "modal" }, {
|
|
1226
|
+
default: N(() => [s("div", {
|
|
1227
|
+
class: "settings-modal",
|
|
1228
|
+
onClick: d[1] ||= F(() => {}, ["stop"])
|
|
1229
|
+
}, [
|
|
1230
|
+
s("div", { class: "settings-header" }, [d[7] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "图表设置"), s("span", { class: "settings-subtitle" }, "个性化配置")], -1), s("div", { class: "header-right" }, [s("button", {
|
|
1231
|
+
class: "settings-close",
|
|
1232
|
+
onClick: b
|
|
1233
|
+
}, [...d[6] ||= [s("svg", {
|
|
1234
|
+
viewBox: "0 0 24 24",
|
|
1235
|
+
fill: "none",
|
|
1236
|
+
stroke: "currentColor",
|
|
1237
|
+
"stroke-width": "2"
|
|
1238
|
+
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
1239
|
+
s("div", mr, [
|
|
1240
|
+
h.value.length > 0 ? (S(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, T(h.value, (t) => (S(), o("div", {
|
|
1241
|
+
key: t.key,
|
|
1242
|
+
class: "settings-item"
|
|
1243
|
+
}, [s("label", hr, [s("span", null, O(t.label), 1), t.type === "boolean" ? P((S(), o("input", {
|
|
1244
|
+
key: 0,
|
|
1245
|
+
type: "checkbox",
|
|
1246
|
+
class: "settings-checkbox",
|
|
1247
|
+
"onUpdate:modelValue": (e) => y.value[t.key] = e
|
|
1248
|
+
}, null, 8, gr)), [[A, y.value[t.key]]]) : t.type === "select" && t.options ? P((S(), o("select", {
|
|
1249
|
+
key: 1,
|
|
1250
|
+
class: "settings-select",
|
|
1251
|
+
"onUpdate:modelValue": (e) => y.value[t.key] = e
|
|
1252
|
+
}, [(S(!0), o(e, null, T(t.options, (e) => (S(), o("option", {
|
|
1253
|
+
key: e.value,
|
|
1254
|
+
value: e.value
|
|
1255
|
+
}, O(e.label), 9, vr))), 128))], 8, _r)), [[j, y.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0),
|
|
1256
|
+
d[11] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "样式 / 颜色")], -1),
|
|
1257
|
+
s("div", {
|
|
1258
|
+
class: "settings-item nav-item",
|
|
1259
|
+
onClick: d[0] ||= (e) => _.value = !0
|
|
1260
|
+
}, [...d[9] ||= [s("label", { class: "settings-label" }, [s("span", null, "颜色配置"), s("svg", {
|
|
1261
|
+
viewBox: "0 0 24 24",
|
|
1262
|
+
fill: "none",
|
|
1263
|
+
stroke: "currentColor",
|
|
1264
|
+
"stroke-width": "2",
|
|
1265
|
+
width: "16",
|
|
1266
|
+
height: "16",
|
|
1267
|
+
class: "nav-arrow"
|
|
1268
|
+
}, [s("path", { d: "M9 18l6-6-6-6" })])], -1)]]),
|
|
1269
|
+
g.value.length > 0 ? (S(), o(e, { key: 1 }, [d[10] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (S(!0), o(e, null, T(g.value, (t) => (S(), o("div", {
|
|
1270
|
+
key: t.key,
|
|
1271
|
+
class: "settings-item experimental"
|
|
1272
|
+
}, [s("label", yr, [s("span", null, O(t.label), 1), t.type === "boolean" ? P((S(), o("input", {
|
|
1273
|
+
key: 0,
|
|
1274
|
+
type: "checkbox",
|
|
1275
|
+
class: "settings-checkbox",
|
|
1276
|
+
"onUpdate:modelValue": (e) => y.value[t.key] = e
|
|
1277
|
+
}, null, 8, br)), [[A, y.value[t.key]]]) : t.type === "select" && t.options ? P((S(), o("select", {
|
|
1278
|
+
key: 1,
|
|
1279
|
+
class: "settings-select",
|
|
1280
|
+
"onUpdate:modelValue": (e) => y.value[t.key] = e
|
|
1281
|
+
}, [(S(!0), o(e, null, T(t.options, (e) => (S(), o("option", {
|
|
1282
|
+
key: e.value,
|
|
1283
|
+
value: e.value
|
|
1284
|
+
}, O(e.label), 9, Sr))), 128))], 8, xr)), [[j, y.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0)
|
|
1285
|
+
]),
|
|
1286
|
+
s("div", { class: "settings-footer" }, [s("button", {
|
|
1287
|
+
class: "settings-btn reset",
|
|
1288
|
+
onClick: x
|
|
1289
|
+
}, [...d[12] ||= [s("svg", {
|
|
1290
|
+
viewBox: "0 0 24 24",
|
|
1291
|
+
fill: "none",
|
|
1292
|
+
stroke: "currentColor",
|
|
1293
|
+
"stroke-width": "2"
|
|
1294
|
+
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", { class: "footer-right" }, [s("button", {
|
|
1295
|
+
class: "settings-btn cancel",
|
|
1296
|
+
onClick: b
|
|
1297
|
+
}, "取消"), s("button", {
|
|
1298
|
+
class: "settings-btn confirm",
|
|
1299
|
+
onClick: C
|
|
1300
|
+
}, [...d[13] ||= [s("svg", {
|
|
1301
|
+
viewBox: "0 0 24 24",
|
|
1302
|
+
fill: "none",
|
|
1303
|
+
stroke: "currentColor",
|
|
1304
|
+
"stroke-width": "2.5"
|
|
1305
|
+
}, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])])
|
|
1306
|
+
])]),
|
|
1307
|
+
_: 1
|
|
1308
|
+
})])) : a("", !0)]),
|
|
1309
|
+
_: 1
|
|
1310
|
+
}), l(n, { name: "overlay" }, {
|
|
1311
|
+
default: N(() => [_.value ? (S(), o("div", {
|
|
1312
|
+
key: 0,
|
|
1313
|
+
class: "settings-overlay nested-overlay",
|
|
1314
|
+
onClick: d[5] ||= (e) => _.value = !1
|
|
1315
|
+
}, [l(n, { name: "modal" }, {
|
|
1316
|
+
default: N(() => [s("div", {
|
|
1317
|
+
class: "settings-modal",
|
|
1318
|
+
onClick: d[4] ||= F(() => {}, ["stop"])
|
|
1319
|
+
}, [s("div", Cr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", wr, [s("button", {
|
|
1320
|
+
class: "settings-close",
|
|
1321
|
+
onClick: d[2] ||= (e) => _.value = !1
|
|
1322
|
+
}, [...d[14] ||= [s("svg", {
|
|
1323
|
+
viewBox: "0 0 24 24",
|
|
1324
|
+
fill: "none",
|
|
1325
|
+
stroke: "currentColor",
|
|
1326
|
+
"stroke-width": "2"
|
|
1327
|
+
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div", Tr, [l(be, {
|
|
1328
|
+
"color-preset-settings": y.value.colorPresetSettings,
|
|
1329
|
+
"onUpdate:colorPresetSettings": d[3] ||= (e) => y.value = {
|
|
1330
|
+
...y.value,
|
|
1331
|
+
colorPresetSettings: e
|
|
1332
|
+
}
|
|
1333
|
+
}, null, 8, ["color-preset-settings"])])])]),
|
|
1334
|
+
_: 1
|
|
1335
|
+
})])) : a("", !0)]),
|
|
1336
|
+
_: 1
|
|
1337
|
+
})], 8, ["to"]));
|
|
1338
|
+
}
|
|
1339
|
+
}), [["__scopeId", "data-v-49dd396c"]]), Dr = {
|
|
1118
1340
|
class: "left-toolbar",
|
|
1119
1341
|
"aria-label": "图表工具栏"
|
|
1120
|
-
},
|
|
1342
|
+
}, Or = { class: "left-toolbar__group" }, kr = [
|
|
1121
1343
|
"title",
|
|
1122
1344
|
"aria-label",
|
|
1123
1345
|
"onClick"
|
|
1124
|
-
],
|
|
1346
|
+
], Ar = ["onClick"], jr = [
|
|
1125
1347
|
"title",
|
|
1126
1348
|
"aria-label",
|
|
1127
1349
|
"onClick"
|
|
1128
|
-
],
|
|
1350
|
+
], Mr = { class: "left-toolbar__group" }, Nr = { class: "left-toolbar__group" }, Pr = ["title", "aria-label"], Fr = { class: "left-toolbar__group" }, Ir = /* @__PURE__ */ q(/* @__PURE__ */ u({
|
|
1129
1351
|
__name: "LeftToolbar",
|
|
1130
1352
|
props: { isFullscreen: { type: Boolean } },
|
|
1131
1353
|
emits: [
|
|
@@ -1135,202 +1357,193 @@ var rr = {
|
|
|
1135
1357
|
"zoomOut",
|
|
1136
1358
|
"settingsChange"
|
|
1137
1359
|
],
|
|
1138
|
-
setup(
|
|
1139
|
-
let
|
|
1360
|
+
setup(t, { expose: r, emit: c }) {
|
|
1361
|
+
let u = [
|
|
1140
1362
|
{
|
|
1141
1363
|
id: "cursor",
|
|
1142
1364
|
title: "光标",
|
|
1143
|
-
icon:
|
|
1365
|
+
icon: on
|
|
1144
1366
|
},
|
|
1145
1367
|
{
|
|
1146
1368
|
id: "lines",
|
|
1147
1369
|
title: "线条",
|
|
1148
|
-
icon:
|
|
1370
|
+
icon: ln,
|
|
1149
1371
|
children: [
|
|
1150
1372
|
{
|
|
1151
1373
|
id: "trend-line",
|
|
1152
1374
|
title: "线段",
|
|
1153
|
-
icon:
|
|
1375
|
+
icon: ln
|
|
1154
1376
|
},
|
|
1155
1377
|
{
|
|
1156
1378
|
id: "ray",
|
|
1157
1379
|
title: "射线",
|
|
1158
|
-
icon:
|
|
1380
|
+
icon: fn
|
|
1159
1381
|
},
|
|
1160
1382
|
{
|
|
1161
1383
|
id: "h-line",
|
|
1162
1384
|
title: "水平线",
|
|
1163
|
-
icon:
|
|
1385
|
+
icon: vn
|
|
1164
1386
|
},
|
|
1165
1387
|
{
|
|
1166
1388
|
id: "h-ray",
|
|
1167
1389
|
title: "水平射线",
|
|
1168
|
-
icon:
|
|
1390
|
+
icon: hn
|
|
1169
1391
|
},
|
|
1170
1392
|
{
|
|
1171
1393
|
id: "v-line",
|
|
1172
1394
|
title: "垂直线",
|
|
1173
|
-
icon:
|
|
1395
|
+
icon: xn
|
|
1174
1396
|
},
|
|
1175
1397
|
{
|
|
1176
1398
|
id: "crosshair-line",
|
|
1177
1399
|
title: "十字线",
|
|
1178
|
-
icon:
|
|
1400
|
+
icon: wn
|
|
1179
1401
|
},
|
|
1180
1402
|
{
|
|
1181
1403
|
id: "info-line",
|
|
1182
1404
|
title: "信息线",
|
|
1183
|
-
icon:
|
|
1405
|
+
icon: Dn
|
|
1184
1406
|
}
|
|
1185
1407
|
]
|
|
1186
1408
|
},
|
|
1187
1409
|
{
|
|
1188
1410
|
id: "channels",
|
|
1189
1411
|
title: "通道",
|
|
1190
|
-
icon:
|
|
1412
|
+
icon: Gn,
|
|
1191
1413
|
children: [
|
|
1192
1414
|
{
|
|
1193
1415
|
id: "parallel-channel",
|
|
1194
1416
|
title: "平行通道",
|
|
1195
|
-
icon:
|
|
1417
|
+
icon: Gn
|
|
1196
1418
|
},
|
|
1197
1419
|
{
|
|
1198
1420
|
id: "regression-channel",
|
|
1199
1421
|
title: "回归趋势",
|
|
1200
|
-
icon:
|
|
1422
|
+
icon: Jn
|
|
1201
1423
|
},
|
|
1202
1424
|
{
|
|
1203
1425
|
id: "flat-line",
|
|
1204
1426
|
title: "平滑顶底",
|
|
1205
|
-
icon:
|
|
1427
|
+
icon: Zn
|
|
1206
1428
|
},
|
|
1207
1429
|
{
|
|
1208
1430
|
id: "disjoint-channel",
|
|
1209
1431
|
title: "不相交通道",
|
|
1210
|
-
icon:
|
|
1432
|
+
icon: er
|
|
1211
1433
|
}
|
|
1212
1434
|
]
|
|
1213
1435
|
}
|
|
1214
|
-
],
|
|
1215
|
-
function
|
|
1436
|
+
], d = c, f = w("cursor"), p = w(null), m = w(!1);
|
|
1437
|
+
function h() {
|
|
1216
1438
|
try {
|
|
1217
|
-
let e = localStorage.getItem(
|
|
1439
|
+
let e = localStorage.getItem(K);
|
|
1218
1440
|
if (e) {
|
|
1219
|
-
let t = JSON.parse(e), n = {};
|
|
1220
|
-
return
|
|
1441
|
+
let t = JSON.parse(e), n = { ...t };
|
|
1442
|
+
return G.forEach((e) => {
|
|
1221
1443
|
n[e.key] = t[e.key] ?? e.default;
|
|
1222
1444
|
}), n;
|
|
1223
1445
|
}
|
|
1224
1446
|
} catch {}
|
|
1225
1447
|
let e = {};
|
|
1226
|
-
return
|
|
1448
|
+
return G.forEach((t) => {
|
|
1227
1449
|
e[t.key] = t.default;
|
|
1228
1450
|
}), e;
|
|
1229
1451
|
}
|
|
1230
|
-
function
|
|
1452
|
+
function _(e) {
|
|
1231
1453
|
try {
|
|
1232
|
-
localStorage.setItem(
|
|
1454
|
+
localStorage.setItem(K, JSON.stringify(e));
|
|
1233
1455
|
} catch {}
|
|
1234
1456
|
}
|
|
1235
|
-
let
|
|
1236
|
-
function
|
|
1237
|
-
return
|
|
1457
|
+
let v = w(h());
|
|
1458
|
+
function b(e) {
|
|
1459
|
+
return f.value === e.id ? !0 : e.children ? e.children.some((e) => e.id === f.value) : !1;
|
|
1238
1460
|
}
|
|
1239
|
-
function
|
|
1461
|
+
function C(e) {
|
|
1240
1462
|
if (e.children?.length) {
|
|
1241
|
-
if (!e.children.some((e) => e.id ===
|
|
1463
|
+
if (!e.children.some((e) => e.id === f.value)) {
|
|
1242
1464
|
let t = e.children[0];
|
|
1243
|
-
|
|
1465
|
+
f.value = t.id, d("selectTool", t.id);
|
|
1244
1466
|
}
|
|
1245
|
-
|
|
1467
|
+
O(e.id);
|
|
1246
1468
|
return;
|
|
1247
1469
|
}
|
|
1248
|
-
|
|
1470
|
+
f.value = e.id, d("selectTool", e.id), p.value = null;
|
|
1249
1471
|
}
|
|
1250
|
-
function
|
|
1251
|
-
|
|
1472
|
+
function D(e) {
|
|
1473
|
+
f.value = e.id, d("selectTool", e.id), p.value = null;
|
|
1252
1474
|
}
|
|
1253
|
-
function
|
|
1254
|
-
|
|
1475
|
+
function O(e) {
|
|
1476
|
+
p.value = p.value === e ? null : e;
|
|
1255
1477
|
}
|
|
1256
|
-
function
|
|
1257
|
-
|
|
1478
|
+
function A() {
|
|
1479
|
+
m.value = !0;
|
|
1258
1480
|
}
|
|
1259
|
-
function
|
|
1260
|
-
v.value
|
|
1261
|
-
}
|
|
1262
|
-
function ie() {
|
|
1263
|
-
let e = {};
|
|
1264
|
-
U.forEach((t) => {
|
|
1265
|
-
e[t.key] = t.default;
|
|
1266
|
-
}), L.value = e;
|
|
1481
|
+
function j() {
|
|
1482
|
+
return { ...v.value };
|
|
1267
1483
|
}
|
|
1268
|
-
|
|
1269
|
-
|
|
1484
|
+
r({ getSettings: j });
|
|
1485
|
+
function M(e) {
|
|
1486
|
+
v.value = { ...e }, _(v.value), lr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
|
|
1270
1487
|
}
|
|
1271
|
-
function
|
|
1272
|
-
|
|
1488
|
+
function P(e) {
|
|
1489
|
+
e.target.closest(".tool-item") || (p.value = null);
|
|
1273
1490
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
}), b(() => {
|
|
1281
|
-
document.removeEventListener("click", H, !0);
|
|
1282
|
-
}), (r, d) => (x(), o(e, null, [s("nav", rr, [
|
|
1283
|
-
s("div", ir, [(x(), o(e, null, w(p, (t) => s("div", {
|
|
1491
|
+
return y(() => {
|
|
1492
|
+
document.addEventListener("click", P, !0), d("settingsChange", { ...v.value }), lr(!!v.value.enableCanvasProfiler);
|
|
1493
|
+
}), x(() => {
|
|
1494
|
+
document.removeEventListener("click", P, !0);
|
|
1495
|
+
}), (r, c) => (S(), o(e, null, [s("nav", Dr, [
|
|
1496
|
+
s("div", Or, [(S(), o(e, null, T(u, (t) => s("div", {
|
|
1284
1497
|
key: t.id,
|
|
1285
1498
|
class: "tool-item"
|
|
1286
1499
|
}, [s("button", {
|
|
1287
1500
|
type: "button",
|
|
1288
|
-
class: g(["left-toolbar__button", { active:
|
|
1501
|
+
class: g(["left-toolbar__button", { active: b(t) }]),
|
|
1289
1502
|
title: t.title,
|
|
1290
1503
|
"aria-label": t.title,
|
|
1291
|
-
onClick: (e) =>
|
|
1292
|
-
onPointerdown:
|
|
1293
|
-
onPointermove:
|
|
1294
|
-
onPointerup:
|
|
1295
|
-
}, [(
|
|
1504
|
+
onClick: (e) => C(t),
|
|
1505
|
+
onPointerdown: c[0] ||= F(() => {}, ["stop"]),
|
|
1506
|
+
onPointermove: c[1] ||= F(() => {}, ["stop"]),
|
|
1507
|
+
onPointerup: c[2] ||= F(() => {}, ["stop"])
|
|
1508
|
+
}, [(S(), i(E(t.icon), {
|
|
1296
1509
|
class: "tool-icon",
|
|
1297
1510
|
"aria-hidden": "true"
|
|
1298
|
-
})), t.children && t.children.length ? (
|
|
1511
|
+
})), t.children && t.children.length ? (S(), o("span", {
|
|
1299
1512
|
key: 0,
|
|
1300
|
-
class: g(["corner-indicator", { open:
|
|
1301
|
-
onClick:
|
|
1513
|
+
class: g(["corner-indicator", { open: p.value === t.id }]),
|
|
1514
|
+
onClick: F((e) => O(t.id), ["stop"]),
|
|
1302
1515
|
"aria-label": "展开子菜单"
|
|
1303
|
-
}, null, 10,
|
|
1304
|
-
default:
|
|
1516
|
+
}, null, 10, Ar)) : a("", !0)], 42, kr), l(n, { name: "dropdown" }, {
|
|
1517
|
+
default: N(() => [p.value === t.id && t.children && t.children.length ? (S(), o("div", {
|
|
1305
1518
|
key: 0,
|
|
1306
1519
|
class: "tool-dropdown",
|
|
1307
|
-
onPointerdown:
|
|
1308
|
-
onPointermove:
|
|
1309
|
-
onPointerup:
|
|
1310
|
-
}, [(
|
|
1520
|
+
onPointerdown: c[3] ||= F(() => {}, ["stop"]),
|
|
1521
|
+
onPointermove: c[4] ||= F(() => {}, ["stop"]),
|
|
1522
|
+
onPointerup: c[5] ||= F(() => {}, ["stop"])
|
|
1523
|
+
}, [(S(!0), o(e, null, T(t.children, (e) => (S(), o("button", {
|
|
1311
1524
|
key: e.id,
|
|
1312
1525
|
type: "button",
|
|
1313
|
-
class: g(["left-toolbar__button", { active:
|
|
1526
|
+
class: g(["left-toolbar__button", { active: f.value === e.id }]),
|
|
1314
1527
|
title: e.title,
|
|
1315
1528
|
"aria-label": e.title,
|
|
1316
|
-
onClick: (t) =>
|
|
1317
|
-
}, [(
|
|
1529
|
+
onClick: (t) => D(e)
|
|
1530
|
+
}, [(S(), i(E(e.icon), {
|
|
1318
1531
|
class: "tool-icon",
|
|
1319
1532
|
"aria-hidden": "true"
|
|
1320
|
-
}))], 10,
|
|
1533
|
+
}))], 10, jr))), 128))], 32)) : a("", !0)]),
|
|
1321
1534
|
_: 2
|
|
1322
1535
|
}, 1024)])), 64))]),
|
|
1323
|
-
|
|
1324
|
-
s("div",
|
|
1536
|
+
c[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1537
|
+
s("div", Mr, [s("button", {
|
|
1325
1538
|
type: "button",
|
|
1326
1539
|
class: "left-toolbar__button",
|
|
1327
1540
|
title: "放大",
|
|
1328
1541
|
"aria-label": "放大",
|
|
1329
|
-
onClick:
|
|
1330
|
-
onPointerdown:
|
|
1331
|
-
onPointermove:
|
|
1332
|
-
onPointerup:
|
|
1333
|
-
}, [l(
|
|
1542
|
+
onClick: c[6] ||= (e) => r.$emit("zoomIn"),
|
|
1543
|
+
onPointerdown: c[7] ||= F(() => {}, ["stop"]),
|
|
1544
|
+
onPointermove: c[8] ||= F(() => {}, ["stop"]),
|
|
1545
|
+
onPointerup: c[9] ||= F(() => {}, ["stop"])
|
|
1546
|
+
}, [l(k(An), {
|
|
1334
1547
|
class: "tool-icon",
|
|
1335
1548
|
"aria-hidden": "true"
|
|
1336
1549
|
})], 32), s("button", {
|
|
@@ -1338,133 +1551,63 @@ var rr = {
|
|
|
1338
1551
|
class: "left-toolbar__button",
|
|
1339
1552
|
title: "缩小",
|
|
1340
1553
|
"aria-label": "缩小",
|
|
1341
|
-
onClick:
|
|
1342
|
-
onPointerdown:
|
|
1343
|
-
onPointermove:
|
|
1344
|
-
onPointerup:
|
|
1345
|
-
}, [l(
|
|
1554
|
+
onClick: c[10] ||= (e) => r.$emit("zoomOut"),
|
|
1555
|
+
onPointerdown: c[11] ||= F(() => {}, ["stop"]),
|
|
1556
|
+
onPointermove: c[12] ||= F(() => {}, ["stop"]),
|
|
1557
|
+
onPointerup: c[13] ||= F(() => {}, ["stop"])
|
|
1558
|
+
}, [l(k(Nn), {
|
|
1346
1559
|
class: "tool-icon",
|
|
1347
1560
|
"aria-hidden": "true"
|
|
1348
1561
|
})], 32)]),
|
|
1349
|
-
|
|
1350
|
-
s("div",
|
|
1562
|
+
c[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1563
|
+
s("div", Nr, [s("button", {
|
|
1351
1564
|
type: "button",
|
|
1352
1565
|
class: "left-toolbar__button",
|
|
1353
|
-
title:
|
|
1354
|
-
"aria-label":
|
|
1355
|
-
onClick:
|
|
1356
|
-
onPointerdown:
|
|
1357
|
-
onPointermove:
|
|
1358
|
-
onPointerup:
|
|
1359
|
-
}, [
|
|
1566
|
+
title: t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
1567
|
+
"aria-label": t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
1568
|
+
onClick: c[14] ||= (e) => r.$emit("toggleFullscreen"),
|
|
1569
|
+
onPointerdown: c[15] ||= F(() => {}, ["stop"]),
|
|
1570
|
+
onPointermove: c[16] ||= F(() => {}, ["stop"]),
|
|
1571
|
+
onPointerup: c[17] ||= F(() => {}, ["stop"])
|
|
1572
|
+
}, [t.isFullscreen ? (S(), i(k(zn), {
|
|
1360
1573
|
key: 0,
|
|
1361
1574
|
class: "tool-icon",
|
|
1362
1575
|
"aria-hidden": "true"
|
|
1363
|
-
})) : (
|
|
1576
|
+
})) : (S(), i(k(In), {
|
|
1364
1577
|
key: 1,
|
|
1365
1578
|
class: "tool-icon",
|
|
1366
1579
|
"aria-hidden": "true"
|
|
1367
|
-
}))], 40,
|
|
1368
|
-
|
|
1369
|
-
s("div",
|
|
1580
|
+
}))], 40, Pr)]),
|
|
1581
|
+
c[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1582
|
+
s("div", Fr, [s("button", {
|
|
1370
1583
|
type: "button",
|
|
1371
1584
|
class: "left-toolbar__button",
|
|
1372
1585
|
title: "设置",
|
|
1373
1586
|
"aria-label": "设置",
|
|
1374
|
-
onClick:
|
|
1375
|
-
onPointerdown:
|
|
1376
|
-
onPointermove:
|
|
1377
|
-
onPointerup:
|
|
1378
|
-
}, [l(
|
|
1587
|
+
onClick: A,
|
|
1588
|
+
onPointerdown: c[18] ||= F(() => {}, ["stop"]),
|
|
1589
|
+
onPointermove: c[19] ||= F(() => {}, ["stop"]),
|
|
1590
|
+
onPointerup: c[20] ||= F(() => {}, ["stop"])
|
|
1591
|
+
}, [l(k(Hn), {
|
|
1379
1592
|
class: "tool-icon",
|
|
1380
1593
|
"aria-hidden": "true"
|
|
1381
1594
|
})], 32)])
|
|
1382
|
-
]),
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
}, [l(n, { name: "modal" }, {
|
|
1388
|
-
default: M(() => [s("div", {
|
|
1389
|
-
class: "settings-modal",
|
|
1390
|
-
onClick: d[21] ||= P(() => {}, ["stop"])
|
|
1391
|
-
}, [
|
|
1392
|
-
s("div", { class: "settings-header" }, [d[26] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "图表设置"), s("span", { class: "settings-subtitle" }, "个性化配置")], -1), s("div", { class: "header-right" }, [s("button", {
|
|
1393
|
-
class: "settings-close",
|
|
1394
|
-
onClick: B
|
|
1395
|
-
}, [...d[25] ||= [s("svg", {
|
|
1396
|
-
viewBox: "0 0 24 24",
|
|
1397
|
-
fill: "none",
|
|
1398
|
-
stroke: "currentColor",
|
|
1399
|
-
"stroke-width": "2"
|
|
1400
|
-
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
1401
|
-
s("div", fr, [S.value.length > 0 ? (x(), o(e, { key: 0 }, [d[27] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (x(!0), o(e, null, w(S.value, (t) => (x(), o("div", {
|
|
1402
|
-
key: t.key,
|
|
1403
|
-
class: "settings-item"
|
|
1404
|
-
}, [s("label", pr, [s("span", null, D(t.label), 1), t.type === "boolean" ? N((x(), o("input", {
|
|
1405
|
-
key: 0,
|
|
1406
|
-
type: "checkbox",
|
|
1407
|
-
class: "settings-checkbox",
|
|
1408
|
-
"onUpdate:modelValue": (e) => L.value[t.key] = e
|
|
1409
|
-
}, null, 8, mr)), [[k, L.value[t.key]]]) : t.type === "select" && t.options ? N((x(), o("select", {
|
|
1410
|
-
key: 1,
|
|
1411
|
-
class: "settings-select",
|
|
1412
|
-
"onUpdate:modelValue": (e) => L.value[t.key] = e
|
|
1413
|
-
}, [(x(!0), o(e, null, w(t.options, (e) => (x(), o("option", {
|
|
1414
|
-
key: e.value,
|
|
1415
|
-
value: e.value
|
|
1416
|
-
}, D(e.label), 9, gr))), 128))], 8, hr)), [[A, L.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0), E.value.length > 0 ? (x(), o(e, { key: 1 }, [d[28] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (x(!0), o(e, null, w(E.value, (t) => (x(), o("div", {
|
|
1417
|
-
key: t.key,
|
|
1418
|
-
class: "settings-item experimental"
|
|
1419
|
-
}, [s("label", _r, [s("span", null, D(t.label), 1), t.type === "boolean" ? N((x(), o("input", {
|
|
1420
|
-
key: 0,
|
|
1421
|
-
type: "checkbox",
|
|
1422
|
-
class: "settings-checkbox",
|
|
1423
|
-
"onUpdate:modelValue": (e) => L.value[t.key] = e
|
|
1424
|
-
}, null, 8, vr)), [[k, L.value[t.key]]]) : t.type === "select" && t.options ? N((x(), o("select", {
|
|
1425
|
-
key: 1,
|
|
1426
|
-
class: "settings-select",
|
|
1427
|
-
"onUpdate:modelValue": (e) => L.value[t.key] = e
|
|
1428
|
-
}, [(x(!0), o(e, null, w(t.options, (e) => (x(), o("option", {
|
|
1429
|
-
key: e.value,
|
|
1430
|
-
value: e.value
|
|
1431
|
-
}, D(e.label), 9, br))), 128))], 8, yr)), [[A, L.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0)]),
|
|
1432
|
-
s("div", { class: "settings-footer" }, [s("button", {
|
|
1433
|
-
class: "settings-btn reset",
|
|
1434
|
-
onClick: ie
|
|
1435
|
-
}, [...d[29] ||= [s("svg", {
|
|
1436
|
-
viewBox: "0 0 24 24",
|
|
1437
|
-
fill: "none",
|
|
1438
|
-
stroke: "currentColor",
|
|
1439
|
-
"stroke-width": "2"
|
|
1440
|
-
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", { class: "footer-right" }, [s("button", {
|
|
1441
|
-
class: "settings-btn cancel",
|
|
1442
|
-
onClick: B
|
|
1443
|
-
}, "取消"), s("button", {
|
|
1444
|
-
class: "settings-btn confirm",
|
|
1445
|
-
onClick: ae
|
|
1446
|
-
}, [...d[30] ||= [s("svg", {
|
|
1447
|
-
viewBox: "0 0 24 24",
|
|
1448
|
-
fill: "none",
|
|
1449
|
-
stroke: "currentColor",
|
|
1450
|
-
"stroke-width": "2.5"
|
|
1451
|
-
}, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])])
|
|
1452
|
-
])]),
|
|
1453
|
-
_: 1
|
|
1454
|
-
})])) : a("", !0)]),
|
|
1455
|
-
_: 1
|
|
1456
|
-
})], 8, ["to"]))], 64));
|
|
1595
|
+
]), l(Er, {
|
|
1596
|
+
show: m.value,
|
|
1597
|
+
onClose: c[21] ||= (e) => m.value = !1,
|
|
1598
|
+
onConfirm: M
|
|
1599
|
+
}, null, 8, ["show"])], 64));
|
|
1457
1600
|
}
|
|
1458
|
-
}), [["__scopeId", "data-v-
|
|
1601
|
+
}), [["__scopeId", "data-v-d0932502"]]), Lr = ["data-theme"], Rr = {
|
|
1459
1602
|
class: "pane-separator-layer",
|
|
1460
1603
|
"aria-hidden": "true"
|
|
1461
|
-
},
|
|
1604
|
+
}, zr = {
|
|
1462
1605
|
class: "canvas-layer",
|
|
1463
1606
|
ref: "canvasLayerRef"
|
|
1464
|
-
},
|
|
1607
|
+
}, Br = {
|
|
1465
1608
|
class: "x-axis-canvas",
|
|
1466
1609
|
ref: "xAxisCanvasRef"
|
|
1467
|
-
},
|
|
1610
|
+
}, Vr = 4, Hr = /* @__PURE__ */ q(/* @__PURE__ */ u({
|
|
1468
1611
|
__name: "KLineChart",
|
|
1469
1612
|
props: {
|
|
1470
1613
|
semanticConfig: {},
|
|
@@ -1482,26 +1625,54 @@ var rr = {
|
|
|
1482
1625
|
default: !1
|
|
1483
1626
|
}
|
|
1484
1627
|
},
|
|
1485
|
-
emits: [
|
|
1628
|
+
emits: [
|
|
1629
|
+
"zoomLevelChange",
|
|
1630
|
+
"toggleFullscreen",
|
|
1631
|
+
"themeChange"
|
|
1632
|
+
],
|
|
1486
1633
|
setup(n, { expose: c, emit: u }) {
|
|
1487
|
-
let d = n, f =
|
|
1488
|
-
|
|
1489
|
-
let
|
|
1490
|
-
|
|
1634
|
+
let d = n, f = u, p = w(null), m = w(null), v = w(null), b = w(null), C = w(null);
|
|
1635
|
+
Te(v);
|
|
1636
|
+
let E = D(null), O = D(null), k = w(0), A = w(0), j = w(1), N = w(d.initialZoomLevel ?? 1), P = w(0), F = w(1), I = w(0), L = w({}), R = w(null), z = w([]), V = N.value;
|
|
1637
|
+
P.value = ue(V, {
|
|
1491
1638
|
minKWidth: d.minKWidth,
|
|
1492
1639
|
maxKWidth: d.maxKWidth,
|
|
1493
1640
|
zoomLevelCount: d.zoomLevels,
|
|
1494
|
-
dpr:
|
|
1495
|
-
}),
|
|
1496
|
-
let
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1641
|
+
dpr: j.value
|
|
1642
|
+
}), F.value = le(P.value, j.value);
|
|
1643
|
+
let U = w("light"), oe = w({}), se = r(() => {
|
|
1644
|
+
let e = oe.value.isAsiaMarket ?? !1, t = te(U.value, e);
|
|
1645
|
+
return {
|
|
1646
|
+
upColor: t.candleUpBody,
|
|
1647
|
+
downColor: t.candleDownBody
|
|
1648
|
+
};
|
|
1649
|
+
}), W = r(() => {
|
|
1650
|
+
let e = U.value === "dark" ? B : ee, t = oe.value.colorPresetSettings?.[U.value];
|
|
1651
|
+
return t && Object.keys(t).length > 0 ? H({
|
|
1652
|
+
...e,
|
|
1653
|
+
colors: {
|
|
1654
|
+
...e.colors,
|
|
1655
|
+
...t
|
|
1656
|
+
}
|
|
1657
|
+
}) : H(e);
|
|
1658
|
+
}), G = null;
|
|
1659
|
+
function K(e) {
|
|
1660
|
+
E.value?.setTheme(e.matches ? "dark" : "light");
|
|
1661
|
+
}
|
|
1662
|
+
function pe(e, t) {
|
|
1663
|
+
if (!(!e || !t)) if (t === "auto") {
|
|
1664
|
+
let t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1665
|
+
e.setTheme(t.matches ? "dark" : "light"), G !== t && (G?.removeEventListener("change", K), G = t, t.addEventListener("change", K));
|
|
1666
|
+
} else G?.removeEventListener("change", K), G = null, e.setTheme(t);
|
|
1667
|
+
}
|
|
1668
|
+
function me() {}
|
|
1669
|
+
function he(e) {
|
|
1670
|
+
if (oe.value = e, pe(E.value, e.theme), E.value?.updateSettingsFacade(e), e.performanceTest10kKlines) {
|
|
1671
|
+
let e = ge();
|
|
1672
|
+
console.time("updateData-10k"), E.value?.updateData(e), console.timeEnd("updateData-10k"), k.value = e.length, A.value++;
|
|
1673
|
+
} else O.value && E.value?.getData()?.length === 1e4 && O.value.applyConfig(d.semanticConfig);
|
|
1674
|
+
}
|
|
1675
|
+
function ge() {
|
|
1505
1676
|
let e = [], t = (/* @__PURE__ */ new Date("2020-01-01")).getTime(), n = 3e3;
|
|
1506
1677
|
for (let r = 0; r < 1e4; r++) {
|
|
1507
1678
|
let i = t + r * 864e5, a = (Math.random() - .5) * 2 * .02 + 1e-4, o = n, s = o * (1 + a), c = Math.max(o, s) * (1 + Math.random() * .01), l = Math.min(o, s) * (1 - Math.random() * .01), u = Math.floor(1e6 + Math.random() * 5e6);
|
|
@@ -1516,36 +1687,36 @@ var rr = {
|
|
|
1516
1687
|
}
|
|
1517
1688
|
return e;
|
|
1518
1689
|
}
|
|
1519
|
-
function
|
|
1690
|
+
function _e(e, t, n) {
|
|
1520
1691
|
let r = e.getBoundingClientRect();
|
|
1521
1692
|
return {
|
|
1522
1693
|
width: Math.max(t, Math.round(r.width)),
|
|
1523
1694
|
height: Math.max(n, Math.round(r.height))
|
|
1524
1695
|
};
|
|
1525
1696
|
}
|
|
1526
|
-
function
|
|
1697
|
+
function ve(e) {
|
|
1527
1698
|
e && h(() => {
|
|
1528
1699
|
if (!e.isConnected) return;
|
|
1529
|
-
let t =
|
|
1530
|
-
|
|
1700
|
+
let t = _e(e, 180, 80);
|
|
1701
|
+
E.value?.setTooltipSize(t);
|
|
1531
1702
|
});
|
|
1532
1703
|
}
|
|
1533
|
-
function
|
|
1704
|
+
function ye(e) {
|
|
1534
1705
|
e && h(() => {
|
|
1535
|
-
e.isConnected && (
|
|
1706
|
+
e.isConnected && (Oe.value = _e(e, 120, 60));
|
|
1536
1707
|
});
|
|
1537
1708
|
}
|
|
1538
|
-
let
|
|
1709
|
+
let q = w({
|
|
1539
1710
|
x: 0,
|
|
1540
1711
|
y: 0
|
|
1541
|
-
}),
|
|
1542
|
-
function
|
|
1543
|
-
|
|
1712
|
+
}), be = w(!1), xe = null;
|
|
1713
|
+
function Se() {
|
|
1714
|
+
xe = null;
|
|
1544
1715
|
}
|
|
1545
|
-
function
|
|
1546
|
-
return
|
|
1716
|
+
function Ce(e) {
|
|
1717
|
+
return xe ||= e.getBoundingClientRect(), xe;
|
|
1547
1718
|
}
|
|
1548
|
-
let J =
|
|
1719
|
+
let J = D({
|
|
1549
1720
|
crosshairPos: null,
|
|
1550
1721
|
crosshairIndex: null,
|
|
1551
1722
|
crosshairPrice: null,
|
|
@@ -1563,14 +1734,14 @@ var rr = {
|
|
|
1563
1734
|
isHoveringPaneBoundary: !1,
|
|
1564
1735
|
hoveredPaneBoundaryId: null,
|
|
1565
1736
|
isHoveringRightAxis: !1
|
|
1566
|
-
}), Y =
|
|
1567
|
-
let e =
|
|
1568
|
-
return e ?
|
|
1569
|
-
}),
|
|
1737
|
+
}), Y = D(null), Ee = r(() => {
|
|
1738
|
+
let e = R.value;
|
|
1739
|
+
return e ? z.value.find((t) => t.id === e) ?? null : null;
|
|
1740
|
+
}), De = w([]), Oe = w({
|
|
1570
1741
|
width: 220,
|
|
1571
1742
|
height: 120
|
|
1572
|
-
}),
|
|
1573
|
-
let e =
|
|
1743
|
+
}), ke = r(() => {
|
|
1744
|
+
let e = p.value, t = m.value;
|
|
1574
1745
|
return !e || !t ? {
|
|
1575
1746
|
x: 0,
|
|
1576
1747
|
y: 0
|
|
@@ -1578,83 +1749,83 @@ var rr = {
|
|
|
1578
1749
|
x: e.offsetLeft,
|
|
1579
1750
|
y: e.offsetTop
|
|
1580
1751
|
};
|
|
1581
|
-
}),
|
|
1752
|
+
}), Ae = r(() => J.value.hoveredMarkerData), je = r(() => J.value.hoveredCustomMarker), Me = r(() => J.value.isDragging), Ne = r(() => J.value.isResizingPaneBoundary), Pe = r(() => J.value.isHoveringPaneBoundary), Fe = r(() => J.value.hoveredPaneBoundaryId), Ie = r(() => J.value.isHoveringRightAxis), Le = r(() => J.value.hoveredIndex);
|
|
1582
1753
|
r(() => J.value.crosshairIndex);
|
|
1583
|
-
let
|
|
1754
|
+
let Re = r(() => Me.value ? "grabbing" : Ne.value || Pe.value ? "ns-resize" : Le.value === null ? "crosshair" : "pointer"), ze = r(() => {
|
|
1584
1755
|
let e = J.value.hoveredIndex;
|
|
1585
1756
|
if (typeof e != "number") return null;
|
|
1586
|
-
|
|
1587
|
-
let t =
|
|
1757
|
+
A.value;
|
|
1758
|
+
let t = E.value?.getData();
|
|
1588
1759
|
return t && e >= 0 && e < t.length ? t[e] : null;
|
|
1589
|
-
}),
|
|
1590
|
-
x:
|
|
1591
|
-
y:
|
|
1592
|
-
})),
|
|
1593
|
-
left: `${
|
|
1594
|
-
top: `${
|
|
1595
|
-
})),
|
|
1596
|
-
x:
|
|
1597
|
-
y:
|
|
1598
|
-
})),
|
|
1599
|
-
left: `${
|
|
1600
|
-
top: `${
|
|
1601
|
-
})),
|
|
1602
|
-
let e =
|
|
1603
|
-
return
|
|
1604
|
-
}),
|
|
1605
|
-
function
|
|
1760
|
+
}), Be = r(() => J.value.hoveredIndex), Ve = r(() => J.value.tooltipPos), He = r(() => ({
|
|
1761
|
+
x: Ve.value.x + ke.value.x,
|
|
1762
|
+
y: Ve.value.y + ke.value.y
|
|
1763
|
+
})), Ue = r(() => ({
|
|
1764
|
+
left: `${He.value.x}px`,
|
|
1765
|
+
top: `${He.value.y}px`
|
|
1766
|
+
})), We = r(() => ({
|
|
1767
|
+
x: q.value.x + ke.value.x,
|
|
1768
|
+
y: q.value.y + ke.value.y
|
|
1769
|
+
})), Ge = r(() => ({
|
|
1770
|
+
left: `${We.value.x}px`,
|
|
1771
|
+
top: `${We.value.y}px`
|
|
1772
|
+
})), Ke = r(() => J.value.tooltipAnchorPlacement), qe = r(() => {
|
|
1773
|
+
let e = E.value?.viewport.peek(), t = p.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
|
|
1774
|
+
return q.value.x + 12 + Oe.value.width + 12 > n ? "left-bottom" : "right-bottom";
|
|
1775
|
+
}), Je = r(() => (A.value, E.value?.getData() ?? []));
|
|
1776
|
+
function Ye(e) {
|
|
1606
1777
|
Y.value?.setTool(e);
|
|
1607
1778
|
}
|
|
1608
|
-
function
|
|
1609
|
-
let t =
|
|
1779
|
+
function Xe(e) {
|
|
1780
|
+
let t = Ee.value;
|
|
1610
1781
|
!t || !Y.value || Y.value.updateDrawingStyle(t.id, e);
|
|
1611
1782
|
}
|
|
1612
|
-
function
|
|
1613
|
-
let e =
|
|
1614
|
-
!e || !Y.value || (Y.value.removeDrawing(e.id),
|
|
1783
|
+
function Ze() {
|
|
1784
|
+
let e = Ee.value;
|
|
1785
|
+
!e || !Y.value || (Y.value.removeDrawing(e.id), R.value = null, z.value = Y.value.getDrawings());
|
|
1615
1786
|
}
|
|
1616
|
-
function
|
|
1617
|
-
|
|
1787
|
+
function Qe(e) {
|
|
1788
|
+
E.value?.handlePointerEvent(e, { onPointerDown: (e, t) => Y.value?.onPointerDown(e, t) ? (z.value = Y.value.getDrawings(), !0) : !1 });
|
|
1618
1789
|
}
|
|
1619
|
-
function
|
|
1620
|
-
let t =
|
|
1790
|
+
function $e(e) {
|
|
1791
|
+
let t = p.value;
|
|
1621
1792
|
if (t) {
|
|
1622
|
-
let n =
|
|
1623
|
-
|
|
1793
|
+
let n = Ce(t);
|
|
1794
|
+
q.value = {
|
|
1624
1795
|
x: e.clientX - n.left,
|
|
1625
1796
|
y: e.clientY - n.top
|
|
1626
1797
|
};
|
|
1627
1798
|
}
|
|
1628
|
-
|
|
1799
|
+
E.value?.handlePointerEvent(e, { onPointerMove: (e, t) => Y.value?.onPointerMove(e, t) ? (z.value = Y.value.getDrawings(), !0) : !1 });
|
|
1629
1800
|
}
|
|
1630
|
-
function
|
|
1631
|
-
|
|
1801
|
+
function et(e) {
|
|
1802
|
+
E.value?.handlePointerEvent(e, { onPointerUp: (e, t) => Y.value?.onPointerUp(e, t) ? (z.value = Y.value.getDrawings(), !0) : !1 });
|
|
1632
1803
|
}
|
|
1633
|
-
function
|
|
1634
|
-
|
|
1804
|
+
function tt(e) {
|
|
1805
|
+
E.value?.handlePointerEvent(e);
|
|
1635
1806
|
}
|
|
1636
|
-
function
|
|
1637
|
-
|
|
1807
|
+
function nt(e) {
|
|
1808
|
+
E.value?.handlePointerEvent(e);
|
|
1638
1809
|
}
|
|
1639
|
-
function
|
|
1640
|
-
|
|
1810
|
+
function rt(e) {
|
|
1811
|
+
E.value?.handlePointerEvent(e);
|
|
1641
1812
|
}
|
|
1642
|
-
function
|
|
1643
|
-
|
|
1813
|
+
function it(e) {
|
|
1814
|
+
E.value?.handlePointerEvent(e);
|
|
1644
1815
|
}
|
|
1645
|
-
function
|
|
1646
|
-
|
|
1816
|
+
function at(e) {
|
|
1817
|
+
E.value?.handlePointerEvent(e);
|
|
1647
1818
|
}
|
|
1648
|
-
function
|
|
1649
|
-
|
|
1819
|
+
function ot() {
|
|
1820
|
+
E.value?.handleScrollEvent();
|
|
1650
1821
|
}
|
|
1651
|
-
let
|
|
1822
|
+
let st = w([]), ct = r(() => {
|
|
1652
1823
|
let e = [], t = /* @__PURE__ */ new Set();
|
|
1653
1824
|
for (let n of Z.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
|
|
1654
1825
|
return e;
|
|
1655
|
-
}),
|
|
1656
|
-
function
|
|
1657
|
-
let e =
|
|
1826
|
+
}), lt = r(() => [...st.value, ...ct.value]), X = w({}), Z = w([]);
|
|
1827
|
+
function ut() {
|
|
1828
|
+
let e = L.value.main ?? 3;
|
|
1658
1829
|
return Z.value.length === 0 ? [{
|
|
1659
1830
|
id: "main",
|
|
1660
1831
|
ratio: e,
|
|
@@ -1667,49 +1838,49 @@ var rr = {
|
|
|
1667
1838
|
role: "price"
|
|
1668
1839
|
}, ...Z.value.map((e) => ({
|
|
1669
1840
|
id: e.id,
|
|
1670
|
-
ratio:
|
|
1841
|
+
ratio: L.value[e.id] ?? 1,
|
|
1671
1842
|
visible: !0,
|
|
1672
1843
|
role: "indicator"
|
|
1673
1844
|
}))];
|
|
1674
1845
|
}
|
|
1675
|
-
function
|
|
1676
|
-
return { ...
|
|
1846
|
+
function dt(e) {
|
|
1847
|
+
return { ...ie[e].defaultParams };
|
|
1677
1848
|
}
|
|
1678
|
-
let
|
|
1679
|
-
function
|
|
1680
|
-
if (Z.value.length >=
|
|
1681
|
-
let n = t ??
|
|
1682
|
-
return !!
|
|
1849
|
+
let ft = /* @__PURE__ */ new Map();
|
|
1850
|
+
function pt(e = "VOLUME", t) {
|
|
1851
|
+
if (Z.value.length >= Vr) return !1;
|
|
1852
|
+
let n = t ?? dt(e);
|
|
1853
|
+
return !!E.value?.addIndicator(e, "sub", n);
|
|
1683
1854
|
}
|
|
1684
|
-
function
|
|
1685
|
-
|
|
1855
|
+
function mt(e) {
|
|
1856
|
+
E.value?.removeIndicator(e);
|
|
1686
1857
|
}
|
|
1687
|
-
function
|
|
1688
|
-
for (let e of Z.value)
|
|
1689
|
-
|
|
1858
|
+
function ht() {
|
|
1859
|
+
for (let e of Z.value) E.value?.removeIndicator(e.id);
|
|
1860
|
+
ft.clear();
|
|
1690
1861
|
}
|
|
1691
|
-
function
|
|
1692
|
-
let e = d.semanticConfig, t =
|
|
1862
|
+
function gt() {
|
|
1863
|
+
let e = d.semanticConfig, t = E.value;
|
|
1693
1864
|
if (!t) return;
|
|
1694
1865
|
let n = e.indicators?.main;
|
|
1695
1866
|
if (n) for (let e of n) e.enabled && t.addIndicator(e.type, "main", e.params);
|
|
1696
1867
|
}
|
|
1697
|
-
function
|
|
1698
|
-
let e =
|
|
1868
|
+
function _t() {
|
|
1869
|
+
let e = E.value?.subPanes.peek() ?? [];
|
|
1699
1870
|
for (let t of e) {
|
|
1700
1871
|
let { paneId: e, indicatorId: n, params: r } = t, i = e.match(/^(.+)_(\d+)$/);
|
|
1701
1872
|
if (i) {
|
|
1702
1873
|
let [, e, t] = i, n = parseInt(t, 10);
|
|
1703
|
-
n >= (
|
|
1874
|
+
n >= (ft.get(e) ?? 0) && ft.set(e, n + 1);
|
|
1704
1875
|
}
|
|
1705
1876
|
}
|
|
1706
1877
|
}
|
|
1707
|
-
function
|
|
1708
|
-
let n =
|
|
1709
|
-
|
|
1878
|
+
function vt(e, t) {
|
|
1879
|
+
let n = dt(t);
|
|
1880
|
+
E.value?.replaceSubPaneIndicator(e, t, n);
|
|
1710
1881
|
}
|
|
1711
|
-
function
|
|
1712
|
-
let n =
|
|
1882
|
+
function yt(e, t) {
|
|
1883
|
+
let n = E.value;
|
|
1713
1884
|
if (n) {
|
|
1714
1885
|
if ([
|
|
1715
1886
|
"MA",
|
|
@@ -1731,33 +1902,33 @@ var rr = {
|
|
|
1731
1902
|
"STRUCTURE",
|
|
1732
1903
|
"ZONES"
|
|
1733
1904
|
].includes(e)) {
|
|
1734
|
-
let r =
|
|
1905
|
+
let r = st.value.find((t) => t === e);
|
|
1735
1906
|
t && !r ? n.addIndicator(e, "main", X.value[e]) : !t && r && n.removeIndicator(e.toUpperCase());
|
|
1736
1907
|
return;
|
|
1737
1908
|
}
|
|
1738
|
-
if (
|
|
1739
|
-
if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >=
|
|
1909
|
+
if (re.includes(e)) if (t) {
|
|
1910
|
+
if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >= Vr) return;
|
|
1740
1911
|
if (!n.addIndicator(e, "sub", X.value[e]) && Z.value.length > 0) {
|
|
1741
1912
|
let t = Z.value[Z.value.length - 1];
|
|
1742
|
-
|
|
1913
|
+
vt(t.id, e);
|
|
1743
1914
|
}
|
|
1744
1915
|
} else Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
1745
1916
|
n.removeIndicator(e.id);
|
|
1746
1917
|
});
|
|
1747
1918
|
}
|
|
1748
1919
|
}
|
|
1749
|
-
function
|
|
1920
|
+
function bt(e, t) {
|
|
1750
1921
|
if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
1751
|
-
|
|
1922
|
+
E.value?.updateIndicatorParams(e, t);
|
|
1752
1923
|
return;
|
|
1753
1924
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1925
|
+
re.includes(e) && Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
1926
|
+
E.value?.updateIndicatorParams(e.id, t);
|
|
1756
1927
|
});
|
|
1757
1928
|
}
|
|
1758
|
-
function
|
|
1929
|
+
function xt(e) {
|
|
1759
1930
|
if (!e.length || Z.value.length <= 1) return;
|
|
1760
|
-
let t = e.filter((e) =>
|
|
1931
|
+
let t = e.filter((e) => re.includes(e));
|
|
1761
1932
|
if (!t.length) return;
|
|
1762
1933
|
let n = new Map(Z.value.map((e) => [e.indicatorId, e])), r = [];
|
|
1763
1934
|
for (let e of t) {
|
|
@@ -1769,41 +1940,41 @@ var rr = {
|
|
|
1769
1940
|
let i = Z.value.map((e) => e.id), a = r.map((e) => e.id);
|
|
1770
1941
|
if (i.join("|") === a.join("|")) return;
|
|
1771
1942
|
Z.value = r;
|
|
1772
|
-
let o =
|
|
1773
|
-
o && o.updatePaneLayout(
|
|
1943
|
+
let o = E.value;
|
|
1944
|
+
o && o.updatePaneLayout(ut());
|
|
1774
1945
|
}
|
|
1775
|
-
let
|
|
1776
|
-
function
|
|
1777
|
-
let e =
|
|
1946
|
+
let St = r(() => d.rightAxisWidth + d.priceLabelWidth), Ct = r(() => (A.value, I.value, P.value, F.value, j.value, E.value?.getContentWidth() ?? 0));
|
|
1947
|
+
function wt() {
|
|
1948
|
+
let e = p.value, t = E.value;
|
|
1778
1949
|
if (!e || !t) return;
|
|
1779
1950
|
let n = t.getData()?.length ?? 0;
|
|
1780
1951
|
if (n === 0) return;
|
|
1781
|
-
let r = t.viewport.peek().dpr, { unitPx: i, startXPx: a } =
|
|
1952
|
+
let r = t.viewport.peek().dpr, { unitPx: i, startXPx: a } = ce(P.value, F.value, r), o = (a + n * i) / r, s = Math.max(0, e.scrollWidth - e.clientWidth), c = Math.min(s, Math.max(0, o - e.clientWidth));
|
|
1782
1953
|
e.scrollLeft = Math.round(c * r) / r;
|
|
1783
1954
|
}
|
|
1784
|
-
function
|
|
1785
|
-
|
|
1955
|
+
function Tt(e, t) {
|
|
1956
|
+
E.value?.zoomToLevel(e, t);
|
|
1786
1957
|
}
|
|
1787
1958
|
c({
|
|
1788
|
-
scheduleRender:
|
|
1789
|
-
scrollToRight:
|
|
1790
|
-
addSubPane:
|
|
1791
|
-
removeSubPane:
|
|
1792
|
-
switchSubIndicator:
|
|
1793
|
-
clearAllSubPanes:
|
|
1794
|
-
zoomToLevel:
|
|
1795
|
-
zoomIn: (e) =>
|
|
1796
|
-
zoomOut: (e) =>
|
|
1797
|
-
getZoomLevel: () =>
|
|
1798
|
-
getZoomLevelCount: () =>
|
|
1959
|
+
scheduleRender: me,
|
|
1960
|
+
scrollToRight: wt,
|
|
1961
|
+
addSubPane: pt,
|
|
1962
|
+
removeSubPane: mt,
|
|
1963
|
+
switchSubIndicator: vt,
|
|
1964
|
+
clearAllSubPanes: ht,
|
|
1965
|
+
zoomToLevel: Tt,
|
|
1966
|
+
zoomIn: (e) => Tt(N.value + 1, e),
|
|
1967
|
+
zoomOut: (e) => Tt(N.value - 1, e),
|
|
1968
|
+
getZoomLevel: () => N.value,
|
|
1969
|
+
getZoomLevelCount: () => E.value?.getZoomLevelCount() ?? 10
|
|
1799
1970
|
});
|
|
1800
|
-
function
|
|
1971
|
+
function Et() {
|
|
1801
1972
|
return (e) => {
|
|
1802
|
-
e.preventDefault(),
|
|
1973
|
+
e.preventDefault(), E.value?.handleWheelEvent(e);
|
|
1803
1974
|
};
|
|
1804
1975
|
}
|
|
1805
|
-
function
|
|
1806
|
-
return
|
|
1976
|
+
function Dt(e, t, n, r) {
|
|
1977
|
+
return ae({
|
|
1807
1978
|
container: e,
|
|
1808
1979
|
data: [],
|
|
1809
1980
|
canvasLayer: t,
|
|
@@ -1819,11 +1990,11 @@ var rr = {
|
|
|
1819
1990
|
maxKWidth: d.maxKWidth
|
|
1820
1991
|
});
|
|
1821
1992
|
}
|
|
1822
|
-
function
|
|
1993
|
+
function Ot(e) {
|
|
1823
1994
|
let t = e.paneLayout.subscribe(() => {
|
|
1824
|
-
|
|
1825
|
-
let t =
|
|
1826
|
-
|
|
1995
|
+
Se();
|
|
1996
|
+
let t = p.value && parseInt(getComputedStyle(p.value).borderTopWidth) || 0;
|
|
1997
|
+
De.value = e.paneLayout.peek().slice(0, -1).map((n) => {
|
|
1827
1998
|
let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
|
|
1828
1999
|
return {
|
|
1829
2000
|
id: n.id,
|
|
@@ -1831,24 +2002,25 @@ var rr = {
|
|
|
1831
2002
|
};
|
|
1832
2003
|
});
|
|
1833
2004
|
}), n = e.paneRatios.subscribe(() => {
|
|
1834
|
-
|
|
2005
|
+
L.value = { ...e.paneRatios.peek() };
|
|
1835
2006
|
}), r = e.viewport.subscribe(() => {
|
|
1836
2007
|
let t = e.viewport.peek();
|
|
1837
|
-
|
|
2008
|
+
j.value !== t.dpr && (j.value = t.dpr), I.value !== t.plotWidth && (I.value = t.plotWidth), (N.value !== t.zoomLevel || P.value !== t.kWidth || F.value !== t.kGap) && (N.value = t.zoomLevel, P.value = t.kWidth, F.value = t.kGap);
|
|
1838
2009
|
let n = t.desiredScrollLeft;
|
|
1839
|
-
n !== void 0 && n !==
|
|
1840
|
-
let e =
|
|
2010
|
+
n !== void 0 && n !== p.value?.scrollLeft && (Se(), h(() => {
|
|
2011
|
+
let e = p.value;
|
|
1841
2012
|
if (!e) return;
|
|
1842
2013
|
let r = Math.max(0, e.scrollWidth - e.clientWidth), i = Math.min(Math.max(0, n), r), a = t.dpr;
|
|
1843
2014
|
e.scrollLeft = Math.round(i * a) / a;
|
|
1844
2015
|
}));
|
|
1845
2016
|
}), i = e.data.subscribe(() => {
|
|
1846
|
-
|
|
2017
|
+
k.value = e.data.peek().length, A.value++;
|
|
1847
2018
|
}), a = e.theme.subscribe(() => {
|
|
1848
|
-
|
|
2019
|
+
let t = e.theme.peek();
|
|
2020
|
+
U.value = t, f("themeChange", t);
|
|
1849
2021
|
}), o = e.indicators.subscribe(() => {
|
|
1850
2022
|
let t = e.indicators.peek(), n = t.filter((e) => e.role === "main").map((e) => e.definitionId);
|
|
1851
|
-
|
|
2023
|
+
st.value = n;
|
|
1852
2024
|
let r = { ...X.value };
|
|
1853
2025
|
for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (r[e.definitionId] = { ...e.params });
|
|
1854
2026
|
e.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
@@ -1881,152 +2053,157 @@ var rr = {
|
|
|
1881
2053
|
for (let e of t) e.params && Object.keys(e.params).length > 0 && (a[e.indicatorId] = { ...e.params });
|
|
1882
2054
|
X.value = a;
|
|
1883
2055
|
});
|
|
1884
|
-
|
|
1885
|
-
r(), i(), n(), t(), a(), o(), s();
|
|
2056
|
+
x(() => {
|
|
2057
|
+
r(), i(), n(), t(), a(), o(), s(), G?.removeEventListener("change", K);
|
|
1886
2058
|
});
|
|
1887
2059
|
}
|
|
1888
|
-
function
|
|
1889
|
-
let t =
|
|
1890
|
-
if (e.updateSettingsFacade(t), t.performanceTest10kKlines) {
|
|
1891
|
-
let t =
|
|
2060
|
+
function kt(e) {
|
|
2061
|
+
let t = C.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
|
|
2062
|
+
if (oe.value = t, pe(e, t.theme), e.updateSettingsFacade(t), t.performanceTest10kKlines) {
|
|
2063
|
+
let t = ge();
|
|
1892
2064
|
console.time("updateData-10k"), e.updateData(t), console.timeEnd("updateData-10k");
|
|
1893
2065
|
}
|
|
1894
2066
|
}
|
|
1895
|
-
function
|
|
1896
|
-
Y.value = new
|
|
2067
|
+
function At(e) {
|
|
2068
|
+
Y.value = new ne(e), Y.value.setCallbacks({
|
|
1897
2069
|
onDrawingCreated: (e) => {
|
|
1898
|
-
|
|
2070
|
+
z.value = [...z.value, e], R.value = e.id;
|
|
1899
2071
|
},
|
|
1900
2072
|
onToolChange: () => {},
|
|
1901
2073
|
onDrawingSelected: (e) => {
|
|
1902
|
-
|
|
2074
|
+
R.value = e?.id ?? null;
|
|
1903
2075
|
}
|
|
1904
2076
|
});
|
|
1905
2077
|
}
|
|
1906
|
-
function
|
|
1907
|
-
e.setTooltipAnchorPositioning(
|
|
2078
|
+
function jt(e) {
|
|
2079
|
+
e.setTooltipAnchorPositioning(be.value), e.interactionState.subscribe(() => {
|
|
1908
2080
|
J.value = e.interactionState.peek();
|
|
1909
|
-
}), J.value = e.interactionState.peek(),
|
|
2081
|
+
}), J.value = e.interactionState.peek(), j.value = e.viewport.peek().dpr;
|
|
1910
2082
|
}
|
|
1911
|
-
function
|
|
1912
|
-
|
|
2083
|
+
function Mt(e) {
|
|
2084
|
+
fe(d.dataFetcher), O.value = new de(e), O.value.on("config:error", (e) => {
|
|
1913
2085
|
console.error("Semantic config error:", e);
|
|
1914
|
-
}),
|
|
1915
|
-
|
|
1916
|
-
}),
|
|
2086
|
+
}), O.value.on("config:ready", () => {
|
|
2087
|
+
gt(), _t(), h(() => wt());
|
|
2088
|
+
}), O.value.applyConfig(d.semanticConfig).then((e) => {
|
|
1917
2089
|
e && !e.success && console.error("Semantic config apply failed:", e.errors);
|
|
1918
2090
|
});
|
|
1919
2091
|
}
|
|
1920
|
-
return
|
|
1921
|
-
|
|
1922
|
-
let e =
|
|
2092
|
+
return y(() => {
|
|
2093
|
+
be.value = !1;
|
|
2094
|
+
let e = p.value, t = m.value;
|
|
1923
2095
|
if (!e || !t) return;
|
|
1924
|
-
let n =
|
|
2096
|
+
let n = Et();
|
|
1925
2097
|
e.addEventListener("wheel", n, { passive: !1 });
|
|
1926
|
-
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a =
|
|
1927
|
-
|
|
1928
|
-
}),
|
|
1929
|
-
let e =
|
|
1930
|
-
e && (
|
|
1931
|
-
}),
|
|
1932
|
-
|
|
1933
|
-
}),
|
|
2098
|
+
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = Dt(e, r, t.querySelector(".right-axis-host"), i);
|
|
2099
|
+
E.value = a, Ot(a), kt(a), At(a), jt(a), Mt(a);
|
|
2100
|
+
}), x(() => {
|
|
2101
|
+
let e = E.value;
|
|
2102
|
+
e && (E.value = null, e.dispose()), Y.value = null;
|
|
2103
|
+
}), M(() => d.yPaddingPx, (e) => {
|
|
2104
|
+
E.value?.updateOptionsFacade({ yPaddingPx: e });
|
|
2105
|
+
}), M(() => d.semanticConfig, async (e, t) => {
|
|
1934
2106
|
if (e && e !== t) {
|
|
1935
|
-
let t = await
|
|
2107
|
+
let t = await O.value?.applyConfig(e);
|
|
1936
2108
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
1937
2109
|
}
|
|
1938
|
-
}, { deep: !0 }), (r, c) => (
|
|
2110
|
+
}, { deep: !0 }), (r, c) => (S(), o("div", {
|
|
1939
2111
|
ref_key: "chartWrapperRef",
|
|
1940
|
-
ref:
|
|
2112
|
+
ref: v,
|
|
1941
2113
|
class: "chart-wrapper",
|
|
1942
|
-
"data-theme":
|
|
2114
|
+
"data-theme": U.value,
|
|
2115
|
+
style: _(W.value)
|
|
1943
2116
|
}, [s("div", { class: g(["chart-stage", {
|
|
1944
|
-
"is-dragging":
|
|
1945
|
-
"is-resizing-pane":
|
|
1946
|
-
"is-hovering-pane-separator":
|
|
1947
|
-
"is-hovering-right-axis":
|
|
1948
|
-
"is-hovering-kline":
|
|
1949
|
-
}]) }, [l(
|
|
2117
|
+
"is-dragging": Me.value,
|
|
2118
|
+
"is-resizing-pane": Ne.value,
|
|
2119
|
+
"is-hovering-pane-separator": Pe.value,
|
|
2120
|
+
"is-hovering-right-axis": Ie.value,
|
|
2121
|
+
"is-hovering-kline": Le.value !== null
|
|
2122
|
+
}]) }, [l(Ir, {
|
|
1950
2123
|
ref_key: "toolbarRef",
|
|
1951
|
-
ref:
|
|
2124
|
+
ref: C,
|
|
1952
2125
|
"is-fullscreen": n.isFullscreen,
|
|
1953
|
-
onSelectTool:
|
|
2126
|
+
onSelectTool: Ye,
|
|
1954
2127
|
onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
|
|
1955
|
-
onZoomIn: c[1] ||= (e) =>
|
|
1956
|
-
onZoomOut: c[2] ||= (e) =>
|
|
1957
|
-
onSettingsChange:
|
|
2128
|
+
onZoomIn: c[1] ||= (e) => Tt(N.value + 1),
|
|
2129
|
+
onZoomOut: c[2] ||= (e) => Tt(N.value - 1),
|
|
2130
|
+
onSettingsChange: he
|
|
1958
2131
|
}, null, 8, ["is-fullscreen"]), s("div", {
|
|
1959
2132
|
class: "chart-main",
|
|
1960
2133
|
ref_key: "chartMainRef",
|
|
1961
|
-
ref:
|
|
2134
|
+
ref: m
|
|
1962
2135
|
}, [
|
|
1963
|
-
s("div",
|
|
2136
|
+
s("div", Rr, [(S(!0), o(e, null, T(De.value, (e) => (S(), o("div", {
|
|
1964
2137
|
key: e.id,
|
|
1965
|
-
class: g(["pane-separator-line", { "is-active":
|
|
2138
|
+
class: g(["pane-separator-line", { "is-active": Fe.value === e.id }]),
|
|
1966
2139
|
style: _({ top: `${e.top}px` })
|
|
1967
2140
|
}, null, 6))), 128))]),
|
|
1968
2141
|
s("div", {
|
|
1969
2142
|
ref_key: "tooltipLayerRef",
|
|
1970
|
-
ref:
|
|
2143
|
+
ref: b,
|
|
1971
2144
|
class: "tooltip-layer"
|
|
1972
2145
|
}, null, 512),
|
|
1973
2146
|
s("div", {
|
|
1974
2147
|
class: "chart-container",
|
|
1975
|
-
style: _({ cursor:
|
|
2148
|
+
style: _({ cursor: Re.value }),
|
|
1976
2149
|
ref_key: "containerRef",
|
|
1977
|
-
ref:
|
|
1978
|
-
onScrollPassive:
|
|
1979
|
-
onPointerdown:
|
|
1980
|
-
onPointermove:
|
|
1981
|
-
onPointerup:
|
|
1982
|
-
onPointerleave:
|
|
2150
|
+
ref: p,
|
|
2151
|
+
onScrollPassive: ot,
|
|
2152
|
+
onPointerdown: Qe,
|
|
2153
|
+
onPointermove: $e,
|
|
2154
|
+
onPointerup: et,
|
|
2155
|
+
onPointerleave: tt
|
|
1983
2156
|
}, [s("div", {
|
|
1984
2157
|
class: "scroll-content",
|
|
1985
|
-
style: _({ width:
|
|
1986
|
-
}, [s("div",
|
|
2158
|
+
style: _({ width: Ct.value + "px" })
|
|
2159
|
+
}, [s("div", zr, [s("canvas", Br, null, 512), Ee.value ? (S(), i(we, {
|
|
1987
2160
|
key: 0,
|
|
1988
|
-
drawing:
|
|
1989
|
-
onUpdateStyle:
|
|
1990
|
-
onDelete:
|
|
2161
|
+
drawing: Ee.value,
|
|
2162
|
+
onUpdateStyle: Xe,
|
|
2163
|
+
onDelete: Ze
|
|
1991
2164
|
}, null, 8, ["drawing"])) : a("", !0)], 512)], 4)], 36),
|
|
1992
|
-
|
|
2165
|
+
b.value ? (S(), i(t, {
|
|
1993
2166
|
key: 0,
|
|
1994
|
-
to:
|
|
2167
|
+
to: b.value
|
|
1995
2168
|
}, [
|
|
1996
|
-
|
|
2169
|
+
ze.value ? (S(), o("div", {
|
|
1997
2170
|
key: 0,
|
|
1998
|
-
class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor":
|
|
1999
|
-
style: _(
|
|
2171
|
+
class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": be.value }]),
|
|
2172
|
+
style: _(Ue.value)
|
|
2000
2173
|
}, null, 6)) : a("", !0),
|
|
2001
|
-
|
|
2174
|
+
Ae.value || je.value ? (S(), o("div", {
|
|
2002
2175
|
key: 1,
|
|
2003
|
-
class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor":
|
|
2004
|
-
style: _(
|
|
2176
|
+
class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": be.value }]),
|
|
2177
|
+
style: _(Ge.value)
|
|
2005
2178
|
}, null, 6)) : a("", !0),
|
|
2006
|
-
|
|
2179
|
+
ze.value ? (S(), i($t, {
|
|
2007
2180
|
key: 2,
|
|
2008
|
-
k:
|
|
2009
|
-
index:
|
|
2010
|
-
data:
|
|
2011
|
-
pos:
|
|
2012
|
-
"set-el":
|
|
2013
|
-
"use-anchor":
|
|
2014
|
-
"anchor-placement":
|
|
2181
|
+
k: ze.value,
|
|
2182
|
+
index: Be.value,
|
|
2183
|
+
data: Je.value,
|
|
2184
|
+
pos: He.value,
|
|
2185
|
+
"set-el": ve,
|
|
2186
|
+
"use-anchor": be.value,
|
|
2187
|
+
"anchor-placement": Ke.value,
|
|
2188
|
+
"up-color": se.value.upColor,
|
|
2189
|
+
"down-color": se.value.downColor
|
|
2015
2190
|
}, null, 8, [
|
|
2016
2191
|
"k",
|
|
2017
2192
|
"index",
|
|
2018
2193
|
"data",
|
|
2019
2194
|
"pos",
|
|
2020
2195
|
"use-anchor",
|
|
2021
|
-
"anchor-placement"
|
|
2196
|
+
"anchor-placement",
|
|
2197
|
+
"up-color",
|
|
2198
|
+
"down-color"
|
|
2022
2199
|
])) : a("", !0),
|
|
2023
|
-
|
|
2200
|
+
Ae.value || je.value ? (S(), i(nn, {
|
|
2024
2201
|
key: 3,
|
|
2025
|
-
marker:
|
|
2026
|
-
pos:
|
|
2027
|
-
"use-anchor":
|
|
2028
|
-
"anchor-placement":
|
|
2029
|
-
"set-el":
|
|
2202
|
+
marker: Ae.value || je.value,
|
|
2203
|
+
pos: We.value,
|
|
2204
|
+
"use-anchor": be.value,
|
|
2205
|
+
"anchor-placement": qe.value,
|
|
2206
|
+
"set-el": ye
|
|
2030
2207
|
}, null, 8, [
|
|
2031
2208
|
"marker",
|
|
2032
2209
|
"pos",
|
|
@@ -2037,23 +2214,23 @@ var rr = {
|
|
|
2037
2214
|
s("div", {
|
|
2038
2215
|
class: "right-axis-host",
|
|
2039
2216
|
ref: "rightAxisLayerRef",
|
|
2040
|
-
style: _({ width:
|
|
2041
|
-
onPointerdown:
|
|
2042
|
-
onPointermove:
|
|
2043
|
-
onPointerup:
|
|
2044
|
-
onPointerleave:
|
|
2217
|
+
style: _({ width: St.value + "px" }),
|
|
2218
|
+
onPointerdown: nt,
|
|
2219
|
+
onPointermove: rt,
|
|
2220
|
+
onPointerup: it,
|
|
2221
|
+
onPointerleave: at
|
|
2045
2222
|
}, null, 36)
|
|
2046
|
-
], 512)], 2), l(
|
|
2047
|
-
"active-indicators":
|
|
2223
|
+
], 512)], 2), l(Rt, {
|
|
2224
|
+
"active-indicators": lt.value,
|
|
2048
2225
|
"indicator-params": X.value,
|
|
2049
|
-
onToggle:
|
|
2050
|
-
onUpdateParams:
|
|
2051
|
-
onReorderSubIndicators:
|
|
2052
|
-
}, null, 8, ["active-indicators", "indicator-params"])],
|
|
2226
|
+
onToggle: yt,
|
|
2227
|
+
onUpdateParams: bt,
|
|
2228
|
+
onReorderSubIndicators: xt
|
|
2229
|
+
}, null, 8, ["active-indicators", "indicator-params"])], 12, Lr));
|
|
2053
2230
|
}
|
|
2054
|
-
}), [["__scopeId", "data-v-
|
|
2231
|
+
}), [["__scopeId", "data-v-f9c42035"]]), Ur = {
|
|
2055
2232
|
name: "@363045841yyt/klinechart",
|
|
2056
|
-
version: "0.7.
|
|
2233
|
+
version: "0.7.7",
|
|
2057
2234
|
description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
|
|
2058
2235
|
license: "MIT",
|
|
2059
2236
|
repository: {
|
|
@@ -2125,30 +2302,30 @@ var rr = {
|
|
|
2125
2302
|
vitest: "^4.1.5",
|
|
2126
2303
|
vue: "^3.5.0"
|
|
2127
2304
|
}
|
|
2128
|
-
}.version,
|
|
2129
|
-
function
|
|
2130
|
-
|
|
2305
|
+
}.version, Wr = null;
|
|
2306
|
+
function Gr(e) {
|
|
2307
|
+
Wr = e;
|
|
2131
2308
|
}
|
|
2132
|
-
function
|
|
2309
|
+
function Kr(e) {
|
|
2133
2310
|
if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
|
|
2134
|
-
if (
|
|
2135
|
-
return
|
|
2311
|
+
if (Wr === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
|
|
2312
|
+
return Wr(e);
|
|
2136
2313
|
}
|
|
2137
2314
|
function $(e) {
|
|
2138
|
-
let t =
|
|
2139
|
-
return
|
|
2315
|
+
let t = D(e.peek());
|
|
2316
|
+
return b(e.subscribe(() => {
|
|
2140
2317
|
t.value = e.peek();
|
|
2141
2318
|
})), t;
|
|
2142
2319
|
}
|
|
2143
|
-
function
|
|
2144
|
-
let n =
|
|
2145
|
-
e == null || n.value != null || (n.value =
|
|
2320
|
+
function qr(e, t) {
|
|
2321
|
+
let n = D(null), r = (e) => {
|
|
2322
|
+
e == null || n.value != null || (n.value = Kr({
|
|
2146
2323
|
...t,
|
|
2147
2324
|
container: e
|
|
2148
2325
|
}));
|
|
2149
2326
|
};
|
|
2150
2327
|
r(e.value);
|
|
2151
|
-
let i =
|
|
2328
|
+
let i = M(e, (e) => {
|
|
2152
2329
|
r(e);
|
|
2153
2330
|
}, {
|
|
2154
2331
|
immediate: !0,
|
|
@@ -2158,11 +2335,11 @@ function Mr(e, t) {
|
|
|
2158
2335
|
let e = n.value;
|
|
2159
2336
|
e != null && (e.dispose(), n.value = null);
|
|
2160
2337
|
};
|
|
2161
|
-
return
|
|
2338
|
+
return b(a), v(a), { chart: n };
|
|
2162
2339
|
}
|
|
2163
|
-
function
|
|
2164
|
-
let t =
|
|
2165
|
-
return
|
|
2340
|
+
function Jr(e) {
|
|
2341
|
+
let t = D(e.indicators.peek());
|
|
2342
|
+
return b(e.indicators.subscribe(() => {
|
|
2166
2343
|
t.value = e.indicators.peek();
|
|
2167
2344
|
})), {
|
|
2168
2345
|
indicators: t,
|
|
@@ -2171,27 +2348,27 @@ function Nr(e) {
|
|
|
2171
2348
|
updateParams: e.updateIndicatorParams.bind(e)
|
|
2172
2349
|
};
|
|
2173
2350
|
}
|
|
2174
|
-
function
|
|
2175
|
-
let t =
|
|
2176
|
-
return
|
|
2351
|
+
function Yr(e) {
|
|
2352
|
+
let t = D(e.interactionState.peek());
|
|
2353
|
+
return b(e.interactionState.subscribe(() => {
|
|
2177
2354
|
t.value = e.interactionState.peek();
|
|
2178
2355
|
})), t;
|
|
2179
2356
|
}
|
|
2180
|
-
function
|
|
2181
|
-
let t =
|
|
2182
|
-
return
|
|
2357
|
+
function Xr(e) {
|
|
2358
|
+
let t = D(e.paneRatios.peek());
|
|
2359
|
+
return b(e.paneRatios.subscribe(() => {
|
|
2183
2360
|
t.value = e.paneRatios.peek();
|
|
2184
2361
|
})), t;
|
|
2185
2362
|
}
|
|
2186
|
-
function
|
|
2187
|
-
let t =
|
|
2188
|
-
return
|
|
2363
|
+
function Zr(e) {
|
|
2364
|
+
let t = D(e.viewport.peek());
|
|
2365
|
+
return b(e.viewport.subscribe(() => {
|
|
2189
2366
|
t.value = e.viewport.peek();
|
|
2190
2367
|
})), t;
|
|
2191
2368
|
}
|
|
2192
|
-
function
|
|
2193
|
-
let t =
|
|
2194
|
-
|
|
2369
|
+
function Qr(e) {
|
|
2370
|
+
let t = z({ catalog: e.catalog });
|
|
2371
|
+
b(() => t.dispose());
|
|
2195
2372
|
let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
|
|
2196
2373
|
function o(t) {
|
|
2197
2374
|
let n = e.catalog.find((e) => e.id === t);
|
|
@@ -2218,7 +2395,7 @@ function Lr(e) {
|
|
|
2218
2395
|
isActive: c
|
|
2219
2396
|
};
|
|
2220
2397
|
}
|
|
2221
|
-
var
|
|
2398
|
+
var $r = u({
|
|
2222
2399
|
name: "KLineChart",
|
|
2223
2400
|
props: {
|
|
2224
2401
|
data: {
|
|
@@ -2247,11 +2424,11 @@ var Rr = u({
|
|
|
2247
2424
|
zoomLevelChange: (e, t) => !0
|
|
2248
2425
|
},
|
|
2249
2426
|
setup(e, { emit: t, expose: n }) {
|
|
2250
|
-
let r =
|
|
2251
|
-
|
|
2427
|
+
let r = D(null), i = d(), a = D(null);
|
|
2428
|
+
y(() => {
|
|
2252
2429
|
let n = r.value;
|
|
2253
2430
|
n != null && (i.run(() => {
|
|
2254
|
-
if (a.value =
|
|
2431
|
+
if (a.value = Kr({
|
|
2255
2432
|
container: n,
|
|
2256
2433
|
data: e.data,
|
|
2257
2434
|
initialZoomLevel: e.initialZoomLevel,
|
|
@@ -2263,14 +2440,14 @@ var Rr = u({
|
|
|
2263
2440
|
let n = e.viewport.peek();
|
|
2264
2441
|
t("zoomLevelChange", n.zoomLevel, n.kWidth);
|
|
2265
2442
|
};
|
|
2266
|
-
n(),
|
|
2443
|
+
n(), b(e.viewport.subscribe(n));
|
|
2267
2444
|
}
|
|
2268
|
-
}),
|
|
2445
|
+
}), M(() => e.data, (e) => {
|
|
2269
2446
|
a.value?.setData(e);
|
|
2270
|
-
}),
|
|
2447
|
+
}), M(() => e.theme, (e) => {
|
|
2271
2448
|
a.value?.setTheme(e);
|
|
2272
2449
|
}));
|
|
2273
|
-
}),
|
|
2450
|
+
}), x(() => {
|
|
2274
2451
|
a.value?.dispose(), a.value = null, i.stop();
|
|
2275
2452
|
}), n({
|
|
2276
2453
|
getController: () => a.value,
|
|
@@ -2297,9 +2474,9 @@ var Rr = u({
|
|
|
2297
2474
|
}
|
|
2298
2475
|
});
|
|
2299
2476
|
}
|
|
2300
|
-
}),
|
|
2301
|
-
e.component("KLineChart",
|
|
2477
|
+
}), ei = { install(e) {
|
|
2478
|
+
e.component("KLineChart", $r);
|
|
2302
2479
|
} };
|
|
2303
|
-
|
|
2480
|
+
Gr(R);
|
|
2304
2481
|
//#endregion
|
|
2305
|
-
export {
|
|
2482
|
+
export { L as CORE_VERSION, we as DrawingStyleToolbar, We as IndicatorParams, Rt as IndicatorSelector, $r as KLineChart, Hr as KLineChartVue, $t as KLineTooltip, ei as KMapPlugin, Ir as LeftToolbar, nn as MarkerTooltip, Ur as VERSION, Gr as __setControllerFactory, $ as coreSignalToVueRef, Kr as createChart, qr as useChart, Qr as useIndicatorSelector, Jr as useIndicators, Yr as useInteractionState, Xr as usePaneRatios, Zr as useViewport };
|