@agg-build/ui 4.11.1 → 4.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -13754,6 +13754,8 @@ var buildMarketDetailsModel = ({
13754
13754
  var import_hooks46 = require("@agg-build/hooks");
13755
13755
  var PRICE_PRECISION = 1e6;
13756
13756
  var SIZE_PRECISION = 1e8;
13757
+ var DISPLAY_PRICE_BUCKETS_PER_UNIT = 1e3;
13758
+ var DISPLAY_ROUNDING_PRECISION = 1e9;
13757
13759
  var POSITIVE_OUTCOME_KEYS = /* @__PURE__ */ new Set(["yes", "y", "true", "up", "buy", "long"]);
13758
13760
  var NEGATIVE_OUTCOME_KEYS = /* @__PURE__ */ new Set(["no", "n", "false", "down", "sell", "short"]);
13759
13761
  var roundTo = (value, precision) => {
@@ -13768,6 +13770,10 @@ var fromScaled = (value, precision) => {
13768
13770
  var toPriceKey = (price) => {
13769
13771
  return String(toScaled(price, PRICE_PRECISION));
13770
13772
  };
13773
+ var toDisplayPrice = (price) => {
13774
+ const bucketSize = DISPLAY_ROUNDING_PRECISION / DISPLAY_PRICE_BUCKETS_PER_UNIT;
13775
+ return Math.round(toScaled(price, DISPLAY_ROUNDING_PRECISION) / bucketSize) / DISPLAY_PRICE_BUCKETS_PER_UNIT;
13776
+ };
13771
13777
  var normalizeOutcomeLabel = (value) => {
13772
13778
  if (typeof value !== "string") return "";
13773
13779
  return value.trim().toLowerCase().replace(/[_-]+/g, " ").replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ");
@@ -13881,7 +13887,7 @@ var buildRowsFromAccumulator = ({
13881
13887
  venues,
13882
13888
  price: roundTo(level.price, PRICE_PRECISION),
13883
13889
  size,
13884
- total: roundTo(level.price * size, SIZE_PRECISION),
13890
+ total: roundTo(level.notional, SIZE_PRECISION),
13885
13891
  tone,
13886
13892
  barScale: 0,
13887
13893
  venueBreakdown,
@@ -13899,6 +13905,7 @@ var accumulateSideLevels = ({
13899
13905
  orderbooksByOutcomeId
13900
13906
  }) => {
13901
13907
  const levelsByPrice = /* @__PURE__ */ new Map();
13908
+ let bestPrice = null;
13902
13909
  const includedOutcomeIds = /* @__PURE__ */ new Set();
13903
13910
  const missingOutcomeIds = /* @__PURE__ */ new Set();
13904
13911
  eligibleOutcomes.forEach((eligibleOutcome) => {
@@ -13914,18 +13921,25 @@ var accumulateSideLevels = ({
13914
13921
  includedOutcomeIds.add(eligibleOutcome.outcomeId);
13915
13922
  venueLevels.forEach((level) => {
13916
13923
  var _a;
13917
- const priceKey = toPriceKey(level.price);
13924
+ if (bestPrice == null || (side === "asks" ? level.price < bestPrice : level.price > bestPrice)) {
13925
+ bestPrice = level.price;
13926
+ }
13927
+ const displayPrice = toDisplayPrice(level.price);
13928
+ const priceKey = toPriceKey(displayPrice);
13918
13929
  const scaledSize = toScaled(level.size, SIZE_PRECISION);
13930
+ const notional = level.price * level.size;
13919
13931
  const currentLevel = levelsByPrice.get(priceKey);
13920
13932
  if (currentLevel) {
13921
13933
  currentLevel.sizeScaled += scaledSize;
13934
+ currentLevel.notional += notional;
13922
13935
  currentLevel.venueBreakdownScaled[eligibleOutcome.venue] = ((_a = currentLevel.venueBreakdownScaled[eligibleOutcome.venue]) != null ? _a : 0) + scaledSize;
13923
13936
  currentLevel.sourceOutcomeIds.add(eligibleOutcome.outcomeId);
13924
13937
  return;
13925
13938
  }
13926
13939
  levelsByPrice.set(priceKey, {
13927
- price: level.price,
13940
+ price: displayPrice,
13928
13941
  sizeScaled: scaledSize,
13942
+ notional,
13929
13943
  venueBreakdownScaled: {
13930
13944
  [eligibleOutcome.venue]: scaledSize
13931
13945
  },
@@ -13935,6 +13949,7 @@ var accumulateSideLevels = ({
13935
13949
  });
13936
13950
  return {
13937
13951
  levelsByPrice,
13952
+ bestPrice,
13938
13953
  includedOutcomeIds,
13939
13954
  missingOutcomeIds
13940
13955
  };
@@ -14102,7 +14117,7 @@ var mergeVenueOutcomeOrderbooks = ({
14102
14117
  eligibleOutcomes,
14103
14118
  orderbooksByOutcomeId
14104
14119
  }) => {
14105
- var _a, _b, _c, _d, _e, _f;
14120
+ var _a, _b;
14106
14121
  const bidState = accumulateSideLevels({
14107
14122
  side: "bids",
14108
14123
  eligibleOutcomes,
@@ -14125,8 +14140,8 @@ var mergeVenueOutcomeOrderbooks = ({
14125
14140
  levelsByPrice: askState.levelsByPrice,
14126
14141
  fallbackVenue: (_b = eligibleOutcomes[0]) == null ? void 0 : _b.venue
14127
14142
  });
14128
- const bestBid = (_d = (_c = bidRows[0]) == null ? void 0 : _c.price) != null ? _d : null;
14129
- const bestAsk = (_f = (_e = askRows[0]) == null ? void 0 : _e.price) != null ? _f : null;
14143
+ const bestBid = bidState.bestPrice;
14144
+ const bestAsk = askState.bestPrice;
14130
14145
  return {
14131
14146
  askRows,
14132
14147
  bidRows,
@@ -21818,6 +21833,72 @@ var parseDecimalString = (value) => {
21818
21833
  if (!Number.isFinite(parsed) || parsed <= 0) return null;
21819
21834
  return parsed;
21820
21835
  };
21836
+ var getPlaceOrderBuyPayout = (quoteData) => {
21837
+ var _a;
21838
+ return (_a = quoteData.estimatedPayout) != null ? _a : quoteData.totalFilled;
21839
+ };
21840
+ var getPlaceOrderSellProceeds = (quoteData) => Math.max(
21841
+ 0,
21842
+ quoteData.rawExecCost - quoteData.fills.reduce((sum, fill) => {
21843
+ var _a, _b;
21844
+ return sum + ((_a = fill.venueFee) != null ? _a : 0) + ((_b = fill.builderFee) != null ? _b : 0);
21845
+ }, 0)
21846
+ );
21847
+ var getPlaceOrderQuoteValue = (quoteData, tradeSide) => tradeSide === "sell" ? getPlaceOrderSellProceeds(quoteData) : getPlaceOrderBuyPayout(quoteData);
21848
+ var resolvePlaceOrderNetResult = ({
21849
+ quoteData,
21850
+ tradeSide,
21851
+ shares,
21852
+ usd,
21853
+ terminalOrderEvents,
21854
+ submittedOrders
21855
+ }) => {
21856
+ if (!quoteData) return tradeSide === "sell" ? usd : shares;
21857
+ const actualEvents = (terminalOrderEvents != null ? terminalOrderEvents : []).filter(
21858
+ (event) => (event.event === "filled" || event.event === "partial_fill") && (tradeSide === "buy" ? event.filledAmountRaw != null : event.actualSharesRaw != null)
21859
+ );
21860
+ if (actualEvents.length) {
21861
+ return actualEvents.reduce((sum, event) => {
21862
+ var _a;
21863
+ const outcomeId = (_a = submittedOrders == null ? void 0 : submittedOrders.find(
21864
+ (order) => order.orderId === event.orderId
21865
+ )) == null ? void 0 : _a.outcomeId;
21866
+ const venueFills = quoteData.fills.filter((fill) => fill.venue === event.venue);
21867
+ const exactFill = venueFills.find((fill) => fill.venueMarketOutcomeId === outcomeId);
21868
+ const fills = exactFill ? [exactFill] : venueFills;
21869
+ const legQuote = fills.length ? __spreadProps(__spreadValues({}, quoteData), {
21870
+ fills,
21871
+ totalFilled: fills.reduce((total, fill) => total + fill.venueQty, 0),
21872
+ rawExecCost: fills.reduce((total, fill) => total + fill.avgPrice * fill.venueQty, 0),
21873
+ estimatedPayout: fills.reduce(
21874
+ (total, fill) => {
21875
+ var _a2;
21876
+ return total + fill.venueQty - ((_a2 = fill.settlementFee) != null ? _a2 : 0);
21877
+ },
21878
+ 0
21879
+ )
21880
+ }) : quoteData;
21881
+ const actual = resolveActualExecutionEconomics({
21882
+ quoteData: legQuote,
21883
+ tradeSide,
21884
+ terminalOrderEvents: [event],
21885
+ submittedOrders
21886
+ });
21887
+ return sum + resolvePlaceOrderNetResult({
21888
+ quoteData: legQuote,
21889
+ tradeSide,
21890
+ shares: actual.actualTotalFilled,
21891
+ usd: actual.actualRawExecCost
21892
+ });
21893
+ }, 0);
21894
+ }
21895
+ if (tradeSide === "sell") {
21896
+ const gross = quoteData.rawExecCost;
21897
+ return gross > 0 ? usd * (getPlaceOrderSellProceeds(quoteData) / gross) : usd;
21898
+ }
21899
+ const filled = quoteData.totalFilled;
21900
+ return filled > 0 ? shares * (getPlaceOrderBuyPayout(quoteData) / filled) : shares;
21901
+ };
21821
21902
  var resolvePlaceOrderQuoteResult = ({
21822
21903
  labels,
21823
21904
  quoteData,
@@ -21826,7 +21907,7 @@ var resolvePlaceOrderQuoteResult = ({
21826
21907
  if (!quoteData || quoteData.totalFilled <= 0) return null;
21827
21908
  const avgPrice = getPlaceOrderAverageExecutionPrice(quoteData);
21828
21909
  if (avgPrice == null) return null;
21829
- const quoteValue = tradeSide === "sell" ? quoteData.rawExecCost : quoteData.totalFilled;
21910
+ const quoteValue = getPlaceOrderQuoteValue(quoteData, tradeSide);
21830
21911
  return {
21831
21912
  hint: labels.averagePrice(avgPrice),
21832
21913
  value: getTradingValueLabel({
@@ -21944,7 +22025,7 @@ var buildLiveRouteCards = ({
21944
22025
  eventVenues = [],
21945
22026
  geoBlockedVenues: inheritedGeoBlockedVenues
21946
22027
  }) => {
21947
- var _a, _b, _c, _d;
22028
+ var _a, _b, _c, _d, _e;
21948
22029
  const geoBlockedVenues = extractGeoBlockedVenues(quoteData.warnings);
21949
22030
  for (const venue of inheritedGeoBlockedVenues != null ? inheritedGeoBlockedVenues : []) {
21950
22031
  geoBlockedVenues.add(venue);
@@ -21959,6 +22040,7 @@ var buildLiveRouteCards = ({
21959
22040
  );
21960
22041
  const averageExecutionPrice = (_b = getPlaceOrderAverageExecutionPrice(quoteData)) != null ? _b : void 0;
21961
22042
  const primaryWinnerVenue = quoteData.fills.length === 1 ? primaryVenue : void 0;
22043
+ const primaryWinnerOutcomeId = quoteData.fills.length === 1 ? (_c = quoteData.fills[0]) == null ? void 0 : _c.venueMarketOutcomeId : void 0;
21962
22044
  const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.some((f) => geoBlockedVenues.has(f.venue));
21963
22045
  const primaryCard = primaryResult ? isPrimaryRouteGeoBlocked ? isSplit ? null : {
21964
22046
  id: "live-route",
@@ -21968,7 +22050,7 @@ var buildLiveRouteCards = ({
21968
22050
  parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0
21969
22051
  ),
21970
22052
  executionPrice: averageExecutionPrice,
21971
- numericValue: tradeSide === "sell" ? quoteData.rawExecCost : quoteData.totalFilled,
22053
+ numericValue: getPlaceOrderQuoteValue(quoteData, tradeSide),
21972
22054
  quoteData,
21973
22055
  value: primaryResult.value,
21974
22056
  venue: parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
@@ -21981,7 +22063,7 @@ var buildLiveRouteCards = ({
21981
22063
  label: isSplit ? labels.orderSplitting : getTradingVenueLabel(
21982
22064
  parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0
21983
22065
  ),
21984
- numericValue: tradeSide === "sell" ? quoteData.rawExecCost : quoteData.totalFilled,
22066
+ numericValue: getPlaceOrderQuoteValue(quoteData, tradeSide),
21985
22067
  quoteData,
21986
22068
  rows: mapQuoteDataToRoutingRows(quoteData, tradeSide),
21987
22069
  description: labels.splitOrderDescription,
@@ -21991,7 +22073,7 @@ var buildLiveRouteCards = ({
21991
22073
  requiresSharedKyc: primaryRequiresSharedKyc
21992
22074
  } : null;
21993
22075
  const soloCardId = (prefix, sq) => `${prefix}-${sq.venue}${sq.venueMarketOutcomeId ? `-${sq.venueMarketOutcomeId}` : ""}`;
21994
- const soloCards = ((_c = quoteData.venueSoloQuotes) != null ? _c : []).filter(
22076
+ const soloCards = ((_d = quoteData.venueSoloQuotes) != null ? _d : []).filter(
21995
22077
  (sq) => sq.status === "ok" && sq.unavailableReason !== "venue_unavailable" && sq.avgPrice !== null && sq.filledQty > 0 && // No `sq.quoteId` requirement: a solo is preview-only whenever its own
21996
22078
  // funding lane is short (API nulls the quoteId), which is NOT always the
21997
22079
  // whole-quote `insufficient_balance` case — an off-chain winner (Kalshi
@@ -21999,9 +22081,9 @@ var buildLiveRouteCards = ({
21999
22081
  // stays unfunded. Gating on the quoteId silently hid that venue from the
22000
22082
  // comparison list entirely. The panel's Deposit CTA fires off the same
22001
22083
  // balance condition, and `handleExecuteQuote` rejects an empty quoteId.
22002
- sq.venue !== primaryWinnerVenue
22084
+ (primaryWinnerOutcomeId && sq.venueMarketOutcomeId ? sq.venueMarketOutcomeId !== primaryWinnerOutcomeId : sq.venue !== primaryWinnerVenue)
22003
22085
  ).map((sq) => {
22004
- var _a2, _b2;
22086
+ var _a2, _b2, _c2, _d2, _e2, _f;
22005
22087
  const parsedVenue = parseVenue(sq.venue);
22006
22088
  const venue = parsedVenue.success ? parsedVenue.data : void 0;
22007
22089
  if (geoBlockedVenues.has(sq.venue)) {
@@ -22011,10 +22093,10 @@ var buildLiveRouteCards = ({
22011
22093
  hint: labels.venueUnavailableInRegion,
22012
22094
  kind: "venue",
22013
22095
  label: getTradingVenueLabel(venue),
22014
- numericValue: sq.filledQty,
22096
+ numericValue: (_a2 = sq.estimatedPayout) != null ? _a2 : sq.filledQty,
22015
22097
  quoteData,
22016
22098
  value: getTradingValueLabel({
22017
- amount: sq.filledQty,
22099
+ amount: (_b2 = sq.estimatedPayout) != null ? _b2 : sq.filledQty,
22018
22100
  minimumFractionDigits: 2,
22019
22101
  maximumFractionDigits: 2
22020
22102
  }),
@@ -22028,7 +22110,7 @@ var buildLiveRouteCards = ({
22028
22110
  // Preview-only solos intentionally carry no executable quoteId; the card
22029
22111
  // should still render for comparison, while the CTA stays disabled until
22030
22112
  // the user is funded and requotes.
22031
- quoteId: (_a2 = sq.quoteId) != null ? _a2 : "",
22113
+ quoteId: (_c2 = sq.quoteId) != null ? _c2 : "",
22032
22114
  fills: sq.fills.map((f) => __spreadValues({}, f)),
22033
22115
  totalFilled: sq.filledQty,
22034
22116
  rawExecCost: sq.rawExecCost,
@@ -22041,7 +22123,7 @@ var buildLiveRouteCards = ({
22041
22123
  // primary route's breakdown in place, so selecting a bridge-free venue
22042
22124
  // still showed the primary's bridging charge. Falls back to the
22043
22125
  // primary only when the router omitted one (non-"ok" solos).
22044
- feeBreakdown: (_b2 = sq.feeBreakdown) != null ? _b2 : quoteData.feeBreakdown
22126
+ feeBreakdown: (_d2 = sq.feeBreakdown) != null ? _d2 : quoteData.feeBreakdown
22045
22127
  }), sq.quoteId ? { status: "ok", error: void 0 } : null);
22046
22128
  return {
22047
22129
  id: soloCardId("live-solo", sq),
@@ -22050,10 +22132,10 @@ var buildLiveRouteCards = ({
22050
22132
  kind: "venue",
22051
22133
  label: getTradingVenueLabel(venue),
22052
22134
  executionPrice: avgPrice,
22053
- numericValue: sq.filledQty,
22135
+ numericValue: (_e2 = sq.estimatedPayout) != null ? _e2 : sq.filledQty,
22054
22136
  quoteData: soloQuoteData,
22055
22137
  value: getTradingValueLabel({
22056
- amount: sq.filledQty,
22138
+ amount: (_f = sq.estimatedPayout) != null ? _f : sq.filledQty,
22057
22139
  minimumFractionDigits: 2,
22058
22140
  maximumFractionDigits: 2
22059
22141
  }),
@@ -22061,7 +22143,8 @@ var buildLiveRouteCards = ({
22061
22143
  requiresSharedKyc: venueRequiresSharedKyc({ venue: sq.venue })
22062
22144
  };
22063
22145
  });
22064
- const unavailableCards = ((_d = quoteData.venueSoloQuotes) != null ? _d : []).filter((sq) => sq.status === "unavailable" || sq.unavailableReason === "venue_unavailable").map((sq) => {
22146
+ const unavailableCards = ((_e = quoteData.venueSoloQuotes) != null ? _e : []).filter((sq) => sq.status === "unavailable" || sq.unavailableReason === "venue_unavailable").map((sq) => {
22147
+ var _a2, _b2;
22065
22148
  const parsedVenue = parseVenue(sq.venue);
22066
22149
  const venue = parsedVenue.success ? parsedVenue.data : void 0;
22067
22150
  const temporarilyUnavailable = sq.unavailableReason === "venue_unavailable";
@@ -22072,10 +22155,10 @@ var buildLiveRouteCards = ({
22072
22155
  hint: temporarilyUnavailable ? labels.venueTemporarilyUnavailable : labels.venueUnavailableInRegion,
22073
22156
  kind: "venue",
22074
22157
  label: getTradingVenueLabel(venue),
22075
- numericValue: hasPreview ? sq.filledQty : 0,
22158
+ numericValue: hasPreview ? (_a2 = sq.estimatedPayout) != null ? _a2 : sq.filledQty : 0,
22076
22159
  quoteData: __spreadProps(__spreadValues({}, quoteData), { quoteId: "" }),
22077
22160
  value: hasPreview ? getTradingValueLabel({
22078
- amount: sq.filledQty,
22161
+ amount: (_b2 = sq.estimatedPayout) != null ? _b2 : sq.filledQty,
22079
22162
  minimumFractionDigits: 2,
22080
22163
  maximumFractionDigits: 2
22081
22164
  }) : ""
@@ -22289,10 +22372,13 @@ var getPlaceOrderPotentialReturn = (quoteData) => {
22289
22372
  if (!((_a = quoteData == null ? void 0 : quoteData.fills) == null ? void 0 : _a.length) || quoteData.fills.length < 2) return 0;
22290
22373
  const bestSoloVenueFill = Math.max(
22291
22374
  0,
22292
- ...((_b = quoteData.venueSoloQuotes) != null ? _b : []).filter((quote) => quote.status === "ok" && quote.filledQty > 0).map((quote) => quote.filledQty)
22375
+ ...((_b = quoteData.venueSoloQuotes) != null ? _b : []).filter((quote) => quote.status === "ok" && quote.filledQty > 0).map((quote) => {
22376
+ var _a2;
22377
+ return (_a2 = quote.estimatedPayout) != null ? _a2 : quote.filledQty;
22378
+ })
22293
22379
  );
22294
22380
  if (bestSoloVenueFill <= 0) return 0;
22295
- return Math.max(0, quoteData.totalFilled - bestSoloVenueFill);
22381
+ return Math.max(0, getPlaceOrderBuyPayout(quoteData) - bestSoloVenueFill);
22296
22382
  };
22297
22383
  var resolvePrimarySubmittedOrderId = ({
22298
22384
  allowOrderIdFallback = true,
@@ -25478,7 +25564,16 @@ var PlaceOrder = ({
25478
25564
  });
25479
25565
  const payoutLabel = formatUsd(usdSide);
25480
25566
  const amountLabel = internalTab === "sell" ? sharesLabel : payoutLabel;
25481
- const toWinLabel = internalTab === "sell" ? payoutLabel : formatUsd(sharesSide);
25567
+ const toWinLabel = formatUsd(
25568
+ resolvePlaceOrderNetResult({
25569
+ quoteData,
25570
+ tradeSide: internalTab,
25571
+ shares: sharesSide,
25572
+ usd: usdSide,
25573
+ terminalOrderEvents: executionProgress.terminalOrderEvents,
25574
+ submittedOrders: executionProgress.submittedOrders
25575
+ })
25576
+ );
25482
25577
  const potentialReturnValue = getPlaceOrderPotentialReturn(quoteData);
25483
25578
  const potentialReturnLabel = potentialReturnValue > 0 ? formatUsd(potentialReturnValue) : void 0;
25484
25579
  const eventTitle = (_f2 = (_e2 = scopedSelectedEvent == null ? void 0 : scopedSelectedEvent.title) != null ? _e2 : scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.question) != null ? _f2 : "";
@@ -25882,7 +25977,16 @@ var PlaceOrder = ({
25882
25977
  maximumFractionDigits: 2
25883
25978
  })
25884
25979
  ) : formatUsd(actualEconomics.actualRawExecCost);
25885
- const payoutLabel = isSell ? formatUsd(actualEconomics.actualRawExecCost) : formatUsd(actualEconomics.actualTotalFilled);
25980
+ const payoutLabel = formatUsd(
25981
+ resolvePlaceOrderNetResult({
25982
+ quoteData,
25983
+ tradeSide: internalTab,
25984
+ shares: actualEconomics.actualTotalFilled,
25985
+ usd: actualEconomics.actualRawExecCost,
25986
+ terminalOrderEvents: executionProgress.terminalOrderEvents,
25987
+ submittedOrders: executionProgress.submittedOrders
25988
+ })
25989
+ );
25886
25990
  return __spreadProps(__spreadValues({}, summaryWithGroups), {
25887
25991
  actions: summaryWithGroups.actions.map(
25888
25992
  (action) => action.variant === "retry" ? __spreadProps(__spreadValues({}, action), { label: tradingLabels.orderTryRemaining(remainingLabel) }) : action
@@ -29212,6 +29316,16 @@ var aggregateSportsLineStops = (markets, isSpread = false) => {
29212
29316
  (left, right) => left.lineValue !== right.lineValue ? left.lineValue - right.lineValue : left.value.localeCompare(right.value)
29213
29317
  );
29214
29318
  };
29319
+ var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
29320
+ var resolveSportsLadderTitle = (group, selectedLineDisplay) => {
29321
+ var _a;
29322
+ const anchorLineValue = (_a = group.markets[0]) == null ? void 0 : _a.lineValue;
29323
+ if (anchorLineValue == null || !selectedLineDisplay) return group.title;
29324
+ const anchorDisplay = resolveSelectedSportsLineValue(anchorLineValue);
29325
+ if (anchorDisplay === selectedLineDisplay) return group.title;
29326
+ const pattern = new RegExp(`(^|[^\\d.])${escapeRegExp(anchorDisplay)}(?![\\d.])`);
29327
+ return pattern.test(group.title) ? group.title.replace(pattern, (_match, prefix) => `${prefix}${selectedLineDisplay}`) : group.title;
29328
+ };
29215
29329
  var buildSportsSlideFromGroup = (group) => {
29216
29330
  const lineStops = group.hasLineVariants ? aggregateSportsLineStops(group.markets, group.sportsMarketType === "spread") : [];
29217
29331
  const hasLadder = lineStops.length > 1;
@@ -29720,6 +29834,8 @@ var SportsMarketCard = ({
29720
29834
  });
29721
29835
  }, [slide.kind, activeMarket, group.markets, midpointsResult]);
29722
29836
  if (!activeMarket) return null;
29837
+ const selectedStop = slide.hasLadder ? slide.stops[selectedLineIndex] : void 0;
29838
+ const cardTitle = selectedStop ? resolveSportsLadderTitle(group, selectedStop.value) : group.title;
29723
29839
  const activeOutcome = (_h = activeMarket.venueMarketOutcomes.find(
29724
29840
  (outcome) => outcome.id === (tradingContext == null ? void 0 : tradingContext.selectedOutcomeId)
29725
29841
  )) != null ? _h : activeDefaultOutcome;
@@ -29780,7 +29896,7 @@ var SportsMarketCard = ({
29780
29896
  {
29781
29897
  marketId: activeMarket.id,
29782
29898
  venueMarkets,
29783
- title: group.title,
29899
+ title: cardTitle,
29784
29900
  compactHeader: true,
29785
29901
  subtitleOverride: compactSubtitle,
29786
29902
  headerOutcomeVariant,
@@ -29799,9 +29915,9 @@ var SportsMarketCard = ({
29799
29915
  })),
29800
29916
  selectedIndex: selectedLineIndex,
29801
29917
  onSelect: handleLineSelect,
29802
- ariaLabel: labels.eventMarketPage.sports.lineSelectorAria(group.title),
29803
- previousAriaLabel: labels.eventMarketPage.sports.previousLineAria(group.title),
29804
- nextAriaLabel: labels.eventMarketPage.sports.nextLineAria(group.title)
29918
+ ariaLabel: labels.eventMarketPage.sports.lineSelectorAria(cardTitle),
29919
+ previousAriaLabel: labels.eventMarketPage.sports.previousLineAria(cardTitle),
29920
+ nextAriaLabel: labels.eventMarketPage.sports.nextLineAria(cardTitle)
29805
29921
  }
29806
29922
  ) : void 0,
29807
29923
  classNames: { root: "agg-market-list-item agg-sports-market-card" },
@@ -39065,7 +39181,9 @@ var TRADING_ACCESS_VENUES = [
39065
39181
  "limitless",
39066
39182
  "predict",
39067
39183
  "myriad",
39068
- "hyperliquid"
39184
+ "hyperliquid",
39185
+ "novig",
39186
+ "prophetx"
39069
39187
  ];
39070
39188
  var TRADING_ACCESS_VENUE_ITEMS = TRADING_ACCESS_VENUES.map((id) => ({ id }));
39071
39189
  var SectionTitle2 = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  formatRecurringCountdown,
15
15
  formatShareAmount,
16
16
  useHomePageModals
17
- } from "./chunk-VMG6BUHI.mjs";
17
+ } from "./chunk-VAL2IB3M.mjs";
18
18
  import {
19
19
  EventList,
20
20
  EventListItem,
@@ -32,7 +32,7 @@ import {
32
32
  orderbookRowLimitDefault,
33
33
  resolveEventDetailsSyncKey,
34
34
  useCenterOrderbookSpread
35
- } from "./chunk-EYJS45RP.mjs";
35
+ } from "./chunk-IS45S6R3.mjs";
36
36
  import {
37
37
  CARD_NETWORK_OPTIONS,
38
38
  DepositModal,
@@ -45,7 +45,7 @@ import {
45
45
  buildTerminalSummary,
46
46
  clearPendingCardSession,
47
47
  getPendingCardSession
48
- } from "./chunk-I72YHWOI.mjs";
48
+ } from "./chunk-UVJ5FBZF.mjs";
49
49
  import {
50
50
  AggNotificationEventsProvider,
51
51
  DEPOSIT_MODAL_OPEN_EVENT,
@@ -67,7 +67,7 @@ import {
67
67
  useResolvedMarketClaim,
68
68
  useSharedKycFlow,
69
69
  venueRequiresSharedKyc
70
- } from "./chunk-WWIVSROM.mjs";
70
+ } from "./chunk-VHKGW4DB.mjs";
71
71
  import {
72
72
  SETTLEMENT_SECTION_ID,
73
73
  Settlement,
package/dist/modals.js CHANGED
@@ -9892,7 +9892,9 @@ var TRADING_ACCESS_VENUES = [
9892
9892
  "limitless",
9893
9893
  "predict",
9894
9894
  "myriad",
9895
- "hyperliquid"
9895
+ "hyperliquid",
9896
+ "novig",
9897
+ "prophetx"
9896
9898
  ];
9897
9899
  var TRADING_ACCESS_VENUE_ITEMS = TRADING_ACCESS_VENUES.map((id) => ({ id }));
9898
9900
  var SectionTitle2 = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
package/dist/modals.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  buildTerminalSummary,
12
12
  clearPendingCardSession,
13
13
  getPendingCardSession
14
- } from "./chunk-I72YHWOI.mjs";
14
+ } from "./chunk-UVJ5FBZF.mjs";
15
15
  import {
16
16
  ConnectAccountsStep,
17
17
  ConnectKalshiModal,