@courthive/scoring-visualizations 0.2.2

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 (94) hide show
  1. package/README.md +5 -0
  2. package/dist/engine/LiveEngine.d.ts +42 -0
  3. package/dist/engine/LiveEngine.d.ts.map +1 -0
  4. package/dist/engine/buildSetMap.d.ts +14 -0
  5. package/dist/engine/buildSetMap.d.ts.map +1 -0
  6. package/dist/engine/createPlaybackEngine.d.ts +23 -0
  7. package/dist/engine/createPlaybackEngine.d.ts.map +1 -0
  8. package/dist/engine/feedMatchUp.d.ts +82 -0
  9. package/dist/engine/feedMatchUp.d.ts.map +1 -0
  10. package/dist/episodes/buildEpisodes.d.ts +10 -0
  11. package/dist/episodes/buildEpisodes.d.ts.map +1 -0
  12. package/dist/episodes/types.d.ts +45 -0
  13. package/dist/episodes/types.d.ts.map +1 -0
  14. package/dist/index.d.ts +31 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/parsers/index.d.ts +10 -0
  17. package/dist/parsers/index.d.ts.map +1 -0
  18. package/dist/parsers/ionSportParser.d.ts +187 -0
  19. package/dist/parsers/ionSportParser.d.ts.map +1 -0
  20. package/dist/parsers/ionSportValidator.d.ts +33 -0
  21. package/dist/parsers/ionSportValidator.d.ts.map +1 -0
  22. package/dist/parsers/proTrackerParser.d.ts +115 -0
  23. package/dist/parsers/proTrackerParser.d.ts.map +1 -0
  24. package/dist/parsers/proTrackerValidator.d.ts +38 -0
  25. package/dist/parsers/proTrackerValidator.d.ts.map +1 -0
  26. package/dist/parsers/types.d.ts +49 -0
  27. package/dist/parsers/types.d.ts.map +1 -0
  28. package/dist/scoring-visualizations.es.js +4039 -0
  29. package/dist/scoring-visualizations.umd.js +7 -0
  30. package/dist/statistics/index.d.ts +3 -0
  31. package/dist/statistics/index.d.ts.map +1 -0
  32. package/dist/statistics/matchStatistics.d.ts +19 -0
  33. package/dist/statistics/matchStatistics.d.ts.map +1 -0
  34. package/dist/utils/supportsGameVisualizations.d.ts +14 -0
  35. package/dist/utils/supportsGameVisualizations.d.ts.map +1 -0
  36. package/dist/utils/supportsPointsToVisualization.d.ts +13 -0
  37. package/dist/utils/supportsPointsToVisualization.d.ts.map +1 -0
  38. package/dist/visualizations/coronaChart.d.ts +54 -0
  39. package/dist/visualizations/coronaChart.d.ts.map +1 -0
  40. package/dist/visualizations/data/sampleGame.d.ts +31 -0
  41. package/dist/visualizations/data/sampleGame.d.ts.map +1 -0
  42. package/dist/visualizations/donutChart.d.ts +31 -0
  43. package/dist/visualizations/donutChart.d.ts.map +1 -0
  44. package/dist/visualizations/gameFish.d.ts +16 -0
  45. package/dist/visualizations/gameFish.d.ts.map +1 -0
  46. package/dist/visualizations/gameTree.d.ts +17 -0
  47. package/dist/visualizations/gameTree.d.ts.map +1 -0
  48. package/dist/visualizations/groupGames.d.ts +6 -0
  49. package/dist/visualizations/groupGames.d.ts.map +1 -0
  50. package/dist/visualizations/helpers/FileDropzone.d.ts +13 -0
  51. package/dist/visualizations/helpers/FileDropzone.d.ts.map +1 -0
  52. package/dist/visualizations/helpers/JsonViewer.d.ts +27 -0
  53. package/dist/visualizations/helpers/JsonViewer.d.ts.map +1 -0
  54. package/dist/visualizations/helpers/PlaybackControls.d.ts +5 -0
  55. package/dist/visualizations/helpers/PlaybackControls.d.ts.map +1 -0
  56. package/dist/visualizations/horizonChart.d.ts +59 -0
  57. package/dist/visualizations/horizonChart.d.ts.map +1 -0
  58. package/dist/visualizations/index.d.ts +21 -0
  59. package/dist/visualizations/index.d.ts.map +1 -0
  60. package/dist/visualizations/legacyRally.d.ts +3 -0
  61. package/dist/visualizations/legacyRally.d.ts.map +1 -0
  62. package/dist/visualizations/matchUpDashboard.d.ts +30 -0
  63. package/dist/visualizations/matchUpDashboard.d.ts.map +1 -0
  64. package/dist/visualizations/momentumChart.d.ts +12 -0
  65. package/dist/visualizations/momentumChart.d.ts.map +1 -0
  66. package/dist/visualizations/ptsChart.d.ts +14 -0
  67. package/dist/visualizations/ptsChart.d.ts.map +1 -0
  68. package/dist/visualizations/ptsHorizon.d.ts +83 -0
  69. package/dist/visualizations/ptsHorizon.d.ts.map +1 -0
  70. package/dist/visualizations/rallyTree.d.ts +78 -0
  71. package/dist/visualizations/rallyTree.d.ts.map +1 -0
  72. package/dist/visualizations/simpleChart.d.ts +6 -0
  73. package/dist/visualizations/simpleChart.d.ts.map +1 -0
  74. package/dist/visualizations/statView.d.ts +44 -0
  75. package/dist/visualizations/statView.d.ts.map +1 -0
  76. package/dist/visualizations/typeOf.d.ts +6 -0
  77. package/dist/visualizations/typeOf.d.ts.map +1 -0
  78. package/dist/visualizations/types/events.d.ts +92 -0
  79. package/dist/visualizations/types/events.d.ts.map +1 -0
  80. package/dist/visualizations/types/index.d.ts +79 -0
  81. package/dist/visualizations/types/index.d.ts.map +1 -0
  82. package/dist/visualizations/utils/arrays.d.ts +18 -0
  83. package/dist/visualizations/utils/arrays.d.ts.map +1 -0
  84. package/dist/visualizations/utils/colorUtils.d.ts +36 -0
  85. package/dist/visualizations/utils/colorUtils.d.ts.map +1 -0
  86. package/dist/visualizations/utils/generateId.d.ts +2 -0
  87. package/dist/visualizations/utils/generateId.d.ts.map +1 -0
  88. package/dist/visualizations/utils/keyWalk.d.ts +2 -0
  89. package/dist/visualizations/utils/keyWalk.d.ts.map +1 -0
  90. package/dist/visualizations/utils/math.d.ts +10 -0
  91. package/dist/visualizations/utils/math.d.ts.map +1 -0
  92. package/dist/visualizations/utils/setDev.d.ts +29 -0
  93. package/dist/visualizations/utils/setDev.d.ts.map +1 -0
  94. package/package.json +75 -0
