@localstack/appinspector-ui 1.0.157 → 1.0.159

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
@@ -2425,8 +2425,8 @@ __export(index_exports, {
2425
2425
  module.exports = __toCommonJS(index_exports);
2426
2426
 
2427
2427
  // src/pages/spans-list-page.tsx
2428
- var import_material24 = require("@mui/material");
2429
- var import_react65 = require("react");
2428
+ var import_material25 = require("@mui/material");
2429
+ var import_react66 = require("react");
2430
2430
 
2431
2431
  // src/api/errors.ts
2432
2432
  var AppInspectorDisabledError = class extends Error {
@@ -2511,6 +2511,10 @@ var SERVICE_NODE_TEST_ID = "service-node";
2511
2511
  var SERVICE_NODE_SERVICE_NAME_TEST_ID = "service-node-service-name";
2512
2512
  var SERVICE_NODE_OPERATION_NAME_TEST_ID = "service-node-operation-name";
2513
2513
  var EMULATOR_VERSION_BANNER_TEST_ID = "emulator-version-banner";
2514
+ var SPANS_FILTER_PRODUCER_TEST_ID = "spans-filter-producer";
2515
+ var SPANS_FILTER_CONSUMER_TEST_ID = "spans-filter-consumer";
2516
+ var SPANS_FILTER_STATUS_TEST_ID = "spans-filter-status";
2517
+ var SPANS_FILTER_NO_MATCH_TEST_ID = "spans-filter-no-match";
2514
2518
 
2515
2519
  // src/utils/emulator-version.ts
2516
2520
  var import_semver = __toESM(require_semver2(), 1);
@@ -2598,11 +2602,11 @@ var EmulatorVersionBanner = ({
2598
2602
  };
2599
2603
 
2600
2604
  // src/components/spans-list/spans-list.tsx
2601
- var import_material7 = require("@mui/material");
2605
+ var import_material8 = require("@mui/material");
2602
2606
 
2603
2607
  // src/components/spans-list/spans-data-grid.tsx
2604
- var import_icons_material3 = require("@mui/icons-material");
2605
- var import_material6 = require("@mui/material");
2608
+ var import_icons_material4 = require("@mui/icons-material");
2609
+ var import_material7 = require("@mui/material");
2606
2610
 
2607
2611
  // node_modules/.pnpm/@tanstack+react-table@8.21.3_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@tanstack/react-table/build/lib/index.mjs
2608
2612
  var React = __toESM(require("react"), 1);
@@ -13059,7 +13063,7 @@ var motion = /* @__PURE__ */ createMotionProxy(function(Component, config) {
13059
13063
  });
13060
13064
 
13061
13065
  // src/components/spans-list/spans-data-grid.tsx
13062
- var import_react37 = require("react");
13066
+ var import_react38 = require("react");
13063
13067
 
13064
13068
  // src/components/cells/responsive-timestamp-cell.tsx
13065
13069
  var import_react31 = require("react");
@@ -13069,9 +13073,21 @@ var ResponsiveTimestampCell = (0, import_react31.memo)(({ date }) => {
13069
13073
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { width: "100%" }, children: formattedTime });
13070
13074
  });
13071
13075
 
13072
- // src/components/cells/service-cell.tsx
13073
- var import_material3 = require("@mui/material");
13074
- var import_react35 = require("react");
13076
+ // src/types/error-levels.ts
13077
+ var ErrorLevel = {
13078
+ ERROR: 3,
13079
+ // General error
13080
+ IAM_PERMISSION: 5,
13081
+ // IAM permission issues
13082
+ OK: 2,
13083
+ // OK
13084
+ // Standard OTEL status codes
13085
+ UNSET: 1,
13086
+ // Unset
13087
+ // Extended custom levels
13088
+ WARNING: 4
13089
+ // Warning
13090
+ };
13075
13091
 
13076
13092
  // src/utils/service-display-name.ts
13077
13093
  var SERVICE_DISPLAY_NAME = {
@@ -13205,6 +13221,10 @@ var getServiceDisplayName = (code) => {
13205
13221
  return SERVICE_DISPLAY_NAME[code] ?? code;
13206
13222
  };
13207
13223
 
13224
+ // src/components/cells/service-cell.tsx
13225
+ var import_material3 = require("@mui/material");
13226
+ var import_react35 = require("react");
13227
+
13208
13228
  // src/components/aws-service-icon/aws-service-icon.tsx
13209
13229
  var import_material2 = require("@mui/material");
13210
13230
  var import_react34 = require("react");
@@ -15181,22 +15201,6 @@ ServiceCell.displayName = "ServiceCell";
15181
15201
  var import_icons_material = require("@mui/icons-material");
15182
15202
  var import_material4 = require("@mui/material");
15183
15203
 
15184
- // src/types/error-levels.ts
15185
- var ErrorLevel = {
15186
- ERROR: 3,
15187
- // General error
15188
- IAM_PERMISSION: 5,
15189
- // IAM permission issues
15190
- OK: 2,
15191
- // OK
15192
- // Standard OTEL status codes
15193
- UNSET: 1,
15194
- // Unset
15195
- // Extended custom levels
15196
- WARNING: 4
15197
- // Warning
15198
- };
15199
-
15200
15204
  // src/utils/iam-utils.ts
15201
15205
  function determinePermissionStatus(payload) {
15202
15206
  if (payload.explicit_deny_count && payload.explicit_deny_count > 0) {
@@ -15386,7 +15390,7 @@ var StatRow = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime125.js
15386
15390
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { color: "text.secondary", sx: { mr: 4 }, variant: "caption", children: label }),
15387
15391
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { fontWeight: 600, variant: "body2", children: fmtLimit(value) })
15388
15392
  ] });
15389
- var SpanCountBadge = ({ licenseLimit, searchActive = false, systemLimit, totalCount, visibleCount }) => {
15393
+ var SpanCountBadge = ({ licenseLimit, systemLimit, totalCount, visibleCount }) => {
15390
15394
  const [anchorElement, setAnchorElement] = (0, import_react36.useState)();
15391
15395
  const bindingLimit = resolveBindingLimit(systemLimit, licenseLimit);
15392
15396
  if (totalCount === void 0 && bindingLimit === void 0) {
@@ -15401,7 +15405,7 @@ var SpanCountBadge = ({ licenseLimit, searchActive = false, systemLimit, totalCo
15401
15405
  isLoading ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Skeleton, { sx: { minWidth: 120 } }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material5.Box, { sx: { alignItems: "baseline", display: "flex", gap: 0.5 }, children: [
15402
15406
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { color: "text.secondary", variant: "caption", children: "Showing" }),
15403
15407
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { variant: "body2", children: visibleCount === void 0 ? "\u2014" : fmt(visibleCount) }),
15404
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { color: "text.secondary", variant: "caption", children: `of ${totalCount === void 0 ? "-" : fmt(totalCount)} ${searchActive ? "matches" : "operations"}` })
15408
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { color: "text.secondary", variant: "caption", children: "operations" })
15405
15409
  ] }),
15406
15410
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Tooltip, { title: "Operation count details", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
15407
15411
  import_material5.IconButton,
@@ -15429,22 +15433,13 @@ var SpanCountBadge = ({ licenseLimit, searchActive = false, systemLimit, totalCo
15429
15433
  children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material5.Box, { sx: { minWidth: 240, p: 2 }, children: [
15430
15434
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { fontWeight: 700, variant: "body2", children: "Storage" }),
15431
15435
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { color: "text.secondary", sx: { mt: 0.25 }, variant: "caption", children: "How many operations are currently stored." }),
15432
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material5.Box, { sx: { display: "flex", flexDirection: "column", gap: 0.75, mt: 1.5 }, children: [
15433
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
15434
- StatRow,
15435
- {
15436
- label: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Tooltip, { placement: "left", title: "The number of operations currently loaded in the UI.", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Box, { component: "span", sx: { borderBottom: "1px dashed", borderColor: "text.secondary", cursor: "help" }, children: "Currently visible" }) }),
15437
- value: visibleCount
15438
- }
15439
- ),
15440
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
15441
- StatRow,
15442
- {
15443
- label: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Tooltip, { placement: "left", title: searchActive ? "The total number of operations matching the search." : "The total number of operations stored on the server.", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Box, { component: "span", sx: { borderBottom: "1px dashed", borderColor: "text.secondary", cursor: "help" }, children: searchActive ? "Total matches" : "Total stored" }) }),
15444
- value: totalCount
15445
- }
15446
- )
15447
- ] }),
15436
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Box, { sx: { display: "flex", flexDirection: "column", gap: 0.75, mt: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
15437
+ StatRow,
15438
+ {
15439
+ label: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Tooltip, { placement: "left", title: "The number of operations currently loaded in the UI.", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Box, { component: "span", sx: { borderBottom: "1px dashed", borderColor: "text.secondary", cursor: "help" }, children: "Currently visible" }) }),
15440
+ value: visibleCount
15441
+ }
15442
+ ) }),
15448
15443
  (systemLimitReached || licenseLimit !== void 0 && licenseLimit !== "unlimited") && /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, { children: [
15449
15444
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Divider, { sx: { my: 1.5 } }),
15450
15445
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { color: "text.secondary", fontWeight: 600, variant: "caption", children: "Limits" }),
@@ -15497,8 +15492,229 @@ var SpanCountBadge = ({ licenseLimit, searchActive = false, systemLimit, totalCo
15497
15492
  ] });
15498
15493
  };
15499
15494
 
15500
- // src/components/spans-list/spans-data-grid.tsx
15495
+ // src/components/spans-list/spans-filter-bar.tsx
15496
+ var import_icons_material3 = require("@mui/icons-material");
15497
+ var import_material6 = require("@mui/material");
15498
+ var import_react37 = require("react");
15501
15499
  var import_jsx_runtime126 = require("react/jsx-runtime");
15500
+ var EMPTY_FILTERS = {
15501
+ consumerService: [],
15502
+ producerService: [],
15503
+ status: []
15504
+ };
15505
+ var EXTERNAL_PRODUCER_VALUE = "__external__";
15506
+ function applyFilters(spans, filters) {
15507
+ if (isFiltersEmpty(filters)) return spans;
15508
+ return spans.filter((span) => {
15509
+ if (filters.consumerService.length > 0 && !filters.consumerService.includes(span.service_name)) {
15510
+ return false;
15511
+ }
15512
+ if (filters.producerService.length > 0) {
15513
+ const includesExternal = filters.producerService.includes(EXTERNAL_PRODUCER_VALUE);
15514
+ const namedServices = filters.producerService.filter((value) => value !== EXTERNAL_PRODUCER_VALUE);
15515
+ const matchesExternal = includesExternal && !span.parent_service_name;
15516
+ const matchesNamed = namedServices.length > 0 && !!span.parent_service_name && namedServices.includes(span.parent_service_name);
15517
+ if (!matchesExternal && !matchesNamed) return false;
15518
+ }
15519
+ if (filters.status.length > 0) {
15520
+ if (!span.operation_status) return false;
15521
+ if (!filters.status.includes(collapseStatusValue(span.operation_status))) return false;
15522
+ }
15523
+ return true;
15524
+ });
15525
+ }
15526
+ function isFiltersEmpty(filters) {
15527
+ return filters.consumerService.length === 0 && filters.producerService.length === 0 && filters.status.length === 0;
15528
+ }
15529
+ var STATUS_LABELS = {
15530
+ error: "Error",
15531
+ iam_deny: "IAM Deny",
15532
+ iam_warn: "IAM Warning",
15533
+ ok: "Success"
15534
+ };
15535
+ var collapseStatusValue = (status) => {
15536
+ if (status === "iam_explicit_deny" || status === "iam_implicit_deny") return "iam_deny";
15537
+ if (status === "iam_explicit_warn" || status === "iam_implicit_warn") return "iam_warn";
15538
+ return status;
15539
+ };
15540
+ var statusOptionIcon = (value) => {
15541
+ switch (value) {
15542
+ case "error": {
15543
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material3.Cancel, { sx: { color: "error.main", fontSize: 16 } });
15544
+ }
15545
+ case "iam_deny": {
15546
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material3.GppBad, { sx: { color: "error.main", fontSize: 16 } });
15547
+ }
15548
+ case "iam_warn": {
15549
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material3.GppBad, { sx: { color: "warning.main", fontSize: 16 } });
15550
+ }
15551
+ default: {
15552
+ return void 0;
15553
+ }
15554
+ }
15555
+ };
15556
+ var FilterDropdown = ({ "data-testid": testId, label, onChange, options, selected }) => {
15557
+ const [anchorElement, setAnchorElement] = (0, import_react37.useState)();
15558
+ const open = Boolean(anchorElement);
15559
+ const hasSelection = selected.length > 0;
15560
+ const handleToggle = (value) => {
15561
+ if (selected.includes(value)) {
15562
+ onChange(selected.filter((item) => item !== value));
15563
+ } else {
15564
+ onChange([...selected, value]);
15565
+ }
15566
+ };
15567
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
15568
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
15569
+ import_material6.Button,
15570
+ {
15571
+ color: hasSelection ? "primary" : "inherit",
15572
+ "data-testid": testId,
15573
+ endIcon: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material3.ArrowDropDown, {}),
15574
+ onClick: (event) => {
15575
+ setAnchorElement(event.currentTarget);
15576
+ },
15577
+ size: "small",
15578
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material3.FilterList, { sx: { fontSize: "16px !important" } }),
15579
+ sx: {
15580
+ "& .MuiButton-endIcon": { ml: 0.25 },
15581
+ "color": hasSelection ? "primary.main" : "text.secondary",
15582
+ "flexShrink": 0,
15583
+ "textTransform": "none",
15584
+ "whiteSpace": "nowrap"
15585
+ },
15586
+ variant: hasSelection ? "outlined" : "text",
15587
+ children: [
15588
+ label,
15589
+ hasSelection && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15590
+ import_material6.Box,
15591
+ {
15592
+ component: "span",
15593
+ sx: {
15594
+ bgcolor: "primary.main",
15595
+ borderRadius: "10px",
15596
+ color: "primary.contrastText",
15597
+ fontSize: "0.65rem",
15598
+ fontWeight: 700,
15599
+ lineHeight: 1,
15600
+ ml: 0.5,
15601
+ px: 0.75,
15602
+ py: 0.25
15603
+ },
15604
+ children: selected.length
15605
+ }
15606
+ )
15607
+ ]
15608
+ }
15609
+ ),
15610
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
15611
+ import_material6.Menu,
15612
+ {
15613
+ anchorEl: anchorElement,
15614
+ onClose: () => {
15615
+ setAnchorElement(void 0);
15616
+ },
15617
+ open,
15618
+ slotProps: { paper: { sx: { maxHeight: 320, minWidth: 200 } } },
15619
+ children: [
15620
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.ListSubheader, { sx: { fontSize: "0.7rem", letterSpacing: "0.08em", lineHeight: "2rem", textTransform: "uppercase" }, children: label }),
15621
+ options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.MenuItem, { disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { color: "text.secondary", variant: "body2", children: "No options available" }) }),
15622
+ options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
15623
+ import_material6.MenuItem,
15624
+ {
15625
+ dense: true,
15626
+ onClick: () => {
15627
+ handleToggle(option.value);
15628
+ },
15629
+ children: [
15630
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15631
+ import_material6.Checkbox,
15632
+ {
15633
+ checked: selected.includes(option.value),
15634
+ size: "small",
15635
+ sx: { mr: 1, p: 0.25 }
15636
+ }
15637
+ ),
15638
+ !!option.serviceCode && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Box, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, mr: 1, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(AwsServiceIcon, { hideTooltip: true, service: option.serviceCode, size: "medium" }) }),
15639
+ !!option.icon && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Box, { sx: { alignItems: "center", display: "flex", flexShrink: 0, mr: 1 }, children: option.icon }),
15640
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15641
+ import_material6.ListItemText,
15642
+ {
15643
+ primary: option.label,
15644
+ primaryTypographyProps: { variant: "body2" }
15645
+ }
15646
+ )
15647
+ ]
15648
+ },
15649
+ option.value
15650
+ )),
15651
+ hasSelection && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
15652
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Divider, {}),
15653
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15654
+ import_material6.MenuItem,
15655
+ {
15656
+ dense: true,
15657
+ onClick: () => {
15658
+ onChange([]);
15659
+ },
15660
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { color: "text.secondary", sx: { pl: 4 }, variant: "body2", children: "Clear" })
15661
+ }
15662
+ )
15663
+ ] })
15664
+ ]
15665
+ }
15666
+ )
15667
+ ] });
15668
+ };
15669
+ var SpansFilterBar = ({
15670
+ consumerOptions,
15671
+ filters,
15672
+ onFiltersChange,
15673
+ producerOptions,
15674
+ statusOptions
15675
+ }) => {
15676
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material6.Box, { sx: { alignItems: "center", display: "flex", gap: 1 }, children: [
15677
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15678
+ FilterDropdown,
15679
+ {
15680
+ "data-testid": SPANS_FILTER_PRODUCER_TEST_ID,
15681
+ label: "Producer",
15682
+ onChange: (producerService) => {
15683
+ onFiltersChange({ ...filters, producerService });
15684
+ },
15685
+ options: producerOptions,
15686
+ selected: filters.producerService
15687
+ }
15688
+ ),
15689
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15690
+ FilterDropdown,
15691
+ {
15692
+ "data-testid": SPANS_FILTER_CONSUMER_TEST_ID,
15693
+ label: "Consumer",
15694
+ onChange: (consumerService) => {
15695
+ onFiltersChange({ ...filters, consumerService });
15696
+ },
15697
+ options: consumerOptions,
15698
+ selected: filters.consumerService
15699
+ }
15700
+ ),
15701
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15702
+ FilterDropdown,
15703
+ {
15704
+ "data-testid": SPANS_FILTER_STATUS_TEST_ID,
15705
+ label: "Status",
15706
+ onChange: (status) => {
15707
+ onFiltersChange({ ...filters, status });
15708
+ },
15709
+ options: statusOptions,
15710
+ selected: filters.status
15711
+ }
15712
+ )
15713
+ ] });
15714
+ };
15715
+
15716
+ // src/components/spans-list/spans-data-grid.tsx
15717
+ var import_jsx_runtime127 = require("react/jsx-runtime");
15502
15718
  var columnHelper = createColumnHelper();
15503
15719
  var newSpanBackgroundColor = {
15504
15720
  dark: { from: "rgba(136, 123, 2, 1)", to: "rgba(136, 123, 2, 0)" },
@@ -15510,57 +15726,62 @@ var LABEL_NO_SPANS = "There are no operations";
15510
15726
  var SEARCH_MAX_LENGTH = 512;
15511
15727
  var SEARCH_DEBOUNCE_MS = 300;
15512
15728
  var STICK_TO_EDGE_THRESHOLD_PX = 4;
15513
- var StreamBoundaryRow = ({ colSpan, label }) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableCell, { colSpan, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { children: label }) }) });
15514
- var LoadingRow = ({ colSpan }) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableCell, { colSpan, sx: { textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.CircularProgress, { size: 24, sx: { m: 2 } }) }) });
15515
- var NoMatchRow = ({
15516
- colSpan,
15517
- onClearSearch,
15518
- term
15519
- }) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableCell, { colSpan, "data-testid": SPANS_SEARCH_NO_MATCH_TEST_ID, sx: { textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material6.Box, { sx: { alignItems: "center", display: "flex", flexDirection: "column", gap: 1, py: 3 }, children: [
15520
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { sx: { fontStyle: "italic" }, variant: "body2", children: `No operations match \u201C${term}\u201D` }),
15521
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Button, { onClick: onClearSearch, size: "small", variant: "text", children: "Clear search" })
15522
- ] }) }) });
15729
+ var StreamBoundaryRow = ({ colSpan, label }) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableCell, { colSpan, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { children: label }) }) });
15730
+ var LoadingRow = ({ colSpan }) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableCell, { colSpan, sx: { textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.CircularProgress, { size: 24, sx: { m: 2 } }) }) });
15731
+ var NoMatchRow = ({ colSpan, filtersActive, onClearAll, searchActive, term }) => {
15732
+ const message = searchActive && filtersActive ? `No operations match "${term}" and the active filters` : searchActive ? `No operations match "${term}"` : "No operations match the active filters";
15733
+ const clearLabel = searchActive && filtersActive ? "Clear search and filters" : searchActive ? "Clear search" : "Clear filters";
15734
+ const testId = searchActive ? SPANS_SEARCH_NO_MATCH_TEST_ID : SPANS_FILTER_NO_MATCH_TEST_ID;
15735
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableCell, { colSpan, "data-testid": testId, sx: { textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material7.Box, { sx: { alignItems: "center", display: "flex", flexDirection: "column", gap: 1, py: 3 }, children: [
15736
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { fontStyle: "italic" }, variant: "body2", children: message }),
15737
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Button, { onClick: onClearAll, size: "small", variant: "text", children: clearLabel })
15738
+ ] }) }) });
15739
+ };
15523
15740
  var SpansSearchField = ({ onChange, onClear, searchSupported, value }) => {
15524
- const field = /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15525
- import_material6.TextField,
15741
+ const field = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15742
+ import_material7.TextField,
15526
15743
  {
15527
15744
  disabled: !searchSupported,
15528
15745
  inputProps: {
15529
- "aria-label": "Search operations",
15746
+ "aria-label": "Search",
15530
15747
  "data-testid": SPANS_SEARCH_INPUT_TEST_ID,
15531
15748
  "maxLength": SEARCH_MAX_LENGTH
15532
15749
  },
15533
15750
  InputProps: {
15534
- endAdornment: value ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15535
- import_material6.IconButton,
15751
+ endAdornment: value ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15752
+ import_material7.IconButton,
15536
15753
  {
15537
15754
  "aria-label": "Clear search",
15538
15755
  "data-testid": SPANS_SEARCH_CLEAR_TEST_ID,
15539
15756
  edge: "end",
15540
15757
  onClick: onClear,
15541
15758
  size: "small",
15542
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material3.Close, { sx: { fontSize: 16 } })
15759
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material4.Close, { sx: { fontSize: 16 } })
15543
15760
  }
15544
15761
  ) }) : void 0,
15545
- startAdornment: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material3.Search, { sx: { fontSize: 18 } }) })
15762
+ startAdornment: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material4.Search, { sx: { fontSize: 16 } }) })
15546
15763
  },
15547
15764
  onChange: (event) => {
15548
15765
  onChange(event.target.value);
15549
15766
  },
15550
- placeholder: "Search operations\u2026",
15767
+ placeholder: "Search\u2026",
15551
15768
  size: "small",
15552
- sx: { minWidth: 260 },
15769
+ sx: {
15770
+ "& .MuiInputBase-input": { fontSize: "0.8125rem", py: "6px" },
15771
+ "minWidth": 160,
15772
+ "width": "100%"
15773
+ },
15553
15774
  value
15554
15775
  }
15555
15776
  );
15556
15777
  if (searchSupported) return field;
15557
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Tooltip, { title: `Search requires LocalStack \u2265 ${MIN_EMULATOR_VERSION_FOR_SEARCH}`, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { children: field }) });
15778
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Tooltip, { title: `Search requires LocalStack \u2265 ${MIN_EMULATOR_VERSION_FOR_SEARCH}`, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { children: field }) });
15558
15779
  };
