@localstack/appinspector-ui 1.0.126 → 1.0.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2417,8 +2417,8 @@ __export(index_exports, {
2417
2417
  module.exports = __toCommonJS(index_exports);
2418
2418
 
2419
2419
  // src/pages/spans-list-page.tsx
2420
- var import_material23 = require("@mui/material");
2421
- var import_react68 = require("react");
2420
+ var import_material24 = require("@mui/material");
2421
+ var import_react69 = require("react");
2422
2422
 
2423
2423
  // src/api/errors.ts
2424
2424
  var AppInspectorDisabledError = class extends Error {
@@ -18597,16 +18597,16 @@ var useSpans = () => {
18597
18597
  };
18598
18598
 
18599
18599
  // src/pages/trace-graph-page.tsx
18600
- var import_icons_material12 = require("@mui/icons-material");
18601
- var import_material22 = require("@mui/material");
18600
+ var import_icons_material13 = require("@mui/icons-material");
18601
+ var import_material23 = require("@mui/material");
18602
18602
  var import_styles = require("@mui/material/styles");
18603
- var import_react66 = require("@xyflow/react");
18604
- var import_react67 = require("react");
18603
+ var import_react67 = require("@xyflow/react");
18604
+ var import_react68 = require("react");
18605
18605
 
18606
18606
  // src/components/event-details/event-details.tsx
18607
- var import_icons_material9 = require("@mui/icons-material");
18608
- var import_material18 = require("@mui/material");
18609
- var import_react59 = require("react");
18607
+ var import_icons_material10 = require("@mui/icons-material");
18608
+ var import_material19 = require("@mui/material");
18609
+ var import_react60 = require("react");
18610
18610
 
18611
18611
  // src/utils/event-utils.ts
18612
18612
  var iamEventParser = (eventName, attributes) => {
@@ -18716,71 +18716,99 @@ var getEventGroupsByType = (events) => {
18716
18716
  return groups;
18717
18717
  };
18718
18718
 
18719
- // src/components/event-details/event-detail.tsx
18720
- var import_icons_material7 = require("@mui/icons-material");
18721
- var import_material15 = require("@mui/material");
18722
- var import_react56 = require("react");
18723
-
18724
- // src/components/status-icon.tsx
18719
+ // src/components/event-details/copy-button.tsx
18725
18720
  var import_icons_material5 = require("@mui/icons-material");
18726
18721
  var import_material10 = require("@mui/material");
18722
+ var import_react53 = require("react");
18727
18723
  var import_jsx_runtime133 = require("react/jsx-runtime");
18724
+ var CopyButton = ({ value }) => {
18725
+ const [copied, setCopied] = (0, import_react53.useState)(false);
18726
+ const handleCopy = (0, import_react53.useCallback)(() => {
18727
+ const text2 = typeof value === "string" ? value : JSON.stringify(value, void 0, 2);
18728
+ void navigator.clipboard.writeText(text2).then(() => {
18729
+ setCopied(true);
18730
+ setTimeout(() => {
18731
+ setCopied(false);
18732
+ }, 1500);
18733
+ });
18734
+ }, [value]);
18735
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Tooltip, { title: copied ? "Copied!" : "Copy", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
18736
+ import_material10.IconButton,
18737
+ {
18738
+ className: "copy-btn",
18739
+ onClick: handleCopy,
18740
+ size: "small",
18741
+ sx: { ml: 0.5, opacity: copied ? 1 : 0, p: 0.25, transition: "opacity 0.15s" },
18742
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Check, { sx: { fontSize: 14 } }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.ContentCopy, { sx: { fontSize: 14 } })
18743
+ }
18744
+ ) });
18745
+ };
18746
+
18747
+ // src/components/event-details/event-detail.tsx
18748
+ var import_icons_material8 = require("@mui/icons-material");
18749
+ var import_material16 = require("@mui/material");
18750
+ var import_react57 = require("react");
18751
+
18752
+ // src/components/status-icon.tsx
18753
+ var import_icons_material6 = require("@mui/icons-material");
18754
+ var import_material11 = require("@mui/material");
18755
+ var import_jsx_runtime134 = require("react/jsx-runtime");
18728
18756
  var StatusIcon2 = ({ errorLevel }) => {
18729
18757
  switch (errorLevel) {
18730
18758
  case EventLevel.LevelError: {
18731
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Cancel, { sx: { color: "red" } });
18759
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.Cancel, { sx: { color: "red" } });
18732
18760
  }
18733
18761
  case EventLevel.LevelInfo: {
18734
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Info, { sx: { color: "gray" } });
18762
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.Info, { sx: { color: "gray" } });
18735
18763
  }
18736
18764
  case EventLevel.LevelPermission: {
18737
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.RemoveCircle, { sx: { color: "blue" } });
18765
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.RemoveCircle, { sx: { color: "blue" } });
18738
18766
  }
18739
18767
  case EventLevel.LevelWarning: {
18740
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Error, { sx: { color: "orange" } });
18768
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.Error, { sx: { color: "orange" } });
18741
18769
  }
18742
18770
  default: {
18743
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.CheckCircle, { sx: { color: "lightgray" } });
18771
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.CheckCircle, { sx: { color: "lightgray" } });
18744
18772
  }
18745
18773
  }
18746
18774
  };
18747
18775
 
18748
18776
  // src/components/event-details/iam-event-detail.tsx
18749
- var import_icons_material6 = require("@mui/icons-material");
18750
- var import_material11 = require("@mui/material");
18751
- var import_jsx_runtime134 = require("react/jsx-runtime");
18752
- var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18753
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
18754
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
18777
+ var import_icons_material7 = require("@mui/icons-material");
18778
+ var import_material12 = require("@mui/material");
18779
+ var import_jsx_runtime135 = require("react/jsx-runtime");
18780
+ var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18781
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
18782
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
18755
18783
  ] });
18756
18784
  var PermissionIcon = ({ status }) => {
18757
18785
  switch (status) {
18758
18786
  case "explicitly_allowed":
18759
18787
  case "implicitly_allowed": {
18760
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.CheckCircle, { sx: { color: "success.main", fontSize: "1rem" } });
18788
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material7.CheckCircle, { sx: { color: "success.main", fontSize: "1rem" } });
18761
18789
  }
18762
18790
  case "explicitly_denied": {
18763
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.Error, { sx: { color: "error.main", fontSize: "1rem" } });
18791
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material7.Error, { sx: { color: "error.main", fontSize: "1rem" } });
18764
18792
  }
18765
18793
  case "implicitly_denied": {
18766
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
18794
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material7.Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
18767
18795
  }
18768
18796
  }
18769
18797
  };
18770
18798
  var IAMEventDetail = ({ event }) => {
18771
18799
  const payloadString = event.attributes?.payload;
18772
18800
  if (!payloadString) {
18773
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
18801
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
18774
18802
  }
18775
18803
  const parsedIAM = parseIAMEvent(payloadString);
18776
18804
  if (!parsedIAM) {
18777
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
18805
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
18778
18806
  }
18779
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { children: [
18780
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { sx: { mb: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
18781
- import_material11.Chip,
18807
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { children: [
18808
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { sx: { mb: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
18809
+ import_material12.Chip,
18782
18810
  {
18783
- icon: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(PermissionIcon, { status: parsedIAM.permission }),
18811
+ icon: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(PermissionIcon, { status: parsedIAM.permission }),
18784
18812
  label: formatPermissionStatus(parsedIAM.permission),
18785
18813
  size: "small",
18786
18814
  sx: {
@@ -18790,36 +18818,36 @@ var IAMEventDetail = ({ event }) => {
18790
18818
  variant: "outlined"
18791
18819
  }
18792
18820
  ) }),
18793
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
18794
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
18795
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
18821
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
18822
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
18823
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
18796
18824
  DetailRow,
18797
18825
  {
18798
- content: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
18826
+ content: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
18799
18827
  label: "Actions"
18800
18828
  }
18801
18829
  ),
18802
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
18830
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
18803
18831
  DetailRow,
18804
18832
  {
18805
- content: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
18833
+ content: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
18806
18834
  label: "Resources"
18807
18835
  }
18808
18836
  ),
18809
- (parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { mt: 1.5 }, children: [
18810
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
18811
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
18812
- parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
18813
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
18814
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
18837
+ (parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { mt: 1.5 }, children: [
18838
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
18839
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
18840
+ parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { textAlign: "center" }, children: [
18841
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
18842
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
18815
18843
  ] }),
18816
- parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
18817
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
18818
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
18844
+ parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { textAlign: "center" }, children: [
18845
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
18846
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
18819
18847
  ] }),
18820
- parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
18821
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
18822
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
18848
+ parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { textAlign: "center" }, children: [
18849
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
18850
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
18823
18851
  ] })
18824
18852
  ] })
18825
18853
  ] })
@@ -18827,20 +18855,16 @@ var IAMEventDetail = ({ event }) => {
18827
18855
  };
18828
18856
 
18829
18857
  // src/components/event-details/iam-permission-detail.tsx
18830
- var import_material12 = require("@mui/material");
18831
- var import_react53 = require("react");
18832
- var import_jsx_runtime135 = require("react/jsx-runtime");
18858
+ var import_material13 = require("@mui/material");
18859
+ var import_react54 = require("react");
18860
+ var import_jsx_runtime136 = require("react/jsx-runtime");
18833
18861
  var getChipColor = (isAllowed, spanStatusCode) => {
18834
18862
  if (isAllowed) return "success.main";
18835
18863
  if (spanStatusCode === 2) return "error.main";
18836
18864
  return "warning.main";
18837
18865
  };
18838
- var LabelValue = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { children: [
18839
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: label }),
18840
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { wordBreak: "break-all" }, variant: "body2", children: value })
18841
- ] });
18842
18866
  var IAMPermissionItem = ({ event, spanStatusCode }) => {
18843
- const parsedData = (0, import_react53.useMemo)(() => {
18867
+ const parsedData = (0, import_react54.useMemo)(() => {
18844
18868
  const payloadString = event.attributes?.payload;
18845
18869
  if (!payloadString) return;
18846
18870
  const parsedIAM2 = parseIAMEvent(payloadString);
@@ -18853,30 +18877,42 @@ var IAMPermissionItem = ({ event, spanStatusCode }) => {
18853
18877
  const { parsedIAM } = parsedData;
18854
18878
  const isAllowed = parsedIAM.permission === "explicitly_allowed" || parsedIAM.permission === "implicitly_allowed";
18855
18879
  const chipColors = { backgroundColor: getChipColor(isAllowed, spanStatusCode), color: "white" };
18856
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { mb: 0.5 }, children: [
18857
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { sx: { alignItems: "center", display: "flex", gap: 1, mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Chip, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }) }),
18858
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Stack, { spacing: 1, children: [
18859
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { "data-testid": EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(LabelValue, { label: "Principal", value: parsedIAM.principal }) }),
18860
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { "data-testid": EVENT_DETAILS_IAM_ACTIONS_TEST_ID, children: [
18861
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Actions" }),
18862
- parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block" }, variant: "body2", children: action }, action))
18880
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, { sx: { mb: 0.5 }, children: [
18881
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, { sx: { alignItems: "center", display: "flex", gap: 1, mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Chip, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }) }),
18882
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Stack, { spacing: 1, children: [
18883
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, { "data-testid": EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID, children: [
18884
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Principal" }),
18885
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
18886
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Typography, { sx: { wordBreak: "break-all" }, variant: "body2", children: parsedIAM.principal }),
18887
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CopyButton, { value: parsedIAM.principal })
18888
+ ] })
18863
18889
  ] }),
18864
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { "data-testid": EVENT_DETAILS_IAM_RESOURCES_TEST_ID, children: [
18865
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Resources" }),
18866
- parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block", wordBreak: "break-all" }, variant: "body2", children: resource }, resource))
18890
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, { "data-testid": EVENT_DETAILS_IAM_ACTIONS_TEST_ID, children: [
18891
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Actions" }),
18892
+ parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
18893
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Typography, { sx: { display: "block" }, variant: "body2", children: action }),
18894
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CopyButton, { value: action })
18895
+ ] }, action))
18896
+ ] }),
18897
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, { "data-testid": EVENT_DETAILS_IAM_RESOURCES_TEST_ID, children: [
18898
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Resources" }),
18899
+ parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
18900
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Typography, { sx: { display: "block", wordBreak: "break-all" }, variant: "body2", children: resource }),
18901
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CopyButton, { value: resource })
18902
+ ] }, resource))
18867
18903
  ] })
18868
18904
  ] })
18869
18905
  ] });
18870
18906
  };
18871
- var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IAMPermissionItem, { event, spanStatusCode }, `${event.span_id}-${event.event_id}`)) });
18907
+ var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IAMPermissionItem, { event, spanStatusCode }, `${event.span_id}-${event.event_id}`)) });
18872
18908
 
18873
18909
  // src/components/event-details/payload-viewer.tsx
18874
- var import_material14 = require("@mui/material");
18910
+ var import_material15 = require("@mui/material");
18875
18911
 
18876
18912
  // node_modules/@textea/json-viewer/dist/index.mjs
18877
- var import_jsx_runtime136 = require("react/jsx-runtime");
18878
- var import_material13 = require("@mui/material");
18879
- var import_react54 = require("react");
18913
+ var import_jsx_runtime137 = require("react/jsx-runtime");
18914
+ var import_material14 = require("@mui/material");
18915
+ var import_react55 = require("react");
18880
18916
  var import_zustand = require("zustand");
18881
18917
  var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
18882
18918
  function r(e2) {
@@ -18993,10 +19029,10 @@ var createJsonViewerStore = (props) => {
18993
19029
  };
18994
19030
  });
18995
19031
  };
18996
- var JsonViewerStoreContext = (0, import_react54.createContext)(void 0);
19032
+ var JsonViewerStoreContext = (0, import_react55.createContext)(void 0);
18997
19033
  JsonViewerStoreContext.Provider;
18998
19034
  var useJsonViewerStore = (selector2, equalityFn) => {
18999
- const store = (0, import_react54.useContext)(JsonViewerStoreContext);
19035
+ const store = (0, import_react55.useContext)(JsonViewerStoreContext);
19000
19036
  return (0, import_zustand.useStore)(store, selector2, equalityFn);
19001
19037
  };