@@ -0,0 +1,3 @@
1
+ export { computeMatchStats, computeMatchStatsFromMatchUp } from './matchStatistics';
2
+ export type { StatObject } from './matchStatistics';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/statistics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { Episode } from '../episodes/types';
2
+ export type { StatObject } from 'tods-competition-factory';
3
+ /**
4
+ * Compute match statistics from an Episode array.
5
+ * Returns display-ready StatObject[] suitable for statView.
6
+ *
7
+ * @param setFilter - Optional 0-based set index to restrict stats to a single set.
8
+ * When undefined, stats cover the entire match.
9
+ */
10
+ export declare function computeMatchStats(episodes: Episode[], setFilter?: number): import('tods-competition-factory').StatObject[];
11
+ /**
12
+ * Compute match statistics directly from a ScoringEngine MatchUp state.
13
+ * Convenience wrapper: buildEpisodes(matchUp) → computeMatchStats(episodes).
14
+ *
15
+ * @param setFilter - Optional 0-based set index to restrict stats to a single set.
16
+ * When undefined, stats cover the entire match.
17
+ */
18
+ export declare function computeMatchStatsFromMatchUp(matchUp: any, setFilter?: number): import('tods-competition-factory').StatObject[];
19
+ //# sourceMappingURL=matchStatistics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchStatistics.d.ts","sourceRoot":"","sources":["../../src/statistics/matchStatistics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIjD,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAoC3D;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,mDAOxE;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,mDAG5E"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Determines whether a matchUpFormat supports gameTree and gameFish visualizations.
3
+ *
4
+ * These visualizations assume tennis-style game scoring (0→15→30→40→G with
5
+ * deuce/advantage) and are inappropriate when:
6
+ * - Sets are timed (no discrete game structure)
7
+ * - The game format (`-G:`) is not TRADITIONAL (e.g., consecutive or aggregate)
8
+ * - The format uses a non-SET root (team sports like soccer, basketball, etc.)
9
+ *
10
+ * When `-G:` is absent, standard tennis scoring is implied (appropriate).
11
+ * TRADITIONAL with deuceAfter (e.g., padel star point) is still appropriate.
12
+ */
13
+ export declare function supportsGameVisualizations(matchUpFormat: string | undefined): boolean;
14
+ //# sourceMappingURL=supportsGameVisualizations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supportsGameVisualizations.d.ts","sourceRoot":"","sources":["../../src/utils/supportsGameVisualizations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAqBrF"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Determines whether a matchUpFormat supports the Points-to-Set (PTS) visualization.
3
+ *
4
+ * PTS counts down "minimum points needed to win the current set" for each player.
5
+ * It requires a SET-based format with a discrete point endpoint — timed sets have
6
+ * no known point endpoint, making PTS meaningless.
7
+ *
8
+ * Unlike `supportsGameVisualizations`, PTS does NOT require traditional game scoring.
9
+ * Non-traditional games (aggregate `-G:AG`, consecutive `-G:3C`) still have countable
10
+ * points toward a set endpoint, so they are supported.
11
+ */
12
+ export declare function supportsPointsToVisualization(matchUpFormat: string | undefined): boolean;
13
+ //# sourceMappingURL=supportsPointsToVisualization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supportsPointsToVisualization.d.ts","sourceRoot":"","sources":["../../src/utils/supportsPointsToVisualization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAaxF"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Corona Chart - Migrated to D3 v7
3
+ * Displays point-by-point score differentials in a radial/circular format
4
+ */
5
+ type Selection<A, B, C, D> = import('d3').Selection<A, B, C, D>;
6
+ interface SetMap {
7
+ p2sdiff: number[];
8
+ gamesScore?: [number, number];
9
+ players?: [string, string];
10
+ winnerIndex?: 0 | 1;
11
+ }
12
+ interface CoronaPrefs {
13
+ width: number;
14
+ height: number;
15
+ radius: number;
16
+ colors: string[] | {
17
+ 0: string;
18
+ 1: string;
19
+ reverse?: boolean;
20
+ };
21
+ display: {
22
+ info?: boolean;
23
+ badge?: boolean | string;
24
+ home?: boolean;
25
+ };
26
+ context?: {
27
+ playerName?: string;
28
+ };
29
+ muid?: string;
30
+ functions?: {
31
+ mouseover?: (d: any) => void;
32
+ clickName?: (name: string) => void;
33
+ clickScore?: (name: string) => void;
34
+ };
35
+ }
36
+ export declare function coronaChart(target: Selection<any, any, any, any>, set_map: SetMap[], prefs: CoronaPrefs, x?: number, y?: number): void;
37
+ /**
38
+ * Companion function: render coronaChart directly from a ScoringEngine MatchUp.
39
+ * Clears target container, creates SVG, builds setMap from MatchUp, and renders.
40
+ */
41
+ export declare function coronaChartFromMatchUp(container: HTMLElement, matchUp: any, options?: {
42
+ width?: number;
43
+ height?: number;
44
+ radius?: number;
45
+ colors?: string[];
46
+ players?: [string, string];
47
+ display?: {
48
+ info?: boolean;
49
+ badge?: boolean | string;
50
+ home?: boolean;
51
+ };
52
+ }): void;
53
+ export {};
54
+ //# sourceMappingURL=coronaChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coronaChart.d.ts","sourceRoot":"","sources":["../../src/visualizations/coronaChart.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAOH,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,OAAO,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAChE,UAAU,MAAM;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,CAA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EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACxE,GACA,IAAI,CAgCN"}
@@ -0,0 +1,31 @@
1
+ import { Point, GameGroup, Episode } from '../types';
2
+ /**
3
+ * Standard game: Player 0 wins 40-15
4
+ */
5
+ export declare const sampleGamePoints: Point[];
6
+ /**
7
+ * Deuce game: Multiple deuces before Player 1 wins
8
+ * Point counts track actual game score (0-4+)
9
+ */
10
+ export declare const deuceGamePoints: Point[];
11
+ /**
12
+ * No-Ad game: Goes to 40-40 then directly to game
13
+ * In No-Ad scoring, when score reaches 40-40, the next point wins the game
14
+ */
15
+ export declare const noAdGamePoints: Point[];
16
+ /**
17
+ * Tiebreak game: Player 0 wins 7-5
18
+ */
19
+ export declare const tiebreakGamePoints: Point[];
20
+ /**
21
+ * Game group format (used by gameFish and momentumChart)
22
+ */
23
+ export declare const sampleGameGroup: GameGroup;
24
+ export declare const deuceGameGroup: GameGroup;
25
+ export declare const noAdGameGroup: GameGroup;
26
+ export declare const tiebreakGameGroup: GameGroup;
27
+ /**
28
+ * Episode format (used by gameTree and ptsChart)
29
+ */
30
+ export declare function pointsToEpisodes(points: Point[]): Episode[];
31
+ //# sourceMappingURL=sampleGame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sampleGame.d.ts","sourceRoot":"","sources":["../../../src/visualizations/data/sampleGame.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,EA4DnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,EAwHlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,EAoFjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,EA6JrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAO7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAO5B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAO3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAQ/B,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAmC3D"}
@@ -0,0 +1,31 @@
1
+ export type CompetitivenessBucket = 'COMPETITIVE' | 'ROUTINE' | 'DECISIVE' | 'WALKOVER';
2
+ export interface DonutDatum {
3
+ bucket: CompetitivenessBucket;
4
+ count: number;
5
+ }
6
+ export interface DonutChartOptions {
7
+ width?: number;
8
+ height?: number;
9
+ padAngle?: number;
10
+ cornerRadius?: number;
11
+ colors?: Partial<Record<CompetitivenessBucket, string>>;
12
+ labels?: Partial<Record<CompetitivenessBucket, string>>;
13
+ showCenterTotal?: boolean;
14
+ title?: string;
15
+ onSliceClick?: (datum: DonutDatum) => void;
16
+ }
17
+ /**
18
+ * Bucket factory matchUps by competitiveness for donut input.
19
+ * WALKOVER bucket absorbs WALKOVER / DOUBLE_WALKOVER / DEFAULTED / DOUBLE_DEFAULT
20
+ * matchUpStatus values; the three competitiveness levels come from
21
+ * `matchUp.competitiveProfile.competitiveness` (populated when the matchUp
22
+ * was fetched with `contextProfile: { withCompetitiveness: true }`).
23
+ */
24
+ export declare function aggregateMatchUps(matchUps: any[]): DonutDatum[];
25
+ export declare function donutChart(target: HTMLElement, data: DonutDatum[], options?: DonutChartOptions): void;
26
+ /**
27
+ * Render the donut directly from a list of factory matchUps (with
28
+ * `competitiveProfile.competitiveness` populated).
29
+ */
30
+ export declare function donutChartFromMatchUps(target: HTMLElement, matchUps: any[], options?: DonutChartOptions): void;
31
+ //# sourceMappingURL=donutChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"donutChart.d.ts","sourceRoot":"","sources":["../../src/visualizations/donutChart.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAExF,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IACxD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CAC5C;AAgCD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,UAAU,EAAE,CAoB/D;AASD,wBAAgB,UAAU,CACxB,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,UAAU,EAAE,EAClB,OAAO,GAAE,iBAAsB,GAC9B,IAAI,CA8IN;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,GAAG,EAAE,EACf,OAAO,GAAE,iBAAsB,GAC9B,IAAI,CAEN"}
@@ -0,0 +1,16 @@
1
+ export declare function gameFish(): {
2
+ (selection: any): void;
3
+ g(values: any): /*elided*/ any | undefined;
4
+ options(values: any): any;
5
+ events(functions: any[]): any;
6
+ width(value: any): any;
7
+ height(value: any): any;
8
+ coords(value: any): any;
9
+ data(value: any): any;
10
+ matchUp(matchUpState: any, setIdx?: number, gameIdx?: number): /*elided*/ any;
11
+ update(opts: any): void;
12
+ colors(color3s: any): false | {
13
+ default: string;
14
+ } | /*elided*/ any;
15
+ };
16
+ //# sourceMappingURL=gameFish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gameFish.d.ts","sourceRoot":"","sources":["../../src/visualizations/gameFish.ts"],"names":[],"mappings":"AAQA,wBAAgB,QAAQ;gBAmGI,GAAG;cAmOD,GAAG;oBAUG,GAAG;sBAOD,GAAG,EAAE;iBAMV,GAAG;kBAMF,GAAG;kBAMH,GAAG;gBAML,GAAG;0BAmBjB,GAAG,WACR,MAAM,YACL,MAAM;iBAOa,GAAG;oBAQA,GAAG;;;EAmBtC"}
@@ -0,0 +1,17 @@
1
+ export declare function gameTree(): {
2
+ (selection: any): void;
3
+ exports(): {
4
+ selectView: (_event: any, _datum: any, self: any) => void;
5
+ };
6
+ options(values: any): any;
7
+ events(functions: any): any;
8
+ reset(): /*elided*/ any;
9
+ width(value: any): any;
10
+ height(value: any): any;
11
+ data(values: any): any[] | /*elided*/ any;
12
+ players(names: [string, string]): /*elided*/ any;
13
+ matchUp(matchUpState: any, names?: [string, string]): /*elided*/ any;
14
+ counters(): any;
15
+ update(opts?: any): void;
16
+ };
17
+ //# sourceMappingURL=gameTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gameTree.d.ts","sourceRoot":"","sources":["../../src/visualizations/gameTree.ts"],"names":[],"mappings":"AAiBA,wBAAgB,QAAQ;gBA8GI,GAAG;;6BA2iBD,GAAG,UAAU,GAAG,QAAQ,GAAG;;;;;iBArHxB,GAAG;kBAMF,GAAG;iBAMJ,GAAG;mBAUD,CAAC,MAAM,EAAE,MAAM,CAAC;0BAMT,GAAG,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC;;kBAYrC,GAAG;EAqTpC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Standalone version of groupGames utility
3
+ * Groups point episodes by game
4
+ */
5
+ export declare function groupGames(point_episodes: any[]): any;
6
+ //# sourceMappingURL=groupGames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groupGames.d.ts","sourceRoot":"","sources":["../../src/visualizations/groupGames.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,wBAAgB,UAAU,CAAC,cAAc,EAAE,GAAG,EAAE,OA2B/C"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * FileDropzone — Vanilla-TS drag/drop component for .ptf and .json files
3
+ *
4
+ * HTML5 Drag and Drop API with visual feedback and click-to-browse fallback.
5
+ * Reads .ptf files as ArrayBuffer (UTF-16 LE), .json files as parsed objects.
6
+ */
7
+ export interface FileDropzoneOptions {
8
+ onPTFFile?: (buffer: ArrayBuffer, fileName: string) => void;
9
+ onJSONFile?: (data: any, fileName: string) => void;
10
+ onError?: (message: string) => void;
11
+ }
12
+ export declare function createFileDropzone(options: FileDropzoneOptions): HTMLElement;
13
+ //# sourceMappingURL=FileDropzone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileDropzone.d.ts","sourceRoot":"","sources":["../../../src/visualizations/helpers/FileDropzone.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,WAAW,CAqH5E"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Interactive JSON Viewer
3
+ * A lightweight, expandable JSON tree viewer with syntax highlighting
4
+ * Copied from courthive-components
5
+ */
6
+ interface JsonViewerOptions {
7
+ expanded?: number;
8
+ theme?: 'light' | 'dark';
9
+ }
10
+ export declare class JsonViewer {
11
+ private readonly container;
12
+ private readonly options;
13
+ constructor(container: HTMLElement, data: any, options?: JsonViewerOptions);
14
+ private render;
15
+ private injectStyles;
16
+ private createNode;
17
+ private createLine;
18
+ private createComplexNode;
19
+ private span;
20
+ update(data: any): void;
21
+ }
22
+ /**
23
+ * Helper function to create a JSON viewer
24
+ */
25
+ export declare function createJsonViewer(container: HTMLElement, data: any, options?: JsonViewerOptions): JsonViewer;
26
+ export {};
27
+ //# sourceMappingURL=JsonViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonViewer.d.ts","sourceRoot":"","sources":["../../../src/visualizations/helpers/JsonViewer.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAc;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;gBAEhC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,GAAE,iBAAsB;IAU9E,OAAO,CAAC,MAAM;IAad,OAAO,CAAC,YAAY;IAsFpB,OAAO,CAAC,UAAU;IAoBlB,OAAO,CAAC,UAAU;IAwBlB,OAAO,CAAC,iBAAiB;IAuHzB,OAAO,CAAC,IAAI;IAQL,MAAM,CAAC,IAAI,EAAE,GAAG;CAGxB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,cAG9F"}
@@ -0,0 +1,5 @@
1
+ import { PlaybackControls } from '../../engine/createPlaybackEngine';
2
+ export declare function createPlaybackControlsUI(playback: PlaybackControls, options?: {
3
+ showScoreboard?: boolean;
4
+ }): HTMLElement;
5
+ //# sourceMappingURL=PlaybackControls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlaybackControls.d.ts","sourceRoot":"","sources":["../../../src/visualizations/helpers/PlaybackControls.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,GACrC,WAAW,CA8Gb"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Horizon Chart — Single-set renderer (D3 v7)
3
+ *
4
+ * Renders one horizon chart for a single set's differential data.
5
+ * Takes sdata: [index, diff][] and renders colored area bands —
6
+ * positive values fan out in one color, negative in another,
7
+ * stacked by band count.
8
+ */
9
+ type CurveInterpolation = 'basis' | 'linear';
10
+ interface HorizonChartOptions {
11
+ id: string | number;
12
+ width: number;
13
+ height: number;
14
+ position: {
15
+ x: number;
16
+ y: number;
17
+ };
18
+ display: {
19
+ ppp: number | undefined;
20
+ bands: number;
21
+ mode: 'mirror' | 'offset';
22
+ orientation: 'horizontal' | 'vertical';
23
+ transitionTime: number;
24
+ interpolate: CurveInterpolation;
25
+ };
26
+ bounds: {
27
+ vRangeMax: number | undefined;
28
+ };
29
+ }
30
+ interface HorizonChartEvents {
31
+ update: {
32
+ begin: (() => void) | null;
33
+ end: (() => void) | null;
34
+ };
35
+ chart: {
36
+ click: ((data: any) => void) | null;
37
+ };
38
+ path: {
39
+ mouseover: ((data: any) => void) | null;
40
+ mouseout: ((d: any, i: number, el: any) => void) | null;
41
+ };
42
+ }
43
+ export declare function horizonChart(): {
44
+ (selection: any): void;
45
+ options(values?: Record<string, any>): /*elided*/ any | HorizonChartOptions;
46
+ events(functions?: Partial<HorizonChartEvents>): /*elided*/ any | HorizonChartEvents;
47
+ width(value?: number): number | /*elided*/ any;
48
+ height(value?: number): number | /*elided*/ any;
49
+ data(values?: any): any;
50
+ sdata(values?: [number, number][]): /*elided*/ any | [number, number][];
51
+ update(): void;
52
+ bands(value?: number): number | /*elided*/ any;
53
+ mode(value?: string): /*elided*/ any | "mirror" | "offset";
54
+ duration(value?: number): number | /*elided*/ any;
55
+ orientation(value?: string): /*elided*/ any | "horizontal" | "vertical";
56
+ colors(colorRange?: [string, string, string, string]): string[] | /*elided*/ any;
57
+ };
58
+ export {};
59
+ //# sourceMappingURL=horizonChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"horizonChart.d.ts","sourceRoot":"","sources":["../../src/visualizations/horizonChart.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAMH,KAAK,kBAAkB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE7C,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;QAC1B,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;QACvC,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,kBAAkB,CAAC;KACjC,CAAC;IACF,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;CAC3C;AAED,UAAU,kBAAkB;IAC1B,MAAM,EAAE;QAAE,KAAK,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;QAAC,GAAG,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC;IACjE,KAAK,EAAE;QAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC;IAC/C,IAAI,EAAE;QAAE,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC;CAC5G;AAED,wBAAgB,YAAY;gBA+BA,GAAG;qBA4GM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;uBAMjB,OAAO,CAAC,kBAAkB,CAAC;kBAMhC,MAAM;mBAML,MAAM;kBAMP,GAAG;mBAMF,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;;kBAcnB,MAAM;iBAOP,MAAM;qBAMF,MAAM;wBAMH,MAAM;wBAMN,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;EAQvE"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Visualizations Index
3
+ *
4
+ * Central export point for all D3 visualizations.
5
+ */
6
+ export { simpleChart } from './simpleChart';
7
+ export { gameFish } from './gameFish';
8
+ export { gameTree } from './gameTree';
9
+ export { momentumChart } from './momentumChart';
10
+ export { ptsMatch } from './ptsChart';
11
+ export { coronaChart, coronaChartFromMatchUp } from './coronaChart';
12
+ export { ptsHorizon, ptsHorizonFromMatchUp } from './ptsHorizon';
13
+ export { horizonChart } from './horizonChart';
14
+ export { rallyTree } from './rallyTree';
15
+ export { statView } from './statView';
16
+ export { matchUpDashboard } from './matchUpDashboard';
17
+ export { groupGames } from './groupGames';
18
+ export { rallyCount } from './legacyRally';
19
+ export { sampleGamePoints, deuceGamePoints, tiebreakGamePoints, sampleGameGroup, deuceGameGroup, tiebreakGameGroup, pointsToEpisodes, } from './data/sampleGame';
20
+ export type { Point, Episode, GameGroup, SetData, Player, MatchMetadata, } from './types';
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/visualizations/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACV,KAAK,EACL,OAAO,EACP,SAAS,EACT,OAAO,EACP,MAAM,EACN,aAAa,GACd,MAAM,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function legacyRally(rally: any): any[];
2
+ export declare function rallyCount(rally: any): any;
3
+ //# sourceMappingURL=legacyRally.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacyRally.d.ts","sourceRoot":"","sources":["../../src/visualizations/legacyRally.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,KAAK,KAAA,SAIhC;AAED,wBAAgB,UAAU,CAAC,KAAK,KAAA,OAW/B"}
@@ -0,0 +1,30 @@
1
+ import { ptsHorizon } from './ptsHorizon';
2
+ import { statView } from './statView';
3
+ import { gameTree } from './gameTree';
4
+ import { rallyTree } from './rallyTree';
5
+ interface DashboardOptions {
6
+ colors: [string, string];
7
+ players: [string, string];
8
+ display: {
9
+ ptsHorizon: boolean;
10
+ coronaChart: boolean;
11
+ statView: boolean;
12
+ gameTree: boolean;
13
+ rallyTree: boolean;
14
+ };
15
+ }
16
+ interface DashboardCharts {
17
+ ptsHorizonChart: ReturnType<typeof ptsHorizon>;
18
+ statViewChart: ReturnType<typeof statView>;
19
+ gameTreeChart: ReturnType<typeof gameTree>;
20
+ rallyTreeChart: ReturnType<typeof rallyTree>;
21
+ }
22
+ export declare function matchUpDashboard(): {
23
+ (el: HTMLElement): void;
24
+ matchUp(state: any, players?: [string, string]): /*elided*/ any;
25
+ update(): void;
26
+ options(values?: Partial<DashboardOptions>): DashboardOptions | /*elided*/ any;
27
+ charts(): DashboardCharts;
28
+ };
29
+ export {};
30
+ //# sourceMappingURL=matchUpDashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchUpDashboard.d.ts","sourceRoot":"","sources":["../../src/visualizations/matchUpDashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,UAAU,gBAAgB;IACxB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,OAAO,EAAE;QACP,UAAU,EAAE,OAAO,CAAC;QACpB,WAAW,EAAE,OAAO,CAAC;QACrB,QAAQ,EAAE,OAAO,CAAC;QAClB,QAAQ,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC;CACH;AAED,UAAU,eAAe;IACvB,eAAe,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IAC/C,aAAa,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;IAC3C,aAAa,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;IAC3C,cAAc,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;CAC9C;AAED,wBAAgB,gBAAgB;SAqCP,WAAW;mBA4KG,GAAG,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC;;qBAqC7B,OAAO,CAAC,gBAAgB,CAAC;cAUhC,eAAe;EAKhD"}
@@ -0,0 +1,12 @@
1
+ export declare function momentumChart(): {
2
+ (selection: any): void;
3
+ options(values: any): any;
4
+ events(functions: any): any;
5
+ width(value: any): any;
6
+ height(value: any): any;
7
+ data(value: any): any;
8
+ matchUp(matchUpState: any): /*elided*/ any;
9
+ update(opts: any): void;
10
+ colors(color3s: any): any;
11
+ };
12
+ //# sourceMappingURL=momentumChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"momentumChart.d.ts","sourceRoot":"","sources":["../../src/visualizations/momentumChart.ts"],"names":[],"mappings":"AAWA,wBAAgB,aAAa;gBAoFD,GAAG;;;;;;0BA4VW,GAAG;;;EAgC5C"}
@@ -0,0 +1,14 @@
1
+ export declare function ptsMatch(): {
2
+ (selection: any): void;
3
+ options(values: any): any;
4
+ events(functions: any): any;
5
+ colors(colores: any): any;
6
+ width(value: any): any;
7
+ height(value: any): any;
8
+ duration(value: any): any;
9
+ update(opts?: any): boolean;
10
+ data(matchObjectOrEpisodes: any): any;
11
+ players(names: [string, string]): /*elided*/ any;
12
+ matchUp(matchUpState: any, names?: [string, string]): /*elided*/ any;
13
+ };
14
+ //# sourceMappingURL=ptsChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ptsChart.d.ts","sourceRoot":"","sources":["../../src/visualizations/ptsChart.ts"],"names":[],"mappings":"AAyCA,wBAAgB,QAAQ;gBAyFI,GAAG;oBAmDK,GAAG;sBAOD,GAAG;oBAML,GAAG;iBAMN,GAAG;kBAUF,GAAG;oBAUD,GAAG;kBAML,GAAG;gCAgDW,GAAG;mBA0FhB,CAAC,MAAM,EAAE,MAAM,CAAC;0BAKT,GAAG,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC;EAQtE"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * PtsHorizon — Multi-set horizon chart wrapper with D3 brush (D3 v7)
3
+ *
4
+ * Creates up to 5 horizonChart instances (one per set), manages end-to-end
5
+ * layout, transforms buildSetMap() output into per-chart sdata, and overlays
6
+ * a D3 brushX() for range selection.
7
+ */
8
+ interface PtsHorizonOptions {
9
+ id: string | number;
10
+ width: number;
11
+ height: number;
12
+ margins: {
13
+ spacing: number;
14
+ };
15
+ position: {
16
+ x: number;
17
+ y: number;
18
+ };
19
+ elements: {
20
+ brush: boolean;
21
+ };
22
+ display: {
23
+ ppp: number | undefined;
24
+ bands: number;
25
+ mode: 'mirror' | 'offset';
26
+ orientation: 'horizontal' | 'vertical';
27
+ transitionTime: number;
28
+ interpolate: 'basis' | 'linear';
29
+ sizeToFit: boolean;
30
+ };
31
+ bounds: {
32
+ vRangeMax: number;
33
+ };
34
+ color: {
35
+ range: [string, string, string, string];
36
+ };
37
+ }
38
+ interface PtsHorizonEvents {
39
+ update: {
40
+ begin: (() => void) | null;
41
+ end: (() => void) | null;
42
+ };
43
+ brush: {
44
+ brushing: ((extent: [number, number]) => void) | null;
45
+ start: ((extent: [number, number]) => void) | null;
46
+ end: ((extent: [number, number]) => void) | null;
47
+ };
48
+ chart: {
49
+ click: ((d: any) => void) | null;
50
+ };
51
+ mouseover: ((data: any) => void) | undefined;
52
+ mouseout: ((data: any) => void) | undefined;
53
+ }
54
+ export declare function ptsHorizon(): {
55
+ (selection: any): void;
56
+ options(values?: Record<string, any>): PtsHorizonOptions | /*elided*/ any;
57
+ events(functions?: Partial<PtsHorizonEvents>): PtsHorizonEvents | /*elided*/ any;
58
+ width(value?: number): number | /*elided*/ any;
59
+ height(value?: number): number | /*elided*/ any;
60
+ data(value?: any): any;
61
+ matchUp(state: any, players?: [string, string]): /*elided*/ any;
62
+ update(opts?: any): void;
63
+ bands(value?: number): number | /*elided*/ any;
64
+ mode(value?: string): "mirror" | "offset" | /*elided*/ any;
65
+ duration(value?: number): number | /*elided*/ any;
66
+ orientation(value?: string): "horizontal" | "vertical" | /*elided*/ any;
67
+ colors(playerColors?: [string, string]): string[] | /*elided*/ any;
68
+ };
69
+ /**
70
+ * Companion function: render ptsHorizon directly from a ScoringEngine MatchUp.
71
+ * Clears target container, creates chart, renders.
72
+ */
73
+ export declare function ptsHorizonFromMatchUp(container: HTMLElement, matchUp: any, options?: {
74
+ width?: number;
75
+ height?: number;
76
+ bands?: number;
77
+ mode?: 'mirror' | 'offset';
78
+ colors?: [string, string];
79
+ players?: [string, string];
80
+ showBrush?: boolean;
81
+ }): void;
82
+ export {};
83
+ //# sourceMappingURL=ptsHorizon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ptsHorizon.d.ts","sourceRoot":"","sources":["../../src/visualizations/ptsHorizon.ts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