@graphysdk/react-renderer 1.9.0-beta.1791976962179 → 1.9.0-beta.1791986576442
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.cjs +1 -1
- package/dist/editable.css +1 -1
- package/dist/editable.mjs +642 -642
- package/dist/{history-chords-BpsDOHI_.cjs → history-chords-B-jtYg4U.cjs} +1 -1
- package/dist/{history-chords-T1AuwA5r.js → history-chords-BPqfDj1I.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/dist/editable.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as ta, $t as na, At as
|
|
2
|
-
import { ARROW_DEFAULTS as Wl, ARROW_STICKER_DECLARATIONS as Ul, ARROW_STROKE_WIDTHS_PX as Vt, AddAnnotationCommand as we, AddHighlightCommand as Kl, BORDER_RADIUS_TOKENS as Zn, COMBO_TYPES as Yn, CONSTANT_VARIABLES as ql, DASH_PRESETS as Xl, DEFAULT_BAR_CORNER_RADIUS as jl, DEFAULT_GEOM_COLOR as Zl, DEFAULT_POINT_SIZE_PX as Yl, DEFAULT_STROKE_WIDTH_PX as Jl, DIFFERENCE_ARROW_DEFAULTS as va, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Jn, InternalError as Ql, MAX_BAR_WIDTH_FRACTION as es, MIN_BAR_WIDTH_FRACTION as ts, MoveAnnotationCommand as ns, RESTING_HOVER_STATE as wn, RemoveAnnotationCommand as Ve, RemoveHighlightCommand as rs, SHAPE_DEFAULTS as as, SequenceCommand as os, SetAxisLabelCommand as fa, SetAxisPositionCommand as ba, SetAxisTickModeCommand as ya, SetAxisTicksVisibilityCommand as is, SetAxisVisibilityCommand as Zt, SetBarCornerRadiusCommand as ls, SetBarWidthCommand as ss, SetChartTypeCommand as Sa, SetContentCaptionCommand as Ca, SetContentSourceCommand as cs, SetContentSubtitleCommand as xa, SetContentTitleCommand as wa, SetDataLabelsFormatCommand as ka, SetDifferenceArrowStyleCommand as ds, SetGridLineStyleCommand as us, SetGridLineWidthCommand as hs, SetGridVisibilityCommand as Yt, SetHeadlineCompareWithCommand as ps, SetHeadlinePositionCommand as ms, SetHeadlineShowCommand as Qn, SetHeadlineSizeCommand as gs, SetHighlightDimStyleCommand as vs, SetLayerYScaleTypeCommand as fs, SetLegendAlignCommand as bs, SetLegendDisplayCommand as ys, SetLegendPlacementCommand as Ss, SetLegendPositionCommand as Jt, SetLineCurveCommand as Cs, SetLineMissingValuesCommand as xs, SetLineWidthCommand as er, SetMappingCommand as ws, SetNumberFormatAbbreviationCommand as ks, SetNumberFormatDecimalsCommand as tr, SetObservationsColorCommand as Ts, SetPointSizeCommand as As, SetPolarInnerRadiusCommand as Ls, SetPolarStartAngleCommand as Ps, SetRuleLabelCommand as Is, SetRuleValueCommand as Es, SetScaleDomainCommand as
|
|
1
|
+
import { $ as ta, $t as na, At as Ye, Bt as el, C as tl, D as nl, Dt as he, E as rl, Et as al, F as ol, G as $, H as il, I as T, J as ll, Jt as sl, K as cl, Mt as dl, N as ul, Nt as hl, O as ra, P as pl, Q as bn, S as ml, St as Oe, T as Le, Tt as gl, U as vl, Vt as aa, W as Q, Wt as fl, X as U, Xt as oa, Y as bl, Yt as yl, Z as yn, Zt as Sl, _ as Re, _t as Cl, b as ia, bn as Sn, bt as xl, c as la, cn as wl, ct as kl, d as Tl, dt as ce, en as sa, et as Cn, f as Al, fn as ca, g as da, gn as O, gt as Ll, h as kt, i as ua, it as ha, jt as ne, k as Tt, l as Pl, lt as Xn, m as Il, mn as q, n as le, nn as xn, nt as El, o as Ml, on as Ol, ot as Rl, p as pa, pt as At, q as jn, r as K, rn as ze, rt as ma, sn as Nl, st as Dl, t as _l, tn as se, tt as Lt, u as Fl, ut as Bl, v as zl, vn as z, vt as P, wt as Hl, x as Gl, y as Vl, yt as ga, z as $l } from "./history-chords-BPqfDj1I.js";
|
|
2
|
+
import { ARROW_DEFAULTS as Wl, ARROW_STICKER_DECLARATIONS as Ul, ARROW_STROKE_WIDTHS_PX as Vt, AddAnnotationCommand as we, AddHighlightCommand as Kl, BORDER_RADIUS_TOKENS as Zn, COMBO_TYPES as Yn, CONSTANT_VARIABLES as ql, DASH_PRESETS as Xl, DEFAULT_BAR_CORNER_RADIUS as jl, DEFAULT_GEOM_COLOR as Zl, DEFAULT_POINT_SIZE_PX as Yl, DEFAULT_STROKE_WIDTH_PX as Jl, DIFFERENCE_ARROW_DEFAULTS as va, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Jn, InternalError as Ql, MAX_BAR_WIDTH_FRACTION as es, MIN_BAR_WIDTH_FRACTION as ts, MoveAnnotationCommand as ns, RESTING_HOVER_STATE as wn, RemoveAnnotationCommand as Ve, RemoveHighlightCommand as rs, SHAPE_DEFAULTS as as, SequenceCommand as os, SetAxisLabelCommand as fa, SetAxisPositionCommand as ba, SetAxisTickModeCommand as ya, SetAxisTicksVisibilityCommand as is, SetAxisVisibilityCommand as Zt, SetBarCornerRadiusCommand as ls, SetBarWidthCommand as ss, SetChartTypeCommand as Sa, SetContentCaptionCommand as Ca, SetContentSourceCommand as cs, SetContentSubtitleCommand as xa, SetContentTitleCommand as wa, SetDataLabelsFormatCommand as ka, SetDifferenceArrowStyleCommand as ds, SetGridLineStyleCommand as us, SetGridLineWidthCommand as hs, SetGridVisibilityCommand as Yt, SetHeadlineCompareWithCommand as ps, SetHeadlinePositionCommand as ms, SetHeadlineShowCommand as Qn, SetHeadlineSizeCommand as gs, SetHighlightDimStyleCommand as vs, SetLayerYScaleTypeCommand as fs, SetLegendAlignCommand as bs, SetLegendDisplayCommand as ys, SetLegendPlacementCommand as Ss, SetLegendPositionCommand as Jt, SetLineCurveCommand as Cs, SetLineMissingValuesCommand as xs, SetLineWidthCommand as er, SetMappingCommand as ws, SetNumberFormatAbbreviationCommand as ks, SetNumberFormatDecimalsCommand as tr, SetObservationsColorCommand as Ts, SetPointSizeCommand as As, SetPolarInnerRadiusCommand as Ls, SetPolarStartAngleCommand as Ps, SetRuleLabelCommand as Is, SetRuleValueCommand as Es, SetScaleDomainCommand as je, SetScaleRangeCommand as Ms, SetScaleReverseCommand as Os, SetScaleTransformCommand as Ta, SetStatLineCommand as Rs, SetStyleRuleCommand as Ee, TEXT_ANNOTATION_DEFAULTS as Ns, TEXT_ANNOTATION_FADE_ALPHA as Ds, ToggleCategoryLabelsCommand as Aa, ToggleContentVisibilityCommand as Pt, ToggleDataLabelsCommand as La, ToggleGoalLineCommand as _s, ToggleLineFillCommand as Fs, ToggleLinePointsCommand as Bs, ToggleStackTotalsCommand as Pa, UpdateAnnotationCommand as pe, alignUnitFractions as zs, areAnchorsEqual as Ia, areEditTargetsEqual as kn, areEndpointsComparable as Hs, buildEditMenuTriggerRegion as Gs, buildLayerStyleAddress as Vs, buildObservationPredicate as $s, buildObservationsTarget as Je, buildObservationsTargetAtValue as Ea, canAnchorDirectLabels as Ws, canBecomeCombo as Us, canBecomeHeatmap as Ks, clampAnnotationTranslation as qs, combineKindStyleDeclarations as nr, computeArrow as Ma, createObservationAnchorBuilder as Xs, createObservationAnchorParser as js, createStyleResolver as Zs, createValueFormatter as Oa, createXValueReader as Ys, filterLayersByGeoms as Qt, findAnnotation as Js, findAverageLineLayer as Qs, findAxisGuide as ec, findCompanionLayers as Ra, findGoalLineLayer as tc, findHighlightsAtObservation as nc, findHostLayer as rc, findLayerByGeom as Na, findLayerById as fe, findObservationAttachment as ac, findStyleRule as Te, findTrendLineLayer as oc, formatDifferenceLabel as ic, getBoundingRect as en, getGroupVariables as lc, getXBand as sc, getYBand as cc, hasMainAxisBand as dc, hasMultipleGroups as uc, inferDefaultDifferenceArrowEndpoints as hc, inferDifferenceArrowEndpoints as pc, isComboChartType as Ie, isCompanionLayer as Da, isObservationAttachmentKind as mc, isPointWithinEditMenuTrigger as Tn, isSafeUrl as gc, isZeroAnchoredAxis as _a, measureObservationsBoxes as Fa, projectAnchorToPanel as pt, readBroadestObservationsScope as vc, readChartType as Ba, readColorChoices as fc, readComboLineLayerId as bc, readCompanionRowsAtScopeKey as yc, readConstantValue as Sc, readEditTargetKey as It, readGeomColor as Cc, readHighlightDimStyle as xc, readMainAxis as wc, readMappableAesthetics as kc, readMappedVariable as Tc, readObservationIndex as za, readObservationsColor as Ac, readObservationsColorRoute as Lc, readReachableLevels as Pc, readRowScopeKey as Ic, readRowsAtScopeKey as Ec, readScopeXVariable as Mc, readStyleCoord as Ne, readStyleRulesBeneath as Oc, readVariableName as Et, resolveArrowAnnotationStyle as An, resolveBarBandFraction as Rc, resolveComparisonBasis as Nc, resolveDifferenceArrowAnnotationStyle as Dc, resolveEditOutlineStyle as _c, resolveLayerAxisValueFormat as Fc, resolveObservationPoint as Ha, resolveObservationsTarget as rr, stepDifferenceArrowEndpoint as Bc, toDashPreset as mt, toPaintColor as gt, toPanelCursor as Mt, toStrokeDasharray as Ga } from "@graphysdk/viz-engine";
|
|
3
3
|
import { Fragment as Va, createContext as Pe, memo as $a, useCallback as ae, useContext as me, useEffect as F, useId as Ae, useLayoutEffect as Me, useMemo as E, useRef as oe, useState as X } from "react";
|
|
4
4
|
import { Fragment as j, jsx as r, jsxs as v } from "react/jsx-runtime";
|
|
5
5
|
import { motion as zc } from "motion/react";
|
|
@@ -32,13 +32,13 @@ import { NumberField as ar } from "@base-ui/react/number-field";
|
|
|
32
32
|
import { Radio as ja } from "@base-ui/react/radio";
|
|
33
33
|
import { RadioGroup as Za } from "@base-ui/react/radio-group";
|
|
34
34
|
import { Select as ve } from "@base-ui/react/select";
|
|
35
|
-
import { Slider as
|
|
35
|
+
import { Slider as We } from "@base-ui/react/slider";
|
|
36
36
|
import { Switch as or } from "@base-ui/react/switch";
|
|
37
37
|
import { Input as ld } from "@base-ui/react/input";
|
|
38
38
|
import { Menu as V } from "@base-ui/react/menu";
|
|
39
39
|
import { Toggle as sd } from "@base-ui/react/toggle";
|
|
40
40
|
import { Menu as ke } from "@base-ui/react";
|
|
41
|
-
import { Accordion as
|
|
41
|
+
import { Accordion as Ke } from "@base-ui/react/accordion";
|
|
42
42
|
import { Separator as cd } from "@base-ui/react/separator";
|
|
43
43
|
import './editable.css';var dd = {
|
|
44
44
|
save: "حفظ",
|
|
@@ -2535,14 +2535,14 @@ var no = "transparent", ro = (e) => e === "transparent" ? {
|
|
|
2535
2535
|
} : {
|
|
2536
2536
|
background: e,
|
|
2537
2537
|
border: `1px solid ${Rd.border}`
|
|
2538
|
-
}, Fd = ({ title: e, colors: t, value: n, onChange: a, trailing: o, isClearable: i = !1, isDisabled: l, id: s, ariaLabel: c, ariaLabelledBy:
|
|
2539
|
-
const
|
|
2538
|
+
}, Fd = ({ title: e, colors: t, value: n, onChange: a, trailing: o, isClearable: i = !1, isDisabled: l, id: s, ariaLabel: c, ariaLabelledBy: h }) => {
|
|
2539
|
+
const u = P(), d = xe({
|
|
2540
2540
|
id: s,
|
|
2541
2541
|
ariaLabel: c,
|
|
2542
|
-
ariaLabelledBy:
|
|
2542
|
+
ariaLabelledBy: h
|
|
2543
2543
|
}, !1), p = o !== void 0 || i, g = (m) => /* @__PURE__ */ r("button", {
|
|
2544
2544
|
type: "button",
|
|
2545
|
-
"aria-label": m === "transparent" ?
|
|
2545
|
+
"aria-label": m === "transparent" ? u("graph.colorDropdown.transparent") : m,
|
|
2546
2546
|
className: _d,
|
|
2547
2547
|
"data-active": ao(m, n),
|
|
2548
2548
|
disabled: l,
|
|
@@ -2560,7 +2560,7 @@ var no = "transparent", ro = (e) => e === "transparent" ? {
|
|
|
2560
2560
|
children: e
|
|
2561
2561
|
}), /* @__PURE__ */ v("div", {
|
|
2562
2562
|
className: Dd,
|
|
2563
|
-
...
|
|
2563
|
+
...d,
|
|
2564
2564
|
children: [t.map(g), p && /* @__PURE__ */ v("span", {
|
|
2565
2565
|
className: "_14ty2ng5",
|
|
2566
2566
|
children: [
|
|
@@ -2583,7 +2583,7 @@ var Bd = {
|
|
|
2583
2583
|
id: s,
|
|
2584
2584
|
ariaLabel: i,
|
|
2585
2585
|
ariaLabelledBy: l
|
|
2586
|
-
}),
|
|
2586
|
+
}), h = a === "tile";
|
|
2587
2587
|
return /* @__PURE__ */ v("button", {
|
|
2588
2588
|
type: "button",
|
|
2589
2589
|
className: Bd[a],
|
|
@@ -2594,14 +2594,14 @@ var Bd = {
|
|
|
2594
2594
|
className: "woi4bh0",
|
|
2595
2595
|
children: t
|
|
2596
2596
|
}), e !== void 0 && /* @__PURE__ */ r("span", {
|
|
2597
|
-
className:
|
|
2597
|
+
className: h ? "woi4bh2" : "woi4bh1",
|
|
2598
2598
|
children: e
|
|
2599
2599
|
})]
|
|
2600
2600
|
});
|
|
2601
2601
|
}, Hd = "data-graphy-chart-chrome", Gd = "data-graphy-chart-menu", En = { [Gd]: "" }, Ot = (e) => ({ [Hd]: e }), ht = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, oo = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, tn = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, io = (e, t, n) => n !== null && Tn({
|
|
2602
2602
|
x: e.clientX - t.x,
|
|
2603
2603
|
y: e.clientY - t.y
|
|
2604
|
-
}, n),
|
|
2604
|
+
}, n), Ze = (e, t, n) => e instanceof Node && (t.contains(e) || ht(e, n)), Vd = "cml7ha0", lo = Pe(null), $d = ({ children: e }) => {
|
|
2605
2605
|
const { chartId: t } = z(), [n] = X(he), [a, o] = X(null);
|
|
2606
2606
|
return n === null ? null : /* @__PURE__ */ v(j, { children: [Wa(/* @__PURE__ */ r("div", {
|
|
2607
2607
|
ref: o,
|
|
@@ -2611,17 +2611,17 @@ var Bd = {
|
|
|
2611
2611
|
value: a,
|
|
2612
2612
|
children: e
|
|
2613
2613
|
})] });
|
|
2614
|
-
},
|
|
2614
|
+
}, $e = () => me(lo), Wd = "_178jeit0", Ud = "_178jeit1 _14ty2ng3", Kd = "_178jeit2 _14ty2ng4", qd = "_178jeit3", Xd = "_178jeit4", jd = "_178jeit5", Zd = "_178jeit6", Yd = "_178jeit7", Jd = {
|
|
2615
2615
|
side: "flip",
|
|
2616
2616
|
align: "shift",
|
|
2617
2617
|
fallbackAxisSide: "end"
|
|
2618
2618
|
}, Qd = ({ value: e, onChange: t, onCommit: n, popupAttributes: a, variant: o = "default" }) => {
|
|
2619
|
-
const i = P(), l =
|
|
2619
|
+
const i = P(), l = $e(), [s, c] = X(!1), h = (p) => {
|
|
2620
2620
|
c(p), p || n?.();
|
|
2621
|
-
},
|
|
2621
|
+
}, u = e !== null && Sl(e) ? e : "#000000", d = oa(u) ? u.toUpperCase() : "#000000";
|
|
2622
2622
|
return /* @__PURE__ */ v(J.Root, {
|
|
2623
2623
|
open: s,
|
|
2624
|
-
onOpenChange:
|
|
2624
|
+
onOpenChange: h,
|
|
2625
2625
|
children: [o === "chip" ? /* @__PURE__ */ r(J.Trigger, {
|
|
2626
2626
|
className: Ud,
|
|
2627
2627
|
onMouseDown: (p) => p.preventDefault(),
|
|
@@ -2638,10 +2638,10 @@ var Bd = {
|
|
|
2638
2638
|
"aria-label": i("graph.colorDropdown.pickCustom"),
|
|
2639
2639
|
children: [/* @__PURE__ */ r("span", {
|
|
2640
2640
|
className: to,
|
|
2641
|
-
style: ro(
|
|
2641
|
+
style: ro(u)
|
|
2642
2642
|
}), /* @__PURE__ */ r("span", {
|
|
2643
2643
|
className: Xd,
|
|
2644
|
-
children:
|
|
2644
|
+
children: d
|
|
2645
2645
|
})]
|
|
2646
2646
|
})]
|
|
2647
2647
|
}), /* @__PURE__ */ r(J.Portal, {
|
|
@@ -2664,12 +2664,12 @@ var Bd = {
|
|
|
2664
2664
|
children: i("graph.colorDropdown.pickColor")
|
|
2665
2665
|
}),
|
|
2666
2666
|
/* @__PURE__ */ r(id, {
|
|
2667
|
-
color:
|
|
2667
|
+
color: d,
|
|
2668
2668
|
onChange: t,
|
|
2669
2669
|
className: Zd
|
|
2670
2670
|
}),
|
|
2671
2671
|
/* @__PURE__ */ r(od, {
|
|
2672
|
-
color:
|
|
2672
|
+
color: d,
|
|
2673
2673
|
onChange: t,
|
|
2674
2674
|
prefixed: !0,
|
|
2675
2675
|
className: Yd,
|
|
@@ -2725,10 +2725,10 @@ var Bd = {
|
|
|
2725
2725
|
}
|
|
2726
2726
|
};
|
|
2727
2727
|
}, eu = "eh8dvc0", tu = "eh8dvc1 uz3g760", nu = "eh8dvc2 uz3g761";
|
|
2728
|
-
var ru = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeholder: l, prefix: s, suffix: c, isDisabled:
|
|
2728
|
+
var ru = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeholder: l, prefix: s, suffix: c, isDisabled: h, hasError: u, ariaLabel: d, ariaLabelledBy: p, id: g }) => {
|
|
2729
2729
|
const m = xe({
|
|
2730
2730
|
id: g,
|
|
2731
|
-
ariaLabel:
|
|
2731
|
+
ariaLabel: d,
|
|
2732
2732
|
ariaLabelledBy: p
|
|
2733
2733
|
}), { commitUnlessHeldKey: f, gestureHandlers: b } = Rt(n);
|
|
2734
2734
|
return /* @__PURE__ */ r(ar.Root, {
|
|
@@ -2741,11 +2741,11 @@ var ru = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeho
|
|
|
2741
2741
|
min: a,
|
|
2742
2742
|
max: o,
|
|
2743
2743
|
step: i,
|
|
2744
|
-
disabled:
|
|
2744
|
+
disabled: h,
|
|
2745
2745
|
children: /* @__PURE__ */ v(so, {
|
|
2746
2746
|
className: tu,
|
|
2747
|
-
"data-error":
|
|
2748
|
-
"data-disabled":
|
|
2747
|
+
"data-error": u === !0,
|
|
2748
|
+
"data-disabled": h === !0 ? "" : void 0,
|
|
2749
2749
|
children: [
|
|
2750
2750
|
s !== void 0 && /* @__PURE__ */ r("span", {
|
|
2751
2751
|
className: "eh8dvc3",
|
|
@@ -2755,7 +2755,7 @@ var ru = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeho
|
|
|
2755
2755
|
className: nu,
|
|
2756
2756
|
placeholder: l,
|
|
2757
2757
|
...b,
|
|
2758
|
-
"aria-invalid":
|
|
2758
|
+
"aria-invalid": u === !0 ? !0 : void 0,
|
|
2759
2759
|
...m
|
|
2760
2760
|
}),
|
|
2761
2761
|
c !== void 0 && /* @__PURE__ */ r("span", {
|
|
@@ -2796,25 +2796,25 @@ var uo = "srewh00", au = "srewh01", ou = {
|
|
|
2796
2796
|
[f]: m,
|
|
2797
2797
|
last: f
|
|
2798
2798
|
}));
|
|
2799
|
-
}, []),
|
|
2799
|
+
}, []), h = ae((m, f) => {
|
|
2800
2800
|
s((b) => b[f] === m ? {
|
|
2801
2801
|
...b,
|
|
2802
2802
|
[f]: null
|
|
2803
2803
|
} : b);
|
|
2804
|
-
}, []),
|
|
2804
|
+
}, []), u = ae(() => i(!0), []), d = iu(l), p = E(() => ({
|
|
2805
2805
|
isHovered: n,
|
|
2806
2806
|
isDismissed: o,
|
|
2807
|
-
reachedTooltipId:
|
|
2807
|
+
reachedTooltipId: d,
|
|
2808
2808
|
reach: c,
|
|
2809
|
-
release:
|
|
2810
|
-
dismiss:
|
|
2809
|
+
release: h,
|
|
2810
|
+
dismiss: u
|
|
2811
2811
|
}), [
|
|
2812
2812
|
n,
|
|
2813
2813
|
o,
|
|
2814
|
-
|
|
2814
|
+
d,
|
|
2815
2815
|
c,
|
|
2816
|
-
|
|
2817
|
-
|
|
2816
|
+
h,
|
|
2817
|
+
u
|
|
2818
2818
|
]);
|
|
2819
2819
|
return /* @__PURE__ */ r("div", {
|
|
2820
2820
|
className: e,
|
|
@@ -2828,12 +2828,12 @@ var uo = "srewh00", au = "srewh01", ou = {
|
|
|
2828
2828
|
})
|
|
2829
2829
|
});
|
|
2830
2830
|
}, Rn = ({ label: e, isChecked: t = !1, children: n }) => {
|
|
2831
|
-
const { isHovered: a, isDismissed: o, reachedTooltipId: i, reach: l, release: s, dismiss: c } = me(ho),
|
|
2831
|
+
const { isHovered: a, isDismissed: o, reachedTooltipId: i, reach: l, release: s, dismiss: c } = me(ho), h = Ae(), [u, d] = X(!1), p = a ? !o && (i === h || t && i === null) : u;
|
|
2832
2832
|
F(() => () => {
|
|
2833
|
-
s(
|
|
2834
|
-
}, [
|
|
2833
|
+
s(h, "pointer"), s(h, "focus");
|
|
2834
|
+
}, [h, s]);
|
|
2835
2835
|
const g = (m, f) => {
|
|
2836
|
-
f.reason === "escape-key" && (c(), f.allowPropagation()),
|
|
2836
|
+
f.reason === "escape-key" && (c(), f.allowPropagation()), d(m);
|
|
2837
2837
|
};
|
|
2838
2838
|
return /* @__PURE__ */ v(de.Root, {
|
|
2839
2839
|
open: p,
|
|
@@ -2842,10 +2842,10 @@ var uo = "srewh00", au = "srewh01", ou = {
|
|
|
2842
2842
|
children: [/* @__PURE__ */ r(de.Trigger, {
|
|
2843
2843
|
render: n,
|
|
2844
2844
|
"aria-label": e,
|
|
2845
|
-
onPointerEnter: (m) => m.pointerType !== "touch" && l(
|
|
2846
|
-
onPointerLeave: () => s(
|
|
2847
|
-
onFocus: () => l(
|
|
2848
|
-
onBlur: () => s(
|
|
2845
|
+
onPointerEnter: (m) => m.pointerType !== "touch" && l(h, "pointer"),
|
|
2846
|
+
onPointerLeave: () => s(h, "pointer"),
|
|
2847
|
+
onFocus: () => l(h, "focus"),
|
|
2848
|
+
onBlur: () => s(h, "focus")
|
|
2849
2849
|
}), /* @__PURE__ */ r(de.Portal, {
|
|
2850
2850
|
container: he(),
|
|
2851
2851
|
children: /* @__PURE__ */ r(On, { children: /* @__PURE__ */ r(de.Positioner, {
|
|
@@ -2866,12 +2866,12 @@ var uo = "srewh00", au = "srewh01", ou = {
|
|
|
2866
2866
|
5: "_1b7s5f5",
|
|
2867
2867
|
6: "_1b7s5f6"
|
|
2868
2868
|
}, su = "_1b7s5f7";
|
|
2869
|
-
var cu = 6, du = ({ options: e, value: t, onChange: n, onCommit: a, columns: o, itemLayout: i = "tile", isDisabled: l, ariaLabel: s, ariaLabelledBy: c, id:
|
|
2870
|
-
const
|
|
2871
|
-
id:
|
|
2869
|
+
var cu = 6, du = ({ options: e, value: t, onChange: n, onCommit: a, columns: o, itemLayout: i = "tile", isDisabled: l, ariaLabel: s, ariaLabelledBy: c, id: h }) => {
|
|
2870
|
+
const u = xe({
|
|
2871
|
+
id: h,
|
|
2872
2872
|
ariaLabel: s,
|
|
2873
2873
|
ariaLabelledBy: c
|
|
2874
|
-
}),
|
|
2874
|
+
}), d = i === "tile", p = i === "swatch", g = i === "icon", m = i === "track", { commitAfterChange: f, gestureHandlers: b } = Rt(a);
|
|
2875
2875
|
return /* @__PURE__ */ r(Za, {
|
|
2876
2876
|
className: ye(lu, uu(o ?? e.length), g && "_1b7s5f9", m && "_1b7s5fb"),
|
|
2877
2877
|
value: t,
|
|
@@ -2880,7 +2880,7 @@ var cu = 6, du = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
|
|
|
2880
2880
|
},
|
|
2881
2881
|
...b,
|
|
2882
2882
|
disabled: l,
|
|
2883
|
-
...
|
|
2883
|
+
...u,
|
|
2884
2884
|
children: e.map((y) => {
|
|
2885
2885
|
const k = /* @__PURE__ */ v(ja.Root, {
|
|
2886
2886
|
value: y.value,
|
|
@@ -2890,8 +2890,8 @@ var cu = 6, du = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
|
|
|
2890
2890
|
gridRow: y.gridRow,
|
|
2891
2891
|
gridColumn: y.gridColumn
|
|
2892
2892
|
},
|
|
2893
|
-
"aria-label":
|
|
2894
|
-
children: [y.icon,
|
|
2893
|
+
"aria-label": d ? void 0 : y.label,
|
|
2894
|
+
children: [y.icon, d && /* @__PURE__ */ r("span", {
|
|
2895
2895
|
className: "_1b7s5fd",
|
|
2896
2896
|
children: y.label
|
|
2897
2897
|
})]
|
|
@@ -2938,11 +2938,11 @@ var cu = 6, du = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
|
|
|
2938
2938
|
})
|
|
2939
2939
|
}), hu = "_1g5x15w0 uz3g760", pu = "_1g5x15w1", mu = "_1g5x15w2", lr = "_1g5x15w3", gu = "_1g5x15w4", vu = "_1g5x15w5", fu = "_1g5x15w6", bu = "_1g5x15w7";
|
|
2940
2940
|
var yu = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
|
|
2941
|
-
const
|
|
2941
|
+
const h = xe({
|
|
2942
2942
|
id: c,
|
|
2943
2943
|
ariaLabel: l,
|
|
2944
2944
|
ariaLabelledBy: s
|
|
2945
|
-
});
|
|
2945
|
+
}), u = $e();
|
|
2946
2946
|
return /* @__PURE__ */ v(ve.Root, {
|
|
2947
2947
|
value: t,
|
|
2948
2948
|
onValueChange: (d) => d !== null && n(d),
|
|
@@ -2954,7 +2954,7 @@ var yu = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
|
|
|
2954
2954
|
children: [/* @__PURE__ */ v(ve.Trigger, {
|
|
2955
2955
|
className: hu,
|
|
2956
2956
|
"data-error": i === !0,
|
|
2957
|
-
...
|
|
2957
|
+
...h,
|
|
2958
2958
|
children: [/* @__PURE__ */ r(ve.Value, {
|
|
2959
2959
|
className: pu,
|
|
2960
2960
|
children: (d) => Su(e, d, a)
|
|
@@ -2963,7 +2963,7 @@ var yu = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
|
|
|
2963
2963
|
children: /* @__PURE__ */ r(Qe, { size: "sm" })
|
|
2964
2964
|
})]
|
|
2965
2965
|
}), /* @__PURE__ */ r(ve.Portal, {
|
|
2966
|
-
container: he(),
|
|
2966
|
+
container: u ?? he(),
|
|
2967
2967
|
children: /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r(ve.Positioner, {
|
|
2968
2968
|
className: gu,
|
|
2969
2969
|
sideOffset: 4,
|
|
@@ -2997,14 +2997,14 @@ var yu = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
|
|
|
2997
2997
|
className: mu,
|
|
2998
2998
|
children: n
|
|
2999
2999
|
}) : Cu(e, t), Cu = (e, t) => e.find((n) => n.value === t)?.label ?? t, xu = "vod76w0", wu = "vod76w1", ku = "vod76w2", Tu = "vod76w3", Au = "vod76w4", Lu = "vod76w5";
|
|
3000
|
-
var Pu = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix: l, formatValue: s, showValue: c = !0, isDisabled:
|
|
3000
|
+
var Pu = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix: l, formatValue: s, showValue: c = !0, isDisabled: h, ariaLabel: u, ariaLabelledBy: d }) => {
|
|
3001
3001
|
const p = xe({
|
|
3002
|
-
ariaLabel:
|
|
3003
|
-
ariaLabelledBy:
|
|
3002
|
+
ariaLabel: u,
|
|
3003
|
+
ariaLabelledBy: d
|
|
3004
3004
|
}, !1), g = Iu(e, l, s), { commitUnlessHeldKey: m, gestureHandlers: f } = Rt(n);
|
|
3005
3005
|
return /* @__PURE__ */ v("div", {
|
|
3006
3006
|
className: xu,
|
|
3007
|
-
children: [/* @__PURE__ */ r(
|
|
3007
|
+
children: [/* @__PURE__ */ r(We.Root, {
|
|
3008
3008
|
className: wu,
|
|
3009
3009
|
value: e,
|
|
3010
3010
|
onValueChange: (b) => t(b),
|
|
@@ -3014,12 +3014,12 @@ var Pu = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
|
|
|
3014
3014
|
min: a,
|
|
3015
3015
|
max: o,
|
|
3016
3016
|
step: i,
|
|
3017
|
-
disabled:
|
|
3018
|
-
children: /* @__PURE__ */ r(
|
|
3017
|
+
disabled: h,
|
|
3018
|
+
children: /* @__PURE__ */ r(We.Control, {
|
|
3019
3019
|
className: ku,
|
|
3020
|
-
children: /* @__PURE__ */ v(
|
|
3020
|
+
children: /* @__PURE__ */ v(We.Track, {
|
|
3021
3021
|
className: Tu,
|
|
3022
|
-
children: [/* @__PURE__ */ r(
|
|
3022
|
+
children: [/* @__PURE__ */ r(We.Indicator, { className: Au }), /* @__PURE__ */ r(We.Thumb, {
|
|
3023
3023
|
className: Lu,
|
|
3024
3024
|
...f,
|
|
3025
3025
|
...p
|
|
@@ -3046,7 +3046,7 @@ var Pu = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
|
|
|
3046
3046
|
children: /* @__PURE__ */ r(or.Thumb, { className: Mu })
|
|
3047
3047
|
});
|
|
3048
3048
|
}, Ru = "uz3g761", Nu = "tpcnun0 uz3g760", Du = ({ value: e, onChange: t, onCommit: n, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
|
|
3049
|
-
const
|
|
3049
|
+
const h = xe({
|
|
3050
3050
|
id: c,
|
|
3051
3051
|
ariaLabel: l,
|
|
3052
3052
|
ariaLabelledBy: s
|
|
@@ -3057,21 +3057,21 @@ var Pu = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
|
|
|
3057
3057
|
children: /* @__PURE__ */ r(ld, {
|
|
3058
3058
|
className: Ru,
|
|
3059
3059
|
value: e,
|
|
3060
|
-
onValueChange: (
|
|
3060
|
+
onValueChange: (u) => t(u),
|
|
3061
3061
|
onBlur: n,
|
|
3062
3062
|
placeholder: a,
|
|
3063
3063
|
disabled: o,
|
|
3064
3064
|
"aria-invalid": i === !0 ? !0 : void 0,
|
|
3065
|
-
...
|
|
3065
|
+
...h
|
|
3066
3066
|
})
|
|
3067
3067
|
});
|
|
3068
3068
|
}, _u = "cnu9yl0", Fu = "cnu9yl1";
|
|
3069
|
-
var mo = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inline", hasEqualWidths: i = !1, isDisabled: l, ariaLabel: s, ariaLabelledBy: c, id:
|
|
3070
|
-
const
|
|
3071
|
-
id:
|
|
3069
|
+
var mo = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inline", hasEqualWidths: i = !1, isDisabled: l, ariaLabel: s, ariaLabelledBy: c, id: h }) => {
|
|
3070
|
+
const u = xe({
|
|
3071
|
+
id: h,
|
|
3072
3072
|
ariaLabel: s,
|
|
3073
3073
|
ariaLabelledBy: c
|
|
3074
|
-
}),
|
|
3074
|
+
}), d = o === "stacked", { commitAfterChange: p, gestureHandlers: g } = Rt(a);
|
|
3075
3075
|
return /* @__PURE__ */ r(Za, {
|
|
3076
3076
|
className: _u,
|
|
3077
3077
|
value: t,
|
|
@@ -3080,14 +3080,14 @@ var mo = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
3080
3080
|
},
|
|
3081
3081
|
...g,
|
|
3082
3082
|
disabled: l,
|
|
3083
|
-
...
|
|
3083
|
+
...u,
|
|
3084
3084
|
children: e.map((m) => {
|
|
3085
|
-
const f = Bu(m,
|
|
3085
|
+
const f = Bu(m, d), b = /* @__PURE__ */ v(ja.Root, {
|
|
3086
3086
|
value: m.value,
|
|
3087
3087
|
disabled: m.isDisabled,
|
|
3088
|
-
className: ye(Fu,
|
|
3088
|
+
className: ye(Fu, d && "cnu9yl3", i && "cnu9yl2"),
|
|
3089
3089
|
"aria-label": f,
|
|
3090
|
-
children: [m.icon, go(m,
|
|
3090
|
+
children: [m.icon, go(m, d) && /* @__PURE__ */ r("span", {
|
|
3091
3091
|
className: "cnu9yl4",
|
|
3092
3092
|
children: m.label
|
|
3093
3093
|
})]
|
|
@@ -3144,8 +3144,8 @@ var mo = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
3144
3144
|
});
|
|
3145
3145
|
}, H = () => me(rn);
|
|
3146
3146
|
var Gu = "linear-gradient(to top right, transparent calc(50% - 1px), var(--graphy-alert) calc(50% - 1px), var(--graphy-alert) calc(50% + 1px), transparent calc(50% + 1px))", Vu = "d0bl00";
|
|
3147
|
-
var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Object.fromEntries(sa.map((e) => [se[e], e])), qu = (e) => an.some((t) => t.toLowerCase() === e.toLowerCase()), Xu = ({ color: e, onChange: t, isOpen: n, onOpenChange: a, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption:
|
|
3148
|
-
const
|
|
3147
|
+
var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Object.fromEntries(sa.map((e) => [se[e], e])), qu = (e) => an.some((t) => t.toLowerCase() === e.toLowerCase()), Xu = ({ color: e, onChange: t, isOpen: n, onOpenChange: a, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: h = !1 }) => {
|
|
3148
|
+
const u = P(), { ColorSwatches: d, Slider: p } = H(), g = Yu(), m = h ? [no, ...an] : an, f = (b) => {
|
|
3149
3149
|
t(b), a(!1);
|
|
3150
3150
|
};
|
|
3151
3151
|
return /* @__PURE__ */ v(J.Root, {
|
|
@@ -3153,7 +3153,7 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3153
3153
|
onOpenChange: a,
|
|
3154
3154
|
children: [/* @__PURE__ */ r(J.Trigger, {
|
|
3155
3155
|
render: /* @__PURE__ */ r(Ce.Button, {}),
|
|
3156
|
-
"aria-label": i ??
|
|
3156
|
+
"aria-label": i ?? u("graph.toolbar.color.label"),
|
|
3157
3157
|
className: Vu,
|
|
3158
3158
|
onMouseDown: (b) => b.preventDefault(),
|
|
3159
3159
|
children: o ?? /* @__PURE__ */ r("span", {
|
|
@@ -3171,14 +3171,14 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3171
3171
|
onMouseDown: (b) => b.preventDefault(),
|
|
3172
3172
|
...l,
|
|
3173
3173
|
children: [
|
|
3174
|
-
/* @__PURE__ */ r(
|
|
3175
|
-
title:
|
|
3174
|
+
/* @__PURE__ */ r(d, {
|
|
3175
|
+
title: u("graph.colorDropdown.colors"),
|
|
3176
3176
|
colors: m,
|
|
3177
3177
|
value: e,
|
|
3178
3178
|
onChange: f
|
|
3179
3179
|
}),
|
|
3180
|
-
g.length > 0 && /* @__PURE__ */ r(
|
|
3181
|
-
title:
|
|
3180
|
+
g.length > 0 && /* @__PURE__ */ r(d, {
|
|
3181
|
+
title: u("graph.colorDropdown.chartColors"),
|
|
3182
3182
|
colors: g,
|
|
3183
3183
|
value: e,
|
|
3184
3184
|
onChange: f
|
|
@@ -3192,7 +3192,7 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3192
3192
|
className: "_14ty2ng0",
|
|
3193
3193
|
children: [/* @__PURE__ */ r("div", {
|
|
3194
3194
|
className: "_14ty2ng1",
|
|
3195
|
-
children:
|
|
3195
|
+
children: u("graph.colorDropdown.opacity")
|
|
3196
3196
|
}), /* @__PURE__ */ r(p, {
|
|
3197
3197
|
value: s,
|
|
3198
3198
|
onChange: c,
|
|
@@ -3200,7 +3200,7 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3200
3200
|
max: 1,
|
|
3201
3201
|
step: Uu,
|
|
3202
3202
|
showValue: !1,
|
|
3203
|
-
ariaLabel:
|
|
3203
|
+
ariaLabel: u("graph.colorDropdown.opacity")
|
|
3204
3204
|
})]
|
|
3205
3205
|
})
|
|
3206
3206
|
]
|
|
@@ -3461,14 +3461,14 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3461
3461
|
F(() => {
|
|
3462
3462
|
a && s(t ?? "");
|
|
3463
3463
|
}, [a, t]);
|
|
3464
|
-
const
|
|
3464
|
+
const h = () => {
|
|
3465
3465
|
Ph(e, l), o(!1);
|
|
3466
|
-
},
|
|
3466
|
+
}, u = () => {
|
|
3467
3467
|
s(""), o(!1);
|
|
3468
|
-
},
|
|
3468
|
+
}, d = (g) => {
|
|
3469
3469
|
s(g.target.value);
|
|
3470
3470
|
}, p = (g) => {
|
|
3471
|
-
g.key === "Enter" && (g.preventDefault(),
|
|
3471
|
+
g.key === "Enter" && (g.preventDefault(), h());
|
|
3472
3472
|
};
|
|
3473
3473
|
return /* @__PURE__ */ v(J.Root, {
|
|
3474
3474
|
open: a,
|
|
@@ -3499,21 +3499,21 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3499
3499
|
"aria-label": i("graph.toolbar.link.urlLabel"),
|
|
3500
3500
|
className: Ah,
|
|
3501
3501
|
onMouseDown: (g) => g.stopPropagation(),
|
|
3502
|
-
onChange:
|
|
3502
|
+
onChange: d,
|
|
3503
3503
|
onKeyDown: p
|
|
3504
3504
|
}),
|
|
3505
3505
|
/* @__PURE__ */ r("button", {
|
|
3506
3506
|
type: "button",
|
|
3507
3507
|
"aria-label": i("common.cancel"),
|
|
3508
3508
|
className: dr,
|
|
3509
|
-
onClick:
|
|
3509
|
+
onClick: u,
|
|
3510
3510
|
children: /* @__PURE__ */ r(Sh, {})
|
|
3511
3511
|
}),
|
|
3512
3512
|
/* @__PURE__ */ r("button", {
|
|
3513
3513
|
type: "button",
|
|
3514
3514
|
"aria-label": i("graph.toolbar.link.apply"),
|
|
3515
3515
|
className: dr,
|
|
3516
|
-
onClick:
|
|
3516
|
+
onClick: h,
|
|
3517
3517
|
children: /* @__PURE__ */ r(po, {})
|
|
3518
3518
|
})
|
|
3519
3519
|
]
|
|
@@ -3634,7 +3634,7 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3634
3634
|
}), Nh = (e) => e ? e.isActive("heading", { level: 1 }) ? "h1" : e.isActive("heading", { level: 2 }) ? "h2" : e.isActive("heading", { level: 3 }) ? "h3" : e.isActive("paragraph", { variant: "caption" }) ? "caption" : "text" : "text", Dh = (e) => e ? e.isActive({ textAlign: "center" }) ? "center" : e.isActive({ textAlign: "right" }) ? "right" : "left" : "left", _h = 8, Fh = 8, Bh = ({ editor: e }) => {
|
|
3635
3635
|
const t = P(), [n, a] = X(!1), [o, i] = X(null), l = o !== null, s = (g) => (m) => {
|
|
3636
3636
|
i(m ? g : null);
|
|
3637
|
-
}, { refs: c, floatingStyles:
|
|
3637
|
+
}, { refs: c, floatingStyles: h } = Uc({
|
|
3638
3638
|
placement: "top-start",
|
|
3639
3639
|
strategy: "fixed",
|
|
3640
3640
|
middleware: [
|
|
@@ -3643,18 +3643,18 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3643
3643
|
Wc({ padding: Fh })
|
|
3644
3644
|
],
|
|
3645
3645
|
whileElementsMounted: Gc
|
|
3646
|
-
}),
|
|
3646
|
+
}), u = oe(null), d = ad({
|
|
3647
3647
|
editor: e,
|
|
3648
3648
|
selector: Rh
|
|
3649
3649
|
}), p = ae((g) => {
|
|
3650
|
-
|
|
3650
|
+
u.current = g, c.setFloating(g);
|
|
3651
3651
|
}, [c]);
|
|
3652
3652
|
return F(() => {
|
|
3653
3653
|
e && c.setReference(e.view.dom);
|
|
3654
3654
|
}, [e, c]), F(() => {
|
|
3655
3655
|
if (!e) return;
|
|
3656
3656
|
const g = () => a(!0), m = ({ event: f }) => {
|
|
3657
|
-
const { relatedTarget: b, currentTarget: y } = f, k = b instanceof Node &&
|
|
3657
|
+
const { relatedTarget: b, currentTarget: y } = f, k = b instanceof Node && u.current?.contains(b), x = b instanceof Node && y instanceof Node && y.contains(b);
|
|
3658
3658
|
!k && !x && a(!1);
|
|
3659
3659
|
};
|
|
3660
3660
|
return e.on("focus", g), e.on("blur", m), () => {
|
|
@@ -3663,23 +3663,23 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3663
3663
|
}, [e]), !e || !n && !l ? null : /* @__PURE__ */ r(Y.Portal, { children: /* @__PURE__ */ v(Y.Root, {
|
|
3664
3664
|
ref: p,
|
|
3665
3665
|
className: Oh,
|
|
3666
|
-
style:
|
|
3666
|
+
style: h,
|
|
3667
3667
|
children: [
|
|
3668
3668
|
/* @__PURE__ */ v(Y.Group, { children: [/* @__PURE__ */ r(Y.ColorPicker, {
|
|
3669
|
-
color:
|
|
3669
|
+
color: d?.color ?? null,
|
|
3670
3670
|
onChange: (g) => e.chain().setColor(g).run(),
|
|
3671
3671
|
isOpen: o === "color",
|
|
3672
3672
|
onOpenChange: s("color")
|
|
3673
3673
|
}), /* @__PURE__ */ r(gh, {
|
|
3674
3674
|
editor: e,
|
|
3675
|
-
currentFontFamily:
|
|
3675
|
+
currentFontFamily: d?.fontFamily ?? null,
|
|
3676
3676
|
isOpen: o === "fontFamily",
|
|
3677
3677
|
onOpenChange: s("fontFamily")
|
|
3678
3678
|
})] }),
|
|
3679
3679
|
/* @__PURE__ */ r(Y.Separator, {}),
|
|
3680
3680
|
/* @__PURE__ */ r(Y.Group, { children: /* @__PURE__ */ r(vh, {
|
|
3681
3681
|
editor: e,
|
|
3682
|
-
activeStyle:
|
|
3682
|
+
activeStyle: d?.fontSize ?? "text",
|
|
3683
3683
|
isOpen: o === "fontSize",
|
|
3684
3684
|
onOpenChange: s("fontSize")
|
|
3685
3685
|
}) }),
|
|
@@ -3687,19 +3687,19 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3687
3687
|
/* @__PURE__ */ v(Y.Group, { children: [
|
|
3688
3688
|
/* @__PURE__ */ r(He, {
|
|
3689
3689
|
label: t("graph.toolbar.formatting.bold"),
|
|
3690
|
-
isActive:
|
|
3690
|
+
isActive: d?.isBold ?? !1,
|
|
3691
3691
|
onToggle: () => e.chain().focus().toggleBold().run(),
|
|
3692
3692
|
children: /* @__PURE__ */ r("strong", { children: "B" })
|
|
3693
3693
|
}),
|
|
3694
3694
|
/* @__PURE__ */ r(He, {
|
|
3695
3695
|
label: t("graph.toolbar.formatting.italic"),
|
|
3696
|
-
isActive:
|
|
3696
|
+
isActive: d?.isItalic ?? !1,
|
|
3697
3697
|
onToggle: () => e.chain().focus().toggleItalic().run(),
|
|
3698
3698
|
children: /* @__PURE__ */ r("em", { children: "I" })
|
|
3699
3699
|
}),
|
|
3700
3700
|
/* @__PURE__ */ r(He, {
|
|
3701
3701
|
label: t("graph.toolbar.formatting.underline"),
|
|
3702
|
-
isActive:
|
|
3702
|
+
isActive: d?.isUnderline ?? !1,
|
|
3703
3703
|
onToggle: () => e.chain().focus().toggleUnderline().run(),
|
|
3704
3704
|
children: /* @__PURE__ */ r("u", { children: "U" })
|
|
3705
3705
|
})
|
|
@@ -3707,13 +3707,13 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3707
3707
|
/* @__PURE__ */ r(Y.Separator, {}),
|
|
3708
3708
|
/* @__PURE__ */ r(Y.Group, { children: /* @__PURE__ */ r(Mh, {
|
|
3709
3709
|
editor: e,
|
|
3710
|
-
activeAlignment:
|
|
3710
|
+
activeAlignment: d?.textAlign
|
|
3711
3711
|
}) }),
|
|
3712
3712
|
/* @__PURE__ */ r(Y.Separator, {}),
|
|
3713
3713
|
/* @__PURE__ */ r(Y.Group, { children: /* @__PURE__ */ r(Lh, {
|
|
3714
3714
|
editor: e,
|
|
3715
|
-
currentUrl:
|
|
3716
|
-
isActive:
|
|
3715
|
+
currentUrl: d?.linkUrl ?? null,
|
|
3716
|
+
isActive: d?.isLink ?? !1,
|
|
3717
3717
|
isOpen: o === "link",
|
|
3718
3718
|
onOpenChange: s("link")
|
|
3719
3719
|
}) })
|
|
@@ -3726,25 +3726,25 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3726
3726
|
"aria-label": t
|
|
3727
3727
|
})]
|
|
3728
3728
|
}), Hh = 200, Nn = ({ content: e, extensions: t, isEditable: n, onUpdate: a, updateDebounceMs: o = Hh }) => {
|
|
3729
|
-
const i = oe(ur(e)), l = oe(i.current), s = gl((
|
|
3730
|
-
l.current =
|
|
3729
|
+
const i = oe(ur(e)), l = oe(i.current), s = gl((h) => {
|
|
3730
|
+
l.current = h, a?.(h);
|
|
3731
3731
|
}, o), c = rd({
|
|
3732
3732
|
extensions: t,
|
|
3733
3733
|
content: i.current,
|
|
3734
3734
|
editable: n,
|
|
3735
3735
|
immediatelyRender: !1,
|
|
3736
|
-
onUpdate: ({ editor:
|
|
3737
|
-
const
|
|
3738
|
-
if ($t(l.current,
|
|
3739
|
-
s.run(
|
|
3736
|
+
onUpdate: ({ editor: h }) => {
|
|
3737
|
+
const u = h.getJSON();
|
|
3738
|
+
if ($t(l.current, u)) return s.cancel();
|
|
3739
|
+
s.run(u);
|
|
3740
3740
|
}
|
|
3741
3741
|
});
|
|
3742
3742
|
return F(() => {
|
|
3743
3743
|
c?.setEditable(n);
|
|
3744
3744
|
}, [c, n]), F(() => {
|
|
3745
3745
|
if (!c) return;
|
|
3746
|
-
const
|
|
3747
|
-
$t(l.current,
|
|
3746
|
+
const h = ur(e);
|
|
3747
|
+
$t(l.current, h) || (l.current = h, !$t(c.getJSON(), h) && (s.cancel(), Gh(c, h)));
|
|
3748
3748
|
}, [
|
|
3749
3749
|
c,
|
|
3750
3750
|
e,
|
|
@@ -3924,9 +3924,9 @@ var $u = "d0bl03", Wu = "d0bl04", Uu = 0.01, an = sa.map((e) => se[e]), Ku = Obj
|
|
|
3924
3924
|
]),
|
|
3925
3925
|
extensions: s,
|
|
3926
3926
|
isEditable: !0,
|
|
3927
|
-
onUpdate: (
|
|
3928
|
-
const
|
|
3929
|
-
t && l(new wa({ title:
|
|
3927
|
+
onUpdate: (h) => {
|
|
3928
|
+
const u = jh(h);
|
|
3929
|
+
t && l(new wa({ title: u.title })), n && l(new xa({ subtitle: u.subtitle }));
|
|
3930
3930
|
}
|
|
3931
3931
|
});
|
|
3932
3932
|
return /* @__PURE__ */ r("div", {
|
|
@@ -4069,13 +4069,13 @@ var dp = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
4069
4069
|
const o = pp[n], i = n === "left" || n === "right", l = (m) => i ? m.y : m.x, s = (m) => i ? m.y + m.height : m.x + m.width;
|
|
4070
4070
|
let c = -1 / 0;
|
|
4071
4071
|
for (const m of e) c = Math.max(c, o(m));
|
|
4072
|
-
const
|
|
4073
|
-
let
|
|
4072
|
+
const h = c - Math.max(a, hp);
|
|
4073
|
+
let u = 1 / 0, d = -1 / 0;
|
|
4074
4074
|
for (const m of e)
|
|
4075
|
-
o(m) <
|
|
4075
|
+
o(m) < h || (u = Math.min(u, l(m)), d = Math.max(d, s(m)));
|
|
4076
4076
|
const p = i ? sn(t) : ln(t), g = {
|
|
4077
|
-
from: Ge(
|
|
4078
|
-
to: Ge(
|
|
4077
|
+
from: Ge(u - a, p.from, p.to),
|
|
4078
|
+
to: Ge(d + a, p.from, p.to)
|
|
4079
4079
|
};
|
|
4080
4080
|
return g.from < g.to ? g : p;
|
|
4081
4081
|
}, gp = (e) => {
|
|
@@ -4088,15 +4088,15 @@ var dp = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
4088
4088
|
from: e.y,
|
|
4089
4089
|
to: e.y + e.height
|
|
4090
4090
|
}), vp = (e, { frameElement: t, panelRect: n, look: a }) => {
|
|
4091
|
-
const o = $(), i = q(), l = O((
|
|
4091
|
+
const o = $(), i = q(), l = O((d) => d.coordSystem), s = oe(/* @__PURE__ */ new Map()), c = e?.target ?? null, h = e?.outline ?? null;
|
|
4092
4092
|
Me(() => {
|
|
4093
|
-
if (c === null ||
|
|
4094
|
-
const
|
|
4093
|
+
if (c === null || h === null) return;
|
|
4094
|
+
const d = s.current, p = /* @__PURE__ */ new Map(), m = ip(h, {
|
|
4095
4095
|
panelRect: n,
|
|
4096
4096
|
look: a,
|
|
4097
4097
|
readGridLineWidth: (y) => la(i, y).strokeWidth,
|
|
4098
4098
|
measurePathBox: (y) => {
|
|
4099
|
-
const k =
|
|
4099
|
+
const k = d.get(y) ?? ap(t.ownerDocument, y);
|
|
4100
4100
|
return p.set(y, k), k;
|
|
4101
4101
|
}
|
|
4102
4102
|
});
|
|
@@ -4104,7 +4104,7 @@ var dp = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
4104
4104
|
o.getState().setSelectedOutline(null);
|
|
4105
4105
|
return;
|
|
4106
4106
|
}
|
|
4107
|
-
const f = mp(dp(
|
|
4107
|
+
const f = mp(dp(h, {
|
|
4108
4108
|
coordSystem: l,
|
|
4109
4109
|
panelRect: n
|
|
4110
4110
|
}), m, et(a)), b = Lo(t);
|
|
@@ -4119,13 +4119,13 @@ var dp = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
4119
4119
|
i,
|
|
4120
4120
|
l,
|
|
4121
4121
|
c,
|
|
4122
|
-
|
|
4122
|
+
h,
|
|
4123
4123
|
t,
|
|
4124
4124
|
n,
|
|
4125
4125
|
a
|
|
4126
4126
|
]);
|
|
4127
|
-
const
|
|
4128
|
-
Me(() =>
|
|
4127
|
+
const u = e !== null;
|
|
4128
|
+
Me(() => u ? () => o.getState().setSelectedOutline(null) : void 0, [o, u]);
|
|
4129
4129
|
}, _n = "var(--_10d2ycx0)", fp = "_10d2ycx1", bp = "_10d2ycx2", fr = ({ pathData: e, shouldAnimateTransitions: t, source: n, ...a }) => t ? /* @__PURE__ */ r(yp, {
|
|
4130
4130
|
pathData: e,
|
|
4131
4131
|
source: n,
|
|
@@ -4240,7 +4240,7 @@ Io.hasRows = (e, { scene: t }) => t.coordSystem.type !== "polar";
|
|
|
4240
4240
|
var Ip = ({ graph: e, axis: t }) => {
|
|
4241
4241
|
const n = K(e), a = P(), { NumberField: o, TextField: i, ToggleGroup: l } = H(), s = n?.guides.axes.find((A) => A.scaleAestheticKey === t);
|
|
4242
4242
|
if (F(() => () => e.commands.commit(), [e.commands]), n === null || s?.geometry !== "linear") return null;
|
|
4243
|
-
const c = !s.isVisible,
|
|
4243
|
+
const c = !s.isVisible, h = n.scales[t]?.spec.scaleType, u = h === "continuous" || h === "datetime", d = n.guides.legends.drawn.some((A) => A.position === "left" || A.position === "right"), p = t !== "x" && h === "continuous" && (s.position === "left" || s.position === "right") && !d, g = t === "x" ? void 0 : n.scales[t]?.spec, m = g?.scaleType === "continuous" ? g : void 0, f = m !== void 0 && (s.position === "left" || s.position === "right") && !_a(n, t), b = m?.transform === "log" ? "log" : "linear", y = f && m.transform !== "log", k = m?.domainMin ?? null, x = m !== void 0 && (s.position === "left" || s.position === "right") && m.transform !== "log", C = m?.domainMax ?? null, I = s.label ?? a("editor.axesPanel.controls.titlePlaceholder"), L = (A) => {
|
|
4244
4244
|
const B = A === "" ? null : A, ee = t === "ySecondary" ? {
|
|
4245
4245
|
axis: t,
|
|
4246
4246
|
label: B
|
|
@@ -4261,7 +4261,7 @@ var Ip = ({ graph: e, axis: t }) => {
|
|
|
4261
4261
|
isDisabled: c
|
|
4262
4262
|
})
|
|
4263
4263
|
}),
|
|
4264
|
-
|
|
4264
|
+
u && /* @__PURE__ */ r(w, {
|
|
4265
4265
|
label: a("editor.axesPanel.controls.labels"),
|
|
4266
4266
|
children: /* @__PURE__ */ r(l, {
|
|
4267
4267
|
value: s.tickMode,
|
|
@@ -4338,7 +4338,7 @@ var Ip = ({ graph: e, axis: t }) => {
|
|
|
4338
4338
|
placeholder: a("editor.axesPanel.startFrom.auto"),
|
|
4339
4339
|
isDisabled: c,
|
|
4340
4340
|
onChange: (A) => {
|
|
4341
|
-
e.commands.dispatch(new
|
|
4341
|
+
e.commands.dispatch(new je({
|
|
4342
4342
|
scaledAesthetic: t,
|
|
4343
4343
|
domainMin: A
|
|
4344
4344
|
}), { transient: !0 });
|
|
@@ -4353,7 +4353,7 @@ var Ip = ({ graph: e, axis: t }) => {
|
|
|
4353
4353
|
placeholder: a("editor.axesPanel.endAt.auto"),
|
|
4354
4354
|
isDisabled: c,
|
|
4355
4355
|
onChange: (A) => {
|
|
4356
|
-
e.commands.dispatch(new
|
|
4356
|
+
e.commands.dispatch(new je({
|
|
4357
4357
|
scaledAesthetic: t,
|
|
4358
4358
|
domainMax: A
|
|
4359
4359
|
}), { transient: !0 });
|
|
@@ -4377,20 +4377,20 @@ var Ip = ({ graph: e, axis: t }) => {
|
|
|
4377
4377
|
supportsCategoryLabels: o && i && e.position === "fill" && a
|
|
4378
4378
|
};
|
|
4379
4379
|
}, Mo = Pe({}), Mp = Mo.Provider, Op = () => me(Mo), Rp = "_1m2a0t20", cn = "theme", Np = 3, ot = 14, Sr = 9, Dp = () => {
|
|
4380
|
-
const e = O((
|
|
4380
|
+
const e = O((u) => u.scales.color), t = Op(), n = le(), a = P(), { RadioGrid: o } = H();
|
|
4381
4381
|
if (Object.keys(t).length === 0 || e?.kind !== "visual" || e.spec.scaleType !== "discrete" || e.defaultPalette === void 0) return null;
|
|
4382
4382
|
const { defaultPalette: i, spec: l } = e, s = Object.entries(t), c = [{
|
|
4383
4383
|
value: cn,
|
|
4384
4384
|
label: a("editor.overlayMenu.themePalette"),
|
|
4385
4385
|
icon: /* @__PURE__ */ r(Cr, { colors: i })
|
|
4386
|
-
}, ...s.map(([
|
|
4387
|
-
value: dn(
|
|
4388
|
-
label:
|
|
4389
|
-
icon: /* @__PURE__ */ r(Cr, { colors:
|
|
4390
|
-
}))],
|
|
4391
|
-
const
|
|
4392
|
-
if (
|
|
4393
|
-
const p =
|
|
4386
|
+
}, ...s.map(([u, d]) => ({
|
|
4387
|
+
value: dn(u),
|
|
4388
|
+
label: u,
|
|
4389
|
+
icon: /* @__PURE__ */ r(Cr, { colors: d })
|
|
4390
|
+
}))], h = (u) => {
|
|
4391
|
+
const d = s.find(([g]) => dn(g) === u);
|
|
4392
|
+
if (u !== cn && d === void 0) return;
|
|
4393
|
+
const p = d === void 0 ? null : [...d[1]];
|
|
4394
4394
|
n.dispatch(new Ms({
|
|
4395
4395
|
scaledAesthetic: "color",
|
|
4396
4396
|
range: p
|
|
@@ -4402,7 +4402,7 @@ var Ip = ({ graph: e, axis: t }) => {
|
|
|
4402
4402
|
children: /* @__PURE__ */ r(o, {
|
|
4403
4403
|
options: c,
|
|
4404
4404
|
value: _p(l.range, s),
|
|
4405
|
-
onChange:
|
|
4405
|
+
onChange: h,
|
|
4406
4406
|
onCommit: n.commit,
|
|
4407
4407
|
columns: 4,
|
|
4408
4408
|
itemLayout: "track"
|
|
@@ -4486,10 +4486,10 @@ var Ro = (e, t, n) => e.filter((a) => a.interactive).map((a) => ({
|
|
|
4486
4486
|
onChange: l
|
|
4487
4487
|
})
|
|
4488
4488
|
});
|
|
4489
|
-
}, Fp = 6,
|
|
4490
|
-
const { commands: t } = z(), { ColorSwatches: n, CustomColor: a } = H(), o = P(), i = q(), l = O((
|
|
4489
|
+
}, Fp = 6, qe = ({ target: e }) => {
|
|
4490
|
+
const { commands: t } = z(), { ColorSwatches: n, CustomColor: a } = H(), o = P(), i = q(), l = O((d) => d), s = No(e, l), c = fc(l.scales.color).slice(0, Fp);
|
|
4491
4491
|
F(() => () => t.commit(), [t]);
|
|
4492
|
-
const
|
|
4492
|
+
const h = E(() => Ac({
|
|
4493
4493
|
readers: i,
|
|
4494
4494
|
layers: l.layers,
|
|
4495
4495
|
target: e,
|
|
@@ -4501,29 +4501,29 @@ var Ro = (e, t, n) => e.filter((a) => a.interactive).map((a) => ({
|
|
|
4501
4501
|
e
|
|
4502
4502
|
]);
|
|
4503
4503
|
if (s === null) return null;
|
|
4504
|
-
const
|
|
4504
|
+
const u = (d, p) => {
|
|
4505
4505
|
t.dispatch(new Ts({
|
|
4506
4506
|
target: e,
|
|
4507
|
-
color:
|
|
4507
|
+
color: d
|
|
4508
4508
|
}), p ? { transient: !0 } : void 0);
|
|
4509
4509
|
};
|
|
4510
4510
|
return /* @__PURE__ */ r(w, {
|
|
4511
4511
|
label: s[0]?.property === "stroke" ? o("editor.overlayMenu.lineColor") : o("editor.overlayMenu.fillColor"),
|
|
4512
4512
|
layout: "stack",
|
|
4513
4513
|
children: /* @__PURE__ */ r(n, {
|
|
4514
|
-
colors: Bp(c,
|
|
4515
|
-
value:
|
|
4516
|
-
onChange: (
|
|
4514
|
+
colors: Bp(c, h),
|
|
4515
|
+
value: h,
|
|
4516
|
+
onChange: (d) => u(d, !1),
|
|
4517
4517
|
trailing: /* @__PURE__ */ r(a, {
|
|
4518
4518
|
variant: "chip",
|
|
4519
|
-
value:
|
|
4520
|
-
onChange: (
|
|
4519
|
+
value: h,
|
|
4520
|
+
onChange: (d) => u(d, !0),
|
|
4521
4521
|
onCommit: () => t.commit()
|
|
4522
4522
|
})
|
|
4523
4523
|
})
|
|
4524
4524
|
});
|
|
4525
4525
|
};
|
|
4526
|
-
|
|
4526
|
+
qe.hasRows = (e, { scene: t }) => No(e, t) !== null;
|
|
4527
4527
|
var No = (e, t) => fe(t.layers, e.layerId) === void 0 ? null : Lc(t.spec, e), Bp = (e, t) => t === null || e.some((n) => ao(n, t)) ? e : [...e, t], zp = (e, t) => {
|
|
4528
4528
|
const n = fe(t.layers, e);
|
|
4529
4529
|
if (n === void 0) return null;
|
|
@@ -4533,13 +4533,13 @@ var No = (e, t) => fe(t.layers, e.layerId) === void 0 ? null : Lc(t.spec, e), Bp
|
|
|
4533
4533
|
coord: t.spec.coords.coordType,
|
|
4534
4534
|
position: i.position
|
|
4535
4535
|
};
|
|
4536
|
-
},
|
|
4536
|
+
}, Xe = (e, t) => {
|
|
4537
4537
|
for (const n of e) {
|
|
4538
4538
|
const a = t(n);
|
|
4539
4539
|
if (a !== void 0) return a;
|
|
4540
4540
|
}
|
|
4541
4541
|
return null;
|
|
4542
|
-
}, Hp = ({ geom: e, coord: t, position: n }, a) =>
|
|
4542
|
+
}, Hp = ({ geom: e, coord: t, position: n }, a) => Xe(a, (o) => {
|
|
4543
4543
|
const i = xr(o.layers, e)?.[t]?.[n];
|
|
4544
4544
|
return i !== void 0 ? i : xr(o.geoms, e);
|
|
4545
4545
|
}), xr = (e, t) => e !== void 0 && Object.hasOwn(e, t) ? e[t] : void 0, Gp = ({ lineStyle: e, ...t }) => /* @__PURE__ */ v(T, {
|
|
@@ -4626,7 +4626,7 @@ var Do = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", _o =
|
|
|
4626
4626
|
], zo = ({ target: e }) => {
|
|
4627
4627
|
const t = O((b) => b), n = q(), a = _o(t, n), o = P(), i = le(), { ToggleGroup: l } = H();
|
|
4628
4628
|
if (a === null || !a.isStylable) return null;
|
|
4629
|
-
const s = e.axis === "both" ? "y" : e.axis, c = n.gridLine[s]().resolve(),
|
|
4629
|
+
const s = e.axis === "both" ? "y" : e.axis, c = n.gridLine[s]().resolve(), h = mt(c.dashArray), u = $p(e.axis, a), d = bt.map((b) => ({
|
|
4630
4630
|
value: b,
|
|
4631
4631
|
label: o(`editor.graphPanel.gridSection.lineStyles.${b}`),
|
|
4632
4632
|
icon: /* @__PURE__ */ r(Gp, { lineStyle: b })
|
|
@@ -4644,10 +4644,10 @@ var Do = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", _o =
|
|
|
4644
4644
|
return /* @__PURE__ */ v(j, { children: [/* @__PURE__ */ r(w, {
|
|
4645
4645
|
label: o("editor.graphPanel.gridSection.gridStyle"),
|
|
4646
4646
|
children: /* @__PURE__ */ r(l, {
|
|
4647
|
-
value:
|
|
4648
|
-
options:
|
|
4647
|
+
value: h,
|
|
4648
|
+
options: d,
|
|
4649
4649
|
onChange: m,
|
|
4650
|
-
isDisabled:
|
|
4650
|
+
isDisabled: u
|
|
4651
4651
|
})
|
|
4652
4652
|
}), /* @__PURE__ */ r(w, {
|
|
4653
4653
|
label: o("editor.graphPanel.gridSection.gridThickness"),
|
|
@@ -4655,7 +4655,7 @@ var Do = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", _o =
|
|
|
4655
4655
|
value: g,
|
|
4656
4656
|
options: p,
|
|
4657
4657
|
onChange: f,
|
|
4658
|
-
isDisabled:
|
|
4658
|
+
isDisabled: u
|
|
4659
4659
|
})
|
|
4660
4660
|
})] });
|
|
4661
4661
|
};
|
|
@@ -4719,10 +4719,10 @@ var wr = [
|
|
|
4719
4719
|
end: "End"
|
|
4720
4720
|
}, Up = () => {
|
|
4721
4721
|
const e = O((c) => c.guides.legends.drawn[0]), t = le(), n = P(), { RadioGrid: a } = H(), o = e === void 0, i = o ? "" : Kt(e), l = wr.map((c) => {
|
|
4722
|
-
const
|
|
4722
|
+
const h = Kt(c);
|
|
4723
4723
|
return {
|
|
4724
|
-
value:
|
|
4725
|
-
label: n(`editor.overlayMenu.legendPlaces.${
|
|
4724
|
+
value: h,
|
|
4725
|
+
label: n(`editor.overlayMenu.legendPlaces.${h}`),
|
|
4726
4726
|
icon: /* @__PURE__ */ r(ol, {
|
|
4727
4727
|
title: "",
|
|
4728
4728
|
size: "xs",
|
|
@@ -4732,10 +4732,10 @@ var wr = [
|
|
|
4732
4732
|
gridColumn: c.gridColumn
|
|
4733
4733
|
};
|
|
4734
4734
|
}), s = (c) => {
|
|
4735
|
-
const
|
|
4736
|
-
|
|
4737
|
-
position:
|
|
4738
|
-
align:
|
|
4735
|
+
const h = wr.find((u) => Kt(u) === c);
|
|
4736
|
+
h !== void 0 && t.dispatch(new Ss({
|
|
4737
|
+
position: h.position,
|
|
4738
|
+
align: h.align
|
|
4739
4739
|
}), { transient: !0 });
|
|
4740
4740
|
};
|
|
4741
4741
|
return /* @__PURE__ */ r(w, {
|
|
@@ -4758,10 +4758,10 @@ var wr = [
|
|
|
4758
4758
|
});
|
|
4759
4759
|
}, Kt = ({ position: e, align: t }) => e === "left" || e === "right" ? e : `${e}${Wp[t]}`, Kp = ({ gridRow: e, gridColumn: t }) => Math.atan2(t - 2, 2 - e) * 180 / Math.PI, qp = {
|
|
4760
4760
|
geoms: {
|
|
4761
|
-
point:
|
|
4762
|
-
line:
|
|
4763
|
-
area:
|
|
4764
|
-
bar:
|
|
4761
|
+
point: qe,
|
|
4762
|
+
line: qe,
|
|
4763
|
+
area: qe,
|
|
4764
|
+
bar: qe,
|
|
4765
4765
|
rule: null,
|
|
4766
4766
|
tile: null
|
|
4767
4767
|
},
|
|
@@ -4797,19 +4797,19 @@ var wr = [
|
|
|
4797
4797
|
return o === null || o.hasRows?.(e, n) === !1 ? null : /* @__PURE__ */ r(o, { target: e });
|
|
4798
4798
|
}
|
|
4799
4799
|
case "legend": {
|
|
4800
|
-
const a =
|
|
4800
|
+
const a = Xe(t, (o) => o.legend);
|
|
4801
4801
|
return a === null || a.hasRows?.(e, n) === !1 ? null : /* @__PURE__ */ r(a, { target: e });
|
|
4802
4802
|
}
|
|
4803
4803
|
case "axis": {
|
|
4804
|
-
const a =
|
|
4804
|
+
const a = Xe(t, (o) => o.axis);
|
|
4805
4805
|
return a === null || a.hasRows?.(e, n) === !1 ? null : /* @__PURE__ */ r(a, { target: e });
|
|
4806
4806
|
}
|
|
4807
4807
|
case "grid": {
|
|
4808
|
-
const a =
|
|
4808
|
+
const a = Xe(t, (o) => o.grid);
|
|
4809
4809
|
return a === null || a.hasRows?.(e, n) === !1 ? null : /* @__PURE__ */ r(a, { target: e });
|
|
4810
4810
|
}
|
|
4811
4811
|
case "graph": {
|
|
4812
|
-
const a =
|
|
4812
|
+
const a = Xe(t, (o) => o.graph);
|
|
4813
4813
|
return a === null || a.hasRows?.(e, n) === !1 ? null : /* @__PURE__ */ r(a, { target: e });
|
|
4814
4814
|
}
|
|
4815
4815
|
default:
|
|
@@ -4892,17 +4892,17 @@ var kr = (e, t) => {
|
|
|
4892
4892
|
i,
|
|
4893
4893
|
l,
|
|
4894
4894
|
s
|
|
4895
|
-
]),
|
|
4895
|
+
]), h = E(() => c !== null && e !== null && kr(c, e), [c, e]), u = Nt(), d = o !== null && i !== void 0 && e1(o, i, n, u) ? o.observationIndex : null;
|
|
4896
4896
|
return E(() => {
|
|
4897
4897
|
switch (a?.kind) {
|
|
4898
4898
|
case "observations": {
|
|
4899
4899
|
const p = c?.parts[0];
|
|
4900
4900
|
if (c === null || p === void 0) return null;
|
|
4901
|
-
const g =
|
|
4901
|
+
const g = d === null ? null : {
|
|
4902
4902
|
layer: p.layer,
|
|
4903
|
-
rows: [
|
|
4903
|
+
rows: [d]
|
|
4904
4904
|
};
|
|
4905
|
-
return
|
|
4905
|
+
return h ? g === null ? null : {
|
|
4906
4906
|
...c,
|
|
4907
4907
|
parts: Yp,
|
|
4908
4908
|
vertex: g
|
|
@@ -4927,8 +4927,8 @@ var kr = (e, t) => {
|
|
|
4927
4927
|
}, [
|
|
4928
4928
|
a,
|
|
4929
4929
|
c,
|
|
4930
|
-
u,
|
|
4931
4930
|
h,
|
|
4931
|
+
d,
|
|
4932
4932
|
e
|
|
4933
4933
|
]);
|
|
4934
4934
|
}, Qp = (e, t, n, a) => {
|
|
@@ -4957,7 +4957,7 @@ var kr = (e, t) => {
|
|
|
4957
4957
|
};
|
|
4958
4958
|
}, e1 = ({ observationIndex: e, target: t, isOnObservation: n }, a, o, i) => {
|
|
4959
4959
|
if (!n || t.scope !== "series") return !1;
|
|
4960
|
-
const l =
|
|
4960
|
+
const l = Je({
|
|
4961
4961
|
layer: a,
|
|
4962
4962
|
observationIndex: e,
|
|
4963
4963
|
scope: "data-point",
|
|
@@ -4985,8 +4985,8 @@ var kr = (e, t) => {
|
|
|
4985
4985
|
return i.flatMap((s) => {
|
|
4986
4986
|
const c = Tt([s], e);
|
|
4987
4987
|
if (c?.kind !== "grid" || c.target.axis === "both") return [];
|
|
4988
|
-
const { axis:
|
|
4989
|
-
return t.axis === "both" ||
|
|
4988
|
+
const { axis: h } = c.target;
|
|
4989
|
+
return t.axis === "both" || h === t.axis ? [o1(s, l(s), h)] : [];
|
|
4990
4990
|
});
|
|
4991
4991
|
}
|
|
4992
4992
|
}, n1 = (e) => {
|
|
@@ -5061,7 +5061,7 @@ var kr = (e, t) => {
|
|
|
5061
5061
|
const i = O((f) => f.coordSystem), l = fl(), s = ca(), c = d1(e.kind === "guide" ? e.target : null, {
|
|
5062
5062
|
frameElement: t,
|
|
5063
5063
|
frameSize: n
|
|
5064
|
-
}),
|
|
5064
|
+
}), h = c1(t, n), u = E(() => ({
|
|
5065
5065
|
coordSystem: i,
|
|
5066
5066
|
panelRect: a,
|
|
5067
5067
|
resolveRenderer: l,
|
|
@@ -5071,11 +5071,11 @@ var kr = (e, t) => {
|
|
|
5071
5071
|
a,
|
|
5072
5072
|
l,
|
|
5073
5073
|
s
|
|
5074
|
-
]),
|
|
5075
|
-
h,
|
|
5074
|
+
]), d = e.kind === "observations" ? e.parts : null, p = e.kind === "observations" ? e.vertex : null, g = E(() => d?.map((f) => Tr(f, u, o)) ?? l1, [
|
|
5076
5075
|
d,
|
|
5076
|
+
u,
|
|
5077
5077
|
o
|
|
5078
|
-
]), m = E(() => p === null ? null : Tr(p,
|
|
5078
|
+
]), m = E(() => p === null ? null : Tr(p, u, !1), [p, u]);
|
|
5079
5079
|
return E(() => {
|
|
5080
5080
|
switch (e.kind) {
|
|
5081
5081
|
case "observations":
|
|
@@ -5093,7 +5093,7 @@ var kr = (e, t) => {
|
|
|
5093
5093
|
case "graph":
|
|
5094
5094
|
return {
|
|
5095
5095
|
kind: "graph",
|
|
5096
|
-
frameSize:
|
|
5096
|
+
frameSize: h
|
|
5097
5097
|
};
|
|
5098
5098
|
}
|
|
5099
5099
|
}, [
|
|
@@ -5101,7 +5101,7 @@ var kr = (e, t) => {
|
|
|
5101
5101
|
g,
|
|
5102
5102
|
m,
|
|
5103
5103
|
c,
|
|
5104
|
-
|
|
5104
|
+
h
|
|
5105
5105
|
]);
|
|
5106
5106
|
}, c1 = (e, t) => {
|
|
5107
5107
|
const [n, a] = X(() => mr(e, t));
|
|
@@ -5131,7 +5131,7 @@ var kr = (e, t) => {
|
|
|
5131
5131
|
layer: s,
|
|
5132
5132
|
coordSystem: n,
|
|
5133
5133
|
panelSize: a
|
|
5134
|
-
}).map((
|
|
5134
|
+
}).map((h) => Zp(h, a))
|
|
5135
5135
|
} : {
|
|
5136
5136
|
kind: "declared",
|
|
5137
5137
|
layer: e,
|
|
@@ -5146,24 +5146,24 @@ var kr = (e, t) => {
|
|
|
5146
5146
|
})
|
|
5147
5147
|
};
|
|
5148
5148
|
}, d1 = (e, { frameElement: t, frameSize: n }) => {
|
|
5149
|
-
const a = O((
|
|
5149
|
+
const a = O((u) => u.coordSystem.type), o = O(Se((u) => u.guides.legends.drawn.map((d) => d.display))), i = O((u) => e === null ? null : u), [l, s] = X([]), c = ne(e), h = oe(!1);
|
|
5150
5150
|
return Me(() => {
|
|
5151
|
-
const
|
|
5152
|
-
if (
|
|
5153
|
-
const
|
|
5151
|
+
const u = c.current;
|
|
5152
|
+
if (u === null) return;
|
|
5153
|
+
const d = () => {
|
|
5154
5154
|
const p = t1({
|
|
5155
5155
|
frameElement: t,
|
|
5156
|
-
target:
|
|
5156
|
+
target: u,
|
|
5157
5157
|
coordType: a,
|
|
5158
5158
|
legendDisplays: o
|
|
5159
5159
|
}), g = Lo(t);
|
|
5160
5160
|
s(p.map((m) => u1(m, 1 / g)));
|
|
5161
5161
|
};
|
|
5162
|
-
if (
|
|
5163
|
-
const p = requestAnimationFrame(
|
|
5162
|
+
if (h.current) {
|
|
5163
|
+
const p = requestAnimationFrame(d);
|
|
5164
5164
|
return () => cancelAnimationFrame(p);
|
|
5165
5165
|
}
|
|
5166
|
-
|
|
5166
|
+
h.current = !0, d();
|
|
5167
5167
|
}, [
|
|
5168
5168
|
t,
|
|
5169
5169
|
c,
|
|
@@ -5312,7 +5312,7 @@ var kr = (e, t) => {
|
|
|
5312
5312
|
}, l.outlined.key)]
|
|
5313
5313
|
});
|
|
5314
5314
|
}), Ar = ({ part: e, target: t, editTarget: n, look: a, frameSize: o, panelRect: i, frameElement: l, shouldAnimateTransitions: s }) => {
|
|
5315
|
-
const c = Ae(),
|
|
5315
|
+
const c = Ae(), h = `${c}-shapes`, u = `${c}-hole`, d = s1(t, {
|
|
5316
5316
|
frameElement: l,
|
|
5317
5317
|
frameSize: o,
|
|
5318
5318
|
panelRect: i,
|
|
@@ -5320,7 +5320,7 @@ var kr = (e, t) => {
|
|
|
5320
5320
|
});
|
|
5321
5321
|
return vp(n === void 0 ? null : {
|
|
5322
5322
|
target: n,
|
|
5323
|
-
outline:
|
|
5323
|
+
outline: d
|
|
5324
5324
|
}, {
|
|
5325
5325
|
frameElement: l,
|
|
5326
5326
|
panelRect: i,
|
|
@@ -5330,15 +5330,15 @@ var kr = (e, t) => {
|
|
|
5330
5330
|
"data-testid": `edit-outline-${e}`,
|
|
5331
5331
|
children: [
|
|
5332
5332
|
/* @__PURE__ */ v("defs", { children: [/* @__PURE__ */ r("g", {
|
|
5333
|
-
id:
|
|
5333
|
+
id: h,
|
|
5334
5334
|
className: bp,
|
|
5335
5335
|
children: /* @__PURE__ */ r(x1, {
|
|
5336
|
-
outline:
|
|
5336
|
+
outline: d,
|
|
5337
5337
|
look: a,
|
|
5338
5338
|
panelRect: i
|
|
5339
5339
|
})
|
|
5340
5340
|
}), /* @__PURE__ */ v("mask", {
|
|
5341
|
-
id:
|
|
5341
|
+
id: u,
|
|
5342
5342
|
maskUnits: "userSpaceOnUse",
|
|
5343
5343
|
x: "-100%",
|
|
5344
5344
|
y: "-100%",
|
|
@@ -5351,18 +5351,18 @@ var kr = (e, t) => {
|
|
|
5351
5351
|
height: "300%",
|
|
5352
5352
|
fill: "white"
|
|
5353
5353
|
}), /* @__PURE__ */ r("use", {
|
|
5354
|
-
href: `#${
|
|
5354
|
+
href: `#${h}`,
|
|
5355
5355
|
style: f1(a.offset)
|
|
5356
5356
|
})]
|
|
5357
5357
|
})] }),
|
|
5358
5358
|
/* @__PURE__ */ v("g", {
|
|
5359
|
-
mask: `url(#${
|
|
5359
|
+
mask: `url(#${u})`,
|
|
5360
5360
|
"data-testid": `edit-outline-${e}-ring`,
|
|
5361
5361
|
children: [/* @__PURE__ */ r("use", {
|
|
5362
|
-
href: `#${
|
|
5362
|
+
href: `#${h}`,
|
|
5363
5363
|
style: b1(a)
|
|
5364
5364
|
}), /* @__PURE__ */ r("use", {
|
|
5365
|
-
href: `#${
|
|
5365
|
+
href: `#${h}`,
|
|
5366
5366
|
style: y1(a)
|
|
5367
5367
|
})]
|
|
5368
5368
|
}),
|
|
@@ -5478,15 +5478,15 @@ var kr = (e, t) => {
|
|
|
5478
5478
|
}, T1 = ({ target: e, shapes: t, borderRadius: n, dashPeriod: a }) => {
|
|
5479
5479
|
const o = q();
|
|
5480
5480
|
if (e.kind === "grid") return g1.map((l) => {
|
|
5481
|
-
const s = Po(la(o, l).strokeWidth), c = t.map((
|
|
5481
|
+
const s = Po(la(o, l).strokeWidth), c = t.map((u) => A1(u, l)).join(""), h = t.filter((u) => u.kind === "ring" && u.axis === l);
|
|
5482
5482
|
return /* @__PURE__ */ v(Va, { children: [c !== "" && /* @__PURE__ */ r("path", {
|
|
5483
5483
|
d: c,
|
|
5484
5484
|
...s
|
|
5485
|
-
}),
|
|
5486
|
-
d: L1(
|
|
5487
|
-
pathLength: $o(
|
|
5485
|
+
}), h.map((u, d) => /* @__PURE__ */ r("path", {
|
|
5486
|
+
d: L1(u),
|
|
5487
|
+
pathLength: $o(u.radius, a),
|
|
5488
5488
|
...s
|
|
5489
|
-
},
|
|
5489
|
+
}, d))] }, l);
|
|
5490
5490
|
});
|
|
5491
5491
|
const i = t.map((l) => l.kind === "box" ? xn(l.rect, n) : "").join("");
|
|
5492
5492
|
return i === "" ? null : /* @__PURE__ */ r("path", { d: i });
|
|
@@ -5547,8 +5547,8 @@ var kr = (e, t) => {
|
|
|
5547
5547
|
align: "shift",
|
|
5548
5548
|
fallbackAxisSide: "end"
|
|
5549
5549
|
}, _1 = ({ frameElement: e, boundary: t, spans: n, clearance: a = N1, onEscape: o, children: i }) => {
|
|
5550
|
-
const l =
|
|
5551
|
-
|
|
5550
|
+
const l = $e(), s = Uo(), [c, h] = X(null), u = oe(null), d = ae((C) => {
|
|
5551
|
+
u.current = C, h(C);
|
|
5552
5552
|
}, []), p = oe(null);
|
|
5553
5553
|
Me(() => () => {
|
|
5554
5554
|
c?.contains(document.activeElement) && e.focus({ preventScroll: !0 });
|
|
@@ -5594,9 +5594,9 @@ var kr = (e, t) => {
|
|
|
5594
5594
|
className: E1,
|
|
5595
5595
|
...En,
|
|
5596
5596
|
children: /* @__PURE__ */ r(J.Popup, {
|
|
5597
|
-
ref:
|
|
5597
|
+
ref: d,
|
|
5598
5598
|
className: M1,
|
|
5599
|
-
initialFocus:
|
|
5599
|
+
initialFocus: u,
|
|
5600
5600
|
finalFocus: !1,
|
|
5601
5601
|
"data-testid": "anchored-popover",
|
|
5602
5602
|
children: i
|
|
@@ -5798,16 +5798,16 @@ var kr = (e, t) => {
|
|
|
5798
5798
|
s
|
|
5799
5799
|
]);
|
|
5800
5800
|
if (c === null) return null;
|
|
5801
|
-
const { layer:
|
|
5801
|
+
const { layer: h, levels: u, names: d } = c, { observationIndex: p, selectedFor: g } = c.pressed, m = u.map((b) => {
|
|
5802
5802
|
const y = W1[b];
|
|
5803
5803
|
return {
|
|
5804
5804
|
value: b,
|
|
5805
|
-
label:
|
|
5805
|
+
label: d[b],
|
|
5806
5806
|
icon: /* @__PURE__ */ r(y, {})
|
|
5807
5807
|
};
|
|
5808
5808
|
}), f = (b) => {
|
|
5809
|
-
const y =
|
|
5810
|
-
layer:
|
|
5809
|
+
const y = u.find((C) => C === b), { parsingLocale: k } = o.config, x = y === void 0 ? null : Je({
|
|
5810
|
+
layer: h,
|
|
5811
5811
|
observationIndex: p,
|
|
5812
5812
|
scope: y,
|
|
5813
5813
|
parsingLocale: k
|
|
@@ -5826,21 +5826,21 @@ var kr = (e, t) => {
|
|
|
5826
5826
|
}, K1 = ({ scene: e, pressed: t, groupOptions: n, locale: a, t: o, hasOverlayMenu: i }) => {
|
|
5827
5827
|
const l = t === null ? null : ll(t, e.layers, e.config.parsingLocale);
|
|
5828
5828
|
if (t === null || l === null) return null;
|
|
5829
|
-
const { layer: s, observation: c } = l, { observationIndex:
|
|
5829
|
+
const { layer: s, observation: c } = l, { observationIndex: h, selectedFor: u } = t, { parsingLocale: d } = e.config, p = Pc({
|
|
5830
5830
|
layer: s,
|
|
5831
|
-
observationIndex:
|
|
5832
|
-
parsingLocale:
|
|
5831
|
+
observationIndex: h,
|
|
5832
|
+
parsingLocale: d,
|
|
5833
5833
|
scales: e.scales
|
|
5834
5834
|
}).filter((g) => {
|
|
5835
|
-
const m =
|
|
5835
|
+
const m = Je({
|
|
5836
5836
|
layer: s,
|
|
5837
|
-
observationIndex:
|
|
5837
|
+
observationIndex: h,
|
|
5838
5838
|
scope: g,
|
|
5839
|
-
parsingLocale:
|
|
5839
|
+
parsingLocale: d
|
|
5840
5840
|
});
|
|
5841
5841
|
return m !== null && i(m);
|
|
5842
5842
|
});
|
|
5843
|
-
return p.length < 2 || !p.includes(
|
|
5843
|
+
return p.length < 2 || !p.includes(u.scope) ? null : {
|
|
5844
5844
|
pressed: t,
|
|
5845
5845
|
layer: s,
|
|
5846
5846
|
levels: p,
|
|
@@ -5883,19 +5883,19 @@ var kr = (e, t) => {
|
|
|
5883
5883
|
}), j1 = "_1de58rm0", Z1 = ({ target: e }) => {
|
|
5884
5884
|
const t = P(), n = le(), a = O((g) => g), [o, i] = X(null), l = Vo(e, a);
|
|
5885
5885
|
if (l === null) return null;
|
|
5886
|
-
const { isHidden: s, hide: c, show:
|
|
5886
|
+
const { isHidden: s, hide: c, show: h } = l, u = () => {
|
|
5887
5887
|
if (s) {
|
|
5888
|
-
n.dispatch(o ??
|
|
5888
|
+
n.dispatch(o ?? h);
|
|
5889
5889
|
return;
|
|
5890
5890
|
}
|
|
5891
|
-
i(
|
|
5892
|
-
},
|
|
5891
|
+
i(h), n.dispatch(c);
|
|
5892
|
+
}, d = t(s ? "editor.overlayMenu.show" : "editor.overlayMenu.hide");
|
|
5893
5893
|
return /* @__PURE__ */ r(Rn, {
|
|
5894
|
-
label:
|
|
5894
|
+
label: d,
|
|
5895
5895
|
children: /* @__PURE__ */ r("button", {
|
|
5896
5896
|
type: "button",
|
|
5897
5897
|
className: j1,
|
|
5898
|
-
onClick:
|
|
5898
|
+
onClick: u,
|
|
5899
5899
|
children: /* @__PURE__ */ r(s ? X1 : q1, { title: "" })
|
|
5900
5900
|
})
|
|
5901
5901
|
});
|
|
@@ -6025,8 +6025,8 @@ var Yo = "efjmb40", Jo = "efjmb41", De = "efjmb42", _e = "efjmb43", i2 = "efjmb4
|
|
|
6025
6025
|
"sibling-open",
|
|
6026
6026
|
"trigger-press"
|
|
6027
6027
|
]), Fn = ({ label: e, icon: t, onOpened: n, children: a }) => {
|
|
6028
|
-
const o =
|
|
6029
|
-
c ? (l(!0), n?.()) : s2.has(
|
|
6028
|
+
const o = $e(), [i, l] = X(!1), s = (c, h) => {
|
|
6029
|
+
c ? (l(!0), n?.()) : s2.has(h.reason) && l(!1);
|
|
6030
6030
|
};
|
|
6031
6031
|
return /* @__PURE__ */ v(ke.SubmenuRoot, {
|
|
6032
6032
|
open: i,
|
|
@@ -6064,12 +6064,12 @@ var Yo = "efjmb40", Jo = "efjmb41", De = "efjmb42", _e = "efjmb43", i2 = "efjmb4
|
|
|
6064
6064
|
})
|
|
6065
6065
|
]
|
|
6066
6066
|
}), d2 = "_1qe7q450", u2 = "_1qe7q451", h2 = "_1qe7q452", p2 = ({ label: e, placeholder: t, addLabel: n, at: a, onRequestClose: o }) => {
|
|
6067
|
-
const i = oe(null), [l, s] = X(""), { dispatch: c } = le(),
|
|
6068
|
-
|
|
6067
|
+
const i = oe(null), [l, s] = X(""), { dispatch: c } = le(), h = l.trim(), u = () => {
|
|
6068
|
+
h.length !== 0 && (c(new we({
|
|
6069
6069
|
kind: "comment",
|
|
6070
6070
|
annotation: {
|
|
6071
6071
|
at: a,
|
|
6072
|
-
content: m2(
|
|
6072
|
+
content: m2(h)
|
|
6073
6073
|
}
|
|
6074
6074
|
})), o());
|
|
6075
6075
|
};
|
|
@@ -6090,13 +6090,13 @@ var Yo = "efjmb40", Jo = "efjmb41", De = "efjmb42", _e = "efjmb43", i2 = "efjmb4
|
|
|
6090
6090
|
s(m.target.value);
|
|
6091
6091
|
},
|
|
6092
6092
|
onKeyDown: (m) => {
|
|
6093
|
-
m.key === "Enter" && (m.preventDefault(),
|
|
6093
|
+
m.key === "Enter" && (m.preventDefault(), u()), m.key !== "Escape" && m.stopPropagation();
|
|
6094
6094
|
}
|
|
6095
6095
|
}), /* @__PURE__ */ r("button", {
|
|
6096
6096
|
type: "button",
|
|
6097
6097
|
className: h2,
|
|
6098
|
-
disabled:
|
|
6099
|
-
onClick:
|
|
6098
|
+
disabled: h.length === 0,
|
|
6099
|
+
onClick: u,
|
|
6100
6100
|
children: n
|
|
6101
6101
|
})]
|
|
6102
6102
|
})
|
|
@@ -6480,11 +6480,11 @@ var y2 = (e) => {
|
|
|
6480
6480
|
}, o.scope))
|
|
6481
6481
|
});
|
|
6482
6482
|
}, P2 = ({ label: e, layer: t, observation: n, highlights: a, onRequestClose: o }) => {
|
|
6483
|
-
const i = P(), { dispatch: l } = le(), s = O((g) => g.coordSystem), c = E(() => $s(t, n), [t, n]),
|
|
6483
|
+
const i = P(), { dispatch: l } = le(), s = O((g) => g.coordSystem), c = E(() => $s(t, n), [t, n]), h = E(() => b2(s, t), [s, t]), u = E(() => {
|
|
6484
6484
|
const g = new Set(a.map((m) => m.scope));
|
|
6485
|
-
return
|
|
6486
|
-
}, [
|
|
6487
|
-
if (c === null ||
|
|
6485
|
+
return h.filter((m) => !g.has(m.scope));
|
|
6486
|
+
}, [h, a]), [d] = u;
|
|
6487
|
+
if (c === null || d === void 0) return null;
|
|
6488
6488
|
const p = (g) => {
|
|
6489
6489
|
l(new Kl({
|
|
6490
6490
|
predicate: c,
|
|
@@ -6492,12 +6492,12 @@ var y2 = (e) => {
|
|
|
6492
6492
|
layerId: t.id
|
|
6493
6493
|
})), o();
|
|
6494
6494
|
};
|
|
6495
|
-
if (
|
|
6496
|
-
const g =
|
|
6495
|
+
if (u.length === 1) {
|
|
6496
|
+
const g = h.length === 1 ? e : i("graph.annotations.baseMenu.highlightWithLabel", { label: i(`graph.annotations.highlights.labels.${d.labelKey}`) });
|
|
6497
6497
|
return /* @__PURE__ */ v(ke.Item, {
|
|
6498
6498
|
className: De,
|
|
6499
|
-
onClick: () => p(
|
|
6500
|
-
children: [/* @__PURE__ */ r(Qo, { labelKey:
|
|
6499
|
+
onClick: () => p(d.scope),
|
|
6500
|
+
children: [/* @__PURE__ */ r(Qo, { labelKey: d.labelKey }), /* @__PURE__ */ r("span", {
|
|
6501
6501
|
className: _e,
|
|
6502
6502
|
children: g
|
|
6503
6503
|
})]
|
|
@@ -6505,7 +6505,7 @@ var y2 = (e) => {
|
|
|
6505
6505
|
}
|
|
6506
6506
|
return /* @__PURE__ */ r(L2, {
|
|
6507
6507
|
label: e,
|
|
6508
|
-
options:
|
|
6508
|
+
options: u,
|
|
6509
6509
|
onSelect: p
|
|
6510
6510
|
});
|
|
6511
6511
|
}, I2 = "_1aafi1g0", E2 = "_1aafi1g1", ti = ({ children: e }) => /* @__PURE__ */ v("span", {
|
|
@@ -6686,22 +6686,22 @@ var y2 = (e) => {
|
|
|
6686
6686
|
onClose: i
|
|
6687
6687
|
});
|
|
6688
6688
|
}, G2 = ({ frameElement: e, trigger: t, layer: n, at: a, observation: o, onClose: i }) => {
|
|
6689
|
-
const l = P(), s =
|
|
6690
|
-
x:
|
|
6689
|
+
const l = P(), s = $e(), c = O((C) => C.spec.annotations), h = O((C) => C.config.parsingLocale), u = Uo(), { x: d, y: p, width: g, height: m } = t, f = E(() => Wo(e, {
|
|
6690
|
+
x: d,
|
|
6691
6691
|
y: p,
|
|
6692
6692
|
width: g,
|
|
6693
6693
|
height: m
|
|
6694
6694
|
}), [
|
|
6695
6695
|
e,
|
|
6696
|
-
|
|
6696
|
+
d,
|
|
6697
6697
|
p,
|
|
6698
6698
|
g,
|
|
6699
6699
|
m
|
|
6700
|
-
]), b = ac(c, a, E(() => js(n,
|
|
6700
|
+
]), b = ac(c, a, E(() => js(n, h), [n, h])), y = b !== null && N2(b) ? b : null, k = O2(n, o), x = (C, I) => {
|
|
6701
6701
|
!C && V2(I.reason) && i();
|
|
6702
6702
|
};
|
|
6703
6703
|
return /* @__PURE__ */ r(V.Root, {
|
|
6704
|
-
open:
|
|
6704
|
+
open: u,
|
|
6705
6705
|
modal: !1,
|
|
6706
6706
|
onOpenChange: x,
|
|
6707
6707
|
children: /* @__PURE__ */ r(V.Portal, {
|
|
@@ -6904,13 +6904,13 @@ var y2 = (e) => {
|
|
|
6904
6904
|
/* @__PURE__ */ r("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" })
|
|
6905
6905
|
]
|
|
6906
6906
|
})
|
|
6907
|
-
}), X2 = "var(--pvjfpx0)", j2 = "var(--pvjfpx1)", Z2 = "pvjfpx2", Y2 = "pvjfpx3", J2 = "pvjfpx4", Q2 = "pvjfpx6 pvjfpx5", em = "pvjfpx7 pvjfpx6 pvjfpx5", tm = "pvjfpx8 pvjfpx5",
|
|
6908
|
-
const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, s = i + 8, c = Ge(l >=
|
|
6907
|
+
}), X2 = "var(--pvjfpx0)", j2 = "var(--pvjfpx1)", Z2 = "pvjfpx2", Y2 = "pvjfpx3", J2 = "pvjfpx4", Q2 = "pvjfpx6 pvjfpx5", em = "pvjfpx7 pvjfpx6 pvjfpx5", tm = "pvjfpx8 pvjfpx5", Ue = 8, nm = ({ anchorBox: e, panelRect: t, frameWidth: n, frameHeight: a }) => {
|
|
6908
|
+
const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, s = i + 8, c = Ge(l >= Ue ? l : s, Ue, a - Ue - 36), h = Ue;
|
|
6909
6909
|
return {
|
|
6910
6910
|
top: c,
|
|
6911
|
-
left:
|
|
6912
|
-
available: Math.max(0, n -
|
|
6913
|
-
centre: t.x + e.x + e.width / 2 -
|
|
6911
|
+
left: h,
|
|
6912
|
+
available: Math.max(0, n - Ue * 2),
|
|
6913
|
+
centre: t.x + e.x + e.width / 2 - h
|
|
6914
6914
|
};
|
|
6915
6915
|
}, rm = ({ anchorBox: e, panelRect: t, frameWidth: n, frameHeight: a, label: o, testId: i, children: l }) => {
|
|
6916
6916
|
const { chartId: s } = z(), c = nm({
|
|
@@ -7078,7 +7078,7 @@ var y2 = (e) => {
|
|
|
7078
7078
|
}
|
|
7079
7079
|
], mm = (e, t) => e.find((n) => n.value === t) ?? e[0];
|
|
7080
7080
|
var gm = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
|
|
7081
|
-
const l = P(), { commands: s } = z(), c = O((R) => R.spec.styles.overrides),
|
|
7081
|
+
const l = P(), { commands: s } = z(), c = O((R) => R.spec.styles.overrides), h = O((R) => Ne(R.spec)), u = _t(), d = An(q(), e.id), p = mm(Mr, mt(d.dashArray)), g = d.outline.strokeWidth > 0 || d.outline.shadow !== "none", m = E(() => ({
|
|
7082
7082
|
target: "annotation",
|
|
7083
7083
|
kind: "arrow",
|
|
7084
7084
|
annotation: e.id
|
|
@@ -7086,7 +7086,7 @@ var gm = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
7086
7086
|
...m,
|
|
7087
7087
|
part: "outline"
|
|
7088
7088
|
}), [m]), b = (R, S) => {
|
|
7089
|
-
const N = Te(c, { select: m },
|
|
7089
|
+
const N = Te(c, { select: m }, h)?.declarations ?? {};
|
|
7090
7090
|
s.dispatch(new Ee({
|
|
7091
7091
|
list: "overrides",
|
|
7092
7092
|
rule: {
|
|
@@ -7098,7 +7098,7 @@ var gm = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
7098
7098
|
}
|
|
7099
7099
|
}), S);
|
|
7100
7100
|
}, y = (R) => {
|
|
7101
|
-
const S = Te(c, { select: f },
|
|
7101
|
+
const S = Te(c, { select: f }, h)?.declarations ?? {};
|
|
7102
7102
|
s.dispatch(new Ee({
|
|
7103
7103
|
list: "overrides",
|
|
7104
7104
|
rule: {
|
|
@@ -7110,13 +7110,13 @@ var gm = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
7110
7110
|
}
|
|
7111
7111
|
}));
|
|
7112
7112
|
}, k = (R) => {
|
|
7113
|
-
b(R),
|
|
7113
|
+
b(R), u.close();
|
|
7114
7114
|
}, x = (R) => {
|
|
7115
7115
|
s.dispatch(new pe({
|
|
7116
7116
|
kind: "arrow",
|
|
7117
7117
|
id: e.id,
|
|
7118
7118
|
patch: R
|
|
7119
|
-
})),
|
|
7119
|
+
})), u.close();
|
|
7120
7120
|
}, C = () => {
|
|
7121
7121
|
s.dispatch(new Ve({ id: e.id })), i.focus({ preventScroll: !0 });
|
|
7122
7122
|
}, I = (R) => b({ stroke: R }, { transient: !0 }), L = (R) => k({ strokeWidth: R }), A = (R) => x({ startArrowheadStyle: R }), B = (R) => k({ dashArray: Xl.arrow[R] }), ee = (R) => x({ endArrowheadStyle: R }), D = () => y(g ? {
|
|
@@ -7132,11 +7132,11 @@ var gm = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
7132
7132
|
testId: "arrow-toolbar",
|
|
7133
7133
|
children: [
|
|
7134
7134
|
/* @__PURE__ */ r(_.ColorPicker, {
|
|
7135
|
-
color:
|
|
7135
|
+
color: d.stroke,
|
|
7136
7136
|
label: l("graph.annotations.arrowToolbar.color"),
|
|
7137
7137
|
onChange: I,
|
|
7138
|
-
...
|
|
7139
|
-
children: /* @__PURE__ */ r(_.Swatch, { color:
|
|
7138
|
+
...u.bind("color"),
|
|
7139
|
+
children: /* @__PURE__ */ r(_.Swatch, { color: d.stroke })
|
|
7140
7140
|
}),
|
|
7141
7141
|
/* @__PURE__ */ r(_.Dropdown, {
|
|
7142
7142
|
label: l("graph.annotations.arrowToolbar.thickness.ariaLabel"),
|
|
@@ -7144,10 +7144,10 @@ var gm = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
7144
7144
|
size: "sm",
|
|
7145
7145
|
title: ""
|
|
7146
7146
|
}),
|
|
7147
|
-
...
|
|
7147
|
+
...u.bind("thickness"),
|
|
7148
7148
|
children: /* @__PURE__ */ r(st, {
|
|
7149
7149
|
options: pm,
|
|
7150
|
-
current:
|
|
7150
|
+
current: d.strokeWidth,
|
|
7151
7151
|
onPick: L
|
|
7152
7152
|
})
|
|
7153
7153
|
}),
|
|
@@ -7157,7 +7157,7 @@ var gm = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
7157
7157
|
size: "sm",
|
|
7158
7158
|
title: ""
|
|
7159
7159
|
}),
|
|
7160
|
-
...
|
|
7160
|
+
...u.bind("startArrowhead"),
|
|
7161
7161
|
children: /* @__PURE__ */ r(st, {
|
|
7162
7162
|
options: Er,
|
|
7163
7163
|
current: e.startArrowheadStyle,
|
|
@@ -7170,10 +7170,10 @@ var gm = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
7170
7170
|
size: "sm",
|
|
7171
7171
|
title: ""
|
|
7172
7172
|
}),
|
|
7173
|
-
...
|
|
7173
|
+
...u.bind("lineStyle"),
|
|
7174
7174
|
children: /* @__PURE__ */ r(st, {
|
|
7175
7175
|
options: Mr,
|
|
7176
|
-
current: mt(
|
|
7176
|
+
current: mt(d.dashArray),
|
|
7177
7177
|
onPick: B
|
|
7178
7178
|
})
|
|
7179
7179
|
}),
|
|
@@ -7183,7 +7183,7 @@ var gm = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
7183
7183
|
size: "sm",
|
|
7184
7184
|
title: ""
|
|
7185
7185
|
}),
|
|
7186
|
-
...
|
|
7186
|
+
...u.bind("endArrowhead"),
|
|
7187
7187
|
children: /* @__PURE__ */ r(st, {
|
|
7188
7188
|
options: Er,
|
|
7189
7189
|
current: e.endArrowheadStyle,
|
|
@@ -7361,12 +7361,12 @@ var bm = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, nt = class {
|
|
|
7361
7361
|
e,
|
|
7362
7362
|
l,
|
|
7363
7363
|
s
|
|
7364
|
-
]), ae((c) => ({ onKeyDown: (
|
|
7365
|
-
if (
|
|
7366
|
-
const
|
|
7367
|
-
if (Cm.includes(
|
|
7368
|
-
if (
|
|
7369
|
-
if (
|
|
7364
|
+
]), ae((c) => ({ onKeyDown: (h) => {
|
|
7365
|
+
if (h.altKey || h.ctrlKey || h.metaKey || h.shiftKey) return;
|
|
7366
|
+
const u = o.getState(), d = Cn(U(u, "arrow-endpoint-drag"), e, c);
|
|
7367
|
+
if (Cm.includes(h.key)) {
|
|
7368
|
+
if (h.preventDefault(), h.repeat) return;
|
|
7369
|
+
if (d !== null) {
|
|
7370
7370
|
Rr({
|
|
7371
7371
|
editorStore: o,
|
|
7372
7372
|
annotationId: e,
|
|
@@ -7378,7 +7378,7 @@ var bm = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, nt = class {
|
|
|
7378
7378
|
}
|
|
7379
7379
|
const g = yt(i, e, c);
|
|
7380
7380
|
if (g === null) return;
|
|
7381
|
-
|
|
7381
|
+
u.claimInteraction({
|
|
7382
7382
|
kind: "arrow-endpoint-drag",
|
|
7383
7383
|
annotationId: e,
|
|
7384
7384
|
endpoint: c,
|
|
@@ -7387,15 +7387,15 @@ var bm = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, nt = class {
|
|
|
7387
7387
|
});
|
|
7388
7388
|
return;
|
|
7389
7389
|
}
|
|
7390
|
-
if (
|
|
7391
|
-
const p = wm(
|
|
7392
|
-
p !== null && (
|
|
7390
|
+
if (d === null) return;
|
|
7391
|
+
const p = wm(h.key, n);
|
|
7392
|
+
p !== null && (h.preventDefault(), u.claimInteraction({
|
|
7393
7393
|
kind: "arrow-endpoint-drag",
|
|
7394
7394
|
annotationId: e,
|
|
7395
7395
|
endpoint: c,
|
|
7396
7396
|
...ii({
|
|
7397
|
-
anchor:
|
|
7398
|
-
point:
|
|
7397
|
+
anchor: d.anchor,
|
|
7398
|
+
point: d.point,
|
|
7399
7399
|
delta: p
|
|
7400
7400
|
})
|
|
7401
7401
|
}));
|
|
@@ -7456,11 +7456,11 @@ var bm = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, nt = class {
|
|
|
7456
7456
|
...e
|
|
7457
7457
|
});
|
|
7458
7458
|
}, Tm = ({ arrow: e, committed: t, painted: n, isSettled: a, isMoved: o, panelRect: i, frameRect: l, frameElement: s }) => {
|
|
7459
|
-
const c = P(),
|
|
7459
|
+
const c = P(), h = Sm({
|
|
7460
7460
|
annotationId: e.id,
|
|
7461
7461
|
arrow: t,
|
|
7462
7462
|
panelRect: i
|
|
7463
|
-
}),
|
|
7463
|
+
}), u = xm({
|
|
7464
7464
|
annotationId: e.id,
|
|
7465
7465
|
arrow: t,
|
|
7466
7466
|
panelRect: i
|
|
@@ -7475,13 +7475,13 @@ var bm = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, nt = class {
|
|
|
7475
7475
|
frameWidth: l.width,
|
|
7476
7476
|
frameHeight: l.height,
|
|
7477
7477
|
frameElement: s
|
|
7478
|
-
}), !o && oi.filter((
|
|
7479
|
-
endpoint:
|
|
7480
|
-
point: $2(n[
|
|
7481
|
-
label: c(`graph.annotations.arrowToolbar.moveEndpoint.${
|
|
7482
|
-
dragHandlers:
|
|
7483
|
-
keyboardHandlers: d
|
|
7484
|
-
},
|
|
7478
|
+
}), !o && oi.filter((d) => e[d].anchorType === "panel").map((d) => /* @__PURE__ */ r(Am, {
|
|
7479
|
+
endpoint: d,
|
|
7480
|
+
point: $2(n[d], i),
|
|
7481
|
+
label: c(`graph.annotations.arrowToolbar.moveEndpoint.${d}`),
|
|
7482
|
+
dragHandlers: h(d),
|
|
7483
|
+
keyboardHandlers: u(d)
|
|
7484
|
+
}, d))]
|
|
7485
7485
|
});
|
|
7486
7486
|
}, Am = ({ endpoint: e, point: t, label: n, dragHandlers: a, keyboardHandlers: o }) => /* @__PURE__ */ r("div", {
|
|
7487
7487
|
"aria-label": n,
|
|
@@ -7562,7 +7562,7 @@ var Nm = [
|
|
|
7562
7562
|
key: "graph.annotations.differenceArrowToolbar.size.large"
|
|
7563
7563
|
}
|
|
7564
7564
|
], Bm = ({ arrow: e, color: t, labelBox: n, panelRect: a, frameWidth: o, frameHeight: i, frameElement: l }) => {
|
|
7565
|
-
const s = P(), { commands: c } = z(),
|
|
7565
|
+
const s = P(), { commands: c } = z(), h = O((S) => S.spec.styles.overrides), u = O((S) => Ne(S.spec)), d = _t(), p = Fm(e), g = Dc(q(), e.id), m = E(() => ({
|
|
7566
7566
|
target: "annotation",
|
|
7567
7567
|
kind: "differenceArrow",
|
|
7568
7568
|
annotation: e.id
|
|
@@ -7576,13 +7576,13 @@ var Nm = [
|
|
|
7576
7576
|
patch: S
|
|
7577
7577
|
}), N);
|
|
7578
7578
|
}, C = (S) => ({
|
|
7579
|
-
...Te(
|
|
7579
|
+
...Te(h, { select: m }, u)?.declarations,
|
|
7580
7580
|
...S
|
|
7581
7581
|
}), I = (S) => ({
|
|
7582
|
-
...Te(
|
|
7582
|
+
...Te(h, { select: f }, u)?.declarations,
|
|
7583
7583
|
...S
|
|
7584
7584
|
}), L = (S) => {
|
|
7585
|
-
x(S),
|
|
7585
|
+
x(S), d.close();
|
|
7586
7586
|
}, A = () => {
|
|
7587
7587
|
c.dispatch(new Ve({ id: e.id })), l.focus({ preventScroll: !0 });
|
|
7588
7588
|
}, B = (S) => c.dispatch(new Ee({
|
|
@@ -7600,7 +7600,7 @@ var Nm = [
|
|
|
7600
7600
|
annotationId: e.id,
|
|
7601
7601
|
arrow: C(N.arrow),
|
|
7602
7602
|
label: I(N.label)
|
|
7603
|
-
})),
|
|
7603
|
+
})), d.close();
|
|
7604
7604
|
};
|
|
7605
7605
|
return /* @__PURE__ */ v(_.Root, {
|
|
7606
7606
|
anchorBox: n,
|
|
@@ -7614,7 +7614,7 @@ var Nm = [
|
|
|
7614
7614
|
label: s("graph.annotations.differenceArrowToolbar.labelKind.ariaLabel"),
|
|
7615
7615
|
trigger: /* @__PURE__ */ r(zm, { option: b }),
|
|
7616
7616
|
isDisabled: !y,
|
|
7617
|
-
...
|
|
7617
|
+
...d.bind("labelKind"),
|
|
7618
7618
|
children: p.map((S) => /* @__PURE__ */ v(_.MenuItem, {
|
|
7619
7619
|
isSelected: S.kind === e.label,
|
|
7620
7620
|
isDisabled: !S.isPickable,
|
|
@@ -7639,13 +7639,13 @@ var Nm = [
|
|
|
7639
7639
|
color: t,
|
|
7640
7640
|
label: s("graph.annotations.differenceArrowToolbar.color"),
|
|
7641
7641
|
onChange: B,
|
|
7642
|
-
...
|
|
7642
|
+
...d.bind("color"),
|
|
7643
7643
|
children: /* @__PURE__ */ r(_.Swatch, { color: t })
|
|
7644
7644
|
}),
|
|
7645
7645
|
/* @__PURE__ */ r(_.Dropdown, {
|
|
7646
7646
|
label: s("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
|
|
7647
7647
|
trigger: k === void 0 ? "" : s(k.key),
|
|
7648
|
-
...
|
|
7648
|
+
...d.bind("size"),
|
|
7649
7649
|
children: Dr.map((S) => /* @__PURE__ */ r(_.MenuItem, {
|
|
7650
7650
|
isSelected: S.id === k?.id,
|
|
7651
7651
|
onClick: R(S.id),
|
|
@@ -7686,18 +7686,18 @@ var Nm = [
|
|
|
7686
7686
|
})] });
|
|
7687
7687
|
}, Hm = "var(--ydgo3h0)";
|
|
7688
7688
|
var Gm = "ydgo3h1", Vm = "ydgo3h2", $m = "ydgo3h3", Wm = ({ clientPoint: e, panelOrigin: t, panelRect: n, engine: a, layers: o, coordSystem: i, resolver: l, fixedAnchor: s, align: c }) => {
|
|
7689
|
-
const
|
|
7689
|
+
const h = Um({
|
|
7690
7690
|
x: e.x - t.x,
|
|
7691
7691
|
y: e.y - t.y
|
|
7692
|
-
}, n), { primary:
|
|
7693
|
-
if (
|
|
7694
|
-
const
|
|
7695
|
-
if (
|
|
7692
|
+
}, n), { primary: u } = a.query(Mt(h, n));
|
|
7693
|
+
if (u === null) return null;
|
|
7694
|
+
const d = o.find((g) => g.id === u.layerId);
|
|
7695
|
+
if (d === void 0) return null;
|
|
7696
7696
|
const p = Ha({
|
|
7697
7697
|
resolver: l,
|
|
7698
|
-
layer:
|
|
7699
|
-
observation:
|
|
7700
|
-
observationIndex: za(
|
|
7698
|
+
layer: d,
|
|
7699
|
+
observation: u.observation,
|
|
7700
|
+
observationIndex: za(u),
|
|
7701
7701
|
coordSystem: i,
|
|
7702
7702
|
align: c
|
|
7703
7703
|
});
|
|
@@ -7723,22 +7723,22 @@ var Gm = "ydgo3h1", Vm = "ydgo3h2", $m = "ydgo3h3", Wm = ({ clientPoint: e, pane
|
|
|
7723
7723
|
return ta(U(e, "difference-arrow-endpoint-drag"), n().arrow.id, t);
|
|
7724
7724
|
}
|
|
7725
7725
|
resolvePreview(e) {
|
|
7726
|
-
const { endpoint: t, readInputs: n, engine: a, anchorResolver: o } = this.params, { arrow: i, panelOrigin: l, panelRect: s, layers: c, coordSystem:
|
|
7726
|
+
const { endpoint: t, readInputs: n, engine: a, anchorResolver: o } = this.params, { arrow: i, panelOrigin: l, panelRect: s, layers: c, coordSystem: h } = n(), u = Wm({
|
|
7727
7727
|
clientPoint: e,
|
|
7728
7728
|
panelOrigin: l,
|
|
7729
7729
|
panelRect: s,
|
|
7730
7730
|
engine: a,
|
|
7731
7731
|
layers: c,
|
|
7732
|
-
coordSystem:
|
|
7732
|
+
coordSystem: h,
|
|
7733
7733
|
resolver: o,
|
|
7734
7734
|
fixedAnchor: i[hi(t)].anchor,
|
|
7735
7735
|
align: i[t].anchor.align
|
|
7736
7736
|
});
|
|
7737
|
-
return
|
|
7737
|
+
return u === null ? null : {
|
|
7738
7738
|
kind: "difference-arrow-endpoint-drag",
|
|
7739
7739
|
annotationId: i.id,
|
|
7740
7740
|
endpoint: t,
|
|
7741
|
-
point:
|
|
7741
|
+
point: u
|
|
7742
7742
|
};
|
|
7743
7743
|
}
|
|
7744
7744
|
commit({ point: e, endpoint: t }) {
|
|
@@ -7751,30 +7751,30 @@ var Gm = "ydgo3h1", Vm = "ydgo3h2", $m = "ydgo3h3", Wm = ({ clientPoint: e, pane
|
|
|
7751
7751
|
});
|
|
7752
7752
|
}
|
|
7753
7753
|
}, qm = ({ arrow: e, panelOrigin: t, panelRect: n }) => {
|
|
7754
|
-
const { commands: a, anchorResolver: o } = z(), { engine: i } =
|
|
7754
|
+
const { commands: a, anchorResolver: o } = z(), { engine: i } = Ye(), l = $(), s = ne({
|
|
7755
7755
|
arrow: e,
|
|
7756
7756
|
panelOrigin: t,
|
|
7757
7757
|
panelRect: n,
|
|
7758
|
-
...O(Se((
|
|
7759
|
-
layers:
|
|
7760
|
-
coordSystem:
|
|
7758
|
+
...O(Se((h) => ({
|
|
7759
|
+
layers: h.layers,
|
|
7760
|
+
coordSystem: h.coordSystem
|
|
7761
7761
|
})))
|
|
7762
7762
|
}), c = oe(null);
|
|
7763
|
-
return F(() => () => c.current?.finish(!1), []), ae((
|
|
7764
|
-
if (
|
|
7763
|
+
return F(() => () => c.current?.finish(!1), []), ae((h) => ({ onPointerDown: (u) => {
|
|
7764
|
+
if (u.button === 0 && c.current === null) {
|
|
7765
7765
|
try {
|
|
7766
|
-
|
|
7766
|
+
u.currentTarget.setPointerCapture(u.pointerId);
|
|
7767
7767
|
} catch {
|
|
7768
7768
|
return;
|
|
7769
7769
|
}
|
|
7770
|
-
|
|
7771
|
-
handle:
|
|
7772
|
-
pointerId:
|
|
7770
|
+
u.currentTarget.focus({ preventScroll: !0 }), u.preventDefault(), c.current = new Km({
|
|
7771
|
+
handle: u.currentTarget,
|
|
7772
|
+
pointerId: u.pointerId,
|
|
7773
7773
|
press: {
|
|
7774
|
-
x:
|
|
7775
|
-
y:
|
|
7774
|
+
x: u.clientX,
|
|
7775
|
+
y: u.clientY
|
|
7776
7776
|
},
|
|
7777
|
-
endpoint:
|
|
7777
|
+
endpoint: h,
|
|
7778
7778
|
readInputs: () => s.current,
|
|
7779
7779
|
editorStore: l,
|
|
7780
7780
|
engine: i,
|
|
@@ -7801,39 +7801,39 @@ var Gm = "ydgo3h1", Vm = "ydgo3h2", $m = "ydgo3h3", Wm = ({ clientPoint: e, pane
|
|
|
7801
7801
|
return F(() => () => {
|
|
7802
7802
|
const c = a.getState();
|
|
7803
7803
|
U(c, "difference-arrow-endpoint-drag")?.annotationId === s && c.releaseInteraction("difference-arrow-endpoint-drag");
|
|
7804
|
-
}, [a, s]), ae((c) => ({ onKeyDown: (
|
|
7805
|
-
if (
|
|
7806
|
-
const
|
|
7807
|
-
if (Xm.includes(
|
|
7808
|
-
if (
|
|
7809
|
-
if (
|
|
7804
|
+
}, [a, s]), ae((c) => ({ onKeyDown: (h) => {
|
|
7805
|
+
if (h.altKey || h.ctrlKey || h.metaKey || h.shiftKey) return;
|
|
7806
|
+
const u = a.getState(), d = ta(U(u, "difference-arrow-endpoint-drag"), e.id, c);
|
|
7807
|
+
if (Xm.includes(h.key)) {
|
|
7808
|
+
if (h.preventDefault(), h.repeat) return;
|
|
7809
|
+
if (d === null) return u.claimInteraction({
|
|
7810
7810
|
kind: "difference-arrow-endpoint-drag",
|
|
7811
7811
|
annotationId: e.id,
|
|
7812
7812
|
endpoint: c,
|
|
7813
7813
|
point: e[c]
|
|
7814
7814
|
});
|
|
7815
|
-
|
|
7815
|
+
u.releaseInteraction("difference-arrow-endpoint-drag"), pi({
|
|
7816
7816
|
dispatch: t.dispatch,
|
|
7817
7817
|
arrow: e,
|
|
7818
7818
|
endpoint: c,
|
|
7819
|
-
anchor:
|
|
7819
|
+
anchor: d.point.anchor
|
|
7820
7820
|
});
|
|
7821
7821
|
return;
|
|
7822
7822
|
}
|
|
7823
|
-
if (
|
|
7824
|
-
const p = Zm(
|
|
7823
|
+
if (d === null) return;
|
|
7824
|
+
const p = Zm(h.key, l);
|
|
7825
7825
|
if (p === null) return;
|
|
7826
|
-
|
|
7826
|
+
h.preventDefault();
|
|
7827
7827
|
const g = Ym({
|
|
7828
7828
|
arrow: e,
|
|
7829
7829
|
endpoint: c,
|
|
7830
|
-
from:
|
|
7830
|
+
from: d.point.anchor,
|
|
7831
7831
|
move: p,
|
|
7832
7832
|
layers: o,
|
|
7833
7833
|
coordSystem: i,
|
|
7834
7834
|
resolver: n
|
|
7835
7835
|
});
|
|
7836
|
-
g !== null &&
|
|
7836
|
+
g !== null && u.claimInteraction({
|
|
7837
7837
|
kind: "difference-arrow-endpoint-drag",
|
|
7838
7838
|
annotationId: e.id,
|
|
7839
7839
|
endpoint: c,
|
|
@@ -7855,24 +7855,24 @@ var Gm = "ydgo3h1", Vm = "ydgo3h2", $m = "ydgo3h3", Wm = ({ clientPoint: e, pane
|
|
|
7855
7855
|
step: e === "ArrowDown" || e === "ArrowRight" ? 1 : -1
|
|
7856
7856
|
};
|
|
7857
7857
|
}, Ym = ({ arrow: e, endpoint: t, from: n, move: a, layers: o, coordSystem: i, resolver: l }) => {
|
|
7858
|
-
const s = o.find((
|
|
7858
|
+
const s = o.find((u) => u.id === n.layerId);
|
|
7859
7859
|
if (s === void 0) return null;
|
|
7860
7860
|
const c = l.createLayerMeasurement(s);
|
|
7861
7861
|
if (c === null) return null;
|
|
7862
|
-
const { align:
|
|
7862
|
+
const { align: h } = e[t].anchor;
|
|
7863
7863
|
return Bc({
|
|
7864
7864
|
layer: s,
|
|
7865
7865
|
from: n,
|
|
7866
7866
|
partner: e[hi(t)].anchor,
|
|
7867
7867
|
axis: a.axis,
|
|
7868
7868
|
step: a.step,
|
|
7869
|
-
getObservationPoint: (
|
|
7869
|
+
getObservationPoint: (u, d) => Ha({
|
|
7870
7870
|
resolver: l,
|
|
7871
7871
|
layer: s,
|
|
7872
|
-
observation:
|
|
7873
|
-
observationIndex:
|
|
7872
|
+
observation: u,
|
|
7873
|
+
observationIndex: d,
|
|
7874
7874
|
coordSystem: i,
|
|
7875
|
-
align:
|
|
7875
|
+
align: h,
|
|
7876
7876
|
measurement: c
|
|
7877
7877
|
})
|
|
7878
7878
|
})?.point ?? null;
|
|
@@ -7895,7 +7895,7 @@ var Gm = "ydgo3h1", Vm = "ydgo3h2", $m = "ydgo3h3", Wm = ({ clientPoint: e, pane
|
|
|
7895
7895
|
isDragged: a.isDragged,
|
|
7896
7896
|
...t
|
|
7897
7897
|
});
|
|
7898
|
-
}, eg = ({ committedArrow: e, color: t, labelCornerRadius: n, committedLabelBox: a, labelBox: o, start: i, end: l, panelRect: s, panelOrigin: c, frameRect:
|
|
7898
|
+
}, eg = ({ committedArrow: e, color: t, labelCornerRadius: n, committedLabelBox: a, labelBox: o, start: i, end: l, panelRect: s, panelOrigin: c, frameRect: h, frameElement: u, isDragged: d }) => {
|
|
7899
7899
|
const p = qm({
|
|
7900
7900
|
arrow: e,
|
|
7901
7901
|
panelOrigin: c,
|
|
@@ -7905,14 +7905,14 @@ var Gm = "ydgo3h1", Vm = "ydgo3h2", $m = "ydgo3h3", Wm = ({ clientPoint: e, pane
|
|
|
7905
7905
|
"data-testid": "difference-arrow-selection",
|
|
7906
7906
|
style: be({ [Hm]: m }),
|
|
7907
7907
|
children: [
|
|
7908
|
-
!
|
|
7908
|
+
!d && /* @__PURE__ */ r(Bm, {
|
|
7909
7909
|
arrow: e,
|
|
7910
7910
|
color: t,
|
|
7911
7911
|
labelBox: a,
|
|
7912
7912
|
panelRect: s,
|
|
7913
|
-
frameWidth:
|
|
7914
|
-
frameHeight:
|
|
7915
|
-
frameElement:
|
|
7913
|
+
frameWidth: h.width,
|
|
7914
|
+
frameHeight: h.height,
|
|
7915
|
+
frameElement: u
|
|
7916
7916
|
}),
|
|
7917
7917
|
/* @__PURE__ */ r("div", {
|
|
7918
7918
|
"aria-hidden": "true",
|
|
@@ -7965,10 +7965,10 @@ var Gm = "ydgo3h1", Vm = "ydgo3h2", $m = "ydgo3h3", Wm = ({ clientPoint: e, pane
|
|
|
7965
7965
|
};
|
|
7966
7966
|
const i = e + t, l = Math.min(o, t);
|
|
7967
7967
|
if (n) {
|
|
7968
|
-
const
|
|
7968
|
+
const h = Math.min(0, e), u = Math.min(Math.max(1, e), i - l), d = Ge(e + a, h, u);
|
|
7969
7969
|
return {
|
|
7970
|
-
start:
|
|
7971
|
-
extent: i -
|
|
7970
|
+
start: d,
|
|
7971
|
+
extent: i - d
|
|
7972
7972
|
};
|
|
7973
7973
|
}
|
|
7974
7974
|
const s = Math.max(Math.min(0, i), e + l), c = Math.max(1, i);
|
|
@@ -8025,7 +8025,7 @@ var ag = {
|
|
|
8025
8025
|
hovered: "_1ee8fau5 _1ee8fau4",
|
|
8026
8026
|
selected: "_1ee8fau6 _1ee8fau4"
|
|
8027
8027
|
}, ig = ({ panelRect: e }) => {
|
|
8028
|
-
const t = Re(e), n = ma(), a = q(), o = tt(), i = Q((f) => U(f, "move-drag")), l = Q((f) => U(f, "shape-resize-drag")), s = Q((f) => U(f, "arrow-endpoint-drag")), c = Q((f) => U(f, "text-resize-drag")),
|
|
8028
|
+
const t = Re(e), n = ma(), a = q(), o = tt(), i = Q((f) => U(f, "move-drag")), l = Q((f) => U(f, "shape-resize-drag")), s = Q((f) => U(f, "arrow-endpoint-drag")), c = Q((f) => U(f, "text-resize-drag")), h = Q(cl), u = E(() => ({
|
|
8029
8029
|
panel: {
|
|
8030
8030
|
width: e.width,
|
|
8031
8031
|
height: e.height
|
|
@@ -8037,16 +8037,16 @@ var ag = {
|
|
|
8037
8037
|
e.height,
|
|
8038
8038
|
n,
|
|
8039
8039
|
a
|
|
8040
|
-
]),
|
|
8040
|
+
]), d = Fr(t, o, u), p = Fr(t, h === o ? null : h, u), g = (f) => {
|
|
8041
8041
|
if (l?.annotationId === f.id) {
|
|
8042
8042
|
const b = t.shapes.find((y) => y.id === f.id);
|
|
8043
|
-
return b === void 0 ? f.geometry : ia(Hn(l.region), a.annotation.shape(b.id).get("strokeWidth"),
|
|
8043
|
+
return b === void 0 ? f.geometry : ia(Hn(l.region), a.annotation.shape(b.id).get("strokeWidth"), u.panel);
|
|
8044
8044
|
}
|
|
8045
8045
|
if (s?.annotationId === f.id) {
|
|
8046
8046
|
const b = t.arrows.find((y) => y.id === f.id);
|
|
8047
|
-
return b === void 0 ? f.geometry : Vl(zn(b, s),
|
|
8047
|
+
return b === void 0 ? f.geometry : Vl(zn(b, s), u.panel) ?? f.geometry;
|
|
8048
8048
|
}
|
|
8049
|
-
return c?.annotationId === f.id ? yi(t, f.id, c,
|
|
8049
|
+
return c?.annotationId === f.id ? yi(t, f.id, c, u) ?? f.geometry : f.geometry;
|
|
8050
8050
|
}, m = (f) => {
|
|
8051
8051
|
if (i?.annotationId !== f) return e;
|
|
8052
8052
|
const b = di(i.translation, e);
|
|
@@ -8060,11 +8060,11 @@ var ag = {
|
|
|
8060
8060
|
geometry: g(p),
|
|
8061
8061
|
state: "hovered",
|
|
8062
8062
|
origin: m(p.id)
|
|
8063
|
-
}),
|
|
8064
|
-
annotationId:
|
|
8065
|
-
geometry: g(
|
|
8063
|
+
}), d !== null && /* @__PURE__ */ r(Br, {
|
|
8064
|
+
annotationId: d.id,
|
|
8065
|
+
geometry: g(d),
|
|
8066
8066
|
state: "selected",
|
|
8067
|
-
origin: m(
|
|
8067
|
+
origin: m(d.id)
|
|
8068
8068
|
})] });
|
|
8069
8069
|
}, Fr = (e, t, n) => {
|
|
8070
8070
|
if (t === null) return null;
|
|
@@ -8250,12 +8250,12 @@ var ag = {
|
|
|
8250
8250
|
key: "graph.annotations.shapeToolbar.border.thick"
|
|
8251
8251
|
}
|
|
8252
8252
|
], bg = (e) => [...pn].reverse().find((t) => t.width <= e) ?? pn[0], yg = ({ shape: e, shapeBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
|
|
8253
|
-
const l = P(), { commands: s } = z(), c = O((x) => x.spec.styles.overrides),
|
|
8253
|
+
const l = P(), { commands: s } = z(), c = O((x) => x.spec.styles.overrides), h = O((x) => Ne(x.spec)), u = _t(), d = q().annotation.shape(e.id).resolve(), p = bg(d.strokeWidth), g = E(() => ({
|
|
8254
8254
|
target: "annotation",
|
|
8255
8255
|
kind: "shape",
|
|
8256
8256
|
annotation: e.id
|
|
8257
8257
|
}), [e.id]), m = (x, C) => {
|
|
8258
|
-
const I = Te(c, { select: g },
|
|
8258
|
+
const I = Te(c, { select: g }, h)?.declarations ?? {};
|
|
8259
8259
|
s.dispatch(new Ee({
|
|
8260
8260
|
list: "overrides",
|
|
8261
8261
|
rule: {
|
|
@@ -8269,7 +8269,7 @@ var ag = {
|
|
|
8269
8269
|
}, f = () => {
|
|
8270
8270
|
s.dispatch(new Ve({ id: e.id })), i.focus({ preventScroll: !0 });
|
|
8271
8271
|
}, b = (x) => m({ fill: x }, { transient: !0 }), y = (x) => m({ fillAlpha: x }, { transient: !0 }), k = (x) => () => {
|
|
8272
|
-
m({ strokeWidth: x }),
|
|
8272
|
+
m({ strokeWidth: x }), u.close();
|
|
8273
8273
|
};
|
|
8274
8274
|
return /* @__PURE__ */ v(_.Root, {
|
|
8275
8275
|
anchorBox: t,
|
|
@@ -8280,15 +8280,15 @@ var ag = {
|
|
|
8280
8280
|
testId: "shape-toolbar",
|
|
8281
8281
|
children: [
|
|
8282
8282
|
/* @__PURE__ */ r(_.ColorPicker, {
|
|
8283
|
-
color: gt(
|
|
8283
|
+
color: gt(d.fill),
|
|
8284
8284
|
label: l("graph.annotations.shapeToolbar.color"),
|
|
8285
8285
|
onChange: b,
|
|
8286
|
-
opacity:
|
|
8286
|
+
opacity: d.fillAlpha,
|
|
8287
8287
|
onOpacityChange: y,
|
|
8288
|
-
...
|
|
8288
|
+
...u.bind("color"),
|
|
8289
8289
|
children: /* @__PURE__ */ r(_.Swatch, {
|
|
8290
|
-
color: gt(
|
|
8291
|
-
opacity:
|
|
8290
|
+
color: gt(d.fill),
|
|
8291
|
+
opacity: d.fillAlpha
|
|
8292
8292
|
})
|
|
8293
8293
|
}),
|
|
8294
8294
|
/* @__PURE__ */ r(_.Dropdown, {
|
|
@@ -8297,7 +8297,7 @@ var ag = {
|
|
|
8297
8297
|
size: "sm",
|
|
8298
8298
|
title: ""
|
|
8299
8299
|
}),
|
|
8300
|
-
...
|
|
8300
|
+
...u.bind("border"),
|
|
8301
8301
|
children: pn.map((x) => /* @__PURE__ */ r(_.MenuItem, {
|
|
8302
8302
|
isSelected: x.width === p?.width,
|
|
8303
8303
|
onClick: k(x.width),
|
|
@@ -8485,22 +8485,22 @@ var ag = {
|
|
|
8485
8485
|
const s = P(), c = Cg({
|
|
8486
8486
|
annotationId: e.id,
|
|
8487
8487
|
panelRect: o
|
|
8488
|
-
}),
|
|
8488
|
+
}), h = wg({
|
|
8489
8489
|
annotationId: e.id,
|
|
8490
8490
|
panelRect: o
|
|
8491
|
-
}),
|
|
8491
|
+
}), u = q().annotation.shape(e.id).resolve(), { rect: d } = ia(Hn(t), u.strokeWidth, o);
|
|
8492
8492
|
return /* @__PURE__ */ v("div", {
|
|
8493
8493
|
"data-testid": "shape-selection",
|
|
8494
8494
|
"data-annotation-id": e.id,
|
|
8495
8495
|
children: [n && /* @__PURE__ */ r(yg, {
|
|
8496
8496
|
shape: e,
|
|
8497
|
-
shapeBox:
|
|
8497
|
+
shapeBox: d,
|
|
8498
8498
|
panelRect: o,
|
|
8499
8499
|
frameWidth: i.width,
|
|
8500
8500
|
frameHeight: i.height,
|
|
8501
8501
|
frameElement: l
|
|
8502
8502
|
}), !a && tg.map((p) => {
|
|
8503
|
-
const g = ng(
|
|
8503
|
+
const g = ng(d, p);
|
|
8504
8504
|
return /* @__PURE__ */ r(Si, {
|
|
8505
8505
|
point: {
|
|
8506
8506
|
x: o.x + g.x,
|
|
@@ -8514,7 +8514,7 @@ var ag = {
|
|
|
8514
8514
|
"data-corner": p
|
|
8515
8515
|
},
|
|
8516
8516
|
dragHandlers: c(p),
|
|
8517
|
-
keyboardHandlers:
|
|
8517
|
+
keyboardHandlers: h(p)
|
|
8518
8518
|
}, p);
|
|
8519
8519
|
})]
|
|
8520
8520
|
});
|
|
@@ -8635,12 +8635,12 @@ var Ai = [
|
|
|
8635
8635
|
Icon: wo
|
|
8636
8636
|
}
|
|
8637
8637
|
], Ug = ({ annotation: e, textBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
|
|
8638
|
-
const l = P(), { commands: s } = z(), c = O((S) => S.spec.styles.overrides),
|
|
8638
|
+
const l = P(), { commands: s } = z(), c = O((S) => S.spec.styles.overrides), h = O((S) => Ne(S.spec)), u = $(), d = _t(), p = q().annotation.text(e.id).resolve(), g = Mg(e.content), m = Gg(g.font), f = Vg(g.fontSize), b = g.color ?? p.textColor, y = E(() => ({
|
|
8639
8639
|
target: "annotation",
|
|
8640
8640
|
kind: "text",
|
|
8641
8641
|
annotation: e.id
|
|
8642
8642
|
}), [e.id]), k = (S, N) => {
|
|
8643
|
-
const G = Te(c, { select: y },
|
|
8643
|
+
const G = Te(c, { select: y }, h)?.declarations ?? {};
|
|
8644
8644
|
s.dispatch(new Ee({
|
|
8645
8645
|
list: "overrides",
|
|
8646
8646
|
rule: {
|
|
@@ -8657,8 +8657,8 @@ var Ai = [
|
|
|
8657
8657
|
id: e.id,
|
|
8658
8658
|
patch: S
|
|
8659
8659
|
}), N);
|
|
8660
|
-
}, C = () =>
|
|
8661
|
-
const G = C(), te =
|
|
8660
|
+
}, C = () => u.getState().caret?.editor?.getJSON() ?? e.content, I = (S, N) => {
|
|
8661
|
+
const G = C(), te = u.getState().caret?.editor ?? null;
|
|
8662
8662
|
if (te !== null && !Rg(G)) {
|
|
8663
8663
|
te.chain().focus().setMark(Ct, S).run();
|
|
8664
8664
|
return;
|
|
@@ -8667,9 +8667,9 @@ var Ai = [
|
|
|
8667
8667
|
}, L = () => {
|
|
8668
8668
|
s.dispatch(new Ve({ id: e.id })), i.focus({ preventScroll: !0 });
|
|
8669
8669
|
}, A = (S) => k(Kg(S), { transient: !0 }), B = (S) => I({ color: S }, { transient: !0 }), ee = (S) => () => {
|
|
8670
|
-
I({ font: S }),
|
|
8670
|
+
I({ font: S }), d.close();
|
|
8671
8671
|
}, D = (S) => () => {
|
|
8672
|
-
I({ fontSize: S }),
|
|
8672
|
+
I({ fontSize: S }), d.close();
|
|
8673
8673
|
}, R = (S) => x({ content: Ng(C(), S) });
|
|
8674
8674
|
return /* @__PURE__ */ v(_.Root, {
|
|
8675
8675
|
anchorBox: t,
|
|
@@ -8684,14 +8684,14 @@ var Ai = [
|
|
|
8684
8684
|
label: l("graph.annotations.textToolbar.background"),
|
|
8685
8685
|
hasTransparentOption: !0,
|
|
8686
8686
|
onChange: A,
|
|
8687
|
-
...
|
|
8687
|
+
...d.bind("background"),
|
|
8688
8688
|
children: /* @__PURE__ */ r(_.Swatch, { color: p.fill === "transparent" ? Gu : gt(p.fill) })
|
|
8689
8689
|
}),
|
|
8690
8690
|
/* @__PURE__ */ r(_.ColorPicker, {
|
|
8691
8691
|
color: b,
|
|
8692
8692
|
label: l("graph.annotations.textToolbar.color"),
|
|
8693
8693
|
onChange: B,
|
|
8694
|
-
...
|
|
8694
|
+
...d.bind("color"),
|
|
8695
8695
|
children: /* @__PURE__ */ r(Eg, {
|
|
8696
8696
|
size: "sm",
|
|
8697
8697
|
textColor: b,
|
|
@@ -8704,7 +8704,7 @@ var Ai = [
|
|
|
8704
8704
|
style: { fontFamily: m?.fontFamily },
|
|
8705
8705
|
children: "Aa"
|
|
8706
8706
|
}),
|
|
8707
|
-
...
|
|
8707
|
+
...d.bind("font"),
|
|
8708
8708
|
children: Ti.map((S) => /* @__PURE__ */ r(_.MenuItem, {
|
|
8709
8709
|
isSelected: S.id === m?.id,
|
|
8710
8710
|
onClick: ee(S.id),
|
|
@@ -8717,7 +8717,7 @@ var Ai = [
|
|
|
8717
8717
|
/* @__PURE__ */ r(_.Dropdown, {
|
|
8718
8718
|
label: l("graph.annotations.textToolbar.fontSize.ariaLabel"),
|
|
8719
8719
|
trigger: f === null ? "" : l(f.key),
|
|
8720
|
-
...
|
|
8720
|
+
...d.bind("fontSize"),
|
|
8721
8721
|
children: Ai.map((S) => /* @__PURE__ */ r(_.MenuItem, {
|
|
8722
8722
|
isSelected: S.size === f?.size,
|
|
8723
8723
|
onClick: D(S.size),
|
|
@@ -8767,20 +8767,20 @@ var Li = ({ width: e }) => ue(60, e), jg = (e, t) => ({
|
|
|
8767
8767
|
width: t,
|
|
8768
8768
|
shift: 0
|
|
8769
8769
|
};
|
|
8770
|
-
const s = zs(n).x, c = Zg(e.offset, l),
|
|
8770
|
+
const s = zs(n).x, c = Zg(e.offset, l), h = hn({
|
|
8771
8771
|
start: e.x + c - s * t,
|
|
8772
8772
|
extent: t,
|
|
8773
8773
|
isStartMoving: a === "left",
|
|
8774
8774
|
delta: o,
|
|
8775
8775
|
minExtent: i
|
|
8776
|
-
}),
|
|
8776
|
+
}), u = h.start + s * h.extent - c;
|
|
8777
8777
|
return {
|
|
8778
8778
|
at: {
|
|
8779
8779
|
...e,
|
|
8780
|
-
x:
|
|
8780
|
+
x: u
|
|
8781
8781
|
},
|
|
8782
|
-
width:
|
|
8783
|
-
shift:
|
|
8782
|
+
width: h.extent,
|
|
8783
|
+
shift: u - e.x
|
|
8784
8784
|
};
|
|
8785
8785
|
}, Ii = (e, t) => e.at.x === t.at.x && e.width === t.width, Zg = (e, t) => e?.x === void 0 ? 0 : e.unit === "px" ? ue(e.x, t) : e.x, xt = (e, t) => {
|
|
8786
8786
|
const n = e.textAnnotations.find((a) => a.id === t);
|
|
@@ -8857,8 +8857,8 @@ var Li = ({ width: e }) => ue(60, e), jg = (e, t) => ({
|
|
|
8857
8857
|
readHeld: () => yn(U(a.getState(), "text-resize-drag"), e),
|
|
8858
8858
|
claim: (l) => i(l, 0),
|
|
8859
8859
|
step: (l, s, c) => {
|
|
8860
|
-
const
|
|
8861
|
-
return
|
|
8860
|
+
const h = t0(c, t);
|
|
8861
|
+
return h === null ? null : i(s, l.delta + h);
|
|
8862
8862
|
},
|
|
8863
8863
|
commit: (l) => {
|
|
8864
8864
|
const s = xt(o, e);
|
|
@@ -8894,10 +8894,10 @@ var Li = ({ width: e }) => ue(60, e), jg = (e, t) => ({
|
|
|
8894
8894
|
...e
|
|
8895
8895
|
});
|
|
8896
8896
|
}, r0 = ({ annotation: e, textBox: t, isSettled: n, isMoved: a, isResizable: o, hasCaret: i, panelRect: l, frameRect: s, frameElement: c }) => {
|
|
8897
|
-
const
|
|
8897
|
+
const h = P(), u = Jg({
|
|
8898
8898
|
annotationId: e.id,
|
|
8899
8899
|
panelRect: l
|
|
8900
|
-
}),
|
|
8900
|
+
}), d = e0({
|
|
8901
8901
|
annotationId: e.id,
|
|
8902
8902
|
panelRect: l
|
|
8903
8903
|
});
|
|
@@ -8918,15 +8918,15 @@ var Li = ({ width: e }) => ue(60, e), jg = (e, t) => ({
|
|
|
8918
8918
|
x: l.x + g.x,
|
|
8919
8919
|
y: l.y + g.y
|
|
8920
8920
|
},
|
|
8921
|
-
label:
|
|
8921
|
+
label: h(`graph.annotations.textToolbar.resize.${p}`),
|
|
8922
8922
|
pull: "horizontal",
|
|
8923
8923
|
size: "sm",
|
|
8924
8924
|
attributes: {
|
|
8925
8925
|
"data-testid": "text-resize-handle",
|
|
8926
8926
|
"data-edge": p
|
|
8927
8927
|
},
|
|
8928
|
-
dragHandlers:
|
|
8929
|
-
keyboardHandlers:
|
|
8928
|
+
dragHandlers: u(p),
|
|
8929
|
+
keyboardHandlers: d(p)
|
|
8930
8930
|
}, p);
|
|
8931
8931
|
})]
|
|
8932
8932
|
});
|
|
@@ -9017,7 +9017,7 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9017
9017
|
F(() => {
|
|
9018
9018
|
if (t === null) return;
|
|
9019
9019
|
const o = (i) => {
|
|
9020
|
-
if (i.key !== "Tab" || i.defaultPrevented || !
|
|
9020
|
+
if (i.key !== "Tab" || i.defaultPrevented || !Ze(i.target, e, n) || oo(i.target) || a.getState().standingInteraction?.kind === "chrome-popup") return;
|
|
9021
9021
|
const l = [...t.querySelectorAll(f0)];
|
|
9022
9022
|
if (l.length === 0) return;
|
|
9023
9023
|
i.preventDefault();
|
|
@@ -9036,14 +9036,14 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9036
9036
|
F(() => {
|
|
9037
9037
|
let o = null;
|
|
9038
9038
|
const i = (c) => {
|
|
9039
|
-
const { caret:
|
|
9040
|
-
|
|
9039
|
+
const { caret: h } = a.getState(), u = h === null ? null : Ei(c.clientX, c.clientY, e);
|
|
9040
|
+
u?.kind === "annotation" && u.target.id === h?.annotationId || e.focus({ preventScroll: !0 });
|
|
9041
9041
|
}, l = (c) => {
|
|
9042
|
-
const { selection:
|
|
9043
|
-
|
|
9042
|
+
const { selection: h, clearSelection: u } = t.getState();
|
|
9043
|
+
h.length !== 0 && (Ze(c.target, e, n) || u());
|
|
9044
9044
|
}, s = (c) => {
|
|
9045
|
-
t.getState().selection.length !== 0 &&
|
|
9046
|
-
o = null, document.hasFocus() && (
|
|
9045
|
+
t.getState().selection.length !== 0 && Ze(c.target, e, n) && c.relatedTarget === null && (o !== null && cancelAnimationFrame(o), o = requestAnimationFrame(() => {
|
|
9046
|
+
o = null, document.hasFocus() && (Ze(document.activeElement, e, n) || t.getState().clearSelection());
|
|
9047
9047
|
}));
|
|
9048
9048
|
};
|
|
9049
9049
|
return e.addEventListener("pointerdown", i), document.addEventListener("focusin", l), document.addEventListener("focusout", s), () => {
|
|
@@ -9121,12 +9121,12 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9121
9121
|
if (o === null) return null;
|
|
9122
9122
|
const l = fe(t, o.layerId);
|
|
9123
9123
|
if (l === void 0) return null;
|
|
9124
|
-
const s = za(o), c = i?.intersects !== !1,
|
|
9125
|
-
for (const
|
|
9126
|
-
const p =
|
|
9124
|
+
const s = za(o), c = i?.intersects !== !1, h = vc(l), u = c || !dc(n) ? [h] : ["x-value", h];
|
|
9125
|
+
for (const d of u) {
|
|
9126
|
+
const p = Je({
|
|
9127
9127
|
layer: l,
|
|
9128
9128
|
observationIndex: s,
|
|
9129
|
-
scope:
|
|
9129
|
+
scope: d,
|
|
9130
9130
|
parsingLocale: a
|
|
9131
9131
|
});
|
|
9132
9132
|
if (p !== null) return {
|
|
@@ -9140,32 +9140,32 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9140
9140
|
}, L0 = (e, t, n) => {
|
|
9141
9141
|
if (!e.isOnObservation || e.target.scope !== "series") return null;
|
|
9142
9142
|
const a = fe(t, e.layerId);
|
|
9143
|
-
return a === void 0 ? null :
|
|
9143
|
+
return a === void 0 ? null : Je({
|
|
9144
9144
|
layer: a,
|
|
9145
9145
|
observationIndex: e.observationIndex,
|
|
9146
9146
|
scope: "data-point",
|
|
9147
9147
|
parsingLocale: n
|
|
9148
9148
|
});
|
|
9149
9149
|
}, Mi = (e, t) => {
|
|
9150
|
-
const { target: n, clientX: a, clientY: o } = e, { frameElement: i, captureRect: l, menuTrigger: s, panelOrigin: c, resolvesObservations:
|
|
9150
|
+
const { target: n, clientX: a, clientY: o } = e, { frameElement: i, captureRect: l, menuTrigger: s, panelOrigin: c, resolvesObservations: h, scene: u } = t, d = s !== null && Tn({
|
|
9151
9151
|
x: a - c.x,
|
|
9152
9152
|
y: o - c.y
|
|
9153
9153
|
}, s);
|
|
9154
9154
|
if (!(n instanceof Element && i.contains(n))) return {
|
|
9155
9155
|
targetAtPoint: jn({
|
|
9156
|
-
isMenuTrigger:
|
|
9156
|
+
isMenuTrigger: d,
|
|
9157
9157
|
stamped: Vr(!1, !1, e, t),
|
|
9158
9158
|
observations: null
|
|
9159
9159
|
}),
|
|
9160
9160
|
hover: null
|
|
9161
9161
|
};
|
|
9162
|
-
const p = l !== null && n === l, g = p &&
|
|
9162
|
+
const p = l !== null && n === l, g = p && h ? P0(l) : null, m = g === null ? null : E0(e, g, t), f = m === null ? null : A0({
|
|
9163
9163
|
hover: m,
|
|
9164
|
-
layers:
|
|
9165
|
-
scales:
|
|
9166
|
-
parsingLocale:
|
|
9164
|
+
layers: u.layers,
|
|
9165
|
+
scales: u.scales,
|
|
9166
|
+
parsingLocale: u.config.parsingLocale
|
|
9167
9167
|
}), b = f !== null && t.hasOverlayMenu(f.target) ? f : null, y = jn({
|
|
9168
|
-
isMenuTrigger:
|
|
9168
|
+
isMenuTrigger: d,
|
|
9169
9169
|
stamped: Vr(p, b !== null, e, t),
|
|
9170
9170
|
observations: b
|
|
9171
9171
|
});
|
|
@@ -9246,8 +9246,8 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9246
9246
|
target: e,
|
|
9247
9247
|
observationIndex: n ? t : null
|
|
9248
9248
|
}, N0 = (e, t, n, a, o) => {
|
|
9249
|
-
const { commands: i, selectionStore: l, store: s } = z(), c = $(),
|
|
9250
|
-
annotations:
|
|
9249
|
+
const { commands: i, selectionStore: l, store: s } = z(), c = $(), h = O((b) => b.spec.annotations), u = Oe[Le()], d = ne(u.graphPress), p = ne({
|
|
9250
|
+
annotations: h,
|
|
9251
9251
|
panelRect: n
|
|
9252
9252
|
}), g = ne(t), m = ne(o), f = oe(null);
|
|
9253
9253
|
F(() => () => f.current?.finish(!1), []), F(() => l.subscribe(({ selection: b }) => {
|
|
@@ -9307,7 +9307,7 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9307
9307
|
}, C = (L) => {
|
|
9308
9308
|
if (L.button !== 0 || tn(L.target) || io(L, g.current, c.getState().menuTrigger) || y(L)) return;
|
|
9309
9309
|
const A = O0(b(L), {
|
|
9310
|
-
canSelectGraph:
|
|
9310
|
+
canSelectGraph: d.current && a().hasOverlayMenu({ kind: "graph" }),
|
|
9311
9311
|
isWithinFrame: L.target instanceof Node && e.contains(L.target),
|
|
9312
9312
|
caretAnnotationId: c.getState().caret?.annotationId ?? null
|
|
9313
9313
|
});
|
|
@@ -9363,39 +9363,39 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9363
9363
|
p,
|
|
9364
9364
|
g,
|
|
9365
9365
|
m,
|
|
9366
|
-
|
|
9366
|
+
d,
|
|
9367
9367
|
a
|
|
9368
9368
|
]);
|
|
9369
9369
|
}, D0 = (e) => {
|
|
9370
|
-
const { selectionStore: t, commands: n, chartId: a } = z(), o = $(), i = ne(O((
|
|
9371
|
-
const { selection:
|
|
9372
|
-
p !== null && (
|
|
9370
|
+
const { selectionStore: t, commands: n, chartId: a } = z(), o = $(), i = ne(O((u) => u.spec.annotations.textAnnotations)), { annotations: l } = Oe[Le()], s = ae((u) => {
|
|
9371
|
+
const { selection: d } = t.getState(), p = l ? un(d) : null;
|
|
9372
|
+
p !== null && (u.preventDefault(), n.dispatch(new Ve({ id: p })), e.focus({ preventScroll: !0 }));
|
|
9373
9373
|
}, [
|
|
9374
9374
|
e,
|
|
9375
9375
|
n,
|
|
9376
9376
|
t,
|
|
9377
9377
|
l
|
|
9378
|
-
]), c = ae((
|
|
9379
|
-
if (ht(
|
|
9380
|
-
const
|
|
9381
|
-
|
|
9378
|
+
]), c = ae((u) => {
|
|
9379
|
+
if (ht(u.target, a)) return;
|
|
9380
|
+
const d = l ? un(t.getState().selection) : null;
|
|
9381
|
+
d !== null && i.current.some((p) => p.id === d) && (u.preventDefault(), o.getState().setCaret(d));
|
|
9382
9382
|
}, [
|
|
9383
9383
|
o,
|
|
9384
9384
|
t,
|
|
9385
9385
|
i,
|
|
9386
9386
|
a,
|
|
9387
9387
|
l
|
|
9388
|
-
]),
|
|
9389
|
-
const
|
|
9388
|
+
]), h = ae((u) => {
|
|
9389
|
+
const d = o.getState(), p = d.standingInteraction?.kind;
|
|
9390
9390
|
if (p !== void 0) {
|
|
9391
|
-
p !== "chrome-popup" &&
|
|
9391
|
+
p !== "chrome-popup" && d.releaseInteraction(p);
|
|
9392
9392
|
return;
|
|
9393
9393
|
}
|
|
9394
|
-
if (
|
|
9395
|
-
|
|
9394
|
+
if (d.caret !== null) {
|
|
9395
|
+
d.setCaret(null), e.focus({ preventScroll: !0 });
|
|
9396
9396
|
return;
|
|
9397
9397
|
}
|
|
9398
|
-
return ht(
|
|
9398
|
+
return ht(u.target, a) ? e.focus({ preventScroll: !0 }) : t.getState().clearSelection();
|
|
9399
9399
|
}, [
|
|
9400
9400
|
o,
|
|
9401
9401
|
t,
|
|
@@ -9403,43 +9403,43 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9403
9403
|
a
|
|
9404
9404
|
]);
|
|
9405
9405
|
F(() => {
|
|
9406
|
-
const
|
|
9407
|
-
if (!
|
|
9408
|
-
const p = _0(
|
|
9406
|
+
const u = (d) => {
|
|
9407
|
+
if (!Ze(d.target, e, a) || oo(d.target)) return;
|
|
9408
|
+
const p = _0(d.target), g = o.getState().caret !== null && !ht(d.target, a);
|
|
9409
9409
|
if (!(p && !g))
|
|
9410
|
-
switch (
|
|
9410
|
+
switch (d.key) {
|
|
9411
9411
|
case "Escape":
|
|
9412
|
-
return
|
|
9412
|
+
return h(d);
|
|
9413
9413
|
case "Enter":
|
|
9414
|
-
return p ? void 0 : c(
|
|
9414
|
+
return p ? void 0 : c(d);
|
|
9415
9415
|
case "Delete":
|
|
9416
9416
|
case "Backspace":
|
|
9417
|
-
return p ? void 0 : s(
|
|
9417
|
+
return p ? void 0 : s(d);
|
|
9418
9418
|
default:
|
|
9419
9419
|
return;
|
|
9420
9420
|
}
|
|
9421
9421
|
};
|
|
9422
|
-
return document.addEventListener("keydown",
|
|
9422
|
+
return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
|
|
9423
9423
|
}, [
|
|
9424
9424
|
e,
|
|
9425
9425
|
s,
|
|
9426
9426
|
c,
|
|
9427
|
-
|
|
9427
|
+
h,
|
|
9428
9428
|
a,
|
|
9429
9429
|
o
|
|
9430
9430
|
]);
|
|
9431
9431
|
}, _0 = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), F0 = (e, t) => {
|
|
9432
|
-
const n = $(), { store: a } = z(), { engine: o, overlayRef: i } =
|
|
9432
|
+
const n = $(), { store: a } = z(), { engine: o, overlayRef: i } = Ye(), l = ne(t), { annotations: s, observationsPress: c, guidePress: h, tolerance: u } = Oe[Le()], d = Rl(), p = Nt(), g = c && !d;
|
|
9433
9433
|
return ae(() => ({
|
|
9434
9434
|
frameElement: e,
|
|
9435
9435
|
captureRect: i.current,
|
|
9436
9436
|
panelOrigin: l.current,
|
|
9437
9437
|
menuTrigger: n.getState().menuTrigger,
|
|
9438
|
-
resolvesGuides:
|
|
9438
|
+
resolvesGuides: h,
|
|
9439
9439
|
paintsAnnotations: s,
|
|
9440
9440
|
resolvesObservations: g,
|
|
9441
9441
|
engine: o,
|
|
9442
|
-
tolerance:
|
|
9442
|
+
tolerance: u ?? void 0,
|
|
9443
9443
|
scene: a.getState().scene,
|
|
9444
9444
|
hasOverlayMenu: p
|
|
9445
9445
|
}), [
|
|
@@ -9448,11 +9448,11 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9448
9448
|
i,
|
|
9449
9449
|
l,
|
|
9450
9450
|
n,
|
|
9451
|
-
|
|
9451
|
+
h,
|
|
9452
9452
|
s,
|
|
9453
9453
|
g,
|
|
9454
9454
|
o,
|
|
9455
|
-
|
|
9455
|
+
u,
|
|
9456
9456
|
a
|
|
9457
9457
|
]);
|
|
9458
9458
|
}, B0 = () => {
|
|
@@ -9462,7 +9462,7 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9462
9462
|
}))), { anchorResolver: o } = z(), i = ca();
|
|
9463
9463
|
return E(() => {
|
|
9464
9464
|
if (t === null) return null;
|
|
9465
|
-
const l = n.find((
|
|
9465
|
+
const l = n.find((h) => h.id === t.layerId);
|
|
9466
9466
|
if (l === void 0) return null;
|
|
9467
9467
|
const s = o.resolve(l.geom, t.observation, {
|
|
9468
9468
|
coordSystem: a,
|
|
@@ -9497,11 +9497,11 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9497
9497
|
t
|
|
9498
9498
|
]);
|
|
9499
9499
|
}, H0 = (e, t) => e.x >= 0 && e.x <= t.width && e.y >= 0 && e.y <= t.height, G0 = (e, t, n) => {
|
|
9500
|
-
const a = $(), { selectionStore: o } = z(), { store: i, engine: l } =
|
|
9500
|
+
const a = $(), { selectionStore: o } = z(), { store: i, engine: l } = Ye(), s = ne(e), c = ne(t), h = ne(n);
|
|
9501
9501
|
F(() => {
|
|
9502
|
-
const
|
|
9503
|
-
if (
|
|
9504
|
-
const b =
|
|
9502
|
+
const u = (f) => io(f, c.current, a.getState().menuTrigger), d = (f) => {
|
|
9503
|
+
if (u(f) || o.getState().selection.length > 0) return;
|
|
9504
|
+
const b = h.current, y = c.current, k = {
|
|
9505
9505
|
x: f.clientX - y.x,
|
|
9506
9506
|
y: f.clientY - y.y
|
|
9507
9507
|
}, x = H0(k, b) ? l.query(Mt(k, b)) : wn;
|
|
@@ -9513,8 +9513,8 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9513
9513
|
}, m = (f) => {
|
|
9514
9514
|
if (tn(f.target)) return;
|
|
9515
9515
|
const { claimInteraction: b, releaseInteraction: y } = a.getState();
|
|
9516
|
-
if (!
|
|
9517
|
-
y("menu"), p &&
|
|
9516
|
+
if (!u(f) || p) {
|
|
9517
|
+
y("menu"), p && d(f);
|
|
9518
9518
|
return;
|
|
9519
9519
|
}
|
|
9520
9520
|
const k = s.current;
|
|
@@ -9533,47 +9533,47 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9533
9533
|
i,
|
|
9534
9534
|
l,
|
|
9535
9535
|
c,
|
|
9536
|
-
|
|
9536
|
+
h
|
|
9537
9537
|
]);
|
|
9538
9538
|
}, V0 = (e, t, n) => {
|
|
9539
|
-
const a = $(), { store: o } = z(), { store: i } =
|
|
9539
|
+
const a = $(), { store: o } = z(), { store: i } = Ye(), l = ne(t), s = Oe[Le()].observationsPress;
|
|
9540
9540
|
F(() => (i.getState().setQueryOwnedByEditor(s), () => i.getState().setQueryOwnedByEditor(!1)), [i, s]), F(() => {
|
|
9541
|
-
let c = null,
|
|
9542
|
-
const
|
|
9541
|
+
let c = null, h = null, u = !1;
|
|
9542
|
+
const d = (C) => {
|
|
9543
9543
|
if (!s) return;
|
|
9544
9544
|
const I = i.getState();
|
|
9545
9545
|
I.isPointerSuspended || C === null && I.hover.primary === null || I.setHoverState(C ?? wn);
|
|
9546
9546
|
}, p = () => {
|
|
9547
|
-
if (c = null,
|
|
9547
|
+
if (c = null, h === null) return;
|
|
9548
9548
|
const C = a.getState();
|
|
9549
9549
|
if (ut(C.standingInteraction)) {
|
|
9550
9550
|
const A = C.menuTrigger !== null && Tn({
|
|
9551
|
-
x:
|
|
9552
|
-
y:
|
|
9551
|
+
x: h.clientX - l.current.x,
|
|
9552
|
+
y: h.clientY - l.current.y
|
|
9553
9553
|
}, C.menuTrigger), B = C.editTargetUnderPointer;
|
|
9554
9554
|
A ? C.setEditTargetUnderPointer({ kind: "menu-trigger" }) : B?.kind === "menu-trigger" && C.setEditTargetUnderPointer(null);
|
|
9555
9555
|
return;
|
|
9556
9556
|
}
|
|
9557
|
-
|
|
9558
|
-
...
|
|
9559
|
-
target: $0(
|
|
9557
|
+
u && (u = !1, h = {
|
|
9558
|
+
...h,
|
|
9559
|
+
target: $0(h)
|
|
9560
9560
|
});
|
|
9561
|
-
const { targetAtPoint: I, hover: L } = Mi(
|
|
9562
|
-
C.setEditTargetUnderPointer(I),
|
|
9561
|
+
const { targetAtPoint: I, hover: L } = Mi(h, n());
|
|
9562
|
+
C.setEditTargetUnderPointer(I), d(L);
|
|
9563
9563
|
}, g = () => {
|
|
9564
9564
|
c === null && (c = requestAnimationFrame(p));
|
|
9565
9565
|
}, m = () => {
|
|
9566
|
-
|
|
9566
|
+
h !== null && (u = !0, g());
|
|
9567
9567
|
}, f = () => {
|
|
9568
|
-
a.getState().setEditTargetUnderPointer(null),
|
|
9568
|
+
a.getState().setEditTargetUnderPointer(null), d(null);
|
|
9569
9569
|
}, b = (C) => {
|
|
9570
|
-
|
|
9570
|
+
h = {
|
|
9571
9571
|
target: C.target,
|
|
9572
9572
|
clientX: C.clientX,
|
|
9573
9573
|
clientY: C.clientY
|
|
9574
|
-
},
|
|
9574
|
+
}, u = !1, g();
|
|
9575
9575
|
}, y = () => {
|
|
9576
|
-
|
|
9576
|
+
h = null, c !== null && (cancelAnimationFrame(c), c = null), f();
|
|
9577
9577
|
}, k = a.subscribe((C, I) => {
|
|
9578
9578
|
ut(I.standingInteraction) && !ut(C.standingInteraction) && m();
|
|
9579
9579
|
}), x = o.subscribe((C, I) => {
|
|
@@ -9605,9 +9605,9 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9605
9605
|
return !1;
|
|
9606
9606
|
}
|
|
9607
9607
|
}, $r = "editor", Wr = [], W0 = (e, t, n, a, o) => {
|
|
9608
|
-
const i = Oi(), { store: l } =
|
|
9609
|
-
V0(e, t, p), N0(e, t, n, p, o), G0(i, t, n), S0(e), D0(e), b0(e, a), F(() => (l.getState().publishPointerRegions($r,
|
|
9610
|
-
const g =
|
|
9608
|
+
const i = Oi(), { store: l } = Ye(), s = kt().length > 0, c = Oe[Le()].holdsHoverWhileSelected, h = Q((m) => m.menuTrigger), u = i.kind === "menu", d = E(() => h === null ? Wr : [Gs(h)], [h]), p = F0(e, t);
|
|
9609
|
+
V0(e, t, p), N0(e, t, n, p, o), G0(i, t, n), S0(e), D0(e), b0(e, a), F(() => (l.getState().publishPointerRegions($r, d), () => l.getState().publishPointerRegions($r, Wr)), [l, d]);
|
|
9610
|
+
const g = u || s && c;
|
|
9611
9611
|
F(() => (l.getState().setPointerSuspended(g), () => l.getState().setPointerSuspended(!1)), [l, g]), F(() => {
|
|
9612
9612
|
if (!s || !c) return;
|
|
9613
9613
|
const m = l.getState();
|
|
@@ -9618,17 +9618,17 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9618
9618
|
c
|
|
9619
9619
|
]);
|
|
9620
9620
|
}, U0 = ({ frameElement: e, panelRect: t, formattedAxes: n, shouldAnimateTransitions: a }) => {
|
|
9621
|
-
const { measureRef: o, screenRect: i } = Hl(), { selectionStore: l } = z(), s = $(), c = Q((
|
|
9621
|
+
const { measureRef: o, screenRect: i } = Hl(), { selectionStore: l } = z(), s = $(), c = Q((d) => d.caret?.annotationId ?? null), h = Le(), u = oe(h);
|
|
9622
9622
|
return F(() => (o(e), () => o(null)), [o, e]), F(() => () => {
|
|
9623
|
-
const
|
|
9624
|
-
|
|
9623
|
+
const d = s.getState();
|
|
9624
|
+
d.releaseInteraction("menu"), d.setCaret(null), d.setPressedObservation(null);
|
|
9625
9625
|
}, [s]), F(() => {
|
|
9626
|
-
if (
|
|
9627
|
-
|
|
9628
|
-
const
|
|
9629
|
-
|
|
9626
|
+
if (u.current === h) return;
|
|
9627
|
+
u.current = h;
|
|
9628
|
+
const d = s.getState();
|
|
9629
|
+
d.releaseInteraction("menu"), d.setCaret(null), d.setEditTargetUnderPointer(null), l.getState().clearSelection();
|
|
9630
9630
|
}, [
|
|
9631
|
-
|
|
9631
|
+
h,
|
|
9632
9632
|
s,
|
|
9633
9633
|
l
|
|
9634
9634
|
]), i === null ? null : /* @__PURE__ */ v($d, { children: [c !== null && /* @__PURE__ */ r(K0, {
|
|
@@ -9669,13 +9669,13 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9669
9669
|
shouldAnimateTransitions: o
|
|
9670
9670
|
});
|
|
9671
9671
|
}, X0 = ({ frameElement: e, frameRect: t, panelOrigin: n, panelRect: a, boxRef: o, shouldAnimateTransitions: i }) => {
|
|
9672
|
-
const l =
|
|
9672
|
+
const l = $e(), s = Oi(), { annotations: c, editOutline: h, overlayMenu: u } = Oe[Le()], d = E(() => ({
|
|
9673
9673
|
width: t.width,
|
|
9674
9674
|
height: t.height
|
|
9675
9675
|
}), [t.width, t.height]);
|
|
9676
|
-
return /* @__PURE__ */ v(j, { children: [
|
|
9676
|
+
return /* @__PURE__ */ v(j, { children: [h && /* @__PURE__ */ v(j, { children: [/* @__PURE__ */ r(v1, {
|
|
9677
9677
|
frameElement: e,
|
|
9678
|
-
frameSize:
|
|
9678
|
+
frameSize: d,
|
|
9679
9679
|
panelRect: a,
|
|
9680
9680
|
shouldAnimateTransitions: i
|
|
9681
9681
|
}), /* @__PURE__ */ r(o2, { frameRect: t })] }), /* @__PURE__ */ r(al, {
|
|
@@ -9721,7 +9721,7 @@ var u0 = "_1tyillx2", h0 = {
|
|
|
9721
9721
|
frameElement: e,
|
|
9722
9722
|
panelRect: a
|
|
9723
9723
|
}),
|
|
9724
|
-
|
|
9724
|
+
u && /* @__PURE__ */ r(r2, { frameElement: e })
|
|
9725
9725
|
] })
|
|
9726
9726
|
})] });
|
|
9727
9727
|
}, j0 = {}, Hf = ({ slots: e, mode: t, palettePresets: n = j0, ...a }) => /* @__PURE__ */ r(Ad, {
|
|
@@ -9760,22 +9760,22 @@ function rv(e) {
|
|
|
9760
9760
|
return t.includes("_1ii3bsb0") || t.includes("_1ii3bsb1");
|
|
9761
9761
|
}
|
|
9762
9762
|
var av = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = void 0, className: o }) => {
|
|
9763
|
-
const i = ua(e), { themeClass: l, inlineVarsStyle: s } = At(), [c,
|
|
9764
|
-
expandSection: (
|
|
9765
|
-
collapseAllSections: () =>
|
|
9763
|
+
const i = ua(e), { themeClass: l, inlineVarsStyle: s } = At(), [c, h] = X(() => a ? [a] : []), u = E(() => ({
|
|
9764
|
+
expandSection: (d) => h([d]),
|
|
9765
|
+
collapseAllSections: () => h([])
|
|
9766
9766
|
}), []);
|
|
9767
9767
|
return /* @__PURE__ */ r(Mn.Provider, {
|
|
9768
9768
|
value: i,
|
|
9769
9769
|
children: /* @__PURE__ */ r(Hu, {
|
|
9770
9770
|
controls: n,
|
|
9771
9771
|
children: /* @__PURE__ */ r(J0, {
|
|
9772
|
-
value:
|
|
9773
|
-
children: /* @__PURE__ */ r(
|
|
9772
|
+
value: u,
|
|
9773
|
+
children: /* @__PURE__ */ r(Ke.Root, {
|
|
9774
9774
|
[tv]: "",
|
|
9775
9775
|
className: ye(ev, o, { [l]: !rv(o) }),
|
|
9776
9776
|
style: s,
|
|
9777
9777
|
value: c,
|
|
9778
|
-
onValueChange: (
|
|
9778
|
+
onValueChange: (d) => h(d),
|
|
9779
9779
|
children: t
|
|
9780
9780
|
})
|
|
9781
9781
|
})
|
|
@@ -9854,15 +9854,15 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9854
9854
|
});
|
|
9855
9855
|
}, hv = ({ title: e, preview: t, accessory: n, onOpenChange: a, children: o }) => {
|
|
9856
9856
|
const i = P();
|
|
9857
|
-
return /* @__PURE__ */ v(
|
|
9857
|
+
return /* @__PURE__ */ v(Ke.Item, {
|
|
9858
9858
|
value: e,
|
|
9859
9859
|
className: $n,
|
|
9860
9860
|
onOpenChange: a,
|
|
9861
|
-
children: [/* @__PURE__ */ v(
|
|
9861
|
+
children: [/* @__PURE__ */ v(Ke.Header, {
|
|
9862
9862
|
className: Wn,
|
|
9863
9863
|
render: /* @__PURE__ */ r("div", {}),
|
|
9864
9864
|
children: [
|
|
9865
|
-
/* @__PURE__ */ r(
|
|
9865
|
+
/* @__PURE__ */ r(Ke.Trigger, {
|
|
9866
9866
|
className: lv,
|
|
9867
9867
|
"aria-label": i("editor.accessibility.toggleSection", { title: e })
|
|
9868
9868
|
}),
|
|
@@ -9883,7 +9883,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9883
9883
|
children: /* @__PURE__ */ r(iv, { size: "sm" })
|
|
9884
9884
|
})
|
|
9885
9885
|
]
|
|
9886
|
-
}), /* @__PURE__ */ r(
|
|
9886
|
+
}), /* @__PURE__ */ r(Ke.Panel, { children: /* @__PURE__ */ r("div", { children: o }) })]
|
|
9887
9887
|
});
|
|
9888
9888
|
}, pv = ({ title: e, isChecked: t, onToggle: n, isDisabled: a, preview: o, children: i }) => {
|
|
9889
9889
|
const { expandSection: l, collapseAllSections: s } = Q0(), { Switch: c } = H();
|
|
@@ -9891,13 +9891,13 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9891
9891
|
title: e,
|
|
9892
9892
|
layout: "collapsible",
|
|
9893
9893
|
preview: o,
|
|
9894
|
-
onOpenChange: (
|
|
9895
|
-
|
|
9894
|
+
onOpenChange: (d) => {
|
|
9895
|
+
d && !t && a !== !0 && n(!0);
|
|
9896
9896
|
},
|
|
9897
9897
|
accessory: /* @__PURE__ */ r(c, {
|
|
9898
9898
|
isChecked: t,
|
|
9899
|
-
onChange: (
|
|
9900
|
-
n(
|
|
9899
|
+
onChange: (d) => {
|
|
9900
|
+
n(d), d ? l(e) : s();
|
|
9901
9901
|
},
|
|
9902
9902
|
isDisabled: a,
|
|
9903
9903
|
ariaLabel: e
|
|
@@ -9916,10 +9916,10 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9916
9916
|
x: "editor.axesPanel.mainAxisSection.xAxis",
|
|
9917
9917
|
y: "editor.axesPanel.mainAxisSection.yAxis"
|
|
9918
9918
|
}, Ur = ({ axis: e, title: t, layout: n = "collapsible", preview: a }) => {
|
|
9919
|
-
const o = W(), i = K(o), l = P(), { NumberField: s, Switch: c, TextField:
|
|
9919
|
+
const o = W(), i = K(o), l = P(), { NumberField: s, Switch: c, TextField: h, ToggleGroup: u } = H();
|
|
9920
9920
|
if (!i) return null;
|
|
9921
|
-
const
|
|
9922
|
-
if (
|
|
9921
|
+
const d = i.coordSystem.type === "polar" ? i.coordSystem.axisMapping[e].geometry : "linear", p = i.config.axes[e], g = i.scales[e], m = g?.spec, f = m?.scaleType === "continuous" ? m : void 0;
|
|
9922
|
+
if (d === "circular" || d === "radial" && f === void 0) return null;
|
|
9923
9923
|
const b = m !== void 0 && "reverse" in m ? m : void 0, y = m?.scaleType === "continuous" || m?.scaleType === "datetime", k = f !== void 0 && _a(i, e), x = f?.transform === "log", C = f?.domainMax ?? null, I = fv(f), L = (M, ge) => M.map((rt) => ({
|
|
9924
9924
|
value: rt,
|
|
9925
9925
|
label: ge(rt)
|
|
@@ -9961,7 +9961,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9961
9961
|
transform: M === "log" ? "log" : "linear"
|
|
9962
9962
|
}));
|
|
9963
9963
|
}, qn = (M) => {
|
|
9964
|
-
o.commands.dispatch(new
|
|
9964
|
+
o.commands.dispatch(new je({
|
|
9965
9965
|
scaledAesthetic: e,
|
|
9966
9966
|
...M
|
|
9967
9967
|
}), { transient: !0 });
|
|
@@ -9971,13 +9971,13 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9971
9971
|
M !== null && qn({ domainMax: M });
|
|
9972
9972
|
}, Zi = (M) => {
|
|
9973
9973
|
const ge = M === "auto" ? null : M === "zero" ? 0 : Kr(g?.domain, "start");
|
|
9974
|
-
o.commands.dispatch(new
|
|
9974
|
+
o.commands.dispatch(new je({
|
|
9975
9975
|
scaledAesthetic: e,
|
|
9976
9976
|
domainMin: ge
|
|
9977
9977
|
}));
|
|
9978
9978
|
}, Yi = (M) => {
|
|
9979
9979
|
const ge = M === "custom" ? Kr(g?.domain, "end") : null;
|
|
9980
|
-
o.commands.dispatch(new
|
|
9980
|
+
o.commands.dispatch(new je({
|
|
9981
9981
|
scaledAesthetic: e,
|
|
9982
9982
|
domainMax: ge
|
|
9983
9983
|
}));
|
|
@@ -10007,15 +10007,15 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10007
10007
|
}),
|
|
10008
10008
|
D !== void 0 && /* @__PURE__ */ r(w, {
|
|
10009
10009
|
label: l("editor.axesPanel.controls.numberOfAxes"),
|
|
10010
|
-
children: /* @__PURE__ */ r(
|
|
10010
|
+
children: /* @__PURE__ */ r(u, {
|
|
10011
10011
|
value: D.yScaleType === "secondary" ? "double" : "single",
|
|
10012
10012
|
options: Gi,
|
|
10013
10013
|
onChange: Ji
|
|
10014
10014
|
})
|
|
10015
10015
|
}),
|
|
10016
|
-
|
|
10016
|
+
d === "linear" && /* @__PURE__ */ v(j, { children: [/* @__PURE__ */ r(w, {
|
|
10017
10017
|
label: l("editor.axesPanel.controls.title"),
|
|
10018
|
-
children: /* @__PURE__ */ r(
|
|
10018
|
+
children: /* @__PURE__ */ r(h, {
|
|
10019
10019
|
value: p.label ?? "",
|
|
10020
10020
|
onChange: $i,
|
|
10021
10021
|
onCommit: o.commands.commit
|
|
@@ -10029,15 +10029,15 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10029
10029
|
})] }),
|
|
10030
10030
|
y && /* @__PURE__ */ r(w, {
|
|
10031
10031
|
label: l("editor.axesPanel.controls.labels"),
|
|
10032
|
-
children: /* @__PURE__ */ r(
|
|
10032
|
+
children: /* @__PURE__ */ r(u, {
|
|
10033
10033
|
value: p.ticks.mode,
|
|
10034
10034
|
options: N,
|
|
10035
10035
|
onChange: Ui
|
|
10036
10036
|
})
|
|
10037
10037
|
}),
|
|
10038
|
-
f &&
|
|
10038
|
+
f && d === "linear" && !R && /* @__PURE__ */ r(w, {
|
|
10039
10039
|
label: l("editor.axesPanel.controls.position"),
|
|
10040
|
-
children: /* @__PURE__ */ r(
|
|
10040
|
+
children: /* @__PURE__ */ r(u, {
|
|
10041
10041
|
value: A ?? p.position,
|
|
10042
10042
|
options: S,
|
|
10043
10043
|
onChange: Qi
|
|
@@ -10045,7 +10045,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10045
10045
|
}),
|
|
10046
10046
|
b !== void 0 && /* @__PURE__ */ r(w, {
|
|
10047
10047
|
label: l("editor.axesPanel.controls.reverse"),
|
|
10048
|
-
children: /* @__PURE__ */ r(
|
|
10048
|
+
children: /* @__PURE__ */ r(u, {
|
|
10049
10049
|
value: b.reverse === !0 ? "yes" : "no",
|
|
10050
10050
|
options: Fe,
|
|
10051
10051
|
onChange: Ki
|
|
@@ -10053,7 +10053,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10053
10053
|
}),
|
|
10054
10054
|
f && !k && /* @__PURE__ */ r(w, {
|
|
10055
10055
|
label: l("editor.axesPanel.controls.scale"),
|
|
10056
|
-
children: /* @__PURE__ */ r(
|
|
10056
|
+
children: /* @__PURE__ */ r(u, {
|
|
10057
10057
|
value: x ? "log" : "linear",
|
|
10058
10058
|
options: G,
|
|
10059
10059
|
onChange: qi
|
|
@@ -10062,7 +10062,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10062
10062
|
f && !x && /* @__PURE__ */ v(j, { children: [
|
|
10063
10063
|
!k && /* @__PURE__ */ v(j, { children: [/* @__PURE__ */ r(w, {
|
|
10064
10064
|
label: l("editor.axesPanel.controls.startFrom"),
|
|
10065
|
-
children: /* @__PURE__ */ r(
|
|
10065
|
+
children: /* @__PURE__ */ r(u, {
|
|
10066
10066
|
value: I,
|
|
10067
10067
|
options: te,
|
|
10068
10068
|
onChange: Zi
|
|
@@ -10077,7 +10077,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10077
10077
|
})] }),
|
|
10078
10078
|
/* @__PURE__ */ r(w, {
|
|
10079
10079
|
label: l("editor.axesPanel.controls.endAt"),
|
|
10080
|
-
children: /* @__PURE__ */ r(
|
|
10080
|
+
children: /* @__PURE__ */ r(u, {
|
|
10081
10081
|
value: C === null ? "auto" : "custom",
|
|
10082
10082
|
options: ie,
|
|
10083
10083
|
onChange: Yi
|
|
@@ -10114,13 +10114,13 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10114
10114
|
}, bv = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10115
10115
|
const a = W(), o = K(a), i = P(), { Switch: l } = H();
|
|
10116
10116
|
if (!o) return null;
|
|
10117
|
-
const s = o.config.content, c = (
|
|
10117
|
+
const s = o.config.content, c = (u) => {
|
|
10118
10118
|
a.commands.dispatch(new Pt({
|
|
10119
10119
|
part: "caption",
|
|
10120
|
-
isVisible:
|
|
10120
|
+
isVisible: u
|
|
10121
10121
|
}));
|
|
10122
|
-
},
|
|
10123
|
-
a.commands.dispatch(new Ca({ caption:
|
|
10122
|
+
}, h = (u) => {
|
|
10123
|
+
a.commands.dispatch(new Ca({ caption: u }), { transient: !0 });
|
|
10124
10124
|
};
|
|
10125
10125
|
return /* @__PURE__ */ r(Z, {
|
|
10126
10126
|
title: e ?? i("editor.elementsPanel.footerSection.caption"),
|
|
@@ -10134,16 +10134,16 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10134
10134
|
})
|
|
10135
10135
|
}), /* @__PURE__ */ r(Un, {
|
|
10136
10136
|
value: s.caption,
|
|
10137
|
-
onChange:
|
|
10137
|
+
onChange: h
|
|
10138
10138
|
})] })
|
|
10139
10139
|
});
|
|
10140
10140
|
}, qr = /^[a-z][a-z\d+.-]*:/i, yv = {}, Sv = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10141
10141
|
const a = W(), o = K(a), i = P(), { Switch: l } = H();
|
|
10142
10142
|
if (!o) return null;
|
|
10143
|
-
const s = o.config.content, c = (
|
|
10143
|
+
const s = o.config.content, c = (h) => {
|
|
10144
10144
|
a.commands.dispatch(new Pt({
|
|
10145
10145
|
part: "source",
|
|
10146
|
-
isVisible:
|
|
10146
|
+
isVisible: h
|
|
10147
10147
|
}));
|
|
10148
10148
|
};
|
|
10149
10149
|
return /* @__PURE__ */ r(Z, {
|
|
@@ -10160,8 +10160,8 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10160
10160
|
});
|
|
10161
10161
|
}, Cv = ({ source: e }) => {
|
|
10162
10162
|
const t = W(), n = P(), { TextField: a } = H(), o = (c) => {
|
|
10163
|
-
const
|
|
10164
|
-
t.commands.dispatch(new cs({ source:
|
|
10163
|
+
const h = (c.label ?? "") !== "" || (c.url ?? "") !== "";
|
|
10164
|
+
t.commands.dispatch(new cs({ source: h ? c : null }), { transient: !0 });
|
|
10165
10165
|
}, i = () => {
|
|
10166
10166
|
const c = e.url ?? "";
|
|
10167
10167
|
c !== "" && !qr.test(c) && o({
|
|
@@ -10194,13 +10194,13 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10194
10194
|
}, xv = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10195
10195
|
const a = W(), o = K(a), i = P(), { Switch: l } = H();
|
|
10196
10196
|
if (!o) return null;
|
|
10197
|
-
const s = o.config.content, c = (
|
|
10197
|
+
const s = o.config.content, c = (u) => {
|
|
10198
10198
|
a.commands.dispatch(new Pt({
|
|
10199
10199
|
part: "subtitle",
|
|
10200
|
-
isVisible:
|
|
10200
|
+
isVisible: u
|
|
10201
10201
|
}));
|
|
10202
|
-
},
|
|
10203
|
-
a.commands.dispatch(new xa({ subtitle:
|
|
10202
|
+
}, h = (u) => {
|
|
10203
|
+
a.commands.dispatch(new xa({ subtitle: u }), { transient: !0 });
|
|
10204
10204
|
};
|
|
10205
10205
|
return /* @__PURE__ */ r(Z, {
|
|
10206
10206
|
title: e ?? i("editor.elementsPanel.headerSection.subtitle"),
|
|
@@ -10214,7 +10214,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10214
10214
|
})
|
|
10215
10215
|
}), /* @__PURE__ */ r(Un, {
|
|
10216
10216
|
value: s.subtitle,
|
|
10217
|
-
onChange:
|
|
10217
|
+
onChange: h
|
|
10218
10218
|
})] })
|
|
10219
10219
|
});
|
|
10220
10220
|
}, Bt = (e) => {
|
|
@@ -10246,10 +10246,10 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10246
10246
|
], wv = mn.length / 2, kv = { select: { target: "graph" } }, Tv = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10247
10247
|
const a = W(), o = K(a), i = P(), { RadioGrid: l } = H(), s = Bt(o);
|
|
10248
10248
|
if (!o || !s) return null;
|
|
10249
|
-
const c = s.graph().get("textScale"),
|
|
10249
|
+
const c = s.graph().get("textScale"), h = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), u = mn.map((p) => ({
|
|
10250
10250
|
value: `${p}`,
|
|
10251
|
-
label:
|
|
10252
|
-
})),
|
|
10251
|
+
label: h(p)
|
|
10252
|
+
})), d = (p) => {
|
|
10253
10253
|
const g = mn.find((f) => `${f}` === p);
|
|
10254
10254
|
if (g === void 0) return;
|
|
10255
10255
|
const m = Te(o.spec.styles.overrides, kv, Ne(o.spec))?.declarations ?? {};
|
|
@@ -10267,25 +10267,25 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10267
10267
|
return /* @__PURE__ */ r(Z, {
|
|
10268
10268
|
title: e ?? i("editor.elementsPanel.textSizeSection.title"),
|
|
10269
10269
|
layout: t,
|
|
10270
|
-
preview: n ??
|
|
10270
|
+
preview: n ?? h(c),
|
|
10271
10271
|
children: /* @__PURE__ */ r(l, {
|
|
10272
10272
|
value: `${c}`,
|
|
10273
|
-
options:
|
|
10273
|
+
options: u,
|
|
10274
10274
|
columns: wv,
|
|
10275
|
-
onChange:
|
|
10275
|
+
onChange: d,
|
|
10276
10276
|
ariaLabel: i("editor.elementsPanel.textSizeSection.title")
|
|
10277
10277
|
})
|
|
10278
10278
|
});
|
|
10279
10279
|
}, Av = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10280
10280
|
const a = W(), o = K(a), i = P(), { Switch: l } = H();
|
|
10281
10281
|
if (!o) return null;
|
|
10282
|
-
const s = o.config.content, c = (
|
|
10282
|
+
const s = o.config.content, c = (u) => {
|
|
10283
10283
|
a.commands.dispatch(new Pt({
|
|
10284
10284
|
part: "title",
|
|
10285
|
-
isVisible:
|
|
10285
|
+
isVisible: u
|
|
10286
10286
|
}));
|
|
10287
|
-
},
|
|
10288
|
-
a.commands.dispatch(new wa({ title:
|
|
10287
|
+
}, h = (u) => {
|
|
10288
|
+
a.commands.dispatch(new wa({ title: u }), { transient: !0 });
|
|
10289
10289
|
};
|
|
10290
10290
|
return /* @__PURE__ */ r(Z, {
|
|
10291
10291
|
title: e ?? i("editor.elementsPanel.headerSection.toggleTitle"),
|
|
@@ -10299,7 +10299,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10299
10299
|
})
|
|
10300
10300
|
}), /* @__PURE__ */ r(Un, {
|
|
10301
10301
|
value: s.title,
|
|
10302
|
-
onChange:
|
|
10302
|
+
onChange: h
|
|
10303
10303
|
})] })
|
|
10304
10304
|
});
|
|
10305
10305
|
}, Vf = ({ children: e, ...t }) => /* @__PURE__ */ r(Di.Root, {
|
|
@@ -10317,7 +10317,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10317
10317
|
}), zt = (e) => `${e}px`, Fi = (e) => `${Math.round(e * 100)}%`, Lv = (e) => `${e}°`, Pv = 24, Iv = { select: { target: "graph" } }, Xr = ["dim", "desaturate"], Wf = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10318
10318
|
const a = W(), o = K(a), i = P(), { Slider: l, ToggleGroup: s } = H(), c = Bt(o);
|
|
10319
10319
|
if (!o || !c) return null;
|
|
10320
|
-
const
|
|
10320
|
+
const h = c.graph().get("cornerRadius"), u = xc(o.spec), d = Xr.map((m) => ({
|
|
10321
10321
|
value: m,
|
|
10322
10322
|
label: i(m === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.gray")
|
|
10323
10323
|
})), p = (m) => {
|
|
@@ -10343,7 +10343,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10343
10343
|
children: /* @__PURE__ */ v(re, { children: [/* @__PURE__ */ r(w, {
|
|
10344
10344
|
label: i("editor.colorPanel.borderSection.cornerRadius"),
|
|
10345
10345
|
children: /* @__PURE__ */ r(l, {
|
|
10346
|
-
value:
|
|
10346
|
+
value: h,
|
|
10347
10347
|
min: 0,
|
|
10348
10348
|
max: Pv,
|
|
10349
10349
|
step: 1,
|
|
@@ -10354,21 +10354,21 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10354
10354
|
}), /* @__PURE__ */ r(w, {
|
|
10355
10355
|
label: i("editor.colorPanel.appearanceSection.highlightStyle"),
|
|
10356
10356
|
children: /* @__PURE__ */ r(s, {
|
|
10357
|
-
value:
|
|
10358
|
-
options:
|
|
10357
|
+
value: u,
|
|
10358
|
+
options: d,
|
|
10359
10359
|
onChange: g
|
|
10360
10360
|
})
|
|
10361
10361
|
})] })
|
|
10362
10362
|
});
|
|
10363
10363
|
}, Ev = 0.05, Uf = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10364
|
-
const a = W(), o = K(a), i = P(), { Slider: l, ToggleGroup: s } = H(), c = o ? Na(o.spec.layers, "bar") : void 0,
|
|
10364
|
+
const a = W(), o = K(a), i = P(), { Slider: l, ToggleGroup: s } = H(), c = o ? Na(o.spec.layers, "bar") : void 0, h = Kn(o, c?.id ?? null, "bar");
|
|
10365
10365
|
if (!o || !c || o.coordSystem.type === "polar" && o.coordSystem.bandAxis === null) return null;
|
|
10366
|
-
const
|
|
10366
|
+
const u = (f) => {
|
|
10367
10367
|
a.commands.dispatch(new ss({
|
|
10368
10368
|
layerId: c.id,
|
|
10369
10369
|
width: f
|
|
10370
10370
|
}), { transient: !0 });
|
|
10371
|
-
},
|
|
10371
|
+
}, d = (f) => {
|
|
10372
10372
|
const b = Zn.find((y) => y === f);
|
|
10373
10373
|
b && a.commands.dispatch(new ls({
|
|
10374
10374
|
layerId: c.id,
|
|
@@ -10377,7 +10377,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10377
10377
|
}, p = Zn.map((f) => ({
|
|
10378
10378
|
value: f,
|
|
10379
10379
|
label: i(`editor.graphPanel.barSection.roundingOptions.${f}`)
|
|
10380
|
-
})), g = Rc(c.params, o.coordSystem.type), m =
|
|
10380
|
+
})), g = Rc(c.params, o.coordSystem.type), m = h?.get("cornerRadius") ?? jl;
|
|
10381
10381
|
return /* @__PURE__ */ r(Z, {
|
|
10382
10382
|
title: e ?? i("editor.graphPanel.barSection.title"),
|
|
10383
10383
|
layout: t,
|
|
@@ -10390,7 +10390,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10390
10390
|
max: es,
|
|
10391
10391
|
step: Ev,
|
|
10392
10392
|
formatValue: Fi,
|
|
10393
|
-
onChange:
|
|
10393
|
+
onChange: u,
|
|
10394
10394
|
onCommit: a.commands.commit
|
|
10395
10395
|
})
|
|
10396
10396
|
}), /* @__PURE__ */ r(w, {
|
|
@@ -10399,7 +10399,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10399
10399
|
children: /* @__PURE__ */ r(s, {
|
|
10400
10400
|
value: typeof m == "string" ? m : "",
|
|
10401
10401
|
options: p,
|
|
10402
|
-
onChange:
|
|
10402
|
+
onChange: d
|
|
10403
10403
|
})
|
|
10404
10404
|
})] })
|
|
10405
10405
|
});
|
|
@@ -10519,7 +10519,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10519
10519
|
}
|
|
10520
10520
|
}
|
|
10521
10521
|
}));
|
|
10522
|
-
},
|
|
10522
|
+
}, h = () => {
|
|
10523
10523
|
a.commands.dispatch(new we({
|
|
10524
10524
|
kind: "shape",
|
|
10525
10525
|
annotation: {
|
|
@@ -10531,7 +10531,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10531
10531
|
}
|
|
10532
10532
|
}
|
|
10533
10533
|
}));
|
|
10534
|
-
},
|
|
10534
|
+
}, u = () => {
|
|
10535
10535
|
const p = hc(o);
|
|
10536
10536
|
p !== null && a.commands.dispatch(new we({
|
|
10537
10537
|
kind: "differenceArrow",
|
|
@@ -10541,7 +10541,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10541
10541
|
label: Gv
|
|
10542
10542
|
}
|
|
10543
10543
|
}));
|
|
10544
|
-
},
|
|
10544
|
+
}, d = o.coordSystem.type === "cartesian";
|
|
10545
10545
|
return /* @__PURE__ */ r(Z, {
|
|
10546
10546
|
title: e ?? i("editor.annotatePanel.callOutSection.title"),
|
|
10547
10547
|
layout: t,
|
|
@@ -10563,13 +10563,13 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10563
10563
|
variant: "tile",
|
|
10564
10564
|
icon: /* @__PURE__ */ r(Ov, { size: "xl" }),
|
|
10565
10565
|
label: i("editor.annotatePanel.callOutSection.box"),
|
|
10566
|
-
onClick:
|
|
10566
|
+
onClick: h
|
|
10567
10567
|
}),
|
|
10568
|
-
|
|
10568
|
+
d && /* @__PURE__ */ r(l, {
|
|
10569
10569
|
variant: "tile",
|
|
10570
10570
|
icon: /* @__PURE__ */ r(Rv, { size: "xl" }),
|
|
10571
10571
|
label: i("editor.annotatePanel.callOutSection.difference"),
|
|
10572
|
-
onClick:
|
|
10572
|
+
onClick: u
|
|
10573
10573
|
})
|
|
10574
10574
|
] })
|
|
10575
10575
|
});
|
|
@@ -10587,14 +10587,14 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10587
10587
|
if (!o) return null;
|
|
10588
10588
|
const s = Ba(o.spec);
|
|
10589
10589
|
if (s === null || !Ie(s)) return null;
|
|
10590
|
-
const c = Yn.map((
|
|
10591
|
-
value:
|
|
10592
|
-
label: i(`editor.graphPanel.comboSection.types.${
|
|
10593
|
-
})),
|
|
10594
|
-
const
|
|
10595
|
-
|
|
10590
|
+
const c = Yn.map((u) => ({
|
|
10591
|
+
value: u,
|
|
10592
|
+
label: i(`editor.graphPanel.comboSection.types.${u}`)
|
|
10593
|
+
})), h = (u) => {
|
|
10594
|
+
const d = Yn.find((p) => p === u);
|
|
10595
|
+
d && a.commands.dispatch(new Sa({
|
|
10596
10596
|
coordType: "cartesian",
|
|
10597
|
-
comboType:
|
|
10597
|
+
comboType: d
|
|
10598
10598
|
}));
|
|
10599
10599
|
};
|
|
10600
10600
|
return /* @__PURE__ */ r(Z, {
|
|
@@ -10604,14 +10604,14 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10604
10604
|
children: /* @__PURE__ */ r(l, {
|
|
10605
10605
|
value: s.comboType,
|
|
10606
10606
|
options: c,
|
|
10607
|
-
onChange:
|
|
10607
|
+
onChange: h,
|
|
10608
10608
|
ariaLabel: i("editor.graphPanel.comboSection.title")
|
|
10609
10609
|
})
|
|
10610
10610
|
});
|
|
10611
10611
|
}, $v = 0.1, Wv = 20, Xf = ({ title: e, preview: t }) => {
|
|
10612
10612
|
const n = W(), a = K(n), o = P(), { NumberField: i, TextField: l } = H();
|
|
10613
10613
|
if (!a || a.coordSystem.type === "polar") return null;
|
|
10614
|
-
const s = tc(a.spec.layers), c = e ?? o("editor.annotationsPanel.goalSection.title"),
|
|
10614
|
+
const s = tc(a.spec.layers), c = e ?? o("editor.annotationsPanel.goalSection.title"), h = Sc(s?.mapping.y), u = typeof h == "number" ? h : null, d = (m) => {
|
|
10615
10615
|
const f = new _s({
|
|
10616
10616
|
showGoalLine: m,
|
|
10617
10617
|
value: Uv(a),
|
|
@@ -10637,7 +10637,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10637
10637
|
title: c,
|
|
10638
10638
|
preview: t,
|
|
10639
10639
|
isChecked: s !== void 0,
|
|
10640
|
-
onToggle:
|
|
10640
|
+
onToggle: d,
|
|
10641
10641
|
children: /* @__PURE__ */ v(re, { children: [/* @__PURE__ */ r(w, {
|
|
10642
10642
|
label: o("editor.annotationsPanel.goalSection.labelControl"),
|
|
10643
10643
|
children: /* @__PURE__ */ r(l, {
|
|
@@ -10650,7 +10650,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10650
10650
|
}), /* @__PURE__ */ r(w, {
|
|
10651
10651
|
label: o("editor.annotationsPanel.goalSection.valueControl"),
|
|
10652
10652
|
children: /* @__PURE__ */ r(i, {
|
|
10653
|
-
value:
|
|
10653
|
+
value: u,
|
|
10654
10654
|
placeholder: o("editor.powerUpPanel.valueInput.numberPlaceholder"),
|
|
10655
10655
|
onChange: g,
|
|
10656
10656
|
onCommit: n.commands.commit,
|
|
@@ -10670,7 +10670,7 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10670
10670
|
if (!i) return null;
|
|
10671
10671
|
const c = e === void 0 ? i.layers[0] : fe(i.layers, e);
|
|
10672
10672
|
if (!c) return null;
|
|
10673
|
-
const { showDataLabels:
|
|
10673
|
+
const { showDataLabels: h, format: u, showStackTotals: d, showCategoryLabels: p } = c.dataLabels, g = Eo(c, i.coordSystem.type, {
|
|
10674
10674
|
hasCapability: o.canPlaceDataLabels,
|
|
10675
10675
|
hasPercentageFormat: o.canFormatDataLabelsAsPercentages
|
|
10676
10676
|
});
|
|
@@ -10708,21 +10708,21 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10708
10708
|
/* @__PURE__ */ r(w, {
|
|
10709
10709
|
label: l("editor.graphPanel.graphOptions.dataLabels"),
|
|
10710
10710
|
children: /* @__PURE__ */ r(s, {
|
|
10711
|
-
isChecked:
|
|
10711
|
+
isChecked: h,
|
|
10712
10712
|
onChange: m
|
|
10713
10713
|
})
|
|
10714
10714
|
}),
|
|
10715
10715
|
g.supportsPercentages && /* @__PURE__ */ r(w, {
|
|
10716
10716
|
label: l("editor.graphPanel.graphOptions.showPercentages"),
|
|
10717
10717
|
children: /* @__PURE__ */ r(s, {
|
|
10718
|
-
isChecked:
|
|
10718
|
+
isChecked: u === "percentage",
|
|
10719
10719
|
onChange: f
|
|
10720
10720
|
})
|
|
10721
10721
|
}),
|
|
10722
10722
|
g.supportsStackTotals && /* @__PURE__ */ r(w, {
|
|
10723
10723
|
label: l("editor.graphPanel.graphOptions.stackTotals"),
|
|
10724
10724
|
children: /* @__PURE__ */ r(s, {
|
|
10725
|
-
isChecked:
|
|
10725
|
+
isChecked: d,
|
|
10726
10726
|
onChange: b
|
|
10727
10727
|
})
|
|
10728
10728
|
}),
|
|
@@ -11509,33 +11509,33 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11509
11509
|
const n = e.position === t.position || e.position === "dodge" && Bi(t);
|
|
11510
11510
|
return e.coordType !== t.coordType || e.geom !== t.geom || !n ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && wt(e.innerRadius) === wt(t.innerRadius);
|
|
11511
11511
|
}, wt = (e) => e >= h5, v5 = 3, Zf = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
11512
|
-
const a = W(), o = K(a), i = P(), { RadioGrid: l } = H(), s = E(() => gn.map(({ name:
|
|
11513
|
-
value:
|
|
11514
|
-
label: i(`editor.graphTypes.${
|
|
11512
|
+
const a = W(), o = K(a), i = P(), { RadioGrid: l } = H(), s = E(() => gn.map(({ name: d, icon: p }) => ({
|
|
11513
|
+
value: d,
|
|
11514
|
+
label: i(`editor.graphTypes.${d}`),
|
|
11515
11515
|
icon: /* @__PURE__ */ r(p, { size: "md" }),
|
|
11516
|
-
isDisabled:
|
|
11516
|
+
isDisabled: d === "combo" && !Us(o?.spec) || d === "heatmap" && !Ks(o?.spec)
|
|
11517
11517
|
})), [i, o]);
|
|
11518
11518
|
if (!o) return null;
|
|
11519
|
-
const c = Ba(o.spec),
|
|
11520
|
-
const p = gn.find((g) => g.name ===
|
|
11519
|
+
const c = Ba(o.spec), h = p5(c), u = (d) => {
|
|
11520
|
+
const p = gn.find((g) => g.name === d);
|
|
11521
11521
|
p && a.commands.dispatch(new Sa(m5(p, c)));
|
|
11522
11522
|
};
|
|
11523
11523
|
return /* @__PURE__ */ r(Z, {
|
|
11524
11524
|
title: e ?? i("editor.graphPanel.graphTypeSection.title"),
|
|
11525
11525
|
layout: t,
|
|
11526
|
-
preview: n ?? (
|
|
11526
|
+
preview: n ?? (h === null ? void 0 : i(`editor.graphTypes.${h.name}`)),
|
|
11527
11527
|
children: /* @__PURE__ */ r(l, {
|
|
11528
|
-
value:
|
|
11528
|
+
value: h?.name ?? "",
|
|
11529
11529
|
options: s,
|
|
11530
11530
|
columns: v5,
|
|
11531
|
-
onChange:
|
|
11531
|
+
onChange: u,
|
|
11532
11532
|
ariaLabel: i("editor.graphPanel.graphTypeSection.title")
|
|
11533
11533
|
})
|
|
11534
11534
|
});
|
|
11535
11535
|
}, Yf = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
11536
|
-
const a = W(), o = K(a), i = P(), { Slider: l, Switch: s, ToggleGroup: c } = H(),
|
|
11537
|
-
if (
|
|
11538
|
-
const
|
|
11536
|
+
const a = W(), o = K(a), i = P(), { Slider: l, Switch: s, ToggleGroup: c } = H(), h = Bt(o), u = o !== null && h !== null ? _o(o, h) : null;
|
|
11537
|
+
if (u === null) return null;
|
|
11538
|
+
const d = u.axes.some((b) => b.gridVisible), p = bt.map((b) => ({
|
|
11539
11539
|
value: b,
|
|
11540
11540
|
label: i(`editor.graphPanel.gridSection.lineStyles.${b}`)
|
|
11541
11541
|
})), g = (b) => (y) => {
|
|
@@ -11553,23 +11553,23 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11553
11553
|
title: e ?? i("editor.graphPanel.gridSection.title"),
|
|
11554
11554
|
layout: t,
|
|
11555
11555
|
preview: n,
|
|
11556
|
-
children: /* @__PURE__ */ v(re, { children: [
|
|
11556
|
+
children: /* @__PURE__ */ v(re, { children: [u.axes.map((b) => /* @__PURE__ */ r(w, {
|
|
11557
11557
|
label: i(f5(b)),
|
|
11558
11558
|
children: /* @__PURE__ */ r(s, {
|
|
11559
11559
|
isChecked: b.gridVisible,
|
|
11560
11560
|
onChange: g(b.scaleAestheticKey)
|
|
11561
11561
|
})
|
|
11562
|
-
}, b.scaleAestheticKey)),
|
|
11562
|
+
}, b.scaleAestheticKey)), u.isStylable && d && /* @__PURE__ */ v(j, { children: [/* @__PURE__ */ r(w, {
|
|
11563
11563
|
label: i("editor.graphPanel.gridSection.gridStyle"),
|
|
11564
11564
|
children: /* @__PURE__ */ r(c, {
|
|
11565
|
-
value:
|
|
11565
|
+
value: u.lineStyle,
|
|
11566
11566
|
options: p,
|
|
11567
11567
|
onChange: m
|
|
11568
11568
|
})
|
|
11569
11569
|
}), /* @__PURE__ */ r(w, {
|
|
11570
11570
|
label: i("editor.graphPanel.gridSection.gridThickness"),
|
|
11571
11571
|
children: /* @__PURE__ */ r(l, {
|
|
11572
|
-
value:
|
|
11572
|
+
value: u.strokeWidth,
|
|
11573
11573
|
min: 0,
|
|
11574
11574
|
max: 8,
|
|
11575
11575
|
step: 0.5,
|
|
@@ -11591,9 +11591,9 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11591
11591
|
], Jf = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
11592
11592
|
const a = W(), o = K(a), i = P(), { Switch: l, ToggleGroup: s } = H();
|
|
11593
11593
|
if (!o) return null;
|
|
11594
|
-
const c = o.config.headline,
|
|
11595
|
-
if (
|
|
11596
|
-
const m =
|
|
11594
|
+
const c = o.config.headline, h = c.show !== "none", u = o.coordSystem, d = u.type === "polar", p = u.type === "polar" && u.innerRadius > 0, g = o.layers.some((D) => D.summary.grandTotal !== void 0);
|
|
11595
|
+
if (d && !g) return null;
|
|
11596
|
+
const m = d ? y5 : zi, f = o.guides.headline, b = f?.kind === "perGroup" && f.items.some((D) => D.comparison !== null), y = m.map((D) => ({
|
|
11597
11597
|
value: D,
|
|
11598
11598
|
label: i(`editor.graphPanel.headlineNumberSection.metrics.${D}`)
|
|
11599
11599
|
})), k = jr.map((D) => ({
|
|
@@ -11629,10 +11629,10 @@ var dv = "_40zvwv8", Z = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11629
11629
|
children: /* @__PURE__ */ v(re, { children: [/* @__PURE__ */ r(w, {
|
|
11630
11630
|
label: i("editor.graphPanel.headlineNumberSection.toggle"),
|
|
11631
11631
|
children: /* @__PURE__ */ r(l, {
|
|
11632
|
-
isChecked:
|
|
11632
|
+
isChecked: h,
|
|
11633
11633
|
onChange: I
|
|
11634
11634
|
})
|
|
11635
|
-
}),
|
|
11635
|
+
}), h && /* @__PURE__ */ v(j, { children: [
|
|
11636
11636
|
y.length > 1 && /* @__PURE__ */ r(w, {
|
|
11637
11637
|
label: i("editor.graphPanel.headlineNumberSection.metricLabel"),
|
|
11638
11638
|
layout: "stack",
|
|
@@ -11700,13 +11700,13 @@ var jt = [
|
|
|
11700
11700
|
], Qf = ({ positions: e, title: t, layout: n = "collapsible", preview: a }) => {
|
|
11701
11701
|
const o = W(), i = K(o), l = P(), { ToggleGroup: s } = H(), c = ga();
|
|
11702
11702
|
if (!i) return null;
|
|
11703
|
-
const
|
|
11703
|
+
const h = i.config.legend.position, u = e ?? jt, d = i.guides.legends.drawn[0], p = Ws({
|
|
11704
11704
|
legendPosition: i.guides.legends.position,
|
|
11705
11705
|
coordSystem: i.coordSystem,
|
|
11706
11706
|
layers: i.layers
|
|
11707
11707
|
}), g = i.guides.headline?.kind === "perGroup", m = i.guides.colorGroups.length > 0;
|
|
11708
|
-
if (
|
|
11709
|
-
const f =
|
|
11708
|
+
if (h === "auto" && d === void 0 && !p && (g || !m)) return null;
|
|
11709
|
+
const f = d?.position ?? "none", b = h === "auto" ? f : h, y = jt.filter((N) => N === b || u.includes(N)).map((N) => ({
|
|
11710
11710
|
value: N,
|
|
11711
11711
|
label: l(`editor.graphPanel.legendSection.${N}`)
|
|
11712
11712
|
})), k = (N) => {
|
|
@@ -11718,13 +11718,13 @@ var jt = [
|
|
|
11718
11718
|
}, C = (N) => {
|
|
11719
11719
|
const G = Jr.find((te) => te === N);
|
|
11720
11720
|
G && o.commands.dispatch(new ys({ display: G }));
|
|
11721
|
-
}, I =
|
|
11721
|
+
}, I = d?.position === "left" || d?.position === "right" ? "column" : "row", L = I === "row" ? "ltr" : c, A = (N) => l(N === "start" || N === "end" ? `editor.graphPanel.legendSection.${C5[I][N]}` : `editor.graphPanel.legendSection.align.${N}`), B = Yr.map((N) => ({
|
|
11722
11722
|
value: N,
|
|
11723
11723
|
label: A(N)
|
|
11724
11724
|
})), ee = Jr.map((N) => ({
|
|
11725
11725
|
value: N,
|
|
11726
11726
|
label: l(`editor.graphPanel.legendSection.display.${N}`)
|
|
11727
|
-
})), D = t ?? l("editor.graphPanel.legendSection.title"), R = y.find((N) => N.value === b)?.label, S =
|
|
11727
|
+
})), D = t ?? l("editor.graphPanel.legendSection.title"), R = y.find((N) => N.value === b)?.label, S = d !== void 0;
|
|
11728
11728
|
return /* @__PURE__ */ r(Z, {
|
|
11729
11729
|
title: D,
|
|
11730
11730
|
layout: n,
|
|
@@ -11790,9 +11790,9 @@ var jt = [
|
|
|
11790
11790
|
"zero",
|
|
11791
11791
|
"connect"
|
|
11792
11792
|
], eb = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
11793
|
-
const a = W(), o = K(a), i = P(), { Select: l, Slider: s, Switch: c, ToggleGroup:
|
|
11794
|
-
if (!o || !
|
|
11795
|
-
const g = o.coordSystem.type === "polar", m = M5(i,
|
|
11793
|
+
const a = W(), o = K(a), i = P(), { Select: l, Slider: s, Switch: c, ToggleGroup: h } = H(), u = o?.spec.layers ?? [], d = Na(u, "line", "area"), p = Kn(o, d?.id ?? null, "line");
|
|
11794
|
+
if (!o || !d) return null;
|
|
11795
|
+
const g = o.coordSystem.type === "polar", m = M5(i, d), f = E5(d, u), b = Vs(d.geom, d.id), y = Ne(o.spec), k = o.spec.styles.overrides, x = nr(k, b, y), C = nr(Oc(k, b, y), b, y), I = x?.strokeWidth, L = typeof I == "number", A = C?.strokeWidth !== void 0, B = d.geom === "line" ? d : void 0, ee = [{
|
|
11796
11796
|
value: "auto",
|
|
11797
11797
|
label: i("editor.graphPanel.numberFormat.options.auto"),
|
|
11798
11798
|
isDisabled: A
|
|
@@ -11801,7 +11801,7 @@ var jt = [
|
|
|
11801
11801
|
label: i("editor.graphPanel.numberFormat.options.custom")
|
|
11802
11802
|
}], D = (ie) => {
|
|
11803
11803
|
a.commands.dispatch(new Bs({
|
|
11804
|
-
layerId:
|
|
11804
|
+
layerId: d.id,
|
|
11805
11805
|
showPoints: ie
|
|
11806
11806
|
}));
|
|
11807
11807
|
}, R = (ie) => {
|
|
@@ -11811,24 +11811,24 @@ var jt = [
|
|
|
11811
11811
|
}));
|
|
11812
11812
|
}, S = (ie) => {
|
|
11813
11813
|
a.commands.dispatch(new Cs({
|
|
11814
|
-
layerId:
|
|
11814
|
+
layerId: d.id,
|
|
11815
11815
|
curve: ie ? "smooth" : "linear"
|
|
11816
11816
|
}));
|
|
11817
11817
|
}, N = (ie) => {
|
|
11818
11818
|
const Fe = p?.get("strokeWidth") ?? Jl;
|
|
11819
11819
|
a.commands.dispatch(new er({
|
|
11820
|
-
layerId:
|
|
11820
|
+
layerId: d.id,
|
|
11821
11821
|
lineWidth: ie === "custom" ? Fe : null
|
|
11822
11822
|
}));
|
|
11823
11823
|
}, G = (ie) => {
|
|
11824
11824
|
a.commands.dispatch(new er({
|
|
11825
|
-
layerId:
|
|
11825
|
+
layerId: d.id,
|
|
11826
11826
|
lineWidth: ie
|
|
11827
11827
|
}), { transient: !0 });
|
|
11828
11828
|
}, te = (ie) => {
|
|
11829
11829
|
const Fe = I5(ie);
|
|
11830
11830
|
Fe && a.commands.dispatch(new xs({
|
|
11831
|
-
layerId:
|
|
11831
|
+
layerId: d.id,
|
|
11832
11832
|
missingValues: Fe
|
|
11833
11833
|
}));
|
|
11834
11834
|
};
|
|
@@ -11858,13 +11858,13 @@ var jt = [
|
|
|
11858
11858
|
!g && /* @__PURE__ */ r(w, {
|
|
11859
11859
|
label: i("editor.graphPanel.graphOptions.smoothLines"),
|
|
11860
11860
|
children: /* @__PURE__ */ r(c, {
|
|
11861
|
-
isChecked:
|
|
11861
|
+
isChecked: d.params.curve === "smooth",
|
|
11862
11862
|
onChange: S
|
|
11863
11863
|
})
|
|
11864
11864
|
}),
|
|
11865
11865
|
/* @__PURE__ */ r(w, {
|
|
11866
11866
|
label: i("editor.graphPanel.lineThickness.label"),
|
|
11867
|
-
children: /* @__PURE__ */ r(
|
|
11867
|
+
children: /* @__PURE__ */ r(h, {
|
|
11868
11868
|
value: L ? "custom" : "auto",
|
|
11869
11869
|
options: ee,
|
|
11870
11870
|
onChange: N
|
|
@@ -11885,7 +11885,7 @@ var jt = [
|
|
|
11885
11885
|
!g && m.length > 1 && /* @__PURE__ */ r(w, {
|
|
11886
11886
|
label: i("editor.fineTunePanel.detailSection.missingValues"),
|
|
11887
11887
|
children: /* @__PURE__ */ r(l, {
|
|
11888
|
-
value:
|
|
11888
|
+
value: d.params.missingValues,
|
|
11889
11889
|
options: m,
|
|
11890
11890
|
onChange: te
|
|
11891
11891
|
})
|
|
@@ -11917,16 +11917,16 @@ var jt = [
|
|
|
11917
11917
|
size: "editor.graphPanel.mappingSection.size",
|
|
11918
11918
|
label: "editor.graphPanel.mappingSection.label"
|
|
11919
11919
|
}, tb = ({ title: e, layout: t = "collapsible" }) => {
|
|
11920
|
-
const n = W(), a = K(n), o = P(), { Select: i } = H(), l = o("editor.graphPanel.mappingSection.none"), s = a?.spec, c = E(() => s === void 0 ? [] : kc(s, O5).map(({ aesthetic:
|
|
11921
|
-
const p = Tc(s.mapping,
|
|
11920
|
+
const n = W(), a = K(n), o = P(), { Select: i } = H(), l = o("editor.graphPanel.mappingSection.none"), s = a?.spec, c = E(() => s === void 0 ? [] : kc(s, O5).map(({ aesthetic: h, variables: u, isRequired: d }) => {
|
|
11921
|
+
const p = Tc(s.mapping, h);
|
|
11922
11922
|
return {
|
|
11923
|
-
aesthetic:
|
|
11924
|
-
label: o(R5[
|
|
11925
|
-
value: p ?? (
|
|
11926
|
-
options: N5(
|
|
11923
|
+
aesthetic: h,
|
|
11924
|
+
label: o(R5[h]),
|
|
11925
|
+
value: p ?? (d ? null : vn),
|
|
11926
|
+
options: N5(u, p, d ? null : l),
|
|
11927
11927
|
chooseColumn: (g) => {
|
|
11928
11928
|
n.commands.dispatch(new ws({
|
|
11929
|
-
aesthetic:
|
|
11929
|
+
aesthetic: h,
|
|
11930
11930
|
variable: g === vn ? null : g
|
|
11931
11931
|
}));
|
|
11932
11932
|
}
|
|
@@ -11940,15 +11940,15 @@ var jt = [
|
|
|
11940
11940
|
return a ? /* @__PURE__ */ r(Z, {
|
|
11941
11941
|
title: e ?? o("editor.graphPanel.mappingSection.title"),
|
|
11942
11942
|
layout: t,
|
|
11943
|
-
children: /* @__PURE__ */ r(re, { children: c.map(({ aesthetic:
|
|
11944
|
-
label:
|
|
11943
|
+
children: /* @__PURE__ */ r(re, { children: c.map(({ aesthetic: h, label: u, value: d, options: p, chooseColumn: g }) => /* @__PURE__ */ r(w, {
|
|
11944
|
+
label: u,
|
|
11945
11945
|
children: /* @__PURE__ */ r(i, {
|
|
11946
|
-
value:
|
|
11946
|
+
value: d,
|
|
11947
11947
|
options: p,
|
|
11948
11948
|
placeholder: l,
|
|
11949
11949
|
onChange: g
|
|
11950
11950
|
})
|
|
11951
|
-
},
|
|
11951
|
+
}, h)) })
|
|
11952
11952
|
}) : null;
|
|
11953
11953
|
}, N5 = (e, t, n) => {
|
|
11954
11954
|
const a = t !== null && !e.includes(t) ? [t, ...e] : e;
|
|
@@ -11975,7 +11975,7 @@ var jt = [
|
|
|
11975
11975
|
], z5 = ["auto", "none"], nb = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
11976
11976
|
const a = W(), o = K(a), i = P(), { NumberField: l, ToggleGroup: s } = H();
|
|
11977
11977
|
if (!o) return null;
|
|
11978
|
-
const { abbreviation: c, decimals:
|
|
11978
|
+
const { abbreviation: c, decimals: h } = o.config.numberFormat, u = H5(c) !== void 0, d = h !== "auto", p = (x) => x.map((C) => ({
|
|
11979
11979
|
value: C,
|
|
11980
11980
|
label: i(`editor.graphPanel.numberFormat.options.${C}`)
|
|
11981
11981
|
})), g = fn.map(({ value: x, labelKey: C }) => ({
|
|
@@ -12002,7 +12002,7 @@ var jt = [
|
|
|
12002
12002
|
/* @__PURE__ */ r(w, {
|
|
12003
12003
|
label: i("editor.graphPanel.numberFormat.abbreviationLabel"),
|
|
12004
12004
|
children: /* @__PURE__ */ r(s, {
|
|
12005
|
-
value:
|
|
12005
|
+
value: u ? "custom" : c,
|
|
12006
12006
|
options: p([
|
|
12007
12007
|
"auto",
|
|
12008
12008
|
"none",
|
|
@@ -12011,7 +12011,7 @@ var jt = [
|
|
|
12011
12011
|
onChange: f
|
|
12012
12012
|
})
|
|
12013
12013
|
}),
|
|
12014
|
-
|
|
12014
|
+
u && /* @__PURE__ */ r(w, {
|
|
12015
12015
|
label: i("editor.graphPanel.numberFormat.valueLabel"),
|
|
12016
12016
|
children: /* @__PURE__ */ r(s, {
|
|
12017
12017
|
value: c,
|
|
@@ -12022,15 +12022,15 @@ var jt = [
|
|
|
12022
12022
|
/* @__PURE__ */ r(w, {
|
|
12023
12023
|
label: i("editor.graphPanel.numberFormat.decimalPlacesLabel"),
|
|
12024
12024
|
children: /* @__PURE__ */ r(s, {
|
|
12025
|
-
value:
|
|
12025
|
+
value: d ? "custom" : "auto",
|
|
12026
12026
|
options: p(["auto", "custom"]),
|
|
12027
12027
|
onChange: y
|
|
12028
12028
|
})
|
|
12029
12029
|
}),
|
|
12030
|
-
|
|
12030
|
+
d && /* @__PURE__ */ r(w, {
|
|
12031
12031
|
label: i("editor.graphPanel.numberFormat.valueLabel"),
|
|
12032
12032
|
children: /* @__PURE__ */ r(l, {
|
|
12033
|
-
value:
|
|
12033
|
+
value: h,
|
|
12034
12034
|
min: F5,
|
|
12035
12035
|
max: B5,
|
|
12036
12036
|
onChange: k,
|
|
@@ -12058,10 +12058,10 @@ var jt = [
|
|
|
12058
12058
|
}, V5 = 0.9, $5 = 360, W5 = 0.05, U5 = 15, ab = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
12059
12059
|
const a = W(), o = K(a), i = P(), { Slider: l } = H();
|
|
12060
12060
|
if (!o || o.spec.coords.coordType !== "polar") return null;
|
|
12061
|
-
const { innerRadius: s, startAngle: c } = o.spec.coords.params,
|
|
12062
|
-
a.commands.dispatch(new Ls({ innerRadius:
|
|
12063
|
-
},
|
|
12064
|
-
a.commands.dispatch(new Ps({ startAngle:
|
|
12061
|
+
const { innerRadius: s, startAngle: c } = o.spec.coords.params, h = (d) => {
|
|
12062
|
+
a.commands.dispatch(new Ls({ innerRadius: d }), { transient: !0 });
|
|
12063
|
+
}, u = (d) => {
|
|
12064
|
+
a.commands.dispatch(new Ps({ startAngle: d }), { transient: !0 });
|
|
12065
12065
|
};
|
|
12066
12066
|
return /* @__PURE__ */ r(Z, {
|
|
12067
12067
|
title: e ?? i("editor.graphPanel.polarSection.title"),
|
|
@@ -12075,7 +12075,7 @@ var jt = [
|
|
|
12075
12075
|
max: V5,
|
|
12076
12076
|
step: W5,
|
|
12077
12077
|
formatValue: Fi,
|
|
12078
|
-
onChange:
|
|
12078
|
+
onChange: h,
|
|
12079
12079
|
onCommit: a.commands.commit
|
|
12080
12080
|
})
|
|
12081
12081
|
}), /* @__PURE__ */ r(w, {
|
|
@@ -12086,7 +12086,7 @@ var jt = [
|
|
|
12086
12086
|
max: $5 - 1,
|
|
12087
12087
|
step: U5,
|
|
12088
12088
|
formatValue: Lv,
|
|
12089
|
-
onChange:
|
|
12089
|
+
onChange: u,
|
|
12090
12090
|
onCommit: a.commands.commit
|
|
12091
12091
|
})
|
|
12092
12092
|
})] })
|
|
@@ -12146,24 +12146,24 @@ var jt = [
|
|
|
12146
12146
|
"power",
|
|
12147
12147
|
"loess"
|
|
12148
12148
|
], q5 = "linear", ob = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
12149
|
-
const a = W(), o = K(a), i = P(), { Select: l, Switch: s } = H(), { options: c, findValue:
|
|
12149
|
+
const a = W(), o = K(a), i = P(), { Select: l, Switch: s } = H(), { options: c, findValue: h } = jo(o);
|
|
12150
12150
|
if (!o || o.coordSystem.type === "polar") return null;
|
|
12151
|
-
const
|
|
12151
|
+
const u = oc(o.spec.layers), d = Qs(o.spec.layers), p = u?.stat.type === "smooth" ? u.stat.method : q5, g = X5(d), m = ea.map((C) => ({
|
|
12152
12152
|
value: C,
|
|
12153
12153
|
label: i(`editor.annotationsPanel.trendType.options.${C}`)
|
|
12154
12154
|
})), f = (C, I = {}) => {
|
|
12155
|
-
const L =
|
|
12155
|
+
const L = u ?? d, A = new Rs({
|
|
12156
12156
|
line: C,
|
|
12157
12157
|
...I,
|
|
12158
12158
|
...L !== void 0 && { layerId: L.id },
|
|
12159
12159
|
label: i("editor.annotationsPanel.trendsAndAveragesSection.average")
|
|
12160
12160
|
});
|
|
12161
12161
|
a.commands.dispatch(A);
|
|
12162
|
-
}, b = (C) => f(C ? "trend" : "none", { method: p }), y = (C) => f(C ? "average" : "none", { group: g ??
|
|
12162
|
+
}, b = (C) => f(C ? "trend" : "none", { method: p }), y = (C) => f(C ? "average" : "none", { group: g ?? h(c[0]?.value ?? "") }), k = (C) => {
|
|
12163
12163
|
const I = ea.find((L) => L === C);
|
|
12164
12164
|
I !== void 0 && f("trend", { method: I });
|
|
12165
12165
|
}, x = (C) => {
|
|
12166
|
-
const I = C === null ? void 0 :
|
|
12166
|
+
const I = C === null ? void 0 : h(C);
|
|
12167
12167
|
I !== void 0 && f("average", { group: I });
|
|
12168
12168
|
};
|
|
12169
12169
|
return /* @__PURE__ */ r(Z, {
|
|
@@ -12175,11 +12175,11 @@ var jt = [
|
|
|
12175
12175
|
label: i("editor.annotationsPanel.trendsAndAveragesSection.trend"),
|
|
12176
12176
|
icon: /* @__PURE__ */ r(Qr, { size: "lg" }),
|
|
12177
12177
|
children: /* @__PURE__ */ r(s, {
|
|
12178
|
-
isChecked:
|
|
12178
|
+
isChecked: u !== void 0,
|
|
12179
12179
|
onChange: b
|
|
12180
12180
|
})
|
|
12181
12181
|
}),
|
|
12182
|
-
|
|
12182
|
+
u !== void 0 && /* @__PURE__ */ r(w, {
|
|
12183
12183
|
label: i("editor.annotationsPanel.trendType.label"),
|
|
12184
12184
|
children: /* @__PURE__ */ r(l, {
|
|
12185
12185
|
value: p,
|
|
@@ -12192,11 +12192,11 @@ var jt = [
|
|
|
12192
12192
|
label: i("editor.annotationsPanel.trendsAndAveragesSection.average"),
|
|
12193
12193
|
icon: /* @__PURE__ */ r(K5, { size: "lg" }),
|
|
12194
12194
|
children: /* @__PURE__ */ r(s, {
|
|
12195
|
-
isChecked:
|
|
12195
|
+
isChecked: d !== void 0,
|
|
12196
12196
|
onChange: y
|
|
12197
12197
|
})
|
|
12198
12198
|
}),
|
|
12199
|
-
|
|
12199
|
+
d !== void 0 && c.length > 0 && /* @__PURE__ */ r(w, {
|
|
12200
12200
|
label: i("editor.annotationsPanel.averageLineSeries.label"),
|
|
12201
12201
|
children: /* @__PURE__ */ r(l, {
|
|
12202
12202
|
value: g === void 0 ? null : String(g),
|