15559
- var SpansDataGridRow = (0, import_react37.memo)(
15780
+ var SpansDataGridRow = (0, import_react38.memo)(
15560
15781
  ({ isNew, onSpanClick, row }) => {
15561
- const theme = (0, import_material6.useTheme)();
15562
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15563
- import_material6.TableRow,
15782
+ const theme = (0, import_material7.useTheme)();
15783
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15784
+ import_material7.TableRow,
15564
15785
  {
15565
15786
  animate: {
15566
15787
  backgroundColor: theme.palette.mode === "light" ? newSpanBackgroundColor.light.to : newSpanBackgroundColor.dark.to
@@ -15578,16 +15799,16 @@ var SpansDataGridRow = (0, import_react37.memo)(
15578
15799
  transition: "background-color 1200ms ease-in"
15579
15800
  },
15580
15801
  children: row.getVisibleCells().map((cell) => {
15581
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15582
- import_material6.TableCell,
15802
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15803
+ import_material7.TableCell,
15583
15804
  {
15584
15805
  sx: {
15585
15806
  height: 48,
15586
15807
  maxWidth: `${cell.column.getSize().toString()}px`,
15587
15808
  minWidth: `${cell.column.getSize().toString()}px`
15588
15809
  },
15589
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15590
- import_material6.Box,
15810
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15811
+ import_material7.Box,
15591
15812
  {
15592
15813
  sx: {
15593
15814
  "alignItems": "center",
@@ -15599,7 +15820,7 @@ var SpansDataGridRow = (0, import_react37.memo)(
15599
15820
  },
15600
15821
  "width": "100%"
15601
15822
  },
15602
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Box, { sx: { px: 1, width: "100%" }, children: flexRender(cell.column.columnDef.cell, cell.getContext()) })
15823
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { px: 1, width: "100%" }, children: flexRender(cell.column.columnDef.cell, cell.getContext()) })
15603
15824
  }
15604
15825
  )
15605
15826
  },
@@ -15615,7 +15836,7 @@ var SpansDataGridRow = (0, import_react37.memo)(
15615
15836
  );
15616
15837
  var SpansDataGrid = ({
15617
15838
  clearingSpans,
15618
- errorCount,
15839
+ errorCount: _errorCount,
15619
15840
  fetchingBackward,
15620
15841
  fetchingForward,
15621
15842
  hasMoreBackward,
@@ -15632,11 +15853,11 @@ var SpansDataGrid = ({
15632
15853
  spans,
15633
15854
  systemLimit,
15634
15855
  totalCount,
15635
- warningCount
15856
+ warningCount: _warningCount
15636
15857
  }) => {
15637
15858
  const searchActive = search.length > 0;
15638
- const [searchDraft, setSearchDraft] = (0, import_react37.useState)(search);
15639
- (0, import_react37.useEffect)(() => {
15859
+ const [searchDraft, setSearchDraft] = (0, import_react38.useState)(search);
15860
+ (0, import_react38.useEffect)(() => {
15640
15861
  const handle = setTimeout(() => {
15641
15862
  onSearchChange(searchDraft);
15642
15863
  }, SEARCH_DEBOUNCE_MS);
@@ -15644,19 +15865,87 @@ var SpansDataGrid = ({
15644
15865
  clearTimeout(handle);
15645
15866
  };
15646
15867
  }, [searchDraft, onSearchChange]);
15647
- const handleClearSearch = (0, import_react37.useCallback)(() => {
15868
+ const [filters, setFilters] = (0, import_react38.useState)(EMPTY_FILTERS);
15869
+ const filtersActive = !isFiltersEmpty(filters);
15870
+ const activeFilterNames = [
15871
+ filters.producerService.length > 0 && "Producer",
15872
+ filters.consumerService.length > 0 && "Consumer",
15873
+ filters.status.length > 0 && "Status"
15874
+ ].filter(Boolean);
15875
+ const filteredByLabel = activeFilterNames.length <= 1 ? activeFilterNames[0] ?? "" : `${activeFilterNames.slice(0, -1).join(", ")} and ${activeFilterNames.at(-1) ?? ""}`;
15876
+ const handleClearSearch = (0, import_react38.useCallback)(() => {
15648
15877
  setSearchDraft("");
15649
15878
  onSearchChange("");
15650
15879
  }, [onSearchChange]);
15651
- const handleClearSpans = (0, import_react37.useCallback)(() => {
15880
+ const handleClearAll = (0, import_react38.useCallback)(() => {
15652
15881
  setSearchDraft("");
15882
+ onSearchChange("");
15883
+ setFilters(EMPTY_FILTERS);
15884
+ }, [onSearchChange]);
15885
+ const handleClearSpans = (0, import_react38.useCallback)(() => {
15886
+ setSearchDraft("");
15887
+ setFilters(EMPTY_FILTERS);
15653
15888
  onClearSpans();
15654
15889
  }, [onClearSpans]);
15655
- const columns = (0, import_react37.useMemo)(() => [
15890
+ const producerOptions = (0, import_react38.useMemo)(() => {
15891
+ const services = new Set(
15892
+ spans?.map((span) => span.parent_service_name).filter(Boolean) ?? []
15893
+ );
15894
+ for (const value of filters.producerService) {
15895
+ if (value !== EXTERNAL_PRODUCER_VALUE) services.add(value);
15896
+ }
15897
+ const options = [...services].toSorted().map((service) => ({
15898
+ label: getServiceDisplayName(service),
15899
+ serviceCode: service,
15900
+ value: service
15901
+ }));
15902
+ const hasExternalProducer = spans?.some((span) => !span.parent_service_name);
15903
+ if (hasExternalProducer || filters.producerService.includes(EXTERNAL_PRODUCER_VALUE)) {
15904
+ options.push({ label: "External producer", value: EXTERNAL_PRODUCER_VALUE });
15905
+ }
15906
+ return options;
15907
+ }, [spans, filters.producerService]);
15908
+ const consumerOptions = (0, import_react38.useMemo)(() => {
15909
+ const services = new Set(spans?.map((span) => span.service_name) ?? []);
15910
+ for (const value of filters.consumerService) services.add(value);
15911
+ return [...services].toSorted().map((service) => ({
15912
+ label: getServiceDisplayName(service),
15913
+ serviceCode: service,
15914
+ value: service
15915
+ }));
15916
+ }, [spans, filters.consumerService]);
15917
+ const statusOptions = (0, import_react38.useMemo)(() => {
15918
+ const statuses = new Set(
15919
+ spans?.map((span) => span.operation_status).filter(Boolean).map((s) => collapseStatusValue(s))
15920
+ );
15921
+ for (const value of filters.status) statuses.add(value);
15922
+ return [...statuses].toSorted().map((status) => ({
15923
+ icon: statusOptionIcon(status),
15924
+ label: STATUS_LABELS[status] ?? status,
15925
+ value: status
15926
+ }));
15927
+ }, [spans, filters.status]);
15928
+ const filteredSpans = (0, import_react38.useMemo)(() => {
15929
+ if (!spans) return;
15930
+ if (!filtersActive) return spans;
15931
+ return applyFilters(spans, filters);
15932
+ }, [spans, filters, filtersActive]);
15933
+ const filteredErrorCount = (0, import_react38.useMemo)(
15934
+ () => filteredSpans?.filter((span) => {
15935
+ const level = calculateHighestErrorLevel(span);
15936
+ return level === ErrorLevel.ERROR || level === ErrorLevel.IAM_PERMISSION;
15937
+ }).length,
15938
+ [filteredSpans]
15939
+ );
15940
+ const filteredWarningCount = (0, import_react38.useMemo)(
15941
+ () => filteredSpans?.filter((span) => calculateHighestErrorLevel(span) === ErrorLevel.WARNING).length,
15942
+ [filteredSpans]
15943
+ );
15944
+ const columns = (0, import_react38.useMemo)(() => [
15656
15945
  columnHelper.accessor("startTime", {
15657
- cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ResponsiveTimestampCell, { date: props.getValue() }),
15658
- header: () => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15659
- import_material6.TableSortLabel,
15946
+ cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ResponsiveTimestampCell, { date: props.getValue() }),
15947
+ header: () => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15948
+ import_material7.TableSortLabel,
15660
15949
  {
15661
15950
  active: true,
15662
15951
  direction: order2 === "newest_first" ? "asc" : "desc",
@@ -15672,9 +15961,9 @@ var SpansDataGrid = ({
15672
15961
  columnHelper.display({
15673
15962
  cell: (props) => {
15674
15963
  if (!props.row.original.parent_service_name || !props.row.original.parent_resource_name) {
15675
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { sx: { fontStyle: "italic" }, variant: "body2", children: "External producer" });
15964
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { fontStyle: "italic" }, variant: "body2", children: "External producer" });
15676
15965
  }
15677
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15966
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15678
15967
  ServiceCell,
15679
15968
  {
15680
15969
  resource: props.row.original.parent_resource_name,
@@ -15687,14 +15976,14 @@ var SpansDataGrid = ({
15687
15976
  size: 180
15688
15977
  }),
15689
15978
  columnHelper.accessor("operation_name", {
15690
- cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15691
- import_material6.Box,
15979
+ cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15980
+ import_material7.Box,
15692
15981
  {
15693
15982
  sx: {
15694
15983
  overflow: "hidden",
15695
15984
  textOverflow: "ellipsis"
15696
15985
  },
15697
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { title: props.getValue(), children: props.getValue() })
15986
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { title: props.getValue(), children: props.getValue() })
15698
15987
  }
15699
15988
  ),
15700
15989
  header: "Action",
@@ -15703,7 +15992,7 @@ var SpansDataGrid = ({
15703
15992
  }),
15704
15993
  columnHelper.display({
15705
15994
  cell: (props) => {
15706
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ServiceCell, { resource: props.row.original.resource_name, service: props.row.original.service_name });
15995
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ServiceCell, { resource: props.row.original.resource_name, service: props.row.original.service_name });
15707
15996
  },
15708
15997
  header: "Consumer",
15709
15998
  id: "consumer",
@@ -15711,10 +16000,10 @@ var SpansDataGrid = ({
15711
16000
  }),
15712
16001
  columnHelper.display({
15713
16002
  cell: (props) => {
15714
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material6.Box, { sx: { alignItems: "center", display: "flex", gap: 0.5, justifyContent: "flex-end" }, children: [
15715
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(StatusIconWithTooltip, { span: props.row.original }),
15716
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15717
- import_material6.Button,
16003
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material7.Box, { sx: { alignItems: "center", display: "flex", gap: 0.5, justifyContent: "flex-end" }, children: [
16004
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(StatusIconWithTooltip, { span: props.row.original }),
16005
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16006
+ import_material7.Button,
15718
16007
  {
15719
16008
  "data-testid": VIEW_SPAN_DETAILS_TEST_ID,
15720
16009
  onClick: (event) => {
@@ -15735,19 +16024,19 @@ var SpansDataGrid = ({
15735
16024
  ], [onSpanClick, onOrderChange, order2]);
15736
16025
  const table = useReactTable({
15737
16026
  columns,
15738
- data: spans ?? [],
16027
+ data: filteredSpans ?? [],
15739
16028
  getCoreRowModel: getCoreRowModel()
15740
16029
  });
15741
16030
  const columnCount = table.getAllColumns().length;
15742
16031
  const rows = table.getRowModel().rows;
15743
16032
  const hasRows = rows.length > 0;
15744
- const displayRows = (0, import_react37.useMemo)(() => {
16033
+ const displayRows = (0, import_react38.useMemo)(() => {
15745
16034
  if (order2 === "newest_first") return rows.toReversed();
15746
16035
  return rows;
15747
16036
  }, [rows, order2]);
15748
- const containerRef = (0, import_react37.useRef)(null);
15749
- const isAtLiveEdgeRef = (0, import_react37.useRef)(true);
15750
- const handleScroll = (0, import_react37.useCallback)(() => {
16037
+ const containerRef = (0, import_react38.useRef)(null);
16038
+ const isAtLiveEdgeRef = (0, import_react38.useRef)(true);
16039
+ const handleScroll = (0, import_react38.useCallback)(() => {
15751
16040
  const element = containerRef.current;
15752
16041
  if (!element) return;
15753
16042
  if (order2 === "oldest_first") {
@@ -15768,113 +16057,123 @@ var SpansDataGrid = ({
15768
16057
  const totalVirtualSize = virtualizer.getTotalSize();
15769
16058
  const paddingTop = virtualItems.length > 0 ? virtualItems[0]?.start ?? 0 : 0;
15770
16059
  const paddingBottom = virtualItems.length > 0 ? totalVirtualSize - (virtualItems.at(-1)?.end ?? 0) : 0;
15771
- const seenSpanIdsRef = (0, import_react37.useRef)(void 0);
15772
- seenSpanIdsRef.current ??= new Set((spans ?? []).map((s) => s.span_id));
15773
- (0, import_react37.useLayoutEffect)(() => {
16060
+ const seenSpanIdsRef = (0, import_react38.useRef)(void 0);
16061
+ seenSpanIdsRef.current ??= new Set((filteredSpans ?? []).map((span) => span.span_id));
16062
+ (0, import_react38.useLayoutEffect)(() => {
15774
16063
  for (const virtualItem of virtualItems) {
15775
16064
  const row = displayRows[virtualItem.index];
15776
16065
  if (row) seenSpanIdsRef.current?.add(row.original.span_id);
15777
16066
  }
15778
16067
  });
15779
- (0, import_react37.useEffect)(() => {
15780
- if (spans?.length === 0) seenSpanIdsRef.current = void 0;
15781
- }, [spans?.length]);
15782
- const lastSpanId = spans?.at(-1)?.span_id;
15783
- (0, import_react37.useLayoutEffect)(() => {
16068
+ (0, import_react38.useEffect)(() => {
16069
+ if (filteredSpans?.length === 0) seenSpanIdsRef.current = void 0;
16070
+ }, [filteredSpans?.length]);
16071
+ const lastSpanId = filteredSpans?.at(-1)?.span_id;
16072
+ (0, import_react38.useLayoutEffect)(() => {
15784
16073
  handleScroll();
15785
16074
  }, [handleScroll]);
15786
- (0, import_react37.useLayoutEffect)(() => {
16075
+ (0, import_react38.useLayoutEffect)(() => {
15787
16076
  if (order2 !== "oldest_first") return;
15788
16077
  const element = containerRef.current;
15789
16078
  if (!element || !isAtLiveEdgeRef.current) return;
15790
16079
  element.scrollTop = element.scrollHeight;
15791
16080
  }, [order2, spans?.length, lastSpanId]);
15792
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
15793
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Grid, { item: true, xs: 12, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material6.Box, { sx: { alignItems: "center", display: "flex", gap: "0.5rem", pt: 1, px: 1 }, children: [
15794
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15795
- SpansSearchField,
15796
- {
15797
- onChange: setSearchDraft,
15798
- onClear: handleClearSearch,
15799
- searchSupported,
15800
- value: searchDraft
15801
- }
15802
- ),
15803
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15804
- SpanCountBadge,
15805
- {
15806
- licenseLimit,
15807
- searchActive,
15808
- systemLimit,
15809
- totalCount,
15810
- visibleCount: spans?.length
15811
- }
15812
- ),
15813
- !searchActive && errorCount !== void 0 && errorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
15814
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { color: "text.disabled", sx: { mr: 0.5 }, variant: "body2", children: "\u2014" }),
15815
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Tooltip, { title: "Number of errors detected across all operations", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
15816
- import_material6.Box,
16081
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
16082
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Grid, { item: true, xs: 12, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material7.Box, { sx: { display: "flex", flexDirection: "column", gap: "0.5rem", pt: 1, px: 1 }, children: [
16083
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material7.Box, { sx: { alignItems: "center", display: "flex", flexWrap: "wrap", gap: "0.5rem" }, children: [
16084
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { flex: 1, maxWidth: 220, minWidth: 96, order: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16085
+ SpansSearchField,
15817
16086
  {
15818
- "data-testid": ERROR_COUNT_TEST_ID,
15819
- sx: {
15820
- alignItems: "center",
15821
- borderBottom: "1px dotted",
15822
- borderColor: "error.main",
15823
- cursor: "help",
15824
- display: "flex",
15825
- gap: 0.5,
15826
- mb: "-1px"
15827
- },
15828
- children: [
15829
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { color: "error", variant: "body2", children: errorCount.toLocaleString() }),
15830
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { color: "error", variant: "caption", children: errorCount === 1 ? "error" : "errors" })
15831
- ]
16087
+ onChange: setSearchDraft,
16088
+ onClear: handleClearSearch,
16089
+ searchSupported,
16090
+ value: searchDraft
15832
16091
  }
15833
- ) })
15834
- ] }),
15835
- !searchActive && warningCount !== void 0 && warningCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
15836
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { color: "text.disabled", sx: { mr: 0.5 }, variant: "body2", children: "\u2014" }),
15837
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Tooltip, { title: "Number of warnings detected across all operations", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
15838
- import_material6.Box,
16092
+ ) }),
16093
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { order: { md: 2, xs: 4 }, width: { md: "auto", xs: "100%" } }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16094
+ SpansFilterBar,
15839
16095
  {
15840
- "data-testid": WARNING_COUNT_TEST_ID,
15841
- sx: {
15842
- alignItems: "center",
15843
- borderBottom: "1px dotted",
15844
- borderColor: "warning.main",
15845
- cursor: "help",
15846
- display: "flex",
15847
- gap: 0.5,
15848
- mb: "-1px"
15849
- },
15850
- children: [
15851
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { color: "warning.main", variant: "body2", children: warningCount.toLocaleString() }),
15852
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Typography, { color: "warning.main", variant: "caption", children: warningCount === 1 ? "warning" : "warnings" })
15853
- ]
16096
+ consumerOptions,
16097
+ filters,
16098
+ onFiltersChange: setFilters,
16099
+ producerOptions,
16100
+ statusOptions
16101
+ }
16102
+ ) }),
16103
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { flex: 1, order: { md: 3, xs: 2 } } }),
16104
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { flexShrink: 0, order: { md: 4, xs: 3 } }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16105
+ import_material7.Button,
16106
+ {
16107
+ "data-testid": CLEAR_SPANS_TEST_ID,
16108
+ disabled: clearingSpans,
16109
+ onClick: handleClearSpans,
16110
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material4.DeleteForeverOutlined, {}),
16111
+ children: "Clear Operations"
15854
16112
  }
15855
16113
  ) })
15856
16114
  ] }),
15857
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Box, { sx: { flexGrow: 1 } }),
15858
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15859
- import_material6.FormControlLabel,
15860
- {
15861
- control: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15862
- import_material6.Button,
16115
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material7.Box, { sx: { alignItems: "center", display: "flex", gap: "0.5rem", pl: 0.5 }, children: [
16116
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16117
+ SpanCountBadge,
16118
+ {
16119
+ licenseLimit,
16120
+ systemLimit,
16121
+ totalCount: searchActive || filtersActive ? filteredSpans?.length : totalCount,
16122
+ visibleCount: filteredSpans?.length
16123
+ }
16124
+ ),
16125
+ filtersActive && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
16126
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { color: "text.secondary", variant: "caption", children: "\xB7" }),
16127
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { color: "text.secondary", variant: "caption", children: `Filtered by ${filteredByLabel}` })
16128
+ ] }),
16129
+ filteredErrorCount !== void 0 && filteredErrorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
16130
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { color: "text.secondary", variant: "caption", children: "\xB7" }),
16131
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Tooltip, { title: "Number of errors detected across all operations", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
16132
+ import_material7.Box,
15863
16133
  {
15864
- "data-testid": CLEAR_SPANS_TEST_ID,
15865
- onClick: handleClearSpans,
15866
- startIcon: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material3.DeleteForeverOutlined, {}),
15867
- children: "Clear Operations"
16134
+ "data-testid": ERROR_COUNT_TEST_ID,
16135
+ sx: {
16136
+ alignItems: "center",
16137
+ borderBottom: "1px dotted",
16138
+ borderColor: "error.main",
16139
+ cursor: "help",
16140
+ display: "flex",
16141
+ gap: 0.5,
16142
+ mb: "-1px"
16143
+ },
16144
+ children: [
16145
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { color: "error", variant: "body2", children: filteredErrorCount.toLocaleString() }),
16146
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { color: "error", variant: "caption", children: filteredErrorCount === 1 ? "error" : "errors" })
16147
+ ]
15868
16148
  }
15869
- ),
15870
- disabled: clearingSpans,
15871
- label: "",
15872
- sx: { marginRight: 0 }
15873
- }
15874
- )
16149
+ ) })
16150
+ ] }),
16151
+ filteredWarningCount !== void 0 && filteredWarningCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
16152
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { color: "text.secondary", variant: "caption", children: "\xB7" }),
16153
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Tooltip, { title: "Number of warnings detected across all operations", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
16154
+ import_material7.Box,
16155
+ {
16156
+ "data-testid": WARNING_COUNT_TEST_ID,
16157
+ sx: {
16158
+ alignItems: "center",
16159
+ borderBottom: "1px dotted",
16160
+ borderColor: "warning.main",
16161
+ cursor: "help",
16162
+ display: "flex",
16163
+ gap: 0.5,
16164
+ mb: "-1px"
16165
+ },
16166
+ children: [
16167
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { color: "warning.main", variant: "body2", children: filteredWarningCount.toLocaleString() }),
16168
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { color: "warning.main", variant: "caption", children: filteredWarningCount === 1 ? "warning" : "warnings" })
16169
+ ]
16170
+ }
16171
+ ) })
16172
+ ] })
16173
+ ] })
15875
16174
  ] }) }),
15876
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Box, { sx: { flexGrow: 1, overflow: "hidden", position: "relative", width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15877
- import_material6.TableContainer,
16175
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { flexGrow: 1, overflow: "hidden", position: "relative", width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16176
+ import_material7.TableContainer,
15878
16177
  {
15879
16178
  onScroll: handleScroll,
15880
16179
  ref: containerRef,
@@ -15886,8 +16185,8 @@ var SpansDataGrid = ({
15886
16185
  right: 0,
15887
16186
  top: 0
15888
16187
  },
15889
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
15890
- import_material6.Table,
16188
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
16189
+ import_material7.Table,
15891
16190
  {
15892
16191
  stickyHeader: true,
15893
16192
  sx: {
@@ -15898,9 +16197,9 @@ var SpansDataGrid = ({
15898
16197
  "th+th": { pl: "8px !important" }
15899
16198
  },
15900
16199
  children: [
15901
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableHead, { children: table.getHeaderGroups().map((headerGroup) => {
15902
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15903
- import_material6.TableCell,
16200
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableHead, { children: table.getHeaderGroups().map((headerGroup) => {
16201
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16202
+ import_material7.TableCell,
15904
16203
  {
15905
16204
  colSpan: header.colSpan,
15906
16205
  sx: {
@@ -15914,14 +16213,23 @@ var SpansDataGrid = ({
15914
16213
  header.id
15915
16214
  )) }, headerGroup.id);
15916
16215
  }) }),
15917
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material6.TableBody, { children: [
15918
- (spans === void 0 || clearingSpans || searching) && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableCell, { colSpan: columnCount, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.CircularProgress, { size: 48, sx: { m: 4 } }) }) }),
15919
- !clearingSpans && !searching && spans?.length === 0 && (searchActive ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(NoMatchRow, { colSpan: columnCount, onClearSearch: handleClearSearch, term: search }) : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_NO_SPANS })),
15920
- !clearingSpans && order2 === "newest_first" && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
15921
- hasRows && hasMoreForward && fetchingForward && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(LoadingRow, { colSpan: columnCount }),
15922
- hasRows && !hasMoreForward && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_END_OF_STREAM }),
15923
- hasRows && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15924
- import_material6.TableCell,
16216
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material7.TableBody, { children: [
16217
+ (spans === void 0 || clearingSpans || searching) && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableCell, { colSpan: columnCount, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.CircularProgress, { size: 48, sx: { m: 4 } }) }) }),
16218
+ !clearingSpans && !searching && filteredSpans?.length === 0 && (searchActive || filtersActive ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16219
+ NoMatchRow,
16220
+ {
16221
+ colSpan: columnCount,
16222
+ filtersActive,
16223
+ onClearAll: handleClearAll,
16224
+ searchActive,
16225
+ term: search
16226
+ }
16227
+ ) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_NO_SPANS })),
16228
+ !clearingSpans && order2 === "newest_first" && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
16229
+ hasRows && hasMoreForward && fetchingForward && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(LoadingRow, { colSpan: columnCount }),
16230
+ hasRows && !hasMoreForward && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_END_OF_STREAM }),
16231
+ hasRows && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16232
+ import_material7.TableCell,
15925
16233
  {
15926
16234
  colSpan: columnCount,
15927
16235
  sx: { border: 0, height: paddingTop, p: 0 }
@@ -15930,7 +16238,7 @@ var SpansDataGrid = ({
15930
16238
  hasRows && virtualItems.map((virtualItem) => {
15931
16239
  const row = displayRows[virtualItem.index];
15932
16240
  const isNew = !(seenSpanIdsRef.current?.has(row.original.span_id) ?? false);
15933
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
16241
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15934
16242
  SpansDataGridRow,
15935
16243
  {
15936
16244
  isNew,
@@ -15940,21 +16248,21 @@ var SpansDataGrid = ({
15940
16248
  row.original.span_id
15941
16249
  );
15942
16250
  }),
15943
- hasRows && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15944
- import_material6.TableCell,
16251
+ hasRows && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16252
+ import_material7.TableCell,
15945
16253
  {
15946
16254
  colSpan: columnCount,
15947
16255
  sx: { border: 0, height: paddingBottom, p: 0 }
15948
16256
  }
15949
16257
  ) }),
15950
- hasRows && hasMoreBackward && fetchingBackward && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(LoadingRow, { colSpan: columnCount }),
15951
- hasRows && !hasMoreBackward && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_BEGINNING_OF_STREAM })
16258
+ hasRows && hasMoreBackward && fetchingBackward && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(LoadingRow, { colSpan: columnCount }),
16259
+ hasRows && !hasMoreBackward && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_BEGINNING_OF_STREAM })
15952
16260
  ] }),
15953
- !clearingSpans && order2 === "oldest_first" && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
15954
- hasRows && !hasMoreBackward && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_BEGINNING_OF_STREAM }),
15955
- hasRows && hasMoreBackward && fetchingBackward && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(LoadingRow, { colSpan: columnCount }),
15956
- hasRows && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15957
- import_material6.TableCell,
16261
+ !clearingSpans && order2 === "oldest_first" && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
16262
+ hasRows && !hasMoreBackward && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_BEGINNING_OF_STREAM }),
16263
+ hasRows && hasMoreBackward && fetchingBackward && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(LoadingRow, { colSpan: columnCount }),
16264
+ hasRows && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16265
+ import_material7.TableCell,
15958
16266
  {
15959
16267
  colSpan: columnCount,
15960
16268
  sx: { border: 0, height: paddingTop, p: 0 }
@@ -15963,7 +16271,7 @@ var SpansDataGrid = ({
15963
16271
  hasRows && virtualItems.map((virtualItem) => {
15964
16272
  const row = displayRows[virtualItem.index];
15965
16273
  const isNew = !(seenSpanIdsRef.current?.has(row.original.span_id) ?? false);
15966
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
16274
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
15967
16275
  SpansDataGridRow,
15968
16276
  {
15969
16277
  isNew,
@@ -15973,15 +16281,15 @@ var SpansDataGrid = ({
15973
16281
  row.original.span_id
15974
16282
  );
15975
16283
  }),
15976
- hasRows && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
15977
- import_material6.TableCell,
16284
+ hasRows && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16285
+ import_material7.TableCell,
15978
16286
  {
15979
16287
  colSpan: columnCount,
15980
16288
  sx: { border: 0, height: paddingBottom, p: 0 }
15981
16289
  }
15982
16290
  ) }),
15983
- hasRows && hasMoreForward && fetchingForward && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(LoadingRow, { colSpan: columnCount }),
15984
- hasRows && !hasMoreForward && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_END_OF_STREAM })
16291
+ hasRows && hasMoreForward && fetchingForward && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(LoadingRow, { colSpan: columnCount }),
16292
+ hasRows && !hasMoreForward && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_END_OF_STREAM })
15985
16293
  ] })
