@invinite-org/chartlang-core 1.0.1 → 1.1.1

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 (101) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/README.md +6 -1
  3. package/dist/alert/alert.d.ts +1 -1
  4. package/dist/alert/alert.js +1 -1
  5. package/dist/alert/alert.js.map +1 -1
  6. package/dist/alert/index.js.map +1 -1
  7. package/dist/color/colorHelpers.js.map +1 -1
  8. package/dist/color/index.js.map +1 -1
  9. package/dist/color/parseColor.js.map +1 -1
  10. package/dist/define/defineAlert.d.ts.map +1 -1
  11. package/dist/define/defineAlert.js +3 -2
  12. package/dist/define/defineAlert.js.map +1 -1
  13. package/dist/define/defineAlertCondition.d.ts.map +1 -1
  14. package/dist/define/defineAlertCondition.js +2 -1
  15. package/dist/define/defineAlertCondition.js.map +1 -1
  16. package/dist/define/defineDrawing.d.ts +2 -2
  17. package/dist/define/defineDrawing.d.ts.map +1 -1
  18. package/dist/define/defineDrawing.js +5 -4
  19. package/dist/define/defineDrawing.js.map +1 -1
  20. package/dist/define/defineIndicator.d.ts +11 -0
  21. package/dist/define/defineIndicator.d.ts.map +1 -1
  22. package/dist/define/defineIndicator.js +5 -2
  23. package/dist/define/defineIndicator.js.map +1 -1
  24. package/dist/define/depAccessorSentinel.d.ts +46 -0
  25. package/dist/define/depAccessorSentinel.d.ts.map +1 -0
  26. package/dist/define/depAccessorSentinel.js +51 -0
  27. package/dist/define/depAccessorSentinel.js.map +1 -0
  28. package/dist/define/dependency.d.ts +63 -0
  29. package/dist/define/dependency.d.ts.map +1 -0
  30. package/dist/define/dependency.js +4 -0
  31. package/dist/define/dependency.js.map +1 -0
  32. package/dist/define/index.d.ts +1 -0
  33. package/dist/define/index.d.ts.map +1 -1
  34. package/dist/define/index.js.map +1 -1
  35. package/dist/define/overrides.js.map +1 -1
  36. package/dist/draw/buckets.js.map +1 -1
  37. package/dist/draw/draw.d.ts +2 -3
  38. package/dist/draw/draw.d.ts.map +1 -1
  39. package/dist/draw/draw.js +1 -2
  40. package/dist/draw/draw.js.map +1 -1
  41. package/dist/draw/drawingKind.d.ts +1 -1
  42. package/dist/draw/drawingKind.js.map +1 -1
  43. package/dist/draw/drawingState.d.ts +5 -5
  44. package/dist/draw/drawingState.js.map +1 -1
  45. package/dist/draw/drawingStyle.d.ts +1 -1
  46. package/dist/draw/drawingStyle.js.map +1 -1
  47. package/dist/draw/handle.js.map +1 -1
  48. package/dist/draw/index.js.map +1 -1
  49. package/dist/draw/table.d.ts +1 -1
  50. package/dist/draw/table.js.map +1 -1
  51. package/dist/draw/worldPoint.js.map +1 -1
  52. package/dist/index.d.ts +4 -3
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +1 -0
  55. package/dist/index.js.map +1 -1
  56. package/dist/input/index.js.map +1 -1
  57. package/dist/input/input.js.map +1 -1
  58. package/dist/input/inputDescriptor.js.map +1 -1
  59. package/dist/interval/intervalToSeconds.js.map +1 -1
  60. package/dist/plot/index.js.map +1 -1
  61. package/dist/plot/plot.d.ts +25 -7
  62. package/dist/plot/plot.d.ts.map +1 -1
  63. package/dist/plot/plot.js +1 -1
  64. package/dist/plot/plot.js.map +1 -1
  65. package/dist/request/index.js.map +1 -1
  66. package/dist/request/request.js.map +1 -1
  67. package/dist/runtime/index.js.map +1 -1
  68. package/dist/runtime/runtime.js.map +1 -1
  69. package/dist/state/index.d.ts +1 -1
  70. package/dist/state/index.d.ts.map +1 -1
  71. package/dist/state/index.js.map +1 -1
  72. package/dist/state/mutableSlot.js.map +1 -1
  73. package/dist/state/snapshot.d.ts +39 -12
  74. package/dist/state/snapshot.d.ts.map +1 -1
  75. package/dist/state/snapshot.js.map +1 -1
  76. package/dist/state/state.js.map +1 -1
  77. package/dist/statefulPrimitives.d.ts +1 -1
  78. package/dist/statefulPrimitives.js +1 -1
  79. package/dist/statefulPrimitives.js.map +1 -1
  80. package/dist/ta/index.js.map +1 -1
  81. package/dist/ta/ta.d.ts +41 -41
  82. package/dist/ta/ta.js.map +1 -1
  83. package/dist/time/_lib/dateTimeFormatCache.js.map +1 -1
  84. package/dist/time/index.js.map +1 -1
  85. package/dist/time/nyDayKey.js +2 -2
  86. package/dist/time/nyDayKey.js.map +1 -1
  87. package/dist/time/session.js.map +1 -1
  88. package/dist/time/sessionBoundaries.js +2 -2
  89. package/dist/time/sessionBoundaries.js.map +1 -1
  90. package/dist/time/types.js.map +1 -1
  91. package/dist/time/weekKey.js.map +1 -1
  92. package/dist/time/weekday.js.map +1 -1
  93. package/dist/types.d.ts +246 -1
  94. package/dist/types.d.ts.map +1 -1
  95. package/dist/types.js +17 -1
  96. package/dist/types.js.map +1 -1
  97. package/dist/views/barstate.js.map +1 -1
  98. package/dist/views/index.js.map +1 -1
  99. package/dist/views/syminfo.js.map +1 -1
  100. package/dist/views/timeframe.js.map +1 -1
  101. package/package.json +1 -1
