@graphysdk/react-renderer 0.0.1-experimental.7 → 0.0.1-experimental.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import './index.css';
2
2
  import { jsx as a, jsxs as m, Fragment as C } from "react/jsx-runtime";
3
3
  import re, { clsx as ce } from "clsx";
4
- import To, { useMemo as y, useState as E, useRef as w, useEffect as T, useCallback as Ge, useContext as ee, createContext as fe, useId as we, Fragment as gn, memo as oe, useReducer as Ao } from "react";
4
+ import To, { useMemo as y, useState as E, useRef as w, useEffect as T, useCallback as Ge, useContext as ee, createContext as pe, useId as we, Fragment as gn, memo as oe, useReducer as Ao } from "react";
5
5
  import { useStore as Te } from "zustand";
6
- import { isGraphConfig as Eo, createCompiler as _o, convertSpecToInput as Po, isCompilerCachingEnabled as Ho, setCompilerCachingEnabled as Fo, COMPILER_STAGE_KEYS as yt, RESTING_HOVER_STATE as pn, HoverEngine as Bo, buildTooltipContent as No, LAYOUT_PADDING as fn, getDifferenceArrowDimensions as Io, createHeadlineItemRows as mn, LayoutCompiler as Do, BORDER_PRESET_GRADIENTS as Mo, isSafeUrl as vn, SetContentCaptionCommand as Ro, SetContentTitleCommand as Oo, SetContentSubtitleCommand as Go, computeDirectLabelsLayout as zo, buildFontString as Wo, CachedTextMeasurer as It, HeuristicTextMeasurer as $o, getColor as G, getAlpha as X, getSize as ze, toPercent as S, toViewBoxY as We, toViewBoxX as $e, createAreaPathGenerators as yn, createStableKeyGenerator as Xe, GROUP_VARIABLES as Ee, prepareAreaObservations as bn, resolveStrokeWidth as Ue, getDashArray as Ve, getLineType as Ye, isDefined as xn, getGroup as Sn, getX as ue, getYMax as Xo, getY as he, getXMax as Uo, getBarBaselineClip as Vo, getBarRectBounds as kn, createLinePathGenerator as Ln, prepareLineObservations as Cn, getStrokeWidth as Yo, buildAverageLineSymbols as jo, formatRuleValue as qo, getAngleExtent as wn, getRadiusExtent as Tn, buildPolarBarArcPath as De, getHoverGuideRectProps as Ko, getHoverGuideLineProps as Jo, buildDataLabelsContent as Zo, computeDifferenceArrow as Qo, computeFreeformArrow as ea, createSegmentYReader as ta, buildLayerYValueFormatter as na, formatLegends as ra, formatHeadline as oa, resolveHeadlinePlacement as aa } from "@graphysdk/viz-engine";
6
+ import { isGraphConfig as Eo, createCompiler as _o, convertSpecToInput as Po, isCompilerCachingEnabled as Ho, setCompilerCachingEnabled as Fo, COMPILER_STAGE_KEYS as yt, RESTING_HOVER_STATE as fn, HoverEngine as Bo, buildTooltipContent as No, LAYOUT_PADDING as pn, getDifferenceArrowDimensions as Io, createHeadlineItemRows as mn, LayoutCompiler as Do, BORDER_PRESET_GRADIENTS as Mo, isSafeUrl as vn, SetContentCaptionCommand as Ro, SetContentTitleCommand as Oo, SetContentSubtitleCommand as Go, computeDirectLabelsLayout as zo, buildFontString as Wo, CachedTextMeasurer as It, HeuristicTextMeasurer as $o, getColor as G, getAlpha as X, getSize as ze, toPercent as S, toViewBoxY as We, toViewBoxX as $e, createAreaPathGenerators as yn, createStableKeyGenerator as Xe, GROUP_VARIABLES as Ee, prepareAreaObservations as bn, resolveStrokeWidth as Ue, getDashArray as Ve, getLineType as Ye, isDefined as xn, getGroup as Sn, getX as ue, getYMax as Xo, getY as he, getXMax as Uo, getBarBaselineClip as Vo, getBarRectBounds as kn, createLinePathGenerator as Ln, prepareLineObservations as Cn, getStrokeWidth as Yo, buildAverageLineSymbols as jo, formatRuleValue as qo, getAngleExtent as wn, getRadiusExtent as Tn, buildPolarBarArcPath as De, getHoverGuideRectProps as Ko, getHoverGuideLineProps as Jo, buildDataLabelsContent as Zo, computeDifferenceArrow as Qo, computeFreeformArrow as ea, createSegmentYReader as ta, buildLayerYValueFormatter as na, formatLegends as ra, formatHeadline as oa, resolveHeadlinePlacement as aa } from "@graphysdk/viz-engine";
7
7
  import { createStore as bt } from "zustand/vanilla";
8
8
  import { useMotionValue as An, animate as ia, motion as j, useSpring as Dt, useReducedMotion as sa } from "motion/react";
9
9
  import { useShallow as U } from "zustand/react/shallow";
@@ -22,10 +22,10 @@ import { TextStyle as In, Color as Dn, FontFamily as Mn } from "@tiptap/extensio
22
22
  import { Underline as Rn } from "@tiptap/extension-underline";
23
23
  import { UndoRedo as On, Placeholder as Gn } from "@tiptap/extensions";
24
24
  import { Paragraph as ua } from "@tiptap/extension-paragraph";
25
- import { useEditorState as ha, EditorContent as ga, useEditor as pa } from "@tiptap/react";
25
+ import { useEditorState as ha, EditorContent as ga, useEditor as fa } from "@tiptap/react";
26
26
  import { Toolbar as H } from "@base-ui/react/toolbar";
27
27
  import { Tooltip as le } from "@base-ui/react/tooltip";
28
- import { createPortal as fa } from "react-dom";
28
+ import { createPortal as pa } from "react-dom";
29
29
  import { assignInlineVars as ma } from "@vanilla-extract/dynamic";
30
30
  import { Popover as F } from "@base-ui/react/popover";
31
31
  import { HexColorPicker as va, HexColorInput as ya } from "react-colorful";
@@ -33,7 +33,7 @@ import { Menu as D } from "@base-ui/react/menu";
33
33
  import { Toggle as ba } from "@base-ui/react/toggle";
34
34
  import { interpolatePath as xa } from "d3-interpolate-path";
35
35
  import { getContrast as ut } from "color2k";