15986
16294
  ] })
15987
16295
  ]
@@ -15993,13 +16301,13 @@ var SpansDataGrid = ({
15993
16301
  };
15994
16302
 
15995
16303
  // src/components/spans-list/spans-list.tsx
15996
- var import_jsx_runtime127 = require("react/jsx-runtime");
16304
+ var import_jsx_runtime128 = require("react/jsx-runtime");
15997
16305
  var SpansList = (props) => {
15998
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material7.Box, { "data-testid": SPANS_DATA_GRID_TEST_ID, sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 1, width: "100%" }, children: [
15999
- props.fetchError && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
16000
- import_material7.Alert,
16306
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_material8.Box, { "data-testid": SPANS_DATA_GRID_TEST_ID, sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 1, width: "100%" }, children: [
16307
+ props.fetchError && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
16308
+ import_material8.Alert,
16001
16309
  {
16002
- action: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Button, { onClick: props.onFetchForward, children: "Retry" }),
16310
+ action: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Button, { onClick: props.onFetchForward, children: "Retry" }),
16003
16311
  severity: "error",
16004
16312
  sx: { mt: 1, mx: 2 },
16005
16313
  children: [
@@ -16009,7 +16317,7 @@ var SpansList = (props) => {
16009
16317
  ]
16010
16318
  }
16011
16319
  ),
16012
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
16320
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16013
16321
  SpansDataGrid,
16014
16322
  {
16015
16323
  clearingSpans: props.clearingSpans,
@@ -16037,18 +16345,18 @@ var SpansList = (props) => {
16037
16345
  };
16038
16346
 
16039
16347
  // src/components/status-message/status-message.tsx
16040
- var import_icons_material4 = require("@mui/icons-material");
16041
- var import_material8 = require("@mui/material");
16042
- var import_react38 = require("react");
16043
- var import_jsx_runtime128 = require("react/jsx-runtime");
16348
+ var import_icons_material5 = require("@mui/icons-material");
16349
+ var import_material9 = require("@mui/material");
16350
+ var import_react39 = require("react");
16351
+ var import_jsx_runtime129 = require("react/jsx-runtime");
16044
16352
  var StatusMessage = ({
16045
16353
  localstackVersion,
16046
16354
  onEnable,
16047
16355
  onRetry,
16048
16356
  phase
16049
16357
  }) => {
16050
- const [enabling, setEnabling] = (0, import_react38.useState)(false);
16051
- const [enableError, setEnableError] = (0, import_react38.useState)();
16358
+ const [enabling, setEnabling] = (0, import_react39.useState)(false);
16359
+ const [enableError, setEnableError] = (0, import_react39.useState)();
16052
16360
  const handleEnable = async () => {
16053
16361
  if (!onEnable) return;
16054
16362
  setEnabling(true);
@@ -16062,8 +16370,8 @@ var StatusMessage = ({
16062
16370
  }
16063
16371
  };
16064
16372
  if (phase === "CHECKING_STATUS" || phase === "CONNECTING_WS") {
16065
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16066
- import_material8.Box,
16373
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16374
+ import_material9.Box,
16067
16375
  {
16068
16376
  sx: {
16069
16377
  alignItems: "center",
@@ -16073,13 +16381,13 @@ var StatusMessage = ({
16073
16381
  justifyContent: "center",
16074
16382
  p: 4
16075
16383
  },
16076
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.CircularProgress, { size: 32 })
16384
+ children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.CircularProgress, { size: 32 })
16077
16385
  }
16078
16386
  );
16079
16387
  }
16080
16388
  if (phase === "INCOMPATIBLE") {
16081
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16082
- import_material8.Box,
16389
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16390
+ import_material9.Box,
16083
16391
  {
16084
16392
  sx: {
16085
16393
  alignItems: "center",
@@ -16089,18 +16397,18 @@ var StatusMessage = ({
16089
16397
  justifyContent: "center",
16090
16398
  p: 4
16091
16399
  },
16092
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
16093
- import_material8.Alert,
16400
+ children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
16401
+ import_material9.Alert,
16094
16402
  {
16095
- icon: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material4.ErrorOutline, { fontSize: "large" }),
16403
+ icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons_material5.ErrorOutline, { fontSize: "large" }),
16096
16404
  severity: "error",
16097
16405
  sx: { maxWidth: 600, width: "100%" },
16098
16406
  children: [
16099
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Not Available" }),
16100
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Typography, { sx: { mb: 2 }, variant: "body2", children: localstackVersion === void 0 ? `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. Please update LocalStack.` : `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. You are running version ${localstackVersion}. Please update LocalStack.` }),
16101
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("strong", { children: "Update LocalStack:" }) }),
16102
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16103
- import_material8.Box,
16407
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Not Available" }),
16408
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.Typography, { sx: { mb: 2 }, variant: "body2", children: localstackVersion === void 0 ? `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. Please update LocalStack.` : `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. You are running version ${localstackVersion}. Please update LocalStack.` }),
16409
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("strong", { children: "Update LocalStack:" }) }),
16410
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16411
+ import_material9.Box,
16104
16412
  {
16105
16413
  component: "pre",
16106
16414
  sx: {
@@ -16112,8 +16420,8 @@ var StatusMessage = ({
16112
16420
  children: "localstack update docker-images"
16113
16421
  }
16114
16422
  ),
16115
- onRetry && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Box, { sx: { display: "flex", gap: 1, mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16116
- import_material8.Button,
16423
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.Box, { sx: { display: "flex", gap: 1, mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16424
+ import_material9.Button,
16117
16425
  {
16118
16426
  "aria-label": "Check App Inspector status again",
16119
16427
  onClick: onRetry,
@@ -16128,8 +16436,8 @@ var StatusMessage = ({
16128
16436
  );
16129
16437
  }
16130
16438
  if (phase === "UNREACHABLE") {
16131
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16132
- import_material8.Box,
16439
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16440
+ import_material9.Box,
16133
16441
  {
16134
16442
  sx: {
16135
16443
  alignItems: "center",
@@ -16139,18 +16447,18 @@ var StatusMessage = ({
16139
16447
  justifyContent: "center",
16140
16448
  p: 4
16141
16449
  },
16142
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
16143
- import_material8.Alert,
16450
+ children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
16451
+ import_material9.Alert,
16144
16452
  {
16145
- icon: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material4.ErrorOutline, { fontSize: "large" }),
16453
+ icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons_material5.ErrorOutline, { fontSize: "large" }),
16146
16454
  severity: "error",
16147
16455
  sx: { maxWidth: 600, width: "100%" },
16148
16456
  children: [
16149
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.AlertTitle, { sx: { fontWeight: "bold" }, children: "Connection Error" }),
16150
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_material8.Typography, { sx: { mb: 2 }, variant: "body2", children: [
16457
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.AlertTitle, { sx: { fontWeight: "bold" }, children: "Connection Error" }),
16458
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_material9.Typography, { sx: { mb: 2 }, variant: "body2", children: [
16151
16459
  "Failed to connect to LocalStack. Ensure ",
16152
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16153
- import_material8.Link,
16460
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16461
+ import_material9.Link,
16154
16462
  {
16155
16463
  href: "https://docs.localstack.cloud/aws/getting-started/installation/",
16156
16464
  rel: "noopener noreferrer",
@@ -16160,9 +16468,9 @@ var StatusMessage = ({
16160
16468
  ),
16161
16469
  " is running and accessible."
16162
16470
  ] }),
16163
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("strong", { children: "Start LocalStack:" }) }),
16164
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16165
- import_material8.Box,
16471
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("strong", { children: "Start LocalStack:" }) }),
16472
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16473
+ import_material9.Box,
16166
16474
  {
16167
16475
  component: "pre",
16168
16476
  sx: {
@@ -16174,8 +16482,8 @@ var StatusMessage = ({
16174
16482
  children: "localstack start"
16175
16483
  }
16176
16484
  ),
16177
- onRetry && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16178
- import_material8.Button,
16485
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16486
+ import_material9.Button,
16179
16487
  {
16180
16488
  "aria-label": "Retry connection to LocalStack",
16181
16489
  onClick: onRetry,
@@ -16190,8 +16498,8 @@ var StatusMessage = ({
16190
16498
  );
16191
16499
  }
16192
16500
  if (phase === "DISABLED") {
16193
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16194
- import_material8.Box,
16501
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16502
+ import_material9.Box,
16195
16503
  {
16196
16504
  sx: {
16197
16505
  alignItems: "center",
@@ -16201,31 +16509,31 @@ var StatusMessage = ({
16201
16509
  justifyContent: "center",
16202
16510
  p: 4
16203
16511
  },
16204
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
16205
- import_material8.Alert,
16512
+ children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
16513
+ import_material9.Alert,
16206
16514
  {
16207
- icon: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material4.InfoOutlined, { fontSize: "large" }),
16515
+ icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons_material5.InfoOutlined, { fontSize: "large" }),
16208
16516
  severity: "warning",
16209
16517
  sx: { maxWidth: 600, width: "100%" },
16210
16518
  children: [
16211
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Is Not Enabled" }),
16212
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Typography, { sx: { mb: 2 }, variant: "body2", children: "App Inspector is not currently enabled in LocalStack. You can enable it now, or at startup." }),
16213
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Box, { sx: { display: "flex", gap: 1, mb: 2 }, children: onEnable && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16214
- import_material8.Button,
16519
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Is Not Enabled" }),
16520
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.Typography, { sx: { mb: 2 }, variant: "body2", children: "App Inspector is not currently enabled in LocalStack. You can enable it now, or at startup." }),
16521
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.Box, { sx: { display: "flex", gap: 1, mb: 2 }, children: onEnable && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16522
+ import_material9.Button,
16215
16523
  {
16216
16524
  "aria-label": "Enable App Inspector Now",
16217
16525
  disabled: enabling,
16218
16526
  onClick: () => {
16219
16527
  void handleEnable();
16220
16528
  },
16221
- startIcon: enabling ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.CircularProgress, { size: 16 }) : void 0,
16529
+ startIcon: enabling ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.CircularProgress, { size: 16 }) : void 0,
16222
16530
  variant: "contained",
16223
16531
  children: "Enable App Inspector Now"
16224
16532
  }
16225
16533
  ) }),
16226
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Typography, { sx: { mb: 1 }, variant: "body2", children: "If you'd prefer to automatically enable App Inspector at start up, use:" }),
16227
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16228
- import_material8.Box,
16534
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.Typography, { sx: { mb: 1 }, variant: "body2", children: "If you'd prefer to automatically enable App Inspector at start up, use:" }),
16535
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
16536
+ import_material9.Box,
16229
16537
  {
16230
16538
  component: "pre",
16231
16539
  sx: {
@@ -16237,30 +16545,30 @@ var StatusMessage = ({
16237
16545
  children: "LOCALSTACK_APP_INSPECTOR=1 localstack start"
16238
16546
  }
16239
16547
  ),
16240
- Boolean(enableError) && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material8.Typography, { color: "error", sx: { mt: 1 }, variant: "body2", children: enableError })
16548
+ Boolean(enableError) && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material9.Typography, { color: "error", sx: { mt: 1 }, variant: "body2", children: enableError })
16241
16549
  ]
16242
16550
  }
16243
16551
  )
16244
16552
  }
16245
16553
  );
16246
16554
  }
16247
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_jsx_runtime128.Fragment, {});
16555
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_jsx_runtime129.Fragment, {});
16248
16556
  };
16249
16557
 
16250
16558
  // src/hooks/status-provider.tsx
16251
- var import_react40 = require("react");
16559
+ var import_react41 = require("react");
16252
16560
 
16253
16561
  // src/hooks/use-connection-state-machine.ts
16254
- var import_react39 = require("react");
16562
+ var import_react40 = require("react");
16255
16563
  var POLL_INTERVAL_MS = 5e3;
16256
16564
  function useConnectionStateMachine() {
16257
16565
  const api = useAppInspectorApi();
16258
- const [phase, setPhase] = (0, import_react39.useState)("CHECKING_STATUS");
16259
- const [checking, setChecking] = (0, import_react39.useState)(true);
16260
- const [status, setStatus] = (0, import_react39.useState)();
16261
- const [statusError, setStatusError] = (0, import_react39.useState)();
16262
- const abortControllerRef = (0, import_react39.useRef)(null);
16263
- const dispatchStatus = (0, import_react39.useCallback)((result, error) => {
16566
+ const [phase, setPhase] = (0, import_react40.useState)("CHECKING_STATUS");
16567
+ const [checking, setChecking] = (0, import_react40.useState)(true);
16568
+ const [status, setStatus] = (0, import_react40.useState)();
16569
+ const [statusError, setStatusError] = (0, import_react40.useState)();
16570
+ const abortControllerRef = (0, import_react40.useRef)(null);
16571
+ const dispatchStatus = (0, import_react40.useCallback)((result, error) => {
16264
16572
  if (result === void 0) {
16265
16573
  setStatus(void 0);
16266
16574
  setStatusError(error);
@@ -16275,7 +16583,7 @@ function useConnectionStateMachine() {
16275
16583
  }
16276
16584
  setPhase(result.status === "ENABLED" ? "CONNECTING_WS" : "DISABLED");
16277
16585
  }, []);
16278
- const runCheck = (0, import_react39.useCallback)(async () => {
16586
+ const runCheck = (0, import_react40.useCallback)(async () => {
16279
16587
  if (abortControllerRef.current !== null) {
16280
16588
  abortControllerRef.current.abort();
16281
16589
  }
@@ -16297,10 +16605,10 @@ function useConnectionStateMachine() {
16297
16605
  }
16298
16606
  }
16299
16607
  }, [api, dispatchStatus]);
16300
- (0, import_react39.useEffect)(() => {
16608
+ (0, import_react40.useEffect)(() => {
16301
16609
  void runCheck();
16302
16610
  }, [runCheck]);
16303
- (0, import_react39.useEffect)(() => {
16611
+ (0, import_react40.useEffect)(() => {
16304
16612
  if (phase !== "UNREACHABLE" && phase !== "DISABLED") return;
16305
16613
  const intervalId = globalThis.setInterval(() => {
16306
16614
  void runCheck();
@@ -16309,13 +16617,13 @@ function useConnectionStateMachine() {
16309
16617
  globalThis.clearInterval(intervalId);
16310
16618
  };
16311
16619
  }, [phase, runCheck]);
16312
- const checkStatus = (0, import_react39.useCallback)(() => {
16620
+ const checkStatus = (0, import_react40.useCallback)(() => {
16313
16621
  void runCheck();
16314
16622
  }, [runCheck]);
16315
- const onWsOpen = (0, import_react39.useCallback)(() => {
16623
+ const onWsOpen = (0, import_react40.useCallback)(() => {
16316
16624
  setPhase("LIVE");
16317
16625
  }, []);
16318
- const onWsClose = (0, import_react39.useCallback)(() => {
16626
+ const onWsClose = (0, import_react40.useCallback)(() => {
16319
16627
  setPhase("CHECKING_STATUS");
16320
16628
  void runCheck();
16321
16629
  }, [runCheck]);
@@ -16333,14 +16641,14 @@ function useConnectionStateMachine() {
16333
16641
  }
16334
16642
 
16335
16643
  // src/hooks/status-provider.tsx
16336
- var import_jsx_runtime129 = require("react/jsx-runtime");
16337
- var AppInspectorStatusContext = (0, import_react40.createContext)(void 0);
16644
+ var import_jsx_runtime130 = require("react/jsx-runtime");
16645
+ var AppInspectorStatusContext = (0, import_react41.createContext)(void 0);
16338
16646
  var StatusProvider = ({ children }) => {
16339
16647
  const value = useConnectionStateMachine();
16340
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AppInspectorStatusContext.Provider, { value, children });
16648
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(AppInspectorStatusContext.Provider, { value, children });
16341
16649
  };
16342
16650
  var useAppInspectorStatus = () => {
16343
- const value = (0, import_react40.useContext)(AppInspectorStatusContext);
16651
+ const value = (0, import_react41.useContext)(AppInspectorStatusContext);
16344
16652
  if (!value) {
16345
16653
  throw new Error("@localstack-studio/ui: useAppInspectorStatus must be used within a <StatusProvider> (rendered internally by <AppInspectorContextProvider>)");
16346
16654
  }
@@ -16348,9 +16656,9 @@ var useAppInspectorStatus = () => {
16348
16656
  };
16349
16657
 
16350
16658
  // src/hooks/use-local-storage.tsx
16351
- var import_react41 = require("react");
16659
+ var import_react42 = require("react");
16352
16660
  function useLocalStorage(key, initialValue) {
16353
- const [storedValue, setStoredValue] = (0, import_react41.useState)(() => {
16661
+ const [storedValue, setStoredValue] = (0, import_react42.useState)(() => {
16354
16662
  try {
16355
16663
  const item = globalThis.localStorage.getItem(key);
16356
16664
  return item ? JSON.parse(item) : initialValue;
@@ -16359,7 +16667,7 @@ function useLocalStorage(key, initialValue) {
16359
16667
  return initialValue;
16360
16668
  }
16361
16669
  });
16362
- const setValue = (0, import_react41.useCallback)((value) => {
16670
+ const setValue = (0, import_react42.useCallback)((value) => {
16363
16671
  try {
16364
16672
  setStoredValue((previousState) => {
16365
16673
  const next = typeof value === "function" ? value(previousState) : value;
@@ -16374,7 +16682,7 @@ function useLocalStorage(key, initialValue) {
16374
16682
  console.error(`Error setting localStorage key "${key}":`, error);
16375
16683
  }
16376
16684
  }, [key]);
16377
- (0, import_react41.useEffect)(() => {
16685
+ (0, import_react42.useEffect)(() => {
16378
16686
  const handleStorageChange = (event) => {
16379
16687
  if (event.key === key && event.newValue !== null) {
16380
16688
  try {
@@ -16393,7 +16701,7 @@ function useLocalStorage(key, initialValue) {
16393
16701
  }
16394
16702
 
16395
16703
  // src/hooks/use-spans.ts
16396
- var import_react46 = require("react");
16704
+ var import_react47 = require("react");
16397
16705
 
16398
16706
  // src/utils/pagination-buffer.ts
16399
16707
  var insertSorted = (array, item, compareFunction, hint = "back") => {
@@ -16610,7 +16918,7 @@ var createPaginationBuffer = (options) => {
16610
16918
  };
16611
16919
 
16612
16920
  // src/hooks/use-spans-ws.tsx
16613
- var import_react45 = require("react");
16921
+ var import_react46 = require("react");
16614
16922
 
16615
16923
  // src/config.ts
16616
16924
  var APPINSPECTOR_API_PREFIX = "/_localstack/appinspector";
@@ -16639,8 +16947,8 @@ var getAppInspectorApiUrl = (localstackEndpoint, endpoint) => {
16639
16947
  var LOCALSTACK_INFO_PATH = "/_localstack/info";
16640
16948
 
16641
16949
  // src/context.tsx
16642
- var import_react43 = require("react");
16643
16950
  var import_react44 = require("react");
16951
+ var import_react45 = require("react");
16644
16952
 
16645
16953
  // src/api/client.ts
16646
16954
  var import_semver2 = __toESM(require_semver2(), 1);
@@ -16889,7 +17197,7 @@ var createApiClient = ({ localstackEndpoint }) => {
16889
17197
  };
16890
17198
 
16891
17199
  // src/hooks/use-appinspector-open-analytics.ts
16892
- var import_react42 = require("react");
17200
+ var import_react43 = require("react");
16893
17201
 
16894
17202
  // node_modules/.pnpm/ua-parser-js@2.0.9/node_modules/ua-parser-js/src/main/ua-parser.mjs
16895
17203
  var LIBVERSION = "2.0.9";
@@ -18771,8 +19079,8 @@ var useAppInspectorOpenAnalytics = () => {
18771
19079
  const api = useAppInspectorApi();
18772
19080
  const { deploymentContainer } = useAppInspector();
18773
19081
  const { status, statusError } = useAppInspectorStatus();
18774
- const firedRef = (0, import_react42.useRef)(false);
18775
- (0, import_react42.useEffect)(() => {
19082
+ const firedRef = (0, import_react43.useRef)(false);
19083
+ (0, import_react43.useEffect)(() => {
18776
19084
  if (firedRef.current) {
18777
19085
  return;
18778
19086
  }
@@ -18792,10 +19100,10 @@ var useAppInspectorOpenAnalytics = () => {
18792
19100
  };
18793
19101
 
18794
19102
  // src/context.tsx
18795
- var import_jsx_runtime130 = require("react/jsx-runtime");
18796
- var AppInspectorContext = (0, import_react43.createContext)(void 0);
19103
+ var import_jsx_runtime131 = require("react/jsx-runtime");
19104
+ var AppInspectorContext = (0, import_react44.createContext)(void 0);
18797
19105
  var useAppInspector = () => {
18798
- const context = (0, import_react43.useContext)(AppInspectorContext);
19106
+ const context = (0, import_react44.useContext)(AppInspectorContext);
18799
19107
  if (!context) {
18800
19108
  throw new Error("@localstack-studio/ui: components must be used within a <AppInspectorContextProvider>");
18801
19109
  }
@@ -18803,14 +19111,14 @@ var useAppInspector = () => {
18803
19111
  };
18804
19112
  var AppInspectorAnalyticsBoundary = ({ children }) => {
18805
19113
  useAppInspectorOpenAnalytics();
18806
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, { children });
19114
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_jsx_runtime131.Fragment, { children });
18807
19115
  };
18808
19116
  var AppInspectorContextProvider = (props) => {
18809
- const api = (0, import_react44.useMemo)(
19117
+ const api = (0, import_react45.useMemo)(
18810
19118
  () => createApiClient({ localstackEndpoint: props.localstackEndpoint }),
18811
19119
  [props.localstackEndpoint]
18812
19120
  );
18813
- const resolveLink = (0, import_react44.useCallback)(
19121
+ const resolveLink = (0, import_react45.useCallback)(
18814
19122
  (options) => {
18815
19123
  if (options.to === "settings") {
18816
19124
  return `${props.routePrefix}/settings`;
@@ -18822,11 +19130,11 @@ var AppInspectorContextProvider = (props) => {
18822
19130
  },
18823
19131
  [props.routePrefix]
18824
19132
  );
18825
- const deploymentContainer = (0, import_react44.useMemo)(
19133
+ const deploymentContainer = (0, import_react45.useMemo)(
18826
19134
  () => props.deploymentContainer ?? { source: "web" },
18827
19135
  [props.deploymentContainer]
18828
19136
  );
18829
- const contextValue = (0, import_react44.useMemo)(
19137
+ const contextValue = (0, import_react45.useMemo)(
18830
19138
  () => ({
18831
19139
  deploymentContainer,
18832
19140
  headerHeight: props.headerHeight ?? 0,
@@ -18836,28 +19144,28 @@ var AppInspectorContextProvider = (props) => {
18836
19144
  }),
18837
19145
  [deploymentContainer, props.headerHeight, props.linkComponent, props.localstackEndpoint, resolveLink]
18838
19146
  );
18839
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ApiProvider, { api, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(StatusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(AppInspectorContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(AppInspectorAnalyticsBoundary, { children: props.children }) }) }) });
19147
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ApiProvider, { api, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(StatusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(AppInspectorContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(AppInspectorAnalyticsBoundary, { children: props.children }) }) }) });
18840
19148
  };
18841
19149
 
18842
19150
  // src/hooks/use-spans-ws.tsx
18843
19151
  function useSpansWebSocket(options) {
18844
19152
  const { enabled, onClose, onMessage, onOpen } = options;
18845
- const onMessageRef = (0, import_react45.useRef)(onMessage);
18846
- const onOpenRef = (0, import_react45.useRef)(onOpen);
18847
- const onCloseRef = (0, import_react45.useRef)(onClose);
18848
- (0, import_react45.useEffect)(() => {
19153
+ const onMessageRef = (0, import_react46.useRef)(onMessage);
19154
+ const onOpenRef = (0, import_react46.useRef)(onOpen);
19155
+ const onCloseRef = (0, import_react46.useRef)(onClose);
19156
+ (0, import_react46.useEffect)(() => {
18849
19157
  onMessageRef.current = onMessage;
18850
19158
  }, [onMessage]);
18851
- (0, import_react45.useEffect)(() => {
19159
+ (0, import_react46.useEffect)(() => {
18852
19160
  onOpenRef.current = onOpen;
18853
19161
  }, [onOpen]);
18854
- (0, import_react45.useEffect)(() => {
19162
+ (0, import_react46.useEffect)(() => {
18855
19163
  onCloseRef.current = onClose;
18856
19164
  }, [onClose]);
18857
- const [connected, setConnected] = (0, import_react45.useState)(false);
18858
- const wsRef = (0, import_react45.useRef)(void 0);
19165
+ const [connected, setConnected] = (0, import_react46.useState)(false);
19166
+ const wsRef = (0, import_react46.useRef)(void 0);
18859
19167
  const { localstackEndpoint } = useAppInspector();
18860
- const connect = (0, import_react45.useCallback)(() => {
19168
+ const connect = (0, import_react46.useCallback)(() => {
18861
19169
  if (wsRef.current !== void 0) return;
18862
19170
  const url = new URL(getAppInspectorApiUrl(localstackEndpoint, API_ENDPOINTS.WEBSOCKET_SPANS));
18863
19171
  url.protocol = globalThis.location.protocol === "https:" ? "wss" : "ws";
@@ -18886,7 +19194,7 @@ function useSpansWebSocket(options) {
18886
19194
  }
18887
19195
  });
18888
19196
  }, [localstackEndpoint]);
18889
- (0, import_react45.useEffect)(() => {
19197
+ (0, import_react46.useEffect)(() => {
18890
19198
  if (!enabled) {
18891
19199
  if (wsRef.current !== void 0) {
18892
19200
  wsRef.current.close();
@@ -18915,29 +19223,29 @@ var PAGE_SIZE = 100;
18915
19223
  var useSpans = () => {
18916
19224
  const api = useAppInspectorApi();
18917
19225
  const { onWsClose, onWsOpen, wsEnabled } = useAppInspectorStatus();
18918
- const [spans, setSpans] = (0, import_react46.useState)();
18919
- const [fetchError, setFetchError] = (0, import_react46.useState)();
18920
- const [fetchingForward, setFetchingForward] = (0, import_react46.useState)(false);
18921
- const [fetchingBackward, setFetchingBackward] = (0, import_react46.useState)(false);
18922
- const [search, setSearch] = (0, import_react46.useState)("");
18923
- const searchRef = (0, import_react46.useRef)("");
18924
- const [searching, setSearching] = (0, import_react46.useState)(false);
18925
- const searchSeqRef = (0, import_react46.useRef)(0);
18926
- const paginationBufferRef = (0, import_react46.useRef)();
18927
- const [totalCount, setTotalCount] = (0, import_react46.useState)();
18928
- const [licenseLimit, setLicenseLimit] = (0, import_react46.useState)();
18929
- const [systemLimit, setSystemLimit] = (0, import_react46.useState)();
18930
- const [errorCount, setErrorCount] = (0, import_react46.useState)();
18931
- const [warningCount, setWarningCount] = (0, import_react46.useState)();
18932
- const [hasMoreBackward, setHasMoreBackward] = (0, import_react46.useState)();
18933
- const [hasMoreForward, setHasMoreForward] = (0, import_react46.useState)();
18934
- const fetchForward = (0, import_react46.useCallback)(() => {
19226
+ const [spans, setSpans] = (0, import_react47.useState)();
19227
+ const [fetchError, setFetchError] = (0, import_react47.useState)();
19228
+ const [fetchingForward, setFetchingForward] = (0, import_react47.useState)(false);
19229
+ const [fetchingBackward, setFetchingBackward] = (0, import_react47.useState)(false);
19230
+ const [search, setSearch] = (0, import_react47.useState)("");
19231
+ const searchRef = (0, import_react47.useRef)("");
19232
+ const [searching, setSearching] = (0, import_react47.useState)(false);
19233
+ const searchSeqRef = (0, import_react47.useRef)(0);
19234
+ const paginationBufferRef = (0, import_react47.useRef)();
19235
+ const [totalCount, setTotalCount] = (0, import_react47.useState)();
19236
+ const [licenseLimit, setLicenseLimit] = (0, import_react47.useState)();
19237
+ const [systemLimit, setSystemLimit] = (0, import_react47.useState)();
19238
+ const [errorCount, setErrorCount] = (0, import_react47.useState)();
19239
+ const [warningCount, setWarningCount] = (0, import_react47.useState)();
19240
+ const [hasMoreBackward, setHasMoreBackward] = (0, import_react47.useState)();
19241
+ const [hasMoreForward, setHasMoreForward] = (0, import_react47.useState)();
19242
+ const fetchForward = (0, import_react47.useCallback)(() => {
18935
19243
  void paginationBufferRef.current?.fetchForward();
18936
19244
  }, []);
18937
- const fetchBackward = (0, import_react46.useCallback)(() => {
19245
+ const fetchBackward = (0, import_react47.useCallback)(() => {
18938
19246
  void paginationBufferRef.current?.fetchBackward();
18939
19247
  }, []);
18940
- const applySearch = (0, import_react46.useCallback)((term) => {
19248
+ const applySearch = (0, import_react47.useCallback)((term) => {
18941
19249
  const normalized = term.trim();
18942
19250
  if (normalized === searchRef.current) {
18943
19251
  return;
@@ -18953,7 +19261,7 @@ var useSpans = () => {
18953
19261
  }
18954
19262
  });
18955
19263
  }, []);
18956
- (0, import_react46.useEffect)(() => {
19264
+ (0, import_react47.useEffect)(() => {
18957
19265
  const buffer = createPaginationBuffer({
18958
19266
  async fetchPage(token, signal) {
18959
19267
  const response = await api.getSpans({
@@ -18997,8 +19305,8 @@ var useSpans = () => {
18997
19305
  paginationBufferRef.current = buffer;
18998
19306
  void buffer.fetchForward();
18999
19307
  }, [api]);
19000
- const [clearingSpans, setClearingSpans] = (0, import_react46.useState)(false);
19001
- const clearSpans = (0, import_react46.useCallback)(async () => {
19308
+ const [clearingSpans, setClearingSpans] = (0, import_react47.useState)(false);
19309
+ const clearSpans = (0, import_react47.useCallback)(async () => {
19002
19310
  if (clearingSpans) {
19003
19311
  return;
19004
19312
  }
@@ -19018,12 +19326,12 @@ var useSpans = () => {
19018
19326
  setClearingSpans(false);
19019
19327
  }
19020
19328
  }, [clearingSpans, api]);
19021
- (0, import_react46.useEffect)(() => {
19329
+ (0, import_react47.useEffect)(() => {
19022
19330
  if (hasMoreForward === true && !fetchingForward) {
19023
19331
  void paginationBufferRef.current?.fetchForward();
19024
19332
  }
19025
19333
  }, [hasMoreForward, fetchingForward]);
19026
- (0, import_react46.useEffect)(() => {
19334
+ (0, import_react47.useEffect)(() => {
19027
19335
  if (hasMoreBackward === true && !fetchingBackward && !fetchingForward) {
19028
19336
  void paginationBufferRef.current?.fetchBackward();
19029
19337
  }
@@ -19044,7 +19352,7 @@ var useSpans = () => {
19044
19352
  fetchForward();
19045
19353
  }
19046
19354
  });
19047
- const clearFetchError = (0, import_react46.useCallback)(() => {
19355
+ const clearFetchError = (0, import_react47.useCallback)(() => {
19048
19356
  setFetchError(void 0);
19049
19357
  }, []);
19050
19358
  return {
@@ -19071,16 +19379,16 @@ var useSpans = () => {
19071
19379
  };
19072
19380
 
19073
19381
  // src/pages/trace-graph-page.tsx
19074
- var import_icons_material13 = require("@mui/icons-material");
19075
- var import_material23 = require("@mui/material");
19382
+ var import_icons_material14 = require("@mui/icons-material");
19383
+ var import_material24 = require("@mui/material");
19076
19384
  var import_styles = require("@mui/material/styles");
19077
- var import_react63 = require("@xyflow/react");
19078
- var import_react64 = require("react");
19385
+ var import_react64 = require("@xyflow/react");
19386
+ var import_react65 = require("react");
19079
19387
 
19080
19388
  // src/components/event-details/event-details.tsx
19081
- var import_icons_material10 = require("@mui/icons-material");
19082
- var import_material18 = require("@mui/material");
19083
- var import_react54 = require("react");
19389
+ var import_icons_material11 = require("@mui/icons-material");
19390
+ var import_material19 = require("@mui/material");
19391
+ var import_react55 = require("react");
19084
19392
 
19085
19393
  // src/utils/event-utils.ts
19086
19394
  var iamEventParser = (eventName, attributes) => {
@@ -19191,13 +19499,13 @@ var getEventGroupsByType = (events) => {
19191
19499
  };
19192
19500
 
19193
19501
  // src/components/event-details/copy-button.tsx
19194
- var import_icons_material5 = require("@mui/icons-material");
19195
- var import_material9 = require("@mui/material");
19196
- var import_react47 = require("react");
19197
- var import_jsx_runtime131 = require("react/jsx-runtime");
19502
+ var import_icons_material6 = require("@mui/icons-material");
19503
+ var import_material10 = require("@mui/material");
19504
+ var import_react48 = require("react");
19505
+ var import_jsx_runtime132 = require("react/jsx-runtime");
19198
19506
  var CopyButton = ({ value }) => {
19199
- const [copied, setCopied] = (0, import_react47.useState)(false);
19200
- const handleCopy = (0, import_react47.useCallback)(() => {
19507
+ const [copied, setCopied] = (0, import_react48.useState)(false);
19508
+ const handleCopy = (0, import_react48.useCallback)(() => {
19201
19509
  const text2 = typeof value === "string" ? value : JSON.stringify(value, void 0, 2);
19202
19510
  void navigator.clipboard.writeText(text2).then(() => {
19203
19511
  setCopied(true);
@@ -19206,83 +19514,83 @@ var CopyButton = ({ value }) => {
19206
19514
  }, 1500);
19207
19515
  });
19208
19516
  }, [value]);
19209
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material9.Tooltip, { title: copied ? "Copied!" : "Copy", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
19210
- import_material9.IconButton,
19517
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Tooltip, { title: copied ? "Copied!" : "Copy", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
19518
+ import_material10.IconButton,
19211
19519
  {
19212
19520
  className: "copy-btn",
19213
19521
  onClick: handleCopy,
19214
19522
  size: "small",
19215
19523
  sx: { ml: 0.5, opacity: copied ? 1 : 0, p: 0.25, transition: "opacity 0.15s" },
19216
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material5.Check, { sx: { fontSize: 14 } }) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material5.ContentCopy, { sx: { fontSize: 14 } })
19524
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material6.Check, { sx: { fontSize: 14 } }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material6.ContentCopy, { sx: { fontSize: 14 } })
19217
19525
  }
19218
19526
  ) });
19219
19527
  };
19220
19528
 
19221
19529
  // src/components/event-details/event-detail.tsx
19222
- var import_icons_material8 = require("@mui/icons-material");
19223
- var import_material15 = require("@mui/material");
19224
- var import_react51 = require("react");
19530
+ var import_icons_material9 = require("@mui/icons-material");
19531
+ var import_material16 = require("@mui/material");
19532
+ var import_react52 = require("react");
19225
19533
 
19226
19534
  // src/components/status-icon.tsx
19227
- var import_icons_material6 = require("@mui/icons-material");
19228
- var import_material10 = require("@mui/material");
19229
- var import_jsx_runtime132 = require("react/jsx-runtime");
19535
+ var import_icons_material7 = require("@mui/icons-material");
19536
+ var import_material11 = require("@mui/material");
19537
+ var import_jsx_runtime133 = require("react/jsx-runtime");
19230
19538
  var StatusIcon2 = ({ errorLevel }) => {
19231
19539
  switch (errorLevel) {
19232
19540
  case EventLevel.LevelError: {
19233
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material6.Cancel, { sx: { color: "red" } });
19541
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material7.Cancel, { sx: { color: "red" } });
19234
19542
  }
19235
19543
  case EventLevel.LevelInfo: {
19236
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material6.Info, { sx: { color: "gray" } });
19544
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material7.Info, { sx: { color: "gray" } });
19237
19545
  }
19238
19546
  case EventLevel.LevelPermission: {
19239
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material6.RemoveCircle, { sx: { color: "blue" } });
19547
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material7.RemoveCircle, { sx: { color: "blue" } });
19240
19548
  }
19241
19549
  case EventLevel.LevelWarning: {
19242
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material6.Error, { sx: { color: "orange" } });
19550
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material7.Error, { sx: { color: "orange" } });
19243
19551
  }
19244
19552
  default: {
19245
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material6.CheckCircle, { sx: { color: "lightgray" } });
19553
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material7.CheckCircle, { sx: { color: "lightgray" } });
19246
19554
  }
19247
19555
  }
19248
19556
  };
19249
19557
 
19250
19558
  // src/components/event-details/iam-event-detail.tsx
19251
- var import_icons_material7 = require("@mui/icons-material");
19252
- var import_material11 = require("@mui/material");
19253
- var import_jsx_runtime133 = require("react/jsx-runtime");
19254
- var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
19255
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
19256
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
19559
+ var import_icons_material8 = require("@mui/icons-material");
19560
+ var import_material12 = require("@mui/material");
19561
+ var import_jsx_runtime134 = require("react/jsx-runtime");
19562
+ var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
19563
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
19564
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
19257
19565
  ] });
19258
19566
  var PermissionIcon = ({ status }) => {
19259
19567
  switch (status) {
19260
19568
  case "explicitly_allowed":
19261
19569
  case "implicitly_allowed": {
19262
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material7.CheckCircle, { sx: { color: "success.main", fontSize: "1rem" } });
19570
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material8.CheckCircle, { sx: { color: "success.main", fontSize: "1rem" } });
19263
19571
  }
19264
19572
  case "explicitly_denied": {
19265
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material7.Error, { sx: { color: "error.main", fontSize: "1rem" } });
19573
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material8.Error, { sx: { color: "error.main", fontSize: "1rem" } });
19266
19574
  }
19267
19575
  case "implicitly_denied": {
19268
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material7.Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
19576
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material8.Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
19269
19577
  }
19270
19578
  }
19271
19579
  };
19272
19580
  var IAMEventDetail = ({ event }) => {
19273
19581
  const payloadString = event.attributes?.payload;
19274
19582
  if (!payloadString) {
19275
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
19583
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
19276
19584
  }
19277
19585
  const parsedIAM = parseIAMEvent(payloadString);
19278
19586
  if (!parsedIAM) {
19279
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
19587
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
19280
19588
  }
19281
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { children: [
19282
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { sx: { mb: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
19283
- import_material11.Chip,
19589
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { children: [
19590
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, { sx: { mb: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
19591
+ import_material12.Chip,
19284
19592
  {
19285
- icon: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(PermissionIcon, { status: parsedIAM.permission }),
19593
+ icon: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(PermissionIcon, { status: parsedIAM.permission }),
19286
19594
  label: formatPermissionStatus(parsedIAM.permission),
19287
19595
  size: "small",
19288
19596
  sx: {
@@ -19292,36 +19600,36 @@ var IAMEventDetail = ({ event }) => {
19292
19600
  variant: "outlined"
19293
19601
  }
19294
19602
  ) }),
19295
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
19296
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
19297
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
19603
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
19604
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
19605
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
19298
19606
  DetailRow,
19299
19607
  {
19300
- content: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
19608
+ content: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
19301
19609
  label: "Actions"
19302
19610
  }
19303
19611
  ),
19304
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
19612
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
19305
19613
  DetailRow,
19306
19614
  {
19307
- content: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
19615
+ content: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
19308
19616
  label: "Resources"
19309
19617
  }
19310
19618
  ),
19311
- (parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { mt: 1.5 }, children: [
19312
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
19313
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
19314
- parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
19315
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
19316
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
19619
+ (parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { sx: { mt: 1.5 }, children: [
19620
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
19621
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
19622
+ parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { sx: { textAlign: "center" }, children: [
19623
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
19624
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
19317
19625
  ] }),
19318
- parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
19319
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
19320
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
19626
+ parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { sx: { textAlign: "center" }, children: [
19627
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
19628
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
19321
19629
  ] }),
19322
- parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
19323
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
19324
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
19630
+ parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { sx: { textAlign: "center" }, children: [
19631
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
19632
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
19325
19633
  ] })
19326
19634
  ] })
19327
19635
  ] })
@@ -19329,16 +19637,16 @@ var IAMEventDetail = ({ event }) => {
19329
19637
  };
19330
19638
 
19331
19639
  // src/components/event-details/iam-permission-detail.tsx
19332
- var import_material12 = require("@mui/material");
19333
- var import_react48 = require("react");
19334
- var import_jsx_runtime134 = require("react/jsx-runtime");
19640
+ var import_material13 = require("@mui/material");
19641
+ var import_react49 = require("react");
19642
+ var import_jsx_runtime135 = require("react/jsx-runtime");
19335
19643
  var getChipColor = (isAllowed, spanStatusCode) => {
19336
19644
  if (isAllowed) return "success.main";
19337
19645
  if (spanStatusCode === 2) return "error.main";
19338
19646
  return "warning.main";
19339
19647
  };
19340
19648
  var IAMPermissionItem = ({ event, spanStatusCode }) => {
19341
- const parsedData = (0, import_react48.useMemo)(() => {
19649
+ const parsedData = (0, import_react49.useMemo)(() => {
19342
19650
  const payloadString = event.attributes?.payload;
19343
19651
  if (!payloadString) return;
19344
19652
  const parsedIAM2 = parseIAMEvent(payloadString);
@@ -19351,42 +19659,42 @@ var IAMPermissionItem = ({ event, spanStatusCode }) => {
19351
19659
  const { parsedIAM } = parsedData;
19352
19660
  const isAllowed = parsedIAM.permission === "explicitly_allowed" || parsedIAM.permission === "implicitly_allowed";
19353
19661
  const chipColors = { backgroundColor: getChipColor(isAllowed, spanStatusCode), color: "white" };
19354
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { sx: { mb: 0.5 }, children: [
19355
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, { sx: { alignItems: "center", display: "flex", gap: 1, mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Chip, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }) }),
19356
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Stack, { spacing: 1, children: [
19357
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { "data-testid": EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID, children: [
19358
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Principal" }),
19359
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19360
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { wordBreak: "break-all" }, variant: "body2", children: parsedIAM.principal }),
19361
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(CopyButton, { value: parsedIAM.principal })
19662
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { sx: { mb: 0.5 }, children: [
19663
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, { sx: { alignItems: "center", display: "flex", gap: 1, mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Chip, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }) }),
19664
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Stack, { spacing: 1, children: [
19665
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { "data-testid": EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID, children: [
19666
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Principal" }),
19667
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19668
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Typography, { sx: { wordBreak: "break-all" }, variant: "body2", children: parsedIAM.principal }),
19669
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CopyButton, { value: parsedIAM.principal })
19362
19670
  ] })
19363
19671
  ] }),
19364
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { "data-testid": EVENT_DETAILS_IAM_ACTIONS_TEST_ID, children: [
19365
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Actions" }),
19366
- parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19367
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { display: "block" }, variant: "body2", children: action }),
19368
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(CopyButton, { value: action })
19672
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { "data-testid": EVENT_DETAILS_IAM_ACTIONS_TEST_ID, children: [
19673
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Actions" }),
19674
+ parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19675
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Typography, { sx: { display: "block" }, variant: "body2", children: action }),
19676
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CopyButton, { value: action })
19369
19677
  ] }, action))
19370
19678
  ] }),
19371
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { "data-testid": EVENT_DETAILS_IAM_RESOURCES_TEST_ID, children: [
19372
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Resources" }),
19373
- parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19374
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { display: "block", wordBreak: "break-all" }, variant: "body2", children: resource }),
19375
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(CopyButton, { value: resource })
19679
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { "data-testid": EVENT_DETAILS_IAM_RESOURCES_TEST_ID, children: [
19680
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Typography, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Resources" }),
19681
+ parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19682
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Typography, { sx: { display: "block", wordBreak: "break-all" }, variant: "body2", children: resource }),
19683
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CopyButton, { value: resource })
19376
19684
  ] }, resource))
19377
19685
  ] })
19378
19686
  ] })
19379
19687
  ] });
19380
19688
  };
19381
- var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IAMPermissionItem, { event, spanStatusCode }, `${event.span_id}-${event.event_id}`)) });
19689
+ var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IAMPermissionItem, { event, spanStatusCode }, `${event.span_id}-${event.event_id}`)) });
19382
19690
 
19383
19691
  // src/components/event-details/payload-viewer.tsx
19384
- var import_material14 = require("@mui/material");
19692
+ var import_material15 = require("@mui/material");
19385
19693
 
19386
19694
  // node_modules/.pnpm/@textea+json-viewer@3.5.0_@emotion+react@11.14.0_@types+react@17.0.91_react@17.0.2__@em_040507e953752247cb848fd3f764690c/node_modules/@textea/json-viewer/dist/index.mjs
19387
- var import_jsx_runtime135 = require("react/jsx-runtime");
19388
- var import_material13 = require("@mui/material");
19389
- var import_react49 = require("react");
19695
+ var import_jsx_runtime136 = require("react/jsx-runtime");
19696
+ var import_material14 = require("@mui/material");
19697
+ var import_react50 = require("react");
19390
19698
  var import_zustand = require("zustand");
19391
19699
  var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
19392
19700
  function r(e2) {
@@ -19503,10 +19811,10 @@ var createJsonViewerStore = (props) => {
19503
19811
  };
19504
19812
  });
19505
19813
  };
19506
- var JsonViewerStoreContext = (0, import_react49.createContext)(void 0);
19814
+ var JsonViewerStoreContext = (0, import_react50.createContext)(void 0);
19507
19815
  JsonViewerStoreContext.Provider;
19508
19816
  var useJsonViewerStore = (selector2, equalityFn) => {
19509
- const store = (0, import_react49.useContext)(JsonViewerStoreContext);
19817
+ const store = (0, import_react50.useContext)(JsonViewerStoreContext);
19510
19818
  return (0, import_zustand.useStore)(store, selector2, equalityFn);
19511
19819
  };
19512
19820
  var useTextColor = () => {
@@ -19631,9 +19939,9 @@ async function copyString(value) {
19631
19939
  }
19632
19940
  function useClipboard() {
19633
19941
  let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
19634
- const [copied, setCopied] = (0, import_react49.useState)(false);
19635
- const copyTimeout = (0, import_react49.useRef)(null);
19636
- const handleCopyResult = (0, import_react49.useCallback)((value) => {
19942
+ const [copied, setCopied] = (0, import_react50.useState)(false);
19943
+ const copyTimeout = (0, import_react50.useRef)(null);
19944
+ const handleCopyResult = (0, import_react50.useCallback)((value) => {
19637
19945
  const current = copyTimeout.current;
19638
19946
  if (current) {
19639
19947
  window.clearTimeout(current);
@@ -19644,7 +19952,7 @@ function useClipboard() {
19644
19952
  timeout
19645
19953
  ]);
19646
19954
  const onCopy = useJsonViewerStore((store) => store.onCopy);
19647
- const copy = (0, import_react49.useCallback)(async (path, value) => {
19955
+ const copy = (0, import_react50.useCallback)(async (path, value) => {
19648
19956
  if (typeof onCopy === "function") {
19649
19957
  try {
19650
19958
  await onCopy(path, value, copyString);
@@ -19665,7 +19973,7 @@ function useClipboard() {
19665
19973
  handleCopyResult,
19666
19974
  onCopy
19667
19975
  ]);
19668
- const reset = (0, import_react49.useCallback)(() => {
19976
+ const reset = (0, import_react50.useCallback)(() => {
19669
19977
  setCopied(false);
19670
19978
  if (copyTimeout.current) {
19671
19979
  clearTimeout(copyTimeout.current);
@@ -19679,7 +19987,7 @@ function useClipboard() {
19679
19987
  }
19680
19988
  function useIsCycleReference(path, value) {
19681
19989
  const rootValue = useJsonViewerStore((store) => store.value);
19682
- return (0, import_react49.useMemo)(() => isCycleReference(rootValue, path, value), [
19990
+ return (0, import_react50.useMemo)(() => isCycleReference(rootValue, path, value), [
19683
19991
  path,
19684
19992
  value,
19685
19993
  rootValue
@@ -19692,7 +20000,7 @@ function useInspect(path, value, nestedIndex) {
19692
20000
  const setInspectCache = useJsonViewerStore((store) => store.setInspectCache);
19693
20001
  const defaultInspectDepth = useJsonViewerStore((store) => store.defaultInspectDepth);
19694
20002
  const defaultInspectControl = useJsonViewerStore((store) => store.defaultInspectControl);
19695
- (0, import_react49.useEffect)(() => {
20003
+ (0, import_react50.useEffect)(() => {
19696
20004
  const inspect2 = getInspectCache(path, nestedIndex);
19697
20005
  if (inspect2 !== void 0) {
19698
20006
  return;
@@ -19714,7 +20022,7 @@ function useInspect(path, value, nestedIndex) {
19714
20022
  value,
19715
20023
  setInspectCache
19716
20024
  ]);
19717
- const [inspect, set] = (0, import_react49.useState)(() => {
20025
+ const [inspect, set] = (0, import_react50.useState)(() => {
19718
20026
  const shouldInspect = getInspectCache(path, nestedIndex);
19719
20027
  if (shouldInspect !== void 0) {
19720
20028
  return shouldInspect;
@@ -19724,7 +20032,7 @@ function useInspect(path, value, nestedIndex) {
19724
20032
  }
19725
20033
  return isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
19726
20034
  });
19727
- const setInspect = (0, import_react49.useCallback)((apply) => {
20035
+ const setInspect = (0, import_react50.useCallback)((apply) => {
19728
20036
  set((oldState) => {
19729
20037
  const newState = typeof apply === "boolean" ? apply : apply(oldState);
19730
20038
  setInspectCache(path, newState, nestedIndex);
@@ -19740,7 +20048,7 @@ function useInspect(path, value, nestedIndex) {
19740
20048
  setInspect
19741
20049
  ];
19742
20050
  }
19743
- var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20051
+ var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
19744
20052
  component: "div",
19745
20053
  ...props,
19746
20054
  sx: {
@@ -19751,7 +20059,7 @@ var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_m
19751
20059
  var DataTypeLabel = (param) => {
19752
20060
  let { dataType, enable = true } = param;
19753
20061
  if (!enable) return null;
19754
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
20062
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
19755
20063
  className: "data-type-label",
19756
20064
  sx: {
19757
20065
  mx: 0.5,
@@ -19764,23 +20072,23 @@ var DataTypeLabel = (param) => {
19764
20072
  };
19765
20073
  function defineEasyType(param) {
19766
20074
  let { is, serialize, deserialize, type, colorKey, displayTypeLabel = true, Renderer } = param;
19767
- const Render = /* @__PURE__ */ (0, import_react49.memo)(Renderer);
20075
+ const Render = /* @__PURE__ */ (0, import_react50.memo)(Renderer);
19768
20076
  const EasyType = (props) => {
19769
20077
  const storeDisplayDataTypes = useJsonViewerStore((store) => store.displayDataTypes);
19770
20078
  const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
19771
20079
  const onSelect = useJsonViewerStore((store) => store.onSelect);
19772
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DataBox, {
20080
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
19773
20081
  onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(props.path, props.value),
19774
20082
  sx: {
19775
20083
  color: color2
19776
20084
  },
19777
20085
  children: [
19778
- displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataTypeLabel, {
20086
+ displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataTypeLabel, {
19779
20087
  dataType: type
19780
20088
  }),
19781
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
20089
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
19782
20090
  className: "".concat(type, "-value"),
19783
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Render, {
20091
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Render, {
19784
20092
  path: props.path,
19785
20093
  inspect: props.inspect,
19786
20094
  setInspect: props.setInspect,
@@ -19801,7 +20109,7 @@ function defineEasyType(param) {
19801
20109
  const EasyTypeEditor = (param2) => {
19802
20110
  let { value, setValue, abortEditing, commitEditing } = param2;
19803
20111
  const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
19804
- const handleKeyDown = (0, import_react49.useCallback)((event) => {
20112
+ const handleKeyDown = (0, import_react50.useCallback)((event) => {
19805
20113
  if (event.key === "Enter") {
19806
20114
  event.preventDefault();
19807
20115
  commitEditing(value);
@@ -19815,12 +20123,12 @@ function defineEasyType(param) {
19815
20123
  commitEditing,
19816
20124
  value
19817
20125
  ]);
19818
- const handleChange = (0, import_react49.useCallback)((event) => {
20126
+ const handleChange = (0, import_react50.useCallback)((event) => {
19819
20127
  setValue(event.target.value);
19820
20128
  }, [
19821
20129
  setValue
19822
20130
  ]);
19823
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.InputBase, {
20131
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.InputBase, {
19824
20132
  autoFocus: true,
19825
20133
  value,
19826
20134
  onChange: handleChange,
@@ -19860,7 +20168,7 @@ var booleanType = defineEasyType({
19860
20168
  },
19861
20169
  Renderer: (param) => {
19862
20170
  let { value } = param;
19863
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
20171
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
19864
20172
  children: value ? "true" : "false"
19865
20173
  });
19866
20174
  }
@@ -19879,7 +20187,7 @@ var dateType = defineEasyType({
19879
20187
  colorKey: "base0D",
19880
20188
  Renderer: (param) => {
19881
20189
  let { value } = param;
19882
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
20190
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
19883
20191
  children: value.toLocaleTimeString("en-us", displayOptions)
19884
20192
  });
19885
20193
  }
@@ -19908,12 +20216,12 @@ var functionName = (func) => {
19908
20216
  var lb = "{";
19909
20217
  var rb = "}";
19910
20218
  var PreFunctionType = (props) => {
19911
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.NoSsr, {
20219
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.NoSsr, {
19912
20220
  children: [
19913
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataTypeLabel, {
20221
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataTypeLabel, {
19914
20222
  dataType: "function"
19915
20223
  }),
19916
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, {
20224
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, {
19917
20225
  component: "span",
19918
20226
  className: "data-function-start",
19919
20227
  sx: {
@@ -19929,8 +20237,8 @@ var PreFunctionType = (props) => {
19929
20237
  });
19930
20238
  };
19931
20239
  var PostFunctionType = () => {
19932
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.NoSsr, {
19933
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20240
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.NoSsr, {
20241
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
19934
20242
  component: "span",
19935
20243
  className: "data-function-end",
19936
20244
  children: rb
@@ -19939,15 +20247,15 @@ var PostFunctionType = () => {
19939
20247
  };
19940
20248
  var FunctionType = (props) => {
19941
20249
  const functionColor = useJsonViewerStore((store) => store.colorspace.base05);
19942
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.NoSsr, {
19943
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20250
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.NoSsr, {
20251
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
19944
20252
  className: "data-function",
19945
20253
  sx: {
19946
20254
  display: props.inspect ? "block" : "inline-block",
19947
20255
  pl: props.inspect ? 2 : 0,
19948
20256
  color: functionColor
19949
20257
  },
19950
- children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20258
+ children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
19951
20259
  component: "span",
19952
20260
  className: "data-function-body",
19953
20261
  onClick: () => props.setInspect(true),
@@ -19975,7 +20283,7 @@ var nullType = defineEasyType({
19975
20283
  displayTypeLabel: false,
19976
20284
  Renderer: () => {
19977
20285
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
19978
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20286
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
19979
20287
  sx: {
19980
20288
  fontSize: "0.8rem",
19981
20289
  backgroundColor,
@@ -19998,7 +20306,7 @@ var nanType = defineEasyType({
19998
20306
  deserialize: (value) => parseFloat(value),
19999
20307
  Renderer: () => {
20000
20308
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
20001
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20309
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20002
20310
  sx: {
20003
20311
  backgroundColor,
20004
20312
  fontSize: "0.8rem",
@@ -20018,7 +20326,7 @@ var floatType = defineEasyType({
20018
20326
  deserialize: (value) => parseFloat(value),
20019
20327
  Renderer: (param) => {
20020
20328
  let { value } = param;
20021
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
20329
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
20022
20330
  children: value
20023
20331
  });
20024
20332
  }
@@ -20032,7 +20340,7 @@ var intType = defineEasyType({
20032
20340
  deserialize: (value) => parseFloat(value),
20033
20341
  Renderer: (param) => {
20034
20342
  let { value } = param;
20035
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
20343
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
20036
20344
  children: value
20037
20345
  });
20038
20346
  }
@@ -20045,16 +20353,16 @@ var bigIntType = defineEasyType({
20045
20353
  deserialize: (value) => BigInt(value.replace(/\D/g, "")),
20046
20354
  Renderer: (param) => {
20047
20355
  let { value } = param;
20048
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
20356
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
20049
20357
  children: "".concat(value, "n")
20050
20358
  });
20051
20359
  }
20052
20360
  });
20053
20361
  var BaseIcon = (param) => {
20054
20362
  let { d: d2, ...props } = param;
20055
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.SvgIcon, {
20363
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.SvgIcon, {
20056
20364
  ...props,
20057
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("path", {
20365
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("path", {
20058
20366
  d: d2
20059
20367
  })
20060
20368
  });
@@ -20069,55 +20377,55 @@ var Edit = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.3
20069
20377
  var ExpandMore = "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z";
20070
20378
  var Delete = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z";
20071
20379
  var AddBoxIcon = (props) => {
20072
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
20380
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
20073
20381
  d: AddBox,
20074
20382
  ...props
20075
20383
  });
20076
20384
  };
20077
20385
  var CheckIcon = (props) => {
20078
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
20386
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
20079
20387
  d: Check2,
20080
20388
  ...props
20081
20389
  });
20082
20390
  };
20083
20391
  var ChevronRightIcon = (props) => {
20084
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
20392
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
20085
20393
  d: ChevronRight,
20086
20394
  ...props
20087
20395
  });
20088
20396
  };
20089
20397
  var CircularArrowsIcon = (props) => {
20090
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
20398
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
20091
20399
  d: CircularArrows,
20092
20400
  ...props
20093
20401
  });
20094
20402
  };
20095
20403
  var CloseIcon = (props) => {
20096
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
20404
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
20097
20405
  d: Close2,
20098
20406
  ...props
20099
20407
  });
20100
20408
  };
20101
20409
  var ContentCopyIcon = (props) => {
20102
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
20410
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
20103
20411
  d: ContentCopy2,
20104
20412
  ...props
20105
20413
  });
20106
20414
  };
20107
20415
  var EditIcon = (props) => {
20108
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
20416
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
20109
20417
  d: Edit,
20110
20418
  ...props
20111
20419
  });
20112
20420
  };
20113
20421
  var ExpandMoreIcon = (props) => {
20114
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
20422
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
20115
20423
  d: ExpandMore,
20116
20424
  ...props
20117
20425
  });
20118
20426
  };
20119
20427
  var DeleteIcon = (props) => {
20120
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
20428
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
20121
20429
  d: Delete,
20122
20430
  ...props
20123
20431
  });
@@ -20140,23 +20448,23 @@ function inspectMetadata(value) {
20140
20448
  var PreObjectType = (props) => {
20141
20449
  const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
20142
20450
  const textColor = useTextColor();
20143
- const isArrayLike = (0, import_react49.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
20451
+ const isArrayLike = (0, import_react50.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
20144
20452
  props.value
20145
20453
  ]);
20146
- const isEmptyValue = (0, import_react49.useMemo)(() => getValueSize(props.value) === 0, [
20454
+ const isEmptyValue = (0, import_react50.useMemo)(() => getValueSize(props.value) === 0, [
20147
20455
  props.value
20148
20456
  ]);
20149
- const sizeOfValue = (0, import_react49.useMemo)(() => inspectMetadata(props.value), [
20457
+ const sizeOfValue = (0, import_react50.useMemo)(() => inspectMetadata(props.value), [
20150
20458
  props.value
20151
20459
  ]);
20152
20460
  const displaySize = useJsonViewerStore((store) => store.displaySize);
20153
- const shouldDisplaySize = (0, import_react49.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
20461
+ const shouldDisplaySize = (0, import_react50.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
20154
20462
  displaySize,
20155
20463
  props.path,
20156
20464
  props.value
20157
20465
  ]);
20158
20466
  const isTrap = useIsCycleReference(props.path, props.value);
20159
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, {
20467
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, {
20160
20468
  component: "span",
20161
20469
  className: "data-object-start",
20162
20470
  sx: {
@@ -20164,7 +20472,7 @@ var PreObjectType = (props) => {
20164
20472
  },
20165
20473
  children: [
20166
20474
  isArrayLike ? arrayLb : objectLb,
20167
- shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20475
+ shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20168
20476
  component: "span",
20169
20477
  sx: {
20170
20478
  pl: 0.5,
@@ -20174,16 +20482,16 @@ var PreObjectType = (props) => {
20174
20482
  },
20175
20483
  children: sizeOfValue
20176
20484
  }),
20177
- isTrap && !props.inspect && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
20485
+ isTrap && !props.inspect && /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
20178
20486
  children: [
20179
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CircularArrowsIcon, {
20487
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CircularArrowsIcon, {
20180
20488
  sx: {
20181
20489
  fontSize: 12,
20182
20490
  color: textColor,
20183
20491
  mx: 0.5
20184
20492
  }
20185
20493
  }),
20186
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
20494
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
20187
20495
  sx: {
20188
20496
  cursor: "pointer",
20189
20497
  userSelect: "none"
@@ -20198,22 +20506,22 @@ var PreObjectType = (props) => {
20198
20506
  var PostObjectType = (props) => {
20199
20507
  const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
20200
20508
  const textColor = useTextColor();
20201
- const isArrayLike = (0, import_react49.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
20509
+ const isArrayLike = (0, import_react50.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
20202
20510
  props.value
20203
20511
  ]);
20204
- const isEmptyValue = (0, import_react49.useMemo)(() => getValueSize(props.value) === 0, [
20512
+ const isEmptyValue = (0, import_react50.useMemo)(() => getValueSize(props.value) === 0, [
20205
20513
  props.value
20206
20514
  ]);
20207
- const sizeOfValue = (0, import_react49.useMemo)(() => inspectMetadata(props.value), [
20515
+ const sizeOfValue = (0, import_react50.useMemo)(() => inspectMetadata(props.value), [
20208
20516
  props.value
20209
20517
  ]);
20210
20518
  const displaySize = useJsonViewerStore((store) => store.displaySize);
20211
- const shouldDisplaySize = (0, import_react49.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
20519
+ const shouldDisplaySize = (0, import_react50.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
20212
20520
  displaySize,
20213
20521
  props.path,
20214
20522
  props.value
20215
20523
  ]);
20216
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, {
20524
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, {
20217
20525
  component: "span",
20218
20526
  className: "data-object-end",
20219
20527
  sx: {
@@ -20224,7 +20532,7 @@ var PostObjectType = (props) => {
20224
20532
  },
20225
20533
  children: [
20226
20534
  isArrayLike ? arrayRb : objectRb,
20227
- shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20535
+ shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20228
20536
  component: "span",
20229
20537
  sx: {
20230
20538
  pl: 0.5,
@@ -20245,9 +20553,9 @@ var ObjectType = (props) => {
20245
20553
  const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
20246
20554
  const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
20247
20555
  const isTrap = useIsCycleReference(props.path, props.value);
20248
- const [displayLength, setDisplayLength] = (0, import_react49.useState)(useJsonViewerStore((store) => store.maxDisplayLength));
20556
+ const [displayLength, setDisplayLength] = (0, import_react50.useState)(useJsonViewerStore((store) => store.maxDisplayLength));
20249
20557
  const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
20250
- const elements = (0, import_react49.useMemo)(() => {
20558
+ const elements = (0, import_react50.useMemo)(() => {
20251
20559
  if (!props.inspect) {
20252
20560
  return null;
20253
20561
  }
@@ -20264,7 +20572,7 @@ var ObjectType = (props) => {
20264
20572
  ...props.path,
20265
20573
  key
20266
20574
  ];
20267
- elements3.push(/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
20575
+ elements3.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
20268
20576
  path,
20269
20577
  value: value2,
20270
20578
  prevValue: props.prevValue instanceof Map ? props.prevValue.get(k2) : void 0,
@@ -20280,7 +20588,7 @@ var ObjectType = (props) => {
20280
20588
  while (true) {
20281
20589
  const nextResult = iterator2.next();
20282
20590
  var _nextResult_done;
20283
- elements3.push(/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
20591
+ elements3.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
20284
20592
  path: [
20285
20593
  ...props.path,
20286
20594
  "iterator:".concat(count2)
@@ -20308,7 +20616,7 @@ var ObjectType = (props) => {
20308
20616
  ...props.path,
20309
20617
  index
20310
20618
  ];
20311
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
20619
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
20312
20620
  path,
20313
20621
  value: value2,
20314
20622
  prevValue: Array.isArray(props.prevValue) ? props.prevValue[index] : void 0,
@@ -20317,7 +20625,7 @@ var ObjectType = (props) => {
20317
20625
  });
20318
20626
  if (value.length > displayLength) {
20319
20627
  const rest = value.length - displayLength;
20320
- elements4.push(/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DataBox, {
20628
+ elements4.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
20321
20629
  sx: {
20322
20630
  cursor: "pointer",
20323
20631
  lineHeight: 1.5,
@@ -20340,7 +20648,7 @@ var ObjectType = (props) => {
20340
20648
  const prevElements = Array.isArray(props.prevValue) ? segmentArray(props.prevValue, groupArraysAfterLength) : void 0;
20341
20649
  const elementsLastIndex = elements3.length - 1;
20342
20650
  return elements3.map((list, index) => {
20343
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
20651
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
20344
20652
  path: props.path,
20345
20653
  value: list,
20346
20654
  nestedIndex: index,
@@ -20367,7 +20675,7 @@ var ObjectType = (props) => {
20367
20675
  ...props.path,
20368
20676
  key
20369
20677
  ];
20370
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
20678
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
20371
20679
  path,
20372
20680
  value: value2,
20373
20681
  prevValue: (_props_prevValue = props.prevValue) === null || _props_prevValue === void 0 ? void 0 : _props_prevValue[key],
@@ -20376,7 +20684,7 @@ var ObjectType = (props) => {
20376
20684
  });
20377
20685
  if (entries.length > displayLength) {
20378
20686
  const rest = entries.length - displayLength;
20379
- elements2.push(/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DataBox, {
20687
+ elements2.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
20380
20688
  sx: {
20381
20689
  cursor: "pointer",
20382
20690
  lineHeight: 1.5,
@@ -20408,13 +20716,13 @@ var ObjectType = (props) => {
20408
20716
  const marginLeft = props.inspect ? 0.6 : 0;
20409
20717
  const width = useJsonViewerStore((store) => store.indentWidth);
20410
20718
  const indentWidth = props.inspect ? width - marginLeft : width;
20411
- const isEmptyValue = (0, import_react49.useMemo)(() => getValueSize(props.value) === 0, [
20719
+ const isEmptyValue = (0, import_react50.useMemo)(() => getValueSize(props.value) === 0, [
20412
20720
  props.value
20413
20721
  ]);
20414
20722
  if (isEmptyValue) {
20415
20723
  return null;
20416
20724
  }
20417
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20725
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20418
20726
  className: "data-object",
20419
20727
  sx: {
20420
20728
  display: props.inspect ? "block" : "inline-block",
@@ -20423,7 +20731,7 @@ var ObjectType = (props) => {
20423
20731
  color: keyColor,
20424
20732
  borderLeft: props.inspect ? "1px solid ".concat(borderColor) : "none"
20425
20733
  },
20426
- children: props.inspect ? elements : !isTrap && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20734
+ children: props.inspect ? elements : !isTrap && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20427
20735
  component: "span",
20428
20736
  className: "data-object-body",
20429
20737
  onClick: () => props.setInspect(true),
@@ -20451,11 +20759,11 @@ var stringType = defineEasyType({
20451
20759
  serialize: (value) => value,
20452
20760
  deserialize: (value) => value,
20453
20761
  Renderer: (props) => {
20454
- const [showRest, setShowRest] = (0, import_react49.useState)(false);
20762
+ const [showRest, setShowRest] = (0, import_react50.useState)(false);
20455
20763
  const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
20456
20764
  const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
20457
20765
  const hasRest = props.value.length > collapseStringsAfterLength;
20458
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, {
20766
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, {
20459
20767
  component: "span",
20460
20768
  sx: {
20461
20769
  overflowWrap: "anywhere",
@@ -20473,7 +20781,7 @@ var stringType = defineEasyType({
20473
20781
  children: [
20474
20782
  '"',
20475
20783
  value,
20476
- hasRest && !showRest && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20784
+ hasRest && !showRest && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20477
20785
  component: "span",
20478
20786
  sx: {
20479
20787
  padding: 0.5
@@ -20492,7 +20800,7 @@ var undefinedType = defineEasyType({
20492
20800
  displayTypeLabel: false,
20493
20801
  Renderer: () => {
20494
20802
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
20495
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20803
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20496
20804
  sx: {
20497
20805
  fontSize: "0.7rem",
20498
20806
  backgroundColor,
@@ -20508,17 +20816,17 @@ function memorizeDataType(dataType) {
20508
20816
  var _prevProps_path, _nextProps_path;
20509
20817
  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("."));
20510
20818
  }
20511
- dataType.Component = /* @__PURE__ */ (0, import_react49.memo)(dataType.Component, compare);
20819
+ dataType.Component = /* @__PURE__ */ (0, import_react50.memo)(dataType.Component, compare);
20512
20820
  if (dataType.Editor) {
20513
- dataType.Editor = /* @__PURE__ */ (0, import_react49.memo)(dataType.Editor, function compare2(prevProps, nextProps) {
20821
+ dataType.Editor = /* @__PURE__ */ (0, import_react50.memo)(dataType.Editor, function compare2(prevProps, nextProps) {
20514
20822
  return Object.is(prevProps.value, nextProps.value);
20515
20823
  });
20516
20824
  }
20517
20825
  if (dataType.PreComponent) {
20518
- dataType.PreComponent = /* @__PURE__ */ (0, import_react49.memo)(dataType.PreComponent, compare);
20826
+ dataType.PreComponent = /* @__PURE__ */ (0, import_react50.memo)(dataType.PreComponent, compare);
20519
20827
  }
20520
20828
  if (dataType.PostComponent) {
20521
- dataType.PostComponent = /* @__PURE__ */ (0, import_react49.memo)(dataType.PostComponent, compare);
20829
+ dataType.PostComponent = /* @__PURE__ */ (0, import_react50.memo)(dataType.PostComponent, compare);
20522
20830
  }
20523
20831
  return dataType;
20524
20832
  }
@@ -20544,10 +20852,10 @@ var createTypeRegistryStore = () => {
20544
20852
  }
20545
20853
  }));
20546
20854
  };
20547
- var TypeRegistryStoreContext = /* @__PURE__ */ (0, import_react49.createContext)(void 0);
20855
+ var TypeRegistryStoreContext = /* @__PURE__ */ (0, import_react50.createContext)(void 0);
20548
20856
  TypeRegistryStoreContext.Provider;
20549
20857
  var useTypeRegistryStore = (selector2, equalityFn) => {
20550
- const store = (0, import_react49.useContext)(TypeRegistryStoreContext);
20858
+ const store = (0, import_react50.useContext)(TypeRegistryStoreContext);
20551
20859
  return (0, import_zustand.useStore)(store, selector2, equalityFn);
20552
20860
  };
20553
20861
  function matchTypeComponents(value, path, registry) {
@@ -20567,13 +20875,13 @@ function matchTypeComponents(value, path, registry) {
20567
20875
  }
20568
20876
  function useTypeComponents(value, path) {
20569
20877
  const registry = useTypeRegistryStore((store) => store.registry);
20570
- return (0, import_react49.useMemo)(() => matchTypeComponents(value, path, registry), [
20878
+ return (0, import_react50.useMemo)(() => matchTypeComponents(value, path, registry), [
20571
20879
  value,
20572
20880
  path,
20573
20881
  registry
20574
20882
  ]);
20575
20883
  }
20576
- var IconBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
20884
+ var IconBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20577
20885
  component: "span",
20578
20886
  ...props,
20579
20887
  sx: {
@@ -20588,7 +20896,7 @@ var DataKeyPair = (props) => {
20588
20896
  var _props_editable;
20589
20897
  const propsEditable = (_props_editable = props.editable) !== null && _props_editable !== void 0 ? _props_editable : void 0;
20590
20898
  const storeEditable = useJsonViewerStore((store) => store.editable);
20591
- const editable = (0, import_react49.useMemo)(() => {
20899
+ const editable = (0, import_react50.useMemo)(() => {
20592
20900
  if (storeEditable === false) {
20593
20901
  return false;
20594
20902
  }
@@ -20605,11 +20913,11 @@ var DataKeyPair = (props) => {
20605
20913
  storeEditable,
20606
20914
  value
20607
20915
  ]);
20608
- const [tempValue, setTempValue] = (0, import_react49.useState)("");
20916
+ const [tempValue, setTempValue] = (0, import_react50.useState)("");
20609
20917
  const depth = path.length;
20610
20918
  const key = path[depth - 1];
20611
20919
  const hoverPath = useJsonViewerStore((store) => store.hoverPath);
20612
- const isHover = (0, import_react49.useMemo)(() => {
20920
+ const isHover = (0, import_react50.useMemo)(() => {
20613
20921
  return hoverPath && path.every((value2, index) => value2 === hoverPath.path[index] && nestedIndex === hoverPath.nestedIndex);
20614
20922
  }, [
20615
20923
  hoverPath,
@@ -20619,7 +20927,7 @@ var DataKeyPair = (props) => {
20619
20927
  const setHover = useJsonViewerStore((store) => store.setHover);
20620
20928
  const root2 = useJsonViewerStore((store) => store.value);
20621
20929
  const [inspect, setInspect] = useInspect(path, value, nestedIndex);
20622
- const [editing, setEditing] = (0, import_react49.useState)(false);
20930
+ const [editing, setEditing] = (0, import_react50.useState)(false);
20623
20931
  const onChange = useJsonViewerStore((store) => store.onChange);
20624
20932
  const keyColor = useTextColor();
20625
20933
  const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
@@ -20631,7 +20939,7 @@ var DataKeyPair = (props) => {
20631
20939
  const isNumberKey = Number.isInteger(Number(key));
20632
20940
  const storeEnableAdd = useJsonViewerStore((store) => store.enableAdd);
20633
20941
  const onAdd = useJsonViewerStore((store) => store.onAdd);
20634
- const enableAdd = (0, import_react49.useMemo)(() => {
20942
+ const enableAdd = (0, import_react50.useMemo)(() => {
20635
20943
  if (!onAdd || nestedIndex !== void 0) return false;
20636
20944
  if (storeEnableAdd === false) {
20637
20945
  return false;
@@ -20656,7 +20964,7 @@ var DataKeyPair = (props) => {
20656
20964
  ]);
20657
20965
  const storeEnableDelete = useJsonViewerStore((store) => store.enableDelete);
20658
20966
  const onDelete = useJsonViewerStore((store) => store.onDelete);
20659
- const enableDelete = (0, import_react49.useMemo)(() => {
20967
+ const enableDelete = (0, import_react50.useMemo)(() => {
20660
20968
  if (!onDelete || nestedIndex !== void 0) return false;
20661
20969
  if (isRoot) {
20662
20970
  return false;
@@ -20683,7 +20991,7 @@ var DataKeyPair = (props) => {
20683
20991
  const enableClipboard = useJsonViewerStore((store) => store.enableClipboard);
20684
20992
  const { copy, copied } = useClipboard();
20685
20993
  const highlightUpdates = useJsonViewerStore((store) => store.highlightUpdates);
20686
- const isHighlight = (0, import_react49.useMemo)(() => {
20994
+ const isHighlight = (0, import_react50.useMemo)(() => {
20687
20995
  if (!highlightUpdates || prevValue === void 0) return false;
20688
20996
  if (typeof value !== typeof prevValue) {
20689
20997
  return true;
@@ -20707,8 +21015,8 @@ var DataKeyPair = (props) => {
20707
21015
  prevValue,
20708
21016
  value
20709
21017
  ]);
20710
- const highlightContainer = (0, import_react49.useRef)();
20711
- (0, import_react49.useEffect)(() => {
21018
+ const highlightContainer = (0, import_react50.useRef)();
21019
+ (0, import_react50.useEffect)(() => {
20712
21020
  if (highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
20713
21021
  highlightContainer.current.animate([
20714
21022
  {
@@ -20728,7 +21036,7 @@ var DataKeyPair = (props) => {
20728
21036
  prevValue,
20729
21037
  value
20730
21038
  ]);
20731
- const startEditing = (0, import_react49.useCallback)((event) => {
21039
+ const startEditing = (0, import_react50.useCallback)((event) => {
20732
21040
  event.preventDefault();
20733
21041
  if (serialize) setTempValue(serialize(value));
20734
21042
  setEditing(true);
@@ -20736,14 +21044,14 @@ var DataKeyPair = (props) => {
20736
21044
  serialize,
20737
21045
  value
20738
21046
  ]);
20739
- const abortEditing = (0, import_react49.useCallback)(() => {
21047
+ const abortEditing = (0, import_react50.useCallback)(() => {
20740
21048
  setEditing(false);
20741
21049
  setTempValue("");
20742
21050
  }, [
20743
21051
  setEditing,
20744
21052
  setTempValue
20745
21053
  ]);
20746
- const commitEditing = (0, import_react49.useCallback)((newValue) => {
21054
+ const commitEditing = (0, import_react50.useCallback)((newValue) => {
20747
21055
  setEditing(false);
20748
21056
  if (!deserialize) return;
20749
21057
  try {
@@ -20757,20 +21065,20 @@ var DataKeyPair = (props) => {
20757
21065
  path,
20758
21066
  value
20759
21067
  ]);
20760
- const actionIcons = (0, import_react49.useMemo)(() => {
21068
+ const actionIcons = (0, import_react50.useMemo)(() => {
20761
21069
  if (editing) {
20762
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
21070
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
20763
21071
  children: [
20764
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
20765
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CloseIcon, {
21072
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
21073
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CloseIcon, {
20766
21074
  sx: {
20767
21075
  fontSize: ".8rem"
20768
21076
  },
20769
21077
  onClick: abortEditing
20770
21078
  })
20771
21079
  }),
20772
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
20773
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CheckIcon, {
21080
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
21081
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CheckIcon, {
20774
21082
  sx: {
20775
21083
  fontSize: ".8rem"
20776
21084
  },
@@ -20780,9 +21088,9 @@ var DataKeyPair = (props) => {
20780
21088
  ]
20781
21089
  });
20782
21090
  }
20783
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
21091
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
20784
21092
  children: [
20785
- enableClipboard && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
21093
+ enableClipboard && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20786
21094
  onClick: (event) => {
20787
21095
  event.preventDefault();
20788
21096
  try {
@@ -20791,41 +21099,41 @@ var DataKeyPair = (props) => {
20791
21099
  console.error(e2);
20792
21100
  }
20793
21101
  },
20794
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CheckIcon, {
21102
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CheckIcon, {
20795
21103
  sx: {
20796
21104
  fontSize: ".8rem"
20797
21105
  }
20798
- }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ContentCopyIcon, {
21106
+ }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ContentCopyIcon, {
20799
21107
  sx: {
20800
21108
  fontSize: ".8rem"
20801
21109
  }
20802
21110
  })
20803
21111
  }),
20804
- Editor && editable && serialize && deserialize && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
21112
+ Editor && editable && serialize && deserialize && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20805
21113
  onClick: startEditing,
20806
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(EditIcon, {
21114
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(EditIcon, {
20807
21115
  sx: {
20808
21116
  fontSize: ".8rem"
20809
21117
  }
20810
21118
  })
20811
21119
  }),
20812
- enableAdd && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
21120
+ enableAdd && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20813
21121
  onClick: (event) => {
20814
21122
  event.preventDefault();
20815
21123
  onAdd === null || onAdd === void 0 ? void 0 : onAdd(path);
20816
21124
  },
20817
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(AddBoxIcon, {
21125
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(AddBoxIcon, {
20818
21126
  sx: {
20819
21127
  fontSize: ".8rem"
20820
21128
  }
20821
21129
  })
20822
21130
  }),
20823
- enableDelete && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
21131
+ enableDelete && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
20824
21132
  onClick: (event) => {
20825
21133
  event.preventDefault();
20826
21134
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(path, value);
20827
21135
  },
20828
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DeleteIcon, {
21136
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DeleteIcon, {
20829
21137
  sx: {
20830
21138
  fontSize: ".9rem"
20831
21139
  }
@@ -20853,12 +21161,12 @@ var DataKeyPair = (props) => {
20853
21161
  abortEditing,
20854
21162
  commitEditing
20855
21163
  ]);
20856
- const isEmptyValue = (0, import_react49.useMemo)(() => getValueSize(value) === 0, [
21164
+ const isEmptyValue = (0, import_react50.useMemo)(() => getValueSize(value) === 0, [
20857
21165
  value
20858
21166
  ]);
20859
21167
  const expandable = !isEmptyValue && !!(PreComponent && PostComponent);
20860
21168
  const KeyRenderer = useJsonViewerStore((store) => store.keyRenderer);
20861
- const downstreamProps = (0, import_react49.useMemo)(() => ({
21169
+ const downstreamProps = (0, import_react50.useMemo)(() => ({
20862
21170
  path,
20863
21171
  inspect,
20864
21172
  setInspect,
@@ -20873,19 +21181,19 @@ var DataKeyPair = (props) => {
20873
21181
  prevValue,
20874
21182
  nestedIndex
20875
21183
  ]);
20876
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, {
21184
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, {
20877
21185
  className: "data-key-pair",
20878
21186
  "data-testid": "data-key-pair" + path.join("."),
20879
21187
  sx: {
20880
21188
  userSelect: "text"
20881
21189
  },
20882
- onMouseEnter: (0, import_react49.useCallback)(() => setHover(path, nestedIndex), [
21190
+ onMouseEnter: (0, import_react50.useCallback)(() => setHover(path, nestedIndex), [
20883
21191
  setHover,
20884
21192
  path,
20885
21193
  nestedIndex
20886
21194
  ]),
20887
21195
  children: [
20888
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DataBox, {
21196
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
20889
21197
  component: "span",
20890
21198
  className: "data-key",
20891
21199
  sx: {
@@ -20894,7 +21202,7 @@ var DataKeyPair = (props) => {
20894
21202
  letterSpacing: 0.5,
20895
21203
  opacity: 0.8
20896
21204
  },
20897
- onClick: (0, import_react49.useCallback)((event) => {
21205
+ onClick: (0, import_react50.useCallback)((event) => {
20898
21206
  if (event.isDefaultPrevented()) {
20899
21207
  return;
20900
21208
  }
@@ -20906,7 +21214,7 @@ var DataKeyPair = (props) => {
20906
21214
  setInspect
20907
21215
  ]),
20908
21216
  children: [
20909
- expandable ? inspect ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ExpandMoreIcon, {
21217
+ expandable ? inspect ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ExpandMoreIcon, {
20910
21218
  className: "data-key-toggle-expanded",
20911
21219
  sx: {
20912
21220
  fontSize: ".8rem",
@@ -20914,7 +21222,7 @@ var DataKeyPair = (props) => {
20914
21222
  cursor: "pointer"
20915
21223
  }
20916
21224
  }
20917
- }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ChevronRightIcon, {
21225
+ }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ChevronRightIcon, {
20918
21226
  className: "data-key-toggle-collapsed",
20919
21227
  sx: {
20920
21228
  fontSize: ".8rem",
@@ -20923,44 +21231,44 @@ var DataKeyPair = (props) => {
20923
21231
  }
20924
21232
  }
20925
21233
  }) : null,
20926
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
21234
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20927
21235
  ref: highlightContainer,
20928
21236
  className: "data-key-key",
20929
21237
  component: "span",
20930
- children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
21238
+ children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
20931
21239
  children: [
20932
21240
  '"',
20933
21241
  rootName,
20934
21242
  '"'
20935
21243
  ]
20936
- }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
21244
+ }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
20937
21245
  children: rootName
20938
- }) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(KeyRenderer, {
21246
+ }) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(KeyRenderer, {
20939
21247
  ...downstreamProps
20940
- }) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
21248
+ }) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20941
21249
  component: "span",
20942
21250
  style: {
20943
21251
  color: numberKeyColor,
20944
21252
  userSelect: isNumberKey ? "none" : "auto"
20945
21253
  },
20946
21254
  children: key
20947
- }) : quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
21255
+ }) : quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
20948
21256
  children: [
20949
21257
  '"',
20950
21258
  key,
20951
21259
  '"'
20952
21260
  ]
20953
- }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
21261
+ }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
20954
21262
  children: key
20955
21263
  }))
20956
21264
  }),
20957
- isRoot ? rootName !== false && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
21265
+ isRoot ? rootName !== false && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
20958
21266
  className: "data-key-colon",
20959
21267
  sx: {
20960
21268
  mr: 0.5
20961
21269
  },
20962
21270
  children: ":"
20963
- }) : nestedIndex === void 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
21271
+ }) : nestedIndex === void 0 && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
20964
21272
  className: "data-key-colon",
20965
21273
  sx: {
20966
21274
  mr: 0.5,
@@ -20971,29 +21279,29 @@ var DataKeyPair = (props) => {
20971
21279
  },
20972
21280
  children: ":"
20973
21281
  }),
20974
- PreComponent && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(PreComponent, {
21282
+ PreComponent && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PreComponent, {
20975
21283
  ...downstreamProps
20976
21284
  }),
20977
21285
  isHover && expandable && inspect && actionIcons
20978
21286
  ]
20979
21287
  }),
20980
- editing && editable ? Editor && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Editor, {
21288
+ editing && editable ? Editor && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Editor, {
20981
21289
  path,
20982
21290
  value: tempValue,
20983
21291
  setValue: setTempValue,
20984
21292
  abortEditing,
20985
21293
  commitEditing
20986
- }) : Component ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Component, {
21294
+ }) : Component ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Component, {
20987
21295
  ...downstreamProps
20988
- }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, {
21296
+ }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, {
20989
21297
  component: "span",
20990
21298
  className: "data-value-fallback",
20991
21299
  children: "fallback: ".concat(value)
20992
21300
  }),
20993
- PostComponent && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(PostComponent, {
21301
+ PostComponent && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PostComponent, {
20994
21302
  ...downstreamProps
20995
21303
  }),
20996
- !last && displayComma && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
21304
+ !last && displayComma && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
20997
21305
  children: ","
20998
21306
  }),
20999
21307
  isHover && expandable && !inspect && actionIcons,
@@ -21004,8 +21312,8 @@ var DataKeyPair = (props) => {
21004
21312
  };
21005
21313
  var query = "(prefers-color-scheme: dark)";
21006
21314
  function useThemeDetector() {
21007
- const [isDark, setIsDark] = (0, import_react49.useState)(false);
21008
- (0, import_react49.useEffect)(() => {
21315
+ const [isDark, setIsDark] = (0, import_react50.useState)(false);
21316
+ (0, import_react50.useEffect)(() => {
21009
21317
  const listener = (e2) => setIsDark(e2.matches);
21010
21318
  setIsDark(window.matchMedia(query).matches);
21011
21319
  const queryMedia = window.matchMedia(query);
@@ -21015,8 +21323,8 @@ function useThemeDetector() {
21015
21323
  return isDark;
21016
21324
  }
21017
21325
  function useSetIfNotUndefinedEffect(key, value) {
21018
- const { setState } = (0, import_react49.useContext)(JsonViewerStoreContext);
21019
- (0, import_react49.useEffect)(() => {
21326
+ const { setState } = (0, import_react50.useContext)(JsonViewerStoreContext);
21327
+ (0, import_react50.useEffect)(() => {
21020
21328
  if (value !== void 0) {
21021
21329
  setState({
21022
21330
  [key]: value
@@ -21029,8 +21337,8 @@ function useSetIfNotUndefinedEffect(key, value) {
21029
21337
  ]);
21030
21338
  }
21031
21339
  var JsonViewerInner = (props) => {
21032
- const { setState } = (0, import_react49.useContext)(JsonViewerStoreContext);
21033
- (0, import_react49.useEffect)(() => {
21340
+ const { setState } = (0, import_react50.useContext)(JsonViewerStoreContext);
21341
+ (0, import_react50.useEffect)(() => {
21034
21342
  setState((state) => ({
21035
21343
  prevValue: state.value,
21036
21344
  value: props.value
@@ -21058,7 +21366,7 @@ var JsonViewerInner = (props) => {
21058
21366
  useSetIfNotUndefinedEffect("displaySize", props.displaySize);
21059
21367
  useSetIfNotUndefinedEffect("displayComma", props.displayComma);
21060
21368
  useSetIfNotUndefinedEffect("highlightUpdates", props.highlightUpdates);
21061
- (0, import_react49.useEffect)(() => {
21369
+ (0, import_react50.useEffect)(() => {
21062
21370
  if (props.theme === "light") {
21063
21371
  setState({
21064
21372
  colorspace: lightColorspace
@@ -21076,13 +21384,13 @@ var JsonViewerInner = (props) => {
21076
21384
  setState,
21077
21385
  props.theme
21078
21386
  ]);
21079
- const themeCls = (0, import_react49.useMemo)(() => {
21387
+ const themeCls = (0, import_react50.useMemo)(() => {
21080
21388
  if (typeof props.theme === "object") return "json-viewer-theme-custom";
21081
21389
  return props.theme === "dark" ? "json-viewer-theme-dark" : "json-viewer-theme-light";
21082
21390
  }, [
21083
21391
  props.theme
21084
21392
  ]);
21085
- const onceRef = (0, import_react49.useRef)(true);
21393
+ const onceRef = (0, import_react50.useRef)(true);
21086
21394
  const registerTypes = useTypeRegistryStore((store) => store.registerTypes);
21087
21395
  if (onceRef.current) {
21088
21396
  const allTypes = props.valueTypes ? [
@@ -21094,7 +21402,7 @@ var JsonViewerInner = (props) => {
21094
21402
  registerTypes(allTypes);
21095
21403
  onceRef.current = false;
21096
21404
  }
21097
- (0, import_react49.useEffect)(() => {
21405
+ (0, import_react50.useEffect)(() => {
21098
21406
  const allTypes = props.valueTypes ? [
21099
21407
  ...predefinedTypes,
21100
21408
  ...props.valueTypes
@@ -21108,12 +21416,12 @@ var JsonViewerInner = (props) => {
21108
21416
  ]);
21109
21417
  const value = useJsonViewerStore((store) => store.value);
21110
21418
  const prevValue = useJsonViewerStore((store) => store.prevValue);
21111
- const emptyPath = (0, import_react49.useMemo)(() => [], []);
21419
+ const emptyPath = (0, import_react50.useMemo)(() => [], []);
21112
21420
  const setHover = useJsonViewerStore((store) => store.setHover);
21113
- const onMouseLeave = (0, import_react49.useCallback)(() => setHover(null), [
21421
+ const onMouseLeave = (0, import_react50.useCallback)(() => setHover(null), [
21114
21422
  setHover
21115
21423
  ]);
21116
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Paper, {
21424
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Paper, {
21117
21425
  elevation: 0,
21118
21426
  className: clsx(themeCls, props.className),
21119
21427
  style: props.style,
@@ -21124,7 +21432,7 @@ var JsonViewerInner = (props) => {
21124
21432
  ...props.sx
21125
21433
  },
21126
21434
  onMouseLeave,
21127
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
21435
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
21128
21436
  value,
21129
21437
  prevValue,
21130
21438
  path: emptyPath,
@@ -21139,17 +21447,17 @@ var JsonViewer = function JsonViewer2(props) {
21139
21447
  }
21140
21448
  }
21141
21449
  const isAutoDarkTheme = useThemeDetector();
21142
- const themeType = (0, import_react49.useMemo)(() => {
21450
+ const themeType = (0, import_react50.useMemo)(() => {
21143
21451
  var _props_theme;
21144
21452
  return props.theme === "auto" ? isAutoDarkTheme ? "dark" : "light" : (_props_theme = props.theme) !== null && _props_theme !== void 0 ? _props_theme : "light";
21145
21453
  }, [
21146
21454
  isAutoDarkTheme,
21147
21455
  props.theme
21148
21456
  ]);
21149
- const theme = (0, import_react49.useMemo)(() => {
21457
+ const theme = (0, import_react50.useMemo)(() => {
21150
21458
  const backgroundColor = typeof themeType === "object" ? themeType.base00 : themeType === "dark" ? darkColorspace.base00 : lightColorspace.base00;
21151
21459
  const foregroundColor = typeof themeType === "object" ? themeType.base07 : themeType === "dark" ? darkColorspace.base07 : lightColorspace.base07;
21152
- return (0, import_material13.createTheme)({
21460
+ return (0, import_material14.createTheme)({
21153
21461
  components: {
21154
21462
  MuiPaper: {
21155
21463
  styleOverrides: {
@@ -21174,15 +21482,15 @@ var JsonViewer = function JsonViewer2(props) {
21174
21482
  ...props,
21175
21483
  theme: themeType
21176
21484
  };
21177
- const jsonViewerStore = (0, import_react49.useMemo)(() => createJsonViewerStore(props), []);
21178
- const typeRegistryStore = (0, import_react49.useMemo)(() => createTypeRegistryStore(), []);
21179
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.ThemeProvider, {
21485
+ const jsonViewerStore = (0, import_react50.useMemo)(() => createJsonViewerStore(props), []);
21486
+ const typeRegistryStore = (0, import_react50.useMemo)(() => createTypeRegistryStore(), []);
21487
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.ThemeProvider, {
21180
21488
  theme,
21181
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TypeRegistryStoreContext.Provider, {
21489
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(TypeRegistryStoreContext.Provider, {
21182
21490
  value: typeRegistryStore,
21183
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(JsonViewerStoreContext.Provider, {
21491
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(JsonViewerStoreContext.Provider, {
21184
21492
  value: jsonViewerStore,
21185
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(JsonViewerInner, {
21493
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(JsonViewerInner, {
21186
21494
  ...mixedProps
21187
21495
  })
21188
21496
  })
@@ -21191,8 +21499,8 @@ var JsonViewer = function JsonViewer2(props) {
21191
21499
  };
21192
21500
 
21193
21501
  // src/components/event-details/payload-viewer.tsx
21194
- var import_react50 = require("react");
21195
- var import_jsx_runtime136 = require("react/jsx-runtime");
21502
+ var import_react51 = require("react");
21503
+ var import_jsx_runtime137 = require("react/jsx-runtime");
21196
21504
  function tryParseJson(value) {
21197
21505
  if (typeof value !== "string") {
21198
21506
  return value;
@@ -21203,9 +21511,9 @@ function tryParseJson(value) {
21203
21511
  return value;
21204
21512
  }
21205
21513
  }
21206
- var PayloadViewer = (0, import_react50.memo)(({ sx, testId, value }) => {
21207
- const theme = (0, import_material14.useTheme)();
21208
- return /* @__PURE__ */ (0, import_jsx_runtime136.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_runtime136.jsx)(
21514
+ var PayloadViewer = (0, import_react51.memo)(({ sx, testId, value }) => {
21515
+ const theme = (0, import_material15.useTheme)();
21516
+ return /* @__PURE__ */ (0, import_jsx_runtime137.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_runtime137.jsx)(
21209
21517
  JsonViewer,
21210
21518
  {
21211
21519
  displayDataTypes: false,
@@ -21219,21 +21527,21 @@ var PayloadViewer = (0, import_react50.memo)(({ sx, testId, value }) => {
21219
21527
  });
21220
21528
 
21221
21529
  // src/components/event-details/event-detail.tsx
21222
- var import_jsx_runtime137 = require("react/jsx-runtime");
21223
- var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
21224
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
21225
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
21530
+ var import_jsx_runtime138 = require("react/jsx-runtime");
21531
+ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
21532
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
21533
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
21226
21534
  ] });
21227
21535
  var EventMessage = ({ event }) => {
21228
- const [isOpen, setIsOpen] = (0, import_react51.useState)(false);
21229
- const [isOverflowing, setIsOverflowing] = (0, import_react51.useState)(false);
21230
- const textReference = (0, import_react51.useRef)(null);
21231
- const parsedMessage = (0, import_react51.useMemo)(() => parseEventMessage(event), [event]);
21232
- const isIAMPolicyEvent = (0, import_react51.useMemo)(
21536
+ const [isOpen, setIsOpen] = (0, import_react52.useState)(false);
21537
+ const [isOverflowing, setIsOverflowing] = (0, import_react52.useState)(false);
21538
+ const textReference = (0, import_react52.useRef)(null);
21539
+ const parsedMessage = (0, import_react52.useMemo)(() => parseEventMessage(event), [event]);
21540
+ const isIAMPolicyEvent = (0, import_react52.useMemo)(
21233
21541
  () => event.event_type === "iam.policy_evaluation" && event.attributes?.payload && typeof event.attributes.payload === "string",
21234
21542
  [event]
21235
21543
  );
21236
- (0, import_react51.useEffect)(() => {
21544
+ (0, import_react52.useEffect)(() => {
21237
21545
  const checkOverflow = () => {
21238
21546
  const element = textReference.current;
21239
21547
  if (element) {
@@ -21246,29 +21554,29 @@ var EventMessage = ({ event }) => {
21246
21554
  window.removeEventListener("resize", checkOverflow);
21247
21555
  };
21248
21556
  }, [parsedMessage.headline]);
21249
- const hasAdditionalContent = (0, import_react51.useMemo)(
21557
+ const hasAdditionalContent = (0, import_react52.useMemo)(
21250
21558
  () => parsedMessage.message || parsedMessage.details || isIAMPolicyEvent,
21251
21559
  [parsedMessage.message, parsedMessage.details, isIAMPolicyEvent]
21252
21560
  );
21253
- const shouldShowToggle = (0, import_react51.useMemo)(
21561
+ const shouldShowToggle = (0, import_react52.useMemo)(
21254
21562
  () => isOverflowing || hasAdditionalContent,
21255
21563
  [isOverflowing, hasAdditionalContent]
21256
21564
  );
21257
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
21258
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { sx: { alignItems: "center", display: "flex" }, children: [
21259
- Boolean(shouldShowToggle) && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
21260
- import_material15.IconButton,
21565
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
21566
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { sx: { alignItems: "center", display: "flex" }, children: [
21567
+ Boolean(shouldShowToggle) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
21568
+ import_material16.IconButton,
21261
21569
  {
21262
21570
  onClick: () => {
21263
21571
  setIsOpen(!isOpen);
21264
21572
  },
21265
21573
  size: "small",
21266
21574
  sx: { mr: 1, p: 0 },
21267
- children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons_material8.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons_material8.KeyboardArrowRight, { sx: { fontSize: 16 } })
21575
+ children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material9.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material9.KeyboardArrowRight, { sx: { fontSize: 16 } })
21268
21576
  }
21269
21577
  ),
21270
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
21271
- import_material15.Typography,
21578
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
21579
+ import_material16.Typography,
21272
21580
  {
21273
21581
  ref: textReference,
21274
21582
  sx: {
@@ -21285,12 +21593,12 @@ var EventMessage = ({ event }) => {
21285
21593
  }
21286
21594
  )
21287
21595
  ] }),
21288
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime137.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_runtime137.jsx)(IAMEventDetail, { event }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, { children: [
21289
- Boolean(parsedMessage.message) && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DetailRow2, { content: parsedMessage.message, label: "Message" }),
21290
- Boolean(parsedMessage.details) && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
21596
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime138.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_runtime138.jsx)(IAMEventDetail, { event }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_jsx_runtime138.Fragment, { children: [
21597
+ Boolean(parsedMessage.message) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(DetailRow2, { content: parsedMessage.message, label: "Message" }),
21598
+ Boolean(parsedMessage.details) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
21291
21599
  DetailRow2,
21292
21600
  {
21293
- content: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
21601
+ content: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
21294
21602
  label: "Details"
21295
21603
  }
21296
21604
  )
@@ -21323,15 +21631,15 @@ var EventDetail = ({
21323
21631
  type
21324
21632
  }) => {
21325
21633
  if (type === "permission") {
21326
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(IAMPermissionDetail, { events, spanStatusCode });
21634
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(IAMPermissionDetail, { events, spanStatusCode });
21327
21635
  }
21328
21636
  const eventLevel = getEventLevelFromGroup(type);
21329
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { children: [
21330
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
21331
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(StatusIcon2, { errorLevel: eventLevel }),
21332
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
21637
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
21638
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
21639
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(StatusIcon2, { errorLevel: eventLevel }),
21640
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
21333
21641
  ] }),
21334
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Box, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
21642
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Box, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
21335
21643
  ] });
21336
21644
  };
21337
21645
 
@@ -31288,9 +31596,9 @@ var QueryStatus = {
31288
31596
  };
31289
31597
 
31290
31598
  // src/components/event-details/lambda-invoke-logs-section.tsx
31291
- var import_material16 = require("@mui/material");
31292
- var import_react52 = require("react");
31293
- var import_jsx_runtime138 = require("react/jsx-runtime");
31599
+ var import_material17 = require("@mui/material");
31600
+ var import_react53 = require("react");
31601
+ var import_jsx_runtime139 = require("react/jsx-runtime");
31294
31602
  var POLL_INTERVAL_MS2 = 1e3;
31295
31603
  async function pollQueryResults(client, queryId) {
31296
31604
  return client.send(new GetQueryResultsCommand({ queryId }));
@@ -31307,7 +31615,7 @@ async function startLambdaLogsQuery(client, functionName2, requestId, startTimeS
31307
31615
  }
31308
31616
  function useCloudWatchLogsClient(region) {
31309
31617
  const { localstackEndpoint } = useAppInspector();
31310
- const client = (0, import_react52.useMemo)(() => new CloudWatchLogsClient({
31618
+ const client = (0, import_react53.useMemo)(() => new CloudWatchLogsClient({
31311
31619
  credentials: {
31312
31620
  accessKeyId: "test",
31313
31621
  secretAccessKey: "test"
@@ -31318,12 +31626,12 @@ function useCloudWatchLogsClient(region) {
31318
31626
  return client;
31319
31627
  }
31320
31628
  function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano) {
31321
- const [loading, setLoading] = (0, import_react52.useState)(true);
31322
- const [logs, setLogs] = (0, import_react52.useState)([]);
31323
- const [error, setError] = (0, import_react52.useState)();
31324
- const pollTimerRef = (0, import_react52.useRef)(null);
31629
+ const [loading, setLoading] = (0, import_react53.useState)(true);
31630
+ const [logs, setLogs] = (0, import_react53.useState)([]);
31631
+ const [error, setError] = (0, import_react53.useState)();
31632
+ const pollTimerRef = (0, import_react53.useRef)(null);
31325
31633
  const cloudWatchLogs = useCloudWatchLogsClient(region);
31326
- (0, import_react52.useEffect)(() => {
31634
+ (0, import_react53.useEffect)(() => {
31327
31635
  let cancelled = false;
31328
31636
  const startTimeSec = Math.floor(Number(BigInt(startTimeNano) / BigInt(1e9)));
31329
31637
  const endTimeSec = Math.ceil(Number(BigInt(endTimeNano) / BigInt(1e9)));
@@ -31380,30 +31688,30 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
31380
31688
  var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, region, requestId, startTimeNano }) => {
31381
31689
  const { error, loading, logs } = useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano);
31382
31690
  if (loading) {
31383
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Stack, { alignItems: "center", direction: "row", spacing: 1, children: [
31384
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.CircularProgress, { size: 14 }),
31385
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
31691
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Stack, { alignItems: "center", direction: "row", spacing: 1, children: [
31692
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.CircularProgress, { size: 14 }),
31693
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
31386
31694
  ] });
31387
31695
  }
31388
31696
  if (error !== void 0) {
31389
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { color: "error", variant: "body2", children: error.message });
31697
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { color: "error", variant: "body2", children: error.message });
31390
31698
  }
31391
31699
  if (logs.length === 0) {
31392
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
31700
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
31393
31701
  }
31394
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Box, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("pre", { style: { margin: 0, overflow: "auto" }, children: logs.map((log) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
31702
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.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_material17.Typography, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
31395
31703
  };
31396
31704
 
31397
31705
  // src/components/event-details/toggle-section.tsx
31398
- var import_icons_material9 = require("@mui/icons-material");
31399
- var import_material17 = require("@mui/material");
31400
- var import_react53 = require("react");
31401
- var import_jsx_runtime139 = require("react/jsx-runtime");
31706
+ var import_icons_material10 = require("@mui/icons-material");
31707
+ var import_material18 = require("@mui/material");
31708
+ var import_react54 = require("react");
31709
+ var import_jsx_runtime140 = require("react/jsx-runtime");
31402
31710
  var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
31403
- const [isOpen, setIsOpen] = (0, import_react53.useState)(initialOpen);
31404
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { sx: { mt: 4 }, children: [
31405
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
31406
- import_material17.Box,
31711
+ const [isOpen, setIsOpen] = (0, import_react54.useState)(initialOpen);
31712
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { sx: { mt: 4 }, children: [
31713
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
31714
+ import_material18.Box,
31407
31715
  {
31408
31716
  onClick: () => {
31409
31717
  setIsOpen(!isOpen);
@@ -31416,8 +31724,8 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
31416
31724
  mb: 1
31417
31725
  },
31418
31726
  children: [
31419
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
31420
- import_material17.Box,
31727
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
31728
+ import_material18.Box,
31421
31729
  {
31422
31730
  role: "button",
31423
31731
  sx: {
@@ -31426,23 +31734,23 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
31426
31734
  gap: 1
31427
31735
  },
31428
31736
  children: [
31429
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
31430
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material9.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material9.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
31737
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
31738
+ isOpen ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
31431
31739
  ]
31432
31740
  }
31433
31741
  ),
31434
- action !== false && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Box, { onClick: (event) => {
31742
+ action !== false && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Box, { onClick: (event) => {
31435
31743
  event.stopPropagation();
31436
31744
  }, children: action })
31437
31745
  ]
31438
31746
  }
31439
31747
  ),
31440
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Box, { children })
31748
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Box, { children })
31441
31749
  ] });
31442
31750
  };
31443
31751
 
31444
31752
  // src/components/event-details/event-details.tsx
31445
- var import_jsx_runtime140 = require("react/jsx-runtime");
31753
+ var import_jsx_runtime141 = require("react/jsx-runtime");
31446
31754
  var checkIsLambdaInvoke = (span) => {
31447
31755
  if (span.service_name !== "lambda") {
31448
31756
  return false;
@@ -31457,13 +31765,13 @@ var checkIsSqsSendMessage = (span) => {
31457
31765
  return span.operation_name.startsWith("SendMessage");
31458
31766
  };
31459
31767
  var EventDetails = ({ onClose, selectedEvent }) => {
31460
- const eventGroups = (0, import_react54.useMemo)(
31768
+ const eventGroups = (0, import_react55.useMemo)(
31461
31769
  () => getEventGroupsByType(selectedEvent?.events ?? []),
31462
31770
  [selectedEvent?.events]
31463
31771
  );
31464
- const [parseNestedJson, setParseNestedJson] = (0, import_react54.useState)(true);
31772
+ const [parseNestedJson, setParseNestedJson] = (0, import_react55.useState)(true);
31465
31773
  if (!selectedEvent) {
31466
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { color: "text.secondary", variant: "body2", children: "Select an operation to view graph" }) });
31774
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { color: "text.secondary", variant: "body2", children: "Select an operation to view graph" }) });
31467
31775
  }
31468
31776
  const isLambdaInvoke = checkIsLambdaInvoke(selectedEvent);
31469
31777
  const isSqsSendMessage = checkIsSqsSendMessage(selectedEvent);
@@ -31489,9 +31797,9 @@ var EventDetails = ({ onClose, selectedEvent }) => {
31489
31797
  const exceptionPayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.exception"]);
31490
31798
  const hasPayloads = requestPayload !== void 0 || responsePayload !== void 0 || exceptionPayload !== void 0 || isResponseSuppressed;
31491
31799
  const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
31492
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
31493
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
31494
- import_material18.Box,
31800
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
31801
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
31802
+ import_material19.Box,
31495
31803
  {
31496
31804
  sx: {
31497
31805
  alignItems: "center",
@@ -31503,91 +31811,91 @@ var EventDetails = ({ onClose, selectedEvent }) => {
31503
31811
  py: 1
31504
31812
  },
31505
31813
  children: [
31506
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
31507
- onClose && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.Close, {}) })
31814
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
31815
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material11.Close, {}) })
31508
31816
  ]
31509
31817
  }
31510
31818
  ),
31511
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { spacing: 2, children: [
31512
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
31513
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31514
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31515
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
31516
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31517
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: getServiceDisplayName(selectedEvent.service_name) }),
31518
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: getServiceDisplayName(selectedEvent.service_name) })
31819
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { spacing: 2, children: [
31820
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
31821
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31822
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31823
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
31824
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31825
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: getServiceDisplayName(selectedEvent.service_name) }),
31826
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: getServiceDisplayName(selectedEvent.service_name) })
31519
31827
  ] })
31520
31828
  ] }),
31521
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31522
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Action" }),
31523
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31524
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name }),
31525
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: selectedEvent.operation_name })
31829
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31830
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Action" }),
31831
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31832
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name }),
31833
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: selectedEvent.operation_name })
31526
31834
  ] })
31527
31835
  ] })
31528
31836
  ] }),
31529
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { sx: cfnResourceType ? { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" } : void 0, children: [
31530
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31531
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
31532
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31533
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { variant: "body2", children: selectedEvent.resource_name }),
31534
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: selectedEvent.resource_name })
31837
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { sx: cfnResourceType ? { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" } : void 0, children: [
31838
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31839
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
31840
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31841
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { variant: "body2", children: selectedEvent.resource_name }),
31842
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: selectedEvent.resource_name })
31535
31843
  ] })
31536
31844
  ] }),
31537
- Boolean(cfnResourceType) && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31538
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource Type" }),
31539
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31540
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_CFN_RESOURCE_TYPE_TEST_ID, variant: "body2", children: cfnResourceType }),
31541
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: cfnResourceType })
31845
+ Boolean(cfnResourceType) && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31846
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource Type" }),
31847
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31848
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_CFN_RESOURCE_TYPE_TEST_ID, variant: "body2", children: cfnResourceType }),
31849
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: cfnResourceType })
31542
31850
  ] })
31543
31851
  ] })
31544
31852
  ] }),
31545
- Boolean(resourceArn) && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31546
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
31547
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31548
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { variant: "body2", children: resourceArn }),
31549
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: resourceArn })
31853
+ Boolean(resourceArn) && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31854
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
31855
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31856
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { variant: "body2", children: resourceArn }),
31857
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: resourceArn })
31550
31858
  ] })
31551
31859
  ] }),
31552
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
31553
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31554
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
31555
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31556
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id }),
31557
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: selectedEvent.account_id })
31860
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
31861
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31862
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
31863
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31864
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id }),
31865
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: selectedEvent.account_id })
31558
31866
  ] })
31559
31867
  ] }),
31560
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31561
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
31562
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31563
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region }),
31564
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: selectedEvent.region })
31868
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31869
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
31870
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31871
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region }),
31872
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: selectedEvent.region })
31565
31873
  ] })
31566
31874
  ] })
31567
31875
  ] }),
31568
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
31569
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31570
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
31571
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31572
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ResponsiveTimestampCell, { date: unixNanoToDate(selectedEvent.start_time_unix_nano) }) }),
31573
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
31876
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
31877
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31878
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
31879
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31880
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ResponsiveTimestampCell, { date: unixNanoToDate(selectedEvent.start_time_unix_nano) }) }),
31881
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
31574
31882
  ] })
31575
31883
  ] }),
31576
- duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31577
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
31578
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_DURATION_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31579
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Typography, { variant: "body2", children: [
31884
+ duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31885
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
31886
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", "data-testid": EVENT_DETAILS_DURATION_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31887
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Typography, { variant: "body2", children: [
31580
31888
  duration,
31581
31889
  "ms"
31582
31890
  ] }),
31583
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: `${duration}ms` })
31891
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: `${duration}ms` })
31584
31892
  ] })
31585
31893
  ] })
31586
31894
  ] }),
31587
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31588
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
31589
- /* @__PURE__ */ (0, import_jsx_runtime140.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_runtime140.jsx)(
31590
- import_material18.Chip,
31895
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31896
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
31897
+ /* @__PURE__ */ (0, import_jsx_runtime141.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_runtime141.jsx)(
31898
+ import_material19.Chip,
31591
31899
  {
31592
31900
  color: selectedEvent.status_code === 2 ? "error" : selectedEvent.status_code === 1 ? "success" : "default",
31593
31901
  "data-testid": EVENT_DETAILS_STATUS_TEST_ID,
@@ -31597,50 +31905,50 @@ var EventDetails = ({ onClose, selectedEvent }) => {
31597
31905
  ) })
31598
31906
  ] })
31599
31907
  ] }) }),
31600
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Divider, {}),
31601
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(ToggleSection, { headline: "Permissions", children: [
31602
- selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime140.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" }),
31603
- !selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
31604
- eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, spanStatusCode: selectedEvent.status_code, type: "permission" }),
31605
- eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
31606
- eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
31908
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Divider, {}),
31909
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(ToggleSection, { headline: "Permissions", children: [
31910
+ selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime141.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" }),
31911
+ !selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
31912
+ eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, spanStatusCode: selectedEvent.status_code, type: "permission" }),
31913
+ eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
31914
+ eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
31607
31915
  ] }),
31608
- hasPayloads && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
31609
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Divider, {}),
31610
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
31916
+ hasPayloads && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
31917
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Divider, {}),
31918
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
31611
31919
  ToggleSection,
31612
31920
  {
31613
- action: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
31614
- import_material18.FormControlLabel,
31921
+ action: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
31922
+ import_material19.FormControlLabel,
31615
31923
  {
31616
- control: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Switch, { checked: !parseNestedJson, onChange: (event) => {
31924
+ control: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Switch, { checked: !parseNestedJson, onChange: (event) => {
31617
31925
  setParseNestedJson(!event.target.checked);
31618
31926
  }, size: "small" }),
31619
- label: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { variant: "caption", children: "View raw data" }),
31927
+ label: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { variant: "caption", children: "View raw data" }),
31620
31928
  sx: { mr: 0 }
31621
31929
  }
31622
31930
  ),
31623
31931
  headline: "Payloads",
31624
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { spacing: 2, children: [
31625
- requestPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31626
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Request" }),
31627
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
31932
+ children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { spacing: 2, children: [
31933
+ requestPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31934
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Request" }),
31935
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
31628
31936
  ] }),
31629
- (responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31630
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Response" }),
31631
- isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Box, { sx: { py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Alert, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
31937
+ (responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31938
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Response" }),
31939
+ isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Box, { sx: { py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.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 })
31632
31940
  ] }),
31633
- exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31634
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
31635
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
31941
+ exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31942
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
31943
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
31636
31944
  ] })
31637
31945
  ] })
31638
31946
  }
31639
31947
  )
31640
31948
  ] }),
31641
- isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
31642
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Divider, {}),
31643
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
31949
+ isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
31950
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Divider, {}),
31951
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
31644
31952
  LambdaInvokeLogsSection,
31645
31953
  {
31646
31954
  endTimeNano: selectedEvent.end_time_unix_nano ?? selectedEvent.start_time_unix_nano,
@@ -31651,30 +31959,30 @@ var EventDetails = ({ onClose, selectedEvent }) => {
31651
31959
  }
31652
31960
  ) })
31653
31961
  ] }),
31654
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Divider, {}),
31655
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { spacing: 1, children: [
31656
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31657
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
31658
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31659
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id }),
31660
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: selectedEvent.span_id })
31962
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Divider, {}),
31963
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { spacing: 1, children: [
31964
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31965
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
31966
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31967
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id }),
31968
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: selectedEvent.span_id })
31661
31969
  ] })
31662
31970
  ] }),
31663
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31664
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
31665
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31666
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id }),
31667
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: selectedEvent.trace_id })
31971
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31972
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
31973
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31974
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id }),
31975
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: selectedEvent.trace_id })
31668
31976
  ] })
31669
31977
  ] }),
31670
- requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { children: [
31671
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
31672
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31673
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId }),
31674
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CopyButton, { value: requestId })
31978
+ requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Box, { children: [
31979
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
31980
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31981
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Typography, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId }),
31982
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, { value: requestId })
31675
31983
  ] })
31676
31984
  ] }),
31677
- eventGroups.info && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
31985
+ eventGroups.info && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
31678
31986
  ] }) })
31679
31987
  ] }) })
31680
31988
  ] });
@@ -31682,39 +31990,39 @@ var EventDetails = ({ onClose, selectedEvent }) => {
31682
31990
 
31683
31991
  // src/components/trace-graph/trace-graph.tsx
31684
31992
  var import_base = require("@xyflow/react/dist/base.css");
31685
- var import_material22 = require("@mui/material");
31686
- var import_react61 = require("@xyflow/react");
31687
- var import_react62 = require("react");
31993
+ var import_material23 = require("@mui/material");
31994
+ var import_react62 = require("@xyflow/react");
31995
+ var import_react63 = require("react");
31688
31996
 
31689
31997
  // src/components/trace-graph/service-node.tsx
31690
- var import_icons_material11 = require("@mui/icons-material");
31691
- var import_material19 = require("@mui/material");
31692
- var import_react55 = require("@xyflow/react");
31998
+ var import_icons_material12 = require("@mui/icons-material");
31999
+ var import_material20 = require("@mui/material");
32000
+ var import_react56 = require("@xyflow/react");
31693
32001
  var import_style = require("@xyflow/react/dist/style.css");
31694
32002
  var React122 = require("react");
31695
- var import_react56 = require("react");
31696
- var import_jsx_runtime141 = require("react/jsx-runtime");
32003
+ var import_react57 = require("react");
32004
+ var import_jsx_runtime142 = require("react/jsx-runtime");
31697
32005
  var handleStyle = {
31698
32006
  backgroundColor: "white",
31699
32007
  borderColor: "lightgray",
31700
32008
  opacity: 0
31701
32009
  };
31702
32010
  var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning }) => {
31703
- const theme = (0, import_material19.useTheme)();
31704
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
31705
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react55.Handle, { position: import_react55.Position.Left, style: handleStyle, type: "target" }),
31706
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react55.Handle, { position: import_react55.Position.Right, style: handleStyle, type: "source" }),
31707
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
31708
- import_material19.Stack,
32011
+ const theme = (0, import_material20.useTheme)();
32012
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
32013
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react56.Handle, { position: import_react56.Position.Left, style: handleStyle, type: "target" }),
32014
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react56.Handle, { position: import_react56.Position.Right, style: handleStyle, type: "source" }),
32015
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
32016
+ import_material20.Stack,
31709
32017
  {
31710
32018
  alignItems: "center",
31711
32019
  direction: "row",
31712
32020
  sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
31713
32021
  children: [
31714
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Box, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(AwsServiceIcon, { hideTooltip: true, service: event.service_name, size: "medium" }) }),
31715
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { sx: expanded ? void 0 : { minWidth: 0 }, children: [
31716
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
31717
- import_material19.Typography,
32022
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material20.Box, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(AwsServiceIcon, { hideTooltip: true, service: event.service_name, size: "medium" }) }),
32023
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material20.Stack, { sx: expanded ? void 0 : { minWidth: 0 }, children: [
32024
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
32025
+ import_material20.Typography,
31718
32026
  {
31719
32027
  noWrap: !expanded,
31720
32028
  sx: { fontWeight: 700, lineHeight: 1.25, ...expanded && { whiteSpace: "nowrap" } },
@@ -31722,8 +32030,8 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
31722
32030
  children: getServiceDisplayName(event.service_name)
31723
32031
  }
31724
32032
  ),
31725
- event.resource_name != "" && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
31726
- import_material19.Typography,
32033
+ event.resource_name != "" && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
32034
+ import_material20.Typography,
31727
32035
  {
31728
32036
  color: "text.secondary",
31729
32037
  noWrap: !expanded,
@@ -31736,16 +32044,16 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
31736
32044
  ]
31737
32045
  }
31738
32046
  ),
31739
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Divider, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
31740
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
31741
- import_material19.Stack,
32047
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material20.Divider, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
32048
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
32049
+ import_material20.Stack,
31742
32050
  {
31743
32051
  alignItems: "center",
31744
32052
  direction: "row",
31745
32053
  sx: expanded ? { pb: "5px", pr: "8px", pt: "1px" } : { minWidth: 0, pb: "5px", pr: "8px", pt: "1px" },
31746
32054
  children: [
31747
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
31748
- import_material19.Box,
32055
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
32056
+ import_material20.Box,
31749
32057
  {
31750
32058
  sx: {
31751
32059
  alignItems: "center",
@@ -31755,13 +32063,13 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
31755
32063
  width: "38px"
31756
32064
  },
31757
32065
  children: [
31758
- (isError || isWarning) && hasPermissionEvents && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Tooltip, { arrow: true, title: "Permission denied", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material11.GppBad, { sx: { color: isError ? theme.palette.error.main : theme.palette.warning.main, fontSize: "16px" } }) }),
31759
- isError && !hasPermissionEvents && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Tooltip, { arrow: true, title: "Error", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material11.Cancel, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) })
32066
+ (isError || isWarning) && hasPermissionEvents && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material20.Tooltip, { arrow: true, title: "Permission denied", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material12.GppBad, { sx: { color: isError ? theme.palette.error.main : theme.palette.warning.main, fontSize: "16px" } }) }),
32067
+ isError && !hasPermissionEvents && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material20.Tooltip, { arrow: true, title: "Error", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material12.Cancel, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) })
31760
32068
  ]
31761
32069
  }
31762
32070
  ),
31763
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
31764
- import_material19.Typography,
32071
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
32072
+ import_material20.Typography,
31765
32073
  {
31766
32074
  "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
31767
32075
  noWrap: !expanded,
@@ -31775,12 +32083,12 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
31775
32083
  )
31776
32084
  ] });
31777
32085
  };
31778
- var ServiceNode = (0, import_react56.memo)(({ data, selected }) => {
31779
- const theme = (0, import_material19.useTheme)();
31780
- const [isHovered, setIsHovered] = (0, import_react56.useState)(false);
31781
- const nodeRef = (0, import_react56.useRef)(null);
32086
+ var ServiceNode = (0, import_react57.memo)(({ data, selected }) => {
32087
+ const theme = (0, import_material20.useTheme)();
32088
+ const [isHovered, setIsHovered] = (0, import_react57.useState)(false);
32089
+ const nodeRef = (0, import_react57.useRef)(null);
31782
32090
  const { operation_status } = data.event;
31783
- const hasPermissionEventsLegacy = (0, import_react56.useMemo)(
32091
+ const hasPermissionEventsLegacy = (0, import_react57.useMemo)(
31784
32092
  () => data.event.events.some(
31785
32093
  (event) => event.event_type === "iam.policy_evaluation" && event.name === "iam.policy.denied"
31786
32094
  ),
@@ -31811,8 +32119,8 @@ var ServiceNode = (0, import_react56.memo)(({ data, selected }) => {
31811
32119
  const xyNode = nodeRef.current?.closest(".react-flow__node");
31812
32120
  if (xyNode) xyNode.style.zIndex = "";
31813
32121
  };
31814
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
31815
- import_material19.Box,
32122
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
32123
+ import_material20.Box,
31816
32124
  {
31817
32125
  "data-testid": SERVICE_NODE_TEST_ID,
31818
32126
  onMouseEnter: handleMouseEnter,
@@ -31822,8 +32130,8 @@ var ServiceNode = (0, import_react56.memo)(({ data, selected }) => {
31822
32130
  sx: { display: "inline-block", position: "relative" },
31823
32131
  tabIndex: 0,
31824
32132
  children: [
31825
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
31826
- import_material19.Box,
32133
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
32134
+ import_material20.Box,
31827
32135
  {
31828
32136
  sx: {
31829
32137
  ...sharedBoxSx,
@@ -31831,11 +32139,11 @@ var ServiceNode = (0, import_react56.memo)(({ data, selected }) => {
31831
32139
  maxWidth: 220,
31832
32140
  overflow: "hidden"
31833
32141
  },
31834
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(NodeContent, { ...contentProps, expanded: false })
32142
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(NodeContent, { ...contentProps, expanded: false })
31835
32143
  }
31836
32144
  ),
31837
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
31838
- import_material19.Box,
32145
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
32146
+ import_material20.Box,
31839
32147
  {
31840
32148
  onMouseLeave: handleMouseLeave,
31841
32149
  sx: {
@@ -31849,7 +32157,7 @@ var ServiceNode = (0, import_react56.memo)(({ data, selected }) => {
31849
32157
  width: "max-content",
31850
32158
  zIndex: 10
31851
32159
  },
31852
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(NodeContent, { ...contentProps, expanded: true })
32160
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(NodeContent, { ...contentProps, expanded: true })
31853
32161
  }
31854
32162
  )
31855
32163
  ]
@@ -31943,20 +32251,20 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
31943
32251
  };
31944
32252
 
31945
32253
  // src/components/trace-graph/xyflow/controls.tsx
31946
- var import_icons_material12 = require("@mui/icons-material");
31947
- var import_material20 = require("@mui/material");
31948
- var import_react57 = require("@xyflow/react");
31949
- var import_react58 = require("react");
32254
+ var import_icons_material13 = require("@mui/icons-material");
32255
+ var import_material21 = require("@mui/material");
32256
+ var import_react58 = require("@xyflow/react");
32257
+ var import_react59 = require("react");
31950
32258
  var import_shallow = require("zustand/shallow");
31951
- var import_jsx_runtime142 = require("react/jsx-runtime");
32259
+ var import_jsx_runtime143 = require("react/jsx-runtime");
31952
32260
  var selector = (s) => ({
31953
32261
  isInteractive: s.nodesDraggable || s.nodesConnectable || s.elementsSelectable,
31954
32262
  maxZoomReached: s.transform[2] >= s.maxZoom,
31955
32263
  minZoomReached: s.transform[2] <= s.minZoom
31956
32264
  });
31957
- var Controls = (0, import_react58.memo)(() => {
31958
- const { maxZoomReached, minZoomReached } = (0, import_react57.useStore)(selector, import_shallow.shallow);
31959
- const { fitView, zoomIn, zoomOut } = (0, import_react57.useReactFlow)();
32265
+ var Controls = (0, import_react59.memo)(() => {
32266
+ const { maxZoomReached, minZoomReached } = (0, import_react58.useStore)(selector, import_shallow.shallow);
32267
+ const { fitView, zoomIn, zoomOut } = (0, import_react58.useReactFlow)();
31960
32268
  const onZoomInHandler = () => {
31961
32269
  void zoomIn();
31962
32270
  };
@@ -31966,8 +32274,8 @@ var Controls = (0, import_react58.memo)(() => {
31966
32274
  const onFitViewHandler = () => {
31967
32275
  void fitView();
31968
32276
  };
31969
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
31970
- import_material20.Box,
32277
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
32278
+ import_material21.Box,
31971
32279
  {
31972
32280
  sx: {
31973
32281
  bottom: 0,
@@ -31980,33 +32288,33 @@ var Controls = (0, import_react58.memo)(() => {
31980
32288
  zIndex: 5
31981
32289
  },
31982
32290
  children: [
31983
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
31984
- import_material20.IconButton,
32291
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
32292
+ import_material21.IconButton,
31985
32293
  {
31986
32294
  className: "react-flow__controls-zoomin",
31987
32295
  disabled: maxZoomReached,
31988
32296
  onClick: onZoomInHandler,
31989
32297
  size: "small",
31990
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material12.Add, {})
32298
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material13.Add, {})
31991
32299
  }
31992
32300
  ),
31993
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
31994
- import_material20.IconButton,
32301
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
32302
+ import_material21.IconButton,
31995
32303
  {
31996
32304
  className: "react-flow__controls-zoomout",
31997
32305
  disabled: minZoomReached,
31998
32306
  onClick: onZoomOutHandler,
31999
32307
  size: "small",
32000
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material12.Remove, {})
32308
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material13.Remove, {})
32001
32309
  }
32002
32310
  ),
32003
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
32004
- import_material20.IconButton,
32311
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
32312
+ import_material21.IconButton,
32005
32313
  {
32006
32314
  className: "react-flow__controls-fitview",
32007
32315
  onClick: onFitViewHandler,
32008
32316
  size: "small",
32009
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material12.FitScreen, {})
32317
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material13.FitScreen, {})
32010
32318
  }
32011
32319
  )
32012
32320
  ]
@@ -32015,14 +32323,14 @@ var Controls = (0, import_react58.memo)(() => {
32015
32323
  });
32016
32324
 
32017
32325
  // src/components/trace-graph/xyflow/minimap-node.tsx
32018
- var import_material21 = require("@mui/material");
32019
- var import_react59 = require("@xyflow/react");
32020
- var import_react60 = require("react");
32021
- var import_jsx_runtime143 = require("react/jsx-runtime");
32326
+ var import_material22 = require("@mui/material");
32327
+ var import_react60 = require("@xyflow/react");
32328
+ var import_react61 = require("react");
32329
+ var import_jsx_runtime144 = require("react/jsx-runtime");
32022
32330
  var ICON_FRACTION = 0.35;
32023
32331
  var PADDING_FRACTION = 0.18;
32024
32332
  var ICON_NATIVE_SIZE = 80;
32025
- var MinimapServiceNode = (0, import_react60.memo)(({
32333
+ var MinimapServiceNode = (0, import_react61.memo)(({
32026
32334
  height,
32027
32335
  id: id2,
32028
32336
  onClick,
@@ -32031,8 +32339,8 @@ var MinimapServiceNode = (0, import_react60.memo)(({
32031
32339
  x,
32032
32340
  y
32033
32341
  }) => {
32034
- const theme = (0, import_material21.useTheme)();
32035
- const node = (0, import_react59.useStore)((s) => s.nodeLookup.get(id2));
32342
+ const theme = (0, import_material22.useTheme)();
32343
+ const node = (0, import_react60.useStore)((s) => s.nodeLookup.get(id2));
32036
32344
  const event = node?.data.event;
32037
32345
  const serviceName = event?.service_name;
32038
32346
  const Icon = serviceName ? getServiceIconComponent(serviceName) : void 0;
@@ -32047,13 +32355,13 @@ var MinimapServiceNode = (0, import_react60.memo)(({
32047
32355
  const dotY = y + height - padding - dotRadius;
32048
32356
  const outlineColor = selected ? isError ? errorColor : "#1a73e8" : "#cccccc";
32049
32357
  const outlineWidth = selected ? 2 : 1;
32050
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("g", { onClick: onClick ? (event2) => {
32358
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("g", { onClick: onClick ? (event2) => {
32051
32359
  onClick(event2, id2);
32052
32360
  } : void 0, children: [
32053
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
32361
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
32054
32362
  "rect",
32055
32363
  {
32056
- fill: "white",
32364
+ fill: theme.palette.background.paper,
32057
32365
  height,
32058
32366
  rx: 3,
32059
32367
  ry: 3,
@@ -32064,7 +32372,7 @@ var MinimapServiceNode = (0, import_react60.memo)(({
32064
32372
  y
32065
32373
  }
32066
32374
  ),
32067
- isError && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
32375
+ isError && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
32068
32376
  "rect",
32069
32377
  {
32070
32378
  fill: errorColor,
@@ -32076,8 +32384,8 @@ var MinimapServiceNode = (0, import_react60.memo)(({
32076
32384
  y: y + 3
32077
32385
  }
32078
32386
  ),
32079
- Icon && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("g", { transform: `translate(${String(x + padding)}, ${String(y + padding)}) scale(${String(scale2)})`, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Icon, { height: ICON_NATIVE_SIZE, width: ICON_NATIVE_SIZE }) }),
32080
- isError && Icon && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
32387
+ Icon && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("g", { transform: `translate(${String(x + padding)}, ${String(y + padding)}) scale(${String(scale2)})`, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Icon, { height: ICON_NATIVE_SIZE, width: ICON_NATIVE_SIZE }) }),
32388
+ isError && Icon && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
32081
32389
  "circle",
32082
32390
  {
32083
32391
  cx: dotX,
@@ -32090,15 +32398,15 @@ var MinimapServiceNode = (0, import_react60.memo)(({
32090
32398
  });
32091
32399
 
32092
32400
  // src/components/trace-graph/trace-graph.tsx
32093
- var import_jsx_runtime144 = require("react/jsx-runtime");
32401
+ var import_jsx_runtime145 = require("react/jsx-runtime");
32094
32402
  var nodeTypes = {
32095
32403
  service: ServiceNode
32096
32404
  };
32097
32405
  var ExtentUpdater = ({ onUpdate, viewportRef }) => {
32098
- const zoom = (0, import_react61.useStore)((s) => s.transform[2]);
32099
- const width = (0, import_react61.useStore)((s) => s.width);
32100
- const height = (0, import_react61.useStore)((s) => s.height);
32101
- (0, import_react62.useEffect)(() => {
32406
+ const zoom = (0, import_react62.useStore)((s) => s.transform[2]);
32407
+ const width = (0, import_react62.useStore)((s) => s.width);
32408
+ const height = (0, import_react62.useStore)((s) => s.height);
32409
+ (0, import_react63.useEffect)(() => {
32102
32410
  viewportRef.current = { height, width, zoom };
32103
32411
  onUpdate();
32104
32412
  }, [zoom, width, height, onUpdate, viewportRef]);
@@ -32110,12 +32418,12 @@ var TraceGraph = ({
32110
32418
  onRefresh,
32111
32419
  spans
32112
32420
  }) => {
32113
- const [nodes2, setNodes, onNodesChange] = (0, import_react61.useNodesState)([]);
32114
- const [edges, setEdges] = (0, import_react61.useEdgesState)([]);
32115
- const [translateExtent, setTranslateExtent] = (0, import_react62.useState)();
32116
- const nodeBoundsRef = (0, import_react62.useRef)(null);
32117
- const viewportRef = (0, import_react62.useRef)({ height: 0, width: 0, zoom: 1 });
32118
- const updateExtent = (0, import_react62.useCallback)(() => {
32421
+ const [nodes2, setNodes, onNodesChange] = (0, import_react62.useNodesState)([]);
32422
+ const [edges, setEdges] = (0, import_react62.useEdgesState)([]);
32423
+ const [translateExtent, setTranslateExtent] = (0, import_react63.useState)();
32424
+ const nodeBoundsRef = (0, import_react63.useRef)(null);
32425
+ const viewportRef = (0, import_react63.useRef)({ height: 0, width: 0, zoom: 1 });
32426
+ const updateExtent = (0, import_react63.useCallback)(() => {
32119
32427
  const bounds = nodeBoundsRef.current;
32120
32428
  const { height, width, zoom } = viewportRef.current;
32121
32429
  if (!bounds || width === 0 || height === 0) return;
@@ -32128,7 +32436,7 @@ var TraceGraph = ({
32128
32436
  [bounds.maxX + hMargin, bounds.maxY + vMargin]
32129
32437
  ]);
32130
32438
  }, []);
32131
- (0, import_react62.useEffect)(() => {
32439
+ (0, import_react63.useEffect)(() => {
32132
32440
  const allNodes = [];
32133
32441
  const allEdges = [];
32134
32442
  for (const span of spans.data ?? []) {
@@ -32143,15 +32451,15 @@ var TraceGraph = ({
32143
32451
  },
32144
32452
  id: span.span_id,
32145
32453
  position: { x: 0, y: 0 },
32146
- sourcePosition: import_react61.Position.Right,
32147
- targetPosition: import_react61.Position.Left,
32454
+ sourcePosition: import_react62.Position.Right,
32455
+ targetPosition: import_react62.Position.Left,
32148
32456
  type: "service"
32149
32457
  });
32150
32458
  if (span.parent_span_id !== null) {
32151
32459
  allEdges.push({
32152
32460
  animated: false,
32153
32461
  id: `e-${span.parent_span_id}-${span.span_id}`,
32154
- markerEnd: { color: "lightgray", height: 16, type: import_react61.MarkerType.Arrow, width: 16 },
32462
+ markerEnd: { color: "lightgray", height: 16, type: import_react62.MarkerType.Arrow, width: 16 },
32155
32463
  source: span.parent_span_id,
32156
32464
  style: { stroke: "lightgray", strokeWidth: 1 },
32157
32465
  target: span.span_id
@@ -32160,7 +32468,7 @@ var TraceGraph = ({
32160
32468
  for (const outgoingLinkSpanId of span.outgoing_link_span_ids ?? []) {
32161
32469
  allEdges.push({
32162
32470
  id: `e-link-${outgoingLinkSpanId}-${span.span_id}`,
32163
- markerEnd: { color: "lightgray", height: 16, type: import_react61.MarkerType.Arrow, width: 16 },
32471
+ markerEnd: { color: "lightgray", height: 16, type: import_react62.MarkerType.Arrow, width: 16 },
32164
32472
  source: outgoingLinkSpanId,
32165
32473
  style: { stroke: "lightgray", strokeWidth: 1 },
32166
32474
  // animated: true,
@@ -32200,12 +32508,12 @@ var TraceGraph = ({
32200
32508
  updateExtent();
32201
32509
  }
32202
32510
  }, [spans.data, initialFocusEventId, setNodes, setEdges, updateExtent]);
32203
- const theme = (0, import_material22.useTheme)();
32204
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
32205
- spans.error && /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
32206
- import_material22.Alert,
32511
+ const theme = (0, import_material23.useTheme)();
32512
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
32513
+ spans.error && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
32514
+ import_material23.Alert,
32207
32515
  {
32208
- action: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material22.Button, { onClick: () => {
32516
+ action: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material23.Button, { onClick: () => {
32209
32517
  onRefresh();
32210
32518
  }, children: "Retry" }),
32211
32519
  severity: "error",
@@ -32217,9 +32525,10 @@ var TraceGraph = ({
32217
32525
  ]
32218
32526
  }
32219
32527
  ),
32220
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
32221
- import_react61.ReactFlow,
32528
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
32529
+ import_react62.ReactFlow,
32222
32530
  {
32531
+ colorMode: theme.palette.mode,
32223
32532
  "data-testid": TRACE_GRAPH_TEST_ID,
32224
32533
  edges,
32225
32534
  fitView: true,
@@ -32236,18 +32545,18 @@ var TraceGraph = ({
32236
32545
  selectNodesOnDrag: false,
32237
32546
  translateExtent,
32238
32547
  children: [
32239
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(ExtentUpdater, { onUpdate: updateExtent, viewportRef }),
32240
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Controls, {}),
32241
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
32242
- import_react61.MiniMap,
32548
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ExtentUpdater, { onUpdate: updateExtent, viewportRef }),
32549
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Controls, {}),
32550
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
32551
+ import_react62.MiniMap,
32243
32552
  {
32244
32553
  nodeComponent: MinimapServiceNode,
32245
32554
  pannable: true,
32246
32555
  zoomable: true
32247
32556
  }
32248
32557
  ),
32249
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
32250
- import_react61.Background,
32558
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
32559
+ import_react62.Background,
32251
32560
  {
32252
32561
  bgColor: theme.palette.background.default,
32253
32562
  color: theme.palette.text.disabled
@@ -32260,7 +32569,7 @@ var TraceGraph = ({
32260
32569
  };
32261
32570
 
32262
32571
  // src/pages/trace-graph-page.tsx
32263
- var import_jsx_runtime145 = require("react/jsx-runtime");
32572
+ var import_jsx_runtime146 = require("react/jsx-runtime");
32264
32573
  var DRAWER_WIDTH = "35%";
32265
32574
  var Main = (0, import_styles.styled)("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
32266
32575
  flexGrow: 1,
@@ -32277,7 +32586,7 @@ var Main = (0, import_styles.styled)("main", { shouldForwardProp: (property) =>
32277
32586
  })
32278
32587
  }
32279
32588
  }));
32280
- var StyledDrawer = (0, import_styles.styled)(import_material23.Drawer)({
32589
+ var StyledDrawer = (0, import_styles.styled)(import_material24.Drawer)({
32281
32590
  "& .MuiDrawer-paper": {
32282
32591
  bottom: 0,
32283
32592
  boxSizing: "border-box",
@@ -32304,8 +32613,8 @@ var TraceGraphView = ({
32304
32613
  spans,
32305
32614
  traceId
32306
32615
  }) => {
32307
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
32308
- import_material23.Paper,
32616
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
32617
+ import_material24.Paper,
32309
32618
  {
32310
32619
  "data-testid": TRACE_GRAPH_PAGE_TEST_ID,
32311
32620
  square: true,
@@ -32317,11 +32626,11 @@ var TraceGraphView = ({
32317
32626
  width: "100%"
32318
32627
  },
32319
32628
  children: [
32320
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material23.Box, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
32321
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material23.Box, { sx: { display: "flex", px: 1, py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material23.Button, { onClick: () => {
32629
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_material24.Box, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
32630
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material24.Box, { sx: { display: "flex", px: 1, py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material24.Button, { onClick: () => {
32322
32631
  navigateToSpansList();
32323
- }, startIcon: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_icons_material13.ArrowBack, {}), children: "Go back" }) }),
32324
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material23.Box, { sx: { flexGrow: 1, overflow: "auto" }, children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react63.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
32632
+ }, startIcon: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_icons_material14.ArrowBack, {}), children: "Go back" }) }),
32633
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material24.Box, { sx: { flexGrow: 1, overflow: "auto" }, children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_react64.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
32325
32634
  TraceGraph,
32326
32635
  {
32327
32636
  initialFocusEventId: spanId,
@@ -32337,7 +32646,7 @@ var TraceGraphView = ({
32337
32646
  }
32338
32647
  ) }) })
32339
32648
  ] }) }),
32340
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
32649
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
32341
32650
  ]
32342
32651
  }
32343
32652
  );
@@ -32385,10 +32694,10 @@ async function fetchConnectedTracesWaterfall(api, traceIds, allSpans = /* @__PUR
32385
32694
  }
32386
32695
  var TraceGraphPage = ({ onClose, spanId, traceId }) => {
32387
32696
  const api = useAppInspectorApi();
32388
- const [spans, setSpans] = (0, import_react64.useState)();
32389
- const [loading, setLoading] = (0, import_react64.useState)(false);
32390
- const [fetchError, setFetchError] = (0, import_react64.useState)();
32391
- const fetchSpans = (0, import_react64.useCallback)(async () => {
32697
+ const [spans, setSpans] = (0, import_react65.useState)();
32698
+ const [loading, setLoading] = (0, import_react65.useState)(false);
32699
+ const [fetchError, setFetchError] = (0, import_react65.useState)();
32700
+ const fetchSpans = (0, import_react65.useCallback)(async () => {
32392
32701
  setLoading(true);
32393
32702
  try {
32394
32703
  const spans2 = await fetchConnectedTraces(api, traceId);
@@ -32401,27 +32710,27 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
32401
32710
  setLoading(false);
32402
32711
  }
32403
32712
  }, [api, traceId]);
32404
- (0, import_react64.useEffect)(() => {
32713
+ (0, import_react65.useEffect)(() => {
32405
32714
  void fetchSpans();
32406
32715
  }, [fetchSpans]);
32407
- const [open, setOpen] = (0, import_react64.useState)(true);
32408
- const [selectedEvent, setSelectedEvent] = (0, import_react64.useState)(() => spans?.find((span) => span.span_id === spanId));
32409
- const spansReference = (0, import_react64.useRef)();
32410
- (0, import_react64.useEffect)(() => {
32716
+ const [open, setOpen] = (0, import_react65.useState)(true);
32717
+ const [selectedEvent, setSelectedEvent] = (0, import_react65.useState)(() => spans?.find((span) => span.span_id === spanId));
32718
+ const spansReference = (0, import_react65.useRef)();
32719
+ (0, import_react65.useEffect)(() => {
32411
32720
  if (!spansReference.current && spans) {
32412
32721
  setSelectedEvent(spans.find((span) => span.span_id === spanId));
32413
32722
  spansReference.current = spans;
32414
32723
  }
32415
32724
  }, [spans, setSelectedEvent, spanId]);
32416
- const handleEventSelect = (0, import_react64.useCallback)((spanId2) => {
32725
+ const handleEventSelect = (0, import_react65.useCallback)((spanId2) => {
32417
32726
  const span = spans?.find((s) => s.span_id === spanId2);
32418
32727
  setSelectedEvent(span);
32419
32728
  setOpen(true);
32420
32729
  }, [spans]);
32421
- const navigateToSpansList = (0, import_react64.useCallback)(() => {
32730
+ const navigateToSpansList = (0, import_react65.useCallback)(() => {
32422
32731
  onClose?.();
32423
32732
  }, [onClose]);
32424
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
32733
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
32425
32734
  TraceGraphView,
32426
32735
  {
32427
32736
  fetchError,
@@ -32442,7 +32751,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
32442
32751
  };
32443
32752
 
32444
32753
  // src/pages/spans-list-page.tsx
32445
- var import_jsx_runtime146 = require("react/jsx-runtime");
32754
+ var import_jsx_runtime147 = require("react/jsx-runtime");
32446
32755
  var SpansListPage = () => {
32447
32756
  const api = useAppInspectorApi();
32448
32757
  const {
@@ -32466,33 +32775,33 @@ var SpansListPage = () => {
32466
32775
  warningCount
32467
32776
  } = useSpans();
32468
32777
  const { checkStatus, phase, status, statusError } = useAppInspectorStatus();
32469
- const clearSpansSync = (0, import_react65.useCallback)(() => {
32778
+ const clearSpansSync = (0, import_react66.useCallback)(() => {
32470
32779
  void clearSpans();
32471
32780
  }, [clearSpans]);
32472
32781
  const localstackVersion = status?.localstackVersion ?? (statusError instanceof AppInspectorNotFoundError ? statusError.localstackVersion : void 0);
32473
32782
  const versionCompatibility = checkEmulatorVersion(localstackVersion);
32474
32783
  const searchSupported = emulatorSupportsSearch(localstackVersion);
32475
- const [bannerDismissed, setBannerDismissed] = (0, import_react65.useState)(false);
32784
+ const [bannerDismissed, setBannerDismissed] = (0, import_react66.useState)(false);
32476
32785
  const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
32477
- const [selectedTraceId, setSelectedTraceId] = (0, import_react65.useState)();
32478
- const [selectedSpanId, setSelectedSpanId] = (0, import_react65.useState)();
32479
- const navigateToSpan = (0, import_react65.useCallback)((span) => {
32786
+ const [selectedTraceId, setSelectedTraceId] = (0, import_react66.useState)();
32787
+ const [selectedSpanId, setSelectedSpanId] = (0, import_react66.useState)();
32788
+ const navigateToSpan = (0, import_react66.useCallback)((span) => {
32480
32789
  setSelectedTraceId(span.trace_id);
32481
32790
  setSelectedSpanId(span.span_id);
32482
32791
  }, []);
32483
- const handleRetry = (0, import_react65.useCallback)(() => {
32792
+ const handleRetry = (0, import_react66.useCallback)(() => {
32484
32793
  checkStatus();
32485
32794
  fetchForward();
32486
32795
  }, [checkStatus, fetchForward]);
32487
- const handleEnable = (0, import_react65.useCallback)(async () => {
32796
+ const handleEnable = (0, import_react66.useCallback)(async () => {
32488
32797
  await api.setStatus({ status: "ENABLED" });
32489
32798
  clearFetchError();
32490
32799
  checkStatus();
32491
32800
  }, [api, checkStatus, clearFetchError]);
32492
- const isDelayedRefetchRef = (0, import_react65.useRef)(false);
32493
- const delayedRefetchTimerRef = (0, import_react65.useRef)();
32494
- const prevFetchingForwardRef = (0, import_react65.useRef)(false);
32495
- (0, import_react65.useEffect)(() => {
32801
+ const isDelayedRefetchRef = (0, import_react66.useRef)(false);
32802
+ const delayedRefetchTimerRef = (0, import_react66.useRef)();
32803
+ const prevFetchingForwardRef = (0, import_react66.useRef)(false);
32804
+ (0, import_react66.useEffect)(() => {
32496
32805
  const wasFetching = prevFetchingForwardRef.current;
32497
32806
  prevFetchingForwardRef.current = fetchingForward;
32498
32807
  if (wasFetching && !fetchingForward) {
@@ -32513,10 +32822,10 @@ var SpansListPage = () => {
32513
32822
  switch (phase) {
32514
32823
  case "CHECKING_STATUS":
32515
32824
  case "CONNECTING_WS": {
32516
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(StatusMessage, { phase });
32825
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(StatusMessage, { phase });
32517
32826
  }
32518
32827
  case "DISABLED": {
32519
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
32828
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
32520
32829
  StatusMessage,
32521
32830
  {
32522
32831
  onEnable: handleEnable,
@@ -32525,7 +32834,7 @@ var SpansListPage = () => {
32525
32834
  );
32526
32835
  }
32527
32836
  case "INCOMPATIBLE": {
32528
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
32837
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
32529
32838
  StatusMessage,
32530
32839
  {
32531
32840
  localstackVersion,
@@ -32538,7 +32847,7 @@ var SpansListPage = () => {
32538
32847
  break;
32539
32848
  }
32540
32849
  case "UNREACHABLE": {
32541
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
32850
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
32542
32851
  StatusMessage,
32543
32852
  {
32544
32853
  onRetry: handleRetry,
@@ -32547,9 +32856,9 @@ var SpansListPage = () => {
32547
32856
  );
32548
32857
  }
32549
32858
  }
32550
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_material24.Paper, { square: true, sx: { display: "flex", flexDirection: "column", flexGrow: 1 }, children: [
32551
- /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
32552
- import_material24.Box,
32859
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_material25.Paper, { square: true, sx: { display: "flex", flexDirection: "column", flexGrow: 1 }, children: [
32860
+ /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
32861
+ import_material25.Box,
32553
32862
  {
32554
32863
  "data-testid": SPANS_LIST_PAGE_TEST_ID,
32555
32864
  sx: {
@@ -32564,7 +32873,7 @@ var SpansListPage = () => {
32564
32873
  width: "100%"
32565
32874
  },
32566
32875
  children: [
32567
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
32876
+ /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
32568
32877
  EmulatorVersionBanner,
32569
32878
  {
32570
32879
  compatibility: bannerDismissed && versionCompatibility === "warning" ? "ok" : versionCompatibility,
@@ -32574,7 +32883,7 @@ var SpansListPage = () => {
32574
32883
  } : void 0
32575
32884
  }
32576
32885
  ),
32577
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
32886
+ /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
32578
32887
  SpansList,
32579
32888
  {
32580
32889
  clearingSpans,
@@ -32603,7 +32912,7 @@ var SpansListPage = () => {
32603
32912
  ]
32604
32913
  }
32605
32914
  ),
32606
- selectedTraceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(TraceGraphPage, { onClose: () => {
32915
+ selectedTraceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(TraceGraphPage, { onClose: () => {
32607
32916
  setSelectedTraceId(void 0);
32608
32917
  }, spanId: selectedSpanId, traceId: selectedTraceId })
32609
32918
  ] });