@graphysdk/react-renderer 1.9.0-beta.1794237678854 → 1.9.0-beta.1794238447086
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.mjs +736 -733
- package/dist/{history-chords-BN2HHG3t.cjs → history-chords-Df7nyG29.cjs} +1 -1
- package/dist/{history-chords-C9ZSLbBz.js → history-chords-DmC_r53u.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/editable.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { ARROW_DEFAULTS as
|
|
3
|
-
import { Fragment as
|
|
1
|
+
import { $ as Or, $n as Rr, A as Jn, An as xc, At as R, Bt as Re, C as kc, Ct as bn, E as Tc, Et as Ac, F as Pc, Ft as Lc, G as Ic, Gn as ti, Gt as ue, Hn as Mc, I as Ec, J as Oc, K as Y, Kt as Rc, L as Nc, Ln as Dc, Lt as ye, Mt as _c, Nn as Fc, Nt as zc, O as Qn, Ot as Bc, Pt as Hc, Q as J, R as M, Rt as ni, S as Gc, St as $c, T as Vc, U as Wc, Vn as Uc, W as ri, Wt as nt, X as Kc, Xn as jc, Y as Ca, Yn as F, Z as Xc, Zn as W, _ as rt, _n as Nr, _t as wa, an as ai, at as qc, b as oi, bt as Ne, c as ii, ct as yn, d as Yc, dn as li, dt as Sn, et as Dr, f as Zc, fn as Jc, g as si, gn as ve, gt as Qc, h as at, hn as ci, ht as di, i as Et, it as ed, j as Cn, jt as ui, k as hi, kn as td, kt as pi, l as er, ln as nd, lt as rd, m as ad, mn as gi, mt as od, n as Se, nn as id, nt as ld, o as sd, ot as mi, p as vi, q as ae, qn as ee, qt as cd, r as Q, rt as dd, st as _r, t as ud, tn as xa, tt as hd, u as pd, un as gd, ut as fi, v as md, vn as ut, vt as vd, x as fd, xt as bd, y as yd, yt as Pe, zt as tr } from "./history-chords-DmC_r53u.js";
|
|
2
|
+
import { ARROW_DEFAULTS as bi, ARROW_STICKER_DECLARATIONS as Sd, ARROW_STROKE_WIDTHS_PX as Bn, AddAnnotationCommand as we, AddHighlightCommand as Cd, COMBO_TYPES as ka, CONSTANT_VARIABLES as Fr, DASH_PRESETS as wd, DEFAULT_BAR_CORNER_RADII as xd, DEFAULT_GEOM_COLOR as kd, DEFAULT_POINT_SIZE_PX as yi, DEFAULT_STROKE_WIDTH_PX as Td, DIFFERENCE_ARROW_DEFAULTS as Si, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Ta, InternalError as Ad, MAX_BAR_WIDTH_FRACTION as Pd, MIN_BAR_WIDTH_FRACTION as Ld, MoveAnnotationCommand as Id, PANEL_FRACTION_BOUNDS as Ci, POSITION_VARIABLES as je, RESTING_HOVER_STATE as Ot, RemoveAnnotationCommand as ze, RemoveHighlightCommand as Md, SHAPE_DEFAULTS as wi, SequenceCommand as ct, SetAxisLabelCommand as xi, SetAxisPositionCommand as ki, SetAxisTickModeCommand as Ti, SetAxisTicksVisibilityCommand as Ed, SetAxisVisibilityCommand as nr, SetBarCornerRadiusCommand as Od, SetBarWidthCommand as Ai, SetContentCaptionCommand as Pi, SetContentSourceCommand as Rd, SetContentSubtitleCommand as Li, SetContentTitleCommand as Ii, SetDataLabelsFormatCommand as Mi, SetDifferenceArrowStyleCommand as Nd, SetGraphTypeCommand as zr, SetGridLineStyleCommand as Ei, SetGridVisibilityCommand as rr, SetHeadlineCompareWithCommand as Dd, SetHeadlinePositionCommand as _d, SetHeadlineShowCommand as Aa, SetHeadlineSizeCommand as Fd, SetHighlightDimStyleCommand as zd, SetLayerYScaleTypeCommand as Bd, SetLegendAlignCommand as Hd, SetLegendDisplayCommand as Gd, SetLegendPlacementCommand as $d, SetLegendPositionCommand as ar, SetLineCurveCommand as Oi, SetLineMissingValuesCommand as Ri, SetLineStyleCommand as Fe, SetMappingCommand as Vd, SetNumberFormatAbbreviationCommand as Wd, SetNumberFormatDecimalsCommand as Pa, SetObservationsColorCommand as Ud, SetPointSizeCommand as wn, SetPointSymbolCommand as Br, SetPolarInnerRadiusCommand as Kd, SetPolarStartAngleCommand as jd, SetRuleLabelCommand as Xd, SetRuleValueCommand as qd, SetScaleDomainCommand as Pt, SetScaleRangeCommand as Ni, SetScaleTransformCommand as Di, SetStatLineCommand as Yd, SetStyleRuleCommand as Xe, TEXT_ANNOTATION_DEFAULTS as _i, TEXT_ANNOTATION_FADE_ALPHA as Zd, ToggleCategoryLabelsCommand as Fi, ToggleContentVisibilityCommand as Qe, ToggleDataLabelsCommand as zi, ToggleGoalLineCommand as Jd, ToggleLinePointsCommand as Hr, ToggleStackTotalsCommand as Bi, UpdateAnnotationCommand as fe, alignUnitFractions as Qd, areAnchorsEqual as Gr, areEditTargetsEqual as $r, areEndpointsComparable as eu, buildColormapRange as tu, buildDivergingRange as La, buildLayerStyleAddress as gt, buildObservationPredicate as nu, buildObservationsTarget as $e, buildObservationsTargetAtValue as Hi, buildPointSymbolInBox as ru, canAnchorDirectLabels as au, canBecomeCombo as ou, canBecomeHeatmap as iu, clampAnnotationTranslation as lu, combineKindStyleDeclarations as Ia, computeArrow as Gi, createObservationAnchorBuilder as su, createObservationAnchorParser as cu, createStyleResolver as du, createStyleRuleMatcher as uu, createValueFormatter as Vr, createXValueReader as hu, filterLayersByGeoms as or, findAnnotation as pu, findAverageLineLayer as gu, findAxisGuide as $i, findCompanionLayers as Vi, findGoalLineLayer as mu, findHighlightsAtObservation as vu, findHostLayer as xn, findKindStyleDeclarations as rn, findLayerByGeom as Wi, findLayerById as q, findObservationAttachment as fu, findPointerRegion as bu, findStyleRule as qe, findTrendLineLayer as yu, formatDifferenceLabel as Su, getBoundingRect as ir, getGroupVariables as Wr, getScaledAesthetic as Cu, getXBand as wu, getYBand as xu, hasMainAxisBand as ku, hasMultipleGroups as kn, inferDefaultDifferenceArrowEndpoints as Tu, inferDifferenceArrowEndpoints as Au, isComboGraphType as be, isCompanionLayer as Ui, isGeomStyleRule as Pu, isGeometricSymbol as Tt, isImageSymbol as lr, isLayerSpecOf as bt, isObservationAttachmentKind as Lu, isSafeUrl as Iu, isZeroAnchoredAxis as Ki, measureObservationsBoxes as ji, polarToUnit as Mu, projectAnchorToPanel as sr, readBroadestObservationsScope as Eu, readColorChoices as Xi, readColorPart as Ou, readColormapColor as Ru, readComboLineLayerId as Nu, readCompanionRowsAtScopeKey as Du, readConstantValue as _u, readDivergingColor as Ma, readEditTargetKey as Rt, readGeomColor as Fu, readGraphType as Tn, readHighlightDimStyle as zu, readMainAxis as Bu, readMappableAesthetics as Hu, readMappedVariable as Gu, readObservationIndex as yt, readObservationsColor as $u, readObservationsColorPart as Vu, readObservationsColorRoute as An, readReachableLevels as Wu, readRowScopeKey as Uu, readRowsAtScopeKey as Ku, readScopeXVariable as ju, readStyleCoord as xe, readStyleRulesBeneath as Xu, readVariableName as Oe, resolveArrowAnnotationStyle as Ur, resolveBarBandFraction as qi, resolveComparisonBasis as qu, resolveDifferenceArrowAnnotationStyle as Yu, resolveEditOutlineStyle as Zu, resolveLayerAxisValueFormat as Ju, resolveObservationPoint as Yi, resolveObservationsTarget as et, stepDifferenceArrowEndpoint as Qu, toDashPreset as tt, toPaintColor as an, toPanelCursor as Nt, toStrokeDasharray as Zi } from "@graphysdk/viz-engine";
|
|
3
|
+
import { Fragment as Ji, createContext as Je, memo as Qi, useCallback as ce, useContext as Ce, useEffect as B, useId as Be, useLayoutEffect as Ye, useMemo as _, useRef as X, useState as Z, useSyncExternalStore as eh } from "react";
|
|
4
4
|
import { Fragment as K, jsx as a, jsxs as v } from "react/jsx-runtime";
|
|
5
5
|
import { motion as th } from "motion/react";
|
|
6
6
|
import { useShallow as Le } from "zustand/react/shallow";
|
|
7
7
|
import { assignInlineVars as De } from "@vanilla-extract/dynamic";
|
|
8
8
|
import Ze from "clsx";
|
|
9
|
-
import { clamp as
|
|
9
|
+
import { clamp as mt, isEqual as nh } from "lodash-es";
|
|
10
10
|
import { autoUpdate as rh, flip as ah, offset as oh, shift as ih, useFloating as lh } from "@floating-ui/react-dom";
|
|
11
|
-
import { createPortal as
|
|
11
|
+
import { createPortal as Kr } from "react-dom";
|
|
12
12
|
import { Tooltip as Te } from "@base-ui/react/tooltip";
|
|
13
13
|
import { Popover as le } from "@base-ui/react/popover";
|
|
14
14
|
import { HexColorInput as sh, HexColorPicker as ch } from "react-colorful";
|
|
15
|
-
import { NumberField as
|
|
16
|
-
import { Radio as
|
|
17
|
-
import { RadioGroup as
|
|
15
|
+
import { NumberField as Ea } from "@base-ui/react/number-field";
|
|
16
|
+
import { Radio as el } from "@base-ui/react/radio";
|
|
17
|
+
import { RadioGroup as tl } from "@base-ui/react/radio-group";
|
|
18
18
|
import { Select as Ee } from "@base-ui/react/select";
|
|
19
|
-
import { Slider as
|
|
20
|
-
import { Switch as
|
|
19
|
+
import { Slider as wt } from "@base-ui/react/slider";
|
|
20
|
+
import { Switch as Oa } from "@base-ui/react/switch";
|
|
21
21
|
import { Input as dh } from "@base-ui/react/input";
|
|
22
|
-
import { DirectionProvider as
|
|
23
|
-
import { Extension as
|
|
22
|
+
import { DirectionProvider as jr } from "@base-ui/react/direction-provider";
|
|
23
|
+
import { Extension as nl } from "@tiptap/core";
|
|
24
24
|
import { Bold as uh } from "@tiptap/extension-bold";
|
|
25
25
|
import { Document as on } from "@tiptap/extension-document";
|
|
26
26
|
import { HardBreak as hh } from "@tiptap/extension-hard-break";
|
|
@@ -29,17 +29,17 @@ import { Italic as gh } from "@tiptap/extension-italic";
|
|
|
29
29
|
import { Link as mh } from "@tiptap/extension-link";
|
|
30
30
|
import { Text as vh } from "@tiptap/extension-text";
|
|
31
31
|
import { TextAlign as fh } from "@tiptap/extension-text-align";
|
|
32
|
-
import { Color as bh, FontFamily as
|
|
32
|
+
import { Color as bh, FontFamily as rl, TextStyle as yh } from "@tiptap/extension-text-style";
|
|
33
33
|
import { Underline as Sh } from "@tiptap/extension-underline";
|
|
34
|
-
import { Placeholder as
|
|
35
|
-
import { Paragraph as
|
|
36
|
-
import { EditorContent as
|
|
34
|
+
import { Placeholder as Xr, UndoRedo as Ch } from "@tiptap/extensions";
|
|
35
|
+
import { Paragraph as al } from "@tiptap/extension-paragraph";
|
|
36
|
+
import { EditorContent as ol, useEditor as wh, useEditorState as xh } from "@tiptap/react";
|
|
37
37
|
import { Toolbar as Ve } from "@base-ui/react/toolbar";
|
|
38
38
|
import { Menu as pe } from "@base-ui/react/menu";
|
|
39
39
|
import { Toggle as kh } from "@base-ui/react/toggle";
|
|
40
40
|
import { Accordion as At } from "@base-ui/react/accordion";
|
|
41
41
|
import { Separator as Th } from "@base-ui/react/separator";
|
|
42
|
-
import './editable.css';var
|
|
42
|
+
import './editable.css';var il = (e, t) => {
|
|
43
43
|
if (e.scope !== "observation") return null;
|
|
44
44
|
const n = q(t.layers, e.layerId);
|
|
45
45
|
if (n === void 0) return null;
|
|
@@ -60,7 +60,7 @@ import './editable.css';var ol = (e, t) => {
|
|
|
60
60
|
layers: n.layers,
|
|
61
61
|
config: n.config
|
|
62
62
|
})));
|
|
63
|
-
return _(() =>
|
|
63
|
+
return _(() => il(e, t), [e, t]);
|
|
64
64
|
}, Ph = (e) => /* @__PURE__ */ a(M, {
|
|
65
65
|
viewBox: "0 0 18 18",
|
|
66
66
|
...e,
|
|
@@ -124,7 +124,7 @@ import './editable.css';var ol = (e, t) => {
|
|
|
124
124
|
strokeLinejoin: "round",
|
|
125
125
|
children: /* @__PURE__ */ a("path", { d: "m6 9 6 6 6-6" })
|
|
126
126
|
})
|
|
127
|
-
}),
|
|
127
|
+
}), ll = Je(null), sl = ({ labelId: e, controlId: t, children: n }) => {
|
|
128
128
|
const r = _(() => {
|
|
129
129
|
let o = null;
|
|
130
130
|
return {
|
|
@@ -133,18 +133,18 @@ import './editable.css';var ol = (e, t) => {
|
|
|
133
133
|
claimControlId: (i) => (o ??= i, o === i)
|
|
134
134
|
};
|
|
135
135
|
}, [e, t]);
|
|
136
|
-
return /* @__PURE__ */ a(
|
|
136
|
+
return /* @__PURE__ */ a(ll.Provider, {
|
|
137
137
|
value: r,
|
|
138
138
|
children: n
|
|
139
139
|
});
|
|
140
140
|
}, We = ({ id: e, ariaLabel: t, ariaLabelledBy: n }, r = !0) => {
|
|
141
|
-
const o = Ce(
|
|
141
|
+
const o = Ce(ll), i = Be(), [l] = Z(() => r ? o?.claimControlId(i) ?? !1 : !1), s = e ?? (l ? o?.controlId : void 0), c = n ?? (t === void 0 ? o?.labelId : void 0);
|
|
142
142
|
return {
|
|
143
143
|
...s !== void 0 && { id: s },
|
|
144
144
|
...t !== void 0 && { "aria-label": t },
|
|
145
145
|
...c !== void 0 && { "aria-labelledby": c }
|
|
146
146
|
};
|
|
147
|
-
}, _e = "_18ja6qr0",
|
|
147
|
+
}, _e = "_18ja6qr0", qr = ({ children: e }) => {
|
|
148
148
|
const { themeValues: t } = bn();
|
|
149
149
|
return /* @__PURE__ */ a(Ne, {
|
|
150
150
|
style: _(() => De({
|
|
@@ -154,11 +154,11 @@ import './editable.css';var ol = (e, t) => {
|
|
|
154
154
|
children: e
|
|
155
155
|
});
|
|
156
156
|
};
|
|
157
|
-
var
|
|
157
|
+
var cl = "srewh00", Rh = "srewh01", Nh = {
|
|
158
158
|
pointer: null,
|
|
159
159
|
focus: null,
|
|
160
160
|
last: "pointer"
|
|
161
|
-
},
|
|
161
|
+
}, dl = Je({
|
|
162
162
|
hovered: !1,
|
|
163
163
|
dismissed: !1,
|
|
164
164
|
reachedTooltipId: null,
|
|
@@ -201,13 +201,13 @@ var sl = "srewh00", Rh = "srewh01", Nh = {
|
|
|
201
201
|
m.pointerType !== "touch" && (r(!0), i(!1));
|
|
202
202
|
},
|
|
203
203
|
onPointerLeave: () => r(!1),
|
|
204
|
-
children: /* @__PURE__ */ a(
|
|
204
|
+
children: /* @__PURE__ */ a(dl.Provider, {
|
|
205
205
|
value: p,
|
|
206
206
|
children: t
|
|
207
207
|
})
|
|
208
208
|
});
|
|
209
|
-
},
|
|
210
|
-
const { hovered: l, dismissed: s, reachedTooltipId: c, reach: d, release: u, dismiss: h } = Ce(
|
|
209
|
+
}, vt = ({ label: e, checked: t = !1, side: n, delay: r, nameTrigger: o = !0, children: i }) => {
|
|
210
|
+
const { hovered: l, dismissed: s, reachedTooltipId: c, reach: d, release: u, dismiss: h } = Ce(dl), p = Be(), [g, m] = Z(!1), f = l ? !s && (c === p || t && c === null) : g;
|
|
211
211
|
B(() => () => {
|
|
212
212
|
u(p, "pointer"), u(p, "focus");
|
|
213
213
|
}, [p, u]);
|
|
@@ -229,12 +229,12 @@ var sl = "srewh00", Rh = "srewh01", Nh = {
|
|
|
229
229
|
}), /* @__PURE__ */ a(Te.Portal, {
|
|
230
230
|
container: Pe(),
|
|
231
231
|
className: _e,
|
|
232
|
-
children: /* @__PURE__ */ a(
|
|
232
|
+
children: /* @__PURE__ */ a(qr, { children: /* @__PURE__ */ a(Te.Positioner, {
|
|
233
233
|
side: n,
|
|
234
234
|
sideOffset: 6,
|
|
235
235
|
className: Rh,
|
|
236
236
|
children: /* @__PURE__ */ a(Te.Popup, {
|
|
237
|
-
className:
|
|
237
|
+
className: cl,
|
|
238
238
|
children: e
|
|
239
239
|
})
|
|
240
240
|
}) })
|
|
@@ -275,13 +275,13 @@ var zh = {
|
|
|
275
275
|
})
|
|
276
276
|
]
|
|
277
277
|
});
|
|
278
|
-
return c !== void 0 ? /* @__PURE__ */ a(
|
|
278
|
+
return c !== void 0 ? /* @__PURE__ */ a(vt, {
|
|
279
279
|
label: c,
|
|
280
280
|
side: l,
|
|
281
281
|
delay: s,
|
|
282
282
|
nameTrigger: !1,
|
|
283
283
|
children: y
|
|
284
|
-
}) : r === "icon" && h !== void 0 && (l !== void 0 || s !== void 0) ? /* @__PURE__ */ a(
|
|
284
|
+
}) : r === "icon" && h !== void 0 && (l !== void 0 || s !== void 0) ? /* @__PURE__ */ a(vt, {
|
|
285
285
|
label: h,
|
|
286
286
|
side: l,
|
|
287
287
|
delay: s,
|
|
@@ -301,7 +301,7 @@ var zh = {
|
|
|
301
301
|
focus: "color-mix(in srgb, transparent, var(--graphy-editor-text, var(--graphy-editor-default-text)) 55.00000000000001%)",
|
|
302
302
|
focusWidth: "2px",
|
|
303
303
|
shadow: "var(--graphy-editor-default-shadow)"
|
|
304
|
-
}, Gh = "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))",
|
|
304
|
+
}, Gh = "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))", ul = "_14ty2ng0", Ra = "_14ty2ng1", $h = "_14ty2ng2", Vh = "_14ty2ng3", hl = "_14ty2ng4", Wh = "_14ty2ng5", Uh = "_14ty2ng6", pl = "transparent", gl = (e) => e === "transparent" ? {
|
|
305
305
|
background: Gh,
|
|
306
306
|
border: `1px solid ${ve.border100}`
|
|
307
307
|
} : {
|
|
@@ -316,17 +316,17 @@ var zh = {
|
|
|
316
316
|
type: "button",
|
|
317
317
|
"aria-label": m === "transparent" ? u("graph.colorDropdown.transparent") : m,
|
|
318
318
|
className: Vh,
|
|
319
|
-
"data-active":
|
|
319
|
+
"data-active": ml(m, n),
|
|
320
320
|
disabled: l,
|
|
321
321
|
onMouseDown: (f) => f.preventDefault(),
|
|
322
322
|
onClick: () => r(m),
|
|
323
323
|
children: /* @__PURE__ */ a("span", {
|
|
324
|
-
className:
|
|
325
|
-
style:
|
|
324
|
+
className: hl,
|
|
325
|
+
style: gl(m)
|
|
326
326
|
})
|
|
327
327
|
}, m);
|
|
328
328
|
return /* @__PURE__ */ v("div", {
|
|
329
|
-
className:
|
|
329
|
+
className: ul,
|
|
330
330
|
children: [e !== void 0 && /* @__PURE__ */ a("div", {
|
|
331
331
|
className: "_14ty2ng1",
|
|
332
332
|
children: e
|
|
@@ -346,24 +346,24 @@ var zh = {
|
|
|
346
346
|
})]
|
|
347
347
|
})]
|
|
348
348
|
});
|
|
349
|
-
},
|
|
349
|
+
}, ml = (e, t) => t !== null && e.toLowerCase() === t.toLowerCase(), jh = "data-graphy-chart-chrome", Xh = "data-graphy-chart-menu", qh = { [Xh]: "" }, Pn = (e) => ({ [jh]: e }), Lt = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, ln = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, dr = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, ht = (e, t, n) => e instanceof Node && (t.contains(e) || Lt(e, n)), Yh = "cml7ha0", vl = Je(null), Zh = ({ children: e }) => {
|
|
350
350
|
const { chartId: t } = W(), [n] = Z(Pe), [r, o] = Z(null);
|
|
351
|
-
return n === null ? null : /* @__PURE__ */ v(K, { children: [
|
|
351
|
+
return n === null ? null : /* @__PURE__ */ v(K, { children: [Kr(/* @__PURE__ */ a("div", {
|
|
352
352
|
ref: o,
|
|
353
353
|
className: Yh,
|
|
354
354
|
...Pn(t)
|
|
355
|
-
}), n), /* @__PURE__ */ a(
|
|
355
|
+
}), n), /* @__PURE__ */ a(vl.Provider, {
|
|
356
356
|
value: r,
|
|
357
357
|
children: e
|
|
358
358
|
})] });
|
|
359
|
-
}, Ln = () => Ce(
|
|
359
|
+
}, Ln = () => Ce(vl), Jh = "_178jeit0", Qh = "_178jeit1 _14ty2ng3", ep = "_178jeit2 _14ty2ng4", tp = "_178jeit3", np = "_178jeit4", rp = "_178jeit5", ap = "_178jeit6", op = "_178jeit7", ip = {
|
|
360
360
|
side: "flip",
|
|
361
361
|
align: "shift",
|
|
362
362
|
fallbackAxisSide: "end"
|
|
363
363
|
}, lp = ({ value: e, onChange: t, onCommit: n, popupAttributes: r, variant: o = "default" }) => {
|
|
364
364
|
const i = R(), l = Ln(), [s, c] = Z(!1), d = (p) => {
|
|
365
365
|
c(p), p || n?.();
|
|
366
|
-
}, u = e !== null && Jc(e) ? e : "#000000", h =
|
|
366
|
+
}, u = e !== null && Jc(e) ? e : "#000000", h = li(u) ? u.toUpperCase() : "#000000";
|
|
367
367
|
return /* @__PURE__ */ v(le.Root, {
|
|
368
368
|
open: s,
|
|
369
369
|
onOpenChange: d,
|
|
@@ -373,17 +373,17 @@ var zh = {
|
|
|
373
373
|
"aria-label": i("graph.colorDropdown.pickCustom"),
|
|
374
374
|
children: /* @__PURE__ */ a("span", { className: ep })
|
|
375
375
|
}) : /* @__PURE__ */ v("div", {
|
|
376
|
-
className:
|
|
376
|
+
className: ul,
|
|
377
377
|
children: [/* @__PURE__ */ a("div", {
|
|
378
|
-
className:
|
|
378
|
+
className: Ra,
|
|
379
379
|
children: i("graph.colorDropdown.custom")
|
|
380
380
|
}), /* @__PURE__ */ v(le.Trigger, {
|
|
381
381
|
className: tp,
|
|
382
382
|
onMouseDown: (p) => p.preventDefault(),
|
|
383
383
|
"aria-label": i("graph.colorDropdown.pickCustom"),
|
|
384
384
|
children: [/* @__PURE__ */ a("span", {
|
|
385
|
-
className:
|
|
386
|
-
style:
|
|
385
|
+
className: hl,
|
|
386
|
+
style: gl(u)
|
|
387
387
|
}), /* @__PURE__ */ a("span", {
|
|
388
388
|
className: np,
|
|
389
389
|
children: h
|
|
@@ -406,7 +406,7 @@ var zh = {
|
|
|
406
406
|
...r,
|
|
407
407
|
children: [
|
|
408
408
|
/* @__PURE__ */ a("div", {
|
|
409
|
-
className:
|
|
409
|
+
className: Ra,
|
|
410
410
|
children: i("graph.colorDropdown.pickColor")
|
|
411
411
|
}),
|
|
412
412
|
/* @__PURE__ */ a(ch, {
|
|
@@ -426,7 +426,7 @@ var zh = {
|
|
|
426
426
|
}) })
|
|
427
427
|
})]
|
|
428
428
|
});
|
|
429
|
-
},
|
|
429
|
+
}, Na = (e) => /* @__PURE__ */ a(M, {
|
|
430
430
|
...e,
|
|
431
431
|
children: /* @__PURE__ */ v("g", {
|
|
432
432
|
stroke: "currentColor",
|
|
@@ -452,12 +452,12 @@ var zh = {
|
|
|
452
452
|
u.target.value = "", h !== void 0 && n(h);
|
|
453
453
|
}
|
|
454
454
|
});
|
|
455
|
-
return c ? /* @__PURE__ */ a(
|
|
455
|
+
return c ? /* @__PURE__ */ a(vt, {
|
|
456
456
|
label: e,
|
|
457
457
|
children: /* @__PURE__ */ v("label", {
|
|
458
458
|
htmlFor: s,
|
|
459
459
|
className: cp,
|
|
460
|
-
children: [/* @__PURE__ */ a(
|
|
460
|
+
children: [/* @__PURE__ */ a(Na, { size: "xs" }), d]
|
|
461
461
|
})
|
|
462
462
|
}) : /* @__PURE__ */ v("label", {
|
|
463
463
|
htmlFor: s,
|
|
@@ -465,7 +465,7 @@ var zh = {
|
|
|
465
465
|
children: [
|
|
466
466
|
/* @__PURE__ */ a("span", {
|
|
467
467
|
className: _h,
|
|
468
|
-
children: /* @__PURE__ */ a(
|
|
468
|
+
children: /* @__PURE__ */ a(Na, {})
|
|
469
469
|
}),
|
|
470
470
|
/* @__PURE__ */ a("span", {
|
|
471
471
|
className: Fh,
|
|
@@ -478,7 +478,7 @@ var zh = {
|
|
|
478
478
|
const e = Ce(In);
|
|
479
479
|
if (!e) throw new Error("An editing section must sit inside an <EditorPanel.Root> bound to a graph — pass it a `handle`, or render the panel inside a <GraphProvider>.");
|
|
480
480
|
return e;
|
|
481
|
-
},
|
|
481
|
+
}, fl = ({ children: e, onKeyDown: t, ...n }) => {
|
|
482
482
|
const r = Ce(In);
|
|
483
483
|
return /* @__PURE__ */ a("div", {
|
|
484
484
|
onKeyDown: (i) => {
|
|
@@ -489,7 +489,7 @@ var zh = {
|
|
|
489
489
|
...n,
|
|
490
490
|
children: e
|
|
491
491
|
});
|
|
492
|
-
},
|
|
492
|
+
}, bl = "keyboard", Mn = (e) => {
|
|
493
493
|
const t = X(!1), n = X(!1), r = () => {
|
|
494
494
|
t.current = !1, n.current && (n.current = !1, e?.());
|
|
495
495
|
};
|
|
@@ -525,18 +525,18 @@ var mp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, placeho
|
|
|
525
525
|
ariaLabel: h,
|
|
526
526
|
ariaLabelledBy: p
|
|
527
527
|
}), { commitUnlessHeldKey: f, gestureHandlers: y } = Mn(n);
|
|
528
|
-
return /* @__PURE__ */ a(
|
|
528
|
+
return /* @__PURE__ */ a(Ea.Root, {
|
|
529
529
|
className: hp,
|
|
530
530
|
value: e,
|
|
531
531
|
onValueChange: (k) => t(k),
|
|
532
532
|
onValueCommitted: (k, C) => {
|
|
533
|
-
f(C.reason ===
|
|
533
|
+
f(C.reason === bl);
|
|
534
534
|
},
|
|
535
535
|
min: r,
|
|
536
536
|
max: o,
|
|
537
537
|
step: i,
|
|
538
538
|
disabled: d,
|
|
539
|
-
children: /* @__PURE__ */ v(
|
|
539
|
+
children: /* @__PURE__ */ v(fl, {
|
|
540
540
|
className: pp,
|
|
541
541
|
"data-error": u === !0,
|
|
542
542
|
"data-disabled": d === !0 ? "" : void 0,
|
|
@@ -545,7 +545,7 @@ var mp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, placeho
|
|
|
545
545
|
className: "eh8dvc3",
|
|
546
546
|
children: s
|
|
547
547
|
}),
|
|
548
|
-
/* @__PURE__ */ a(
|
|
548
|
+
/* @__PURE__ */ a(Ea.Input, {
|
|
549
549
|
className: gp,
|
|
550
550
|
placeholder: l,
|
|
551
551
|
...y,
|
|
@@ -573,7 +573,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
|
|
|
573
573
|
ariaLabel: s,
|
|
574
574
|
ariaLabelledBy: c
|
|
575
575
|
}), h = i === "tile", p = i === "swatch", g = i === "icon", m = i === "track", f = i === "chip", { commitAfterChange: y, gestureHandlers: k } = Mn(r);
|
|
576
|
-
return /* @__PURE__ */ a(
|
|
576
|
+
return /* @__PURE__ */ a(tl, {
|
|
577
577
|
className: Ze(vp, Sp(o ?? e.length), g && "_1b7s5f9", m && "_1b7s5fb", f && "_1b7s5fd"),
|
|
578
578
|
value: t,
|
|
579
579
|
onValueChange: (C) => {
|
|
@@ -583,7 +583,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
|
|
|
583
583
|
disabled: l,
|
|
584
584
|
...u,
|
|
585
585
|
children: e.map((C) => {
|
|
586
|
-
const w = /* @__PURE__ */ v(
|
|
586
|
+
const w = /* @__PURE__ */ v(el.Root, {
|
|
587
587
|
value: C.value,
|
|
588
588
|
disabled: C.disabled,
|
|
589
589
|
className: Ze(fp, p && "_1b7s5f8", g && "_1b7s5fa", m && "_1b7s5fc", f && "_1b7s5fe"),
|
|
@@ -599,7 +599,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
|
|
|
599
599
|
}, C.value);
|
|
600
600
|
if (!p && !g && !f) return w;
|
|
601
601
|
const P = (g || f) && C.value === t;
|
|
602
|
-
return /* @__PURE__ */ a(
|
|
602
|
+
return /* @__PURE__ */ a(vt, {
|
|
603
603
|
label: C.label,
|
|
604
604
|
checked: P,
|
|
605
605
|
children: w
|
|
@@ -621,7 +621,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
|
|
|
621
621
|
default:
|
|
622
622
|
return it[6];
|
|
623
623
|
}
|
|
624
|
-
},
|
|
624
|
+
}, yl = (e) => /* @__PURE__ */ a(M, {
|
|
625
625
|
...e,
|
|
626
626
|
children: /* @__PURE__ */ a("g", {
|
|
627
627
|
stroke: "currentColor",
|
|
@@ -630,7 +630,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
|
|
|
630
630
|
strokeLinejoin: "round",
|
|
631
631
|
children: /* @__PURE__ */ a("path", { d: "M20 6 9 17l-5-5" })
|
|
632
632
|
})
|
|
633
|
-
}), Cp = "_1g5x15w0 uz3g760", wp = "_1g5x15w1", xp = "_1g5x15w2",
|
|
633
|
+
}), Cp = "_1g5x15w0 uz3g760", wp = "_1g5x15w1", xp = "_1g5x15w2", Da = "_1g5x15w3", kp = "_1g5x15w4", Tp = "_1g5x15w5", Ap = "_1g5x15w6", Pp = "_1g5x15w7";
|
|
634
634
|
var Lp = ({ options: e, value: t, onChange: n, placeholder: r, disabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
|
|
635
635
|
const d = We({
|
|
636
636
|
id: c,
|
|
@@ -653,7 +653,7 @@ var Lp = ({ options: e, value: t, onChange: n, placeholder: r, disabled: o, hasE
|
|
|
653
653
|
className: wp,
|
|
654
654
|
children: (h) => Ip(e, h, r)
|
|
655
655
|
}), /* @__PURE__ */ a(Ee.Icon, {
|
|
656
|
-
className:
|
|
656
|
+
className: Da,
|
|
657
657
|
children: /* @__PURE__ */ a(Dt, { size: "sm" })
|
|
658
658
|
})]
|
|
659
659
|
}), /* @__PURE__ */ a(Ee.Portal, {
|
|
@@ -679,8 +679,8 @@ var Lp = ({ options: e, value: t, onChange: n, placeholder: r, disabled: o, hasE
|
|
|
679
679
|
})]
|
|
680
680
|
}),
|
|
681
681
|
/* @__PURE__ */ a(Ee.ItemIndicator, {
|
|
682
|
-
className:
|
|
683
|
-
children: /* @__PURE__ */ a(
|
|
682
|
+
className: Da,
|
|
683
|
+
children: /* @__PURE__ */ a(yl, { size: "sm" })
|
|
684
684
|
})
|
|
685
685
|
]
|
|
686
686
|
}, h.value))
|
|
@@ -699,22 +699,22 @@ var Fp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, suffix:
|
|
|
699
699
|
}, !1), g = zp(e, l, s), { commitUnlessHeldKey: m, gestureHandlers: f } = Mn(n);
|
|
700
700
|
return /* @__PURE__ */ v("div", {
|
|
701
701
|
className: Ep,
|
|
702
|
-
children: [/* @__PURE__ */ a(
|
|
702
|
+
children: [/* @__PURE__ */ a(wt.Root, {
|
|
703
703
|
className: Op,
|
|
704
704
|
value: e,
|
|
705
705
|
onValueChange: (y) => t(y),
|
|
706
706
|
onValueCommitted: (y, k) => {
|
|
707
|
-
m(k.reason ===
|
|
707
|
+
m(k.reason === bl);
|
|
708
708
|
},
|
|
709
709
|
min: r,
|
|
710
710
|
max: o,
|
|
711
711
|
step: i,
|
|
712
712
|
disabled: d,
|
|
713
|
-
children: /* @__PURE__ */ a(
|
|
713
|
+
children: /* @__PURE__ */ a(wt.Control, {
|
|
714
714
|
className: Rp,
|
|
715
|
-
children: /* @__PURE__ */ v(
|
|
715
|
+
children: /* @__PURE__ */ v(wt.Track, {
|
|
716
716
|
className: Np,
|
|
717
|
-
children: [/* @__PURE__ */ a(
|
|
717
|
+
children: [/* @__PURE__ */ a(wt.Indicator, { className: Dp }), /* @__PURE__ */ a(wt.Thumb, {
|
|
718
718
|
className: _p,
|
|
719
719
|
...f,
|
|
720
720
|
...p
|
|
@@ -732,13 +732,13 @@ var Fp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, suffix:
|
|
|
732
732
|
ariaLabel: r,
|
|
733
733
|
ariaLabelledBy: o
|
|
734
734
|
});
|
|
735
|
-
return /* @__PURE__ */ a(
|
|
735
|
+
return /* @__PURE__ */ a(Oa.Root, {
|
|
736
736
|
checked: e,
|
|
737
737
|
onCheckedChange: (s) => t(s),
|
|
738
738
|
disabled: n,
|
|
739
739
|
className: Bp,
|
|
740
740
|
...l,
|
|
741
|
-
children: /* @__PURE__ */ a(
|
|
741
|
+
children: /* @__PURE__ */ a(Oa.Thumb, { className: Hp })
|
|
742
742
|
});
|
|
743
743
|
}, $p = "uz3g761", Vp = "tpcnun0 uz3g760", Wp = ({ value: e, onChange: t, onCommit: n, placeholder: r, disabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
|
|
744
744
|
const d = We({
|
|
@@ -746,7 +746,7 @@ var Fp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, suffix:
|
|
|
746
746
|
ariaLabel: l,
|
|
747
747
|
ariaLabelledBy: s
|
|
748
748
|
});
|
|
749
|
-
return /* @__PURE__ */ a(
|
|
749
|
+
return /* @__PURE__ */ a(fl, {
|
|
750
750
|
className: Vp,
|
|
751
751
|
"data-error": i === !0,
|
|
752
752
|
children: /* @__PURE__ */ a(dh, {
|
|
@@ -761,13 +761,13 @@ var Fp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, suffix:
|
|
|
761
761
|
})
|
|
762
762
|
});
|
|
763
763
|
}, Up = "cnu9yl0", Kp = "cnu9yl1";
|
|
764
|
-
var
|
|
764
|
+
var Sl = ({ options: e, value: t, onChange: n, onCommit: r, itemLayout: o = "inline", hasEqualWidths: i = !1, disabled: l, ariaLabel: s, ariaLabelledBy: c, id: d }) => {
|
|
765
765
|
const u = We({
|
|
766
766
|
id: d,
|
|
767
767
|
ariaLabel: s,
|
|
768
768
|
ariaLabelledBy: c
|
|
769
769
|
}), h = o === "stacked", { commitAfterChange: p, gestureHandlers: g } = Mn(r);
|
|
770
|
-
return /* @__PURE__ */ a(
|
|
770
|
+
return /* @__PURE__ */ a(tl, {
|
|
771
771
|
className: Up,
|
|
772
772
|
value: t,
|
|
773
773
|
onValueChange: (m) => {
|
|
@@ -777,28 +777,28 @@ var yl = ({ options: e, value: t, onChange: n, onCommit: r, itemLayout: o = "inl
|
|
|
777
777
|
disabled: l,
|
|
778
778
|
...u,
|
|
779
779
|
children: e.map((m) => {
|
|
780
|
-
const f = jp(m, h), y = /* @__PURE__ */ v(
|
|
780
|
+
const f = jp(m, h), y = /* @__PURE__ */ v(el.Root, {
|
|
781
781
|
value: m.value,
|
|
782
782
|
disabled: m.disabled,
|
|
783
783
|
className: Ze(Kp, h && "cnu9yl3", i && "cnu9yl2"),
|
|
784
784
|
"aria-label": f,
|
|
785
|
-
children: [m.icon,
|
|
785
|
+
children: [m.icon, Cl(m, h) && /* @__PURE__ */ a("span", {
|
|
786
786
|
className: "cnu9yl4",
|
|
787
787
|
children: m.label
|
|
788
788
|
})]
|
|
789
789
|
}, m.value);
|
|
790
|
-
return f === void 0 ? y : /* @__PURE__ */ a(
|
|
790
|
+
return f === void 0 ? y : /* @__PURE__ */ a(vt, {
|
|
791
791
|
label: f,
|
|
792
792
|
checked: m.value === t,
|
|
793
793
|
children: y
|
|
794
794
|
}, m.value);
|
|
795
795
|
})
|
|
796
796
|
});
|
|
797
|
-
},
|
|
798
|
-
if (!
|
|
797
|
+
}, Cl = (e, t) => e.icon === void 0 || t, jp = (e, t) => {
|
|
798
|
+
if (!Cl(e, t))
|
|
799
799
|
return e.label;
|
|
800
800
|
}, Xp = {
|
|
801
|
-
ToggleGroup:
|
|
801
|
+
ToggleGroup: Sl,
|
|
802
802
|
Switch: Gp,
|
|
803
803
|
Slider: Fp,
|
|
804
804
|
RadioGrid: yp,
|
|
@@ -840,22 +840,22 @@ var yl = ({ options: e, value: t, onChange: n, onCommit: r, itemLayout: o = "inl
|
|
|
840
840
|
value: r,
|
|
841
841
|
children: t
|
|
842
842
|
});
|
|
843
|
-
}, H = () => Ce(ur),
|
|
843
|
+
}, H = () => Ce(ur), _a = {
|
|
844
844
|
stack: "pr583x0",
|
|
845
845
|
grid: "pr583x1"
|
|
846
|
-
},
|
|
846
|
+
}, Fa = "pr583x2", Yp = {
|
|
847
847
|
plain: "pr583x4 pr583x3",
|
|
848
848
|
withIcon: "pr583x5 pr583x3"
|
|
849
849
|
}, L = ({ label: e, layout: t = "grid", icon: n, children: r }) => {
|
|
850
850
|
const o = Be(), i = Be();
|
|
851
851
|
return e === void 0 ? /* @__PURE__ */ a(cr, {
|
|
852
|
-
className:
|
|
852
|
+
className: _a[t],
|
|
853
853
|
children: /* @__PURE__ */ a("div", {
|
|
854
|
-
className:
|
|
854
|
+
className: Fa,
|
|
855
855
|
children: r
|
|
856
856
|
})
|
|
857
857
|
}) : /* @__PURE__ */ v(cr, {
|
|
858
|
-
className:
|
|
858
|
+
className: _a[t],
|
|
859
859
|
children: [/* @__PURE__ */ v("label", {
|
|
860
860
|
id: o,
|
|
861
861
|
htmlFor: i,
|
|
@@ -865,26 +865,26 @@ var yl = ({ options: e, value: t, onChange: n, onCommit: r, itemLayout: o = "inl
|
|
|
865
865
|
children: n
|
|
866
866
|
}), e]
|
|
867
867
|
}), /* @__PURE__ */ a("div", {
|
|
868
|
-
className:
|
|
869
|
-
children: /* @__PURE__ */ a(
|
|
868
|
+
className: Fa,
|
|
869
|
+
children: /* @__PURE__ */ a(sl, {
|
|
870
870
|
labelId: o,
|
|
871
871
|
controlId: i,
|
|
872
872
|
children: r
|
|
873
873
|
})
|
|
874
874
|
})]
|
|
875
875
|
});
|
|
876
|
-
},
|
|
876
|
+
}, wl = ({ target: e }) => {
|
|
877
877
|
const t = Et();
|
|
878
878
|
return t === null ? null : /* @__PURE__ */ a(Zp, {
|
|
879
879
|
graph: t,
|
|
880
880
|
axis: e.axis
|
|
881
881
|
});
|
|
882
882
|
};
|
|
883
|
-
|
|
883
|
+
wl.hasRows = (e, { scene: t }) => t.coordSystem.type !== "polar";
|
|
884
884
|
var Zp = ({ graph: e, axis: t }) => {
|
|
885
885
|
const n = Q(e), r = R(), { NumberField: o, TextField: i, ToggleGroup: l } = H(), s = n?.guides.axes.find((x) => x.scaledAesthetic === t);
|
|
886
886
|
if (B(() => () => e.commands.commit(), [e.commands]), n === null || s?.geometry !== "linear") return null;
|
|
887
|
-
const c = !s.visible, d = s.visible || s.showGrid, u = n.scales[t]?.spec.scaleType, h = u === "continuous" || u === "datetime", p = n.guides.legends.drawn.some((x) => x.position === "left" || x.position === "right"), g = t !== "x" && u === "continuous" && (s.position === "left" || s.position === "right") && !p, m = t === "x" ? void 0 : n.scales[t]?.spec, f = m?.scaleType === "continuous" ? m : void 0, y = f !== void 0 && (s.position === "left" || s.position === "right") && !
|
|
887
|
+
const c = !s.visible, d = s.visible || s.showGrid, u = n.scales[t]?.spec.scaleType, h = u === "continuous" || u === "datetime", p = n.guides.legends.drawn.some((x) => x.position === "left" || x.position === "right"), g = t !== "x" && u === "continuous" && (s.position === "left" || s.position === "right") && !p, m = t === "x" ? void 0 : n.scales[t]?.spec, f = m?.scaleType === "continuous" ? m : void 0, y = f !== void 0 && (s.position === "left" || s.position === "right") && !Ki(n, t), k = f?.transform === "log" ? "log" : "linear", C = y && f.transform !== "log", w = f?.domainMin ?? null, P = f !== void 0 && (s.position === "left" || s.position === "right") && f.transform !== "log", T = f?.domainMax ?? null, I = n.config.axes[t]?.label ?? s.label ?? "", N = (x) => {
|
|
888
888
|
const O = t === "ySecondary" ? {
|
|
889
889
|
axis: t,
|
|
890
890
|
label: x
|
|
@@ -892,7 +892,7 @@ var Zp = ({ graph: e, axis: t }) => {
|
|
|
892
892
|
axis: t,
|
|
893
893
|
label: x
|
|
894
894
|
};
|
|
895
|
-
e.commands.dispatch(new
|
|
895
|
+
e.commands.dispatch(new xi(O), { transient: !0 });
|
|
896
896
|
};
|
|
897
897
|
return /* @__PURE__ */ v(K, { children: [
|
|
898
898
|
/* @__PURE__ */ a(L, {
|
|
@@ -921,7 +921,7 @@ var Zp = ({ graph: e, axis: t }) => {
|
|
|
921
921
|
}],
|
|
922
922
|
onChange: (x) => {
|
|
923
923
|
const O = x === "edges" ? "edges" : "auto";
|
|
924
|
-
e.commands.dispatch(new
|
|
924
|
+
e.commands.dispatch(new Ti({
|
|
925
925
|
axis: t,
|
|
926
926
|
tickMode: O,
|
|
927
927
|
keepSecondaryAxis: !0
|
|
@@ -946,7 +946,7 @@ var Zp = ({ graph: e, axis: t }) => {
|
|
|
946
946
|
onChange: (x) => {
|
|
947
947
|
if (x !== "left" && x !== "right") return;
|
|
948
948
|
const O = t === "y" ? x : x === "left" ? "right" : "left";
|
|
949
|
-
e.commands.dispatch(new
|
|
949
|
+
e.commands.dispatch(new ki({
|
|
950
950
|
axis: "y",
|
|
951
951
|
position: O
|
|
952
952
|
}));
|
|
@@ -967,7 +967,7 @@ var Zp = ({ graph: e, axis: t }) => {
|
|
|
967
967
|
icon: /* @__PURE__ */ a(Mh, {})
|
|
968
968
|
}],
|
|
969
969
|
onChange: (x) => {
|
|
970
|
-
e.commands.dispatch(new
|
|
970
|
+
e.commands.dispatch(new Di({
|
|
971
971
|
scaledAesthetic: t,
|
|
972
972
|
transform: x === "log" ? "log" : "linear"
|
|
973
973
|
}));
|
|
@@ -1021,7 +1021,7 @@ var Zp = ({ graph: e, axis: t }) => {
|
|
|
1021
1021
|
})
|
|
1022
1022
|
});
|
|
1023
1023
|
}, eg = 6, He = ({ target: e }) => {
|
|
1024
|
-
const { commands: t, findGeom: n } = W(), r = R(), o = ee(), i = F((u) => u), l =
|
|
1024
|
+
const { commands: t, findGeom: n } = W(), r = R(), o = ee(), i = F((u) => u), l = kl(e, i, n);
|
|
1025
1025
|
B(() => () => t.commit(), [t]);
|
|
1026
1026
|
const s = _(() => $u({
|
|
1027
1027
|
readers: o,
|
|
@@ -1043,14 +1043,14 @@ var Zp = ({ graph: e, axis: t }) => {
|
|
|
1043
1043
|
...p === void 0 ? {} : { part: p }
|
|
1044
1044
|
}), h ? { transient: !0 } : void 0);
|
|
1045
1045
|
}, d = l[0]?.property === "stroke" ? r("editor.overlayMenu.lineColor") : r("editor.overlayMenu.fillColor");
|
|
1046
|
-
return /* @__PURE__ */ a(
|
|
1046
|
+
return /* @__PURE__ */ a(xl, {
|
|
1047
1047
|
label: d,
|
|
1048
|
-
palette:
|
|
1048
|
+
palette: Xi(i.scales.color),
|
|
1049
1049
|
selectedColor: s,
|
|
1050
1050
|
paint: c,
|
|
1051
1051
|
commit: () => t.commit()
|
|
1052
1052
|
});
|
|
1053
|
-
},
|
|
1053
|
+
}, xl = ({ label: e, palette: t, selectedColor: n, paint: r, commit: o }) => {
|
|
1054
1054
|
const { ColorSwatches: i, CustomColor: l } = H();
|
|
1055
1055
|
return /* @__PURE__ */ a(L, {
|
|
1056
1056
|
label: e,
|
|
@@ -1068,15 +1068,15 @@ var Zp = ({ graph: e, axis: t }) => {
|
|
|
1068
1068
|
})
|
|
1069
1069
|
});
|
|
1070
1070
|
};
|
|
1071
|
-
He.hasRows = (e, { scene: t, findGeom: n }) =>
|
|
1072
|
-
var
|
|
1071
|
+
He.hasRows = (e, { scene: t, findGeom: n }) => kl(e, t, n) !== null;
|
|
1072
|
+
var kl = (e, t, n) => {
|
|
1073
1073
|
if (q(t.layers, e.layerId) === void 0) return null;
|
|
1074
1074
|
const r = Vu({
|
|
1075
1075
|
layers: t.layers,
|
|
1076
1076
|
target: e
|
|
1077
1077
|
});
|
|
1078
1078
|
return An(t.spec, e, n, r);
|
|
1079
|
-
}, tg = (e, t) => t === null || e.some((n) =>
|
|
1079
|
+
}, tg = (e, t) => t === null || e.some((n) => ml(n, t)) ? e : [...e, t], Hn = [
|
|
1080
1080
|
{
|
|
1081
1081
|
name: "narrow",
|
|
1082
1082
|
width: 0.4
|
|
@@ -1089,10 +1089,10 @@ var xl = (e, t, n) => {
|
|
|
1089
1089
|
name: "wide",
|
|
1090
1090
|
width: 0.95
|
|
1091
1091
|
}
|
|
1092
|
-
],
|
|
1093
|
-
const t = F((p) => p), n = Se(), r = R(), { ToggleGroup: o } = H(), i = q(t.spec.layers, e.layerId), l =
|
|
1092
|
+
], Tl = ({ target: e }) => {
|
|
1093
|
+
const t = F((p) => p), n = Se(), r = R(), { ToggleGroup: o } = H(), i = q(t.spec.layers, e.layerId), l = bt(i, "bar") ? i : null, s = t.coordSystem.type === "polar" && t.coordSystem.bandAxis === null, c = (p) => {
|
|
1094
1094
|
const g = Hn.find(({ name: m }) => m === p);
|
|
1095
|
-
g !== void 0 && n.dispatch(new
|
|
1095
|
+
g !== void 0 && n.dispatch(new Ai({
|
|
1096
1096
|
layerId: e.layerId,
|
|
1097
1097
|
width: g.width
|
|
1098
1098
|
}));
|
|
@@ -1100,7 +1100,7 @@ var xl = (e, t, n) => {
|
|
|
1100
1100
|
value: p,
|
|
1101
1101
|
label: r(`editor.graphPanel.barSection.widths.${p}`),
|
|
1102
1102
|
icon: /* @__PURE__ */ a(Qp, { barWidth: p })
|
|
1103
|
-
})), u = l === null ? null :
|
|
1103
|
+
})), u = l === null ? null : qi(l.params, t.coordSystem.type), h = Hn.find(({ width: p }) => p === u)?.name ?? "";
|
|
1104
1104
|
return /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(He, { target: e }), l !== null && !s ? /* @__PURE__ */ a(L, {
|
|
1105
1105
|
label: r("editor.graphPanel.barSection.thickness"),
|
|
1106
1106
|
children: /* @__PURE__ */ a(o, {
|
|
@@ -1110,7 +1110,7 @@ var xl = (e, t, n) => {
|
|
|
1110
1110
|
})
|
|
1111
1111
|
}) : null] });
|
|
1112
1112
|
};
|
|
1113
|
-
|
|
1113
|
+
Tl.hasRows = He.hasRows;
|
|
1114
1114
|
var ng = {
|
|
1115
1115
|
smooth: "M2 13C6 13 7 5 10 5s4 6 6 6",
|
|
1116
1116
|
linear: "M2 13l5-8 4 6 5-4"
|
|
@@ -1138,13 +1138,13 @@ var ng = {
|
|
|
1138
1138
|
strokeLinecap: "round",
|
|
1139
1139
|
strokeLinejoin: "round"
|
|
1140
1140
|
})
|
|
1141
|
-
}),
|
|
1141
|
+
}), za = {
|
|
1142
1142
|
supportsDataLabels: !1,
|
|
1143
1143
|
supportsPercentages: !1,
|
|
1144
1144
|
supportsStackTotals: !1,
|
|
1145
1145
|
supportsCategoryLabels: !1
|
|
1146
|
-
},
|
|
1147
|
-
if (!n.hasCapability(e.geom, t) || ig(e)) return
|
|
1146
|
+
}, Al = (e, t, n) => {
|
|
1147
|
+
if (!n.hasCapability(e.geom, t) || ig(e)) return za;
|
|
1148
1148
|
const { showDataLabels: r } = e.dataLabels, o = e.geom === "bar", i = t === "polar";
|
|
1149
1149
|
return {
|
|
1150
1150
|
supportsDataLabels: !0,
|
|
@@ -1155,7 +1155,7 @@ var ng = {
|
|
|
1155
1155
|
}, ig = (e) => {
|
|
1156
1156
|
const t = Oe(e.mapping.color);
|
|
1157
1157
|
return e.geom === "tile" && t !== null && e.data.getType(t) === "categorical";
|
|
1158
|
-
},
|
|
1158
|
+
}, Pl = (e, t) => {
|
|
1159
1159
|
switch (t) {
|
|
1160
1160
|
case "gap":
|
|
1161
1161
|
return e("editor.graphPanel.treatEmptyValues.leaveGap.label");
|
|
@@ -1171,10 +1171,10 @@ var hr = [
|
|
|
1171
1171
|
"gap",
|
|
1172
1172
|
"zero",
|
|
1173
1173
|
"connect"
|
|
1174
|
-
],
|
|
1174
|
+
], Yr = (e, t, n) => {
|
|
1175
1175
|
const r = q(e.spec.layers, n);
|
|
1176
|
-
if (!
|
|
1177
|
-
const o = e.coordSystem.type === "polar", i =
|
|
1176
|
+
if (!bt(r, "line", "area")) return null;
|
|
1177
|
+
const o = e.coordSystem.type === "polar", i = gt(r.geom, r.id), l = xe(e.spec), s = e.spec.styles.overrides, c = Ia(s, i, l), d = Ia(Xu(s, i, l), i, l), u = typeof c?.strokeWidth == "number" ? c.strokeWidth : null, h = lg(r, e.spec.layers), p = o ? [] : cg(r), g = p.length > 1, m = r.geom === "line" && !o, f = m ? ug(e, t, r) : 0;
|
|
1178
1178
|
return {
|
|
1179
1179
|
layerId: r.id,
|
|
1180
1180
|
showPoints: h !== void 0 && sg(e, t, h.id),
|
|
@@ -1188,7 +1188,7 @@ var hr = [
|
|
|
1188
1188
|
missingValues: g ? r.params.missingValues : null,
|
|
1189
1189
|
missingValueOptions: g ? p : []
|
|
1190
1190
|
};
|
|
1191
|
-
}, lg = (e, t) => or(t, "point").find((n) =>
|
|
1191
|
+
}, lg = (e, t) => or(t, "point").find((n) => Ui(n, [e])), sg = (e, t, n) => {
|
|
1192
1192
|
const r = q(e.layers, n);
|
|
1193
1193
|
if (r?.geom !== "point") return !1;
|
|
1194
1194
|
const o = t.geom.point(r);
|
|
@@ -1316,7 +1316,7 @@ var hr = [
|
|
|
1316
1316
|
})
|
|
1317
1317
|
]
|
|
1318
1318
|
})]
|
|
1319
|
-
}),
|
|
1319
|
+
}), Ll = (e) => /* @__PURE__ */ a(M, {
|
|
1320
1320
|
viewBox: "0 0 16 16",
|
|
1321
1321
|
...e,
|
|
1322
1322
|
children: /* @__PURE__ */ v("g", {
|
|
@@ -1957,7 +1957,7 @@ var hr = [
|
|
|
1957
1957
|
},
|
|
1958
1958
|
{
|
|
1959
1959
|
name: "line",
|
|
1960
|
-
icon:
|
|
1960
|
+
icon: Ll,
|
|
1961
1961
|
summary: {
|
|
1962
1962
|
coordType: "cartesian",
|
|
1963
1963
|
geom: "line",
|
|
@@ -2076,15 +2076,15 @@ var hr = [
|
|
|
2076
2076
|
position: "identity"
|
|
2077
2077
|
}
|
|
2078
2078
|
}
|
|
2079
|
-
], Rg = 0.05,
|
|
2079
|
+
], Rg = 0.05, Il = (e, t) => be(e) ? ou(t) : e.geom === "tile" ? iu(t) : !0, sn = (e) => e === null ? null : It.find((t) => Ng(t.summary, e)) ?? null, Ml = (e, t) => t === null || be(e) ? e : e.position === "dodge" && El(t) ? {
|
|
2080
2080
|
...e,
|
|
2081
2081
|
position: "identity"
|
|
2082
2082
|
} : e.coordType !== "polar" || !cn(e.innerRadius) || t.coordType !== "polar" || !cn(t.innerRadius) ? e : {
|
|
2083
2083
|
...e,
|
|
2084
2084
|
innerRadius: t.innerRadius
|
|
2085
|
-
},
|
|
2085
|
+
}, El = (e) => !be(e) && e.geom === "bar" && e.position === "identity", Ng = (e, t) => {
|
|
2086
2086
|
if (be(e) || be(t)) return be(e) && be(t);
|
|
2087
|
-
const n = e.position === t.position || e.position === "dodge" &&
|
|
2087
|
+
const n = e.position === t.position || e.position === "dodge" && El(t);
|
|
2088
2088
|
return e.coordType !== t.coordType || e.geom !== t.geom || !n ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && cn(e.innerRadius) === cn(t.innerRadius);
|
|
2089
2089
|
}, cn = (e) => e >= Rg;
|
|
2090
2090
|
var Dg = "_1a90obs1", _g = [
|
|
@@ -2108,7 +2108,7 @@ var Dg = "_1a90obs1", _g = [
|
|
|
2108
2108
|
coordType: "cartesian",
|
|
2109
2109
|
comboType: "lines"
|
|
2110
2110
|
},
|
|
2111
|
-
icon:
|
|
2111
|
+
icon: Ll
|
|
2112
2112
|
}
|
|
2113
2113
|
], Fg = [
|
|
2114
2114
|
["column", "column"],
|
|
@@ -2140,16 +2140,16 @@ var Dg = "_1a90obs1", _g = [
|
|
|
2140
2140
|
}, [l]);
|
|
2141
2141
|
const d = Tn(e);
|
|
2142
2142
|
if (d === null) return null;
|
|
2143
|
-
const u = Wg(d), h = dn(d), p = sn(d), g = u ?? p, m = r(g === null ? "editor.overlayMenu.customChartType" : `editor.graphTypes.${g.name}`), f = (u === void 0 ? p :
|
|
2144
|
-
n.dispatch(new
|
|
2143
|
+
const u = Wg(d), h = dn(d), p = sn(d), g = u ?? p, m = r(g === null ? "editor.overlayMenu.customChartType" : `editor.graphTypes.${g.name}`), f = (u === void 0 ? p : Ha(u, h))?.icon, y = u !== void 0 && u.arrangements.length > 1, k = y && (t || u.name === "combo"), C = () => s(!l), w = ({ summary: I }) => {
|
|
2144
|
+
n.dispatch(new zr(Ml(I, d)), { transient: !0 });
|
|
2145
2145
|
}, P = (I) => {
|
|
2146
|
-
const N =
|
|
2147
|
-
N !== void 0 && w(
|
|
2148
|
-
}, T =
|
|
2146
|
+
const N = Ba.find((x) => x.name === I);
|
|
2147
|
+
N !== void 0 && w(Ha(N, y ? h : null));
|
|
2148
|
+
}, T = Ba.map(({ name: I, arrangements: [N] }) => ({
|
|
2149
2149
|
value: I,
|
|
2150
2150
|
label: r(`editor.graphTypes.${I}`),
|
|
2151
2151
|
icon: /* @__PURE__ */ a(N.icon, { size: "md" }),
|
|
2152
|
-
disabled: !
|
|
2152
|
+
disabled: !Il(N.summary, e)
|
|
2153
2153
|
}));
|
|
2154
2154
|
return /* @__PURE__ */ v(K, { children: [
|
|
2155
2155
|
/* @__PURE__ */ a(L, {
|
|
@@ -2189,13 +2189,13 @@ var Dg = "_1a90obs1", _g = [
|
|
|
2189
2189
|
onCommit: n.commit
|
|
2190
2190
|
})
|
|
2191
2191
|
] });
|
|
2192
|
-
},
|
|
2192
|
+
}, Ol = (e, t) => be(e) || be(t) ? be(e) && be(t) : e.coordType === "polar" ? sn(e) === sn(t) : e.coordType === t.coordType && e.geom === t.geom, Rl = Fg.flatMap(([e, t]) => {
|
|
2193
2193
|
const n = It.find((r) => r.name === t);
|
|
2194
2194
|
return n === void 0 ? [] : [{
|
|
2195
2195
|
name: e,
|
|
2196
|
-
arrangements: [n, ...[...It, ..._g].filter((r) => r !== n &&
|
|
2196
|
+
arrangements: [n, ...[...It, ..._g].filter((r) => r !== n && Ol(n.summary, r.summary))]
|
|
2197
2197
|
}];
|
|
2198
|
-
}),
|
|
2198
|
+
}), Ba = Rl.filter(({ name: e }) => e !== "combo"), $g = ({ type: e, arrangement: t, onPick: n, onCommit: r }) => {
|
|
2199
2199
|
const o = R(), { ToggleGroup: i } = H(), l = e.arrangements.map(({ summary: c, icon: d }) => {
|
|
2200
2200
|
const u = dn(c);
|
|
2201
2201
|
return {
|
|
@@ -2219,36 +2219,36 @@ var Dg = "_1a90obs1", _g = [
|
|
|
2219
2219
|
})
|
|
2220
2220
|
})
|
|
2221
2221
|
});
|
|
2222
|
-
}, Vg = (e) => e instanceof Element && e.closest('[role="radio"]:not([aria-disabled="true"])') !== null, dn = (e) => be(e) ? Hg[e.comboType] : Bg[e.position],
|
|
2222
|
+
}, Vg = (e) => e instanceof Element && e.closest('[role="radio"]:not([aria-disabled="true"])') !== null, dn = (e) => be(e) ? Hg[e.comboType] : Bg[e.position], Ha = (e, t) => e.arrangements.find(({ summary: n }) => dn(n) === t) ?? e.arrangements[0], Wg = (e) => Rl.find(({ arrangements: [t] }) => Ol(t.summary, e)), Ug = () => {
|
|
2223
2223
|
const e = F((s) => s.scales.color), t = Se(), n = R(), [r, o] = Z(null);
|
|
2224
2224
|
B(() => () => t.commit(), [t]);
|
|
2225
|
-
const i =
|
|
2225
|
+
const i = Xi(e), l = Ru(e, r === null ? i : [r, ...i]);
|
|
2226
2226
|
return (l === null ? [{
|
|
2227
2227
|
label: n("editor.overlayMenu.lowColor"),
|
|
2228
|
-
color:
|
|
2229
|
-
buildRange: (s) =>
|
|
2228
|
+
color: Ma(e, "low"),
|
|
2229
|
+
buildRange: (s) => La(e, "low", s)
|
|
2230
2230
|
}, {
|
|
2231
2231
|
label: n("editor.overlayMenu.highColor"),
|
|
2232
|
-
color:
|
|
2233
|
-
buildRange: (s) =>
|
|
2232
|
+
color: Ma(e, "high"),
|
|
2233
|
+
buildRange: (s) => La(e, "high", s)
|
|
2234
2234
|
}] : [{
|
|
2235
2235
|
label: n("editor.overlayMenu.fillColor"),
|
|
2236
2236
|
color: l,
|
|
2237
2237
|
buildRange: (s) => tu(e, s)
|
|
2238
|
-
}]).map(({ label: s, color: c, buildRange: d }) => c === null ? null : /* @__PURE__ */ a(
|
|
2238
|
+
}]).map(({ label: s, color: c, buildRange: d }) => c === null ? null : /* @__PURE__ */ a(xl, {
|
|
2239
2239
|
label: s,
|
|
2240
2240
|
palette: i,
|
|
2241
2241
|
selectedColor: c,
|
|
2242
2242
|
paint: (h, p) => {
|
|
2243
2243
|
const g = d(h);
|
|
2244
|
-
g !== null && (o(h), t.dispatch(new
|
|
2244
|
+
g !== null && (o(h), t.dispatch(new Ni({
|
|
2245
2245
|
scaledAesthetic: "color",
|
|
2246
2246
|
range: g
|
|
2247
2247
|
}), p ? { transient: !0 } : void 0));
|
|
2248
2248
|
},
|
|
2249
2249
|
commit: () => t.commit()
|
|
2250
2250
|
}, s));
|
|
2251
|
-
},
|
|
2251
|
+
}, Nl = ({ lineStyle: e, ...t }) => /* @__PURE__ */ v(M, {
|
|
2252
2252
|
viewBox: "0 0 18 18",
|
|
2253
2253
|
...t,
|
|
2254
2254
|
children: [
|
|
@@ -2283,7 +2283,7 @@ var Dg = "_1a90obs1", _g = [
|
|
|
2283
2283
|
]
|
|
2284
2284
|
})
|
|
2285
2285
|
]
|
|
2286
|
-
}),
|
|
2286
|
+
}), Dl = ({ lineWidth: e, ...t }) => /* @__PURE__ */ a(M, {
|
|
2287
2287
|
viewBox: "0 0 18 18",
|
|
2288
2288
|
...t,
|
|
2289
2289
|
children: /* @__PURE__ */ a("path", {
|
|
@@ -2336,7 +2336,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2336
2336
|
const o = new Image();
|
|
2337
2337
|
o.onload = () => t({ image: r }), o.onerror = () => t({ rejection: "undecodable" }), o.src = r;
|
|
2338
2338
|
}, n.readAsDataURL(e);
|
|
2339
|
-
}),
|
|
2339
|
+
}), Ga = [
|
|
2340
2340
|
"solid",
|
|
2341
2341
|
"dashed",
|
|
2342
2342
|
"dotted"
|
|
@@ -2373,7 +2373,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2373
2373
|
"triangle",
|
|
2374
2374
|
"cross",
|
|
2375
2375
|
"star"
|
|
2376
|
-
],
|
|
2376
|
+
], _l = ({ widthPx: e, onChange: t }) => {
|
|
2377
2377
|
const n = R(), { ToggleGroup: r } = H(), o = (i) => {
|
|
2378
2378
|
const l = Gn.find(({ name: s }) => s === i);
|
|
2379
2379
|
l !== void 0 && t(l.widthPx);
|
|
@@ -2385,30 +2385,30 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2385
2385
|
options: Gn.map(({ name: i, widthPx: l }) => ({
|
|
2386
2386
|
value: i,
|
|
2387
2387
|
label: n(`editor.graphPanel.gridSection.lineWidths.${i}`),
|
|
2388
|
-
icon: /* @__PURE__ */ a(
|
|
2388
|
+
icon: /* @__PURE__ */ a(Dl, { lineWidth: l })
|
|
2389
2389
|
})),
|
|
2390
2390
|
onChange: o
|
|
2391
2391
|
})
|
|
2392
2392
|
});
|
|
2393
|
-
},
|
|
2393
|
+
}, Fl = ({ lineStyle: e, onChange: t }) => {
|
|
2394
2394
|
const n = R(), { ToggleGroup: r } = H(), o = (i) => {
|
|
2395
|
-
const l =
|
|
2395
|
+
const l = Ga.find((s) => s === i);
|
|
2396
2396
|
l !== void 0 && t(l);
|
|
2397
2397
|
};
|
|
2398
2398
|
return /* @__PURE__ */ a(L, {
|
|
2399
2399
|
label: n("editor.fineTunePanel.lineStyleSection.title"),
|
|
2400
2400
|
children: /* @__PURE__ */ a(r, {
|
|
2401
2401
|
value: e ?? "",
|
|
2402
|
-
options:
|
|
2402
|
+
options: Ga.map((i) => ({
|
|
2403
2403
|
value: i,
|
|
2404
2404
|
label: n(`editor.graphPanel.gridSection.lineStyles.${i}`),
|
|
2405
|
-
icon: /* @__PURE__ */ a(
|
|
2405
|
+
icon: /* @__PURE__ */ a(Nl, { lineStyle: i })
|
|
2406
2406
|
})),
|
|
2407
2407
|
onChange: o
|
|
2408
2408
|
})
|
|
2409
2409
|
});
|
|
2410
|
-
},
|
|
2411
|
-
const r = R(), { RadioGrid: o } = H(), [i, l] = Z(null), s = Ce(In), c = Mc(), d =
|
|
2410
|
+
}, Zr = ({ symbol: e, coordType: t, onChange: n }) => {
|
|
2411
|
+
const r = R(), { RadioGrid: o } = H(), [i, l] = Z(null), s = Ce(In), c = Mc(), d = ai(), u = s ? s.getPointSymbols(t) : d("point", t)?.symbols, h = s ? new Map(s.getGlyphs().map(({ name: T, definition: I }) => [T, I])) : c;
|
|
2412
2412
|
if (u === void 0 || u.length === 0) return null;
|
|
2413
2413
|
const p = (T) => typeof T == "string" && u.includes(T), g = (T) => p(T) || lr(T) || !Tt(T) && h.has(T), m = (T) => !Tt(T) || em.some((I) => I === T), f = [...h.keys()].filter((T) => !Tt(T) && !p(T)), y = [...u.filter(m), ...f], k = e === null ? "" : Vt(e), C = e === null || y.some((T) => Vt(T) === k) || !g(e) ? y : [...y, e], w = (T) => Tt(T) ? r(`editor.graphPanel.pointSymbol.symbols.${T}`) : lr(T) ? r("editor.graphPanel.pointSymbol.custom") : T, P = (T) => {
|
|
2414
2414
|
l(null);
|
|
@@ -2454,7 +2454,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2454
2454
|
})]
|
|
2455
2455
|
})
|
|
2456
2456
|
});
|
|
2457
|
-
},
|
|
2457
|
+
}, Jr = ({ sizePx: e, onChange: t }) => {
|
|
2458
2458
|
const n = R(), { ToggleGroup: r } = H(), o = (i) => {
|
|
2459
2459
|
const l = $n.find(({ name: s }) => s === i);
|
|
2460
2460
|
l !== void 0 && t(l.sizePx);
|
|
@@ -2512,22 +2512,22 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2512
2512
|
if (lr(e)) return e.image;
|
|
2513
2513
|
const n = t.get(e);
|
|
2514
2514
|
return n !== void 0 && typeof n != "function" && "image" in n ? n.image : null;
|
|
2515
|
-
},
|
|
2515
|
+
}, zl = Je({}), am = zl.Provider, om = () => Ce(zl), im = "_1qh3fon0", pr = "theme", lm = 3, Wt = 14, $a = 9, sm = () => {
|
|
2516
2516
|
const e = F((u) => u.scales.color), t = om(), n = Se(), r = R(), { RadioGrid: o } = H();
|
|
2517
2517
|
if (Object.keys(t).length === 0 || e?.kind !== "visual" || e.spec.scaleType !== "discrete" || e.defaultPalette === void 0) return null;
|
|
2518
2518
|
const { defaultPalette: i, spec: l } = e, s = Object.entries(t), c = [{
|
|
2519
2519
|
value: pr,
|
|
2520
2520
|
label: r("editor.overlayMenu.themePalette"),
|
|
2521
|
-
icon: /* @__PURE__ */ a(
|
|
2521
|
+
icon: /* @__PURE__ */ a(Va, { colors: i })
|
|
2522
2522
|
}, ...s.map(([u, h]) => ({
|
|
2523
2523
|
value: gr(u),
|
|
2524
2524
|
label: u,
|
|
2525
|
-
icon: /* @__PURE__ */ a(
|
|
2525
|
+
icon: /* @__PURE__ */ a(Va, { colors: h })
|
|
2526
2526
|
}))], d = (u) => {
|
|
2527
2527
|
const h = s.find(([g]) => gr(g) === u);
|
|
2528
2528
|
if (u !== pr && h === void 0) return;
|
|
2529
2529
|
const p = h === void 0 ? null : [...h[1]];
|
|
2530
|
-
n.dispatch(new
|
|
2530
|
+
n.dispatch(new Ni({
|
|
2531
2531
|
scaledAesthetic: "color",
|
|
2532
2532
|
range: p
|
|
2533
2533
|
}), { transient: !0 });
|
|
@@ -2548,8 +2548,8 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2548
2548
|
if (e === null) return pr;
|
|
2549
2549
|
const n = t.find(([, r]) => nh(r, e));
|
|
2550
2550
|
return n === void 0 ? "" : gr(n[0]);
|
|
2551
|
-
},
|
|
2552
|
-
const t = e.slice(0, lm), n = Wt / 2, r = Wt + (t.length - 1) *
|
|
2551
|
+
}, Va = ({ colors: e }) => {
|
|
2552
|
+
const t = e.slice(0, lm), n = Wt / 2, r = Wt + (t.length - 1) * $a;
|
|
2553
2553
|
return /* @__PURE__ */ a("svg", {
|
|
2554
2554
|
width: r,
|
|
2555
2555
|
height: Wt,
|
|
@@ -2557,34 +2557,34 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2557
2557
|
"aria-hidden": "true",
|
|
2558
2558
|
children: t.map((o, i) => /* @__PURE__ */ a("circle", {
|
|
2559
2559
|
className: im,
|
|
2560
|
-
cx: n + i *
|
|
2560
|
+
cx: n + i * $a,
|
|
2561
2561
|
cy: n,
|
|
2562
2562
|
r: n - 0.5,
|
|
2563
2563
|
fill: o
|
|
2564
2564
|
}, i)).reverse()
|
|
2565
2565
|
});
|
|
2566
|
-
},
|
|
2567
|
-
const e = F((S) => S), t = ee(), n =
|
|
2568
|
-
r.dispatch(new
|
|
2566
|
+
}, Wa = ["smooth", "linear"], Bl = () => {
|
|
2567
|
+
const e = F((S) => S), t = ee(), n = Rr(), r = Se(), o = R(), { Switch: i, ToggleGroup: l } = H(), s = Hl(e.layers, e.coordSystem.type, n), c = (S) => s.filter(({ support: b }) => S(b)).map(({ layer: b }) => b), d = dm(e, t), u = d.filter((S) => S.smooth !== null), h = d.filter((S) => S.missingValues !== null && S.missingValueOptions.length > 1), p = hr.filter((S) => h.some((b) => b.missingValueOptions.includes(S))), g = gm(u), m = mm(h), f = (S) => {
|
|
2568
|
+
r.dispatch(new ct({ commands: d.map((b) => new Hr({
|
|
2569
2569
|
layerId: b.layerId,
|
|
2570
2570
|
showPoints: S
|
|
2571
2571
|
})) }));
|
|
2572
2572
|
}, y = (S) => {
|
|
2573
|
-
const b =
|
|
2574
|
-
b !== void 0 && r.dispatch(new
|
|
2573
|
+
const b = Wa.find((E) => E === S);
|
|
2574
|
+
b !== void 0 && r.dispatch(new ct({ commands: u.map((E) => new Oi({
|
|
2575
2575
|
layerId: E.layerId,
|
|
2576
2576
|
curve: b
|
|
2577
2577
|
})) }));
|
|
2578
2578
|
}, k = (S) => {
|
|
2579
2579
|
const b = hr.find((z) => z === S);
|
|
2580
2580
|
if (b === void 0) return;
|
|
2581
|
-
const E = h.filter((z) => z.missingValueOptions.includes(b)).map((z) => new
|
|
2581
|
+
const E = h.filter((z) => z.missingValueOptions.includes(b)).map((z) => new Ri({
|
|
2582
2582
|
layerId: z.layerId,
|
|
2583
2583
|
missingValues: b
|
|
2584
2584
|
}));
|
|
2585
|
-
E.length !== 0 && r.dispatch(new
|
|
2585
|
+
E.length !== 0 && r.dispatch(new ct({ commands: E }));
|
|
2586
2586
|
}, C = d.filter((S) => S.showFill !== null), w = d.filter((S) => S.showPoints), P = um(e, t, d), T = C.some((S) => hm(e, S)), I = (S) => {
|
|
2587
|
-
S.length > 0 && r.dispatch(new
|
|
2587
|
+
S.length > 0 && r.dispatch(new ct({ commands: S }));
|
|
2588
2588
|
}, N = (S) => {
|
|
2589
2589
|
I(d.map((b) => new Fe({
|
|
2590
2590
|
layerId: b.layerId,
|
|
@@ -2613,7 +2613,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2613
2613
|
label: o("editor.graphPanel.graphOptions.dataLabels"),
|
|
2614
2614
|
layers: c((S) => S.supportsDataLabels),
|
|
2615
2615
|
isOn: (S) => S.showDataLabels,
|
|
2616
|
-
buildCommand: (S, b) => new
|
|
2616
|
+
buildCommand: (S, b) => new zi({
|
|
2617
2617
|
layerId: S,
|
|
2618
2618
|
showDataLabels: b
|
|
2619
2619
|
})
|
|
@@ -2622,7 +2622,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2622
2622
|
label: o("editor.graphPanel.graphOptions.showPercentages"),
|
|
2623
2623
|
layers: c((S) => S.supportsPercentages),
|
|
2624
2624
|
isOn: (S) => S.format === "percentage",
|
|
2625
|
-
buildCommand: (S, b) => new
|
|
2625
|
+
buildCommand: (S, b) => new Mi({
|
|
2626
2626
|
layerId: S,
|
|
2627
2627
|
format: b ? "percentage" : "absolute"
|
|
2628
2628
|
})
|
|
@@ -2631,7 +2631,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2631
2631
|
label: o("editor.graphPanel.graphOptions.stackTotals"),
|
|
2632
2632
|
layers: c((S) => S.supportsStackTotals),
|
|
2633
2633
|
isOn: (S) => S.showStackTotals,
|
|
2634
|
-
buildCommand: (S, b) => new
|
|
2634
|
+
buildCommand: (S, b) => new Bi({
|
|
2635
2635
|
layerId: S,
|
|
2636
2636
|
showStackTotals: b
|
|
2637
2637
|
})
|
|
@@ -2640,7 +2640,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2640
2640
|
label: o("editor.graphPanel.graphOptions.categoryLabels"),
|
|
2641
2641
|
layers: c((S) => S.supportsCategoryLabels),
|
|
2642
2642
|
isOn: (S) => S.showCategoryLabels,
|
|
2643
|
-
buildCommand: (S, b) => new
|
|
2643
|
+
buildCommand: (S, b) => new Fi({
|
|
2644
2644
|
layerId: S,
|
|
2645
2645
|
showCategoryLabels: b
|
|
2646
2646
|
})
|
|
@@ -2679,7 +2679,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2679
2679
|
label: o("editor.graphPanel.graphOptions.smoothLines"),
|
|
2680
2680
|
children: /* @__PURE__ */ a(l, {
|
|
2681
2681
|
value: g,
|
|
2682
|
-
options:
|
|
2682
|
+
options: Wa.map((S) => ({
|
|
2683
2683
|
value: S,
|
|
2684
2684
|
label: o(`editor.graphPanel.graphOptions.curves.${S}`),
|
|
2685
2685
|
icon: /* @__PURE__ */ a(rg, { curve: S })
|
|
@@ -2693,16 +2693,16 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2693
2693
|
value: m,
|
|
2694
2694
|
options: p.map((S) => ({
|
|
2695
2695
|
value: S,
|
|
2696
|
-
label:
|
|
2696
|
+
label: Pl(o, S),
|
|
2697
2697
|
icon: /* @__PURE__ */ a(og, { missingValues: S })
|
|
2698
2698
|
})),
|
|
2699
2699
|
onChange: k
|
|
2700
2700
|
})
|
|
2701
2701
|
}),
|
|
2702
|
-
d.length > 0 && /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(
|
|
2702
|
+
d.length > 0 && /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(_l, {
|
|
2703
2703
|
widthPx: Vn(P.map((S) => S.strokeWidth)),
|
|
2704
2704
|
onChange: N
|
|
2705
|
-
}), /* @__PURE__ */ a(
|
|
2705
|
+
}), /* @__PURE__ */ a(Fl, {
|
|
2706
2706
|
lineStyle: Vn(P.map((S) => S.lineStyle)),
|
|
2707
2707
|
onChange: x
|
|
2708
2708
|
})] }),
|
|
@@ -2720,7 +2720,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2720
2720
|
onChange: f
|
|
2721
2721
|
})
|
|
2722
2722
|
}),
|
|
2723
|
-
w.length > 0 && /* @__PURE__ */ a(
|
|
2723
|
+
w.length > 0 && /* @__PURE__ */ a(Jr, {
|
|
2724
2724
|
sizePx: Vn(pm(e, t, w)),
|
|
2725
2725
|
onChange: A
|
|
2726
2726
|
}),
|
|
@@ -2728,15 +2728,15 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
|
|
|
2728
2728
|
/* @__PURE__ */ a(Ug, {})
|
|
2729
2729
|
] });
|
|
2730
2730
|
};
|
|
2731
|
-
|
|
2732
|
-
var
|
|
2731
|
+
Bl.hasRows = (e, { scene: t, dataLabelPlacement: n }) => Tn(t.spec) !== null || Hl(t.layers, t.coordSystem.type, n).some(({ support: r }) => r.supportsDataLabels) || t.spec.layers.some((r) => r.interactive && bt(r, "line", "area"));
|
|
2732
|
+
var Hl = (e, t, n) => e.filter((r) => r.interactive).map((r) => ({
|
|
2733
2733
|
layer: r,
|
|
2734
|
-
support:
|
|
2734
|
+
support: Al(r, t, n)
|
|
2735
2735
|
})), dm = (e, t) => {
|
|
2736
2736
|
const n = [];
|
|
2737
2737
|
for (const r of e.spec.layers) {
|
|
2738
2738
|
if (!r.interactive) continue;
|
|
2739
|
-
const o =
|
|
2739
|
+
const o = Yr(e, t, r.id);
|
|
2740
2740
|
o !== null && n.push(o);
|
|
2741
2741
|
}
|
|
2742
2742
|
return n;
|
|
@@ -2757,7 +2757,7 @@ var Bl = (e, t, n) => e.filter((r) => r.interactive).map((r) => ({
|
|
|
2757
2757
|
}));
|
|
2758
2758
|
}), hm = (e, t) => {
|
|
2759
2759
|
if (t.showFill === !0) return !0;
|
|
2760
|
-
const n =
|
|
2760
|
+
const n = gt("line", t.layerId), r = xe(e.spec);
|
|
2761
2761
|
return e.spec.styles.overrides.some((o) => !Pu(o) || o.when?.where === void 0 ? !1 : uu({
|
|
2762
2762
|
...n,
|
|
2763
2763
|
when: o.when
|
|
@@ -2777,7 +2777,7 @@ var Bl = (e, t, n) => e.filter((r) => r.interactive).map((r) => ({
|
|
|
2777
2777
|
const o = Se(), { Switch: i } = H();
|
|
2778
2778
|
if (t.length === 0) return null;
|
|
2779
2779
|
const l = (s) => {
|
|
2780
|
-
o.dispatch(new
|
|
2780
|
+
o.dispatch(new ct({ commands: t.map((c) => r(c.id, s)) }));
|
|
2781
2781
|
};
|
|
2782
2782
|
return /* @__PURE__ */ a(L, {
|
|
2783
2783
|
label: e,
|
|
@@ -2803,18 +2803,18 @@ var Bl = (e, t, n) => e.filter((r) => r.interactive).map((r) => ({
|
|
|
2803
2803
|
return null;
|
|
2804
2804
|
}, fm = ({ geom: e, coord: t, position: n }, r, o = "style", i = null) => {
|
|
2805
2805
|
for (const l of r) {
|
|
2806
|
-
const s =
|
|
2806
|
+
const s = Ua(Ka(l.layers, e)?.[t]?.[n], o), c = s !== void 0 ? s : Ua(Ka(l.geoms, e), o);
|
|
2807
2807
|
if (c === null) return null;
|
|
2808
2808
|
if (c !== void 0) return c;
|
|
2809
2809
|
}
|
|
2810
2810
|
return i;
|
|
2811
|
-
}, bm = (e) => typeof e == "object" && ("style" in e || "annotate" in e),
|
|
2811
|
+
}, bm = (e) => typeof e == "object" && ("style" in e || "annotate" in e), Ua = (e, t) => e == null ? e : bm(e) ? e[t] : t === "style" ? e : void 0, Ka = (e, t) => e !== void 0 && Object.hasOwn(e, t) ? e[t] : void 0, un = [
|
|
2812
2812
|
"solid",
|
|
2813
2813
|
"dashed",
|
|
2814
2814
|
"dotted"
|
|
2815
2815
|
];
|
|
2816
|
-
var
|
|
2817
|
-
const n = e.guides.axes.filter(
|
|
2816
|
+
var Gl = (e) => e.scaledAesthetic === "x" || e.scaledAesthetic === "y", $l = (e, t) => {
|
|
2817
|
+
const n = e.guides.axes.filter(Gl);
|
|
2818
2818
|
if (n.length === 0) return null;
|
|
2819
2819
|
const r = t.gridLine.y().resolve();
|
|
2820
2820
|
return {
|
|
@@ -2827,10 +2827,10 @@ var Hl = (e) => e.scaledAesthetic === "x" || e.scaledAesthetic === "y", Gl = (e,
|
|
|
2827
2827
|
if (e === "both") return t.axes.every((r) => !r.showGrid);
|
|
2828
2828
|
const n = t.axes.find((r) => r.scaledAesthetic === e);
|
|
2829
2829
|
return n === void 0 || !n.showGrid;
|
|
2830
|
-
},
|
|
2830
|
+
}, Vl = (e, t = "both") => new Ei({
|
|
2831
2831
|
axis: t,
|
|
2832
2832
|
lineStyle: e
|
|
2833
|
-
}),
|
|
2833
|
+
}), Wl = (e, t = "both") => new Ei({
|
|
2834
2834
|
axis: t,
|
|
2835
2835
|
strokeWidth: e
|
|
2836
2836
|
}), Wn = [
|
|
@@ -2846,23 +2846,23 @@ var Hl = (e) => e.scaledAesthetic === "x" || e.scaledAesthetic === "y", Gl = (e,
|
|
|
2846
2846
|
name: "thick",
|
|
2847
2847
|
widthPx: 4
|
|
2848
2848
|
}
|
|
2849
|
-
],
|
|
2850
|
-
const t = F((y) => y), n = ee(), r =
|
|
2849
|
+
], Ul = ({ target: e }) => {
|
|
2850
|
+
const t = F((y) => y), n = ee(), r = $l(t, n), o = R(), i = Se(), { ToggleGroup: l } = H();
|
|
2851
2851
|
if (r === null || !r.stylable) return null;
|
|
2852
2852
|
const s = e.axis === "both" ? "y" : e.axis, c = n.gridLine[s]().resolve(), d = tt(c.dashArray), u = ym(e.axis, r), h = un.map((y) => ({
|
|
2853
2853
|
value: y,
|
|
2854
2854
|
label: o(`editor.graphPanel.gridSection.lineStyles.${y}`),
|
|
2855
|
-
icon: /* @__PURE__ */ a(
|
|
2855
|
+
icon: /* @__PURE__ */ a(Nl, { lineStyle: y })
|
|
2856
2856
|
})), p = Wn.map(({ name: y, widthPx: k }) => ({
|
|
2857
2857
|
value: y,
|
|
2858
2858
|
label: o(`editor.graphPanel.gridSection.lineWidths.${y}`),
|
|
2859
|
-
icon: /* @__PURE__ */ a(
|
|
2859
|
+
icon: /* @__PURE__ */ a(Dl, { lineWidth: k })
|
|
2860
2860
|
})), g = Wn.find(({ widthPx: y }) => y === c.strokeWidth)?.name ?? "", m = (y) => {
|
|
2861
2861
|
const k = un.find((C) => C === y);
|
|
2862
|
-
k !== void 0 && i.dispatch(
|
|
2862
|
+
k !== void 0 && i.dispatch(Vl(k, e.axis));
|
|
2863
2863
|
}, f = (y) => {
|
|
2864
2864
|
const k = Wn.find(({ name: C }) => C === y);
|
|
2865
|
-
k !== void 0 && i.dispatch(
|
|
2865
|
+
k !== void 0 && i.dispatch(Wl(k.widthPx, e.axis));
|
|
2866
2866
|
};
|
|
2867
2867
|
return /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(L, {
|
|
2868
2868
|
label: o("editor.graphPanel.gridSection.gridStyle"),
|
|
@@ -2882,12 +2882,12 @@ var Hl = (e) => e.scaledAesthetic === "x" || e.scaledAesthetic === "y", Gl = (e,
|
|
|
2882
2882
|
})
|
|
2883
2883
|
})] });
|
|
2884
2884
|
};
|
|
2885
|
-
|
|
2885
|
+
Ul.hasRows = (e, { scene: t }) => {
|
|
2886
2886
|
if (t.coordSystem.type === "polar") return !1;
|
|
2887
|
-
const n = t.guides.axes.filter(
|
|
2887
|
+
const n = t.guides.axes.filter(Gl);
|
|
2888
2888
|
return n.length === 0 ? !1 : e.axis === "both" ? !0 : n.some((r) => r.scaledAesthetic === e.axis);
|
|
2889
2889
|
};
|
|
2890
|
-
var
|
|
2890
|
+
var ja = [
|
|
2891
2891
|
{
|
|
2892
2892
|
position: "top",
|
|
2893
2893
|
align: "start",
|
|
@@ -2941,7 +2941,7 @@ var Ua = [
|
|
|
2941
2941
|
center: "Center",
|
|
2942
2942
|
end: "End"
|
|
2943
2943
|
}, Cm = () => {
|
|
2944
|
-
const e = F((c) => c.guides.legends.drawn[0]), t = Se(), n = R(), { RadioGrid: r } = H(), o = e === void 0, i = o ? "" : Un(e), l =
|
|
2944
|
+
const e = F((c) => c.guides.legends.drawn[0]), t = Se(), n = R(), { RadioGrid: r } = H(), o = e === void 0, i = o ? "" : Un(e), l = ja.map((c) => {
|
|
2945
2945
|
const d = Un(c);
|
|
2946
2946
|
return {
|
|
2947
2947
|
value: d,
|
|
@@ -2955,7 +2955,7 @@ var Ua = [
|
|
|
2955
2955
|
gridColumn: c.gridColumn
|
|
2956
2956
|
};
|
|
2957
2957
|
}), s = (c) => {
|
|
2958
|
-
const d =
|
|
2958
|
+
const d = ja.find((u) => Un(u) === c);
|
|
2959
2959
|
d !== void 0 && t.dispatch(new $d({
|
|
2960
2960
|
position: d.position,
|
|
2961
2961
|
align: d.align
|
|
@@ -2963,7 +2963,7 @@ var Ua = [
|
|
|
2963
2963
|
};
|
|
2964
2964
|
return /* @__PURE__ */ a(L, {
|
|
2965
2965
|
label: n("editor.axesPanel.controls.position"),
|
|
2966
|
-
children: /* @__PURE__ */ a(
|
|
2966
|
+
children: /* @__PURE__ */ a(jr, {
|
|
2967
2967
|
direction: "ltr",
|
|
2968
2968
|
children: /* @__PURE__ */ a("div", {
|
|
2969
2969
|
dir: "ltr",
|
|
@@ -2979,18 +2979,18 @@ var Ua = [
|
|
|
2979
2979
|
})
|
|
2980
2980
|
})
|
|
2981
2981
|
});
|
|
2982
|
-
}, Un = ({ position: e, align: t }) => e === "left" || e === "right" ? e : `${e}${Sm[t]}`, wm = ({ gridRow: e, gridColumn: t }) => Math.atan2(t - 2, 2 - e) * 180 / Math.PI,
|
|
2983
|
-
const o =
|
|
2982
|
+
}, Un = ({ position: e, align: t }) => e === "left" || e === "right" ? e : `${e}${Sm[t]}`, wm = ({ gridRow: e, gridColumn: t }) => Math.atan2(t - 2, 2 - e) * 180 / Math.PI, Kl = (e, t, n, r) => {
|
|
2983
|
+
const o = Xl(e, n, r)?.size;
|
|
2984
2984
|
if (typeof o == "number") return o;
|
|
2985
2985
|
const i = q(e.layers, n);
|
|
2986
|
-
return i?.geom === "point" ? t.geom.point(i).get("size") :
|
|
2987
|
-
},
|
|
2988
|
-
const o =
|
|
2986
|
+
return i?.geom === "point" ? t.geom.point(i).get("size") : yi;
|
|
2987
|
+
}, jl = (e, t, n, r) => {
|
|
2988
|
+
const o = Xl(e, n, r)?.symbol;
|
|
2989
2989
|
if (o !== void 0) return o;
|
|
2990
2990
|
const i = q(e.layers, n);
|
|
2991
2991
|
return i?.geom === "point" ? t.geom.point(i).get("symbol") : "circle";
|
|
2992
|
-
},
|
|
2993
|
-
...
|
|
2992
|
+
}, Xl = (e, t, n) => n === void 0 ? void 0 : rn(e.spec.styles.overrides, {
|
|
2993
|
+
...gt("point", t),
|
|
2994
2994
|
when: { where: n }
|
|
2995
2995
|
}, xe(e.spec)), mr = ({ target: e }) => {
|
|
2996
2996
|
const t = Et();
|
|
@@ -2999,12 +2999,12 @@ var Ua = [
|
|
|
2999
2999
|
target: e
|
|
3000
3000
|
});
|
|
3001
3001
|
};
|
|
3002
|
-
mr.hasRows = (e, { scene: t }) => e.scope === "group" &&
|
|
3002
|
+
mr.hasRows = (e, { scene: t }) => e.scope === "group" && ql(t, e.layerId) !== null;
|
|
3003
3003
|
var xm = ({ graph: e, target: t }) => {
|
|
3004
|
-
const n = Q(e), r = ee(), o = R(), { Switch: i } = H(), l = n === null ? null :
|
|
3004
|
+
const n = Q(e), r = ee(), o = R(), { Switch: i } = H(), l = n === null ? null : ql(n, t.layerId), s = n === null || l === null ? null : Yr(n, r, l.id);
|
|
3005
3005
|
if (n === null || l === null || s === null) return null;
|
|
3006
|
-
const c = Pm(n, t), d = c === void 0 ? {} : { where: c }, u = c === void 0 || l.geom !== "line" ? void 0 : Am(n, s.layerId, c), h = u === void 0 ? s.showFill : u > 0, p = c === void 0 ? null : km(n, l.geom, s.layerId, c), g = c === void 0 ? s.strokeWidth : p ?? Tm(n, r, t) ?? s.strokeWidth, m = s.pointLayerId === null ? null :
|
|
3007
|
-
e.commands.dispatch(new
|
|
3006
|
+
const c = Pm(n, t), d = c === void 0 ? {} : { where: c }, u = c === void 0 || l.geom !== "line" ? void 0 : Am(n, s.layerId, c), h = u === void 0 ? s.showFill : u > 0, p = c === void 0 ? null : km(n, l.geom, s.layerId, c), g = c === void 0 ? s.strokeWidth : p ?? Tm(n, r, t) ?? s.strokeWidth, m = s.pointLayerId === null ? null : Kl(n, r, s.pointLayerId, c), f = s.pointLayerId === null ? null : jl(n, r, s.pointLayerId, c), y = m !== null && m > 0, k = (x) => {
|
|
3007
|
+
e.commands.dispatch(new Hr({
|
|
3008
3008
|
layerId: s.layerId,
|
|
3009
3009
|
showPoints: x,
|
|
3010
3010
|
...d
|
|
@@ -3029,7 +3029,7 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3029
3029
|
...d
|
|
3030
3030
|
}));
|
|
3031
3031
|
}, T = (x) => {
|
|
3032
|
-
s.pointLayerId !== null && e.commands.dispatch(new
|
|
3032
|
+
s.pointLayerId !== null && e.commands.dispatch(new Br({
|
|
3033
3033
|
layerId: s.pointLayerId,
|
|
3034
3034
|
symbol: x,
|
|
3035
3035
|
...d
|
|
@@ -3043,11 +3043,11 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3043
3043
|
}, N = An(n.spec, t)?.some((x) => x.geomKind === "line" || x.geomKind === "area") === !0;
|
|
3044
3044
|
return /* @__PURE__ */ v(K, { children: [
|
|
3045
3045
|
/* @__PURE__ */ a(He, { target: t }),
|
|
3046
|
-
/* @__PURE__ */ a(
|
|
3046
|
+
/* @__PURE__ */ a(_l, {
|
|
3047
3047
|
widthPx: g,
|
|
3048
3048
|
onChange: w
|
|
3049
3049
|
}),
|
|
3050
|
-
N && /* @__PURE__ */ a(
|
|
3050
|
+
N && /* @__PURE__ */ a(Fl, {
|
|
3051
3051
|
lineStyle: Lm(n, r, t),
|
|
3052
3052
|
onChange: I
|
|
3053
3053
|
}),
|
|
@@ -3065,11 +3065,11 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3065
3065
|
onChange: k
|
|
3066
3066
|
})
|
|
3067
3067
|
}),
|
|
3068
|
-
y && /* @__PURE__ */ a(
|
|
3068
|
+
y && /* @__PURE__ */ a(Jr, {
|
|
3069
3069
|
sizePx: m,
|
|
3070
3070
|
onChange: P
|
|
3071
3071
|
}),
|
|
3072
|
-
y && /* @__PURE__ */ a(
|
|
3072
|
+
y && /* @__PURE__ */ a(Zr, {
|
|
3073
3073
|
symbol: f,
|
|
3074
3074
|
coordType: n.coordSystem.type,
|
|
3075
3075
|
onChange: T
|
|
@@ -3077,10 +3077,10 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3077
3077
|
] });
|
|
3078
3078
|
}, km = (e, t, n, r) => {
|
|
3079
3079
|
const o = (t === "line" ? rn(e.spec.styles.overrides, {
|
|
3080
|
-
...
|
|
3080
|
+
...gt("line", n),
|
|
3081
3081
|
when: { where: r }
|
|
3082
3082
|
}, xe(e.spec)) : rn(e.spec.styles.overrides, {
|
|
3083
|
-
...
|
|
3083
|
+
...gt("area", n),
|
|
3084
3084
|
when: { where: r }
|
|
3085
3085
|
}, xe(e.spec)))?.strokeWidth;
|
|
3086
3086
|
return typeof o == "number" ? o : null;
|
|
@@ -3095,7 +3095,7 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3095
3095
|
return typeof s == "number" ? s : null;
|
|
3096
3096
|
}, Am = (e, t, n) => {
|
|
3097
3097
|
const r = rn(e.spec.styles.overrides, {
|
|
3098
|
-
...
|
|
3098
|
+
...gt("line", t),
|
|
3099
3099
|
when: { where: n }
|
|
3100
3100
|
}, xe(e.spec))?.fillAlpha;
|
|
3101
3101
|
return typeof r == "number" ? r : void 0;
|
|
@@ -3108,12 +3108,12 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3108
3108
|
parsingLocale: e.config.parsingLocale
|
|
3109
3109
|
}), l = i === void 0 ? null : o.data.getAt(i);
|
|
3110
3110
|
return tt(o.geom === "line" ? t.geom.line(o).get("dashArray", l ?? void 0) : t.geom.area(o).get("dashArray", l ?? void 0));
|
|
3111
|
-
},
|
|
3111
|
+
}, ql = (e, t) => {
|
|
3112
3112
|
const n = q(e.spec.layers, t);
|
|
3113
3113
|
if (n === void 0) return null;
|
|
3114
3114
|
const r = xn(n, e.spec.layers);
|
|
3115
|
-
return
|
|
3116
|
-
},
|
|
3115
|
+
return bt(r, "line", "area") ? r : null;
|
|
3116
|
+
}, Yl = (e) => /* @__PURE__ */ v(M, {
|
|
3117
3117
|
viewBox: "0 0 16 16",
|
|
3118
3118
|
...e,
|
|
3119
3119
|
children: [
|
|
@@ -3138,7 +3138,7 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3138
3138
|
clipRule: "evenodd"
|
|
3139
3139
|
})
|
|
3140
3140
|
]
|
|
3141
|
-
}), Im = "_1aafi1g0", Mm = "_1aafi1g1",
|
|
3141
|
+
}), Im = "_1aafi1g0", Mm = "_1aafi1g1", vr = ({ children: e }) => /* @__PURE__ */ v("span", {
|
|
3142
3142
|
className: Im,
|
|
3143
3143
|
"aria-hidden": "true",
|
|
3144
3144
|
children: [e, /* @__PURE__ */ a("span", { className: Mm })]
|
|
@@ -3150,7 +3150,7 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3150
3150
|
fill: "currentColor",
|
|
3151
3151
|
fillOpacity: "0.8"
|
|
3152
3152
|
})
|
|
3153
|
-
}),
|
|
3153
|
+
}), Xa = (e) => /* @__PURE__ */ v(M, {
|
|
3154
3154
|
viewBox: "0 0 16 16",
|
|
3155
3155
|
...e,
|
|
3156
3156
|
children: [/* @__PURE__ */ a("path", {
|
|
@@ -3163,7 +3163,7 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3163
3163
|
fill: "currentColor",
|
|
3164
3164
|
fillOpacity: "0.8"
|
|
3165
3165
|
})]
|
|
3166
|
-
}),
|
|
3166
|
+
}), Zl = (e) => /* @__PURE__ */ v(M, {
|
|
3167
3167
|
viewBox: "0 0 16 16",
|
|
3168
3168
|
...e,
|
|
3169
3169
|
children: [
|
|
@@ -3186,7 +3186,7 @@ var xm = ({ graph: e, target: t }) => {
|
|
|
3186
3186
|
fillOpacity: "0.8"
|
|
3187
3187
|
})
|
|
3188
3188
|
]
|
|
3189
|
-
}),
|
|
3189
|
+
}), Qr = (e) => /* @__PURE__ */ v(M, {
|
|
3190
3190
|
viewBox: "0 0 16 16",
|
|
3191
3191
|
...e,
|
|
3192
3192
|
children: [
|
|
@@ -3271,7 +3271,7 @@ function Rm(e, t) {
|
|
|
3271
3271
|
}
|
|
3272
3272
|
var Nm = (e) => {
|
|
3273
3273
|
const t = Oe(e.mapping.x);
|
|
3274
|
-
return t !== null && t !==
|
|
3274
|
+
return t !== null && t !== Fr.x;
|
|
3275
3275
|
}, Dm = (e, t, n, r) => {
|
|
3276
3276
|
const o = [], i = _m(e, t, n, r);
|
|
3277
3277
|
i !== null && o.push({
|
|
@@ -3289,11 +3289,11 @@ var Nm = (e) => {
|
|
|
3289
3289
|
predicate: l.predicate
|
|
3290
3290
|
}), o;
|
|
3291
3291
|
}, es = (e, t) => {
|
|
3292
|
-
const n = t.find((r) =>
|
|
3292
|
+
const n = t.find((r) => ea(e.predicate, r.predicate));
|
|
3293
3293
|
return n === void 0 ? e.scope : n.id;
|
|
3294
3294
|
}, _m = (e, t, n, r) => {
|
|
3295
3295
|
const o = Oe(e.mapping.y), i = Oe(e.mapping.x);
|
|
3296
|
-
if (o === null || i === null || i ===
|
|
3296
|
+
if (o === null || i === null || i === Fr.x || !e.data.hasVariable(o) || e.data.getType(o) !== "numeric") return null;
|
|
3297
3297
|
const l = ts(t, o);
|
|
3298
3298
|
return l === null || !Gm(e, o, l) ? null : {
|
|
3299
3299
|
variable: o,
|
|
@@ -3302,7 +3302,7 @@ var Nm = (e) => {
|
|
|
3302
3302
|
};
|
|
3303
3303
|
}, Fm = (e, t, n, r) => {
|
|
3304
3304
|
const o = Oe(e.mapping.x);
|
|
3305
|
-
if (o === null || o ===
|
|
3305
|
+
if (o === null || o === Fr.x || !e.data.hasVariable(o) || e.data.getType(o) === "numeric") return null;
|
|
3306
3306
|
const i = t[o] ?? null;
|
|
3307
3307
|
if (i === null) return null;
|
|
3308
3308
|
const l = zm(e, t);
|
|
@@ -3319,7 +3319,7 @@ var Nm = (e) => {
|
|
|
3319
3319
|
};
|
|
3320
3320
|
}, zm = (e, t) => {
|
|
3321
3321
|
const n = [];
|
|
3322
|
-
for (const r of
|
|
3322
|
+
for (const r of Wr(e.data, e.mapping)) {
|
|
3323
3323
|
const o = t[r] ?? null;
|
|
3324
3324
|
if (o === null) return null;
|
|
3325
3325
|
n.push({
|
|
@@ -3354,19 +3354,19 @@ var Nm = (e) => {
|
|
|
3354
3354
|
const n = e[je.yRaw], r = typeof n == "number" ? n : e[t];
|
|
3355
3355
|
return typeof r == "number" && Number.isFinite(r) ? r : null;
|
|
3356
3356
|
}, ns = (e, t, n, r, o) => {
|
|
3357
|
-
const i =
|
|
3357
|
+
const i = Vr({
|
|
3358
3358
|
valueFormat: e.data.getValueFormat(t),
|
|
3359
3359
|
locale: r,
|
|
3360
3360
|
numberFormat: o
|
|
3361
3361
|
})(n);
|
|
3362
3362
|
return i.length > 0 ? i : String(n);
|
|
3363
|
-
}, Mt = (e) => e instanceof Date ? String(e.getTime()) : String(e),
|
|
3363
|
+
}, Mt = (e) => e instanceof Date ? String(e.getTime()) : String(e), ea = (e, t) => "and" in e || "and" in t ? "and" in e && "and" in t && qa(e.and, t.and) : "or" in e || "or" in t ? "or" in e && "or" in t && qa(e.or, t.or) : "not" in e || "not" in t ? "not" in e && "not" in t && ea(e.not, t.not) : e.variable !== t.variable ? !1 : "eq" in e || "eq" in t ? "eq" in e && "eq" in t && st(e.eq, t.eq) : "oneOf" in e || "oneOf" in t ? "oneOf" in e && "oneOf" in t && Ya(e.oneOf, t.oneOf) : "lt" in e || "lt" in t ? "lt" in e && "lt" in t && st(e.lt, t.lt) : "lte" in e || "lte" in t ? "lte" in e && "lte" in t && st(e.lte, t.lte) : "gt" in e || "gt" in t ? "gt" in e && "gt" in t && st(e.gt, t.gt) : "gte" in e || "gte" in t ? "gte" in e && "gte" in t && st(e.gte, t.gte) : "range" in e && "range" in t && Ya(e.range, t.range), qa = (e, t) => e.length === t.length && e.every((n, r) => {
|
|
3364
3364
|
const o = t[r];
|
|
3365
|
-
return o !== void 0 &&
|
|
3366
|
-
}),
|
|
3365
|
+
return o !== void 0 && ea(n, o);
|
|
3366
|
+
}), Ya = (e, t) => e.length === t.length && e.every((n, r) => {
|
|
3367
3367
|
const o = t[r];
|
|
3368
|
-
return o !== void 0 &&
|
|
3369
|
-
}),
|
|
3368
|
+
return o !== void 0 && st(n, o);
|
|
3369
|
+
}), st = (e, t) => e instanceof Date || t instanceof Date ? e instanceof Date && t instanceof Date && e.getTime() === t.getTime() : e === t, $m = (e, t) => {
|
|
3370
3370
|
const n = F((o) => o.spec.highlights), r = F((o) => o.config.parsingLocale);
|
|
3371
3371
|
return _(() => vu({
|
|
3372
3372
|
layer: e,
|
|
@@ -3391,7 +3391,7 @@ var Nm = (e) => {
|
|
|
3391
3391
|
}
|
|
3392
3392
|
};
|
|
3393
3393
|
const { parsingLocale: n, numberFormat: r } = e.config, o = t ?? n, i = e.guides.colorGroups.map((l) => {
|
|
3394
|
-
const s =
|
|
3394
|
+
const s = Vr({
|
|
3395
3395
|
valueFormat: l.valueFormat,
|
|
3396
3396
|
locale: o,
|
|
3397
3397
|
numberFormat: r
|
|
@@ -3409,27 +3409,27 @@ var Nm = (e) => {
|
|
|
3409
3409
|
findValue: (l) => i.find((s) => s.option.value === l)?.value
|
|
3410
3410
|
};
|
|
3411
3411
|
}, [e, t]), rs = ({ scene: e, layer: t, observation: n, groupOptions: r, locale: o, t: i }) => {
|
|
3412
|
-
const l =
|
|
3412
|
+
const l = br(e, t, n, r);
|
|
3413
3413
|
return {
|
|
3414
3414
|
observation: i(jm(e, t)),
|
|
3415
3415
|
xValue: i("editor.overlayMenu.allOf", { name: as(e, t, n, o) }),
|
|
3416
3416
|
group: l === null ? i("editor.overlayMenu.all") : i("editor.overlayMenu.allOf", { name: l })
|
|
3417
3417
|
};
|
|
3418
|
-
},
|
|
3419
|
-
const s =
|
|
3418
|
+
}, fr = ({ scene: e, layer: t, observation: n, groupOptions: r, locale: o, t: i }, l) => {
|
|
3419
|
+
const s = Wr(t.data, t.mapping), c = as(e, t, n, o);
|
|
3420
3420
|
switch (l) {
|
|
3421
3421
|
case "observation": {
|
|
3422
|
-
const d = s.length === 0 ? null :
|
|
3422
|
+
const d = s.length === 0 ? null : br(e, t, n, r), u = Um(d, c, i);
|
|
3423
3423
|
return {
|
|
3424
3424
|
whole: u,
|
|
3425
3425
|
value: u
|
|
3426
3426
|
};
|
|
3427
3427
|
}
|
|
3428
3428
|
case "xValue":
|
|
3429
|
-
return
|
|
3429
|
+
return Za($i(e.guides, "x")?.label ?? null, c, i);
|
|
3430
3430
|
case "group": {
|
|
3431
|
-
const d =
|
|
3432
|
-
return
|
|
3431
|
+
const d = br(e, t, n, r) ?? i("editor.overlayMenu.all");
|
|
3432
|
+
return Za(Km(e, s), d, i);
|
|
3433
3433
|
}
|
|
3434
3434
|
default:
|
|
3435
3435
|
return l;
|
|
@@ -3437,7 +3437,7 @@ var Nm = (e) => {
|
|
|
3437
3437
|
}, Um = (e, t, n) => e === null ? t : t === "" ? e : n("editor.overlayMenu.groupAtBand", {
|
|
3438
3438
|
group: e,
|
|
3439
3439
|
band: t
|
|
3440
|
-
}),
|
|
3440
|
+
}), Za = (e, t, n) => ({
|
|
3441
3441
|
whole: e === null || e === "" ? t : n("editor.overlayMenu.titledValue", {
|
|
3442
3442
|
title: e,
|
|
3443
3443
|
value: t
|
|
@@ -3456,14 +3456,14 @@ var Nm = (e) => {
|
|
|
3456
3456
|
return "editor.overlayMenu.thisPoint";
|
|
3457
3457
|
}
|
|
3458
3458
|
}, as = (e, t, n, r) => {
|
|
3459
|
-
const o =
|
|
3460
|
-
return
|
|
3459
|
+
const o = $i(e.guides, "x");
|
|
3460
|
+
return Vr({
|
|
3461
3461
|
valueFormat: o === null ? { type: "text" } : Ju(o, t.id),
|
|
3462
3462
|
locale: r,
|
|
3463
3463
|
numberFormat: e.config.numberFormat
|
|
3464
3464
|
})(hu(t.data, t.mapping)(n), n);
|
|
3465
|
-
},
|
|
3466
|
-
const o =
|
|
3465
|
+
}, br = (e, t, n, r) => {
|
|
3466
|
+
const o = Wr(t.data, t.mapping);
|
|
3467
3467
|
return o.length === 0 ? Xm(t, n) ?? qm(e, t) : o.map((i) => Ym(n[i] ?? null, r)).join(", ");
|
|
3468
3468
|
}, Xm = (e, t) => {
|
|
3469
3469
|
const n = Ou(e, t);
|
|
@@ -3505,15 +3505,15 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3505
3505
|
}, us = {
|
|
3506
3506
|
pinnedNumber: {
|
|
3507
3507
|
phrase: "graph.annotations.baseMenu.unpinNumber",
|
|
3508
|
-
Icon:
|
|
3508
|
+
Icon: Zl
|
|
3509
3509
|
},
|
|
3510
3510
|
comment: {
|
|
3511
3511
|
phrase: "graph.annotations.baseMenu.removeAnnotation",
|
|
3512
|
-
Icon:
|
|
3512
|
+
Icon: Yl
|
|
3513
3513
|
},
|
|
3514
3514
|
sticker: {
|
|
3515
3515
|
phrase: "graph.annotations.baseMenu.removeSticker",
|
|
3516
|
-
Icon:
|
|
3516
|
+
Icon: Qr
|
|
3517
3517
|
}
|
|
3518
3518
|
}, hs = /* @__PURE__ */ new Set([
|
|
3519
3519
|
"barSeries",
|
|
@@ -3524,7 +3524,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3524
3524
|
"linePoint",
|
|
3525
3525
|
"scatterPoint",
|
|
3526
3526
|
"pieSlice"
|
|
3527
|
-
]),
|
|
3527
|
+
]), ta = (e) => {
|
|
3528
3528
|
const t = ({ target: n }) => {
|
|
3529
3529
|
const r = Ah(n);
|
|
3530
3530
|
return r === null ? null : /* @__PURE__ */ a(l1, {
|
|
@@ -3532,8 +3532,8 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3532
3532
|
readHighlightOptions: e
|
|
3533
3533
|
});
|
|
3534
3534
|
};
|
|
3535
|
-
return t.hasRows = (n, { scene: r }) =>
|
|
3536
|
-
}, tn =
|
|
3535
|
+
return t.hasRows = (n, { scene: r }) => il(n, r) !== null, t;
|
|
3536
|
+
}, tn = ta((e, t) => Rm(t, e)), Ja = ta(Jl), i1 = ta(Ql), l1 = ({ anchor: e, readHighlightOptions: t }) => {
|
|
3537
3537
|
const { layer: n, observation: r, at: o } = e, i = R(), { dispatch: l, paintPreview: s, clearPreview: c } = Se(), { selectionStore: d } = W(), u = X(null), h = X(c);
|
|
3538
3538
|
h.current = c;
|
|
3539
3539
|
const { Button: p } = H(), g = F(($) => $), m = g.spec.annotations, f = g.config.parsingLocale, y = g.config.numberFormat, k = Sn(), C = {
|
|
@@ -3543,7 +3543,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3543
3543
|
groupOptions: En(g, k),
|
|
3544
3544
|
locale: k,
|
|
3545
3545
|
t: i
|
|
3546
|
-
}, w =
|
|
3546
|
+
}, w = fr(C, "xValue").value, P = fr(C, "group").value, T = rs(C).observation, I = fu(m, o, _(() => cu(n, f), [n, f])), N = I !== null && Wm(I) ? I : null, x = u.current, O = N !== null && x?.key.startsWith("sticker:") === !0 && N.kind === "sticker" ? null : N, A = O?.kind === "comment" ? O.annotation.content : null, S = A === null ? "" : C1(A) ?? void 0, [b, E] = Z(() => y1(N?.kind)), z = $m(n, r), U = g.coordSystem, j = t(n, U), se = j.length === 0 ? [] : Dm(n, r, k, y), ge = (x?.choiceId === void 0 ? z : z.filter(($) => es($, se) !== x.choiceId)).at(-1), de = _(() => Au({
|
|
3547
3547
|
layer: n,
|
|
3548
3548
|
at: o,
|
|
3549
3549
|
coordSystem: U
|
|
@@ -3559,10 +3559,10 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3559
3559
|
reaches: se,
|
|
3560
3560
|
previewedChoiceId: u.current?.choiceId,
|
|
3561
3561
|
scopeLabel: ($) => f1(i, $, w, P, T),
|
|
3562
|
-
scopeDescription: ($) => b1(i, $,
|
|
3562
|
+
scopeDescription: ($) => b1(i, $, Qa(i, n, j), w, P, j.some((me) => hs.has(me.labelKey))),
|
|
3563
3563
|
atLeastLabel: ($) => i("graph.annotations.highlights.atLeast", { value: $ }),
|
|
3564
3564
|
atLeastDescription: ($) => i("graph.annotations.highlights.atLeastDescription", {
|
|
3565
|
-
noun:
|
|
3565
|
+
noun: Qa(i, n, j),
|
|
3566
3566
|
value: $
|
|
3567
3567
|
}),
|
|
3568
3568
|
onwardLabel: ($) => i("graph.annotations.highlights.onward", { label: $ }),
|
|
@@ -3590,13 +3590,13 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3590
3590
|
onClick: () => ke($, me)
|
|
3591
3591
|
}), ot = ($) => {
|
|
3592
3592
|
G(), E((me) => me === $ ? null : $);
|
|
3593
|
-
},
|
|
3593
|
+
}, Ct = ($) => {
|
|
3594
3594
|
if (de === null) return;
|
|
3595
3595
|
G();
|
|
3596
|
-
const me =
|
|
3596
|
+
const me = Gr(de.start, o) ? de.end : de.start, Ue = new we({
|
|
3597
3597
|
kind: "differenceArrow",
|
|
3598
3598
|
annotation: {
|
|
3599
|
-
...
|
|
3599
|
+
...Si,
|
|
3600
3600
|
start: o,
|
|
3601
3601
|
end: me,
|
|
3602
3602
|
label: $
|
|
@@ -3626,7 +3626,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3626
3626
|
variant: "icon",
|
|
3627
3627
|
...Ke,
|
|
3628
3628
|
ariaLabel: i("graph.annotations.baseMenu.highlight"),
|
|
3629
|
-
icon: /* @__PURE__ */ a(
|
|
3629
|
+
icon: /* @__PURE__ */ a(Xa, {}),
|
|
3630
3630
|
expanded: b === "highlight",
|
|
3631
3631
|
onClick: () => ot("highlight")
|
|
3632
3632
|
}),
|
|
@@ -3634,21 +3634,21 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3634
3634
|
variant: "icon",
|
|
3635
3635
|
...Ke,
|
|
3636
3636
|
ariaLabel: i("graph.annotations.baseMenu.removeHighlight"),
|
|
3637
|
-
icon: /* @__PURE__ */ a(
|
|
3637
|
+
icon: /* @__PURE__ */ a(vr, { children: /* @__PURE__ */ a(Xa, {}) }),
|
|
3638
3638
|
onClick: () => re(new Md({ id: ge.id }))
|
|
3639
3639
|
}),
|
|
3640
3640
|
O !== null && /* @__PURE__ */ a(p, {
|
|
3641
3641
|
variant: "icon",
|
|
3642
3642
|
...Ke,
|
|
3643
3643
|
ariaLabel: i(us[O.kind].phrase),
|
|
3644
|
-
icon: /* @__PURE__ */ a(
|
|
3644
|
+
icon: /* @__PURE__ */ a(vr, { children: s1(O.kind) }),
|
|
3645
3645
|
onClick: () => re(new ze({ id: O.annotation.id }))
|
|
3646
3646
|
}),
|
|
3647
3647
|
O === null && /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(p, {
|
|
3648
3648
|
variant: "icon",
|
|
3649
3649
|
...Ke,
|
|
3650
3650
|
ariaLabel: i("graph.annotations.baseMenu.pinNumber"),
|
|
3651
|
-
icon: /* @__PURE__ */ a(
|
|
3651
|
+
icon: /* @__PURE__ */ a(Zl, {}),
|
|
3652
3652
|
onClick: () => re(new we({
|
|
3653
3653
|
kind: "pinnedNumber",
|
|
3654
3654
|
annotation: { at: o }
|
|
@@ -3657,7 +3657,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3657
3657
|
variant: "icon",
|
|
3658
3658
|
...Ke,
|
|
3659
3659
|
ariaLabel: i("graph.annotations.baseMenu.addNote"),
|
|
3660
|
-
icon: /* @__PURE__ */ a(
|
|
3660
|
+
icon: /* @__PURE__ */ a(Yl, {}),
|
|
3661
3661
|
expanded: b === "comment",
|
|
3662
3662
|
onClick: () => ot("comment")
|
|
3663
3663
|
})] }),
|
|
@@ -3673,7 +3673,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3673
3673
|
variant: "icon",
|
|
3674
3674
|
...Ke,
|
|
3675
3675
|
ariaLabel: i("graph.annotations.baseMenu.addSticker"),
|
|
3676
|
-
icon: /* @__PURE__ */ a(
|
|
3676
|
+
icon: /* @__PURE__ */ a(Qr, {}),
|
|
3677
3677
|
expanded: b === "sticker",
|
|
3678
3678
|
onClick: () => ot("sticker")
|
|
3679
3679
|
})
|
|
@@ -3708,7 +3708,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3708
3708
|
"aria-hidden": "true",
|
|
3709
3709
|
children: "%"
|
|
3710
3710
|
})] }),
|
|
3711
|
-
onClick: () =>
|
|
3711
|
+
onClick: () => Ct("relativeDifference")
|
|
3712
3712
|
}), /* @__PURE__ */ a(p, {
|
|
3713
3713
|
variant: "icon",
|
|
3714
3714
|
ariaLabel: i("graph.annotations.differenceArrowToolbar.labelKind.asNumber"),
|
|
@@ -3717,7 +3717,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3717
3717
|
"aria-hidden": "true",
|
|
3718
3718
|
children: "+n"
|
|
3719
3719
|
})] }),
|
|
3720
|
-
onClick: () =>
|
|
3720
|
+
onClick: () => Ct("absoluteDifference")
|
|
3721
3721
|
})]
|
|
3722
3722
|
}),
|
|
3723
3723
|
b === "highlight" && Ie !== null && /* @__PURE__ */ a("div", {
|
|
@@ -3862,7 +3862,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3862
3862
|
if (!hs.has(t)) return i;
|
|
3863
3863
|
const l = e("editor.overlayMenu.all");
|
|
3864
3864
|
return r === "" || r === l ? i : e("editor.overlayMenu.allOf", { name: r });
|
|
3865
|
-
},
|
|
3865
|
+
}, Qa = (e, t, n) => {
|
|
3866
3866
|
if (t.geom === "point" && Oe(t.mapping.size) !== null) return e("graph.annotations.highlights.nouns.bubble");
|
|
3867
3867
|
const r = n.find((o) => o.scope === "observation") ?? n[0];
|
|
3868
3868
|
return e(r === void 0 ? "graph.annotations.highlights.labels.pointOrBar" : `graph.annotations.highlights.labels.${r.labelKey}`);
|
|
@@ -3900,10 +3900,10 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3900
3900
|
}, C1 = (e) => {
|
|
3901
3901
|
if (e.type !== "doc" || e.content?.length !== 1) return null;
|
|
3902
3902
|
const t = e.content[0];
|
|
3903
|
-
if (t?.type !== "paragraph" ||
|
|
3903
|
+
if (t?.type !== "paragraph" || eo(t) || to(t) || t.content?.length !== 1) return null;
|
|
3904
3904
|
const n = t.content[0];
|
|
3905
|
-
return n?.type !== "text" || n.text === void 0 || n.content !== void 0 ||
|
|
3906
|
-
},
|
|
3905
|
+
return n?.type !== "text" || n.text === void 0 || n.content !== void 0 || eo(n) || to(n) ? null : n.text;
|
|
3906
|
+
}, eo = (e) => e.marks !== void 0 && e.marks.length > 0, to = (e) => e.attrs !== void 0 && Object.keys(e.attrs).length > 0, w1 = (e) => ({
|
|
3907
3907
|
type: "doc",
|
|
3908
3908
|
content: [{
|
|
3909
3909
|
type: "paragraph",
|
|
@@ -3919,15 +3919,15 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
|
|
|
3919
3919
|
target: e
|
|
3920
3920
|
});
|
|
3921
3921
|
};
|
|
3922
|
-
ps.hasRows = (e, t) =>
|
|
3922
|
+
ps.hasRows = (e, t) => bt(q(t.scene.spec.layers, e.layerId), "point") ? !0 : He.hasRows(e, t);
|
|
3923
3923
|
var x1 = ({ graph: e, target: t }) => {
|
|
3924
3924
|
const n = Q(e), r = ee(), o = n === null ? void 0 : q(n.spec.layers, t.layerId);
|
|
3925
|
-
if (n === null || !
|
|
3925
|
+
if (n === null || !bt(o, "point")) return /* @__PURE__ */ a(He, { target: t });
|
|
3926
3926
|
const i = An(n.spec, t)?.find((c) => c.geomKind === "point")?.where, l = i === void 0 ? {} : { where: i }, s = Oe(q(n.layers, o.id)?.mapping.size) !== null;
|
|
3927
3927
|
return /* @__PURE__ */ v(K, { children: [
|
|
3928
3928
|
/* @__PURE__ */ a(He, { target: t }),
|
|
3929
|
-
!s && /* @__PURE__ */ a(
|
|
3930
|
-
sizePx:
|
|
3929
|
+
!s && /* @__PURE__ */ a(Jr, {
|
|
3930
|
+
sizePx: Kl(n, r, o.id, i),
|
|
3931
3931
|
onChange: (c) => {
|
|
3932
3932
|
e.commands.dispatch(new wn({
|
|
3933
3933
|
layerId: o.id,
|
|
@@ -3936,11 +3936,11 @@ var x1 = ({ graph: e, target: t }) => {
|
|
|
3936
3936
|
}));
|
|
3937
3937
|
}
|
|
3938
3938
|
}),
|
|
3939
|
-
/* @__PURE__ */ a(
|
|
3940
|
-
symbol:
|
|
3939
|
+
/* @__PURE__ */ a(Zr, {
|
|
3940
|
+
symbol: jl(n, r, o.id, i),
|
|
3941
3941
|
coordType: n.coordSystem.type,
|
|
3942
3942
|
onChange: (c) => {
|
|
3943
|
-
e.commands.dispatch(new
|
|
3943
|
+
e.commands.dispatch(new Br({
|
|
3944
3944
|
layerId: o.id,
|
|
3945
3945
|
symbol: c,
|
|
3946
3946
|
...l
|
|
@@ -3956,14 +3956,14 @@ var x1 = ({ graph: e, target: t }) => {
|
|
|
3956
3956
|
},
|
|
3957
3957
|
line: {
|
|
3958
3958
|
style: mr,
|
|
3959
|
-
annotate:
|
|
3959
|
+
annotate: Ja
|
|
3960
3960
|
},
|
|
3961
3961
|
area: {
|
|
3962
3962
|
style: mr,
|
|
3963
|
-
annotate:
|
|
3963
|
+
annotate: Ja
|
|
3964
3964
|
},
|
|
3965
3965
|
bar: {
|
|
3966
|
-
style:
|
|
3966
|
+
style: Tl,
|
|
3967
3967
|
annotate: tn
|
|
3968
3968
|
},
|
|
3969
3969
|
rule: {
|
|
@@ -3976,17 +3976,17 @@ var x1 = ({ graph: e, target: t }) => {
|
|
|
3976
3976
|
}
|
|
3977
3977
|
},
|
|
3978
3978
|
legend: Cm,
|
|
3979
|
-
axis:
|
|
3980
|
-
grid:
|
|
3981
|
-
graph:
|
|
3982
|
-
},
|
|
3979
|
+
axis: wl,
|
|
3980
|
+
grid: Ul,
|
|
3981
|
+
graph: Bl
|
|
3982
|
+
}, na = Je([gs]), k1 = ({ editMenus: e, children: t }) => {
|
|
3983
3983
|
const n = _(() => [e ?? {}, gs], [e]);
|
|
3984
|
-
return /* @__PURE__ */ a(
|
|
3984
|
+
return /* @__PURE__ */ a(na.Provider, {
|
|
3985
3985
|
value: n,
|
|
3986
3986
|
children: t
|
|
3987
3987
|
});
|
|
3988
3988
|
}, T1 = (e) => {
|
|
3989
|
-
const t = Ce(
|
|
3989
|
+
const t = Ce(na), n = F((l) => l), { findGeom: r } = W(), o = Rr(), i = ms(ye());
|
|
3990
3990
|
return _(() => e === null ? null : vs(e, t, {
|
|
3991
3991
|
scene: n,
|
|
3992
3992
|
dataLabelPlacement: o,
|
|
@@ -4000,7 +4000,7 @@ var x1 = ({ graph: e, target: t }) => {
|
|
|
4000
4000
|
i
|
|
4001
4001
|
]);
|
|
4002
4002
|
}, A1 = () => {
|
|
4003
|
-
const e = Ce(
|
|
4003
|
+
const e = Ce(na), { store: t, findGeom: n } = W(), r = Rr(), o = ms(ye());
|
|
4004
4004
|
return ce((i) => vs(i, e, {
|
|
4005
4005
|
scene: t.getState().scene,
|
|
4006
4006
|
dataLabelPlacement: r,
|
|
@@ -6580,16 +6580,16 @@ var x1 = ({ graph: e, target: t }) => {
|
|
|
6580
6580
|
dictionaries: $1,
|
|
6581
6581
|
...t,
|
|
6582
6582
|
children: /* @__PURE__ */ a(V1, { children: e })
|
|
6583
|
-
}), V1 = ({ children: e }) => /* @__PURE__ */ a(
|
|
6584
|
-
direction:
|
|
6583
|
+
}), V1 = ({ children: e }) => /* @__PURE__ */ a(jr, {
|
|
6584
|
+
direction: ui(),
|
|
6585
6585
|
children: e
|
|
6586
|
-
}), W1 = "data-variant", bs =
|
|
6586
|
+
}), W1 = "data-variant", bs = al.extend({ addAttributes() {
|
|
6587
6587
|
return { variant: {
|
|
6588
6588
|
default: null,
|
|
6589
6589
|
parseHTML: (e) => e.getAttribute("data-variant") ?? null,
|
|
6590
6590
|
renderHTML: (e) => e.variant ? { [W1]: e.variant } : {}
|
|
6591
6591
|
} };
|
|
6592
|
-
} }), U1 =
|
|
6592
|
+
} }), U1 = nl.create({
|
|
6593
6593
|
name: "preventBackspaceAcrossTitleBoundary",
|
|
6594
6594
|
addOptions() {
|
|
6595
6595
|
return { showTitle: !0 };
|
|
@@ -6603,7 +6603,7 @@ var x1 = ({ graph: e, target: t }) => {
|
|
|
6603
6603
|
return n.depth !== 1 || n.parentOffset !== 0 ? !1 : n.index(0) === 1;
|
|
6604
6604
|
} };
|
|
6605
6605
|
}
|
|
6606
|
-
}),
|
|
6606
|
+
}), ra = () => [
|
|
6607
6607
|
vh,
|
|
6608
6608
|
Ch,
|
|
6609
6609
|
ph.configure({ levels: [
|
|
@@ -6628,10 +6628,10 @@ var x1 = ({ graph: e, target: t }) => {
|
|
|
6628
6628
|
showSubtitle: r
|
|
6629
6629
|
}),
|
|
6630
6630
|
bs,
|
|
6631
|
-
...
|
|
6632
|
-
|
|
6631
|
+
...ra(),
|
|
6632
|
+
rl,
|
|
6633
6633
|
U1.configure({ showTitle: n }),
|
|
6634
|
-
|
|
6634
|
+
Xr.configure({
|
|
6635
6635
|
showOnlyCurrent: !1,
|
|
6636
6636
|
placeholder: ({ pos: o, editor: i }) => {
|
|
6637
6637
|
if (n && o === 0) return e;
|
|
@@ -6642,16 +6642,16 @@ var x1 = ({ graph: e, target: t }) => {
|
|
|
6642
6642
|
], j1 = ({ placeholder: e }) => [
|
|
6643
6643
|
on,
|
|
6644
6644
|
bs,
|
|
6645
|
-
...
|
|
6646
|
-
|
|
6647
|
-
|
|
6645
|
+
...ra(),
|
|
6646
|
+
rl,
|
|
6647
|
+
Xr.configure({
|
|
6648
6648
|
showOnlyCurrent: !1,
|
|
6649
6649
|
placeholder: ({ pos: t }) => t === 0 ? e : ""
|
|
6650
6650
|
})
|
|
6651
6651
|
], X1 = ({ showTitle: e, showSubtitle: t }) => e && t ? on.extend({ content: "block{2,}" }) : on;
|
|
6652
6652
|
var q1 = "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))", Y1 = "d0bl00";
|
|
6653
|
-
var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01,
|
|
6654
|
-
const u = R(), { ColorSwatches: h, Slider: p } = H(), g = ov(), m = d ? [
|
|
6653
|
+
var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, yr = ci.map((e) => ve[e]), ev = Object.fromEntries(ci.map((e) => [ve[e], e])), tv = (e) => yr.some((t) => t.toLowerCase() === e.toLowerCase()), nv = ({ color: e, onChange: t, open: n, onOpenChange: r, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: d = !1 }) => {
|
|
6654
|
+
const u = R(), { ColorSwatches: h, Slider: p } = H(), g = ov(), m = d ? [pl, ...yr] : yr, f = (y) => {
|
|
6655
6655
|
t(y), r(!1);
|
|
6656
6656
|
};
|
|
6657
6657
|
return /* @__PURE__ */ v(le.Root, {
|
|
@@ -6716,7 +6716,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
6716
6716
|
})]
|
|
6717
6717
|
});
|
|
6718
6718
|
}, rv = (e, t) => {
|
|
6719
|
-
if (
|
|
6719
|
+
if (li(e)) return e;
|
|
6720
6720
|
const n = ev[e];
|
|
6721
6721
|
return n === void 0 ? e : t[n];
|
|
6722
6722
|
}, av = ({ value: e, onChange: t, popupAttributes: n }) => {
|
|
@@ -6769,7 +6769,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
6769
6769
|
className: Ze(sv, e)
|
|
6770
6770
|
}), fv = ({ children: e }) => {
|
|
6771
6771
|
const t = Pe();
|
|
6772
|
-
return t === null ? null :
|
|
6772
|
+
return t === null ? null : Kr(/* @__PURE__ */ a(Ne, { children: e }), t);
|
|
6773
6773
|
}, ie = {
|
|
6774
6774
|
Portal: fv,
|
|
6775
6775
|
Root: gv,
|
|
@@ -6779,12 +6779,12 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
6779
6779
|
ColorPicker: nv,
|
|
6780
6780
|
MenuPopup: hv,
|
|
6781
6781
|
MenuItem: pv
|
|
6782
|
-
}, bv = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", yv = `'Aeonik', 'Aeonik Fallback', ${
|
|
6782
|
+
}, bv = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", yv = `'Aeonik', 'Aeonik Fallback', ${gi}`, Sv = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Cv = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", Sr = [
|
|
6783
6783
|
{
|
|
6784
6784
|
id: "modern",
|
|
6785
6785
|
label: "Modern",
|
|
6786
6786
|
preview: "Aa",
|
|
6787
|
-
fontFamily:
|
|
6787
|
+
fontFamily: gi
|
|
6788
6788
|
},
|
|
6789
6789
|
{
|
|
6790
6790
|
id: "fresh",
|
|
@@ -6810,8 +6810,8 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
6810
6810
|
preview: "Aa",
|
|
6811
6811
|
fontFamily: Cv
|
|
6812
6812
|
}
|
|
6813
|
-
], wv = (e) => e ?
|
|
6814
|
-
const o = R(), i = wv(t) ??
|
|
6813
|
+
], wv = (e) => e ? Sr.find((t) => t.fontFamily === e) ?? null : null, ys = "_70l3rt0", Ss = "_70l3rt1", Cs = "_70l3rt3", ws = "_70l3rt4", xs = "_70l3rt5", xv = ({ editor: e, currentFontFamily: t, open: n, onOpenChange: r }) => {
|
|
6814
|
+
const o = R(), i = wv(t) ?? Sr[0], l = (s) => {
|
|
6815
6815
|
e.chain().focus().setFontFamily(s.fontFamily).run();
|
|
6816
6816
|
};
|
|
6817
6817
|
return /* @__PURE__ */ v(pe.Root, {
|
|
@@ -6838,7 +6838,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
6838
6838
|
children: /* @__PURE__ */ a(pe.Popup, {
|
|
6839
6839
|
className: ws,
|
|
6840
6840
|
onMouseDown: (s) => s.preventDefault(),
|
|
6841
|
-
children:
|
|
6841
|
+
children: Sr.map((s) => /* @__PURE__ */ a(pe.Item, {
|
|
6842
6842
|
className: xs,
|
|
6843
6843
|
"data-selected": s.id === i?.id,
|
|
6844
6844
|
onClick: () => l(s),
|
|
@@ -6855,7 +6855,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
6855
6855
|
id: "text",
|
|
6856
6856
|
translationKey: "graph.toolbar.heading.text",
|
|
6857
6857
|
previewFont: ve.fontTextEditorBody
|
|
6858
|
-
},
|
|
6858
|
+
}, no = [
|
|
6859
6859
|
{
|
|
6860
6860
|
id: "caption",
|
|
6861
6861
|
translationKey: "graph.toolbar.heading.caption",
|
|
@@ -6878,7 +6878,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
6878
6878
|
previewFont: ve.fontTextEditorH1
|
|
6879
6879
|
}
|
|
6880
6880
|
], kv = ({ editor: e, activeStyle: t, open: n, onOpenChange: r }) => {
|
|
6881
|
-
const o = R(), i =
|
|
6881
|
+
const o = R(), i = no.find((l) => l.id === t) ?? ks;
|
|
6882
6882
|
return /* @__PURE__ */ v(pe.Root, {
|
|
6883
6883
|
open: n,
|
|
6884
6884
|
onOpenChange: r,
|
|
@@ -6902,7 +6902,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
6902
6902
|
children: /* @__PURE__ */ a(pe.Popup, {
|
|
6903
6903
|
className: ws,
|
|
6904
6904
|
onMouseDown: (l) => l.preventDefault(),
|
|
6905
|
-
children:
|
|
6905
|
+
children: no.map((l) => /* @__PURE__ */ a(pe.Item, {
|
|
6906
6906
|
className: xs,
|
|
6907
6907
|
"data-selected": l.id === i.id,
|
|
6908
6908
|
onClick: () => Tv(e, l.id),
|
|
@@ -6959,14 +6959,14 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
6959
6959
|
}), Iv = (e) => !e.content || e.content.length === 0 ? !0 : e.content.every((t) => !t.content || t.content.length === 0), Mv = (e) => {
|
|
6960
6960
|
const { $from: t } = e.state.selection, n = t.parent.textContent, r = t.parentOffset, o = t.start();
|
|
6961
6961
|
let i = r;
|
|
6962
|
-
for (; i > 0 &&
|
|
6962
|
+
for (; i > 0 && ro(n[i - 1]); ) i -= 1;
|
|
6963
6963
|
let l = r;
|
|
6964
|
-
for (; l < n.length &&
|
|
6964
|
+
for (; l < n.length && ro(n[l]); ) l += 1;
|
|
6965
6965
|
return {
|
|
6966
6966
|
from: o + i,
|
|
6967
6967
|
to: o + l
|
|
6968
6968
|
};
|
|
6969
|
-
},
|
|
6969
|
+
}, ro = (e) => e !== void 0 && /\S/.test(e), Ev = "fop13s0", Ov = "fop13s1", Rv = "fop13s2", Nv = "fop13s3", ao = "fop13s4", Dv = ({ editor: e, currentUrl: t, active: n, open: r, onOpenChange: o }) => {
|
|
6970
6970
|
const i = R(), [l, s] = Z(""), c = X(null);
|
|
6971
6971
|
B(() => {
|
|
6972
6972
|
r && s(t ?? "");
|
|
@@ -7016,16 +7016,16 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7016
7016
|
/* @__PURE__ */ a("button", {
|
|
7017
7017
|
type: "button",
|
|
7018
7018
|
"aria-label": i("common.cancel"),
|
|
7019
|
-
className:
|
|
7019
|
+
className: ao,
|
|
7020
7020
|
onClick: u,
|
|
7021
7021
|
children: /* @__PURE__ */ a(Lv, {})
|
|
7022
7022
|
}),
|
|
7023
7023
|
/* @__PURE__ */ a("button", {
|
|
7024
7024
|
type: "button",
|
|
7025
7025
|
"aria-label": i("graph.toolbar.link.apply"),
|
|
7026
|
-
className:
|
|
7026
|
+
className: ao,
|
|
7027
7027
|
onClick: d,
|
|
7028
|
-
children: /* @__PURE__ */ a(
|
|
7028
|
+
children: /* @__PURE__ */ a(yl, {})
|
|
7029
7029
|
})
|
|
7030
7030
|
]
|
|
7031
7031
|
})
|
|
@@ -7087,7 +7087,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7087
7087
|
/* @__PURE__ */ a("path", { d: "M17 19H3" })
|
|
7088
7088
|
]
|
|
7089
7089
|
})
|
|
7090
|
-
}), Fv = "_1d66w570", zv = "_1d66w571",
|
|
7090
|
+
}), Fv = "_1d66w570", zv = "_1d66w571", pt = ({ label: e, active: t, onToggle: n, children: r }) => {
|
|
7091
7091
|
const o = (i) => i.preventDefault();
|
|
7092
7092
|
return /* @__PURE__ */ v(Te.Root, { children: [/* @__PURE__ */ a(Te.Trigger, {
|
|
7093
7093
|
render: /* @__PURE__ */ a(kh, {
|
|
@@ -7102,11 +7102,11 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7102
7102
|
}), /* @__PURE__ */ a(Te.Portal, {
|
|
7103
7103
|
container: Pe(),
|
|
7104
7104
|
className: _e,
|
|
7105
|
-
children: /* @__PURE__ */ a(
|
|
7105
|
+
children: /* @__PURE__ */ a(qr, { children: /* @__PURE__ */ a(Te.Positioner, {
|
|
7106
7106
|
sideOffset: 6,
|
|
7107
7107
|
className: zv,
|
|
7108
7108
|
children: /* @__PURE__ */ a(Te.Popup, {
|
|
7109
|
-
className:
|
|
7109
|
+
className: cl,
|
|
7110
7110
|
children: e
|
|
7111
7111
|
})
|
|
7112
7112
|
}) })
|
|
@@ -7114,19 +7114,19 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7114
7114
|
}, Bv = ({ editor: e, activeAlignment: t = "left" }) => {
|
|
7115
7115
|
const n = R();
|
|
7116
7116
|
return /* @__PURE__ */ v(K, { children: [
|
|
7117
|
-
/* @__PURE__ */ a(
|
|
7117
|
+
/* @__PURE__ */ a(pt, {
|
|
7118
7118
|
label: n("graph.toolbar.textAlign.left"),
|
|
7119
7119
|
active: t === "left",
|
|
7120
7120
|
onToggle: () => e.chain().focus().setTextAlign("left").run(),
|
|
7121
7121
|
children: /* @__PURE__ */ a(Ps, {})
|
|
7122
7122
|
}),
|
|
7123
|
-
/* @__PURE__ */ a(
|
|
7123
|
+
/* @__PURE__ */ a(pt, {
|
|
7124
7124
|
label: n("graph.toolbar.textAlign.center"),
|
|
7125
7125
|
active: t === "center",
|
|
7126
7126
|
onToggle: () => e.chain().focus().setTextAlign("center").run(),
|
|
7127
7127
|
children: /* @__PURE__ */ a(Ts, {})
|
|
7128
7128
|
}),
|
|
7129
|
-
/* @__PURE__ */ a(
|
|
7129
|
+
/* @__PURE__ */ a(pt, {
|
|
7130
7130
|
label: n("graph.toolbar.textAlign.right"),
|
|
7131
7131
|
active: t === "right",
|
|
7132
7132
|
onToggle: () => e.chain().focus().setTextAlign("right").run(),
|
|
@@ -7197,19 +7197,19 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7197
7197
|
}) }),
|
|
7198
7198
|
/* @__PURE__ */ a(ie.Separator, {}),
|
|
7199
7199
|
/* @__PURE__ */ v(ie.Group, { children: [
|
|
7200
|
-
/* @__PURE__ */ a(
|
|
7200
|
+
/* @__PURE__ */ a(pt, {
|
|
7201
7201
|
label: t("graph.toolbar.formatting.bold"),
|
|
7202
7202
|
active: h?.bold ?? !1,
|
|
7203
7203
|
onToggle: () => e.chain().focus().toggleBold().run(),
|
|
7204
7204
|
children: /* @__PURE__ */ a("strong", { children: "B" })
|
|
7205
7205
|
}),
|
|
7206
|
-
/* @__PURE__ */ a(
|
|
7206
|
+
/* @__PURE__ */ a(pt, {
|
|
7207
7207
|
label: t("graph.toolbar.formatting.italic"),
|
|
7208
7208
|
active: h?.italic ?? !1,
|
|
7209
7209
|
onToggle: () => e.chain().focus().toggleItalic().run(),
|
|
7210
7210
|
children: /* @__PURE__ */ a("em", { children: "I" })
|
|
7211
7211
|
}),
|
|
7212
|
-
/* @__PURE__ */ a(
|
|
7212
|
+
/* @__PURE__ */ a(pt, {
|
|
7213
7213
|
label: t("graph.toolbar.formatting.underline"),
|
|
7214
7214
|
active: h?.underlined ?? !1,
|
|
7215
7215
|
onToggle: () => e.chain().focus().toggleUnderline().run(),
|
|
@@ -7233,12 +7233,12 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7233
7233
|
}) });
|
|
7234
7234
|
}, jv = "_1uy50v30", Ls = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ v("div", {
|
|
7235
7235
|
className: jv,
|
|
7236
|
-
children: [/* @__PURE__ */ a(Kv, { editor: e }), /* @__PURE__ */ a(
|
|
7236
|
+
children: [/* @__PURE__ */ a(Kv, { editor: e }), /* @__PURE__ */ a(ol, {
|
|
7237
7237
|
editor: e,
|
|
7238
7238
|
"aria-label": t
|
|
7239
7239
|
})]
|
|
7240
|
-
}), Xv = 200,
|
|
7241
|
-
const i = X(
|
|
7240
|
+
}), Xv = 200, aa = ({ content: e, extensions: t, editable: n, onUpdate: r, updateDebounceMs: o = Xv }) => {
|
|
7241
|
+
const i = X(oo(e)), l = X(i.current), s = Lc((d) => {
|
|
7242
7242
|
l.current = d, r?.(d);
|
|
7243
7243
|
}, o), c = wh({
|
|
7244
7244
|
extensions: t,
|
|
@@ -7255,14 +7255,14 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7255
7255
|
c?.setEditable(n);
|
|
7256
7256
|
}, [c, n]), B(() => {
|
|
7257
7257
|
if (!c) return;
|
|
7258
|
-
const d =
|
|
7258
|
+
const d = oo(e);
|
|
7259
7259
|
jn(l.current, d) || (l.current = d, !jn(c.getJSON(), d) && (s.cancel(), qv(c, d)));
|
|
7260
7260
|
}, [
|
|
7261
7261
|
c,
|
|
7262
7262
|
e,
|
|
7263
7263
|
s
|
|
7264
7264
|
]), B(() => () => s.flush(), [s]), c;
|
|
7265
|
-
},
|
|
7265
|
+
}, oo = (e) => e === null ? {
|
|
7266
7266
|
type: "doc",
|
|
7267
7267
|
content: []
|
|
7268
7268
|
} : typeof e == "string" ? {
|
|
@@ -7283,13 +7283,13 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7283
7283
|
to: Math.min(r, o)
|
|
7284
7284
|
});
|
|
7285
7285
|
}, jn = (e, t) => JSON.stringify(pn(e)) === JSON.stringify(pn(t)), pn = (e) => Array.isArray(e) ? e.map(pn) : e === null || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [t, pn(n)]).filter(([, t]) => !Yv(t)).sort(([t], [n]) => String(t).localeCompare(String(n)))), Yv = (e) => e == null || typeof e == "object" && Object.keys(e).length === 0, Zv = ({ caption: e, captionStyle: t }) => {
|
|
7286
|
-
const { dispatch: n } = Se(), r =
|
|
7286
|
+
const { dispatch: n } = Se(), r = aa({
|
|
7287
7287
|
content: e,
|
|
7288
7288
|
extensions: _(() => j1({ placeholder: "Add caption" }), []),
|
|
7289
7289
|
editable: !0,
|
|
7290
7290
|
onUpdate: (o) => {
|
|
7291
7291
|
const i = Iv(o) ? null : o;
|
|
7292
|
-
n(new
|
|
7292
|
+
n(new Pi({ caption: i }));
|
|
7293
7293
|
}
|
|
7294
7294
|
});
|
|
7295
7295
|
return /* @__PURE__ */ a("div", {
|
|
@@ -7302,15 +7302,15 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7302
7302
|
});
|
|
7303
7303
|
}, Jv = (e) => [
|
|
7304
7304
|
on,
|
|
7305
|
-
|
|
7306
|
-
...
|
|
7305
|
+
al,
|
|
7306
|
+
...ra(),
|
|
7307
7307
|
e2,
|
|
7308
|
-
|
|
7308
|
+
Xr.configure({
|
|
7309
7309
|
showOnlyCurrent: !1,
|
|
7310
7310
|
placeholder: ({ pos: t }) => t === 0 ? e : ""
|
|
7311
7311
|
})
|
|
7312
7312
|
], Qv = ({ annotation: e }) => {
|
|
7313
|
-
const t = R(), { dispatch: n } = Se(), r = ae(), o = _(() => Jv(t("graph.annotations.text.placeholder")), [t]), i =
|
|
7313
|
+
const t = R(), { dispatch: n } = Se(), r = ae(), o = _(() => Jv(t("graph.annotations.text.placeholder")), [t]), i = aa({
|
|
7314
7314
|
content: e.content,
|
|
7315
7315
|
extensions: o,
|
|
7316
7316
|
editable: !0,
|
|
@@ -7327,16 +7327,16 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7327
7327
|
return l(i), () => l(null);
|
|
7328
7328
|
}, [i, r]), B(() => {
|
|
7329
7329
|
i?.commands.focus("end", { scrollIntoView: !1 });
|
|
7330
|
-
}, [i]), /* @__PURE__ */ a(
|
|
7330
|
+
}, [i]), /* @__PURE__ */ a(ol, {
|
|
7331
7331
|
"aria-label": t("graph.annotations.text.editLabel"),
|
|
7332
7332
|
className: Zc,
|
|
7333
7333
|
editor: i,
|
|
7334
7334
|
"data-testid": "text-annotation-editor"
|
|
7335
7335
|
});
|
|
7336
|
-
},
|
|
7336
|
+
}, io = (e) => {
|
|
7337
7337
|
const t = vd(e);
|
|
7338
7338
|
return t === void 0 ? {} : { style: `font-family: ${t}` };
|
|
7339
|
-
}, e2 =
|
|
7339
|
+
}, e2 = nl.create({
|
|
7340
7340
|
name: "annotationTextStyleAttributes",
|
|
7341
7341
|
addGlobalAttributes() {
|
|
7342
7342
|
return [{
|
|
@@ -7344,11 +7344,11 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7344
7344
|
attributes: {
|
|
7345
7345
|
fontFamily: {
|
|
7346
7346
|
default: null,
|
|
7347
|
-
renderHTML: (e) =>
|
|
7347
|
+
renderHTML: (e) => io(e.fontFamily)
|
|
7348
7348
|
},
|
|
7349
7349
|
font: {
|
|
7350
7350
|
default: null,
|
|
7351
|
-
renderHTML: (e) =>
|
|
7351
|
+
renderHTML: (e) => io(e.font)
|
|
7352
7352
|
},
|
|
7353
7353
|
fontSize: {
|
|
7354
7354
|
default: null,
|
|
@@ -7373,9 +7373,9 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7373
7373
|
title: i2(t?.content ?? []),
|
|
7374
7374
|
subtitle: l2(n)
|
|
7375
7375
|
};
|
|
7376
|
-
},
|
|
7376
|
+
}, oa = (e) => ({
|
|
7377
7377
|
type: e.type ?? "text",
|
|
7378
|
-
...e.content !== void 0 ? { content: e.content.map(
|
|
7378
|
+
...e.content !== void 0 ? { content: e.content.map(oa) } : {},
|
|
7379
7379
|
...e.text !== void 0 ? { text: e.text } : {},
|
|
7380
7380
|
...e.marks !== void 0 ? { marks: e.marks } : {},
|
|
7381
7381
|
...e.attrs !== void 0 ? { attrs: e.attrs } : {}
|
|
@@ -7388,7 +7388,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7388
7388
|
type: "text",
|
|
7389
7389
|
text: e
|
|
7390
7390
|
}]
|
|
7391
|
-
}] : e.type === "doc" && e.content ? e.content.length === 0 ? [{ type: "paragraph" }] : e.content.map(
|
|
7391
|
+
}] : e.type === "doc" && e.content ? e.content.length === 0 ? [{ type: "paragraph" }] : e.content.map(lo) : [lo(e)], lo = (e) => e.type === "paragraph" ? e : {
|
|
7392
7392
|
type: "paragraph",
|
|
7393
7393
|
content: e.content ?? [e]
|
|
7394
7394
|
}, i2 = (e) => {
|
|
@@ -7396,7 +7396,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7396
7396
|
const [t] = e;
|
|
7397
7397
|
return t && e.length === 1 && t.type === "text" && (!t.marks || t.marks.length === 0) ? t.text ?? null : {
|
|
7398
7398
|
type: "paragraph",
|
|
7399
|
-
content: e.map(
|
|
7399
|
+
content: e.map(oa)
|
|
7400
7400
|
};
|
|
7401
7401
|
}, l2 = (e) => {
|
|
7402
7402
|
const t = e.filter((r) => (r.content ?? []).length > 0);
|
|
@@ -7408,7 +7408,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7408
7408
|
}
|
|
7409
7409
|
return {
|
|
7410
7410
|
type: "doc",
|
|
7411
|
-
content: t.map(
|
|
7411
|
+
content: t.map(oa)
|
|
7412
7412
|
};
|
|
7413
7413
|
}, s2 = "uwf6lt0", c2 = {
|
|
7414
7414
|
fontFamily: "var(--uwf6lt1)",
|
|
@@ -7440,7 +7440,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7440
7440
|
subtitlePlaceholder: "Untitled",
|
|
7441
7441
|
showTitle: t,
|
|
7442
7442
|
showSubtitle: n
|
|
7443
|
-
}), [t, n]), c =
|
|
7443
|
+
}), [t, n]), c = aa({
|
|
7444
7444
|
content: _(() => n2({
|
|
7445
7445
|
title: e,
|
|
7446
7446
|
showTitle: t,
|
|
@@ -7456,15 +7456,15 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7456
7456
|
editable: !0,
|
|
7457
7457
|
onUpdate: (d) => {
|
|
7458
7458
|
const u = r2(d);
|
|
7459
|
-
t && l(new
|
|
7459
|
+
t && l(new Ii({ title: u.title })), n && l(new Li({ subtitle: u.subtitle }));
|
|
7460
7460
|
}
|
|
7461
7461
|
});
|
|
7462
7462
|
return /* @__PURE__ */ a("div", {
|
|
7463
7463
|
className: s2,
|
|
7464
7464
|
"data-testid": "title-editor",
|
|
7465
7465
|
style: {
|
|
7466
|
-
...
|
|
7467
|
-
...
|
|
7466
|
+
...xa(c2, o),
|
|
7467
|
+
...xa(d2, i)
|
|
7468
7468
|
},
|
|
7469
7469
|
children: /* @__PURE__ */ a(Ls, {
|
|
7470
7470
|
editor: c,
|
|
@@ -7475,7 +7475,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7475
7475
|
Title: u2,
|
|
7476
7476
|
Caption: Zv,
|
|
7477
7477
|
TextAnnotation: Qv
|
|
7478
|
-
}, p2 = "_10igzta0", g2 = ({ rect: e, zIndex: t, container: n, boxRef: r, children: o, ...i }) => n === null ? null :
|
|
7478
|
+
}, p2 = "_10igzta0", g2 = ({ rect: e, zIndex: t, container: n, boxRef: r, children: o, ...i }) => n === null ? null : Kr(/* @__PURE__ */ a("div", {
|
|
7479
7479
|
...i,
|
|
7480
7480
|
ref: r,
|
|
7481
7481
|
className: p2,
|
|
@@ -7486,10 +7486,10 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7486
7486
|
zIndex: t
|
|
7487
7487
|
},
|
|
7488
7488
|
children: o
|
|
7489
|
-
}), n), m2 = "kwvn4c0", v2 = "kwvn4c1",
|
|
7489
|
+
}), n), m2 = "kwvn4c0", v2 = "kwvn4c1", ia = (e, t) => {
|
|
7490
7490
|
const { offsetWidth: n } = e;
|
|
7491
7491
|
return n <= 0 || t <= 0 ? 1 : t / n;
|
|
7492
|
-
}, Is = (e) =>
|
|
7492
|
+
}, Is = (e) => ia(e, e.getBoundingClientRect().width), Cr = (e, t) => {
|
|
7493
7493
|
const { offsetWidth: n, offsetHeight: r } = e;
|
|
7494
7494
|
return n <= 0 || r <= 0 ? t : {
|
|
7495
7495
|
width: n,
|
|
@@ -7498,28 +7498,28 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7498
7498
|
}, f2 = (e, t) => ({
|
|
7499
7499
|
contextElement: e,
|
|
7500
7500
|
getBoundingClientRect: () => {
|
|
7501
|
-
const n = e.getBoundingClientRect(), r =
|
|
7501
|
+
const n = e.getBoundingClientRect(), r = ia(e, n.width);
|
|
7502
7502
|
return new DOMRect(n.left + t.x * r, n.top + t.y * r, t.width * r, t.height * r);
|
|
7503
7503
|
}
|
|
7504
7504
|
}), b2 = ({ side: e, boundary: t, spans: n, anchor: r, rightToLeft: o }) => {
|
|
7505
7505
|
if (!S2(e)) return 0;
|
|
7506
7506
|
const i = n[e];
|
|
7507
|
-
if (e === "left" || e === "right") return
|
|
7507
|
+
if (e === "left" || e === "right") return so(i.from - t.y, r.height, t.height);
|
|
7508
7508
|
const l = o ? t.x + t.width - i.to : i.from - t.x;
|
|
7509
|
-
return
|
|
7509
|
+
return so(l, r.width, t.width);
|
|
7510
7510
|
}, y2 = () => {
|
|
7511
7511
|
const [e, t] = Z(!1);
|
|
7512
7512
|
return B(() => {
|
|
7513
7513
|
t(!0);
|
|
7514
7514
|
}, []), e;
|
|
7515
|
-
}, S2 = (e) => Rc.some((t) => t === e),
|
|
7515
|
+
}, S2 = (e) => Rc.some((t) => t === e), so = (e, t, n) => n === 0 ? 0 : e * t / n, C2 = {
|
|
7516
7516
|
x: 8,
|
|
7517
7517
|
y: 8
|
|
7518
7518
|
}, w2 = {
|
|
7519
7519
|
side: "flip",
|
|
7520
7520
|
align: "shift",
|
|
7521
7521
|
fallbackAxisSide: "end"
|
|
7522
|
-
},
|
|
7522
|
+
}, wr = ({ frameElement: e, boundary: t, spans: n, clearance: r = C2, onEscape: o, children: i }) => {
|
|
7523
7523
|
const l = Ln(), s = y2(), [c, d] = Z(null), u = X(null), h = ce((P) => {
|
|
7524
7524
|
u.current = P, d(P);
|
|
7525
7525
|
}, []), p = X(null);
|
|
@@ -7550,7 +7550,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7550
7550
|
children: /* @__PURE__ */ a(le.Portal, {
|
|
7551
7551
|
container: l,
|
|
7552
7552
|
className: _e,
|
|
7553
|
-
children: /* @__PURE__ */ a(
|
|
7553
|
+
children: /* @__PURE__ */ a(qr, { children: /* @__PURE__ */ a(le.Positioner, {
|
|
7554
7554
|
ref: p,
|
|
7555
7555
|
anchor: C,
|
|
7556
7556
|
side: "right",
|
|
@@ -7627,7 +7627,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
|
|
|
7627
7627
|
default:
|
|
7628
7628
|
return e;
|
|
7629
7629
|
}
|
|
7630
|
-
},
|
|
7630
|
+
}, St = () => {
|
|
7631
7631
|
const e = A1(), { store: t } = W();
|
|
7632
7632
|
return ce((n) => e(n) || Ms(n, t.getState().scene) !== null, [e, t]);
|
|
7633
7633
|
};
|
|
@@ -7639,15 +7639,15 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7639
7639
|
fontSize: jt(t.map((r) => E2(Xn(r)?.fontSize))),
|
|
7640
7640
|
alignment: jt(n.map((r) => O2(r.attrs?.textAlign)))
|
|
7641
7641
|
};
|
|
7642
|
-
}, T2 = (e, t) =>
|
|
7642
|
+
}, T2 = (e, t) => la(e, (n) => n.type === "text" ? P2(n, t) : n), Os = (e) => Rs(e).length > 0, A2 = (e, t) => la(e, (n) => Es.has(n.type ?? "") ? {
|
|
7643
7643
|
...n,
|
|
7644
7644
|
attrs: {
|
|
7645
7645
|
...n.attrs,
|
|
7646
7646
|
textAlign: t
|
|
7647
7647
|
}
|
|
7648
|
-
} : n),
|
|
7648
|
+
} : n), la = (e, t) => t(e.content === void 0 ? e : {
|
|
7649
7649
|
...e,
|
|
7650
|
-
content: e.content.map((n) =>
|
|
7650
|
+
content: e.content.map((n) => la(n, t))
|
|
7651
7651
|
}), P2 = (e, t) => {
|
|
7652
7652
|
const n = e.marks ?? [], r = n.find((i) => i.type === gn), o = {
|
|
7653
7653
|
type: gn,
|
|
@@ -7660,13 +7660,13 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7660
7660
|
...e,
|
|
7661
7661
|
marks: r === void 0 ? [...n, o] : n.map((i) => i === r ? o : i)
|
|
7662
7662
|
};
|
|
7663
|
-
}, Xn = (e) => e.marks?.find((t) => t.type === gn)?.attrs, L2 = (e) =>
|
|
7663
|
+
}, Xn = (e) => e.marks?.find((t) => t.type === gn)?.attrs, L2 = (e) => wa(e?.font) ?? wa(e?.fontFamily), Rs = (e) => sa(e, (t) => t.type === "text"), I2 = (e) => sa(e, (t) => Es.has(t.type ?? "")), sa = (e, t) => [...t(e) ? [e] : [], ...(e.content ?? []).flatMap((n) => sa(n, t))], jt = (e) => {
|
|
7664
7664
|
const [t, ...n] = e;
|
|
7665
7665
|
return t === void 0 ? null : n.every((r) => r === t) ? t : null;
|
|
7666
|
-
}, M2 = (e) => typeof e == "string" && e.length > 0 ? e : void 0, E2 = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, O2 = (e) => e === "left" || e === "center" || e === "right" ? e : void 0,
|
|
7666
|
+
}, M2 = (e) => typeof e == "string" && e.length > 0 ? e : void 0, E2 = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, O2 = (e) => e === "left" || e === "center" || e === "right" ? e : void 0, ca = (e) => ({
|
|
7667
7667
|
readTopCommandId: () => e.stack.getSnapshot().undoStack.at(-1)?.id ?? null,
|
|
7668
7668
|
undo: () => e.undo()
|
|
7669
|
-
}),
|
|
7669
|
+
}), da = (e, t, n, r = null) => {
|
|
7670
7670
|
const o = e.getState().caret;
|
|
7671
7671
|
if (o === null) return;
|
|
7672
7672
|
const i = o.editor?.getText().trim();
|
|
@@ -7685,9 +7685,9 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7685
7685
|
i === void 0 || !i.interactive || i.attachment !== null || r.push(...N2(i, e, t, n));
|
|
7686
7686
|
}
|
|
7687
7687
|
return r;
|
|
7688
|
-
},
|
|
7688
|
+
}, co = (e, t) => {
|
|
7689
7689
|
if (t === null) return -1;
|
|
7690
|
-
const n =
|
|
7690
|
+
const n = yt(t);
|
|
7691
7691
|
return e.findIndex((r) => r.target.layerId === t.layerId && r.target.observationIndex === n);
|
|
7692
7692
|
}, N2 = (e, t, n, r) => {
|
|
7693
7693
|
const o = [];
|
|
@@ -7731,14 +7731,14 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7731
7731
|
};
|
|
7732
7732
|
}, Ft = () => {
|
|
7733
7733
|
const e = at();
|
|
7734
|
-
return
|
|
7735
|
-
},
|
|
7734
|
+
return xr(e);
|
|
7735
|
+
}, xr = (e) => {
|
|
7736
7736
|
if (e.length !== 1) return null;
|
|
7737
7737
|
const [t] = e;
|
|
7738
7738
|
return t?.kind === "annotation" ? t.id : null;
|
|
7739
7739
|
}, _2 = (e) => {
|
|
7740
|
-
const { selectionStore: t, commands: n, chartId: r, history: o, store: i, anchorResolver: l } = W(), { store: s, engine: c, overlayRef: d } = nt(), u =
|
|
7741
|
-
const { selection: N } = t.getState(), x = k ?
|
|
7740
|
+
const { selectionStore: t, commands: n, chartId: r, history: o, store: i, anchorResolver: l } = W(), { store: s, engine: c, overlayRef: d } = nt(), u = St(), h = ae(), p = ue(F((I) => I.spec.annotations.textAnnotations)), g = X(null), m = X(null), f = X(!0), y = X(/* @__PURE__ */ new WeakSet()), { showAnnotations: k, showMenuTriggerOnHover: C } = Re[ye()], w = ce((I) => {
|
|
7741
|
+
const { selection: N } = t.getState(), x = k ? xr(N) : null;
|
|
7742
7742
|
x !== null && (I.preventDefault(), n.dispatch(new ze({ id: x })), e.focus({ preventScroll: !0 }));
|
|
7743
7743
|
}, [
|
|
7744
7744
|
e,
|
|
@@ -7747,7 +7747,7 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7747
7747
|
k
|
|
7748
7748
|
]), P = ce((I) => {
|
|
7749
7749
|
if (Lt(I.target, r)) return;
|
|
7750
|
-
const N = k ?
|
|
7750
|
+
const N = k ? xr(t.getState().selection) : null;
|
|
7751
7751
|
N !== null && p.current.some((x) => x.id === N) && (I.preventDefault(), h.getState().setCaret(N));
|
|
7752
7752
|
}, [
|
|
7753
7753
|
h,
|
|
@@ -7762,7 +7762,7 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7762
7762
|
return;
|
|
7763
7763
|
}
|
|
7764
7764
|
if (N.caret !== null) {
|
|
7765
|
-
|
|
7765
|
+
da(h, i.getState().scene.annotations, n.dispatch, ca(o)), N.setCaret(null), e.focus({ preventScroll: !0 });
|
|
7766
7766
|
return;
|
|
7767
7767
|
}
|
|
7768
7768
|
return Lt(I.target, r) ? e.focus({ preventScroll: !0 }) : t.getState().clearSelection();
|
|
@@ -7777,18 +7777,18 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7777
7777
|
]);
|
|
7778
7778
|
B(() => {
|
|
7779
7779
|
const I = (b) => {
|
|
7780
|
-
if (!
|
|
7781
|
-
const E =
|
|
7780
|
+
if (!ht(b.target, e, r) || ln(b.target)) return;
|
|
7781
|
+
const E = ft(b.target), z = h.getState(), U = z.caret !== null && !Lt(b.target, r);
|
|
7782
7782
|
if (E && !U) return;
|
|
7783
7783
|
const j = () => C && b.target === e && !E && !b.metaKey && !b.ctrlKey && !b.altKey && !b.shiftKey && z.standingInteraction === null && t.getState().selection.length === 0, se = () => {
|
|
7784
7784
|
if (!j()) return;
|
|
7785
7785
|
const de = R2(i.getState().scene, l, u);
|
|
7786
7786
|
if (de.length === 0) return;
|
|
7787
|
-
const Ie = s.getState().hover.primary, G = b.key === "ArrowRight" || b.key === "ArrowDown" ? 1 : -1, ne = g.current === null ?
|
|
7787
|
+
const Ie = s.getState().hover.primary, G = b.key === "ArrowRight" || b.key === "ArrowDown" ? 1 : -1, ne = g.current === null ? co(de, Ie) : co(de, g.current.primary), re = de[ne < 0 ? G > 0 ? 0 : de.length - 1 : Math.min(de.length - 1, Math.max(0, ne + G))];
|
|
7788
7788
|
if (re !== void 0) {
|
|
7789
7789
|
if (m.current === null) {
|
|
7790
|
-
const ke =
|
|
7791
|
-
ke !== null && !nn(ke,
|
|
7790
|
+
const ke = dt(Ie);
|
|
7791
|
+
ke !== null && !nn(ke, dt(re.primary)) && (m.current = ke);
|
|
7792
7792
|
}
|
|
7793
7793
|
g.current = re, b.preventDefault(), N(re);
|
|
7794
7794
|
}
|
|
@@ -7836,8 +7836,8 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7836
7836
|
g.current = null, m.current = null;
|
|
7837
7837
|
return;
|
|
7838
7838
|
}
|
|
7839
|
-
const U =
|
|
7840
|
-
if (nn(U,
|
|
7839
|
+
const U = dt(z);
|
|
7840
|
+
if (nn(U, dt(E.primary))) {
|
|
7841
7841
|
m.current = U;
|
|
7842
7842
|
return;
|
|
7843
7843
|
}
|
|
@@ -7870,7 +7870,7 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7870
7870
|
c,
|
|
7871
7871
|
d
|
|
7872
7872
|
]);
|
|
7873
|
-
},
|
|
7873
|
+
}, ft = (e) => e instanceof HTMLElement && (e.isContentEditable || e.closest('[contenteditable="true"]') !== null || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), F2 = (e, t, n) => {
|
|
7874
7874
|
if (t === null) return !1;
|
|
7875
7875
|
const r = n.getState().pointerRegions;
|
|
7876
7876
|
if (r.length === 0) return !1;
|
|
@@ -7879,14 +7879,14 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7879
7879
|
x: e.clientX - o.left,
|
|
7880
7880
|
y: e.clientY - o.top
|
|
7881
7881
|
}, r) !== null;
|
|
7882
|
-
},
|
|
7882
|
+
}, dt = (e) => e === null ? null : {
|
|
7883
7883
|
layerId: e.layerId,
|
|
7884
|
-
observationIndex:
|
|
7884
|
+
observationIndex: yt(e)
|
|
7885
7885
|
}, z2 = (e, t, n, r) => {
|
|
7886
7886
|
const o = B2(t.primary, n, r);
|
|
7887
7887
|
if (o !== null) {
|
|
7888
|
-
const i = e.query(o, { tolerance:
|
|
7889
|
-
if (nn(
|
|
7888
|
+
const i = e.query(o, { tolerance: ni });
|
|
7889
|
+
if (nn(dt(i.primary), dt(t.primary))) return {
|
|
7890
7890
|
primary: i.primary,
|
|
7891
7891
|
group: [...i.group],
|
|
7892
7892
|
related: new Map(i.related),
|
|
@@ -7982,7 +7982,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
7982
7982
|
d: "M12 3a9 9 0 1 0 0 18 9 9 0 1 0 0-18zM8.5 14.5s1.3 2 3.5 2 3.5-2 3.5-2M9 9.5h.01M15 9.5h.01",
|
|
7983
7983
|
...zt
|
|
7984
7984
|
})
|
|
7985
|
-
}),
|
|
7985
|
+
}), ua = {
|
|
7986
7986
|
fill: "none",
|
|
7987
7987
|
stroke: "currentColor",
|
|
7988
7988
|
strokeWidth: 1.8,
|
|
@@ -7993,23 +7993,23 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
7993
7993
|
...e,
|
|
7994
7994
|
children: /* @__PURE__ */ a("path", {
|
|
7995
7995
|
d: "M5 19L19 5M10 5h9v9",
|
|
7996
|
-
...
|
|
7996
|
+
...ua
|
|
7997
7997
|
})
|
|
7998
7998
|
}), Y2 = (e) => /* @__PURE__ */ a(M, {
|
|
7999
7999
|
viewBox: "0 0 24 24",
|
|
8000
8000
|
...e,
|
|
8001
8001
|
children: /* @__PURE__ */ a("path", {
|
|
8002
8002
|
d: "M6 18L18 6M6 18v-6M6 18h6M18 6h-6M18 6v6",
|
|
8003
|
-
...
|
|
8003
|
+
...ua
|
|
8004
8004
|
})
|
|
8005
8005
|
}), Z2 = (e) => /* @__PURE__ */ a(M, {
|
|
8006
8006
|
viewBox: "0 0 24 24",
|
|
8007
8007
|
...e,
|
|
8008
8008
|
children: /* @__PURE__ */ a("path", {
|
|
8009
8009
|
d: "M5 19L19 5",
|
|
8010
|
-
...
|
|
8010
|
+
...ua
|
|
8011
8011
|
})
|
|
8012
|
-
}),
|
|
8012
|
+
}), lt = {
|
|
8013
8013
|
side: "top",
|
|
8014
8014
|
delay: 200
|
|
8015
8015
|
}, J2 = 0.2, Q2 = {
|
|
@@ -8040,8 +8040,8 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8040
8040
|
B(() => () => xt(o), [o]), B(() => {
|
|
8041
8041
|
if (!p && !g) return;
|
|
8042
8042
|
const A = (S) => {
|
|
8043
|
-
if (S.key !== "Escape" || !
|
|
8044
|
-
const b =
|
|
8043
|
+
if (S.key !== "Escape" || !ht(S.target, e, l) || ln(S.target)) return;
|
|
8044
|
+
const b = ft(S.target), E = o.getState().caret !== null && !Lt(S.target, l);
|
|
8045
8045
|
if (b && !E) return;
|
|
8046
8046
|
const z = o.getState().standingInteraction?.kind;
|
|
8047
8047
|
z !== "arrow-draw" && z !== "box-draw" || (S.preventDefault(), o.getState().releaseInteraction(z));
|
|
@@ -8083,7 +8083,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8083
8083
|
kind: "arrow-draw",
|
|
8084
8084
|
heads: A,
|
|
8085
8085
|
start: n,
|
|
8086
|
-
...
|
|
8086
|
+
...uo(S[0])
|
|
8087
8087
|
});
|
|
8088
8088
|
}, P = (...A) => {
|
|
8089
8089
|
if (o.getState().standingInteraction?.kind === "box-draw") {
|
|
@@ -8093,7 +8093,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8093
8093
|
xt(o), h({ kind: "choose" }), o.getState().claimInteraction({
|
|
8094
8094
|
kind: "box-draw",
|
|
8095
8095
|
start: n,
|
|
8096
|
-
...
|
|
8096
|
+
...uo(A[0])
|
|
8097
8097
|
});
|
|
8098
8098
|
}, T = () => {
|
|
8099
8099
|
const A = o.getState().standingInteraction?.kind;
|
|
@@ -8107,7 +8107,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8107
8107
|
const S = new we({
|
|
8108
8108
|
kind: "text",
|
|
8109
8109
|
annotation: {
|
|
8110
|
-
...
|
|
8110
|
+
..._i,
|
|
8111
8111
|
content: Q2,
|
|
8112
8112
|
at: {
|
|
8113
8113
|
anchorType: "panel",
|
|
@@ -8117,7 +8117,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8117
8117
|
width: J2
|
|
8118
8118
|
}
|
|
8119
8119
|
}), b = S.params.annotation.id;
|
|
8120
|
-
A === null ? i.dispatch(S) : i.dispatch(new
|
|
8120
|
+
A === null ? i.dispatch(S) : i.dispatch(new ct({ commands: [S, new Xe({
|
|
8121
8121
|
list: "overrides",
|
|
8122
8122
|
rule: {
|
|
8123
8123
|
select: {
|
|
@@ -8155,7 +8155,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8155
8155
|
patch: { sticker: A }
|
|
8156
8156
|
})), f());
|
|
8157
8157
|
};
|
|
8158
|
-
return n.stickerId !== void 0 ? /* @__PURE__ */ a(
|
|
8158
|
+
return n.stickerId !== void 0 ? /* @__PURE__ */ a(wr, {
|
|
8159
8159
|
frameElement: e,
|
|
8160
8160
|
boundary: y,
|
|
8161
8161
|
spans: k,
|
|
@@ -8167,7 +8167,10 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8167
8167
|
children: [/* @__PURE__ */ a("div", {
|
|
8168
8168
|
className: hn,
|
|
8169
8169
|
children: /* @__PURE__ */ a(d, {
|
|
8170
|
-
|
|
8170
|
+
variant: "icon",
|
|
8171
|
+
...lt,
|
|
8172
|
+
ariaLabel: r("graph.annotations.baseMenu.removeSticker"),
|
|
8173
|
+
icon: /* @__PURE__ */ a(vr, { children: /* @__PURE__ */ a(Qr, {}) }),
|
|
8171
8174
|
onClick: x
|
|
8172
8175
|
})
|
|
8173
8176
|
}), /* @__PURE__ */ a("div", {
|
|
@@ -8193,7 +8196,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8193
8196
|
},
|
|
8194
8197
|
"data-testid": "empty-plot-dot",
|
|
8195
8198
|
"aria-hidden": !0
|
|
8196
|
-
}), m && /* @__PURE__ */ a(
|
|
8199
|
+
}), m && /* @__PURE__ */ a(wr, {
|
|
8197
8200
|
frameElement: e,
|
|
8198
8201
|
boundary: y,
|
|
8199
8202
|
spans: k,
|
|
@@ -8209,14 +8212,14 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8209
8212
|
children: [
|
|
8210
8213
|
/* @__PURE__ */ a(d, {
|
|
8211
8214
|
variant: "icon",
|
|
8212
|
-
...
|
|
8215
|
+
...lt,
|
|
8213
8216
|
ariaLabel: r("graph.annotations.baseMenu.text"),
|
|
8214
8217
|
icon: /* @__PURE__ */ a(W2, {}),
|
|
8215
8218
|
onClick: () => I(null)
|
|
8216
8219
|
}),
|
|
8217
8220
|
/* @__PURE__ */ a(d, {
|
|
8218
8221
|
variant: "icon",
|
|
8219
|
-
...
|
|
8222
|
+
...lt,
|
|
8220
8223
|
ariaLabel: r("graph.annotations.baseMenu.stickyNote"),
|
|
8221
8224
|
icon: /* @__PURE__ */ a(U2, {}),
|
|
8222
8225
|
expanded: u.kind === "sticky",
|
|
@@ -8224,7 +8227,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8224
8227
|
}),
|
|
8225
8228
|
/* @__PURE__ */ a(d, {
|
|
8226
8229
|
variant: "icon",
|
|
8227
|
-
...
|
|
8230
|
+
...lt,
|
|
8228
8231
|
ariaLabel: r("graph.annotations.baseMenu.arrow"),
|
|
8229
8232
|
icon: /* @__PURE__ */ a(K2, {}),
|
|
8230
8233
|
expanded: u.kind === "arrow",
|
|
@@ -8232,7 +8235,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8232
8235
|
}),
|
|
8233
8236
|
/* @__PURE__ */ a(d, {
|
|
8234
8237
|
variant: "icon",
|
|
8235
|
-
...
|
|
8238
|
+
...lt,
|
|
8236
8239
|
ariaLabel: r("graph.annotations.baseMenu.box"),
|
|
8237
8240
|
icon: /* @__PURE__ */ a(j2, {}),
|
|
8238
8241
|
expanded: p,
|
|
@@ -8240,7 +8243,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8240
8243
|
}),
|
|
8241
8244
|
/* @__PURE__ */ a(d, {
|
|
8242
8245
|
variant: "icon",
|
|
8243
|
-
...
|
|
8246
|
+
...lt,
|
|
8244
8247
|
ariaLabel: r("graph.annotations.baseMenu.addSticker"),
|
|
8245
8248
|
icon: /* @__PURE__ */ a(X2, {}),
|
|
8246
8249
|
expanded: u.kind === "sticker",
|
|
@@ -8307,7 +8310,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8307
8310
|
}, xt = (e) => {
|
|
8308
8311
|
const t = e.getState().standingInteraction?.kind;
|
|
8309
8312
|
(t === "arrow-draw" || t === "box-draw") && e.getState().releaseInteraction(t);
|
|
8310
|
-
},
|
|
8313
|
+
}, uo = (e) => {
|
|
8311
8314
|
if (typeof e != "object" || e === null) return {};
|
|
8312
8315
|
if ("detail" in e && e.detail === 0) return {};
|
|
8313
8316
|
if (!("clientX" in e) || !("clientY" in e)) return {};
|
|
@@ -8316,7 +8319,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8316
8319
|
x: t,
|
|
8317
8320
|
y: n
|
|
8318
8321
|
} };
|
|
8319
|
-
}, Bt = (e) => e.offset + e.strokeWidth,
|
|
8322
|
+
}, Bt = (e) => e.offset + e.strokeWidth, ho = "http://www.w3.org/2000/svg", po = /* @__PURE__ */ new WeakMap(), af = (e, t) => {
|
|
8320
8323
|
const n = of(e);
|
|
8321
8324
|
n.setAttribute("d", t);
|
|
8322
8325
|
const { x: r, y: o, width: i, height: l } = n.getBBox();
|
|
@@ -8327,12 +8330,12 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8327
8330
|
height: l
|
|
8328
8331
|
};
|
|
8329
8332
|
}, of = (e) => {
|
|
8330
|
-
const t =
|
|
8333
|
+
const t = po.get(e);
|
|
8331
8334
|
if (t?.isConnected) return t;
|
|
8332
|
-
const n = e.createElementNS(
|
|
8335
|
+
const n = e.createElementNS(ho, "svg");
|
|
8333
8336
|
n.setAttribute("aria-hidden", "true"), n.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none";
|
|
8334
|
-
const r = e.createElementNS(
|
|
8335
|
-
return n.append(r), e.body.append(n),
|
|
8337
|
+
const r = e.createElementNS(ho, "path");
|
|
8338
|
+
return n.append(r), e.body.append(n), po.set(e, r), r;
|
|
8336
8339
|
}, lf = (e, t) => {
|
|
8337
8340
|
const { panelRect: n, look: r, readGridLineWidth: o, measurePathBox: i } = t, l = Bt(r);
|
|
8338
8341
|
switch (e.kind) {
|
|
@@ -8343,7 +8346,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8343
8346
|
y: s.y + n.y
|
|
8344
8347
|
})), l);
|
|
8345
8348
|
case "guide":
|
|
8346
|
-
return qn(e.shapes.map((s) => s.kind === "box" ? s.rect :
|
|
8349
|
+
return qn(e.shapes.map((s) => s.kind === "box" ? s.rect : ut(df(s), o(s.axis) / 2)), l);
|
|
8347
8350
|
case "graph":
|
|
8348
8351
|
return qn([{
|
|
8349
8352
|
x: 0,
|
|
@@ -8357,7 +8360,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8357
8360
|
const n = [], r = /* @__PURE__ */ new Map();
|
|
8358
8361
|
for (const o of e) {
|
|
8359
8362
|
if (o.kind === "dots") {
|
|
8360
|
-
n.push(...o.centers.map((s) =>
|
|
8363
|
+
n.push(...o.centers.map((s) => ut({
|
|
8361
8364
|
...s,
|
|
8362
8365
|
width: 0,
|
|
8363
8366
|
height: 0
|
|
@@ -8367,13 +8370,13 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8367
8370
|
if (o.pathData === "") continue;
|
|
8368
8371
|
const i = o.kind === "stroke" ? o.width / 2 : 0;
|
|
8369
8372
|
if (!o.pathData.trimStart().startsWith("M")) {
|
|
8370
|
-
n.push(
|
|
8373
|
+
n.push(ut(t(o.pathData), i));
|
|
8371
8374
|
continue;
|
|
8372
8375
|
}
|
|
8373
8376
|
const l = r.get(i) ?? [];
|
|
8374
8377
|
l.push(o.pathData), r.set(i, l);
|
|
8375
8378
|
}
|
|
8376
|
-
for (const [o, i] of r) n.push(
|
|
8379
|
+
for (const [o, i] of r) n.push(ut(t(i.join("")), o));
|
|
8377
8380
|
return n;
|
|
8378
8381
|
}, df = (e) => {
|
|
8379
8382
|
switch (e.kind) {
|
|
@@ -8394,7 +8397,7 @@ var V2 = "_1vbfegu3", zt = {
|
|
|
8394
8397
|
}
|
|
8395
8398
|
}, qn = (e, t) => {
|
|
8396
8399
|
const n = e.filter(({ width: r, height: o }) => r > 0 || o > 0);
|
|
8397
|
-
return n.length === 0 ? null :
|
|
8400
|
+
return n.length === 0 ? null : ut(ir(n), t);
|
|
8398
8401
|
};
|
|
8399
8402
|
var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
8400
8403
|
if (e.kind !== "observations") return null;
|
|
@@ -8404,7 +8407,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8404
8407
|
x: s.x + n.x,
|
|
8405
8408
|
y: s.y + n.y
|
|
8406
8409
|
})));
|
|
8407
|
-
}, hf = (e, t, n) =>
|
|
8410
|
+
}, hf = (e, t, n) => ji({
|
|
8408
8411
|
layer: {
|
|
8409
8412
|
...e.layer,
|
|
8410
8413
|
data: e.layer.data.take(e.rows)
|
|
@@ -8418,10 +8421,10 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8418
8421
|
bottom: (e) => e.y + e.height,
|
|
8419
8422
|
left: (e) => -e.x
|
|
8420
8423
|
}, mf = (e, t, n) => e === null || !vf(e) ? {
|
|
8421
|
-
top:
|
|
8422
|
-
right:
|
|
8423
|
-
bottom:
|
|
8424
|
-
left:
|
|
8424
|
+
top: kr(t),
|
|
8425
|
+
right: Tr(t),
|
|
8426
|
+
bottom: kr(t),
|
|
8427
|
+
left: Tr(t)
|
|
8425
8428
|
} : {
|
|
8426
8429
|
top: qt(e, t, "top", n),
|
|
8427
8430
|
right: qt(e, t, "right", n),
|
|
@@ -8435,18 +8438,18 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8435
8438
|
let u = 1 / 0, h = -1 / 0;
|
|
8436
8439
|
for (const m of e)
|
|
8437
8440
|
o(m) < d || (u = Math.min(u, l(m)), h = Math.max(h, s(m)));
|
|
8438
|
-
const p = i ?
|
|
8439
|
-
from:
|
|
8440
|
-
to:
|
|
8441
|
+
const p = i ? Tr(t) : kr(t), g = {
|
|
8442
|
+
from: mt(u - r, p.from, p.to),
|
|
8443
|
+
to: mt(h + r, p.from, p.to)
|
|
8441
8444
|
};
|
|
8442
8445
|
return g.from < g.to ? g : p;
|
|
8443
8446
|
}, vf = (e) => {
|
|
8444
8447
|
const [t] = e;
|
|
8445
8448
|
return t !== void 0 && e.some((n) => !cd(n, t));
|
|
8446
|
-
},
|
|
8449
|
+
}, kr = (e) => ({
|
|
8447
8450
|
from: e.x,
|
|
8448
8451
|
to: e.x + e.width
|
|
8449
|
-
}),
|
|
8452
|
+
}), Tr = (e) => ({
|
|
8450
8453
|
from: e.y,
|
|
8451
8454
|
to: e.y + e.height
|
|
8452
8455
|
}), ff = (e, { frameElement: t, panelRect: n, look: r }) => {
|
|
@@ -8456,7 +8459,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8456
8459
|
const h = s.current, p = /* @__PURE__ */ new Map(), m = lf(d, {
|
|
8457
8460
|
panelRect: n,
|
|
8458
8461
|
look: r,
|
|
8459
|
-
readGridLineWidth: (k) =>
|
|
8462
|
+
readGridLineWidth: (k) => ii(i, k).strokeWidth,
|
|
8460
8463
|
measurePathBox: (k) => {
|
|
8461
8464
|
const C = h.get(k) ?? af(t.ownerDocument, k);
|
|
8462
8465
|
return p.set(k, C), C;
|
|
@@ -8488,7 +8491,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8488
8491
|
]);
|
|
8489
8492
|
const u = e !== null;
|
|
8490
8493
|
Ye(() => u ? () => o.getState().setSelectedOutline(null) : void 0, [o, u]);
|
|
8491
|
-
},
|
|
8494
|
+
}, ha = "var(--_1qfw3e00)", go = "_1qfw3e01", bf = "_1qfw3e02", mo = ({ pathData: e, animateTransitions: t, source: n, ...r }) => t ? /* @__PURE__ */ a(yf, {
|
|
8492
8495
|
pathData: e,
|
|
8493
8496
|
source: n,
|
|
8494
8497
|
...r
|
|
@@ -8505,14 +8508,14 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8505
8508
|
[Cf]: "",
|
|
8506
8509
|
style: De({ [Sf]: `${e}px` })
|
|
8507
8510
|
}), wf = () => {
|
|
8508
|
-
const { showMenuTriggerOnHover: e, layers: t, coordSystem: n, parsingLocale: r, anchorResolver: o, geom: i, hasOverlayMenu: l } = Ds(), s =
|
|
8511
|
+
const { showMenuTriggerOnHover: e, layers: t, coordSystem: n, parsingLocale: r, anchorResolver: o, geom: i, hasOverlayMenu: l } = Ds(), s = di((c) => e ? c.hover.primary : null);
|
|
8509
8512
|
return _(() => {
|
|
8510
8513
|
if (s === null) return null;
|
|
8511
8514
|
const c = t.find((u) => u.id === s.layerId);
|
|
8512
8515
|
if (c === void 0 || _t(c, s.observation)) return null;
|
|
8513
8516
|
const d = $e({
|
|
8514
8517
|
layer: c,
|
|
8515
|
-
observationIndex:
|
|
8518
|
+
observationIndex: yt(s),
|
|
8516
8519
|
scope: "observation",
|
|
8517
8520
|
parsingLocale: r
|
|
8518
8521
|
});
|
|
@@ -8570,7 +8573,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8570
8573
|
layers: i.layers,
|
|
8571
8574
|
coordSystem: i.coordSystem,
|
|
8572
8575
|
parsingLocale: i.config.parsingLocale
|
|
8573
|
-
}))), { anchorResolver: n } = W(), r =
|
|
8576
|
+
}))), { anchorResolver: n } = W(), r = ti(), o = St();
|
|
8574
8577
|
return {
|
|
8575
8578
|
showMenuTriggerOnHover: e,
|
|
8576
8579
|
...t,
|
|
@@ -8612,7 +8615,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8612
8615
|
layer: r,
|
|
8613
8616
|
rows: o
|
|
8614
8617
|
}];
|
|
8615
|
-
for (const l of
|
|
8618
|
+
for (const l of Vi(r, t)) {
|
|
8616
8619
|
const s = et({
|
|
8617
8620
|
layer: l,
|
|
8618
8621
|
host: r,
|
|
@@ -8664,7 +8667,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8664
8667
|
return null;
|
|
8665
8668
|
}
|
|
8666
8669
|
}, Pf = () => {
|
|
8667
|
-
const e = wf(), t =
|
|
8670
|
+
const e = wf(), t = di((s) => s.hover.intersection?.intersects === !0), n = at()[0] ?? null, r = Y((s) => s.standingInteraction), o = Y((s) => s.plotMenu), { layers: i, parsingLocale: l } = F(Le((s) => ({
|
|
8668
8671
|
layers: s.layers,
|
|
8669
8672
|
parsingLocale: s.config.parsingLocale
|
|
8670
8673
|
})));
|
|
@@ -8678,13 +8681,13 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
8678
8681
|
l
|
|
8679
8682
|
]);
|
|
8680
8683
|
};
|
|
8681
|
-
var
|
|
8684
|
+
var vo = (e, t) => {
|
|
8682
8685
|
if (e.kind === "observations" && t.kind === "observations") {
|
|
8683
8686
|
if (e.layerId !== t.layerId || e.scope !== t.scope) return !1;
|
|
8684
8687
|
const n = e.parts[0]?.rows[0];
|
|
8685
8688
|
return n !== void 0 && (t.parts[0]?.rows.includes(n) ?? !1);
|
|
8686
8689
|
}
|
|
8687
|
-
return e.kind === "guide" && t.kind === "guide" ?
|
|
8690
|
+
return e.kind === "guide" && t.kind === "guide" ? $r(e.target, t.target) : e.kind === "graph" && t.kind === "graph";
|
|
8688
8691
|
}, Lf = (e, t) => {
|
|
8689
8692
|
const n = Math.max(e.width, 8), r = Math.max(e.height, 8), o = Math.max(0, e.x + e.width / 2 - n / 2), i = Math.max(0, e.y + e.height / 2 - r / 2), l = Math.min(t.width, e.x + e.width / 2 + n / 2), s = Math.min(t.height, e.y + e.height / 2 + r / 2);
|
|
8690
8693
|
return {
|
|
@@ -8702,7 +8705,7 @@ var mo = (e, t) => {
|
|
|
8702
8705
|
i,
|
|
8703
8706
|
l,
|
|
8704
8707
|
s
|
|
8705
|
-
]), d = _(() => c !== null && e !== null &&
|
|
8708
|
+
]), d = _(() => c !== null && e !== null && vo(c, e), [c, e]), u = St(), h = o !== null && i !== void 0 && Of(o, i, n, u) ? o.observationIndex : null;
|
|
8706
8709
|
return _(() => {
|
|
8707
8710
|
switch (r?.kind) {
|
|
8708
8711
|
case "observations": {
|
|
@@ -8729,7 +8732,7 @@ var mo = (e, t) => {
|
|
|
8729
8732
|
key: Rt(r.target),
|
|
8730
8733
|
target: r.target
|
|
8731
8734
|
};
|
|
8732
|
-
return e !== null &&
|
|
8735
|
+
return e !== null && vo(p, e) ? null : p;
|
|
8733
8736
|
}
|
|
8734
8737
|
default:
|
|
8735
8738
|
return null;
|
|
@@ -8746,7 +8749,7 @@ var mo = (e, t) => {
|
|
|
8746
8749
|
layer: t,
|
|
8747
8750
|
rows: Ku(t, n, r)
|
|
8748
8751
|
}];
|
|
8749
|
-
for (const i of
|
|
8752
|
+
for (const i of Vi(t, e)) {
|
|
8750
8753
|
const l = Du(i, t, n, r);
|
|
8751
8754
|
l.length > 0 && o.push({
|
|
8752
8755
|
layer: i,
|
|
@@ -8809,7 +8812,7 @@ var mo = (e, t) => {
|
|
|
8809
8812
|
r !== null && t.set(r.legendIndex, [...t.get(r.legendIndex) ?? [], n]);
|
|
8810
8813
|
}
|
|
8811
8814
|
return t;
|
|
8812
|
-
}, _f = (e) => e.closest(
|
|
8815
|
+
}, _f = (e) => e.closest(hi) !== null, Yn = (e) => e.map((t) => ({
|
|
8813
8816
|
kind: "box",
|
|
8814
8817
|
rect: t
|
|
8815
8818
|
})), Ff = (e, { x: t, y: n, width: r, height: o }, i) => e.querySelector("circle") !== null ? {
|
|
@@ -8868,7 +8871,7 @@ var mo = (e, t) => {
|
|
|
8868
8871
|
const t = (n) => Number(e?.getAttribute(n) ?? 0);
|
|
8869
8872
|
return (t("x2") - t("x1")) * (t("y2") - t("y1")) >= 0;
|
|
8870
8873
|
}, Bf = [], Hf = (e, { frameElement: t, frameSize: n, panelRect: r, animateTransitions: o }) => {
|
|
8871
|
-
const i = F((f) => f.coordSystem), l =
|
|
8874
|
+
const i = F((f) => f.coordSystem), l = ai(), s = ti(), c = $f(e.kind === "guide" ? e.target : null, {
|
|
8872
8875
|
frameElement: t,
|
|
8873
8876
|
frameSize: n
|
|
8874
8877
|
}), d = Gf(t, n), u = _(() => ({
|
|
@@ -8881,11 +8884,11 @@ var mo = (e, t) => {
|
|
|
8881
8884
|
r,
|
|
8882
8885
|
l,
|
|
8883
8886
|
s
|
|
8884
|
-
]), h = e.kind === "observations" ? e.parts : null, p = e.kind === "observations" ? e.vertex : null, g = _(() => h?.map((f) =>
|
|
8887
|
+
]), h = e.kind === "observations" ? e.parts : null, p = e.kind === "observations" ? e.vertex : null, g = _(() => h?.map((f) => fo(f, u, o)) ?? Bf, [
|
|
8885
8888
|
h,
|
|
8886
8889
|
u,
|
|
8887
8890
|
o
|
|
8888
|
-
]), m = _(() => p === null ? null :
|
|
8891
|
+
]), m = _(() => p === null ? null : fo(p, u, !1), [p, u]);
|
|
8889
8892
|
return _(() => {
|
|
8890
8893
|
switch (e.kind) {
|
|
8891
8894
|
case "observations":
|
|
@@ -8914,10 +8917,10 @@ var mo = (e, t) => {
|
|
|
8914
8917
|
d
|
|
8915
8918
|
]);
|
|
8916
8919
|
}, Gf = (e, t) => {
|
|
8917
|
-
const [n, r] = Z(() =>
|
|
8920
|
+
const [n, r] = Z(() => Cr(e, t));
|
|
8918
8921
|
return Ye(() => {
|
|
8919
8922
|
r((o) => {
|
|
8920
|
-
const i =
|
|
8923
|
+
const i = Cr(e, {
|
|
8921
8924
|
width: t.width,
|
|
8922
8925
|
height: t.height
|
|
8923
8926
|
});
|
|
@@ -8928,7 +8931,7 @@ var mo = (e, t) => {
|
|
|
8928
8931
|
t.width,
|
|
8929
8932
|
t.height
|
|
8930
8933
|
]), n;
|
|
8931
|
-
},
|
|
8934
|
+
}, fo = ({ layer: e, rows: t }, { coordSystem: n, panelRect: r, resolveRenderer: o, geomReaders: i }, l) => {
|
|
8932
8935
|
const s = {
|
|
8933
8936
|
...e,
|
|
8934
8937
|
data: e.data.take(t)
|
|
@@ -8937,7 +8940,7 @@ var mo = (e, t) => {
|
|
|
8937
8940
|
kind: "boxes",
|
|
8938
8941
|
layer: e,
|
|
8939
8942
|
rows: t,
|
|
8940
|
-
boxes:
|
|
8943
|
+
boxes: ji({
|
|
8941
8944
|
layer: s,
|
|
8942
8945
|
coordSystem: n,
|
|
8943
8946
|
panelSize: r
|
|
@@ -9020,7 +9023,7 @@ var mo = (e, t) => {
|
|
|
9020
9023
|
radius: e.radius * t
|
|
9021
9024
|
};
|
|
9022
9025
|
}
|
|
9023
|
-
}, Wf = ["x", "y"], Uf =
|
|
9026
|
+
}, Wf = ["x", "y"], Uf = Qi(function({ frameElement: t, frameSize: n, panelRect: r, animateTransitions: o }) {
|
|
9024
9027
|
const i = nd(Zu, ee()), l = Tf(), s = Mf(l?.outlined ?? null), { selectObservationsOnPress: c, selectGraphOnPress: d, selectGuidesOnPress: u } = Re[ye()], h = Pf(), p = c || d || u;
|
|
9025
9028
|
if (l === null && h === null && (s === null || !p)) return null;
|
|
9026
9029
|
const g = {
|
|
@@ -9040,7 +9043,7 @@ var mo = (e, t) => {
|
|
|
9040
9043
|
});
|
|
9041
9044
|
const m = l?.target.kind === "observations" ? l.outlined : h;
|
|
9042
9045
|
return m === null ? null : /* @__PURE__ */ a("svg", {
|
|
9043
|
-
className:
|
|
9046
|
+
className: go,
|
|
9044
9047
|
width: n.width,
|
|
9045
9048
|
height: n.height,
|
|
9046
9049
|
"aria-hidden": !0,
|
|
@@ -9056,7 +9059,7 @@ var mo = (e, t) => {
|
|
|
9056
9059
|
});
|
|
9057
9060
|
}
|
|
9058
9061
|
return /* @__PURE__ */ v("svg", {
|
|
9059
|
-
className:
|
|
9062
|
+
className: go,
|
|
9060
9063
|
width: n.width,
|
|
9061
9064
|
height: n.height,
|
|
9062
9065
|
"aria-hidden": !0,
|
|
@@ -9142,25 +9145,25 @@ var mo = (e, t) => {
|
|
|
9142
9145
|
fill: "black",
|
|
9143
9146
|
stroke: "black",
|
|
9144
9147
|
strokeLinecap: "round",
|
|
9145
|
-
...De({ [
|
|
9148
|
+
...De({ [ha]: `${2 * e}px` })
|
|
9146
9149
|
}), jf = (e) => ({
|
|
9147
9150
|
fill: "none",
|
|
9148
9151
|
stroke: e.backingColor ?? ve.graphBackground,
|
|
9149
9152
|
strokeLinecap: "round",
|
|
9150
9153
|
opacity: e.backingAlpha,
|
|
9151
|
-
...De({ [
|
|
9154
|
+
...De({ [ha]: `${2 * Bt(e)}px` })
|
|
9152
9155
|
}), Xf = (e) => {
|
|
9153
|
-
const t =
|
|
9156
|
+
const t = Zi(e.dashArray, e.strokeWidth);
|
|
9154
9157
|
return {
|
|
9155
9158
|
fill: "none",
|
|
9156
9159
|
stroke: e.stroke,
|
|
9157
9160
|
strokeDasharray: t,
|
|
9158
9161
|
strokeLinecap: t === void 0 ? "round" : "butt",
|
|
9159
9162
|
opacity: e.strokeAlpha,
|
|
9160
|
-
...De({ [
|
|
9163
|
+
...De({ [ha]: `${2 * Bt(e)}px` })
|
|
9161
9164
|
};
|
|
9162
9165
|
}, qf = ({ dashArray: e, strokeWidth: t }) => {
|
|
9163
|
-
if (
|
|
9166
|
+
if (Zi(e, t) === void 0) return;
|
|
9164
9167
|
const n = (e.length % 2 === 0 ? 1 : 2) * e.reduce((r, o) => r + o * t, 0);
|
|
9165
9168
|
return n > 0 ? n : void 0;
|
|
9166
9169
|
}, zs = (e, t, n = 1) => {
|
|
@@ -9168,7 +9171,7 @@ var mo = (e, t) => {
|
|
|
9168
9171
|
return n * Math.max(1, Math.round(2 * Math.PI * e / t)) * t;
|
|
9169
9172
|
}, Yf = (e, t, n) => {
|
|
9170
9173
|
const r = n.offset + Bt(n);
|
|
9171
|
-
return
|
|
9174
|
+
return Nr(ut({
|
|
9172
9175
|
x: 0,
|
|
9173
9176
|
y: 0,
|
|
9174
9177
|
...e
|
|
@@ -9179,11 +9182,11 @@ var mo = (e, t) => {
|
|
|
9179
9182
|
case "observations":
|
|
9180
9183
|
return /* @__PURE__ */ v("g", {
|
|
9181
9184
|
transform: `translate(${n.x} ${n.y})`,
|
|
9182
|
-
children: [e.parts.map((l) => /* @__PURE__ */ a(
|
|
9185
|
+
children: [e.parts.map((l) => /* @__PURE__ */ a(bo, {
|
|
9183
9186
|
part: l,
|
|
9184
9187
|
borderRadius: o,
|
|
9185
9188
|
dashPeriod: i
|
|
9186
|
-
}, l.layer.id)), e.vertex !== null && /* @__PURE__ */ a(
|
|
9189
|
+
}, l.layer.id)), e.vertex !== null && /* @__PURE__ */ a(bo, {
|
|
9187
9190
|
part: e.vertex,
|
|
9188
9191
|
borderRadius: o,
|
|
9189
9192
|
dashPeriod: i
|
|
@@ -9199,7 +9202,7 @@ var mo = (e, t) => {
|
|
|
9199
9202
|
case "graph":
|
|
9200
9203
|
return /* @__PURE__ */ a("path", { d: Yf(e.frameSize, r, t) });
|
|
9201
9204
|
}
|
|
9202
|
-
},
|
|
9205
|
+
}, bo = Qi(function({ part: t, borderRadius: n, dashPeriod: r }) {
|
|
9203
9206
|
return t.kind === "boxes" ? /* @__PURE__ */ a(Qf, {
|
|
9204
9207
|
boxes: t.boxes,
|
|
9205
9208
|
borderRadius: n
|
|
@@ -9212,7 +9215,7 @@ var mo = (e, t) => {
|
|
|
9212
9215
|
const i = r.kind === "dots" || r.key === void 0 ? String(o) : `${r.kind}:${r.key}`;
|
|
9213
9216
|
switch (r.kind) {
|
|
9214
9217
|
case "region":
|
|
9215
|
-
return r.pathData === "" ? null : /* @__PURE__ */ a(
|
|
9218
|
+
return r.pathData === "" ? null : /* @__PURE__ */ a(mo, {
|
|
9216
9219
|
pathData: r.pathData,
|
|
9217
9220
|
fillRule: r.fillRule,
|
|
9218
9221
|
animateTransitions: r.animateTransitions ?? !1,
|
|
@@ -9220,7 +9223,7 @@ var mo = (e, t) => {
|
|
|
9220
9223
|
"data-geom": t.geom
|
|
9221
9224
|
}, i);
|
|
9222
9225
|
case "stroke":
|
|
9223
|
-
return r.pathData === "" ? null : /* @__PURE__ */ a(
|
|
9226
|
+
return r.pathData === "" ? null : /* @__PURE__ */ a(mo, {
|
|
9224
9227
|
pathData: r.pathData,
|
|
9225
9228
|
animateTransitions: r.animateTransitions ?? !1,
|
|
9226
9229
|
source: t,
|
|
@@ -9235,7 +9238,7 @@ var mo = (e, t) => {
|
|
|
9235
9238
|
}, i);
|
|
9236
9239
|
}
|
|
9237
9240
|
}), Qf = ({ boxes: e, borderRadius: t }) => {
|
|
9238
|
-
const n = e.map((r) =>
|
|
9241
|
+
const n = e.map((r) => Nr(r, t)).join("");
|
|
9239
9242
|
return n === "" ? null : /* @__PURE__ */ a("path", {
|
|
9240
9243
|
d: n,
|
|
9241
9244
|
"data-testid": "edit-outline-boxes"
|
|
@@ -9243,8 +9246,8 @@ var mo = (e, t) => {
|
|
|
9243
9246
|
}, e0 = ({ target: e, shapes: t, borderRadius: n, dashPeriod: r }) => {
|
|
9244
9247
|
const o = ee();
|
|
9245
9248
|
if (e.kind === "grid") return Wf.map((l) => {
|
|
9246
|
-
const s = Ns(
|
|
9247
|
-
return /* @__PURE__ */ v(
|
|
9249
|
+
const s = Ns(ii(o, l).strokeWidth), c = t.map((u) => t0(u, l)).join(""), d = t.filter((u) => u.kind === "ring" && u.axis === l);
|
|
9250
|
+
return /* @__PURE__ */ v(Ji, { children: [c !== "" && /* @__PURE__ */ a("path", {
|
|
9248
9251
|
d: c,
|
|
9249
9252
|
...s
|
|
9250
9253
|
}), d.map((u, h) => /* @__PURE__ */ a("path", {
|
|
@@ -9253,7 +9256,7 @@ var mo = (e, t) => {
|
|
|
9253
9256
|
...s
|
|
9254
9257
|
}, h))] }, l);
|
|
9255
9258
|
});
|
|
9256
|
-
const i = t.map((l) => l.kind === "box" ?
|
|
9259
|
+
const i = t.map((l) => l.kind === "box" ? Nr(l.rect, n) : "").join("");
|
|
9257
9260
|
return i === "" ? null : /* @__PURE__ */ a("path", { d: i });
|
|
9258
9261
|
}, t0 = (e, t) => e.kind === "line" && e.axis === t ? `M${e.from.x},${e.from.y}L${e.to.x},${e.to.y}` : "", n0 = ({ center: e, radius: t }) => {
|
|
9259
9262
|
const n = `${e.x},${e.y - t}`;
|
|
@@ -9409,7 +9412,7 @@ var mo = (e, t) => {
|
|
|
9409
9412
|
xValue: i0,
|
|
9410
9413
|
group: l0
|
|
9411
9414
|
}, c0 = () => {
|
|
9412
|
-
const { selectionStore: e } = W(), t = ae(), n = R(), r = Sn(), o = F((y) => y), i = En(o, r), l = Y((y) => y.pressedObservation), s =
|
|
9415
|
+
const { selectionStore: e } = W(), t = ae(), n = R(), r = Sn(), o = F((y) => y), i = En(o, r), l = Y((y) => y.pressedObservation), s = St(), c = _(() => d0({
|
|
9413
9416
|
scene: o,
|
|
9414
9417
|
pressed: l,
|
|
9415
9418
|
groupOptions: i,
|
|
@@ -9444,7 +9447,7 @@ var mo = (e, t) => {
|
|
|
9444
9447
|
selectedFor: w
|
|
9445
9448
|
}), e.getState().setSelection([w]));
|
|
9446
9449
|
};
|
|
9447
|
-
return /* @__PURE__ */ a(
|
|
9450
|
+
return /* @__PURE__ */ a(Sl, {
|
|
9448
9451
|
value: g.scope,
|
|
9449
9452
|
options: m,
|
|
9450
9453
|
onChange: f,
|
|
@@ -9517,7 +9520,7 @@ var mo = (e, t) => {
|
|
|
9517
9520
|
}
|
|
9518
9521
|
i(d), n.dispatch(c);
|
|
9519
9522
|
}, h = t(s ? "editor.overlayMenu.show" : "editor.overlayMenu.hide");
|
|
9520
|
-
return /* @__PURE__ */ a(
|
|
9523
|
+
return /* @__PURE__ */ a(vt, {
|
|
9521
9524
|
label: h,
|
|
9522
9525
|
children: /* @__PURE__ */ a("button", {
|
|
9523
9526
|
type: "button",
|
|
@@ -9634,7 +9637,7 @@ var mo = (e, t) => {
|
|
|
9634
9637
|
target: e,
|
|
9635
9638
|
parsingLocale: t.config.parsingLocale
|
|
9636
9639
|
}), d = c === void 0 ? null : s.data.getAt(c);
|
|
9637
|
-
return d === null ? l :
|
|
9640
|
+
return d === null ? l : fr({
|
|
9638
9641
|
scene: t,
|
|
9639
9642
|
layer: s,
|
|
9640
9643
|
observation: d,
|
|
@@ -9643,7 +9646,7 @@ var mo = (e, t) => {
|
|
|
9643
9646
|
t: o
|
|
9644
9647
|
}, e.scope);
|
|
9645
9648
|
}, P0 = ({ frameElement: e }) => {
|
|
9646
|
-
const { selectionStore: t } = W(), n = L0(Y((u) => u.selectedOutline)), r = Y((u) => u.annotatePress), o = Re[ye()].showMenuTriggerOnHover, i = T1(n?.target ?? null), l =
|
|
9649
|
+
const { selectionStore: t } = W(), n = L0(Y((u) => u.selectedOutline)), r = Y((u) => u.annotatePress), o = Re[ye()].showMenuTriggerOnHover, i = T1(n?.target ?? null), l = St(), s = n === null ? null : Rt(n.target), c = _(() => o && s !== null ? v0(r, s) : null, [
|
|
9647
9650
|
o,
|
|
9648
9651
|
r,
|
|
9649
9652
|
s
|
|
@@ -9652,7 +9655,7 @@ var mo = (e, t) => {
|
|
|
9652
9655
|
const d = () => {
|
|
9653
9656
|
t.getState().clearSelection();
|
|
9654
9657
|
};
|
|
9655
|
-
return /* @__PURE__ */ v(
|
|
9658
|
+
return /* @__PURE__ */ v(wr, {
|
|
9656
9659
|
frameElement: e,
|
|
9657
9660
|
boundary: c?.boundary ?? n.frame,
|
|
9658
9661
|
spans: c?.spans ?? n.frameSpans,
|
|
@@ -9663,10 +9666,10 @@ var mo = (e, t) => {
|
|
|
9663
9666
|
className: b0,
|
|
9664
9667
|
children: [/* @__PURE__ */ a(k0, { target: n.target }), /* @__PURE__ */ a(g0, { target: n.target }, s)]
|
|
9665
9668
|
}), n.target.kind === "observations" && /* @__PURE__ */ a(c0, {})]
|
|
9666
|
-
}), /* @__PURE__ */ a(
|
|
9669
|
+
}), /* @__PURE__ */ a(Ji, { children: i }, s)]
|
|
9667
9670
|
});
|
|
9668
9671
|
}, L0 = (e) => {
|
|
9669
|
-
const t = at(), [n, r] = Z(e), o = n !== null &&
|
|
9672
|
+
const t = at(), [n, r] = Z(e), o = n !== null && $r(t[0] ?? null, n.target), i = e ?? (o ? n : null);
|
|
9670
9673
|
return i !== n && r(i), i;
|
|
9671
9674
|
}, I0 = ({ frameRect: e }) => {
|
|
9672
9675
|
const { targetBoundaryStore: t } = W(), n = Y((l) => l.selectedOutline), { left: r, top: o } = e, i = _(() => {
|
|
@@ -9699,10 +9702,10 @@ var mo = (e, t) => {
|
|
|
9699
9702
|
}, Zt = (e, t, n) => ({
|
|
9700
9703
|
from: t + e.from * n,
|
|
9701
9704
|
to: t + e.to * n
|
|
9702
|
-
}),
|
|
9705
|
+
}), pa = "l8tsqe0", Bs = ["start", "end"], Hs = ({ anchor: e, point: t, delta: n, bounds: r = Ci }) => {
|
|
9703
9706
|
const o = {
|
|
9704
|
-
x:
|
|
9705
|
-
y:
|
|
9707
|
+
x: yo(t.x, n.x, r.minX, r.maxX),
|
|
9708
|
+
y: yo(1 - t.y, n.y, r.minY, r.maxY)
|
|
9706
9709
|
};
|
|
9707
9710
|
return {
|
|
9708
9711
|
anchor: {
|
|
@@ -9715,7 +9718,7 @@ var mo = (e, t) => {
|
|
|
9715
9718
|
y: t.y - o.y
|
|
9716
9719
|
}
|
|
9717
9720
|
};
|
|
9718
|
-
},
|
|
9721
|
+
}, ga = (e, t) => ({
|
|
9719
9722
|
...e,
|
|
9720
9723
|
[t.endpoint]: {
|
|
9721
9724
|
...e[t.endpoint],
|
|
@@ -9735,20 +9738,20 @@ var mo = (e, t) => {
|
|
|
9735
9738
|
width: Math.abs(o.x - r.x),
|
|
9736
9739
|
height: Math.abs(o.y - r.y)
|
|
9737
9740
|
};
|
|
9738
|
-
},
|
|
9741
|
+
}, yo = (e, t, n, r) => !Number.isFinite(t) || !Number.isFinite(e) ? 0 : mt(t, Math.min(n - e, 0), Math.max(r - e, 0)), O0 = ({ panelRect: e }) => {
|
|
9739
9742
|
const t = Y((s) => J(s, "arrow-endpoint-drag")), n = rt(e).arrows, r = ee();
|
|
9740
9743
|
if (t === null) return null;
|
|
9741
9744
|
const o = n.find((s) => s.id === t.annotationId);
|
|
9742
9745
|
if (o === void 0) return null;
|
|
9743
|
-
const i =
|
|
9744
|
-
arrow:
|
|
9746
|
+
const i = Ur(r, o.id), l = Gi({
|
|
9747
|
+
arrow: ga(o, t),
|
|
9745
9748
|
style: i,
|
|
9746
9749
|
panelWidth: e.width,
|
|
9747
9750
|
panelHeight: e.height
|
|
9748
9751
|
});
|
|
9749
9752
|
return l === null ? null : /* @__PURE__ */ a("svg", {
|
|
9750
9753
|
"aria-hidden": "true",
|
|
9751
|
-
className:
|
|
9754
|
+
className: pa,
|
|
9752
9755
|
width: e.width,
|
|
9753
9756
|
height: e.height,
|
|
9754
9757
|
style: {
|
|
@@ -9757,7 +9760,7 @@ var mo = (e, t) => {
|
|
|
9757
9760
|
},
|
|
9758
9761
|
"data-testid": "arrow-endpoint-preview",
|
|
9759
9762
|
"data-annotation-id": t.annotationId,
|
|
9760
|
-
children: /* @__PURE__ */ a(
|
|
9763
|
+
children: /* @__PURE__ */ a(si, {
|
|
9761
9764
|
computed: l,
|
|
9762
9765
|
style: i,
|
|
9763
9766
|
addressable: !1
|
|
@@ -9833,7 +9836,7 @@ var mo = (e, t) => {
|
|
|
9833
9836
|
]
|
|
9834
9837
|
})
|
|
9835
9838
|
}), D0 = "var(--pvjfpx0)", _0 = "var(--pvjfpx1)", F0 = "pvjfpx2", z0 = "pvjfpx3", B0 = "pvjfpx4", H0 = "pvjfpx6 pvjfpx5", G0 = "pvjfpx7 pvjfpx6 pvjfpx5", $0 = "pvjfpx8 pvjfpx5", kt = 8, V0 = ({ anchorBox: e, panelRect: t, frameWidth: n, frameHeight: r }) => {
|
|
9836
|
-
const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, s = i + 8, c =
|
|
9839
|
+
const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, s = i + 8, c = mt(l >= kt ? l : s, kt, r - kt - 36), d = kt;
|
|
9837
9840
|
return {
|
|
9838
9841
|
top: c,
|
|
9839
9842
|
left: d,
|
|
@@ -9980,7 +9983,7 @@ var mo = (e, t) => {
|
|
|
9980
9983
|
value: Bn.thick,
|
|
9981
9984
|
key: "graph.annotations.arrowToolbar.thickness.thick"
|
|
9982
9985
|
}
|
|
9983
|
-
],
|
|
9986
|
+
], So = [{
|
|
9984
9987
|
value: "lineArrow",
|
|
9985
9988
|
key: "graph.annotations.arrowToolbar.arrowhead.lineArrow",
|
|
9986
9989
|
Icon: $s
|
|
@@ -9988,7 +9991,7 @@ var mo = (e, t) => {
|
|
|
9988
9991
|
value: "none",
|
|
9989
9992
|
key: "graph.annotations.arrowToolbar.arrowhead.none",
|
|
9990
9993
|
Icon: Ec
|
|
9991
|
-
}],
|
|
9994
|
+
}], Co = [
|
|
9992
9995
|
{
|
|
9993
9996
|
value: "solid",
|
|
9994
9997
|
key: "graph.annotations.arrowToolbar.lineStyle.solid",
|
|
@@ -10006,7 +10009,7 @@ var mo = (e, t) => {
|
|
|
10006
10009
|
}
|
|
10007
10010
|
], tb = (e, t) => e.find((n) => n.value === t) ?? e[0];
|
|
10008
10011
|
var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o, frameElement: i }) => {
|
|
10009
|
-
const l = R(), { commands: s } = W(), c = F((S) => S.spec.styles.overrides), d = F((S) => xe(S.spec)), u = Rn(), h =
|
|
10012
|
+
const l = R(), { commands: s } = W(), c = F((S) => S.spec.styles.overrides), d = F((S) => xe(S.spec)), u = Rn(), h = Ur(ee(), e.id), p = tb(Co, tt(h.dashArray)), g = h.outline.strokeWidth > 0 || h.outline.shadow !== "none", m = _(() => ({
|
|
10010
10013
|
target: "annotation",
|
|
10011
10014
|
kind: "arrow",
|
|
10012
10015
|
annotation: e.id
|
|
@@ -10087,7 +10090,7 @@ var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o,
|
|
|
10087
10090
|
}),
|
|
10088
10091
|
...u.bind("startArrowhead"),
|
|
10089
10092
|
children: /* @__PURE__ */ a(Jt, {
|
|
10090
|
-
options:
|
|
10093
|
+
options: So,
|
|
10091
10094
|
current: e.startArrowheadStyle,
|
|
10092
10095
|
onPick: N
|
|
10093
10096
|
})
|
|
@@ -10100,7 +10103,7 @@ var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o,
|
|
|
10100
10103
|
}),
|
|
10101
10104
|
...u.bind("lineStyle"),
|
|
10102
10105
|
children: /* @__PURE__ */ a(Jt, {
|
|
10103
|
-
options:
|
|
10106
|
+
options: Co,
|
|
10104
10107
|
current: tt(h.dashArray),
|
|
10105
10108
|
onPick: x
|
|
10106
10109
|
})
|
|
@@ -10113,7 +10116,7 @@ var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o,
|
|
|
10113
10116
|
}),
|
|
10114
10117
|
...u.bind("endArrowhead"),
|
|
10115
10118
|
children: /* @__PURE__ */ a(Jt, {
|
|
10116
|
-
options:
|
|
10119
|
+
options: So,
|
|
10117
10120
|
current: e.endArrowheadStyle,
|
|
10118
10121
|
onPick: O
|
|
10119
10122
|
})
|
|
@@ -10151,13 +10154,13 @@ var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o,
|
|
|
10151
10154
|
})
|
|
10152
10155
|
})]
|
|
10153
10156
|
}, String(i.value))) });
|
|
10154
|
-
}, rb = "_1me29t10", Ae = (e, t) => t > 0 ? e / t : 0, Ws = (e, t) => e.width <= 0 || e.height <= 0 || t.width <= 0 || t.height <= 0 ?
|
|
10157
|
+
}, rb = "_1me29t10", Ae = (e, t) => t > 0 ? e / t : 0, Ws = (e, t) => e.width <= 0 || e.height <= 0 || t.width <= 0 || t.height <= 0 ? Ci : {
|
|
10155
10158
|
minX: Math.min(0, -e.x / e.width),
|
|
10156
10159
|
minY: Math.min(0, -e.y / e.height),
|
|
10157
10160
|
maxX: Math.max(1, (t.width - e.x) / e.width),
|
|
10158
10161
|
maxY: Math.max(1, (t.height - e.y) / e.height)
|
|
10159
10162
|
}, Ge = (e, t) => {
|
|
10160
|
-
const n = t.getBoundingClientRect(), r =
|
|
10163
|
+
const n = t.getBoundingClientRect(), r = Cr(t, n), o = r.width + 0.5 >= e.x + e.width && r.height + 0.5 >= e.y + e.height ? r : n;
|
|
10161
10164
|
return Ws(e, o);
|
|
10162
10165
|
}, Nn = (e, t, n) => ({
|
|
10163
10166
|
x: Ae(t.x - e.x, n.width),
|
|
@@ -10227,7 +10230,7 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
|
|
|
10227
10230
|
}
|
|
10228
10231
|
readOwn(e) {
|
|
10229
10232
|
const { annotationId: t, endpoint: n } = this.params;
|
|
10230
|
-
return
|
|
10233
|
+
return _r(J(e, "arrow-endpoint-drag"), t, n);
|
|
10231
10234
|
}
|
|
10232
10235
|
resolvePreview(e) {
|
|
10233
10236
|
const { annotationId: t, endpoint: n, press: r, readInputs: o } = this.params, { annotations: i, arrow: l, panelRect: s, frameElement: c } = o(), d = mn(i, t, n);
|
|
@@ -10288,10 +10291,10 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
|
|
|
10288
10291
|
i,
|
|
10289
10292
|
o
|
|
10290
10293
|
]);
|
|
10291
|
-
}, sb = [" ", "Enter"],
|
|
10294
|
+
}, sb = [" ", "Enter"], wo = 4, cb = ({ annotationId: e, arrow: t, panelRect: n, frameElement: r }) => {
|
|
10292
10295
|
const { commands: o } = W(), i = ae(), l = F((d) => d.spec.annotations), s = ue(l), c = ue(o.dispatch);
|
|
10293
10296
|
return B(() => () => {
|
|
10294
|
-
for (const d of Bs)
|
|
10297
|
+
for (const d of Bs) xo({
|
|
10295
10298
|
editorStore: i,
|
|
10296
10299
|
annotationId: e,
|
|
10297
10300
|
endpoint: d,
|
|
@@ -10305,11 +10308,11 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
|
|
|
10305
10308
|
c
|
|
10306
10309
|
]), ce((d) => ({ onKeyDown: (u) => {
|
|
10307
10310
|
if (u.altKey || u.ctrlKey || u.metaKey || u.shiftKey) return;
|
|
10308
|
-
const h = i.getState(), p =
|
|
10311
|
+
const h = i.getState(), p = _r(J(h, "arrow-endpoint-drag"), e, d);
|
|
10309
10312
|
if (sb.includes(u.key)) {
|
|
10310
10313
|
if (u.preventDefault(), u.repeat) return;
|
|
10311
10314
|
if (p !== null) {
|
|
10312
|
-
|
|
10315
|
+
xo({
|
|
10313
10316
|
editorStore: i,
|
|
10314
10317
|
annotationId: e,
|
|
10315
10318
|
endpoint: d,
|
|
@@ -10351,8 +10354,8 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
|
|
|
10351
10354
|
i,
|
|
10352
10355
|
o
|
|
10353
10356
|
]);
|
|
10354
|
-
},
|
|
10355
|
-
const i = e.getState(), l =
|
|
10357
|
+
}, xo = ({ editorStore: e, annotationId: t, endpoint: n, annotations: r, dispatch: o }) => {
|
|
10358
|
+
const i = e.getState(), l = _r(J(i, "arrow-endpoint-drag"), t, n);
|
|
10356
10359
|
if (l === null) return;
|
|
10357
10360
|
i.releaseInteraction("arrow-endpoint-drag");
|
|
10358
10361
|
const s = mn(r, t, n);
|
|
@@ -10362,7 +10365,7 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
|
|
|
10362
10365
|
patch: Ks(n, l.anchor)
|
|
10363
10366
|
}));
|
|
10364
10367
|
}, db = (e, t) => {
|
|
10365
|
-
const n = Ae(
|
|
10368
|
+
const n = Ae(wo, t.width), r = Ae(wo, t.height);
|
|
10366
10369
|
switch (e) {
|
|
10367
10370
|
case "ArrowLeft":
|
|
10368
10371
|
return {
|
|
@@ -10390,7 +10393,7 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
|
|
|
10390
10393
|
}, ub = (e) => {
|
|
10391
10394
|
const t = Ft(), n = gb(t), r = mb(e.panelRect, t), o = vb(t);
|
|
10392
10395
|
if (n === null || r === null) return null;
|
|
10393
|
-
const i = o.dragged === null ? r :
|
|
10396
|
+
const i = o.dragged === null ? r : ga(r, o.dragged);
|
|
10394
10397
|
return /* @__PURE__ */ a(hb, {
|
|
10395
10398
|
arrow: n,
|
|
10396
10399
|
committed: r,
|
|
@@ -10472,7 +10475,7 @@ var Cb = [
|
|
|
10472
10475
|
"absoluteDifference",
|
|
10473
10476
|
"relativeDifference",
|
|
10474
10477
|
"proportion"
|
|
10475
|
-
],
|
|
10478
|
+
], ko = ["absoluteDifference", "relativeDifference"], wb = ["relativeDifference", "proportion"], xb = {
|
|
10476
10479
|
absoluteDifference: "graph.annotations.differenceArrowToolbar.labelKind.absoluteDifference",
|
|
10477
10480
|
relativeDifference: "graph.annotations.differenceArrowToolbar.labelKind.relativeDifference",
|
|
10478
10481
|
proportion: "graph.annotations.differenceArrowToolbar.labelKind.proportion"
|
|
@@ -10480,7 +10483,7 @@ var Cb = [
|
|
|
10480
10483
|
const { formattingLocale: t } = W(), n = F((o) => o.config.parsingLocale), r = t ?? n;
|
|
10481
10484
|
return _(() => {
|
|
10482
10485
|
const o = eu(e.start, e.end);
|
|
10483
|
-
return Cb.filter((i) => o || !
|
|
10486
|
+
return Cb.filter((i) => o || !ko.includes(i) || i === e.label).map((i) => ({
|
|
10484
10487
|
kind: i,
|
|
10485
10488
|
key: xb[i],
|
|
10486
10489
|
preview: Su({
|
|
@@ -10490,11 +10493,11 @@ var Cb = [
|
|
|
10490
10493
|
endValue: e.end.measurementValue,
|
|
10491
10494
|
valueFormat: e.start.valueFormat
|
|
10492
10495
|
}),
|
|
10493
|
-
pickable: o || !
|
|
10496
|
+
pickable: o || !ko.includes(i),
|
|
10494
10497
|
suspect: wb.includes(i) && e.start.measurementValue === 0
|
|
10495
10498
|
}));
|
|
10496
10499
|
}, [e, r]);
|
|
10497
|
-
},
|
|
10500
|
+
}, To = [
|
|
10498
10501
|
{
|
|
10499
10502
|
id: "small",
|
|
10500
10503
|
key: "graph.annotations.differenceArrowToolbar.size.small"
|
|
@@ -10515,7 +10518,7 @@ var Cb = [
|
|
|
10515
10518
|
}), [e.id]), f = _(() => ({
|
|
10516
10519
|
...m,
|
|
10517
10520
|
part: "label"
|
|
10518
|
-
}), [m]), y = p.find((b) => b.kind === e.label), k = p.some((b) => b.pickable && b.kind !== e.label), C =
|
|
10521
|
+
}), [m]), y = p.find((b) => b.kind === e.label), k = p.some((b) => b.pickable && b.kind !== e.label), C = To.find((b) => Ta[b.id].arrow.strokeWidth === g.strokeWidth), w = (b, E) => {
|
|
10519
10522
|
c.dispatch(new fe({
|
|
10520
10523
|
kind: "differenceArrow",
|
|
10521
10524
|
id: e.id,
|
|
@@ -10541,7 +10544,7 @@ var Cb = [
|
|
|
10541
10544
|
start: e.end.anchor,
|
|
10542
10545
|
end: e.start.anchor
|
|
10543
10546
|
}), A = (b) => () => I({ label: b }), S = (b) => () => {
|
|
10544
|
-
const E =
|
|
10547
|
+
const E = Ta[b];
|
|
10545
10548
|
c.dispatch(new Nd({
|
|
10546
10549
|
annotationId: e.id,
|
|
10547
10550
|
arrow: P(E.arrow),
|
|
@@ -10592,7 +10595,7 @@ var Cb = [
|
|
|
10592
10595
|
label: s("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
|
|
10593
10596
|
trigger: C === void 0 ? "" : s(C.key),
|
|
10594
10597
|
...h.bind("size"),
|
|
10595
|
-
children:
|
|
10598
|
+
children: To.map((b) => /* @__PURE__ */ a(V.MenuItem, {
|
|
10596
10599
|
selected: b.id === C?.id,
|
|
10597
10600
|
onClick: S(b.id),
|
|
10598
10601
|
children: s(b.key)
|
|
@@ -10639,20 +10642,20 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10639
10642
|
if (u === null) return null;
|
|
10640
10643
|
const h = o.find((g) => g.id === u.layerId);
|
|
10641
10644
|
if (h === void 0) return null;
|
|
10642
|
-
const p =
|
|
10645
|
+
const p = Yi({
|
|
10643
10646
|
resolver: l,
|
|
10644
10647
|
layer: h,
|
|
10645
10648
|
observation: u.observation,
|
|
10646
|
-
observationIndex:
|
|
10649
|
+
observationIndex: yt(u),
|
|
10647
10650
|
coordSystem: i,
|
|
10648
10651
|
align: c
|
|
10649
10652
|
});
|
|
10650
|
-
return p === null ||
|
|
10653
|
+
return p === null || Gr(p.anchor, s) ? null : p;
|
|
10651
10654
|
}, Eb = (e, t) => ({
|
|
10652
10655
|
x: Math.max(0, Math.min(e.x, t.width)),
|
|
10653
10656
|
y: Math.max(0, Math.min(e.y, t.height))
|
|
10654
10657
|
}), Xs = (e) => e === "start" ? "end" : "start", qs = ({ dispatch: e, arrow: t, endpoint: n, anchor: r }) => {
|
|
10655
|
-
|
|
10658
|
+
Gr(r, t[n].anchor) || e(new fe({
|
|
10656
10659
|
kind: "differenceArrow",
|
|
10657
10660
|
id: t.id,
|
|
10658
10661
|
patch: { [n]: r }
|
|
@@ -10663,7 +10666,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10663
10666
|
}
|
|
10664
10667
|
readOwn(e) {
|
|
10665
10668
|
const { endpoint: t, readInputs: n } = this.params;
|
|
10666
|
-
return
|
|
10669
|
+
return mi(J(e, "difference-arrow-endpoint-drag"), n().arrow.id, t);
|
|
10667
10670
|
}
|
|
10668
10671
|
resolvePreview(e) {
|
|
10669
10672
|
const { endpoint: t, readInputs: n, engine: r, anchorResolver: o } = this.params, { arrow: i, panelOrigin: l, panelRect: s, layers: c, coordSystem: d } = n(), u = Mb({
|
|
@@ -10748,7 +10751,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10748
10751
|
J(c, "difference-arrow-endpoint-drag")?.annotationId === s && c.releaseInteraction("difference-arrow-endpoint-drag");
|
|
10749
10752
|
}, [r, s]), ce((c) => ({ onKeyDown: (d) => {
|
|
10750
10753
|
if (d.altKey || d.ctrlKey || d.metaKey || d.shiftKey) return;
|
|
10751
|
-
const u = r.getState(), h =
|
|
10754
|
+
const u = r.getState(), h = mi(J(u, "difference-arrow-endpoint-drag"), e.id, c);
|
|
10752
10755
|
if (Nb.includes(d.key)) {
|
|
10753
10756
|
if (d.preventDefault(), d.repeat) return;
|
|
10754
10757
|
if (h === null) return u.claimInteraction({
|
|
@@ -10811,7 +10814,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10811
10814
|
partner: e[Xs(t)].anchor,
|
|
10812
10815
|
axis: r.axis,
|
|
10813
10816
|
step: r.step,
|
|
10814
|
-
getObservationPoint: (u, h) =>
|
|
10817
|
+
getObservationPoint: (u, h) => Yi({
|
|
10815
10818
|
resolver: l,
|
|
10816
10819
|
layer: s,
|
|
10817
10820
|
observation: u,
|
|
@@ -10822,7 +10825,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10822
10825
|
})
|
|
10823
10826
|
})?.point ?? null;
|
|
10824
10827
|
}, zb = (e) => {
|
|
10825
|
-
const t = Ft(), n =
|
|
10828
|
+
const t = Ft(), n = ri(), r = ce((o) => {
|
|
10826
10829
|
const i = e.frameElement.querySelector('[data-testid="pointer-capture-layer"]');
|
|
10827
10830
|
i !== null && i.dispatchEvent(new PointerEvent("pointerdown", {
|
|
10828
10831
|
bubbles: !0,
|
|
@@ -10846,7 +10849,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10846
10849
|
onClick: r
|
|
10847
10850
|
}, o.id))] });
|
|
10848
10851
|
}, Bb = ({ annotationId: e, panelOrigin: t, ...n }) => {
|
|
10849
|
-
const r =
|
|
10852
|
+
const r = ri(), o = _(() => r.find((i) => i.id === e), [r, e]);
|
|
10850
10853
|
return o === void 0 ? null : /* @__PURE__ */ a(Hb, {
|
|
10851
10854
|
committedArrow: o.committedArrow,
|
|
10852
10855
|
color: o.color,
|
|
@@ -10903,7 +10906,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10903
10906
|
}), u = Db({ arrow: e.committedArrow }), h = ee().editOutline.selected().resolve().stroke;
|
|
10904
10907
|
return /* @__PURE__ */ v("div", {
|
|
10905
10908
|
style: De({ [js]: h }),
|
|
10906
|
-
children: [/* @__PURE__ */ a(
|
|
10909
|
+
children: [/* @__PURE__ */ a(Ao, {
|
|
10907
10910
|
endpoint: "start",
|
|
10908
10911
|
point: e.start,
|
|
10909
10912
|
panelRect: r,
|
|
@@ -10911,7 +10914,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10911
10914
|
keyboard: n,
|
|
10912
10915
|
dragHandlers: d("start"),
|
|
10913
10916
|
keyboardHandlers: u("start")
|
|
10914
|
-
}), /* @__PURE__ */ a(
|
|
10917
|
+
}), /* @__PURE__ */ a(Ao, {
|
|
10915
10918
|
endpoint: "end",
|
|
10916
10919
|
point: e.end,
|
|
10917
10920
|
panelRect: r,
|
|
@@ -10921,7 +10924,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10921
10924
|
keyboardHandlers: u("end")
|
|
10922
10925
|
})]
|
|
10923
10926
|
});
|
|
10924
|
-
},
|
|
10927
|
+
}, Ao = ({ endpoint: e, point: t, panelRect: n, shown: r, keyboard: o, dragHandlers: i, keyboardHandlers: l }) => /* @__PURE__ */ a("div", {
|
|
10925
10928
|
className: Pb,
|
|
10926
10929
|
"data-testid": "difference-arrow-selection-handle",
|
|
10927
10930
|
"data-endpoint": e,
|
|
@@ -10938,14 +10941,14 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10938
10941
|
"aria-hidden": "true",
|
|
10939
10942
|
className: Lb
|
|
10940
10943
|
})
|
|
10941
|
-
}),
|
|
10944
|
+
}), Ar = ({ start: e, extent: t, moveStartEdge: n, delta: r, minExtent: o, bounds: i }) => {
|
|
10942
10945
|
if (!Number.isFinite(r)) return {
|
|
10943
10946
|
start: e,
|
|
10944
10947
|
extent: t
|
|
10945
10948
|
};
|
|
10946
10949
|
const l = i?.min ?? 0, s = i?.max ?? 1, c = e + t, d = Math.min(o, t);
|
|
10947
10950
|
if (n) {
|
|
10948
|
-
const p = Math.min(l, e), g = Math.min(Math.max(s, e), c - d), m =
|
|
10951
|
+
const p = Math.min(l, e), g = Math.min(Math.max(s, e), c - d), m = mt(e + r, p, g);
|
|
10949
10952
|
return {
|
|
10950
10953
|
start: m,
|
|
10951
10954
|
extent: c - m
|
|
@@ -10954,7 +10957,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
|
|
|
10954
10957
|
const u = Math.max(Math.min(l, c), e + d), h = Math.max(s, c);
|
|
10955
10958
|
return {
|
|
10956
10959
|
start: e,
|
|
10957
|
-
extent:
|
|
10960
|
+
extent: mt(c + r, u, h) - e
|
|
10958
10961
|
};
|
|
10959
10962
|
}, $b = [
|
|
10960
10963
|
"top-left",
|
|
@@ -10968,13 +10971,13 @@ var Ys = ({ width: e, height: t }) => ({
|
|
|
10968
10971
|
}), Vb = (e, t) => ({
|
|
10969
10972
|
x: Qs(t) ? e.x : e.x + e.width,
|
|
10970
10973
|
y: ec(t) ? e.y : e.y + e.height
|
|
10971
|
-
}),
|
|
10974
|
+
}), ma = (e) => ({
|
|
10972
10975
|
x: e.x,
|
|
10973
10976
|
y: 1 - e.y - e.height,
|
|
10974
10977
|
width: e.width,
|
|
10975
10978
|
height: e.height
|
|
10976
10979
|
}), Zs = ({ region: e, corner: t, delta: n, minSize: r, bounds: o }) => {
|
|
10977
|
-
const i =
|
|
10980
|
+
const i = Ar({
|
|
10978
10981
|
start: e.x,
|
|
10979
10982
|
extent: e.width,
|
|
10980
10983
|
moveStartEdge: Qs(t),
|
|
@@ -10984,7 +10987,7 @@ var Ys = ({ width: e, height: t }) => ({
|
|
|
10984
10987
|
min: o.minX,
|
|
10985
10988
|
max: o.maxX
|
|
10986
10989
|
} }
|
|
10987
|
-
}), l =
|
|
10990
|
+
}), l = Ar({
|
|
10988
10991
|
start: e.y,
|
|
10989
10992
|
extent: e.height,
|
|
10990
10993
|
moveStartEdge: ec(t),
|
|
@@ -11013,7 +11016,7 @@ var Ub = {
|
|
|
11013
11016
|
hovered: "_1ee8fau5 _1ee8fau4",
|
|
11014
11017
|
selected: "_1ee8fau6 _1ee8fau4"
|
|
11015
11018
|
}, jb = ({ panelRect: e }) => {
|
|
11016
|
-
const t = rt(e), n =
|
|
11019
|
+
const t = rt(e), n = fi(), r = ee(), o = Ft(), i = Y((f) => J(f, "move-drag")), l = Y((f) => J(f, "shape-resize-drag")), s = Y((f) => J(f, "arrow-endpoint-drag")), c = Y((f) => J(f, "text-resize-drag")), d = Y(Oc), u = _(() => ({
|
|
11017
11020
|
panel: {
|
|
11018
11021
|
width: e.width,
|
|
11019
11022
|
height: e.height
|
|
@@ -11025,14 +11028,14 @@ var Ub = {
|
|
|
11025
11028
|
e.height,
|
|
11026
11029
|
n,
|
|
11027
11030
|
r
|
|
11028
|
-
]), h =
|
|
11031
|
+
]), h = Po(t, o, u), p = Po(t, d === o ? null : d, u), g = (f) => {
|
|
11029
11032
|
if (l?.annotationId === f.id) {
|
|
11030
11033
|
const y = t.shapes.find((k) => k.id === f.id);
|
|
11031
|
-
return y === void 0 ? f.geometry :
|
|
11034
|
+
return y === void 0 ? f.geometry : oi(ma(l.region), r.annotation.shape(y.id).get("strokeWidth"), u.panel);
|
|
11032
11035
|
}
|
|
11033
11036
|
if (s?.annotationId === f.id) {
|
|
11034
11037
|
const y = t.arrows.find((k) => k.id === f.id);
|
|
11035
|
-
return y === void 0 ? f.geometry : yd(
|
|
11038
|
+
return y === void 0 ? f.geometry : yd(ga(y, s), u.panel) ?? f.geometry;
|
|
11036
11039
|
}
|
|
11037
11040
|
return c?.annotationId === f.id ? tc(t, f.id, c, u) ?? f.geometry : f.geometry;
|
|
11038
11041
|
}, m = (f) => {
|
|
@@ -11043,25 +11046,25 @@ var Ub = {
|
|
|
11043
11046
|
y: e.y + y.y
|
|
11044
11047
|
};
|
|
11045
11048
|
};
|
|
11046
|
-
return /* @__PURE__ */ v(K, { children: [p !== null && /* @__PURE__ */ a(
|
|
11049
|
+
return /* @__PURE__ */ v(K, { children: [p !== null && /* @__PURE__ */ a(Lo, {
|
|
11047
11050
|
annotationId: p.id,
|
|
11048
11051
|
geometry: g(p),
|
|
11049
11052
|
state: "hovered",
|
|
11050
11053
|
origin: m(p.id)
|
|
11051
|
-
}), h !== null && /* @__PURE__ */ a(
|
|
11054
|
+
}), h !== null && /* @__PURE__ */ a(Lo, {
|
|
11052
11055
|
annotationId: h.id,
|
|
11053
11056
|
geometry: g(h),
|
|
11054
11057
|
state: "selected",
|
|
11055
11058
|
origin: m(h.id)
|
|
11056
11059
|
})] });
|
|
11057
|
-
},
|
|
11060
|
+
}, Po = (e, t, n) => {
|
|
11058
11061
|
if (t === null) return null;
|
|
11059
11062
|
const r = Gc(e, t, n);
|
|
11060
11063
|
return r === null ? null : {
|
|
11061
11064
|
id: t,
|
|
11062
11065
|
geometry: r
|
|
11063
11066
|
};
|
|
11064
|
-
},
|
|
11067
|
+
}, Lo = ({ annotationId: e, geometry: t, state: n, origin: r }) => {
|
|
11065
11068
|
const o = ee().editOutline.selected().resolve().stroke, i = De({ [Wb]: o });
|
|
11066
11069
|
return t.shape === "segment" ? /* @__PURE__ */ v("div", {
|
|
11067
11070
|
"aria-hidden": "true",
|
|
@@ -11069,11 +11072,11 @@ var Ub = {
|
|
|
11069
11072
|
"data-annotation-id": e,
|
|
11070
11073
|
"data-state": n,
|
|
11071
11074
|
style: i,
|
|
11072
|
-
children: [/* @__PURE__ */ a(
|
|
11075
|
+
children: [/* @__PURE__ */ a(Io, {
|
|
11073
11076
|
point: t.start,
|
|
11074
11077
|
state: n,
|
|
11075
11078
|
origin: r
|
|
11076
|
-
}), /* @__PURE__ */ a(
|
|
11079
|
+
}), /* @__PURE__ */ a(Io, {
|
|
11077
11080
|
point: t.end,
|
|
11078
11081
|
state: n,
|
|
11079
11082
|
origin: r
|
|
@@ -11092,7 +11095,7 @@ var Ub = {
|
|
|
11092
11095
|
height: t.rect.height + 4
|
|
11093
11096
|
}
|
|
11094
11097
|
});
|
|
11095
|
-
},
|
|
11098
|
+
}, Io = ({ point: e, state: t, origin: n }) => /* @__PURE__ */ a("span", {
|
|
11096
11099
|
className: Kb[t],
|
|
11097
11100
|
style: {
|
|
11098
11101
|
left: n.x + e.x,
|
|
@@ -11104,7 +11107,7 @@ var Ub = {
|
|
|
11104
11107
|
const r = Us(t.translation, e);
|
|
11105
11108
|
return /* @__PURE__ */ a("svg", {
|
|
11106
11109
|
"aria-hidden": "true",
|
|
11107
|
-
className:
|
|
11110
|
+
className: pa,
|
|
11108
11111
|
width: e.width,
|
|
11109
11112
|
height: e.height,
|
|
11110
11113
|
style: {
|
|
@@ -11150,18 +11153,18 @@ var Ub = {
|
|
|
11150
11153
|
}
|
|
11151
11154
|
return null;
|
|
11152
11155
|
}, Jb = ({ arrow: e, panelSize: t }) => {
|
|
11153
|
-
const n =
|
|
11156
|
+
const n = Ur(ee(), e.id), r = Gi({
|
|
11154
11157
|
arrow: e,
|
|
11155
11158
|
style: n,
|
|
11156
11159
|
panelWidth: t.width,
|
|
11157
11160
|
panelHeight: t.height
|
|
11158
11161
|
});
|
|
11159
|
-
return r === null ? null : /* @__PURE__ */ a(
|
|
11162
|
+
return r === null ? null : /* @__PURE__ */ a(si, {
|
|
11160
11163
|
computed: r,
|
|
11161
11164
|
style: n,
|
|
11162
11165
|
addressable: !1
|
|
11163
11166
|
});
|
|
11164
|
-
}, Qb = ({ shape: e, panelSize: t }) => /* @__PURE__ */ a(
|
|
11167
|
+
}, Qb = ({ shape: e, panelSize: t }) => /* @__PURE__ */ a(vi, {
|
|
11165
11168
|
shape: e,
|
|
11166
11169
|
style: ee().annotation.shape(e.id).resolve(),
|
|
11167
11170
|
panel: t
|
|
@@ -11169,15 +11172,15 @@ var Ub = {
|
|
|
11169
11172
|
image: e,
|
|
11170
11173
|
panel: t,
|
|
11171
11174
|
style: ee().annotation.image(e.id).resolve()
|
|
11172
|
-
}), t5 = "s8eewu0",
|
|
11175
|
+
}), t5 = "s8eewu0", Mo = "s8eewu1", n5 = ({ frameElement: e, panelRect: t }) => {
|
|
11173
11176
|
const n = Y((d) => J(d, "arrow-draw")), r = Y((d) => J(d, "box-draw")), o = n?.start ?? r?.start ?? null, [i, l] = Z(null);
|
|
11174
11177
|
if (B(() => {
|
|
11175
11178
|
if (n === null && r === null) return;
|
|
11176
11179
|
const d = (p, g) => {
|
|
11177
11180
|
const m = e.getBoundingClientRect();
|
|
11178
11181
|
l({
|
|
11179
|
-
x:
|
|
11180
|
-
y:
|
|
11182
|
+
x: Eo(p - m.left, 0, m.width),
|
|
11183
|
+
y: Eo(g - m.top, 0, m.height)
|
|
11181
11184
|
});
|
|
11182
11185
|
}, u = n?.pointer ?? r?.pointer;
|
|
11183
11186
|
u !== void 0 && d(u.x, u.y);
|
|
@@ -11196,13 +11199,13 @@ var Ub = {
|
|
|
11196
11199
|
return /* @__PURE__ */ a("svg", {
|
|
11197
11200
|
className: t5,
|
|
11198
11201
|
children: r === null ? /* @__PURE__ */ a("line", {
|
|
11199
|
-
className:
|
|
11202
|
+
className: Mo,
|
|
11200
11203
|
x1: s,
|
|
11201
11204
|
y1: c,
|
|
11202
11205
|
x2: i.x,
|
|
11203
11206
|
y2: i.y
|
|
11204
11207
|
}) : /* @__PURE__ */ a("rect", {
|
|
11205
|
-
className:
|
|
11208
|
+
className: Mo,
|
|
11206
11209
|
fill: "none",
|
|
11207
11210
|
x: Math.min(s, i.x),
|
|
11208
11211
|
y: Math.min(c, i.y),
|
|
@@ -11210,13 +11213,13 @@ var Ub = {
|
|
|
11210
11213
|
height: Math.abs(i.y - c)
|
|
11211
11214
|
})
|
|
11212
11215
|
});
|
|
11213
|
-
},
|
|
11216
|
+
}, Eo = (e, t, n) => Math.min(Math.max(e, t), n), r5 = ({ panelRect: e }) => {
|
|
11214
11217
|
const t = Y((i) => J(i, "shape-resize-drag")), n = rt(e).shapes, r = ee();
|
|
11215
11218
|
if (t === null) return null;
|
|
11216
11219
|
const o = n.find((i) => i.id === t.annotationId);
|
|
11217
11220
|
return o === void 0 ? null : /* @__PURE__ */ a("svg", {
|
|
11218
11221
|
"aria-hidden": "true",
|
|
11219
|
-
className:
|
|
11222
|
+
className: pa,
|
|
11220
11223
|
width: e.width,
|
|
11221
11224
|
height: e.height,
|
|
11222
11225
|
style: {
|
|
@@ -11225,10 +11228,10 @@ var Ub = {
|
|
|
11225
11228
|
},
|
|
11226
11229
|
"data-testid": "shape-resize-preview",
|
|
11227
11230
|
"data-annotation-id": t.annotationId,
|
|
11228
|
-
children: /* @__PURE__ */ a(
|
|
11231
|
+
children: /* @__PURE__ */ a(vi, {
|
|
11229
11232
|
shape: {
|
|
11230
11233
|
...o,
|
|
11231
|
-
region:
|
|
11234
|
+
region: ma(t.region)
|
|
11232
11235
|
},
|
|
11233
11236
|
style: r.annotation.shape(o.id).resolve(),
|
|
11234
11237
|
panel: e
|
|
@@ -11261,7 +11264,7 @@ var Ub = {
|
|
|
11261
11264
|
className: o5[r]
|
|
11262
11265
|
})
|
|
11263
11266
|
});
|
|
11264
|
-
},
|
|
11267
|
+
}, Pr = [
|
|
11265
11268
|
{
|
|
11266
11269
|
width: 0,
|
|
11267
11270
|
key: "graph.annotations.shapeToolbar.border.none"
|
|
@@ -11278,7 +11281,7 @@ var Ub = {
|
|
|
11278
11281
|
width: 16,
|
|
11279
11282
|
key: "graph.annotations.shapeToolbar.border.thick"
|
|
11280
11283
|
}
|
|
11281
|
-
], l5 = (e) => [...
|
|
11284
|
+
], l5 = (e) => [...Pr].reverse().find((t) => t.width <= e) ?? Pr[0], s5 = ({ shape: e, shapeBox: t, panelRect: n, frameWidth: r, frameHeight: o, frameElement: i }) => {
|
|
11282
11285
|
const l = R(), { commands: s } = W(), c = F((w) => w.spec.styles.overrides), d = F((w) => xe(w.spec)), u = Rn(), h = ee().annotation.shape(e.id).resolve(), p = l5(h.strokeWidth), g = _(() => ({
|
|
11283
11286
|
target: "annotation",
|
|
11284
11287
|
kind: "shape",
|
|
@@ -11327,7 +11330,7 @@ var Ub = {
|
|
|
11327
11330
|
title: ""
|
|
11328
11331
|
}),
|
|
11329
11332
|
...u.bind("border"),
|
|
11330
|
-
children:
|
|
11333
|
+
children: Pr.map((w) => /* @__PURE__ */ a(V.MenuItem, {
|
|
11331
11334
|
selected: w.width === p?.width,
|
|
11332
11335
|
onClick: C(w.width),
|
|
11333
11336
|
children: l(w.key)
|
|
@@ -11375,7 +11378,7 @@ var Ub = {
|
|
|
11375
11378
|
super(...e), this.kind = "shape-resize-drag";
|
|
11376
11379
|
}
|
|
11377
11380
|
readOwn(e) {
|
|
11378
|
-
return
|
|
11381
|
+
return Dr(J(e, "shape-resize-drag"), this.params.annotationId);
|
|
11379
11382
|
}
|
|
11380
11383
|
resolvePreview(e) {
|
|
11381
11384
|
const { annotationId: t, corner: n, press: r, readInputs: o } = this.params, { annotations: i, panelRect: l, frameElement: s } = o(), c = vn(i, t);
|
|
@@ -11415,13 +11418,13 @@ var Ub = {
|
|
|
11415
11418
|
}));
|
|
11416
11419
|
}, u5 = [" ", "Enter"], ac = (e) => {
|
|
11417
11420
|
const t = ae(), n = ue(e);
|
|
11418
|
-
return B(() => () =>
|
|
11421
|
+
return B(() => () => Oo(t, n.current), [t, n]), ce((r) => ({ onKeyDown: (o) => {
|
|
11419
11422
|
if (o.altKey || o.ctrlKey || o.metaKey || o.shiftKey) return;
|
|
11420
11423
|
const i = t.getState(), l = n.current.readHeld();
|
|
11421
11424
|
if (u5.includes(o.key)) {
|
|
11422
11425
|
if (o.preventDefault(), o.repeat) return;
|
|
11423
11426
|
if (l !== null) {
|
|
11424
|
-
|
|
11427
|
+
Oo(t, n.current);
|
|
11425
11428
|
return;
|
|
11426
11429
|
}
|
|
11427
11430
|
const c = n.current.claim(r);
|
|
@@ -11433,13 +11436,13 @@ var Ub = {
|
|
|
11433
11436
|
const s = n.current.step(l, r, o.key);
|
|
11434
11437
|
s !== null && (o.preventDefault(), i.claimInteraction(s));
|
|
11435
11438
|
} }), [t, n]);
|
|
11436
|
-
},
|
|
11439
|
+
}, Oo = (e, t) => {
|
|
11437
11440
|
const n = t.readHeld();
|
|
11438
11441
|
n !== null && (e.getState().releaseInteraction(n.kind), t.commit(n));
|
|
11439
|
-
},
|
|
11442
|
+
}, Ro = 4, h5 = ({ annotationId: e, panelRect: t, frameElement: n }) => {
|
|
11440
11443
|
const { commands: r } = W(), o = ae(), i = F((l) => l.spec.annotations);
|
|
11441
11444
|
return ac({
|
|
11442
|
-
readHeld: () =>
|
|
11445
|
+
readHeld: () => Dr(J(o.getState(), "shape-resize-drag"), e),
|
|
11443
11446
|
claim: () => {
|
|
11444
11447
|
const l = vn(i, e);
|
|
11445
11448
|
return l === null ? null : {
|
|
@@ -11472,7 +11475,7 @@ var Ub = {
|
|
|
11472
11475
|
}
|
|
11473
11476
|
});
|
|
11474
11477
|
}, p5 = (e, t) => {
|
|
11475
|
-
const n = Ae(
|
|
11478
|
+
const n = Ae(Ro, t.width), r = Ae(Ro, t.height);
|
|
11476
11479
|
switch (e) {
|
|
11477
11480
|
case "ArrowLeft":
|
|
11478
11481
|
return {
|
|
@@ -11522,7 +11525,7 @@ var Ub = {
|
|
|
11522
11525
|
annotationId: e.id,
|
|
11523
11526
|
panelRect: o,
|
|
11524
11527
|
frameElement: l
|
|
11525
|
-
}), u = ee().annotation.shape(e.id).resolve(), { rect: h } =
|
|
11528
|
+
}), u = ee().annotation.shape(e.id).resolve(), { rect: h } = oi(ma(t), u.strokeWidth, o);
|
|
11526
11529
|
return /* @__PURE__ */ v("div", {
|
|
11527
11530
|
"data-testid": "shape-selection",
|
|
11528
11531
|
"data-annotation-id": e.id,
|
|
@@ -11559,7 +11562,7 @@ var Ub = {
|
|
|
11559
11562
|
resizedRegion: null,
|
|
11560
11563
|
moving: !1
|
|
11561
11564
|
} : {
|
|
11562
|
-
resizedRegion:
|
|
11565
|
+
resizedRegion: Dr(J(t, "shape-resize-drag"), e)?.region ?? null,
|
|
11563
11566
|
moving: yn(J(t, "move-drag"), e) !== null
|
|
11564
11567
|
})), y5 = ({ textColor: e, ...t }) => /* @__PURE__ */ v(M, {
|
|
11565
11568
|
...t,
|
|
@@ -11748,7 +11751,7 @@ var ic = [
|
|
|
11748
11751
|
})
|
|
11749
11752
|
]
|
|
11750
11753
|
});
|
|
11751
|
-
}, T5 = (e) => e === "transparent" ? { fill:
|
|
11754
|
+
}, T5 = (e) => e === "transparent" ? { fill: pl } : {
|
|
11752
11755
|
fill: e,
|
|
11753
11756
|
fillAlpha: tv(e) ? Zd : 1
|
|
11754
11757
|
}, A5 = ({ current: e, onPick: t }) => {
|
|
@@ -11772,7 +11775,7 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
|
|
|
11772
11775
|
width: t,
|
|
11773
11776
|
shift: 0
|
|
11774
11777
|
};
|
|
11775
|
-
const c = Qd(n).x, d = I5(e.offset, l), u =
|
|
11778
|
+
const c = Qd(n).x, d = I5(e.offset, l), u = Ar({
|
|
11776
11779
|
start: e.x + d - c * t,
|
|
11777
11780
|
extent: t,
|
|
11778
11781
|
moveStartEdge: r === "left",
|
|
@@ -11803,7 +11806,7 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
|
|
|
11803
11806
|
super(...e), this.kind = "text-resize-drag";
|
|
11804
11807
|
}
|
|
11805
11808
|
readOwn(e) {
|
|
11806
|
-
return
|
|
11809
|
+
return Or(J(e, "text-resize-drag"), this.params.annotationId);
|
|
11807
11810
|
}
|
|
11808
11811
|
resolvePreview(e) {
|
|
11809
11812
|
const { annotationId: t, edge: n, press: r, readInputs: o } = this.params, { annotations: i, panelRect: l, frameElement: s } = o(), c = fn(i, t);
|
|
@@ -11866,7 +11869,7 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
|
|
|
11866
11869
|
};
|
|
11867
11870
|
};
|
|
11868
11871
|
return ac({
|
|
11869
|
-
readHeld: () =>
|
|
11872
|
+
readHeld: () => Or(J(o.getState(), "text-resize-drag"), e),
|
|
11870
11873
|
claim: (s) => l(s, 0),
|
|
11871
11874
|
step: (s, c, d) => {
|
|
11872
11875
|
const u = N5(d, t);
|
|
@@ -11951,10 +11954,10 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
|
|
|
11951
11954
|
resized: null,
|
|
11952
11955
|
moving: !1
|
|
11953
11956
|
} : {
|
|
11954
|
-
resized:
|
|
11957
|
+
resized: Or(J(t, "text-resize-drag"), e),
|
|
11955
11958
|
moving: yn(J(t, "move-drag"), e) !== null
|
|
11956
11959
|
})), B5 = (e, t, n) => {
|
|
11957
|
-
const r = rt(e), o =
|
|
11960
|
+
const r = rt(e), o = fi(), i = ee(), l = _(() => ({
|
|
11958
11961
|
panel: {
|
|
11959
11962
|
width: e.width,
|
|
11960
11963
|
height: e.height
|
|
@@ -11968,8 +11971,8 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
|
|
|
11968
11971
|
i
|
|
11969
11972
|
]);
|
|
11970
11973
|
return t === null ? null : tc(r, t, n, l)?.rect ?? null;
|
|
11971
|
-
},
|
|
11972
|
-
var
|
|
11974
|
+
}, va = (e, t) => typeof document.elementsFromPoint == "function" ? document.elementsFromPoint(e, t) : [], H5 = (e, t, n) => Cn(va(e, t), n), G5 = "_1rpuha50";
|
|
11975
|
+
var No = [
|
|
11973
11976
|
"pointerdown",
|
|
11974
11977
|
"mousedown",
|
|
11975
11978
|
"pointerup",
|
|
@@ -11989,9 +11992,9 @@ var Ro = [
|
|
|
11989
11992
|
const u = V5(d.clientX, d.clientY);
|
|
11990
11993
|
u !== null && (d.stopPropagation(), u.dispatchEvent(W5(d)));
|
|
11991
11994
|
};
|
|
11992
|
-
for (const d of
|
|
11995
|
+
for (const d of No) s.addEventListener(d, c);
|
|
11993
11996
|
return () => {
|
|
11994
|
-
for (const d of
|
|
11997
|
+
for (const d of No) s.removeEventListener(d, c);
|
|
11995
11998
|
};
|
|
11996
11999
|
}, [i]), i ? /* @__PURE__ */ a("div", {
|
|
11997
12000
|
ref: l,
|
|
@@ -11999,7 +12002,7 @@ var Ro = [
|
|
|
11999
12002
|
"data-menu-shield": "",
|
|
12000
12003
|
"data-testid": "menu-shield"
|
|
12001
12004
|
}) : null;
|
|
12002
|
-
}, V5 = (e, t) =>
|
|
12005
|
+
}, V5 = (e, t) => va(e, t).find((n) => !dc(n)) ?? null, W5 = (e) => new MouseEvent(e.type, {
|
|
12003
12006
|
bubbles: !0,
|
|
12004
12007
|
cancelable: !0,
|
|
12005
12008
|
clientX: e.clientX,
|
|
@@ -12011,7 +12014,7 @@ var Ro = [
|
|
|
12011
12014
|
B(() => {
|
|
12012
12015
|
if (t === null) return;
|
|
12013
12016
|
const o = (i) => {
|
|
12014
|
-
if (i.key !== "Tab" || i.defaultPrevented || !
|
|
12017
|
+
if (i.key !== "Tab" || i.defaultPrevented || !ht(i.target, e, n) || ln(i.target) || r.getState().standingInteraction?.kind === "chrome-popup") return;
|
|
12015
12018
|
const l = [...t.querySelectorAll(K5)];
|
|
12016
12019
|
if (l.length === 0) return;
|
|
12017
12020
|
i.preventDefault();
|
|
@@ -12030,15 +12033,15 @@ var Ro = [
|
|
|
12030
12033
|
B(() => {
|
|
12031
12034
|
let o = null;
|
|
12032
12035
|
const i = (c) => {
|
|
12033
|
-
if (
|
|
12036
|
+
if (ft(c.target)) return;
|
|
12034
12037
|
const { caret: d } = r.getState(), u = d === null ? null : H5(c.clientX, c.clientY, e);
|
|
12035
12038
|
u?.kind === "annotation" && u.target.id === d?.annotationId || e.focus({ preventScroll: !0 });
|
|
12036
12039
|
}, l = (c) => {
|
|
12037
12040
|
const { selection: d, clearSelection: u } = t.getState();
|
|
12038
|
-
d.length !== 0 && (
|
|
12041
|
+
d.length !== 0 && (ht(c.target, e, n) || u());
|
|
12039
12042
|
}, s = (c) => {
|
|
12040
|
-
t.getState().selection.length !== 0 &&
|
|
12041
|
-
o = null, document.hasFocus() && (
|
|
12043
|
+
t.getState().selection.length !== 0 && ht(c.target, e, n) && c.relatedTarget === null && (o !== null && cancelAnimationFrame(o), o = requestAnimationFrame(() => {
|
|
12044
|
+
o = null, document.hasFocus() && (ht(document.activeElement, e, n) || t.getState().clearSelection());
|
|
12042
12045
|
}));
|
|
12043
12046
|
};
|
|
12044
12047
|
return e.addEventListener("pointerdown", i), document.addEventListener("focusin", l), document.addEventListener("focusout", s), () => {
|
|
@@ -12056,7 +12059,7 @@ var Ro = [
|
|
|
12056
12059
|
const n = t.legends[e.part.legendIndex], r = n?.items[e.part.itemIndex];
|
|
12057
12060
|
if (n === void 0 || r === void 0) return null;
|
|
12058
12061
|
const o = Y5(n, r.layerId, t.layers);
|
|
12059
|
-
return o === null ? null :
|
|
12062
|
+
return o === null ? null : Hi({
|
|
12060
12063
|
layer: o.layer,
|
|
12061
12064
|
scope: "group",
|
|
12062
12065
|
variable: o.variable,
|
|
@@ -12098,7 +12101,7 @@ var Ro = [
|
|
|
12098
12101
|
if (!o.interactive) continue;
|
|
12099
12102
|
const i = ju(o.mapping);
|
|
12100
12103
|
if (i === null) continue;
|
|
12101
|
-
const l =
|
|
12104
|
+
const l = Hi({
|
|
12102
12105
|
layer: o,
|
|
12103
12106
|
scope: "xValue",
|
|
12104
12107
|
variable: i,
|
|
@@ -12116,7 +12119,7 @@ var Ro = [
|
|
|
12116
12119
|
if (o === null) return null;
|
|
12117
12120
|
const l = q(t, o.layerId);
|
|
12118
12121
|
if (l === void 0) return null;
|
|
12119
|
-
const s =
|
|
12122
|
+
const s = yt(o), c = i?.intersects !== !1, d = Eu(l), u = c || !ku(n) ? [d] : ["xValue", d];
|
|
12120
12123
|
for (const h of u) {
|
|
12121
12124
|
const p = $e({
|
|
12122
12125
|
layer: l,
|
|
@@ -12141,12 +12144,12 @@ var Ro = [
|
|
|
12141
12144
|
scope: "observation",
|
|
12142
12145
|
parsingLocale: n
|
|
12143
12146
|
});
|
|
12144
|
-
},
|
|
12147
|
+
}, Lr = (e, t) => {
|
|
12145
12148
|
const { target: n } = e, { frameElement: r, captureRect: o, resolvesObservations: i, scene: l } = t;
|
|
12146
12149
|
if (!(n instanceof Element && r.contains(n))) {
|
|
12147
|
-
const m =
|
|
12150
|
+
const m = Do(!1, !1, e, t);
|
|
12148
12151
|
return {
|
|
12149
|
-
targetAtPoint:
|
|
12152
|
+
targetAtPoint: Ca({
|
|
12150
12153
|
stamped: m.stamped,
|
|
12151
12154
|
observations: null
|
|
12152
12155
|
}),
|
|
@@ -12159,7 +12162,7 @@ var Ro = [
|
|
|
12159
12162
|
layers: l.layers,
|
|
12160
12163
|
scales: l.scales,
|
|
12161
12164
|
parsingLocale: l.config.parsingLocale
|
|
12162
|
-
}), h = u !== null && t.hasOverlayMenu(u.target) ? u : null, p =
|
|
12165
|
+
}), h = u !== null && t.hasOverlayMenu(u.target) ? u : null, p = Do(s, h !== null, e, t), g = Ca({
|
|
12163
12166
|
stamped: p.stamped,
|
|
12164
12167
|
observations: h
|
|
12165
12168
|
});
|
|
@@ -12171,12 +12174,12 @@ var Ro = [
|
|
|
12171
12174
|
}, ny = (e) => {
|
|
12172
12175
|
const t = e.getBoundingClientRect();
|
|
12173
12176
|
return t.width > 0 && t.height > 0 ? t : null;
|
|
12174
|
-
},
|
|
12177
|
+
}, Do = (e, t, n, { showAnnotations: r, selectGuidesOnPress: o, frameElement: i, scene: l, hasOverlayMenu: s }) => {
|
|
12175
12178
|
if (!r && l.coordSystem.type === "cartesian" && e && t) return {
|
|
12176
12179
|
stamped: null,
|
|
12177
12180
|
elements: []
|
|
12178
12181
|
};
|
|
12179
|
-
const c = e || r ?
|
|
12182
|
+
const c = e || r ? va(n.clientX, n.clientY) : n.target instanceof Element ? [n.target] : [], d = Cn(c, i);
|
|
12180
12183
|
return d === null ? {
|
|
12181
12184
|
stamped: null,
|
|
12182
12185
|
elements: c
|
|
@@ -12225,7 +12228,7 @@ var Ro = [
|
|
|
12225
12228
|
x: e.x - t.left,
|
|
12226
12229
|
y: e.y - t.top
|
|
12227
12230
|
}, { primary: s, intersection: c } = n.query(Nt(l, t), {
|
|
12228
|
-
tolerance:
|
|
12231
|
+
tolerance: ni,
|
|
12229
12232
|
viewport: {
|
|
12230
12233
|
width: t.width,
|
|
12231
12234
|
height: t.height
|
|
@@ -12234,7 +12237,7 @@ var Ro = [
|
|
|
12234
12237
|
if (s === null || c?.intersects !== !0) return null;
|
|
12235
12238
|
const d = r.find((p) => p.id === s.layerId);
|
|
12236
12239
|
if (d === void 0 || _t(d, s.observation) || !iy(d.spatialKind)) return null;
|
|
12237
|
-
const u =
|
|
12240
|
+
const u = yt(s), h = $e({
|
|
12238
12241
|
layer: d,
|
|
12239
12242
|
observationIndex: u,
|
|
12240
12243
|
scope: "observation",
|
|
@@ -12260,22 +12263,22 @@ var Ro = [
|
|
|
12260
12263
|
default:
|
|
12261
12264
|
return e;
|
|
12262
12265
|
}
|
|
12263
|
-
},
|
|
12266
|
+
}, _o = "data-annotation-id", ly = '[data-testid="pinnedNumber"], [data-testid="comment"], [data-testid="stickers"]', Fo = (e, t, n) => {
|
|
12264
12267
|
if (e.target instanceof Element) {
|
|
12265
|
-
const r =
|
|
12268
|
+
const r = zo(e.target, t);
|
|
12266
12269
|
if (r !== null) return r;
|
|
12267
12270
|
}
|
|
12268
12271
|
for (const r of n) {
|
|
12269
12272
|
if (r === e.target) continue;
|
|
12270
|
-
const o =
|
|
12273
|
+
const o = zo(r, t);
|
|
12271
12274
|
if (o !== null) return o;
|
|
12272
12275
|
}
|
|
12273
12276
|
return null;
|
|
12274
12277
|
}, sy = (e, t) => {
|
|
12275
12278
|
const n = e.annotations.pinnedNumbers.find((i) => i.id === t) ?? e.annotations.comments.find((i) => i.id === t);
|
|
12276
|
-
if (n !== void 0) return
|
|
12279
|
+
if (n !== void 0) return Bo(e, n.at.anchor.layerId, n.at.observationIndex);
|
|
12277
12280
|
const r = e.annotations.stickers.find((i) => i.id === t), o = e.spec.annotations.stickers.find((i) => i.id === t);
|
|
12278
|
-
return r?.at.observationIndex === void 0 || o?.at.anchorType !== "observation" ? null :
|
|
12281
|
+
return r?.at.observationIndex === void 0 || o?.at.anchorType !== "observation" ? null : Bo(e, dy(r.at) ?? o.at.layerId, r.at.observationIndex);
|
|
12279
12282
|
}, cy = (e, t) => {
|
|
12280
12283
|
const n = e.spec.annotations.stickers.find((r) => r.id === t);
|
|
12281
12284
|
return n?.at.anchorType !== "panel" ? null : {
|
|
@@ -12283,20 +12286,20 @@ var Ro = [
|
|
|
12283
12286
|
y: n.at.y,
|
|
12284
12287
|
stickerId: n.id
|
|
12285
12288
|
};
|
|
12286
|
-
},
|
|
12289
|
+
}, zo = (e, t) => {
|
|
12287
12290
|
if (!t.contains(e)) return null;
|
|
12288
12291
|
const n = e.closest(ly);
|
|
12289
12292
|
if (n === null || !t.contains(n)) return null;
|
|
12290
|
-
const r = e.closest(`[${
|
|
12293
|
+
const r = e.closest(`[${_o}]`);
|
|
12291
12294
|
if (r === null || !n.contains(r)) return null;
|
|
12292
|
-
const o = r.getAttribute(
|
|
12295
|
+
const o = r.getAttribute(_o);
|
|
12293
12296
|
return o === null || o.length === 0 ? null : o;
|
|
12294
12297
|
}, dy = (e) => {
|
|
12295
12298
|
if (!("anchor" in e)) return;
|
|
12296
12299
|
const t = e.anchor;
|
|
12297
12300
|
if (!(typeof t != "object" || t === null || !("layerId" in t)))
|
|
12298
12301
|
return typeof t.layerId == "string" ? t.layerId : void 0;
|
|
12299
|
-
},
|
|
12302
|
+
}, Bo = (e, t, n) => {
|
|
12300
12303
|
const r = t === void 0 ? void 0 : e.layers.find((o) => o.id === t);
|
|
12301
12304
|
return r === void 0 ? null : $e({
|
|
12302
12305
|
layer: r,
|
|
@@ -12315,12 +12318,12 @@ var Ro = [
|
|
|
12315
12318
|
cross: 0
|
|
12316
12319
|
}
|
|
12317
12320
|
}, hy = ({ client: e, capture: t, frame: n, engine: r, layers: o }) => {
|
|
12318
|
-
if (t === null || t.width === 0 || t.height === 0 || n === null || !
|
|
12321
|
+
if (t === null || t.width === 0 || t.height === 0 || n === null || !Go(n, e)) return null;
|
|
12319
12322
|
const i = {
|
|
12320
12323
|
x: e.x - t.left,
|
|
12321
12324
|
y: e.y - t.top
|
|
12322
12325
|
};
|
|
12323
|
-
if (
|
|
12326
|
+
if (Go(t, e)) {
|
|
12324
12327
|
const { primary: s, intersection: c } = r.query(Nt(i, t), {
|
|
12325
12328
|
tolerance: uy,
|
|
12326
12329
|
viewport: {
|
|
@@ -12337,10 +12340,10 @@ var Ro = [
|
|
|
12337
12340
|
height: t.height
|
|
12338
12341
|
}, n);
|
|
12339
12342
|
return {
|
|
12340
|
-
x:
|
|
12341
|
-
y:
|
|
12343
|
+
x: Ho(i.x / t.width, l.minX, l.maxX),
|
|
12344
|
+
y: Ho(i.y / t.height, l.minY, l.maxY)
|
|
12342
12345
|
};
|
|
12343
|
-
},
|
|
12346
|
+
}, Ho = (e, t, n) => Math.min(Math.max(e, t), n), Go = (e, t) => t.x >= e.left && t.x <= e.right && t.y >= e.top && t.y <= e.bottom, py = (e, { canSelectGraph: t, withinFrame: n, caretAnnotationId: r }) => {
|
|
12344
12347
|
switch (e?.kind) {
|
|
12345
12348
|
case "annotation":
|
|
12346
12349
|
return e.target.id === r ? { kind: "keep-caret" } : {
|
|
@@ -12377,16 +12380,16 @@ var Ro = [
|
|
|
12377
12380
|
frameElement: e
|
|
12378
12381
|
}), y = ue(r), k = X(null);
|
|
12379
12382
|
B(() => () => k.current?.finish(!1), []), B(() => l.subscribe(({ selection: C }) => {
|
|
12380
|
-
const w = c.getState().pressedObservation, [P, ...T] = C, I = P !== void 0 && T.length === 0 && w !== null &&
|
|
12383
|
+
const w = c.getState().pressedObservation, [P, ...T] = C, I = P !== void 0 && T.length === 0 && w !== null && $r(P, w.selectedFor);
|
|
12381
12384
|
w !== null && !I && c.getState().setPressedObservation(null);
|
|
12382
12385
|
}), [c, l]), B(() => {
|
|
12383
|
-
const C = (x) =>
|
|
12386
|
+
const C = (x) => Lr({
|
|
12384
12387
|
target: x.target,
|
|
12385
12388
|
clientX: x.clientX,
|
|
12386
12389
|
clientY: x.clientY
|
|
12387
12390
|
}, n()).targetAtPoint, w = (x) => {
|
|
12388
12391
|
if (!(x.target instanceof Element)) return !1;
|
|
12389
|
-
const O = x.target.closest(
|
|
12392
|
+
const O = x.target.closest(hi);
|
|
12390
12393
|
return O !== null && e.contains(O) && Cn([x.target], e) === null;
|
|
12391
12394
|
}, P = (x, O) => {
|
|
12392
12395
|
if (k.current !== null || !md(f.current.annotations, O.id)) return;
|
|
@@ -12417,7 +12420,7 @@ var Ro = [
|
|
|
12417
12420
|
if (c.getState().setPressedObservation(z), g.current && (O.kind === "select-observations" || O.kind === "select-band")) {
|
|
12418
12421
|
const U = q(S, O.target.layerId);
|
|
12419
12422
|
if (U !== void 0 && m0(U.geom, E.type)) {
|
|
12420
|
-
const j = e.getBoundingClientRect(), se =
|
|
12423
|
+
const j = e.getBoundingClientRect(), se = ia(e, j.width);
|
|
12421
12424
|
c.getState().setAnnotatePress({
|
|
12422
12425
|
key: Rt(O.target),
|
|
12423
12426
|
x: (x.clientX - j.left) / se,
|
|
@@ -12449,7 +12452,7 @@ var Ro = [
|
|
|
12449
12452
|
}
|
|
12450
12453
|
if (dr(x.target)) return;
|
|
12451
12454
|
const O = c.getState().caret?.annotationId ?? null, A = x.target instanceof Element ? x.target.closest("[data-edit-id]")?.getAttribute("data-edit-id") ?? null : null;
|
|
12452
|
-
!
|
|
12455
|
+
!ft(x.target) && A !== O && da(c, s.getState().scene.annotations, o.dispatch, ca(i));
|
|
12453
12456
|
const S = c.getState().standingInteraction, b = (G) => {
|
|
12454
12457
|
c.getState().releaseInteraction(G), c.getState().setPlotMenu(null), l.getState().clearSelection();
|
|
12455
12458
|
}, E = Ge(f.current.panelRect, f.current.frameElement), z = (G) => {
|
|
@@ -12477,7 +12480,7 @@ var Ro = [
|
|
|
12477
12480
|
o.dispatch(new we({
|
|
12478
12481
|
kind: "arrow",
|
|
12479
12482
|
annotation: {
|
|
12480
|
-
...
|
|
12483
|
+
...bi,
|
|
12481
12484
|
...hd(S.heads),
|
|
12482
12485
|
start: {
|
|
12483
12486
|
anchorType: "panel",
|
|
@@ -12503,20 +12506,20 @@ var Ro = [
|
|
|
12503
12506
|
o.dispatch(new we({
|
|
12504
12507
|
kind: "shape",
|
|
12505
12508
|
annotation: {
|
|
12506
|
-
...
|
|
12509
|
+
...wi,
|
|
12507
12510
|
region: dd(S.start, re)
|
|
12508
12511
|
}
|
|
12509
12512
|
})), c.getState().releaseInteraction("box-draw"), c.getState().setPlotMenu(null);
|
|
12510
12513
|
return;
|
|
12511
12514
|
}
|
|
12512
12515
|
if (c.getState().setPlotMenu(null), w(x) || Jn(x.target, e)) return;
|
|
12513
|
-
const U = n(), j =
|
|
12516
|
+
const U = n(), j = Lr({
|
|
12514
12517
|
target: x.target,
|
|
12515
12518
|
clientX: x.clientX,
|
|
12516
12519
|
clientY: x.clientY
|
|
12517
12520
|
}, U);
|
|
12518
12521
|
if (m.current) {
|
|
12519
|
-
const G =
|
|
12522
|
+
const G = Fo(x, e, j.elements), ne = G === null ? null : sy(s.getState().scene, G);
|
|
12520
12523
|
if (ne?.observationIndex !== void 0) {
|
|
12521
12524
|
c.getState().setCaret(null), T(x, {
|
|
12522
12525
|
kind: "select-observations",
|
|
@@ -12532,7 +12535,7 @@ var Ro = [
|
|
|
12532
12535
|
}
|
|
12533
12536
|
}
|
|
12534
12537
|
const se = x.target instanceof Node && e.contains(x.target), ge = py(j.targetAtPoint, {
|
|
12535
|
-
canSelectGraph: p.current && !
|
|
12538
|
+
canSelectGraph: p.current && !ft(x.target) && n().hasOverlayMenu({ kind: "graph" }),
|
|
12536
12539
|
withinFrame: se,
|
|
12537
12540
|
caretAnnotationId: c.getState().caret?.annotationId ?? null
|
|
12538
12541
|
});
|
|
@@ -12563,7 +12566,7 @@ var Ro = [
|
|
|
12563
12566
|
}
|
|
12564
12567
|
}
|
|
12565
12568
|
const Ie = U.scene.coordSystem.type === "polar" && ge.kind === "select-observations";
|
|
12566
|
-
if (se && (ge.kind === "clear" || Ie) && m.current &&
|
|
12569
|
+
if (se && (ge.kind === "clear" || Ie) && m.current && Fo(x, e, j.elements) === null && !fy(x.target, j.elements)) {
|
|
12567
12570
|
const G = hy({
|
|
12568
12571
|
client: {
|
|
12569
12572
|
x: x.clientX,
|
|
@@ -12635,8 +12638,8 @@ var Ro = [
|
|
|
12635
12638
|
m,
|
|
12636
12639
|
n
|
|
12637
12640
|
]);
|
|
12638
|
-
}, fy = (e, t) =>
|
|
12639
|
-
const { store: t } = W(), { engine: n, overlayRef: r } = nt(), { showAnnotations: o, selectObservationsOnPress: i, selectGuidesOnPress: l, hoverTolerance: s } = Re[ye()], c = od(), d =
|
|
12641
|
+
}, fy = (e, t) => ft(e) || $o(e) || t.some($o), $o = (e) => e instanceof Element && e.closest(my) !== null, by = (e) => {
|
|
12642
|
+
const { store: t } = W(), { engine: n, overlayRef: r } = nt(), { showAnnotations: o, selectObservationsOnPress: i, selectGuidesOnPress: l, hoverTolerance: s } = Re[ye()], c = od(), d = St(), u = i && !c;
|
|
12640
12643
|
return ce(() => ({
|
|
12641
12644
|
frameElement: e,
|
|
12642
12645
|
captureRect: r.current,
|
|
@@ -12713,7 +12716,7 @@ var Ro = [
|
|
|
12713
12716
|
C.setEditTargetUnderPointer(null);
|
|
12714
12717
|
return;
|
|
12715
12718
|
}
|
|
12716
|
-
const { targetAtPoint: w, hover: P } =
|
|
12719
|
+
const { targetAtPoint: w, hover: P } = Lr(s, t());
|
|
12717
12720
|
C.setEditTargetUnderPointer(w), d(P);
|
|
12718
12721
|
}, h = () => {
|
|
12719
12722
|
l === null && (l = requestAnimationFrame(u));
|
|
@@ -12777,7 +12780,7 @@ var Ro = [
|
|
|
12777
12780
|
});
|
|
12778
12781
|
B(() => {
|
|
12779
12782
|
h.current = () => {
|
|
12780
|
-
|
|
12783
|
+
da(u, c.getState().scene.annotations, s.dispatch, ca(d));
|
|
12781
12784
|
};
|
|
12782
12785
|
}, [
|
|
12783
12786
|
s,
|
|
@@ -12912,7 +12915,7 @@ var Ro = [
|
|
|
12912
12915
|
})
|
|
12913
12916
|
] });
|
|
12914
12917
|
}, My = {}, qS = ({ slots: e, mode: t, palettePresets: n = My, editMenus: r, ...o }) => {
|
|
12915
|
-
const i =
|
|
12918
|
+
const i = pi(Sn()), l = _(() => ({
|
|
12916
12919
|
EditorSurface: Ay,
|
|
12917
12920
|
...e
|
|
12918
12921
|
}), [e]);
|
|
@@ -12957,7 +12960,7 @@ var By = () => () => {
|
|
|
12957
12960
|
const t = eh(e?.subscribe ?? By, () => e?.getScene()?.config.parsingLocale);
|
|
12958
12961
|
return e?.formattingLocale ?? t;
|
|
12959
12962
|
}, Gy = (e) => {
|
|
12960
|
-
const t = Ce(jc), n =
|
|
12963
|
+
const t = Ce(jc), n = pi(Hy(Et(e.handle))), r = $c();
|
|
12961
12964
|
let o = /* @__PURE__ */ a($y, { ...e });
|
|
12962
12965
|
return !r && t && (o = /* @__PURE__ */ a(bd, {
|
|
12963
12966
|
colorScheme: t.colorScheme,
|
|
@@ -13000,7 +13003,7 @@ var By = () => () => {
|
|
|
13000
13003
|
strokeLinejoin: "round",
|
|
13001
13004
|
children: /* @__PURE__ */ a("path", { d: "m9 6 6 6-6 6" })
|
|
13002
13005
|
})
|
|
13003
|
-
}),
|
|
13006
|
+
}), fa = "_40zvwv0", ba = "_40zvwv1", Uy = "_40zvwv2", gc = "_40zvwv3", Ky = "_40zvwv4 _40zvwv3";
|
|
13004
13007
|
var jy = "_40zvwv6";
|
|
13005
13008
|
var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessory: r, onOpenChange: o, children: i }) => t === "collapsible" ? /* @__PURE__ */ a(Yy, {
|
|
13006
13009
|
title: e,
|
|
@@ -13013,9 +13016,9 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13013
13016
|
accessory: r,
|
|
13014
13017
|
children: i
|
|
13015
13018
|
}) : /* @__PURE__ */ v("div", {
|
|
13016
|
-
className:
|
|
13019
|
+
className: fa,
|
|
13017
13020
|
children: [/* @__PURE__ */ v("div", {
|
|
13018
|
-
className:
|
|
13021
|
+
className: ba,
|
|
13019
13022
|
children: [
|
|
13020
13023
|
/* @__PURE__ */ a("span", {
|
|
13021
13024
|
className: gc,
|
|
@@ -13034,9 +13037,9 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13034
13037
|
}), qy = ({ title: e, accessory: t, children: n }) => {
|
|
13035
13038
|
const r = Be(), o = Be();
|
|
13036
13039
|
return /* @__PURE__ */ a("div", {
|
|
13037
|
-
className:
|
|
13040
|
+
className: fa,
|
|
13038
13041
|
children: /* @__PURE__ */ v("div", {
|
|
13039
|
-
className:
|
|
13042
|
+
className: ba,
|
|
13040
13043
|
children: [
|
|
13041
13044
|
/* @__PURE__ */ a("label", {
|
|
13042
13045
|
id: r,
|
|
@@ -13046,7 +13049,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13046
13049
|
}),
|
|
13047
13050
|
/* @__PURE__ */ a("span", {
|
|
13048
13051
|
className: jy,
|
|
13049
|
-
children: /* @__PURE__ */ a(
|
|
13052
|
+
children: /* @__PURE__ */ a(sl, {
|
|
13050
13053
|
labelId: r,
|
|
13051
13054
|
controlId: o,
|
|
13052
13055
|
children: n
|
|
@@ -13063,10 +13066,10 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13063
13066
|
const i = R();
|
|
13064
13067
|
return /* @__PURE__ */ v(At.Item, {
|
|
13065
13068
|
value: e,
|
|
13066
|
-
className:
|
|
13069
|
+
className: fa,
|
|
13067
13070
|
onOpenChange: r,
|
|
13068
13071
|
children: [/* @__PURE__ */ v(At.Header, {
|
|
13069
|
-
className:
|
|
13072
|
+
className: ba,
|
|
13070
13073
|
render: /* @__PURE__ */ a("div", {}),
|
|
13071
13074
|
children: [
|
|
13072
13075
|
/* @__PURE__ */ a(At.Trigger, {
|
|
@@ -13122,12 +13125,12 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13122
13125
|
}, e3 = {
|
|
13123
13126
|
x: "editor.axesPanel.mainAxisSection.xAxis",
|
|
13124
13127
|
y: "editor.axesPanel.mainAxisSection.yAxis"
|
|
13125
|
-
},
|
|
13128
|
+
}, Vo = ({ axis: e, title: t, layout: n = "collapsible", preview: r }) => {
|
|
13126
13129
|
const o = te(), i = Q(o), l = R(), { NumberField: s, Switch: c, TextField: d, ToggleGroup: u } = H();
|
|
13127
13130
|
if (!i) return null;
|
|
13128
13131
|
const h = 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;
|
|
13129
13132
|
if (h === "circular" || h === "radial" && f === void 0) return null;
|
|
13130
|
-
const y = m?.scaleType === "continuous" || m?.scaleType === "datetime", k = f !== void 0 &&
|
|
13133
|
+
const y = m?.scaleType === "continuous" || m?.scaleType === "datetime", k = f !== void 0 && Ki(i, e), C = f?.transform === "log", w = f?.domainMax ?? null, P = t3(f), T = (D, Me) => D.map(($t) => ({
|
|
13131
13134
|
value: $t,
|
|
13132
13135
|
label: Me($t)
|
|
13133
13136
|
})), I = i.guides.axes.find((D) => D.scaledAesthetic === e), N = I?.position, x = i.guides.axes.filter((D) => D.scaledAesthetic === e || e === "y" && D.scaledAesthetic === "ySecondary"), O = x.some((D) => D.visible), A = x.some((D) => D.visible || D.showGrid), S = p.label ?? I?.label ?? "", b = Jy[N === "bottom" || N === "top" || N === void 0 && e === "x" ? "horizontal" : "vertical"], E = e === "y" ? Nu(i.spec) : null, z = E === null ? void 0 : q(i.spec.layers, E), U = i.guides.legends.drawn.some((D) => b.some((Me) => Me === D.position)), j = b.map((D) => ({
|
|
@@ -13143,7 +13146,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13143
13146
|
visible: D
|
|
13144
13147
|
}));
|
|
13145
13148
|
}, re = (D) => {
|
|
13146
|
-
o.commands.dispatch(new
|
|
13149
|
+
o.commands.dispatch(new xi({
|
|
13147
13150
|
axis: e,
|
|
13148
13151
|
label: D
|
|
13149
13152
|
}), { transient: !0 });
|
|
@@ -13153,32 +13156,32 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13153
13156
|
visible: D
|
|
13154
13157
|
}));
|
|
13155
13158
|
}, zn = (D) => {
|
|
13156
|
-
o.commands.dispatch(new
|
|
13159
|
+
o.commands.dispatch(new Ti({
|
|
13157
13160
|
axis: e,
|
|
13158
13161
|
tickMode: D === "edges" ? "edges" : "auto"
|
|
13159
13162
|
}));
|
|
13160
13163
|
}, ot = (D) => {
|
|
13161
|
-
o.commands.dispatch(new
|
|
13164
|
+
o.commands.dispatch(new Di({
|
|
13162
13165
|
scaledAesthetic: e,
|
|
13163
13166
|
transform: D === "log" ? "log" : "linear"
|
|
13164
13167
|
}));
|
|
13165
|
-
},
|
|
13168
|
+
}, Ct = (D) => {
|
|
13166
13169
|
o.commands.dispatch(new Pt({
|
|
13167
13170
|
scaledAesthetic: e,
|
|
13168
13171
|
...D
|
|
13169
13172
|
}), { transient: !0 });
|
|
13170
13173
|
}, $ = (D) => {
|
|
13171
|
-
D !== null &&
|
|
13174
|
+
D !== null && Ct({ domainMin: D });
|
|
13172
13175
|
}, me = (D) => {
|
|
13173
|
-
D !== null &&
|
|
13176
|
+
D !== null && Ct({ domainMax: D });
|
|
13174
13177
|
}, Ue = (D) => {
|
|
13175
|
-
const Me = D === "auto" ? null : D === "zero" ? 0 :
|
|
13178
|
+
const Me = D === "auto" ? null : D === "zero" ? 0 : Wo(g?.domain, "start");
|
|
13176
13179
|
o.commands.dispatch(new Pt({
|
|
13177
13180
|
scaledAesthetic: e,
|
|
13178
13181
|
domainMin: Me
|
|
13179
13182
|
}));
|
|
13180
13183
|
}, Sc = (D) => {
|
|
13181
|
-
const Me = D === "custom" ?
|
|
13184
|
+
const Me = D === "custom" ? Wo(g?.domain, "end") : null;
|
|
13182
13185
|
o.commands.dispatch(new Pt({
|
|
13183
13186
|
scaledAesthetic: e,
|
|
13184
13187
|
domainMax: Me
|
|
@@ -13190,7 +13193,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13190
13193
|
}));
|
|
13191
13194
|
}, wc = (D) => {
|
|
13192
13195
|
const Me = b.find(($t) => $t === D);
|
|
13193
|
-
Me && o.commands.dispatch(new
|
|
13196
|
+
Me && o.commands.dispatch(new ki({
|
|
13194
13197
|
axis: e,
|
|
13195
13198
|
position: Me
|
|
13196
13199
|
}));
|
|
@@ -13292,10 +13295,10 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13292
13295
|
}, t3 = (e) => {
|
|
13293
13296
|
const t = e?.domainMin ?? null;
|
|
13294
13297
|
return t === null ? "auto" : t === 0 ? "zero" : "custom";
|
|
13295
|
-
},
|
|
13298
|
+
}, Wo = (e, t) => {
|
|
13296
13299
|
const n = t === "start" ? e?.[0] : e?.[e.length - 1];
|
|
13297
13300
|
return typeof n == "number" ? n : 0;
|
|
13298
|
-
},
|
|
13301
|
+
}, ya = ({ value: e, onChange: t }) => {
|
|
13299
13302
|
const n = te(), r = R(), { TextField: o } = H(), i = e !== null && typeof e != "string", l = (s) => t(s === "" ? null : s);
|
|
13300
13303
|
return /* @__PURE__ */ a(L, {
|
|
13301
13304
|
label: r("editor.elementsPanel.contentValue"),
|
|
@@ -13315,7 +13318,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13315
13318
|
visible: u
|
|
13316
13319
|
}));
|
|
13317
13320
|
}, d = (u) => {
|
|
13318
|
-
r.commands.dispatch(new
|
|
13321
|
+
r.commands.dispatch(new Pi({ caption: u }), { transient: !0 });
|
|
13319
13322
|
};
|
|
13320
13323
|
return /* @__PURE__ */ a(oe, {
|
|
13321
13324
|
title: e ?? i("editor.elementsPanel.footerSection.caption"),
|
|
@@ -13327,12 +13330,12 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13327
13330
|
checked: s.showCaption,
|
|
13328
13331
|
onChange: c
|
|
13329
13332
|
})
|
|
13330
|
-
}), /* @__PURE__ */ a(
|
|
13333
|
+
}), /* @__PURE__ */ a(ya, {
|
|
13331
13334
|
value: s.caption,
|
|
13332
13335
|
onChange: d
|
|
13333
13336
|
})] })
|
|
13334
13337
|
});
|
|
13335
|
-
},
|
|
13338
|
+
}, Uo = /^[a-z][a-z\d+.-]*:/i, r3 = {}, a3 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
13336
13339
|
const r = te(), o = Q(r), i = R(), { Switch: l } = H();
|
|
13337
13340
|
if (!o) return null;
|
|
13338
13341
|
const s = o.config.content, c = (d) => {
|
|
@@ -13359,7 +13362,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13359
13362
|
t.commands.dispatch(new Rd({ source: d ? c : null }), { transient: !0 });
|
|
13360
13363
|
}, i = () => {
|
|
13361
13364
|
const c = e.url ?? "";
|
|
13362
|
-
c !== "" && !
|
|
13365
|
+
c !== "" && !Uo.test(c) && o({
|
|
13363
13366
|
...e,
|
|
13364
13367
|
url: `https://${c}`
|
|
13365
13368
|
}), t.commands.commit();
|
|
@@ -13376,7 +13379,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13376
13379
|
value: e.url ?? "",
|
|
13377
13380
|
onChange: l,
|
|
13378
13381
|
onCommit: i,
|
|
13379
|
-
hasError:
|
|
13382
|
+
hasError: Uo.test(e.url ?? "") && !Iu(e.url)
|
|
13380
13383
|
})
|
|
13381
13384
|
}), /* @__PURE__ */ a(L, {
|
|
13382
13385
|
label: n("editor.elementsPanel.sourceSection.name"),
|
|
@@ -13395,7 +13398,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13395
13398
|
visible: u
|
|
13396
13399
|
}));
|
|
13397
13400
|
}, d = (u) => {
|
|
13398
|
-
r.commands.dispatch(new
|
|
13401
|
+
r.commands.dispatch(new Li({ subtitle: u }), { transient: !0 });
|
|
13399
13402
|
};
|
|
13400
13403
|
return /* @__PURE__ */ a(oe, {
|
|
13401
13404
|
title: e ?? i("editor.elementsPanel.headerSection.subtitle"),
|
|
@@ -13407,7 +13410,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13407
13410
|
checked: s.showSubtitle,
|
|
13408
13411
|
onChange: c
|
|
13409
13412
|
})
|
|
13410
|
-
}), /* @__PURE__ */ a(
|
|
13413
|
+
}), /* @__PURE__ */ a(ya, {
|
|
13411
13414
|
value: s.subtitle,
|
|
13412
13415
|
onChange: d
|
|
13413
13416
|
})] })
|
|
@@ -13415,7 +13418,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13415
13418
|
}, Gt = (e) => {
|
|
13416
13419
|
const { colorScheme: t } = bn(), n = _(() => du({ colorScheme: t }), [t]);
|
|
13417
13420
|
return _(() => e === null ? null : n.readers(e), [e, n]);
|
|
13418
|
-
},
|
|
13421
|
+
}, Sa = (e, t, n) => {
|
|
13419
13422
|
const r = Gt(e);
|
|
13420
13423
|
return _(() => {
|
|
13421
13424
|
if (r === null || e === null || t === null) return null;
|
|
@@ -13427,7 +13430,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13427
13430
|
t,
|
|
13428
13431
|
n
|
|
13429
13432
|
]);
|
|
13430
|
-
},
|
|
13433
|
+
}, Ir = [
|
|
13431
13434
|
0.8,
|
|
13432
13435
|
1,
|
|
13433
13436
|
1.2,
|
|
@@ -13438,14 +13441,14 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13438
13441
|
2.5,
|
|
13439
13442
|
3,
|
|
13440
13443
|
4
|
|
13441
|
-
], l3 =
|
|
13444
|
+
], l3 = Ir.length / 2, s3 = { select: { target: "graph" } }, c3 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
13442
13445
|
const r = te(), o = Q(r), i = R(), { RadioGrid: l } = H(), s = Gt(o);
|
|
13443
13446
|
if (!o || !s) return null;
|
|
13444
|
-
const c = s.graph().get("textScale"), d = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), u =
|
|
13447
|
+
const c = s.graph().get("textScale"), d = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), u = Ir.map((p) => ({
|
|
13445
13448
|
value: `${p}`,
|
|
13446
13449
|
label: d(p)
|
|
13447
13450
|
})), h = (p) => {
|
|
13448
|
-
const g =
|
|
13451
|
+
const g = Ir.find((f) => `${f}` === p);
|
|
13449
13452
|
if (g === void 0) return;
|
|
13450
13453
|
const m = qe(o.spec.styles.overrides, s3, xe(o.spec))?.declarations ?? {};
|
|
13451
13454
|
r.commands.dispatch(new Xe({
|
|
@@ -13480,7 +13483,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13480
13483
|
visible: u
|
|
13481
13484
|
}));
|
|
13482
13485
|
}, d = (u) => {
|
|
13483
|
-
r.commands.dispatch(new
|
|
13486
|
+
r.commands.dispatch(new Ii({ title: u }), { transient: !0 });
|
|
13484
13487
|
};
|
|
13485
13488
|
return /* @__PURE__ */ a(oe, {
|
|
13486
13489
|
title: e ?? i("editor.elementsPanel.headerSection.toggleTitle"),
|
|
@@ -13492,7 +13495,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13492
13495
|
checked: s.showTitle,
|
|
13493
13496
|
onChange: c
|
|
13494
13497
|
})
|
|
13495
|
-
}), /* @__PURE__ */ a(
|
|
13498
|
+
}), /* @__PURE__ */ a(ya, {
|
|
13496
13499
|
value: s.title,
|
|
13497
13500
|
onChange: d
|
|
13498
13501
|
})] })
|
|
@@ -13508,11 +13511,11 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13508
13511
|
] })
|
|
13509
13512
|
}), JS = ({ children: e, ...t }) => /* @__PURE__ */ a(pc.Root, {
|
|
13510
13513
|
...t,
|
|
13511
|
-
children: e ?? /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(
|
|
13512
|
-
}), Dn = (e) => `${e}px`, mc = (e) => `${Math.round(e * 100)}%`, u3 = (e) => `${e}°`, h3 = 24, p3 = { select: { target: "graph" } },
|
|
13514
|
+
children: e ?? /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(Vo, { axis: "x" }), /* @__PURE__ */ a(Vo, { axis: "y" })] })
|
|
13515
|
+
}), Dn = (e) => `${e}px`, mc = (e) => `${Math.round(e * 100)}%`, u3 = (e) => `${e}°`, h3 = 24, p3 = { select: { target: "graph" } }, Ko = ["dim", "desaturate"], QS = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
13513
13516
|
const r = te(), o = Q(r), i = R(), { Slider: l, ToggleGroup: s } = H(), c = Gt(o);
|
|
13514
13517
|
if (!o || !c) return null;
|
|
13515
|
-
const d = c.graph().get("cornerRadius"), u = zu(o.spec), h =
|
|
13518
|
+
const d = c.graph().get("cornerRadius"), u = zu(o.spec), h = Ko.map((m) => ({
|
|
13516
13519
|
value: m,
|
|
13517
13520
|
label: i(m === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.gray")
|
|
13518
13521
|
})), p = (m) => {
|
|
@@ -13528,7 +13531,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13528
13531
|
}
|
|
13529
13532
|
}), { transient: !0 });
|
|
13530
13533
|
}, g = (m) => {
|
|
13531
|
-
const f =
|
|
13534
|
+
const f = Ko.find((y) => y === m);
|
|
13532
13535
|
f && r.commands.dispatch(new zd({ dimStyle: f }));
|
|
13533
13536
|
};
|
|
13534
13537
|
return /* @__PURE__ */ a(oe, {
|
|
@@ -13571,7 +13574,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13571
13574
|
stroke: "currentColor",
|
|
13572
13575
|
strokeWidth: 1.5
|
|
13573
13576
|
})
|
|
13574
|
-
}), v3 = 0.05,
|
|
13577
|
+
}), v3 = 0.05, jo = [
|
|
13575
13578
|
"none",
|
|
13576
13579
|
"md",
|
|
13577
13580
|
"full"
|
|
@@ -13579,15 +13582,15 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13579
13582
|
base: ["baseStart", "baseEnd"],
|
|
13580
13583
|
tip: ["tipStart", "tipEnd"]
|
|
13581
13584
|
}, e6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
13582
|
-
const r = te(), o = Q(r), i = R(), { Slider: l, ToggleGroup: s } = H(), c = o ?
|
|
13585
|
+
const r = te(), o = Q(r), i = R(), { Slider: l, ToggleGroup: s } = H(), c = o ? Wi(o.spec.layers, "bar") : void 0, d = Sa(o, c?.id ?? null, "bar");
|
|
13583
13586
|
if (!o || !c || o.coordSystem.type === "polar" && o.coordSystem.bandAxis === null) return null;
|
|
13584
13587
|
const u = (f) => {
|
|
13585
|
-
r.commands.dispatch(new
|
|
13588
|
+
r.commands.dispatch(new Ai({
|
|
13586
13589
|
layerId: c.id,
|
|
13587
13590
|
width: f
|
|
13588
13591
|
}), { transient: !0 });
|
|
13589
13592
|
}, h = d?.get("cornerRadius") ?? xd, p = (f, y) => {
|
|
13590
|
-
const k =
|
|
13593
|
+
const k = jo.find((P) => P === y);
|
|
13591
13594
|
if (!k) return;
|
|
13592
13595
|
const [C, w] = vc[f];
|
|
13593
13596
|
r.commands.dispatch(new Od({
|
|
@@ -13598,11 +13601,11 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13598
13601
|
[w]: k
|
|
13599
13602
|
}
|
|
13600
13603
|
}));
|
|
13601
|
-
}, g =
|
|
13604
|
+
}, g = jo.map((f) => ({
|
|
13602
13605
|
value: f,
|
|
13603
13606
|
label: i(`editor.graphPanel.barSection.radiusOptions.${f}`),
|
|
13604
13607
|
icon: /* @__PURE__ */ a(m3, { cornerRadius: f })
|
|
13605
|
-
})), m =
|
|
13608
|
+
})), m = qi(c.params, o.coordSystem.type);
|
|
13606
13609
|
return /* @__PURE__ */ a(oe, {
|
|
13607
13610
|
title: e ?? i("editor.graphPanel.barSection.title"),
|
|
13608
13611
|
layout: t,
|
|
@@ -13623,7 +13626,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13623
13626
|
/* @__PURE__ */ a(L, {
|
|
13624
13627
|
label: i("editor.graphPanel.barSection.tipRadius"),
|
|
13625
13628
|
children: /* @__PURE__ */ a(s, {
|
|
13626
|
-
value:
|
|
13629
|
+
value: Xo(h, "tip"),
|
|
13627
13630
|
options: g,
|
|
13628
13631
|
onChange: (f) => p("tip", f)
|
|
13629
13632
|
})
|
|
@@ -13631,14 +13634,14 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13631
13634
|
/* @__PURE__ */ a(L, {
|
|
13632
13635
|
label: i("editor.graphPanel.barSection.baseRadius"),
|
|
13633
13636
|
children: /* @__PURE__ */ a(s, {
|
|
13634
|
-
value:
|
|
13637
|
+
value: Xo(h, "base"),
|
|
13635
13638
|
options: g,
|
|
13636
13639
|
onChange: (f) => p("base", f)
|
|
13637
13640
|
})
|
|
13638
13641
|
})
|
|
13639
13642
|
] })
|
|
13640
13643
|
});
|
|
13641
|
-
},
|
|
13644
|
+
}, Xo = (e, t) => {
|
|
13642
13645
|
const [n, r] = vc[t], o = e[n];
|
|
13643
13646
|
return typeof o != "string" || o !== e[r] ? "" : o === "none" || o === "full" ? o : "md";
|
|
13644
13647
|
}, _n = ({ children: e }) => {
|
|
@@ -13733,7 +13736,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13733
13736
|
r.commands.dispatch(new we({
|
|
13734
13737
|
kind: "text",
|
|
13735
13738
|
annotation: {
|
|
13736
|
-
...
|
|
13739
|
+
..._i,
|
|
13737
13740
|
content: L3(i("editor.annotatePanel.callOutSection.text")),
|
|
13738
13741
|
at: {
|
|
13739
13742
|
anchorType: "panel",
|
|
@@ -13746,7 +13749,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13746
13749
|
r.commands.dispatch(new we({
|
|
13747
13750
|
kind: "arrow",
|
|
13748
13751
|
annotation: {
|
|
13749
|
-
...
|
|
13752
|
+
...bi,
|
|
13750
13753
|
start: {
|
|
13751
13754
|
anchorType: "panel",
|
|
13752
13755
|
...T3
|
|
@@ -13761,7 +13764,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13761
13764
|
r.commands.dispatch(new we({
|
|
13762
13765
|
kind: "shape",
|
|
13763
13766
|
annotation: {
|
|
13764
|
-
...
|
|
13767
|
+
...wi,
|
|
13765
13768
|
...k3,
|
|
13766
13769
|
region: {
|
|
13767
13770
|
anchorType: "panel",
|
|
@@ -13774,7 +13777,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13774
13777
|
p !== null && r.commands.dispatch(new we({
|
|
13775
13778
|
kind: "differenceArrow",
|
|
13776
13779
|
annotation: {
|
|
13777
|
-
...
|
|
13780
|
+
...Si,
|
|
13778
13781
|
...p,
|
|
13779
13782
|
label: P3
|
|
13780
13783
|
}
|
|
@@ -13825,12 +13828,12 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13825
13828
|
if (!o) return null;
|
|
13826
13829
|
const s = Tn(o.spec);
|
|
13827
13830
|
if (s === null || !be(s)) return null;
|
|
13828
|
-
const c =
|
|
13831
|
+
const c = ka.map((u) => ({
|
|
13829
13832
|
value: u,
|
|
13830
13833
|
label: i(`editor.graphPanel.comboSection.types.${u}`)
|
|
13831
13834
|
})), d = (u) => {
|
|
13832
|
-
const h =
|
|
13833
|
-
h && r.commands.dispatch(new
|
|
13835
|
+
const h = ka.find((p) => p === u);
|
|
13836
|
+
h && r.commands.dispatch(new zr({
|
|
13834
13837
|
coordType: "cartesian",
|
|
13835
13838
|
comboType: h
|
|
13836
13839
|
}));
|
|
@@ -13908,31 +13911,31 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13908
13911
|
if (!i) return null;
|
|
13909
13912
|
const c = e === void 0 ? i.layers[0] : q(i.layers, e);
|
|
13910
13913
|
if (!c) return null;
|
|
13911
|
-
const { showDataLabels: d, format: u, showStackTotals: h, showCategoryLabels: p } = c.dataLabels, g =
|
|
13914
|
+
const { showDataLabels: d, format: u, showStackTotals: h, showCategoryLabels: p } = c.dataLabels, g = Al(c, i.coordSystem.type, {
|
|
13912
13915
|
hasCapability: o.canPlaceDataLabels,
|
|
13913
13916
|
hasPercentageFormat: o.canFormatDataLabelsAsPercentages
|
|
13914
13917
|
});
|
|
13915
13918
|
if (!g.supportsDataLabels) return null;
|
|
13916
13919
|
const m = (C) => {
|
|
13917
|
-
const w = new
|
|
13920
|
+
const w = new zi({
|
|
13918
13921
|
layerId: c.id,
|
|
13919
13922
|
showDataLabels: C
|
|
13920
13923
|
});
|
|
13921
13924
|
o.commands.dispatch(w);
|
|
13922
13925
|
}, f = (C) => {
|
|
13923
|
-
const w = new
|
|
13926
|
+
const w = new Mi({
|
|
13924
13927
|
layerId: c.id,
|
|
13925
13928
|
format: C ? "percentage" : "absolute"
|
|
13926
13929
|
});
|
|
13927
13930
|
o.commands.dispatch(w);
|
|
13928
13931
|
}, y = (C) => {
|
|
13929
|
-
const w = new
|
|
13932
|
+
const w = new Bi({
|
|
13930
13933
|
layerId: c.id,
|
|
13931
13934
|
showStackTotals: C
|
|
13932
13935
|
});
|
|
13933
13936
|
o.commands.dispatch(w);
|
|
13934
13937
|
}, k = (C) => {
|
|
13935
|
-
const w = new
|
|
13938
|
+
const w = new Fi({
|
|
13936
13939
|
layerId: c.id,
|
|
13937
13940
|
showCategoryLabels: C
|
|
13938
13941
|
});
|
|
@@ -13978,12 +13981,12 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13978
13981
|
value: h,
|
|
13979
13982
|
label: i(`editor.graphTypes.${h}`),
|
|
13980
13983
|
icon: /* @__PURE__ */ a(p, { size: "md" }),
|
|
13981
|
-
disabled: !
|
|
13984
|
+
disabled: !Il(g, o?.spec)
|
|
13982
13985
|
})), [i, o]);
|
|
13983
13986
|
if (!o) return null;
|
|
13984
13987
|
const c = Tn(o.spec), d = sn(c), u = (h) => {
|
|
13985
13988
|
const p = It.find((g) => g.name === h);
|
|
13986
|
-
p && r.commands.dispatch(new
|
|
13989
|
+
p && r.commands.dispatch(new zr(Ml(p.summary, c)));
|
|
13987
13990
|
};
|
|
13988
13991
|
return /* @__PURE__ */ a(oe, {
|
|
13989
13992
|
title: e ?? i("editor.graphPanel.graphTypeSection.title"),
|
|
@@ -13998,7 +14001,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
13998
14001
|
})
|
|
13999
14002
|
});
|
|
14000
14003
|
}, i6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
14001
|
-
const r = te(), o = Q(r), i = R(), { Slider: l, Switch: s, ToggleGroup: c } = H(), d = Gt(o), u = o !== null && d !== null ?
|
|
14004
|
+
const r = te(), o = Q(r), i = R(), { Slider: l, Switch: s, ToggleGroup: c } = H(), d = Gt(o), u = o !== null && d !== null ? $l(o, d) : null;
|
|
14002
14005
|
if (u === null) return null;
|
|
14003
14006
|
const h = u.axes.filter((k) => k.supportsGrid);
|
|
14004
14007
|
if (h.length === 0) return null;
|
|
@@ -14012,9 +14015,9 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
14012
14015
|
}));
|
|
14013
14016
|
}, f = (k) => {
|
|
14014
14017
|
const C = un.find((w) => w === k);
|
|
14015
|
-
C !== void 0 && r.commands.dispatch(
|
|
14018
|
+
C !== void 0 && r.commands.dispatch(Vl(C));
|
|
14016
14019
|
}, y = (k) => {
|
|
14017
|
-
r.commands.dispatch(
|
|
14020
|
+
r.commands.dispatch(Wl(k), { transient: !0 });
|
|
14018
14021
|
};
|
|
14019
14022
|
return /* @__PURE__ */ a(oe, {
|
|
14020
14023
|
title: e ?? i("editor.graphPanel.gridSection.title"),
|
|
@@ -14050,7 +14053,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
14050
14053
|
"total",
|
|
14051
14054
|
"average",
|
|
14052
14055
|
"current"
|
|
14053
|
-
], D3 = ["total"],
|
|
14056
|
+
], D3 = ["total"], qo = ["previous", "first"], Yo = [
|
|
14054
14057
|
"auto",
|
|
14055
14058
|
"small",
|
|
14056
14059
|
"medium",
|
|
@@ -14063,10 +14066,10 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
14063
14066
|
const m = h ? D3 : fc, f = o.guides.headline, y = f?.kind === "perGroup" && f.items.some((A) => A.comparison !== null), k = m.map((A) => ({
|
|
14064
14067
|
value: A,
|
|
14065
14068
|
label: i(`editor.graphPanel.headlineNumberSection.metrics.${A}`)
|
|
14066
|
-
})), C =
|
|
14069
|
+
})), C = qo.map((A) => ({
|
|
14067
14070
|
value: A,
|
|
14068
14071
|
label: i(`editor.graphPanel.headlineNumberSection.comparison.${A}`)
|
|
14069
|
-
})), w =
|
|
14072
|
+
})), w = Yo.map((A) => ({
|
|
14070
14073
|
value: A,
|
|
14071
14074
|
label: i(A === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${A}`)
|
|
14072
14075
|
})), P = [{
|
|
@@ -14076,15 +14079,15 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
|
|
|
14076
14079
|
value: "center",
|
|
14077
14080
|
label: i("editor.graphPanel.headlineNumberSection.position.center")
|
|
14078
14081
|
}], T = (A) => {
|
|
14079
|
-
r.commands.dispatch(new
|
|
14082
|
+
r.commands.dispatch(new Aa({ show: A ? N3 : "none" }));
|
|
14080
14083
|
}, I = (A) => {
|
|
14081
14084
|
const S = m.find((b) => b === A);
|
|
14082
|
-
S && r.commands.dispatch(new
|
|
14085
|
+
S && r.commands.dispatch(new Aa({ show: S }));
|
|
14083
14086
|
}, N = (A) => {
|
|
14084
|
-
const S =
|
|
14087
|
+
const S = qo.find((b) => b === A);
|
|
14085
14088
|
S && r.commands.dispatch(new Dd({ compareWith: S }));
|
|
14086
14089
|
}, x = (A) => {
|
|
14087
|
-
const S =
|
|
14090
|
+
const S = Yo.find((b) => b === A);
|
|
14088
14091
|
S && r.commands.dispatch(new Fd({ size: S }));
|
|
14089
14092
|
}, O = (A) => {
|
|
14090
14093
|
r.commands.dispatch(new _d({ position: A === "center" ? "center" : "above" }));
|
|
@@ -14146,7 +14149,7 @@ var Zn = [
|
|
|
14146
14149
|
"left",
|
|
14147
14150
|
"right",
|
|
14148
14151
|
"none"
|
|
14149
|
-
],
|
|
14152
|
+
], Zo = [
|
|
14150
14153
|
"auto",
|
|
14151
14154
|
"start",
|
|
14152
14155
|
"center",
|
|
@@ -14160,12 +14163,12 @@ var Zn = [
|
|
|
14160
14163
|
start: "top",
|
|
14161
14164
|
end: "bottom"
|
|
14162
14165
|
}
|
|
14163
|
-
},
|
|
14166
|
+
}, Jo = [
|
|
14164
14167
|
"auto",
|
|
14165
14168
|
"pill",
|
|
14166
14169
|
"direct"
|
|
14167
14170
|
], s6 = ({ positions: e, title: t, layout: n = "collapsible", preview: r }) => {
|
|
14168
|
-
const o = te(), i = Q(o), l = R(), { ToggleGroup: s } = H(), c =
|
|
14171
|
+
const o = te(), i = Q(o), l = R(), { ToggleGroup: s } = H(), c = ui();
|
|
14169
14172
|
if (!i) return null;
|
|
14170
14173
|
const d = i.config.legend.position, u = e ?? Zn, h = i.guides.legends.drawn[0], p = au({
|
|
14171
14174
|
legendPosition: i.guides.legends.position,
|
|
@@ -14180,15 +14183,15 @@ var Zn = [
|
|
|
14180
14183
|
const z = Zn.find((U) => U === E);
|
|
14181
14184
|
z && o.commands.dispatch(new ar({ position: z }));
|
|
14182
14185
|
}, w = (E) => {
|
|
14183
|
-
const z =
|
|
14186
|
+
const z = Zo.find((U) => U === E);
|
|
14184
14187
|
z && o.commands.dispatch(new Hd({ align: z }));
|
|
14185
14188
|
}, P = (E) => {
|
|
14186
|
-
const z =
|
|
14189
|
+
const z = Jo.find((U) => U === E);
|
|
14187
14190
|
z && o.commands.dispatch(new Gd({ display: z }));
|
|
14188
|
-
}, T = h?.position === "left" || h?.position === "right" ? "column" : "row", I = T === "row" ? "ltr" : c, N = (E) => l(E === "start" || E === "end" ? `editor.graphPanel.legendSection.${F3[T][E]}` : `editor.graphPanel.legendSection.align.${E}`), x =
|
|
14191
|
+
}, T = h?.position === "left" || h?.position === "right" ? "column" : "row", I = T === "row" ? "ltr" : c, N = (E) => l(E === "start" || E === "end" ? `editor.graphPanel.legendSection.${F3[T][E]}` : `editor.graphPanel.legendSection.align.${E}`), x = Zo.map((E) => ({
|
|
14189
14192
|
value: E,
|
|
14190
14193
|
label: N(E)
|
|
14191
|
-
})), O =
|
|
14194
|
+
})), O = Jo.map((E) => ({
|
|
14192
14195
|
value: E,
|
|
14193
14196
|
label: l(`editor.graphPanel.legendSection.display.${E}`)
|
|
14194
14197
|
})), A = t ?? l("editor.graphPanel.legendSection.title"), S = k.find((E) => E.value === y)?.label, b = h !== void 0;
|
|
@@ -14209,7 +14212,7 @@ var Zn = [
|
|
|
14209
14212
|
b && /* @__PURE__ */ a(L, {
|
|
14210
14213
|
label: l("editor.graphPanel.legendSection.alignLabel"),
|
|
14211
14214
|
layout: "stack",
|
|
14212
|
-
children: /* @__PURE__ */ a(
|
|
14215
|
+
children: /* @__PURE__ */ a(jr, {
|
|
14213
14216
|
direction: I,
|
|
14214
14217
|
children: /* @__PURE__ */ a("div", {
|
|
14215
14218
|
dir: I,
|
|
@@ -14234,9 +14237,9 @@ var Zn = [
|
|
|
14234
14237
|
] })
|
|
14235
14238
|
});
|
|
14236
14239
|
}, z3 = 1, B3 = 20, H3 = 0.5, bc = ({ layerId: e }) => {
|
|
14237
|
-
const t = te(), n = Q(t), { Slider: r } = H(), o =
|
|
14240
|
+
const t = te(), n = Q(t), { Slider: r } = H(), o = Sa(n, e, "point");
|
|
14238
14241
|
if (!n) return null;
|
|
14239
|
-
const i = q(n.layers, e)?.data?.findFirst((c) => (o?.get("size", c) ?? 0) > 0) ?? void 0, l = o?.get("size", i) ??
|
|
14242
|
+
const i = q(n.layers, e)?.data?.findFirst((c) => (o?.get("size", c) ?? 0) > 0) ?? void 0, l = o?.get("size", i) ?? yi;
|
|
14240
14243
|
return /* @__PURE__ */ a(r, {
|
|
14241
14244
|
value: l,
|
|
14242
14245
|
min: z3,
|
|
@@ -14253,23 +14256,23 @@ var Zn = [
|
|
|
14253
14256
|
onCommit: t.commands.commit
|
|
14254
14257
|
});
|
|
14255
14258
|
}, yc = ({ layerId: e }) => {
|
|
14256
|
-
const t = te(), n = Q(t), r =
|
|
14257
|
-
return n ? /* @__PURE__ */ a(
|
|
14259
|
+
const t = te(), n = Q(t), r = Sa(n, e, "point");
|
|
14260
|
+
return n ? /* @__PURE__ */ a(Zr, {
|
|
14258
14261
|
symbol: r?.get("symbol") ?? "circle",
|
|
14259
14262
|
coordType: n.coordSystem.type,
|
|
14260
14263
|
onChange: (o) => {
|
|
14261
|
-
t.commands.dispatch(new
|
|
14264
|
+
t.commands.dispatch(new Br({
|
|
14262
14265
|
layerId: e,
|
|
14263
14266
|
symbol: o
|
|
14264
14267
|
}));
|
|
14265
14268
|
}
|
|
14266
14269
|
}) : null;
|
|
14267
14270
|
}, c6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
14268
|
-
const r = te(), o = Q(r), i = R(), { Select: l, Slider: s, Switch: c, ToggleGroup: d } = H(), u = Gt(o), h =
|
|
14271
|
+
const r = te(), o = Q(r), i = R(), { Select: l, Slider: s, Switch: c, ToggleGroup: d } = H(), u = Gt(o), h = Wi(o?.spec.layers ?? [], "line", "area"), p = o && u && h ? Yr(o, u, h.id) : null;
|
|
14269
14272
|
if (!o || !p) return null;
|
|
14270
14273
|
const g = p.missingValueOptions.map((T) => ({
|
|
14271
14274
|
value: T,
|
|
14272
|
-
label:
|
|
14275
|
+
label: Pl(i, T)
|
|
14273
14276
|
})), m = [{
|
|
14274
14277
|
value: "auto",
|
|
14275
14278
|
label: i("editor.graphPanel.numberFormat.options.auto"),
|
|
@@ -14278,7 +14281,7 @@ var Zn = [
|
|
|
14278
14281
|
value: "custom",
|
|
14279
14282
|
label: i("editor.graphPanel.numberFormat.options.custom")
|
|
14280
14283
|
}], f = (T) => {
|
|
14281
|
-
r.commands.dispatch(new
|
|
14284
|
+
r.commands.dispatch(new Hr({
|
|
14282
14285
|
layerId: p.layerId,
|
|
14283
14286
|
showPoints: T
|
|
14284
14287
|
}));
|
|
@@ -14289,7 +14292,7 @@ var Zn = [
|
|
|
14289
14292
|
drawnFillAlpha: p.drawnFillAlpha
|
|
14290
14293
|
}));
|
|
14291
14294
|
}, k = (T) => {
|
|
14292
|
-
r.commands.dispatch(new
|
|
14295
|
+
r.commands.dispatch(new Oi({
|
|
14293
14296
|
layerId: p.layerId,
|
|
14294
14297
|
curve: T ? "smooth" : "linear"
|
|
14295
14298
|
}));
|
|
@@ -14305,7 +14308,7 @@ var Zn = [
|
|
|
14305
14308
|
}), { transient: !0 });
|
|
14306
14309
|
}, P = (T) => {
|
|
14307
14310
|
const I = hr.find((N) => N === T);
|
|
14308
|
-
I && r.commands.dispatch(new
|
|
14311
|
+
I && r.commands.dispatch(new Ri({
|
|
14309
14312
|
layerId: p.layerId,
|
|
14310
14313
|
missingValues: I
|
|
14311
14314
|
}));
|
|
@@ -14371,7 +14374,7 @@ var Zn = [
|
|
|
14371
14374
|
})
|
|
14372
14375
|
] })
|
|
14373
14376
|
});
|
|
14374
|
-
},
|
|
14377
|
+
}, Mr = "\0none", G3 = [
|
|
14375
14378
|
"x",
|
|
14376
14379
|
"y",
|
|
14377
14380
|
"color",
|
|
@@ -14389,12 +14392,12 @@ var Zn = [
|
|
|
14389
14392
|
return {
|
|
14390
14393
|
aesthetic: d,
|
|
14391
14394
|
label: o($3[d]),
|
|
14392
|
-
value: p ?? (h ? null :
|
|
14395
|
+
value: p ?? (h ? null : Mr),
|
|
14393
14396
|
options: V3(u, p, h ? null : l),
|
|
14394
14397
|
chooseColumn: (g) => {
|
|
14395
14398
|
n.commands.dispatch(new Vd({
|
|
14396
14399
|
aesthetic: d,
|
|
14397
|
-
variable: g ===
|
|
14400
|
+
variable: g === Mr ? null : g
|
|
14398
14401
|
}));
|
|
14399
14402
|
}
|
|
14400
14403
|
};
|
|
@@ -14420,13 +14423,13 @@ var Zn = [
|
|
|
14420
14423
|
}, V3 = (e, t, n) => {
|
|
14421
14424
|
const r = t !== null && !e.includes(t) ? [t, ...e] : e;
|
|
14422
14425
|
return [...n === null ? [] : [{
|
|
14423
|
-
value:
|
|
14426
|
+
value: Mr,
|
|
14424
14427
|
label: n
|
|
14425
14428
|
}], ...r.map((o) => ({
|
|
14426
14429
|
value: o,
|
|
14427
14430
|
label: o
|
|
14428
14431
|
}))];
|
|
14429
|
-
}, W3 = "k", U3 = 2, K3 = 0, j3 = 5,
|
|
14432
|
+
}, W3 = "k", U3 = 2, K3 = 0, j3 = 5, Er = [
|
|
14430
14433
|
{
|
|
14431
14434
|
value: "k",
|
|
14432
14435
|
labelKey: "thousands"
|
|
@@ -14445,7 +14448,7 @@ var Zn = [
|
|
|
14445
14448
|
const { abbreviation: c, decimals: d } = o.config.numberFormat, u = q3(c) !== void 0, h = d !== "auto", p = (w) => w.map((P) => ({
|
|
14446
14449
|
value: P,
|
|
14447
14450
|
label: i(`editor.graphPanel.numberFormat.options.${P}`)
|
|
14448
|
-
})), g =
|
|
14451
|
+
})), g = Er.map(({ value: w, labelKey: P }) => ({
|
|
14449
14452
|
value: w,
|
|
14450
14453
|
label: i(`common.abbreviations.${P}`)
|
|
14451
14454
|
})), m = (w) => {
|
|
@@ -14454,12 +14457,12 @@ var Zn = [
|
|
|
14454
14457
|
const P = X3.find((T) => T === w);
|
|
14455
14458
|
m(P ?? W3);
|
|
14456
14459
|
}, y = (w) => {
|
|
14457
|
-
const P =
|
|
14460
|
+
const P = Er.find((T) => T.value === w);
|
|
14458
14461
|
P && m(P.value);
|
|
14459
14462
|
}, k = (w) => {
|
|
14460
|
-
r.commands.dispatch(new
|
|
14463
|
+
r.commands.dispatch(new Pa({ decimals: w === "custom" ? U3 : "auto" }));
|
|
14461
14464
|
}, C = (w) => {
|
|
14462
|
-
w !== null && r.commands.dispatch(new
|
|
14465
|
+
w !== null && r.commands.dispatch(new Pa({ decimals: w }), { transient: !0 });
|
|
14463
14466
|
};
|
|
14464
14467
|
return /* @__PURE__ */ a(oe, {
|
|
14465
14468
|
title: e ?? i("editor.graphPanel.numberFormatSection.title"),
|
|
@@ -14506,7 +14509,7 @@ var Zn = [
|
|
|
14506
14509
|
})
|
|
14507
14510
|
] })
|
|
14508
14511
|
});
|
|
14509
|
-
}, q3 = (e) =>
|
|
14512
|
+
}, q3 = (e) => Er.find((t) => t.value === e), h6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
14510
14513
|
const r = Q(te()), o = R();
|
|
14511
14514
|
if (!r) return null;
|
|
14512
14515
|
const i = Y3(r.spec.layers);
|
|
@@ -14521,7 +14524,7 @@ var Zn = [
|
|
|
14521
14524
|
}) : null;
|
|
14522
14525
|
}, Y3 = (e) => {
|
|
14523
14526
|
const t = or(e, "line", "area");
|
|
14524
|
-
return or(e, "point").find((n) => !
|
|
14527
|
+
return or(e, "point").find((n) => !Ui(n, t));
|
|
14525
14528
|
}, Z3 = 0.9, J3 = 360, Q3 = 0.05, eS = 15, p6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
14526
14529
|
const r = te(), o = Q(r), i = R(), { Slider: l } = H();
|
|
14527
14530
|
if (!o || o.spec.coords.coordType !== "polar") return null;
|
|
@@ -14581,7 +14584,7 @@ var Zn = [
|
|
|
14581
14584
|
fill: "currentColor"
|
|
14582
14585
|
})
|
|
14583
14586
|
]
|
|
14584
|
-
}),
|
|
14587
|
+
}), Qo = (e) => /* @__PURE__ */ v(M, {
|
|
14585
14588
|
...e,
|
|
14586
14589
|
children: [
|
|
14587
14590
|
/* @__PURE__ */ a("path", {
|
|
@@ -14604,7 +14607,7 @@ var Zn = [
|
|
|
14604
14607
|
fill: "currentColor"
|
|
14605
14608
|
})
|
|
14606
14609
|
]
|
|
14607
|
-
}),
|
|
14610
|
+
}), ei = [
|
|
14608
14611
|
"linear",
|
|
14609
14612
|
"exponential",
|
|
14610
14613
|
"quadratic",
|
|
@@ -14615,7 +14618,7 @@ var Zn = [
|
|
|
14615
14618
|
], nS = "linear", g6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
14616
14619
|
const r = te(), o = Q(r), i = R(), { Select: l, Switch: s } = H(), { options: c, findValue: d } = En(o, r.formattingLocale);
|
|
14617
14620
|
if (!o || o.coordSystem.type === "polar") return null;
|
|
14618
|
-
const u = yu(o.spec.layers), h = gu(o.spec.layers), p = u?.stat.type === "smooth" ? u.stat.method : nS, g = rS(h), m =
|
|
14621
|
+
const u = yu(o.spec.layers), h = gu(o.spec.layers), p = u?.stat.type === "smooth" ? u.stat.method : nS, g = rS(h), m = ei.map((P) => ({
|
|
14619
14622
|
value: P,
|
|
14620
14623
|
label: i(`editor.annotationsPanel.trendType.options.${P}`)
|
|
14621
14624
|
})), f = (P, T = {}) => {
|
|
@@ -14627,7 +14630,7 @@ var Zn = [
|
|
|
14627
14630
|
});
|
|
14628
14631
|
r.commands.dispatch(N);
|
|
14629
14632
|
}, y = (P) => f(P ? "trend" : "none", { method: p }), k = (P) => f(P ? "average" : "none", { group: g ?? d(c[0]?.value ?? "") }), C = (P) => {
|
|
14630
|
-
const T =
|
|
14633
|
+
const T = ei.find((I) => I === P);
|
|
14631
14634
|
T !== void 0 && f("trend", { method: T });
|
|
14632
14635
|
}, w = (P) => {
|
|
14633
14636
|
const T = P === null ? void 0 : d(P);
|
|
@@ -14636,11 +14639,11 @@ var Zn = [
|
|
|
14636
14639
|
return /* @__PURE__ */ a(oe, {
|
|
14637
14640
|
title: e ?? i("editor.annotationsPanel.trendsAndAveragesSection.title"),
|
|
14638
14641
|
layout: t,
|
|
14639
|
-
preview: n ?? /* @__PURE__ */ a(
|
|
14642
|
+
preview: n ?? /* @__PURE__ */ a(Qo, { size: "lg" }),
|
|
14640
14643
|
children: /* @__PURE__ */ v(he, { children: [
|
|
14641
14644
|
/* @__PURE__ */ a(L, {
|
|
14642
14645
|
label: i("editor.annotationsPanel.trendsAndAveragesSection.trend"),
|
|
14643
|
-
icon: /* @__PURE__ */ a(
|
|
14646
|
+
icon: /* @__PURE__ */ a(Qo, { size: "lg" }),
|
|
14644
14647
|
children: /* @__PURE__ */ a(s, {
|
|
14645
14648
|
checked: u !== void 0,
|
|
14646
14649
|
onChange: y
|
|
@@ -14682,19 +14685,19 @@ var Zn = [
|
|
|
14682
14685
|
export {
|
|
14683
14686
|
QS as AppearanceSection,
|
|
14684
14687
|
JS as AxesPanel,
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
+
wl as AxisEditMenu,
|
|
14689
|
+
Vo as AxisSection,
|
|
14690
|
+
Tl as BarEditMenu,
|
|
14688
14691
|
e6 as BarSection,
|
|
14689
14692
|
Bh as Button,
|
|
14690
14693
|
t6 as CalloutsSection,
|
|
14691
14694
|
n3 as CaptionSection,
|
|
14692
|
-
|
|
14695
|
+
Bl as ChartEditMenu,
|
|
14693
14696
|
He as ColorRow,
|
|
14694
14697
|
Kh as ColorSwatches,
|
|
14695
14698
|
n6 as ComboSection,
|
|
14696
14699
|
qp as ControlRegistryProvider,
|
|
14697
|
-
|
|
14700
|
+
vt as ControlTooltip,
|
|
14698
14701
|
lp as CustomColor,
|
|
14699
14702
|
qS as EditableGraphRenderer,
|
|
14700
14703
|
fs as EditorIntlProvider,
|
|
@@ -14704,7 +14707,7 @@ export {
|
|
|
14704
14707
|
r6 as GoalSection,
|
|
14705
14708
|
a6 as GraphOptionsSection,
|
|
14706
14709
|
o6 as GraphTypeSection,
|
|
14707
|
-
|
|
14710
|
+
Ul as GridEditMenu,
|
|
14708
14711
|
i6 as GridSection,
|
|
14709
14712
|
l6 as HeadlineSection,
|
|
14710
14713
|
Cm as LegendEditMenu,
|
|
@@ -14731,7 +14734,7 @@ export {
|
|
|
14731
14734
|
Wp as TextField,
|
|
14732
14735
|
c3 as TextSizeSection,
|
|
14733
14736
|
d3 as TitleSection,
|
|
14734
|
-
|
|
14737
|
+
Sl as ToggleGroup,
|
|
14735
14738
|
Zy as ToggledSection,
|
|
14736
14739
|
g6 as TrendsAndAveragesSection,
|
|
14737
14740
|
Ah as useAnnotateAnchor,
|