@agg-build/ui 4.0.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +21 -16
  2. package/dist/{chunk-XIDQ2A6W.mjs → chunk-64BBTXFE.mjs} +1639 -909
  3. package/dist/{chunk-VR5ZRDQT.mjs → chunk-6STRIKUA.mjs} +1 -1
  4. package/dist/{chunk-KX3TQ7WC.mjs → chunk-734VTGCV.mjs} +1 -1
  5. package/dist/{chunk-KO6VTRV6.mjs → chunk-N7UPPT5J.mjs} +336 -232
  6. package/dist/{chunk-JTSLZARU.mjs → chunk-UCU2XCV5.mjs} +2 -2
  7. package/dist/{chunk-MKU5Q6PN.mjs → chunk-V5CRUO6S.mjs} +653 -379
  8. package/dist/{chunk-R362GNI2.mjs → chunk-WW5QKNIM.mjs} +278 -146
  9. package/dist/events.js +1241 -754
  10. package/dist/events.mjs +6 -4
  11. package/dist/index.js +4919 -3694
  12. package/dist/index.mjs +20 -8
  13. package/dist/modals.js +1321 -1260
  14. package/dist/modals.mjs +3 -3
  15. package/dist/pages.js +4271 -3054
  16. package/dist/pages.mjs +10 -6
  17. package/dist/primitives.js +346 -265
  18. package/dist/primitives.mjs +1 -1
  19. package/dist/styles.css +1 -1
  20. package/dist/tailwind.css +1 -1
  21. package/dist/trading.js +2281 -1499
  22. package/dist/trading.mjs +10 -4
  23. package/dist/types/events/index.d.mts +1 -0
  24. package/dist/types/events/index.d.ts +1 -0
  25. package/dist/types/events/item-details/event-list-item-details-market-selector.d.mts +4 -1
  26. package/dist/types/events/item-details/event-list-item-details-market-selector.d.ts +4 -1
  27. package/dist/types/events/item-details/event-list-item-details.types.d.mts +25 -1
  28. package/dist/types/events/item-details/event-list-item-details.types.d.ts +25 -1
  29. package/dist/types/events/item-details/index.d.mts +1 -1
  30. package/dist/types/events/item-details/index.d.ts +1 -1
  31. package/dist/types/events/market-details/index.d.mts +1 -1
  32. package/dist/types/events/market-details/index.d.ts +1 -1
  33. package/dist/types/events/market-details/market-details.types.d.mts +4 -0
  34. package/dist/types/events/market-details/market-details.types.d.ts +4 -0
  35. package/dist/types/events/shared/format-event-title.d.mts +9 -1
  36. package/dist/types/events/shared/format-event-title.d.ts +9 -1
  37. package/dist/types/events/shared/format-sports-event-time.d.mts +2 -0
  38. package/dist/types/events/shared/format-sports-event-time.d.ts +2 -0
  39. package/dist/types/events/shared/sports-live-score.d.mts +10 -0
  40. package/dist/types/events/shared/sports-live-score.d.ts +10 -0
  41. package/dist/types/pages/event-market/event-market.types.d.mts +4 -0
  42. package/dist/types/pages/event-market/event-market.types.d.ts +4 -0
  43. package/dist/types/pages/event-market/index.d.mts +1 -0
  44. package/dist/types/pages/event-market/index.d.ts +1 -0
  45. package/dist/types/pages/user-profile/components/available-balance-card.d.mts +5 -0
  46. package/dist/types/pages/user-profile/components/available-balance-card.d.ts +5 -0
  47. package/dist/types/pages/user-profile/components/open-order-row.d.mts +1 -0
  48. package/dist/types/pages/user-profile/components/open-order-row.d.ts +1 -0
  49. package/dist/types/pages/user-profile/components/positions-activity.d.mts +1 -1
  50. package/dist/types/pages/user-profile/components/positions-activity.d.ts +1 -1
  51. package/dist/types/pages/user-profile/index.d.mts +1 -0
  52. package/dist/types/pages/user-profile/index.d.ts +1 -0
  53. package/dist/types/pages/user-profile/user-profile.types.d.mts +1 -1
  54. package/dist/types/pages/user-profile/user-profile.types.d.ts +1 -1
  55. package/dist/types/primitives/venue-logo/svg/logo-novig.d.mts +24 -0
  56. package/dist/types/primitives/venue-logo/svg/logo-novig.d.ts +24 -0
  57. package/dist/types/primitives/venue-logo/venue-logo.constants.d.mts +1 -1
  58. package/dist/types/primitives/venue-logo/venue-logo.constants.d.ts +1 -1
  59. package/dist/types/trading/place-order/index.d.mts +4 -1
  60. package/dist/types/trading/place-order/index.d.ts +4 -1
  61. package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +38 -73
  62. package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +38 -73
  63. package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +26 -0
  64. package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +26 -0
  65. package/dist/types/trading/place-order/index.place-order.types.d.mts +15 -0
  66. package/dist/types/trading/place-order/index.place-order.types.d.ts +15 -0
  67. package/dist/types/trading/place-order/index.place-order.utils.d.mts +14 -1
  68. package/dist/types/trading/place-order/index.place-order.utils.d.ts +14 -1
  69. package/package.json +3 -3
  70. /package/dist/{chunk-KHHFHXXD.mjs → chunk-JH4B3ZHQ.mjs} +0 -0
