@363045841yyt/klinechart 0.7.4 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,20 +1,21 @@
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, ref as C, renderList as w, resolveDynamicComponent as T, shallowRef as E, toDisplayString as D, unref as O, vModelCheckbox as k, vModelSelect as A, vModelText as j, watch as M, withCtx as N, withDirectives as P, withModifiers as F } from "vue";
2
- import { findIndicator as ee, isSubIndicatorId as I, mainIndicators as L, subIndicators as te } from "@363045841yyt/klinechart-core/engine/renderers/Indicator/indicatorData";
3
- import { SemanticChartController as R, __setDataFetcher as ne } from "@363045841yyt/klinechart-core/semantic";
4
- import { Chart as z } from "@363045841yyt/klinechart-core/engine/chart";
5
- import { createChartStore as re } from "@363045841yyt/klinechart-core/engine/chart-store";
6
- import { kGapFromKWidth as ie, zoomLevelToKWidth as B } from "@363045841yyt/klinechart-core/engine/utils/zoom";
7
- import { getPhysicalKLineConfig as V } from "@363045841yyt/klinechart-core/engine/utils/klineConfig";
8
- import { SUB_PANE_INDICATORS as ae, SUB_PANE_INDICATOR_CONFIGS as H } from "@363045841yyt/klinechart-core/engine/renderers/Indicator/subPaneConfig";
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, ref as C, renderList as w, resolveDynamicComponent as T, shallowRef as E, toDisplayString as D, unref as O, vModelCheckbox as k, vModelSelect as A, watch as j, withCtx as M, withDirectives as N, withModifiers as P } from "vue";
2
+ import { VERSION as F, createChartController as I, createIndicatorSelectorController as L } from "@363045841yyt/klinechart-core";
3
+ import { allIndicators as R, findIndicator as z, isSubIndicatorId as B } from "@363045841yyt/klinechart-core/engine/renderers/Indicator/indicatorData";
4
+ import { createIndicatorSelectorController as ee } from "@363045841yyt/klinechart-core/controllers";
5
+ import { SemanticChartController as V, __setDataFetcher as te } from "@363045841yyt/klinechart-core/semantic";
6
+ import { Chart as H } from "@363045841yyt/klinechart-core/engine/chart";
7
+ import { createChartStore as ne } from "@363045841yyt/klinechart-core/engine/chart-store";
8
+ import { kGapFromKWidth as U, zoomLevelToKWidth as re } from "@363045841yyt/klinechart-core/engine/utils/zoom";
9
+ import { getPhysicalKLineConfig as W } from "@363045841yyt/klinechart-core/engine/utils/klineConfig";
10
+ import { SUB_PANE_INDICATORS as ie, SUB_PANE_INDICATOR_CONFIGS as ae } from "@363045841yyt/klinechart-core/engine/renderers/Indicator/subPaneConfig";
9
11
  import { createPaneTitleRendererPlugin as oe } from "@363045841yyt/klinechart-core/engine/renderers/paneTitle";
10
- import { DEFAULT_SETTINGS as U, SETTINGS_STORAGE_KEY as se } from "@363045841yyt/klinechart-core/config";
12
+ import { DEFAULT_SETTINGS as G, SETTINGS_STORAGE_KEY as se } from "@363045841yyt/klinechart-core/config";
11
13
  import { DrawingInteractionController as ce } from "@363045841yyt/klinechart-core/engine/drawing";
12
- import { VERSION as le, createChartController as ue } from "@363045841yyt/klinechart-core";
13
14
  //#region src/components/DrawingStyleToolbar.vue?vue&type=script&setup=true&lang.ts