package/dist/ta/ta.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { PlotLineStyle, Series, Time } from "../types.js";
2
2
  /**
3
3
  * Options bag for `ta.sma`. `offset` shifts the output forward by `n`
4
- * bars per the universal `opts.offset` convention (PLAN.md §9.1):
4
+ * bars per the universal `opts.offset` convention:
5
5
  * positive `n` makes `series.current` return the value `n` bars ago,
6
6
  * negative `n` reads into the future (NaN at the head).
7
7
  *
@@ -124,7 +124,7 @@ export type CrossunderOpts = Readonly<{
124
124
  }>;
125
125
  /**
126
126
  * Options bag for `ta.highest`. `offset` shifts the read window backwards
127
- * by `n` bars (Phase-2 backfill — see PLAN.md §9.1).
127
+ * by `n` bars (Phase-2 backfill).
128
128
  *
129
129
  * @formula N/A — see `ta.highest` JSDoc
130
130
  * @since 0.2
@@ -356,7 +356,7 @@ export type MaTypeNoVolume = "sma" | "ema" | "wma" | "smma";
356
356
  /**
357
357
  * Options bag for `ta.maRibbon` (a fan of K MAs at different lengths).
358
358
  * Defaults: `lengths = [10, 20, 30, 40, 50]`, `maType = "sma"`.
359
- * `offset` is the universal bar-shift (per PLAN.md §9.1) applied to
359
+ * `offset` is the universal bar-shift applied to
360
360
  * every output series. `outputs` is forward-compat per-key plot styling
361
361
  * (typed but not consumed by the runtime impl).
362
362
  *
@@ -567,7 +567,7 @@ export type TsiResult = Readonly<{
567
567
  }>;
568
568
  /**
569
569
  * Options bag for `ta.cci`. `offset` shifts the read window backwards
570
- * (Phase-2 backfill — see PLAN.md §9.1). `lineStyle` is a pass-through
570
+ * (Phase-2 backfill). `lineStyle` is a pass-through
571
571
  * for the script-author's downstream `plot(cci, { lineStyle })` call
572
572
  * and is not consumed by the primitive itself.
573
573
  *
@@ -632,7 +632,7 @@ export type StochResult = Readonly<{
632
632
  * Options bag for `ta.stochRsi`. `rsiLength` / `stochLength` /
633
633
  * `kSmoothing` / `dSmoothing` default to the Pine-canonical
634
634
  * `14` / `14` / `3` / `3` Stochastic-RSI settings. `offset`
635
- * shifts the read window backwards (PLAN.md §9.1).
635
+ * shifts the read window backwards.
636
636
  *
637
637
  * @formula N/A — see `ta.stochRsi` JSDoc
638
638
  * @since 0.2
@@ -689,7 +689,7 @@ export type CoppockOpts = Readonly<{
689
689
  * Options bag for `ta.ppo`. `fastLength` / `slowLength` / `signalLength`
690
690
  * default to the Appel-era `12` / `26` / `9` (mirrors `ta.macd`).
691
691
  * `offset` shifts all three outputs (`ppo`, `signal`, `hist`) in
692
- * lockstep per the universal `opts.offset` convention (PLAN.md §9.1).
692
+ * lockstep per the universal `opts.offset` convention.
693
693
  *
694
694
  * @formula N/A — see `ta.ppo` JSDoc
695
695
  * @since 0.2
@@ -705,7 +705,7 @@ export type PpoOpts = Readonly<{
705
705
  }>;
706
706
  /**
707
707
  * Options bag for `ta.dpo`. `offset` shifts the read window backwards
708
- * (PLAN.md §9.1). `lineStyle` is a forward-compat plot-styling hint
708
+ *. `lineStyle` is a forward-compat plot-styling hint
709
709
  * surfaced for §9.1 ergonomics — not consumed by the primitive
710
710
  * itself.
711
711
  *
@@ -722,7 +722,7 @@ export type DpoOpts = Readonly<{
722
722
  /**
723
723
  * Options bag for `ta.connorsRsi`. `rsiLength` / `streakLength` /
724
724
  * `rocLength` default to Larry Connors' canonical `3` / `2` / `100`.
725
- * `offset` shifts the read window backwards (PLAN.md §9.1).
725
+ * `offset` shifts the read window backwards.
726
726
  *
727
727
  * @formula N/A — see `ta.connorsRsi` JSDoc
728
728
  * @since 0.2
@@ -785,7 +785,7 @@ export type StochRsiResult = Readonly<{
785
785
  * Options bag for `ta.kst` (Know Sure Thing). Defaults match Pring's
786
786
  * canonical settings `(10, 15, 20, 30, 10, 10, 10, 15, 9)`. Source is
787
787
  * positional (`ta.kst(source, opts?)`). `offset` shifts the read window
788
- * backwards (PLAN.md §9.1 — accepted on the surface).
788
+ * backwards (accepted on the surface).
789
789
  *
790
790
  * @formula N/A — see `ta.kst` JSDoc
791
791
  * @since 0.2
@@ -827,7 +827,7 @@ export type KstResult = Readonly<{
827
827
  /**
828
828
  * Options bag for `ta.fisher`. `length` is positional on the call
829
829
  * (`ta.fisher(length, opts?)`); the bag carries only the universal
830
- * `offset` (PLAN.md §9.1 — accepted on the surface).
830
+ * `offset` (accepted on the surface).
831
831
  *
832
832
  * @formula N/A — see `ta.fisher` JSDoc
833
833
  * @since 0.2
@@ -865,7 +865,7 @@ export type FisherResult = Readonly<{
865
865
  /**
866
866
  * Options bag for `ta.klinger` (Klinger Volume Oscillator). Defaults
867
867
  * `(fastLength=34, slowLength=55, signalLength=13)` match invinite.
868
- * `offset` shifts the read window backwards (PLAN.md §9.1 — accepted
868
+ * `offset` shifts the read window backwards (accepted
869
869
  * on the surface).
870
870
  *
871
871
  * @formula N/A — see `ta.klinger` JSDoc
@@ -905,7 +905,7 @@ export type KlingerResult = Readonly<{
905
905
  /**
906
906
  * Options bag for `ta.rvgi` (Relative Vigor Index). `length` is the SMA
907
907
  * smoothing of the 4-bar weighted numerator / denominator (default
908
- * `10`). `offset` shifts the read window backwards (PLAN.md §9.1
908
+ * `10`). `offset` shifts the read window backwards (—
909
909
  * accepted on the surface).
910
910
  *
911
911
  * @formula N/A — see `ta.rvgi` JSDoc
@@ -941,7 +941,7 @@ export type RvgiResult = Readonly<{
941
941
  }>;
942
942
  /**
943
943
  * Options bag for `ta.aroon`. `offset` shifts the read window backwards
944
- * (PLAN.md §9.1). `outputs` carries per-output styling hints that
944
+ *. `outputs` carries per-output styling hints that
945
945
  * downstream `plot()` callsites can lift defaults from; the runtime
946
946
  * itself ignores it in Phase 2 — script-author `plot(a.up,
947
947
  * { lineStyle })` is the styling seam.
@@ -1016,7 +1016,7 @@ export type UlcerIndexOpts = Readonly<{
1016
1016
  }>;
1017
1017
  /**
1018
1018
  * Options bag for `ta.vol`. `offset` shifts the read window backwards
1019
- * (PLAN.md §9.1 universal offset). `ta.vol` is a pass-through of
1019
+ * (universal offset). `ta.vol` is a pass-through of
1020
1020
  * `bar.volume`; the opts bag exists so authors can attach the
1021
1021
  * universal `offset` without an extra wrapper.
1022
1022
  *
@@ -1032,7 +1032,7 @@ export type VolOpts = Readonly<{
1032
1032
  /**
1033
1033
  * Options bag for `ta.vwap`. `source` selects the per-bar price
1034
1034
  * (default `"hlc3"` per Pine). `offset` shifts the read window
1035
- * backwards (PLAN.md §9.1).
1035
+ * backwards.
1036
1036
  *
1037
1037
  * @formula vwap = Σ(source · volume) / Σ(volume) per session window
1038
1038
  * @since 0.2
@@ -1243,7 +1243,7 @@ export type FixedRangeVolumeProfileResult = Readonly<{
1243
1243
  }>;
1244
1244
  /**
1245
1245
  * Options bag for `ta.obv` (On-Balance Volume). `offset` shifts the
1246
- * read window backwards (PLAN.md §9.1 universal offset). `lineStyle`
1246
+ * read window backwards (universal offset). `lineStyle`
1247
1247
  * is a forward-compat plot-styling hint surfaced for §9.1 ergonomics —
1248
1248
  * not consumed by the primitive itself.
1249
1249
  *
@@ -1302,7 +1302,7 @@ export type CmfOpts = Readonly<{
1302
1302
  /**
1303
1303
  * Options bag for `ta.chaikinOsc` (Chaikin Oscillator). Defaults
1304
1304
  * match Pine / invinite: `fastLength = 3`, `slowLength = 10`. `offset`
1305
- * shifts the read window backwards (PLAN.md §9.1 universal offset).
1305
+ * shifts the read window backwards (universal offset).
1306
1306
  *
1307
1307
  * @formula N/A — see `ta.chaikinOsc` JSDoc
1308
1308
  * @since 0.2
@@ -1350,7 +1350,7 @@ export type NetVolumeOpts = Readonly<{
1350
1350
  * applied to `bar.volume`. Defaults match Appel-era `12 / 26 / 9`
1351
1351
  * (mirrors `ta.ppo` / `ta.macd`). `offset` shifts all three outputs
1352
1352
  * (`pvo`, `signal`, `hist`) in lockstep per the universal `opts.offset`
1353
- * convention (PLAN.md §9.1).
1353
+ * convention.
1354
1354
  *
1355
1355
  * @formula N/A — see `ta.pvo` JSDoc
1356
1356
  * @since 0.2
@@ -1387,7 +1387,7 @@ export type PvoResult = Readonly<{
1387
1387
  /**
1388
1388
  * Options bag for `ta.pvt` (Price Volume Trend). Cumulative
1389
1389
  * `volume · (close − prevClose) / prevClose`. `offset` shifts the
1390
- * read window backwards (PLAN.md §9.1 universal offset). `lineStyle`
1390
+ * read window backwards (universal offset). `lineStyle`
1391
1391
  * is a forward-compat plot-styling hint surfaced for §9.1 ergonomics —
1392
1392
  * not consumed by the primitive itself.
1393
1393
  *
@@ -1469,7 +1469,7 @@ export type AroonResult = Readonly<{
1469
1469
  /**
1470
1470
  * Options bag for `ta.bbPercentB`. `multiplier` scales the BB envelope
1471
1471
  * (defaults to `2`, mirroring Pine / TradingView). `offset` shifts the
1472
- * read window backwards (PLAN.md §9.1); `lineStyle` is a forward-compat
1472
+ * read window backwards; `lineStyle` is a forward-compat
1473
1473
  * plot-styling hint surfaced for §9.1 ergonomics.
1474
1474
  *
1475
1475
  * @formula N/A — see `ta.bbPercentB` JSDoc
@@ -1503,7 +1503,7 @@ export type BbwOpts = Readonly<{
1503
1503
  * Options bag for `ta.historicalVolatility`. `annualisationFactor`
1504
1504
  * defaults to `365` (TradingView's "Crypto" / 24-7 convention; use
1505
1505
  * `252` for trading-day equity series). `offset` shifts the read
1506
- * window backwards (PLAN.md §9.1).
1506
+ * window backwards.
1507
1507
  *
1508
1508
  * @formula N/A — see `ta.historicalVolatility` JSDoc
1509
1509
  * @anchors annualisationFactor
@@ -1519,7 +1519,7 @@ export type HvOpts = Readonly<{
1519
1519
  }>;
1520
1520
  /**
1521
1521
  * Options bag for `ta.rvi`. `offset` shifts the read window
1522
- * backwards (PLAN.md §9.1); `lineStyle` is a forward-compat
1522
+ * backwards; `lineStyle` is a forward-compat
1523
1523
  * plot-styling hint surfaced for §9.1 ergonomics.
1524
1524
  *
1525
1525
  * @formula N/A — see `ta.rvi` JSDoc
@@ -1536,7 +1536,7 @@ export type RviOpts = Readonly<{
1536
1536
  * Options bag for `ta.massIndex`. `emaLength` defaults to `9` (the
1537
1537
  * inner EMA-of-range and outer EMA-of-EMA window); `sumLength`
1538
1538
  * defaults to `25` (the rolling-sum-of-ratio window). `offset`
1539
- * shifts the read window backwards (PLAN.md §9.1).
1539
+ * shifts the read window backwards.
1540
1540
  *
1541
1541
  * @formula N/A — see `ta.massIndex` JSDoc
1542
1542
  * @since 0.2
@@ -1552,7 +1552,7 @@ export type MassIndexOpts = Readonly<{
1552
1552
  }>;
1553
1553
  /**
1554
1554
  * Options bag for `ta.donchian`. `offset` shifts the read window
1555
- * backwards (PLAN.md §9.1). `outputs` carries per-output styling
1555
+ * backwards. `outputs` carries per-output styling
1556
1556
  * hints downstream `plot()` callsites can lift defaults from; the
1557
1557
  * runtime itself ignores it in Phase 2.
1558
1558
  *
@@ -1599,7 +1599,7 @@ export type DonchianResult = Readonly<{
1599
1599
  * canonical form — Chester Keltner's original used SMA over a hand-
1600
1600
  * rolled "typical range", but every modern reference defaults to EMA
1601
1601
  * over close + Wilder ATR). `offset` is the universal bar-shift
1602
- * (PLAN.md §9.1 — accepted on the surface). `outputs` carries
1602
+ * (accepted on the surface). `outputs` carries
1603
1603
  * per-output styling hints downstream `plot()` callsites can lift
1604
1604
  * defaults from; the runtime itself ignores it in Phase 2.
1605
1605
  *
@@ -1647,7 +1647,7 @@ export type KeltnerResult = Readonly<{
1647
1647
  * is the MA period (default `20`); `percent` is the band offset as a
1648
1648
  * percentage of the middle MA (default `10`); `maType` picks the MA
1649
1649
  * kind (default `"sma"`). `offset` is the universal bar-shift
1650
- * (PLAN.md §9.1 — accepted on the surface).
1650
+ * (accepted on the surface).
1651
1651
  *
1652
1652
  * @formula N/A — see `ta.envelope` JSDoc
1653
1653
  * @anchors maType
@@ -1686,7 +1686,7 @@ export type EnvelopeResult = Readonly<{
1686
1686
  }>;
1687
1687
  /**
1688
1688
  * Options bag for `ta.chop` (Choppiness Index). `offset` is the
1689
- * universal bar-shift (PLAN.md §9.1 — accepted on the surface).
1689
+ * universal bar-shift (accepted on the surface).
1690
1690
  * `lineStyle` is a forward-compat plot-styling hint surfaced for
1691
1691
  * §9.1 ergonomics — not consumed by the primitive itself.
1692
1692
  *
@@ -1704,7 +1704,7 @@ export type ChopOpts = Readonly<{
1704
1704
  * Options bag for `ta.psar` (Parabolic SAR). `accelerationStart` /
1705
1705
  * `accelerationStep` / `accelerationMax` default to the canonical
1706
1706
  * Wilder values `0.02` / `0.02` / `0.2`. `offset` shifts the read
1707
- * window backwards (PLAN.md §9.1 — accepted on the surface).
1707
+ * window backwards (accepted on the surface).
1708
1708
  *
1709
1709
  * @formula N/A — see `ta.psar` JSDoc
1710
1710
  * @anchors accelerationStart, accelerationStep, accelerationMax
@@ -1743,7 +1743,7 @@ export type PsarResult = Readonly<{
1743
1743
  * Options bag for `ta.supertrend`. `length` is the ATR period
1744
1744
  * (default `10`); `multiplier` scales the band offset from `hl2`
1745
1745
  * (default `3`). `offset` shifts the read window backwards
1746
- * (PLAN.md §9.1 — accepted on the surface). The source is hard-coded
1746
+ * (accepted on the surface). The source is hard-coded
1747
1747
  * to `hl2` (Pine-canonical Supertrend); a `source` opt could land in
1748
1748
  * a follow-up.
1749
1749
  *
@@ -1781,7 +1781,7 @@ export type SupertrendResult = Readonly<{
1781
1781
  * Options bag for `ta.chandelier` (Chandelier Exit). `length` is the
1782
1782
  * ATR period AND the rolling extreme window (default `22`);
1783
1783
  * `multiplier` scales the ATR offset (default `3`). `offset` shifts
1784
- * the read window backwards (PLAN.md §9.1 — accepted on the surface).
1784
+ * the read window backwards (accepted on the surface).
1785
1785
  *
1786
1786
  * @formula N/A — see `ta.chandelier` JSDoc
1787
1787
  * @anchors length, multiplier
@@ -1821,7 +1821,7 @@ export type ChandelierResult = Readonly<{
1821
1821
  * `10`); `multiplier` scales the ATR offset (default `1`);
1822
1822
  * `smoothingLength` is the second-pass extreme window (default `9`)
1823
1823
  * — matches Chande Kroll's 1995 paper. `offset` shifts the read
1824
- * window backwards (PLAN.md §9.1 — accepted on the surface).
1824
+ * window backwards (accepted on the surface).
1825
1825
  *
1826
1826
  * @formula N/A — see `ta.chandeKrollStop` JSDoc
1827
1827
  * @anchors length, multiplier
@@ -1863,7 +1863,7 @@ export type ChandeKrollStopResult = Readonly<{
1863
1863
  * Options bag for `ta.williamsFractal`. `length` is the symmetric
1864
1864
  * left / right window size (default `2` — total 5-bar window: 2
1865
1865
  * left + centre + 2 right). `offset` shifts the read window
1866
- * backwards (PLAN.md §9.1 — accepted on the surface).
1866
+ * backwards (accepted on the surface).
1867
1867
  *
1868
1868
  * @formula N/A — see `ta.williamsFractal` JSDoc
1869
1869
  * @anchors length
@@ -1913,7 +1913,7 @@ export type WilliamsFractalResult = Readonly<{
1913
1913
  * (default `5`) required to confirm a reversal pivot from the running
1914
1914
  * candidate; `depth` is the minimum number of bars (default `10`) that
1915
1915
  * must elapse before a pivot can be confirmed. `offset` shifts the
1916
- * read window backwards (PLAN.md §9.1 — accepted on the surface).
1916
+ * read window backwards (accepted on the surface).
1917
1917
  *
1918
1918
  * @formula N/A — see `ta.zigZag` JSDoc
1919
1919
  * @anchors deviation, depth
@@ -1956,7 +1956,7 @@ export type ZigZagResult = Readonly<{
1956
1956
  * Options bag for `ta.pivotsHighLow`. `leftLength` / `rightLength`
1957
1957
  * default to `4` (a 9-bar centred window); they may differ to surface
1958
1958
  * asymmetric `ta.pivothigh` / `ta.pivotlow` behaviour. `offset` shifts
1959
- * the read window backwards (PLAN.md §9.1 — accepted on the surface).
1959
+ * the read window backwards (accepted on the surface).
1960
1960
  *
1961
1961
  * @formula N/A — see `ta.pivotsHighLow` JSDoc
1962
1962
  * @anchors leftLength, rightLength
@@ -2012,7 +2012,7 @@ export type PivotsStandardSystem = "classic" | "fibonacci" | "camarilla" | "wood
2012
2012
  /**
2013
2013
  * Options bag for `ta.pivotsStandard`. `system` picks the formula
2014
2014
  * family (default `"classic"`). `offset` shifts the read window
2015
- * backwards (PLAN.md §9.1 — accepted on the surface).
2015
+ * backwards (accepted on the surface).
2016
2016
  *
2017
2017
  * @formula N/A — see `ta.pivotsStandard` JSDoc
2018
2018
  * @anchors system
@@ -2058,7 +2058,7 @@ export type PivotsStandardResult = Readonly<{
2058
2058
  /**
2059
2059
  * Options bag for `ta.volatilityStop`. `length` is the ATR period
2060
2060
  * (default `20`); `multiplier` scales the ATR offset (default `2`).
2061
- * `offset` shifts the read window backwards (PLAN.md §9.1 — accepted
2061
+ * `offset` shifts the read window backwards (accepted
2062
2062
  * on the surface). Source is hard-coded to `bar.close` (Pine
2063
2063
  * `ta.vstop` convention); an explicit `source` opt could land in a
2064
2064
  * follow-up.
@@ -2098,7 +2098,7 @@ export type VolatilityStopResult = Readonly<{
2098
2098
  * Options bag for `ta.adx` (Wilder's Average Directional Index).
2099
2099
  * `smoothing` is the second-stage Wilder window applied to DX
2100
2100
  * (default `14` — matches the DI window). `offset` shifts the
2101
- * output (PLAN.md §9.1). `lineStyle` is a forward-compat plot-
2101
+ * output. `lineStyle` is a forward-compat plot-
2102
2102
  * styling hint surfaced for §9.1 ergonomics — not consumed by the
2103
2103
  * primitive itself.
2104
2104
  *
@@ -2116,7 +2116,7 @@ export type AdxOpts = Readonly<{
2116
2116
  }>;
2117
2117
  /**
2118
2118
  * Options bag for `ta.dmi` (Directional Movement Index). `offset`
2119
- * shifts both output series in lockstep (PLAN.md §9.1). `outputs`
2119
+ * shifts both output series in lockstep. `outputs`
2120
2120
  * carries per-output styling hints downstream `plot()` callsites
2121
2121
  * can lift defaults from; the runtime itself ignores it in Phase 2
2122
2122
  * — script-author `plot(d.plusDi, { lineStyle })` is the styling
@@ -2157,7 +2157,7 @@ export type DmiResult = Readonly<{
2157
2157
  * Options bag for `ta.trix` (Triple-smoothed EMA Rate-of-Change).
2158
2158
  * `signalLength` is the EMA-smoothing length of the TRIX signal
2159
2159
  * line (default `9`). `offset` shifts both output series in
2160
- * lockstep (PLAN.md §9.1).
2160
+ * lockstep.
2161
2161
  *
2162
2162
  * @formula N/A — see `ta.trix` JSDoc
2163
2163
  * @anchors signalLength
@@ -2191,7 +2191,7 @@ export type TrixResult = Readonly<{
2191
2191
  /**
2192
2192
  * Options bag for `ta.vortex` (Botes & Siepman Vortex Indicator).
2193
2193
  * `length` is positional on the call (`ta.vortex(length, opts?)`), so
2194
- * the opts bag carries only the universal `offset` (PLAN.md §9.1) +
2194
+ * the opts bag carries only the universal `offset` +
2195
2195
  * per-output styling hints. The runtime emits `NaN` on zero-TR
2196
2196
  * windows (chartlang surfaces the degenerate window — invinite emits
2197
2197
  * 0 in the same case).
@@ -2247,7 +2247,7 @@ export type TrendStrengthIndexOpts = Readonly<{
2247
2247
  * Options bag for `ta.ichimoku`. Defaults follow Pine / TradingView
2248
2248
  * canonical Ichimoku — `conversionLength = 9, baseLength = 26,
2249
2249
  * leadingSpanBLength = 52, displacement = 26`. `offset` shifts all
2250
- * five outputs in lockstep (PLAN.md §9.1). `outputs` carries
2250
+ * five outputs in lockstep. `outputs` carries
2251
2251
  * per-output styling hints downstream `plot()` callsites can lift
2252
2252
  * defaults from; the runtime itself ignores it in Phase 2.
2253
2253
  *
package/dist/ta/ta.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ta.js","sourceRoot":"","sources":["../../src/ta/ta.ts"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MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,EAAE,GAAG,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IACjE,CAAC;IACD,kBAAkB,EAAE,GAAG,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC7E,CAAC;IACD,QAAQ,EAAE,GAAG,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACnE,CAAC;CACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { PlotLineStyle, Series, Time } from \"../types.js\";\n\n/**\n * Options bag for `ta.sma`. `offset` shifts the output forward by `n`\n * bars per the universal `opts.offset` convention:\n * positive `n` makes `series.current` return the value `n` bars ago,\n * negative `n` reads into the future (NaN at the head).\n *\n * @formula N/A — placeholder\n * @since 0.1\n * @stable\n * @example\n * const opts: SmaOpts = { offset: 0 };\n */\nexport type SmaOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.ema`. `offset` matches {@link SmaOpts}.\n *\n * @formula N/A — placeholder\n * @since 0.1\n * @stable\n * @example\n * const opts: EmaOpts = { offset: 0 };\n */\nexport type EmaOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.stdev`. `biased` toggles between population (default)\n * and sample standard deviation. `offset` matches {@link SmaOpts}.\n *\n * @formula σ_biased = sqrt(Σ(x_i − μ)² / N); σ_sample = sqrt(Σ / (N − 1))\n * @since 0.1\n * @stable\n * @example\n * const opts: StdevOpts = { biased: false, offset: 0 };\n */\nexport type StdevOpts = Readonly<{ biased?: boolean; offset?: number }>;\n\n/**\n * Options bag for `ta.bb`. `multiplier` defaults to `2` and scales the upper /\n * lower bands away from the middle. `offset` matches {@link SmaOpts} and\n * shifts all three bands (upper / middle / lower) in lockstep.\n *\n * @formula upper = sma + multiplier * stdev, lower = sma − multiplier * stdev\n * @since 0.1\n * @stable\n * @example\n * const opts: BbOpts = { multiplier: 2, offset: 0 };\n */\nexport type BbOpts = Readonly<{ multiplier?: number; offset?: number }>;\n\n/**\n * Options bag for `ta.rsi`. `offset` matches {@link SmaOpts}.\n *\n * @formula N/A — placeholder\n * @since 0.1\n * @stable\n * @example\n * const opts: RsiOpts = { offset: 0 };\n */\nexport type RsiOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.macd`. Fast / slow / signal lengths default to the\n * Appel-era 12 / 26 / 9 when omitted. `offset` matches {@link SmaOpts}\n * and shifts all three outputs (macd / signal / hist) in lockstep.\n *\n * @formula N/A — see `ta.macd` JSDoc\n * @since 0.1\n * @stable\n * @example\n * const opts: MacdOpts = { fastLength: 12, slowLength: 26, signalLength: 9 };\n */\nexport type MacdOpts = Readonly<{\n fastLength?: number;\n slowLength?: number;\n signalLength?: number;\n offset?: number;\n}>;\n\n/**\n * Options bag for `ta.atr`. `offset` matches {@link SmaOpts}.\n *\n * @formula N/A — placeholder\n * @since 0.1\n * @stable\n * @example\n * const opts: AtrOpts = { offset: 0 };\n */\nexport type AtrOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.crossover`. `offset` matches {@link SmaOpts}\n * (shifts the boolean output so `series.current` returns the crossover\n * detection `offset` bars ago).\n *\n * @formula N/A — see `ta.crossover` JSDoc\n * @since 0.1\n * @stable\n * @example\n * const opts: CrossoverOpts = { offset: 0 };\n */\nexport type CrossoverOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.crossunder`. Mirrors {@link CrossoverOpts}.\n *\n * @formula N/A — see `ta.crossunder` JSDoc\n * @since 0.1\n * @stable\n * @example\n * const opts: CrossunderOpts = { offset: 0 };\n */\nexport type CrossunderOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.highest`. `offset` shifts the read window backwards\n * by `n` bars (Phase-2 backfill).\n *\n * @formula N/A — see `ta.highest` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: HighestOpts = { offset: 0 };\n */\nexport type HighestOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.lowest`. Mirrors {@link HighestOpts}.\n *\n * @formula N/A — see `ta.lowest` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: LowestOpts = { offset: 0 };\n */\nexport type LowestOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.change`. `length` is the lookback distance (default\n * `1` — first-difference); `offset` shifts the read window backwards.\n *\n * @formula out = source[0] − source[length]\n * @since 0.2\n * @stable\n * @example\n * const opts: ChangeOpts = { length: 1 };\n */\nexport type ChangeOpts = Readonly<{ length?: number; offset?: number }>;\n\n/**\n * Options bag for `ta.valuewhen`. `offset` shifts the emitted series after the\n * occurrence lookup has been evaluated.\n *\n * @formula N/A — see `ta.valuewhen` JSDoc\n * @since 0.4\n * @stable\n * @example\n * const opts: ValuewhenOpts = { offset: 0 };\n */\nexport type ValuewhenOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.barssince`. `offset` shifts the elapsed-bars output.\n *\n * @formula N/A — see `ta.barssince` JSDoc\n * @since 0.4\n * @stable\n * @example\n * const opts: BarssinceOpts = { offset: 0 };\n */\nexport type BarssinceOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.wma`. `offset` shifts the output forward by `n`\n * bars (Task-29 universal-offset backfill). `lineStyle` is a\n * pass-through for the script-author's downstream `plot(wma, { lineStyle })`\n * call — not consumed by the primitive itself.\n *\n * @formula N/A — see `ta.wma` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: WmaOpts = { offset: 0 };\n */\nexport type WmaOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.vwma`. Mirrors {@link WmaOpts}.\n *\n * @formula N/A — see `ta.vwma` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: VwmaOpts = { offset: 0 };\n */\nexport type VwmaOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.hma`. Mirrors {@link WmaOpts}.\n *\n * @formula N/A — see `ta.hma` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: HmaOpts = { offset: 0 };\n */\nexport type HmaOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.smma` (smoothed moving average, Wilder's RMA).\n * Mirrors {@link WmaOpts}.\n *\n * @formula N/A — see `ta.smma` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: SmmaOpts = { offset: 0 };\n */\nexport type SmmaOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.dema` (double EMA). Mirrors {@link WmaOpts}.\n *\n * @formula N/A — see `ta.dema` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: DemaOpts = { offset: 0 };\n */\nexport type DemaOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.tema` (triple EMA). Mirrors {@link WmaOpts}.\n *\n * @formula N/A — see `ta.tema` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: TemaOpts = { offset: 0 };\n */\nexport type TemaOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.kama` (Kaufman Adaptive MA). `length` (default\n * `10`) is the efficiency-ratio window; `fastLength` / `slowLength`\n * (defaults `2` / `30`) define the bounding alphas the smoothing\n * constant interpolates between. `offset` matches {@link WmaOpts};\n * `lineStyle` is a forward-compat plot-styling hint.\n *\n * @formula N/A — see `ta.kama` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: KamaOpts = { length: 10, fastLength: 2, slowLength: 30 };\n */\nexport type KamaOpts = Readonly<{\n length?: number;\n fastLength?: number;\n slowLength?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.alma` (Arnaud Legoux MA). `offset` is the\n * Gaussian-centre position in `[0, 1]` (default `0.85`) — NOT the\n * universal bar-shift; the universal shift on ALMA uses the distinct\n * `barShift` field. `sigma` (default `6`) sets the Gaussian spread\n * (spread = `length / sigma`). `lineStyle` is a forward-compat\n * plot-styling hint.\n *\n * @formula N/A — see `ta.alma` JSDoc\n * @anchors offset, sigma\n * @since 0.2\n * @stable\n * @example\n * const opts: AlmaOpts = { offset: 0.85, sigma: 6 };\n */\nexport type AlmaOpts = Readonly<{\n offset?: number;\n sigma?: number;\n barShift?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.lsma` (least-squares regression value at the\n * trailing window's last bar). Mirrors {@link WmaOpts}.\n *\n * @formula N/A — see `ta.lsma` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: LsmaOpts = { offset: 0 };\n */\nexport type LsmaOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.mcginley` (McGinley Dynamic). Mirrors\n * {@link WmaOpts}.\n *\n * @formula N/A — see `ta.mcginley` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: McginleyOpts = { offset: 0 };\n */\nexport type McginleyOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Canonical moving-average kind union, excluding `\"vwma\"`. Shared with\n * the runtime's `lib/maTypes.ts` (byte-equal string-literal union) and\n * referenced by the surface types that accept an `maType` opt\n * (`ta.maRibbon` today; more once Phase-2 ports land). VWMA is\n * excluded because it requires a parallel volume array — derived\n * Float64 inputs (the chained-MA dispatch path) carry no matching\n * volume stream.\n *\n * @formula N/A — string-literal union type\n * @since 0.2\n * @stable\n * @example\n * const k: MaTypeNoVolume = \"ema\";\n */\nexport type MaTypeNoVolume = \"sma\" | \"ema\" | \"wma\" | \"smma\";\n\n/**\n * Options bag for `ta.maRibbon` (a fan of K MAs at different lengths).\n * Defaults: `lengths = [10, 20, 30, 40, 50]`, `maType = \"sma\"`.\n * `offset` is the universal bar-shift applied to\n * every output series. `outputs` is forward-compat per-key plot styling\n * (typed but not consumed by the runtime impl).\n *\n * @formula N/A — see `ta.maRibbon` JSDoc\n * @anchors lengths, maType\n * @since 0.2\n * @stable\n * @example\n * const opts: MaRibbonOpts = { lengths: [10, 20, 30], maType: \"ema\" };\n */\nexport type MaRibbonOpts = Readonly<{\n lengths?: ReadonlyArray<number>;\n maType?: MaTypeNoVolume;\n offset?: number;\n outputs?: Readonly<Record<string, { lineStyle?: PlotLineStyle }>>;\n}>;\n\n/**\n * Result of `ta.maRibbon` — a dynamic-key record keyed by\n * `ma_<length>` (one entry per resolved `lengths` value). Iteration\n * order matches the resolved `lengths` array; use the sibling\n * `maRibbonOutputKeys` helper (exported from\n * `@invinite-org/chartlang-runtime`) for stable iteration over an\n * `opts` value.\n *\n * @formula N/A — dynamic-key record type, see `ta.maRibbon` JSDoc\n * @since 0.2\n * @stable\n * @example\n * declare const r: MaRibbonResult;\n * void r.ma_10?.current;\n */\nexport type MaRibbonResult = Readonly<Record<string, Series<number>>>;\n\n/**\n * Options bag for `ta.ao` (Awesome Oscillator). Fast / slow lengths\n * default to the Pine-canonical `5` / `34` over the `hl2` midpoint.\n * `lineStyle` is a forward-compat plot-styling hint surfaced for\n * §9.1 ergonomics.\n *\n * @formula out = SMA(hl2, fastLength) − SMA(hl2, slowLength)\n * @since 0.2\n * @stable\n * @example\n * const opts: AoOpts = { fastLength: 5, slowLength: 34 };\n */\nexport type AoOpts = Readonly<{\n fastLength?: number;\n slowLength?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.cmo` (Chande Momentum Oscillator). `offset` shifts\n * the read window; `lineStyle` is a forward-compat plot-styling hint.\n *\n * @formula CMO = 100 · (Σ gain − Σ loss) / (Σ gain + Σ loss)\n * @since 0.2\n * @stable\n * @example\n * const opts: CmoOpts = { offset: 0 };\n */\nexport type CmoOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.momentum` (Pine `mom`).\n *\n * @formula out = source[0] − source[length]\n * @since 0.2\n * @stable\n * @example\n * const opts: MomentumOpts = { offset: 0 };\n */\nexport type MomentumOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.roc` (Rate of Change).\n *\n * @formula ROC = 100 · (source[0] − source[length]) / source[length]\n * @since 0.2\n * @stable\n * @example\n * const opts: RocOpts = { offset: 0 };\n */\nexport type RocOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.pmo` (Carl Swenlin's Price Momentum Oscillator).\n * `firstSmoothing` / `secondSmoothing` / `signalLength` default to the\n * TradingView-canonical `35` / `20` / `10`. The inner two stages use a\n * non-canonical EMA factor (`α = 2 / length`); the signal line uses\n * the standard EMA (`α = 2 / (length + 1)`).\n *\n * @formula N/A — see `ta.pmo` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: PmoOpts = { firstSmoothing: 35, secondSmoothing: 20, signalLength: 10 };\n */\nexport type PmoOpts = Readonly<{\n firstSmoothing?: number;\n secondSmoothing?: number;\n signalLength?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * The two-series result of `ta.pmo` — the `pmo` line plus its `signal`\n * line (standard EMA over the pmo output, `signalLength` window).\n * `primarySeriesKey: \"pmo\"` is recorded on `TA_REGISTRY_METADATA`.\n *\n * @formula see `ta.pmo` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const p = ta.pmo(bar.close);\n * plot(p.pmo);\n * plot(p.signal);\n */\nexport type PmoResult = Readonly<{\n pmo: Series<number>;\n signal: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.smi` (William Blau's Stochastic Momentum Index).\n * `kLength` is the rolling high/low window (default `10`);\n * `firstSmoothing` / `secondSmoothing` are the double-EMA smoothing\n * lengths for both numerator and denominator (defaults `3` / `5`);\n * `dLength` is the signal-line EMA length (default `3`).\n *\n * @formula N/A — see `ta.smi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: SmiOpts = { kLength: 10, firstSmoothing: 3, secondSmoothing: 5, dLength: 3 };\n */\nexport type SmiOpts = Readonly<{\n kLength?: number;\n firstSmoothing?: number;\n secondSmoothing?: number;\n dLength?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * The two-series result of `ta.smi` — the `smi` line bounded\n * `[-100, 100]` plus its `signal` line (EMA(`dLength`) of `smi`).\n * `primarySeriesKey: \"smi\"` is recorded on `TA_REGISTRY_METADATA`\n * with `yDomain: { kind: \"fixed\", min: -100, max: 100 }`.\n *\n * @formula see `ta.smi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const s = ta.smi();\n * plot(s.smi);\n * plot(s.signal);\n */\nexport type SmiResult = Readonly<{\n smi: Series<number>;\n signal: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.tsi` (William Blau's True Strength Index — the\n * momentum-class oscillator). `firstSmoothing` is the outer (longer)\n * EMA length (default `25`); `secondSmoothing` is the inner (shorter)\n * EMA length (default `13`); `signalLength` is the signal-line EMA\n * length (default `13`).\n *\n * @formula N/A — see `ta.tsi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: TsiOpts = { firstSmoothing: 25, secondSmoothing: 13, signalLength: 13 };\n */\nexport type TsiOpts = Readonly<{\n firstSmoothing?: number;\n secondSmoothing?: number;\n signalLength?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * The two-series result of `ta.tsi` — the `tsi` line bounded\n * `[-100, 100]` by construction plus its `signal` line\n * (EMA(`signalLength`) of `tsi`). `primarySeriesKey: \"tsi\"` is\n * recorded on `TA_REGISTRY_METADATA` with `yDomain: { kind: \"auto\" }`\n * (TSI rarely approaches ±100 — we follow invinite's plugin choice\n * and let the renderer fit the visible range).\n *\n * @formula see `ta.tsi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const t = ta.tsi(bar.close);\n * plot(t.tsi);\n * plot(t.signal);\n */\nexport type TsiResult = Readonly<{\n tsi: Series<number>;\n signal: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.cci`. `offset` shifts the read window backwards\n * (Phase-2 backfill). `lineStyle` is a pass-through\n * for the script-author's downstream `plot(cci, { lineStyle })` call\n * and is not consumed by the primitive itself.\n *\n * @formula N/A — see `ta.cci` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: CciOpts = { offset: 0 };\n */\nexport type CciOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.stoch`. `kLength` / `kSmoothing` / `dLength`\n * default to `14` / `3` / `3` — Pine's canonical Stochastic Oscillator\n * defaults.\n *\n * @formula N/A — see `ta.stoch` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: StochOpts = { kLength: 14, kSmoothing: 3, dLength: 3 };\n */\nexport type StochOpts = Readonly<{\n kLength?: number;\n kSmoothing?: number;\n dLength?: number;\n offset?: number;\n}>;\n\n/**\n * Options bag for `ta.williamsR`. Mirrors {@link CciOpts}.\n *\n * @formula N/A — see `ta.williamsR` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: WilliamsROpts = { offset: 0 };\n */\nexport type WilliamsROpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * The two-series result of `ta.stoch` — the `%K` line and the `%D`\n * signal line. Both Series are updated in lock-step with the source.\n * `primarySeriesKey: \"k\"` (the registry metadata records this).\n *\n * @formula k = sma(kRaw, kSmoothing); d = sma(k, dLength)\n * @since 0.2\n * @stable\n * @example\n * const s = ta.stoch({ kLength: 14, kSmoothing: 3, dLength: 3 });\n * plot(s.k);\n * plot(s.d);\n */\nexport type StochResult = Readonly<{\n k: Series<number>;\n d: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.stochRsi`. `rsiLength` / `stochLength` /\n * `kSmoothing` / `dSmoothing` default to the Pine-canonical\n * `14` / `14` / `3` / `3` Stochastic-RSI settings. `offset`\n * shifts the read window backwards.\n *\n * @formula N/A — see `ta.stochRsi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: StochRsiOpts = { rsiLength: 14, stochLength: 14, kSmoothing: 3, dSmoothing: 3 };\n */\nexport type StochRsiOpts = Readonly<{\n rsiLength?: number;\n stochLength?: number;\n kSmoothing?: number;\n dSmoothing?: number;\n offset?: number;\n}>;\n\n/**\n * Options bag for `ta.ultimateOsc`. `shortLength` / `mediumLength` /\n * `longLength` default to Larry Williams' canonical `7` / `14` / `28`.\n * `offset` shifts the read window backwards; `lineStyle` is a\n * forward-compat plot-styling hint.\n *\n * @formula N/A — see `ta.ultimateOsc` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: UltimateOscOpts = { shortLength: 7, mediumLength: 14, longLength: 28 };\n */\nexport type UltimateOscOpts = Readonly<{\n shortLength?: number;\n mediumLength?: number;\n longLength?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.coppock`. `roc1Length` / `roc2Length` /\n * `wmaLength` default to the Edwin Coppock canonical `11` / `14` /\n * `10`. `offset` shifts the read window backwards; `lineStyle` is a\n * forward-compat plot-styling hint.\n *\n * @formula N/A — see `ta.coppock` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: CoppockOpts = { roc1Length: 11, roc2Length: 14, wmaLength: 10 };\n */\nexport type CoppockOpts = Readonly<{\n roc1Length?: number;\n roc2Length?: number;\n wmaLength?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.ppo`. `fastLength` / `slowLength` / `signalLength`\n * default to the Appel-era `12` / `26` / `9` (mirrors `ta.macd`).\n * `offset` shifts all three outputs (`ppo`, `signal`, `hist`) in\n * lockstep per the universal `opts.offset` convention.\n *\n * @formula N/A — see `ta.ppo` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: PpoOpts = { fastLength: 12, slowLength: 26, signalLength: 9 };\n */\nexport type PpoOpts = Readonly<{\n fastLength?: number;\n slowLength?: number;\n signalLength?: number;\n offset?: number;\n}>;\n\n/**\n * Options bag for `ta.dpo`. `offset` shifts the read window backwards\n *. `lineStyle` is a forward-compat plot-styling hint\n * surfaced for §9.1 ergonomics — not consumed by the primitive\n * itself.\n *\n * @formula N/A — see `ta.dpo` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: DpoOpts = { offset: 0 };\n */\nexport type DpoOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.connorsRsi`. `rsiLength` / `streakLength` /\n * `rocLength` default to Larry Connors' canonical `3` / `2` / `100`.\n * `offset` shifts the read window backwards.\n *\n * @formula N/A — see `ta.connorsRsi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: ConnorsRsiOpts = { rsiLength: 3, streakLength: 2, rocLength: 100 };\n */\nexport type ConnorsRsiOpts = Readonly<{\n rsiLength?: number;\n streakLength?: number;\n rocLength?: number;\n offset?: number;\n}>;\n\n/**\n * The three-series result of `ta.ppo` — the PPO line, its signal\n * line, and the histogram of their difference. All three Series are\n * updated in lock-step with the source. `primarySeriesKey: \"ppo\"` is\n * recorded in `TA_REGISTRY_METADATA`.\n *\n * @formula ppo = 100 · (ema(src, fast) − ema(src, slow)) / ema(src, slow) ;\n * signal = ema(ppo, signalLength) ;\n * hist = ppo − signal\n * @since 0.2\n * @stable\n * @example\n * const p = ta.ppo(bar.close);\n * plot(p.ppo); plot(p.signal); plot(p.hist);\n */\nexport type PpoResult = Readonly<{\n ppo: Series<number>;\n signal: Series<number>;\n hist: Series<number>;\n}>;\n\n/**\n * The two-series result of `ta.stochRsi` — the `%K` line (stochastic\n * applied to the RSI series, smoothed by `kSmoothing`) and the `%D`\n * signal (SMA of `%K` over `dSmoothing`). Both Series ∈ [0, 100]\n * when defined; the runtime emits NaN through the warmup window or\n * when the rolling RSI range is flat (zero denominator).\n *\n * `primarySeriesKey: \"k\"` (recorded in `TA_REGISTRY_METADATA`).\n *\n * @formula rsi = rsi(source, rsiLength) ;\n * kRaw = 100 · (rsi − lowest(rsi, stochLength))\n * / (highest(rsi, stochLength) − lowest(rsi, stochLength)) ;\n * k = sma(kRaw, kSmoothing) ;\n * d = sma(k, dSmoothing)\n * @since 0.2\n * @stable\n * @example\n * const s = ta.stochRsi(bar.close);\n * plot(s.k);\n * plot(s.d);\n */\nexport type StochRsiResult = Readonly<{\n k: Series<number>;\n d: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.kst` (Know Sure Thing). Defaults match Pring's\n * canonical settings `(10, 15, 20, 30, 10, 10, 10, 15, 9)`. Source is\n * positional (`ta.kst(source, opts?)`). `offset` shifts the read window\n * backwards (accepted on the surface).\n *\n * @formula N/A — see `ta.kst` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: KstOpts = { roc1Length: 10, roc2Length: 15, roc3Length: 20, roc4Length: 30 };\n */\nexport type KstOpts = Readonly<{\n roc1Length?: number;\n roc2Length?: number;\n roc3Length?: number;\n roc4Length?: number;\n roc1Smooth?: number;\n roc2Smooth?: number;\n roc3Smooth?: number;\n roc4Smooth?: number;\n signalLength?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.kst` — the KST line (weighted sum of\n * four smoothed percentage ROCs) and its SMA signal line.\n * `primarySeriesKey: \"kst\"` (recorded in `TA_REGISTRY_METADATA`).\n *\n * @formula rN = sma(rocN(source, rocNLength), rocNSmooth) for N in 1..4 ;\n * kst = r1 + 2·r2 + 3·r3 + 4·r4 ; NaN if any rN NaN ;\n * signal = sma(kst, signalLength)\n * @since 0.2\n * @stable\n * @example\n * const k = ta.kst(bar.close);\n * plot(k.kst);\n * plot(k.signal);\n */\nexport type KstResult = Readonly<{\n kst: Series<number>;\n signal: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.fisher`. `length` is positional on the call\n * (`ta.fisher(length, opts?)`); the bag carries only the universal\n * `offset` (accepted on the surface).\n *\n * @formula N/A — see `ta.fisher` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: FisherOpts = { offset: 0 };\n */\nexport type FisherOpts = Readonly<{ offset?: number }>;\n\n/**\n * The two-series result of `ta.fisher` — the Fisher Transform line and\n * its 1-bar-lagged `trigger` (the prior bar's Fisher value). Both are\n * unbounded; `yDomain: { kind: \"auto\" }`. The first bar's `trigger` is\n * NaN (no prior Fisher).\n *\n * `primarySeriesKey: \"fisher\"` (recorded in `TA_REGISTRY_METADATA`).\n *\n * @formula mid = (high + low) / 2 ;\n * normalised = flatRange ? 0 : (mid − lowest(mid, length)) / (highest − lowest) − 0.5 ;\n * x = 0.66 · normalised + 0.67 · prevX ; NaN at fisher if |x| ≥ 1 ;\n * fisher = 0.5 · ln((1 + x) / (1 − x)) + 0.5 · prevFisher ;\n * trigger[t] = prevFisher (the value of fisher before this close)\n * @since 0.2\n * @stable\n * @example\n * const f = ta.fisher(9);\n * plot(f.fisher);\n * plot(f.trigger);\n */\nexport type FisherResult = Readonly<{\n fisher: Series<number>;\n trigger: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.klinger` (Klinger Volume Oscillator). Defaults\n * `(fastLength=34, slowLength=55, signalLength=13)` match invinite.\n * `offset` shifts the read window backwards (accepted\n * on the surface).\n *\n * @formula N/A — see `ta.klinger` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: KlingerOpts = { fastLength: 34, slowLength: 55, signalLength: 13 };\n */\nexport type KlingerOpts = Readonly<{\n fastLength?: number;\n slowLength?: number;\n signalLength?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.klinger` — the Klinger Oscillator line\n * (`EMA(fast)(vf) − EMA(slow)(vf)` over the Volume Force accumulator)\n * and its `EMA(signalLength)(klinger)` signal. `primarySeriesKey:\n * \"klinger\"` (recorded in `TA_REGISTRY_METADATA`).\n *\n * @formula trend = sign(hlc − prevHlc) carried forward on equality ;\n * cm = trend === prevTrend ? prevCm + dm : prevDm + dm ;\n * vf = volume · |2·(dm/cm − 1)| · trend · 100 ; 0 on cm = 0 ;\n * klinger = ema(vf, fastLength) − ema(vf, slowLength) ;\n * signal = ema(klinger, signalLength)\n * @since 0.2\n * @stable\n * @example\n * const k = ta.klinger();\n * plot(k.klinger);\n * plot(k.signal);\n */\nexport type KlingerResult = Readonly<{\n klinger: Series<number>;\n signal: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.rvgi` (Relative Vigor Index). `length` is the SMA\n * smoothing of the 4-bar weighted numerator / denominator (default\n * `10`). `offset` shifts the read window backwards (—\n * accepted on the surface).\n *\n * @formula N/A — see `ta.rvgi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: RvgiOpts = { length: 10 };\n */\nexport type RvgiOpts = Readonly<{\n length?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.rvgi` — the Relative Vigor Index line\n * (`SMA(numerator, length) / SMA(denominator, length)`) and its 4-bar\n * weighted signal. `primarySeriesKey: \"rvgi\"` (recorded in\n * `TA_REGISTRY_METADATA`).\n *\n * @formula num = (co0 + 2·co1 + 2·co2 + co3) / 6 where coN = close − open ;\n * den = (hl0 + 2·hl1 + 2·hl2 + hl3) / 6 where hlN = high − low ;\n * rvgi = sma(num, length) / sma(den, length) ; NaN on flat den ;\n * signal = (rvgi[0] + 2·rvgi[1] + 2·rvgi[2] + rvgi[3]) / 6\n * @since 0.2\n * @stable\n * @example\n * const r = ta.rvgi();\n * plot(r.rvgi);\n * plot(r.signal);\n */\nexport type RvgiResult = Readonly<{\n rvgi: Series<number>;\n signal: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.aroon`. `offset` shifts the read window backwards\n *. `outputs` carries per-output styling hints that\n * downstream `plot()` callsites can lift defaults from; the runtime\n * itself ignores it in Phase 2 — script-author `plot(a.up,\n * { lineStyle })` is the styling seam.\n *\n * @formula N/A — see `ta.aroon` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: AroonOpts = { offset: 0 };\n */\nexport type AroonOpts = Readonly<{\n offset?: number;\n outputs?: Readonly<Record<\"up\" | \"down\", { lineStyle?: PlotLineStyle }>>;\n}>;\n\n/**\n * Options bag for `ta.aroonOsc`. `lineStyle` is a forward-compat\n * plot-styling hint; the runtime itself reads `offset` only.\n *\n * @formula N/A — see `ta.aroonOsc` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: AroonOscOpts = { offset: 0 };\n */\nexport type AroonOscOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.median` (rolling median). Mirrors {@link WmaOpts}.\n *\n * @formula N/A — see `ta.median` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: MedianOpts = { offset: 0 };\n */\nexport type MedianOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.adr` (Average Daily Range). `length` defaults to\n * `14` — Pine / TradingView canonical. `offset` shifts the read window\n * backwards; `lineStyle` is a forward-compat plot-styling hint.\n *\n * @formula N/A — see `ta.adr` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: AdrOpts = { length: 14 };\n */\nexport type AdrOpts = Readonly<{\n length?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.ulcerIndex`. Mirrors {@link WmaOpts}.\n *\n * @formula N/A — see `ta.ulcerIndex` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: UlcerIndexOpts = { offset: 0 };\n */\nexport type UlcerIndexOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.vol`. `offset` shifts the read window backwards\n * (universal offset). `ta.vol` is a pass-through of\n * `bar.volume`; the opts bag exists so authors can attach the\n * universal `offset` without an extra wrapper.\n *\n * @formula N/A — see `ta.vol` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: VolOpts = { offset: 0 };\n */\nexport type VolOpts = Readonly<{ offset?: number }>;\n\n/**\n * Options bag for `ta.vwap`. `source` selects the per-bar price\n * (default `\"hlc3\"` per Pine). `offset` shifts the read window\n * backwards.\n *\n * @formula vwap = Σ(source · volume) / Σ(volume) per session window\n * @since 0.2\n * @stable\n * @example\n * const opts: VwapOpts = { source: \"hlc3\" };\n */\nexport type VwapOpts = Readonly<{\n source?: \"hlc3\" | \"close\" | \"hl2\" | \"ohlc4\" | \"hlcc4\";\n offset?: number;\n}>;\n\n/**\n * Options bag for `ta.anchoredVwap`. Mirrors {@link VwapOpts}; the\n * `anchorTime` (a UTC millisecond epoch the script author hard-codes)\n * is passed positionally, not via this bag.\n *\n * @formula vwap_anchored = Σ_{t ≥ anchor}(source · volume) / Σ_{t ≥ anchor}(volume)\n * @since 0.2\n * @stable\n * @example\n * const opts: AnchoredVwapOpts = { source: \"hlc3\" };\n */\nexport type AnchoredVwapOpts = Readonly<{\n source?: \"hlc3\" | \"close\" | \"hl2\" | \"ohlc4\" | \"hlcc4\";\n offset?: number;\n}>;\n\n/**\n * Options bag for `ta.visibleRangeVolumeProfile`. `rowSize` selects\n * the number of price rows when positive; `0` / omitted falls back to\n * the runtime's automatic row count. `valueAreaPct` accepts either\n * a fraction (`0.7`) or percentage (`70`). `bucketColor` is copied to\n * each emitted horizontal-histogram bucket.\n *\n * @formula N/A — see `ta.visibleRangeVolumeProfile` JSDoc\n * @since 0.5\n * @stable\n * @example\n * const opts: VisibleRangeVolumeProfileOpts = {\n * rowSize: 24,\n * valueAreaPct: 0.7,\n * bucketColor: \"#90caf9\",\n * };\n */\nexport type VisibleRangeVolumeProfileOpts = Readonly<{\n rowSize?: number;\n valueAreaPct?: number;\n offset?: number;\n bucketColor?: string;\n}>;\n\n/**\n * Multi-output result from `ta.visibleRangeVolumeProfile`.\n *\n * @formula POC / VAH / VAL from the visible-range volume-profile\n * bucket set.\n * @since 0.5\n * @stable\n * @example\n * declare const vp: VisibleRangeVolumeProfileResult;\n * const poc = vp.poc.current;\n */\nexport type VisibleRangeVolumeProfileResult = Readonly<{\n poc: Series<number>;\n valHigh: Series<number>;\n valLow: Series<number>;\n buckets: ReadonlyArray<Readonly<{ price: number; volume: number; color?: string }>>;\n}>;\n\n/**\n * Options bag for `ta.anchoredVolumeProfile`. `anchor` is a UTC\n * millisecond epoch, typically resolved from\n * `input.time(..., { pickFromChart: true })`; `rowSize` selects the\n * number of price rows when positive; `0` / omitted falls back to the\n * runtime's automatic row count. `valueAreaPct` accepts either a\n * fraction (`0.7`) or percentage (`70`). `bucketColor` is copied to\n * each emitted horizontal-histogram bucket.\n *\n * @formula N/A — see `ta.anchoredVolumeProfile` JSDoc\n * @since 0.5\n * @stable\n * @example\n * const opts: AnchoredVolumeProfileOpts = {\n * anchor: 1_700_000_000_000,\n * rowSize: 24,\n * valueAreaPct: 0.7,\n * };\n */\nexport type AnchoredVolumeProfileOpts = Readonly<{\n anchor: Time;\n rowSize?: number;\n valueAreaPct?: number;\n offset?: number;\n bucketColor?: string;\n}>;\n\n/**\n * Multi-output result from `ta.anchoredVolumeProfile`.\n *\n * @formula POC / VAH / VAL from the anchor→current volume-profile\n * bucket set.\n * @since 0.5\n * @stable\n * @example\n * declare const vp: AnchoredVolumeProfileResult;\n * const buckets = vp.buckets;\n */\nexport type AnchoredVolumeProfileResult = Readonly<{\n poc: Series<number>;\n valHigh: Series<number>;\n valLow: Series<number>;\n buckets: ReadonlyArray<Readonly<{ price: number; volume: number; color?: string }>>;\n}>;\n\n/**\n * Options bag for `ta.sessionVolumeProfile`. `sessionStart` is an\n * explicit UTC millisecond boundary override; omitted values derive the\n * current session from `syminfo.session` when adapters provide it, or\n * UTC-day fallback boundaries otherwise. `rowSize`, `valueAreaPct`,\n * `offset`, and `bucketColor` mirror the other volume-profile primitives.\n *\n * @formula N/A — see `ta.sessionVolumeProfile` JSDoc\n * @since 0.5\n * @stable\n * @example\n * const opts: SessionVolumeProfileOpts = {\n * rowSize: 24,\n * valueAreaPct: 0.7,\n * sessionStart: 1_700_000_000_000,\n * };\n */\nexport type SessionVolumeProfileOpts = Readonly<{\n rowSize?: number;\n valueAreaPct?: number;\n offset?: number;\n bucketColor?: string;\n sessionStart?: Time;\n}>;\n\n/**\n * Multi-output result from `ta.sessionVolumeProfile`.\n *\n * @formula POC / VAH / VAL from the current-session volume-profile\n * bucket set.\n * @since 0.5\n * @stable\n * @example\n * declare const vp: SessionVolumeProfileResult;\n * const poc = vp.poc.current;\n */\nexport type SessionVolumeProfileResult = Readonly<{\n poc: Series<number>;\n valHigh: Series<number>;\n valLow: Series<number>;\n buckets: ReadonlyArray<Readonly<{ price: number; volume: number; color?: string }>>;\n}>;\n\n/**\n * Options bag for `ta.fixedRangeVolumeProfile`. `from` and `to` are\n * UTC millisecond anchors, typically resolved from two\n * `input.time(..., { pickFromChart: true })` inputs. `from > to`\n * is invalid and diagnoses at runtime; `from === to` is a\n * single-bar window.\n *\n * @formula N/A — see `ta.fixedRangeVolumeProfile` JSDoc\n * @since 0.5\n * @stable\n * @example\n * const opts: FixedRangeVolumeProfileOpts = {\n * from: 1_700_000_000_000,\n * to: 1_700_060_000_000,\n * rowSize: 24,\n * };\n */\nexport type FixedRangeVolumeProfileOpts = Readonly<{\n from: Time;\n to: Time;\n rowSize?: number;\n valueAreaPct?: number;\n offset?: number;\n bucketColor?: string;\n}>;\n\n/**\n * Multi-output result from `ta.fixedRangeVolumeProfile`.\n *\n * @formula POC / VAH / VAL from the fixed-range volume-profile\n * bucket set.\n * @since 0.5\n * @stable\n * @example\n * declare const vp: FixedRangeVolumeProfileResult;\n * const buckets = vp.buckets;\n */\nexport type FixedRangeVolumeProfileResult = Readonly<{\n poc: Series<number>;\n valHigh: Series<number>;\n valLow: Series<number>;\n buckets: ReadonlyArray<Readonly<{ price: number; volume: number; color?: string }>>;\n}>;\n\n/**\n * Options bag for `ta.obv` (On-Balance Volume). `offset` shifts the\n * read window backwards (universal offset). `lineStyle`\n * is a forward-compat plot-styling hint surfaced for §9.1 ergonomics —\n * not consumed by the primitive itself.\n *\n * @formula N/A — see `ta.obv` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: ObvOpts = { offset: 0 };\n */\nexport type ObvOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.adl` (Accumulation Distribution Line). Mirrors\n * {@link ObvOpts}.\n *\n * @formula N/A — see `ta.adl` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: AdlOpts = { offset: 0 };\n */\nexport type AdlOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.bop` (Balance of Power). Mirrors {@link ObvOpts}.\n *\n * @formula N/A — see `ta.bop` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: BopOpts = { offset: 0 };\n */\nexport type BopOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.cmf` (Chaikin Money Flow). `length` is positional\n * on the call (Pine-canonical `ta.cmf(length)`), so the opts bag carries\n * only the universal `offset` + the styling hint.\n *\n * @formula N/A — see `ta.cmf` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: CmfOpts = { offset: 0 };\n */\nexport type CmfOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.chaikinOsc` (Chaikin Oscillator). Defaults\n * match Pine / invinite: `fastLength = 3`, `slowLength = 10`. `offset`\n * shifts the read window backwards (universal offset).\n *\n * @formula N/A — see `ta.chaikinOsc` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: ChaikinOscOpts = { fastLength: 3, slowLength: 10 };\n */\nexport type ChaikinOscOpts = Readonly<{\n fastLength?: number;\n slowLength?: number;\n offset?: number;\n}>;\n\n/**\n * Options bag for `ta.mfi` (Money Flow Index). `length` is positional\n * on the call (Pine-canonical `ta.mfi(length)`), so the opts bag carries\n * only the universal `offset` + the styling hint.\n *\n * @formula N/A — see `ta.mfi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: MfiOpts = { offset: 0 };\n */\nexport type MfiOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.netVolume` (signed-volume cumulative — math\n * equals `ta.obv`, exposed separately for naming parity with Pine /\n * invinite). Mirrors {@link ObvOpts}.\n *\n * @formula N/A — see `ta.netVolume` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: NetVolumeOpts = { offset: 0 };\n */\nexport type NetVolumeOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.pvo` (Percentage Volume Oscillator). MACD-shape\n * applied to `bar.volume`. Defaults match Appel-era `12 / 26 / 9`\n * (mirrors `ta.ppo` / `ta.macd`). `offset` shifts all three outputs\n * (`pvo`, `signal`, `hist`) in lockstep per the universal `opts.offset`\n * convention.\n *\n * @formula N/A — see `ta.pvo` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: PvoOpts = { fastLength: 12, slowLength: 26, signalLength: 9 };\n */\nexport type PvoOpts = Readonly<{\n fastLength?: number;\n slowLength?: number;\n signalLength?: number;\n offset?: number;\n}>;\n\n/**\n * The three-series result of `ta.pvo` — the PVO line, its signal\n * line, and the histogram of their difference. All three Series are\n * updated in lock-step with `bar.volume`. `primarySeriesKey: \"pvo\"`\n * is recorded in `TA_REGISTRY_METADATA`.\n *\n * @formula pvo = 100 · (ema(volume, fast) − ema(volume, slow)) / ema(volume, slow) ;\n * signal = ema(pvo, signalLength) ;\n * hist = pvo − signal\n * @since 0.2\n * @stable\n * @example\n * const p = ta.pvo();\n * plot(p.pvo); plot(p.signal); plot(p.hist);\n */\nexport type PvoResult = Readonly<{\n pvo: Series<number>;\n signal: Series<number>;\n hist: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.pvt` (Price Volume Trend). Cumulative\n * `volume · (close − prevClose) / prevClose`. `offset` shifts the\n * read window backwards (universal offset). `lineStyle`\n * is a forward-compat plot-styling hint surfaced for §9.1 ergonomics —\n * not consumed by the primitive itself.\n *\n * @formula N/A — see `ta.pvt` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: PvtOpts = { offset: 0 };\n */\nexport type PvtOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.eom` (Ease of Movement). `length` is positional\n * on the call (Pine-canonical `ta.eom(length)`), so the opts bag carries\n * only the universal `offset` + the styling hint.\n *\n * @formula N/A — see `ta.eom` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: EomOpts = { offset: 0 };\n */\nexport type EomOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.nvi` (Negative Volume Index). Cumulative `prev ·\n * (1 + (close − prevClose) / prevClose)` on bars where `volume <\n * prevVolume`; carry forward otherwise. Seeded at 1000 (pinned by the\n * runtime's `@anchors seedValue`).\n *\n * @formula N/A — see `ta.nvi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: NviOpts = { offset: 0 };\n */\nexport type NviOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.pvi` (Positive Volume Index). Mirror of\n * {@link NviOpts}; updates only on bars where `volume > prevVolume`.\n * Seeded at 1000.\n *\n * @formula N/A — see `ta.pvi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: PviOpts = { offset: 0 };\n */\nexport type PviOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * The two-series result of `ta.aroon` — the Up line tracking\n * recency of N-bar highs and the Down line tracking recency of\n * N-bar lows. Both Series ∈ [0, 100] when defined; the runtime\n * emits NaN through the `length` warmup window.\n *\n * @formula up = 100 · (length − barsSinceHigh) / length ;\n * down = 100 · (length − barsSinceLow) / length\n * @since 0.2\n * @stable\n * @example\n * const a = ta.aroon(14);\n * plot(a.up);\n * plot(a.down);\n */\nexport type AroonResult = Readonly<{\n up: Series<number>;\n down: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.bbPercentB`. `multiplier` scales the BB envelope\n * (defaults to `2`, mirroring Pine / TradingView). `offset` shifts the\n * read window backwards; `lineStyle` is a forward-compat\n * plot-styling hint surfaced for §9.1 ergonomics.\n *\n * @formula N/A — see `ta.bbPercentB` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: BbPercentBOpts = { multiplier: 2 };\n */\nexport type BbPercentBOpts = Readonly<{\n multiplier?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.bbw`. Mirrors {@link BbPercentBOpts}; the\n * runtime emits the raw `(upper − lower) / middle` ratio (no ×100\n * TV-parity scale — multiply in the script for that).\n *\n * @formula N/A — see `ta.bbw` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: BbwOpts = { multiplier: 2 };\n */\nexport type BbwOpts = Readonly<{\n multiplier?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.historicalVolatility`. `annualisationFactor`\n * defaults to `365` (TradingView's \"Crypto\" / 24-7 convention; use\n * `252` for trading-day equity series). `offset` shifts the read\n * window backwards.\n *\n * @formula N/A — see `ta.historicalVolatility` JSDoc\n * @anchors annualisationFactor\n * @since 0.2\n * @stable\n * @example\n * const opts: HvOpts = { annualisationFactor: 252 };\n */\nexport type HvOpts = Readonly<{\n annualisationFactor?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.rvi`. `offset` shifts the read window\n * backwards; `lineStyle` is a forward-compat\n * plot-styling hint surfaced for §9.1 ergonomics.\n *\n * @formula N/A — see `ta.rvi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: RviOpts = { offset: 0 };\n */\nexport type RviOpts = Readonly<{\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.massIndex`. `emaLength` defaults to `9` (the\n * inner EMA-of-range and outer EMA-of-EMA window); `sumLength`\n * defaults to `25` (the rolling-sum-of-ratio window). `offset`\n * shifts the read window backwards.\n *\n * @formula N/A — see `ta.massIndex` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: MassIndexOpts = { emaLength: 9, sumLength: 25 };\n */\nexport type MassIndexOpts = Readonly<{\n emaLength?: number;\n sumLength?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.donchian`. `offset` shifts the read window\n * backwards. `outputs` carries per-output styling\n * hints downstream `plot()` callsites can lift defaults from; the\n * runtime itself ignores it in Phase 2.\n *\n * @formula N/A — see `ta.donchian` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: DonchianOpts = { offset: 0 };\n */\nexport type DonchianOpts = Readonly<{\n offset?: number;\n outputs?: Readonly<Record<\"upper\" | \"middle\" | \"lower\", { lineStyle?: PlotLineStyle }>>;\n}>;\n\n/**\n * The three-series result of `ta.donchian` — the upper / middle /\n * lower bands of the Donchian channel envelope. All three Series are\n * updated in lock-step with the trailing `length`-bar high/low\n * window. `primarySeriesKey: \"middle\"` (recorded in\n * `TA_REGISTRY_METADATA`).\n *\n * @formula upper = highest(high, length) ;\n * lower = lowest(low, length) ;\n * middle = (upper + lower) / 2\n * @since 0.2\n * @stable\n * @example\n * const d = ta.donchian(20);\n * plot(d.upper);\n * plot(d.middle);\n * plot(d.lower);\n */\nexport type DonchianResult = Readonly<{\n upper: Series<number>;\n middle: Series<number>;\n lower: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.keltner` (Keltner Channels). `length` is the\n * MA / ATR period (default `20`); `multiplier` scales the ATR-derived\n * band offset from the middle MA (default `2`); `maType` picks the\n * middle MA kind (default `\"ema\"` per the Linda Raschke / TradingView\n * canonical form — Chester Keltner's original used SMA over a hand-\n * rolled \"typical range\", but every modern reference defaults to EMA\n * over close + Wilder ATR). `offset` is the universal bar-shift\n * (accepted on the surface). `outputs` carries\n * per-output styling hints downstream `plot()` callsites can lift\n * defaults from; the runtime itself ignores it in Phase 2.\n *\n * @formula N/A — see `ta.keltner` JSDoc\n * @anchors maType\n * @since 0.2\n * @stable\n * @example\n * const opts: KeltnerOpts = { length: 20, multiplier: 2, maType: \"ema\" };\n */\nexport type KeltnerOpts = Readonly<{\n length?: number;\n multiplier?: number;\n maType?: MaTypeNoVolume;\n offset?: number;\n outputs?: Readonly<Record<\"upper\" | \"middle\" | \"lower\", { lineStyle?: PlotLineStyle }>>;\n}>;\n\n/**\n * The three-series result of `ta.keltner` — the upper / middle /\n * lower bands of the Keltner channel envelope. All three Series\n * update in lock-step with the source close + ATR. The middle band\n * is identity-shared with the composed MA sub-primitive's output;\n * the upper / lower bands are derived per bar.\n *\n * @formula middle = MA(close, length, maType) ;\n * upper = middle + multiplier · atr(length) ;\n * lower = middle − multiplier · atr(length)\n * @since 0.2\n * @stable\n * @example\n * const k = ta.keltner({ length: 20, multiplier: 2 });\n * plot(k.upper);\n * plot(k.middle);\n * plot(k.lower);\n */\nexport type KeltnerResult = Readonly<{\n upper: Series<number>;\n middle: Series<number>;\n lower: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.envelope` (price-percent envelope). `length`\n * is the MA period (default `20`); `percent` is the band offset as a\n * percentage of the middle MA (default `10`); `maType` picks the MA\n * kind (default `\"sma\"`). `offset` is the universal bar-shift\n * (accepted on the surface).\n *\n * @formula N/A — see `ta.envelope` JSDoc\n * @anchors maType\n * @since 0.2\n * @stable\n * @example\n * const opts: EnvelopeOpts = { length: 20, percent: 10, maType: \"sma\" };\n */\nexport type EnvelopeOpts = Readonly<{\n length?: number;\n percent?: number;\n maType?: MaTypeNoVolume;\n offset?: number;\n}>;\n\n/**\n * The three-series result of `ta.envelope` — the upper / middle /\n * lower bands of a price-percent envelope around an MA. The middle\n * band is identity-shared with the composed MA sub-primitive's\n * output; the bands are a pure multiplicative offset.\n *\n * @formula middle = MA(source, length, maType) ;\n * upper = middle · (1 + percent / 100) ;\n * lower = middle · (1 − percent / 100)\n * @since 0.2\n * @stable\n * @example\n * const e = ta.envelope(bar.close, { percent: 10 });\n * plot(e.upper);\n * plot(e.middle);\n * plot(e.lower);\n */\nexport type EnvelopeResult = Readonly<{\n upper: Series<number>;\n middle: Series<number>;\n lower: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.chop` (Choppiness Index). `offset` is the\n * universal bar-shift (accepted on the surface).\n * `lineStyle` is a forward-compat plot-styling hint surfaced for\n * §9.1 ergonomics — not consumed by the primitive itself.\n *\n * @formula N/A — see `ta.chop` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: ChopOpts = { offset: 0 };\n */\nexport type ChopOpts = Readonly<{ offset?: number; lineStyle?: PlotLineStyle }>;\n\n/**\n * Options bag for `ta.psar` (Parabolic SAR). `accelerationStart` /\n * `accelerationStep` / `accelerationMax` default to the canonical\n * Wilder values `0.02` / `0.02` / `0.2`. `offset` shifts the read\n * window backwards (accepted on the surface).\n *\n * @formula N/A — see `ta.psar` JSDoc\n * @anchors accelerationStart, accelerationStep, accelerationMax\n * @since 0.2\n * @stable\n * @example\n * const opts: PsarOpts = { accelerationStart: 0.02, accelerationStep: 0.02, accelerationMax: 0.2 };\n */\nexport type PsarOpts = Readonly<{\n accelerationStart?: number;\n accelerationStep?: number;\n accelerationMax?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.psar` — the SAR (stop-and-reverse)\n * level and the per-bar `direction` (`+1` uptrend, `-1` downtrend,\n * NaN during warmup or NaN-suspension). `direction` carries plain\n * `number` (not a narrow `+1 | -1` literal) to match the runtime's\n * `Series<number>` convention.\n *\n * @formula sar derived from extreme-point + acceleration-factor recurrence ;\n * direction flips when bar.low ≤ candidateSar (up→down) or\n * bar.high ≥ candidateSar (down→up)\n * @since 0.2\n * @stable\n * @example\n * const p = ta.psar();\n * plot(p.sar);\n */\nexport type PsarResult = Readonly<{\n sar: Series<number>;\n direction: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.supertrend`. `length` is the ATR period\n * (default `10`); `multiplier` scales the band offset from `hl2`\n * (default `3`). `offset` shifts the read window backwards\n * (accepted on the surface). The source is hard-coded\n * to `hl2` (Pine-canonical Supertrend); a `source` opt could land in\n * a follow-up.\n *\n * @formula N/A — see `ta.supertrend` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: SupertrendOpts = { length: 10, multiplier: 3 };\n */\nexport type SupertrendOpts = Readonly<{\n length?: number;\n multiplier?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.supertrend` — the trailing-stop\n * `line` (the active final band per current direction) and the\n * per-bar `direction` (`+1` uptrend → `line = finalLower`,\n * `-1` downtrend → `line = finalUpper`, NaN during warmup).\n *\n * @formula finalUpper, finalLower derived from hl2 ± multiplier·atr ;\n * direction flips when close crosses prior finalUpper / finalLower ;\n * line = direction === +1 ? finalLower : finalUpper\n * @since 0.2\n * @stable\n * @example\n * const s = ta.supertrend({ length: 10, multiplier: 3 });\n * plot(s.line);\n */\nexport type SupertrendResult = Readonly<{\n line: Series<number>;\n direction: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.chandelier` (Chandelier Exit). `length` is the\n * ATR period AND the rolling extreme window (default `22`);\n * `multiplier` scales the ATR offset (default `3`). `offset` shifts\n * the read window backwards (accepted on the surface).\n *\n * @formula N/A — see `ta.chandelier` JSDoc\n * @anchors length, multiplier\n * @since 0.2\n * @stable\n * @example\n * const opts: ChandelierOpts = { length: 22, multiplier: 3 };\n */\nexport type ChandelierOpts = Readonly<{\n length?: number;\n multiplier?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.chandelier` — `long` is the trailing\n * stop for long trades (`highest(high, length) − multiplier · atr`),\n * `short` is the trailing stop for short trades (`lowest(low, length)\n * + multiplier · atr`). Both Series carry NaN through the\n * `length`-bar warmup (ATR + highest/lowest sub-slots' warmups).\n *\n * @formula long = highest(high, length) − multiplier · atr(length) ;\n * short = lowest(low, length) + multiplier · atr(length)\n * @since 0.2\n * @stable\n * @example\n * const c = ta.chandelier({ length: 22, multiplier: 3 });\n * plot(c.long);\n * plot(c.short);\n */\nexport type ChandelierResult = Readonly<{\n long: Series<number>;\n short: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.chandeKrollStop`. `length` controls BOTH the\n * ATR period AND the first-pass rolling extreme window (default\n * `10`); `multiplier` scales the ATR offset (default `1`);\n * `smoothingLength` is the second-pass extreme window (default `9`)\n * — matches Chande Kroll's 1995 paper. `offset` shifts the read\n * window backwards (accepted on the surface).\n *\n * @formula N/A — see `ta.chandeKrollStop` JSDoc\n * @anchors length, multiplier\n * @since 0.2\n * @stable\n * @example\n * const opts: ChandeKrollStopOpts = { length: 10, multiplier: 1, smoothingLength: 9 };\n */\nexport type ChandeKrollStopOpts = Readonly<{\n length?: number;\n multiplier?: number;\n smoothingLength?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.chandeKrollStop` — `long` is the\n * smoothed long-trade trailing stop (second-pass max of the\n * first-pass long stops); `short` is the smoothed short-trade\n * trailing stop (second-pass min of the first-pass short stops).\n * Both Series carry NaN through the `length + smoothingLength`\n * warmup.\n *\n * @formula firstHigh = highest(high, length) − multiplier · atr(length) ;\n * firstLow = lowest(low, length) + multiplier · atr(length) ;\n * long = max(firstHigh over smoothingLength bars) ;\n * short = min(firstLow over smoothingLength bars)\n * @since 0.2\n * @stable\n * @example\n * const c = ta.chandeKrollStop();\n * plot(c.long);\n * plot(c.short);\n */\nexport type ChandeKrollStopResult = Readonly<{\n long: Series<number>;\n short: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.williamsFractal`. `length` is the symmetric\n * left / right window size (default `2` — total 5-bar window: 2\n * left + centre + 2 right). `offset` shifts the read window\n * backwards (accepted on the surface).\n *\n * @formula N/A — see `ta.williamsFractal` JSDoc\n * @anchors length\n * @since 0.2\n * @stable\n * @example\n * const opts: WilliamsFractalOpts = { length: 2 };\n */\nexport type WilliamsFractalOpts = Readonly<{\n length?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.williamsFractal` — the centred\n * fractal markers. `up.current` is the centre bar's `bar.high` when\n * the centre bar is an up-fractal (its high is strictly greater\n * than the `length` bars on either side), NaN otherwise.\n * `down.current` is the centre bar's `bar.low` for down-fractals.\n *\n * The output is centred: at live bar `t`, the value emitted is the\n * fractal status of bar `t − length` (when bar `t` closes, we now\n * have enough right-window bars to confirm bar `t − length`). The\n * most recent `length` bars of each Series are intentionally NaN\n * (pending right-window confirmation).\n *\n * Note: deviates from the task spec's literal `Series<boolean>`\n * wording in favour of price levels (matches invinite's\n * `upFractals[i] = high`). This gives the `marker` plot a y-anchor\n * — the high or low at which the fractal triggered — which is what\n * TradingView visually shows.\n *\n * @formula up = bar.high(centre) when centre is up-fractal, NaN otherwise ;\n * down = bar.low(centre) when centre is down-fractal, NaN otherwise\n * @since 0.2\n * @stable\n * @example\n * const f = ta.williamsFractal();\n * plot(f.up, { style: { kind: \"marker\", shape: \"triangle-up\", size: 6 } });\n * plot(f.down, { style: { kind: \"marker\", shape: \"triangle-down\", size: 6 } });\n */\nexport type WilliamsFractalResult = Readonly<{\n up: Series<number>;\n down: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.zigZag`. `deviation` is the percentage move\n * (default `5`) required to confirm a reversal pivot from the running\n * candidate; `depth` is the minimum number of bars (default `10`) that\n * must elapse before a pivot can be confirmed. `offset` shifts the\n * read window backwards (accepted on the surface).\n *\n * @formula N/A — see `ta.zigZag` JSDoc\n * @anchors deviation, depth\n * @since 0.2\n * @stable\n * @example\n * const opts: ZigZagOpts = { deviation: 5, depth: 10 };\n */\nexport type ZigZagOpts = Readonly<{\n deviation?: number;\n depth?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.zigZag` — `value` carries the price of\n * the most-recently-confirmed swing pivot (held constant between\n * confirmations, NaN until the first confirmation); `direction` is\n * `+1` (uptrend), `-1` (downtrend), or NaN before the first\n * confirmation.\n *\n * Streaming adaptation of invinite's batch ZigZag: the runtime is\n * append-only and cannot retroactively rewrite earlier output slots,\n * so the linear-interpolation rendering between confirmed pivots that\n * invinite paints is intentionally not modelled here — the output\n * series is the \"last-confirmed-pivot level\" (a trailing horizontal\n * line a Pine author would use as a reference).\n *\n * @formula see `ta.zigZag` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const z = ta.zigZag({ deviation: 5 });\n * plot(z.value);\n */\nexport type ZigZagResult = Readonly<{\n value: Series<number>;\n direction: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.pivotsHighLow`. `leftLength` / `rightLength`\n * default to `4` (a 9-bar centred window); they may differ to surface\n * asymmetric `ta.pivothigh` / `ta.pivotlow` behaviour. `offset` shifts\n * the read window backwards (accepted on the surface).\n *\n * @formula N/A — see `ta.pivotsHighLow` JSDoc\n * @anchors leftLength, rightLength\n * @since 0.2\n * @stable\n * @example\n * const opts: PivotsHighLowOpts = { leftLength: 4, rightLength: 4 };\n */\nexport type PivotsHighLowOpts = Readonly<{\n leftLength?: number;\n rightLength?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.pivotsHighLow` — the centred swing-\n * high / swing-low markers. `high.current` = `bar.high(centre)` when\n * the centre bar is a confirmed up-pivot (strict-greater on the left\n * window, geq on the right — matches Pine `ta.pivothigh`); NaN\n * otherwise. `low.current` mirrors for down-pivots with `bar.low`.\n *\n * Output is centred — at live bar `t`, the value emitted is the\n * pivot status of bar `t − rightLength` (when bar `t` closes, we now\n * have enough right-window bars to confirm bar `t − rightLength`).\n * The most recent `rightLength` slots of each Series are\n * intentionally NaN (pending right-window confirmation).\n *\n * @formula high = bar.high(centre) when centre is up-pivot, NaN otherwise ;\n * low = bar.low(centre) when centre is down-pivot, NaN otherwise\n * @since 0.2\n * @stable\n * @example\n * const p = ta.pivotsHighLow({ leftLength: 4, rightLength: 4 });\n * plot(p.high);\n * plot(p.low);\n */\nexport type PivotsHighLowResult = Readonly<{\n high: Series<number>;\n low: Series<number>;\n}>;\n\n/**\n * The classical pivot-points formula systems supported by\n * `ta.pivotsStandard`. `\"classic\"` is the default; `\"fibonacci\"` /\n * `\"camarilla\"` / `\"woodie\"` mirror the published TradingView\n * formulas. DeMark / Traditional are deferred to a later phase.\n *\n * @formula N/A — string-literal union type\n * @since 0.2\n * @stable\n * @example\n * const sys: PivotsStandardSystem = \"classic\";\n */\nexport type PivotsStandardSystem = \"classic\" | \"fibonacci\" | \"camarilla\" | \"woodie\";\n\n/**\n * Options bag for `ta.pivotsStandard`. `system` picks the formula\n * family (default `\"classic\"`). `offset` shifts the read window\n * backwards (accepted on the surface).\n *\n * @formula N/A — see `ta.pivotsStandard` JSDoc\n * @anchors system\n * @since 0.2\n * @stable\n * @example\n * const opts: PivotsStandardOpts = { system: \"fibonacci\" };\n */\nexport type PivotsStandardOpts = Readonly<{\n system?: PivotsStandardSystem;\n offset?: number;\n}>;\n\n/**\n * The seven-series result of `ta.pivotsStandard` — the classical\n * pivot point `pp` plus three resistance / three support levels\n * derived from the prior UTC-day's high / low / close. The runtime\n * resets the day aggregate on every UTC-day boundary (detected via\n * `Math.floor(bar.time / 86_400_000)`); the levels for the current\n * day are computed from the prior closed day's HLC.\n *\n * R4 / R5 / S4 / S5 are intentionally deferred — Phase 2 ships\n * R1..R3 / S1..S3 only per the Phase-2 README \"Deferred / Follow-Up\n * Work\" footnote.\n *\n * @formula see `ta.pivotsStandard` JSDoc (per-system formula table)\n * @since 0.2\n * @stable\n * @example\n * const p = ta.pivotsStandard();\n * plot(p.pp);\n * plot(p.r1);\n * plot(p.s1);\n */\nexport type PivotsStandardResult = Readonly<{\n pp: Series<number>;\n r1: Series<number>;\n s1: Series<number>;\n r2: Series<number>;\n s2: Series<number>;\n r3: Series<number>;\n s3: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.volatilityStop`. `length` is the ATR period\n * (default `20`); `multiplier` scales the ATR offset (default `2`).\n * `offset` shifts the read window backwards (accepted\n * on the surface). Source is hard-coded to `bar.close` (Pine\n * `ta.vstop` convention); an explicit `source` opt could land in a\n * follow-up.\n *\n * @formula N/A — see `ta.volatilityStop` JSDoc\n * @anchors length, multiplier\n * @since 0.2\n * @stable\n * @example\n * const opts: VolatilityStopOpts = { length: 20, multiplier: 2 };\n */\nexport type VolatilityStopOpts = Readonly<{\n length?: number;\n multiplier?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.volatilityStop` — the trailing-stop\n * `value` (analogous to PSAR's `sar`) and the per-bar `direction`\n * (`+1` uptrend → stop is BELOW price, `-1` downtrend → stop is\n * ABOVE price, NaN during warmup or NaN-suspension).\n *\n * @formula trend up: value = max(prevStop, src − multiplier · atr) ;\n * trend down: value = min(prevStop, src + multiplier · atr) ;\n * flip on src crossing the stop\n * @since 0.2\n * @stable\n * @example\n * const v = ta.volatilityStop({ length: 20, multiplier: 2 });\n * plot(v.value);\n */\nexport type VolatilityStopResult = Readonly<{\n value: Series<number>;\n direction: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.adx` (Wilder's Average Directional Index).\n * `smoothing` is the second-stage Wilder window applied to DX\n * (default `14` — matches the DI window). `offset` shifts the\n * output. `lineStyle` is a forward-compat plot-\n * styling hint surfaced for §9.1 ergonomics — not consumed by the\n * primitive itself.\n *\n * @formula N/A — see `ta.adx` JSDoc\n * @anchors smoothing\n * @since 0.2\n * @stable\n * @example\n * const opts: AdxOpts = { smoothing: 14 };\n */\nexport type AdxOpts = Readonly<{\n smoothing?: number;\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.dmi` (Directional Movement Index). `offset`\n * shifts both output series in lockstep. `outputs`\n * carries per-output styling hints downstream `plot()` callsites\n * can lift defaults from; the runtime itself ignores it in Phase 2\n * — script-author `plot(d.plusDi, { lineStyle })` is the styling\n * seam.\n *\n * @formula N/A — see `ta.dmi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: DmiOpts = { offset: 0 };\n */\nexport type DmiOpts = Readonly<{\n offset?: number;\n outputs?: Readonly<Record<\"plusDi\" | \"minusDi\", { lineStyle?: PlotLineStyle }>>;\n}>;\n\n/**\n * The two-series result of `ta.dmi` — Wilder's `+DI` / `−DI` pair.\n * Both ∈ [0, 100] when defined; NaN through the `length` warmup\n * window. `primarySeriesKey: \"plusDi\"` (recorded in\n * `TA_REGISTRY_METADATA`) with `yDomain: { kind: \"fixed\", min: 0,\n * max: 100 }`.\n *\n * @formula see `ta.dmi` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const d = ta.dmi(14);\n * plot(d.plusDi);\n * plot(d.minusDi);\n */\nexport type DmiResult = Readonly<{\n plusDi: Series<number>;\n minusDi: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.trix` (Triple-smoothed EMA Rate-of-Change).\n * `signalLength` is the EMA-smoothing length of the TRIX signal\n * line (default `9`). `offset` shifts both output series in\n * lockstep.\n *\n * @formula N/A — see `ta.trix` JSDoc\n * @anchors signalLength\n * @since 0.2\n * @stable\n * @example\n * const opts: TrixOpts = { signalLength: 9 };\n */\nexport type TrixOpts = Readonly<{\n signalLength?: number;\n offset?: number;\n}>;\n\n/**\n * The two-series result of `ta.trix` — the TRIX momentum line and\n * its EMA signal line. Both are unbounded; `yDomain: { kind:\n * \"auto\" }`. `primarySeriesKey: \"trix\"` (recorded in\n * `TA_REGISTRY_METADATA`).\n *\n * @formula see `ta.trix` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const t = ta.trix(bar.close, 18);\n * plot(t.trix);\n * plot(t.signal);\n */\nexport type TrixResult = Readonly<{\n trix: Series<number>;\n signal: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.vortex` (Botes & Siepman Vortex Indicator).\n * `length` is positional on the call (`ta.vortex(length, opts?)`), so\n * the opts bag carries only the universal `offset` +\n * per-output styling hints. The runtime emits `NaN` on zero-TR\n * windows (chartlang surfaces the degenerate window — invinite emits\n * 0 in the same case).\n *\n * @formula N/A — see `ta.vortex` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: VortexOpts = { offset: 0 };\n */\nexport type VortexOpts = Readonly<{\n offset?: number;\n outputs?: Readonly<Record<\"plus\" | \"minus\", { lineStyle?: PlotLineStyle }>>;\n}>;\n\n/**\n * The two-series result of `ta.vortex` — the `+VI` / `−VI` Vortex\n * lines (Botes & Siepman, 2010). Typical operating range `[0, 2]`\n * (`yDomain: { kind: \"auto\" }`). `primarySeriesKey: \"plus\"` is\n * recorded in `TA_REGISTRY_METADATA`.\n *\n * @formula see `ta.vortex` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const v = ta.vortex(14);\n * plot(v.plus);\n * plot(v.minus);\n */\nexport type VortexResult = Readonly<{\n plus: Series<number>;\n minus: Series<number>;\n}>;\n\n/**\n * Options bag for `ta.trendStrengthIndex` — TradingView's Trend\n * Strength Index, the Pearson correlation between `source` and the\n * bar index. Distinct from `ta.tsi` (Task 14's True Strength Index\n * momentum oscillator). Default `length = 20` (positional). `offset`\n * matches the universal §9.1 convention.\n *\n * @formula N/A — see `ta.trendStrengthIndex` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const opts: TrendStrengthIndexOpts = { offset: 0 };\n */\nexport type TrendStrengthIndexOpts = Readonly<{\n offset?: number;\n lineStyle?: PlotLineStyle;\n}>;\n\n/**\n * Options bag for `ta.ichimoku`. Defaults follow Pine / TradingView\n * canonical Ichimoku — `conversionLength = 9, baseLength = 26,\n * leadingSpanBLength = 52, displacement = 26`. `offset` shifts all\n * five outputs in lockstep. `outputs` carries\n * per-output styling hints downstream `plot()` callsites can lift\n * defaults from; the runtime itself ignores it in Phase 2.\n *\n * @formula N/A — see `ta.ichimoku` JSDoc\n * @anchors displacement, conversionLength, baseLength, leadingSpanBLength\n * @since 0.2\n * @stable\n * @example\n * const opts: IchimokuOpts = {\n * conversionLength: 9,\n * baseLength: 26,\n * leadingSpanBLength: 52,\n * displacement: 26,\n * };\n */\nexport type IchimokuOpts = Readonly<{\n conversionLength?: number;\n baseLength?: number;\n leadingSpanBLength?: number;\n displacement?: number;\n offset?: number;\n outputs?: Readonly<\n Record<\"tenkan\" | \"kijun\" | \"senkouA\" | \"senkouB\" | \"chikou\", { lineStyle?: PlotLineStyle }>\n >;\n}>;\n\n/**\n * The five-series result of `ta.ichimoku` — Tenkan (Conversion Line),\n * Kijun (Base Line), Senkou Span A / B (Leading Spans, forward-shifted\n * by `displacement`), Chikou (Lagging Span — backward-shifted close).\n * `primarySeriesKey: \"tenkan\"` (recorded in `TA_REGISTRY_METADATA`)\n * with `yDomain: { kind: \"auto\" }`. The cloud renders as a\n * `filled-band` PlotKind (Task 1 prerequisite) between `senkouA` and\n * `senkouB`; the script author drives this via their `plot()` call —\n * the runtime emits the two series.\n *\n * @formula see `ta.ichimoku` JSDoc\n * @since 0.2\n * @stable\n * @example\n * const i = ta.ichimoku();\n * plot(i.tenkan);\n * plot(i.kijun);\n * plot(i.senkouA);\n * plot(i.senkouB);\n * plot(i.chikou);\n */\nexport type IchimokuResult = Readonly<{\n tenkan: Series<number>;\n kijun: Series<number>;\n senkouA: Series<number>;\n senkouB: Series<number>;\n chikou: Series<number>;\n}>;\n\n/**\n * The three-series result of `ta.bb`. Each component is a separate `Series`\n * the runtime updates in lock-step with the source.\n *\n * @formula upper = sma + k * stdev, lower = sma − k * stdev\n * @since 0.1\n * @stable\n * @example\n * declare const close: Series<number>;\n * const bands = ta.bb(close, 20, { multiplier: 2 });\n * plot(bands.upper);\n */\nexport type BbResult = Readonly<{\n upper: Series<number>;\n middle: Series<number>;\n lower: Series<number>;\n}>;\n\n/**\n * The three-series result of `ta.macd` — the MACD line, its signal line, and\n * the histogram of their difference.\n *\n * @formula macd = ema(src, fast) − ema(src, slow); signal = ema(macd, signal);\n * hist = macd − signal\n * @since 0.1\n * @stable\n * @example\n * declare const close: Series<number>;\n * const m = ta.macd(close);\n * plot(m.hist);\n */\nexport type MacdResult = Readonly<{\n macd: Series<number>;\n signal: Series<number>;\n hist: Series<number>;\n}>;\n\n/**\n * The typed surface of the `ta` namespace. The runtime registers concrete\n * implementations against this interface; scripts call it through the\n * `ta` constant exported from `@invinite-org/chartlang-core`.\n *\n * `ta.atr` takes no `source` because ATR is derived from bar OHLC in the\n * runtime (mirrors Pine's signature).\n *\n * @formula see per-method JSDoc on the `ta` const below\n * @since 0.1\n * @stable\n * @example\n * declare const close: Series<number>;\n * const e: Series<number> = ta.ema(close, 20);\n */\nexport type TaNamespace = {\n sma(source: Series<number>, length: number, opts?: SmaOpts): Series<number>;\n ema(source: Series<number>, length: number, opts?: EmaOpts): Series<number>;\n stdev(source: Series<number>, length: number, opts?: StdevOpts): Series<number>;\n bb(source: Series<number>, length: number, opts?: BbOpts): BbResult;\n rsi(source: Series<number>, length: number, opts?: RsiOpts): Series<number>;\n macd(source: Series<number>, opts?: MacdOpts): MacdResult;\n atr(length: number, opts?: AtrOpts): Series<number>;\n crossover(a: Series<number>, b: Series<number> | number, opts?: CrossoverOpts): Series<boolean>;\n crossunder(\n a: Series<number>,\n b: Series<number> | number,\n opts?: CrossunderOpts,\n ): Series<boolean>;\n nz(value: number, replacement?: number): number;\n highest(source: Series<number>, length: number, opts?: HighestOpts): Series<number>;\n lowest(source: Series<number>, length: number, opts?: LowestOpts): Series<number>;\n change(source: Series<number>, opts?: ChangeOpts): Series<number>;\n valuewhen(\n condition: Series<boolean>,\n source: Series<number>,\n occurrence?: number,\n opts?: ValuewhenOpts,\n ): Series<number>;\n barssince(condition: Series<boolean>, opts?: BarssinceOpts): Series<number>;\n wma(source: Series<number>, length: number, opts?: WmaOpts): Series<number>;\n vwma(source: Series<number>, length: number, opts?: VwmaOpts): Series<number>;\n hma(source: Series<number>, length: number, opts?: HmaOpts): Series<number>;\n smma(source: Series<number>, length: number, opts?: SmmaOpts): Series<number>;\n dema(source: Series<number>, length: number, opts?: DemaOpts): Series<number>;\n tema(source: Series<number>, length: number, opts?: TemaOpts): Series<number>;\n kama(source: Series<number>, opts?: KamaOpts): Series<number>;\n alma(source: Series<number>, length: number, opts?: AlmaOpts): Series<number>;\n lsma(source: Series<number>, length: number, opts?: LsmaOpts): Series<number>;\n mcginley(source: Series<number>, length: number, opts?: McginleyOpts): Series<number>;\n maRibbon(source: Series<number>, opts?: MaRibbonOpts): MaRibbonResult;\n cci(source: Series<number>, length: number, opts?: CciOpts): Series<number>;\n stoch(opts?: StochOpts): StochResult;\n williamsR(length: number, opts?: WilliamsROpts): Series<number>;\n stochRsi(source: Series<number>, opts?: StochRsiOpts): StochRsiResult;\n ultimateOsc(opts?: UltimateOscOpts): Series<number>;\n coppock(source: Series<number>, opts?: CoppockOpts): Series<number>;\n ppo(source: Series<number>, opts?: PpoOpts): PpoResult;\n dpo(source: Series<number>, length: number, opts?: DpoOpts): Series<number>;\n connorsRsi(source: Series<number>, opts?: ConnorsRsiOpts): Series<number>;\n kst(source: Series<number>, opts?: KstOpts): KstResult;\n fisher(length: number, opts?: FisherOpts): FisherResult;\n klinger(opts?: KlingerOpts): KlingerResult;\n rvgi(opts?: RvgiOpts): RvgiResult;\n ao(opts?: AoOpts): Series<number>;\n cmo(source: Series<number>, length: number, opts?: CmoOpts): Series<number>;\n momentum(source: Series<number>, length: number, opts?: MomentumOpts): Series<number>;\n roc(source: Series<number>, length: number, opts?: RocOpts): Series<number>;\n pmo(source: Series<number>, opts?: PmoOpts): PmoResult;\n smi(opts?: SmiOpts): SmiResult;\n tsi(source: Series<number>, opts?: TsiOpts): TsiResult;\n aroon(length: number, opts?: AroonOpts): AroonResult;\n aroonOsc(length: number, opts?: AroonOscOpts): Series<number>;\n median(source: Series<number>, length: number, opts?: MedianOpts): Series<number>;\n adr(opts?: AdrOpts): Series<number>;\n ulcerIndex(source: Series<number>, length: number, opts?: UlcerIndexOpts): Series<number>;\n vol(opts?: VolOpts): Series<number>;\n vwap(opts?: VwapOpts): Series<number>;\n anchoredVwap(anchorTime: number, opts?: AnchoredVwapOpts): Series<number>;\n anchoredVolumeProfile(opts: AnchoredVolumeProfileOpts): AnchoredVolumeProfileResult;\n fixedRangeVolumeProfile(opts: FixedRangeVolumeProfileOpts): FixedRangeVolumeProfileResult;\n sessionVolumeProfile(opts?: SessionVolumeProfileOpts): SessionVolumeProfileResult;\n visibleRangeVolumeProfile(\n opts?: VisibleRangeVolumeProfileOpts,\n ): VisibleRangeVolumeProfileResult;\n obv(opts?: ObvOpts): Series<number>;\n adl(opts?: AdlOpts): Series<number>;\n bop(opts?: BopOpts): Series<number>;\n cmf(length: number, opts?: CmfOpts): Series<number>;\n chaikinOsc(opts?: ChaikinOscOpts): Series<number>;\n mfi(length: number, opts?: MfiOpts): Series<number>;\n netVolume(opts?: NetVolumeOpts): Series<number>;\n pvo(opts?: PvoOpts): PvoResult;\n pvt(opts?: PvtOpts): Series<number>;\n eom(length: number, opts?: EomOpts): Series<number>;\n nvi(opts?: NviOpts): Series<number>;\n pvi(opts?: PviOpts): Series<number>;\n bbPercentB(source: Series<number>, length: number, opts?: BbPercentBOpts): Series<number>;\n bbw(source: Series<number>, length: number, opts?: BbwOpts): Series<number>;\n donchian(length: number, opts?: DonchianOpts): DonchianResult;\n keltner(opts?: KeltnerOpts): KeltnerResult;\n envelope(source: Series<number>, opts?: EnvelopeOpts): EnvelopeResult;\n chop(length: number, opts?: ChopOpts): Series<number>;\n historicalVolatility(source: Series<number>, length: number, opts?: HvOpts): Series<number>;\n rvi(source: Series<number>, length: number, opts?: RviOpts): Series<number>;\n massIndex(opts?: MassIndexOpts): Series<number>;\n psar(opts?: PsarOpts): PsarResult;\n supertrend(opts?: SupertrendOpts): SupertrendResult;\n chandelier(opts?: ChandelierOpts): ChandelierResult;\n chandeKrollStop(opts?: ChandeKrollStopOpts): ChandeKrollStopResult;\n williamsFractal(opts?: WilliamsFractalOpts): WilliamsFractalResult;\n zigZag(opts?: ZigZagOpts): ZigZagResult;\n pivotsHighLow(opts?: PivotsHighLowOpts): PivotsHighLowResult;\n pivotsStandard(opts?: PivotsStandardOpts): PivotsStandardResult;\n volatilityStop(opts?: VolatilityStopOpts): VolatilityStopResult;\n adx(length: number, opts?: AdxOpts): Series<number>;\n dmi(length: number, opts?: DmiOpts): DmiResult;\n trix(source: Series<number>, length: number, opts?: TrixOpts): TrixResult;\n vortex(length: number, opts?: VortexOpts): VortexResult;\n trendStrengthIndex(\n source: Series<number>,\n length: number,\n opts?: TrendStrengthIndexOpts,\n ): Series<number>;\n ichimoku(opts?: IchimokuOpts): IchimokuResult;\n};\n\n/**\n * The compile-time callable hole for the `ta` namespace. Every method throws\n * the `\"ta.<name> called outside compiled runtime\"` sentinel — the compiler\n * (Task 2) rewrites callsites to re-target the real runtime implementations.\n *\n * Scripts import this constant; the compiler swaps the call target at build\n * time. Direct invocation (outside a compiled script) is the failure mode\n * these sentinels guard.\n *\n * @formula see method-specific JSDoc on the runtime implementations\n * @since 0.1\n * @stable\n * @example\n * ```ts\n * import { defineIndicator, ta, plot } from \"@invinite-org/chartlang-core\";\n *\n * export default defineIndicator({\n * name: \"EMA(20)\",\n * apiVersion: 1,\n * compute: ({ bar }) => {\n * plot(ta.ema(bar.close, 20));\n * },\n * });\n * ```\n */\nexport const ta: TaNamespace = /* @__PURE__ */ Object.freeze({\n sma: () => {\n throw new Error(\"ta.sma called outside compiled runtime\");\n },\n ema: () => {\n throw new Error(\"ta.ema called outside compiled runtime\");\n },\n stdev: () => {\n throw new Error(\"ta.stdev called outside compiled runtime\");\n },\n bb: () => {\n throw new Error(\"ta.bb called outside compiled runtime\");\n },\n rsi: () => {\n throw new Error(\"ta.rsi called outside compiled runtime\");\n },\n macd: () => {\n throw new Error(\"ta.macd called outside compiled runtime\");\n },\n atr: () => {\n throw new Error(\"ta.atr called outside compiled runtime\");\n },\n crossover: () => {\n throw new Error(\"ta.crossover called outside compiled runtime\");\n },\n crossunder: () => {\n throw new Error(\"ta.crossunder called outside compiled runtime\");\n },\n nz: () => {\n throw new Error(\"ta.nz called outside compiled runtime\");\n },\n highest: () => {\n throw new Error(\"ta.highest called outside compiled runtime\");\n },\n lowest: () => {\n throw new Error(\"ta.lowest called outside compiled runtime\");\n },\n change: () => {\n throw new Error(\"ta.change called outside compiled runtime\");\n },\n valuewhen: () => {\n throw new Error(\"ta.valuewhen called outside compiled runtime\");\n },\n barssince: () => {\n throw new Error(\"ta.barssince called outside compiled runtime\");\n },\n wma: () => {\n throw new Error(\"ta.wma called outside compiled runtime\");\n },\n vwma: () => {\n throw new Error(\"ta.vwma called outside compiled runtime\");\n },\n hma: () => {\n throw new Error(\"ta.hma called outside compiled runtime\");\n },\n smma: () => {\n throw new Error(\"ta.smma called outside compiled runtime\");\n },\n dema: () => {\n throw new Error(\"ta.dema called outside compiled runtime\");\n },\n tema: () => {\n throw new Error(\"ta.tema called outside compiled runtime\");\n },\n kama: () => {\n throw new Error(\"ta.kama called outside compiled runtime\");\n },\n alma: () => {\n throw new Error(\"ta.alma called outside compiled runtime\");\n },\n lsma: () => {\n throw new Error(\"ta.lsma called outside compiled runtime\");\n },\n mcginley: () => {\n throw new Error(\"ta.mcginley called outside compiled runtime\");\n },\n maRibbon: () => {\n throw new Error(\"ta.maRibbon called outside compiled runtime\");\n },\n cci: () => {\n throw new Error(\"ta.cci called outside compiled runtime\");\n },\n stoch: () => {\n throw new Error(\"ta.stoch called outside compiled runtime\");\n },\n williamsR: () => {\n throw new Error(\"ta.williamsR called outside compiled runtime\");\n },\n stochRsi: () => {\n throw new Error(\"ta.stochRsi called outside compiled runtime\");\n },\n ultimateOsc: () => {\n throw new Error(\"ta.ultimateOsc called outside compiled runtime\");\n },\n coppock: () => {\n throw new Error(\"ta.coppock called outside compiled runtime\");\n },\n ppo: () => {\n throw new Error(\"ta.ppo called outside compiled runtime\");\n },\n dpo: () => {\n throw new Error(\"ta.dpo called outside compiled runtime\");\n },\n connorsRsi: () => {\n throw new Error(\"ta.connorsRsi called outside compiled runtime\");\n },\n kst: () => {\n throw new Error(\"ta.kst called outside compiled runtime\");\n },\n fisher: () => {\n throw new Error(\"ta.fisher called outside compiled runtime\");\n },\n klinger: () => {\n throw new Error(\"ta.klinger called outside compiled runtime\");\n },\n rvgi: () => {\n throw new Error(\"ta.rvgi called outside compiled runtime\");\n },\n ao: () => {\n throw new Error(\"ta.ao called outside compiled runtime\");\n },\n cmo: () => {\n throw new Error(\"ta.cmo called outside compiled runtime\");\n },\n momentum: () => {\n throw new Error(\"ta.momentum called outside compiled runtime\");\n },\n roc: () => {\n throw new Error(\"ta.roc called outside compiled runtime\");\n },\n pmo: () => {\n throw new Error(\"ta.pmo called outside compiled runtime\");\n },\n smi: () => {\n throw new Error(\"ta.smi called outside compiled runtime\");\n },\n tsi: () => {\n throw new Error(\"ta.tsi called outside compiled runtime\");\n },\n aroon: () => {\n throw new Error(\"ta.aroon called outside compiled runtime\");\n },\n aroonOsc: () => {\n throw new Error(\"ta.aroonOsc called outside compiled runtime\");\n },\n median: () => {\n throw new Error(\"ta.median called outside compiled runtime\");\n },\n adr: () => {\n throw new Error(\"ta.adr called outside compiled runtime\");\n },\n ulcerIndex: () => {\n throw new Error(\"ta.ulcerIndex called outside compiled runtime\");\n },\n vol: () => {\n throw new Error(\"ta.vol called outside compiled runtime\");\n },\n vwap: () => {\n throw new Error(\"ta.vwap called outside compiled runtime\");\n },\n anchoredVwap: () => {\n throw new Error(\"ta.anchoredVwap called outside compiled runtime\");\n },\n anchoredVolumeProfile: () => {\n throw new Error(\"ta.anchoredVolumeProfile called outside compiled runtime\");\n },\n fixedRangeVolumeProfile: () => {\n throw new Error(\"ta.fixedRangeVolumeProfile called outside compiled runtime\");\n },\n sessionVolumeProfile: () => {\n throw new Error(\"ta.sessionVolumeProfile called outside compiled runtime\");\n },\n visibleRangeVolumeProfile: () => {\n throw new Error(\"ta.visibleRangeVolumeProfile called outside compiled runtime\");\n },\n obv: () => {\n throw new Error(\"ta.obv called outside compiled runtime\");\n },\n adl: () => {\n throw new Error(\"ta.adl called outside compiled runtime\");\n },\n bop: () => {\n throw new Error(\"ta.bop called outside compiled runtime\");\n },\n cmf: () => {\n throw new Error(\"ta.cmf called outside compiled runtime\");\n },\n chaikinOsc: () => {\n throw new Error(\"ta.chaikinOsc called outside compiled runtime\");\n },\n mfi: () => {\n throw new Error(\"ta.mfi called outside compiled runtime\");\n },\n netVolume: () => {\n throw new Error(\"ta.netVolume called outside compiled runtime\");\n },\n pvo: () => {\n throw new Error(\"ta.pvo called outside compiled runtime\");\n },\n pvt: () => {\n throw new Error(\"ta.pvt called outside compiled runtime\");\n },\n eom: () => {\n throw new Error(\"ta.eom called outside compiled runtime\");\n },\n nvi: () => {\n throw new Error(\"ta.nvi called outside compiled runtime\");\n },\n pvi: () => {\n throw new Error(\"ta.pvi called outside compiled runtime\");\n },\n bbPercentB: () => {\n throw new Error(\"ta.bbPercentB called outside compiled runtime\");\n },\n bbw: () => {\n throw new Error(\"ta.bbw called outside compiled runtime\");\n },\n donchian: () => {\n throw new Error(\"ta.donchian called outside compiled runtime\");\n },\n keltner: () => {\n throw new Error(\"ta.keltner called outside compiled runtime\");\n },\n envelope: () => {\n throw new Error(\"ta.envelope called outside compiled runtime\");\n },\n chop: () => {\n throw new Error(\"ta.chop called outside compiled runtime\");\n },\n historicalVolatility: () => {\n throw new Error(\"ta.historicalVolatility called outside compiled runtime\");\n },\n rvi: () => {\n throw new Error(\"ta.rvi called outside compiled runtime\");\n },\n massIndex: () => {\n throw new Error(\"ta.massIndex called outside compiled runtime\");\n },\n psar: () => {\n throw new Error(\"ta.psar called outside compiled runtime\");\n },\n supertrend: () => {\n throw new Error(\"ta.supertrend called outside compiled runtime\");\n },\n chandelier: () => {\n throw new Error(\"ta.chandelier called outside compiled runtime\");\n },\n chandeKrollStop: () => {\n throw new Error(\"ta.chandeKrollStop called outside compiled runtime\");\n },\n williamsFractal: () => {\n throw new Error(\"ta.williamsFractal called outside compiled runtime\");\n },\n zigZag: () => {\n throw new Error(\"ta.zigZag called outside compiled runtime\");\n },\n pivotsHighLow: () => {\n throw new Error(\"ta.pivotsHighLow called outside compiled runtime\");\n },\n pivotsStandard: () => {\n throw new Error(\"ta.pivotsStandard called outside compiled runtime\");\n },\n volatilityStop: () => {\n throw new Error(\"ta.volatilityStop called outside compiled runtime\");\n },\n adx: () => {\n throw new Error(\"ta.adx called outside compiled runtime\");\n },\n dmi: () => {\n throw new Error(\"ta.dmi called outside compiled runtime\");\n },\n trix: () => {\n throw new Error(\"ta.trix called outside compiled runtime\");\n },\n vortex: () => {\n throw new Error(\"ta.vortex called outside compiled runtime\");\n },\n trendStrengthIndex: () => {\n throw new Error(\"ta.trendStrengthIndex called outside compiled runtime\");\n },\n ichimoku: () => {\n throw new Error(\"ta.ichimoku called outside compiled runtime\");\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeFormatCache.js","sourceRoot":"","sources":["../../../src/time/_lib/dateTimeFormatCache.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,MAAM,KAAK,GAAG,IAAI,GAAG,EAA+B,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,EAAU,EAAE,MAAkC;IACvE,MAAM,GAAG,GAAG,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;IAC9C,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAChF,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAC1B,OAAO,SAAS,CAAC;AACrB,CAAC"}
1
+ {"version":3,"file":"dateTimeFormatCache.js","sourceRoot":"","sources":["../../../src/time/_lib/dateTimeFormatCache.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,MAAM,KAAK,GAAG,IAAI,GAAG,EAA+B,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,EAAU,EAAE,MAAkC;IACvE,MAAM,GAAG,GAAG,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;IAC9C,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAChF,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAC1B,OAAO,SAAS,CAAC;AACrB,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nconst CACHE = new Map<string, Intl.DateTimeFormat>();\n\n/**\n * Return an `Intl.DateTimeFormat` cached by timezone and field options.\n *\n * @since 0.6\n * @stable\n * @example\n * const formatter = getFormatter(\"UTC\", { year: \"numeric\" });\n * void formatter;\n */\nexport function getFormatter(tz: string, fields: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n const key = `${tz}|${JSON.stringify(fields)}`;\n const cached = CACHE.get(key);\n if (cached !== undefined) return cached;\n const formatter = new Intl.DateTimeFormat(\"en-US\", { timeZone: tz, ...fields });\n CACHE.set(key, formatter);\n return formatter;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/time/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAG/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/time/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAG/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nexport type { SessionBounds, SessionType, Weekday } from \"./types.js\";\nexport { nyDayKey } from \"./nyDayKey.js\";\nexport { nySessionBounds } from \"./sessionBoundaries.js\";\nexport { session } from \"./session.js\";\nexport { weekday } from \"./weekday.js\";\nexport { weekKey } from \"./weekKey.js\";\n"]}