velo-plot 1.15.0 → 1.19.0

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.
Files changed (80) hide show
  1. package/dist/{ChartCore-BimVvUEg.js → ChartCore-DQ691eXH.js} +1523 -996
  2. package/dist/ChartCore-DQ691eXH.js.map +1 -0
  3. package/dist/assets/downsample.worker-C70QJ04y.js +2 -0
  4. package/dist/assets/downsample.worker-C70QJ04y.js.map +1 -0
  5. package/dist/assets/indicator.worker-bv0zC4EX.js +2 -0
  6. package/dist/assets/indicator.worker-bv0zC4EX.js.map +1 -0
  7. package/dist/core/OverlayRenderer.d.ts +2 -0
  8. package/dist/core/chart/ChartAlerts.d.ts +42 -0
  9. package/dist/core/chart/ChartCore.d.ts +19 -1
  10. package/dist/core/chart/ChartRenderLoop.d.ts +4 -2
  11. package/dist/core/chart/ChartRenderer.d.ts +3 -2
  12. package/dist/core/chart/candlestickMarkers.d.ts +23 -0
  13. package/dist/core/chart/heikinAshi.d.ts +10 -0
  14. package/dist/core/chart/series/types.d.ts +2 -2
  15. package/dist/core/chart/types.d.ts +7 -0
  16. package/dist/core/indicator/addIndicator.d.ts +36 -0
  17. package/dist/core/indicator/index.d.ts +2 -0
  18. package/dist/core/indicator/indicatorPresets.d.ts +37 -0
  19. package/dist/core/series/Series.d.ts +3 -0
  20. package/dist/core/stacked/types.d.ts +8 -0
  21. package/dist/core/time/TimeScale.d.ts +31 -0
  22. package/dist/createStackedChart-BPooTQ9z.js +1164 -0
  23. package/dist/createStackedChart-BPooTQ9z.js.map +1 -0
  24. package/dist/gpu/adapter/gpuRenderer.d.ts +21 -0
  25. package/dist/gpu/backends/webgpu/WebGPUBackend.d.ts +2 -1
  26. package/dist/gpuRenderer-BpaMYz-k.js +1848 -0
  27. package/dist/gpuRenderer-BpaMYz-k.js.map +1 -0
  28. package/dist/index-D7dTq6VB.js +503 -0
  29. package/dist/index-D7dTq6VB.js.map +1 -0
  30. package/dist/{index-Ce2JgkH_.js → index-DoYxf1cV.js} +86 -43
  31. package/dist/{index-Ce2JgkH_.js.map → index-DoYxf1cV.js.map} +1 -1
  32. package/dist/{index.core-C_-CFftD.js → index.core-BtGFYMOu.js} +2 -2
  33. package/dist/{index.core-C_-CFftD.js.map → index.core-BtGFYMOu.js.map} +1 -1
  34. package/dist/index.d.ts +12 -4
  35. package/dist/indicators--eJGmVox.js +302 -0
  36. package/dist/indicators--eJGmVox.js.map +1 -0
  37. package/dist/plugins/analysis.js +530 -807
  38. package/dist/plugins/analysis.js.map +1 -1
  39. package/dist/plugins/caching.js +26 -21
  40. package/dist/plugins/caching.js.map +1 -1
  41. package/dist/plugins/drawing-tools/index.d.ts +16 -0
  42. package/dist/plugins/gpu.js +202 -1895
  43. package/dist/plugins/gpu.js.map +1 -1
  44. package/dist/plugins/index.d.ts +2 -0
  45. package/dist/plugins/keyboard/index.d.ts +1 -7
  46. package/dist/plugins/keyboard.js +1 -1
  47. package/dist/plugins/lazy-load/types.d.ts +7 -0
  48. package/dist/plugins/lazy-load.js +131 -108
  49. package/dist/plugins/lazy-load.js.map +1 -1
  50. package/dist/plugins/replay/index.d.ts +19 -0
  51. package/dist/plugins/virtualization/types.d.ts +12 -0
  52. package/dist/plugins/virtualization.js +1 -1
  53. package/dist/pool-15HMCNv8.js +88 -0
  54. package/dist/pool-15HMCNv8.js.map +1 -0
  55. package/dist/react.js +2 -2
  56. package/dist/renderer/CandlestickRenderer.d.ts +1 -1
  57. package/dist/renderer/ChartSeriesRenderer.d.ts +6 -0
  58. package/dist/renderer/GpuChartRenderer.d.ts +23 -0
  59. package/dist/renderer/index.d.ts +3 -0
  60. package/dist/renderer/spike/WebGLGridSpike.d.ts +40 -0
  61. package/dist/testing/baselines/v1.15.0.json.d.ts +51 -0
  62. package/dist/testing/gridSpikeBenchmark.d.ts +49 -0
  63. package/dist/testing/index.d.ts +5 -0
  64. package/dist/testing/rendererBenchmark.d.ts +13 -0
  65. package/dist/testing/stage1BrowserBench.d.ts +42 -0
  66. package/dist/types.d.ts +21 -1
  67. package/dist/velo-plot.full.js +1322 -789
  68. package/dist/velo-plot.full.js.map +1 -1
  69. package/dist/velo-plot.js +20 -20
  70. package/dist/workers/downsample.d.ts +38 -0
  71. package/dist/workers/downsampleAsync.d.ts +6 -0
  72. package/dist/workers/indicator.worker.d.ts +32 -0
  73. package/dist/workers/indicatorsAsync.d.ts +26 -0
  74. package/dist/workers/pool.d.ts +36 -0
  75. package/package.json +11 -1
  76. package/dist/ChartCore-BimVvUEg.js.map +0 -1
  77. package/dist/createStackedChart-CjsKcOvX.js +0 -1088
  78. package/dist/createStackedChart-CjsKcOvX.js.map +0 -1
  79. package/dist/index-ChgIdk3N.js +0 -229
  80. package/dist/index-ChgIdk3N.js.map +0 -1