14
- var de = {
15
+ var le = {
15
16
  class: "toolbar-item color-item",
16
17
  title: "颜色"
17
- }, fe = ["value"], W = ["value"], G = ["value"], K = /* @__PURE__ */ u({
18
+ }, ue = ["value"], de = ["value"], K = ["value"], fe = /* @__PURE__ */ u({
18
19
  __name: "DrawingStyleToolbar",
19
20
  props: { drawing: {} },
20
21
  emits: ["updateStyle", "delete"],
@@ -35,11 +36,11 @@ var de = {
35
36
  }
36
37
  return (t, n) => (S(), o("div", {
37
38
  class: "drawing-style-toolbar",
38
- onPointerdown: n[4] ||= F(() => {}, ["stop"]),
39
- onPointermove: n[5] ||= F(() => {}, ["stop"]),
40
- onPointerup: n[6] ||= F(() => {}, ["stop"])
39
+ onPointerdown: n[4] ||= P(() => {}, ["stop"]),
40
+ onPointermove: n[5] ||= P(() => {}, ["stop"]),
41
+ onPointerup: n[6] ||= P(() => {}, ["stop"])
41
42
  }, [
42
- s("div", de, [s("span", {
43
+ s("div", le, [s("span", {
43
44
  class: "color-swatch",
44
45
  style: _({ background: e.drawing.style.stroke ?? "#2962ff" })
45
46
  }, null, 4), s("input", {
@@ -47,7 +48,7 @@ var de = {
47
48
  class: "color-input",
48
49
  value: e.drawing.style.stroke ?? "#2962ff",
49
50
  onInput: n[0] ||= (e) => i(e.target.value)
50
- }, null, 40, fe)]),
51
+ }, null, 40, ue)]),
51
52
  s("select", {
52
53
  class: "toolbar-select",
53
54
  value: e.drawing.style.strokeWidth ?? 1,
@@ -58,7 +59,7 @@ var de = {
58
59
  s("option", { value: 2 }, "2px", -1),
59
60
  s("option", { value: 3 }, "3px", -1),
60
61
  s("option", { value: 4 }, "4px", -1)
61
- ]], 40, W),
62
+ ]], 40, de),
62
63
  s("select", {
63
64
  class: "toolbar-select",
64
65
  value: e.drawing.style.strokeStyle ?? "solid",
@@ -68,7 +69,7 @@ var de = {
68
69
  s("option", { value: "solid" }, "实线", -1),
69
70
  s("option", { value: "dashed" }, "虚线", -1),
70
71
  s("option", { value: "dotted" }, "点线", -1)
71
- ]], 40, G),
72
+ ]], 40, K),
72
73
  s("button", {
73
74
  type: "button",
74
75
  class: "toolbar-btn delete-btn",
@@ -94,7 +95,7 @@ var de = {
94
95
  let n = e.__vccOpts || e;
95
96
  for (let [e, r] of t) n[e] = r;
96
97
  return n;
97
- }, pe = /* @__PURE__ */ q(K, [["__scopeId", "data-v-87e91714"]]), me = { class: "params-header" }, J = { class: "header-left" }, Y = { class: "params-title" }, he = { class: "header-right" }, ge = {
98
+ }, pe = /* @__PURE__ */ q(fe, [["__scopeId", "data-v-4c26f819"]]), me = { class: "params-header" }, J = { class: "header-left" }, Y = { class: "params-title" }, he = { class: "header-right" }, ge = {
98
99
  key: 0,
99
100
  class: "indicator-description"
100
101
  }, _e = { class: "params-body" }, ve = { class: "param-header" }, ye = { class: "param-label" }, be = { class: "param-label-text" }, xe = {
@@ -122,12 +123,12 @@ var de = {
122
123
  emits: ["close", "confirm"],
123
124
  setup(u, { emit: d }) {
124
125
  let f = u, p = d, m = C({ ...f.values }), h = C(!0), _ = r(() => "body");
125
- M(() => f.values, (e) => {
126
+ j(() => f.values, (e) => {
126
127
  m.value = { ...e };
127
128
  }, {
128
129
  deep: !0,
129
130
  immediate: !0
130
- }), M(() => f.visible, (e) => {
131
+ }), j(() => f.visible, (e) => {
131
132
  e && (m.value = { ...f.values });
132
133
  });
133
134
  function v(e, t) {
@@ -148,14 +149,14 @@ var de = {
148
149
  p("confirm", { ...m.value });
149
150
  }
150
151
  return (r, d) => (S(), i(t, { to: _.value }, [l(n, { name: "overlay" }, {
151
- default: N(() => [u.visible ? (S(), o("div", {
152
+ default: M(() => [u.visible ? (S(), o("div", {
152
153
  key: 0,
153
154
  class: "params-overlay",
154
155
  onClick: d[4] ||= (e) => r.$emit("close")
155
156
  }, [l(n, { name: "modal" }, {
156
- default: N(() => [s("div", {
157
+ default: M(() => [s("div", {
157
158
  class: "indicator-params",
158
- onClick: d[3] ||= F(() => {}, ["stop"])
159
+ onClick: d[3] ||= P(() => {}, ["stop"])
159
160
  }, [
160
161
  s("div", me, [s("div", J, [s("span", Y, D(u.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", he, [s("button", {
161
162
  class: g(["toggle-desc-btn", { active: h.value }]),
@@ -174,7 +175,7 @@ var de = {
174
175
  "stroke-width": "2"
175
176
  }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
176
177
  l(n, { name: "slide" }, {
177
- default: N(() => [h.value && u.indicatorDescription ? (S(), o("div", ge, [s("p", null, D(u.indicatorDescription), 1)])) : a("", !0)]),
178
+ default: M(() => [h.value && u.indicatorDescription ? (S(), o("div", ge, [s("p", null, D(u.indicatorDescription), 1)])) : a("", !0)]),
178
179
  _: 1
179
180
  }),
180
181
  s("div", _e, [(S(!0), o(e, null, w(u.params, (e) => (S(), o("div", {
@@ -202,7 +203,7 @@ var de = {
202
203
  onClick: (t) => y(e, 1)
203
204
  }, " + ", 8, Te)
204
205
  ])]), l(n, { name: "slide" }, {
205
- default: N(() => [h.value && e.description ? (S(), o("div", Ee, D(e.description), 1)) : a("", !0)]),
206
+ default: M(() => [h.value && e.description ? (S(), o("div", Ee, D(e.description), 1)) : a("", !0)]),
206
207
  _: 2
207
208
  }, 1024)], 2))), 128))]),
208
209
  s("div", De, [s("button", {
@@ -231,7 +232,7 @@ var de = {
231
232
  _: 1
232
233
  })], 8, ["to"]));
233
234
  }
234
- }), [["__scopeId", "data-v-2ffc8f4d"]]), Ae = Symbol("fullscreen-teleport-target");
235
+ }), [["__scopeId", "data-v-b82e9094"]]), Ae = Symbol("fullscreen-teleport-target");
235
236
  function je() {
236
237
  let e = p(Ae, null);
237
238
  return r(() => e?.value ?? "body");
@@ -268,19 +269,19 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
268
269
  width: "16",
269
270
  height: "16",
270
271
  fill: "currentColor"
271
- }, X = { class: "modal-body" }, Ze = { class: "search-box" }, Qe = {
272
+ }, Ze = { class: "modal-body" }, Qe = { class: "search-box" }, $e = ["value"], X = {
272
273
  key: 0,
273
274
  class: "indicator-section"
274
- }, Z = { class: "section-header" }, Q = { class: "section-count" }, $e = ["onClick"], et = { class: "card-label" }, tt = { class: "card-tooltip" }, nt = { class: "card-header" }, rt = { class: "card-label" }, it = { class: "card-header-actions" }, at = ["onClick"], ot = { class: "card-name" }, st = {
275
+ }, Z = { class: "section-header" }, et = { class: "section-count" }, tt = ["onClick"], nt = { class: "card-label" }, rt = { class: "card-tooltip" }, it = { class: "card-header" }, at = { class: "card-label" }, ot = { class: "card-header-actions" }, st = ["onClick"], ct = { class: "card-name" }, lt = {
275
276
  key: 1,
276
277
  class: "section-divider"
277
- }, ct = {
278
+ }, ut = {
278
279
  key: 2,
279
280
  class: "no-results"
280
- }, lt = {
281
+ }, dt = {
281
282
  key: 3,
282
283
  class: "indicator-section"
283
- }, ut = { class: "section-header" }, dt = { class: "section-count" }, ft = ["onClick"], pt = { class: "card-label" }, mt = { class: "card-tooltip" }, ht = { class: "card-header" }, gt = { class: "card-label" }, _t = { class: "card-header-actions" }, vt = ["onClick"], yt = { class: "card-name" }, bt = { class: "modal-footer" }, xt = { class: "footer-info" }, St = { class: "info-text" }, Ct = /* @__PURE__ */ q(/* @__PURE__ */ u({
284
+ }, 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 = { class: "modal-footer" }, Ct = { class: "footer-info" }, wt = { class: "info-text" }, Tt = /* @__PURE__ */ q(/* @__PURE__ */ u({
284
285
  __name: "IndicatorSelector",
285
286
  props: {
286
287
  activeIndicators: {},
@@ -292,34 +293,42 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
292
293
  "reorderSubIndicators"
293
294
  ],
294
295
  setup(u, { emit: d }) {
295
- let f = u, p = d, m = C(null), h = C(!1), _ = C(null), v = C(null), b = C(!1), T = C(null), E = C(null), k = C(!1), A = C(""), M = je(), R = r(() => f.activeIndicators?.length ? f.activeIndicators.map((e) => ee(e)).filter((e) => e !== void 0).sort((e, t) => e.pane === t.pane ? 0 : e.pane === "main" ? -1 : 1) : []), ne = r(() => R.value.some((e) => e.pane === "main") ? R.value.find((e) => e.pane === "sub")?.id ?? null : null), z = r(() => _.value ? ee(_.value) : null), re = r(() => L.length + te.length), ie = r(() => f.activeIndicators?.length ?? 0), B = r(() => {
296
- if (!A.value.trim()) return L;
297
- let e = A.value.toLowerCase().trim();
298
- return L.filter((t) => t.label.toLowerCase().includes(e) || t.name.toLowerCase().includes(e) || t.id.toLowerCase().includes(e));
299
- }), V = r(() => {
300
- if (!A.value.trim()) return te;
301
- let e = A.value.toLowerCase().trim();
302
- return te.filter((t) => t.label.toLowerCase().includes(e) || t.name.toLowerCase().includes(e) || t.id.toLowerCase().includes(e));
303
- }), ae = r(() => B.value.length > 0 || V.value.length > 0);
304
- function H(e) {
296
+ let f = u, p = d;
297
+ function m(e) {
298
+ return e.map((e) => ({
299
+ id: e.id,
300
+ label: e.label,
301
+ name: e.name,
302
+ description: e.description,
303
+ role: e.pane,
304
+ params: (e.params ?? []).map((e) => ({
305
+ key: e.key,
306
+ label: e.label,
307
+ type: e.type,
308
+ default: e.default ?? (e.type === "number" ? 0 : ""),
309
+ min: e.min,
310
+ max: e.max,
311
+ step: e.step
312
+ }))
313
+ }));
314
+ }
315
+ let h = ee({ catalog: m(R) }), _ = $(h.menuOpen), v = $(h.searchQuery), b = $(h.filteredMain), T = $(h.filteredSub), E = r(() => b.value.length > 0 || T.value.length > 0), k = h.catalog.peek().length, A = C(null), j = C(!1), N = C(null), F = C(null), I = C(null), L = C(null), V = C(!1), te = je(), H = r(() => f.activeIndicators?.length ? f.activeIndicators.map((e) => z(e)).filter((e) => e !== void 0).sort((e, t) => e.pane === t.pane ? 0 : e.pane === "main" ? -1 : 1) : []), ne = r(() => H.value.some((e) => e.pane === "main") ? H.value.find((e) => e.pane === "sub")?.id ?? null : null), U = r(() => N.value ? z(N.value) : null), re = r(() => f.activeIndicators?.length ?? 0);
316
+ function W(e) {
305
317
  return f.activeIndicators?.includes(e) ?? !1;
306
318
  }
307
- function oe(e) {
308
- if (H(e)) return;
309
- let t = ee(e);
310
- t && (t.pane === "main" && L.filter((t) => t.id !== e && H(t.id)).forEach((e) => p("toggle", e.id, !1)), p("toggle", e, !0));
319
+ function ie(e) {
320
+ if (W(e)) return;
321
+ let t = z(e);
322
+ t && (t.pane === "main" && R.filter((t) => t.id !== e && W(t.id) && t.pane === "main").forEach((e) => p("toggle", e.id, !1)), p("toggle", e, !0));
311
323
  }
312
- function U(e) {
324
+ function ae(e) {
313
325
  p("toggle", e, !1);
314
326
  }
315
- function se(e) {
316
- _.value = e, h.value = !0;
317
- }
318
- function ce() {
319
- b.value = !1;
327
+ function oe(e) {
328
+ N.value = e, j.value = !0;
320
329
  }
321
- function le(e) {
322
- let t = ee(e);
330
+ function G(e) {
331
+ let t = z(e);
323
332
  if (!t?.params) return {};
324
333
  let n = {};
325
334
  for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
@@ -327,85 +336,82 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
327
336
  for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
328
337
  return i;
329
338
  }
330
- function ue(e) {
331
- let t = le(e.id);
339
+ function se(e) {
340
+ let t = G(e.id);
332
341
  return e.params ? e.params.map((e) => t[e.key] ?? "").join(",") : "";
333
342
  }
334
- function de(e) {
335
- _.value && p("updateParams", _.value, e), h.value = !1;
343
+ function ce(e) {
344
+ N.value && p("updateParams", N.value, e), j.value = !1;
336
345
  }
337
- function fe(e, t) {
338
- if (!I(t)) {
346
+ function le(e, t) {
347
+ if (!B(t)) {
339
348
  e.preventDefault();
340
349
  return;
341
350
  }
342
- E.value = t, T.value = null, e.dataTransfer?.setData("text/plain", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
351
+ L.value = t, I.value = null, e.dataTransfer?.setData("text/plain", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
343
352
  }
344
- function W(e, t) {
345
- !E.value || !I(t) || E.value === t || (T.value = t, e.dataTransfer && (e.dataTransfer.dropEffect = "move"));
353
+ function ue(e, t) {
354
+ !L.value || !B(t) || L.value === t || (I.value = t, e.dataTransfer && (e.dataTransfer.dropEffect = "move"));
346
355
  }
347
- function G(e, t) {
348
- let n = E.value || e.dataTransfer?.getData("text/plain") || "";
356
+ function de(e, t) {
357
+ let n = L.value || e.dataTransfer?.getData("text/plain") || "";
349
358
  if (!n || n === t) {
350
359
  K();
351
360
  return;
352
361
  }
353
- if (!I(n) || !I(t)) {
362
+ if (!B(n) || !B(t)) {
354
363
  K();
355
364
  return;
356
365
  }
357
- let r = R.value.findIndex((e) => e.id === n), i = R.value.findIndex((e) => e.id === t);
366
+ let r = H.value.findIndex((e) => e.id === n), i = H.value.findIndex((e) => e.id === t);
358
367
  if (r < 0 || i < 0) {
359
368
  K();
360
369
  return;
361
370
  }
362
- let a = [...R.value.map((e) => e.id)], [o] = a.splice(r, 1);
371
+ let a = [...H.value.map((e) => e.id)], [o] = a.splice(r, 1);
363
372
  if (!o) {
364
373
  K();
365
374
  return;
366
375
  }
367
- a.splice(i, 0, o), p("reorderSubIndicators", a.filter((e) => I(e))), K();
376
+ a.splice(i, 0, o), p("reorderSubIndicators", a.filter((e) => B(e))), K();
368
377
  }
369
378
  function K() {
370
- T.value = null, E.value = null;
379
+ I.value = null, L.value = null;
371
380
  }
372
- function q() {
373
- b.value = !b.value;
374
- }
375
- function pe(e) {
376
- e.key === "Escape" && b.value && (b.value = !1);
381
+ function fe(e) {
382
+ e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
377
383
  }
378
384
  return y(() => {
379
- document.addEventListener("keydown", pe);
385
+ document.addEventListener("keydown", fe);
380
386
  }), x(() => {
381
- document.removeEventListener("keydown", pe);
387
+ document.removeEventListener("keydown", fe);
382
388
  }), (r, u) => (S(), o("div", Me, [
383
- s("div", Ne, [s("div", Pe, [(S(!0), o(e, null, w(R.value, (t) => (S(), o(e, { key: t.id }, [t.id === ne.value ? (S(), o("div", Fe)) : a("", !0), s("div", {
389
+ s("div", Ne, [s("div", Pe, [(S(!0), o(e, null, w(H.value, (t) => (S(), o(e, { key: t.id }, [t.id === ne.value ? (S(), o("div", Fe)) : a("", !0), s("div", {
384
390
  class: g(["indicator-item", {
385
- draggable: O(I)(t.id),
386
- "drag-over": T.value === t.id,
387
- "is-dragging": E.value === t.id
391
+ draggable: O(B)(t.id),
392
+ "drag-over": I.value === t.id,
393
+ "is-dragging": L.value === t.id
388
394
  }]),
389
- draggable: O(I)(t.id),
390
- onDragstart: (e) => fe(e, t.id),
391
- onDragover: F((e) => W(e, t.id), ["prevent"]),
392
- onDrop: F((e) => G(e, t.id), ["prevent"]),
395
+ draggable: O(B)(t.id),
396
+ onDragstart: (e) => le(e, t.id),
397
+ onDragover: P((e) => ue(e, t.id), ["prevent"]),
398
+ onDrop: P((e) => de(e, t.id), ["prevent"]),
393
399
  onDragend: K
394
400
  }, [s("div", {
395
401
  class: "indicator-btn-wrapper",
396
- onMouseenter: (e) => v.value = t.id,
397
- onMouseleave: u[0] ||= (e) => v.value = null
402
+ onMouseenter: (e) => F.value = t.id,
403
+ onMouseleave: u[0] ||= (e) => F.value = null
398
404
  }, [s("button", { class: g(["indicator-btn", {
399
405
  active: !0,
400
- hovering: v.value === t.id
401
- }]) }, [s("span", Re, [c(D(t.label) + " ", 1), t.params?.length ? (S(), o("span", ze, " (" + D(ue(t)) + ") ", 1)) : a("", !0)]), l(n, { name: "fade" }, {
402
- default: N(() => [v.value === t.id ? (S(), o("div", Be, [
406
+ hovering: F.value === t.id
407
+ }]) }, [s("span", Re, [c(D(t.label) + " ", 1), t.params?.length ? (S(), o("span", ze, " (" + D(se(t)) + ") ", 1)) : a("", !0)]), l(n, { name: "fade" }, {
408
+ default: M(() => [F.value === t.id ? (S(), o("div", Be, [
403
409
  t.params?.length ? (S(), o("button", {
404
410
  key: 0,
405
411
  class: "action-btn settings-btn",
406
- onClick: F((e) => se(t.id), ["stop"]),
412
+ onClick: P((e) => oe(t.id), ["stop"]),
407
413
  title: "编辑参数"
408
- }, [...u[5] ||= [s("svg", {
414
+ }, [...u[9] ||= [s("svg", {
409
415
  viewBox: "0 0 24 24",
410
416
  width: "14",
411
417
  height: "14",
@@ -414,9 +420,9 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
414
420
  t.params?.length ? (S(), o("span", He)) : a("", !0),
415
421
  s("button", {
416
422
  class: "action-btn remove-btn",
417
- onClick: F((e) => U(t.id), ["stop"]),
423
+ onClick: P((e) => ae(t.id), ["stop"]),
418
424
  title: "移除指标"
419
- }, [...u[6] ||= [s("svg", {
425
+ }, [...u[10] ||= [s("svg", {
420
426
  viewBox: "0 0 24 24",
421
427
  width: "14",
422
428
  height: "14",
@@ -426,74 +432,75 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
426
432
  _: 2
427
433
  }, 1024)], 2)], 40, Le)], 42, Ie)], 64))), 128)), s("div", We, [s("button", {
428
434
  ref_key: "addBtnRef",
429
- ref: m,
435
+ ref: A,
430
436
  class: "add-btn",
431
- onClick: q,
437
+ onClick: u[1] ||= P((e) => O(h).toggleMenu(), ["stop"]),
432
438
  title: "添加指标"
433
- }, [...u[7] ||= [s("svg", {
439
+ }, [...u[11] ||= [s("svg", {
434
440
  viewBox: "0 0 24 24",
435
441
  width: "16",
436
442
  height: "16",
437
443
  fill: "currentColor"
438
444
  }, [s("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" })], -1)]], 512)])])]),
439
- (S(), i(t, { to: O(M) }, [l(n, { name: "overlay" }, {
440
- default: N(() => [b.value ? (S(), o("div", {
445
+ (S(), i(t, { to: O(te) }, [l(n, { name: "overlay" }, {
446
+ default: M(() => [O(_) ? (S(), o("div", {
441
447
  key: 0,
442
448
  class: "selector-overlay",
443
- onClick: ce
449
+ onClick: u[7] ||= (e) => O(h).closeMenu()
444
450
  }, [l(n, { name: "modal" }, {
445
- default: N(() => [b.value ? (S(), o("div", {
451
+ default: M(() => [O(_) ? (S(), o("div", {
446
452
  key: 0,
447
453
  class: "selector-modal",
448
- onClick: u[3] ||= F(() => {}, ["stop"])
454
+ onClick: u[6] ||= P(() => {}, ["stop"])
449
455
  }, [
450
- s("div", Ge, [s("div", Ke, [u[8] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", qe, D(re.value) + " 个可用指标", 1)]), s("div", Je, [s("button", {
451
- class: g(["view-toggle-btn", { active: k.value }]),
452
- onClick: u[1] ||= (e) => k.value = !k.value,
456
+ s("div", Ge, [s("div", Ke, [u[12] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", qe, D(O(k)) + " 个可用指标", 1)]), s("div", Je, [s("button", {
457
+ class: g(["view-toggle-btn", { active: V.value }]),
458
+ onClick: u[2] ||= (e) => V.value = !V.value,
453
459
  title: "简洁模式"
454
- }, [k.value ? (S(), o("svg", Xe, [...u[10] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", Ye, [...u[9] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
460
+ }, [V.value ? (S(), o("svg", Xe, [...u[14] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", Ye, [...u[13] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
455
461
  class: "modal-close",
456
- onClick: ce,
462
+ onClick: u[3] ||= (e) => O(h).closeMenu(),
457
463
  title: "关闭"
458
- }, [...u[11] ||= [s("svg", {
464
+ }, [...u[15] ||= [s("svg", {
459
465
  viewBox: "0 0 24 24",
460
466
  width: "14",
461
467
  height: "14",
462
468
  fill: "currentColor"
463
469
  }, [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)]])])]),
464
- s("div", X, [
465
- s("div", Ze, [u[12] ||= s("svg", {
470
+ s("div", Ze, [
471
+ s("div", Qe, [u[16] ||= s("svg", {
466
472
  class: "search-icon",
467
473
  viewBox: "0 0 24 24",
468
474
  width: "16",
469
475
  height: "16",
470
476
  fill: "currentColor"
471
- }, [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), P(s("input", {
472
- "onUpdate:modelValue": u[2] ||= (e) => A.value = e,
477
+ }, [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", {
478
+ value: O(v),
479
+ onInput: u[4] ||= (e) => O(h).setSearchQuery(e.target.value),
473
480
  type: "text",
474
481
  class: "search-input",
475
482
  placeholder: "搜索指标名称..."
476
- }, null, 512), [[j, A.value]])]),
477
- B.value.length > 0 ? (S(), o("div", Qe, [s("div", Z, [u[13] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", Q, D(B.value.length), 1)]), s("div", { class: g(["indicator-grid", { compact: k.value }]) }, [(S(!0), o(e, null, w(B.value, (t) => (S(), o("button", {
483
+ }, null, 40, $e)]),
484
+ O(b).length > 0 ? (S(), o("div", X, [s("div", Z, [u[17] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", et, D(O(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: V.value }]) }, [(S(!0), o(e, null, w(O(b), (t) => (S(), o("button", {
478
485
  key: t.id,
479
486
  class: g(["indicator-card", {
480
- active: H(t.id),
481
- compact: k.value
487
+ active: W(t.id),
488
+ compact: V.value
482
489
  }]),
483
- onClick: (e) => H(t.id) ? U(t.id) : oe(t.id)
484
- }, [k.value ? (S(), o(e, { key: 0 }, [s("span", et, D(t.label), 1), s("span", tt, D(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", nt, [s("span", rt, D(t.label), 1), s("div", it, [t.params?.length ? (S(), o("button", {
490
+ onClick: (e) => W(t.id) ? ae(t.id) : ie(t.id)
491
+ }, [V.value ? (S(), o(e, { key: 0 }, [s("span", nt, D(t.label), 1), s("span", rt, D(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", it, [s("span", at, D(t.label), 1), s("div", ot, [t.params?.length ? (S(), o("button", {
485
492
  key: 0,
486
493
  class: "card-settings-btn",
487
- onClick: F((e) => se(t.id), ["stop"]),
494
+ onClick: P((e) => oe(t.id), ["stop"]),
488
495
  title: "编辑参数"
489
- }, [...u[14] ||= [s("svg", {
496
+ }, [...u[18] ||= [s("svg", {
490
497
  viewBox: "0 0 24 24",
491
498
  width: "14",
492
499
  height: "14",
493
500
  fill: "currentColor"
494
- }, [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, at)) : a("", !0)])]), s("div", ot, D(t.name), 1)], 64))], 10, $e))), 128))], 2)])) : a("", !0),
495
- B.value.length > 0 && V.value.length > 0 ? (S(), o("div", st)) : a("", !0),
496
- !ae.value && A.value.trim() ? (S(), o("div", ct, [...u[15] ||= [
501
+ }, [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, st)) : a("", !0)])]), s("div", ct, D(t.name), 1)], 64))], 10, tt))), 128))], 2)])) : a("", !0),
502
+ O(b).length > 0 && O(T).length > 0 ? (S(), o("div", lt)) : a("", !0),
503
+ !E.value && O(v).trim() ? (S(), o("div", ut, [...u[19] ||= [
497
504
  s("svg", {
498
505
  viewBox: "0 0 24 24",
499
506
  width: "48",
@@ -503,44 +510,44 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
503
510
  s("p", null, "未找到匹配的指标", -1),
504
511
  s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
505
512
  ]])) : a("", !0),
506
- V.value.length > 0 ? (S(), o("div", lt, [s("div", ut, [u[16] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", dt, D(V.value.length), 1)]), s("div", { class: g(["indicator-grid", { compact: k.value }]) }, [(S(!0), o(e, null, w(V.value, (t) => (S(), o("button", {
513
+ O(T).length > 0 ? (S(), o("div", dt, [s("div", ft, [u[20] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", pt, D(O(T).length), 1)]), s("div", { class: g(["indicator-grid", { compact: V.value }]) }, [(S(!0), o(e, null, w(O(T), (t) => (S(), o("button", {
507
514
  key: t.id,
508
515
  class: g(["indicator-card", {
509
- active: H(t.id),
510
- compact: k.value
516
+ active: W(t.id),
517
+ compact: V.value
511
518
  }]),
512
- onClick: (e) => H(t.id) ? U(t.id) : oe(t.id)
513
- }, [k.value ? (S(), o(e, { key: 0 }, [s("span", pt, D(t.label), 1), s("span", mt, D(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", ht, [s("span", gt, D(t.label), 1), s("div", _t, [t.params?.length ? (S(), o("button", {
519
+ onClick: (e) => W(t.id) ? ae(t.id) : ie(t.id)
520
+ }, [V.value ? (S(), o(e, { key: 0 }, [s("span", ht, D(t.label), 1), s("span", gt, D(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", _t, [s("span", vt, D(t.label), 1), s("div", yt, [t.params?.length ? (S(), o("button", {
514
521
  key: 0,
515
522
  class: "card-settings-btn",
516
- onClick: F((e) => se(t.id), ["stop"]),
523
+ onClick: P((e) => oe(t.id), ["stop"]),
517
524
  title: "编辑参数"
518
- }, [...u[17] ||= [s("svg", {
525
+ }, [...u[21] ||= [s("svg", {
519
526
  viewBox: "0 0 24 24",
520
527
  width: "14",
521
528
  height: "14",
522
529
  fill: "currentColor"
523
- }, [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, vt)) : a("", !0)])]), s("div", yt, D(t.name), 1)], 64))], 10, ft))), 128))], 2)])) : a("", !0)
530
+ }, [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, D(t.name), 1)], 64))], 10, mt))), 128))], 2)])) : a("", !0)
524
531
  ]),
525
- s("div", bt, [s("div", xt, [s("span", St, "已激活 " + D(ie.value) + " 个指标", 1)]), s("button", {
532
+ s("div", St, [s("div", Ct, [s("span", wt, "已激活 " + D(re.value) + " 个指标", 1)]), s("button", {
526
533
  class: "btn btn-confirm",
527
- onClick: ce
534
+ onClick: u[5] ||= (e) => O(h).closeMenu()
528
535
  }, "确认")])
529
536
  ])) : a("", !0)]),
530
537
  _: 1
531
538
  })])) : a("", !0)]),
532
539
  _: 1
533
540
  })], 8, ["to"])),
534
- z.value ? (S(), i(ke, {
541
+ U.value ? (S(), i(ke, {
535
542
  key: 0,
536
- visible: h.value,
537
- "indicator-id": z.value.id,
538
- "indicator-name": z.value.name,
539
- "indicator-description": z.value.description,
540
- params: z.value.params || [],
541
- values: le(z.value.id),
542
- onClose: u[4] ||= (e) => h.value = !1,
543
- onConfirm: de
543
+ visible: j.value,
544
+ "indicator-id": U.value.id,
545
+ "indicator-name": U.value.name,
546
+ "indicator-description": U.value.description,
547
+ params: U.value.params || [],
548
+ values: G(U.value.id),
549
+ onClose: u[8] ||= (e) => j.value = !1,
550
+ onConfirm: ce
544
551
  }, null, 8, [
545
552
  "visible",
546
553
  "indicator-id",
@@ -551,25 +558,25 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
551
558
  ])) : a("", !0)
552
559
  ]));
553
560
  }
554
- }), [["__scopeId", "data-v-22a0d967"]]), wt = { class: "kline-tooltip__title" }, Tt = { key: 0 }, Et = { class: "kline-tooltip__grid" }, Dt = { class: "row" }, Ot = { class: "row" }, kt = { class: "row" }, At = { class: "row" }, jt = {
561
+ }), [["__scopeId", "data-v-6eb58214"]]), Et = { class: "kline-tooltip__title" }, Dt = { key: 0 }, Ot = { class: "kline-tooltip__grid" }, kt = { class: "row" }, At = { class: "row" }, jt = { class: "row" }, Mt = { class: "row" }, Nt = {
555
562
  key: 0,
556
563
  class: "row"
557
- }, Mt = {
564
+ }, Pt = {
558
565
  key: 1,
559
566
  class: "row"
560
- }, Nt = {
567
+ }, Ft = {
561
568
  key: 2,
562
569
  class: "row"
563
- }, Pt = {
570
+ }, It = {
564
571
  key: 3,
565
572
  class: "row"
566
- }, Ft = {
573
+ }, Lt = {
567
574
  key: 4,
568
575
  class: "row"
569
- }, It = {
576
+ }, Rt = {
570
577
  key: 5,
571
578
  class: "row"
572
- }, Lt = "#ef4444", Rt = "#22c55e", zt = "#6b7280", Bt = /* @__PURE__ */ q(/* @__PURE__ */ u({
579
+ }, zt = "#ef4444", Bt = "#22c55e", Vt = "#6b7280", Ht = /* @__PURE__ */ q(/* @__PURE__ */ u({
573
580
  __name: "KLineTooltip",
574
581
  props: {
575
582
  k: {},
@@ -602,19 +609,19 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
602
609
  }
603
610
  let p = r(() => {
604
611
  let e = t.k;
605
- if (!e) return zt;
612
+ if (!e) return Vt;
606
613
  let n = f(e, t.data, t.index);
607
- return n > 0 ? Lt : n < 0 ? Rt : zt;
614
+ return n > 0 ? zt : n < 0 ? Bt : Vt;
608
615
  }), m = r(() => {
609
616
  let e = t.k;
610
- if (!e) return zt;
617
+ if (!e) return Vt;
611
618
  let n = e.close - e.open;
612
- return n > 0 ? Lt : n < 0 ? Rt : zt;
619
+ return n > 0 ? zt : n < 0 ? Bt : Vt;
613
620
  }), h = r(() => {
614
621
  let e = t.k;
615
- if (!e) return zt;
622
+ if (!e) return Vt;
616
623
  let n = e.changePercent ?? (e.close - e.open) / e.open * 100;
617
- return n > 0 ? Lt : n < 0 ? Rt : zt;
624
+ return n > 0 ? zt : n < 0 ? Bt : Vt;
618
625
  });
619
626
  return (t, r) => e.k ? (S(), o("div", {
620
627
  key: 0,
@@ -624,23 +631,23 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
624
631
  left: `${e.pos.x}px`,
625
632
  top: `${e.pos.y}px`
626
633
  })
627
- }, [s("div", wt, [e.k.stockCode ? (S(), o("span", Tt, D(e.k.stockCode), 1)) : a("", !0), s("span", null, D(l(e.k.timestamp)), 1)]), s("div", Et, [
628
- s("div", Dt, [r[0] ||= s("span", null, "开", -1), s("span", { style: _({ color: p.value }) }, D(e.k.open.toFixed(2)), 5)]),
629
- s("div", Ot, [r[1] ||= s("span", null, "高", -1), s("span", null, D(e.k.high.toFixed(2)), 1)]),
630
- s("div", kt, [r[2] ||= s("span", null, "低", -1), s("span", null, D(e.k.low.toFixed(2)), 1)]),
631
- s("div", At, [r[3] ||= s("span", null, "收", -1), s("span", { style: _({ color: m.value }) }, D(e.k.close.toFixed(2)), 5)]),
632
- typeof e.k.volume == "number" ? (S(), o("div", jt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, D(u(e.k.volume)), 1)])) : a("", !0),
633
- typeof e.k.turnover == "number" ? (S(), o("div", Mt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, D(u(e.k.turnover)), 1)])) : a("", !0),
634
- typeof e.k.amplitude == "number" ? (S(), o("div", Nt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, D(e.k.amplitude) + "%", 1)])) : a("", !0),
635
- typeof e.k.changePercent == "number" ? (S(), o("div", Pt, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: _({ color: h.value }) }, D(d(e.k.changePercent, "%")), 5)])) : a("", !0),
636
- typeof e.k.changeAmount == "number" ? (S(), o("div", Ft, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: _({ color: h.value }) }, D(d(e.k.changeAmount, "")), 5)])) : a("", !0),
637
- typeof e.k.turnoverRate == "number" ? (S(), o("div", It, [r[9] ||= s("span", null, "换手率", -1), s("span", null, D(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
634
+ }, [s("div", Et, [e.k.stockCode ? (S(), o("span", Dt, D(e.k.stockCode), 1)) : a("", !0), s("span", null, D(l(e.k.timestamp)), 1)]), s("div", Ot, [
635
+ s("div", kt, [r[0] ||= s("span", null, "开", -1), s("span", { style: _({ color: p.value }) }, D(e.k.open.toFixed(2)), 5)]),
636
+ s("div", At, [r[1] ||= s("span", null, "高", -1), s("span", null, D(e.k.high.toFixed(2)), 1)]),
637
+ s("div", jt, [r[2] ||= s("span", null, "低", -1), s("span", null, D(e.k.low.toFixed(2)), 1)]),
638
+ s("div", Mt, [r[3] ||= s("span", null, "收", -1), s("span", { style: _({ color: m.value }) }, D(e.k.close.toFixed(2)), 5)]),
639
+ typeof e.k.volume == "number" ? (S(), o("div", Nt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, D(u(e.k.volume)), 1)])) : a("", !0),
640
+ typeof e.k.turnover == "number" ? (S(), o("div", Pt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, D(u(e.k.turnover)), 1)])) : a("", !0),
641
+ typeof e.k.amplitude == "number" ? (S(), o("div", Ft, [r[6] ||= s("span", null, "振幅", -1), s("span", null, D(e.k.amplitude) + "%", 1)])) : a("", !0),
642
+ typeof e.k.changePercent == "number" ? (S(), o("div", It, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: _({ color: h.value }) }, D(d(e.k.changePercent, "%")), 5)])) : a("", !0),
643
+ typeof e.k.changeAmount == "number" ? (S(), o("div", Lt, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: _({ color: h.value }) }, D(d(e.k.changeAmount, "")), 5)])) : a("", !0),
644
+ typeof e.k.turnoverRate == "number" ? (S(), o("div", Rt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, D(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
638
645
  ])], 6)) : a("", !0);
639
646
  }
640
- }), [["__scopeId", "data-v-90b1aa6d"]]), Vt = { class: "marker-tooltip__title" }, Ht = {
647
+ }), [["__scopeId", "data-v-93207d24"]]), Ut = { class: "marker-tooltip__title" }, Wt = {
641
648
  key: 0,
642
649
  class: "marker-tooltip__content"
643
- }, Ut = /* @__PURE__ */ q(/* @__PURE__ */ u({
650
+ }, Gt = /* @__PURE__ */ q(/* @__PURE__ */ u({
644
651
  __name: "MarkerTooltip",
645
652
  props: {
646
653
  marker: {},
@@ -689,18 +696,18 @@ var Me = { class: "indicator-selector" }, Ne = { class: "indicator-scroll-contai
689
696
  left: `${t.pos.x + 12}px`,
690
697
  top: `${t.pos.y + 12}px`
691
698
  })
692
- }, [s("div", Vt, D(f.value), 1), m.value ? (S(), o("div", Ht, [(S(!0), o(e, null, w(p.value, (e, t) => (S(), o("div", {
699
+ }, [s("div", Ut, D(f.value), 1), m.value ? (S(), o("div", Wt, [(S(!0), o(e, null, w(p.value, (e, t) => (S(), o("div", {
693
700
  key: t,
694
701
  class: "row"
695
702
  }, [s("span", null, D(t), 1), s("span", null, D(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
696
703
  }
697
- }), [["__scopeId", "data-v-057b55c9"]]), Wt = {
704
+ }), [["__scopeId", "data-v-f56bc484"]]), Kt = {
698
705
  viewBox: "0 0 24 24",
699
706
  width: "1.2em",
700
707
  height: "1.2em"
701
708
  };
702
- function Gt(e, t) {
703
- return S(), o("svg", Wt, [...t[0] ||= [s("path", {
709
+ function qt(e, t) {
710
+ return S(), o("svg", Kt, [...t[0] ||= [s("path", {
704
711
  fill: "none",
705
712
  stroke: "currentColor",
706
713
  "stroke-linecap": "round",
@@ -709,16 +716,16 @@ function Gt(e, t) {
709
716
  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"
710
717
  }, null, -1)]]);
711
718
  }
712
- var Kt = m({
719
+ var Jt = m({
713
720
  name: "tabler-pointer",
714
- render: Gt
715
- }), qt = {
721
+ render: qt
722
+ }), Yt = {
716
723
  viewBox: "0 0 24 24",
717
724
  width: "1.2em",
718
725
  height: "1.2em"
719
726
  };
720
- function Jt(e, t) {
721
- return S(), o("svg", qt, [...t[0] ||= [s("path", {
727
+ function Xt(e, t) {
728
+ return S(), o("svg", Yt, [...t[0] ||= [s("path", {
722
729
  fill: "none",
723
730
  stroke: "currentColor",
724
731
  "stroke-linecap": "round",
@@ -727,16 +734,16 @@ function Jt(e, t) {
727
734
  d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
728
735
  }, null, -1)]]);
729
736
  }
730
- var Yt = m({
737
+ var Zt = m({
731
738
  name: "tabler-chart-line",
732
- render: Jt
733
- }), Xt = {
739
+ render: Xt
740
+ }), Qt = {
734
741
  viewBox: "0 0 24 24",
735
742
  width: "1.2em",
736
743
  height: "1.2em"
737
744
  };
738
- function Zt(e, t) {
739
- return S(), o("svg", Xt, [...t[0] ||= [s("path", {
745
+ function $t(e, t) {
746
+ return S(), o("svg", Qt, [...t[0] ||= [s("path", {
740
747
  fill: "none",
741
748
  stroke: "currentColor",
742
749
  "stroke-linecap": "round",
@@ -745,16 +752,16 @@ function Zt(e, t) {
745
752
  d: "M17 7L7 17M8 7h9v9"
746
753
  }, null, -1)]]);
747
754
  }
748
- var Qt = m({
755
+ var en = m({
749
756
  name: "tabler-arrow-up-right",
750
- render: Zt
751
- }), $t = {
757
+ render: $t
758
+ }), tn = {
752
759
  viewBox: "0 0 24 24",
753
760
  width: "1.2em",
754
761
  height: "1.2em"
755
762
  };
756
- function en(e, t) {
757
- return S(), o("svg", $t, [...t[0] ||= [s("path", {
763
+ function nn(e, t) {
764
+ return S(), o("svg", tn, [...t[0] ||= [s("path", {
758
765
  fill: "none",
759
766
  stroke: "currentColor",
760
767
  "stroke-linecap": "round",
@@ -763,16 +770,16 @@ function en(e, t) {
763
770
  d: "M5 12h14m-6 6l6-6m-6-6l6 6"
764
771
  }, null, -1)]]);
765
772
  }
766
- var tn = m({
773
+ var rn = m({
767
774
  name: "tabler-arrow-right",
768
- render: en
769
- }), nn = {
775
+ render: nn
776
+ }), an = {
770
777
  viewBox: "0 0 24 24",
771
778
  width: "1.2em",
772
779
  height: "1.2em"
773
780
  };
774
- function rn(e, t) {
775
- return S(), o("svg", nn, [...t[0] ||= [s("path", {
781
+ function on(e, t) {
782
+ return S(), o("svg", an, [...t[0] ||= [s("path", {
776
783
  fill: "none",
777
784
  stroke: "currentColor",
778
785
  "stroke-linecap": "round",
@@ -781,16 +788,16 @@ function rn(e, t) {
781
788
  d: "M5 12h14"
782
789
  }, null, -1)]]);
783
790
  }
784
- var an = m({
791
+ var sn = m({
785
792
  name: "tabler-minus",
786
- render: rn
787
- }), on = {
793
+ render: on
794
+ }), cn = {
788
795
  viewBox: "0 0 24 24",
789
796
  width: "1.2em",
790
797
  height: "1.2em"
791
798
  };
792
- function sn(e, t) {
793
- return S(), o("svg", on, [...t[0] ||= [s("path", {
799
+ function ln(e, t) {
800
+ return S(), o("svg", cn, [...t[0] ||= [s("path", {
794
801
  fill: "none",
795
802
  stroke: "currentColor",
796
803
  "stroke-linecap": "round",
@@ -799,16 +806,16 @@ function sn(e, t) {
799
806
  d: "M3 12v.01M7 12h10m4 0v.01"
800
807
  }, null, -1)]]);
801
808
  }
802
- var cn = m({
809
+ var un = m({
803
810
  name: "tabler-separator",
804
- render: sn
805
- }), ln = {
811
+ render: ln
812
+ }), dn = {
806
813
  viewBox: "0 0 24 24",
807
814
  width: "1.2em",
808
815
  height: "1.2em"
809
816
  };
810
- function un(e, t) {
811
- return S(), o("svg", ln, [...t[0] ||= [s("path", {
817
+ function fn(e, t) {
818
+ return S(), o("svg", dn, [...t[0] ||= [s("path", {
812
819
  fill: "none",
813
820
  stroke: "currentColor",
814
821
  "stroke-linecap": "round",
@@ -817,16 +824,16 @@ function un(e, t) {
817
824
  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"
818
825
  }, null, -1)]]);
819
826
  }
820
- var dn = m({
827
+ var pn = m({
821
828
  name: "tabler-crosshair",
822
- render: un
823
- }), fn = {
829
+ render: fn
830
+ }), mn = {
824
831
  viewBox: "0 0 24 24",
825
832
  width: "1.2em",
826
833
  height: "1.2em"
827
834
  };
828
- function pn(e, t) {
829
- return S(), o("svg", fn, [...t[0] ||= [s("g", {
835
+ function hn(e, t) {
836
+ return S(), o("svg", mn, [...t[0] ||= [s("g", {
830
837
  fill: "none",
831
838
  stroke: "currentColor",
832
839
  "stroke-linecap": "round",
@@ -834,16 +841,16 @@ function pn(e, t) {
834
841
  "stroke-width": "2"
835
842
  }, [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)]]);
836
843
  }
837
- var mn = m({
844
+ var gn = m({
838
845
  name: "tabler-info-circle",
839
- render: pn
840
- }), hn = {
846
+ render: hn
847
+ }), _n = {
841
848
  viewBox: "0 0 24 24",
842
849
  width: "1.2em",
843
850
  height: "1.2em"
844
851
  };
845
- function gn(e, t) {
846
- return S(), o("svg", hn, [...t[0] ||= [s("path", {
852
+ function vn(e, t) {
853
+ return S(), o("svg", _n, [...t[0] ||= [s("path", {
847
854
  fill: "none",
848
855
  stroke: "currentColor",
849
856
  "stroke-linecap": "round",
@@ -852,16 +859,16 @@ function gn(e, t) {
852
859
  d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
853
860
  }, null, -1)]]);
854
861
  }
855
- var _n = m({
862
+ var yn = m({
856
863
  name: "tabler-zoom-in",
857
- render: gn
858
- }), vn = {
864
+ render: vn
865
+ }), bn = {
859
866
  viewBox: "0 0 24 24",
860
867
  width: "1.2em",
861
868
  height: "1.2em"
862
869
  };
863
- function yn(e, t) {
864
- return S(), o("svg", vn, [...t[0] ||= [s("path", {
870
+ function xn(e, t) {
871
+ return S(), o("svg", bn, [...t[0] ||= [s("path", {
865
872
  fill: "none",
866
873
  stroke: "currentColor",
867
874
  "stroke-linecap": "round",
@@ -870,16 +877,16 @@ function yn(e, t) {
870
877
  d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
871
878
  }, null, -1)]]);
872
879
  }
873
- var bn = m({
880
+ var Sn = m({
874
881
  name: "tabler-zoom-out",
875
- render: yn
876
- }), xn = {
882
+ render: xn
883
+ }), Cn = {
877
884
  viewBox: "0 0 24 24",
878
885
  width: "1.2em",
879
886
  height: "1.2em"
880
887
  };
881
- function Sn(e, t) {
882
- return S(), o("svg", xn, [...t[0] ||= [s("path", {
888
+ function wn(e, t) {
889
+ return S(), o("svg", Cn, [...t[0] ||= [s("path", {
883
890
  fill: "none",
884
891
  stroke: "currentColor",
885
892
  "stroke-linecap": "round",
@@ -888,16 +895,16 @@ function Sn(e, t) {
888
895
  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"
889
896
  }, null, -1)]]);
890
897
  }
891
- var Cn = m({
898
+ var Tn = m({
892
899
  name: "tabler-maximize",
893
- render: Sn
894
- }), wn = {
900
+ render: wn
901
+ }), En = {
895
902
  viewBox: "0 0 24 24",
896
903
  width: "1.2em",
897
904
  height: "1.2em"
898
905
  };
899
- function Tn(e, t) {
900
- return S(), o("svg", wn, [...t[0] ||= [s("path", {
906
+ function Dn(e, t) {
907
+ return S(), o("svg", En, [...t[0] ||= [s("path", {
901
908
  fill: "none",
902
909
  stroke: "currentColor",
903
910
  "stroke-linecap": "round",
@@ -906,16 +913,16 @@ function Tn(e, t) {
906
913
  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"
907
914
  }, null, -1)]]);
908
915
  }
909
- var En = m({
916
+ var On = m({
910
917
  name: "tabler-minimize",
911
- render: Tn
912
- }), Dn = {
918
+ render: Dn
919
+ }), kn = {
913
920
  viewBox: "0 0 24 24",
914
921
  width: "1.2em",
915
922
  height: "1.2em"
916
923
  };
917
- function On(e, t) {
918
- return S(), o("svg", Dn, [...t[0] ||= [s("g", {
924
+ function An(e, t) {
925
+ return S(), o("svg", kn, [...t[0] ||= [s("g", {
919
926
  fill: "none",
920
927
  stroke: "currentColor",
921
928
  "stroke-linecap": "round",
@@ -923,16 +930,16 @@ function On(e, t) {
923
930
  "stroke-width": "2"
924
931
  }, [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)]]);
925
932
  }
926
- var kn = m({
933
+ var jn = m({
927
934
  name: "tabler-settings",
928
- render: On
929
- }), An = {
935
+ render: An
936
+ }), Mn = {
930
937
  viewBox: "0 0 24 24",
931
938
  width: "1.2em",
932
939
  height: "1.2em"
933
940
  };
934
- function jn(e, t) {
935
- return S(), o("svg", An, [...t[0] ||= [s("path", {
941
+ function Nn(e, t) {
942
+ return S(), o("svg", Mn, [...t[0] ||= [s("path", {
936
943
  fill: "none",
937
944
  stroke: "currentColor",
938
945
  "stroke-linecap": "round",
@@ -941,16 +948,16 @@ function jn(e, t) {
941
948
  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"
942
949
  }, null, -1)]]);
943
950
  }
944
- var Mn = m({
951
+ var Pn = m({
945
952
  name: "tabler-shape",
946
- render: jn
947
- }), Nn = {
953
+ render: Nn
954
+ }), Fn = {
948
955
  viewBox: "0 0 24 24",
949
956
  width: "1.2em",
950
957
  height: "1.2em"
951
958
  };
952
- function Pn(e, t) {
953
- return S(), o("svg", Nn, [...t[0] ||= [s("path", {
959
+ function In(e, t) {
960
+ return S(), o("svg", Fn, [...t[0] ||= [s("path", {
954
961
  fill: "none",
955
962
  stroke: "currentColor",
956
963
  "stroke-linecap": "round",
@@ -959,16 +966,16 @@ function Pn(e, t) {
959
966
  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"
960
967
  }, null, -1)]]);
961
968
  }
962
- var Fn = m({
969
+ var Ln = m({
963
970
  name: "tabler-chart-dots-3",
964
- render: Pn
965
- }), In = {
971
+ render: In
972
+ }), Rn = {
966
973
  viewBox: "0 0 24 24",
967
974
  width: "1.2em",
968
975
  height: "1.2em"
969
976
  };
970
- function Ln(e, t) {
971
- return S(), o("svg", In, [...t[0] ||= [s("path", {
977
+ function zn(e, t) {
978
+ return S(), o("svg", Rn, [...t[0] ||= [s("path", {
972
979
  fill: "none",
973
980
  stroke: "currentColor",
974
981
  "stroke-linecap": "round",
@@ -977,16 +984,16 @@ function Ln(e, t) {
977
984
  d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
978
985
  }, null, -1)]]);
979
986
  }
980
- var Rn = m({
987
+ var Bn = m({
981
988
  name: "tabler-caret-up-down",
982
- render: Ln
983
- }), zn = {
989
+ render: zn
990
+ }), Vn = {
984
991
  viewBox: "0 0 24 24",
985
992
  width: "1.2em",
986
993
  height: "1.2em"
987
994
  };
988
- function Bn(e, t) {
989
- return S(), o("svg", zn, [...t[0] ||= [s("path", {
995
+ function Hn(e, t) {
996
+ return S(), o("svg", Vn, [...t[0] ||= [s("path", {
990
997
  fill: "none",
991
998
  stroke: "currentColor",
992
999
  "stroke-linecap": "round",
@@ -995,34 +1002,34 @@ function Bn(e, t) {
995
1002
  d: "M8 4H5v16h3m8-16h3v16h-3"
996
1003
  }, null, -1)]]);
997
1004
  }
998
- var Vn = m({
1005
+ var Un = m({
999
1006
  name: "tabler-brackets",
1000
- render: Bn
1007
+ render: Hn
1001
1008
  });
1002
1009
  //#endregion
1003
1010
  //#region src/debug/canvasProfiler.ts
1004
- function Hn() {
1011
+ function Wn() {
1005
1012
  return Object.create(null);
1006
1013
  }
1007
- function Un() {
1014
+ function Gn() {
1008
1015
  return {
1009
- ctxMethods: Hn(),
1010
- ctxProps: Hn(),
1011
- canvasProps: Hn(),
1016
+ ctxMethods: Wn(),
1017
+ ctxProps: Wn(),
1018
+ canvasProps: Wn(),
1012
1019
  ctxMethodSources: Object.create(null)
1013
1020
  };
1014
1021
  }
1015
- function Wn(e, t, n) {
1022
+ function Kn(e, t, n) {
1016
1023
  let r = e[t] ??= {
1017
1024
  count: 0,
1018
1025
  totalTime: 0
1019
1026
  };
1020
1027
  r.count += 1, r.totalTime += n;
1021
1028
  }
1022
- function Gn(e, t, n, r) {
1023
- Wn(e.ctxMethodSources[t] ??= Hn(), n, r);
1029
+ function qn(e, t, n, r) {
1030
+ Kn(e.ctxMethodSources[t] ??= Wn(), n, r);
1024
1031
  }
1025
- function Kn(e) {
1032
+ function Jn(e) {
1026
1033
  return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
1027
1034
  name: e,
1028
1035
  count: t.count,
@@ -1030,12 +1037,12 @@ function Kn(e) {
1030
1037
  averageTime: (t.totalTime / t.count).toFixed(4)
1031
1038
  })).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
1032
1039
  }
1033
- var qn = !1, Jn = /* @__PURE__ */ new Map(), Yn = /* @__PURE__ */ new Map();
1034
- function Xn(e) {
1035
- qn = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && $n() : er();
1040
+ var Yn = !1, Xn = /* @__PURE__ */ new Map(), Zn = /* @__PURE__ */ new Map();
1041
+ function Qn(e) {
1042
+ Yn = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && tr() : nr();
1036
1043
  }
1037
- function Zn() {
1038
- if (!qn) return "disabled";
1044
+ function $n() {
1045
+ if (!Yn) return "disabled";
1039
1046
  let e = (/* @__PURE__ */ Error()).stack;
1040
1047
  if (!e) return "unknown";
1041
1048
  let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
@@ -1048,82 +1055,82 @@ function Zn() {
1048
1055
  }
1049
1056
  return "unknown";
1050
1057
  }
1051
- function $(e, t, n, r) {
1058
+ function Q(e, t, n, r) {
1052
1059
  let i = `${e.constructor?.name ?? "proto"}:${t}`;
1053
- if (Jn.has(i)) return;
1060
+ if (Xn.has(i)) return;
1054
1061
  let a = Reflect.get(e, t);
1055
- typeof a == "function" && (Jn.set(i, a), Reflect.set(e, t, function(...e) {
1056
- if (!qn) return a.apply(this, e);
1057
- let i = r?.captureSource ? Zn() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
1058
- return Wn(n.ctxMethods, t, c), i && Gn(n, t, i, c), s;
1062
+ typeof a == "function" && (Xn.set(i, a), Reflect.set(e, t, function(...e) {
1063
+ if (!Yn) return a.apply(this, e);
1064
+ let i = r?.captureSource ? $n() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
1065
+ return Kn(n.ctxMethods, t, c), i && qn(n, t, i, c), s;
1059
1066
  }));
1060
1067
  }
1061
- function Qn(e, t, n) {
1068
+ function er(e, t, n) {
1062
1069
  let r = Object.getOwnPropertyDescriptor(e, t);
1063
1070
  if (!r?.set || !r.configurable) return;
1064
1071
  let i = `${e.constructor?.name ?? "proto"}:${t}`;
1065
- Yn.has(i) || (Yn.set(i, r), Object.defineProperty(e, t, {
1072
+ Zn.has(i) || (Zn.set(i, r), Object.defineProperty(e, t, {
1066
1073
  configurable: !0,
1067
1074
  enumerable: r.enumerable ?? !1,
1068
1075
  get: r.get,
1069
1076
  set(e) {
1070
- if (!qn) {
1077
+ if (!Yn) {
1071
1078
  r.set.call(this, e);
1072
1079
  return;
1073
1080
  }
1074
1081
  let i = performance.now();
1075
- r.set.call(this, e), Wn(n, t, performance.now() - i);
1082
+ r.set.call(this, e), Kn(n, t, performance.now() - i);
1076
1083
  }
1077
1084
  }));
1078
1085
  }
1079
- function $n() {
1086
+ function tr() {
1080
1087
  if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
1081
1088
  let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
1082
1089
  if (!e || !t) return;
1083
- let n = Un();
1084
- $(e, "fillText", n, { captureSource: !0 }), $(e, "measureText", n, { captureSource: !0 }), $(e, "drawImage", n), $(e, "save", n), $(e, "restore", n), $(e, "clip", n), $(e, "setTransform", n), $(e, "scale", n), Qn(e, "font", n.ctxProps), Qn(e, "filter", n.ctxProps), Qn(e, "shadowBlur", n.ctxProps), Qn(e, "lineWidth", n.ctxProps), Qn(t, "width", n.canvasProps), Qn(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
1090
+ let n = Gn();
1091
+ 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), er(e, "font", n.ctxProps), er(e, "filter", n.ctxProps), er(e, "shadowBlur", n.ctxProps), er(e, "lineWidth", n.ctxProps), er(t, "width", n.canvasProps), er(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
1085
1092
  let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
1086
1093
  if (e) {
1087
- console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(Kn(e.ctxMethods)), console.log("ctx props"), console.table(Kn(e.ctxProps)), console.log("canvas props"), console.table(Kn(e.canvasProps));
1094
+ console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(Jn(e.ctxMethods)), console.log("ctx props"), console.table(Jn(e.ctxProps)), console.log("canvas props"), console.table(Jn(e.canvasProps));
1088
1095
  for (let t of ["fillText", "measureText"]) {
1089
1096
  let n = e.ctxMethodSources[t];
1090
- n && (console.log(`${t} sources`), console.table(Kn(n).slice(0, 20)));
1097
+ n && (console.log(`${t} sources`), console.table(Jn(n).slice(0, 20)));
1091
1098
  }
1092
1099
  console.groupEnd();
1093
1100
  }
1094
1101
  }, window.resetCanvasReport = () => {
1095
- window.__KMAP_CANVAS_PROFILER_METRICS__ = Un();
1102
+ window.__KMAP_CANVAS_PROFILER_METRICS__ = Gn();
1096
1103
  }, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
1097
1104
  }
1098
- function er() {
1105
+ function nr() {
1099
1106
  if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
1100
1107
  let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
1101
- Jn.forEach((n, r) => {
1108
+ Xn.forEach((n, r) => {
1102
1109
  let i = r.match(/^(.+):(.+)$/);
1103
1110
  if (!i) return;
1104
1111
  let [, a, o] = i, s = null;
1105
1112
  a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
1106
- }), Jn.clear(), Yn.forEach((n, r) => {
1113
+ }), Xn.clear(), Zn.forEach((n, r) => {
1107
1114
  let i = r.match(/^(.+):(.+)$/);
1108
1115
  if (!i) return;
1109
1116
  let [, a, o] = i, s = null;
1110
1117
  a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
1111
- }), Yn.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.");
1118
+ }), Zn.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.");
1112
1119
  }
1113
1120
  //#endregion
1114
1121
  //#region src/components/LeftToolbar.vue?vue&type=script&setup=true&lang.ts
1115
- var tr = {
1122
+ var rr = {
1116
1123
  class: "left-toolbar",
1117
1124
  "aria-label": "图表工具栏"
1118
- }, nr = { class: "left-toolbar__group" }, rr = [
1125
+ }, ir = { class: "left-toolbar__group" }, ar = [
1119
1126
  "title",
1120
1127
  "aria-label",
1121
1128
  "onClick"
1122
- ], ir = ["onClick"], ar = [
1129
+ ], or = ["onClick"], sr = [
1123
1130
  "title",
1124
1131
  "aria-label",
1125
1132
  "onClick"
1126
- ], or = { class: "left-toolbar__group" }, sr = { class: "left-toolbar__group" }, cr = ["title", "aria-label"], lr = { class: "left-toolbar__group" }, ur = { class: "settings-body" }, dr = { class: "settings-label" }, fr = ["onUpdate:modelValue"], pr = ["onUpdate:modelValue"], mr = ["value"], hr = { class: "settings-label" }, gr = ["onUpdate:modelValue"], _r = ["onUpdate:modelValue"], vr = ["value"], yr = /* @__PURE__ */ q(/* @__PURE__ */ u({
1133
+ ], cr = { class: "left-toolbar__group" }, lr = { class: "left-toolbar__group" }, ur = ["title", "aria-label"], dr = { class: "left-toolbar__group" }, fr = { class: "settings-body" }, pr = { class: "settings-label" }, mr = ["onUpdate:modelValue"], hr = ["onUpdate:modelValue"], gr = ["value"], _r = { class: "settings-label" }, vr = ["onUpdate:modelValue"], yr = ["onUpdate:modelValue"], br = ["value"], xr = /* @__PURE__ */ q(/* @__PURE__ */ u({
1127
1134
  __name: "LeftToolbar",
1128
1135
  props: { isFullscreen: { type: Boolean } },
1129
1136
  emits: [
@@ -1138,197 +1145,197 @@ var tr = {
1138
1145
  {
1139
1146
  id: "cursor",
1140
1147
  title: "光标",
1141
- icon: Kt
1148
+ icon: Jt
1142
1149
  },
1143
1150
  {
1144
1151
  id: "lines",
1145
1152
  title: "线条",
1146
- icon: Yt,
1153
+ icon: Zt,
1147
1154
  children: [
1148
1155
  {
1149
1156
  id: "trend-line",
1150
1157
  title: "线段",
1151
- icon: Yt
1158
+ icon: Zt
1152
1159
  },
1153
1160
  {
1154
1161
  id: "ray",
1155
1162
  title: "射线",
1156
- icon: Qt
1163
+ icon: en
1157
1164
  },
1158
1165
  {
1159
1166
  id: "h-line",
1160
1167
  title: "水平线",
1161
- icon: an
1168
+ icon: sn
1162
1169
  },
1163
1170
  {
1164
1171
  id: "h-ray",
1165
1172
  title: "水平射线",
1166
- icon: tn
1173
+ icon: rn
1167
1174
  },
1168
1175
  {
1169
1176
  id: "v-line",
1170
1177
  title: "垂直线",
1171
- icon: cn
1178
+ icon: un
1172
1179
  },
1173
1180
  {
1174
1181
  id: "crosshair-line",
1175
1182
  title: "十字线",
1176
- icon: dn
1183
+ icon: pn
1177
1184
  },
1178
1185
  {
1179
1186
  id: "info-line",
1180
1187
  title: "信息线",
1181
- icon: mn
1188
+ icon: gn
1182
1189
  }
1183
1190
  ]
1184
1191
  },
1185
1192
  {
1186
1193
  id: "channels",
1187
1194
  title: "通道",
1188
- icon: Mn,
1195
+ icon: Pn,
1189
1196
  children: [
1190
1197
  {
1191
1198
  id: "parallel-channel",
1192
1199
  title: "平行通道",
1193
- icon: Mn
1200
+ icon: Pn
1194
1201
  },
1195
1202
  {
1196
1203
  id: "regression-channel",
1197
1204
  title: "回归趋势",
1198
- icon: Fn
1205
+ icon: Ln
1199
1206
  },
1200
1207
  {
1201
1208
  id: "flat-line",
1202
1209
  title: "平滑顶底",
1203
- icon: Rn
1210
+ icon: Bn
1204
1211
  },
1205
1212
  {
1206
1213
  id: "disjoint-channel",
1207
1214
  title: "不相交通道",
1208
- icon: Vn
1215
+ icon: Un
1209
1216
  }
1210
1217
  ]
1211
1218
  }
1212
- ], m = f, h = C("cursor"), _ = C(null), v = C(!1), b = je(), E = r(() => U.filter((e) => e.group === "main")), j = r(() => U.filter((e) => e.group === "experimental"));
1213
- function M() {
1219
+ ], m = f, h = C("cursor"), _ = C(null), v = C(!1), b = je(), E = r(() => G.filter((e) => e.group === "main")), j = r(() => G.filter((e) => e.group === "experimental"));
1220
+ function F() {
1214
1221
  try {
1215
1222
  let e = localStorage.getItem(se);
1216
1223
  if (e) {
1217
1224
  let t = JSON.parse(e), n = {};
1218
- return U.forEach((e) => {
1225
+ return G.forEach((e) => {
1219
1226
  n[e.key] = t[e.key] ?? e.default;
1220
1227
  }), n;
1221
1228
  }
1222
1229
  } catch {}
1223
1230
  let e = {};
1224
- return U.forEach((t) => {
1231
+ return G.forEach((t) => {
1225
1232
  e[t.key] = t.default;
1226
1233
  }), e;
1227
1234
  }
1228
- function ee(e) {
1235
+ function I(e) {
1229
1236
  try {
1230
1237
  localStorage.setItem(se, JSON.stringify(e));
1231
1238
  } catch {}
1232
1239
  }
1233
- let I = C(M()), L = C({ ...I.value });
1234
- function te(e) {
1240
+ let L = C(F()), R = C({ ...L.value });
1241
+ function z(e) {
1235
1242
  return h.value === e.id ? !0 : e.children ? e.children.some((e) => e.id === h.value) : !1;
1236
1243
  }
1237
- function R(e) {
1244
+ function B(e) {
1238
1245
  if (e.children?.length) {
1239
1246
  if (!e.children.some((e) => e.id === h.value)) {
1240
1247
  let t = e.children[0];
1241
1248
  h.value = t.id, m("selectTool", t.id);
1242
1249
  }
1243
- z(e.id);
1250
+ V(e.id);
1244
1251
  return;
1245
1252
  }
1246
1253
  h.value = e.id, m("selectTool", e.id), _.value = null;
1247
1254
  }
1248
- function ne(e) {
1255
+ function ee(e) {
1249
1256
  h.value = e.id, m("selectTool", e.id), _.value = null;
1250
1257
  }
1251
- function z(e) {
1258
+ function V(e) {
1252
1259
  _.value = _.value === e ? null : e;
1253
1260
  }
1254
- function re() {
1255
- L.value = { ...I.value }, v.value = !0;
1261
+ function te() {
1262
+ R.value = { ...L.value }, v.value = !0;
1256
1263
  }
1257
- function ie() {
1264
+ function H() {
1258
1265
  v.value = !1;
1259
1266
  }
1260
- function B() {
1267
+ function ne() {
1261
1268
  let e = {};
1262
- U.forEach((t) => {
1269
+ G.forEach((t) => {
1263
1270
  e[t.key] = t.default;
1264
- }), L.value = e;
1271
+ }), R.value = e;
1265
1272
  }
1266
- function V() {
1267
- I.value = { ...L.value }, ee(I.value), Xn(!!I.value.enableCanvasProfiler), m("settingsChange", { ...I.value }), ie();
1273
+ function U() {
1274
+ L.value = { ...R.value }, I(L.value), Qn(!!L.value.enableCanvasProfiler), m("settingsChange", { ...L.value }), H();
1268
1275
  }
1269
- function ae() {
1270
- return { ...I.value };
1276
+ function re() {
1277
+ return { ...L.value };
1271
1278
  }
1272
- d({ getSettings: ae });
1273
- function H(e) {
1279
+ d({ getSettings: re });
1280
+ function W(e) {
1274
1281
  e.target.closest(".tool-item") || (_.value = null);
1275
1282
  }
1276
1283
  return y(() => {
1277
- document.addEventListener("click", H, !0), m("settingsChange", { ...I.value }), Xn(!!I.value.enableCanvasProfiler);
1284
+ document.addEventListener("click", W, !0), m("settingsChange", { ...L.value }), Qn(!!L.value.enableCanvasProfiler);
1278
1285
  }), x(() => {
1279
- document.removeEventListener("click", H, !0);
1280
- }), (r, d) => (S(), o(e, null, [s("nav", tr, [
1281
- s("div", nr, [(S(), o(e, null, w(p, (t) => s("div", {
1286
+ document.removeEventListener("click", W, !0);
1287
+ }), (r, d) => (S(), o(e, null, [s("nav", rr, [
1288
+ s("div", ir, [(S(), o(e, null, w(p, (t) => s("div", {
1282
1289
  key: t.id,
1283
1290
  class: "tool-item"
1284
1291
  }, [s("button", {
1285
1292
  type: "button",
1286
- class: g(["left-toolbar__button", { active: te(t) }]),
1293
+ class: g(["left-toolbar__button", { active: z(t) }]),
1287
1294
  title: t.title,
1288
1295
  "aria-label": t.title,
1289
- onClick: (e) => R(t),
1290
- onPointerdown: d[0] ||= F(() => {}, ["stop"]),
1291
- onPointermove: d[1] ||= F(() => {}, ["stop"]),
1292
- onPointerup: d[2] ||= F(() => {}, ["stop"])
1296
+ onClick: (e) => B(t),
1297
+ onPointerdown: d[0] ||= P(() => {}, ["stop"]),
1298
+ onPointermove: d[1] ||= P(() => {}, ["stop"]),
1299
+ onPointerup: d[2] ||= P(() => {}, ["stop"])
1293
1300
  }, [(S(), i(T(t.icon), {
1294
1301
  class: "tool-icon",
1295
1302
  "aria-hidden": "true"
1296
1303
  })), t.children && t.children.length ? (S(), o("span", {
1297
1304
  key: 0,
1298
1305
  class: g(["corner-indicator", { open: _.value === t.id }]),
1299
- onClick: F((e) => z(t.id), ["stop"]),
1306
+ onClick: P((e) => V(t.id), ["stop"]),
1300
1307
  "aria-label": "展开子菜单"
1301
- }, null, 10, ir)) : a("", !0)], 42, rr), l(n, { name: "dropdown" }, {
1302
- default: N(() => [_.value === t.id && t.children && t.children.length ? (S(), o("div", {
1308
+ }, null, 10, or)) : a("", !0)], 42, ar), l(n, { name: "dropdown" }, {
1309
+ default: M(() => [_.value === t.id && t.children && t.children.length ? (S(), o("div", {
1303
1310
  key: 0,
1304
1311
  class: "tool-dropdown",
1305
- onPointerdown: d[3] ||= F(() => {}, ["stop"]),
1306
- onPointermove: d[4] ||= F(() => {}, ["stop"]),
1307
- onPointerup: d[5] ||= F(() => {}, ["stop"])
1312
+ onPointerdown: d[3] ||= P(() => {}, ["stop"]),
1313
+ onPointermove: d[4] ||= P(() => {}, ["stop"]),
1314
+ onPointerup: d[5] ||= P(() => {}, ["stop"])
1308
1315
  }, [(S(!0), o(e, null, w(t.children, (e) => (S(), o("button", {
1309
1316
  key: e.id,
1310
1317
  type: "button",
1311
1318
  class: g(["left-toolbar__button", { active: h.value === e.id }]),
1312
1319
  title: e.title,
1313
1320
  "aria-label": e.title,
1314
- onClick: (t) => ne(e)
1321
+ onClick: (t) => ee(e)
1315
1322
  }, [(S(), i(T(e.icon), {
1316
1323
  class: "tool-icon",
1317
1324
  "aria-hidden": "true"
1318
- }))], 10, ar))), 128))], 32)) : a("", !0)]),
1325
+ }))], 10, sr))), 128))], 32)) : a("", !0)]),
1319
1326
  _: 2
1320
1327
  }, 1024)])), 64))]),
1321
1328
  d[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
1322
- s("div", or, [s("button", {
1329
+ s("div", cr, [s("button", {
1323
1330
  type: "button",
1324
1331
  class: "left-toolbar__button",
1325
1332
  title: "放大",
1326
1333
  "aria-label": "放大",
1327
1334
  onClick: d[6] ||= (e) => r.$emit("zoomIn"),
1328
- onPointerdown: d[7] ||= F(() => {}, ["stop"]),
1329
- onPointermove: d[8] ||= F(() => {}, ["stop"]),
1330
- onPointerup: d[9] ||= F(() => {}, ["stop"])
1331
- }, [l(O(_n), {
1335
+ onPointerdown: d[7] ||= P(() => {}, ["stop"]),
1336
+ onPointermove: d[8] ||= P(() => {}, ["stop"]),
1337
+ onPointerup: d[9] ||= P(() => {}, ["stop"])
1338
+ }, [l(O(yn), {
1332
1339
  class: "tool-icon",
1333
1340
  "aria-hidden": "true"
1334
1341
  })], 32), s("button", {
@@ -1337,99 +1344,99 @@ var tr = {
1337
1344
  title: "缩小",
1338
1345
  "aria-label": "缩小",
1339
1346
  onClick: d[10] ||= (e) => r.$emit("zoomOut"),
1340
- onPointerdown: d[11] ||= F(() => {}, ["stop"]),
1341
- onPointermove: d[12] ||= F(() => {}, ["stop"]),
1342
- onPointerup: d[13] ||= F(() => {}, ["stop"])
1343
- }, [l(O(bn), {
1347
+ onPointerdown: d[11] ||= P(() => {}, ["stop"]),
1348
+ onPointermove: d[12] ||= P(() => {}, ["stop"]),
1349
+ onPointerup: d[13] ||= P(() => {}, ["stop"])
1350
+ }, [l(O(Sn), {
1344
1351
  class: "tool-icon",
1345
1352
  "aria-hidden": "true"
1346
1353
  })], 32)]),
1347
1354
  d[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
1348
- s("div", sr, [s("button", {
1355
+ s("div", lr, [s("button", {
1349
1356
  type: "button",
1350
1357
  class: "left-toolbar__button",
1351
1358
  title: u.isFullscreen ? "退出全屏" : "全屏显示",
1352
1359
  "aria-label": u.isFullscreen ? "退出全屏" : "全屏显示",
1353
1360
  onClick: d[14] ||= (e) => r.$emit("toggleFullscreen"),
1354
- onPointerdown: d[15] ||= F(() => {}, ["stop"]),
1355
- onPointermove: d[16] ||= F(() => {}, ["stop"]),
1356
- onPointerup: d[17] ||= F(() => {}, ["stop"])
1357
- }, [u.isFullscreen ? (S(), i(O(En), {
1361
+ onPointerdown: d[15] ||= P(() => {}, ["stop"]),
1362
+ onPointermove: d[16] ||= P(() => {}, ["stop"]),
1363
+ onPointerup: d[17] ||= P(() => {}, ["stop"])
1364
+ }, [u.isFullscreen ? (S(), i(O(On), {
1358
1365
  key: 0,
1359
1366
  class: "tool-icon",
1360
1367
  "aria-hidden": "true"
1361
- })) : (S(), i(O(Cn), {
1368
+ })) : (S(), i(O(Tn), {
1362
1369
  key: 1,
1363
1370
  class: "tool-icon",
1364
1371
  "aria-hidden": "true"
1365
- }))], 40, cr)]),
1372
+ }))], 40, ur)]),
1366
1373
  d[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
1367
- s("div", lr, [s("button", {
1374
+ s("div", dr, [s("button", {
1368
1375
  type: "button",
1369
1376
  class: "left-toolbar__button",
1370
1377
  title: "设置",
1371
1378
  "aria-label": "设置",
1372
- onClick: re,
1373
- onPointerdown: d[18] ||= F(() => {}, ["stop"]),
1374
- onPointermove: d[19] ||= F(() => {}, ["stop"]),
1375
- onPointerup: d[20] ||= F(() => {}, ["stop"])
1376
- }, [l(O(kn), {
1379
+ onClick: te,
1380
+ onPointerdown: d[18] ||= P(() => {}, ["stop"]),
1381
+ onPointermove: d[19] ||= P(() => {}, ["stop"]),
1382
+ onPointerup: d[20] ||= P(() => {}, ["stop"])
1383
+ }, [l(O(jn), {
1377
1384
  class: "tool-icon",
1378
1385
  "aria-hidden": "true"
1379
1386
  })], 32)])
1380
1387
  ]), (S(), i(t, { to: O(b) }, [l(n, { name: "overlay" }, {
1381
- default: N(() => [v.value ? (S(), o("div", {
1388
+ default: M(() => [v.value ? (S(), o("div", {
1382
1389
  key: 0,
1383
1390
  class: "settings-overlay",
1384
- onClick: ie
1391
+ onClick: H
1385
1392
  }, [l(n, { name: "modal" }, {
1386
- default: N(() => [s("div", {
1393
+ default: M(() => [s("div", {
1387
1394
  class: "settings-modal",
1388
- onClick: d[21] ||= F(() => {}, ["stop"])
1395
+ onClick: d[21] ||= P(() => {}, ["stop"])
1389
1396
  }, [
1390
1397
  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", {
1391
1398
  class: "settings-close",
1392
- onClick: ie
1399
+ onClick: H
1393
1400
  }, [...d[25] ||= [s("svg", {
1394
1401
  viewBox: "0 0 24 24",
1395
1402
  fill: "none",
1396
1403
  stroke: "currentColor",
1397
1404
  "stroke-width": "2"
1398
1405
  }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
1399
- s("div", ur, [E.value.length > 0 ? (S(), o(e, { key: 0 }, [d[27] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, w(E.value, (t) => (S(), o("div", {
1406
+ s("div", fr, [E.value.length > 0 ? (S(), o(e, { key: 0 }, [d[27] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, w(E.value, (t) => (S(), o("div", {
1400
1407
  key: t.key,
1401
1408
  class: "settings-item"
1402
- }, [s("label", dr, [s("span", null, D(t.label), 1), t.type === "boolean" ? P((S(), o("input", {
1409
+ }, [s("label", pr, [s("span", null, D(t.label), 1), t.type === "boolean" ? N((S(), o("input", {
1403
1410
  key: 0,
1404
1411
  type: "checkbox",
1405
1412
  class: "settings-checkbox",
1406
- "onUpdate:modelValue": (e) => L.value[t.key] = e
1407
- }, null, 8, fr)), [[k, L.value[t.key]]]) : t.type === "select" && t.options ? P((S(), o("select", {
1413
+ "onUpdate:modelValue": (e) => R.value[t.key] = e
1414
+ }, null, 8, mr)), [[k, R.value[t.key]]]) : t.type === "select" && t.options ? N((S(), o("select", {
1408
1415
  key: 1,
1409
1416
  class: "settings-select",
1410
- "onUpdate:modelValue": (e) => L.value[t.key] = e
1417
+ "onUpdate:modelValue": (e) => R.value[t.key] = e
1411
1418
  }, [(S(!0), o(e, null, w(t.options, (e) => (S(), o("option", {
1412
1419
  key: e.value,
1413
1420
  value: e.value
1414
- }, D(e.label), 9, mr))), 128))], 8, pr)), [[A, L.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0), j.value.length > 0 ? (S(), o(e, { key: 1 }, [d[28] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (S(!0), o(e, null, w(j.value, (t) => (S(), o("div", {
1421
+ }, D(e.label), 9, gr))), 128))], 8, hr)), [[A, R.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0), j.value.length > 0 ? (S(), o(e, { key: 1 }, [d[28] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (S(!0), o(e, null, w(j.value, (t) => (S(), o("div", {
1415
1422
  key: t.key,
1416
1423
  class: "settings-item experimental"
1417
- }, [s("label", hr, [s("span", null, D(t.label), 1), t.type === "boolean" ? P((S(), o("input", {
1424
+ }, [s("label", _r, [s("span", null, D(t.label), 1), t.type === "boolean" ? N((S(), o("input", {
1418
1425
  key: 0,
1419
1426
  type: "checkbox",
1420
1427
  class: "settings-checkbox",
1421
- "onUpdate:modelValue": (e) => L.value[t.key] = e
1422
- }, null, 8, gr)), [[k, L.value[t.key]]]) : t.type === "select" && t.options ? P((S(), o("select", {
1428
+ "onUpdate:modelValue": (e) => R.value[t.key] = e
1429
+ }, null, 8, vr)), [[k, R.value[t.key]]]) : t.type === "select" && t.options ? N((S(), o("select", {
1423
1430
  key: 1,
1424
1431
  class: "settings-select",
1425
- "onUpdate:modelValue": (e) => L.value[t.key] = e
1432
+ "onUpdate:modelValue": (e) => R.value[t.key] = e
1426
1433
  }, [(S(!0), o(e, null, w(t.options, (e) => (S(), o("option", {
1427
1434
  key: e.value,
1428
1435
  value: e.value
1429
- }, D(e.label), 9, vr))), 128))], 8, _r)), [[A, L.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0)]),
1436
+ }, D(e.label), 9, br))), 128))], 8, yr)), [[A, R.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0)]),
1430
1437
  s("div", { class: "settings-footer" }, [s("button", {
1431
1438
  class: "settings-btn reset",
1432
- onClick: B
1439
+ onClick: ne
1433
1440
  }, [...d[29] ||= [s("svg", {
1434
1441
  viewBox: "0 0 24 24",
1435
1442
  fill: "none",
@@ -1437,10 +1444,10 @@ var tr = {
1437
1444
  "stroke-width": "2"
1438
1445
  }, [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", {
1439
1446
  class: "settings-btn cancel",
1440
- onClick: ie
1447
+ onClick: H
1441
1448
  }, "取消"), s("button", {
1442
1449
  class: "settings-btn confirm",
1443
- onClick: V
1450
+ onClick: U
1444
1451
  }, [...d[30] ||= [s("svg", {
1445
1452
  viewBox: "0 0 24 24",
1446
1453
  fill: "none",
@@ -1453,10 +1460,10 @@ var tr = {
1453
1460
  _: 1
1454
1461
  })], 8, ["to"]))], 64));
1455
1462
  }
1456
- }), [["__scopeId", "data-v-35cfe78e"]]), br = ["data-theme"], xr = {
1463
+ }), [["__scopeId", "data-v-3e3ffb4f"]]), Sr = ["data-theme"], Cr = {
1457
1464
  class: "pane-separator-layer",
1458
1465
  "aria-hidden": "true"
1459
- }, Sr = 4, Cr = /* @__PURE__ */ q(/* @__PURE__ */ u({
1466
+ }, wr = 4, Tr = /* @__PURE__ */ q(/* @__PURE__ */ u({
1460
1467
  __name: "KLineChart",
1461
1468
  props: {
1462
1469
  semanticConfig: {},
@@ -1476,7 +1483,7 @@ var tr = {
1476
1483
  },
1477
1484
  emits: ["zoomLevelChange", "toggleFullscreen"],
1478
1485
  setup(n, { expose: c, emit: u }) {
1479
- let d = n, f = C(null), p = C(null), m = C(null), v = C(null), b = C(null), T = C(null), D = C(null), k = E(null), A = E(null), j = re({
1486
+ let d = n, f = C(null), p = C(null), m = C(null), v = C(null), b = C(null), T = C(null), D = C(null), k = E(null), A = E(null), M = ne({
1480
1487
  initialZoomLevel: d.initialZoomLevel ?? 1,
1481
1488
  minKWidth: d.minKWidth,
1482
1489
  maxKWidth: d.maxKWidth,
@@ -1484,28 +1491,28 @@ var tr = {
1484
1491
  rightAxisWidth: d.rightAxisWidth,
1485
1492
  priceLabelWidth: d.priceLabelWidth
1486
1493
  }), N = C("light");
1487
- j.actions.setZoomState(j.state.zoomLevel, B(j.state.zoomLevel, {
1494
+ M.actions.setZoomState(M.state.zoomLevel, re(M.state.zoomLevel, {
1488
1495
  minKWidth: d.minKWidth,
1489
1496
  maxKWidth: d.maxKWidth,
1490
1497
  zoomLevelCount: d.zoomLevels,
1491
- dpr: j.state.viewportDpr
1492
- }), ie(B(j.state.zoomLevel, {
1498
+ dpr: M.state.viewportDpr
1499
+ }), U(re(M.state.zoomLevel, {
1493
1500
  minKWidth: d.minKWidth,
1494
1501
  maxKWidth: d.maxKWidth,
1495
1502
  zoomLevelCount: d.zoomLevels,
1496
- dpr: j.state.viewportDpr
1497
- }), j.state.viewportDpr)), r(() => j.state.dataLength), r(() => j.state.viewportDpr);
1498
- let P = r(() => j.state.zoomLevel), F = r(() => j.state.kWidth), ee = r(() => j.state.kGap), I = r(() => j.state.paneRatios), L = r(() => j.state.selectedDrawingId), te = r(() => j.state.dataVersion);
1499
- function U() {
1503
+ dpr: M.state.viewportDpr
1504
+ }), M.state.viewportDpr)), r(() => M.state.dataLength), r(() => M.state.viewportDpr);
1505
+ let P = r(() => M.state.zoomLevel), F = r(() => M.state.kWidth), I = r(() => M.state.kGap), L = r(() => M.state.paneRatios), R = r(() => M.state.selectedDrawingId), z = r(() => M.state.dataVersion);
1506
+ function B() {
1500
1507
  k.value?.scheduleDraw();
1501
1508
  }
1502
- function se(e) {
1509
+ function ee(e) {
1503
1510
  if (k.value?.updateSettings(e), e.performanceTest10kKlines) {
1504
- let e = le();
1505
- console.time("updateData-10k"), k.value?.updateData(e), console.timeEnd("updateData-10k"), j.actions.setDataLength(e.length), j.actions.bumpDataVersion();
1511
+ let e = G();
1512
+ console.time("updateData-10k"), k.value?.updateData(e), console.timeEnd("updateData-10k"), M.actions.setDataLength(e.length), M.actions.bumpDataVersion();
1506
1513
  } else A.value && k.value?.getData()?.length === 1e4 && A.value.applyConfig(d.semanticConfig);
1507
1514
  }
1508
- function le() {
1515
+ function G() {
1509
1516
  let e = [], t = (/* @__PURE__ */ new Date("2020-01-01")).getTime(), n = 3e3;
1510
1517
  for (let r = 0; r < 1e4; r++) {
1511
1518
  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);
@@ -1520,34 +1527,34 @@ var tr = {
1520
1527
  }
1521
1528
  return e;
1522
1529
  }
1523
- function ue(e, t, n) {
1530
+ function se(e, t, n) {
1524
1531
  let r = e.getBoundingClientRect();
1525
1532
  return {
1526
1533
  width: Math.max(t, Math.round(r.width)),
1527
1534
  height: Math.max(n, Math.round(r.height))
1528
1535
  };
1529
1536
  }
1530
- function de(e) {
1537
+ function le(e) {
1531
1538
  e && h(() => {
1532
1539
  if (!e.isConnected) return;
1533
- let t = ue(e, 180, 80);
1540
+ let t = se(e, 180, 80);
1534
1541
  k.value?.interaction.setTooltipSize(t);
1535
1542
  });
1536
1543
  }
1537
- function fe(e) {
1544
+ function ue(e) {
1538
1545
  e && h(() => {
1539
- e.isConnected && (_e.value = ue(e, 120, 60));
1546
+ e.isConnected && (_e.value = se(e, 120, 60));
1540
1547
  });
1541
1548
  }
1542
- let W = C({
1549
+ let de = C({
1543
1550
  x: 0,
1544
1551
  y: 0
1545
- }), G = C(!1), K = null;
1552
+ }), K = C(!1), fe = null;
1546
1553
  function q() {
1547
- K = null;
1554
+ fe = null;
1548
1555
  }
1549
1556
  function me(e) {
1550
- return K ||= e.getBoundingClientRect(), K;
1557
+ return fe ||= e.getBoundingClientRect(), fe;
1551
1558
  }
1552
1559
  let J = E({
1553
1560
  crosshairPos: null,
@@ -1568,8 +1575,8 @@ var tr = {
1568
1575
  hoveredPaneBoundaryId: null,
1569
1576
  isHoveringRightAxis: !1
1570
1577
  }), Y = E(null), he = r(() => {
1571
- let e = L.value;
1572
- return e ? j.state.drawings.find((t) => t.id === e) ?? null : null;
1578
+ let e = R.value;
1579
+ return e ? M.state.drawings.find((t) => t.id === e) ?? null : null;
1573
1580
  }), ge = C([]), _e = C({
1574
1581
  width: 220,
1575
1582
  height: 120
@@ -1585,7 +1592,7 @@ var tr = {
1585
1592
  }), ye = r(() => J.value.hoveredMarkerData), be = r(() => J.value.hoveredCustomMarker), xe = r(() => J.value.isDragging), Se = r(() => J.value.isResizingPaneBoundary), Ce = r(() => J.value.isHoveringPaneBoundary), we = r(() => J.value.hoveredPaneBoundaryId), Te = r(() => J.value.isHoveringRightAxis), Ee = r(() => J.value.hoveredIndex), De = r(() => J.value.crosshairIndex), Oe = r(() => xe.value ? "grabbing" : Se.value || Ce.value ? "ns-resize" : Ee.value === null ? "crosshair" : "pointer"), ke = r(() => {
1586
1593
  let e = J.value.hoveredIndex;
1587
1594
  if (typeof e != "number") return null;
1588
- te.value;
1595
+ z.value;
1589
1596
  let t = k.value?.getData();
1590
1597
  return t && e >= 0 && e < t.length ? t[e] : null;
1591
1598
  }), Ae = r(() => J.value.hoveredIndex), je = r(() => J.value.tooltipPos), Me = r(() => ({
@@ -1595,42 +1602,42 @@ var tr = {
1595
1602
  left: `${Me.value.x}px`,
1596
1603
  top: `${Me.value.y}px`
1597
1604
  })), Pe = r(() => ({
1598
- x: W.value.x + ve.value.x,
1599
- y: W.value.y + ve.value.y
1605
+ x: de.value.x + ve.value.x,
1606
+ y: de.value.y + ve.value.y
1600
1607
  })), Fe = r(() => ({
1601
1608
  left: `${Pe.value.x}px`,
1602
1609
  top: `${Pe.value.y}px`
1603
1610
  })), Ie = r(() => J.value.tooltipAnchorPlacement), Le = r(() => {
1604
1611
  let e = k.value?.getViewport(), t = v.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
1605
- return W.value.x + 12 + _e.value.width + 12 > n ? "left-bottom" : "right-bottom";
1606
- }), Re = r(() => (te.value, k.value?.getData() ?? []));
1612
+ return de.value.x + 12 + _e.value.width + 12 > n ? "left-bottom" : "right-bottom";
1613
+ }), Re = r(() => (z.value, k.value?.getData() ?? []));
1607
1614
  function ze(e) {
1608
1615
  Y.value?.setTool(e);
1609
1616
  }
1610
1617
  function Be(e) {
1611
1618
  let t = he.value;
1612
- !t || !Y.value || (Y.value.updateDrawingStyle(t.id, e), j.actions.bumpDrawingVersion());
1619
+ !t || !Y.value || (Y.value.updateDrawingStyle(t.id, e), M.actions.bumpDrawingVersion());
1613
1620
  }
1614
1621
  function Ve() {
1615
1622
  let e = he.value;
1616
- !e || !Y.value || (Y.value.removeDrawing(e.id), j.actions.setSelectedDrawingId(null), j.actions.bumpDrawingVersion(), j.actions.setDrawings(Y.value.getDrawings()));
1623
+ !e || !Y.value || (Y.value.removeDrawing(e.id), M.actions.setSelectedDrawingId(null), M.actions.bumpDrawingVersion(), M.actions.setDrawings(Y.value.getDrawings()));
1617
1624
  }
1618
1625
  function He(e) {
1619
- k.value?.handlePointerEvent(e, { onPointerDown: (e, t) => Y.value?.onPointerDown(e, t) ? (j.actions.setDrawings(Y.value.getDrawings()), j.actions.bumpDrawingVersion(), !0) : !1 });
1626
+ k.value?.handlePointerEvent(e, { onPointerDown: (e, t) => Y.value?.onPointerDown(e, t) ? (M.actions.setDrawings(Y.value.getDrawings()), M.actions.bumpDrawingVersion(), !0) : !1 });
1620
1627
  }
1621
1628
  function Ue(e) {
1622
1629
  let t = v.value;
1623
1630
  if (t) {
1624
1631
  let n = me(t);
1625
- W.value = {
1632
+ de.value = {
1626
1633
  x: e.clientX - n.left,
1627
1634
  y: e.clientY - n.top
1628
1635
  };
1629
1636
  }
1630
- k.value?.handlePointerEvent(e, { onPointerMove: (e, t) => Y.value?.onPointerMove(e, t) ? (j.actions.setDrawings(Y.value.getDrawings()), !0) : !1 });
1637
+ k.value?.handlePointerEvent(e, { onPointerMove: (e, t) => Y.value?.onPointerMove(e, t) ? (M.actions.setDrawings(Y.value.getDrawings()), !0) : !1 });
1631
1638
  }
1632
1639
  function We(e) {
1633
- k.value?.handlePointerEvent(e, { onPointerUp: (e, t) => Y.value?.onPointerUp(e, t) ? (j.actions.setDrawings(Y.value.getDrawings()), !0) : !1 });
1640
+ k.value?.handlePointerEvent(e, { onPointerUp: (e, t) => Y.value?.onPointerUp(e, t) ? (M.actions.setDrawings(Y.value.getDrawings()), !0) : !1 });
1634
1641
  }
1635
1642
  function Ge(e) {
1636
1643
  k.value?.handlePointerEvent(e);
@@ -1650,14 +1657,14 @@ var tr = {
1650
1657
  function Xe() {
1651
1658
  k.value?.handleScrollEvent();
1652
1659
  }
1653
- let X = C([]), Ze = r(() => {
1660
+ let Ze = C([]), Qe = r(() => {
1654
1661
  let e = [], t = /* @__PURE__ */ new Set();
1655
- for (let n of Q.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
1662
+ for (let n of Z.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
1656
1663
  return e;
1657
- }), Qe = r(() => [...X.value, ...Ze.value]), Z = C({}), Q = C([]);
1658
- function $e() {
1659
- let e = I.value.main ?? 3;
1660
- return Q.value.length === 0 ? [{
1664
+ }), $e = r(() => [...Ze.value, ...Qe.value]), X = C({}), Z = C([]);
1665
+ function et() {
1666
+ let e = L.value.main ?? 3;
1667
+ return Z.value.length === 0 ? [{
1661
1668
  id: "main",
1662
1669
  ratio: e,
1663
1670
  visible: !0,
@@ -1667,117 +1674,79 @@ var tr = {
1667
1674
  ratio: e,
1668
1675
  visible: !0,
1669
1676
  role: "price"
1670
- }, ...Q.value.map((e) => ({
1677
+ }, ...Z.value.map((e) => ({
1671
1678
  id: e.id,
1672
- ratio: I.value[e.id] ?? 1,
1679
+ ratio: L.value[e.id] ?? 1,
1673
1680
  visible: !0,
1674
1681
  role: "indicator"
1675
1682
  }))];
1676
1683
  }
1677
- function et(e) {
1678
- return { ...H[e].defaultParams };
1684
+ function tt(e) {
1685
+ return { ...ae[e].defaultParams };
1679
1686
  }
1680
- let tt = /* @__PURE__ */ new Map(), nt = /* @__PURE__ */ new Map();
1681
- function rt(e, t) {
1687
+ let nt = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Map();
1688
+ function it(e, t) {
1682
1689
  let n = oe({
1683
1690
  paneId: e,
1684
1691
  title: t,
1685
- getTitleInfo: () => ft(e)
1692
+ getTitleInfo: () => pt(e)
1686
1693
  });
1687
- k.value?.useRenderer(n), nt.set(e, n.name);
1694
+ k.value?.useRenderer(n), rt.set(e, n.name);
1688
1695
  }
1689
- function it(e) {
1690
- let t = nt.get(e);
1691
- t && (k.value?.removeRenderer(t), nt.delete(e));
1696
+ function at(e) {
1697
+ let t = rt.get(e);
1698
+ t && (k.value?.removeRenderer(t), rt.delete(e));
1692
1699
  }
1693
- function at(e = "VOLUME", t) {
1694
- if (Q.value.length >= Sr) return !1;
1695
- let n = t ?? et(e), r = k.value?.addIndicator(e, "sub", n);
1696
- return r ? (rt(r, e), Q.value.push({
1697
- id: r,
1698
- indicatorId: e,
1699
- params: n
1700
- }), U(), !0) : !1;
1700
+ function ot(e = "VOLUME", t) {
1701
+ if (Z.value.length >= wr) return !1;
1702
+ let n = t ?? tt(e), r = k.value?.addIndicator(e, "sub", n);
1703
+ return r ? (it(r, e), !0) : !1;
1701
1704
  }
1702
- function ot(e) {
1703
- let t = Q.value.findIndex((t) => t.id === e);
1704
- t !== -1 && Q.value[t] && (it(e), k.value?.removeIndicator(e), Q.value.splice(t, 1));
1705
- }
1706
- function st() {
1707
- for (let e of Q.value) k.value?.removeIndicator(e.id), it(e.id);
1708
- Q.value = [], tt.clear(), nt.clear();
1705
+ function st(e) {
1706
+ at(e), k.value?.removeIndicator(e);
1709
1707
  }
1710
1708
  function ct() {
1709
+ for (let e of Z.value) k.value?.removeIndicator(e.id), at(e.id);
1710
+ nt.clear(), rt.clear();
1711
+ }
1712
+ function lt() {
1711
1713
  let e = d.semanticConfig, t = k.value;
1712
1714
  if (!t) return;
1713
1715
  let n = e.indicators?.main;
1714
- if (n) for (let e of n) e.enabled && (X.value.includes(e.type) || X.value.push(e.type), e.params && (Z.value[e.type] = e.params), t.enableMainIndicator(e.type, e.params));
1715
- }
1716
- M([Qe, Z], ([e]) => {
1717
- let t = k.value;
1718
- t && (t.updateRendererConfig("mainIndicatorLegend", { indicators: {
1719
- MA: {
1720
- enabled: e.includes("MA"),
1721
- params: Z.value.MA || {}
1722
- },
1723
- BOLL: {
1724
- enabled: e.includes("BOLL"),
1725
- params: Z.value.BOLL || {}
1726
- },
1727
- EXPMA: {
1728
- enabled: e.includes("EXPMA"),
1729
- params: Z.value.EXPMA || {}
1730
- },
1731
- ENE: {
1732
- enabled: e.includes("ENE"),
1733
- params: Z.value.ENE || {}
1734
- }
1735
- } }), U());
1736
- }, { deep: !0 });
1737
- function lt() {
1716
+ if (n) for (let e of n) e.enabled && t.enableMainIndicator(e.type, e.params);
1717
+ }
1718
+ function ut() {
1738
1719
  let e = k.value?.getSubPaneEntries() ?? [];
1739
- Q.value = [], nt.clear();
1720
+ rt.clear();
1740
1721
  for (let t of e) {
1741
1722
  let { paneId: e, indicatorId: n, params: r } = t, i = e.match(/^(.+)_(\d+)$/);
1742
1723
  if (i) {
1743
1724
  let [, e, t] = i, n = parseInt(t, 10);
1744
- n >= (tt.get(e) ?? 0) && tt.set(e, n + 1);
1725
+ n >= (nt.get(e) ?? 0) && nt.set(e, n + 1);
1745
1726
  }
1746
- rt(e, n), Q.value.push({
1747
- id: e,
1748
- indicatorId: n,
1749
- params: { ...r }
1750
- });
1727
+ it(e, n);
1751
1728
  }
1752
- U();
1753
- }
1754
- function ut(e, t) {
1755
- if (!Q.value.find((t) => t.id === e)) return;
1756
- let n = et(t);
1757
- it(e), k.value?.replaceSubPaneIndicator(e, t, n), rt(e, t);
1758
- let r = Q.value.findIndex((t) => t.id === e);
1759
- r !== -1 && (Q.value[r] = {
1760
- id: e,
1761
- indicatorId: t,
1762
- params: n
1763
- });
1764
1729
  }
1765
- let dt = /* @__PURE__ */ new Map();
1766
- function ft(e) {
1767
- let t = Q.value.find((t) => t.id === e);
1730
+ function dt(e, t) {
1731
+ let n = tt(t);
1732
+ at(e), k.value?.replaceSubPaneIndicator(e, t, n), it(e, t);
1733
+ }
1734
+ let ft = /* @__PURE__ */ new Map();
1735
+ function pt(e) {
1736
+ let t = Z.value.find((t) => t.id === e);
1768
1737
  if (!t) return null;
1769
1738
  let n = k.value?.getData();
1770
1739
  if (!n || n.length === 0) return null;
1771
- let r = De.value, i = n.length, a = dt.get(e);
1740
+ let r = De.value, i = n.length, a = ft.get(e);
1772
1741
  if (a && a.idx === r && a.dataLen === i) return a.result;
1773
- let o = H[t.indicatorId], s = t.params, c = k.value?.plugin, l = c ? o.getTitleInfo(n, r, s, c, e) : null;
1774
- return dt.set(e, {
1742
+ let o = ae[t.indicatorId], s = t.params, c = k.value?.plugin, l = c ? o.getTitleInfo(n, r, s, c, e) : null;
1743
+ return ft.set(e, {
1775
1744
  idx: r,
1776
1745
  dataLen: i,
1777
1746
  result: l
1778
1747
  }), l;
1779
1748
  }
1780
- function pt(e, t) {
1749
+ function mt(e, t) {
1781
1750
  let n = k.value;
1782
1751
  if (n) {
1783
1752
  if ([
@@ -1800,94 +1769,86 @@ var tr = {
1800
1769
  "STRUCTURE",
1801
1770
  "ZONES"
1802
1771
  ].includes(e)) {
1803
- let r = X.value.find((t) => t === e);
1804
- if (t && !r) n.addIndicator(e, "main", Z.value[e]), X.value.push(e);
1772
+ let r = Ze.value.find((t) => t === e);
1773
+ if (t && !r) n.addIndicator(e, "main", X.value[e]);
1805
1774
  else if (!t && r) {
1806
1775
  let t = e.toUpperCase();
1807
- n.removeIndicator(t), X.value = X.value.filter((t) => t !== e);
1776
+ n.removeIndicator(t);
1808
1777
  }
1809
1778
  return;
1810
1779
  }
1811
- if (ae.includes(e)) {
1812
- if (t) {
1813
- if (Q.value.find((t) => t.indicatorId === e) || Q.value.length >= Sr) return;
1814
- let t = n.addIndicator(e, "sub", Z.value[e]);
1815
- if (t) rt(t, e), Q.value.push({
1816
- id: t,
1817
- indicatorId: e,
1818
- params: { ...Z.value[e] }
1819
- });
1820
- else if (Q.value.length > 0) {
1821
- let t = Q.value[Q.value.length - 1];
1822
- ut(t.id, e);
1823
- }
1824
- } else Q.value.filter((t) => t.indicatorId === e).forEach((e) => {
1825
- n.removeIndicator(e.id), it(e.id);
1826
- }), Q.value = Q.value.filter((t) => t.indicatorId !== e);
1827
- U();
1828
- }
1780
+ if (ie.includes(e)) if (t) {
1781
+ if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >= wr) return;
1782
+ let t = n.addIndicator(e, "sub", X.value[e]);
1783
+ if (t) it(t, e);
1784
+ else if (Z.value.length > 0) {
1785
+ let t = Z.value[Z.value.length - 1];
1786
+ dt(t.id, e);
1787
+ }
1788
+ } else Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
1789
+ n.removeIndicator(e.id), at(e.id);
1790
+ });
1829
1791
  }
1830
1792
  }
1831
- function mt(e, t) {
1832
- if (Z.value[e] = t, e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
1833
- k.value?.updateMainIndicatorParams(e, t), U();
1793
+ function ht(e, t) {
1794
+ if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
1795
+ k.value?.updateMainIndicatorParams(e, t);
1834
1796
  return;
1835
1797
  }
1836
- if (ae.includes(e)) {
1837
- Q.value.filter((t) => t.indicatorId === e).forEach((e) => {
1838
- k.value?.updateSubPaneParams(e.id, t), e.params = { ...t };
1839
- }), U();
1798
+ if (ie.includes(e)) {
1799
+ Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
1800
+ k.value?.updateSubPaneParams(e.id, t);
1801
+ });
1840
1802
  return;
1841
1803
  }
1842
- U();
1843
1804
  }
1844
- function ht(e) {
1845
- if (!e.length || Q.value.length <= 1) return;
1846
- let t = e.filter((e) => ae.includes(e));
1805
+ function gt(e) {
1806
+ if (!e.length || Z.value.length <= 1) return;
1807
+ let t = e.filter((e) => ie.includes(e));
1847
1808
  if (!t.length) return;
1848
- let n = new Map(Q.value.map((e) => [e.indicatorId, e])), r = [];
1809
+ let n = new Map(Z.value.map((e) => [e.indicatorId, e])), r = [];
1849
1810
  for (let e of t) {
1850
1811
  let t = n.get(e);
1851
1812
  t && (r.push(t), n.delete(e));
1852
1813
  }
1853
1814
  if (r.length === 0) return;
1854
- for (let e of Q.value) n.has(e.indicatorId) && (r.push(e), n.delete(e.indicatorId));
1855
- let i = Q.value.map((e) => e.id), a = r.map((e) => e.id);
1815
+ for (let e of Z.value) n.has(e.indicatorId) && (r.push(e), n.delete(e.indicatorId));
1816
+ let i = Z.value.map((e) => e.id), a = r.map((e) => e.id);
1856
1817
  if (i.join("|") === a.join("|")) return;
1857
- Q.value = r;
1818
+ Z.value = r;
1858
1819
  let o = k.value;
1859
- o && o.updatePaneLayout($e());
1820
+ o && o.updatePaneLayout(et());
1860
1821
  }
1861
- let gt = r(() => d.rightAxisWidth + d.priceLabelWidth), _t = j.computed.totalWidth;
1862
- function vt() {
1822
+ let _t = r(() => d.rightAxisWidth + d.priceLabelWidth), vt = M.computed.totalWidth;
1823
+ function yt() {
1863
1824
  let e = v.value, t = k.value;
1864
1825
  if (!e || !t) return;
1865
1826
  let n = t.getData()?.length ?? 0;
1866
1827
  if (n === 0) return;
1867
- let r = t.getCurrentDpr(), { unitPx: i, startXPx: a } = V(F.value, ee.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));
1868
- e.scrollLeft = Math.round(c * r) / r, U();
1828
+ let r = t.getCurrentDpr(), { unitPx: i, startXPx: a } = W(F.value, I.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));
1829
+ e.scrollLeft = Math.round(c * r) / r, B();
1869
1830
  }
1870
- function yt(e, t) {
1831
+ function bt(e, t) {
1871
1832
  let n = k.value;
1872
1833
  n && n.zoomToLevel(e, t);
1873
1834
  }
1874
1835
  c({
1875
- scheduleRender: U,
1876
- scrollToRight: vt,
1877
- addSubPane: at,
1878
- removeSubPane: ot,
1879
- switchSubIndicator: ut,
1880
- clearAllSubPanes: st,
1836
+ scheduleRender: B,
1837
+ scrollToRight: yt,
1838
+ addSubPane: ot,
1839
+ removeSubPane: st,
1840
+ switchSubIndicator: dt,
1841
+ clearAllSubPanes: ct,
1881
1842
  get plugin() {
1882
1843
  return k.value?.plugin;
1883
1844
  },
1884
- zoomToLevel: yt,
1885
- zoomIn: (e) => yt(P.value + 1, e),
1886
- zoomOut: (e) => yt(P.value - 1, e),
1845
+ zoomToLevel: bt,
1846
+ zoomIn: (e) => bt(P.value + 1, e),
1847
+ zoomOut: (e) => bt(P.value - 1, e),
1887
1848
  getZoomLevel: () => P.value,
1888
1849
  getZoomLevelCount: () => k.value?.getZoomLevelCount() ?? 10
1889
1850
  });
1890
- function bt(e) {
1851
+ function xt(e) {
1891
1852
  let t = (e) => {
1892
1853
  e.preventDefault();
1893
1854
  let t = k.value;
@@ -1895,8 +1856,8 @@ var tr = {
1895
1856
  };
1896
1857
  return e.addEventListener("wheel", t, { passive: !1 }), t;
1897
1858
  }
1898
- function xt(e, t, n, r) {
1899
- return new z({
1859
+ function St(e, t, n, r) {
1860
+ return new H({
1900
1861
  container: e,
1901
1862
  canvasLayer: t,
1902
1863
  rightAxisLayer: n,
@@ -1917,7 +1878,7 @@ var tr = {
1917
1878
  initialZoomLevel: d.initialZoomLevel
1918
1879
  });
1919
1880
  }
1920
- function St(e) {
1881
+ function Ct(e) {
1921
1882
  e.setOnPaneLayoutChange(() => {
1922
1883
  q();
1923
1884
  let t = e.getPaneRenderers(), n = v.value && parseInt(getComputedStyle(v.value).borderTopWidth) || 0;
@@ -1931,10 +1892,10 @@ var tr = {
1931
1892
  });
1932
1893
  let t = e.paneRatios.subscribe(() => {
1933
1894
  let t = e.paneRatios.peek();
1934
- j.actions.setPaneRatios({ ...t });
1895
+ M.actions.setPaneRatios({ ...t });
1935
1896
  }), n = e.viewport.subscribe(() => {
1936
1897
  let t = e.viewport.peek();
1937
- j.state.viewportDpr !== t.dpr && j.actions.setViewportDpr(t.dpr), j.state.viewWidth !== t.plotWidth && j.actions.setViewWidth(t.plotWidth), (j.state.zoomLevel !== t.zoomLevel || j.state.kWidth !== t.kWidth || j.state.kGap !== t.kGap) && j.actions.setZoomState(t.zoomLevel, t.kWidth, t.kGap);
1898
+ M.state.viewportDpr !== t.dpr && M.actions.setViewportDpr(t.dpr), M.state.viewWidth !== t.plotWidth && M.actions.setViewWidth(t.plotWidth), (M.state.zoomLevel !== t.zoomLevel || M.state.kWidth !== t.kWidth || M.state.kGap !== t.kGap) && M.actions.setZoomState(t.zoomLevel, t.kWidth, t.kGap);
1938
1899
  let n = t.desiredScrollLeft;
1939
1900
  n !== void 0 && n !== v.value?.scrollLeft && (q(), h(() => {
1940
1901
  let t = v.value;
@@ -1944,34 +1905,68 @@ var tr = {
1944
1905
  }));
1945
1906
  }), r = e.data.subscribe(() => {
1946
1907
  let t = e.data.peek();
1947
- j.actions.setDataLength(t.length), j.actions.bumpDataVersion();
1908
+ M.actions.setDataLength(t.length), M.actions.bumpDataVersion();
1948
1909
  }), i = e.theme.subscribe(() => {
1949
1910
  N.value = e.theme.peek();
1911
+ }), a = e.indicators.subscribe(() => {
1912
+ let t = e.indicators.peek(), n = t.filter((e) => e.role === "main").map((e) => e.definitionId);
1913
+ Ze.value = n;
1914
+ let r = { ...X.value };
1915
+ for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (r[e.definitionId] = { ...e.params });
1916
+ e.updateRendererConfig("mainIndicatorLegend", { indicators: {
1917
+ MA: {
1918
+ enabled: n.includes("MA"),
1919
+ params: r.MA || {}
1920
+ },
1921
+ BOLL: {
1922
+ enabled: n.includes("BOLL"),
1923
+ params: r.BOLL || {}
1924
+ },
1925
+ EXPMA: {
1926
+ enabled: n.includes("EXPMA"),
1927
+ params: r.EXPMA || {}
1928
+ },
1929
+ ENE: {
1930
+ enabled: n.includes("ENE"),
1931
+ params: r.ENE || {}
1932
+ }
1933
+ } }), X.value = r;
1934
+ }), o = e.subPanes.subscribe(() => {
1935
+ let t = e.subPanes.peek(), n = new Set(t.map((e) => e.paneId)), r = Z.value.filter((e) => n.has(e.id)), i = new Set(r.map((e) => e.id));
1936
+ for (let e of t) i.has(e.paneId) || r.push({
1937
+ id: e.paneId,
1938
+ indicatorId: e.indicatorId,
1939
+ params: e.params
1940
+ });
1941
+ Z.value = r;
1942
+ let a = { ...X.value };
1943
+ for (let e of t) e.params && Object.keys(e.params).length > 0 && (a[e.indicatorId] = { ...e.params });
1944
+ X.value = a;
1950
1945
  });
1951
1946
  x(() => {
1952
- n(), r(), t(), i();
1947
+ n(), r(), t(), i(), a(), o();
1953
1948
  });
1954
1949
  }
1955
1950
  function wt(e) {
1956
1951
  let t = D.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
1957
1952
  if (e.updateSettings(t), t.performanceTest10kKlines) {
1958
- let t = le();
1953
+ let t = G();
1959
1954
  console.time("updateData-10k"), e.updateData(t), console.timeEnd("updateData-10k");
1960
1955
  }
1961
1956
  }
1962
- function Tt(e) {
1957
+ function Et(e) {
1963
1958
  Y.value = new ce(e), Y.value.setCallbacks({
1964
1959
  onDrawingCreated: (e) => {
1965
- j.actions.setDrawings([...j.state.drawings, e]), j.actions.setSelectedDrawingId(e.id);
1960
+ M.actions.setDrawings([...M.state.drawings, e]), M.actions.setSelectedDrawingId(e.id);
1966
1961
  },
1967
1962
  onToolChange: () => {},
1968
1963
  onDrawingSelected: (e) => {
1969
- j.actions.setSelectedDrawingId(e?.id ?? null);
1964
+ M.actions.setSelectedDrawingId(e?.id ?? null);
1970
1965
  }
1971
1966
  });
1972
1967
  }
1973
- function Et(e) {
1974
- e.interaction.setTooltipAnchorPositioning(G.value), e.interaction.setOnInteractionChange((e) => {
1968
+ function Dt(e) {
1969
+ e.interaction.setTooltipAnchorPositioning(K.value), e.interaction.setOnInteractionChange((e) => {
1975
1970
  J.value = e;
1976
1971
  }), e.interaction.setOnPinchZoom((t, n) => {
1977
1972
  if (!e) return;
@@ -1979,23 +1974,23 @@ var tr = {
1979
1974
  if (!r) return;
1980
1975
  let i = n - r.getBoundingClientRect().left;
1981
1976
  e.handlePinchZoom(t, i);
1982
- }), J.value = e.interaction.getInteractionSnapshot(), j.actions.setViewportDpr(e.getCurrentDpr()), e.resize();
1977
+ }), J.value = e.interaction.getInteractionSnapshot(), M.actions.setViewportDpr(e.getCurrentDpr()), e.resize();
1983
1978
  }
1984
- function Dt(e) {
1985
- ne(d.dataFetcher), A.value = new R(e), A.value.on("config:error", (e) => {
1979
+ function Ot(e) {
1980
+ te(d.dataFetcher), A.value = new V(e), A.value.on("config:error", (e) => {
1986
1981
  console.error("Semantic config error:", e);
1987
1982
  }), A.value.on("config:ready", () => {
1988
- ct(), lt(), h(() => vt());
1983
+ lt(), ut(), h(() => yt());
1989
1984
  }), A.value.applyConfig(d.semanticConfig).then((e) => {
1990
1985
  e && !e.success && console.error("Semantic config apply failed:", e.errors);
1991
1986
  });
1992
1987
  }
1993
1988
  return y(() => {
1994
- G.value = !1;
1989
+ K.value = !1;
1995
1990
  let e = v.value, t = p.value, n = m.value, r = f.value;
1996
1991
  if (!e || !t || !n || !r) return;
1997
- let i = bt(e), a = xt(e, t, n, r);
1998
- k.value = a, St(a), a.applyRenderState(j.state.kWidth, j.state.kGap, j.state.zoomLevel), wt(a), Tt(a), Et(a), Dt(a), a.__onWheel = i;
1992
+ let i = xt(e), a = St(e, t, n, r);
1993
+ k.value = a, Ct(a), a.applyRenderState(M.state.kWidth, M.state.kGap, M.state.zoomLevel), wt(a), Et(a), Dt(a), Ot(a), a.__onWheel = i;
1999
1994
  }), x(() => {
2000
1995
  let e = k.value;
2001
1996
  if (e) {
@@ -2003,9 +1998,9 @@ var tr = {
2003
1998
  t && n && n.removeEventListener("wheel", t), e.destroy();
2004
1999
  }
2005
2000
  k.value = null, Y.value = null;
2006
- }), M(() => d.yPaddingPx, (e) => {
2001
+ }), j(() => d.yPaddingPx, (e) => {
2007
2002
  k.value?.updateOptions({ yPaddingPx: e });
2008
- }), M(() => d.semanticConfig, async (e, t) => {
2003
+ }), j(() => d.semanticConfig, async (e, t) => {
2009
2004
  if (e && e !== t) {
2010
2005
  let t = await A.value?.applyConfig(e);
2011
2006
  t && !t.success && console.error("Semantic config apply failed:", t.errors);
@@ -2019,21 +2014,21 @@ var tr = {
2019
2014
  "is-hovering-pane-separator": Ce.value,
2020
2015
  "is-hovering-right-axis": Te.value,
2021
2016
  "is-hovering-kline": Ee.value !== null
2022
- }]) }, [l(yr, {
2017
+ }]) }, [l(xr, {
2023
2018
  ref_key: "toolbarRef",
2024
2019
  ref: D,
2025
2020
  "is-fullscreen": n.isFullscreen,
2026
2021
  onSelectTool: ze,
2027
2022
  onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
2028
- onZoomIn: c[1] ||= (e) => yt(P.value + 1),
2029
- onZoomOut: c[2] ||= (e) => yt(P.value - 1),
2030
- onSettingsChange: se
2023
+ onZoomIn: c[1] ||= (e) => bt(P.value + 1),
2024
+ onZoomOut: c[2] ||= (e) => bt(P.value - 1),
2025
+ onSettingsChange: ee
2031
2026
  }, null, 8, ["is-fullscreen"]), s("div", {
2032
2027
  class: "chart-main",
2033
2028
  ref_key: "chartMainRef",
2034
2029
  ref: b
2035
2030
  }, [
2036
- s("div", xr, [(S(!0), o(e, null, w(ge.value, (e) => (S(), o("div", {
2031
+ s("div", Cr, [(S(!0), o(e, null, w(ge.value, (e) => (S(), o("div", {
2037
2032
  key: e.id,
2038
2033
  class: g(["pane-separator-line", { "is-active": we.value === e.id }]),
2039
2034
  style: _({ top: `${e.top}px` })
@@ -2055,7 +2050,7 @@ var tr = {
2055
2050
  onPointerleave: Ge
2056
2051
  }, [s("div", {
2057
2052
  class: "scroll-content",
2058
- style: _({ width: O(_t) + "px" })
2053
+ style: _({ width: O(vt) + "px" })
2059
2054
  }, [s("div", {
2060
2055
  class: "canvas-layer",
2061
2056
  ref_key: "canvasLayerRef",
@@ -2076,22 +2071,22 @@ var tr = {
2076
2071
  }, [
2077
2072
  ke.value ? (S(), o("div", {
2078
2073
  key: 0,
2079
- class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": G.value }]),
2074
+ class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": K.value }]),
2080
2075
  style: _(Ne.value)
2081
2076
  }, null, 6)) : a("", !0),
2082
2077
  ye.value || be.value ? (S(), o("div", {
2083
2078
  key: 1,
2084
- class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": G.value }]),
2079
+ class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": K.value }]),
2085
2080
  style: _(Fe.value)
2086
2081
  }, null, 6)) : a("", !0),
2087
- ke.value ? (S(), i(Bt, {
2082
+ ke.value ? (S(), i(Ht, {
2088
2083
  key: 2,
2089
2084
  k: ke.value,
2090
2085
  index: Ae.value,
2091
2086
  data: Re.value,
2092
2087
  pos: Me.value,
2093
- "set-el": de,
2094
- "use-anchor": G.value,
2088
+ "set-el": le,
2089
+ "use-anchor": K.value,
2095
2090
  "anchor-placement": Ie.value
2096
2091
  }, null, 8, [
2097
2092
  "k",
@@ -2101,13 +2096,13 @@ var tr = {
2101
2096
  "use-anchor",
2102
2097
  "anchor-placement"
2103
2098
  ])) : a("", !0),
2104
- ye.value || be.value ? (S(), i(Ut, {
2099
+ ye.value || be.value ? (S(), i(Gt, {
2105
2100
  key: 3,
2106
2101
  marker: ye.value || be.value,
2107
2102
  pos: Pe.value,
2108
- "use-anchor": G.value,
2103
+ "use-anchor": K.value,
2109
2104
  "anchor-placement": Le.value,
2110
- "set-el": fe
2105
+ "set-el": ue
2111
2106
  }, null, 8, [
2112
2107
  "marker",
2113
2108
  "pos",
@@ -2119,25 +2114,31 @@ var tr = {
2119
2114
  class: "right-axis-host",
2120
2115
  ref_key: "rightAxisLayerRef",
2121
2116
  ref: m,
2122
- style: _({ width: gt.value + "px" }),
2117
+ style: _({ width: _t.value + "px" }),
2123
2118
  onPointerdown: Ke,
2124
2119
  onPointermove: qe,
2125
2120
  onPointerup: Je,
2126
2121
  onPointerleave: Ye
2127
2122
  }, null, 36)
2128
- ], 512)], 2), l(Ct, {
2129
- "active-indicators": Qe.value,
2130
- "indicator-params": Z.value,
2131
- onToggle: pt,
2132
- onUpdateParams: mt,
2133
- onReorderSubIndicators: ht
2134
- }, null, 8, ["active-indicators", "indicator-params"])], 8, br));
2123
+ ], 512)], 2), l(Tt, {
2124
+ "active-indicators": $e.value,
2125
+ "indicator-params": X.value,
2126
+ onToggle: mt,
2127
+ onUpdateParams: ht,
2128
+ onReorderSubIndicators: gt
2129
+ }, null, 8, ["active-indicators", "indicator-params"])], 8, Sr));
2135
2130
  }
2136
- }), [["__scopeId", "data-v-c50302da"]]), wr = {
2131
+ }), [["__scopeId", "data-v-b0cae9be"]]), Er = {
2137
2132
  name: "@363045841yyt/klinechart",
2138
- version: "0.7.4",
2133
+ version: "0.7.5",
2139
2134
  description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
2140
2135
  license: "MIT",
2136
+ repository: {
2137
+ type: "git",
2138
+ url: "https://github.com/363045841/KLineChartQuant.git"
2139
+ },
2140
+ bugs: "https://github.com/363045841/KLineChartQuant/issues",
2141
+ homepage: "https://363045841.github.io/KLineChartQuant/",
2141
2142
  type: "module",
2142
2143
  engines: { node: "^20.19.0 || >=22.12.0" },
2143
2144
  sideEffects: !1,
@@ -2178,7 +2179,7 @@ var tr = {
2178
2179
  ignore: ["vue", "@363045841yyt/klinechart-core"]
2179
2180
  }],
2180
2181
  peerDependencies: {
2181
- "@363045841yyt/klinechart-core": "workspace:^",
2182
+ "@363045841yyt/klinechart-core": "^",
2182
2183
  vue: "^3.4.0"
2183
2184
  },
2184
2185
  devDependencies: {
@@ -2197,30 +2198,30 @@ var tr = {
2197
2198
  vitest: "^4.1.5",
2198
2199
  vue: "^3.5.0"
2199
2200
  }
2200
- }.version, Tr = null;
2201
- function Er(e) {
2202
- Tr = e;
2201
+ }.version, Dr = null;
2202
+ function Or(e) {
2203
+ Dr = e;
2203
2204
  }
2204
- function Dr(e) {
2205
+ function kr(e) {
2205
2206
  if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
2206
- if (Tr === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
2207
- return Tr(e);
2207
+ if (Dr === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
2208
+ return Dr(e);
2208
2209
  }
2209
- function Or(e) {
2210
+ function $(e) {
2210
2211
  let t = E(e.peek());
2211
2212
  return b(e.subscribe(() => {
2212
2213
  t.value = e.peek();
2213
2214
  })), t;
2214
2215
  }
2215
- function kr(e, t) {
2216
+ function Ar(e, t) {
2216
2217
  let n = E(null), r = (e) => {
2217
- e == null || n.value != null || (n.value = Dr({
2218
+ e == null || n.value != null || (n.value = kr({
2218
2219
  ...t,
2219
2220
  container: e
2220
2221
  }));
2221
2222
  };
2222
2223
  r(e.value);
2223
- let i = M(e, (e) => {
2224
+ let i = j(e, (e) => {
2224
2225
  r(e);
2225
2226
  }, {
2226
2227
  immediate: !0,
@@ -2232,7 +2233,7 @@ function kr(e, t) {
2232
2233
  };
2233
2234
  return b(a), v(a), { chart: n };
2234
2235
  }
2235
- function Ar(e) {
2236
+ function jr(e) {
2236
2237
  let t = E(e.indicators.peek());
2237
2238
  return b(e.indicators.subscribe(() => {
2238
2239
  t.value = e.indicators.peek();
@@ -2243,25 +2244,54 @@ function Ar(e) {
2243
2244
  updateParams: e.updateIndicatorParams.bind(e)
2244
2245
  };
2245
2246
  }
2246
- function jr(e) {
2247
+ function Mr(e) {
2247
2248
  let t = E(e.interactionState.peek());
2248
2249
  return b(e.interactionState.subscribe(() => {
2249
2250
  t.value = e.interactionState.peek();
2250
2251
  })), t;
2251
2252
  }
2252
- function Mr(e) {
2253
+ function Nr(e) {
2253
2254
  let t = E(e.paneRatios.peek());
2254
2255
  return b(e.paneRatios.subscribe(() => {
2255
2256
  t.value = e.paneRatios.peek();
2256
2257
  })), t;
2257
2258
  }
2258
- function Nr(e) {
2259
+ function Pr(e) {
2259
2260
  let t = E(e.viewport.peek());
2260
2261
  return b(e.viewport.subscribe(() => {
2261
2262
  t.value = e.viewport.peek();
2262
2263
  })), t;
2263
2264
  }
2264
- var Pr = u({
2265
+ function Fr(e) {
2266
+ let t = L({ catalog: e.catalog });
2267
+ b(() => t.dispose());
2268
+ let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
2269
+ function o(t) {
2270
+ let n = e.catalog.find((e) => e.id === t);
2271
+ return n === void 0 ? null : e.addIndicator(t, n.role);
2272
+ }
2273
+ function s(t) {
2274
+ return e.removeIndicator(t);
2275
+ }
2276
+ function c(t) {
2277
+ return e.indicators.peek().some((e) => e.definitionId === t);
2278
+ }
2279
+ return {
2280
+ catalog: e.catalog,
2281
+ filteredMain: n,
2282
+ filteredSub: r,
2283
+ menuOpen: i,
2284
+ searchQuery: a,
2285
+ add: o,
2286
+ remove: s,
2287
+ openMenu: () => t.openMenu(),
2288
+ closeMenu: () => t.closeMenu(),
2289
+ toggleMenu: () => t.toggleMenu(),
2290
+ setSearchQuery: (e) => t.setSearchQuery(e),
2291
+ isActive: c
2292
+ };
2293
+ }
2294
+ var Ir = u({
2265
2295
  name: "KLineChart",
2266
2296
  props: {
2267
2297
  data: {
@@ -2294,7 +2324,7 @@ var Pr = u({
2294
2324
  y(() => {
2295
2325
  let n = r.value;
2296
2326
  n != null && (i.run(() => {
2297
- if (a.value = Dr({
2327
+ if (a.value = kr({
2298
2328
  container: n,
2299
2329
  data: e.data,
2300
2330
  initialZoomLevel: e.initialZoomLevel,
@@ -2308,9 +2338,9 @@ var Pr = u({
2308
2338
  };
2309
2339
  n(), b(e.viewport.subscribe(n));
2310
2340
  }
2311
- }), M(() => e.data, (e) => {
2341
+ }), j(() => e.data, (e) => {
2312
2342
  a.value?.setData(e);
2313
- }), M(() => e.theme, (e) => {
2343
+ }), j(() => e.theme, (e) => {
2314
2344
  a.value?.setTheme(e);
2315
2345
  }));
2316
2346
  }), x(() => {
@@ -2340,9 +2370,9 @@ var Pr = u({
2340
2370
  }
2341
2371
  });
2342
2372
  }
2343
- }), Fr = { install(e) {
2344
- e.component("KLineChart", Pr);
2373
+ }), Lr = { install(e) {
2374
+ e.component("KLineChart", Ir);
2345
2375
  } };
2346
- Er(ue);
2376
+ Or(I);
2347
2377
  //#endregion
2348
- export { le as CORE_VERSION, pe as DrawingStyleToolbar, ke as IndicatorParams, Ct as IndicatorSelector, Pr as KLineChart, Cr as KLineChartVue, Bt as KLineTooltip, Fr as KMapPlugin, yr as LeftToolbar, Ut as MarkerTooltip, wr as VERSION, Er as __setControllerFactory, Or as coreSignalToVueRef, Dr as createChart, kr as useChart, Ar as useIndicators, jr as useInteractionState, Mr as usePaneRatios, Nr as useViewport };
2378
+ export { F as CORE_VERSION, pe as DrawingStyleToolbar, ke as IndicatorParams, Tt as IndicatorSelector, Ir as KLineChart, Tr as KLineChartVue, Ht as KLineTooltip, Lr as KMapPlugin, xr as LeftToolbar, Gt as MarkerTooltip, Er as VERSION, Or as __setControllerFactory, $ as coreSignalToVueRef, kr as createChart, Ar as useChart, Fr as useIndicatorSelector, jr as useIndicators, Mr as useInteractionState, Nr as usePaneRatios, Pr as useViewport };