36
- typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "0.0.1-experimental.7");
36
+ typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "0.0.1-experimental.8");
37
37
  const Sa = 5, ka = (e) => {
38
38
  if (process.env.NODE_ENV === "production")
39
39
  return {
@@ -104,7 +104,7 @@ function Ea(e, t) {
104
104
  const n = Eo(e) ? e.themeOverrides : void 0;
105
105
  return y(() => ({ ...t, ...n }), [t, n]);
106
106
  }
107
- const zn = fe(null), vg = ({
107
+ const zn = pe(null), vg = ({
108
108
  data: e,
109
109
  input: t,
110
110
  formattingLocale: n,
@@ -114,29 +114,29 @@ const zn = fe(null), vg = ({
114
114
  themeOverrides: l,
115
115
  children: c
116
116
  }) => {
117
- const [d] = E(() => _o()), [u] = E(() => ka(d)), h = Ea(t, l), g = y(() => ({ customPalettes: o, theme: i }), [o, i]), [p] = E(() => {
117
+ const [d] = E(() => _o()), [u] = E(() => ka(d)), h = Ea(t, l), g = y(() => ({ customPalettes: o, theme: i }), [o, i]), [f] = E(() => {
118
118
  const k = d.compile({ input: t, data: e, ctx: g });
119
119
  return u.emit({ kind: "init" }), Aa(k);
120
- }), f = w({ input: t, data: e, ctx: g });
120
+ }), p = w({ input: t, data: e, ctx: g });
121
121
  T(() => {
122
- const k = t !== f.current.input, L = e !== f.current.data, A = g !== f.current.ctx;
122
+ const k = t !== p.current.input, L = e !== p.current.data, A = g !== p.current.ctx;
123
123
  if (!k && !L && !A) return;
124
- const I = p.getState(), _ = k || A ? d.compile({ input: t, data: e, ctx: g }) : d.recompile({ spec: I.compiled.spec, data: e });
125
- f.current = { input: t, data: e, ctx: g }, I.setCompiled(_), u.emit({ kind: k ? "input" : "data" });
126
- }, [t, e, g, d, p, u]);
124
+ const I = f.getState(), _ = k || A ? d.compile({ input: t, data: e, ctx: g }) : d.recompile({ spec: I.compiled.spec, data: e });
125
+ p.current = { input: t, data: e, ctx: g }, I.setCompiled(_), u.emit({ kind: k ? "input" : "data" });
126
+ }, [t, e, g, d, f, u]);
127
127
  const v = Ge(
128
128
  (k) => {
129
- const L = p.getState(), A = k.apply(L.compiled.spec);
129
+ const L = f.getState(), A = k.apply(L.compiled.spec);
130
130
  if (!A) return;
131
131
  const I = d.recompile({ spec: A.spec });
132
132
  if (L.setCompiled(I), u.emit({ kind: "command", command: k }), !r) return;
133
133
  const _ = Po(A.spec);
134
- f.current = { input: _, data: f.current.data, ctx: f.current.ctx }, r(_);
134
+ p.current = { input: _, data: p.current.data, ctx: p.current.ctx }, r(_);
135
135
  },
136
- [r, d, u, p]
136
+ [r, d, u, f]
137
137
  ), x = y(
138
- () => ({ store: p, dispatch: v, formattingLocale: n, compileBus: u, theme: i, themeOverrides: h }),
139
- [p, v, n, u, i, h]
138
+ () => ({ store: f, dispatch: v, formattingLocale: n, compileBus: u, theme: i, themeOverrides: h }),
139
+ [f, v, n, u, i, h]
140
140
  );
141
141
  return /* @__PURE__ */ a(zn.Provider, { value: x, children: c });
142
142
  }, me = () => {
@@ -157,7 +157,7 @@ const yg = ({ width: e = 380, style: t, className: n } = {}) => {
157
157
  const { recordCompile: v } = o.getState(), x = r.getLastTrigger(), k = r.getLastCompile();
158
158
  return x && k && v(x, k), r.subscribe(v);
159
159
  }, [o, r]);
160
- const u = Te(o, (v) => v.lastCompile), h = Te(o, (v) => v.history), g = r.getCacheStats(), p = u === null && h.length === 0, f = () => {
160
+ const u = Te(o, (v) => v.lastCompile), h = Te(o, (v) => v.history), g = r.getCacheStats(), f = u === null && h.length === 0, p = () => {
161
161
  d((v) => {
162
162
  const x = !v;
163
163
  return Fo(x), x;
@@ -167,7 +167,7 @@ const yg = ({ width: e = 380, style: t, className: n } = {}) => {
167
167
  /* @__PURE__ */ m("div", { className: _a, children: [
168
168
  /* @__PURE__ */ m("div", { children: [
169
169
  /* @__PURE__ */ a("div", { className: Pa, children: "compile cache" }),
170
- /* @__PURE__ */ a("div", { className: za, children: p ? "production: stats disabled" : u ? `last: ${u.label} · ${Xn(u.durationMs)}` : "awaiting first compile…" })
170
+ /* @__PURE__ */ a("div", { className: za, children: f ? "production: stats disabled" : u ? `last: ${u.label} · ${Xn(u.durationMs)}` : "awaiting first compile…" })
171
171
  ] }),
172
172
  /* @__PURE__ */ a("button", { type: "button", onClick: () => l((v) => !v), className: Wa, children: i ? "▾" : "▴" })
173
173
  ] }),
@@ -176,7 +176,7 @@ const yg = ({ width: e = 380, style: t, className: n } = {}) => {
176
176
  "button",
177
177
  {
178
178
  type: "button",
179
- onClick: f,
179
+ onClick: p,
180
180
  className: c ? Mt.enabled : Mt.disabled,
181
181
  "aria-pressed": c,
182
182
  children: [
@@ -187,7 +187,7 @@ const yg = ({ width: e = 380, style: t, className: n } = {}) => {
187
187
  ),
188
188
  /* @__PURE__ */ a("span", { className: $a, children: "next compile reflects this toggle" })
189
189
  ] }),
190
- !i && !p && /* @__PURE__ */ m(C, { children: [
190
+ !i && !f && /* @__PURE__ */ m(C, { children: [
191
191
  /* @__PURE__ */ a(Va, { delta: u?.stages, cumulative: g }),
192
192
  /* @__PURE__ */ a(Ya, { entries: h })
193
193
  ] })
@@ -236,7 +236,7 @@ const yg = ({ width: e = 380, style: t, className: n } = {}) => {
236
236
  t(e[r]) && (n += 1);
237
237
  return n;
238
238
  }, Xn = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Ka = () => bt((e) => ({
239
- hover: pn,
239
+ hover: fn,
240
240
  setHoverState: (t) => e((n) => n.hover === t ? n : { hover: t })
241
241
  })), Ja = (e, t) => {
242
242
  const n = y(() => ({ layers: e, coordSystem: t }), [e, t]), r = w(null);
@@ -249,7 +249,7 @@ const yg = ({ width: e = 380, style: t, className: n } = {}) => {
249
249
  }
250
250
  o.update(n);
251
251
  }, [o, n]), o;
252
- }, Un = fe(null), Za = ({ children: e }) => {
252
+ }, Un = pe(null), Za = ({ children: e }) => {
253
253
  const { layers: t, coordSystem: n } = B(
254
254
  U((c) => ({ layers: c.layers, coordSystem: c.coordSystem }))
255
255
  ), r = Ja(t, n), [o] = E(() => Ka()), i = w(null), l = w(null);
@@ -333,7 +333,7 @@ const Ot = 2, ei = 12, ti = 12, Gt = 1, zt = 2, ni = 4, qe = ({
333
333
  }
334
334
  const n = t / (ni - 1);
335
335
  return { x1: 0, x2: t, dashArray: `1 ${n}`, linecap: "round" };
336
- }, Vn = Object.freeze({}), Ct = fe(Vn), ai = ({ slots: e, children: t }) => /* @__PURE__ */ a(Ct.Provider, { value: e ?? Vn, children: t });
336
+ }, Vn = Object.freeze({}), Ct = pe(Vn), ai = ({ slots: e, children: t }) => /* @__PURE__ */ a(Ct.Provider, { value: e ?? Vn, children: t });
337
337
  function Q(e, t) {
338
338
  const n = ee(Ct)[e];
339
339
  return n === void 0 ? t : typeof n == "object" && si(n) ? n.render : n;
@@ -355,7 +355,7 @@ function wt(e) {
355
355
  const { store: t } = je();
356
356
  return Te(t, e);
357
357
  }
358
- var li = "_19519k80", ci = "_19519k81", di = "_19519k82", ui = "_19519k83", hi = "_19519k85", gi = "_19519k86", pi = "_19519k87", fi = "_19519k88", mi = "_19519k89";
358
+ var li = "_19519k80", ci = "_19519k81", di = "_19519k82", ui = "_19519k83", hi = "_19519k85", gi = "_19519k86", fi = "_19519k87", pi = "_19519k88", mi = "_19519k89";
359
359
  const vi = (e) => {
360
360
  const { overlayRef: t } = je(), n = w(null), [r, o] = E(!1), i = w(e);
361
361
  return i.current = e, T(() => {
@@ -382,38 +382,38 @@ const vi = (e) => {
382
382
  toJSON: () => ({})
383
383
  }, Si = () => {
384
384
  const e = B(
385
- U((f) => ({
386
- layers: f.layers,
387
- coordSystem: f.coordSystem,
388
- scales: f.scales,
389
- guides: f.guides,
390
- numberFormat: f.config.numberFormat,
391
- parsingLocale: f.config.parsingLocale
385
+ U((p) => ({
386
+ layers: p.layers,
387
+ coordSystem: p.coordSystem,
388
+ scales: p.scales,
389
+ guides: p.guides,
390
+ numberFormat: p.config.numberFormat,
391
+ parsingLocale: p.config.parsingLocale
392
392
  }))
393
- ), { formattingLocale: t } = me(), n = wt((f) => f.hover), r = Q("Tooltip", ki), o = w(() => {
393
+ ), { formattingLocale: t } = me(), n = wt((p) => p.hover), r = Q("Tooltip", ki), o = w(() => {
394
394
  }), { cursorRef: i, isInside: l } = vi(() => o.current()), c = y(
395
395
  () => No({ ...e, hover: n, formattingLocale: t }),
396
396
  [e, n, t]
397
397
  ), d = c !== null && l, u = y(
398
398
  () => ({
399
399
  getBoundingClientRect: () => {
400
- const f = i.current;
401
- return f === null ? xi : Li(f);
400
+ const p = i.current;
401
+ return p === null ? xi : Li(p);
402
402
  }
403
403
  }),
404
404
  [i]
405
- ), { refs: h, floatingStyles: g, update: p } = xt({
405
+ ), { refs: h, floatingStyles: g, update: f } = xt({
406
406
  open: d,
407
407
  placement: "right",
408
408
  middleware: [St(yi), kt(), Lt({ padding: bi })],
409
409
  elements: { reference: u }
410
410
  });
411
- return o.current = p, d ? /* @__PURE__ */ a(
411
+ return o.current = f, d ? /* @__PURE__ */ a(
412
412
  "div",
413
413
  {
414
414
  ref: h.setFloating,
415
415
  role: "tooltip",
416
- className: fi,
416
+ className: pi,
417
417
  style: g,
418
418
  "data-testid": "chart-tooltip",
419
419
  children: /* @__PURE__ */ a(r, { content: c, isVisible: d })
@@ -435,7 +435,7 @@ const vi = (e) => {
435
435
  }), Ci = ({ row: e, shouldHighlight: t }) => /* @__PURE__ */ m("div", { className: re(di, { [ui]: t }), "data-testid": "chart-tooltip-row", children: [
436
436
  e.swatchColor === null ? /* @__PURE__ */ a("span", { className: hi, "aria-hidden": !0 }) : /* @__PURE__ */ a(qe, { shape: e.swatchShape, color: e.swatchColor, lineType: e.swatchLineType }),
437
437
  /* @__PURE__ */ a("span", { className: gi, children: e.label }),
438
- /* @__PURE__ */ a("span", { className: pi, children: e.value })
438
+ /* @__PURE__ */ a("span", { className: fi, children: e.value })
439
439
  ] });
440
440
  var Yn = ["canvasDefault", "canvasBlue", "canvasCyan", "canvasGreen", "canvasYellow", "canvasOrange", "canvasRed", "canvasPink", "canvasPurple", "canvasGray", "canvasInverse"], s = { white: "var(--graphy-white)", black: "var(--graphy-black)", transparent: "var(--graphy-transparent)", grey100: "var(--graphy-grey-100)", grey95: "var(--graphy-grey-95)", grey90: "var(--graphy-grey-90)", grey85: "var(--graphy-grey-85)", grey80: "var(--graphy-grey-80)", grey75: "var(--graphy-grey-75)", grey70: "var(--graphy-grey-70)", grey60: "var(--graphy-grey-60)", grey50: "var(--graphy-grey-50)", grey0: "var(--graphy-grey-0)", greyGradient80: "var(--graphy-grey-gradient-80)", green60: "var(--graphy-green-60)", green50: "var(--graphy-green-50)", red60: "var(--graphy-red-60)", red50: "var(--graphy-red-50)", amber70: "var(--graphy-amber-70)", amber50: "var(--graphy-amber-50)", amber40: "var(--graphy-amber-40)", amber30: "var(--graphy-amber-30)", blue80: "var(--graphy-blue-80)", blue60: "var(--graphy-blue-60)", purple50: "var(--graphy-purple-50)", purple30: "var(--graphy-purple-30)", brand: "var(--graphy-brand)", success: "var(--graphy-success)", warning: "var(--graphy-warning)", alert: "var(--graphy-alert)", textPrimary: "var(--graphy-text-primary)", textSecondary: "var(--graphy-text-secondary)", textDisabled: "var(--graphy-text-disabled)", iconPrimary: "var(--graphy-icon-primary)", iconSecondary: "var(--graphy-icon-secondary)", iconStickerBackground: "var(--graphy-icon-sticker-background)", border100: "var(--graphy-border-100)", border50: "var(--graphy-border-50)", border10: "var(--graphy-border-10)", sunkenBackground: "var(--graphy-sunken-background)", defaultBackground: "var(--graphy-default-background)", raisedBackground: "var(--graphy-raised-background)", overlayBackground: "var(--graphy-overlay-background)", overlayBorderGradient: "var(--graphy-overlay-border-gradient)", graphBackground: "var(--graphy-graph-background)", gridLineColor: "var(--graphy-grid-line-color)", originLineColor: "var(--graphy-origin-line-color)", targetLineColor: "var(--graphy-target-line-color)", targetLineMarkerColor: "var(--graphy-target-line-marker-color)", targetLineLabelTextColor: "var(--graphy-target-line-label-text-color)", legendBackground: "var(--graphy-legend-background)", legendBorderColor: "var(--graphy-legend-border-color)", legendFocusOutlineColor: "var(--graphy-legend-focus-outline-color)", legendTextColor: "var(--graphy-legend-text-color)", dimmedSeriesLabelTextColor: "var(--graphy-dimmed-series-label-text-color)", dimmedSeriesLabelLineColor: "var(--graphy-dimmed-series-label-line-color)", trendNegativeColor: "var(--graphy-trend-negative-color)", trendPositiveColor: "var(--graphy-trend-positive-color)", trendNeutralColor: "var(--graphy-trend-neutral-color)", defaultAnnotationArrowStroke: "var(--graphy-default-annotation-arrow-stroke)", defaultAnnotationShapeStroke: "var(--graphy-default-annotation-shape-stroke)", defaultAnnotationShapeFill: "var(--graphy-default-annotation-shape-fill)", arrowAnnotationStickerOutlineColor: "var(--graphy-arrow-annotation-sticker-outline-color)", arrowAnnotationStickerOutlineColorInverse: "var(--graphy-arrow-annotation-sticker-outline-color-inverse)", annotationFrameBorderColor: "var(--graphy-annotation-frame-border-color)", annotationMenuTriggerIconColor: "var(--graphy-annotation-menu-trigger-icon-color)", heatmapEmptyTileBackground: "var(--graphy-heatmap-empty-tile-background)", dataLabelOutsideBackground: "var(--graphy-data-label-outside-background)", graphPadding: "var(--graphy-graph-padding)", gridLineWidth: "var(--graphy-grid-line-width)", gridLineDash: "var(--graphy-grid-line-dash)", tooltipBorderRadius: "var(--graphy-tooltip-border-radius)", tooltipBorderWidth: "var(--graphy-tooltip-border-width)", tooltipPaddingBlock: "var(--graphy-tooltip-padding-block)", tooltipPaddingInline: "var(--graphy-tooltip-padding-inline)", tooltipRowGap: "var(--graphy-tooltip-row-gap)", tooltipShadow: "var(--graphy-tooltip-shadow)", tickLabelOffset: "var(--graphy-tick-label-offset)", legendItemGap: "var(--graphy-legend-item-gap)", legendSwatchGap: "var(--graphy-legend-swatch-gap)", legendSwatchWidth: "var(--graphy-legend-swatch-width)", legendSwatchHeight: "var(--graphy-legend-swatch-height)", legendPillPaddingInline: "var(--graphy-legend-pill-padding-inline)", legendPillPaddingBlock: "var(--graphy-legend-pill-padding-block)", legendPillBorderWidth: "var(--graphy-legend-pill-border-width)", headlineRowGap: "var(--graphy-headline-row-gap)", headlineItemGap: "var(--graphy-headline-item-gap)", canvasDefault: "var(--graphy-canvas-default)", canvasBlue: "var(--graphy-canvas-blue)", canvasCyan: "var(--graphy-canvas-cyan)", canvasGreen: "var(--graphy-canvas-green)", canvasYellow: "var(--graphy-canvas-yellow)", canvasOrange: "var(--graphy-canvas-orange)", canvasRed: "var(--graphy-canvas-red)", canvasPink: "var(--graphy-canvas-pink)", canvasPurple: "var(--graphy-canvas-purple)", canvasGray: "var(--graphy-canvas-gray)", canvasInverse: "var(--graphy-canvas-inverse)", elevationXs: "var(--graphy-elevation-xs)", elevationSm: "var(--graphy-elevation-sm)", elevationMd: "var(--graphy-elevation-md)", elevationLg: "var(--graphy-elevation-lg)", radiiXs: "var(--graphy-radii-xs)", radiiSm: "var(--graphy-radii-sm)", radiiMd: "var(--graphy-radii-md)", radiiLg: "var(--graphy-radii-lg)", spaceXxs: "var(--graphy-space-xxs)", spaceXs: "var(--graphy-space-xs)", spaceSm: "var(--graphy-space-sm)", spaceMd: "var(--graphy-space-md)", spaceLg: "var(--graphy-space-lg)", spaceXl: "var(--graphy-space-xl)", zIndexToolbar: "var(--graphy-z-index-toolbar)", zIndexToolbarTooltip: "var(--graphy-z-index-toolbar-tooltip)", zIndexToolbarPopover: "var(--graphy-z-index-toolbar-popover)", toolbarBackgroundColor: "var(--graphy-toolbar-background-color)", toolbarButtonBackgroundColor: "var(--graphy-toolbar-button-background-color)", toolbarButtonBackgroundColorHovered: "var(--graphy-toolbar-button-background-color-hovered)", toolbarButtonBackgroundColorSelected: "var(--graphy-toolbar-button-background-color-selected)", toolbarSeparatorColor: "var(--graphy-toolbar-separator-color)", tooltipBackground: "var(--graphy-tooltip-background)", tooltipBorderColor: "var(--graphy-tooltip-border-color)", tooltipHeadingTextColor: "var(--graphy-tooltip-heading-text-color)", tooltipLabelTextColor: "var(--graphy-tooltip-label-text-color)", tooltipValueTextColor: "var(--graphy-tooltip-value-text-color)", tooltipPrimaryRowColor: "var(--graphy-tooltip-primary-row-color)", hoverGuideLineColor: "var(--graphy-hover-guide-line-color)", hoverGuideFillColor: "var(--graphy-hover-guide-fill-color)", hoveredBarBorderColor: "var(--graphy-hovered-bar-border-color)", hoveredPointRingColor: "var(--graphy-hovered-point-ring-color)", pointStrokeColor: "var(--graphy-point-stroke-color)", stackedBarHoverBorderColor: "var(--graphy-stacked-bar-hover-border-color)", fontFamilyDefault: "var(--graphy-font-family-default)", fontFamilyHeading: "var(--graphy-font-family-heading)", fontWeightRegular: "var(--graphy-font-weight-regular)", fontWeightMedium: "var(--graphy-font-weight-medium)", fontWeightSemibold: "var(--graphy-font-weight-semibold)", fontWeightBold: "var(--graphy-font-weight-bold)", fontWeightExtraBold: "var(--graphy-font-weight-extra-bold)", fontWeightBlack: "var(--graphy-font-weight-black)", textScale: "var(--graphy-text-scale)", fontSizeXxs: "var(--graphy-font-size-xxs)", fontSizeXs: "var(--graphy-font-size-xs)", fontSizeSm: "var(--graphy-font-size-sm)", fontSizeMd: "var(--graphy-font-size-md)", fontSizeLg: "var(--graphy-font-size-lg)", fontSizeXl: "var(--graphy-font-size-xl)", fontLineHeightXxs: "var(--graphy-font-line-height-xxs)", fontLineHeightXs: "var(--graphy-font-line-height-xs)", fontLineHeightSm: "var(--graphy-font-line-height-sm)", fontLineHeightMd: "var(--graphy-font-line-height-md)", fontLineHeightLg: "var(--graphy-font-line-height-lg)", fontLineHeightXl: "var(--graphy-font-line-height-xl)", fontSizeEditorBody: "var(--graphy-font-size-editor-body)", fontSizeHeadingSm: "var(--graphy-font-size-heading-sm)", fontSizeHeadingMd: "var(--graphy-font-size-heading-md)", fontSizeHeadingLg: "var(--graphy-font-size-heading-lg)", fontLineHeightEditorBody: "var(--graphy-font-line-height-editor-body)", fontLineHeightHeadingSm: "var(--graphy-font-line-height-heading-sm)", fontLineHeightHeadingMd: "var(--graphy-font-line-height-heading-md)", fontLineHeightHeadingLg: "var(--graphy-font-line-height-heading-lg)", fontTickLabel: "var(--graphy-font-tick-label)", fontAxisLabel: "var(--graphy-font-axis-label)", fontDataLabel: "var(--graphy-font-data-label)", fontStackTotal: "var(--graphy-font-stack-total)", fontLegendLabel: "var(--graphy-font-legend-label)", fontSeriesLabel: "var(--graphy-font-series-label)", fontTooltipLabel: "var(--graphy-font-tooltip-label)", fontTooltipHeading: "var(--graphy-font-tooltip-heading)", fontTooltipFooter: "var(--graphy-font-tooltip-footer)", fontJumboTooltipLabel: "var(--graphy-font-jumbo-tooltip-label)", fontJumboTooltip: "var(--graphy-font-jumbo-tooltip)", fontMiniTooltipLabel: "var(--graphy-font-mini-tooltip-label)", fontMiniTooltipFooter: "var(--graphy-font-mini-tooltip-footer)", fontTooltipCaption: "var(--graphy-font-tooltip-caption)", fontTooltipCaptionSmall: "var(--graphy-font-tooltip-caption-small)", fontTrendTag: "var(--graphy-font-trend-tag)", fontTrendTagSmall: "var(--graphy-font-trend-tag-small)", fontGoalLineLabel: "var(--graphy-font-goal-line-label)", fontPieLabel: "var(--graphy-font-pie-label)", fontPieChartTotal: "var(--graphy-font-pie-chart-total)", fontDifferenceArrowSmall: "var(--graphy-font-difference-arrow-small)", fontDifferenceArrowMedium: "var(--graphy-font-difference-arrow-medium)", fontDifferenceArrowLarge: "var(--graphy-font-difference-arrow-large)", fontButton: "var(--graphy-font-button)", fontInput: "var(--graphy-font-input)", fontInputLabel: "var(--graphy-font-input-label)", fontSelectLabel: "var(--graphy-font-select-label)", fontSelectDescription: "var(--graphy-font-select-description)", fontColorSelectLabel: "var(--graphy-font-color-select-label)", fontMenuTitle: "var(--graphy-font-menu-title)", fontMenuGroupTitle: "var(--graphy-font-menu-group-title)", fontMenuItemLabel: "var(--graphy-font-menu-item-label)", fontMenuItemLabelSecondary: "var(--graphy-font-menu-item-label-secondary)", fontUITooltip: "var(--graphy-font-uitooltip)", fontUITooltipSecondary: "var(--graphy-font-uitooltip-secondary)", fontErrorBoundaryTitle: "var(--graphy-font-error-boundary-title)", fontErrorBoundaryMessage: "var(--graphy-font-error-boundary-message)", fontTableCell: "var(--graphy-font-table-cell)", fontTableHeaderCell: "var(--graphy-font-table-header-cell)", fontSourceLabel: "var(--graphy-font-source-label)", fontSourceLink: "var(--graphy-font-source-link)", fontTextEditorH1: "var(--graphy-font-text-editor-h1)", fontTextEditorH2: "var(--graphy-font-text-editor-h2)", fontTextEditorH3: "var(--graphy-font-text-editor-h3)", fontTextEditorH6: "var(--graphy-font-text-editor-h6)", fontTextEditorBody: "var(--graphy-font-text-editor-body)", fontTextEditorLink: "var(--graphy-font-text-editor-link)", fontHighlightModeTitle: "var(--graphy-font-highlight-mode-title)", fontHighlightModeSubtitle: "var(--graphy-font-highlight-mode-subtitle)" };
441
441
  const O = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
@@ -579,8 +579,8 @@ const O = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
579
579
  small: 1,
580
580
  medium: 1,
581
581
  large: 1.2
582
- }, _i = O, Jn = M.sm, Zn = 2, Qn = 24, er = 12, tr = 10, nr = 8, rr = 8, or = 8, ar = 2, ir = 1, sr = 2, lr = 4, cr = N.sm, dr = M.sm, ur = O, Pi = sr * lr, hr = !1, Be = 6, gr = 10, P = (e, t) => `color-mix(in srgb, transparent, ${e} ${t * 100}%)`, Ke = (e, t) => `hsl(from ${e} h s calc(l * ${1 - t}))`, pr = (e, t) => `hsl(from ${e} h s calc(l * ${1 + t}))`, ht = (e, t, n) => `color-mix(in srgb, ${e}, ${t} ${n * 100}%)`, Hi = (e) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e), Fi = (e) => e.length === 0 ? !1 : typeof CSS < "u" && typeof CSS.supports == "function" ? CSS.supports("color", e) : /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e), W = (e) => `${e}px`, fr = {
583
- graphPadding: W(fn),
582
+ }, _i = O, Jn = M.sm, Zn = 2, Qn = 24, er = 12, tr = 10, nr = 8, rr = 8, or = 8, ar = 2, ir = 1, sr = 2, lr = 4, cr = N.sm, dr = M.sm, ur = O, Pi = sr * lr, hr = !1, Be = 6, gr = 10, P = (e, t) => `color-mix(in srgb, transparent, ${e} ${t * 100}%)`, Ke = (e, t) => `hsl(from ${e} h s calc(l * ${1 - t}))`, fr = (e, t) => `hsl(from ${e} h s calc(l * ${1 + t}))`, ht = (e, t, n) => `color-mix(in srgb, ${e}, ${t} ${n * 100}%)`, Hi = (e) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e), Fi = (e) => e.length === 0 ? !1 : typeof CSS < "u" && typeof CSS.supports == "function" ? CSS.supports("color", e) : /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e), W = (e) => `${e}px`, pr = {
583
+ graphPadding: W(pn),
584
584
  gridLineWidth: "1px",
585
585
  gridLineDash: "2 3",
586
586
  tooltipBorderRadius: "6px",
@@ -738,7 +738,7 @@ const O = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
738
738
  ...yr,
739
739
  ...Di,
740
740
  ...Mi,
741
- ...fr,
741
+ ...pr,
742
742
  ...jn,
743
743
  ...qn,
744
744
  ...Kn
@@ -854,7 +854,7 @@ const O = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
854
854
  ...yr,
855
855
  ...zi,
856
856
  ...Wi,
857
- ...fr,
857
+ ...pr,
858
858
  ...jn,
859
859
  ...qn,
860
860
  ...Kn
@@ -864,7 +864,7 @@ const O = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
864
864
  }), Sr = (e, t) => {
865
865
  const n = xr(e, t), r = $(n.legendPillPaddingInline, or), o = $(n.legendPillPaddingBlock, ar), i = $(n.legendPillBorderWidth, ir);
866
866
  return {
867
- graphPadding: $(n.graphPadding, fn),
867
+ graphPadding: $(n.graphPadding, pn),
868
868
  tickLabelOffset: $(n.tickLabelOffset, gr),
869
869
  legendSwatchWidth: $(n.legendSwatchWidth, tr),
870
870
  legendSwatchHeight: $(n.legendSwatchHeight, er),
@@ -885,7 +885,7 @@ function $(e, t) {
885
885
  const r = Number.parseFloat(n);
886
886
  return Number.isFinite(r) ? r : t;
887
887
  }
888
- const kr = fe(Xi), Ui = ({ metrics: e, children: t }) => /* @__PURE__ */ a(kr.Provider, { value: e, children: t }), Tt = () => ee(kr), At = N.sm, Lr = O, Cr = 10, te = (e, t) => e * Cr * t, Vi = (e, t, n) => {
888
+ const kr = pe(Xi), Ui = ({ metrics: e, children: t }) => /* @__PURE__ */ a(kr.Provider, { value: e, children: t }), Tt = () => ee(kr), At = N.sm, Lr = O, Cr = 10, te = (e, t) => e * Cr * t, Vi = (e, t, n) => {
889
889
  const { tickLabelOffset: r } = n;
890
890
  return (o) => {
891
891
  const i = o.position === "top" || o.position === "bottom", l = o.ticks.map(
@@ -971,26 +971,26 @@ const kr = fe(Xi), Ui = ({ metrics: e, children: t }) => /* @__PURE__ */ a(kr.Pr
971
971
  return o.current = r, y(() => {
972
972
  if (!e) return null;
973
973
  const i = Vi(e, t, n), l = Yi(t), c = es(e, t, n), d = Zi(e, t, n), u = Ki(e, t, n), h = {
974
- measureText: (g, p) => e.measureText(g, p),
974
+ measureText: (g, f) => e.measureText(g, f),
975
975
  textScale: t
976
976
  };
977
977
  return {
978
978
  measureAxis: (g) => {
979
979
  if (as(g)) return 0;
980
- const p = o.current.measureAxis;
981
- return p ? p(g, h) : i(g);
980
+ const f = o.current.measureAxis;
981
+ return f ? f(g, h) : i(g);
982
982
  },
983
983
  measureAxisLabel: (g) => {
984
- const p = o.current.measureAxisLabel;
985
- return p ? p(g, h) : l();
984
+ const f = o.current.measureAxisLabel;
985
+ return f ? f(g, h) : l();
986
986
  },
987
987
  measureLegend: (g) => {
988
988
  if (is(g)) return 0;
989
- const p = o.current.measureLegend;
990
- return p ? p(g, h) : c(g);
989
+ const f = o.current.measureLegend;
990
+ return f ? f(g, h) : c(g);
991
991
  },
992
- measureHeadline: (g, p) => (o.current.measureHeadline ?? d)(g, p),
993
- measureHeadlineItemWidths: (g, p) => (o.current.measureHeadlineItemWidths ?? u)(g, p),
992
+ measureHeadline: (g, f) => (o.current.measureHeadline ?? d)(g, f),
993
+ measureHeadlineItemWidths: (g, f) => (o.current.measureHeadlineItemWidths ?? u)(g, f),
994
994
  measureTickLabel: ts(e, t),
995
995
  measureDifferenceArrowLabel: ji(e, t)
996
996
  };
@@ -1008,7 +1008,7 @@ const kr = fe(Xi), Ui = ({ metrics: e, children: t }) => /* @__PURE__ */ a(kr.Pr
1008
1008
  annotations: u,
1009
1009
  coordSystem: h,
1010
1010
  textScale: g,
1011
- graphPadding: p
1011
+ graphPadding: f
1012
1012
  }) => y(() => e ? new Do(e).compile({
1013
1013
  axes: t,
1014
1014
  numberFormat: n,
@@ -1021,7 +1021,7 @@ const kr = fe(Xi), Ui = ({ metrics: e, children: t }) => /* @__PURE__ */ a(kr.Pr
1021
1021
  annotations: u,
1022
1022
  coordSystem: h,
1023
1023
  textScale: g,
1024
- padding: p
1024
+ padding: f
1025
1025
  }) : null, [
1026
1026
  t,
1027
1027
  n,
@@ -1034,7 +1034,7 @@ const kr = fe(Xi), Ui = ({ metrics: e, children: t }) => /* @__PURE__ */ a(kr.Pr
1034
1034
  u,
1035
1035
  h,
1036
1036
  g,
1037
- p,
1037
+ f,
1038
1038
  e
1039
1039
  ]), as = (e) => !e.isVisible || e.ticks.length === 0, is = (e) => e.items.length === 0, $t = "data-variant", _r = ua.extend({
1040
1040
  addAttributes() {
@@ -1120,23 +1120,23 @@ const kr = fe(Xi), Ui = ({ metrics: e, children: t }) => /* @__PURE__ */ a(kr.Pr
1120
1120
  case "solid":
1121
1121
  return e.color;
1122
1122
  case "tinted":
1123
- return fs(e.color, t);
1123
+ return ps(e.color, t);
1124
1124
  case "gradient":
1125
1125
  return ms(e.color, t);
1126
1126
  case "preset":
1127
1127
  return Mo[e.preset];
1128
1128
  }
1129
- }, gs = (e) => e.type === "none" ? 0 : e.width, ps = (e, t, n) => {
1129
+ }, gs = (e) => e.type === "none" ? 0 : e.width, fs = (e, t, n) => {
1130
1130
  if (e.type === "solid")
1131
1131
  return e.color;
1132
1132
  if (e.type === "tinted")
1133
1133
  return ht(n, e.color, us[t]);
1134
- }, fs = (e, t) => t === "dark" ? Ke(e, Me) : pr(e, Me), ms = (e, t, n = 90) => {
1135
- const r = e, o = t === "dark" ? Ke(e, Me) : pr(e, Me);
1134
+ }, ps = (e, t) => t === "dark" ? Ke(e, Me) : fr(e, Me), ms = (e, t, n = 90) => {
1135
+ const r = e, o = t === "dark" ? Ke(e, Me) : fr(e, Me);
1136
1136
  return `linear-gradient(${n}deg, ${r} 0%, ${o} 100%)`;
1137
1137
  };
1138
1138
  var vs = "bow4tg0", ys = "bow4tg1", bs = "bow4tg2", xs = "bow4tg3", Ss = "_1ii3bsb0", ks = "_1ii3bsb1";
1139
- const Et = fe(null), _t = () => {
1139
+ const Et = pe(null), _t = () => {
1140
1140
  const e = ee(Et);
1141
1141
  if (!e) throw new Error("useThemeContext must be used inside a <ThemeProvider>.");
1142
1142
  return e;
@@ -1147,7 +1147,7 @@ const Et = fe(null), _t = () => {
1147
1147
  };
1148
1148
  for (const [u, h] of Object.entries(t))
1149
1149
  c[s[u]] = h;
1150
- const d = ps(n.background, e, o.graphBackground);
1150
+ const d = fs(n.background, e, o.graphBackground);
1151
1151
  return d !== void 0 && (c[s.graphBackground] = d), ma(c);
1152
1152
  }, [n.textScale, n.background, e, o.graphBackground, t]), l = y(
1153
1153
  () => ({
@@ -1163,7 +1163,7 @@ const Et = fe(null), _t = () => {
1163
1163
  const r = ee(Et), o = r ? re(r.themeClass, ys) : void 0, i = r ? { ...r.inlineVarsStyle, ...n } : n;
1164
1164
  return /* @__PURE__ */ a("div", { className: re(o, t), style: i, children: e });
1165
1165
  }, Cs = "graphy_root", ie = () => typeof document > "u" ? null : document.getElementById(Cs) ?? document.body;
1166
- var ws = "yp3g0k0", Ts = "yp3g0k1", Pr = "yp3g0k3", As = "yp3g0k4", Hr = "yp3g0k5", pt = "yp3g0k6", Es = "yp3g0k7", _s = "yp3g0k8", Fr = "yp3g0k9", Ps = "yp3g0ka", Hs = "yp3g0kb", Fs = "yp3g0kc", Bs = "yp3g0kd", Ns = "yp3g0ke";
1166
+ var ws = "yp3g0k0", Ts = "yp3g0k1", Pr = "yp3g0k3", As = "yp3g0k4", Hr = "yp3g0k5", ft = "yp3g0k6", Es = "yp3g0k7", _s = "yp3g0k8", Fr = "yp3g0k9", Ps = "yp3g0ka", Hs = "yp3g0kb", Fs = "yp3g0kc", Bs = "yp3g0kd", Ns = "yp3g0ke";
1167
1167
  const Is = Yn.map((e) => s[e]), Ds = Object.fromEntries(
1168
1168
  Yn.map((e) => [s[e], e])
1169
1169
  ), Ms = ({ editor: e, currentColor: t, isOpen: n, onOpenChange: r }) => {
@@ -1209,7 +1209,7 @@ const Is = Yn.map((e) => s[e]), Ds = Object.fromEntries(
1209
1209
  ] }) }) }) })
1210
1210
  ] });
1211
1211
  }, Xt = ({ title: e, colors: t, currentColor: n, onPick: r }) => /* @__PURE__ */ m("div", { className: Hr, children: [
1212
- /* @__PURE__ */ a("div", { className: pt, children: e }),
1212
+ /* @__PURE__ */ a("div", { className: ft, children: e }),
1213
1213
  /* @__PURE__ */ a("div", { className: Es, children: t.map((o) => /* @__PURE__ */ a(
1214
1214
  "button",
1215
1215
  {
@@ -1227,7 +1227,7 @@ const Is = Yn.map((e) => s[e]), Ds = Object.fromEntries(
1227
1227
  const n = J(), [r, o] = E(!1), i = Fi(e) ? e : "#000000", l = Gs(i);
1228
1228
  return /* @__PURE__ */ m(F.Root, { open: r, onOpenChange: o, children: [
1229
1229
  /* @__PURE__ */ m("div", { className: Hr, children: [
1230
- /* @__PURE__ */ a("div", { className: pt, children: n("graph.colorDropdown.custom") }),
1230
+ /* @__PURE__ */ a("div", { className: ft, children: n("graph.colorDropdown.custom") }),
1231
1231
  /* @__PURE__ */ m(
1232
1232
  F.Trigger,
1233
1233
  {
@@ -1242,7 +1242,7 @@ const Is = Yn.map((e) => s[e]), Ds = Object.fromEntries(
1242
1242
  )
1243
1243
  ] }),
1244
1244
  /* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { side: "right", align: "start", sideOffset: 18, className: Pr, children: /* @__PURE__ */ m(F.Popup, { className: Fs, onMouseDown: (c) => c.preventDefault(), children: [
1245
- /* @__PURE__ */ a("div", { className: pt, children: n("graph.colorDropdown.pickColor") }),
1245
+ /* @__PURE__ */ a("div", { className: ft, children: n("graph.colorDropdown.pickColor") }),
1246
1246
  /* @__PURE__ */ a(va, { color: l, onChange: t, className: Bs }),
1247
1247
  /* @__PURE__ */ a(
1248
1248
  ya,
@@ -1303,17 +1303,17 @@ const Z = ({ children: e, title: t, variant: n = "primary", size: r = "sm", ...o
1303
1303
  ]
1304
1304
  }
1305
1305
  );
1306
- }, Nr = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "m6 9 6 6 6-6" }) }) }), Xs = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", Ir = `'Aeonik', 'Aeonik Fallback', ${O}`, Us = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Vs = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", Ys = `var(--brand-font-family), ${Ir}`, ft = [
1306
+ }, Nr = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "m6 9 6 6 6-6" }) }) }), Xs = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", Ir = `'Aeonik', 'Aeonik Fallback', ${O}`, Us = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Vs = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", Ys = `var(--brand-font-family), ${Ir}`, pt = [
1307
1307
  { id: "modern", label: "Modern", preview: "Aa", fontFamily: O },
1308
1308
  { id: "fresh", label: "Fresh", preview: "Aa", fontFamily: Ir },
1309
1309
  { id: "timeless", label: "Timeless", preview: "Aa", fontFamily: Xs },
1310
1310
  { id: "technical", label: "Technical", preview: "00", fontFamily: Us },
1311
1311
  { id: "fineliner", label: "Fineliner", preview: "Aa", fontFamily: Vs },
1312
1312
  { id: "brand", label: "Brand", preview: "Aa", fontFamily: Ys }
1313
- ], js = (e) => e ? ft.find((t) => t.fontFamily === e) ?? null : null;
1313
+ ], js = (e) => e ? pt.find((t) => t.fontFamily === e) ?? null : null;
1314
1314
  var Dr = "_1qkyw7q0", Mr = "_1qkyw7q1", Rr = "_1qkyw7q3", Or = "_1qkyw7q4", Gr = "_1qkyw7q5";
1315
1315
  const qs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) => {
1316
- const o = J(), i = js(t) ?? ft[0], l = (c) => {
1316
+ const o = J(), i = js(t) ?? pt[0], l = (c) => {
1317
1317
  e.chain().focus().setFontFamily(c.fontFamily).run();
1318
1318
  };
1319
1319
  return /* @__PURE__ */ m(D.Root, { open: n, onOpenChange: r, children: [
@@ -1330,7 +1330,7 @@ const qs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) =>
1330
1330
  ]
1331
1331
  }
1332
1332
  ),
1333
- /* @__PURE__ */ a(D.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(D.Positioner, { side: "bottom", align: "start", sideOffset: 6, className: Rr, children: /* @__PURE__ */ a(D.Popup, { className: Or, onMouseDown: (c) => c.preventDefault(), children: ft.map((c) => /* @__PURE__ */ a(
1333
+ /* @__PURE__ */ a(D.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(D.Positioner, { side: "bottom", align: "start", sideOffset: 6, className: Rr, children: /* @__PURE__ */ a(D.Popup, { className: Or, onMouseDown: (c) => c.preventDefault(), children: pt.map((c) => /* @__PURE__ */ a(
1334
1334
  D.Item,
1335
1335
  {
1336
1336
  className: Gr,
@@ -1421,10 +1421,10 @@ const ll = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
1421
1421
  cl(e, l), o(!1);
1422
1422
  }, h = () => {
1423
1423
  c(""), o(!1);
1424
- }, g = (f) => {
1425
- c(f.target.value);
1426
- }, p = (f) => {
1427
- f.key === "Enter" && (f.preventDefault(), u());
1424
+ }, g = (p) => {
1425
+ c(p.target.value);
1426
+ }, f = (p) => {
1427
+ p.key === "Enter" && (p.preventDefault(), u());
1428
1428
  };
1429
1429
  return /* @__PURE__ */ m(F.Root, { open: r, onOpenChange: o, children: [
1430
1430
  /* @__PURE__ */ a(
@@ -1434,7 +1434,7 @@ const ll = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
1434
1434
  "aria-label": i("graph.toolbar.formatting.link"),
1435
1435
  "data-active": n,
1436
1436
  className: ol,
1437
- onMouseDown: (f) => f.preventDefault(),
1437
+ onMouseDown: (p) => p.preventDefault(),
1438
1438
  children: /* @__PURE__ */ a(el, {})
1439
1439
  }
1440
1440
  ),
@@ -1443,7 +1443,7 @@ const ll = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
1443
1443
  {
1444
1444
  className: il,
1445
1445
  initialFocus: d,
1446
- onMouseDown: (f) => f.preventDefault(),
1446
+ onMouseDown: (p) => p.preventDefault(),
1447
1447
  children: [
1448
1448
  /* @__PURE__ */ a(
1449
1449
  "input",
@@ -1454,9 +1454,9 @@ const ll = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
1454
1454
  placeholder: i("graph.toolbar.link.placeholder"),
1455
1455
  "aria-label": i("graph.toolbar.link.urlLabel"),
1456
1456
  className: sl,
1457
- onMouseDown: (f) => f.stopPropagation(),
1457
+ onMouseDown: (p) => p.stopPropagation(),
1458
1458
  onChange: g,
1459
- onKeyDown: p
1459
+ onKeyDown: f
1460
1460
  }
1461
1461
  ),
1462
1462
  /* @__PURE__ */ a("button", { type: "button", "aria-label": i("common.cancel"), className: Yt, onClick: h, children: /* @__PURE__ */ a(tl, {}) }),
@@ -1503,8 +1503,8 @@ const ll = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
1503
1503
  /* @__PURE__ */ a("path", { d: "M15 12H3" }),
1504
1504
  /* @__PURE__ */ a("path", { d: "M17 19H3" })
1505
1505
  ] }) });
1506
- var gl = "k91gos0", pl = "k91gos1";
1507
- const fl = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
1506
+ var gl = "k91gos0", fl = "k91gos1";
1507
+ const pl = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
1508
1508
  const o = (i) => i.preventDefault();
1509
1509
  return /* @__PURE__ */ m(le.Root, { children: [
1510
1510
  /* @__PURE__ */ a(
@@ -1517,7 +1517,7 @@ const fl = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
1517
1517
  children: r
1518
1518
  }
1519
1519
  ),
1520
- /* @__PURE__ */ a(le.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Positioner, { sideOffset: fl, children: /* @__PURE__ */ a(le.Popup, { className: pl, children: e }) }) }) })
1520
+ /* @__PURE__ */ a(le.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Positioner, { sideOffset: pl, children: /* @__PURE__ */ a(le.Popup, { className: fl, children: e }) }) }) })
1521
1521
  ] });
1522
1522
  }, ml = ({ editor: e, activeAlignment: t = "left" }) => {
1523
1523
  const n = J();
@@ -1573,7 +1573,7 @@ const yl = ({ editor: e }) => ({
1573
1573
  }), h = w(null), g = ha({
1574
1574
  editor: e,
1575
1575
  selector: yl
1576
- }), p = Ge(
1576
+ }), f = Ge(
1577
1577
  (v) => {
1578
1578
  h.current = v, d.setFloating(v);
1579
1579
  },
@@ -1591,9 +1591,9 @@ const yl = ({ editor: e }) => ({
1591
1591
  e.off("focus", v), e.off("blur", x);
1592
1592
  };
1593
1593
  }, [e]), !e || !n && !l) return null;
1594
- const f = ie();
1595
- return f ? fa(
1596
- /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Provider, { children: /* @__PURE__ */ m(H.Root, { ref: p, className: vl, style: u, children: [
1594
+ const p = ie();
1595
+ return p ? pa(
1596
+ /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Provider, { children: /* @__PURE__ */ m(H.Root, { ref: f, className: vl, style: u, children: [
1597
1597
  /* @__PURE__ */ m(H.Group, { className: ke, children: [
1598
1598
  /* @__PURE__ */ a(
1599
1599
  Ms,
@@ -1668,7 +1668,7 @@ const yl = ({ editor: e }) => ({
1668
1668
  }
1669
1669
  ) })
1670
1670
  ] }) }) }),
1671
- f
1671
+ p
1672
1672
  ) : null;
1673
1673
  };
1674
1674
  var Cl = "_2ngohc0";
@@ -1708,7 +1708,7 @@ const Wr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ m("div", { className
1708
1708
  }) => {
1709
1709
  const i = w(jt(e)), l = w(!1), c = $r((u) => {
1710
1710
  l.current = !0, r?.(u);
1711
- }, o), d = pa({
1711
+ }, o), d = fa({
1712
1712
  extensions: t,
1713
1713
  content: i.current,
1714
1714
  editable: n,
@@ -1996,7 +1996,7 @@ const dc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1996
1996
  /* @__PURE__ */ a("path", { d: "m5 12 7-7 7 7" }),
1997
1997
  /* @__PURE__ */ a("path", { d: "M12 19V5" })
1998
1998
  ] }) }), hc = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "M5 12h14" }) }) });
1999
- var qr = "n7clvo0", gc = "n7clvo1", pc = "n7clvo2", fc = "n7clvo3", Kr = { small: "n7clvo4", medium: "n7clvo5", large: "n7clvo6" }, mc = { small: "n7clvo7", medium: "n7clvo8", large: "n7clvo9" }, vc = { up: "n7clvoa", down: "n7clvob", flat: "n7clvoc" }, yc = { up: "n7clvoe n7clvod", down: "n7clvof n7clvod", flat: "n7clvog n7clvod" };
1999
+ var qr = "n7clvo0", gc = "n7clvo1", fc = "n7clvo2", pc = "n7clvo3", Kr = { small: "n7clvo4", medium: "n7clvo5", large: "n7clvo6" }, mc = { small: "n7clvo7", medium: "n7clvo8", large: "n7clvo9" }, vc = { up: "n7clvoa", down: "n7clvob", flat: "n7clvoc" }, yc = { up: "n7clvoe n7clvod", down: "n7clvof n7clvod", flat: "n7clvog n7clvod" };
2000
2000
  const bc = ({ segment: e, resolvedSize: t }) => {
2001
2001
  if (e.kind === "swatch")
2002
2002
  return /* @__PURE__ */ a(qe, { shape: e.swatch.shape, color: e.swatch.color, width: e.size, height: e.size });
@@ -2013,9 +2013,9 @@ const bc = ({ segment: e, resolvedSize: t }) => {
2013
2013
  case "trendPercentage":
2014
2014
  return vc[e.trendDirection ?? "up"];
2015
2015
  case "trendReference":
2016
- return pc;
2017
- case "label":
2018
2016
  return fc;
2017
+ case "label":
2018
+ return pc;
2019
2019
  }
2020
2020
  }, Sc = ({ item: e, resolvedSize: t }) => /* @__PURE__ */ a("div", { className: jr, children: mn(e).map((n) => /* @__PURE__ */ a(kc, { row: n, resolvedSize: t }, n.role)) }), kc = ({ row: e, resolvedSize: t }) => {
2021
2021
  const n = e.role === "trendRow";
@@ -2169,7 +2169,7 @@ const Dc = (e) => {
2169
2169
  }, Mc = (e) => {
2170
2170
  const t = Rc();
2171
2171
  return t ? (t.style.font = e, t.getBoundingClientRect().width) : null;
2172
- }, Rc = () => typeof document > "u" ? null : (q || (q = document.createElement("span"), q.style.position = "absolute", q.style.visibility = "hidden", q.style.whiteSpace = "nowrap", q.style.left = "-9999px", q.textContent = Jr, document.body.appendChild(q)), q), Zr = fe(null), Oc = ({ children: e, measurer: t }) => {
2172
+ }, Rc = () => typeof document > "u" ? null : (q || (q = document.createElement("span"), q.style.position = "absolute", q.style.visibility = "hidden", q.style.whiteSpace = "nowrap", q.style.left = "-9999px", q.textContent = Jr, document.body.appendChild(q)), q), Zr = pe(null), Oc = ({ children: e, measurer: t }) => {
2173
2173
  const [n, r] = E(null);
2174
2174
  T(() => {
2175
2175
  if (t !== void 0) return;
@@ -2248,13 +2248,13 @@ const ed = "#9ca3af", ot = "\0", td = (e) => {
2248
2248
  });
2249
2249
  T(() => {
2250
2250
  if (!r) return;
2251
- const h = (p) => {
2252
- const f = p.target;
2253
- if (!f) return;
2251
+ const h = (f) => {
2252
+ const p = f.target;
2253
+ if (!p) return;
2254
2254
  const v = i.reference.current, x = i.floating.current;
2255
- v instanceof Element && v.contains(f) || x instanceof Element && x.contains(f) || o(!1);
2256
- }, g = (p) => {
2257
- p.key === "Escape" && o(!1);
2255
+ v instanceof Element && v.contains(p) || x instanceof Element && x.contains(p) || o(!1);
2256
+ }, g = (f) => {
2257
+ f.key === "Escape" && o(!1);
2258
2258
  };
2259
2259
  return document.addEventListener("pointerdown", h), document.addEventListener("keydown", g), () => {
2260
2260
  document.removeEventListener("pointerdown", h), document.removeEventListener("keydown", g);
@@ -2343,7 +2343,7 @@ const ud = ({
2343
2343
  swatchGap: l.legendSwatchGap,
2344
2344
  horizontalChrome: l.legendPillHorizontalChrome
2345
2345
  })) + Pi;
2346
- return fd({
2346
+ return pd({
2347
2347
  pillSizes: A,
2348
2348
  overflowPillSize: _,
2349
2349
  containerSize: u,
@@ -2351,7 +2351,7 @@ const ud = ({
2351
2351
  });
2352
2352
  }, [c, u, d, i, o, l]);
2353
2353
  if (c.length === 0) return null;
2354
- const g = c.slice(0, h.visibleCount), p = c.slice(h.visibleCount), f = h.hasOverflow && p.length > 0;
2354
+ const g = c.slice(0, h.visibleCount), f = c.slice(h.visibleCount), p = h.hasOverflow && f.length > 0;
2355
2355
  return /* @__PURE__ */ m(
2356
2356
  "div",
2357
2357
  {
@@ -2361,7 +2361,7 @@ const ud = ({
2361
2361
  }),
2362
2362
  children: [
2363
2363
  g.map((v) => /* @__PURE__ */ a("div", { className: dd, children: /* @__PURE__ */ a(Qr, { pill: v }) }, v.key)),
2364
- f && /* @__PURE__ */ a(ad, { hiddenPills: p, placement: md(e) })
2364
+ p && /* @__PURE__ */ a(ad, { hiddenPills: f, placement: md(e) })
2365
2365
  ]
2366
2366
  }
2367
2367
  );
@@ -2376,9 +2376,9 @@ const ud = ({
2376
2376
  const l = n.measureText(e, r).width, c = t > 0 ? o : 0;
2377
2377
  return t + c + l + i;
2378
2378
  }, hd = (e, t, n) => {
2379
- const r = pd(e, n.legendSwatchHeight);
2379
+ const r = fd(e, n.legendSwatchHeight);
2380
2380
  return Math.max(t, r) + n.legendPillVerticalChrome;
2381
- }, gd = (e, t) => e.isBubble ? Number(e.visual.size) : Er(e.visual.color, t), pd = (e, t) => e.isBubble ? Number(e.visual.size) : t, fd = ({
2381
+ }, gd = (e, t) => e.isBubble ? Number(e.visual.size) : Er(e.visual.color, t), fd = (e, t) => e.isBubble ? Number(e.visual.size) : t, pd = ({
2382
2382
  pillSizes: e,
2383
2383
  overflowPillSize: t,
2384
2384
  containerSize: n,
@@ -2449,7 +2449,7 @@ const ud = ({
2449
2449
  });
2450
2450
  const Ft = 1, eo = 8, yd = 12;
2451
2451
  s.pointStrokeColor;
2452
- const bd = 1, xd = 2, Sd = 0.7, pe = ({ hit: e }) => {
2452
+ const bd = 1, xd = 2, Sd = 0.7, fe = ({ hit: e }) => {
2453
2453
  const t = G(e.observation), n = (X(e.observation) ?? Ft) * Sd, r = (ze(e.observation) ?? eo) / 2;
2454
2454
  return /* @__PURE__ */ a(
2455
2455
  "circle",
@@ -2494,15 +2494,15 @@ const kd = oe(function({
2494
2494
  ), l = y(() => {
2495
2495
  const c = Xe(t.data, t.mapping, t.id), d = [];
2496
2496
  return t.data.groupBy(Ee.group).forEach((u) => {
2497
- const h = bn([...u], t.params.missingValues), g = i(h), p = o(h);
2498
- if (!g || !p) return;
2499
- const f = h[0];
2500
- if (!f) return;
2501
- const v = G(f), x = X(f), k = Ue(f, t.params), L = Ve(Ye(f));
2497
+ const h = bn([...u], t.params.missingValues), g = i(h), f = o(h);
2498
+ if (!g || !f) return;
2499
+ const p = h[0];
2500
+ if (!p) return;
2501
+ const v = G(p), x = X(p), k = Ue(p, t.params), L = Ve(Ye(p));
2502
2502
  d.push({
2503
- key: c(f),
2503
+ key: c(p),
2504
2504
  areaPath: g,
2505
- linePath: p,
2505
+ linePath: f,
2506
2506
  color: v,
2507
2507
  fillOpacity: x ?? to,
2508
2508
  strokeWidth: k,
@@ -2629,13 +2629,13 @@ const at = 1, Td = 2, Ad = 1, Ed = yd / 2, _d = 2.25, Bt = ({ hit: e, ...t }) =>
2629
2629
  return xn(t) ? t / _d : Ed;
2630
2630
  }, Hd = ({ layer: e, coordSystem: t, primary: n, companions: r }) => {
2631
2631
  const o = Sn(n.observation), i = y(() => {
2632
- const p = e.data.filter(Ee.group, "eq", o);
2633
- return bn([...p], e.params.missingValues);
2632
+ const f = e.data.filter(Ee.group, "eq", o);
2633
+ return bn([...f], e.params.missingValues);
2634
2634
  }, [e.data, e.params.missingValues, o]), { areaPath: l, linePath: c } = y(() => {
2635
- const { lineGenerator: p, areaGenerator: f } = yn(t, e.params);
2635
+ const { lineGenerator: f, areaGenerator: p } = yn(t, e.params);
2636
2636
  return {
2637
- areaPath: f(i) ?? "",
2638
- linePath: p(i) ?? ""
2637
+ areaPath: p(i) ?? "",
2638
+ linePath: f(i) ?? ""
2639
2639
  };
2640
2640
  }, [t, e.params, i]);
2641
2641
  if (!l || !c) return null;
@@ -2668,7 +2668,7 @@ const at = 1, Td = 2, Ad = 1, Ed = yd / 2, _d = 2.25, Bt = ({ hit: e, ...t }) =>
2668
2668
  ]
2669
2669
  }
2670
2670
  ),
2671
- r.map((p) => /* @__PURE__ */ a(pe, { hit: p }, `companion-${p.layerId}-${p.pointIndex}`)),
2671
+ r.map((f) => /* @__PURE__ */ a(fe, { hit: f }, `companion-${f.layerId}-${f.pointIndex}`)),
2672
2672
  /* @__PURE__ */ a(Bt, { hit: n, "data-testid": "hovered-area-point" })
2673
2673
  ] });
2674
2674
  }, Fd = {
@@ -2677,7 +2677,7 @@ const at = 1, Td = 2, Ad = 1, Ed = yd / 2, _d = 2.25, Bt = ({ hit: e, ...t }) =>
2677
2677
  guideMode: "continuous",
2678
2678
  render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(kd, { layer: e, coordSystem: t, isAnimated: n }),
2679
2679
  renderHover: ({ layer: e, coordSystem: t, primary: n, group: r, related: o }) => /* @__PURE__ */ a(Hd, { layer: e, coordSystem: t, primary: n, companions: [...r, ...o] }),
2680
- renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(C, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
2680
+ renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(C, { children: e.map((t) => /* @__PURE__ */ a(fe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
2681
2681
  getOverlayAnchor: ({ observation: e, coordSystem: t }) => {
2682
2682
  if (t.mainAxis === "x") {
2683
2683
  const o = ue(e), i = Xo(e) ?? he(e);
@@ -2720,20 +2720,20 @@ const at = 1, Td = 2, Ad = 1, Ed = yd / 2, _d = 2.25, Bt = ({ hit: e, ...t }) =>
2720
2720
  isAnimated: r
2721
2721
  }) {
2722
2722
  const o = we(), i = we(), l = oo(n.mainAxis), c = y(() => {
2723
- const g = Xe(t.data, t.mapping, t.id), p = /* @__PURE__ */ new Map();
2724
- for (const f of t.data) {
2725
- const v = kn(n.mainAxis, f);
2723
+ const g = Xe(t.data, t.mapping, t.id), f = /* @__PURE__ */ new Map();
2724
+ for (const p of t.data) {
2725
+ const v = kn(n.mainAxis, p);
2726
2726
  if (!v) continue;
2727
- const x = Md(n.mainAxis, v), k = p.get(x), L = {
2728
- key: g(f),
2727
+ const x = Md(n.mainAxis, v), k = f.get(x), L = {
2728
+ key: g(p),
2729
2729
  ...v,
2730
- fill: G(f),
2731
- opacity: X(f) ?? ro
2730
+ fill: G(p),
2731
+ opacity: X(p) ?? ro
2732
2732
  };
2733
- k ? k.push(L) : p.set(x, [L]);
2733
+ k ? k.push(L) : f.set(x, [L]);
2734
2734
  }
2735
- return [...p.entries()].map(([f, v]) => ({
2736
- id: `${o}${f}`,
2735
+ return [...f.entries()].map(([p, v]) => ({
2736
+ id: `${o}${p}`,
2737
2737
  bars: v,
2738
2738
  ...Rd(v)
2739
2739
  }));
@@ -2744,13 +2744,13 @@ const at = 1, Td = 2, Ad = 1, Ed = yd / 2, _d = 2.25, Bt = ({ hit: e, ...t }) =>
2744
2744
  u !== void 0 && l && /* @__PURE__ */ a(ao, { maskId: u, gradientId: h, direction: l })
2745
2745
  ] }),
2746
2746
  /* @__PURE__ */ a("g", { mask: u !== void 0 ? `url(#${u})` : void 0, children: c.map((g) => {
2747
- const [p] = g.bars;
2748
- if (g.bars.length === 1 && p !== void 0) {
2749
- const { key: f, ...v } = p;
2750
- return /* @__PURE__ */ a(en, { ...v, rx: Ae, isAnimated: r }, f);
2747
+ const [f] = g.bars;
2748
+ if (g.bars.length === 1 && f !== void 0) {
2749
+ const { key: p, ...v } = f;
2750
+ return /* @__PURE__ */ a(en, { ...v, rx: Ae, isAnimated: r }, p);
2751
2751
  }
2752
- return /* @__PURE__ */ a("g", { clipPath: `url(#${g.id})`, children: g.bars.map((f) => {
2753
- const { key: v, ...x } = f;
2752
+ return /* @__PURE__ */ a("g", { clipPath: `url(#${g.id})`, children: g.bars.map((p) => {
2753
+ const { key: v, ...x } = p;
2754
2754
  return /* @__PURE__ */ a(en, { ...x, isAnimated: r }, v);
2755
2755
  }) }, g.id);
2756
2756
  }) })
@@ -2817,7 +2817,7 @@ var Od = "_1suo8ub0";
2817
2817
  const Le = 3, Gd = ({ coordSystem: e, primary: t, panelRect: n }) => {
2818
2818
  const r = we(), o = oo(e.mainAxis), i = kn(e.mainAxis, t.observation);
2819
2819
  if (!i) return null;
2820
- const l = i.x * n.width, c = i.y * n.height, d = i.width * n.width, u = i.height * n.height, h = l - Le, g = c - Le, p = d + Le * 2, f = u + Le * 2, v = Ae + Le, x = G(t.observation), k = X(t.observation) ?? ro, L = o ? `${r}mask` : void 0;
2820
+ const l = i.x * n.width, c = i.y * n.height, d = i.width * n.width, u = i.height * n.height, h = l - Le, g = c - Le, f = d + Le * 2, p = u + Le * 2, v = Ae + Le, x = G(t.observation), k = X(t.observation) ?? ro, L = o ? `${r}mask` : void 0;
2821
2821
  return /* @__PURE__ */ m("g", { "data-testid": "hovered-bar", children: [
2822
2822
  L !== void 0 && o && /* @__PURE__ */ a("defs", { children: /* @__PURE__ */ a(ao, { maskId: L, gradientId: `${r}grad`, direction: o }) }),
2823
2823
  /* @__PURE__ */ m("g", { mask: L !== void 0 ? `url(#${L})` : void 0, children: [
@@ -2826,8 +2826,8 @@ const Le = 3, Gd = ({ coordSystem: e, primary: t, panelRect: n }) => {
2826
2826
  {
2827
2827
  x: h,
2828
2828
  y: g,
2829
- width: p,
2830
- height: f,
2829
+ width: f,
2830
+ height: p,
2831
2831
  rx: v,
2832
2832
  fill: s.hoveredBarBorderColor,
2833
2833
  className: Od,
@@ -2867,13 +2867,13 @@ const Le = 3, Gd = ({ coordSystem: e, primary: t, panelRect: n }) => {
2867
2867
  if (!u) return;
2868
2868
  const h = d[0];
2869
2869
  if (!h) return;
2870
- const g = G(h), p = X(h), f = Ue(h, t.params), v = Ve(Ye(h));
2870
+ const g = G(h), f = X(h), p = Ue(h, t.params), v = Ve(Ye(h));
2871
2871
  l.push({
2872
2872
  key: i(h),
2873
2873
  pathData: u,
2874
2874
  color: g,
2875
- opacity: p ?? io,
2876
- strokeWidth: f,
2875
+ opacity: f ?? io,
2876
+ strokeWidth: p,
2877
2877
  strokeDasharray: v
2878
2878
  });
2879
2879
  }), l;
@@ -2973,7 +2973,7 @@ const Le = 3, Gd = ({ coordSystem: e, primary: t, panelRect: n }) => {
2973
2973
  )
2974
2974
  }
2975
2975
  ),
2976
- n.map((h) => /* @__PURE__ */ a(pe, { hit: h }, `companion-${h.layerId}-${h.pointIndex}`)),
2976
+ n.map((h) => /* @__PURE__ */ a(fe, { hit: h }, `companion-${h.layerId}-${h.pointIndex}`)),
2977
2977
  /* @__PURE__ */ a(Bt, { hit: t, "data-testid": "hovered-line-point" })
2978
2978
  ] });
2979
2979
  }, Vd = {
@@ -2982,7 +2982,7 @@ const Le = 3, Gd = ({ coordSystem: e, primary: t, panelRect: n }) => {
2982
2982
  guideMode: "continuous",
2983
2983
  render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(Wd, { layer: e, isAnimated: t }),
2984
2984
  renderHover: ({ layer: e, primary: t, group: n, related: r }) => /* @__PURE__ */ a(Ud, { layer: e, primary: t, companions: [...n, ...r] }),
2985
- renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(C, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
2985
+ renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(C, { children: e.map((t) => /* @__PURE__ */ a(fe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
2986
2986
  getOverlayAnchor: ({ observation: e }) => {
2987
2987
  const t = ue(e), n = he(e);
2988
2988
  return t === null || n === null ? null : { x: t, y: n };
@@ -2996,19 +2996,19 @@ const Le = 3, Gd = ({ coordSystem: e, primary: t, panelRect: n }) => {
2996
2996
  let i = 0;
2997
2997
  for (const l of t.data) {
2998
2998
  const c = i++, d = ue(l), u = he(l);
2999
- if (d === null || u === null)
2999
+ if (d === null || u === null || d < 0 || d > 1 || u < 0 || u > 1)
3000
3000
  continue;
3001
- const h = G(l), g = X(l), p = ze(l), f = Yo(l);
3001
+ const h = G(l), g = X(l), f = ze(l), p = Yo(l);
3002
3002
  o.push({
3003
3003
  key: String(c),
3004
3004
  // using the observation index as key for points leads to nicer transitions
3005
3005
  cx: $e(d),
3006
3006
  cy: We(u),
3007
- radius: (p ?? t.params.size) / 2,
3007
+ radius: (f ?? t.params.size) / 2,
3008
3008
  fill: h,
3009
3009
  stroke: s.pointStrokeColor,
3010
3010
  opacity: g ?? Ft,
3011
- strokeWidth: f ?? bd
3011
+ strokeWidth: p ?? bd
3012
3012
  });
3013
3013
  }
3014
3014
  return o;
@@ -3048,10 +3048,10 @@ const Le = 3, Gd = ({ coordSystem: e, primary: t, panelRect: n }) => {
3048
3048
  guideMode: null,
3049
3049
  render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(Yd, { layer: e, isAnimated: t }),
3050
3050
  renderHover: ({ primary: e, group: t, related: n }) => /* @__PURE__ */ m("g", { "data-testid": "hovered-point", children: [
3051
- [...t, ...n].map((r) => /* @__PURE__ */ a(pe, { hit: r }, `companion-${r.layerId}-${r.pointIndex}`)),
3051
+ [...t, ...n].map((r) => /* @__PURE__ */ a(fe, { hit: r }, `companion-${r.layerId}-${r.pointIndex}`)),
3052
3052
  /* @__PURE__ */ a(Bt, { hit: e })
3053
3053
  ] }),
3054
- renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(C, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
3054
+ renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(C, { children: e.map((t) => /* @__PURE__ */ a(fe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
3055
3055
  getOverlayAnchor: ({ observation: e }) => {
3056
3056
  const t = ue(e), n = he(e);
3057
3057
  return t === null || n === null ? null : { x: t, y: n };
@@ -3087,7 +3087,7 @@ const ou = (e, t) => {
3087
3087
  text: i,
3088
3088
  isAnimated: l
3089
3089
  }) => {
3090
- const c = e === "start", d = c ? -Oe : -(r - Oe), u = c ? d + r - Ce : d + Ce - it, h = c ? void 0 : `rotate(180 ${u + it / 2} ${o / 2})`, g = c ? "0%" : "100%", p = S(1 - t), f = /* @__PURE__ */ m("g", { transform: `translate(0, ${-o / 2})`, pointerEvents: "none", children: [
3090
+ const c = e === "start", d = c ? -Oe : -(r - Oe), u = c ? d + r - Ce : d + Ce - it, h = c ? void 0 : `rotate(180 ${u + it / 2} ${o / 2})`, g = c ? "0%" : "100%", f = S(1 - t), p = /* @__PURE__ */ m("g", { transform: `translate(0, ${-o / 2})`, pointerEvents: "none", children: [
3091
3091
  /* @__PURE__ */ a("rect", { x: d, y: 0, width: r, height: o, rx: so, fill: n }),
3092
3092
  /* @__PURE__ */ a("g", { transform: h, children: /* @__PURE__ */ a(
3093
3093
  "svg",
@@ -3109,11 +3109,11 @@ const ou = (e, t) => {
3109
3109
  initial: !1,
3110
3110
  transition: R,
3111
3111
  x: g,
3112
- animate: { y: p },
3112
+ animate: { y: f },
3113
3113
  overflow: "visible",
3114
- children: f
3114
+ children: p
3115
3115
  }
3116
- ) : /* @__PURE__ */ a("svg", { x: g, y: p, overflow: "visible", children: f });
3116
+ ) : /* @__PURE__ */ a("svg", { x: g, y: f, overflow: "visible", children: p });
3117
3117
  }, du = ({
3118
3118
  labelPosition: e,
3119
3119
  linePosition: t,
@@ -3150,7 +3150,7 @@ const ou = (e, t) => {
3150
3150
  symbolColor: d,
3151
3151
  isAnimated: u
3152
3152
  }) => {
3153
- const h = c === null ? 0 : tn + eu, g = t + h + Ce * 2, p = qd + Qd * 2, f = /* @__PURE__ */ m(C, { children: [
3153
+ const h = c === null ? 0 : tn + eu, g = t + h + Ce * 2, f = qd + Qd * 2, p = /* @__PURE__ */ m(C, { children: [
3154
3154
  c !== null && d !== null && /* @__PURE__ */ a("g", { transform: `translate(0, ${-nn / 2})`, children: /* @__PURE__ */ a(qe, { shape: c, color: d, width: tn, height: nn }) }),
3155
3155
  /* @__PURE__ */ a(
3156
3156
  "text",
@@ -3171,8 +3171,8 @@ const ou = (e, t) => {
3171
3171
  linePosition: o,
3172
3172
  color: i,
3173
3173
  pillWidth: g,
3174
- pillHeight: p,
3175
- text: f,
3174
+ pillHeight: f,
3175
+ text: p,
3176
3176
  isAnimated: u
3177
3177
  }
3178
3178
  ) : /* @__PURE__ */ a(
@@ -3182,8 +3182,8 @@ const ou = (e, t) => {
3182
3182
  linePosition: o,
3183
3183
  color: i,
3184
3184
  pillWidth: g,
3185
- pillHeight: p,
3186
- text: f,
3185
+ pillHeight: f,
3186
+ text: p,
3187
3187
  isAnimated: u
3188
3188
  }
3189
3189
  );
@@ -3227,10 +3227,10 @@ const ou = (e, t) => {
3227
3227
  ), g = y(
3228
3228
  () => jo(u, h, n).get(t.id) ?? null,
3229
3229
  [u, h, n, t.id]
3230
- ), p = y(
3230
+ ), f = y(
3231
3231
  () => lu(t.params.label, qo({ guides: l, numberFormat: c, layer: t, locale: r })),
3232
3232
  [l, c, r, t]
3233
- ), f = y(
3233
+ ), p = y(
3234
3234
  () => ({
3235
3235
  family: Jd,
3236
3236
  size: te(Kd, d),
@@ -3238,8 +3238,8 @@ const ou = (e, t) => {
3238
3238
  }),
3239
3239
  [d]
3240
3240
  ), v = y(
3241
- () => p === null ? 0 : i.measureText(p, f).width,
3242
- [p, f, i]
3241
+ () => f === null ? 0 : i.measureText(f, p).width,
3242
+ [f, p, i]
3243
3243
  ), x = t.data.getFirst();
3244
3244
  if (!x) return null;
3245
3245
  const { lineColor: k, labelTextColor: L } = su(t), A = ou(t, n), I = A ? he(x) : ue(x);
@@ -3254,10 +3254,10 @@ const ou = (e, t) => {
3254
3254
  isAnimated: o
3255
3255
  }
3256
3256
  ),
3257
- p !== null && /* @__PURE__ */ a(
3257
+ f !== null && /* @__PURE__ */ a(
3258
3258
  uu,
3259
3259
  {
3260
- label: p,
3260
+ label: f,
3261
3261
  textWidth: v,
3262
3262
  labelPosition: t.params.labelPosition,
3263
3263
  isHorizontalLine: A,
@@ -3270,7 +3270,7 @@ const ou = (e, t) => {
3270
3270
  }
3271
3271
  )
3272
3272
  ] });
3273
- }), pu = {
3273
+ }), fu = {
3274
3274
  geom: "rule",
3275
3275
  coord: "cartesian",
3276
3276
  guideMode: null,
@@ -3285,7 +3285,7 @@ const ou = (e, t) => {
3285
3285
  ),
3286
3286
  renderHover: () => null,
3287
3287
  renderHoverCompanions: () => null
3288
- }, lo = 1, an = Math.PI * 2, fu = oe(function({
3288
+ }, lo = 1, an = Math.PI * 2, pu = oe(function({
3289
3289
  layer: t,
3290
3290
  isAnimated: n
3291
3291
  }) {
@@ -3296,13 +3296,13 @@ const ou = (e, t) => {
3296
3296
  const o = y(() => {
3297
3297
  const i = Xe(t.data, t.mapping, t.id), l = [];
3298
3298
  for (const c of t.data) {
3299
- const d = i(c), { startAngle: u, endAngle: h } = wn(c), { innerRadius: g, outerRadius: p } = Tn(c);
3300
- u === null || h === null || g === null || p === null || l.push({
3299
+ const d = i(c), { startAngle: u, endAngle: h } = wn(c), { innerRadius: g, outerRadius: f } = Tn(c);
3300
+ u === null || h === null || g === null || f === null || l.push({
3301
3301
  key: d,
3302
3302
  startAngle: u,
3303
3303
  endAngle: h,
3304
3304
  innerRadius: g,
3305
- outerRadius: p,
3305
+ outerRadius: f,
3306
3306
  fill: G(c),
3307
3307
  opacity: X(c) ?? lo
3308
3308
  });
@@ -3355,14 +3355,14 @@ const ou = (e, t) => {
3355
3355
  return T(() => {
3356
3356
  u.set(e), h.set(t);
3357
3357
  }, [u, h, e, t]), T(() => {
3358
- const p = () => {
3358
+ const f = () => {
3359
3359
  const x = u.get(), k = h.get();
3360
3360
  g.set(
3361
3361
  De({ startAngle: x, endAngle: k, innerRadius: n, outerRadius: r }) ?? ""
3362
3362
  );
3363
- }, f = u.on("change", p), v = h.on("change", p);
3363
+ }, p = u.on("change", f), v = h.on("change", f);
3364
3364
  return () => {
3365
- f(), v();
3365
+ p(), v();
3366
3366
  };
3367
3367
  }, [u, h, n, r, g]), /* @__PURE__ */ a(j.path, { d: g, fill: o, opacity: i, transition: R });
3368
3368
  }, vu = ({ primary: e }) => {
@@ -3389,7 +3389,7 @@ const ou = (e, t) => {
3389
3389
  geom: "bar",
3390
3390
  coord: "polar",
3391
3391
  guideMode: null,
3392
- render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(fu, { layer: e, isAnimated: t }),
3392
+ render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(pu, { layer: e, isAnimated: t }),
3393
3393
  renderHover: ({ primary: e }) => /* @__PURE__ */ a(vu, { primary: e }),
3394
3394
  renderHoverCompanions: () => null
3395
3395
  }, bu = {
@@ -3407,7 +3407,7 @@ const ou = (e, t) => {
3407
3407
  cartesian: jd
3408
3408
  },
3409
3409
  rule: {
3410
- cartesian: pu
3410
+ cartesian: fu
3411
3411
  }
3412
3412
  }, Je = (e, t) => bu[e.geom]?.[t.type] ?? null, xu = (e, t) => {
3413
3413
  const n = e.filter((o) => o.interactive);
@@ -3489,7 +3489,7 @@ const ou = (e, t) => {
3489
3489
  }, c = () => {
3490
3490
  r = null, o !== null && (cancelAnimationFrame(o), o = null);
3491
3491
  const d = n.getState();
3492
- d.hover.primary !== null && d.setHoverState(pn);
3492
+ d.hover.primary !== null && d.setHoverState(fn);
3493
3493
  };
3494
3494
  return e.addEventListener("pointermove", l), e.addEventListener("pointerleave", c), () => {
3495
3495
  e.removeEventListener("pointermove", l), e.removeEventListener("pointerleave", c), o !== null && cancelAnimationFrame(o), r = null;
@@ -3518,9 +3518,9 @@ const ou = (e, t) => {
3518
3518
  r.removeAttribute(lt);
3519
3519
  };
3520
3520
  }, [e, n]);
3521
- }, uo = N.xs, vt = O, ho = K.medium, Fu = K.semibold, go = 6, po = 2, Bu = 4, Nu = 2, sn = 4;
3521
+ }, uo = N.xs, vt = O, ho = K.medium, Fu = K.semibold, go = 6, fo = 2, Bu = 4, Nu = 2, sn = 4;
3522
3522
  var Iu = "_1agclyl0", Du = "_1agclyl1", Mu = "_1agclyl2", Ru = { inside: "_1agclyl4 _1agclyl3", outside: "_1agclyl5 _1agclyl3" }, Ou = "_1agclyl6 _1agclyl3";
3523
- const fo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: l, position: c, coordType: d }) => {
3523
+ const po = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: l, position: c, coordType: d }) => {
3524
3524
  const u = i ? `rotate(-90 ${e} ${t})` : void 0, h = l === "aggregate" ? Ou : Ru[c], g = Gu(l, c, d);
3525
3525
  return /* @__PURE__ */ m("g", { transform: u, children: [
3526
3526
  g && /* @__PURE__ */ a(
@@ -3541,7 +3541,7 @@ const fo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: l,
3541
3541
  if (e === "aggregate") return Mu;
3542
3542
  if (t === "outside" && n === "cartesian") return Du;
3543
3543
  }, zu = {
3544
- dataLabel: { x: go, y: po },
3544
+ dataLabel: { x: go, y: fo },
3545
3545
  stackTotal: { x: Bu, y: Nu }
3546
3546
  }, Wu = ({ panelRect: e, formattingLocale: t }) => {
3547
3547
  const n = ve(), r = B(
@@ -3574,7 +3574,7 @@ const fo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: l,
3574
3574
  [r, e, i, t]
3575
3575
  );
3576
3576
  return /* @__PURE__ */ a("g", { className: Iu, transform: `translate(${e.x}, ${e.y})`, "data-testid": "data-labels", children: l.labels.map((c) => /* @__PURE__ */ a(
3577
- fo,
3577
+ po,
3578
3578
  {
3579
3579
  x: c.x,
3580
3580
  y: c.y,
@@ -3608,15 +3608,15 @@ const fo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: l,
3608
3608
  const u = ve(), g = y(
3609
3609
  () => u.measureText(n, { family: O, size: r, weight: d }),
3610
3610
  [u, n, r, d]
3611
- ).width + o * 2, p = r + i * 2;
3611
+ ).width + o * 2, f = r + i * 2;
3612
3612
  return /* @__PURE__ */ m("g", { style: { pointerEvents: "none" }, children: [
3613
3613
  /* @__PURE__ */ a(
3614
3614
  "rect",
3615
3615
  {
3616
3616
  x: e - g / 2,
3617
- y: t - p / 2,
3617
+ y: t - f / 2,
3618
3618
  width: g,
3619
- height: p,
3619
+ height: f,
3620
3620
  rx: 4,
3621
3621
  fill: s.graphBackground,
3622
3622
  stroke: c,
@@ -3666,8 +3666,8 @@ const fo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: l,
3666
3666
  labelPosition: u,
3667
3667
  labelText: h,
3668
3668
  labelLineHeight: g,
3669
- labelPaddingX: p,
3670
- labelPaddingY: f,
3669
+ labelPaddingX: f,
3670
+ labelPaddingY: p,
3671
3671
  labelStrokeWidth: v,
3672
3672
  labelFontWeight: x
3673
3673
  }) => {
@@ -3689,8 +3689,8 @@ const fo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: l,
3689
3689
  y: u.y,
3690
3690
  text: h,
3691
3691
  lineHeight: g,
3692
- paddingX: p,
3693
- paddingY: f,
3692
+ paddingX: f,
3693
+ paddingY: p,
3694
3694
  strokeWidth: v,
3695
3695
  strokeColor: k,
3696
3696
  fontWeight: x
@@ -3934,7 +3934,7 @@ const fo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: l,
3934
3934
  height: e.height,
3935
3935
  overflow: "visible",
3936
3936
  "data-testid": `shapes-${t}`,
3937
- children: r.map(({ id: o, x: i, y: l, width: c, height: d, fillColor: u, fillOpacity: h, strokeWidth: g, strokeColor: p }) => /* @__PURE__ */ a(
3937
+ children: r.map(({ id: o, x: i, y: l, width: c, height: d, fillColor: u, fillOpacity: h, strokeWidth: g, strokeColor: f }) => /* @__PURE__ */ a(
3938
3938
  "rect",
3939
3939
  {
3940
3940
  x: S(i),
@@ -3943,7 +3943,7 @@ const fo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: l,
3943
3943
  height: S(d),
3944
3944
  fill: u,
3945
3945
  fillOpacity: h,
3946
- stroke: g > 0 ? p ?? s.defaultAnnotationShapeStroke : "none",
3946
+ stroke: g > 0 ? f ?? s.defaultAnnotationShapeStroke : "none",
3947
3947
  strokeWidth: g
3948
3948
  },
3949
3949
  o
@@ -3994,7 +3994,7 @@ const dh = ({ panelRect: e }) => {
3994
3994
  boxShadow: `0 0 0 1.5px ${Ke(e, 0.1)}`
3995
3995
  };
3996
3996
  var hh = "usd3ea0", gh = "usd3ea1";
3997
- const ph = ({
3997
+ const fh = ({
3998
3998
  layer: e,
3999
3999
  coordSystem: t,
4000
4000
  isAnimated: n,
@@ -4017,7 +4017,7 @@ const ph = ({
4017
4017
  }
4018
4018
  );
4019
4019
  };
4020
- function fh({
4020
+ function ph({
4021
4021
  plugin: e,
4022
4022
  layer: t,
4023
4023
  coordSystem: n,
@@ -4047,12 +4047,12 @@ const mh = 4, vh = ({
4047
4047
  textScale: v.config.appearance.textScale
4048
4048
  }))
4049
4049
  ), h = y(
4050
- () => fh({ plugin: e, layer: t, coordSystem: o, candidates: r }),
4050
+ () => ph({ plugin: e, layer: t, coordSystem: o, candidates: r }),
4051
4051
  [e, t, o, r]
4052
- ), g = y(() => ta(t), [t]), p = y(
4052
+ ), g = y(() => ta(t), [t]), f = y(
4053
4053
  () => na({ layer: t, numberFormat: d, locale: c }),
4054
4054
  [d, t, c]
4055
- ), f = uo * Cr * u;
4055
+ ), p = uo * Cr * u;
4056
4056
  return e === null || n === null && h.length === 0 ? null : /* @__PURE__ */ m(C, { children: [
4057
4057
  n ? e.render({ layer: n, coordSystem: o, isAnimated: i, formattingLocale: c }) : null,
4058
4058
  h.map(({ observation: v, observationIndex: x, anchor: k }) => /* @__PURE__ */ a(
@@ -4062,8 +4062,8 @@ const mh = 4, vh = ({
4062
4062
  anchor: k,
4063
4063
  panelRect: l,
4064
4064
  readSegmentY: g,
4065
- formatYValue: p,
4066
- labelFontSizePx: f
4065
+ formatYValue: f,
4066
+ labelFontSizePx: p
4067
4067
  },
4068
4068
  bh(v, x)
4069
4069
  ))
@@ -4076,16 +4076,16 @@ const mh = 4, vh = ({
4076
4076
  formatYValue: o,
4077
4077
  labelFontSizePx: i
4078
4078
  }) => {
4079
- const l = ve(), c = $e(t.x), d = We(t.y), u = (ze(e) ?? eo) / 2, h = r(e), g = xn(h) ? o(h, e) : null, p = y(() => {
4079
+ const l = ve(), c = $e(t.x), d = We(t.y), u = (ze(e) ?? eo) / 2, h = r(e), g = xn(h) ? o(h, e) : null, f = y(() => {
4080
4080
  if (g === null) return null;
4081
- const f = l.measureText(g, {
4081
+ const p = l.measureText(g, {
4082
4082
  family: vt,
4083
4083
  size: i,
4084
4084
  weight: ho
4085
4085
  });
4086
4086
  return {
4087
- width: f.width + go * 2,
4088
- height: f.height + po * 2
4087
+ width: p.width + go * 2,
4088
+ height: p.height + fo * 2
4089
4089
  };
4090
4090
  }, [g, l, i]);
4091
4091
  return /* @__PURE__ */ m(C, { children: [
@@ -4099,13 +4099,13 @@ const mh = 4, vh = ({
4099
4099
  fill: G(e)
4100
4100
  }
4101
4101
  ),
4102
- g !== null && p !== null && /* @__PURE__ */ a(
4103
- fo,
4102
+ g !== null && f !== null && /* @__PURE__ */ a(
4103
+ po,
4104
4104
  {
4105
4105
  x: c * n.width,
4106
- y: d * n.height - u - mh - p.height / 2,
4107
- width: p.width,
4108
- height: p.height,
4106
+ y: d * n.height - u - mh - f.height / 2,
4107
+ width: f.width,
4108
+ height: f.height,
4109
4109
  text: g,
4110
4110
  isRotated: !1,
4111
4111
  target: "observation",
@@ -4186,7 +4186,7 @@ const Lh = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
4186
4186
  const l = y(() => Je(e, t), [e, t]), c = e.highlight;
4187
4187
  return /* @__PURE__ */ m("g", { className: wh(e), children: [
4188
4188
  /* @__PURE__ */ a(
4189
- ph,
4189
+ fh,
4190
4190
  {
4191
4191
  layer: e,
4192
4192
  coordSystem: t,
@@ -4224,7 +4224,7 @@ const Eh = ({
4224
4224
  }) => {
4225
4225
  const d = w(null);
4226
4226
  Hu(d);
4227
- const u = Q("Grid", lh), h = Q("AxisTicks", ih), g = Q("AxisLabel", sh), p = y(() => mo(r, n), [r, n]), f = y(() => hn(o, n), [o, n]), v = y(() => hn(i, n), [i, n]);
4227
+ const u = Q("Grid", lh), h = Q("AxisTicks", ih), g = Q("AxisLabel", sh), f = y(() => mo(r, n), [r, n]), p = y(() => hn(o, n), [o, n]), v = y(() => hn(i, n), [i, n]);
4228
4228
  return /* @__PURE__ */ m(
4229
4229
  "svg",
4230
4230
  {
@@ -4235,18 +4235,18 @@ const Eh = ({
4235
4235
  style: { transform: `translate(${n.x}px, ${n.y}px)` },
4236
4236
  "data-testid": "plot",
4237
4237
  children: [
4238
- /* @__PURE__ */ a(u, { axes: e, panel: t, panelRect: p }),
4239
- /* @__PURE__ */ a(Lu, { panelRect: p }),
4240
- /* @__PURE__ */ a(h, { formattedAxes: e, tickRects: f }),
4238
+ /* @__PURE__ */ a(u, { axes: e, panel: t, panelRect: f }),
4239
+ /* @__PURE__ */ a(Lu, { panelRect: f }),
4240
+ /* @__PURE__ */ a(h, { formattedAxes: e, tickRects: p }),
4241
4241
  /* @__PURE__ */ a(g, { formattedAxes: e, labelRects: v }),
4242
- /* @__PURE__ */ a(un, { panelRect: p, zOrder: "background" }),
4243
- /* @__PURE__ */ a(Lh, { shouldAnimate: l, panelRect: p, formattingLocale: c }),
4244
- /* @__PURE__ */ a(Wu, { panelRect: p, formattingLocale: c }),
4245
- /* @__PURE__ */ a(Uu, { panelRect: p, formattingLocale: c }),
4246
- /* @__PURE__ */ a(un, { panelRect: p, zOrder: "foreground" }),
4247
- /* @__PURE__ */ a(Zu, { panelRect: p }),
4248
- /* @__PURE__ */ a(dh, { panelRect: p }),
4249
- /* @__PURE__ */ a(Pu, { panelRect: p })
4242
+ /* @__PURE__ */ a(un, { panelRect: f, zOrder: "background" }),
4243
+ /* @__PURE__ */ a(Lh, { shouldAnimate: l, panelRect: f, formattingLocale: c }),
4244
+ /* @__PURE__ */ a(Wu, { panelRect: f, formattingLocale: c }),
4245
+ /* @__PURE__ */ a(Uu, { panelRect: f, formattingLocale: c }),
4246
+ /* @__PURE__ */ a(un, { panelRect: f, zOrder: "foreground" }),
4247
+ /* @__PURE__ */ a(Zu, { panelRect: f }),
4248
+ /* @__PURE__ */ a(dh, { panelRect: f }),
4249
+ /* @__PURE__ */ a(Pu, { panelRect: f })
4250
4250
  ]
4251
4251
  }
4252
4252
  );
@@ -4333,20 +4333,20 @@ const Eh = ({
4333
4333
  }, [e, n]), { headerRef: t, footerRef: r, measurements: o };
4334
4334
  }, Nh = (e, t) => e.headerSize.width !== t.headerSize.width || e.headerSize.height !== t.headerSize.height || e.footerSize.width !== t.footerSize.width || e.footerSize.height !== t.footerSize.height, Ih = ({ appearance: e, isEditable: t, style: n, children: r }) => {
4335
4335
  const { theme: o, themeClass: i, inlineVarsStyle: l } = _t(), c = gs(e.border), d = Math.max(0, e.cornerRadius), u = d === 0 ? 0 : d + c, h = y(() => {
4336
- const f = { ...n, borderRadius: `${u}px`, ...l }, v = hs(e.border, o);
4337
- return v !== null && (f.background = v), f;
4336
+ const p = { ...n, borderRadius: `${u}px`, ...l }, v = hs(e.border, o);
4337
+ return v !== null && (p.background = v), p;
4338
4338
  }, [n, u, l, e.border, o]), g = y(
4339
4339
  () => ({
4340
4340
  inset: `${c}px`,
4341
4341
  borderRadius: `${d}px`
4342
4342
  }),
4343
4343
  [c, d]
4344
- ), p = t && e.background.type === "solid" && e.background.color === "transparent";
4344
+ ), f = t && e.background.type === "solid" && e.background.color === "transparent";
4345
4345
  return /* @__PURE__ */ a("div", { "data-testid": "graph-wrapper", className: re(vs, i), style: h, children: /* @__PURE__ */ a(
4346
4346
  "div",
4347
4347
  {
4348
4348
  "data-testid": "graph-inner",
4349
- className: re(bs, { [xs]: p }),
4349
+ className: re(bs, { [xs]: f }),
4350
4350
  style: g,
4351
4351
  children: r
4352
4352
  }
@@ -4368,8 +4368,8 @@ const Eh = ({
4368
4368
  numberFormat: u,
4369
4369
  parsingLocale: h,
4370
4370
  appearance: g,
4371
- annotations: p,
4372
- coordSystem: f,
4371
+ annotations: f,
4372
+ coordSystem: p,
4373
4373
  headline: v,
4374
4374
  headlineConfig: x,
4375
4375
  content: k
@@ -4404,9 +4404,9 @@ const Eh = ({
4404
4404
  formatted: xe,
4405
4405
  size: x.size,
4406
4406
  position: x.position,
4407
- innerRadius: f.type === "polar" ? f.innerRadius : 0
4407
+ innerRadius: p.type === "polar" ? p.innerRadius : 0
4408
4408
  } : void 0,
4409
- [xe, x.size, x.position, f]
4409
+ [xe, x.size, x.position, p]
4410
4410
  ), Co = ii(), Pe = rs(Lo, g.textScale, be, Co), Se = os({
4411
4411
  measurer: Pe,
4412
4412
  axes: l,
@@ -4417,8 +4417,8 @@ const Eh = ({
4417
4417
  externalMeasurements: _,
4418
4418
  headline: _e,
4419
4419
  formattingLocale: V,
4420
- annotations: p,
4421
- coordSystem: f,
4420
+ annotations: f,
4421
+ coordSystem: p,
4422
4422
  textScale: g.textScale,
4423
4423
  graphPadding: be.graphPadding
4424
4424
  }), He = y(() => !Se || !_e || !Pe ? null : aa({