{"version":3,"file":"user-shapes-DfmCGKB0.mjs","names":[],"sources":["../src/chart/chart.ts","../src/chart/user-shapes.ts"],"sourcesContent":["import type { ShapeProperties } from '../drawing/dml/shape-properties';\nimport type { TextBody } from '../drawing/dml/text';\nimport type { ChartDrawing } from './user-shapes';\n\n// ChartML data model.\n//\n// **Stage 1**: BarChart end-to-end. The full 17 SpreadsheetML chart kinds + 8\n// chartex kinds land across the upcoming iterations; this commit introduces the\n// shared shape so future kinds can plug in without breaking the public surface:\n//\n// ChartSpace\n//     ├─ title?: string\n//     ├─ legend?: { position: ... }\n//     └─ plotArea\n//          ├─ chart: BarChart | LineChart | PieChart | …  (discriminated union)\n//          ├─ catAx?: CategoryAxis  (or Date / Series axis)\n//          └─ valAx?: ValueAxis\n//\n// References to worksheet ranges (`Sheet1!$A$1:$A$5`) are kept as strings; the\n// optional `cache` field carries the last-known data so charts can be rendered\n// without reading the source data.\n\nexport type LegendPosition = 'r' | 't' | 'l' | 'b' | 'tr';\nexport type GroupingType = 'clustered' | 'stacked' | 'percentStacked' | 'standard';\nexport type BarDirection = 'bar' | 'col';\n\n/** Reference to a worksheet range plus an optional client-side cache of the resolved values. */\nexport interface NumericRef {\n  /** Worksheet-qualified range string, e.g. `Sheet1!$B$1:$B$5`. */\n  ref: string;\n  /** Optional cached numeric values — Excel writes these for offline rendering. */\n  cache?: number[];\n  /** Optional `formatCode` Excel uses when rendering each cached value. */\n  formatCode?: string;\n}\n\nexport interface CategoryRef {\n  ref: string;\n  /** Whether the cache is numeric or string. */\n  cacheKind?: 'num' | 'str';\n  /** String values (when `cacheKind === 'str'`) or numeric values. */\n  cache?: ReadonlyArray<string | number>;\n  formatCode?: string;\n}\n\n// ---- Series decorations: data labels, trendlines, error bars --------------\n\n/**\n * Number-format payload for chart axes / data labels (`<c:numFmt formatCode=\"…\"\n * sourceLinked=\"0|1\"/>`).\n *\n * Named `ChartNumberFormat` to avoid colliding with the cell-stylesheet\n * `NumberFormat` exported from `@office-kit/xlsx/styles`, which is a different shape\n * (`{ numFmtId, formatCode }`).\n */\nexport interface ChartNumberFormat {\n  formatCode: string;\n  sourceLinked?: boolean;\n}\n\nexport type DataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';\n\n/** Per-point data label override. Lives inside `<c:dLbls><c:dLbl idx=\"N\">…</c:dLbl></c:dLbls>`. */\nexport interface DataLabel {\n  idx: number;\n  /** Delete this individual label (suppresses display even if the parent dLbls would show it). */\n  delete?: boolean;\n  /** Inline rich text or a cell reference. Mutually exclusive. */\n  tx?: { kind: 'rich'; body: TextBody } | { kind: 'strRef'; ref: string };\n  numFmt?: ChartNumberFormat;\n  spPr?: ShapeProperties;\n  txPr?: TextBody;\n  dLblPos?: DataLabelPosition;\n  showLegendKey?: boolean;\n  showVal?: boolean;\n  showCatName?: boolean;\n  showSerName?: boolean;\n  showPercent?: boolean;\n  showBubbleSize?: boolean;\n  separator?: string;\n}\n\n/** Series-wide data label settings. `<c:dLbls>` element. */\nexport interface DataLabelList {\n  /** When true, suppress all labels (`<c:delete val=\"1\"/>`). */\n  delete?: boolean;\n  /** Per-point overrides. */\n  dLbl?: DataLabel[];\n  numFmt?: ChartNumberFormat;\n  spPr?: ShapeProperties;\n  txPr?: TextBody;\n  dLblPos?: DataLabelPosition;\n  showLegendKey?: boolean;\n  showVal?: boolean;\n  showCatName?: boolean;\n  showSerName?: boolean;\n  showPercent?: boolean;\n  showBubbleSize?: boolean;\n  separator?: string;\n  showLeaderLines?: boolean;\n}\n\nexport type MarkerSymbol =\n  | 'auto'\n  | 'circle'\n  | 'dash'\n  | 'diamond'\n  | 'dot'\n  | 'none'\n  | 'picture'\n  | 'plus'\n  | 'square'\n  | 'star'\n  | 'triangle'\n  | 'x';\n\n/** Data-point marker on line / scatter / radar series (`<c:marker>` child of `<c:ser>`). */\nexport interface Marker {\n  symbol?: MarkerSymbol;\n  /** Marker size in points (2..72). */\n  size?: number;\n  spPr?: ShapeProperties;\n}\n\n/**\n * Per-point override on a series (`<c:dPt>` child of `<c:ser>`). Lets each bar\n * / slice / data point pick up its own colour, marker, explosion, etc.\n */\nexport interface DataPoint {\n  /** 0-based index of the data point within the series. */\n  idx: number;\n  /** Invert fill when the data point's value is negative (bar / area / bubble). */\n  invertIfNegative?: boolean;\n  /** Per-point marker override (line / scatter / radar). */\n  marker?: Marker;\n  /** 3-D bubble flag (bubble series only). */\n  bubble3D?: boolean;\n  /** Slice explosion in % for pie / doughnut points (0..400). */\n  explosion?: number;\n  /** Per-point shape properties (fill / line colour). */\n  spPr?: ShapeProperties;\n}\n\nexport type TrendlineType = 'exp' | 'linear' | 'log' | 'movingAvg' | 'poly' | 'power';\n\nexport interface Trendline {\n  /** Display name shown in the chart legend (`<c:name>` text). */\n  name?: string;\n  spPr?: ShapeProperties;\n  trendlineType: TrendlineType;\n  /** Polynomial order (2..6) when `trendlineType === 'poly'`. */\n  order?: number;\n  /** Moving-average period when `trendlineType === 'movingAvg'`. */\n  period?: number;\n  /** Forecast forward periods. */\n  forward?: number;\n  /** Forecast backward periods. */\n  backward?: number;\n  /** Y-axis intercept (linear only). */\n  intercept?: number;\n  /** Display R² value on the chart. */\n  dispRSqr?: boolean;\n  /** Display the trendline equation. */\n  dispEq?: boolean;\n}\n\nexport type ErrorBarDirection = 'x' | 'y';\nexport type ErrorBarType = 'both' | 'minus' | 'plus';\nexport type ErrorValType = 'cust' | 'fixedVal' | 'percentage' | 'stdDev' | 'stdErr';\n\nexport interface ErrorBars {\n  /** Direction. Required only on scatter / bubble series; bar / line / area imply `'y'`. */\n  errDir?: ErrorBarDirection;\n  errBarType: ErrorBarType;\n  errValType: ErrorValType;\n  noEndCap?: boolean;\n  /** Numeric magnitude for fixedVal / percentage / stdDev / stdErr. */\n  val?: number;\n  /** Custom plus-side data (NumericRef) — required when `errValType === 'cust'`. */\n  plus?: NumericRef;\n  /** Custom minus-side data (NumericRef) — required when `errValType === 'cust'`. */\n  minus?: NumericRef;\n  spPr?: ShapeProperties;\n}\n\nexport interface BarSeries {\n  /** 0-based slot in the chart (`<c:idx>`). */\n  idx: number;\n  /** Render order (`<c:order>`). Usually equals `idx`. */\n  order: number;\n  /** Series title — either a static string or a cell reference. */\n  tx?: { kind: 'literal'; value: string } | { kind: 'ref'; ref: string };\n  /** Per-series shape properties (fill / line / effects). */\n  spPr?: ShapeProperties;\n  /** Invert fill on negative values (bar / line / area series). */\n  invertIfNegative?: boolean;\n  /**\n   * Slice explosion in % (pie / doughnut series only; 0..400). Bar / line / area writers\n   * ignore the field — leave it unset for those series.\n   */\n  explosion?: number;\n  /** Per-point overrides. Empty / omitted means every point inherits the series defaults. */\n  dPt?: DataPoint[];\n  /** Series-wide data labels. */\n  dLbls?: DataLabelList;\n  /** Trendlines attached to this series. */\n  trendline?: Trendline[];\n  /** Error bars. Bar / line / area / radar default to a single y-direction entry. */\n  errBars?: ErrorBars[];\n  /** Categories. */\n  cat?: CategoryRef;\n  /** Values (always required for a bar series). */\n  val: NumericRef;\n}\n\nexport interface BarChart {\n  kind: 'bar';\n  /** `bar` for horizontal bars, `col` for vertical columns. */\n  barDir: BarDirection;\n  /** Excel default is `clustered`. */\n  grouping: GroupingType;\n  varyColors?: boolean;\n  series: BarSeries[];\n  /** Bar gap width in % of bar width (Excel default 150). */\n  gapWidth?: number;\n  /**\n   * Bar overlap in -100..100 % of bar width. Positive values overlap clustered bars; negative values\n   * space them apart. For stacked / percentStacked grouping, omit and the serializer emits the\n   * standard Excel default of 100 (flush stacking).\n   */\n  overlap?: number;\n  /** Internal axis ids. The category and value axes carry the same numbers. */\n  axIds: [number, number];\n}\n\nexport interface LineSeries extends BarSeries {\n  /** Per-series smoothing toggle. */\n  smooth?: boolean;\n  /** Data-point marker (`<c:marker>` child of `<c:ser>`). */\n  marker?: Marker;\n}\n\nexport interface LineChart {\n  kind: 'line';\n  grouping: GroupingType;\n  varyColors?: boolean;\n  series: LineSeries[];\n  /** Whether to round corners between data points (chart-level default). */\n  smooth?: boolean;\n  axIds: [number, number];\n}\n\nexport interface AreaChart {\n  kind: 'area';\n  grouping: GroupingType;\n  varyColors?: boolean;\n  series: BarSeries[];\n  axIds: [number, number];\n}\n\nexport interface PieChart {\n  kind: 'pie';\n  varyColors?: boolean;\n  /** Pie / Doughnut have a single ring of slices — but Excel allows multiple series; we mirror that. */\n  series: BarSeries[];\n}\n\nexport interface DoughnutChart {\n  kind: 'doughnut';\n  varyColors?: boolean;\n  series: BarSeries[];\n  /** Hole size in % of outer radius (10..90, Excel default 50). */\n  holeSize?: number;\n  /** First-slice rotation angle in degrees. */\n  firstSliceAng?: number;\n}\n\nexport type ScatterStyle = 'line' | 'lineMarker' | 'marker' | 'none' | 'smooth' | 'smoothMarker';\n\nexport interface ScatterSeries {\n  idx: number;\n  order: number;\n  tx?: BarSeries['tx'];\n  spPr?: ShapeProperties;\n  dPt?: DataPoint[];\n  dLbls?: DataLabelList;\n  trendline?: Trendline[];\n  /** Up to 2 entries (one per direction). */\n  errBars?: ErrorBars[];\n  /** Data-point marker. */\n  marker?: Marker;\n  xVal?: NumericRef;\n  yVal: NumericRef;\n  smooth?: boolean;\n}\n\nexport interface ScatterChart {\n  kind: 'scatter';\n  scatterStyle: ScatterStyle;\n  varyColors?: boolean;\n  series: ScatterSeries[];\n  axIds: [number, number];\n}\n\nexport type RadarStyle = 'standard' | 'marker' | 'filled';\n\nexport interface RadarChart {\n  kind: 'radar';\n  radarStyle: RadarStyle;\n  varyColors?: boolean;\n  series: BarSeries[];\n  axIds: [number, number];\n}\n\nexport interface BubbleSeries {\n  idx: number;\n  order: number;\n  tx?: BarSeries['tx'];\n  spPr?: ShapeProperties;\n  invertIfNegative?: boolean;\n  dPt?: DataPoint[];\n  dLbls?: DataLabelList;\n  trendline?: Trendline[];\n  /** Up to 2 entries (one per direction). */\n  errBars?: ErrorBars[];\n  xVal?: NumericRef;\n  yVal: NumericRef;\n  /** Bubble size — required for a real bubble chart. */\n  bubbleSize: NumericRef;\n  /** Per-series 3-D toggle. */\n  bubble3D?: boolean;\n}\n\nexport type BubbleSizeRepresents = 'area' | 'w';\n\nexport interface BubbleChart {\n  kind: 'bubble';\n  varyColors?: boolean;\n  series: BubbleSeries[];\n  bubble3D?: boolean;\n  /** Bubble scale 0..300 %. Excel default is 100. */\n  bubbleScale?: number;\n  showNegBubbles?: boolean;\n  sizeRepresents?: BubbleSizeRepresents;\n  axIds: [number, number];\n}\n\n/** `<c:hiLowLines>` child of stock charts. */\nexport interface HiLowLines {\n  spPr?: ShapeProperties;\n}\n\n/** `<c:upBars>` / `<c:downBars>` child frame styling. */\nexport interface BarFrame {\n  spPr?: ShapeProperties;\n}\n\n/** `<c:upDownBars>` child of stock charts. */\nexport interface UpDownBars {\n  /** Gap width 0..500 between up/down bars. Excel default is 150. */\n  gapWidth?: number;\n  upBars?: BarFrame;\n  downBars?: BarFrame;\n}\n\nexport interface StockChart {\n  kind: 'stock';\n  /** Up to 4 series — typically open / high / low / close. */\n  series: BarSeries[];\n  /** Boolean flag for the simple `<c:hiLowLines/>` form, or an object with `spPr` for custom line styling. */\n  hiLowLines?: boolean | HiLowLines;\n  /** Boolean for the simple form, or an object with gapWidth / upBars / downBars detail. */\n  upDownBars?: boolean | UpDownBars;\n  axIds: [number, number];\n}\n\nexport interface SurfaceChart {\n  kind: 'surface';\n  series: BarSeries[];\n  /** Wireframe (line-only) when true; smoothed surface fill when false. */\n  wireframe?: boolean;\n  /** Surfaces use 3 axes: cat + val + ser. */\n  axIds: [number, number, number];\n}\n\nexport type OfPieType = 'bar' | 'pie';\nexport type SplitType = 'auto' | 'cust' | 'percent' | 'pos' | 'val';\n\nexport interface OfPieChart {\n  kind: 'ofPie';\n  /** `bar` for \"Bar of Pie\", `pie` for \"Pie of Pie\". */\n  ofPieType: OfPieType;\n  varyColors?: boolean;\n  series: BarSeries[];\n  gapWidth?: number;\n  splitType?: SplitType;\n  /** Position threshold paired with `splitType='pos'`. */\n  splitPos?: number;\n  /** Indices of data points moved to the secondary plot when `splitType='cust'`. */\n  custSplit?: number[];\n  /** Secondary plot size as % of primary (5..200). */\n  secondPieSize?: number;\n}\n\n// ---- 3-D chart variants ---------------------------------------------------\n//\n// 3-D charts share most of their attributes with their 2-D counterparts but\n// land on different XML tag names (<c:bar3DChart>, etc) and use 3 axes (cat /\n// val / ser). We keep them as distinct discriminated-union variants so the\n// chart kind stays type-narrowable.\n\nexport interface Bar3DChart {\n  kind: 'bar3D';\n  barDir: BarDirection;\n  grouping: GroupingType;\n  varyColors?: boolean;\n  series: BarSeries[];\n  gapWidth?: number;\n  /** Bar 3-D adds a `gapDepth` attribute. */\n  gapDepth?: number;\n  /** Cluster | percentStacked | stacked … plus 'standard' which 2-D doesn't take. */\n  shape?: 'cone' | 'coneToMax' | 'box' | 'cylinder' | 'pyramid' | 'pyramidToMax';\n  axIds: [number, number, number];\n}\n\nexport interface Line3DChart {\n  kind: 'line3D';\n  grouping: GroupingType;\n  varyColors?: boolean;\n  series: LineSeries[];\n  gapDepth?: number;\n  axIds: [number, number, number];\n}\n\nexport interface Pie3DChart {\n  kind: 'pie3D';\n  varyColors?: boolean;\n  series: BarSeries[];\n}\n\nexport interface Area3DChart {\n  kind: 'area3D';\n  grouping: GroupingType;\n  varyColors?: boolean;\n  series: BarSeries[];\n  gapDepth?: number;\n  axIds: [number, number, number];\n}\n\nexport interface Surface3DChart {\n  kind: 'surface3D';\n  series: BarSeries[];\n  wireframe?: boolean;\n  axIds: [number, number, number];\n}\n\n/** Discriminator union of all SpreadsheetML chart kinds modelled so far. */\nexport type ChartKind =\n  | BarChart\n  | LineChart\n  | AreaChart\n  | PieChart\n  | DoughnutChart\n  | ScatterChart\n  | RadarChart\n  | BubbleChart\n  | StockChart\n  | SurfaceChart\n  | OfPieChart\n  | Bar3DChart\n  | Line3DChart\n  | Pie3DChart\n  | Area3DChart\n  | Surface3DChart;\n\nexport type TickMark = 'cross' | 'in' | 'none' | 'out';\nexport type TickLabelPosition = 'high' | 'low' | 'nextTo' | 'none';\nexport type AxisCrosses = 'autoZero' | 'max' | 'min';\nexport type AxisOrientation = 'maxMin' | 'minMax';\nexport type AxisCrossBetween = 'between' | 'midCat';\nexport type CategoryLabelAlignment = 'ctr' | 'l' | 'r';\n\n/** `<c:scaling>` child of axes. */\nexport interface AxisScaling {\n  orientation?: AxisOrientation;\n  min?: number;\n  max?: number;\n  logBase?: number;\n}\n\ninterface AxisShared {\n  axId: number;\n  /** Crosses partner axis id. */\n  crossAx: number;\n  position?: 'b' | 't' | 'l' | 'r';\n  delete?: boolean;\n  /** Axis-line / tick formatting. */\n  spPr?: ShapeProperties;\n  /** Tick-label text formatting. */\n  txPr?: TextBody;\n  /** Axis title (`<c:title>`). Reuses the chart-title structure. */\n  title?: ChartTitle;\n  /** Tick-label number format. Default emitted is `General` / `sourceLinked=1`. */\n  numFmt?: ChartNumberFormat;\n  /** Major tick mark style. Default emitted is `out`. */\n  majorTickMark?: TickMark;\n  /** Minor tick mark style. Default emitted is `none`. */\n  minorTickMark?: TickMark;\n  /** Tick-label position. Default emitted is `nextTo`. */\n  tickLblPos?: TickLabelPosition;\n  /** Axis scaling (`<c:scaling>`). Default emitted is `orientation: 'minMax'`. */\n  scaling?: AxisScaling;\n  /** `<c:crosses>`. Default emitted is `autoZero`. Mutually exclusive with `crossesAt`. */\n  crosses?: AxisCrosses;\n  /** `<c:crossesAt val=\"...\"/>`. Numeric cross point on the partner axis. */\n  crossesAt?: number;\n  /**\n   * Major gridlines. `true` keeps Excel's default rendering; pass\n   * `{ spPr }` to override the line colour / width / dash. `false` /\n   * `undefined` omit the element entirely.\n   */\n  majorGridlines?: boolean | Gridlines;\n  /** Minor gridlines. Same shape as {@link AxisShared.majorGridlines}. */\n  minorGridlines?: boolean | Gridlines;\n}\n\n/**\n * Rich `<c:majorGridlines>` / `<c:minorGridlines>` form. Wraps a\n * `ShapeProperties` so the gridline line can be styled (e.g. corporate-style\n * light-grey `D9D9D9`).\n */\nexport interface Gridlines {\n  spPr?: ShapeProperties;\n}\n\nexport interface CategoryAxis extends AxisShared {\n  /** `<c:auto>` — whether Excel auto-selects the axis type from the data. */\n  auto?: boolean;\n  /** Tick-label alignment. Default emitted is `ctr`. */\n  lblAlgn?: CategoryLabelAlignment;\n  /** Tick-label offset 0..1000. Default emitted is `100`. */\n  lblOffset?: number;\n  /** Suppress multi-level labels for hierarchical categories. */\n  noMultiLvlLbl?: boolean;\n}\n\nexport interface ValueAxis extends AxisShared {\n  /** Tick-axis crossing rule. Default emitted is `between`. */\n  crossBetween?: AxisCrossBetween;\n  /** Major unit spacing on the value axis. */\n  majorUnit?: number;\n  /** Minor unit spacing on the value axis. */\n  minorUnit?: number;\n}\n\nexport type TimeUnit = 'days' | 'months' | 'years';\n\nexport interface DateAxis extends AxisShared {\n  /** `<c:auto>` — auto-select axis type. */\n  auto?: boolean;\n  /** Tick-label offset 0..1000. Default emitted is `100`. */\n  lblOffset?: number;\n  /** Smallest interval the axis represents. */\n  baseTimeUnit?: TimeUnit;\n  /** Major unit spacing on the date axis (count of `majorTimeUnit`s). */\n  majorUnit?: number;\n  majorTimeUnit?: TimeUnit;\n  /** Minor unit spacing on the date axis. */\n  minorUnit?: number;\n  minorTimeUnit?: TimeUnit;\n}\n\nexport interface SeriesAxis extends AxisShared {\n  /** Skip every Nth tick label (1 = every label). */\n  tickLblSkip?: number;\n  /** Skip every Nth tick mark. */\n  tickMarkSkip?: number;\n}\n\nexport interface PlotArea {\n  chart: ChartKind;\n  catAx?: CategoryAxis;\n  valAx?: ValueAxis;\n  /** Date / time axis. Replaces `catAx` when the categories are dates. */\n  dateAx?: DateAxis;\n  /** Series axis (used by `surface3DChart` / `surfaceChart`). */\n  serAx?: SeriesAxis;\n  /** Manual layout for the plot area inside the chart. */\n  layout?: Layout;\n  /** Plot-area shape properties (background fill, border line). */\n  spPr?: ShapeProperties;\n}\n\nexport type LayoutMode = 'edge' | 'factor';\nexport type LayoutTarget = 'inner' | 'outer';\n\n/** `<c:manualLayout>` child of `<c:layout>`. All values are fractions of the chart space (0..1). */\nexport interface ManualLayout {\n  layoutTarget?: LayoutTarget;\n  xMode?: LayoutMode;\n  yMode?: LayoutMode;\n  wMode?: LayoutMode;\n  hMode?: LayoutMode;\n  x?: number;\n  y?: number;\n  w?: number;\n  h?: number;\n}\n\n/** `<c:layout>` wrapper. Currently only `manualLayout` is exposed; the lone `<layoutId>` form is for chartex. */\nexport interface Layout {\n  manualLayout?: ManualLayout;\n}\n\nexport interface Legend {\n  position: LegendPosition;\n  overlay?: boolean;\n  layout?: Layout;\n  spPr?: ShapeProperties;\n  txPr?: TextBody;\n}\n\n/** Chart title with full DrawingML formatting support. */\nexport interface ChartTitle {\n  /**\n   * Plain title text. When set the serializer emits\n   * `<c:tx><c:rich><a:p><a:r><a:t>text</a:t></a:r></c:rich></c:tx>`. Mutually\n   * exclusive with `tx`.\n   */\n  text?: string;\n  /** Rich text body — overrides `text` when both are present. */\n  tx?: TextBody;\n  overlay?: boolean;\n  layout?: Layout;\n  spPr?: ShapeProperties;\n  txPr?: TextBody;\n}\n\n/** 3-D viewing options. Used by `bar3DChart`, `line3DChart`, `pie3DChart`, `area3DChart`, `surface3DChart`. */\nexport interface View3D {\n  /** X-axis rotation in degrees, -90..90. */\n  rotX?: number;\n  /** Y-axis rotation in degrees, 0..359. */\n  rotY?: number;\n  /** Depth as a percentage of chart width, 20..2000. */\n  depthPercent?: number;\n  /** Height as a percentage of chart width, 5..500. */\n  hPercent?: number;\n  /** Use right-angle axes (orthographic). When true, perspective is ignored. */\n  rAngAx?: boolean;\n  /** Perspective angle 0..240 (0 = isometric, 30 = Excel default). */\n  perspective?: number;\n}\n\n/** 3-D wall / floor frame. Children of `<c:chart>` for bar3D / line3D / area3D / surface3D / pie3D. */\nexport interface SurfaceFrame {\n  /** Wall thickness in % of chart width (0..100). */\n  thickness?: number;\n  spPr?: ShapeProperties;\n}\n\nexport interface ChartSpace {\n  /** Optional chart title. */\n  title?: ChartTitle;\n  legend?: Legend;\n  plotArea: PlotArea;\n  /**\n   * Built-in Excel chart-style preset (1..48). Mapped to `<c:style val=\"N\"/>` inside\n   * `<c:chartSpace>` and selects one entry of Excel's \"Chart Styles\" gallery.\n   */\n  style?: number;\n  /** 3-D viewing options (applies to 3-D chart kinds; ignored otherwise by Excel). */\n  view3D?: View3D;\n  /** 3-D chart floor frame. */\n  floor?: SurfaceFrame;\n  /** 3-D chart side wall frame. */\n  sideWall?: SurfaceFrame;\n  /** 3-D chart back wall frame. */\n  backWall?: SurfaceFrame;\n  /** Honour the formatting hints in cached numeric data when rendering. */\n  plotVisOnly?: boolean;\n  /** Display blanks as gap, zero, or span — Excel default is `gap`. */\n  dispBlanksAs?: 'gap' | 'zero' | 'span';\n  /** Chart-space level shape properties (overall frame). */\n  spPr?: ShapeProperties;\n  /** Chart-space level default text properties. */\n  txPr?: TextBody;\n  /** Annotations / text boxes / arrows drawn over the chart. Serialised as `xl/drawings/chartDrawingN.xml`. */\n  userShapes?: ChartDrawing;\n}\n\nexport function makeBarChart(opts: {\n  barDir?: BarDirection;\n  grouping?: GroupingType;\n  series?: BarSeries[];\n  axIds?: [number, number];\n  varyColors?: boolean;\n  gapWidth?: number;\n  overlap?: number;\n}): BarChart {\n  return {\n    kind: 'bar',\n    barDir: opts.barDir ?? 'col',\n    grouping: opts.grouping ?? 'clustered',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n    ...(opts.gapWidth !== undefined ? { gapWidth: opts.gapWidth } : {}),\n    ...(opts.overlap !== undefined ? { overlap: opts.overlap } : {}),\n  };\n}\n\nexport function makeBarSeries(opts: {\n  idx: number;\n  order?: number;\n  val: NumericRef;\n  cat?: CategoryRef;\n  tx?: BarSeries['tx'];\n}): BarSeries {\n  return {\n    idx: opts.idx,\n    order: opts.order ?? opts.idx,\n    val: opts.val,\n    ...(opts.cat ? { cat: opts.cat } : {}),\n    ...(opts.tx ? { tx: opts.tx } : {}),\n  };\n}\n\nexport function makeChartSpace(opts: {\n  plotArea: PlotArea;\n  /** Plain string is wrapped in `{ text }`; pass `ChartTitle` for full formatting. */\n  title?: string | ChartTitle;\n  legend?: Legend;\n  style?: number;\n  view3D?: View3D;\n  floor?: SurfaceFrame;\n  sideWall?: SurfaceFrame;\n  backWall?: SurfaceFrame;\n  plotVisOnly?: boolean;\n  dispBlanksAs?: ChartSpace['dispBlanksAs'];\n  spPr?: ShapeProperties;\n  txPr?: TextBody;\n}): ChartSpace {\n  const title: ChartTitle | undefined = typeof opts.title === 'string' ? { text: opts.title } : opts.title;\n  return {\n    plotArea: opts.plotArea,\n    ...(title !== undefined ? { title } : {}),\n    ...(opts.legend ? { legend: opts.legend } : {}),\n    ...(opts.style !== undefined ? { style: opts.style } : {}),\n    ...(opts.view3D ? { view3D: opts.view3D } : {}),\n    ...(opts.floor ? { floor: opts.floor } : {}),\n    ...(opts.sideWall ? { sideWall: opts.sideWall } : {}),\n    ...(opts.backWall ? { backWall: opts.backWall } : {}),\n    ...(opts.plotVisOnly !== undefined ? { plotVisOnly: opts.plotVisOnly } : {}),\n    ...(opts.dispBlanksAs !== undefined ? { dispBlanksAs: opts.dispBlanksAs } : {}),\n    ...(opts.spPr ? { spPr: opts.spPr } : {}),\n    ...(opts.txPr ? { txPr: opts.txPr } : {}),\n  };\n}\n\nexport function makeLineChart(opts: {\n  grouping?: GroupingType;\n  series?: LineSeries[];\n  axIds?: [number, number];\n  varyColors?: boolean;\n  smooth?: boolean;\n}): LineChart {\n  return {\n    kind: 'line',\n    grouping: opts.grouping ?? 'standard',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n    ...(opts.smooth !== undefined ? { smooth: opts.smooth } : {}),\n  };\n}\n\nexport function makeAreaChart(opts: {\n  grouping?: GroupingType;\n  series?: BarSeries[];\n  axIds?: [number, number];\n  varyColors?: boolean;\n}): AreaChart {\n  return {\n    kind: 'area',\n    grouping: opts.grouping ?? 'standard',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n  };\n}\n\nexport function makePieChart(opts: { series?: BarSeries[]; varyColors?: boolean }): PieChart {\n  return {\n    kind: 'pie',\n    series: opts.series ?? [],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n  };\n}\n\nexport function makeDoughnutChart(opts: {\n  series?: BarSeries[];\n  varyColors?: boolean;\n  holeSize?: number;\n  firstSliceAng?: number;\n}): DoughnutChart {\n  return {\n    kind: 'doughnut',\n    series: opts.series ?? [],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n    ...(opts.holeSize !== undefined ? { holeSize: opts.holeSize } : {}),\n    ...(opts.firstSliceAng !== undefined ? { firstSliceAng: opts.firstSliceAng } : {}),\n  };\n}\n\nexport function makeScatterChart(opts: {\n  scatterStyle?: ScatterStyle;\n  series?: ScatterSeries[];\n  axIds?: [number, number];\n  varyColors?: boolean;\n}): ScatterChart {\n  return {\n    kind: 'scatter',\n    scatterStyle: opts.scatterStyle ?? 'lineMarker',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n  };\n}\n\nexport function makeScatterSeries(opts: {\n  idx: number;\n  order?: number;\n  tx?: BarSeries['tx'];\n  xVal?: NumericRef;\n  yVal: NumericRef;\n  smooth?: boolean;\n  marker?: Marker;\n}): ScatterSeries {\n  return {\n    idx: opts.idx,\n    order: opts.order ?? opts.idx,\n    yVal: opts.yVal,\n    ...(opts.tx ? { tx: opts.tx } : {}),\n    ...(opts.xVal ? { xVal: opts.xVal } : {}),\n    ...(opts.smooth !== undefined ? { smooth: opts.smooth } : {}),\n    ...(opts.marker ? { marker: opts.marker } : {}),\n  };\n}\n\nexport function makeRadarChart(opts: {\n  radarStyle?: RadarStyle;\n  series?: BarSeries[];\n  axIds?: [number, number];\n  varyColors?: boolean;\n}): RadarChart {\n  return {\n    kind: 'radar',\n    radarStyle: opts.radarStyle ?? 'standard',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n  };\n}\n\nexport function makeBubbleChart(opts: {\n  series?: BubbleSeries[];\n  axIds?: [number, number];\n  varyColors?: boolean;\n  bubble3D?: boolean;\n  bubbleScale?: number;\n  showNegBubbles?: boolean;\n  sizeRepresents?: BubbleSizeRepresents;\n}): BubbleChart {\n  return {\n    kind: 'bubble',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n    ...(opts.bubble3D !== undefined ? { bubble3D: opts.bubble3D } : {}),\n    ...(opts.bubbleScale !== undefined ? { bubbleScale: opts.bubbleScale } : {}),\n    ...(opts.showNegBubbles !== undefined ? { showNegBubbles: opts.showNegBubbles } : {}),\n    ...(opts.sizeRepresents !== undefined ? { sizeRepresents: opts.sizeRepresents } : {}),\n  };\n}\n\nexport function makeBubbleSeries(opts: {\n  idx: number;\n  order?: number;\n  tx?: BarSeries['tx'];\n  xVal?: NumericRef;\n  yVal: NumericRef;\n  bubbleSize: NumericRef;\n  bubble3D?: boolean;\n}): BubbleSeries {\n  return {\n    idx: opts.idx,\n    order: opts.order ?? opts.idx,\n    yVal: opts.yVal,\n    bubbleSize: opts.bubbleSize,\n    ...(opts.tx ? { tx: opts.tx } : {}),\n    ...(opts.xVal ? { xVal: opts.xVal } : {}),\n    ...(opts.bubble3D !== undefined ? { bubble3D: opts.bubble3D } : {}),\n  };\n}\n\nexport function makeStockChart(opts: {\n  series?: BarSeries[];\n  axIds?: [number, number];\n  hiLowLines?: boolean | HiLowLines;\n  upDownBars?: boolean | UpDownBars;\n}): StockChart {\n  return {\n    kind: 'stock',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2],\n    ...(opts.hiLowLines !== undefined ? { hiLowLines: opts.hiLowLines } : {}),\n    ...(opts.upDownBars !== undefined ? { upDownBars: opts.upDownBars } : {}),\n  };\n}\n\nexport function makeSurfaceChart(opts: {\n  series?: BarSeries[];\n  wireframe?: boolean;\n  axIds?: [number, number, number];\n}): SurfaceChart {\n  return {\n    kind: 'surface',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2, 3],\n    ...(opts.wireframe !== undefined ? { wireframe: opts.wireframe } : {}),\n  };\n}\n\nexport function makeOfPieChart(opts: {\n  ofPieType?: OfPieType;\n  series?: BarSeries[];\n  varyColors?: boolean;\n  gapWidth?: number;\n  splitType?: SplitType;\n  splitPos?: number;\n  custSplit?: number[];\n  secondPieSize?: number;\n}): OfPieChart {\n  return {\n    kind: 'ofPie',\n    ofPieType: opts.ofPieType ?? 'pie',\n    series: opts.series ?? [],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n    ...(opts.gapWidth !== undefined ? { gapWidth: opts.gapWidth } : {}),\n    ...(opts.splitType !== undefined ? { splitType: opts.splitType } : {}),\n    ...(opts.splitPos !== undefined ? { splitPos: opts.splitPos } : {}),\n    ...(opts.custSplit ? { custSplit: opts.custSplit } : {}),\n    ...(opts.secondPieSize !== undefined ? { secondPieSize: opts.secondPieSize } : {}),\n  };\n}\n\nexport function makeBar3DChart(opts: {\n  barDir?: BarDirection;\n  grouping?: GroupingType;\n  series?: BarSeries[];\n  axIds?: [number, number, number];\n  varyColors?: boolean;\n  gapWidth?: number;\n  gapDepth?: number;\n  shape?: Bar3DChart['shape'];\n}): Bar3DChart {\n  return {\n    kind: 'bar3D',\n    barDir: opts.barDir ?? 'col',\n    grouping: opts.grouping ?? 'clustered',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2, 3],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n    ...(opts.gapWidth !== undefined ? { gapWidth: opts.gapWidth } : {}),\n    ...(opts.gapDepth !== undefined ? { gapDepth: opts.gapDepth } : {}),\n    ...(opts.shape !== undefined ? { shape: opts.shape } : {}),\n  };\n}\n\nexport function makeLine3DChart(opts: {\n  grouping?: GroupingType;\n  series?: LineSeries[];\n  axIds?: [number, number, number];\n  varyColors?: boolean;\n  gapDepth?: number;\n}): Line3DChart {\n  return {\n    kind: 'line3D',\n    grouping: opts.grouping ?? 'standard',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2, 3],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n    ...(opts.gapDepth !== undefined ? { gapDepth: opts.gapDepth } : {}),\n  };\n}\n\nexport function makePie3DChart(opts: { series?: BarSeries[]; varyColors?: boolean }): Pie3DChart {\n  return {\n    kind: 'pie3D',\n    series: opts.series ?? [],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n  };\n}\n\nexport function makeArea3DChart(opts: {\n  grouping?: GroupingType;\n  series?: BarSeries[];\n  axIds?: [number, number, number];\n  varyColors?: boolean;\n  gapDepth?: number;\n}): Area3DChart {\n  return {\n    kind: 'area3D',\n    grouping: opts.grouping ?? 'standard',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2, 3],\n    ...(opts.varyColors !== undefined ? { varyColors: opts.varyColors } : {}),\n    ...(opts.gapDepth !== undefined ? { gapDepth: opts.gapDepth } : {}),\n  };\n}\n\nexport function makeSurface3DChart(opts: {\n  series?: BarSeries[];\n  wireframe?: boolean;\n  axIds?: [number, number, number];\n}): Surface3DChart {\n  return {\n    kind: 'surface3D',\n    series: opts.series ?? [],\n    axIds: opts.axIds ?? [1, 2, 3],\n    ...(opts.wireframe !== undefined ? { wireframe: opts.wireframe } : {}),\n  };\n}\n","// User shapes (chartDrawing) — annotations on a chart.\n//\n// `xl/drawings/chartDrawingN.xml` is referenced from a `<c:chartSpace>` via\n// `<c:userShapes r:id=\"...\">`. It contains text boxes, arrows, and other shapes\n// positioned either relatively (0..1 of chart width / height) or absolutely\n// (relative anchor + EMU extent).\n\nimport type { ShapeProperties, PositiveSize2D } from '../drawing/dml/shape-properties';\nimport type { TextBody } from '../drawing/dml/text';\n\n/** `<cdr:from>` / `<cdr:to>` marker. Decimal in 0..1. */\nexport interface ChartRelativeMarker {\n  x: number;\n  y: number;\n}\n\n/** `<cdr:sp>` shape leaf (text box / arrow / preset shape with optional text). */\nexport interface ChartDrawingShape {\n  /** cNvPr id (1-based, unique per chartDrawing). */\n  id: number;\n  name?: string;\n  descr?: string;\n  hidden?: boolean;\n  /** When true, emit `<cdr:nvSpPr><cdr:cNvSpPr txBox=\"1\"/>` so Excel renders the shape as a text-box. */\n  txBox?: boolean;\n  spPr?: ShapeProperties;\n  txBody?: TextBody;\n}\n\n/** `<cdr:pic>` picture leaf. */\nexport interface ChartDrawingPicture {\n  id: number;\n  name?: string;\n  descr?: string;\n  /** rels-resolved id used by `<a:blip r:embed>`. */\n  embedRId?: string;\n  spPr?: ShapeProperties;\n}\n\nexport type UserShapeContent =\n  | { kind: 'shape'; shape: ChartDrawingShape }\n  | { kind: 'picture'; picture: ChartDrawingPicture };\n\nexport type UserShapeAnchor =\n  | {\n      kind: 'relSize';\n      from: ChartRelativeMarker;\n      to: ChartRelativeMarker;\n      content: UserShapeContent;\n    }\n  | {\n      kind: 'absSize';\n      from: ChartRelativeMarker;\n      ext: PositiveSize2D;\n      content: UserShapeContent;\n    };\n\nexport interface ChartDrawing {\n  shapes: UserShapeAnchor[];\n}\n\nexport const makeChartDrawing = (shapes: UserShapeAnchor[] = []): ChartDrawing => ({ shapes });\n\nexport const makeChartShape = (opts: {\n  id: number;\n  name?: string;\n  descr?: string;\n  hidden?: boolean;\n  txBox?: boolean;\n  spPr?: ShapeProperties;\n  txBody?: TextBody;\n}): ChartDrawingShape => ({\n  id: opts.id,\n  ...(opts.name !== undefined ? { name: opts.name } : {}),\n  ...(opts.descr !== undefined ? { descr: opts.descr } : {}),\n  ...(opts.hidden !== undefined ? { hidden: opts.hidden } : {}),\n  ...(opts.txBox !== undefined ? { txBox: opts.txBox } : {}),\n  ...(opts.spPr ? { spPr: opts.spPr } : {}),\n  ...(opts.txBody ? { txBody: opts.txBody } : {}),\n});\n\nexport const makeRelSizeAnchor = (\n  from: ChartRelativeMarker,\n  to: ChartRelativeMarker,\n  content: UserShapeContent,\n): UserShapeAnchor => ({ kind: 'relSize', from, to, content });\n\nexport const makeAbsSizeAnchor = (\n  from: ChartRelativeMarker,\n  ext: PositiveSize2D,\n  content: UserShapeContent,\n): UserShapeAnchor => ({ kind: 'absSize', from, ext, content });\n"],"mappings":";AAmrBA,SAAgB,aAAa,MAQhB;CACX,OAAO;EACL,MAAM;EACN,QAAQ,KAAK,UAAU;EACvB,UAAU,KAAK,YAAY;EAC3B,QAAQ,KAAK,UAAU,CAAC;EACxB,OAAO,KAAK,SAAS,CAAC,GAAG,CAAC;EAC1B,GAAI,KAAK,eAAe,KAAA,IAAY,EAAE,YAAY,KAAK,WAAW,IAAI,CAAC;EACvE,GAAI,KAAK,aAAa,KAAA,IAAY,EAAE,UAAU,KAAK,SAAS,IAAI,CAAC;EACjE,GAAI,KAAK,YAAY,KAAA,IAAY,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;CAChE;AACF;AAEA,SAAgB,cAAc,MAMhB;CACZ,OAAO;EACL,KAAK,KAAK;EACV,OAAO,KAAK,SAAS,KAAK;EAC1B,KAAK,KAAK;EACV,GAAI,KAAK,MAAM,EAAE,KAAK,KAAK,IAAI,IAAI,CAAC;EACpC,GAAI,KAAK,KAAK,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC;CACnC;AACF;AAEA,SAAgB,eAAe,MAchB;CACb,MAAM,QAAgC,OAAO,KAAK,UAAU,WAAW,EAAE,MAAM,KAAK,MAAM,IAAI,KAAK;CACnG,OAAO;EACL,UAAU,KAAK;EACf,GAAI,UAAU,KAAA,IAAY,EAAE,MAAM,IAAI,CAAC;EACvC,GAAI,KAAK,SAAS,EAAE,QAAQ,KAAK,OAAO,IAAI,CA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