drizzle-cube 0.1.29 → 0.1.30
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.
|
@@ -2,7 +2,7 @@ var Iv = Object.defineProperty;
|
|
|
2
2
|
var Dv = (e, t, r) => t in e ? Iv(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var Iu = (e, t, r) => Dv(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { jsxs as x, jsx as d, Fragment as ve } from "react/jsx-runtime";
|
|
5
|
-
import H, { Component as qv, useRef as re, useState as Y, useLayoutEffect as W0, useEffect as se, forwardRef as kn, useMemo as
|
|
5
|
+
import H, { Component as qv, useRef as re, useState as Y, useLayoutEffect as W0, useEffect as se, forwardRef as kn, useMemo as Te, useImperativeHandle as K0, useCallback as te, memo as xe, useContext as Cn, createContext as Y0 } from "react";
|
|
6
6
|
import { useCubeQuery as Ov, useDebounce as Lv, useFilterValues as $v } from "./hooks.js";
|
|
7
7
|
import { F as Rn, I as Fe, d as Fv, a as Pv, b as zv, c as Vv, e as Bv, f as Hv, g as jv, h as Gv, i as Uv, j as Wv, k as Kv, l as Yv, m as Qv, n as Xv, o as Zv, p as Q0, q as pn, r as Jv, s as ex, t as st, u as Du, v as Rr, w as nr, x as Xt, y as Qe, z as gn, A as tx, B as Mr, C as bc, D as vc, E as rx, G as X0, H as Zt, J as qu, K as nx, L as Jt, M as sx, N as Z0, O as ax, P as ix, Q as Ou, R as xc, S as Lu, T as ox } from "./chunks/icons-B_0yoGjv.js";
|
|
8
8
|
import { u as Ct } from "./chunks/providers-B7MVnAAt.js";
|
|
@@ -789,13 +789,13 @@ function Qx() {
|
|
|
789
789
|
function ng(e, t) {
|
|
790
790
|
var r = [], n = null, s = null, a = 6, i = 6, o = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, u = e === os || e === _r ? -1 : 1, l = e === _r || e === ls ? "x" : "y", f = e === os || e === Nc ? Ux : Wx;
|
|
791
791
|
function m(h) {
|
|
792
|
-
var g = n ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), y = s ?? (t.tickFormat ? t.tickFormat.apply(t, r) : Gx), b = Math.max(a, 0) + o, v = t.range(), w = +v[0] + c, R = +v[v.length - 1] + c, S = (t.bandwidth ? Yx : Kx)(t.copy(), c), $ = h.selection ? h.selection() : h,
|
|
793
|
-
|
|
792
|
+
var g = n ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), y = s ?? (t.tickFormat ? t.tickFormat.apply(t, r) : Gx), b = Math.max(a, 0) + o, v = t.range(), w = +v[0] + c, R = +v[v.length - 1] + c, S = (t.bandwidth ? Yx : Kx)(t.copy(), c), $ = h.selection ? h.selection() : h, T = $.selectAll(".domain").data([null]), q = $.selectAll(".tick").data(g, t).order(), F = q.exit(), A = q.enter().append("g").attr("class", "tick"), D = q.select("line"), M = q.select("text");
|
|
793
|
+
T = T.merge(T.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), q = q.merge(A), D = D.merge(A.append("line").attr("stroke", "currentColor").attr(l + "2", u * a)), M = M.merge(A.append("text").attr("fill", "currentColor").attr(l, u * b).attr("dy", e === os ? "0em" : e === Nc ? "0.71em" : "0.32em")), h !== $ && (T = T.transition(h), q = q.transition(h), D = D.transition(h), M = M.transition(h), F = F.transition(h).attr("opacity", ju).attr("transform", function(_) {
|
|
794
794
|
return isFinite(_ = S(_)) ? f(_ + c) : this.getAttribute("transform");
|
|
795
|
-
}),
|
|
795
|
+
}), A.attr("opacity", ju).attr("transform", function(_) {
|
|
796
796
|
var E = this.parentNode.__axis;
|
|
797
797
|
return f((E && isFinite(E = E(_)) ? E : S(_)) + c);
|
|
798
|
-
})), F.remove(),
|
|
798
|
+
})), F.remove(), T.attr("d", e === _r || e === ls ? i ? "M" + u * i + "," + w + "H" + c + "V" + R + "H" + u * i : "M" + c + "," + w + "V" + R : i ? "M" + w + "," + u * i + "V" + c + "H" + R + "V" + u * i : "M" + w + "," + c + "H" + R), q.attr("opacity", 1).attr("transform", function(_) {
|
|
799
799
|
return f(S(_) + c);
|
|
800
800
|
}), D.attr(l + "2", u * a), M.attr(l, u * b).text(y), $.filter(Qx).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === ls ? "start" : e === _r ? "end" : "middle"), $.each(function() {
|
|
801
801
|
this.__axis = S;
|
|
@@ -1461,7 +1461,7 @@ He.prototype = Fr.prototype = {
|
|
|
1461
1461
|
dispatch: C1,
|
|
1462
1462
|
[Symbol.iterator]: R1
|
|
1463
1463
|
};
|
|
1464
|
-
function
|
|
1464
|
+
function Se(e) {
|
|
1465
1465
|
return typeof e == "string" ? new He([[document.querySelector(e)]], [document.documentElement]) : new He([[e]], pg);
|
|
1466
1466
|
}
|
|
1467
1467
|
function I1(e) {
|
|
@@ -1491,11 +1491,11 @@ function er(e) {
|
|
|
1491
1491
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
1492
1492
|
}
|
|
1493
1493
|
function gg(e) {
|
|
1494
|
-
var t = e.document.documentElement, r =
|
|
1494
|
+
var t = e.document.documentElement, r = Se(e).on("dragstart.drag", er, Dr);
|
|
1495
1495
|
"onselectstart" in t ? r.on("selectstart.drag", er, Dr) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
|
|
1496
1496
|
}
|
|
1497
1497
|
function yg(e, t) {
|
|
1498
|
-
var r = e.document.documentElement, n =
|
|
1498
|
+
var r = e.document.documentElement, n = Se(e).on("dragstart.drag", null);
|
|
1499
1499
|
t && (n.on("click.drag", er, Dr), setTimeout(function() {
|
|
1500
1500
|
n.on("click.drag", null);
|
|
1501
1501
|
}, 0)), "onselectstart" in r ? n.on("selectstart.drag", null) : (r.style.MozUserSelect = r.__noselect, delete r.__noselect);
|
|
@@ -1550,43 +1550,43 @@ function F1() {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
function h(S, $) {
|
|
1552
1552
|
if (!(l || !e.call(this, S, $))) {
|
|
1553
|
-
var
|
|
1554
|
-
|
|
1553
|
+
var T = R(this, t.call(this, S, $), S, $, "mouse");
|
|
1554
|
+
T && (Se(S.view).on("mousemove.drag", g, Dr).on("mouseup.drag", y, Dr), gg(S.view), cs(S), u = !1, o = S.clientX, c = S.clientY, T("start", S));
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
1557
|
function g(S) {
|
|
1558
1558
|
if (er(S), !u) {
|
|
1559
|
-
var $ = S.clientX - o,
|
|
1560
|
-
u = $ * $ +
|
|
1559
|
+
var $ = S.clientX - o, T = S.clientY - c;
|
|
1560
|
+
u = $ * $ + T * T > f;
|
|
1561
1561
|
}
|
|
1562
1562
|
s.mouse("drag", S);
|
|
1563
1563
|
}
|
|
1564
1564
|
function y(S) {
|
|
1565
|
-
|
|
1565
|
+
Se(S.view).on("mousemove.drag mouseup.drag", null), yg(S.view, u), er(S), s.mouse("end", S);
|
|
1566
1566
|
}
|
|
1567
1567
|
function b(S, $) {
|
|
1568
1568
|
if (e.call(this, S, $)) {
|
|
1569
|
-
var
|
|
1570
|
-
for (
|
|
1571
|
-
(D = R(this, q, S, $, A
|
|
1569
|
+
var T = S.changedTouches, q = t.call(this, S, $), F = T.length, A, D;
|
|
1570
|
+
for (A = 0; A < F; ++A)
|
|
1571
|
+
(D = R(this, q, S, $, T[A].identifier, T[A])) && (cs(S), D("start", S, T[A]));
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
1574
|
function v(S) {
|
|
1575
|
-
var $ = S.changedTouches,
|
|
1576
|
-
for (q = 0; q <
|
|
1575
|
+
var $ = S.changedTouches, T = $.length, q, F;
|
|
1576
|
+
for (q = 0; q < T; ++q)
|
|
1577
1577
|
(F = s[$[q].identifier]) && (er(S), F("drag", S, $[q]));
|
|
1578
1578
|
}
|
|
1579
1579
|
function w(S) {
|
|
1580
|
-
var $ = S.changedTouches,
|
|
1580
|
+
var $ = S.changedTouches, T = $.length, q, F;
|
|
1581
1581
|
for (l && clearTimeout(l), l = setTimeout(function() {
|
|
1582
1582
|
l = null;
|
|
1583
|
-
}, 500), q = 0; q <
|
|
1583
|
+
}, 500), q = 0; q < T; ++q)
|
|
1584
1584
|
(F = s[$[q].identifier]) && (cs(S), F("end", S, $[q]));
|
|
1585
1585
|
}
|
|
1586
|
-
function R(S, $,
|
|
1587
|
-
var D = a.copy(), M = Ye(
|
|
1586
|
+
function R(S, $, T, q, F, A) {
|
|
1587
|
+
var D = a.copy(), M = Ye(A || T, $), _, E, p;
|
|
1588
1588
|
if ((p = r.call(S, new Ec("beforestart", {
|
|
1589
|
-
sourceEvent:
|
|
1589
|
+
sourceEvent: T,
|
|
1590
1590
|
target: m,
|
|
1591
1591
|
identifier: F,
|
|
1592
1592
|
active: i,
|
|
@@ -1721,13 +1721,13 @@ const U1 = function e(t, r, n) {
|
|
|
1721
1721
|
];
|
|
1722
1722
|
};
|
|
1723
1723
|
else {
|
|
1724
|
-
var w = Math.sqrt(y), R = (m * m - u * u + n * y) / (2 * u * r * w), S = (m * m - u * u - n * y) / (2 * m * r * w), $ = Math.log(Math.sqrt(R * R + 1) - R),
|
|
1725
|
-
v = (
|
|
1726
|
-
var F = q * v,
|
|
1724
|
+
var w = Math.sqrt(y), R = (m * m - u * u + n * y) / (2 * u * r * w), S = (m * m - u * u - n * y) / (2 * m * r * w), $ = Math.log(Math.sqrt(R * R + 1) - R), T = Math.log(Math.sqrt(S * S + 1) - S);
|
|
1725
|
+
v = (T - $) / t, b = function(q) {
|
|
1726
|
+
var F = q * v, A = Qu($), D = u / (r * w) * (A * G1(t * F + $) - j1($));
|
|
1727
1727
|
return [
|
|
1728
1728
|
o + D * h,
|
|
1729
1729
|
c + D * g,
|
|
1730
|
-
u *
|
|
1730
|
+
u * A / Qu(t * F + $)
|
|
1731
1731
|
];
|
|
1732
1732
|
};
|
|
1733
1733
|
}
|
|
@@ -2434,12 +2434,12 @@ function hN(e, t, r) {
|
|
|
2434
2434
|
function kg() {
|
|
2435
2435
|
var e = cN, t = uN, r = hN, n = dN, s = fN, a = [0, 1 / 0], i = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], o = 250, c = U1, u = Mn("start", "zoom", "end"), l, f, m, h = 500, g = 150, y = 0, b = 10;
|
|
2436
2436
|
function v(p) {
|
|
2437
|
-
p.property("__zoom", rd).on("wheel.zoom", F, { passive: !1 }).on("mousedown.zoom",
|
|
2437
|
+
p.property("__zoom", rd).on("wheel.zoom", F, { passive: !1 }).on("mousedown.zoom", A).on("dblclick.zoom", D).filter(s).on("touchstart.zoom", M).on("touchmove.zoom", _).on("touchend.zoom touchcancel.zoom", E).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2438
2438
|
}
|
|
2439
2439
|
v.transform = function(p, N, k, C) {
|
|
2440
2440
|
var P = p.selection ? p.selection() : p;
|
|
2441
2441
|
P.property("__zoom", rd), p !== P ? $(p, N, k, C) : P.interrupt().each(function() {
|
|
2442
|
-
|
|
2442
|
+
T(this, arguments).event(C).start().zoom(null, typeof N == "function" ? N.apply(this, arguments) : N).end();
|
|
2443
2443
|
});
|
|
2444
2444
|
}, v.scaleBy = function(p, N, k, C) {
|
|
2445
2445
|
v.scaleTo(p, function() {
|
|
@@ -2479,11 +2479,11 @@ function kg() {
|
|
|
2479
2479
|
}
|
|
2480
2480
|
function $(p, N, k, C) {
|
|
2481
2481
|
p.on("start.zoom", function() {
|
|
2482
|
-
|
|
2482
|
+
T(this, arguments).event(C).start();
|
|
2483
2483
|
}).on("interrupt.zoom end.zoom", function() {
|
|
2484
|
-
|
|
2484
|
+
T(this, arguments).event(C).end();
|
|
2485
2485
|
}).tween("zoom", function() {
|
|
2486
|
-
var P = this, I = arguments, O =
|
|
2486
|
+
var P = this, I = arguments, O = T(P, I).event(C), L = t.apply(P, I), z = k == null ? S(L) : typeof k == "function" ? k.apply(P, I) : k, V = Math.max(L[1][0] - L[0][0], L[1][1] - L[0][1]), U = P.__zoom, Q = typeof N == "function" ? N.apply(P, I) : N, B = c(U.invert(z).concat(V / U.k), Q.invert(z).concat(V / Q.k));
|
|
2487
2487
|
return function(W) {
|
|
2488
2488
|
if (W === 1) W = Q;
|
|
2489
2489
|
else {
|
|
@@ -2494,7 +2494,7 @@ function kg() {
|
|
|
2494
2494
|
};
|
|
2495
2495
|
});
|
|
2496
2496
|
}
|
|
2497
|
-
function
|
|
2497
|
+
function T(p, N, k) {
|
|
2498
2498
|
return !k && p.__zooming || new q(p, N);
|
|
2499
2499
|
}
|
|
2500
2500
|
function q(p, N) {
|
|
@@ -2514,7 +2514,7 @@ function kg() {
|
|
|
2514
2514
|
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
|
|
2515
2515
|
},
|
|
2516
2516
|
emit: function(p) {
|
|
2517
|
-
var N =
|
|
2517
|
+
var N = Se(this.that).datum();
|
|
2518
2518
|
u.call(
|
|
2519
2519
|
p,
|
|
2520
2520
|
this.that,
|
|
@@ -2530,7 +2530,7 @@ function kg() {
|
|
|
2530
2530
|
};
|
|
2531
2531
|
function F(p, ...N) {
|
|
2532
2532
|
if (!e.apply(this, arguments)) return;
|
|
2533
|
-
var k =
|
|
2533
|
+
var k = T(this, N).event(p), C = this.__zoom, P = Math.max(a[0], Math.min(a[1], C.k * Math.pow(2, n.apply(this, arguments)))), I = Ye(p);
|
|
2534
2534
|
if (k.wheel)
|
|
2535
2535
|
(k.mouse[0][0] !== I[0] || k.mouse[0][1] !== I[1]) && (k.mouse[1] = C.invert(k.mouse[0] = I)), clearTimeout(k.wheel);
|
|
2536
2536
|
else {
|
|
@@ -2542,9 +2542,9 @@ function kg() {
|
|
|
2542
2542
|
k.wheel = null, k.end();
|
|
2543
2543
|
}
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2545
|
+
function A(p, ...N) {
|
|
2546
2546
|
if (m || !e.apply(this, arguments)) return;
|
|
2547
|
-
var k = p.currentTarget, C =
|
|
2547
|
+
var k = p.currentTarget, C = T(this, N, !0).event(p), P = Se(p.view).on("mousemove.zoom", z, !0).on("mouseup.zoom", V, !0), I = Ye(p, k), O = p.clientX, L = p.clientY;
|
|
2548
2548
|
gg(p.view), us(p), C.mouse = [I, this.__zoom.invert(I)], dn(this), C.start();
|
|
2549
2549
|
function z(U) {
|
|
2550
2550
|
if (yr(U), !C.moved) {
|
|
@@ -2560,12 +2560,12 @@ function kg() {
|
|
|
2560
2560
|
function D(p, ...N) {
|
|
2561
2561
|
if (e.apply(this, arguments)) {
|
|
2562
2562
|
var k = this.__zoom, C = Ye(p.changedTouches ? p.changedTouches[0] : p, this), P = k.invert(C), I = k.k * (p.shiftKey ? 0.5 : 2), O = r(R(w(k, I), C, P), t.apply(this, N), i);
|
|
2563
|
-
yr(p), o > 0 ?
|
|
2563
|
+
yr(p), o > 0 ? Se(this).transition().duration(o).call($, O, C, p) : Se(this).call(v.transform, O, C, p);
|
|
2564
2564
|
}
|
|
2565
2565
|
}
|
|
2566
2566
|
function M(p, ...N) {
|
|
2567
2567
|
if (e.apply(this, arguments)) {
|
|
2568
|
-
var k = p.touches, C = k.length, P =
|
|
2568
|
+
var k = p.touches, C = k.length, P = T(this, N, p.changedTouches.length === C).event(p), I, O, L, z;
|
|
2569
2569
|
for (us(p), O = 0; O < C; ++O)
|
|
2570
2570
|
L = k[O], z = Ye(L, this), z = [z, this.__zoom.invert(z), L.identifier], P.touch0 ? !P.touch1 && P.touch0[2] !== z[2] && (P.touch1 = z, P.taps = 0) : (P.touch0 = z, I = !0, P.taps = 1 + !!l);
|
|
2571
2571
|
l && (l = clearTimeout(l)), I && (P.taps < 2 && (f = z[0], l = setTimeout(function() {
|
|
@@ -2575,7 +2575,7 @@ function kg() {
|
|
|
2575
2575
|
}
|
|
2576
2576
|
function _(p, ...N) {
|
|
2577
2577
|
if (this.__zooming) {
|
|
2578
|
-
var k =
|
|
2578
|
+
var k = T(this, N).event(p), C = p.changedTouches, P = C.length, I, O, L, z;
|
|
2579
2579
|
for (yr(p), I = 0; I < P; ++I)
|
|
2580
2580
|
O = C[I], L = Ye(O, this), k.touch0 && k.touch0[2] === O.identifier ? k.touch0[0] = L : k.touch1 && k.touch1[2] === O.identifier && (k.touch1[0] = L);
|
|
2581
2581
|
if (O = k.that.__zoom, k.touch1) {
|
|
@@ -2588,14 +2588,14 @@ function kg() {
|
|
|
2588
2588
|
}
|
|
2589
2589
|
function E(p, ...N) {
|
|
2590
2590
|
if (this.__zooming) {
|
|
2591
|
-
var k =
|
|
2591
|
+
var k = T(this, N).event(p), C = p.changedTouches, P = C.length, I, O;
|
|
2592
2592
|
for (us(p), m && clearTimeout(m), m = setTimeout(function() {
|
|
2593
2593
|
m = null;
|
|
2594
2594
|
}, h), I = 0; I < P; ++I)
|
|
2595
2595
|
O = C[I], k.touch0 && k.touch0[2] === O.identifier ? delete k.touch0 : k.touch1 && k.touch1[2] === O.identifier && delete k.touch1;
|
|
2596
2596
|
if (k.touch1 && !k.touch0 && (k.touch0 = k.touch1, delete k.touch1), k.touch0) k.touch0[1] = this.__zoom.invert(k.touch0[0]);
|
|
2597
2597
|
else if (k.end(), k.taps === 2 && (O = Ye(O, this), Math.hypot(f[0] - O[0], f[1] - O[1]) < b)) {
|
|
2598
|
-
var L =
|
|
2598
|
+
var L = Se(this).on("dblclick.zoom");
|
|
2599
2599
|
L && L.apply(this, arguments);
|
|
2600
2600
|
}
|
|
2601
2601
|
}
|
|
@@ -2649,19 +2649,19 @@ function mN({
|
|
|
2649
2649
|
let w, R;
|
|
2650
2650
|
const S = () => {
|
|
2651
2651
|
if (o.current) {
|
|
2652
|
-
const { width:
|
|
2653
|
-
if (
|
|
2654
|
-
return l({ width:
|
|
2652
|
+
const { width: T, height: q } = o.current.getBoundingClientRect();
|
|
2653
|
+
if (T > 0 && q > 0)
|
|
2654
|
+
return l({ width: T, height: q }), m(!0), !0;
|
|
2655
2655
|
}
|
|
2656
2656
|
return !1;
|
|
2657
2657
|
};
|
|
2658
2658
|
if (!S() && b < v) {
|
|
2659
|
-
const
|
|
2659
|
+
const T = () => {
|
|
2660
2660
|
!S() && b < v && (b++, R = setTimeout(() => {
|
|
2661
|
-
w = requestAnimationFrame(
|
|
2661
|
+
w = requestAnimationFrame(T);
|
|
2662
2662
|
}, 50 * b));
|
|
2663
2663
|
};
|
|
2664
|
-
w = requestAnimationFrame(
|
|
2664
|
+
w = requestAnimationFrame(T);
|
|
2665
2665
|
}
|
|
2666
2666
|
return () => {
|
|
2667
2667
|
w && cancelAnimationFrame(w), R && clearTimeout(R);
|
|
@@ -2683,12 +2683,12 @@ function mN({
|
|
|
2683
2683
|
b && b.disconnect(), window.removeEventListener("resize", v);
|
|
2684
2684
|
};
|
|
2685
2685
|
}, [f]), se(() => {
|
|
2686
|
-
if (!e || e.length === 0 || !i.current || !f || u.width === 0 || (
|
|
2686
|
+
if (!e || e.length === 0 || !i.current || !f || u.width === 0 || (Se(i.current).selectAll("*").remove(), !(t != null && t.xAxis) || !(t != null && t.yAxis) || !(t != null && t.series)))
|
|
2687
2687
|
return;
|
|
2688
2688
|
const b = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, v = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, w = Array.isArray(t.series) ? t.series[0] : t.series, R = Array.isArray(t.sizeField) ? t.sizeField[0] : t.sizeField || v, S = Array.isArray(t.colorField) ? t.colorField[0] : t.colorField;
|
|
2689
2689
|
if (!b || !v || !w || !R)
|
|
2690
2690
|
return;
|
|
2691
|
-
const $ = hx(n, b),
|
|
2691
|
+
const $ = hx(n, b), T = e.map((O) => {
|
|
2692
2692
|
const L = J0(O[b], $) || O[b], z = typeof O[v] == "string" ? parseFloat(O[v]) : O[v] || 0, V = typeof O[R] == "string" ? parseFloat(O[R]) : O[R] || 0, U = O[w];
|
|
2693
2693
|
return {
|
|
2694
2694
|
x: typeof L == "string" ? parseFloat(L) || 0 : L,
|
|
@@ -2700,35 +2700,35 @@ function mN({
|
|
|
2700
2700
|
label: `${U || "Unknown"}`
|
|
2701
2701
|
};
|
|
2702
2702
|
}).filter((O) => O.size > 0);
|
|
2703
|
-
if (
|
|
2703
|
+
if (T.length === 0) return;
|
|
2704
2704
|
const q = {
|
|
2705
2705
|
...Pu,
|
|
2706
2706
|
left: Pu.left + 30,
|
|
2707
2707
|
// Add extra 30px left margin for Y-axis label
|
|
2708
2708
|
bottom: g.showLegend && S ? 100 : 40
|
|
2709
2709
|
// Add extra space for legend
|
|
2710
|
-
}, F = u.width - q.left - q.right,
|
|
2710
|
+
}, F = u.width - q.left - q.right, A = u.height - q.top - q.bottom, D = Se(i.current).attr("width", u.width).attr("height", u.height), M = D.append("g").attr("transform", `translate(${q.left},${q.top})`), _ = zu().domain(Bu(T, (O) => O.x)).range([0, F]).nice(), E = zu().domain(Bu(T, (O) => O.y)).range([A, 0]).nice(), p = oN().domain([0, _c(T, (O) => O.size)]).range([g.minBubbleSize, g.maxBubbleSize]);
|
|
2711
2711
|
let N, k = !1, C = [];
|
|
2712
|
-
if (S &&
|
|
2713
|
-
const O =
|
|
2712
|
+
if (S && T.length > 0) {
|
|
2713
|
+
const O = T.map((L) => {
|
|
2714
2714
|
const z = L.color;
|
|
2715
2715
|
return typeof z == "string" ? parseFloat(z) : z;
|
|
2716
2716
|
}).filter((L) => !isNaN(L));
|
|
2717
|
-
if (k = O.length ===
|
|
2717
|
+
if (k = O.length === T.length && O.every((L) => typeof L == "number"), k) {
|
|
2718
2718
|
const L = Math.min(...O), z = Math.max(...O);
|
|
2719
2719
|
N = eg().domain([L, z]).range((a == null ? void 0 : a.gradient) || wc);
|
|
2720
2720
|
} else
|
|
2721
|
-
C = [...new Set(
|
|
2721
|
+
C = [...new Set(T.map((L) => String(L.color)))], N = Vu().domain(C).range((a == null ? void 0 : a.colors) || is);
|
|
2722
2722
|
} else
|
|
2723
2723
|
N = Vu().domain(["default"]).range([is[0]]);
|
|
2724
|
-
g.showGrid && (M.append("g").attr("class", "grid").attr("transform", `translate(0,${
|
|
2725
|
-
Gu(_).tickSize(-
|
|
2724
|
+
g.showGrid && (M.append("g").attr("class", "grid").attr("transform", `translate(0,${A})`).call(
|
|
2725
|
+
Gu(_).tickSize(-A).tickFormat(() => "")
|
|
2726
2726
|
).style("stroke-dasharray", "3,3").style("opacity", 0.3), M.append("g").attr("class", "grid").call(
|
|
2727
2727
|
Uu(E).tickSize(-F).tickFormat(() => "")
|
|
2728
|
-
).style("stroke-dasharray", "3,3").style("opacity", 0.3)), M.append("g").attr("transform", `translate(0,${
|
|
2729
|
-
const P =
|
|
2728
|
+
).style("stroke-dasharray", "3,3").style("opacity", 0.3)), M.append("g").attr("transform", `translate(0,${A})`).call(Gu(_)).append("text").attr("x", F / 2).attr("y", 35).attr("fill", "currentColor").style("text-anchor", "middle").style("font-size", "12px").text(h(b)), M.append("g").call(Uu(E)).append("text").attr("transform", "rotate(-90)").attr("y", -35).attr("x", -A / 2).attr("fill", "currentColor").style("text-anchor", "middle").style("font-size", "12px").text(h(v));
|
|
2729
|
+
const P = Se("body").append("div").attr("class", "bubble-chart-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), I = M.selectAll(".bubble").data(T).enter().append("circle").attr("class", "bubble").attr("cx", (O) => _(O.x)).attr("cy", (O) => E(O.y)).attr("r", (O) => p(O.size)).style("fill", (O) => S && O.color !== void 0 ? N(k ? O.color : String(O.color)) : is[0]).style("opacity", g.bubbleOpacity).style("stroke", "#fff").style("stroke-width", 1).style("cursor", "pointer");
|
|
2730
2730
|
if (g.showTooltip && I.on("mouseover", function(O, L) {
|
|
2731
|
-
|
|
2731
|
+
Se(this).transition().duration(200).style("opacity", 1).attr("r", p(L.size) * 1.1);
|
|
2732
2732
|
const z = [
|
|
2733
2733
|
`<strong>${L.series || "Unknown"}</strong>`,
|
|
2734
2734
|
`${h(b)}: ${L.x}`,
|
|
@@ -2740,17 +2740,17 @@ function mN({
|
|
|
2740
2740
|
}).on("mousemove", function(O) {
|
|
2741
2741
|
P.style("left", O.pageX + 10 + "px").style("top", O.pageY - 10 + "px");
|
|
2742
2742
|
}).on("mouseout", function(O, L) {
|
|
2743
|
-
|
|
2743
|
+
Se(this).transition().duration(200).style("opacity", g.bubbleOpacity).attr("r", p(L.size)), P.transition().duration(200).style("opacity", 0), c(null);
|
|
2744
2744
|
}), g.showLegend && S)
|
|
2745
2745
|
if (k) {
|
|
2746
|
-
const z = Math.min(...
|
|
2746
|
+
const z = Math.min(...T.map((j) => j.color)), V = Math.max(...T.map((j) => j.color)), U = M.append("g").attr("class", "color-legend").attr("transform", `translate(${F / 2 - 200 / 2}, ${A + 60})`), B = D.append("defs").append("linearGradient").attr("id", "color-scale-gradient").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%"), W = (a == null ? void 0 : a.gradient) || wc;
|
|
2747
2747
|
W.forEach((j, G) => {
|
|
2748
2748
|
B.append("stop").attr("offset", `${G / (W.length - 1) * 100}%`).attr("stop-color", j);
|
|
2749
2749
|
}), U.append("rect").attr("width", 200).attr("height", 20).style("fill", "url(#color-scale-gradient)").style("stroke", "#ccc").style("stroke-width", 1), U.append("text").attr("x", 0).attr("y", 35).attr("text-anchor", "start").style("font-size", "11px").style("fill", "currentColor").text(z.toFixed(2)), U.append("text").attr("x", 200).attr("y", 35).attr("text-anchor", "end").style("font-size", "11px").style("fill", "currentColor").text(V.toFixed(2)), U.append("text").attr("x", 200 / 2).attr("y", -5).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", "currentColor").text(h(S));
|
|
2750
2750
|
} else {
|
|
2751
2751
|
const O = C;
|
|
2752
2752
|
if (O.length > 0) {
|
|
2753
|
-
const z = M.append("g").attr("class", "legend").attr("transform", `translate(${F / 2 - O.length * 80 / 2}, ${
|
|
2753
|
+
const z = M.append("g").attr("class", "legend").attr("transform", `translate(${F / 2 - O.length * 80 / 2}, ${A + 60})`).selectAll(".legend-item").data(O).enter().append("g").attr("class", "legend-item").attr("transform", (V, U) => `translate(${U * 80}, 0)`).style("cursor", "pointer");
|
|
2754
2754
|
z.append("circle").attr("cx", 5).attr("cy", 5).attr("r", 5).style("fill", (V) => N(V)).style("opacity", g.bubbleOpacity), z.append("text").attr("x", 15).attr("y", 5).attr("dy", ".35em").style("font-size", "11px").style("fill", "currentColor").text((V) => String(V)), z.on("mouseover", function(V, U) {
|
|
2755
2755
|
I.transition().duration(200).style("opacity", (Q) => S && String(Q.color) === U ? 1 : 0.2);
|
|
2756
2756
|
}).on("mouseout", function() {
|
|
@@ -2781,14 +2781,14 @@ function pN({
|
|
|
2781
2781
|
height: s = "100%",
|
|
2782
2782
|
colorPalette: a
|
|
2783
2783
|
}) {
|
|
2784
|
-
var
|
|
2784
|
+
var T, q;
|
|
2785
2785
|
const i = re(null), o = re(null), [c, u] = Y({ width: 0, height: 0 }), [l, f] = Y(!1), { getFieldLabel: m } = Ct(), h = {
|
|
2786
2786
|
showTooltip: (r == null ? void 0 : r.showTooltip) ?? !0,
|
|
2787
2787
|
showLabels: (r == null ? void 0 : r.showLabels) ?? !0
|
|
2788
2788
|
};
|
|
2789
2789
|
W0(() => {
|
|
2790
2790
|
let F = 0;
|
|
2791
|
-
const
|
|
2791
|
+
const A = 10;
|
|
2792
2792
|
let D, M;
|
|
2793
2793
|
const _ = () => {
|
|
2794
2794
|
if (o.current) {
|
|
@@ -2798,9 +2798,9 @@ function pN({
|
|
|
2798
2798
|
}
|
|
2799
2799
|
return !1;
|
|
2800
2800
|
};
|
|
2801
|
-
if (!_() && F <
|
|
2801
|
+
if (!_() && F < A) {
|
|
2802
2802
|
const p = () => {
|
|
2803
|
-
!_() && F <
|
|
2803
|
+
!_() && F < A && (F++, M = setTimeout(() => {
|
|
2804
2804
|
D = requestAnimationFrame(p);
|
|
2805
2805
|
}, 50 * F));
|
|
2806
2806
|
};
|
|
@@ -2811,114 +2811,114 @@ function pN({
|
|
|
2811
2811
|
};
|
|
2812
2812
|
}, []), se(() => {
|
|
2813
2813
|
let F = null;
|
|
2814
|
-
const
|
|
2814
|
+
const A = () => {
|
|
2815
2815
|
if (o.current) {
|
|
2816
2816
|
const { width: D, height: M } = o.current.getBoundingClientRect();
|
|
2817
2817
|
D > 0 && M > 0 && (u({ width: D, height: M }), l || f(!0));
|
|
2818
2818
|
}
|
|
2819
2819
|
};
|
|
2820
|
-
return o.current && (F = new ResizeObserver(() =>
|
|
2821
|
-
F && F.disconnect(), window.removeEventListener("resize",
|
|
2820
|
+
return o.current && (F = new ResizeObserver(() => A()), F.observe(o.current), A()), window.addEventListener("resize", A), () => {
|
|
2821
|
+
F && F.disconnect(), window.removeEventListener("resize", A);
|
|
2822
2822
|
};
|
|
2823
2823
|
}, [l]);
|
|
2824
2824
|
const g = (F) => Math.floor(F.getMonth() / 3) + 1, y = (F) => F.getMonth() % 3 + 1, b = (F) => {
|
|
2825
|
-
const
|
|
2826
|
-
return Math.floor((
|
|
2825
|
+
const A = F.getDate();
|
|
2826
|
+
return Math.floor((A - 1) / 7) + 1;
|
|
2827
2827
|
}, v = (F) => {
|
|
2828
2828
|
switch (F == null ? void 0 : F.toLowerCase()) {
|
|
2829
2829
|
case "year":
|
|
2830
2830
|
return null;
|
|
2831
2831
|
case "quarter":
|
|
2832
2832
|
return {
|
|
2833
|
-
extractX: (
|
|
2834
|
-
extractY: (
|
|
2833
|
+
extractX: (A) => A.getFullYear(),
|
|
2834
|
+
extractY: (A) => g(A) - 1,
|
|
2835
2835
|
// 0-3 for indexing
|
|
2836
2836
|
xLabels: [],
|
|
2837
2837
|
// Will be determined from data
|
|
2838
2838
|
yLabels: ["Q1", "Q2", "Q3", "Q4"],
|
|
2839
|
-
xFormat: (
|
|
2839
|
+
xFormat: (A) => `'${A.toString().slice(-2)}`,
|
|
2840
2840
|
// '24 instead of 2024
|
|
2841
|
-
yFormat: (
|
|
2841
|
+
yFormat: (A) => ["Q1", "Q2", "Q3", "Q4"][A] || "",
|
|
2842
2842
|
cellWidth: 16,
|
|
2843
2843
|
cellHeight: 16
|
|
2844
2844
|
};
|
|
2845
2845
|
case "month":
|
|
2846
2846
|
return {
|
|
2847
|
-
extractX: (
|
|
2848
|
-
const D =
|
|
2847
|
+
extractX: (A) => {
|
|
2848
|
+
const D = A.getFullYear(), M = g(A);
|
|
2849
2849
|
return D * 10 + M;
|
|
2850
2850
|
},
|
|
2851
|
-
extractY: (
|
|
2851
|
+
extractY: (A) => y(A) - 1,
|
|
2852
2852
|
// 0-2 for indexing
|
|
2853
2853
|
xLabels: [],
|
|
2854
2854
|
// Will be determined from data
|
|
2855
2855
|
yLabels: ["Month 1", "Month 2", "Month 3"],
|
|
2856
|
-
xFormat: (
|
|
2857
|
-
yFormat: (
|
|
2856
|
+
xFormat: (A) => `Q${A % 10}`,
|
|
2857
|
+
yFormat: (A) => ["Month 1", "Month 2", "Month 3"][A] || "",
|
|
2858
2858
|
cellWidth: 16,
|
|
2859
2859
|
cellHeight: 16,
|
|
2860
2860
|
hasHierarchicalLabels: !0,
|
|
2861
2861
|
// Flag to indicate we need special handling
|
|
2862
|
-
getYearFromX: (
|
|
2862
|
+
getYearFromX: (A) => Math.floor(A / 10)
|
|
2863
2863
|
// Helper to get year for grouping
|
|
2864
2864
|
};
|
|
2865
2865
|
case "week":
|
|
2866
2866
|
return {
|
|
2867
|
-
extractX: (
|
|
2868
|
-
const D =
|
|
2867
|
+
extractX: (A) => {
|
|
2868
|
+
const D = A.getFullYear(), M = A.getMonth() + 1;
|
|
2869
2869
|
return D * 100 + M;
|
|
2870
2870
|
},
|
|
2871
|
-
extractY: (
|
|
2871
|
+
extractY: (A) => b(A) - 1,
|
|
2872
2872
|
// 0-5 for indexing
|
|
2873
2873
|
xLabels: [],
|
|
2874
2874
|
// Will be determined from data
|
|
2875
2875
|
yLabels: ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"],
|
|
2876
|
-
xFormat: (
|
|
2877
|
-
const D =
|
|
2876
|
+
xFormat: (A) => {
|
|
2877
|
+
const D = A % 100;
|
|
2878
2878
|
return ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"][D - 1] || "";
|
|
2879
2879
|
},
|
|
2880
|
-
yFormat: (
|
|
2880
|
+
yFormat: (A) => ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"][A] || "",
|
|
2881
2881
|
cellWidth: 16,
|
|
2882
2882
|
cellHeight: 16,
|
|
2883
2883
|
hasHierarchicalLabels: !0,
|
|
2884
2884
|
// Add hierarchical labels like month view
|
|
2885
|
-
getYearFromX: (
|
|
2885
|
+
getYearFromX: (A) => Math.floor(A / 100)
|
|
2886
2886
|
// Helper to get year for grouping
|
|
2887
2887
|
};
|
|
2888
2888
|
case "day":
|
|
2889
2889
|
return {
|
|
2890
|
-
extractX: (
|
|
2891
|
-
const { year: D, week: M } = w(
|
|
2890
|
+
extractX: (A) => {
|
|
2891
|
+
const { year: D, week: M } = w(A);
|
|
2892
2892
|
return D * 100 + M;
|
|
2893
2893
|
},
|
|
2894
|
-
extractY: (
|
|
2894
|
+
extractY: (A) => A.getDay(),
|
|
2895
2895
|
// 0-6 (Sun-Sat)
|
|
2896
2896
|
xLabels: [],
|
|
2897
2897
|
// Will be determined from data
|
|
2898
2898
|
yLabels: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
2899
|
-
xFormat: (
|
|
2900
|
-
yFormat: (
|
|
2899
|
+
xFormat: (A) => `${A % 100}`,
|
|
2900
|
+
yFormat: (A) => ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][A] || "",
|
|
2901
2901
|
cellWidth: 16,
|
|
2902
2902
|
cellHeight: 16,
|
|
2903
2903
|
hasHierarchicalLabels: !0,
|
|
2904
2904
|
// Add hierarchical labels
|
|
2905
|
-
getYearFromX: (
|
|
2905
|
+
getYearFromX: (A) => Math.floor(A / 100)
|
|
2906
2906
|
// Helper to get year for grouping
|
|
2907
2907
|
};
|
|
2908
2908
|
default:
|
|
2909
2909
|
return null;
|
|
2910
2910
|
}
|
|
2911
2911
|
}, w = (F) => {
|
|
2912
|
-
const
|
|
2913
|
-
|
|
2914
|
-
const M =
|
|
2912
|
+
const A = new Date(Date.UTC(F.getFullYear(), F.getMonth(), F.getDate())), D = A.getUTCDay() || 7;
|
|
2913
|
+
A.setUTCDate(A.getUTCDate() + 4 - D);
|
|
2914
|
+
const M = A.getUTCFullYear(), _ = new Date(Date.UTC(M, 0, 1)), E = Math.ceil(((A.getTime() - _.getTime()) / 864e5 + 1) / 7);
|
|
2915
2915
|
return { year: M, week: E };
|
|
2916
2916
|
};
|
|
2917
2917
|
if (se(() => {
|
|
2918
|
-
if (!e || e.length === 0 || !i.current || !l || c.width === 0 || (
|
|
2918
|
+
if (!e || e.length === 0 || !i.current || !l || c.width === 0 || (Se(i.current).selectAll("*").remove(), !(t != null && t.dateField) || !(t != null && t.valueField)))
|
|
2919
2919
|
return;
|
|
2920
|
-
const F = Array.isArray(t.dateField) ? t.dateField[0] : t.dateField,
|
|
2921
|
-
if (!F || !
|
|
2920
|
+
const F = Array.isArray(t.dateField) ? t.dateField[0] : t.dateField, A = Array.isArray(t.valueField) ? t.valueField[0] : t.valueField;
|
|
2921
|
+
if (!F || !A)
|
|
2922
2922
|
return;
|
|
2923
2923
|
const M = (() => {
|
|
2924
2924
|
if (!(n != null && n.timeDimensions) || n.timeDimensions.length === 0)
|
|
@@ -2934,7 +2934,7 @@ function pN({
|
|
|
2934
2934
|
if (!_)
|
|
2935
2935
|
return;
|
|
2936
2936
|
const E = e.map((J) => {
|
|
2937
|
-
const ie = J[F], fe = typeof J[
|
|
2937
|
+
const ie = J[F], fe = typeof J[A] == "string" ? parseFloat(J[A]) : J[A] || 0;
|
|
2938
2938
|
let ge;
|
|
2939
2939
|
if (typeof ie == "string") {
|
|
2940
2940
|
let ue = ie;
|
|
@@ -2943,10 +2943,10 @@ function pN({
|
|
|
2943
2943
|
ge = new Date(ie);
|
|
2944
2944
|
if (isNaN(ge.getTime()))
|
|
2945
2945
|
return null;
|
|
2946
|
-
const oe = _.extractX(ge),
|
|
2946
|
+
const oe = _.extractX(ge), Ce = _.extractY(ge);
|
|
2947
2947
|
return {
|
|
2948
2948
|
x: oe,
|
|
2949
|
-
y:
|
|
2949
|
+
y: Ce,
|
|
2950
2950
|
value: fe,
|
|
2951
2951
|
date: ge,
|
|
2952
2952
|
label: J0(ie, M)
|
|
@@ -2967,30 +2967,30 @@ function pN({
|
|
|
2967
2967
|
}, L = c.width - O.left - O.right, z = c.height - O.top - O.bottom, U = { width: 16, height: 16 }, Q = 24, B = L / P, W = z / I, j = Math.min(B, W);
|
|
2968
2968
|
let G = Math.max(U.width, Math.min(Q, _.cellWidth * j)), K = Math.max(U.height, Math.min(Q, _.cellHeight * j));
|
|
2969
2969
|
M === "week" && G < U.width && (G = U.width);
|
|
2970
|
-
const
|
|
2970
|
+
const me = C.length * G + (C.length - 1) * 4, Ae = me > L ? me + O.left + O.right : c.width, ne = Se(i.current).attr("width", Ae).attr("height", c.height).append("g").attr("transform", `translate(${O.left},${O.top})`), ae = E.map((J) => J.value), X = Hu(ae) || 0, Z = _c(ae) || 1, pe = eg().domain([X, Z]).range((a == null ? void 0 : a.gradient) || wc), ke = /* @__PURE__ */ new Map();
|
|
2971
2971
|
E.forEach((J) => {
|
|
2972
2972
|
const ie = `${J.x}-${J.y}`;
|
|
2973
|
-
|
|
2973
|
+
ke.set(ie, J);
|
|
2974
2974
|
});
|
|
2975
|
-
const
|
|
2975
|
+
const De = Se("body").append("div").attr("class", "activity-grid-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), we = /* @__PURE__ */ new Map();
|
|
2976
2976
|
C.forEach((J, ie) => {
|
|
2977
|
-
|
|
2977
|
+
we.set(J, ie);
|
|
2978
2978
|
});
|
|
2979
2979
|
for (const J of C)
|
|
2980
2980
|
for (let ie = N; ie <= p; ie++) {
|
|
2981
|
-
const fe = `${J}-${ie}`, ge =
|
|
2982
|
-
h.showTooltip &&
|
|
2983
|
-
if (
|
|
2981
|
+
const fe = `${J}-${ie}`, ge = ke.get(fe), oe = we.get(J) || 0, Ce = ne.append("rect").attr("x", oe * (G + 4)).attr("y", (ie - N) * (K + 4)).attr("width", G).attr("height", K).attr("rx", 2).attr("ry", 2).style("fill", ge ? pe(ge.value) : "#ebedf0").style("stroke", "#fff").style("stroke-width", 1);
|
|
2982
|
+
h.showTooltip && Ce.style("cursor", "pointer").on("mouseover", function(ue) {
|
|
2983
|
+
if (Se(this).style("stroke", "#000").style("stroke-width", 2), ge) {
|
|
2984
2984
|
const Pe = [
|
|
2985
2985
|
`<strong>${ge.label}</strong>`,
|
|
2986
|
-
`${m(
|
|
2986
|
+
`${m(A)}: ${ge.value}`
|
|
2987
2987
|
].join("<br>");
|
|
2988
|
-
|
|
2988
|
+
De.html(Pe).style("left", ue.pageX + 10 + "px").style("top", ue.pageY - 10 + "px").transition().duration(200).style("opacity", 1);
|
|
2989
2989
|
}
|
|
2990
2990
|
}).on("mousemove", function(ue) {
|
|
2991
|
-
|
|
2991
|
+
De.style("left", ue.pageX + 10 + "px").style("top", ue.pageY - 10 + "px");
|
|
2992
2992
|
}).on("mouseout", function() {
|
|
2993
|
-
|
|
2993
|
+
Se(this).style("stroke", "#fff").style("stroke-width", 1), De.transition().duration(200).style("opacity", 0);
|
|
2994
2994
|
});
|
|
2995
2995
|
}
|
|
2996
2996
|
if (h.showLabels) {
|
|
@@ -3001,13 +3001,13 @@ function pN({
|
|
|
3001
3001
|
J.has(fe) || J.set(fe, []), J.get(fe).push(ie);
|
|
3002
3002
|
}
|
|
3003
3003
|
for (const ie of C) {
|
|
3004
|
-
const fe =
|
|
3004
|
+
const fe = we.get(ie) || 0;
|
|
3005
3005
|
ne.append("text").attr("x", fe * (G + 4) + G / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", "currentColor").text(_.xFormat(ie));
|
|
3006
3006
|
}
|
|
3007
3007
|
for (const [ie, fe] of J)
|
|
3008
3008
|
if (fe.length > 0) {
|
|
3009
|
-
const ge = Math.min(...fe.map((ue) =>
|
|
3010
|
-
ne.append("text").attr("x",
|
|
3009
|
+
const ge = Math.min(...fe.map((ue) => we.get(ue) || 0)), oe = Math.max(...fe.map((ue) => we.get(ue) || 0)), Ce = (ge + oe) / 2;
|
|
3010
|
+
ne.append("text").attr("x", Ce * (G + 4) + G / 2).attr("y", -25).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", "currentColor").text(`'${ie.toString().slice(-2)}`), fe.length > 1 && ne.append("line").attr("x1", ge * (G + 4)).attr("x2", oe * (G + 4) + G).attr("y1", -20).attr("y2", -20).style("stroke", "currentColor").style("stroke-width", 1).style("opacity", 0.3);
|
|
3011
3011
|
}
|
|
3012
3012
|
} else {
|
|
3013
3013
|
const J = Math.max(1, Math.floor(C.length / 10));
|
|
@@ -3020,7 +3020,7 @@ function pN({
|
|
|
3020
3020
|
ne.append("text").attr("x", -8).attr("y", (J - N) * (K + 4) + K / 2).attr("text-anchor", "end").attr("dy", ".35em").style("font-size", "10px").style("fill", "currentColor").text(_.yFormat(J));
|
|
3021
3021
|
}
|
|
3022
3022
|
return () => {
|
|
3023
|
-
|
|
3023
|
+
De.remove();
|
|
3024
3024
|
};
|
|
3025
3025
|
}, [e, t, r, n, c, l, h.showTooltip, h.showLabels, a]), !e || e.length === 0)
|
|
3026
3026
|
return /* @__PURE__ */ d("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ x("div", { className: "text-center", children: [
|
|
@@ -3032,7 +3032,7 @@ function pN({
|
|
|
3032
3032
|
/* @__PURE__ */ d("div", { className: "text-sm font-semibold mb-1", children: "Configuration Required" }),
|
|
3033
3033
|
/* @__PURE__ */ d("div", { className: "text-xs", children: "Activity grid requires a time dimension and a measure" })
|
|
3034
3034
|
] }) });
|
|
3035
|
-
const S = Array.isArray(t.dateField) ? t.dateField[0] : t.dateField, $ = ((q = (
|
|
3035
|
+
const S = Array.isArray(t.dateField) ? t.dateField[0] : t.dateField, $ = ((q = (T = n == null ? void 0 : n.timeDimensions) == null ? void 0 : T.find(
|
|
3036
3036
|
(F) => F.dimension === S || F.dimension.includes(S)
|
|
3037
3037
|
)) == null ? void 0 : q.granularity) || "day";
|
|
3038
3038
|
return ($ == null ? void 0 : $.toLowerCase()) === "year" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center w-full text-amber-600", style: { height: s }, children: /* @__PURE__ */ x("div", { className: "text-center", children: [
|
|
@@ -3278,7 +3278,7 @@ function gN({
|
|
|
3278
3278
|
const p = r.decimals ?? 0, N = r.prefix ?? "";
|
|
3279
3279
|
let k;
|
|
3280
3280
|
return Math.abs(E) >= 1e9 ? k = (E / 1e9).toFixed(p) + "B" : Math.abs(E) >= 1e6 ? k = (E / 1e6).toFixed(p) + "M" : Math.abs(E) >= 1e3 ? k = (E / 1e3).toFixed(p) + "K" : k = E.toFixed(p), N + k;
|
|
3281
|
-
}, $ = y.length === 1 ? y[0] : v,
|
|
3281
|
+
}, $ = y.length === 1 ? y[0] : v, T = y.length > 1, F = (() => {
|
|
3282
3282
|
var E;
|
|
3283
3283
|
if (r.valueColorIndex !== void 0 && (s != null && s.colors)) {
|
|
3284
3284
|
const p = r.valueColorIndex;
|
|
@@ -3286,7 +3286,7 @@ function gN({
|
|
|
3286
3286
|
return s.colors[p];
|
|
3287
3287
|
}
|
|
3288
3288
|
return ((E = s == null ? void 0 : s.colors) == null ? void 0 : E[0]) || "#1f2937";
|
|
3289
|
-
})(),
|
|
3289
|
+
})(), A = mx((r == null ? void 0 : r.target) || ""), D = A.length > 0 ? A[0] : null, M = D !== null ? gx($, D) : null, _ = () => {
|
|
3290
3290
|
var E, p;
|
|
3291
3291
|
if (M === null) return "#6B7280";
|
|
3292
3292
|
if (M >= 0) {
|
|
@@ -3375,7 +3375,7 @@ function gN({
|
|
|
3375
3375
|
children: r.suffix
|
|
3376
3376
|
}
|
|
3377
3377
|
),
|
|
3378
|
-
|
|
3378
|
+
T && /* @__PURE__ */ d("div", { className: "mt-4", children: /* @__PURE__ */ d(
|
|
3379
3379
|
Cg,
|
|
3380
3380
|
{
|
|
3381
3381
|
values: y,
|
|
@@ -3583,7 +3583,7 @@ function bN({
|
|
|
3583
3583
|
] })
|
|
3584
3584
|
}
|
|
3585
3585
|
);
|
|
3586
|
-
const w = v[v.length - 1], R = v[v.length - 2], S = w - R, $ = R !== 0 ? S / Math.abs(R) * 100 : 0,
|
|
3586
|
+
const w = v[v.length - 1], R = v[v.length - 2], S = w - R, $ = R !== 0 ? S / Math.abs(R) * 100 : 0, T = S >= 0, q = (E) => {
|
|
3587
3587
|
const p = r.decimals ?? 0, N = r.prefix ?? "";
|
|
3588
3588
|
let k;
|
|
3589
3589
|
return Math.abs(E) >= 1e9 ? k = (E / 1e9).toFixed(p) + "B" : Math.abs(E) >= 1e6 ? k = (E / 1e6).toFixed(p) + "M" : Math.abs(E) >= 1e3 ? k = (E / 1e3).toFixed(p) + "K" : k = E.toFixed(p), N + k;
|
|
@@ -3594,14 +3594,14 @@ function bN({
|
|
|
3594
3594
|
return s.colors[E];
|
|
3595
3595
|
}
|
|
3596
3596
|
return "#10b981";
|
|
3597
|
-
},
|
|
3597
|
+
}, A = () => {
|
|
3598
3598
|
if (r.negativeColorIndex !== void 0 && (s != null && s.colors)) {
|
|
3599
3599
|
const E = r.negativeColorIndex;
|
|
3600
3600
|
if (E >= 0 && E < s.colors.length)
|
|
3601
3601
|
return s.colors[E];
|
|
3602
3602
|
}
|
|
3603
3603
|
return "#ef4444";
|
|
3604
|
-
}, D = F(), M =
|
|
3604
|
+
}, D = F(), M = A(), _ = T ? D : M;
|
|
3605
3605
|
return /* @__PURE__ */ x(
|
|
3606
3606
|
"div",
|
|
3607
3607
|
{
|
|
@@ -3650,7 +3650,7 @@ function bN({
|
|
|
3650
3650
|
fontSize: `${a * 0.6}px`
|
|
3651
3651
|
// Larger arrow
|
|
3652
3652
|
},
|
|
3653
|
-
children:
|
|
3653
|
+
children: T ? "▲" : "▼"
|
|
3654
3654
|
}
|
|
3655
3655
|
),
|
|
3656
3656
|
/* @__PURE__ */ x("div", { className: "text-left", children: [
|
|
@@ -3664,7 +3664,7 @@ function bN({
|
|
|
3664
3664
|
color: _
|
|
3665
3665
|
},
|
|
3666
3666
|
children: [
|
|
3667
|
-
|
|
3667
|
+
T ? "+" : "",
|
|
3668
3668
|
q(S)
|
|
3669
3669
|
]
|
|
3670
3670
|
}
|
|
@@ -3680,7 +3680,7 @@ function bN({
|
|
|
3680
3680
|
opacity: 0.8
|
|
3681
3681
|
},
|
|
3682
3682
|
children: [
|
|
3683
|
-
|
|
3683
|
+
T ? "+" : "",
|
|
3684
3684
|
$.toFixed(1),
|
|
3685
3685
|
"%"
|
|
3686
3686
|
]
|
|
@@ -3818,7 +3818,7 @@ function vN({
|
|
|
3818
3818
|
} catch {
|
|
3819
3819
|
return String(M);
|
|
3820
3820
|
}
|
|
3821
|
-
},
|
|
3821
|
+
}, T = r.template || "${fieldLabel}: ${value}", q = $(T, b), A = (() => {
|
|
3822
3822
|
var D;
|
|
3823
3823
|
if (r.valueColorIndex !== void 0 && (s != null && s.colors)) {
|
|
3824
3824
|
const M = r.valueColorIndex;
|
|
@@ -3844,7 +3844,7 @@ function vN({
|
|
|
3844
3844
|
className: "font-bold leading-tight text-center",
|
|
3845
3845
|
style: {
|
|
3846
3846
|
fontSize: `${a}px`,
|
|
3847
|
-
color:
|
|
3847
|
+
color: A
|
|
3848
3848
|
},
|
|
3849
3849
|
children: q
|
|
3850
3850
|
}
|
|
@@ -3855,7 +3855,7 @@ function vN({
|
|
|
3855
3855
|
values: g,
|
|
3856
3856
|
min: v,
|
|
3857
3857
|
max: w,
|
|
3858
|
-
color:
|
|
3858
|
+
color: A,
|
|
3859
3859
|
formatValue: S,
|
|
3860
3860
|
height: 24,
|
|
3861
3861
|
width: o || 200
|
|
@@ -3888,12 +3888,12 @@ function xN({
|
|
|
3888
3888
|
R && (w.push(R), R = null), w.push({ type: "break" });
|
|
3889
3889
|
continue;
|
|
3890
3890
|
}
|
|
3891
|
-
const
|
|
3892
|
-
if (
|
|
3891
|
+
const T = $.match(/^(#{1,3})\s+(.*)$/);
|
|
3892
|
+
if (T) {
|
|
3893
3893
|
R && (w.push(R), R = null), w.push({
|
|
3894
3894
|
type: "header",
|
|
3895
|
-
level:
|
|
3896
|
-
content:
|
|
3895
|
+
level: T[1].length,
|
|
3896
|
+
content: T[2]
|
|
3897
3897
|
});
|
|
3898
3898
|
continue;
|
|
3899
3899
|
}
|
|
@@ -3927,11 +3927,11 @@ function xN({
|
|
|
3927
3927
|
for (; w; ) {
|
|
3928
3928
|
const R = w.match(/^(.*?)\[([^\]]+)\]\(([^)]+)\)(.*)$/);
|
|
3929
3929
|
if (R) {
|
|
3930
|
-
const [, S, $,
|
|
3930
|
+
const [, S, $, T, q] = R;
|
|
3931
3931
|
S && v.push(...h(S)), v.push({
|
|
3932
3932
|
type: "link",
|
|
3933
3933
|
content: $,
|
|
3934
|
-
url:
|
|
3934
|
+
url: T
|
|
3935
3935
|
}), w = q;
|
|
3936
3936
|
continue;
|
|
3937
3937
|
}
|
|
@@ -3945,14 +3945,14 @@ function xN({
|
|
|
3945
3945
|
for (; w; ) {
|
|
3946
3946
|
const R = w.match(/^(.*?)\*\*([^*]+)\*\*(.*)$/);
|
|
3947
3947
|
if (R) {
|
|
3948
|
-
const [, $,
|
|
3949
|
-
$ && v.push({ type: "text", content: $ }), v.push({ type: "bold", content:
|
|
3948
|
+
const [, $, T, q] = R;
|
|
3949
|
+
$ && v.push({ type: "text", content: $ }), v.push({ type: "bold", content: T }), w = q;
|
|
3950
3950
|
continue;
|
|
3951
3951
|
}
|
|
3952
3952
|
const S = w.match(/^(.*?)\*([^*]+)\*(.*)$/);
|
|
3953
3953
|
if (S) {
|
|
3954
|
-
const [, $,
|
|
3955
|
-
$ && v.push({ type: "text", content: $ }), v.push({ type: "italic", content:
|
|
3954
|
+
const [, $, T, q] = S;
|
|
3955
|
+
$ && v.push({ type: "text", content: $ }), v.push({ type: "italic", content: T }), w = q;
|
|
3956
3956
|
continue;
|
|
3957
3957
|
}
|
|
3958
3958
|
v.push({ type: "text", content: w });
|
|
@@ -3982,17 +3982,17 @@ function xN({
|
|
|
3982
3982
|
v
|
|
3983
3983
|
);
|
|
3984
3984
|
case "header":
|
|
3985
|
-
const $ = (
|
|
3985
|
+
const $ = (A, D) => {
|
|
3986
3986
|
const M = "font-bold", _ = {
|
|
3987
3987
|
1: "mb-4",
|
|
3988
3988
|
2: "mb-3",
|
|
3989
3989
|
3: "mb-2"
|
|
3990
3990
|
};
|
|
3991
3991
|
let E = "";
|
|
3992
|
-
return D === "small" ? E = { 1: "text-lg", 2: "text-base", 3: "text-sm" }[
|
|
3993
|
-
},
|
|
3992
|
+
return D === "small" ? E = { 1: "text-lg", 2: "text-base", 3: "text-sm" }[A] || "text-sm" : D === "large" ? E = { 1: "text-5xl", 2: "text-4xl", 3: "text-3xl" }[A] || "text-3xl" : E = { 1: "text-3xl", 2: "text-2xl", 3: "text-xl" }[A] || "text-xl", `${M} ${E} ${_[A]}`;
|
|
3993
|
+
}, T = `h${b.level}`;
|
|
3994
3994
|
return /* @__PURE__ */ d(
|
|
3995
|
-
|
|
3995
|
+
T,
|
|
3996
3996
|
{
|
|
3997
3997
|
className: $(b.level, a),
|
|
3998
3998
|
style: { color: c },
|
|
@@ -4001,20 +4001,20 @@ function xN({
|
|
|
4001
4001
|
v
|
|
4002
4002
|
);
|
|
4003
4003
|
case "paragraph":
|
|
4004
|
-
return /* @__PURE__ */ d("p", { className: "mb-3 leading-relaxed", children: (R = b.children) == null ? void 0 : R.map((
|
|
4004
|
+
return /* @__PURE__ */ d("p", { className: "mb-3 leading-relaxed", children: (R = b.children) == null ? void 0 : R.map((A, D) => g(A, D)) }, v);
|
|
4005
4005
|
case "list":
|
|
4006
4006
|
const q = b.ordered ? "ol" : "ul";
|
|
4007
4007
|
let F = "mb-3";
|
|
4008
|
-
return i === "center" ? F += " list-none flex flex-col items-center" : i === "right" ? F += " list-none ml-auto max-w-max" : F += " list-none ml-6", /* @__PURE__ */ d(q, { className: F, children: (S = b.children) == null ? void 0 : S.map((
|
|
4008
|
+
return i === "center" ? F += " list-none flex flex-col items-center" : i === "right" ? F += " list-none ml-auto max-w-max" : F += " list-none ml-6", /* @__PURE__ */ d(q, { className: F, children: (S = b.children) == null ? void 0 : S.map((A, D) => g(A, D, b.ordered ? D + 1 : void 0)) }, v);
|
|
4009
4009
|
case "listItem":
|
|
4010
4010
|
if (b.children) {
|
|
4011
4011
|
if (b.parentOrdered && w !== void 0) {
|
|
4012
|
-
const
|
|
4012
|
+
const A = u[a];
|
|
4013
4013
|
return i === "center" ? /* @__PURE__ */ x("li", { className: "mb-1 flex items-center justify-center", children: [
|
|
4014
4014
|
/* @__PURE__ */ x(
|
|
4015
4015
|
"span",
|
|
4016
4016
|
{
|
|
4017
|
-
className: `inline-block mr-2 flex-shrink-0 ${
|
|
4017
|
+
className: `inline-block mr-2 flex-shrink-0 ${A} font-medium`,
|
|
4018
4018
|
style: { color: c },
|
|
4019
4019
|
children: [
|
|
4020
4020
|
w,
|
|
@@ -4028,7 +4028,7 @@ function xN({
|
|
|
4028
4028
|
/* @__PURE__ */ x(
|
|
4029
4029
|
"span",
|
|
4030
4030
|
{
|
|
4031
|
-
className: `inline-block ml-2 flex-shrink-0 ${
|
|
4031
|
+
className: `inline-block ml-2 flex-shrink-0 ${A} font-medium`,
|
|
4032
4032
|
style: { color: c },
|
|
4033
4033
|
children: [
|
|
4034
4034
|
w,
|
|
@@ -4040,7 +4040,7 @@ function xN({
|
|
|
4040
4040
|
/* @__PURE__ */ x(
|
|
4041
4041
|
"span",
|
|
4042
4042
|
{
|
|
4043
|
-
className: `inline-block mr-3 flex-shrink-0 ${
|
|
4043
|
+
className: `inline-block mr-3 flex-shrink-0 ${A} font-medium`,
|
|
4044
4044
|
style: { color: c },
|
|
4045
4045
|
children: [
|
|
4046
4046
|
w,
|
|
@@ -4059,9 +4059,9 @@ function xN({
|
|
|
4059
4059
|
style: { backgroundColor: c }
|
|
4060
4060
|
}
|
|
4061
4061
|
),
|
|
4062
|
-
/* @__PURE__ */ d("span", { className: "text-center", children: b.children.map((
|
|
4062
|
+
/* @__PURE__ */ d("span", { className: "text-center", children: b.children.map((A, D) => g(A, D)) })
|
|
4063
4063
|
] }, v) : i === "right" ? /* @__PURE__ */ x("li", { className: "mb-1 flex items-start justify-end", children: [
|
|
4064
|
-
/* @__PURE__ */ d("span", { className: "text-right", children: b.children.map((
|
|
4064
|
+
/* @__PURE__ */ d("span", { className: "text-right", children: b.children.map((A, D) => g(A, D)) }),
|
|
4065
4065
|
/* @__PURE__ */ d(
|
|
4066
4066
|
"span",
|
|
4067
4067
|
{
|
|
@@ -4077,7 +4077,7 @@ function xN({
|
|
|
4077
4077
|
style: { backgroundColor: c }
|
|
4078
4078
|
}
|
|
4079
4079
|
),
|
|
4080
|
-
/* @__PURE__ */ d("span", { className: "flex-1", children: b.children.map((
|
|
4080
|
+
/* @__PURE__ */ d("span", { className: "flex-1", children: b.children.map((A, D) => g(A, D)) })
|
|
4081
4081
|
] }, v);
|
|
4082
4082
|
}
|
|
4083
4083
|
return null;
|
|
@@ -4129,10 +4129,10 @@ const Kc = kn(({
|
|
|
4129
4129
|
se(() => {
|
|
4130
4130
|
f.current = o;
|
|
4131
4131
|
}, [o]);
|
|
4132
|
-
const m =
|
|
4132
|
+
const m = Te(
|
|
4133
4133
|
() => Bc(t, Ir),
|
|
4134
4134
|
[t]
|
|
4135
|
-
), h = m.skipQuery === !0, g =
|
|
4135
|
+
), h = m.skipQuery === !0, g = Te(() => {
|
|
4136
4136
|
if (h)
|
|
4137
4137
|
return null;
|
|
4138
4138
|
try {
|
|
@@ -4140,8 +4140,8 @@ const Kc = kn(({
|
|
|
4140
4140
|
...JSON.parse(e),
|
|
4141
4141
|
__refresh_counter: u
|
|
4142
4142
|
};
|
|
4143
|
-
} catch (
|
|
4144
|
-
return console.error("AnalyticsPortlet: Invalid query JSON:",
|
|
4143
|
+
} catch (T) {
|
|
4144
|
+
return console.error("AnalyticsPortlet: Invalid query JSON:", T), null;
|
|
4145
4145
|
}
|
|
4146
4146
|
}, [e, u, h]), { resultSet: y, isLoading: b, error: v } = Ov(g, {
|
|
4147
4147
|
skip: !g || h,
|
|
@@ -4149,7 +4149,7 @@ const Kc = kn(({
|
|
|
4149
4149
|
});
|
|
4150
4150
|
K0(c, () => ({
|
|
4151
4151
|
refresh: () => {
|
|
4152
|
-
l((
|
|
4152
|
+
l((T) => T + 1);
|
|
4153
4153
|
}
|
|
4154
4154
|
}), []), se(() => {
|
|
4155
4155
|
if (f.current && r && g && y && !v) {
|
|
@@ -4171,7 +4171,7 @@ const Kc = kn(({
|
|
|
4171
4171
|
});
|
|
4172
4172
|
}
|
|
4173
4173
|
}, [r, n, g, y, t, v]);
|
|
4174
|
-
const w = !h && m.dropZones.some((
|
|
4174
|
+
const w = !h && m.dropZones.some((T) => T.mandatory === !0);
|
|
4175
4175
|
if (!r && w)
|
|
4176
4176
|
return /* @__PURE__ */ d("div", { className: "flex items-center justify-center w-full text-red-500", style: { height: s }, children: /* @__PURE__ */ x("div", { className: "text-center", children: [
|
|
4177
4177
|
/* @__PURE__ */ d("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
|
|
@@ -4187,7 +4187,7 @@ const Kc = kn(({
|
|
|
4187
4187
|
/* @__PURE__ */ d(
|
|
4188
4188
|
"button",
|
|
4189
4189
|
{
|
|
4190
|
-
onClick: () => l((
|
|
4190
|
+
onClick: () => l((T) => T + 1),
|
|
4191
4191
|
className: "px-2 py-1 bg-blue-500 text-white rounded text-xs hover:bg-blue-600",
|
|
4192
4192
|
children: "Retry"
|
|
4193
4193
|
}
|
|
@@ -4241,7 +4241,7 @@ const Kc = kn(({
|
|
|
4241
4241
|
cubeQuery: e,
|
|
4242
4242
|
children: /* @__PURE__ */ d("div", { className: "w-full h-full flex flex-col flex-1", style: { minHeight: "200px" }, children: (() => {
|
|
4243
4243
|
try {
|
|
4244
|
-
const
|
|
4244
|
+
const T = s;
|
|
4245
4245
|
switch (t) {
|
|
4246
4246
|
case "bar":
|
|
4247
4247
|
return /* @__PURE__ */ d(
|
|
@@ -4251,7 +4251,7 @@ const Kc = kn(({
|
|
|
4251
4251
|
chartConfig: r,
|
|
4252
4252
|
displayConfig: n,
|
|
4253
4253
|
queryObject: g,
|
|
4254
|
-
height:
|
|
4254
|
+
height: T,
|
|
4255
4255
|
colorPalette: i
|
|
4256
4256
|
}
|
|
4257
4257
|
);
|
|
@@ -4263,7 +4263,7 @@ const Kc = kn(({
|
|
|
4263
4263
|
chartConfig: r,
|
|
4264
4264
|
displayConfig: n,
|
|
4265
4265
|
queryObject: g,
|
|
4266
|
-
height:
|
|
4266
|
+
height: T,
|
|
4267
4267
|
colorPalette: i
|
|
4268
4268
|
}
|
|
4269
4269
|
);
|
|
@@ -4275,7 +4275,7 @@ const Kc = kn(({
|
|
|
4275
4275
|
chartConfig: r,
|
|
4276
4276
|
displayConfig: n,
|
|
4277
4277
|
queryObject: g,
|
|
4278
|
-
height:
|
|
4278
|
+
height: T,
|
|
4279
4279
|
colorPalette: i
|
|
4280
4280
|
}
|
|
4281
4281
|
);
|
|
@@ -4287,7 +4287,7 @@ const Kc = kn(({
|
|
|
4287
4287
|
chartConfig: r,
|
|
4288
4288
|
displayConfig: n,
|
|
4289
4289
|
queryObject: g,
|
|
4290
|
-
height:
|
|
4290
|
+
height: T,
|
|
4291
4291
|
colorPalette: i
|
|
4292
4292
|
}
|
|
4293
4293
|
);
|
|
@@ -4299,7 +4299,7 @@ const Kc = kn(({
|
|
|
4299
4299
|
chartConfig: r,
|
|
4300
4300
|
displayConfig: n,
|
|
4301
4301
|
queryObject: g,
|
|
4302
|
-
height:
|
|
4302
|
+
height: T,
|
|
4303
4303
|
colorPalette: i
|
|
4304
4304
|
}
|
|
4305
4305
|
);
|
|
@@ -4311,7 +4311,7 @@ const Kc = kn(({
|
|
|
4311
4311
|
chartConfig: r,
|
|
4312
4312
|
displayConfig: n,
|
|
4313
4313
|
queryObject: g,
|
|
4314
|
-
height:
|
|
4314
|
+
height: T,
|
|
4315
4315
|
colorPalette: i
|
|
4316
4316
|
}
|
|
4317
4317
|
);
|
|
@@ -4323,7 +4323,7 @@ const Kc = kn(({
|
|
|
4323
4323
|
chartConfig: r,
|
|
4324
4324
|
displayConfig: n,
|
|
4325
4325
|
queryObject: g,
|
|
4326
|
-
height:
|
|
4326
|
+
height: T,
|
|
4327
4327
|
colorPalette: i
|
|
4328
4328
|
}
|
|
4329
4329
|
);
|
|
@@ -4335,7 +4335,7 @@ const Kc = kn(({
|
|
|
4335
4335
|
chartConfig: r,
|
|
4336
4336
|
displayConfig: n,
|
|
4337
4337
|
queryObject: g,
|
|
4338
|
-
height:
|
|
4338
|
+
height: T,
|
|
4339
4339
|
colorPalette: i
|
|
4340
4340
|
}
|
|
4341
4341
|
);
|
|
@@ -4347,7 +4347,7 @@ const Kc = kn(({
|
|
|
4347
4347
|
chartConfig: r,
|
|
4348
4348
|
displayConfig: n,
|
|
4349
4349
|
queryObject: g,
|
|
4350
|
-
height:
|
|
4350
|
+
height: T,
|
|
4351
4351
|
colorPalette: i
|
|
4352
4352
|
}
|
|
4353
4353
|
);
|
|
@@ -4359,7 +4359,7 @@ const Kc = kn(({
|
|
|
4359
4359
|
chartConfig: r,
|
|
4360
4360
|
displayConfig: n,
|
|
4361
4361
|
queryObject: g,
|
|
4362
|
-
height:
|
|
4362
|
+
height: T,
|
|
4363
4363
|
colorPalette: i
|
|
4364
4364
|
}
|
|
4365
4365
|
);
|
|
@@ -4371,7 +4371,7 @@ const Kc = kn(({
|
|
|
4371
4371
|
chartConfig: r,
|
|
4372
4372
|
displayConfig: n,
|
|
4373
4373
|
queryObject: g,
|
|
4374
|
-
height:
|
|
4374
|
+
height: T,
|
|
4375
4375
|
colorPalette: i
|
|
4376
4376
|
},
|
|
4377
4377
|
`activityGrid-${(i == null ? void 0 : i.name) || "default"}`
|
|
@@ -4384,7 +4384,7 @@ const Kc = kn(({
|
|
|
4384
4384
|
chartConfig: r,
|
|
4385
4385
|
displayConfig: n,
|
|
4386
4386
|
queryObject: g,
|
|
4387
|
-
height:
|
|
4387
|
+
height: T,
|
|
4388
4388
|
colorPalette: i
|
|
4389
4389
|
}
|
|
4390
4390
|
);
|
|
@@ -4396,7 +4396,7 @@ const Kc = kn(({
|
|
|
4396
4396
|
chartConfig: r,
|
|
4397
4397
|
displayConfig: n,
|
|
4398
4398
|
queryObject: g,
|
|
4399
|
-
height:
|
|
4399
|
+
height: T,
|
|
4400
4400
|
colorPalette: i
|
|
4401
4401
|
}
|
|
4402
4402
|
);
|
|
@@ -4408,7 +4408,7 @@ const Kc = kn(({
|
|
|
4408
4408
|
chartConfig: r,
|
|
4409
4409
|
displayConfig: n,
|
|
4410
4410
|
queryObject: g,
|
|
4411
|
-
height:
|
|
4411
|
+
height: T,
|
|
4412
4412
|
colorPalette: i
|
|
4413
4413
|
}
|
|
4414
4414
|
);
|
|
@@ -4420,7 +4420,7 @@ const Kc = kn(({
|
|
|
4420
4420
|
chartConfig: r,
|
|
4421
4421
|
displayConfig: n,
|
|
4422
4422
|
queryObject: g,
|
|
4423
|
-
height:
|
|
4423
|
+
height: T,
|
|
4424
4424
|
colorPalette: i
|
|
4425
4425
|
}
|
|
4426
4426
|
);
|
|
@@ -4430,10 +4430,10 @@ const Kc = kn(({
|
|
|
4430
4430
|
/* @__PURE__ */ d("div", { className: "text-xs", children: t })
|
|
4431
4431
|
] }) });
|
|
4432
4432
|
}
|
|
4433
|
-
} catch (
|
|
4434
|
-
return console.error("Chart rendering error:",
|
|
4433
|
+
} catch (T) {
|
|
4434
|
+
return console.error("Chart rendering error:", T), /* @__PURE__ */ d("div", { className: "flex items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ x("div", { className: "text-center", children: [
|
|
4435
4435
|
/* @__PURE__ */ d("div", { className: "text-sm font-semibold mb-1", children: "Error rendering chart" }),
|
|
4436
|
-
/* @__PURE__ */ d("div", { className: "text-xs", children:
|
|
4436
|
+
/* @__PURE__ */ d("div", { className: "text-xs", children: T instanceof Error ? T.message : "Unknown error" })
|
|
4437
4437
|
] }) });
|
|
4438
4438
|
}
|
|
4439
4439
|
})() })
|
|
@@ -4672,18 +4672,18 @@ function NN() {
|
|
|
4672
4672
|
} else y = g.current;
|
|
4673
4673
|
g = o(
|
|
4674
4674
|
function() {
|
|
4675
|
-
function v(
|
|
4675
|
+
function v(T) {
|
|
4676
4676
|
if (!w) {
|
|
4677
|
-
if (w = !0, R =
|
|
4677
|
+
if (w = !0, R = T, T = m(T), h !== void 0 && y.hasValue) {
|
|
4678
4678
|
var q = y.value;
|
|
4679
|
-
if (h(q,
|
|
4679
|
+
if (h(q, T))
|
|
4680
4680
|
return S = q;
|
|
4681
4681
|
}
|
|
4682
|
-
return S =
|
|
4682
|
+
return S = T;
|
|
4683
4683
|
}
|
|
4684
|
-
if (q = S, n(R,
|
|
4685
|
-
var F = m(
|
|
4686
|
-
return h !== void 0 && h(q, F) ? (R =
|
|
4684
|
+
if (q = S, n(R, T)) return q;
|
|
4685
|
+
var F = m(T);
|
|
4686
|
+
return h !== void 0 && h(q, F) ? (R = T, q) : (R = T, S = F);
|
|
4687
4687
|
}
|
|
4688
4688
|
var w = !1, R, S, $ = f === void 0 ? null : f;
|
|
4689
4689
|
return [
|
|
@@ -4732,19 +4732,19 @@ function SN() {
|
|
|
4732
4732
|
} else y = g.current;
|
|
4733
4733
|
g = o(
|
|
4734
4734
|
function() {
|
|
4735
|
-
function v(
|
|
4735
|
+
function v(T) {
|
|
4736
4736
|
if (!w) {
|
|
4737
|
-
if (w = !0, R =
|
|
4737
|
+
if (w = !0, R = T, T = m(T), h !== void 0 && y.hasValue) {
|
|
4738
4738
|
var q = y.value;
|
|
4739
|
-
if (h(q,
|
|
4739
|
+
if (h(q, T))
|
|
4740
4740
|
return S = q;
|
|
4741
4741
|
}
|
|
4742
|
-
return S =
|
|
4742
|
+
return S = T;
|
|
4743
4743
|
}
|
|
4744
|
-
if (q = S, n(R,
|
|
4744
|
+
if (q = S, n(R, T))
|
|
4745
4745
|
return q;
|
|
4746
|
-
var F = m(
|
|
4747
|
-
return h !== void 0 && h(q, F) ? (R =
|
|
4746
|
+
var F = m(T);
|
|
4747
|
+
return h !== void 0 && h(q, F) ? (R = T, q) : (R = T, S = F);
|
|
4748
4748
|
}
|
|
4749
4749
|
var w = !1, R, S, $ = f === void 0 ? null : f;
|
|
4750
4750
|
return [
|
|
@@ -4799,7 +4799,7 @@ const cd = (e, t) => {
|
|
|
4799
4799
|
const r = kN(e), n = (s, a = t) => Ig(r, s, a);
|
|
4800
4800
|
return Object.assign(n, r), n;
|
|
4801
4801
|
}, IN = (e, t) => e ? cd(e, t) : cd;
|
|
4802
|
-
function
|
|
4802
|
+
function Me(e, t) {
|
|
4803
4803
|
if (Object.is(e, t))
|
|
4804
4804
|
return !0;
|
|
4805
4805
|
if (typeof e != "object" || e === null || typeof t != "object" || t === null)
|
|
@@ -4846,11 +4846,11 @@ function ye(e, t) {
|
|
|
4846
4846
|
throw new Error(Dg);
|
|
4847
4847
|
return Ig(r, e, t);
|
|
4848
4848
|
}
|
|
4849
|
-
const
|
|
4849
|
+
const Ie = () => {
|
|
4850
4850
|
const e = Cn(On);
|
|
4851
4851
|
if (e === null)
|
|
4852
4852
|
throw new Error(Dg);
|
|
4853
|
-
return
|
|
4853
|
+
return Te(() => ({
|
|
4854
4854
|
getState: e.getState,
|
|
4855
4855
|
setState: e.setState,
|
|
4856
4856
|
subscribe: e.subscribe,
|
|
@@ -4888,7 +4888,7 @@ const LN = ({ x: e, y: t, label: r, labelStyle: n = {}, labelShowBg: s = !0, lab
|
|
|
4888
4888
|
c
|
|
4889
4889
|
);
|
|
4890
4890
|
};
|
|
4891
|
-
var $N =
|
|
4891
|
+
var $N = xe(LN);
|
|
4892
4892
|
const Xc = (e) => ({
|
|
4893
4893
|
width: e.offsetWidth,
|
|
4894
4894
|
height: e.offsetHeight
|
|
@@ -4923,7 +4923,7 @@ const Xc = (e) => ({
|
|
|
4923
4923
|
}), FN = (e, t) => $g(Lg(Or(e), Or(t))), Mc = (e, t) => {
|
|
4924
4924
|
const r = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), n = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));
|
|
4925
4925
|
return Math.ceil(r * n);
|
|
4926
|
-
}, PN = (e) => je(e.width) && je(e.height) && je(e.x) && je(e.y), je = (e) => !isNaN(e) && isFinite(e),
|
|
4926
|
+
}, PN = (e) => je(e.width) && je(e.height) && je(e.x) && je(e.y), je = (e) => !isNaN(e) && isFinite(e), Ee = Symbol.for("internals"), Fg = ["Enter", " ", "Escape"], Pg = (e, t) => {
|
|
4927
4927
|
process.env.NODE_ENV === "development" && console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`);
|
|
4928
4928
|
}, zN = (e) => "nativeEvent" in e;
|
|
4929
4929
|
function Ic(e) {
|
|
@@ -5021,7 +5021,7 @@ function Hg({ sourceX: e, sourceY: t, sourcePosition: r = ee.Bottom, targetX: n,
|
|
|
5021
5021
|
h
|
|
5022
5022
|
];
|
|
5023
5023
|
}
|
|
5024
|
-
const Jc =
|
|
5024
|
+
const Jc = xe(({ sourceX: e, sourceY: t, targetX: r, targetY: n, sourcePosition: s = ee.Bottom, targetPosition: a = ee.Top, label: i, labelStyle: o, labelShowBg: c, labelBgStyle: u, labelBgPadding: l, labelBgBorderRadius: f, style: m, markerEnd: h, markerStart: g, interactionWidth: y }) => {
|
|
5025
5025
|
const [b, v, w] = Hg({
|
|
5026
5026
|
sourceX: e,
|
|
5027
5027
|
sourceY: t,
|
|
@@ -5075,8 +5075,8 @@ function BN({ source: e, sourcePosition: t = ee.Bottom, target: r, targetPositio
|
|
|
5075
5075
|
const E = f === "x" ? "y" : "x", p = i[f] === o[E], N = c[E] > u[E], k = c[E] < u[E];
|
|
5076
5076
|
(i[f] === 1 && (!p && N || p && k) || i[f] !== 1 && (!p && k || p && N)) && (h = f === "x" ? q : F);
|
|
5077
5077
|
}
|
|
5078
|
-
const
|
|
5079
|
-
M >= _ ? (g = (
|
|
5078
|
+
const A = { x: c.x + b.x, y: c.y + b.y }, D = { x: u.x + v.x, y: u.y + v.y }, M = Math.max(Math.abs(A.x - h[0].x), Math.abs(D.x - h[0].x)), _ = Math.max(Math.abs(A.y - h[0].y), Math.abs(D.y - h[0].y));
|
|
5079
|
+
M >= _ ? (g = (A.x + D.x) / 2, y = h[0].y) : (g = h[0].x, y = (A.y + D.y) / 2);
|
|
5080
5080
|
}
|
|
5081
5081
|
return [[
|
|
5082
5082
|
e,
|
|
@@ -5111,7 +5111,7 @@ function Dc({ sourceX: e, sourceY: t, sourcePosition: r = ee.Bottom, targetX: n,
|
|
|
5111
5111
|
return w > 0 && w < l.length - 1 ? R = HN(l[w - 1], v, l[w + 1], i) : R = `${w === 0 ? "M" : "L"}${v.x} ${v.y}`, b += R, b;
|
|
5112
5112
|
}, ""), f, m, h, g];
|
|
5113
5113
|
}
|
|
5114
|
-
const Ln =
|
|
5114
|
+
const Ln = xe(({ sourceX: e, sourceY: t, targetX: r, targetY: n, label: s, labelStyle: a, labelShowBg: i, labelBgStyle: o, labelBgPadding: c, labelBgBorderRadius: u, style: l, sourcePosition: f = ee.Bottom, targetPosition: m = ee.Top, markerEnd: h, markerStart: g, pathOptions: y, interactionWidth: b }) => {
|
|
5115
5115
|
const [v, w, R] = Dc({
|
|
5116
5116
|
sourceX: e,
|
|
5117
5117
|
sourceY: t,
|
|
@@ -5125,9 +5125,9 @@ const Ln = we(({ sourceX: e, sourceY: t, targetX: r, targetY: n, label: s, label
|
|
|
5125
5125
|
return H.createElement(or, { path: v, labelX: w, labelY: R, label: s, labelStyle: a, labelShowBg: i, labelBgStyle: o, labelBgPadding: c, labelBgBorderRadius: u, style: l, markerEnd: h, markerStart: g, interactionWidth: b });
|
|
5126
5126
|
});
|
|
5127
5127
|
Ln.displayName = "SmoothStepEdge";
|
|
5128
|
-
const eu =
|
|
5128
|
+
const eu = xe((e) => {
|
|
5129
5129
|
var t;
|
|
5130
|
-
return H.createElement(Ln, { ...e, pathOptions:
|
|
5130
|
+
return H.createElement(Ln, { ...e, pathOptions: Te(() => {
|
|
5131
5131
|
var r;
|
|
5132
5132
|
return { borderRadius: 0, offset: (r = e.pathOptions) == null ? void 0 : r.offset };
|
|
5133
5133
|
}, [(t = e.pathOptions) == null ? void 0 : t.offset]) });
|
|
@@ -5142,7 +5142,7 @@ function jN({ sourceX: e, sourceY: t, targetX: r, targetY: n }) {
|
|
|
5142
5142
|
});
|
|
5143
5143
|
return [`M ${e},${t}L ${r},${n}`, s, a, i, o];
|
|
5144
5144
|
}
|
|
5145
|
-
const tu =
|
|
5145
|
+
const tu = xe(({ sourceX: e, sourceY: t, targetX: r, targetY: n, label: s, labelStyle: a, labelShowBg: i, labelBgStyle: o, labelBgPadding: c, labelBgBorderRadius: u, style: l, markerEnd: f, markerStart: m, interactionWidth: h }) => {
|
|
5146
5146
|
const [g, y, b] = jN({ sourceX: e, sourceY: t, targetX: r, targetY: n });
|
|
5147
5147
|
return H.createElement(or, { path: g, labelX: y, labelY: b, label: s, labelStyle: a, labelShowBg: i, labelBgStyle: o, labelBgPadding: c, labelBgBorderRadius: u, style: l, markerEnd: f, markerStart: m, interactionWidth: h });
|
|
5148
5148
|
});
|
|
@@ -5195,7 +5195,7 @@ function ru({ sourceX: e, sourceY: t, sourcePosition: r = ee.Bottom, targetX: n,
|
|
|
5195
5195
|
g
|
|
5196
5196
|
];
|
|
5197
5197
|
}
|
|
5198
|
-
const Nn =
|
|
5198
|
+
const Nn = xe(({ sourceX: e, sourceY: t, targetX: r, targetY: n, sourcePosition: s = ee.Bottom, targetPosition: a = ee.Top, label: i, labelStyle: o, labelShowBg: c, labelBgStyle: u, labelBgPadding: l, labelBgBorderRadius: f, style: m, markerEnd: h, markerStart: g, pathOptions: y, interactionWidth: b }) => {
|
|
5199
5199
|
const [v, w, R] = ru({
|
|
5200
5200
|
sourceX: e,
|
|
5201
5201
|
sourceY: t,
|
|
@@ -5366,8 +5366,8 @@ function Xg(e, t, r, n, s, a, i) {
|
|
|
5366
5366
|
}
|
|
5367
5367
|
function ZN({ nodes: e, nodeId: t, handleId: r, handleType: n }) {
|
|
5368
5368
|
return e.reduce((s, a) => {
|
|
5369
|
-
if (a[
|
|
5370
|
-
const { handleBounds: i } = a[
|
|
5369
|
+
if (a[Ee]) {
|
|
5370
|
+
const { handleBounds: i } = a[Ee];
|
|
5371
5371
|
let o = [], c = [];
|
|
5372
5372
|
i && (o = gd(a, i, "source", `${t}-${r}-${n}`), c = gd(a, i, "target", `${t}-${r}-${n}`)), s.push(...o, ...c);
|
|
5373
5373
|
}
|
|
@@ -5387,10 +5387,10 @@ function JN(e, t) {
|
|
|
5387
5387
|
function Zg({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getState: a, setState: i, isValidConnection: o, edgeUpdaterType: c, onReconnectEnd: u }) {
|
|
5388
5388
|
const l = Og(e.target), { connectionMode: f, domNode: m, autoPanOnConnect: h, connectionRadius: g, onConnectStart: y, panBy: b, getNodes: v, cancelConnection: w } = a();
|
|
5389
5389
|
let R = 0, S;
|
|
5390
|
-
const { x: $, y:
|
|
5391
|
-
if (!
|
|
5390
|
+
const { x: $, y: T } = Et(e), q = l == null ? void 0 : l.elementFromPoint($, T), F = nu(c, q), A = m == null ? void 0 : m.getBoundingClientRect();
|
|
5391
|
+
if (!A || !F)
|
|
5392
5392
|
return;
|
|
5393
|
-
let D, M = Et(e,
|
|
5393
|
+
let D, M = Et(e, A), _ = !1, E = null, p = !1, N = null;
|
|
5394
5394
|
const k = ZN({
|
|
5395
5395
|
nodes: v(),
|
|
5396
5396
|
nodeId: r,
|
|
@@ -5399,7 +5399,7 @@ function Zg({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getSt
|
|
|
5399
5399
|
}), C = () => {
|
|
5400
5400
|
if (!h)
|
|
5401
5401
|
return;
|
|
5402
|
-
const [O, L] = qg(M,
|
|
5402
|
+
const [O, L] = qg(M, A);
|
|
5403
5403
|
b({ x: O, y: L }), R = requestAnimationFrame(C);
|
|
5404
5404
|
};
|
|
5405
5405
|
i({
|
|
@@ -5418,7 +5418,7 @@ function Zg({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getSt
|
|
|
5418
5418
|
}), y == null || y(e, { nodeId: r, handleId: t, handleType: F });
|
|
5419
5419
|
function P(O) {
|
|
5420
5420
|
const { transform: L } = a();
|
|
5421
|
-
M = Et(O,
|
|
5421
|
+
M = Et(O, A);
|
|
5422
5422
|
const { handle: z, validHandleResult: V } = QN(O, l, Oc(M, L, !1, [1, 1]), g, k, (U) => Xg(U, f, r, t, s ? "target" : "source", o, l));
|
|
5423
5423
|
if (S = z, _ || (C(), _ = !0), N = V.handleDomNode, E = V.connection, p = V.isValid, i({
|
|
5424
5424
|
connectionPosition: S && p ? Ug({
|
|
@@ -5448,10 +5448,10 @@ const yd = () => !0, e2 = (e) => ({
|
|
|
5448
5448
|
clickConnecting: (i == null ? void 0 : i.nodeId) === e && (i == null ? void 0 : i.handleId) === t && (i == null ? void 0 : i.type) === r
|
|
5449
5449
|
};
|
|
5450
5450
|
}, Jg = kn(({ type: e = "source", position: t = ee.Top, isValidConnection: r, isConnectable: n = !0, isConnectableStart: s = !0, isConnectableEnd: a = !0, id: i, onConnect: o, children: c, className: u, onMouseDown: l, onTouchStart: f, ...m }, h) => {
|
|
5451
|
-
var
|
|
5452
|
-
const g = i || null, y = e === "target", b =
|
|
5453
|
-
v || (D = (
|
|
5454
|
-
const
|
|
5451
|
+
var A, D;
|
|
5452
|
+
const g = i || null, y = e === "target", b = Ie(), v = UN(), { connectOnClick: w, noPanClassName: R } = ye(e2, Me), { connecting: S, clickConnecting: $ } = ye(t2(v, g, e), Me);
|
|
5453
|
+
v || (D = (A = b.getState()).onError) == null || D.call(A, "010", Xe.error010());
|
|
5454
|
+
const T = (M) => {
|
|
5455
5455
|
const { defaultEdgeOptions: _, onConnect: E, hasDefaultEdges: p } = b.getState(), N = {
|
|
5456
5456
|
..._,
|
|
5457
5457
|
...M
|
|
@@ -5469,7 +5469,7 @@ const yd = () => !0, e2 = (e) => ({
|
|
|
5469
5469
|
event: M,
|
|
5470
5470
|
handleId: g,
|
|
5471
5471
|
nodeId: v,
|
|
5472
|
-
onConnect:
|
|
5472
|
+
onConnect: T,
|
|
5473
5473
|
isTarget: y,
|
|
5474
5474
|
getState: b.getState,
|
|
5475
5475
|
setState: b.setState,
|
|
@@ -5488,7 +5488,7 @@ const yd = () => !0, e2 = (e) => ({
|
|
|
5488
5488
|
id: g,
|
|
5489
5489
|
type: e
|
|
5490
5490
|
}, N, p.nodeId, p.handleId || null, p.type, P, C);
|
|
5491
|
-
O &&
|
|
5491
|
+
O && T(I), E == null || E(M), b.setState({ connectionClickStartHandle: null });
|
|
5492
5492
|
};
|
|
5493
5493
|
return H.createElement("div", { "data-handleid": g, "data-nodeid": v, "data-handlepos": t, "data-id": `${v}-${g}-${e}`, className: Oe([
|
|
5494
5494
|
"react-flow__handle",
|
|
@@ -5509,7 +5509,7 @@ const yd = () => !0, e2 = (e) => ({
|
|
|
5509
5509
|
]), onMouseDown: q, onTouchStart: q, onClick: w ? F : void 0, ref: h, ...m }, c);
|
|
5510
5510
|
});
|
|
5511
5511
|
Jg.displayName = "Handle";
|
|
5512
|
-
var St =
|
|
5512
|
+
var St = xe(Jg);
|
|
5513
5513
|
const ey = ({ data: e, isConnectable: t, targetPosition: r = ee.Top, sourcePosition: n = ee.Bottom }) => H.createElement(
|
|
5514
5514
|
H.Fragment,
|
|
5515
5515
|
null,
|
|
@@ -5518,7 +5518,7 @@ const ey = ({ data: e, isConnectable: t, targetPosition: r = ee.Top, sourcePosit
|
|
|
5518
5518
|
H.createElement(St, { type: "source", position: n, isConnectable: t })
|
|
5519
5519
|
);
|
|
5520
5520
|
ey.displayName = "DefaultNode";
|
|
5521
|
-
var Lc =
|
|
5521
|
+
var Lc = xe(ey);
|
|
5522
5522
|
const ty = ({ data: e, isConnectable: t, sourcePosition: r = ee.Bottom }) => H.createElement(
|
|
5523
5523
|
H.Fragment,
|
|
5524
5524
|
null,
|
|
@@ -5526,7 +5526,7 @@ const ty = ({ data: e, isConnectable: t, sourcePosition: r = ee.Bottom }) => H.c
|
|
|
5526
5526
|
H.createElement(St, { type: "source", position: r, isConnectable: t })
|
|
5527
5527
|
);
|
|
5528
5528
|
ty.displayName = "InputNode";
|
|
5529
|
-
var ry =
|
|
5529
|
+
var ry = xe(ty);
|
|
5530
5530
|
const ny = ({ data: e, isConnectable: t, targetPosition: r = ee.Top }) => H.createElement(
|
|
5531
5531
|
H.Fragment,
|
|
5532
5532
|
null,
|
|
@@ -5534,7 +5534,7 @@ const ny = ({ data: e, isConnectable: t, targetPosition: r = ee.Top }) => H.crea
|
|
|
5534
5534
|
e == null ? void 0 : e.label
|
|
5535
5535
|
);
|
|
5536
5536
|
ny.displayName = "OutputNode";
|
|
5537
|
-
var sy =
|
|
5537
|
+
var sy = xe(ny);
|
|
5538
5538
|
const su = () => null;
|
|
5539
5539
|
su.displayName = "GroupNode";
|
|
5540
5540
|
const r2 = (e) => ({
|
|
@@ -5542,10 +5542,10 @@ const r2 = (e) => ({
|
|
|
5542
5542
|
selectedEdges: e.edges.filter((t) => t.selected).map((t) => ({ ...t }))
|
|
5543
5543
|
}), Xr = (e) => e.id;
|
|
5544
5544
|
function n2(e, t) {
|
|
5545
|
-
return
|
|
5545
|
+
return Me(e.selectedNodes.map(Xr), t.selectedNodes.map(Xr)) && Me(e.selectedEdges.map(Xr), t.selectedEdges.map(Xr));
|
|
5546
5546
|
}
|
|
5547
|
-
const ay =
|
|
5548
|
-
const t =
|
|
5547
|
+
const ay = xe(({ onSelectionChange: e }) => {
|
|
5548
|
+
const t = Ie(), { selectedNodes: r, selectedEdges: n } = ye(r2, n2);
|
|
5549
5549
|
return se(() => {
|
|
5550
5550
|
const s = { nodes: r, edges: n };
|
|
5551
5551
|
e == null || e(s), t.getState().onSelectionChange.forEach((a) => a(s));
|
|
@@ -5577,14 +5577,14 @@ function de(e, t, r) {
|
|
|
5577
5577
|
typeof t < "u" && r({ [e]: t });
|
|
5578
5578
|
}, [t]);
|
|
5579
5579
|
}
|
|
5580
|
-
const o2 = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: s, onConnectStart: a, onConnectEnd: i, onClickConnectStart: o, onClickConnectEnd: c, nodesDraggable: u, nodesConnectable: l, nodesFocusable: f, edgesFocusable: m, edgesUpdatable: h, elevateNodesOnSelect: g, minZoom: y, maxZoom: b, nodeExtent: v, onNodesChange: w, onEdgesChange: R, elementsSelectable: S, connectionMode: $, snapGrid:
|
|
5581
|
-
const { setNodes: K, setEdges:
|
|
5580
|
+
const o2 = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: s, onConnectStart: a, onConnectEnd: i, onClickConnectStart: o, onClickConnectEnd: c, nodesDraggable: u, nodesConnectable: l, nodesFocusable: f, edgesFocusable: m, edgesUpdatable: h, elevateNodesOnSelect: g, minZoom: y, maxZoom: b, nodeExtent: v, onNodesChange: w, onEdgesChange: R, elementsSelectable: S, connectionMode: $, snapGrid: T, snapToGrid: q, translateExtent: F, connectOnClick: A, defaultEdgeOptions: D, fitView: M, fitViewOptions: _, onNodesDelete: E, onEdgesDelete: p, onNodeDrag: N, onNodeDragStart: k, onNodeDragStop: C, onSelectionDrag: P, onSelectionDragStart: I, onSelectionDragStop: O, noPanClassName: L, nodeOrigin: z, rfId: V, autoPanOnConnect: U, autoPanOnNodeDrag: Q, onError: B, connectionRadius: W, isValidConnection: j, nodeDragThreshold: G }) => {
|
|
5581
|
+
const { setNodes: K, setEdges: me, setDefaultNodesAndEdges: be, setMinZoom: Ae, setMaxZoom: Ne, setTranslateExtent: ne, setNodeExtent: ae, reset: X } = ye(i2, Me), Z = Ie();
|
|
5582
5582
|
return se(() => {
|
|
5583
|
-
const
|
|
5584
|
-
return be(r,
|
|
5583
|
+
const pe = n == null ? void 0 : n.map((ke) => ({ ...ke, ...D }));
|
|
5584
|
+
return be(r, pe), () => {
|
|
5585
5585
|
X();
|
|
5586
5586
|
};
|
|
5587
|
-
}, []), de("defaultEdgeOptions", D, Z.setState), de("connectionMode", $, Z.setState), de("onConnect", s, Z.setState), de("onConnectStart", a, Z.setState), de("onConnectEnd", i, Z.setState), de("onClickConnectStart", o, Z.setState), de("onClickConnectEnd", c, Z.setState), de("nodesDraggable", u, Z.setState), de("nodesConnectable", l, Z.setState), de("nodesFocusable", f, Z.setState), de("edgesFocusable", m, Z.setState), de("edgesUpdatable", h, Z.setState), de("elementsSelectable", S, Z.setState), de("elevateNodesOnSelect", g, Z.setState), de("snapToGrid", q, Z.setState), de("snapGrid",
|
|
5587
|
+
}, []), de("defaultEdgeOptions", D, Z.setState), de("connectionMode", $, Z.setState), de("onConnect", s, Z.setState), de("onConnectStart", a, Z.setState), de("onConnectEnd", i, Z.setState), de("onClickConnectStart", o, Z.setState), de("onClickConnectEnd", c, Z.setState), de("nodesDraggable", u, Z.setState), de("nodesConnectable", l, Z.setState), de("nodesFocusable", f, Z.setState), de("edgesFocusable", m, Z.setState), de("edgesUpdatable", h, Z.setState), de("elementsSelectable", S, Z.setState), de("elevateNodesOnSelect", g, Z.setState), de("snapToGrid", q, Z.setState), de("snapGrid", T, Z.setState), de("onNodesChange", w, Z.setState), de("onEdgesChange", R, Z.setState), de("connectOnClick", A, Z.setState), de("fitViewOnInit", M, Z.setState), de("fitViewOnInitOptions", _, Z.setState), de("onNodesDelete", E, Z.setState), de("onEdgesDelete", p, Z.setState), de("onNodeDrag", N, Z.setState), de("onNodeDragStart", k, Z.setState), de("onNodeDragStop", C, Z.setState), de("onSelectionDrag", P, Z.setState), de("onSelectionDragStart", I, Z.setState), de("onSelectionDragStop", O, Z.setState), de("noPanClassName", L, Z.setState), de("nodeOrigin", z, Z.setState), de("rfId", V, Z.setState), de("autoPanOnConnect", U, Z.setState), de("autoPanOnNodeDrag", Q, Z.setState), de("onError", B, Z.setState), de("connectionRadius", W, Z.setState), de("isValidConnection", j, Z.setState), de("nodeDragThreshold", G, Z.setState), jt(e, K), jt(t, me), jt(y, Ae), jt(b, Ne), jt(F, ne), jt(v, ae), null;
|
|
5588
5588
|
}, bd = { display: "none" }, l2 = {
|
|
5589
5589
|
position: "absolute",
|
|
5590
5590
|
width: 1,
|
|
@@ -5617,7 +5617,7 @@ function f2({ rfId: e, disableKeyboardA11y: t }) {
|
|
|
5617
5617
|
);
|
|
5618
5618
|
}
|
|
5619
5619
|
var $r = (e = null, t = { actInsideInputWithModifier: !0 }) => {
|
|
5620
|
-
const [r, n] = Y(!1), s = re(!1), a = re(/* @__PURE__ */ new Set([])), [i, o] =
|
|
5620
|
+
const [r, n] = Y(!1), s = re(!1), a = re(/* @__PURE__ */ new Set([])), [i, o] = Te(() => {
|
|
5621
5621
|
if (e !== null) {
|
|
5622
5622
|
const u = (Array.isArray(e) ? e : [e]).filter((f) => typeof f == "string").map((f) => f.split("+")), l = u.reduce((f, m) => f.concat(...m), []);
|
|
5623
5623
|
return [u, l];
|
|
@@ -5661,7 +5661,7 @@ function ly(e, t, r, n) {
|
|
|
5661
5661
|
return ly(a, t, {
|
|
5662
5662
|
x: (r.x ?? 0) + i.x,
|
|
5663
5663
|
y: (r.y ?? 0) + i.y,
|
|
5664
|
-
z: (((o = a[
|
|
5664
|
+
z: (((o = a[Ee]) == null ? void 0 : o.z) ?? 0) > (r.z ?? 0) ? ((c = a[Ee]) == null ? void 0 : c.z) ?? 0 : r.z ?? 0
|
|
5665
5665
|
}, n);
|
|
5666
5666
|
}
|
|
5667
5667
|
function cy(e, t, r) {
|
|
@@ -5673,12 +5673,12 @@ function cy(e, t, r) {
|
|
|
5673
5673
|
if (s || r != null && r[n.id]) {
|
|
5674
5674
|
const { x: i, y: o, z: c } = ly(n, e, {
|
|
5675
5675
|
...n.position,
|
|
5676
|
-
z: ((a = n[
|
|
5676
|
+
z: ((a = n[Ee]) == null ? void 0 : a.z) ?? 0
|
|
5677
5677
|
}, t);
|
|
5678
5678
|
n.positionAbsolute = {
|
|
5679
5679
|
x: i,
|
|
5680
5680
|
y: o
|
|
5681
|
-
}, n[
|
|
5681
|
+
}, n[Ee].z = c, r != null && r[n.id] && (n[Ee].isParent = !0);
|
|
5682
5682
|
}
|
|
5683
5683
|
});
|
|
5684
5684
|
}
|
|
@@ -5695,10 +5695,10 @@ function gs(e, t, r, n) {
|
|
|
5695
5695
|
}, f = o.parentNode || o.parentId;
|
|
5696
5696
|
f && (a[f] = !0);
|
|
5697
5697
|
const m = (u == null ? void 0 : u.type) && (u == null ? void 0 : u.type) !== o.type;
|
|
5698
|
-
Object.defineProperty(l,
|
|
5698
|
+
Object.defineProperty(l, Ee, {
|
|
5699
5699
|
enumerable: !1,
|
|
5700
5700
|
value: {
|
|
5701
|
-
handleBounds: m || (h = u == null ? void 0 : u[
|
|
5701
|
+
handleBounds: m || (h = u == null ? void 0 : u[Ee]) == null ? void 0 : h.handleBounds,
|
|
5702
5702
|
z: c
|
|
5703
5703
|
}
|
|
5704
5704
|
}), s.set(o.id, l);
|
|
@@ -5724,7 +5724,7 @@ function h2(e, t) {
|
|
|
5724
5724
|
const n = t.get(r.id);
|
|
5725
5725
|
n && t.set(n.id, {
|
|
5726
5726
|
...n,
|
|
5727
|
-
[
|
|
5727
|
+
[Ee]: n[Ee],
|
|
5728
5728
|
selected: r.selected
|
|
5729
5729
|
});
|
|
5730
5730
|
}), new Map(t);
|
|
@@ -5758,8 +5758,8 @@ const Gt = () => {
|
|
|
5758
5758
|
d3Zoom: e.d3Zoom,
|
|
5759
5759
|
d3Selection: e.d3Selection
|
|
5760
5760
|
}), y2 = () => {
|
|
5761
|
-
const e =
|
|
5762
|
-
return
|
|
5761
|
+
const e = Ie(), { d3Zoom: t, d3Selection: r } = ye(g2, Me);
|
|
5762
|
+
return Te(() => r && t ? {
|
|
5763
5763
|
zoomIn: (s) => t.scaleBy(qt(r, s == null ? void 0 : s.duration), 1.2),
|
|
5764
5764
|
zoomOut: (s) => t.scaleBy(qt(r, s == null ? void 0 : s.duration), 1 / 1.2),
|
|
5765
5765
|
zoomTo: (s, a) => t.scaleTo(qt(r, a == null ? void 0 : a.duration), s),
|
|
@@ -5810,7 +5810,7 @@ const Gt = () => {
|
|
|
5810
5810
|
} : p2, [t, r]);
|
|
5811
5811
|
};
|
|
5812
5812
|
function au() {
|
|
5813
|
-
const e = y2(), t =
|
|
5813
|
+
const e = y2(), t = Ie(), r = te(() => t.getState().getNodes().map((y) => ({ ...y })), []), n = te((y) => t.getState().nodeInternals.get(y), []), s = te(() => {
|
|
5814
5814
|
const { edges: y = [] } = t.getState();
|
|
5815
5815
|
return y.map((b) => ({ ...b }));
|
|
5816
5816
|
}, []), a = te((y) => {
|
|
@@ -5821,24 +5821,24 @@ function au() {
|
|
|
5821
5821
|
if (w)
|
|
5822
5822
|
v($);
|
|
5823
5823
|
else if (R) {
|
|
5824
|
-
const
|
|
5825
|
-
R(
|
|
5824
|
+
const T = $.length === 0 ? S.map((q) => ({ type: "remove", id: q.id })) : $.map((q) => ({ item: q, type: "reset" }));
|
|
5825
|
+
R(T);
|
|
5826
5826
|
}
|
|
5827
5827
|
}, []), o = te((y) => {
|
|
5828
5828
|
const { edges: b = [], setEdges: v, hasDefaultEdges: w, onEdgesChange: R } = t.getState(), S = typeof y == "function" ? y(b) : y;
|
|
5829
5829
|
if (w)
|
|
5830
5830
|
v(S);
|
|
5831
5831
|
else if (R) {
|
|
5832
|
-
const $ = S.length === 0 ? b.map((
|
|
5832
|
+
const $ = S.length === 0 ? b.map((T) => ({ type: "remove", id: T.id })) : S.map((T) => ({ item: T, type: "reset" }));
|
|
5833
5833
|
R($);
|
|
5834
5834
|
}
|
|
5835
5835
|
}, []), c = te((y) => {
|
|
5836
5836
|
const b = Array.isArray(y) ? y : [y], { getNodes: v, setNodes: w, hasDefaultNodes: R, onNodesChange: S } = t.getState();
|
|
5837
5837
|
if (R) {
|
|
5838
|
-
const
|
|
5839
|
-
w(
|
|
5838
|
+
const T = [...v(), ...b];
|
|
5839
|
+
w(T);
|
|
5840
5840
|
} else if (S) {
|
|
5841
|
-
const $ = b.map((
|
|
5841
|
+
const $ = b.map((T) => ({ item: T, type: "add" }));
|
|
5842
5842
|
S($);
|
|
5843
5843
|
}
|
|
5844
5844
|
}, []), u = te((y) => {
|
|
@@ -5846,7 +5846,7 @@ function au() {
|
|
|
5846
5846
|
if (R)
|
|
5847
5847
|
w([...v, ...b]);
|
|
5848
5848
|
else if (S) {
|
|
5849
|
-
const $ = b.map((
|
|
5849
|
+
const $ = b.map((T) => ({ item: T, type: "add" }));
|
|
5850
5850
|
S($);
|
|
5851
5851
|
}
|
|
5852
5852
|
}, []), l = te(() => {
|
|
@@ -5861,7 +5861,7 @@ function au() {
|
|
|
5861
5861
|
}
|
|
5862
5862
|
};
|
|
5863
5863
|
}, []), f = te(({ nodes: y, edges: b }) => {
|
|
5864
|
-
const { nodeInternals: v, getNodes: w, edges: R, hasDefaultNodes: S, hasDefaultEdges: $, onNodesDelete:
|
|
5864
|
+
const { nodeInternals: v, getNodes: w, edges: R, hasDefaultNodes: S, hasDefaultEdges: $, onNodesDelete: T, onEdgesDelete: q, onNodesChange: F, onEdgesChange: A } = t.getState(), D = (y || []).map((N) => N.id), M = (b || []).map((N) => N.id), _ = w().reduce((N, k) => {
|
|
5865
5865
|
const C = k.parentNode || k.parentId, P = !D.includes(k.id) && C && N.find((O) => O.id === C);
|
|
5866
5866
|
return (typeof k.deletable == "boolean" ? k.deletable : !0) && (D.includes(k.id) || P) && N.push(k), N;
|
|
5867
5867
|
}, []), E = R.filter((N) => typeof N.deletable == "boolean" ? N.deletable : !0), p = E.filter((N) => M.includes(N.id));
|
|
@@ -5873,10 +5873,10 @@ function au() {
|
|
|
5873
5873
|
v.delete(P.id);
|
|
5874
5874
|
}), t.setState({
|
|
5875
5875
|
nodeInternals: new Map(v)
|
|
5876
|
-
}))), C.length > 0 && (q == null || q(k),
|
|
5876
|
+
}))), C.length > 0 && (q == null || q(k), A && A(C.map((P) => ({
|
|
5877
5877
|
id: P,
|
|
5878
5878
|
type: "remove"
|
|
5879
|
-
})))), _.length > 0 && (
|
|
5879
|
+
})))), _.length > 0 && (T == null || T(_), F)) {
|
|
5880
5880
|
const P = _.map((I) => ({ id: I.id, type: "remove" }));
|
|
5881
5881
|
F(P);
|
|
5882
5882
|
}
|
|
@@ -5889,7 +5889,7 @@ function au() {
|
|
|
5889
5889
|
return w ? (v || t.getState().getNodes()).filter(($) => {
|
|
5890
5890
|
if (!S && ($.id === R.id || !$.positionAbsolute))
|
|
5891
5891
|
return !1;
|
|
5892
|
-
const
|
|
5892
|
+
const T = dd($), q = Mc(T, w);
|
|
5893
5893
|
return b && q > 0 || q >= w.width * w.height;
|
|
5894
5894
|
}) : [];
|
|
5895
5895
|
}, []), g = te((y, b, v = !0) => {
|
|
@@ -5899,7 +5899,7 @@ function au() {
|
|
|
5899
5899
|
const R = Mc(w, b);
|
|
5900
5900
|
return v && R > 0 || R >= w.width * w.height;
|
|
5901
5901
|
}, []);
|
|
5902
|
-
return
|
|
5902
|
+
return Te(() => ({
|
|
5903
5903
|
...e,
|
|
5904
5904
|
getNodes: r,
|
|
5905
5905
|
getNode: n,
|
|
@@ -5931,7 +5931,7 @@ function au() {
|
|
|
5931
5931
|
}
|
|
5932
5932
|
const b2 = { actInsideInputWithModifier: !1 };
|
|
5933
5933
|
var v2 = ({ deleteKeyCode: e, multiSelectionKeyCode: t }) => {
|
|
5934
|
-
const r =
|
|
5934
|
+
const r = Ie(), { deleteElements: n } = au(), s = $r(e, b2), a = $r(t);
|
|
5935
5935
|
se(() => {
|
|
5936
5936
|
if (s) {
|
|
5937
5937
|
const { edges: i, getNodes: o } = r.getState(), c = o().filter((l) => l.selected), u = i.filter((l) => l.selected);
|
|
@@ -5942,7 +5942,7 @@ var v2 = ({ deleteKeyCode: e, multiSelectionKeyCode: t }) => {
|
|
|
5942
5942
|
}, [a]);
|
|
5943
5943
|
};
|
|
5944
5944
|
function x2(e) {
|
|
5945
|
-
const t =
|
|
5945
|
+
const t = Ie();
|
|
5946
5946
|
se(() => {
|
|
5947
5947
|
let r;
|
|
5948
5948
|
const n = () => {
|
|
@@ -5976,20 +5976,20 @@ const iu = {
|
|
|
5976
5976
|
d3ZoomHandler: e.d3ZoomHandler,
|
|
5977
5977
|
userSelectionActive: e.userSelectionActive
|
|
5978
5978
|
}), N2 = ({ onMove: e, onMoveStart: t, onMoveEnd: r, onPaneContextMenu: n, zoomOnScroll: s = !0, zoomOnPinch: a = !0, panOnScroll: i = !1, panOnScrollSpeed: o = 0.5, panOnScrollMode: c = Ot.Free, zoomOnDoubleClick: u = !0, elementsSelectable: l, panOnDrag: f = !0, defaultViewport: m, translateExtent: h, minZoom: g, maxZoom: y, zoomActivationKeyCode: b, preventScrolling: v = !0, children: w, noWheelClassName: R, noPanClassName: S }) => {
|
|
5979
|
-
const $ = re(),
|
|
5980
|
-
return x2(
|
|
5981
|
-
if (
|
|
5982
|
-
const I =
|
|
5979
|
+
const $ = re(), T = Ie(), q = re(!1), F = re(!1), A = re(null), D = re({ x: 0, y: 0, zoom: 0 }), { d3Zoom: M, d3Selection: _, d3ZoomHandler: E, userSelectionActive: p } = ye(_2, Me), N = $r(b), k = re(0), C = re(!1), P = re();
|
|
5980
|
+
return x2(A), se(() => {
|
|
5981
|
+
if (A.current) {
|
|
5982
|
+
const I = A.current.getBoundingClientRect(), O = kg().scaleExtent([g, y]).translateExtent(h), L = Se(A.current).call(O), z = ht.translate(m.x, m.y).scale(ir(m.zoom, g, y)), V = [
|
|
5983
5983
|
[0, 0],
|
|
5984
5984
|
[I.width, I.height]
|
|
5985
5985
|
], U = O.constrain()(z, V, h);
|
|
5986
|
-
O.transform(L, U), O.wheelDelta(_d),
|
|
5986
|
+
O.transform(L, U), O.wheelDelta(_d), T.setState({
|
|
5987
5987
|
d3Zoom: O,
|
|
5988
5988
|
d3Selection: L,
|
|
5989
5989
|
d3ZoomHandler: L.on("wheel.zoom"),
|
|
5990
5990
|
// we need to pass transform because zoom handler is not registered when we set the initial transform
|
|
5991
5991
|
transform: [U.x, U.y, U.k],
|
|
5992
|
-
domNode:
|
|
5992
|
+
domNode: A.current.closest(".react-flow")
|
|
5993
5993
|
});
|
|
5994
5994
|
}
|
|
5995
5995
|
}, []), se(() => {
|
|
@@ -6012,7 +6012,7 @@ const iu = {
|
|
|
6012
6012
|
// @ts-ignore
|
|
6013
6013
|
{ internal: !0 }
|
|
6014
6014
|
);
|
|
6015
|
-
const U = Jr(_.property("__zoom")), { onViewportChangeStart: Q, onViewportChange: B, onViewportChangeEnd: W } =
|
|
6015
|
+
const U = Jr(_.property("__zoom")), { onViewportChangeStart: Q, onViewportChange: B, onViewportChangeEnd: W } = T.getState();
|
|
6016
6016
|
clearTimeout(P.current), C.current || (C.current = !0, t == null || t(I, U), Q == null || Q(U)), C.current && (e == null || e(I, U), B == null || B(U), P.current = setTimeout(() => {
|
|
6017
6017
|
r == null || r(I, U), W == null || W(U), C.current = !1;
|
|
6018
6018
|
}, 150));
|
|
@@ -6041,14 +6041,14 @@ const iu = {
|
|
|
6041
6041
|
if (!I.sourceEvent || I.sourceEvent.internal)
|
|
6042
6042
|
return null;
|
|
6043
6043
|
k.current = (z = I.sourceEvent) == null ? void 0 : z.button;
|
|
6044
|
-
const { onViewportChangeStart: O } =
|
|
6045
|
-
q.current = !0, D.current = L, ((V = I.sourceEvent) == null ? void 0 : V.type) === "mousedown" &&
|
|
6044
|
+
const { onViewportChangeStart: O } = T.getState(), L = Jr(I.transform);
|
|
6045
|
+
q.current = !0, D.current = L, ((V = I.sourceEvent) == null ? void 0 : V.type) === "mousedown" && T.setState({ paneDragging: !0 }), O == null || O(L), t == null || t(I.sourceEvent, L);
|
|
6046
6046
|
});
|
|
6047
6047
|
}, [M, t]), se(() => {
|
|
6048
6048
|
M && (p && !q.current ? M.on("zoom", null) : p || M.on("zoom", (I) => {
|
|
6049
6049
|
var L;
|
|
6050
|
-
const { onViewportChange: O } =
|
|
6051
|
-
if (
|
|
6050
|
+
const { onViewportChange: O } = T.getState();
|
|
6051
|
+
if (T.setState({ transform: [I.transform.x, I.transform.y, I.transform.k] }), F.current = !!(n && wd(f, k.current ?? 0)), (e || O) && !((L = I.sourceEvent) != null && L.internal)) {
|
|
6052
6052
|
const z = Jr(I.transform);
|
|
6053
6053
|
O == null || O(z), e == null || e(I.sourceEvent, z);
|
|
6054
6054
|
}
|
|
@@ -6057,8 +6057,8 @@ const iu = {
|
|
|
6057
6057
|
M && M.on("end", (I) => {
|
|
6058
6058
|
if (!I.sourceEvent || I.sourceEvent.internal)
|
|
6059
6059
|
return null;
|
|
6060
|
-
const { onViewportChangeEnd: O } =
|
|
6061
|
-
if (q.current = !1,
|
|
6060
|
+
const { onViewportChangeEnd: O } = T.getState();
|
|
6061
|
+
if (q.current = !1, T.setState({ paneDragging: !1 }), n && wd(f, k.current ?? 0) && !F.current && n(I.sourceEvent), F.current = !1, (r || O) && w2(D.current, I.transform)) {
|
|
6062
6062
|
const L = Jr(I.transform);
|
|
6063
6063
|
D.current = L, clearTimeout($.current), $.current = setTimeout(() => {
|
|
6064
6064
|
O == null || O(L), r == null || r(I.sourceEvent, L);
|
|
@@ -6085,13 +6085,13 @@ const iu = {
|
|
|
6085
6085
|
f,
|
|
6086
6086
|
l,
|
|
6087
6087
|
N
|
|
6088
|
-
]), H.createElement("div", { className: "react-flow__renderer", ref:
|
|
6088
|
+
]), H.createElement("div", { className: "react-flow__renderer", ref: A, style: iu }, w);
|
|
6089
6089
|
}, S2 = (e) => ({
|
|
6090
6090
|
userSelectionActive: e.userSelectionActive,
|
|
6091
6091
|
userSelectionRect: e.userSelectionRect
|
|
6092
6092
|
});
|
|
6093
6093
|
function E2() {
|
|
6094
|
-
const { userSelectionActive: e, userSelectionRect: t } = ye(S2,
|
|
6094
|
+
const { userSelectionActive: e, userSelectionRect: t } = ye(S2, Me);
|
|
6095
6095
|
return e && t ? H.createElement("div", { className: "react-flow__selection react-flow__container", style: {
|
|
6096
6096
|
width: t.width,
|
|
6097
6097
|
height: t.height,
|
|
@@ -6168,12 +6168,12 @@ const ys = (e, t) => (r) => {
|
|
|
6168
6168
|
userSelectionActive: e.userSelectionActive,
|
|
6169
6169
|
elementsSelectable: e.elementsSelectable,
|
|
6170
6170
|
dragging: e.paneDragging
|
|
6171
|
-
}), hy =
|
|
6172
|
-
const m = re(null), h =
|
|
6171
|
+
}), hy = xe(({ isSelecting: e, selectionMode: t = Lr.Full, panOnDrag: r, onSelectionStart: n, onSelectionEnd: s, onPaneClick: a, onPaneContextMenu: i, onPaneScroll: o, onPaneMouseEnter: c, onPaneMouseMove: u, onPaneMouseLeave: l, children: f }) => {
|
|
6172
|
+
const m = re(null), h = Ie(), g = re(0), y = re(0), b = re(), { userSelectionActive: v, elementsSelectable: w, dragging: R } = ye(T2, Me), S = () => {
|
|
6173
6173
|
h.setState({ userSelectionActive: !1, userSelectionRect: null }), g.current = 0, y.current = 0;
|
|
6174
6174
|
}, $ = (E) => {
|
|
6175
6175
|
a == null || a(E), h.getState().resetSelectedElements(), h.setState({ nodesSelectionActive: !1 });
|
|
6176
|
-
},
|
|
6176
|
+
}, T = (E) => {
|
|
6177
6177
|
if (Array.isArray(r) && (r != null && r.includes(2))) {
|
|
6178
6178
|
E.preventDefault();
|
|
6179
6179
|
return;
|
|
@@ -6194,7 +6194,7 @@ const ys = (e, t) => (r) => {
|
|
|
6194
6194
|
y: C
|
|
6195
6195
|
}
|
|
6196
6196
|
}), n == null || n(E);
|
|
6197
|
-
},
|
|
6197
|
+
}, A = (E) => {
|
|
6198
6198
|
const { userSelectionRect: p, nodeInternals: N, edges: k, transform: C, onNodesChange: P, onEdgesChange: I, nodeOrigin: O, getNodes: L } = h.getState();
|
|
6199
6199
|
if (!e || !b.current || !p)
|
|
6200
6200
|
return;
|
|
@@ -6229,7 +6229,7 @@ const ys = (e, t) => (r) => {
|
|
|
6229
6229
|
}, _ = w && (e || v);
|
|
6230
6230
|
return H.createElement(
|
|
6231
6231
|
"div",
|
|
6232
|
-
{ className: Oe(["react-flow__pane", { dragging: R, selection: e }]), onClick: _ ? void 0 : ys($, m), onContextMenu: ys(
|
|
6232
|
+
{ className: Oe(["react-flow__pane", { dragging: R, selection: e }]), onClick: _ ? void 0 : ys($, m), onContextMenu: ys(T, m), onWheel: ys(q, m), onMouseEnter: _ ? void 0 : c, onMouseDown: _ ? F : void 0, onMouseMove: _ ? A : u, onMouseUp: _ ? D : void 0, onMouseLeave: _ ? M : l, ref: m, style: iu },
|
|
6233
6233
|
f,
|
|
6234
6234
|
H.createElement(E2, null)
|
|
6235
6235
|
);
|
|
@@ -6362,7 +6362,7 @@ function $c({ id: e, store: t, unselect: r = !1, nodeRef: n }) {
|
|
|
6362
6362
|
})) : s([e]);
|
|
6363
6363
|
}
|
|
6364
6364
|
function R2() {
|
|
6365
|
-
const e =
|
|
6365
|
+
const e = Ie();
|
|
6366
6366
|
return te(({ sourceEvent: r }) => {
|
|
6367
6367
|
const { transform: n, snapGrid: s, snapToGrid: a } = e.getState(), i = r.touches ? r.touches[0].clientX : r.clientX, o = r.touches ? r.touches[0].clientY : r.clientY, c = {
|
|
6368
6368
|
x: (i - n[0]) / n[2],
|
|
@@ -6379,19 +6379,19 @@ function vs(e) {
|
|
|
6379
6379
|
return (t, r, n) => e == null ? void 0 : e(t, n);
|
|
6380
6380
|
}
|
|
6381
6381
|
function gy({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector: n, nodeId: s, isSelectable: a, selectNodesOnDrag: i }) {
|
|
6382
|
-
const o =
|
|
6382
|
+
const o = Ie(), [c, u] = Y(!1), l = re([]), f = re({ x: null, y: null }), m = re(0), h = re(null), g = re({ x: 0, y: 0 }), y = re(null), b = re(!1), v = re(!1), w = re(!1), R = R2();
|
|
6383
6383
|
return se(() => {
|
|
6384
6384
|
if (e != null && e.current) {
|
|
6385
|
-
const S =
|
|
6385
|
+
const S = Se(e.current), $ = ({ x: F, y: A }) => {
|
|
6386
6386
|
const { nodeInternals: D, onNodeDrag: M, onSelectionDrag: _, updateNodePositions: E, nodeExtent: p, snapGrid: N, snapToGrid: k, nodeOrigin: C, onError: P } = o.getState();
|
|
6387
|
-
f.current = { x: F, y:
|
|
6387
|
+
f.current = { x: F, y: A };
|
|
6388
6388
|
let I = !1, O = { x: 0, y: 0, x2: 0, y2: 0 };
|
|
6389
6389
|
if (l.current.length > 1 && p) {
|
|
6390
6390
|
const z = $n(l.current, C);
|
|
6391
6391
|
O = Or(z);
|
|
6392
6392
|
}
|
|
6393
6393
|
if (l.current = l.current.map((z) => {
|
|
6394
|
-
const V = { x: F - z.distance.x, y:
|
|
6394
|
+
const V = { x: F - z.distance.x, y: A - z.distance.y };
|
|
6395
6395
|
k && (V.x = N[0] * Math.round(V.x / N[0]), V.y = N[1] * Math.round(V.y / N[1]));
|
|
6396
6396
|
const U = [
|
|
6397
6397
|
[p[0][0], p[0][1]],
|
|
@@ -6412,31 +6412,31 @@ function gy({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
|
|
|
6412
6412
|
});
|
|
6413
6413
|
L(y.current, z, V);
|
|
6414
6414
|
}
|
|
6415
|
-
},
|
|
6415
|
+
}, T = () => {
|
|
6416
6416
|
if (!h.current)
|
|
6417
6417
|
return;
|
|
6418
|
-
const [F,
|
|
6419
|
-
if (F !== 0 ||
|
|
6418
|
+
const [F, A] = qg(g.current, h.current);
|
|
6419
|
+
if (F !== 0 || A !== 0) {
|
|
6420
6420
|
const { transform: D, panBy: M } = o.getState();
|
|
6421
|
-
f.current.x = (f.current.x ?? 0) - F / D[2], f.current.y = (f.current.y ?? 0) -
|
|
6421
|
+
f.current.x = (f.current.x ?? 0) - F / D[2], f.current.y = (f.current.y ?? 0) - A / D[2], M({ x: F, y: A }) && $(f.current);
|
|
6422
6422
|
}
|
|
6423
|
-
m.current = requestAnimationFrame(
|
|
6423
|
+
m.current = requestAnimationFrame(T);
|
|
6424
6424
|
}, q = (F) => {
|
|
6425
6425
|
var C;
|
|
6426
|
-
const { nodeInternals:
|
|
6426
|
+
const { nodeInternals: A, multiSelectionActive: D, nodesDraggable: M, unselectNodesAndEdges: _, onNodeDragStart: E, onSelectionDragStart: p } = o.getState();
|
|
6427
6427
|
v.current = !0;
|
|
6428
6428
|
const N = s ? E : vs(p);
|
|
6429
|
-
(!i || !a) && !D && s && ((C =
|
|
6429
|
+
(!i || !a) && !D && s && ((C = A.get(s)) != null && C.selected || _()), s && a && i && $c({
|
|
6430
6430
|
id: s,
|
|
6431
6431
|
store: o,
|
|
6432
6432
|
nodeRef: e
|
|
6433
6433
|
});
|
|
6434
6434
|
const k = R(F);
|
|
6435
|
-
if (f.current = k, l.current = k2(
|
|
6435
|
+
if (f.current = k, l.current = k2(A, M, k, s), N && l.current) {
|
|
6436
6436
|
const [P, I] = bs({
|
|
6437
6437
|
nodeId: s,
|
|
6438
6438
|
dragItems: l.current,
|
|
6439
|
-
nodeInternals:
|
|
6439
|
+
nodeInternals: A
|
|
6440
6440
|
});
|
|
6441
6441
|
N(F.sourceEvent, P, I);
|
|
6442
6442
|
}
|
|
@@ -6444,22 +6444,22 @@ function gy({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
|
|
|
6444
6444
|
if (t)
|
|
6445
6445
|
S.on(".drag", null);
|
|
6446
6446
|
else {
|
|
6447
|
-
const F = F1().on("start", (
|
|
6447
|
+
const F = F1().on("start", (A) => {
|
|
6448
6448
|
const { domNode: D, nodeDragThreshold: M } = o.getState();
|
|
6449
|
-
M === 0 && q(
|
|
6450
|
-
const _ = R(
|
|
6451
|
-
f.current = _, h.current = (D == null ? void 0 : D.getBoundingClientRect()) || null, g.current = Et(
|
|
6452
|
-
}).on("drag", (
|
|
6449
|
+
M === 0 && q(A), w.current = !1;
|
|
6450
|
+
const _ = R(A);
|
|
6451
|
+
f.current = _, h.current = (D == null ? void 0 : D.getBoundingClientRect()) || null, g.current = Et(A.sourceEvent, h.current);
|
|
6452
|
+
}).on("drag", (A) => {
|
|
6453
6453
|
var E, p;
|
|
6454
|
-
const D = R(
|
|
6455
|
-
if (
|
|
6456
|
-
if (!b.current && v.current && M && (b.current = !0,
|
|
6454
|
+
const D = R(A), { autoPanOnNodeDrag: M, nodeDragThreshold: _ } = o.getState();
|
|
6455
|
+
if (A.sourceEvent.type === "touchmove" && A.sourceEvent.touches.length > 1 && (w.current = !0), !w.current) {
|
|
6456
|
+
if (!b.current && v.current && M && (b.current = !0, T()), !v.current) {
|
|
6457
6457
|
const N = D.xSnapped - (((E = f == null ? void 0 : f.current) == null ? void 0 : E.x) ?? 0), k = D.ySnapped - (((p = f == null ? void 0 : f.current) == null ? void 0 : p.y) ?? 0);
|
|
6458
|
-
Math.sqrt(N * N + k * k) > _ && q(
|
|
6458
|
+
Math.sqrt(N * N + k * k) > _ && q(A);
|
|
6459
6459
|
}
|
|
6460
|
-
(f.current.x !== D.xSnapped || f.current.y !== D.ySnapped) && l.current && v.current && (y.current =
|
|
6460
|
+
(f.current.x !== D.xSnapped || f.current.y !== D.ySnapped) && l.current && v.current && (y.current = A.sourceEvent, g.current = Et(A.sourceEvent, h.current), $(D));
|
|
6461
6461
|
}
|
|
6462
|
-
}).on("end", (
|
|
6462
|
+
}).on("end", (A) => {
|
|
6463
6463
|
if (!(!v.current || w.current) && (u(!1), b.current = !1, v.current = !1, cancelAnimationFrame(m.current), l.current)) {
|
|
6464
6464
|
const { updateNodePositions: D, nodeInternals: M, onNodeDragStop: _, onSelectionDragStop: E } = o.getState(), p = s ? _ : vs(E);
|
|
6465
6465
|
if (D(l.current, !1, !1), p) {
|
|
@@ -6468,12 +6468,12 @@ function gy({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
|
|
|
6468
6468
|
dragItems: l.current,
|
|
6469
6469
|
nodeInternals: M
|
|
6470
6470
|
});
|
|
6471
|
-
p(
|
|
6471
|
+
p(A.sourceEvent, N, k);
|
|
6472
6472
|
}
|
|
6473
6473
|
}
|
|
6474
|
-
}).filter((
|
|
6475
|
-
const D =
|
|
6476
|
-
return !
|
|
6474
|
+
}).filter((A) => {
|
|
6475
|
+
const D = A.target;
|
|
6476
|
+
return !A.button && (!r || !Sd(D, `.${r}`, e)) && (!n || Sd(D, n, e));
|
|
6477
6477
|
});
|
|
6478
6478
|
return S.call(F), () => {
|
|
6479
6479
|
S.on(".drag", null);
|
|
@@ -6493,7 +6493,7 @@ function gy({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
|
|
|
6493
6493
|
]), c;
|
|
6494
6494
|
}
|
|
6495
6495
|
function yy() {
|
|
6496
|
-
const e =
|
|
6496
|
+
const e = Ie();
|
|
6497
6497
|
return te((r) => {
|
|
6498
6498
|
const { nodeInternals: n, nodeExtent: s, updateNodePositions: a, getNodes: i, snapToGrid: o, snapGrid: c, onError: u, nodesDraggable: l } = e.getState(), f = i().filter((w) => w.selected && (w.draggable || l && typeof w.draggable > "u")), m = o ? c[0] : 5, h = o ? c[1] : 5, g = r.isShiftPressed ? 4 : 1, y = r.x * m * g, b = r.y * h * g, v = f.map((w) => {
|
|
6499
6499
|
if (w.positionAbsolute) {
|
|
@@ -6514,16 +6514,16 @@ const tr = {
|
|
|
6514
6514
|
ArrowRight: { x: 1, y: 0 }
|
|
6515
6515
|
};
|
|
6516
6516
|
var xr = (e) => {
|
|
6517
|
-
const t = ({ id: r, type: n, data: s, xPos: a, yPos: i, xPosOrigin: o, yPosOrigin: c, selected: u, onClick: l, onMouseEnter: f, onMouseMove: m, onMouseLeave: h, onContextMenu: g, onDoubleClick: y, style: b, className: v, isDraggable: w, isSelectable: R, isConnectable: S, isFocusable: $, selectNodesOnDrag:
|
|
6518
|
-
const L =
|
|
6517
|
+
const t = ({ id: r, type: n, data: s, xPos: a, yPos: i, xPosOrigin: o, yPosOrigin: c, selected: u, onClick: l, onMouseEnter: f, onMouseMove: m, onMouseLeave: h, onContextMenu: g, onDoubleClick: y, style: b, className: v, isDraggable: w, isSelectable: R, isConnectable: S, isFocusable: $, selectNodesOnDrag: T, sourcePosition: q, targetPosition: F, hidden: A, resizeObserver: D, dragHandle: M, zIndex: _, isParent: E, noDragClassName: p, noPanClassName: N, initialized: k, disableKeyboardA11y: C, ariaLabel: P, rfId: I, hasHandleBounds: O }) => {
|
|
6518
|
+
const L = Ie(), z = re(null), V = re(null), U = re(q), Q = re(F), B = re(n), W = R || w || l || f || m || h, j = yy(), G = vr(r, L.getState, f), K = vr(r, L.getState, m), me = vr(r, L.getState, h), be = vr(r, L.getState, g), Ae = vr(r, L.getState, y), Ne = (X) => {
|
|
6519
6519
|
const { nodeDragThreshold: Z } = L.getState();
|
|
6520
|
-
if (R && (!
|
|
6520
|
+
if (R && (!T || !w || Z > 0) && $c({
|
|
6521
6521
|
id: r,
|
|
6522
6522
|
store: L,
|
|
6523
6523
|
nodeRef: z
|
|
6524
6524
|
}), l) {
|
|
6525
|
-
const
|
|
6526
|
-
|
|
6525
|
+
const pe = L.getState().nodeInternals.get(r);
|
|
6526
|
+
pe && l(X, { ...pe });
|
|
6527
6527
|
}
|
|
6528
6528
|
}, ne = (X) => {
|
|
6529
6529
|
if (!Ic(X) && !C)
|
|
@@ -6546,24 +6546,24 @@ var xr = (e) => {
|
|
|
6546
6546
|
se(() => () => {
|
|
6547
6547
|
V.current && (D == null || D.unobserve(V.current), V.current = null);
|
|
6548
6548
|
}, []), se(() => {
|
|
6549
|
-
if (z.current && !
|
|
6549
|
+
if (z.current && !A) {
|
|
6550
6550
|
const X = z.current;
|
|
6551
6551
|
(!k || !O || V.current !== X) && (V.current && (D == null || D.unobserve(V.current)), D == null || D.observe(X), V.current = X);
|
|
6552
6552
|
}
|
|
6553
|
-
}, [
|
|
6554
|
-
const X = B.current !== n, Z = U.current !== q,
|
|
6555
|
-
z.current && (X || Z ||
|
|
6553
|
+
}, [A, k, O]), se(() => {
|
|
6554
|
+
const X = B.current !== n, Z = U.current !== q, pe = Q.current !== F;
|
|
6555
|
+
z.current && (X || Z || pe) && (X && (B.current = n), Z && (U.current = q), pe && (Q.current = F), L.getState().updateNodeDimensions([{ id: r, nodeElement: z.current, forceUpdate: !0 }]));
|
|
6556
6556
|
}, [r, n, q, F]);
|
|
6557
6557
|
const ae = gy({
|
|
6558
6558
|
nodeRef: z,
|
|
6559
|
-
disabled:
|
|
6559
|
+
disabled: A || !w,
|
|
6560
6560
|
noDragClassName: p,
|
|
6561
6561
|
handleSelector: M,
|
|
6562
6562
|
nodeId: r,
|
|
6563
6563
|
isSelectable: R,
|
|
6564
|
-
selectNodesOnDrag:
|
|
6564
|
+
selectNodesOnDrag: T
|
|
6565
6565
|
});
|
|
6566
|
-
return
|
|
6566
|
+
return A ? null : H.createElement(
|
|
6567
6567
|
"div",
|
|
6568
6568
|
{ className: Oe([
|
|
6569
6569
|
"react-flow__node",
|
|
@@ -6585,7 +6585,7 @@ var xr = (e) => {
|
|
|
6585
6585
|
pointerEvents: W ? "all" : "none",
|
|
6586
6586
|
visibility: k ? "visible" : "hidden",
|
|
6587
6587
|
...b
|
|
6588
|
-
}, "data-id": r, "data-testid": `rf__node-${r}`, onMouseEnter: G, onMouseMove: K, onMouseLeave:
|
|
6588
|
+
}, "data-id": r, "data-testid": `rf__node-${r}`, onMouseEnter: G, onMouseMove: K, onMouseLeave: me, onContextMenu: be, onClick: Ne, onDoubleClick: Ae, onKeyDown: $ ? ne : void 0, tabIndex: $ ? 0 : void 0, role: $ ? "button" : void 0, "aria-describedby": C ? void 0 : `${iy}-${I}`, "aria-label": P },
|
|
6589
6589
|
H.createElement(
|
|
6590
6590
|
GN,
|
|
6591
6591
|
{ value: r },
|
|
@@ -6593,7 +6593,7 @@ var xr = (e) => {
|
|
|
6593
6593
|
)
|
|
6594
6594
|
);
|
|
6595
6595
|
};
|
|
6596
|
-
return t.displayName = "NodeWrapper",
|
|
6596
|
+
return t.displayName = "NodeWrapper", xe(t);
|
|
6597
6597
|
};
|
|
6598
6598
|
const M2 = (e) => {
|
|
6599
6599
|
const t = e.getNodes().filter((r) => r.selected);
|
|
@@ -6604,7 +6604,7 @@ const M2 = (e) => {
|
|
|
6604
6604
|
};
|
|
6605
6605
|
};
|
|
6606
6606
|
function I2({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y: r }) {
|
|
6607
|
-
const n =
|
|
6607
|
+
const n = Ie(), { width: s, height: a, x: i, y: o, transformString: c, userSelectionActive: u } = ye(M2, Me), l = yy(), f = re(null);
|
|
6608
6608
|
if (se(() => {
|
|
6609
6609
|
var g;
|
|
6610
6610
|
r || (g = f.current) == null || g.focus({
|
|
@@ -6637,12 +6637,12 @@ function I2({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y:
|
|
|
6637
6637
|
} })
|
|
6638
6638
|
);
|
|
6639
6639
|
}
|
|
6640
|
-
var D2 =
|
|
6641
|
-
const q2 = (e) => e.nodesSelectionActive, by = ({ children: e, onPaneClick: t, onPaneMouseEnter: r, onPaneMouseMove: n, onPaneMouseLeave: s, onPaneContextMenu: a, onPaneScroll: i, deleteKeyCode: o, onMove: c, onMoveStart: u, onMoveEnd: l, selectionKeyCode: f, selectionOnDrag: m, selectionMode: h, onSelectionStart: g, onSelectionEnd: y, multiSelectionKeyCode: b, panActivationKeyCode: v, zoomActivationKeyCode: w, elementsSelectable: R, zoomOnScroll: S, zoomOnPinch: $, panOnScroll:
|
|
6642
|
-
const O = ye(q2), L = $r(f), z = $r(v), V = z || D, U = z ||
|
|
6640
|
+
var D2 = xe(I2);
|
|
6641
|
+
const q2 = (e) => e.nodesSelectionActive, by = ({ children: e, onPaneClick: t, onPaneMouseEnter: r, onPaneMouseMove: n, onPaneMouseLeave: s, onPaneContextMenu: a, onPaneScroll: i, deleteKeyCode: o, onMove: c, onMoveStart: u, onMoveEnd: l, selectionKeyCode: f, selectionOnDrag: m, selectionMode: h, onSelectionStart: g, onSelectionEnd: y, multiSelectionKeyCode: b, panActivationKeyCode: v, zoomActivationKeyCode: w, elementsSelectable: R, zoomOnScroll: S, zoomOnPinch: $, panOnScroll: T, panOnScrollSpeed: q, panOnScrollMode: F, zoomOnDoubleClick: A, panOnDrag: D, defaultViewport: M, translateExtent: _, minZoom: E, maxZoom: p, preventScrolling: N, onSelectionContextMenu: k, noWheelClassName: C, noPanClassName: P, disableKeyboardA11y: I }) => {
|
|
6642
|
+
const O = ye(q2), L = $r(f), z = $r(v), V = z || D, U = z || T, Q = L || m && V !== !0;
|
|
6643
6643
|
return v2({ deleteKeyCode: o, multiSelectionKeyCode: b }), H.createElement(
|
|
6644
6644
|
N2,
|
|
6645
|
-
{ onMove: c, onMoveStart: u, onMoveEnd: l, onPaneContextMenu: a, elementsSelectable: R, zoomOnScroll: S, zoomOnPinch: $, panOnScroll: U, panOnScrollSpeed: q, panOnScrollMode: F, zoomOnDoubleClick:
|
|
6645
|
+
{ onMove: c, onMoveStart: u, onMoveEnd: l, onPaneContextMenu: a, elementsSelectable: R, zoomOnScroll: S, zoomOnPinch: $, panOnScroll: U, panOnScrollSpeed: q, panOnScrollMode: F, zoomOnDoubleClick: A, panOnDrag: !L && V, defaultViewport: M, translateExtent: _, minZoom: E, maxZoom: p, zoomActivationKeyCode: w, preventScrolling: N, noWheelClassName: C, noPanClassName: P },
|
|
6646
6646
|
H.createElement(
|
|
6647
6647
|
hy,
|
|
6648
6648
|
{ onSelectionStart: g, onSelectionEnd: y, onPaneClick: t, onPaneMouseEnter: r, onPaneMouseMove: n, onPaneMouseLeave: s, onPaneContextMenu: a, onPaneScroll: i, panOnDrag: V, isSelecting: !!Q, selectionMode: h },
|
|
@@ -6652,7 +6652,7 @@ const q2 = (e) => e.nodesSelectionActive, by = ({ children: e, onPaneClick: t, o
|
|
|
6652
6652
|
);
|
|
6653
6653
|
};
|
|
6654
6654
|
by.displayName = "FlowRenderer";
|
|
6655
|
-
var O2 =
|
|
6655
|
+
var O2 = xe(by);
|
|
6656
6656
|
function L2(e) {
|
|
6657
6657
|
return ye(te((r) => e ? Wg(r.nodeInternals, { x: 0, y: 0, width: r.width, height: r.height }, r.transform, !0) : r.getNodes(), [e]));
|
|
6658
6658
|
}
|
|
@@ -6679,7 +6679,7 @@ const F2 = ({ x: e, y: t, width: r, height: n, origin: s }) => !r || !n ? { x: e
|
|
|
6679
6679
|
updateNodeDimensions: e.updateNodeDimensions,
|
|
6680
6680
|
onError: e.onError
|
|
6681
6681
|
}), vy = (e) => {
|
|
6682
|
-
const { nodesDraggable: t, nodesConnectable: r, nodesFocusable: n, elementsSelectable: s, updateNodeDimensions: a, onError: i } = ye(P2,
|
|
6682
|
+
const { nodesDraggable: t, nodesConnectable: r, nodesFocusable: n, elementsSelectable: s, updateNodeDimensions: a, onError: i } = ye(P2, Me), o = L2(e.onlyRenderVisibleElements), c = re(), u = Te(() => {
|
|
6683
6683
|
if (typeof ResizeObserver > "u")
|
|
6684
6684
|
return null;
|
|
6685
6685
|
const l = new ResizeObserver((f) => {
|
|
@@ -6696,7 +6696,7 @@ const F2 = ({ x: e, y: t, width: r, height: n, origin: s }) => !r || !n ? { x: e
|
|
|
6696
6696
|
var l;
|
|
6697
6697
|
(l = c == null ? void 0 : c.current) == null || l.disconnect();
|
|
6698
6698
|
}, []), H.createElement("div", { className: "react-flow__nodes", style: iu }, o.map((l) => {
|
|
6699
|
-
var $,
|
|
6699
|
+
var $, T, q;
|
|
6700
6700
|
let f = l.type || "default";
|
|
6701
6701
|
e.nodeTypes[f] || (i == null || i("003", Xe.error003(f)), f = "default");
|
|
6702
6702
|
const m = e.nodeTypes[f] || e.nodeTypes.default, h = !!(l.draggable || t && typeof l.draggable > "u"), g = !!(l.selectable || s && typeof l.selectable > "u"), y = !!(l.connectable || r && typeof l.connectable > "u"), b = !!(l.focusable || n && typeof l.focusable > "u"), v = e.nodeExtent ? Zc(l.positionAbsolute, e.nodeExtent) : l.positionAbsolute, w = (v == null ? void 0 : v.x) ?? 0, R = (v == null ? void 0 : v.y) ?? 0, S = F2({
|
|
@@ -6706,28 +6706,28 @@ const F2 = ({ x: e, y: t, width: r, height: n, origin: s }) => !r || !n ? { x: e
|
|
|
6706
6706
|
height: l.height ?? 0,
|
|
6707
6707
|
origin: e.nodeOrigin
|
|
6708
6708
|
});
|
|
6709
|
-
return H.createElement(m, { key: l.id, id: l.id, className: l.className, style: l.style, type: f, data: l.data, sourcePosition: l.sourcePosition || ee.Bottom, targetPosition: l.targetPosition || ee.Top, hidden: l.hidden, xPos: w, yPos: R, xPosOrigin: S.x, yPosOrigin: S.y, selectNodesOnDrag: e.selectNodesOnDrag, onClick: e.onNodeClick, onMouseEnter: e.onNodeMouseEnter, onMouseMove: e.onNodeMouseMove, onMouseLeave: e.onNodeMouseLeave, onContextMenu: e.onNodeContextMenu, onDoubleClick: e.onNodeDoubleClick, selected: !!l.selected, isDraggable: h, isSelectable: g, isConnectable: y, isFocusable: b, resizeObserver: u, dragHandle: l.dragHandle, zIndex: (($ = l[
|
|
6709
|
+
return H.createElement(m, { key: l.id, id: l.id, className: l.className, style: l.style, type: f, data: l.data, sourcePosition: l.sourcePosition || ee.Bottom, targetPosition: l.targetPosition || ee.Top, hidden: l.hidden, xPos: w, yPos: R, xPosOrigin: S.x, yPosOrigin: S.y, selectNodesOnDrag: e.selectNodesOnDrag, onClick: e.onNodeClick, onMouseEnter: e.onNodeMouseEnter, onMouseMove: e.onNodeMouseMove, onMouseLeave: e.onNodeMouseLeave, onContextMenu: e.onNodeContextMenu, onDoubleClick: e.onNodeDoubleClick, selected: !!l.selected, isDraggable: h, isSelectable: g, isConnectable: y, isFocusable: b, resizeObserver: u, dragHandle: l.dragHandle, zIndex: (($ = l[Ee]) == null ? void 0 : $.z) ?? 0, isParent: !!((T = l[Ee]) != null && T.isParent), noDragClassName: e.noDragClassName, noPanClassName: e.noPanClassName, initialized: !!l.width && !!l.height, rfId: e.rfId, disableKeyboardA11y: e.disableKeyboardA11y, ariaLabel: l.ariaLabel, hasHandleBounds: !!((q = l[Ee]) != null && q.handleBounds) });
|
|
6710
6710
|
}));
|
|
6711
6711
|
};
|
|
6712
6712
|
vy.displayName = "NodeRenderer";
|
|
6713
|
-
var z2 =
|
|
6713
|
+
var z2 = xe(vy);
|
|
6714
6714
|
const V2 = (e, t, r) => r === ee.Left ? e - t : r === ee.Right ? e + t : e, B2 = (e, t, r) => r === ee.Top ? e - t : r === ee.Bottom ? e + t : e, Ad = "react-flow__edgeupdater", Td = ({ position: e, centerX: t, centerY: r, radius: n = 10, onMouseDown: s, onMouseEnter: a, onMouseOut: i, type: o }) => H.createElement("circle", { onMouseDown: s, onMouseEnter: a, onMouseOut: i, className: Oe([Ad, `${Ad}-${o}`]), cx: V2(t, n, e), cy: B2(r, n, e), r: n, stroke: "transparent", fill: "transparent" }), H2 = () => !0;
|
|
6715
6715
|
var Wt = (e) => {
|
|
6716
|
-
const t = ({ id: r, className: n, type: s, data: a, onClick: i, onEdgeDoubleClick: o, selected: c, animated: u, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, style: b, source: v, target: w, sourceX: R, sourceY: S, targetX: $, targetY:
|
|
6717
|
-
const K = re(null), [
|
|
6716
|
+
const t = ({ id: r, className: n, type: s, data: a, onClick: i, onEdgeDoubleClick: o, selected: c, animated: u, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, style: b, source: v, target: w, sourceX: R, sourceY: S, targetX: $, targetY: T, sourcePosition: q, targetPosition: F, elementsSelectable: A, hidden: D, sourceHandleId: M, targetHandleId: _, onContextMenu: E, onMouseEnter: p, onMouseMove: N, onMouseLeave: k, reconnectRadius: C, onReconnect: P, onReconnectStart: I, onReconnectEnd: O, markerEnd: L, markerStart: z, rfId: V, ariaLabel: U, isFocusable: Q, isReconnectable: B, pathOptions: W, interactionWidth: j, disableKeyboardA11y: G }) => {
|
|
6717
|
+
const K = re(null), [me, be] = Y(!1), [Ae, Ne] = Y(!1), ne = Ie(), ae = Te(() => `url('#${qc(z, V)}')`, [z, V]), X = Te(() => `url('#${qc(L, V)}')`, [L, V]);
|
|
6718
6718
|
if (D)
|
|
6719
6719
|
return null;
|
|
6720
6720
|
const Z = (qe) => {
|
|
6721
6721
|
var tt;
|
|
6722
6722
|
const { edges: ze, addSelectedEdges: Le, unselectNodesAndEdges: $e, multiSelectionActive: Mt } = ne.getState(), ot = ze.find((mr) => mr.id === r);
|
|
6723
|
-
ot && (
|
|
6724
|
-
},
|
|
6723
|
+
ot && (A && (ne.setState({ nodesSelectionActive: !1 }), ot.selected && Mt ? ($e({ nodes: [], edges: [ot] }), (tt = K.current) == null || tt.blur()) : Le([r])), i && i(qe, ot));
|
|
6724
|
+
}, pe = br(r, ne.getState, o), ke = br(r, ne.getState, E), De = br(r, ne.getState, p), we = br(r, ne.getState, N), J = br(r, ne.getState, k), ie = (qe, ze) => {
|
|
6725
6725
|
if (qe.button !== 0)
|
|
6726
6726
|
return;
|
|
6727
6727
|
const { edges: Le, isValidConnection: $e } = ne.getState(), Mt = ze ? w : v, ot = (ze ? _ : M) || null, tt = ze ? "target" : "source", mr = $e || H2, ns = ze, pr = Le.find((It) => It.id === r);
|
|
6728
|
-
|
|
6728
|
+
Ne(!0), I == null || I(qe, pr, tt);
|
|
6729
6729
|
const ss = (It) => {
|
|
6730
|
-
|
|
6730
|
+
Ne(!1), O == null || O(It, pr, tt);
|
|
6731
6731
|
};
|
|
6732
6732
|
Zg({
|
|
6733
6733
|
event: qe,
|
|
@@ -6741,9 +6741,9 @@ var Wt = (e) => {
|
|
|
6741
6741
|
edgeUpdaterType: tt,
|
|
6742
6742
|
onReconnectEnd: ss
|
|
6743
6743
|
});
|
|
6744
|
-
}, fe = (qe) => ie(qe, !0), ge = (qe) => ie(qe, !1), oe = () => be(!0),
|
|
6744
|
+
}, fe = (qe) => ie(qe, !0), ge = (qe) => ie(qe, !1), oe = () => be(!0), Ce = () => be(!1), ue = !A && !i, Pe = (qe) => {
|
|
6745
6745
|
var ze;
|
|
6746
|
-
if (!G && Fg.includes(qe.key) &&
|
|
6746
|
+
if (!G && Fg.includes(qe.key) && A) {
|
|
6747
6747
|
const { unselectNodesAndEdges: Le, addSelectedEdges: $e, edges: Mt } = ne.getState();
|
|
6748
6748
|
qe.key === "Escape" ? ((ze = K.current) == null || ze.blur(), Le({ edges: [Mt.find((tt) => tt.id === r)] })) : $e([r]);
|
|
6749
6749
|
}
|
|
@@ -6754,18 +6754,18 @@ var Wt = (e) => {
|
|
|
6754
6754
|
"react-flow__edge",
|
|
6755
6755
|
`react-flow__edge-${s}`,
|
|
6756
6756
|
n,
|
|
6757
|
-
{ selected: c, animated: u, inactive: ue, updating:
|
|
6758
|
-
]), onClick: Z, onDoubleClick:
|
|
6759
|
-
!
|
|
6757
|
+
{ selected: c, animated: u, inactive: ue, updating: me }
|
|
6758
|
+
]), onClick: Z, onDoubleClick: pe, onContextMenu: ke, onMouseEnter: De, onMouseMove: we, onMouseLeave: J, onKeyDown: Q ? Pe : void 0, tabIndex: Q ? 0 : void 0, role: Q ? "button" : "img", "data-testid": `rf__edge-${r}`, "aria-label": U === null ? void 0 : U || `Edge from ${v} to ${w}`, "aria-describedby": Q ? `${oy}-${V}` : void 0, ref: K },
|
|
6759
|
+
!Ae && H.createElement(e, { id: r, source: v, target: w, selected: c, animated: u, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, data: a, style: b, sourceX: R, sourceY: S, targetX: $, targetY: T, sourcePosition: q, targetPosition: F, sourceHandleId: M, targetHandleId: _, markerStart: ae, markerEnd: X, pathOptions: W, interactionWidth: j }),
|
|
6760
6760
|
B && H.createElement(
|
|
6761
6761
|
H.Fragment,
|
|
6762
6762
|
null,
|
|
6763
|
-
(B === "source" || B === !0) && H.createElement(Td, { position: q, centerX: R, centerY: S, radius: C, onMouseDown: fe, onMouseEnter: oe, onMouseOut:
|
|
6764
|
-
(B === "target" || B === !0) && H.createElement(Td, { position: F, centerX: $, centerY:
|
|
6763
|
+
(B === "source" || B === !0) && H.createElement(Td, { position: q, centerX: R, centerY: S, radius: C, onMouseDown: fe, onMouseEnter: oe, onMouseOut: Ce, type: "source" }),
|
|
6764
|
+
(B === "target" || B === !0) && H.createElement(Td, { position: F, centerX: $, centerY: T, radius: C, onMouseDown: ge, onMouseEnter: oe, onMouseOut: Ce, type: "target" })
|
|
6765
6765
|
)
|
|
6766
6766
|
);
|
|
6767
6767
|
};
|
|
6768
|
-
return t.displayName = "EdgeWrapper",
|
|
6768
|
+
return t.displayName = "EdgeWrapper", xe(t);
|
|
6769
6769
|
};
|
|
6770
6770
|
function j2(e) {
|
|
6771
6771
|
const t = {
|
|
@@ -6835,7 +6835,7 @@ function U2({ sourcePos: e, targetPos: t, sourceWidth: r, sourceHeight: n, targe
|
|
|
6835
6835
|
}
|
|
6836
6836
|
function Rd(e) {
|
|
6837
6837
|
var n, s, a, i, o;
|
|
6838
|
-
const t = ((n = e == null ? void 0 : e[
|
|
6838
|
+
const t = ((n = e == null ? void 0 : e[Ee]) == null ? void 0 : n.handleBounds) || null, r = t && (e == null ? void 0 : e.width) && (e == null ? void 0 : e.height) && typeof ((s = e == null ? void 0 : e.positionAbsolute) == null ? void 0 : s.x) < "u" && typeof ((a = e == null ? void 0 : e.positionAbsolute) == null ? void 0 : a.y) < "u";
|
|
6839
6839
|
return [
|
|
6840
6840
|
{
|
|
6841
6841
|
x: ((i = e == null ? void 0 : e.positionAbsolute) == null ? void 0 : i.x) || 0,
|
|
@@ -6855,7 +6855,7 @@ function K2(e, t, r = !1) {
|
|
|
6855
6855
|
const c = je(o.zIndex);
|
|
6856
6856
|
let u = c ? o.zIndex : 0;
|
|
6857
6857
|
if (r) {
|
|
6858
|
-
const m = t.get(o.target), h = t.get(o.source), g = o.selected || (m == null ? void 0 : m.selected) || (h == null ? void 0 : h.selected), y = Math.max(((l = h == null ? void 0 : h[
|
|
6858
|
+
const m = t.get(o.target), h = t.get(o.source), g = o.selected || (m == null ? void 0 : m.selected) || (h == null ? void 0 : h.selected), y = Math.max(((l = h == null ? void 0 : h[Ee]) == null ? void 0 : l.z) || 0, ((f = m == null ? void 0 : m[Ee]) == null ? void 0 : f.z) || 0, 1e3);
|
|
6859
6859
|
u = (c ? o.zIndex : 0) + (g ? y : 0);
|
|
6860
6860
|
}
|
|
6861
6861
|
return i[u] ? i[u].push(o) : i[u] = [o], n = u > n ? u : n, i;
|
|
@@ -6898,8 +6898,8 @@ const Q2 = ({ color: e = "none", strokeWidth: t = 1 }) => H.createElement("polyl
|
|
|
6898
6898
|
[_n.ArrowClosed]: X2
|
|
6899
6899
|
};
|
|
6900
6900
|
function Z2(e) {
|
|
6901
|
-
const t =
|
|
6902
|
-
return
|
|
6901
|
+
const t = Ie();
|
|
6902
|
+
return Te(() => {
|
|
6903
6903
|
var s, a;
|
|
6904
6904
|
return Object.prototype.hasOwnProperty.call(Md, e) ? Md[e] : ((a = (s = t.getState()).onError) == null || a.call(s, "009", Xe.error009(e)), null);
|
|
6905
6905
|
}, [e]);
|
|
@@ -6928,7 +6928,7 @@ const J2 = ({ id: e, type: t, color: r, width: n = 12.5, height: s = 12.5, marke
|
|
|
6928
6928
|
return H.createElement("defs", null, r.map((n) => H.createElement(J2, { id: n.id, key: n.id, type: n.type, color: n.color, width: n.width, height: n.height, markerUnits: n.markerUnits, strokeWidth: n.strokeWidth, orient: n.orient })));
|
|
6929
6929
|
};
|
|
6930
6930
|
xy.displayName = "MarkerDefinitions";
|
|
6931
|
-
var tS =
|
|
6931
|
+
var tS = xe(xy);
|
|
6932
6932
|
const rS = (e) => ({
|
|
6933
6933
|
nodesConnectable: e.nodesConnectable,
|
|
6934
6934
|
edgesFocusable: e.edgesFocusable,
|
|
@@ -6940,32 +6940,32 @@ const rS = (e) => ({
|
|
|
6940
6940
|
nodeInternals: e.nodeInternals,
|
|
6941
6941
|
onError: e.onError
|
|
6942
6942
|
}), wy = ({ defaultMarkerColor: e, onlyRenderVisibleElements: t, elevateEdgesOnSelect: r, rfId: n, edgeTypes: s, noPanClassName: a, onEdgeContextMenu: i, onEdgeMouseEnter: o, onEdgeMouseMove: c, onEdgeMouseLeave: u, onEdgeClick: l, onEdgeDoubleClick: f, onReconnect: m, onReconnectStart: h, onReconnectEnd: g, reconnectRadius: y, children: b, disableKeyboardA11y: v }) => {
|
|
6943
|
-
const { edgesFocusable: w, edgesUpdatable: R, elementsSelectable: S, width: $, height:
|
|
6943
|
+
const { edgesFocusable: w, edgesUpdatable: R, elementsSelectable: S, width: $, height: T, connectionMode: q, nodeInternals: F, onError: A } = ye(rS, Me), D = Y2(t, F, r);
|
|
6944
6944
|
return $ ? H.createElement(
|
|
6945
6945
|
H.Fragment,
|
|
6946
6946
|
null,
|
|
6947
6947
|
D.map(({ level: M, edges: _, isMaxLevel: E }) => H.createElement(
|
|
6948
6948
|
"svg",
|
|
6949
|
-
{ key: M, style: { zIndex: M }, width: $, height:
|
|
6949
|
+
{ key: M, style: { zIndex: M }, width: $, height: T, className: "react-flow__edges react-flow__container" },
|
|
6950
6950
|
E && H.createElement(tS, { defaultColor: e, rfId: n }),
|
|
6951
6951
|
H.createElement("g", null, _.map((p) => {
|
|
6952
6952
|
const [N, k, C] = Rd(F.get(p.source)), [P, I, O] = Rd(F.get(p.target));
|
|
6953
6953
|
if (!C || !O)
|
|
6954
6954
|
return null;
|
|
6955
6955
|
let L = p.type || "default";
|
|
6956
|
-
s[L] || (
|
|
6956
|
+
s[L] || (A == null || A("011", Xe.error011(L)), L = "default");
|
|
6957
6957
|
const z = s[L] || s.default, V = q === Tt.Strict ? I.target : (I.target ?? []).concat(I.source ?? []), U = Cd(k.source, p.sourceHandle), Q = Cd(V, p.targetHandle), B = (U == null ? void 0 : U.position) || ee.Bottom, W = (Q == null ? void 0 : Q.position) || ee.Top, j = !!(p.focusable || w && typeof p.focusable > "u"), G = p.reconnectable || p.updatable, K = typeof m < "u" && (G || R && typeof G > "u");
|
|
6958
6958
|
if (!U || !Q)
|
|
6959
|
-
return
|
|
6960
|
-
const { sourceX:
|
|
6961
|
-
return H.createElement(z, { key: p.id, id: p.id, className: Oe([p.className, a]), type: L, data: p.data, selected: !!p.selected, animated: !!p.animated, hidden: !!p.hidden, label: p.label, labelStyle: p.labelStyle, labelShowBg: p.labelShowBg, labelBgStyle: p.labelBgStyle, labelBgPadding: p.labelBgPadding, labelBgBorderRadius: p.labelBgBorderRadius, style: p.style, source: p.source, target: p.target, sourceHandleId: p.sourceHandle, targetHandleId: p.targetHandle, markerEnd: p.markerEnd, markerStart: p.markerStart, sourceX:
|
|
6959
|
+
return A == null || A("008", Xe.error008(U, p)), null;
|
|
6960
|
+
const { sourceX: me, sourceY: be, targetX: Ae, targetY: Ne } = G2(N, U, B, P, Q, W);
|
|
6961
|
+
return H.createElement(z, { key: p.id, id: p.id, className: Oe([p.className, a]), type: L, data: p.data, selected: !!p.selected, animated: !!p.animated, hidden: !!p.hidden, label: p.label, labelStyle: p.labelStyle, labelShowBg: p.labelShowBg, labelBgStyle: p.labelBgStyle, labelBgPadding: p.labelBgPadding, labelBgBorderRadius: p.labelBgBorderRadius, style: p.style, source: p.source, target: p.target, sourceHandleId: p.sourceHandle, targetHandleId: p.targetHandle, markerEnd: p.markerEnd, markerStart: p.markerStart, sourceX: me, sourceY: be, targetX: Ae, targetY: Ne, sourcePosition: B, targetPosition: W, elementsSelectable: S, onContextMenu: i, onMouseEnter: o, onMouseMove: c, onMouseLeave: u, onClick: l, onEdgeDoubleClick: f, onReconnect: m, onReconnectStart: h, onReconnectEnd: g, reconnectRadius: y, rfId: n, ariaLabel: p.ariaLabel, isFocusable: j, isReconnectable: K, pathOptions: "pathOptions" in p ? p.pathOptions : void 0, interactionWidth: p.interactionWidth, disableKeyboardA11y: v });
|
|
6962
6962
|
}))
|
|
6963
6963
|
)),
|
|
6964
6964
|
b
|
|
6965
6965
|
) : null;
|
|
6966
6966
|
};
|
|
6967
6967
|
wy.displayName = "EdgeRenderer";
|
|
6968
|
-
var nS =
|
|
6968
|
+
var nS = xe(wy);
|
|
6969
6969
|
const sS = (e) => `translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;
|
|
6970
6970
|
function aS({ children: e }) {
|
|
6971
6971
|
const t = ye(sS);
|
|
@@ -6983,18 +6983,18 @@ const oS = {
|
|
|
6983
6983
|
[ee.Top]: ee.Bottom,
|
|
6984
6984
|
[ee.Bottom]: ee.Top
|
|
6985
6985
|
}, _y = ({ nodeId: e, handleType: t, style: r, type: n = wt.Bezier, CustomComponent: s, connectionStatus: a }) => {
|
|
6986
|
-
var
|
|
6987
|
-
const { fromNode: i, handleId: o, toX: c, toY: u, connectionMode: l } = ye(te((
|
|
6988
|
-
fromNode:
|
|
6989
|
-
handleId:
|
|
6990
|
-
toX: (
|
|
6991
|
-
toY: (
|
|
6992
|
-
connectionMode:
|
|
6993
|
-
}), [e]),
|
|
6986
|
+
var T, q, F;
|
|
6987
|
+
const { fromNode: i, handleId: o, toX: c, toY: u, connectionMode: l } = ye(te((A) => ({
|
|
6988
|
+
fromNode: A.nodeInternals.get(e),
|
|
6989
|
+
handleId: A.connectionHandleId,
|
|
6990
|
+
toX: (A.connectionPosition.x - A.transform[0]) / A.transform[2],
|
|
6991
|
+
toY: (A.connectionPosition.y - A.transform[1]) / A.transform[2],
|
|
6992
|
+
connectionMode: A.connectionMode
|
|
6993
|
+
}), [e]), Me), f = (T = i == null ? void 0 : i[Ee]) == null ? void 0 : T.handleBounds;
|
|
6994
6994
|
let m = f == null ? void 0 : f[t];
|
|
6995
6995
|
if (l === Tt.Loose && (m = m || (f == null ? void 0 : f[t === "source" ? "target" : "source"])), !i || !m)
|
|
6996
6996
|
return null;
|
|
6997
|
-
const h = o ? m.find((
|
|
6997
|
+
const h = o ? m.find((A) => A.id === o) : m[0], g = h ? h.x + h.width / 2 : (i.width ?? 0) / 2, y = h ? h.y + h.height / 2 : i.height ?? 0, b = (((q = i.positionAbsolute) == null ? void 0 : q.x) ?? 0) + g, v = (((F = i.positionAbsolute) == null ? void 0 : F.y) ?? 0) + y, w = h == null ? void 0 : h.position, R = w ? oS[w] : null;
|
|
6998
6998
|
if (!w || !R)
|
|
6999
6999
|
return null;
|
|
7000
7000
|
if (s)
|
|
@@ -7023,7 +7023,7 @@ const lS = (e) => ({
|
|
|
7023
7023
|
height: e.height
|
|
7024
7024
|
});
|
|
7025
7025
|
function cS({ containerStyle: e, style: t, type: r, component: n }) {
|
|
7026
|
-
const { nodeId: s, handleType: a, nodesConnectable: i, width: o, height: c, connectionStatus: u } = ye(lS,
|
|
7026
|
+
const { nodeId: s, handleType: a, nodesConnectable: i, width: o, height: c, connectionStatus: u } = ye(lS, Me);
|
|
7027
7027
|
return !(s && a && o && i) ? null : H.createElement(
|
|
7028
7028
|
"svg",
|
|
7029
7029
|
{ style: e, width: o, height: c, className: "react-flow__edges react-flow__connectionline react-flow__container" },
|
|
@@ -7035,36 +7035,36 @@ function cS({ containerStyle: e, style: t, type: r, component: n }) {
|
|
|
7035
7035
|
);
|
|
7036
7036
|
}
|
|
7037
7037
|
function Id(e, t) {
|
|
7038
|
-
const r = re(null), n =
|
|
7039
|
-
return
|
|
7038
|
+
const r = re(null), n = Ie();
|
|
7039
|
+
return Te(() => {
|
|
7040
7040
|
var a, i;
|
|
7041
7041
|
if (process.env.NODE_ENV === "development") {
|
|
7042
7042
|
const o = Object.keys(e);
|
|
7043
|
-
|
|
7043
|
+
Me(r.current, o) && ((i = (a = n.getState()).onError) == null || i.call(a, "002", Xe.error002())), r.current = o;
|
|
7044
7044
|
}
|
|
7045
7045
|
return t(e);
|
|
7046
7046
|
}, [e]);
|
|
7047
7047
|
}
|
|
7048
|
-
const Ny = ({ nodeTypes: e, edgeTypes: t, onMove: r, onMoveStart: n, onMoveEnd: s, onInit: a, onNodeClick: i, onEdgeClick: o, onNodeDoubleClick: c, onEdgeDoubleClick: u, onNodeMouseEnter: l, onNodeMouseMove: f, onNodeMouseLeave: m, onNodeContextMenu: h, onSelectionContextMenu: g, onSelectionStart: y, onSelectionEnd: b, connectionLineType: v, connectionLineStyle: w, connectionLineComponent: R, connectionLineContainerStyle: S, selectionKeyCode: $, selectionOnDrag:
|
|
7048
|
+
const Ny = ({ nodeTypes: e, edgeTypes: t, onMove: r, onMoveStart: n, onMoveEnd: s, onInit: a, onNodeClick: i, onEdgeClick: o, onNodeDoubleClick: c, onEdgeDoubleClick: u, onNodeMouseEnter: l, onNodeMouseMove: f, onNodeMouseLeave: m, onNodeContextMenu: h, onSelectionContextMenu: g, onSelectionStart: y, onSelectionEnd: b, connectionLineType: v, connectionLineStyle: w, connectionLineComponent: R, connectionLineContainerStyle: S, selectionKeyCode: $, selectionOnDrag: T, selectionMode: q, multiSelectionKeyCode: F, panActivationKeyCode: A, zoomActivationKeyCode: D, deleteKeyCode: M, onlyRenderVisibleElements: _, elementsSelectable: E, selectNodesOnDrag: p, defaultViewport: N, translateExtent: k, minZoom: C, maxZoom: P, preventScrolling: I, defaultMarkerColor: O, zoomOnScroll: L, zoomOnPinch: z, panOnScroll: V, panOnScrollSpeed: U, panOnScrollMode: Q, zoomOnDoubleClick: B, panOnDrag: W, onPaneClick: j, onPaneMouseEnter: G, onPaneMouseMove: K, onPaneMouseLeave: me, onPaneScroll: be, onPaneContextMenu: Ae, onEdgeContextMenu: Ne, onEdgeMouseEnter: ne, onEdgeMouseMove: ae, onEdgeMouseLeave: X, onReconnect: Z, onReconnectStart: pe, onReconnectEnd: ke, reconnectRadius: De, noDragClassName: we, noWheelClassName: J, noPanClassName: ie, elevateEdgesOnSelect: fe, disableKeyboardA11y: ge, nodeOrigin: oe, nodeExtent: Ce, rfId: ue }) => {
|
|
7049
7049
|
const Pe = Id(e, $2), qe = Id(t, j2);
|
|
7050
7050
|
return iS(a), H.createElement(
|
|
7051
7051
|
O2,
|
|
7052
|
-
{ onPaneClick: j, onPaneMouseEnter: G, onPaneMouseMove: K, onPaneMouseLeave:
|
|
7052
|
+
{ onPaneClick: j, onPaneMouseEnter: G, onPaneMouseMove: K, onPaneMouseLeave: me, onPaneContextMenu: Ae, onPaneScroll: be, deleteKeyCode: M, selectionKeyCode: $, selectionOnDrag: T, selectionMode: q, onSelectionStart: y, onSelectionEnd: b, multiSelectionKeyCode: F, panActivationKeyCode: A, zoomActivationKeyCode: D, elementsSelectable: E, onMove: r, onMoveStart: n, onMoveEnd: s, zoomOnScroll: L, zoomOnPinch: z, zoomOnDoubleClick: B, panOnScroll: V, panOnScrollSpeed: U, panOnScrollMode: Q, panOnDrag: W, defaultViewport: N, translateExtent: k, minZoom: C, maxZoom: P, onSelectionContextMenu: g, preventScrolling: I, noDragClassName: we, noWheelClassName: J, noPanClassName: ie, disableKeyboardA11y: ge },
|
|
7053
7053
|
H.createElement(
|
|
7054
7054
|
aS,
|
|
7055
7055
|
null,
|
|
7056
7056
|
H.createElement(
|
|
7057
7057
|
nS,
|
|
7058
|
-
{ edgeTypes: qe, onEdgeClick: o, onEdgeDoubleClick: u, onlyRenderVisibleElements: _, onEdgeContextMenu:
|
|
7058
|
+
{ edgeTypes: qe, onEdgeClick: o, onEdgeDoubleClick: u, onlyRenderVisibleElements: _, onEdgeContextMenu: Ne, onEdgeMouseEnter: ne, onEdgeMouseMove: ae, onEdgeMouseLeave: X, onReconnect: Z, onReconnectStart: pe, onReconnectEnd: ke, reconnectRadius: De, defaultMarkerColor: O, noPanClassName: ie, elevateEdgesOnSelect: !!fe, disableKeyboardA11y: ge, rfId: ue },
|
|
7059
7059
|
H.createElement(cS, { style: w, type: v, component: R, containerStyle: S })
|
|
7060
7060
|
),
|
|
7061
7061
|
H.createElement("div", { className: "react-flow__edgelabel-renderer" }),
|
|
7062
|
-
H.createElement(z2, { nodeTypes: Pe, onNodeClick: i, onNodeDoubleClick: c, onNodeMouseEnter: l, onNodeMouseMove: f, onNodeMouseLeave: m, onNodeContextMenu: h, selectNodesOnDrag: p, onlyRenderVisibleElements: _, noPanClassName: ie, noDragClassName:
|
|
7062
|
+
H.createElement(z2, { nodeTypes: Pe, onNodeClick: i, onNodeDoubleClick: c, onNodeMouseEnter: l, onNodeMouseMove: f, onNodeMouseLeave: m, onNodeContextMenu: h, selectNodesOnDrag: p, onlyRenderVisibleElements: _, noPanClassName: ie, noDragClassName: we, disableKeyboardA11y: ge, nodeOrigin: oe, nodeExtent: Ce, rfId: ue })
|
|
7063
7063
|
)
|
|
7064
7064
|
);
|
|
7065
7065
|
};
|
|
7066
7066
|
Ny.displayName = "GraphView";
|
|
7067
|
-
var uS =
|
|
7067
|
+
var uS = xe(Ny);
|
|
7068
7068
|
const Fc = [
|
|
7069
7069
|
[Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],
|
|
7070
7070
|
[Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]
|
|
@@ -7148,8 +7148,8 @@ const Fc = [
|
|
|
7148
7148
|
if (v != null && v.hidden)
|
|
7149
7149
|
s.set(v.id, {
|
|
7150
7150
|
...v,
|
|
7151
|
-
[
|
|
7152
|
-
...v[
|
|
7151
|
+
[Ee]: {
|
|
7152
|
+
...v[Ee],
|
|
7153
7153
|
// we need to reset the handle bounds when the node is hidden
|
|
7154
7154
|
// in order to force a new observation when the node is shown again
|
|
7155
7155
|
handleBounds: void 0
|
|
@@ -7159,8 +7159,8 @@ const Fc = [
|
|
|
7159
7159
|
const w = Xc(b.nodeElement);
|
|
7160
7160
|
!!(w.width && w.height && (v.width !== w.width || v.height !== w.height || b.forceUpdate)) && (s.set(v.id, {
|
|
7161
7161
|
...v,
|
|
7162
|
-
[
|
|
7163
|
-
...v[
|
|
7162
|
+
[Ee]: {
|
|
7163
|
+
...v[Ee],
|
|
7164
7164
|
handleBounds: {
|
|
7165
7165
|
source: Ed(".source", b.nodeElement, m, u),
|
|
7166
7166
|
target: Ed(".target", b.nodeElement, m, u)
|
|
@@ -7302,7 +7302,7 @@ const fS = {
|
|
|
7302
7302
|
overflow: "hidden",
|
|
7303
7303
|
position: "relative",
|
|
7304
7304
|
zIndex: 0
|
|
7305
|
-
}, Ay = kn(({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, className: s, nodeTypes: a = fS, edgeTypes: i = hS, onNodeClick: o, onEdgeClick: c, onInit: u, onMove: l, onMoveStart: f, onMoveEnd: m, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: b, onClickConnectEnd: v, onNodeMouseEnter: w, onNodeMouseMove: R, onNodeMouseLeave: S, onNodeContextMenu: $, onNodeDoubleClick:
|
|
7305
|
+
}, Ay = kn(({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, className: s, nodeTypes: a = fS, edgeTypes: i = hS, onNodeClick: o, onEdgeClick: c, onInit: u, onMove: l, onMoveStart: f, onMoveEnd: m, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: b, onClickConnectEnd: v, onNodeMouseEnter: w, onNodeMouseMove: R, onNodeMouseLeave: S, onNodeContextMenu: $, onNodeDoubleClick: T, onNodeDragStart: q, onNodeDrag: F, onNodeDragStop: A, onNodesDelete: D, onEdgesDelete: M, onSelectionChange: _, onSelectionDragStart: E, onSelectionDrag: p, onSelectionDragStop: N, onSelectionContextMenu: k, onSelectionStart: C, onSelectionEnd: P, connectionMode: I = Tt.Strict, connectionLineType: O = wt.Bezier, connectionLineStyle: L, connectionLineComponent: z, connectionLineContainerStyle: V, deleteKeyCode: U = "Backspace", selectionKeyCode: Q = "Shift", selectionOnDrag: B = !1, selectionMode: W = Lr.Full, panActivationKeyCode: j = "Space", multiSelectionKeyCode: G = wn() ? "Meta" : "Control", zoomActivationKeyCode: K = wn() ? "Meta" : "Control", snapToGrid: me = !1, snapGrid: be = pS, onlyRenderVisibleElements: Ae = !1, selectNodesOnDrag: Ne = !0, nodesDraggable: ne, nodesConnectable: ae, nodesFocusable: X, nodeOrigin: Z = mS, edgesFocusable: pe, edgesUpdatable: ke, elementsSelectable: De, defaultViewport: we = gS, minZoom: J = 0.5, maxZoom: ie = 2, translateExtent: fe = Fc, preventScrolling: ge = !0, nodeExtent: oe, defaultMarkerColor: Ce = "#b1b1b7", zoomOnScroll: ue = !0, zoomOnPinch: Pe = !0, panOnScroll: qe = !1, panOnScrollSpeed: ze = 0.5, panOnScrollMode: Le = Ot.Free, zoomOnDoubleClick: $e = !0, panOnDrag: Mt = !0, onPaneClick: ot, onPaneMouseEnter: tt, onPaneMouseMove: mr, onPaneMouseLeave: ns, onPaneScroll: pr, onPaneContextMenu: ss, children: ku, onEdgeContextMenu: It, onEdgeDoubleClick: Jb, onEdgeMouseEnter: ev, onEdgeMouseMove: tv, onEdgeMouseLeave: rv, onEdgeUpdate: nv, onEdgeUpdateStart: sv, onEdgeUpdateEnd: av, onReconnect: iv, onReconnectStart: ov, onReconnectEnd: lv, reconnectRadius: cv = 10, edgeUpdaterRadius: uv = 10, onNodesChange: dv, onEdgesChange: fv, noDragClassName: hv = "nodrag", noWheelClassName: mv = "nowheel", noPanClassName: Cu = "nopan", fitView: pv = !1, fitViewOptions: gv, connectOnClick: yv = !0, attributionPosition: bv, proOptions: vv, defaultEdgeOptions: xv, elevateNodesOnSelect: wv = !0, elevateEdgesOnSelect: _v = !1, disableKeyboardA11y: Ru = !1, autoPanOnConnect: Nv = !0, autoPanOnNodeDrag: Sv = !0, connectionRadius: Ev = 20, isValidConnection: Av, onError: Tv, style: kv, id: Mu, nodeDragThreshold: Cv, ...Rv }, Mv) => {
|
|
7306
7306
|
const as = Mu || "1";
|
|
7307
7307
|
return H.createElement(
|
|
7308
7308
|
"div",
|
|
@@ -7310,8 +7310,8 @@ const fS = {
|
|
|
7310
7310
|
H.createElement(
|
|
7311
7311
|
Ey,
|
|
7312
7312
|
null,
|
|
7313
|
-
H.createElement(uS, { onInit: u, onMove: l, onMoveStart: f, onMoveEnd: m, onNodeClick: o, onEdgeClick: c, onNodeMouseEnter: w, onNodeMouseMove: R, onNodeMouseLeave: S, onNodeContextMenu: $, onNodeDoubleClick:
|
|
7314
|
-
H.createElement(o2, { nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: b, onClickConnectEnd: v, nodesDraggable: ne, nodesConnectable: ae, nodesFocusable: X, edgesFocusable:
|
|
7313
|
+
H.createElement(uS, { onInit: u, onMove: l, onMoveStart: f, onMoveEnd: m, onNodeClick: o, onEdgeClick: c, onNodeMouseEnter: w, onNodeMouseMove: R, onNodeMouseLeave: S, onNodeContextMenu: $, onNodeDoubleClick: T, nodeTypes: a, edgeTypes: i, connectionLineType: O, connectionLineStyle: L, connectionLineComponent: z, connectionLineContainerStyle: V, selectionKeyCode: Q, selectionOnDrag: B, selectionMode: W, deleteKeyCode: U, multiSelectionKeyCode: G, panActivationKeyCode: j, zoomActivationKeyCode: K, onlyRenderVisibleElements: Ae, selectNodesOnDrag: Ne, defaultViewport: we, translateExtent: fe, minZoom: J, maxZoom: ie, preventScrolling: ge, zoomOnScroll: ue, zoomOnPinch: Pe, zoomOnDoubleClick: $e, panOnScroll: qe, panOnScrollSpeed: ze, panOnScrollMode: Le, panOnDrag: Mt, onPaneClick: ot, onPaneMouseEnter: tt, onPaneMouseMove: mr, onPaneMouseLeave: ns, onPaneScroll: pr, onPaneContextMenu: ss, onSelectionContextMenu: k, onSelectionStart: C, onSelectionEnd: P, onEdgeContextMenu: It, onEdgeDoubleClick: Jb, onEdgeMouseEnter: ev, onEdgeMouseMove: tv, onEdgeMouseLeave: rv, onReconnect: iv ?? nv, onReconnectStart: ov ?? sv, onReconnectEnd: lv ?? av, reconnectRadius: cv ?? uv, defaultMarkerColor: Ce, noDragClassName: hv, noWheelClassName: mv, noPanClassName: Cu, elevateEdgesOnSelect: _v, rfId: as, disableKeyboardA11y: Ru, nodeOrigin: Z, nodeExtent: oe }),
|
|
7314
|
+
H.createElement(o2, { nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: b, onClickConnectEnd: v, nodesDraggable: ne, nodesConnectable: ae, nodesFocusable: X, edgesFocusable: pe, edgesUpdatable: ke, elementsSelectable: De, elevateNodesOnSelect: wv, minZoom: J, maxZoom: ie, nodeExtent: oe, onNodesChange: dv, onEdgesChange: fv, snapToGrid: me, snapGrid: be, connectionMode: I, translateExtent: fe, connectOnClick: yv, defaultEdgeOptions: xv, fitView: pv, fitViewOptions: gv, onNodesDelete: D, onEdgesDelete: M, onNodeDragStart: q, onNodeDrag: F, onNodeDragStop: A, onSelectionDrag: p, onSelectionDragStart: E, onSelectionDragStop: N, noPanClassName: Cu, nodeOrigin: Z, rfId: as, autoPanOnConnect: Nv, autoPanOnNodeDrag: Sv, onError: Tv, connectionRadius: Ev, isValidConnection: Av, nodeDragThreshold: Cv }),
|
|
7315
7315
|
H.createElement(a2, { onSelectionChange: _ }),
|
|
7316
7316
|
ku,
|
|
7317
7317
|
H.createElement(ON, { proOptions: vv, position: bv }),
|
|
@@ -7339,7 +7339,7 @@ const xS = Ty(fy), wS = Ty(A2), ky = ({ id: e, x: t, y: r, width: n, height: s,
|
|
|
7339
7339
|
return H.createElement("rect", { className: Oe(["react-flow__minimap-node", { selected: h }, u]), x: t, y: r, rx: l, ry: l, width: n, height: s, fill: b, stroke: o, strokeWidth: c, shapeRendering: f, onClick: m ? (v) => m(v, e) : void 0 });
|
|
7340
7340
|
};
|
|
7341
7341
|
ky.displayName = "MiniMapNode";
|
|
7342
|
-
var _S =
|
|
7342
|
+
var _S = xe(ky);
|
|
7343
7343
|
const NS = (e) => e.nodeOrigin, SS = (e) => e.getNodes().filter((t) => !t.hidden && t.width && t.height), xs = (e) => e instanceof Function ? e : () => e;
|
|
7344
7344
|
function ES({
|
|
7345
7345
|
nodeStrokeColor: e = "transparent",
|
|
@@ -7352,13 +7352,13 @@ function ES({
|
|
|
7352
7352
|
nodeComponent: a = _S,
|
|
7353
7353
|
onClick: i
|
|
7354
7354
|
}) {
|
|
7355
|
-
const o = ye(SS,
|
|
7355
|
+
const o = ye(SS, Me), c = ye(NS), u = xs(t), l = xs(e), f = xs(r), m = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
|
|
7356
7356
|
return H.createElement(H.Fragment, null, o.map((h) => {
|
|
7357
7357
|
const { x: g, y } = $t(h, c).positionAbsolute;
|
|
7358
7358
|
return H.createElement(a, { key: h.id, x: g, y, width: h.width, height: h.height, style: h.style, selected: h.selected, className: f(h), color: u(h), borderRadius: n, strokeColor: l(h), strokeWidth: s, shapeRendering: m, onClick: i, id: h.id });
|
|
7359
7359
|
}));
|
|
7360
7360
|
}
|
|
7361
|
-
var AS =
|
|
7361
|
+
var AS = xe(ES);
|
|
7362
7362
|
const TS = 200, kS = 150, CS = (e) => {
|
|
7363
7363
|
const t = e.getNodes(), r = {
|
|
7364
7364
|
x: -e.transform[0] / e.transform[2],
|
|
@@ -7396,27 +7396,27 @@ function Cy({
|
|
|
7396
7396
|
zoomStep: w = 10,
|
|
7397
7397
|
offsetScale: R = 5
|
|
7398
7398
|
}) {
|
|
7399
|
-
const S =
|
|
7399
|
+
const S = Ie(), $ = re(null), { boundingRect: T, viewBB: q, rfId: F } = ye(CS, Me), A = (e == null ? void 0 : e.width) ?? TS, D = (e == null ? void 0 : e.height) ?? kS, M = T.width / A, _ = T.height / D, E = Math.max(M, _), p = E * A, N = E * D, k = R * E, C = T.x - (p - T.width) / 2 - k, P = T.y - (N - T.height) / 2 - k, I = p + k * 2, O = N + k * 2, L = `${RS}-${F}`, z = re(0);
|
|
7400
7400
|
z.current = E, se(() => {
|
|
7401
7401
|
if ($.current) {
|
|
7402
|
-
const Q =
|
|
7403
|
-
const { transform: K, d3Selection:
|
|
7404
|
-
if (G.sourceEvent.type !== "wheel" || !
|
|
7402
|
+
const Q = Se($.current), B = (G) => {
|
|
7403
|
+
const { transform: K, d3Selection: me, d3Zoom: be } = S.getState();
|
|
7404
|
+
if (G.sourceEvent.type !== "wheel" || !me || !be)
|
|
7405
7405
|
return;
|
|
7406
|
-
const
|
|
7407
|
-
be.scaleTo(
|
|
7406
|
+
const Ae = -G.sourceEvent.deltaY * (G.sourceEvent.deltaMode === 1 ? 0.05 : G.sourceEvent.deltaMode ? 1 : 2e-3) * w, Ne = K[2] * Math.pow(2, Ae);
|
|
7407
|
+
be.scaleTo(me, Ne);
|
|
7408
7408
|
}, W = (G) => {
|
|
7409
|
-
const { transform: K, d3Selection:
|
|
7410
|
-
if (G.sourceEvent.type !== "mousemove" || !
|
|
7409
|
+
const { transform: K, d3Selection: me, d3Zoom: be, translateExtent: Ae, width: Ne, height: ne } = S.getState();
|
|
7410
|
+
if (G.sourceEvent.type !== "mousemove" || !me || !be)
|
|
7411
7411
|
return;
|
|
7412
7412
|
const ae = z.current * Math.max(1, K[2]) * (v ? -1 : 1), X = {
|
|
7413
7413
|
x: K[0] - G.sourceEvent.movementX * ae,
|
|
7414
7414
|
y: K[1] - G.sourceEvent.movementY * ae
|
|
7415
7415
|
}, Z = [
|
|
7416
7416
|
[0, 0],
|
|
7417
|
-
[
|
|
7418
|
-
],
|
|
7419
|
-
be.transform(
|
|
7417
|
+
[Ne, ne]
|
|
7418
|
+
], pe = ht.translate(X.x, X.y).scale(K[2]), ke = be.constrain()(pe, Z, Ae);
|
|
7419
|
+
be.transform(me, ke);
|
|
7420
7420
|
}, j = kg().on("zoom", g ? W : null).on("zoom.wheel", y ? B : null);
|
|
7421
7421
|
return Q.call(j), () => {
|
|
7422
7422
|
Q.on("zoom", null);
|
|
@@ -7435,7 +7435,7 @@ function Cy({
|
|
|
7435
7435
|
{ position: f, style: e, className: Oe(["react-flow__minimap", t]), "data-testid": "rf__minimap" },
|
|
7436
7436
|
H.createElement(
|
|
7437
7437
|
"svg",
|
|
7438
|
-
{ width:
|
|
7438
|
+
{ width: A, height: D, viewBox: `${C} ${P} ${I} ${O}`, role: "img", "aria-labelledby": L, ref: $, onClick: V },
|
|
7439
7439
|
b && H.createElement("title", { id: L }, b),
|
|
7440
7440
|
H.createElement(AS, { onClick: U, nodeColor: n, nodeStrokeColor: r, nodeBorderRadius: a, nodeClassName: s, nodeStrokeWidth: i, nodeComponent: o }),
|
|
7441
7441
|
H.createElement("path", { className: "react-flow__minimap-mask", d: `M${C - k},${P - k}h${I + k * 2}v${O + k * 2}h${-I - k * 2}z
|
|
@@ -7444,7 +7444,7 @@ function Cy({
|
|
|
7444
7444
|
);
|
|
7445
7445
|
}
|
|
7446
7446
|
Cy.displayName = "MiniMap";
|
|
7447
|
-
var MS =
|
|
7447
|
+
var MS = xe(Cy);
|
|
7448
7448
|
function IS() {
|
|
7449
7449
|
return H.createElement(
|
|
7450
7450
|
"svg",
|
|
@@ -7487,14 +7487,14 @@ const $S = (e) => ({
|
|
|
7487
7487
|
minZoomReached: e.transform[2] <= e.minZoom,
|
|
7488
7488
|
maxZoomReached: e.transform[2] >= e.maxZoom
|
|
7489
7489
|
}), Ry = ({ style: e, showZoom: t = !0, showFitView: r = !0, showInteractive: n = !0, fitViewOptions: s, onZoomIn: a, onZoomOut: i, onFitView: o, onInteractiveChange: c, className: u, children: l, position: f = "bottom-left" }) => {
|
|
7490
|
-
const m =
|
|
7490
|
+
const m = Ie(), [h, g] = Y(!1), { isInteractive: y, minZoomReached: b, maxZoomReached: v } = ye($S, Me), { zoomIn: w, zoomOut: R, fitView: S } = au();
|
|
7491
7491
|
if (se(() => {
|
|
7492
7492
|
g(!0);
|
|
7493
7493
|
}, []), !h)
|
|
7494
7494
|
return null;
|
|
7495
7495
|
const $ = () => {
|
|
7496
7496
|
w(), a == null || a();
|
|
7497
|
-
},
|
|
7497
|
+
}, T = () => {
|
|
7498
7498
|
R(), i == null || i();
|
|
7499
7499
|
}, q = () => {
|
|
7500
7500
|
S(s), o == null || o();
|
|
@@ -7518,7 +7518,7 @@ const $S = (e) => ({
|
|
|
7518
7518
|
),
|
|
7519
7519
|
H.createElement(
|
|
7520
7520
|
Er,
|
|
7521
|
-
{ onClick:
|
|
7521
|
+
{ onClick: T, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled: b },
|
|
7522
7522
|
H.createElement(DS, null)
|
|
7523
7523
|
)
|
|
7524
7524
|
),
|
|
@@ -7532,7 +7532,7 @@ const $S = (e) => ({
|
|
|
7532
7532
|
);
|
|
7533
7533
|
};
|
|
7534
7534
|
Ry.displayName = "Controls";
|
|
7535
|
-
var FS =
|
|
7535
|
+
var FS = xe(Ry), Ge;
|
|
7536
7536
|
(function(e) {
|
|
7537
7537
|
e.Lines = "lines", e.Dots = "dots", e.Cross = "cross";
|
|
7538
7538
|
})(Ge || (Ge = {}));
|
|
@@ -7564,7 +7564,7 @@ function My({
|
|
|
7564
7564
|
style: o,
|
|
7565
7565
|
className: c
|
|
7566
7566
|
}) {
|
|
7567
|
-
const u = re(null), { transform: l, patternId: f } = ye(HS,
|
|
7567
|
+
const u = re(null), { transform: l, patternId: f } = ye(HS, Me), m = i || VS[t], h = n || BS[t], g = t === Ge.Dots, y = t === Ge.Cross, b = Array.isArray(r) ? r : [r, r], v = [b[0] * l[2] || 1, b[1] * l[2] || 1], w = h * l[2], R = y ? [w, w] : v, S = g ? [w / a, w / a] : [R[0] / a, R[1] / a];
|
|
7568
7568
|
return H.createElement(
|
|
7569
7569
|
"svg",
|
|
7570
7570
|
{ className: Oe(["react-flow__background", c]), style: {
|
|
@@ -7580,7 +7580,7 @@ function My({
|
|
|
7580
7580
|
);
|
|
7581
7581
|
}
|
|
7582
7582
|
My.displayName = "Background";
|
|
7583
|
-
var jS =
|
|
7583
|
+
var jS = xe(My);
|
|
7584
7584
|
function GS({ data: e }) {
|
|
7585
7585
|
const { cube: t, onFieldClick: r, isHighlighted: n, highlightedFields: s, searchTerm: a } = e, i = () => {
|
|
7586
7586
|
}, o = (h, g) => {
|
|
@@ -8448,7 +8448,7 @@ function Vr() {
|
|
|
8448
8448
|
return va = a, va;
|
|
8449
8449
|
}
|
|
8450
8450
|
var xa, Df;
|
|
8451
|
-
function
|
|
8451
|
+
function Re() {
|
|
8452
8452
|
if (Df) return xa;
|
|
8453
8453
|
Df = 1;
|
|
8454
8454
|
var e = Array.isArray;
|
|
@@ -8495,8 +8495,8 @@ var Sa, Ff;
|
|
|
8495
8495
|
function SE() {
|
|
8496
8496
|
if (Ff) return Sa;
|
|
8497
8497
|
Ff = 1;
|
|
8498
|
-
var e = Pt(), t = du(), r = it(), n = "[object Arguments]", s = "[object Array]", a = "[object Boolean]", i = "[object Date]", o = "[object Error]", c = "[object Function]", u = "[object Map]", l = "[object Number]", f = "[object Object]", m = "[object RegExp]", h = "[object Set]", g = "[object String]", y = "[object WeakMap]", b = "[object ArrayBuffer]", v = "[object DataView]", w = "[object Float32Array]", R = "[object Float64Array]", S = "[object Int8Array]", $ = "[object Int16Array]",
|
|
8499
|
-
M[w] = M[R] = M[S] = M[$] = M[
|
|
8498
|
+
var e = Pt(), t = du(), r = it(), n = "[object Arguments]", s = "[object Array]", a = "[object Boolean]", i = "[object Date]", o = "[object Error]", c = "[object Function]", u = "[object Map]", l = "[object Number]", f = "[object Object]", m = "[object RegExp]", h = "[object Set]", g = "[object String]", y = "[object WeakMap]", b = "[object ArrayBuffer]", v = "[object DataView]", w = "[object Float32Array]", R = "[object Float64Array]", S = "[object Int8Array]", $ = "[object Int16Array]", T = "[object Int32Array]", q = "[object Uint8Array]", F = "[object Uint8ClampedArray]", A = "[object Uint16Array]", D = "[object Uint32Array]", M = {};
|
|
8499
|
+
M[w] = M[R] = M[S] = M[$] = M[T] = M[q] = M[F] = M[A] = M[D] = !0, M[n] = M[s] = M[b] = M[a] = M[v] = M[i] = M[o] = M[c] = M[u] = M[l] = M[f] = M[m] = M[h] = M[g] = M[y] = !1;
|
|
8500
8500
|
function _(E) {
|
|
8501
8501
|
return r(E) && t(E.length) && !!M[e(E)];
|
|
8502
8502
|
}
|
|
@@ -8537,7 +8537,7 @@ var Ta, Bf;
|
|
|
8537
8537
|
function Oy() {
|
|
8538
8538
|
if (Bf) return Ta;
|
|
8539
8539
|
Bf = 1;
|
|
8540
|
-
var e = wE(), t = Vr(), r =
|
|
8540
|
+
var e = wE(), t = Vr(), r = Re(), n = ur(), s = Gn(), a = Br(), i = Object.prototype, o = i.hasOwnProperty;
|
|
8541
8541
|
function c(u, l) {
|
|
8542
8542
|
var f = r(u), m = !f && t(u), h = !f && !m && n(u), g = !f && !m && !h && a(u), y = f || m || h || g, b = y ? e(u.length, String) : [], v = b.length;
|
|
8543
8543
|
for (var w in u)
|
|
@@ -8783,7 +8783,7 @@ var Ka, uh;
|
|
|
8783
8783
|
function By() {
|
|
8784
8784
|
if (uh) return Ka;
|
|
8785
8785
|
uh = 1;
|
|
8786
|
-
var e = pu(), t =
|
|
8786
|
+
var e = pu(), t = Re();
|
|
8787
8787
|
function r(n, s, a) {
|
|
8788
8788
|
var i = s(n);
|
|
8789
8789
|
return t(n) ? i : e(i, a(n));
|
|
@@ -8844,9 +8844,9 @@ function dr() {
|
|
|
8844
8844
|
yh = 1;
|
|
8845
8845
|
var e = DE(), t = lu(), r = qE(), n = jy(), s = OE(), a = Pt(), i = Dy(), o = "[object Map]", c = "[object Object]", u = "[object Promise]", l = "[object Set]", f = "[object WeakMap]", m = "[object DataView]", h = i(e), g = i(t), y = i(r), b = i(n), v = i(s), w = a;
|
|
8846
8846
|
return (e && w(new e(new ArrayBuffer(1))) != m || t && w(new t()) != o || r && w(r.resolve()) != u || n && w(new n()) != l || s && w(new s()) != f) && (w = function(R) {
|
|
8847
|
-
var S = a(R), $ = S == c ? R.constructor : void 0,
|
|
8848
|
-
if (
|
|
8849
|
-
switch (
|
|
8847
|
+
var S = a(R), $ = S == c ? R.constructor : void 0, T = $ ? i($) : "";
|
|
8848
|
+
if (T)
|
|
8849
|
+
switch (T) {
|
|
8850
8850
|
case h:
|
|
8851
8851
|
return m;
|
|
8852
8852
|
case g:
|
|
@@ -8937,17 +8937,17 @@ var ci, Eh;
|
|
|
8937
8937
|
function zE() {
|
|
8938
8938
|
if (Eh) return ci;
|
|
8939
8939
|
Eh = 1;
|
|
8940
|
-
var e = gu(), t = $E(), r = FE(), n = PE(), s = Uy(), a = "[object Boolean]", i = "[object Date]", o = "[object Map]", c = "[object Number]", u = "[object RegExp]", l = "[object Set]", f = "[object String]", m = "[object Symbol]", h = "[object ArrayBuffer]", g = "[object DataView]", y = "[object Float32Array]", b = "[object Float64Array]", v = "[object Int8Array]", w = "[object Int16Array]", R = "[object Int32Array]", S = "[object Uint8Array]", $ = "[object Uint8ClampedArray]",
|
|
8941
|
-
function F(
|
|
8942
|
-
var _ =
|
|
8940
|
+
var e = gu(), t = $E(), r = FE(), n = PE(), s = Uy(), a = "[object Boolean]", i = "[object Date]", o = "[object Map]", c = "[object Number]", u = "[object RegExp]", l = "[object Set]", f = "[object String]", m = "[object Symbol]", h = "[object ArrayBuffer]", g = "[object DataView]", y = "[object Float32Array]", b = "[object Float64Array]", v = "[object Int8Array]", w = "[object Int16Array]", R = "[object Int32Array]", S = "[object Uint8Array]", $ = "[object Uint8ClampedArray]", T = "[object Uint16Array]", q = "[object Uint32Array]";
|
|
8941
|
+
function F(A, D, M) {
|
|
8942
|
+
var _ = A.constructor;
|
|
8943
8943
|
switch (D) {
|
|
8944
8944
|
case h:
|
|
8945
|
-
return e(
|
|
8945
|
+
return e(A);
|
|
8946
8946
|
case a:
|
|
8947
8947
|
case i:
|
|
8948
|
-
return new _(+
|
|
8948
|
+
return new _(+A);
|
|
8949
8949
|
case g:
|
|
8950
|
-
return t(
|
|
8950
|
+
return t(A, M);
|
|
8951
8951
|
case y:
|
|
8952
8952
|
case b:
|
|
8953
8953
|
case v:
|
|
@@ -8955,20 +8955,20 @@ function zE() {
|
|
|
8955
8955
|
case R:
|
|
8956
8956
|
case S:
|
|
8957
8957
|
case $:
|
|
8958
|
-
case
|
|
8958
|
+
case T:
|
|
8959
8959
|
case q:
|
|
8960
|
-
return s(
|
|
8960
|
+
return s(A, M);
|
|
8961
8961
|
case o:
|
|
8962
8962
|
return new _();
|
|
8963
8963
|
case c:
|
|
8964
8964
|
case f:
|
|
8965
|
-
return new _(
|
|
8965
|
+
return new _(A);
|
|
8966
8966
|
case u:
|
|
8967
|
-
return r(
|
|
8967
|
+
return r(A);
|
|
8968
8968
|
case l:
|
|
8969
8969
|
return new _();
|
|
8970
8970
|
case m:
|
|
8971
|
-
return n(
|
|
8971
|
+
return n(A);
|
|
8972
8972
|
}
|
|
8973
8973
|
}
|
|
8974
8974
|
return ci = F, ci;
|
|
@@ -9040,11 +9040,11 @@ var gi, Ih;
|
|
|
9040
9040
|
function Yy() {
|
|
9041
9041
|
if (Ih) return gi;
|
|
9042
9042
|
Ih = 1;
|
|
9043
|
-
var e = Bn(), t = uu(), r = jn(), n = AE(), s = CE(), a = $y(), i = Fy(), o = RE(), c = ME(), u = Hy(), l = IE(), f = dr(), m = LE(), h = zE(), g = Ky(), y =
|
|
9044
|
-
ne[
|
|
9045
|
-
function ae(X, Z,
|
|
9046
|
-
var J, ie = Z &
|
|
9047
|
-
if (
|
|
9043
|
+
var e = Bn(), t = uu(), r = jn(), n = AE(), s = CE(), a = $y(), i = Fy(), o = RE(), c = ME(), u = Hy(), l = IE(), f = dr(), m = LE(), h = zE(), g = Ky(), y = Re(), b = ur(), v = BE(), w = Ue(), R = jE(), S = Rt(), $ = Vt(), T = 1, q = 2, F = 4, A = "[object Arguments]", D = "[object Array]", M = "[object Boolean]", _ = "[object Date]", E = "[object Error]", p = "[object Function]", N = "[object GeneratorFunction]", k = "[object Map]", C = "[object Number]", P = "[object Object]", I = "[object RegExp]", O = "[object Set]", L = "[object String]", z = "[object Symbol]", V = "[object WeakMap]", U = "[object ArrayBuffer]", Q = "[object DataView]", B = "[object Float32Array]", W = "[object Float64Array]", j = "[object Int8Array]", G = "[object Int16Array]", K = "[object Int32Array]", me = "[object Uint8Array]", be = "[object Uint8ClampedArray]", Ae = "[object Uint16Array]", Ne = "[object Uint32Array]", ne = {};
|
|
9044
|
+
ne[A] = ne[D] = ne[U] = ne[Q] = ne[M] = ne[_] = ne[B] = ne[W] = ne[j] = ne[G] = ne[K] = ne[k] = ne[C] = ne[P] = ne[I] = ne[O] = ne[L] = ne[z] = ne[me] = ne[be] = ne[Ae] = ne[Ne] = !0, ne[E] = ne[p] = ne[V] = !1;
|
|
9045
|
+
function ae(X, Z, pe, ke, De, we) {
|
|
9046
|
+
var J, ie = Z & T, fe = Z & q, ge = Z & F;
|
|
9047
|
+
if (pe && (J = De ? pe(X, ke, De, we) : pe(X)), J !== void 0)
|
|
9048
9048
|
return J;
|
|
9049
9049
|
if (!w(X))
|
|
9050
9050
|
return X;
|
|
@@ -9053,30 +9053,30 @@ function Yy() {
|
|
|
9053
9053
|
if (J = m(X), !ie)
|
|
9054
9054
|
return i(X, J);
|
|
9055
9055
|
} else {
|
|
9056
|
-
var
|
|
9056
|
+
var Ce = f(X), ue = Ce == p || Ce == N;
|
|
9057
9057
|
if (b(X))
|
|
9058
9058
|
return a(X, ie);
|
|
9059
|
-
if (
|
|
9059
|
+
if (Ce == P || Ce == A || ue && !De) {
|
|
9060
9060
|
if (J = fe || ue ? {} : g(X), !ie)
|
|
9061
9061
|
return fe ? c(X, s(J, X)) : o(X, n(J, X));
|
|
9062
9062
|
} else {
|
|
9063
|
-
if (!ne[
|
|
9064
|
-
return
|
|
9065
|
-
J = h(X,
|
|
9063
|
+
if (!ne[Ce])
|
|
9064
|
+
return De ? X : {};
|
|
9065
|
+
J = h(X, Ce, ie);
|
|
9066
9066
|
}
|
|
9067
9067
|
}
|
|
9068
|
-
|
|
9069
|
-
var Pe =
|
|
9068
|
+
we || (we = new e());
|
|
9069
|
+
var Pe = we.get(X);
|
|
9070
9070
|
if (Pe)
|
|
9071
9071
|
return Pe;
|
|
9072
|
-
|
|
9073
|
-
J.add(ae(Le, Z,
|
|
9072
|
+
we.set(X, J), R(X) ? X.forEach(function(Le) {
|
|
9073
|
+
J.add(ae(Le, Z, pe, Le, X, we));
|
|
9074
9074
|
}) : v(X) && X.forEach(function(Le, $e) {
|
|
9075
|
-
J.set($e, ae(Le, Z,
|
|
9075
|
+
J.set($e, ae(Le, Z, pe, $e, X, we));
|
|
9076
9076
|
});
|
|
9077
9077
|
var qe = ge ? fe ? l : u : fe ? $ : S, ze = oe ? void 0 : qe(X);
|
|
9078
9078
|
return t(ze || X, function(Le, $e) {
|
|
9079
|
-
ze && ($e = Le, Le = X[$e]), r(J, $e, ae(Le, Z,
|
|
9079
|
+
ze && ($e = Le, Le = X[$e]), r(J, $e, ae(Le, Z, pe, $e, X, we));
|
|
9080
9080
|
}), J;
|
|
9081
9081
|
}
|
|
9082
9082
|
return gi = ae, gi;
|
|
@@ -9183,7 +9183,7 @@ var Ai, Bh;
|
|
|
9183
9183
|
function Xy() {
|
|
9184
9184
|
if (Bh) return Ai;
|
|
9185
9185
|
Bh = 1;
|
|
9186
|
-
var e = uu(), t = Yn(), r = Qy(), n =
|
|
9186
|
+
var e = uu(), t = Yn(), r = Qy(), n = Re();
|
|
9187
9187
|
function s(a, i) {
|
|
9188
9188
|
var o = n(a) ? e : t;
|
|
9189
9189
|
return o(a, r(i));
|
|
@@ -9275,9 +9275,9 @@ function tb() {
|
|
|
9275
9275
|
for (f.set(i, o), f.set(o, i); ++v < h; ) {
|
|
9276
9276
|
var S = i[v], $ = o[v];
|
|
9277
9277
|
if (u)
|
|
9278
|
-
var
|
|
9279
|
-
if (
|
|
9280
|
-
if (
|
|
9278
|
+
var T = m ? u($, S, v, o, i, f) : u(S, $, v, i, o, f);
|
|
9279
|
+
if (T !== void 0) {
|
|
9280
|
+
if (T)
|
|
9281
9281
|
continue;
|
|
9282
9282
|
w = !1;
|
|
9283
9283
|
break;
|
|
@@ -9328,38 +9328,38 @@ function JE() {
|
|
|
9328
9328
|
if (Jh) return $i;
|
|
9329
9329
|
Jh = 1;
|
|
9330
9330
|
var e = cr(), t = Gy(), r = lr(), n = tb(), s = ZE(), a = xu(), i = 1, o = 2, c = "[object Boolean]", u = "[object Date]", l = "[object Error]", f = "[object Map]", m = "[object Number]", h = "[object RegExp]", g = "[object Set]", y = "[object String]", b = "[object Symbol]", v = "[object ArrayBuffer]", w = "[object DataView]", R = e ? e.prototype : void 0, S = R ? R.valueOf : void 0;
|
|
9331
|
-
function $(
|
|
9331
|
+
function $(T, q, F, A, D, M, _) {
|
|
9332
9332
|
switch (F) {
|
|
9333
9333
|
case w:
|
|
9334
|
-
if (
|
|
9334
|
+
if (T.byteLength != q.byteLength || T.byteOffset != q.byteOffset)
|
|
9335
9335
|
return !1;
|
|
9336
|
-
|
|
9336
|
+
T = T.buffer, q = q.buffer;
|
|
9337
9337
|
case v:
|
|
9338
|
-
return !(
|
|
9338
|
+
return !(T.byteLength != q.byteLength || !M(new t(T), new t(q)));
|
|
9339
9339
|
case c:
|
|
9340
9340
|
case u:
|
|
9341
9341
|
case m:
|
|
9342
|
-
return r(+
|
|
9342
|
+
return r(+T, +q);
|
|
9343
9343
|
case l:
|
|
9344
|
-
return
|
|
9344
|
+
return T.name == q.name && T.message == q.message;
|
|
9345
9345
|
case h:
|
|
9346
9346
|
case y:
|
|
9347
|
-
return
|
|
9347
|
+
return T == q + "";
|
|
9348
9348
|
case f:
|
|
9349
9349
|
var E = s;
|
|
9350
9350
|
case g:
|
|
9351
|
-
var p =
|
|
9352
|
-
if (E || (E = a),
|
|
9351
|
+
var p = A & i;
|
|
9352
|
+
if (E || (E = a), T.size != q.size && !p)
|
|
9353
9353
|
return !1;
|
|
9354
|
-
var N = _.get(
|
|
9354
|
+
var N = _.get(T);
|
|
9355
9355
|
if (N)
|
|
9356
9356
|
return N == q;
|
|
9357
|
-
|
|
9358
|
-
var k = n(E(
|
|
9359
|
-
return _.delete(
|
|
9357
|
+
A |= o, _.set(T, q);
|
|
9358
|
+
var k = n(E(T), E(q), A, D, M, _);
|
|
9359
|
+
return _.delete(T), k;
|
|
9360
9360
|
case b:
|
|
9361
9361
|
if (S)
|
|
9362
|
-
return S.call(
|
|
9362
|
+
return S.call(T) == S.call(q);
|
|
9363
9363
|
}
|
|
9364
9364
|
return !1;
|
|
9365
9365
|
}
|
|
@@ -9386,18 +9386,18 @@ function eA() {
|
|
|
9386
9386
|
l.set(a, i), l.set(i, a);
|
|
9387
9387
|
for (var $ = f; ++b < h; ) {
|
|
9388
9388
|
v = m[b];
|
|
9389
|
-
var
|
|
9389
|
+
var T = a[v], q = i[v];
|
|
9390
9390
|
if (c)
|
|
9391
|
-
var F = f ? c(q,
|
|
9392
|
-
if (!(F === void 0 ?
|
|
9391
|
+
var F = f ? c(q, T, v, i, a, l) : c(T, q, v, a, i, l);
|
|
9392
|
+
if (!(F === void 0 ? T === q || u(T, q, o, c, l) : F)) {
|
|
9393
9393
|
S = !1;
|
|
9394
9394
|
break;
|
|
9395
9395
|
}
|
|
9396
9396
|
$ || ($ = v == "constructor");
|
|
9397
9397
|
}
|
|
9398
9398
|
if (S && !$) {
|
|
9399
|
-
var
|
|
9400
|
-
|
|
9399
|
+
var A = a.constructor, D = i.constructor;
|
|
9400
|
+
A != D && "constructor" in a && "constructor" in i && !(typeof A == "function" && A instanceof A && typeof D == "function" && D instanceof D) && (S = !1);
|
|
9401
9401
|
}
|
|
9402
9402
|
return l.delete(a), l.delete(i), S;
|
|
9403
9403
|
}
|
|
@@ -9407,20 +9407,20 @@ var Pi, tm;
|
|
|
9407
9407
|
function tA() {
|
|
9408
9408
|
if (tm) return Pi;
|
|
9409
9409
|
tm = 1;
|
|
9410
|
-
var e = Bn(), t = tb(), r = JE(), n = eA(), s = dr(), a =
|
|
9410
|
+
var e = Bn(), t = tb(), r = JE(), n = eA(), s = dr(), a = Re(), i = ur(), o = Br(), c = 1, u = "[object Arguments]", l = "[object Array]", f = "[object Object]", m = Object.prototype, h = m.hasOwnProperty;
|
|
9411
9411
|
function g(y, b, v, w, R, S) {
|
|
9412
|
-
var $ = a(y),
|
|
9412
|
+
var $ = a(y), T = a(b), q = $ ? l : s(y), F = T ? l : s(b);
|
|
9413
9413
|
q = q == u ? f : q, F = F == u ? f : F;
|
|
9414
|
-
var
|
|
9414
|
+
var A = q == f, D = F == f, M = q == F;
|
|
9415
9415
|
if (M && i(y)) {
|
|
9416
9416
|
if (!i(b))
|
|
9417
9417
|
return !1;
|
|
9418
|
-
$ = !0,
|
|
9418
|
+
$ = !0, A = !1;
|
|
9419
9419
|
}
|
|
9420
|
-
if (M && !
|
|
9420
|
+
if (M && !A)
|
|
9421
9421
|
return S || (S = new e()), $ || o(y) ? t(y, b, v, w, R, S) : r(y, b, q, v, w, R, S);
|
|
9422
9422
|
if (!(v & c)) {
|
|
9423
|
-
var _ =
|
|
9423
|
+
var _ = A && h.call(y, "__wrapped__"), E = D && h.call(b, "__wrapped__");
|
|
9424
9424
|
if (_ || E) {
|
|
9425
9425
|
var p = _ ? y.value() : y, N = E ? b.value() : b;
|
|
9426
9426
|
return S || (S = new e()), R(p, N, v, w, S);
|
|
@@ -9534,7 +9534,7 @@ var Wi, cm;
|
|
|
9534
9534
|
function wu() {
|
|
9535
9535
|
if (cm) return Wi;
|
|
9536
9536
|
cm = 1;
|
|
9537
|
-
var e =
|
|
9537
|
+
var e = Re(), t = fr(), r = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, n = /^\w*$/;
|
|
9538
9538
|
function s(a, i) {
|
|
9539
9539
|
if (e(a))
|
|
9540
9540
|
return !1;
|
|
@@ -9602,7 +9602,7 @@ var Zi, mm;
|
|
|
9602
9602
|
function lA() {
|
|
9603
9603
|
if (mm) return Zi;
|
|
9604
9604
|
mm = 1;
|
|
9605
|
-
var e = cr(), t = Qn(), r =
|
|
9605
|
+
var e = cr(), t = Qn(), r = Re(), n = fr(), s = e ? e.prototype : void 0, a = s ? s.toString : void 0;
|
|
9606
9606
|
function i(o) {
|
|
9607
9607
|
if (typeof o == "string")
|
|
9608
9608
|
return o;
|
|
@@ -9629,7 +9629,7 @@ var eo, gm;
|
|
|
9629
9629
|
function Xn() {
|
|
9630
9630
|
if (gm) return eo;
|
|
9631
9631
|
gm = 1;
|
|
9632
|
-
var e =
|
|
9632
|
+
var e = Re(), t = wu(), r = oA(), n = ab();
|
|
9633
9633
|
function s(a, i) {
|
|
9634
9634
|
return e(a) ? a : t(a, i) ? [a] : r(n(a));
|
|
9635
9635
|
}
|
|
@@ -9685,7 +9685,7 @@ var ao, wm;
|
|
|
9685
9685
|
function ib() {
|
|
9686
9686
|
if (wm) return ao;
|
|
9687
9687
|
wm = 1;
|
|
9688
|
-
var e = Xn(), t = Vr(), r =
|
|
9688
|
+
var e = Xn(), t = Vr(), r = Re(), n = Gn(), s = du(), a = Hr();
|
|
9689
9689
|
function i(o, c, u) {
|
|
9690
9690
|
c = e(c, o);
|
|
9691
9691
|
for (var l = -1, f = c.length, m = !1; ++l < f; ) {
|
|
@@ -9758,7 +9758,7 @@ var fo, Tm;
|
|
|
9758
9758
|
function yt() {
|
|
9759
9759
|
if (Tm) return fo;
|
|
9760
9760
|
Tm = 1;
|
|
9761
|
-
var e = sA(), t = dA(), r = Bt(), n =
|
|
9761
|
+
var e = sA(), t = dA(), r = Bt(), n = Re(), s = hA();
|
|
9762
9762
|
function a(i) {
|
|
9763
9763
|
return typeof i == "function" ? i : i == null ? r : typeof i == "object" ? n(i) ? t(i[0], i[1]) : e(i) : s(i);
|
|
9764
9764
|
}
|
|
@@ -9768,7 +9768,7 @@ var ho, km;
|
|
|
9768
9768
|
function cb() {
|
|
9769
9769
|
if (km) return ho;
|
|
9770
9770
|
km = 1;
|
|
9771
|
-
var e = Py(), t = KE(), r = yt(), n =
|
|
9771
|
+
var e = Py(), t = KE(), r = yt(), n = Re();
|
|
9772
9772
|
function s(a, i) {
|
|
9773
9773
|
var o = n(a) ? e : t;
|
|
9774
9774
|
return o(a, r(i, 3));
|
|
@@ -9799,7 +9799,7 @@ var go, Mm;
|
|
|
9799
9799
|
function pA() {
|
|
9800
9800
|
if (Mm) return go;
|
|
9801
9801
|
Mm = 1;
|
|
9802
|
-
var e = hu(), t = dr(), r = Vr(), n =
|
|
9802
|
+
var e = hu(), t = dr(), r = Vr(), n = Re(), s = gt(), a = ur(), i = Wn(), o = Br(), c = "[object Map]", u = "[object Set]", l = Object.prototype, f = l.hasOwnProperty;
|
|
9803
9803
|
function m(h) {
|
|
9804
9804
|
if (h == null)
|
|
9805
9805
|
return !0;
|
|
@@ -9843,7 +9843,7 @@ var vo, qm;
|
|
|
9843
9843
|
function hb() {
|
|
9844
9844
|
if (qm) return vo;
|
|
9845
9845
|
qm = 1;
|
|
9846
|
-
var e = Qn(), t = yt(), r = fb(), n =
|
|
9846
|
+
var e = Qn(), t = yt(), r = fb(), n = Re();
|
|
9847
9847
|
function s(a, i) {
|
|
9848
9848
|
var o = n(a) ? e : r;
|
|
9849
9849
|
return o(a, t(i, 3));
|
|
@@ -9877,7 +9877,7 @@ var _o, $m;
|
|
|
9877
9877
|
function mb() {
|
|
9878
9878
|
if ($m) return _o;
|
|
9879
9879
|
$m = 1;
|
|
9880
|
-
var e = gA(), t = Yn(), r = yt(), n = yA(), s =
|
|
9880
|
+
var e = gA(), t = Yn(), r = yt(), n = yA(), s = Re();
|
|
9881
9881
|
function a(i, o, c) {
|
|
9882
9882
|
var u = s(i) ? e : n, l = arguments.length < 3;
|
|
9883
9883
|
return u(i, r(o, 4), c, l, t);
|
|
@@ -9888,7 +9888,7 @@ var No, Fm;
|
|
|
9888
9888
|
function bA() {
|
|
9889
9889
|
if (Fm) return No;
|
|
9890
9890
|
Fm = 1;
|
|
9891
|
-
var e = Pt(), t =
|
|
9891
|
+
var e = Pt(), t = Re(), r = it(), n = "[object String]";
|
|
9892
9892
|
function s(a) {
|
|
9893
9893
|
return typeof a == "string" || !t(a) && r(a) && e(a) == n;
|
|
9894
9894
|
}
|
|
@@ -9917,9 +9917,9 @@ function wA() {
|
|
|
9917
9917
|
Vm = 1;
|
|
9918
9918
|
var e = "\\ud800-\\udfff", t = "\\u0300-\\u036f", r = "\\ufe20-\\ufe2f", n = "\\u20d0-\\u20ff", s = t + r + n, a = "\\ufe0e\\ufe0f", i = "[" + e + "]", o = "[" + s + "]", c = "\\ud83c[\\udffb-\\udfff]", u = "(?:" + o + "|" + c + ")", l = "[^" + e + "]", f = "(?:\\ud83c[\\udde6-\\uddff]){2}", m = "[\\ud800-\\udbff][\\udc00-\\udfff]", h = "\\u200d", g = u + "?", y = "[" + a + "]?", b = "(?:" + h + "(?:" + [l, f, m].join("|") + ")" + y + g + ")*", v = y + g + b, w = "(?:" + [l + o + "?", o, f, m, i].join("|") + ")", R = RegExp(c + "(?=" + c + ")|" + w + v, "g");
|
|
9919
9919
|
function S($) {
|
|
9920
|
-
for (var
|
|
9921
|
-
++
|
|
9922
|
-
return
|
|
9920
|
+
for (var T = R.lastIndex = 0; R.test($); )
|
|
9921
|
+
++T;
|
|
9922
|
+
return T;
|
|
9923
9923
|
}
|
|
9924
9924
|
return Ao = S, Ao;
|
|
9925
9925
|
}
|
|
@@ -9952,7 +9952,7 @@ var Co, jm;
|
|
|
9952
9952
|
function SA() {
|
|
9953
9953
|
if (jm) return Co;
|
|
9954
9954
|
jm = 1;
|
|
9955
|
-
var e = uu(), t = Wy(), r = vu(), n = yt(), s = Kn(), a =
|
|
9955
|
+
var e = uu(), t = Wy(), r = vu(), n = yt(), s = Kn(), a = Re(), i = ur(), o = Pr(), c = Ue(), u = Br();
|
|
9956
9956
|
function l(f, m, h) {
|
|
9957
9957
|
var g = a(f), y = g || i(f) || u(f);
|
|
9958
9958
|
if (m = n(m, 4), h == null) {
|
|
@@ -9969,7 +9969,7 @@ var Ro, Gm;
|
|
|
9969
9969
|
function EA() {
|
|
9970
9970
|
if (Gm) return Ro;
|
|
9971
9971
|
Gm = 1;
|
|
9972
|
-
var e = cr(), t = Vr(), r =
|
|
9972
|
+
var e = cr(), t = Vr(), r = Re(), n = e ? e.isConcatSpreadable : void 0;
|
|
9973
9973
|
function s(a) {
|
|
9974
9974
|
return r(a) || t(a) || !!(n && a && a[n]);
|
|
9975
9975
|
}
|
|
@@ -10243,7 +10243,7 @@ function We() {
|
|
|
10243
10243
|
each: Zy(),
|
|
10244
10244
|
filter: cb(),
|
|
10245
10245
|
has: ub(),
|
|
10246
|
-
isArray:
|
|
10246
|
+
isArray: Re(),
|
|
10247
10247
|
isEmpty: pA(),
|
|
10248
10248
|
isFunction: Pr(),
|
|
10249
10249
|
isUndefined: db(),
|
|
@@ -11146,19 +11146,19 @@ var Pl, e0;
|
|
|
11146
11146
|
function mT() {
|
|
11147
11147
|
if (e0) return Pl;
|
|
11148
11148
|
e0 = 1;
|
|
11149
|
-
var e = Tb(), t = $y(), r = Uy(), n = Fy(), s = Ky(), a = Vr(), i =
|
|
11150
|
-
function y(b, v, w, R, S, $,
|
|
11151
|
-
var q = h(b, w), F = h(v, w),
|
|
11152
|
-
if (
|
|
11153
|
-
e(b, w,
|
|
11149
|
+
var e = Tb(), t = $y(), r = Uy(), n = Fy(), s = Ky(), a = Vr(), i = Re(), o = bb(), c = ur(), u = Pr(), l = Ue(), f = fT(), m = Br(), h = kb(), g = hT();
|
|
11150
|
+
function y(b, v, w, R, S, $, T) {
|
|
11151
|
+
var q = h(b, w), F = h(v, w), A = T.get(F);
|
|
11152
|
+
if (A) {
|
|
11153
|
+
e(b, w, A);
|
|
11154
11154
|
return;
|
|
11155
11155
|
}
|
|
11156
|
-
var D = $ ? $(q, F, w + "", b, v,
|
|
11156
|
+
var D = $ ? $(q, F, w + "", b, v, T) : void 0, M = D === void 0;
|
|
11157
11157
|
if (M) {
|
|
11158
11158
|
var _ = i(F), E = !_ && c(F), p = !_ && !E && m(F);
|
|
11159
11159
|
D = F, _ || E || p ? i(q) ? D = q : o(q) ? D = n(q) : E ? (M = !1, D = t(F, !0)) : p ? (M = !1, D = r(F, !0)) : D = [] : f(F) || a(F) ? (D = q, a(q) ? D = g(q) : (!l(q) || u(q)) && (D = s(F))) : M = !1;
|
|
11160
11160
|
}
|
|
11161
|
-
M && (
|
|
11161
|
+
M && (T.set(F, D), S(D, F, R, $, T), T.delete(F)), e(b, w, D);
|
|
11162
11162
|
}
|
|
11163
11163
|
return Pl = y, Pl;
|
|
11164
11164
|
}
|
|
@@ -11394,7 +11394,7 @@ var sc, v0;
|
|
|
11394
11394
|
function IT() {
|
|
11395
11395
|
if (v0) return sc;
|
|
11396
11396
|
v0 = 1;
|
|
11397
|
-
var e = Qn(), t = Zn(), r = yt(), n = fb(), s = CT(), a = Un(), i = MT(), o = Bt(), c =
|
|
11397
|
+
var e = Qn(), t = Zn(), r = yt(), n = fb(), s = CT(), a = Un(), i = MT(), o = Bt(), c = Re();
|
|
11398
11398
|
function u(l, f, m) {
|
|
11399
11399
|
f.length ? f = e(f, function(y) {
|
|
11400
11400
|
return c(y) ? function(b) {
|
|
@@ -11609,7 +11609,7 @@ function QT(e) {
|
|
|
11609
11609
|
}
|
|
11610
11610
|
});
|
|
11611
11611
|
}
|
|
11612
|
-
var
|
|
11612
|
+
var he = _e, Mb = et.Graph, Ve = {
|
|
11613
11613
|
addDummyNode: Ib,
|
|
11614
11614
|
simplify: XT,
|
|
11615
11615
|
asNonCompoundGraph: ZT,
|
|
@@ -11628,15 +11628,15 @@ var me = _e, Mb = et.Graph, Ve = {
|
|
|
11628
11628
|
function Ib(e, t, r, n) {
|
|
11629
11629
|
var s;
|
|
11630
11630
|
do
|
|
11631
|
-
s =
|
|
11631
|
+
s = he.uniqueId(n);
|
|
11632
11632
|
while (e.hasNode(s));
|
|
11633
11633
|
return r.dummy = t, e.setNode(s, r), s;
|
|
11634
11634
|
}
|
|
11635
11635
|
function XT(e) {
|
|
11636
11636
|
var t = new Mb().setGraph(e.graph());
|
|
11637
|
-
return
|
|
11637
|
+
return he.forEach(e.nodes(), function(r) {
|
|
11638
11638
|
t.setNode(r, e.node(r));
|
|
11639
|
-
}),
|
|
11639
|
+
}), he.forEach(e.edges(), function(r) {
|
|
11640
11640
|
var n = t.edge(r.v, r.w) || { weight: 0, minlen: 1 }, s = e.edge(r);
|
|
11641
11641
|
t.setEdge(r.v, r.w, {
|
|
11642
11642
|
weight: n.weight + s.weight,
|
|
@@ -11646,29 +11646,29 @@ function XT(e) {
|
|
|
11646
11646
|
}
|
|
11647
11647
|
function ZT(e) {
|
|
11648
11648
|
var t = new Mb({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
|
11649
|
-
return
|
|
11649
|
+
return he.forEach(e.nodes(), function(r) {
|
|
11650
11650
|
e.children(r).length || t.setNode(r, e.node(r));
|
|
11651
|
-
}),
|
|
11651
|
+
}), he.forEach(e.edges(), function(r) {
|
|
11652
11652
|
t.setEdge(r, e.edge(r));
|
|
11653
11653
|
}), t;
|
|
11654
11654
|
}
|
|
11655
11655
|
function JT(e) {
|
|
11656
|
-
var t =
|
|
11656
|
+
var t = he.map(e.nodes(), function(r) {
|
|
11657
11657
|
var n = {};
|
|
11658
|
-
return
|
|
11658
|
+
return he.forEach(e.outEdges(r), function(s) {
|
|
11659
11659
|
n[s.w] = (n[s.w] || 0) + e.edge(s).weight;
|
|
11660
11660
|
}), n;
|
|
11661
11661
|
});
|
|
11662
|
-
return
|
|
11662
|
+
return he.zipObject(e.nodes(), t);
|
|
11663
11663
|
}
|
|
11664
11664
|
function ek(e) {
|
|
11665
|
-
var t =
|
|
11665
|
+
var t = he.map(e.nodes(), function(r) {
|
|
11666
11666
|
var n = {};
|
|
11667
|
-
return
|
|
11667
|
+
return he.forEach(e.inEdges(r), function(s) {
|
|
11668
11668
|
n[s.v] = (n[s.v] || 0) + e.edge(s).weight;
|
|
11669
11669
|
}), n;
|
|
11670
11670
|
});
|
|
11671
|
-
return
|
|
11671
|
+
return he.zipObject(e.nodes(), t);
|
|
11672
11672
|
}
|
|
11673
11673
|
function tk(e, t) {
|
|
11674
11674
|
var r = e.x, n = e.y, s = t.x - r, a = t.y - n, i = e.width / 2, o = e.height / 2;
|
|
@@ -11678,34 +11678,34 @@ function tk(e, t) {
|
|
|
11678
11678
|
return Math.abs(a) * i > Math.abs(s) * o ? (a < 0 && (o = -o), c = o * s / a, u = o) : (s < 0 && (i = -i), c = i, u = i * a / s), { x: r + c, y: n + u };
|
|
11679
11679
|
}
|
|
11680
11680
|
function rk(e) {
|
|
11681
|
-
var t =
|
|
11681
|
+
var t = he.map(he.range(Db(e) + 1), function() {
|
|
11682
11682
|
return [];
|
|
11683
11683
|
});
|
|
11684
|
-
return
|
|
11684
|
+
return he.forEach(e.nodes(), function(r) {
|
|
11685
11685
|
var n = e.node(r), s = n.rank;
|
|
11686
|
-
|
|
11686
|
+
he.isUndefined(s) || (t[s][n.order] = r);
|
|
11687
11687
|
}), t;
|
|
11688
11688
|
}
|
|
11689
11689
|
function nk(e) {
|
|
11690
|
-
var t =
|
|
11690
|
+
var t = he.min(he.map(e.nodes(), function(r) {
|
|
11691
11691
|
return e.node(r).rank;
|
|
11692
11692
|
}));
|
|
11693
|
-
|
|
11693
|
+
he.forEach(e.nodes(), function(r) {
|
|
11694
11694
|
var n = e.node(r);
|
|
11695
|
-
|
|
11695
|
+
he.has(n, "rank") && (n.rank -= t);
|
|
11696
11696
|
});
|
|
11697
11697
|
}
|
|
11698
11698
|
function sk(e) {
|
|
11699
|
-
var t =
|
|
11699
|
+
var t = he.min(he.map(e.nodes(), function(a) {
|
|
11700
11700
|
return e.node(a).rank;
|
|
11701
11701
|
})), r = [];
|
|
11702
|
-
|
|
11702
|
+
he.forEach(e.nodes(), function(a) {
|
|
11703
11703
|
var i = e.node(a).rank - t;
|
|
11704
11704
|
r[i] || (r[i] = []), r[i].push(a);
|
|
11705
11705
|
});
|
|
11706
11706
|
var n = 0, s = e.graph().nodeRankFactor;
|
|
11707
|
-
|
|
11708
|
-
|
|
11707
|
+
he.forEach(r, function(a, i) {
|
|
11708
|
+
he.isUndefined(a) && i % s !== 0 ? --n : n && he.forEach(a, function(o) {
|
|
11709
11709
|
e.node(o).rank += n;
|
|
11710
11710
|
});
|
|
11711
11711
|
});
|
|
@@ -11718,24 +11718,24 @@ function ak(e, t, r, n) {
|
|
|
11718
11718
|
return arguments.length >= 4 && (s.rank = r, s.order = n), Ib(e, "border", s, t);
|
|
11719
11719
|
}
|
|
11720
11720
|
function Db(e) {
|
|
11721
|
-
return
|
|
11721
|
+
return he.max(he.map(e.nodes(), function(t) {
|
|
11722
11722
|
var r = e.node(t).rank;
|
|
11723
|
-
if (!
|
|
11723
|
+
if (!he.isUndefined(r))
|
|
11724
11724
|
return r;
|
|
11725
11725
|
}));
|
|
11726
11726
|
}
|
|
11727
11727
|
function ik(e, t) {
|
|
11728
11728
|
var r = { lhs: [], rhs: [] };
|
|
11729
|
-
return
|
|
11729
|
+
return he.forEach(e, function(n) {
|
|
11730
11730
|
t(n) ? r.lhs.push(n) : r.rhs.push(n);
|
|
11731
11731
|
}), r;
|
|
11732
11732
|
}
|
|
11733
11733
|
function ok(e, t) {
|
|
11734
|
-
var r =
|
|
11734
|
+
var r = he.now();
|
|
11735
11735
|
try {
|
|
11736
11736
|
return t();
|
|
11737
11737
|
} finally {
|
|
11738
|
-
console.log(e + " time: " + (
|
|
11738
|
+
console.log(e + " time: " + (he.now() - r) + "ms");
|
|
11739
11739
|
}
|
|
11740
11740
|
}
|
|
11741
11741
|
function lk(e, t) {
|
|
@@ -12829,7 +12829,7 @@ const $0 = /* @__PURE__ */ Rg(BR), HR = {
|
|
|
12829
12829
|
ranker: "network-simplex"
|
|
12830
12830
|
};
|
|
12831
12831
|
function jR(e, t, r = {}) {
|
|
12832
|
-
const n =
|
|
12832
|
+
const n = Te(() => ({ ...HR, ...r }), [r]), { layoutedNodes: s, layoutedEdges: a } = Te(() => {
|
|
12833
12833
|
if (e.length === 0)
|
|
12834
12834
|
return { layoutedNodes: [], layoutedEdges: [] };
|
|
12835
12835
|
const i = new $0.graphlib.Graph();
|
|
@@ -12912,7 +12912,7 @@ function YR({
|
|
|
12912
12912
|
} catch {
|
|
12913
12913
|
}
|
|
12914
12914
|
}, []);
|
|
12915
|
-
const { nodes: y, edges: b } =
|
|
12915
|
+
const { nodes: y, edges: b } = Te(() => {
|
|
12916
12916
|
if (!i) return { nodes: [], edges: [] };
|
|
12917
12917
|
const C = [], P = [];
|
|
12918
12918
|
return i.cubes.forEach((I, O) => {
|
|
@@ -12958,7 +12958,7 @@ function YR({
|
|
|
12958
12958
|
nodeHeight: 220,
|
|
12959
12959
|
nodeSep: 100,
|
|
12960
12960
|
rankSep: 200
|
|
12961
|
-
}), S =
|
|
12961
|
+
}), S = Te(() => (v ? w : y).map((P) => ({
|
|
12962
12962
|
...P,
|
|
12963
12963
|
data: {
|
|
12964
12964
|
...P.data,
|
|
@@ -12977,7 +12977,7 @@ function YR({
|
|
|
12977
12977
|
m(!1);
|
|
12978
12978
|
}
|
|
12979
12979
|
}, [f, S]);
|
|
12980
|
-
const [
|
|
12980
|
+
const [T, q, F] = xS(S), [A, D, M] = wS($);
|
|
12981
12981
|
se(() => {
|
|
12982
12982
|
q(S);
|
|
12983
12983
|
}, [S, q]), se(() => {
|
|
@@ -13021,8 +13021,8 @@ function YR({
|
|
|
13021
13021
|
/* @__PURE__ */ d("div", { className: "h-full", children: /* @__PURE__ */ x(
|
|
13022
13022
|
Ay,
|
|
13023
13023
|
{
|
|
13024
|
-
nodes:
|
|
13025
|
-
edges:
|
|
13024
|
+
nodes: T,
|
|
13025
|
+
edges: A,
|
|
13026
13026
|
onNodesChange: _,
|
|
13027
13027
|
onEdgesChange: M,
|
|
13028
13028
|
onConnect: E,
|
|
@@ -13167,7 +13167,7 @@ const F0 = ({
|
|
|
13167
13167
|
/* @__PURE__ */ d("div", { className: "text-sm font-semibold mb-1", children: "No Schema" }),
|
|
13168
13168
|
/* @__PURE__ */ d("div", { className: "text-xs", children: "Schema not loaded" })
|
|
13169
13169
|
] }) });
|
|
13170
|
-
const
|
|
13170
|
+
const T = (p) => {
|
|
13171
13171
|
const N = new Set(l);
|
|
13172
13172
|
if (N.has(p) ? N.delete(p) : N.add(p), f(N), w !== null) {
|
|
13173
13173
|
const k = new Set(w);
|
|
@@ -13192,7 +13192,7 @@ const F0 = ({
|
|
|
13192
13192
|
return !1;
|
|
13193
13193
|
}
|
|
13194
13194
|
})() ? a(p.name, N) : s(p.name, N);
|
|
13195
|
-
},
|
|
13195
|
+
}, A = (p) => g ? p.filter(
|
|
13196
13196
|
(N) => N.name.toLowerCase().includes(g.toLowerCase()) || N.title.toLowerCase().includes(g.toLowerCase())
|
|
13197
13197
|
) : p, D = (p) => {
|
|
13198
13198
|
if (!g.trim()) return !0;
|
|
@@ -13419,7 +13419,7 @@ const F0 = ({
|
|
|
13419
13419
|
"div",
|
|
13420
13420
|
{
|
|
13421
13421
|
className: "flex items-center px-3 py-2 cursor-pointer hover:bg-gray-50 rounded-t-lg",
|
|
13422
|
-
onClick: () =>
|
|
13422
|
+
onClick: () => T(N.name),
|
|
13423
13423
|
children: [
|
|
13424
13424
|
/* @__PURE__ */ d("div", { className: "mr-2", children: k ? /* @__PURE__ */ d(st, { className: "w-4 h-4 text-gray-600" }) : /* @__PURE__ */ d(Du, { className: "w-4 h-4 text-gray-600" }) }),
|
|
13425
13425
|
/* @__PURE__ */ x("div", { className: "flex-1", children: [
|
|
@@ -13430,17 +13430,17 @@ const F0 = ({
|
|
|
13430
13430
|
}
|
|
13431
13431
|
),
|
|
13432
13432
|
k && /* @__PURE__ */ x("div", { className: "border-t border-gray-200 p-2 space-y-1", children: [
|
|
13433
|
-
P.length > 0 &&
|
|
13433
|
+
P.length > 0 && A(P).length > 0 && /* @__PURE__ */ x("div", { children: [
|
|
13434
13434
|
/* @__PURE__ */ d(
|
|
13435
13435
|
_,
|
|
13436
13436
|
{
|
|
13437
13437
|
title: "Dimensions",
|
|
13438
|
-
count:
|
|
13438
|
+
count: A(P).length,
|
|
13439
13439
|
sectionKey: `${N.name}-dimensions`,
|
|
13440
13440
|
icon: /* @__PURE__ */ d(Rr, { className: "w-4 h-4 text-green-600" })
|
|
13441
13441
|
}
|
|
13442
13442
|
),
|
|
13443
|
-
m.has(`${N.name}-dimensions`) && /* @__PURE__ */ d("div", { className: "ml-5 space-y-1 mt-1", children:
|
|
13443
|
+
m.has(`${N.name}-dimensions`) && /* @__PURE__ */ d("div", { className: "ml-5 space-y-1 mt-1", children: A(P).map((I) => /* @__PURE__ */ d(
|
|
13444
13444
|
M,
|
|
13445
13445
|
{
|
|
13446
13446
|
field: I,
|
|
@@ -13450,17 +13450,17 @@ const F0 = ({
|
|
|
13450
13450
|
I.name
|
|
13451
13451
|
)) })
|
|
13452
13452
|
] }),
|
|
13453
|
-
C.length > 0 &&
|
|
13453
|
+
C.length > 0 && A(C).length > 0 && /* @__PURE__ */ x("div", { children: [
|
|
13454
13454
|
/* @__PURE__ */ d(
|
|
13455
13455
|
_,
|
|
13456
13456
|
{
|
|
13457
13457
|
title: "Time Dimensions",
|
|
13458
|
-
count:
|
|
13458
|
+
count: A(C).length,
|
|
13459
13459
|
sectionKey: `${N.name}-timeDimensions`,
|
|
13460
13460
|
icon: /* @__PURE__ */ d(nr, { className: "w-4 h-4 text-blue-600" })
|
|
13461
13461
|
}
|
|
13462
13462
|
),
|
|
13463
|
-
m.has(`${N.name}-timeDimensions`) && /* @__PURE__ */ d("div", { className: "ml-5 space-y-1 mt-1", children:
|
|
13463
|
+
m.has(`${N.name}-timeDimensions`) && /* @__PURE__ */ d("div", { className: "ml-5 space-y-1 mt-1", children: A(C).map((I) => /* @__PURE__ */ d(
|
|
13464
13464
|
M,
|
|
13465
13465
|
{
|
|
13466
13466
|
field: I,
|
|
@@ -13470,17 +13470,17 @@ const F0 = ({
|
|
|
13470
13470
|
I.name
|
|
13471
13471
|
)) })
|
|
13472
13472
|
] }),
|
|
13473
|
-
N.measures.length > 0 &&
|
|
13473
|
+
N.measures.length > 0 && A(N.measures).length > 0 && /* @__PURE__ */ x("div", { children: [
|
|
13474
13474
|
/* @__PURE__ */ d(
|
|
13475
13475
|
_,
|
|
13476
13476
|
{
|
|
13477
13477
|
title: "Measures",
|
|
13478
|
-
count:
|
|
13478
|
+
count: A(N.measures).length,
|
|
13479
13479
|
sectionKey: `${N.name}-measures`,
|
|
13480
13480
|
icon: /* @__PURE__ */ d(Xt, { className: "w-4 h-4 text-amber-600" })
|
|
13481
13481
|
}
|
|
13482
13482
|
),
|
|
13483
|
-
m.has(`${N.name}-measures`) && /* @__PURE__ */ d("div", { className: "ml-5 space-y-1 mt-1", children:
|
|
13483
|
+
m.has(`${N.name}-measures`) && /* @__PURE__ */ d("div", { className: "ml-5 space-y-1 mt-1", children: A(N.measures).map((I) => /* @__PURE__ */ d(
|
|
13484
13484
|
M,
|
|
13485
13485
|
{
|
|
13486
13486
|
field: I,
|
|
@@ -13760,18 +13760,18 @@ const F0 = ({
|
|
|
13760
13760
|
onValuesChange: n,
|
|
13761
13761
|
schema: s
|
|
13762
13762
|
}) => {
|
|
13763
|
-
const a = Wb[t], [i, o] = Y(!1), [c, u] = Y(""), [l, f] = Y(!1), m = re(null), h = re(""), g = Lv(c, 300), y =
|
|
13763
|
+
const a = Wb[t], [i, o] = Y(!1), [c, u] = Y(""), [l, f] = Y(!1), m = re(null), h = re(""), g = Lv(c, 300), y = Te(() => s ? s.cubes.some(
|
|
13764
13764
|
(p) => p.dimensions.some((N) => N.name === e)
|
|
13765
|
-
) : !1, [s, e]), b =
|
|
13765
|
+
) : !1, [s, e]), b = Te(() => s ? s.cubes.some(
|
|
13766
13766
|
(p) => p.dimensions.some((N) => N.name === e && N.type === "time")
|
|
13767
|
-
) : !1, [s, e]), v =
|
|
13767
|
+
) : !1, [s, e]), v = Te(
|
|
13768
13768
|
() => ["equals", "notEquals", "in", "notIn"].includes(t) && y && !b,
|
|
13769
13769
|
[t, y, b]
|
|
13770
13770
|
), w = v, {
|
|
13771
13771
|
values: R,
|
|
13772
13772
|
loading: S,
|
|
13773
13773
|
error: $,
|
|
13774
|
-
searchValues:
|
|
13774
|
+
searchValues: T
|
|
13775
13775
|
} = $v(e, v);
|
|
13776
13776
|
se(() => {
|
|
13777
13777
|
const p = (N) => {
|
|
@@ -13779,17 +13779,17 @@ const F0 = ({
|
|
|
13779
13779
|
};
|
|
13780
13780
|
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
13781
13781
|
}, []), se(() => {
|
|
13782
|
-
i && v &&
|
|
13783
|
-
}, [i, v,
|
|
13784
|
-
l && v &&
|
|
13785
|
-
}, [g, l, v,
|
|
13782
|
+
i && v && T && (T("", !0), f(!0), h.current = "");
|
|
13783
|
+
}, [i, v, T]), se(() => {
|
|
13784
|
+
l && v && T && g !== h.current && (h.current = g, T(g));
|
|
13785
|
+
}, [g, l, v, T]);
|
|
13786
13786
|
const q = te(() => {
|
|
13787
13787
|
const p = !i;
|
|
13788
13788
|
o(p), p || (u(""), h.current = "");
|
|
13789
13789
|
}, [i]), F = te((p) => {
|
|
13790
13790
|
const N = p.target.value;
|
|
13791
13791
|
u(N);
|
|
13792
|
-
}, []),
|
|
13792
|
+
}, []), A = te((p) => {
|
|
13793
13793
|
a.supportsMultipleValues ? r.includes(p) || n([...r, p]) : (n([p]), o(!1)), u("");
|
|
13794
13794
|
}, [a.supportsMultipleValues, r, n]), D = te((p) => {
|
|
13795
13795
|
n(r.filter((N) => N !== p));
|
|
@@ -13983,7 +13983,7 @@ const F0 = ({
|
|
|
13983
13983
|
return /* @__PURE__ */ x(
|
|
13984
13984
|
"button",
|
|
13985
13985
|
{
|
|
13986
|
-
onClick: () =>
|
|
13986
|
+
onClick: () => A(p),
|
|
13987
13987
|
className: `w-full text-left px-3 py-2 text-sm hover:bg-gray-100 focus:outline-none focus:bg-gray-100 ${k ? "bg-blue-50 text-blue-700" : "text-gray-700"}`,
|
|
13988
13988
|
children: [
|
|
13989
13989
|
String(p),
|
|
@@ -14246,7 +14246,7 @@ const Kb = ({
|
|
|
14246
14246
|
return p.filter(
|
|
14247
14247
|
(k) => k.name.toLowerCase().includes(N) || k.title.toLowerCase().includes(N) || k.shortTitle.toLowerCase().includes(N)
|
|
14248
14248
|
);
|
|
14249
|
-
},
|
|
14249
|
+
}, T = $(v), q = $(b), F = (p) => p.type === "time" ? /* @__PURE__ */ d(nr, { className: "w-3 h-3 text-blue-500" }) : ["count", "sum", "avg", "min", "max", "countDistinct", "number"].includes(p.type) ? /* @__PURE__ */ d(Xt, { className: "w-3 h-3 text-amber-500" }) : /* @__PURE__ */ d(Rr, { className: "w-3 h-3 text-green-500" }), A = (p) => p.type === "time" ? /* @__PURE__ */ d("span", { className: "text-xs bg-blue-100 text-blue-700 px-1.5 py-0.5 rounded", children: "T" }) : ["count", "sum", "avg", "min", "max", "countDistinct", "number"].includes(p.type) ? /* @__PURE__ */ d("span", { className: "text-xs bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded", children: "M" }) : /* @__PURE__ */ d("span", { className: "text-xs bg-green-100 text-green-700 px-1.5 py-0.5 rounded", children: "D" }), D = (p) => {
|
|
14250
14250
|
var P;
|
|
14251
14251
|
const N = nM(p, s), C = ((P = P0(N)[0]) == null ? void 0 : P.operator) || "equals";
|
|
14252
14252
|
r(t, {
|
|
@@ -14298,13 +14298,13 @@ const Kb = ({
|
|
|
14298
14298
|
)
|
|
14299
14299
|
] }) }),
|
|
14300
14300
|
/* @__PURE__ */ x("div", { className: "max-h-60 overflow-y-auto", children: [
|
|
14301
|
-
|
|
14301
|
+
T.length > 0 && /* @__PURE__ */ x("div", { children: [
|
|
14302
14302
|
/* @__PURE__ */ x("div", { className: "px-3 py-1.5 text-xs font-medium text-gray-500 bg-gray-50 border-b", children: [
|
|
14303
14303
|
"Fields in Query (",
|
|
14304
|
-
|
|
14304
|
+
T.length,
|
|
14305
14305
|
")"
|
|
14306
14306
|
] }),
|
|
14307
|
-
|
|
14307
|
+
T.map((p) => /* @__PURE__ */ d(
|
|
14308
14308
|
"button",
|
|
14309
14309
|
{
|
|
14310
14310
|
onClick: () => D(p.name),
|
|
@@ -14314,7 +14314,7 @@ const Kb = ({
|
|
|
14314
14314
|
/* @__PURE__ */ x("div", { className: "flex-1 min-w-0", children: [
|
|
14315
14315
|
/* @__PURE__ */ x("div", { className: "flex items-center gap-2", children: [
|
|
14316
14316
|
/* @__PURE__ */ d("span", { className: "font-medium truncate", children: p.name }),
|
|
14317
|
-
|
|
14317
|
+
A(p)
|
|
14318
14318
|
] }),
|
|
14319
14319
|
p.title !== p.name && /* @__PURE__ */ d("div", { className: "text-xs text-gray-500 truncate", children: p.title })
|
|
14320
14320
|
] })
|
|
@@ -14324,7 +14324,7 @@ const Kb = ({
|
|
|
14324
14324
|
))
|
|
14325
14325
|
] }),
|
|
14326
14326
|
/* @__PURE__ */ x("div", { children: [
|
|
14327
|
-
|
|
14327
|
+
T.length > 0 && /* @__PURE__ */ x("div", { className: "px-3 py-1.5 text-xs font-medium text-gray-500 bg-gray-50 border-b", children: [
|
|
14328
14328
|
"All Available Fields (",
|
|
14329
14329
|
q.length,
|
|
14330
14330
|
")"
|
|
@@ -14339,7 +14339,7 @@ const Kb = ({
|
|
|
14339
14339
|
/* @__PURE__ */ x("div", { className: "flex-1 min-w-0", children: [
|
|
14340
14340
|
/* @__PURE__ */ x("div", { className: "flex items-center gap-2", children: [
|
|
14341
14341
|
/* @__PURE__ */ d("span", { className: "font-medium truncate", children: p.name }),
|
|
14342
|
-
|
|
14342
|
+
A(p)
|
|
14343
14343
|
] }),
|
|
14344
14344
|
p.title !== p.name && /* @__PURE__ */ d("div", { className: "text-xs text-gray-500 truncate", children: p.title })
|
|
14345
14345
|
] })
|
|
@@ -14413,11 +14413,11 @@ const Kb = ({
|
|
|
14413
14413
|
}) => {
|
|
14414
14414
|
const [c, u] = Y(!1), l = e.type === "and", f = l ? "AND" : "OR", m = e.filters, h = o > 0 ? `ml-${Math.min(o * 4, 16)}` : "", g = "border-slate-200", y = "bg-slate-50", b = "text-slate-700", v = () => {
|
|
14415
14415
|
if (l) {
|
|
14416
|
-
const
|
|
14417
|
-
r(t,
|
|
14416
|
+
const A = rt(m);
|
|
14417
|
+
r(t, A);
|
|
14418
14418
|
} else {
|
|
14419
|
-
const
|
|
14420
|
-
r(t,
|
|
14419
|
+
const A = Ke(m);
|
|
14420
|
+
r(t, A);
|
|
14421
14421
|
}
|
|
14422
14422
|
}, w = () => {
|
|
14423
14423
|
var E;
|
|
@@ -14434,11 +14434,11 @@ const Kb = ({
|
|
|
14434
14434
|
if (!a) return;
|
|
14435
14435
|
const D = ((E = yc(a, i)[0]) == null ? void 0 : E.name) || "", M = rt([fn(D, "equals", [])]), _ = [...m, M];
|
|
14436
14436
|
l ? r(t, Ke(_)) : r(t, rt(_)), u(!1);
|
|
14437
|
-
}, $ = (
|
|
14437
|
+
}, $ = (A, D) => {
|
|
14438
14438
|
const M = [...m];
|
|
14439
|
-
M[
|
|
14440
|
-
},
|
|
14441
|
-
const D = m.filter((_, E) => E !==
|
|
14439
|
+
M[A] = D, l ? r(t, Ke(M)) : r(t, rt(M));
|
|
14440
|
+
}, T = (A) => {
|
|
14441
|
+
const D = m.filter((_, E) => E !== A);
|
|
14442
14442
|
if (D.length === 0) {
|
|
14443
14443
|
s(t);
|
|
14444
14444
|
return;
|
|
@@ -14450,11 +14450,11 @@ const Kb = ({
|
|
|
14450
14450
|
}
|
|
14451
14451
|
const M = e.type === "and" ? Ke(D) : rt(D);
|
|
14452
14452
|
r(t, M);
|
|
14453
|
-
}, q = (
|
|
14453
|
+
}, q = (A, D) => {
|
|
14454
14454
|
const M = [...m];
|
|
14455
|
-
M[
|
|
14456
|
-
}, F = (
|
|
14457
|
-
A
|
|
14455
|
+
M[A] = D, l ? r(t, Ke(M)) : r(t, rt(M));
|
|
14456
|
+
}, F = (A) => {
|
|
14457
|
+
T(A);
|
|
14458
14458
|
};
|
|
14459
14459
|
return /* @__PURE__ */ x("div", { className: `${h} ${g} border-2 ${y} rounded-lg p-4 space-y-3`, children: [
|
|
14460
14460
|
/* @__PURE__ */ x("div", { className: "flex items-center justify-between", children: [
|
|
@@ -14523,21 +14523,21 @@ const Kb = ({
|
|
|
14523
14523
|
] })
|
|
14524
14524
|
] }),
|
|
14525
14525
|
/* @__PURE__ */ x("div", { className: "space-y-3", children: [
|
|
14526
|
-
m.map((
|
|
14526
|
+
m.map((A, D) => rr(A) ? /* @__PURE__ */ d(
|
|
14527
14527
|
Kb,
|
|
14528
14528
|
{
|
|
14529
|
-
filter:
|
|
14529
|
+
filter: A,
|
|
14530
14530
|
index: D,
|
|
14531
14531
|
onFilterChange: $,
|
|
14532
|
-
onFilterRemove:
|
|
14532
|
+
onFilterRemove: T,
|
|
14533
14533
|
schema: a,
|
|
14534
14534
|
query: i
|
|
14535
14535
|
},
|
|
14536
14536
|
D
|
|
14537
|
-
) : hr(
|
|
14537
|
+
) : hr(A) ? /* @__PURE__ */ d(
|
|
14538
14538
|
Yb,
|
|
14539
14539
|
{
|
|
14540
|
-
group:
|
|
14540
|
+
group: A,
|
|
14541
14541
|
index: D,
|
|
14542
14542
|
onGroupChange: q,
|
|
14543
14543
|
onGroupRemove: F,
|
|
@@ -14704,7 +14704,7 @@ const Kb = ({
|
|
|
14704
14704
|
b(!1), w(!v);
|
|
14705
14705
|
}, $ = () => {
|
|
14706
14706
|
w(!1), b(!y);
|
|
14707
|
-
},
|
|
14707
|
+
}, T = (_) => {
|
|
14708
14708
|
if (l(_), b(!1), _ === "custom") {
|
|
14709
14709
|
if (f.startDate && f.endDate) {
|
|
14710
14710
|
const E = f.startDate === f.endDate ? f.startDate : [f.startDate, f.endDate];
|
|
@@ -14728,7 +14728,7 @@ const Kb = ({
|
|
|
14728
14728
|
const E = an(u, _);
|
|
14729
14729
|
n(e, E);
|
|
14730
14730
|
}
|
|
14731
|
-
},
|
|
14731
|
+
}, A = (_) => {
|
|
14732
14732
|
w(!1), s(e, _);
|
|
14733
14733
|
}, D = ((M = pc.find((_) => _.value === u)) == null ? void 0 : M.label) || "Custom";
|
|
14734
14734
|
return /* @__PURE__ */ d("div", { ref: R, className: "bg-white border border-gray-200 rounded-lg p-3", children: /* @__PURE__ */ x("div", { className: "flex flex-col sm:flex-row sm:items-center gap-3 min-w-0", children: [
|
|
@@ -14749,7 +14749,7 @@ const Kb = ({
|
|
|
14749
14749
|
v && /* @__PURE__ */ d("div", { className: "absolute z-20 left-0 right-0 mt-1 bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-y-auto", children: t.map((_) => /* @__PURE__ */ d(
|
|
14750
14750
|
"button",
|
|
14751
14751
|
{
|
|
14752
|
-
onClick: () =>
|
|
14752
|
+
onClick: () => A(_),
|
|
14753
14753
|
className: `w-full text-left px-3 py-2 text-sm hover:bg-gray-100 focus:outline-none focus:bg-gray-100 ${_ === e ? "bg-blue-50 text-blue-700" : "text-gray-700"}`,
|
|
14754
14754
|
children: _
|
|
14755
14755
|
},
|
|
@@ -14772,7 +14772,7 @@ const Kb = ({
|
|
|
14772
14772
|
y && /* @__PURE__ */ d("div", { className: "absolute z-20 left-0 right-0 mt-1 bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-y-auto", children: pc.map((_) => /* @__PURE__ */ d(
|
|
14773
14773
|
"button",
|
|
14774
14774
|
{
|
|
14775
|
-
onClick: () =>
|
|
14775
|
+
onClick: () => T(_.value),
|
|
14776
14776
|
className: `w-full text-left px-3 py-2 text-sm hover:bg-gray-100 focus:outline-none focus:bg-gray-100 ${_.value === u ? "bg-blue-50 text-blue-700" : "text-gray-700"}`,
|
|
14777
14777
|
children: _.label
|
|
14778
14778
|
},
|
|
@@ -14926,7 +14926,7 @@ const Kb = ({
|
|
|
14926
14926
|
}
|
|
14927
14927
|
}, 0);
|
|
14928
14928
|
}, [w, S, e, s]);
|
|
14929
|
-
const
|
|
14929
|
+
const T = Cr(e), q = JR(e), F = async () => {
|
|
14930
14930
|
const C = Qt(e);
|
|
14931
14931
|
try {
|
|
14932
14932
|
await navigator.clipboard.writeText(JSON.stringify(C, null, 2));
|
|
@@ -14934,7 +14934,7 @@ const Kb = ({
|
|
|
14934
14934
|
const I = document.createElement("textarea");
|
|
14935
14935
|
I.value = JSON.stringify(C, null, 2), document.body.appendChild(I), I.select(), document.execCommand("copy"), document.body.removeChild(I);
|
|
14936
14936
|
}
|
|
14937
|
-
},
|
|
14937
|
+
}, A = (C, P) => {
|
|
14938
14938
|
var I;
|
|
14939
14939
|
if (P === "timeDimensions")
|
|
14940
14940
|
return !!((I = e.timeDimensions) != null && I.some((O) => O.dimension === C && O.dateRange));
|
|
@@ -15021,7 +15021,7 @@ const Kb = ({
|
|
|
15021
15021
|
/* @__PURE__ */ x("div", { className: "flex items-center gap-2 ml-2", children: [
|
|
15022
15022
|
/* @__PURE__ */ x("div", { className: "flex flex-col items-center", children: [
|
|
15023
15023
|
(() => {
|
|
15024
|
-
const L =
|
|
15024
|
+
const L = A(C, P);
|
|
15025
15025
|
return /* @__PURE__ */ d(
|
|
15026
15026
|
"button",
|
|
15027
15027
|
{
|
|
@@ -15072,7 +15072,7 @@ const Kb = ({
|
|
|
15072
15072
|
/* @__PURE__ */ x("div", { className: "flex items-center gap-2 ml-2", children: [
|
|
15073
15073
|
/* @__PURE__ */ x("div", { className: "flex flex-col items-center", children: [
|
|
15074
15074
|
(() => {
|
|
15075
|
-
const P =
|
|
15075
|
+
const P = A(C.dimension, "timeDimensions");
|
|
15076
15076
|
return /* @__PURE__ */ d(
|
|
15077
15077
|
"button",
|
|
15078
15078
|
{
|
|
@@ -15147,7 +15147,7 @@ const Kb = ({
|
|
|
15147
15147
|
)
|
|
15148
15148
|
] }),
|
|
15149
15149
|
/* @__PURE__ */ x("div", { className: "flex items-center gap-1 flex-shrink-0", children: [
|
|
15150
|
-
|
|
15150
|
+
T && /* @__PURE__ */ x(ve, { children: [
|
|
15151
15151
|
/* @__PURE__ */ x("span", { className: "hidden lg:inline text-xs text-gray-500 mr-1", children: [
|
|
15152
15152
|
q,
|
|
15153
15153
|
" field",
|
|
@@ -15199,7 +15199,7 @@ const Kb = ({
|
|
|
15199
15199
|
}, {})
|
|
15200
15200
|
] })
|
|
15201
15201
|
] }) }),
|
|
15202
|
-
/* @__PURE__ */ d("div", { className: "p-4", children:
|
|
15202
|
+
/* @__PURE__ */ d("div", { className: "p-4", children: T ? /* @__PURE__ */ x("div", { className: "space-y-6", children: [
|
|
15203
15203
|
/* @__PURE__ */ x("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
15204
15204
|
/* @__PURE__ */ x("div", { className: "min-h-24", children: [
|
|
15205
15205
|
/* @__PURE__ */ x("h4", { className: "text-sm font-semibold text-green-800 mb-3 flex items-center", children: [
|
|
@@ -15329,7 +15329,7 @@ const Kb = ({
|
|
|
15329
15329
|
/* @__PURE__ */ d("div", { className: "text-sm font-semibold mb-1", children: "No fields selected" }),
|
|
15330
15330
|
/* @__PURE__ */ d("div", { className: "text-xs", children: "Select measures, dimensions, or time dimensions from the schema explorer" })
|
|
15331
15331
|
] }) }) }),
|
|
15332
|
-
(
|
|
15332
|
+
(T || r === "valid" || r === "invalid") && /* @__PURE__ */ d("div", { className: "border-t border-gray-200 p-4", children: /* @__PURE__ */ x("div", { className: "flex space-x-3", children: [
|
|
15333
15333
|
/* @__PURE__ */ d(
|
|
15334
15334
|
"button",
|
|
15335
15335
|
{
|
|
@@ -15976,7 +15976,7 @@ const _M = ({
|
|
|
15976
15976
|
totalRowCount: null,
|
|
15977
15977
|
totalRowCountStatus: "idle"
|
|
15978
15978
|
};
|
|
15979
|
-
}, [l, f] = Y(u()), [m, h] = Y(10), [g, y] = Y(c()), [b, v] = Y(!1), [w, R] = Y(!1), [S, $] = Y("tree"), [
|
|
15979
|
+
}, [l, f] = Y(u()), [m, h] = Y(10), [g, y] = Y(c()), [b, v] = Y(!1), [w, R] = Y(!1), [S, $] = Y("tree"), [T, q] = Y(!1);
|
|
15980
15980
|
se(() => {
|
|
15981
15981
|
t && JSON.stringify(t) !== JSON.stringify(l.query) && f((B) => ({
|
|
15982
15982
|
...B,
|
|
@@ -15993,7 +15993,7 @@ const _M = ({
|
|
|
15993
15993
|
totalRowCountStatus: "idle"
|
|
15994
15994
|
}));
|
|
15995
15995
|
}, [t]);
|
|
15996
|
-
const F = re(""), [
|
|
15996
|
+
const F = re(""), [A, D] = Y(null);
|
|
15997
15997
|
K0(s, () => ({
|
|
15998
15998
|
getCurrentQuery: () => Qt(l.query),
|
|
15999
15999
|
getValidationState: () => ({
|
|
@@ -16006,8 +16006,8 @@ const _M = ({
|
|
|
16006
16006
|
error: l.validationError || void 0
|
|
16007
16007
|
} : void 0
|
|
16008
16008
|
}),
|
|
16009
|
-
getValidationResult: () =>
|
|
16010
|
-
}), [l.query, l.validationStatus, l.validationError, l.validationSql,
|
|
16009
|
+
getValidationResult: () => A
|
|
16010
|
+
}), [l.query, l.validationStatus, l.validationError, l.validationSql, A]), se(() => {
|
|
16011
16011
|
(async () => {
|
|
16012
16012
|
f((W) => ({
|
|
16013
16013
|
...W,
|
|
@@ -16204,13 +16204,13 @@ const _M = ({
|
|
|
16204
16204
|
a.load({ ...B, limit: m }),
|
|
16205
16205
|
a.load(B)
|
|
16206
16206
|
// No limit for total count
|
|
16207
|
-
]), G = W.tablePivot(),
|
|
16207
|
+
]), G = W.tablePivot(), me = j.tablePivot().length;
|
|
16208
16208
|
f((be) => ({
|
|
16209
16209
|
...be,
|
|
16210
16210
|
executionStatus: "success",
|
|
16211
16211
|
executionResults: G,
|
|
16212
16212
|
executionError: null,
|
|
16213
|
-
totalRowCount:
|
|
16213
|
+
totalRowCount: me,
|
|
16214
16214
|
totalRowCountStatus: "success"
|
|
16215
16215
|
}));
|
|
16216
16216
|
} catch (B) {
|
|
@@ -16409,7 +16409,7 @@ const _M = ({
|
|
|
16409
16409
|
(o == null ? void 0 : o.enableAI) !== !1 && /* @__PURE__ */ d(
|
|
16410
16410
|
_M,
|
|
16411
16411
|
{
|
|
16412
|
-
isOpen:
|
|
16412
|
+
isOpen: T,
|
|
16413
16413
|
onClose: () => q(!1),
|
|
16414
16414
|
schema: l.schema,
|
|
16415
16415
|
aiEndpoint: o == null ? void 0 : o.aiEndpoint,
|
|
@@ -16462,29 +16462,29 @@ function NM({
|
|
|
16462
16462
|
onReorder: c,
|
|
16463
16463
|
draggedItem: u
|
|
16464
16464
|
}) {
|
|
16465
|
-
const { key: l, label: f, description: m, mandatory: h, maxItems: g, emptyText: y, icon: b } = e, [v, w] = Y(null), [R, S] = Y(!1), [$,
|
|
16465
|
+
const { key: l, label: f, description: m, mandatory: h, maxItems: g, emptyText: y, icon: b } = e, [v, w] = Y(null), [R, S] = Y(!1), [$, T] = Y(!1), q = () => {
|
|
16466
16466
|
let p = t.length;
|
|
16467
16467
|
return u && u.fromAxis === l && (p = Math.max(0, t.length - 1)), !g || p < g;
|
|
16468
16468
|
}, F = () => {
|
|
16469
16469
|
let p = t.length;
|
|
16470
16470
|
return u && u.fromAxis === l && (p = Math.max(0, t.length - 1)), g && p >= g;
|
|
16471
|
-
},
|
|
16471
|
+
}, A = q(), D = F();
|
|
16472
16472
|
H.useEffect(() => {
|
|
16473
16473
|
const p = () => {
|
|
16474
|
-
w(null), S(!1),
|
|
16474
|
+
w(null), S(!1), T(!1);
|
|
16475
16475
|
};
|
|
16476
16476
|
return document.addEventListener("dragend", p), () => {
|
|
16477
16477
|
document.removeEventListener("dragend", p);
|
|
16478
16478
|
};
|
|
16479
16479
|
}, []), H.useEffect(() => {
|
|
16480
|
-
u ? u.fromAxis !== l ? (
|
|
16480
|
+
u ? u.fromAxis !== l ? (T(!1), w(null)) : u.fromAxis === l && u.fromIndex !== void 0 && S(!1) : (w(null), S(!1), T(!1));
|
|
16481
16481
|
}, [u, l]);
|
|
16482
16482
|
const M = (p, N) => {
|
|
16483
|
-
u && u.fromAxis === l && u.fromIndex !== void 0 && (p.preventDefault(), p.stopPropagation(), w(N),
|
|
16483
|
+
u && u.fromAxis === l && u.fromIndex !== void 0 && (p.preventDefault(), p.stopPropagation(), w(N), T(!0));
|
|
16484
16484
|
}, _ = () => {
|
|
16485
16485
|
w(null);
|
|
16486
16486
|
}, E = (p, N) => {
|
|
16487
|
-
if (p.preventDefault(), p.stopPropagation(), w(null),
|
|
16487
|
+
if (p.preventDefault(), p.stopPropagation(), w(null), T(!1), u && u.fromAxis === l && u.fromIndex !== void 0 && c) {
|
|
16488
16488
|
c(u.fromIndex, N, l);
|
|
16489
16489
|
return;
|
|
16490
16490
|
}
|
|
@@ -16514,20 +16514,20 @@ function NM({
|
|
|
16514
16514
|
"div",
|
|
16515
16515
|
{
|
|
16516
16516
|
"data-axis-container": l,
|
|
16517
|
-
className: `min-h-[40px] sm:min-h-[32px] border-2 border-dashed rounded-lg p-3 sm:p-1.5 transition-all duration-300 flex items-center ${R && (
|
|
16517
|
+
className: `min-h-[40px] sm:min-h-[32px] border-2 border-dashed rounded-lg p-3 sm:p-1.5 transition-all duration-300 flex items-center ${R && (A || g === 1) || $ ? "border-blue-500 bg-blue-100 shadow-lg scale-110 border-solid animate-pulse" : D ? "border-gray-200 bg-gray-50" : "border-gray-300 bg-gray-50 hover:bg-gray-100"}`,
|
|
16518
16518
|
onDragOver: (p) => {
|
|
16519
16519
|
if (u && u.fromAxis === l && u.fromIndex !== void 0)
|
|
16520
16520
|
return;
|
|
16521
|
-
|
|
16521
|
+
A || g === 1 ? (S(!0), i(p)) : (p.preventDefault(), p.dataTransfer.dropEffect = "none");
|
|
16522
16522
|
},
|
|
16523
16523
|
onDragLeave: (p) => {
|
|
16524
16524
|
const N = p.currentTarget.getBoundingClientRect(), k = p.clientX < N.left || p.clientX > N.right || p.clientY < N.top || p.clientY > N.bottom, C = p.relatedTarget, P = C && !p.currentTarget.contains(C);
|
|
16525
|
-
(k || P || p.currentTarget === p.target) && (S(!1),
|
|
16525
|
+
(k || P || p.currentTarget === p.target) && (S(!1), T(!1));
|
|
16526
16526
|
},
|
|
16527
16527
|
onDrop: (p) => {
|
|
16528
16528
|
if (u && u.fromAxis === l && u.fromIndex !== void 0)
|
|
16529
16529
|
return;
|
|
16530
|
-
|
|
16530
|
+
A || g === 1 ? r(p, l) : p.preventDefault(), S(!1), T(!1);
|
|
16531
16531
|
},
|
|
16532
16532
|
children: t.length === 0 ? /* @__PURE__ */ d("div", { className: "text-xs text-gray-500 text-center w-full", children: D ? "Maximum items reached" : y || "Drop fields here" }) : /* @__PURE__ */ d("div", { className: "flex flex-wrap gap-1", children: t.map((p, N) => {
|
|
16533
16533
|
const { IconComponent: k, baseClasses: C, hoverClasses: P } = o(p), I = v === N, O = u && u.field === p && u.fromAxis === l;
|
|
@@ -16584,8 +16584,8 @@ function G0({
|
|
|
16584
16584
|
onChartConfigChange: a,
|
|
16585
16585
|
onDisplayConfigChange: i
|
|
16586
16586
|
}) {
|
|
16587
|
-
var
|
|
16588
|
-
const [o, c] = Y(null), u =
|
|
16587
|
+
var T, q, F, A, D, M;
|
|
16588
|
+
const [o, c] = Y(null), u = Te(
|
|
16589
16589
|
() => Bc(e, Ir),
|
|
16590
16590
|
[e]
|
|
16591
16591
|
), l = u.skipQuery === !0, f = (_) => {
|
|
@@ -16769,7 +16769,7 @@ function G0({
|
|
|
16769
16769
|
(u.displayOptions && u.displayOptions.length > 0 || u.displayOptionsConfig && u.displayOptionsConfig.length > 0) && /* @__PURE__ */ x("div", { className: "mb-4", children: [
|
|
16770
16770
|
/* @__PURE__ */ d("h4", { className: "text-xs font-semibold mb-2", children: "Display Options" }),
|
|
16771
16771
|
/* @__PURE__ */ x("div", { className: "space-y-2", children: [
|
|
16772
|
-
((
|
|
16772
|
+
((T = u.displayOptions) == null ? void 0 : T.includes("showLegend")) && /* @__PURE__ */ x("label", { className: "flex items-center space-x-2", children: [
|
|
16773
16773
|
/* @__PURE__ */ d(
|
|
16774
16774
|
"input",
|
|
16775
16775
|
{
|
|
@@ -16814,7 +16814,7 @@ function G0({
|
|
|
16814
16814
|
),
|
|
16815
16815
|
/* @__PURE__ */ d("span", { className: "text-sm", children: "Show Tooltip" })
|
|
16816
16816
|
] }),
|
|
16817
|
-
((
|
|
16817
|
+
((A = u.displayOptions) == null ? void 0 : A.includes("stacked")) && /* @__PURE__ */ x("label", { className: "flex items-center space-x-2", children: [
|
|
16818
16818
|
/* @__PURE__ */ d(
|
|
16819
16819
|
"input",
|
|
16820
16820
|
{
|
|
@@ -17149,8 +17149,8 @@ function U0({
|
|
|
17149
17149
|
submitText: a,
|
|
17150
17150
|
colorPalette: i
|
|
17151
17151
|
}) {
|
|
17152
|
-
var
|
|
17153
|
-
const { cubeApi: o } = Ct(), [c, u] = Y(""), [l, f] = Y(""), [m, h] = Y("bar"), [g, y] = Y(!1), [b, v] = Y(null), [w, R] = Y(""), [S, $] = Y(null), [
|
|
17152
|
+
var Ne, ne;
|
|
17153
|
+
const { cubeApi: o } = Ct(), [c, u] = Y(""), [l, f] = Y(""), [m, h] = Y("bar"), [g, y] = Y(!1), [b, v] = Y(null), [w, R] = Y(""), [S, $] = Y(null), [T, q] = Y({ xAxis: [], yAxis: [], series: [] }), [F, A] = Y({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), [D, M] = Y(!1), [_, E] = Y(null), p = re(null), k = Bc(m, Ir).skipQuery === !0, C = (ae) => {
|
|
17154
17154
|
}, P = 5, I = 4;
|
|
17155
17155
|
se(() => {
|
|
17156
17156
|
if (e) {
|
|
@@ -17163,16 +17163,15 @@ function U0({
|
|
|
17163
17163
|
return n.query;
|
|
17164
17164
|
}
|
|
17165
17165
|
})();
|
|
17166
|
-
f(ae), h(n.chartType), q(n.chartConfig || { xAxis: [], yAxis: [], series: [] }),
|
|
17166
|
+
f(ae), h(n.chartType), q(n.chartConfig || { xAxis: [], yAxis: [], series: [] }), A(n.displayConfig || {}), R(ae), v({ isValid: !0, message: "Loaded query (assumed valid)" }), $(null), k || setTimeout(() => {
|
|
17167
17167
|
V(ae, !0, !0);
|
|
17168
17168
|
}, 100);
|
|
17169
17169
|
} else
|
|
17170
|
-
u(""), f(""), h("bar"), q({ xAxis: [], yAxis: [], series: [] }),
|
|
17170
|
+
u(""), f(""), h("bar"), q({ xAxis: [], yAxis: [], series: [] }), A({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), R(""), v(null), $(null);
|
|
17171
17171
|
y(!1);
|
|
17172
17172
|
}
|
|
17173
17173
|
}, [e, n]);
|
|
17174
17174
|
const O = (ae) => {
|
|
17175
|
-
var Z, he, Ne, ke;
|
|
17176
17175
|
if (ae.preventDefault(), k) {
|
|
17177
17176
|
if (!c.trim())
|
|
17178
17177
|
return;
|
|
@@ -17196,7 +17195,7 @@ function U0({
|
|
|
17196
17195
|
title: c.trim(),
|
|
17197
17196
|
query: X,
|
|
17198
17197
|
chartType: m,
|
|
17199
|
-
chartConfig:
|
|
17198
|
+
chartConfig: Object.keys(T).length > 0 ? T : void 0,
|
|
17200
17199
|
displayConfig: F,
|
|
17201
17200
|
w: n.w || P,
|
|
17202
17201
|
h: n.h || I
|
|
@@ -17204,7 +17203,7 @@ function U0({
|
|
|
17204
17203
|
title: c.trim(),
|
|
17205
17204
|
query: X,
|
|
17206
17205
|
chartType: m,
|
|
17207
|
-
chartConfig:
|
|
17206
|
+
chartConfig: Object.keys(T).length > 0 ? T : void 0,
|
|
17208
17207
|
displayConfig: F,
|
|
17209
17208
|
w: P,
|
|
17210
17209
|
h: I
|
|
@@ -17214,25 +17213,25 @@ function U0({
|
|
|
17214
17213
|
}, z = (ae) => {
|
|
17215
17214
|
f(ae), v(null), $(null), n || q({ xAxis: [], yAxis: [], series: [] });
|
|
17216
17215
|
}, V = async (ae, X = !1, Z = !1) => {
|
|
17217
|
-
var
|
|
17216
|
+
var ke, De, we, J, ie, fe, ge;
|
|
17218
17217
|
if (!ae.trim()) {
|
|
17219
17218
|
X || v({ isValid: !1, message: "Query cannot be empty" });
|
|
17220
17219
|
return;
|
|
17221
17220
|
}
|
|
17222
|
-
let
|
|
17221
|
+
let pe;
|
|
17223
17222
|
try {
|
|
17224
|
-
|
|
17223
|
+
pe = JSON.parse(ae);
|
|
17225
17224
|
} catch {
|
|
17226
17225
|
X || v({ isValid: !1, message: "Invalid JSON syntax" });
|
|
17227
17226
|
return;
|
|
17228
17227
|
}
|
|
17229
17228
|
X || (y(!0), v(null));
|
|
17230
17229
|
try {
|
|
17231
|
-
const oe = await o.dryRun(
|
|
17230
|
+
const oe = await o.dryRun(pe);
|
|
17232
17231
|
if (!oe.error && oe.queryType) {
|
|
17233
17232
|
if ($(oe), !X) {
|
|
17234
17233
|
const ue = [];
|
|
17235
|
-
(
|
|
17234
|
+
(ke = oe.pivotQuery) != null && ke.query && (((De = oe.pivotQuery.query.measures) == null ? void 0 : De.length) > 0 && ue.push(`${oe.pivotQuery.query.measures.length} measure${oe.pivotQuery.query.measures.length > 1 ? "s" : ""}`), ((we = oe.pivotQuery.query.dimensions) == null ? void 0 : we.length) > 0 && ue.push(`${oe.pivotQuery.query.dimensions.length} dimension${oe.pivotQuery.query.dimensions.length > 1 ? "s" : ""}`), ((J = oe.pivotQuery.query.filters) == null ? void 0 : J.length) > 0 && ue.push(`${oe.pivotQuery.query.filters.length} filter${oe.pivotQuery.query.filters.length > 1 ? "s" : ""}`), ((ie = oe.pivotQuery.query.timeDimensions) == null ? void 0 : ie.length) > 0 && ue.push(`${oe.pivotQuery.query.timeDimensions.length} time dimension${oe.pivotQuery.query.timeDimensions.length > 1 ? "s" : ""}`)), oe.complexity && ue.push(`${oe.complexity} complexity`), (fe = oe.sql) != null && fe.sql && ue.push("SQL generated"), ((ge = oe.cubesUsed) == null ? void 0 : ge.length) > 0 && ue.push(`Cubes: ${oe.cubesUsed.join(", ")}`);
|
|
17236
17235
|
const Pe = ue.length > 0 ? `Query validated successfully (${ue.join(", ")})` : "Query validated successfully";
|
|
17237
17236
|
v({ isValid: !0, message: Pe }), R(ae);
|
|
17238
17237
|
}
|
|
@@ -17265,20 +17264,20 @@ function U0({
|
|
|
17265
17264
|
E(ae), M(!0);
|
|
17266
17265
|
}, B = (ae) => {
|
|
17267
17266
|
if (ae == null || ae.preventDefault(), ae == null || ae.stopPropagation(), !p.current) return;
|
|
17268
|
-
const X = p.current.getCurrentQuery(), Z = p.current.getValidationState(),
|
|
17269
|
-
f(
|
|
17267
|
+
const X = p.current.getCurrentQuery(), Z = p.current.getValidationState(), pe = p.current.getValidationResult(), ke = JSON.stringify(X, null, 2);
|
|
17268
|
+
f(ke), (Z == null ? void 0 : Z.status) === "valid" && pe ? (v({
|
|
17270
17269
|
isValid: !0,
|
|
17271
17270
|
message: "Query validated in Query Builder"
|
|
17272
|
-
}), R(
|
|
17271
|
+
}), R(ke), $(pe)) : (v(null), R(""), $(null)), M(!1);
|
|
17273
17272
|
}, W = () => {
|
|
17274
17273
|
M(!1), E(null);
|
|
17275
17274
|
}, j = () => {
|
|
17276
|
-
u(""), f(""), h("bar"), q({ xAxis: [], yAxis: [], series: [] }),
|
|
17277
|
-
}, G = !!n, K = l.trim() !== w.trim() && w !== "",
|
|
17275
|
+
u(""), f(""), h("bar"), q({ xAxis: [], yAxis: [], series: [] }), A({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), v(null), y(!1), R(""), $(null), M(!1), E(null), t();
|
|
17276
|
+
}, G = !!n, K = l.trim() !== w.trim() && w !== "", me = (b == null ? void 0 : b.isValid) && l.trim() === w.trim(), be = (Ne = S == null ? void 0 : S.pivotQuery) != null && Ne.query ? {
|
|
17278
17277
|
dimensions: S.pivotQuery.query.dimensions || [],
|
|
17279
17278
|
timeDimensions: ((ne = S.pivotQuery.query.timeDimensions) == null ? void 0 : ne.map((ae) => ae.dimension)) || [],
|
|
17280
17279
|
measures: S.pivotQuery.query.measures || []
|
|
17281
|
-
} : null,
|
|
17280
|
+
} : null, Ae = D ? /* @__PURE__ */ x(ve, { children: [
|
|
17282
17281
|
/* @__PURE__ */ d(
|
|
17283
17282
|
"button",
|
|
17284
17283
|
{
|
|
@@ -17327,7 +17326,7 @@ function U0({
|
|
|
17327
17326
|
onClose: j,
|
|
17328
17327
|
title: D ? "Query Builder" : s,
|
|
17329
17328
|
size: "fullscreen-mobile",
|
|
17330
|
-
footer:
|
|
17329
|
+
footer: Ae,
|
|
17331
17330
|
noPadding: D,
|
|
17332
17331
|
children: D ? /* @__PURE__ */ d(
|
|
17333
17332
|
Qb,
|
|
@@ -17399,26 +17398,26 @@ function U0({
|
|
|
17399
17398
|
G0,
|
|
17400
17399
|
{
|
|
17401
17400
|
chartType: m,
|
|
17402
|
-
chartConfig:
|
|
17401
|
+
chartConfig: T,
|
|
17403
17402
|
displayConfig: F,
|
|
17404
17403
|
availableFields: null,
|
|
17405
17404
|
colorPalette: i,
|
|
17406
17405
|
onChartConfigChange: q,
|
|
17407
|
-
onDisplayConfigChange:
|
|
17406
|
+
onDisplayConfigChange: A
|
|
17408
17407
|
}
|
|
17409
|
-
) }) : !S || !
|
|
17408
|
+
) }) : !S || !me ? /* @__PURE__ */ d("div", { className: "flex-1 flex items-center justify-center border-2 border-dashed border-gray-300 rounded-lg bg-gray-50", children: /* @__PURE__ */ x("div", { className: "text-center text-gray-500", children: [
|
|
17410
17409
|
/* @__PURE__ */ d("svg", { className: "h-8 w-8 mx-auto mb-2", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ d("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" }) }),
|
|
17411
17410
|
/* @__PURE__ */ d("p", { className: "text-sm", children: "Validate query first to configure chart axes" })
|
|
17412
17411
|
] }) }) : /* @__PURE__ */ d("div", { className: "rounded-lg bg-white p-3 border border-gray-200", children: /* @__PURE__ */ d(
|
|
17413
17412
|
G0,
|
|
17414
17413
|
{
|
|
17415
17414
|
chartType: m,
|
|
17416
|
-
chartConfig:
|
|
17415
|
+
chartConfig: T,
|
|
17417
17416
|
displayConfig: F,
|
|
17418
17417
|
availableFields: be,
|
|
17419
17418
|
colorPalette: i,
|
|
17420
17419
|
onChartConfigChange: q,
|
|
17421
|
-
onDisplayConfigChange:
|
|
17420
|
+
onDisplayConfigChange: A
|
|
17422
17421
|
}
|
|
17423
17422
|
) })
|
|
17424
17423
|
] })
|
|
@@ -18833,7 +18832,7 @@ function kM({
|
|
|
18833
18832
|
onSave: s,
|
|
18834
18833
|
colorPalette: a
|
|
18835
18834
|
}) {
|
|
18836
|
-
const i = re({}), o = re({}), [c, u] = Y(!1), [l, f] = Y([]), [m, h] = Y(!1), [g, y] = Y("lg"), [b, v] = Y(!1), [w, R] = Y(!1), [S, $] = Y(null), [
|
|
18835
|
+
const i = re({}), o = re({}), [c, u] = Y(!1), [l, f] = Y([]), [m, h] = Y(!1), [g, y] = Y("lg"), [b, v] = Y(!1), [w, R] = Y(!1), [S, $] = Y(null), [T, q] = Y({});
|
|
18837
18836
|
se(() => {
|
|
18838
18837
|
const L = setTimeout(() => {
|
|
18839
18838
|
u(!0);
|
|
@@ -18864,12 +18863,12 @@ function kM({
|
|
|
18864
18863
|
return !0;
|
|
18865
18864
|
}
|
|
18866
18865
|
return !1;
|
|
18867
|
-
}, [c, l]),
|
|
18866
|
+
}, [c, l]), A = te((L, z) => {
|
|
18868
18867
|
}, []), D = te(async (L, z, V, U, Q, B) => {
|
|
18869
18868
|
if (!t || !m || !s || !c || !F(L))
|
|
18870
18869
|
return;
|
|
18871
18870
|
const W = e.portlets.map((G) => {
|
|
18872
|
-
const K = L.find((
|
|
18871
|
+
const K = L.find((me) => me.i === G.id);
|
|
18873
18872
|
return K ? g === "lg" ? {
|
|
18874
18873
|
...G,
|
|
18875
18874
|
x: K.x,
|
|
@@ -18903,7 +18902,7 @@ function kM({
|
|
|
18903
18902
|
if (!t || !m || !r || !c || !F(L))
|
|
18904
18903
|
return;
|
|
18905
18904
|
const W = e.portlets.map((G) => {
|
|
18906
|
-
const K = L.find((
|
|
18905
|
+
const K = L.find((me) => me.i === G.id);
|
|
18907
18906
|
return K ? g === "lg" ? {
|
|
18908
18907
|
...G,
|
|
18909
18908
|
x: K.x,
|
|
@@ -19141,7 +19140,7 @@ function kM({
|
|
|
19141
19140
|
{
|
|
19142
19141
|
className: "layout",
|
|
19143
19142
|
layouts: O,
|
|
19144
|
-
onLayoutChange:
|
|
19143
|
+
onLayoutChange: A,
|
|
19145
19144
|
onDragStop: D,
|
|
19146
19145
|
onResizeStop: M,
|
|
19147
19146
|
onBreakpointChange: (L) => y(L),
|
|
@@ -19169,7 +19168,7 @@ function kM({
|
|
|
19169
19168
|
(!((z = L.displayConfig) != null && z.hideHeader) || m) && /* @__PURE__ */ x("div", { className: `flex items-center justify-between px-3 py-2 md:px-4 md:py-3 border-b border-gray-200 flex-shrink-0 bg-gray-50 rounded-t-lg portlet-drag-handle ${m ? "cursor-move" : "cursor-default"}`, children: [
|
|
19170
19169
|
/* @__PURE__ */ x("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
19171
19170
|
/* @__PURE__ */ d("h3", { className: "font-semibold text-sm text-gray-900 truncate", children: L.title }),
|
|
19172
|
-
|
|
19171
|
+
T[L.id] && /* @__PURE__ */ d(
|
|
19173
19172
|
"div",
|
|
19174
19173
|
{
|
|
19175
19174
|
onMouseDown: (V) => V.stopPropagation(),
|
|
@@ -19179,11 +19178,11 @@ function kM({
|
|
|
19179
19178
|
children: /* @__PURE__ */ d(
|
|
19180
19179
|
Xb,
|
|
19181
19180
|
{
|
|
19182
|
-
chartConfig:
|
|
19183
|
-
displayConfig:
|
|
19184
|
-
queryObject:
|
|
19185
|
-
data:
|
|
19186
|
-
chartType:
|
|
19181
|
+
chartConfig: T[L.id].chartConfig,
|
|
19182
|
+
displayConfig: T[L.id].displayConfig,
|
|
19183
|
+
queryObject: T[L.id].queryObject,
|
|
19184
|
+
data: T[L.id].data,
|
|
19185
|
+
chartType: T[L.id].chartType
|
|
19187
19186
|
}
|
|
19188
19187
|
)
|
|
19189
19188
|
}
|
|
@@ -19324,7 +19323,7 @@ function FM({
|
|
|
19324
19323
|
r && r(l);
|
|
19325
19324
|
const f = JSON.stringify(l), m = JSON.stringify(a.current);
|
|
19326
19325
|
f !== m && (i.current = !0, s && s(!0));
|
|
19327
|
-
}, [r, s]), u =
|
|
19326
|
+
}, [r, s]), u = Te(() => {
|
|
19328
19327
|
const l = e.colorPalette;
|
|
19329
19328
|
return Zb(l);
|
|
19330
19329
|
}, [e.colorPalette]);
|