@agg-build/ui 2.2.0 → 2.2.3

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 (42) hide show
  1. package/dist/{chunk-5MRFY5ZQ.mjs → chunk-4QGZ3FWI.mjs} +1 -1
  2. package/dist/{chunk-73MO7MYG.mjs → chunk-JOZPXDNZ.mjs} +30 -7
  3. package/dist/{chunk-TR7HUVY7.mjs → chunk-LPIAEKSZ.mjs} +82 -2
  4. package/dist/{chunk-BTRFSEPC.mjs → chunk-QM3WWPCV.mjs} +107 -29
  5. package/dist/{chunk-DTOI4V6P.mjs → chunk-TDLI6F55.mjs} +1155 -954
  6. package/dist/{chunk-MIAAL7BL.mjs → chunk-UTXQUOU3.mjs} +98 -4
  7. package/dist/{chunk-HNLA44SY.mjs → chunk-ZRYHWHTD.mjs} +2 -2
  8. package/dist/events.js +277 -31
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +2003 -1534
  11. package/dist/index.mjs +9 -7
  12. package/dist/modals.js +2 -2
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +1375 -908
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +4 -3
  17. package/dist/primitives.mjs +1 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +114 -6
  21. package/dist/trading.mjs +4 -4
  22. package/dist/types/events/item/event-list-item.types.d.mts +4 -0
  23. package/dist/types/events/item/event-list-item.types.d.ts +4 -0
  24. package/dist/types/events/item/event-list-item.utils.d.mts +1 -1
  25. package/dist/types/events/item/event-list-item.utils.d.ts +1 -1
  26. package/dist/types/events/item-details/event-list-item-details.types.d.mts +0 -5
  27. package/dist/types/events/item-details/event-list-item-details.types.d.ts +0 -5
  28. package/dist/types/events/item-details/event-list-item-details.utils.d.mts +9 -0
  29. package/dist/types/events/item-details/event-list-item-details.utils.d.ts +9 -0
  30. package/dist/types/events/shared/event-trading-state.utils.d.mts +4 -2
  31. package/dist/types/events/shared/event-trading-state.utils.d.ts +4 -2
  32. package/dist/types/pages/event-market/sports-event-market.utils.d.mts +1 -1
  33. package/dist/types/pages/event-market/sports-event-market.utils.d.ts +1 -1
  34. package/dist/types/pages/user-profile/components/claim-activity-breakdown-modal.d.mts +8 -0
  35. package/dist/types/pages/user-profile/components/claim-activity-breakdown-modal.d.ts +8 -0
  36. package/dist/types/pages/user-profile/index.d.mts +1 -1
  37. package/dist/types/pages/user-profile/index.d.ts +1 -1
  38. package/dist/types/pages/user-profile/user-profile.types.d.mts +14 -0
  39. package/dist/types/pages/user-profile/user-profile.types.d.ts +14 -0
  40. package/dist/types/shared/utils.d.mts +16 -0
  41. package/dist/types/shared/utils.d.ts +16 -0
  42. package/package.json +3 -3
@@ -10,7 +10,7 @@ import {
10
10
  isErrorWithStatus,
11
11
  useEventListTabs,
12
12
  useEventListTabsHeaderOverflow
13
- } from "./chunk-BTRFSEPC.mjs";
13
+ } from "./chunk-QM3WWPCV.mjs";
14
14
  import {
15
15
  DEPOSIT_MODAL_OPEN_EVENT,
16
16
  PlaceOrder,
@@ -18,10 +18,10 @@ import {
18
18
  WITHDRAW_MODAL_OPEN_EVENT,
19
19
  useClaimWinnings,
20
20
  useResolvedMarketClaim
21
- } from "./chunk-73MO7MYG.mjs";
21
+ } from "./chunk-JOZPXDNZ.mjs";
22
22
  import {
23
23
  getDisplayOutcomePrice
24
- } from "./chunk-TR7HUVY7.mjs";
24
+ } from "./chunk-LPIAEKSZ.mjs";
25
25
  import {
26
26
  AggErrorBoundary,
27
27
  Button,
@@ -48,10 +48,11 @@ import {
48
48
  __spreadValues,
49
49
  cn,
50
50
  filterOpenEvents,
51
+ normalizeVenueMarketCluster,
51
52
  resolveTabVenus,
52
53
  shortenAddress,
53
54
  sortCategoriesForNavigation
54
- } from "./chunk-MIAAL7BL.mjs";
55
+ } from "./chunk-UTXQUOU3.mjs";
55
56
 
56
57
  // src/pages/home/index.tsx
