@tenorlab/react-dashboard 1.2.2 → 1.2.4
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import ae, { useState as
|
|
1
|
+
import ae, { useState as ce, useCallback as ue, useMemo as st, forwardRef as le, useRef as Ct, Suspense as St, useEffect as Dt } from "react";
|
|
2
2
|
import { jsxs as W, jsx as s } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import ct from "react-dom";
|
|
4
|
+
const Tt = [
|
|
5
5
|
{
|
|
6
6
|
key: "grid-gap",
|
|
7
|
-
|
|
7
|
+
name: "Gap",
|
|
8
8
|
description: "Set the gap between widgets in the dashboard grid",
|
|
9
9
|
cssProperty: "--bwj-dashboard-gap",
|
|
10
10
|
step: 0.1,
|
|
@@ -15,7 +15,7 @@ const Nt = [
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
key: "widget-width",
|
|
18
|
-
|
|
18
|
+
name: "Widget Width",
|
|
19
19
|
description: "Set the min width for the widgets",
|
|
20
20
|
cssProperty: "--bwj-widget-width",
|
|
21
21
|
step: 0.1,
|
|
@@ -26,7 +26,7 @@ const Nt = [
|
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
key: "widget-border-radius",
|
|
29
|
-
|
|
29
|
+
name: "Widget Border Radius",
|
|
30
30
|
description: "Set the border radius for the widgets",
|
|
31
31
|
cssProperty: "--bwj-widget-border-radius",
|
|
32
32
|
step: 0.1,
|
|
@@ -37,7 +37,7 @@ const Nt = [
|
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
key: "widget-inner-padding-x",
|
|
40
|
-
|
|
40
|
+
name: "Widget Horiz Padding",
|
|
41
41
|
description: "Set the horizontal padding for the widgets",
|
|
42
42
|
cssProperty: "--bwj-widget-inner-px",
|
|
43
43
|
step: 0.1,
|
|
@@ -48,7 +48,7 @@ const Nt = [
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
key: "widget-inner-padding-y",
|
|
51
|
-
|
|
51
|
+
name: "Widget Vertical Padding",
|
|
52
52
|
description: "Set the vertical padding for the widgets",
|
|
53
53
|
cssProperty: "--bwj-widget-inner-py",
|
|
54
54
|
step: 0.1,
|
|
@@ -59,7 +59,7 @@ const Nt = [
|
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
key: "widget-header-padding-y",
|
|
62
|
-
|
|
62
|
+
name: "Widget Header Vertical Padding",
|
|
63
63
|
description: "Set the vertical padding for the widget headers",
|
|
64
64
|
cssProperty: "--bwj-widget-header-py",
|
|
65
65
|
step: 0.1,
|
|
@@ -70,7 +70,7 @@ const Nt = [
|
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
key: "widget-title-font-size",
|
|
73
|
-
|
|
73
|
+
name: "Widget Title Font Size",
|
|
74
74
|
description: "Set the font size for the widget titles",
|
|
75
75
|
cssProperty: "--bwj-widget-title-size",
|
|
76
76
|
step: 0.1,
|
|
@@ -79,9 +79,9 @@ const Nt = [
|
|
|
79
79
|
defaultValue: "1.0rem",
|
|
80
80
|
value: "1.0rem"
|
|
81
81
|
}
|
|
82
|
-
],
|
|
82
|
+
], Et = ["rem", "pc", "cm", "in", "em", "vh", "vw", "%"], Nt = (e, n) => Et.includes(e) ? n : 1, _t = {
|
|
83
83
|
incrementOrDecrementValue: (e, n) => {
|
|
84
|
-
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, i = e.value.match(/([^\d.]+)/), o = i ? i[1] : e.defaultUnit, a =
|
|
84
|
+
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, i = e.value.match(/([^\d.]+)/), o = i ? i[1] : e.defaultUnit, a = Nt(o, e.step) * n, b = `${Math.max(r + a, e.minValue).toFixed(1)}${o}`;
|
|
85
85
|
return {
|
|
86
86
|
...e,
|
|
87
87
|
value: b
|
|
@@ -96,13 +96,13 @@ const Nt = [
|
|
|
96
96
|
responsiveGrid: !1,
|
|
97
97
|
widgets: [],
|
|
98
98
|
childWidgetsConfig: [],
|
|
99
|
-
cssSettings: [...
|
|
100
|
-
}, Ae = 0.7,
|
|
99
|
+
cssSettings: [...Tt]
|
|
100
|
+
}, Ae = 0.7, Fe = 1, Mt = 0.05, lt = (e) => {
|
|
101
101
|
let n = Number(e || 0);
|
|
102
|
-
return n < Ae && (n = Ae), n >
|
|
102
|
+
return n < Ae && (n = Ae), n > Fe && (n = Fe), n;
|
|
103
103
|
}, Pn = (e, n) => {
|
|
104
104
|
let t = Number(Number((Mt * n).toFixed(2)).toFixed(2)), r = Number((Number(e) + t).toFixed(2));
|
|
105
|
-
return
|
|
105
|
+
return lt(r);
|
|
106
106
|
}, $n = (e) => {
|
|
107
107
|
let n = {
|
|
108
108
|
...e
|
|
@@ -138,7 +138,7 @@ const Nt = [
|
|
|
138
138
|
const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"], i = n?.title || e, o = n?.description || (t ? "Container" : "Unknown");
|
|
139
139
|
return {
|
|
140
140
|
title: i,
|
|
141
|
-
|
|
141
|
+
name: e,
|
|
142
142
|
description: o,
|
|
143
143
|
categories: r,
|
|
144
144
|
noDuplicatedWidgets: !0,
|
|
@@ -157,7 +157,7 @@ const Nt = [
|
|
|
157
157
|
e,
|
|
158
158
|
{
|
|
159
159
|
key: e,
|
|
160
|
-
title: r.
|
|
160
|
+
title: r.name,
|
|
161
161
|
isContainer: `${e}`.includes("Container"),
|
|
162
162
|
meta: r,
|
|
163
163
|
component: n
|
|
@@ -169,16 +169,16 @@ const Nt = [
|
|
|
169
169
|
e,
|
|
170
170
|
{
|
|
171
171
|
key: e,
|
|
172
|
-
title: r.
|
|
172
|
+
title: r.name,
|
|
173
173
|
isContainer: !1,
|
|
174
174
|
meta: r,
|
|
175
175
|
loader: n
|
|
176
176
|
}
|
|
177
177
|
];
|
|
178
178
|
}, It = (e) => {
|
|
179
|
-
const n = e.match(/\/widget-([a-zA-Z0-
|
|
179
|
+
const n = e.match(/\/widget-([a-zA-Z0-9-]+)\/index\.ts$/);
|
|
180
180
|
if (n && n[1]) {
|
|
181
|
-
const t = n[1], r = t.split(
|
|
181
|
+
const t = n[1], r = t.split("-"), i = `Widget${r.map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join("")}`, o = r.map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
|
|
182
182
|
return {
|
|
183
183
|
key: i,
|
|
184
184
|
title: o,
|
|
@@ -187,9 +187,11 @@ const Nt = [
|
|
|
187
187
|
}
|
|
188
188
|
return null;
|
|
189
189
|
}, Ot = (e, n, t, r) => {
|
|
190
|
-
const i = `${n}/widget-${t}/
|
|
191
|
-
if (o
|
|
192
|
-
return
|
|
190
|
+
const i = `${n}/widget-${t}/meta.ts`, o = e[i];
|
|
191
|
+
if (!o)
|
|
192
|
+
return;
|
|
193
|
+
const a = `${r}Meta`;
|
|
194
|
+
return o[a] || void 0;
|
|
193
195
|
}, In = async (e) => new Promise(async (n, t) => {
|
|
194
196
|
const r = [];
|
|
195
197
|
try {
|
|
@@ -199,13 +201,13 @@ const Nt = [
|
|
|
199
201
|
/* @vite-ignore */
|
|
200
202
|
d.url
|
|
201
203
|
), g = {
|
|
202
|
-
|
|
203
|
-
description: d.meta
|
|
204
|
-
categories: d.meta
|
|
205
|
-
noDuplicatedWidgets: d.meta
|
|
204
|
+
name: d.meta?.name || "Unknown",
|
|
205
|
+
description: d.meta?.description || "Remote Plugin",
|
|
206
|
+
categories: d.meta?.categories || ["Widget"],
|
|
207
|
+
noDuplicatedWidgets: d.meta?.noDuplicatedWidgets ?? !0,
|
|
206
208
|
icon: void 0,
|
|
207
209
|
// Or a logic to map a string name to a Lucide component
|
|
208
|
-
externalDependencies: d.meta
|
|
210
|
+
externalDependencies: d.meta?.externalDependencies || []
|
|
209
211
|
};
|
|
210
212
|
r.push(dt(a, b, g));
|
|
211
213
|
}
|
|
@@ -231,27 +233,28 @@ const Nt = [
|
|
|
231
233
|
if (u || (u = ge(b, {
|
|
232
234
|
title: g,
|
|
233
235
|
description: `Local ${r ? "dynamic" : "static"} widget`
|
|
234
|
-
})), r)
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
})), r)
|
|
237
|
+
i.push(
|
|
238
|
+
dt(b, a, u)
|
|
239
|
+
);
|
|
240
|
+
else {
|
|
241
|
+
const p = a.default || a;
|
|
242
|
+
i.push(Wt(b, p, u));
|
|
240
243
|
}
|
|
241
244
|
}
|
|
242
245
|
}
|
|
243
246
|
return i;
|
|
244
|
-
},
|
|
247
|
+
}, Le = (e) => {
|
|
245
248
|
let n;
|
|
246
249
|
const t = /* @__PURE__ */ new Set(), r = (g, h) => {
|
|
247
250
|
const u = typeof g == "function" ? g(n) : g;
|
|
248
251
|
if (!Object.is(u, n)) {
|
|
249
|
-
const
|
|
250
|
-
n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((y) => y(n,
|
|
252
|
+
const p = n;
|
|
253
|
+
n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((y) => y(n, p));
|
|
251
254
|
}
|
|
252
255
|
}, i = () => n, d = { setState: r, getState: i, getInitialState: () => b, subscribe: (g) => (t.add(g), () => t.delete(g)) }, b = n = e(r, i, d);
|
|
253
256
|
return d;
|
|
254
|
-
}, Rt = ((e) => e ?
|
|
257
|
+
}, Rt = ((e) => e ? Le(e) : Le), kt = (e) => e;
|
|
255
258
|
function jt(e, n = kt) {
|
|
256
259
|
const t = ae.useSyncExternalStore(
|
|
257
260
|
e.subscribe,
|
|
@@ -263,11 +266,11 @@ function jt(e, n = kt) {
|
|
|
263
266
|
const At = (e) => {
|
|
264
267
|
const n = Rt(e), t = (r) => jt(n, r);
|
|
265
268
|
return Object.assign(t, n), t;
|
|
266
|
-
},
|
|
269
|
+
}, Ft = ((e) => At), Lt = (e) => {
|
|
267
270
|
const n = e.widgets.filter((r) => r.includes("WidgetContainer")).map((r) => Number(r.split("_")[1].replace("container", "")));
|
|
268
271
|
return `container${n.length > 0 ? Math.max(...n) + 1 : 1}`;
|
|
269
272
|
}, Vt = (e, n) => {
|
|
270
|
-
const t =
|
|
273
|
+
const t = Lt(e);
|
|
271
274
|
return `${n}_${t}`;
|
|
272
275
|
}, Ut = (e) => {
|
|
273
276
|
const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: i } = e;
|
|
@@ -478,7 +481,7 @@ const At = (e) => {
|
|
|
478
481
|
allUpdatedDashboardConfigs: d
|
|
479
482
|
};
|
|
480
483
|
}
|
|
481
|
-
}), Rn =
|
|
484
|
+
}), Rn = Ft()((...e) => ({
|
|
482
485
|
...zt(...e)
|
|
483
486
|
})), ut = (e, n) => `dashboards_${n}_${e}`, Bt = async (e, n, t, r) => {
|
|
484
487
|
const i = localStorage.getItem(ut(e, n));
|
|
@@ -533,9 +536,9 @@ const At = (e) => {
|
|
|
533
536
|
getSavedDashboards: Bt,
|
|
534
537
|
saveDashboards: Ht
|
|
535
538
|
}, kn = () => Kt, jn = () => {
|
|
536
|
-
const [e, n] =
|
|
539
|
+
const [e, n] = ce({}), [t, r] = ce({}), i = ue((h) => {
|
|
537
540
|
const u = h.dashboardId;
|
|
538
|
-
n((
|
|
541
|
+
n((p) => {
|
|
539
542
|
const y = {
|
|
540
543
|
undoIndex: 0,
|
|
541
544
|
config: h
|
|
@@ -544,7 +547,7 @@ const At = (e) => {
|
|
|
544
547
|
...D,
|
|
545
548
|
[u]: 0
|
|
546
549
|
})), {
|
|
547
|
-
...
|
|
550
|
+
...p,
|
|
548
551
|
[u]: [y]
|
|
549
552
|
// Forces a reset to just this one entry
|
|
550
553
|
};
|
|
@@ -552,18 +555,18 @@ const At = (e) => {
|
|
|
552
555
|
}, []), o = ue(
|
|
553
556
|
(h) => {
|
|
554
557
|
n((u) => {
|
|
555
|
-
const
|
|
556
|
-
undoIndex:
|
|
558
|
+
const p = h.dashboardId, y = u[p] || [], D = t[p] ?? -1, m = y.slice(0, D + 1), v = {
|
|
559
|
+
undoIndex: m.length,
|
|
557
560
|
// New index based on trimmed length
|
|
558
561
|
config: h
|
|
559
|
-
}, w = [...
|
|
560
|
-
return r((
|
|
561
|
-
...
|
|
562
|
-
[
|
|
562
|
+
}, w = [...m, v];
|
|
563
|
+
return r((T) => ({
|
|
564
|
+
...T,
|
|
565
|
+
[p]: w.length - 1
|
|
563
566
|
// Index is now the last element's index
|
|
564
567
|
})), {
|
|
565
568
|
...u,
|
|
566
|
-
[
|
|
569
|
+
[p]: w
|
|
567
570
|
};
|
|
568
571
|
});
|
|
569
572
|
},
|
|
@@ -572,17 +575,17 @@ const At = (e) => {
|
|
|
572
575
|
n((u) => {
|
|
573
576
|
if (!u[h])
|
|
574
577
|
return u;
|
|
575
|
-
const { [h]:
|
|
578
|
+
const { [h]: p, ...y } = u;
|
|
576
579
|
return y;
|
|
577
580
|
}), r((u) => {
|
|
578
|
-
const { [h]:
|
|
581
|
+
const { [h]: p, ...y } = u;
|
|
579
582
|
return y;
|
|
580
583
|
});
|
|
581
584
|
}, []), d = ue(
|
|
582
585
|
(h) => {
|
|
583
586
|
r((u) => {
|
|
584
|
-
const
|
|
585
|
-
return y !==
|
|
587
|
+
const p = u[h] ?? -1, y = Math.max(0, p - 1);
|
|
588
|
+
return y !== p ? { ...u, [h]: y } : u;
|
|
586
589
|
});
|
|
587
590
|
},
|
|
588
591
|
[
|
|
@@ -591,7 +594,7 @@ const At = (e) => {
|
|
|
591
594
|
), b = ue(
|
|
592
595
|
(h) => {
|
|
593
596
|
r((u) => {
|
|
594
|
-
const
|
|
597
|
+
const p = e[h]?.length || 0, y = u[h] ?? -1, D = Math.min(p - 1, y + 1);
|
|
595
598
|
return D !== y ? { ...u, [h]: D } : u;
|
|
596
599
|
});
|
|
597
600
|
},
|
|
@@ -608,7 +611,7 @@ const At = (e) => {
|
|
|
608
611
|
undo: d,
|
|
609
612
|
redo: b,
|
|
610
613
|
getUndoStatus: (h) => {
|
|
611
|
-
const u = t[h] ?? -1,
|
|
614
|
+
const u = t[h] ?? -1, p = e[h]?.length || 0, y = u <= 0, D = u >= p - 1;
|
|
612
615
|
return { isUndoDisabled: y, isRedoDisabled: D };
|
|
613
616
|
},
|
|
614
617
|
undoHistory: e,
|
|
@@ -644,7 +647,7 @@ function An({ className: e }) {
|
|
|
644
647
|
/* @__PURE__ */ s("path", { d: "M12 8v8" })
|
|
645
648
|
] });
|
|
646
649
|
}
|
|
647
|
-
function
|
|
650
|
+
function Fn({ className: e }) {
|
|
648
651
|
return /* @__PURE__ */ W(H, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
649
652
|
/* @__PURE__ */ s("path", { d: "M10 11v6" }),
|
|
650
653
|
/* @__PURE__ */ s("path", { d: "M14 11v6" }),
|
|
@@ -653,7 +656,7 @@ function Ln({ className: e }) {
|
|
|
653
656
|
/* @__PURE__ */ s("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
654
657
|
] });
|
|
655
658
|
}
|
|
656
|
-
function
|
|
659
|
+
function Ln({ className: e }) {
|
|
657
660
|
return /* @__PURE__ */ W(H, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
658
661
|
/* @__PURE__ */ s("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
659
662
|
/* @__PURE__ */ s("path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" })
|
|
@@ -913,10 +916,10 @@ function J(e) {
|
|
|
913
916
|
children: g,
|
|
914
917
|
...h
|
|
915
918
|
} = e, u = () => {
|
|
916
|
-
const y = e.isIconButton || !1, D = e.category || "primary",
|
|
919
|
+
const y = e.isIconButton || !1, D = e.category || "primary", m = e.buttonType || "normal", v = e.disabled || !1, w = e.className || "", T = e.font || "semibold", C = Number((e.border || 0) > 0 ? e.border : 0);
|
|
917
920
|
let S = (e.borderColor || "").trim();
|
|
918
921
|
S = S.length > 0 ? S : "";
|
|
919
|
-
const
|
|
922
|
+
const l = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), N = e.shadow || "sm", c = e.shadowHover || "md", f = (e.addCss || "").trim(), M = e.justifyCss || "justify-center";
|
|
920
923
|
if (y)
|
|
921
924
|
return G(
|
|
922
925
|
"flex flex-row items-center",
|
|
@@ -928,32 +931,32 @@ function J(e) {
|
|
|
928
931
|
"rounded-sm focus:outline-none focus:ring focus:ring-offset",
|
|
929
932
|
"transition-all duration-150",
|
|
930
933
|
"text-sm",
|
|
931
|
-
`font-${
|
|
934
|
+
`font-${T}`
|
|
932
935
|
];
|
|
933
936
|
if (v)
|
|
934
|
-
|
|
937
|
+
m === "ghost" ? $.push("text-disabled border-disabled cursor-not-allowed") : $.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
|
|
935
938
|
else {
|
|
936
939
|
$.push("cursor-pointer");
|
|
937
940
|
let I = "";
|
|
938
|
-
Se.has(
|
|
939
|
-
const
|
|
940
|
-
$.push(
|
|
941
|
+
Se.has(m) ? I = `${Se.get(m)}` : I = `${Se.get("normal")}`, C < 1 && (I = I.replace("border-[category]", ""));
|
|
942
|
+
const E = I.replace(/\[category\]/g, D).trim();
|
|
943
|
+
$.push(E);
|
|
941
944
|
}
|
|
942
|
-
return C > 0 ? ($.push(`border-[${C}px]`), $.push(`border-${S}`)) : ($.push("border-[1px]"), $.push("border-transparent")),
|
|
943
|
-
},
|
|
945
|
+
return C > 0 ? ($.push(`border-[${C}px]`), $.push(`border-${S}`)) : ($.push("border-[1px]"), $.push("border-transparent")), l > 0 ? ($.push(`hover:border-[${l}px] group-hover:border-[${l}px]`), $.push(`hover:border-${S} group-hover:border-${S}`)) : $.push("hover:border-[1px] group-hover:border-[1px]"), $.push(`shadow-${N}`), $.push(`hover:shadow-${c} group-hover:shadow-${c}`), f.length > 0 && $.push(f), f.indexOf("hidden") === -1 && $.push("inline-flex"), $.push(M), $.join(" ").trim();
|
|
946
|
+
}, p = () => {
|
|
944
947
|
const y = e.px || 0.7, D = e.py || 0.25;
|
|
945
948
|
return {
|
|
946
949
|
padding: r ? 0 : `${D}rem ${y}rem `
|
|
947
950
|
};
|
|
948
951
|
};
|
|
949
|
-
return /* @__PURE__ */ s("button", { type: "button", disabled: t, className: u(), style:
|
|
952
|
+
return /* @__PURE__ */ s("button", { type: "button", disabled: t, className: u(), style: p(), ...h, children: g });
|
|
950
953
|
}
|
|
951
954
|
const rn = (e) => e.direction === "row" ? G("flex flex-row items-center gap-2", e.classNames || "") : G("flex flex-col gap-2 w-full", e.classNames || "");
|
|
952
955
|
function on(e) {
|
|
953
956
|
const { children: n, testId: t, classNames: r, direction: i, ...o } = e, a = rn(e);
|
|
954
957
|
return /* @__PURE__ */ s("div", { "data-testid": t || "not-set", className: a, ...o, children: n });
|
|
955
958
|
}
|
|
956
|
-
const Gn =
|
|
959
|
+
const Gn = le(
|
|
957
960
|
(e, n) => {
|
|
958
961
|
const { classNames: t, innerClass: r, ...i } = e, o = G(t || "", "w-full"), a = G(
|
|
959
962
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
@@ -962,7 +965,7 @@ const Gn = ce(
|
|
|
962
965
|
);
|
|
963
966
|
return /* @__PURE__ */ s(on, { direction: "row", classNames: o, ...i, children: /* @__PURE__ */ s("div", { className: a, children: e.children }) });
|
|
964
967
|
}
|
|
965
|
-
), Zn =
|
|
968
|
+
), Zn = le((e, n) => /* @__PURE__ */ s(
|
|
966
969
|
"div",
|
|
967
970
|
{
|
|
968
971
|
"data-testid": e.testId || "not-set",
|
|
@@ -973,7 +976,7 @@ const Gn = ce(
|
|
|
973
976
|
},
|
|
974
977
|
children: e.children
|
|
975
978
|
}
|
|
976
|
-
)), Jn =
|
|
979
|
+
)), Jn = le(
|
|
977
980
|
(e, n) => /* @__PURE__ */ s(
|
|
978
981
|
"div",
|
|
979
982
|
{
|
|
@@ -982,7 +985,7 @@ const Gn = ce(
|
|
|
982
985
|
children: e.children
|
|
983
986
|
}
|
|
984
987
|
)
|
|
985
|
-
), Qn =
|
|
988
|
+
), Qn = le((e, n) => /* @__PURE__ */ s(
|
|
986
989
|
"div",
|
|
987
990
|
{
|
|
988
991
|
"data-testid": e.testId || "not-set",
|
|
@@ -1002,76 +1005,76 @@ var Ve;
|
|
|
1002
1005
|
function sn() {
|
|
1003
1006
|
if (Ve) return U;
|
|
1004
1007
|
Ve = 1;
|
|
1005
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113,
|
|
1006
|
-
function C(
|
|
1007
|
-
if (typeof
|
|
1008
|
-
var
|
|
1009
|
-
switch (
|
|
1008
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1009
|
+
function C(l) {
|
|
1010
|
+
if (typeof l == "object" && l !== null) {
|
|
1011
|
+
var N = l.$$typeof;
|
|
1012
|
+
switch (N) {
|
|
1010
1013
|
case n:
|
|
1011
|
-
switch (
|
|
1014
|
+
switch (l = l.type, l) {
|
|
1012
1015
|
case b:
|
|
1013
1016
|
case g:
|
|
1014
1017
|
case r:
|
|
1015
1018
|
case o:
|
|
1016
1019
|
case i:
|
|
1017
1020
|
case u:
|
|
1018
|
-
return
|
|
1021
|
+
return l;
|
|
1019
1022
|
default:
|
|
1020
|
-
switch (
|
|
1023
|
+
switch (l = l && l.$$typeof, l) {
|
|
1021
1024
|
case d:
|
|
1022
1025
|
case h:
|
|
1023
1026
|
case D:
|
|
1024
1027
|
case y:
|
|
1025
1028
|
case a:
|
|
1026
|
-
return
|
|
1029
|
+
return l;
|
|
1027
1030
|
default:
|
|
1028
|
-
return
|
|
1031
|
+
return N;
|
|
1029
1032
|
}
|
|
1030
1033
|
}
|
|
1031
1034
|
case t:
|
|
1032
|
-
return
|
|
1035
|
+
return N;
|
|
1033
1036
|
}
|
|
1034
1037
|
}
|
|
1035
1038
|
}
|
|
1036
|
-
function S(
|
|
1037
|
-
return C(
|
|
1038
|
-
}
|
|
1039
|
-
return U.AsyncMode = b, U.ConcurrentMode = g, U.ContextConsumer = d, U.ContextProvider = a, U.Element = n, U.ForwardRef = h, U.Fragment = r, U.Lazy = D, U.Memo = y, U.Portal = t, U.Profiler = o, U.StrictMode = i, U.Suspense = u, U.isAsyncMode = function(
|
|
1040
|
-
return S(
|
|
1041
|
-
}, U.isConcurrentMode = S, U.isContextConsumer = function(
|
|
1042
|
-
return C(
|
|
1043
|
-
}, U.isContextProvider = function(
|
|
1044
|
-
return C(
|
|
1045
|
-
}, U.isElement = function(
|
|
1046
|
-
return typeof
|
|
1047
|
-
}, U.isForwardRef = function(
|
|
1048
|
-
return C(
|
|
1049
|
-
}, U.isFragment = function(
|
|
1050
|
-
return C(
|
|
1051
|
-
}, U.isLazy = function(
|
|
1052
|
-
return C(
|
|
1053
|
-
}, U.isMemo = function(
|
|
1054
|
-
return C(
|
|
1055
|
-
}, U.isPortal = function(
|
|
1056
|
-
return C(
|
|
1057
|
-
}, U.isProfiler = function(
|
|
1058
|
-
return C(
|
|
1059
|
-
}, U.isStrictMode = function(
|
|
1060
|
-
return C(
|
|
1061
|
-
}, U.isSuspense = function(
|
|
1062
|
-
return C(
|
|
1063
|
-
}, U.isValidElementType = function(
|
|
1064
|
-
return typeof
|
|
1039
|
+
function S(l) {
|
|
1040
|
+
return C(l) === g;
|
|
1041
|
+
}
|
|
1042
|
+
return U.AsyncMode = b, U.ConcurrentMode = g, U.ContextConsumer = d, U.ContextProvider = a, U.Element = n, U.ForwardRef = h, U.Fragment = r, U.Lazy = D, U.Memo = y, U.Portal = t, U.Profiler = o, U.StrictMode = i, U.Suspense = u, U.isAsyncMode = function(l) {
|
|
1043
|
+
return S(l) || C(l) === b;
|
|
1044
|
+
}, U.isConcurrentMode = S, U.isContextConsumer = function(l) {
|
|
1045
|
+
return C(l) === d;
|
|
1046
|
+
}, U.isContextProvider = function(l) {
|
|
1047
|
+
return C(l) === a;
|
|
1048
|
+
}, U.isElement = function(l) {
|
|
1049
|
+
return typeof l == "object" && l !== null && l.$$typeof === n;
|
|
1050
|
+
}, U.isForwardRef = function(l) {
|
|
1051
|
+
return C(l) === h;
|
|
1052
|
+
}, U.isFragment = function(l) {
|
|
1053
|
+
return C(l) === r;
|
|
1054
|
+
}, U.isLazy = function(l) {
|
|
1055
|
+
return C(l) === D;
|
|
1056
|
+
}, U.isMemo = function(l) {
|
|
1057
|
+
return C(l) === y;
|
|
1058
|
+
}, U.isPortal = function(l) {
|
|
1059
|
+
return C(l) === t;
|
|
1060
|
+
}, U.isProfiler = function(l) {
|
|
1061
|
+
return C(l) === o;
|
|
1062
|
+
}, U.isStrictMode = function(l) {
|
|
1063
|
+
return C(l) === i;
|
|
1064
|
+
}, U.isSuspense = function(l) {
|
|
1065
|
+
return C(l) === u;
|
|
1066
|
+
}, U.isValidElementType = function(l) {
|
|
1067
|
+
return typeof l == "string" || typeof l == "function" || l === r || l === g || l === o || l === i || l === u || l === p || typeof l == "object" && l !== null && (l.$$typeof === D || l.$$typeof === y || l.$$typeof === a || l.$$typeof === d || l.$$typeof === h || l.$$typeof === v || l.$$typeof === w || l.$$typeof === T || l.$$typeof === m);
|
|
1065
1068
|
}, U.typeOf = C, U;
|
|
1066
1069
|
}
|
|
1067
1070
|
var q = {};
|
|
1068
1071
|
var Ue;
|
|
1069
|
-
function
|
|
1072
|
+
function cn() {
|
|
1070
1073
|
return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1071
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113,
|
|
1074
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1072
1075
|
function C(_) {
|
|
1073
1076
|
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1074
|
-
_ === r || _ === g || _ === o || _ === i || _ === u || _ ===
|
|
1077
|
+
_ === r || _ === g || _ === o || _ === i || _ === u || _ === p || typeof _ == "object" && _ !== null && (_.$$typeof === D || _.$$typeof === y || _.$$typeof === a || _.$$typeof === d || _.$$typeof === h || _.$$typeof === v || _.$$typeof === w || _.$$typeof === T || _.$$typeof === m);
|
|
1075
1078
|
}
|
|
1076
1079
|
function S(_) {
|
|
1077
1080
|
if (typeof _ == "object" && _ !== null) {
|
|
@@ -1105,7 +1108,7 @@ function ln() {
|
|
|
1105
1108
|
}
|
|
1106
1109
|
}
|
|
1107
1110
|
}
|
|
1108
|
-
var
|
|
1111
|
+
var l = b, N = g, c = d, f = a, M = n, $ = h, I = r, E = D, z = y, X = t, Q = o, K = i, ee = u, se = !1;
|
|
1109
1112
|
function de(_) {
|
|
1110
1113
|
return se || (se = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(_) || S(_) === b;
|
|
1111
1114
|
}
|
|
@@ -1124,7 +1127,7 @@ function ln() {
|
|
|
1124
1127
|
function O(_) {
|
|
1125
1128
|
return S(_) === h;
|
|
1126
1129
|
}
|
|
1127
|
-
function
|
|
1130
|
+
function F(_) {
|
|
1128
1131
|
return S(_) === r;
|
|
1129
1132
|
}
|
|
1130
1133
|
function R(_) {
|
|
@@ -1133,7 +1136,7 @@ function ln() {
|
|
|
1133
1136
|
function j(_) {
|
|
1134
1137
|
return S(_) === y;
|
|
1135
1138
|
}
|
|
1136
|
-
function
|
|
1139
|
+
function L(_) {
|
|
1137
1140
|
return S(_) === t;
|
|
1138
1141
|
}
|
|
1139
1142
|
function Y(_) {
|
|
@@ -1145,16 +1148,16 @@ function ln() {
|
|
|
1145
1148
|
function Z(_) {
|
|
1146
1149
|
return S(_) === u;
|
|
1147
1150
|
}
|
|
1148
|
-
q.AsyncMode =
|
|
1151
|
+
q.AsyncMode = l, q.ConcurrentMode = N, q.ContextConsumer = c, q.ContextProvider = f, q.Element = M, q.ForwardRef = $, q.Fragment = I, q.Lazy = E, q.Memo = z, q.Portal = X, q.Profiler = Q, q.StrictMode = K, q.Suspense = ee, q.isAsyncMode = de, q.isConcurrentMode = x, q.isContextConsumer = P, q.isContextProvider = A, q.isElement = k, q.isForwardRef = O, q.isFragment = F, q.isLazy = R, q.isMemo = j, q.isPortal = L, q.isProfiler = Y, q.isStrictMode = V, q.isSuspense = Z, q.isValidElementType = C, q.typeOf = S;
|
|
1149
1152
|
})()), q;
|
|
1150
1153
|
}
|
|
1151
1154
|
var qe;
|
|
1152
1155
|
function yt() {
|
|
1153
|
-
return qe || (qe = 1, process.env.NODE_ENV === "production" ? ye.exports = sn() : ye.exports =
|
|
1156
|
+
return qe || (qe = 1, process.env.NODE_ENV === "production" ? ye.exports = sn() : ye.exports = cn()), ye.exports;
|
|
1154
1157
|
}
|
|
1155
|
-
var
|
|
1156
|
-
function
|
|
1157
|
-
if (Ye) return
|
|
1158
|
+
var Te, Ye;
|
|
1159
|
+
function ln() {
|
|
1160
|
+
if (Ye) return Te;
|
|
1158
1161
|
Ye = 1;
|
|
1159
1162
|
var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
1160
1163
|
function r(o) {
|
|
@@ -1184,30 +1187,30 @@ function cn() {
|
|
|
1184
1187
|
return !1;
|
|
1185
1188
|
}
|
|
1186
1189
|
}
|
|
1187
|
-
return
|
|
1190
|
+
return Te = i() ? Object.assign : function(o, a) {
|
|
1188
1191
|
for (var d, b = r(o), g, h = 1; h < arguments.length; h++) {
|
|
1189
1192
|
d = Object(arguments[h]);
|
|
1190
1193
|
for (var u in d)
|
|
1191
1194
|
n.call(d, u) && (b[u] = d[u]);
|
|
1192
1195
|
if (e) {
|
|
1193
1196
|
g = e(d);
|
|
1194
|
-
for (var
|
|
1195
|
-
t.call(d, g[
|
|
1197
|
+
for (var p = 0; p < g.length; p++)
|
|
1198
|
+
t.call(d, g[p]) && (b[g[p]] = d[g[p]]);
|
|
1196
1199
|
}
|
|
1197
1200
|
}
|
|
1198
1201
|
return b;
|
|
1199
|
-
},
|
|
1202
|
+
}, Te;
|
|
1200
1203
|
}
|
|
1201
|
-
var
|
|
1204
|
+
var Ee, ze;
|
|
1202
1205
|
function Oe() {
|
|
1203
|
-
if (ze) return
|
|
1206
|
+
if (ze) return Ee;
|
|
1204
1207
|
ze = 1;
|
|
1205
1208
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
1206
|
-
return
|
|
1209
|
+
return Ee = e, Ee;
|
|
1207
1210
|
}
|
|
1208
|
-
var
|
|
1211
|
+
var Ne, Be;
|
|
1209
1212
|
function bt() {
|
|
1210
|
-
return Be || (Be = 1,
|
|
1213
|
+
return Be || (Be = 1, Ne = Function.call.bind(Object.prototype.hasOwnProperty)), Ne;
|
|
1211
1214
|
}
|
|
1212
1215
|
var _e, He;
|
|
1213
1216
|
function dn() {
|
|
@@ -1233,10 +1236,10 @@ function dn() {
|
|
|
1233
1236
|
var u;
|
|
1234
1237
|
try {
|
|
1235
1238
|
if (typeof o[h] != "function") {
|
|
1236
|
-
var
|
|
1239
|
+
var p = Error(
|
|
1237
1240
|
(b || "React class") + ": " + d + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1238
1241
|
);
|
|
1239
|
-
throw
|
|
1242
|
+
throw p.name = "Invariant Violation", p;
|
|
1240
1243
|
}
|
|
1241
1244
|
u = o[h](a, h, b, d, null, n);
|
|
1242
1245
|
} catch (D) {
|
|
@@ -1262,7 +1265,7 @@ var Me, Ke;
|
|
|
1262
1265
|
function un() {
|
|
1263
1266
|
if (Ke) return Me;
|
|
1264
1267
|
Ke = 1;
|
|
1265
|
-
var e = yt(), n =
|
|
1268
|
+
var e = yt(), n = ln(), t = /* @__PURE__ */ Oe(), r = /* @__PURE__ */ bt(), i = /* @__PURE__ */ dn(), o = function() {
|
|
1266
1269
|
};
|
|
1267
1270
|
process.env.NODE_ENV !== "production" && (o = function(d) {
|
|
1268
1271
|
var b = "Warning: " + d;
|
|
@@ -1282,7 +1285,7 @@ function un() {
|
|
|
1282
1285
|
if (typeof P == "function")
|
|
1283
1286
|
return P;
|
|
1284
1287
|
}
|
|
1285
|
-
var
|
|
1288
|
+
var p = "<<anonymous>>", y = {
|
|
1286
1289
|
array: w("array"),
|
|
1287
1290
|
bigint: w("bigint"),
|
|
1288
1291
|
bool: w("boolean"),
|
|
@@ -1291,55 +1294,55 @@ function un() {
|
|
|
1291
1294
|
object: w("object"),
|
|
1292
1295
|
string: w("string"),
|
|
1293
1296
|
symbol: w("symbol"),
|
|
1294
|
-
any:
|
|
1297
|
+
any: T(),
|
|
1295
1298
|
arrayOf: C,
|
|
1296
1299
|
element: S(),
|
|
1297
|
-
elementType:
|
|
1298
|
-
instanceOf:
|
|
1300
|
+
elementType: l(),
|
|
1301
|
+
instanceOf: N,
|
|
1299
1302
|
node: $(),
|
|
1300
1303
|
objectOf: f,
|
|
1301
|
-
oneOf:
|
|
1304
|
+
oneOf: c,
|
|
1302
1305
|
oneOfType: M,
|
|
1303
|
-
shape:
|
|
1306
|
+
shape: E,
|
|
1304
1307
|
exact: z
|
|
1305
1308
|
};
|
|
1306
1309
|
function D(x, P) {
|
|
1307
1310
|
return x === P ? x !== 0 || 1 / x === 1 / P : x !== x && P !== P;
|
|
1308
1311
|
}
|
|
1309
|
-
function
|
|
1312
|
+
function m(x, P) {
|
|
1310
1313
|
this.message = x, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
1311
1314
|
}
|
|
1312
|
-
|
|
1315
|
+
m.prototype = Error.prototype;
|
|
1313
1316
|
function v(x) {
|
|
1314
1317
|
if (process.env.NODE_ENV !== "production")
|
|
1315
1318
|
var P = {}, A = 0;
|
|
1316
|
-
function k(
|
|
1317
|
-
if (
|
|
1319
|
+
function k(F, R, j, L, Y, V, Z) {
|
|
1320
|
+
if (L = L || p, V = V || j, Z !== t) {
|
|
1318
1321
|
if (b) {
|
|
1319
1322
|
var _ = new Error(
|
|
1320
1323
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1321
1324
|
);
|
|
1322
1325
|
throw _.name = "Invariant Violation", _;
|
|
1323
1326
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1324
|
-
var te =
|
|
1327
|
+
var te = L + ":" + j;
|
|
1325
1328
|
!P[te] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1326
1329
|
A < 3 && (o(
|
|
1327
|
-
"You are manually calling a React.PropTypes validation function for the `" + V + "` prop on `" +
|
|
1330
|
+
"You are manually calling a React.PropTypes validation function for the `" + V + "` prop on `" + L + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1328
1331
|
), P[te] = !0, A++);
|
|
1329
1332
|
}
|
|
1330
1333
|
}
|
|
1331
|
-
return R[j] == null ?
|
|
1334
|
+
return R[j] == null ? F ? R[j] === null ? new m("The " + Y + " `" + V + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new m("The " + Y + " `" + V + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : x(R, j, L, Y, V);
|
|
1332
1335
|
}
|
|
1333
1336
|
var O = k.bind(null, !1);
|
|
1334
1337
|
return O.isRequired = k.bind(null, !0), O;
|
|
1335
1338
|
}
|
|
1336
1339
|
function w(x) {
|
|
1337
|
-
function P(A, k, O,
|
|
1338
|
-
var
|
|
1340
|
+
function P(A, k, O, F, R, j) {
|
|
1341
|
+
var L = A[k], Y = K(L);
|
|
1339
1342
|
if (Y !== x) {
|
|
1340
|
-
var V = ee(
|
|
1341
|
-
return new
|
|
1342
|
-
"Invalid " +
|
|
1343
|
+
var V = ee(L);
|
|
1344
|
+
return new m(
|
|
1345
|
+
"Invalid " + F + " `" + R + "` of type " + ("`" + V + "` supplied to `" + O + "`, expected ") + ("`" + x + "`."),
|
|
1343
1346
|
{ expectedType: x }
|
|
1344
1347
|
);
|
|
1345
1348
|
}
|
|
@@ -1347,20 +1350,20 @@ function un() {
|
|
|
1347
1350
|
}
|
|
1348
1351
|
return v(P);
|
|
1349
1352
|
}
|
|
1350
|
-
function
|
|
1353
|
+
function T() {
|
|
1351
1354
|
return v(a);
|
|
1352
1355
|
}
|
|
1353
1356
|
function C(x) {
|
|
1354
|
-
function P(A, k, O,
|
|
1357
|
+
function P(A, k, O, F, R) {
|
|
1355
1358
|
if (typeof x != "function")
|
|
1356
|
-
return new
|
|
1359
|
+
return new m("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside arrayOf.");
|
|
1357
1360
|
var j = A[k];
|
|
1358
1361
|
if (!Array.isArray(j)) {
|
|
1359
|
-
var
|
|
1360
|
-
return new
|
|
1362
|
+
var L = K(j);
|
|
1363
|
+
return new m("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an array."));
|
|
1361
1364
|
}
|
|
1362
1365
|
for (var Y = 0; Y < j.length; Y++) {
|
|
1363
|
-
var V = x(j, Y, O,
|
|
1366
|
+
var V = x(j, Y, O, F, R + "[" + Y + "]", t);
|
|
1364
1367
|
if (V instanceof Error)
|
|
1365
1368
|
return V;
|
|
1366
1369
|
}
|
|
@@ -1369,64 +1372,64 @@ function un() {
|
|
|
1369
1372
|
return v(P);
|
|
1370
1373
|
}
|
|
1371
1374
|
function S() {
|
|
1372
|
-
function x(P, A, k, O,
|
|
1375
|
+
function x(P, A, k, O, F) {
|
|
1373
1376
|
var R = P[A];
|
|
1374
1377
|
if (!d(R)) {
|
|
1375
1378
|
var j = K(R);
|
|
1376
|
-
return new
|
|
1379
|
+
return new m("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement."));
|
|
1377
1380
|
}
|
|
1378
1381
|
return null;
|
|
1379
1382
|
}
|
|
1380
1383
|
return v(x);
|
|
1381
1384
|
}
|
|
1382
|
-
function
|
|
1383
|
-
function x(P, A, k, O,
|
|
1385
|
+
function l() {
|
|
1386
|
+
function x(P, A, k, O, F) {
|
|
1384
1387
|
var R = P[A];
|
|
1385
1388
|
if (!e.isValidElementType(R)) {
|
|
1386
1389
|
var j = K(R);
|
|
1387
|
-
return new
|
|
1390
|
+
return new m("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement type."));
|
|
1388
1391
|
}
|
|
1389
1392
|
return null;
|
|
1390
1393
|
}
|
|
1391
1394
|
return v(x);
|
|
1392
1395
|
}
|
|
1393
|
-
function
|
|
1394
|
-
function P(A, k, O,
|
|
1396
|
+
function N(x) {
|
|
1397
|
+
function P(A, k, O, F, R) {
|
|
1395
1398
|
if (!(A[k] instanceof x)) {
|
|
1396
|
-
var j = x.name ||
|
|
1397
|
-
return new
|
|
1399
|
+
var j = x.name || p, L = de(A[k]);
|
|
1400
|
+
return new m("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected ") + ("instance of `" + j + "`."));
|
|
1398
1401
|
}
|
|
1399
1402
|
return null;
|
|
1400
1403
|
}
|
|
1401
1404
|
return v(P);
|
|
1402
1405
|
}
|
|
1403
|
-
function
|
|
1406
|
+
function c(x) {
|
|
1404
1407
|
if (!Array.isArray(x))
|
|
1405
1408
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
1406
1409
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1407
1410
|
) : o("Invalid argument supplied to oneOf, expected an array.")), a;
|
|
1408
|
-
function P(A, k, O,
|
|
1409
|
-
for (var j = A[k],
|
|
1410
|
-
if (D(j, x[
|
|
1411
|
+
function P(A, k, O, F, R) {
|
|
1412
|
+
for (var j = A[k], L = 0; L < x.length; L++)
|
|
1413
|
+
if (D(j, x[L]))
|
|
1411
1414
|
return null;
|
|
1412
1415
|
var Y = JSON.stringify(x, function(Z, _) {
|
|
1413
1416
|
var te = ee(_);
|
|
1414
1417
|
return te === "symbol" ? String(_) : _;
|
|
1415
1418
|
});
|
|
1416
|
-
return new
|
|
1419
|
+
return new m("Invalid " + F + " `" + R + "` of value `" + String(j) + "` " + ("supplied to `" + O + "`, expected one of " + Y + "."));
|
|
1417
1420
|
}
|
|
1418
1421
|
return v(P);
|
|
1419
1422
|
}
|
|
1420
1423
|
function f(x) {
|
|
1421
|
-
function P(A, k, O,
|
|
1424
|
+
function P(A, k, O, F, R) {
|
|
1422
1425
|
if (typeof x != "function")
|
|
1423
|
-
return new
|
|
1424
|
-
var j = A[k],
|
|
1425
|
-
if (
|
|
1426
|
-
return new
|
|
1426
|
+
return new m("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside objectOf.");
|
|
1427
|
+
var j = A[k], L = K(j);
|
|
1428
|
+
if (L !== "object")
|
|
1429
|
+
return new m("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an object."));
|
|
1427
1430
|
for (var Y in j)
|
|
1428
1431
|
if (r(j, Y)) {
|
|
1429
|
-
var V = x(j, Y, O,
|
|
1432
|
+
var V = x(j, Y, O, F, R + "." + Y, t);
|
|
1430
1433
|
if (V instanceof Error)
|
|
1431
1434
|
return V;
|
|
1432
1435
|
}
|
|
@@ -1444,39 +1447,39 @@ function un() {
|
|
|
1444
1447
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + se(A) + " at index " + P + "."
|
|
1445
1448
|
), a;
|
|
1446
1449
|
}
|
|
1447
|
-
function k(O,
|
|
1450
|
+
function k(O, F, R, j, L) {
|
|
1448
1451
|
for (var Y = [], V = 0; V < x.length; V++) {
|
|
1449
|
-
var Z = x[V], _ = Z(O,
|
|
1452
|
+
var Z = x[V], _ = Z(O, F, R, j, L, t);
|
|
1450
1453
|
if (_ == null)
|
|
1451
1454
|
return null;
|
|
1452
1455
|
_.data && r(_.data, "expectedType") && Y.push(_.data.expectedType);
|
|
1453
1456
|
}
|
|
1454
1457
|
var te = Y.length > 0 ? ", expected one of type [" + Y.join(", ") + "]" : "";
|
|
1455
|
-
return new
|
|
1458
|
+
return new m("Invalid " + j + " `" + L + "` supplied to " + ("`" + R + "`" + te + "."));
|
|
1456
1459
|
}
|
|
1457
1460
|
return v(k);
|
|
1458
1461
|
}
|
|
1459
1462
|
function $() {
|
|
1460
|
-
function x(P, A, k, O,
|
|
1461
|
-
return X(P[A]) ? null : new
|
|
1463
|
+
function x(P, A, k, O, F) {
|
|
1464
|
+
return X(P[A]) ? null : new m("Invalid " + O + " `" + F + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
|
|
1462
1465
|
}
|
|
1463
1466
|
return v(x);
|
|
1464
1467
|
}
|
|
1465
1468
|
function I(x, P, A, k, O) {
|
|
1466
|
-
return new
|
|
1469
|
+
return new m(
|
|
1467
1470
|
(x || "React class") + ": " + P + " type `" + A + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + O + "`."
|
|
1468
1471
|
);
|
|
1469
1472
|
}
|
|
1470
|
-
function
|
|
1471
|
-
function P(A, k, O,
|
|
1472
|
-
var j = A[k],
|
|
1473
|
-
if (
|
|
1474
|
-
return new
|
|
1473
|
+
function E(x) {
|
|
1474
|
+
function P(A, k, O, F, R) {
|
|
1475
|
+
var j = A[k], L = K(j);
|
|
1476
|
+
if (L !== "object")
|
|
1477
|
+
return new m("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
|
|
1475
1478
|
for (var Y in x) {
|
|
1476
1479
|
var V = x[Y];
|
|
1477
1480
|
if (typeof V != "function")
|
|
1478
|
-
return I(O,
|
|
1479
|
-
var Z = V(j, Y, O,
|
|
1481
|
+
return I(O, F, R, Y, ee(V));
|
|
1482
|
+
var Z = V(j, Y, O, F, R + "." + Y, t);
|
|
1480
1483
|
if (Z)
|
|
1481
1484
|
return Z;
|
|
1482
1485
|
}
|
|
@@ -1485,21 +1488,21 @@ function un() {
|
|
|
1485
1488
|
return v(P);
|
|
1486
1489
|
}
|
|
1487
1490
|
function z(x) {
|
|
1488
|
-
function P(A, k, O,
|
|
1489
|
-
var j = A[k],
|
|
1490
|
-
if (
|
|
1491
|
-
return new
|
|
1491
|
+
function P(A, k, O, F, R) {
|
|
1492
|
+
var j = A[k], L = K(j);
|
|
1493
|
+
if (L !== "object")
|
|
1494
|
+
return new m("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
|
|
1492
1495
|
var Y = n({}, A[k], x);
|
|
1493
1496
|
for (var V in Y) {
|
|
1494
1497
|
var Z = x[V];
|
|
1495
1498
|
if (r(x, V) && typeof Z != "function")
|
|
1496
|
-
return I(O,
|
|
1499
|
+
return I(O, F, R, V, ee(Z));
|
|
1497
1500
|
if (!Z)
|
|
1498
|
-
return new
|
|
1499
|
-
"Invalid " +
|
|
1501
|
+
return new m(
|
|
1502
|
+
"Invalid " + F + " `" + R + "` key `" + V + "` supplied to `" + O + "`.\nBad object: " + JSON.stringify(A[k], null, " ") + `
|
|
1500
1503
|
Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
1501
1504
|
);
|
|
1502
|
-
var _ = Z(j, V, O,
|
|
1505
|
+
var _ = Z(j, V, O, F, R + "." + V, t);
|
|
1503
1506
|
if (_)
|
|
1504
1507
|
return _;
|
|
1505
1508
|
}
|
|
@@ -1574,7 +1577,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1574
1577
|
}
|
|
1575
1578
|
}
|
|
1576
1579
|
function de(x) {
|
|
1577
|
-
return !x.constructor || !x.constructor.name ?
|
|
1580
|
+
return !x.constructor || !x.constructor.name ? p : x.constructor.name;
|
|
1578
1581
|
}
|
|
1579
1582
|
return y.checkPropTypes = i, y.resetWarningCache = i.resetWarningCache, y.PropTypes = y, y;
|
|
1580
1583
|
}, Me;
|
|
@@ -1591,10 +1594,10 @@ function fn() {
|
|
|
1591
1594
|
return t.resetWarningCache = n, Pe = function() {
|
|
1592
1595
|
function r(a, d, b, g, h, u) {
|
|
1593
1596
|
if (u !== e) {
|
|
1594
|
-
var
|
|
1597
|
+
var p = new Error(
|
|
1595
1598
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1596
1599
|
);
|
|
1597
|
-
throw
|
|
1600
|
+
throw p.name = "Invariant Violation", p;
|
|
1598
1601
|
}
|
|
1599
1602
|
}
|
|
1600
1603
|
r.isRequired = r;
|
|
@@ -1716,30 +1719,30 @@ function Re() {
|
|
|
1716
1719
|
if (et) return B;
|
|
1717
1720
|
et = 1, Object.defineProperty(B, "__esModule", {
|
|
1718
1721
|
value: !0
|
|
1719
|
-
}), B.addClassName =
|
|
1722
|
+
}), B.addClassName = l, B.addEvent = a, B.addUserSelectStyles = T, B.createCSSTransform = y, B.createSVGTransform = D, B.getTouch = v, B.getTouchIdentifier = w, B.getTranslation = m, B.innerHeight = h, B.innerWidth = u, B.matchesSelector = i, B.matchesSelectorAndParentsTo = o, B.offsetXYFromParent = p, B.outerHeight = b, B.outerWidth = g, B.removeClassName = N, B.removeEvent = d, B.scheduleRemoveUserSelectStyles = C;
|
|
1720
1723
|
var e = we(), n = t(gn());
|
|
1721
|
-
function t(
|
|
1724
|
+
function t(c, f) {
|
|
1722
1725
|
if (typeof WeakMap == "function") var M = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap();
|
|
1723
|
-
return (t = function(I,
|
|
1724
|
-
if (!
|
|
1726
|
+
return (t = function(I, E) {
|
|
1727
|
+
if (!E && I && I.__esModule) return I;
|
|
1725
1728
|
var z, X, Q = { __proto__: null, default: I };
|
|
1726
1729
|
if (I === null || typeof I != "object" && typeof I != "function") return Q;
|
|
1727
|
-
if (z =
|
|
1730
|
+
if (z = E ? $ : M) {
|
|
1728
1731
|
if (z.has(I)) return z.get(I);
|
|
1729
1732
|
z.set(I, Q);
|
|
1730
1733
|
}
|
|
1731
1734
|
for (const K in I) K !== "default" && {}.hasOwnProperty.call(I, K) && ((X = (z = Object.defineProperty) && Object.getOwnPropertyDescriptor(I, K)) && (X.get || X.set) ? z(Q, K, X) : Q[K] = I[K]);
|
|
1732
1735
|
return Q;
|
|
1733
|
-
})(
|
|
1736
|
+
})(c, f);
|
|
1734
1737
|
}
|
|
1735
1738
|
let r = "";
|
|
1736
|
-
function i(
|
|
1739
|
+
function i(c, f) {
|
|
1737
1740
|
return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(M) {
|
|
1738
|
-
return (0, e.isFunction)(
|
|
1739
|
-
})), (0, e.isFunction)(
|
|
1741
|
+
return (0, e.isFunction)(c[M]);
|
|
1742
|
+
})), (0, e.isFunction)(c[r]) ? c[r](f) : !1;
|
|
1740
1743
|
}
|
|
1741
|
-
function o(
|
|
1742
|
-
let $ =
|
|
1744
|
+
function o(c, f, M) {
|
|
1745
|
+
let $ = c;
|
|
1743
1746
|
do {
|
|
1744
1747
|
if (i($, f)) return !0;
|
|
1745
1748
|
if ($ === M) return !1;
|
|
@@ -1747,108 +1750,108 @@ function Re() {
|
|
|
1747
1750
|
} while ($);
|
|
1748
1751
|
return !1;
|
|
1749
1752
|
}
|
|
1750
|
-
function a(
|
|
1751
|
-
if (!
|
|
1753
|
+
function a(c, f, M, $) {
|
|
1754
|
+
if (!c) return;
|
|
1752
1755
|
const I = {
|
|
1753
1756
|
capture: !0,
|
|
1754
1757
|
...$
|
|
1755
1758
|
};
|
|
1756
|
-
|
|
1759
|
+
c.addEventListener ? c.addEventListener(f, M, I) : c.attachEvent ? c.attachEvent("on" + f, M) : c["on" + f] = M;
|
|
1757
1760
|
}
|
|
1758
|
-
function d(
|
|
1759
|
-
if (!
|
|
1761
|
+
function d(c, f, M, $) {
|
|
1762
|
+
if (!c) return;
|
|
1760
1763
|
const I = {
|
|
1761
1764
|
capture: !0,
|
|
1762
1765
|
...$
|
|
1763
1766
|
};
|
|
1764
|
-
|
|
1767
|
+
c.removeEventListener ? c.removeEventListener(f, M, I) : c.detachEvent ? c.detachEvent("on" + f, M) : c["on" + f] = null;
|
|
1765
1768
|
}
|
|
1766
|
-
function b(
|
|
1767
|
-
let f =
|
|
1768
|
-
const M =
|
|
1769
|
+
function b(c) {
|
|
1770
|
+
let f = c.clientHeight;
|
|
1771
|
+
const M = c.ownerDocument.defaultView.getComputedStyle(c);
|
|
1769
1772
|
return f += (0, e.int)(M.borderTopWidth), f += (0, e.int)(M.borderBottomWidth), f;
|
|
1770
1773
|
}
|
|
1771
|
-
function g(
|
|
1772
|
-
let f =
|
|
1773
|
-
const M =
|
|
1774
|
+
function g(c) {
|
|
1775
|
+
let f = c.clientWidth;
|
|
1776
|
+
const M = c.ownerDocument.defaultView.getComputedStyle(c);
|
|
1774
1777
|
return f += (0, e.int)(M.borderLeftWidth), f += (0, e.int)(M.borderRightWidth), f;
|
|
1775
1778
|
}
|
|
1776
|
-
function h(
|
|
1777
|
-
let f =
|
|
1778
|
-
const M =
|
|
1779
|
+
function h(c) {
|
|
1780
|
+
let f = c.clientHeight;
|
|
1781
|
+
const M = c.ownerDocument.defaultView.getComputedStyle(c);
|
|
1779
1782
|
return f -= (0, e.int)(M.paddingTop), f -= (0, e.int)(M.paddingBottom), f;
|
|
1780
1783
|
}
|
|
1781
|
-
function u(
|
|
1782
|
-
let f =
|
|
1783
|
-
const M =
|
|
1784
|
+
function u(c) {
|
|
1785
|
+
let f = c.clientWidth;
|
|
1786
|
+
const M = c.ownerDocument.defaultView.getComputedStyle(c);
|
|
1784
1787
|
return f -= (0, e.int)(M.paddingLeft), f -= (0, e.int)(M.paddingRight), f;
|
|
1785
1788
|
}
|
|
1786
|
-
function
|
|
1789
|
+
function p(c, f, M) {
|
|
1787
1790
|
const I = f === f.ownerDocument.body ? {
|
|
1788
1791
|
left: 0,
|
|
1789
1792
|
top: 0
|
|
1790
|
-
} : f.getBoundingClientRect(),
|
|
1793
|
+
} : f.getBoundingClientRect(), E = (c.clientX + f.scrollLeft - I.left) / M, z = (c.clientY + f.scrollTop - I.top) / M;
|
|
1791
1794
|
return {
|
|
1792
|
-
x:
|
|
1795
|
+
x: E,
|
|
1793
1796
|
y: z
|
|
1794
1797
|
};
|
|
1795
1798
|
}
|
|
1796
|
-
function y(
|
|
1797
|
-
const M =
|
|
1799
|
+
function y(c, f) {
|
|
1800
|
+
const M = m(c, f, "px");
|
|
1798
1801
|
return {
|
|
1799
1802
|
[(0, n.browserPrefixToKey)("transform", n.default)]: M
|
|
1800
1803
|
};
|
|
1801
1804
|
}
|
|
1802
|
-
function D(
|
|
1803
|
-
return
|
|
1805
|
+
function D(c, f) {
|
|
1806
|
+
return m(c, f, "");
|
|
1804
1807
|
}
|
|
1805
|
-
function
|
|
1808
|
+
function m(c, f, M) {
|
|
1806
1809
|
let {
|
|
1807
1810
|
x: $,
|
|
1808
1811
|
y: I
|
|
1809
|
-
} =
|
|
1812
|
+
} = c, E = `translate(${$}${M},${I}${M})`;
|
|
1810
1813
|
if (f) {
|
|
1811
1814
|
const z = `${typeof f.x == "string" ? f.x : f.x + M}`, X = `${typeof f.y == "string" ? f.y : f.y + M}`;
|
|
1812
|
-
|
|
1815
|
+
E = `translate(${z}, ${X})` + E;
|
|
1813
1816
|
}
|
|
1814
|
-
return
|
|
1817
|
+
return E;
|
|
1815
1818
|
}
|
|
1816
|
-
function v(
|
|
1817
|
-
return
|
|
1819
|
+
function v(c, f) {
|
|
1820
|
+
return c.targetTouches && (0, e.findInArray)(c.targetTouches, (M) => f === M.identifier) || c.changedTouches && (0, e.findInArray)(c.changedTouches, (M) => f === M.identifier);
|
|
1818
1821
|
}
|
|
1819
|
-
function w(
|
|
1820
|
-
if (
|
|
1821
|
-
if (
|
|
1822
|
+
function w(c) {
|
|
1823
|
+
if (c.targetTouches && c.targetTouches[0]) return c.targetTouches[0].identifier;
|
|
1824
|
+
if (c.changedTouches && c.changedTouches[0]) return c.changedTouches[0].identifier;
|
|
1822
1825
|
}
|
|
1823
|
-
function
|
|
1824
|
-
if (!
|
|
1825
|
-
let f =
|
|
1826
|
-
f || (f =
|
|
1826
|
+
function T(c) {
|
|
1827
|
+
if (!c) return;
|
|
1828
|
+
let f = c.getElementById("react-draggable-style-el");
|
|
1829
|
+
f || (f = c.createElement("style"), f.type = "text/css", f.id = "react-draggable-style-el", f.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1827
1830
|
`, f.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
1828
|
-
`,
|
|
1831
|
+
`, c.getElementsByTagName("head")[0].appendChild(f)), c.body && l(c.body, "react-draggable-transparent-selection");
|
|
1829
1832
|
}
|
|
1830
|
-
function C(
|
|
1833
|
+
function C(c) {
|
|
1831
1834
|
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
1832
|
-
S(
|
|
1833
|
-
}) : S(
|
|
1835
|
+
S(c);
|
|
1836
|
+
}) : S(c);
|
|
1834
1837
|
}
|
|
1835
|
-
function S(
|
|
1836
|
-
if (
|
|
1838
|
+
function S(c) {
|
|
1839
|
+
if (c)
|
|
1837
1840
|
try {
|
|
1838
|
-
if (
|
|
1839
|
-
|
|
1841
|
+
if (c.body && N(c.body, "react-draggable-transparent-selection"), c.selection)
|
|
1842
|
+
c.selection.empty();
|
|
1840
1843
|
else {
|
|
1841
|
-
const f = (
|
|
1844
|
+
const f = (c.defaultView || window).getSelection();
|
|
1842
1845
|
f && f.type !== "Caret" && f.removeAllRanges();
|
|
1843
1846
|
}
|
|
1844
1847
|
} catch {
|
|
1845
1848
|
}
|
|
1846
1849
|
}
|
|
1847
|
-
function c
|
|
1848
|
-
|
|
1850
|
+
function l(c, f) {
|
|
1851
|
+
c.classList ? c.classList.add(f) : c.className.match(new RegExp(`(?:^|\\s)${f}(?!\\S)`)) || (c.className += ` ${f}`);
|
|
1849
1852
|
}
|
|
1850
|
-
function
|
|
1851
|
-
|
|
1853
|
+
function N(c, f) {
|
|
1854
|
+
c.classList ? c.classList.remove(f) : c.className = c.className.replace(new RegExp(`(?:^|\\s)${f}(?!\\S)`, "g"), "");
|
|
1852
1855
|
}
|
|
1853
1856
|
return B;
|
|
1854
1857
|
}
|
|
@@ -1859,33 +1862,33 @@ function xt() {
|
|
|
1859
1862
|
value: !0
|
|
1860
1863
|
}), ne.canDragX = i, ne.canDragY = o, ne.createCoreData = d, ne.createDraggableData = b, ne.getBoundPosition = t, ne.getControlPosition = a, ne.snapToGrid = r;
|
|
1861
1864
|
var e = we(), n = Re();
|
|
1862
|
-
function t(u,
|
|
1863
|
-
if (!u.props.bounds) return [
|
|
1865
|
+
function t(u, p, y) {
|
|
1866
|
+
if (!u.props.bounds) return [p, y];
|
|
1864
1867
|
let {
|
|
1865
1868
|
bounds: D
|
|
1866
1869
|
} = u.props;
|
|
1867
1870
|
D = typeof D == "string" ? D : g(D);
|
|
1868
|
-
const
|
|
1871
|
+
const m = h(u);
|
|
1869
1872
|
if (typeof D == "string") {
|
|
1870
1873
|
const {
|
|
1871
1874
|
ownerDocument: v
|
|
1872
|
-
} =
|
|
1873
|
-
let
|
|
1874
|
-
if (D === "parent" ?
|
|
1875
|
+
} = m, w = v.defaultView;
|
|
1876
|
+
let T;
|
|
1877
|
+
if (D === "parent" ? T = m.parentNode : T = m.getRootNode().querySelector(D), !(T instanceof w.HTMLElement))
|
|
1875
1878
|
throw new Error('Bounds selector "' + D + '" could not find an element.');
|
|
1876
|
-
const C =
|
|
1879
|
+
const C = T, S = w.getComputedStyle(m), l = w.getComputedStyle(C);
|
|
1877
1880
|
D = {
|
|
1878
|
-
left: -
|
|
1879
|
-
top: -
|
|
1880
|
-
right: (0, n.innerWidth)(C) - (0, n.outerWidth)(
|
|
1881
|
-
bottom: (0, n.innerHeight)(C) - (0, n.outerHeight)(
|
|
1881
|
+
left: -m.offsetLeft + (0, e.int)(l.paddingLeft) + (0, e.int)(S.marginLeft),
|
|
1882
|
+
top: -m.offsetTop + (0, e.int)(l.paddingTop) + (0, e.int)(S.marginTop),
|
|
1883
|
+
right: (0, n.innerWidth)(C) - (0, n.outerWidth)(m) - m.offsetLeft + (0, e.int)(l.paddingRight) - (0, e.int)(S.marginRight),
|
|
1884
|
+
bottom: (0, n.innerHeight)(C) - (0, n.outerHeight)(m) - m.offsetTop + (0, e.int)(l.paddingBottom) - (0, e.int)(S.marginBottom)
|
|
1882
1885
|
};
|
|
1883
1886
|
}
|
|
1884
|
-
return (0, e.isNum)(D.right) && (
|
|
1887
|
+
return (0, e.isNum)(D.right) && (p = Math.min(p, D.right)), (0, e.isNum)(D.bottom) && (y = Math.min(y, D.bottom)), (0, e.isNum)(D.left) && (p = Math.max(p, D.left)), (0, e.isNum)(D.top) && (y = Math.max(y, D.top)), [p, y];
|
|
1885
1888
|
}
|
|
1886
|
-
function r(u,
|
|
1887
|
-
const D = Math.round(
|
|
1888
|
-
return [D,
|
|
1889
|
+
function r(u, p, y) {
|
|
1890
|
+
const D = Math.round(p / u[0]) * u[0], m = Math.round(y / u[1]) * u[1];
|
|
1891
|
+
return [D, m];
|
|
1889
1892
|
}
|
|
1890
1893
|
function i(u) {
|
|
1891
1894
|
return u.props.axis === "both" || u.props.axis === "x";
|
|
@@ -1893,40 +1896,40 @@ function xt() {
|
|
|
1893
1896
|
function o(u) {
|
|
1894
1897
|
return u.props.axis === "both" || u.props.axis === "y";
|
|
1895
1898
|
}
|
|
1896
|
-
function a(u,
|
|
1897
|
-
const D = typeof
|
|
1898
|
-
if (typeof
|
|
1899
|
-
const
|
|
1899
|
+
function a(u, p, y) {
|
|
1900
|
+
const D = typeof p == "number" ? (0, n.getTouch)(u, p) : null;
|
|
1901
|
+
if (typeof p == "number" && !D) return null;
|
|
1902
|
+
const m = h(y), v = y.props.offsetParent || m.offsetParent || m.ownerDocument.body;
|
|
1900
1903
|
return (0, n.offsetXYFromParent)(D || u, v, y.props.scale);
|
|
1901
1904
|
}
|
|
1902
|
-
function d(u,
|
|
1903
|
-
const D = !(0, e.isNum)(u.lastX),
|
|
1905
|
+
function d(u, p, y) {
|
|
1906
|
+
const D = !(0, e.isNum)(u.lastX), m = h(u);
|
|
1904
1907
|
return D ? {
|
|
1905
|
-
node:
|
|
1908
|
+
node: m,
|
|
1906
1909
|
deltaX: 0,
|
|
1907
1910
|
deltaY: 0,
|
|
1908
|
-
lastX:
|
|
1911
|
+
lastX: p,
|
|
1909
1912
|
lastY: y,
|
|
1910
|
-
x:
|
|
1913
|
+
x: p,
|
|
1911
1914
|
y
|
|
1912
1915
|
} : {
|
|
1913
|
-
node:
|
|
1914
|
-
deltaX:
|
|
1916
|
+
node: m,
|
|
1917
|
+
deltaX: p - u.lastX,
|
|
1915
1918
|
deltaY: y - u.lastY,
|
|
1916
1919
|
lastX: u.lastX,
|
|
1917
1920
|
lastY: u.lastY,
|
|
1918
|
-
x:
|
|
1921
|
+
x: p,
|
|
1919
1922
|
y
|
|
1920
1923
|
};
|
|
1921
1924
|
}
|
|
1922
|
-
function b(u,
|
|
1925
|
+
function b(u, p) {
|
|
1923
1926
|
const y = u.props.scale;
|
|
1924
1927
|
return {
|
|
1925
|
-
node:
|
|
1926
|
-
x: u.state.x +
|
|
1927
|
-
y: u.state.y +
|
|
1928
|
-
deltaX:
|
|
1929
|
-
deltaY:
|
|
1928
|
+
node: p.node,
|
|
1929
|
+
x: u.state.x + p.deltaX / y,
|
|
1930
|
+
y: u.state.y + p.deltaY / y,
|
|
1931
|
+
deltaX: p.deltaX / y,
|
|
1932
|
+
deltaY: p.deltaY / y,
|
|
1930
1933
|
lastX: u.state.x,
|
|
1931
1934
|
lastY: u.state.y
|
|
1932
1935
|
};
|
|
@@ -1940,10 +1943,10 @@ function xt() {
|
|
|
1940
1943
|
};
|
|
1941
1944
|
}
|
|
1942
1945
|
function h(u) {
|
|
1943
|
-
const
|
|
1944
|
-
if (!
|
|
1946
|
+
const p = u.findDOMNode();
|
|
1947
|
+
if (!p)
|
|
1945
1948
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1946
|
-
return
|
|
1949
|
+
return p;
|
|
1947
1950
|
}
|
|
1948
1951
|
return ne;
|
|
1949
1952
|
}
|
|
@@ -1963,42 +1966,42 @@ function mn() {
|
|
|
1963
1966
|
rt = 1, Object.defineProperty(he, "__esModule", {
|
|
1964
1967
|
value: !0
|
|
1965
1968
|
}), he.default = void 0;
|
|
1966
|
-
var e = b(ae), n = d(/* @__PURE__ */ vt()), t = d(
|
|
1967
|
-
function d(
|
|
1968
|
-
return
|
|
1969
|
+
var e = b(ae), n = d(/* @__PURE__ */ vt()), t = d(ct), r = Re(), i = xt(), o = we(), a = d(wt());
|
|
1970
|
+
function d(m) {
|
|
1971
|
+
return m && m.__esModule ? m : { default: m };
|
|
1969
1972
|
}
|
|
1970
|
-
function b(
|
|
1971
|
-
if (typeof WeakMap == "function") var w = /* @__PURE__ */ new WeakMap(),
|
|
1973
|
+
function b(m, v) {
|
|
1974
|
+
if (typeof WeakMap == "function") var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap();
|
|
1972
1975
|
return (b = function(C, S) {
|
|
1973
1976
|
if (!S && C && C.__esModule) return C;
|
|
1974
|
-
var
|
|
1975
|
-
if (C === null || typeof C != "object" && typeof C != "function") return
|
|
1976
|
-
if (
|
|
1977
|
-
if (
|
|
1978
|
-
|
|
1977
|
+
var l, N, c = { __proto__: null, default: C };
|
|
1978
|
+
if (C === null || typeof C != "object" && typeof C != "function") return c;
|
|
1979
|
+
if (l = S ? T : w) {
|
|
1980
|
+
if (l.has(C)) return l.get(C);
|
|
1981
|
+
l.set(C, c);
|
|
1979
1982
|
}
|
|
1980
|
-
for (const f in C) f !== "default" && {}.hasOwnProperty.call(C, f) && ((
|
|
1981
|
-
return
|
|
1982
|
-
})(
|
|
1983
|
+
for (const f in C) f !== "default" && {}.hasOwnProperty.call(C, f) && ((N = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(C, f)) && (N.get || N.set) ? l(c, f, N) : c[f] = C[f]);
|
|
1984
|
+
return c;
|
|
1985
|
+
})(m, v);
|
|
1983
1986
|
}
|
|
1984
|
-
function g(
|
|
1985
|
-
return (v = h(v)) in
|
|
1987
|
+
function g(m, v, w) {
|
|
1988
|
+
return (v = h(v)) in m ? Object.defineProperty(m, v, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : m[v] = w, m;
|
|
1986
1989
|
}
|
|
1987
|
-
function h(
|
|
1988
|
-
var v = u(
|
|
1990
|
+
function h(m) {
|
|
1991
|
+
var v = u(m, "string");
|
|
1989
1992
|
return typeof v == "symbol" ? v : v + "";
|
|
1990
1993
|
}
|
|
1991
|
-
function u(
|
|
1992
|
-
if (typeof
|
|
1993
|
-
var w =
|
|
1994
|
+
function u(m, v) {
|
|
1995
|
+
if (typeof m != "object" || !m) return m;
|
|
1996
|
+
var w = m[Symbol.toPrimitive];
|
|
1994
1997
|
if (w !== void 0) {
|
|
1995
|
-
var
|
|
1996
|
-
if (typeof
|
|
1998
|
+
var T = w.call(m, v);
|
|
1999
|
+
if (typeof T != "object") return T;
|
|
1997
2000
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1998
2001
|
}
|
|
1999
|
-
return (v === "string" ? String : Number)(
|
|
2002
|
+
return (v === "string" ? String : Number)(m);
|
|
2000
2003
|
}
|
|
2001
|
-
const
|
|
2004
|
+
const p = {
|
|
2002
2005
|
touch: {
|
|
2003
2006
|
start: "touchstart",
|
|
2004
2007
|
move: "touchmove",
|
|
@@ -2010,7 +2013,7 @@ function mn() {
|
|
|
2010
2013
|
stop: "mouseup"
|
|
2011
2014
|
}
|
|
2012
2015
|
};
|
|
2013
|
-
let y =
|
|
2016
|
+
let y = p.mouse, D = class extends e.Component {
|
|
2014
2017
|
constructor() {
|
|
2015
2018
|
super(...arguments), g(this, "dragging", !1), g(this, "lastX", NaN), g(this, "lastY", NaN), g(this, "touchIdentifier", null), g(this, "mounted", !1), g(this, "handleDragStart", (v) => {
|
|
2016
2019
|
if (this.props.onMouseDown(v), !this.props.allowAnyClick && typeof v.button == "number" && v.button !== 0) return !1;
|
|
@@ -2018,9 +2021,9 @@ function mn() {
|
|
|
2018
2021
|
if (!w || !w.ownerDocument || !w.ownerDocument.body)
|
|
2019
2022
|
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
2020
2023
|
const {
|
|
2021
|
-
ownerDocument:
|
|
2024
|
+
ownerDocument: T
|
|
2022
2025
|
} = w;
|
|
2023
|
-
if (this.props.disabled || !(v.target instanceof
|
|
2026
|
+
if (this.props.disabled || !(v.target instanceof T.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(v.target, this.props.handle, w) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(v.target, this.props.cancel, w))
|
|
2024
2027
|
return;
|
|
2025
2028
|
v.type === "touchstart" && !this.props.allowMobileScroll && v.preventDefault();
|
|
2026
2029
|
const C = (0, r.getTouchIdentifier)(v);
|
|
@@ -2028,55 +2031,55 @@ function mn() {
|
|
|
2028
2031
|
const S = (0, i.getControlPosition)(v, C, this);
|
|
2029
2032
|
if (S == null) return;
|
|
2030
2033
|
const {
|
|
2031
|
-
x:
|
|
2032
|
-
y:
|
|
2033
|
-
} = S,
|
|
2034
|
-
(0, a.default)("DraggableCore: handleDragStart: %j",
|
|
2034
|
+
x: l,
|
|
2035
|
+
y: N
|
|
2036
|
+
} = S, c = (0, i.createCoreData)(this, l, N);
|
|
2037
|
+
(0, a.default)("DraggableCore: handleDragStart: %j", c), (0, a.default)("calling", this.props.onStart), !(this.props.onStart(v, c) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(T), this.dragging = !0, this.lastX = l, this.lastY = N, (0, r.addEvent)(T, y.move, this.handleDrag), (0, r.addEvent)(T, y.stop, this.handleDragStop));
|
|
2035
2038
|
}), g(this, "handleDrag", (v) => {
|
|
2036
2039
|
const w = (0, i.getControlPosition)(v, this.touchIdentifier, this);
|
|
2037
2040
|
if (w == null) return;
|
|
2038
2041
|
let {
|
|
2039
|
-
x:
|
|
2042
|
+
x: T,
|
|
2040
2043
|
y: C
|
|
2041
2044
|
} = w;
|
|
2042
2045
|
if (Array.isArray(this.props.grid)) {
|
|
2043
|
-
let
|
|
2044
|
-
if ([
|
|
2045
|
-
|
|
2046
|
+
let N = T - this.lastX, c = C - this.lastY;
|
|
2047
|
+
if ([N, c] = (0, i.snapToGrid)(this.props.grid, N, c), !N && !c) return;
|
|
2048
|
+
T = this.lastX + N, C = this.lastY + c;
|
|
2046
2049
|
}
|
|
2047
|
-
const S = (0, i.createCoreData)(this,
|
|
2050
|
+
const S = (0, i.createCoreData)(this, T, C);
|
|
2048
2051
|
if ((0, a.default)("DraggableCore: handleDrag: %j", S), this.props.onDrag(v, S) === !1 || this.mounted === !1) {
|
|
2049
2052
|
try {
|
|
2050
2053
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
2051
2054
|
} catch {
|
|
2052
|
-
const
|
|
2053
|
-
|
|
2055
|
+
const c = document.createEvent("MouseEvents");
|
|
2056
|
+
c.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(c);
|
|
2054
2057
|
}
|
|
2055
2058
|
return;
|
|
2056
2059
|
}
|
|
2057
|
-
this.lastX =
|
|
2060
|
+
this.lastX = T, this.lastY = C;
|
|
2058
2061
|
}), g(this, "handleDragStop", (v) => {
|
|
2059
2062
|
if (!this.dragging) return;
|
|
2060
2063
|
const w = (0, i.getControlPosition)(v, this.touchIdentifier, this);
|
|
2061
2064
|
if (w == null) return;
|
|
2062
2065
|
let {
|
|
2063
|
-
x:
|
|
2066
|
+
x: T,
|
|
2064
2067
|
y: C
|
|
2065
2068
|
} = w;
|
|
2066
2069
|
if (Array.isArray(this.props.grid)) {
|
|
2067
|
-
let
|
|
2068
|
-
[
|
|
2070
|
+
let c = T - this.lastX || 0, f = C - this.lastY || 0;
|
|
2071
|
+
[c, f] = (0, i.snapToGrid)(this.props.grid, c, f), T = this.lastX + c, C = this.lastY + f;
|
|
2069
2072
|
}
|
|
2070
|
-
const S = (0, i.createCoreData)(this,
|
|
2073
|
+
const S = (0, i.createCoreData)(this, T, C);
|
|
2071
2074
|
if (this.props.onStop(v, S) === !1 || this.mounted === !1) return !1;
|
|
2072
|
-
const
|
|
2073
|
-
|
|
2074
|
-
}), g(this, "onMouseDown", (v) => (y =
|
|
2075
|
+
const N = this.findDOMNode();
|
|
2076
|
+
N && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(N.ownerDocument), (0, a.default)("DraggableCore: handleDragStop: %j", S), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, N && ((0, a.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(N.ownerDocument, y.move, this.handleDrag), (0, r.removeEvent)(N.ownerDocument, y.stop, this.handleDragStop));
|
|
2077
|
+
}), g(this, "onMouseDown", (v) => (y = p.mouse, this.handleDragStart(v))), g(this, "onMouseUp", (v) => (y = p.mouse, this.handleDragStop(v))), g(this, "onTouchStart", (v) => (y = p.touch, this.handleDragStart(v))), g(this, "onTouchEnd", (v) => (y = p.touch, this.handleDragStop(v)));
|
|
2075
2078
|
}
|
|
2076
2079
|
componentDidMount() {
|
|
2077
2080
|
this.mounted = !0;
|
|
2078
2081
|
const v = this.findDOMNode();
|
|
2079
|
-
v && (0, r.addEvent)(v,
|
|
2082
|
+
v && (0, r.addEvent)(v, p.touch.start, this.onTouchStart, {
|
|
2080
2083
|
passive: !1
|
|
2081
2084
|
});
|
|
2082
2085
|
}
|
|
@@ -2087,7 +2090,7 @@ function mn() {
|
|
|
2087
2090
|
const {
|
|
2088
2091
|
ownerDocument: w
|
|
2089
2092
|
} = v;
|
|
2090
|
-
(0, r.removeEvent)(w,
|
|
2093
|
+
(0, r.removeEvent)(w, p.mouse.move, this.handleDrag), (0, r.removeEvent)(w, p.touch.move, this.handleDrag), (0, r.removeEvent)(w, p.mouse.stop, this.handleDragStop), (0, r.removeEvent)(w, p.touch.stop, this.handleDragStop), (0, r.removeEvent)(v, p.touch.start, this.onTouchStart, {
|
|
2091
2094
|
passive: !1
|
|
2092
2095
|
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(w);
|
|
2093
2096
|
}
|
|
@@ -2142,8 +2145,8 @@ function mn() {
|
|
|
2142
2145
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
2143
2146
|
* instead of using the parent node.
|
|
2144
2147
|
*/
|
|
2145
|
-
offsetParent: function(
|
|
2146
|
-
if (
|
|
2148
|
+
offsetParent: function(m, v) {
|
|
2149
|
+
if (m[v] && m[v].nodeType !== 1)
|
|
2147
2150
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
2148
2151
|
},
|
|
2149
2152
|
/**
|
|
@@ -2268,62 +2271,62 @@ function pn() {
|
|
|
2268
2271
|
return b.default;
|
|
2269
2272
|
}
|
|
2270
2273
|
}), e.default = void 0;
|
|
2271
|
-
var n = u(ae), t = h(/* @__PURE__ */ vt()), r = h(
|
|
2274
|
+
var n = u(ae), t = h(/* @__PURE__ */ vt()), r = h(ct), i = hn(), o = Re(), a = xt(), d = we(), b = h(mn()), g = h(wt());
|
|
2272
2275
|
function h(w) {
|
|
2273
2276
|
return w && w.__esModule ? w : { default: w };
|
|
2274
2277
|
}
|
|
2275
|
-
function u(w,
|
|
2278
|
+
function u(w, T) {
|
|
2276
2279
|
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap();
|
|
2277
|
-
return (u = function(
|
|
2278
|
-
if (!
|
|
2279
|
-
var
|
|
2280
|
-
if (
|
|
2281
|
-
if (
|
|
2282
|
-
if (
|
|
2283
|
-
|
|
2280
|
+
return (u = function(l, N) {
|
|
2281
|
+
if (!N && l && l.__esModule) return l;
|
|
2282
|
+
var c, f, M = { __proto__: null, default: l };
|
|
2283
|
+
if (l === null || typeof l != "object" && typeof l != "function") return M;
|
|
2284
|
+
if (c = N ? S : C) {
|
|
2285
|
+
if (c.has(l)) return c.get(l);
|
|
2286
|
+
c.set(l, M);
|
|
2284
2287
|
}
|
|
2285
|
-
for (const $ in
|
|
2288
|
+
for (const $ in l) $ !== "default" && {}.hasOwnProperty.call(l, $) && ((f = (c = Object.defineProperty) && Object.getOwnPropertyDescriptor(l, $)) && (f.get || f.set) ? c(M, $, f) : M[$] = l[$]);
|
|
2286
2289
|
return M;
|
|
2287
|
-
})(w,
|
|
2290
|
+
})(w, T);
|
|
2288
2291
|
}
|
|
2289
|
-
function
|
|
2290
|
-
return
|
|
2291
|
-
for (var
|
|
2292
|
-
var C = arguments[
|
|
2292
|
+
function p() {
|
|
2293
|
+
return p = Object.assign ? Object.assign.bind() : function(w) {
|
|
2294
|
+
for (var T = 1; T < arguments.length; T++) {
|
|
2295
|
+
var C = arguments[T];
|
|
2293
2296
|
for (var S in C) ({}).hasOwnProperty.call(C, S) && (w[S] = C[S]);
|
|
2294
2297
|
}
|
|
2295
2298
|
return w;
|
|
2296
|
-
},
|
|
2299
|
+
}, p.apply(null, arguments);
|
|
2297
2300
|
}
|
|
2298
|
-
function y(w,
|
|
2299
|
-
return (
|
|
2301
|
+
function y(w, T, C) {
|
|
2302
|
+
return (T = D(T)) in w ? Object.defineProperty(w, T, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : w[T] = C, w;
|
|
2300
2303
|
}
|
|
2301
2304
|
function D(w) {
|
|
2302
|
-
var
|
|
2303
|
-
return typeof
|
|
2305
|
+
var T = m(w, "string");
|
|
2306
|
+
return typeof T == "symbol" ? T : T + "";
|
|
2304
2307
|
}
|
|
2305
|
-
function
|
|
2308
|
+
function m(w, T) {
|
|
2306
2309
|
if (typeof w != "object" || !w) return w;
|
|
2307
2310
|
var C = w[Symbol.toPrimitive];
|
|
2308
2311
|
if (C !== void 0) {
|
|
2309
|
-
var S = C.call(w,
|
|
2312
|
+
var S = C.call(w, T);
|
|
2310
2313
|
if (typeof S != "object") return S;
|
|
2311
2314
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2312
2315
|
}
|
|
2313
|
-
return (
|
|
2316
|
+
return (T === "string" ? String : Number)(w);
|
|
2314
2317
|
}
|
|
2315
2318
|
class v extends n.Component {
|
|
2316
2319
|
// React 16.3+
|
|
2317
2320
|
// Arity (props, state)
|
|
2318
|
-
static getDerivedStateFromProps(
|
|
2321
|
+
static getDerivedStateFromProps(T, C) {
|
|
2319
2322
|
let {
|
|
2320
2323
|
position: S
|
|
2321
|
-
} =
|
|
2322
|
-
prevPropsPosition:
|
|
2324
|
+
} = T, {
|
|
2325
|
+
prevPropsPosition: l
|
|
2323
2326
|
} = C;
|
|
2324
|
-
return S && (!
|
|
2327
|
+
return S && (!l || S.x !== l.x || S.y !== l.y) ? ((0, g.default)("Draggable: getDerivedStateFromProps %j", {
|
|
2325
2328
|
position: S,
|
|
2326
|
-
prevPropsPosition:
|
|
2329
|
+
prevPropsPosition: l
|
|
2327
2330
|
}), {
|
|
2328
2331
|
x: S.x,
|
|
2329
2332
|
y: S.y,
|
|
@@ -2332,8 +2335,8 @@ function pn() {
|
|
|
2332
2335
|
}
|
|
2333
2336
|
}) : null;
|
|
2334
2337
|
}
|
|
2335
|
-
constructor(
|
|
2336
|
-
super(
|
|
2338
|
+
constructor(T) {
|
|
2339
|
+
super(T), y(this, "onDragStart", (C, S) => {
|
|
2337
2340
|
if ((0, g.default)("Draggable: onDragStart: %j", S), this.props.onStart(C, (0, a.createDraggableData)(this, S)) === !1) return !1;
|
|
2338
2341
|
this.setState({
|
|
2339
2342
|
dragging: !0,
|
|
@@ -2342,9 +2345,9 @@ function pn() {
|
|
|
2342
2345
|
}), y(this, "onDrag", (C, S) => {
|
|
2343
2346
|
if (!this.state.dragging) return !1;
|
|
2344
2347
|
(0, g.default)("Draggable: onDrag: %j", S);
|
|
2345
|
-
const
|
|
2346
|
-
x:
|
|
2347
|
-
y:
|
|
2348
|
+
const l = (0, a.createDraggableData)(this, S), N = {
|
|
2349
|
+
x: l.x,
|
|
2350
|
+
y: l.y,
|
|
2348
2351
|
slackX: 0,
|
|
2349
2352
|
slackY: 0
|
|
2350
2353
|
};
|
|
@@ -2352,17 +2355,17 @@ function pn() {
|
|
|
2352
2355
|
const {
|
|
2353
2356
|
x: f,
|
|
2354
2357
|
y: M
|
|
2355
|
-
} =
|
|
2356
|
-
|
|
2357
|
-
const [$, I] = (0, a.getBoundPosition)(this,
|
|
2358
|
-
|
|
2358
|
+
} = N;
|
|
2359
|
+
N.x += this.state.slackX, N.y += this.state.slackY;
|
|
2360
|
+
const [$, I] = (0, a.getBoundPosition)(this, N.x, N.y);
|
|
2361
|
+
N.x = $, N.y = I, N.slackX = this.state.slackX + (f - N.x), N.slackY = this.state.slackY + (M - N.y), l.x = N.x, l.y = N.y, l.deltaX = N.x - this.state.x, l.deltaY = N.y - this.state.y;
|
|
2359
2362
|
}
|
|
2360
|
-
if (this.props.onDrag(C,
|
|
2361
|
-
this.setState(
|
|
2363
|
+
if (this.props.onDrag(C, l) === !1) return !1;
|
|
2364
|
+
this.setState(N);
|
|
2362
2365
|
}), y(this, "onDragStop", (C, S) => {
|
|
2363
2366
|
if (!this.state.dragging || this.props.onStop(C, (0, a.createDraggableData)(this, S)) === !1) return !1;
|
|
2364
2367
|
(0, g.default)("Draggable: onDragStop: %j", S);
|
|
2365
|
-
const
|
|
2368
|
+
const N = {
|
|
2366
2369
|
dragging: !1,
|
|
2367
2370
|
slackX: 0,
|
|
2368
2371
|
slackY: 0
|
|
@@ -2372,26 +2375,26 @@ function pn() {
|
|
|
2372
2375
|
x: f,
|
|
2373
2376
|
y: M
|
|
2374
2377
|
} = this.props.position;
|
|
2375
|
-
|
|
2378
|
+
N.x = f, N.y = M;
|
|
2376
2379
|
}
|
|
2377
|
-
this.setState(
|
|
2380
|
+
this.setState(N);
|
|
2378
2381
|
}), this.state = {
|
|
2379
2382
|
// Whether or not we are currently dragging.
|
|
2380
2383
|
dragging: !1,
|
|
2381
2384
|
// Whether or not we have been dragged before.
|
|
2382
2385
|
dragged: !1,
|
|
2383
2386
|
// Current transform x and y.
|
|
2384
|
-
x:
|
|
2385
|
-
y:
|
|
2387
|
+
x: T.position ? T.position.x : T.defaultPosition.x,
|
|
2388
|
+
y: T.position ? T.position.y : T.defaultPosition.y,
|
|
2386
2389
|
prevPropsPosition: {
|
|
2387
|
-
...
|
|
2390
|
+
...T.position
|
|
2388
2391
|
},
|
|
2389
2392
|
// Used for compensating for out-of-bounds drags
|
|
2390
2393
|
slackX: 0,
|
|
2391
2394
|
slackY: 0,
|
|
2392
2395
|
// Can only determine if SVG after mounting
|
|
2393
2396
|
isElementSVG: !1
|
|
2394
|
-
},
|
|
2397
|
+
}, T.position && !(T.onDrag || T.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
|
|
2395
2398
|
}
|
|
2396
2399
|
componentDidMount() {
|
|
2397
2400
|
typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
|
|
@@ -2410,31 +2413,31 @@ function pn() {
|
|
|
2410
2413
|
}
|
|
2411
2414
|
render() {
|
|
2412
2415
|
const {
|
|
2413
|
-
axis:
|
|
2416
|
+
axis: T,
|
|
2414
2417
|
bounds: C,
|
|
2415
2418
|
children: S,
|
|
2416
|
-
defaultPosition:
|
|
2417
|
-
defaultClassName:
|
|
2418
|
-
defaultClassNameDragging:
|
|
2419
|
+
defaultPosition: l,
|
|
2420
|
+
defaultClassName: N,
|
|
2421
|
+
defaultClassNameDragging: c,
|
|
2419
2422
|
defaultClassNameDragged: f,
|
|
2420
2423
|
position: M,
|
|
2421
2424
|
positionOffset: $,
|
|
2422
2425
|
scale: I,
|
|
2423
|
-
...
|
|
2426
|
+
...E
|
|
2424
2427
|
} = this.props;
|
|
2425
2428
|
let z = {}, X = null;
|
|
2426
|
-
const K = !!!M || this.state.dragging, ee = M ||
|
|
2429
|
+
const K = !!!M || this.state.dragging, ee = M || l, se = {
|
|
2427
2430
|
// Set left if horizontal drag is enabled
|
|
2428
2431
|
x: (0, a.canDragX)(this) && K ? this.state.x : ee.x,
|
|
2429
2432
|
// Set top if vertical drag is enabled
|
|
2430
2433
|
y: (0, a.canDragY)(this) && K ? this.state.y : ee.y
|
|
2431
2434
|
};
|
|
2432
2435
|
this.state.isElementSVG ? X = (0, o.createSVGTransform)(se, $) : z = (0, o.createCSSTransform)(se, $);
|
|
2433
|
-
const de = (0, i.clsx)(S.props.className || "",
|
|
2434
|
-
[
|
|
2436
|
+
const de = (0, i.clsx)(S.props.className || "", N, {
|
|
2437
|
+
[c]: this.state.dragging,
|
|
2435
2438
|
[f]: this.state.dragged
|
|
2436
2439
|
});
|
|
2437
|
-
return /* @__PURE__ */ n.createElement(b.default,
|
|
2440
|
+
return /* @__PURE__ */ n.createElement(b.default, p({}, E, {
|
|
2438
2441
|
onStart: this.onDragStart,
|
|
2439
2442
|
onDrag: this.onDrag,
|
|
2440
2443
|
onStop: this.onDragStop
|
|
@@ -2581,7 +2584,7 @@ function yn() {
|
|
|
2581
2584
|
return fe.exports = e, fe.exports.default = e, fe.exports.DraggableCore = n, fe.exports;
|
|
2582
2585
|
}
|
|
2583
2586
|
var bn = yn();
|
|
2584
|
-
const vn = /* @__PURE__ */ an(bn), xn =
|
|
2587
|
+
const vn = /* @__PURE__ */ an(bn), xn = le((e, n) => {
|
|
2585
2588
|
const r = {
|
|
2586
2589
|
...{
|
|
2587
2590
|
// 1. Take it out of the document flow
|
|
@@ -2647,8 +2650,8 @@ function nr({ children: e, addCssClasses: n }) {
|
|
|
2647
2650
|
}
|
|
2648
2651
|
const rr = (e) => {
|
|
2649
2652
|
console.warn("showToast TODO", e);
|
|
2650
|
-
}, wn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, or =
|
|
2651
|
-
let t =
|
|
2653
|
+
}, wn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, or = le((e, n) => {
|
|
2654
|
+
let t = lt(Number(e.zoomScale || 0));
|
|
2652
2655
|
const r = e.responsiveGrid || !1, i = e.isEditing || !1, o = {
|
|
2653
2656
|
"--bwj-dashboard-transform-scale": t,
|
|
2654
2657
|
"--bwj-dashboard-add-cols": wn(t)
|
|
@@ -2730,7 +2733,7 @@ const rr = (e) => {
|
|
|
2730
2733
|
] }),
|
|
2731
2734
|
/* @__PURE__ */ s("div", { className: "widget-inner", children: e.children })
|
|
2732
2735
|
] });
|
|
2733
|
-
}, at =
|
|
2736
|
+
}, at = le(Cn), Sn = (e, n) => {
|
|
2734
2737
|
const t = (o) => o.replace(/[^0-9.]/g, ""), r = t(e).split(".").map(Number), i = t(n).split(".").map(Number);
|
|
2735
2738
|
return !(r[0] !== i[0] || r[1] < i[1]);
|
|
2736
2739
|
};
|
|
@@ -2740,7 +2743,7 @@ function Dn(e) {
|
|
|
2740
2743
|
/* @__PURE__ */ s("div", { className: "animate-ping rounded-full h-32 w-32 border-8 border-white" })
|
|
2741
2744
|
] }) });
|
|
2742
2745
|
}
|
|
2743
|
-
function
|
|
2746
|
+
function Tn({
|
|
2744
2747
|
index: e,
|
|
2745
2748
|
maxIndex: n,
|
|
2746
2749
|
widgetKey: t,
|
|
@@ -2755,32 +2758,32 @@ function Nn({
|
|
|
2755
2758
|
onMoveClick: h,
|
|
2756
2759
|
selectContainer: u
|
|
2757
2760
|
}) {
|
|
2758
|
-
const
|
|
2759
|
-
if (!
|
|
2761
|
+
const p = `${t}`.split("_"), y = p.length > 1, D = y ? p[0] : t, m = a.get(D);
|
|
2762
|
+
if (!m)
|
|
2760
2763
|
return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2761
2764
|
"Widget not found in catalog: ",
|
|
2762
2765
|
D
|
|
2763
2766
|
] }) });
|
|
2764
2767
|
let v = null, w = !1;
|
|
2765
|
-
const
|
|
2768
|
+
const T = !!m.isContainer, C = y ? mt(t) : "", S = T ? (o || []).filter((c) => c.parentWidgetKey === t) : [], l = {
|
|
2766
2769
|
index: e,
|
|
2767
2770
|
maxIndex: n,
|
|
2768
2771
|
widgetKey: t,
|
|
2769
2772
|
parentWidgetKey: r,
|
|
2770
2773
|
isEditing: d,
|
|
2771
2774
|
extraProps: b,
|
|
2772
|
-
title: y ? C :
|
|
2775
|
+
title: y ? C : m.title,
|
|
2773
2776
|
onRemoveClick: g,
|
|
2774
2777
|
onMoveClick: h
|
|
2775
2778
|
};
|
|
2776
|
-
if (
|
|
2777
|
-
if (!
|
|
2778
|
-
const
|
|
2779
|
+
if (m.component ? (v = m.component, w = !1) : m.loader && (w = !0, v = st(() => {
|
|
2780
|
+
if (!m) return null;
|
|
2781
|
+
const c = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", f = m.meta?.externalDependencies || [], M = f.find(($) => $.startsWith("react@"));
|
|
2779
2782
|
if (M) {
|
|
2780
2783
|
const $ = M.split("@")[1];
|
|
2781
|
-
if (!Sn(
|
|
2784
|
+
if (!Sn(c, $))
|
|
2782
2785
|
return ae.lazy(async () => ({
|
|
2783
|
-
default: () => /* @__PURE__ */ s(at, { ...
|
|
2786
|
+
default: () => /* @__PURE__ */ s(at, { ...l, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2784
2787
|
/* @__PURE__ */ W("p", { className: "font-bold", children: [
|
|
2785
2788
|
'Failed to load "',
|
|
2786
2789
|
t,
|
|
@@ -2800,36 +2803,36 @@ function Nn({
|
|
|
2800
2803
|
] }),
|
|
2801
2804
|
". Host is running",
|
|
2802
2805
|
" ",
|
|
2803
|
-
/* @__PURE__ */ s("strong", { children:
|
|
2806
|
+
/* @__PURE__ */ s("strong", { children: c }),
|
|
2804
2807
|
"."
|
|
2805
2808
|
] })
|
|
2806
2809
|
] }),
|
|
2807
2810
|
/* @__PURE__ */ W("div", { className: "flex flex-col mt-3", children: [
|
|
2808
2811
|
/* @__PURE__ */ s("h5", { children: "Externals:" }),
|
|
2809
|
-
/* @__PURE__ */ s("dl", { className: "ml-2 flex flex-col text-xs", children: f.map((I,
|
|
2812
|
+
/* @__PURE__ */ s("dl", { className: "ml-2 flex flex-col text-xs", children: f.map((I, E) => /* @__PURE__ */ W("dd", { children: [
|
|
2810
2813
|
"- ",
|
|
2811
2814
|
I
|
|
2812
|
-
] },
|
|
2815
|
+
] }, E)) })
|
|
2813
2816
|
] })
|
|
2814
2817
|
] }) })
|
|
2815
2818
|
}));
|
|
2816
2819
|
}
|
|
2817
|
-
if (
|
|
2818
|
-
return
|
|
2819
|
-
if (
|
|
2820
|
+
if (m.component)
|
|
2821
|
+
return m.component;
|
|
2822
|
+
if (m.loader) {
|
|
2820
2823
|
const $ = async () => {
|
|
2821
2824
|
try {
|
|
2822
|
-
return await
|
|
2825
|
+
return await m.loader();
|
|
2823
2826
|
} catch (I) {
|
|
2824
2827
|
return console.error(`CDN Load Failure for ${t}:`, I), {
|
|
2825
|
-
default: () => /* @__PURE__ */ s(at, { ...
|
|
2828
|
+
default: () => /* @__PURE__ */ s(at, { ...l, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2826
2829
|
/* @__PURE__ */ W("p", { className: "font-bold", children: [
|
|
2827
2830
|
'Failed to load "',
|
|
2828
2831
|
t,
|
|
2829
2832
|
'"'
|
|
2830
2833
|
] }),
|
|
2831
2834
|
/* @__PURE__ */ s("p", { className: "text-xs italic", children: "The remote plugin is unavailable or incompatible." }),
|
|
2832
|
-
/* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(
|
|
2835
|
+
/* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(m.meta || {}, null, 2) })
|
|
2833
2836
|
] }) })
|
|
2834
2837
|
};
|
|
2835
2838
|
}
|
|
@@ -2837,32 +2840,32 @@ function Nn({
|
|
|
2837
2840
|
return ae.lazy($);
|
|
2838
2841
|
}
|
|
2839
2842
|
return null;
|
|
2840
|
-
}, [
|
|
2843
|
+
}, [m, t])), !v)
|
|
2841
2844
|
return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2842
2845
|
"Widget definition incomplete: ",
|
|
2843
2846
|
D
|
|
2844
2847
|
] }) });
|
|
2845
|
-
const
|
|
2848
|
+
const N = T ? {
|
|
2846
2849
|
highlight: i === t,
|
|
2847
2850
|
selectContainer: u,
|
|
2848
2851
|
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2849
|
-
children: S.map((
|
|
2850
|
-
|
|
2852
|
+
children: S.map((c, f) => /* @__PURE__ */ s(
|
|
2853
|
+
Tn,
|
|
2851
2854
|
{
|
|
2852
2855
|
index: f,
|
|
2853
2856
|
maxIndex: S.length - 1,
|
|
2854
|
-
widgetKey:
|
|
2855
|
-
parentWidgetKey:
|
|
2857
|
+
widgetKey: c.widgetKey,
|
|
2858
|
+
parentWidgetKey: c.parentWidgetKey,
|
|
2856
2859
|
widgetCatalog: a,
|
|
2857
2860
|
isEditing: d,
|
|
2858
2861
|
extraProps: b,
|
|
2859
2862
|
onRemoveClick: g,
|
|
2860
2863
|
onMoveClick: h
|
|
2861
2864
|
},
|
|
2862
|
-
`${
|
|
2865
|
+
`${c.widgetKey}_${f}`
|
|
2863
2866
|
))
|
|
2864
2867
|
} : {};
|
|
2865
|
-
return w ? /* @__PURE__ */ s(St, { fallback: /* @__PURE__ */ s(Dn, { title: `Loading ${
|
|
2868
|
+
return w ? /* @__PURE__ */ s(St, { fallback: /* @__PURE__ */ s(Dn, { title: `Loading ${m.title}` }), children: /* @__PURE__ */ s(v, { ...l, ...N }) }) : /* @__PURE__ */ s(v, { ...l, ...N });
|
|
2866
2869
|
}
|
|
2867
2870
|
const xe = "size-5";
|
|
2868
2871
|
function ke(e) {
|
|
@@ -2883,21 +2886,21 @@ function ke(e) {
|
|
|
2883
2886
|
`direction-${t}`,
|
|
2884
2887
|
`border ${d}`,
|
|
2885
2888
|
`${n ? "highlight-container" : ""} ${d}`
|
|
2886
|
-
),
|
|
2889
|
+
), p = `widget-container-header direction-${t} flex items-center border-1 ${d}`;
|
|
2887
2890
|
const y = () => {
|
|
2888
2891
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2889
2892
|
}, D = (v) => {
|
|
2890
2893
|
e.onMoveClick && e.widgetKey && e.onMoveClick(v, e.widgetKey, e.parentWidgetKey);
|
|
2891
|
-
},
|
|
2894
|
+
}, m = () => {
|
|
2892
2895
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2893
2896
|
};
|
|
2894
2897
|
return /* @__PURE__ */ W("div", { "data-testid": `container_${e.widgetKey}`, className: u, children: [
|
|
2895
|
-
/* @__PURE__ */ W("div", { className:
|
|
2898
|
+
/* @__PURE__ */ W("div", { className: p, children: [
|
|
2896
2899
|
/* @__PURE__ */ s(
|
|
2897
2900
|
"div",
|
|
2898
2901
|
{
|
|
2899
2902
|
className: "widget-title-wrapper w-full flex whitespace-nowrap",
|
|
2900
|
-
onClick:
|
|
2903
|
+
onClick: m,
|
|
2901
2904
|
children: /* @__PURE__ */ s("span", { className: "text-sm font-semibold capitalize", children: e.title })
|
|
2902
2905
|
}
|
|
2903
2906
|
),
|
|
@@ -2912,7 +2915,7 @@ function ke(e) {
|
|
|
2912
2915
|
placement: "top",
|
|
2913
2916
|
title: "Target this Container"
|
|
2914
2917
|
},
|
|
2915
|
-
onClick:
|
|
2918
|
+
onClick: m,
|
|
2916
2919
|
children: /* @__PURE__ */ s(
|
|
2917
2920
|
tn,
|
|
2918
2921
|
{
|
|
@@ -2985,7 +2988,7 @@ function We({
|
|
|
2985
2988
|
alreadyAdded: n,
|
|
2986
2989
|
addWidget: t
|
|
2987
2990
|
}) {
|
|
2988
|
-
const [r, i] =
|
|
2991
|
+
const [r, i] = ce(!1), o = e.icon || nn, a = e.name || "Unknown", d = e.description || "---", g = (e.noDuplicatedWidgets || !1) && n, h = G(`
|
|
2989
2992
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2990
2993
|
${g ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2991
2994
|
`);
|
|
@@ -3011,11 +3014,11 @@ function We({
|
|
|
3011
3014
|
] })
|
|
3012
3015
|
] });
|
|
3013
3016
|
}
|
|
3014
|
-
function
|
|
3017
|
+
function En({
|
|
3015
3018
|
item: e,
|
|
3016
3019
|
onSettingItemChanged: n
|
|
3017
3020
|
}) {
|
|
3018
|
-
const t = e.
|
|
3021
|
+
const t = e.name || "Unknown", r = e.description || "---", i = G(`
|
|
3019
3022
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
3020
3023
|
`), o = (d) => {
|
|
3021
3024
|
const b = d.key;
|
|
@@ -3056,7 +3059,7 @@ const Ie = (e, n) => [
|
|
|
3056
3059
|
...n.widgets.filter((r) => r.indexOf("Container") === -1),
|
|
3057
3060
|
...n.childWidgetsConfig.map((r) => r.widgetKey)
|
|
3058
3061
|
].includes(e);
|
|
3059
|
-
function
|
|
3062
|
+
function cr({
|
|
3060
3063
|
targetContainerKey: e,
|
|
3061
3064
|
widgetsCatalog: n,
|
|
3062
3065
|
currentDashboardConfig: t,
|
|
@@ -3068,35 +3071,35 @@ function lr({
|
|
|
3068
3071
|
onUndoOrRedo: b,
|
|
3069
3072
|
onDoneClick: g
|
|
3070
3073
|
}) {
|
|
3071
|
-
const [h, u] =
|
|
3072
|
-
widgetKey:
|
|
3073
|
-
metaData: $t(
|
|
3074
|
-
})),
|
|
3075
|
-
|
|
3076
|
-
}, C = (
|
|
3074
|
+
const [h, u] = ce("Editing"), [p, y] = ce(0), [D, m] = ce(""), w = Array.from(n.keys()).map((E) => ({
|
|
3075
|
+
widgetKey: E,
|
|
3076
|
+
metaData: $t(E, n)
|
|
3077
|
+
})), T = (E) => {
|
|
3078
|
+
m(E.target.value);
|
|
3079
|
+
}, C = (E) => {
|
|
3077
3080
|
const z = D.trim().toLowerCase();
|
|
3078
|
-
return z.length < 1 ? !0 :
|
|
3079
|
-
}, S = (
|
|
3081
|
+
return z.length < 1 ? !0 : E.name.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
|
|
3082
|
+
}, S = (E) => {
|
|
3080
3083
|
const z = D.trim().toLowerCase();
|
|
3081
|
-
return z.length < 1 ? !0 :
|
|
3082
|
-
},
|
|
3084
|
+
return z.length < 1 ? !0 : E.name.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
|
|
3085
|
+
}, l = (E) => G(
|
|
3083
3086
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
3084
|
-
|
|
3085
|
-
),
|
|
3087
|
+
E === p ? "text-primary border-primary" : ""
|
|
3088
|
+
), N = !!e;
|
|
3086
3089
|
Dt(() => {
|
|
3087
3090
|
if (e) {
|
|
3088
3091
|
y(0);
|
|
3089
|
-
const
|
|
3090
|
-
u(`Editing ${
|
|
3092
|
+
const E = mt(e);
|
|
3093
|
+
u(`Editing ${E}`);
|
|
3091
3094
|
} else
|
|
3092
3095
|
u("Editing Dashboard");
|
|
3093
3096
|
}, [e]);
|
|
3094
|
-
const
|
|
3095
|
-
|
|
3096
|
-
}, f = (
|
|
3097
|
-
const z = (t.cssSettings || []).map((X) => X.key ===
|
|
3097
|
+
const c = (E) => {
|
|
3098
|
+
N ? i(E, e) : i(E);
|
|
3099
|
+
}, f = (E) => {
|
|
3100
|
+
const z = (t.cssSettings || []).map((X) => X.key === E.key ? E : X);
|
|
3098
3101
|
a(z);
|
|
3099
|
-
}, [M, $] =
|
|
3102
|
+
}, [M, $] = ce(!1);
|
|
3100
3103
|
return /* @__PURE__ */ s(
|
|
3101
3104
|
xn,
|
|
3102
3105
|
{
|
|
@@ -3109,8 +3112,8 @@ function lr({
|
|
|
3109
3112
|
minHeight: "360px",
|
|
3110
3113
|
backdropFilter: "blur(8px)"
|
|
3111
3114
|
},
|
|
3112
|
-
onDraggingChange: (
|
|
3113
|
-
$(
|
|
3115
|
+
onDraggingChange: (E) => {
|
|
3116
|
+
$(E);
|
|
3114
3117
|
},
|
|
3115
3118
|
children: /* @__PURE__ */ W("div", { className: "flex flex-col gap-2 p-2", children: [
|
|
3116
3119
|
/* @__PURE__ */ W("div", { className: "flex flex-row gap-2 justify-between", children: [
|
|
@@ -3120,7 +3123,7 @@ function lr({
|
|
|
3120
3123
|
"h2",
|
|
3121
3124
|
{
|
|
3122
3125
|
className: "flex-1 text-base margin-0 capitalize",
|
|
3123
|
-
title:
|
|
3126
|
+
title: N ? h : `Editing dashboard: ${t.dashboardName}`,
|
|
3124
3127
|
children: h
|
|
3125
3128
|
}
|
|
3126
3129
|
)
|
|
@@ -3170,10 +3173,10 @@ function lr({
|
|
|
3170
3173
|
] })
|
|
3171
3174
|
] }),
|
|
3172
3175
|
/* @__PURE__ */ W("div", { className: "flex border-b border-gray-200", children: [
|
|
3173
|
-
/* @__PURE__ */ s("button", { onClick: () => y(0), className:
|
|
3174
|
-
/* @__PURE__ */ s("button", { onClick: () => y(1), className:
|
|
3175
|
-
!
|
|
3176
|
-
!
|
|
3176
|
+
/* @__PURE__ */ s("button", { onClick: () => y(0), className: l(0), children: "Widgets" }),
|
|
3177
|
+
/* @__PURE__ */ s("button", { onClick: () => y(1), className: l(1), children: "Charts" }),
|
|
3178
|
+
!N && /* @__PURE__ */ s("button", { onClick: () => y(2), className: l(2), children: "Containers" }),
|
|
3179
|
+
!N && /* @__PURE__ */ s("button", { onClick: () => y(3), className: l(3), children: /* @__PURE__ */ s(Xt, {}) })
|
|
3177
3180
|
] }),
|
|
3178
3181
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-1 w-full", children: /* @__PURE__ */ s(
|
|
3179
3182
|
pt,
|
|
@@ -3182,7 +3185,7 @@ function lr({
|
|
|
3182
3185
|
size: "small",
|
|
3183
3186
|
className: "w-full",
|
|
3184
3187
|
value: D,
|
|
3185
|
-
onChange:
|
|
3188
|
+
onChange: T
|
|
3186
3189
|
}
|
|
3187
3190
|
) }),
|
|
3188
3191
|
/* @__PURE__ */ W(
|
|
@@ -3193,47 +3196,47 @@ function lr({
|
|
|
3193
3196
|
maxHeight: "360px"
|
|
3194
3197
|
},
|
|
3195
3198
|
children: [
|
|
3196
|
-
|
|
3197
|
-
(
|
|
3198
|
-
).map((
|
|
3199
|
+
p === 0 && w.filter(
|
|
3200
|
+
(E) => E.metaData.categories.includes("Widget") && C(E.metaData)
|
|
3201
|
+
).map((E) => /* @__PURE__ */ s(
|
|
3199
3202
|
We,
|
|
3200
3203
|
{
|
|
3201
|
-
widgetKey:
|
|
3202
|
-
metaData:
|
|
3203
|
-
alreadyAdded: Ie(
|
|
3204
|
-
addWidget: () =>
|
|
3204
|
+
widgetKey: E.widgetKey,
|
|
3205
|
+
metaData: E.metaData,
|
|
3206
|
+
alreadyAdded: Ie(E.widgetKey, t),
|
|
3207
|
+
addWidget: () => c(E.widgetKey)
|
|
3205
3208
|
},
|
|
3206
|
-
|
|
3209
|
+
E.widgetKey
|
|
3207
3210
|
)),
|
|
3208
|
-
|
|
3209
|
-
(
|
|
3210
|
-
).map((
|
|
3211
|
+
p === 1 && w.filter(
|
|
3212
|
+
(E) => E.metaData.categories.includes("Chart") && C(E.metaData)
|
|
3213
|
+
).map((E) => /* @__PURE__ */ s(
|
|
3211
3214
|
We,
|
|
3212
3215
|
{
|
|
3213
|
-
widgetKey:
|
|
3214
|
-
metaData:
|
|
3215
|
-
alreadyAdded: Ie(
|
|
3216
|
-
addWidget: () =>
|
|
3216
|
+
widgetKey: E.widgetKey,
|
|
3217
|
+
metaData: E.metaData,
|
|
3218
|
+
alreadyAdded: Ie(E.widgetKey, t),
|
|
3219
|
+
addWidget: () => c(E.widgetKey)
|
|
3217
3220
|
},
|
|
3218
|
-
|
|
3221
|
+
E.widgetKey
|
|
3219
3222
|
)),
|
|
3220
|
-
!
|
|
3223
|
+
!N && p === 2 && w.filter((E) => E.metaData.categories.includes("Container")).map((E) => /* @__PURE__ */ s(
|
|
3221
3224
|
We,
|
|
3222
3225
|
{
|
|
3223
|
-
widgetKey:
|
|
3224
|
-
metaData:
|
|
3225
|
-
alreadyAdded: Ie(
|
|
3226
|
-
addWidget: () => o(
|
|
3226
|
+
widgetKey: E.widgetKey,
|
|
3227
|
+
metaData: E.metaData,
|
|
3228
|
+
alreadyAdded: Ie(E.widgetKey, t),
|
|
3229
|
+
addWidget: () => o(E.widgetKey)
|
|
3227
3230
|
},
|
|
3228
|
-
|
|
3231
|
+
E.widgetKey
|
|
3229
3232
|
)),
|
|
3230
|
-
!
|
|
3231
|
-
|
|
3233
|
+
!N && p === 3 && (t.cssSettings || []).filter(S).map((E) => /* @__PURE__ */ s(
|
|
3234
|
+
En,
|
|
3232
3235
|
{
|
|
3233
|
-
item:
|
|
3236
|
+
item: E,
|
|
3234
3237
|
onSettingItemChanged: f
|
|
3235
3238
|
},
|
|
3236
|
-
|
|
3239
|
+
E.key
|
|
3237
3240
|
))
|
|
3238
3241
|
]
|
|
3239
3242
|
}
|
|
@@ -3260,14 +3263,14 @@ export {
|
|
|
3260
3263
|
nn as CircleQuestionMark,
|
|
3261
3264
|
tn as CrosshairIcon,
|
|
3262
3265
|
or as DashboardGrid,
|
|
3263
|
-
|
|
3266
|
+
Fe as DashboardMaxZoomScale,
|
|
3264
3267
|
Ae as DashboardMinZoomScale,
|
|
3265
3268
|
at as DashboardWidgetBase,
|
|
3266
3269
|
Mt as DashboardZoomStep,
|
|
3267
|
-
|
|
3270
|
+
Fn as DeleteIcon,
|
|
3268
3271
|
xn as DraggablePanel,
|
|
3269
|
-
|
|
3270
|
-
|
|
3272
|
+
Tn as DynamicWidgetLoader,
|
|
3273
|
+
Ln as EditIcon,
|
|
3271
3274
|
Vn as GridIcon,
|
|
3272
3275
|
en as HandGrabIcon,
|
|
3273
3276
|
Qt as HandIcon,
|
|
@@ -3291,7 +3294,7 @@ export {
|
|
|
3291
3294
|
ir as WidgetContainerColumn,
|
|
3292
3295
|
ar as WidgetContainerLarge,
|
|
3293
3296
|
sr as WidgetContainerRow,
|
|
3294
|
-
|
|
3297
|
+
cr as WidgetsCatalogFlyout,
|
|
3295
3298
|
tr as WrapperColumnContent,
|
|
3296
3299
|
nr as WrapperColumnContentListItem,
|
|
3297
3300
|
gt as XCircleIcon,
|
|
@@ -3301,11 +3304,11 @@ export {
|
|
|
3301
3304
|
Ce as blankDashboardConfig,
|
|
3302
3305
|
dt as createDynamicEntry,
|
|
3303
3306
|
Wt as createStaticEntry,
|
|
3304
|
-
|
|
3307
|
+
Tt as cssSettingsCatalog,
|
|
3305
3308
|
Xn as cssVarsUtils,
|
|
3306
3309
|
_t as dashboardSettingsUtils,
|
|
3307
3310
|
Pt as ensureContainersSequence,
|
|
3308
|
-
|
|
3311
|
+
lt as ensureZoomScaleIsWithinRange,
|
|
3309
3312
|
ge as getDefaultWidgetMetaFromKey,
|
|
3310
3313
|
Wn as getDefaultWidgetMetaFromMap,
|
|
3311
3314
|
G as getDistinctCssClasses,
|