@@ -24,7 +24,7 @@ import {
24
24
  resolveUnifiedOrderBookEntries,
25
25
  sortOutcomeSelectorOutcomes,
26
26
  useEventTradingContext
27
- } from "./chunk-VR5ZRDQT.mjs";
27
+ } from "./chunk-6STRIKUA.mjs";
28
28
  import {
29
29
  AutocompleteSelect,
30
30
  Badge,
@@ -33,6 +33,7 @@ import {
33
33
  CloseIcon,
34
34
  Icon,
35
35
  LineChart,
36
+ LoadingIcon,
36
37
  MOBILE_TABS_MEDIA_QUERY,
37
38
  MarketDetailsOderbookSkeleton,
38
39
  Modal,
@@ -76,11 +77,12 @@ import {
76
77
  sortCategoriesForNavigation,
77
78
  sortOutcomes,
78
79
  splitEventsByLifecycle
79
- } from "./chunk-KO6VTRV6.mjs";
80
+ } from "./chunk-N7UPPT5J.mjs";
80
81
 
81
82
  // src/events/item/index.tsx
82
83
  import {
83
84
  optimizedImageUrl,
85
+ resolveRecurringCryptoIdentity,
84
86
  sortVenues,
85
87
  useLabels,
86
88
  useMidpoints,
@@ -454,13 +456,16 @@ var EventListItemContent = ({
454
456
  const config = useSdkUiConfig();
455
457
  const labels = useLabels();
456
458
  const allVenueMarkets = useMemo(() => event.venueMarkets, [event.venueMarkets]);
459
+ const recurringCryptoIdentity = resolveRecurringCryptoIdentity(event);
457
460
  const eventHeading = resolveEventHeading({
458
461
  title: event.title,
459
462
  categories: event.categories,
460
463
  structureType: event.structureType,
461
464
  gameStartTime: event.gameStartTime,
462
465
  endDate: event.endDate,
463
- venueMarkets: event.venueMarkets
466
+ venueMarkets: event.venueMarkets,
467
+ recurringCryptoWindowStart: recurringCryptoIdentity == null ? void 0 : recurringCryptoIdentity.windowStart,
468
+ recurringCryptoDuration: recurringCryptoIdentity == null ? void 0 : recurringCryptoIdentity.duration
464
469
  });
465
470
  const resolvedTitle = eventHeading.title;
466
471
  const resolvedTimestamp = eventHeading.timestampLabel;
@@ -517,8 +522,14 @@ var EventListItemContent = ({
517
522
  enabled: !shouldUseSharedMidpoints && midpointVenueMarketIds.length > 0
518
523
  });
519
524
  const { prices: displayMidpointsByOutcomeId, isLoading: isOutcomeMidpointsLoading } = useMidpoints(shouldUseSharedMidpoints ? [] : resolvedOutcomeMarkets);
520
- const resolvedMidpointRows = shouldUseSharedMidpoints ? sharedMidpointRows != null ? sharedMidpointRows : [] : fetchedMidpointRows;
521
- const resolvedDisplayMidpointsByOutcomeId = shouldUseSharedMidpoints ? midpointPrices != null ? midpointPrices : /* @__PURE__ */ new Map() : displayMidpointsByOutcomeId;
525
+ const resolvedMidpointRows = useMemo(
526
+ () => shouldUseSharedMidpoints ? sharedMidpointRows != null ? sharedMidpointRows : [] : fetchedMidpointRows,
527
+ [fetchedMidpointRows, sharedMidpointRows, shouldUseSharedMidpoints]
528
+ );
529
+ const resolvedDisplayMidpointsByOutcomeId = useMemo(
530
+ () => shouldUseSharedMidpoints ? midpointPrices != null ? midpointPrices : /* @__PURE__ */ new Map() : displayMidpointsByOutcomeId,
531
+ [displayMidpointsByOutcomeId, midpointPrices, shouldUseSharedMidpoints]
532
+ );
522
533
  const isAwaitingMidpoints = midpointsLoading != null ? midpointsLoading : isOutcomeMidpointsLoading || midpointVenueMarketIds.length > 0 && isVenueMarketMidpointsLoading;
523
534
  const displayPriceByOutcomeId = useMemo(() => {
524
535
  const priceByOutcomeId = new Map(resolvedDisplayMidpointsByOutcomeId);
@@ -1413,16 +1424,161 @@ var mergeVenueOutcomeOrderbooks = ({
1413
1424
  };
1414
1425
  };
1415
1426
 
1416
- // src/events/item-details/settlement-summary.tsx
1427
+ // src/events/shared/sports-live-score.tsx
1417
1428
  import { useLabels as useLabels2 } from "@agg-build/hooks";
1418
- import { useMemo as useMemo2 } from "react";
1419
1429
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1430
+ var SportsLiveScore = ({
1431
+ state,
1432
+ variant = "detail",
1433
+ className
1434
+ }) => {
1435
+ const labels = useLabels2();
1436
+ if (!state || state.participants.length !== 2) return null;
1437
+ const [firstParticipant, secondParticipant] = state.participants;
1438
+ const firstScore = firstParticipant == null ? void 0 : firstParticipant.score;
1439
+ const secondScore = secondParticipant == null ? void 0 : secondParticipant.score;
1440
+ if (firstScore == null || secondScore == null) return null;
1441
+ const statusLabels = {
1442
+ scheduled: labels.sportsLive.scheduled,
1443
+ live: labels.sportsLive.live,
1444
+ paused: labels.sportsLive.paused,
1445
+ finished: labels.sportsLive.finished,
1446
+ cancelled: labels.sportsLive.cancelled,
1447
+ postponed: labels.sportsLive.postponed,
1448
+ unknown: labels.sportsLive.unknown
1449
+ };
1450
+ const statusText = [state.period, state.clock].filter(Boolean).join(" \xB7 ") || statusLabels[state.status];
1451
+ const isLiveIndicatorVisible = state.status === "live" || state.status === "paused";
1452
+ const isCard = variant === "card";
1453
+ const renderParticipant = (participant) => {
1454
+ var _a;
1455
+ return /* @__PURE__ */ jsxs2(
1456
+ "div",
1457
+ {
1458
+ className: cn("flex min-w-0 flex-col items-center", isCard ? "gap-1.5" : "gap-3"),
1459
+ title: participant.name,
1460
+ children: [
1461
+ /* @__PURE__ */ jsx2(
1462
+ RemoteImage,
1463
+ {
1464
+ src: participant.imageUrl,
1465
+ alt: "",
1466
+ width: isCard ? 28 : 44,
1467
+ height: isCard ? 28 : 44,
1468
+ classNames: {
1469
+ root: cn(
1470
+ "shrink-0 border border-agg-separator bg-agg-secondary-hover",
1471
+ isCard ? "size-7 rounded-agg-md" : "size-11 rounded-agg-lg"
1472
+ ),
1473
+ image: "object-contain",
1474
+ placeholder: "text-agg-muted-foreground"
1475
+ }
1476
+ }
1477
+ ),
1478
+ /* @__PURE__ */ jsx2(
1479
+ Typography,
1480
+ {
1481
+ variant: "body",
1482
+ className: cn(
1483
+ "max-w-full truncate text-center text-agg-foreground",
1484
+ isCard ? "text-agg-xs leading-agg-4" : "text-agg-base leading-agg-6"
1485
+ ),
1486
+ children: (_a = participant.shortName) != null ? _a : participant.name
1487
+ }
1488
+ )
1489
+ ]
1490
+ }
1491
+ );
1492
+ };
1493
+ return /* @__PURE__ */ jsxs2(
1494
+ "div",
1495
+ {
1496
+ role: "status",
1497
+ "aria-label": labels.sportsLive.scoreAria(
1498
+ firstParticipant.name,
1499
+ firstScore,
1500
+ secondParticipant.name,
1501
+ secondScore,
1502
+ statusText
1503
+ ),
1504
+ className: cn(
1505
+ "agg-sports-live-score grid w-full grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center",
1506
+ isCard ? "gap-3 py-1" : "gap-6 md:gap-10",
1507
+ className
1508
+ ),
1509
+ children: [
1510
+ renderParticipant(firstParticipant),
1511
+ /* @__PURE__ */ jsxs2("div", { className: cn("flex flex-col items-center", isCard ? "gap-1" : "gap-3"), children: [
1512
+ /* @__PURE__ */ jsxs2("div", { className: cn("flex items-center", isCard ? "gap-2" : "gap-3"), children: [
1513
+ /* @__PURE__ */ jsx2(
1514
+ Typography,
1515
+ {
1516
+ variant: "body-strong",
1517
+ className: cn(
1518
+ "font-agg-bold tabular-nums text-agg-foreground",
1519
+ isCard ? "text-agg-xl leading-agg-7" : "text-agg-3xl leading-agg-9"
1520
+ ),
1521
+ children: firstScore
1522
+ }
1523
+ ),
1524
+ /* @__PURE__ */ jsx2(
1525
+ "span",
1526
+ {
1527
+ "aria-hidden": "true",
1528
+ className: cn("shrink-0 bg-agg-separator", isCard ? "h-0.5 w-2" : "h-0.5 w-3")
1529
+ }
1530
+ ),
1531
+ /* @__PURE__ */ jsx2(
1532
+ Typography,
1533
+ {
1534
+ variant: "body-strong",
1535
+ className: cn(
1536
+ "font-agg-bold tabular-nums text-agg-foreground",
1537
+ isCard ? "text-agg-xl leading-agg-7" : "text-agg-3xl leading-agg-9"
1538
+ ),
1539
+ children: secondScore
1540
+ }
1541
+ )
1542
+ ] }),
1543
+ /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-2 text-agg-primary", children: [
1544
+ isLiveIndicatorVisible ? /* @__PURE__ */ jsx2(
1545
+ "span",
1546
+ {
1547
+ "aria-hidden": "true",
1548
+ className: "flex size-3.5 shrink-0 items-center justify-center rounded-agg-full bg-agg-primary/10",
1549
+ children: /* @__PURE__ */ jsx2("span", { className: "size-1.5 rounded-agg-full bg-agg-primary" })
1550
+ }
1551
+ ) : null,
1552
+ /* @__PURE__ */ jsx2(
1553
+ Typography,
1554
+ {
1555
+ variant: "label-strong",
1556
+ className: cn(
1557
+ "max-w-full truncate uppercase text-agg-primary",
1558
+ isCard ? "text-agg-2xs leading-agg-4" : "text-agg-sm leading-agg-5"
1559
+ ),
1560
+ children: statusText
1561
+ }
1562
+ )
1563
+ ] })
1564
+ ] }),
1565
+ renderParticipant(secondParticipant)
1566
+ ]
1567
+ }
1568
+ );
1569
+ };
1570
+ SportsLiveScore.displayName = "SportsLiveScore";
1571
+
1572
+ // src/events/item-details/settlement-summary.tsx
1573
+ import { useLabels as useLabels3 } from "@agg-build/hooks";
1574
+ import { useMemo as useMemo2 } from "react";
1575
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1420
1576
  var SettlementSummary = ({
1421
1577
  settlementDiff,
1422
1578
  settlementSectionId = SETTLEMENT_SECTION_ID,
1423
1579
  className
1424
1580
  }) => {
1425
- const labels = useLabels2();
1581
+ const labels = useLabels3();
1426
1582
  const settlementDifferences = useMemo2(
1427
1583
  () => prepareSettlementDifferences(settlementDiff == null ? void 0 : settlementDiff.differences),
1428
1584
  [settlementDiff == null ? void 0 : settlementDiff.differences]
@@ -1436,7 +1592,7 @@ var SettlementSummary = ({
1436
1592
  if (!target) return;
1437
1593
  target.scrollIntoView({ behavior: "smooth", block: "start" });
1438
1594
  };
1439
- const actionButton = /* @__PURE__ */ jsxs2(
1595
+ const actionButton = /* @__PURE__ */ jsxs3(
1440
1596
  "button",
1441
1597
  {
1442
1598
  type: "button",
@@ -1449,8 +1605,8 @@ var SettlementSummary = ({
1449
1605
  "aria-controls": settlementSectionId,
1450
1606
  onClick: handleReadFullDetails,
1451
1607
  children: [
1452
- /* @__PURE__ */ jsx2("span", { children: labels.settlementSummary.readFullDetails }),
1453
- /* @__PURE__ */ jsx2(
1608
+ /* @__PURE__ */ jsx3("span", { children: labels.settlementSummary.readFullDetails }),
1609
+ /* @__PURE__ */ jsx3(
1454
1610
  "i",
1455
1611
  {
1456
1612
  className: "fi fi-rr-arrow-small-down size-3.5!",
@@ -1463,7 +1619,7 @@ var SettlementSummary = ({
1463
1619
  );
1464
1620
  const visibleDifferences = settlementDifferences.slice(0, 2);
1465
1621
  const hiddenDifferenceCount = settlementDifferences.length - visibleDifferences.length;
1466
- return /* @__PURE__ */ jsxs2(
1622
+ return /* @__PURE__ */ jsxs3(
1467
1623
  "div",
1468
1624
  {
1469
1625
  className: cn(
@@ -1471,18 +1627,18 @@ var SettlementSummary = ({
1471
1627
  className
1472
1628
  ),
1473
1629
  children: [
1474
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-[240px] flex-1 flex-wrap items-center gap-x-5 gap-y-3", children: [
1475
- /* @__PURE__ */ jsxs2("div", { className: "agg-settlement-summary-heading flex shrink-0 items-center gap-2", children: [
1476
- /* @__PURE__ */ jsx2("p", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground", children: labels.settlementSummary.title }),
1477
- /* @__PURE__ */ jsx2("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-agg-full bg-agg-primary text-[10px] font-agg-bold leading-[14px] text-agg-on-primary", children: settlementDifferences.length })
1630
+ /* @__PURE__ */ jsxs3("div", { className: "flex min-w-[240px] flex-1 flex-wrap items-center gap-x-5 gap-y-3", children: [
1631
+ /* @__PURE__ */ jsxs3("div", { className: "agg-settlement-summary-heading flex shrink-0 items-center gap-2", children: [
1632
+ /* @__PURE__ */ jsx3("p", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground", children: labels.settlementSummary.title }),
1633
+ /* @__PURE__ */ jsx3("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-agg-full bg-agg-primary text-[10px] font-agg-bold leading-[14px] text-agg-on-primary", children: settlementDifferences.length })
1478
1634
  ] }),
1479
- /* @__PURE__ */ jsxs2("div", { className: "agg-settlement-summary-pills flex min-w-[240px] flex-1 flex-wrap items-center gap-2", children: [
1480
- visibleDifferences.map((difference) => /* @__PURE__ */ jsxs2(
1635
+ /* @__PURE__ */ jsxs3("div", { className: "agg-settlement-summary-pills flex min-w-[240px] flex-1 flex-wrap items-center gap-2", children: [
1636
+ visibleDifferences.map((difference) => /* @__PURE__ */ jsxs3(
1481
1637
  "span",
1482
1638
  {
1483
1639
  className: "flex h-6 max-w-full shrink-0 items-center gap-2 rounded-agg-full bg-agg-secondary-hover px-3 py-1 text-agg-xs font-agg-normal leading-agg-4 text-agg-foreground sm:max-w-[220px]",
1484
1640
  children: [
1485
- /* @__PURE__ */ jsx2(
1641
+ /* @__PURE__ */ jsx3(
1486
1642
  "i",
1487
1643
  {
1488
1644
  className: cn(
@@ -1493,12 +1649,12 @@ var SettlementSummary = ({
1493
1649
  "aria-hidden": "true"
1494
1650
  }
1495
1651
  ),
1496
- /* @__PURE__ */ jsx2("span", { className: "min-w-0 truncate", children: difference.title })
1652
+ /* @__PURE__ */ jsx3("span", { className: "min-w-0 truncate", children: difference.title })
1497
1653
  ]
1498
1654
  },
1499
1655
  difference.canonicalKey
1500
1656
  )),
1501
- hiddenDifferenceCount > 0 ? /* @__PURE__ */ jsxs2("span", { className: "flex h-6 shrink-0 items-center rounded-agg-full bg-agg-secondary-hover px-3 py-1 text-agg-xs font-agg-normal leading-agg-4 text-agg-foreground", children: [
1657
+ hiddenDifferenceCount > 0 ? /* @__PURE__ */ jsxs3("span", { className: "flex h-6 shrink-0 items-center rounded-agg-full bg-agg-secondary-hover px-3 py-1 text-agg-xs font-agg-normal leading-agg-4 text-agg-foreground", children: [
1502
1658
  "+",
1503
1659
  hiddenDifferenceCount
1504
1660
  ] }) : null
@@ -1519,18 +1675,18 @@ import {
1519
1675
  resolveEventTradingState,
1520
1676
  resolveMarketTradingState,
1521
1677
  useEventOrderbookData,
1522
- useLabels as useLabels5,
1678
+ useLabels as useLabels6,
1523
1679
  useLiveBestPrices,
1524
1680
  useLiveOutcomePrices,
1525
1681
  useMarketChart,
1526
1682
  useRollingChartWindow,
1527
- useSdkUiConfig as useSdkUiConfig2,
1683
+ useSdkUiConfig as useSdkUiConfig3,
1528
1684
  useVenueEvent as useVenueEvent2
1529
1685
  } from "@agg-build/hooks";
1530
1686
  import { useEffect as useEffect3, useMemo as useMemo5, useRef as useRef3, useState as useState3 } from "react";
1531
1687
 
1532
1688
  // src/primitives/chart/chart-type-switch.tsx
1533
- import { useLabels as useLabels3 } from "@agg-build/hooks";
1689
+ import { useLabels as useLabels4 } from "@agg-build/hooks";
1534
1690
  import { useMemo as useMemo3 } from "react";
1535
1691
 
1536
1692
  // src/primitives/chart/chart-type-switch.constants.ts
@@ -1556,13 +1712,13 @@ var resolveChartTypeOptionIconName = (chartType) => {
1556
1712
  };
1557
1713
 
1558
1714
  // src/primitives/chart/chart-type-switch.tsx
1559
- import { jsx as jsx3 } from "react/jsx-runtime";
1715
+ import { jsx as jsx4 } from "react/jsx-runtime";
1560
1716
  var ChartTypeSwitch = ({
1561
1717
  value,
1562
1718
  onValueChange,
1563
1719
  className
1564
1720
  }) => {
1565
- const labels = useLabels3();
1721
+ const labels = useLabels4();
1566
1722
  const options = useMemo3(
1567
1723
  () => CHART_TYPE_SWITCH_OPTION_KEYS.map((chartType) => ({
1568
1724
  value: chartType,
@@ -1592,7 +1748,7 @@ var ChartTypeSwitch = ({
1592
1748
  }
1593
1749
  onValueChange(nextOption.value);
1594
1750
  };
1595
- return /* @__PURE__ */ jsx3(
1751
+ return /* @__PURE__ */ jsx4(
1596
1752
  "div",
1597
1753
  {
1598
1754
  className: cn("agg-chart-type-switch inline-flex items-center gap-2", className),
@@ -1600,7 +1756,7 @@ var ChartTypeSwitch = ({
1600
1756
  "aria-label": labels.common.chartTypeSwitchAria,
1601
1757
  children: options.map((option, index) => {
1602
1758
  const isActive = option.value === value;
1603
- return /* @__PURE__ */ jsx3(
1759
+ return /* @__PURE__ */ jsx4(
1604
1760
  "button",
1605
1761
  {
1606
1762
  type: "button",
@@ -1627,7 +1783,7 @@ var ChartTypeSwitch = ({
1627
1783
  onKeyDown: (event) => {
1628
1784
  handleKeyDown(event, index);
1629
1785
  },
1630
- children: /* @__PURE__ */ jsx3(Icon, { name: option.iconName, color: "currentColor", className: "h-5 w-5" })
1786
+ children: /* @__PURE__ */ jsx4(Icon, { name: option.iconName, color: "currentColor", className: "h-5 w-5" })
1631
1787
  },
1632
1788
  option.value
1633
1789
  );
@@ -1702,15 +1858,14 @@ var filterChartVenueOutcomesByRenderableVenues = ({
1702
1858
  };
1703
1859
 
1704
1860
  // src/events/item-details/event-list-item-details-market-selector.tsx
1705
- import { useLabels as useLabels4 } from "@agg-build/hooks";
1861
+ import { useLabels as useLabels5, useSdkUiConfig as useSdkUiConfig2 } from "@agg-build/hooks";
1706
1862
  import { useEffect as useEffect2, useLayoutEffect, useMemo as useMemo4, useRef as useRef2, useState as useState2 } from "react";
1707
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1863
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1708
1864
  var MARKET_PILL_MAX_ROWS = 2;
1709
1865
  var MARKET_PILL_FALLBACK_CONTAINER_WIDTH = 640;
1710
1866
  var MARKET_PILL_FALLBACK_GAP = 8;
1711
1867
  var MARKET_PILL_FALLBACK_WIDTH = 72;
1712
1868
  var MARKET_PILL_FALLBACK_MORE_WIDTH = 88;
1713
- var MARKET_PILL_MORE_LABEL = "More";
1714
1869
  var MARKET_DROPDOWN_MAX_VISIBLE_OPTIONS = 6;
1715
1870
  var MARKET_DROPDOWN_OPTION_HEIGHT = 48;
1716
1871
  var MARKET_DROPDOWN_MAX_HEIGHT = MARKET_DROPDOWN_MAX_VISIBLE_OPTIONS * MARKET_DROPDOWN_OPTION_HEIGHT;
@@ -1795,11 +1950,17 @@ var resolveMarketPillLayout = ({
1795
1950
  var EventListItemDetailsMarketSelector = ({
1796
1951
  className,
1797
1952
  options,
1953
+ browseOptions = options,
1798
1954
  selectedValue,
1955
+ liveValue,
1956
+ alwaysShowMore = false,
1799
1957
  onChange
1800
1958
  }) => {
1801
1959
  var _a;
1802
- const labels = useLabels4();
1960
+ const labels = useLabels5();
1961
+ const {
1962
+ features: { enableAnimations }
1963
+ } = useSdkUiConfig2();
1803
1964
  const containerRef = useRef2(null);
1804
1965
  const measurementContainerRef = useRef2(null);
1805
1966
  const moreButtonRef = useRef2(null);
@@ -1820,15 +1981,22 @@ var EventListItemDetailsMarketSelector = ({
1820
1981
  });
1821
1982
  const selectedHiddenOption = useMemo4(() => {
1822
1983
  var _a2;
1823
- return (_a2 = layout.hiddenItems.find((option) => option.value === selectedValue)) != null ? _a2 : null;
1824
- }, [layout.hiddenItems, selectedValue]);
1825
- const moreButtonLabel = (_a = selectedHiddenOption == null ? void 0 : selectedHiddenOption.label) != null ? _a : MARKET_PILL_MORE_LABEL;
1826
- const isMoreButtonSelected = selectedHiddenOption != null;
1984
+ return (_a2 = browseOptions.find(
1985
+ (option) => option.value === selectedValue && !layout.visibleItems.some((visibleOption) => visibleOption.value === option.value)
1986
+ )) != null ? _a2 : null;
1987
+ }, [browseOptions, layout.visibleItems, selectedValue]);
1988
+ const hasSeparateBrowseOptions = browseOptions.length > options.length;
1989
+ const moreButtonLabel = hasSeparateBrowseOptions ? labels.eventItemDetails.moreMarkets : (_a = selectedHiddenOption == null ? void 0 : selectedHiddenOption.label) != null ? _a : labels.eventItemDetails.moreMarkets;
1990
+ const isMoreButtonSelected = !alwaysShowMore && selectedHiddenOption != null;
1991
+ const hasMoreButton = alwaysShowMore || layout.hiddenItems.length > 0 || hasSeparateBrowseOptions;
1992
+ const displayedOptions = alwaysShowMore ? options : layout.visibleItems;
1827
1993
  const filteredOptions = useMemo4(() => {
1828
1994
  const normalizedSearchValue = searchValue.trim().toLowerCase();
1829
- if (!normalizedSearchValue) return options;
1830
- return options.filter((option) => option.label.toLowerCase().includes(normalizedSearchValue));
1831
- }, [options, searchValue]);
1995
+ if (!normalizedSearchValue) return browseOptions;
1996
+ return browseOptions.filter(
1997
+ (option) => option.label.toLowerCase().includes(normalizedSearchValue)
1998
+ );
1999
+ }, [browseOptions, searchValue]);
1832
2000
  const lastMeasuredKeyRef = useRef2(null);
1833
2001
  const measureFrameRef = useRef2(null);
1834
2002
  useLayoutEffect(() => {
@@ -1944,7 +2112,7 @@ var EventListItemDetailsMarketSelector = ({
1944
2112
  };
1945
2113
  }, [isDropdownOpen]);
1946
2114
  useLayoutEffect(() => {
1947
- if (!isDropdownOpen || isMobileViewport) return;
2115
+ if (!isDropdownOpen || isMobileViewport && !alwaysShowMore) return;
1948
2116
  const updateDropdownPosition = () => {
1949
2117
  const containerElement = containerRef.current;
1950
2118
  const moreButtonElement = moreButtonRef.current;
@@ -1978,7 +2146,7 @@ var EventListItemDetailsMarketSelector = ({
1978
2146
  return () => {
1979
2147
  resizeObserver.disconnect();
1980
2148
  };
1981
- }, [isDropdownOpen, isMobileViewport, moreButtonLabel]);
2149
+ }, [alwaysShowMore, isDropdownOpen, isMobileViewport, moreButtonLabel]);
1982
2150
  useEffect2(() => {
1983
2151
  if (!isDropdownOpen) return;
1984
2152
  const handlePointerDown = (event) => {
@@ -2007,11 +2175,11 @@ var EventListItemDetailsMarketSelector = ({
2007
2175
  onChange(marketId);
2008
2176
  setIsDropdownOpen(false);
2009
2177
  };
2010
- if (isMobileViewport) {
2011
- return /* @__PURE__ */ jsx4(
2178
+ if (isMobileViewport && !alwaysShowMore) {
2179
+ return /* @__PURE__ */ jsx5(
2012
2180
  AutocompleteSelect,
2013
2181
  {
2014
- options,
2182
+ options: browseOptions,
2015
2183
  value: selectedValue,
2016
2184
  onChange,
2017
2185
  placeholder: labels.eventItemDetails.marketSelectPlaceholder,
@@ -2022,15 +2190,17 @@ var EventListItemDetailsMarketSelector = ({
2022
2190
  }
2023
2191
  );
2024
2192
  }
2025
- return /* @__PURE__ */ jsxs3("div", { ref: containerRef, className: cn("agg-market-select relative w-full", className), children: [
2026
- /* @__PURE__ */ jsxs3("div", { className: "agg-market-pill-list flex flex-wrap gap-2", children: [
2027
- layout.visibleItems.map((option) => {
2193
+ return /* @__PURE__ */ jsxs4("div", { ref: containerRef, className: cn("agg-market-select relative w-full", className), children: [
2194
+ /* @__PURE__ */ jsxs4("div", { className: "agg-market-pill-list flex flex-wrap gap-2", children: [
2195
+ displayedOptions.map((option) => {
2028
2196
  const isSelected = option.value === selectedValue;
2029
- return /* @__PURE__ */ jsx4(
2197
+ const isLive = option.value === liveValue;
2198
+ return /* @__PURE__ */ jsxs4(
2030
2199
  "button",
2031
2200
  {
2032
2201
  type: "button",
2033
2202
  "aria-pressed": isSelected,
2203
+ "aria-label": isLive ? `${option.label}, ${labels.eventItemDetails.liveMarket}` : option.label,
2034
2204
  className: cn(
2035
2205
  "agg-market-pill inline-flex min-h-8 items-center justify-center rounded-agg-full border px-4 py-1.5 text-left text-agg-sm leading-agg-5 text-agg-foreground transition-colors",
2036
2206
  "cursor-pointer hover:bg-agg-tertiary!",
@@ -2042,12 +2212,28 @@ var EventListItemDetailsMarketSelector = ({
2042
2212
  eventToHandle.stopPropagation();
2043
2213
  handleSelectMarket(option.value);
2044
2214
  },
2045
- children: /* @__PURE__ */ jsx4("span", { className: "truncate", children: option.label })
2215
+ children: [
2216
+ isLive ? /* @__PURE__ */ jsx5(
2217
+ "span",
2218
+ {
2219
+ "aria-hidden": "true",
2220
+ className: cn(
2221
+ "mr-2 size-1.5 shrink-0 rounded-full bg-agg-primary ring-4 ring-agg-primary/20",
2222
+ enableAnimations ? "animate-pulse motion-reduce:animate-none" : null
2223
+ )
2224
+ }
2225
+ ) : null,
2226
+ /* @__PURE__ */ jsx5("span", { className: "truncate", children: option.label }),
2227
+ isLive ? /* @__PURE__ */ jsxs4("span", { className: "sr-only", children: [
2228
+ " ",
2229
+ labels.eventItemDetails.liveMarket
2230
+ ] }) : null
2231
+ ]
2046
2232
  },
2047
2233
  option.value
2048
2234
  );
2049
2235
  }),
2050
- layout.hiddenItems.length > 0 ? /* @__PURE__ */ jsxs3(
2236
+ hasMoreButton ? /* @__PURE__ */ jsxs4(
2051
2237
  "button",
2052
2238
  {
2053
2239
  ref: moreButtonRef,
@@ -2068,8 +2254,8 @@ var EventListItemDetailsMarketSelector = ({
2068
2254
  setIsDropdownOpen((previousValue) => !previousValue);
2069
2255
  },
2070
2256
  children: [
2071
- /* @__PURE__ */ jsx4("span", { className: "truncate", children: moreButtonLabel }),
2072
- /* @__PURE__ */ jsx4(
2257
+ /* @__PURE__ */ jsx5("span", { className: "truncate", children: moreButtonLabel }),
2258
+ /* @__PURE__ */ jsx5(
2073
2259
  Icon,
2074
2260
  {
2075
2261
  name: isDropdownOpen ? "chevron-up" : "chevron-down",
@@ -2083,7 +2269,7 @@ var EventListItemDetailsMarketSelector = ({
2083
2269
  }
2084
2270
  ) : null
2085
2271
  ] }),
2086
- isDropdownOpen ? /* @__PURE__ */ jsxs3(
2272
+ isDropdownOpen ? /* @__PURE__ */ jsxs4(
2087
2273
  "div",
2088
2274
  {
2089
2275
  id: "agg-event-details-market-dropdown",
@@ -2100,9 +2286,9 @@ var EventListItemDetailsMarketSelector = ({
2100
2286
  eventToHandle.stopPropagation();
2101
2287
  },
2102
2288
  children: [
2103
- /* @__PURE__ */ jsxs3("div", { className: "border-b border-agg-separator", children: [
2104
- /* @__PURE__ */ jsx4("label", { className: "sr-only", htmlFor: "agg-event-details-market-search", children: labels.eventItemDetails.marketSelectSearchPlaceholder }),
2105
- /* @__PURE__ */ jsx4(
2289
+ /* @__PURE__ */ jsxs4("div", { className: "border-b border-agg-separator", children: [
2290
+ /* @__PURE__ */ jsx5("label", { className: "sr-only", htmlFor: "agg-event-details-market-search", children: labels.eventItemDetails.marketSelectSearchPlaceholder }),
2291
+ /* @__PURE__ */ jsx5(
2106
2292
  "input",
2107
2293
  {
2108
2294
  ref: dropdownInputRef,
@@ -2124,7 +2310,7 @@ var EventListItemDetailsMarketSelector = ({
2124
2310
  }
2125
2311
  )
2126
2312
  ] }),
2127
- /* @__PURE__ */ jsx4(
2313
+ /* @__PURE__ */ jsx5(
2128
2314
  "div",
2129
2315
  {
2130
2316
  role: "listbox",
@@ -2133,7 +2319,7 @@ var EventListItemDetailsMarketSelector = ({
2133
2319
  style: { maxHeight: `${MARKET_DROPDOWN_MAX_HEIGHT}px` },
2134
2320
  children: filteredOptions.length > 0 ? filteredOptions.map((option) => {
2135
2321
  const isSelected = option.value === selectedValue;
2136
- return /* @__PURE__ */ jsxs3(
2322
+ return /* @__PURE__ */ jsxs4(
2137
2323
  "button",
2138
2324
  {
2139
2325
  type: "button",
@@ -2152,25 +2338,25 @@ var EventListItemDetailsMarketSelector = ({
2152
2338
  handleSelectMarket(option.value);
2153
2339
  },
2154
2340
  children: [
2155
- isSelected ? /* @__PURE__ */ jsx4(
2341
+ isSelected ? /* @__PURE__ */ jsx5(
2156
2342
  "span",
2157
2343
  {
2158
2344
  "aria-hidden": "true",
2159
2345
  className: "absolute bottom-2 left-0 top-2 w-1 bg-agg-primary"
2160
2346
  }
2161
2347
  ) : null,
2162
- /* @__PURE__ */ jsx4("span", { className: "truncate", children: option.label })
2348
+ /* @__PURE__ */ jsx5("span", { className: "truncate", children: option.label })
2163
2349
  ]
2164
2350
  },
2165
2351
  option.value
2166
2352
  );
2167
- }) : /* @__PURE__ */ jsx4("div", { className: "px-5 py-4 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: labels.eventItemDetails.marketSelectEmpty })
2353
+ }) : /* @__PURE__ */ jsx5("div", { className: "px-5 py-4 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: labels.eventItemDetails.marketSelectEmpty })
2168
2354
  }
2169
2355
  )
2170
2356
  ]
2171
2357
  }
2172
2358
  ) : null,
2173
- /* @__PURE__ */ jsxs3(
2359
+ /* @__PURE__ */ jsxs4(
2174
2360
  "div",
2175
2361
  {
2176
2362
  ref: measurementContainerRef,
@@ -2179,7 +2365,7 @@ var EventListItemDetailsMarketSelector = ({
2179
2365
  children: [
2180
2366
  options.map((option) => {
2181
2367
  const isSelected = option.value === selectedValue;
2182
- return /* @__PURE__ */ jsx4(
2368
+ return /* @__PURE__ */ jsx5(
2183
2369
  "button",
2184
2370
  {
2185
2371
  ref: (element) => {
@@ -2191,12 +2377,12 @@ var EventListItemDetailsMarketSelector = ({
2191
2377
  "inline-flex min-h-8 items-center justify-center rounded-agg-full border px-4 py-1.5 text-agg-sm leading-agg-5",
2192
2378
  isSelected ? "border-agg-primary bg-agg-secondary font-agg-bold" : "border-transparent bg-agg-secondary-hover font-agg-normal"
2193
2379
  ),
2194
- children: /* @__PURE__ */ jsx4("span", { className: "truncate", children: option.label })
2380
+ children: /* @__PURE__ */ jsx5("span", { className: "truncate", children: option.label })
2195
2381
  },
2196
2382
  option.value
2197
2383
  );
2198
2384
  }),
2199
- /* @__PURE__ */ jsxs3(
2385
+ /* @__PURE__ */ jsxs4(
2200
2386
  "button",
2201
2387
  {
2202
2388
  ref: moreButtonMeasureRef,
@@ -2204,8 +2390,8 @@ var EventListItemDetailsMarketSelector = ({
2204
2390
  tabIndex: -1,
2205
2391
  className: "inline-flex min-h-8 items-center justify-center gap-1.5 rounded-agg-full border border-agg-primary bg-agg-secondary px-4 py-1.5 text-agg-sm leading-agg-5 text-agg-foreground",
2206
2392
  children: [
2207
- /* @__PURE__ */ jsx4("span", { children: moreButtonLabel }),
2208
- /* @__PURE__ */ jsx4(
2393
+ /* @__PURE__ */ jsx5("span", { children: moreButtonLabel }),
2394
+ /* @__PURE__ */ jsx5(
2209
2395
  Icon,
2210
2396
  {
2211
2397
  name: "chevron-down",
@@ -2225,7 +2411,7 @@ var EventListItemDetailsMarketSelector = ({
2225
2411
  };
2226
2412
 
2227
2413
  // src/events/item-details/index.tsx
2228
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
2414
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
2229
2415
  var resolveEventDetailsSyncKey = (event) => {
2230
2416
  var _a, _b, _c, _d, _e, _f, _g, _h;
2231
2417
  const parts = [
@@ -2270,8 +2456,8 @@ var EventListItemDetailsLoadingState = ({
2270
2456
  classNames,
2271
2457
  ariaLabel
2272
2458
  }) => {
2273
- const labels = useLabels5();
2274
- return /* @__PURE__ */ jsx5(
2459
+ const labels = useLabels6();
2460
+ return /* @__PURE__ */ jsx6(
2275
2461
  Skeleton,
2276
2462
  {
2277
2463
  view: "event-list-item-details",
@@ -2284,16 +2470,16 @@ var EventListItemDetailsUnavailableState = ({
2284
2470
  classNames,
2285
2471
  ariaLabel
2286
2472
  }) => {
2287
- const labels = useLabels5();
2288
- return /* @__PURE__ */ jsx5(
2473
+ const labels = useLabels6();
2474
+ return /* @__PURE__ */ jsx6(
2289
2475
  Card,
2290
2476
  {
2291
2477
  className: cn(detailsBaseCardClassName, classNames == null ? void 0 : classNames.root),
2292
2478
  role: "status",
2293
2479
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.unavailableAria,
2294
- children: /* @__PURE__ */ jsxs4("div", { className: cn("flex flex-col gap-1", classNames == null ? void 0 : classNames.header), children: [
2295
- /* @__PURE__ */ jsx5(Typography, { variant: "body-large-strong", className: cn("truncate", classNames == null ? void 0 : classNames.title), children: labels.eventItemDetails.unavailableTitle }),
2296
- /* @__PURE__ */ jsx5(Typography, { variant: "body", className: "text-agg-muted-foreground", children: labels.eventItemDetails.unavailableDescription })
2480
+ children: /* @__PURE__ */ jsxs5("div", { className: cn("flex flex-col gap-1", classNames == null ? void 0 : classNames.header), children: [
2481
+ /* @__PURE__ */ jsx6(Typography, { variant: "body-large-strong", className: cn("truncate", classNames == null ? void 0 : classNames.title), children: labels.eventItemDetails.unavailableTitle }),
2482
+ /* @__PURE__ */ jsx6(Typography, { variant: "body", className: "text-agg-muted-foreground", children: labels.eventItemDetails.unavailableDescription })
2297
2483
  ] })
2298
2484
  }
2299
2485
  );
@@ -2302,13 +2488,13 @@ var EventListItemDetailsNotFoundState = ({
2302
2488
  classNames: _classNames,
2303
2489
  ariaLabel: _ariaLabel
2304
2490
  }) => {
2305
- const labels = useLabels5();
2306
- return /* @__PURE__ */ jsx5(
2491
+ const labels = useLabels6();
2492
+ return /* @__PURE__ */ jsx6(
2307
2493
  StateMessage,
2308
2494
  {
2309
2495
  title: labels.eventItemDetails.notFoundTitle,
2310
2496
  description: labels.eventItemDetails.notFoundDescription,
2311
- icon: /* @__PURE__ */ jsx5(SearchEmptyIcon, {}),
2497
+ icon: /* @__PURE__ */ jsx6(SearchEmptyIcon, {}),
2312
2498
  classNames: { root: "min-h-[280px] md:min-h-[320px]" }
2313
2499
  }
2314
2500
  );
@@ -2333,7 +2519,7 @@ var EventListItemDetailsGraphSection = ({
2333
2519
  onRangeOverrideChange
2334
2520
  }) => {
2335
2521
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2336
- const labels = useLabels5();
2522
+ const labels = useLabels6();
2337
2523
  const tradingContext = useEventTradingContext();
2338
2524
  const [selectedGraphVenue, setSelectedGraphVenue] = useState3(null);
2339
2525
  const [chartOutcomeLabel, setChartOutcomeLabel] = useState3(
@@ -2351,7 +2537,7 @@ var EventListItemDetailsGraphSection = ({
2351
2537
  chart: { selectedChartTimeRange },
2352
2538
  formatting: { formatPercent, formatPrice },
2353
2539
  general: { theme }
2354
- } = useSdkUiConfig2();
2540
+ } = useSdkUiConfig3();
2355
2541
  const isDarkTheme = theme === "dark";
2356
2542
  const effectiveChartTimeRange = rangeOverride != null ? rangeOverride : selectedChartTimeRange;
2357
2543
  const rollingWindow = useRollingChartWindow({ range: effectiveChartTimeRange });
@@ -2502,18 +2688,18 @@ var EventListItemDetailsGraphSection = ({
2502
2688
  void refetchScopedMarketChart();
2503
2689
  };
2504
2690
  if (scopedMarketChartError) {
2505
- return /* @__PURE__ */ jsx5("div", { className: cn("agg-chart-region w-full", classNames == null ? void 0 : classNames.chart), children: /* @__PURE__ */ jsx5(
2691
+ return /* @__PURE__ */ jsx6("div", { className: cn("agg-chart-region w-full", classNames == null ? void 0 : classNames.chart), children: /* @__PURE__ */ jsx6(
2506
2692
  StateMessage,
2507
2693
  {
2508
2694
  title: labels.eventItemDetails.chartUnavailableTitle,
2509
2695
  description: labels.eventItemDetails.chartUnavailableDescription,
2510
- icon: /* @__PURE__ */ jsx5(WarningIcon, {}),
2696
+ icon: /* @__PURE__ */ jsx6(WarningIcon, {}),
2511
2697
  onAction: handleRetryMarketChart,
2512
2698
  classNames: { root: "min-h-[300px] px-5 py-10 md:px-10" }
2513
2699
  }
2514
2700
  ) });
2515
2701
  }
2516
- return /* @__PURE__ */ jsx5(
2702
+ return /* @__PURE__ */ jsx6(
2517
2703
  LineChart,
2518
2704
  {
2519
2705
  classNames: { root: cn("agg-chart-region", classNames == null ? void 0 : classNames.chart) },
@@ -2526,7 +2712,7 @@ var EventListItemDetailsGraphSection = ({
2526
2712
  showSeriesControls: selectedMarketOutcomes.length > 0,
2527
2713
  renderSeriesControls: ({ handleSeriesChange }) => {
2528
2714
  var _a2, _b2, _c2, _d2;
2529
- return /* @__PURE__ */ jsxs4(
2715
+ return /* @__PURE__ */ jsxs5(
2530
2716
  "div",
2531
2717
  {
2532
2718
  className: cn(
@@ -2537,7 +2723,7 @@ var EventListItemDetailsGraphSection = ({
2537
2723
  classNames == null ? void 0 : classNames.summary
2538
2724
  ),
2539
2725
  children: [
2540
- /* @__PURE__ */ jsx5(
2726
+ /* @__PURE__ */ jsx6(
2541
2727
  "div",
2542
2728
  {
2543
2729
  className: cn(
@@ -2551,7 +2737,7 @@ var EventListItemDetailsGraphSection = ({
2551
2737
  const text = formatMarketProbabilityPercent(percentage, formatPercent);
2552
2738
  const seriesId = `${item.venue}-chart`;
2553
2739
  const isActiveVenue = activeGraphVenue === item.venue;
2554
- return /* @__PURE__ */ jsx5(
2740
+ return /* @__PURE__ */ jsx6(
2555
2741
  "button",
2556
2742
  {
2557
2743
  type: "button",
@@ -2570,12 +2756,12 @@ var EventListItemDetailsGraphSection = ({
2570
2756
  setSelectedGraphVenue(nextSelectedGraphVenue);
2571
2757
  handleSeriesChange(seriesId);
2572
2758
  },
2573
- children: /* @__PURE__ */ jsx5(
2759
+ children: /* @__PURE__ */ jsx6(
2574
2760
  Badge,
2575
2761
  {
2576
2762
  text,
2577
2763
  size: "large",
2578
- prefix: /* @__PURE__ */ jsx5(
2764
+ prefix: /* @__PURE__ */ jsx6(
2579
2765
  VenueLogo,
2580
2766
  {
2581
2767
  venue: item.market.venue,
@@ -2597,7 +2783,7 @@ var EventListItemDetailsGraphSection = ({
2597
2783
  })
2598
2784
  }
2599
2785
  ),
2600
- /* @__PURE__ */ jsx5(
2786
+ /* @__PURE__ */ jsx6(
2601
2787
  SwitchButton,
2602
2788
  {
2603
2789
  ariaLabel: labels.eventItemDetails.outcomeSelectorAria,
@@ -2648,15 +2834,17 @@ var EventListItemDetailsContent = ({
2648
2834
  ariaLabel,
2649
2835
  defaultTimeRange,
2650
2836
  onClick,
2651
- midpointsResult
2837
+ midpointsResult,
2838
+ recurringMarkets,
2839
+ sportsLiveState
2652
2840
  }) => {
2653
- var _a, _b, _c, _d;
2841
+ var _a, _b, _c, _d, _e, _f;
2654
2842
  const [selectedChartType, setSelectedChartType] = useState3("line");
2655
2843
  const lastAppliedEventSyncKeyRef = useRef3(null);
2656
2844
  const lastAppliedDefaultRef = useRef3(null);
2657
2845
  const [chartRangeOverride, setChartRangeOverride] = useState3(null);
2658
- const config = useSdkUiConfig2();
2659
- const labels = useLabels5();
2846
+ const config = useSdkUiConfig3();
2847
+ const labels = useLabels6();
2660
2848
  const tradingContext = useEventTradingContext();
2661
2849
  const eventSyncKey = useMemo5(() => resolveEventDetailsSyncKey(event), [event]);
2662
2850
  const resolvedEventTradingState = useMemo5(() => {
@@ -2756,10 +2944,14 @@ var EventListItemDetailsContent = ({
2756
2944
  [venueMarkets]
2757
2945
  );
2758
2946
  const volumeLabel = useMemo5(() => {
2759
- const resolvedVolume = resolveDisplayVolume(event.volume, venueMarkets);
2760
- if (typeof resolvedVolume !== "number") return "";
2761
- return `${config.formatting.formatCompactCurrency(resolvedVolume)} ${labels.eventItemDetails.volumeSuffix}`;
2762
- }, [config, event.volume, labels.eventItemDetails.volumeSuffix, venueMarkets]);
2947
+ var _a2;
2948
+ const selectedMarketVolume = (_a2 = resolveMarketFromVenueMarkets(
2949
+ venueMarkets,
2950
+ scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id
2951
+ )) == null ? void 0 : _a2.volume;
2952
+ if (typeof selectedMarketVolume !== "number" || selectedMarketVolume <= 0) return "";
2953
+ return `${config.formatting.formatCompactCurrency(selectedMarketVolume)} ${labels.eventItemDetails.volumeSuffix}`;
2954
+ }, [config, labels.eventItemDetails.volumeSuffix, scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id, venueMarkets]);
2763
2955
  const resolvedTitle = useMemo5(() => {
2764
2956
  return resolveEventHeading({
2765
2957
  title: event.title,
@@ -2767,7 +2959,9 @@ var EventListItemDetailsContent = ({
2767
2959
  structureType: event.structureType,
2768
2960
  gameStartTime: event.gameStartTime,
2769
2961
  endDate: event.endDate,
2770
- venueMarkets: event.venueMarkets
2962
+ venueMarkets: event.venueMarkets,
2963
+ recurringCryptoWindowStart: recurringMarkets ? null : void 0,
2964
+ recurringCryptoDuration: recurringMarkets == null ? void 0 : recurringMarkets.duration
2771
2965
  });
2772
2966
  }, [
2773
2967
  event.categories,
@@ -2775,18 +2969,19 @@ var EventListItemDetailsContent = ({
2775
2969
  event.gameStartTime,
2776
2970
  event.structureType,
2777
2971
  event.title,
2778
- event.venueMarkets
2972
+ event.venueMarkets,
2973
+ recurringMarkets
2779
2974
  ]);
2780
- return /* @__PURE__ */ jsxs4(
2975
+ return /* @__PURE__ */ jsxs5(
2781
2976
  Card,
2782
2977
  {
2783
2978
  className: cn("group/agg-event-details", detailsBaseCardClassName, classNames == null ? void 0 : classNames.root),
2784
- "aria-label": ariaLabel != null ? ariaLabel : [resolvedTitle.title, resolvedTitle.timestampLabel].filter(Boolean).join(" "),
2979
+ "aria-label": ariaLabel != null ? ariaLabel : [resolvedTitle.title, (_c = recurringMarkets == null ? void 0 : recurringMarkets.windowLabel) != null ? _c : resolvedTitle.timestampLabel].filter(Boolean).join(" "),
2785
2980
  onClick: () => {
2786
2981
  onClick == null ? void 0 : onClick(event);
2787
2982
  },
2788
2983
  children: [
2789
- /* @__PURE__ */ jsxs4(
2984
+ /* @__PURE__ */ jsxs5(
2790
2985
  "div",
2791
2986
  {
2792
2987
  className: cn(
@@ -2797,7 +2992,7 @@ var EventListItemDetailsContent = ({
2797
2992
  classNames == null ? void 0 : classNames.header
2798
2993
  ),
2799
2994
  children: [
2800
- /* @__PURE__ */ jsx5(
2995
+ /* @__PURE__ */ jsx6(
2801
2996
  RemoteImage,
2802
2997
  {
2803
2998
  src: optimizedImageUrl2(event.image, 60),
@@ -2805,36 +3000,101 @@ var EventListItemDetailsContent = ({
2805
3000
  className: "agg-event-image size-10 rounded-agg-lg object-cover md:size-[60px]"
2806
3001
  }
2807
3002
  ),
2808
- /* @__PURE__ */ jsxs4("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2809
- /* @__PURE__ */ jsxs4("div", { className: "min-w-0", children: [
2810
- /* @__PURE__ */ jsx5(
2811
- Typography,
2812
- {
2813
- variant: "body-strong",
2814
- className: cn(
2815
- "agg-event-title",
2816
- "min-w-0 text-agg-base font-agg-bold! leading-agg-6 md:text-agg-2xl md:leading-agg-8",
2817
- resolvedTitle.timestampLabel ? "truncate whitespace-nowrap" : "truncate text-wrap wrap-break-word line-clamp-2",
2818
- classNames == null ? void 0 : classNames.title
3003
+ /* @__PURE__ */ jsxs5("div", { className: cn("flex min-w-0 flex-1 flex-col", recurringMarkets ? "gap-3" : "gap-2"), children: [
3004
+ /* @__PURE__ */ jsxs5(
3005
+ "div",
3006
+ {
3007
+ className: cn(
3008
+ "min-w-0",
3009
+ recurringMarkets ? "flex flex-col gap-1 md:flex-row md:items-baseline md:justify-between" : null
3010
+ ),
3011
+ children: [
3012
+ /* @__PURE__ */ jsx6(
3013
+ Typography,
3014
+ {
3015
+ variant: "body-strong",
3016
+ className: cn(
3017
+ "agg-event-title",
3018
+ "min-w-0 text-agg-base font-agg-bold! leading-agg-6 md:text-agg-2xl md:leading-agg-8",
3019
+ resolvedTitle.timestampLabel && !recurringMarkets ? "truncate whitespace-nowrap" : "truncate text-wrap wrap-break-word line-clamp-2",
3020
+ classNames == null ? void 0 : classNames.title
3021
+ ),
3022
+ children: resolvedTitle.title
3023
+ }
2819
3024
  ),
2820
- children: resolvedTitle.title
3025
+ (recurringMarkets == null ? void 0 : recurringMarkets.windowLabel) ? /* @__PURE__ */ jsx6(
3026
+ Typography,
3027
+ {
3028
+ variant: "body",
3029
+ className: "agg-event-timestamp min-w-0 shrink-0 truncate text-agg-sm leading-agg-5 text-agg-muted-foreground md:text-agg-base md:leading-agg-6",
3030
+ children: recurringMarkets.windowLabel
3031
+ }
3032
+ ) : resolvedTitle.timestampLabel ? /* @__PURE__ */ jsx6(
3033
+ Typography,
3034
+ {
3035
+ variant: "body",
3036
+ className: "agg-event-timestamp mt-0.5 min-w-0 truncate text-agg-sm leading-agg-5 text-agg-muted-foreground",
3037
+ children: resolvedTitle.timestampLabel
3038
+ }
3039
+ ) : null
3040
+ ]
3041
+ }
3042
+ ),
3043
+ recurringMarkets ? /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
3044
+ /* @__PURE__ */ jsx6(
3045
+ EventListItemDetailsMarketSelector,
3046
+ {
3047
+ className: cn("min-w-0 flex-1", classNames == null ? void 0 : classNames.headerPills),
3048
+ options: recurringMarkets.visibleOptions,
3049
+ browseOptions: recurringMarkets.browseOptions,
3050
+ selectedValue: recurringMarkets.selectedValue,
3051
+ liveValue: recurringMarkets.liveValue,
3052
+ alwaysShowMore: true,
3053
+ onChange: recurringMarkets.onSelect
2821
3054
  }
2822
3055
  ),
2823
- resolvedTitle.timestampLabel ? /* @__PURE__ */ jsx5(
2824
- Typography,
3056
+ recurringMarkets.isResolving ? /* @__PURE__ */ jsx6(
3057
+ Button,
3058
+ {
3059
+ variant: "secondary",
3060
+ size: "small",
3061
+ disabled: !recurringMarkets.canGoToLive,
3062
+ "aria-label": recurringMarkets.canGoToLive ? labels.eventMarketPage.goToLive : labels.eventMarketPage.liveMarketUnavailable,
3063
+ className: "h-8 shrink-0",
3064
+ onClick: (eventToHandle) => {
3065
+ eventToHandle.preventDefault();
3066
+ eventToHandle.stopPropagation();
3067
+ recurringMarkets.onGoToLive();
3068
+ },
3069
+ children: labels.eventMarketPage.goToLive
3070
+ }
3071
+ ) : recurringMarkets.countdownLabel ? /* @__PURE__ */ jsxs5(
3072
+ "div",
2825
3073
  {
2826
- variant: "body",
2827
- className: "agg-event-timestamp mt-0.5 min-w-0 truncate text-agg-sm leading-agg-5 text-agg-muted-foreground",
2828
- children: resolvedTitle.timestampLabel
3074
+ role: "timer",
3075
+ "aria-live": "off",
3076
+ "aria-label": (_d = recurringMarkets.countdownAriaLabel) != null ? _d : void 0,
3077
+ className: "flex shrink-0 items-center gap-1.5 text-agg-foreground",
3078
+ children: [
3079
+ /* @__PURE__ */ jsx6(
3080
+ Icon,
3081
+ {
3082
+ name: "hourglass-start",
3083
+ size: "small",
3084
+ className: "size-3.5",
3085
+ "aria-hidden": "true"
3086
+ }
3087
+ ),
3088
+ /* @__PURE__ */ jsx6(Typography, { variant: "body-strong", className: "text-agg-base leading-agg-6", children: recurringMarkets.countdownLabel })
3089
+ ]
2829
3090
  }
2830
3091
  ) : null
2831
- ] }),
2832
- venueMarkets.length > 1 ? /* @__PURE__ */ jsx5(
3092
+ ] }) : venueMarkets.length > 1 ? /* @__PURE__ */ jsx6(
2833
3093
  EventListItemDetailsMarketSelector,
2834
3094
  {
2835
3095
  className: classNames == null ? void 0 : classNames.headerPills,
2836
3096
  options: marketOptions,
2837
- selectedValue: (_c = scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id) != null ? _c : "",
3097
+ selectedValue: (_e = scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id) != null ? _e : "",
2838
3098
  onChange: (marketId) => {
2839
3099
  tradingContext == null ? void 0 : tradingContext.selectMarket(marketId);
2840
3100
  }
@@ -2844,7 +3104,8 @@ var EventListItemDetailsContent = ({
2844
3104
  ]
2845
3105
  }
2846
3106
  ),
2847
- detailsStats && detailsStats.length > 0 ? /* @__PURE__ */ jsx5(
3107
+ /* @__PURE__ */ jsx6(SportsLiveScore, { state: sportsLiveState, className: classNames == null ? void 0 : classNames.sportsLive }),
3108
+ detailsStats && detailsStats.length > 0 ? /* @__PURE__ */ jsx6(
2848
3109
  "div",
2849
3110
  {
2850
3111
  className: cn(
@@ -2853,14 +3114,14 @@ var EventListItemDetailsContent = ({
2853
3114
  ),
2854
3115
  children: detailsStats.map((statItem) => {
2855
3116
  const deltaClassName = statItem.deltaTone === "positive" ? "text-agg-success!" : statItem.deltaTone === "negative" ? "text-agg-error!" : "text-agg-muted-foreground";
2856
- return /* @__PURE__ */ jsxs4(
3117
+ return /* @__PURE__ */ jsxs5(
2857
3118
  "div",
2858
3119
  {
2859
3120
  className: "agg-event-stat flex flex-col gap-1",
2860
3121
  children: [
2861
- /* @__PURE__ */ jsx5(Typography, { variant: "caption-caps", className: "text-agg-muted-foreground", children: statItem.label }),
2862
- /* @__PURE__ */ jsxs4("div", { className: "flex items-baseline gap-1", children: [
2863
- /* @__PURE__ */ jsx5(
3122
+ /* @__PURE__ */ jsx6(Typography, { variant: "caption-caps", className: "text-agg-muted-foreground", children: statItem.label }),
3123
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-baseline gap-1", children: [
3124
+ /* @__PURE__ */ jsx6(
2864
3125
  Typography,
2865
3126
  {
2866
3127
  variant: "body",
@@ -2868,7 +3129,7 @@ var EventListItemDetailsContent = ({
2868
3129
  children: statItem.value
2869
3130
  }
2870
3131
  ),
2871
- statItem.delta ? /* @__PURE__ */ jsx5(Typography, { variant: "label", className: cn(deltaClassName), children: statItem.delta }) : null
3132
+ statItem.delta ? /* @__PURE__ */ jsx6(Typography, { variant: "label", className: cn(deltaClassName), children: statItem.delta }) : null
2872
3133
  ] })
2873
3134
  ]
2874
3135
  },
@@ -2877,15 +3138,15 @@ var EventListItemDetailsContent = ({
2877
3138
  })
2878
3139
  }
2879
3140
  ) : null,
2880
- /* @__PURE__ */ jsxs4("div", { className: cn("agg-event-details-chart", "flex flex-col gap-2"), children: [
2881
- /* @__PURE__ */ jsx5(
3141
+ /* @__PURE__ */ jsxs5("div", { className: cn("agg-event-details-chart", "flex flex-col gap-2"), children: [
3142
+ /* @__PURE__ */ jsx6(
2882
3143
  EventListItemDetailsGraphSection,
2883
3144
  {
2884
3145
  classNames,
2885
3146
  selectedChartType,
2886
3147
  venueInfo,
2887
3148
  venueMarkets,
2888
- selectedMarketId: (_d = scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id) != null ? _d : null,
3149
+ selectedMarketId: (_f = scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id) != null ? _f : null,
2889
3150
  livePrices,
2890
3151
  restMidpoints,
2891
3152
  bestMidpoint,
@@ -2895,7 +3156,7 @@ var EventListItemDetailsContent = ({
2895
3156
  onRangeOverrideChange: setChartRangeOverride
2896
3157
  }
2897
3158
  ),
2898
- /* @__PURE__ */ jsxs4(
3159
+ /* @__PURE__ */ jsxs5(
2899
3160
  "div",
2900
3161
  {
2901
3162
  className: cn(
@@ -2903,8 +3164,8 @@ var EventListItemDetailsContent = ({
2903
3164
  classNames == null ? void 0 : classNames.footer
2904
3165
  ),
2905
3166
  children: [
2906
- /* @__PURE__ */ jsx5(Typography, { variant: "label", className: "agg-chart-volume text-agg-muted-foreground", children: volumeLabel || "-" }),
2907
- /* @__PURE__ */ jsxs4(
3167
+ /* @__PURE__ */ jsx6(Typography, { variant: "label", className: "agg-chart-volume text-agg-muted-foreground", children: volumeLabel || "-" }),
3168
+ /* @__PURE__ */ jsxs5(
2908
3169
  "div",
2909
3170
  {
2910
3171
  className: cn(
@@ -2912,7 +3173,7 @@ var EventListItemDetailsContent = ({
2912
3173
  classNames == null ? void 0 : classNames.timeRange
2913
3174
  ),
2914
3175
  children: [
2915
- /* @__PURE__ */ jsx5(
3176
+ /* @__PURE__ */ jsx6(
2916
3177
  ChartTypeSwitch,
2917
3178
  {
2918
3179
  className: "agg-chart-type-switch",
@@ -2920,11 +3181,11 @@ var EventListItemDetailsContent = ({
2920
3181
  onValueChange: setSelectedChartType
2921
3182
  }
2922
3183
  ),
2923
- /* @__PURE__ */ jsx5("span", { "aria-hidden": "true", className: "hidden h-4 w-px bg-agg-separator md:block" }),
3184
+ /* @__PURE__ */ jsx6("span", { "aria-hidden": "true", className: "hidden h-4 w-px bg-agg-separator md:block" }),
2924
3185
  CHART_TIME_RANGES.map((timeRange) => {
2925
3186
  const effectiveRange = chartRangeOverride != null ? chartRangeOverride : config.chart.selectedChartTimeRange;
2926
3187
  const isActive = timeRange === effectiveRange;
2927
- return /* @__PURE__ */ jsx5(
3188
+ return /* @__PURE__ */ jsx6(
2928
3189
  Button,
2929
3190
  {
2930
3191
  size: "small",
@@ -2955,7 +3216,7 @@ var EventListItemDetailsContent = ({
2955
3216
  }
2956
3217
  )
2957
3218
  ] }),
2958
- event.description || event.settlementDiff ? /* @__PURE__ */ jsx5(SettlementSummary, { content: event.description, settlementDiff: event.settlementDiff }) : null
3219
+ event.description || event.settlementDiff ? /* @__PURE__ */ jsx6(SettlementSummary, { content: event.description, settlementDiff: event.settlementDiff }) : null
2959
3220
  ]
2960
3221
  }
2961
3222
  );
@@ -2977,7 +3238,7 @@ var EventListItemDetailsByEventId = (_a) => {
2977
3238
  enabled: !!resolvedEventId
2978
3239
  });
2979
3240
  if (!resolvedEventId) {
2980
- return /* @__PURE__ */ jsx5(
3241
+ return /* @__PURE__ */ jsx6(
2981
3242
  EventListItemDetailsUnavailableState,
2982
3243
  {
2983
3244
  classNames: rest.classNames,
@@ -2986,16 +3247,16 @@ var EventListItemDetailsByEventId = (_a) => {
2986
3247
  );
2987
3248
  }
2988
3249
  if (isLoading) {
2989
- return /* @__PURE__ */ jsx5(EventListItemDetailsLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
3250
+ return /* @__PURE__ */ jsx6(EventListItemDetailsLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
2990
3251
  }
2991
3252
  if (isErrorWithStatus(error, 404)) {
2992
- return /* @__PURE__ */ jsx5(EventListItemDetailsNotFoundState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
3253
+ return /* @__PURE__ */ jsx6(EventListItemDetailsNotFoundState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
2993
3254
  }
2994
3255
  if (!fetchedEvent && !isError) {
2995
- return /* @__PURE__ */ jsx5(EventListItemDetailsLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
3256
+ return /* @__PURE__ */ jsx6(EventListItemDetailsLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
2996
3257
  }
2997
3258
  if (!fetchedEvent) {
2998
- return /* @__PURE__ */ jsx5(
3259
+ return /* @__PURE__ */ jsx6(
2999
3260
  EventListItemDetailsUnavailableState,
3000
3261
  {
3001
3262
  classNames: rest.classNames,
@@ -3003,15 +3264,15 @@ var EventListItemDetailsByEventId = (_a) => {
3003
3264
  }
3004
3265
  );
3005
3266
  }
3006
- return /* @__PURE__ */ jsx5(EventListItemDetailsContent, __spreadValues({ event: fetchedEvent }, rest));
3267
+ return /* @__PURE__ */ jsx6(EventListItemDetailsContent, __spreadValues({ event: fetchedEvent }, rest));
3007
3268
  };
3008
3269
  var EventListItemDetails = (props) => {
3009
3270
  if (props.isLoading) {
3010
- return /* @__PURE__ */ jsx5(EventListItemDetailsLoadingState, { classNames: props.classNames, ariaLabel: props.ariaLabel });
3271
+ return /* @__PURE__ */ jsx6(EventListItemDetailsLoadingState, { classNames: props.classNames, ariaLabel: props.ariaLabel });
3011
3272
  }
3012
3273
  if ("event" in props && props.event) {
3013
3274
  const _a = props, { event } = _a, rest = __objRest(_a, ["event"]);
3014
- return /* @__PURE__ */ jsx5(EventListItemDetailsContent, __spreadValues({ event }, rest));
3275
+ return /* @__PURE__ */ jsx6(EventListItemDetailsContent, __spreadValues({ event }, rest));
3015
3276
  }
3016
3277
  if ("eventId" in props && typeof props.eventId === "string") {
3017
3278
  const {
@@ -3034,9 +3295,9 @@ var EventListItemDetails = (props) => {
3034
3295
  ariaLabel: ariaLabelOverride,
3035
3296
  onClick
3036
3297
  };
3037
- return /* @__PURE__ */ jsx5(EventListItemDetailsByEventId, __spreadValues({}, byEventIdProps));
3298
+ return /* @__PURE__ */ jsx6(EventListItemDetailsByEventId, __spreadValues({}, byEventIdProps));
3038
3299
  }
3039
- return /* @__PURE__ */ jsx5(
3300
+ return /* @__PURE__ */ jsx6(
3040
3301
  EventListItemDetailsUnavailableState,
3041
3302
  {
3042
3303
  classNames: props.classNames,
@@ -3209,13 +3470,13 @@ var useCenterOrderbookSpread = ({
3209
3470
  // src/events/orderbook/index.tsx
3210
3471
  import { sortVenues as sortVenues3, useAggUiConfig } from "@agg-build/hooks";
3211
3472
  import { useEffect as useEffect4, useRef as useRef5 } from "react";
3212
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
3473
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
3213
3474
  var OrderbookVenueLogos = ({ venues }) => {
3214
3475
  const visible = sortVenues3(venues).slice(0, orderbookMaxVisibleVenues);
3215
3476
  const overflow = venues.length - visible.length;
3216
- return /* @__PURE__ */ jsxs5("div", { className: "flex flex-row items-center justify-start gap-0.5 md:gap-1", children: [
3217
- visible.map((venue) => /* @__PURE__ */ jsx6(VenueLogo, { venue, size: "small" }, venue)),
3218
- overflow > 0 ? /* @__PURE__ */ jsxs5("span", { className: "text-agg-xs font-agg-bold leading-agg-4 text-agg-muted-foreground", children: [
3477
+ return /* @__PURE__ */ jsxs6("div", { className: "flex flex-row items-center justify-start gap-0.5 md:gap-1", children: [
3478
+ visible.map((venue) => /* @__PURE__ */ jsx7(VenueLogo, { venue, size: "small" }, venue)),
3479
+ overflow > 0 ? /* @__PURE__ */ jsxs6("span", { className: "text-agg-xs font-agg-bold leading-agg-4 text-agg-muted-foreground", children: [
3219
3480
  "+",
3220
3481
  overflow
3221
3482
  ] }) : null
@@ -3242,8 +3503,8 @@ var OrderbookRow = ({
3242
3503
  }).map(([venue]) => venue);
3243
3504
  const venues = entry.row.venues && entry.row.venues.length > 0 ? entry.row.venues : venuesFromBreakdown.length > 0 ? venuesFromBreakdown : [entry.row.venue];
3244
3505
  const barPercent = Math.max(2, Number((entry.unifiedBarScale * 100).toFixed(2)));
3245
- return /* @__PURE__ */ jsxs5("div", { className: "agg-orderbook-row relative flex h-9 items-center gap-2.5 overflow-clip pl-5 pr-2.5 md:gap-10 md:pl-0 md:pr-5", children: [
3246
- /* @__PURE__ */ jsx6(
3506
+ return /* @__PURE__ */ jsxs6("div", { className: "agg-orderbook-row relative flex h-9 items-center gap-2.5 overflow-clip pl-5 pr-2.5 md:gap-10 md:pl-0 md:pr-5", children: [
3507
+ /* @__PURE__ */ jsx7(
3247
3508
  "div",
3248
3509
  {
3249
3510
  "aria-hidden": "true",
@@ -3255,8 +3516,8 @@ var OrderbookRow = ({
3255
3516
  style: { width: `${barPercent}%` }
3256
3517
  }
3257
3518
  ),
3258
- /* @__PURE__ */ jsxs5("div", { className: "hidden md:block md:relative min-w-0 flex-1 self-stretch", children: [
3259
- /* @__PURE__ */ jsx6(
3519
+ /* @__PURE__ */ jsxs6("div", { className: "hidden md:block md:relative min-w-0 flex-1 self-stretch", children: [
3520
+ /* @__PURE__ */ jsx7(
3260
3521
  "div",
3261
3522
  {
3262
3523
  "aria-hidden": "true",
@@ -3268,14 +3529,14 @@ var OrderbookRow = ({
3268
3529
  style: { width: `${barPercent}%` }
3269
3530
  }
3270
3531
  ),
3271
- showBadge && badgeLabel ? /* @__PURE__ */ jsx6(
3532
+ showBadge && badgeLabel ? /* @__PURE__ */ jsx7(
3272
3533
  "div",
3273
3534
  {
3274
3535
  className: cn(
3275
3536
  "absolute flex left-5 top-1/2 -translate-y-1/2 rounded-[4px] border px-2 py-0.5",
3276
3537
  badgeBorderClassName
3277
3538
  ),
3278
- children: /* @__PURE__ */ jsx6(
3539
+ children: /* @__PURE__ */ jsx7(
3279
3540
  "span",
3280
3541
  {
3281
3542
  className: cn("text-[10px] font-bold uppercase leading-[14px]", badgeTextClassName),
@@ -3285,8 +3546,8 @@ var OrderbookRow = ({
3285
3546
  }
3286
3547
  ) : null
3287
3548
  ] }),
3288
- /* @__PURE__ */ jsxs5("div", { className: "flex w-20 shrink-0 items-center justify-start gap-2 md:w-[120px]", children: [
3289
- /* @__PURE__ */ jsx6(
3549
+ /* @__PURE__ */ jsxs6("div", { className: "flex w-20 shrink-0 items-center justify-start gap-2 md:w-[120px]", children: [
3550
+ /* @__PURE__ */ jsx7(
3290
3551
  "span",
3291
3552
  {
3292
3553
  className: cn(
@@ -3297,10 +3558,10 @@ var OrderbookRow = ({
3297
3558
  children: formatProbabilityCents(entry.row.price, formatPrice)
3298
3559
  }
3299
3560
  ),
3300
- /* @__PURE__ */ jsx6(OrderbookVenueLogos, { venues })
3561
+ /* @__PURE__ */ jsx7(OrderbookVenueLogos, { venues })
3301
3562
  ] }),
3302
- /* @__PURE__ */ jsx6("span", { className: "agg-orderbook-size w-20 shrink-0 truncate text-center text-agg-sm leading-agg-5 text-agg-foreground md:w-[120px]", children: formatNumber(entry.row.size) }),
3303
- /* @__PURE__ */ jsx6("span", { className: "agg-orderbook-total w-20 shrink-0 truncate text-center text-agg-sm leading-agg-5 text-agg-foreground md:w-[120px]", children: formatCurrency(entry.row.total) })
3563
+ /* @__PURE__ */ jsx7("span", { className: "agg-orderbook-size w-20 shrink-0 truncate text-center text-agg-sm leading-agg-5 text-agg-foreground md:w-[120px]", children: formatNumber(entry.row.size) }),
3564
+ /* @__PURE__ */ jsx7("span", { className: "agg-orderbook-total w-20 shrink-0 truncate text-center text-agg-sm leading-agg-5 text-agg-foreground md:w-[120px]", children: formatCurrency(entry.row.total) })
3304
3565
  ] });
3305
3566
  };
3306
3567
  var Orderbook = ({
@@ -3360,15 +3621,15 @@ var Orderbook = ({
3360
3621
  snapshotKey,
3361
3622
  spreadEntry
3362
3623
  ]);
3363
- return /* @__PURE__ */ jsxs5("div", { className: cn("agg-orderbook-unified flex flex-col", className), children: [
3364
- /* @__PURE__ */ jsxs5("div", { className: "flex h-9 items-center gap-2.5 overflow-clip border-b border-agg-separator pl-5 pr-5 md:pl-0 md:gap-10", children: [
3365
- /* @__PURE__ */ jsx6("span", { className: "hidden md:flex min-w-0 flex-1 items-center gap-2 pl-5", children: /* @__PURE__ */ jsx6("span", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.tradeOutcome }) }),
3366
- /* @__PURE__ */ jsx6("span", { className: "w-20 shrink-0 text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground md:w-[120px]", children: labels.price }),
3367
- /* @__PURE__ */ jsx6("span", { className: "w-20 shrink-0 text-center text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground md:w-[120px]", children: labels.shares }),
3368
- /* @__PURE__ */ jsx6("span", { className: "w-20 shrink-0 text-center text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground md:w-[120px]", children: labels.total })
3624
+ return /* @__PURE__ */ jsxs6("div", { className: cn("agg-orderbook-unified flex flex-col", className), children: [
3625
+ /* @__PURE__ */ jsxs6("div", { className: "flex h-9 items-center gap-2.5 overflow-clip border-b border-agg-separator pl-5 pr-5 md:pl-0 md:gap-10", children: [
3626
+ /* @__PURE__ */ jsx7("span", { className: "hidden md:flex min-w-0 flex-1 items-center gap-2 pl-5", children: /* @__PURE__ */ jsx7("span", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.tradeOutcome }) }),
3627
+ /* @__PURE__ */ jsx7("span", { className: "w-20 shrink-0 text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground md:w-[120px]", children: labels.price }),
3628
+ /* @__PURE__ */ jsx7("span", { className: "w-20 shrink-0 text-center text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground md:w-[120px]", children: labels.shares }),
3629
+ /* @__PURE__ */ jsx7("span", { className: "w-20 shrink-0 text-center text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground md:w-[120px]", children: labels.total })
3369
3630
  ] }),
3370
- /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
3371
- /* @__PURE__ */ jsxs5(
3631
+ /* @__PURE__ */ jsxs6("div", { className: "relative", children: [
3632
+ /* @__PURE__ */ jsxs6(
3372
3633
  "div",
3373
3634
  {
3374
3635
  ref: scrollContainerRef,
@@ -3378,7 +3639,7 @@ var Orderbook = ({
3378
3639
  "aria-label": "Order book",
3379
3640
  tabIndex: 0,
3380
3641
  children: [
3381
- askEntries.length > 0 ? /* @__PURE__ */ jsx6("div", { className: "agg-orderbook-asks flex flex-col", children: askEntries.map((entry, index) => /* @__PURE__ */ jsx6(
3642
+ askEntries.length > 0 ? /* @__PURE__ */ jsx7("div", { className: "agg-orderbook-asks flex flex-col", children: askEntries.map((entry, index) => /* @__PURE__ */ jsx7(
3382
3643
  OrderbookRow,
3383
3644
  {
3384
3645
  entry,
@@ -3391,7 +3652,7 @@ var Orderbook = ({
3391
3652
  },
3392
3653
  entry.row.id
3393
3654
  )) }) : null,
3394
- /* @__PURE__ */ jsxs5(
3655
+ /* @__PURE__ */ jsxs6(
3395
3656
  "div",
3396
3657
  {
3397
3658
  ref: spreadRowRef,
@@ -3399,7 +3660,7 @@ var Orderbook = ({
3399
3660
  role: "separator",
3400
3661
  "aria-label": `${labels.midPrice}: ${formatProbabilityCents((_b = spreadEntry == null ? void 0 : spreadEntry.midPrice) != null ? _b : null, formatPrice)}, ${labels.spread}: ${formatProbabilityCents((_c = spreadEntry == null ? void 0 : spreadEntry.spread) != null ? _c : null)}`,
3401
3662
  children: [
3402
- /* @__PURE__ */ jsxs5(
3663
+ /* @__PURE__ */ jsxs6(
3403
3664
  Typography,
3404
3665
  {
3405
3666
  variant: "label",
@@ -3411,7 +3672,7 @@ var Orderbook = ({
3411
3672
  ]
3412
3673
  }
3413
3674
  ),
3414
- /* @__PURE__ */ jsxs5(
3675
+ /* @__PURE__ */ jsxs6(
3415
3676
  Typography,
3416
3677
  {
3417
3678
  variant: "label",
@@ -3423,12 +3684,12 @@ var Orderbook = ({
3423
3684
  ]
3424
3685
  }
3425
3686
  ),
3426
- /* @__PURE__ */ jsx6("div", { className: "hidden md:inline-flex w-20 shrink-0 md:w-[120px]" }),
3427
- /* @__PURE__ */ jsx6("div", { className: "hidden md:inline-flex w-20 shrink-0 md:w-[120px]" })
3687
+ /* @__PURE__ */ jsx7("div", { className: "hidden md:inline-flex w-20 shrink-0 md:w-[120px]" }),
3688
+ /* @__PURE__ */ jsx7("div", { className: "hidden md:inline-flex w-20 shrink-0 md:w-[120px]" })
3428
3689
  ]
3429
3690
  }
3430
3691
  ),
3431
- bidEntries.length > 0 ? /* @__PURE__ */ jsx6("div", { className: "agg-orderbook-bids flex flex-col", children: bidEntries.map((entry, index) => /* @__PURE__ */ jsx6(
3692
+ bidEntries.length > 0 ? /* @__PURE__ */ jsx7("div", { className: "agg-orderbook-bids flex flex-col", children: bidEntries.map((entry, index) => /* @__PURE__ */ jsx7(
3432
3693
  OrderbookRow,
3433
3694
  {
3434
3695
  entry,
@@ -3444,14 +3705,14 @@ var Orderbook = ({
3444
3705
  ]
3445
3706
  }
3446
3707
  ),
3447
- /* @__PURE__ */ jsx6(
3708
+ /* @__PURE__ */ jsx7(
3448
3709
  "button",
3449
3710
  {
3450
3711
  type: "button",
3451
3712
  onClick: recenter,
3452
3713
  className: "absolute bottom-3 left-5 z-10 flex size-8 cursor-pointer items-center justify-center rounded-lg border border-agg-separator bg-agg-secondary text-agg-muted-foreground transition-colors hover:text-agg-foreground",
3453
3714
  "aria-label": "Re-center orderbook",
3454
- children: /* @__PURE__ */ jsx6(Icon, { name: "recenter", size: "small", className: "!size-4 text-current" })
3715
+ children: /* @__PURE__ */ jsx7(Icon, { name: "recenter", size: "small", className: "!size-4 text-current" })
3455
3716
  }
3456
3717
  )
3457
3718
  ] })
@@ -3460,7 +3721,7 @@ var Orderbook = ({
3460
3721
  Orderbook.displayName = "Orderbook";
3461
3722
 
3462
3723
  // src/events/orderbook/orderbook-with-states.tsx
3463
- import { jsx as jsx7 } from "react/jsx-runtime";
3724
+ import { jsx as jsx8 } from "react/jsx-runtime";
3464
3725
  var stateMessageMinHeight = "min-h-[248px] px-5 py-10 md:min-h-[272px]";
3465
3726
  var OrderbookWithStates = (_a) => {
3466
3727
  var _b = _a, {
@@ -3472,54 +3733,54 @@ var OrderbookWithStates = (_a) => {
3472
3733
  ]);
3473
3734
  var _a2;
3474
3735
  if (state.kind === "loading") {
3475
- return /* @__PURE__ */ jsx7("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx7(MarketDetailsOderbookSkeleton, {}) });
3736
+ return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(MarketDetailsOderbookSkeleton, {}) });
3476
3737
  }
3477
3738
  if (state.kind === "disabled") {
3478
- return /* @__PURE__ */ jsx7("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx7(
3739
+ return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(
3479
3740
  StateMessage,
3480
3741
  {
3481
3742
  title: state.title,
3482
3743
  description: state.description,
3483
- icon: (_a2 = state.icon) != null ? _a2 : /* @__PURE__ */ jsx7(WarningIcon, {}),
3744
+ icon: (_a2 = state.icon) != null ? _a2 : /* @__PURE__ */ jsx8(WarningIcon, {}),
3484
3745
  classNames: { root: stateMessageMinHeight }
3485
3746
  }
3486
3747
  ) });
3487
3748
  }
3488
3749
  if (state.kind === "error") {
3489
- return /* @__PURE__ */ jsx7("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx7(
3750
+ return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(
3490
3751
  StateMessage,
3491
3752
  {
3492
3753
  title: state.title,
3493
3754
  description: state.description,
3494
- icon: /* @__PURE__ */ jsx7(WarningIcon, {}),
3755
+ icon: /* @__PURE__ */ jsx8(WarningIcon, {}),
3495
3756
  onAction: state.onRetry,
3496
3757
  classNames: { root: stateMessageMinHeight }
3497
3758
  }
3498
3759
  ) });
3499
3760
  }
3500
3761
  if (state.kind === "resolved") {
3501
- return /* @__PURE__ */ jsx7("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx7(
3762
+ return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(
3502
3763
  StateMessage,
3503
3764
  {
3504
3765
  title: state.title,
3505
3766
  description: state.description,
3506
- icon: /* @__PURE__ */ jsx7(WarningIcon, {}),
3767
+ icon: /* @__PURE__ */ jsx8(WarningIcon, {}),
3507
3768
  classNames: { root: stateMessageMinHeight }
3508
3769
  }
3509
3770
  ) });
3510
3771
  }
3511
3772
  if (state.kind === "empty") {
3512
- return /* @__PURE__ */ jsx7("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx7(
3773
+ return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(
3513
3774
  StateMessage,
3514
3775
  {
3515
3776
  title: state.title,
3516
3777
  description: state.description,
3517
- icon: /* @__PURE__ */ jsx7(SearchEmptyIcon, {}),
3778
+ icon: /* @__PURE__ */ jsx8(SearchEmptyIcon, {}),
3518
3779
  classNames: { root: stateMessageMinHeight }
3519
3780
  }
3520
3781
  ) });
3521
3782
  }
3522
- return /* @__PURE__ */ jsx7("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx7(Orderbook, __spreadValues({}, orderbookProps)) });
3783
+ return /* @__PURE__ */ jsx8("div", { className: cn("agg-orderbook flex flex-col gap-5", wrapperClassName), children: /* @__PURE__ */ jsx8(Orderbook, __spreadValues({}, orderbookProps)) });
3523
3784
  };
3524
3785
  OrderbookWithStates.displayName = "OrderbookWithStates";
3525
3786
 
@@ -3532,13 +3793,13 @@ import {
3532
3793
  resolveMarketTradingState as resolveMarketTradingState2,
3533
3794
  useEventTradingContext as useEventTradingContext2,
3534
3795
  useEventOrderbookData as useEventOrderbookData2,
3535
- useLabels as useLabels7,
3796
+ useLabels as useLabels8,
3536
3797
  useLiveBestPrices as useLiveBestPrices2,
3537
3798
  useLiveBestPriceCandidates,
3538
3799
  useLiveOutcomePrices as useLiveOutcomePrices2,
3539
3800
  useMarketOrderbook,
3540
3801
  useMidpoints as useMidpoints2,
3541
- useSdkUiConfig as useSdkUiConfig4,
3802
+ useSdkUiConfig as useSdkUiConfig5,
3542
3803
  useVenueMarkets as useVenueMarkets2,
3543
3804
  useViewportMidpoints
3544
3805
  } from "@agg-build/hooks";
@@ -3606,7 +3867,7 @@ var buildVenueMarketIdByVenue = (venueMarkets) => {
3606
3867
 
3607
3868
  // src/events/market-details/market-details-outcome-button.tsx
3608
3869
  import { useAggUiConfig as useAggUiConfig2 } from "@agg-build/hooks";
3609
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
3870
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
3610
3871
  var marketDetailsOutcomeButtonToneClasses = {
3611
3872
  positive: {
3612
3873
  activeSurface: "bg-agg-success/15",
@@ -3658,7 +3919,7 @@ var OutcomePriceContent = ({
3658
3919
  }) => {
3659
3920
  const { formatPrice } = useAggUiConfig2().formatting;
3660
3921
  if (isLoading) {
3661
- return /* @__PURE__ */ jsx8(
3922
+ return /* @__PURE__ */ jsx9(
3662
3923
  "span",
3663
3924
  {
3664
3925
  "aria-hidden": "true",
@@ -3669,7 +3930,7 @@ var OutcomePriceContent = ({
3669
3930
  }
3670
3931
  );
3671
3932
  }
3672
- return /* @__PURE__ */ jsx8(
3933
+ return /* @__PURE__ */ jsx9(
3673
3934
  Typography,
3674
3935
  {
3675
3936
  as: "span",
@@ -3697,7 +3958,7 @@ var MarketDetailsOutcomeButton = ({
3697
3958
  });
3698
3959
  const itemLabel = (_a = item.title) != null ? _a : item.label;
3699
3960
  const isLineVariant = item.variant === "line";
3700
- return /* @__PURE__ */ jsx8(
3961
+ return /* @__PURE__ */ jsx9(
3701
3962
  "button",
3702
3963
  {
3703
3964
  type: "button",
@@ -3713,9 +3974,9 @@ var MarketDetailsOutcomeButton = ({
3713
3974
  enforceFixedWidth ? "flex-none" : "flex-1 md:flex-auto"
3714
3975
  ),
3715
3976
  onClick: () => onSelect(item.label),
3716
- children: isLineVariant ? /* @__PURE__ */ jsxs6("div", { className: "flex min-w-0 max-w-full items-center justify-center gap-1.5 overflow-hidden", children: [
3717
- /* @__PURE__ */ jsx8(VenueLogo, { venue: item.venue, size: "small" }),
3718
- /* @__PURE__ */ jsx8(
3977
+ children: isLineVariant ? /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 max-w-full items-center justify-center gap-1.5 overflow-hidden", children: [
3978
+ /* @__PURE__ */ jsx9(VenueLogo, { venue: item.venue, size: "small" }),
3979
+ /* @__PURE__ */ jsx9(
3719
3980
  Typography,
3720
3981
  {
3721
3982
  as: "span",
@@ -3724,7 +3985,7 @@ var MarketDetailsOutcomeButton = ({
3724
3985
  children: itemLabel
3725
3986
  }
3726
3987
  ),
3727
- item.lineLabel ? /* @__PURE__ */ jsx8(
3988
+ item.lineLabel ? /* @__PURE__ */ jsx9(
3728
3989
  Typography,
3729
3990
  {
3730
3991
  as: "span",
@@ -3733,7 +3994,7 @@ var MarketDetailsOutcomeButton = ({
3733
3994
  children: item.lineLabel
3734
3995
  }
3735
3996
  ) : null,
3736
- /* @__PURE__ */ jsx8(
3997
+ /* @__PURE__ */ jsx9(
3737
3998
  OutcomePriceContent,
3738
3999
  {
3739
4000
  isLoading: item.isPriceLoading,
@@ -3742,9 +4003,9 @@ var MarketDetailsOutcomeButton = ({
3742
4003
  textClassName: classNames.text
3743
4004
  }
3744
4005
  )
3745
- ] }) : /* @__PURE__ */ jsxs6("div", { className: "inline-flex max-w-full items-center justify-center gap-1.5", children: [
3746
- /* @__PURE__ */ jsx8(VenueLogo, { venue: item.venue, size: "small" }),
3747
- /* @__PURE__ */ jsx8(
4006
+ ] }) : /* @__PURE__ */ jsxs7("div", { className: "inline-flex max-w-full items-center justify-center gap-1.5", children: [
4007
+ /* @__PURE__ */ jsx9(VenueLogo, { venue: item.venue, size: "small" }),
4008
+ /* @__PURE__ */ jsx9(
3748
4009
  Typography,
3749
4010
  {
3750
4011
  as: "span",
@@ -3753,7 +4014,7 @@ var MarketDetailsOutcomeButton = ({
3753
4014
  children: itemLabel
3754
4015
  }
3755
4016
  ),
3756
- /* @__PURE__ */ jsx8(
4017
+ /* @__PURE__ */ jsx9(
3757
4018
  OutcomePriceContent,
3758
4019
  {
3759
4020
  isLoading: item.isPriceLoading,
@@ -3771,13 +4032,13 @@ MarketDetailsOutcomeButton.displayName = "MarketDetailsOutcomeButton";
3771
4032
  // src/events/market-details/market-details-graph-panel.tsx
3772
4033
  import {
3773
4034
  CHART_TIME_RANGES as CHART_TIME_RANGES2,
3774
- useLabels as useLabels6,
4035
+ useLabels as useLabels7,
3775
4036
  useMarketChart as useMarketChart2,
3776
4037
  useRollingChartWindow as useRollingChartWindow2,
3777
- useSdkUiConfig as useSdkUiConfig3
4038
+ useSdkUiConfig as useSdkUiConfig4
3778
4039
  } from "@agg-build/hooks";
3779
4040
  import { useEffect as useEffect5, useMemo as useMemo6, useRef as useRef6, useState as useState4 } from "react";
3780
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
4041
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
3781
4042
  var MarketDetailsGraphPanel = ({
3782
4043
  venueMarkets,
3783
4044
  selectedOutcomeLabel,
@@ -3792,13 +4053,13 @@ var MarketDetailsGraphPanel = ({
3792
4053
  classNames
3793
4054
  }) => {
3794
4055
  var _a, _b, _c;
3795
- const config = useSdkUiConfig3();
4056
+ const config = useSdkUiConfig4();
3796
4057
  const {
3797
4058
  formatting: { formatPercent, formatCompactCurrency, formatPrice },
3798
4059
  general: { theme }
3799
4060
  } = config;
3800
4061
  const isDarkTheme = theme === "dark";
3801
- const labels = useLabels6();
4062
+ const labels = useLabels7();
3802
4063
  const selectedTimeRange = config.chart.selectedChartTimeRange;
3803
4064
  const setSelectedTimeRange = config.chart.setSelectedChartTimeRange;
3804
4065
  const [chartRangeOverride, setChartRangeOverride] = useState4(null);
@@ -3932,17 +4193,17 @@ var MarketDetailsGraphPanel = ({
3932
4193
  const handleRetryMarketChart = () => {
3933
4194
  void refetchMarketChart();
3934
4195
  };
3935
- return /* @__PURE__ */ jsxs7("div", { className: cn("agg-price-chart flex flex-col gap-5 p-5", classNames == null ? void 0 : classNames.graph), children: [
3936
- hasChartError ? /* @__PURE__ */ jsx9(
4196
+ return /* @__PURE__ */ jsxs8("div", { className: cn("agg-price-chart flex flex-col gap-5 p-5", classNames == null ? void 0 : classNames.graph), children: [
4197
+ hasChartError ? /* @__PURE__ */ jsx10(
3937
4198
  StateMessage,
3938
4199
  {
3939
4200
  title: labels.marketDetails.chartUnavailableTitle,
3940
4201
  description: labels.marketDetails.chartUnavailableDescription,
3941
- icon: /* @__PURE__ */ jsx9(WarningIcon, {}),
4202
+ icon: /* @__PURE__ */ jsx10(WarningIcon, {}),
3942
4203
  onAction: handleRetryMarketChart,
3943
4204
  classNames: { root: "min-h-[248px] px-5 py-10 md:min-h-[272px]" }
3944
4205
  }
3945
- ) : /* @__PURE__ */ jsx9(
4206
+ ) : /* @__PURE__ */ jsx10(
3946
4207
  LineChart,
3947
4208
  {
3948
4209
  series: graphSeries,
@@ -3955,14 +4216,14 @@ var MarketDetailsGraphPanel = ({
3955
4216
  showSeriesControls: chartAvailableOutcomesByVenue.length > 0 || headerOutcomeItems.length > 0,
3956
4217
  renderSeriesControls: () => {
3957
4218
  var _a2, _b2, _c2, _d;
3958
- return /* @__PURE__ */ jsxs7("div", { className: "agg-chart-toolbar w-full flex flex-col gap-4 md:flex-row md:items-center md:justify-between", children: [
3959
- /* @__PURE__ */ jsx9("div", { className: "agg-market-venues flex flex-wrap gap-2", children: chartAvailableOutcomesByVenue.map((item) => {
4219
+ return /* @__PURE__ */ jsxs8("div", { className: "agg-chart-toolbar w-full flex flex-col gap-4 md:flex-row md:items-center md:justify-between", children: [
4220
+ /* @__PURE__ */ jsx10("div", { className: "agg-market-venues flex flex-wrap gap-2", children: chartAvailableOutcomesByVenue.map((item) => {
3960
4221
  const probability = formatProbabilityPercent(
3961
4222
  wsLivePrices.get(item.outcome.id),
3962
4223
  formatPercent
3963
4224
  );
3964
4225
  const isActiveVenue = selectedGraphVenue === item.venue;
3965
- return /* @__PURE__ */ jsxs7(
4226
+ return /* @__PURE__ */ jsxs8(
3966
4227
  "button",
3967
4228
  {
3968
4229
  type: "button",
@@ -3981,14 +4242,14 @@ var MarketDetailsGraphPanel = ({
3981
4242
  handleGraphVenueToggle(item.venue);
3982
4243
  },
3983
4244
  children: [
3984
- /* @__PURE__ */ jsx9(VenueLogo, { venue: item.venue, size: "small" }),
3985
- /* @__PURE__ */ jsx9("span", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: probability })
4245
+ /* @__PURE__ */ jsx10(VenueLogo, { venue: item.venue, size: "small" }),
4246
+ /* @__PURE__ */ jsx10("span", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: probability })
3986
4247
  ]
3987
4248
  },
3988
4249
  `${item.market.id}-${item.outcome.id}`
3989
4250
  );
3990
4251
  }) }),
3991
- !isOutcomeSelectionLocked ? /* @__PURE__ */ jsx9(
4252
+ !isOutcomeSelectionLocked ? /* @__PURE__ */ jsx10(
3992
4253
  SwitchButton,
3993
4254
  {
3994
4255
  ariaLabel: labels.marketDetails.outcomeSelectorAria,
@@ -4018,7 +4279,7 @@ var MarketDetailsGraphPanel = ({
4018
4279
  }
4019
4280
  }
4020
4281
  ),
4021
- /* @__PURE__ */ jsxs7(
4282
+ /* @__PURE__ */ jsxs8(
4022
4283
  "div",
4023
4284
  {
4024
4285
  className: cn(
@@ -4027,9 +4288,9 @@ var MarketDetailsGraphPanel = ({
4027
4288
  classNames == null ? void 0 : classNames.footer
4028
4289
  ),
4029
4290
  children: [
4030
- /* @__PURE__ */ jsx9("span", { children: typeof volume !== "number" ? labels.marketDetails.volumeUnavailable : volume > 0 ? `${formatCompactCurrency(volume)} ${labels.marketDetails.meta.volumeSuffix}` : "" }),
4031
- /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap items-center gap-3 md:gap-4", children: [
4032
- /* @__PURE__ */ jsx9(
4291
+ /* @__PURE__ */ jsx10("span", { children: typeof volume !== "number" ? labels.marketDetails.volumeUnavailable : volume > 0 ? `${formatCompactCurrency(volume)} ${labels.marketDetails.meta.volumeSuffix}` : "" }),
4292
+ /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-center gap-3 md:gap-4", children: [
4293
+ /* @__PURE__ */ jsx10(
4033
4294
  ChartTypeSwitch,
4034
4295
  {
4035
4296
  className: "agg-chart-type-switch shrink-0",
@@ -4037,11 +4298,11 @@ var MarketDetailsGraphPanel = ({
4037
4298
  onValueChange: setSelectedChartType
4038
4299
  }
4039
4300
  ),
4040
- /* @__PURE__ */ jsx9("span", { "aria-hidden": "true", className: "hidden h-4 w-px bg-agg-separator md:block" }),
4301
+ /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", className: "hidden h-4 w-px bg-agg-separator md:block" }),
4041
4302
  CHART_TIME_RANGES2.map((timeRange) => {
4042
4303
  const isActive = effectiveChartTimeRange === timeRange;
4043
4304
  const isDisabled = isResolvedMarket && timeRange !== "ALL";
4044
- return /* @__PURE__ */ jsx9(
4305
+ return /* @__PURE__ */ jsx10(
4045
4306
  "button",
4046
4307
  {
4047
4308
  type: "button",
@@ -4075,14 +4336,14 @@ var MarketDetailsGraphPanel = ({
4075
4336
  MarketDetailsGraphPanel.displayName = "MarketDetailsGraphPanel";
4076
4337
 
4077
4338
  // src/events/market-details/index.tsx
4078
- import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
4339
+ import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
4079
4340
  var MarketDetailsUnavailableState = ({
4080
4341
  marketId,
4081
4342
  ariaLabel,
4082
4343
  classNames
4083
4344
  }) => {
4084
- const labels = useLabels7();
4085
- return /* @__PURE__ */ jsx10(
4345
+ const labels = useLabels8();
4346
+ return /* @__PURE__ */ jsx11(
4086
4347
  Card,
4087
4348
  {
4088
4349
  "data-market-id": marketId || void 0,
@@ -4093,9 +4354,9 @@ var MarketDetailsUnavailableState = ({
4093
4354
  ),
4094
4355
  role: "status",
4095
4356
  "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.unavailableAria,
4096
- children: /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-1 p-5", children: [
4097
- /* @__PURE__ */ jsx10(Typography, { variant: "body-large-strong", children: labels.marketDetails.unavailableTitle }),
4098
- /* @__PURE__ */ jsx10(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.unavailableDescription })
4357
+ children: /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-1 p-5", children: [
4358
+ /* @__PURE__ */ jsx11(Typography, { variant: "body-large-strong", children: labels.marketDetails.unavailableTitle }),
4359
+ /* @__PURE__ */ jsx11(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.unavailableDescription })
4099
4360
  ] })
4100
4361
  }
4101
4362
  );
@@ -4105,14 +4366,14 @@ var MarketDetailsNotFoundState = ({
4105
4366
  ariaLabel: _ariaLabel,
4106
4367
  classNames: _classNames
4107
4368
  }) => {
4108
- const labels = useLabels7();
4109
- return /* @__PURE__ */ jsx10(
4369
+ const labels = useLabels8();
4370
+ return /* @__PURE__ */ jsx11(
4110
4371
  StateMessage,
4111
4372
  {
4112
4373
  "data-market-id": marketId || void 0,
4113
4374
  title: labels.marketDetails.notFoundTitle,
4114
4375
  description: labels.marketDetails.notFoundDescription,
4115
- icon: /* @__PURE__ */ jsx10(SearchEmptyIcon, {}),
4376
+ icon: /* @__PURE__ */ jsx11(SearchEmptyIcon, {}),
4116
4377
  classNames: { root: "min-h-[280px] md:min-h-[320px]" }
4117
4378
  }
4118
4379
  );
@@ -4137,18 +4398,19 @@ var MarketDetailsContent = ({
4137
4398
  headerOutcomeItemsOverride,
4138
4399
  onOutcomeSelect,
4139
4400
  live,
4401
+ showResolvingState = false,
4140
4402
  midpointsFallback,
4141
4403
  midpointsFallbackVenues,
4142
4404
  suppressOutcomeFallbackSelection,
4143
4405
  midpointsResult
4144
4406
  }) => {
4145
4407
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
4146
- const config = useSdkUiConfig4();
4408
+ const config = useSdkUiConfig5();
4147
4409
  const {
4148
4410
  features: { enableAnimations },
4149
4411
  formatting: { formatPercent }
4150
4412
  } = config;
4151
- const labels = useLabels7();
4413
+ const labels = useLabels8();
4152
4414
  const tradingContext = useEventTradingContext2();
4153
4415
  const detailsContentId = useId();
4154
4416
  const tradeSide = (_a = tradingContext == null ? void 0 : tradingContext.tradeSide) != null ? _a : "buy";
@@ -4182,26 +4444,6 @@ var MarketDetailsContent = ({
4182
4444
  [clusterBestPricesRest, wsBestPrices]
4183
4445
  );
4184
4446
  const clusterBestPriceVenuesByOutcomeId = clusterMidpointResult.bestPriceVenuesByOutcomeId;
4185
- const clusterMidpointMarkets = useMemo7(() => {
4186
- var _a2;
4187
- if (!resolvedMarket) return [];
4188
- return (_a2 = resolvedMarket.venueMarkets) != null ? _a2 : [];
4189
- }, [resolvedMarket]);
4190
- const tradableVenues = useMemo7(() => {
4191
- var _a2;
4192
- if (clusterMidpointMarkets.length === 0) return null;
4193
- const set = /* @__PURE__ */ new Set();
4194
- for (const market of clusterMidpointMarkets) {
4195
- for (const outcome of (_a2 = market.venueMarketOutcomes) != null ? _a2 : []) {
4196
- if (clusterMidpoints.has(outcome.id)) {
4197
- set.add(market.venue);
4198
- break;
4199
- }
4200
- }
4201
- }
4202
- if (set.size === 0) return null;
4203
- return set;
4204
- }, [clusterMidpointMarkets, clusterMidpoints]);
4205
4447
  const model = useMemo7(() => {
4206
4448
  return buildMarketDetailsModel({
4207
4449
  venueMarkets,
@@ -4235,7 +4477,7 @@ var MarketDetailsContent = ({
4235
4477
  const marketTradingState = useMemo7(() => {
4236
4478
  return resolveMarketTradingState2(scopedMarketForCard);
4237
4479
  }, [scopedMarketForCard]);
4238
- const isOutcomeSelectionLocked = marketTradingState.isTradingDisabled;
4480
+ const isOutcomeSelectionLocked = showResolvingState || marketTradingState.isTradingDisabled;
4239
4481
  const isUpcomingMarket = marketTradingState.kind === "unopened";
4240
4482
  const marketStatePresentation = resolveTradingStatePresentation(labels, marketTradingState);
4241
4483
  const resolvedWinningOutcomeLabel = resolveResolvedOutcomeLabel({
@@ -4359,6 +4601,7 @@ var MarketDetailsContent = ({
4359
4601
  clusterBestMidpointsByOutcomeId,
4360
4602
  clusterBestPricesRest,
4361
4603
  clusterBestPriceVenuesByOutcomeId,
4604
+ clusterMidpointResult.isLoading,
4362
4605
  headerOutcomeItemsOverride,
4363
4606
  model,
4364
4607
  scopedMarketForCard,
@@ -4522,11 +4765,16 @@ var MarketDetailsContent = ({
4522
4765
  const handleRetryOrderBook = () => {
4523
4766
  void refetchOrderBook();
4524
4767
  };
4525
- const orderbookState = marketTradingState.isTradingDisabled ? {
4768
+ const orderbookState = showResolvingState ? {
4769
+ kind: "disabled",
4770
+ title: labels.marketDetails.resolvingTitle,
4771
+ description: labels.marketDetails.resolvingDescription,
4772
+ icon: /* @__PURE__ */ jsx11(LoadingIcon, { size: "small" })
4773
+ } : marketTradingState.isTradingDisabled ? {
4526
4774
  kind: "disabled",
4527
4775
  title: marketStatePresentation.title,
4528
4776
  description: marketStatePresentation.description,
4529
- icon: /* @__PURE__ */ jsx10(Icon, { name: marketStatePresentation.iconName, className: "h-5 w-5", "aria-hidden": "true" })
4777
+ icon: /* @__PURE__ */ jsx11(Icon, { name: marketStatePresentation.iconName, className: "h-5 w-5", "aria-hidden": "true" })
4530
4778
  } : isOrderBookLoading ? { kind: "loading" } : hasOrderBookError ? {
4531
4779
  kind: "error",
4532
4780
  title: labels.marketDetails.orderBookUnavailableTitle,
@@ -4542,7 +4790,7 @@ var MarketDetailsContent = ({
4542
4790
  description: labels.marketDetails.orderBookEmptyDescription
4543
4791
  } : { kind: "data" };
4544
4792
  if (marketId && !resolvedMarket) {
4545
- return /* @__PURE__ */ jsx10(
4793
+ return /* @__PURE__ */ jsx11(
4546
4794
  MarketDetailsNotFoundState,
4547
4795
  {
4548
4796
  marketId,
@@ -4552,7 +4800,7 @@ var MarketDetailsContent = ({
4552
4800
  );
4553
4801
  }
4554
4802
  if (!model) {
4555
- return /* @__PURE__ */ jsx10(
4803
+ return /* @__PURE__ */ jsx11(
4556
4804
  MarketDetailsUnavailableState,
4557
4805
  {
4558
4806
  marketId,
@@ -4561,18 +4809,18 @@ var MarketDetailsContent = ({
4561
4809
  }
4562
4810
  );
4563
4811
  }
4564
- return /* @__PURE__ */ jsxs8(
4812
+ return /* @__PURE__ */ jsxs9(
4565
4813
  Card,
4566
4814
  {
4567
4815
  className: cn(
4568
4816
  "group/agg-market-card",
4569
4817
  "w-full rounded-agg-2xl text-left outline-none",
4570
- marketTradingState.isTradingDisabled && "agg-market-card-readonly",
4818
+ (showResolvingState || marketTradingState.isTradingDisabled) && "agg-market-card-readonly",
4571
4819
  marketDetailsBaseCardClassName,
4572
4820
  classNames == null ? void 0 : classNames.root
4573
4821
  ),
4574
4822
  children: [
4575
- /* @__PURE__ */ jsxs8(
4823
+ /* @__PURE__ */ jsxs9(
4576
4824
  "div",
4577
4825
  {
4578
4826
  "data-market-id": marketId || void 0,
@@ -4583,7 +4831,7 @@ var MarketDetailsContent = ({
4583
4831
  classNames == null ? void 0 : classNames.header
4584
4832
  ),
4585
4833
  children: [
4586
- /* @__PURE__ */ jsxs8(
4834
+ /* @__PURE__ */ jsxs9(
4587
4835
  "button",
4588
4836
  {
4589
4837
  className: cn(
@@ -4597,8 +4845,8 @@ var MarketDetailsContent = ({
4597
4845
  "aria-controls": detailsContentId,
4598
4846
  "aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
4599
4847
  children: [
4600
- /* @__PURE__ */ jsxs8("div", { className: "agg-market-summary flex min-w-24 flex-1 items-center gap-3 md:gap-4", children: [
4601
- !compactHeader ? /* @__PURE__ */ jsx10(
4848
+ /* @__PURE__ */ jsxs9("div", { className: "agg-market-summary flex min-w-24 flex-1 items-center gap-3 md:gap-4", children: [
4849
+ !compactHeader ? /* @__PURE__ */ jsx11(
4602
4850
  RemoteImage,
4603
4851
  {
4604
4852
  src: optimizedImageUrl3(model.image, 60),
@@ -4606,8 +4854,8 @@ var MarketDetailsContent = ({
4606
4854
  className: "agg-market-image size-12 rounded-agg-lg object-cover md:size-[60px]"
4607
4855
  }
4608
4856
  ) : null,
4609
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-24 flex-col", children: [
4610
- /* @__PURE__ */ jsx10(Tooltip, { content: model.title, side: "top", children: /* @__PURE__ */ jsx10("div", { className: "min-w-0", children: /* @__PURE__ */ jsx10(
4857
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-24 flex-col", children: [
4858
+ /* @__PURE__ */ jsx11(Tooltip, { content: model.title, side: "top", children: /* @__PURE__ */ jsx11("div", { className: "min-w-0", children: /* @__PURE__ */ jsx11(
4611
4859
  Typography,
4612
4860
  {
4613
4861
  as: "h3",
@@ -4616,7 +4864,7 @@ var MarketDetailsContent = ({
4616
4864
  children: model.title
4617
4865
  }
4618
4866
  ) }) }),
4619
- /* @__PURE__ */ jsx10("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsx10(
4867
+ /* @__PURE__ */ jsx11("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsx11(
4620
4868
  Typography,
4621
4869
  {
4622
4870
  variant: "label",
@@ -4624,8 +4872,8 @@ var MarketDetailsContent = ({
4624
4872
  children: subtitleOverride != null ? subtitleOverride : model.subtitle
4625
4873
  }
4626
4874
  ) }),
4627
- marketTradingState.isTradingDisabled && marketTradingState.kind !== "resolved" && !isUpcomingMarket ? /* @__PURE__ */ jsxs8("div", { className: "mt-2 flex flex-wrap items-center gap-2 justify-center md:justify-start", children: [
4628
- /* @__PURE__ */ jsxs8(
4875
+ !showResolvingState && marketTradingState.isTradingDisabled && marketTradingState.kind !== "resolved" && !isUpcomingMarket ? /* @__PURE__ */ jsxs9("div", { className: "mt-2 flex flex-wrap items-center gap-2 justify-center md:justify-start", children: [
4876
+ /* @__PURE__ */ jsxs9(
4629
4877
  "span",
4630
4878
  {
4631
4879
  className: cn(
@@ -4633,7 +4881,7 @@ var MarketDetailsContent = ({
4633
4881
  resolveTradingStateBadgeClassName(marketTradingState.kind)
4634
4882
  ),
4635
4883
  children: [
4636
- /* @__PURE__ */ jsx10(
4884
+ /* @__PURE__ */ jsx11(
4637
4885
  Icon,
4638
4886
  {
4639
4887
  name: marketStatePresentation.iconName,
@@ -4641,20 +4889,23 @@ var MarketDetailsContent = ({
4641
4889
  className: "h-3.5 w-3.5"
4642
4890
  }
4643
4891
  ),
4644
- /* @__PURE__ */ jsx10("span", { children: marketStatePresentation.badgeLabel })
4892
+ /* @__PURE__ */ jsx11("span", { children: marketStatePresentation.badgeLabel })
4645
4893
  ]
4646
4894
  }
4647
4895
  ),
4648
- marketStatePresentation.timestampLabel ? /* @__PURE__ */ jsx10(Typography, { variant: "label", className: "text-agg-muted-foreground", children: marketStatePresentation.timestampLabel }) : null,
4649
- marketStatePresentation.winningOutcomeLabel ? /* @__PURE__ */ jsx10(Typography, { variant: "label", className: "text-agg-muted-foreground", children: marketStatePresentation.winningOutcomeLabel }) : null
4896
+ marketStatePresentation.timestampLabel ? /* @__PURE__ */ jsx11(Typography, { variant: "label", className: "text-agg-muted-foreground", children: marketStatePresentation.timestampLabel }) : null,
4897
+ marketStatePresentation.winningOutcomeLabel ? /* @__PURE__ */ jsx11(Typography, { variant: "label", className: "text-agg-muted-foreground", children: marketStatePresentation.winningOutcomeLabel }) : null
4650
4898
  ] }) : null
4651
4899
  ] })
4652
4900
  ] }),
4653
- !compactHeader ? /* @__PURE__ */ jsx10(Typography, { as: "div", variant: "heading", className: "agg-market-headline shrink-0", children: formatProbabilityPercent(headlineProbability, formatPercent) }) : null
4901
+ !compactHeader ? /* @__PURE__ */ jsx11(Typography, { as: "div", variant: "heading", className: "agg-market-headline shrink-0", children: formatProbabilityPercent(headlineProbability, formatPercent) }) : null
4654
4902
  ]
4655
4903
  }
4656
4904
  ),
4657
- marketTradingState.kind === "resolved" && marketTradingState.winningOutcome ? /* @__PURE__ */ jsx10("div", { className: "agg-outcomes flex w-full items-center justify-end md:w-auto md:shrink-0", children: /* @__PURE__ */ jsxs8(
4905
+ showResolvingState ? /* @__PURE__ */ jsx11("div", { className: "agg-outcomes flex w-full items-center justify-end md:w-auto md:shrink-0", children: /* @__PURE__ */ jsxs9("span", { className: "inline-flex h-9 min-w-35 items-center justify-center gap-2 rounded-agg-full bg-agg-secondary-hover px-5 py-1.5 text-agg-sm", children: [
4906
+ /* @__PURE__ */ jsx11(LoadingIcon, { size: "small" }),
4907
+ /* @__PURE__ */ jsx11(Typography, { variant: "body", children: labels.marketDetails.resolvingBadge })
4908
+ ] }) }) : marketTradingState.kind === "resolved" && marketTradingState.winningOutcome ? /* @__PURE__ */ jsx11("div", { className: "agg-outcomes flex w-full items-center justify-end md:w-auto md:shrink-0", children: /* @__PURE__ */ jsxs9(
4658
4909
  "span",
4659
4910
  {
4660
4911
  className: cn(
@@ -4667,7 +4918,7 @@ var MarketDetailsContent = ({
4667
4918
  "border-transparent bg-agg-secondary-hover"
4668
4919
  ),
4669
4920
  children: [
4670
- /* @__PURE__ */ jsx10(
4921
+ /* @__PURE__ */ jsx11(
4671
4922
  Icon,
4672
4923
  {
4673
4924
  name: marketTradingState.winningOutcome.label.trim().toLowerCase() === "yes" ? "check-circle" : "cross-circle",
@@ -4678,12 +4929,12 @@ var MarketDetailsContent = ({
4678
4929
  )
4679
4930
  }
4680
4931
  ),
4681
- /* @__PURE__ */ jsx10(Typography, { variant: "body", children: labels.eventMarketPage.resolvedOutcome(
4932
+ /* @__PURE__ */ jsx11(Typography, { variant: "body", children: labels.eventMarketPage.resolvedOutcome(
4682
4933
  resolvedWinningOutcomeLabel != null ? resolvedWinningOutcomeLabel : marketTradingState.winningOutcome.label
4683
4934
  ) })
4684
4935
  ]
4685
4936
  }
4686
- ) }) : isUpcomingMarket ? /* @__PURE__ */ jsx10("div", { className: "agg-outcomes flex w-full items-center justify-end md:w-auto md:shrink-0", children: /* @__PURE__ */ jsxs8(
4937
+ ) }) : isUpcomingMarket ? /* @__PURE__ */ jsx11("div", { className: "agg-outcomes flex w-full items-center justify-end md:w-auto md:shrink-0", children: /* @__PURE__ */ jsxs9(
4687
4938
  "span",
4688
4939
  {
4689
4940
  className: cn(
@@ -4692,7 +4943,7 @@ var MarketDetailsContent = ({
4692
4943
  resolveTradingStateBadgeClassName(marketTradingState.kind)
4693
4944
  ),
4694
4945
  children: [
4695
- /* @__PURE__ */ jsx10(
4946
+ /* @__PURE__ */ jsx11(
4696
4947
  Icon,
4697
4948
  {
4698
4949
  name: marketStatePresentation.iconName,
@@ -4701,10 +4952,10 @@ var MarketDetailsContent = ({
4701
4952
  "aria-hidden": "true"
4702
4953
  }
4703
4954
  ),
4704
- /* @__PURE__ */ jsx10("span", { children: marketStatePresentation.badgeLabel })
4955
+ /* @__PURE__ */ jsx11("span", { children: marketStatePresentation.badgeLabel })
4705
4956
  ]
4706
4957
  }
4707
- ) }) : /* @__PURE__ */ jsx10(
4958
+ ) }) : /* @__PURE__ */ jsx11(
4708
4959
  "div",
4709
4960
  {
4710
4961
  className: "agg-outcomes flex w-full flex-wrap gap-2 md:w-auto md:shrink-0 md:flex-nowrap",
@@ -4713,7 +4964,7 @@ var MarketDetailsContent = ({
4713
4964
  onKeyDown: (eventToHandle) => handleOutcomeKeyDown(eventToHandle),
4714
4965
  children: headerOutcomeItems.map((item) => {
4715
4966
  const isActiveOutcome = item.id === selectedOutcomeId;
4716
- return /* @__PURE__ */ jsx10(
4967
+ return /* @__PURE__ */ jsx11(
4717
4968
  MarketDetailsOutcomeButton,
4718
4969
  {
4719
4970
  enforceFixedWidth: headerOutcomeVariant != null,
@@ -4740,8 +4991,8 @@ var MarketDetailsContent = ({
4740
4991
  ]
4741
4992
  }
4742
4993
  ),
4743
- headerAccessory ? /* @__PURE__ */ jsx10("div", { className: "agg-market-card-accessory border-t border-agg-separator", children: headerAccessory }) : null,
4744
- /* @__PURE__ */ jsx10(
4994
+ headerAccessory ? /* @__PURE__ */ jsx11("div", { className: "agg-market-card-accessory border-t border-agg-separator", children: headerAccessory }) : null,
4995
+ /* @__PURE__ */ jsx11(
4745
4996
  "div",
4746
4997
  {
4747
4998
  id: detailsContentId,
@@ -4755,9 +5006,9 @@ var MarketDetailsContent = ({
4755
5006
  isOpened ? "grid-rows-[1fr] opacity-100" : "pointer-events-none grid-rows-[0fr] opacity-0"
4756
5007
  ),
4757
5008
  "aria-hidden": !isOpened,
4758
- children: /* @__PURE__ */ jsxs8("div", { className: "min-h-0", children: [
4759
- /* @__PURE__ */ jsx10("div", { className: "h-px w-full bg-agg-separator" }),
4760
- /* @__PURE__ */ jsxs8(
5009
+ children: /* @__PURE__ */ jsxs9("div", { className: "min-h-0", children: [
5010
+ /* @__PURE__ */ jsx11("div", { className: "h-px w-full bg-agg-separator" }),
5011
+ /* @__PURE__ */ jsxs9(
4761
5012
  "div",
4762
5013
  {
4763
5014
  className: cn(
@@ -4771,8 +5022,8 @@ var MarketDetailsContent = ({
4771
5022
  ) : "translate-y-5 opacity-0"
4772
5023
  ),
4773
5024
  children: [
4774
- !isResolvedMarket ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
4775
- /* @__PURE__ */ jsx10("div", { className: cn("block", classNames == null ? void 0 : classNames.tabs), children: /* @__PURE__ */ jsx10(
5025
+ !isResolvedMarket ? /* @__PURE__ */ jsxs9(Fragment2, { children: [
5026
+ /* @__PURE__ */ jsx11("div", { className: cn("block", classNames == null ? void 0 : classNames.tabs), children: /* @__PURE__ */ jsx11(
4776
5027
  Tabs,
4777
5028
  {
4778
5029
  ariaLabel: labels.marketDetails.tabsAria,
@@ -4783,10 +5034,10 @@ var MarketDetailsContent = ({
4783
5034
  className: "agg-market-tabs flex! w-full px-5"
4784
5035
  }
4785
5036
  ) }),
4786
- /* @__PURE__ */ jsx10("div", { className: "h-px w-full bg-agg-separator" })
5037
+ /* @__PURE__ */ jsx11("div", { className: "h-px w-full bg-agg-separator" })
4787
5038
  ] }) : null,
4788
- /* @__PURE__ */ jsxs8("div", { className: cn("agg-market-card-body p-0", classNames == null ? void 0 : classNames.content), children: [
4789
- effectiveSelectedTab === "order-book" ? /* @__PURE__ */ jsx10(
5039
+ /* @__PURE__ */ jsxs9("div", { className: cn("agg-market-card-body p-0", classNames == null ? void 0 : classNames.content), children: [
5040
+ effectiveSelectedTab === "order-book" ? /* @__PURE__ */ jsx11(
4790
5041
  OrderbookWithStates,
4791
5042
  {
4792
5043
  state: orderbookState,
@@ -4812,7 +5063,7 @@ var MarketDetailsContent = ({
4812
5063
  wrapperClassName: classNames == null ? void 0 : classNames.orderBook
4813
5064
  }
4814
5065
  ) : null,
4815
- isOpened && effectiveSelectedTab === "graph" ? /* @__PURE__ */ jsx10(
5066
+ isOpened && effectiveSelectedTab === "graph" ? /* @__PURE__ */ jsx11(
4816
5067
  MarketDetailsGraphPanel,
4817
5068
  {
4818
5069
  venueMarkets: model.market.venueMarkets,
@@ -4828,13 +5079,13 @@ var MarketDetailsContent = ({
4828
5079
  classNames: { graph: classNames == null ? void 0 : classNames.graph, footer: classNames == null ? void 0 : classNames.footer }
4829
5080
  }
4830
5081
  ) : null,
4831
- effectiveSelectedTab === "other" ? /* @__PURE__ */ jsx10("div", { className: "agg-market-meta flex flex-col gap-4", children: otherContent != null ? otherContent : /* @__PURE__ */ jsx10("div", { className: "agg-market-meta-list grid grid-cols-1 gap-3", children: otherRows.map((row) => /* @__PURE__ */ jsxs8(
5082
+ effectiveSelectedTab === "other" ? /* @__PURE__ */ jsx11("div", { className: "agg-market-meta flex flex-col gap-4", children: otherContent != null ? otherContent : /* @__PURE__ */ jsx11("div", { className: "agg-market-meta-list grid grid-cols-1 gap-3", children: otherRows.map((row) => /* @__PURE__ */ jsxs9(
4832
5083
  "div",
4833
5084
  {
4834
5085
  className: "agg-market-meta-row flex items-center justify-between rounded-agg-xl bg-agg-secondary-hover px-4 py-3",
4835
5086
  children: [
4836
- /* @__PURE__ */ jsx10(Typography, { variant: "label", className: "text-agg-muted-foreground", children: row.label }),
4837
- /* @__PURE__ */ jsx10(Typography, { variant: "body", className: "text-right", children: row.value })
5087
+ /* @__PURE__ */ jsx11(Typography, { variant: "label", className: "text-agg-muted-foreground", children: row.label }),
5088
+ /* @__PURE__ */ jsx11(Typography, { variant: "body", className: "text-right", children: row.value })
4838
5089
  ]
4839
5090
  },
4840
5091
  row.label
@@ -4852,9 +5103,9 @@ var MarketDetailsContent = ({
4852
5103
  };
4853
5104
  var MarketDetails = (_a) => {
4854
5105
  var _b = _a, { isOpened } = _b, props = __objRest(_b, ["isOpened"]);
4855
- const labels = useLabels7();
5106
+ const labels = useLabels8();
4856
5107
  if (props.isLoading) {
4857
- return /* @__PURE__ */ jsx10(
5108
+ return /* @__PURE__ */ jsx11(
4858
5109
  Skeleton,
4859
5110
  {
4860
5111
  view: "market-details-minified",
@@ -4864,7 +5115,7 @@ var MarketDetails = (_a) => {
4864
5115
  );
4865
5116
  }
4866
5117
  if ("venueMarkets" in props && props.venueMarkets) {
4867
- return /* @__PURE__ */ jsx10(
5118
+ return /* @__PURE__ */ jsx11(
4868
5119
  MarketDetailsContent,
4869
5120
  __spreadProps(__spreadValues({}, props), {
4870
5121
  isOpened,
@@ -4876,7 +5127,7 @@ var MarketDetails = (_a) => {
4876
5127
  );
4877
5128
  }
4878
5129
  const { classNames: fallbackClassNames } = props;
4879
- return /* @__PURE__ */ jsx10(MarketDetailsUnavailableState, { classNames: fallbackClassNames });
5130
+ return /* @__PURE__ */ jsx11(MarketDetailsUnavailableState, { classNames: fallbackClassNames });
4880
5131
  };
4881
5132
  MarketDetails.displayName = "MarketDetails";
4882
5133
  var AFFIRMATIVE_WINNER_LABELS = /* @__PURE__ */ new Set(["yes", "up", "buy", "long", "true"]);
@@ -4930,10 +5181,11 @@ var MarketDetailsList = ({
4930
5181
  defaultTab,
4931
5182
  classNames,
4932
5183
  live,
5184
+ showResolvingState = false,
4933
5185
  midpointsResult
4934
5186
  }) => {
4935
5187
  var _a, _b;
4936
- const labels = useLabels7();
5188
+ const labels = useLabels8();
4937
5189
  const tradingContext = useEventTradingContext2();
4938
5190
  const selectedMarketId = (_a = tradingContext == null ? void 0 : tradingContext.selectedMarketId) != null ? _a : null;
4939
5191
  const [expandedMarketId, setExpandedMarketId] = useState5(null);
@@ -4981,6 +5233,7 @@ var MarketDetailsList = ({
4981
5233
  const winnerMarketId = resolveResolvedWinnerMarketId(sourceMarkets, eventTradingState);
4982
5234
  return {
4983
5235
  primary: moveMarketToFront(sourceMarkets, winnerMarketId),
5236
+ closed: [],
4984
5237
  upcoming: [],
4985
5238
  resolved: []
4986
5239
  };
@@ -5013,8 +5266,12 @@ var MarketDetailsList = ({
5013
5266
  return [];
5014
5267
  }, [areResolvedMarketsVisible, groupedMarkets.resolved, isResolvedEvent]);
5015
5268
  const displayedMarkets = useMemo7(() => {
5016
- return [...groupedMarkets.primary, ...visibleResolvedMarkets];
5017
- }, [groupedMarkets.primary, visibleResolvedMarkets]);
5269
+ return [
5270
+ ...groupedMarkets.primary,
5271
+ ...showResolvingState ? groupedMarkets.closed : [],
5272
+ ...visibleResolvedMarkets
5273
+ ];
5274
+ }, [groupedMarkets.closed, groupedMarkets.primary, showResolvingState, visibleResolvedMarkets]);
5018
5275
  const hasPrefetchedMarkets = !!providedMarkets || !!((_b = eventTradingState == null ? void 0 : eventTradingState.marketStates) == null ? void 0 : _b.length);
5019
5276
  const midpointEligibleMarkets = useMemo7(() => {
5020
5277
  return displayedMarkets.filter(
@@ -5066,7 +5323,7 @@ var MarketDetailsList = ({
5066
5323
  tradingContext == null ? void 0 : tradingContext.selectMarket(market.id, market);
5067
5324
  };
5068
5325
  if (!hasPrefetchedMarkets && isLoading) {
5069
- return /* @__PURE__ */ jsx10(
5326
+ return /* @__PURE__ */ jsx11(
5070
5327
  Skeleton,
5071
5328
  {
5072
5329
  view: "market-details-minified",
@@ -5076,29 +5333,29 @@ var MarketDetailsList = ({
5076
5333
  );
5077
5334
  }
5078
5335
  if (!hasPrefetchedMarkets && error) {
5079
- return /* @__PURE__ */ jsx10(
5336
+ return /* @__PURE__ */ jsx11(
5080
5337
  StateMessage,
5081
5338
  {
5082
5339
  title: labels.marketDetails.unavailableTitle,
5083
5340
  description: labels.marketDetails.unavailableDescription,
5084
- icon: /* @__PURE__ */ jsx10(SearchEmptyIcon, {}),
5341
+ icon: /* @__PURE__ */ jsx11(SearchEmptyIcon, {}),
5085
5342
  classNames: { root: "min-h-[280px] md:min-h-[320px]" }
5086
5343
  }
5087
5344
  );
5088
5345
  }
5089
5346
  if (displayedMarkets.length === 0 && !shouldShowResolvedToggle) {
5090
5347
  const hasSourceMarkets = sourceMarkets.length > 0;
5091
- return /* @__PURE__ */ jsx10(
5348
+ return /* @__PURE__ */ jsx11(
5092
5349
  StateMessage,
5093
5350
  {
5094
5351
  title: hasSourceMarkets ? isResolvedEvent ? labels.markets.emptyResolved : labels.markets.emptyNoOpen : labels.marketDetails.notFoundTitle,
5095
5352
  description: hasSourceMarkets ? void 0 : labels.marketDetails.notFoundDescription,
5096
- icon: /* @__PURE__ */ jsx10(SearchEmptyIcon, {}),
5353
+ icon: /* @__PURE__ */ jsx11(SearchEmptyIcon, {}),
5097
5354
  classNames: { root: "min-h-[280px] md:min-h-[320px]" }
5098
5355
  }
5099
5356
  );
5100
5357
  }
5101
- const renderMarketCard = (market) => /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10(
5358
+ const renderMarketCard = (market) => /* @__PURE__ */ jsx11("div", { children: /* @__PURE__ */ jsx11(
5102
5359
  MarketDetails,
5103
5360
  {
5104
5361
  marketId: market.id,
@@ -5120,14 +5377,16 @@ var MarketDetailsList = ({
5120
5377
  ariaLabel: market.question,
5121
5378
  classNames: { root: cn("agg-market-list-item", classNames == null ? void 0 : classNames.item) },
5122
5379
  live,
5380
+ showResolvingState,
5123
5381
  midpointsFallback,
5124
5382
  midpointsFallbackVenues,
5125
5383
  midpointsResult
5126
5384
  }
5127
5385
  ) }, market.id);
5128
- return /* @__PURE__ */ jsxs8("div", { className: cn("agg-market-list flex flex-col gap-3", classNames == null ? void 0 : classNames.root), children: [
5386
+ return /* @__PURE__ */ jsxs9("div", { className: cn("agg-market-list flex flex-col gap-3", classNames == null ? void 0 : classNames.root), children: [
5129
5387
  groupedMarkets.primary.map((market) => renderMarketCard(market)),
5130
- shouldShowResolvedToggle ? /* @__PURE__ */ jsx10(
5388
+ showResolvingState ? groupedMarkets.closed.map((market) => renderMarketCard(market)) : null,
5389
+ shouldShowResolvedToggle ? /* @__PURE__ */ jsx11(
5131
5390
  Button,
5132
5391
  {
5133
5392
  variant: "tertiary",
@@ -5137,7 +5396,7 @@ var MarketDetailsList = ({
5137
5396
  setAreResolvedMarketsVisible((isVisible) => !isVisible);
5138
5397
  },
5139
5398
  "aria-expanded": areResolvedMarketsVisible,
5140
- suffix: /* @__PURE__ */ jsx10(
5399
+ suffix: /* @__PURE__ */ jsx11(
5141
5400
  Icon,
5142
5401
  {
5143
5402
  name: areResolvedMarketsVisible ? "chevron-up" : "chevron-down",
@@ -5161,8 +5420,8 @@ import {
5161
5420
  useAppConfig as useAppConfig2,
5162
5421
  useCategories,
5163
5422
  useCategoryChildren,
5164
- useLabels as useLabels9,
5165
- useSdkUiConfig as useSdkUiConfig5,
5423
+ useLabels as useLabels10,
5424
+ useSdkUiConfig as useSdkUiConfig6,
5166
5425
  useVenueEvents,
5167
5426
  useVenueMarketMidpoints as useVenueMarketMidpoints2
5168
5427
  } from "@agg-build/hooks";
@@ -5172,7 +5431,7 @@ import { useEffect as useEffect8, useMemo as useMemo10, useRef as useRef8, useSt
5172
5431
 
5173
5432
  // src/events/list/category-sidebar.tsx
5174
5433
  import { useMemo as useMemo8 } from "react";
5175
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
5434
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
5176
5435
  var rowBase = cn(
5177
5436
  "flex min-h-11 w-full items-center gap-3 rounded-[6px] px-3 py-3",
5178
5437
  "text-left text-agg-sm font-agg-normal leading-agg-5",
@@ -5214,7 +5473,7 @@ var CategorySidebar = ({
5214
5473
  }) => {
5215
5474
  var _a, _b;
5216
5475
  const hasKnownChildren = ((_b = (_a = childrenByParentId.get(entry.id)) == null ? void 0 : _a.length) != null ? _b : 0) > 0;
5217
- return /* @__PURE__ */ jsxs9(
5476
+ return /* @__PURE__ */ jsxs10(
5218
5477
  "button",
5219
5478
  {
5220
5479
  type: "button",
@@ -5222,8 +5481,8 @@ var CategorySidebar = ({
5222
5481
  className: isSelected ? selectedRowClassName : idleRowClassName,
5223
5482
  onClick,
5224
5483
  children: [
5225
- /* @__PURE__ */ jsx11("span", { className: "min-w-0 flex-1 truncate first-letter:uppercase", children: entry.label }),
5226
- hasKnownChildren ? /* @__PURE__ */ jsx11(
5484
+ /* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate first-letter:uppercase", children: entry.label }),
5485
+ hasKnownChildren ? /* @__PURE__ */ jsx12(
5227
5486
  Icon,
5228
5487
  {
5229
5488
  name: isExpanded ? "chevron-up" : "chevron-down",
@@ -5231,7 +5490,7 @@ var CategorySidebar = ({
5231
5490
  color: "currentColor",
5232
5491
  className: "shrink-0 text-agg-muted-foreground"
5233
5492
  }
5234
- ) : /* @__PURE__ */ jsx11("span", { className: "shrink-0 text-agg-muted-foreground", children: entry.eventCount })
5493
+ ) : /* @__PURE__ */ jsx12("span", { className: "shrink-0 text-agg-muted-foreground", children: entry.eventCount })
5235
5494
  ]
5236
5495
  },
5237
5496
  entry.id
@@ -5249,27 +5508,27 @@ var CategorySidebar = ({
5249
5508
  const hasKnownChildren = childCategories.length > 0;
5250
5509
  const isExpanded = ((_d = categoryPath[depth]) == null ? void 0 : _d.id) === category.id && !collapsedCategoryIds.has(category.id);
5251
5510
  const isSelected = ((_e = categoryPath[depth]) == null ? void 0 : _e.id) === category.id && categoryPath.length === depth + 1;
5252
- return /* @__PURE__ */ jsxs9("div", { className: "flex w-full flex-col", children: [
5511
+ return /* @__PURE__ */ jsxs10("div", { className: "flex w-full flex-col", children: [
5253
5512
  renderRow({
5254
5513
  entry,
5255
5514
  isExpanded,
5256
5515
  isSelected,
5257
5516
  onClick: () => onToggleCategory({ entry, depth, hasKnownChildren, isExpanded, isSelected })
5258
5517
  }),
5259
- /* @__PURE__ */ jsx11(
5518
+ /* @__PURE__ */ jsx12(
5260
5519
  "div",
5261
5520
  {
5262
5521
  className: cn(
5263
5522
  "grid transition-[grid-template-rows] duration-150 ease-in-out motion-reduce:transition-none",
5264
5523
  isExpanded ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
5265
5524
  ),
5266
- children: /* @__PURE__ */ jsx11("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx11("div", { className: "flex w-full flex-col gap-1 pl-4 pt-1", children: childCategories.map((child) => renderBranch(child, depth + 1)) }) })
5525
+ children: /* @__PURE__ */ jsx12("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx12("div", { className: "flex w-full flex-col gap-1 pl-4 pt-1", children: childCategories.map((child) => renderBranch(child, depth + 1)) }) })
5267
5526
  }
5268
5527
  )
5269
5528
  ] }, category.id);
5270
5529
  };
5271
- return /* @__PURE__ */ jsxs9("div", { className: "flex w-full flex-col gap-1", children: [
5272
- /* @__PURE__ */ jsxs9(
5530
+ return /* @__PURE__ */ jsxs10("div", { className: "flex w-full flex-col gap-1", children: [
5531
+ /* @__PURE__ */ jsxs10(
5273
5532
  "button",
5274
5533
  {
5275
5534
  type: "button",
@@ -5277,8 +5536,8 @@ var CategorySidebar = ({
5277
5536
  className: !isDrilledIn ? selectedRowClassName : idleRowClassName,
5278
5537
  onClick: onSelectAll,
5279
5538
  children: [
5280
- /* @__PURE__ */ jsx11("span", { className: "min-w-0 flex-1 truncate", children: labels.subcategoriesAll }),
5281
- /* @__PURE__ */ jsx11("span", { className: "shrink-0 text-agg-muted-foreground", children: totalEventCount })
5539
+ /* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate", children: labels.subcategoriesAll }),
5540
+ /* @__PURE__ */ jsx12("span", { className: "shrink-0 text-agg-muted-foreground", children: totalEventCount })
5282
5541
  ]
5283
5542
  }
5284
5543
  ),
@@ -5288,8 +5547,8 @@ var CategorySidebar = ({
5288
5547
  CategorySidebar.displayName = "CategorySidebar";
5289
5548
 
5290
5549
  // src/events/list/event-list-tabs.tsx
5291
- import { getVenueAvailabilityState, useAppConfig, useGeoBlock, useLabels as useLabels8 } from "@agg-build/hooks";
5292
- import { Venue as Venue3 } from "@agg-build/sdk";
5550
+ import { getVenueAvailabilityState, useAppConfig, useGeoBlock, useLabels as useLabels9 } from "@agg-build/hooks";
5551
+ import { isVenueInactive } from "@agg-build/sdk";
5293
5552
  import { useCallback as useCallback3, useEffect as useEffect7, useMemo as useMemo9, useRef as useRef7, useState as useState6 } from "react";
5294
5553
 
5295
5554
  // src/events/list/event-list.constants.ts
@@ -5346,6 +5605,12 @@ var getDefaultEventListTabs = (labels) => {
5346
5605
  venues: [Venue2.myriad]
5347
5606
  // isComingSoon: true,
5348
5607
  },
5608
+ {
5609
+ value: Venue2.novig,
5610
+ label: labels.venues.novig,
5611
+ venueLogo: Venue2.novig,
5612
+ venues: [Venue2.novig]
5613
+ },
5349
5614
  {
5350
5615
  value: Venue2.opinion,
5351
5616
  label: labels.venues.opinion,
@@ -5357,16 +5622,16 @@ var getDefaultEventListTabs = (labels) => {
5357
5622
  };
5358
5623
 
5359
5624
  // src/events/list/event-list-tabs.tsx
5360
- import { jsx as jsx12 } from "react/jsx-runtime";
5625
+ import { jsx as jsx13 } from "react/jsx-runtime";
5361
5626
  var renderTabIcon = (tab, isActive) => {
5362
5627
  if (tab.iconName === "warning-filled") {
5363
- return /* @__PURE__ */ jsx12(Icon, { name: "warning-filled", size: "small", color: "currentColor" });
5628
+ return /* @__PURE__ */ jsx13(Icon, { name: "warning-filled", size: "small", color: "currentColor" });
5364
5629
  }
5365
5630
  if (tab.venueLogo) {
5366
- return /* @__PURE__ */ jsx12(VenueLogo, { venue: tab.venueLogo, size: "small" });
5631
+ return /* @__PURE__ */ jsx13(VenueLogo, { venue: tab.venueLogo, size: "small" });
5367
5632
  }
5368
5633
  if (!tab.iconName) return null;
5369
- return /* @__PURE__ */ jsx12(
5634
+ return /* @__PURE__ */ jsx13(
5370
5635
  Icon,
5371
5636
  {
5372
5637
  name: tab.iconName,
@@ -5376,7 +5641,7 @@ var renderTabIcon = (tab, isActive) => {
5376
5641
  );
5377
5642
  };
5378
5643
  var useEventListTabs = (tabs) => {
5379
- const labels = useLabels8();
5644
+ const labels = useLabels9();
5380
5645
  const { disabledVenues, isLoading: isAppConfigLoading } = useAppConfig();
5381
5646
  const { isLocationBlocked } = useGeoBlock();
5382
5647
  return useMemo9(() => {
@@ -5386,7 +5651,15 @@ var useEventListTabs = (tabs) => {
5386
5651
  const availabilityState = getVenueAvailabilityState({
5387
5652
  venueId: tab.venueLogo,
5388
5653
  disabledVenues,
5389
- isConfigLoading: isAppConfigLoading && tab.venueLogo === Venue3.kalshi,
5654
+ // A compile-time-inactive venue (novig today) is hidden by default and
5655
+ // un-hidden per-environment by NOVIG_DATA_VISIBLE, so its
5656
+ // disabled-ness is only known once `/app/config` resolves — treating
5657
+ // it as hidden while that request is in flight stops its tab flashing
5658
+ // in and out where the flag is unset. Active venues must NOT be
5659
+ // withheld, or they pop in late. Keyed off the shared inactive-venue
5660
+ // helper rather than a venue name, so launching or retiring one needs
5661
+ // no change here.
5662
+ isConfigLoading: isAppConfigLoading && isVenueInactive(tab.venueLogo),
5390
5663
  isLocationBlocked
5391
5664
  });
5392
5665
  if (availabilityState === "hidden") return [];
@@ -5427,7 +5700,7 @@ var EventListTabs = ({
5427
5700
  };
5428
5701
  });
5429
5702
  }, [activeTab, resolvedTabs]);
5430
- return /* @__PURE__ */ jsx12(
5703
+ return /* @__PURE__ */ jsx13(
5431
5704
  Tabs,
5432
5705
  {
5433
5706
  ariaLabel,
@@ -5513,7 +5786,7 @@ var useEventListTabsHeaderOverflow = (recomputeOn, options) => {
5513
5786
  };
5514
5787
 
5515
5788
  // src/events/list/index.tsx
5516
- import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
5789
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
5517
5790
  var SORT_ICON_BY_VALUE = {
5518
5791
  volume24hr: "sort-volume-24hr",
5519
5792
  topArbitrage: "sort-top-arbitrage",
@@ -5568,11 +5841,11 @@ var EventList = ({
5568
5841
  stateRef
5569
5842
  }) => {
5570
5843
  var _a, _b, _c, _d, _e;
5571
- const labels = useLabels9();
5844
+ const labels = useLabels10();
5572
5845
  const { disabledVenues } = useAppConfig2();
5573
5846
  const {
5574
5847
  features: { enableVenueEventDiscoveryFilters, showSportsMarkets }
5575
- } = useSdkUiConfig5();
5848
+ } = useSdkUiConfig6();
5576
5849
  const isDiscoveryFiltersEnabled = enableVenueEventDiscoveryFilters && !search;
5577
5850
  const resolvedTabs = useEventListTabs();
5578
5851
  const visibleVenues = useMemo10(
@@ -5591,22 +5864,22 @@ var EventList = ({
5591
5864
  {
5592
5865
  value: "volume24hr",
5593
5866
  label: labels.eventList.sortBy24hVolume,
5594
- icon: /* @__PURE__ */ jsx13(Icon, { name: SORT_ICON_BY_VALUE.volume24hr, size: "small", color: "currentColor" })
5867
+ icon: /* @__PURE__ */ jsx14(Icon, { name: SORT_ICON_BY_VALUE.volume24hr, size: "small", color: "currentColor" })
5595
5868
  },
5596
5869
  {
5597
5870
  value: "topArbitrage",
5598
5871
  label: labels.eventList.sortByTopArbitrage,
5599
- icon: /* @__PURE__ */ jsx13(Icon, { name: SORT_ICON_BY_VALUE.topArbitrage, size: "small", color: "currentColor" })
5872
+ icon: /* @__PURE__ */ jsx14(Icon, { name: SORT_ICON_BY_VALUE.topArbitrage, size: "small", color: "currentColor" })
5600
5873
  },
5601
5874
  {
5602
5875
  value: "volume",
5603
5876
  label: labels.eventList.sortByTotalVolume,
5604
- icon: /* @__PURE__ */ jsx13(Icon, { name: SORT_ICON_BY_VALUE.volume, size: "small", color: "currentColor" })
5877
+ icon: /* @__PURE__ */ jsx14(Icon, { name: SORT_ICON_BY_VALUE.volume, size: "small", color: "currentColor" })
5605
5878
  },
5606
5879
  {
5607
5880
  value: "endDate",
5608
5881
  label: labels.eventList.sortByEndingSoon,
5609
- icon: /* @__PURE__ */ jsx13(Icon, { name: SORT_ICON_BY_VALUE.endDate, size: "small", color: "currentColor" })
5882
+ icon: /* @__PURE__ */ jsx14(Icon, { name: SORT_ICON_BY_VALUE.endDate, size: "small", color: "currentColor" })
5610
5883
  }
5611
5884
  ];
5612
5885
  }, [
@@ -5831,7 +6104,7 @@ var EventList = ({
5831
6104
  onCategoryRootChange == null ? void 0 : onCategoryRootChange(baseCategoryId != null ? baseCategoryId : void 0);
5832
6105
  };
5833
6106
  if (shouldRenderLoadingState) {
5834
- return /* @__PURE__ */ jsx13(
6107
+ return /* @__PURE__ */ jsx14(
5835
6108
  Skeleton,
5836
6109
  {
5837
6110
  view: "event-list",
@@ -5840,8 +6113,8 @@ var EventList = ({
5840
6113
  }
5841
6114
  );
5842
6115
  }
5843
- return /* @__PURE__ */ jsxs10("section", { className: "agg-event-list flex w-full flex-col gap-2 md:gap-5 t", children: [
5844
- /* @__PURE__ */ jsxs10(
6116
+ return /* @__PURE__ */ jsxs11("section", { className: "agg-event-list flex w-full flex-col gap-2 md:gap-5 t", children: [
6117
+ /* @__PURE__ */ jsxs11(
5845
6118
  "header",
5846
6119
  {
5847
6120
  className: cn(
@@ -5850,9 +6123,9 @@ var EventList = ({
5850
6123
  "gap-2 sm:flex-row sm:items-center sm:gap-4"
5851
6124
  ),
5852
6125
  children: [
5853
- /* @__PURE__ */ jsx13("div", { className: "agg-event-list-title min-w-32", children: /* @__PURE__ */ jsx13(Typography, { as: "h2", variant: "title", className: "truncate first-letter:uppercase", children: title }) }),
5854
- /* @__PURE__ */ jsxs10("div", { className: "hidden min-w-0 max-w-full items-center gap-3 md:flex", children: [
5855
- /* @__PURE__ */ jsx13(
6126
+ /* @__PURE__ */ jsx14("div", { className: "agg-event-list-title min-w-32", children: /* @__PURE__ */ jsx14(Typography, { as: "h2", variant: "title", className: "truncate first-letter:uppercase", children: title }) }),
6127
+ /* @__PURE__ */ jsxs11("div", { className: "hidden min-w-0 max-w-full items-center gap-3 md:flex", children: [
6128
+ /* @__PURE__ */ jsx14(
5856
6129
  EventListTabs,
5857
6130
  {
5858
6131
  ariaLabel: labels.eventList.tabsAria(title),
@@ -5862,7 +6135,7 @@ var EventList = ({
5862
6135
  overflowBehavior: "scroll"
5863
6136
  }
5864
6137
  ),
5865
- /* @__PURE__ */ jsx13(
6138
+ /* @__PURE__ */ jsx14(
5866
6139
  Select,
5867
6140
  {
5868
6141
  ariaLabel: labels.eventList.sortByLabel,
@@ -5878,8 +6151,8 @@ var EventList = ({
5878
6151
  ]
5879
6152
  }
5880
6153
  ),
5881
- /* @__PURE__ */ jsxs10("div", { className: "flex w-full gap-2 md:hidden mb-3", children: [
5882
- /* @__PURE__ */ jsx13(
6154
+ /* @__PURE__ */ jsxs11("div", { className: "flex w-full gap-2 md:hidden mb-3", children: [
6155
+ /* @__PURE__ */ jsx14(
5883
6156
  EventListTabs,
5884
6157
  {
5885
6158
  ariaLabel: labels.eventList.tabsAria(title),
@@ -5889,7 +6162,7 @@ var EventList = ({
5889
6162
  overflowBehavior: "select"
5890
6163
  }
5891
6164
  ),
5892
- /* @__PURE__ */ jsx13(
6165
+ /* @__PURE__ */ jsx14(
5893
6166
  Select,
5894
6167
  {
5895
6168
  ariaLabel: labels.eventList.sortByLabel,
@@ -5900,23 +6173,23 @@ var EventList = ({
5900
6173
  contentClassName: "rounded-[12px] py-2 shadow-[0_8px_16px_rgba(0,0,0,0.1)]"
5901
6174
  }
5902
6175
  ),
5903
- shouldRenderSubcategoryFilters ? /* @__PURE__ */ jsx13(
6176
+ shouldRenderSubcategoryFilters ? /* @__PURE__ */ jsx14(
5904
6177
  "button",
5905
6178
  {
5906
6179
  type: "button",
5907
6180
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-[8px] border-2 border-agg-primary bg-agg-secondary text-agg-foreground cursor-pointer",
5908
6181
  "aria-label": labels.eventList.subcategoriesOpenAria,
5909
6182
  onClick: () => setIsSubcategoriesModalOpen(true),
5910
- children: /* @__PURE__ */ jsx13(Icon, { name: "apps", size: "small", color: "currentColor" })
6183
+ children: /* @__PURE__ */ jsx14(Icon, { name: "apps", size: "small", color: "currentColor" })
5911
6184
  }
5912
6185
  ) : null
5913
6186
  ] }),
5914
- /* @__PURE__ */ jsxs10(
6187
+ /* @__PURE__ */ jsxs11(
5915
6188
  "div",
5916
6189
  {
5917
6190
  className: cn("flex w-full gap-6", shouldRenderSubcategoryFilters ? "md:items-start" : ""),
5918
6191
  children: [
5919
- shouldRenderSubcategoryFilters ? /* @__PURE__ */ jsx13("aside", { className: "hidden w-[200px] shrink-0 md:block self-start sticky top-4", children: /* @__PURE__ */ jsx13("div", { className: "agg-sidebar max-h-[calc(100vh-19rem)] overflow-y-auto rounded-[8px] border border-agg-separator bg-agg-secondary p-2", children: /* @__PURE__ */ jsx13(
6192
+ shouldRenderSubcategoryFilters ? /* @__PURE__ */ jsx14("aside", { className: "hidden w-[200px] shrink-0 md:block self-start sticky top-4", children: /* @__PURE__ */ jsx14("div", { className: "agg-sidebar max-h-[calc(100vh-19rem)] overflow-y-auto rounded-[8px] border border-agg-separator bg-agg-secondary p-2", children: /* @__PURE__ */ jsx14(
5920
6193
  CategorySidebar,
5921
6194
  {
5922
6195
  baseCategoryId,
@@ -5929,7 +6202,7 @@ var EventList = ({
5929
6202
  onToggleCategory: handleToggleSubcategory
5930
6203
  }
5931
6204
  ) }) }) : null,
5932
- /* @__PURE__ */ jsxs10(
6205
+ /* @__PURE__ */ jsxs11(
5933
6206
  "div",
5934
6207
  {
5935
6208
  className: cn(
@@ -5940,7 +6213,7 @@ var EventList = ({
5940
6213
  gridClassName
5941
6214
  ),
5942
6215
  children: [
5943
- tileEvents.map((event) => /* @__PURE__ */ jsx13(
6216
+ tileEvents.map((event) => /* @__PURE__ */ jsx14(
5944
6217
  EventListItem,
5945
6218
  {
5946
6219
  event,
@@ -5957,7 +6230,7 @@ var EventList = ({
5957
6230
  },
5958
6231
  event.id
5959
6232
  )),
5960
- shouldRenderPaginationLoadingItems ? Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */ jsx13(
6233
+ shouldRenderPaginationLoadingItems ? Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */ jsx14(
5961
6234
  EventListItem,
5962
6235
  {
5963
6236
  isLoading: true,
@@ -5967,20 +6240,20 @@ var EventList = ({
5967
6240
  },
5968
6241
  `loading-${index}`
5969
6242
  )) : null,
5970
- shouldRenderEmptyState ? /* @__PURE__ */ jsx13("div", { className: "col-span-full w-full", children: /* @__PURE__ */ jsx13(
6243
+ shouldRenderEmptyState ? /* @__PURE__ */ jsx14("div", { className: "col-span-full w-full", children: /* @__PURE__ */ jsx14(
5971
6244
  StateMessage,
5972
6245
  {
5973
6246
  title: labels.eventList.emptyTitle,
5974
6247
  description: labels.eventList.emptyDescription,
5975
- icon: /* @__PURE__ */ jsx13(Icon, { name: "search-empty" })
6248
+ icon: /* @__PURE__ */ jsx14(Icon, { name: "search-empty" })
5976
6249
  }
5977
6250
  ) }) : null,
5978
- isError ? /* @__PURE__ */ jsx13("div", { className: "col-span-full w-full", children: /* @__PURE__ */ jsx13(
6251
+ isError ? /* @__PURE__ */ jsx14("div", { className: "col-span-full w-full", children: /* @__PURE__ */ jsx14(
5979
6252
  StateMessage,
5980
6253
  {
5981
6254
  title: labels.eventList.errorTitle,
5982
6255
  description: labels.eventList.errorDescription,
5983
- icon: /* @__PURE__ */ jsx13(Icon, { name: "warning" })
6256
+ icon: /* @__PURE__ */ jsx14(Icon, { name: "warning" })
5984
6257
  }
5985
6258
  ) }) : null
5986
6259
  ]
@@ -5989,7 +6262,7 @@ var EventList = ({
5989
6262
  ]
5990
6263
  }
5991
6264
  ),
5992
- shouldRenderSubcategoryFilters ? /* @__PURE__ */ jsx13(Modal, { open: isSubcategoriesModalOpen, onOpenChange: setIsSubcategoriesModalOpen, children: /* @__PURE__ */ jsx13(
6265
+ shouldRenderSubcategoryFilters ? /* @__PURE__ */ jsx14(Modal, { open: isSubcategoriesModalOpen, onOpenChange: setIsSubcategoriesModalOpen, children: /* @__PURE__ */ jsx14(
5993
6266
  Modal.Container,
5994
6267
  {
5995
6268
  classNames: {
@@ -5998,20 +6271,20 @@ var EventList = ({
5998
6271
  content: "items-end p-0 pointer-events-none",
5999
6272
  container: "w-full max-w-none border-0 bg-transparent shadow-none"
6000
6273
  },
6001
- children: /* @__PURE__ */ jsxs10("div", { className: "pointer-events-auto w-full rounded-t-[12px] border border-agg-separator bg-agg-secondary", children: [
6002
- /* @__PURE__ */ jsx13("div", { className: "flex justify-center pb-1 pt-3", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("div", { className: "h-1 w-10 rounded-full bg-agg-muted-foreground/30" }) }),
6003
- /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between px-4 pb-2 pt-1", children: [
6004
- /* @__PURE__ */ jsx13(Dialog.Title, { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.eventList.subcategoriesLabel }),
6005
- /* @__PURE__ */ jsx13(
6274
+ children: /* @__PURE__ */ jsxs11("div", { className: "pointer-events-auto w-full rounded-t-[12px] border border-agg-separator bg-agg-secondary", children: [
6275
+ /* @__PURE__ */ jsx14("div", { className: "flex justify-center pb-1 pt-3", "aria-hidden": "true", children: /* @__PURE__ */ jsx14("div", { className: "h-1 w-10 rounded-full bg-agg-muted-foreground/30" }) }),
6276
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-4 pb-2 pt-1", children: [
6277
+ /* @__PURE__ */ jsx14(Dialog.Title, { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.eventList.subcategoriesLabel }),
6278
+ /* @__PURE__ */ jsx14(
6006
6279
  Dialog.Close,
6007
6280
  {
6008
6281
  className: "flex cursor-pointer items-center justify-center rounded-full p-1 text-agg-muted-foreground hover:bg-agg-secondary-hover",
6009
6282
  "aria-label": labels.common.close,
6010
- children: /* @__PURE__ */ jsx13(CloseIcon, { className: "h-5 w-5" })
6283
+ children: /* @__PURE__ */ jsx14(CloseIcon, { className: "h-5 w-5" })
6011
6284
  }
6012
6285
  )
6013
6286
  ] }),
6014
- /* @__PURE__ */ jsx13("div", { className: "flex flex-col gap-1 px-4 pb-4", children: /* @__PURE__ */ jsx13(
6287
+ /* @__PURE__ */ jsx14("div", { className: "flex flex-col gap-1 px-4 pb-4", children: /* @__PURE__ */ jsx14(
6015
6288
  CategorySidebar,
6016
6289
  {
6017
6290
  baseCategoryId,
@@ -6027,7 +6300,7 @@ var EventList = ({
6027
6300
  ] })
6028
6301
  }
6029
6302
  ) }) : null,
6030
- shouldPaginate && hasNextPage ? /* @__PURE__ */ jsx13("div", { ref: loadMoreRef, className: "agg-event-list-sentinel h-px w-full", "aria-hidden": true }) : null
6303
+ shouldPaginate && hasNextPage ? /* @__PURE__ */ jsx14("div", { ref: loadMoreRef, className: "agg-event-list-sentinel h-px w-full", "aria-hidden": true }) : null
6031
6304
  ] });
6032
6305
  };
6033
6306
  EventList.displayName = "EventList";
@@ -6039,6 +6312,7 @@ export {
6039
6312
  collectEligibleVenueOutcomes,
6040
6313
  collectEligibleVenueOutcomeIds,
6041
6314
  mergeVenueOutcomeOrderbooks,
6315
+ SportsLiveScore,
6042
6316
  SettlementSummary,
6043
6317
  resolveEventDetailsSyncKey,
6044
6318
  EventListItemDetails,