@graphysdk/react-renderer 1.9.0-beta.1790948557396 → 1.9.0-beta.1790955208938

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/editable.mjs CHANGED
@@ -1,17 +1,17 @@
1
- import { $ as nn, $t as De, At as li, C as si, Ct as ci, D as di, Dt as Ue, E as ui, F as k, G as hi, Gt as pi, H as mi, J as gi, Jt as vi, K as En, Kt as fi, Lt as bi, N as yi, O as _r, Ot as j, P as Si, Q as Fr, Qt as rn, R as Ci, Rt as zr, S as xi, St as wi, T as xe, U as X, V as Ti, Vt as Ai, W as H, X as an, Y as $, Yt as ki, Z as on, Zt as Br, _ as Ie, _t as Li, an as Pi, at as Ii, b as Hr, c as Gr, cn as Vr, ct as Ei, d as Oi, dt as ln, et as ut, f as Mi, fn as D, g as $r, gt as E, h as sn, ht as Ni, i as Ri, k as ht, kt as Di, l as _i, lt as re, m as Fi, mn as z, mt as zi, n as he, nn as Bi, nt as Ur, o as Hi, ot as Gi, p as Wr, q as Vi, qt as $i, r as W, rn as Ui, rt as Kr, st as On, t as Wi, tt as Ki, u as qi, un as Q, v as Xi, wt as pe, x as Zi, xt as ji, y as Yi, yt as Ee } from "./history-chords-QgptrcvB.js";
2
- import { n as ge, t as qr } from "./theme.contract.css-AyXDNf0F.js";
3
- import { ARROW_DEFAULTS as Ji, ARROW_STICKER_DECLARATIONS as Qi, ARROW_STROKE_WIDTHS_PX as Ot, AddAnnotationCommand as ye, AddHighlightCommand as el, BORDER_RADIUS_TOKENS as Mn, COMBO_TYPES as Nn, CONSTANT_VARIABLES as tl, DASH_PRESETS as nl, DEFAULT_BAR_CORNER_RADIUS as rl, DEFAULT_GEOM_COLOR as al, DEFAULT_POINT_SIZE_PX as ol, DEFAULT_STROKE_WIDTH_PX as il, DIFFERENCE_ARROW_DEFAULTS as Xr, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Rn, InternalError as ll, MAX_BAR_WIDTH_FRACTION as sl, MIN_BAR_WIDTH_FRACTION as cl, MoveAnnotationCommand as dl, RESTING_HOVER_STATE as cn, RemoveAnnotationCommand as ze, RemoveHighlightCommand as ul, SHAPE_DEFAULTS as hl, SetAxisLabelCommand as pl, SetAxisPositionCommand as ml, SetAxisTickModeCommand as gl, SetAxisTicksVisibilityCommand as vl, SetAxisVisibilityCommand as fl, SetBarCornerRadiusCommand as bl, SetBarWidthCommand as yl, SetChartTypeCommand as Zr, SetContentCaptionCommand as jr, SetContentSourceCommand as Sl, SetContentSubtitleCommand as Yr, SetContentTitleCommand as Jr, SetDataLabelsFormatCommand as Cl, SetDifferenceArrowStyleCommand as xl, SetGridLineStyleCommand as wl, SetGridLineWidthCommand as Tl, SetGridVisibilityCommand as Al, SetHeadlineCompareWithCommand as kl, SetHeadlinePositionCommand as Ll, SetHeadlineShowCommand as Dn, SetHeadlineSizeCommand as Pl, SetHighlightDimStyleCommand as Il, SetLayerYScaleTypeCommand as El, SetLegendAlignCommand as Ol, SetLegendDisplayCommand as Ml, SetLegendPositionCommand as Nl, SetLineCurveCommand as Rl, SetLineMissingValuesCommand as Dl, SetLineWidthCommand as _n, SetMappingCommand as _l, SetNumberFormatAbbreviationCommand as Fl, SetNumberFormatDecimalsCommand as Fn, SetPointSizeCommand as zl, SetPolarInnerRadiusCommand as Bl, SetPolarStartAngleCommand as Hl, SetRuleLabelCommand as Gl, SetRuleValueCommand as Vl, SetScaleDomainCommand as Mt, SetScaleReverseCommand as $l, SetScaleTransformCommand as Ul, SetStatLineCommand as Wl, SetStyleRuleCommand as ke, TEXT_ANNOTATION_DEFAULTS as Kl, TEXT_ANNOTATION_FADE_ALPHA as ql, ToggleCategoryLabelsCommand as Xl, ToggleContentVisibilityCommand as pt, ToggleDataLabelsCommand as Zl, ToggleGoalLineCommand as jl, ToggleLineFillCommand as Yl, ToggleLinePointsCommand as Jl, ToggleStackTotalsCommand as Ql, UpdateAnnotationCommand as le, alignUnitFractions as es, areAnchorsEqual as Qr, areEditTargetsEqual as ea, areEndpointsComparable as ts, buildEditMenuTriggerRegion as ns, buildLayerStyleAddress as rs, buildObservationPredicate as as, buildObservationsTarget as mt, buildObservationsTargetAtValue as ta, canAnchorDirectLabels as os, canBecomeCombo as is, canBecomeHeatmap as ls, clampAnnotationTranslation as ss, computeArrow as na, createObservationAnchorBuilder as cs, createObservationAnchorParser as ds, createStyleResolver as us, createValueFormatter as ra, createXValueReader as hs, filterLayersByGeoms as zt, findAnnotation as ps, findAverageLineLayer as ms, findAxisGuide as gs, findCompanionLayers as aa, findGoalLineLayer as vs, findHighlightsAtObservation as fs, findKindStyleDeclarations as bs, findLayerByGeom as oa, findLayerById as ve, findObservationAttachment as ys, findStyleRule as Ce, findTrendLineLayer as Ss, formatDifferenceLabel as Cs, getBoundingRect as Bt, getGroupVariables as xs, getXBand as ws, getYBand as Ts, hasMainAxisBand as As, hasMultipleGroups as ks, inferDefaultDifferenceArrowEndpoints as Ls, inferDifferenceArrowEndpoints as Ps, isComboChartType as Ae, isCompanionLayer as dn, isObservationAttachmentKind as Is, isPointWithinEditMenuTrigger as un, isSafeUrl as Es, isZeroAnchoredAxis as Os, measureObservationsBoxes as ia, projectAnchorToPanel as nt, readBroadestObservationsScope as Ms, readChartType as la, readComboLineLayerId as Ns, readCompanionRowsAtScopeKey as Rs, readConstantValue as Ds, readEditTargetKey as gt, readGeomColor as _s, readHighlightDimStyle as Fs, readMainAxis as zs, readMappableAesthetics as Bs, readMappedVariable as Hs, readObservationIndex as sa, readReachableLevels as Gs, readRowScopeKey as Vs, readRowsAtScopeKey as $s, readScopeXVariable as Us, readVariableName as vt, resolveArrowAnnotationStyle as hn, resolveBarBandFraction as Ws, resolveComparisonBasis as Ks, resolveDifferenceArrowAnnotationStyle as qs, resolveEditOutlineStyle as Xs, resolveObservationPoint as ca, resolveObservationsTarget as zn, stepDifferenceArrowEndpoint as Zs, toDashPreset as Ht, toPaintColor as rt, toPanelCursor as ft } from "@graphysdk/viz-engine";
4
- import { Fragment as js, createContext as Be, memo as da, useCallback as oe, useContext as we, useEffect as F, useId as Le, useLayoutEffect as Pe, useMemo as I, useRef as ne, useState as te } from "react";
1
+ import { $ as rn, $t as De, At as li, C as si, Ct as ci, D as di, Dt as Ue, E as ui, F as k, G as hi, Gt as pi, H as mi, J as gi, Jt as vi, K as En, Kt as fi, Lt as bi, N as yi, O as _r, Ot as j, P as Si, Q as Fr, Qt as an, R as Ci, Rt as zr, S as xi, St as wi, T as xe, U as X, V as Ti, Vt as Ai, W as H, X as on, Y as $, Yt as ki, Z as ln, Zt as Br, _ as Ie, _t as Li, an as Pi, at as Ii, b as Hr, c as Gr, cn as Vr, ct as Ei, d as Oi, dt as ht, et as pt, f as Mi, fn as D, g as $r, gt as E, h as sn, ht as Ni, i as Ri, k as mt, kt as Di, l as _i, lt as re, m as Fi, mn as z, mt as zi, n as pe, nn as Bi, nt as Ur, o as Hi, ot as Gi, p as Wr, q as Vi, qt as $i, r as W, rn as Ui, rt as Kr, st as On, t as Wi, tt as Ki, u as qi, un as Q, v as Xi, wt as me, x as Zi, xt as ji, y as Yi, yt as Ee } from "./history-chords-CmDyvFwk.js";
2
+ import { n as oe, t as qr } from "./theme.contract.css-AyXDNf0F.js";
3
+ import { ARROW_DEFAULTS as Ji, ARROW_STICKER_DECLARATIONS as Qi, ARROW_STROKE_WIDTHS_PX as Mt, AddAnnotationCommand as ye, AddHighlightCommand as el, BORDER_RADIUS_TOKENS as Mn, COMBO_TYPES as Nn, CONSTANT_VARIABLES as tl, DASH_PRESETS as nl, DEFAULT_BAR_CORNER_RADIUS as rl, DEFAULT_GEOM_COLOR as al, DEFAULT_POINT_SIZE_PX as ol, DEFAULT_STROKE_WIDTH_PX as il, DIFFERENCE_ARROW_DEFAULTS as Xr, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Rn, InternalError as ll, MAX_BAR_WIDTH_FRACTION as sl, MIN_BAR_WIDTH_FRACTION as cl, MoveAnnotationCommand as dl, RESTING_HOVER_STATE as cn, RemoveAnnotationCommand as ze, RemoveHighlightCommand as ul, SHAPE_DEFAULTS as hl, SetAxisLabelCommand as pl, SetAxisPositionCommand as ml, SetAxisTickModeCommand as gl, SetAxisTicksVisibilityCommand as vl, SetAxisVisibilityCommand as fl, SetBarCornerRadiusCommand as bl, SetBarWidthCommand as yl, SetChartTypeCommand as Zr, SetContentCaptionCommand as jr, SetContentSourceCommand as Sl, SetContentSubtitleCommand as Yr, SetContentTitleCommand as Jr, SetDataLabelsFormatCommand as Cl, SetDifferenceArrowStyleCommand as xl, SetGridLineStyleCommand as wl, SetGridLineWidthCommand as Tl, SetGridVisibilityCommand as Al, SetHeadlineCompareWithCommand as kl, SetHeadlinePositionCommand as Ll, SetHeadlineShowCommand as Dn, SetHeadlineSizeCommand as Pl, SetHighlightDimStyleCommand as Il, SetLayerYScaleTypeCommand as El, SetLegendAlignCommand as Ol, SetLegendDisplayCommand as Ml, SetLegendPositionCommand as Nl, SetLineCurveCommand as Rl, SetLineMissingValuesCommand as Dl, SetLineWidthCommand as _n, SetMappingCommand as _l, SetNumberFormatAbbreviationCommand as Fl, SetNumberFormatDecimalsCommand as Fn, SetPointSizeCommand as zl, SetPolarInnerRadiusCommand as Bl, SetPolarStartAngleCommand as Hl, SetRuleLabelCommand as Gl, SetRuleValueCommand as Vl, SetScaleDomainCommand as Nt, SetScaleReverseCommand as $l, SetScaleTransformCommand as Ul, SetStatLineCommand as Wl, SetStyleRuleCommand as ke, TEXT_ANNOTATION_DEFAULTS as Kl, TEXT_ANNOTATION_FADE_ALPHA as ql, ToggleCategoryLabelsCommand as Xl, ToggleContentVisibilityCommand as gt, ToggleDataLabelsCommand as Zl, ToggleGoalLineCommand as jl, ToggleLineFillCommand as Yl, ToggleLinePointsCommand as Jl, ToggleStackTotalsCommand as Ql, UpdateAnnotationCommand as se, alignUnitFractions as es, areAnchorsEqual as Qr, areEditTargetsEqual as ea, areEndpointsComparable as ts, buildEditMenuTriggerRegion as ns, buildLayerStyleAddress as rs, buildObservationPredicate as as, buildObservationsTarget as vt, buildObservationsTargetAtValue as ta, canAnchorDirectLabels as os, canBecomeCombo as is, canBecomeHeatmap as ls, clampAnnotationTranslation as ss, computeArrow as na, createObservationAnchorBuilder as cs, createObservationAnchorParser as ds, createStyleResolver as us, createValueFormatter as ra, createXValueReader as hs, filterLayersByGeoms as Bt, findAnnotation as ps, findAverageLineLayer as ms, findAxisGuide as gs, findCompanionLayers as aa, findGoalLineLayer as vs, findHighlightsAtObservation as fs, findKindStyleDeclarations as bs, findLayerByGeom as oa, findLayerById as ve, findObservationAttachment as ys, findStyleRule as Ce, findTrendLineLayer as Ss, formatDifferenceLabel as Cs, getBoundingRect as Ht, getGroupVariables as xs, getXBand as ws, getYBand as Ts, hasMainAxisBand as As, hasMultipleGroups as ks, inferDefaultDifferenceArrowEndpoints as Ls, inferDifferenceArrowEndpoints as Ps, isComboChartType as Ae, isCompanionLayer as dn, isObservationAttachmentKind as Is, isPointWithinEditMenuTrigger as un, isSafeUrl as Es, isZeroAnchoredAxis as Os, measureObservationsBoxes as ia, projectAnchorToPanel as rt, readBroadestObservationsScope as Ms, readChartType as la, readComboLineLayerId as Ns, readCompanionRowsAtScopeKey as Rs, readConstantValue as Ds, readEditTargetKey as ft, readGeomColor as _s, readHighlightDimStyle as Fs, readMainAxis as zs, readMappableAesthetics as Bs, readMappedVariable as Hs, readObservationIndex as sa, readReachableLevels as Gs, readRowScopeKey as Vs, readRowsAtScopeKey as $s, readScopeXVariable as Us, readVariableName as bt, resolveArrowAnnotationStyle as hn, resolveBarBandFraction as Ws, resolveComparisonBasis as Ks, resolveDifferenceArrowAnnotationStyle as qs, resolveEditOutlineStyle as Xs, resolveObservationPoint as ca, resolveObservationsTarget as zn, stepDifferenceArrowEndpoint as Zs, toDashPreset as Gt, toPaintColor as at, toPanelCursor as yt } from "@graphysdk/viz-engine";
4
+ import { Fragment as js, createContext as Be, memo as da, useCallback as ie, useContext as we, useEffect as F, useId as Le, useLayoutEffect as Pe, useMemo as I, useRef as ne, useState as te } from "react";
5
5
  import { Fragment as Y, jsx as r, jsxs as m } from "react/jsx-runtime";
6
6
  import { motion as Ys } from "motion/react";
7
- import { useShallow as me } from "zustand/react/shallow";
8
- import { assignInlineVars as bt } from "@vanilla-extract/dynamic";
7
+ import { useShallow as ge } from "zustand/react/shallow";
8
+ import { assignInlineVars as We } from "@vanilla-extract/dynamic";
9
9
  import { createPortal as ua } from "react-dom";
10
10
  import fe from "clsx";
11
11
  import { autoUpdate as Js, flip as Qs, offset as ec, shift as tc, useFloating as nc } from "@floating-ui/react-dom";
12
12
  import { Extension as ha } from "@tiptap/core";
13
13
  import { Bold as rc } from "@tiptap/extension-bold";
14
- import { Document as at } from "@tiptap/extension-document";
14
+ import { Document as ot } from "@tiptap/extension-document";
15
15
  import { HardBreak as ac } from "@tiptap/extension-hard-break";
16
16
  import { Heading as oc } from "@tiptap/extension-heading";
17
17
  import { Italic as ic } from "@tiptap/extension-italic";
@@ -27,7 +27,7 @@ import { Toolbar as be } from "@base-ui/react/toolbar";
27
27
  import { Tooltip as Re } from "@base-ui/react/tooltip";
28
28
  import { Popover as Z } from "@base-ui/react/popover";
29
29
  import { HexColorInput as vc, HexColorPicker as fc } from "react-colorful";
30
- import { Slider as ue } from "@base-ui/react/slider";
30
+ import { Slider as he } from "@base-ui/react/slider";
31
31
  import { Menu as B } from "@base-ui/react/menu";
32
32
  import { Toggle as bc } from "@base-ui/react/toggle";
33
33
  import Fe from "lodash-es/clamp";
@@ -36,7 +36,7 @@ import { RadioGroup as fa } from "@base-ui/react/radio-group";
36
36
  import { Menu as Se } from "@base-ui/react";
37
37
  import { Accordion as Ge } from "@base-ui/react/accordion";
38
38
  import { NumberField as Bn } from "@base-ui/react/number-field";
39
- import { Select as ce } from "@base-ui/react/select";
39
+ import { Select as de } from "@base-ui/react/select";
40
40
  import { Switch as Hn } from "@base-ui/react/switch";
41
41
  import { Input as yc } from "@base-ui/react/input";
42
42
  import './editable.css';var Sc = {
@@ -2469,7 +2469,7 @@ import './editable.css';var Sc = {
2469
2469
  }
2470
2470
  })
2471
2471
  ], Hc = ({ placeholder: e }) => [
2472
- at,
2472
+ ot,
2473
2473
  ba,
2474
2474
  ...mn(),
2475
2475
  pa,
@@ -2477,26 +2477,26 @@ import './editable.css';var Sc = {
2477
2477
  showOnlyCurrent: !1,
2478
2478
  placeholder: ({ pos: t }) => t === 0 ? e : ""
2479
2479
  })