@@ -1,56 +1,59 @@
1
- var de = Object.defineProperty;
2
- var ue = (r, e, t) => e in r ? de(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var _ = (r, e, t) => ue(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { b as fe } from "./ChartCore-BimVvUEg.js";
5
- import { A as je, C as Je, h as Qe, D as Ze, o as et, k as tt, E as nt, j as at, L as ot, d as rt, M as it, N as st, O as lt, P as ct, t as dt, S as ut, G as ft, x as gt, c as pt, H as ht, N as mt, J as yt, f as xt, l as vt, v as Pt, y as St, I as Tt, e as wt, u as bt, a as Ct, g as Mt, n as At, i as It, m as Dt, s as Et, p as Ft, q as Lt, r as Rt, z as Xt, B as Yt, F as kt, w as zt } from "./ChartCore-BimVvUEg.js";
6
- import { E as Ot } from "./axisFormat-B7o_uIEA.js";
7
- import { AnnotationManager as Bt, PluginAnnotations as Ht } from "./plugins/annotations.js";
8
- import { d as O } from "./index.core-C_-CFftD.js";
9
- import { e as Wt, h as Gt, f as Nt, c as Vt, a as Ut, g as Kt, b as jt, l as Jt, r as Qt, v as Zt } from "./index.core-C_-CFftD.js";
10
- import { P as tn, a as nn, T as an, g as on } from "./index-DjeWClO9.js";
11
- import { P as sn, c as ln, l as cn, m as dn } from "./index-ChgIdk3N.js";
12
- import { PluginAnalysis as fn, adx as gn, analyzeComplexSpectrum as pn, analyzeSpectrum as hn, aroon as mn, arraysToComplex as yn, atr as xn, autoCorrelation as vn, bandPassFilter as Pn, bandStopFilter as Sn, blackmanWindow as Tn, bollingerBands as wn, butterworth as bn, complexToArrays as Cn, crossCorrelation as Mn, cumsum as An, dema as In, detectAnomalies as Dn, dominantFrequency as En, ema as Fn, exponentialMovingAverage as Ln, fft as Rn, fftFromComplexInput as Xn, gaussianSmooth as Yn, getPositiveFrequencies as kn, hammingWindow as zn, hanningWindow as _n, highPassFilter as On, ifft as $n, ifftComplex as Bn, ifftFromArrays as Hn, lowPassFilter as qn, macd as Wn, medianFilter as Gn, momentum as Nn, nextPowerOf2 as Vn, normalize as Un, obv as Kn, percentChange as jn, powerSpectrum as Jn, roc as Qn, rsi as Zn, savitzkyGolay as ea, simpsonsIntegration as ta, singleFrequencyFilter as na, sma as aa, standardDeviation as oa, stochastic as ra, tTest as ia, tema as sa, trapezoidalIntegration as la, vwap as ca, wma as da } from "./plugins/analysis.js";
13
- import { B as fa, C as ga, P as pa, a as ha, e as ma, g as ya, b as xa, d as va, f as Pa, c as Sa } from "./index-BMiZoKmm.js";
14
- import { b as wa, a as ba, S as Ca, c as Ma, u as Aa } from "./createStackedChart-CjsKcOvX.js";
1
+ var ve = Object.defineProperty;
2
+ var we = (n, e, t) => e in n ? ve(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var X = (n, e, t) => we(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { D as ee, L as O, s as te, O as Pe } from "./ChartCore-DQ691eXH.js";
5
+ import { A as Et, C as Lt, h as Rt, B as Yt, x as Xt, E as Bt, u as _t, n as zt, v as Wt, N as Gt, a3 as Ut, F as $t, S as Ot, R as Ht, a as Nt, X as qt, _ as Vt, d as Kt, b as jt, I as Jt, $ as Qt, a0 as Zt, c as en, Z as tn, N as nn, a2 as on, o as rn, y as an, H as sn, J as ln, Y as cn, a1 as dn, f as un, V as fn, G as hn, k as gn, j as pn, z as mn, p as yn, W as xn, i as vn, m as wn, t as Pn, q as Sn, l as Tn, T as bn, U as An, K as Mn, P as Fn, Q as Cn, w as In } from "./ChartCore-DQ691eXH.js";
6
+ import { E as kn } from "./axisFormat-B7o_uIEA.js";
7
+ import { AnnotationManager as Ln, PluginAnnotations as Rn } from "./plugins/annotations.js";
8
+ import { d as z } from "./index.core-BtGFYMOu.js";
9
+ import { e as Xn, h as Bn, f as _n, c as zn, a as Wn, g as Gn, b as Un, l as $n, r as On, v as Hn } from "./index.core-BtGFYMOu.js";
10
+ import { G as qn, S as Vn, a as Kn, W as jn, c as Jn, p as Qn } from "./gpuRenderer-BpaMYz-k.js";
11
+ import { P as eo, a as to, T as no, g as oo } from "./index-DjeWClO9.js";
12
+ import { P as ao, c as io, e as so, d as lo, g as co, a as uo, l as fo, m as ho, b as go, o as po, s as mo, u as yo } from "./index-D7dTq6VB.js";
13
+ import { W as vo, n as wo } from "./pool-15HMCNv8.js";
14
+ import { PluginAnalysis as So, analyzeComplexSpectrum as To, analyzeSpectrum as bo, arraysToComplex as Ao, autoCorrelation as Mo, bandPassFilter as Fo, bandStopFilter as Co, blackmanWindow as Io, butterworth as Do, complexToArrays as ko, crossCorrelation as Eo, detectAnomalies as Lo, dominantFrequency as Ro, exponentialMovingAverage as Yo, fft as Xo, fftFromComplexInput as Bo, gaussianSmooth as _o, getPositiveFrequencies as zo, hammingWindow as Wo, hanningWindow as Go, highPassFilter as Uo, ifft as $o, ifftComplex as Oo, ifftFromArrays as Ho, lowPassFilter as No, medianFilter as qo, nextPowerOf2 as Vo, powerSpectrum as Ko, savitzkyGolay as jo, simpsonsIntegration as Jo, singleFrequencyFilter as Qo, tTest as Zo, trapezoidalIntegration as er } from "./plugins/analysis.js";
15
+ import { B as nr, C as or, P as rr, a as ar, e as ir, g as sr, b as lr, d as cr, f as dr, c as ur } from "./index-BMiZoKmm.js";
16
+ import { b as hr, a as gr, S as pr, c as mr, u as yr } from "./createStackedChart-BPooTQ9z.js";
15
17
  import "react";
16
- import { BaseBufferStore as Da, BaseTextureStore as Ea, GpuBenchmark as Fa, GpuCompute as La, GpuRenderer as Ra, PipelineCache as Xa, PluginGpu as Ya, SeriesAdapter as ka, WebGLBackend as za, WebGPUBackend as _a, createGpuRenderer as Oa, parseColorToRGBA as $a } from "./plugins/gpu.js";
17
- import { b as Ha, L as qa, a as Wa, c as Ga, f as Na, d as Va, e as Ua, i as Ka, g as ja, h as Ja, r as Qa, s as Za } from "./index-x4stH3jD.js";
18
- import { D as to, K as no, P as ao, c as oo, p as ro } from "./index-Ce2JgkH_.js";
19
- import { ClipboardManager as so, PluginClipboard as lo, copyToClipboard as co, formatData as uo, getClipboardManager as fo } from "./plugins/clipboard.js";
20
- import { DebugOverlay as po, PluginDebug as ho, createDebugOverlay as mo, enableDebugMode as yo } from "./plugins/debug.js";
21
- import { L as vo, P as Po, c as So, s as To, a as wo } from "./index-qhscKTDy.js";
22
- import { C as Co, c as Mo, a as Ao, l as Io } from "./index-CUGS98p4.js";
23
- import { P as Eo, b as Fo, T as Lo, c as Ro, a as Xo, g as Yo } from "./index-Dag88bW4.js";
24
- import { c as zo, a as _o, b as Oo, d as $o, h as Bo, e as Ho, f as qo, g as Wo, i as Go, m as No, s as Vo, v as Uo } from "./utils-BK5UUXxj.js";
25
- import { a as jo, c as Jo, d as Qo, i as Zo, s as er } from "./math-Ddm2EZjj.js";
26
- import { Plugin3D as nr } from "./plugins/3d.js";
27
- import { PluginI18n as or } from "./plugins/i18n.js";
28
- import { PluginSync as ir } from "./plugins/sync.js";
29
- import { PluginDataExport as lr } from "./plugins/data-export.js";
30
- import { PluginContextMenu as dr } from "./plugins/context-menu.js";
31
- import { PluginAnomalyDetection as fr } from "./plugins/anomaly-detection.js";
32
- import { PluginMLIntegration as pr } from "./plugins/ml-integration.js";
33
- import { PluginPatternRecognition as mr } from "./plugins/pattern-recognition.js";
34
- import { PluginRegression as xr } from "./plugins/regression.js";
35
- import { PluginRadar as Pr } from "./plugins/radar.js";
36
- import { PluginSnapshot as Tr } from "./plugins/snapshot.js";
37
- import { PluginDataTransform as br } from "./plugins/data-transform.js";
38
- import { PluginLaTeX as Mr } from "./plugins/latex.js";
39
- import { PluginCaching as Ir } from "./plugins/caching.js";
40
- import { PluginLazyLoad as Er } from "./plugins/lazy-load.js";
41
- import { PluginBrokenAxis as Lr } from "./plugins/broken-axis.js";
42
- import { PluginVideoRecorder as Xr } from "./plugins/video-recorder.js";
43
- import { PluginOffscreen as kr } from "./plugins/offscreen.js";
44
- import { PluginROI as _r } from "./plugins/roi.js";
45
- import { PluginForecasting as $r } from "./plugins/forecasting.js";
46
- class Q {
18
+ import { BaseBufferStore as vr, BaseTextureStore as wr, GpuBenchmark as Pr, GpuCompute as Sr, PipelineCache as Tr, PluginGpu as br } from "./plugins/gpu.js";
19
+ import { b as Mr, L as Fr, a as Cr, c as Ir, f as Dr, d as kr, e as Er, i as Lr, g as Rr, h as Yr, r as Xr, s as Br } from "./index-x4stH3jD.js";
20
+ import { D as zr, K as Wr, P as Gr, c as Ur, p as $r } from "./index-DoYxf1cV.js";
21
+ import { ClipboardManager as Hr, PluginClipboard as Nr, copyToClipboard as qr, formatData as Vr, getClipboardManager as Kr } from "./plugins/clipboard.js";
22
+ import { DebugOverlay as Jr, PluginDebug as Qr, createDebugOverlay as Zr, enableDebugMode as ea } from "./plugins/debug.js";
23
+ import { L as na, P as oa, c as ra, s as aa, a as ia } from "./index-qhscKTDy.js";
24
+ import { C as la, c as ca, a as da, l as ua } from "./index-CUGS98p4.js";
25
+ import { P as ha, b as ga, T as pa, c as ma, a as ya, g as xa } from "./index-Dag88bW4.js";
26
+ import { c as wa, a as Pa, b as Sa, d as Ta, h as ba, e as Aa, f as Ma, g as Fa, i as Ca, m as Ia, s as Da, v as ka } from "./utils-BK5UUXxj.js";
27
+ import { a as La, c as Ra, d as Ya, i as Xa, s as Ba } from "./math-Ddm2EZjj.js";
28
+ import { i as za, j as Wa, g as Ga, f as Ua, k as $a, d as Oa, e as Ha, m as Na, c as qa, n as Va, o as Ka, p as ja, b as Ja, r as Qa, s as Za, h as ei, a as ti, t as ni, v as oi, w as ri } from "./indicators--eJGmVox.js";
29
+ import { Plugin3D as ii } from "./plugins/3d.js";
30
+ import { PluginI18n as li } from "./plugins/i18n.js";
31
+ import { PluginSync as di } from "./plugins/sync.js";
32
+ import { PluginDataExport as fi } from "./plugins/data-export.js";
33
+ import { PluginContextMenu as gi } from "./plugins/context-menu.js";
34
+ import { PluginAnomalyDetection as mi } from "./plugins/anomaly-detection.js";
35
+ import { PluginMLIntegration as xi } from "./plugins/ml-integration.js";
36
+ import { PluginPatternRecognition as wi } from "./plugins/pattern-recognition.js";
37
+ import { PluginRegression as Si } from "./plugins/regression.js";
38
+ import { PluginRadar as bi } from "./plugins/radar.js";
39
+ import { PluginSnapshot as Mi } from "./plugins/snapshot.js";
40
+ import { PluginDataTransform as Ci } from "./plugins/data-transform.js";
41
+ import { PluginLaTeX as Di } from "./plugins/latex.js";
42
+ import { PluginCaching as Ei } from "./plugins/caching.js";
43
+ import { PluginLazyLoad as Ri } from "./plugins/lazy-load.js";
44
+ import { PluginBrokenAxis as Xi } from "./plugins/broken-axis.js";
45
+ import { PluginVideoRecorder as _i } from "./plugins/video-recorder.js";
46
+ import { PluginOffscreen as Wi } from "./plugins/offscreen.js";
47
+ import { PluginROI as Ui } from "./plugins/roi.js";
48
+ import { PluginForecasting as Oi } from "./plugins/forecasting.js";
49
+ class re {
47
50
  constructor(e, t = {}) {
48
- _(this, "available");
49
- _(this, "canvas");
50
- _(this, "adapter");
51
- _(this, "device");
52
- _(this, "context");
53
- this.canvas = e, this.available = Q.isSupported();
51
+ X(this, "available");
52
+ X(this, "canvas");
53
+ X(this, "adapter");
54
+ X(this, "device");
55
+ X(this, "context");
56
+ this.canvas = e, this.available = re.isSupported();
54
57
  }
55
58
  static isSupported() {
56
59
  return typeof globalThis.navigator < "u" && typeof globalThis.navigator.gpu < "u";
@@ -64,14 +67,14 @@ class Q {
64
67
  }), !this.adapter)
65
68
  throw new Error("[SciPlot] Failed to request WebGPU adapter");
66
69
  this.device = await this.adapter.requestDevice();
67
- const s = this.canvas.getContext("webgpu");
68
- if (!s)
70
+ const r = this.canvas.getContext("webgpu");
71
+ if (!r)
69
72
  throw new Error("[SciPlot] Failed to get WebGPU context");
70
- this.context = s;
71
- const o = e.preferredFormat ?? (t.getPreferredCanvasFormat ? t.getPreferredCanvasFormat() : "bgra8unorm");
73
+ this.context = r;
74
+ const a = e.preferredFormat ?? (t.getPreferredCanvasFormat ? t.getPreferredCanvasFormat() : "bgra8unorm");
72
75
  this.context.configure({
73
76
  device: this.device,
74
- format: o,
77
+ format: a,
75
78
  alphaMode: "premultiplied"
76
79
  });
77
80
  }
@@ -79,128 +82,128 @@ class Q {
79
82
  this.device = void 0, this.adapter = void 0, this.context = void 0;
80
83
  }
81
84
  }
82
- const ge = {
85
+ const Se = {
83
86
  name: "crosshair",
84
87
  version: "1.0.0",
85
88
  description: "Interactive crosshair that follows mouse cursor",
86
89
  provides: ["interaction", "visualization"],
87
90
  tags: ["cursor", "crosshair", "tooltip"]
88
- }, pe = O(
89
- ge,
90
- (r = {}) => {
91
+ }, Te = z(
92
+ Se,
93
+ (n = {}) => {
91
94
  const {
92
95
  showVertical: e = !0,
93
96
  showHorizontal: t = !0,
94
- color: s,
95
- lineStyle: o = "dashed",
96
- lineWidth: n = 1,
97
- snapToData: u = !1,
98
- valueFormat: c = { xPrecision: 4, yPrecision: 4 }
99
- } = r;
100
- let i = r.valueDisplayMode ?? "disabled";
101
- r.showAxisLabels !== void 0 && r.valueDisplayMode === void 0 && (i = r.showAxisLabels ? "floating" : "disabled");
102
- const l = r.cornerPosition ?? "top-left";
103
- let f = -1, y = -1, b, v = null, p = null;
97
+ color: r,
98
+ lineStyle: a = "dashed",
99
+ lineWidth: o = 1,
100
+ snapToData: l = !1,
101
+ valueFormat: d = { xPrecision: 4, yPrecision: 4 }
102
+ } = n;
103
+ let i = n.valueDisplayMode ?? "disabled";
104
+ n.showAxisLabels !== void 0 && n.valueDisplayMode === void 0 && (i = n.showAxisLabels ? "floating" : "disabled");
105
+ const s = n.cornerPosition ?? "top-left";
106
+ let c = -1, f = -1, w, v = null, p = null;
104
107
  return {
105
- onInit(d) {
106
- b = "crosshair-overlay";
107
- const a = d.ui.createOverlay(b, {
108
+ onInit(h) {
109
+ w = "crosshair-overlay";
110
+ const u = h.ui.createOverlay(w, {
108
111
  zIndex: 500,
109
112
  position: { top: "0", left: "0", right: "0", bottom: "0" }
110
113
  });
111
- v = document.createElement("canvas"), v.style.cssText = "width: 100%; height: 100%;", a.appendChild(v), p = v.getContext("2d"), S(d);
114
+ v = document.createElement("canvas"), v.style.cssText = "width: 100%; height: 100%;", u.appendChild(v), p = v.getContext("2d"), S(h);
112
115
  },
113
- onDestroy(d) {
114
- d.ui.removeOverlay(b), v = null, p = null;
116
+ onDestroy(h) {
117
+ h.ui.removeOverlay(w), v = null, p = null;
115
118
  },
116
- onResize(d) {
117
- S(d);
119
+ onResize(h) {
120
+ S(h);
118
121
  },
119
- onInteraction(d, a) {
120
- if (a.type === "mousemove") {
121
- if (f = a.pixelX, y = a.pixelY, u && a.inPlotArea) {
122
- const P = d.coords.pickPoint(f, y);
123
- P && (f = P.pixelX, y = P.pixelY);
122
+ onInteraction(h, u) {
123
+ if (u.type === "mousemove") {
124
+ if (c = u.pixelX, f = u.pixelY, l && u.inPlotArea) {
125
+ const P = h.coords.pickPoint(c, f);
126
+ P && (c = P.pixelX, f = P.pixelY);
124
127
  }
125
- C(d);
128
+ b(h);
126
129
  }
127
130
  },
128
131
  onViewChange() {
129
132
  }
130
133
  };
131
- function S(d) {
134
+ function S(h) {
132
135
  if (!v || !p) return;
133
- const a = d.render.canvasSize, P = d.render.pixelRatio;
134
- v.width = a.width * P, v.height = a.height * P, p.setTransform(1, 0, 0, 1, 0, 0), p.scale(P, P);
136
+ const u = h.render.canvasSize, P = h.render.pixelRatio;
137
+ v.width = u.width * P, v.height = u.height * P, p.setTransform(1, 0, 0, 1, 0, 0), p.scale(P, P);
135
138
  }
136
- function C(d) {
137
- var A;
139
+ function b(h) {
140
+ var F;
138
141
  if (!p || !v) return;
139
- const { width: a, height: P } = d.render.canvasSize;
140
- if (p.clearRect(0, 0, a, P), f < 0 || y < 0) return;
141
- const x = d.render.plotArea;
142
- if (f < x.x || f > x.x + x.width || y < x.y || y > x.y + x.height)
142
+ const { width: u, height: P } = h.render.canvasSize;
143
+ if (p.clearRect(0, 0, u, P), c < 0 || f < 0) return;
144
+ const x = h.render.plotArea;
145
+ if (c < x.x || c > x.x + x.width || f < x.y || f > x.y + x.height)
143
146
  return;
144
- const D = s || ((A = d.ui.theme.cursor) == null ? void 0 : A.color) || "#888888";
145
- p.save(), p.strokeStyle = D, p.lineWidth = n, o === "dashed" ? p.setLineDash([6, 4]) : o === "dotted" && p.setLineDash([2, 2]), e && (p.beginPath(), p.moveTo(f, x.y), p.lineTo(f, x.y + x.height), p.stroke()), t && (p.beginPath(), p.moveTo(x.x, y), p.lineTo(x.x + x.width, y), p.stroke()), p.restore(), i === "floating" ? g(d, p, f, y, D) : i === "corner" && m(d, p, f, y, D);
147
+ const I = r || ((F = h.ui.theme.cursor) == null ? void 0 : F.color) || "#888888";
148
+ p.save(), p.strokeStyle = I, p.lineWidth = o, a === "dashed" ? p.setLineDash([6, 4]) : a === "dotted" && p.setLineDash([2, 2]), e && (p.beginPath(), p.moveTo(c, x.y), p.lineTo(c, x.y + x.height), p.stroke()), t && (p.beginPath(), p.moveTo(x.x, f), p.lineTo(x.x + x.width, f), p.stroke()), p.restore(), i === "floating" ? g(h, p, c, f, I) : i === "corner" && y(h, p, c, f, I);
146
149
  }
147
- function g(d, a, P, x, D) {
148
- const A = d.coords.pixelToDataX(P), k = d.coords.pixelToDataY(x), M = d.render.plotArea;
149
- a.save(), a.font = "11px system-ui, sans-serif", a.textAlign = "center", a.textBaseline = "top";
150
- const z = A.toPrecision(c.xPrecision), w = a.measureText(z).width + 8, T = 18, F = P - w / 2, I = M.y + M.height + 2;
151
- a.fillStyle = D, a.fillRect(F, I, w, T), a.fillStyle = "#ffffff", a.fillText(z, P, I + 3), a.textAlign = "right", a.textBaseline = "middle";
152
- const R = k.toPrecision(c.yPrecision), Y = a.measureText(R).width + 8, L = 18, X = M.x - Y - 2, H = x - L / 2;
153
- a.fillStyle = D, a.fillRect(X, H, Y, L), a.fillStyle = "#ffffff", a.fillText(R, M.x - 6, x), a.restore();
150
+ function g(h, u, P, x, I) {
151
+ const F = h.coords.pixelToDataX(P), B = h.coords.pixelToDataY(x), M = h.render.plotArea;
152
+ u.save(), u.font = "11px system-ui, sans-serif", u.textAlign = "center", u.textBaseline = "top";
153
+ const _ = F.toPrecision(d.xPrecision), A = u.measureText(_).width + 8, T = 18, k = P - A / 2, C = M.y + M.height + 2;
154
+ u.fillStyle = I, u.fillRect(k, C, A, T), u.fillStyle = "#ffffff", u.fillText(_, P, C + 3), u.textAlign = "right", u.textBaseline = "middle";
155
+ const L = B.toPrecision(d.yPrecision), Y = u.measureText(L).width + 8, E = 18, R = M.x - Y - 2, U = x - E / 2;
156
+ u.fillStyle = I, u.fillRect(R, U, Y, E), u.fillStyle = "#ffffff", u.fillText(L, M.x - 6, x), u.restore();
154
157
  }
155
- function m(d, a, P, x, D) {
156
- const A = d.coords.pixelToDataX(P), k = d.coords.pixelToDataY(x), M = d.render.plotArea;
157
- a.save(), a.font = "11px system-ui, sans-serif";
158
- const z = `X: ${A.toPrecision(c.xPrecision)}`, h = `Y: ${k.toPrecision(c.yPrecision)}`, w = a.measureText(z), T = a.measureText(h), F = Math.max(w.width, T.width), I = 6, R = 16, E = F + I * 2, Y = R * 2 + I * 2;
159
- let L, X;
160
- switch (l) {
158
+ function y(h, u, P, x, I) {
159
+ const F = h.coords.pixelToDataX(P), B = h.coords.pixelToDataY(x), M = h.render.plotArea;
160
+ u.save(), u.font = "11px system-ui, sans-serif";
161
+ const _ = `X: ${F.toPrecision(d.xPrecision)}`, m = `Y: ${B.toPrecision(d.yPrecision)}`, A = u.measureText(_), T = u.measureText(m), k = Math.max(A.width, T.width), C = 6, L = 16, D = k + C * 2, Y = L * 2 + C * 2;
162
+ let E, R;
163
+ switch (s) {
161
164
  case "top-left":
162
- L = M.x + 8, X = M.y + 8;
165
+ E = M.x + 8, R = M.y + 8;
163
166
  break;
164
167
  case "top-right":
165
- L = M.x + M.width - E - 8, X = M.y + 8;
168
+ E = M.x + M.width - D - 8, R = M.y + 8;
166
169
  break;
167
170
  case "bottom-left":
168
- L = M.x + 8, X = M.y + M.height - Y - 8;
171
+ E = M.x + 8, R = M.y + M.height - Y - 8;
169
172
  break;
170
173
  case "bottom-right":
171
- L = M.x + M.width - E - 8, X = M.y + M.height - Y - 8;
174
+ E = M.x + M.width - D - 8, R = M.y + M.height - Y - 8;
172
175
  break;
173
176
  default:
174
- L = M.x + 8, X = M.y + 8;
177
+ E = M.x + 8, R = M.y + 8;
175
178
  }
176
- a.fillStyle = D, a.globalAlpha = 0.85, a.fillRect(L, X, E, Y), a.globalAlpha = 1, a.strokeStyle = "rgba(255,255,255,0.3)", a.lineWidth = 1, a.strokeRect(L, X, E, Y), a.fillStyle = "#ffffff", a.textAlign = "left", a.textBaseline = "top", a.fillText(z, L + I, X + I), a.fillText(h, L + I, X + I + R), a.restore();
179
+ u.fillStyle = I, u.globalAlpha = 0.85, u.fillRect(E, R, D, Y), u.globalAlpha = 1, u.strokeStyle = "rgba(255,255,255,0.3)", u.lineWidth = 1, u.strokeRect(E, R, D, Y), u.fillStyle = "#ffffff", u.textAlign = "left", u.textBaseline = "top", u.fillText(_, E + C, R + C), u.fillText(m, E + C, R + C + L), u.restore();
177
180
  }
178
181
  }
179
- ), he = {
182
+ ), be = {
180
183
  name: "statistics-overlay",
181
184
  version: "1.0.0",
182
185
  description: "Displays real-time statistics for chart data",
183
186
  provides: ["visualization", "analysis"],
184
187
  tags: ["statistics", "overlay", "analytics"]
185
- }, me = O(
186
- he,
187
- (r = {}) => {
188
+ }, Ae = z(
189
+ be,
190
+ (n = {}) => {
188
191
  const {
189
192
  position: e = "top-right",
190
193
  show: t = ["count", "mean", "min", "max"],
191
- seriesId: s,
192
- autoUpdate: o = !0
193
- } = r;
194
- let n, u = null;
194
+ seriesId: r,
195
+ autoUpdate: a = !0
196
+ } = n;
197
+ let o, l = null;
195
198
  return {
196
- onInit(l) {
197
- n = "stats-overlay";
198
- const f = {};
199
- e.includes("top") && (f.top = "10px"), e.includes("bottom") && (f.bottom = "10px"), e.includes("left") && (f.left = "10px"), e.includes("right") && (f.right = "10px"), u = l.ui.createOverlay(n, {
199
+ onInit(s) {
200
+ o = "stats-overlay";
201
+ const c = {};
202
+ e.includes("top") && (c.top = "10px"), e.includes("bottom") && (c.bottom = "10px"), e.includes("left") && (c.left = "10px"), e.includes("right") && (c.right = "10px"), l = s.ui.createOverlay(o, {
200
203
  zIndex: 800,
201
- position: f,
204
+ position: c,
202
205
  pointerEvents: !1
203
- }), u.innerHTML = `
206
+ }), l.innerHTML = `
204
207
  <div style="
205
208
  background: rgba(0, 0, 0, 0.85);
206
209
  color: #fff;
@@ -214,324 +217,324 @@ const ge = {
214
217
  <div style="font-weight: bold; margin-bottom: 4px; color: #4ade80;">📊 Statistics</div>
215
218
  <div class="stats-content"></div>
216
219
  </div>
217
- `, c(l);
220
+ `, d(s);
218
221
  },
219
- onDestroy(l) {
220
- l.ui.removeOverlay(n), u = null;
222
+ onDestroy(s) {
223
+ s.ui.removeOverlay(o), l = null;
221
224
  },
222
- onDataUpdate(l) {
223
- o && c(l);
225
+ onDataUpdate(s) {
226
+ a && d(s);
224
227
  },
225
- onSeriesAdd(l) {
226
- c(l);
228
+ onSeriesAdd(s) {
229
+ d(s);
227
230
  },
228
- onSeriesRemove(l) {
229
- c(l);
231
+ onSeriesRemove(s) {
232
+ d(s);
230
233
  },
231
234
  api: {
232
- refresh(l) {
233
- c(l);
235
+ refresh(s) {
236
+ d(s);
234
237
  }
235
238
  }
236
239
  };
237
- function c(l) {
238
- if (!u) return;
239
- const f = u.querySelector(".stats-content");
240
- if (!f) return;
241
- const y = l.data.getAllSeries(), b = s ? y.filter((C) => C.getId() === s) : y;
242
- if (b.length === 0) {
243
- f.innerHTML = "<div style='color: #888'>No data</div>";
240
+ function d(s) {
241
+ if (!l) return;
242
+ const c = l.querySelector(".stats-content");
243
+ if (!c) return;
244
+ const f = s.data.getAllSeries(), w = r ? f.filter((b) => b.getId() === r) : f;
245
+ if (w.length === 0) {
246
+ c.innerHTML = "<div style='color: #888'>No data</div>";
244
247
  return;
245
248
  }
246
249
  let v = [];
247
- if (b.forEach((C) => {
248
- const g = C.getData();
250
+ if (w.forEach((b) => {
251
+ const g = b.getData();
249
252
  g != null && g.y && (v = v.concat(Array.from(g.y)));
250
253
  }), v.length === 0) {
251
- f.innerHTML = "<div style='color: #888'>No data</div>";
254
+ c.innerHTML = "<div style='color: #888'>No data</div>";
252
255
  return;
253
256
  }
254
257
  const p = i(v), S = [];
255
- t.includes("count") && S.push(`<div>N: <span style="color: #60a5fa">${p.count.toLocaleString()}</span></div>`), t.includes("mean") && S.push(`<div>μ: <span style="color: #60a5fa">${p.mean.toPrecision(4)}</span></div>`), t.includes("min") && S.push(`<div>Min: <span style="color: #60a5fa">${p.min.toPrecision(4)}</span></div>`), t.includes("max") && S.push(`<div>Max: <span style="color: #60a5fa">${p.max.toPrecision(4)}</span></div>`), t.includes("std") && S.push(`<div>σ: <span style="color: #60a5fa">${p.std.toPrecision(4)}</span></div>`), t.includes("range") && S.push(`<div>Range: <span style="color: #60a5fa">${p.range.toPrecision(4)}</span></div>`), f.innerHTML = S.join("");
258
+ t.includes("count") && S.push(`<div>N: <span style="color: #60a5fa">${p.count.toLocaleString()}</span></div>`), t.includes("mean") && S.push(`<div>μ: <span style="color: #60a5fa">${p.mean.toPrecision(4)}</span></div>`), t.includes("min") && S.push(`<div>Min: <span style="color: #60a5fa">${p.min.toPrecision(4)}</span></div>`), t.includes("max") && S.push(`<div>Max: <span style="color: #60a5fa">${p.max.toPrecision(4)}</span></div>`), t.includes("std") && S.push(`<div>σ: <span style="color: #60a5fa">${p.std.toPrecision(4)}</span></div>`), t.includes("range") && S.push(`<div>Range: <span style="color: #60a5fa">${p.range.toPrecision(4)}</span></div>`), c.innerHTML = S.join("");
256
259
  }
257
- function i(l) {
258
- const f = l.length;
259
- let y = 0, b = 1 / 0, v = -1 / 0;
260
- for (const g of l)
261
- y += g, g < b && (b = g), g > v && (v = g);
262
- const p = y / f;
260
+ function i(s) {
261
+ const c = s.length;
262
+ let f = 0, w = 1 / 0, v = -1 / 0;
263
+ for (const g of s)
264
+ f += g, g < w && (w = g), g > v && (v = g);
265
+ const p = f / c;
263
266
  let S = 0;
264
- for (const g of l)
267
+ for (const g of s)
265
268
  S += (g - p) ** 2;
266
- const C = Math.sqrt(S / f);
269
+ const b = Math.sqrt(S / c);
267
270
  return {
268
- count: f,
271
+ count: c,
269
272
  mean: p,
270
- min: b,
273
+ min: w,
271
274
  max: v,
272
- std: C,
273
- range: v - b
275
+ std: b,
276
+ range: v - w
274
277
  };
275
278
  }
276
279
  }
277
- ), ye = {
280
+ ), Me = {
278
281
  name: "watermark",
279
282
  version: "1.0.0",
280
283
  description: "Adds a customizable watermark to the chart",
281
284
  provides: ["visualization"],
282
285
  tags: ["watermark", "branding", "overlay"]
283
- }, xe = O(
284
- ye,
285
- (r) => {
286
- if (!(r != null && r.text))
286
+ }, Fe = z(
287
+ Me,
288
+ (n) => {
289
+ if (!(n != null && n.text))
287
290
  throw new Error("WatermarkPlugin requires 'text' configuration");
288
291
  const {
289
292
  text: e,
290
293
  fontSize: t = 48,
291
- fontFamily: s = "system-ui, sans-serif",
292
- color: o = "rgba(128, 128, 128, 0.15)",
293
- position: n = "center",
294
- rotation: u = n === "center" ? -30 : 0
295
- } = r;
294
+ fontFamily: r = "system-ui, sans-serif",
295
+ color: a = "rgba(128, 128, 128, 0.15)",
296
+ position: o = "center",
297
+ rotation: l = o === "center" ? -30 : 0
298
+ } = n;
296
299
  return {
297
- onRenderOverlay(c) {
298
- const i = c.render.ctx2d;
300
+ onRenderOverlay(d) {
301
+ const i = d.render.ctx2d;
299
302
  if (!i) return;
300
- c.render.canvasSize;
301
- const l = c.render.plotArea;
302
- i.save(), i.font = `${t}px ${s}`, i.fillStyle = o, i.textAlign = "center", i.textBaseline = "middle";
303
- let f, y;
304
- n === "center" ? (f = l.x + l.width / 2, y = l.y + l.height / 2) : n === "bottom-right" ? (f = l.x + l.width - t, y = l.y + l.height - t / 2) : (f = l.x + t, y = l.y + l.height - t / 2), i.translate(f, y), i.rotate(u * Math.PI / 180), i.fillText(e, 0, 0), i.restore();
303
+ d.render.canvasSize;
304
+ const s = d.render.plotArea;
305
+ i.save(), i.font = `${t}px ${r}`, i.fillStyle = a, i.textAlign = "center", i.textBaseline = "middle";
306
+ let c, f;
307
+ o === "center" ? (c = s.x + s.width / 2, f = s.y + s.height / 2) : o === "bottom-right" ? (c = s.x + s.width - t, f = s.y + s.height - t / 2) : (c = s.x + t, f = s.y + s.height - t / 2), i.translate(c, f), i.rotate(l * Math.PI / 180), i.fillText(e, 0, 0), i.restore();
305
308
  }
306
309
  };
307
310
  }
308
- ), ve = {
311
+ ), Ce = {
309
312
  name: "grid-highlight",
310
313
  version: "1.0.0",
311
314
  description: "Highlights specific regions of the chart grid",
312
315
  provides: ["visualization"],
313
316
  tags: ["grid", "highlight", "regions"]
314
- }, Pe = O(
315
- ve,
316
- (r = {}) => {
317
- const { xIntervals: e = [], yIntervals: t = [], opacity: s = 0.1 } = r;
317
+ }, Ie = z(
318
+ Ce,
319
+ (n = {}) => {
320
+ const { xIntervals: e = [], yIntervals: t = [], opacity: r = 0.1 } = n;
318
321
  return {
319
- onRenderOverlay(o, n) {
320
- const u = o.render.ctx2d;
321
- if (!u) return;
322
- const c = o.render.plotArea;
323
- o.data.getViewBounds(), u.save(), u.beginPath(), u.rect(c.x, c.y, c.width, c.height), u.clip(), u.globalAlpha = s;
322
+ onRenderOverlay(a, o) {
323
+ const l = a.render.ctx2d;
324
+ if (!l) return;
325
+ const d = a.render.plotArea;
326
+ a.data.getViewBounds(), l.save(), l.beginPath(), l.rect(d.x, d.y, d.width, d.height), l.clip(), l.globalAlpha = r;
324
327
  for (const i of e) {
325
- const l = o.coords.dataToPixelX(i.start), f = o.coords.dataToPixelX(i.end);
326
- u.fillStyle = i.color, u.fillRect(
327
- Math.min(l, f),
328
- c.y,
329
- Math.abs(f - l),
330
- c.height
328
+ const s = a.coords.dataToPixelX(i.start), c = a.coords.dataToPixelX(i.end);
329
+ l.fillStyle = i.color, l.fillRect(
330
+ Math.min(s, c),
331
+ d.y,
332
+ Math.abs(c - s),
333
+ d.height
331
334
  );
332
335
  }
333
336
  for (const i of t) {
334
- const l = o.coords.dataToPixelY(i.start), f = o.coords.dataToPixelY(i.end);
335
- u.fillStyle = i.color, u.fillRect(
336
- c.x,
337
- Math.min(l, f),
338
- c.width,
339
- Math.abs(f - l)
337
+ const s = a.coords.dataToPixelY(i.start), c = a.coords.dataToPixelY(i.end);
338
+ l.fillStyle = i.color, l.fillRect(
339
+ d.x,
340
+ Math.min(s, c),
341
+ d.width,
342
+ Math.abs(c - s)
340
343
  );
341
344
  }
342
- u.restore();
345
+ l.restore();
343
346
  }
344
347
  };
345
348
  }
346
- ), Se = {
349
+ ), De = {
347
350
  name: "data-logger",
348
351
  version: "1.0.0",
349
352
  description: "Logs chart events for debugging and analysis",
350
353
  provides: ["analysis"],
351
354
  tags: ["debug", "logging", "events"]
352
- }, Te = O(
353
- Se,
354
- (r = {}) => {
355
+ }, ke = z(
356
+ De,
357
+ (n = {}) => {
355
358
  const {
356
359
  logDataUpdates: e = !0,
357
360
  logViewChanges: t = !0,
358
- logInteractions: s = !1,
359
- maxEntries: o = 100
360
- } = r, n = [];
361
- function u(c, i) {
362
- n.push({
361
+ logInteractions: r = !1,
362
+ maxEntries: a = 100
363
+ } = n, o = [];
364
+ function l(d, i) {
365
+ o.push({
363
366
  timestamp: Date.now(),
364
- type: c,
367
+ type: d,
365
368
  data: i
366
- }), n.length > o && n.shift();
369
+ }), o.length > a && o.shift();
367
370
  }
368
371
  return {
369
- onInit(c) {
370
- c.log.info("Data logger initialized");
372
+ onInit(d) {
373
+ d.log.info("Data logger initialized");
371
374
  },
372
- onDataUpdate(c, i) {
373
- e && (u("dataUpdate", {
375
+ onDataUpdate(d, i) {
376
+ e && (l("dataUpdate", {
374
377
  seriesId: i.seriesId,
375
378
  mode: i.mode,
376
379
  pointCount: i.pointCount
377
- }), c.log.debug(`Data update: ${i.seriesId} (${i.mode}, ${i.pointCount} points)`));
380
+ }), d.log.debug(`Data update: ${i.seriesId} (${i.mode}, ${i.pointCount} points)`));
378
381
  },
379
- onViewChange(c, i) {
380
- t && (u("viewChange", {
382
+ onViewChange(d, i) {
383
+ t && (l("viewChange", {
381
384
  trigger: i.trigger,
382
385
  bounds: i.current
383
- }), c.log.debug(`View change: ${i.trigger}`));
386
+ }), d.log.debug(`View change: ${i.trigger}`));
384
387
  },
385
- onInteraction(c, i) {
386
- s && u("interaction", {
388
+ onInteraction(d, i) {
389
+ r && l("interaction", {
387
390
  type: i.type,
388
391
  pixelX: i.pixelX,
389
392
  pixelY: i.pixelY,
390
393
  inPlotArea: i.inPlotArea
391
394
  });
392
395
  },
393
- onSerialize(c) {
394
- return { entries: n };
396
+ onSerialize(d) {
397
+ return { entries: o };
395
398
  },
396
- onDeserialize(c, i) {
397
- const l = i;
398
- l != null && l.entries && (n.length = 0, n.push(...l.entries));
399
+ onDeserialize(d, i) {
400
+ const s = i;
401
+ s != null && s.entries && (o.length = 0, o.push(...s.entries));
399
402
  },
400
403
  api: {
401
404
  getEntries() {
402
- return [...n];
405
+ return [...o];
403
406
  },
404
407
  clear() {
405
- n.length = 0;
408
+ o.length = 0;
406
409
  },
407
410
  export() {
408
- return JSON.stringify(n, null, 2);
411
+ return JSON.stringify(o, null, 2);
409
412
  }
410
413
  }
411
414
  };
412
415
  }
413
- ), we = {
416
+ ), Ee = {
414
417
  name: "direction-indicator",
415
418
  version: "1.0.0",
416
419
  description: "Shows an arrow indicating the direction and trend of streaming data",
417
420
  provides: ["visualization", "analysis"],
418
421
  tags: ["streaming", "direction", "trend", "arrow"]
419
- }, be = O(
420
- we,
421
- (r = {}) => {
422
+ }, Le = z(
423
+ Ee,
424
+ (n = {}) => {
422
425
  const {
423
426
  seriesId: e,
424
427
  sampleSize: t = 20,
425
- color: s,
426
- size: o = 40,
427
- minVelocity: n = 0.01,
428
- historySize: u = 20,
429
- idleTimeout: c
430
- } = r;
431
- let i, l = null, f = null, y = null, b = null;
428
+ color: r,
429
+ size: a = 40,
430
+ minVelocity: o = 0.01,
431
+ historySize: l = 20,
432
+ idleTimeout: d
433
+ } = n;
434
+ let i, s = null, c = null, f = null, w = null;
432
435
  const v = [], p = [], S = [];
433
- let C = u, g = null, m = Date.now(), d = -1 / 0, a = -1 / 0, P = c;
436
+ let b = l, g = null, y = Date.now(), h = -1 / 0, u = -1 / 0, P = d;
434
437
  return {
435
- onInit(h) {
438
+ onInit(m) {
436
439
  i = "direction-indicator-overlay";
437
- const w = h.ui.createOverlay(i, {
440
+ const A = m.ui.createOverlay(i, {
438
441
  zIndex: 600,
439
442
  position: { top: "0", left: "0", right: "0", bottom: "0" },
440
443
  pointerEvents: !1
441
444
  });
442
- if (l = document.createElement("canvas"), l.style.cssText = "width: 100%; height: 100%; pointer-events: none;", w.appendChild(l), f = l.getContext("2d"), x(h), e)
443
- b = e;
445
+ if (s = document.createElement("canvas"), s.style.cssText = "width: 100%; height: 100%; pointer-events: none;", A.appendChild(s), c = s.getContext("2d"), x(m), e)
446
+ w = e;
444
447
  else {
445
- const T = h.data.getAllSeries();
446
- T.length > 0 && (b = T[0].getId());
448
+ const T = m.data.getAllSeries();
449
+ T.length > 0 && (w = T[0].getId());
447
450
  }
448
451
  },
449
- onDestroy(h) {
450
- h.ui.removeOverlay(i), g && clearTimeout(g), l = null, f = null, y = null;
452
+ onDestroy(m) {
453
+ m.ui.removeOverlay(i), g && clearTimeout(g), s = null, c = null, f = null;
451
454
  },
452
- onResize(h) {
453
- x(h);
455
+ onResize(m) {
456
+ x(m);
454
457
  },
455
- onAfterRender(h) {
456
- if (D(h), M(h), P) {
458
+ onAfterRender(m) {
459
+ if (I(m), M(m), P) {
457
460
  g && clearTimeout(g);
458
- const w = Date.now() - m;
459
- w < P && (g = setTimeout(() => {
460
- h.requestRender();
461
- }, P - w + 10));
461
+ const A = Date.now() - y;
462
+ A < P && (g = setTimeout(() => {
463
+ m.requestRender();
464
+ }, P - A + 10));
462
465
  }
463
466
  },
464
- onConfigChange(h, w) {
465
- if (w.historySize !== void 0) {
466
- for (C = w.historySize; v.length > C; ) v.shift();
467
- for (; p.length > C; ) p.shift();
468
- for (; S.length > C; ) S.shift();
467
+ onConfigChange(m, A) {
468
+ if (A.historySize !== void 0) {
469
+ for (b = A.historySize; v.length > b; ) v.shift();
470
+ for (; p.length > b; ) p.shift();
471
+ for (; S.length > b; ) S.shift();
469
472
  }
470
- w.idleTimeout !== void 0 && (P = w.idleTimeout);
473
+ A.idleTimeout !== void 0 && (P = A.idleTimeout);
471
474
  }
472
475
  };
473
- function x(h) {
474
- if (!l || !f) return;
475
- const w = h.render.canvasSize, T = h.render.pixelRatio;
476
- l.width = w.width * T, l.height = w.height * T, f.setTransform(1, 0, 0, 1, 0, 0), f.scale(T, T);
476
+ function x(m) {
477
+ if (!s || !c) return;
478
+ const A = m.render.canvasSize, T = m.render.pixelRatio;
479
+ s.width = A.width * T, s.height = A.height * T, c.setTransform(1, 0, 0, 1, 0, 0), c.scale(T, T);
477
480
  }
478
- function D(h) {
479
- if (!b || !h.data.getSeries(b)) return;
480
- const T = h.data.getSeriesData(b);
481
+ function I(m) {
482
+ if (!w || !m.data.getSeries(w)) return;
483
+ const T = m.data.getSeriesData(w);
481
484
  if (!T || !T.x || !T.y) return;
482
- const F = T.x.length;
483
- if (F < 2) return;
484
- const I = T.x[F - 1], R = T.y[F - 1];
485
- (I !== d || R !== a) && (d = I, a = R, m = Date.now());
486
- const E = Math.min(t, F), Y = F - E;
487
- let L = 0, X = 0, H = 0, V = 0, U = 0, K = 0;
488
- for (let $ = Y; $ < F; $++) {
489
- const B = $ - Y, le = T.x[$], ce = T.y[$], j = h.coords.dataToPixelX(le), J = h.coords.dataToPixelY(ce);
490
- L += B, X += j, H += J, V += B * j, U += B * J, K += B * B;
485
+ const k = T.x.length;
486
+ if (k < 2) return;
487
+ const C = T.x[k - 1], L = T.y[k - 1];
488
+ (C !== h || L !== u) && (h = C, u = L, y = Date.now());
489
+ const D = Math.min(t, k), Y = k - D;
490
+ let E = 0, R = 0, U = 0, K = 0, j = 0, J = 0;
491
+ for (let W = Y; W < k; W++) {
492
+ const G = W - Y, ye = T.x[W], xe = T.y[W], Q = m.coords.dataToPixelX(ye), Z = m.coords.dataToPixelY(xe);
493
+ E += G, R += Q, U += Z, K += G * Q, j += G * Z, J += G * G;
491
494
  }
492
- const q = L / E, Z = X / E, ee = H / E, W = K - E * q * q;
493
- if (Math.abs(W) < 1e-10) return;
494
- const G = (V - E * q * Z) / W, N = (U - E * q * ee) / W, te = Math.atan2(N, G), ne = h.coords.dataToPixelX(I), ae = h.coords.dataToPixelY(R);
495
- v.push(ne), p.push(ae), v.length > C && (v.shift(), p.shift()), S.push(te), S.length > C && S.shift();
496
- const oe = A(v), re = A(p), ie = k(S), se = Math.sqrt(G * G + N * N);
497
- y = { angle: ie, magnitude: se, lastX: I, lastY: R, smoothX: oe, smoothY: re };
495
+ const $ = E / D, le = R / D, ce = U / D, H = J - D * $ * $;
496
+ if (Math.abs(H) < 1e-10) return;
497
+ const N = (K - D * $ * le) / H, q = (j - D * $ * ce) / H, de = Math.atan2(q, N), ue = m.coords.dataToPixelX(C), fe = m.coords.dataToPixelY(L);
498
+ v.push(ue), p.push(fe), v.length > b && (v.shift(), p.shift()), S.push(de), S.length > b && S.shift();
499
+ const he = F(v), ge = F(p), pe = B(S), me = Math.sqrt(N * N + q * q);
500
+ f = { angle: pe, magnitude: me, lastX: C, lastY: L, smoothX: he, smoothY: ge };
498
501
  }
499
- function A(h) {
500
- return h.length === 0 ? 0 : h.reduce((w, T) => w + T, 0) / h.length;
502
+ function F(m) {
503
+ return m.length === 0 ? 0 : m.reduce((A, T) => A + T, 0) / m.length;
501
504
  }
502
- function k(h) {
503
- if (h.length === 0) return 0;
504
- let w = 0, T = 0;
505
- for (const F of h)
506
- w += Math.cos(F), T += Math.sin(F);
507
- return Math.atan2(T / h.length, w / h.length);
505
+ function B(m) {
506
+ if (m.length === 0) return 0;
507
+ let A = 0, T = 0;
508
+ for (const k of m)
509
+ A += Math.cos(k), T += Math.sin(k);
510
+ return Math.atan2(T / m.length, A / m.length);
508
511
  }
509
- function M(h) {
510
- if (!f || !l || !y) return;
511
- const { width: w, height: T } = h.render.canvasSize;
512
- if (f.clearRect(0, 0, w, T), P !== void 0 && Date.now() - m > P || y.magnitude < n) return;
513
- const F = y.smoothX, I = y.smoothY, R = s || "#FF9800";
514
- f.save(), z(f, F, I, y.angle, o, R), f.restore();
512
+ function M(m) {
513
+ if (!c || !s || !f) return;
514
+ const { width: A, height: T } = m.render.canvasSize;
515
+ if (c.clearRect(0, 0, A, T), P !== void 0 && Date.now() - y > P || f.magnitude < o) return;
516
+ const k = f.smoothX, C = f.smoothY, L = r || "#FF9800";
517
+ c.save(), _(c, k, C, f.angle, a, L), c.restore();
515
518
  }
516
- function z(h, w, T, F, I, R) {
517
- const E = I * 0.6, Y = I * 0.4;
518
- h.save(), h.translate(w, T), h.rotate(F), h.fillStyle = R, h.beginPath(), h.moveTo(E / 2, 0), h.lineTo(-E / 2, -Y / 2), h.lineTo(-E / 2, Y / 2), h.closePath(), h.fill(), h.restore();
519
+ function _(m, A, T, k, C, L) {
520
+ const D = C * 0.6, Y = C * 0.4;
521
+ m.save(), m.translate(A, T), m.rotate(k), m.fillStyle = L, m.beginPath(), m.moveTo(D / 2, 0), m.lineTo(-D / 2, -Y / 2), m.lineTo(-D / 2, Y / 2), m.closePath(), m.fill(), m.restore();
519
522
  }
520
523
  }
521
- ), Le = {
522
- Crosshair: pe,
523
- Statistics: me,
524
- Watermark: xe,
525
- GridHighlight: Pe,
526
- DataLogger: Te,
527
- DirectionIndicator: be
528
- }, Ce = {
524
+ ), it = {
525
+ Crosshair: Te,
526
+ Statistics: Ae,
527
+ Watermark: Fe,
528
+ GridHighlight: Ie,
529
+ DataLogger: ke,
530
+ DirectionIndicator: Le
531
+ }, Re = {
529
532
  name: "velo-plot-drag-edit",
530
533
  version: "1.0.0",
531
534
  description: "Interactive drag & drop editing of data points",
532
535
  provides: ["drag-edit", "point-editing"],
533
536
  tags: ["interaction", "editing", "ux"]
534
- }, Me = {
537
+ }, Ye = {
535
538
  enabled: !0,
536
539
  constraint: "both",
537
540
  snapToGrid: !1,
@@ -556,89 +559,89 @@ const ge = {
556
559
  opacity: 0.5
557
560
  }
558
561
  };
559
- function Re(r = {}) {
560
- const e = { ...Me, ...r };
561
- let t = null, s = !1, o = null, n = 0, u = 0, c = !1;
562
- function i(g, m) {
562
+ function st(n = {}) {
563
+ const e = { ...Ye, ...n };
564
+ let t = null, r = !1, a = null, o = 0, l = 0, d = !1;
565
+ function i(g, y) {
563
566
  if (!t) return null;
564
- const d = t.coords.pickPoint(g, m, e.hitRadius);
565
- return !d || e.editableSeries.length > 0 && !e.editableSeries.includes(d.seriesId) ? null : {
566
- seriesId: d.seriesId,
567
- index: d.index,
568
- originalX: d.x,
569
- originalY: d.y,
570
- currentX: d.x,
571
- currentY: d.y
567
+ const h = t.coords.pickPoint(g, y, e.hitRadius);
568
+ return !h || e.editableSeries.length > 0 && !e.editableSeries.includes(h.seriesId) ? null : {
569
+ seriesId: h.seriesId,
570
+ index: h.index,
571
+ originalX: h.x,
572
+ originalY: h.y,
573
+ currentX: h.x,
574
+ currentY: h.y
572
575
  };
573
576
  }
574
- function l(g, m) {
577
+ function s(g, y) {
575
578
  return t ? {
576
579
  x: t.coords.pixelToDataX(g),
577
- y: t.coords.pixelToDataY(m)
580
+ y: t.coords.pixelToDataY(y)
578
581
  } : { x: 0, y: 0 };
579
582
  }
580
- function f(g, m) {
581
- return Math.round(g / m) * m;
583
+ function c(g, y) {
584
+ return Math.round(g / y) * y;
582
585
  }
583
- function y(g, m, d) {
584
- if (!o) return { x: g, y: m };
585
- switch (d) {
586
+ function f(g, y, h) {
587
+ if (!a) return { x: g, y };
588
+ switch (h) {
586
589
  case "x":
587
- return { x: g, y: o.originalY };
590
+ return { x: g, y: a.originalY };
588
591
  case "y":
589
- return { x: o.originalX, y: m };
592
+ return { x: a.originalX, y };
590
593
  case "none":
591
- return { x: o.originalX, y: o.originalY };
594
+ return { x: a.originalX, y: a.originalY };
592
595
  default:
593
- return { x: g, y: m };
596
+ return { x: g, y };
594
597
  }
595
598
  }
596
- function b(g, m) {
597
- let d = g, a = m;
598
- if (e.snapToGrid && (d = f(g, e.snapIntervalX), a = f(m, e.snapIntervalY)), o && e.validator) {
599
- const P = { ...o, currentX: d, currentY: a }, x = e.validator(P);
599
+ function w(g, y) {
600
+ let h = g, u = y;
601
+ if (e.snapToGrid && (h = c(g, e.snapIntervalX), u = c(y, e.snapIntervalY)), a && e.validator) {
602
+ const P = { ...a, currentX: h, currentY: u }, x = e.validator(P);
600
603
  if (typeof x == "boolean")
601
- return { x: d, y: a, valid: x };
604
+ return { x: h, y: u, valid: x };
602
605
  if (!x.valid)
603
- return { x: d, y: a, valid: !1 };
604
- x.snapX !== void 0 && (d = x.snapX), x.snapY !== void 0 && (a = x.snapY);
606
+ return { x: h, y: u, valid: !1 };
607
+ x.snapX !== void 0 && (h = x.snapX), x.snapY !== void 0 && (u = x.snapY);
605
608
  }
606
- return { x: d, y: a, valid: !0 };
609
+ return { x: h, y: u, valid: !0 };
607
610
  }
608
- function v(g, m, d, a) {
609
- var D, A, k;
611
+ function v(g, y, h, u) {
612
+ var I, F, B;
610
613
  if (!t) return;
611
- const P = (A = (D = t.chart).getSeries) == null ? void 0 : A.call(D, g);
614
+ const P = (F = (I = t.chart).getSeries) == null ? void 0 : F.call(I, g);
612
615
  if (!P) return;
613
616
  const x = P.getData();
614
- !x || !x.x || !x.y || (x.x[m] = d, x.y[m] = a, (k = P.invalidateBuffers) == null || k.call(P), t.requestRender());
617
+ !x || !x.x || !x.y || (x.x[y] = h, x.y[y] = u, (B = P.invalidateBuffers) == null || B.call(P), t.requestRender());
615
618
  }
616
619
  function p() {
617
- return o ? {
618
- seriesId: o.seriesId,
619
- index: o.index,
620
- oldX: o.originalX,
621
- oldY: o.originalY,
622
- newX: o.currentX,
623
- newY: o.currentY,
624
- deltaX: o.currentX - o.originalX,
625
- deltaY: o.currentY - o.originalY
620
+ return a ? {
621
+ seriesId: a.seriesId,
622
+ index: a.index,
623
+ oldX: a.originalX,
624
+ oldY: a.originalY,
625
+ newX: a.currentX,
626
+ newY: a.currentY,
627
+ deltaX: a.currentX - a.originalX,
628
+ deltaY: a.currentY - a.originalY
626
629
  } : null;
627
630
  }
628
631
  function S(g) {
629
- if (!s || !o || !e.showPreview) return;
630
- const { render: m, coords: d } = g, { ctx2d: a } = m;
631
- if (!a) return;
632
- a.save();
633
- const P = d.dataToPixelX(o.originalX), x = d.dataToPixelY(o.originalY), D = d.dataToPixelX(o.currentX), A = d.dataToPixelY(o.currentY);
634
- a.strokeStyle = e.previewStyle.color || "#ffffff", a.lineWidth = e.previewStyle.width || 2, a.globalAlpha = e.previewStyle.opacity || 0.5, a.setLineDash(e.previewStyle.dash || [5, 5]), a.beginPath(), a.moveTo(P, x), a.lineTo(D, A), a.stroke(), a.globalAlpha = 1, a.fillStyle = e.highlightColor, a.setLineDash([]), a.beginPath(), a.arc(D, A, 6, 0, Math.PI * 2), a.fill(), a.strokeStyle = "#000000", a.lineWidth = 1, a.stroke(), a.restore();
632
+ if (!r || !a || !e.showPreview) return;
633
+ const { render: y, coords: h } = g, { ctx2d: u } = y;
634
+ if (!u) return;
635
+ u.save();
636
+ const P = h.dataToPixelX(a.originalX), x = h.dataToPixelY(a.originalY), I = h.dataToPixelX(a.currentX), F = h.dataToPixelY(a.currentY);
637
+ u.strokeStyle = e.previewStyle.color || "#ffffff", u.lineWidth = e.previewStyle.width || 2, u.globalAlpha = e.previewStyle.opacity || 0.5, u.setLineDash(e.previewStyle.dash || [5, 5]), u.beginPath(), u.moveTo(P, x), u.lineTo(I, F), u.stroke(), u.globalAlpha = 1, u.fillStyle = e.highlightColor, u.setLineDash([]), u.beginPath(), u.arc(I, F, 6, 0, Math.PI * 2), u.fill(), u.strokeStyle = "#000000", u.lineWidth = 1, u.stroke(), u.restore();
635
638
  }
636
- const C = {
639
+ const b = {
637
640
  enable() {
638
641
  e.enabled = !0;
639
642
  },
640
643
  disable() {
641
- e.enabled = !1, s && (o = null, s = !1, c = !1, t == null || t.requestRender());
644
+ e.enabled = !1, r && (a = null, r = !1, d = !1, t == null || t.requestRender());
642
645
  },
643
646
  isEnabled() {
644
647
  return e.enabled;
@@ -647,73 +650,545 @@ function Re(r = {}) {
647
650
  e.editableSeries = g;
648
651
  },
649
652
  getDraggedPoint() {
650
- return o;
653
+ return a;
651
654
  },
652
655
  cancelDrag() {
653
- s && o && (o = null, s = !1, c = !1, t == null || t.requestRender());
656
+ r && a && (a = null, r = !1, d = !1, t == null || t.requestRender());
654
657
  },
655
658
  updateConfig(g) {
656
659
  Object.assign(e, g);
657
660
  }
658
661
  };
659
662
  return {
660
- manifest: Ce,
663
+ manifest: Re,
661
664
  onInit(g) {
662
- t = g, t.chart.dragEdit = C;
665
+ t = g, t.chart.dragEdit = b;
663
666
  },
664
667
  onDestroy(g) {
665
668
  delete g.chart.dragEdit, t = null;
666
669
  },
667
- onInteraction(g, m) {
670
+ onInteraction(g, y) {
668
671
  if (e.enabled) {
669
- if (m.type === "mousedown") {
670
- const d = i(m.pixelX, m.pixelY);
671
- d && (o = d, n = m.pixelX, u = m.pixelY, c = !1, s = !1, m.preventDefault());
672
- } else if (m.type === "mousemove") {
673
- if (!o) return;
674
- if (!s) {
675
- const A = m.pixelX - n, k = m.pixelY - u;
676
- if (Math.sqrt(A * A + k * k) > e.dragThreshold) {
677
- s = !0, c = !0;
678
- const z = p();
679
- z && e.onDragStart(z);
672
+ if (y.type === "mousedown") {
673
+ const h = i(y.pixelX, y.pixelY);
674
+ h && (a = h, o = y.pixelX, l = y.pixelY, d = !1, r = !1, y.preventDefault());
675
+ } else if (y.type === "mousemove") {
676
+ if (!a) return;
677
+ if (!r) {
678
+ const F = y.pixelX - o, B = y.pixelY - l;
679
+ if (Math.sqrt(F * F + B * B) > e.dragThreshold) {
680
+ r = !0, d = !0;
681
+ const _ = p();
682
+ _ && e.onDragStart(_);
680
683
  } else
681
684
  return;
682
685
  }
683
- s && m.preventDefault();
684
- let { x: d, y: a } = l(m.pixelX, m.pixelY);
685
- ({ x: d, y: a } = y(d, a, e.constraint));
686
- const { x: P, y: x, valid: D } = b(d, a);
687
- if (D) {
688
- o.currentX = P, o.currentY = x;
689
- const A = p();
690
- A && e.onDrag(A), t == null || t.requestRender();
686
+ r && y.preventDefault();
687
+ let { x: h, y: u } = s(y.pixelX, y.pixelY);
688
+ ({ x: h, y: u } = f(h, u, e.constraint));
689
+ const { x: P, y: x, valid: I } = w(h, u);
690
+ if (I) {
691
+ a.currentX = P, a.currentY = x;
692
+ const F = p();
693
+ F && e.onDrag(F), t == null || t.requestRender();
691
694
  }
692
- } else if (m.type === "mouseup") {
693
- if (!o) return;
694
- if (s && c) {
695
+ } else if (y.type === "mouseup") {
696
+ if (!a) return;
697
+ if (r && d) {
695
698
  v(
696
- o.seriesId,
697
- o.index,
698
- o.currentX,
699
- o.currentY
699
+ a.seriesId,
700
+ a.index,
701
+ a.currentX,
702
+ a.currentY
700
703
  );
701
- const d = p();
702
- d && e.onDragEnd(d), m.preventDefault();
704
+ const h = p();
705
+ h && e.onDragEnd(h), y.preventDefault();
703
706
  }
704
- o = null, s = !1, c = !1, t == null || t.requestRender();
707
+ a = null, r = !1, d = !1, t == null || t.requestRender();
705
708
  }
706
709
  }
707
710
  },
708
711
  onRenderOverlay(g) {
709
712
  S(g);
710
713
  },
711
- api: C
714
+ api: b
715
+ };
716
+ }
717
+ const Xe = {
718
+ name: "velo-plot-drawing-tools",
719
+ version: "1.0.0",
720
+ description: "Interactive trendline, horizontal, vertical, and rectangle drawing",
721
+ provides: ["drawing"],
722
+ tags: ["drawing", "annotations", "trading"]
723
+ };
724
+ function lt(n = {}) {
725
+ let e = null, t = {
726
+ mode: "none",
727
+ pending: null,
728
+ undoStack: [],
729
+ redoStack: []
730
+ }, r = null;
731
+ const a = n.color ?? "#38bdf8";
732
+ function o() {
733
+ var i, s;
734
+ return ((s = e == null ? void 0 : (i = e.chart).getAnnotations) == null ? void 0 : s.call(i)) ?? [];
735
+ }
736
+ function l() {
737
+ t.undoStack.push(o()), t.redoStack = [];
738
+ }
739
+ return {
740
+ manifest: Xe,
741
+ api: {
742
+ setMode(i) {
743
+ t.mode = i, t.pending = null;
744
+ },
745
+ getMode() {
746
+ return t.mode;
747
+ },
748
+ undo() {
749
+ if (!e || t.undoStack.length === 0) return !1;
750
+ t.redoStack.push(o());
751
+ const i = t.undoStack.pop(), s = o();
752
+ for (const c of s) e.chart.removeAnnotation(c.id);
753
+ for (const c of i) e.chart.addAnnotation(c);
754
+ return !0;
755
+ },
756
+ redo() {
757
+ if (!e || t.redoStack.length === 0) return !1;
758
+ t.undoStack.push(o());
759
+ const i = t.redoStack.pop(), s = o();
760
+ for (const c of s) e.chart.removeAnnotation(c.id);
761
+ for (const c of i) e.chart.addAnnotation(c);
762
+ return !0;
763
+ },
764
+ clear() {
765
+ if (e) {
766
+ l();
767
+ for (const i of o()) e.chart.removeAnnotation(i.id);
768
+ }
769
+ }
770
+ },
771
+ onInit(i) {
772
+ e = i, r = (s) => {
773
+ if (!e || t.mode === "none" || t.mode === "pan") return;
774
+ const { x: c, y: f } = s.point;
775
+ if (t.mode === "horizontal") {
776
+ l(), e.chart.addAnnotation({
777
+ type: "horizontal-line",
778
+ y: f,
779
+ color: a,
780
+ interactive: !0
781
+ });
782
+ return;
783
+ }
784
+ if (t.mode === "vertical") {
785
+ l(), e.chart.addAnnotation({
786
+ type: "vertical-line",
787
+ x: c,
788
+ color: a,
789
+ interactive: !0
790
+ });
791
+ return;
792
+ }
793
+ if (!t.pending) {
794
+ t.pending = { x: c, y: f };
795
+ return;
796
+ }
797
+ const w = t.pending;
798
+ t.pending = null, l(), t.mode === "trendline" ? e.chart.addAnnotation({
799
+ type: "arrow",
800
+ x1: w.x,
801
+ y1: w.y,
802
+ x2: c,
803
+ y2: f,
804
+ color: a,
805
+ interactive: !0
806
+ }) : t.mode === "rectangle" && e.chart.addAnnotation({
807
+ type: "rectangle",
808
+ xMin: Math.min(w.x, c),
809
+ xMax: Math.max(w.x, c),
810
+ yMin: Math.min(w.y, f),
811
+ yMax: Math.max(w.y, f),
812
+ strokeColor: a,
813
+ fillColor: a + "22",
814
+ interactive: !0
815
+ });
816
+ }, e.chart.on("click", r);
817
+ },
818
+ onDestroy(i) {
819
+ r && i.chart.off("click", r), e = null, r = null;
820
+ }
821
+ };
822
+ }
823
+ const Be = {
824
+ name: "velo-plot-replay",
825
+ version: "1.0.0",
826
+ description: "Bar-by-bar chart replay with speed control",
827
+ provides: ["replay"],
828
+ tags: ["replay", "trading"]
829
+ };
830
+ function ct(n) {
831
+ let e = null, t = null, r = 0, a = null, o = 1;
832
+ const l = n.frameMs ?? 250;
833
+ function d(s) {
834
+ if (!e || !t) return;
835
+ const c = Math.min(s + 1, t.x.length), f = (w) => w ? w.subarray(0, c) : void 0;
836
+ e.chart.updateSeries(n.seriesId, {
837
+ x: f(t.x),
838
+ y: f(t.y),
839
+ open: f(t.open),
840
+ high: f(t.high),
841
+ low: f(t.low),
842
+ close: f(t.close)
843
+ });
844
+ }
845
+ const i = {
846
+ play(s = 1) {
847
+ t && (o = Math.max(0.1, s), a && clearInterval(a), a = setInterval(() => {
848
+ if (r >= t.x.length - 1) {
849
+ i.pause();
850
+ return;
851
+ }
852
+ r++, d(r);
853
+ }, l / o));
854
+ },
855
+ pause() {
856
+ a && (clearInterval(a), a = null);
857
+ },
858
+ step(s = 1) {
859
+ t && (r = Math.min(t.x.length - 1, r + s), d(r));
860
+ },
861
+ seek(s) {
862
+ t && (r = Math.max(0, Math.min(t.x.length - 1, s)), d(r));
863
+ },
864
+ getIndex() {
865
+ return r;
866
+ },
867
+ getLength() {
868
+ return (t == null ? void 0 : t.x.length) ?? 0;
869
+ },
870
+ isPlaying() {
871
+ return a != null;
872
+ }
873
+ };
874
+ return {
875
+ manifest: Be,
876
+ api: i,
877
+ onInit(s) {
878
+ e = s;
879
+ const c = e.chart.getSeries(n.seriesId);
880
+ if (!c) {
881
+ console.warn(`[PluginReplay] Series "${n.seriesId}" not found`);
882
+ return;
883
+ }
884
+ const f = c.getData();
885
+ t = {
886
+ x: Float32Array.from(f.x),
887
+ y: f.y ? Float32Array.from(f.y) : void 0,
888
+ open: f.open ? Float32Array.from(f.open) : void 0,
889
+ high: f.high ? Float32Array.from(f.high) : void 0,
890
+ low: f.low ? Float32Array.from(f.low) : void 0,
891
+ close: f.close ? Float32Array.from(f.close) : void 0
892
+ }, r = Math.max(0, t.x.length - 1);
893
+ },
894
+ onDestroy() {
895
+ i.pause(), e = null, t = null;
896
+ }
897
+ };
898
+ }
899
+ const _e = `
900
+ attribute vec2 aPosition;
901
+ uniform vec2 uResolution;
902
+ void main() {
903
+ vec2 clip = (aPosition / uResolution) * 2.0 - 1.0;
904
+ gl_Position = vec4(clip.x, -clip.y, 0.0, 1.0);
905
+ }
906
+ `, ze = `
907
+ precision mediump float;
908
+ uniform vec4 uColor;
909
+ void main() {
910
+ gl_FragColor = uColor;
911
+ }
912
+ `;
913
+ function ne(n, e, t) {
914
+ const r = n.createShader(e);
915
+ if (!r) throw new Error("createShader failed");
916
+ if (n.shaderSource(r, t), n.compileShader(r), !n.getShaderParameter(r, n.COMPILE_STATUS))
917
+ throw new Error(n.getShaderInfoLog(r) ?? "shader compile failed");
918
+ return r;
919
+ }
920
+ function We(n) {
921
+ const e = ne(n, n.VERTEX_SHADER, _e), t = ne(n, n.FRAGMENT_SHADER, ze), r = n.createProgram();
922
+ if (!r) throw new Error("createProgram failed");
923
+ if (n.attachShader(r, e), n.attachShader(r, t), n.linkProgram(r), !n.getProgramParameter(r, n.LINK_STATUS))
924
+ throw new Error(n.getProgramInfoLog(r) ?? "program link failed");
925
+ return n.deleteShader(e), n.deleteShader(t), r;
926
+ }
927
+ function Ge(n) {
928
+ const { plotArea: e, xLines: t, yLines: r } = n, a = e.y, o = e.y + e.height, l = e.x, d = e.x + e.width, i = (t.length + r.length) * 2, s = new Float32Array(i * 2);
929
+ let c = 0;
930
+ for (const f of t)
931
+ s[c++] = f, s[c++] = a, s[c++] = f, s[c++] = o;
932
+ for (const f of r)
933
+ s[c++] = l, s[c++] = f, s[c++] = d, s[c++] = f;
934
+ return s;
935
+ }
936
+ class Ue {
937
+ constructor(e) {
938
+ X(this, "gl");
939
+ X(this, "program");
940
+ X(this, "buffer");
941
+ X(this, "aPosition");
942
+ X(this, "uResolution");
943
+ X(this, "uColor");
944
+ const t = e.getContext("webgl", {
945
+ alpha: !0,
946
+ antialias: !1,
947
+ preserveDrawingBuffer: !0
948
+ });
949
+ if (!t) throw new Error("WebGL not available for grid spike");
950
+ this.gl = t, this.program = We(t), this.aPosition = t.getAttribLocation(this.program, "aPosition"), this.uResolution = t.getUniformLocation(this.program, "uResolution"), this.uColor = t.getUniformLocation(this.program, "uColor");
951
+ const r = t.createBuffer();
952
+ if (!r) throw new Error("createBuffer failed");
953
+ this.buffer = r;
954
+ }
955
+ /** Upload vertices and draw grid lines */
956
+ draw(e) {
957
+ const t = this.gl, r = Ge(e), a = r.length / 4;
958
+ t.viewport(0, 0, e.width, e.height), t.clearColor(0.04, 0.05, 0.08, 1), t.clear(t.COLOR_BUFFER_BIT), t.useProgram(this.program), t.bindBuffer(t.ARRAY_BUFFER, this.buffer), t.bufferData(t.ARRAY_BUFFER, r, t.DYNAMIC_DRAW), t.enableVertexAttribArray(this.aPosition), t.vertexAttribPointer(this.aPosition, 2, t.FLOAT, !1, 0, 0), t.uniform2f(this.uResolution, e.width, e.height);
959
+ const o = e.color ?? [0.2, 0.22, 0.3, 0.6];
960
+ return t.uniform4f(this.uColor, o[0], o[1], o[2], o[3]), t.lineWidth(e.lineWidth ?? 1), t.drawArrays(t.LINES, 0, r.length / 2), a;
961
+ }
962
+ destroy() {
963
+ const e = this.gl;
964
+ e.deleteBuffer(this.buffer), e.deleteProgram(this.program);
965
+ }
966
+ }
967
+ function $e(n) {
968
+ const e = () => {
969
+ };
970
+ return {
971
+ canvas: n,
972
+ strokeStyle: "",
973
+ fillStyle: "",
974
+ lineWidth: 1,
975
+ font: "",
976
+ textAlign: "left",
977
+ textBaseline: "alphabetic",
978
+ beginPath: e,
979
+ moveTo: e,
980
+ lineTo: e,
981
+ stroke: e,
982
+ fill: e,
983
+ clearRect: e,
984
+ setTransform: e,
985
+ setLineDash: e,
986
+ save: e,
987
+ restore: e,
988
+ translate: e,
989
+ rotate: e,
990
+ fillText: e,
991
+ measureText: (t) => ({ width: t.length * 7 })
992
+ };
993
+ }
994
+ function Oe(n, e) {
995
+ const t = document.createElement("canvas");
996
+ return t.width = n, t.height = e, t.getContext("2d") ?? $e(t);
997
+ }
998
+ function ae(n, e) {
999
+ const t = { top: 40, right: 40, bottom: 50, left: 60 };
1000
+ return {
1001
+ x: t.left,
1002
+ y: t.top,
1003
+ width: n - t.left - t.right,
1004
+ height: e - t.top - t.bottom
1005
+ };
1006
+ }
1007
+ function ie(n, e, t, r, a) {
1008
+ const o = e.ticks(r).map((d) => te(e.transform(d))), l = t.ticks(a).map((d) => te(t.transform(d)));
1009
+ return { xLines: o, yLines: l };
1010
+ }
1011
+ function se(n, e) {
1012
+ const t = [];
1013
+ for (let o = 0; o < e; o++) {
1014
+ const l = performance.now();
1015
+ n(), t.push((performance.now() - l) * 1e3);
1016
+ }
1017
+ t.sort((o, l) => o - l);
1018
+ const r = t.reduce((o, l) => o + l, 0) / t.length, a = t[Math.floor(t.length * 0.95)] ?? r;
1019
+ return { avg: r, p95: a };
1020
+ }
1021
+ function He(n = {}) {
1022
+ const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), r = n.xTickCount ?? 24, a = n.yTickCount ?? 16, o = n.frames ?? 120, l = Oe(e, t), d = {
1023
+ ...ee,
1024
+ grid: {
1025
+ ...ee.grid,
1026
+ visible: !0,
1027
+ showMinor: n.showMinor ?? !0
1028
+ }
1029
+ }, i = ae(e, t), s = new O(), c = new O();
1030
+ s.setDomain(0, 1e6), c.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), c.setRange(i.y + i.height, i.y);
1031
+ const f = new Pe(l, d), { avg: w, p95: v } = se(() => {
1032
+ l.clearRect(0, 0, e, t), f.drawGrid(i, s, c, { tickCount: r }, { tickCount: a });
1033
+ }, o), { xLines: p, yLines: S } = ie(i, s, c, r, a);
1034
+ return {
1035
+ backend: "canvas2d",
1036
+ dpr: n.dpr ?? 1,
1037
+ width: e,
1038
+ height: t,
1039
+ xTicks: r,
1040
+ yTicks: a,
1041
+ lineSegments: p.length + S.length,
1042
+ avgFrameUs: Math.round(w),
1043
+ p95FrameUs: Math.round(v),
1044
+ frames: o
712
1045
  };
713
1046
  }
714
- class Ae {
1047
+ function Ne(n = {}) {
1048
+ const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), r = n.xTickCount ?? 24, a = n.yTickCount ?? 16, o = n.frames ?? 120, l = document.createElement("canvas");
1049
+ l.width = e, l.height = t;
1050
+ let d;
1051
+ try {
1052
+ d = new Ue(l);
1053
+ } catch {
1054
+ return null;
1055
+ }
1056
+ const i = ae(e, t), s = new O(), c = new O();
1057
+ s.setDomain(0, 1e6), c.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), c.setRange(i.y + i.height, i.y);
1058
+ const { xLines: f, yLines: w } = ie(i, s, c, r, a), v = { plotArea: i, xLines: f, yLines: w, width: e, height: t };
1059
+ let p = 0;
1060
+ const { avg: S, p95: b } = se(() => {
1061
+ p = d.draw(v);
1062
+ }, o);
1063
+ return d.destroy(), {
1064
+ backend: "webgl",
1065
+ dpr: n.dpr ?? 1,
1066
+ width: e,
1067
+ height: t,
1068
+ xTicks: r,
1069
+ yTicks: a,
1070
+ lineSegments: p,
1071
+ avgFrameUs: Math.round(S),
1072
+ p95FrameUs: Math.round(b),
1073
+ frames: o
1074
+ };
1075
+ }
1076
+ function dt(n) {
1077
+ const e = (n == null ? void 0 : n.dpr) ?? 2, t = (n == null ? void 0 : n.frames) ?? 120, r = He({ dpr: e, frames: t, showMinor: !0 }), a = Ne({ dpr: e, frames: t });
1078
+ if (!a)
1079
+ return {
1080
+ canvas2d: r,
1081
+ webgl: null,
1082
+ gainPercent: 0,
1083
+ recommendation: "defer"
1084
+ };
1085
+ const o = (r.avgFrameUs - a.avgFrameUs) / r.avgFrameUs * 100;
1086
+ return {
1087
+ canvas2d: r,
1088
+ webgl: a,
1089
+ gainPercent: Math.round(o * 10) / 10,
1090
+ recommendation: o >= 20 ? "implement" : "defer"
1091
+ };
1092
+ }
1093
+ const qe = "1.17.0", Ve = "2026-07-05", Ke = "Stage 1 baselines. Headless CI uses effective FPS (render throughput when rAF throttled) via scripts/benchmark-scenario-eval.mjs smoke floors.", je = 0.1, Je = 0.95, Qe = {
1094
+ "line-1m-pan": {
1095
+ minAvgFps: 50,
1096
+ maxAvgFrameTimeMs: 20,
1097
+ points: 1e6,
1098
+ description: "1M line points, continuous pan/zoom simulation"
1099
+ },
1100
+ "candlestick-500k": {
1101
+ minAvgFps: 45,
1102
+ maxAvgFrameTimeMs: 22,
1103
+ points: 5e5,
1104
+ description: "500k OHLC bars with PluginVirtualization"
1105
+ },
1106
+ "stack-5pane-resize": {
1107
+ minAvgFps: 48,
1108
+ maxAvgFrameTimeMs: 21,
1109
+ description: "5-pane stack divider drag (batched overlay redraw)"
1110
+ },
1111
+ "line-200k-webgl": {
1112
+ minAvgFps: 45,
1113
+ description: "200k line WebGL baseline for renderer compare"
1114
+ },
1115
+ "line-200k-webgpu": {
1116
+ minAvgFps: 42,
1117
+ description: "200k line WebGPU — target ≥95% of WebGL FPS"
1118
+ },
1119
+ "boxplot-5k-webgpu": {
1120
+ minAvgFps: 50,
1121
+ description: "5k boxplot series on WebGPU chart path"
1122
+ },
1123
+ "grid-canvas2d-dpr2": {
1124
+ maxAvgFrameUs: 1200,
1125
+ dpr: 2,
1126
+ description: "Canvas 2D grid+minor at 1920×1080 @2x"
1127
+ },
1128
+ "grid-webgl-dpr2": {
1129
+ maxAvgFrameUs: 400,
1130
+ dpr: 2,
1131
+ description: "WebGL grid spike lines only @2x"
1132
+ }
1133
+ }, V = {
1134
+ version: qe,
1135
+ recordedAt: Ve,
1136
+ notes: Ke,
1137
+ regressionThreshold: je,
1138
+ webgpuMinFpsRatio: Je,
1139
+ scenarios: Qe
1140
+ };
1141
+ function ut() {
1142
+ return V;
1143
+ }
1144
+ function ft(n, e) {
1145
+ const t = V.scenarios[n];
1146
+ if (!t)
1147
+ return { passed: !0, failures: [] };
1148
+ const r = [], a = V.regressionThreshold ?? 0.1;
1149
+ if ("avgFps" in e && t.minAvgFps !== void 0) {
1150
+ const o = t.minAvgFps * (1 - a);
1151
+ e.avgFps < o && r.push(
1152
+ `FPS ${e.avgFps} < baseline min ${t.minAvgFps} (allowed ${o.toFixed(1)} with ${a * 100}% slack)`
1153
+ );
1154
+ }
1155
+ if ("avgFrameTime" in e && t.maxAvgFrameTimeMs !== void 0) {
1156
+ const o = t.maxAvgFrameTimeMs * (1 + a);
1157
+ e.avgFrameTime > o && r.push(
1158
+ `Frame time ${e.avgFrameTime}ms > baseline max ${t.maxAvgFrameTimeMs}ms`
1159
+ );
1160
+ }
1161
+ if ("avgFrameUs" in e && t.maxAvgFrameUs !== void 0) {
1162
+ const o = t.maxAvgFrameUs * (1 + a);
1163
+ e.avgFrameUs > o && r.push(
1164
+ `Grid frame ${e.avgFrameUs}µs > baseline max ${t.maxAvgFrameUs}µs`
1165
+ );
1166
+ }
1167
+ return { passed: r.length === 0, failures: r };
1168
+ }
1169
+ function ht(n, e, t, r = 0.95) {
1170
+ if (!t || !e)
1171
+ return {
1172
+ webgl: n,
1173
+ webgpu: e,
1174
+ webgpuActive: !1,
1175
+ fpsRatio: 0,
1176
+ meetsTarget: !1,
1177
+ recommendation: "webgpu-unavailable"
1178
+ };
1179
+ const a = n.avgFps > 0 ? e.avgFps / n.avgFps : 0, o = a >= r;
1180
+ return {
1181
+ webgl: n,
1182
+ webgpu: e,
1183
+ webgpuActive: !0,
1184
+ fpsRatio: a,
1185
+ meetsTarget: o,
1186
+ recommendation: o ? "webgpu-ready" : "webgl-faster"
1187
+ };
1188
+ }
1189
+ class Ze {
715
1190
  constructor(e) {
716
- _(this, "seed");
1191
+ X(this, "seed");
717
1192
  this.seed = e;
718
1193
  }
719
1194
  next() {
@@ -724,7 +1199,7 @@ class Ae {
724
1199
  return e + this.next() * (t - e);
725
1200
  }
726
1201
  }
727
- function Xe(r) {
1202
+ function gt(n) {
728
1203
  const e = {
729
1204
  pointCount: 1e3,
730
1205
  amplitude: 1,
@@ -734,16 +1209,16 @@ function Xe(r) {
734
1209
  xStart: 0,
735
1210
  xEnd: 10,
736
1211
  offset: 0,
737
- ...r
738
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = (e.xEnd - e.xStart) / (e.pointCount - 1);
739
- for (let n = 0; n < e.pointCount; n++) {
740
- t[n] = e.xStart + n * o;
741
- const u = e.amplitude * Math.sin(2 * Math.PI * e.frequency * t[n] + e.phase), c = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
742
- s[n] = u + c + e.offset;
1212
+ ...n
1213
+ }, t = new Float32Array(e.pointCount), r = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
1214
+ for (let o = 0; o < e.pointCount; o++) {
1215
+ t[o] = e.xStart + o * a;
1216
+ const l = e.amplitude * Math.sin(2 * Math.PI * e.frequency * t[o] + e.phase), d = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1217
+ r[o] = l + d + e.offset;
743
1218
  }
744
- return { x: t, y: s };
1219
+ return { x: t, y: r };
745
1220
  }
746
- function Ye(r) {
1221
+ function pt(n) {
747
1222
  const e = {
748
1223
  pointCount: 1e3,
749
1224
  amplitude: 1,
@@ -753,16 +1228,16 @@ function Ye(r) {
753
1228
  xStart: 0,
754
1229
  xEnd: 10,
755
1230
  offset: 0,
756
- ...r
757
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = (e.xEnd - e.xStart) / (e.pointCount - 1);
758
- for (let n = 0; n < e.pointCount; n++) {
759
- t[n] = e.xStart + n * o;
760
- const u = t[n] * e.frequency + e.phase / (2 * Math.PI), c = Math.sign(Math.sin(2 * Math.PI * u)) * e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
761
- s[n] = c + i + e.offset;
1231
+ ...n
1232
+ }, t = new Float32Array(e.pointCount), r = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
1233
+ for (let o = 0; o < e.pointCount; o++) {
1234
+ t[o] = e.xStart + o * a;
1235
+ const l = t[o] * e.frequency + e.phase / (2 * Math.PI), d = Math.sign(Math.sin(2 * Math.PI * l)) * e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1236
+ r[o] = d + i + e.offset;
762
1237
  }
763
- return { x: t, y: s };
1238
+ return { x: t, y: r };
764
1239
  }
765
- function ke(r) {
1240
+ function mt(n) {
766
1241
  const e = {
767
1242
  pointCount: 1e3,
768
1243
  amplitude: 1,
@@ -772,16 +1247,16 @@ function ke(r) {
772
1247
  xStart: 0,
773
1248
  xEnd: 10,
774
1249
  offset: 0,
775
- ...r
776
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = (e.xEnd - e.xStart) / (e.pointCount - 1);
777
- for (let n = 0; n < e.pointCount; n++) {
778
- t[n] = e.xStart + n * o;
779
- const u = t[n] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * (u - Math.floor(u + 0.5)), i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
780
- s[n] = c + i + e.offset;
1250
+ ...n
1251
+ }, t = new Float32Array(e.pointCount), r = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
1252
+ for (let o = 0; o < e.pointCount; o++) {
1253
+ t[o] = e.xStart + o * a;
1254
+ const l = t[o] * e.frequency + e.phase / (2 * Math.PI), d = e.amplitude * 2 * (l - Math.floor(l + 0.5)), i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1255
+ r[o] = d + i + e.offset;
781
1256
  }
782
- return { x: t, y: s };
1257
+ return { x: t, y: r };
783
1258
  }
784
- function ze(r) {
1259
+ function yt(n) {
785
1260
  const e = {
786
1261
  pointCount: 1e3,
787
1262
  amplitude: 1,
@@ -791,37 +1266,37 @@ function ze(r) {
791
1266
  xStart: 0,
792
1267
  xEnd: 10,
793
1268
  offset: 0,
794
- ...r
795
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = (e.xEnd - e.xStart) / (e.pointCount - 1);
796
- for (let n = 0; n < e.pointCount; n++) {
797
- t[n] = e.xStart + n * o;
798
- const u = t[n] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * Math.abs(2 * (u - Math.floor(u + 0.5))) - e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
799
- s[n] = c + i + e.offset;
1269
+ ...n
1270
+ }, t = new Float32Array(e.pointCount), r = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
1271
+ for (let o = 0; o < e.pointCount; o++) {
1272
+ t[o] = e.xStart + o * a;
1273
+ const l = t[o] * e.frequency + e.phase / (2 * Math.PI), d = e.amplitude * 2 * Math.abs(2 * (l - Math.floor(l + 0.5))) - e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1274
+ r[o] = d + i + e.offset;
800
1275
  }
801
- return { x: t, y: s };
1276
+ return { x: t, y: r };
802
1277
  }
803
- function _e(r) {
1278
+ function xt(n) {
804
1279
  const e = {
805
1280
  pointCount: 1e3,
806
1281
  xRange: [0, 100],
807
1282
  yRange: [-1, 1],
808
1283
  sorted: !0,
809
1284
  seed: Date.now(),
810
- ...r
811
- }, t = new Ae(e.seed), s = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount);
812
- for (let n = 0; n < e.pointCount; n++)
813
- s[n] = t.nextRange(e.xRange[0], e.xRange[1]), o[n] = t.nextRange(e.yRange[0], e.yRange[1]);
1285
+ ...n
1286
+ }, t = new Ze(e.seed), r = new Float32Array(e.pointCount), a = new Float32Array(e.pointCount);
1287
+ for (let o = 0; o < e.pointCount; o++)
1288
+ r[o] = t.nextRange(e.xRange[0], e.xRange[1]), a[o] = t.nextRange(e.yRange[0], e.yRange[1]);
814
1289
  if (e.sorted) {
815
- const n = Array.from({ length: e.pointCount }, (i, l) => l);
816
- n.sort((i, l) => s[i] - s[l]);
817
- const u = new Float32Array(e.pointCount), c = new Float32Array(e.pointCount);
1290
+ const o = Array.from({ length: e.pointCount }, (i, s) => s);
1291
+ o.sort((i, s) => r[i] - r[s]);
1292
+ const l = new Float32Array(e.pointCount), d = new Float32Array(e.pointCount);
818
1293
  for (let i = 0; i < e.pointCount; i++)
819
- u[i] = s[n[i]], c[i] = o[n[i]];
820
- return { x: u, y: c };
1294
+ l[i] = r[o[i]], d[i] = a[o[i]];
1295
+ return { x: l, y: d };
821
1296
  }
822
- return { x: s, y: o };
1297
+ return { x: r, y: a };
823
1298
  }
824
- function Oe(r) {
1299
+ function vt(n) {
825
1300
  const e = {
826
1301
  pointCount: 2e3,
827
1302
  vMin: -0.5,
@@ -830,18 +1305,18 @@ function Oe(r) {
830
1305
  peakCurrent: 1e-5,
831
1306
  // 10 µA
832
1307
  noise: 0.02,
833
- ...r
834
- }, t = e.pointCount * e.cycles, s = new Float32Array(t), o = new Float32Array(t), n = e.pointCount, u = n / 2;
835
- for (let c = 0; c < e.cycles; c++)
836
- for (let i = 0; i < n; i++) {
837
- const l = c * n + i;
838
- i < u ? s[l] = e.vMin + (e.vMax - e.vMin) * (i / u) : s[l] = e.vMax - (e.vMax - e.vMin) * ((i - u) / u);
839
- const f = s[l], y = 0, b = i < u ? 1 : -1, v = 0.1, p = -Math.pow(f - y, 2) / (2 * v * v), S = e.peakCurrent * Math.exp(p), C = b * e.peakCurrent * 0.1, g = (Math.random() - 0.5) * 2 * e.noise * e.peakCurrent;
840
- o[l] = b * S + C + g;
1308
+ ...n
1309
+ }, t = e.pointCount * e.cycles, r = new Float32Array(t), a = new Float32Array(t), o = e.pointCount, l = o / 2;
1310
+ for (let d = 0; d < e.cycles; d++)
1311
+ for (let i = 0; i < o; i++) {
1312
+ const s = d * o + i;
1313
+ i < l ? r[s] = e.vMin + (e.vMax - e.vMin) * (i / l) : r[s] = e.vMax - (e.vMax - e.vMin) * ((i - l) / l);
1314
+ const c = r[s], f = 0, w = i < l ? 1 : -1, v = 0.1, p = -Math.pow(c - f, 2) / (2 * v * v), S = e.peakCurrent * Math.exp(p), b = w * e.peakCurrent * 0.1, g = (Math.random() - 0.5) * 2 * e.noise * e.peakCurrent;
1315
+ a[s] = w * S + b + g;
841
1316
  }
842
- return { x: s, y: o };
1317
+ return { x: r, y: a };
843
1318
  }
844
- function $e(r) {
1319
+ function wt(n) {
845
1320
  const e = {
846
1321
  pointCount: 50,
847
1322
  rSolution: 100,
@@ -849,380 +1324,438 @@ function $e(r) {
849
1324
  rCharge: 1e3,
850
1325
  // Ohms
851
1326
  frequency: [1e5, 0.01],
852
- ...r
853
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = Math.log10(e.frequency[1]), n = Math.log10(e.frequency[0]);
854
- for (let u = 0; u < e.pointCount; u++) {
855
- const c = n - (n - o) * (u / (e.pointCount - 1)), i = 2 * Math.PI * Math.pow(10, c), l = e.rCharge * 1e-5, f = e.rSolution + e.rCharge / (1 + Math.pow(i * l, 2)), y = i * l * e.rCharge / (1 + Math.pow(i * l, 2));
856
- t[u] = f, s[u] = -y;
1327
+ ...n
1328
+ }, t = new Float32Array(e.pointCount), r = new Float32Array(e.pointCount), a = Math.log10(e.frequency[1]), o = Math.log10(e.frequency[0]);
1329
+ for (let l = 0; l < e.pointCount; l++) {
1330
+ const d = o - (o - a) * (l / (e.pointCount - 1)), i = 2 * Math.PI * Math.pow(10, d), s = e.rCharge * 1e-5, c = e.rSolution + e.rCharge / (1 + Math.pow(i * s, 2)), f = i * s * e.rCharge / (1 + Math.pow(i * s, 2));
1331
+ t[l] = c, r[l] = -f;
857
1332
  }
858
- return { x: t, y: s };
1333
+ return { x: t, y: r };
859
1334
  }
860
- async function Be(r, e) {
1335
+ async function Pt(n, e) {
861
1336
  const t = {
862
1337
  duration: 5e3,
863
1338
  warmup: 1e3,
864
1339
  ...e
865
- }, s = [], o = [];
866
- let n = 0, u = performance.now();
867
- const c = r.getAllSeries().reduce((i, l) => i + l.getPointCount(), 0);
868
- return new Promise((i) => {
869
- const l = performance.now() + t.warmup + t.duration, f = performance.now() + t.warmup;
870
- let y = !1;
871
- function b() {
1340
+ }, r = [], a = [];
1341
+ let o = 0;
1342
+ const l = n.getAllSeries().reduce((d, i) => d + i.getPointCount(), 0);
1343
+ return new Promise((d) => {
1344
+ const i = performance.now() + t.warmup + t.duration, s = performance.now() + t.warmup;
1345
+ let c = !1, f = 0;
1346
+ function w() {
872
1347
  const v = performance.now();
873
- if (v >= l) {
874
- const p = s.reduce((d, a) => d + a, 0) / s.length, S = Math.min(...s), C = Math.max(...s), g = o.reduce((d, a) => d + a, 0) / o.length, m = {
875
- avgFps: Math.round(p * 100) / 100,
876
- minFps: S,
877
- maxFps: C,
878
- avgFrameTime: Math.round(g * 100) / 100,
879
- frameCount: n,
1348
+ if (v >= i) {
1349
+ const b = a.length > 0 ? a.reduce((P, x) => P + x, 0) / a.length : 0, g = f > 0 ? v - f : t.duration, y = o > 0 && g > 0 ? o / g * 1e3 : 0, h = r.length > 0 ? r.reduce((P, x) => P + x, 0) / r.length : b > 0 ? 1e3 / b : 0, u = {
1350
+ avgFps: Math.round(y * 100) / 100,
1351
+ minFps: Math.round((r.length > 0 ? Math.min(...r) : y) * 100) / 100,
1352
+ maxFps: Math.round((r.length > 0 ? Math.max(...r) : y) * 100) / 100,
1353
+ avgFrameTime: Math.round(b * 1e3) / 1e3,
1354
+ frameCount: o,
880
1355
  duration: t.duration,
881
- pointsRendered: c,
882
- throughput: Math.round(c * p / 1e3) * 1e3
1356
+ pointsRendered: l,
1357
+ throughput: Math.round(l * y / 1e3) * 1e3,
1358
+ /** @internal render-only FPS (not wall clock) */
1359
+ ...h > 0 ? { renderFps: Math.round(h * 100) / 100 } : {}
883
1360
  };
884
- i(m);
1361
+ d(u);
885
1362
  return;
886
1363
  }
887
- if (v >= f && !y && (y = !0, u = v, n = 0), r.render(), y) {
888
- const p = v - u;
889
- o.push(p), n++;
890
- const S = o.slice(-30);
891
- if (S.length > 0) {
892
- const C = S.reduce((g, m) => g + m, 0) / S.length;
893
- s.push(1e3 / C);
1364
+ v >= s && !c && (c = !0, f = v, o = 0, a.length = 0, r.length = 0);
1365
+ const p = performance.now();
1366
+ n.render();
1367
+ const S = performance.now();
1368
+ if (c) {
1369
+ const b = S - p;
1370
+ a.push(b), o++;
1371
+ const g = a.slice(-30);
1372
+ if (g.length > 0) {
1373
+ const y = g.reduce((h, u) => h + u, 0) / g.length;
1374
+ y > 0 && r.push(1e3 / y);
894
1375
  }
895
1376
  }
896
- u = v, requestAnimationFrame(b);
1377
+ requestAnimationFrame(w);
897
1378
  }
898
- requestAnimationFrame(b);
1379
+ requestAnimationFrame(w);
899
1380
  });
900
1381
  }
901
- function He(r, e) {
1382
+ function St(n, e) {
902
1383
  const t = {
903
1384
  format: "json",
904
1385
  includeStyles: !0,
905
1386
  ...e
906
- }, s = r.getAllSeries().map((n) => ({
907
- id: n.getId(),
908
- type: n.getType(),
909
- pointCount: n.getPointCount(),
910
- ...t.includeStyles ? { style: n.getStyle() } : {}
911
- })), o = {
1387
+ }, r = n.getAllSeries().map((o) => ({
1388
+ id: o.getId(),
1389
+ type: o.getType(),
1390
+ pointCount: o.getPointCount(),
1391
+ ...t.includeStyles ? { style: o.getStyle() } : {}
1392
+ })), a = {
912
1393
  timestamp: Date.now(),
913
1394
  config: {},
914
- series: s,
915
- bounds: r.getViewBounds()
1395
+ series: r,
1396
+ bounds: n.getViewBounds()
916
1397
  };
917
- return t.format === "png" && r.exportImage && (o.image = r.exportImage()), o;
1398
+ return t.format === "png" && n.exportImage && (a.image = n.exportImage()), a;
918
1399
  }
919
- function qe(r, e, t = 1e-6) {
920
- const s = [];
921
- r.series.length !== e.series.length && s.push(`Series count: ${r.series.length} vs ${e.series.length}`);
922
- for (let n = 0; n < Math.min(r.series.length, e.series.length); n++) {
923
- const u = r.series[n], c = e.series[n];
924
- u.id !== c.id && s.push(`Series[${n}] id: "${u.id}" vs "${c.id}"`), u.type !== c.type && s.push(`Series[${n}] type: "${u.type}" vs "${c.type}"`), u.pointCount !== c.pointCount && s.push(`Series[${n}] pointCount: ${u.pointCount} vs ${c.pointCount}`);
1400
+ function Tt(n, e, t = 1e-6) {
1401
+ const r = [];
1402
+ n.series.length !== e.series.length && r.push(`Series count: ${n.series.length} vs ${e.series.length}`);
1403
+ for (let o = 0; o < Math.min(n.series.length, e.series.length); o++) {
1404
+ const l = n.series[o], d = e.series[o];
1405
+ l.id !== d.id && r.push(`Series[${o}] id: "${l.id}" vs "${d.id}"`), l.type !== d.type && r.push(`Series[${o}] type: "${l.type}" vs "${d.type}"`), l.pointCount !== d.pointCount && r.push(`Series[${o}] pointCount: ${l.pointCount} vs ${d.pointCount}`);
925
1406
  }
926
- const o = ["xMin", "xMax", "yMin", "yMax"];
927
- for (const n of o)
928
- Math.abs(r.bounds[n] - e.bounds[n]) > t && s.push(`Bounds.${n}: ${r.bounds[n]} vs ${e.bounds[n]}`);
1407
+ const a = ["xMin", "xMax", "yMin", "yMax"];
1408
+ for (const o of a)
1409
+ Math.abs(n.bounds[o] - e.bounds[o]) > t && r.push(`Bounds.${o}: ${n.bounds[o]} vs ${e.bounds[o]}`);
929
1410
  return {
930
- equal: s.length === 0,
931
- differences: s
1411
+ equal: r.length === 0,
1412
+ differences: r
932
1413
  };
933
1414
  }
934
- function We(r, e) {
1415
+ function bt(n, e) {
935
1416
  const t = [];
936
- return e.minFps && r.avgFps < e.minFps && t.push(`FPS ${r.avgFps} < required ${e.minFps}`), e.maxFrameTime && r.avgFrameTime > e.maxFrameTime && t.push(`Frame time ${r.avgFrameTime}ms > required ${e.maxFrameTime}ms`), e.minThroughput && r.throughput < e.minThroughput && t.push(`Throughput ${r.throughput} < required ${e.minThroughput}`), {
1417
+ return e.minFps && n.avgFps < e.minFps && t.push(`FPS ${n.avgFps} < required ${e.minFps}`), e.maxFrameTime && n.avgFrameTime > e.maxFrameTime && t.push(`Frame time ${n.avgFrameTime}ms > required ${e.maxFrameTime}ms`), e.minThroughput && n.throughput < e.minThroughput && t.push(`Throughput ${n.throughput} < required ${e.minThroughput}`), {
937
1418
  passed: t.length === 0,
938
1419
  failures: t
939
1420
  };
940
1421
  }
941
- function Ge(r = 1) {
1422
+ function At(n = 1) {
942
1423
  return new Promise((e) => {
943
- let t = r;
944
- function s() {
945
- t--, t <= 0 ? e() : requestAnimationFrame(s);
1424
+ let t = n;
1425
+ function r() {
1426
+ t--, t <= 0 ? e() : requestAnimationFrame(r);
946
1427
  }
947
- requestAnimationFrame(s);
1428
+ requestAnimationFrame(r);
948
1429
  });
949
1430
  }
950
- function Ne(r) {
951
- return new Promise((e) => setTimeout(e, r));
1431
+ function Mt(n) {
1432
+ return new Promise((e) => setTimeout(e, n));
952
1433
  }
953
- function Ve(r) {
954
- const t = {
955
- id: r.seriesId ?? `${r.id}-indicator`,
956
- data: r.data,
957
- style: r.style,
958
- name: r.label
959
- }, s = fe(t);
1434
+ const oe = 864e5;
1435
+ function et(n) {
1436
+ return new Date(n).getUTCDay();
1437
+ }
1438
+ function tt(n, e = {}) {
1439
+ const t = et(n);
1440
+ return t !== 0 && t !== 6;
1441
+ }
1442
+ function Ft(n, e = {}) {
1443
+ const t = e.calendar ?? "business-day", r = n.length, a = new Float32Array(r), o = new Int32Array(r);
1444
+ if (o.fill(-1), t === "continuous") {
1445
+ for (let i = 0; i < r; i++)
1446
+ a[i] = n[i], o[i] = i;
1447
+ return {
1448
+ scaledX: a,
1449
+ timeByIndex: n instanceof Float32Array ? n : Float32Array.from(n),
1450
+ sourceToScaled: o
1451
+ };
1452
+ }
1453
+ const l = [];
1454
+ let d = 0;
1455
+ for (let i = 0; i < r; i++) {
1456
+ const s = n[i];
1457
+ if (!Number.isFinite(s) || !tt(s, e)) {
1458
+ a[i] = Number.NaN;
1459
+ continue;
1460
+ }
1461
+ a[i] = d, l[d] = s, o[i] = d, d++;
1462
+ }
960
1463
  return {
961
- id: r.id,
962
- height: r.height ?? 0.25,
963
- showXAxis: r.showXAxis,
964
- yRange: r.yRange,
965
- chart: {
966
- yAxis: {
967
- label: r.label ?? "Indicator",
968
- auto: r.yRange === void 0 || r.yRange === "auto",
969
- tickCount: r.tickCount ?? 5,
970
- scientific: !1
971
- },
972
- xAxis: { showLabels: !1, showTicks: !1, showLine: !1 },
973
- animations: !1,
974
- loading: !1,
975
- showLegend: !1
976
- },
977
- series: s
1464
+ scaledX: a,
1465
+ timeByIndex: Float32Array.from(l),
1466
+ sourceToScaled: o
978
1467
  };
979
1468
  }
1469
+ function Ct(n, e, t) {
1470
+ const r = Math.max(0, Math.floor(e)), a = Math.min(n.timeByIndex.length - 1, Math.ceil(t)), o = n.timeByIndex[r], l = n.timeByIndex[a];
1471
+ return o == null || l == null ? oe : Math.abs(l - o) || oe;
1472
+ }
1473
+ function It(n) {
1474
+ const e = n.close.length, t = new Float32Array(e), r = new Float32Array(e), a = new Float32Array(e), o = new Float32Array(e);
1475
+ for (let l = 0; l < e; l++) {
1476
+ const d = n.open[l], i = n.high[l], s = n.low[l], c = n.close[l];
1477
+ o[l] = (d + i + s + c) / 4, t[l] = l === 0 ? (d + c) / 2 : (t[l - 1] + o[l - 1]) / 2, r[l] = Math.max(i, t[l], o[l]), a[l] = Math.min(s, t[l], o[l]);
1478
+ }
1479
+ return { open: t, high: r, low: a, close: o };
1480
+ }
980
1481
  export {
981
- je as AnimationEngine,
982
- Bt as AnnotationManager,
983
- fa as BackpressureManager,
984
- Da as BaseBufferStore,
985
- Ea as BaseTextureStore,
986
- Le as BuiltinPlugins,
987
- Co as ChartGroup,
988
- Je as ChartInitQueue,
989
- ga as CircularBuffer,
990
- so as ClipboardManager,
991
- pe as CrosshairPlugin,
992
- Qe as DARK_THEME,
993
- Ze as DEFAULT_ANIMATION_CONFIG,
994
- to as DEFAULT_KEY_BINDINGS,
995
- et as DEFAULT_LAYOUT,
996
- tt as DEFAULT_THEME,
997
- Te as DataLoggerPlugin,
998
- po as DebugOverlay,
999
- be as DirectionIndicatorPlugin,
1000
- nt as ELECTROCHEM_THEME,
1001
- Ot as EventEmitter,
1002
- Fa as GpuBenchmark,
1003
- La as GpuCompute,
1004
- Ra as GpuRenderer,
1005
- Pe as GridHighlightPlugin,
1006
- no as KeyBindingManager,
1007
- at as LIGHT_THEME,
1008
- Ha as LOCALE_DE_DE,
1009
- qa as LOCALE_EN_US,
1010
- Wa as LOCALE_ES_ES,
1011
- Ga as LOCALE_FR_FR,
1012
- Na as LOCALE_JA_JP,
1013
- Va as LOCALE_PT_BR,
1014
- Ua as LOCALE_ZH_CN,
1015
- ot as LinearScale,
1016
- vo as LoadingIndicator,
1017
- rt as LogScale,
1018
- it as MIDNIGHT_THEME,
1019
- st as NativeWebGLRenderer,
1020
- lt as OverlayRenderer,
1021
- Xa as PipelineCache,
1022
- nr as Plugin3D,
1023
- fn as PluginAnalysis,
1024
- Ht as PluginAnnotations,
1025
- fr as PluginAnomalyDetection,
1026
- Lr as PluginBrokenAxis,
1027
- Ir as PluginCaching,
1028
- lo as PluginClipboard,
1029
- dr as PluginContextMenu,
1030
- lr as PluginDataExport,
1031
- br as PluginDataTransform,
1032
- ho as PluginDebug,
1033
- Re as PluginDragEdit,
1034
- $r as PluginForecasting,
1035
- Ya as PluginGpu,
1036
- or as PluginI18n,
1037
- ao as PluginKeyboard,
1038
- Mr as PluginLaTeX,
1039
- Er as PluginLazyLoad,
1040
- Po as PluginLoading,
1041
- pr as PluginMLIntegration,
1042
- ct as PluginManagerImpl,
1043
- kr as PluginOffscreen,
1044
- mr as PluginPatternRecognition,
1045
- _r as PluginROI,
1046
- Pr as PluginRadar,
1047
- xr as PluginRegression,
1048
- Tr as PluginSnapshot,
1049
- pa as PluginStreaming,
1050
- ir as PluginSync,
1051
- Eo as PluginThemeEditor,
1052
- tn as PluginTools,
1053
- Xr as PluginVideoRecorder,
1054
- sn as PluginVirtualization,
1055
- dt as SERIALIZATION_VERSION,
1056
- wa as STACKED_DEFAULT_MIN_PANE_RATIO,
1057
- ba as STACKED_MAX_PANES,
1058
- Ca as SciPlot,
1059
- ut as Series,
1060
- ka as SeriesAdapter,
1061
- ft as StateHistory,
1062
- me as StatsPlugin,
1063
- Fo as THEME_PRESETS,
1064
- nn as TOOLTIP_THEMES,
1065
- Lo as ThemeEditor,
1066
- an as TooltipManager,
1067
- xe as WatermarkPlugin,
1068
- za as WebGLBackend,
1069
- _a as WebGPUBackend,
1070
- Q as WebGPURenderer,
1071
- gn as adx,
1072
- pn as analyzeComplexSpectrum,
1073
- hn as analyzeSpectrum,
1074
- mn as aroon,
1075
- yn as arraysToComplex,
1076
- We as assertPerformance,
1077
- xn as atr,
1078
- vn as autoCorrelation,
1079
- Pn as bandPassFilter,
1080
- Sn as bandStopFilter,
1081
- Be as benchmarkRender,
1082
- Tn as blackmanWindow,
1083
- wn as bollingerBands,
1084
- Ve as buildIndicatorPane,
1085
- fe as buildIndicatorSeries,
1086
- bn as butterworth,
1087
- jo as calculateR2,
1088
- zo as calculateStats,
1089
- ln as calculateTargetPoints,
1090
- Wt as checkPluginCompatibility,
1091
- qe as compareSnapshots,
1092
- Cn as complexToArrays,
1093
- gt as compressString,
1094
- ha as connectStreamToChart,
1095
- co as copyToClipboard,
1096
- ma as createBackpressureManager,
1097
- pt as createChart,
1098
- Mo as createChartGroup,
1099
- Gt as createConfigurablePlugin,
1100
- mo as createDebugOverlay,
1101
- Oa as createGpuRenderer,
1102
- ht as createIndicatorSeries,
1103
- oo as createKeyBinding,
1104
- So as createLoadingIndicator,
1105
- Ka as createLocaleFormatter,
1106
- ya as createLosslessBackpressure,
1107
- Ao as createMasterSlave,
1108
- xa as createMessageParser,
1109
- va as createMockStream,
1110
- mt as createNativeRenderer,
1111
- Nt as createPlugin,
1112
- yt as createPluginContext,
1113
- Pa as createRealtimeBackpressure,
1114
- Vt as createRenderer,
1115
- xt as createScale,
1116
- He as createSnapshot,
1117
- Ma as createStackedChart,
1118
- vt as createTheme,
1119
- Ro as createThemeEditor,
1120
- Sa as createWebSocketStream,
1121
- Mn as crossCorrelation,
1122
- An as cumsum,
1123
- Jo as cumulativeIntegral,
1124
- Pt as decodeFloat32Array,
1125
- St as decompressString,
1126
- Ut as defineAndRegister,
1127
- O as definePlugin,
1128
- In as dema,
1129
- Qo as derivative,
1130
- Dn as detectAnomalies,
1131
- _o as detectCycles,
1132
- Tt as detectIndicatorMarkers,
1133
- Oo as detectPeaks,
1134
- En as dominantFrequency,
1135
- $o as downsampleLTTB,
1136
- wt as easings,
1137
- Fn as ema,
1138
- yo as enableDebugMode,
1139
- bt as encodeFloat32Array,
1140
- Ln as exponentialMovingAverage,
1141
- Rn as fft,
1142
- Xn as fftFromComplexInput,
1143
- uo as formatData,
1144
- Bo as formatScientific,
1145
- Ho as formatValue,
1146
- qo as formatWithPrefix,
1147
- Yn as gaussianSmooth,
1148
- Oe as generateCVData,
1149
- Wo as generateCycleColors,
1150
- $e as generateNyquistData,
1151
- _e as generateRandomData,
1152
- ke as generateSawtoothWave,
1153
- Xe as generateSineWave,
1154
- Ye as generateSquareWave,
1155
- ze as generateTriangleWave,
1156
- Go as getBestPrefix,
1157
- Ct as getChartInitQueue,
1158
- fo as getClipboardManager,
1159
- ja as getGlobalLocale,
1160
- Ja as getLocale,
1161
- Kt as getPluginRegistry,
1162
- kn as getPositiveFrequencies,
1163
- Xo as getPresetNames,
1164
- Yo as getPresetTheme,
1165
- Mt as getSharedAnimationEngine,
1166
- At as getThemeByName,
1167
- on as getTooltipThemeForChartTheme,
1168
- zn as hammingWindow,
1169
- _n as hanningWindow,
1170
- On as highPassFilter,
1171
- $n as ifft,
1172
- Bn as ifftComplex,
1173
- Hn as ifftFromArrays,
1174
- Zo as integrate,
1175
- It as interleaveData,
1176
- Io as linkCharts,
1177
- jt as listPluginsByCategory,
1178
- Jt as loadPlugin,
1179
- qn as lowPassFilter,
1180
- cn as lttbDownsample,
1181
- Wn as macd,
1182
- Gn as medianFilter,
1183
- Dt as mergeAnimationConfig,
1184
- Et as mergeLayoutOptions,
1185
- dn as minMaxDownsample,
1186
- Nn as momentum,
1187
- No as movingAverage,
1188
- Vn as nextPowerOf2,
1189
- Un as normalize,
1190
- Kn as obv,
1191
- Ft as parseColor,
1192
- $a as parseColorToRGBA,
1193
- ro as parseShortcut,
1194
- jn as percentChange,
1195
- Jn as powerSpectrum,
1196
- Lt as queueChartInit,
1197
- Qa as registerLocale,
1198
- Qt as registerPlugin,
1199
- Rt as resetChartQueue,
1200
- Qn as roc,
1201
- Zn as rsi,
1202
- ea as savitzkyGolay,
1203
- Za as setGlobalLocale,
1204
- To as showLoading,
1205
- wo as showProgress,
1206
- ta as simpsonsIntegration,
1207
- na as singleFrequencyFilter,
1208
- aa as sma,
1209
- er as solveLinearSystem,
1210
- oa as standardDeviation,
1211
- Xt as stateToUrlHash,
1212
- ra as stochastic,
1213
- Vo as subtractBaseline,
1214
- ia as tTest,
1215
- sa as tema,
1216
- la as trapezoidalIntegration,
1217
- Yt as urlHashToState,
1218
- Aa as useSciPlot,
1219
- kt as validateChartState,
1220
- Uo as validateData,
1221
- Zt as validateManifest,
1222
- ca as vwap,
1223
- Ne as waitFor,
1224
- zt as waitForAnimations,
1225
- Ge as waitForFrames,
1226
- da as wma
1482
+ Et as AnimationEngine,
1483
+ Ln as AnnotationManager,
1484
+ nr as BackpressureManager,
1485
+ vr as BaseBufferStore,
1486
+ wr as BaseTextureStore,
1487
+ it as BuiltinPlugins,
1488
+ la as ChartGroup,
1489
+ Lt as ChartInitQueue,
1490
+ or as CircularBuffer,
1491
+ Hr as ClipboardManager,
1492
+ Te as CrosshairPlugin,
1493
+ ee as DARK_THEME,
1494
+ Rt as DEFAULT_ANIMATION_CONFIG,
1495
+ zr as DEFAULT_KEY_BINDINGS,
1496
+ Yt as DEFAULT_LAYOUT,
1497
+ Xt as DEFAULT_THEME,
1498
+ ke as DataLoggerPlugin,
1499
+ Jr as DebugOverlay,
1500
+ Le as DirectionIndicatorPlugin,
1501
+ Bt as ELECTROCHEM_THEME,
1502
+ kn as EventEmitter,
1503
+ Pr as GpuBenchmark,
1504
+ Sr as GpuCompute,
1505
+ qn as GpuRenderer,
1506
+ Ie as GridHighlightPlugin,
1507
+ Wr as KeyBindingManager,
1508
+ _t as LIGHT_THEME,
1509
+ Mr as LOCALE_DE_DE,
1510
+ Fr as LOCALE_EN_US,
1511
+ Cr as LOCALE_ES_ES,
1512
+ Ir as LOCALE_FR_FR,
1513
+ Dr as LOCALE_JA_JP,
1514
+ kr as LOCALE_PT_BR,
1515
+ Er as LOCALE_ZH_CN,
1516
+ O as LinearScale,
1517
+ na as LoadingIndicator,
1518
+ zt as LogScale,
1519
+ Wt as MIDNIGHT_THEME,
1520
+ Gt as NativeWebGLRenderer,
1521
+ Pe as OverlayRenderer,
1522
+ Tr as PipelineCache,
1523
+ ii as Plugin3D,
1524
+ So as PluginAnalysis,
1525
+ Rn as PluginAnnotations,
1526
+ mi as PluginAnomalyDetection,
1527
+ Xi as PluginBrokenAxis,
1528
+ Ei as PluginCaching,
1529
+ Nr as PluginClipboard,
1530
+ gi as PluginContextMenu,
1531
+ fi as PluginDataExport,
1532
+ Ci as PluginDataTransform,
1533
+ Qr as PluginDebug,
1534
+ st as PluginDragEdit,
1535
+ lt as PluginDrawingTools,
1536
+ Oi as PluginForecasting,
1537
+ br as PluginGpu,
1538
+ li as PluginI18n,
1539
+ Gr as PluginKeyboard,
1540
+ Di as PluginLaTeX,
1541
+ Ri as PluginLazyLoad,
1542
+ oa as PluginLoading,
1543
+ xi as PluginMLIntegration,
1544
+ Ut as PluginManagerImpl,
1545
+ Wi as PluginOffscreen,
1546
+ wi as PluginPatternRecognition,
1547
+ Ui as PluginROI,
1548
+ bi as PluginRadar,
1549
+ Si as PluginRegression,
1550
+ ct as PluginReplay,
1551
+ Mi as PluginSnapshot,
1552
+ rr as PluginStreaming,
1553
+ di as PluginSync,
1554
+ ha as PluginThemeEditor,
1555
+ eo as PluginTools,
1556
+ _i as PluginVideoRecorder,
1557
+ ao as PluginVirtualization,
1558
+ $t as SERIALIZATION_VERSION,
1559
+ hr as STACKED_DEFAULT_MIN_PANE_RATIO,
1560
+ gr as STACKED_MAX_PANES,
1561
+ pr as SciPlot,
1562
+ Ot as Series,
1563
+ Vn as SeriesAdapter,
1564
+ Ht as StateHistory,
1565
+ Ae as StatsPlugin,
1566
+ ga as THEME_PRESETS,
1567
+ to as TOOLTIP_THEMES,
1568
+ pa as ThemeEditor,
1569
+ no as TooltipManager,
1570
+ Fe as WatermarkPlugin,
1571
+ Kn as WebGLBackend,
1572
+ jn as WebGPUBackend,
1573
+ re as WebGPURenderer,
1574
+ vo as WorkerPool,
1575
+ Nt as addIndicatorToChart,
1576
+ za as adx,
1577
+ To as analyzeComplexSpectrum,
1578
+ bo as analyzeSpectrum,
1579
+ Wa as aroon,
1580
+ Ao as arraysToComplex,
1581
+ bt as assertPerformance,
1582
+ Ga as atr,
1583
+ Mo as autoCorrelation,
1584
+ Fo as bandPassFilter,
1585
+ Co as bandStopFilter,
1586
+ He as benchmarkCanvasGrid,
1587
+ Pt as benchmarkRender,
1588
+ Ne as benchmarkWebGLGrid,
1589
+ Io as blackmanWindow,
1590
+ Ua as bollingerBands,
1591
+ qt as bollingerBandsAsync,
1592
+ Vt as buildIndicatorPane,
1593
+ Kt as buildIndicatorPaneFromPreset,
1594
+ jt as buildIndicatorSeries,
1595
+ Ct as businessDaySpanMs,
1596
+ Do as butterworth,
1597
+ La as calculateR2,
1598
+ wa as calculateStats,
1599
+ io as calculateTargetPoints,
1600
+ Xn as checkPluginCompatibility,
1601
+ dt as compareGridBackends,
1602
+ ft as compareScenarioToBaseline,
1603
+ Tt as compareSnapshots,
1604
+ ko as complexToArrays,
1605
+ Jt as compressString,
1606
+ It as computeHeikinAshi,
1607
+ Qt as computeIndicatorFromSeries,
1608
+ Zt as computeIndicatorPreset,
1609
+ ar as connectStreamToChart,
1610
+ qr as copyToClipboard,
1611
+ ir as createBackpressureManager,
1612
+ en as createChart,
1613
+ ca as createChartGroup,
1614
+ Bn as createConfigurablePlugin,
1615
+ Zr as createDebugOverlay,
1616
+ Jn as createGpuRenderer,
1617
+ tn as createIndicatorSeries,
1618
+ Ur as createKeyBinding,
1619
+ ra as createLoadingIndicator,
1620
+ Lr as createLocaleFormatter,
1621
+ sr as createLosslessBackpressure,
1622
+ da as createMasterSlave,
1623
+ lr as createMessageParser,
1624
+ cr as createMockStream,
1625
+ nn as createNativeRenderer,
1626
+ _n as createPlugin,
1627
+ on as createPluginContext,
1628
+ dr as createRealtimeBackpressure,
1629
+ zn as createRenderer,
1630
+ rn as createScale,
1631
+ St as createSnapshot,
1632
+ mr as createStackedChart,
1633
+ an as createTheme,
1634
+ ma as createThemeEditor,
1635
+ ur as createWebSocketStream,
1636
+ Eo as crossCorrelation,
1637
+ $a as cumsum,
1638
+ Ra as cumulativeIntegral,
1639
+ sn as decodeFloat32Array,
1640
+ ln as decompressString,
1641
+ Wn as defineAndRegister,
1642
+ z as definePlugin,
1643
+ Oa as dema,
1644
+ Ya as derivative,
1645
+ so as destroyDownsamplePool,
1646
+ cn as destroyIndicatorPool,
1647
+ Lo as detectAnomalies,
1648
+ Pa as detectCycles,
1649
+ dn as detectIndicatorMarkers,
1650
+ Sa as detectPeaks,
1651
+ Ro as dominantFrequency,
1652
+ lo as downsampleAsync,
1653
+ Ta as downsampleLTTB,
1654
+ un as easings,
1655
+ Ha as ema,
1656
+ fn as emaAsync,
1657
+ ea as enableDebugMode,
1658
+ hn as encodeFloat32Array,
1659
+ ht as evaluateRendererCompare,
1660
+ Yo as exponentialMovingAverage,
1661
+ Xo as fft,
1662
+ Bo as fftFromComplexInput,
1663
+ Vr as formatData,
1664
+ ba as formatScientific,
1665
+ Aa as formatValue,
1666
+ Ma as formatWithPrefix,
1667
+ _o as gaussianSmooth,
1668
+ vt as generateCVData,
1669
+ Fa as generateCycleColors,
1670
+ wt as generateNyquistData,
1671
+ xt as generateRandomData,
1672
+ mt as generateSawtoothWave,
1673
+ gt as generateSineWave,
1674
+ pt as generateSquareWave,
1675
+ yt as generateTriangleWave,
1676
+ ut as getBaseline,
1677
+ Ca as getBestPrefix,
1678
+ gn as getChartInitQueue,
1679
+ Kr as getClipboardManager,
1680
+ co as getDownsamplePoolSize,
1681
+ Rr as getGlobalLocale,
1682
+ Yr as getLocale,
1683
+ Gn as getPluginRegistry,
1684
+ zo as getPositiveFrequencies,
1685
+ ya as getPresetNames,
1686
+ xa as getPresetTheme,
1687
+ pn as getSharedAnimationEngine,
1688
+ mn as getThemeByName,
1689
+ oo as getTooltipThemeForChartTheme,
1690
+ Wo as hammingWindow,
1691
+ Go as hanningWindow,
1692
+ Uo as highPassFilter,
1693
+ $o as ifft,
1694
+ Oo as ifftComplex,
1695
+ Ho as ifftFromArrays,
1696
+ Xa as integrate,
1697
+ yn as interleaveData,
1698
+ tt as isBusinessDay,
1699
+ ua as linkCharts,
1700
+ Un as listPluginsByCategory,
1701
+ $n as loadPlugin,
1702
+ No as lowPassFilter,
1703
+ uo as lowerBoundX,
1704
+ fo as lttbDownsample,
1705
+ Na as macd,
1706
+ xn as macdAsync,
1707
+ Ft as mapToBusinessDayScale,
1708
+ qo as medianFilter,
1709
+ vn as mergeAnimationConfig,
1710
+ wn as mergeLayoutOptions,
1711
+ ho as minMaxDownsample,
1712
+ qa as momentum,
1713
+ Ia as movingAverage,
1714
+ Vo as nextPowerOf2,
1715
+ wo as nextTaskId,
1716
+ Va as normalize,
1717
+ Ka as obv,
1718
+ go as ohlcDownsampleAsync,
1719
+ po as ohlcMinMaxDownsample,
1720
+ Pn as parseColor,
1721
+ Qn as parseColorToRGBA,
1722
+ $r as parseShortcut,
1723
+ ja as percentChange,
1724
+ Ko as powerSpectrum,
1725
+ Sn as queueChartInit,
1726
+ Xr as registerLocale,
1727
+ On as registerPlugin,
1728
+ Tn as resetChartQueue,
1729
+ Ja as roc,
1730
+ Qa as rsi,
1731
+ bn as rsiAsync,
1732
+ jo as savitzkyGolay,
1733
+ Br as setGlobalLocale,
1734
+ aa as showLoading,
1735
+ ia as showProgress,
1736
+ Jo as simpsonsIntegration,
1737
+ Qo as singleFrequencyFilter,
1738
+ mo as sliceSeriesToViewport,
1739
+ Za as sma,
1740
+ An as smaAsync,
1741
+ Ba as solveLinearSystem,
1742
+ ei as standardDeviation,
1743
+ Mn as stateToUrlHash,
1744
+ ti as stochastic,
1745
+ Da as subtractBaseline,
1746
+ Zo as tTest,
1747
+ ni as tema,
1748
+ er as trapezoidalIntegration,
1749
+ yo as upperBoundX,
1750
+ Fn as urlHashToState,
1751
+ yr as useSciPlot,
1752
+ Cn as validateChartState,
1753
+ ka as validateData,
1754
+ Hn as validateManifest,
1755
+ oi as vwap,
1756
+ Mt as waitFor,
1757
+ In as waitForAnimations,
1758
+ At as waitForFrames,
1759
+ ri as wma
1227
1760
  };
1228
1761
  //# sourceMappingURL=velo-plot.full.js.map