@cccsaurora/clue-ui 1.2.0-dev.254 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ActionForm-pWyIi01Z.js +4460 -0
- package/AnnotationDetails-11P7yhyx.js +160 -0
- package/AnnotationPreview-BGqlBBcp.js +140 -0
- package/ClueEnrichContext-DDZf646J.js +418 -0
- package/FlexOne-BXWFOd1T.js +6 -0
- package/_MapCache-BiTi0iqu.js +180 -0
- package/_Uint8Array-TJBs9NS2.js +101 -0
- package/_baseAssignValue-CNMLQZco.js +20 -0
- package/_baseClone-DajKHDCs.js +207 -0
- package/_baseExtremum-DhV10dXG.js +27 -0
- package/_baseFlatten-C8CjmqQ-.js +72 -0
- package/_baseGet-DSZygzyq.js +79 -0
- package/_baseIsEqual-C08cUUpA.js +147 -0
- package/_baseIteratee-DGZdhdqr.js +95 -0
- package/_baseSlice-M5RKzt1A.js +10 -0
- package/_baseSum-wEbgNeUs.js +10 -0
- package/_baseUniq-CGlHphLr.js +79 -0
- package/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/_createAggregator-BvcoTZto.js +53 -0
- package/_getPrototype-Dm06JiGv.js +5 -0
- package/_getTag-Cfxlub3L.js +90 -0
- package/_setToArray-C7yMOeww.js +29 -0
- package/cloneDeep-wjl3XmFj.js +8 -0
- package/components/AnnotationBody.js +35 -49
- package/components/AnnotationDetailPopover.js +30 -36
- package/components/AnnotationDetails.js +7 -7
- package/components/AnnotationEntry.js +35 -35
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +23 -44
- package/components/CountBadge.js +26 -31
- package/components/EnrichedCard.js +97 -110
- package/components/EnrichedChip.js +105 -130
- package/components/EnrichedTypography.js +107 -133
- package/components/ErrorBoundary.js +24 -28
- package/components/RetryFailedEnrichments.js +9 -10
- package/components/SourcePicker.js +49 -57
- package/components/actions/ActionForm.js +4 -4
- package/components/actions/ExecutePopover.js +59 -75
- package/components/actions/ResultModal.js +4 -4
- package/components/actions/form/schemaAdapter.js +23 -39
- package/components/actions/formats/FileResult.js +59 -86
- package/components/actions/formats/index.js +10 -21
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +91 -111
- package/components/display/graph/elements/NodeTag.js +13 -15
- package/components/display/graph/index.js +202 -261
- package/components/display/graph/visualizations/Leaf.js +69 -88
- package/components/display/graph/visualizations/cloud/index.js +81 -98
- package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
- package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
- package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
- package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
- package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
- package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
- package/components/display/graph/visualizations/icons/index.js +13 -14
- package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
- package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
- package/components/display/graph/visualizations/tree/Triangle.js +13 -13
- package/components/display/graph/visualizations/tree/index.js +305 -407
- package/components/display/icons/Iconified.js +12 -27
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +5770 -8678
- package/components/enrichment/EnrichPopover.js +46 -54
- package/components/fetchers/Fetcher.js +117 -155
- package/components/fetchers/PreviewModal.js +17 -20
- package/components/fetchers/StatusChip.js +17 -21
- package/components/group/Entry.js +11 -13
- package/components/group/Group.js +10 -13
- package/components/group/GroupControl.js +65 -76
- package/components/stats/QueryStatus.js +33 -43
- package/countBy-pIyxNZhO.js +8 -0
- package/data/event.js +4 -6
- package/database/index.js +2 -2
- package/debounce-DryYcbJ4.js +56 -0
- package/get-CH7kz5Ix.js +8 -0
- package/groupBy-yNrpdipq.js +8 -0
- package/hooks/ClueActionContext.js +6 -6
- package/hooks/ClueComponentContext.js +23 -29
- package/hooks/ClueConfigProvider.js +12 -14
- package/hooks/ClueDatabaseContext.js +13 -19
- package/hooks/ClueEnrichContext.js +8 -8
- package/hooks/ClueFetcherContext.js +56 -83
- package/hooks/ClueGroupContext.js +14 -17
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +10 -12
- package/hooks/selectors.js +7 -7
- package/hooks/useActionResult.js +2 -2
- package/hooks/useAnnotations.js +31 -47
- package/hooks/useClue.js +4 -6
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +4 -6
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +435 -722
- package/hooks/useErrors.js +18 -22
- package/hooks/useFetcherResult.js +24 -33
- package/hooks/useMyHighlights.js +36 -66
- package/hooks/useMyLocalStorage.js +37 -66
- package/iconify-BBckr5AQ.js +1263 -0
- package/icons/Action.js +49 -66
- package/icons/Assessment.js +68 -84
- package/icons/Context.js +63 -77
- package/icons/Opinion.js +65 -77
- package/icons/iconMap.js +2 -2
- package/identity-ByMq8VxU.js +6 -0
- package/index-BHAe_V9n.js +12768 -0
- package/index-CA5CUNZO.js +975 -0
- package/index-D_ZywK71.js +358 -0
- package/index-Dj5C04IX.js +568 -0
- package/index-p5_wX7q1.js +11729 -0
- package/isNil-CjWwlQS3.js +6 -0
- package/isObject-B53jY8Qg.js +7 -0
- package/isObjectLike-BatpeCIi.js +29 -0
- package/isSymbol-C3_SC0Qp.js +8 -0
- package/last-7CdUxN0r.js +7 -0
- package/main.js +60 -60
- package/package.json +1 -1
- package/sortBy-0BpKRt8p.js +79 -0
- package/sumBy-Do6Ff4Bw.js +8 -0
- package/text/Frequency.js +23 -42
- package/toFinite-BMy6GObD.js +14 -0
- package/toNumber-YVhnnJv4.js +31 -0
- package/useClueTypeConfig-77zd_zdF.js +2292 -0
- package/utils/chain.js +64 -91
- package/utils/classificationParser.js +256 -519
- package/utils/constants.js +10 -35
- package/utils/graph.js +45 -72
- package/utils/hashUtil.js +7 -7
- package/utils/line.js +81 -131
- package/utils/loggerUtil.js +3 -5
- package/utils/sessionStorage.js +27 -41
- package/utils/time.js +423 -423
- package/utils/utils.js +9 -9
- package/utils/window.js +10 -21
- package/utils-D5hPDE7N.js +129 -0
- package/ActionForm-C0aE9HUv.js +0 -5941
- package/AnnotationDetails-CEou0vCc.js +0 -175
- package/AnnotationPreview-CLMVD6Ec.js +0 -188
- package/ClueEnrichContext-BkD9ZwM9.js +0 -541
- package/FlexOne-BSYAhhtG.js +0 -9
- package/_MapCache-WmuDdwuH.js +0 -222
- package/_Uint8Array-DdG4KLKn.js +0 -128
- package/_baseAssignValue-CGTuELqU.js +0 -25
- package/_baseClone-BpWiBnMp.js +0 -283
- package/_baseExtremum-BY663UjY.js +0 -33
- package/_baseFlatten-B69cDsaV.js +0 -92
- package/_baseGet-Bx3A4Qfp.js +0 -108
- package/_baseIsEqual-B4IufFlL.js +0 -208
- package/_baseIteratee-7AQvAy1o.js +0 -126
- package/_baseSlice-GAv_YFTT.js +0 -20
- package/_baseSum-D0WC1dN0.js +0 -13
- package/_baseUniq-B8fK6hI-.js +0 -115
- package/_commonjsHelpers-DWwsNxpa.js +0 -8
- package/_createAggregator-CwGPThny.js +0 -63
- package/_getPrototype-CblfEidB.js +0 -5
- package/_getTag-jwz4XLoZ.js +0 -126
- package/_setToArray-CaPKQhcz.js +0 -33
- package/cloneDeep-DmUylbkM.js +0 -8
- package/countBy-DqlU5OwT.js +0 -14
- package/debounce-bV0h5FC5.js +0 -92
- package/get-DSsNkRQs.js +0 -8
- package/groupBy-ChDRT7uy.js +0 -14
- package/iconify-CXMreGTg.js +0 -1782
- package/identity-CPGTqrE4.js +0 -6
- package/index-AMfoEg_6.js +0 -696
- package/index-B6C2a_Lg.js +0 -1172
- package/index-C12gPw2W.js +0 -17698
- package/index-DCKkHTvx.js +0 -15750
- package/index-UkW8Sur3.js +0 -465
- package/isNil-CIubwp4T.js +0 -6
- package/isObject-FTY-5JQX.js +0 -7
- package/isObjectLike-OAgjjZye.js +0 -48
- package/isSymbol-Xd2FsJyp.js +0 -8
- package/last-CUCl67Im.js +0 -7
- package/sortBy-C7mGPI_D.js +0 -100
- package/sumBy-CGALjmwQ.js +0 -8
- package/toFinite-Bc55msYj.js +0 -16
- package/toNumber-DPxy1FBy.js +0 -39
- package/useClueTypeConfig-D2tf4-NM.js +0 -3289
- package/utils-71DpzFrA.js +0 -199
|
@@ -1,112 +1,85 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Stack, Typography, Divider, Table, TableBody, TableRow, TableCell, Button } from "@mui/material";
|
|
3
|
-
import
|
|
4
|
-
import { ClueComponentContext } from "../../../hooks/ClueComponentContext.js";
|
|
5
|
-
import { useState, useMemo, useEffect } from "react";
|
|
6
|
-
import { u as
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
const formatBytes = (bytes) => {
|
|
16
|
-
if (bytes === 0) {
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as v, Typography as u, Divider as A, Table as C, TableBody as S, TableRow as d, TableCell as l, Button as k } from "@mui/material";
|
|
3
|
+
import M from "../../display/icons/Iconified.js";
|
|
4
|
+
import { ClueComponentContext as R } from "../../../hooks/ClueComponentContext.js";
|
|
5
|
+
import { useState as T, useMemo as U, useEffect as _ } from "react";
|
|
6
|
+
import { u as j } from "../../../index-Dj5C04IX.js";
|
|
7
|
+
const b = (t) => {
|
|
8
|
+
const e = atob(t), o = new Uint8Array(new ArrayBuffer(e.length));
|
|
9
|
+
for (let a = 0; a < e.length; a++)
|
|
10
|
+
o[a] = e.charCodeAt(a);
|
|
11
|
+
return o;
|
|
12
|
+
}, H = (t) => {
|
|
13
|
+
if (t === 0)
|
|
17
14
|
return "0 B";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const link = document.createElement("a");
|
|
29
|
-
link.href = url;
|
|
30
|
-
link.download = output.file_name || "result.txt";
|
|
31
|
-
document.body.appendChild(link);
|
|
32
|
-
link.click();
|
|
33
|
-
document.body.removeChild(link);
|
|
34
|
-
URL.revokeObjectURL(url);
|
|
35
|
-
};
|
|
36
|
-
const FileResult = ({ result }) => {
|
|
37
|
-
var _a, _b, _c, _d, _e;
|
|
38
|
-
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx == null ? void 0 : ctx.i18next);
|
|
39
|
-
const [sha256Hash, setSha256Hash] = useState("");
|
|
40
|
-
const actionName = ((_a = result.action) == null ? void 0 : _a.name) ?? t("actions.result.file.unknown");
|
|
41
|
-
const outputBytes = useMemo(() => {
|
|
42
|
-
var _a2;
|
|
43
|
-
if (!((_a2 = result.output) == null ? void 0 : _a2.data)) {
|
|
15
|
+
const e = ["B", "KB", "MB", "GB"], o = Math.min(Math.floor(Math.log(t) / Math.log(1024)), e.length - 1);
|
|
16
|
+
return `${(t / 1024 ** o).toFixed(o === 0 ? 0 : 2)} ${e[o]}`;
|
|
17
|
+
}, F = (t) => {
|
|
18
|
+
const e = b(t.data), o = new Blob([e], { type: t.mime_type || "application/octet-stream" }), a = URL.createObjectURL(o), i = document.createElement("a");
|
|
19
|
+
i.href = a, i.download = t.file_name || "result.txt", document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(a);
|
|
20
|
+
}, D = ({ result: t }) => {
|
|
21
|
+
var h, f, m, p, y;
|
|
22
|
+
const { t: e } = j(R, (r) => r == null ? void 0 : r.i18next), [o, a] = T(""), i = ((h = t.action) == null ? void 0 : h.name) ?? e("actions.result.file.unknown"), s = U(() => {
|
|
23
|
+
var r;
|
|
24
|
+
if (!((r = t.output) != null && r.data))
|
|
44
25
|
return null;
|
|
45
|
-
}
|
|
46
26
|
try {
|
|
47
|
-
return
|
|
27
|
+
return b(t.output.data);
|
|
48
28
|
} catch {
|
|
49
29
|
return null;
|
|
50
30
|
}
|
|
51
|
-
}, [(
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
const
|
|
55
|
-
if (!
|
|
56
|
-
|
|
31
|
+
}, [(f = t.output) == null ? void 0 : f.data]);
|
|
32
|
+
return _(() => {
|
|
33
|
+
let r = !1;
|
|
34
|
+
const g = async () => {
|
|
35
|
+
if (!s || typeof crypto > "u" || !crypto.subtle) {
|
|
36
|
+
a("N/A");
|
|
57
37
|
return;
|
|
58
38
|
}
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
const digestHex = digestArray.map((value) => value.toString(16).padStart(2, "0")).join("");
|
|
62
|
-
if (!cancelled) {
|
|
63
|
-
setSha256Hash(digestHex);
|
|
64
|
-
}
|
|
39
|
+
const w = await crypto.subtle.digest("SHA-256", s), x = Array.from(new Uint8Array(w)).map((B) => B.toString(16).padStart(2, "0")).join("");
|
|
40
|
+
r || a(x);
|
|
65
41
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return () => {
|
|
69
|
-
cancelled = true;
|
|
42
|
+
return a(""), g(), () => {
|
|
43
|
+
r = !0;
|
|
70
44
|
};
|
|
71
|
-
}, [
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */ jsx(TableCell, { children: formatBytes(outputBytes.length) || "n/a" })
|
|
45
|
+
}, [s]), /* @__PURE__ */ c(v, { sx: { overflowY: "auto" }, spacing: 3, children: [
|
|
46
|
+
/* @__PURE__ */ n(u, { variant: "h5", children: e("actions.result.file.title", { actionName: i }) }),
|
|
47
|
+
/* @__PURE__ */ n(u, { children: e("actions.result.file.description", { actionName: i }) }),
|
|
48
|
+
/* @__PURE__ */ n(A, { flexItem: !0 }),
|
|
49
|
+
/* @__PURE__ */ n(u, { variant: "h6", children: e("actions.result.file.stats.title") }),
|
|
50
|
+
s && /* @__PURE__ */ n(C, { sx: { maxWidth: 900 }, children: /* @__PURE__ */ c(S, { children: [
|
|
51
|
+
/* @__PURE__ */ c(d, { children: [
|
|
52
|
+
/* @__PURE__ */ n(l, { sx: { width: "35%" }, children: e("actions.result.file.stats.label.decoded_size") }),
|
|
53
|
+
/* @__PURE__ */ n(l, { children: H(s.length) || "n/a" })
|
|
81
54
|
] }),
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ c(d, { children: [
|
|
56
|
+
/* @__PURE__ */ n(l, { sx: { width: "35%" }, children: e("actions.result.file.stats.label.decoded_bytes") }),
|
|
57
|
+
/* @__PURE__ */ n(l, { children: s.length || "n/a" })
|
|
85
58
|
] }),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ c(d, { children: [
|
|
60
|
+
/* @__PURE__ */ n(l, { sx: { width: "35%" }, children: e("actions.result.file.stats.label.base64_length") }),
|
|
61
|
+
/* @__PURE__ */ n(l, { children: ((m = t.output) == null ? void 0 : m.data.length) ?? "n/a" })
|
|
89
62
|
] }),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ c(d, { children: [
|
|
64
|
+
/* @__PURE__ */ n(l, { sx: { width: "35%" }, children: e("actions.result.file.stats.label.sha256") }),
|
|
65
|
+
/* @__PURE__ */ n(l, { children: /* @__PURE__ */ n("code", { children: o || e("actions.result.file.stats.calculating") }) })
|
|
93
66
|
] })
|
|
94
67
|
] }) }),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
68
|
+
/* @__PURE__ */ n(
|
|
69
|
+
k,
|
|
97
70
|
{
|
|
98
|
-
startIcon: /* @__PURE__ */
|
|
71
|
+
startIcon: /* @__PURE__ */ n(M, { icon: "ic:baseline-download" }),
|
|
99
72
|
variant: "outlined",
|
|
100
73
|
sx: { alignSelf: "center" },
|
|
101
|
-
disabled: !((
|
|
102
|
-
onClick: () =>
|
|
74
|
+
disabled: !((p = t.output) != null && p.data),
|
|
75
|
+
onClick: () => t.output && F(t.output),
|
|
103
76
|
name: "download",
|
|
104
77
|
role: "button",
|
|
105
|
-
children:
|
|
78
|
+
children: e("download", { file: ((y = t.output) == null ? void 0 : y.file_name) ?? "result.txt" })
|
|
106
79
|
}
|
|
107
80
|
)
|
|
108
81
|
] });
|
|
109
82
|
};
|
|
110
83
|
export {
|
|
111
|
-
|
|
84
|
+
D as default
|
|
112
85
|
};
|
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Stack } from "@mui/material";
|
|
3
|
-
import { J as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (result.format === "json") {
|
|
11
|
-
return /* @__PURE__ */ jsx(JSONViewer, { data: result.output, collapse: true, forceCompact: true });
|
|
12
|
-
}
|
|
13
|
-
if (result.format === "file") {
|
|
14
|
-
return /* @__PURE__ */ jsx(FileResult, { result });
|
|
15
|
-
}
|
|
16
|
-
return /* @__PURE__ */ jsxs(Stack, { sx: { overflowY: "auto" }, children: [
|
|
17
|
-
/* @__PURE__ */ jsx(Markdown, { md: "`" + result.format + "` is not recognized as a format in this application." }),
|
|
18
|
-
/* @__PURE__ */ jsx(JSONViewer, { data: result, collapse: true, forceCompact: true })
|
|
19
|
-
] });
|
|
20
|
-
};
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as f } from "@mui/material";
|
|
3
|
+
import { J as t } from "../../../index-D_ZywK71.js";
|
|
4
|
+
import a from "../../display/markdown/index.js";
|
|
5
|
+
import i from "./FileResult.js";
|
|
6
|
+
const u = ({ result: o }) => o.format === "markdown" ? /* @__PURE__ */ r(a, { md: o.output }) : o.format === "json" ? /* @__PURE__ */ r(t, { data: o.output, collapse: !0, forceCompact: !0 }) : o.format === "file" ? /* @__PURE__ */ r(i, { result: o }) : /* @__PURE__ */ m(f, { sx: { overflowY: "auto" }, children: [
|
|
7
|
+
/* @__PURE__ */ r(a, { md: "`" + o.format + "` is not recognized as a format in this application." }),
|
|
8
|
+
/* @__PURE__ */ r(t, { data: o, collapse: !0, forceCompact: !0 })
|
|
9
|
+
] });
|
|
21
10
|
export {
|
|
22
|
-
|
|
11
|
+
u as default
|
|
23
12
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { IconButton } from "@mui/material";
|
|
3
|
-
const
|
|
4
|
-
const { expand, ...
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { IconButton as a } from "@mui/material";
|
|
3
|
+
const m = (t) => {
|
|
4
|
+
const { expand: o, ...r } = t;
|
|
5
|
+
return /* @__PURE__ */ e(
|
|
6
|
+
a,
|
|
7
7
|
{
|
|
8
|
-
...
|
|
8
|
+
...r,
|
|
9
9
|
sx: {
|
|
10
|
-
transform:
|
|
11
|
-
transition: (
|
|
10
|
+
transform: o ? "rotate(180deg)" : "rotate(0deg)",
|
|
11
|
+
transition: (n) => n.transitions.create("transform")
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
m as default
|
|
18
18
|
};
|
|
@@ -1,111 +1,91 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Stack, Typography, Card, CardContent, Divider, Collapse } from "@mui/material";
|
|
3
|
-
import { a as
|
|
4
|
-
import { cssImportant } from "../../../../utils/graph.js";
|
|
5
|
-
import { b as
|
|
6
|
-
import { c as
|
|
7
|
-
import { l as
|
|
8
|
-
import { b as
|
|
9
|
-
import { b as
|
|
10
|
-
import { useState, useEffect, useCallback, Fragment as
|
|
11
|
-
import
|
|
12
|
-
import { J
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
function
|
|
17
|
-
var
|
|
18
|
-
return
|
|
1
|
+
import { jsxs as l, jsx as n, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as c, Typography as g, Card as C, CardContent as w, Divider as m, Collapse as _ } from "@mui/material";
|
|
3
|
+
import { a as E, f as O } from "../../../../utils-D5hPDE7N.js";
|
|
4
|
+
import { cssImportant as d } from "../../../../utils/graph.js";
|
|
5
|
+
import { b as S, c as v, t as k, a as A } from "../../../../_baseGet-DSZygzyq.js";
|
|
6
|
+
import { c as I, g as L, b as F } from "../../../../_baseClone-DajKHDCs.js";
|
|
7
|
+
import { l as N } from "../../../../last-7CdUxN0r.js";
|
|
8
|
+
import { b as P } from "../../../../_baseSlice-M5RKzt1A.js";
|
|
9
|
+
import { b as D, s as M, o as G } from "../../../../_baseFlatten-C8CjmqQ-.js";
|
|
10
|
+
import { useState as x, useEffect as T, useCallback as z, Fragment as B } from "react";
|
|
11
|
+
import R from "../../icons/Iconified.js";
|
|
12
|
+
import { J } from "../../../../index-D_ZywK71.js";
|
|
13
|
+
import K from "../../markdown/index.js";
|
|
14
|
+
import $ from "../ExpandMoreButton.js";
|
|
15
|
+
import h from "./NodeTag.js";
|
|
16
|
+
function U(e) {
|
|
17
|
+
var t = e == null ? 0 : e.length;
|
|
18
|
+
return t ? D(e) : [];
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function V(e) {
|
|
21
|
+
return M(G(e, void 0, U), e + "");
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
23
|
+
function Y(e, t) {
|
|
24
|
+
return t.length < 2 ? e : S(e, P(t, 0, -1));
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") {
|
|
44
|
-
if (isRootPrimitive && index === 0) {
|
|
45
|
-
continue;
|
|
26
|
+
var j = Object.prototype, q = j.hasOwnProperty;
|
|
27
|
+
function H(e, t) {
|
|
28
|
+
t = v(t, e);
|
|
29
|
+
var r = -1, i = t.length;
|
|
30
|
+
if (!i)
|
|
31
|
+
return !0;
|
|
32
|
+
for (var o = e == null || typeof e != "object" && typeof e != "function"; ++r < i; ) {
|
|
33
|
+
var a = t[r];
|
|
34
|
+
if (typeof a == "string") {
|
|
35
|
+
if (a === "__proto__" && !q.call(e, "__proto__"))
|
|
36
|
+
return !1;
|
|
37
|
+
if (a === "constructor" && r + 1 < i && typeof t[r + 1] == "string" && t[r + 1] === "prototype") {
|
|
38
|
+
if (o && r === 0)
|
|
39
|
+
continue;
|
|
40
|
+
return !1;
|
|
46
41
|
}
|
|
47
|
-
return false;
|
|
48
42
|
}
|
|
49
43
|
}
|
|
50
|
-
var
|
|
51
|
-
return
|
|
44
|
+
var s = Y(e, t);
|
|
45
|
+
return s == null || delete s[k(N(t))];
|
|
52
46
|
}
|
|
53
|
-
function
|
|
54
|
-
return
|
|
47
|
+
function Q(e) {
|
|
48
|
+
return E(e) ? void 0 : e;
|
|
55
49
|
}
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
copyObject(object, getAllKeysIn(object), result);
|
|
69
|
-
if (isDeep) {
|
|
70
|
-
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
|
71
|
-
}
|
|
72
|
-
var length = paths.length;
|
|
73
|
-
while (length--) {
|
|
74
|
-
baseUnset(result, paths[length]);
|
|
75
|
-
}
|
|
76
|
-
return result;
|
|
50
|
+
var W = 1, X = 2, Z = 4, ee = V(function(e, t) {
|
|
51
|
+
var r = {};
|
|
52
|
+
if (e == null)
|
|
53
|
+
return r;
|
|
54
|
+
var i = !1;
|
|
55
|
+
t = A(t, function(a) {
|
|
56
|
+
return a = v(a, e), i || (i = a.length > 1), a;
|
|
57
|
+
}), I(e, L(e), r), i && (r = F(r, W | X | Z, Q));
|
|
58
|
+
for (var o = t.length; o--; )
|
|
59
|
+
H(r, t[o]);
|
|
60
|
+
return r;
|
|
77
61
|
});
|
|
78
|
-
const
|
|
79
|
-
var
|
|
80
|
-
const [
|
|
81
|
-
|
|
82
|
-
const handleExpandClick = () => {
|
|
83
|
-
setExpanded(!expanded);
|
|
62
|
+
const xe = ({ node: e, sx: t = {} }) => {
|
|
63
|
+
var u;
|
|
64
|
+
const [r, i] = x(!1), [o, a] = x(), s = () => {
|
|
65
|
+
i(!r);
|
|
84
66
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, [
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return /* @__PURE__ */ jsx(
|
|
95
|
-
Card,
|
|
67
|
+
T(() => {
|
|
68
|
+
a(ee(e, ["id", "edges"]));
|
|
69
|
+
}, [e]);
|
|
70
|
+
const y = z((f) => /* @__PURE__ */ l(c, { alignSelf: "stretch", children: [
|
|
71
|
+
/* @__PURE__ */ n(g, { textAlign: "left", variant: "body2", color: "text.secondary", children: "Edges" }),
|
|
72
|
+
/* @__PURE__ */ n(c, { spacing: 0.25, children: f.map((p) => /* @__PURE__ */ n(h, { nodeId: p }, p)) })
|
|
73
|
+
] }), []);
|
|
74
|
+
return /* @__PURE__ */ n(
|
|
75
|
+
C,
|
|
96
76
|
{
|
|
97
77
|
variant: "outlined",
|
|
98
78
|
sx: {
|
|
99
79
|
position: "relative",
|
|
100
80
|
overflow: "auto",
|
|
101
|
-
zIndex:
|
|
81
|
+
zIndex: r ? 100 : "initial",
|
|
102
82
|
"& *": {
|
|
103
83
|
opacity: 1
|
|
104
84
|
},
|
|
105
|
-
...
|
|
85
|
+
...t
|
|
106
86
|
},
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
|
|
87
|
+
children: /* @__PURE__ */ n(w, { sx: { p: 1 }, children: /* @__PURE__ */ l(
|
|
88
|
+
c,
|
|
109
89
|
{
|
|
110
90
|
spacing: 1,
|
|
111
91
|
sx: {
|
|
@@ -116,44 +96,44 @@ const NodeCard = ({ node, sx = {} }) => {
|
|
|
116
96
|
}
|
|
117
97
|
},
|
|
118
98
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
|
|
99
|
+
/* @__PURE__ */ n(h, { nodeId: e.id, label: e.id, type: "header", children: /* @__PURE__ */ n(
|
|
100
|
+
$,
|
|
121
101
|
{
|
|
122
|
-
expand:
|
|
123
|
-
onClick:
|
|
124
|
-
"aria-expanded":
|
|
102
|
+
expand: r,
|
|
103
|
+
onClick: s,
|
|
104
|
+
"aria-expanded": r,
|
|
125
105
|
"aria-label": "show more",
|
|
126
106
|
size: "small",
|
|
127
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ n(R, { icon: "ic:baseline-expand-more", fontSize: "medium" })
|
|
128
108
|
}
|
|
129
109
|
) }),
|
|
130
|
-
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
110
|
+
e.markdown && /* @__PURE__ */ l(b, { children: [
|
|
111
|
+
/* @__PURE__ */ n(m, { flexItem: !0 }),
|
|
112
|
+
/* @__PURE__ */ n(K, { md: e.markdown, components: O(e) })
|
|
133
113
|
] }),
|
|
134
|
-
!!((
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
|
|
114
|
+
!!((u = e == null ? void 0 : e.edges) != null && u.length) && /* @__PURE__ */ l(B, { children: [
|
|
115
|
+
/* @__PURE__ */ n(m, { flexItem: !0 }),
|
|
116
|
+
y(e == null ? void 0 : e.edges)
|
|
137
117
|
] }),
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
118
|
+
/* @__PURE__ */ n(_, { in: r, timeout: "auto", children: /* @__PURE__ */ l(
|
|
119
|
+
c,
|
|
140
120
|
{
|
|
141
121
|
justifyContent: "start",
|
|
142
122
|
alignItems: "start",
|
|
143
123
|
spacing: 1,
|
|
144
|
-
sx: (
|
|
124
|
+
sx: (f) => ({
|
|
145
125
|
"& > ul": {
|
|
146
126
|
width: "100%",
|
|
147
127
|
textAlign: "left",
|
|
148
|
-
p:
|
|
149
|
-
mx:
|
|
150
|
-
backgroundColor:
|
|
128
|
+
p: d(f.spacing(1)),
|
|
129
|
+
mx: d("0"),
|
|
130
|
+
backgroundColor: d(f.palette.background.paper)
|
|
151
131
|
}
|
|
152
132
|
}),
|
|
153
133
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ n(m, { flexItem: !0 }),
|
|
135
|
+
/* @__PURE__ */ n(g, { textAlign: "left", variant: "body1", children: "Metadata:" }),
|
|
136
|
+
/* @__PURE__ */ n(J, { data: o })
|
|
157
137
|
]
|
|
158
138
|
}
|
|
159
139
|
) })
|
|
@@ -164,5 +144,5 @@ const NodeCard = ({ node, sx = {} }) => {
|
|
|
164
144
|
);
|
|
165
145
|
};
|
|
166
146
|
export {
|
|
167
|
-
|
|
147
|
+
xe as default
|
|
168
148
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Stack, Typography, Tooltip } from "@mui/material";
|
|
3
|
-
import { F as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
] });
|
|
14
|
-
};
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as t, Typography as a, Tooltip as d } from "@mui/material";
|
|
3
|
+
import { F as s } from "../../../../FlexOne-BXWFOd1T.js";
|
|
4
|
+
import l from "../../icons/Iconified.js";
|
|
5
|
+
const T = ({ nodeId: n, label: r = n, type: o = "content", children: c }) => /* @__PURE__ */ i(t, { direction: "row", spacing: 1, alignItems: "center", pr: 1, children: [
|
|
6
|
+
o === "header" ? /* @__PURE__ */ i(t, { direction: "row", spacing: 1, alignItems: "center", sx: { overflow: "hidden" }, children: [
|
|
7
|
+
/* @__PURE__ */ e(a, { variant: "body1", sx: { wordWrap: "break-all" }, children: r.replace(" (TRUNCATED)", "") }),
|
|
8
|
+
r.includes("TRUNCATED") && /* @__PURE__ */ e(d, { title: "Field is truncated.", children: /* @__PURE__ */ e(l, { icon: "ic:baseline-content-cut", fontSize: "small", style: { fontSize: "0.9em" } }) })
|
|
9
|
+
] }) : r,
|
|
10
|
+
/* @__PURE__ */ e(s, {}),
|
|
11
|
+
c
|
|
12
|
+
] });
|
|
15
13
|
export {
|
|
16
|
-
|
|
14
|
+
T as default
|
|
17
15
|
};
|