2480
- ], Gc = ({ isTitleVisible: e, isSubtitleVisible: t }) => e && t ? at.extend({ content: "block{2,}" }) : at, ya = "linear-gradient(to top right, transparent calc(50% - 1px), var(--graphy-alert) calc(50% - 1px), var(--graphy-alert) calc(50% + 1px), transparent calc(50% + 1px))", Vc = "d0bl00";
2481
- var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", Wc = "d0bl08", xa = "d0bl09", Kc = "d0bl0a", qc = "d0bl0b", Xc = "d0bl0c", Zc = "d0bl0d", jc = "d0bl0e", Yc = "owf1yg0", Jc = "owf1yg1", Qc = "owf1yg2", ed = "owf1yg3", td = "owf1yg4", nd = 0.01, rd = ({ value: e, onChange: t, label: n }) => /* @__PURE__ */ r(ue.Root, {
2480
+ ], Gc = ({ isTitleVisible: e, isSubtitleVisible: t }) => e && t ? ot.extend({ content: "block{2,}" }) : ot, ya = "linear-gradient(to top right, transparent calc(50% - 1px), var(--graphy-alert) calc(50% - 1px), var(--graphy-alert) calc(50% + 1px), transparent calc(50% + 1px))", Vc = "d0bl00";
2481
+ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Vt = "d0bl06", Uc = "d0bl07", Wc = "d0bl08", xa = "d0bl09", Kc = "d0bl0a", qc = "d0bl0b", Xc = "d0bl0c", Zc = "d0bl0d", jc = "d0bl0e", Yc = "owf1yg0", Jc = "owf1yg1", Qc = "owf1yg2", ed = "owf1yg3", td = "owf1yg4", nd = 0.01, rd = ({ value: e, onChange: t, label: n }) => /* @__PURE__ */ r(he.Root, {
2482
2482
  className: Yc,
2483
2483
  value: e,
2484
2484
  onValueChange: (a) => t(a),
2485
2485
  min: 0,
2486
2486
  max: 1,
2487
2487
  step: nd,
2488
- children: /* @__PURE__ */ r(ue.Control, {
2488
+ children: /* @__PURE__ */ r(he.Control, {
2489
2489
  className: Jc,
2490
- children: /* @__PURE__ */ m(ue.Track, {
2490
+ children: /* @__PURE__ */ m(he.Track, {
2491
2491
  className: Qc,
2492
- children: [/* @__PURE__ */ r(ue.Indicator, { className: ed }), /* @__PURE__ */ r(ue.Thumb, {
2492
+ children: [/* @__PURE__ */ r(he.Indicator, { className: ed }), /* @__PURE__ */ r(he.Thumb, {
2493
2493
  className: td,
2494
2494
  "aria-label": n
2495
2495
  })]
2496
2496
  })
2497
2497
  })
2498
- }), wa = "transparent", Vt = qr.map((e) => ge[e]), ad = Object.fromEntries(qr.map((e) => [ge[e], e])), od = (e) => Vt.some((t) => Aa(t, e)), id = ({ color: e, onChange: t, isOpen: n, onOpenChange: a, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: u = !1 }) => {
2499
- const d = E(), h = sd(), p = u ? [wa, ...Vt] : Vt, g = (v) => {
2498
+ }), wa = "transparent", $t = qr.map((e) => oe[e]), ad = Object.fromEntries(qr.map((e) => [oe[e], e])), od = (e) => $t.some((t) => Aa(t, e)), id = ({ color: e, onChange: t, isOpen: n, onOpenChange: a, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: u = !1 }) => {
2499
+ const d = E(), h = sd(), p = u ? [wa, ...$t] : $t, g = (v) => {
2500
2500
  t(v), a(!1);
2501
2501
  };
2502
2502
  return /* @__PURE__ */ m(Z.Root, {
@@ -2512,7 +2512,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2512
2512
  style: { background: e ?? "transparent" }
2513
2513
  })
2514
2514
  }), /* @__PURE__ */ r(Z.Portal, {
2515
- container: pe(),
2515
+ container: me(),
2516
2516
  children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(Z.Positioner, {
2517
2517
  sideOffset: 6,
2518
2518
  align: "start",
@@ -2560,7 +2560,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2560
2560
  return /* @__PURE__ */ m("div", {
2561
2561
  className: Ca,
2562
2562
  children: [/* @__PURE__ */ r("div", {
2563
- className: Gt,
2563
+ className: Vt,
2564
2564
  children: e
2565
2565
  }), /* @__PURE__ */ r("div", {
2566
2566
  className: Uc,
@@ -2586,7 +2586,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2586
2586
  children: [/* @__PURE__ */ m("div", {
2587
2587
  className: Ca,
2588
2588
  children: [/* @__PURE__ */ r("div", {
2589
- className: Gt,
2589
+ className: Vt,
2590
2590
  children: a("graph.colorDropdown.custom")
2591
2591
  }), /* @__PURE__ */ m(Z.Trigger, {
2592
2592
  className: Kc,
@@ -2601,7 +2601,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2601
2601
  })]
2602
2602
  })]
2603
2603
  }), /* @__PURE__ */ r(Z.Portal, {
2604
- container: pe(),
2604
+ container: me(),
2605
2605
  children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(Z.Positioner, {
2606
2606
  side: "right",
2607
2607
  align: "start",
@@ -2613,7 +2613,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2613
2613
  ...n,
2614
2614
  children: [
2615
2615
  /* @__PURE__ */ r("div", {
2616
- className: Gt,
2616
+ className: Vt,
2617
2617
  children: a("graph.colorDropdown.pickColor")
2618
2618
  }),
2619
2619
  /* @__PURE__ */ r(fc, {
@@ -2646,17 +2646,17 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2646
2646
  }, [e]);
2647
2647
  }, Ta = (e) => e === "transparent" ? {
2648
2648
  background: ya,
2649
- border: `1px solid ${ge.border100}`
2649
+ border: `1px solid ${oe.border100}`
2650
2650
  } : {
2651
2651
  background: e,
2652
2652
  border: `1px solid ${$i(e, 0.1)}`
2653
2653
  }, cd = (e) => {
2654
- const { themeValues: t } = ln();
2654
+ const { themeValues: t } = ht();
2655
2655
  if (vi(e)) return e.toUpperCase();
2656
2656
  const n = ad[e];
2657
2657
  return n ? t[n].toUpperCase() : "#000000";
2658
2658
  }, Aa = (e, t) => t === null ? !1 : e.toLowerCase() === t.toLowerCase(), dd = "l9kff0", ud = "l9kff1", hd = "l9kff2", pd = "xn24px0", md = "xn24px1", gd = "xn24px2", vd = ({ children: e, popupAttributes: t }) => /* @__PURE__ */ r(B.Portal, {
2659
- container: pe(),
2659
+ container: me(),
2660
2660
  children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(B.Positioner, {
2661
2661
  side: "bottom",
2662
2662
  align: "start",
@@ -2685,7 +2685,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2685
2685
  ...t,
2686
2686
  className: fe(hd, e)
2687
2687
  }), Cd = ({ children: e }) => {
2688
- const t = pe();
2688
+ const t = me();
2689
2689
  return t === null ? null : ua(/* @__PURE__ */ r(re, { children: e }), t);
2690
2690
  }, q = {
2691
2691
  Portal: Cd,
@@ -2696,7 +2696,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2696
2696
  ColorPicker: id,
2697
2697
  MenuPopup: vd,
2698
2698
  MenuItem: fd
2699
- }, We = (e) => /* @__PURE__ */ r(k, {
2699
+ }, Ke = (e) => /* @__PURE__ */ r(k, {
2700
2700
  ...e,
2701
2701
  children: /* @__PURE__ */ r("g", {
2702
2702
  stroke: "currentColor",
@@ -2705,7 +2705,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2705
2705
  strokeLinejoin: "round",
2706
2706
  children: /* @__PURE__ */ r("path", { d: "m6 9 6 6 6-6" })
2707
2707
  })
2708
- }), xd = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", wd = `'Aeonik', 'Aeonik Fallback', ${Br}`, Td = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Ad = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", $t = [
2708
+ }), xd = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", wd = `'Aeonik', 'Aeonik Fallback', ${Br}`, Td = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Ad = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", Ut = [
2709
2709
  {
2710
2710
  id: "modern",
2711
2711
  label: "Modern",
@@ -2736,8 +2736,8 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2736
2736
  preview: "Aa",
2737
2737
  fontFamily: Ad
2738
2738
  }
2739
- ], kd = (e) => e ? $t.find((t) => t.fontFamily === e) ?? null : null, ka = "_70l3rt0", La = "_70l3rt1", Pa = "_70l3rt3", Ia = "_70l3rt4", Ea = "_70l3rt5", Ld = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: a }) => {
2740
- const o = E(), i = kd(t) ?? $t[0], l = (s) => {
2739
+ ], kd = (e) => e ? Ut.find((t) => t.fontFamily === e) ?? null : null, ka = "_70l3rt0", La = "_70l3rt1", Pa = "_70l3rt3", Ia = "_70l3rt4", Ea = "_70l3rt5", Ld = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: a }) => {
2740
+ const o = E(), i = kd(t) ?? Ut[0], l = (s) => {
2741
2741
  e.chain().focus().setFontFamily(s.fontFamily).run();
2742
2742
  };
2743
2743
  return /* @__PURE__ */ m(B.Root, {
@@ -2752,9 +2752,9 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2752
2752
  className: La,
2753
2753
  style: { fontFamily: i?.fontFamily },
2754
2754
  children: i?.preview
2755
- }), /* @__PURE__ */ r(We, { size: "sm" })]
2755
+ }), /* @__PURE__ */ r(Ke, { size: "sm" })]
2756
2756
  }), /* @__PURE__ */ r(B.Portal, {
2757
- container: pe(),
2757
+ container: me(),
2758
2758
  children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(B.Positioner, {
2759
2759
  side: "bottom",
2760
2760
  align: "start",
@@ -2763,7 +2763,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2763
2763
  children: /* @__PURE__ */ r(B.Popup, {
2764
2764
  className: Ia,
2765
2765
  onMouseDown: (s) => s.preventDefault(),
2766
- children: $t.map((s) => /* @__PURE__ */ r(B.Item, {
2766
+ children: Ut.map((s) => /* @__PURE__ */ r(B.Item, {
2767
2767
  className: Ea,
2768
2768
  "data-selected": s.id === i?.id,
2769
2769
  onClick: () => l(s),
@@ -2779,28 +2779,28 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2779
2779
  }, Oa = {
2780
2780
  id: "text",
2781
2781
  translationKey: "graph.toolbar.heading.text",
2782
- previewFont: ge.fontTextEditorBody
2782
+ previewFont: oe.fontTextEditorBody
2783
2783
  }, Vn = [
2784
2784
  {
2785
2785
  id: "caption",
2786
2786
  translationKey: "graph.toolbar.heading.caption",
2787
- previewFont: ge.fontTextEditorH6
2787
+ previewFont: oe.fontTextEditorH6
2788
2788
  },
2789
2789
  Oa,
2790
2790
  {
2791
2791
  id: "h3",
2792
2792
  translationKey: "graph.toolbar.heading.heading3",
2793
- previewFont: ge.fontTextEditorH3
2793
+ previewFont: oe.fontTextEditorH3
2794
2794
  },
2795
2795
  {
2796
2796
  id: "h2",
2797
2797
  translationKey: "graph.toolbar.heading.heading2",
2798
- previewFont: ge.fontTextEditorH2
2798
+ previewFont: oe.fontTextEditorH2
2799
2799
  },
2800
2800
  {
2801
2801
  id: "h1",
2802
2802
  translationKey: "graph.toolbar.heading.heading1",
2803
- previewFont: ge.fontTextEditorH1
2803
+ previewFont: oe.fontTextEditorH1
2804
2804
  }
2805
2805
  ], Pd = ({ editor: e, activeStyle: t, isOpen: n, onOpenChange: a }) => {
2806
2806
  const o = E(), i = Vn.find((l) => l.id === t) ?? Oa;
@@ -2815,9 +2815,9 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2815
2815
  children: [/* @__PURE__ */ r("span", {
2816
2816
  className: La,
2817
2817
  children: o(i.translationKey)
2818
- }), /* @__PURE__ */ r(We, { size: "sm" })]
2818
+ }), /* @__PURE__ */ r(Ke, { size: "sm" })]
2819
2819
  }), /* @__PURE__ */ r(B.Portal, {
2820
- container: pe(),
2820
+ container: me(),
2821
2821
  children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(B.Positioner, {
2822
2822
  side: "bottom",
2823
2823
  align: "start",
@@ -2924,7 +2924,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
2924
2924
  onMouseDown: (g) => g.preventDefault(),
2925
2925
  children: /* @__PURE__ */ r(Od, {})
2926
2926
  }), /* @__PURE__ */ r(Z.Portal, {
2927
- container: pe(),
2927
+ container: me(),
2928
2928
  children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(Z.Positioner, {
2929
2929
  sideOffset: 6,
2930
2930
  align: "end",
@@ -3032,7 +3032,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3032
3032
  onMouseDown: o,
3033
3033
  children: a
3034
3034
  }), /* @__PURE__ */ r(Re.Portal, {
3035
- container: pe(),
3035
+ container: me(),
3036
3036
  children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(Re.Positioner, {
3037
3037
  sideOffset: $d,
3038
3038
  children: /* @__PURE__ */ r(Re.Popup, {
@@ -3088,7 +3088,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3088
3088
  }), d = ne(null), h = gc({
3089
3089
  editor: e,
3090
3090
  selector: Kd
3091
- }), p = oe((g) => {
3091
+ }), p = ie((g) => {
3092
3092
  d.current = g, c.setFloating(g);
3093
3093
  }, [c]);
3094
3094
  return F(() => {
@@ -3096,8 +3096,8 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3096
3096
  }, [e, c]), F(() => {
3097
3097
  if (!e) return;
3098
3098
  const g = () => a(!0), v = ({ event: f }) => {
3099
- const { relatedTarget: S, currentTarget: w } = f, y = S instanceof Node && d.current?.contains(S), T = S instanceof Node && w instanceof Node && w.contains(S);
3100
- !y && !T && a(!1);
3099
+ const { relatedTarget: C, currentTarget: w } = f, y = C instanceof Node && d.current?.contains(C), A = C instanceof Node && w instanceof Node && w.contains(C);
3100
+ !y && !A && a(!1);
3101
3101
  };
3102
3102
  return e.on("focus", g), e.on("blur", v), () => {
3103
3103
  e.off("focus", g), e.off("blur", v);
@@ -3177,7 +3177,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3177
3177
  immediatelyRender: !1,
3178
3178
  onUpdate: ({ editor: u }) => {
3179
3179
  const d = u.getJSON();
3180
- if (Nt(l.current, d)) return s.cancel();
3180
+ if (Rt(l.current, d)) return s.cancel();
3181
3181
  s.run(d);
3182
3182
  }
3183
3183
  });
@@ -3186,7 +3186,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3186
3186
  }, [c, n]), F(() => {
3187
3187
  if (!c) return;
3188
3188
  const u = Wn(e);
3189
- Nt(l.current, u) || (l.current = u, !Nt(c.getJSON(), u) && (s.cancel(), eu(c, u)));
3189
+ Rt(l.current, u) || (l.current = u, !Rt(c.getJSON(), u) && (s.cancel(), eu(c, u)));
3190
3190
  }, [
3191
3191
  c,
3192
3192
  e,
@@ -3212,8 +3212,8 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3212
3212
  from: Math.min(n, o),
3213
3213
  to: Math.min(a, o)
3214
3214
  });
3215
- }, Nt = (e, t) => JSON.stringify(ot(e)) === JSON.stringify(ot(t)), ot = (e) => Array.isArray(e) ? e.map(ot) : e === null || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [t, ot(n)]).filter(([, t]) => !tu(t)).sort(([t], [n]) => String(t).localeCompare(String(n)))), tu = (e) => e == null || typeof e == "object" && Object.keys(e).length === 0, nu = ({ caption: e, captionStyle: t }) => {
3216
- const { dispatch: n } = he(), a = gn({
3215
+ }, Rt = (e, t) => JSON.stringify(it(e)) === JSON.stringify(it(t)), it = (e) => Array.isArray(e) ? e.map(it) : e === null || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [t, it(n)]).filter(([, t]) => !tu(t)).sort(([t], [n]) => String(t).localeCompare(String(n)))), tu = (e) => e == null || typeof e == "object" && Object.keys(e).length === 0, nu = ({ caption: e, captionStyle: t }) => {
3216
+ const { dispatch: n } = pe(), a = gn({
3217
3217
  content: e,
3218
3218
  extensions: I(() => Hc({ placeholder: "Add caption" }), []),
3219
3219
  isEditable: !0,
@@ -3231,7 +3231,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3231
3231
  })
3232
3232
  });
3233
3233
  }, ru = (e) => [
3234
- at,
3234
+ ot,
3235
3235
  ma,
3236
3236
  ...mn(),
3237
3237
  ou,
@@ -3240,12 +3240,12 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3240
3240
  placeholder: ({ pos: t }) => t === 0 ? e : ""
3241
3241
  })
3242
3242
  ], au = ({ annotation: e }) => {
3243
- const t = E(), { dispatch: n } = he(), a = H(), o = I(() => ru(t("graph.annotations.text.placeholder")), [t]), i = gn({
3243
+ const t = E(), { dispatch: n } = pe(), a = H(), o = I(() => ru(t("graph.annotations.text.placeholder")), [t]), i = gn({
3244
3244
  content: e.content,
3245
3245
  extensions: o,
3246
3246
  isEditable: !0,
3247
3247
  onUpdate: (l) => {
3248
- n(new le({
3248
+ n(new se({
3249
3249
  kind: "text",
3250
3250
  id: e.id,
3251
3251
  patch: { content: l }
@@ -3282,7 +3282,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3282
3282
  },
3283
3283
  fontSize: {
3284
3284
  default: null,
3285
- renderHTML: (e) => typeof e.fontSize == "number" && Number.isFinite(e.fontSize) ? { style: `font-size: calc(${e.fontSize}px * ${ge.textScale})` } : {}
3285
+ renderHTML: (e) => typeof e.fontSize == "number" && Number.isFinite(e.fontSize) ? { style: `font-size: calc(${e.fontSize}px * ${oe.textScale})` } : {}
3286
3286
  }
3287
3287
  }
3288
3288
  }];
@@ -3347,7 +3347,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3347
3347
  lineHeight: "var(--uwf6lt3)",
3348
3348
  textColor: "var(--uwf6lt4)"
3349
3349
  }, mu = "uwf6lt5", gu = ({ title: e, isTitleVisible: t, isSubtitleVisible: n, subtitle: a, headingStyle: o, subtitleStyle: i }) => {
3350
- const { dispatch: l } = he(), s = I(() => Bc({
3350
+ const { dispatch: l } = pe(), s = I(() => Bc({
3351
3351
  titlePlaceholder: "Untitled",
3352
3352
  subtitlePlaceholder: "Untitled",
3353
3353
  isTitleVisible: t,
@@ -3396,7 +3396,7 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3396
3396
  width: n,
3397
3397
  height: a
3398
3398
  };
3399
- }, yt = (e) => e.offset + e.strokeWidth, Zn = "http://www.w3.org/2000/svg", jn = /* @__PURE__ */ new WeakMap(), fu = (e, t) => {
3399
+ }, St = (e) => e.offset + e.strokeWidth, Zn = "http://www.w3.org/2000/svg", jn = /* @__PURE__ */ new WeakMap(), fu = (e, t) => {
3400
3400
  const n = bu(e);
3401
3401
  n.setAttribute("d", t);
3402
3402
  const { x: a, y: o, width: i, height: l } = n.getBBox();
@@ -3414,18 +3414,18 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3414
3414
  const a = e.createElementNS(Zn, "path");
3415
3415
  return n.append(a), e.body.append(n), jn.set(e, a), a;
3416
3416
  }, yu = (e, t) => {
3417
- const { panelRect: n, look: a, readGridLineWidth: o, measurePathBox: i } = t, l = yt(a);
3417
+ const { panelRect: n, look: a, readGridLineWidth: o, measurePathBox: i } = t, l = St(a);
3418
3418
  switch (e.kind) {
3419
3419
  case "observations":
3420
- return Rt([...e.parts, ...e.vertex === null ? [] : [e.vertex]].flatMap((s) => Su(s, i)).map((s) => ({
3420
+ return Dt([...e.parts, ...e.vertex === null ? [] : [e.vertex]].flatMap((s) => Su(s, i)).map((s) => ({
3421
3421
  ...s,
3422
3422
  x: s.x + n.x,
3423
3423
  y: s.y + n.y
3424
3424
  })), l);
3425
3425
  case "guide":
3426
- return Rt(e.shapes.map((s) => s.kind === "box" ? s.rect : De(xu(s), o(s.axis) / 2)), l);
3426
+ return Dt(e.shapes.map((s) => s.kind === "box" ? s.rect : De(xu(s), o(s.axis) / 2)), l);
3427
3427
  case "graph":
3428
- return Rt([{
3428
+ return Dt([{
3429
3429
  x: 0,
3430
3430
  y: 0,
3431
3431
  ...e.frameSize
@@ -3472,9 +3472,9 @@ var Sa = "d0bl03", $c = "d0bl04", Ca = "d0bl05", Gt = "d0bl06", Uc = "d0bl07", W
3472
3472
  height: e.radius * 2
3473
3473
  };
3474
3474
  }
3475
- }, Rt = (e, t) => {
3475
+ }, Dt = (e, t) => {
3476
3476
  const n = e.filter(({ width: a, height: o }) => a > 0 || o > 0);
3477
- return n.length === 0 ? null : De(Bt(n), t);
3477
+ return n.length === 0 ? null : De(Ht(n), t);
3478
3478
  };
3479
3479
  var wu = (e, { coordSystem: t, panelRect: n }) => {
3480
3480
  if (e.kind !== "observations") return null;
@@ -3498,16 +3498,16 @@ var wu = (e, { coordSystem: t, panelRect: n }) => {
3498
3498
  bottom: (e) => e.y + e.height,
3499
3499
  left: (e) => -e.x
3500
3500
  }, Lu = (e, t, n) => e === null || !Pu(e) ? {
3501
- top: Ut(t),
3502
- right: Wt(t),
3503
- bottom: Ut(t),
3504
- left: Wt(t)
3501
+ top: Wt(t),
3502
+ right: Kt(t),
3503
+ bottom: Wt(t),
3504
+ left: Kt(t)
3505
3505
  } : {
3506
- top: Ze(e, t, "top", n),
3507
- right: Ze(e, t, "right", n),
3508
- bottom: Ze(e, t, "bottom", n),
3509
- left: Ze(e, t, "left", n)
3510
- }, Ze = (e, t, n, a) => {
3506
+ top: je(e, t, "top", n),
3507
+ right: je(e, t, "right", n),
3508
+ bottom: je(e, t, "bottom", n),
3509
+ left: je(e, t, "left", n)
3510
+ }, je = (e, t, n, a) => {
3511
3511
  const o = ku[n], i = n === "left" || n === "right", l = (v) => i ? v.y : v.x, s = (v) => i ? v.y + v.height : v.x + v.width;
3512
3512
  let c = -1 / 0;
3513
3513
  for (const v of e) c = Math.max(c, o(v));
@@ -3515,7 +3515,7 @@ var wu = (e, { coordSystem: t, panelRect: n }) => {
3515
3515
  let d = 1 / 0, h = -1 / 0;
3516
3516
  for (const v of e)
3517
3517
  o(v) < u || (d = Math.min(d, l(v)), h = Math.max(h, s(v)));
3518
- const p = i ? Wt(t) : Ut(t), g = {
3518
+ const p = i ? Kt(t) : Wt(t), g = {
3519
3519
  from: Fe(d - a, p.from, p.to),
3520
3520
  to: Fe(h + a, p.from, p.to)
3521
3521
  };
@@ -3523,10 +3523,10 @@ var wu = (e, { coordSystem: t, panelRect: n }) => {
3523
3523
  }, Pu = (e) => {
3524
3524
  const [t] = e;
3525
3525
  return t !== void 0 && e.some((n) => !li(n, t));
3526
- }, Ut = (e) => ({
3526
+ }, Wt = (e) => ({
3527
3527
  from: e.x,
3528
3528
  to: e.x + e.width
3529
- }), Wt = (e) => ({
3529
+ }), Kt = (e) => ({
3530
3530
  from: e.y,
3531
3531
  to: e.y + e.height
3532
3532
  }), Iu = (e, { frameElement: t, panelRect: n, look: a }) => {
@@ -3549,12 +3549,12 @@ var wu = (e, { coordSystem: t, panelRect: n }) => {
3549
3549
  const f = Lu(wu(u, {
3550
3550
  coordSystem: l,
3551
3551
  panelRect: n
3552
- }), v, yt(a)), S = za(t);
3552
+ }), v, St(a)), C = za(t);
3553
3553
  o.getState().setSelectedOutline({
3554
3554
  target: c,
3555
3555
  frame: v,
3556
3556
  frameSpans: f,
3557
- frameScale: S
3557
+ frameScale: C
3558
3558
  });
3559
3559
  }, [
3560
3560
  o,
@@ -3581,9 +3581,9 @@ var wu = (e, { coordSystem: t, panelRect: n }) => {
3581
3581
  d: a,
3582
3582
  ...n
3583
3583
  });
3584
- }, Ru = "var(--n5vlnq0)", Du = "data-edit-outline-stroke", Kt = (e) => ({
3584
+ }, Ru = "var(--n5vlnq0)", Du = "data-edit-outline-stroke", qt = (e) => ({
3585
3585
  [Du]: "",
3586
- style: bt({ [Ru]: `${e}px` })
3586
+ style: We({ [Ru]: `${e}px` })
3587
3587
  });
3588
3588
  var Jn = (e, t) => {
3589
3589
  if (e.kind === "observations" && t.kind === "observations") {
@@ -3601,7 +3601,7 @@ var Jn = (e, t) => {
3601
3601
  height: Math.max(0, s - i)
3602
3602
  };
3603
3603
  }, Fu = [], zu = (e) => {
3604
- const { layers: t, parsingLocale: n } = D(me((h) => ({
3604
+ const { layers: t, parsingLocale: n } = D(ge((h) => ({
3605
3605
  layers: h.layers,
3606
3606
  parsingLocale: h.config.parsingLocale
3607
3607
  }))), a = X((h) => h.editTargetUnderPointer), o = a?.kind === "observations" ? a.observations : null, i = o === null ? void 0 : ve(t, o.layerId), l = o?.target.scope ?? null, s = o === null || i === void 0 ? null : Vs(i, o.target.scope, o.observationIndex), c = I(() => i === void 0 || l === null || s === null ? null : Bu(t, i, l, s), [
@@ -3633,7 +3633,7 @@ var Jn = (e, t) => {
3633
3633
  case "grid": {
3634
3634
  const h = {
3635
3635
  kind: "guide",
3636
- key: gt(a.target),
3636
+ key: ft(a.target),
3637
3637
  target: a.target
3638
3638
  };
3639
3639
  return e !== null && Jn(h, e) ? null : h;
@@ -3672,7 +3672,7 @@ var Jn = (e, t) => {
3672
3672
  parts: o,
3673
3673
  vertex: null
3674
3674
  };
3675
- }, Hu = ({ observationIndex: e, target: t, isOnObservation: n }, a, o) => n && t.scope === "series" && mt({
3675
+ }, Hu = ({ observationIndex: e, target: t, isOnObservation: n }, a, o) => n && t.scope === "series" && vt({
3676
3676
  layer: a,
3677
3677
  observationIndex: e,
3678
3678
  scope: "data-point",
@@ -3690,13 +3690,13 @@ var Jn = (e, t) => {
3690
3690
  switch (t.kind) {
3691
3691
  case "axis": {
3692
3692
  const s = i.map(l);
3693
- return n === "polar" || s.length === 0 ? Dt(s) : Dt([Bt(s)]);
3693
+ return n === "polar" || s.length === 0 ? _t(s) : _t([Ht(s)]);
3694
3694
  }
3695
3695
  case "legend":
3696
- return Dt([...$u(i.filter((s) => !Uu(s)))].flatMap(([s, c]) => a[s] === "direct" ? c.map(l) : [Bt(c.map(l))]));
3696
+ return _t([...$u(i.filter((s) => !Uu(s)))].flatMap(([s, c]) => a[s] === "direct" ? c.map(l) : [Ht(c.map(l))]));
3697
3697
  case "grid":
3698
3698
  return i.flatMap((s) => {
3699
- const c = ht([s], e);
3699
+ const c = mt([s], e);
3700
3700
  if (c?.kind !== "grid" || c.target.axis === "both") return [];
3701
3701
  const { axis: u } = c.target;
3702
3702
  return t.axis === "both" || u === t.axis ? [Wu(s, l(s), u)] : [];
@@ -3712,7 +3712,7 @@ var Jn = (e, t) => {
3712
3712
  a !== null && t.set(a.legendIndex, [...t.get(a.legendIndex) ?? [], n]);
3713
3713
  }
3714
3714
  return t;
3715
- }, Uu = (e) => e.closest(_r) !== null, Dt = (e) => e.map((t) => ({
3715
+ }, Uu = (e) => e.closest(_r) !== null, _t = (e) => e.map((t) => ({
3716
3716
  kind: "box",
3717
3717
  rect: t
3718
3718
  })), Wu = (e, { x: t, y: n, width: a, height: o }, i) => e.querySelector("circle") !== null ? {
@@ -3859,7 +3859,7 @@ var Jn = (e, t) => {
3859
3859
  })
3860
3860
  };
3861
3861
  }, ju = (e, { frameElement: t, frameSize: n }) => {
3862
- const a = D((d) => d.coordSystem.type), o = D(me((d) => d.guides.legends.drawn.map((h) => h.display))), i = D((d) => e === null ? null : d), [l, s] = te([]), c = j(e), u = ne(!1);
3862
+ const a = D((d) => d.coordSystem.type), o = D(ge((d) => d.guides.legends.drawn.map((h) => h.display))), i = D((d) => e === null ? null : d), [l, s] = te([]), c = j(e), u = ne(!1);
3863
3863
  return Pe(() => {
3864
3864
  const d = c.current;
3865
3865
  if (d === null) return;
@@ -3923,7 +3923,7 @@ var Jn = (e, t) => {
3923
3923
  };
3924
3924
  }
3925
3925
  }, Ju = () => {
3926
- const e = sn()[0] ?? null, { layers: t, parsingLocale: n } = D(me((a) => ({
3926
+ const e = sn()[0] ?? null, { layers: t, parsingLocale: n } = D(ge((a) => ({
3927
3927
  layers: a.layers,
3928
3928
  parsingLocale: a.config.parsingLocale
3929
3929
  })));
@@ -3947,7 +3947,7 @@ var Jn = (e, t) => {
3947
3947
  return {
3948
3948
  outlined: {
3949
3949
  kind: "guide",
3950
- key: gt(e),
3950
+ key: ft(e),
3951
3951
  target: e
3952
3952
  },
3953
3953
  target: e
@@ -3990,7 +3990,7 @@ var Jn = (e, t) => {
3990
3990
  }
3991
3991
  return {
3992
3992
  kind: "observations",
3993
- key: gt(e),
3993
+ key: ft(e),
3994
3994
  layerId: e.layerId,
3995
3995
  scope: e.scope,
3996
3996
  parts: i,
@@ -4071,7 +4071,7 @@ var Jn = (e, t) => {
4071
4071
  /* @__PURE__ */ r("use", {
4072
4072
  href: `#${u}`,
4073
4073
  mask: `url(#${d})`,
4074
- style: tr(a.stroke, yt(a)),
4074
+ style: tr(a.stroke, St(a)),
4075
4075
  "data-testid": `edit-outline-${e}-ring`
4076
4076
  }),
4077
4077
  t.kind === "observations" && /* @__PURE__ */ r(ch, {
@@ -4084,10 +4084,10 @@ var Jn = (e, t) => {
4084
4084
  }, tr = (e, t) => ({
4085
4085
  fill: e,
4086
4086
  stroke: e,
4087
- ...bt({ [Eu]: `${2 * t}px` })
4087
+ ...We({ [Eu]: `${2 * t}px` })
4088
4088
  }), rh = (e, t, n) => {
4089
- const a = n.offset + yt(n);
4090
- return rn(De({
4089
+ const a = n.offset + St(n);
4090
+ return an(De({
4091
4091
  x: 0,
4092
4092
  y: 0,
4093
4093
  ...e
@@ -4140,17 +4140,17 @@ var Jn = (e, t) => {
4140
4140
  shouldAnimateTransitions: n.shouldAnimateTransitions ?? !1,
4141
4141
  source: t,
4142
4142
  "data-geom": t.geom,
4143
- ...Kt(n.width)
4143
+ ...qt(n.width)
4144
4144
  }, o);
4145
4145
  case "dots":
4146
4146
  return n.centers.length === 0 ? null : /* @__PURE__ */ r("path", {
4147
4147
  d: Pi(n.centers),
4148
4148
  "data-geom": t.geom,
4149
- ...Kt(n.size)
4149
+ ...qt(n.size)
4150
4150
  }, o);
4151
4151
  }
4152
4152
  }), ih = ({ boxes: e, borderRadius: t }) => {
4153
- const n = e.map((a) => rn(a, t)).join("");
4153
+ const n = e.map((a) => an(a, t)).join("");
4154
4154
  return n === "" ? null : /* @__PURE__ */ r("path", {
4155
4155
  d: n,
4156
4156
  "data-testid": "edit-outline-boxes"
@@ -4161,10 +4161,10 @@ var Jn = (e, t) => {
4161
4161
  const l = t.map((s) => sh(s, i)).join("");
4162
4162
  return l === "" ? null : /* @__PURE__ */ r("path", {
4163
4163
  d: l,
4164
- ...Kt(Gr(a, i).strokeWidth)
4164
+ ...qt(Gr(a, i).strokeWidth)
4165
4165
  }, i);
4166
4166
  });
4167
- const o = t.map((i) => i.kind === "box" ? rn(i.rect, n) : "").join("");
4167
+ const o = t.map((i) => i.kind === "box" ? an(i.rect, n) : "").join("");
4168
4168
  return o === "" ? null : /* @__PURE__ */ r("path", { d: o });
4169
4169
  }, sh = (e, t) => {
4170
4170
  if (e.kind === "box" || e.axis !== t) return "";
@@ -4204,20 +4204,20 @@ var Jn = (e, t) => {
4204
4204
  };
4205
4205
  }
4206
4206
  return null;
4207
- }, uh = "data-graphy-chart-chrome", hh = "data-graphy-chart-menu", fn = { [hh]: "" }, St = (e) => ({ [uh]: e }), tt = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, Ba = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, qt = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, Ha = (e, t, n) => n !== null && un({
4207
+ }, uh = "data-graphy-chart-chrome", hh = "data-graphy-chart-menu", fn = { [hh]: "" }, Ct = (e) => ({ [uh]: e }), nt = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, Ba = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, Xt = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, Ha = (e, t, n) => n !== null && un({
4208
4208
  x: e.clientX - t.x,
4209
4209
  y: e.clientY - t.y
4210
- }, n), $e = (e, t, n) => e instanceof Node && (t.contains(e) || tt(e, n)), ph = "cml7ha0", Ga = Be(null), mh = ({ children: e }) => {
4211
- const { chartId: t } = z(), [n] = te(pe), [a, o] = te(null);
4210
+ }, n), $e = (e, t, n) => e instanceof Node && (t.contains(e) || nt(e, n)), ph = "cml7ha0", Ga = Be(null), mh = ({ children: e }) => {
4211
+ const { chartId: t } = z(), [n] = te(me), [a, o] = te(null);
4212
4212
  return n === null ? null : /* @__PURE__ */ m(Y, { children: [ua(/* @__PURE__ */ r("div", {
4213
4213
  ref: o,
4214
4214
  className: ph,
4215
- ...St(t)
4215
+ ...Ct(t)
4216
4216
  }), n), /* @__PURE__ */ r(Ga.Provider, {
4217
4217
  value: a,
4218
4218
  children: e
4219
4219
  })] });
4220
- }, Ct = () => we(Ga), gh = "kwvn4c0", vh = "kwvn4c1", Va = (e, t) => ({
4220
+ }, xt = () => we(Ga), gh = "kwvn4c0", vh = "kwvn4c1", Va = (e, t) => ({
4221
4221
  contextElement: e,
4222
4222
  getBoundingClientRect: () => {
4223
4223
  const n = e.getBoundingClientRect(), a = Fa(e, n.width);
@@ -4242,58 +4242,64 @@ var Jn = (e, t) => {
4242
4242
  align: "shift",
4243
4243
  fallbackAxisSide: "end"
4244
4244
  }, Ch = ({ frameElement: e, boundary: t, spans: n, clearance: a = yh, onEscape: o, children: i }) => {
4245
- const l = Ct(), s = $a(), [c, u] = te(null), d = ne(null);
4245
+ const l = xt(), s = $a(), [c, u] = te(null), d = ne(null), { themeValues: h } = ht(), p = I(() => We({
4246
+ [oe.fontFamily]: h.fontFamily,
4247
+ [oe.textScale]: h.textScale
4248
+ }), [h]);
4246
4249
  Pe(() => () => {
4247
4250
  c?.contains(document.activeElement) && e.focus({ preventScroll: !0 });
4248
4251
  }, [c, e]);
4249
- const { x: h, y: p, width: g, height: v } = t, f = I(() => ({
4252
+ const { x: g, y: v, width: f, height: C } = t, w = I(() => ({
4250
4253
  box: {
4251
- x: h,
4252
- y: p,
4253
- width: g,
4254
- height: v
4254
+ x: g,
4255
+ y: v,
4256
+ width: f,
4257
+ height: C
4255
4258
  },
4256
4259
  spans: n
4257
4260
  }), [
4258
- h,
4259
- p,
4260
4261
  g,
4261
4262
  v,
4263
+ f,
4264
+ C,
4262
4265
  n
4263
- ]), S = I(() => Va(e, f.box), [e, f]), w = (y, T) => {
4264
- y || (T.cancel(), T.reason === "escape-key" && o());
4266
+ ]), y = I(() => Va(e, w.box), [e, w]), A = (S, O) => {
4267
+ S || (O.cancel(), O.reason === "escape-key" && o());
4265
4268
  };
4266
4269
  return /* @__PURE__ */ r(Z.Root, {
4267
4270
  open: s,
4268
4271
  modal: !1,
4269
- onOpenChange: w,
4272
+ onOpenChange: A,
4270
4273
  children: /* @__PURE__ */ r(Z.Portal, {
4271
4274
  container: l,
4272
- children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(Z.Positioner, {
4273
- ref: d,
4274
- anchor: S,
4275
- side: "right",
4276
- align: "start",
4277
- sideOffset: ({ side: y }) => y === "top" || y === "bottom" ? a.y : a.x,
4278
- alignOffset: ({ side: y, anchor: T }) => fh({
4279
- side: y,
4280
- boundary: f.box,
4281
- spans: f.spans,
4282
- anchor: T,
4283
- isRightToLeft: xh(d.current)
4284
- }),
4285
- collisionAvoidance: Sh,
4286
- sticky: !0,
4287
- className: gh,
4288
- ...fn,
4289
- children: /* @__PURE__ */ r(Z.Popup, {
4290
- ref: u,
4291
- className: vh,
4292
- finalFocus: !1,
4293
- "data-testid": "anchored-popover",
4294
- children: i
4275
+ children: /* @__PURE__ */ r(re, {
4276
+ style: p,
4277
+ children: /* @__PURE__ */ r(Z.Positioner, {
4278
+ ref: d,
4279
+ anchor: y,
4280
+ side: "right",
4281
+ align: "start",
4282
+ sideOffset: ({ side: S }) => S === "top" || S === "bottom" ? a.y : a.x,
4283
+ alignOffset: ({ side: S, anchor: O }) => fh({
4284
+ side: S,
4285
+ boundary: w.box,
4286
+ spans: w.spans,
4287
+ anchor: O,
4288
+ isRightToLeft: xh(d.current)
4289
+ }),
4290
+ collisionAvoidance: Sh,
4291
+ sticky: !0,
4292
+ className: gh,
4293
+ ...fn,
4294
+ children: /* @__PURE__ */ r(Z.Popup, {
4295
+ ref: u,
4296
+ className: vh,
4297
+ finalFocus: !1,
4298
+ "data-testid": "anchored-popover",
4299
+ children: i
4300
+ })
4295
4301
  })
4296
- }) })
4302
+ })
4297
4303
  })
4298
4304
  });
4299
4305
  }, xh = (e) => e !== null && getComputedStyle(e).direction === "rtl", wh = (e, t) => {
@@ -4315,7 +4321,7 @@ var Jn = (e, t) => {
4315
4321
  const i = ar(o.layers, e)?.[t]?.[n];
4316
4322
  return i !== void 0 ? i : ar(o.geoms, e);
4317
4323
  }), Ah = (e, t) => t.find((n) => n.interactive && dn(e, [n])), ar = (e, t) => e !== void 0 && Object.hasOwn(e, t) ? e[t] : void 0, kh = (e) => {
4318
- const t = we(Ph), n = e?.kind === "observations" ? e.layerId : null, a = D(me((o) => n === null ? null : wh(n, o)));
4324
+ const t = we(Ph), n = e?.kind === "observations" ? e.layerId : null, a = D(ge((o) => n === null ? null : wh(n, o)));
4319
4325
  if (e === null) return null;
4320
4326
  switch (e.kind) {
4321
4327
  case "observations": {
@@ -4341,19 +4347,19 @@ var Jn = (e, t) => {
4341
4347
  default:
4342
4348
  return e;
4343
4349
  }
4344
- }, de = () => null, Lh = {
4350
+ }, ue = () => null, Lh = {
4345
4351
  geoms: {
4346
- point: de,
4347
- line: de,
4348
- area: de,
4349
- bar: de,
4350
- rule: de,
4351
- tile: de
4352
+ point: ue,
4353
+ line: ue,
4354
+ area: ue,
4355
+ bar: ue,
4356
+ rule: ue,
4357
+ tile: ue
4352
4358
  },
4353
- legend: de,
4354
- axis: de,
4355
- grid: de,
4356
- graph: de
4359
+ legend: ue,
4360
+ axis: ue,
4361
+ grid: ue,
4362
+ graph: ue
4357
4363
  }, Ph = Be([Lh]), Ua = (e) => /* @__PURE__ */ m(k, {
4358
4364
  viewBox: "0 0 16 16",
4359
4365
  ...e,
@@ -4491,7 +4497,7 @@ var Jn = (e, t) => {
4491
4497
  ...t !== void 0 && { "aria-label": t },
4492
4498
  ...c !== void 0 && { "aria-labelledby": c }
4493
4499
  };
4494
- }, Za = "keyboard", xt = (e) => {
4500
+ }, Za = "keyboard", wt = (e) => {
4495
4501
  const t = ne(!1), n = ne(!1), a = () => {
4496
4502
  t.current = !1, n.current && (n.current = !1, e?.());
4497
4503
  };
@@ -4526,7 +4532,7 @@ var ja = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
4526
4532
  id: c,
4527
4533
  ariaLabel: l,
4528
4534
  ariaLabelledBy: s
4529
- }), d = o === "stacked", { commitAfterChange: h, gestureHandlers: p } = xt(a);
4535
+ }), d = o === "stacked", { commitAfterChange: h, gestureHandlers: p } = wt(a);
4530
4536
  return /* @__PURE__ */ r(fa, {
4531
4537
  className: Ih,
4532
4538
  value: t,
@@ -4586,7 +4592,7 @@ var ja = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
4586
4592
  case "bar":
4587
4593
  return e.coordSystem.type === "polar" && e.coordSystem.bandAxis === null ? "editor.overlayMenu.thisSlice" : "editor.overlayMenu.thisBar";
4588
4594
  case "point":
4589
- return vt(t.mapping.size) === null ? "editor.overlayMenu.thisPoint" : "editor.overlayMenu.thisBubble";
4595
+ return bt(t.mapping.size) === null ? "editor.overlayMenu.thisPoint" : "editor.overlayMenu.thisBubble";
4590
4596
  default:
4591
4597
  return "editor.overlayMenu.thisPoint";
4592
4598
  }
@@ -4598,7 +4604,7 @@ var ja = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
4598
4604
  const o = xs(t.data, t.mapping);
4599
4605
  return o.length === 0 ? _h(e, t) : o.map((i) => Fh(n[i] ?? null, a)).join(", ");
4600
4606
  }, _h = (e, t) => {
4601
- const n = vt(t.mapping.y), a = n === null ? void 0 : e.guides.variableLabels[n];
4607
+ const n = bt(t.mapping.y), a = n === null ? void 0 : e.guides.variableLabels[n];
4602
4608
  return a === void 0 || a === "" ? null : a;
4603
4609
  }, Fh = (e, t) => {
4604
4610
  const n = String(e instanceof Date ? e.getTime() : e);
@@ -4623,17 +4629,17 @@ var ja = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
4623
4629
  ]);
4624
4630
  if (s === null) return null;
4625
4631
  const { layer: c, levels: u, names: d } = s, { observationIndex: h, selectedFor: p } = s.pressed, g = u.map((f) => {
4626
- const S = zh[f];
4632
+ const C = zh[f];
4627
4633
  return {
4628
4634
  value: f,
4629
4635
  label: d[f],
4630
- icon: /* @__PURE__ */ r(S, {})
4636
+ icon: /* @__PURE__ */ r(C, {})
4631
4637
  };
4632
4638
  }), v = (f) => {
4633
- const S = u.find((T) => T === f), { parsingLocale: w } = o.config, y = S === void 0 ? null : mt({
4639
+ const C = u.find((A) => A === f), { parsingLocale: w } = o.config, y = C === void 0 ? null : vt({
4634
4640
  layer: c,
4635
4641
  observationIndex: h,
4636
- scope: S,
4642
+ scope: C,
4637
4643
  parsingLocale: w
4638
4644
  });
4639
4645
  y !== null && (t.getState().setPressedObservation({
@@ -4722,7 +4728,7 @@ var ja = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
4722
4728
  children: Vh(a.target, t)
4723
4729
  }),
4724
4730
  a.target.kind === "observations" && /* @__PURE__ */ r(Bh, {}),
4725
- /* @__PURE__ */ r(js, { children: o }, gt(a.target))
4731
+ /* @__PURE__ */ r(js, { children: o }, ft(a.target))
4726
4732
  ]
4727
4733
  });
4728
4734
  }, Kh = ({ frameRect: e }) => {
@@ -4739,10 +4745,10 @@ var ja = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
4739
4745
  },
4740
4746
  frameSpans: s,
4741
4747
  clientSpans: {
4742
- top: je(s.top, a, c),
4743
- right: je(s.right, o, c),
4744
- bottom: je(s.bottom, a, c),
4745
- left: je(s.left, o, c)
4748
+ top: Ye(s.top, a, c),
4749
+ right: Ye(s.right, o, c),
4750
+ bottom: Ye(s.bottom, a, c),
4751
+ left: Ye(s.left, o, c)
4746
4752
  }
4747
4753
  };
4748
4754
  }, [
@@ -4753,7 +4759,7 @@ var ja = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
4753
4759
  return Pe(() => {
4754
4760
  t.getState().setBoundary(i);
4755
4761
  }, [t, i]), Pe(() => () => t.getState().setBoundary(null), [t]), null;
4756
- }, je = (e, t, n) => ({
4762
+ }, Ye = (e, t, n) => ({
4757
4763
  from: t + e.from * n,
4758
4764
  to: t + e.to * n
4759
4765
  }), Qa = (e) => /* @__PURE__ */ m(k, {
@@ -4790,7 +4796,7 @@ var eo = "efjmb40", to = "efjmb41", Oe = "efjmb42", Me = "efjmb43", qh = "efjmb4
4790
4796
  "sibling-open",
4791
4797
  "trigger-press"
4792
4798
  ]), bn = ({ label: e, icon: t, onOpened: n, children: a }) => {
4793
- const o = Ct(), [i, l] = te(!1), s = (c, u) => {
4799
+ const o = xt(), [i, l] = te(!1), s = (c, u) => {
4794
4800
  c ? (l(!0), n?.()) : Zh.has(u.reason) && l(!1);
4795
4801
  };
4796
4802
  return /* @__PURE__ */ m(Se.SubmenuRoot, {
@@ -4825,11 +4831,11 @@ var eo = "efjmb40", to = "efjmb41", Oe = "efjmb42", Me = "efjmb43", qh = "efjmb4
4825
4831
  }),
4826
4832
  /* @__PURE__ */ r("span", {
4827
4833
  className: Xh,
4828
- children: /* @__PURE__ */ r(We, { size: "sm" })
4834
+ children: /* @__PURE__ */ r(Ke, { size: "sm" })
4829
4835
  })
4830
4836
  ]
4831
4837
  }), Yh = "_1qe7q450", Jh = "_1qe7q451", Qh = "_1qe7q452", e1 = ({ label: e, placeholder: t, addLabel: n, at: a, onRequestClose: o }) => {
4832
- const i = ne(null), [l, s] = te(""), { dispatch: c } = he(), u = l.trim(), d = () => {
4838
+ const i = ne(null), [l, s] = te(""), { dispatch: c } = pe(), u = l.trim(), d = () => {
4833
4839
  u.length !== 0 && (c(new ye({
4834
4840
  kind: "comment",
4835
4841
  annotation: {
@@ -4884,7 +4890,7 @@ var eo = "efjmb40", to = "efjmb41", Oe = "efjmb42", Me = "efjmb43", qh = "efjmb4
4884
4890
  fillOpacity: "0.8"
4885
4891
  })
4886
4892
  }), r1 = "relative-difference", a1 = ({ label: e, layer: t, at: n, onRequestClose: a }) => {
4887
- const { dispatch: o } = he(), i = D((c) => c.coordSystem), l = I(() => Ps({
4893
+ const { dispatch: o } = pe(), i = D((c) => c.coordSystem), l = I(() => Ps({
4888
4894
  layer: t,
4889
4895
  at: n,
4890
4896
  coordSystem: i
@@ -4963,7 +4969,7 @@ function o1(e, t) {
4963
4969
  }
4964
4970
  }
4965
4971
  var i1 = (e) => {
4966
- const t = vt(e.mapping.x);
4972
+ const t = bt(e.mapping.x);
4967
4973
  return t !== null && t !== tl.x;
4968
4974
  }, l1 = (e) => /* @__PURE__ */ m(k, {
4969
4975
  viewBox: "0 0 16 16",
@@ -5245,7 +5251,7 @@ var i1 = (e) => {
5245
5251
  }, o.scope))
5246
5252
  });
5247
5253
  }, g1 = ({ label: e, layer: t, observation: n, highlights: a, onRequestClose: o }) => {
5248
- const i = E(), { dispatch: l } = he(), s = D((g) => g.coordSystem), c = I(() => as(t, n), [t, n]), u = I(() => o1(s, t), [s, t]), d = I(() => {
5254
+ const i = E(), { dispatch: l } = pe(), s = D((g) => g.coordSystem), c = I(() => as(t, n), [t, n]), u = I(() => o1(s, t), [s, t]), d = I(() => {
5249
5255
  const g = new Set(a.map((v) => v.scope));
5250
5256
  return u.filter((v) => !g.has(v.scope));
5251
5257
  }, [u, a]), [h] = d;
@@ -5278,7 +5284,7 @@ var i1 = (e) => {
5278
5284
  "aria-hidden": "true",
5279
5285
  children: [e, /* @__PURE__ */ r("span", { className: f1 })]
5280
5286
  }), b1 = ({ label: e, highlights: t, onRequestClose: n }) => {
5281
- const { dispatch: a } = he(), o = t.at(-1);
5287
+ const { dispatch: a } = pe(), o = t.at(-1);
5282
5288
  if (o === void 0) return null;
5283
5289
  const i = () => {
5284
5290
  a(new ul({ id: o.id })), n();
@@ -5328,7 +5334,7 @@ var i1 = (e) => {
5328
5334
  })
5329
5335
  ]
5330
5336
  }), S1 = ({ label: e, at: t, onRequestClose: n }) => {
5331
- const { dispatch: a } = he(), o = () => {
5337
+ const { dispatch: a } = pe(), o = () => {
5332
5338
  a(new ye({
5333
5339
  kind: "pinnedNumber",
5334
5340
  annotation: { at: t }
@@ -5390,7 +5396,7 @@ var i1 = (e) => {
5390
5396
  },
5391
5397
  image: null
5392
5398
  }, C1 = (e) => Is(e.kind) && lo[e.kind] !== null, x1 = ({ attachment: e, onRequestClose: t }) => {
5393
- const n = E(), { dispatch: a } = he(), { icon: o, labelKey: i } = lo[e.kind], l = () => {
5399
+ const n = E(), { dispatch: a } = pe(), { icon: o, labelKey: i } = lo[e.kind], l = () => {
5394
5400
  a(new ze({ id: e.annotation.id })), t();
5395
5401
  };
5396
5402
  return /* @__PURE__ */ m(B.Item, {
@@ -5402,7 +5408,7 @@ var i1 = (e) => {
5402
5408
  })]
5403
5409
  });
5404
5410
  }, w1 = "ceeojg0", T1 = "ceeojg1", A1 = "ceeojg2", k1 = ({ label: e, at: t, onRequestClose: n }) => {
5405
- const { dispatch: a } = he(), o = (i) => {
5411
+ const { dispatch: a } = pe(), o = (i) => {
5406
5412
  a(new ye({
5407
5413
  kind: "sticker",
5408
5414
  annotation: {
@@ -5451,7 +5457,7 @@ var i1 = (e) => {
5451
5457
  onClose: i
5452
5458
  });
5453
5459
  }, P1 = ({ frameElement: e, trigger: t, layer: n, at: a, observation: o, onClose: i }) => {
5454
- const l = E(), s = Ct(), c = D((x) => x.spec.annotations), u = D((x) => x.config.parsingLocale), d = $a(), { x: h, y: p, width: g, height: v } = t, f = I(() => Va(e, {
5460
+ const l = E(), s = xt(), c = D((S) => S.spec.annotations), u = D((S) => S.config.parsingLocale), d = $a(), { x: h, y: p, width: g, height: v } = t, f = I(() => Va(e, {
5455
5461
  x: h,
5456
5462
  y: p,
5457
5463
  width: g,
@@ -5462,13 +5468,13 @@ var i1 = (e) => {
5462
5468
  p,
5463
5469
  g,
5464
5470
  v
5465
- ]), S = ys(c, a, I(() => ds(n, u), [n, u])), w = S !== null && C1(S) ? S : null, y = y1(n, o), T = (x, N) => {
5466
- !x && I1(N.reason) && i();
5471
+ ]), C = ys(c, a, I(() => ds(n, u), [n, u])), w = C !== null && C1(C) ? C : null, y = y1(n, o), A = (S, O) => {
5472
+ !S && I1(O.reason) && i();
5467
5473
  };
5468
5474
  return /* @__PURE__ */ r(B.Root, {
5469
5475
  open: d,
5470
5476
  modal: !1,
5471
- onOpenChange: T,
5477
+ onOpenChange: A,
5472
5478
  children: /* @__PURE__ */ r(B.Portal, {
5473
5479
  container: s,
5474
5480
  children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(B.Positioner, {
@@ -5552,13 +5558,13 @@ var i1 = (e) => {
5552
5558
  ...t.point
5553
5559
  }
5554
5560
  }), uo = (e, t) => e.x === t.x && e.y === t.y, E1 = (e, t) => {
5555
- const n = nt(e, t);
5561
+ const n = rt(e, t);
5556
5562
  return {
5557
5563
  x: t.x + n.x,
5558
5564
  y: t.y + n.y
5559
5565
  };
5560
5566
  }, O1 = (e, t, n) => {
5561
- const a = nt(e, n), o = nt(t, n);
5567
+ const a = rt(e, n), o = rt(t, n);
5562
5568
  return {
5563
5569
  x: Math.min(a.x, o.x),
5564
5570
  y: Math.min(a.y, o.y),
@@ -5593,10 +5599,10 @@ var i1 = (e) => {
5593
5599
  isAddressable: !1
5594
5600
  })
5595
5601
  });
5596
- }, Ke = () => {
5602
+ }, qe = () => {
5597
5603
  const e = sn();
5598
- return Xt(e);
5599
- }, Xt = (e) => {
5604
+ return Zt(e);
5605
+ }, Zt = (e) => {
5600
5606
  if (e.length !== 1) return null;
5601
5607
  const [t] = e;
5602
5608
  return t?.kind === "annotation" ? t.id : null;
@@ -5655,7 +5661,7 @@ var i1 = (e) => {
5655
5661
  })
5656
5662
  ]
5657
5663
  })
5658
- }), wt = (e) => /* @__PURE__ */ r(k, {
5664
+ }), Tt = (e) => /* @__PURE__ */ r(k, {
5659
5665
  ...e,
5660
5666
  children: /* @__PURE__ */ m("g", {
5661
5667
  stroke: "currentColor",
@@ -5695,8 +5701,8 @@ var i1 = (e) => {
5695
5701
  "aria-label": o,
5696
5702
  className: z1,
5697
5703
  "data-testid": i,
5698
- ...St(s),
5699
- style: bt({
5704
+ ...Ct(s),
5705
+ style: We({
5700
5706
  [D1]: `${c.centre}px`,
5701
5707
  [_1]: `${c.available}px`
5702
5708
  }),
@@ -5715,9 +5721,9 @@ var i1 = (e) => {
5715
5721
  className: V1,
5716
5722
  disabled: o,
5717
5723
  onMouseDown: (s) => s.preventDefault(),
5718
- children: [t, /* @__PURE__ */ r(We, { size: "sm" })]
5724
+ children: [t, /* @__PURE__ */ r(Ke, { size: "sm" })]
5719
5725
  }), /* @__PURE__ */ r(q.MenuPopup, {
5720
- popupAttributes: St(l),
5726
+ popupAttributes: Ct(l),
5721
5727
  children: i
5722
5728
  })]
5723
5729
  });
@@ -5725,7 +5731,7 @@ var i1 = (e) => {
5725
5731
  const { chartId: t } = z();
5726
5732
  return /* @__PURE__ */ r(q.ColorPicker, {
5727
5733
  ...e,
5728
- popupAttributes: St(t)
5734
+ popupAttributes: Ct(t)
5729
5735
  });
5730
5736
  }, q1 = ({ color: e, opacity: t }) => /* @__PURE__ */ r("span", {
5731
5737
  className: B1,
@@ -5754,7 +5760,7 @@ var i1 = (e) => {
5754
5760
  ToggleButton: Z1,
5755
5761
  Button: q.Button,
5756
5762
  Separator: q.Separator
5757
- }, j1 = { kind: "chrome-popup" }, Tt = () => {
5763
+ }, j1 = { kind: "chrome-popup" }, At = () => {
5758
5764
  const { commands: e } = z(), t = H(), [n, a] = te(null);
5759
5765
  F(() => () => e.commit(), [e]), F(() => {
5760
5766
  const { claimInteraction: i, releaseInteraction: l } = t.getState();
@@ -5806,15 +5812,15 @@ var i1 = (e) => {
5806
5812
  })
5807
5813
  }), ep = [
5808
5814
  {
5809
- value: Ot.thin,
5815
+ value: Mt.thin,
5810
5816
  key: "graph.annotations.arrowToolbar.thickness.thin"
5811
5817
  },
5812
5818
  {
5813
- value: Ot.medium,
5819
+ value: Mt.medium,
5814
5820
  key: "graph.annotations.arrowToolbar.thickness.medium"
5815
5821
  },
5816
5822
  {
5817
- value: Ot.thick,
5823
+ value: Mt.thick,
5818
5824
  key: "graph.annotations.arrowToolbar.thickness.thick"
5819
5825
  }
5820
5826
  ], ir = [{
@@ -5843,14 +5849,14 @@ var i1 = (e) => {
5843
5849
  }
5844
5850
  ], tp = (e, t) => e.find((n) => n.value === t) ?? e[0];
5845
5851
  var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
5846
- const l = E(), { commands: s } = z(), c = D((C) => C.spec.styles.overrides), u = Tt(), d = hn(Q(), e.id), h = tp(lr, Ht(d.dashArray)), p = d.outline.strokeWidth > 0 || d.outline.shadow !== "none", g = I(() => ({
5852
+ const l = E(), { commands: s } = z(), c = D((x) => x.spec.styles.overrides), u = At(), d = hn(Q(), e.id), h = tp(lr, Gt(d.dashArray)), p = d.outline.strokeWidth > 0 || d.outline.shadow !== "none", g = I(() => ({
5847
5853
  target: "annotation",
5848
5854
  kind: "arrow",
5849
5855
  annotation: e.id
5850
5856
  }), [e.id]), v = I(() => ({
5851
5857
  ...g,
5852
5858
  part: "outline"
5853
- }), [g]), f = (C, b) => {
5859
+ }), [g]), f = (x, b) => {
5854
5860
  const U = Ce(c, { select: g })?.declarations ?? {};
5855
5861
  s.dispatch(new ke({
5856
5862
  list: "overrides",
@@ -5858,11 +5864,11 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5858
5864
  select: g,
5859
5865
  declarations: {
5860
5866
  ...U,
5861
- ...C
5867
+ ...x
5862
5868
  }
5863
5869
  }
5864
5870
  }), b);
5865
- }, S = (C) => {
5871
+ }, C = (x) => {
5866
5872
  const b = Ce(c, { select: v })?.declarations ?? {};
5867
5873
  s.dispatch(new ke({
5868
5874
  list: "overrides",
@@ -5870,21 +5876,21 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5870
5876
  select: v,
5871
5877
  declarations: {
5872
5878
  ...b,
5873
- ...C
5879
+ ...x
5874
5880
  }
5875
5881
  }
5876
5882
  }));
5877
- }, w = (C) => {
5878
- f(C), u.close();
5879
- }, y = (C) => {
5880
- s.dispatch(new le({
5883
+ }, w = (x) => {
5884
+ f(x), u.close();
5885
+ }, y = (x) => {
5886
+ s.dispatch(new se({
5881
5887
  kind: "arrow",
5882
5888
  id: e.id,
5883
- patch: C
5889
+ patch: x
5884
5890
  })), u.close();
5885
- }, T = () => {
5891
+ }, A = () => {
5886
5892
  s.dispatch(new ze({ id: e.id })), i.focus({ preventScroll: !0 });
5887
- }, x = (C) => f({ stroke: C }, { transient: !0 }), N = (C) => w({ strokeWidth: C }), L = (C) => y({ startArrowheadStyle: C }), O = (C) => w({ dashArray: nl.arrow[C] }), _ = (C) => y({ endArrowheadStyle: C }), M = () => S(p ? {
5893
+ }, S = (x) => f({ stroke: x }, { transient: !0 }), O = (x) => w({ strokeWidth: x }), L = (x) => y({ startArrowheadStyle: x }), M = (x) => w({ dashArray: nl.arrow[x] }), _ = (x) => y({ endArrowheadStyle: x }), N = () => C(p ? {
5888
5894
  strokeWidth: 0,
5889
5895
  shadow: "none"
5890
5896
  } : Qi);
@@ -5899,7 +5905,7 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5899
5905
  /* @__PURE__ */ r(R.ColorPicker, {
5900
5906
  color: d.stroke,
5901
5907
  label: l("graph.annotations.arrowToolbar.color"),
5902
- onChange: x,
5908
+ onChange: S,
5903
5909
  ...u.bind("color"),
5904
5910
  children: /* @__PURE__ */ r(R.Swatch, { color: d.stroke })
5905
5911
  }),
@@ -5910,10 +5916,10 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5910
5916
  title: ""
5911
5917
  }),
5912
5918
  ...u.bind("thickness"),
5913
- children: /* @__PURE__ */ r(Ye, {
5919
+ children: /* @__PURE__ */ r(Je, {
5914
5920
  options: ep,
5915
5921
  current: d.strokeWidth,
5916
- onPick: N
5922
+ onPick: O
5917
5923
  })
5918
5924
  }),
5919
5925
  /* @__PURE__ */ r(R.Dropdown, {
@@ -5923,7 +5929,7 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5923
5929
  title: ""
5924
5930
  }),
5925
5931
  ...u.bind("startArrowhead"),
5926
- children: /* @__PURE__ */ r(Ye, {
5932
+ children: /* @__PURE__ */ r(Je, {
5927
5933
  options: ir,
5928
5934
  current: e.startArrowheadStyle,
5929
5935
  onPick: L
@@ -5936,10 +5942,10 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5936
5942
  title: ""
5937
5943
  }),
5938
5944
  ...u.bind("lineStyle"),
5939
- children: /* @__PURE__ */ r(Ye, {
5945
+ children: /* @__PURE__ */ r(Je, {
5940
5946
  options: lr,
5941
- current: Ht(d.dashArray),
5942
- onPick: O
5947
+ current: Gt(d.dashArray),
5948
+ onPick: M
5943
5949
  })
5944
5950
  }),
5945
5951
  /* @__PURE__ */ r(R.Dropdown, {
@@ -5949,7 +5955,7 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5949
5955
  title: ""
5950
5956
  }),
5951
5957
  ...u.bind("endArrowhead"),
5952
- children: /* @__PURE__ */ r(Ye, {
5958
+ children: /* @__PURE__ */ r(Je, {
5953
5959
  options: ir,
5954
5960
  current: e.endArrowheadStyle,
5955
5961
  onPick: _
@@ -5958,7 +5964,7 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5958
5964
  /* @__PURE__ */ r(R.ToggleButton, {
5959
5965
  label: l("graph.annotations.arrowToolbar.sticker"),
5960
5966
  isPressed: p,
5961
- onClick: M,
5967
+ onClick: N,
5962
5968
  children: /* @__PURE__ */ r(R1, {
5963
5969
  size: "sm",
5964
5970
  title: ""
@@ -5967,15 +5973,15 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5967
5973
  /* @__PURE__ */ r(R.Separator, {}),
5968
5974
  /* @__PURE__ */ r(R.IconButton, {
5969
5975
  label: l("graph.annotations.arrowToolbar.remove"),
5970
- onClick: T,
5971
- children: /* @__PURE__ */ r(wt, {
5976
+ onClick: A,
5977
+ children: /* @__PURE__ */ r(Tt, {
5972
5978
  size: "sm",
5973
5979
  title: ""
5974
5980
  })
5975
5981
  })
5976
5982
  ]
5977
5983
  });
5978
- }, Ye = ({ options: e, current: t, onPick: n }) => {
5984
+ }, Je = ({ options: e, current: t, onPick: n }) => {
5979
5985
  const a = E(), o = (i) => () => n(i);
5980
5986
  return /* @__PURE__ */ r(Y, { children: e.map((i) => /* @__PURE__ */ m(R.MenuItem, {
5981
5987
  isSelected: i.value === t,
@@ -5988,14 +5994,14 @@ var np = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
5988
5994
  })
5989
5995
  })]
5990
5996
  }, String(i.value))) });
5991
- }, rp = "_1me29t10", ie = (e, t) => t > 0 ? e / t : 0, At = (e, t, n) => ({
5992
- x: ie(t.x - e.x, n.width),
5993
- y: ie(t.y - e.y, n.height)
5997
+ }, rp = "_1me29t10", le = (e, t) => t > 0 ? e / t : 0, kt = (e, t, n) => ({
5998
+ x: le(t.x - e.x, n.width),
5999
+ y: le(t.y - e.y, n.height)
5994
6000
  }), ap = (e) => e.x !== 0 || e.y !== 0, mo = (e, t) => ({
5995
6001
  x: e.x * t.width,
5996
6002
  y: e.y * t.height
5997
6003
  });
5998
- var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6004
+ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Xe = class {
5999
6005
  constructor(e) {
6000
6006
  this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasMoved = !1, this.hasPublished = !1, this.handleMove = (t) => {
6001
6007
  t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.hasMoved = !0, this.scheduledFrame === null && (this.scheduledFrame = requestAnimationFrame(this.runFrame)));
@@ -6041,21 +6047,21 @@ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6041
6047
  cancelFrame() {
6042
6048
  this.scheduledFrame !== null && (cancelAnimationFrame(this.scheduledFrame), this.scheduledFrame = null);
6043
6049
  }
6044
- }, it = (e, t, n) => {
6050
+ }, lt = (e, t, n) => {
6045
6051
  const a = e.arrows.find((i) => i.id === t);
6046
6052
  if (a === void 0) return null;
6047
6053
  const o = a[n];
6048
6054
  return o.anchorType === "panel" ? o : null;
6049
- }, go = (e, t) => e === "start" ? { start: t } : { end: t }, ip = class extends qe {
6055
+ }, go = (e, t) => e === "start" ? { start: t } : { end: t }, ip = class extends Xe {
6050
6056
  constructor(...e) {
6051
6057
  super(...e), this.kind = "arrow-endpoint-drag";
6052
6058
  }
6053
6059
  readOwn(e) {
6054
6060
  const { annotationId: t, endpoint: n } = this.params;
6055
- return nn($(e, "arrow-endpoint-drag"), t, n);
6061
+ return rn($(e, "arrow-endpoint-drag"), t, n);
6056
6062
  }
6057
6063
  resolvePreview(e) {
6058
- const { annotationId: t, endpoint: n, press: a, readInputs: o } = this.params, { annotations: i, arrow: l, panelRect: s } = o(), c = it(i, t, n);
6064
+ const { annotationId: t, endpoint: n, press: a, readInputs: o } = this.params, { annotations: i, arrow: l, panelRect: s } = o(), c = lt(i, t, n);
6059
6065
  return c === null ? null : {
6060
6066
  kind: "arrow-endpoint-drag",
6061
6067
  annotationId: t,
@@ -6063,13 +6069,13 @@ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6063
6069
  ...co({
6064
6070
  anchor: c,
6065
6071
  point: l[n],
6066
- delta: At(a, e, s)
6072
+ delta: kt(a, e, s)
6067
6073
  })
6068
6074
  };
6069
6075
  }
6070
6076
  commit({ anchor: e }) {
6071
- const { annotationId: t, endpoint: n, dispatch: a, readInputs: o } = this.params, i = it(o().annotations, t, n);
6072
- i === null || uo(i, e) || a(new le({
6077
+ const { annotationId: t, endpoint: n, dispatch: a, readInputs: o } = this.params, i = lt(o().annotations, t, n);
6078
+ i === null || uo(i, e) || a(new se({
6073
6079
  kind: "arrow",
6074
6080
  id: t,
6075
6081
  patch: go(n, e)
@@ -6081,7 +6087,7 @@ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6081
6087
  arrow: t,
6082
6088
  panelRect: n
6083
6089
  }), l = ne(null);
6084
- return F(() => () => l.current?.finish(!1), []), oe((s) => ({ onPointerDown: (c) => {
6090
+ return F(() => () => l.current?.finish(!1), []), ie((s) => ({ onPointerDown: (c) => {
6085
6091
  if (c.button === 0 && l.current === null) {
6086
6092
  try {
6087
6093
  c.currentTarget.setPointerCapture(c.pointerId);
@@ -6126,9 +6132,9 @@ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6126
6132
  e,
6127
6133
  l,
6128
6134
  s
6129
- ]), oe((c) => ({ onKeyDown: (u) => {
6135
+ ]), ie((c) => ({ onKeyDown: (u) => {
6130
6136
  if (u.altKey || u.ctrlKey || u.metaKey || u.shiftKey) return;
6131
- const d = o.getState(), h = nn($(d, "arrow-endpoint-drag"), e, c);
6137
+ const d = o.getState(), h = rn($(d, "arrow-endpoint-drag"), e, c);
6132
6138
  if (sp.includes(u.key)) {
6133
6139
  if (u.preventDefault(), u.repeat) return;
6134
6140
  if (h !== null) {
@@ -6141,7 +6147,7 @@ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6141
6147
  });
6142
6148
  return;
6143
6149
  }
6144
- const g = it(i, e, c);
6150
+ const g = lt(i, e, c);
6145
6151
  if (g === null) return;
6146
6152
  d.claimInteraction({
6147
6153
  kind: "arrow-endpoint-drag",
@@ -6173,17 +6179,17 @@ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6173
6179
  a
6174
6180
  ]);
6175
6181
  }, cr = ({ editorStore: e, annotationId: t, endpoint: n, annotations: a, dispatch: o }) => {
6176
- const i = e.getState(), l = nn($(i, "arrow-endpoint-drag"), t, n);
6182
+ const i = e.getState(), l = rn($(i, "arrow-endpoint-drag"), t, n);
6177
6183
  if (l === null) return;
6178
6184
  i.releaseInteraction("arrow-endpoint-drag");
6179
- const s = it(a, t, n);
6180
- s === null || uo(s, l.anchor) || o(new le({
6185
+ const s = lt(a, t, n);
6186
+ s === null || uo(s, l.anchor) || o(new se({
6181
6187
  kind: "arrow",
6182
6188
  id: t,
6183
6189
  patch: go(n, l.anchor)
6184
6190
  }));
6185
6191
  }, dp = (e, t) => {
6186
- const n = ie(sr, t.width), a = ie(sr, t.height);
6192
+ const n = le(sr, t.width), a = le(sr, t.height);
6187
6193
  switch (e) {
6188
6194
  case "ArrowLeft":
6189
6195
  return {
@@ -6209,7 +6215,7 @@ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6209
6215
  return null;
6210
6216
  }
6211
6217
  }, up = (e) => {
6212
- const t = Ke(), n = mp(t), a = gp(e.panelRect, t), o = vp(t);
6218
+ const t = qe(), n = mp(t), a = gp(e.panelRect, t), o = vp(t);
6213
6219
  if (n === null || a === null) return null;
6214
6220
  const i = o.dragged === null ? a : Sn(a, o.dragged);
6215
6221
  return /* @__PURE__ */ r(hp, {
@@ -6267,7 +6273,7 @@ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6267
6273
  }, gp = (e, t) => {
6268
6274
  const n = Ie(e).arrows;
6269
6275
  return t === null ? null : n.find((a) => a.id === t) ?? null;
6270
- }, vp = (e) => X(me((t) => {
6276
+ }, vp = (e) => X(ge((t) => {
6271
6277
  if (e === null) return {
6272
6278
  dragged: null,
6273
6279
  isMoved: !1
@@ -6275,7 +6281,7 @@ var op = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, qe = class {
6275
6281
  const n = $(t, "arrow-endpoint-drag");
6276
6282
  return {
6277
6283
  dragged: n?.annotationId === e ? n : null,
6278
- isMoved: ut($(t, "move-drag"), e) !== null
6284
+ isMoved: pt($(t, "move-drag"), e) !== null
6279
6285
  };
6280
6286
  })), fp = (e) => /* @__PURE__ */ r(k, {
6281
6287
  ...e,
@@ -6327,44 +6333,44 @@ var Cp = [
6327
6333
  key: "graph.annotations.differenceArrowToolbar.size.large"
6328
6334
  }
6329
6335
  ], Ap = ({ arrow: e, color: t, labelBox: n, panelRect: a, frameWidth: o, frameHeight: i, frameElement: l }) => {
6330
- const s = E(), { commands: c } = z(), u = D((b) => b.spec.styles.overrides), d = Tt(), h = Tp(e), p = qs(Q(), e.id), g = I(() => ({
6336
+ const s = E(), { commands: c } = z(), u = D((b) => b.spec.styles.overrides), d = At(), h = Tp(e), p = qs(Q(), e.id), g = I(() => ({
6331
6337
  target: "annotation",
6332
6338
  kind: "differenceArrow",
6333
6339
  annotation: e.id
6334
6340
  }), [e.id]), v = I(() => ({
6335
6341
  ...g,
6336
6342
  part: "label"
6337
- }), [g]), f = h.find((b) => b.kind === e.label), S = h.some((b) => b.isPickable && b.kind !== e.label), w = ur.find((b) => Rn[b.id].arrow.strokeWidth === p.strokeWidth), y = (b, U) => {
6338
- c.dispatch(new le({
6343
+ }), [g]), f = h.find((b) => b.kind === e.label), C = h.some((b) => b.isPickable && b.kind !== e.label), w = ur.find((b) => Rn[b.id].arrow.strokeWidth === p.strokeWidth), y = (b, U) => {
6344
+ c.dispatch(new se({
6339
6345
  kind: "differenceArrow",
6340
6346
  id: e.id,
6341
6347
  patch: b
6342
6348
  }), U);
6343
- }, T = (b) => ({
6349
+ }, A = (b) => ({
6344
6350
  ...Ce(u, { select: g })?.declarations,
6345
6351
  ...b
6346
- }), x = (b) => ({
6352
+ }), S = (b) => ({
6347
6353
  ...Ce(u, { select: v })?.declarations,
6348
6354
  ...b
6349
- }), N = (b) => {
6355
+ }), O = (b) => {
6350
6356
  y(b), d.close();
6351
6357
  }, L = () => {
6352
6358
  c.dispatch(new ze({ id: e.id })), l.focus({ preventScroll: !0 });
6353
- }, O = (b) => c.dispatch(new ke({
6359
+ }, M = (b) => c.dispatch(new ke({
6354
6360
  list: "overrides",
6355
6361
  rule: {
6356
6362
  select: g,
6357
- declarations: T({ stroke: b })
6363
+ declarations: A({ stroke: b })
6358
6364
  }
6359
6365
  }), { transient: !0 }), _ = () => y({
6360
6366
  start: e.end.anchor,
6361
6367
  end: e.start.anchor
6362
- }), M = (b) => () => N({ label: b }), C = (b) => () => {
6368
+ }), N = (b) => () => O({ label: b }), x = (b) => () => {
6363
6369
  const U = Rn[b];
6364
6370
  c.dispatch(new xl({
6365
6371
  annotationId: e.id,
6366
- arrow: T(U.arrow),
6367
- label: x(U.label)
6372
+ arrow: A(U.arrow),
6373
+ label: S(U.label)
6368
6374
  })), d.close();
6369
6375
  };
6370
6376
  return /* @__PURE__ */ m(R.Root, {
@@ -6378,12 +6384,12 @@ var Cp = [
6378
6384
  /* @__PURE__ */ r(R.Dropdown, {
6379
6385
  label: s("graph.annotations.differenceArrowToolbar.labelKind.ariaLabel"),
6380
6386
  trigger: /* @__PURE__ */ r(kp, { option: f }),
6381
- isDisabled: !S,
6387
+ isDisabled: !C,
6382
6388
  ...d.bind("labelKind"),
6383
6389
  children: h.map((b) => /* @__PURE__ */ m(R.MenuItem, {
6384
6390
  isSelected: b.kind === e.label,
6385
6391
  isDisabled: !b.isPickable,
6386
- onClick: M(b.kind),
6392
+ onClick: N(b.kind),
6387
6393
  children: [
6388
6394
  /* @__PURE__ */ r("span", { children: s(b.key) }),
6389
6395
  (b.isSuspect || !b.isPickable) && /* @__PURE__ */ r("span", {
@@ -6403,7 +6409,7 @@ var Cp = [
6403
6409
  /* @__PURE__ */ r(R.ColorPicker, {
6404
6410
  color: t,
6405
6411
  label: s("graph.annotations.differenceArrowToolbar.color"),
6406
- onChange: O,
6412
+ onChange: M,
6407
6413
  ...d.bind("color"),
6408
6414
  children: /* @__PURE__ */ r(R.Swatch, { color: t })
6409
6415
  }),
@@ -6413,7 +6419,7 @@ var Cp = [
6413
6419
  ...d.bind("size"),
6414
6420
  children: ur.map((b) => /* @__PURE__ */ r(R.MenuItem, {
6415
6421
  isSelected: b.id === w?.id,
6416
- onClick: C(b.id),
6422
+ onClick: x(b.id),
6417
6423
  children: s(b.key)
6418
6424
  }, b.id))
6419
6425
  }),
@@ -6429,7 +6435,7 @@ var Cp = [
6429
6435
  /* @__PURE__ */ r(R.IconButton, {
6430
6436
  label: s("graph.annotations.differenceArrowToolbar.remove"),
6431
6437
  onClick: L,
6432
- children: /* @__PURE__ */ r(wt, {
6438
+ children: /* @__PURE__ */ r(Tt, {
6433
6439
  size: "sm",
6434
6440
  title: ""
6435
6441
  })
@@ -6454,7 +6460,7 @@ var Lp = "ydgo3h0", Pp = "ydgo3h1", Ip = "ydgo3h2", Ep = ({ clientPoint: e, pane
6454
6460
  const u = Op({
6455
6461
  x: e.x - t.x,
6456
6462
  y: e.y - t.y
6457
- }, n), { primary: d } = a.query(ft(u, n));
6463
+ }, n), { primary: d } = a.query(yt(u, n));
6458
6464
  if (d === null) return null;
6459
6465
  const h = o.find((g) => g.id === d.layerId);
6460
6466
  if (h === void 0) return null;
@@ -6471,12 +6477,12 @@ var Lp = "ydgo3h0", Pp = "ydgo3h1", Ip = "ydgo3h2", Ep = ({ clientPoint: e, pane
6471
6477
  x: Math.max(0, Math.min(e.x, t.width)),
6472
6478
  y: Math.max(0, Math.min(e.y, t.height))
6473
6479
  }), vo = (e) => e === "start" ? "end" : "start", fo = ({ dispatch: e, arrow: t, endpoint: n, anchor: a }) => {
6474
- Qr(a, t[n].anchor) || e(new le({
6480
+ Qr(a, t[n].anchor) || e(new se({
6475
6481
  kind: "differenceArrow",
6476
6482
  id: t.id,
6477
6483
  patch: { [n]: a }
6478
6484
  }));
6479
- }, Mp = class extends qe {
6485
+ }, Mp = class extends Xe {
6480
6486
  constructor(...e) {
6481
6487
  super(...e), this.kind = "difference-arrow-endpoint-drag";
6482
6488
  }
@@ -6520,12 +6526,12 @@ var Lp = "ydgo3h0", Pp = "ydgo3h1", Ip = "ydgo3h2", Ep = ({ clientPoint: e, pane
6520
6526
  arrow: e,
6521
6527
  panelOrigin: t,
6522
6528
  panelRect: n,
6523
- ...D(me((u) => ({
6529
+ ...D(ge((u) => ({
6524
6530
  layers: u.layers,
6525
6531
  coordSystem: u.coordSystem
6526
6532
  })))
6527
6533
  }), c = ne(null);
6528
- return F(() => () => c.current?.finish(!1), []), oe((u) => ({ onPointerDown: (d) => {
6534
+ return F(() => () => c.current?.finish(!1), []), ie((u) => ({ onPointerDown: (d) => {
6529
6535
  if (d.button === 0 && c.current === null) {
6530
6536
  try {
6531
6537
  d.currentTarget.setPointerCapture(d.pointerId);
@@ -6558,7 +6564,7 @@ var Lp = "ydgo3h0", Pp = "ydgo3h1", Ip = "ydgo3h2", Ep = ({ clientPoint: e, pane
6558
6564
  a
6559
6565
  ]);
6560
6566
  }, Rp = [" ", "Enter"], Dp = ({ arrow: e }) => {
6561
- const { commands: t, anchorResolver: n } = z(), a = H(), { layers: o, coordSystem: i, mainAxis: l } = D(me((c) => ({
6567
+ const { commands: t, anchorResolver: n } = z(), a = H(), { layers: o, coordSystem: i, mainAxis: l } = D(ge((c) => ({
6562
6568
  layers: c.layers,
6563
6569
  coordSystem: c.coordSystem,
6564
6570
  mainAxis: zs(c.coordSystem)
@@ -6566,7 +6572,7 @@ var Lp = "ydgo3h0", Pp = "ydgo3h1", Ip = "ydgo3h2", Ep = ({ clientPoint: e, pane
6566
6572
  return F(() => () => {
6567
6573
  const c = a.getState();
6568
6574
  $(c, "difference-arrow-endpoint-drag")?.annotationId === s && c.releaseInteraction("difference-arrow-endpoint-drag");
6569
- }, [a, s]), oe((c) => ({ onKeyDown: (u) => {
6575
+ }, [a, s]), ie((c) => ({ onKeyDown: (u) => {
6570
6576
  if (u.altKey || u.ctrlKey || u.metaKey || u.shiftKey) return;
6571
6577
  const d = a.getState(), h = Fr($(d, "difference-arrow-endpoint-drag"), e.id, c);
6572
6578
  if (Rp.includes(u.key)) {
@@ -6642,7 +6648,7 @@ var Lp = "ydgo3h0", Pp = "ydgo3h1", Ip = "ydgo3h2", Ep = ({ clientPoint: e, pane
6642
6648
  })
6643
6649
  })?.point ?? null;
6644
6650
  }, zp = (e) => {
6645
- const t = Ke();
6651
+ const t = qe();
6646
6652
  return t === null ? null : /* @__PURE__ */ r(Bp, {
6647
6653
  annotationId: t,
6648
6654
  ...e
@@ -6722,7 +6728,7 @@ var Lp = "ydgo3h0", Pp = "ydgo3h1", Ip = "ydgo3h2", Ep = ({ clientPoint: e, pane
6722
6728
  "aria-hidden": "true",
6723
6729
  className: Pp
6724
6730
  })
6725
- }), Zt = ({ start: e, extent: t, isStartMoving: n, delta: a, minExtent: o }) => {
6731
+ }), jt = ({ start: e, extent: t, isStartMoving: n, delta: a, minExtent: o }) => {
6726
6732
  if (!Number.isFinite(a)) return {
6727
6733
  start: e,
6728
6734
  extent: t
@@ -6747,8 +6753,8 @@ var Lp = "ydgo3h0", Pp = "ydgo3h1", Ip = "ydgo3h2", Ep = ({ clientPoint: e, pane
6747
6753
  "bottom-left"
6748
6754
  ];
6749
6755
  var bo = ({ width: e, height: t }) => ({
6750
- x: ie(16, e),
6751
- y: ie(16, t)
6756
+ x: le(16, e),
6757
+ y: le(16, t)
6752
6758
  }), Vp = (e, t) => ({
6753
6759
  x: Co(t) ? e.x : e.x + e.width,
6754
6760
  y: xo(t) ? e.y : e.y + e.height
@@ -6758,13 +6764,13 @@ var bo = ({ width: e, height: t }) => ({
6758
6764
  width: e.width,
6759
6765
  height: e.height
6760
6766
  }), yo = ({ region: e, corner: t, delta: n, minSize: a }) => {
6761
- const o = Zt({
6767
+ const o = jt({
6762
6768
  start: e.x,
6763
6769
  extent: e.width,
6764
6770
  isStartMoving: Co(t),
6765
6771
  delta: n.x,
6766
6772
  minExtent: a.x
6767
- }), i = Zt({
6773
+ }), i = jt({
6768
6774
  start: e.y,
6769
6775
  extent: e.height,
6770
6776
  isStartMoving: xo(t),
@@ -6789,7 +6795,7 @@ var $p = {
6789
6795
  hovered: "_1ee8fau4 _1ee8fau3",
6790
6796
  selected: "_1ee8fau5 _1ee8fau3"
6791
6797
  }, Wp = ({ panelRect: e }) => {
6792
- const t = Ie(e), n = Ur(), a = Q(), o = Ke(), i = X((f) => $(f, "move-drag")), l = X((f) => $(f, "shape-resize-drag")), s = X((f) => $(f, "arrow-endpoint-drag")), c = X((f) => $(f, "text-resize-drag")), u = X(hi), d = I(() => ({
6798
+ const t = Ie(e), n = Ur(), a = Q(), o = qe(), i = X((f) => $(f, "move-drag")), l = X((f) => $(f, "shape-resize-drag")), s = X((f) => $(f, "arrow-endpoint-drag")), c = X((f) => $(f, "text-resize-drag")), u = X(hi), d = I(() => ({
6793
6799
  panel: {
6794
6800
  width: e.width,
6795
6801
  height: e.height
@@ -6803,20 +6809,20 @@ var $p = {
6803
6809
  a
6804
6810
  ]), h = pr(t, o, d), p = pr(t, u === o ? null : u, d), g = (f) => {
6805
6811
  if (l?.annotationId === f.id) {
6806
- const S = t.shapes.find((w) => w.id === f.id);
6807
- return S === void 0 ? f.geometry : Hr(Cn(l.region), a.annotation.shape(S.id).get("strokeWidth"), d.panel);
6812
+ const C = t.shapes.find((w) => w.id === f.id);
6813
+ return C === void 0 ? f.geometry : Hr(Cn(l.region), a.annotation.shape(C.id).get("strokeWidth"), d.panel);
6808
6814
  }
6809
6815
  if (s?.annotationId === f.id) {
6810
- const S = t.arrows.find((w) => w.id === f.id);
6811
- return S === void 0 ? f.geometry : Yi(Sn(S, s), d.panel) ?? f.geometry;
6816
+ const C = t.arrows.find((w) => w.id === f.id);
6817
+ return C === void 0 ? f.geometry : Yi(Sn(C, s), d.panel) ?? f.geometry;
6812
6818
  }
6813
6819
  return c?.annotationId === f.id ? wo(t, f.id, c, d) ?? f.geometry : f.geometry;
6814
6820
  }, v = (f) => {
6815
6821
  if (i?.annotationId !== f) return e;
6816
- const S = mo(i.translation, e);
6822
+ const C = mo(i.translation, e);
6817
6823
  return {
6818
- x: e.x + S.x,
6819
- y: e.y + S.y
6824
+ x: e.x + C.x,
6825
+ y: e.y + C.y
6820
6826
  };
6821
6827
  };
6822
6828
  return /* @__PURE__ */ m(Y, { children: [p !== null && /* @__PURE__ */ r(mr, {
@@ -6894,23 +6900,23 @@ var $p = {
6894
6900
  style: Q().annotation.text(e.id).resolve(),
6895
6901
  blockRef: n
6896
6902
  });
6897
- }, Je = (e, t, n) => {
6903
+ }, Qe = (e, t, n) => {
6898
6904
  const a = e.find((o) => o.id === t);
6899
6905
  return a === void 0 ? null : n(a);
6900
6906
  }, Xp = {
6901
- text: (e, t, n) => Je(e.textAnnotations, t, (a) => /* @__PURE__ */ r(qp, {
6907
+ text: (e, t, n) => Qe(e.textAnnotations, t, (a) => /* @__PURE__ */ r(qp, {
6902
6908
  annotation: a,
6903
6909
  panel: n
6904
6910
  })),
6905
- shape: (e, t, n) => Je(e.shapes, t, (a) => /* @__PURE__ */ r(Yp, {
6911
+ shape: (e, t, n) => Qe(e.shapes, t, (a) => /* @__PURE__ */ r(Yp, {
6906
6912
  shape: a,
6907
6913
  panelSize: n
6908
6914
  })),
6909
- image: (e, t, n) => Je(e.images, t, (a) => /* @__PURE__ */ r(Jp, {
6915
+ image: (e, t, n) => Qe(e.images, t, (a) => /* @__PURE__ */ r(Jp, {
6910
6916
  image: a,
6911
6917
  panelSize: n
6912
6918
  })),
6913
- arrow: (e, t, n) => Je(e.arrows, t, (a) => /* @__PURE__ */ r(jp, {
6919
+ arrow: (e, t, n) => Qe(e.arrows, t, (a) => /* @__PURE__ */ r(jp, {
6914
6920
  arrow: a,
6915
6921
  panelSize: n
6916
6922
  }))
@@ -6987,7 +6993,7 @@ var $p = {
6987
6993
  "aria-hidden": "true",
6988
6994
  className: e2[a]
6989
6995
  })
6990
- }), jt = [
6996
+ }), Yt = [
6991
6997
  {
6992
6998
  width: 0,
6993
6999
  key: "graph.annotations.shapeToolbar.border.none"
@@ -7004,26 +7010,26 @@ var $p = {
7004
7010
  width: 16,
7005
7011
  key: "graph.annotations.shapeToolbar.border.thick"
7006
7012
  }
7007
- ], n2 = (e) => [...jt].reverse().find((t) => t.width <= e) ?? jt[0], r2 = ({ shape: e, shapeBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
7008
- const l = E(), { commands: s } = z(), c = D((y) => y.spec.styles.overrides), u = Tt(), d = Q().annotation.shape(e.id).resolve(), h = n2(d.strokeWidth), p = I(() => ({
7013
+ ], n2 = (e) => [...Yt].reverse().find((t) => t.width <= e) ?? Yt[0], r2 = ({ shape: e, shapeBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
7014
+ const l = E(), { commands: s } = z(), c = D((y) => y.spec.styles.overrides), u = At(), d = Q().annotation.shape(e.id).resolve(), h = n2(d.strokeWidth), p = I(() => ({
7009
7015
  target: "annotation",
7010
7016
  kind: "shape",
7011
7017
  annotation: e.id
7012
- }), [e.id]), g = (y, T) => {
7013
- const x = Ce(c, { select: p })?.declarations ?? {};
7018
+ }), [e.id]), g = (y, A) => {
7019
+ const S = Ce(c, { select: p })?.declarations ?? {};
7014
7020
  s.dispatch(new ke({
7015
7021
  list: "overrides",
7016
7022
  rule: {
7017
7023
  select: p,
7018
7024
  declarations: {
7019
- ...x,
7025
+ ...S,
7020
7026
  ...y
7021
7027
  }
7022
7028
  }
7023
- }), T);
7029
+ }), A);
7024
7030
  }, v = () => {
7025
7031
  s.dispatch(new ze({ id: e.id })), i.focus({ preventScroll: !0 });
7026
- }, f = (y) => g({ fill: y }, { transient: !0 }), S = (y) => g({ fillAlpha: y }, { transient: !0 }), w = (y) => () => {
7032
+ }, f = (y) => g({ fill: y }, { transient: !0 }), C = (y) => g({ fillAlpha: y }, { transient: !0 }), w = (y) => () => {
7027
7033
  g({ strokeWidth: y }), u.close();
7028
7034
  };
7029
7035
  return /* @__PURE__ */ m(R.Root, {
@@ -7035,14 +7041,14 @@ var $p = {
7035
7041
  testId: "shape-toolbar",
7036
7042
  children: [
7037
7043
  /* @__PURE__ */ r(R.ColorPicker, {
7038
- color: rt(d.fill),
7044
+ color: at(d.fill),
7039
7045
  label: l("graph.annotations.shapeToolbar.color"),
7040
7046
  onChange: f,
7041
7047
  opacity: d.fillAlpha,
7042
- onOpacityChange: S,
7048
+ onOpacityChange: C,
7043
7049
  ...u.bind("color"),
7044
7050
  children: /* @__PURE__ */ r(R.Swatch, {
7045
- color: rt(d.fill),
7051
+ color: at(d.fill),
7046
7052
  opacity: d.fillAlpha
7047
7053
  })
7048
7054
  }),
@@ -7053,7 +7059,7 @@ var $p = {
7053
7059
  title: ""
7054
7060
  }),
7055
7061
  ...u.bind("border"),
7056
- children: jt.map((y) => /* @__PURE__ */ r(R.MenuItem, {
7062
+ children: Yt.map((y) => /* @__PURE__ */ r(R.MenuItem, {
7057
7063
  isSelected: y.width === h?.width,
7058
7064
  onClick: w(y.width),
7059
7065
  children: l(y.key)
@@ -7063,7 +7069,7 @@ var $p = {
7063
7069
  /* @__PURE__ */ r(R.IconButton, {
7064
7070
  label: l("graph.annotations.shapeToolbar.remove"),
7065
7071
  onClick: v,
7066
- children: /* @__PURE__ */ r(wt, {
7072
+ children: /* @__PURE__ */ r(Tt, {
7067
7073
  size: "sm",
7068
7074
  title: ""
7069
7075
  })
@@ -7072,7 +7078,7 @@ var $p = {
7072
7078
  });
7073
7079
  }, Ao = (e) => {
7074
7080
  const t = j(e), n = ne(null);
7075
- return F(() => () => n.current?.finish(!1), []), oe((a) => ({ onPointerDown: (o) => {
7081
+ return F(() => () => n.current?.finish(!1), []), ie((a) => ({ onPointerDown: (o) => {
7076
7082
  if (o.button !== 0 || n.current !== null) return;
7077
7083
  try {
7078
7084
  o.currentTarget.setPointerCapture(o.pointerId);
@@ -7093,32 +7099,32 @@ var $p = {
7093
7099
  });
7094
7100
  n.current = i, i.start();
7095
7101
  } }), [t]);
7096
- }, lt = (e, t) => {
7102
+ }, st = (e, t) => {
7097
7103
  const n = e.shapes.find((a) => a.id === t);
7098
7104
  return n === void 0 || n.region.anchorType !== "panel" ? null : n.region;
7099
- }, a2 = class extends qe {
7105
+ }, a2 = class extends Xe {
7100
7106
  constructor(...e) {
7101
7107
  super(...e), this.kind = "shape-resize-drag";
7102
7108
  }
7103
7109
  readOwn(e) {
7104
- return on($(e, "shape-resize-drag"), this.params.annotationId);
7110
+ return ln($(e, "shape-resize-drag"), this.params.annotationId);
7105
7111
  }
7106
7112
  resolvePreview(e) {
7107
- const { annotationId: t, corner: n, press: a, readInputs: o } = this.params, { annotations: i, panelRect: l } = o(), s = lt(i, t);
7113
+ const { annotationId: t, corner: n, press: a, readInputs: o } = this.params, { annotations: i, panelRect: l } = o(), s = st(i, t);
7108
7114
  return s === null ? null : {
7109
7115
  kind: "shape-resize-drag",
7110
7116
  annotationId: t,
7111
7117
  region: yo({
7112
7118
  region: s,
7113
7119
  corner: n,
7114
- delta: At(a, e, l),
7120
+ delta: kt(a, e, l),
7115
7121
  minSize: bo(l)
7116
7122
  })
7117
7123
  };
7118
7124
  }
7119
7125
  commit({ region: e }) {
7120
- const { annotationId: t, dispatch: n, readInputs: a } = this.params, o = lt(a().annotations, t);
7121
- o === null || So(o, e) || n(new le({
7126
+ const { annotationId: t, dispatch: n, readInputs: a } = this.params, o = st(a().annotations, t);
7127
+ o === null || So(o, e) || n(new se({
7122
7128
  kind: "shape",
7123
7129
  id: t,
7124
7130
  patch: { region: e }
@@ -7139,7 +7145,7 @@ var $p = {
7139
7145
  }));
7140
7146
  }, i2 = [" ", "Enter"], ko = (e) => {
7141
7147
  const t = H(), n = j(e);
7142
- return F(() => () => vr(t, n.current), [t, n]), oe((a) => ({ onKeyDown: (o) => {
7148
+ return F(() => () => vr(t, n.current), [t, n]), ie((a) => ({ onKeyDown: (o) => {
7143
7149
  if (o.altKey || o.ctrlKey || o.metaKey || o.shiftKey) return;
7144
7150
  const i = t.getState(), l = n.current.readHeld();
7145
7151
  if (i2.includes(o.key)) {
@@ -7163,9 +7169,9 @@ var $p = {
7163
7169
  }, fr = 4, l2 = ({ annotationId: e, panelRect: t }) => {
7164
7170
  const { commands: n } = z(), a = H(), o = D((i) => i.spec.annotations);
7165
7171
  return ko({
7166
- readHeld: () => on($(a.getState(), "shape-resize-drag"), e),
7172
+ readHeld: () => ln($(a.getState(), "shape-resize-drag"), e),
7167
7173
  claim: () => {
7168
- const i = lt(o, e);
7174
+ const i = st(o, e);
7169
7175
  return i === null ? null : {
7170
7176
  kind: "shape-resize-drag",
7171
7177
  annotationId: e,
@@ -7186,8 +7192,8 @@ var $p = {
7186
7192
  };
7187
7193
  },
7188
7194
  commit: ({ region: i }) => {
7189
- const l = lt(o, e);
7190
- l === null || So(l, i) || n.dispatch(new le({
7195
+ const l = st(o, e);
7196
+ l === null || So(l, i) || n.dispatch(new se({
7191
7197
  kind: "shape",
7192
7198
  id: e,
7193
7199
  patch: { region: i }
@@ -7195,7 +7201,7 @@ var $p = {
7195
7201
  }
7196
7202
  });
7197
7203
  }, s2 = (e, t) => {
7198
- const n = ie(fr, t.width), a = ie(fr, t.height);
7204
+ const n = le(fr, t.width), a = le(fr, t.height);
7199
7205
  switch (e) {
7200
7206
  case "ArrowLeft":
7201
7207
  return {
@@ -7226,7 +7232,7 @@ var $p = {
7226
7232
  "top-right": "diagonalUp",
7227
7233
  "bottom-left": "diagonalUp"
7228
7234
  }, d2 = (e) => {
7229
- const t = Ke(), n = h2(t), a = p2(t);
7235
+ const t = qe(), n = h2(t), a = p2(t);
7230
7236
  if (n === null) return null;
7231
7237
  const o = a.resizedRegion ?? (n.region.anchorType === "panel" ? n.region : null);
7232
7238
  return o === null ? null : /* @__PURE__ */ r(u2, {
@@ -7276,12 +7282,12 @@ var $p = {
7276
7282
  }, h2 = (e) => {
7277
7283
  const t = D((n) => n.spec.annotations.shapes);
7278
7284
  return e === null ? null : t.find((n) => n.id === e) ?? null;
7279
- }, p2 = (e) => X(me((t) => e === null ? {
7285
+ }, p2 = (e) => X(ge((t) => e === null ? {
7280
7286
  resizedRegion: null,
7281
7287
  isMoved: !1
7282
7288
  } : {
7283
- resizedRegion: on($(t, "shape-resize-drag"), e)?.region ?? null,
7284
- isMoved: ut($(t, "move-drag"), e) !== null
7289
+ resizedRegion: ln($(t, "shape-resize-drag"), e)?.region ?? null,
7290
+ isMoved: pt($(t, "move-drag"), e) !== null
7285
7291
  })), m2 = ({ textColor: e, ...t }) => /* @__PURE__ */ m(k, {
7286
7292
  ...t,
7287
7293
  children: [/* @__PURE__ */ m("g", {
@@ -7296,13 +7302,13 @@ var $p = {
7296
7302
  strokeLinecap: "round"
7297
7303
  })]
7298
7304
  });
7299
- var st = "textStyle", Lo = /* @__PURE__ */ new Set(["paragraph", "heading"]), g2 = (e) => {
7305
+ var ct = "textStyle", Lo = /* @__PURE__ */ new Set(["paragraph", "heading"]), g2 = (e) => {
7300
7306
  const t = Po(e), n = C2(e);
7301
7307
  return {
7302
- color: Qe(t.map((a) => x2(_t(a)?.color))),
7303
- font: Qe(t.map((a) => S2(_t(a)))),
7304
- fontSize: Qe(t.map((a) => w2(_t(a)?.fontSize))),
7305
- alignment: Qe(n.map((a) => T2(a.attrs?.textAlign)))
7308
+ color: et(t.map((a) => x2(Ft(a)?.color))),
7309
+ font: et(t.map((a) => S2(Ft(a)))),
7310
+ fontSize: et(t.map((a) => w2(Ft(a)?.fontSize))),
7311
+ alignment: et(n.map((a) => T2(a.attrs?.textAlign)))
7306
7312
  };
7307
7313
  }, v2 = (e, t) => xn(e, (n) => n.type === "text" ? y2(n, t) : n), f2 = (e) => Po(e).length > 0, b2 = (e, t) => xn(e, (n) => Lo.has(n.type ?? "") ? {
7308
7314
  ...n,
@@ -7314,8 +7320,8 @@ var st = "textStyle", Lo = /* @__PURE__ */ new Set(["paragraph", "heading"]), g2
7314
7320
  ...e,
7315
7321
  content: e.content.map((n) => xn(n, t))
7316
7322
  }), y2 = (e, t) => {
7317
- const n = e.marks ?? [], a = n.find((i) => i.type === st), o = {
7318
- type: st,
7323
+ const n = e.marks ?? [], a = n.find((i) => i.type === ct), o = {
7324
+ type: ct,
7319
7325
  attrs: {
7320
7326
  ...a?.attrs,
7321
7327
  ...t
@@ -7325,7 +7331,7 @@ var st = "textStyle", Lo = /* @__PURE__ */ new Set(["paragraph", "heading"]), g2
7325
7331
  ...e,
7326
7332
  marks: a === void 0 ? [...n, o] : n.map((i) => i === a ? o : i)
7327
7333
  };
7328
- }, _t = (e) => e.marks?.find((t) => t.type === st)?.attrs, S2 = (e) => On(e?.font) ?? On(e?.fontFamily), Po = (e) => wn(e, (t) => t.type === "text"), C2 = (e) => wn(e, (t) => Lo.has(t.type ?? "")), wn = (e, t) => [...t(e) ? [e] : [], ...(e.content ?? []).flatMap((n) => wn(n, t))], Qe = (e) => {
7334
+ }, Ft = (e) => e.marks?.find((t) => t.type === ct)?.attrs, S2 = (e) => On(e?.font) ?? On(e?.fontFamily), Po = (e) => wn(e, (t) => t.type === "text"), C2 = (e) => wn(e, (t) => Lo.has(t.type ?? "")), wn = (e, t) => [...t(e) ? [e] : [], ...(e.content ?? []).flatMap((n) => wn(n, t))], et = (e) => {
7329
7335
  const [t, ...n] = e;
7330
7336
  return t === void 0 ? null : n.every((a) => a === t) ? t : null;
7331
7337
  }, x2 = (e) => typeof e == "string" && e.length > 0 ? e : void 0, w2 = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, T2 = (e) => e === "left" || e === "center" || e === "right" ? e : void 0;
@@ -7390,16 +7396,16 @@ var Eo = [
7390
7396
  Icon: Ra
7391
7397
  }
7392
7398
  ], I2 = ({ annotation: e, textBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
7393
- const l = E(), { commands: s } = z(), c = D((b) => b.spec.styles.overrides), u = H(), d = Tt(), h = Q().annotation.text(e.id).resolve(), p = g2(e.content), g = A2(p.font), v = k2(p.fontSize), f = p.color ?? h.textColor, S = I(() => ({
7399
+ const l = E(), { commands: s } = z(), c = D((b) => b.spec.styles.overrides), u = H(), d = At(), h = Q().annotation.text(e.id).resolve(), p = g2(e.content), g = A2(p.font), v = k2(p.fontSize), f = p.color ?? h.textColor, C = I(() => ({
7394
7400
  target: "annotation",
7395
7401
  kind: "text",
7396
7402
  annotation: e.id
7397
7403
  }), [e.id]), w = (b, U) => {
7398
- const ee = Ce(c, { select: S })?.declarations ?? {};
7404
+ const ee = Ce(c, { select: C })?.declarations ?? {};
7399
7405
  s.dispatch(new ke({
7400
7406
  list: "overrides",
7401
7407
  rule: {
7402
- select: S,
7408
+ select: C,
7403
7409
  declarations: {
7404
7410
  ...ee,
7405
7411
  ...b
@@ -7407,25 +7413,25 @@ var Eo = [
7407
7413
  }
7408
7414
  }), U);
7409
7415
  }, y = (b, U) => {
7410
- s.dispatch(new le({
7416
+ s.dispatch(new se({
7411
7417
  kind: "text",
7412
7418
  id: e.id,
7413
7419
  patch: b
7414
7420
  }), U);
7415
- }, T = () => u.getState().caret?.editor?.getJSON() ?? e.content, x = (b, U) => {
7416
- const ee = T(), ae = u.getState().caret?.editor ?? null;
7421
+ }, A = () => u.getState().caret?.editor?.getJSON() ?? e.content, S = (b, U) => {
7422
+ const ee = A(), ae = u.getState().caret?.editor ?? null;
7417
7423
  if (ae !== null && !f2(ee)) {
7418
- ae.chain().focus().setMark(st, b).run();
7424
+ ae.chain().focus().setMark(ct, b).run();
7419
7425
  return;
7420
7426
  }
7421
7427
  y({ content: v2(ee, b) }, U);
7422
- }, N = () => {
7428
+ }, O = () => {
7423
7429
  s.dispatch(new ze({ id: e.id })), i.focus({ preventScroll: !0 });
7424
- }, L = (b) => w(E2(b), { transient: !0 }), O = (b) => x({ color: b }, { transient: !0 }), _ = (b) => () => {
7425
- x({ font: b }), d.close();
7426
- }, M = (b) => () => {
7427
- x({ fontSize: b }), d.close();
7428
- }, C = (b) => y({ content: b2(T(), b) });
7430
+ }, L = (b) => w(E2(b), { transient: !0 }), M = (b) => S({ color: b }, { transient: !0 }), _ = (b) => () => {
7431
+ S({ font: b }), d.close();
7432
+ }, N = (b) => () => {
7433
+ S({ fontSize: b }), d.close();
7434
+ }, x = (b) => y({ content: b2(A(), b) });
7429
7435
  return /* @__PURE__ */ m(R.Root, {
7430
7436
  anchorBox: t,
7431
7437
  panelRect: n,
@@ -7435,17 +7441,17 @@ var Eo = [
7435
7441
  testId: "text-toolbar",
7436
7442
  children: [
7437
7443
  /* @__PURE__ */ r(R.ColorPicker, {
7438
- color: rt(h.fill),
7444
+ color: at(h.fill),
7439
7445
  label: l("graph.annotations.textToolbar.background"),
7440
7446
  hasTransparentOption: !0,
7441
7447
  onChange: L,
7442
7448
  ...d.bind("background"),
7443
- children: /* @__PURE__ */ r(R.Swatch, { color: h.fill === "transparent" ? ya : rt(h.fill) })
7449
+ children: /* @__PURE__ */ r(R.Swatch, { color: h.fill === "transparent" ? ya : at(h.fill) })
7444
7450
  }),
7445
7451
  /* @__PURE__ */ r(R.ColorPicker, {
7446
7452
  color: f,
7447
7453
  label: l("graph.annotations.textToolbar.color"),
7448
- onChange: O,
7454
+ onChange: M,
7449
7455
  ...d.bind("color"),
7450
7456
  children: /* @__PURE__ */ r(m2, {
7451
7457
  size: "sm",
@@ -7475,7 +7481,7 @@ var Eo = [
7475
7481
  ...d.bind("fontSize"),
7476
7482
  children: Eo.map((b) => /* @__PURE__ */ r(R.MenuItem, {
7477
7483
  isSelected: b.size === v?.size,
7478
- onClick: M(b.size),
7484
+ onClick: N(b.size),
7479
7485
  children: /* @__PURE__ */ r("span", {
7480
7486
  style: { fontSize: L2(b.size) },
7481
7487
  children: l(b.key)
@@ -7485,13 +7491,13 @@ var Eo = [
7485
7491
  /* @__PURE__ */ r(R.Separator, {}),
7486
7492
  /* @__PURE__ */ r(O2, {
7487
7493
  current: p.alignment ?? "center",
7488
- onPick: C
7494
+ onPick: x
7489
7495
  }),
7490
7496
  /* @__PURE__ */ r(R.Separator, {}),
7491
7497
  /* @__PURE__ */ r(R.IconButton, {
7492
7498
  label: l("graph.annotations.textToolbar.remove"),
7493
- onClick: N,
7494
- children: /* @__PURE__ */ r(wt, {
7499
+ onClick: O,
7500
+ children: /* @__PURE__ */ r(Tt, {
7495
7501
  size: "sm",
7496
7502
  title: ""
7497
7503
  })
@@ -7513,7 +7519,7 @@ var Eo = [
7513
7519
  })
7514
7520
  }, o.alignment)) });
7515
7521
  }, M2 = ["left", "right"];
7516
- var Oo = ({ width: e }) => ie(60, e), N2 = (e, t) => ({
7522
+ var Oo = ({ width: e }) => le(60, e), N2 = (e, t) => ({
7517
7523
  x: t === "left" ? e.x : e.x + e.width,
7518
7524
  y: e.y + e.height / 2
7519
7525
  }), Mo = ({ at: e, width: t, align: n, edge: a, delta: o, minWidth: i, panelWidth: l }) => {
@@ -7522,7 +7528,7 @@ var Oo = ({ width: e }) => ie(60, e), N2 = (e, t) => ({
7522
7528
  width: t,
7523
7529
  shift: 0
7524
7530
  };
7525
- const s = es(n).x, c = R2(e.offset, l), u = Zt({
7531
+ const s = es(n).x, c = R2(e.offset, l), u = jt({
7526
7532
  start: e.x + c - s * t,
7527
7533
  extent: t,
7528
7534
  isStartMoving: a === "left",
@@ -7537,24 +7543,24 @@ var Oo = ({ width: e }) => ie(60, e), N2 = (e, t) => ({
7537
7543
  width: u.extent,
7538
7544
  shift: d - e.x
7539
7545
  };
7540
- }, No = (e, t) => e.at.x === t.at.x && e.width === t.width, R2 = (e, t) => e?.x === void 0 ? 0 : e.unit === "px" ? ie(e.x, t) : e.x, ct = (e, t) => {
7546
+ }, No = (e, t) => e.at.x === t.at.x && e.width === t.width, R2 = (e, t) => e?.x === void 0 ? 0 : e.unit === "px" ? le(e.x, t) : e.x, dt = (e, t) => {
7541
7547
  const n = e.textAnnotations.find((a) => a.id === t);
7542
7548
  return n === void 0 || n.at.anchorType !== "panel" ? null : {
7543
7549
  at: n.at,
7544
7550
  width: n.width,
7545
7551
  align: n.align
7546
7552
  };
7547
- }, D2 = class extends qe {
7553
+ }, D2 = class extends Xe {
7548
7554
  constructor(...e) {
7549
7555
  super(...e), this.kind = "text-resize-drag";
7550
7556
  }
7551
7557
  readOwn(e) {
7552
- return an($(e, "text-resize-drag"), this.params.annotationId);
7558
+ return on($(e, "text-resize-drag"), this.params.annotationId);
7553
7559
  }
7554
7560
  resolvePreview(e) {
7555
- const { annotationId: t, edge: n, press: a, readInputs: o } = this.params, { annotations: i, panelRect: l } = o(), s = ct(i, t);
7561
+ const { annotationId: t, edge: n, press: a, readInputs: o } = this.params, { annotations: i, panelRect: l } = o(), s = dt(i, t);
7556
7562
  if (s === null) return null;
7557
- const c = At(a, e, l).x;
7563
+ const c = kt(a, e, l).x;
7558
7564
  return {
7559
7565
  kind: "text-resize-drag",
7560
7566
  annotationId: t,
@@ -7569,8 +7575,8 @@ var Oo = ({ width: e }) => ie(60, e), N2 = (e, t) => ({
7569
7575
  };
7570
7576
  }
7571
7577
  commit(e) {
7572
- const { annotationId: t, dispatch: n, readInputs: a } = this.params, o = ct(a().annotations, t);
7573
- o === null || No(o, e) || n(new le({
7578
+ const { annotationId: t, dispatch: n, readInputs: a } = this.params, o = dt(a().annotations, t);
7579
+ o === null || No(o, e) || n(new se({
7574
7580
  kind: "text",
7575
7581
  id: t,
7576
7582
  patch: {
@@ -7594,7 +7600,7 @@ var Oo = ({ width: e }) => ie(60, e), N2 = (e, t) => ({
7594
7600
  }));
7595
7601
  }, F2 = 4, z2 = ({ annotationId: e, panelRect: t }) => {
7596
7602
  const { commands: n } = z(), a = H(), o = D((l) => l.spec.annotations), i = (l, s) => {
7597
- const c = ct(o, e);
7603
+ const c = dt(o, e);
7598
7604
  return c === null ? null : {
7599
7605
  kind: "text-resize-drag",
7600
7606
  annotationId: e,
@@ -7609,15 +7615,15 @@ var Oo = ({ width: e }) => ie(60, e), N2 = (e, t) => ({
7609
7615
  };
7610
7616
  };
7611
7617
  return ko({
7612
- readHeld: () => an($(a.getState(), "text-resize-drag"), e),
7618
+ readHeld: () => on($(a.getState(), "text-resize-drag"), e),
7613
7619
  claim: (l) => i(l, 0),
7614
7620
  step: (l, s, c) => {
7615
7621
  const u = B2(c, t);
7616
7622
  return u === null ? null : i(s, l.delta + u);
7617
7623
  },
7618
7624
  commit: (l) => {
7619
- const s = ct(o, e);
7620
- s === null || No(s, l) || n.dispatch(new le({
7625
+ const s = dt(o, e);
7626
+ s === null || No(s, l) || n.dispatch(new se({
7621
7627
  kind: "text",
7622
7628
  id: e,
7623
7629
  patch: {
@@ -7628,7 +7634,7 @@ var Oo = ({ width: e }) => ie(60, e), N2 = (e, t) => ({
7628
7634
  }
7629
7635
  });
7630
7636
  }, B2 = (e, t) => {
7631
- const n = ie(F2, t.width);
7637
+ const n = le(F2, t.width);
7632
7638
  switch (e) {
7633
7639
  case "ArrowLeft":
7634
7640
  return -n;
@@ -7638,7 +7644,7 @@ var Oo = ({ width: e }) => ie(60, e), N2 = (e, t) => ({
7638
7644
  return null;
7639
7645
  }
7640
7646
  }, H2 = (e) => {
7641
- const t = Ke(), n = V2(t), a = $2(t), o = X((l) => l.caret?.annotationId === t), i = U2(e.panelRect, t, a.resized);
7647
+ const t = qe(), n = V2(t), a = $2(t), o = X((l) => l.caret?.annotationId === t), i = U2(e.panelRect, t, a.resized);
7642
7648
  return n === null || i === null ? null : /* @__PURE__ */ r(G2, {
7643
7649
  annotation: n,
7644
7650
  textBox: i,
@@ -7688,12 +7694,12 @@ var Oo = ({ width: e }) => ie(60, e), N2 = (e, t) => ({
7688
7694
  }, V2 = (e) => {
7689
7695
  const t = D((n) => n.spec.annotations.textAnnotations);
7690
7696
  return e === null ? null : t.find((n) => n.id === e) ?? null;
7691
- }, $2 = (e) => X(me((t) => e === null ? {
7697
+ }, $2 = (e) => X(ge((t) => e === null ? {
7692
7698
  resized: null,
7693
7699
  isMoved: !1
7694
7700
  } : {
7695
- resized: an($(t, "text-resize-drag"), e),
7696
- isMoved: ut($(t, "move-drag"), e) !== null
7701
+ resized: on($(t, "text-resize-drag"), e),
7702
+ isMoved: pt($(t, "move-drag"), e) !== null
7697
7703
  })), U2 = (e, t, n) => {
7698
7704
  const a = Ie(e), o = Ur(), i = Q(), l = I(() => ({
7699
7705
  panel: {
@@ -7733,13 +7739,13 @@ var X2 = "_1tyillx1", Z2 = {
7733
7739
  }, J2 = ({ interaction: e, panelRect: t }) => {
7734
7740
  const n = H(), a = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, o = Q2(e), i = I(() => {
7735
7741
  if (a === null) return null;
7736
- const l = nt(a.position, t);
7742
+ const l = rt(a.position, t);
7737
7743
  return {
7738
7744
  center: l,
7739
7745
  radius: 19 * q2[o],
7740
7746
  target: {
7741
7747
  kind: "observation",
7742
- cursor: ft(l, t)
7748
+ cursor: yt(l, t)
7743
7749
  }
7744
7750
  };
7745
7751
  }, [
@@ -7757,7 +7763,7 @@ var X2 = "_1tyillx1", Z2 = {
7757
7763
  style: {
7758
7764
  left: t.x + i.center.x,
7759
7765
  top: t.y + i.center.y,
7760
- ...bt({ [K2]: a.color })
7766
+ ...We({ [K2]: a.color })
7761
7767
  },
7762
7768
  children: /* @__PURE__ */ r("span", {
7763
7769
  className: fe(j2, Y2[o === "open" ? "open" : "closed"]),
@@ -7783,7 +7789,7 @@ var X2 = "_1tyillx1", Z2 = {
7783
7789
  n,
7784
7790
  a
7785
7791
  ]);
7786
- }, nm = (e, t) => typeof document.elementsFromPoint == "function" ? document.elementsFromPoint(e, t) : [], Ro = (e, t, n) => ht(nm(e, t), n), rm = (e) => {
7792
+ }, nm = (e, t) => typeof document.elementsFromPoint == "function" ? document.elementsFromPoint(e, t) : [], Ro = (e, t, n) => mt(nm(e, t), n), rm = (e) => {
7787
7793
  const { selectionStore: t, chartId: n } = z(), a = H();
7788
7794
  F(() => {
7789
7795
  let o = null;
@@ -7842,7 +7848,7 @@ var X2 = "_1tyillx1", Z2 = {
7842
7848
  return null;
7843
7849
  }, im = (e, t) => {
7844
7850
  for (const n of e) {
7845
- const a = vt(n.mapping[t]);
7851
+ const a = bt(n.mapping[t]);
7846
7852
  if (a !== null && lm(n, a)) return {
7847
7853
  layer: n,
7848
7854
  variable: a
@@ -7875,7 +7881,7 @@ var X2 = "_1tyillx1", Z2 = {
7875
7881
  if (l === void 0) return null;
7876
7882
  const s = sa(o), c = i?.intersects !== !1, u = Ms(l), d = c || !As(n) ? [u] : ["x-value", u];
7877
7883
  for (const h of d) {
7878
- const p = mt({
7884
+ const p = vt({
7879
7885
  layer: l,
7880
7886
  observationIndex: s,
7881
7887
  scope: h,
@@ -7892,7 +7898,7 @@ var X2 = "_1tyillx1", Z2 = {
7892
7898
  }, dm = (e, t, n) => {
7893
7899
  if (!e.isOnObservation || e.target.scope !== "series") return null;
7894
7900
  const a = ve(t, e.layerId);
7895
- return a === void 0 ? null : mt({
7901
+ return a === void 0 ? null : vt({
7896
7902
  layer: a,
7897
7903
  observationIndex: e.observationIndex,
7898
7904
  scope: "data-point",
@@ -7916,14 +7922,14 @@ var X2 = "_1tyillx1", Z2 = {
7916
7922
  layers: d.layers,
7917
7923
  scales: d.scales,
7918
7924
  parsingLocale: d.config.parsingLocale
7919
- }), S = En({
7925
+ }), C = En({
7920
7926
  isMenuTrigger: h,
7921
7927
  stamped: br(p, f !== null, e, t),
7922
7928
  observations: f
7923
7929
  });
7924
7930
  return {
7925
- targetAtPoint: S,
7926
- hover: S?.kind === "observations" ? v : null
7931
+ targetAtPoint: C,
7932
+ hover: C?.kind === "observations" ? v : null
7927
7933
  };
7928
7934
  }, um = (e) => {
7929
7935
  const t = e.getBoundingClientRect();
@@ -7932,23 +7938,23 @@ var X2 = "_1tyillx1", Z2 = {
7932
7938
  if (!a && l.coordSystem.type === "cartesian" && e && t) return null;
7933
7939
  const s = e || a ? Ro(n.clientX, n.clientY, i) : hm(n.target, i);
7934
7940
  return s === null ? null : (s.kind === "annotation" ? a : o) ? s : null;
7935
- }, hm = (e, t) => e instanceof Element ? ht([e], t) : null, pm = (e, t, n) => {
7941
+ }, hm = (e, t) => e instanceof Element ? mt([e], t) : null, pm = (e, t, n) => {
7936
7942
  const a = {
7937
7943
  x: e.clientX - t.left,
7938
7944
  y: e.clientY - t.top
7939
7945
  };
7940
- return n.engine.query(ft(a, t), n.tolerance, t);
7941
- }, mm = class extends qe {
7946
+ return n.engine.query(yt(a, t), n.tolerance, t);
7947
+ }, mm = class extends Xe {
7942
7948
  constructor(...e) {
7943
7949
  super(...e), this.kind = "move-drag";
7944
7950
  }
7945
7951
  readOwn(e) {
7946
- return ut($(e, "move-drag"), this.params.annotationId);
7952
+ return pt($(e, "move-drag"), this.params.annotationId);
7947
7953
  }
7948
7954
  resolvePreview(e) {
7949
7955
  const { annotationId: t, press: n, readInputs: a } = this.params, { annotations: o, panelRect: i } = a(), l = ps(o, t);
7950
7956
  if (l === null) return null;
7951
- const s = ss(l, At(n, e, i));
7957
+ const s = ss(l, kt(n, e, i));
7952
7958
  return s === null ? null : {
7953
7959
  kind: "move-drag",
7954
7960
  annotationId: t,
@@ -7994,24 +8000,24 @@ var X2 = "_1tyillx1", Z2 = {
7994
8000
  target: e,
7995
8001
  observationIndex: n ? t : null
7996
8002
  }, fm = (e, t, n, a, o) => {
7997
- const { commands: i, selectionStore: l, store: s } = z(), c = H(), u = D((S) => S.spec.annotations), d = Ee[xe()], h = j(d.graphPress), p = j({
8003
+ const { commands: i, selectionStore: l, store: s } = z(), c = H(), u = D((C) => C.spec.annotations), d = Ee[xe()], h = j(d.graphPress), p = j({
7998
8004
  annotations: u,
7999
8005
  panelRect: n
8000
8006
  }), g = j(t), v = j(o), f = ne(null);
8001
- F(() => () => f.current?.finish(!1), []), F(() => l.subscribe(({ selection: S }) => {
8002
- const w = c.getState().pressedObservation, [y, ...T] = S, x = y !== void 0 && T.length === 0 && w !== null && ea(y, w.selectedFor);
8003
- w !== null && !x && c.getState().setPressedObservation(null);
8007
+ F(() => () => f.current?.finish(!1), []), F(() => l.subscribe(({ selection: C }) => {
8008
+ const w = c.getState().pressedObservation, [y, ...A] = C, S = y !== void 0 && A.length === 0 && w !== null && ea(y, w.selectedFor);
8009
+ w !== null && !S && c.getState().setPressedObservation(null);
8004
8010
  }), [c, l]), F(() => {
8005
- const S = (L) => Do({
8011
+ const C = (L) => Do({
8006
8012
  target: L.target,
8007
8013
  clientX: L.clientX,
8008
8014
  clientY: L.clientY
8009
8015
  }, a()).targetAtPoint, w = (L) => {
8010
8016
  if (!(L.target instanceof Element)) return !1;
8011
- const O = L.target.closest(_r);
8012
- return O !== null && e.contains(O) && ht([L.target], e) === null;
8013
- }, y = (L, O) => {
8014
- if (f.current !== null || !Xi(p.current.annotations, O.id)) return;
8017
+ const M = L.target.closest(_r);
8018
+ return M !== null && e.contains(M) && mt([L.target], e) === null;
8019
+ }, y = (L, M) => {
8020
+ if (f.current !== null || !Xi(p.current.annotations, M.id)) return;
8015
8021
  try {
8016
8022
  e.setPointerCapture(L.pointerId);
8017
8023
  } catch {
@@ -8021,7 +8027,7 @@ var X2 = "_1tyillx1", Z2 = {
8021
8027
  const _ = new mm({
8022
8028
  handle: e,
8023
8029
  pointerId: L.pointerId,
8024
- annotationId: O.id,
8030
+ annotationId: M.id,
8025
8031
  press: {
8026
8032
  x: L.clientX,
8027
8033
  y: L.clientY
@@ -8034,42 +8040,42 @@ var X2 = "_1tyillx1", Z2 = {
8034
8040
  }
8035
8041
  });
8036
8042
  f.current = _, _.start();
8037
- }, T = (L, O) => {
8038
- const _ = l.getState(), { layers: M, config: C } = s.getState().scene, b = O.kind === "select-observations" && O.observationIndex !== null ? gi(O.observationIndex, M, O.target, C.parsingLocale) : null;
8039
- switch (c.getState().setPressedObservation(b), O.kind) {
8043
+ }, A = (L, M) => {
8044
+ const _ = l.getState(), { layers: N, config: x } = s.getState().scene, b = M.kind === "select-observations" && M.observationIndex !== null ? gi(M.observationIndex, N, M.target, x.parsingLocale) : null;
8045
+ switch (c.getState().setPressedObservation(b), M.kind) {
8040
8046
  case "select-annotation":
8041
- _.setSelection([O.target]), y(L, O.target);
8047
+ _.setSelection([M.target]), y(L, M.target);
8042
8048
  return;
8043
8049
  case "select-observations":
8044
8050
  case "select-band":
8045
8051
  case "select-guide":
8046
8052
  case "select-graph":
8047
- _.setSelection([O.target]);
8053
+ _.setSelection([M.target]);
8048
8054
  return;
8049
8055
  case "clear":
8050
8056
  _.clearSelection();
8051
8057
  return;
8052
8058
  default:
8053
- throw new ll({ message: `No press outcome for: ${JSON.stringify(O)}` });
8059
+ throw new ll({ message: `No press outcome for: ${JSON.stringify(M)}` });
8054
8060
  }
8055
- }, x = (L) => {
8056
- if (L.button !== 0 || qt(L.target) || Ha(L, g.current, c.getState().menuTrigger) || w(L)) return;
8057
- const O = gm(S(L), {
8061
+ }, S = (L) => {
8062
+ if (L.button !== 0 || Xt(L.target) || Ha(L, g.current, c.getState().menuTrigger) || w(L)) return;
8063
+ const M = gm(C(L), {
8058
8064
  canSelectGraph: h.current,
8059
8065
  isWithinFrame: L.target instanceof Node && e.contains(L.target),
8060
8066
  caretAnnotationId: c.getState().caret?.annotationId ?? null
8061
8067
  });
8062
- O.kind !== "keep-caret" && (c.getState().setCaret(null), T(L, O));
8063
- }, N = (L) => {
8064
- if (qt(L.target) || w(L)) return;
8065
- const O = S(L), { layers: _, guides: M, config: C } = s.getState().scene, b = l.getState(), U = c.getState();
8066
- switch (O?.kind) {
8068
+ M.kind !== "keep-caret" && (c.getState().setCaret(null), A(L, M));
8069
+ }, O = (L) => {
8070
+ if (Xt(L.target) || w(L)) return;
8071
+ const M = C(L), { layers: _, guides: N, config: x } = s.getState().scene, b = l.getState(), U = c.getState();
8072
+ switch (M?.kind) {
8067
8073
  case "observations": {
8068
- const { observations: ee } = O, ae = dm(ee, _, C.parsingLocale);
8074
+ const { observations: ee } = M, ae = dm(ee, _, x.parsingLocale);
8069
8075
  if (ae === null) return;
8070
- const { observationIndex: Et } = ee;
8076
+ const { observationIndex: Ot } = ee;
8071
8077
  U.setPressedObservation({
8072
- observationIndex: Et,
8078
+ observationIndex: Ot,
8073
8079
  predicate: ae.predicate,
8074
8080
  selectedFor: ae
8075
8081
  }), b.setSelection([ae]);
@@ -8077,18 +8083,18 @@ var X2 = "_1tyillx1", Z2 = {
8077
8083
  }
8078
8084
  case "axis":
8079
8085
  case "legend": {
8080
- const ee = am(O, {
8086
+ const ee = am(M, {
8081
8087
  layers: _,
8082
- legends: M.legends.drawn,
8088
+ legends: N.legends.drawn,
8083
8089
  formattedAxes: v.current,
8084
- parsingLocale: C.parsingLocale
8090
+ parsingLocale: x.parsingLocale
8085
8091
  });
8086
8092
  if (ee === null) return;
8087
8093
  b.setSelection([ee]);
8088
8094
  return;
8089
8095
  }
8090
8096
  case "annotation": {
8091
- const { target: ee } = O;
8097
+ const { target: ee } = M;
8092
8098
  if (!p.current.annotations.textAnnotations.some((ae) => ae.id === ee.id)) return;
8093
8099
  b.setSelection([ee]), U.setCaret(ee.id);
8094
8100
  return;
@@ -8099,8 +8105,8 @@ var X2 = "_1tyillx1", Z2 = {
8099
8105
  return;
8100
8106
  }
8101
8107
  };
8102
- return document.addEventListener("pointerdown", x), document.addEventListener("dblclick", N), () => {
8103
- document.removeEventListener("pointerdown", x), document.removeEventListener("dblclick", N);
8108
+ return document.addEventListener("pointerdown", S), document.addEventListener("dblclick", O), () => {
8109
+ document.removeEventListener("pointerdown", S), document.removeEventListener("dblclick", O);
8104
8110
  };
8105
8111
  }, [
8106
8112
  e,
@@ -8115,17 +8121,17 @@ var X2 = "_1tyillx1", Z2 = {
8115
8121
  a
8116
8122
  ]);
8117
8123
  }, bm = (e) => {
8118
- const { selectionStore: t, commands: n, chartId: a } = z(), o = H(), i = j(D((d) => d.spec.annotations.textAnnotations)), { annotations: l } = Ee[xe()], s = oe((d) => {
8119
- const { selection: h } = t.getState(), p = l ? Xt(h) : null;
8124
+ const { selectionStore: t, commands: n, chartId: a } = z(), o = H(), i = j(D((d) => d.spec.annotations.textAnnotations)), { annotations: l } = Ee[xe()], s = ie((d) => {
8125
+ const { selection: h } = t.getState(), p = l ? Zt(h) : null;
8120
8126
  p !== null && (d.preventDefault(), n.dispatch(new ze({ id: p })), e.focus({ preventScroll: !0 }));
8121
8127
  }, [
8122
8128
  e,
8123
8129
  n,
8124
8130
  t,
8125
8131
  l
8126
- ]), c = oe((d) => {
8127
- if (tt(d.target, a)) return;
8128
- const h = l ? Xt(t.getState().selection) : null;
8132
+ ]), c = ie((d) => {
8133
+ if (nt(d.target, a)) return;
8134
+ const h = l ? Zt(t.getState().selection) : null;
8129
8135
  h !== null && i.current.some((p) => p.id === h) && (d.preventDefault(), o.getState().setCaret(h));
8130
8136
  }, [
8131
8137
  o,
@@ -8133,7 +8139,7 @@ var X2 = "_1tyillx1", Z2 = {
8133
8139
  i,
8134
8140
  a,
8135
8141
  l
8136
- ]), u = oe((d) => {
8142
+ ]), u = ie((d) => {
8137
8143
  const h = o.getState(), p = h.standingInteraction?.kind;
8138
8144
  if (p !== void 0) {
8139
8145
  p !== "chrome-popup" && h.releaseInteraction(p);
@@ -8143,7 +8149,7 @@ var X2 = "_1tyillx1", Z2 = {
8143
8149
  h.setCaret(null), e.focus({ preventScroll: !0 });
8144
8150
  return;
8145
8151
  }
8146
- return tt(d.target, a) ? e.focus({ preventScroll: !0 }) : t.getState().clearSelection();
8152
+ return nt(d.target, a) ? e.focus({ preventScroll: !0 }) : t.getState().clearSelection();
8147
8153
  }, [
8148
8154
  o,
8149
8155
  t,
@@ -8153,7 +8159,7 @@ var X2 = "_1tyillx1", Z2 = {
8153
8159
  F(() => {
8154
8160
  const d = (h) => {
8155
8161
  if (!$e(h.target, e, a) || Ba(h.target)) return;
8156
- const p = ym(h.target), g = o.getState().caret !== null && !tt(h.target, a);
8162
+ const p = ym(h.target), g = o.getState().caret !== null && !nt(h.target, a);
8157
8163
  if (!(p && !g))
8158
8164
  switch (h.key) {
8159
8165
  case "Escape":
@@ -8178,7 +8184,7 @@ var X2 = "_1tyillx1", Z2 = {
8178
8184
  ]);
8179
8185
  }, ym = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), Sm = (e, t) => {
8180
8186
  const n = H(), { store: a } = z(), { engine: o, overlayRef: i } = Ue(), l = j(t), { annotations: s, observationsPress: c, guidePress: u, tolerance: d } = Ee[xe()];
8181
- return oe(() => ({
8187
+ return ie(() => ({
8182
8188
  frameElement: e,
8183
8189
  captureRect: i.current,
8184
8190
  panelOrigin: l.current,
@@ -8202,7 +8208,7 @@ var X2 = "_1tyillx1", Z2 = {
8202
8208
  a
8203
8209
  ]);
8204
8210
  }, Cm = () => {
8205
- const e = Ee[xe()].observationMenu, t = Ii((l) => e ? l.hover.primary : null), { layers: n, coordSystem: a } = D(me((l) => ({
8211
+ const e = Ee[xe()].observationMenu, t = Ii((l) => e ? l.hover.primary : null), { layers: n, coordSystem: a } = D(ge((l) => ({
8206
8212
  layers: l.layers,
8207
8213
  coordSystem: l.coordSystem
8208
8214
  }))), { anchorResolver: o } = z(), i = Vr();
@@ -8247,24 +8253,24 @@ var X2 = "_1tyillx1", Z2 = {
8247
8253
  F(() => {
8248
8254
  const d = (f) => Ha(f, c.current, a.getState().menuTrigger), h = (f) => {
8249
8255
  if (d(f) || o.getState().selection.length > 0) return;
8250
- const S = u.current, w = c.current, y = {
8256
+ const C = u.current, w = c.current, y = {
8251
8257
  x: f.clientX - w.x,
8252
8258
  y: f.clientY - w.y
8253
- }, T = wm(y, S) ? l.query(ft(y, S)) : cn;
8254
- i.getState().setHoverState(T);
8259
+ }, A = wm(y, C) ? l.query(yt(y, C)) : cn;
8260
+ i.getState().setHoverState(A);
8255
8261
  };
8256
8262
  let p = !1;
8257
8263
  const g = () => {
8258
8264
  p = s.current.kind === "menu";
8259
8265
  }, v = (f) => {
8260
- if (qt(f.target)) return;
8261
- const { claimInteraction: S, releaseInteraction: w } = a.getState();
8266
+ if (Xt(f.target)) return;
8267
+ const { claimInteraction: C, releaseInteraction: w } = a.getState();
8262
8268
  if (!d(f) || p) {
8263
8269
  w("menu"), p && h(f);
8264
8270
  return;
8265
8271
  }
8266
8272
  const y = s.current;
8267
- y.kind === "trigger" && S({
8273
+ y.kind === "trigger" && C({
8268
8274
  kind: "menu",
8269
8275
  anchor: y.anchor
8270
8276
  });
@@ -8285,48 +8291,48 @@ var X2 = "_1tyillx1", Z2 = {
8285
8291
  const a = H(), { store: o } = z(), { store: i } = Ue(), l = j(t), s = Ee[xe()].observationsPress;
8286
8292
  F(() => (i.getState().setQueryOwnedByEditor(s), () => i.getState().setQueryOwnedByEditor(!1)), [i, s]), F(() => {
8287
8293
  let c = null, u = null, d = !1;
8288
- const h = (x) => {
8294
+ const h = (S) => {
8289
8295
  if (!s) return;
8290
- const N = i.getState();
8291
- N.isPointerSuspended || x === null && N.hover.primary === null || N.setHoverState(x ?? cn);
8296
+ const O = i.getState();
8297
+ O.isPointerSuspended || S === null && O.hover.primary === null || O.setHoverState(S ?? cn);
8292
8298
  }, p = () => {
8293
8299
  if (c = null, u === null) return;
8294
- const x = a.getState();
8295
- if (et(x.standingInteraction)) {
8296
- const O = x.menuTrigger !== null && un({
8300
+ const S = a.getState();
8301
+ if (tt(S.standingInteraction)) {
8302
+ const M = S.menuTrigger !== null && un({
8297
8303
  x: u.clientX - l.current.x,
8298
8304
  y: u.clientY - l.current.y
8299
- }, x.menuTrigger), _ = x.editTargetUnderPointer;
8300
- O ? x.setEditTargetUnderPointer({ kind: "menu-trigger" }) : _?.kind === "menu-trigger" && x.setEditTargetUnderPointer(null);
8305
+ }, S.menuTrigger), _ = S.editTargetUnderPointer;
8306
+ M ? S.setEditTargetUnderPointer({ kind: "menu-trigger" }) : _?.kind === "menu-trigger" && S.setEditTargetUnderPointer(null);
8301
8307
  return;
8302
8308
  }
8303
8309
  d && (d = !1, u = {
8304
8310
  ...u,
8305
8311
  target: km(u)
8306
8312
  });
8307
- const { targetAtPoint: N, hover: L } = Do(u, n());
8308
- x.setEditTargetUnderPointer(N), h(L);
8313
+ const { targetAtPoint: O, hover: L } = Do(u, n());
8314
+ S.setEditTargetUnderPointer(O), h(L);
8309
8315
  }, g = () => {
8310
8316
  c === null && (c = requestAnimationFrame(p));
8311
8317
  }, v = () => {
8312
8318
  u !== null && (d = !0, g());
8313
8319
  }, f = () => {
8314
8320
  a.getState().setEditTargetUnderPointer(null), h(null);
8315
- }, S = (x) => {
8321
+ }, C = (S) => {
8316
8322
  u = {
8317
- target: x.target,
8318
- clientX: x.clientX,
8319
- clientY: x.clientY
8323
+ target: S.target,
8324
+ clientX: S.clientX,
8325
+ clientY: S.clientY
8320
8326
  }, d = !1, g();
8321
8327
  }, w = () => {
8322
8328
  u = null, c !== null && (cancelAnimationFrame(c), c = null), f();
8323
- }, y = a.subscribe((x, N) => {
8324
- et(N.standingInteraction) && !et(x.standingInteraction) && v();
8325
- }), T = o.subscribe((x, N) => {
8326
- x.scene !== N.scene && (et(a.getState().standingInteraction) || v());
8329
+ }, y = a.subscribe((S, O) => {
8330
+ tt(O.standingInteraction) && !tt(S.standingInteraction) && v();
8331
+ }), A = o.subscribe((S, O) => {
8332
+ S.scene !== O.scene && (tt(a.getState().standingInteraction) || v());
8327
8333
  });
8328
- return e.addEventListener("pointermove", S), e.addEventListener("pointerleave", w), () => {
8329
- c !== null && cancelAnimationFrame(c), y(), T(), e.removeEventListener("pointermove", S), e.removeEventListener("pointerleave", w), f();
8334
+ return e.addEventListener("pointermove", C), e.addEventListener("pointerleave", w), () => {
8335
+ c !== null && cancelAnimationFrame(c), y(), A(), e.removeEventListener("pointermove", C), e.removeEventListener("pointerleave", w), f();
8330
8336
  };
8331
8337
  }, [
8332
8338
  e,
@@ -8337,7 +8343,7 @@ var X2 = "_1tyillx1", Z2 = {
8337
8343
  s,
8338
8344
  n
8339
8345
  ]);
8340
- }, km = (e) => typeof document.elementFromPoint == "function" ? document.elementFromPoint(e.clientX, e.clientY) : e.target, et = (e) => {
8346
+ }, km = (e) => typeof document.elementFromPoint == "function" ? document.elementFromPoint(e.clientX, e.clientY) : e.target, tt = (e) => {
8341
8347
  if (e === null) return !1;
8342
8348
  switch (e.kind) {
8343
8349
  case "menu":
@@ -8415,7 +8421,7 @@ var X2 = "_1tyillx1", Z2 = {
8415
8421
  shouldAnimateTransitions: o
8416
8422
  });
8417
8423
  }, Om = ({ frameElement: e, frameRect: t, panelOrigin: n, panelRect: a, boxRef: o, shouldAnimateTransitions: i }) => {
8418
- const l = Ct(), s = _o(), { annotations: c, editOutline: u, overlayMenu: d } = Ee[xe()], h = I(() => ({
8424
+ const l = xt(), s = _o(), { annotations: c, editOutline: u, overlayMenu: d } = Ee[xe()], h = I(() => ({
8419
8425
  width: t.width,
8420
8426
  height: t.height
8421
8427
  }), [t.width, t.height]);
@@ -8528,7 +8534,7 @@ var Fm = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeho
8528
8534
  id: g,
8529
8535
  ariaLabel: h,
8530
8536
  ariaLabelledBy: p
8531
- }), { commitUnlessHeldKey: f, gestureHandlers: S } = xt(n);
8537
+ }), { commitUnlessHeldKey: f, gestureHandlers: C } = wt(n);
8532
8538
  return /* @__PURE__ */ r(Bn.Root, {
8533
8539
  className: Rm,
8534
8540
  value: e,
@@ -8552,7 +8558,7 @@ var Fm = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeho
8552
8558
  /* @__PURE__ */ r(Bn.Input, {
8553
8559
  className: _m,
8554
8560
  placeholder: l,
8555
- ...S,
8561
+ ...C,
8556
8562
  "aria-invalid": d === !0 ? !0 : void 0,
8557
8563
  ...v
8558
8564
  }),
@@ -8576,7 +8582,7 @@ var Hm = 6, Gm = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
8576
8582
  id: u,
8577
8583
  ariaLabel: s,
8578
8584
  ariaLabelledBy: c
8579
- }), h = i === "swatch", { commitAfterChange: p, gestureHandlers: g } = xt(a);
8585
+ }), h = i === "swatch", { commitAfterChange: p, gestureHandlers: g } = wt(a);
8580
8586
  return /* @__PURE__ */ r(fa, {
8581
8587
  className: fe(zm, Vm(o ?? e.length)),
8582
8588
  value: t,
@@ -8619,7 +8625,7 @@ var jm = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
8619
8625
  ariaLabel: l,
8620
8626
  ariaLabelledBy: s
8621
8627
  });
8622
- return /* @__PURE__ */ m(ce.Root, {
8628
+ return /* @__PURE__ */ m(de.Root, {
8623
8629
  value: t,
8624
8630
  onValueChange: (d) => d !== null && n(d),
8625
8631
  disabled: o,
@@ -8627,26 +8633,26 @@ var jm = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
8627
8633
  value: d.value,
8628
8634
  label: d.label
8629
8635
  })),
8630
- children: [/* @__PURE__ */ m(ce.Trigger, {
8636
+ children: [/* @__PURE__ */ m(de.Trigger, {
8631
8637
  className: $m,
8632
8638
  "data-error": i === !0,
8633
8639
  ...u,
8634
- children: [/* @__PURE__ */ r(ce.Value, {
8640
+ children: [/* @__PURE__ */ r(de.Value, {
8635
8641
  className: Um,
8636
8642
  children: (d) => Ym(e, d, a)
8637
- }), /* @__PURE__ */ r(ce.Icon, {
8643
+ }), /* @__PURE__ */ r(de.Icon, {
8638
8644
  className: Cr,
8639
- children: /* @__PURE__ */ r(We, { size: "sm" })
8645
+ children: /* @__PURE__ */ r(Ke, { size: "sm" })
8640
8646
  })]
8641
- }), /* @__PURE__ */ r(ce.Portal, {
8642
- container: pe(),
8643
- children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(ce.Positioner, {
8647
+ }), /* @__PURE__ */ r(de.Portal, {
8648
+ container: me(),
8649
+ children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(de.Positioner, {
8644
8650
  className: Km,
8645
8651
  sideOffset: 4,
8646
8652
  alignItemWithTrigger: !1,
8647
- children: /* @__PURE__ */ r(ce.Popup, {
8653
+ children: /* @__PURE__ */ r(de.Popup, {
8648
8654
  className: qm,
8649
- children: e.map((d) => /* @__PURE__ */ m(ce.Item, {
8655
+ children: e.map((d) => /* @__PURE__ */ m(de.Item, {
8650
8656
  value: d.value,
8651
8657
  disabled: d.isDisabled,
8652
8658
  className: Xm,
@@ -8654,12 +8660,12 @@ var jm = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
8654
8660
  d.icon,
8655
8661
  /* @__PURE__ */ m("span", {
8656
8662
  className: Zm,
8657
- children: [/* @__PURE__ */ r(ce.ItemText, { children: d.label }), d.description !== void 0 && /* @__PURE__ */ r("span", {
8663
+ children: [/* @__PURE__ */ r(de.ItemText, { children: d.label }), d.description !== void 0 && /* @__PURE__ */ r("span", {
8658
8664
  className: "_1g5x15w8",
8659
8665
  children: d.description
8660
8666
  })]
8661
8667
  }),
8662
- /* @__PURE__ */ r(ce.ItemIndicator, {
8668
+ /* @__PURE__ */ r(de.ItemIndicator, {
8663
8669
  className: Cr,
8664
8670
  children: /* @__PURE__ */ r(Ma, { size: "sm" })
8665
8671
  })
@@ -8677,25 +8683,25 @@ var og = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
8677
8683
  const h = Te({
8678
8684
  ariaLabel: u,
8679
8685
  ariaLabelledBy: d
8680
- }, !1), p = ig(e, l, s), { commitUnlessHeldKey: g, gestureHandlers: v } = xt(n);
8686
+ }, !1), p = ig(e, l, s), { commitUnlessHeldKey: g, gestureHandlers: v } = wt(n);
8681
8687
  return /* @__PURE__ */ m("div", {
8682
8688
  className: Qm,
8683
- children: [/* @__PURE__ */ r(ue.Root, {
8689
+ children: [/* @__PURE__ */ r(he.Root, {
8684
8690
  className: eg,
8685
8691
  value: e,
8686
8692
  onValueChange: (f) => t(f),
8687
- onValueCommitted: (f, S) => {
8688
- g(S.reason === Za);
8693
+ onValueCommitted: (f, C) => {
8694
+ g(C.reason === Za);
8689
8695
  },
8690
8696
  min: a,
8691
8697
  max: o,
8692
8698
  step: i,
8693
8699
  disabled: c,
8694
- children: /* @__PURE__ */ r(ue.Control, {
8700
+ children: /* @__PURE__ */ r(he.Control, {
8695
8701
  className: tg,
8696
- children: /* @__PURE__ */ m(ue.Track, {
8702
+ children: /* @__PURE__ */ m(he.Track, {
8697
8703
  className: ng,
8698
- children: [/* @__PURE__ */ r(ue.Indicator, { className: rg }), /* @__PURE__ */ r(ue.Thumb, {
8704
+ children: [/* @__PURE__ */ r(he.Indicator, { className: rg }), /* @__PURE__ */ r(he.Thumb, {
8699
8705
  className: ag,
8700
8706
  ...v,
8701
8707
  ...h
@@ -8750,8 +8756,8 @@ var og = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
8750
8756
  TextField: hg,
8751
8757
  NumberField: Fm,
8752
8758
  Select: jm
8753
- }, Yt = Be(pg), mg = ({ controls: e, children: t }) => {
8754
- const n = we(Yt), a = I(() => ({
8759
+ }, Jt = Be(pg), mg = ({ controls: e, children: t }) => {
8760
+ const n = we(Jt), a = I(() => ({
8755
8761
  ToggleGroup: e?.ToggleGroup ?? n.ToggleGroup,
8756
8762
  Switch: e?.Switch ?? n.Switch,
8757
8763
  Slider: e?.Slider ?? n.Slider,
@@ -8771,11 +8777,11 @@ var og = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
8771
8777
  e?.NumberField,
8772
8778
  e?.Select
8773
8779
  ]);
8774
- return /* @__PURE__ */ r(Yt.Provider, {
8780
+ return /* @__PURE__ */ r(Jt.Provider, {
8775
8781
  value: a,
8776
8782
  children: t
8777
8783
  });
8778
- }, V = () => we(Yt), gg = "_12lhx9e0", zo = ({ children: e }) => /* @__PURE__ */ r("div", {
8784
+ }, V = () => we(Jt), gg = "_12lhx9e0", zo = ({ children: e }) => /* @__PURE__ */ r("div", {
8779
8785
  className: gg,
8780
8786
  children: e
8781
8787
  }), vg = "_139ohwv0", J = ({ children: e }) => /* @__PURE__ */ r("div", {
@@ -8795,7 +8801,7 @@ function xg(e) {
8795
8801
  return t.includes("_1ii3bsb0") || t.includes("_1ii3bsb1");
8796
8802
  }
8797
8803
  var wg = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = void 0, className: o }) => {
8798
- const i = Ri(e), { themeClass: l, inlineVarsStyle: s } = ln(), [c, u] = te(() => a ? [a] : []), d = I(() => ({
8804
+ const i = Ri(e), { themeClass: l, inlineVarsStyle: s } = ht(), [c, u] = te(() => a ? [a] : []), d = I(() => ({
8799
8805
  expandSection: (h) => u([h]),
8800
8806
  collapseAllSections: () => u([])
8801
8807
  }), []);
@@ -8825,7 +8831,7 @@ var wg = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = voi
8825
8831
  }, wr = "pr583x2", Tg = {
8826
8832
  plain: "pr583x4 pr583x3",
8827
8833
  withIcon: "pr583x5 pr583x3"
8828
- }, A = ({ label: e, layout: t = "grid", icon: n, children: a }) => {
8834
+ }, T = ({ label: e, layout: t = "grid", icon: n, children: a }) => {
8829
8835
  const o = Le(), i = Le();
8830
8836
  return e === void 0 ? /* @__PURE__ */ r("div", {
8831
8837
  className: xr[t],
@@ -8988,13 +8994,13 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
8988
8994
  if (!i) return null;
8989
8995
  const h = i.coordSystem.type === "polar" ? i.coordSystem.axisMapping[e].geometry : "linear", p = i.config.axes[e], g = i.scales[e], v = g?.spec, f = v?.scaleType === "continuous" ? v : void 0;
8990
8996
  if (h === "circular" || h === "radial" && f === void 0) return null;
8991
- const S = v !== void 0 && "reverse" in v ? v : void 0, w = v?.scaleType === "continuous" || v?.scaleType === "datetime", y = f !== void 0 && Os(i, e), T = f?.transform === "log", x = f?.domainMax ?? null, N = _g(f), L = (P, se) => P.map((Xe) => ({
8992
- value: Xe,
8993
- label: se(Xe)
8994
- })), O = i.guides.axes.find((P) => P.scaleAestheticKey === e)?.position, _ = Ng[O === "bottom" || O === "top" || O === void 0 && e === "x" ? "horizontal" : "vertical"], M = e === "y" ? Ns(i.spec) : null, C = M === null ? void 0 : ve(i.spec.layers, M), b = i.guides.legends.drawn.some((P) => _.some((se) => se === P.position)), U = _.map((P) => ({
8997
+ const C = v !== void 0 && "reverse" in v ? v : void 0, w = v?.scaleType === "continuous" || v?.scaleType === "datetime", y = f !== void 0 && Os(i, e), A = f?.transform === "log", S = f?.domainMax ?? null, O = _g(f), L = (P, ce) => P.map((Ze) => ({
8998
+ value: Ze,
8999
+ label: ce(Ze)
9000
+ })), M = i.guides.axes.find((P) => P.scaleAestheticKey === e)?.position, _ = Ng[M === "bottom" || M === "top" || M === void 0 && e === "x" ? "horizontal" : "vertical"], N = e === "y" ? Ns(i.spec) : null, x = N === null ? void 0 : ve(i.spec.layers, N), b = i.guides.legends.drawn.some((P) => _.some((ce) => ce === P.position)), U = _.map((P) => ({
8995
9001
  value: P,
8996
9002
  label: l(Rg[P])
8997
- })), ee = L(["auto", "edges"], (P) => l(P === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), ae = L(["linear", "log"], (P) => l(P === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), Et = L([
9003
+ })), ee = L(["auto", "edges"], (P) => l(P === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), ae = L(["linear", "log"], (P) => l(P === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), Ot = L([
8998
9004
  "auto",
8999
9005
  "zero",
9000
9006
  "custom"
@@ -9029,7 +9035,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9029
9035
  transform: P === "log" ? "log" : "linear"
9030
9036
  }));
9031
9037
  }, In = (P) => {
9032
- o.commands.dispatch(new Mt({
9038
+ o.commands.dispatch(new Nt({
9033
9039
  scaledAesthetic: e,
9034
9040
  ...P
9035
9041
  }), { transient: !0 });
@@ -9038,27 +9044,27 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9038
9044
  }, ni = (P) => {
9039
9045
  P !== null && In({ domainMax: P });
9040
9046
  }, ri = (P) => {
9041
- const se = P === "auto" ? null : P === "zero" ? 0 : Ar(g?.domain, "start");
9042
- o.commands.dispatch(new Mt({
9047
+ const ce = P === "auto" ? null : P === "zero" ? 0 : Ar(g?.domain, "start");
9048
+ o.commands.dispatch(new Nt({
9043
9049
  scaledAesthetic: e,
9044
- domainMin: se
9050
+ domainMin: ce
9045
9051
  }));
9046
9052
  }, ai = (P) => {
9047
- const se = P === "custom" ? Ar(g?.domain, "end") : null;
9048
- o.commands.dispatch(new Mt({
9053
+ const ce = P === "custom" ? Ar(g?.domain, "end") : null;
9054
+ o.commands.dispatch(new Nt({
9049
9055
  scaledAesthetic: e,
9050
- domainMax: se
9056
+ domainMax: ce
9051
9057
  }));
9052
9058
  }, oi = (P) => {
9053
- C !== void 0 && o.commands.dispatch(new El({
9054
- layerId: C.id,
9059
+ x !== void 0 && o.commands.dispatch(new El({
9060
+ layerId: x.id,
9055
9061
  yScaleType: P === "double" ? "secondary" : "primary"
9056
9062
  }));
9057
9063
  }, ii = (P) => {
9058
- const se = _.find((Xe) => Xe === P);
9059
- se && o.commands.dispatch(new ml({
9064
+ const ce = _.find((Ze) => Ze === P);
9065
+ ce && o.commands.dispatch(new ml({
9060
9066
  axis: e,
9061
- position: se
9067
+ position: ce
9062
9068
  }));
9063
9069
  };
9064
9070
  return /* @__PURE__ */ r(K, {
@@ -9066,36 +9072,36 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9066
9072
  layout: n,
9067
9073
  preview: a,
9068
9074
  children: /* @__PURE__ */ m(J, { children: [
9069
- /* @__PURE__ */ r(A, {
9075
+ /* @__PURE__ */ r(T, {
9070
9076
  label: l("editor.axesPanel.controls.visible"),
9071
9077
  children: /* @__PURE__ */ r(c, {
9072
9078
  isChecked: p.isVisible,
9073
9079
  onChange: Zo
9074
9080
  })
9075
9081
  }),
9076
- C !== void 0 && /* @__PURE__ */ r(A, {
9082
+ x !== void 0 && /* @__PURE__ */ r(T, {
9077
9083
  label: l("editor.axesPanel.controls.numberOfAxes"),
9078
9084
  children: /* @__PURE__ */ r(d, {
9079
- value: C.yScaleType === "secondary" ? "double" : "single",
9085
+ value: x.yScaleType === "secondary" ? "double" : "single",
9080
9086
  options: Xo,
9081
9087
  onChange: oi
9082
9088
  })
9083
9089
  }),
9084
- h === "linear" && /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(A, {
9090
+ h === "linear" && /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(T, {
9085
9091
  label: l("editor.axesPanel.controls.title"),
9086
9092
  children: /* @__PURE__ */ r(u, {
9087
9093
  value: p.label ?? "",
9088
9094
  onChange: jo,
9089
9095
  onCommit: o.commands.commit
9090
9096
  })
9091
- }), /* @__PURE__ */ r(A, {
9097
+ }), /* @__PURE__ */ r(T, {
9092
9098
  label: l("editor.axesPanel.controls.ticks"),
9093
9099
  children: /* @__PURE__ */ r(c, {
9094
9100
  isChecked: p.ticks.isVisible,
9095
9101
  onChange: Yo
9096
9102
  })
9097
9103
  })] }),
9098
- w && /* @__PURE__ */ r(A, {
9104
+ w && /* @__PURE__ */ r(T, {
9099
9105
  label: l("editor.axesPanel.controls.labels"),
9100
9106
  children: /* @__PURE__ */ r(d, {
9101
9107
  value: p.ticks.mode,
@@ -9103,39 +9109,39 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9103
9109
  onChange: Jo
9104
9110
  })
9105
9111
  }),
9106
- f && h === "linear" && !b && /* @__PURE__ */ r(A, {
9112
+ f && h === "linear" && !b && /* @__PURE__ */ r(T, {
9107
9113
  label: l("editor.axesPanel.controls.position"),
9108
9114
  children: /* @__PURE__ */ r(d, {
9109
- value: O ?? p.position,
9115
+ value: M ?? p.position,
9110
9116
  options: U,
9111
9117
  onChange: ii
9112
9118
  })
9113
9119
  }),
9114
- S !== void 0 && /* @__PURE__ */ r(A, {
9120
+ C !== void 0 && /* @__PURE__ */ r(T, {
9115
9121
  label: l("editor.axesPanel.controls.reverse"),
9116
9122
  children: /* @__PURE__ */ r(d, {
9117
- value: S.reverse === !0 ? "yes" : "no",
9123
+ value: C.reverse === !0 ? "yes" : "no",
9118
9124
  options: qo,
9119
9125
  onChange: Qo
9120
9126
  })
9121
9127
  }),
9122
- f && !y && /* @__PURE__ */ r(A, {
9128
+ f && !y && /* @__PURE__ */ r(T, {
9123
9129
  label: l("editor.axesPanel.controls.scale"),
9124
9130
  children: /* @__PURE__ */ r(d, {
9125
- value: T ? "log" : "linear",
9131
+ value: A ? "log" : "linear",
9126
9132
  options: ae,
9127
9133
  onChange: ei
9128
9134
  })
9129
9135
  }),
9130
- f && !T && /* @__PURE__ */ m(Y, { children: [
9131
- !y && /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(A, {
9136
+ f && !A && /* @__PURE__ */ m(Y, { children: [
9137
+ !y && /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(T, {
9132
9138
  label: l("editor.axesPanel.controls.startFrom"),
9133
9139
  children: /* @__PURE__ */ r(d, {
9134
- value: N,
9135
- options: Et,
9140
+ value: O,
9141
+ options: Ot,
9136
9142
  onChange: ri
9137
9143
  })
9138
- }), N !== "auto" && /* @__PURE__ */ r(A, {
9144
+ }), O !== "auto" && /* @__PURE__ */ r(T, {
9139
9145
  label: l("editor.axesPanel.controls.value"),
9140
9146
  children: /* @__PURE__ */ r(s, {
9141
9147
  value: f.domainMin ?? null,
@@ -9143,18 +9149,18 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9143
9149
  onCommit: o.commands.commit
9144
9150
  })
9145
9151
  })] }),
9146
- /* @__PURE__ */ r(A, {
9152
+ /* @__PURE__ */ r(T, {
9147
9153
  label: l("editor.axesPanel.controls.endAt"),
9148
9154
  children: /* @__PURE__ */ r(d, {
9149
- value: x === null ? "auto" : "custom",
9155
+ value: S === null ? "auto" : "custom",
9150
9156
  options: Ko,
9151
9157
  onChange: ai
9152
9158
  })
9153
9159
  }),
9154
- x !== null && /* @__PURE__ */ r(A, {
9160
+ S !== null && /* @__PURE__ */ r(T, {
9155
9161
  label: l("editor.axesPanel.controls.value"),
9156
9162
  children: /* @__PURE__ */ r(s, {
9157
- value: x,
9163
+ value: S,
9158
9164
  onChange: ni,
9159
9165
  onCommit: o.commands.commit
9160
9166
  })
@@ -9170,7 +9176,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9170
9176
  return typeof n == "number" ? n : 0;
9171
9177
  }, Ln = ({ value: e, onChange: t }) => {
9172
9178
  const n = G(), a = E(), { TextField: o } = V(), i = e !== null && typeof e != "string", l = (s) => t(s === "" ? null : s);
9173
- return /* @__PURE__ */ r(A, {
9179
+ return /* @__PURE__ */ r(T, {
9174
9180
  label: a("editor.elementsPanel.contentValue"),
9175
9181
  children: /* @__PURE__ */ r(o, {
9176
9182
  value: typeof e == "string" ? e : "",
@@ -9183,7 +9189,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9183
9189
  const a = G(), o = W(a), i = E(), { Switch: l } = V();
9184
9190
  if (!o) return null;
9185
9191
  const s = o.config.content, c = (d) => {
9186
- a.commands.dispatch(new pt({
9192
+ a.commands.dispatch(new gt({
9187
9193
  part: "caption",
9188
9194
  isVisible: d
9189
9195
  }));
@@ -9194,7 +9200,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9194
9200
  title: e ?? i("editor.elementsPanel.footerSection.caption"),
9195
9201
  layout: t,
9196
9202
  preview: n,
9197
- children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(A, {
9203
+ children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(T, {
9198
9204
  label: i("editor.elementsPanel.contentVisible"),
9199
9205
  children: /* @__PURE__ */ r(l, {
9200
9206
  isChecked: s.isCaptionVisible,
@@ -9209,7 +9215,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9209
9215
  const a = G(), o = W(a), i = E(), { Switch: l } = V();
9210
9216
  if (!o) return null;
9211
9217
  const s = o.config.content, c = (u) => {
9212
- a.commands.dispatch(new pt({
9218
+ a.commands.dispatch(new gt({
9213
9219
  part: "source",
9214
9220
  isVisible: u
9215
9221
  }));
@@ -9218,7 +9224,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9218
9224
  title: e ?? i("editor.elementsPanel.sourceSection.title"),
9219
9225
  layout: t,
9220
9226
  preview: n,
9221
- children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(A, {
9227
+ children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(T, {
9222
9228
  label: i("editor.elementsPanel.contentVisible"),
9223
9229
  children: /* @__PURE__ */ r(l, {
9224
9230
  isChecked: s.isSourceVisible,
@@ -9243,7 +9249,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9243
9249
  ...e,
9244
9250
  label: c
9245
9251
  });
9246
- return /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(A, {
9252
+ return /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(T, {
9247
9253
  label: n("editor.elementsPanel.sourceSection.url"),
9248
9254
  children: /* @__PURE__ */ r(a, {
9249
9255
  value: e.url ?? "",
@@ -9251,7 +9257,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9251
9257
  onCommit: i,
9252
9258
  hasError: kr.test(e.url ?? "") && !Es(e.url)
9253
9259
  })
9254
- }), /* @__PURE__ */ r(A, {
9260
+ }), /* @__PURE__ */ r(T, {
9255
9261
  label: n("editor.elementsPanel.sourceSection.name"),
9256
9262
  children: /* @__PURE__ */ r(a, {
9257
9263
  value: e.label ?? "",
@@ -9263,7 +9269,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9263
9269
  const a = G(), o = W(a), i = E(), { Switch: l } = V();
9264
9270
  if (!o) return null;
9265
9271
  const s = o.config.content, c = (d) => {
9266
- a.commands.dispatch(new pt({
9272
+ a.commands.dispatch(new gt({
9267
9273
  part: "subtitle",
9268
9274
  isVisible: d
9269
9275
  }));
@@ -9274,7 +9280,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9274
9280
  title: e ?? i("editor.elementsPanel.headerSection.subtitle"),
9275
9281
  layout: t,
9276
9282
  preview: n,
9277
- children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(A, {
9283
+ children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(T, {
9278
9284
  label: i("editor.elementsPanel.contentVisible"),
9279
9285
  children: /* @__PURE__ */ r(l, {
9280
9286
  isChecked: s.isSubtitleVisible,
@@ -9285,11 +9291,11 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9285
9291
  onChange: u
9286
9292
  })] })
9287
9293
  });
9288
- }, kt = (e) => {
9289
- const { colorScheme: t } = ln(), n = I(() => us({ colorScheme: t }), [t]);
9294
+ }, Lt = (e) => {
9295
+ const { colorScheme: t } = ht(), n = I(() => us({ colorScheme: t }), [t]);
9290
9296
  return I(() => e === null ? null : n.readers(e), [e, n]);
9291
9297
  }, Pn = (e, t, n) => {
9292
- const a = kt(e);
9298
+ const a = Lt(e);
9293
9299
  return I(() => {
9294
9300
  if (a === null || e === null || t === null) return null;
9295
9301
  const o = ve(e.layers, t);
@@ -9300,7 +9306,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9300
9306
  t,
9301
9307
  n
9302
9308
  ]);
9303
- }, Jt = [
9309
+ }, Qt = [
9304
9310
  0.8,
9305
9311
  1,
9306
9312
  1.2,
@@ -9311,14 +9317,14 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9311
9317
  2.5,
9312
9318
  3,
9313
9319
  4
9314
- ], Vg = Jt.length / 2, $g = { select: { target: "graph" } }, Ug = ({ title: e, layout: t = "collapsible", preview: n }) => {
9315
- const a = G(), o = W(a), i = E(), { RadioGrid: l } = V(), s = kt(o);
9320
+ ], Vg = Qt.length / 2, $g = { select: { target: "graph" } }, Ug = ({ title: e, layout: t = "collapsible", preview: n }) => {
9321
+ const a = G(), o = W(a), i = E(), { RadioGrid: l } = V(), s = Lt(o);
9316
9322
  if (!o || !s) return null;
9317
- const c = s.graph().get("textScale"), u = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), d = Jt.map((p) => ({
9323
+ const c = s.graph().get("textScale"), u = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), d = Qt.map((p) => ({
9318
9324
  value: `${p}`,
9319
9325
  label: u(p)
9320
9326
  })), h = (p) => {
9321
- const g = Jt.find((f) => `${f}` === p);
9327
+ const g = Qt.find((f) => `${f}` === p);
9322
9328
  if (g === void 0) return;
9323
9329
  const v = Ce(o.spec.styles.overrides, $g)?.declarations ?? {};
9324
9330
  a.commands.dispatch(new ke({
@@ -9348,7 +9354,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9348
9354
  const a = G(), o = W(a), i = E(), { Switch: l } = V();
9349
9355
  if (!o) return null;
9350
9356
  const s = o.config.content, c = (d) => {
9351
- a.commands.dispatch(new pt({
9357
+ a.commands.dispatch(new gt({
9352
9358
  part: "title",
9353
9359
  isVisible: d
9354
9360
  }));
@@ -9359,7 +9365,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9359
9365
  title: e ?? i("editor.elementsPanel.headerSection.toggleTitle"),
9360
9366
  layout: t,
9361
9367
  preview: n,
9362
- children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(A, {
9368
+ children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(T, {
9363
9369
  label: i("editor.elementsPanel.contentVisible"),
9364
9370
  children: /* @__PURE__ */ r(l, {
9365
9371
  isChecked: s.isTitleVisible,
@@ -9382,8 +9388,8 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9382
9388
  }), lv = ({ children: e, ...t }) => /* @__PURE__ */ r(Ho.Root, {
9383
9389
  ...t,
9384
9390
  children: e ?? /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(Tr, { axis: "x" }), /* @__PURE__ */ r(Tr, { axis: "y" })] })
9385
- }), Lt = (e) => `${e}px`, Vo = (e) => `${Math.round(e * 100)}%`, Kg = (e) => `${e}°`, qg = 24, Xg = { select: { target: "graph" } }, Lr = ["dim", "desaturate"], sv = ({ title: e, layout: t = "collapsible", preview: n }) => {
9386
- const a = G(), o = W(a), i = E(), { Slider: l, ToggleGroup: s } = V(), c = kt(o);
9391
+ }), Pt = (e) => `${e}px`, Vo = (e) => `${Math.round(e * 100)}%`, Kg = (e) => `${e}°`, qg = 24, Xg = { select: { target: "graph" } }, Lr = ["dim", "desaturate"], sv = ({ title: e, layout: t = "collapsible", preview: n }) => {
9392
+ const a = G(), o = W(a), i = E(), { Slider: l, ToggleGroup: s } = V(), c = Lt(o);
9387
9393
  if (!o || !c) return null;
9388
9394
  const u = c.graph().get("cornerRadius"), d = Fs(o.spec), h = Lr.map((v) => ({
9389
9395
  value: v,
@@ -9401,25 +9407,25 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9401
9407
  }
9402
9408
  }), { transient: !0 });
9403
9409
  }, g = (v) => {
9404
- const f = Lr.find((S) => S === v);
9410
+ const f = Lr.find((C) => C === v);
9405
9411
  f && a.commands.dispatch(new Il({ dimStyle: f }));
9406
9412
  };
9407
9413
  return /* @__PURE__ */ r(K, {
9408
9414
  title: e ?? i("editor.colorPanel.appearanceSection.title"),
9409
9415
  layout: t,
9410
9416
  preview: n,
9411
- children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(A, {
9417
+ children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(T, {
9412
9418
  label: i("editor.colorPanel.borderSection.cornerRadius"),
9413
9419
  children: /* @__PURE__ */ r(l, {
9414
9420
  value: u,
9415
9421
  min: 0,
9416
9422
  max: qg,
9417
9423
  step: 1,
9418
- formatValue: Lt,
9424
+ formatValue: Pt,
9419
9425
  onChange: p,
9420
9426
  onCommit: a.commands.commit
9421
9427
  })
9422
- }), /* @__PURE__ */ r(A, {
9428
+ }), /* @__PURE__ */ r(T, {
9423
9429
  label: i("editor.colorPanel.appearanceSection.highlightStyle"),
9424
9430
  children: /* @__PURE__ */ r(s, {
9425
9431
  value: d,
@@ -9437,10 +9443,10 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9437
9443
  width: f
9438
9444
  }), { transient: !0 });
9439
9445
  }, h = (f) => {
9440
- const S = Mn.find((w) => w === f);
9441
- S && a.commands.dispatch(new bl({
9446
+ const C = Mn.find((w) => w === f);
9447
+ C && a.commands.dispatch(new bl({
9442
9448
  layerId: c.id,
9443
- cornerRadius: S
9449
+ cornerRadius: C
9444
9450
  }));
9445
9451
  }, p = Mn.map((f) => ({
9446
9452
  value: f,
@@ -9450,7 +9456,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9450
9456
  title: e ?? i("editor.graphPanel.barSection.title"),
9451
9457
  layout: t,
9452
9458
  preview: n,
9453
- children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(A, {
9459
+ children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(T, {
9454
9460
  label: i("editor.graphPanel.barSection.thickness"),
9455
9461
  children: /* @__PURE__ */ r(l, {
9456
9462
  value: g,
@@ -9461,7 +9467,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9461
9467
  onChange: d,
9462
9468
  onCommit: a.commands.commit
9463
9469
  })
9464
- }), /* @__PURE__ */ r(A, {
9470
+ }), /* @__PURE__ */ r(T, {
9465
9471
  label: i("editor.graphPanel.barSection.rounding"),
9466
9472
  layout: "stack",
9467
9473
  children: /* @__PURE__ */ r(s, {
@@ -9471,7 +9477,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9471
9477
  })
9472
9478
  })] })
9473
9479
  });
9474
- }, Pt = ({ children: e }) => {
9480
+ }, It = ({ children: e }) => {
9475
9481
  const t = Le();
9476
9482
  return /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r("g", {
9477
9483
  filter: `url(#${t})`,
@@ -9496,11 +9502,11 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9496
9502
  floodOpacity: "0.16"
9497
9503
  })]
9498
9504
  }) })] });
9499
- }, It = "qdaoth0", jg = (e) => /* @__PURE__ */ m(k, {
9505
+ }, Et = "qdaoth0", jg = (e) => /* @__PURE__ */ m(k, {
9500
9506
  viewBox: "0 0 31 33",
9501
9507
  ...e,
9502
- children: [/* @__PURE__ */ r(Pt, { children: /* @__PURE__ */ r("path", {
9503
- className: It,
9508
+ children: [/* @__PURE__ */ r(It, { children: /* @__PURE__ */ r("path", {
9509
+ className: Et,
9504
9510
  fillRule: "evenodd",
9505
9511
  clipRule: "evenodd",
9506
9512
  d: "M25.7417 6.23664C25.7417 6.09417 25.7076 5.95967 25.6471 5.84086C25.5633 5.67624 25.4288 5.54173 25.2641 5.4579C25.1453 5.39739 25.0108 5.36328 24.8684 5.36328H12.0591C11.5767 5.36328 11.1857 5.7543 11.1857 6.23664C11.1857 6.71899 11.5767 7.11 12.0591 7.11H22.7599L5.61908 24.2508C5.27801 24.5919 5.27801 25.1448 5.61908 25.4859C5.96015 25.827 6.51313 25.827 6.8542 25.4859L23.995 8.34513V19.0459C23.995 19.5283 24.386 19.9193 24.8684 19.9193C25.3507 19.9193 25.7417 19.5283 25.7417 19.0459V6.23664ZM20.995 15.5878V19.0459C20.995 21.1851 22.7292 22.9193 24.8684 22.9193C27.0076 22.9193 28.7417 21.1851 28.7417 19.0459V6.23664C28.7417 4.09744 27.0076 2.36328 24.8684 2.36328H12.0591C9.91985 2.36328 8.18569 4.09744 8.18569 6.23664C8.18569 8.37584 9.91985 10.11 12.0591 10.11H15.5172L3.49777 22.1295C1.98512 23.6421 1.98513 26.0946 3.49776 27.6072C5.0104 29.1199 7.46288 29.1199 8.97552 27.6072L20.995 15.5878Z"
@@ -9511,8 +9517,8 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9511
9517
  }), Yg = (e) => /* @__PURE__ */ r(k, {
9512
9518
  viewBox: "0 0 32 32",
9513
9519
  ...e,
9514
- children: /* @__PURE__ */ m(Pt, { children: [/* @__PURE__ */ r("path", {
9515
- className: It,
9520
+ children: /* @__PURE__ */ m(It, { children: [/* @__PURE__ */ r("path", {
9521
+ className: Et,
9516
9522
  d: "M11 21H21V11H11V21ZM29 23C29 26.3137 26.3137 29 23 29H9C5.68629 29 3 26.3137 3 23V9C3 5.68629 5.68629 3 9 3H23C26.3137 3 29 5.68629 29 9V23Z"
9517
9523
  }), /* @__PURE__ */ r("path", {
9518
9524
  fill: "currentColor",
@@ -9521,8 +9527,8 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9521
9527
  }), Jg = (e) => /* @__PURE__ */ m(k, {
9522
9528
  viewBox: "0 0 32 33",
9523
9529
  ...e,
9524
- children: [/* @__PURE__ */ r(Pt, { children: /* @__PURE__ */ r("path", {
9525
- className: It,
9530
+ children: [/* @__PURE__ */ r(It, { children: /* @__PURE__ */ r("path", {
9531
+ className: Et,
9526
9532
  fillRule: "evenodd",
9527
9533
  clipRule: "evenodd",
9528
9534
  d: "M4.89961 14.7968C3.08522 13.5116 1.89961 11.3966 1.89961 9.00039C1.89961 5.07917 5.07839 1.90039 8.99961 1.90039C10.7798 1.90039 12.4069 2.55553 13.6531 3.63785C14.3179 3.17306 15.1269 2.90039 15.9996 2.90039L22.9996 2.90039C25.264 2.90039 27.0996 4.73602 27.0996 7.00039L27.0996 9.7243C27.5717 9.92414 28.014 10.2165 28.3987 10.6013C29.9999 12.2024 29.9999 14.7984 28.3987 16.3995L27.9182 16.8801C29.2628 18.172 30.0996 19.9885 30.0996 22.0004C30.0996 25.9216 26.9208 29.1004 22.9996 29.1004C21.2195 29.1004 19.5923 28.4453 18.3461 27.3629C17.6813 27.8277 16.8723 28.1004 15.9996 28.1004L8.99961 28.1004C6.73524 28.1004 4.89961 26.2648 4.89961 24.0004L4.89961 14.7968Z"
@@ -9535,8 +9541,8 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9535
9541
  }), Qg = (e) => /* @__PURE__ */ m(k, {
9536
9542
  viewBox: "0 0 32 33",
9537
9543
  ...e,
9538
- children: [/* @__PURE__ */ r(Pt, { children: /* @__PURE__ */ r("path", {
9539
- className: It,
9544
+ children: [/* @__PURE__ */ r(It, { children: /* @__PURE__ */ r("path", {
9545
+ className: Et,
9540
9546
  d: "M20.7271 2C21.4372 2 21.7114 2.00463 22.0841 2.03504C22.8228 2.0954 23.4839 2.25122 24.1592 2.59527C25.1865 3.1188 26.0219 3.9541 26.5458 4.98208C26.8896 5.65706 27.0454 6.31812 27.1057 7.05672C27.1301 7.35469 27.1379 7.58979 27.14 8.03558L27.1408 9.10155C27.1408 11.2114 25.4304 12.922 23.3205 12.922C21.4083 12.922 19.8243 11.5172 19.5441 9.68336L19.538 9.64H18.39V21.687L20.0392 21.6877C22.149 21.6877 23.8595 23.398 23.8595 25.508C23.8595 27.6178 22.149 29.3283 20.0392 29.3283H9.10159C6.99169 29.3283 5.28127 27.6178 5.28127 25.508C5.28127 23.398 6.99172 21.6877 9.10159 21.6877L10.75 21.687V9.64H9.601L9.59661 9.68334C9.32609 11.4539 7.84018 12.8246 6.01692 12.917L5.82032 12.922C3.71035 12.922 2 11.2114 2 9.10155V8.41371C2 7.70349 2.00463 7.42929 2.03504 7.05674C2.09538 6.31803 2.25122 5.65681 2.59521 4.98173C3.11877 3.95419 3.95418 3.11876 4.98174 2.5952C5.65683 2.25122 6.31798 2.09539 7.057 2.03501C7.42935 2.00463 7.70354 2 8.41371 2H20.7271Z"
9541
9547
  }) }), /* @__PURE__ */ r("path", {
9542
9548
  fill: "currentColor",
@@ -9706,7 +9712,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9706
9712
  preview: t,
9707
9713
  isChecked: s !== void 0,
9708
9714
  onToggle: h,
9709
- children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(A, {
9715
+ children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(T, {
9710
9716
  label: o("editor.annotationsPanel.goalSection.labelControl"),
9711
9717
  children: /* @__PURE__ */ r(l, {
9712
9718
  value: s?.params.label ?? "",
@@ -9715,7 +9721,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9715
9721
  onCommit: n.commands.commit,
9716
9722
  ariaLabel: o("editor.annotationsPanel.goalSection.labelAriaLabel")
9717
9723
  })
9718
- }), /* @__PURE__ */ r(A, {
9724
+ }), /* @__PURE__ */ r(T, {
9719
9725
  label: o("editor.annotationsPanel.goalSection.valueControl"),
9720
9726
  children: /* @__PURE__ */ r(i, {
9721
9727
  value: d,
@@ -9738,64 +9744,64 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
9738
9744
  if (!i) return null;
9739
9745
  const c = e === void 0 ? i.spec.layers[0] : ve(i.spec.layers, e);
9740
9746
  if (!c) return null;
9741
- const { showDataLabels: u, format: d, showStackTotals: h, showCategoryLabels: p } = c.dataLabels, g = i.coordSystem.type, v = g === "polar", f = c.geom === "bar", S = f && !v && c.position === "stack", w = f && (!v || u), y = ve(i.layers, c.id), T = y !== void 0 && o.canFormatDataLabelsAsPercentages(y, g);
9747
+ const { showDataLabels: u, format: d, showStackTotals: h, showCategoryLabels: p } = c.dataLabels, g = i.coordSystem.type, v = g === "polar", f = c.geom === "bar", C = f && !v && c.position === "stack", w = f && (!v || u), y = ve(i.layers, c.id), A = y !== void 0 && o.canFormatDataLabelsAsPercentages(y, g);
9742
9748
  if (!o.canPlaceDataLabels(c.geom, g)) return null;
9743
- const x = (_) => {
9744
- const M = new Zl({
9749
+ const S = (_) => {
9750
+ const N = new Zl({
9745
9751
  layerId: c.id,
9746
9752
  showDataLabels: _
9747
9753
  });
9748
- o.commands.dispatch(M);
9749
- }, N = (_) => {
9750
- const M = new Cl({
9754
+ o.commands.dispatch(N);
9755
+ }, O = (_) => {
9756
+ const N = new Cl({
9751
9757
  layerId: c.id,
9752
9758
  format: _ ? "percentage" : "absolute"
9753
9759
  });
9754
- o.commands.dispatch(M);
9760
+ o.commands.dispatch(N);
9755
9761
  }, L = (_) => {
9756
- const M = new Ql({
9762
+ const N = new Ql({
9757
9763
  layerId: c.id,
9758
9764
  showStackTotals: _
9759
9765
  });
9760
- o.commands.dispatch(M);
9761
- }, O = (_) => {
9762
- const M = new Xl({
9766
+ o.commands.dispatch(N);
9767
+ }, M = (_) => {
9768
+ const N = new Xl({
9763
9769
  layerId: c.id,
9764
9770
  showCategoryLabels: _
9765
9771
  });
9766
- o.commands.dispatch(M);
9772
+ o.commands.dispatch(N);
9767
9773
  };
9768
9774
  return /* @__PURE__ */ r(K, {
9769
9775
  title: t ?? l("editor.graphPanel.graphOptionsSection.title"),
9770
9776
  layout: n,
9771
9777
  preview: a,
9772
9778
  children: /* @__PURE__ */ m(J, { children: [
9773
- /* @__PURE__ */ r(A, {
9779
+ /* @__PURE__ */ r(T, {
9774
9780
  label: l("editor.graphPanel.graphOptions.dataLabels"),
9775
9781
  children: /* @__PURE__ */ r(s, {
9776
9782
  isChecked: u,
9777
- onChange: x
9783
+ onChange: S
9778
9784
  })
9779
9785
  }),
9780
- u && T && /* @__PURE__ */ r(A, {
9786
+ u && A && /* @__PURE__ */ r(T, {
9781
9787
  label: l("editor.graphPanel.graphOptions.showPercentages"),
9782
9788
  children: /* @__PURE__ */ r(s, {
9783
9789
  isChecked: d === "percentage",
9784
- onChange: N
9790
+ onChange: O
9785
9791
  })
9786
9792
  }),
9787
- S && /* @__PURE__ */ r(A, {
9793
+ C && /* @__PURE__ */ r(T, {
9788
9794
  label: l("editor.graphPanel.graphOptions.stackTotals"),
9789
9795
  children: /* @__PURE__ */ r(s, {
9790
9796
  isChecked: h,
9791
9797
  onChange: L
9792
9798
  })
9793
9799
  }),
9794
- w && /* @__PURE__ */ r(A, {
9800
+ w && /* @__PURE__ */ r(T, {
9795
9801
  label: l("editor.graphPanel.graphOptions.categoryLabels"),
9796
9802
  children: /* @__PURE__ */ r(s, {
9797
9803
  isChecked: p,
9798
- onChange: O
9804
+ onChange: M
9799
9805
  })
9800
9806
  })
9801
9807
  ] })
@@ -10384,7 +10390,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10384
10390
  })
10385
10391
  ]
10386
10392
  })
10387
- }), I0 = 0.55, E0 = 0.15, Qt = [
10393
+ }), I0 = 0.55, E0 = 0.15, en = [
10388
10394
  {
10389
10395
  name: "column",
10390
10396
  icon: g0,
@@ -10560,21 +10566,21 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10560
10566
  position: "identity"
10561
10567
  }
10562
10568
  }
10563
- ], O0 = 0.05, M0 = (e) => e === null ? null : Qt.find((t) => R0(t.summary, e)) ?? null, N0 = (e, t) => {
10569
+ ], O0 = 0.05, M0 = (e) => e === null ? null : en.find((t) => R0(t.summary, e)) ?? null, N0 = (e, t) => {
10564
10570
  const { summary: n } = e;
10565
10571
  return t === null || Ae(n) ? n : n.position === "dodge" && $o(t) ? {
10566
10572
  ...n,
10567
10573
  position: "identity"
10568
- } : n.coordType !== "polar" || !dt(n.innerRadius) || t.coordType !== "polar" || !dt(t.innerRadius) ? n : {
10574
+ } : n.coordType !== "polar" || !ut(n.innerRadius) || t.coordType !== "polar" || !ut(t.innerRadius) ? n : {
10569
10575
  ...n,
10570
10576
  innerRadius: t.innerRadius
10571
10577
  };
10572
10578
  }, $o = (e) => !Ae(e) && e.geom === "bar" && e.position === "identity", R0 = (e, t) => {
10573
10579
  if (Ae(e) || Ae(t)) return Ae(e) && Ae(t);
10574
10580
  const n = e.position === t.position || e.position === "dodge" && $o(t);
10575
- return e.coordType !== t.coordType || e.geom !== t.geom || !n ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && dt(e.innerRadius) === dt(t.innerRadius);
10576
- }, dt = (e) => e >= O0, D0 = 3, mv = ({ title: e, layout: t = "collapsible", preview: n }) => {
10577
- const a = G(), o = W(a), i = E(), { RadioGrid: l } = V(), s = I(() => Qt.map(({ name: h, icon: p }) => ({
10581
+ return e.coordType !== t.coordType || e.geom !== t.geom || !n ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && ut(e.innerRadius) === ut(t.innerRadius);
10582
+ }, ut = (e) => e >= O0, D0 = 3, mv = ({ title: e, layout: t = "collapsible", preview: n }) => {
10583
+ const a = G(), o = W(a), i = E(), { RadioGrid: l } = V(), s = I(() => en.map(({ name: h, icon: p }) => ({
10578
10584
  value: h,
10579
10585
  label: i(`editor.graphTypes.${h}`),
10580
10586
  icon: /* @__PURE__ */ r(p, { size: "md" }),
@@ -10582,7 +10588,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10582
10588
  })), [i, o]);
10583
10589
  if (!o) return null;
10584
10590
  const c = la(o.spec), u = M0(c), d = (h) => {
10585
- const p = Qt.find((g) => g.name === h);
10591
+ const p = en.find((g) => g.name === h);
10586
10592
  p && a.commands.dispatch(new Zr(N0(p, c)));
10587
10593
  };
10588
10594
  return /* @__PURE__ */ r(K, {
@@ -10602,23 +10608,23 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10602
10608
  "dashed",
10603
10609
  "dotted"
10604
10610
  ], _0 = 8, F0 = 0, gv = ({ title: e, layout: t = "collapsible", preview: n }) => {
10605
- const a = G(), o = W(a), i = E(), { Slider: l, Switch: s, ToggleGroup: c } = V(), u = kt(o);
10611
+ const a = G(), o = W(a), i = E(), { Slider: l, Switch: s, ToggleGroup: c } = V(), u = Lt(o);
10606
10612
  if (!o || !u) return null;
10607
10613
  const d = o.guides.axes.filter(z0);
10608
10614
  if (d.length === 0) return null;
10609
10615
  const h = o.coordSystem.type !== "polar", p = d.some((y) => y.gridVisible), g = u.gridLine.y().resolve(), v = Pr.map((y) => ({
10610
10616
  value: y,
10611
10617
  label: i(`editor.graphPanel.gridSection.lineStyles.${y}`)
10612
- })), f = (y) => (T) => {
10618
+ })), f = (y) => (A) => {
10613
10619
  a.commands.dispatch(new Al({
10614
10620
  axis: y,
10615
- isVisible: T
10621
+ isVisible: A
10616
10622
  }));
10617
- }, S = (y) => {
10618
- const T = Pr.find((x) => x === y);
10619
- T && a.commands.dispatch(new wl({
10623
+ }, C = (y) => {
10624
+ const A = Pr.find((S) => S === y);
10625
+ A && a.commands.dispatch(new wl({
10620
10626
  axis: "both",
10621
- lineStyle: T
10627
+ lineStyle: A
10622
10628
  }));
10623
10629
  }, w = (y) => {
10624
10630
  a.commands.dispatch(new Tl({
@@ -10630,27 +10636,27 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10630
10636
  title: e ?? i("editor.graphPanel.gridSection.title"),
10631
10637
  layout: t,
10632
10638
  preview: n,
10633
- children: /* @__PURE__ */ m(J, { children: [d.map((y) => /* @__PURE__ */ r(A, {
10639
+ children: /* @__PURE__ */ m(J, { children: [d.map((y) => /* @__PURE__ */ r(T, {
10634
10640
  label: i(B0(y)),
10635
10641
  children: /* @__PURE__ */ r(s, {
10636
10642
  isChecked: y.gridVisible,
10637
10643
  onChange: f(y.scaleAestheticKey)
10638
10644
  })
10639
- }, y.scaleAestheticKey)), h && p && /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(A, {
10645
+ }, y.scaleAestheticKey)), h && p && /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(T, {
10640
10646
  label: i("editor.graphPanel.gridSection.gridStyle"),
10641
10647
  children: /* @__PURE__ */ r(c, {
10642
- value: Ht(g.dashArray),
10648
+ value: Gt(g.dashArray),
10643
10649
  options: v,
10644
- onChange: S
10650
+ onChange: C
10645
10651
  })
10646
- }), /* @__PURE__ */ r(A, {
10652
+ }), /* @__PURE__ */ r(T, {
10647
10653
  label: i("editor.graphPanel.gridSection.gridThickness"),
10648
10654
  children: /* @__PURE__ */ r(l, {
10649
10655
  value: g.strokeWidth,
10650
10656
  min: F0,
10651
10657
  max: _0,
10652
10658
  step: 0.5,
10653
- formatValue: Lt,
10659
+ formatValue: Pt,
10654
10660
  onChange: w,
10655
10661
  onCommit: a.commands.commit
10656
10662
  })
@@ -10668,49 +10674,49 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10668
10674
  ], vv = ({ title: e, layout: t = "collapsible", preview: n }) => {
10669
10675
  const a = G(), o = W(a), i = E(), { Switch: l, ToggleGroup: s } = V();
10670
10676
  if (!o) return null;
10671
- const c = o.config.headline, u = c.show !== "none", d = o.coordSystem, h = d.type === "polar", p = d.type === "polar" && d.innerRadius > 0, g = o.layers.some((C) => C.summary.grandTotal !== void 0);
10677
+ const c = o.config.headline, u = c.show !== "none", d = o.coordSystem, h = d.type === "polar", p = d.type === "polar" && d.innerRadius > 0, g = o.layers.some((x) => x.summary.grandTotal !== void 0);
10672
10678
  if (h && !g) return null;
10673
- const v = h ? G0 : Uo, f = o.guides.headline, S = f?.kind === "perGroup" && f.items.some((C) => C.comparison !== null), w = v.map((C) => ({
10674
- value: C,
10675
- label: i(`editor.graphPanel.headlineNumberSection.metrics.${C}`)
10676
- })), y = Ir.map((C) => ({
10677
- value: C,
10678
- label: i(`editor.graphPanel.headlineNumberSection.comparison.${C}`)
10679
- })), T = Er.map((C) => ({
10680
- value: C,
10681
- label: i(C === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${C}`)
10682
- })), x = [{
10679
+ const v = h ? G0 : Uo, f = o.guides.headline, C = f?.kind === "perGroup" && f.items.some((x) => x.comparison !== null), w = v.map((x) => ({
10680
+ value: x,
10681
+ label: i(`editor.graphPanel.headlineNumberSection.metrics.${x}`)
10682
+ })), y = Ir.map((x) => ({
10683
+ value: x,
10684
+ label: i(`editor.graphPanel.headlineNumberSection.comparison.${x}`)
10685
+ })), A = Er.map((x) => ({
10686
+ value: x,
10687
+ label: i(x === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${x}`)
10688
+ })), S = [{
10683
10689
  value: "above",
10684
10690
  label: i("editor.graphPanel.headlineNumberSection.position.above")
10685
10691
  }, {
10686
10692
  value: "center",
10687
10693
  label: i("editor.graphPanel.headlineNumberSection.position.center")
10688
- }], N = (C) => {
10689
- a.commands.dispatch(new Dn({ show: C ? H0 : "none" }));
10690
- }, L = (C) => {
10691
- const b = v.find((U) => U === C);
10694
+ }], O = (x) => {
10695
+ a.commands.dispatch(new Dn({ show: x ? H0 : "none" }));
10696
+ }, L = (x) => {
10697
+ const b = v.find((U) => U === x);
10692
10698
  b && a.commands.dispatch(new Dn({ show: b }));
10693
- }, O = (C) => {
10694
- const b = Ir.find((U) => U === C);
10699
+ }, M = (x) => {
10700
+ const b = Ir.find((U) => U === x);
10695
10701
  b && a.commands.dispatch(new kl({ compareWith: b }));
10696
- }, _ = (C) => {
10697
- const b = Er.find((U) => U === C);
10702
+ }, _ = (x) => {
10703
+ const b = Er.find((U) => U === x);
10698
10704
  b && a.commands.dispatch(new Pl({ size: b }));
10699
- }, M = (C) => {
10700
- a.commands.dispatch(new Ll({ position: C === "center" ? "center" : "above" }));
10705
+ }, N = (x) => {
10706
+ a.commands.dispatch(new Ll({ position: x === "center" ? "center" : "above" }));
10701
10707
  };
10702
10708
  return /* @__PURE__ */ r(K, {
10703
10709
  title: e ?? i("editor.graphPanel.headlineNumberSection.title"),
10704
10710
  layout: t,
10705
10711
  preview: n ?? V0(i, c.show),
10706
- children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(A, {
10712
+ children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(T, {
10707
10713
  label: i("editor.graphPanel.headlineNumberSection.toggle"),
10708
10714
  children: /* @__PURE__ */ r(l, {
10709
10715
  isChecked: u,
10710
- onChange: N
10716
+ onChange: O
10711
10717
  })
10712
10718
  }), u && /* @__PURE__ */ m(Y, { children: [
10713
- w.length > 1 && /* @__PURE__ */ r(A, {
10719
+ w.length > 1 && /* @__PURE__ */ r(T, {
10714
10720
  label: i("editor.graphPanel.headlineNumberSection.metricLabel"),
10715
10721
  layout: "stack",
10716
10722
  children: /* @__PURE__ */ r(s, {
@@ -10719,29 +10725,29 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10719
10725
  onChange: L
10720
10726
  })
10721
10727
  }),
10722
- S && /* @__PURE__ */ r(A, {
10728
+ C && /* @__PURE__ */ r(T, {
10723
10729
  label: i("editor.graphPanel.headlineNumberSection.compareWithLabel"),
10724
10730
  layout: "stack",
10725
10731
  children: /* @__PURE__ */ r(s, {
10726
10732
  value: Ks(c.compareWith),
10727
10733
  options: y,
10728
- onChange: O
10734
+ onChange: M
10729
10735
  })
10730
10736
  }),
10731
- /* @__PURE__ */ r(A, {
10737
+ /* @__PURE__ */ r(T, {
10732
10738
  label: i("editor.graphPanel.headlineNumberSize.sizeLabel"),
10733
10739
  children: /* @__PURE__ */ r(s, {
10734
10740
  value: c.size,
10735
- options: T,
10741
+ options: A,
10736
10742
  onChange: _
10737
10743
  })
10738
10744
  }),
10739
- p && /* @__PURE__ */ r(A, {
10745
+ p && /* @__PURE__ */ r(T, {
10740
10746
  label: i("editor.axesPanel.controls.position"),
10741
10747
  children: /* @__PURE__ */ r(s, {
10742
10748
  value: c.position,
10743
- options: x,
10744
- onChange: M
10749
+ options: S,
10750
+ onChange: N
10745
10751
  })
10746
10752
  })
10747
10753
  ] })] })
@@ -10749,7 +10755,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10749
10755
  }, V0 = (e, t) => {
10750
10756
  const n = Uo.find((a) => a === t);
10751
10757
  return n && e(`editor.graphPanel.headlineNumberSection.metrics.${n}`);
10752
- }, Ft = [
10758
+ }, zt = [
10753
10759
  "top",
10754
10760
  "bottom",
10755
10761
  "left",
@@ -10767,61 +10773,61 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10767
10773
  ], fv = ({ positions: e, title: t, layout: n = "collapsible", preview: a }) => {
10768
10774
  const o = G(), i = W(o), l = E(), { ToggleGroup: s } = V();
10769
10775
  if (!i) return null;
10770
- const c = i.config.legend.position, u = e ?? Ft, d = i.guides.legends.drawn[0], h = os({
10776
+ const c = i.config.legend.position, u = e ?? zt, d = i.guides.legends.drawn[0], h = os({
10771
10777
  legendPosition: i.guides.legends.position,
10772
10778
  coordSystem: i.coordSystem,
10773
10779
  layers: i.layers
10774
10780
  }), p = i.guides.headline?.kind === "perGroup", g = i.guides.colorGroups.length > 0;
10775
10781
  if (c === "auto" && d === void 0 && !h && (p || !g)) return null;
10776
- const v = d?.position ?? "none", f = c === "auto" ? v : c, S = Ft.filter((M) => M === f || u.includes(M)).map((M) => ({
10777
- value: M,
10778
- label: l(`editor.graphPanel.legendSection.${M}`)
10779
- })), w = (M) => {
10780
- const C = Ft.find((b) => b === M);
10781
- C && o.commands.dispatch(new Nl({ position: C }));
10782
- }, y = (M) => {
10783
- const C = Or.find((b) => b === M);
10784
- C && o.commands.dispatch(new Ol({ align: C }));
10785
- }, T = (M) => {
10786
- const C = Mr.find((b) => b === M);
10787
- C && o.commands.dispatch(new Ml({ display: C }));
10788
- }, x = Or.map((M) => ({
10789
- value: M,
10790
- label: l(`editor.graphPanel.legendSection.align.${M}`)
10791
- })), N = Mr.map((M) => ({
10792
- value: M,
10793
- label: l(`editor.graphPanel.legendSection.display.${M}`)
10794
- })), L = t ?? l("editor.graphPanel.legendSection.title"), O = S.find((M) => M.value === f)?.label, _ = d !== void 0;
10782
+ const v = d?.position ?? "none", f = c === "auto" ? v : c, C = zt.filter((N) => N === f || u.includes(N)).map((N) => ({
10783
+ value: N,
10784
+ label: l(`editor.graphPanel.legendSection.${N}`)
10785
+ })), w = (N) => {
10786
+ const x = zt.find((b) => b === N);
10787
+ x && o.commands.dispatch(new Nl({ position: x }));
10788
+ }, y = (N) => {
10789
+ const x = Or.find((b) => b === N);
10790
+ x && o.commands.dispatch(new Ol({ align: x }));
10791
+ }, A = (N) => {
10792
+ const x = Mr.find((b) => b === N);
10793
+ x && o.commands.dispatch(new Ml({ display: x }));
10794
+ }, S = Or.map((N) => ({
10795
+ value: N,
10796
+ label: l(`editor.graphPanel.legendSection.align.${N}`)
10797
+ })), O = Mr.map((N) => ({
10798
+ value: N,
10799
+ label: l(`editor.graphPanel.legendSection.display.${N}`)
10800
+ })), L = t ?? l("editor.graphPanel.legendSection.title"), M = C.find((N) => N.value === f)?.label, _ = d !== void 0;
10795
10801
  return /* @__PURE__ */ r(K, {
10796
10802
  title: L,
10797
10803
  layout: n,
10798
- preview: a ?? O,
10804
+ preview: a ?? M,
10799
10805
  children: /* @__PURE__ */ m(J, { children: [
10800
- /* @__PURE__ */ r(A, {
10806
+ /* @__PURE__ */ r(T, {
10801
10807
  label: l("editor.axesPanel.controls.position"),
10802
10808
  layout: "stack",
10803
10809
  children: /* @__PURE__ */ r(s, {
10804
10810
  value: f,
10805
- options: S,
10811
+ options: C,
10806
10812
  onChange: w
10807
10813
  })
10808
10814
  }),
10809
- _ && /* @__PURE__ */ r(A, {
10815
+ _ && /* @__PURE__ */ r(T, {
10810
10816
  label: l("editor.graphPanel.legendSection.alignLabel"),
10811
10817
  layout: "stack",
10812
10818
  children: /* @__PURE__ */ r(s, {
10813
10819
  value: i.config.legend.align,
10814
- options: x,
10820
+ options: S,
10815
10821
  onChange: y
10816
10822
  })
10817
10823
  }),
10818
- h && /* @__PURE__ */ r(A, {
10824
+ h && /* @__PURE__ */ r(T, {
10819
10825
  label: l("editor.graphPanel.legendSection.displayLabel"),
10820
10826
  layout: "stack",
10821
10827
  children: /* @__PURE__ */ r(s, {
10822
10828
  value: i.config.legend.display,
10823
- options: N,
10824
- onChange: T
10829
+ options: O,
10830
+ onChange: A
10825
10831
  })
10826
10832
  })
10827
10833
  ] })
@@ -10841,7 +10847,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10841
10847
  min: $0,
10842
10848
  max: U0,
10843
10849
  step: W0,
10844
- formatValue: Lt,
10850
+ formatValue: Pt,
10845
10851
  onChange: i,
10846
10852
  onCommit: t.commands.commit
10847
10853
  });
@@ -10852,40 +10858,40 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10852
10858
  ], bv = ({ title: e, layout: t = "collapsible", preview: n }) => {
10853
10859
  const a = G(), o = W(a), i = E(), { Select: l, Slider: s, Switch: c, ToggleGroup: u } = V(), d = o?.spec.layers ?? [], h = oa(d, "line", "area"), p = Pn(o, h?.id ?? null, "line");
10854
10860
  if (!o || !h) return null;
10855
- const g = o.coordSystem.type === "polar", v = J0(i, h), f = Y0(h, d), S = Nr(o.spec, h.geom, "strokeWidth", h.id), w = typeof S == "number", y = h.geom === "line" ? h : void 0, T = [{
10861
+ const g = o.coordSystem.type === "polar", v = J0(i, h), f = Y0(h, d), C = Nr(o.spec, h.geom, "strokeWidth", h.id), w = typeof C == "number", y = h.geom === "line" ? h : void 0, A = [{
10856
10862
  value: "auto",
10857
10863
  label: i("editor.graphPanel.numberFormat.options.auto")
10858
10864
  }, {
10859
10865
  value: "custom",
10860
10866
  label: i("editor.graphPanel.numberFormat.options.custom")
10861
- }], x = (C) => {
10867
+ }], S = (x) => {
10862
10868
  a.commands.dispatch(new Jl({
10863
10869
  layerId: h.id,
10864
- showPoints: C
10870
+ showPoints: x
10865
10871
  }));
10866
- }, N = (C) => {
10872
+ }, O = (x) => {
10867
10873
  y && a.commands.dispatch(new Yl({
10868
10874
  layerId: y.id,
10869
- showFill: C
10875
+ showFill: x
10870
10876
  }));
10871
- }, L = (C) => {
10877
+ }, L = (x) => {
10872
10878
  a.commands.dispatch(new Rl({
10873
10879
  layerId: h.id,
10874
- curve: C ? "smooth" : "linear"
10880
+ curve: x ? "smooth" : "linear"
10875
10881
  }));
10876
- }, O = (C) => {
10882
+ }, M = (x) => {
10877
10883
  const b = p?.get("strokeWidth") ?? il;
10878
10884
  a.commands.dispatch(new _n({
10879
10885
  layerId: h.id,
10880
- lineWidth: C === "custom" ? b : null
10886
+ lineWidth: x === "custom" ? b : null
10881
10887
  }));
10882
- }, _ = (C) => {
10888
+ }, _ = (x) => {
10883
10889
  a.commands.dispatch(new _n({
10884
10890
  layerId: h.id,
10885
- lineWidth: C
10891
+ lineWidth: x
10886
10892
  }), { transient: !0 });
10887
- }, M = (C) => {
10888
- const b = j0(C);
10893
+ }, N = (x) => {
10894
+ const b = j0(x);
10889
10895
  b && a.commands.dispatch(new Dl({
10890
10896
  layerId: h.id,
10891
10897
  missingValues: b
@@ -10896,62 +10902,62 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10896
10902
  layout: t,
10897
10903
  preview: n,
10898
10904
  children: /* @__PURE__ */ m(J, { children: [
10899
- /* @__PURE__ */ r(A, {
10905
+ /* @__PURE__ */ r(T, {
10900
10906
  label: i("editor.graphPanel.graphOptions.showPoints"),
10901
10907
  children: /* @__PURE__ */ r(c, {
10902
10908
  isChecked: f !== void 0,
10903
- onChange: x
10909
+ onChange: S
10904
10910
  })
10905
10911
  }),
10906
- f && /* @__PURE__ */ r(A, {
10912
+ f && /* @__PURE__ */ r(T, {
10907
10913
  label: i("editor.graphPanel.pointSize.label"),
10908
10914
  children: /* @__PURE__ */ r(Wo, { layerId: f.id })
10909
10915
  }),
10910
- y && !g && /* @__PURE__ */ r(A, {
10916
+ y && !g && /* @__PURE__ */ r(T, {
10911
10917
  label: i("editor.graphPanel.graphOptions.lineFill"),
10912
10918
  children: /* @__PURE__ */ r(c, {
10913
10919
  isChecked: Nr(o.spec, "line", "fillAlpha", y.id) !== void 0,
10914
- onChange: N
10920
+ onChange: O
10915
10921
  })
10916
10922
  }),
10917
- !g && /* @__PURE__ */ r(A, {
10923
+ !g && /* @__PURE__ */ r(T, {
10918
10924
  label: i("editor.graphPanel.graphOptions.smoothLines"),
10919
10925
  children: /* @__PURE__ */ r(c, {
10920
10926
  isChecked: h.params.curve === "smooth",
10921
10927
  onChange: L
10922
10928
  })
10923
10929
  }),
10924
- /* @__PURE__ */ r(A, {
10930
+ /* @__PURE__ */ r(T, {
10925
10931
  label: i("editor.graphPanel.lineThickness.label"),
10926
10932
  children: /* @__PURE__ */ r(u, {
10927
10933
  value: w ? "custom" : "auto",
10928
- options: T,
10929
- onChange: O
10934
+ options: A,
10935
+ onChange: M
10930
10936
  })
10931
10937
  }),
10932
- w && /* @__PURE__ */ r(A, {
10938
+ w && /* @__PURE__ */ r(T, {
10933
10939
  label: i("editor.graphPanel.numberFormat.valueLabel"),
10934
10940
  children: /* @__PURE__ */ r(s, {
10935
- value: S,
10941
+ value: C,
10936
10942
  min: K0,
10937
10943
  max: q0,
10938
10944
  step: X0,
10939
- formatValue: Lt,
10945
+ formatValue: Pt,
10940
10946
  onChange: _,
10941
10947
  onCommit: a.commands.commit
10942
10948
  })
10943
10949
  }),
10944
- !g && v.length > 1 && /* @__PURE__ */ r(A, {
10950
+ !g && v.length > 1 && /* @__PURE__ */ r(T, {
10945
10951
  label: i("editor.fineTunePanel.detailSection.missingValues"),
10946
10952
  children: /* @__PURE__ */ r(l, {
10947
10953
  value: h.params.missingValues,
10948
10954
  options: v,
10949
- onChange: M
10955
+ onChange: N
10950
10956
  })
10951
10957
  })
10952
10958
  ] })
10953
10959
  });
10954
- }, j0 = (e) => Z0.find((t) => t === e), Nr = (e, t, n, a) => bs(e.styles.overrides, rs(t, a))?.[n], Y0 = (e, t) => zt(t, "point").find((n) => dn(n, [e])), J0 = (e, t) => {
10960
+ }, j0 = (e) => Z0.find((t) => t === e), Nr = (e, t, n, a) => bs(e.styles.overrides, rs(t, a))?.[n], Y0 = (e, t) => Bt(t, "point").find((n) => dn(n, [e])), J0 = (e, t) => {
10955
10961
  const n = [{
10956
10962
  value: "gap",
10957
10963
  label: e("editor.graphPanel.treatEmptyValues.leaveGap.label")
@@ -10963,7 +10969,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10963
10969
  value: "connect",
10964
10970
  label: e("editor.graphPanel.treatEmptyValues.connectGaps.label")
10965
10971
  }), t.geom === "area" ? n.filter((a) => a.value !== "gap") : n;
10966
- }, en = "\0none", Q0 = [
10972
+ }, tn = "\0none", Q0 = [
10967
10973
  "x",
10968
10974
  "y",
10969
10975
  "color",
@@ -10981,12 +10987,12 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10981
10987
  return {
10982
10988
  aesthetic: u,
10983
10989
  label: o(e5[u]),
10984
- value: p ?? (h ? null : en),
10990
+ value: p ?? (h ? null : tn),
10985
10991
  options: t5(d, p, h ? null : l),
10986
10992
  chooseColumn: (g) => {
10987
10993
  n.commands.dispatch(new _l({
10988
10994
  aesthetic: u,
10989
- variable: g === en ? null : g
10995
+ variable: g === tn ? null : g
10990
10996
  }));
10991
10997
  }
10992
10998
  };
@@ -10999,7 +11005,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
10999
11005
  return a ? /* @__PURE__ */ r(K, {
11000
11006
  title: e ?? o("editor.graphPanel.mappingSection.title"),
11001
11007
  layout: t,
11002
- children: /* @__PURE__ */ r(J, { children: c.map(({ aesthetic: u, label: d, value: h, options: p, chooseColumn: g }) => /* @__PURE__ */ r(A, {
11008
+ children: /* @__PURE__ */ r(J, { children: c.map(({ aesthetic: u, label: d, value: h, options: p, chooseColumn: g }) => /* @__PURE__ */ r(T, {
11003
11009
  label: d,
11004
11010
  children: /* @__PURE__ */ r(i, {
11005
11011
  value: h,
@@ -11012,13 +11018,13 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11012
11018
  }, t5 = (e, t, n) => {
11013
11019
  const a = t !== null && !e.includes(t) ? [t, ...e] : e;
11014
11020
  return [...n === null ? [] : [{
11015
- value: en,
11021
+ value: tn,
11016
11022
  label: n
11017
11023
  }], ...a.map((o) => ({
11018
11024
  value: o,
11019
11025
  label: o
11020
11026
  }))];
11021
- }, n5 = "k", r5 = 2, a5 = 0, o5 = 5, tn = [
11027
+ }, n5 = "k", r5 = 2, a5 = 0, o5 = 5, nn = [
11022
11028
  {
11023
11029
  value: "k",
11024
11030
  labelKey: "thousands"
@@ -11034,31 +11040,31 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11034
11040
  ], i5 = ["auto", "none"], Sv = ({ title: e, layout: t = "collapsible", preview: n }) => {
11035
11041
  const a = G(), o = W(a), i = E(), { NumberField: l, ToggleGroup: s } = V();
11036
11042
  if (!o) return null;
11037
- const { abbreviation: c, decimals: u } = o.config.numberFormat, d = l5(c) !== void 0, h = u !== "auto", p = (T) => T.map((x) => ({
11038
- value: x,
11039
- label: i(`editor.graphPanel.numberFormat.options.${x}`)
11040
- })), g = tn.map(({ value: T, labelKey: x }) => ({
11041
- value: T,
11042
- label: i(`common.abbreviations.${x}`)
11043
- })), v = (T) => {
11044
- a.commands.dispatch(new Fl({ abbreviation: T }));
11045
- }, f = (T) => {
11046
- const x = i5.find((N) => N === T);
11047
- v(x ?? n5);
11048
- }, S = (T) => {
11049
- const x = tn.find((N) => N.value === T);
11050
- x && v(x.value);
11051
- }, w = (T) => {
11052
- a.commands.dispatch(new Fn({ decimals: T === "custom" ? r5 : "auto" }));
11053
- }, y = (T) => {
11054
- T !== null && a.commands.dispatch(new Fn({ decimals: T }), { transient: !0 });
11043
+ const { abbreviation: c, decimals: u } = o.config.numberFormat, d = l5(c) !== void 0, h = u !== "auto", p = (A) => A.map((S) => ({
11044
+ value: S,
11045
+ label: i(`editor.graphPanel.numberFormat.options.${S}`)
11046
+ })), g = nn.map(({ value: A, labelKey: S }) => ({
11047
+ value: A,
11048
+ label: i(`common.abbreviations.${S}`)
11049
+ })), v = (A) => {
11050
+ a.commands.dispatch(new Fl({ abbreviation: A }));
11051
+ }, f = (A) => {
11052
+ const S = i5.find((O) => O === A);
11053
+ v(S ?? n5);
11054
+ }, C = (A) => {
11055
+ const S = nn.find((O) => O.value === A);
11056
+ S && v(S.value);
11057
+ }, w = (A) => {
11058
+ a.commands.dispatch(new Fn({ decimals: A === "custom" ? r5 : "auto" }));
11059
+ }, y = (A) => {
11060
+ A !== null && a.commands.dispatch(new Fn({ decimals: A }), { transient: !0 });
11055
11061
  };
11056
11062
  return /* @__PURE__ */ r(K, {
11057
11063
  title: e ?? i("editor.graphPanel.numberFormatSection.title"),
11058
11064
  layout: t,
11059
11065
  preview: n,
11060
11066
  children: /* @__PURE__ */ m(J, { children: [
11061
- /* @__PURE__ */ r(A, {
11067
+ /* @__PURE__ */ r(T, {
11062
11068
  label: i("editor.graphPanel.numberFormat.abbreviationLabel"),
11063
11069
  children: /* @__PURE__ */ r(s, {
11064
11070
  value: d ? "custom" : c,
@@ -11070,15 +11076,15 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11070
11076
  onChange: f
11071
11077
  })
11072
11078
  }),
11073
- d && /* @__PURE__ */ r(A, {
11079
+ d && /* @__PURE__ */ r(T, {
11074
11080
  label: i("editor.graphPanel.numberFormat.valueLabel"),
11075
11081
  children: /* @__PURE__ */ r(s, {
11076
11082
  value: c,
11077
11083
  options: g,
11078
- onChange: S
11084
+ onChange: C
11079
11085
  })
11080
11086
  }),
11081
- /* @__PURE__ */ r(A, {
11087
+ /* @__PURE__ */ r(T, {
11082
11088
  label: i("editor.graphPanel.numberFormat.decimalPlacesLabel"),
11083
11089
  children: /* @__PURE__ */ r(s, {
11084
11090
  value: h ? "custom" : "auto",
@@ -11086,7 +11092,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11086
11092
  onChange: w
11087
11093
  })
11088
11094
  }),
11089
- h && /* @__PURE__ */ r(A, {
11095
+ h && /* @__PURE__ */ r(T, {
11090
11096
  label: i("editor.graphPanel.numberFormat.valueLabel"),
11091
11097
  children: /* @__PURE__ */ r(l, {
11092
11098
  value: u,
@@ -11098,7 +11104,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11098
11104
  })
11099
11105
  ] })
11100
11106
  });
11101
- }, l5 = (e) => tn.find((t) => t.value === e), Cv = ({ title: e, layout: t = "collapsible", preview: n }) => {
11107
+ }, l5 = (e) => nn.find((t) => t.value === e), Cv = ({ title: e, layout: t = "collapsible", preview: n }) => {
11102
11108
  const a = W(G()), o = E();
11103
11109
  if (!a) return null;
11104
11110
  const i = s5(a.spec.layers);
@@ -11106,14 +11112,14 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11106
11112
  title: e ?? o("editor.graphPanel.pointSize.label"),
11107
11113
  layout: t,
11108
11114
  preview: n,
11109
- children: /* @__PURE__ */ r(J, { children: /* @__PURE__ */ r(A, {
11115
+ children: /* @__PURE__ */ r(J, { children: /* @__PURE__ */ r(T, {
11110
11116
  label: o("editor.graphPanel.numberFormat.valueLabel"),
11111
11117
  children: /* @__PURE__ */ r(Wo, { layerId: i.id })
11112
11118
  }) })
11113
11119
  }) : null;
11114
11120
  }, s5 = (e) => {
11115
- const t = zt(e, "line", "area");
11116
- return zt(e, "point").find((n) => !dn(n, t));
11121
+ const t = Bt(e, "line", "area");
11122
+ return Bt(e, "point").find((n) => !dn(n, t));
11117
11123
  }, c5 = 0.9, d5 = 360, u5 = 0.05, h5 = 15, xv = ({ title: e, layout: t = "collapsible", preview: n }) => {
11118
11124
  const a = G(), o = W(a), i = E(), { Slider: l } = V();
11119
11125
  if (!o || o.spec.coords.coordType !== "polar") return null;
@@ -11126,7 +11132,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11126
11132
  title: e ?? i("editor.graphPanel.polarSection.title"),
11127
11133
  layout: t,
11128
11134
  preview: n,
11129
- children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(A, {
11135
+ children: /* @__PURE__ */ m(J, { children: [/* @__PURE__ */ r(T, {
11130
11136
  label: i("editor.graphPanel.polarSection.innerRadius"),
11131
11137
  children: /* @__PURE__ */ r(l, {
11132
11138
  value: s,
@@ -11137,7 +11143,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11137
11143
  onChange: u,
11138
11144
  onCommit: a.commands.commit
11139
11145
  })
11140
- }), /* @__PURE__ */ r(A, {
11146
+ }), /* @__PURE__ */ r(T, {
11141
11147
  label: i("editor.graphPanel.polarSection.startAngle"),
11142
11148
  children: /* @__PURE__ */ r(l, {
11143
11149
  value: c,
@@ -11207,38 +11213,38 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11207
11213
  ], m5 = "linear", wv = ({ title: e, layout: t = "collapsible", preview: n }) => {
11208
11214
  const a = G(), o = W(a), i = E(), { Select: l, Switch: s } = V(), { options: c, findValue: u } = Ja(o);
11209
11215
  if (!o || o.coordSystem.type === "polar") return null;
11210
- const d = Ss(o.spec.layers), h = ms(o.spec.layers), p = d?.stat.type === "smooth" ? d.stat.method : m5, g = g5(h), v = Dr.map((x) => ({
11211
- value: x,
11212
- label: i(`editor.annotationsPanel.trendType.options.${x}`)
11213
- })), f = (x, N = {}) => {
11214
- const L = d ?? h, O = new Wl({
11215
- line: x,
11216
- ...N,
11216
+ const d = Ss(o.spec.layers), h = ms(o.spec.layers), p = d?.stat.type === "smooth" ? d.stat.method : m5, g = g5(h), v = Dr.map((S) => ({
11217
+ value: S,
11218
+ label: i(`editor.annotationsPanel.trendType.options.${S}`)
11219
+ })), f = (S, O = {}) => {
11220
+ const L = d ?? h, M = new Wl({
11221
+ line: S,
11222
+ ...O,
11217
11223
  ...L !== void 0 && { layerId: L.id },
11218
11224
  label: i("editor.annotationsPanel.trendsAndAveragesSection.average")
11219
11225
  });
11220
- a.commands.dispatch(O);
11221
- }, S = (x) => f(x ? "trend" : "none", { method: p }), w = (x) => f(x ? "average" : "none", { group: g ?? u(c[0]?.value ?? "") }), y = (x) => {
11222
- const N = Dr.find((L) => L === x);
11223
- N !== void 0 && f("trend", { method: N });
11224
- }, T = (x) => {
11225
- const N = x === null ? void 0 : u(x);
11226
- N !== void 0 && f("average", { group: N });
11226
+ a.commands.dispatch(M);
11227
+ }, C = (S) => f(S ? "trend" : "none", { method: p }), w = (S) => f(S ? "average" : "none", { group: g ?? u(c[0]?.value ?? "") }), y = (S) => {
11228
+ const O = Dr.find((L) => L === S);
11229
+ O !== void 0 && f("trend", { method: O });
11230
+ }, A = (S) => {
11231
+ const O = S === null ? void 0 : u(S);
11232
+ O !== void 0 && f("average", { group: O });
11227
11233
  };
11228
11234
  return /* @__PURE__ */ r(K, {
11229
11235
  title: e ?? i("editor.annotationsPanel.trendsAndAveragesSection.title"),
11230
11236
  layout: t,
11231
11237
  preview: n ?? /* @__PURE__ */ r(Rr, { size: "lg" }),
11232
11238
  children: /* @__PURE__ */ m(J, { children: [
11233
- /* @__PURE__ */ r(A, {
11239
+ /* @__PURE__ */ r(T, {
11234
11240
  label: i("editor.annotationsPanel.trendsAndAveragesSection.trend"),
11235
11241
  icon: /* @__PURE__ */ r(Rr, { size: "lg" }),
11236
11242
  children: /* @__PURE__ */ r(s, {
11237
11243
  isChecked: d !== void 0,
11238
- onChange: S
11244
+ onChange: C
11239
11245
  })
11240
11246
  }),
11241
- d !== void 0 && /* @__PURE__ */ r(A, {
11247
+ d !== void 0 && /* @__PURE__ */ r(T, {
11242
11248
  label: i("editor.annotationsPanel.trendType.label"),
11243
11249
  children: /* @__PURE__ */ r(l, {
11244
11250
  value: p,
@@ -11247,7 +11253,7 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11247
11253
  placeholder: i("editor.annotationsPanel.trendType.placeholder")
11248
11254
  })
11249
11255
  }),
11250
- /* @__PURE__ */ r(A, {
11256
+ /* @__PURE__ */ r(T, {
11251
11257
  label: i("editor.annotationsPanel.trendsAndAveragesSection.average"),
11252
11258
  icon: /* @__PURE__ */ r(p5, { size: "lg" }),
11253
11259
  children: /* @__PURE__ */ r(s, {
@@ -11255,12 +11261,12 @@ var Ig = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
11255
11261
  onChange: w
11256
11262
  })
11257
11263
  }),
11258
- h !== void 0 && c.length > 0 && /* @__PURE__ */ r(A, {
11264
+ h !== void 0 && c.length > 0 && /* @__PURE__ */ r(T, {
11259
11265
  label: i("editor.annotationsPanel.averageLineSeries.label"),
11260
11266
  children: /* @__PURE__ */ r(l, {
11261
11267
  value: g === void 0 ? null : String(g),
11262
11268
  options: c,
11263
- onChange: T,
11269
+ onChange: A,
11264
11270
  placeholder: i("editor.annotationsPanel.averageLineSeries.placeholder"),
11265
11271
  ariaLabel: i("editor.annotationsPanel.averageLineSeries.ariaLabel")
11266
11272
  })
@@ -11299,7 +11305,7 @@ export {
11299
11305
  Cv as PointSection,
11300
11306
  xv as PolarSection,
11301
11307
  Gm as RadioGrid,
11302
- A as Row,
11308
+ T as Row,
11303
11309
  K as Section,
11304
11310
  jm as Select,
11305
11311
  og as Slider,