19002
19038
  var useTextColor = () => {
@@ -19121,9 +19157,9 @@ async function copyString(value) {
19121
19157
  }
19122
19158
  function useClipboard() {
19123
19159
  let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
19124
- const [copied, setCopied] = (0, import_react54.useState)(false);
19125
- const copyTimeout = (0, import_react54.useRef)(null);
19126
- const handleCopyResult = (0, import_react54.useCallback)((value) => {
19160
+ const [copied, setCopied] = (0, import_react55.useState)(false);
19161
+ const copyTimeout = (0, import_react55.useRef)(null);
19162
+ const handleCopyResult = (0, import_react55.useCallback)((value) => {
19127
19163
  const current = copyTimeout.current;
19128
19164
  if (current) {
19129
19165
  window.clearTimeout(current);
@@ -19134,7 +19170,7 @@ function useClipboard() {
19134
19170
  timeout
19135
19171
  ]);
19136
19172
  const onCopy = useJsonViewerStore((store) => store.onCopy);
19137
- const copy = (0, import_react54.useCallback)(async (path, value) => {
19173
+ const copy = (0, import_react55.useCallback)(async (path, value) => {
19138
19174
  if (typeof onCopy === "function") {
19139
19175
  try {
19140
19176
  await onCopy(path, value, copyString);
@@ -19155,7 +19191,7 @@ function useClipboard() {
19155
19191
  handleCopyResult,
19156
19192
  onCopy
19157
19193
  ]);
19158
- const reset = (0, import_react54.useCallback)(() => {
19194
+ const reset = (0, import_react55.useCallback)(() => {
19159
19195
  setCopied(false);
19160
19196
  if (copyTimeout.current) {
19161
19197
  clearTimeout(copyTimeout.current);
@@ -19169,7 +19205,7 @@ function useClipboard() {
19169
19205
  }
19170
19206
  function useIsCycleReference(path, value) {
19171
19207
  const rootValue = useJsonViewerStore((store) => store.value);
19172
- return (0, import_react54.useMemo)(() => isCycleReference(rootValue, path, value), [
19208
+ return (0, import_react55.useMemo)(() => isCycleReference(rootValue, path, value), [
19173
19209
  path,
19174
19210
  value,
19175
19211
  rootValue
@@ -19182,7 +19218,7 @@ function useInspect(path, value, nestedIndex) {
19182
19218
  const setInspectCache = useJsonViewerStore((store) => store.setInspectCache);
19183
19219
  const defaultInspectDepth = useJsonViewerStore((store) => store.defaultInspectDepth);
19184
19220
  const defaultInspectControl = useJsonViewerStore((store) => store.defaultInspectControl);
19185
- (0, import_react54.useEffect)(() => {
19221
+ (0, import_react55.useEffect)(() => {
19186
19222
  const inspect2 = getInspectCache(path, nestedIndex);
19187
19223
  if (inspect2 !== void 0) {
19188
19224
  return;
@@ -19204,7 +19240,7 @@ function useInspect(path, value, nestedIndex) {
19204
19240
  value,
19205
19241
  setInspectCache
19206
19242
  ]);
19207
- const [inspect, set] = (0, import_react54.useState)(() => {
19243
+ const [inspect, set] = (0, import_react55.useState)(() => {
19208
19244
  const shouldInspect = getInspectCache(path, nestedIndex);
19209
19245
  if (shouldInspect !== void 0) {
19210
19246
  return shouldInspect;
@@ -19214,7 +19250,7 @@ function useInspect(path, value, nestedIndex) {
19214
19250
  }
19215
19251
  return isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
19216
19252
  });
19217
- const setInspect = (0, import_react54.useCallback)((apply) => {
19253
+ const setInspect = (0, import_react55.useCallback)((apply) => {
19218
19254
  set((oldState) => {
19219
19255
  const newState = typeof apply === "boolean" ? apply : apply(oldState);
19220
19256
  setInspectCache(path, newState, nestedIndex);
@@ -19230,7 +19266,7 @@ function useInspect(path, value, nestedIndex) {
19230
19266
  setInspect
19231
19267
  ];
19232
19268
  }
19233
- var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19269
+ var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19234
19270
  component: "div",
19235
19271
  ...props,
19236
19272
  sx: {
@@ -19241,7 +19277,7 @@ var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_m
19241
19277
  var DataTypeLabel = (param) => {
19242
19278
  let { dataType, enable = true } = param;
19243
19279
  if (!enable) return null;
19244
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
19280
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataBox, {
19245
19281
  className: "data-type-label",
19246
19282
  sx: {
19247
19283
  mx: 0.5,
@@ -19254,23 +19290,23 @@ var DataTypeLabel = (param) => {
19254
19290
  };
19255
19291
  function defineEasyType(param) {
19256
19292
  let { is, serialize, deserialize, type, colorKey, displayTypeLabel = true, Renderer } = param;
19257
- const Render = /* @__PURE__ */ (0, import_react54.memo)(Renderer);
19293
+ const Render = /* @__PURE__ */ (0, import_react55.memo)(Renderer);
19258
19294
  const EasyType = (props) => {
19259
19295
  const storeDisplayDataTypes = useJsonViewerStore((store) => store.displayDataTypes);
19260
19296
  const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
19261
19297
  const onSelect = useJsonViewerStore((store) => store.onSelect);
19262
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
19298
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(DataBox, {
19263
19299
  onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(props.path, props.value),
19264
19300
  sx: {
19265
19301
  color: color2
19266
19302
  },
19267
19303
  children: [
19268
- displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataTypeLabel, {
19304
+ displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataTypeLabel, {
19269
19305
  dataType: type
19270
19306
  }),
19271
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
19307
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataBox, {
19272
19308
  className: "".concat(type, "-value"),
19273
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Render, {
19309
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Render, {
19274
19310
  path: props.path,
19275
19311
  inspect: props.inspect,
19276
19312
  setInspect: props.setInspect,
@@ -19291,7 +19327,7 @@ function defineEasyType(param) {
19291
19327
  const EasyTypeEditor = (param2) => {
19292
19328
  let { value, setValue, abortEditing, commitEditing } = param2;
19293
19329
  const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
19294
- const handleKeyDown = (0, import_react54.useCallback)((event) => {
19330
+ const handleKeyDown = (0, import_react55.useCallback)((event) => {
19295
19331
  if (event.key === "Enter") {
19296
19332
  event.preventDefault();
19297
19333
  commitEditing(value);
@@ -19305,12 +19341,12 @@ function defineEasyType(param) {
19305
19341
  commitEditing,
19306
19342
  value
19307
19343
  ]);
19308
- const handleChange = (0, import_react54.useCallback)((event) => {
19344
+ const handleChange = (0, import_react55.useCallback)((event) => {
19309
19345
  setValue(event.target.value);
19310
19346
  }, [
19311
19347
  setValue
19312
19348
  ]);
19313
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.InputBase, {
19349
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.InputBase, {
19314
19350
  autoFocus: true,
19315
19351
  value,
19316
19352
  onChange: handleChange,
@@ -19350,7 +19386,7 @@ var booleanType = defineEasyType({
19350
19386
  },
19351
19387
  Renderer: (param) => {
19352
19388
  let { value } = param;
19353
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
19389
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_jsx_runtime137.Fragment, {
19354
19390
  children: value ? "true" : "false"
19355
19391
  });
19356
19392
  }
@@ -19369,7 +19405,7 @@ var dateType = defineEasyType({
19369
19405
  colorKey: "base0D",
19370
19406
  Renderer: (param) => {
19371
19407
  let { value } = param;
19372
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
19408
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_jsx_runtime137.Fragment, {
19373
19409
  children: value.toLocaleTimeString("en-us", displayOptions)
19374
19410
  });
19375
19411
  }
@@ -19398,12 +19434,12 @@ var functionName = (func) => {
19398
19434
  var lb = "{";
19399
19435
  var rb = "}";
19400
19436
  var PreFunctionType = (props) => {
19401
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.NoSsr, {
19437
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.NoSsr, {
19402
19438
  children: [
19403
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataTypeLabel, {
19439
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataTypeLabel, {
19404
19440
  dataType: "function"
19405
19441
  }),
19406
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
19442
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, {
19407
19443
  component: "span",
19408
19444
  className: "data-function-start",
19409
19445
  sx: {
@@ -19419,8 +19455,8 @@ var PreFunctionType = (props) => {
19419
19455
  });
19420
19456
  };
19421
19457
  var PostFunctionType = () => {
19422
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.NoSsr, {
19423
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19458
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.NoSsr, {
19459
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19424
19460
  component: "span",
19425
19461
  className: "data-function-end",
19426
19462
  children: rb
@@ -19429,15 +19465,15 @@ var PostFunctionType = () => {
19429
19465
  };
19430
19466
  var FunctionType = (props) => {
19431
19467
  const functionColor = useJsonViewerStore((store) => store.colorspace.base05);
19432
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.NoSsr, {
19433
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19468
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.NoSsr, {
19469
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19434
19470
  className: "data-function",
19435
19471
  sx: {
19436
19472
  display: props.inspect ? "block" : "inline-block",
19437
19473
  pl: props.inspect ? 2 : 0,
19438
19474
  color: functionColor
19439
19475
  },
19440
- children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19476
+ children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19441
19477
  component: "span",
19442
19478
  className: "data-function-body",
19443
19479
  onClick: () => props.setInspect(true),
@@ -19465,7 +19501,7 @@ var nullType = defineEasyType({
19465
19501
  displayTypeLabel: false,
19466
19502
  Renderer: () => {
19467
19503
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
19468
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19504
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19469
19505
  sx: {
19470
19506
  fontSize: "0.8rem",
19471
19507
  backgroundColor,
@@ -19488,7 +19524,7 @@ var nanType = defineEasyType({
19488
19524
  deserialize: (value) => parseFloat(value),
19489
19525
  Renderer: () => {
19490
19526
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
19491
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19527
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19492
19528
  sx: {
19493
19529
  backgroundColor,
19494
19530
  fontSize: "0.8rem",
@@ -19508,7 +19544,7 @@ var floatType = defineEasyType({
19508
19544
  deserialize: (value) => parseFloat(value),
19509
19545
  Renderer: (param) => {
19510
19546
  let { value } = param;
19511
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
19547
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_jsx_runtime137.Fragment, {
19512
19548
  children: value
19513
19549
  });
19514
19550
  }
@@ -19522,7 +19558,7 @@ var intType = defineEasyType({
19522
19558
  deserialize: (value) => parseFloat(value),
19523
19559
  Renderer: (param) => {
19524
19560
  let { value } = param;
19525
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
19561
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_jsx_runtime137.Fragment, {
19526
19562
  children: value
19527
19563
  });
19528
19564
  }
@@ -19535,79 +19571,79 @@ var bigIntType = defineEasyType({
19535
19571
  deserialize: (value) => BigInt(value.replace(/\D/g, "")),
19536
19572
  Renderer: (param) => {
19537
19573
  let { value } = param;
19538
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
19574
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_jsx_runtime137.Fragment, {
19539
19575
  children: "".concat(value, "n")
19540
19576
  });
19541
19577
  }
19542
19578
  });
19543
19579
  var BaseIcon = (param) => {
19544
19580
  let { d: d2, ...props } = param;
19545
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.SvgIcon, {
19581
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.SvgIcon, {
19546
19582
  ...props,
19547
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("path", {
19583
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("path", {
19548
19584
  d: d2
19549
19585
  })
19550
19586
  });
19551
19587
  };
19552
19588
  var AddBox = "M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4z";
19553
- var Check = "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z";
19589
+ var Check2 = "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z";
19554
19590
  var ChevronRight = "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z";
19555
19591
  var CircularArrows = "M 12 2 C 10.615 1.998 9.214625 2.2867656 7.890625 2.8847656 L 8.9003906 4.6328125 C 9.9043906 4.2098125 10.957 3.998 12 4 C 15.080783 4 17.738521 5.7633175 19.074219 8.3222656 L 17.125 9 L 21.25 11 L 22.875 7 L 20.998047 7.6523438 C 19.377701 4.3110398 15.95585 2 12 2 z M 6.5097656 4.4882812 L 2.2324219 5.0820312 L 3.734375 6.3808594 C 1.6515335 9.4550558 1.3615962 13.574578 3.3398438 17 C 4.0308437 18.201 4.9801562 19.268234 6.1601562 20.115234 L 7.1699219 18.367188 C 6.3019219 17.710187 5.5922656 16.904 5.0722656 16 C 3.5320014 13.332354 3.729203 10.148679 5.2773438 7.7128906 L 6.8398438 9.0625 L 6.5097656 4.4882812 z M 19.929688 13 C 19.794687 14.08 19.450734 15.098 18.927734 16 C 17.386985 18.668487 14.531361 20.090637 11.646484 19.966797 L 12.035156 17.9375 L 8.2402344 20.511719 L 10.892578 23.917969 L 11.265625 21.966797 C 14.968963 22.233766 18.681899 20.426323 20.660156 17 C 21.355156 15.801 21.805219 14.445 21.949219 13 L 19.929688 13 z";
19556
19592
  var Close = "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z";
19557
- var ContentCopy = "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z";
19593
+ var ContentCopy2 = "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z";
19558
19594
  var Edit = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z";
19559
19595
  var ExpandMore = "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z";
19560
19596
  var Delete = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z";
19561
19597
  var AddBoxIcon = (props) => {
19562
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
19598
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BaseIcon, {
19563
19599
  d: AddBox,
19564
19600
  ...props
19565
19601
  });
19566
19602
  };
19567
19603
  var CheckIcon = (props) => {
19568
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
19569
- d: Check,
19604
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BaseIcon, {
19605
+ d: Check2,
19570
19606
  ...props
19571
19607
  });
19572
19608
  };
19573
19609
  var ChevronRightIcon = (props) => {
19574
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
19610
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BaseIcon, {
19575
19611
  d: ChevronRight,
19576
19612
  ...props
19577
19613
  });
19578
19614
  };
19579
19615
  var CircularArrowsIcon = (props) => {
19580
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
19616
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BaseIcon, {
19581
19617
  d: CircularArrows,
19582
19618
  ...props
19583
19619
  });
19584
19620
  };
19585
19621
  var CloseIcon = (props) => {
19586
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
19622
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BaseIcon, {
19587
19623
  d: Close,
19588
19624
  ...props
19589
19625
  });
19590
19626
  };
19591
19627
  var ContentCopyIcon = (props) => {
19592
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
19593
- d: ContentCopy,
19628
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BaseIcon, {
19629
+ d: ContentCopy2,
19594
19630
  ...props
19595
19631
  });
19596
19632
  };
19597
19633
  var EditIcon = (props) => {
19598
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
19634
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BaseIcon, {
19599
19635
  d: Edit,
19600
19636
  ...props
19601
19637
  });
19602
19638
  };
19603
19639
  var ExpandMoreIcon = (props) => {
19604
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
19640
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BaseIcon, {
19605
19641
  d: ExpandMore,
19606
19642
  ...props
19607
19643
  });
19608
19644
  };
19609
19645
  var DeleteIcon = (props) => {
19610
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
19646
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BaseIcon, {
19611
19647
  d: Delete,
19612
19648
  ...props
19613
19649
  });
@@ -19630,23 +19666,23 @@ function inspectMetadata(value) {
19630
19666
  var PreObjectType = (props) => {
19631
19667
  const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
19632
19668
  const textColor = useTextColor();
19633
- const isArrayLike = (0, import_react54.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
19669
+ const isArrayLike = (0, import_react55.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
19634
19670
  props.value
19635
19671
  ]);
19636
- const isEmptyValue = (0, import_react54.useMemo)(() => getValueSize(props.value) === 0, [
19672
+ const isEmptyValue = (0, import_react55.useMemo)(() => getValueSize(props.value) === 0, [
19637
19673
  props.value
19638
19674
  ]);
19639
- const sizeOfValue = (0, import_react54.useMemo)(() => inspectMetadata(props.value), [
19675
+ const sizeOfValue = (0, import_react55.useMemo)(() => inspectMetadata(props.value), [
19640
19676
  props.value
19641
19677
  ]);
19642
19678
  const displaySize = useJsonViewerStore((store) => store.displaySize);
19643
- const shouldDisplaySize = (0, import_react54.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
19679
+ const shouldDisplaySize = (0, import_react55.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
19644
19680
  displaySize,
19645
19681
  props.path,
19646
19682
  props.value
19647
19683
  ]);
19648
19684
  const isTrap = useIsCycleReference(props.path, props.value);
19649
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
19685
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, {
19650
19686
  component: "span",
19651
19687
  className: "data-object-start",
19652
19688
  sx: {
@@ -19654,7 +19690,7 @@ var PreObjectType = (props) => {
19654
19690
  },
19655
19691
  children: [
19656
19692
  isArrayLike ? arrayLb : objectLb,
19657
- shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19693
+ shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19658
19694
  component: "span",
19659
19695
  sx: {
19660
19696
  pl: 0.5,
@@ -19664,16 +19700,16 @@ var PreObjectType = (props) => {
19664
19700
  },
19665
19701
  children: sizeOfValue
19666
19702
  }),
19667
- isTrap && !props.inspect && /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
19703
+ isTrap && !props.inspect && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, {
19668
19704
  children: [
19669
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CircularArrowsIcon, {
19705
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CircularArrowsIcon, {
19670
19706
  sx: {
19671
19707
  fontSize: 12,
19672
19708
  color: textColor,
19673
19709
  mx: 0.5
19674
19710
  }
19675
19711
  }),
19676
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
19712
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataBox, {
19677
19713
  sx: {
19678
19714
  cursor: "pointer",
19679
19715
  userSelect: "none"
@@ -19688,22 +19724,22 @@ var PreObjectType = (props) => {
19688
19724
  var PostObjectType = (props) => {
19689
19725
  const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
19690
19726
  const textColor = useTextColor();
19691
- const isArrayLike = (0, import_react54.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
19727
+ const isArrayLike = (0, import_react55.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
19692
19728
  props.value
19693
19729
  ]);
19694
- const isEmptyValue = (0, import_react54.useMemo)(() => getValueSize(props.value) === 0, [
19730
+ const isEmptyValue = (0, import_react55.useMemo)(() => getValueSize(props.value) === 0, [
19695
19731
  props.value
19696
19732
  ]);
19697
- const sizeOfValue = (0, import_react54.useMemo)(() => inspectMetadata(props.value), [
19733
+ const sizeOfValue = (0, import_react55.useMemo)(() => inspectMetadata(props.value), [
19698
19734
  props.value
19699
19735
  ]);
19700
19736
  const displaySize = useJsonViewerStore((store) => store.displaySize);
19701
- const shouldDisplaySize = (0, import_react54.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
19737
+ const shouldDisplaySize = (0, import_react55.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
19702
19738
  displaySize,
19703
19739
  props.path,
19704
19740
  props.value
19705
19741
  ]);
19706
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
19742
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, {
19707
19743
  component: "span",
19708
19744
  className: "data-object-end",
19709
19745
  sx: {
@@ -19714,7 +19750,7 @@ var PostObjectType = (props) => {
19714
19750
  },
19715
19751
  children: [
19716
19752
  isArrayLike ? arrayRb : objectRb,
19717
- shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19753
+ shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19718
19754
  component: "span",
19719
19755
  sx: {
19720
19756
  pl: 0.5,
@@ -19735,9 +19771,9 @@ var ObjectType = (props) => {
19735
19771
  const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
19736
19772
  const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
19737
19773
  const isTrap = useIsCycleReference(props.path, props.value);
19738
- const [displayLength, setDisplayLength] = (0, import_react54.useState)(useJsonViewerStore((store) => store.maxDisplayLength));
19774
+ const [displayLength, setDisplayLength] = (0, import_react55.useState)(useJsonViewerStore((store) => store.maxDisplayLength));
19739
19775
  const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
19740
- const elements = (0, import_react54.useMemo)(() => {
19776
+ const elements = (0, import_react55.useMemo)(() => {
19741
19777
  if (!props.inspect) {
19742
19778
  return null;
19743
19779
  }
@@ -19754,7 +19790,7 @@ var ObjectType = (props) => {
19754
19790
  ...props.path,
19755
19791
  key
19756
19792
  ];
19757
- elements3.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
19793
+ elements3.push(/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataKeyPair, {
19758
19794
  path,
19759
19795
  value: value2,
19760
19796
  prevValue: props.prevValue instanceof Map ? props.prevValue.get(k2) : void 0,
@@ -19770,7 +19806,7 @@ var ObjectType = (props) => {
19770
19806
  while (true) {
19771
19807
  const nextResult = iterator2.next();
19772
19808
  var _nextResult_done;
19773
- elements3.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
19809
+ elements3.push(/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataKeyPair, {
19774
19810
  path: [
19775
19811
  ...props.path,
19776
19812
  "iterator:".concat(count2)
@@ -19798,7 +19834,7 @@ var ObjectType = (props) => {
19798
19834
  ...props.path,
19799
19835
  index
19800
19836
  ];
19801
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
19837
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataKeyPair, {
19802
19838
  path,
19803
19839
  value: value2,
19804
19840
  prevValue: Array.isArray(props.prevValue) ? props.prevValue[index] : void 0,
@@ -19807,7 +19843,7 @@ var ObjectType = (props) => {
19807
19843
  });
19808
19844
  if (value.length > displayLength) {
19809
19845
  const rest = value.length - displayLength;
19810
- elements4.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
19846
+ elements4.push(/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(DataBox, {
19811
19847
  sx: {
19812
19848
  cursor: "pointer",
19813
19849
  lineHeight: 1.5,
@@ -19830,7 +19866,7 @@ var ObjectType = (props) => {
19830
19866
  const prevElements = Array.isArray(props.prevValue) ? segmentArray(props.prevValue, groupArraysAfterLength) : void 0;
19831
19867
  const elementsLastIndex = elements3.length - 1;
19832
19868
  return elements3.map((list, index) => {
19833
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
19869
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataKeyPair, {
19834
19870
  path: props.path,
19835
19871
  value: list,
19836
19872
  nestedIndex: index,
@@ -19857,7 +19893,7 @@ var ObjectType = (props) => {
19857
19893
  ...props.path,
19858
19894
  key
19859
19895
  ];
19860
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
19896
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataKeyPair, {
19861
19897
  path,
19862
19898
  value: value2,
19863
19899
  prevValue: (_props_prevValue = props.prevValue) === null || _props_prevValue === void 0 ? void 0 : _props_prevValue[key],
@@ -19866,7 +19902,7 @@ var ObjectType = (props) => {
19866
19902
  });
19867
19903
  if (entries.length > displayLength) {
19868
19904
  const rest = entries.length - displayLength;
19869
- elements2.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
19905
+ elements2.push(/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(DataBox, {
19870
19906
  sx: {
19871
19907
  cursor: "pointer",
19872
19908
  lineHeight: 1.5,
@@ -19898,13 +19934,13 @@ var ObjectType = (props) => {
19898
19934
  const marginLeft = props.inspect ? 0.6 : 0;
19899
19935
  const width = useJsonViewerStore((store) => store.indentWidth);
19900
19936
  const indentWidth = props.inspect ? width - marginLeft : width;
19901
- const isEmptyValue = (0, import_react54.useMemo)(() => getValueSize(props.value) === 0, [
19937
+ const isEmptyValue = (0, import_react55.useMemo)(() => getValueSize(props.value) === 0, [
19902
19938
  props.value
19903
19939
  ]);
19904
19940
  if (isEmptyValue) {
19905
19941
  return null;
19906
19942
  }
19907
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19943
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19908
19944
  className: "data-object",
19909
19945
  sx: {
19910
19946
  display: props.inspect ? "block" : "inline-block",
@@ -19913,7 +19949,7 @@ var ObjectType = (props) => {
19913
19949
  color: keyColor,
19914
19950
  borderLeft: props.inspect ? "1px solid ".concat(borderColor) : "none"
19915
19951
  },
19916
- children: props.inspect ? elements : !isTrap && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
19952
+ children: props.inspect ? elements : !isTrap && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19917
19953
  component: "span",
19918
19954
  className: "data-object-body",
19919
19955
  onClick: () => props.setInspect(true),
@@ -19941,11 +19977,11 @@ var stringType = defineEasyType({
19941
19977
  serialize: (value) => value,
19942
19978
  deserialize: (value) => value,
19943
19979
  Renderer: (props) => {
19944
- const [showRest, setShowRest] = (0, import_react54.useState)(false);
19980
+ const [showRest, setShowRest] = (0, import_react55.useState)(false);
19945
19981
  const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
19946
19982
  const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
19947
19983
  const hasRest = props.value.length > collapseStringsAfterLength;
19948
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
19984
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, {
19949
19985
  component: "span",
19950
19986
  sx: {
19951
19987
  overflowWrap: "anywhere",
@@ -19963,7 +19999,7 @@ var stringType = defineEasyType({
19963
19999
  children: [
19964
20000
  '"',
19965
20001
  value,
19966
- hasRest && !showRest && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
20002
+ hasRest && !showRest && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19967
20003
  component: "span",
19968
20004
  sx: {
19969
20005
  padding: 0.5
@@ -19982,7 +20018,7 @@ var undefinedType = defineEasyType({
19982
20018
  displayTypeLabel: false,
19983
20019
  Renderer: () => {
19984
20020
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
19985
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
20021
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
19986
20022
  sx: {
19987
20023
  fontSize: "0.7rem",
19988
20024
  backgroundColor,
@@ -19998,17 +20034,17 @@ function memorizeDataType(dataType) {
19998
20034
  var _prevProps_path, _nextProps_path;
19999
20035
  return Object.is(prevProps.value, nextProps.value) && prevProps.inspect && nextProps.inspect && ((_prevProps_path = prevProps.path) === null || _prevProps_path === void 0 ? void 0 : _prevProps_path.join(".")) === ((_nextProps_path = nextProps.path) === null || _nextProps_path === void 0 ? void 0 : _nextProps_path.join("."));
20000
20036
  }
20001
- dataType.Component = /* @__PURE__ */ (0, import_react54.memo)(dataType.Component, compare);
20037
+ dataType.Component = /* @__PURE__ */ (0, import_react55.memo)(dataType.Component, compare);
20002
20038
  if (dataType.Editor) {
20003
- dataType.Editor = /* @__PURE__ */ (0, import_react54.memo)(dataType.Editor, function compare2(prevProps, nextProps) {
20039
+ dataType.Editor = /* @__PURE__ */ (0, import_react55.memo)(dataType.Editor, function compare2(prevProps, nextProps) {
20004
20040
  return Object.is(prevProps.value, nextProps.value);
20005
20041
  });
20006
20042
  }
20007
20043
  if (dataType.PreComponent) {
20008
- dataType.PreComponent = /* @__PURE__ */ (0, import_react54.memo)(dataType.PreComponent, compare);
20044
+ dataType.PreComponent = /* @__PURE__ */ (0, import_react55.memo)(dataType.PreComponent, compare);
20009
20045
  }
20010
20046
  if (dataType.PostComponent) {
20011
- dataType.PostComponent = /* @__PURE__ */ (0, import_react54.memo)(dataType.PostComponent, compare);
20047
+ dataType.PostComponent = /* @__PURE__ */ (0, import_react55.memo)(dataType.PostComponent, compare);
20012
20048
  }
20013
20049
  return dataType;
20014
20050
  }
@@ -20034,10 +20070,10 @@ var createTypeRegistryStore = () => {
20034
20070
  }
20035
20071
  }));
20036
20072
  };
20037
- var TypeRegistryStoreContext = /* @__PURE__ */ (0, import_react54.createContext)(void 0);
20073
+ var TypeRegistryStoreContext = /* @__PURE__ */ (0, import_react55.createContext)(void 0);
20038
20074
  TypeRegistryStoreContext.Provider;
20039
20075
  var useTypeRegistryStore = (selector2, equalityFn) => {
20040
- const store = (0, import_react54.useContext)(TypeRegistryStoreContext);
20076
+ const store = (0, import_react55.useContext)(TypeRegistryStoreContext);
20041
20077
  return (0, import_zustand.useStore)(store, selector2, equalityFn);
20042
20078
  };
20043
20079
  function matchTypeComponents(value, path, registry) {
@@ -20057,13 +20093,13 @@ function matchTypeComponents(value, path, registry) {
20057
20093
  }
20058
20094
  function useTypeComponents(value, path) {
20059
20095
  const registry = useTypeRegistryStore((store) => store.registry);
20060
- return (0, import_react54.useMemo)(() => matchTypeComponents(value, path, registry), [
20096
+ return (0, import_react55.useMemo)(() => matchTypeComponents(value, path, registry), [
20061
20097
  value,
20062
20098
  path,
20063
20099
  registry
20064
20100
  ]);
20065
20101
  }
20066
- var IconBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
20102
+ var IconBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
20067
20103
  component: "span",
20068
20104
  ...props,
20069
20105
  sx: {
@@ -20078,7 +20114,7 @@ var DataKeyPair = (props) => {
20078
20114
  var _props_editable;
20079
20115
  const propsEditable = (_props_editable = props.editable) !== null && _props_editable !== void 0 ? _props_editable : void 0;
20080
20116
  const storeEditable = useJsonViewerStore((store) => store.editable);
20081
- const editable = (0, import_react54.useMemo)(() => {
20117
+ const editable = (0, import_react55.useMemo)(() => {
20082
20118
  if (storeEditable === false) {
20083
20119
  return false;
20084
20120
  }
@@ -20095,11 +20131,11 @@ var DataKeyPair = (props) => {
20095
20131
  storeEditable,
20096
20132
  value
20097
20133
  ]);
20098
- const [tempValue, setTempValue] = (0, import_react54.useState)("");
20134
+ const [tempValue, setTempValue] = (0, import_react55.useState)("");
20099
20135
  const depth = path.length;
20100
20136
  const key = path[depth - 1];
20101
20137
  const hoverPath = useJsonViewerStore((store) => store.hoverPath);
20102
- const isHover = (0, import_react54.useMemo)(() => {
20138
+ const isHover = (0, import_react55.useMemo)(() => {
20103
20139
  return hoverPath && path.every((value2, index) => value2 === hoverPath.path[index] && nestedIndex === hoverPath.nestedIndex);
20104
20140
  }, [
20105
20141
  hoverPath,
@@ -20109,7 +20145,7 @@ var DataKeyPair = (props) => {
20109
20145
  const setHover = useJsonViewerStore((store) => store.setHover);
20110
20146
  const root = useJsonViewerStore((store) => store.value);
20111
20147
  const [inspect, setInspect] = useInspect(path, value, nestedIndex);
20112
- const [editing, setEditing] = (0, import_react54.useState)(false);
20148
+ const [editing, setEditing] = (0, import_react55.useState)(false);
20113
20149
  const onChange = useJsonViewerStore((store) => store.onChange);
20114
20150
  const keyColor = useTextColor();
20115
20151
  const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
@@ -20121,7 +20157,7 @@ var DataKeyPair = (props) => {
20121
20157
  const isNumberKey = Number.isInteger(Number(key));
20122
20158
  const storeEnableAdd = useJsonViewerStore((store) => store.enableAdd);
20123
20159
  const onAdd = useJsonViewerStore((store) => store.onAdd);
20124
- const enableAdd = (0, import_react54.useMemo)(() => {
20160
+ const enableAdd = (0, import_react55.useMemo)(() => {
20125
20161
  if (!onAdd || nestedIndex !== void 0) return false;
20126
20162
  if (storeEnableAdd === false) {
20127
20163
  return false;
@@ -20146,7 +20182,7 @@ var DataKeyPair = (props) => {
20146
20182
  ]);
20147
20183
  const storeEnableDelete = useJsonViewerStore((store) => store.enableDelete);
20148
20184
  const onDelete = useJsonViewerStore((store) => store.onDelete);
20149
- const enableDelete = (0, import_react54.useMemo)(() => {
20185
+ const enableDelete = (0, import_react55.useMemo)(() => {
20150
20186
  if (!onDelete || nestedIndex !== void 0) return false;
20151
20187
  if (isRoot) {
20152
20188
  return false;
@@ -20173,7 +20209,7 @@ var DataKeyPair = (props) => {
20173
20209
  const enableClipboard = useJsonViewerStore((store) => store.enableClipboard);
20174
20210
  const { copy, copied } = useClipboard();
20175
20211
  const highlightUpdates = useJsonViewerStore((store) => store.highlightUpdates);
20176
- const isHighlight = (0, import_react54.useMemo)(() => {
20212
+ const isHighlight = (0, import_react55.useMemo)(() => {
20177
20213
  if (!highlightUpdates || prevValue === void 0) return false;
20178
20214
  if (typeof value !== typeof prevValue) {
20179
20215
  return true;
@@ -20197,8 +20233,8 @@ var DataKeyPair = (props) => {
20197
20233
  prevValue,
20198
20234
  value
20199
20235
  ]);
20200
- const highlightContainer = (0, import_react54.useRef)();
20201
- (0, import_react54.useEffect)(() => {
20236
+ const highlightContainer = (0, import_react55.useRef)();
20237
+ (0, import_react55.useEffect)(() => {
20202
20238
  if (highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
20203
20239
  highlightContainer.current.animate([
20204
20240
  {
@@ -20218,7 +20254,7 @@ var DataKeyPair = (props) => {
20218
20254
  prevValue,
20219
20255
  value
20220
20256
  ]);
20221
- const startEditing = (0, import_react54.useCallback)((event) => {
20257
+ const startEditing = (0, import_react55.useCallback)((event) => {
20222
20258
  event.preventDefault();
20223
20259
  if (serialize) setTempValue(serialize(value));
20224
20260
  setEditing(true);
@@ -20226,14 +20262,14 @@ var DataKeyPair = (props) => {
20226
20262
  serialize,
20227
20263
  value
20228
20264
  ]);
20229
- const abortEditing = (0, import_react54.useCallback)(() => {
20265
+ const abortEditing = (0, import_react55.useCallback)(() => {
20230
20266
  setEditing(false);
20231
20267
  setTempValue("");
20232
20268
  }, [
20233
20269
  setEditing,
20234
20270
  setTempValue
20235
20271
  ]);
20236
- const commitEditing = (0, import_react54.useCallback)((newValue) => {
20272
+ const commitEditing = (0, import_react55.useCallback)((newValue) => {
20237
20273
  setEditing(false);
20238
20274
  if (!deserialize) return;
20239
20275
  try {
@@ -20247,20 +20283,20 @@ var DataKeyPair = (props) => {
20247
20283
  path,
20248
20284
  value
20249
20285
  ]);
20250
- const actionIcons = (0, import_react54.useMemo)(() => {
20286
+ const actionIcons = (0, import_react55.useMemo)(() => {
20251
20287
  if (editing) {
20252
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
20288
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, {
20253
20289
  children: [
20254
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20255
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CloseIcon, {
20290
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(IconBox, {
20291
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CloseIcon, {
20256
20292
  sx: {
20257
20293
  fontSize: ".8rem"
20258
20294
  },
20259
20295
  onClick: abortEditing
20260
20296
  })
20261
20297
  }),
20262
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20263
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CheckIcon, {
20298
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(IconBox, {
20299
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CheckIcon, {
20264
20300
  sx: {
20265
20301
  fontSize: ".8rem"
20266
20302
  },
@@ -20270,9 +20306,9 @@ var DataKeyPair = (props) => {
20270
20306
  ]
20271
20307
  });
20272
20308
  }
20273
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
20309
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, {
20274
20310
  children: [
20275
- enableClipboard && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20311
+ enableClipboard && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(IconBox, {
20276
20312
  onClick: (event) => {
20277
20313
  event.preventDefault();
20278
20314
  try {
@@ -20281,41 +20317,41 @@ var DataKeyPair = (props) => {
20281
20317
  console.error(e2);
20282
20318
  }
20283
20319
  },
20284
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CheckIcon, {
20320
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CheckIcon, {
20285
20321
  sx: {
20286
20322
  fontSize: ".8rem"
20287
20323
  }
20288
- }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ContentCopyIcon, {
20324
+ }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ContentCopyIcon, {
20289
20325
  sx: {
20290
20326
  fontSize: ".8rem"
20291
20327
  }
20292
20328
  })
20293
20329
  }),
20294
- Editor && editable && serialize && deserialize && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20330
+ Editor && editable && serialize && deserialize && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(IconBox, {
20295
20331
  onClick: startEditing,
20296
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(EditIcon, {
20332
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(EditIcon, {
20297
20333
  sx: {
20298
20334
  fontSize: ".8rem"
20299
20335
  }
20300
20336
  })
20301
20337
  }),
20302
- enableAdd && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20338
+ enableAdd && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(IconBox, {
20303
20339
  onClick: (event) => {
20304
20340
  event.preventDefault();
20305
20341
  onAdd === null || onAdd === void 0 ? void 0 : onAdd(path);
20306
20342
  },
20307
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(AddBoxIcon, {
20343
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(AddBoxIcon, {
20308
20344
  sx: {
20309
20345
  fontSize: ".8rem"
20310
20346
  }
20311
20347
  })
20312
20348
  }),
20313
- enableDelete && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20349
+ enableDelete && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(IconBox, {
20314
20350
  onClick: (event) => {
20315
20351
  event.preventDefault();
20316
20352
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(path, value);
20317
20353
  },
20318
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DeleteIcon, {
20354
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DeleteIcon, {
20319
20355
  sx: {
20320
20356
  fontSize: ".9rem"
20321
20357
  }
@@ -20343,12 +20379,12 @@ var DataKeyPair = (props) => {
20343
20379
  abortEditing,
20344
20380
  commitEditing
20345
20381
  ]);
20346
- const isEmptyValue = (0, import_react54.useMemo)(() => getValueSize(value) === 0, [
20382
+ const isEmptyValue = (0, import_react55.useMemo)(() => getValueSize(value) === 0, [
20347
20383
  value
20348
20384
  ]);
20349
20385
  const expandable = !isEmptyValue && !!(PreComponent && PostComponent);
20350
20386
  const KeyRenderer = useJsonViewerStore((store) => store.keyRenderer);
20351
- const downstreamProps = (0, import_react54.useMemo)(() => ({
20387
+ const downstreamProps = (0, import_react55.useMemo)(() => ({
20352
20388
  path,
20353
20389
  inspect,
20354
20390
  setInspect,
@@ -20363,19 +20399,19 @@ var DataKeyPair = (props) => {
20363
20399
  prevValue,
20364
20400
  nestedIndex
20365
20401
  ]);
20366
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
20402
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, {
20367
20403
  className: "data-key-pair",
20368
20404
  "data-testid": "data-key-pair" + path.join("."),
20369
20405
  sx: {
20370
20406
  userSelect: "text"
20371
20407
  },
20372
- onMouseEnter: (0, import_react54.useCallback)(() => setHover(path, nestedIndex), [
20408
+ onMouseEnter: (0, import_react55.useCallback)(() => setHover(path, nestedIndex), [
20373
20409
  setHover,
20374
20410
  path,
20375
20411
  nestedIndex
20376
20412
  ]),
20377
20413
  children: [
20378
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
20414
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(DataBox, {
20379
20415
  component: "span",
20380
20416
  className: "data-key",
20381
20417
  sx: {
@@ -20384,7 +20420,7 @@ var DataKeyPair = (props) => {
20384
20420
  letterSpacing: 0.5,
20385
20421
  opacity: 0.8
20386
20422
  },
20387
- onClick: (0, import_react54.useCallback)((event) => {
20423
+ onClick: (0, import_react55.useCallback)((event) => {
20388
20424
  if (event.isDefaultPrevented()) {
20389
20425
  return;
20390
20426
  }
@@ -20396,7 +20432,7 @@ var DataKeyPair = (props) => {
20396
20432
  setInspect
20397
20433
  ]),
20398
20434
  children: [
20399
- expandable ? inspect ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ExpandMoreIcon, {
20435
+ expandable ? inspect ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ExpandMoreIcon, {
20400
20436
  className: "data-key-toggle-expanded",
20401
20437
  sx: {
20402
20438
  fontSize: ".8rem",
@@ -20404,7 +20440,7 @@ var DataKeyPair = (props) => {
20404
20440
  cursor: "pointer"
20405
20441
  }
20406
20442
  }
20407
- }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ChevronRightIcon, {
20443
+ }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ChevronRightIcon, {
20408
20444
  className: "data-key-toggle-collapsed",
20409
20445
  sx: {
20410
20446
  fontSize: ".8rem",
@@ -20413,44 +20449,44 @@ var DataKeyPair = (props) => {
20413
20449
  }
20414
20450
  }
20415
20451
  }) : null,
20416
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
20452
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
20417
20453
  ref: highlightContainer,
20418
20454
  className: "data-key-key",
20419
20455
  component: "span",
20420
- children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
20456
+ children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, {
20421
20457
  children: [
20422
20458
  '"',
20423
20459
  rootName,
20424
20460
  '"'
20425
20461
  ]
20426
- }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
20462
+ }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_jsx_runtime137.Fragment, {
20427
20463
  children: rootName
20428
- }) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(KeyRenderer, {
20464
+ }) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(KeyRenderer, {
20429
20465
  ...downstreamProps
20430
- }) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
20466
+ }) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
20431
20467
  component: "span",
20432
20468
  style: {
20433
20469
  color: numberKeyColor,
20434
20470
  userSelect: isNumberKey ? "none" : "auto"
20435
20471
  },
20436
20472
  children: key
20437
- }) : quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
20473
+ }) : quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, {
20438
20474
  children: [
20439
20475
  '"',
20440
20476
  key,
20441
20477
  '"'
20442
20478
  ]
20443
- }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
20479
+ }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_jsx_runtime137.Fragment, {
20444
20480
  children: key
20445
20481
  }))
20446
20482
  }),
20447
- isRoot ? rootName !== false && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
20483
+ isRoot ? rootName !== false && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataBox, {
20448
20484
  className: "data-key-colon",
20449
20485
  sx: {
20450
20486
  mr: 0.5
20451
20487
  },
20452
20488
  children: ":"
20453
- }) : nestedIndex === void 0 && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
20489
+ }) : nestedIndex === void 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataBox, {
20454
20490
  className: "data-key-colon",
20455
20491
  sx: {
20456
20492
  mr: 0.5,
@@ -20461,29 +20497,29 @@ var DataKeyPair = (props) => {
20461
20497
  },
20462
20498
  children: ":"
20463
20499
  }),
20464
- PreComponent && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PreComponent, {
20500
+ PreComponent && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(PreComponent, {
20465
20501
  ...downstreamProps
20466
20502
  }),
20467
20503
  isHover && expandable && inspect && actionIcons
20468
20504
  ]
20469
20505
  }),
20470
- editing && editable ? Editor && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Editor, {
20506
+ editing && editable ? Editor && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Editor, {
20471
20507
  path,
20472
20508
  value: tempValue,
20473
20509
  setValue: setTempValue,
20474
20510
  abortEditing,
20475
20511
  commitEditing
20476
- }) : Component ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Component, {
20512
+ }) : Component ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Component, {
20477
20513
  ...downstreamProps
20478
- }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
20514
+ }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, {
20479
20515
  component: "span",
20480
20516
  className: "data-value-fallback",
20481
20517
  children: "fallback: ".concat(value)
20482
20518
  }),
20483
- PostComponent && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PostComponent, {
20519
+ PostComponent && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(PostComponent, {
20484
20520
  ...downstreamProps
20485
20521
  }),
20486
- !last && displayComma && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
20522
+ !last && displayComma && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataBox, {
20487
20523
  children: ","
20488
20524
  }),
20489
20525
  isHover && expandable && !inspect && actionIcons,
@@ -20494,8 +20530,8 @@ var DataKeyPair = (props) => {
20494
20530
  };
20495
20531
  var query = "(prefers-color-scheme: dark)";
20496
20532
  function useThemeDetector() {
20497
- const [isDark, setIsDark] = (0, import_react54.useState)(false);
20498
- (0, import_react54.useEffect)(() => {
20533
+ const [isDark, setIsDark] = (0, import_react55.useState)(false);
20534
+ (0, import_react55.useEffect)(() => {
20499
20535
  const listener = (e2) => setIsDark(e2.matches);
20500
20536
  setIsDark(window.matchMedia(query).matches);
20501
20537
  const queryMedia = window.matchMedia(query);
@@ -20505,8 +20541,8 @@ function useThemeDetector() {
20505
20541
  return isDark;
20506
20542
  }
20507
20543
  function useSetIfNotUndefinedEffect(key, value) {
20508
- const { setState } = (0, import_react54.useContext)(JsonViewerStoreContext);
20509
- (0, import_react54.useEffect)(() => {
20544
+ const { setState } = (0, import_react55.useContext)(JsonViewerStoreContext);
20545
+ (0, import_react55.useEffect)(() => {
20510
20546
  if (value !== void 0) {
20511
20547
  setState({
20512
20548
  [key]: value
@@ -20519,8 +20555,8 @@ function useSetIfNotUndefinedEffect(key, value) {
20519
20555
  ]);
20520
20556
  }
20521
20557
  var JsonViewerInner = (props) => {
20522
- const { setState } = (0, import_react54.useContext)(JsonViewerStoreContext);
20523
- (0, import_react54.useEffect)(() => {
20558
+ const { setState } = (0, import_react55.useContext)(JsonViewerStoreContext);
20559
+ (0, import_react55.useEffect)(() => {
20524
20560
  setState((state) => ({
20525
20561
  prevValue: state.value,
20526
20562
  value: props.value
@@ -20548,7 +20584,7 @@ var JsonViewerInner = (props) => {
20548
20584
  useSetIfNotUndefinedEffect("displaySize", props.displaySize);
20549
20585
  useSetIfNotUndefinedEffect("displayComma", props.displayComma);
20550
20586
  useSetIfNotUndefinedEffect("highlightUpdates", props.highlightUpdates);
20551
- (0, import_react54.useEffect)(() => {
20587
+ (0, import_react55.useEffect)(() => {
20552
20588
  if (props.theme === "light") {
20553
20589
  setState({
20554
20590
  colorspace: lightColorspace
@@ -20566,13 +20602,13 @@ var JsonViewerInner = (props) => {
20566
20602
  setState,
20567
20603
  props.theme
20568
20604
  ]);
20569
- const themeCls = (0, import_react54.useMemo)(() => {
20605
+ const themeCls = (0, import_react55.useMemo)(() => {
20570
20606
  if (typeof props.theme === "object") return "json-viewer-theme-custom";
20571
20607
  return props.theme === "dark" ? "json-viewer-theme-dark" : "json-viewer-theme-light";
20572
20608
  }, [
20573
20609
  props.theme
20574
20610
  ]);
20575
- const onceRef = (0, import_react54.useRef)(true);
20611
+ const onceRef = (0, import_react55.useRef)(true);
20576
20612
  const registerTypes = useTypeRegistryStore((store) => store.registerTypes);
20577
20613
  if (onceRef.current) {
20578
20614
  const allTypes = props.valueTypes ? [
@@ -20584,7 +20620,7 @@ var JsonViewerInner = (props) => {
20584
20620
  registerTypes(allTypes);
20585
20621
  onceRef.current = false;
20586
20622
  }
20587
- (0, import_react54.useEffect)(() => {
20623
+ (0, import_react55.useEffect)(() => {
20588
20624
  const allTypes = props.valueTypes ? [
20589
20625
  ...predefinedTypes,
20590
20626
  ...props.valueTypes
@@ -20598,12 +20634,12 @@ var JsonViewerInner = (props) => {
20598
20634
  ]);
20599
20635
  const value = useJsonViewerStore((store) => store.value);
20600
20636
  const prevValue = useJsonViewerStore((store) => store.prevValue);
20601
- const emptyPath = (0, import_react54.useMemo)(() => [], []);
20637
+ const emptyPath = (0, import_react55.useMemo)(() => [], []);
20602
20638
  const setHover = useJsonViewerStore((store) => store.setHover);
20603
- const onMouseLeave = (0, import_react54.useCallback)(() => setHover(null), [
20639
+ const onMouseLeave = (0, import_react55.useCallback)(() => setHover(null), [
20604
20640
  setHover
20605
20641
  ]);
20606
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Paper, {
20642
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Paper, {
20607
20643
  elevation: 0,
20608
20644
  className: clsx(themeCls, props.className),
20609
20645
  style: props.style,
@@ -20614,7 +20650,7 @@ var JsonViewerInner = (props) => {
20614
20650
  ...props.sx
20615
20651
  },
20616
20652
  onMouseLeave,
20617
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
20653
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DataKeyPair, {
20618
20654
  value,
20619
20655
  prevValue,
20620
20656
  path: emptyPath,
@@ -20629,17 +20665,17 @@ var JsonViewer = function JsonViewer2(props) {
20629
20665
  }
20630
20666
  }
20631
20667
  const isAutoDarkTheme = useThemeDetector();
20632
- const themeType = (0, import_react54.useMemo)(() => {
20668
+ const themeType = (0, import_react55.useMemo)(() => {
20633
20669
  var _props_theme;
20634
20670
  return props.theme === "auto" ? isAutoDarkTheme ? "dark" : "light" : (_props_theme = props.theme) !== null && _props_theme !== void 0 ? _props_theme : "light";
20635
20671
  }, [
20636
20672
  isAutoDarkTheme,
20637
20673
  props.theme
20638
20674
  ]);
20639
- const theme = (0, import_react54.useMemo)(() => {
20675
+ const theme = (0, import_react55.useMemo)(() => {
20640
20676
  const backgroundColor = typeof themeType === "object" ? themeType.base00 : themeType === "dark" ? darkColorspace.base00 : lightColorspace.base00;
20641
20677
  const foregroundColor = typeof themeType === "object" ? themeType.base07 : themeType === "dark" ? darkColorspace.base07 : lightColorspace.base07;
20642
- return (0, import_material13.createTheme)({
20678
+ return (0, import_material14.createTheme)({
20643
20679
  components: {
20644
20680
  MuiPaper: {
20645
20681
  styleOverrides: {
@@ -20664,15 +20700,15 @@ var JsonViewer = function JsonViewer2(props) {
20664
20700
  ...props,
20665
20701
  theme: themeType
20666
20702
  };
20667
- const jsonViewerStore = (0, import_react54.useMemo)(() => createJsonViewerStore(props), []);
20668
- const typeRegistryStore = (0, import_react54.useMemo)(() => createTypeRegistryStore(), []);
20669
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.ThemeProvider, {
20703
+ const jsonViewerStore = (0, import_react55.useMemo)(() => createJsonViewerStore(props), []);
20704
+ const typeRegistryStore = (0, import_react55.useMemo)(() => createTypeRegistryStore(), []);
20705
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.ThemeProvider, {
20670
20706
  theme,
20671
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(TypeRegistryStoreContext.Provider, {
20707
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(TypeRegistryStoreContext.Provider, {
20672
20708
  value: typeRegistryStore,
20673
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(JsonViewerStoreContext.Provider, {
20709
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(JsonViewerStoreContext.Provider, {
20674
20710
  value: jsonViewerStore,
20675
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(JsonViewerInner, {
20711
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(JsonViewerInner, {
20676
20712
  ...mixedProps
20677
20713
  })
20678
20714
  })
@@ -20681,8 +20717,8 @@ var JsonViewer = function JsonViewer2(props) {
20681
20717
  };
20682
20718
 
20683
20719
  // src/components/event-details/payload-viewer.tsx
20684
- var import_react55 = require("react");
20685
- var import_jsx_runtime137 = require("react/jsx-runtime");
20720
+ var import_react56 = require("react");
20721
+ var import_jsx_runtime138 = require("react/jsx-runtime");
20686
20722
  function tryParseJson(value) {
20687
20723
  if (typeof value !== "string") {
20688
20724
  return value;
@@ -20693,14 +20729,14 @@ function tryParseJson(value) {
20693
20729
  return value;
20694
20730
  }
20695
20731
  }
20696
- var PayloadViewer = (0, import_react55.memo)(({ sx, testId, value }) => {
20697
- const theme = (0, import_material14.useTheme)();
20698
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1, ...sx }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
20732
+ var PayloadViewer = (0, import_react56.memo)(({ sx, testId, value }) => {
20733
+ const theme = (0, import_material15.useTheme)();
20734
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Box, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1, ...sx }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
20699
20735
  JsonViewer,
20700
20736
  {
20701
20737
  displayDataTypes: false,
20702
20738
  displaySize: false,
20703
- enableClipboard: false,
20739
+ enableClipboard: true,
20704
20740
  rootName: false,
20705
20741
  theme: theme.palette.mode,
20706
20742
  value
@@ -20709,21 +20745,21 @@ var PayloadViewer = (0, import_react55.memo)(({ sx, testId, value }) => {
20709
20745
  });
20710
20746
 
20711
20747
  // src/components/event-details/event-detail.tsx
20712
- var import_jsx_runtime138 = require("react/jsx-runtime");
20713
- var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
20714
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
20715
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
20748
+ var import_jsx_runtime139 = require("react/jsx-runtime");
20749
+ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material16.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
20750
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
20751
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
20716
20752
  ] });
20717
20753
  var EventMessage = ({ event }) => {
20718
- const [isOpen, setIsOpen] = (0, import_react56.useState)(false);
20719
- const [isOverflowing, setIsOverflowing] = (0, import_react56.useState)(false);
20720
- const textReference = (0, import_react56.useRef)(null);
20721
- const parsedMessage = (0, import_react56.useMemo)(() => parseEventMessage(event), [event]);
20722
- const isIAMPolicyEvent = (0, import_react56.useMemo)(
20754
+ const [isOpen, setIsOpen] = (0, import_react57.useState)(false);
20755
+ const [isOverflowing, setIsOverflowing] = (0, import_react57.useState)(false);
20756
+ const textReference = (0, import_react57.useRef)(null);
20757
+ const parsedMessage = (0, import_react57.useMemo)(() => parseEventMessage(event), [event]);
20758
+ const isIAMPolicyEvent = (0, import_react57.useMemo)(
20723
20759
  () => event.event_type === "iam.policy_evaluation" && event.attributes?.payload && typeof event.attributes.payload === "string",
20724
20760
  [event]
20725
20761
  );
20726
- (0, import_react56.useEffect)(() => {
20762
+ (0, import_react57.useEffect)(() => {
20727
20763
  const checkOverflow = () => {
20728
20764
  const element = textReference.current;
20729
20765
  if (element) {
@@ -20736,29 +20772,29 @@ var EventMessage = ({ event }) => {
20736
20772
  window.removeEventListener("resize", checkOverflow);
20737
20773
  };
20738
20774
  }, [parsedMessage.headline]);
20739
- const hasAdditionalContent = (0, import_react56.useMemo)(
20775
+ const hasAdditionalContent = (0, import_react57.useMemo)(
20740
20776
  () => parsedMessage.message || parsedMessage.details || isIAMPolicyEvent,
20741
20777
  [parsedMessage.message, parsedMessage.details, isIAMPolicyEvent]
20742
20778
  );
20743
- const shouldShowToggle = (0, import_react56.useMemo)(
20779
+ const shouldShowToggle = (0, import_react57.useMemo)(
20744
20780
  () => isOverflowing || hasAdditionalContent,
20745
20781
  [isOverflowing, hasAdditionalContent]
20746
20782
  );
20747
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
20748
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { sx: { alignItems: "center", display: "flex" }, children: [
20749
- Boolean(shouldShowToggle) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
20750
- import_material15.IconButton,
20783
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material16.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
20784
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material16.Box, { sx: { alignItems: "center", display: "flex" }, children: [
20785
+ Boolean(shouldShowToggle) && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
20786
+ import_material16.IconButton,
20751
20787
  {
20752
20788
  onClick: () => {
20753
20789
  setIsOpen(!isOpen);
20754
20790
  },
20755
20791
  size: "small",
20756
20792
  sx: { mr: 1, p: 0 },
20757
- children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material7.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material7.KeyboardArrowRight, { sx: { fontSize: 16 } })
20793
+ children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material8.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material8.KeyboardArrowRight, { sx: { fontSize: 16 } })
20758
20794
  }
20759
20795
  ),
20760
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
20761
- import_material15.Typography,
20796
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
20797
+ import_material16.Typography,
20762
20798
  {
20763
20799
  ref: textReference,
20764
20800
  sx: {
@@ -20775,12 +20811,12 @@ var EventMessage = ({ event }) => {
20775
20811
  }
20776
20812
  )
20777
20813
  ] }),
20778
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Box, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: isIAMPolicyEvent ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(IAMEventDetail, { event }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_jsx_runtime138.Fragment, { children: [
20779
- Boolean(parsedMessage.message) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(DetailRow2, { content: parsedMessage.message, label: "Message" }),
20780
- Boolean(parsedMessage.details) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
20814
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Box, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: isIAMPolicyEvent ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(IAMEventDetail, { event }) : /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_jsx_runtime139.Fragment, { children: [
20815
+ Boolean(parsedMessage.message) && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(DetailRow2, { content: parsedMessage.message, label: "Message" }),
20816
+ Boolean(parsedMessage.details) && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
20781
20817
  DetailRow2,
20782
20818
  {
20783
- content: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
20819
+ content: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
20784
20820
  label: "Details"
20785
20821
  }
20786
20822
  )
@@ -20813,15 +20849,15 @@ var EventDetail = ({
20813
20849
  type
20814
20850
  }) => {
20815
20851
  if (type === "permission") {
20816
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(IAMPermissionDetail, { events, spanStatusCode });
20852
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(IAMPermissionDetail, { events, spanStatusCode });
20817
20853
  }
20818
20854
  const eventLevel = getEventLevelFromGroup(type);
20819
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { children: [
20820
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
20821
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(StatusIcon2, { errorLevel: eventLevel }),
20822
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
20855
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material16.Box, { children: [
20856
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material16.Box, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
20857
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(StatusIcon2, { errorLevel: eventLevel }),
20858
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
20823
20859
  ] }),
20824
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Box, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
20860
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Box, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
20825
20861
  ] });
20826
20862
  };
20827
20863
 
@@ -30512,9 +30548,9 @@ var QueryStatus = {
30512
30548
  };
30513
30549
 
30514
30550
  // src/components/event-details/lambda-invoke-logs-section.tsx
30515
- var import_material16 = require("@mui/material");
30516
- var import_react57 = require("react");
30517
- var import_jsx_runtime139 = require("react/jsx-runtime");
30551
+ var import_material17 = require("@mui/material");
30552
+ var import_react58 = require("react");
30553
+ var import_jsx_runtime140 = require("react/jsx-runtime");
30518
30554
  var POLL_INTERVAL_MS = 1e3;
30519
30555
  async function pollQueryResults(client, queryId) {
30520
30556
  return client.send(new GetQueryResultsCommand({ queryId }));
@@ -30531,7 +30567,7 @@ async function startLambdaLogsQuery(client, functionName2, requestId, startTimeS
30531
30567
  }
30532
30568
  function useCloudWatchLogsClient(region) {
30533
30569
  const { localstackEndpoint } = useAppInspector();
30534
- const client = (0, import_react57.useMemo)(() => new CloudWatchLogsClient({
30570
+ const client = (0, import_react58.useMemo)(() => new CloudWatchLogsClient({
30535
30571
  credentials: {
30536
30572
  accessKeyId: "test",
30537
30573
  secretAccessKey: "test"
@@ -30542,12 +30578,12 @@ function useCloudWatchLogsClient(region) {
30542
30578
  return client;
30543
30579
  }
30544
30580
  function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano) {
30545
- const [loading, setLoading] = (0, import_react57.useState)(true);
30546
- const [logs, setLogs] = (0, import_react57.useState)([]);
30547
- const [error, setError] = (0, import_react57.useState)();
30548
- const pollTimerRef = (0, import_react57.useRef)(null);
30581
+ const [loading, setLoading] = (0, import_react58.useState)(true);
30582
+ const [logs, setLogs] = (0, import_react58.useState)([]);
30583
+ const [error, setError] = (0, import_react58.useState)();
30584
+ const pollTimerRef = (0, import_react58.useRef)(null);
30549
30585
  const cloudWatchLogs = useCloudWatchLogsClient(region);
30550
- (0, import_react57.useEffect)(() => {
30586
+ (0, import_react58.useEffect)(() => {
30551
30587
  let cancelled = false;
30552
30588
  const startTimeSec = Math.floor(Number(BigInt(startTimeNano) / BigInt(1e9)));
30553
30589
  const endTimeSec = Math.ceil(Number(BigInt(endTimeNano) / BigInt(1e9)));
@@ -30604,30 +30640,30 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
30604
30640
  var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, region, requestId, startTimeNano }) => {
30605
30641
  const { error, loading, logs } = useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano);
30606
30642
  if (loading) {
30607
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material16.Stack, { alignItems: "center", direction: "row", spacing: 1, children: [
30608
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.CircularProgress, { size: 14 }),
30609
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
30643
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Stack, { alignItems: "center", direction: "row", spacing: 1, children: [
30644
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.CircularProgress, { size: 14 }),
30645
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
30610
30646
  ] });
30611
30647
  }
30612
30648
  if (error !== void 0) {
30613
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { color: "error", variant: "body2", children: error.message });
30649
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { color: "error", variant: "body2", children: error.message });
30614
30650
  }
30615
30651
  if (logs.length === 0) {
30616
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
30652
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
30617
30653
  }
30618
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Box, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("pre", { style: { margin: 0, overflow: "auto" }, children: logs.map((log) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
30654
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Box, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("pre", { style: { margin: 0, overflow: "auto" }, children: logs.map((log) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
30619
30655
  };
30620
30656
 
30621
30657
  // src/components/event-details/toggle-section.tsx
30622
- var import_icons_material8 = require("@mui/icons-material");
30623
- var import_material17 = require("@mui/material");
30624
- var import_react58 = require("react");
30625
- var import_jsx_runtime140 = require("react/jsx-runtime");
30658
+ var import_icons_material9 = require("@mui/icons-material");
30659
+ var import_material18 = require("@mui/material");
30660
+ var import_react59 = require("react");
30661
+ var import_jsx_runtime141 = require("react/jsx-runtime");
30626
30662
  var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
30627
- const [isOpen, setIsOpen] = (0, import_react58.useState)(initialOpen);
30628
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { sx: { mt: 4 }, children: [
30629
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
30630
- import_material17.Box,
30663
+ const [isOpen, setIsOpen] = (0, import_react59.useState)(initialOpen);
30664
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { sx: { mt: 4 }, children: [
30665
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
30666
+ import_material18.Box,
30631
30667
  {
30632
30668
  onClick: () => {
30633
30669
  setIsOpen(!isOpen);
@@ -30640,8 +30676,8 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
30640
30676
  mb: 1
30641
30677
  },
30642
30678
  children: [
30643
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
30644
- import_material17.Box,
30679
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
30680
+ import_material18.Box,
30645
30681
  {
30646
30682
  role: "button",
30647
30683
  sx: {
@@ -30650,23 +30686,23 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
30650
30686
  gap: 1
30651
30687
  },
30652
30688
  children: [
30653
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
30654
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material8.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material8.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
30689
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
30690
+ isOpen ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material9.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material9.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
30655
30691
  ]
30656
30692
  }
30657
30693
  ),
30658
- action !== false && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Box, { onClick: (event) => {
30694
+ action !== false && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { onClick: (event) => {
30659
30695
  event.stopPropagation();
30660
30696
  }, children: action })
30661
30697
  ]
30662
30698
  }
30663
30699
  ),
30664
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Box, { children })
30700
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { children })
30665
30701
  ] });
30666
30702
  };
30667
30703
 
30668
30704
  // src/components/event-details/event-details.tsx
30669
- var import_jsx_runtime141 = require("react/jsx-runtime");
30705
+ var import_jsx_runtime142 = require("react/jsx-runtime");
30670
30706
  var checkIsLambdaInvoke = (span) => {
30671
30707
  if (span.service_name !== "lambda") {
30672
30708
  return false;
@@ -30681,13 +30717,13 @@ var checkIsSqsSendMessage = (span) => {
30681
30717
  return span.operation_name.startsWith("SendMessage");
30682
30718
  };
30683
30719
  var EventDetails = ({ onClose, selectedEvent }) => {
30684
- const eventGroups = (0, import_react59.useMemo)(
30720
+ const eventGroups = (0, import_react60.useMemo)(
30685
30721
  () => getEventGroupsByType(selectedEvent?.events ?? []),
30686
30722
  [selectedEvent?.events]
30687
30723
  );
30688
- const [parseNestedJson, setParseNestedJson] = (0, import_react59.useState)(true);
30724
+ const [parseNestedJson, setParseNestedJson] = (0, import_react60.useState)(true);
30689
30725
  if (!selectedEvent) {
30690
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { color: "text.secondary", variant: "body2", children: "Select an operation to view graph" }) });
30726
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { color: "text.secondary", variant: "body2", children: "Select an operation to view graph" }) });
30691
30727
  }
30692
30728
  const isLambdaInvoke = checkIsLambdaInvoke(selectedEvent);
30693
30729
  const isSqsSendMessage = checkIsSqsSendMessage(selectedEvent);
@@ -30710,9 +30746,9 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30710
30746
  const exceptionPayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.exception"]);
30711
30747
  const hasPayloads = requestPayload !== void 0 || responsePayload !== void 0 || exceptionPayload !== void 0 || isResponseSuppressed;
30712
30748
  const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
30713
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
30714
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
30715
- import_material18.Box,
30749
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
30750
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
30751
+ import_material19.Box,
30716
30752
  {
30717
30753
  sx: {
30718
30754
  alignItems: "center",
@@ -30724,64 +30760,91 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30724
30760
  py: 1
30725
30761
  },
30726
30762
  children: [
30727
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
30728
- onClose && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material9.Close, {}) })
30763
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
30764
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material10.Close, {}) })
30729
30765
  ]
30730
30766
  }
30731
30767
  ),
30732
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Stack, { spacing: 2, children: [
30733
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Stack, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
30734
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
30735
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30736
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
30737
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: getServiceDisplayName(selectedEvent.service_name) })
30768
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { spacing: 2, children: [
30769
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
30770
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
30771
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30772
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
30773
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30774
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: getServiceDisplayName(selectedEvent.service_name) }),
30775
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: getServiceDisplayName(selectedEvent.service_name) })
30776
+ ] })
30738
30777
  ] }),
30739
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30740
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Action" }),
30741
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name })
30778
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30779
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Action" }),
30780
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30781
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name }),
30782
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: selectedEvent.operation_name })
30783
+ ] })
30742
30784
  ] })
30743
30785
  ] }),
30744
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { sx: cfnResourceType ? { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" } : void 0, children: [
30745
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30746
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
30747
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, variant: "body2", children: selectedEvent.resource_name })
30786
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { sx: cfnResourceType ? { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" } : void 0, children: [
30787
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30788
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
30789
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30790
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { variant: "body2", children: selectedEvent.resource_name }),
30791
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: selectedEvent.resource_name })
30792
+ ] })
30748
30793
  ] }),
30749
- Boolean(cfnResourceType) && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30750
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource Type" }),
30751
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_CFN_RESOURCE_TYPE_TEST_ID, variant: "body2", children: cfnResourceType })
30794
+ Boolean(cfnResourceType) && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30795
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource Type" }),
30796
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30797
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_CFN_RESOURCE_TYPE_TEST_ID, variant: "body2", children: cfnResourceType }),
30798
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: cfnResourceType })
30799
+ ] })
30752
30800
  ] })
30753
30801
  ] }),
30754
- Boolean(resourceArn) && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30755
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
30756
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, variant: "body2", children: resourceArn })
30802
+ Boolean(resourceArn) && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30803
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
30804
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30805
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { variant: "body2", children: resourceArn }),
30806
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: resourceArn })
30807
+ ] })
30757
30808
  ] }),
30758
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
30759
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30760
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
30761
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id })
30809
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
30810
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30811
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
30812
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30813
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id }),
30814
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: selectedEvent.account_id })
30815
+ ] })
30762
30816
  ] }),
30763
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30764
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
30765
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region })
30817
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30818
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
30819
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30820
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region }),
30821
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: selectedEvent.region })
30822
+ ] })
30766
30823
  ] })
30767
30824
  ] }),
30768
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
30769
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30770
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
30771
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, variant: "body2", children: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
30825
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
30826
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30827
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
30828
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30829
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { variant: "body2", children: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() }),
30830
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
30831
+ ] })
30772
30832
  ] }),
30773
- duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30774
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
30775
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Typography, { "data-testid": EVENT_DETAILS_DURATION_TEST_ID, variant: "body2", children: [
30776
- duration,
30777
- "ms"
30833
+ duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30834
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
30835
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_DURATION_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30836
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Typography, { variant: "body2", children: [
30837
+ duration,
30838
+ "ms"
30839
+ ] }),
30840
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: `${duration}ms` })
30778
30841
  ] })
30779
30842
  ] })
30780
30843
  ] }),
30781
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30782
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
30783
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Stack, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
30784
- import_material18.Chip,
30844
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30845
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
30846
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Stack, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30847
+ import_material19.Chip,
30785
30848
  {
30786
30849
  color: selectedEvent.status_code === 2 ? "error" : selectedEvent.status_code === 1 ? "success" : "default",
30787
30850
  "data-testid": EVENT_DETAILS_STATUS_TEST_ID,
@@ -30791,50 +30854,50 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30791
30854
  ) })
30792
30855
  ] })
30793
30856
  ] }) }),
30794
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Divider, {}),
30795
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(ToggleSection, { headline: "Permissions", children: [
30796
- selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Alert, { "data-testid": EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID, severity: "warning", sx: { mb: 1 }, children: "IAM errors are suppressed \u2014 upgrade your license to view" }),
30797
- !selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
30798
- eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, spanStatusCode: selectedEvent.status_code, type: "permission" }),
30799
- eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
30800
- eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
30857
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Divider, {}),
30858
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(ToggleSection, { headline: "Permissions", children: [
30859
+ selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Alert, { "data-testid": EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID, severity: "warning", sx: { mb: 1 }, children: "IAM errors are suppressed \u2014 upgrade your license to view" }),
30860
+ !selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
30861
+ eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, spanStatusCode: selectedEvent.status_code, type: "permission" }),
30862
+ eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
30863
+ eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
30801
30864
  ] }),
30802
- hasPayloads && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
30803
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Divider, {}),
30804
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
30865
+ hasPayloads && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
30866
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Divider, {}),
30867
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30805
30868
  ToggleSection,
30806
30869
  {
30807
- action: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
30808
- import_material18.FormControlLabel,
30870
+ action: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30871
+ import_material19.FormControlLabel,
30809
30872
  {
30810
- control: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Switch, { checked: !parseNestedJson, onChange: (event) => {
30873
+ control: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Switch, { checked: !parseNestedJson, onChange: (event) => {
30811
30874
  setParseNestedJson(!event.target.checked);
30812
30875
  }, size: "small" }),
30813
- label: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { variant: "caption", children: "View raw data" }),
30876
+ label: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { variant: "caption", children: "View raw data" }),
30814
30877
  sx: { mr: 0 }
30815
30878
  }
30816
30879
  ),
30817
30880
  headline: "Payloads",
30818
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Stack, { spacing: 2, children: [
30819
- requestPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30820
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request" }),
30821
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
30881
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { spacing: 2, children: [
30882
+ requestPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30883
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Request" }),
30884
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
30822
30885
  ] }),
30823
- (responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30824
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Response" }),
30825
- isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { sx: { py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Alert, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
30886
+ (responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30887
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Response" }),
30888
+ isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Box, { sx: { py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Alert, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
30826
30889
  ] }),
30827
- exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30828
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Exception" }),
30829
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
30890
+ exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30891
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
30892
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
30830
30893
  ] })
30831
30894
  ] })
30832
30895
  }
30833
30896
  )
30834
30897
  ] }),
30835
- isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
30836
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Divider, {}),
30837
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
30898
+ isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
30899
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Divider, {}),
30900
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30838
30901
  LambdaInvokeLogsSection,
30839
30902
  {
30840
30903
  endTimeNano: selectedEvent.end_time_unix_nano ?? selectedEvent.start_time_unix_nano,
@@ -30845,21 +30908,30 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30845
30908
  }
30846
30909
  ) })
30847
30910
  ] }),
30848
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Divider, {}),
30849
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Stack, { spacing: 1, children: [
30850
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30851
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
30852
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id })
30911
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Divider, {}),
30912
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { spacing: 1, children: [
30913
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30914
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
30915
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30916
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id }),
30917
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: selectedEvent.span_id })
30918
+ ] })
30853
30919
  ] }),
30854
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30855
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
30856
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id })
30920
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30921
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
30922
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30923
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id }),
30924
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: selectedEvent.trace_id })
30925
+ ] })
30857
30926
  ] }),
30858
- requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
30859
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
30860
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId })
30927
+ requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Box, { children: [
30928
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
30929
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
30930
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId }),
30931
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(CopyButton, { value: requestId })
30932
+ ] })
30861
30933
  ] }),
30862
- eventGroups.info && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
30934
+ eventGroups.info && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
30863
30935
  ] }) })
30864
30936
  ] }) })
30865
30937
  ] });
@@ -30867,26 +30939,26 @@ var EventDetails = ({ onClose, selectedEvent }) => {
30867
30939
 
30868
30940
  // src/components/trace-graph/trace-graph.tsx
30869
30941
  var import_base = require("@xyflow/react/dist/base.css");
30870
- var import_material21 = require("@mui/material");
30871
- var import_react64 = require("@xyflow/react");
30872
- var import_react65 = require("react");
30942
+ var import_material22 = require("@mui/material");
30943
+ var import_react65 = require("@xyflow/react");
30944
+ var import_react66 = require("react");
30873
30945
 
30874
30946
  // src/components/trace-graph/service-node.tsx
30875
- var import_icons_material10 = require("@mui/icons-material");
30876
- var import_material19 = require("@mui/material");
30947
+ var import_icons_material11 = require("@mui/icons-material");
30948
+ var import_material20 = require("@mui/material");
30877
30949
  var import_style = require("@xyflow/react/dist/style.css");
30878
- var import_react60 = require("@xyflow/react");
30879
- var import_react61 = require("react");
30880
- var import_jsx_runtime142 = require("react/jsx-runtime");
30950
+ var import_react61 = require("@xyflow/react");
30951
+ var import_react62 = require("react");
30952
+ var import_jsx_runtime143 = require("react/jsx-runtime");
30881
30953
  var handleStyle = {
30882
30954
  backgroundColor: "white",
30883
30955
  borderColor: "lightgray",
30884
30956
  opacity: 0
30885
30957
  };
30886
- var ServiceNode = (0, import_react61.memo)(({ data, selected }) => {
30887
- const theme = (0, import_material19.useTheme)();
30958
+ var ServiceNode = (0, import_react62.memo)(({ data, selected }) => {
30959
+ const theme = (0, import_material20.useTheme)();
30888
30960
  const isError = data.event.status_code === 2;
30889
- const hasPermissionEvents = (0, import_react61.useMemo)(
30961
+ const hasPermissionEvents = (0, import_react62.useMemo)(
30890
30962
  () => data.event.events.some(
30891
30963
  (event) => event.event_type === "iam.policy_evaluation" && event.name === "iam.policy.denied"
30892
30964
  ),
@@ -30894,8 +30966,8 @@ var ServiceNode = (0, import_react61.memo)(({ data, selected }) => {
30894
30966
  );
30895
30967
  const isWarning = !isError && data.event.status_code === 1 && hasPermissionEvents;
30896
30968
  const outlineColor = isError ? theme.palette.error.main : isWarning ? theme.palette.warning.main : void 0;
30897
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
30898
- import_material19.Box,
30969
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
30970
+ import_material20.Box,
30899
30971
  {
30900
30972
  "data-testid": SERVICE_NODE_TEST_ID,
30901
30973
  role: "button",
@@ -30917,19 +30989,19 @@ var ServiceNode = (0, import_react61.memo)(({ data, selected }) => {
30917
30989
  },
30918
30990
  tabIndex: 0,
30919
30991
  children: [
30920
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react60.Handle, { position: import_react60.Position.Left, style: handleStyle, type: "target" }),
30921
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react60.Handle, { position: import_react60.Position.Right, style: handleStyle, type: "source" }),
30922
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
30923
- import_material19.Stack,
30992
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react61.Handle, { position: import_react61.Position.Left, style: handleStyle, type: "target" }),
30993
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react61.Handle, { position: import_react61.Position.Right, style: handleStyle, type: "source" }),
30994
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
30995
+ import_material20.Stack,
30924
30996
  {
30925
30997
  alignItems: "center",
30926
30998
  direction: "row",
30927
30999
  sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
30928
31000
  children: [
30929
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Box, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(AwsServiceIcon, { hideTooltip: true, service: data.event.service_name, size: "medium" }) }),
30930
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { sx: { minWidth: 0 }, children: [
30931
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30932
- import_material19.Typography,
31001
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Box, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(AwsServiceIcon, { hideTooltip: true, service: data.event.service_name, size: "medium" }) }),
31002
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_material20.Stack, { sx: { minWidth: 0 }, children: [
31003
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
31004
+ import_material20.Typography,
30933
31005
  {
30934
31006
  noWrap: true,
30935
31007
  sx: { fontWeight: 700, lineHeight: 1.25 },
@@ -30937,8 +31009,8 @@ var ServiceNode = (0, import_react61.memo)(({ data, selected }) => {
30937
31009
  children: getServiceDisplayName(data.event.service_name)
30938
31010
  }
30939
31011
  ),
30940
- data.event.resource_name != "" && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30941
- import_material19.Typography,
31012
+ data.event.resource_name != "" && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
31013
+ import_material20.Typography,
30942
31014
  {
30943
31015
  color: "text.secondary",
30944
31016
  noWrap: true,
@@ -30951,16 +31023,16 @@ var ServiceNode = (0, import_react61.memo)(({ data, selected }) => {
30951
31023
  ]
30952
31024
  }
30953
31025
  ),
30954
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Divider, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
30955
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
30956
- import_material19.Stack,
31026
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Divider, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
31027
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
31028
+ import_material20.Stack,
30957
31029
  {
30958
31030
  alignItems: "center",
30959
31031
  direction: "row",
30960
31032
  sx: { minWidth: 0, pb: "5px", pr: "8px", pt: "1px" },
30961
31033
  children: [
30962
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
30963
- import_material19.Box,
31034
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
31035
+ import_material20.Box,
30964
31036
  {
30965
31037
  sx: {
30966
31038
  alignItems: "center",
@@ -30970,13 +31042,13 @@ var ServiceNode = (0, import_react61.memo)(({ data, selected }) => {
30970
31042
  width: "38px"
30971
31043
  },
30972
31044
  children: [
30973
- (isError || isWarning) && hasPermissionEvents && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Tooltip, { arrow: true, title: "Permission denied", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material10.GppBad, { sx: { color: isError ? theme.palette.error.main : theme.palette.warning.main, fontSize: "16px" } }) }),
30974
- isError && !hasPermissionEvents && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Tooltip, { arrow: true, title: "Error", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material10.Cancel, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) })
31045
+ (isError || isWarning) && hasPermissionEvents && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Tooltip, { arrow: true, title: "Permission denied", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material11.GppBad, { sx: { color: isError ? theme.palette.error.main : theme.palette.warning.main, fontSize: "16px" } }) }),
31046
+ isError && !hasPermissionEvents && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Tooltip, { arrow: true, title: "Error", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material11.Cancel, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) })
30975
31047
  ]
30976
31048
  }
30977
31049
  ),
30978
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30979
- import_material19.Typography,
31050
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
31051
+ import_material20.Typography,
30980
31052
  {
30981
31053
  "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
30982
31054
  noWrap: true,
@@ -31048,20 +31120,20 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
31048
31120
  };
31049
31121
 
31050
31122
  // src/components/trace-graph/xyflow/controls.tsx
31051
- var import_icons_material11 = require("@mui/icons-material");
31052
- var import_material20 = require("@mui/material");
31053
- var import_react62 = require("@xyflow/react");
31054
- var import_react63 = require("react");
31123
+ var import_icons_material12 = require("@mui/icons-material");
31124
+ var import_material21 = require("@mui/material");
31125
+ var import_react63 = require("@xyflow/react");
31126
+ var import_react64 = require("react");
31055
31127
  var import_shallow = require("zustand/shallow");
31056
- var import_jsx_runtime143 = require("react/jsx-runtime");
31128
+ var import_jsx_runtime144 = require("react/jsx-runtime");
31057
31129
  var selector = (s2) => ({
31058
31130
  isInteractive: s2.nodesDraggable || s2.nodesConnectable || s2.elementsSelectable,
31059
31131
  maxZoomReached: s2.transform[2] >= s2.maxZoom,
31060
31132
  minZoomReached: s2.transform[2] <= s2.minZoom
31061
31133
  });
31062
- var Controls = (0, import_react63.memo)(() => {
31063
- const { maxZoomReached, minZoomReached } = (0, import_react62.useStore)(selector, import_shallow.shallow);
31064
- const { fitView, zoomIn, zoomOut } = (0, import_react62.useReactFlow)();
31134
+ var Controls = (0, import_react64.memo)(() => {
31135
+ const { maxZoomReached, minZoomReached } = (0, import_react63.useStore)(selector, import_shallow.shallow);
31136
+ const { fitView, zoomIn, zoomOut } = (0, import_react63.useReactFlow)();
31065
31137
  const onZoomInHandler = () => {
31066
31138
  void zoomIn();
31067
31139
  };
@@ -31071,8 +31143,8 @@ var Controls = (0, import_react63.memo)(() => {
31071
31143
  const onFitViewHandler = () => {
31072
31144
  void fitView();
31073
31145
  };
31074
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
31075
- import_material20.Box,
31146
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
31147
+ import_material21.Box,
31076
31148
  {
31077
31149
  sx: {
31078
31150
  bottom: 0,
@@ -31085,33 +31157,33 @@ var Controls = (0, import_react63.memo)(() => {
31085
31157
  zIndex: 5
31086
31158
  },
31087
31159
  children: [
31088
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
31089
- import_material20.IconButton,
31160
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
31161
+ import_material21.IconButton,
31090
31162
  {
31091
31163
  className: "react-flow__controls-zoomin",
31092
31164
  disabled: maxZoomReached,
31093
31165
  onClick: onZoomInHandler,
31094
31166
  size: "small",
31095
- children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material11.Add, {})
31167
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material12.Add, {})
31096
31168
  }
31097
31169
  ),
31098
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
31099
- import_material20.IconButton,
31170
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
31171
+ import_material21.IconButton,
31100
31172
  {
31101
31173
  className: "react-flow__controls-zoomout",
31102
31174
  disabled: minZoomReached,
31103
31175
  onClick: onZoomOutHandler,
31104
31176
  size: "small",
31105
- children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material11.Remove, {})
31177
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material12.Remove, {})
31106
31178
  }
31107
31179
  ),
31108
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
31109
- import_material20.IconButton,
31180
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
31181
+ import_material21.IconButton,
31110
31182
  {
31111
31183
  className: "react-flow__controls-fitview",
31112
31184
  onClick: onFitViewHandler,
31113
31185
  size: "small",
31114
- children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material11.FitScreen, {})
31186
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material12.FitScreen, {})
31115
31187
  }
31116
31188
  )
31117
31189
  ]
@@ -31120,7 +31192,7 @@ var Controls = (0, import_react63.memo)(() => {
31120
31192
  });
31121
31193
 
31122
31194
  // src/components/trace-graph/trace-graph.tsx
31123
- var import_jsx_runtime144 = require("react/jsx-runtime");
31195
+ var import_jsx_runtime145 = require("react/jsx-runtime");
31124
31196
  var nodeTypes = {
31125
31197
  service: ServiceNode
31126
31198
  };
@@ -31130,9 +31202,9 @@ var TraceGraph = ({
31130
31202
  onRefresh,
31131
31203
  spans
31132
31204
  }) => {
31133
- const [nodes, setNodes, onNodesChange] = (0, import_react64.useNodesState)([]);
31134
- const [edges, setEdges] = (0, import_react64.useEdgesState)([]);
31135
- (0, import_react65.useEffect)(() => {
31205
+ const [nodes, setNodes, onNodesChange] = (0, import_react65.useNodesState)([]);
31206
+ const [edges, setEdges] = (0, import_react65.useEdgesState)([]);
31207
+ (0, import_react66.useEffect)(() => {
31136
31208
  const allNodes = [];
31137
31209
  const allEdges = [];
31138
31210
  for (const span of spans.data ?? []) {
@@ -31147,15 +31219,15 @@ var TraceGraph = ({
31147
31219
  },
31148
31220
  id: span.span_id,
31149
31221
  position: { x: 0, y: 0 },
31150
- sourcePosition: import_react64.Position.Right,
31151
- targetPosition: import_react64.Position.Left,
31222
+ sourcePosition: import_react65.Position.Right,
31223
+ targetPosition: import_react65.Position.Left,
31152
31224
  type: "service"
31153
31225
  });
31154
31226
  if (span.parent_span_id !== null) {
31155
31227
  allEdges.push({
31156
31228
  animated: false,
31157
31229
  id: `e-${span.parent_span_id}-${span.span_id}`,
31158
- markerEnd: { color: "lightgray", height: 16, type: import_react64.MarkerType.Arrow, width: 16 },
31230
+ markerEnd: { color: "lightgray", height: 16, type: import_react65.MarkerType.Arrow, width: 16 },
31159
31231
  source: span.parent_span_id,
31160
31232
  style: { stroke: "lightgray", strokeWidth: 1 },
31161
31233
  target: span.span_id
@@ -31164,7 +31236,7 @@ var TraceGraph = ({
31164
31236
  for (const outgoingLinkSpanId of span.outgoing_link_span_ids ?? []) {
31165
31237
  allEdges.push({
31166
31238
  id: `e-link-${outgoingLinkSpanId}-${span.span_id}`,
31167
- markerEnd: { color: "lightgray", height: 16, type: import_react64.MarkerType.Arrow, width: 16 },
31239
+ markerEnd: { color: "lightgray", height: 16, type: import_react65.MarkerType.Arrow, width: 16 },
31168
31240
  source: outgoingLinkSpanId,
31169
31241
  style: { stroke: "lightgray", strokeWidth: 1 },
31170
31242
  // animated: true,
@@ -31182,12 +31254,12 @@ var TraceGraph = ({
31182
31254
  setNodes(layoutedNodes);
31183
31255
  setEdges(layoutedEdges);
31184
31256
  }, [spans.data, initialFocusEventId, setNodes, setEdges]);
31185
- const theme = (0, import_material21.useTheme)();
31186
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
31187
- spans.error && /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
31188
- import_material21.Alert,
31257
+ const theme = (0, import_material22.useTheme)();
31258
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
31259
+ spans.error && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
31260
+ import_material22.Alert,
31189
31261
  {
31190
- action: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material21.Button, { onClick: () => {
31262
+ action: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material22.Button, { onClick: () => {
31191
31263
  onRefresh();
31192
31264
  }, children: "Retry" }),
31193
31265
  severity: "error",
@@ -31198,8 +31270,8 @@ var TraceGraph = ({
31198
31270
  ]
31199
31271
  }
31200
31272
  ),
31201
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
31202
- import_react64.ReactFlow,
31273
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
31274
+ import_react65.ReactFlow,
31203
31275
  {
31204
31276
  "data-testid": TRACE_GRAPH_TEST_ID,
31205
31277
  edges,
@@ -31216,9 +31288,9 @@ var TraceGraph = ({
31216
31288
  onNodesChange,
31217
31289
  selectNodesOnDrag: false,
31218
31290
  children: [
31219
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Controls, {}),
31220
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
31221
- import_react64.Background,
31291
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Controls, {}),
31292
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31293
+ import_react65.Background,
31222
31294
  {
31223
31295
  bgColor: theme.palette.background.default,
31224
31296
  color: theme.palette.text.disabled
@@ -31231,7 +31303,7 @@ var TraceGraph = ({
31231
31303
  };
31232
31304
 
31233
31305
  // src/pages/trace-graph-page.tsx
31234
- var import_jsx_runtime145 = require("react/jsx-runtime");
31306
+ var import_jsx_runtime146 = require("react/jsx-runtime");
31235
31307
  var HEADER_HEIGHT = 56;
31236
31308
  var DRAWER_WIDTH = "35%";
31237
31309
  var Main = (0, import_styles.styled)("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
@@ -31249,7 +31321,7 @@ var Main = (0, import_styles.styled)("main", { shouldForwardProp: (property) =>
31249
31321
  })
31250
31322
  }
31251
31323
  }));
31252
- var StyledDrawer = (0, import_styles.styled)(import_material22.Drawer)(() => ({
31324
+ var StyledDrawer = (0, import_styles.styled)(import_material23.Drawer)(() => ({
31253
31325
  "& .MuiDrawer-paper": {
31254
31326
  bottom: 0,
31255
31327
  boxSizing: "border-box",
@@ -31280,8 +31352,8 @@ var TraceGraphView = ({
31280
31352
  traceId
31281
31353
  }) => {
31282
31354
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
31283
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
31284
- import_material22.Box,
31355
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
31356
+ import_material23.Box,
31285
31357
  {
31286
31358
  "data-testid": TRACE_GRAPH_PAGE_TEST_ID,
31287
31359
  sx: {
@@ -31293,14 +31365,14 @@ var TraceGraphView = ({
31293
31365
  overflow: "hidden"
31294
31366
  },
31295
31367
  children: [
31296
- /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material22.Box, { sx: { display: "flex", width: "100%" }, children: [
31297
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material22.Button, { onClick: () => {
31368
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_material23.Box, { sx: { display: "flex", width: "100%" }, children: [
31369
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material23.Button, { onClick: () => {
31298
31370
  navigateToSpansList();
31299
- }, startIcon: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_icons_material12.ArrowBack, {}), children: "Go back" }),
31300
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material22.Box, { sx: { flexGrow: 1 } })
31371
+ }, startIcon: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_icons_material13.ArrowBack, {}), children: "Go back" }),
31372
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material23.Box, { sx: { flexGrow: 1 } })
31301
31373
  ] }),
31302
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31303
- import_material22.Paper,
31374
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31375
+ import_material23.Paper,
31304
31376
  {
31305
31377
  sx: {
31306
31378
  display: "flex",
@@ -31309,7 +31381,7 @@ var TraceGraphView = ({
31309
31381
  position: "relative",
31310
31382
  width: "100%"
31311
31383
  },
31312
- children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31384
+ children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31313
31385
  StatusMessage,
31314
31386
  {
31315
31387
  error: statusError,
@@ -31317,15 +31389,15 @@ var TraceGraphView = ({
31317
31389
  onRetry: handleRetry,
31318
31390
  status
31319
31391
  }
31320
- ) : /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
31321
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31322
- import_material22.Box,
31392
+ ) : /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, { children: [
31393
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31394
+ import_material23.Box,
31323
31395
  {
31324
31396
  sx: {
31325
31397
  height: "100%",
31326
31398
  overflow: "auto"
31327
31399
  },
31328
- children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react66.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31400
+ children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_react67.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31329
31401
  TraceGraph,
31330
31402
  {
31331
31403
  initialFocusEventId: spanId,
@@ -31342,7 +31414,7 @@ var TraceGraphView = ({
31342
31414
  ) })
31343
31415
  }
31344
31416
  ) }),
31345
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
31417
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
31346
31418
  ] })
31347
31419
  }
31348
31420
  )
@@ -31386,10 +31458,10 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
31386
31458
  }
31387
31459
  var TraceGraphPage = ({ onClose, spanId, traceId }) => {
31388
31460
  const api = useAppInspectorApi();
31389
- const [spans, setSpans] = (0, import_react67.useState)();
31390
- const [loading, setLoading] = (0, import_react67.useState)(false);
31391
- const [fetchError, setFetchError] = (0, import_react67.useState)();
31392
- const fetchSpans = (0, import_react67.useCallback)(async () => {
31461
+ const [spans, setSpans] = (0, import_react68.useState)();
31462
+ const [loading, setLoading] = (0, import_react68.useState)(false);
31463
+ const [fetchError, setFetchError] = (0, import_react68.useState)();
31464
+ const fetchSpans = (0, import_react68.useCallback)(async () => {
31393
31465
  setLoading(true);
31394
31466
  try {
31395
31467
  const spans2 = await fetchConnectedTraces(api, [traceId]);
@@ -31402,40 +31474,40 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
31402
31474
  setLoading(false);
31403
31475
  }
31404
31476
  }, [api, traceId]);
31405
- (0, import_react67.useEffect)(() => {
31477
+ (0, import_react68.useEffect)(() => {
31406
31478
  void fetchSpans();
31407
31479
  }, [fetchSpans]);
31408
- const [open, setOpen] = (0, import_react67.useState)(true);
31409
- const [selectedEvent, setSelectedEvent] = (0, import_react67.useState)(() => spans?.find((span) => span.span_id === spanId));
31410
- const spansReference = (0, import_react67.useRef)();
31411
- (0, import_react67.useEffect)(() => {
31480
+ const [open, setOpen] = (0, import_react68.useState)(true);
31481
+ const [selectedEvent, setSelectedEvent] = (0, import_react68.useState)(() => spans?.find((span) => span.span_id === spanId));
31482
+ const spansReference = (0, import_react68.useRef)();
31483
+ (0, import_react68.useEffect)(() => {
31412
31484
  if (!spansReference.current && spans) {
31413
31485
  setSelectedEvent(spans.find((span) => span.span_id === spanId));
31414
31486
  spansReference.current = spans;
31415
31487
  }
31416
31488
  }, [spans, setSelectedEvent, spanId]);
31417
31489
  const { checkStatus, reportDisabled, status, statusError } = useAppInspectorStatus();
31418
- (0, import_react67.useEffect)(() => {
31490
+ (0, import_react68.useEffect)(() => {
31419
31491
  if (fetchError instanceof AppInspectorDisabledError || fetchError instanceof ConnectionError) {
31420
31492
  reportDisabled();
31421
31493
  }
31422
31494
  }, [fetchError, reportDisabled]);
31423
- const handleEnable = (0, import_react67.useCallback)(async () => {
31495
+ const handleEnable = (0, import_react68.useCallback)(async () => {
31424
31496
  await api.setStatus({ status: "ENABLED" });
31425
31497
  void checkStatus();
31426
31498
  }, [api, checkStatus]);
31427
- const handleEventSelect = (0, import_react67.useCallback)((spanId2) => {
31499
+ const handleEventSelect = (0, import_react68.useCallback)((spanId2) => {
31428
31500
  const span = spans?.find((s2) => s2.span_id === spanId2);
31429
31501
  setSelectedEvent(span);
31430
31502
  setOpen(true);
31431
31503
  }, [spans]);
31432
- const handleRetry = (0, import_react67.useCallback)(() => {
31504
+ const handleRetry = (0, import_react68.useCallback)(() => {
31433
31505
  void checkStatus();
31434
31506
  }, [checkStatus]);
31435
- const navigateToSpansList = (0, import_react67.useCallback)(() => {
31507
+ const navigateToSpansList = (0, import_react68.useCallback)(() => {
31436
31508
  onClose?.();
31437
31509
  }, [onClose]);
31438
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31510
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31439
31511
  TraceGraphView,
31440
31512
  {
31441
31513
  fetchError,
@@ -31460,7 +31532,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
31460
31532
  };
31461
31533
 
31462
31534
  // src/pages/spans-list-page.tsx
31463
- var import_jsx_runtime146 = require("react/jsx-runtime");
31535
+ var import_jsx_runtime147 = require("react/jsx-runtime");
31464
31536
  var SpansListPage = () => {
31465
31537
  const api = useAppInspectorApi();
31466
31538
  const {
@@ -31484,32 +31556,32 @@ var SpansListPage = () => {
31484
31556
  warningCount
31485
31557
  } = useSpans();
31486
31558
  const { checking, checkStatus, status, statusError } = useAppInspectorStatus();
31487
- const clearSpansSync = (0, import_react68.useCallback)(() => {
31559
+ const clearSpansSync = (0, import_react69.useCallback)(() => {
31488
31560
  void clearSpans();
31489
31561
  }, [clearSpans]);
31490
31562
  const localstackVersion = status?.localstackVersion ?? (statusError instanceof AppInspectorNotFoundError ? statusError.localstackVersion : void 0);
31491
31563
  const versionCompatibility = checkEmulatorVersion(localstackVersion);
31492
- const [bannerDismissed, setBannerDismissed] = (0, import_react68.useState)(false);
31564
+ const [bannerDismissed, setBannerDismissed] = (0, import_react69.useState)(false);
31493
31565
  const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
31494
- const [selectedTraceId, setSelectedTraceId] = (0, import_react68.useState)();
31495
- const [selectedSpanId, setSelectedSpanId] = (0, import_react68.useState)();
31496
- const navigateToSpan = (0, import_react68.useCallback)((span) => {
31566
+ const [selectedTraceId, setSelectedTraceId] = (0, import_react69.useState)();
31567
+ const [selectedSpanId, setSelectedSpanId] = (0, import_react69.useState)();
31568
+ const navigateToSpan = (0, import_react69.useCallback)((span) => {
31497
31569
  setSelectedTraceId(span.trace_id);
31498
31570
  setSelectedSpanId(span.span_id);
31499
31571
  }, []);
31500
- const handleRetry = (0, import_react68.useCallback)(() => {
31572
+ const handleRetry = (0, import_react69.useCallback)(() => {
31501
31573
  void checkStatus();
31502
31574
  fetchForward();
31503
31575
  }, [checkStatus, fetchForward]);
31504
- const handleEnable = (0, import_react68.useCallback)(async () => {
31576
+ const handleEnable = (0, import_react69.useCallback)(async () => {
31505
31577
  await api.setStatus({ status: "ENABLED" });
31506
31578
  clearFetchError();
31507
31579
  void checkStatus();
31508
31580
  }, [api, checkStatus, clearFetchError]);
31509
- const isDelayedRefetchRef = (0, import_react68.useRef)(false);
31510
- const delayedRefetchTimerRef = (0, import_react68.useRef)();
31511
- const prevFetchingForwardRef = (0, import_react68.useRef)(false);
31512
- (0, import_react68.useEffect)(() => {
31581
+ const isDelayedRefetchRef = (0, import_react69.useRef)(false);
31582
+ const delayedRefetchTimerRef = (0, import_react69.useRef)();
31583
+ const prevFetchingForwardRef = (0, import_react69.useRef)(false);
31584
+ (0, import_react69.useEffect)(() => {
31513
31585
  const wasFetching = prevFetchingForwardRef.current;
31514
31586
  prevFetchingForwardRef.current = fetchingForward;
31515
31587
  if (wasFetching && !fetchingForward) {
@@ -31529,7 +31601,7 @@ var SpansListPage = () => {
31529
31601
  }, [fetchingForward, fetchForward]);
31530
31602
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
31531
31603
  if (versionCompatibility === "below-minimum") {
31532
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31604
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
31533
31605
  StatusMessage,
31534
31606
  {
31535
31607
  localstackVersion,
@@ -31538,7 +31610,7 @@ var SpansListPage = () => {
31538
31610
  );
31539
31611
  }
31540
31612
  if (shouldShowStatusMessage) {
31541
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31613
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
31542
31614
  StatusMessage,
31543
31615
  {
31544
31616
  error: statusError,
@@ -31549,9 +31621,9 @@ var SpansListPage = () => {
31549
31621
  }
31550
31622
  );
31551
31623
  }
31552
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, { children: [
31553
- /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
31554
- import_material23.Box,
31624
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, { children: [
31625
+ /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
31626
+ import_material24.Box,
31555
31627
  {
31556
31628
  "data-testid": SPANS_LIST_PAGE_TEST_ID,
31557
31629
  sx: {
@@ -31566,7 +31638,7 @@ var SpansListPage = () => {
31566
31638
  width: "100%"
31567
31639
  },
31568
31640
  children: [
31569
- !checking && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31641
+ !checking && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
31570
31642
  EmulatorVersionBanner,
31571
31643
  {
31572
31644
  compatibility: bannerDismissed && versionCompatibility === "warning" ? "ok" : versionCompatibility,
@@ -31576,7 +31648,7 @@ var SpansListPage = () => {
31576
31648
  } : void 0
31577
31649
  }
31578
31650
  ),
31579
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31651
+ /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
31580
31652
  SpansList,
31581
31653
  {
31582
31654
  clearingSpans,
@@ -31604,7 +31676,7 @@ var SpansListPage = () => {
31604
31676
  ]
31605
31677
  }
31606
31678
  ),
31607
- selectedTraceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(TraceGraphPage, { onClose: () => {
31679
+ selectedTraceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(TraceGraphPage, { onClose: () => {
31608
31680
  setSelectedTraceId(void 0);
31609
31681
  }, spanId: selectedSpanId, traceId: selectedTraceId })
31610
31682
  ] });