@graphysdk/react-renderer 1.8.1-beta.1786707936521 → 1.8.1-beta.1786950787742

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,36 +1,36 @@
1
- import { A as Je, B as Ve, D as W, E as te, F as Kt, J as ze, K as Ut, L as Wt, M as Nn, O as J, P as Zt, Q as ne, R as ge, T as qt, U as Kc, W as I, Z as Fe, _ as $t, b as X, c as Xt, ct as Yt, d as jt, f as En, ft as K, i as Jt, j as Qt, k as Ee, l as er, lt as nr, m as tr, mt as U, n as R, o as rr, p as ar, q as or, r as ir, s as lr, t as sr, u as kn, ut as cr, v as xe, w as dr, x as re, y as L } from "./history-chords-CmDNkDXT.js";
2
- import { p as hr } from "./typography-CiDZDGza.js";
3
- import { ARROW_DEFAULTS as ur, AddAnnotationCommand as Y, AddHighlightCommand as mr, BORDER_RADIUS_TOKENS as Qe, CONSTANT_VARIABLES as pr, DEFAULT_BAR_BORDER_RADIUS as gr, DEFAULT_POINT_SIZE as vr, DEFAULT_STROKE_WIDTH as Cr, DIFFERENCE_ARROW_DEFAULTS as _n, MAX_BAR_WIDTH as fr, MIN_BAR_WIDTH as br, MoveAnnotationCommand as yr, RESTING_HOVER_STATE as Rn, RemoveAnnotationCommand as Be, RemoveHighlightCommand as Sr, SHAPE_DEFAULTS as wr, SetAppearanceTextScaleCommand as xr, SetAxisLabelCommand as Tr, SetAxisPositionCommand as Lr, SetAxisTickModeCommand as Pr, SetAxisTicksVisibilityCommand as Ir, SetAxisVisibilityCommand as Ar, SetBarBorderRadiusCommand as Or, SetBarWidthCommand as Mr, SetChartTypeCommand as Nr, SetContentCaptionCommand as Er, SetContentSourceCommand as kr, SetContentSubtitleCommand as _r, SetContentTitleCommand as Rr, SetDataLabelsFormatCommand as Dr, SetGridLineStyleCommand as Hr, SetGridLineWidthCommand as Vr, SetGridVisibilityCommand as zr, SetHeadlineCompareWithCommand as Fr, SetHeadlinePositionCommand as Br, SetHeadlineShowCommand as en, SetHeadlineSizeCommand as Gr, SetHighlightDimStyleCommand as Kr, SetLegendAlignCommand as Ur, SetLegendDisplayCommand as Wr, SetLegendPositionCommand as Zr, SetLineInterpolationCommand as qr, SetLineMissingValuesCommand as $r, SetLineWidthCommand as nn, SetNumberFormatAbbreviationCommand as Xr, SetNumberFormatDecimalsCommand as tn, SetPointSizeCommand as Yr, SetPolarInnerRadiusCommand as jr, SetPolarStartAngleCommand as Jr, SetRuleLabelCommand as Qr, SetRuleValueCommand as ea, SetScaleDomainCommand as fe, SetScaleReverseCommand as na, SetScaleTransformCommand as ta, SetScaleZeroCommand as rn, SetStatLineCommand as ra, SetStyleRuleCommand as aa, TEXT_ANNOTATION_DEFAULTS as oa, ToggleCategoryLabelsCommand as ia, ToggleContentVisibilityCommand as Te, ToggleDataLabelsCommand as la, ToggleGoalLineCommand as sa, ToggleLineFillCommand as ca, ToggleLinePointsVisibilityCommand as da, ToggleStackTotalsCommand as ha, UpdateAnnotationCommand as Dn, areAnchorsEqual as Hn, areEndpointsComparable as ua, buildEditMenuTriggerRegion as ma, buildLayerStyleAddress as pa, buildObservationAnchor as ga, buildObservationPredicate as va, canAnchorDirectLabels as Ca, canPlaceDataLabels as fa, clampAnnotationTranslation as ba, computeArrow as ya, createObservationAnchorParser as Sa, createStyleResolver as Vn, createValueFormatter as wa, extractConstantValue as xa, extractVariableName as Ta, filterLayersByGeoms as ke, findAnnotation as La, findAverageLineLayer as Pa, findGoalLineLayer as Ia, findHighlightsAtObservation as Aa, findKindStyleDeclarations as Oa, findLayerByGeom as zn, findObservationAttachment as Ma, findStyleRule as Na, findTrendLineLayer as Ea, formatDifferenceLabel as ka, getColor as _a, hasMultipleGroups as Ra, inferDefaultDifferenceArrowEndpoints as Da, inferDifferenceArrowEndpoints as Ha, isCompanionLayer as Fn, isObservationAttachmentKind as Va, isPointWithinEditMenuTrigger as Bn, isSafeUrl as za, projectAnchorToPanel as Fa, readChartType as Ba, readHighlightDimStyle as Ga, resolveComparisonBasis as Ka, resolveObservationPoint as _e, stepDifferenceArrowEndpoint as Ua, toPanelCursor as Ge } from "@graphysdk/viz-engine";
4
- import { createContext as ve, useCallback as ye, useContext as ce, useEffect as H, useId as le, useMemo as k, useRef as pe, useState as q } from "react";
5
- import { Fragment as G, jsx as n, jsxs as p } from "react/jsx-runtime";
6
- import { useShallow as Ke } from "zustand/react/shallow";
7
- import { createPortal as Wa } from "react-dom";
1
+ import { A as Kt, B as He, D as W, E as ne, F as Ut, J as Ve, K as Wt, L as Zt, M as On, O as ie, P as qt, Q as ee, R as ge, T as $t, U as Uc, W as I, Z as ze, _ as Xt, b as X, c as Yt, ct as jt, d as Jt, f as Mn, ft as K, i as Qt, j as er, k as Nn, l as nr, lt as tr, m as rr, mt as U, n as R, o as ar, p as or, q as ir, r as lr, s as sr, t as cr, u as kn, ut as dr, v as xe, w as hr, x as te, y as L } from "./history-chords-Dd1uLlYw.js";
2
+ import { p as ur } from "./typography-CiDZDGza.js";
3
+ import { ARROW_DEFAULTS as mr, AddAnnotationCommand as Y, AddHighlightCommand as pr, BORDER_RADIUS_TOKENS as je, CONSTANT_VARIABLES as gr, DEFAULT_BAR_BORDER_RADIUS as vr, DEFAULT_POINT_SIZE as fr, DEFAULT_STROKE_WIDTH as Cr, DIFFERENCE_ARROW_DEFAULTS as _n, MAX_BAR_WIDTH as br, MIN_BAR_WIDTH as yr, MoveAnnotationCommand as Sr, RESTING_HOVER_STATE as En, RemoveAnnotationCommand as Fe, RemoveHighlightCommand as wr, SHAPE_DEFAULTS as xr, SetAppearanceTextScaleCommand as Tr, SetAxisLabelCommand as Lr, SetAxisPositionCommand as Pr, SetAxisTickModeCommand as Ir, SetAxisTicksVisibilityCommand as Ar, SetAxisVisibilityCommand as Or, SetBarBorderRadiusCommand as Mr, SetBarWidthCommand as Nr, SetChartTypeCommand as kr, SetContentCaptionCommand as _r, SetContentSourceCommand as Er, SetContentSubtitleCommand as Rr, SetContentTitleCommand as Dr, SetDataLabelsFormatCommand as Hr, SetGridLineStyleCommand as Vr, SetGridLineWidthCommand as zr, SetGridVisibilityCommand as Fr, SetHeadlineCompareWithCommand as Gr, SetHeadlinePositionCommand as Br, SetHeadlineShowCommand as Je, SetHeadlineSizeCommand as Kr, SetHighlightDimStyleCommand as Ur, SetLegendAlignCommand as Wr, SetLegendDisplayCommand as Zr, SetLegendPositionCommand as qr, SetLineInterpolationCommand as $r, SetLineMissingValuesCommand as Xr, SetLineWidthCommand as Qe, SetNumberFormatAbbreviationCommand as Yr, SetNumberFormatDecimalsCommand as en, SetPointSizeCommand as jr, SetPolarInnerRadiusCommand as Jr, SetPolarStartAngleCommand as Qr, SetRuleLabelCommand as ea, SetRuleValueCommand as na, SetScaleDomainCommand as Ce, SetScaleReverseCommand as ta, SetScaleTransformCommand as ra, SetScaleZeroCommand as nn, SetStatLineCommand as aa, SetStyleRuleCommand as oa, TEXT_ANNOTATION_DEFAULTS as ia, ToggleCategoryLabelsCommand as la, ToggleContentVisibilityCommand as Te, ToggleDataLabelsCommand as sa, ToggleGoalLineCommand as ca, ToggleLineFillCommand as da, ToggleLinePointsVisibilityCommand as ha, ToggleStackTotalsCommand as ua, UpdateAnnotationCommand as Rn, areAnchorsEqual as Dn, areEndpointsComparable as ma, buildEditMenuTriggerRegion as pa, buildLayerStyleAddress as ga, buildObservationAnchor as va, buildObservationPredicate as fa, canAnchorDirectLabels as Ca, canPlaceDataLabels as ba, clampAnnotationTranslation as ya, computeArrow as Sa, createObservationAnchorParser as wa, createStyleResolver as Hn, createValueFormatter as xa, extractConstantValue as Ta, extractVariableName as La, filterLayersByGeoms as ke, findAnnotation as Pa, findAverageLineLayer as Ia, findGoalLineLayer as Aa, findHighlightsAtObservation as Oa, findKindStyleDeclarations as Ma, findLayerByGeom as Vn, findObservationAttachment as Na, findStyleRule as ka, findTrendLineLayer as _a, formatDifferenceLabel as Ea, getColor as Ra, hasMultipleGroups as Da, inferDefaultDifferenceArrowEndpoints as Ha, inferDifferenceArrowEndpoints as Va, isCompanionLayer as zn, isObservationAttachmentKind as za, isPointWithinEditMenuTrigger as Fn, isSafeUrl as Fa, projectAnchorToPanel as Ga, readChartType as Ba, readHighlightDimStyle as Ka, resolveComparisonBasis as Ua, resolveObservationPoint as _e, stepDifferenceArrowEndpoint as Wa, toPanelCursor as Ge } from "@graphysdk/viz-engine";
4
+ import { createContext as ve, useCallback as ye, useContext as ce, useEffect as H, useId as le, useMemo as _, useRef as pe, useState as q } from "react";
5
+ import { Fragment as B, jsx as n, jsxs as p } from "react/jsx-runtime";
6
+ import { useShallow as Be } from "zustand/react/shallow";
7
+ import { createPortal as Za } from "react-dom";
8
8
  import se from "clsx";
9
9
  import { assignInlineVars as Gn } from "@vanilla-extract/dynamic";
10
10
  import { Menu as z } from "@base-ui/react/menu";
11
11
  import { Menu as j } from "@base-ui/react";
12
12
  import { Accordion as ue } from "@base-ui/react/accordion";
13
- import { NumberField as an } from "@base-ui/react/number-field";
14
- import { Radio as Kn } from "@base-ui/react/radio";
15
- import { RadioGroup as Un } from "@base-ui/react/radio-group";
13
+ import { NumberField as tn } from "@base-ui/react/number-field";
14
+ import { Radio as Bn } from "@base-ui/react/radio";
15
+ import { RadioGroup as Kn } from "@base-ui/react/radio-group";
16
16
  import { Select as Z } from "@base-ui/react/select";
17
17
  import { Slider as de } from "@base-ui/react/slider";