57
58
  import {
@@ -61,7 +62,8 @@ import {
61
62
  useEventListState,
62
63
  useLabels as useLabels4,
63
64
  useSdkUiConfig as useSdkUiConfig4,
64
- useSearch
65
+ useSearch,
66
+ useVenueMarketMidpoints
65
67
  } from "@agg-build/hooks";
66
68
  import { VENUES } from "@agg-build/sdk";
67
69
  import { useCallback as useCallback4, useEffect as useEffect8, useMemo as useMemo5, useRef as useRef7, useState as useState9 } from "react";
@@ -381,258 +383,6 @@ import {
381
383
  } from "@agg-build/hooks";
382
384
  import { useEffect as useEffect4, useMemo as useMemo2, useRef as useRef3, useState as useState4 } from "react";
383
385
 
384
- // src/pages/event-market/sports-market-card.tsx
385
- import {
386
- MarketStatus,
387
- resolveMarketTradingState,
388
- useEventTradingContext,
389
- useLabels as useLabels2,
390
- useSdkUiConfig
391
- } from "@agg-build/hooks";
392
- import { useEffect as useEffect3, useMemo, useRef as useRef2, useState as useState3 } from "react";
393
-
394
- // src/pages/event-market/sports-line-rail.tsx
395
- import * as React from "react";
396
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
397
- function VenueRow({ venues, active }) {
398
- if (!venues || venues.length === 0) return /* @__PURE__ */ jsx2("span", { className: "h-4" });
399
- const shown = venues.length > 3 ? venues.slice(0, 2) : venues;
400
- const extra = venues.length - shown.length;
401
- return /* @__PURE__ */ jsxs2(
402
- "span",
403
- {
404
- className: cn(
405
- "flex h-4 items-center justify-center gap-1",
406
- !active && "text-agg-muted-foreground"
407
- ),
408
- children: [
409
- shown.map((venue, index) => /* @__PURE__ */ jsx2(
410
- VenueLogo,
411
- {
412
- venue,
413
- isMonochromatic: !active,
414
- size: "small",
415
- className: "size-3! shrink-0"
416
- },
417
- `${venue}-${index}`
418
- )),
419
- extra > 0 && /* @__PURE__ */ jsxs2("span", { className: "text-[10px] font-agg-bold uppercase leading-[14px] text-agg-muted-foreground", children: [
420
- "+",
421
- extra
422
- ] })
423
- ]
424
- }
425
- );
426
- }
427
- function SportsLineRail({
428
- stops,
429
- selectedIndex,
430
- onSelect,
431
- ariaLabel,
432
- previousAriaLabel,
433
- nextAriaLabel,
434
- className
435
- }) {
436
- const scrollRef = React.useRef(null);
437
- const itemRefs = React.useRef([]);
438
- const didInit = React.useRef(false);
439
- const programmatic = React.useRef(false);
440
- const progTimer = React.useRef(void 0);
441
- const skipCenterOnPropSync = React.useRef(false);
442
- const pendingScrollIndex = React.useRef(null);
443
- const scrollSettleTimer = React.useRef(void 0);
444
- const stopCount = stops.length;
445
- const [pad, setPad] = React.useState({ left: 0, right: 0 });
446
- const [mask, setMask] = React.useState({ left: false, right: false });
447
- const updateMask = React.useCallback(() => {
448
- const c = scrollRef.current;
449
- if (!c || !c.clientWidth) return;
450
- setMask({
451
- left: c.scrollLeft > 1,
452
- right: c.scrollLeft + c.clientWidth < c.scrollWidth - 1
453
- });
454
- }, []);
455
- const resolveNearestIndexToViewportCenter = React.useCallback(() => {
456
- const container = scrollRef.current;
457
- if (!container || !container.clientWidth) return null;
458
- const viewportCenter = container.scrollLeft + container.clientWidth / 2;
459
- let nearestIndex = null;
460
- let nearestDistance = Number.POSITIVE_INFINITY;
461
- itemRefs.current.forEach((item, index) => {
462
- if (!item) return;
463
- const itemCenter = item.offsetLeft + item.offsetWidth / 2;
464
- const distance = Math.abs(itemCenter - viewportCenter);
465
- if (distance < nearestDistance) {
466
- nearestDistance = distance;
467
- nearestIndex = index;
468
- }
469
- });
470
- return nearestIndex;
471
- }, []);
472
- React.useLayoutEffect(() => {
473
- const c = scrollRef.current;
474
- if (!c) return;
475
- const measure = () => {
476
- var _a, _b, _c, _d;
477
- const w = c.clientWidth;
478
- if (!w) return;
479
- const firstW = (_b = (_a = itemRefs.current[0]) == null ? void 0 : _a.offsetWidth) != null ? _b : 0;
480
- const lastW = (_d = (_c = itemRefs.current[stopCount - 1]) == null ? void 0 : _c.offsetWidth) != null ? _d : 0;
481
- setPad({
482
- left: Math.max(0, w / 2 - firstW / 2),
483
- right: Math.max(0, w / 2 - lastW / 2)
484
- });
485
- updateMask();
486
- };
487
- const onScroll = () => {
488
- if (!programmatic.current) {
489
- const nearestIndex = resolveNearestIndexToViewportCenter();
490
- if (nearestIndex != null && nearestIndex !== selectedIndex) {
491
- pendingScrollIndex.current = nearestIndex;
492
- clearTimeout(scrollSettleTimer.current);
493
- scrollSettleTimer.current = setTimeout(() => {
494
- const nextIndex = pendingScrollIndex.current;
495
- if (nextIndex == null || nextIndex === selectedIndex) return;
496
- skipCenterOnPropSync.current = true;
497
- onSelect(nextIndex);
498
- }, 120);
499
- }
500
- }
501
- updateMask();
502
- };
503
- measure();
504
- const ro = new ResizeObserver(measure);
505
- ro.observe(c);
506
- c.addEventListener("scroll", onScroll, { passive: true });
507
- return () => {
508
- ro.disconnect();
509
- c.removeEventListener("scroll", onScroll);
510
- clearTimeout(scrollSettleTimer.current);
511
- };
512
- }, [onSelect, resolveNearestIndexToViewportCenter, selectedIndex, stopCount, updateMask]);
513
- React.useEffect(() => {
514
- pendingScrollIndex.current = selectedIndex;
515
- }, [selectedIndex]);
516
- React.useEffect(() => {
517
- const c = scrollRef.current;
518
- const el = itemRefs.current[selectedIndex];
519
- if (!c || !el || !c.clientWidth) return;
520
- if (skipCenterOnPropSync.current) {
521
- skipCenterOnPropSync.current = false;
522
- updateMask();
523
- return;
524
- }
525
- const max = c.scrollWidth - c.clientWidth;
526
- const target = el.offsetLeft - c.clientWidth / 2 + el.clientWidth / 2;
527
- programmatic.current = true;
528
- c.scrollTo({
529
- left: Math.max(0, Math.min(max, target)),
530
- behavior: didInit.current ? "smooth" : "auto"
531
- });
532
- if (pad.left > 0 || pad.right > 0) didInit.current = true;
533
- clearTimeout(progTimer.current);
534
- progTimer.current = setTimeout(() => {
535
- programmatic.current = false;
536
- }, 500);
537
- updateMask();
538
- }, [selectedIndex, stopCount, pad, updateMask]);
539
- const select = (index) => {
540
- const next = Math.min(stops.length - 1, Math.max(0, index));
541
- if (next !== selectedIndex) onSelect(next);
542
- };
543
- const step = (delta) => select(selectedIndex + delta);
544
- if (stopCount === 0) return null;
545
- return /* @__PURE__ */ jsxs2(
546
- "div",
547
- {
548
- className: cn("flex items-center justify-center gap-3 px-3 py-3 sm:gap-4 sm:px-5", className),
549
- "aria-label": ariaLabel,
550
- children: [
551
- /* @__PURE__ */ jsx2(
552
- "button",
553
- {
554
- type: "button",
555
- onClick: () => step(-1),
556
- disabled: selectedIndex === 0,
557
- "aria-label": previousAriaLabel != null ? previousAriaLabel : "Previous line",
558
- className: "flex size-5! shrink-0 cursor-pointer items-center justify-center text-agg-muted-foreground transition-colors hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-not-allowed disabled:opacity-30",
559
- children: /* @__PURE__ */ jsx2(Icon, { name: "chevron-left", className: "size-4" })
560
- }
561
- ),
562
- /* @__PURE__ */ jsxs2("div", { className: "relative min-w-0 flex-1", children: [
563
- /* @__PURE__ */ jsx2(
564
- "div",
565
- {
566
- ref: scrollRef,
567
- style: { paddingLeft: pad.left, paddingRight: pad.right },
568
- className: "flex items-end gap-1 overflow-x-hidden py-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
569
- children: stops.map((stop, index) => {
570
- const active = index === selectedIndex;
571
- return /* @__PURE__ */ jsxs2(
572
- "button",
573
- {
574
- type: "button",
575
- ref: (el) => {
576
- itemRefs.current[index] = el;
577
- },
578
- onClick: () => select(index),
579
- disabled: stop.disabled,
580
- "aria-pressed": active,
581
- className: "flex shrink-0 cursor-pointer flex-col items-center gap-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40",
582
- children: [
583
- /* @__PURE__ */ jsx2(
584
- "span",
585
- {
586
- className: cn(
587
- "flex h-8 min-w-[60px] items-center justify-center rounded-agg-full border px-3 text-agg-sm leading-agg-5 tabular-nums transition-colors",
588
- active ? "border-agg-primary bg-agg-secondary font-agg-bold text-agg-foreground" : "border-transparent bg-agg-secondary text-agg-muted-foreground hover:bg-agg-secondary-hover hover:text-agg-foreground"
589
- ),
590
- children: stop.value
591
- }
592
- ),
593
- /* @__PURE__ */ jsx2(VenueRow, { venues: stop.venues, active })
594
- ]
595
- },
596
- index
597
- );
598
- })
599
- }
600
- ),
601
- /* @__PURE__ */ jsx2(
602
- "span",
603
- {
604
- className: cn(
605
- "pointer-events-none absolute inset-y-0 left-0 w-8 bg-gradient-to-r from-agg-secondary to-transparent transition-opacity duration-200",
606
- mask.left ? "opacity-100" : "opacity-0"
607
- )
608
- }
609
- ),
610
- /* @__PURE__ */ jsx2(
611
- "span",
612
- {
613
- className: cn(
614
- "pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l from-agg-secondary to-transparent transition-opacity duration-200",
615
- mask.right ? "opacity-100" : "opacity-0"
616
- )
617
- }
618
- )
619
- ] }),
620
- /* @__PURE__ */ jsx2(
621
- "button",
622
- {
623
- type: "button",
624
- onClick: () => step(1),
625
- disabled: selectedIndex === stopCount - 1,
626
- "aria-label": nextAriaLabel != null ? nextAriaLabel : "Next line",
627
- className: "flex size-5! shrink-0 cursor-pointer items-center justify-center text-agg-muted-foreground transition-colors hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-not-allowed disabled:opacity-30",
628
- children: /* @__PURE__ */ jsx2(Icon, { name: "chevron-right", className: "size-4" })
629
- }
630
- )
631
- ]
632
- }
633
- );
634
- }
635
-
636
386
  // src/pages/event-market/sports-event-market.utils.ts
637
387
  var SPORTS_MARKET_TYPE_KEYS = [
638
388
  "moneyline",
@@ -689,6 +439,10 @@ var SPORTS_LEGACY_PROP_CATEGORY_KEY_SET = /* @__PURE__ */ new Set([
689
439
  "assists",
690
440
  "shots"
691
441
  ]);
442
+ var SPORTS_CATEGORY_OVERRIDE_TAB_KEY_SET = /* @__PURE__ */ new Set([
443
+ "exact_score",
444
+ ...SPORTS_LEGACY_PROP_CATEGORY_KEY_SET
445
+ ]);
692
446
  var SPORTS_MARKET_GROUP_TO_TAB = {
693
447
  game_lines: "game_lines",
694
448
  spreads: "game_lines",
@@ -776,9 +530,15 @@ var SPORTS_MARKET_TYPE_ORDER = [
776
530
  ];
777
531
  var YES_NO_LABELS = /* @__PURE__ */ new Set(["yes", "no"]);
778
532
  var LINE_MARKET_TYPES = /* @__PURE__ */ new Set(["spread", "total"]);
533
+ var PLAYER_PROP_COUNT_PATTERN = /\+\s|\bo\/u\b|\bover\/under\b/i;
534
+ var REG_TIME_TITLE_PATTERN = /^reg(?:ular)?\s*time\s*:/i;
779
535
  var toTrimmedString = (value) => {
780
536
  return typeof value === "string" ? value.trim() : "";
781
537
  };
538
+ var resolveSportsMarketAggKey = (market) => {
539
+ const typedMarket = market;
540
+ return toTrimmedString(typedMarket.aggKey);
541
+ };
782
542
  var sanitizeFamilyValue = (value) => {
783
543
  return value.toLowerCase().replace(/[-+]?\d+(?:\.\d+)?/g, "").replace(/[¢$]/g, "").replace(/\s+/g, " ").replace(/[|:()[\]{}]/g, "").trim();
784
544
  };
@@ -838,15 +598,36 @@ var normalizeSportsMarketGroup = (value) => {
838
598
  if (!resolvedValue) return null;
839
599
  return SPORTS_MARKET_GROUP_KEY_SET.has(resolvedValue) ? resolvedValue : "other";
840
600
  };
841
- var resolveMarketSectionTabKey = (market) => {
842
- const category = normalizeSportsMarketCategory(market.marketCategory);
843
- if (category && SPORTS_LEGACY_PROP_CATEGORY_KEY_SET.has(category)) {
601
+ var resolveFallbackSportsMarketCategory = (market) => {
602
+ const marketSubtype = toTrimmedString(market.marketSubtype).toLowerCase();
603
+ const question = toTrimmedString(market.question).toLowerCase();
604
+ if (marketSubtype.includes("exact_score") || marketSubtype.includes("correct_score") || question.includes("exact score") || question.includes("correct score")) {
605
+ return "exact_score";
606
+ }
607
+ if (marketSubtype.includes("corner") || question.includes("corner")) {
608
+ return "corners";
609
+ }
610
+ if (marketSubtype.includes("shot")) return "shots";
611
+ if (marketSubtype.includes("assist")) return "assists";
612
+ if (marketSubtype.includes("goal")) return "goals";
613
+ if (!PLAYER_PROP_COUNT_PATTERN.test(question) || !question.includes(":") || question.includes(" vs ") || question.includes(" vs. ")) {
614
+ return null;
615
+ }
616
+ if (question.includes("shot")) return "shots";
617
+ if (question.includes("assist")) return "assists";
618
+ if (question.includes("goal")) return "goals";
619
+ return null;
620
+ };
621
+ var resolveMarketSectionTabKey = (market) => {
622
+ const normalizedCategory = normalizeSportsMarketCategory(market.marketCategory);
623
+ const fallbackCategory = !normalizedCategory || normalizedCategory === "other" ? resolveFallbackSportsMarketCategory(market) : null;
624
+ const category = fallbackCategory != null ? fallbackCategory : normalizedCategory;
625
+ if (category && SPORTS_CATEGORY_OVERRIDE_TAB_KEY_SET.has(category)) {
844
626
  return category;
845
627
  }
846
628
  const group = normalizeSportsMarketGroup(market.marketGroup);
847
629
  if (group) return SPORTS_MARKET_GROUP_TO_TAB[group];
848
630
  if (category === "game_lines") return "game_lines";
849
- if (category === "exact_score") return "exact_score";
850
631
  if (category === "other") return "other";
851
632
  return null;
852
633
  };
@@ -870,13 +651,27 @@ var resolveSportsSectionMarkets = ({
870
651
  sectionMarkets
871
652
  }) => {
872
653
  const effectiveSectionMarkets = sectionMarkets.length > 0 ? sectionMarkets : eventMarkets.filter((market) => resolveMarketSectionTabKey(market) === tabKey);
873
- if (tabKey !== "game_lines") return effectiveSectionMarkets;
874
- const eventMoneylineMarkets = eventMarkets.filter(
875
- (market) => normalizeSportsMarketType(market.sportsMarketType) === "moneyline" && resolveMarketSectionTabKey(market) === "game_lines"
654
+ const filteredSectionMarkets = effectiveSectionMarkets.filter(
655
+ (market) => resolveMarketSectionTabKey(market) === tabKey
876
656
  );
877
- if (eventMoneylineMarkets.length === 0) return effectiveSectionMarkets;
878
- const lineSectionMarkets = effectiveSectionMarkets.filter(
879
- (market) => normalizeSportsMarketType(market.sportsMarketType) !== "moneyline"
657
+ if (tabKey !== "game_lines") return filteredSectionMarkets;
658
+ const eventMoneylineMarkets = (() => {
659
+ const dedupedMarkets = [];
660
+ const seenMoneylineKeys = /* @__PURE__ */ new Set();
661
+ for (const market of eventMarkets) {
662
+ if (normalizeSportsMarketType(market.sportsMarketType) !== "moneyline" || resolveMarketSectionTabKey(market) !== "game_lines") {
663
+ continue;
664
+ }
665
+ const moneylineKey = resolveSportsMarketAggKey(market) || market.id;
666
+ if (seenMoneylineKeys.has(moneylineKey)) continue;
667
+ seenMoneylineKeys.add(moneylineKey);
668
+ dedupedMarkets.push(market);
669
+ }
670
+ return dedupedMarkets;
671
+ })();
672
+ if (eventMoneylineMarkets.length === 0) return filteredSectionMarkets;
673
+ const lineSectionMarkets = filteredSectionMarkets.filter(
674
+ (market) => normalizeSportsMarketType(market.sportsMarketType) !== "moneyline" && resolveMarketSectionTabKey(market) === "game_lines"
880
675
  );
881
676
  return [...eventMoneylineMarkets, ...lineSectionMarkets];
882
677
  };
@@ -904,7 +699,15 @@ var isBinarySportsMoneylineMarket = (market) => {
904
699
  );
905
700
  const marketSubtype = toTrimmedString(market.marketSubtype).toLowerCase();
906
701
  const marketGroup = normalizeSportsMarketGroup(market.marketGroup);
907
- return marketSubtype === "moneyline" && marketGroup === "game_lines" && normalizeSportsPeriod(market.period) === "full" && normalizedOutcomeLabels.length === 2 && normalizedOutcomeLabels.every((label) => YES_NO_LABELS.has(label));
702
+ const sportsMarketType = normalizeSportsMarketType(market.sportsMarketType);
703
+ const question = toTrimmedString(market.question);
704
+ const aggKey = resolveSportsMarketAggKey(market);
705
+ return sportsMarketType === "moneyline" && marketGroup === "game_lines" && normalizeSportsPeriod(market.period) === "full" && normalizedOutcomeLabels.length === 2 && normalizedOutcomeLabels.every((label) => YES_NO_LABELS.has(label)) && (marketSubtype === "moneyline" || REG_TIME_TITLE_PATTERN.test(question) || aggKey.includes("_ml_"));
706
+ };
707
+ var AGGKEY_LINE_TOKEN_PATTERN = /_\d+p\d+/g;
708
+ var resolveSportsLineFamilyKey = (market) => {
709
+ const aggKey = resolveSportsMarketAggKey(market);
710
+ return aggKey ? aggKey.replace(AGGKEY_LINE_TOKEN_PATTERN, "") : "";
908
711
  };
909
712
  var resolveDisplayGroupFamilyKey = (market) => {
910
713
  var _a, _b, _c;
@@ -918,11 +721,12 @@ var resolveDisplayGroupFamilyKey = (market) => {
918
721
  if (isBinarySportsMoneylineMarket(market)) {
919
722
  return `${period}|moneyline|${marketCategory}`;
920
723
  }
724
+ const lineFamily = resolveSportsLineFamilyKey(market);
921
725
  if (sportsMarketType === "spread") {
922
- return `${period}|spread|${marketCategory}`;
726
+ return lineFamily ? `${period}|spread|${lineFamily}` : `${period}|spread|${marketCategory}`;
923
727
  }
924
728
  if (market.lineValue != null || LINE_MARKET_TYPES.has(sportsMarketType)) {
925
- return `${period}|${sportsMarketType}|${marketCategory}|${normalizedQuestion}|${outcomeKey}`;
729
+ return lineFamily ? `${period}|${sportsMarketType}|${lineFamily}` : `${period}|${sportsMarketType}|${marketCategory}|${normalizedQuestion}|${outcomeKey}`;
926
730
  }
927
731
  return `${period}|${sportsMarketType}|${marketCategory}|${toTrimmedString(market.question)}|${outcomeKey}|${market.id}`;
928
732
  };
@@ -1097,103 +901,346 @@ var aggregateSportsLineStops = (markets) => {
1097
901
  venues.add(venue);
1098
902
  }
1099
903
  }
1100
- return {
1101
- value,
1102
- representative,
1103
- venues: Array.from(venues),
1104
- volume: resolveTotalGroupVolume(lineMarkets),
1105
- lineValue: (_b = representative.lineValue) != null ? _b : Number.NEGATIVE_INFINITY
1106
- };
1107
- }).sort(
1108
- (left, right) => left.lineValue !== right.lineValue ? left.lineValue - right.lineValue : left.value.localeCompare(right.value)
1109
- );
1110
- };
1111
- var buildSportsSlideFromGroup = (group) => {
1112
- const lineStops = group.hasLineVariants ? aggregateSportsLineStops(group.markets) : [];
1113
- const hasLadder = lineStops.length > 1;
1114
- const stops = hasLadder ? lineStops.map((lineStop) => ({
1115
- value: lineStop.value,
1116
- venues: lineStop.venues,
1117
- market: lineStop.representative
1118
- })) : [];
1119
- const defaultStopIndex = hasLadder ? lineStops.reduce(
1120
- (bestIndex, lineStop, index) => lineStop.volume > lineStops[bestIndex].volume ? index : bestIndex,
1121
- 0
1122
- ) : 0;
1123
- return {
1124
- id: group.id,
1125
- kind: resolveSlideKind(group),
1126
- group,
1127
- hasLadder,
1128
- stops,
1129
- defaultStopIndex
1130
- };
1131
- };
1132
- var formatSportsPeriodGrammarLabel = (period) => {
1133
- const grammarMatch = SPORTS_PERIOD_GRAMMAR_PATTERN.exec(period);
1134
- if (!grammarMatch) return null;
1135
- if (grammarMatch[1]) {
1136
- const family = grammarMatch[1].charAt(0).toUpperCase() + grammarMatch[1].slice(1);
1137
- return `${family} ${Number(grammarMatch[2])}`;
1138
- }
1139
- return `First ${Number(grammarMatch[3])} Innings`;
1140
- };
1141
- var resolveSportsCategoryTokens = (event) => {
1142
- return new Set(
1143
- event.categories.flatMap((entry) => {
1144
- const categoryName = toTrimmedString(entry.category.name).toLowerCase();
1145
- const categoryDisplayName = toTrimmedString(entry.category.displayName).toLowerCase();
1146
- return [categoryName, categoryDisplayName].filter(Boolean);
1147
- })
1148
- );
1149
- };
1150
- var isNonStandardSportsLikeEvent = (event) => {
1151
- const categoryTokens = resolveSportsCategoryTokens(event);
1152
- if ([...categoryTokens].some((token) => ESPORTS_CATEGORY_TOKENS.has(token))) {
1153
- return true;
1154
- }
1155
- if (ESPORTS_TITLE_PATTERN.test(event.title) || SERIES_SCOPE_PATTERN.test(event.title)) {
1156
- return true;
1157
- }
1158
- return event.venueMarkets.some((market) => {
1159
- const question = toTrimmedString(market.question);
1160
- return ESPORTS_TITLE_PATTERN.test(question) || SERIES_SCOPE_PATTERN.test(question);
1161
- });
1162
- };
1163
- var resolveVisibleSportsSectionTabDefinitions = (event) => {
1164
- const presentTabKeys = /* @__PURE__ */ new Set();
1165
- for (const market of event.venueMarkets) {
1166
- const tabKey = resolveMarketSectionTabKey(market);
1167
- if (tabKey) presentTabKeys.add(tabKey);
1168
- }
1169
- let definitions = SPORTS_SECTION_TAB_DEFINITIONS.filter(
1170
- (definition) => presentTabKeys.has(definition.key)
904
+ return {
905
+ value,
906
+ representative,
907
+ venues: Array.from(venues),
908
+ volume: resolveTotalGroupVolume(lineMarkets),
909
+ lineValue: (_b = representative.lineValue) != null ? _b : Number.NEGATIVE_INFINITY
910
+ };
911
+ }).sort(
912
+ (left, right) => left.lineValue !== right.lineValue ? left.lineValue - right.lineValue : left.value.localeCompare(right.value)
913
+ );
914
+ };
915
+ var buildSportsSlideFromGroup = (group) => {
916
+ const lineStops = group.hasLineVariants ? aggregateSportsLineStops(group.markets) : [];
917
+ const hasLadder = lineStops.length > 1;
918
+ const stops = hasLadder ? lineStops.map((lineStop) => ({
919
+ value: lineStop.value,
920
+ venues: lineStop.venues,
921
+ market: lineStop.representative
922
+ })) : [];
923
+ const defaultStopIndex = hasLadder ? lineStops.reduce(
924
+ (bestIndex, lineStop, index) => lineStop.volume > lineStops[bestIndex].volume ? index : bestIndex,
925
+ 0
926
+ ) : 0;
927
+ return {
928
+ id: group.id,
929
+ kind: resolveSlideKind(group),
930
+ group,
931
+ hasLadder,
932
+ stops,
933
+ defaultStopIndex
934
+ };
935
+ };
936
+ var resolveSportsCategoryTokens = (event) => {
937
+ return new Set(
938
+ event.categories.flatMap((entry) => {
939
+ const categoryName = toTrimmedString(entry.category.name).toLowerCase();
940
+ const categoryDisplayName = toTrimmedString(entry.category.displayName).toLowerCase();
941
+ return [categoryName, categoryDisplayName].filter(Boolean);
942
+ })
943
+ );
944
+ };
945
+ var isNonStandardSportsLikeEvent = (event) => {
946
+ const categoryTokens = resolveSportsCategoryTokens(event);
947
+ if ([...categoryTokens].some((token) => ESPORTS_CATEGORY_TOKENS.has(token))) {
948
+ return true;
949
+ }
950
+ if (ESPORTS_TITLE_PATTERN.test(event.title) || SERIES_SCOPE_PATTERN.test(event.title)) {
951
+ return true;
952
+ }
953
+ return event.venueMarkets.some((market) => {
954
+ const question = toTrimmedString(market.question);
955
+ return ESPORTS_TITLE_PATTERN.test(question) || SERIES_SCOPE_PATTERN.test(question);
956
+ });
957
+ };
958
+ var resolveVisibleSportsSectionTabDefinitions = (event) => {
959
+ const presentTabKeys = /* @__PURE__ */ new Set();
960
+ for (const market of event.venueMarkets) {
961
+ const tabKey = resolveMarketSectionTabKey(market);
962
+ if (tabKey) presentTabKeys.add(tabKey);
963
+ }
964
+ let definitions = SPORTS_SECTION_TAB_DEFINITIONS.filter(
965
+ (definition) => presentTabKeys.has(definition.key)
966
+ );
967
+ if (isNonStandardSportsLikeEvent(event)) {
968
+ definitions = definitions.filter(
969
+ (definition) => SPORTS_NON_STANDARD_VISIBLE_TAB_KEY_SET.has(definition.key)
970
+ );
971
+ }
972
+ return definitions;
973
+ };
974
+ var mergeSportsSectionMarketsIntoEvent = ({
975
+ event,
976
+ sectionMarketsByKey
977
+ }) => {
978
+ var _a;
979
+ const orderedVenueMarkets = [...event.venueMarkets];
980
+ const seenMarketIds = new Set(orderedVenueMarkets.map((market) => market.id));
981
+ for (const sectionKey of SPORTS_SECTION_TAB_DEFINITIONS.map((definition) => definition.key)) {
982
+ for (const market of (_a = sectionMarketsByKey[sectionKey]) != null ? _a : []) {
983
+ if (seenMarketIds.has(market.id)) continue;
984
+ seenMarketIds.add(market.id);
985
+ orderedVenueMarkets.push(market);
986
+ }
987
+ }
988
+ return __spreadProps(__spreadValues({}, event), {
989
+ venueMarkets: orderedVenueMarkets
990
+ });
991
+ };
992
+
993
+ // src/pages/event-market/sports-market-card.tsx
994
+ import {
995
+ MarketStatus,
996
+ resolveMarketTradingState,
997
+ useEventTradingContext,
998
+ useLabels as useLabels2,
999
+ useSdkUiConfig
1000
+ } from "@agg-build/hooks";
1001
+ import { useEffect as useEffect3, useMemo, useRef as useRef2, useState as useState3 } from "react";
1002
+
1003
+ // src/pages/event-market/sports-line-rail.tsx
1004
+ import * as React from "react";
1005
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1006
+ function VenueRow({ venues, active }) {
1007
+ if (!venues || venues.length === 0) return /* @__PURE__ */ jsx2("span", { className: "h-4" });
1008
+ const shown = venues.length > 3 ? venues.slice(0, 2) : venues;
1009
+ const extra = venues.length - shown.length;
1010
+ return /* @__PURE__ */ jsxs2(
1011
+ "span",
1012
+ {
1013
+ className: cn(
1014
+ "flex h-4 items-center justify-center gap-1",
1015
+ !active && "text-agg-muted-foreground"
1016
+ ),
1017
+ children: [
1018
+ shown.map((venue, index) => /* @__PURE__ */ jsx2(
1019
+ VenueLogo,
1020
+ {
1021
+ venue,
1022
+ isMonochromatic: !active,
1023
+ size: "small",
1024
+ className: "size-3! shrink-0"
1025
+ },
1026
+ `${venue}-${index}`
1027
+ )),
1028
+ extra > 0 && /* @__PURE__ */ jsxs2("span", { className: "text-[10px] font-agg-bold uppercase leading-[14px] text-agg-muted-foreground", children: [
1029
+ "+",
1030
+ extra
1031
+ ] })
1032
+ ]
1033
+ }
1034
+ );
1035
+ }
1036
+ function SportsLineRail({
1037
+ stops,
1038
+ selectedIndex,
1039
+ onSelect,
1040
+ ariaLabel,
1041
+ previousAriaLabel,
1042
+ nextAriaLabel,
1043
+ className
1044
+ }) {
1045
+ const scrollRef = React.useRef(null);
1046
+ const itemRefs = React.useRef([]);
1047
+ const didInit = React.useRef(false);
1048
+ const programmatic = React.useRef(false);
1049
+ const progTimer = React.useRef(void 0);
1050
+ const skipCenterOnPropSync = React.useRef(false);
1051
+ const pendingScrollIndex = React.useRef(null);
1052
+ const scrollSettleTimer = React.useRef(void 0);
1053
+ const stopCount = stops.length;
1054
+ const [pad, setPad] = React.useState({ left: 0, right: 0 });
1055
+ const [mask, setMask] = React.useState({ left: false, right: false });
1056
+ const updateMask = React.useCallback(() => {
1057
+ const c = scrollRef.current;
1058
+ if (!c || !c.clientWidth) return;
1059
+ setMask({
1060
+ left: c.scrollLeft > 1,
1061
+ right: c.scrollLeft + c.clientWidth < c.scrollWidth - 1
1062
+ });
1063
+ }, []);
1064
+ const resolveNearestIndexToViewportCenter = React.useCallback(() => {
1065
+ const container = scrollRef.current;
1066
+ if (!container || !container.clientWidth) return null;
1067
+ const viewportCenter = container.scrollLeft + container.clientWidth / 2;
1068
+ let nearestIndex = null;
1069
+ let nearestDistance = Number.POSITIVE_INFINITY;
1070
+ itemRefs.current.forEach((item, index) => {
1071
+ if (!item) return;
1072
+ const itemCenter = item.offsetLeft + item.offsetWidth / 2;
1073
+ const distance = Math.abs(itemCenter - viewportCenter);
1074
+ if (distance < nearestDistance) {
1075
+ nearestDistance = distance;
1076
+ nearestIndex = index;
1077
+ }
1078
+ });
1079
+ return nearestIndex;
1080
+ }, []);
1081
+ React.useLayoutEffect(() => {
1082
+ const c = scrollRef.current;
1083
+ if (!c) return;
1084
+ const measure = () => {
1085
+ var _a, _b, _c, _d;
1086
+ const w = c.clientWidth;
1087
+ if (!w) return;
1088
+ const firstW = (_b = (_a = itemRefs.current[0]) == null ? void 0 : _a.offsetWidth) != null ? _b : 0;
1089
+ const lastW = (_d = (_c = itemRefs.current[stopCount - 1]) == null ? void 0 : _c.offsetWidth) != null ? _d : 0;
1090
+ setPad({
1091
+ left: Math.max(0, w / 2 - firstW / 2),
1092
+ right: Math.max(0, w / 2 - lastW / 2)
1093
+ });
1094
+ updateMask();
1095
+ };
1096
+ const onScroll = () => {
1097
+ if (!programmatic.current) {
1098
+ const nearestIndex = resolveNearestIndexToViewportCenter();
1099
+ if (nearestIndex != null && nearestIndex !== selectedIndex) {
1100
+ pendingScrollIndex.current = nearestIndex;
1101
+ clearTimeout(scrollSettleTimer.current);
1102
+ scrollSettleTimer.current = setTimeout(() => {
1103
+ const nextIndex = pendingScrollIndex.current;
1104
+ if (nextIndex == null || nextIndex === selectedIndex) return;
1105
+ skipCenterOnPropSync.current = true;
1106
+ onSelect(nextIndex);
1107
+ }, 120);
1108
+ }
1109
+ }
1110
+ updateMask();
1111
+ };
1112
+ measure();
1113
+ const ro = new ResizeObserver(measure);
1114
+ ro.observe(c);
1115
+ c.addEventListener("scroll", onScroll, { passive: true });
1116
+ return () => {
1117
+ ro.disconnect();
1118
+ c.removeEventListener("scroll", onScroll);
1119
+ clearTimeout(scrollSettleTimer.current);
1120
+ };
1121
+ }, [onSelect, resolveNearestIndexToViewportCenter, selectedIndex, stopCount, updateMask]);
1122
+ React.useEffect(() => {
1123
+ pendingScrollIndex.current = selectedIndex;
1124
+ }, [selectedIndex]);
1125
+ React.useEffect(() => {
1126
+ const c = scrollRef.current;
1127
+ const el = itemRefs.current[selectedIndex];
1128
+ if (!c || !el || !c.clientWidth) return;
1129
+ if (skipCenterOnPropSync.current) {
1130
+ skipCenterOnPropSync.current = false;
1131
+ updateMask();
1132
+ return;
1133
+ }
1134
+ const max = c.scrollWidth - c.clientWidth;
1135
+ const target = el.offsetLeft - c.clientWidth / 2 + el.clientWidth / 2;
1136
+ programmatic.current = true;
1137
+ c.scrollTo({
1138
+ left: Math.max(0, Math.min(max, target)),
1139
+ behavior: didInit.current ? "smooth" : "auto"
1140
+ });
1141
+ if (pad.left > 0 || pad.right > 0) didInit.current = true;
1142
+ clearTimeout(progTimer.current);
1143
+ progTimer.current = setTimeout(() => {
1144
+ programmatic.current = false;
1145
+ }, 500);
1146
+ updateMask();
1147
+ }, [selectedIndex, stopCount, pad, updateMask]);
1148
+ const select = (index) => {
1149
+ const next = Math.min(stops.length - 1, Math.max(0, index));
1150
+ if (next !== selectedIndex) onSelect(next);
1151
+ };
1152
+ const step = (delta) => select(selectedIndex + delta);
1153
+ if (stopCount === 0) return null;
1154
+ return /* @__PURE__ */ jsxs2(
1155
+ "div",
1156
+ {
1157
+ className: cn("flex items-center justify-center gap-3 px-3 py-3 sm:gap-4 sm:px-5", className),
1158
+ "aria-label": ariaLabel,
1159
+ children: [
1160
+ /* @__PURE__ */ jsx2(
1161
+ "button",
1162
+ {
1163
+ type: "button",
1164
+ onClick: () => step(-1),
1165
+ disabled: selectedIndex === 0,
1166
+ "aria-label": previousAriaLabel != null ? previousAriaLabel : "Previous line",
1167
+ className: "flex size-5! shrink-0 cursor-pointer items-center justify-center text-agg-muted-foreground transition-colors hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-not-allowed disabled:opacity-30",
1168
+ children: /* @__PURE__ */ jsx2(Icon, { name: "chevron-left", className: "size-4" })
1169
+ }
1170
+ ),
1171
+ /* @__PURE__ */ jsxs2("div", { className: "relative min-w-0 flex-1", children: [
1172
+ /* @__PURE__ */ jsx2(
1173
+ "div",
1174
+ {
1175
+ ref: scrollRef,
1176
+ style: { paddingLeft: pad.left, paddingRight: pad.right },
1177
+ className: "flex items-end gap-1 overflow-x-hidden py-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
1178
+ children: stops.map((stop, index) => {
1179
+ const active = index === selectedIndex;
1180
+ return /* @__PURE__ */ jsxs2(
1181
+ "button",
1182
+ {
1183
+ type: "button",
1184
+ ref: (el) => {
1185
+ itemRefs.current[index] = el;
1186
+ },
1187
+ onClick: () => select(index),
1188
+ disabled: stop.disabled,
1189
+ "aria-pressed": active,
1190
+ className: "flex shrink-0 cursor-pointer flex-col items-center gap-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40",
1191
+ children: [
1192
+ /* @__PURE__ */ jsx2(
1193
+ "span",
1194
+ {
1195
+ className: cn(
1196
+ "flex h-8 min-w-[60px] items-center justify-center rounded-agg-full border px-3 text-agg-sm leading-agg-5 tabular-nums transition-colors",
1197
+ active ? "border-agg-primary bg-agg-secondary font-agg-bold text-agg-foreground" : "border-transparent bg-agg-secondary text-agg-muted-foreground hover:bg-agg-secondary-hover hover:text-agg-foreground"
1198
+ ),
1199
+ children: stop.value
1200
+ }
1201
+ ),
1202
+ /* @__PURE__ */ jsx2(VenueRow, { venues: stop.venues, active })
1203
+ ]
1204
+ },
1205
+ index
1206
+ );
1207
+ })
1208
+ }
1209
+ ),
1210
+ /* @__PURE__ */ jsx2(
1211
+ "span",
1212
+ {
1213
+ className: cn(
1214
+ "pointer-events-none absolute inset-y-0 left-0 w-8 bg-gradient-to-r from-agg-secondary to-transparent transition-opacity duration-200",
1215
+ mask.left ? "opacity-100" : "opacity-0"
1216
+ )
1217
+ }
1218
+ ),
1219
+ /* @__PURE__ */ jsx2(
1220
+ "span",
1221
+ {
1222
+ className: cn(
1223
+ "pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l from-agg-secondary to-transparent transition-opacity duration-200",
1224
+ mask.right ? "opacity-100" : "opacity-0"
1225
+ )
1226
+ }
1227
+ )
1228
+ ] }),
1229
+ /* @__PURE__ */ jsx2(
1230
+ "button",
1231
+ {
1232
+ type: "button",
1233
+ onClick: () => step(1),
1234
+ disabled: selectedIndex === stopCount - 1,
1235
+ "aria-label": nextAriaLabel != null ? nextAriaLabel : "Next line",
1236
+ className: "flex size-5! shrink-0 cursor-pointer items-center justify-center text-agg-muted-foreground transition-colors hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-not-allowed disabled:opacity-30",
1237
+ children: /* @__PURE__ */ jsx2(Icon, { name: "chevron-right", className: "size-4" })
1238
+ }
1239
+ )
1240
+ ]
1241
+ }
1171
1242
  );
1172
- if (isNonStandardSportsLikeEvent(event)) {
1173
- definitions = definitions.filter(
1174
- (definition) => SPORTS_NON_STANDARD_VISIBLE_TAB_KEY_SET.has(definition.key)
1175
- );
1176
- }
1177
- return definitions;
1178
- };
1179
- var mergeSportsSectionMarketsIntoEvent = ({
1180
- event,
1181
- sectionMarketsByKey
1182
- }) => {
1183
- var _a;
1184
- const orderedVenueMarkets = [...event.venueMarkets];
1185
- const seenMarketIds = new Set(orderedVenueMarkets.map((market) => market.id));
1186
- for (const sectionKey of SPORTS_SECTION_TAB_DEFINITIONS.map((definition) => definition.key)) {
1187
- for (const market of (_a = sectionMarketsByKey[sectionKey]) != null ? _a : []) {
1188
- if (seenMarketIds.has(market.id)) continue;
1189
- seenMarketIds.add(market.id);
1190
- orderedVenueMarkets.push(market);
1191
- }
1192
- }
1193
- return __spreadProps(__spreadValues({}, event), {
1194
- venueMarkets: orderedVenueMarkets
1195
- });
1196
- };
1243
+ }
1197
1244
 
1198
1245
  // src/pages/event-market/sports-market-card.tsx
1199
1246
  import { jsx as jsx3 } from "react/jsx-runtime";
@@ -1221,6 +1268,19 @@ var SportsMarketCard = ({
1221
1268
  [group.markets]
1222
1269
  );
1223
1270
  const isCombinedMoneylineGroup = group.sportsMarketType === "moneyline" && combinedMoneylineMarkets.length > 1 && combinedMoneylineMarkets.length === group.markets.length;
1271
+ const preferredResolvedMoneylineMarket = useMemo(() => {
1272
+ var _a2, _b2;
1273
+ if (!isCombinedMoneylineGroup) return null;
1274
+ const resolvedYesWinnerMarket = (_a2 = combinedMoneylineMarkets.find(
1275
+ (market) => market.venueMarketOutcomes.some(
1276
+ (outcome) => outcome.winner === true && outcome.label.trim().toLowerCase() === "yes"
1277
+ )
1278
+ )) != null ? _a2 : null;
1279
+ if (resolvedYesWinnerMarket) return resolvedYesWinnerMarket;
1280
+ return (_b2 = combinedMoneylineMarkets.find(
1281
+ (market) => market.venueMarketOutcomes.some((outcome) => outcome.winner === true)
1282
+ )) != null ? _b2 : null;
1283
+ }, [combinedMoneylineMarkets, isCombinedMoneylineGroup]);
1224
1284
  useEffect3(() => {
1225
1285
  if (!slide.hasLadder) return;
1226
1286
  const tradingMarketId = tradingContext == null ? void 0 : tradingContext.selectedMarketId;
@@ -1228,7 +1288,7 @@ var SportsMarketCard = ({
1228
1288
  const matchedIndex = slide.stops.findIndex((stop) => stop.market.id === tradingMarketId);
1229
1289
  if (matchedIndex >= 0) setSelectedLineIndex(matchedIndex);
1230
1290
  }, [slide.hasLadder, slide.stops, tradingContext == null ? void 0 : tradingContext.selectedMarketId]);
1231
- const activeMoneylineMarket = isCombinedMoneylineGroup && (tradingContext == null ? void 0 : tradingContext.selectedMarketId) ? (_a = group.markets.find((market) => market.id === tradingContext.selectedMarketId)) != null ? _a : null : null;
1291
+ const activeMoneylineMarket = isCombinedMoneylineGroup ? preferredResolvedMoneylineMarket != null ? preferredResolvedMoneylineMarket : (tradingContext == null ? void 0 : tradingContext.selectedMarketId) ? (_a = group.markets.find((market) => market.id === tradingContext.selectedMarketId)) != null ? _a : null : null : null;
1232
1292
  const activeMarket = slide.hasLadder ? (_d = (_c = (_b = slide.stops[selectedLineIndex]) == null ? void 0 : _b.market) != null ? _c : group.markets[0]) != null ? _d : null : (_e = activeMoneylineMarket != null ? activeMoneylineMarket : group.markets[0]) != null ? _e : null;
1233
1293
  const activeDefaultOutcome = isCombinedMoneylineGroup && activeMarket ? (_f = activeMarket.venueMarketOutcomes.find(
1234
1294
  (outcome) => outcome.label.trim().toLowerCase() === "yes"
@@ -1380,39 +1440,6 @@ var resolveSportsSectionLabel = (labels, key) => {
1380
1440
  return labels.eventMarketPage.sports.otherTab;
1381
1441
  }
1382
1442
  };
1383
- var resolveSportsPeriodLabel = (labels, period) => {
1384
- var _a;
1385
- switch (period) {
1386
- case "full":
1387
- return labels.eventMarketPage.sports.fullPeriod;
1388
- case "1h":
1389
- return labels.eventMarketPage.sports.firstHalfPeriod;
1390
- case "2h":
1391
- return labels.eventMarketPage.sports.secondHalfPeriod;
1392
- case "q1":
1393
- return labels.eventMarketPage.sports.quarterOnePeriod;
1394
- case "q2":
1395
- return labels.eventMarketPage.sports.quarterTwoPeriod;
1396
- case "q3":
1397
- return labels.eventMarketPage.sports.quarterThreePeriod;
1398
- case "q4":
1399
- return labels.eventMarketPage.sports.quarterFourPeriod;
1400
- case "ot":
1401
- return labels.eventMarketPage.sports.overtimePeriod;
1402
- case "first_inning":
1403
- return "1st Inning";
1404
- case "second_inning":
1405
- return "2nd Inning";
1406
- case "third_inning":
1407
- return "3rd Inning";
1408
- case "first_5_innings":
1409
- return "1st 5 Innings";
1410
- case "other":
1411
- return labels.eventMarketPage.sports.otherPeriod;
1412
- default:
1413
- return (_a = formatSportsPeriodGrammarLabel(period)) != null ? _a : labels.eventMarketPage.sports.otherPeriod;
1414
- }
1415
- };
1416
1443
  var SportsTabButton = ({
1417
1444
  isActive,
1418
1445
  label,
@@ -1516,7 +1543,10 @@ var SportsMarkets = ({
1516
1543
  period: sectionFilters.period,
1517
1544
  marketCategory: sectionFilters.marketCategory,
1518
1545
  marketGroup: sectionFilters.marketGroup,
1519
- limit: 20,
1546
+ // The per-tab section fetch paginates; a large page (schema max) collapses a
1547
+ // heavy tab (e.g. "Other" spans other/team_props/player_props/specials/
1548
+ // completion — hundreds of markets on prop-rich events) from ~15 calls to 1-3.
1549
+ limit: 100,
1520
1550
  status: MarketStatus2.open,
1521
1551
  enabled: hasAggKey
1522
1552
  });
@@ -1624,7 +1654,7 @@ var SportsMarkets = ({
1624
1654
  );
1625
1655
  }
1626
1656
  const shouldShowLoadingState = stableSectionMarkets == null && !isSectionSettled;
1627
- return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-5", "data-testid": "sports-markets", children: [
1657
+ return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-3", "data-testid": "sports-markets", children: [
1628
1658
  shouldRenderTabs ? /* @__PURE__ */ jsx4(
1629
1659
  "div",
1630
1660
  {
@@ -1653,28 +1683,24 @@ var SportsMarkets = ({
1653
1683
  }
1654
1684
  ) : null,
1655
1685
  displayedPeriodGroups.map((periodGroup) => {
1656
- const hasMultiplePeriods = displayedPeriodGroups.length > 1;
1657
- return /* @__PURE__ */ jsxs3(
1686
+ return /* @__PURE__ */ jsx4(
1658
1687
  "section",
1659
1688
  {
1660
1689
  className: "flex flex-col gap-3",
1661
1690
  "data-period-key": periodGroup.key,
1662
- children: [
1663
- hasMultiplePeriods ? /* @__PURE__ */ jsx4(Typography, { variant: "body-large-strong", className: "text-agg-foreground", children: resolveSportsPeriodLabel(labels, periodGroup.key) }) : null,
1664
- periodGroup.groups.map((group) => /* @__PURE__ */ jsx4(
1665
- SportsMarketCard,
1666
- {
1667
- group,
1668
- venueMarkets: displayedSectionMarkets,
1669
- isExpanded: expandedGroupId === group.id,
1670
- onToggle: handleToggleGroup,
1671
- onOutcomeSelect: (_groupId, _selection) => handleGroupOutcomeSelect(group.id),
1672
- live,
1673
- midpointsResult
1674
- },
1675
- group.id
1676
- ))
1677
- ]
1691
+ children: periodGroup.groups.map((group) => /* @__PURE__ */ jsx4(
1692
+ SportsMarketCard,
1693
+ {
1694
+ group,
1695
+ venueMarkets: displayedSectionMarkets,
1696
+ isExpanded: expandedGroupId === group.id,
1697
+ onToggle: handleToggleGroup,
1698
+ onOutcomeSelect: (_groupId, _selection) => handleGroupOutcomeSelect(group.id),
1699
+ live,
1700
+ midpointsResult
1701
+ },
1702
+ group.id
1703
+ ))
1678
1704
  },
1679
1705
  `${activeTabKey}-${periodGroup.key}`
1680
1706
  );
@@ -1921,7 +1947,11 @@ var EventMarketPageContent = ({
1921
1947
  const [isMobileTradeOpen, setIsMobileTradeOpen] = useState6(false);
1922
1948
  const isMobileViewport = useIsMobileEventMarketViewport();
1923
1949
  const tradingContext = useEventTradingContext4();
1924
- const midpointsResult = useMidpoints2(event.venueMarkets);
1950
+ const eventDetailVenueMarkets = useMemo4(
1951
+ () => normalizeVenueMarketCluster(event.venueMarkets),
1952
+ [event.venueMarkets]
1953
+ );
1954
+ const midpointsResult = useMidpoints2(eventDetailVenueMarkets);
1925
1955
  const internalResolvedClaim = useResolvedMarketClaim({
1926
1956
  market: eventTradingState.primaryMarket,
1927
1957
  enabled: eventTradingState.kind === "resolved",
@@ -2240,6 +2270,17 @@ var MIN_SEARCH_LENGTH = 3;
2240
2270
  var SEARCH_DEBOUNCE_MS = 300;
2241
2271
  var SEARCH_RESULTS_LIMIT = 20;
2242
2272
  var MOBILE_HOME_SEARCH_MEDIA_QUERY = "(max-width: 767px)";
2273
+ var collectVisibleVenueMarketIds = (venueMarkets) => {
2274
+ var _a;
2275
+ const ids = [];
2276
+ for (const market of venueMarkets) {
2277
+ ids.push(market.id);
2278
+ for (const sibling of (_a = market.matchedVenueMarkets) != null ? _a : []) {
2279
+ ids.push(sibling.id);
2280
+ }
2281
+ }
2282
+ return [...new Set(ids)];
2283
+ };
2243
2284
  var HomeSearchResults = ({
2244
2285
  activeTabValue,
2245
2286
  query,
@@ -2294,6 +2335,19 @@ var HomeSearchResults = ({
2294
2335
  }
2295
2336
  return filtered;
2296
2337
  }, [searchResults, activeVenues]);
2338
+ const visibleVenueMarkets = useMemo5(() => {
2339
+ return openEvents.flatMap((event) => {
2340
+ var _a;
2341
+ return (_a = event.venueMarkets) != null ? _a : [];
2342
+ });
2343
+ }, [openEvents]);
2344
+ const visibleMidpointVenueMarketIds = useMemo5(() => {
2345
+ return collectVisibleVenueMarketIds(visibleVenueMarkets);
2346
+ }, [visibleVenueMarkets]);
2347
+ const { midpointRows: sharedMidpointRows, isLoading: isSharedMidpointsLoading } = useVenueMarketMidpoints({
2348
+ venueMarketIds: visibleMidpointVenueMarketIds,
2349
+ enabled: visibleMidpointVenueMarketIds.length > 0
2350
+ });
2297
2351
  const loadMoreRef = useRef7(null);
2298
2352
  useEffect8(() => {
2299
2353
  if (!hasNextPage) return;
@@ -2384,6 +2438,8 @@ var HomeSearchResults = ({
2384
2438
  EventListItem,
2385
2439
  {
2386
2440
  event,
2441
+ midpointRows: sharedMidpointRows,
2442
+ midpointsLoading: isSharedMidpointsLoading,
2387
2443
  classNames: {
2388
2444
  root: "agg-event-list-item w-full min-w-0! max-w-none justify-between!"
2389
2445
  },
@@ -2737,12 +2793,12 @@ import {
2737
2793
  useExecutionOrders,
2738
2794
  useExecutionPositions,
2739
2795
  useGeoBlock,
2740
- useLabels as useLabels9,
2796
+ useLabels as useLabels10,
2741
2797
  useQueryClient,
2742
2798
  useSdkUiConfig as useSdkUiConfig5,
2743
2799
  useUserActivity
2744
2800
  } from "@agg-build/hooks";
2745
- import { Venue } from "@agg-build/sdk";
2801
+ import { Venue as Venue2 } from "@agg-build/sdk";
2746
2802
  import { useCallback as useCallback5, useEffect as useEffect10, useMemo as useMemo7, useState as useState11 } from "react";
2747
2803
 
2748
2804
  // src/pages/user-profile/chain-display.ts
@@ -2979,8 +3035,136 @@ var AvailableBalanceCard = ({
2979
3035
  };
2980
3036
  AvailableBalanceCard.displayName = "AvailableBalanceCard";
2981
3037
 
3038
+ // src/pages/user-profile/components/claim-activity-breakdown-modal.tsx
3039
+ import { useLabels as useLabels6 } from "@agg-build/hooks";
3040
+ import { Venue } from "@agg-build/sdk";
3041
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
3042
+ var CLAIM_VENUE_LABELS = {
3043
+ [Venue.kalshi]: "Kalshi",
3044
+ [Venue.polymarket]: "Polymarket",
3045
+ [Venue.limitless]: "Limitless",
3046
+ [Venue.opinion]: "Opinion",
3047
+ [Venue.predict]: "Predict",
3048
+ [Venue.probable]: "Probable",
3049
+ [Venue.myriad]: "Myriad",
3050
+ [Venue.hyperliquid]: "Hyperliquid"
3051
+ };
3052
+ var ClaimActivityBreakdownModal = ({
3053
+ activity,
3054
+ onOpenChange,
3055
+ onTransactionSelect
3056
+ }) => {
3057
+ var _a;
3058
+ const labels = useLabels6();
3059
+ return /* @__PURE__ */ jsx9(
3060
+ Modal,
3061
+ {
3062
+ open: activity !== null,
3063
+ onOpenChange,
3064
+ "aria-label": labels.userProfile.activity.claimBreakdownModalAriaLabel,
3065
+ children: /* @__PURE__ */ jsxs8(
3066
+ Modal.Container,
3067
+ {
3068
+ maxWidth: "600px",
3069
+ "aria-label": labels.userProfile.activity.claimBreakdownModalAriaLabel,
3070
+ children: [
3071
+ /* @__PURE__ */ jsx9(
3072
+ Modal.Header,
3073
+ {
3074
+ title: (_a = activity == null ? void 0 : activity.title) != null ? _a : "",
3075
+ classNames: {
3076
+ root: "border-b-0!",
3077
+ container: "px-4 py-4 sm:px-8 sm:pt-7 sm:pb-3",
3078
+ title: "text-2xl leading-8"
3079
+ }
3080
+ }
3081
+ ),
3082
+ activity ? /* @__PURE__ */ jsx9(Modal.Body, { classNames: { root: "px-4 pt-0 pb-4 sm:px-8 sm:pt-0 sm:pb-7" }, children: /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-6", children: [
3083
+ /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-center gap-3", children: [
3084
+ /* @__PURE__ */ jsx9("span", { className: "inline-flex items-center justify-center rounded-full bg-agg-secondary-hover px-4 py-1.5 text-agg-sm leading-5 text-agg-foreground", children: activity.outcomeLabel }),
3085
+ /* @__PURE__ */ jsx9("p", { className: "min-w-0 flex-1 text-agg-sm leading-5 text-agg-foreground", children: activity.marketTitle })
3086
+ ] }),
3087
+ /* @__PURE__ */ jsx9("div", { className: "flex flex-col", children: activity.transactions.map((transaction, index) => {
3088
+ var _a2;
3089
+ const isInteractive = Boolean(transaction.txHash && transaction.chainId);
3090
+ return /* @__PURE__ */ jsxs8("div", { children: [
3091
+ /* @__PURE__ */ jsxs8(
3092
+ "button",
3093
+ {
3094
+ type: "button",
3095
+ className: [
3096
+ "flex w-full items-center justify-between gap-6 rounded-agg-lg px-3 py-2 text-left transition-colors",
3097
+ "bg-transparent hover:bg-agg-secondary-hover",
3098
+ isInteractive ? "cursor-pointer" : "cursor-default"
3099
+ ].join(" "),
3100
+ "aria-label": labels.userProfile.activity.claimBreakdownTransactionLinkAria(
3101
+ transaction.venue
3102
+ ),
3103
+ disabled: !isInteractive,
3104
+ onClick: () => {
3105
+ if (!isInteractive) return;
3106
+ onTransactionSelect(transaction);
3107
+ },
3108
+ children: [
3109
+ /* @__PURE__ */ jsxs8("div", { className: "min-w-0 flex flex-1 flex-col gap-2", children: [
3110
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
3111
+ /* @__PURE__ */ jsx9(
3112
+ VenueLogo,
3113
+ {
3114
+ venue: transaction.venue,
3115
+ size: "small",
3116
+ className: "shrink-0"
3117
+ }
3118
+ ),
3119
+ /* @__PURE__ */ jsx9("p", { className: "text-agg-sm leading-5 text-agg-foreground", children: (_a2 = CLAIM_VENUE_LABELS[transaction.venue]) != null ? _a2 : transaction.venue })
3120
+ ] }),
3121
+ transaction.hasError && transaction.errorMessage ? /* @__PURE__ */ jsx9(
3122
+ Tooltip,
3123
+ {
3124
+ size: "medium",
3125
+ content: transaction.errorMessage,
3126
+ sideOffset: 4,
3127
+ children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2 text-agg-error!", children: [
3128
+ /* @__PURE__ */ jsx9(
3129
+ Icon,
3130
+ {
3131
+ name: "circle-xmark",
3132
+ size: "small",
3133
+ className: "size-3! text-agg-error!"
3134
+ }
3135
+ ),
3136
+ /* @__PURE__ */ jsx9("p", { className: "truncate text-agg-sm leading-5 text-agg-error!", children: transaction.errorMessage })
3137
+ ] })
3138
+ }
3139
+ ) : /* @__PURE__ */ jsx9("p", { className: "text-agg-sm leading-5 text-agg-muted-foreground", children: transaction.transactionLabel })
3140
+ ] }),
3141
+ /* @__PURE__ */ jsxs8("div", { className: "flex shrink-0 items-center gap-3", children: [
3142
+ /* @__PURE__ */ jsx9("p", { className: "text-agg-sm font-agg-bold leading-5 text-agg-foreground", children: transaction.amountLabel }),
3143
+ isInteractive ? /* @__PURE__ */ jsx9(
3144
+ Icon,
3145
+ {
3146
+ name: "external-link",
3147
+ size: "small",
3148
+ className: "text-agg-muted-foreground"
3149
+ }
3150
+ ) : null
3151
+ ] })
3152
+ ]
3153
+ }
3154
+ ),
3155
+ index < activity.transactions.length - 1 ? /* @__PURE__ */ jsx9("div", { className: "my-1 h-px w-full bg-agg-separator", "aria-hidden": true }) : null
3156
+ ] }, transaction.id);
3157
+ }) })
3158
+ ] }) }) : null
3159
+ ]
3160
+ }
3161
+ )
3162
+ }
3163
+ );
3164
+ };
3165
+
2982
3166
  // src/pages/user-profile/components/positions-activity.tsx
2983
- import { optimizedImageUrl as optimizedImageUrl2, useLabels as useLabels7 } from "@agg-build/hooks";
3167
+ import { optimizedImageUrl as optimizedImageUrl2, useLabels as useLabels8 } from "@agg-build/hooks";
2984
3168
  import { Fragment as Fragment4, useEffect as useEffect9, useMemo as useMemo6, useRef as useRef8, useState as useState10 } from "react";
2985
3169
 
2986
3170
  // src/pages/user-profile/user-profile.constants.ts
@@ -3177,16 +3361,8 @@ var toPositionRowViewModel = (position, labels = defaultLabels) => {
3177
3361
  };
3178
3362
  };
3179
3363
 
3180
- // src/primitives/conditional-wrapper.tsx
3181
- var ConditionalWrapper = ({
3182
- condition,
3183
- wrapper,
3184
- children
3185
- }) => condition ? wrapper(children) : children;
3186
- ConditionalWrapper.displayName = "ConditionalWrapper";
3187
-
3188
3364
  // src/pages/user-profile/components/activity-row.tsx
3189
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
3365
+ import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
3190
3366
  var shouldOpenInNewTab = (activity) => {
3191
3367
  return activity.kind === "redeem" || activity.kind === "deposit" || activity.kind === "withdrawal";
3192
3368
  };
@@ -3203,7 +3379,7 @@ var RowWrapper = ({
3203
3379
  }) => {
3204
3380
  if (href) {
3205
3381
  const opensInNewTab = target === "_blank";
3206
- return /* @__PURE__ */ jsx9(
3382
+ return /* @__PURE__ */ jsx10(
3207
3383
  "a",
3208
3384
  {
3209
3385
  href,
@@ -3219,7 +3395,7 @@ var RowWrapper = ({
3219
3395
  }
3220
3396
  );
3221
3397
  }
3222
- return /* @__PURE__ */ jsx9("button", { type: "button", className, onClick, children });
3398
+ return /* @__PURE__ */ jsx10("button", { type: "button", className, onClick, children });
3223
3399
  };
3224
3400
  var TRANSFER_ICON = {
3225
3401
  withdrawal: "upload",
@@ -3254,7 +3430,7 @@ var AmountTimeStack = ({
3254
3430
  timeLabel,
3255
3431
  tone,
3256
3432
  mobile
3257
- }) => /* @__PURE__ */ jsxs8(
3433
+ }) => /* @__PURE__ */ jsxs9(
3258
3434
  "div",
3259
3435
  {
3260
3436
  className: cn(
@@ -3262,7 +3438,7 @@ var AmountTimeStack = ({
3262
3438
  mobile ? "sm:hidden" : "hidden sm:flex sm:w-[120px] sm:shrink-0"
3263
3439
  ),
3264
3440
  children: [
3265
- /* @__PURE__ */ jsx9(
3441
+ /* @__PURE__ */ jsx10(
3266
3442
  "p",
3267
3443
  {
3268
3444
  className: cn(
@@ -3273,7 +3449,7 @@ var AmountTimeStack = ({
3273
3449
  children: amountLabel
3274
3450
  }
3275
3451
  ),
3276
- /* @__PURE__ */ jsx9(
3452
+ /* @__PURE__ */ jsx10(
3277
3453
  "p",
3278
3454
  {
3279
3455
  className: cn(
@@ -3290,9 +3466,9 @@ var AmountTimeStack = ({
3290
3466
  var TradeTypeCell = ({
3291
3467
  activity,
3292
3468
  tone
3293
- }) => /* @__PURE__ */ jsxs8("div", { className: "hidden w-[108px] shrink-0 items-center gap-3 sm:flex", children: [
3294
- /* @__PURE__ */ jsx9(VenueLogo, { venue: activity.venue, size: "small", className: "shrink-0" }),
3295
- /* @__PURE__ */ jsx9(
3469
+ }) => /* @__PURE__ */ jsxs9("div", { className: "hidden w-[108px] shrink-0 items-center gap-3 sm:flex", children: [
3470
+ /* @__PURE__ */ jsx10(VenueLogo, { venue: activity.venue, size: "small", className: "shrink-0" }),
3471
+ /* @__PURE__ */ jsx10(
3296
3472
  "p",
3297
3473
  {
3298
3474
  className: cn(
@@ -3307,8 +3483,8 @@ var TradeTypeCell = ({
3307
3483
  var TransferTypeCell = ({
3308
3484
  activity,
3309
3485
  tone
3310
- }) => /* @__PURE__ */ jsxs8("div", { className: "hidden w-[108px] shrink-0 items-center gap-3 sm:flex", children: [
3311
- /* @__PURE__ */ jsx9(
3486
+ }) => /* @__PURE__ */ jsxs9("div", { className: "hidden w-[108px] shrink-0 items-center gap-3 sm:flex", children: [
3487
+ /* @__PURE__ */ jsx10(
3312
3488
  Icon,
3313
3489
  {
3314
3490
  name: TRANSFER_ICON[activity.kind],
@@ -3319,7 +3495,7 @@ var TransferTypeCell = ({
3319
3495
  )
3320
3496
  }
3321
3497
  ),
3322
- /* @__PURE__ */ jsx9(
3498
+ /* @__PURE__ */ jsx10(
3323
3499
  "p",
3324
3500
  {
3325
3501
  className: cn(
@@ -3334,8 +3510,8 @@ var TransferTypeCell = ({
3334
3510
  var RedeemTypeCell = ({
3335
3511
  activity,
3336
3512
  tone
3337
- }) => /* @__PURE__ */ jsxs8("div", { className: "hidden w-[108px] shrink-0 items-center gap-3 sm:flex", children: [
3338
- /* @__PURE__ */ jsx9(
3513
+ }) => /* @__PURE__ */ jsxs9("div", { className: "hidden w-[108px] shrink-0 items-center gap-3 sm:flex", children: [
3514
+ /* @__PURE__ */ jsx10(
3339
3515
  Icon,
3340
3516
  {
3341
3517
  name: "gift-bonus",
@@ -3346,7 +3522,7 @@ var RedeemTypeCell = ({
3346
3522
  )
3347
3523
  }
3348
3524
  ),
3349
- /* @__PURE__ */ jsx9(
3525
+ /* @__PURE__ */ jsx10(
3350
3526
  "p",
3351
3527
  {
3352
3528
  className: cn(
@@ -3363,7 +3539,7 @@ var OutcomeBadge = ({
3363
3539
  tone
3364
3540
  }) => {
3365
3541
  if (!label) return null;
3366
- return /* @__PURE__ */ jsx9("span", { className: "agg-activity-outcome inline-flex items-center justify-center gap-1.5 rounded-full bg-agg-secondary-hover px-4 py-[6px]", children: /* @__PURE__ */ jsx9(
3542
+ return /* @__PURE__ */ jsx10("span", { className: "agg-activity-outcome inline-flex items-center justify-center gap-1.5 rounded-full bg-agg-secondary-hover px-4 py-[6px]", children: /* @__PURE__ */ jsx10(
3367
3543
  "span",
3368
3544
  {
3369
3545
  className: cn(
@@ -3377,9 +3553,9 @@ var OutcomeBadge = ({
3377
3553
  var TradeOutcomeShares = ({
3378
3554
  activity,
3379
3555
  tone
3380
- }) => /* @__PURE__ */ jsxs8(Fragment2, { children: [
3381
- /* @__PURE__ */ jsx9(OutcomeBadge, { label: activity.outcomeLabel, tone }),
3382
- /* @__PURE__ */ jsx9(
3556
+ }) => /* @__PURE__ */ jsxs9(Fragment2, { children: [
3557
+ /* @__PURE__ */ jsx10(OutcomeBadge, { label: activity.outcomeLabel, tone }),
3558
+ /* @__PURE__ */ jsx10(
3383
3559
  "span",
3384
3560
  {
3385
3561
  className: cn(
@@ -3399,8 +3575,8 @@ var RedeemRow = ({
3399
3575
  const tone = resolveToneClasses(activity);
3400
3576
  const statusVisual = getStatusVisual(activity);
3401
3577
  const activityStatus = resolveActivityStatus(activity);
3402
- const shouldShowInlineStatus = activityStatus !== "completed";
3403
- return /* @__PURE__ */ jsx9(
3578
+ const shouldShowInlineStatus = activityStatus === "pending";
3579
+ return /* @__PURE__ */ jsx10(
3404
3580
  RowWrapper,
3405
3581
  {
3406
3582
  className,
@@ -3408,173 +3584,30 @@ var RedeemRow = ({
3408
3584
  target: href ? "_blank" : void 0,
3409
3585
  rel: href ? "noopener noreferrer" : void 0,
3410
3586
  onClick,
3411
- children: /* @__PURE__ */ jsx9(
3412
- ConditionalWrapper,
3413
- {
3414
- condition: !!activity.errorMessage,
3415
- wrapper: (children) => /* @__PURE__ */ jsx9(
3416
- Tooltip,
3417
- {
3418
- size: "medium",
3419
- content: /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-4", children: [
3420
- /* @__PURE__ */ jsx9(Icon, { name: "info", size: "small", className: "shrink-0 text-agg-error" }),
3421
- /* @__PURE__ */ jsx9("p", { className: "font-agg-sans text-agg-sm font-agg-normal text-left", children: activity.errorMessage })
3422
- ] }),
3423
- sideOffset: 4,
3424
- children
3425
- }
3426
- ),
3427
- children: /* @__PURE__ */ jsxs8(
3428
- "div",
3429
- {
3430
- className: cn(
3431
- "flex w-full flex-col gap-3 text-left transition-colors sm:min-h-16 sm:flex-row sm:items-center",
3432
- "relative z-10"
3433
- ),
3434
- "data-status": activityStatus,
3435
- children: [
3436
- /* @__PURE__ */ jsx9(RedeemTypeCell, { activity, tone }),
3437
- /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between sm:hidden", children: [
3438
- /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
3439
- /* @__PURE__ */ jsx9(
3440
- Icon,
3441
- {
3442
- name: "gift-bonus",
3443
- size: "small",
3444
- className: cn(
3445
- "shrink-0 text-agg-foreground",
3446
- activity.hasError || activity.errorMessage ? "text-agg-error!" : ""
3447
- )
3448
- }
3449
- ),
3450
- /* @__PURE__ */ jsx9(
3451
- "p",
3452
- {
3453
- className: cn(
3454
- "agg-activity-type font-agg-sans text-agg-sm leading-agg-5 font-agg-normal",
3455
- tone.primary,
3456
- activity.hasError || activity.errorMessage ? "text-agg-error!" : ""
3457
- ),
3458
- children: activity.type
3459
- }
3460
- )
3461
- ] }),
3462
- /* @__PURE__ */ jsx9(OutcomeBadge, { label: activity.outcomeLabel, tone })
3463
- ] }),
3464
- /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between sm:contents", children: [
3465
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 flex-1 items-center gap-3 sm:gap-4", children: [
3466
- /* @__PURE__ */ jsx9("div", { className: "agg-activity-image flex h-10 w-10 shrink-0 items-center justify-center sm:h-15 sm:w-15", children: /* @__PURE__ */ jsx9(
3467
- RemoteImage,
3468
- {
3469
- src: activity.thumbnailSrc,
3470
- alt: "",
3471
- className: "h-full w-full rounded-agg-sm object-cover sm:rounded-agg-lg",
3472
- classNames: { placeholder: "rounded-agg-sm sm:rounded-agg-lg" }
3473
- }
3474
- ) }),
3475
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-1 sm:gap-2", children: [
3476
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 items-center gap-2", children: [
3477
- /* @__PURE__ */ jsx9(
3478
- "p",
3479
- {
3480
- className: cn(
3481
- "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-bold sm:text-agg-base sm:leading-agg-6",
3482
- tone.primary
3483
- ),
3484
- children: activity.title
3485
- }
3486
- ),
3487
- shouldShowInlineStatus ? statusVisual.spin ? /* @__PURE__ */ jsx9(
3488
- LoadingIcon,
3489
- {
3490
- size: "small",
3491
- className: cn("shrink-0", statusVisual.iconClassName)
3492
- }
3493
- ) : /* @__PURE__ */ jsx9(
3494
- Icon,
3495
- {
3496
- name: statusVisual.icon,
3497
- size: "small",
3498
- className: cn("shrink-0", statusVisual.iconClassName)
3499
- }
3500
- ) : null
3501
- ] }),
3502
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 items-center gap-2 sm:gap-3", children: [
3503
- /* @__PURE__ */ jsx9("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsx9(OutcomeBadge, { label: activity.outcomeLabel, tone }) }),
3504
- /* @__PURE__ */ jsx9(
3505
- "p",
3506
- {
3507
- className: cn(
3508
- "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal",
3509
- tone.meta
3510
- ),
3511
- children: activity.marketTitle
3512
- }
3513
- )
3514
- ] })
3515
- ] })
3516
- ] }),
3517
- /* @__PURE__ */ jsx9(
3518
- AmountTimeStack,
3519
- {
3520
- amountLabel: activity.amountLabel,
3521
- timeLabel: activity.timeLabel,
3522
- tone,
3523
- mobile: true
3524
- }
3525
- )
3526
- ] }),
3527
- /* @__PURE__ */ jsx9(
3528
- AmountTimeStack,
3529
- {
3530
- amountLabel: activity.amountLabel,
3531
- timeLabel: activity.timeLabel,
3532
- tone
3533
- }
3534
- )
3535
- ]
3536
- }
3537
- )
3538
- }
3539
- )
3540
- }
3541
- );
3542
- };
3543
- var TradeRow = ({
3544
- activity,
3545
- className,
3546
- href,
3547
- onClick
3548
- }) => {
3549
- const tone = resolveToneClasses(activity);
3550
- return /* @__PURE__ */ jsx9(RowWrapper, { className: cn(className), href, onClick, children: /* @__PURE__ */ jsx9(
3551
- ConditionalWrapper,
3552
- {
3553
- condition: !!activity.errorMessage,
3554
- wrapper: (children) => /* @__PURE__ */ jsx9(
3555
- Tooltip,
3556
- {
3557
- size: "medium",
3558
- content: /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-4", children: [
3559
- /* @__PURE__ */ jsx9(Icon, { name: "info", size: "small", className: "shrink-0 text-agg-error" }),
3560
- /* @__PURE__ */ jsx9("p", { className: "font-agg-sans text-agg-sm font-agg-normal text-left", children: activity.errorMessage })
3561
- ] }),
3562
- sideOffset: 4,
3563
- children
3564
- }
3565
- ),
3566
- children: /* @__PURE__ */ jsxs8(
3587
+ children: /* @__PURE__ */ jsxs9(
3567
3588
  "div",
3568
3589
  {
3569
3590
  className: cn(
3570
3591
  "flex w-full flex-col gap-3 text-left transition-colors sm:min-h-16 sm:flex-row sm:items-center",
3571
3592
  "relative z-10"
3572
3593
  ),
3594
+ "data-status": activityStatus,
3573
3595
  children: [
3574
- /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between sm:hidden", children: [
3575
- /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
3576
- /* @__PURE__ */ jsx9(VenueLogo, { venue: activity.venue, size: "small", className: "size-5 shrink-0" }),
3577
- /* @__PURE__ */ jsx9(
3596
+ /* @__PURE__ */ jsx10(RedeemTypeCell, { activity, tone }),
3597
+ /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between sm:hidden", children: [
3598
+ /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
3599
+ /* @__PURE__ */ jsx10(
3600
+ Icon,
3601
+ {
3602
+ name: "gift-bonus",
3603
+ size: "small",
3604
+ className: cn(
3605
+ "shrink-0 text-agg-foreground",
3606
+ activity.hasError || activity.errorMessage ? "text-agg-error!" : ""
3607
+ )
3608
+ }
3609
+ ),
3610
+ /* @__PURE__ */ jsx10(
3578
3611
  "p",
3579
3612
  {
3580
3613
  className: cn(
@@ -3586,35 +3619,62 @@ var TradeRow = ({
3586
3619
  }
3587
3620
  )
3588
3621
  ] }),
3589
- /* @__PURE__ */ jsx9("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsx9(TradeOutcomeShares, { activity, tone }) })
3622
+ /* @__PURE__ */ jsx10(OutcomeBadge, { label: activity.outcomeLabel, tone })
3590
3623
  ] }),
3591
- /* @__PURE__ */ jsx9(TradeTypeCell, { activity, tone }),
3592
- /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between sm:contents", children: [
3593
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 flex-1 items-center gap-3 sm:gap-4", children: [
3594
- /* @__PURE__ */ jsx9("div", { className: "agg-activity-image flex h-10 w-10 shrink-0 items-center justify-center sm:h-15 sm:w-15", children: /* @__PURE__ */ jsx9(
3624
+ /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between sm:contents", children: [
3625
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 flex-1 items-center gap-3 sm:gap-4", children: [
3626
+ /* @__PURE__ */ jsx10("div", { className: "agg-activity-image flex h-10 w-10 shrink-0 items-center justify-center sm:h-15 sm:w-15", children: /* @__PURE__ */ jsx10(
3595
3627
  RemoteImage,
3596
3628
  {
3597
3629
  src: activity.thumbnailSrc,
3598
3630
  alt: "",
3599
3631
  className: "h-full w-full rounded-agg-sm object-cover sm:rounded-agg-lg",
3600
- classNames: { placeholder: "rounded-agg-sm sm:rounded-agg-lg" }
3601
- }
3602
- ) }),
3603
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-2", children: [
3604
- /* @__PURE__ */ jsx9(
3605
- "p",
3606
- {
3607
- className: cn(
3608
- "agg-activity-market min-w-0 overflow-hidden font-agg-sans text-agg-sm leading-agg-5 font-agg-bold [display:-webkit-box] [-webkit-line-clamp:2] [-webkit-box-orient:vertical] sm:text-agg-base sm:leading-agg-6 sm:whitespace-nowrap sm:text-ellipsis sm:[-webkit-line-clamp:1] sm:[display:block]",
3609
- tone.primary
3610
- ),
3611
- children: activity.title
3612
- }
3613
- ),
3614
- /* @__PURE__ */ jsx9("div", { className: "hidden flex-wrap items-center gap-2 sm:flex sm:gap-3", children: /* @__PURE__ */ jsx9(TradeOutcomeShares, { activity, tone }) })
3632
+ classNames: { placeholder: "rounded-agg-sm sm:rounded-agg-lg" }
3633
+ }
3634
+ ) }),
3635
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-1 sm:gap-2", children: [
3636
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 items-center gap-2", children: [
3637
+ /* @__PURE__ */ jsx10(
3638
+ "p",
3639
+ {
3640
+ className: cn(
3641
+ "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-bold sm:text-agg-base sm:leading-agg-6",
3642
+ tone.primary
3643
+ ),
3644
+ children: activity.title
3645
+ }
3646
+ ),
3647
+ shouldShowInlineStatus ? statusVisual.spin ? /* @__PURE__ */ jsx10(
3648
+ LoadingIcon,
3649
+ {
3650
+ size: "small",
3651
+ className: cn("shrink-0", statusVisual.iconClassName)
3652
+ }
3653
+ ) : /* @__PURE__ */ jsx10(
3654
+ Icon,
3655
+ {
3656
+ name: statusVisual.icon,
3657
+ size: "small",
3658
+ className: cn("shrink-0", statusVisual.iconClassName)
3659
+ }
3660
+ ) : null
3661
+ ] }),
3662
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 items-center gap-2 sm:gap-3", children: [
3663
+ /* @__PURE__ */ jsx10("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsx10(OutcomeBadge, { label: activity.outcomeLabel, tone }) }),
3664
+ /* @__PURE__ */ jsx10(
3665
+ "p",
3666
+ {
3667
+ className: cn(
3668
+ "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal",
3669
+ tone.meta
3670
+ ),
3671
+ children: activity.marketTitle
3672
+ }
3673
+ )
3674
+ ] })
3615
3675
  ] })
3616
3676
  ] }),
3617
- /* @__PURE__ */ jsx9(
3677
+ /* @__PURE__ */ jsx10(
3618
3678
  AmountTimeStack,
3619
3679
  {
3620
3680
  amountLabel: activity.amountLabel,
@@ -3624,7 +3684,7 @@ var TradeRow = ({
3624
3684
  }
3625
3685
  )
3626
3686
  ] }),
3627
- /* @__PURE__ */ jsx9(
3687
+ /* @__PURE__ */ jsx10(
3628
3688
  AmountTimeStack,
3629
3689
  {
3630
3690
  amountLabel: activity.amountLabel,
@@ -3636,6 +3696,86 @@ var TradeRow = ({
3636
3696
  }
3637
3697
  )
3638
3698
  }
3699
+ );
3700
+ };
3701
+ var TradeRow = ({
3702
+ activity,
3703
+ className,
3704
+ href,
3705
+ onClick
3706
+ }) => {
3707
+ const tone = resolveToneClasses(activity);
3708
+ return /* @__PURE__ */ jsx10(RowWrapper, { className: cn(className), href, onClick, children: /* @__PURE__ */ jsxs9(
3709
+ "div",
3710
+ {
3711
+ className: cn(
3712
+ "flex w-full flex-col gap-3 text-left transition-colors sm:min-h-16 sm:flex-row sm:items-center",
3713
+ "relative z-10"
3714
+ ),
3715
+ children: [
3716
+ /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between sm:hidden", children: [
3717
+ /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
3718
+ /* @__PURE__ */ jsx10(VenueLogo, { venue: activity.venue, size: "small", className: "size-5 shrink-0" }),
3719
+ /* @__PURE__ */ jsx10(
3720
+ "p",
3721
+ {
3722
+ className: cn(
3723
+ "agg-activity-type font-agg-sans text-agg-sm leading-agg-5 font-agg-normal",
3724
+ tone.primary,
3725
+ activity.hasError || activity.errorMessage ? "text-agg-error!" : ""
3726
+ ),
3727
+ children: activity.type
3728
+ }
3729
+ )
3730
+ ] }),
3731
+ /* @__PURE__ */ jsx10("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsx10(TradeOutcomeShares, { activity, tone }) })
3732
+ ] }),
3733
+ /* @__PURE__ */ jsx10(TradeTypeCell, { activity, tone }),
3734
+ /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between sm:contents", children: [
3735
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 flex-1 items-center gap-3 sm:gap-4", children: [
3736
+ /* @__PURE__ */ jsx10("div", { className: "agg-activity-image flex h-10 w-10 shrink-0 items-center justify-center sm:h-15 sm:w-15", children: /* @__PURE__ */ jsx10(
3737
+ RemoteImage,
3738
+ {
3739
+ src: activity.thumbnailSrc,
3740
+ alt: "",
3741
+ className: "h-full w-full rounded-agg-sm object-cover sm:rounded-agg-lg",
3742
+ classNames: { placeholder: "rounded-agg-sm sm:rounded-agg-lg" }
3743
+ }
3744
+ ) }),
3745
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-2", children: [
3746
+ /* @__PURE__ */ jsx10(
3747
+ "p",
3748
+ {
3749
+ className: cn(
3750
+ "agg-activity-market min-w-0 overflow-hidden font-agg-sans text-agg-sm leading-agg-5 font-agg-bold [display:-webkit-box] [-webkit-line-clamp:2] [-webkit-box-orient:vertical] sm:text-agg-base sm:leading-agg-6 sm:whitespace-nowrap sm:text-ellipsis sm:[-webkit-line-clamp:1] sm:[display:block]",
3751
+ tone.primary
3752
+ ),
3753
+ children: activity.title
3754
+ }
3755
+ ),
3756
+ /* @__PURE__ */ jsx10("div", { className: "hidden flex-wrap items-center gap-2 sm:flex sm:gap-3", children: /* @__PURE__ */ jsx10(TradeOutcomeShares, { activity, tone }) })
3757
+ ] })
3758
+ ] }),
3759
+ /* @__PURE__ */ jsx10(
3760
+ AmountTimeStack,
3761
+ {
3762
+ amountLabel: activity.amountLabel,
3763
+ timeLabel: activity.timeLabel,
3764
+ tone,
3765
+ mobile: true
3766
+ }
3767
+ )
3768
+ ] }),
3769
+ /* @__PURE__ */ jsx10(
3770
+ AmountTimeStack,
3771
+ {
3772
+ amountLabel: activity.amountLabel,
3773
+ timeLabel: activity.timeLabel,
3774
+ tone
3775
+ }
3776
+ )
3777
+ ]
3778
+ }
3639
3779
  ) });
3640
3780
  };
3641
3781
  var TransferRow = ({
@@ -3648,7 +3788,7 @@ var TransferRow = ({
3648
3788
  const transferStatus = resolveActivityStatus(activity);
3649
3789
  const transferIconName = TRANSFER_ICON[activity.kind];
3650
3790
  const statusVisual = getStatusVisual(activity);
3651
- return /* @__PURE__ */ jsx9(
3791
+ return /* @__PURE__ */ jsx10(
3652
3792
  RowWrapper,
3653
3793
  {
3654
3794
  className,
@@ -3656,116 +3796,98 @@ var TransferRow = ({
3656
3796
  target: href ? "_blank" : void 0,
3657
3797
  rel: href ? "noopener noreferrer" : void 0,
3658
3798
  onClick,
3659
- children: /* @__PURE__ */ jsx9(
3660
- ConditionalWrapper,
3799
+ children: /* @__PURE__ */ jsxs9(
3800
+ "div",
3661
3801
  {
3662
- condition: !!activity.errorMessage,
3663
- wrapper: (children) => /* @__PURE__ */ jsx9(
3664
- Tooltip,
3665
- {
3666
- size: "medium",
3667
- content: /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-4", children: [
3668
- /* @__PURE__ */ jsx9(Icon, { name: "info", size: "small", className: "shrink-0 text-agg-error" }),
3669
- /* @__PURE__ */ jsx9("p", { className: "font-agg-sans text-agg-sm font-agg-normal text-left", children: activity.errorMessage })
3670
- ] }),
3671
- sideOffset: 4,
3672
- children
3673
- }
3802
+ className: cn(
3803
+ "flex w-full flex-col gap-3 text-left transition-colors sm:min-h-16 sm:flex-row sm:items-center",
3804
+ "relative z-10"
3674
3805
  ),
3675
- children: /* @__PURE__ */ jsxs8(
3676
- "div",
3677
- {
3678
- className: cn(
3679
- "flex w-full flex-col gap-3 text-left transition-colors sm:min-h-16 sm:flex-row sm:items-center",
3680
- "relative z-10"
3806
+ children: [
3807
+ /* @__PURE__ */ jsx10(TransferTypeCell, { activity, tone }),
3808
+ /* @__PURE__ */ jsx10("div", { className: "flex w-full items-center justify-between sm:hidden", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
3809
+ /* @__PURE__ */ jsx10(
3810
+ Icon,
3811
+ {
3812
+ name: transferIconName,
3813
+ size: "small",
3814
+ className: cn(
3815
+ "shrink-0 text-agg-foreground",
3816
+ activity.hasError || activity.errorMessage ? "text-agg-error!" : ""
3817
+ )
3818
+ }
3681
3819
  ),
3682
- children: [
3683
- /* @__PURE__ */ jsx9(TransferTypeCell, { activity, tone }),
3684
- /* @__PURE__ */ jsx9("div", { className: "flex w-full items-center justify-between sm:hidden", children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
3685
- /* @__PURE__ */ jsx9(
3686
- Icon,
3820
+ /* @__PURE__ */ jsx10(
3821
+ "p",
3822
+ {
3823
+ className: cn(
3824
+ "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal",
3825
+ tone.primary,
3826
+ activity.hasError || activity.errorMessage ? "text-agg-error!" : ""
3827
+ ),
3828
+ children: activity.type
3829
+ }
3830
+ )
3831
+ ] }) }),
3832
+ /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between sm:contents", children: [
3833
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 flex-1 items-center gap-3 sm:gap-4", children: [
3834
+ /* @__PURE__ */ jsx10(
3835
+ "div",
3836
+ {
3837
+ className: "agg-activity-deposit-square hidden h-15 w-15 shrink-0 items-center justify-center rounded-agg-lg bg-agg-secondary-hover sm:flex",
3838
+ "data-status": transferStatus,
3839
+ children: statusVisual.spin ? /* @__PURE__ */ jsx10(LoadingIcon, { size: "medium", className: cn(statusVisual.iconClassName) }) : /* @__PURE__ */ jsx10(
3840
+ Icon,
3841
+ {
3842
+ name: statusVisual.icon,
3843
+ size: "medium",
3844
+ className: cn(statusVisual.iconClassName)
3845
+ }
3846
+ )
3847
+ }
3848
+ ),
3849
+ /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-1", children: [
3850
+ /* @__PURE__ */ jsx10(
3851
+ "p",
3687
3852
  {
3688
- name: transferIconName,
3689
- size: "small",
3690
3853
  className: cn(
3691
- "shrink-0 text-agg-foreground",
3692
- activity.hasError || activity.errorMessage ? "text-agg-error!" : ""
3693
- )
3854
+ "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-bold sm:text-agg-base sm:leading-agg-6",
3855
+ tone.primary
3856
+ ),
3857
+ children: activity.title
3694
3858
  }
3695
3859
  ),
3696
- /* @__PURE__ */ jsx9(
3860
+ /* @__PURE__ */ jsx10(
3697
3861
  "p",
3698
3862
  {
3699
3863
  className: cn(
3700
- "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal",
3701
- tone.primary,
3702
- activity.hasError || activity.errorMessage ? "text-agg-error!" : ""
3703
- ),
3704
- children: activity.type
3705
- }
3706
- )
3707
- ] }) }),
3708
- /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between sm:contents", children: [
3709
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 flex-1 items-center gap-3 sm:gap-4", children: [
3710
- /* @__PURE__ */ jsx9(
3711
- "div",
3712
- {
3713
- className: "agg-activity-deposit-square hidden h-15 w-15 shrink-0 items-center justify-center rounded-agg-lg bg-agg-secondary-hover sm:flex",
3714
- "data-status": transferStatus,
3715
- children: statusVisual.spin ? /* @__PURE__ */ jsx9(LoadingIcon, { size: "medium", className: cn(statusVisual.iconClassName) }) : /* @__PURE__ */ jsx9(
3716
- Icon,
3717
- {
3718
- name: statusVisual.icon,
3719
- size: "medium",
3720
- className: cn(statusVisual.iconClassName)
3721
- }
3722
- )
3723
- }
3724
- ),
3725
- /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-1", children: [
3726
- /* @__PURE__ */ jsx9(
3727
- "p",
3728
- {
3729
- className: cn(
3730
- "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-bold sm:text-agg-base sm:leading-agg-6",
3731
- tone.primary
3732
- ),
3733
- children: activity.title
3734
- }
3864
+ "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal",
3865
+ tone.meta
3735
3866
  ),
3736
- /* @__PURE__ */ jsx9(
3737
- "p",
3738
- {
3739
- className: cn(
3740
- "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal",
3741
- tone.meta
3742
- ),
3743
- children: activity.subtitleLabel
3744
- }
3745
- )
3746
- ] })
3747
- ] }),
3748
- /* @__PURE__ */ jsx9(
3749
- AmountTimeStack,
3750
- {
3751
- amountLabel: activity.amountLabel,
3752
- timeLabel: activity.timeLabel,
3753
- tone,
3754
- mobile: true
3867
+ children: activity.subtitleLabel
3755
3868
  }
3756
3869
  )
3757
- ] }),
3758
- /* @__PURE__ */ jsx9(
3759
- AmountTimeStack,
3760
- {
3761
- amountLabel: activity.amountLabel,
3762
- timeLabel: activity.timeLabel,
3763
- tone
3764
- }
3765
- )
3766
- ]
3767
- }
3768
- )
3870
+ ] })
3871
+ ] }),
3872
+ /* @__PURE__ */ jsx10(
3873
+ AmountTimeStack,
3874
+ {
3875
+ amountLabel: activity.amountLabel,
3876
+ timeLabel: activity.timeLabel,
3877
+ tone,
3878
+ mobile: true
3879
+ }
3880
+ )
3881
+ ] }),
3882
+ /* @__PURE__ */ jsx10(
3883
+ AmountTimeStack,
3884
+ {
3885
+ amountLabel: activity.amountLabel,
3886
+ timeLabel: activity.timeLabel,
3887
+ tone
3888
+ }
3889
+ )
3890
+ ]
3769
3891
  }
3770
3892
  )
3771
3893
  }
@@ -3783,10 +3905,10 @@ var ActivityRow = ({ activity, href, onClick }) => {
3783
3905
  "before:bg-agg-secondary-hover before:rounded-agg-xl"
3784
3906
  );
3785
3907
  if (activity.kind === "trade") {
3786
- return /* @__PURE__ */ jsx9(TradeRow, { activity, className: sharedClassName, href, onClick: handleClick });
3908
+ return /* @__PURE__ */ jsx10(TradeRow, { activity, className: sharedClassName, href, onClick: handleClick });
3787
3909
  }
3788
3910
  if (activity.kind === "redeem") {
3789
- return /* @__PURE__ */ jsx9(
3911
+ return /* @__PURE__ */ jsx10(
3790
3912
  RedeemRow,
3791
3913
  {
3792
3914
  activity,
@@ -3796,7 +3918,7 @@ var ActivityRow = ({ activity, href, onClick }) => {
3796
3918
  }
3797
3919
  );
3798
3920
  }
3799
- return /* @__PURE__ */ jsx9(
3921
+ return /* @__PURE__ */ jsx10(
3800
3922
  TransferRow,
3801
3923
  {
3802
3924
  activity,
@@ -3809,19 +3931,19 @@ var ActivityRow = ({ activity, href, onClick }) => {
3809
3931
  ActivityRow.displayName = "ActivityRow";
3810
3932
 
3811
3933
  // src/pages/user-profile/components/empty-state.tsx
3812
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
3934
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
3813
3935
  var EmptyState = ({ title, description, className }) => {
3814
- return /* @__PURE__ */ jsx10(
3936
+ return /* @__PURE__ */ jsx11(
3815
3937
  "div",
3816
3938
  {
3817
3939
  className: cn("flex flex-col items-center justify-center gap-8 p-10", className),
3818
3940
  role: "status",
3819
3941
  "aria-live": "polite",
3820
- children: /* @__PURE__ */ jsxs9("div", { className: "flex flex-col items-center gap-5", children: [
3821
- /* @__PURE__ */ jsx10(SearchEmptyIcon, { className: "h-10 w-10 text-agg-muted-foreground", "aria-hidden": true }),
3822
- /* @__PURE__ */ jsxs9("div", { className: "flex flex-col items-center gap-1 text-center text-agg-foreground", children: [
3823
- /* @__PURE__ */ jsx10("p", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold", children: title }),
3824
- description ? /* @__PURE__ */ jsx10("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal", children: description }) : null
3942
+ children: /* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-center gap-5", children: [
3943
+ /* @__PURE__ */ jsx11(SearchEmptyIcon, { className: "h-10 w-10 text-agg-muted-foreground", "aria-hidden": true }),
3944
+ /* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-center gap-1 text-center text-agg-foreground", children: [
3945
+ /* @__PURE__ */ jsx11("p", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold", children: title }),
3946
+ description ? /* @__PURE__ */ jsx11("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal", children: description }) : null
3825
3947
  ] })
3826
3948
  ] })
3827
3949
  }
@@ -3830,8 +3952,8 @@ var EmptyState = ({ title, description, className }) => {
3830
3952
  EmptyState.displayName = "EmptyState";
3831
3953
 
3832
3954
  // src/pages/user-profile/components/position-row.tsx
3833
- import { optimizedImageUrl, useLabels as useLabels6 } from "@agg-build/hooks";
3834
- import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
3955
+ import { optimizedImageUrl, useLabels as useLabels7 } from "@agg-build/hooks";
3956
+ import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
3835
3957
  var floorToTwoDecimals = (value) => {
3836
3958
  if (!Number.isFinite(value) || value <= 0) return 0;
3837
3959
  return Math.trunc(value * 100) / 100;
@@ -3844,8 +3966,8 @@ var toneTextClassName = (tone) => {
3844
3966
  if (tone === "negative") return "text-agg-error";
3845
3967
  return "text-agg-muted-foreground";
3846
3968
  };
3847
- var OutcomePill = ({ label }) => /* @__PURE__ */ jsx11("span", { className: "agg-position-outcome max-w-[120px] inline-flex items-center justify-center rounded-full bg-agg-secondary-hover px-4 py-[6px]", children: /* @__PURE__ */ jsx11("span", { className: "whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground truncate", children: label }) });
3848
- var ResolutionPill = ({ label }) => /* @__PURE__ */ jsx11("span", { className: "agg-position-resolution-pill inline-flex w-full items-center justify-center overflow-hidden rounded-full bg-agg-secondary-hover px-4 py-[6px] md:w-auto", children: /* @__PURE__ */ jsx11("span", { className: "truncate whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: label }) });
3969
+ var OutcomePill = ({ label }) => /* @__PURE__ */ jsx12("span", { className: "agg-position-outcome max-w-[120px] inline-flex items-center justify-center rounded-full bg-agg-secondary-hover px-4 py-[6px]", children: /* @__PURE__ */ jsx12("span", { className: "whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground truncate", children: label }) });
3970
+ var ResolutionPill = ({ label }) => /* @__PURE__ */ jsx12("span", { className: "agg-position-resolution-pill inline-flex w-full items-center justify-center overflow-hidden rounded-full bg-agg-secondary-hover px-4 py-[6px] md:w-auto", children: /* @__PURE__ */ jsx12("span", { className: "truncate whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: label }) });
3849
3971
  var VenueShares = ({
3850
3972
  model,
3851
3973
  totalSharesLabel,
@@ -3853,26 +3975,26 @@ var VenueShares = ({
3853
3975
  keyPrefix
3854
3976
  }) => {
3855
3977
  if (!totalSharesLabel && model.venueShareBreakdown.length === 0) return null;
3856
- return /* @__PURE__ */ jsxs10("div", { className: cn(className, "gap-2"), children: [
3857
- model.venueShareBreakdown.length > 0 ? /* @__PURE__ */ jsx11("div", { className: "flex items-center gap-1", children: model.venueShareBreakdown.map((row, index) => /* @__PURE__ */ jsx11(
3978
+ return /* @__PURE__ */ jsxs11("div", { className: cn(className, "gap-2"), children: [
3979
+ model.venueShareBreakdown.length > 0 ? /* @__PURE__ */ jsx12("div", { className: "flex items-center gap-1", children: model.venueShareBreakdown.map((row, index) => /* @__PURE__ */ jsx12(
3858
3980
  Tooltip,
3859
3981
  {
3860
- content: /* @__PURE__ */ jsx11("span", { children: row.sharesLabel }),
3982
+ content: /* @__PURE__ */ jsx12("span", { children: row.sharesLabel }),
3861
3983
  "aria-label": `${row.venue} shares`,
3862
3984
  side: "top",
3863
- children: /* @__PURE__ */ jsx11(
3985
+ children: /* @__PURE__ */ jsx12(
3864
3986
  "span",
3865
3987
  {
3866
3988
  tabIndex: 0,
3867
3989
  className: "cursor-help rounded-agg-xs focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary focus-visible:ring-offset-0 focus-visible:ring-offset-agg-secondary",
3868
3990
  "aria-label": `${row.venue} shares`,
3869
- children: /* @__PURE__ */ jsx11(VenueLogo, { venue: row.venue, size: "small", className: "size-4 shrink-0" })
3991
+ children: /* @__PURE__ */ jsx12(VenueLogo, { venue: row.venue, size: "small", className: "size-4 shrink-0" })
3870
3992
  }
3871
3993
  )
3872
3994
  },
3873
3995
  `${keyPrefix}-${row.venue}-${String(index)}`
3874
3996
  )) }) : null,
3875
- totalSharesLabel ? /* @__PURE__ */ jsx11("span", { className: "whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: totalSharesLabel }) : null
3997
+ totalSharesLabel ? /* @__PURE__ */ jsx12("span", { className: "whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: totalSharesLabel }) : null
3876
3998
  ] });
3877
3999
  };
3878
4000
  var StatusBadge = ({
@@ -3881,7 +4003,7 @@ var StatusBadge = ({
3881
4003
  }) => {
3882
4004
  if (status === "lost" || status === "won_claimed") return null;
3883
4005
  const isWon = status === "won_unclaimed";
3884
- return /* @__PURE__ */ jsxs10(
4006
+ return /* @__PURE__ */ jsxs11(
3885
4007
  "span",
3886
4008
  {
3887
4009
  className: cn(
@@ -3890,7 +4012,7 @@ var StatusBadge = ({
3890
4012
  isWon ? "border-agg-success/50 bg-agg-success/10 text-agg-success" : "border-agg-muted-foreground/30 bg-agg-secondary-hover text-agg-foreground"
3891
4013
  ),
3892
4014
  children: [
3893
- /* @__PURE__ */ jsx11(Icon, { name: isWon ? "check-circle" : "hourglass-start", size: "small", className: "size-2.5!" }),
4015
+ /* @__PURE__ */ jsx12(Icon, { name: isWon ? "check-circle" : "hourglass-start", size: "small", className: "size-2.5!" }),
3894
4016
  isWon ? labels.won : labels.open
3895
4017
  ]
3896
4018
  }
@@ -3903,7 +4025,7 @@ var ResultBadge = ({
3903
4025
  if (status !== "won_claimed" && status !== "lost" && status !== "sold") return null;
3904
4026
  const isWon = status === "won_claimed";
3905
4027
  const isSold = status === "sold";
3906
- return /* @__PURE__ */ jsxs10(
4028
+ return /* @__PURE__ */ jsxs11(
3907
4029
  "span",
3908
4030
  {
3909
4031
  className: cn(
@@ -3912,7 +4034,7 @@ var ResultBadge = ({
3912
4034
  isWon ? "border-agg-success/50 bg-agg-success/10 text-agg-success" : isSold ? "border-agg-muted-foreground/30 bg-agg-secondary-hover text-agg-muted-foreground" : "border-agg-error/50 bg-agg-error/10 text-agg-error"
3913
4035
  ),
3914
4036
  children: [
3915
- /* @__PURE__ */ jsx11(
4037
+ /* @__PURE__ */ jsx12(
3916
4038
  Icon,
3917
4039
  {
3918
4040
  name: isWon ? "check-circle" : isSold ? "hourglass-start" : "cross-circle",
@@ -3928,27 +4050,27 @@ var ResultBadge = ({
3928
4050
  var TotalTradedCell = ({
3929
4051
  model,
3930
4052
  className
3931
- }) => /* @__PURE__ */ jsxs10(
4053
+ }) => /* @__PURE__ */ jsxs11(
3932
4054
  "div",
3933
4055
  {
3934
4056
  className: cn("agg-position-total-traded flex flex-col gap-[2px] whitespace-nowrap", className),
3935
4057
  children: [
3936
- /* @__PURE__ */ jsx11("p", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: model.totalTraded.primaryLabel }),
3937
- /* @__PURE__ */ jsx11("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: model.totalTraded.averageLabel })
4058
+ /* @__PURE__ */ jsx12("p", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: model.totalTraded.primaryLabel }),
4059
+ /* @__PURE__ */ jsx12("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: model.totalTraded.averageLabel })
3938
4060
  ]
3939
4061
  }
3940
4062
  );
3941
4063
  var PositionValueCell = ({
3942
4064
  value,
3943
4065
  className
3944
- }) => /* @__PURE__ */ jsxs10(
4066
+ }) => /* @__PURE__ */ jsxs11(
3945
4067
  "div",
3946
4068
  {
3947
4069
  className: cn("agg-position-value-cell flex flex-col gap-[2px] whitespace-nowrap", className),
3948
4070
  children: [
3949
- /* @__PURE__ */ jsxs10("div", { className: "flex items-baseline gap-1.5", children: [
3950
- /* @__PURE__ */ jsx11("p", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: value.primaryLabel }),
3951
- /* @__PURE__ */ jsx11(
4071
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-baseline gap-1.5", children: [
4072
+ /* @__PURE__ */ jsx12("p", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: value.primaryLabel }),
4073
+ /* @__PURE__ */ jsx12(
3952
4074
  "p",
3953
4075
  {
3954
4076
  className: cn(
@@ -3959,9 +4081,9 @@ var PositionValueCell = ({
3959
4081
  }
3960
4082
  )
3961
4083
  ] }),
3962
- /* @__PURE__ */ jsxs10("div", { className: "flex items-baseline gap-1.5", children: [
3963
- /* @__PURE__ */ jsx11("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: value.priceLabel }),
3964
- /* @__PURE__ */ jsx11(
4084
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-baseline gap-1.5", children: [
4085
+ /* @__PURE__ */ jsx12("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: value.priceLabel }),
4086
+ /* @__PURE__ */ jsx12(
3965
4087
  "p",
3966
4088
  {
3967
4089
  className: cn(
@@ -3983,7 +4105,7 @@ var PositionRow = ({
3983
4105
  onClaim,
3984
4106
  isClaiming = false
3985
4107
  }) => {
3986
- const labels = useLabels6().userProfile.positions;
4108
+ const labels = useLabels7().userProfile.positions;
3987
4109
  const model = toPositionRowViewModel(position, {
3988
4110
  avgPrefix: labels.avgPrefix,
3989
4111
  nowPrefix: labels.nowPrefix,
@@ -4025,7 +4147,7 @@ var PositionRow = ({
4025
4147
  handleDivClick();
4026
4148
  }
4027
4149
  };
4028
- return /* @__PURE__ */ jsx11(Wrapper, __spreadProps(__spreadValues({ className: sharedClassName }, wrapperProps), { children: /* @__PURE__ */ jsxs10(
4150
+ return /* @__PURE__ */ jsx12(Wrapper, __spreadProps(__spreadValues({ className: sharedClassName }, wrapperProps), { children: /* @__PURE__ */ jsxs11(
4029
4151
  "div",
4030
4152
  {
4031
4153
  className: cn(
@@ -4033,9 +4155,9 @@ var PositionRow = ({
4033
4155
  isClosed ? "md:gap-8" : "md:gap-6"
4034
4156
  ),
4035
4157
  children: [
4036
- /* @__PURE__ */ jsxs10("div", { className: "flex w-full items-center justify-between gap-3 md:w-auto md:min-w-0 md:flex-1 md:justify-start md:gap-4", children: [
4037
- /* @__PURE__ */ jsxs10("div", { className: "flex min-w-0 flex-1 items-center gap-3 md:gap-4", children: [
4038
- /* @__PURE__ */ jsx11("div", { className: "agg-position-image flex h-10 w-10 shrink-0 items-center justify-center md:h-15 md:w-15", children: /* @__PURE__ */ jsx11(
4158
+ /* @__PURE__ */ jsxs11("div", { className: "flex w-full items-center justify-between gap-3 md:w-auto md:min-w-0 md:flex-1 md:justify-start md:gap-4", children: [
4159
+ /* @__PURE__ */ jsxs11("div", { className: "flex min-w-0 flex-1 items-center gap-3 md:gap-4", children: [
4160
+ /* @__PURE__ */ jsx12("div", { className: "agg-position-image flex h-10 w-10 shrink-0 items-center justify-center md:h-15 md:w-15", children: /* @__PURE__ */ jsx12(
4039
4161
  RemoteImage,
4040
4162
  {
4041
4163
  src: optimizedImageUrl(model.thumbnailSrc, 60),
@@ -4043,11 +4165,11 @@ var PositionRow = ({
4043
4165
  className: "h-full w-full rounded-agg-sm object-cover"
4044
4166
  }
4045
4167
  ) }),
4046
- /* @__PURE__ */ jsxs10("div", { className: "flex min-w-0 flex-1 flex-col", children: [
4047
- /* @__PURE__ */ jsx11("p", { className: "agg-position-market min-w-0 overflow-hidden font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-foreground [display:-webkit-box] [-webkit-line-clamp:2] [-webkit-box-orient:vertical] md:block md:truncate md:text-agg-base md:leading-agg-6", children: model.title }),
4048
- /* @__PURE__ */ jsxs10("div", { className: "hidden min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-2 pt-1 md:flex", children: [
4049
- /* @__PURE__ */ jsx11(OutcomePill, { label: model.selectedOutcomeLabel }),
4050
- /* @__PURE__ */ jsx11(
4168
+ /* @__PURE__ */ jsxs11("div", { className: "flex min-w-0 flex-1 flex-col", children: [
4169
+ /* @__PURE__ */ jsx12("p", { className: "agg-position-market min-w-0 overflow-hidden font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-foreground [display:-webkit-box] [-webkit-line-clamp:2] [-webkit-box-orient:vertical] md:block md:truncate md:text-agg-base md:leading-agg-6", children: model.title }),
4170
+ /* @__PURE__ */ jsxs11("div", { className: "hidden min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-2 pt-1 md:flex", children: [
4171
+ /* @__PURE__ */ jsx12(OutcomePill, { label: model.selectedOutcomeLabel }),
4172
+ /* @__PURE__ */ jsx12(
4051
4173
  VenueShares,
4052
4174
  {
4053
4175
  model,
@@ -4059,10 +4181,10 @@ var PositionRow = ({
4059
4181
  ] })
4060
4182
  ] })
4061
4183
  ] }),
4062
- /* @__PURE__ */ jsx11("div", { className: "flex shrink-0 items-center justify-end md:hidden", children: /* @__PURE__ */ jsx11(OutcomePill, { label: model.selectedOutcomeLabel }) })
4184
+ /* @__PURE__ */ jsx12("div", { className: "flex shrink-0 items-center justify-end md:hidden", children: /* @__PURE__ */ jsx12(OutcomePill, { label: model.selectedOutcomeLabel }) })
4063
4185
  ] }),
4064
- isClosed ? /* @__PURE__ */ jsx11("div", { className: "md:hidden", children: /* @__PURE__ */ jsx11(ResolutionPill, { label: `${labels.resolutionHeader}: ${model.resolutionLabel}` }) }) : null,
4065
- /* @__PURE__ */ jsx11(
4186
+ isClosed ? /* @__PURE__ */ jsx12("div", { className: "md:hidden", children: /* @__PURE__ */ jsx12(ResolutionPill, { label: `${labels.resolutionHeader}: ${model.resolutionLabel}` }) }) : null,
4187
+ /* @__PURE__ */ jsx12(
4066
4188
  VenueShares,
4067
4189
  {
4068
4190
  model,
@@ -4071,14 +4193,14 @@ var PositionRow = ({
4071
4193
  className: "agg-position-venues flex min-w-0 flex-1 flex-wrap content-center items-center gap-x-3 gap-y-2 md:hidden"
4072
4194
  }
4073
4195
  ),
4074
- /* @__PURE__ */ jsxs10("div", { className: "flex w-full items-center justify-between gap-3 md:hidden", children: [
4075
- /* @__PURE__ */ jsxs10("div", { className: "flex min-w-0 items-center gap-5", children: [
4076
- /* @__PURE__ */ jsx11(TotalTradedCell, { model }),
4077
- /* @__PURE__ */ jsx11(PositionValueCell, { value: isClosed ? model.payout : model.currentValue })
4196
+ /* @__PURE__ */ jsxs11("div", { className: "flex w-full items-center justify-between gap-3 md:hidden", children: [
4197
+ /* @__PURE__ */ jsxs11("div", { className: "flex min-w-0 items-center gap-5", children: [
4198
+ /* @__PURE__ */ jsx12(TotalTradedCell, { model }),
4199
+ /* @__PURE__ */ jsx12(PositionValueCell, { value: isClosed ? model.payout : model.currentValue })
4078
4200
  ] }),
4079
- isClosed ? /* @__PURE__ */ jsx11(ResultBadge, { status: model.positionStatus, labels }) : /* @__PURE__ */ jsxs10("div", { className: "flex shrink-0 flex-col items-start justify-center gap-2", children: [
4080
- /* @__PURE__ */ jsx11(StatusBadge, { status: model.positionStatus, labels }),
4081
- model.canClaim ? /* @__PURE__ */ jsxs10(
4201
+ isClosed ? /* @__PURE__ */ jsx12(ResultBadge, { status: model.positionStatus, labels }) : /* @__PURE__ */ jsxs11("div", { className: "flex shrink-0 flex-col items-start justify-center gap-2", children: [
4202
+ /* @__PURE__ */ jsx12(StatusBadge, { status: model.positionStatus, labels }),
4203
+ model.canClaim ? /* @__PURE__ */ jsxs11(
4082
4204
  "button",
4083
4205
  {
4084
4206
  type: "button",
@@ -4087,48 +4209,48 @@ var PositionRow = ({
4087
4209
  disabled: isClaiming,
4088
4210
  "aria-busy": isClaiming || void 0,
4089
4211
  children: [
4090
- isClaiming ? /* @__PURE__ */ jsx11(LoadingIcon, { size: "small", className: "text-agg-primary" }) : null,
4212
+ isClaiming ? /* @__PURE__ */ jsx12(LoadingIcon, { size: "small", className: "text-agg-primary" }) : null,
4091
4213
  labels.claim
4092
4214
  ]
4093
4215
  }
4094
4216
  ) : null
4095
4217
  ] })
4096
4218
  ] }),
4097
- isClosed ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
4098
- /* @__PURE__ */ jsx11("div", { className: "hidden w-[90px] shrink-0 md:block lg:w-[120px]", children: /* @__PURE__ */ jsx11(ResolutionPill, { label: model.resolutionLabel }) }),
4099
- /* @__PURE__ */ jsx11(
4219
+ isClosed ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
4220
+ /* @__PURE__ */ jsx12("div", { className: "hidden w-[90px] shrink-0 md:block lg:w-[120px]", children: /* @__PURE__ */ jsx12(ResolutionPill, { label: model.resolutionLabel }) }),
4221
+ /* @__PURE__ */ jsx12(
4100
4222
  TotalTradedCell,
4101
4223
  {
4102
4224
  model,
4103
4225
  className: "hidden w-[110px] shrink-0 md:flex lg:w-[130px]"
4104
4226
  }
4105
4227
  ),
4106
- /* @__PURE__ */ jsx11(
4228
+ /* @__PURE__ */ jsx12(
4107
4229
  PositionValueCell,
4108
4230
  {
4109
4231
  value: model.payout,
4110
4232
  className: "hidden w-[130px] shrink-0 md:flex lg:w-[160px]"
4111
4233
  }
4112
4234
  ),
4113
- /* @__PURE__ */ jsx11("div", { className: "hidden w-[60px] shrink-0 items-center md:flex", children: /* @__PURE__ */ jsx11(ResultBadge, { status: model.positionStatus, labels }) })
4114
- ] }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
4115
- /* @__PURE__ */ jsx11(
4235
+ /* @__PURE__ */ jsx12("div", { className: "hidden w-[60px] shrink-0 items-center md:flex", children: /* @__PURE__ */ jsx12(ResultBadge, { status: model.positionStatus, labels }) })
4236
+ ] }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
4237
+ /* @__PURE__ */ jsx12(
4116
4238
  TotalTradedCell,
4117
4239
  {
4118
4240
  model,
4119
4241
  className: "hidden w-[120px] shrink-0 md:flex lg:w-[140px]"
4120
4242
  }
4121
4243
  ),
4122
- /* @__PURE__ */ jsx11(
4244
+ /* @__PURE__ */ jsx12(
4123
4245
  PositionValueCell,
4124
4246
  {
4125
4247
  value: model.currentValue,
4126
4248
  className: "hidden w-[130px] shrink-0 md:flex lg:w-[160px]"
4127
4249
  }
4128
4250
  ),
4129
- /* @__PURE__ */ jsxs10("div", { className: "hidden w-[100px] shrink-0 items-center gap-3 md:flex", children: [
4130
- /* @__PURE__ */ jsx11(StatusBadge, { status: model.positionStatus, labels }),
4131
- model.canClaim ? /* @__PURE__ */ jsxs10(
4251
+ /* @__PURE__ */ jsxs11("div", { className: "hidden w-[100px] shrink-0 items-center gap-3 md:flex", children: [
4252
+ /* @__PURE__ */ jsx12(StatusBadge, { status: model.positionStatus, labels }),
4253
+ model.canClaim ? /* @__PURE__ */ jsxs11(
4132
4254
  "button",
4133
4255
  {
4134
4256
  type: "button",
@@ -4137,14 +4259,14 @@ var PositionRow = ({
4137
4259
  disabled: isClaiming,
4138
4260
  "aria-busy": isClaiming || void 0,
4139
4261
  children: [
4140
- isClaiming ? /* @__PURE__ */ jsx11(LoadingIcon, { size: "small", className: "text-agg-primary" }) : null,
4262
+ isClaiming ? /* @__PURE__ */ jsx12(LoadingIcon, { size: "small", className: "text-agg-primary" }) : null,
4141
4263
  labels.claim
4142
4264
  ]
4143
4265
  }
4144
4266
  ) : null
4145
4267
  ] })
4146
4268
  ] }),
4147
- /* @__PURE__ */ jsx11("div", { className: "hidden w-5 shrink-0 items-center justify-end md:flex", children: /* @__PURE__ */ jsx11(
4269
+ /* @__PURE__ */ jsx12("div", { className: "hidden w-5 shrink-0 items-center justify-end md:flex", children: /* @__PURE__ */ jsx12(
4148
4270
  Icon,
4149
4271
  {
4150
4272
  name: "chevron-right",
@@ -4159,16 +4281,16 @@ var PositionRow = ({
4159
4281
  PositionRow.displayName = "PositionRow";
4160
4282
 
4161
4283
  // src/pages/user-profile/components/positions-activity.tsx
4162
- import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
4284
+ import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
4163
4285
  var tabItems = [
4164
4286
  { value: USER_PROFILE_TAB_POSITIONS, label: "Positions" },
4165
4287
  // Open orders is intentionally hidden from the user-profile tab group.
4166
4288
  // Restore by re-adding USER_PROFILE_TAB_OPEN_ORDERS here and the renderer below.
4167
4289
  { value: USER_PROFILE_TAB_ACTIVITY, label: "Activity" }
4168
4290
  ];
4169
- var TabRowsSkeleton = ({ ariaLabel }) => /* @__PURE__ */ jsx12("div", { role: "status", "aria-label": ariaLabel, className: "flex flex-col gap-3 sm:gap-4", children: Array.from({ length: 3 }).map((_, index, acc) => /* @__PURE__ */ jsxs11(Fragment4, { children: [
4170
- /* @__PURE__ */ jsx12("div", { className: "h-14 rounded-agg-sm bg-agg-secondary-hover/80 sm:h-16" }, index),
4171
- index < acc.length - 1 ? /* @__PURE__ */ jsx12("div", { className: "agg-position-divider h-px w-full shrink-0 bg-agg-separator", "aria-hidden": true }) : null
4291
+ var TabRowsSkeleton = ({ ariaLabel }) => /* @__PURE__ */ jsx13("div", { role: "status", "aria-label": ariaLabel, className: "flex flex-col gap-3 sm:gap-4", children: Array.from({ length: 3 }).map((_, index, acc) => /* @__PURE__ */ jsxs12(Fragment4, { children: [
4292
+ /* @__PURE__ */ jsx13("div", { className: "h-14 rounded-agg-sm bg-agg-secondary-hover/80 sm:h-16" }, index),
4293
+ index < acc.length - 1 ? /* @__PURE__ */ jsx13("div", { className: "agg-position-divider h-px w-full shrink-0 bg-agg-separator", "aria-hidden": true }) : null
4172
4294
  ] }, index)) });
4173
4295
  var PositionsActivity = ({
4174
4296
  activePositions = [],
@@ -4199,7 +4321,7 @@ var PositionsActivity = ({
4199
4321
  initialPositionFilter = "active",
4200
4322
  className
4201
4323
  }) => {
4202
- const positionsLabels = useLabels7().userProfile.positions;
4324
+ const positionsLabels = useLabels8().userProfile.positions;
4203
4325
  const isTabControlled = tab !== void 0;
4204
4326
  const [internalActiveTab, setInternalActiveTab] = useState10(
4205
4327
  tab != null ? tab : USER_PROFILE_TAB_POSITIONS
@@ -4329,7 +4451,7 @@ var PositionsActivity = ({
4329
4451
  isLoadingMoreActivities,
4330
4452
  onLoadMoreActivities
4331
4453
  ]);
4332
- return /* @__PURE__ */ jsxs11(
4454
+ return /* @__PURE__ */ jsxs12(
4333
4455
  "div",
4334
4456
  {
4335
4457
  className: cn(
@@ -4338,7 +4460,7 @@ var PositionsActivity = ({
4338
4460
  className
4339
4461
  ),
4340
4462
  children: [
4341
- /* @__PURE__ */ jsx12(
4463
+ /* @__PURE__ */ jsx13(
4342
4464
  Tabs,
4343
4465
  {
4344
4466
  items: tabItems,
@@ -4352,7 +4474,7 @@ var PositionsActivity = ({
4352
4474
  }
4353
4475
  }
4354
4476
  ),
4355
- /* @__PURE__ */ jsxs11(
4477
+ /* @__PURE__ */ jsxs12(
4356
4478
  "div",
4357
4479
  {
4358
4480
  className: cn(
@@ -4360,12 +4482,12 @@ var PositionsActivity = ({
4360
4482
  isPositionsTab ? "pt-4 md:pt-6" : "pt-0 md:pt-6"
4361
4483
  ),
4362
4484
  children: [
4363
- isPositionsTab ? /* @__PURE__ */ jsxs11("div", { className: "agg-toolbar flex flex-row items-start gap-3 px-4 sm:gap-5 sm:px-6", children: [
4364
- /* @__PURE__ */ jsx12("div", { className: "agg-position-filters flex h-10 w-[45%] max-w-[169px] shrink-0 items-stretch overflow-clip rounded-agg-sm border border-agg-separator sm:w-auto sm:min-w-[200px] sm:max-w-[270px]", children: USER_PROFILE_POSITION_FILTERS.map((filter, idx) => {
4485
+ isPositionsTab ? /* @__PURE__ */ jsxs12("div", { className: "agg-toolbar flex flex-row items-start gap-3 px-4 sm:gap-5 sm:px-6", children: [
4486
+ /* @__PURE__ */ jsx13("div", { className: "agg-position-filters flex h-10 w-[45%] max-w-[169px] shrink-0 items-stretch overflow-clip rounded-agg-sm border border-agg-separator sm:w-auto sm:min-w-[200px] sm:max-w-[270px]", children: USER_PROFILE_POSITION_FILTERS.map((filter, idx) => {
4365
4487
  const isActive = filter.value === positionFilter;
4366
- return /* @__PURE__ */ jsxs11("div", { className: "flex flex-1 items-stretch", children: [
4367
- idx > 0 ? /* @__PURE__ */ jsx12("div", { className: "w-px bg-agg-separator", "aria-hidden": true }) : null,
4368
- /* @__PURE__ */ jsx12(
4488
+ return /* @__PURE__ */ jsxs12("div", { className: "flex flex-1 items-stretch", children: [
4489
+ idx > 0 ? /* @__PURE__ */ jsx13("div", { className: "w-px bg-agg-separator", "aria-hidden": true }) : null,
4490
+ /* @__PURE__ */ jsx13(
4369
4491
  "button",
4370
4492
  {
4371
4493
  type: "button",
@@ -4380,7 +4502,7 @@ var PositionsActivity = ({
4380
4502
  )
4381
4503
  ] }, filter.value);
4382
4504
  }) }),
4383
- /* @__PURE__ */ jsxs11(
4505
+ /* @__PURE__ */ jsxs12(
4384
4506
  "div",
4385
4507
  {
4386
4508
  className: "agg-position-search relative flex w-full min-w-0 flex-1",
@@ -4391,9 +4513,9 @@ var PositionsActivity = ({
4391
4513
  setIsSearchFocused(false);
4392
4514
  },
4393
4515
  children: [
4394
- /* @__PURE__ */ jsx12("label", { className: "flex w-full min-w-0 flex-1", children: /* @__PURE__ */ jsxs11("div", { className: "flex h-11 w-full items-center gap-3 rounded-agg-sm border border-agg-separator bg-agg-secondary px-3 py-2.5 focus-within:border-2 focus-within:border-agg-primary sm:h-10", children: [
4395
- /* @__PURE__ */ jsx12(Icon, { name: "search", size: "small", className: "shrink-0 text-agg-muted-foreground" }),
4396
- /* @__PURE__ */ jsx12(
4516
+ /* @__PURE__ */ jsx13("label", { className: "flex w-full min-w-0 flex-1", children: /* @__PURE__ */ jsxs12("div", { className: "flex h-11 w-full items-center gap-3 rounded-agg-sm border border-agg-separator bg-agg-secondary px-3 py-2.5 focus-within:border-2 focus-within:border-agg-primary sm:h-10", children: [
4517
+ /* @__PURE__ */ jsx13(Icon, { name: "search", size: "small", className: "shrink-0 text-agg-muted-foreground" }),
4518
+ /* @__PURE__ */ jsx13(
4397
4519
  "input",
4398
4520
  {
4399
4521
  value: searchValue,
@@ -4408,7 +4530,7 @@ var PositionsActivity = ({
4408
4530
  }
4409
4531
  )
4410
4532
  ] }) }),
4411
- isSearchFocused && searchValue.trim() ? /* @__PURE__ */ jsx12("div", { className: "agg-position-search-results absolute left-0 right-0 top-full z-50 mt-1 w-full overflow-hidden rounded-agg-xl border border-agg-separator bg-agg-secondary pt-2 shadow-[0px_8px_16px_0px_rgba(0,0,0,0.1)]", children: searchResults.length > 0 ? /* @__PURE__ */ jsx12(
4533
+ isSearchFocused && searchValue.trim() ? /* @__PURE__ */ jsx13("div", { className: "agg-position-search-results absolute left-0 right-0 top-full z-50 mt-1 w-full overflow-hidden rounded-agg-xl border border-agg-separator bg-agg-secondary pt-2 shadow-[0px_8px_16px_0px_rgba(0,0,0,0.1)]", children: searchResults.length > 0 ? /* @__PURE__ */ jsx13(
4412
4534
  "ul",
4413
4535
  {
4414
4536
  className: "agg-position-search-results-list m-0 flex list-none flex-col p-0",
@@ -4421,9 +4543,9 @@ var PositionsActivity = ({
4421
4543
  setIsSearchFocused(false);
4422
4544
  onPositionClick == null ? void 0 : onPositionClick(item.raw);
4423
4545
  };
4424
- const innerContent = /* @__PURE__ */ jsxs11(Fragment5, { children: [
4425
- /* @__PURE__ */ jsxs11("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
4426
- /* @__PURE__ */ jsx12(
4546
+ const innerContent = /* @__PURE__ */ jsxs12(Fragment5, { children: [
4547
+ /* @__PURE__ */ jsxs12("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
4548
+ /* @__PURE__ */ jsx13(
4427
4549
  "img",
4428
4550
  {
4429
4551
  src: optimizedImageUrl2(item.thumbnailSrc, 48),
@@ -4431,16 +4553,16 @@ var PositionsActivity = ({
4431
4553
  className: "size-12 shrink-0 rounded-agg-lg object-cover"
4432
4554
  }
4433
4555
  ),
4434
- /* @__PURE__ */ jsxs11("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
4435
- /* @__PURE__ */ jsx12("p", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-base leading-agg-6 font-agg-normal text-agg-foreground", children: item.title }),
4436
- /* @__PURE__ */ jsxs11("div", { className: "flex min-w-0 items-center gap-2 text-agg-muted-foreground", children: [
4437
- /* @__PURE__ */ jsx12("p", { className: "shrink-0 whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-muted-foreground", children: item.metaPrimary }),
4438
- /* @__PURE__ */ jsx12("span", { className: "text-agg-muted-foreground", "aria-hidden": true, children: "\xB7" }),
4439
- /* @__PURE__ */ jsx12("p", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-muted-foreground", children: item.metaSecondary })
4556
+ /* @__PURE__ */ jsxs12("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
4557
+ /* @__PURE__ */ jsx13("p", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-base leading-agg-6 font-agg-normal text-agg-foreground", children: item.title }),
4558
+ /* @__PURE__ */ jsxs12("div", { className: "flex min-w-0 items-center gap-2 text-agg-muted-foreground", children: [
4559
+ /* @__PURE__ */ jsx13("p", { className: "shrink-0 whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-muted-foreground", children: item.metaPrimary }),
4560
+ /* @__PURE__ */ jsx13("span", { className: "text-agg-muted-foreground", "aria-hidden": true, children: "\xB7" }),
4561
+ /* @__PURE__ */ jsx13("p", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-muted-foreground", children: item.metaSecondary })
4440
4562
  ] })
4441
4563
  ] })
4442
4564
  ] }),
4443
- /* @__PURE__ */ jsx12(
4565
+ /* @__PURE__ */ jsx13(
4444
4566
  Icon,
4445
4567
  {
4446
4568
  name: "chevron-right",
@@ -4449,7 +4571,7 @@ var PositionsActivity = ({
4449
4571
  }
4450
4572
  )
4451
4573
  ] });
4452
- return /* @__PURE__ */ jsx12(
4574
+ return /* @__PURE__ */ jsx13(
4453
4575
  "li",
4454
4576
  {
4455
4577
  role: "presentation",
@@ -4457,7 +4579,7 @@ var PositionsActivity = ({
4457
4579
  "agg-position-search-result-item",
4458
4580
  index > 0 && "border-t border-agg-separator"
4459
4581
  ),
4460
- children: itemHref ? /* @__PURE__ */ jsx12(
4582
+ children: itemHref ? /* @__PURE__ */ jsx13(
4461
4583
  "a",
4462
4584
  {
4463
4585
  href: itemHref,
@@ -4472,7 +4594,7 @@ var PositionsActivity = ({
4472
4594
  },
4473
4595
  children: innerContent
4474
4596
  }
4475
- ) : /* @__PURE__ */ jsx12(
4597
+ ) : /* @__PURE__ */ jsx13(
4476
4598
  "button",
4477
4599
  {
4478
4600
  type: "button",
@@ -4486,34 +4608,34 @@ var PositionsActivity = ({
4486
4608
  );
4487
4609
  })
4488
4610
  }
4489
- ) : /* @__PURE__ */ jsx12("div", { className: "px-5 py-6 font-agg-sans text-agg-sm leading-agg-5 text-agg-muted-foreground", children: positionsLabels.noResults }) }) : null
4611
+ ) : /* @__PURE__ */ jsx13("div", { className: "px-5 py-6 font-agg-sans text-agg-sm leading-agg-5 text-agg-muted-foreground", children: positionsLabels.noResults }) }) : null
4490
4612
  ]
4491
4613
  }
4492
4614
  )
4493
4615
  ] }) : null,
4494
- /* @__PURE__ */ jsxs11("div", { className: "agg-positions-table-wrapper flex w-full gap-0 flex-col", children: [
4495
- /* @__PURE__ */ jsxs11("div", { className: "w-full px-4 sm:px-6", children: [
4496
- isPositionsTab && filteredPositions.length > 0 ? isClosedPositionsFilter ? /* @__PURE__ */ jsxs11("div", { className: "hidden items-start gap-8 px-0 md:flex", children: [
4497
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header min-w-0 flex-1", children: positionsLabels.marketHeader }),
4498
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header w-[90px] shrink-0 lg:w-[120px]", children: positionsLabels.resolutionHeader }),
4499
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header w-[110px] shrink-0 lg:w-[130px]", children: positionsLabels.totalTradedHeader }),
4500
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header w-[130px] shrink-0 lg:w-[160px]", children: positionsLabels.payoutHeader }),
4501
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header w-[60px] shrink-0", children: positionsLabels.resultHeader }),
4502
- /* @__PURE__ */ jsx12("span", { className: "hidden w-5 shrink-0 sm:block", "aria-hidden": true })
4503
- ] }) : /* @__PURE__ */ jsxs11("div", { className: "hidden items-start gap-6 px-0 md:flex", children: [
4504
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header min-w-0 flex-1", children: positionsLabels.marketHeader }),
4505
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header w-[120px] shrink-0 lg:w-[140px]", children: positionsLabels.totalTradedHeader }),
4506
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header w-[130px] shrink-0 lg:w-[160px]", children: positionsLabels.currentValueHeader }),
4507
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header w-[100px] shrink-0", children: positionsLabels.statusHeader }),
4508
- /* @__PURE__ */ jsx12("span", { className: "hidden w-5 shrink-0 sm:block", "aria-hidden": true })
4616
+ /* @__PURE__ */ jsxs12("div", { className: "agg-positions-table-wrapper flex w-full gap-0 flex-col", children: [
4617
+ /* @__PURE__ */ jsxs12("div", { className: "w-full px-4 sm:px-6", children: [
4618
+ isPositionsTab && filteredPositions.length > 0 ? isClosedPositionsFilter ? /* @__PURE__ */ jsxs12("div", { className: "hidden items-start gap-8 px-0 md:flex", children: [
4619
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header min-w-0 flex-1", children: positionsLabels.marketHeader }),
4620
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header w-[90px] shrink-0 lg:w-[120px]", children: positionsLabels.resolutionHeader }),
4621
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header w-[110px] shrink-0 lg:w-[130px]", children: positionsLabels.totalTradedHeader }),
4622
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header w-[130px] shrink-0 lg:w-[160px]", children: positionsLabels.payoutHeader }),
4623
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header w-[60px] shrink-0", children: positionsLabels.resultHeader }),
4624
+ /* @__PURE__ */ jsx13("span", { className: "hidden w-5 shrink-0 sm:block", "aria-hidden": true })
4625
+ ] }) : /* @__PURE__ */ jsxs12("div", { className: "hidden items-start gap-6 px-0 md:flex", children: [
4626
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header min-w-0 flex-1", children: positionsLabels.marketHeader }),
4627
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header w-[120px] shrink-0 lg:w-[140px]", children: positionsLabels.totalTradedHeader }),
4628
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header w-[130px] shrink-0 lg:w-[160px]", children: positionsLabels.currentValueHeader }),
4629
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header w-[100px] shrink-0", children: positionsLabels.statusHeader }),
4630
+ /* @__PURE__ */ jsx13("span", { className: "hidden w-5 shrink-0 sm:block", "aria-hidden": true })
4509
4631
  ] }) : null,
4510
- isActivityTab && filteredActivities.length > 0 ? /* @__PURE__ */ jsxs11("div", { className: "hidden items-start gap-6 px-0 md:flex", children: [
4511
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header w-22 shrink-0", children: "Type" }),
4512
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header min-w-0 flex-1", children: "Market" }),
4513
- /* @__PURE__ */ jsx12("p", { className: "agg-user-profile-table-header w-[120px] shrink-0 text-right", children: "Amount" })
4632
+ isActivityTab && filteredActivities.length > 0 ? /* @__PURE__ */ jsxs12("div", { className: "hidden items-start gap-6 px-0 md:flex", children: [
4633
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header w-22 shrink-0", children: "Type" }),
4634
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header min-w-0 flex-1", children: "Market" }),
4635
+ /* @__PURE__ */ jsx13("p", { className: "agg-user-profile-table-header w-[120px] shrink-0 text-right", children: "Amount" })
4514
4636
  ] }) : null
4515
4637
  ] }),
4516
- /* @__PURE__ */ jsx12(
4638
+ /* @__PURE__ */ jsx13(
4517
4639
  "div",
4518
4640
  {
4519
4641
  ref: rowsScrollRef,
@@ -4525,8 +4647,8 @@ var PositionsActivity = ({
4525
4647
  "[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-agg-muted-foreground/50",
4526
4648
  "[&::-webkit-scrollbar-thumb:hover]:bg-agg-muted-foreground/70"
4527
4649
  ),
4528
- children: isPositionsTab ? /* @__PURE__ */ jsxs11("div", { className: "agg-portfolio-list flex flex-col gap-5", children: [
4529
- isLoadingPositions && filteredPositions.length === 0 ? /* @__PURE__ */ jsx12(TabRowsSkeleton, { ariaLabel: "Loading positions" }) : positionsError && filteredPositions.length === 0 ? /* @__PURE__ */ jsx12(
4650
+ children: isPositionsTab ? /* @__PURE__ */ jsxs12("div", { className: "agg-portfolio-list flex flex-col gap-5", children: [
4651
+ isLoadingPositions && filteredPositions.length === 0 ? /* @__PURE__ */ jsx13(TabRowsSkeleton, { ariaLabel: "Loading positions" }) : positionsError && filteredPositions.length === 0 ? /* @__PURE__ */ jsx13(
4530
4652
  EmptyState,
4531
4653
  {
4532
4654
  title: "Unable to load positions",
@@ -4534,15 +4656,15 @@ var PositionsActivity = ({
4534
4656
  }
4535
4657
  ) : filteredPositions.length > 0 ? filteredPositions.map((position, index) => {
4536
4658
  var _a;
4537
- return /* @__PURE__ */ jsxs11(Fragment4, { children: [
4538
- index > 0 ? /* @__PURE__ */ jsx12(
4659
+ return /* @__PURE__ */ jsxs12(Fragment4, { children: [
4660
+ index > 0 ? /* @__PURE__ */ jsx13(
4539
4661
  "div",
4540
4662
  {
4541
4663
  className: "agg-position-divider h-px w-full shrink-0 bg-agg-separator",
4542
4664
  "aria-hidden": true
4543
4665
  }
4544
4666
  ) : null,
4545
- /* @__PURE__ */ jsx12(
4667
+ /* @__PURE__ */ jsx13(
4546
4668
  PositionRow,
4547
4669
  {
4548
4670
  position,
@@ -4556,15 +4678,15 @@ var PositionsActivity = ({
4556
4678
  }
4557
4679
  )
4558
4680
  ] }, position.id);
4559
- }) : /* @__PURE__ */ jsx12(
4681
+ }) : /* @__PURE__ */ jsx13(
4560
4682
  EmptyState,
4561
4683
  {
4562
4684
  title: "No positions yet",
4563
4685
  description: "Your open trades will appear here once you place an order."
4564
4686
  }
4565
4687
  ),
4566
- isLoadingMorePositions ? /* @__PURE__ */ jsx12(TabRowsSkeleton, { ariaLabel: "Loading more positions" }) : null,
4567
- hasMorePositions ? /* @__PURE__ */ jsx12(
4688
+ isLoadingMorePositions ? /* @__PURE__ */ jsx13(TabRowsSkeleton, { ariaLabel: "Loading more positions" }) : null,
4689
+ hasMorePositions ? /* @__PURE__ */ jsx13(
4568
4690
  "div",
4569
4691
  {
4570
4692
  ref: positionsLoadMoreRef,
@@ -4572,22 +4694,22 @@ var PositionsActivity = ({
4572
4694
  "aria-hidden": true
4573
4695
  }
4574
4696
  ) : null
4575
- ] }) : /* @__PURE__ */ jsxs11("div", { className: "agg-activity-list flex flex-col gap-5", children: [
4576
- isLoadingActivities && filteredActivities.length === 0 ? /* @__PURE__ */ jsx12(TabRowsSkeleton, { ariaLabel: "Loading activity" }) : activitiesError && filteredActivities.length === 0 ? /* @__PURE__ */ jsx12(
4697
+ ] }) : /* @__PURE__ */ jsxs12("div", { className: "agg-activity-list flex flex-col gap-5", children: [
4698
+ isLoadingActivities && filteredActivities.length === 0 ? /* @__PURE__ */ jsx13(TabRowsSkeleton, { ariaLabel: "Loading activity" }) : activitiesError && filteredActivities.length === 0 ? /* @__PURE__ */ jsx13(
4577
4699
  EmptyState,
4578
4700
  {
4579
4701
  title: "Unable to load activity",
4580
4702
  description: "Please try again in a moment."
4581
4703
  }
4582
- ) : filteredActivities.length > 0 ? filteredActivities.map((activity, index) => /* @__PURE__ */ jsxs11(Fragment4, { children: [
4583
- index > 0 ? /* @__PURE__ */ jsx12(
4704
+ ) : filteredActivities.length > 0 ? filteredActivities.map((activity, index) => /* @__PURE__ */ jsxs12(Fragment4, { children: [
4705
+ index > 0 ? /* @__PURE__ */ jsx13(
4584
4706
  "div",
4585
4707
  {
4586
4708
  className: "agg-activity-divider h-px w-full shrink-0 bg-agg-separator",
4587
4709
  "aria-hidden": true
4588
4710
  }
4589
4711
  ) : null,
4590
- /* @__PURE__ */ jsx12(
4712
+ /* @__PURE__ */ jsx13(
4591
4713
  ActivityRow,
4592
4714
  {
4593
4715
  activity,
@@ -4595,15 +4717,15 @@ var PositionsActivity = ({
4595
4717
  onClick: onActivityClick
4596
4718
  }
4597
4719
  )
4598
- ] }, activity.id)) : /* @__PURE__ */ jsx12(
4720
+ ] }, activity.id)) : /* @__PURE__ */ jsx13(
4599
4721
  EmptyState,
4600
4722
  {
4601
4723
  title: "No activity yet",
4602
4724
  description: "Your trading activity will appear here."
4603
4725
  }
4604
4726
  ),
4605
- isLoadingMoreActivities ? /* @__PURE__ */ jsx12(TabRowsSkeleton, { ariaLabel: "Loading more activity" }) : null,
4606
- hasMoreActivities ? /* @__PURE__ */ jsx12(
4727
+ isLoadingMoreActivities ? /* @__PURE__ */ jsx13(TabRowsSkeleton, { ariaLabel: "Loading more activity" }) : null,
4728
+ hasMoreActivities ? /* @__PURE__ */ jsx13(
4607
4729
  "div",
4608
4730
  {
4609
4731
  ref: activitiesLoadMoreRef,
@@ -4625,14 +4747,14 @@ var PositionsActivity = ({
4625
4747
  PositionsActivity.displayName = "PositionsActivity";
4626
4748
 
4627
4749
  // src/pages/user-profile/components/positions-value-card.tsx
4628
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
4750
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
4629
4751
  var PositionsValueCard = ({
4630
4752
  label = "Positions Value",
4631
4753
  valueLabel,
4632
4754
  isLoading = false,
4633
4755
  className
4634
4756
  }) => {
4635
- return /* @__PURE__ */ jsxs12(
4757
+ return /* @__PURE__ */ jsxs13(
4636
4758
  "div",
4637
4759
  {
4638
4760
  className: cn(
@@ -4641,8 +4763,8 @@ var PositionsValueCard = ({
4641
4763
  className
4642
4764
  ),
4643
4765
  children: [
4644
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2", children: [
4645
- /* @__PURE__ */ jsx13(
4766
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
4767
+ /* @__PURE__ */ jsx14(
4646
4768
  "svg",
4647
4769
  {
4648
4770
  xmlns: "http://www.w3.org/2000/svg",
@@ -4650,7 +4772,7 @@ var PositionsValueCard = ({
4650
4772
  height: "16",
4651
4773
  viewBox: "0 0 16 16",
4652
4774
  fill: "none",
4653
- children: /* @__PURE__ */ jsx13(
4775
+ children: /* @__PURE__ */ jsx14(
4654
4776
  "path",
4655
4777
  {
4656
4778
  d: "M16 7.99957C16 8.36757 15.702 8.66623 15.3333 8.66623H13.6893C13.388 8.66623 13.1233 8.86957 13.0453 9.15957L11.9273 13.3209C11.8 13.7376 11.444 13.9996 11.0333 13.9996H11.022C10.6067 13.9949 10.252 13.7229 10.1393 13.3236L7.95667 4.50623L5.838 11.9989C5.71067 12.3969 5.378 12.6496 4.98467 12.6649C4.57667 12.6869 4.23867 12.4549 4.088 12.0902L3.02133 9.10757C2.926 8.84357 2.674 8.66557 2.39333 8.66557H0.666667C0.298 8.66557 0 8.3669 0 7.9989C0 7.6309 0.298 7.33223 0.666667 7.33223H2.394C3.23667 7.33223 3.99267 7.8649 4.27733 8.65823L4.90267 10.4089L7.092 2.66557C7.226 2.2489 7.57667 1.9809 7.99933 1.9989C8.41133 2.00623 8.76333 2.27757 8.876 2.67357L11.0487 11.4509L11.7567 8.81357C11.9907 7.94157 12.7847 7.33223 13.688 7.33223H15.332C15.7007 7.33223 15.9987 7.6309 15.9987 7.9989L16 7.99957Z",
@@ -4659,22 +4781,51 @@ var PositionsValueCard = ({
4659
4781
  )
4660
4782
  }
4661
4783
  ),
4662
- /* @__PURE__ */ jsx13("span", { className: "font-agg-sans text-agg-base leading-6 font-agg-normal text-agg-foreground", children: label })
4784
+ /* @__PURE__ */ jsx14("span", { className: "font-agg-sans text-agg-base leading-6 font-agg-normal text-agg-foreground", children: label })
4663
4785
  ] }),
4664
- /* @__PURE__ */ jsx13("div", { className: "agg-portfolio-value font-agg-sans text-agg-2xl leading-8 font-agg-bold text-agg-foreground", children: isLoading ? /* @__PURE__ */ jsx13("div", { role: "status", "aria-label": "Loading positions value", children: /* @__PURE__ */ jsx13(SkeletonBlock, { className: "h-8 w-24 rounded-agg-sm" }) }) : valueLabel })
4786
+ /* @__PURE__ */ jsx14("div", { className: "agg-portfolio-value font-agg-sans text-agg-2xl leading-8 font-agg-bold text-agg-foreground", children: isLoading ? /* @__PURE__ */ jsx14("div", { role: "status", "aria-label": "Loading positions value", children: /* @__PURE__ */ jsx14(SkeletonBlock, { className: "h-8 w-24 rounded-agg-sm" }) }) : valueLabel })
4665
4787
  ]
4666
4788
  }
4667
4789
  );
4668
4790
  };
4669
4791
  PositionsValueCard.displayName = "PositionsValueCard";
4670
4792
 
4793
+ // src/pages/user-profile/transaction-explorer.ts
4794
+ var AGG_TX_EXPLORER_URLS = {
4795
+ "1": "https://etherscan.io/tx/",
4796
+ "56": "https://bscscan.com/tx/",
4797
+ "137": "https://polygonscan.com/tx/",
4798
+ "1337": "https://app.hyperliquid.xyz/explorer/tx/",
4799
+ "8453": "https://basescan.org/tx/",
4800
+ "42161": "https://arbiscan.io/tx/",
4801
+ "792703809": "https://solscan.io/tx/"
4802
+ };
4803
+ var buildAggTxExplorerHref = (chainId, txHash) => {
4804
+ if (chainId === null || chainId === void 0) return void 0;
4805
+ if (!txHash) return void 0;
4806
+ const normalizedChainId = String(chainId).trim();
4807
+ const normalizedTxHash = txHash.trim();
4808
+ if (!normalizedChainId || !normalizedTxHash) return void 0;
4809
+ const baseUrl = AGG_TX_EXPLORER_URLS[normalizedChainId];
4810
+ if (!baseUrl) return void 0;
4811
+ return `${baseUrl}${normalizedTxHash}`;
4812
+ };
4813
+
4671
4814
  // src/pages/user-profile/components/user-info-card.tsx
4672
- import { optimizedImageUrl as optimizedImageUrl3, useLabels as useLabels8 } from "@agg-build/hooks";
4815
+ import { optimizedImageUrl as optimizedImageUrl3, useLabels as useLabels9 } from "@agg-build/hooks";
4816
+
4817
+ // src/primitives/conditional-wrapper.tsx
4818
+ var ConditionalWrapper = ({
4819
+ condition,
4820
+ wrapper,
4821
+ children
4822
+ }) => condition ? wrapper(children) : children;
4823
+ ConditionalWrapper.displayName = "ConditionalWrapper";
4673
4824
 
4674
4825
  // src/pages/user-profile/components/default-avatar.tsx
4675
- import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
4826
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
4676
4827
  var DefaultAvatar = ({ className }) => {
4677
- return /* @__PURE__ */ jsxs13(
4828
+ return /* @__PURE__ */ jsxs14(
4678
4829
  "svg",
4679
4830
  {
4680
4831
  xmlns: "http://www.w3.org/2000/svg",
@@ -4685,15 +4836,15 @@ var DefaultAvatar = ({ className }) => {
4685
4836
  className: cn("shrink-0 text-agg-muted-foreground", className),
4686
4837
  "aria-hidden": true,
4687
4838
  children: [
4688
- /* @__PURE__ */ jsxs13("g", { clipPath: "url(#clip0_default_avatar)", children: [
4689
- /* @__PURE__ */ jsx14(
4839
+ /* @__PURE__ */ jsxs14("g", { clipPath: "url(#clip0_default_avatar)", children: [
4840
+ /* @__PURE__ */ jsx15(
4690
4841
  "path",
4691
4842
  {
4692
4843
  d: "M60 120C93.1371 120 120 93.1371 120 60C120 26.8629 93.1371 0 60 0C26.8629 0 0 26.8629 0 60C0 93.1371 26.8629 120 60 120Z",
4693
4844
  fill: "var(--agg-color-secondary-hover)"
4694
4845
  }
4695
4846
  ),
4696
- /* @__PURE__ */ jsx14(
4847
+ /* @__PURE__ */ jsx15(
4697
4848
  "path",
4698
4849
  {
4699
4850
  d: "M60 120C93.1371 120 120 93.1371 120 60C120 26.8629 93.1371 0 60 0C26.8629 0 0 26.8629 0 60C0 93.1371 26.8629 120 60 120Z",
@@ -4701,7 +4852,7 @@ var DefaultAvatar = ({ className }) => {
4701
4852
  fillOpacity: "0.12"
4702
4853
  }
4703
4854
  ),
4704
- /* @__PURE__ */ jsx14(
4855
+ /* @__PURE__ */ jsx15(
4705
4856
  "path",
4706
4857
  {
4707
4858
  d: "M73.7338 64.1259C80.4187 59.6756 84.8276 52.0804 84.8276 43.4487C84.8276 29.7376 73.7111 18.6211 60 18.6211C46.2890 18.6211 35.1724 29.7376 35.1724 43.4487C35.1724 52.0804 39.5814 59.6756 46.2662 64.1259C46.2662 64.1259 46.2683 64.1280 46.2704 64.1280C46.2683 64.1280 46.2683 64.1259 46.2683 64.1259C30.2669 68.9487 17.8076 81.9356 13.7959 98.2742L13.7980 98.2763C14.4518 99.0645 15.1304 99.8342 15.8235 100.589C15.9911 100.774 16.1669 100.949 16.3387 101.129C16.8724 101.696 17.4124 102.255 17.9669 102.801C18.1966 103.027 18.4304 103.244 18.6642 103.465C19.1773 103.954 19.6966 104.436 20.2262 104.905C20.4890 105.137 20.7559 105.367 21.0207 105.594C21.5400 106.039 22.0656 106.476 22.6014 106.902C22.8828 107.127 23.1662 107.349 23.4497 107.570C23.9918 107.988 24.5421 108.394 25.0987 108.791C25.3862 108.996 25.6697 109.205 25.9614 109.405C26.5490 109.811 27.1469 110.200 27.7490 110.585C28.0200 110.756 28.2849 110.934 28.5580 111.104C29.2531 111.532 29.9607 111.942 30.6745 112.343C30.8628 112.449 31.0469 112.562 31.2373 112.666C32.1600 113.171 33.0973 113.655 34.0490 114.112C34.0718 114.122 34.0966 114.133 34.1193 114.143C35.0276 114.578 35.9504 114.989 36.8835 115.378C37.1731 115.500 37.4690 115.608 37.7607 115.724C38.4352 115.993 39.1097 116.258 39.7966 116.502C40.1607 116.632 40.5290 116.750 40.8952 116.874C41.5200 117.085 42.1490 117.290 42.7821 117.478C43.1835 117.598 43.5869 117.710 43.9924 117.822C44.6049 117.991 45.2214 118.153 45.8442 118.304C46.2642 118.405 46.6862 118.502 47.1104 118.596C47.7331 118.732 48.3580 118.856 48.9869 118.972C49.4131 119.051 49.8373 119.131 50.2676 119.200C50.9173 119.305 51.5711 119.394 52.2269 119.479C52.6407 119.533 53.0524 119.593 53.4683 119.636C54.1924 119.715 54.9228 119.771 55.6531 119.822C56.0069 119.847 56.3566 119.885 56.7104 119.903C57.8007 119.965 58.8952 120 60 120C61.1049 120 62.1993 119.965 63.2897 119.907C63.6435 119.889 63.9952 119.851 64.3469 119.827C65.0793 119.775 65.8097 119.719 66.5318 119.640C66.9476 119.595 67.3593 119.537 67.7731 119.483C68.4290 119.398 69.0828 119.309 69.7324 119.204C70.1607 119.134 70.5869 119.055 71.0131 118.976C71.6421 118.860 72.2690 118.736 72.8897 118.600C73.3138 118.507 73.7359 118.409 74.1559 118.308C74.7766 118.157 75.3931 117.996 76.0076 117.826C76.4111 117.714 76.8166 117.602 77.2180 117.482C77.8531 117.292 78.4800 117.087 79.1049 116.878C79.4711 116.754 79.8414 116.636 80.2035 116.506C80.8883 116.260 81.5649 115.997 82.2393 115.728C82.5311 115.612 82.8269 115.502 83.1166 115.382C84.0456 114.994 84.9642 114.586 85.8683 114.151C85.8952 114.139 85.9242 114.127 85.9511 114.114C86.9028 113.657 87.8400 113.173 88.7628 112.668C88.9531 112.565 89.1373 112.451 89.3256 112.345C90.0393 111.944 90.7469 111.534 91.4421 111.106C91.7152 110.938 91.9821 110.760 92.2511 110.587C92.8531 110.202 93.4511 109.811 94.0387 109.407C94.3283 109.207 94.6138 109.000 94.9014 108.793C95.4580 108.394 96.0083 107.988 96.5504 107.572C96.8359 107.353 97.1173 107.129 97.3987 106.904C97.9324 106.478 98.4600 106.041 98.9793 105.596C99.2462 105.369 99.5131 105.139 99.7738 104.907C100.303 104.438 100.823 103.956 101.336 103.467C101.568 103.246 101.803 103.027 102.033 102.803C102.588 102.257 103.130 101.698 103.661 101.131C103.831 100.949 104.007 100.774 104.177 100.591C104.870 99.8363 105.548 99.0666 106.202 98.2783L106.204 98.2763C102.195 81.9356 89.7352 68.9487 73.7338 64.1259Z",
@@ -4710,7 +4861,7 @@ var DefaultAvatar = ({ className }) => {
4710
4861
  }
4711
4862
  )
4712
4863
  ] }),
4713
- /* @__PURE__ */ jsx14("defs", { children: /* @__PURE__ */ jsx14("clipPath", { id: "clip0_default_avatar", children: /* @__PURE__ */ jsx14("rect", { width: "120", height: "120", fill: "white" }) }) })
4864
+ /* @__PURE__ */ jsx15("defs", { children: /* @__PURE__ */ jsx15("clipPath", { id: "clip0_default_avatar", children: /* @__PURE__ */ jsx15("rect", { width: "120", height: "120", fill: "white" }) }) })
4714
4865
  ]
4715
4866
  }
4716
4867
  );
@@ -4718,7 +4869,7 @@ var DefaultAvatar = ({ className }) => {
4718
4869
  DefaultAvatar.displayName = "DefaultAvatar";
4719
4870
 
4720
4871
  // src/pages/user-profile/components/user-info-card.tsx
4721
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
4872
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
4722
4873
  var UserInfoCard = ({
4723
4874
  user,
4724
4875
  onEditProfile,
@@ -4728,10 +4879,10 @@ var UserInfoCard = ({
4728
4879
  className
4729
4880
  }) => {
4730
4881
  var _a;
4731
- const labels = useLabels8();
4882
+ const labels = useLabels9();
4732
4883
  const wallets = (_a = user.connectedWallets) != null ? _a : [];
4733
4884
  const hasWallets = wallets.length > 0;
4734
- return /* @__PURE__ */ jsxs14(
4885
+ return /* @__PURE__ */ jsxs15(
4735
4886
  "div",
4736
4887
  {
4737
4888
  className: cn(
@@ -4740,26 +4891,26 @@ var UserInfoCard = ({
4740
4891
  className
4741
4892
  ),
4742
4893
  children: [
4743
- /* @__PURE__ */ jsxs14("div", { className: "agg-profile-header flex w-full flex-row flex-wrap items-center gap-4 sm:gap-5 pt-5", children: [
4744
- /* @__PURE__ */ jsx15("div", { className: "agg-profile-avatar shrink-0", children: user.avatarUrl ? /* @__PURE__ */ jsx15(
4894
+ /* @__PURE__ */ jsxs15("div", { className: "agg-profile-header flex w-full flex-row flex-wrap items-center gap-4 sm:gap-5 pt-5", children: [
4895
+ /* @__PURE__ */ jsx16("div", { className: "agg-profile-avatar shrink-0", children: user.avatarUrl ? /* @__PURE__ */ jsx16(
4745
4896
  RemoteImage,
4746
4897
  {
4747
4898
  src: optimizedImageUrl3(user.avatarUrl, 120),
4748
4899
  alt: user.username,
4749
4900
  className: "h-20 w-20 rounded-full object-cover sm:h-[120px] sm:w-[120px]"
4750
4901
  }
4751
- ) : /* @__PURE__ */ jsx15(DefaultAvatar, { className: "h-20 w-20 rounded-full sm:h-[120px] sm:w-[120px]" }) }),
4752
- /* @__PURE__ */ jsxs14("div", { className: "agg-profile-details flex min-w-0 w-full flex-1 flex-col gap-3 sm:gap-4", children: [
4753
- /* @__PURE__ */ jsxs14("div", { className: "flex flex-wrap items-center justify-between gap-3 sm:gap-4", children: [
4754
- /* @__PURE__ */ jsxs14("div", { className: "flex min-w-0 items-center gap-2", children: [
4755
- /* @__PURE__ */ jsx15("h2", { className: "truncate text-[22px] leading-7 font-agg-bold text-agg-foreground sm:agg-type-heading", children: user.username }),
4756
- user.socialLinks && user.socialLinks.length > 0 ? /* @__PURE__ */ jsx15("div", { className: "agg-profile-social-links flex items-center gap-2", children: user.socialLinks.map((social) => {
4902
+ ) : /* @__PURE__ */ jsx16(DefaultAvatar, { className: "h-20 w-20 rounded-full sm:h-[120px] sm:w-[120px]" }) }),
4903
+ /* @__PURE__ */ jsxs15("div", { className: "agg-profile-details flex min-w-0 w-full flex-1 flex-col gap-3 sm:gap-4", children: [
4904
+ /* @__PURE__ */ jsxs15("div", { className: "flex flex-wrap items-center justify-between gap-3 sm:gap-4", children: [
4905
+ /* @__PURE__ */ jsxs15("div", { className: "flex min-w-0 items-center gap-2", children: [
4906
+ /* @__PURE__ */ jsx16("h2", { className: "truncate text-[22px] leading-7 font-agg-bold text-agg-foreground sm:agg-type-heading", children: user.username }),
4907
+ user.socialLinks && user.socialLinks.length > 0 ? /* @__PURE__ */ jsx16("div", { className: "agg-profile-social-links flex items-center gap-2", children: user.socialLinks.map((social) => {
4757
4908
  const iconName = social.platform === "twitter" ? "twitter" : social.platform === "discord" ? "discord" : "telegram";
4758
- const iconNode = /* @__PURE__ */ jsx15("span", { className: "flex size-7 shrink-0 items-center justify-center rounded-full border border-agg-separator bg-agg-secondary sm:size-8", children: /* @__PURE__ */ jsx15(Icon, { name: iconName, size: "small", className: "text-agg-foreground" }) });
4909
+ const iconNode = /* @__PURE__ */ jsx16("span", { className: "flex size-7 shrink-0 items-center justify-center rounded-full border border-agg-separator bg-agg-secondary sm:size-8", children: /* @__PURE__ */ jsx16(Icon, { name: iconName, size: "small", className: "text-agg-foreground" }) });
4759
4910
  if (!social.handle) {
4760
- return /* @__PURE__ */ jsx15("span", { children: iconNode }, `${social.platform}-icon`);
4911
+ return /* @__PURE__ */ jsx16("span", { children: iconNode }, `${social.platform}-icon`);
4761
4912
  }
4762
- return /* @__PURE__ */ jsx15(
4913
+ return /* @__PURE__ */ jsx16(
4763
4914
  "a",
4764
4915
  {
4765
4916
  href: social.handle,
@@ -4772,55 +4923,55 @@ var UserInfoCard = ({
4772
4923
  );
4773
4924
  }) }) : null
4774
4925
  ] }),
4775
- onEditProfile ? /* @__PURE__ */ jsxs14(
4926
+ onEditProfile ? /* @__PURE__ */ jsxs15(
4776
4927
  "button",
4777
4928
  {
4778
4929
  type: "button",
4779
4930
  onClick: onEditProfile,
4780
4931
  className: "hidden sm:flex shrink-0 cursor-pointer items-center gap-1.5 bg-transparent text-agg-primary hover:opacity-80",
4781
4932
  children: [
4782
- /* @__PURE__ */ jsx15(Icon, { name: "pencil", size: "small", className: "text-agg-primary" }),
4783
- /* @__PURE__ */ jsx15("span", { className: "text-agg-base font-agg-bold leading-6", children: "Edit" })
4933
+ /* @__PURE__ */ jsx16(Icon, { name: "pencil", size: "small", className: "text-agg-primary" }),
4934
+ /* @__PURE__ */ jsx16("span", { className: "text-agg-base font-agg-bold leading-6", children: "Edit" })
4784
4935
  ]
4785
4936
  }
4786
4937
  ) : null
4787
4938
  ] }),
4788
- hasWallets || !!user.socialHandle ? /* @__PURE__ */ jsxs14("div", { className: "agg-profile-accounts flex w-full flex-col gap-2.5 sm:gap-3", children: [
4939
+ hasWallets || !!user.socialHandle ? /* @__PURE__ */ jsxs15("div", { className: "agg-profile-accounts flex w-full flex-col gap-2.5 sm:gap-3", children: [
4789
4940
  wallets.map((wallet, idx) => {
4790
4941
  const chainLower = wallet.chain.toLowerCase();
4791
4942
  const iconName = chainLower === "solana" || chainLower === "svm" ? "solana" : "ethereum";
4792
- return /* @__PURE__ */ jsxs14(
4943
+ return /* @__PURE__ */ jsxs15(
4793
4944
  "div",
4794
4945
  {
4795
4946
  className: "flex min-w-0 flex-wrap items-center gap-2 sm:gap-3",
4796
4947
  children: [
4797
- /* @__PURE__ */ jsx15("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx15(Icon, { name: iconName, size: "small", className: "text-agg-foreground" }) }),
4798
- /* @__PURE__ */ jsx15("span", { className: "min-w-0 truncate text-agg-sm font-agg-normal leading-5 text-agg-foreground sm:text-agg-base sm:leading-6", children: wallet.displayAddress })
4948
+ /* @__PURE__ */ jsx16("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx16(Icon, { name: iconName, size: "small", className: "text-agg-foreground" }) }),
4949
+ /* @__PURE__ */ jsx16("span", { className: "min-w-0 truncate text-agg-sm font-agg-normal leading-5 text-agg-foreground sm:text-agg-base sm:leading-6", children: wallet.displayAddress })
4799
4950
  ]
4800
4951
  },
4801
4952
  `wallet-${idx}`
4802
4953
  );
4803
4954
  }),
4804
- user.socialHandle ? /* @__PURE__ */ jsx15("div", { className: "flex min-w-0 items-center gap-2 sm:gap-3", children: /* @__PURE__ */ jsx15("span", { className: "min-w-0 truncate text-agg-sm font-agg-normal leading-5 text-agg-foreground sm:text-agg-base sm:leading-6", children: user.socialHandle }) }) : null
4955
+ user.socialHandle ? /* @__PURE__ */ jsx16("div", { className: "flex min-w-0 items-center gap-2 sm:gap-3", children: /* @__PURE__ */ jsx16("span", { className: "min-w-0 truncate text-agg-sm font-agg-normal leading-5 text-agg-foreground sm:text-agg-base sm:leading-6", children: user.socialHandle }) }) : null
4805
4956
  ] }) : null
4806
4957
  ] })
4807
4958
  ] }),
4808
- (onDeposit || onWithdraw) && /* @__PURE__ */ jsxs14("div", { className: "agg-profile-actions flex w-full flex-1 items-center gap-3 py-5", children: [
4809
- onDeposit ? /* @__PURE__ */ jsx15(
4959
+ (onDeposit || onWithdraw) && /* @__PURE__ */ jsxs15("div", { className: "agg-profile-actions flex w-full flex-1 items-center gap-3 py-5", children: [
4960
+ onDeposit ? /* @__PURE__ */ jsx16(
4810
4961
  ConditionalWrapper,
4811
4962
  {
4812
4963
  condition: isDepositBlocked,
4813
- wrapper: (children) => /* @__PURE__ */ jsx15(
4964
+ wrapper: (children) => /* @__PURE__ */ jsx16(
4814
4965
  Tooltip,
4815
4966
  {
4816
- content: /* @__PURE__ */ jsx15("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
4967
+ content: /* @__PURE__ */ jsx16("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
4817
4968
  size: "small",
4818
4969
  side: "bottom",
4819
4970
  sideOffset: 4,
4820
4971
  children
4821
4972
  }
4822
4973
  ),
4823
- children: /* @__PURE__ */ jsx15(
4974
+ children: /* @__PURE__ */ jsx16(
4824
4975
  Button,
4825
4976
  __spreadProps(__spreadValues({
4826
4977
  variant: "primary",
@@ -4832,7 +4983,7 @@ var UserInfoCard = ({
4832
4983
  )
4833
4984
  }
4834
4985
  ) : null,
4835
- onWithdraw ? /* @__PURE__ */ jsx15(
4986
+ onWithdraw ? /* @__PURE__ */ jsx16(
4836
4987
  Button,
4837
4988
  {
4838
4989
  variant: "secondary",
@@ -4842,15 +4993,15 @@ var UserInfoCard = ({
4842
4993
  children: labels.auth.withdraw
4843
4994
  }
4844
4995
  ) : null,
4845
- onEditProfile ? /* @__PURE__ */ jsxs14(
4996
+ onEditProfile ? /* @__PURE__ */ jsxs15(
4846
4997
  "button",
4847
4998
  {
4848
4999
  type: "button",
4849
5000
  onClick: onEditProfile,
4850
5001
  className: "flex sm:hidden shrink-0 cursor-pointer items-center gap-1.5 bg-transparent px-2 py-2 text-agg-primary hover:opacity-80",
4851
5002
  children: [
4852
- /* @__PURE__ */ jsx15(Icon, { name: "pencil", size: "small", className: "text-agg-primary" }),
4853
- /* @__PURE__ */ jsx15("span", { className: "text-agg-sm font-agg-bold leading-5", children: "Edit" })
5003
+ /* @__PURE__ */ jsx16(Icon, { name: "pencil", size: "small", className: "text-agg-primary" }),
5004
+ /* @__PURE__ */ jsx16("span", { className: "text-agg-sm font-agg-bold leading-5", children: "Edit" })
4854
5005
  ]
4855
5006
  }
4856
5007
  ) : null
@@ -4861,29 +5012,8 @@ var UserInfoCard = ({
4861
5012
  };
4862
5013
  UserInfoCard.displayName = "UserInfoCard";
4863
5014
 
4864
- // src/pages/user-profile/transaction-explorer.ts
4865
- var AGG_TX_EXPLORER_URLS = {
4866
- "1": "https://etherscan.io/tx/",
4867
- "56": "https://bscscan.com/tx/",
4868
- "137": "https://polygonscan.com/tx/",
4869
- "1337": "https://app.hyperliquid.xyz/explorer/tx/",
4870
- "8453": "https://basescan.org/tx/",
4871
- "42161": "https://arbiscan.io/tx/",
4872
- "792703809": "https://solscan.io/tx/"
4873
- };
4874
- var buildAggTxExplorerHref = (chainId, txHash) => {
4875
- if (chainId === null || chainId === void 0) return void 0;
4876
- if (!txHash) return void 0;
4877
- const normalizedChainId = String(chainId).trim();
4878
- const normalizedTxHash = txHash.trim();
4879
- if (!normalizedChainId || !normalizedTxHash) return void 0;
4880
- const baseUrl = AGG_TX_EXPLORER_URLS[normalizedChainId];
4881
- if (!baseUrl) return void 0;
4882
- return `${baseUrl}${normalizedTxHash}`;
4883
- };
4884
-
4885
5015
  // src/pages/user-profile/index.tsx
4886
- import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
5016
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
4887
5017
  var currencyFormatter = new Intl.NumberFormat("en-US", {
4888
5018
  style: "currency",
4889
5019
  currency: "USD",
@@ -5214,11 +5344,49 @@ var toRedeemPayoutAmountLabel = (item) => {
5214
5344
  sign: "+"
5215
5345
  });
5216
5346
  };
5347
+ var toRedeemTransactionAmountLabel = ({
5348
+ leg,
5349
+ totalPayoutRaw,
5350
+ legCount
5351
+ }) => {
5352
+ var _a;
5353
+ if (legCount === 1 && totalPayoutRaw != null) {
5354
+ return `+${formatScaledNumberTwoDecimals(totalPayoutRaw)} ${leg.payoutTokenSymbol || "USDC"}`;
5355
+ }
5356
+ return toTokenAmountLabel({
5357
+ amountRaw: (_a = leg.payoutAmountRaw) != null ? _a : "0",
5358
+ tokenSymbol: leg.payoutTokenSymbol || "USDC",
5359
+ chainId: leg.chainId,
5360
+ sign: "+"
5361
+ });
5362
+ };
5363
+ var toRedeemTransactions = (item) => {
5364
+ const legs = Array.isArray(item.legs) ? item.legs : [];
5365
+ return legs.map((leg) => {
5366
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
5367
+ return {
5368
+ id: leg.id,
5369
+ venue: leg.venue,
5370
+ chainId: (_a = leg.chainId) != null ? _a : void 0,
5371
+ txHash: (_b = leg.txHash) != null ? _b : void 0,
5372
+ marketTitle: (_d = (_c = leg.venueMarket) == null ? void 0 : _c.question) != null ? _d : "Market",
5373
+ outcomeLabel: (_h = (_g = (_e = leg.venueMarketOutcome) == null ? void 0 : _e.title) != null ? _g : (_f = leg.venueMarketOutcome) == null ? void 0 : _f.label) != null ? _h : "",
5374
+ amountLabel: toRedeemTransactionAmountLabel({
5375
+ leg,
5376
+ totalPayoutRaw: item.totalPayoutRaw,
5377
+ legCount: legs.length
5378
+ }),
5379
+ transactionLabel: (_j = (_i = shortenAddress(leg.txHash)) != null ? _i : leg.txHash) != null ? _j : "Transaction",
5380
+ errorMessage: (_k = leg.errorMessage) != null ? _k : void 0,
5381
+ hasError: TRANSFER_FAILED_STATUSES.has(leg.status.toLowerCase()) || Boolean((_l = leg.errorMessage) == null ? void 0 : _l.trim())
5382
+ };
5383
+ });
5384
+ };
5217
5385
  var POSITION_ROW_VENUE_ORDER = [
5218
- Venue.polymarket,
5219
- Venue.kalshi,
5220
- Venue.opinion,
5221
- Venue.limitless
5386
+ Venue2.polymarket,
5387
+ Venue2.kalshi,
5388
+ Venue2.opinion,
5389
+ Venue2.limitless
5222
5390
  ];
5223
5391
  function venueBreakdownSortKey(venue) {
5224
5392
  const idx = POSITION_ROW_VENUE_ORDER.indexOf(venue);
@@ -5297,7 +5465,7 @@ var UserProfilePage = ({
5297
5465
  const { isDepositBlocked } = useGeoBlock();
5298
5466
  const balanceState = useAggBalance();
5299
5467
  const client = useAggClient();
5300
- const labels = useLabels9();
5468
+ const labels = useLabels10();
5301
5469
  const {
5302
5470
  trading: { executionMode: configuredExecutionMode }
5303
5471
  } = useSdkUiConfig5();
@@ -5318,6 +5486,7 @@ var UserProfilePage = ({
5318
5486
  return [...new Set(fromBalance)].sort((a, b) => a.localeCompare(b));
5319
5487
  }, [balanceState, shouldUseHookData]);
5320
5488
  const [positionFilter, setPositionFilter] = useState11(initialPositionFilter);
5489
+ const [selectedClaimActivity, setSelectedClaimActivity] = useState11(null);
5321
5490
  const resolvedExecutionMode = executionMode != null ? executionMode : configuredExecutionMode;
5322
5491
  const queryExecutionMode = resolvedExecutionMode === "paper" ? "paper" : void 0;
5323
5492
  const activePositionsQuery = useExecutionPositions({
@@ -5382,6 +5551,22 @@ var UserProfilePage = ({
5382
5551
  },
5383
5552
  [startClaim]
5384
5553
  );
5554
+ const handleActivityRowClick = useCallback5(
5555
+ (activity) => {
5556
+ if (activity.kind === "redeem") {
5557
+ setSelectedClaimActivity(activity);
5558
+ return;
5559
+ }
5560
+ onActivityClick == null ? void 0 : onActivityClick(activity);
5561
+ },
5562
+ [onActivityClick]
5563
+ );
5564
+ const handleClaimTransactionSelect = useCallback5((transaction) => {
5565
+ const href = buildAggTxExplorerHref(transaction.chainId, transaction.txHash);
5566
+ setSelectedClaimActivity(null);
5567
+ if (!href || typeof window === "undefined") return;
5568
+ window.open(href, "_blank", "noopener,noreferrer");
5569
+ }, []);
5385
5570
  useEffect10(() => {
5386
5571
  if (!shouldUseHookData || !isAuthenticated) {
5387
5572
  setProfileUser(void 0);
@@ -5575,6 +5760,7 @@ var UserProfilePage = ({
5575
5760
  const isFailed = status === "failed";
5576
5761
  const hasError = isFailed || !!(errorMessage == null ? void 0 : errorMessage.trim());
5577
5762
  const titleByStatus = labels.userProfile.activity.redeemStatusTitles;
5763
+ const transactions = toRedeemTransactions(redeemItem);
5578
5764
  return {
5579
5765
  kind: "redeem",
5580
5766
  id: redeemItem.id,
@@ -5590,7 +5776,8 @@ var UserProfilePage = ({
5590
5776
  marketTitle: (_C = (_B = firstLeg == null ? void 0 : firstLeg.venueMarket) == null ? void 0 : _B.question) != null ? _C : "Market",
5591
5777
  outcomeLabel: (_G = (_F = (_D = firstLeg == null ? void 0 : firstLeg.venueMarketOutcome) == null ? void 0 : _D.title) != null ? _F : (_E = firstLeg == null ? void 0 : firstLeg.venueMarketOutcome) == null ? void 0 : _E.label) != null ? _G : "",
5592
5778
  amountLabel: status === "failed" || status === "canceled" ? ZERO_AMOUNT_LABEL : toRedeemPayoutAmountLabel(redeemItem),
5593
- timeLabel
5779
+ timeLabel,
5780
+ transactions
5594
5781
  };
5595
5782
  }
5596
5783
  logUnknownActivityType(item);
@@ -5701,7 +5888,7 @@ var UserProfilePage = ({
5701
5888
  const source = closedPositions != null ? closedPositions : adaptPositionGroups(closedPositionsQuery.positions);
5702
5889
  return source.filter(shouldIncludeByShares);
5703
5890
  }, [closedPositions, closedPositionsQuery.positions, adaptPositionGroups]);
5704
- return /* @__PURE__ */ jsx16(AggErrorBoundary, { onError, children: /* @__PURE__ */ jsx16(
5891
+ return /* @__PURE__ */ jsx17(AggErrorBoundary, { onError, children: /* @__PURE__ */ jsx17(
5705
5892
  "section",
5706
5893
  {
5707
5894
  className: cn(
@@ -5709,7 +5896,7 @@ var UserProfilePage = ({
5709
5896
  "w-full mx-auto px-6 lg:px-10 pb-10 max-w-[1440px]",
5710
5897
  classNames == null ? void 0 : classNames.root
5711
5898
  ),
5712
- children: /* @__PURE__ */ jsxs15(
5899
+ children: /* @__PURE__ */ jsxs16(
5713
5900
  "div",
5714
5901
  {
5715
5902
  className: cn(
@@ -5719,8 +5906,8 @@ var UserProfilePage = ({
5719
5906
  classNames == null ? void 0 : classNames.topRow
5720
5907
  ),
5721
5908
  children: [
5722
- /* @__PURE__ */ jsxs15("div", { className: "agg-profile-summary grid grid-cols-1 gap-6 lg:grid-cols-[1fr_minmax(300px,420px)] lg:items-stretch lg:gap-8", children: [
5723
- /* @__PURE__ */ jsx16(
5909
+ /* @__PURE__ */ jsxs16("div", { className: "agg-profile-summary grid grid-cols-1 gap-6 lg:grid-cols-[1fr_minmax(300px,420px)] lg:items-stretch lg:gap-8", children: [
5910
+ /* @__PURE__ */ jsx17(
5724
5911
  "div",
5725
5912
  {
5726
5913
  className: cn(
@@ -5728,7 +5915,7 @@ var UserProfilePage = ({
5728
5915
  "flex min-w-0 flex-1 flex-col gap-4 sm:gap-6 h-full",
5729
5916
  classNames == null ? void 0 : classNames.leftColumn
5730
5917
  ),
5731
- children: /* @__PURE__ */ jsx16(
5918
+ children: /* @__PURE__ */ jsx17(
5732
5919
  UserInfoCard,
5733
5920
  {
5734
5921
  user: resolvedUser,
@@ -5741,7 +5928,7 @@ var UserProfilePage = ({
5741
5928
  )
5742
5929
  }
5743
5930
  ),
5744
- /* @__PURE__ */ jsxs15(
5931
+ /* @__PURE__ */ jsxs16(
5745
5932
  "div",
5746
5933
  {
5747
5934
  className: cn(
@@ -5749,14 +5936,14 @@ var UserProfilePage = ({
5749
5936
  classNames == null ? void 0 : classNames.rightColumn
5750
5937
  ),
5751
5938
  children: [
5752
- /* @__PURE__ */ jsx16(
5939
+ /* @__PURE__ */ jsx17(
5753
5940
  PositionsValueCard,
5754
5941
  {
5755
5942
  valueLabel: positionsValueLabel,
5756
5943
  isLoading: isPositionsValueLoading
5757
5944
  }
5758
5945
  ),
5759
- /* @__PURE__ */ jsx16(
5946
+ /* @__PURE__ */ jsx17(
5760
5947
  AvailableBalanceCard,
5761
5948
  {
5762
5949
  valueLabel: availableBalanceLabel,
@@ -5774,7 +5961,7 @@ var UserProfilePage = ({
5774
5961
  }
5775
5962
  )
5776
5963
  ] }),
5777
- /* @__PURE__ */ jsx16(
5964
+ /* @__PURE__ */ jsx17(
5778
5965
  PositionsActivity,
5779
5966
  {
5780
5967
  tab,
@@ -5787,8 +5974,11 @@ var UserProfilePage = ({
5787
5974
  getPositionHref,
5788
5975
  onClaim: handleClaimPosition,
5789
5976
  claimingPositionKeys: claimingKeys,
5790
- onActivityClick,
5791
- getActivityHref,
5977
+ onActivityClick: handleActivityRowClick,
5978
+ getActivityHref: (activity) => {
5979
+ if (activity.kind === "redeem") return void 0;
5980
+ return getActivityHref == null ? void 0 : getActivityHref(activity);
5981
+ },
5792
5982
  onOpenOrderClick,
5793
5983
  onCancelOrder: handleCancelOrder,
5794
5984
  cancellingOrderIds: cancellingOrderIds != null ? cancellingOrderIds : internalCancellingIds,
@@ -5822,6 +6012,17 @@ var UserProfilePage = ({
5822
6012
  } : void 0,
5823
6013
  className: classNames == null ? void 0 : classNames.positionsActivity
5824
6014
  }
6015
+ ),
6016
+ /* @__PURE__ */ jsx17(
6017
+ ClaimActivityBreakdownModal,
6018
+ {
6019
+ activity: selectedClaimActivity,
6020
+ onOpenChange: (open) => {
6021
+ if (open) return;
6022
+ setSelectedClaimActivity(null);
6023
+ },
6024
+ onTransactionSelect: handleClaimTransactionSelect
6025
+ }
5825
6026
  )
5826
6027
  ]
5827
6028
  }