18
- import { Switch as on } from "@base-ui/react/switch";
19
- import { Input as Za } from "@base-ui/react/input";
20
- import './editable.css';var qa = "data-graphy-chart-chrome", $a = "data-graphy-chart-menu", Wn = { [$a]: "" }, Se = (e) => ({ [qa]: e }), Zn = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, Xa = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, qn = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, $n = (e, t, r) => r !== null && Bn({
18
+ import { Switch as rn } from "@base-ui/react/switch";
19
+ import { Input as qa } from "@base-ui/react/input";
20
+ import './editable.css';var $a = "data-graphy-chart-chrome", Xa = "data-graphy-chart-menu", Un = { [Xa]: "" }, Se = (e) => ({ [$a]: e }), Wn = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, Ya = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, Zn = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, qn = (e, t, r) => r !== null && Fn({
21
21
  x: e.clientX - t.x,
22
22
  y: e.clientY - t.y
23
- }, r), me = (e, t, r) => e instanceof Node && (t.contains(e) || Zn(e, r)), Ya = "cml7ha0", Xn = ve(null), ja = ({ children: e }) => {
24
- const { chartId: t } = U(), [r] = q(ze), [a, o] = q(null);
25
- return r === null ? null : /* @__PURE__ */ p(G, { children: [Wa(/* @__PURE__ */ n("div", {
23
+ }, r), me = (e, t, r) => e instanceof Node && (t.contains(e) || Wn(e, r)), ja = "cml7ha0", $n = ve(null), Ja = ({ children: e }) => {
24
+ const { chartId: t } = U(), [r] = q(Ve), [a, o] = q(null);
25
+ return r === null ? null : /* @__PURE__ */ p(B, { children: [Za(/* @__PURE__ */ n("div", {
26
26
  ref: o,
27
- className: Ya,
27
+ className: ja,
28
28
  ...Se(t)
29
- }), r), /* @__PURE__ */ n(Xn.Provider, {
29
+ }), r), /* @__PURE__ */ n($n.Provider, {
30
30
  value: a,
31
31
  children: e
32
32
  })] });
33
- }, Ue = () => ce(Xn), Yn = (e) => /* @__PURE__ */ p(L, {
33
+ }, Ke = () => ce($n), Xn = (e) => /* @__PURE__ */ p(L, {
34
34
  viewBox: "0 0 16 16",
35
35
  ...e,
36
36
  children: [
@@ -56,21 +56,21 @@ import './editable.css';var qa = "data-graphy-chart-chrome", $a = "data-graphy-c
56
56
  })
57
57
  ]
58
58
  });
59
- var jn = "efjmb40", Jn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ja = "efjmb44", Qa = "efjmb45", eo = /* @__PURE__ */ new Set([
59
+ var Yn = "efjmb40", jn = "efjmb41", re = "efjmb42", ae = "efjmb43", Qa = "efjmb44", eo = "efjmb45", no = /* @__PURE__ */ new Set([
60
60
  "item-press",
61
61
  "escape-key",
62
62
  "outside-press",
63
63
  "close-press",
64
64
  "sibling-open",
65
65
  "trigger-press"
66
- ]), We = ({ label: e, icon: t, onOpened: r, children: a }) => {
67
- const o = Ue(), [i, l] = q(!1), c = (s, h) => {
68
- s ? (l(!0), r?.()) : eo.has(h.reason) && l(!1);
66
+ ]), Ue = ({ label: e, icon: t, onOpened: r, children: a }) => {
67
+ const o = Ke(), [i, l] = q(!1), c = (s, h) => {
68
+ s ? (l(!0), r?.()) : no.has(h.reason) && l(!1);
69
69
  };
70
70
  return /* @__PURE__ */ p(j.SubmenuRoot, {
71
71
  open: i,
72
72
  onOpenChange: c,
73
- children: [/* @__PURE__ */ n(no, {
73
+ children: [/* @__PURE__ */ n(to, {
74
74
  label: e,
75
75
  icon: t
76
76
  }), /* @__PURE__ */ n(j.Portal, {
@@ -79,50 +79,50 @@ var jn = "efjmb40", Jn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ja = "efjmb4
79
79
  side: "right",
80
80
  align: "start",
81
81
  sideOffset: 4,
82
- className: jn,
83
- ...Wn,
82
+ className: Yn,
83
+ ...Un,
84
84
  children: /* @__PURE__ */ n(j.Popup, {
85
- className: Jn,
85
+ className: jn,
86
86
  children: a
87
87
  })
88
88
  }) })
89
89
  })]
90
90
  });
91
- }, no = ({ label: e, icon: t }) => /* @__PURE__ */ p(j.SubmenuTrigger, {
92
- className: ae,
91
+ }, to = ({ label: e, icon: t }) => /* @__PURE__ */ p(j.SubmenuTrigger, {
92
+ className: re,
93
93
  openOnHover: !1,
94
94
  children: [
95
95
  t,
96
96
  /* @__PURE__ */ n("span", {
97
- className: oe,
97
+ className: ae,
98
98
  children: e
99
99
  }),
100
100
  /* @__PURE__ */ n("span", {
101
- className: Qa,
101
+ className: eo,
102
102
  children: /* @__PURE__ */ n(xe, { size: "sm" })
103
103
  })
104
104
  ]
105
- }), to = "_1qe7q450", ro = "_1qe7q451", ao = "_1qe7q452", oo = ({ label: e, placeholder: t, addLabel: r, at: a, onRequestClose: o }) => {
106
- const i = pe(null), [l, c] = q(""), { dispatch: s } = re(), h = l.trim(), d = () => {
105
+ }), ro = "_1qe7q450", ao = "_1qe7q451", oo = "_1qe7q452", io = ({ label: e, placeholder: t, addLabel: r, at: a, onRequestClose: o }) => {
106
+ const i = pe(null), [l, c] = q(""), { dispatch: s } = te(), h = l.trim(), d = () => {
107
107
  h.length !== 0 && (s(new Y({
108
108
  kind: "comment",
109
109
  annotation: {
110
110
  at: a,
111
- content: io(h)
111
+ content: lo(h)
112
112
  }
113
113
  })), o());
114
114
  };
115
- return /* @__PURE__ */ n(We, {
115
+ return /* @__PURE__ */ n(Ue, {
116
116
  label: e,
117
- icon: /* @__PURE__ */ n(Yn, {}),
117
+ icon: /* @__PURE__ */ n(Xn, {}),
118
118
  onOpened: () => {
119
119
  requestAnimationFrame(() => i.current?.focus());
120
120
  },
121
121
  children: /* @__PURE__ */ p("div", {
122
- className: to,
122
+ className: ro,
123
123
  children: [/* @__PURE__ */ n("input", {
124
124
  ref: i,
125
- className: ro,
125
+ className: ao,
126
126
  value: l,
127
127
  placeholder: t,
128
128
  onChange: (g) => {
@@ -133,14 +133,14 @@ var jn = "efjmb40", Jn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ja = "efjmb4
133
133
  }
134
134
  }), /* @__PURE__ */ n("button", {
135
135
  type: "button",
136
- className: ao,
136
+ className: oo,
137
137
  disabled: h.length === 0,
138
138
  onClick: d,
139
139
  children: r
140
140
  })]
141
141
  })
142
142
  });
143
- }, io = (e) => ({
143
+ }, lo = (e) => ({
144
144
  type: "doc",
145
145
  content: [{
146
146
  type: "paragraph",
@@ -149,7 +149,7 @@ var jn = "efjmb40", Jn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ja = "efjmb4
149
149
  text: e
150
150
  }]
151
151
  }]
152
- }), lo = (e) => /* @__PURE__ */ n(L, {
152
+ }), so = (e) => /* @__PURE__ */ n(L, {
153
153
  viewBox: "0 0 15 14",
154
154
  ...e,
155
155
  children: /* @__PURE__ */ n("path", {
@@ -157,8 +157,8 @@ var jn = "efjmb40", Jn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ja = "efjmb4
157
157
  fill: "currentColor",
158
158
  fillOpacity: "0.8"
159
159
  })
160
- }), so = "relative-difference", co = ({ label: e, layer: t, at: r, onRequestClose: a }) => {
161
- const { dispatch: o } = re(), i = K((s) => s.coordSystem), l = k(() => Ha({
160
+ }), co = "relative-difference", ho = ({ label: e, layer: t, at: r, onRequestClose: a }) => {
161
+ const { dispatch: o } = te(), i = K((s) => s.coordSystem), l = _(() => Va({
162
162
  layer: t,
163
163
  at: r,
164
164
  coordSystem: i
@@ -174,25 +174,25 @@ var jn = "efjmb40", Jn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ja = "efjmb4
174
174
  annotation: {
175
175
  ..._n,
176
176
  ...l,
177
- label: so
177
+ label: co
178
178
  }
179
179
  })), a();
180
180
  };
181
181
  return /* @__PURE__ */ p(z.Item, {
182
- className: ae,
182
+ className: re,
183
183
  onClick: c,
184
- children: [/* @__PURE__ */ n(lo, {}), /* @__PURE__ */ n("span", {
185
- className: oe,
184
+ children: [/* @__PURE__ */ n(so, {}), /* @__PURE__ */ n("span", {
185
+ className: ae,
186
186
  children: e
187
187
  })]
188
188
  });
189
189
  };
190
- function ho(e, t) {
191
- if (e.type === "polar" && !uo(t)) return [{
190
+ function uo(e, t) {
191
+ if (e.type === "polar" && !mo(t)) return [{
192
192
  scope: "series",
193
193
  labelKey: "pieSlice"
194
194
  }];
195
- const r = Ra(t.data, t.mapping);
195
+ const r = Da(t.data, t.mapping);
196
196
  switch (t.geom) {
197
197
  case "bar": {
198
198
  const a = [{
@@ -236,10 +236,10 @@ function ho(e, t) {
236
236
  return [];
237
237
  }
238
238
  }
239
- var uo = (e) => {
240
- const t = Ta(e.mapping.x);
241
- return t !== null && t !== pr.x;
242
- }, mo = (e) => /* @__PURE__ */ p(L, {
239
+ var mo = (e) => {
240
+ const t = La(e.mapping.x);
241
+ return t !== null && t !== gr.x;
242
+ }, po = (e) => /* @__PURE__ */ p(L, {
243
243
  viewBox: "0 0 16 16",
244
244
  ...e,
245
245
  children: [
@@ -278,7 +278,7 @@ var uo = (e) => {
278
278
  rx: ".533"
279
279
  })
280
280
  ]
281
- }), po = (e) => /* @__PURE__ */ p(L, {
281
+ }), go = (e) => /* @__PURE__ */ p(L, {
282
282
  viewBox: "0 0 16 16",
283
283
  ...e,
284
284
  children: [
@@ -317,7 +317,7 @@ var uo = (e) => {
317
317
  rx: ".533"
318
318
  })
319
319
  ]
320
- }), go = (e) => /* @__PURE__ */ p(L, {
320
+ }), vo = (e) => /* @__PURE__ */ p(L, {
321
321
  viewBox: "0 0 16 16",
322
322
  ...e,
323
323
  children: [
@@ -356,7 +356,7 @@ var uo = (e) => {
356
356
  rx: ".533"
357
357
  })
358
358
  ]
359
- }), vo = (e) => /* @__PURE__ */ p(L, {
359
+ }), fo = (e) => /* @__PURE__ */ p(L, {
360
360
  viewBox: "0 0 16 16",
361
361
  ...e,
362
362
  children: [
@@ -410,7 +410,7 @@ var uo = (e) => {
410
410
  d: "M5.29 6.62a1.3 1.3 0 0 1-.424-.075 1 1 0 0 1-.373-.244 1.2 1.2 0 0 1-.262-.45 2.1 2.1 0 0 1-.096-.699q0-.389.082-.693.083-.304.238-.514a1.05 1.05 0 0 1 .374-.322q.22-.11.492-.11.285 0 .505.112a.973.973 0 0 1 .526.744h-.54a.5.5 0 0 0-.17-.277.5.5 0 0 0-.321-.105.54.54 0 0 0-.485.273q-.168.273-.17.75h.021a.8.8 0 0 1 .188-.223.92.92 0 0 1 .569-.195.91.91 0 0 1 .813.477q.125.222.123.509 0 .297-.136.536a1 1 0 0 1-.383.372 1.15 1.15 0 0 1-.571.134m-.003-.443a.54.54 0 0 0 .288-.078.57.57 0 0 0 .2-.211.6.6 0 0 0 .073-.299.6.6 0 0 0-.07-.294.54.54 0 0 0-.484-.285.55.55 0 0 0-.403.173.596.596 0 0 0 .108.914.53.53 0 0 0 .288.08M6.88 6.579v-.396l1.05-1.03q.15-.15.25-.27a1 1 0 0 0 .151-.229.6.6 0 0 0 .05-.236.432.432 0 0 0-.244-.405.6.6 0 0 0-.258-.056q-.15 0-.261.062a.43.43 0 0 0-.175.173.56.56 0 0 0-.06.267H6.86q0-.288.132-.5a.9.9 0 0 1 .362-.33q.231-.117.532-.117.303 0 .534.114.23.114.358.312a.8.8 0 0 1 .128.452.9.9 0 0 1-.065.334q-.065.164-.229.363-.162.2-.456.483l-.522.53v.021h1.318v.458zM10.57 6.62a1.3 1.3 0 0 1-.423-.075 1 1 0 0 1-.373-.244 1.2 1.2 0 0 1-.263-.45 2.1 2.1 0 0 1-.096-.699q0-.389.083-.693t.238-.514a1.05 1.05 0 0 1 .374-.322q.219-.11.492-.11.285 0 .505.112a.973.973 0 0 1 .526.744h-.54a.5.5 0 0 0-.17-.277.5.5 0 0 0-.322-.105.54.54 0 0 0-.484.273q-.168.273-.17.75h.02a.8.8 0 0 1 .188-.223.92.92 0 0 1 .569-.195.91.91 0 0 1 .814.477q.125.222.123.509 0 .297-.136.536a1 1 0 0 1-.383.372 1.15 1.15 0 0 1-.572.134m-.002-.443a.54.54 0 0 0 .288-.078.57.57 0 0 0 .2-.211.6.6 0 0 0 .073-.299.6.6 0 0 0-.071-.294.54.54 0 0 0-.483-.285.54.54 0 0 0-.403.173.597.597 0 0 0 .107.914.53.53 0 0 0 .289.08"
411
411
  })
412
412
  ]
413
- }), fo = (e) => /* @__PURE__ */ p(L, {
413
+ }), bo = (e) => /* @__PURE__ */ p(L, {
414
414
  viewBox: "0 0 16 16",
415
415
  ...e,
416
416
  children: [
@@ -451,7 +451,7 @@ var uo = (e) => {
451
451
  fillOpacity: "0.8"
452
452
  })
453
453
  ]
454
- }), bo = (e) => /* @__PURE__ */ p(L, {
454
+ }), yo = (e) => /* @__PURE__ */ p(L, {
455
455
  viewBox: "0 0 16 16",
456
456
  ...e,
457
457
  children: [
@@ -473,7 +473,7 @@ var uo = (e) => {
473
473
  d: "M15.999 8a8 8 0 0 1-7.588 7.989l-.412.01V8z"
474
474
  })
475
475
  ]
476
- }), yo = (e) => /* @__PURE__ */ p(L, {
476
+ }), So = (e) => /* @__PURE__ */ p(L, {
477
477
  viewBox: "0 0 16 16",
478
478
  ...e,
479
479
  children: [
@@ -534,7 +534,7 @@ var uo = (e) => {
534
534
  transform: "matrix(-1 0 0 1 15.933 .533)"
535
535
  })
536
536
  ]
537
- }), So = (e) => /* @__PURE__ */ p(L, {
537
+ }), wo = (e) => /* @__PURE__ */ p(L, {
538
538
  viewBox: "0 0 16 16",
539
539
  ...e,
540
540
  children: [
@@ -595,20 +595,20 @@ var uo = (e) => {
595
595
  transform: "matrix(-1 0 0 1 15.933 .533)"
596
596
  })
597
597
  ]
598
- }), wo = {
599
- bar: mo,
600
- barGroup: po,
601
- barStack: vo,
602
- barSeries: go,
598
+ }), xo = {
599
+ bar: po,
600
+ barGroup: go,
601
+ barStack: fo,
602
+ barSeries: vo,
603
603
  linePoint: Co,
604
- lineSeries: fo,
605
- scatterPoint: yo,
606
- scatterSeries: So,
607
- pieSlice: bo
608
- }, Qn = ({ labelKey: e }) => {
609
- const t = wo[e];
604
+ lineSeries: bo,
605
+ scatterPoint: So,
606
+ scatterSeries: wo,
607
+ pieSlice: yo
608
+ }, Jn = ({ labelKey: e }) => {
609
+ const t = xo[e];
610
610
  return /* @__PURE__ */ n(t, {});
611
- }, et = (e) => /* @__PURE__ */ p(L, {
611
+ }, Qn = (e) => /* @__PURE__ */ p(L, {
612
612
  viewBox: "0 0 16 16",
613
613
  ...e,
614
614
  children: [/* @__PURE__ */ n("path", {
@@ -621,28 +621,28 @@ var uo = (e) => {
621
621
  fill: "currentColor",
622
622
  fillOpacity: "0.8"
623
623
  })]
624
- }), xo = ({ label: e, options: t, onSelect: r }) => {
624
+ }), To = ({ label: e, options: t, onSelect: r }) => {
625
625
  const a = I();
626
- return /* @__PURE__ */ n(We, {
626
+ return /* @__PURE__ */ n(Ue, {
627
627
  label: e,
628
- icon: /* @__PURE__ */ n(et, {}),
628
+ icon: /* @__PURE__ */ n(Qn, {}),
629
629
  children: t.map((o) => /* @__PURE__ */ p(j.Item, {
630
- className: ae,
630
+ className: re,
631
631
  onClick: () => r(o.scope),
632
- children: [/* @__PURE__ */ n(Qn, { labelKey: o.labelKey }), /* @__PURE__ */ n("span", {
633
- className: oe,
632
+ children: [/* @__PURE__ */ n(Jn, { labelKey: o.labelKey }), /* @__PURE__ */ n("span", {
633
+ className: ae,
634
634
  children: a(`graph.annotations.highlights.labels.${o.labelKey}`)
635
635
  })]
636
636
  }, o.scope))
637
637
  });
638
- }, To = ({ label: e, layer: t, observation: r, highlights: a, onRequestClose: o }) => {
639
- const i = I(), { dispatch: l } = re(), c = K((m) => m.coordSystem), s = k(() => va(t, r), [t, r]), h = k(() => ho(c, t), [c, t]), d = k(() => {
638
+ }, Lo = ({ label: e, layer: t, observation: r, highlights: a, onRequestClose: o }) => {
639
+ const i = I(), { dispatch: l } = te(), c = K((m) => m.coordSystem), s = _(() => fa(t, r), [t, r]), h = _(() => uo(c, t), [c, t]), d = _(() => {
640
640
  const m = new Set(a.map((g) => g.scope));
641
641
  return h.filter((g) => !m.has(g.scope));
642
642
  }, [h, a]), [u] = d;
643
643
  if (s === null || u === void 0) return null;
644
644
  const v = (m) => {
645
- l(new mr({
645
+ l(new pr({
646
646
  predicate: s,
647
647
  scope: m,
648
648
  layerId: t.id
@@ -651,40 +651,40 @@ var uo = (e) => {
651
651
  if (d.length === 1) {
652
652
  const m = h.length === 1 ? e : i("graph.annotations.baseMenu.highlightWithLabel", { label: i(`graph.annotations.highlights.labels.${u.labelKey}`) });
653
653
  return /* @__PURE__ */ p(j.Item, {
654
- className: ae,
654
+ className: re,
655
655
  onClick: () => v(u.scope),
656
- children: [/* @__PURE__ */ n(Qn, { labelKey: u.labelKey }), /* @__PURE__ */ n("span", {
657
- className: oe,
656
+ children: [/* @__PURE__ */ n(Jn, { labelKey: u.labelKey }), /* @__PURE__ */ n("span", {
657
+ className: ae,
658
658
  children: m
659
659
  })]
660
660
  });
661
661
  }
662
- return /* @__PURE__ */ n(xo, {
662
+ return /* @__PURE__ */ n(To, {
663
663
  label: e,
664
664
  options: d,
665
665
  onSelect: v
666
666
  });
667
- }, Lo = "_1aafi1g0", Po = "_1aafi1g1", nt = ({ children: e }) => /* @__PURE__ */ p("span", {
668
- className: Lo,
667
+ }, Po = "_1aafi1g0", Io = "_1aafi1g1", et = ({ children: e }) => /* @__PURE__ */ p("span", {
668
+ className: Po,
669
669
  "aria-hidden": "true",
670
- children: [e, /* @__PURE__ */ n("span", { className: Po })]
671
- }), Io = ({ label: e, highlights: t, onRequestClose: r }) => {
672
- const { dispatch: a } = re(), o = t.at(-1);
670
+ children: [e, /* @__PURE__ */ n("span", { className: Io })]
671
+ }), Ao = ({ label: e, highlights: t, onRequestClose: r }) => {
672
+ const { dispatch: a } = te(), o = t.at(-1);
673
673
  if (o === void 0) return null;
674
674
  const i = () => {
675
- a(new Sr({ id: o.id })), r();
675
+ a(new wr({ id: o.id })), r();
676
676
  };
677
677
  return /* @__PURE__ */ p(z.Item, {
678
- className: ae,
678
+ className: re,
679
679
  onClick: i,
680
- children: [/* @__PURE__ */ n(nt, { children: /* @__PURE__ */ n(et, {}) }), /* @__PURE__ */ n("span", {
681
- className: oe,
680
+ children: [/* @__PURE__ */ n(et, { children: /* @__PURE__ */ n(Qn, {}) }), /* @__PURE__ */ n("span", {
681
+ className: ae,
682
682
  children: e
683
683
  })]
684
684
  });
685
- }, Ao = (e, t) => {
685
+ }, Oo = (e, t) => {
686
686
  const r = K((o) => o.spec.highlights), a = K((o) => o.config.parsingLocale);
687
- return k(() => Aa({
687
+ return _(() => Oa({
688
688
  layer: e,
689
689
  highlights: r,
690
690
  observation: t,
@@ -695,7 +695,7 @@ var uo = (e) => {
695
695
  t,
696
696
  a
697
697
  ]);
698
- }, tt = (e) => /* @__PURE__ */ p(L, {
698
+ }, nt = (e) => /* @__PURE__ */ p(L, {
699
699
  viewBox: "0 0 16 16",
700
700
  ...e,
701
701
  children: [
@@ -718,22 +718,22 @@ var uo = (e) => {
718
718
  fillOpacity: "0.8"
719
719
  })
720
720
  ]
721
- }), Oo = ({ label: e, at: t, onRequestClose: r }) => {
722
- const { dispatch: a } = re(), o = () => {
721
+ }), Mo = ({ label: e, at: t, onRequestClose: r }) => {
722
+ const { dispatch: a } = te(), o = () => {
723
723
  a(new Y({
724
724
  kind: "pinnedNumber",
725
725
  annotation: { at: t }
726
726
  })), r();
727
727
  };
728
728
  return /* @__PURE__ */ p(z.Item, {
729
- className: ae,
729
+ className: re,
730
730
  onClick: o,
731
- children: [/* @__PURE__ */ n(tt, {}), /* @__PURE__ */ n("span", {
732
- className: oe,
731
+ children: [/* @__PURE__ */ n(nt, {}), /* @__PURE__ */ n("span", {
732
+ className: ae,
733
733
  children: e
734
734
  })]
735
735
  });
736
- }, rt = (e) => /* @__PURE__ */ p(L, {
736
+ }, tt = (e) => /* @__PURE__ */ p(L, {
737
737
  viewBox: "0 0 16 16",
738
738
  ...e,
739
739
  children: [
@@ -766,34 +766,34 @@ var uo = (e) => {
766
766
  fillOpacity: "0.8"
767
767
  })
768
768
  ]
769
- }), at = {
769
+ }), rt = {
770
770
  pinnedNumber: {
771
- icon: tt,
771
+ icon: nt,
772
772
  labelKey: "graph.annotations.baseMenu.unpinNumber"
773
773
  },
774
774
  comment: {
775
- icon: Yn,
775
+ icon: Xn,
776
776
  labelKey: "graph.annotations.baseMenu.removeAnnotation"
777
777
  },
778
778
  sticker: {
779
- icon: rt,
779
+ icon: tt,
780
780
  labelKey: "graph.annotations.baseMenu.removeSticker"
781
781
  },
782
782
  image: null
783
- }, Mo = (e) => Va(e.kind) && at[e.kind] !== null, No = ({ attachment: e, onRequestClose: t }) => {
784
- const r = I(), { dispatch: a } = re(), { icon: o, labelKey: i } = at[e.kind], l = () => {
785
- a(new Be({ id: e.annotation.id })), t();
783
+ }, No = (e) => za(e.kind) && rt[e.kind] !== null, ko = ({ attachment: e, onRequestClose: t }) => {
784
+ const r = I(), { dispatch: a } = te(), { icon: o, labelKey: i } = rt[e.kind], l = () => {
785
+ a(new Fe({ id: e.annotation.id })), t();
786
786
  };
787
787
  return /* @__PURE__ */ p(z.Item, {
788
- className: ae,
788
+ className: re,
789
789
  onClick: l,
790
- children: [/* @__PURE__ */ n(nt, { children: /* @__PURE__ */ n(o, {}) }), /* @__PURE__ */ n("span", {
791
- className: oe,
790
+ children: [/* @__PURE__ */ n(et, { children: /* @__PURE__ */ n(o, {}) }), /* @__PURE__ */ n("span", {
791
+ className: ae,
792
792
  children: r(i)
793
793
  })]
794
794
  });
795
- }, Eo = "ceeojg0", ko = "ceeojg1", _o = "ceeojg2", Ro = ({ label: e, at: t, onRequestClose: r }) => {
796
- const { dispatch: a } = re(), o = (i) => {
795
+ }, _o = "ceeojg0", Eo = "ceeojg1", Ro = "ceeojg2", Do = ({ label: e, at: t, onRequestClose: r }) => {
796
+ const { dispatch: a } = te(), o = (i) => {
797
797
  a(new Y({
798
798
  kind: "sticker",
799
799
  annotation: {
@@ -805,30 +805,30 @@ var uo = (e) => {
805
805
  }
806
806
  })), r();
807
807
  };
808
- return /* @__PURE__ */ n(We, {
808
+ return /* @__PURE__ */ n(Ue, {
809
809
  label: e,
810
- icon: /* @__PURE__ */ n(rt, {}),
810
+ icon: /* @__PURE__ */ n(tt, {}),
811
811
  children: /* @__PURE__ */ n("div", {
812
- className: Eo,
813
- children: Object.entries(rr).map(([i, l]) => /* @__PURE__ */ n(j.Item, {
814
- className: ko,
812
+ className: _o,
813
+ children: Object.entries(ar).map(([i, l]) => /* @__PURE__ */ n(j.Item, {
814
+ className: Eo,
815
815
  "aria-label": i,
816
816
  onClick: () => o(i),
817
817
  children: /* @__PURE__ */ n("img", {
818
- className: _o,
818
+ className: Ro,
819
819
  src: l.src,
820
820
  alt: i
821
821
  })
822
822
  }, i))
823
823
  })
824
824
  });
825
- }, Do = ({ interaction: e, panelOrigin: t }) => {
826
- const r = W(), a = te((i) => i.menuTrigger);
825
+ }, Ho = ({ interaction: e, panelOrigin: t }) => {
826
+ const r = W(), a = ne((i) => i.menuTrigger);
827
827
  if (e.kind !== "menu" || a === null) return null;
828
828
  const o = () => {
829
829
  r.getState().releaseInteraction("menu");
830
830
  };
831
- return /* @__PURE__ */ n(Ho, {
831
+ return /* @__PURE__ */ n(Vo, {
832
832
  trigger: {
833
833
  x: t.x + a.center.x,
834
834
  y: t.y + a.center.y,
@@ -839,13 +839,13 @@ var uo = (e) => {
839
839
  observation: e.anchor.observation,
840
840
  onClose: o
841
841
  });
842
- }, Ho = ({ trigger: e, layer: t, at: r, observation: a, onClose: o }) => {
843
- const i = I(), l = Ue(), c = K((b) => b.spec.annotations), s = K((b) => b.config.parsingLocale), h = zo(), { x: d, y: u, radius: v } = e, m = k(() => Vo(d, u, v), [
842
+ }, Vo = ({ trigger: e, layer: t, at: r, observation: a, onClose: o }) => {
843
+ const i = I(), l = Ke(), c = K((b) => b.spec.annotations), s = K((b) => b.config.parsingLocale), h = Fo(), { x: d, y: u, radius: v } = e, m = _(() => zo(d, u, v), [
844
844
  d,
845
845
  u,
846
846
  v
847
- ]), g = Ma(c, r, k(() => Sa(t, s), [t, s])), C = g !== null && Mo(g) ? g : null, P = Ao(t, a), w = (b, T) => {
848
- !b && Fo(T.reason) && o();
847
+ ]), g = Na(c, r, _(() => wa(t, s), [t, s])), f = g !== null && No(g) ? g : null, P = Oo(t, a), w = (b, T) => {
848
+ !b && Go(T.reason) && o();
849
849
  };
850
850
  return /* @__PURE__ */ n(z.Root, {
851
851
  open: h,
@@ -858,49 +858,49 @@ var uo = (e) => {
858
858
  side: "right",
859
859
  align: "start",
860
860
  sideOffset: 8,
861
- className: jn,
862
- ...Wn,
861
+ className: Yn,
862
+ ...Un,
863
863
  children: /* @__PURE__ */ p(z.Popup, {
864
- className: Jn,
864
+ className: jn,
865
865
  "data-testid": "observation-menu",
866
866
  children: [
867
- C !== null && /* @__PURE__ */ n(No, {
868
- attachment: C,
867
+ f !== null && /* @__PURE__ */ n(ko, {
868
+ attachment: f,
869
869
  onRequestClose: o
870
870
  }),
871
- /* @__PURE__ */ n(Io, {
871
+ /* @__PURE__ */ n(Ao, {
872
872
  label: i("graph.annotations.baseMenu.removeHighlight"),
873
873
  highlights: P,
874
874
  onRequestClose: o
875
875
  }),
876
- /* @__PURE__ */ n(z.Separator, { className: Ja }),
877
- C === null && /* @__PURE__ */ p(G, { children: [
878
- /* @__PURE__ */ n(Oo, {
876
+ /* @__PURE__ */ n(z.Separator, { className: Qa }),
877
+ f === null && /* @__PURE__ */ p(B, { children: [
878
+ /* @__PURE__ */ n(Mo, {
879
879
  label: i("graph.annotations.baseMenu.pinNumber"),
880
880
  at: r,
881
881
  onRequestClose: o
882
882
  }),
883
- /* @__PURE__ */ n(oo, {
883
+ /* @__PURE__ */ n(io, {
884
884
  label: i("graph.annotations.baseMenu.annotate"),
885
885
  placeholder: i("graph.annotations.textMenu.placeholder"),
886
886
  addLabel: i("graph.annotations.textMenu.addButton"),
887
887
  at: r,
888
888
  onRequestClose: o
889
889
  }),
890
- /* @__PURE__ */ n(Ro, {
890
+ /* @__PURE__ */ n(Do, {
891
891
  label: i("graph.annotations.baseMenu.addSticker"),
892
892
  at: r,
893
893
  onRequestClose: o
894
894
  })
895
895
  ] }),
896
- t.highlight !== null && /* @__PURE__ */ n(To, {
896
+ t.highlight !== null && /* @__PURE__ */ n(Lo, {
897
897
  label: i("graph.annotations.baseMenu.highlight"),
898
898
  layer: t,
899
899
  observation: a,
900
900
  highlights: P,
901
901
  onRequestClose: o
902
902
  }),
903
- /* @__PURE__ */ n(co, {
903
+ /* @__PURE__ */ n(ho, {
904
904
  label: i("graph.annotations.baseMenu.differenceArrow"),
905
905
  layer: t,
906
906
  at: r,
@@ -911,15 +911,15 @@ var uo = (e) => {
911
911
  }) })
912
912
  })
913
913
  });
914
- }, Vo = (e, t, r) => ({ getBoundingClientRect: () => new DOMRect(e - r, t - r, r * 2, r * 2) }), zo = () => {
914
+ }, zo = (e, t, r) => ({ getBoundingClientRect: () => new DOMRect(e - r, t - r, r * 2, r * 2) }), Fo = () => {
915
915
  const [e, t] = q(!1);
916
916
  return H(() => {
917
917
  t(!0);
918
918
  }, []), e;
919
- }, Fo = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", ot = () => {
919
+ }, Go = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", at = () => {
920
920
  const e = kn();
921
- return it(e);
922
- }, it = (e) => {
921
+ return ot(e);
922
+ }, ot = (e) => {
923
923
  if (e.length !== 1) return null;
924
924
  const [t] = e;
925
925
  return t?.kind === "annotation" ? t.id : null;
@@ -932,7 +932,7 @@ var uo = (e) => {
932
932
  strokeLinejoin: "round",
933
933
  children: [/* @__PURE__ */ n("path", { d: "M4 9h16m-4-4 4 4" }), /* @__PURE__ */ n("path", { d: "M20 15H4m4 4-4-4" })]
934
934
  })
935
- }), Go = (e) => /* @__PURE__ */ n(L, {
935
+ }), Ko = (e) => /* @__PURE__ */ n(L, {
936
936
  ...e,
937
937
  children: /* @__PURE__ */ p("g", {
938
938
  stroke: "currentColor",
@@ -946,43 +946,43 @@ var uo = (e) => {
946
946
  /* @__PURE__ */ n("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" })
947
947
  ]
948
948
  })
949
- }), Ko = { kind: "chrome-popup" }, Uo = "var(--q7gcrz0)", Wo = "var(--q7gcrz1)", Zo = "q7gcrz2", qo = "q7gcrz3";
950
- var $o = "q7gcrz5", Xo = "q7gcrz6", Yo = "q7gcrz7", jo = "q7gcrz8", lt = "q7gcrz9", Jo = "q7gcrza";
951
- var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
949
+ }), Uo = { kind: "chrome-popup" }, Wo = "var(--q7gcrz0)", Zo = "var(--q7gcrz1)", qo = "q7gcrz2", $o = "q7gcrz3";
950
+ var Xo = "q7gcrz5", Yo = "q7gcrz6", jo = "q7gcrz7", Jo = "q7gcrz8", it = "q7gcrz9", Qo = "q7gcrza";
951
+ var an = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", ei = [
952
952
  "absolute-difference",
953
953
  "relative-difference",
954
954
  "proportion"
955
- ], sn = ["absolute-difference", "relative-difference"], ei = ["relative-difference", "proportion"], ni = {
955
+ ], on = ["absolute-difference", "relative-difference"], ni = ["relative-difference", "proportion"], ti = {
956
956
  "absolute-difference": "graph.annotations.differenceArrowToolbar.labelKind.absoluteDifference",
957
957
  "relative-difference": "graph.annotations.differenceArrowToolbar.labelKind.relativeDifference",
958
958
  proportion: "graph.annotations.differenceArrowToolbar.labelKind.proportion"
959
- }, ti = (e) => {
959
+ }, ri = (e) => {
960
960
  const { formattingLocale: t } = U(), r = K((o) => o.config.parsingLocale), a = t ?? r;
961
- return k(() => {
962
- const o = ua(e.start, e.end);
963
- return Qo.filter((i) => o || !sn.includes(i) || i === e.label).map((i) => ({
961
+ return _(() => {
962
+ const o = ma(e.start, e.end);
963
+ return ei.filter((i) => o || !on.includes(i) || i === e.label).map((i) => ({
964
964
  kind: i,
965
- nameKey: ni[i],
966
- preview: ka({
965
+ nameKey: ti[i],
966
+ preview: Ea({
967
967
  locale: a,
968
968
  kind: i,
969
969
  startValue: e.start.measurementValue,
970
970
  endValue: e.end.measurementValue,
971
971
  valueFormat: e.start.valueFormat
972
972
  }),
973
- isPickable: o || !sn.includes(i),
974
- isSuspect: ei.includes(i) && e.start.measurementValue === 0
973
+ isPickable: o || !on.includes(i),
974
+ isSuspect: ni.includes(i) && e.start.measurementValue === 0
975
975
  }));
976
976
  }, [e, a]);
977
- }, he = 8, ri = ({ labelBox: e, panelRect: t, frameWidth: r, frameHeight: a }) => {
978
- const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, c = i + 8, s = ai(he, l >= he ? l : c, a - he - 36), h = he;
977
+ }, he = 8, ai = ({ labelBox: e, panelRect: t, frameWidth: r, frameHeight: a }) => {
978
+ const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, c = i + 8, s = oi(he, l >= he ? l : c, a - he - 36), h = he;
979
979
  return {
980
980
  top: s,
981
981
  left: h,
982
982
  available: Math.max(0, r - he * 2),
983
983
  centre: t.x + e.x + e.width / 2 - h
984
984
  };
985
- }, ai = (e, t, r) => Math.max(e, Math.min(t, r)), Oe = [
985
+ }, oi = (e, t, r) => Math.max(e, Math.min(t, r)), Oe = [
986
986
  {
987
987
  id: "small",
988
988
  nameKey: "graph.annotations.differenceArrowToolbar.size.small"
@@ -995,14 +995,14 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
995
995
  id: "large",
996
996
  nameKey: "graph.annotations.differenceArrowToolbar.size.large"
997
997
  }
998
- ], oi = ({ arrow: e, labelBox: t, panelRect: r, frameWidth: a, frameHeight: o, frameElement: i }) => {
999
- const l = I(), { chartId: c, commands: s } = U(), h = W(), [d, u] = q(null), v = ti(e), m = ri({
998
+ ], ii = ({ arrow: e, labelBox: t, panelRect: r, frameWidth: a, frameHeight: o, frameElement: i }) => {
999
+ const l = I(), { chartId: c, commands: s } = U(), h = W(), [d, u] = q(null), v = ri(e), m = ai({
1000
1000
  labelBox: t,
1001
1001
  panelRect: r,
1002
1002
  frameWidth: a,
1003
1003
  frameHeight: o
1004
1004
  }), g = (w, b) => {
1005
- s.dispatch(new Dn({
1005
+ s.dispatch(new Rn({
1006
1006
  kind: "differenceArrow",
1007
1007
  id: e.id,
1008
1008
  patch: w
@@ -1010,15 +1010,15 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1010
1010
  };
1011
1011
  H(() => () => s.seal(), [s]), H(() => {
1012
1012
  const { claimInteraction: w, releaseInteraction: b } = h.getState();
1013
- return d === null ? b("chrome-popup") : w(Ko), () => b("chrome-popup");
1013
+ return d === null ? b("chrome-popup") : w(Uo), () => b("chrome-popup");
1014
1014
  }, [h, d]);
1015
- const C = (w) => {
1015
+ const f = (w) => {
1016
1016
  u(w ? "color" : null), w || s.seal();
1017
1017
  }, P = () => {
1018
- s.dispatch(new Be({ id: e.id })), i.focus({ preventScroll: !0 });
1018
+ s.dispatch(new Fe({ id: e.id })), i.focus({ preventScroll: !0 });
1019
1019
  };
1020
1020
  return /* @__PURE__ */ n("div", {
1021
- className: Zo,
1021
+ className: qo,
1022
1022
  style: {
1023
1023
  top: m.top,
1024
1024
  left: m.left,
@@ -1026,15 +1026,15 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1026
1026
  },
1027
1027
  children: /* @__PURE__ */ p(X.Root, {
1028
1028
  "aria-label": l("graph.annotations.differenceArrowToolbar.label"),
1029
- className: qo,
1029
+ className: $o,
1030
1030
  "data-testid": "difference-arrow-toolbar",
1031
1031
  ...Se(c),
1032
1032
  style: Gn({
1033
- [Uo]: `${m.centre}px`,
1034
- [Wo]: `${m.available}px`
1033
+ [Wo]: `${m.centre}px`,
1034
+ [Zo]: `${m.available}px`
1035
1035
  }),
1036
1036
  children: [
1037
- /* @__PURE__ */ n(ii, {
1037
+ /* @__PURE__ */ n(li, {
1038
1038
  options: v,
1039
1039
  current: e.label,
1040
1040
  isOpen: d === "labelKind",
@@ -1049,14 +1049,14 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1049
1049
  label: l("graph.annotations.differenceArrowToolbar.color"),
1050
1050
  onChange: (w) => g({ color: w }, { transient: !0 }),
1051
1051
  isOpen: d === "color",
1052
- onOpenChange: C,
1052
+ onOpenChange: f,
1053
1053
  popupAttributes: Se(c),
1054
1054
  children: /* @__PURE__ */ n("span", {
1055
- className: Xo,
1055
+ className: Yo,
1056
1056
  style: { background: e.color ?? "transparent" }
1057
1057
  })
1058
1058
  }),
1059
- /* @__PURE__ */ n(li, {
1059
+ /* @__PURE__ */ n(si, {
1060
1060
  current: e.size,
1061
1061
  isOpen: d === "size",
1062
1062
  onOpenChange: (w) => u(w ? "size" : null),
@@ -1067,7 +1067,7 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1067
1067
  /* @__PURE__ */ n(X.Separator, {}),
1068
1068
  /* @__PURE__ */ n(X.Button, {
1069
1069
  "aria-label": l("graph.annotations.differenceArrowToolbar.swap"),
1070
- className: ln,
1070
+ className: an,
1071
1071
  onClick: () => g({
1072
1072
  start: e.end.anchor,
1073
1073
  end: e.start.anchor
@@ -1079,9 +1079,9 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1079
1079
  }),
1080
1080
  /* @__PURE__ */ n(X.Button, {
1081
1081
  "aria-label": l("graph.annotations.differenceArrowToolbar.remove"),
1082
- className: ln,
1082
+ className: an,
1083
1083
  onClick: P,
1084
- children: /* @__PURE__ */ n(Go, {
1084
+ children: /* @__PURE__ */ n(Ko, {
1085
1085
  size: "sm",
1086
1086
  title: ""
1087
1087
  })
@@ -1089,7 +1089,7 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1089
1089
  ]
1090
1090
  })
1091
1091
  });
1092
- }, ii = ({ options: e, current: t, isOpen: r, onOpenChange: a, onPick: o }) => {
1092
+ }, li = ({ options: e, current: t, isOpen: r, onOpenChange: a, onPick: o }) => {
1093
1093
  const i = I(), l = e.find((s) => s.kind === t), c = e.some((s) => s.isPickable && s.kind !== t);
1094
1094
  return /* @__PURE__ */ p(z.Root, {
1095
1095
  open: r,
@@ -1098,12 +1098,12 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1098
1098
  children: [/* @__PURE__ */ p(z.Trigger, {
1099
1099
  render: /* @__PURE__ */ n(X.Button, {}),
1100
1100
  "aria-label": i("graph.annotations.differenceArrowToolbar.labelKind.ariaLabel"),
1101
- className: st,
1101
+ className: lt,
1102
1102
  disabled: !c,
1103
1103
  onMouseDown: (s) => s.preventDefault(),
1104
1104
  children: [
1105
1105
  /* @__PURE__ */ n("span", {
1106
- className: $o,
1106
+ className: Xo,
1107
1107
  children: l === void 0 ? "" : i(l.nameKey)
1108
1108
  }),
1109
1109
  l !== void 0 && /* @__PURE__ */ p("span", {
@@ -1116,8 +1116,8 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1116
1116
  }),
1117
1117
  /* @__PURE__ */ n(xe, { size: "sm" })
1118
1118
  ]
1119
- }), /* @__PURE__ */ n(ct, { children: e.map((s) => /* @__PURE__ */ p(z.Item, {
1120
- className: lt,
1119
+ }), /* @__PURE__ */ n(st, { children: e.map((s) => /* @__PURE__ */ p(z.Item, {
1120
+ className: it,
1121
1121
  "data-selected": s.kind === t,
1122
1122
  disabled: !s.isPickable,
1123
1123
  onClick: () => o(s.kind),
@@ -1130,13 +1130,13 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1130
1130
  children: "⚠"
1131
1131
  }),
1132
1132
  /* @__PURE__ */ n("span", {
1133
- className: Jo,
1133
+ className: Qo,
1134
1134
  children: s.preview
1135
1135
  })
1136
1136
  ]
1137
1137
  }, s.kind)) })]
1138
1138
  });
1139
- }, li = ({ current: e, isOpen: t, onOpenChange: r, onPick: a }) => {
1139
+ }, si = ({ current: e, isOpen: t, onOpenChange: r, onPick: a }) => {
1140
1140
  const o = I(), i = Oe.find((l) => l.id === e) ?? Oe[0];
1141
1141
  return /* @__PURE__ */ p(z.Root, {
1142
1142
  open: t,
@@ -1145,27 +1145,27 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1145
1145
  children: [/* @__PURE__ */ p(z.Trigger, {
1146
1146
  render: /* @__PURE__ */ n(X.Button, {}),
1147
1147
  "aria-label": o("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
1148
- className: st,
1148
+ className: lt,
1149
1149
  onMouseDown: (l) => l.preventDefault(),
1150
1150
  children: [/* @__PURE__ */ n("span", { children: i === void 0 ? "" : o(i.nameKey) }), /* @__PURE__ */ n(xe, { size: "sm" })]
1151
- }), /* @__PURE__ */ n(ct, { children: Oe.map((l) => /* @__PURE__ */ n(z.Item, {
1152
- className: lt,
1151
+ }), /* @__PURE__ */ n(st, { children: Oe.map((l) => /* @__PURE__ */ n(z.Item, {
1152
+ className: it,
1153
1153
  "data-selected": l.id === e,
1154
1154
  onClick: () => a(l.id),
1155
1155
  children: o(l.nameKey)
1156
1156
  }, l.id)) })]
1157
1157
  });
1158
- }, ct = ({ children: e }) => {
1158
+ }, st = ({ children: e }) => {
1159
1159
  const { chartId: t } = U();
1160
1160
  return /* @__PURE__ */ n(z.Portal, {
1161
- container: ze(),
1161
+ container: Ve(),
1162
1162
  children: /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(z.Positioner, {
1163
1163
  side: "bottom",
1164
1164
  align: "start",
1165
1165
  sideOffset: 6,
1166
- className: Yo,
1166
+ className: jo,
1167
1167
  children: /* @__PURE__ */ n(z.Popup, {
1168
- className: jo,
1168
+ className: Jo,
1169
1169
  onMouseDown: (r) => r.preventDefault(),
1170
1170
  ...Se(t),
1171
1171
  children: e
@@ -1173,32 +1173,8 @@ var ln = "q7gcrzd q7gcrzc", st = "q7gcrze q7gcrzc", Qo = [
1173
1173
  }) })
1174
1174
  });
1175
1175
  };
1176
- var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ? "end" : "start", ht = ({ dispatch: e, arrow: t, endpoint: r, anchor: a }) => {
1177
- Hn(a, t[r].anchor) || e(new Dn({
1178
- kind: "differenceArrow",
1179
- id: t.id,
1180
- patch: { [r]: a }
1181
- }));
1182
- }, hi = ({ clientPoint: e, panelOrigin: t, panelRect: r, engine: a, layers: o, coordSystem: i, resolver: l, fixedAnchor: c, align: s }) => {
1183
- const h = ui({
1184
- x: e.x - t.x,
1185
- y: e.y - t.y
1186
- }, r), { primary: d } = a.query(Ge(h, r));
1187
- if (d === null) return null;
1188
- const u = o.find((m) => m.id === d.layerId);
1189
- if (u === void 0) return null;
1190
- const v = _e({
1191
- resolver: l,
1192
- layer: u,
1193
- observation: d.observation,
1194
- coordSystem: i,
1195
- align: s
1196
- });
1197
- return v === null || Hn(v.anchor, c) ? null : v;
1198
- }, ui = (e, t) => ({
1199
- x: Math.max(0, Math.min(e.x, t.width)),
1200
- y: Math.max(0, Math.min(e.y, t.height))
1201
- }), mi = class {
1176
+ var ci = "ydgo3h0", di = "ydgo3h1", hi = "ydgo3h2";
1177
+ var ui = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, ct = class {
1202
1178
  constructor(e) {
1203
1179
  this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasMoved = !1, this.hasPublished = !1, this.handleMove = (t) => {
1204
1180
  t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.hasMoved = !0, this.scheduledFrame === null && (this.scheduledFrame = requestAnimationFrame(this.runFrame)));
@@ -1210,23 +1186,15 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1210
1186
  this.scheduledFrame = null;
1211
1187
  const t = this.pendingEvent;
1212
1188
  if (this.pendingEvent = null, t === null) return;
1213
- const { editorStore: r, engine: a, anchorResolver: o, endpoint: i, readInputs: l } = this.params, { arrow: c, panelOrigin: s, panelRect: h, layers: d, coordSystem: u } = l(), v = r.getState();
1214
- if (this.hasPublished && Ee(J(v, "endpoint-drag"), c.id, i) === null) return;
1215
- const m = hi({
1216
- clientPoint: {
1217
- x: t.clientX,
1218
- y: t.clientY
1219
- },
1220
- panelOrigin: s,
1221
- panelRect: h,
1222
- engine: a,
1223
- layers: d,
1224
- coordSystem: u,
1225
- resolver: o,
1226
- fixedAnchor: c[dt(i)].anchor,
1227
- align: c[i].anchor.align
1228
- });
1229
- m !== null && this.publish(m);
1189
+ const r = this.params.editorStore.getState();
1190
+ if (this.hasPublished && this.readOwn(r) === null) return;
1191
+ const a = {
1192
+ x: t.clientX,
1193
+ y: t.clientY
1194
+ };
1195
+ if (!this.hasPublished && !this.isDragConfirmed(this.params.press, a)) return;
1196
+ const o = this.resolvePreview(a);
1197
+ o !== null && (r.claimInteraction(o), this.hasPublished = !0);
1230
1198
  };
1231
1199
  }
1232
1200
  start() {
@@ -1234,33 +1202,94 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1234
1202
  e.addEventListener("pointermove", this.handleMove, { signal: t }), e.addEventListener("pointerup", this.handleUp, { signal: t }), e.addEventListener("lostpointercapture", this.handleLost, { signal: t });
1235
1203
  }
1236
1204
  finish(e) {
1237
- this.params.onSettled(), this.listeners.abort(), this.cancelFrame(), e && this.hasMoved && this.runFrame(), this.pendingEvent = null;
1238
- const { editorStore: t, endpoint: r, readInputs: a, dispatch: o } = this.params, { arrow: i } = a(), l = t.getState(), c = Ee(J(l, "endpoint-drag"), i.id, r);
1239
- c !== null && (l.releaseInteraction("endpoint-drag"), e && ht({
1240
- dispatch: o,
1241
- arrow: i,
1242
- endpoint: r,
1243
- anchor: c.point.anchor
1244
- }));
1205
+ this.params.onSettled(), this.listeners.abort(), this.cancelFrame();
1206
+ try {
1207
+ e && this.hasMoved && this.runFrame();
1208
+ } finally {
1209
+ this.settle(e);
1210
+ }
1245
1211
  }
1246
- publish(e) {
1247
- const { editorStore: t, readInputs: r, endpoint: a } = this.params;
1248
- t.getState().claimInteraction({
1249
- kind: "endpoint-drag",
1250
- annotationId: r().arrow.id,
1251
- endpoint: a,
1252
- point: e
1253
- }), this.hasPublished = !0;
1212
+ isDragConfirmed(e, t) {
1213
+ return ui(e, t);
1214
+ }
1215
+ settle(e) {
1216
+ this.pendingEvent = null;
1217
+ const t = this.params.editorStore.getState(), r = this.readOwn(t);
1218
+ r !== null && t.releaseInteraction(this.kind), !(!e || r === null) && this.commit(r);
1254
1219
  }
1255
1220
  cancelFrame() {
1256
1221
  this.scheduledFrame !== null && (cancelAnimationFrame(this.scheduledFrame), this.scheduledFrame = null);
1257
1222
  }
1258
- }, pi = ({ arrow: e, panelOrigin: t, panelRect: r }) => {
1259
- const { commands: a, anchorResolver: o } = U(), { engine: i } = Fe(), l = W(), c = ne({
1223
+ }, mi = ({ clientPoint: e, panelOrigin: t, panelRect: r, engine: a, layers: o, coordSystem: i, resolver: l, fixedAnchor: c, align: s }) => {
1224
+ const h = pi({
1225
+ x: e.x - t.x,
1226
+ y: e.y - t.y
1227
+ }, r), { primary: d } = a.query(Ge(h, r));
1228
+ if (d === null) return null;
1229
+ const u = o.find((m) => m.id === d.layerId);
1230
+ if (u === void 0) return null;
1231
+ const v = _e({
1232
+ resolver: l,
1233
+ layer: u,
1234
+ observation: d.observation,
1235
+ coordSystem: i,
1236
+ align: s
1237
+ });
1238
+ return v === null || Dn(v.anchor, c) ? null : v;
1239
+ }, pi = (e, t) => ({
1240
+ x: Math.max(0, Math.min(e.x, t.width)),
1241
+ y: Math.max(0, Math.min(e.y, t.height))
1242
+ }), dt = (e) => e === "start" ? "end" : "start", ht = ({ dispatch: e, arrow: t, endpoint: r, anchor: a }) => {
1243
+ Dn(a, t[r].anchor) || e(new Rn({
1244
+ kind: "differenceArrow",
1245
+ id: t.id,
1246
+ patch: { [r]: a }
1247
+ }));
1248
+ }, gi = class extends ct {
1249
+ constructor(...e) {
1250
+ super(...e), this.kind = "difference-arrow-endpoint-drag";
1251
+ }
1252
+ isDragConfirmed() {
1253
+ return !0;
1254
+ }
1255
+ readOwn(e) {
1256
+ const { endpoint: t, readInputs: r } = this.params;
1257
+ return Nn(ie(e, "difference-arrow-endpoint-drag"), r().arrow.id, t);
1258
+ }
1259
+ resolvePreview(e) {
1260
+ const { endpoint: t, readInputs: r, engine: a, anchorResolver: o } = this.params, { arrow: i, panelOrigin: l, panelRect: c, layers: s, coordSystem: h } = r(), d = mi({
1261
+ clientPoint: e,
1262
+ panelOrigin: l,
1263
+ panelRect: c,
1264
+ engine: a,
1265
+ layers: s,
1266
+ coordSystem: h,
1267
+ resolver: o,
1268
+ fixedAnchor: i[dt(t)].anchor,
1269
+ align: i[t].anchor.align
1270
+ });
1271
+ return d === null ? null : {
1272
+ kind: "difference-arrow-endpoint-drag",
1273
+ annotationId: i.id,
1274
+ endpoint: t,
1275
+ point: d
1276
+ };
1277
+ }
1278
+ commit({ point: e, endpoint: t }) {
1279
+ const { dispatch: r, readInputs: a } = this.params;
1280
+ ht({
1281
+ dispatch: r,
1282
+ arrow: a().arrow,
1283
+ endpoint: t,
1284
+ anchor: e.anchor
1285
+ });
1286
+ }
1287
+ }, vi = ({ arrow: e, panelOrigin: t, panelRect: r }) => {
1288
+ const { commands: a, anchorResolver: o } = U(), { engine: i } = ze(), l = W(), c = ee({
1260
1289
  arrow: e,
1261
1290
  panelOrigin: t,
1262
1291
  panelRect: r,
1263
- ...K(Ke((h) => ({
1292
+ ...K(Be((h) => ({
1264
1293
  layers: h.layers,
1265
1294
  coordSystem: h.coordSystem
1266
1295
  })))
@@ -1273,9 +1302,13 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1273
1302
  return;
1274
1303
  }
1275
1304
  d.currentTarget.focus({ preventScroll: !0 }), d.preventDefault();
1276
- const u = new mi({
1305
+ const u = new gi({
1277
1306
  handle: d.currentTarget,
1278
1307
  pointerId: d.pointerId,
1308
+ press: {
1309
+ x: d.clientX,
1310
+ y: d.clientY
1311
+ },
1279
1312
  endpoint: h,
1280
1313
  readInputs: () => c.current,
1281
1314
  editorStore: l,
@@ -1294,27 +1327,27 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1294
1327
  o,
1295
1328
  a
1296
1329
  ]);
1297
- }, gi = [" ", "Enter"], vi = ({ arrow: e }) => {
1298
- const { commands: t, anchorResolver: r } = U(), a = W(), { layers: o, coordSystem: i, mainAxis: l } = K(Ke((s) => ({
1330
+ }, fi = [" ", "Enter"], Ci = ({ arrow: e }) => {
1331
+ const { commands: t, anchorResolver: r } = U(), a = W(), { layers: o, coordSystem: i, mainAxis: l } = K(Be((s) => ({
1299
1332
  layers: s.layers,
1300
1333
  coordSystem: s.coordSystem,
1301
1334
  mainAxis: s.coordSystem.type === "cartesian" ? s.coordSystem.mainAxis : "x"
1302
1335
  }))), c = e.id;
1303
1336
  return H(() => () => {
1304
1337
  const s = a.getState();
1305
- J(s, "endpoint-drag")?.annotationId === c && s.releaseInteraction("endpoint-drag");
1338
+ ie(s, "difference-arrow-endpoint-drag")?.annotationId === c && s.releaseInteraction("difference-arrow-endpoint-drag");
1306
1339
  }, [a, c]), ye((s) => ({ onKeyDown: (h) => {
1307
1340
  if (h.altKey || h.ctrlKey || h.metaKey || h.shiftKey) return;
1308
- const d = a.getState(), u = Ee(J(d, "endpoint-drag"), e.id, s);
1309
- if (gi.includes(h.key)) {
1341
+ const d = a.getState(), u = Nn(ie(d, "difference-arrow-endpoint-drag"), e.id, s);
1342
+ if (fi.includes(h.key)) {
1310
1343
  if (h.preventDefault(), h.repeat) return;
1311
1344
  if (u === null) return d.claimInteraction({
1312
- kind: "endpoint-drag",
1345
+ kind: "difference-arrow-endpoint-drag",
1313
1346
  annotationId: e.id,
1314
1347
  endpoint: s,
1315
1348
  point: e[s]
1316
1349
  });
1317
- d.releaseInteraction("endpoint-drag"), ht({
1350
+ d.releaseInteraction("difference-arrow-endpoint-drag"), ht({
1318
1351
  dispatch: t.dispatch,
1319
1352
  arrow: e,
1320
1353
  endpoint: s,
@@ -1323,10 +1356,10 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1323
1356
  return;
1324
1357
  }
1325
1358
  if (u === null) return;
1326
- const v = Ci(h.key, l);
1359
+ const v = bi(h.key, l);
1327
1360
  if (v === null) return;
1328
1361
  h.preventDefault();
1329
- const m = fi({
1362
+ const m = yi({
1330
1363
  arrow: e,
1331
1364
  endpoint: s,
1332
1365
  from: u.point.anchor,
@@ -1336,7 +1369,7 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1336
1369
  resolver: r
1337
1370
  });
1338
1371
  m !== null && d.claimInteraction({
1339
- kind: "endpoint-drag",
1372
+ kind: "difference-arrow-endpoint-drag",
1340
1373
  annotationId: e.id,
1341
1374
  endpoint: s,
1342
1375
  point: m
@@ -1350,16 +1383,16 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1350
1383
  i,
1351
1384
  l
1352
1385
  ]);
1353
- }, Ci = (e, t) => {
1386
+ }, bi = (e, t) => {
1354
1387
  const r = e === "ArrowUp" || e === "ArrowDown";
1355
1388
  return !r && !(e === "ArrowLeft" || e === "ArrowRight") ? null : {
1356
1389
  axis: t === "x" === r ? "cross" : "main",
1357
1390
  step: e === "ArrowDown" || e === "ArrowRight" ? 1 : -1
1358
1391
  };
1359
- }, fi = ({ arrow: e, endpoint: t, from: r, move: a, layers: o, coordSystem: i, resolver: l }) => {
1392
+ }, yi = ({ arrow: e, endpoint: t, from: r, move: a, layers: o, coordSystem: i, resolver: l }) => {
1360
1393
  const c = o.find((h) => h.id === r.layerId);
1361
1394
  if (c === void 0) return null;
1362
- const s = Ua({
1395
+ const s = Wa({
1363
1396
  layer: c,
1364
1397
  from: r,
1365
1398
  partner: e[dt(t)].anchor,
@@ -1380,15 +1413,15 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1380
1413
  coordSystem: i,
1381
1414
  align: e[t].anchor.align
1382
1415
  });
1383
- }, bi = (e) => {
1384
- const t = ot();
1385
- return t === null ? null : /* @__PURE__ */ n(yi, {
1416
+ }, Si = (e) => {
1417
+ const t = at();
1418
+ return t === null ? null : /* @__PURE__ */ n(wi, {
1386
1419
  annotationId: t,
1387
1420
  ...e
1388
1421
  });
1389
- }, yi = ({ annotationId: e, ...t }) => {
1390
- const r = dr(), a = k(() => r.find((o) => o.id === e), [r, e]);
1391
- return a === void 0 ? null : /* @__PURE__ */ n(Si, {
1422
+ }, wi = ({ annotationId: e, ...t }) => {
1423
+ const r = hr(), a = _(() => r.find((o) => o.id === e), [r, e]);
1424
+ return a === void 0 ? null : /* @__PURE__ */ n(xi, {
1392
1425
  committedArrow: a.committedArrow,
1393
1426
  committedLabelBox: a.committedLabelBox,
1394
1427
  labelBox: a.labelBox,
@@ -1397,16 +1430,16 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1397
1430
  isDragged: a.isDragged,
1398
1431
  ...t
1399
1432
  });
1400
- }, Si = ({ committedArrow: e, committedLabelBox: t, labelBox: r, start: a, end: o, panelRect: i, panelOrigin: l, frameRect: c, frameElement: s, isDragged: h }) => {
1401
- const d = pi({
1433
+ }, xi = ({ committedArrow: e, committedLabelBox: t, labelBox: r, start: a, end: o, panelRect: i, panelOrigin: l, frameRect: c, frameElement: s, isDragged: h }) => {
1434
+ const d = vi({
1402
1435
  arrow: e,
1403
1436
  panelOrigin: l,
1404
1437
  panelRect: i
1405
- }), u = vi({ arrow: e });
1438
+ }), u = Ci({ arrow: e });
1406
1439
  return /* @__PURE__ */ p("div", {
1407
1440
  "data-testid": "difference-arrow-selection",
1408
1441
  children: [
1409
- !h && /* @__PURE__ */ n(oi, {
1442
+ !h && /* @__PURE__ */ n(ii, {
1410
1443
  arrow: e,
1411
1444
  labelBox: t,
1412
1445
  panelRect: i,
@@ -1416,7 +1449,7 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1416
1449
  }),
1417
1450
  /* @__PURE__ */ n("div", {
1418
1451
  "aria-hidden": "true",
1419
- className: di,
1452
+ className: hi,
1420
1453
  "data-testid": "difference-arrow-selection-label",
1421
1454
  style: {
1422
1455
  left: i.x + r.x - 2,
@@ -1425,14 +1458,14 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1425
1458
  height: r.height + 4
1426
1459
  }
1427
1460
  }),
1428
- /* @__PURE__ */ n(cn, {
1461
+ /* @__PURE__ */ n(ln, {
1429
1462
  endpoint: "start",
1430
1463
  point: a,
1431
1464
  panelRect: i,
1432
1465
  dragHandlers: d("start"),
1433
1466
  keyboardHandlers: u("start")
1434
1467
  }),
1435
- /* @__PURE__ */ n(cn, {
1468
+ /* @__PURE__ */ n(ln, {
1436
1469
  endpoint: "end",
1437
1470
  point: o,
1438
1471
  panelRect: i,
@@ -1441,8 +1474,8 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1441
1474
  })
1442
1475
  ]
1443
1476
  });
1444
- }, cn = ({ endpoint: e, point: t, panelRect: r, dragHandlers: a, keyboardHandlers: o }) => /* @__PURE__ */ n("div", {
1445
- className: si,
1477
+ }, ln = ({ endpoint: e, point: t, panelRect: r, dragHandlers: a, keyboardHandlers: o }) => /* @__PURE__ */ n("div", {
1478
+ className: ci,
1446
1479
  "data-testid": "difference-arrow-selection-handle",
1447
1480
  "data-endpoint": e,
1448
1481
  role: "button",
@@ -1455,27 +1488,26 @@ var si = "ydgo3h0", ci = "ydgo3h1", di = "ydgo3h2", dt = (e) => e === "start" ?
1455
1488
  ...o,
1456
1489
  children: /* @__PURE__ */ n("span", {
1457
1490
  "aria-hidden": "true",
1458
- className: ci
1491
+ className: di
1459
1492
  })
1460
1493
  });
1461
- var wi = {
1494
+ var Ti = {
1462
1495
  hovered: "_1ee8fau1 _1ee8fau0",
1463
1496
  selected: "_1ee8fau2 _1ee8fau0"
1464
- }, xi = {
1497
+ }, Li = {
1465
1498
  hovered: "_1ee8fau4 _1ee8fau3",
1466
1499
  selected: "_1ee8fau5 _1ee8fau3"
1467
- };
1468
- var Ti = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Li = (e, t, r) => ({
1469
- x: dn(t.x - e.x, r.width),
1470
- y: dn(t.y - e.y, r.height)
1471
- }), Pi = (e) => e.x !== 0 || e.y !== 0, ut = (e, t) => ({
1500
+ }, sn = (e, t) => t > 0 ? e / t : 0, Pi = (e, t, r) => ({
1501
+ x: sn(t.x - e.x, r.width),
1502
+ y: sn(t.y - e.y, r.height)
1503
+ }), Ii = (e) => e.x !== 0 || e.y !== 0, ut = (e, t) => ({
1472
1504
  x: e.x * t.width,
1473
1505
  y: e.y * t.height
1474
- }), dn = (e, t) => t > 0 ? e / t : 0, Ii = ({ panelRect: e }) => {
1475
- const t = En(e), r = Kt(), a = ot(), o = te((d) => J(d, "move-drag")), i = te((d) => {
1506
+ }), Ai = ({ panelRect: e }) => {
1507
+ const t = Mn(e), r = Ut(), a = at(), o = ne((d) => ie(d, "move-drag")), i = ne((d) => {
1476
1508
  const u = d.editTargetUnderPointer;
1477
1509
  return u?.kind === "annotation" ? u.id : null;
1478
- }), l = k(() => ({
1510
+ }), l = _(() => ({
1479
1511
  panelWidth: e.width,
1480
1512
  panelHeight: e.height,
1481
1513
  measuredBoxes: r
@@ -1483,7 +1515,7 @@ var Ti = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Li = (e, t, r) => ({
1483
1515
  e.width,
1484
1516
  e.height,
1485
1517
  r
1486
- ]), c = hn(t, a, l), s = hn(t, i === a ? null : i, l), h = (d) => {
1518
+ ]), c = cn(t, a, l), s = cn(t, i === a ? null : i, l), h = (d) => {
1487
1519
  if (o?.annotationId !== d) return e;
1488
1520
  const u = ut(o.translation, e);
1489
1521
  return {
@@ -1491,41 +1523,41 @@ var Ti = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Li = (e, t, r) => ({
1491
1523
  y: e.y + u.y
1492
1524
  };
1493
1525
  };
1494
- return /* @__PURE__ */ p(G, { children: [s !== null && /* @__PURE__ */ n(un, {
1526
+ return /* @__PURE__ */ p(B, { children: [s !== null && /* @__PURE__ */ n(dn, {
1495
1527
  annotationId: s.id,
1496
1528
  geometry: s.geometry,
1497
1529
  state: "hovered",
1498
1530
  origin: h(s.id)
1499
- }), c !== null && /* @__PURE__ */ n(un, {
1531
+ }), c !== null && /* @__PURE__ */ n(dn, {
1500
1532
  annotationId: c.id,
1501
1533
  geometry: c.geometry,
1502
1534
  state: "selected",
1503
1535
  origin: h(c.id)
1504
1536
  })] });
1505
- }, hn = (e, t, r) => {
1537
+ }, cn = (e, t, r) => {
1506
1538
  if (t === null) return null;
1507
- const a = tr(e, t, r);
1539
+ const a = rr(e, t, r);
1508
1540
  return a === null ? null : {
1509
1541
  id: t,
1510
1542
  geometry: a
1511
1543
  };
1512
- }, un = ({ annotationId: e, geometry: t, state: r, origin: a }) => t.shape === "segment" ? /* @__PURE__ */ p("div", {
1544
+ }, dn = ({ annotationId: e, geometry: t, state: r, origin: a }) => t.shape === "segment" ? /* @__PURE__ */ p("div", {
1513
1545
  "aria-hidden": "true",
1514
1546
  "data-testid": "annotation-chrome",
1515
1547
  "data-annotation-id": e,
1516
1548
  "data-state": r,
1517
- children: [/* @__PURE__ */ n(mn, {
1549
+ children: [/* @__PURE__ */ n(hn, {
1518
1550
  point: t.start,
1519
1551
  state: r,
1520
1552
  origin: a
1521
- }), /* @__PURE__ */ n(mn, {
1553
+ }), /* @__PURE__ */ n(hn, {
1522
1554
  point: t.end,
1523
1555
  state: r,
1524
1556
  origin: a
1525
1557
  })]
1526
1558
  }) : /* @__PURE__ */ n("div", {
1527
1559
  "aria-hidden": "true",
1528
- className: wi[r],
1560
+ className: Ti[r],
1529
1561
  "data-testid": "annotation-chrome",
1530
1562
  "data-annotation-id": e,
1531
1563
  "data-state": r,
@@ -1535,19 +1567,19 @@ var Ti = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Li = (e, t, r) => ({
1535
1567
  width: t.rect.width + 4,
1536
1568
  height: t.rect.height + 4
1537
1569
  }
1538
- }), mn = ({ point: e, state: t, origin: r }) => /* @__PURE__ */ n("span", {
1539
- className: xi[t],
1570
+ }), hn = ({ point: e, state: t, origin: r }) => /* @__PURE__ */ n("span", {
1571
+ className: Li[t],
1540
1572
  style: {
1541
1573
  left: r.x + e.x,
1542
1574
  top: r.y + e.y
1543
1575
  }
1544
- }), Ai = "_1uwdwh60", Oi = ({ panelRect: e }) => {
1545
- const t = te((o) => J(o, "move-drag")), r = En(e);
1576
+ }), Oi = "_1uwdwh60", Mi = ({ panelRect: e }) => {
1577
+ const t = ne((o) => ie(o, "move-drag")), r = Mn(e);
1546
1578
  if (t === null) return null;
1547
1579
  const a = ut(t.translation, e);
1548
1580
  return /* @__PURE__ */ n("svg", {
1549
1581
  "aria-hidden": "true",
1550
- className: Ai,
1582
+ className: Oi,
1551
1583
  width: e.width,
1552
1584
  height: e.height,
1553
1585
  style: {
@@ -1556,36 +1588,36 @@ var Ti = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Li = (e, t, r) => ({
1556
1588
  },
1557
1589
  "data-testid": "annotation-ghost",
1558
1590
  "data-annotation-id": t.annotationId,
1559
- children: Ei(r, t.annotationId, e)
1591
+ children: _i(r, t.annotationId, e)
1560
1592
  });
1561
- }, Mi = ({ annotation: e }) => /* @__PURE__ */ n(lr, {
1593
+ }, Ni = ({ annotation: e }) => /* @__PURE__ */ n(sr, {
1562
1594
  annotation: e,
1563
- blockRef: Zt(e.id)
1595
+ blockRef: qt(e.id)
1564
1596
  }), be = (e, t, r) => {
1565
1597
  const a = e.find((o) => o.id === t);
1566
1598
  return a === void 0 ? null : r(a);
1567
- }, Ni = {
1568
- text: (e, t) => be(e.textAnnotations, t, (r) => /* @__PURE__ */ n(Mi, { annotation: r })),
1569
- shape: (e, t) => be(e.shapes, t, (r) => /* @__PURE__ */ n(Xt, { shape: r })),
1570
- image: (e, t) => be(e.images, t, (r) => /* @__PURE__ */ n(er, { image: r })),
1599
+ }, ki = {
1600
+ text: (e, t) => be(e.textAnnotations, t, (r) => /* @__PURE__ */ n(Ni, { annotation: r })),
1601
+ shape: (e, t) => be(e.shapes, t, (r) => /* @__PURE__ */ n(Yt, { shape: r })),
1602
+ image: (e, t) => be(e.images, t, (r) => /* @__PURE__ */ n(nr, { image: r })),
1571
1603
  arrow: (e, t, r) => be(e.arrows, t, (a) => {
1572
- const o = ya({
1604
+ const o = Sa({
1573
1605
  arrow: a,
1574
1606
  panelWidth: r.width,
1575
1607
  panelHeight: r.height
1576
1608
  });
1577
- return o === null ? null : /* @__PURE__ */ n(jt, {
1609
+ return o === null ? null : /* @__PURE__ */ n(Jt, {
1578
1610
  computed: o,
1579
1611
  isAddressable: !1
1580
1612
  });
1581
1613
  })
1582
- }, Ei = (e, t, r) => {
1583
- for (const a of Object.values(Ni)) {
1614
+ }, _i = (e, t, r) => {
1615
+ for (const a of Object.values(ki)) {
1584
1616
  const o = a(e, t, r);
1585
1617
  if (o !== null) return o;
1586
1618
  }
1587
1619
  return null;
1588
- }, ki = (e) => /* @__PURE__ */ n(L, {
1620
+ }, Ei = (e) => /* @__PURE__ */ n(L, {
1589
1621
  ...e,
1590
1622
  children: /* @__PURE__ */ p("g", {
1591
1623
  stroke: "currentColor",
@@ -1594,25 +1626,25 @@ var Ti = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Li = (e, t, r) => ({
1594
1626
  strokeLinejoin: "round",
1595
1627
  children: [/* @__PURE__ */ n("path", { d: "M12 5v14" }), /* @__PURE__ */ n("path", { d: "M5 12h14" })]
1596
1628
  })
1597
- }), _i = "var(--_1tyillx0)", Ri = {
1629
+ }), Ri = "var(--_1tyillx0)", Di = {
1598
1630
  rest: 0.5,
1599
1631
  hovered: 0.75,
1600
1632
  open: 1
1601
1633
  };
1602
- var Di = "_1tyillx1", Hi = {
1634
+ var Hi = "_1tyillx1", Vi = {
1603
1635
  rest: "_1tyillx2",
1604
1636
  hovered: "_1tyillx3",
1605
1637
  open: "_1tyillx4"
1606
- }, Vi = "_1tyillx5", zi = {
1638
+ }, zi = "_1tyillx5", Fi = {
1607
1639
  closed: "_1tyillx6",
1608
1640
  open: "_1tyillx7"
1609
- }, Fi = ({ interaction: e, panelRect: t }) => {
1610
- const r = W(), a = K((c) => c.coordSystem), o = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, i = Bi(e), l = k(() => {
1641
+ }, Gi = ({ interaction: e, panelRect: t }) => {
1642
+ const r = W(), a = K((c) => c.coordSystem), o = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, i = Bi(e), l = _(() => {
1611
1643
  if (o === null) return null;
1612
- const c = Fa(o.position, t, a);
1644
+ const c = Ga(o.position, t, a);
1613
1645
  return {
1614
1646
  center: c,
1615
- radius: 19 * Ri[i],
1647
+ radius: 19 * Di[i],
1616
1648
  target: {
1617
1649
  kind: "observation",
1618
1650
  cursor: Ge(c, t)
@@ -1630,24 +1662,24 @@ var Di = "_1tyillx1", Hi = {
1630
1662
  "aria-hidden": "true",
1631
1663
  "data-testid": "observation-menu-trigger",
1632
1664
  "data-state": i,
1633
- className: se(Di, Hi[i]),
1665
+ className: se(Hi, Vi[i]),
1634
1666
  style: {
1635
1667
  left: t.x + l.center.x,
1636
1668
  top: t.y + l.center.y,
1637
- ...Gn({ [_i]: o.color ?? hr.border50 })
1669
+ ...Gn({ [Ri]: o.color ?? ur.border50 })
1638
1670
  },
1639
1671
  children: /* @__PURE__ */ n("span", {
1640
- className: se(Vi, zi[i === "open" ? "open" : "closed"]),
1641
- children: /* @__PURE__ */ n(ki, { size: "lg" })
1672
+ className: se(zi, Fi[i === "open" ? "open" : "closed"]),
1673
+ children: /* @__PURE__ */ n(Ei, { size: "lg" })
1642
1674
  })
1643
1675
  });
1644
- }, Bi = (e) => e.kind === "menu" ? "open" : e.kind === "trigger" && e.isEngaged ? "hovered" : "rest", Gi = 'button:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])', Ki = (e, t) => {
1676
+ }, Bi = (e) => e.kind === "menu" ? "open" : e.kind === "trigger" && e.isEngaged ? "hovered" : "rest", Ki = 'button:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])', Ui = (e, t) => {
1645
1677
  const { chartId: r } = U(), a = W();
1646
1678
  H(() => {
1647
1679
  if (t === null) return;
1648
1680
  const o = (i) => {
1649
1681
  if (i.key !== "Tab" || i.defaultPrevented || !me(i.target, e, r) || a.getState().standingInteraction?.kind === "chrome-popup") return;
1650
- const l = [...t.querySelectorAll(Gi)];
1682
+ const l = [...t.querySelectorAll(Ki)];
1651
1683
  if (l.length === 0) return;
1652
1684
  i.preventDefault();
1653
1685
  const c = l.findIndex((s) => s === document.activeElement);
@@ -1660,7 +1692,7 @@ var Di = "_1tyillx1", Hi = {
1660
1692
  r,
1661
1693
  a
1662
1694
  ]);
1663
- }, Ui = (e) => {
1695
+ }, Wi = (e) => {
1664
1696
  const { selectionStore: t, chartId: r } = U();
1665
1697
  H(() => {
1666
1698
  let a = null;
@@ -1682,99 +1714,67 @@ var Di = "_1tyillx1", Hi = {
1682
1714
  t,
1683
1715
  r
1684
1716
  ]);
1685
- }, Wi = `[${Nn}]`, mt = (e, t, r) => {
1717
+ }, Zi = `[${On}]`, mt = (e, t, r) => {
1686
1718
  if (typeof document.elementsFromPoint != "function") return null;
1687
1719
  const a = document.elementsFromPoint(e, t);
1688
- return Zi(a, r);
1689
- }, Zi = (e, t) => {
1720
+ return qi(a, r);
1721
+ }, qi = (e, t) => {
1690
1722
  for (const r of e) {
1691
- const a = r.closest(Wi);
1692
- if (!(a === null || !t.contains(a)) && !qi(a, r))
1693
- return $i(a);
1723
+ const a = r.closest(Zi);
1724
+ if (!(a === null || !t.contains(a)) && !$i(a, r))
1725
+ return Xi(a);
1694
1726
  }
1695
1727
  return null;
1696
- }, qi = (e, t) => e === t && e.getAttribute("data-edit-kind") === "observation", $i = (e) => {
1697
- const t = e.getAttribute(Nn);
1728
+ }, $i = (e, t) => e === t && e.getAttribute("data-edit-kind") === "observation", Xi = (e) => {
1729
+ const t = e.getAttribute(On);
1698
1730
  if (t !== "annotation") return null;
1699
- const r = e.getAttribute(Qt);
1731
+ const r = e.getAttribute(er);
1700
1732
  return r === null || r === "" ? null : {
1701
1733
  kind: t,
1702
1734
  id: r
1703
1735
  };
1704
- }, Xi = class {
1705
- constructor(e) {
1706
- this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasPublished = !1, this.handleMove = (t) => {
1707
- t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.scheduledFrame === null && (this.scheduledFrame = requestAnimationFrame(this.runFrame)));
1708
- }, this.handleUp = (t) => {
1709
- t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.finish(!0));
1710
- }, this.handleLost = (t) => {
1711
- t.pointerId === this.params.pointerId && this.finish(!1);
1712
- }, this.runFrame = () => {
1713
- this.scheduledFrame = null;
1714
- const t = this.pendingEvent;
1715
- if (this.pendingEvent = null, t === null) return;
1716
- const { editorStore: r, annotationId: a, press: o, readInputs: i } = this.params, l = r.getState(), c = J(l, "move-drag");
1717
- if (this.hasPublished && Je(c, a) === null) return;
1718
- const s = {
1719
- x: t.clientX,
1720
- y: t.clientY
1721
- };
1722
- if (!this.hasPublished && !Ti(o, s)) return;
1723
- const { annotations: h, panelRect: d } = i(), u = La(h, a);
1724
- if (u === null) return;
1725
- const v = ba(u, Li(o, s, d));
1726
- v !== null && (l.claimInteraction({
1727
- kind: "move-drag",
1728
- annotationId: a,
1729
- translation: v
1730
- }), this.hasPublished = !0);
1731
- };
1736
+ }, Yi = class extends ct {
1737
+ constructor(...e) {
1738
+ super(...e), this.kind = "move-drag";
1732
1739
  }
1733
- start() {
1734
- const { handle: e } = this.params, { signal: t } = this.listeners;
1735
- e.addEventListener("pointermove", this.handleMove, { signal: t }), e.addEventListener("pointerup", this.handleUp, { signal: t }), e.addEventListener("lostpointercapture", this.handleLost, { signal: t });
1740
+ readOwn(e) {
1741
+ return Kt(ie(e, "move-drag"), this.params.annotationId);
1736
1742
  }
1737
- finish(e) {
1738
- this.params.onSettled(), this.listeners.abort(), this.cancelFrame();
1739
- try {
1740
- e && this.runFrame();
1741
- } finally {
1742
- this.settle(e);
1743
- }
1744
- }
1745
- settle(e) {
1746
- this.pendingEvent = null;
1747
- const { editorStore: t, annotationId: r } = this.params, a = t.getState(), o = Je(J(a, "move-drag"), r);
1748
- o !== null && a.releaseInteraction("move-drag"), !(!e || o === null) && this.commit(o.translation);
1743
+ resolvePreview(e) {
1744
+ const { annotationId: t, press: r, readInputs: a } = this.params, { annotations: o, panelRect: i } = a(), l = Pa(o, t);
1745
+ if (l === null) return null;
1746
+ const c = ya(l, Pi(r, e, i));
1747
+ return c === null ? null : {
1748
+ kind: "move-drag",
1749
+ annotationId: t,
1750
+ translation: c
1751
+ };
1749
1752
  }
1750
- commit(e) {
1753
+ commit({ translation: e }) {
1751
1754
  const { annotationId: t, dispatch: r } = this.params;
1752
- Pi(e) && r(new yr({
1755
+ Ii(e) && r(new Sr({
1753
1756
  id: t,
1754
1757
  translation: e
1755
1758
  }));
1756
1759
  }
1757
- cancelFrame() {
1758
- this.scheduledFrame !== null && (cancelAnimationFrame(this.scheduledFrame), this.scheduledFrame = null);
1759
- }
1760
- }, Yi = (e, t, r) => {
1761
- const { commands: a, selectionStore: o } = U(), i = W(), l = ne({
1760
+ }, ji = (e, t, r) => {
1761
+ const { commands: a, selectionStore: o } = U(), i = W(), l = ee({
1762
1762
  annotations: K((h) => h.spec.annotations),
1763
1763
  panelRect: r
1764
- }), c = ne(t), s = pe(null);
1764
+ }), c = ee(t), s = pe(null);
1765
1765
  H(() => () => s.current?.finish(!1), []), H(() => {
1766
1766
  const h = (v) => {
1767
1767
  const { editTargetUnderPointer: m, standingInteraction: g } = i.getState();
1768
- return m !== null && g === null && v.pointerType === "mouse" && ji(v.target, e) ? m : mt(v.clientX, v.clientY, e);
1768
+ return m !== null && g === null && v.pointerType === "mouse" && Ji(v.target, e) ? m : mt(v.clientX, v.clientY, e);
1769
1769
  }, d = (v, m) => {
1770
- if (s.current !== null || !ar(l.current.annotations, m.id)) return;
1770
+ if (s.current !== null || !or(l.current.annotations, m.id)) return;
1771
1771
  try {
1772
1772
  e.setPointerCapture(v.pointerId);
1773
1773
  } catch {
1774
1774
  return;
1775
1775
  }
1776
1776
  v.preventDefault();
1777
- const g = new Xi({
1777
+ const g = new Yi({
1778
1778
  handle: e,
1779
1779
  pointerId: v.pointerId,
1780
1780
  annotationId: m.id,
@@ -1791,7 +1791,7 @@ var Di = "_1tyillx1", Hi = {
1791
1791
  });
1792
1792
  s.current = g, g.start();
1793
1793
  }, u = (v) => {
1794
- if (v.button !== 0 || qn(v.target) || $n(v, c.current, i.getState().menuTrigger)) return;
1794
+ if (v.button !== 0 || Zn(v.target) || qn(v, c.current, i.getState().menuTrigger)) return;
1795
1795
  const m = h(v), g = o.getState();
1796
1796
  if (m === null) {
1797
1797
  g.clearSelection();
@@ -1808,10 +1808,10 @@ var Di = "_1tyillx1", Hi = {
1808
1808
  l,
1809
1809
  c
1810
1810
  ]);
1811
- }, ji = (e, t) => e instanceof Node && t.contains(e), Ji = (e) => {
1811
+ }, Ji = (e, t) => e instanceof Node && t.contains(e), Qi = (e) => {
1812
1812
  const { selectionStore: t, commands: r, chartId: a } = U(), o = W(), i = ye((c) => {
1813
- const { selection: s } = t.getState(), h = it(s);
1814
- h !== null && (c.preventDefault(), r.dispatch(new Be({ id: h })), e.focus({ preventScroll: !0 }));
1813
+ const { selection: s } = t.getState(), h = ot(s);
1814
+ h !== null && (c.preventDefault(), r.dispatch(new Fe({ id: h })), e.focus({ preventScroll: !0 }));
1815
1815
  }, [
1816
1816
  e,
1817
1817
  r,
@@ -1819,8 +1819,8 @@ var Di = "_1tyillx1", Hi = {
1819
1819
  ]), l = ye((c) => {
1820
1820
  const s = o.getState();
1821
1821
  switch (s.standingInteraction?.kind) {
1822
- case "endpoint-drag":
1823
- s.releaseInteraction("endpoint-drag");
1822
+ case "difference-arrow-endpoint-drag":
1823
+ s.releaseInteraction("difference-arrow-endpoint-drag");
1824
1824
  return;
1825
1825
  case "move-drag":
1826
1826
  s.releaseInteraction("move-drag");
@@ -1831,7 +1831,7 @@ var Di = "_1tyillx1", Hi = {
1831
1831
  s.releaseInteraction("menu");
1832
1832
  return;
1833
1833
  default:
1834
- if (Zn(c.target, a)) {
1834
+ if (Wn(c.target, a)) {
1835
1835
  e.focus({ preventScroll: !0 });
1836
1836
  return;
1837
1837
  }
@@ -1846,7 +1846,7 @@ var Di = "_1tyillx1", Hi = {
1846
1846
  ]);
1847
1847
  H(() => {
1848
1848
  const c = (s) => {
1849
- if (me(s.target, e, a) && !Qi(s.target) && !Xa(s.target))
1849
+ if (me(s.target, e, a) && !el(s.target) && !Ya(s.target))
1850
1850
  switch (s.key) {
1851
1851
  case "Escape":
1852
1852
  return l(s);
@@ -1864,12 +1864,12 @@ var Di = "_1tyillx1", Hi = {
1864
1864
  l,
1865
1865
  a
1866
1866
  ]);
1867
- }, Qi = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), el = () => {
1868
- const e = Wt((o) => o.hover.primary), { layers: t, coordSystem: r } = K(Ke((o) => ({
1867
+ }, el = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), nl = () => {
1868
+ const e = Zt((o) => o.hover.primary), { layers: t, coordSystem: r } = K(Be((o) => ({
1869
1869
  layers: o.layers,
1870
1870
  coordSystem: o.coordSystem
1871
1871
  }))), { anchorResolver: a } = U();
1872
- return k(() => {
1872
+ return _(() => {
1873
1873
  if (e === null) return null;
1874
1874
  const o = t.find((c) => c.id === e.layerId);
1875
1875
  if (o === void 0) return null;
@@ -1879,10 +1879,10 @@ var Di = "_1tyillx1", Hi = {
1879
1879
  purpose: "pin"
1880
1880
  });
1881
1881
  if (i === null) return null;
1882
- const l = ga(o, e.observation);
1882
+ const l = va(o, e.observation);
1883
1883
  return l === null ? null : {
1884
1884
  position: i,
1885
- color: _a(e.observation),
1885
+ color: Ra(e.observation),
1886
1886
  layer: o,
1887
1887
  at: l,
1888
1888
  observation: e.observation
@@ -1893,9 +1893,9 @@ var Di = "_1tyillx1", Hi = {
1893
1893
  r,
1894
1894
  a
1895
1895
  ]);
1896
- }, nl = { kind: "idle" }, pt = () => {
1897
- const e = te((a) => a.standingInteraction), t = te((a) => a.chromeUnderPointer), r = el();
1898
- return k(() => e !== null ? e : r === null ? nl : {
1896
+ }, tl = { kind: "idle" }, pt = () => {
1897
+ const e = ne((a) => a.standingInteraction), t = ne((a) => a.chromeUnderPointer), r = nl();
1898
+ return _(() => e !== null ? e : r === null ? tl : {
1899
1899
  kind: "trigger",
1900
1900
  anchor: r,
1901
1901
  isEngaged: t === "menu-trigger"
@@ -1904,25 +1904,25 @@ var Di = "_1tyillx1", Hi = {
1904
1904
  r,
1905
1905
  t
1906
1906
  ]);
1907
- }, tl = (e, t, r) => {
1908
- const a = W(), { selectionStore: o } = U(), { store: i, engine: l } = Fe(), c = ne(e), s = ne(t), h = ne(r);
1907
+ }, rl = (e, t, r) => {
1908
+ const a = W(), { selectionStore: o } = U(), { store: i, engine: l } = ze(), c = ee(e), s = ee(t), h = ee(r);
1909
1909
  H(() => {
1910
- const d = (C) => $n(C, s.current, a.getState().menuTrigger), u = (C) => {
1911
- if (d(C) || o.getState().selection.length > 0) return;
1910
+ const d = (f) => qn(f, s.current, a.getState().menuTrigger), u = (f) => {
1911
+ if (d(f) || o.getState().selection.length > 0) return;
1912
1912
  const P = h.current, w = s.current, b = {
1913
- x: C.clientX - w.x,
1914
- y: C.clientY - w.y
1915
- }, T = rl(b, P) ? l.query(Ge(b, P)) : Rn;
1913
+ x: f.clientX - w.x,
1914
+ y: f.clientY - w.y
1915
+ }, T = al(b, P) ? l.query(Ge(b, P)) : En;
1916
1916
  i.getState().setHoverState(T);
1917
1917
  };
1918
1918
  let v = !1;
1919
1919
  const m = () => {
1920
1920
  v = c.current.kind === "menu";
1921
- }, g = (C) => {
1922
- if (qn(C.target)) return;
1921
+ }, g = (f) => {
1922
+ if (Zn(f.target)) return;
1923
1923
  const { claimInteraction: P, releaseInteraction: w } = a.getState();
1924
- if (!d(C) || v) {
1925
- w("menu"), v && u(C);
1924
+ if (!d(f) || v) {
1925
+ w("menu"), v && u(f);
1926
1926
  return;
1927
1927
  }
1928
1928
  const b = c.current;
@@ -1943,24 +1943,24 @@ var Di = "_1tyillx1", Hi = {
1943
1943
  s,
1944
1944
  h
1945
1945
  ]);
1946
- }, rl = (e, t) => e.x >= 0 && e.x <= t.width && e.y >= 0 && e.y <= t.height, al = (e, t) => {
1947
- const r = W(), a = ne(t);
1946
+ }, al = (e, t) => e.x >= 0 && e.x <= t.width && e.y >= 0 && e.y <= t.height, ol = (e, t) => {
1947
+ const r = W(), a = ee(t);
1948
1948
  H(() => {
1949
1949
  let o = null, i = null;
1950
1950
  const l = (m) => {
1951
1951
  const { menuTrigger: g } = r.getState();
1952
- return g === null ? null : Bn(m, g) ? "menu-trigger" : null;
1952
+ return g === null ? null : Fn(m, g) ? "menu-trigger" : null;
1953
1953
  }, c = () => {
1954
1954
  o = null;
1955
1955
  const m = i;
1956
1956
  if (m === null) return;
1957
- const g = a.current, C = r.getState();
1958
- if (C.setChromeUnderPointer(l({
1957
+ const g = a.current, f = r.getState();
1958
+ if (f.setChromeUnderPointer(l({
1959
1959
  x: m.x - g.x,
1960
1960
  y: m.y - g.y
1961
- })), Me(C.standingInteraction)) return;
1961
+ })), Me(f.standingInteraction)) return;
1962
1962
  const P = mt(m.x, m.y, e);
1963
- C.setEditTargetUnderPointer(P);
1963
+ f.setEditTargetUnderPointer(P);
1964
1964
  }, s = () => {
1965
1965
  o === null && (o = requestAnimationFrame(c));
1966
1966
  }, h = () => {
@@ -1984,26 +1984,26 @@ var Di = "_1tyillx1", Hi = {
1984
1984
  r,
1985
1985
  a
1986
1986
  ]);
1987
- }, Me = (e) => e?.kind === "menu" || e?.kind === "move-drag", pn = "editor", gn = [], ol = (e, t, r, a) => {
1988
- const o = pt(), { store: i } = Fe(), l = kn().length > 0, c = te((d) => d.menuTrigger), s = o.kind === "menu", h = k(() => c === null ? gn : [ma(c)], [c]);
1989
- al(e, t), Yi(e, t, r), tl(o, t, r), Ui(e), Ji(e), Ki(e, a), H(() => (i.getState().publishPointerRegions(pn, h), () => i.getState().publishPointerRegions(pn, gn)), [i, h]), H(() => (i.getState().setPointerSuspended(s || l), () => i.getState().setPointerSuspended(!1)), [
1987
+ }, Me = (e) => e?.kind === "menu" || e?.kind === "move-drag", un = "editor", mn = [], il = (e, t, r, a) => {
1988
+ const o = pt(), { store: i } = ze(), l = kn().length > 0, c = ne((d) => d.menuTrigger), s = o.kind === "menu", h = _(() => c === null ? mn : [pa(c)], [c]);
1989
+ ol(e, t), ji(e, t, r), rl(o, t, r), Wi(e), Qi(e), Ui(e, a), H(() => (i.getState().publishPointerRegions(un, h), () => i.getState().publishPointerRegions(un, mn)), [i, h]), H(() => (i.getState().setPointerSuspended(s || l), () => i.getState().setPointerSuspended(!1)), [
1990
1990
  i,
1991
1991
  s,
1992
1992
  l
1993
1993
  ]), H(() => {
1994
1994
  if (!l) return;
1995
1995
  const d = i.getState();
1996
- d.setHoverState(Rn), d.setTooltipAnchor(null);
1996
+ d.setHoverState(En), d.setTooltipAnchor(null);
1997
1997
  }, [i, l]);
1998
- }, il = ({ frameElement: e, panelRect: t }) => {
1999
- const { measureRef: r, screenRect: a } = Ut(), o = W();
2000
- return H(() => (r(e), () => r(null)), [r, e]), H(() => () => o.getState().releaseInteraction("menu"), [o]), a === null ? null : /* @__PURE__ */ n(ja, { children: /* @__PURE__ */ n(ll, {
1998
+ }, ll = ({ frameElement: e, panelRect: t }) => {
1999
+ const { measureRef: r, screenRect: a } = Wt(), o = W();
2000
+ return H(() => (r(e), () => r(null)), [r, e]), H(() => () => o.getState().releaseInteraction("menu"), [o]), a === null ? null : /* @__PURE__ */ n(Ja, { children: /* @__PURE__ */ n(sl, {
2001
2001
  frameElement: e,
2002
2002
  frameRect: a,
2003
2003
  panelRect: t
2004
2004
  }) });
2005
- }, ll = ({ frameElement: e, frameRect: t, panelRect: r }) => {
2006
- const a = k(() => ({
2005
+ }, sl = ({ frameElement: e, frameRect: t, panelRect: r }) => {
2006
+ const a = _(() => ({
2007
2007
  x: t.left + r.x,
2008
2008
  y: t.top + r.y
2009
2009
  }), [
@@ -2012,48 +2012,48 @@ var Di = "_1tyillx1", Hi = {
2012
2012
  r.x,
2013
2013
  r.y
2014
2014
  ]), [o, i] = q(null);
2015
- return ol(e, a, r, o), /* @__PURE__ */ n(sl, {
2015
+ return il(e, a, r, o), /* @__PURE__ */ n(cl, {
2016
2016
  frameElement: e,
2017
2017
  frameRect: t,
2018
2018
  panelOrigin: a,
2019
2019
  panelRect: r,
2020
2020
  boxRef: i
2021
2021
  });
2022
- }, sl = ({ frameElement: e, frameRect: t, panelOrigin: r, panelRect: a, boxRef: o }) => {
2023
- const i = Ue(), l = pt();
2024
- return /* @__PURE__ */ n(or, {
2022
+ }, cl = ({ frameElement: e, frameRect: t, panelOrigin: r, panelRect: a, boxRef: o }) => {
2023
+ const i = Ke(), l = pt();
2024
+ return /* @__PURE__ */ n(ir, {
2025
2025
  rect: t,
2026
- zIndex: nr.editorOverlay,
2026
+ zIndex: tr.editorOverlay,
2027
2027
  container: i,
2028
2028
  "data-testid": "editor-overlay",
2029
2029
  boxRef: o,
2030
2030
  children: /* @__PURE__ */ p(ge, { children: [
2031
- /* @__PURE__ */ n(bi, {
2031
+ /* @__PURE__ */ n(Si, {
2032
2032
  panelRect: a,
2033
2033
  panelOrigin: r,
2034
2034
  frameRect: t,
2035
2035
  frameElement: e
2036
2036
  }),
2037
- /* @__PURE__ */ n(Oi, { panelRect: a }),
2038
- /* @__PURE__ */ n(Ii, { panelRect: a }),
2039
- /* @__PURE__ */ n(Fi, {
2037
+ /* @__PURE__ */ n(Mi, { panelRect: a }),
2038
+ /* @__PURE__ */ n(Ai, { panelRect: a }),
2039
+ /* @__PURE__ */ n(Gi, {
2040
2040
  interaction: l,
2041
2041
  panelRect: a
2042
2042
  }),
2043
- /* @__PURE__ */ n(Do, {
2043
+ /* @__PURE__ */ n(Ho, {
2044
2044
  interaction: l,
2045
2045
  panelOrigin: r
2046
2046
  })
2047
2047
  ] })
2048
2048
  });
2049
- }, c1 = ({ slots: e, ...t }) => /* @__PURE__ */ n(qt, { children: /* @__PURE__ */ n(Jt, {
2050
- slots: k(() => ({
2051
- EditorSurface: il,
2049
+ }, d1 = ({ slots: e, ...t }) => /* @__PURE__ */ n($t, { children: /* @__PURE__ */ n(Qt, {
2050
+ slots: _(() => ({
2051
+ EditorSurface: ll,
2052
2052
  ...e
2053
2053
  }), [e]),
2054
2054
  ...t
2055
2055
  }) }), gt = ve(null), vt = ({ labelId: e, controlId: t, children: r }) => {
2056
- const a = k(() => {
2056
+ const a = _(() => {
2057
2057
  let o = null;
2058
2058
  return {
2059
2059
  labelId: e,
@@ -2065,7 +2065,7 @@ var Di = "_1tyillx1", Hi = {
2065
2065
  value: a,
2066
2066
  children: r
2067
2067
  });
2068
- }, Q = ({ id: e, ariaLabel: t, ariaLabelledBy: r }, a = !0) => {
2068
+ }, J = ({ id: e, ariaLabel: t, ariaLabelledBy: r }, a = !0) => {
2069
2069
  const o = ce(gt), i = le(), [l] = q(() => a ? o?.claimControlId(i) ?? !1 : !1), c = e ?? (l ? o?.controlId : void 0), s = r ?? (t === void 0 ? o?.labelId : void 0);
2070
2070
  return {
2071
2071
  ...c !== void 0 && { id: c },
@@ -2073,18 +2073,18 @@ var Di = "_1tyillx1", Hi = {
2073
2073
  ...s !== void 0 && { "aria-labelledby": s }
2074
2074
  };
2075
2075
  };
2076
- var cl = {
2076
+ var dl = {
2077
2077
  default: "woi4bh4 woi4bh3",
2078
2078
  tile: "woi4bh5 woi4bh3"
2079
- }, dl = ({ label: e, icon: t, onClick: r, variant: a = "default", isDisabled: o, ariaLabel: i, ariaLabelledBy: l, id: c }) => {
2080
- const s = Q({
2079
+ }, hl = ({ label: e, icon: t, onClick: r, variant: a = "default", isDisabled: o, ariaLabel: i, ariaLabelledBy: l, id: c }) => {
2080
+ const s = J({
2081
2081
  id: c,
2082
2082
  ariaLabel: i,
2083
2083
  ariaLabelledBy: l
2084
2084
  }), h = a === "tile";
2085
2085
  return /* @__PURE__ */ p("button", {
2086
2086
  type: "button",
2087
- className: cl[a],
2087
+ className: dl[a],
2088
2088
  disabled: o,
2089
2089
  onClick: r,
2090
2090
  ...s,
@@ -2096,22 +2096,22 @@ var cl = {
2096
2096
  children: e
2097
2097
  })]
2098
2098
  });
2099
- }, Ze = ve(null), O = () => {
2100
- const e = ce(Ze);
2099
+ }, We = ve(null), O = () => {
2100
+ const e = ce(We);
2101
2101
  if (!e) throw new Error("An editing section must sit inside an <EditorPanel.Root> bound to a graph — pass it a `handle`, or render the panel inside a <GraphProvider>.");
2102
2102
  return e;
2103
- }, Ct = ({ children: e, onKeyDown: t, ...r }) => {
2104
- const a = ce(Ze);
2103
+ }, ft = ({ children: e, onKeyDown: t, ...r }) => {
2104
+ const a = ce(We);
2105
2105
  return /* @__PURE__ */ n("div", {
2106
2106
  onKeyDown: (i) => {
2107
2107
  if (t?.(i), !a || i.defaultPrevented) return;
2108
- const l = sr(i.nativeEvent);
2108
+ const l = cr(i.nativeEvent);
2109
2109
  l && (i.preventDefault(), l === "undo" ? a.undo() : a.redo());
2110
2110
  },
2111
2111
  ...r,
2112
2112
  children: e
2113
2113
  });
2114
- }, ft = "keyboard", Le = (e) => {
2114
+ }, Ct = "keyboard", Le = (e) => {
2115
2115
  const t = pe(!1), r = pe(!1), a = () => {
2116
2116
  t.current = !1, r.current && (r.current = !1, e?.());
2117
2117
  };
@@ -2140,26 +2140,26 @@ var cl = {
2140
2140
  }
2141
2141
  }
2142
2142
  };
2143
- }, hl = "eh8dvc0", ul = "eh8dvc1 uz3g760", ml = "eh8dvc2 uz3g761";
2144
- var pl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, placeholder: l, prefix: c, suffix: s, isDisabled: h, hasError: d, ariaLabel: u, ariaLabelledBy: v, id: m }) => {
2145
- const g = Q({
2143
+ }, ul = "eh8dvc0", ml = "eh8dvc1 uz3g760", pl = "eh8dvc2 uz3g761";
2144
+ var gl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, placeholder: l, prefix: c, suffix: s, isDisabled: h, hasError: d, ariaLabel: u, ariaLabelledBy: v, id: m }) => {
2145
+ const g = J({
2146
2146
  id: m,
2147
2147
  ariaLabel: u,
2148
2148
  ariaLabelledBy: v
2149
- }), { commitUnlessHeldKey: C, gestureHandlers: P } = Le(r);
2150
- return /* @__PURE__ */ n(an.Root, {
2151
- className: hl,
2149
+ }), { commitUnlessHeldKey: f, gestureHandlers: P } = Le(r);
2150
+ return /* @__PURE__ */ n(tn.Root, {
2151
+ className: ul,
2152
2152
  value: e,
2153
2153
  onValueChange: (w) => t(w),
2154
2154
  onValueCommitted: (w, b) => {
2155
- C(b.reason === ft);
2155
+ f(b.reason === Ct);
2156
2156
  },
2157
2157
  min: a,
2158
2158
  max: o,
2159
2159
  step: i,
2160
2160
  disabled: h,
2161
- children: /* @__PURE__ */ p(Ct, {
2162
- className: ul,
2161
+ children: /* @__PURE__ */ p(ft, {
2162
+ className: ml,
2163
2163
  "data-error": d === !0,
2164
2164
  "data-disabled": h === !0 ? "" : void 0,
2165
2165
  children: [
@@ -2167,8 +2167,8 @@ var pl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, placeho
2167
2167
  className: "eh8dvc3",
2168
2168
  children: c
2169
2169
  }),
2170
- /* @__PURE__ */ n(an.Input, {
2171
- className: ml,
2170
+ /* @__PURE__ */ n(tn.Input, {
2171
+ className: pl,
2172
2172
  placeholder: l,
2173
2173
  ...P,
2174
2174
  "aria-invalid": d === !0 ? !0 : void 0,
@@ -2181,22 +2181,22 @@ var pl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, placeho
2181
2181
  ]
2182
2182
  })
2183
2183
  });
2184
- }, gl = "_1b7s5f0", ie = {
2184
+ }, vl = "_1b7s5f0", oe = {
2185
2185
  1: "_1b7s5f1",
2186
2186
  2: "_1b7s5f2",
2187
2187
  3: "_1b7s5f3",
2188
2188
  4: "_1b7s5f4",
2189
2189
  5: "_1b7s5f5",
2190
2190
  6: "_1b7s5f6"
2191
- }, vl = "_1b7s5f7";
2192
- var Cl = 6, fl = ({ options: e, value: t, onChange: r, onCommit: a, columns: o, itemLayout: i = "tile", isDisabled: l, ariaLabel: c, ariaLabelledBy: s, id: h }) => {
2193
- const d = Q({
2191
+ }, fl = "_1b7s5f7";
2192
+ var Cl = 6, bl = ({ options: e, value: t, onChange: r, onCommit: a, columns: o, itemLayout: i = "tile", isDisabled: l, ariaLabel: c, ariaLabelledBy: s, id: h }) => {
2193
+ const d = J({
2194
2194
  id: h,
2195
2195
  ariaLabel: c,
2196
2196
  ariaLabelledBy: s
2197
2197
  }), u = i === "swatch", { commitAfterChange: v, gestureHandlers: m } = Le(a);
2198
- return /* @__PURE__ */ n(Un, {
2199
- className: se(gl, bl(o ?? e.length)),
2198
+ return /* @__PURE__ */ n(Kn, {
2199
+ className: se(vl, yl(o ?? e.length)),
2200
2200
  value: t,
2201
2201
  onValueChange: (g) => {
2202
2202
  r(g), v();
@@ -2204,10 +2204,10 @@ var Cl = 6, fl = ({ options: e, value: t, onChange: r, onCommit: a, columns: o,
2204
2204
  ...m,
2205
2205
  disabled: l,
2206
2206
  ...d,
2207
- children: e.map((g) => /* @__PURE__ */ p(Kn.Root, {
2207
+ children: e.map((g) => /* @__PURE__ */ p(Bn.Root, {
2208
2208
  value: g.value,
2209
2209
  disabled: g.isDisabled,
2210
- className: se(vl, u && "_1b7s5f8"),
2210
+ className: se(fl, u && "_1b7s5f8"),
2211
2211
  "aria-label": u ? g.label : void 0,
2212
2212
  children: [g.icon, !u && /* @__PURE__ */ n("span", {
2213
2213
  className: "_1b7s5f9",
@@ -2215,24 +2215,24 @@ var Cl = 6, fl = ({ options: e, value: t, onChange: r, onCommit: a, columns: o,
2215
2215
  })]
2216
2216
  }, g.value))
2217
2217
  });
2218
- }, bl = (e) => {
2218
+ }, yl = (e) => {
2219
2219
  switch (Math.min(Math.max(Math.round(e), 1), Cl)) {
2220
2220
  case 1:
2221
- return ie[1];
2221
+ return oe[1];
2222
2222
  case 2:
2223
- return ie[2];
2223
+ return oe[2];
2224
2224
  case 3:
2225
- return ie[3];
2225
+ return oe[3];
2226
2226
  case 4:
2227
- return ie[4];
2227
+ return oe[4];
2228
2228
  case 5:
2229
- return ie[5];
2229
+ return oe[5];
2230
2230
  default:
2231
- return ie[6];
2231
+ return oe[6];
2232
2232
  }
2233
- }, yl = "_1g5x15w0 uz3g760", Sl = "_1g5x15w1", wl = "_1g5x15w2", vn = "_1g5x15w3", xl = "_1g5x15w4", Tl = "_1g5x15w5", Ll = "_1g5x15w6", Pl = "_1g5x15w7";
2234
- var Il = ({ options: e, value: t, onChange: r, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2235
- const h = Q({
2233
+ }, Sl = "_1g5x15w0 uz3g760", wl = "_1g5x15w1", xl = "_1g5x15w2", pn = "_1g5x15w3", Tl = "_1g5x15w4", Ll = "_1g5x15w5", Pl = "_1g5x15w6", Il = "_1g5x15w7";
2234
+ var Al = ({ options: e, value: t, onChange: r, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2235
+ const h = J({
2236
2236
  id: s,
2237
2237
  ariaLabel: l,
2238
2238
  ariaLabelledBy: c
@@ -2246,40 +2246,40 @@ var Il = ({ options: e, value: t, onChange: r, placeholder: a, isDisabled: o, ha
2246
2246
  label: d.label
2247
2247
  })),
2248
2248
  children: [/* @__PURE__ */ p(Z.Trigger, {
2249
- className: yl,
2249
+ className: Sl,
2250
2250
  "data-error": i === !0,
2251
2251
  ...h,
2252
2252
  children: [/* @__PURE__ */ n(Z.Value, {
2253
- className: Sl,
2254
- children: (d) => Al(e, d, a)
2253
+ className: wl,
2254
+ children: (d) => Ol(e, d, a)
2255
2255
  }), /* @__PURE__ */ n(Z.Icon, {
2256
- className: vn,
2256
+ className: pn,
2257
2257
  children: /* @__PURE__ */ n(xe, { size: "sm" })
2258
2258
  })]
2259
2259
  }), /* @__PURE__ */ n(Z.Portal, {
2260
- container: ze(),
2260
+ container: Ve(),
2261
2261
  children: /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(Z.Positioner, {
2262
- className: xl,
2262
+ className: Tl,
2263
2263
  sideOffset: 4,
2264
2264
  alignItemWithTrigger: !1,
2265
2265
  children: /* @__PURE__ */ n(Z.Popup, {
2266
- className: Tl,
2266
+ className: Ll,
2267
2267
  children: e.map((d) => /* @__PURE__ */ p(Z.Item, {
2268
2268
  value: d.value,
2269
2269
  disabled: d.isDisabled,
2270
- className: Ll,
2270
+ className: Pl,
2271
2271
  children: [
2272
2272
  d.icon,
2273
2273
  /* @__PURE__ */ p("span", {
2274
- className: Pl,
2274
+ className: Il,
2275
2275
  children: [/* @__PURE__ */ n(Z.ItemText, { children: d.label }), d.description !== void 0 && /* @__PURE__ */ n("span", {
2276
2276
  className: "_1g5x15w8",
2277
2277
  children: d.description
2278
2278
  })]
2279
2279
  }),
2280
2280
  /* @__PURE__ */ n(Z.ItemIndicator, {
2281
- className: vn,
2282
- children: /* @__PURE__ */ n($t, { size: "sm" })
2281
+ className: pn,
2282
+ children: /* @__PURE__ */ n(Xt, { size: "sm" })
2283
2283
  })
2284
2284
  ]
2285
2285
  }, d.value))
@@ -2287,34 +2287,34 @@ var Il = ({ options: e, value: t, onChange: r, placeholder: a, isDisabled: o, ha
2287
2287
  }) })
2288
2288
  })]
2289
2289
  });
2290
- }, Al = (e, t, r) => t === null ? /* @__PURE__ */ n("span", {
2291
- className: wl,
2290
+ }, Ol = (e, t, r) => t === null ? /* @__PURE__ */ n("span", {
2291
+ className: xl,
2292
2292
  children: r
2293
- }) : Ol(e, t), Ol = (e, t) => e.find((r) => r.value === t)?.label ?? t, Ml = "vod76w0", Nl = "vod76w1", El = "vod76w2", kl = "vod76w3", _l = "vod76w4", Rl = "vod76w5";
2294
- var Dl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, suffix: l, formatValue: c, isDisabled: s, ariaLabel: h, ariaLabelledBy: d }) => {
2295
- const u = Q({
2293
+ }) : Ml(e, t), Ml = (e, t) => e.find((r) => r.value === t)?.label ?? t, Nl = "vod76w0", kl = "vod76w1", _l = "vod76w2", El = "vod76w3", Rl = "vod76w4", Dl = "vod76w5";
2294
+ var Hl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, suffix: l, formatValue: c, isDisabled: s, ariaLabel: h, ariaLabelledBy: d }) => {
2295
+ const u = J({
2296
2296
  ariaLabel: h,
2297
2297
  ariaLabelledBy: d
2298
- }, !1), v = Hl(e, l, c), { commitUnlessHeldKey: m, gestureHandlers: g } = Le(r);
2298
+ }, !1), v = Vl(e, l, c), { commitUnlessHeldKey: m, gestureHandlers: g } = Le(r);
2299
2299
  return /* @__PURE__ */ p("div", {
2300
- className: Ml,
2300
+ className: Nl,
2301
2301
  children: [/* @__PURE__ */ n(de.Root, {
2302
- className: Nl,
2302
+ className: kl,
2303
2303
  value: e,
2304
- onValueChange: (C) => t(C),
2305
- onValueCommitted: (C, P) => {
2306
- m(P.reason === ft);
2304
+ onValueChange: (f) => t(f),
2305
+ onValueCommitted: (f, P) => {
2306
+ m(P.reason === Ct);
2307
2307
  },
2308
2308
  min: a,
2309
2309
  max: o,
2310
2310
  step: i,
2311
2311
  disabled: s,
2312
2312
  children: /* @__PURE__ */ n(de.Control, {
2313
- className: El,
2313
+ className: _l,
2314
2314
  children: /* @__PURE__ */ p(de.Track, {
2315
- className: kl,
2316
- children: [/* @__PURE__ */ n(de.Indicator, { className: _l }), /* @__PURE__ */ n(de.Thumb, {
2317
- className: Rl,
2315
+ className: El,
2316
+ children: [/* @__PURE__ */ n(de.Indicator, { className: Rl }), /* @__PURE__ */ n(de.Thumb, {
2317
+ className: Dl,
2318
2318
  ...g,
2319
2319
  ...u
2320
2320
  })]
@@ -2325,30 +2325,30 @@ var Dl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, suffix:
2325
2325
  children: v
2326
2326
  })]
2327
2327
  });
2328
- }, Hl = (e, t, r) => r !== void 0 ? r(e) : t !== void 0 ? `${e}${t}` : null, Vl = "_1hyrlw60", zl = "_1hyrlw61", Fl = ({ isChecked: e, onChange: t, isDisabled: r, ariaLabel: a, ariaLabelledBy: o, id: i }) => {
2329
- const l = Q({
2328
+ }, Vl = (e, t, r) => r !== void 0 ? r(e) : t !== void 0 ? `${e}${t}` : null, zl = "_1hyrlw60", Fl = "_1hyrlw61", Gl = ({ isChecked: e, onChange: t, isDisabled: r, ariaLabel: a, ariaLabelledBy: o, id: i }) => {
2329
+ const l = J({
2330
2330
  id: i,
2331
2331
  ariaLabel: a,
2332
2332
  ariaLabelledBy: o
2333
2333
  });
2334
- return /* @__PURE__ */ n(on.Root, {
2334
+ return /* @__PURE__ */ n(rn.Root, {
2335
2335
  checked: e,
2336
2336
  onCheckedChange: (c) => t(c),
2337
2337
  disabled: r,
2338
- className: Vl,
2338
+ className: zl,
2339
2339
  ...l,
2340
- children: /* @__PURE__ */ n(on.Thumb, { className: zl })
2340
+ children: /* @__PURE__ */ n(rn.Thumb, { className: Fl })
2341
2341
  });
2342
- }, Bl = "uz3g761", Gl = "tpcnun0 uz3g760", Kl = ({ value: e, onChange: t, onCommit: r, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2343
- const h = Q({
2342
+ }, Bl = "uz3g761", Kl = "tpcnun0 uz3g760", Ul = ({ value: e, onChange: t, onCommit: r, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2343
+ const h = J({
2344
2344
  id: s,
2345
2345
  ariaLabel: l,
2346
2346
  ariaLabelledBy: c
2347
2347
  });
2348
- return /* @__PURE__ */ n(Ct, {
2349
- className: Gl,
2348
+ return /* @__PURE__ */ n(ft, {
2349
+ className: Kl,
2350
2350
  "data-error": i === !0,
2351
- children: /* @__PURE__ */ n(Za, {
2351
+ children: /* @__PURE__ */ n(qa, {
2352
2352
  className: Bl,
2353
2353
  value: e,
2354
2354
  onValueChange: (d) => t(d),
@@ -2359,15 +2359,15 @@ var Dl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, suffix:
2359
2359
  ...h
2360
2360
  })
2361
2361
  });
2362
- }, Ul = "cnu9yl0", Wl = "cnu9yl1";
2363
- var Zl = ({ options: e, value: t, onChange: r, onCommit: a, itemLayout: o = "inline", isDisabled: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2364
- const h = Q({
2362
+ }, Wl = "cnu9yl0", Zl = "cnu9yl1";
2363
+ var ql = ({ options: e, value: t, onChange: r, onCommit: a, itemLayout: o = "inline", isDisabled: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2364
+ const h = J({
2365
2365
  id: s,
2366
2366
  ariaLabel: l,
2367
2367
  ariaLabelledBy: c
2368
2368
  }), d = o === "stacked", { commitAfterChange: u, gestureHandlers: v } = Le(a);
2369
- return /* @__PURE__ */ n(Un, {
2370
- className: Ul,
2369
+ return /* @__PURE__ */ n(Kn, {
2370
+ className: Wl,
2371
2371
  value: t,
2372
2372
  onValueChange: (m) => {
2373
2373
  r(m), u();
@@ -2375,31 +2375,31 @@ var Zl = ({ options: e, value: t, onChange: r, onCommit: a, itemLayout: o = "inl
2375
2375
  ...v,
2376
2376
  disabled: i,
2377
2377
  ...h,
2378
- children: e.map((m) => /* @__PURE__ */ p(Kn.Root, {
2378
+ children: e.map((m) => /* @__PURE__ */ p(Bn.Root, {
2379
2379
  value: m.value,
2380
2380
  disabled: m.isDisabled,
2381
- className: se(Wl, d && "cnu9yl2"),
2382
- "aria-label": ql(m, d),
2381
+ className: se(Zl, d && "cnu9yl2"),
2382
+ "aria-label": $l(m, d),
2383
2383
  children: [m.icon, bt(m, d) && /* @__PURE__ */ n("span", {
2384
2384
  className: "cnu9yl3",
2385
2385
  children: m.label
2386
2386
  })]
2387
2387
  }, m.value))
2388
2388
  });
2389
- }, bt = (e, t) => e.icon === void 0 || t, ql = (e, t) => {
2389
+ }, bt = (e, t) => e.icon === void 0 || t, $l = (e, t) => {
2390
2390
  if (!bt(e, t))
2391
2391
  return e.label;
2392
2392
  }, yt = {
2393
- ToggleGroup: Zl,
2394
- Switch: Fl,
2395
- Slider: Dl,
2396
- RadioGrid: fl,
2397
- Button: dl,
2398
- TextField: Kl,
2399
- NumberField: pl,
2400
- Select: Il
2401
- }, St = ve(yt), $l = ({ controls: e, children: t }) => {
2402
- const r = k(() => ({
2393
+ ToggleGroup: ql,
2394
+ Switch: Gl,
2395
+ Slider: Hl,
2396
+ RadioGrid: bl,
2397
+ Button: hl,
2398
+ TextField: Ul,
2399
+ NumberField: gl,
2400
+ Select: Al
2401
+ }, St = ve(yt), Xl = ({ controls: e, children: t }) => {
2402
+ const r = _(() => ({
2403
2403
  ...yt,
2404
2404
  ...e
2405
2405
  }), [e]);
@@ -2407,39 +2407,39 @@ var Zl = ({ options: e, value: t, onChange: r, onCommit: a, itemLayout: o = "inl
2407
2407
  value: r,
2408
2408
  children: t
2409
2409
  });
2410
- }, M = () => ce(St), Xl = "_12lhx9e0", wt = ({ children: e }) => /* @__PURE__ */ n("div", {
2411
- className: Xl,
2412
- children: e
2413
- }), Yl = "_139ohwv0", F = ({ children: e }) => /* @__PURE__ */ n("div", {
2410
+ }, M = () => ce(St), Yl = "_12lhx9e0", wt = ({ children: e }) => /* @__PURE__ */ n("div", {
2414
2411
  className: Yl,
2415
2412
  children: e
2416
- }), xt = ve(null), jl = xt.Provider, Jl = () => {
2413
+ }), jl = "_139ohwv0", F = ({ children: e }) => /* @__PURE__ */ n("div", {
2414
+ className: jl,
2415
+ children: e
2416
+ }), xt = ve(null), Jl = xt.Provider, Ql = () => {
2417
2417
  const e = ce(xt);
2418
2418
  if (!e) throw new Error("A section must be rendered inside <EditorPanel.Root>.");
2419
2419
  return e;
2420
- }, Ql = "_1jlczkt0", es = "data-graphy-editor-panel", ns = {
2420
+ }, es = "_1jlczkt0", ns = "data-graphy-editor-panel", ts = {
2421
2421
  List: F,
2422
2422
  Grid: wt
2423
2423
  };
2424
- function ts(e) {
2424
+ function rs(e) {
2425
2425
  if (e === void 0) return !1;
2426
2426
  const t = e.split(/\s+/);
2427
2427
  return t.includes("_1ii3bsb0") || t.includes("_1ii3bsb1");
2428
2428
  }
2429
- var rs = ({ handle: e, children: t, controls: r, defaultExpandedSection: a = void 0, className: o }) => {
2430
- const i = ir(e), { themeClass: l, inlineVarsStyle: c } = Ve(), [s, h] = q(() => a ? [a] : []), d = k(() => ({
2429
+ var as = ({ handle: e, children: t, controls: r, defaultExpandedSection: a = void 0, className: o }) => {
2430
+ const i = lr(e), { themeClass: l, inlineVarsStyle: c } = He(), [s, h] = q(() => a ? [a] : []), d = _(() => ({
2431
2431
  expandSection: (u) => h([u]),
2432
2432
  collapseAllSections: () => h([])
2433
2433
  }), []);
2434
- return /* @__PURE__ */ n(Ze.Provider, {
2434
+ return /* @__PURE__ */ n(We.Provider, {
2435
2435
  value: i,
2436
- children: /* @__PURE__ */ n($l, {
2436
+ children: /* @__PURE__ */ n(Xl, {
2437
2437
  controls: r,
2438
- children: /* @__PURE__ */ n(jl, {
2438
+ children: /* @__PURE__ */ n(Jl, {
2439
2439
  value: d,
2440
2440
  children: /* @__PURE__ */ n(ue.Root, {
2441
- [es]: "",
2442
- className: se(Ql, o, { [l]: !ts(o) }),
2441
+ [ns]: "",
2442
+ className: se(es, o, { [l]: !rs(o) }),
2443
2443
  style: c,
2444
2444
  value: s,
2445
2445
  onValueChange: (u) => h(u),
@@ -2449,34 +2449,34 @@ var rs = ({ handle: e, children: t, controls: r, defaultExpandedSection: a = voi
2449
2449
  })
2450
2450
  });
2451
2451
  }, Tt = {
2452
- Root: rs,
2453
- Controls: ns
2454
- }, Cn = {
2452
+ Root: as,
2453
+ Controls: ts
2454
+ }, gn = {
2455
2455
  stack: "pr583x0",
2456
2456
  grid: "pr583x1"
2457
- }, fn = "pr583x2", as = {
2457
+ }, vn = "pr583x2", os = {
2458
2458
  plain: "pr583x4 pr583x3",
2459
2459
  withIcon: "pr583x5 pr583x3"
2460
- }, f = ({ label: e, layout: t = "grid", icon: r, children: a }) => {
2460
+ }, C = ({ label: e, layout: t = "grid", icon: r, children: a }) => {
2461
2461
  const o = le(), i = le();
2462
2462
  return e === void 0 ? /* @__PURE__ */ n("div", {
2463
- className: Cn[t],
2463
+ className: gn[t],
2464
2464
  children: /* @__PURE__ */ n("div", {
2465
- className: fn,
2465
+ className: vn,
2466
2466
  children: a
2467
2467
  })
2468
2468
  }) : /* @__PURE__ */ p("div", {
2469
- className: Cn[t],
2469
+ className: gn[t],
2470
2470
  children: [/* @__PURE__ */ p("label", {
2471
2471
  id: o,
2472
2472
  htmlFor: i,
2473
- className: as[r === void 0 ? "plain" : "withIcon"],
2473
+ className: os[r === void 0 ? "plain" : "withIcon"],
2474
2474
  children: [r !== void 0 && /* @__PURE__ */ n("span", {
2475
2475
  "aria-hidden": "true",
2476
2476
  children: r
2477
2477
  }), e]
2478
2478
  }), /* @__PURE__ */ n("div", {
2479
- className: fn,
2479
+ className: vn,
2480
2480
  children: /* @__PURE__ */ n(vt, {
2481
2481
  labelId: o,
2482
2482
  controlId: i,
@@ -2484,7 +2484,7 @@ var rs = ({ handle: e, children: t, controls: r, defaultExpandedSection: a = voi
2484
2484
  })
2485
2485
  })]
2486
2486
  });
2487
- }, os = (e) => /* @__PURE__ */ n(L, {
2487
+ }, is = (e) => /* @__PURE__ */ n(L, {
2488
2488
  ...e,
2489
2489
  children: /* @__PURE__ */ n("g", {
2490
2490
  stroke: "currentColor",
@@ -2493,22 +2493,22 @@ var rs = ({ handle: e, children: t, controls: r, defaultExpandedSection: a = voi
2493
2493
  strokeLinejoin: "round",
2494
2494
  children: /* @__PURE__ */ n("path", { d: "m9 6 6 6-6 6" })
2495
2495
  })
2496
- }), qe = "_40zvwv0", $e = "_40zvwv1", is = "_40zvwv2", Lt = "_40zvwv3", ls = "_40zvwv4 _40zvwv3";
2497
- var ss = "_40zvwv6";
2498
- var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory: a, onOpenChange: o, children: i }) => t === "collapsible" ? /* @__PURE__ */ n(hs, {
2496
+ }), Ze = "_40zvwv0", qe = "_40zvwv1", ls = "_40zvwv2", Lt = "_40zvwv3", ss = "_40zvwv4 _40zvwv3";
2497
+ var cs = "_40zvwv6";
2498
+ var ds = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory: a, onOpenChange: o, children: i }) => t === "collapsible" ? /* @__PURE__ */ n(us, {
2499
2499
  title: e,
2500
2500
  preview: r,
2501
2501
  accessory: a,
2502
2502
  onOpenChange: o,
2503
2503
  children: i
2504
- }) : t === "inline" && r === void 0 ? /* @__PURE__ */ n(ds, {
2504
+ }) : t === "inline" && r === void 0 ? /* @__PURE__ */ n(hs, {
2505
2505
  title: e,
2506
2506
  accessory: a,
2507
2507
  children: i
2508
2508
  }) : /* @__PURE__ */ p("div", {
2509
- className: qe,
2509
+ className: Ze,
2510
2510
  children: [/* @__PURE__ */ p("div", {
2511
- className: $e,
2511
+ className: qe,
2512
2512
  children: [
2513
2513
  /* @__PURE__ */ n("span", {
2514
2514
  className: Lt,
@@ -2524,21 +2524,21 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2524
2524
  })
2525
2525
  ]
2526
2526
  }), /* @__PURE__ */ n("div", { children: i })]
2527
- }), ds = ({ title: e, accessory: t, children: r }) => {
2527
+ }), hs = ({ title: e, accessory: t, children: r }) => {
2528
2528
  const a = le(), o = le();
2529
2529
  return /* @__PURE__ */ n("div", {
2530
- className: qe,
2530
+ className: Ze,
2531
2531
  children: /* @__PURE__ */ p("div", {
2532
- className: $e,
2532
+ className: qe,
2533
2533
  children: [
2534
2534
  /* @__PURE__ */ n("label", {
2535
2535
  id: a,
2536
2536
  htmlFor: o,
2537
- className: ls,
2537
+ className: ss,
2538
2538
  children: e
2539
2539
  }),
2540
2540
  /* @__PURE__ */ n("span", {
2541
- className: ss,
2541
+ className: cs,
2542
2542
  children: /* @__PURE__ */ n(vt, {
2543
2543
  labelId: a,
2544
2544
  controlId: o,
@@ -2552,18 +2552,18 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2552
2552
  ]
2553
2553
  })
2554
2554
  });
2555
- }, hs = ({ title: e, preview: t, accessory: r, onOpenChange: a, children: o }) => {
2555
+ }, us = ({ title: e, preview: t, accessory: r, onOpenChange: a, children: o }) => {
2556
2556
  const i = I();
2557
2557
  return /* @__PURE__ */ p(ue.Item, {
2558
2558
  value: e,
2559
- className: qe,
2559
+ className: Ze,
2560
2560
  onOpenChange: a,
2561
2561
  children: [/* @__PURE__ */ p(ue.Header, {
2562
- className: $e,
2562
+ className: qe,
2563
2563
  render: /* @__PURE__ */ n("div", {}),
2564
2564
  children: [
2565
2565
  /* @__PURE__ */ n(ue.Trigger, {
2566
- className: is,
2566
+ className: ls,
2567
2567
  "aria-label": i("editor.accessibility.toggleSection", { title: e })
2568
2568
  }),
2569
2569
  /* @__PURE__ */ n("span", {
@@ -2579,14 +2579,14 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2579
2579
  children: r
2580
2580
  }),
2581
2581
  /* @__PURE__ */ n("span", {
2582
- className: cs,
2583
- children: /* @__PURE__ */ n(os, { size: "sm" })
2582
+ className: ds,
2583
+ children: /* @__PURE__ */ n(is, { size: "sm" })
2584
2584
  })
2585
2585
  ]
2586
2586
  }), /* @__PURE__ */ n(ue.Panel, { children: /* @__PURE__ */ n("div", { children: o }) })]
2587
2587
  });
2588
- }, us = ({ title: e, isChecked: t, onToggle: r, isDisabled: a, preview: o, children: i }) => {
2589
- const { expandSection: l, collapseAllSections: c } = Jl(), { Switch: s } = M();
2588
+ }, ms = ({ title: e, isChecked: t, onToggle: r, isDisabled: a, preview: o, children: i }) => {
2589
+ const { expandSection: l, collapseAllSections: c } = Ql(), { Switch: s } = M();
2590
2590
  return /* @__PURE__ */ n(D, {
2591
2591
  title: e,
2592
2592
  layout: "collapsible",
@@ -2604,147 +2604,147 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2604
2604
  }),
2605
2605
  children: i
2606
2606
  });
2607
- }, ms = {
2607
+ }, ps = {
2608
2608
  horizontal: ["bottom", "top"],
2609
2609
  vertical: ["left", "right"]
2610
- }, ps = {
2610
+ }, gs = {
2611
2611
  left: "editor.axesPanel.position.left",
2612
2612
  right: "editor.axesPanel.position.right",
2613
2613
  top: "editor.axesPanel.position.top",
2614
2614
  bottom: "editor.axesPanel.position.bottom"
2615
- }, gs = {
2615
+ }, vs = {
2616
2616
  x: "editor.axesPanel.mainAxisSection.xAxis",
2617
2617
  y: "editor.axesPanel.mainAxisSection.yAxis"
2618
- }, bn = ({ axis: e, title: t, layout: r = "collapsible", preview: a }) => {
2618
+ }, fn = ({ axis: e, title: t, layout: r = "collapsible", preview: a }) => {
2619
2619
  const o = O(), i = R(o), l = I(), { NumberField: c, Switch: s, TextField: h, ToggleGroup: d } = M();
2620
2620
  if (!i) return null;
2621
- const u = i.coordSystem.type === "polar" ? i.coordSystem.axisMapping[e].geometry : "linear", v = i.config.axes[e], m = i.scales[e], g = m?.spec, C = g?.scaleType === "continuous" ? g : void 0;
2622
- if (u === "circular" || u === "radial" && C === void 0) return null;
2623
- const P = g !== void 0 && "reverse" in g ? g : void 0, w = g?.scaleType === "continuous" || g?.scaleType === "datetime", b = e === "y" && C !== void 0 && i.layers.some((y) => y.yScaleType === "primary" && y.geom === "bar"), T = C?.transform === "log", x = C?.domainMax ?? null, N = vs(C), V = (y, $) => y.map((Ce) => ({
2624
- value: Ce,
2625
- label: $(Ce)
2626
- })), E = i.guides.axes.find((y) => y.scaleAestheticKey === e)?.position, B = ms[E === "bottom" || E === "top" || E === void 0 && e === "x" ? "horizontal" : "vertical"], A = i.guides.legends.drawn.some((y) => B.some(($) => $ === y.position)), S = B.map((y) => ({
2621
+ const u = i.coordSystem.type === "polar" ? i.coordSystem.axisMapping[e].geometry : "linear", v = i.config.axes[e], m = i.scales[e], g = m?.spec, f = g?.scaleType === "continuous" ? g : void 0;
2622
+ if (u === "circular" || u === "radial" && f === void 0) return null;
2623
+ const P = g !== void 0 && "reverse" in g ? g : void 0, w = g?.scaleType === "continuous" || g?.scaleType === "datetime", b = e === "y" && f !== void 0 && i.layers.some((y) => y.yScaleType === "primary" && y.geom === "bar"), T = f?.transform === "log", x = f?.domainMax ?? null, N = fs(f), V = (y, $) => y.map((fe) => ({
2624
+ value: fe,
2625
+ label: $(fe)
2626
+ })), k = i.guides.axes.find((y) => y.scaleAestheticKey === e)?.position, G = ps[k === "bottom" || k === "top" || k === void 0 && e === "x" ? "horizontal" : "vertical"], A = i.guides.legends.drawn.some((y) => G.some(($) => $ === y.position)), S = G.map((y) => ({
2627
2627
  value: y,
2628
- label: l(ps[y])
2629
- })), _ = V(["auto", "edges"], (y) => l(y === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), ee = V(["linear", "log"], (y) => l(y === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), Ot = V([
2628
+ label: l(gs[y])
2629
+ })), E = V(["auto", "edges"], (y) => l(y === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), Q = V(["linear", "log"], (y) => l(y === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), Ot = V([
2630
2630
  "auto",
2631
2631
  "zero",
2632
2632
  "custom"
2633
- ], (y) => l(y === "zero" ? "editor.axesPanel.startFrom.zero" : y === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")), Mt = V(["auto", "custom"], (y) => l(y === "custom" ? "editor.axesPanel.endAt.custom" : "editor.axesPanel.endAt.auto")), Nt = V(["no", "yes"], (y) => l(y === "yes" ? "editor.axesPanel.yesNo.yes" : "editor.axesPanel.yesNo.no")), Et = (y) => {
2634
- o.commands.dispatch(new Ar({
2633
+ ], (y) => l(y === "zero" ? "editor.axesPanel.startFrom.zero" : y === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")), Mt = V(["auto", "custom"], (y) => l(y === "custom" ? "editor.axesPanel.endAt.custom" : "editor.axesPanel.endAt.auto")), Nt = V(["no", "yes"], (y) => l(y === "yes" ? "editor.axesPanel.yesNo.yes" : "editor.axesPanel.yesNo.no")), kt = (y) => {
2634
+ o.commands.dispatch(new Or({
2635
2635
  axis: e,
2636
2636
  isVisible: y
2637
2637
  }));
2638
- }, kt = (y) => {
2639
- o.commands.dispatch(new Tr({
2638
+ }, _t = (y) => {
2639
+ o.commands.dispatch(new Lr({
2640
2640
  axis: e,
2641
2641
  label: y === "" ? null : y
2642
2642
  }), { transient: !0 });
2643
- }, _t = (y) => {
2644
- o.commands.dispatch(new Ir({
2643
+ }, Et = (y) => {
2644
+ o.commands.dispatch(new Ar({
2645
2645
  axis: e,
2646
2646
  isVisible: y
2647
2647
  }));
2648
2648
  }, Rt = (y) => {
2649
- o.commands.dispatch(new Pr({
2649
+ o.commands.dispatch(new Ir({
2650
2650
  axis: e,
2651
2651
  tickMode: y === "edges" ? "edges" : "auto"
2652
2652
  }));
2653
2653
  }, Dt = (y) => {
2654
- o.commands.dispatch(new na({
2654
+ o.commands.dispatch(new ta({
2655
2655
  scaledAesthetic: e,
2656
2656
  reverse: y === "yes"
2657
2657
  }));
2658
2658
  }, Ht = (y) => {
2659
- o.commands.dispatch(new ta({
2659
+ o.commands.dispatch(new ra({
2660
2660
  scaledAesthetic: e,
2661
2661
  transform: y === "log" ? "log" : "linear"
2662
2662
  }));
2663
- }, je = (y) => {
2664
- o.commands.dispatch(new fe({
2663
+ }, Ye = (y) => {
2664
+ o.commands.dispatch(new Ce({
2665
2665
  scaledAesthetic: e,
2666
2666
  ...y
2667
2667
  }), { transient: !0 });
2668
2668
  }, Vt = (y) => {
2669
- y !== null && je({ domainMin: y });
2669
+ y !== null && Ye({ domainMin: y });
2670
2670
  }, zt = (y) => {
2671
- y !== null && je({ domainMax: y });
2671
+ y !== null && Ye({ domainMax: y });
2672
2672
  }, Ft = (y) => {
2673
- if (C) {
2673
+ if (f) {
2674
2674
  if (y === "custom") {
2675
- C.zero && o.commands.dispatch(new rn({
2675
+ f.zero && o.commands.dispatch(new nn({
2676
2676
  scaledAesthetic: e,
2677
2677
  zero: !1
2678
- })), o.commands.dispatch(new fe({
2678
+ })), o.commands.dispatch(new Ce({
2679
2679
  scaledAesthetic: e,
2680
- domainMin: yn(m?.domain, "start")
2680
+ domainMin: Cn(m?.domain, "start")
2681
2681
  }));
2682
2682
  return;
2683
2683
  }
2684
- C.domainMin !== null && o.commands.dispatch(new fe({
2684
+ f.domainMin !== null && o.commands.dispatch(new Ce({
2685
2685
  scaledAesthetic: e,
2686
2686
  domainMin: null
2687
- })), o.commands.dispatch(new rn({
2687
+ })), o.commands.dispatch(new nn({
2688
2688
  scaledAesthetic: e,
2689
2689
  zero: y === "zero"
2690
2690
  }));
2691
2691
  }
2692
- }, Bt = (y) => {
2693
- const $ = y === "custom" ? yn(m?.domain, "end") : null;
2694
- o.commands.dispatch(new fe({
2692
+ }, Gt = (y) => {
2693
+ const $ = y === "custom" ? Cn(m?.domain, "end") : null;
2694
+ o.commands.dispatch(new Ce({
2695
2695
  scaledAesthetic: e,
2696
2696
  domainMax: $
2697
2697
  }));
2698
- }, Gt = (y) => {
2699
- const $ = B.find((Ce) => Ce === y);
2700
- $ && o.commands.dispatch(new Lr({
2698
+ }, Bt = (y) => {
2699
+ const $ = G.find((fe) => fe === y);
2700
+ $ && o.commands.dispatch(new Pr({
2701
2701
  axis: e,
2702
2702
  position: $
2703
2703
  }));
2704
2704
  };
2705
2705
  return /* @__PURE__ */ n(D, {
2706
- title: t ?? l(gs[e]),
2706
+ title: t ?? l(vs[e]),
2707
2707
  layout: r,
2708
2708
  preview: a,
2709
2709
  children: /* @__PURE__ */ p(F, { children: [
2710
- /* @__PURE__ */ n(f, {
2710
+ /* @__PURE__ */ n(C, {
2711
2711
  label: l("editor.axesPanel.controls.visible"),
2712
2712
  children: /* @__PURE__ */ n(s, {
2713
2713
  isChecked: v.isVisible,
2714
- onChange: Et
2714
+ onChange: kt
2715
2715
  })
2716
2716
  }),
2717
- u === "linear" && /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(f, {
2717
+ u === "linear" && /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(C, {
2718
2718
  label: l("editor.axesPanel.controls.title"),
2719
2719
  children: /* @__PURE__ */ n(h, {
2720
2720
  value: v.label ?? "",
2721
- onChange: kt,
2721
+ onChange: _t,
2722
2722
  onCommit: o.commands.seal
2723
2723
  })
2724
- }), /* @__PURE__ */ n(f, {
2724
+ }), /* @__PURE__ */ n(C, {
2725
2725
  label: l("editor.axesPanel.controls.ticks"),
2726
2726
  children: /* @__PURE__ */ n(s, {
2727
2727
  isChecked: v.ticks.isVisible,
2728
- onChange: _t
2728
+ onChange: Et
2729
2729
  })
2730
2730
  })] }),
2731
- w && /* @__PURE__ */ n(f, {
2731
+ w && /* @__PURE__ */ n(C, {
2732
2732
  label: l("editor.axesPanel.controls.labels"),
2733
2733
  children: /* @__PURE__ */ n(d, {
2734
2734
  value: v.ticks.mode,
2735
- options: _,
2735
+ options: E,
2736
2736
  onChange: Rt
2737
2737
  })
2738
2738
  }),
2739
- C && u === "linear" && !A && /* @__PURE__ */ n(f, {
2739
+ f && u === "linear" && !A && /* @__PURE__ */ n(C, {
2740
2740
  label: l("editor.axesPanel.controls.position"),
2741
2741
  children: /* @__PURE__ */ n(d, {
2742
- value: E ?? v.position,
2742
+ value: k ?? v.position,
2743
2743
  options: S,
2744
- onChange: Gt
2744
+ onChange: Bt
2745
2745
  })
2746
2746
  }),
2747
- P !== void 0 && /* @__PURE__ */ n(f, {
2747
+ P !== void 0 && /* @__PURE__ */ n(C, {
2748
2748
  label: l("editor.axesPanel.controls.reverse"),
2749
2749
  children: /* @__PURE__ */ n(d, {
2750
2750
  value: P.reverse === !0 ? "yes" : "no",
@@ -2752,39 +2752,39 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2752
2752
  onChange: Dt
2753
2753
  })
2754
2754
  }),
2755
- C && !b && /* @__PURE__ */ n(f, {
2755
+ f && !b && /* @__PURE__ */ n(C, {
2756
2756
  label: l("editor.axesPanel.controls.scale"),
2757
2757
  children: /* @__PURE__ */ n(d, {
2758
2758
  value: T ? "log" : "linear",
2759
- options: ee,
2759
+ options: Q,
2760
2760
  onChange: Ht
2761
2761
  })
2762
2762
  }),
2763
- C && !T && /* @__PURE__ */ p(G, { children: [
2764
- !b && /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(f, {
2763
+ f && !T && /* @__PURE__ */ p(B, { children: [
2764
+ !b && /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(C, {
2765
2765
  label: l("editor.axesPanel.controls.startFrom"),
2766
2766
  children: /* @__PURE__ */ n(d, {
2767
2767
  value: N,
2768
2768
  options: Ot,
2769
2769
  onChange: Ft
2770
2770
  })
2771
- }), N === "custom" && /* @__PURE__ */ n(f, {
2771
+ }), N === "custom" && /* @__PURE__ */ n(C, {
2772
2772
  label: l("editor.axesPanel.controls.value"),
2773
2773
  children: /* @__PURE__ */ n(c, {
2774
- value: C.domainMin ?? null,
2774
+ value: f.domainMin ?? null,
2775
2775
  onChange: Vt,
2776
2776
  onCommit: o.commands.seal
2777
2777
  })
2778
2778
  })] }),
2779
- /* @__PURE__ */ n(f, {
2779
+ /* @__PURE__ */ n(C, {
2780
2780
  label: l("editor.axesPanel.controls.endAt"),
2781
2781
  children: /* @__PURE__ */ n(d, {
2782
2782
  value: x === null ? "auto" : "custom",
2783
2783
  options: Mt,
2784
- onChange: Bt
2784
+ onChange: Gt
2785
2785
  })
2786
2786
  }),
2787
- x !== null && /* @__PURE__ */ n(f, {
2787
+ x !== null && /* @__PURE__ */ n(C, {
2788
2788
  label: l("editor.axesPanel.controls.value"),
2789
2789
  children: /* @__PURE__ */ n(c, {
2790
2790
  value: x,
@@ -2795,12 +2795,12 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2795
2795
  ] })
2796
2796
  ] })
2797
2797
  });
2798
- }, vs = (e) => e === void 0 ? "auto" : e.domainMin !== null && e.domainMin !== void 0 ? "custom" : e.zero === !0 ? "zero" : "auto", yn = (e, t) => {
2798
+ }, fs = (e) => e === void 0 ? "auto" : e.domainMin !== null && e.domainMin !== void 0 ? "custom" : e.zero === !0 ? "zero" : "auto", Cn = (e, t) => {
2799
2799
  const r = t === "start" ? e?.[0] : e?.[e.length - 1];
2800
2800
  return typeof r == "number" ? r : 0;
2801
- }, Xe = ({ value: e, onChange: t }) => {
2801
+ }, $e = ({ value: e, onChange: t }) => {
2802
2802
  const r = O(), a = I(), { TextField: o } = M(), i = e !== null && typeof e != "string", l = (c) => t(c === "" ? null : c);
2803
- return /* @__PURE__ */ n(f, {
2803
+ return /* @__PURE__ */ n(C, {
2804
2804
  label: a("editor.elementsPanel.contentValue"),
2805
2805
  children: /* @__PURE__ */ n(o, {
2806
2806
  value: typeof e == "string" ? e : "",
@@ -2818,24 +2818,24 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2818
2818
  isVisible: d
2819
2819
  }));
2820
2820
  }, h = (d) => {
2821
- a.commands.dispatch(new Er({ caption: d }), { transient: !0 });
2821
+ a.commands.dispatch(new _r({ caption: d }), { transient: !0 });
2822
2822
  };
2823
2823
  return /* @__PURE__ */ n(D, {
2824
2824
  title: e ?? i("editor.elementsPanel.footerSection.caption"),
2825
2825
  layout: t,
2826
2826
  preview: r,
2827
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
2827
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
2828
2828
  label: i("editor.elementsPanel.contentVisible"),
2829
2829
  children: /* @__PURE__ */ n(l, {
2830
2830
  isChecked: c.isCaptionVisible,
2831
2831
  onChange: s
2832
2832
  })
2833
- }), /* @__PURE__ */ n(Xe, {
2833
+ }), /* @__PURE__ */ n($e, {
2834
2834
  value: c.caption,
2835
2835
  onChange: h
2836
2836
  })] })
2837
2837
  });
2838
- }, Sn = /^[a-z][a-z\d+.-]*:/i, fs = {}, bs = ({ title: e, layout: t = "collapsible", preview: r }) => {
2838
+ }, bn = /^[a-z][a-z\d+.-]*:/i, bs = {}, ys = ({ title: e, layout: t = "collapsible", preview: r }) => {
2839
2839
  const a = O(), o = R(a), i = I(), { Switch: l } = M();
2840
2840
  if (!o) return null;
2841
2841
  const c = o.config.content, s = (h) => {
@@ -2848,21 +2848,21 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2848
2848
  title: e ?? i("editor.elementsPanel.sourceSection.title"),
2849
2849
  layout: t,
2850
2850
  preview: r,
2851
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
2851
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
2852
2852
  label: i("editor.elementsPanel.contentVisible"),
2853
2853
  children: /* @__PURE__ */ n(l, {
2854
2854
  isChecked: c.isSourceVisible,
2855
2855
  onChange: s
2856
2856
  })
2857
- }), /* @__PURE__ */ n(ys, { source: c.source ?? fs })] })
2857
+ }), /* @__PURE__ */ n(Ss, { source: c.source ?? bs })] })
2858
2858
  });
2859
- }, ys = ({ source: e }) => {
2859
+ }, Ss = ({ source: e }) => {
2860
2860
  const t = O(), r = I(), { TextField: a } = M(), o = (s) => {
2861
2861
  const h = (s.label ?? "") !== "" || (s.url ?? "") !== "";
2862
- t.commands.dispatch(new kr({ source: h ? s : null }), { transient: !0 });
2862
+ t.commands.dispatch(new Er({ source: h ? s : null }), { transient: !0 });
2863
2863
  }, i = () => {
2864
2864
  const s = e.url ?? "";
2865
- s !== "" && !Sn.test(s) && o({
2865
+ s !== "" && !bn.test(s) && o({
2866
2866
  ...e,
2867
2867
  url: `https://${s}`
2868
2868
  }), t.commands.seal();
@@ -2873,15 +2873,15 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2873
2873
  ...e,
2874
2874
  label: s
2875
2875
  });
2876
- return /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(f, {
2876
+ return /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(C, {
2877
2877
  label: r("editor.elementsPanel.sourceSection.url"),
2878
2878
  children: /* @__PURE__ */ n(a, {
2879
2879
  value: e.url ?? "",
2880
2880
  onChange: l,
2881
2881
  onCommit: i,
2882
- hasError: Sn.test(e.url ?? "") && !za(e.url)
2882
+ hasError: bn.test(e.url ?? "") && !Fa(e.url)
2883
2883
  })
2884
- }), /* @__PURE__ */ n(f, {
2884
+ }), /* @__PURE__ */ n(C, {
2885
2885
  label: r("editor.elementsPanel.sourceSection.name"),
2886
2886
  children: /* @__PURE__ */ n(a, {
2887
2887
  value: e.label ?? "",
@@ -2889,7 +2889,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2889
2889
  onCommit: t.commands.seal
2890
2890
  })
2891
2891
  })] });
2892
- }, Ss = ({ title: e, layout: t = "collapsible", preview: r }) => {
2892
+ }, ws = ({ title: e, layout: t = "collapsible", preview: r }) => {
2893
2893
  const a = O(), o = R(a), i = I(), { Switch: l } = M();
2894
2894
  if (!o) return null;
2895
2895
  const c = o.config.content, s = (d) => {
@@ -2898,24 +2898,24 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2898
2898
  isVisible: d
2899
2899
  }));
2900
2900
  }, h = (d) => {
2901
- a.commands.dispatch(new _r({ subtitle: d }), { transient: !0 });
2901
+ a.commands.dispatch(new Rr({ subtitle: d }), { transient: !0 });
2902
2902
  };
2903
2903
  return /* @__PURE__ */ n(D, {
2904
2904
  title: e ?? i("editor.elementsPanel.headerSection.subtitle"),
2905
2905
  layout: t,
2906
2906
  preview: r,
2907
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
2907
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
2908
2908
  label: i("editor.elementsPanel.contentVisible"),
2909
2909
  children: /* @__PURE__ */ n(l, {
2910
2910
  isChecked: c.isSubtitleVisible,
2911
2911
  onChange: s
2912
2912
  })
2913
- }), /* @__PURE__ */ n(Xe, {
2913
+ }), /* @__PURE__ */ n($e, {
2914
2914
  value: c.subtitle,
2915
2915
  onChange: h
2916
2916
  })] })
2917
2917
  });
2918
- }, Re = [
2918
+ }, Ee = [
2919
2919
  0.8,
2920
2920
  1,
2921
2921
  1.2,
@@ -2926,15 +2926,15 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2926
2926
  2.5,
2927
2927
  3,
2928
2928
  4
2929
- ], ws = Re.length / 2, xs = ({ title: e, layout: t = "collapsible", preview: r }) => {
2929
+ ], xs = Ee.length / 2, Ts = ({ title: e, layout: t = "collapsible", preview: r }) => {
2930
2930
  const a = O(), o = R(a), i = I(), { RadioGrid: l } = M();
2931
2931
  if (!o) return null;
2932
- const { textScale: c } = o.config.appearance, s = (u) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${u}` }), h = Re.map((u) => ({
2932
+ const { textScale: c } = o.config.appearance, s = (u) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${u}` }), h = Ee.map((u) => ({
2933
2933
  value: `${u}`,
2934
2934
  label: s(u)
2935
2935
  })), d = (u) => {
2936
- const v = Re.find((m) => `${m}` === u);
2937
- v !== void 0 && a.commands.dispatch(new xr({ textScale: v }));
2936
+ const v = Ee.find((m) => `${m}` === u);
2937
+ v !== void 0 && a.commands.dispatch(new Tr({ textScale: v }));
2938
2938
  };
2939
2939
  return /* @__PURE__ */ n(D, {
2940
2940
  title: e ?? i("editor.elementsPanel.textSizeSection.title"),
@@ -2943,12 +2943,12 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2943
2943
  children: /* @__PURE__ */ n(l, {
2944
2944
  value: `${c}`,
2945
2945
  options: h,
2946
- columns: ws,
2946
+ columns: xs,
2947
2947
  onChange: d,
2948
2948
  ariaLabel: i("editor.elementsPanel.textSizeSection.title")
2949
2949
  })
2950
2950
  });
2951
- }, Ts = ({ title: e, layout: t = "collapsible", preview: r }) => {
2951
+ }, Ls = ({ title: e, layout: t = "collapsible", preview: r }) => {
2952
2952
  const a = O(), o = R(a), i = I(), { Switch: l } = M();
2953
2953
  if (!o) return null;
2954
2954
  const c = o.config.content, s = (d) => {
@@ -2957,44 +2957,44 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2957
2957
  isVisible: d
2958
2958
  }));
2959
2959
  }, h = (d) => {
2960
- a.commands.dispatch(new Rr({ title: d }), { transient: !0 });
2960
+ a.commands.dispatch(new Dr({ title: d }), { transient: !0 });
2961
2961
  };
2962
2962
  return /* @__PURE__ */ n(D, {
2963
2963
  title: e ?? i("editor.elementsPanel.headerSection.toggleTitle"),
2964
2964
  layout: t,
2965
2965
  preview: r,
2966
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
2966
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
2967
2967
  label: i("editor.elementsPanel.contentVisible"),
2968
2968
  children: /* @__PURE__ */ n(l, {
2969
2969
  isChecked: c.isTitleVisible,
2970
2970
  onChange: s
2971
2971
  })
2972
- }), /* @__PURE__ */ n(Xe, {
2972
+ }), /* @__PURE__ */ n($e, {
2973
2973
  value: c.title,
2974
2974
  onChange: h
2975
2975
  })] })
2976
2976
  });
2977
- }, d1 = ({ children: e, ...t }) => /* @__PURE__ */ n(Tt.Root, {
2977
+ }, h1 = ({ children: e, ...t }) => /* @__PURE__ */ n(Tt.Root, {
2978
2978
  ...t,
2979
- children: e ?? /* @__PURE__ */ p(G, { children: [
2980
- /* @__PURE__ */ n(Ts, {}),
2981
- /* @__PURE__ */ n(Ss, {}),
2979
+ children: e ?? /* @__PURE__ */ p(B, { children: [
2980
+ /* @__PURE__ */ n(Ls, {}),
2981
+ /* @__PURE__ */ n(ws, {}),
2982
2982
  /* @__PURE__ */ n(Cs, {}),
2983
- /* @__PURE__ */ n(bs, {}),
2984
- /* @__PURE__ */ n(xs, {})
2983
+ /* @__PURE__ */ n(ys, {}),
2984
+ /* @__PURE__ */ n(Ts, {})
2985
2985
  ] })
2986
- }), h1 = ({ children: e, ...t }) => /* @__PURE__ */ n(Tt.Root, {
2986
+ }), u1 = ({ children: e, ...t }) => /* @__PURE__ */ n(Tt.Root, {
2987
2987
  ...t,
2988
- children: e ?? /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(bn, { axis: "x" }), /* @__PURE__ */ n(bn, { axis: "y" })] })
2989
- }), Pe = (e) => `${e}px`, Pt = (e) => `${Math.round(e * 100)}%`, Ls = (e) => `${e}°`, Ps = 24, Is = { select: { target: "graph" } }, wn = ["dim", "desaturate"], u1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
2988
+ children: e ?? /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(fn, { axis: "x" }), /* @__PURE__ */ n(fn, { axis: "y" })] })
2989
+ }), Pe = (e) => `${e}px`, Pt = (e) => `${Math.round(e * 100)}%`, Ps = (e) => `${e}°`, Is = 24, As = { select: { target: "graph" } }, yn = ["dim", "desaturate"], m1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
2990
2990
  const a = O(), o = R(a), i = I(), { Slider: l, ToggleGroup: c } = M();
2991
2991
  if (!o) return null;
2992
- const s = Vn().chromeReaders(o.chrome).graph.get("borderRadius"), h = Ga(o.spec), d = wn.map((m) => ({
2992
+ const s = Hn().chromeReaders(o.chrome).graph.get("borderRadius"), h = Ka(o.spec), d = yn.map((m) => ({
2993
2993
  value: m,
2994
2994
  label: i(m === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.grey")
2995
2995
  })), u = (m) => {
2996
- const g = Na(o.spec.styles.overrides, Is)?.declarations ?? {};
2997
- a.commands.dispatch(new aa({
2996
+ const g = ka(o.spec.styles.overrides, As)?.declarations ?? {};
2997
+ a.commands.dispatch(new oa({
2998
2998
  list: "overrides",
2999
2999
  rule: {
3000
3000
  select: { target: "graph" },
@@ -3005,25 +3005,25 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3005
3005
  }
3006
3006
  }), { transient: !0 });
3007
3007
  }, v = (m) => {
3008
- const g = wn.find((C) => C === m);
3009
- g && a.commands.dispatch(new Kr({ dimStyle: g }));
3008
+ const g = yn.find((f) => f === m);
3009
+ g && a.commands.dispatch(new Ur({ dimStyle: g }));
3010
3010
  };
3011
3011
  return /* @__PURE__ */ n(D, {
3012
3012
  title: e ?? i("editor.colorPanel.appearanceSection.title"),
3013
3013
  layout: t,
3014
3014
  preview: r,
3015
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
3015
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
3016
3016
  label: i("editor.colorPanel.borderSection.cornerRadius"),
3017
3017
  children: /* @__PURE__ */ n(l, {
3018
3018
  value: s,
3019
3019
  min: 0,
3020
- max: Ps,
3020
+ max: Is,
3021
3021
  step: 1,
3022
3022
  formatValue: Pe,
3023
3023
  onChange: u,
3024
3024
  onCommit: a.commands.seal
3025
3025
  })
3026
- }), /* @__PURE__ */ n(f, {
3026
+ }), /* @__PURE__ */ n(C, {
3027
3027
  label: i("editor.colorPanel.appearanceSection.highlightStyle"),
3028
3028
  children: /* @__PURE__ */ n(c, {
3029
3029
  value: h,
@@ -3032,31 +3032,31 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3032
3032
  })
3033
3033
  })] })
3034
3034
  });
3035
- }, Ye = (e, t) => {
3036
- const { colorScheme: r } = Ve();
3037
- return k(() => {
3035
+ }, Xe = (e, t) => {
3036
+ const { colorScheme: r } = He();
3037
+ return _(() => {
3038
3038
  const a = e?.layers.find((o) => o.id === t);
3039
- return a === void 0 ? null : Vn({ colorScheme: r }).geomReaders(a);
3039
+ return a === void 0 ? null : Hn({ colorScheme: r }).geomReaders(a);
3040
3040
  }, [
3041
3041
  e,
3042
3042
  t,
3043
3043
  r
3044
3044
  ]);
3045
- }, As = 0.05, m1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3046
- const a = O(), o = R(a), i = I(), { Slider: l, ToggleGroup: c } = M(), s = o ? zn(o.spec.layers, "bar") : void 0, h = Ye(o, s?.id ?? null);
3045
+ }, Os = 0.05, p1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3046
+ const a = O(), o = R(a), i = I(), { Slider: l, ToggleGroup: c } = M(), s = o ? Vn(o.spec.layers, "bar") : void 0, h = Xe(o, s?.id ?? null);
3047
3047
  if (!o || !s || o.coordSystem.type === "polar" && o.coordSystem.bandAxis === null) return null;
3048
3048
  const d = (m) => {
3049
- a.commands.dispatch(new Mr({
3049
+ a.commands.dispatch(new Nr({
3050
3050
  layerId: s.id,
3051
3051
  width: m
3052
3052
  }), { transient: !0 });
3053
3053
  }, u = (m) => {
3054
- const g = Qe.find((C) => C === m);
3055
- g && a.commands.dispatch(new Or({
3054
+ const g = je.find((f) => f === m);
3055
+ g && a.commands.dispatch(new Mr({
3056
3056
  layerId: s.id,
3057
3057
  borderRadius: g
3058
3058
  }));
3059
- }, v = Qe.map((m) => ({
3059
+ }, v = je.map((m) => ({
3060
3060
  value: m,
3061
3061
  label: i(`editor.graphPanel.barSection.roundingOptions.${m}`)
3062
3062
  }));
@@ -3064,22 +3064,22 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3064
3064
  title: e ?? i("editor.graphPanel.barSection.title"),
3065
3065
  layout: t,
3066
3066
  preview: r,
3067
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
3067
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
3068
3068
  label: i("editor.graphPanel.barSection.thickness"),
3069
3069
  children: /* @__PURE__ */ n(l, {
3070
3070
  value: s.params.width,
3071
- min: br,
3072
- max: fr,
3073
- step: As,
3071
+ min: yr,
3072
+ max: br,
3073
+ step: Os,
3074
3074
  formatValue: Pt,
3075
3075
  onChange: d,
3076
3076
  onCommit: a.commands.seal
3077
3077
  })
3078
- }), /* @__PURE__ */ n(f, {
3078
+ }), /* @__PURE__ */ n(C, {
3079
3079
  label: i("editor.graphPanel.barSection.rounding"),
3080
3080
  layout: "stack",
3081
3081
  children: /* @__PURE__ */ n(c, {
3082
- value: h?.get("borderRadius") ?? gr,
3082
+ value: h?.get("borderRadius") ?? vr,
3083
3083
  options: v,
3084
3084
  onChange: u
3085
3085
  })
@@ -3087,7 +3087,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3087
3087
  });
3088
3088
  }, Ie = ({ children: e }) => {
3089
3089
  const t = le();
3090
- return /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n("g", {
3090
+ return /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n("g", {
3091
3091
  filter: `url(#${t})`,
3092
3092
  children: e
3093
3093
  }), /* @__PURE__ */ n("defs", { children: /* @__PURE__ */ p("filter", {
@@ -3110,7 +3110,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3110
3110
  floodOpacity: "0.16"
3111
3111
  })]
3112
3112
  }) })] });
3113
- }, Ae = "qdaoth0", Os = (e) => /* @__PURE__ */ p(L, {
3113
+ }, Ae = "qdaoth0", Ms = (e) => /* @__PURE__ */ p(L, {
3114
3114
  viewBox: "0 0 31 33",
3115
3115
  ...e,
3116
3116
  children: [/* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("path", {
@@ -3122,7 +3122,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3122
3122
  fill: "currentColor",
3123
3123
  d: "M12.0591 7.11C11.5767 7.11 11.1857 6.71899 11.1857 6.23664C11.1857 5.7543 11.5767 5.36328 12.0591 5.36328H24.8684C25.3507 5.36328 25.7417 5.7543 25.7417 6.23664V19.0459C25.7417 19.5283 25.3507 19.9193 24.8684 19.9193C24.386 19.9193 23.995 19.5283 23.995 19.0459V8.34512L6.8542 25.4859C6.51313 25.827 5.96015 25.827 5.61908 25.4859C5.27801 25.1448 5.27801 24.5919 5.61908 24.2508L22.7599 7.11H12.0591Z"
3124
3124
  })]
3125
- }), Ms = (e) => /* @__PURE__ */ n(L, {
3125
+ }), Ns = (e) => /* @__PURE__ */ n(L, {
3126
3126
  viewBox: "0 0 32 32",
3127
3127
  ...e,
3128
3128
  children: /* @__PURE__ */ p(Ie, { children: [/* @__PURE__ */ n("path", {
@@ -3132,7 +3132,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3132
3132
  fill: "currentColor",
3133
3133
  d: "M24.25 9C24.25 8.30964 23.6904 7.75 23 7.75H9C8.30964 7.75 7.75 8.30964 7.75 9V23C7.75 23.6904 8.30964 24.25 9 24.25H23C23.6904 24.25 24.25 23.6904 24.25 23V9ZM25.75 23C25.75 24.5188 24.5188 25.75 23 25.75H9C7.48122 25.75 6.25 24.5188 6.25 23V9C6.25 7.48122 7.48122 6.25 9 6.25H23C24.5188 6.25 25.75 7.48122 25.75 9V23Z"
3134
3134
  })] })
3135
- }), Ns = (e) => /* @__PURE__ */ p(L, {
3135
+ }), ks = (e) => /* @__PURE__ */ p(L, {
3136
3136
  viewBox: "0 0 32 33",
3137
3137
  ...e,
3138
3138
  children: [/* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("path", {
@@ -3146,7 +3146,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3146
3146
  clipRule: "evenodd",
3147
3147
  d: "M25.25 22C25.25 20.7574 24.2426 19.75 23 19.75C21.7574 19.75 20.75 20.7574 20.75 22C20.75 23.2426 21.7574 24.25 23 24.25C24.2426 24.25 25.25 23.2426 25.25 22ZM23 18.25C25.0711 18.25 26.75 19.9289 26.75 22C26.75 24.0711 25.0711 25.75 23 25.75C20.9289 25.75 19.25 24.0711 19.25 22C19.25 19.9289 20.9289 18.25 23 18.25ZM11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25C10.2426 11.25 11.25 10.2426 11.25 9ZM9.75 12.675C11.4617 12.3275 12.75 10.8142 12.75 9C12.75 6.92893 11.0711 5.25 9 5.25C6.92893 5.25 5.25 6.92893 5.25 9C5.25 10.8142 6.53832 12.3275 8.25 12.675L8.25 24C8.25 24.4142 8.58579 24.75 9 24.75L16 24.75C16.4142 24.75 16.75 24.4142 16.75 24L16.75 7.75L22.25 7.75L22.25 14.1893L21.0303 12.9697C20.7374 12.6768 20.2626 12.6768 19.9697 12.9697C19.6768 13.2626 19.6768 13.7374 19.9697 14.0303L22.4697 16.5303C22.7626 16.8232 23.2374 16.8232 23.5303 16.5303L26.0303 14.0303C26.3232 13.7374 26.3232 13.2626 26.0303 12.9697C25.7374 12.6768 25.2626 12.6768 24.9697 12.9697L23.75 14.1893L23.75 7C23.75 6.58579 23.4142 6.25 23 6.25L16 6.25C15.5858 6.25 15.25 6.58579 15.25 7L15.25 23.25L9.75 23.25L9.75 12.675Z"
3148
3148
  })]
3149
- }), Es = (e) => /* @__PURE__ */ p(L, {
3149
+ }), _s = (e) => /* @__PURE__ */ p(L, {
3150
3150
  viewBox: "0 0 32 33",
3151
3151
  ...e,
3152
3152
  children: [/* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("path", {
@@ -3156,53 +3156,53 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3156
3156
  fill: "currentColor",
3157
3157
  d: "M8.41371 5H20.7271C21.1595 5 21.5325 5 21.8398 5.02507C22.1641 5.05157 22.4867 5.11007 22.7971 5.26822C23.2601 5.50416 23.6366 5.88064 23.8726 6.3437C24.0307 6.65409 24.0892 6.97666 24.1157 7.30097C24.1408 7.60823 24.1408 7.98127 24.1408 8.41369V9.10155C24.1408 9.55465 23.7735 9.92195 23.3205 9.92195C22.8674 9.92195 22.5001 9.55465 22.5001 9.10155V8.44533C22.5001 7.97237 22.4995 7.66699 22.4805 7.43457C22.4623 7.21172 22.4314 7.12909 22.4107 7.08853C22.3321 6.93418 22.2066 6.80869 22.0522 6.73004C22.0117 6.70938 21.9291 6.67847 21.7062 6.66026C21.4738 6.64127 21.1684 6.64063 20.6954 6.64063H15.3907V24.6877H20.0392C20.4922 24.6877 20.8595 25.0549 20.8595 25.508C20.8595 25.961 20.4922 26.3283 20.0392 26.3283H9.10159C8.64854 26.3283 8.28127 25.961 8.28127 25.508C8.28127 25.0549 8.64854 24.6877 9.10159 24.6877H13.7501V6.64063H8.44533C7.97238 6.64063 7.66699 6.64127 7.43457 6.66026C7.21172 6.67847 7.1291 6.70938 7.08854 6.73004C6.93418 6.80869 6.80869 6.93418 6.73004 7.08853C6.70938 7.12909 6.67847 7.21172 6.66026 7.43457C6.64127 7.66699 6.64063 7.97237 6.64063 8.44533V9.10155C6.64063 9.55465 6.27337 9.92195 5.82032 9.92195C5.36727 9.92195 5 9.55465 5 9.10155V8.41371C5 7.98128 5 7.60823 5.02508 7.30097C5.05157 6.97666 5.11007 6.65409 5.26823 6.3437C5.50417 5.88064 5.88064 5.50416 6.3437 5.26822C6.65409 5.11007 6.97666 5.05157 7.30097 5.02507C7.60824 5 7.98129 5 8.41371 5Z"
3158
3158
  })]
3159
- }), ks = {
3159
+ }), Es = {
3160
3160
  x: 0.5,
3161
3161
  y: 0.5
3162
- }, _s = 0.2, Rs = {
3162
+ }, Rs = 0.2, Ds = {
3163
3163
  x: 0.375,
3164
3164
  y: 0.25,
3165
3165
  width: 0.25,
3166
3166
  height: 0.5
3167
- }, Ds = {
3167
+ }, Hs = {
3168
3168
  fillColor: null,
3169
3169
  fillOpacity: 0.25,
3170
3170
  strokeWidth: 0,
3171
3171
  zOrder: "background"
3172
- }, Hs = {
3172
+ }, Vs = {
3173
3173
  x: 0.4,
3174
3174
  y: 0.6
3175
- }, Vs = {
3175
+ }, zs = {
3176
3176
  x: 0.6,
3177
3177
  y: 0.4
3178
- }, zs = "relative-difference", p1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3178
+ }, Fs = "relative-difference", g1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3179
3179
  const a = O(), o = R(a), i = I(), { Button: l } = M();
3180
3180
  if (!o) return null;
3181
3181
  const c = () => {
3182
3182
  a.commands.dispatch(new Y({
3183
3183
  kind: "text",
3184
3184
  annotation: {
3185
- ...oa,
3186
- content: Fs(i("editor.annotatePanel.callOutSection.text")),
3185
+ ...ia,
3186
+ content: Gs(i("editor.annotatePanel.callOutSection.text")),
3187
3187
  at: {
3188
3188
  anchorType: "panel",
3189
- ...ks
3189
+ ...Es
3190
3190
  },
3191
- width: _s
3191
+ width: Rs
3192
3192
  }
3193
3193
  }));
3194
3194
  }, s = () => {
3195
3195
  a.commands.dispatch(new Y({
3196
3196
  kind: "arrow",
3197
3197
  annotation: {
3198
- ...ur,
3198
+ ...mr,
3199
3199
  start: {
3200
3200
  anchorType: "panel",
3201
- ...Hs
3201
+ ...Vs
3202
3202
  },
3203
3203
  end: {
3204
3204
  anchorType: "panel",
3205
- ...Vs
3205
+ ...zs
3206
3206
  }
3207
3207
  }
3208
3208
  }));
@@ -3210,22 +3210,22 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3210
3210
  a.commands.dispatch(new Y({
3211
3211
  kind: "shape",
3212
3212
  annotation: {
3213
- ...wr,
3214
- ...Ds,
3213
+ ...xr,
3214
+ ...Hs,
3215
3215
  region: {
3216
3216
  anchorType: "panel",
3217
- ...Rs
3217
+ ...Ds
3218
3218
  }
3219
3219
  }
3220
3220
  }));
3221
3221
  }, d = () => {
3222
- const v = Da(o);
3222
+ const v = Ha(o);
3223
3223
  v !== null && a.commands.dispatch(new Y({
3224
3224
  kind: "differenceArrow",
3225
3225
  annotation: {
3226
3226
  ..._n,
3227
3227
  ...v,
3228
- label: zs
3228
+ label: Fs
3229
3229
  }
3230
3230
  }));
3231
3231
  }, u = o.coordSystem.type === "cartesian";
@@ -3236,31 +3236,31 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3236
3236
  children: /* @__PURE__ */ p(wt, { children: [
3237
3237
  /* @__PURE__ */ n(l, {
3238
3238
  variant: "tile",
3239
- icon: /* @__PURE__ */ n(Es, { size: "xl" }),
3239
+ icon: /* @__PURE__ */ n(_s, { size: "xl" }),
3240
3240
  label: i("editor.annotatePanel.callOutSection.text"),
3241
3241
  onClick: c
3242
3242
  }),
3243
3243
  /* @__PURE__ */ n(l, {
3244
3244
  variant: "tile",
3245
- icon: /* @__PURE__ */ n(Os, { size: "xl" }),
3245
+ icon: /* @__PURE__ */ n(Ms, { size: "xl" }),
3246
3246
  label: i("editor.annotatePanel.callOutSection.arrow"),
3247
3247
  onClick: s
3248
3248
  }),
3249
3249
  /* @__PURE__ */ n(l, {
3250
3250
  variant: "tile",
3251
- icon: /* @__PURE__ */ n(Ms, { size: "xl" }),
3251
+ icon: /* @__PURE__ */ n(Ns, { size: "xl" }),
3252
3252
  label: i("editor.annotatePanel.callOutSection.box"),
3253
3253
  onClick: h
3254
3254
  }),
3255
3255
  u && /* @__PURE__ */ n(l, {
3256
3256
  variant: "tile",
3257
- icon: /* @__PURE__ */ n(Ns, { size: "xl" }),
3257
+ icon: /* @__PURE__ */ n(ks, { size: "xl" }),
3258
3258
  label: i("editor.annotatePanel.callOutSection.difference"),
3259
3259
  onClick: d
3260
3260
  })
3261
3261
  ] })
3262
3262
  });
3263
- }, Fs = (e) => ({
3263
+ }, Gs = (e) => ({
3264
3264
  type: "doc",
3265
3265
  content: [{
3266
3266
  type: "paragraph",
@@ -3269,37 +3269,37 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3269
3269
  text: e
3270
3270
  }]
3271
3271
  }]
3272
- }), Bs = 0.1, Gs = 20, g1 = ({ title: e, preview: t }) => {
3272
+ }), Bs = 0.1, Ks = 20, v1 = ({ title: e, preview: t }) => {
3273
3273
  const r = O(), a = R(r), o = I(), { NumberField: i, TextField: l } = M();
3274
3274
  if (!a || a.coordSystem.type === "polar") return null;
3275
- const c = Ia(a.spec.layers), s = e ?? o("editor.annotationsPanel.goalSection.title"), h = xa(c?.mapping.y), d = typeof h == "number" ? h : null, u = (g) => {
3276
- const C = new sa({
3275
+ const c = Aa(a.spec.layers), s = e ?? o("editor.annotationsPanel.goalSection.title"), h = Ta(c?.mapping.y), d = typeof h == "number" ? h : null, u = (g) => {
3276
+ const f = new ca({
3277
3277
  showGoalLine: g,
3278
- value: Ks(a),
3278
+ value: Us(a),
3279
3279
  ...c !== void 0 && { layerId: c.id }
3280
3280
  });
3281
- r.commands.dispatch(C);
3281
+ r.commands.dispatch(f);
3282
3282
  }, v = (g) => {
3283
3283
  if (c === void 0) return;
3284
- const C = new Qr({
3284
+ const f = new ea({
3285
3285
  layerId: c.id,
3286
3286
  label: g === "" ? null : g
3287
3287
  });
3288
- r.commands.dispatch(C, { transient: !0 });
3288
+ r.commands.dispatch(f, { transient: !0 });
3289
3289
  }, m = (g) => {
3290
3290
  if (c === void 0 || g === null) return;
3291
- const C = new ea({
3291
+ const f = new na({
3292
3292
  layerId: c.id,
3293
3293
  value: g
3294
3294
  });
3295
- r.commands.dispatch(C, { transient: !0 });
3295
+ r.commands.dispatch(f, { transient: !0 });
3296
3296
  };
3297
- return /* @__PURE__ */ n(us, {
3297
+ return /* @__PURE__ */ n(ms, {
3298
3298
  title: s,
3299
3299
  preview: t,
3300
3300
  isChecked: c !== void 0,
3301
3301
  onToggle: u,
3302
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
3302
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
3303
3303
  label: o("editor.annotationsPanel.goalSection.labelControl"),
3304
3304
  children: /* @__PURE__ */ n(l, {
3305
3305
  value: c?.params.label ?? "",
@@ -3308,7 +3308,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3308
3308
  onCommit: r.commands.seal,
3309
3309
  ariaLabel: o("editor.annotationsPanel.goalSection.labelAriaLabel")
3310
3310
  })
3311
- }), /* @__PURE__ */ n(f, {
3311
+ }), /* @__PURE__ */ n(C, {
3312
3312
  label: o("editor.annotationsPanel.goalSection.valueControl"),
3313
3313
  children: /* @__PURE__ */ n(i, {
3314
3314
  value: d,
@@ -3319,72 +3319,72 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3319
3319
  })
3320
3320
  })] })
3321
3321
  });
3322
- }, Ks = (e) => {
3322
+ }, Us = (e) => {
3323
3323
  const t = (e.scales.y?.domain ?? []).filter((l) => typeof l == "number");
3324
3324
  if (t.length === 0) return 0;
3325
3325
  const r = Math.max(...t), a = r - Math.min(...t), o = a > 0 ? a : Math.abs(r);
3326
3326
  if (o === 0) return 0;
3327
- const i = Math.min(Gs, Math.max(0, 1 - Math.floor(Math.log10(o))));
3327
+ const i = Math.min(Ks, Math.max(0, 1 - Math.floor(Math.log10(o))));
3328
3328
  return Number((r + o * Bs).toFixed(i));
3329
- }, v1 = ({ layerId: e, title: t, layout: r = "collapsible", preview: a }) => {
3329
+ }, f1 = ({ layerId: e, title: t, layout: r = "collapsible", preview: a }) => {
3330
3330
  const o = O(), i = R(o), l = I(), { Switch: c } = M();
3331
3331
  if (!i) return null;
3332
- const s = e === void 0 ? i.spec.layers[0] : i.spec.layers.find((E) => E.id === e);
3332
+ const s = e === void 0 ? i.spec.layers[0] : i.spec.layers.find((k) => k.id === e);
3333
3333
  if (!s) return null;
3334
- const { showDataLabels: h, format: d, showStackTotals: u, showCategoryLabels: v } = s.dataLabels, m = i.coordSystem.type === "polar", g = s.geom === "bar", C = s.position === "stack" || s.position === "fill", P = g && !m && s.position === "stack", w = g && (!m || h), b = g || s.geom === "area" && C;
3335
- if (!fa(s.geom, i.coordSystem.type)) return null;
3336
- const T = (E) => {
3337
- const B = new la({
3334
+ const { showDataLabels: h, format: d, showStackTotals: u, showCategoryLabels: v } = s.dataLabels, m = i.coordSystem.type === "polar", g = s.geom === "bar", f = s.position === "stack" || s.position === "fill", P = g && !m && s.position === "stack", w = g && (!m || h), b = g || s.geom === "area" && f;
3335
+ if (!ba(s.geom, i.coordSystem.type)) return null;
3336
+ const T = (k) => {
3337
+ const G = new sa({
3338
3338
  layerId: s.id,
3339
- showDataLabels: E
3339
+ showDataLabels: k
3340
3340
  });
3341
- o.commands.dispatch(B);
3342
- }, x = (E) => {
3343
- const B = new Dr({
3341
+ o.commands.dispatch(G);
3342
+ }, x = (k) => {
3343
+ const G = new Hr({
3344
3344
  layerId: s.id,
3345
- format: E ? "percentage" : "absolute"
3345
+ format: k ? "percentage" : "absolute"
3346
3346
  });
3347
- o.commands.dispatch(B);
3348
- }, N = (E) => {
3349
- const B = new ha({
3347
+ o.commands.dispatch(G);
3348
+ }, N = (k) => {
3349
+ const G = new ua({
3350
3350
  layerId: s.id,
3351
- showStackTotals: E
3351
+ showStackTotals: k
3352
3352
  });
3353
- o.commands.dispatch(B);
3354
- }, V = (E) => {
3355
- const B = new ia({
3353
+ o.commands.dispatch(G);
3354
+ }, V = (k) => {
3355
+ const G = new la({
3356
3356
  layerId: s.id,
3357
- showCategoryLabels: E
3357
+ showCategoryLabels: k
3358
3358
  });
3359
- o.commands.dispatch(B);
3359
+ o.commands.dispatch(G);
3360
3360
  };
3361
3361
  return /* @__PURE__ */ n(D, {
3362
3362
  title: t ?? l("editor.graphPanel.graphOptionsSection.title"),
3363
3363
  layout: r,
3364
3364
  preview: a,
3365
3365
  children: /* @__PURE__ */ p(F, { children: [
3366
- /* @__PURE__ */ n(f, {
3366
+ /* @__PURE__ */ n(C, {
3367
3367
  label: l("editor.graphPanel.graphOptions.dataLabels"),
3368
3368
  children: /* @__PURE__ */ n(c, {
3369
3369
  isChecked: h,
3370
3370
  onChange: T
3371
3371
  })
3372
3372
  }),
3373
- h && b && /* @__PURE__ */ n(f, {
3373
+ h && b && /* @__PURE__ */ n(C, {
3374
3374
  label: l("editor.graphPanel.graphOptions.showPercentages"),
3375
3375
  children: /* @__PURE__ */ n(c, {
3376
3376
  isChecked: d === "percentage",
3377
3377
  onChange: x
3378
3378
  })
3379
3379
  }),
3380
- P && /* @__PURE__ */ n(f, {
3380
+ P && /* @__PURE__ */ n(C, {
3381
3381
  label: l("editor.graphPanel.graphOptions.stackTotals"),
3382
3382
  children: /* @__PURE__ */ n(c, {
3383
3383
  isChecked: u,
3384
3384
  onChange: N
3385
3385
  })
3386
3386
  }),
3387
- w && /* @__PURE__ */ n(f, {
3387
+ w && /* @__PURE__ */ n(C, {
3388
3388
  label: l("editor.graphPanel.graphOptions.categoryLabels"),
3389
3389
  children: /* @__PURE__ */ n(c, {
3390
3390
  isChecked: v,
@@ -3393,7 +3393,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3393
3393
  })
3394
3394
  ] })
3395
3395
  });
3396
- }, Us = (e) => /* @__PURE__ */ p(L, {
3396
+ }, Ws = (e) => /* @__PURE__ */ p(L, {
3397
3397
  viewBox: "0 0 16 16",
3398
3398
  ...e,
3399
3399
  children: [/* @__PURE__ */ n("path", {
@@ -3405,7 +3405,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3405
3405
  fillOpacity: "0.3",
3406
3406
  d: "M5.744 5.565 0 11.826V8l5.744-6.957 4.718 2.087L16 0v6.957l-5.538 4z"
3407
3407
  })]
3408
- }), Ws = (e) => /* @__PURE__ */ n(L, {
3408
+ }), Zs = (e) => /* @__PURE__ */ n(L, {
3409
3409
  viewBox: "0 0 16 16",
3410
3410
  ...e,
3411
3411
  children: /* @__PURE__ */ p("g", {
@@ -3447,7 +3447,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3447
3447
  })
3448
3448
  ]
3449
3449
  })
3450
- }), Zs = (e) => /* @__PURE__ */ n(L, {
3450
+ }), qs = (e) => /* @__PURE__ */ n(L, {
3451
3451
  viewBox: "0 0 16 16",
3452
3452
  ...e,
3453
3453
  children: /* @__PURE__ */ p("g", {
@@ -3462,7 +3462,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3462
3462
  d: "M0 12.445h4.267V.52A.52.52 0 0 0 3.748 0H.518A.52.52 0 0 0 0 .519zM5.867 7.111h4.266V.52A.52.52 0 0 0 9.615 0h-3.23a.52.52 0 0 0-.518.519zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
3463
3463
  })]
3464
3464
  })
3465
- }), qs = (e) => /* @__PURE__ */ n(L, {
3465
+ }), $s = (e) => /* @__PURE__ */ n(L, {
3466
3466
  viewBox: "0 0 16 16",
3467
3467
  ...e,
3468
3468
  children: /* @__PURE__ */ p("g", {
@@ -3477,7 +3477,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3477
3477
  d: "M0 7.037c0-.286.232-.518.519-.518h3.23c.286 0 .518.232.518.518v5.408H0zM5.867 7.111h4.266V4.074a.52.52 0 0 0-.518-.518h-3.23a.52.52 0 0 0-.518.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
3478
3478
  })]
3479
3479
  })
3480
- }), $s = (e) => /* @__PURE__ */ p(L, {
3480
+ }), Xs = (e) => /* @__PURE__ */ p(L, {
3481
3481
  viewBox: "0 0 16 16",
3482
3482
  ...e,
3483
3483
  children: [
@@ -3516,7 +3516,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3516
3516
  rx: ".533"
3517
3517
  })
3518
3518
  ]
3519
- }), Xs = (e) => /* @__PURE__ */ p(L, {
3519
+ }), Ys = (e) => /* @__PURE__ */ p(L, {
3520
3520
  viewBox: "0 0 16 16",
3521
3521
  ...e,
3522
3522
  children: [/* @__PURE__ */ n("path", {
@@ -3528,7 +3528,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3528
3528
  fillOpacity: "0.3",
3529
3529
  d: "M0 12.445h4.267V.52A.52.52 0 0 0 3.748 0H.518A.52.52 0 0 0 0 .519zM5.867 7.111h4.266V.52A.52.52 0 0 0 9.615 0h-3.23a.52.52 0 0 0-.518.519zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
3530
3530
  })]
3531
- }), Ys = (e) => /* @__PURE__ */ p(L, {
3531
+ }), js = (e) => /* @__PURE__ */ p(L, {
3532
3532
  viewBox: "0 0 16 16",
3533
3533
  ...e,
3534
3534
  children: [/* @__PURE__ */ n("path", {
@@ -3540,7 +3540,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3540
3540
  fillOpacity: "0.3",
3541
3541
  d: "M0 7.037c0-.286.232-.518.519-.518h3.23c.286 0 .518.232.518.518v5.408H0zM5.867 7.111h4.266V4.074a.52.52 0 0 0-.518-.518h-3.23a.52.52 0 0 0-.518.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
3542
3542
  })]
3543
- }), js = (e) => /* @__PURE__ */ n(L, {
3543
+ }), Js = (e) => /* @__PURE__ */ n(L, {
3544
3544
  viewBox: "0 0 16 16",
3545
3545
  ...e,
3546
3546
  children: /* @__PURE__ */ p("g", {
@@ -3575,7 +3575,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3575
3575
  })
3576
3576
  ]
3577
3577
  })
3578
- }), Js = (e) => /* @__PURE__ */ n(L, {
3578
+ }), Qs = (e) => /* @__PURE__ */ n(L, {
3579
3579
  viewBox: "0 0 16 16",
3580
3580
  ...e,
3581
3581
  children: /* @__PURE__ */ p("g", {
@@ -3652,7 +3652,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3652
3652
  ]
3653
3653
  })]
3654
3654
  })
3655
- }), Qs = (e) => /* @__PURE__ */ p(L, {
3655
+ }), ec = (e) => /* @__PURE__ */ p(L, {
3656
3656
  viewBox: "0 0 16 16",
3657
3657
  ...e,
3658
3658
  children: [
@@ -3674,7 +3674,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3674
3674
  d: "M15.999 8a8 8 0 0 1-7.588 7.989l-.412.01V8z"
3675
3675
  })
3676
3676
  ]
3677
- }), ec = (e) => /* @__PURE__ */ n(L, {
3677
+ }), nc = (e) => /* @__PURE__ */ n(L, {
3678
3678
  viewBox: "0 0 16 16",
3679
3679
  ...e,
3680
3680
  children: /* @__PURE__ */ p("g", {
@@ -3718,10 +3718,10 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3718
3718
  })
3719
3719
  ]
3720
3720
  })
3721
- }), nc = 0.55, De = [
3721
+ }), tc = 0.55, Re = [
3722
3722
  {
3723
3723
  name: "column",
3724
- icon: $s,
3724
+ icon: Xs,
3725
3725
  summary: {
3726
3726
  coordType: "cartesian",
3727
3727
  geom: "bar",
@@ -3730,7 +3730,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3730
3730
  },
3731
3731
  {
3732
3732
  name: "columnStacked",
3733
- icon: Ys,
3733
+ icon: js,
3734
3734
  summary: {
3735
3735
  coordType: "cartesian",
3736
3736
  geom: "bar",
@@ -3739,7 +3739,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3739
3739
  },
3740
3740
  {
3741
3741
  name: "columnStackedFill",
3742
- icon: Xs,
3742
+ icon: Ys,
3743
3743
  summary: {
3744
3744
  coordType: "cartesian",
3745
3745
  geom: "bar",
@@ -3748,7 +3748,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3748
3748
  },
3749
3749
  {
3750
3750
  name: "bar",
3751
- icon: Ws,
3751
+ icon: Zs,
3752
3752
  summary: {
3753
3753
  coordType: "flip",
3754
3754
  geom: "bar",
@@ -3757,7 +3757,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3757
3757
  },
3758
3758
  {
3759
3759
  name: "barStacked",
3760
- icon: qs,
3760
+ icon: $s,
3761
3761
  summary: {
3762
3762
  coordType: "flip",
3763
3763
  geom: "bar",
@@ -3766,7 +3766,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3766
3766
  },
3767
3767
  {
3768
3768
  name: "barStackedFill",
3769
- icon: Zs,
3769
+ icon: qs,
3770
3770
  summary: {
3771
3771
  coordType: "flip",
3772
3772
  geom: "bar",
@@ -3775,7 +3775,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3775
3775
  },
3776
3776
  {
3777
3777
  name: "line",
3778
- icon: Js,
3778
+ icon: Qs,
3779
3779
  summary: {
3780
3780
  coordType: "cartesian",
3781
3781
  geom: "line",
@@ -3784,7 +3784,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3784
3784
  },
3785
3785
  {
3786
3786
  name: "areaStacked",
3787
- icon: Us,
3787
+ icon: Ws,
3788
3788
  summary: {
3789
3789
  coordType: "cartesian",
3790
3790
  geom: "area",
@@ -3793,7 +3793,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3793
3793
  },
3794
3794
  {
3795
3795
  name: "scatter",
3796
- icon: ec,
3796
+ icon: nc,
3797
3797
  summary: {
3798
3798
  coordType: "cartesian",
3799
3799
  geom: "point",
@@ -3802,7 +3802,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3802
3802
  },
3803
3803
  {
3804
3804
  name: "pie",
3805
- icon: Qs,
3805
+ icon: ec,
3806
3806
  summary: {
3807
3807
  coordType: "polar",
3808
3808
  geom: "bar",
@@ -3813,31 +3813,31 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3813
3813
  },
3814
3814
  {
3815
3815
  name: "donut",
3816
- icon: js,
3816
+ icon: Js,
3817
3817
  summary: {
3818
3818
  coordType: "polar",
3819
3819
  geom: "bar",
3820
3820
  position: "fill",
3821
3821
  theta: "y",
3822
- innerRadius: nc
3822
+ innerRadius: tc
3823
3823
  }
3824
3824
  }
3825
- ], tc = 0.05, rc = (e) => e === null ? null : De.find((t) => oc(t.summary, e)) ?? null, ac = (e, t) => {
3825
+ ], rc = 0.05, ac = (e) => e === null ? null : Re.find((t) => ic(t.summary, e)) ?? null, oc = (e, t) => {
3826
3826
  const { summary: r } = e;
3827
3827
  return r.coordType !== "polar" || !we(r.innerRadius) || t === null || t.coordType !== "polar" || !we(t.innerRadius) ? r : {
3828
3828
  ...r,
3829
3829
  innerRadius: t.innerRadius
3830
3830
  };
3831
- }, oc = (e, t) => e.coordType !== t.coordType || e.geom !== t.geom || e.position !== t.position ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && we(e.innerRadius) === we(t.innerRadius), we = (e) => e >= tc, ic = 3, C1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3832
- const a = O(), o = R(a), i = I(), { RadioGrid: l } = M(), c = k(() => De.map(({ name: u, icon: v }) => ({
3831
+ }, ic = (e, t) => e.coordType !== t.coordType || e.geom !== t.geom || e.position !== t.position ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && we(e.innerRadius) === we(t.innerRadius), we = (e) => e >= rc, lc = 3, C1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3832
+ const a = O(), o = R(a), i = I(), { RadioGrid: l } = M(), c = _(() => Re.map(({ name: u, icon: v }) => ({
3833
3833
  value: u,
3834
3834
  label: i(`editor.graphTypes.${u}`),
3835
3835
  icon: /* @__PURE__ */ n(v, { size: "md" })
3836
3836
  })), [i]);
3837
3837
  if (!o) return null;
3838
- const s = Ba(o.spec), h = rc(s), d = (u) => {
3839
- const v = De.find((m) => m.name === u);
3840
- v && a.commands.dispatch(new Nr(ac(v, s)));
3838
+ const s = Ba(o.spec), h = ac(s), d = (u) => {
3839
+ const v = Re.find((m) => m.name === u);
3840
+ v && a.commands.dispatch(new kr(oc(v, s)));
3841
3841
  };
3842
3842
  return /* @__PURE__ */ n(D, {
3843
3843
  title: e ?? i("editor.graphPanel.graphTypeSection.title"),
@@ -3846,36 +3846,36 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3846
3846
  children: /* @__PURE__ */ n(l, {
3847
3847
  value: h?.name ?? "",
3848
3848
  options: c,
3849
- columns: ic,
3849
+ columns: lc,
3850
3850
  onChange: d,
3851
3851
  ariaLabel: i("editor.graphPanel.graphTypeSection.title")
3852
3852
  })
3853
3853
  });
3854
- }, xn = [
3854
+ }, Sn = [
3855
3855
  "solid",
3856
3856
  "dashed",
3857
3857
  "dotted"
3858
- ], lc = Number.parseFloat(cr.gridLineWidth), sc = 8, cc = 0, f1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3859
- const a = O(), o = R(a), i = I(), { Slider: l, Switch: c, ToggleGroup: s } = M(), { themeValues: h } = Ve();
3858
+ ], sc = Number.parseFloat(dr.gridLineWidth), cc = 8, dc = 0, b1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3859
+ const a = O(), o = R(a), i = I(), { Slider: l, Switch: c, ToggleGroup: s } = M(), { themeValues: h } = He();
3860
3860
  if (!o) return null;
3861
- const d = o.guides.axes.filter(dc);
3861
+ const d = o.guides.axes.filter(hc);
3862
3862
  if (d.length === 0) return null;
3863
- const u = o.coordSystem.type !== "polar", v = d.some((b) => b.gridVisible), m = o.config.axes.y.grid, g = xn.map((b) => ({
3863
+ const u = o.coordSystem.type !== "polar", v = d.some((b) => b.gridVisible), m = o.config.axes.y.grid, g = Sn.map((b) => ({
3864
3864
  value: b,
3865
3865
  label: i(`editor.graphPanel.gridSection.lineStyles.${b}`)
3866
- })), C = (b) => (T) => {
3867
- a.commands.dispatch(new zr({
3866
+ })), f = (b) => (T) => {
3867
+ a.commands.dispatch(new Fr({
3868
3868
  axis: b,
3869
3869
  isVisible: T
3870
3870
  }));
3871
3871
  }, P = (b) => {
3872
- const T = xn.find((x) => x === b);
3873
- T && a.commands.dispatch(new Hr({
3872
+ const T = Sn.find((x) => x === b);
3873
+ T && a.commands.dispatch(new Vr({
3874
3874
  axis: "both",
3875
3875
  lineStyle: T
3876
3876
  }));
3877
3877
  }, w = (b) => {
3878
- a.commands.dispatch(new Vr({
3878
+ a.commands.dispatch(new zr({
3879
3879
  axis: "both",
3880
3880
  lineWidth: b
3881
3881
  }), { transient: !0 });
@@ -3884,25 +3884,25 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3884
3884
  title: e ?? i("editor.graphPanel.gridSection.title"),
3885
3885
  layout: t,
3886
3886
  preview: r,
3887
- children: /* @__PURE__ */ p(F, { children: [d.map((b) => /* @__PURE__ */ n(f, {
3888
- label: i(hc(b)),
3887
+ children: /* @__PURE__ */ p(F, { children: [d.map((b) => /* @__PURE__ */ n(C, {
3888
+ label: i(uc(b)),
3889
3889
  children: /* @__PURE__ */ n(c, {
3890
3890
  isChecked: b.gridVisible,
3891
- onChange: C(b.scaleAestheticKey)
3891
+ onChange: f(b.scaleAestheticKey)
3892
3892
  })
3893
- }, b.scaleAestheticKey)), u && v && /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(f, {
3893
+ }, b.scaleAestheticKey)), u && v && /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(C, {
3894
3894
  label: i("editor.graphPanel.gridSection.gridStyle"),
3895
3895
  children: /* @__PURE__ */ n(s, {
3896
3896
  value: m.lineStyle,
3897
3897
  options: g,
3898
3898
  onChange: P
3899
3899
  })
3900
- }), /* @__PURE__ */ n(f, {
3900
+ }), /* @__PURE__ */ n(C, {
3901
3901
  label: i("editor.graphPanel.gridSection.gridThickness"),
3902
3902
  children: /* @__PURE__ */ n(l, {
3903
- value: m.lineWidth ?? Yt(h.gridLineWidth, lc),
3904
- min: cc,
3905
- max: sc,
3903
+ value: m.lineWidth ?? jt(h.gridLineWidth, sc),
3904
+ min: dc,
3905
+ max: cc,
3906
3906
  step: 0.5,
3907
3907
  formatValue: Pe,
3908
3908
  onChange: w,
@@ -3910,27 +3910,27 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3910
3910
  })
3911
3911
  })] })] })
3912
3912
  });
3913
- }, dc = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", hc = (e) => e.geometry === "radial" ? "editor.graphPanel.gridSection.rings" : e.geometry === "circular" ? "editor.graphPanel.gridSection.spokes" : e.scaleAestheticKey === "x" ? "editor.graphPanel.gridSection.verticalGridLines" : "editor.graphPanel.gridSection.horizontalGridLines", uc = "total", It = [
3913
+ }, hc = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", uc = (e) => e.geometry === "radial" ? "editor.graphPanel.gridSection.rings" : e.geometry === "circular" ? "editor.graphPanel.gridSection.spokes" : e.scaleAestheticKey === "x" ? "editor.graphPanel.gridSection.verticalGridLines" : "editor.graphPanel.gridSection.horizontalGridLines", mc = "total", It = [
3914
3914
  "total",
3915
3915
  "average",
3916
3916
  "current"
3917
- ], mc = ["total"], Tn = ["previous", "first"], Ln = [
3917
+ ], pc = ["total"], wn = ["previous", "first"], xn = [
3918
3918
  "auto",
3919
3919
  "small",
3920
3920
  "medium",
3921
3921
  "large"
3922
- ], b1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3922
+ ], y1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3923
3923
  const a = O(), o = R(a), i = I(), { Switch: l, ToggleGroup: c } = M();
3924
3924
  if (!o) return null;
3925
3925
  const s = o.config.headline, h = s.show !== "none", d = o.coordSystem, u = d.type === "polar", v = d.type === "polar" && d.innerRadius > 0, m = o.layers.some((S) => S.summary.grandTotal !== void 0);
3926
3926
  if (u && !m) return null;
3927
- const g = u ? mc : It, C = o.guides.headline, P = C?.kind === "perGroup" && C.items.some((S) => S.comparison !== null), w = g.map((S) => ({
3927
+ const g = u ? pc : It, f = o.guides.headline, P = f?.kind === "perGroup" && f.items.some((S) => S.comparison !== null), w = g.map((S) => ({
3928
3928
  value: S,
3929
3929
  label: i(`editor.graphPanel.headlineNumberSection.metrics.${S}`)
3930
- })), b = Tn.map((S) => ({
3930
+ })), b = wn.map((S) => ({
3931
3931
  value: S,
3932
3932
  label: i(`editor.graphPanel.headlineNumberSection.comparison.${S}`)
3933
- })), T = Ln.map((S) => ({
3933
+ })), T = xn.map((S) => ({
3934
3934
  value: S,
3935
3935
  label: i(S === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${S}`)
3936
3936
  })), x = [{
@@ -3940,31 +3940,31 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3940
3940
  value: "center",
3941
3941
  label: i("editor.graphPanel.headlineNumberSection.position.center")
3942
3942
  }], N = (S) => {
3943
- a.commands.dispatch(new en({ show: S ? uc : "none" }));
3943
+ a.commands.dispatch(new Je({ show: S ? mc : "none" }));
3944
3944
  }, V = (S) => {
3945
- const _ = g.find((ee) => ee === S);
3946
- _ && a.commands.dispatch(new en({ show: _ }));
3947
- }, E = (S) => {
3948
- const _ = Tn.find((ee) => ee === S);
3949
- _ && a.commands.dispatch(new Fr({ compareWith: _ }));
3950
- }, B = (S) => {
3951
- const _ = Ln.find((ee) => ee === S);
3952
- _ && a.commands.dispatch(new Gr({ size: _ }));
3945
+ const E = g.find((Q) => Q === S);
3946
+ E && a.commands.dispatch(new Je({ show: E }));
3947
+ }, k = (S) => {
3948
+ const E = wn.find((Q) => Q === S);
3949
+ E && a.commands.dispatch(new Gr({ compareWith: E }));
3950
+ }, G = (S) => {
3951
+ const E = xn.find((Q) => Q === S);
3952
+ E && a.commands.dispatch(new Kr({ size: E }));
3953
3953
  }, A = (S) => {
3954
3954
  a.commands.dispatch(new Br({ position: S === "center" ? "center" : "above" }));
3955
3955
  };
3956
3956
  return /* @__PURE__ */ n(D, {
3957
3957
  title: e ?? i("editor.graphPanel.headlineNumberSection.title"),
3958
3958
  layout: t,
3959
- preview: r ?? pc(i, s.show),
3960
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
3959
+ preview: r ?? gc(i, s.show),
3960
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
3961
3961
  label: i("editor.graphPanel.headlineNumberSection.toggle"),
3962
3962
  children: /* @__PURE__ */ n(l, {
3963
3963
  isChecked: h,
3964
3964
  onChange: N
3965
3965
  })
3966
- }), h && /* @__PURE__ */ p(G, { children: [
3967
- w.length > 1 && /* @__PURE__ */ n(f, {
3966
+ }), h && /* @__PURE__ */ p(B, { children: [
3967
+ w.length > 1 && /* @__PURE__ */ n(C, {
3968
3968
  label: i("editor.graphPanel.headlineNumberSection.metricLabel"),
3969
3969
  layout: "stack",
3970
3970
  children: /* @__PURE__ */ n(c, {
@@ -3973,24 +3973,24 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3973
3973
  onChange: V
3974
3974
  })
3975
3975
  }),
3976
- P && /* @__PURE__ */ n(f, {
3976
+ P && /* @__PURE__ */ n(C, {
3977
3977
  label: i("editor.graphPanel.headlineNumberSection.compareWithLabel"),
3978
3978
  layout: "stack",
3979
3979
  children: /* @__PURE__ */ n(c, {
3980
- value: Ka(s.compareWith),
3980
+ value: Ua(s.compareWith),
3981
3981
  options: b,
3982
- onChange: E
3982
+ onChange: k
3983
3983
  })
3984
3984
  }),
3985
- /* @__PURE__ */ n(f, {
3985
+ /* @__PURE__ */ n(C, {
3986
3986
  label: i("editor.graphPanel.headlineNumberSize.sizeLabel"),
3987
3987
  children: /* @__PURE__ */ n(c, {
3988
3988
  value: s.size,
3989
3989
  options: T,
3990
- onChange: B
3990
+ onChange: G
3991
3991
  })
3992
3992
  }),
3993
- v && /* @__PURE__ */ n(f, {
3993
+ v && /* @__PURE__ */ n(C, {
3994
3994
  label: i("editor.axesPanel.controls.position"),
3995
3995
  children: /* @__PURE__ */ n(c, {
3996
3996
  value: s.position,
@@ -4000,7 +4000,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4000
4000
  })
4001
4001
  ] })] })
4002
4002
  });
4003
- }, pc = (e, t) => {
4003
+ }, gc = (e, t) => {
4004
4004
  const r = It.find((a) => a === t);
4005
4005
  return r && e(`editor.graphPanel.headlineNumberSection.metrics.${r}`);
4006
4006
  }, Ne = [
@@ -4009,16 +4009,16 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4009
4009
  "left",
4010
4010
  "right",
4011
4011
  "none"
4012
- ], Pn = [
4012
+ ], Tn = [
4013
4013
  "auto",
4014
4014
  "start",
4015
4015
  "center",
4016
4016
  "end"
4017
- ], In = [
4017
+ ], Ln = [
4018
4018
  "auto",
4019
4019
  "pill",
4020
4020
  "direct"
4021
- ], y1 = ({ positions: e, title: t, layout: r = "collapsible", preview: a }) => {
4021
+ ], S1 = ({ positions: e, title: t, layout: r = "collapsible", preview: a }) => {
4022
4022
  const o = O(), i = R(o), l = I(), { ToggleGroup: c } = M();
4023
4023
  if (!i) return null;
4024
4024
  const s = i.config.legend.position, h = e ?? Ne, d = i.guides.legends.drawn[0], u = Ca({
@@ -4027,40 +4027,40 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4027
4027
  layers: i.layers
4028
4028
  }), v = i.guides.headline?.kind === "perGroup", m = i.guides.colorGroups.length > 0;
4029
4029
  if (s === "auto" && d === void 0 && !u && (v || !m)) return null;
4030
- const g = d?.position ?? "none", C = s === "auto" ? g : s, P = Ne.filter((A) => A === C || h.includes(A)).map((A) => ({
4030
+ const g = d?.position ?? "none", f = s === "auto" ? g : s, P = Ne.filter((A) => A === f || h.includes(A)).map((A) => ({
4031
4031
  value: A,
4032
4032
  label: l(`editor.graphPanel.legendSection.${A}`)
4033
4033
  })), w = (A) => {
4034
- const S = Ne.find((_) => _ === A);
4035
- S && o.commands.dispatch(new Zr({ position: S }));
4034
+ const S = Ne.find((E) => E === A);
4035
+ S && o.commands.dispatch(new qr({ position: S }));
4036
4036
  }, b = (A) => {
4037
- const S = Pn.find((_) => _ === A);
4038
- S && o.commands.dispatch(new Ur({ align: S }));
4037
+ const S = Tn.find((E) => E === A);
4038
+ S && o.commands.dispatch(new Wr({ align: S }));
4039
4039
  }, T = (A) => {
4040
- const S = In.find((_) => _ === A);
4041
- S && o.commands.dispatch(new Wr({ display: S }));
4042
- }, x = Pn.map((A) => ({
4040
+ const S = Ln.find((E) => E === A);
4041
+ S && o.commands.dispatch(new Zr({ display: S }));
4042
+ }, x = Tn.map((A) => ({
4043
4043
  value: A,
4044
4044
  label: l(`editor.graphPanel.legendSection.align.${A}`)
4045
- })), N = In.map((A) => ({
4045
+ })), N = Ln.map((A) => ({
4046
4046
  value: A,
4047
4047
  label: l(`editor.graphPanel.legendSection.display.${A}`)
4048
- })), V = t ?? l("editor.graphPanel.legendSection.title"), E = P.find((A) => A.value === C)?.label, B = d !== void 0;
4048
+ })), V = t ?? l("editor.graphPanel.legendSection.title"), k = P.find((A) => A.value === f)?.label, G = d !== void 0;
4049
4049
  return /* @__PURE__ */ n(D, {
4050
4050
  title: V,
4051
4051
  layout: r,
4052
- preview: a ?? E,
4052
+ preview: a ?? k,
4053
4053
  children: /* @__PURE__ */ p(F, { children: [
4054
- /* @__PURE__ */ n(f, {
4054
+ /* @__PURE__ */ n(C, {
4055
4055
  label: l("editor.axesPanel.controls.position"),
4056
4056
  layout: "stack",
4057
4057
  children: /* @__PURE__ */ n(c, {
4058
- value: C,
4058
+ value: f,
4059
4059
  options: P,
4060
4060
  onChange: w
4061
4061
  })
4062
4062
  }),
4063
- B && /* @__PURE__ */ n(f, {
4063
+ G && /* @__PURE__ */ n(C, {
4064
4064
  label: l("editor.graphPanel.legendSection.alignLabel"),
4065
4065
  layout: "stack",
4066
4066
  children: /* @__PURE__ */ n(c, {
@@ -4069,7 +4069,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4069
4069
  onChange: b
4070
4070
  })
4071
4071
  }),
4072
- u && /* @__PURE__ */ n(f, {
4072
+ u && /* @__PURE__ */ n(C, {
4073
4073
  label: l("editor.graphPanel.legendSection.displayLabel"),
4074
4074
  layout: "stack",
4075
4075
  children: /* @__PURE__ */ n(c, {
@@ -4080,69 +4080,69 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4080
4080
  })
4081
4081
  ] })
4082
4082
  });
4083
- }, gc = 1, vc = 20, Cc = 0.5, At = ({ layerId: e }) => {
4084
- const t = O(), r = R(t), { Slider: a } = M(), o = Ye(r, e);
4083
+ }, vc = 1, fc = 20, Cc = 0.5, At = ({ layerId: e }) => {
4084
+ const t = O(), r = R(t), { Slider: a } = M(), o = Xe(r, e);
4085
4085
  if (!r) return null;
4086
4086
  const i = (l) => {
4087
- const c = new Yr({
4087
+ const c = new jr({
4088
4088
  layerId: e,
4089
4089
  size: l
4090
4090
  });
4091
4091
  t.commands.dispatch(c, { transient: !0 });
4092
4092
  };
4093
4093
  return /* @__PURE__ */ n(a, {
4094
- value: o?.get("size") ?? vr,
4095
- min: gc,
4096
- max: vc,
4094
+ value: o?.get("size") ?? fr,
4095
+ min: vc,
4096
+ max: fc,
4097
4097
  step: Cc,
4098
4098
  formatValue: Pe,
4099
4099
  onChange: i,
4100
4100
  onCommit: t.commands.seal
4101
4101
  });
4102
- }, fc = 1, bc = 10, yc = 0.1, Sc = [
4102
+ }, bc = 1, yc = 10, Sc = 0.1, wc = [
4103
4103
  "gap",
4104
4104
  "zero",
4105
4105
  "connect"
4106
- ], S1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4107
- const a = O(), o = R(a), i = I(), { Select: l, Slider: c, Switch: s, ToggleGroup: h } = M(), d = o?.spec.layers ?? [], u = zn(d, "line", "area"), v = Ye(o, u?.id ?? null);
4106
+ ], w1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4107
+ const a = O(), o = R(a), i = I(), { Select: l, Slider: c, Switch: s, ToggleGroup: h } = M(), d = o?.spec.layers ?? [], u = Vn(d, "line", "area"), v = Xe(o, u?.id ?? null);
4108
4108
  if (!o || !u) return null;
4109
- const m = o.coordSystem.type === "polar", g = Tc(i, u), C = xc(u, d), P = An(o.spec, u.geom, "strokeWidth", u.id), w = typeof P == "number", b = u.geom === "line" ? u : void 0, T = [{
4109
+ const m = o.coordSystem.type === "polar", g = Lc(i, u), f = Tc(u, d), P = Pn(o.spec, u.geom, "strokeWidth", u.id), w = typeof P == "number", b = u.geom === "line" ? u : void 0, T = [{
4110
4110
  value: "auto",
4111
4111
  label: i("editor.graphPanel.numberFormat.options.auto")
4112
4112
  }, {
4113
4113
  value: "custom",
4114
4114
  label: i("editor.graphPanel.numberFormat.options.custom")
4115
4115
  }], x = (S) => {
4116
- a.commands.dispatch(new da({
4116
+ a.commands.dispatch(new ha({
4117
4117
  layerId: u.id,
4118
4118
  showPoints: S
4119
4119
  }));
4120
4120
  }, N = (S) => {
4121
- b && a.commands.dispatch(new ca({
4121
+ b && a.commands.dispatch(new da({
4122
4122
  layerId: b.id,
4123
4123
  showFill: S
4124
4124
  }));
4125
4125
  }, V = (S) => {
4126
- a.commands.dispatch(new qr({
4126
+ a.commands.dispatch(new $r({
4127
4127
  layerId: u.id,
4128
4128
  interpolate: S ? "catmull-rom" : "linear"
4129
4129
  }));
4130
- }, E = (S) => {
4131
- const _ = v?.get("strokeWidth") ?? Cr;
4132
- a.commands.dispatch(new nn({
4130
+ }, k = (S) => {
4131
+ const E = v?.get("strokeWidth") ?? Cr;
4132
+ a.commands.dispatch(new Qe({
4133
4133
  layerId: u.id,
4134
- lineWidth: S === "custom" ? _ : null
4134
+ lineWidth: S === "custom" ? E : null
4135
4135
  }));
4136
- }, B = (S) => {
4137
- a.commands.dispatch(new nn({
4136
+ }, G = (S) => {
4137
+ a.commands.dispatch(new Qe({
4138
4138
  layerId: u.id,
4139
4139
  lineWidth: S
4140
4140
  }), { transient: !0 });
4141
4141
  }, A = (S) => {
4142
- const _ = wc(S);
4143
- _ && a.commands.dispatch(new $r({
4142
+ const E = xc(S);
4143
+ E && a.commands.dispatch(new Xr({
4144
4144
  layerId: u.id,
4145
- missingValues: _
4145
+ missingValues: E
4146
4146
  }));
4147
4147
  };
4148
4148
  return /* @__PURE__ */ n(D, {
@@ -4150,52 +4150,52 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4150
4150
  layout: t,
4151
4151
  preview: r,
4152
4152
  children: /* @__PURE__ */ p(F, { children: [
4153
- /* @__PURE__ */ n(f, {
4153
+ /* @__PURE__ */ n(C, {
4154
4154
  label: i("editor.graphPanel.graphOptions.showPoints"),
4155
4155
  children: /* @__PURE__ */ n(s, {
4156
- isChecked: C !== void 0,
4156
+ isChecked: f !== void 0,
4157
4157
  onChange: x
4158
4158
  })
4159
4159
  }),
4160
- C && /* @__PURE__ */ n(f, {
4160
+ f && /* @__PURE__ */ n(C, {
4161
4161
  label: i("editor.graphPanel.pointSize.label"),
4162
- children: /* @__PURE__ */ n(At, { layerId: C.id })
4162
+ children: /* @__PURE__ */ n(At, { layerId: f.id })
4163
4163
  }),
4164
- b && !m && /* @__PURE__ */ n(f, {
4164
+ b && !m && /* @__PURE__ */ n(C, {
4165
4165
  label: i("editor.graphPanel.graphOptions.lineFill"),
4166
4166
  children: /* @__PURE__ */ n(s, {
4167
- isChecked: An(o.spec, "line", "fillAlpha", b.id) !== void 0,
4167
+ isChecked: Pn(o.spec, "line", "fillAlpha", b.id) !== void 0,
4168
4168
  onChange: N
4169
4169
  })
4170
4170
  }),
4171
- !m && /* @__PURE__ */ n(f, {
4171
+ !m && /* @__PURE__ */ n(C, {
4172
4172
  label: i("editor.graphPanel.graphOptions.smoothLines"),
4173
4173
  children: /* @__PURE__ */ n(s, {
4174
4174
  isChecked: u.params.interpolate === "catmull-rom",
4175
4175
  onChange: V
4176
4176
  })
4177
4177
  }),
4178
- /* @__PURE__ */ n(f, {
4178
+ /* @__PURE__ */ n(C, {
4179
4179
  label: i("editor.graphPanel.lineThickness.label"),
4180
4180
  children: /* @__PURE__ */ n(h, {
4181
4181
  value: w ? "custom" : "auto",
4182
4182
  options: T,
4183
- onChange: E
4183
+ onChange: k
4184
4184
  })
4185
4185
  }),
4186
- w && /* @__PURE__ */ n(f, {
4186
+ w && /* @__PURE__ */ n(C, {
4187
4187
  label: i("editor.graphPanel.numberFormat.valueLabel"),
4188
4188
  children: /* @__PURE__ */ n(c, {
4189
4189
  value: P,
4190
- min: fc,
4191
- max: bc,
4192
- step: yc,
4190
+ min: bc,
4191
+ max: yc,
4192
+ step: Sc,
4193
4193
  formatValue: Pe,
4194
- onChange: B,
4194
+ onChange: G,
4195
4195
  onCommit: a.commands.seal
4196
4196
  })
4197
4197
  }),
4198
- !m && g.length > 1 && /* @__PURE__ */ n(f, {
4198
+ !m && g.length > 1 && /* @__PURE__ */ n(C, {
4199
4199
  label: i("editor.fineTunePanel.detailSection.missingValues"),
4200
4200
  children: /* @__PURE__ */ n(l, {
4201
4201
  value: u.params.missingValues,
@@ -4205,7 +4205,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4205
4205
  })
4206
4206
  ] })
4207
4207
  });
4208
- }, wc = (e) => Sc.find((t) => t === e), An = (e, t, r, a) => Oa(e.styles.overrides, pa(t, a))?.[r], xc = (e, t) => ke(t, "point").find((r) => Fn(r, [e])), Tc = (e, t) => {
4208
+ }, xc = (e) => wc.find((t) => t === e), Pn = (e, t, r, a) => Ma(e.styles.overrides, ga(t, a))?.[r], Tc = (e, t) => ke(t, "point").find((r) => zn(r, [e])), Lc = (e, t) => {
4209
4209
  const r = [{
4210
4210
  value: "gap",
4211
4211
  label: e("editor.graphPanel.treatEmptyValues.leaveGap.label")
@@ -4217,7 +4217,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4217
4217
  value: "connect",
4218
4218
  label: e("editor.graphPanel.treatEmptyValues.connectGaps.label")
4219
4219
  }), t.geom === "area" ? r.filter((a) => a.value !== "gap") : r;
4220
- }, Lc = "k", Pc = 2, Ic = 0, Ac = 5, He = [
4220
+ }, Pc = "k", Ic = 2, Ac = 0, Oc = 5, De = [
4221
4221
  {
4222
4222
  value: "k",
4223
4223
  labelKey: "thousands"
@@ -4230,34 +4230,34 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4230
4230
  value: "b",
4231
4231
  labelKey: "billions"
4232
4232
  }
4233
- ], Oc = ["auto", "none"], w1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4233
+ ], Mc = ["auto", "none"], x1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4234
4234
  const a = O(), o = R(a), i = I(), { NumberField: l, ToggleGroup: c } = M();
4235
4235
  if (!o) return null;
4236
- const { abbreviation: s, decimals: h } = o.config.numberFormat, d = Mc(s) !== void 0, u = h !== "auto", v = (T) => T.map((x) => ({
4236
+ const { abbreviation: s, decimals: h } = o.config.numberFormat, d = Nc(s) !== void 0, u = h !== "auto", v = (T) => T.map((x) => ({
4237
4237
  value: x,
4238
4238
  label: i(`editor.graphPanel.numberFormat.options.${x}`)
4239
- })), m = He.map(({ value: T, labelKey: x }) => ({
4239
+ })), m = De.map(({ value: T, labelKey: x }) => ({
4240
4240
  value: T,
4241
4241
  label: i(`common.abbreviations.${x}`)
4242
4242
  })), g = (T) => {
4243
- a.commands.dispatch(new Xr({ abbreviation: T }));
4244
- }, C = (T) => {
4245
- const x = Oc.find((N) => N === T);
4246
- g(x ?? Lc);
4243
+ a.commands.dispatch(new Yr({ abbreviation: T }));
4244
+ }, f = (T) => {
4245
+ const x = Mc.find((N) => N === T);
4246
+ g(x ?? Pc);
4247
4247
  }, P = (T) => {
4248
- const x = He.find((N) => N.value === T);
4248
+ const x = De.find((N) => N.value === T);
4249
4249
  x && g(x.value);
4250
4250
  }, w = (T) => {
4251
- a.commands.dispatch(new tn({ decimals: T === "custom" ? Pc : "auto" }));
4251
+ a.commands.dispatch(new en({ decimals: T === "custom" ? Ic : "auto" }));
4252
4252
  }, b = (T) => {
4253
- T !== null && a.commands.dispatch(new tn({ decimals: T }), { transient: !0 });
4253
+ T !== null && a.commands.dispatch(new en({ decimals: T }), { transient: !0 });
4254
4254
  };
4255
4255
  return /* @__PURE__ */ n(D, {
4256
4256
  title: e ?? i("editor.graphPanel.numberFormatSection.title"),
4257
4257
  layout: t,
4258
4258
  preview: r,
4259
4259
  children: /* @__PURE__ */ p(F, { children: [
4260
- /* @__PURE__ */ n(f, {
4260
+ /* @__PURE__ */ n(C, {
4261
4261
  label: i("editor.graphPanel.numberFormat.abbreviationLabel"),
4262
4262
  children: /* @__PURE__ */ n(c, {
4263
4263
  value: d ? "custom" : s,
@@ -4266,10 +4266,10 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4266
4266
  "none",
4267
4267
  "custom"
4268
4268
  ]),
4269
- onChange: C
4269
+ onChange: f
4270
4270
  })
4271
4271
  }),
4272
- d && /* @__PURE__ */ n(f, {
4272
+ d && /* @__PURE__ */ n(C, {
4273
4273
  label: i("editor.graphPanel.numberFormat.valueLabel"),
4274
4274
  children: /* @__PURE__ */ n(c, {
4275
4275
  value: s,
@@ -4277,7 +4277,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4277
4277
  onChange: P
4278
4278
  })
4279
4279
  }),
4280
- /* @__PURE__ */ n(f, {
4280
+ /* @__PURE__ */ n(C, {
4281
4281
  label: i("editor.graphPanel.numberFormat.decimalPlacesLabel"),
4282
4282
  children: /* @__PURE__ */ n(c, {
4283
4283
  value: u ? "custom" : "auto",
@@ -4285,71 +4285,71 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4285
4285
  onChange: w
4286
4286
  })
4287
4287
  }),
4288
- u && /* @__PURE__ */ n(f, {
4288
+ u && /* @__PURE__ */ n(C, {
4289
4289
  label: i("editor.graphPanel.numberFormat.valueLabel"),
4290
4290
  children: /* @__PURE__ */ n(l, {
4291
4291
  value: h,
4292
- min: Ic,
4293
- max: Ac,
4292
+ min: Ac,
4293
+ max: Oc,
4294
4294
  onChange: b,
4295
4295
  onCommit: a.commands.seal
4296
4296
  })
4297
4297
  })
4298
4298
  ] })
4299
4299
  });
4300
- }, Mc = (e) => He.find((t) => t.value === e), x1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4300
+ }, Nc = (e) => De.find((t) => t.value === e), T1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4301
4301
  const a = R(O()), o = I();
4302
4302
  if (!a) return null;
4303
- const i = Nc(a.spec.layers);
4303
+ const i = kc(a.spec.layers);
4304
4304
  return i ? /* @__PURE__ */ n(D, {
4305
4305
  title: e ?? o("editor.graphPanel.pointSize.label"),
4306
4306
  layout: t,
4307
4307
  preview: r,
4308
- children: /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(f, {
4308
+ children: /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(C, {
4309
4309
  label: o("editor.graphPanel.numberFormat.valueLabel"),
4310
4310
  children: /* @__PURE__ */ n(At, { layerId: i.id })
4311
4311
  }) })
4312
4312
  }) : null;
4313
- }, Nc = (e) => {
4313
+ }, kc = (e) => {
4314
4314
  const t = ke(e, "line", "area");
4315
- return ke(e, "point").find((r) => !Fn(r, t));
4316
- }, Ec = 0.9, kc = 360, _c = 0.05, Rc = 15, T1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4315
+ return ke(e, "point").find((r) => !zn(r, t));
4316
+ }, _c = 0.9, Ec = 360, Rc = 0.05, Dc = 15, L1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4317
4317
  const a = O(), o = R(a), i = I(), { Slider: l } = M();
4318
4318
  if (!o || o.spec.coords.coordType !== "polar") return null;
4319
4319
  const { innerRadius: c, startAngle: s } = o.spec.coords.params, h = (u) => {
4320
- a.commands.dispatch(new jr({ innerRadius: u }), { transient: !0 });
4320
+ a.commands.dispatch(new Jr({ innerRadius: u }), { transient: !0 });
4321
4321
  }, d = (u) => {
4322
- a.commands.dispatch(new Jr({ startAngle: u }), { transient: !0 });
4322
+ a.commands.dispatch(new Qr({ startAngle: u }), { transient: !0 });
4323
4323
  };
4324
4324
  return /* @__PURE__ */ n(D, {
4325
4325
  title: e ?? i("editor.graphPanel.polarSection.title"),
4326
4326
  layout: t,
4327
4327
  preview: r,
4328
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
4328
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
4329
4329
  label: i("editor.graphPanel.polarSection.innerRadius"),
4330
4330
  children: /* @__PURE__ */ n(l, {
4331
4331
  value: c,
4332
4332
  min: 0,
4333
- max: Ec,
4334
- step: _c,
4333
+ max: _c,
4334
+ step: Rc,
4335
4335
  formatValue: Pt,
4336
4336
  onChange: h,
4337
4337
  onCommit: a.commands.seal
4338
4338
  })
4339
- }), /* @__PURE__ */ n(f, {
4339
+ }), /* @__PURE__ */ n(C, {
4340
4340
  label: i("editor.graphPanel.polarSection.startAngle"),
4341
4341
  children: /* @__PURE__ */ n(l, {
4342
4342
  value: s,
4343
4343
  min: 0,
4344
- max: kc - 1,
4345
- step: Rc,
4346
- formatValue: Ls,
4344
+ max: Ec - 1,
4345
+ step: Dc,
4346
+ formatValue: Ps,
4347
4347
  onChange: d,
4348
4348
  onCommit: a.commands.seal
4349
4349
  })
4350
4350
  })] })
4351
4351
  });
4352
- }, Dc = (e) => /* @__PURE__ */ p(L, {
4352
+ }, Hc = (e) => /* @__PURE__ */ p(L, {
4353
4353
  ...e,
4354
4354
  children: [
4355
4355
  /* @__PURE__ */ n("path", {
@@ -4372,7 +4372,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4372
4372
  fill: "currentColor"
4373
4373
  })
4374
4374
  ]
4375
- }), On = (e) => /* @__PURE__ */ p(L, {
4375
+ }), In = (e) => /* @__PURE__ */ p(L, {
4376
4376
  ...e,
4377
4377
  children: [
4378
4378
  /* @__PURE__ */ n("path", {
@@ -4395,14 +4395,14 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4395
4395
  fill: "currentColor"
4396
4396
  })
4397
4397
  ]
4398
- }), Hc = (e) => k(() => {
4398
+ }), Vc = (e) => _(() => {
4399
4399
  if (e === null) return {
4400
4400
  options: [],
4401
4401
  findValue: () => {
4402
4402
  }
4403
4403
  };
4404
4404
  const { parsingLocale: t, numberFormat: r } = e.config, a = e.guides.colorGroups.map((o) => {
4405
- const i = wa({
4405
+ const i = xa({
4406
4406
  valueFormat: o.valueFormat,
4407
4407
  locale: t,
4408
4408
  numberFormat: r
@@ -4419,7 +4419,7 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4419
4419
  options: a.map(({ option: o }) => o),
4420
4420
  findValue: (o) => a.find((i) => i.option.value === o)?.value
4421
4421
  };
4422
- }, [e]), Mn = [
4422
+ }, [e]), An = [
4423
4423
  "linear",
4424
4424
  "exponential",
4425
4425
  "quadratic",
@@ -4427,41 +4427,41 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4427
4427
  "logarithmic",
4428
4428
  "power",
4429
4429
  "loess"
4430
- ], Vc = "linear", L1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4431
- const a = O(), o = R(a), i = I(), { Select: l, Switch: c } = M(), { options: s, findValue: h } = Hc(o);
4430
+ ], zc = "linear", P1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4431
+ const a = O(), o = R(a), i = I(), { Select: l, Switch: c } = M(), { options: s, findValue: h } = Vc(o);
4432
4432
  if (!o || o.coordSystem.type === "polar") return null;
4433
- const d = Ea(o.spec.layers), u = Pa(o.spec.layers), v = d?.stat.type === "smooth" ? d.stat.method : Vc, m = zc(u), g = Mn.map((x) => ({
4433
+ const d = _a(o.spec.layers), u = Ia(o.spec.layers), v = d?.stat.type === "smooth" ? d.stat.method : zc, m = Fc(u), g = An.map((x) => ({
4434
4434
  value: x,
4435
4435
  label: i(`editor.annotationsPanel.trendType.options.${x}`)
4436
- })), C = (x, N = {}) => {
4437
- const V = d ?? u, E = new ra({
4436
+ })), f = (x, N = {}) => {
4437
+ const V = d ?? u, k = new aa({
4438
4438
  line: x,
4439
4439
  ...N,
4440
4440
  ...V !== void 0 && { layerId: V.id },
4441
4441
  label: i("editor.annotationsPanel.trendsAndAveragesSection.average")
4442
4442
  });
4443
- a.commands.dispatch(E);
4444
- }, P = (x) => C(x ? "trend" : "none", { method: v }), w = (x) => C(x ? "average" : "none", { group: m ?? h(s[0]?.value ?? "") }), b = (x) => {
4445
- const N = Mn.find((V) => V === x);
4446
- N !== void 0 && C("trend", { method: N });
4443
+ a.commands.dispatch(k);
4444
+ }, P = (x) => f(x ? "trend" : "none", { method: v }), w = (x) => f(x ? "average" : "none", { group: m ?? h(s[0]?.value ?? "") }), b = (x) => {
4445
+ const N = An.find((V) => V === x);
4446
+ N !== void 0 && f("trend", { method: N });
4447
4447
  }, T = (x) => {
4448
4448
  const N = x === null ? void 0 : h(x);
4449
- N !== void 0 && C("average", { group: N });
4449
+ N !== void 0 && f("average", { group: N });
4450
4450
  };
4451
4451
  return /* @__PURE__ */ n(D, {
4452
4452
  title: e ?? i("editor.annotationsPanel.trendsAndAveragesSection.title"),
4453
4453
  layout: t,
4454
- preview: r ?? /* @__PURE__ */ n(On, { size: "lg" }),
4454
+ preview: r ?? /* @__PURE__ */ n(In, { size: "lg" }),
4455
4455
  children: /* @__PURE__ */ p(F, { children: [
4456
- /* @__PURE__ */ n(f, {
4456
+ /* @__PURE__ */ n(C, {
4457
4457
  label: i("editor.annotationsPanel.trendsAndAveragesSection.trend"),
4458
- icon: /* @__PURE__ */ n(On, { size: "lg" }),
4458
+ icon: /* @__PURE__ */ n(In, { size: "lg" }),
4459
4459
  children: /* @__PURE__ */ n(c, {
4460
4460
  isChecked: d !== void 0,
4461
4461
  onChange: P
4462
4462
  })
4463
4463
  }),
4464
- d !== void 0 && /* @__PURE__ */ n(f, {
4464
+ d !== void 0 && /* @__PURE__ */ n(C, {
4465
4465
  label: i("editor.annotationsPanel.trendType.label"),
4466
4466
  children: /* @__PURE__ */ n(l, {
4467
4467
  value: v,
@@ -4470,15 +4470,15 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4470
4470
  placeholder: i("editor.annotationsPanel.trendType.placeholder")
4471
4471
  })
4472
4472
  }),
4473
- /* @__PURE__ */ n(f, {
4473
+ /* @__PURE__ */ n(C, {
4474
4474
  label: i("editor.annotationsPanel.trendsAndAveragesSection.average"),
4475
- icon: /* @__PURE__ */ n(Dc, { size: "lg" }),
4475
+ icon: /* @__PURE__ */ n(Hc, { size: "lg" }),
4476
4476
  children: /* @__PURE__ */ n(c, {
4477
4477
  isChecked: u !== void 0,
4478
4478
  onChange: w
4479
4479
  })
4480
4480
  }),
4481
- u !== void 0 && s.length > 0 && /* @__PURE__ */ n(f, {
4481
+ u !== void 0 && s.length > 0 && /* @__PURE__ */ n(C, {
4482
4482
  label: i("editor.annotationsPanel.averageLineSeries.label"),
4483
4483
  children: /* @__PURE__ */ n(l, {
4484
4484
  value: m === void 0 ? null : String(m),
@@ -4490,49 +4490,49 @@ var cs = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4490
4490
  })
4491
4491
  ] })
4492
4492
  });
4493
- }, zc = (e) => {
4493
+ }, Fc = (e) => {
4494
4494
  const t = e?.transforms.find((r) => r.transformType === "filter")?.options.value;
4495
4495
  return t instanceof Date ? t.getTime() : t;
4496
4496
  };
4497
4497
  export {
4498
- u1 as AppearanceSection,
4499
- h1 as AxesPanel,
4500
- bn as AxisSection,
4501
- m1 as BarSection,
4502
- dl as Button,
4503
- p1 as CalloutsSection,
4498
+ m1 as AppearanceSection,
4499
+ u1 as AxesPanel,
4500
+ fn as AxisSection,
4501
+ p1 as BarSection,
4502
+ hl as Button,
4503
+ g1 as CalloutsSection,
4504
4504
  Cs as CaptionSection,
4505
- c1 as EditableGraphRenderer,
4505
+ d1 as EditableGraphRenderer,
4506
4506
  Tt as EditorPanel,
4507
- d1 as ElementsPanel,
4508
- g1 as GoalSection,
4509
- v1 as GraphOptionsSection,
4507
+ h1 as ElementsPanel,
4508
+ v1 as GoalSection,
4509
+ f1 as GraphOptionsSection,
4510
4510
  C1 as GraphTypeSection,
4511
- f1 as GridSection,
4512
- b1 as HeadlineSection,
4513
- Kc as IntlProvider,
4514
- y1 as LegendSection,
4515
- S1 as LineSection,
4516
- pl as NumberField,
4517
- w1 as NumberFormatSection,
4518
- es as PANEL_ROOT_ATTRIBUTE,
4519
- x1 as PointSection,
4520
- T1 as PolarSection,
4521
- fl as RadioGrid,
4522
- f as Row,
4511
+ b1 as GridSection,
4512
+ y1 as HeadlineSection,
4513
+ Uc as IntlProvider,
4514
+ S1 as LegendSection,
4515
+ w1 as LineSection,
4516
+ gl as NumberField,
4517
+ x1 as NumberFormatSection,
4518
+ ns as PANEL_ROOT_ATTRIBUTE,
4519
+ T1 as PointSection,
4520
+ L1 as PolarSection,
4521
+ bl as RadioGrid,
4522
+ C as Row,
4523
4523
  D as Section,
4524
- Il as Select,
4525
- Dl as Slider,
4526
- bs as SourceSection,
4527
- Ss as SubtitleSection,
4528
- Fl as Switch,
4529
- Kl as TextField,
4530
- xs as TextSizeSection,
4531
- Ts as TitleSection,
4532
- Zl as ToggleGroup,
4533
- us as ToggledSection,
4534
- L1 as TrendsAndAveragesSection,
4524
+ Al as Select,
4525
+ Hl as Slider,
4526
+ ys as SourceSection,
4527
+ ws as SubtitleSection,
4528
+ Gl as Switch,
4529
+ Ul as TextField,
4530
+ Ts as TextSizeSection,
4531
+ Ls as TitleSection,
4532
+ ql as ToggleGroup,
4533
+ ms as ToggledSection,
4534
+ P1 as TrendsAndAveragesSection,
4535
4535
  M as useControls,
4536
- Jl as usePanelExpansion,
4536
+ Ql as usePanelExpansion,
4537
4537
  O as usePanelGraph
4538
4538
  };