@agg-build/ui 4.9.1 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/{chunk-GKYBQEBC.mjs → chunk-4HTE5IEZ.mjs} +43 -26
  2. package/dist/{chunk-TNNLRRHC.mjs → chunk-6EHT5OFU.mjs} +1 -1
  3. package/dist/{chunk-GVIS3YXU.mjs → chunk-H5LCCV2J.mjs} +22 -11
  4. package/dist/{chunk-GG57TRNE.mjs → chunk-I72YHWOI.mjs} +2 -2
  5. package/dist/{chunk-XQLLZTEW.mjs → chunk-SMQRUNMZ.mjs} +19 -10
  6. package/dist/{chunk-H7L4HDXS.mjs → chunk-TXQJUVRW.mjs} +3 -2
  7. package/dist/{chunk-NYL6A6AD.mjs → chunk-W7HQVQ22.mjs} +257 -195
  8. package/dist/events.js +753 -680
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +2703 -2603
  11. package/dist/index.mjs +7 -7
  12. package/dist/modals.js +1352 -1289
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +2063 -1963
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +288 -226
  17. package/dist/primitives.mjs +1 -1
  18. package/dist/trading.js +845 -765
  19. package/dist/trading.mjs +4 -4
  20. package/dist/types/events/item-details/event-list-item-details.types.d.mts +2 -0
  21. package/dist/types/events/item-details/event-list-item-details.types.d.ts +2 -0
  22. package/dist/types/pages/event-market/event-market.types.d.mts +2 -0
  23. package/dist/types/pages/event-market/event-market.types.d.ts +2 -0
  24. package/dist/types/pages/event-market/sports-event-market-page.d.mts +1 -1
  25. package/dist/types/pages/event-market/sports-event-market-page.d.ts +1 -1
  26. package/dist/types/pages/user-profile/user-profile.types.d.mts +2 -0
  27. package/dist/types/pages/user-profile/user-profile.types.d.ts +2 -0
  28. package/dist/types/primitives/venue-logo/svg/logo-pred.d.mts +10 -0
  29. package/dist/types/primitives/venue-logo/svg/logo-pred.d.ts +10 -0
  30. package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +2 -1
  31. package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +2 -1
  32. package/dist/types/trading/place-order/index.place-order.types.d.mts +8 -0
  33. package/dist/types/trading/place-order/index.place-order.types.d.ts +8 -0
  34. package/dist/types/trading/place-order/index.place-order.utils.d.mts +1 -1
  35. package/dist/types/trading/place-order/index.place-order.utils.d.ts +1 -1
  36. package/package.json +3 -3
package/dist/trading.js CHANGED
@@ -109,7 +109,7 @@ __export(trading_exports, {
109
109
  prepareSettlementDifferences: () => prepareSettlementDifferences,
110
110
  resolveDifferenceIconClassName: () => resolveDifferenceIconClassName,
111
111
  useClaimWinnings: () => useClaimWinnings,
112
- useEventTradingContext: () => import_hooks41.useEventTradingContext,
112
+ useEventTradingContext: () => import_hooks42.useEventTradingContext,
113
113
  useResolvedMarketClaim: () => useResolvedMarketClaim,
114
114
  venueRequiresSharedKyc: () => venueRequiresSharedKyc
115
115
  });
@@ -280,7 +280,7 @@ var getTradingSlippageLabel = (value) => {
280
280
  };
281
281
 
282
282
  // src/trading/settlement/index.tsx
283
- var import_hooks22 = require("@agg-build/hooks");
283
+ var import_hooks23 = require("@agg-build/hooks");
284
284
  var import_react4 = require("react");
285
285
 
286
286
  // src/primitives/card/index.tsx
@@ -989,7 +989,7 @@ var Skeleton = ({
989
989
  Skeleton.displayName = "Skeleton";
990
990
 
991
991
  // src/primitives/venue-logo/index.tsx
992
- var import_hooks21 = require("@agg-build/hooks");
992
+ var import_hooks22 = require("@agg-build/hooks");
993
993
 
994
994
  // src/primitives/remote-image/index.tsx
995
995
  var import_hooks10 = require("@agg-build/hooks");
@@ -4513,11 +4513,11 @@ var LogoPolymarketIcon = (_a) => {
4513
4513
  };
4514
4514
  LogoPolymarketIcon.displayName = "LogoPolymarketIcon";
4515
4515
 
4516
- // src/primitives/venue-logo/svg/logo-predict.tsx
4516
+ // src/primitives/venue-logo/svg/logo-pred.tsx
4517
4517
  var import_hooks18 = require("@agg-build/hooks");
4518
- var import_sdk9 = require("@agg-build/sdk");
4519
4518
  var import_jsx_runtime114 = require("react/jsx-runtime");
4520
- var LogoPredictIcon = (_a) => {
4519
+ var PRED_LOGO_COLORS = { light: "#120C06", dark: "#F4FB37" };
4520
+ var LogoPredIcon = (_a) => {
4521
4521
  var _b = _a, {
4522
4522
  title: title2,
4523
4523
  className,
@@ -4529,26 +4529,80 @@ var LogoPredictIcon = (_a) => {
4529
4529
  "isColor",
4530
4530
  "color"
4531
4531
  ]);
4532
- var _a2;
4533
4532
  const {
4534
4533
  general: { theme }
4535
4534
  } = (0, import_hooks18.useAggUiConfig)();
4536
4535
  const isDarkTheme = theme === "dark";
4537
4536
  const primaryColor = resolveLogoPrimaryColor({
4538
- brandColor: (_a2 = resolveVenueLineColor(import_sdk9.Venue.predict, isDarkTheme)) != null ? _a2 : "#705bf6",
4537
+ brandColor: PRED_LOGO_COLORS[isDarkTheme ? "dark" : "light"],
4539
4538
  isColor,
4540
4539
  color
4541
4540
  });
4542
4541
  return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
4543
4542
  "svg",
4544
4543
  __spreadProps(__spreadValues(__spreadValues({
4545
- viewBox: "0 0 100 100",
4544
+ viewBox: "0 0 48 48",
4546
4545
  className,
4547
4546
  fill: "none"
4548
4547
  }, getIconA11yProps(title2)), props), {
4549
4548
  children: [
4550
4549
  title2 ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("title", { children: title2 }) : null,
4551
4550
  /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
4551
+ "path",
4552
+ {
4553
+ d: "M13.2063 24.447L30.8869 21.6235L31.7298 19.898L4 10.4414L10.9436 16.4694L5.95218 41.9708L13.2063 24.447Z",
4554
+ fill: primaryColor
4555
+ }
4556
+ ),
4557
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
4558
+ "path",
4559
+ {
4560
+ d: "M34.3927 24.0014L16.7121 26.8473L15.8691 28.5504L43.599 38.0294L36.6554 31.979L41.6468 6.5L34.3927 24.0014Z",
4561
+ fill: primaryColor
4562
+ }
4563
+ )
4564
+ ]
4565
+ })
4566
+ );
4567
+ };
4568
+ LogoPredIcon.displayName = "LogoPredIcon";
4569
+
4570
+ // src/primitives/venue-logo/svg/logo-predict.tsx
4571
+ var import_hooks19 = require("@agg-build/hooks");
4572
+ var import_sdk9 = require("@agg-build/sdk");
4573
+ var import_jsx_runtime115 = require("react/jsx-runtime");
4574
+ var LogoPredictIcon = (_a) => {
4575
+ var _b = _a, {
4576
+ title: title2,
4577
+ className,
4578
+ isColor = true,
4579
+ color
4580
+ } = _b, props = __objRest(_b, [
4581
+ "title",
4582
+ "className",
4583
+ "isColor",
4584
+ "color"
4585
+ ]);
4586
+ var _a2;
4587
+ const {
4588
+ general: { theme }
4589
+ } = (0, import_hooks19.useAggUiConfig)();
4590
+ const isDarkTheme = theme === "dark";
4591
+ const primaryColor = resolveLogoPrimaryColor({
4592
+ brandColor: (_a2 = resolveVenueLineColor(import_sdk9.Venue.predict, isDarkTheme)) != null ? _a2 : "#705bf6",
4593
+ isColor,
4594
+ color
4595
+ });
4596
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
4597
+ "svg",
4598
+ __spreadProps(__spreadValues(__spreadValues({
4599
+ viewBox: "0 0 100 100",
4600
+ className,
4601
+ fill: "none"
4602
+ }, getIconA11yProps(title2)), props), {
4603
+ children: [
4604
+ title2 ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("title", { children: title2 }) : null,
4605
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
4552
4606
  "path",
4553
4607
  {
4554
4608
  fillRule: "evenodd",
@@ -4564,9 +4618,9 @@ var LogoPredictIcon = (_a) => {
4564
4618
  LogoPredictIcon.displayName = "LogoPredictIcon";
4565
4619
 
4566
4620
  // src/primitives/venue-logo/svg/logo-probable.tsx
4567
- var import_hooks19 = require("@agg-build/hooks");
4621
+ var import_hooks20 = require("@agg-build/hooks");
4568
4622
  var import_sdk10 = require("@agg-build/sdk");
4569
- var import_jsx_runtime115 = require("react/jsx-runtime");
4623
+ var import_jsx_runtime116 = require("react/jsx-runtime");
4570
4624
  var LogoProbableIcon = (_a) => {
4571
4625
  var _b = _a, {
4572
4626
  title: title2,
@@ -4582,14 +4636,14 @@ var LogoProbableIcon = (_a) => {
4582
4636
  var _a2;
4583
4637
  const {
4584
4638
  general: { theme }
4585
- } = (0, import_hooks19.useAggUiConfig)();
4639
+ } = (0, import_hooks20.useAggUiConfig)();
4586
4640
  const isDarkTheme = theme === "dark";
4587
4641
  const primaryColor = resolveLogoPrimaryColor({
4588
4642
  brandColor: (_a2 = resolveVenueLineColor(import_sdk10.Venue.probable, isDarkTheme)) != null ? _a2 : "#EC4899",
4589
4643
  isColor,
4590
4644
  color
4591
4645
  });
4592
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
4646
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
4593
4647
  "svg",
4594
4648
  __spreadProps(__spreadValues(__spreadValues({
4595
4649
  viewBox: "0 0 100 100",
@@ -4597,16 +4651,16 @@ var LogoProbableIcon = (_a) => {
4597
4651
  fill: "none"
4598
4652
  }, getIconA11yProps(title2)), props), {
4599
4653
  children: [
4600
- title2 ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("title", { children: title2 }) : null,
4601
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
4654
+ title2 ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("title", { children: title2 }) : null,
4655
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
4602
4656
  "path",
4603
4657
  {
4604
4658
  d: "M75.625 59.3489C75.6247 53.7323 71.0719 49.1792 65.4551 49.179H33.9209C28.3039 49.179 23.7503 53.7321 23.75 59.3489C23.75 64.9659 28.3038 69.5198 33.9209 69.5198H65.4551C71.0719 69.5195 75.625 64.9658 75.625 59.3489ZM90.625 59.3489C90.625 73.2501 79.3562 84.5195 65.4551 84.5198H33.9209C20.0196 84.5198 8.75 73.2502 8.75 59.3489C8.75026 45.4477 20.0198 34.179 33.9209 34.179H65.4551C79.3559 34.1792 90.6247 45.4478 90.625 59.3489Z",
4605
4659
  fill: primaryColor
4606
4660
  }
4607
4661
  ),
4608
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("path", { d: "M90.9329 15.4546V30.4546H8.90234V15.4546H90.9329Z", fill: primaryColor }),
4609
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
4662
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("path", { d: "M90.9329 15.4546V30.4546H8.90234V15.4546H90.9329Z", fill: primaryColor }),
4663
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
4610
4664
  "path",
4611
4665
  {
4612
4666
  d: "M64.5742 51.3496C68.9894 51.3496 72.5742 54.9344 72.5742 59.3496C72.5742 63.7648 68.9894 67.3496 64.5742 67.3496C60.159 67.3496 56.5742 63.7648 56.5742 59.3496C56.5742 54.9344 60.159 51.3496 64.5742 51.3496Z",
@@ -4620,10 +4674,10 @@ var LogoProbableIcon = (_a) => {
4620
4674
  LogoProbableIcon.displayName = "LogoProbableIcon";
4621
4675
 
4622
4676
  // src/primitives/venue-logo/svg/logo-prophetx.tsx
4623
- var import_hooks20 = require("@agg-build/hooks");
4677
+ var import_hooks21 = require("@agg-build/hooks");
4624
4678
  var import_sdk11 = require("@agg-build/sdk");
4625
4679
  var import_react2 = require("react");
4626
- var import_jsx_runtime116 = require("react/jsx-runtime");
4680
+ var import_jsx_runtime117 = require("react/jsx-runtime");
4627
4681
  var LogoProphetXIcon = (_a) => {
4628
4682
  var _b = _a, {
4629
4683
  title: title2,
@@ -4639,7 +4693,7 @@ var LogoProphetXIcon = (_a) => {
4639
4693
  var _a2;
4640
4694
  const {
4641
4695
  general: { theme }
4642
- } = (0, import_hooks20.useAggUiConfig)();
4696
+ } = (0, import_hooks21.useAggUiConfig)();
4643
4697
  const isDarkTheme = theme === "dark";
4644
4698
  const uid = (0, import_react2.useId)();
4645
4699
  const primaryColor = resolveLogoPrimaryColor({
@@ -4651,7 +4705,7 @@ var LogoProphetXIcon = (_a) => {
4651
4705
  const isMonochrome = !isColor || Boolean(color == null ? void 0 : color.trim());
4652
4706
  const gradientTransform = "matrix(2.750846, 0, 0, 2.750846, -1935.152964, 138.485876)";
4653
4707
  const fillFor = (n) => isMonochrome ? primaryColor : `url(#${uid}-${n})`;
4654
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
4708
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
4655
4709
  "svg",
4656
4710
  __spreadProps(__spreadValues(__spreadValues({
4657
4711
  viewBox: "81.867 138.419 424.492 272.214",
@@ -4659,9 +4713,9 @@ var LogoProphetXIcon = (_a) => {
4659
4713
  fill: "none"
4660
4714
  }, getIconA11yProps(title2)), props), {
4661
4715
  children: [
4662
- title2 ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("title", { children: title2 }) : null,
4663
- isMonochrome ? null : /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("defs", { children: [
4664
- /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
4716
+ title2 ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("title", { children: title2 }) : null,
4717
+ isMonochrome ? null : /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("defs", { children: [
4718
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
4665
4719
  "linearGradient",
4666
4720
  {
4667
4721
  id: `${uid}-0`,
@@ -4672,14 +4726,14 @@ var LogoProphetXIcon = (_a) => {
4672
4726
  gradientUnits: "userSpaceOnUse",
4673
4727
  gradientTransform,
4674
4728
  children: [
4675
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { stopColor: "#1DC29A" }),
4676
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { offset: "0.1032", stopColor: "#19BE9D" }),
4677
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { offset: "0.6255", stopColor: "#06ADAA" }),
4678
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
4729
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { stopColor: "#1DC29A" }),
4730
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "0.1032", stopColor: "#19BE9D" }),
4731
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "0.6255", stopColor: "#06ADAA" }),
4732
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
4679
4733
  ]
4680
4734
  }
4681
4735
  ),
4682
- /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
4736
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
4683
4737
  "linearGradient",
4684
4738
  {
4685
4739
  id: `${uid}-1`,
@@ -4690,12 +4744,12 @@ var LogoProphetXIcon = (_a) => {
4690
4744
  gradientUnits: "userSpaceOnUse",
4691
4745
  gradientTransform,
4692
4746
  children: [
4693
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { stopColor: "#1DC29A" }),
4694
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
4747
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { stopColor: "#1DC29A" }),
4748
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
4695
4749
  ]
4696
4750
  }
4697
4751
  ),
4698
- /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
4752
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
4699
4753
  "linearGradient",
4700
4754
  {
4701
4755
  id: `${uid}-2`,
@@ -4706,29 +4760,29 @@ var LogoProphetXIcon = (_a) => {
4706
4760
  gradientUnits: "userSpaceOnUse",
4707
4761
  gradientTransform,
4708
4762
  children: [
4709
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { stopColor: "#1DC29A" }),
4710
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { offset: "0.3631", stopColor: "#18BD9E" }),
4711
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { offset: "0.802", stopColor: "#09AFA8" }),
4712
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
4763
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { stopColor: "#1DC29A" }),
4764
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "0.3631", stopColor: "#18BD9E" }),
4765
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "0.802", stopColor: "#09AFA8" }),
4766
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
4713
4767
  ]
4714
4768
  }
4715
4769
  )
4716
4770
  ] }),
4717
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
4771
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
4718
4772
  "path",
4719
4773
  {
4720
4774
  d: "M 282.449 326.493 L 332.847 402.716 L 426.472 402.716 L 344.879 279.66 L 282.449 326.493 Z",
4721
4775
  fill: fillFor(0)
4722
4776
  }
4723
4777
  ),
4724
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
4778
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
4725
4779
  "path",
4726
4780
  {
4727
4781
  d: "M 379.966 146.995 L 389.569 161.125 L 313.636 218.145 L 307.055 222.927 L 244.624 269.759 L 238 274.873 L 162.069 331.56 L 152.804 317.473 L 87.353 402.71 L 209.197 402.71 L 199.888 388.287 L 275.818 331.56 L 282.443 326.488 L 344.873 279.655 L 351.456 274.832 L 427.388 218.145 L 436.694 232.232 L 502.101 146.995 L 379.966 146.995 Z",
4728
4782
  fill: fillFor(1)
4729
4783
  }
4730
4784
  ),
4731
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
4785
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
4732
4786
  "path",
4733
4787
  {
4734
4788
  d: "M 162.993 146.995 L 244.624 269.759 L 307.055 222.927 L 256.323 146.995 L 162.993 146.995 Z",
@@ -4747,6 +4801,7 @@ var venueLogoRegistry = {
4747
4801
  [import_sdk12.Venue.limitless]: LogoLimitlessIcon,
4748
4802
  [import_sdk12.Venue.opinion]: LogoOpinionIcon,
4749
4803
  [import_sdk12.Venue.polymarket]: LogoPolymarketIcon,
4804
+ [import_sdk12.Venue.pred]: LogoPredIcon,
4750
4805
  [import_sdk12.Venue.predict]: LogoPredictIcon,
4751
4806
  [import_sdk12.Venue.probable]: LogoProbableIcon,
4752
4807
  [import_sdk12.Venue.myriad]: LogoMyriadIcon,
@@ -4761,6 +4816,9 @@ var venueLogoUrlRegistry = {
4761
4816
  [import_sdk12.Venue.limitless]: `${VENUE_LOGO_BASE_URL}/limitless.png`,
4762
4817
  [import_sdk12.Venue.opinion]: `${VENUE_LOGO_BASE_URL}/opinion.png`,
4763
4818
  [import_sdk12.Venue.polymarket]: `${VENUE_LOGO_BASE_URL}/polymarket.png`,
4819
+ // PRED does not yet have a mirrored Snag asset. Its official production
4820
+ // favicon is the same square brand mark used by the application itself.
4821
+ [import_sdk12.Venue.pred]: "https://mainnet-assets.pred.app/assets/vite-oruAfoK1.svg",
4764
4822
  [import_sdk12.Venue.predict]: `${VENUE_LOGO_BASE_URL}/predict.png`,
4765
4823
  [import_sdk12.Venue.probable]: `${VENUE_LOGO_BASE_URL}/probable.png`,
4766
4824
  [import_sdk12.Venue.myriad]: `${VENUE_LOGO_BASE_URL}/myriad.png`,
@@ -4776,6 +4834,7 @@ var venueLogoLabels = {
4776
4834
  [import_sdk12.Venue.limitless]: "Limitless",
4777
4835
  [import_sdk12.Venue.opinion]: "Opinion",
4778
4836
  [import_sdk12.Venue.polymarket]: "Polymarket",
4837
+ [import_sdk12.Venue.pred]: "PRED",
4779
4838
  [import_sdk12.Venue.predict]: "Predict",
4780
4839
  [import_sdk12.Venue.probable]: "Probable",
4781
4840
  [import_sdk12.Venue.myriad]: "Myriad",
@@ -4796,6 +4855,8 @@ var lineColorByVenue = {
4796
4855
  [import_sdk12.Venue.limitless]: "#C4FF00",
4797
4856
  [import_sdk12.Venue.opinion]: "#000000",
4798
4857
  [import_sdk12.Venue.polymarket]: "#2E5CFF",
4858
+ // On light surfaces use the dark half of PRED's official yellow/dark mark.
4859
+ [import_sdk12.Venue.pred]: PRED_LOGO_COLORS.light,
4799
4860
  [import_sdk12.Venue.predict]: "#6D57F8",
4800
4861
  [import_sdk12.Venue.probable]: "#F05923",
4801
4862
  [import_sdk12.Venue.myriad]: "#000000",
@@ -4815,6 +4876,7 @@ var lineColorByVenue = {
4815
4876
  [import_sdk12.Venue.limitless]: "#C4FF00",
4816
4877
  [import_sdk12.Venue.opinion]: "#FFFFFF",
4817
4878
  [import_sdk12.Venue.polymarket]: "#2E5CFF",
4879
+ [import_sdk12.Venue.pred]: PRED_LOGO_COLORS.dark,
4818
4880
  [import_sdk12.Venue.predict]: "#6D57F8",
4819
4881
  [import_sdk12.Venue.probable]: "#F05923",
4820
4882
  [import_sdk12.Venue.myriad]: "#FFFFFF",
@@ -4846,7 +4908,7 @@ var resolveVenueLogoIsColor = ({
4846
4908
  };
4847
4909
 
4848
4910
  // src/primitives/venue-logo/index.tsx
4849
- var import_jsx_runtime117 = require("react/jsx-runtime");
4911
+ var import_jsx_runtime118 = require("react/jsx-runtime");
4850
4912
  var VenueLogo = ({
4851
4913
  venue,
4852
4914
  variant = "icon",
@@ -4859,7 +4921,7 @@ var VenueLogo = ({
4859
4921
  title: title2
4860
4922
  }) => {
4861
4923
  var _a, _b;
4862
- const labels = (0, import_hooks21.useLabels)();
4924
+ const labels = (0, import_hooks22.useLabels)();
4863
4925
  const sizeClass = sizeClasses[size];
4864
4926
  const resolvedLabel = resolveVenueLogoLabel({
4865
4927
  ariaLabel,
@@ -4872,7 +4934,7 @@ var VenueLogo = ({
4872
4934
  console.warn(`[AggUI] Unknown venue "${venue}" \u2014 using default logo`);
4873
4935
  }
4874
4936
  if (variant === "logo") {
4875
- return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
4937
+ return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
4876
4938
  RemoteImage,
4877
4939
  {
4878
4940
  src: (_a = venueLogoUrlRegistry[venue]) != null ? _a : DEFAULT_VENUE_LOGO_URL,
@@ -4887,7 +4949,7 @@ var VenueLogo = ({
4887
4949
  isColor,
4888
4950
  isMonochromatic
4889
4951
  });
4890
- return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
4952
+ return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
4891
4953
  Component,
4892
4954
  {
4893
4955
  className: cn("group/agg-venue-logo", "shrink-0", sizeClass, className),
@@ -4948,7 +5010,7 @@ var dedupeSettlementSources = (sources) => {
4948
5010
  };
4949
5011
 
4950
5012
  // src/trading/settlement/settlement-text-renderer.tsx
4951
- var import_jsx_runtime118 = require("react/jsx-runtime");
5013
+ var import_jsx_runtime119 = require("react/jsx-runtime");
4952
5014
  var inlineTokenRegex = new RegExp(
4953
5015
  [
4954
5016
  /\[([^\]\n]+)\]\(([^)\s]+)\)/.source,
@@ -4987,12 +5049,12 @@ var renderInlineSegment = (text, baseKey) => {
4987
5049
  }
4988
5050
  if (match.index > lastIndex) {
4989
5051
  nodes.push(
4990
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_react3.Fragment, { children: text.slice(lastIndex, match.index) }, `${baseKey}-text-${segmentIndex++}`)
5052
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_react3.Fragment, { children: text.slice(lastIndex, match.index) }, `${baseKey}-text-${segmentIndex++}`)
4991
5053
  );
4992
5054
  }
4993
5055
  if (isLinkMatch(match)) {
4994
5056
  nodes.push(
4995
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
5057
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
4996
5058
  "a",
4997
5059
  {
4998
5060
  href: match[2],
@@ -5006,7 +5068,7 @@ var renderInlineSegment = (text, baseKey) => {
5006
5068
  );
5007
5069
  } else if (match[3] !== void 0) {
5008
5070
  nodes.push(
5009
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
5071
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5010
5072
  "strong",
5011
5073
  {
5012
5074
  className: "agg-settlement-text-bold font-agg-bold",
@@ -5017,7 +5079,7 @@ var renderInlineSegment = (text, baseKey) => {
5017
5079
  );
5018
5080
  } else if (match[4] !== void 0) {
5019
5081
  nodes.push(
5020
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
5082
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5021
5083
  "code",
5022
5084
  {
5023
5085
  className: "agg-settlement-text-code rounded-agg-sm bg-agg-secondary-hover px-1 py-0.5 font-mono text-[0.875em]",
@@ -5028,7 +5090,7 @@ var renderInlineSegment = (text, baseKey) => {
5028
5090
  );
5029
5091
  } else if (bareUrl !== void 0) {
5030
5092
  nodes.push(
5031
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
5093
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5032
5094
  "a",
5033
5095
  {
5034
5096
  href: bareUrl,
@@ -5045,18 +5107,18 @@ var renderInlineSegment = (text, baseKey) => {
5045
5107
  }
5046
5108
  if (lastIndex < text.length) {
5047
5109
  nodes.push(
5048
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_react3.Fragment, { children: text.slice(lastIndex) }, `${baseKey}-text-${segmentIndex++}`)
5110
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_react3.Fragment, { children: text.slice(lastIndex) }, `${baseKey}-text-${segmentIndex++}`)
5049
5111
  );
5050
5112
  }
5051
5113
  return nodes;
5052
5114
  };
5053
5115
  var renderBlock = (block, blockIndex) => {
5054
5116
  if (block.kind === "list") {
5055
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
5117
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5056
5118
  "ul",
5057
5119
  {
5058
5120
  className: "agg-settlement-text-list list-disc pl-5 text-agg-sm leading-agg-5 text-agg-foreground",
5059
- children: block.items.map((item, itemIndex) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
5121
+ children: block.items.map((item, itemIndex) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5060
5122
  "li",
5061
5123
  {
5062
5124
  className: "agg-settlement-text-list-item",
@@ -5068,12 +5130,12 @@ var renderBlock = (block, blockIndex) => {
5068
5130
  `block-${blockIndex}`
5069
5131
  );
5070
5132
  }
5071
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
5133
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5072
5134
  "p",
5073
5135
  {
5074
5136
  className: "agg-settlement-text-paragraph text-agg-sm leading-agg-5 text-agg-foreground break-words [overflow-wrap:anywhere]",
5075
- children: block.lines.map((line, lineIndex) => /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_react3.Fragment, { children: [
5076
- lineIndex > 0 ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("br", {}) : null,
5137
+ children: block.lines.map((line, lineIndex) => /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_react3.Fragment, { children: [
5138
+ lineIndex > 0 ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("br", {}) : null,
5077
5139
  renderInlineSegment(line, `block-${blockIndex}-line-${lineIndex}`)
5078
5140
  ] }, `block-${blockIndex}-line-${lineIndex}`))
5079
5141
  },
@@ -5086,12 +5148,12 @@ var SettlementTextRenderer = ({
5086
5148
  }) => {
5087
5149
  const blocks = parseSettlementBlocks(content);
5088
5150
  if (blocks.length === 0) return null;
5089
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: cn("agg-settlement-text flex flex-col gap-2", className), children: blocks.map((block, blockIndex) => renderBlock(block, blockIndex)) });
5151
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: cn("agg-settlement-text flex flex-col gap-2", className), children: blocks.map((block, blockIndex) => renderBlock(block, blockIndex)) });
5090
5152
  };
5091
5153
  SettlementTextRenderer.displayName = "SettlementTextRenderer";
5092
5154
 
5093
5155
  // src/trading/settlement/index.tsx
5094
- var import_jsx_runtime119 = require("react/jsx-runtime");
5156
+ var import_jsx_runtime120 = require("react/jsx-runtime");
5095
5157
  var SETTLEMENT_SECTION_ID = "agg-settlement-section";
5096
5158
  var getSettlementDifferenceId = (sectionId, canonicalKey) => {
5097
5159
  return `${sectionId}-difference-${canonicalKey}`;
@@ -5258,13 +5320,13 @@ var SettlementVenueRules = ({
5258
5320
  rules,
5259
5321
  labels
5260
5322
  }) => {
5261
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "agg-settlement-venue-rules flex w-full flex-col items-start gap-4", children: [
5262
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.trading.settlementFullRulesTitle }),
5263
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "flex w-full flex-col items-start gap-4", children: rules.map((rule) => {
5323
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "agg-settlement-venue-rules flex w-full flex-col items-start gap-4", children: [
5324
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.trading.settlementFullRulesTitle }),
5325
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "flex w-full flex-col items-start gap-4", children: rules.map((rule) => {
5264
5326
  const venueLabel = resolveSettlementVenueLabel(rule.venue, labels);
5265
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("details", { className: "group/agg-settlement-rule w-full", children: [
5266
- /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("summary", { className: "flex cursor-pointer list-none items-center gap-2 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground group-hover/agg-settlement-rule:text-agg-muted-foreground transition-colors marker:hidden", children: [
5267
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5327
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("details", { className: "group/agg-settlement-rule w-full", children: [
5328
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("summary", { className: "flex cursor-pointer list-none items-center gap-2 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground group-hover/agg-settlement-rule:text-agg-muted-foreground transition-colors marker:hidden", children: [
5329
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
5268
5330
  VenueLogo,
5269
5331
  {
5270
5332
  venue: rule.venue,
@@ -5273,8 +5335,8 @@ var SettlementVenueRules = ({
5273
5335
  ariaLabel: venueLabel
5274
5336
  }
5275
5337
  ),
5276
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "text-agg-foreground group-hover/agg-settlement-rule:text-agg-muted-foreground transition-colors", children: venueLabel }),
5277
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5338
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "text-agg-foreground group-hover/agg-settlement-rule:text-agg-muted-foreground transition-colors", children: venueLabel }),
5339
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
5278
5340
  "i",
5279
5341
  {
5280
5342
  className: cn(
@@ -5287,7 +5349,7 @@ var SettlementVenueRules = ({
5287
5349
  }
5288
5350
  )
5289
5351
  ] }),
5290
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "mt-3 pl-6", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SettlementTextRenderer, { content: rule.content }) })
5352
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "mt-3 pl-6", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementTextRenderer, { content: rule.content }) })
5291
5353
  ] }, rule.venue);
5292
5354
  }) })
5293
5355
  ] });
@@ -5306,7 +5368,7 @@ var Settlement = ({
5306
5368
  isLoading = false
5307
5369
  }) => {
5308
5370
  var _a, _b, _c, _d, _e;
5309
- const labels = (0, import_hooks22.useLabels)();
5371
+ const labels = (0, import_hooks23.useLabels)();
5310
5372
  const blocks = (0, import_react4.useMemo)(
5311
5373
  () => dedupeSettlementSources({
5312
5374
  eventDescription,
@@ -5351,7 +5413,7 @@ var Settlement = ({
5351
5413
  );
5352
5414
  };
5353
5415
  if (isLoading) {
5354
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5416
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
5355
5417
  Skeleton,
5356
5418
  {
5357
5419
  ariaLabel: labels.trading.settlementLoading,
@@ -5362,7 +5424,7 @@ var Settlement = ({
5362
5424
  }
5363
5425
  if (!hasSettlementContent) return null;
5364
5426
  const resolvedSectionLabel = sectionLabel === defaultSettlementSectionLabel ? labels.trading.settlementSection : sectionLabel;
5365
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
5427
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
5366
5428
  Card,
5367
5429
  {
5368
5430
  id,
@@ -5372,51 +5434,51 @@ var Settlement = ({
5372
5434
  className
5373
5435
  ),
5374
5436
  children: [
5375
- /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "agg-settlement-header flex w-full flex-col items-start gap-1 text-agg-muted-foreground sm:flex-row sm:items-center sm:justify-between sm:gap-4", children: [
5376
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "shrink-0 text-agg-xs font-agg-bold leading-agg-4 uppercase", children: resolvedSectionLabel }),
5377
- question ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "agg-settlement-question min-w-0 text-agg-sm font-agg-normal leading-agg-5 sm:max-w-[314px] sm:truncate", children: question }) : null
5437
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "agg-settlement-header flex w-full flex-col items-start gap-1 text-agg-muted-foreground sm:flex-row sm:items-center sm:justify-between sm:gap-4", children: [
5438
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "shrink-0 text-agg-xs font-agg-bold leading-agg-4 uppercase", children: resolvedSectionLabel }),
5439
+ question ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "agg-settlement-question min-w-0 text-agg-sm font-agg-normal leading-agg-5 sm:max-w-[314px] sm:truncate", children: question }) : null
5378
5440
  ] }),
5379
- /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "agg-settlement-sections flex w-full flex-col items-start gap-5", children: [
5380
- hasStandaloneSettlementText ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "w-full", children: [
5381
- standaloneEventBlock || standaloneMarketBlock ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
5441
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "agg-settlement-sections flex w-full flex-col items-start gap-5", children: [
5442
+ hasStandaloneSettlementText ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "w-full", children: [
5443
+ standaloneEventBlock || standaloneMarketBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
5382
5444
  "div",
5383
5445
  {
5384
5446
  className: "agg-settlement-section agg-settlement-section-description",
5385
5447
  "data-source": "description",
5386
5448
  children: [
5387
- standaloneEventBlock ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { "data-source": "eventDescription", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SettlementTextRenderer, { content: standaloneEventBlock.content }) }) : null,
5388
- standaloneEventBlock && standaloneMarketBlock ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("hr", { className: "agg-settlement-divider my-4 border-0 border-t border-agg-separator" }) : null,
5389
- standaloneMarketBlock ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { "data-source": "marketDescription", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SettlementTextRenderer, { content: standaloneMarketBlock.content }) }) : null
5449
+ standaloneEventBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { "data-source": "eventDescription", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementTextRenderer, { content: standaloneEventBlock.content }) }) : null,
5450
+ standaloneEventBlock && standaloneMarketBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("hr", { className: "agg-settlement-divider my-4 border-0 border-t border-agg-separator" }) : null,
5451
+ standaloneMarketBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { "data-source": "marketDescription", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementTextRenderer, { content: standaloneMarketBlock.content }) }) : null
5390
5452
  ]
5391
5453
  }
5392
5454
  ) : null,
5393
- standalonePrimaryRulesBlock ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
5455
+ standalonePrimaryRulesBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
5394
5456
  "div",
5395
5457
  {
5396
5458
  className: "agg-settlement-section agg-settlement-section-primaryRules",
5397
5459
  "data-source": "primaryRules",
5398
5460
  children: [
5399
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "agg-settlement-section-label text-agg-xs font-agg-bold leading-agg-4 uppercase text-agg-muted-foreground mb-2", children: labels.trading.settlementPrimaryRulesLabel }),
5400
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SettlementTextRenderer, { content: standalonePrimaryRulesBlock.content })
5461
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "agg-settlement-section-label text-agg-xs font-agg-bold leading-agg-4 uppercase text-agg-muted-foreground mb-2", children: labels.trading.settlementPrimaryRulesLabel }),
5462
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementTextRenderer, { content: standalonePrimaryRulesBlock.content })
5401
5463
  ]
5402
5464
  }
5403
5465
  ) : null
5404
5466
  ] }) : null,
5405
- hasSettlementDifferences ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "agg-settlement-differences flex w-full flex-col items-start gap-5", children: [
5406
- /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "flex items-center gap-2", children: [
5407
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.trading.settlementDifferencesTitle }),
5408
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-agg-full bg-agg-primary text-[10px] font-agg-bold leading-[14px] text-agg-on-primary", children: settlementDifferences.length })
5467
+ hasSettlementDifferences ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "agg-settlement-differences flex w-full flex-col items-start gap-5", children: [
5468
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "flex items-center gap-2", children: [
5469
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.trading.settlementDifferencesTitle }),
5470
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-agg-full bg-agg-primary text-[10px] font-agg-bold leading-[14px] text-agg-on-primary", children: settlementDifferences.length })
5409
5471
  ] }),
5410
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "flex w-full flex-col items-start gap-5", children: settlementDifferences.map((difference) => {
5472
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "flex w-full flex-col items-start gap-5", children: settlementDifferences.map((difference) => {
5411
5473
  const venueKeys = resolveDifferenceVenueKeys(difference, settlementVenues);
5412
5474
  const isExpanded = openDifferenceKeys.includes(difference.canonicalKey) && venueKeys.length > 0;
5413
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
5475
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
5414
5476
  "div",
5415
5477
  {
5416
5478
  id: getSettlementDifferenceId(id, difference.canonicalKey),
5417
5479
  className: "agg-settlement-difference flex w-full flex-col items-start gap-2 rounded-agg-lg",
5418
5480
  children: [
5419
- /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
5481
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
5420
5482
  "button",
5421
5483
  {
5422
5484
  type: "button",
@@ -5424,7 +5486,7 @@ var Settlement = ({
5424
5486
  "aria-expanded": isExpanded,
5425
5487
  onClick: () => handleToggleDifference(difference.canonicalKey),
5426
5488
  children: [
5427
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5489
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
5428
5490
  "i",
5429
5491
  {
5430
5492
  className: cn(
@@ -5435,8 +5497,8 @@ var Settlement = ({
5435
5497
  "aria-hidden": "true"
5436
5498
  }
5437
5499
  ),
5438
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "min-w-0 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground group-hover/agg-settlement-difference:text-agg-muted-foreground transition-colors break-words [overflow-wrap:anywhere]", children: difference.title }),
5439
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5500
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "min-w-0 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground group-hover/agg-settlement-difference:text-agg-muted-foreground transition-colors break-words [overflow-wrap:anywhere]", children: difference.title }),
5501
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
5440
5502
  "i",
5441
5503
  {
5442
5504
  className: cn(
@@ -5451,12 +5513,12 @@ var Settlement = ({
5451
5513
  ]
5452
5514
  }
5453
5515
  ),
5454
- isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("dl", { className: "flex w-full flex-col items-start gap-1 px-6", children: venueKeys.map((venue) => {
5516
+ isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dl", { className: "flex w-full flex-col items-start gap-1 px-6", children: venueKeys.map((venue) => {
5455
5517
  var _a2;
5456
5518
  const venueValue = (_a2 = difference.perVenue[venue]) != null ? _a2 : labels.trading.settlementValueUnavailable;
5457
5519
  const venueLabel = resolveSettlementVenueLabel(venue, labels);
5458
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "flex w-full items-start gap-2", children: [
5459
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
5520
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "flex w-full items-start gap-2", children: [
5521
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
5460
5522
  VenueLogo,
5461
5523
  {
5462
5524
  venue,
@@ -5465,8 +5527,8 @@ var Settlement = ({
5465
5527
  ariaLabel: venueLabel
5466
5528
  }
5467
5529
  ),
5468
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("dt", { className: "w-[88px] shrink-0 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground", children: venueLabel }),
5469
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("dd", { className: "min-w-0 flex-1 text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground break-words [overflow-wrap:anywhere]", children: venueValue })
5530
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dt", { className: "w-[88px] shrink-0 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground", children: venueLabel }),
5531
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dd", { className: "min-w-0 flex-1 text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground break-words [overflow-wrap:anywhere]", children: venueValue })
5470
5532
  ] }, venue);
5471
5533
  }) }) : null
5472
5534
  ]
@@ -5475,9 +5537,9 @@ var Settlement = ({
5475
5537
  );
5476
5538
  }) })
5477
5539
  ] }) : null,
5478
- hasVenueSettlementRules ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_jsx_runtime119.Fragment, { children: [
5479
- hasSettlementDifferences || hasStandaloneSettlementText ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null,
5480
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SettlementVenueRules, { rules: venueRuleBlocks, labels })
5540
+ hasVenueSettlementRules ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
5541
+ hasSettlementDifferences || hasStandaloneSettlementText ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null,
5542
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementVenueRules, { rules: venueRuleBlocks, labels })
5481
5543
  ] }) : null
5482
5544
  ] })
5483
5545
  ]
@@ -5487,7 +5549,7 @@ var Settlement = ({
5487
5549
  Settlement.displayName = "Settlement";
5488
5550
 
5489
5551
  // src/trading/settlement/settlement-details.tsx
5490
- var import_hooks23 = require("@agg-build/hooks");
5552
+ var import_hooks24 = require("@agg-build/hooks");
5491
5553
 
5492
5554
  // src/events/shared/venue-market-cluster.ts
5493
5555
  var toNonEmptyString = (value) => {
@@ -5609,7 +5671,7 @@ var normalizeVenueMarketCluster = (markets, selectedMarketId) => {
5609
5671
  };
5610
5672
 
5611
5673
  // src/trading/settlement/settlement-details.tsx
5612
- var import_jsx_runtime120 = require("react/jsx-runtime");
5674
+ var import_jsx_runtime121 = require("react/jsx-runtime");
5613
5675
  var hasContent = (value) => {
5614
5676
  return typeof value === "string" && value.trim().length > 0;
5615
5677
  };
@@ -5632,11 +5694,11 @@ var buildVenueSettlementRules = (venueMarkets) => {
5632
5694
  };
5633
5695
  var SettlementDetails = ({ className }) => {
5634
5696
  var _a, _b, _c, _d, _e, _f;
5635
- const tradingContext = (0, import_hooks23.useEventTradingContext)();
5697
+ const tradingContext = (0, import_hooks24.useEventTradingContext)();
5636
5698
  const selectedEvent = (_a = tradingContext == null ? void 0 : tradingContext.selectedEvent) != null ? _a : null;
5637
5699
  const selectedMarket = (_b = tradingContext == null ? void 0 : tradingContext.selectedMarket) != null ? _b : null;
5638
5700
  if (!selectedEvent) return null;
5639
- const activeMarket = selectedMarket != null ? selectedMarket : (0, import_hooks23.resolveDefaultTradingMarket)(selectedEvent);
5701
+ const activeMarket = selectedMarket != null ? selectedMarket : (0, import_hooks24.resolveDefaultTradingMarket)(selectedEvent);
5640
5702
  if (!activeMarket) return null;
5641
5703
  const allVenueMarkets = normalizeVenueMarketCluster(selectedEvent.venueMarkets);
5642
5704
  const activeMarketCluster = normalizeVenueMarketCluster(
@@ -5660,7 +5722,7 @@ var SettlementDetails = ({ className }) => {
5660
5722
  if (!hasContent(eventDescription) && !hasVenueSettlementRules && !hasSettlementDifferences) {
5661
5723
  return null;
5662
5724
  }
5663
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "agg-settlement-list flex flex-col gap-6", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "agg-settlement-list-item", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
5725
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "agg-settlement-list flex flex-col gap-6", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "agg-settlement-list-item", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
5664
5726
  Settlement,
5665
5727
  {
5666
5728
  question: selectedEvent.title,
@@ -5677,7 +5739,7 @@ var SettlementDetails = ({ className }) => {
5677
5739
  SettlementDetails.displayName = "SettlementDetails";
5678
5740
 
5679
5741
  // src/trading/place-order/index.tsx
5680
- var import_hooks40 = require("@agg-build/hooks");
5742
+ var import_hooks41 = require("@agg-build/hooks");
5681
5743
  var import_sdk19 = require("@agg-build/sdk");
5682
5744
  var import_react16 = __toESM(require("@number-flow/react"));
5683
5745
  var Popover = __toESM(require("@radix-ui/react-popover"));
@@ -5810,27 +5872,27 @@ var formatSportsEventTimeEt = (value) => {
5810
5872
  };
5811
5873
 
5812
5874
  // src/geo-block-banner/index.tsx
5813
- var import_hooks24 = require("@agg-build/hooks");
5814
- var import_jsx_runtime121 = require("react/jsx-runtime");
5875
+ var import_hooks25 = require("@agg-build/hooks");
5876
+ var import_jsx_runtime122 = require("react/jsx-runtime");
5815
5877
  var GeoBlockBanner = ({
5816
5878
  venue,
5817
5879
  termsUrl = AGG_TERMS_OF_SERVICE_URL,
5818
5880
  className
5819
5881
  }) => {
5820
- const labels = (0, import_hooks24.useLabels)();
5882
+ const labels = (0, import_hooks25.useLabels)();
5821
5883
  const message = venue ? labels.trading.geoBlockVenueMessage(venue) : labels.trading.geoBlockGenericMessage;
5822
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
5884
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
5823
5885
  "div",
5824
5886
  {
5825
5887
  className: cn("flex items-center gap-5 rounded-agg-lg bg-agg-secondary-hover p-3", className),
5826
5888
  role: "status",
5827
5889
  children: [
5828
- /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("p", { className: "min-w-0 flex-1 text-agg-xs leading-agg-4 text-agg-foreground", children: [
5890
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("p", { className: "min-w-0 flex-1 text-agg-xs leading-agg-4 text-agg-foreground", children: [
5829
5891
  message,
5830
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("a", { href: termsUrl, className: "underline", target: "_blank", rel: "noreferrer noopener", children: labels.trading.geoBlockTermsLink }),
5892
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("a", { href: termsUrl, className: "underline", target: "_blank", rel: "noreferrer noopener", children: labels.trading.geoBlockTermsLink }),
5831
5893
  labels.trading.geoBlockMessageSuffix
5832
5894
  ] }),
5833
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Icon, { name: "internet-security", className: "h-6 w-6 shrink-0 text-agg-muted-foreground" })
5895
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Icon, { name: "internet-security", className: "h-6 w-6 shrink-0 text-agg-muted-foreground" })
5834
5896
  ]
5835
5897
  }
5836
5898
  );
@@ -5853,11 +5915,11 @@ var createAggClientSharedKycInitiator = (client) => {
5853
5915
  };
5854
5916
 
5855
5917
  // src/kyc/shared-kyc-modal.tsx
5856
- var import_hooks27 = require("@agg-build/hooks");
5918
+ var import_hooks28 = require("@agg-build/hooks");
5857
5919
  var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
5858
5920
 
5859
5921
  // src/primitives/button/index.tsx
5860
- var import_hooks25 = require("@agg-build/hooks");
5922
+ var import_hooks26 = require("@agg-build/hooks");
5861
5923
 
5862
5924
  // src/primitives/button/button.constants.ts
5863
5925
  var sizeClasses2 = {
@@ -5928,7 +5990,7 @@ var getButtonClassName = ({
5928
5990
  };
5929
5991
 
5930
5992
  // src/primitives/button/index.tsx
5931
- var import_jsx_runtime122 = require("react/jsx-runtime");
5993
+ var import_jsx_runtime123 = require("react/jsx-runtime");
5932
5994
  var Button = (_a) => {
5933
5995
  var _b = _a, {
5934
5996
  children,
@@ -5957,9 +6019,9 @@ var Button = (_a) => {
5957
6019
  ]);
5958
6020
  const {
5959
6021
  features: { enableAnimations }
5960
- } = (0, import_hooks25.useSdkUiConfig)();
6022
+ } = (0, import_hooks26.useSdkUiConfig)();
5961
6023
  const isDisabled = resolveButtonIsDisabled({ disabled, isLoading });
5962
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
6024
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
5963
6025
  "button",
5964
6026
  __spreadProps(__spreadValues({
5965
6027
  type,
@@ -5973,7 +6035,7 @@ var Button = (_a) => {
5973
6035
  "aria-busy": isLoading,
5974
6036
  "aria-label": ariaLabel
5975
6037
  }, other), {
5976
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
6038
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
5977
6039
  "span",
5978
6040
  {
5979
6041
  className: cn(
@@ -5984,9 +6046,9 @@ var Button = (_a) => {
5984
6046
  ),
5985
6047
  "aria-hidden": "true"
5986
6048
  }
5987
- ) : /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, { children: [
6049
+ ) : /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
5988
6050
  prefix != null ? prefix : null,
5989
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
6051
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
5990
6052
  "span",
5991
6053
  {
5992
6054
  className: cn(
@@ -6049,7 +6111,7 @@ var resolveInlineAlertHasAction = ({
6049
6111
  };
6050
6112
 
6051
6113
  // src/primitives/inline-alert/index.tsx
6052
- var import_jsx_runtime123 = require("react/jsx-runtime");
6114
+ var import_jsx_runtime124 = require("react/jsx-runtime");
6053
6115
  var InlineAlert = ({
6054
6116
  tone = INLINE_ALERT_DEFAULT_TONE,
6055
6117
  variant,
@@ -6063,7 +6125,7 @@ var InlineAlert = ({
6063
6125
  const resolvedVariant = resolveInlineAlertVariant({ tone, variant });
6064
6126
  const hasAction = resolveInlineAlertHasAction({ actionLabel, onAction });
6065
6127
  const { ariaLive, role } = INLINE_ALERT_LIVE_REGION_CONFIG[tone];
6066
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
6128
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
6067
6129
  "div",
6068
6130
  {
6069
6131
  className: cn(
@@ -6075,7 +6137,7 @@ var InlineAlert = ({
6075
6137
  "aria-live": ariaLive,
6076
6138
  "aria-label": ariaLabel,
6077
6139
  children: [
6078
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
6140
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6079
6141
  Icon,
6080
6142
  {
6081
6143
  name: INLINE_ALERT_TONE_ICON_NAME[tone],
@@ -6083,14 +6145,14 @@ var InlineAlert = ({
6083
6145
  "aria-hidden": "true"
6084
6146
  }
6085
6147
  ),
6086
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
6148
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6087
6149
  "div",
6088
6150
  {
6089
6151
  className: cn(
6090
6152
  "min-w-0",
6091
6153
  resolvedVariant === "plain" && !hasAction ? "flex-none text-center" : "flex-1"
6092
6154
  ),
6093
- children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
6155
+ children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
6094
6156
  "div",
6095
6157
  {
6096
6158
  className: cn(
@@ -6099,14 +6161,14 @@ var InlineAlert = ({
6099
6161
  resolvedVariant === "plain" && !hasAction ? "items-center" : null
6100
6162
  ),
6101
6163
  children: [
6102
- title2 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: title2 }) : null,
6103
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground wrap-break-word", children: message })
6164
+ title2 ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: title2 }) : null,
6165
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground wrap-break-word", children: message })
6104
6166
  ]
6105
6167
  }
6106
6168
  )
6107
6169
  }
6108
6170
  ),
6109
- hasAction ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
6171
+ hasAction ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6110
6172
  "button",
6111
6173
  {
6112
6174
  type: "button",
@@ -6126,7 +6188,7 @@ var InlineAlert = ({
6126
6188
  InlineAlert.displayName = "InlineAlert";
6127
6189
 
6128
6190
  // src/primitives/modal/index.tsx
6129
- var import_hooks26 = require("@agg-build/hooks");
6191
+ var import_hooks27 = require("@agg-build/hooks");
6130
6192
  var Dialog = __toESM(require("@radix-ui/react-dialog"));
6131
6193
 
6132
6194
  // src/primitives/modal/modal.constants.ts
@@ -6150,7 +6212,7 @@ var resolveModalCloseIcon = ({
6150
6212
  };
6151
6213
 
6152
6214
  // src/primitives/modal/index.tsx
6153
- var import_jsx_runtime124 = require("react/jsx-runtime");
6215
+ var import_jsx_runtime125 = require("react/jsx-runtime");
6154
6216
  var Modal = ({
6155
6217
  open,
6156
6218
  onOpenChange,
@@ -6158,7 +6220,7 @@ var Modal = ({
6158
6220
  "aria-label": _ariaLabel,
6159
6221
  "aria-labelledby": _ariaLabelledBy
6160
6222
  }) => {
6161
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Dialog.Root, { open, onOpenChange, children });
6223
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Dialog.Root, { open, onOpenChange, children });
6162
6224
  };
6163
6225
  var ModalContainer = ({
6164
6226
  children,
@@ -6170,11 +6232,11 @@ var ModalContainer = ({
6170
6232
  const {
6171
6233
  general: { rootClassName },
6172
6234
  features: { enableAnimations }
6173
- } = (0, import_hooks26.useSdkUiConfig)();
6235
+ } = (0, import_hooks27.useSdkUiConfig)();
6174
6236
  const overlayAnimationClassName = resolveModalOverlayAnimationClassName(enableAnimations);
6175
6237
  const panelAnimationClassName = resolveModalPanelAnimationClassName(enableAnimations);
6176
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(Dialog.Portal, { children: [
6177
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6238
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Dialog.Portal, { children: [
6239
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6178
6240
  Dialog.Overlay,
6179
6241
  {
6180
6242
  className: cn(
@@ -6185,7 +6247,7 @@ var ModalContainer = ({
6185
6247
  )
6186
6248
  }
6187
6249
  ),
6188
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6250
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6189
6251
  Dialog.Content,
6190
6252
  {
6191
6253
  className: cn(
@@ -6211,7 +6273,7 @@ var ModalContainer = ({
6211
6273
  event.preventDefault();
6212
6274
  }
6213
6275
  },
6214
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6276
+ children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6215
6277
  "div",
6216
6278
  {
6217
6279
  className: cn(
@@ -6220,7 +6282,7 @@ var ModalContainer = ({
6220
6282
  "flex h-full min-h-0 w-full justify-center p-0 md:p-5",
6221
6283
  classNames == null ? void 0 : classNames.center
6222
6284
  ),
6223
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6285
+ children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6224
6286
  "div",
6225
6287
  {
6226
6288
  className: cn(
@@ -6260,14 +6322,14 @@ var ModalHeader = ({
6260
6322
  }) => {
6261
6323
  const {
6262
6324
  features: { enableAnimations }
6263
- } = (0, import_hooks26.useSdkUiConfig)();
6264
- const labels = (0, import_hooks26.useLabels)();
6265
- const defaultCloseIcon = /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(CloseIcon, { className: "h-6 w-6" });
6325
+ } = (0, import_hooks27.useSdkUiConfig)();
6326
+ const labels = (0, import_hooks27.useLabels)();
6327
+ const defaultCloseIcon = /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(CloseIcon, { className: "h-6 w-6" });
6266
6328
  const resolvedCloseIcon = resolveModalCloseIcon({
6267
6329
  closeIcon,
6268
6330
  defaultCloseIcon
6269
6331
  });
6270
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
6332
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
6271
6333
  "div",
6272
6334
  {
6273
6335
  className: cn(
@@ -6280,7 +6342,7 @@ var ModalHeader = ({
6280
6342
  classNames == null ? void 0 : classNames.root
6281
6343
  ),
6282
6344
  children: [
6283
- /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
6345
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
6284
6346
  "div",
6285
6347
  {
6286
6348
  className: cn(
@@ -6293,8 +6355,8 @@ var ModalHeader = ({
6293
6355
  classNames == null ? void 0 : classNames.container
6294
6356
  ),
6295
6357
  children: [
6296
- leftElement ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_jsx_runtime124.Fragment, { children: leftElement }) : null,
6297
- /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
6358
+ leftElement ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_jsx_runtime125.Fragment, { children: leftElement }) : null,
6359
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
6298
6360
  "div",
6299
6361
  {
6300
6362
  className: cn(
@@ -6303,7 +6365,7 @@ var ModalHeader = ({
6303
6365
  classNames == null ? void 0 : classNames.titleContainer
6304
6366
  ),
6305
6367
  children: [
6306
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6368
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6307
6369
  Dialog.Title,
6308
6370
  {
6309
6371
  className: cn(
@@ -6317,7 +6379,7 @@ var ModalHeader = ({
6317
6379
  children: title2
6318
6380
  }
6319
6381
  ),
6320
- subtitle ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6382
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6321
6383
  "span",
6322
6384
  {
6323
6385
  className: cn(
@@ -6331,9 +6393,9 @@ var ModalHeader = ({
6331
6393
  ]
6332
6394
  }
6333
6395
  ),
6334
- /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "agg-modal-header-actions flex flex-row items-center justify-end gap-6", children: [
6335
- rightElement ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_jsx_runtime124.Fragment, { children: rightElement }) : null,
6336
- !hideClose && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6396
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "agg-modal-header-actions flex flex-row items-center justify-end gap-6", children: [
6397
+ rightElement ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_jsx_runtime125.Fragment, { children: rightElement }) : null,
6398
+ !hideClose && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6337
6399
  Dialog.Close,
6338
6400
  {
6339
6401
  className: cn(
@@ -6350,14 +6412,14 @@ var ModalHeader = ({
6350
6412
  ]
6351
6413
  }
6352
6414
  ),
6353
- children ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "agg-modal-header-extra", children }) : null
6415
+ children ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "agg-modal-header-extra", children }) : null
6354
6416
  ]
6355
6417
  }
6356
6418
  );
6357
6419
  };
6358
6420
  Modal.Header = ModalHeader;
6359
6421
  var ModalBody = ({ children, classNames }) => {
6360
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6422
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6361
6423
  "div",
6362
6424
  {
6363
6425
  className: cn(
@@ -6378,7 +6440,7 @@ var ModalFooter = ({
6378
6440
  classNames,
6379
6441
  hideBorder = false
6380
6442
  }) => {
6381
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6443
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6382
6444
  "div",
6383
6445
  {
6384
6446
  className: cn(
@@ -6461,7 +6523,7 @@ var getTypographyClassName = ({
6461
6523
  };
6462
6524
 
6463
6525
  // src/primitives/typography/index.tsx
6464
- var import_jsx_runtime125 = require("react/jsx-runtime");
6526
+ var import_jsx_runtime126 = require("react/jsx-runtime");
6465
6527
  var Typography = ({
6466
6528
  as: Component = "p",
6467
6529
  variant = "body",
@@ -6469,12 +6531,12 @@ var Typography = ({
6469
6531
  children,
6470
6532
  "aria-label": ariaLabel
6471
6533
  }) => {
6472
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Component, { className: getTypographyClassName({ className, variant }), "aria-label": ariaLabel, children });
6534
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Component, { className: getTypographyClassName({ className, variant }), "aria-label": ariaLabel, children });
6473
6535
  };
6474
6536
  Typography.displayName = "Typography";
6475
6537
 
6476
6538
  // src/kyc/shared-kyc-modal.tsx
6477
- var import_jsx_runtime126 = require("react/jsx-runtime");
6539
+ var import_jsx_runtime127 = require("react/jsx-runtime");
6478
6540
  var SharedKycModal = ({
6479
6541
  open,
6480
6542
  state = "initial",
@@ -6482,46 +6544,46 @@ var SharedKycModal = ({
6482
6544
  onOpenChange,
6483
6545
  onStartVerification
6484
6546
  }) => {
6485
- const labels = (0, import_hooks27.useLabels)();
6547
+ const labels = (0, import_hooks28.useLabels)();
6486
6548
  const modalLabels = labels.trading.sharedKyc.modal;
6487
6549
  const isInitiating = state === "initiating";
6488
6550
  const handleOpenChange = (nextOpen) => {
6489
6551
  if (isInitiating && !nextOpen) return;
6490
6552
  onOpenChange(nextOpen);
6491
6553
  };
6492
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
6554
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
6493
6555
  Modal.Container,
6494
6556
  {
6495
6557
  maxWidth: "420px",
6496
6558
  "aria-label": modalLabels.ariaLabel,
6497
6559
  classNames: { container: "!rounded-agg-2xl" },
6498
6560
  children: [
6499
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex h-14 shrink-0 items-center justify-end px-5", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
6561
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex h-14 shrink-0 items-center justify-end px-5", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
6500
6562
  Dialog2.Close,
6501
6563
  {
6502
6564
  "aria-label": labels.common.close,
6503
6565
  disabled: isInitiating,
6504
6566
  className: "flex size-11 cursor-pointer items-center justify-center rounded-agg-full text-agg-foreground hover:bg-agg-secondary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-not-allowed disabled:opacity-50",
6505
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon, { name: "close", size: "small", "aria-hidden": "true" })
6567
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { name: "close", size: "small", "aria-hidden": "true" })
6506
6568
  }
6507
6569
  ) }),
6508
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Modal.Body, { classNames: { root: "!px-8 !pb-9 !pt-0" }, children: state === "success" ? /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
6570
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Modal.Body, { classNames: { root: "!px-8 !pb-9 !pt-0" }, children: state === "success" ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
6509
6571
  "div",
6510
6572
  {
6511
6573
  className: "flex flex-col items-center gap-6 text-center",
6512
6574
  role: "status",
6513
6575
  "aria-live": "polite",
6514
6576
  children: [
6515
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex size-12 items-center justify-center rounded-agg-full border border-agg-success bg-agg-success/10 text-agg-success", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon, { name: "success-check", className: "size-5", "aria-hidden": "true" }) }),
6516
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
6517
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Dialog2.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Typography, { as: "span", variant: "body-large-strong", children: modalLabels.successTitle }) }),
6518
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Dialog2.Description, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Typography, { as: "span", variant: "label", className: "text-pretty text-agg-foreground", children: modalLabels.successDescription }) })
6577
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex size-12 items-center justify-center rounded-agg-full border border-agg-success bg-agg-success/10 text-agg-success", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { name: "success-check", className: "size-5", "aria-hidden": "true" }) }),
6578
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
6579
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Dialog2.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Typography, { as: "span", variant: "body-large-strong", children: modalLabels.successTitle }) }),
6580
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Dialog2.Description, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Typography, { as: "span", variant: "label", className: "text-pretty text-agg-foreground", children: modalLabels.successDescription }) })
6519
6581
  ] }),
6520
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Button, { variant: "secondary", size: "large", onClick: () => handleOpenChange(false), children: modalLabels.done })
6582
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Button, { variant: "secondary", size: "large", onClick: () => handleOpenChange(false), children: modalLabels.done })
6521
6583
  ]
6522
6584
  }
6523
- ) : /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col items-center gap-6 text-center", children: [
6524
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
6585
+ ) : /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-6 text-center", children: [
6586
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
6525
6587
  Icon,
6526
6588
  {
6527
6589
  name: "user-trust",
@@ -6529,11 +6591,11 @@ var SharedKycModal = ({
6529
6591
  "aria-hidden": "true"
6530
6592
  }
6531
6593
  ),
6532
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
6533
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Dialog2.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Typography, { as: "span", variant: "body-large-strong", children: state === "pending" ? modalLabels.pendingTitle : modalLabels.title }) }),
6534
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Dialog2.Description, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Typography, { as: "span", variant: "label", className: "text-pretty text-agg-foreground", children: state === "pending" ? modalLabels.pendingDescription : modalLabels.freeDescription }) })
6594
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
6595
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Dialog2.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Typography, { as: "span", variant: "body-large-strong", children: state === "pending" ? modalLabels.pendingTitle : modalLabels.title }) }),
6596
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Dialog2.Description, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Typography, { as: "span", variant: "label", className: "text-pretty text-agg-foreground", children: state === "pending" ? modalLabels.pendingDescription : modalLabels.freeDescription }) })
6535
6597
  ] }),
6536
- state === "error" || state === "pending" && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
6598
+ state === "error" || state === "pending" && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
6537
6599
  InlineAlert,
6538
6600
  {
6539
6601
  tone: "error",
@@ -6541,8 +6603,8 @@ var SharedKycModal = ({
6541
6603
  message: errorMessage || modalLabels.error
6542
6604
  }
6543
6605
  ) : null,
6544
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
6545
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
6606
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
6607
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
6546
6608
  Button,
6547
6609
  {
6548
6610
  variant: "primary",
@@ -6554,7 +6616,7 @@ var SharedKycModal = ({
6554
6616
  children: state === "pending" ? modalLabels.checkStatus : modalLabels.startVerification
6555
6617
  }
6556
6618
  ),
6557
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
6619
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
6558
6620
  Button,
6559
6621
  {
6560
6622
  variant: "tertiary",
@@ -6759,20 +6821,20 @@ var useSharedKycFlow = ({
6759
6821
  };
6760
6822
 
6761
6823
  // src/notifications/agg-notification-events-provider.tsx
6762
- var import_hooks28 = require("@agg-build/hooks");
6824
+ var import_hooks29 = require("@agg-build/hooks");
6763
6825
  var import_react7 = require("react");
6764
6826
 
6765
6827
  // src/primitives/toast/index.tsx
6766
6828
  var RadixToast = __toESM(require("@radix-ui/react-toast"));
6767
6829
  var import_react6 = require("react");
6768
- var import_jsx_runtime127 = require("react/jsx-runtime");
6830
+ var import_jsx_runtime128 = require("react/jsx-runtime");
6769
6831
  var ToastContext = (0, import_react6.createContext)(null);
6770
6832
  function useOptionalToast() {
6771
6833
  return (0, import_react6.useContext)(ToastContext);
6772
6834
  }
6773
6835
 
6774
6836
  // src/notifications/agg-notification-events-provider.tsx
6775
- var import_jsx_runtime128 = require("react/jsx-runtime");
6837
+ var import_jsx_runtime129 = require("react/jsx-runtime");
6776
6838
  var firedOrderNotificationKeys = /* @__PURE__ */ new Set();
6777
6839
  var MICRO_UNITS_SCALE = 1e6;
6778
6840
  var formatScaledMicroAmount = (value) => {
@@ -6863,7 +6925,7 @@ var CLIENT_DEPOSIT_ACTIVITY_SUPPRESSION_MS = 2 * 60 * 1e3;
6863
6925
 
6864
6926
  // src/onboarding/index.tsx
6865
6927
  var import_react15 = require("react");
6866
- var import_hooks38 = require("@agg-build/hooks");
6928
+ var import_hooks39 = require("@agg-build/hooks");
6867
6929
  var Dialog5 = __toESM(require("@radix-ui/react-dialog"));
6868
6930
 
6869
6931
  // src/onboarding/onboarding-modal.constants.ts
@@ -6882,21 +6944,22 @@ var ONBOARDING_STEPS = {
6882
6944
  var ONCHAIN_VENUES = [
6883
6945
  import_sdk16.Venue.polymarket,
6884
6946
  import_sdk16.Venue.opinion,
6885
- import_sdk16.Venue.predict
6947
+ import_sdk16.Venue.predict,
6948
+ import_sdk16.Venue.pred
6886
6949
  ].filter(import_sdk16.isVenueActive);
6887
6950
 
6888
6951
  // src/onboarding/steps/how-it-works.tsx
6889
6952
  var import_react8 = require("react");
6890
- var import_hooks29 = require("@agg-build/hooks");
6891
- var import_jsx_runtime129 = require("react/jsx-runtime");
6953
+ var import_hooks30 = require("@agg-build/hooks");
6954
+ var import_jsx_runtime130 = require("react/jsx-runtime");
6892
6955
  var defaultIcons = {
6893
- createAccount: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
6894
- linkAccounts: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(LinkAccountsIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
6895
- bestPrices: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(BestPricesIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
6896
- stayInControl: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
6956
+ createAccount: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
6957
+ linkAccounts: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(LinkAccountsIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
6958
+ bestPrices: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(BestPricesIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
6959
+ stayInControl: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
6897
6960
  };
6898
6961
  var HowItWorksStep = ({ onContinue, icons }) => {
6899
- const labels = (0, import_hooks29.useLabels)();
6962
+ const labels = (0, import_hooks30.useLabels)();
6900
6963
  const scrollRef = (0, import_react8.useRef)(null);
6901
6964
  const [showTopGradient, setShowTopGradient] = (0, import_react8.useState)(false);
6902
6965
  const [showBottomGradient, setShowBottomGradient] = (0, import_react8.useState)(true);
@@ -6906,10 +6969,10 @@ var HowItWorksStep = ({ onContinue, icons }) => {
6906
6969
  setShowTopGradient(el.scrollTop > 0);
6907
6970
  setShowBottomGradient(el.scrollTop + el.clientHeight < el.scrollHeight - 1);
6908
6971
  }, []);
6909
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col gap-6 h-[600px] sm:h-auto", children: [
6910
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.howItWorks.title }),
6911
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "relative flex-1 min-h-0 sm:flex-initial", children: [
6912
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
6972
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex flex-col gap-6 h-[600px] sm:h-auto", children: [
6973
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.howItWorks.title }),
6974
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "relative flex-1 min-h-0 sm:flex-initial", children: [
6975
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
6913
6976
  "div",
6914
6977
  {
6915
6978
  ref: scrollRef,
@@ -6919,7 +6982,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
6919
6982
  var _a;
6920
6983
  const icon = (_a = icons == null ? void 0 : icons[featureKey]) != null ? _a : defaultIcons[featureKey];
6921
6984
  const feature = labels.onboarding.howItWorks.features[featureKey];
6922
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
6985
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
6923
6986
  "div",
6924
6987
  {
6925
6988
  className: cn(
@@ -6928,11 +6991,11 @@ var HowItWorksStep = ({ onContinue, icons }) => {
6928
6991
  "bg-agg-secondary-hover"
6929
6992
  ),
6930
6993
  children: [
6931
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col flex-1 min-w-0 gap-[6px]", children: [
6932
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: feature.title }),
6933
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: feature.description })
6994
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex flex-col flex-1 min-w-0 gap-[6px]", children: [
6995
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: feature.title }),
6996
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: feature.description })
6934
6997
  ] }),
6935
- icon ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "hidden shrink-0 items-center justify-center text-agg-muted-foreground sm:flex", children: icon }) : null
6998
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "hidden shrink-0 items-center justify-center text-agg-muted-foreground sm:flex", children: icon }) : null
6936
6999
  ]
6937
7000
  },
6938
7001
  featureKey
@@ -6940,7 +7003,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
6940
7003
  })
6941
7004
  }
6942
7005
  ),
6943
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
7006
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
6944
7007
  "div",
6945
7008
  {
6946
7009
  className: cn(
@@ -6951,7 +7014,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
6951
7014
  )
6952
7015
  }
6953
7016
  ),
6954
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
7017
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
6955
7018
  "div",
6956
7019
  {
6957
7020
  className: cn(
@@ -6963,21 +7026,21 @@ var HowItWorksStep = ({ onContinue, icons }) => {
6963
7026
  }
6964
7027
  )
6965
7028
  ] }),
6966
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: onContinue, children: labels.onboarding.howItWorks.continue })
7029
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: onContinue, children: labels.onboarding.howItWorks.continue })
6967
7030
  ] });
6968
7031
  };
6969
7032
  HowItWorksStep.displayName = "HowItWorksStep";
6970
7033
 
6971
7034
  // src/onboarding/steps/profile-setup.tsx
6972
7035
  var import_react12 = require("react");
6973
- var import_hooks34 = require("@agg-build/hooks");
7036
+ var import_hooks35 = require("@agg-build/hooks");
6974
7037
 
6975
7038
  // src/primitives/calendar/index.tsx
6976
7039
  var import_react_day_picker = require("react-day-picker");
6977
- var import_jsx_runtime130 = require("react/jsx-runtime");
7040
+ var import_jsx_runtime131 = require("react/jsx-runtime");
6978
7041
  var Calendar = (_a) => {
6979
7042
  var _b = _a, { className, classNames } = _b, props = __objRest(_b, ["className", "classNames"]);
6980
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7043
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
6981
7044
  import_react_day_picker.DayPicker,
6982
7045
  __spreadValues({
6983
7046
  showOutsideDays: false,
@@ -7011,7 +7074,7 @@ var Calendar = (_a) => {
7011
7074
  Calendar.displayName = "Calendar";
7012
7075
 
7013
7076
  // src/primitives/currency-input/index.tsx
7014
- var import_hooks30 = require("@agg-build/hooks");
7077
+ var import_hooks31 = require("@agg-build/hooks");
7015
7078
  var import_react9 = require("react");
7016
7079
 
7017
7080
  // src/primitives/currency-input/currency-input.constants.ts
@@ -7103,7 +7166,7 @@ var sanitizeCurrencyInputPastedValue = (input, parts, decimalPlaces) => {
7103
7166
  };
7104
7167
 
7105
7168
  // src/primitives/currency-input/index.tsx
7106
- var import_jsx_runtime131 = require("react/jsx-runtime");
7169
+ var import_jsx_runtime132 = require("react/jsx-runtime");
7107
7170
  var CurrencyInput = ({
7108
7171
  value,
7109
7172
  onChange,
@@ -7121,7 +7184,7 @@ var CurrencyInput = ({
7121
7184
  }) => {
7122
7185
  const {
7123
7186
  general: { locale }
7124
- } = (0, import_hooks30.useSdkUiConfig)();
7187
+ } = (0, import_hooks31.useSdkUiConfig)();
7125
7188
  const parts = (0, import_react9.useMemo)(() => resolveCurrencyInputFormatParts(locale), [locale]);
7126
7189
  const [raw, setRaw] = (0, import_react9.useState)(() => value >= 0 ? String(value) : "");
7127
7190
  const isEditingRef = (0, import_react9.useRef)(false);
@@ -7236,7 +7299,7 @@ var CurrencyInput = ({
7236
7299
  onChange == null ? void 0 : onChange(nextValue);
7237
7300
  onBlur == null ? void 0 : onBlur();
7238
7301
  };
7239
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
7302
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7240
7303
  "input",
7241
7304
  {
7242
7305
  ref: inputRef,
@@ -7266,7 +7329,7 @@ var CurrencyInput = ({
7266
7329
  CurrencyInput.displayName = "CurrencyInput";
7267
7330
 
7268
7331
  // src/primitives/loading-icon/index.tsx
7269
- var import_hooks31 = require("@agg-build/hooks");
7332
+ var import_hooks32 = require("@agg-build/hooks");
7270
7333
 
7271
7334
  // src/primitives/loading-icon/loading-icon.constants.ts
7272
7335
  var LOADING_ICON_DEFAULT_SIZE = "medium";
@@ -7284,18 +7347,18 @@ var resolveLoadingIconAriaLabel = ({
7284
7347
  };
7285
7348
 
7286
7349
  // src/primitives/loading-icon/index.tsx
7287
- var import_jsx_runtime132 = require("react/jsx-runtime");
7350
+ var import_jsx_runtime133 = require("react/jsx-runtime");
7288
7351
  var LoadingIcon = ({
7289
7352
  size = LOADING_ICON_DEFAULT_SIZE,
7290
7353
  variant = "default",
7291
7354
  className,
7292
7355
  ariaLabel
7293
7356
  }) => {
7294
- const labels = (0, import_hooks31.useLabels)();
7357
+ const labels = (0, import_hooks32.useLabels)();
7295
7358
  const {
7296
7359
  features: { enableAnimations }
7297
- } = (0, import_hooks31.useSdkUiConfig)();
7298
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7360
+ } = (0, import_hooks32.useSdkUiConfig)();
7361
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7299
7362
  "span",
7300
7363
  {
7301
7364
  role: "status",
@@ -7308,7 +7371,7 @@ var LoadingIcon = ({
7308
7371
  "inline-grid place-items-center text-agg-primary will-change-transform",
7309
7372
  className
7310
7373
  ),
7311
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "inline-grid place-items-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7374
+ children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "inline-grid place-items-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7312
7375
  "svg",
7313
7376
  {
7314
7377
  viewBox: LOADING_ICON_SVG_VIEW_BOX,
@@ -7316,8 +7379,8 @@ var LoadingIcon = ({
7316
7379
  "block",
7317
7380
  variant === "prominent" ? LOADING_ICON_PROMINENT_FRAME_CLASS : iconSizeClasses[size]
7318
7381
  ),
7319
- children: variant === "prominent" ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("g", { children: [
7320
- enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7382
+ children: variant === "prominent" ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("g", { children: [
7383
+ enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7321
7384
  "animateTransform",
7322
7385
  {
7323
7386
  attributeName: "transform",
@@ -7329,7 +7392,7 @@ var LoadingIcon = ({
7329
7392
  repeatCount: "indefinite"
7330
7393
  }
7331
7394
  ) : null,
7332
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7395
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7333
7396
  "circle",
7334
7397
  {
7335
7398
  cx: "22",
@@ -7343,8 +7406,8 @@ var LoadingIcon = ({
7343
7406
  strokeDasharray: LOADING_ICON_PROMINENT_DASHARRAY
7344
7407
  }
7345
7408
  )
7346
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("g", { children: [
7347
- enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7409
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("g", { children: [
7410
+ enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7348
7411
  "animateTransform",
7349
7412
  {
7350
7413
  attributeName: "transform",
@@ -7356,7 +7419,7 @@ var LoadingIcon = ({
7356
7419
  repeatCount: "indefinite"
7357
7420
  }
7358
7421
  ) : null,
7359
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7422
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7360
7423
  "circle",
7361
7424
  {
7362
7425
  cx: "22",
@@ -7368,8 +7431,8 @@ var LoadingIcon = ({
7368
7431
  strokeLinecap: "round",
7369
7432
  strokeDasharray: "60 100",
7370
7433
  strokeDashoffset: "0",
7371
- children: enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
7372
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7434
+ children: enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
7435
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7373
7436
  "animate",
7374
7437
  {
7375
7438
  attributeName: "stroke-dasharray",
@@ -7378,7 +7441,7 @@ var LoadingIcon = ({
7378
7441
  repeatCount: "indefinite"
7379
7442
  }
7380
7443
  ),
7381
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7444
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7382
7445
  "animate",
7383
7446
  {
7384
7447
  attributeName: "stroke-dashoffset",
@@ -7399,7 +7462,7 @@ var LoadingIcon = ({
7399
7462
  LoadingIcon.displayName = "LoadingIcon";
7400
7463
 
7401
7464
  // src/primitives/select/index.tsx
7402
- var import_hooks32 = require("@agg-build/hooks");
7465
+ var import_hooks33 = require("@agg-build/hooks");
7403
7466
  var import_react10 = require("react");
7404
7467
  var import_react_dom = require("react-dom");
7405
7468
 
@@ -7421,7 +7484,7 @@ var resolveIsSelectDisabled = ({
7421
7484
  };
7422
7485
 
7423
7486
  // src/primitives/select/index.tsx
7424
- var import_jsx_runtime133 = require("react/jsx-runtime");
7487
+ var import_jsx_runtime134 = require("react/jsx-runtime");
7425
7488
  var SELECT_DROPDOWN_Z = 1e4;
7426
7489
  function resolveSelectPortalContainer(triggerRoot) {
7427
7490
  var _a, _b;
@@ -7444,11 +7507,11 @@ var Select = ({
7444
7507
  contentSideOffset = 8
7445
7508
  }) => {
7446
7509
  var _a;
7447
- const labels = (0, import_hooks32.useLabels)();
7510
+ const labels = (0, import_hooks33.useLabels)();
7448
7511
  const {
7449
7512
  general: { rootClassName },
7450
7513
  features: { enableAnimations }
7451
- } = (0, import_hooks32.useSdkUiConfig)();
7514
+ } = (0, import_hooks33.useSdkUiConfig)();
7452
7515
  const isDisabled = resolveIsSelectDisabled({ disabled, items });
7453
7516
  const selectedItem = resolveSelectedItem(items, value);
7454
7517
  const [isOpen, setIsOpen] = (0, import_react10.useState)(false);
@@ -7540,7 +7603,7 @@ var Select = ({
7540
7603
  };
7541
7604
  const isInline = variant === "inline";
7542
7605
  const triggerRadiusClass = triggerClassName != null ? triggerClassName : isInline ? "rounded-agg-sm" : "rounded-agg-md";
7543
- const listbox = menuRect ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7606
+ const listbox = menuRect ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7544
7607
  "div",
7545
7608
  {
7546
7609
  ref: portalRef,
@@ -7568,7 +7631,7 @@ var Select = ({
7568
7631
  const isSelected = item.value === value;
7569
7632
  const isHidden = item.hidden === true;
7570
7633
  if (isHidden) return null;
7571
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
7634
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
7572
7635
  "button",
7573
7636
  {
7574
7637
  type: "button",
@@ -7592,14 +7655,14 @@ var Select = ({
7592
7655
  handleClose();
7593
7656
  },
7594
7657
  children: [
7595
- isInline && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7658
+ isInline && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7596
7659
  "span",
7597
7660
  {
7598
7661
  className: "agg-select-item-indicator absolute bottom-2 left-0 top-2 w-1 bg-agg-primary",
7599
7662
  "aria-hidden": true
7600
7663
  }
7601
7664
  ) : null,
7602
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7665
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7603
7666
  "span",
7604
7667
  {
7605
7668
  className: cn(
@@ -7608,7 +7671,7 @@ var Select = ({
7608
7671
  ),
7609
7672
  children: item.icon
7610
7673
  }
7611
- ) : item.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7674
+ ) : item.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7612
7675
  RemoteImage,
7613
7676
  {
7614
7677
  src: item.iconUrl,
@@ -7616,7 +7679,7 @@ var Select = ({
7616
7679
  className: "agg-select-item-icon h-4 w-4 shrink-0 rounded-sm object-contain"
7617
7680
  }
7618
7681
  ) : null,
7619
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "agg-select-item-label truncate", children: item.label })
7682
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "agg-select-item-label truncate", children: item.label })
7620
7683
  ]
7621
7684
  },
7622
7685
  item.value
@@ -7624,7 +7687,7 @@ var Select = ({
7624
7687
  })
7625
7688
  }
7626
7689
  ) : null;
7627
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
7690
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
7628
7691
  "div",
7629
7692
  {
7630
7693
  ref: containerRef,
@@ -7634,7 +7697,7 @@ var Select = ({
7634
7697
  className
7635
7698
  ),
7636
7699
  children: [
7637
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
7700
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
7638
7701
  "button",
7639
7702
  {
7640
7703
  type: "button",
@@ -7658,7 +7721,7 @@ var Select = ({
7658
7721
  onPointerEnter: handlePointerEnter,
7659
7722
  onPointerLeave: handlePointerLeave,
7660
7723
  children: [
7661
- (selectedItem == null ? void 0 : selectedItem.icon) ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "h-4 w-4 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: selectedItem.icon }) : (selectedItem == null ? void 0 : selectedItem.iconUrl) ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7724
+ (selectedItem == null ? void 0 : selectedItem.icon) ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "h-4 w-4 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: selectedItem.icon }) : (selectedItem == null ? void 0 : selectedItem.iconUrl) ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7662
7725
  RemoteImage,
7663
7726
  {
7664
7727
  src: selectedItem.iconUrl,
@@ -7666,18 +7729,18 @@ var Select = ({
7666
7729
  className: "agg-select-icon h-4 w-4 shrink-0 rounded-sm object-contain"
7667
7730
  }
7668
7731
  ) : null,
7669
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "agg-select-value flex-1 truncate", children: (_a = selectedItem == null ? void 0 : selectedItem.label) != null ? _a : "" })
7732
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "agg-select-value flex-1 truncate", children: (_a = selectedItem == null ? void 0 : selectedItem.label) != null ? _a : "" })
7670
7733
  ]
7671
7734
  }
7672
7735
  ),
7673
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7736
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7674
7737
  "span",
7675
7738
  {
7676
7739
  className: cn(
7677
7740
  "agg-select-chevron pointer-events-none absolute inset-y-0 inline-flex items-center justify-center",
7678
7741
  isInline ? "right-2 text-agg-foreground" : "right-3 text-agg-muted-foreground"
7679
7742
  ),
7680
- children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7743
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7681
7744
  Icon,
7682
7745
  {
7683
7746
  name: isOpen ? "chevron-up" : "chevron-down-thin",
@@ -7695,7 +7758,7 @@ var Select = ({
7695
7758
  Select.displayName = "Select";
7696
7759
 
7697
7760
  // src/primitives/tooltip/index.tsx
7698
- var import_hooks33 = require("@agg-build/hooks");
7761
+ var import_hooks34 = require("@agg-build/hooks");
7699
7762
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
7700
7763
  var import_react11 = require("react");
7701
7764
 
@@ -7729,7 +7792,7 @@ var resolveTooltipArrowDimensions = (size) => {
7729
7792
  };
7730
7793
 
7731
7794
  // src/primitives/tooltip/index.tsx
7732
- var import_jsx_runtime134 = require("react/jsx-runtime");
7795
+ var import_jsx_runtime135 = require("react/jsx-runtime");
7733
7796
  var Tooltip = ({
7734
7797
  content,
7735
7798
  children,
@@ -7744,25 +7807,25 @@ var Tooltip = ({
7744
7807
  const {
7745
7808
  general: { rootClassName },
7746
7809
  features: { enableAnimations }
7747
- } = (0, import_hooks33.useSdkUiConfig)();
7810
+ } = (0, import_hooks34.useSdkUiConfig)();
7748
7811
  const trigger = (0, import_react11.useMemo)(() => {
7749
7812
  if (children) return children;
7750
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7813
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
7751
7814
  "button",
7752
7815
  {
7753
7816
  type: "button",
7754
7817
  className: resolveTooltipTriggerClassName(classNames == null ? void 0 : classNames.trigger),
7755
7818
  "aria-label": ariaLabel != null ? ariaLabel : defaultTooltipTriggerAriaLabel,
7756
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Icon, { name: "info", size: "small", className: cn(classNames == null ? void 0 : classNames.icon), "aria-hidden": true })
7819
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Icon, { name: "info", size: "small", className: cn(classNames == null ? void 0 : classNames.icon), "aria-hidden": true })
7757
7820
  }
7758
7821
  );
7759
7822
  }, [children, classNames == null ? void 0 : classNames.trigger, classNames == null ? void 0 : classNames.icon, ariaLabel]);
7760
7823
  const { width: arrowWidth, height: arrowHeight } = resolveTooltipArrowDimensions(size);
7761
7824
  const arrowPoints = `0,0 ${arrowWidth},0 ${arrowWidth / 2},${arrowHeight}`;
7762
7825
  const arrowBorderPath = `M0 0 L${arrowWidth / 2} ${arrowHeight} L${arrowWidth} 0`;
7763
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TooltipPrimitive.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(TooltipPrimitive.Root, { children: [
7764
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: trigger }),
7765
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
7826
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(TooltipPrimitive.Root, { children: [
7827
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: trigger }),
7828
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
7766
7829
  TooltipPrimitive.Content,
7767
7830
  {
7768
7831
  side,
@@ -7786,7 +7849,7 @@ var Tooltip = ({
7786
7849
  classNames == null ? void 0 : classNames.content
7787
7850
  ),
7788
7851
  children: [
7789
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TooltipPrimitive.Arrow, { asChild: true, width: arrowWidth, height: arrowHeight, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
7852
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Arrow, { asChild: true, width: arrowWidth, height: arrowHeight, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
7790
7853
  "svg",
7791
7854
  {
7792
7855
  width: arrowWidth,
@@ -7795,8 +7858,8 @@ var Tooltip = ({
7795
7858
  "aria-hidden": "true",
7796
7859
  className: cn("overflow-visible", classNames == null ? void 0 : classNames.arrow),
7797
7860
  children: [
7798
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("polygon", { points: arrowPoints, className: "fill-agg-secondary" }),
7799
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7861
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("polygon", { points: arrowPoints, className: "fill-agg-secondary" }),
7862
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
7800
7863
  "path",
7801
7864
  {
7802
7865
  d: arrowBorderPath,
@@ -7818,9 +7881,9 @@ var Tooltip = ({
7818
7881
  Tooltip.displayName = "Tooltip";
7819
7882
 
7820
7883
  // src/onboarding/steps/profile-setup.tsx
7821
- var import_jsx_runtime135 = require("react/jsx-runtime");
7884
+ var import_jsx_runtime136 = require("react/jsx-runtime");
7822
7885
  var ProfileSetupStep = ({ onContinue }) => {
7823
- const labels = (0, import_hooks34.useLabels)();
7886
+ const labels = (0, import_hooks35.useLabels)();
7824
7887
  const [username, setUsername] = (0, import_react12.useState)("");
7825
7888
  const [avatarFile, setAvatarFile] = (0, import_react12.useState)();
7826
7889
  const [avatarPreview, setAvatarPreview] = (0, import_react12.useState)();
@@ -7848,11 +7911,11 @@ var ProfileSetupStep = ({ onContinue }) => {
7848
7911
  avatarPreview
7849
7912
  });
7850
7913
  }, [username, avatarFile, avatarPreview, onContinue]);
7851
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex flex-col gap-7", children: [
7852
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.profileSetup.title }),
7853
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex flex-col gap-5 items-center w-full", children: [
7854
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex justify-center", children: [
7855
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
7914
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-7", children: [
7915
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.profileSetup.title }),
7916
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-5 items-center w-full", children: [
7917
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex justify-center", children: [
7918
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
7856
7919
  "button",
7857
7920
  {
7858
7921
  type: "button",
@@ -7868,13 +7931,13 @@ var ProfileSetupStep = ({ onContinue }) => {
7868
7931
  ),
7869
7932
  "aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
7870
7933
  children: [
7871
- !avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
7934
+ !avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
7872
7935
  "svg",
7873
7936
  {
7874
7937
  "aria-hidden": true,
7875
7938
  viewBox: "0 0 80 80",
7876
7939
  className: "pointer-events-none absolute inset-0 h-full w-full text-agg-separator group-hover:text-agg-muted-foreground",
7877
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
7940
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
7878
7941
  "circle",
7879
7942
  {
7880
7943
  cx: "40",
@@ -7888,18 +7951,18 @@ var ProfileSetupStep = ({ onContinue }) => {
7888
7951
  )
7889
7952
  }
7890
7953
  ) : null,
7891
- avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
7954
+ avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
7892
7955
  RemoteImage,
7893
7956
  {
7894
7957
  src: avatarPreview,
7895
7958
  alt: labels.onboarding.profileSetup.profilePreviewAlt,
7896
7959
  className: "h-full w-full object-cover"
7897
7960
  }
7898
- ) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ProfileIcon, { className: "h-7 w-7 text-agg-muted-foreground" })
7961
+ ) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ProfileIcon, { className: "h-7 w-7 text-agg-muted-foreground" })
7899
7962
  ]
7900
7963
  }
7901
7964
  ),
7902
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
7965
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
7903
7966
  "input",
7904
7967
  {
7905
7968
  ref: fileInputRef,
@@ -7911,8 +7974,8 @@ var ProfileSetupStep = ({ onContinue }) => {
7911
7974
  }
7912
7975
  )
7913
7976
  ] }),
7914
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [
7915
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
7977
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [
7978
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
7916
7979
  "label",
7917
7980
  {
7918
7981
  htmlFor: "onboarding-username",
@@ -7920,7 +7983,7 @@ var ProfileSetupStep = ({ onContinue }) => {
7920
7983
  children: labels.onboarding.profileSetup.usernameLabel
7921
7984
  }
7922
7985
  ),
7923
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
7986
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
7924
7987
  "input",
7925
7988
  {
7926
7989
  id: "onboarding-username",
@@ -7944,16 +8007,16 @@ var ProfileSetupStep = ({ onContinue }) => {
7944
8007
  )
7945
8008
  ] })
7946
8009
  ] }),
7947
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
8010
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
7948
8011
  ] });
7949
8012
  };
7950
8013
  ProfileSetupStep.displayName = "ProfileSetupStep";
7951
8014
 
7952
8015
  // src/onboarding/steps/connect-accounts.tsx
7953
- var import_hooks35 = require("@agg-build/hooks");
7954
- var import_jsx_runtime136 = require("react/jsx-runtime");
8016
+ var import_hooks36 = require("@agg-build/hooks");
8017
+ var import_jsx_runtime137 = require("react/jsx-runtime");
7955
8018
  var OnchainVenueLogos = () => {
7956
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
8019
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
7957
8020
  };
7958
8021
  var VenueCard = ({
7959
8022
  logos,
@@ -7964,8 +8027,8 @@ var VenueCard = ({
7964
8027
  onConnect,
7965
8028
  connected = false
7966
8029
  }) => {
7967
- const labels = (0, import_hooks35.useLabels)();
7968
- const action = connected ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8030
+ const labels = (0, import_hooks36.useLabels)();
8031
+ const action = connected ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
7969
8032
  Button,
7970
8033
  {
7971
8034
  variant: "tertiary",
@@ -7975,18 +8038,18 @@ var VenueCard = ({
7975
8038
  children: labels.onboarding.connectAccounts.connect
7976
8039
  }
7977
8040
  );
7978
- const mobileAction = connected ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8041
+ const mobileAction = connected ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
7979
8042
  Button,
7980
8043
  {
7981
8044
  variant: "tertiary",
7982
8045
  size: "medium",
7983
8046
  className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
7984
8047
  onClick: onConnect,
7985
- suffix: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ChevronRightIcon, { className: "h-4 w-4" }),
8048
+ suffix: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ChevronRightIcon, { className: "h-4 w-4" }),
7986
8049
  children: labels.onboarding.connectAccounts.connectAccount
7987
8050
  }
7988
8051
  );
7989
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
8052
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
7990
8053
  "div",
7991
8054
  {
7992
8055
  className: cn(
@@ -7994,23 +8057,23 @@ var VenueCard = ({
7994
8057
  connected ? "bg-agg-success/5" : "bg-agg-secondary-hover hover:bg-agg-tertiary"
7995
8058
  ),
7996
8059
  children: [
7997
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "hidden sm:flex items-center justify-between", children: [
7998
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex items-center gap-5", children: [
7999
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "shrink-0", children: logos }),
8000
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-[2px]", children: [
8001
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("p", { className: "text-agg-base font-agg-bold text-agg-foreground", children: title2 }),
8002
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("p", { className: "text-agg-sm text-agg-foreground", children: description })
8060
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "hidden sm:flex items-center justify-between", children: [
8061
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex items-center gap-5", children: [
8062
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "shrink-0", children: logos }),
8063
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-[2px]", children: [
8064
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-base font-agg-bold text-agg-foreground", children: title2 }),
8065
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-sm text-agg-foreground", children: description })
8003
8066
  ] })
8004
8067
  ] }),
8005
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "shrink-0", children: action })
8068
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "shrink-0", children: action })
8006
8069
  ] }),
8007
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-3 sm:hidden", children: [
8008
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-3", children: [
8009
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "shrink-0", children: logos }),
8010
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("p", { className: "text-agg-lg font-agg-bold text-agg-foreground", children: mobileTitle != null ? mobileTitle : title2 })
8070
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-3 sm:hidden", children: [
8071
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-3", children: [
8072
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "shrink-0", children: logos }),
8073
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-lg font-agg-bold text-agg-foreground", children: mobileTitle != null ? mobileTitle : title2 })
8011
8074
  ] }),
8012
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col items-start gap-2", children: [
8013
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("p", { className: "text-agg-base text-agg-foreground", children: mobileDescription != null ? mobileDescription : description }),
8075
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col items-start gap-2", children: [
8076
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-base text-agg-foreground", children: mobileDescription != null ? mobileDescription : description }),
8014
8077
  mobileAction
8015
8078
  ] })
8016
8079
  ] })
@@ -8023,14 +8086,14 @@ var ConnectAccountsStep = ({
8023
8086
  onContinue,
8024
8087
  connectedOnchain = false
8025
8088
  }) => {
8026
- const labels = (0, import_hooks35.useLabels)();
8089
+ const labels = (0, import_hooks36.useLabels)();
8027
8090
  const canContinue = connectedOnchain;
8028
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-6", children: [
8029
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
8030
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8091
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-6", children: [
8092
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
8093
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
8031
8094
  VenueCard,
8032
8095
  {
8033
- logos: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(OnchainVenueLogos, {}),
8096
+ logos: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OnchainVenueLogos, {}),
8034
8097
  title: labels.onboarding.connectAccounts.onchainTitle,
8035
8098
  mobileTitle: labels.onboarding.connectAccounts.onchainMobileTitle(
8036
8099
  ONCHAIN_VENUES.length - 1
@@ -8041,7 +8104,7 @@ var ConnectAccountsStep = ({
8041
8104
  connected: connectedOnchain
8042
8105
  }
8043
8106
  ) }),
8044
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8107
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
8045
8108
  Button,
8046
8109
  {
8047
8110
  variant: "primary",
@@ -8058,15 +8121,15 @@ ConnectAccountsStep.displayName = "ConnectAccountsStep";
8058
8121
 
8059
8122
  // src/onboarding/steps/connect-onchain-modal.tsx
8060
8123
  var import_react13 = require("react");
8061
- var import_hooks36 = require("@agg-build/hooks");
8124
+ var import_hooks37 = require("@agg-build/hooks");
8062
8125
  var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
8063
- var import_jsx_runtime137 = require("react/jsx-runtime");
8126
+ var import_jsx_runtime138 = require("react/jsx-runtime");
8064
8127
  var ConnectOnchainModal = ({
8065
8128
  open,
8066
8129
  onOpenChange,
8067
8130
  onConnect
8068
8131
  }) => {
8069
- const labels = (0, import_hooks36.useLabels)();
8132
+ const labels = (0, import_hooks37.useLabels)();
8070
8133
  const [connecting, setConnecting] = (0, import_react13.useState)(false);
8071
8134
  const [error, setError] = (0, import_react13.useState)();
8072
8135
  const handleCancel = (0, import_react13.useCallback)(() => {
@@ -8097,15 +8160,15 @@ var ConnectOnchainModal = ({
8097
8160
  },
8098
8161
  [onOpenChange]
8099
8162
  );
8100
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
8163
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
8101
8164
  Modal.Container,
8102
8165
  {
8103
8166
  maxWidth: "600px",
8104
8167
  "aria-label": labels.onboarding.connectOnchainModal.ariaLabel,
8105
8168
  classNames: { container: "!rounded-agg-lg" },
8106
8169
  children: [
8107
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Dialog3.Title, { className: "sr-only", children: labels.onboarding.connectOnchainModal.title }),
8108
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
8170
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog3.Title, { className: "sr-only", children: labels.onboarding.connectOnchainModal.title }),
8171
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8109
8172
  Modal.Header,
8110
8173
  {
8111
8174
  hideClose: false,
@@ -8116,26 +8179,26 @@ var ConnectOnchainModal = ({
8116
8179
  }
8117
8180
  }
8118
8181
  ),
8119
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-8 items-center", children: [
8120
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-4 items-center text-center", children: [
8121
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectOnchainModal.title }),
8122
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-base text-center leading-agg-6 text-agg-foreground whitespace-pre-line", children: labels.onboarding.connectOnchainModal.description })
8182
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-8 items-center", children: [
8183
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-4 items-center text-center", children: [
8184
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectOnchainModal.title }),
8185
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-base text-center leading-agg-6 text-agg-foreground whitespace-pre-line", children: labels.onboarding.connectOnchainModal.description })
8123
8186
  ] }),
8124
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex w-full flex-col items-center gap-4 rounded-agg-xl bg-agg-secondary-hover p-6", children: [
8125
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
8126
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex items-center gap-[6px]", children: [
8127
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
8128
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(VenueLogo, { venue, size: "medium" }),
8129
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
8187
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex w-full flex-col items-center gap-4 rounded-agg-xl bg-agg-secondary-hover p-6", children: [
8188
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
8189
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center gap-[6px]", children: [
8190
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
8191
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(VenueLogo, { venue, size: "medium" }),
8192
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
8130
8193
  ] }, venue)) })
8131
8194
  ] }),
8132
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-6 items-center", children: [
8133
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-3 items-center", children: [
8134
- error ? /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex items-center gap-2", children: [
8135
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
8136
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
8195
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-6 items-center", children: [
8196
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-3 items-center", children: [
8197
+ error ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center gap-2", children: [
8198
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
8199
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
8137
8200
  ] }) : null,
8138
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
8201
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8139
8202
  Button,
8140
8203
  {
8141
8204
  variant: "primary",
@@ -8146,7 +8209,7 @@ var ConnectOnchainModal = ({
8146
8209
  }
8147
8210
  )
8148
8211
  ] }),
8149
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
8212
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8150
8213
  Button,
8151
8214
  {
8152
8215
  variant: "tertiary",
@@ -8165,12 +8228,12 @@ var ConnectOnchainModal = ({
8165
8228
  ConnectOnchainModal.displayName = "ConnectOnchainModal";
8166
8229
 
8167
8230
  // src/onboarding/steps/connect-kalshi-modal.tsx
8168
- var import_hooks37 = require("@agg-build/hooks");
8231
+ var import_hooks38 = require("@agg-build/hooks");
8169
8232
  var import_sdk17 = require("@agg-build/sdk");
8170
8233
  var Dialog4 = __toESM(require("@radix-ui/react-dialog"));
8171
8234
  var import_react14 = require("react");
8172
8235
  var import_zod = require("zod");
8173
- var import_jsx_runtime138 = require("react/jsx-runtime");
8236
+ var import_jsx_runtime139 = require("react/jsx-runtime");
8174
8237
  var kalshiCredentialsSchema = import_zod.z.object({
8175
8238
  apiKeyId: import_zod.z.string().trim().min(1),
8176
8239
  privateKey: import_zod.z.string().trim().min(1)
@@ -8192,8 +8255,8 @@ var ConnectKalshiModal = ({
8192
8255
  onOpenChange,
8193
8256
  onVerify
8194
8257
  }) => {
8195
- const labels = (0, import_hooks37.useLabels)();
8196
- const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks37.useAppConfig)();
8258
+ const labels = (0, import_hooks38.useLabels)();
8259
+ const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks38.useAppConfig)();
8197
8260
  const apiKeyInputRef = (0, import_react14.useRef)(null);
8198
8261
  const errorId = (0, import_react14.useId)();
8199
8262
  const [apiKeyId, setApiKeyId] = (0, import_react14.useState)("");
@@ -8201,7 +8264,7 @@ var ConnectKalshiModal = ({
8201
8264
  const [isVerifying, setIsVerifying] = (0, import_react14.useState)(false);
8202
8265
  const [isConnected, setIsConnected] = (0, import_react14.useState)(false);
8203
8266
  const [error, setError] = (0, import_react14.useState)();
8204
- const availabilityState = (0, import_hooks37.getVenueAvailabilityState)({
8267
+ const availabilityState = (0, import_hooks38.getVenueAvailabilityState)({
8205
8268
  venueId: import_sdk17.Venue.kalshi,
8206
8269
  disabledVenues,
8207
8270
  isConfigLoading: isAppConfigLoading
@@ -8265,30 +8328,30 @@ var ConnectKalshiModal = ({
8265
8328
  [handleVerify]
8266
8329
  );
8267
8330
  if (availabilityState === "hidden") return null;
8268
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
8331
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
8269
8332
  Modal.Container,
8270
8333
  {
8271
8334
  maxWidth: "600px",
8272
8335
  "aria-label": labels.onboarding.connectKalshiModal.ariaLabel,
8273
8336
  classNames: { container: "!rounded-agg-2xl" },
8274
8337
  children: [
8275
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "flex h-[60px] shrink-0 items-center justify-end px-8", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8338
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "flex h-[60px] shrink-0 items-center justify-end px-8", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8276
8339
  Dialog4.Close,
8277
8340
  {
8278
8341
  "aria-label": labels.common.close,
8279
8342
  className: "flex size-10 cursor-pointer items-center justify-center rounded-agg-full text-agg-secondary transition-colors hover:bg-agg-quaternary hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-accent disabled:cursor-default disabled:opacity-50",
8280
8343
  disabled: isVerifying,
8281
- children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "close", size: "medium" })
8344
+ children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { name: "close", size: "medium" })
8282
8345
  }
8283
8346
  ) }),
8284
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Modal.Body, { classNames: { root: "!px-5 !pb-12 !pt-0 sm:!px-10" }, children: isConnected ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
8347
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Modal.Body, { classNames: { root: "!px-5 !pb-12 !pt-0 sm:!px-10" }, children: isConnected ? /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
8285
8348
  "div",
8286
8349
  {
8287
8350
  className: "flex flex-col items-center gap-8 pb-3 text-center",
8288
8351
  role: "status",
8289
8352
  "aria-live": "polite",
8290
8353
  children: [
8291
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "flex size-[60px] items-center justify-center rounded-agg-full bg-agg-success", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8354
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "flex size-[60px] items-center justify-center rounded-agg-full bg-agg-success", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8292
8355
  Icon,
8293
8356
  {
8294
8357
  name: "success-check",
@@ -8296,11 +8359,11 @@ var ConnectKalshiModal = ({
8296
8359
  "aria-hidden": "true"
8297
8360
  }
8298
8361
  ) }),
8299
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
8300
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog4.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.title }),
8301
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog4.Description, { className: "max-w-[480px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.description })
8362
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
8363
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Dialog4.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.title }),
8364
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Dialog4.Description, { className: "max-w-[480px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.description })
8302
8365
  ] }),
8303
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8366
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8304
8367
  Button,
8305
8368
  {
8306
8369
  variant: "primary",
@@ -8312,27 +8375,27 @@ var ConnectKalshiModal = ({
8312
8375
  )
8313
8376
  ]
8314
8377
  }
8315
- ) : /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("form", { className: "flex flex-col items-center gap-8", onSubmit: handleSubmit, children: [
8316
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(VenueLogo, { venue: import_sdk17.Venue.kalshi, variant: "logo", size: "large", className: "size-[60px]" }),
8317
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col items-center gap-4 text-center", children: [
8318
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog4.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
8319
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog4.Description, { className: "max-w-[520px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
8378
+ ) : /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("form", { className: "flex flex-col items-center gap-8", onSubmit: handleSubmit, children: [
8379
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(VenueLogo, { venue: import_sdk17.Venue.kalshi, variant: "logo", size: "large", className: "size-[60px]" }),
8380
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col items-center gap-4 text-center", children: [
8381
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Dialog4.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
8382
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Dialog4.Description, { className: "max-w-[520px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
8320
8383
  ] }),
8321
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex w-full flex-col gap-4", children: [
8322
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
8323
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-1", children: [
8324
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
8325
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
8384
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex w-full flex-col gap-4", children: [
8385
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
8386
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-1", children: [
8387
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
8388
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
8326
8389
  ] }),
8327
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
8328
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
8329
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { children: [
8390
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
8391
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
8392
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { children: [
8330
8393
  labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
8331
8394
  " ",
8332
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
8395
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
8333
8396
  labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
8334
8397
  " ",
8335
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8398
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8336
8399
  "a",
8337
8400
  {
8338
8401
  href: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl,
@@ -8343,34 +8406,34 @@ var ConnectKalshiModal = ({
8343
8406
  }
8344
8407
  )
8345
8408
  ] }),
8346
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { children: [
8409
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { children: [
8347
8410
  labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
8348
8411
  " ",
8349
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
8412
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
8350
8413
  labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
8351
8414
  ] }),
8352
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { children: [
8415
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { children: [
8353
8416
  labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
8354
8417
  " ",
8355
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
8418
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
8356
8419
  labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
8357
8420
  ] }),
8358
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
8421
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
8359
8422
  ] }),
8360
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
8423
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
8361
8424
  labels.onboarding.connectKalshiModal.stepOne.footerLineOne,
8362
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("br", {}),
8425
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("br", {}),
8363
8426
  labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
8364
8427
  ] })
8365
8428
  ] }),
8366
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
8367
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-1", children: [
8368
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
8369
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
8429
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
8430
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-1", children: [
8431
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
8432
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
8370
8433
  ] }),
8371
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
8372
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-2", children: [
8373
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8434
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
8435
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-2", children: [
8436
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8374
8437
  "label",
8375
8438
  {
8376
8439
  htmlFor: "kalshi-api-key-id",
@@ -8378,7 +8441,7 @@ var ConnectKalshiModal = ({
8378
8441
  children: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdLabel
8379
8442
  }
8380
8443
  ),
8381
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8444
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8382
8445
  "input",
8383
8446
  {
8384
8447
  ref: apiKeyInputRef,
@@ -8400,8 +8463,8 @@ var ConnectKalshiModal = ({
8400
8463
  }
8401
8464
  )
8402
8465
  ] }),
8403
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-2", children: [
8404
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8466
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-2", children: [
8467
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8405
8468
  "label",
8406
8469
  {
8407
8470
  htmlFor: "kalshi-private-key",
@@ -8409,7 +8472,7 @@ var ConnectKalshiModal = ({
8409
8472
  children: labels.onboarding.connectKalshiModal.stepTwo.privateKeyLabel
8410
8473
  }
8411
8474
  ),
8412
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8475
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8413
8476
  "textarea",
8414
8477
  {
8415
8478
  id: "kalshi-private-key",
@@ -8432,22 +8495,22 @@ var ConnectKalshiModal = ({
8432
8495
  ] })
8433
8496
  ] })
8434
8497
  ] }),
8435
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
8436
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
8437
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center gap-3", children: [
8438
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
8439
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "document", size: "small", className: "size-4 text-agg-primary" }),
8498
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
8499
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
8500
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex items-center gap-3", children: [
8501
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
8502
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { name: "document", size: "small", className: "size-4 text-agg-primary" }),
8440
8503
  labels.onboarding.connectKalshiModal.help.docsLinkLabel
8441
8504
  ] }),
8442
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "h-3 w-px bg-agg-separator" }),
8443
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
8444
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "play-square", size: "small", className: "size-4 text-agg-primary" }),
8505
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "h-3 w-px bg-agg-separator" }),
8506
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
8507
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { name: "play-square", size: "small", className: "size-4 text-agg-primary" }),
8445
8508
  labels.onboarding.connectKalshiModal.help.tutorialLinkLabel
8446
8509
  ] })
8447
8510
  ] })
8448
8511
  ] }),
8449
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col items-center gap-5", children: [
8450
- error ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
8512
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col items-center gap-5", children: [
8513
+ error ? /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
8451
8514
  "div",
8452
8515
  {
8453
8516
  id: errorId,
@@ -8455,13 +8518,13 @@ var ConnectKalshiModal = ({
8455
8518
  role: "alert",
8456
8519
  "aria-live": "assertive",
8457
8520
  children: [
8458
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "warning", size: "small", className: "size-3.5 text-agg-error" }),
8459
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
8521
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { name: "warning", size: "small", className: "size-3.5 text-agg-error" }),
8522
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
8460
8523
  ]
8461
8524
  }
8462
8525
  ) : null,
8463
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center justify-center gap-3", children: [
8464
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8526
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex items-center justify-center gap-3", children: [
8527
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8465
8528
  Button,
8466
8529
  {
8467
8530
  variant: "secondary",
@@ -8471,7 +8534,7 @@ var ConnectKalshiModal = ({
8471
8534
  children: labels.onboarding.connectKalshiModal.actions.cancel
8472
8535
  }
8473
8536
  ),
8474
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8537
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8475
8538
  Button,
8476
8539
  {
8477
8540
  type: "submit",
@@ -8492,7 +8555,7 @@ var ConnectKalshiModal = ({
8492
8555
  ConnectKalshiModal.displayName = "ConnectKalshiModal";
8493
8556
 
8494
8557
  // src/onboarding/index.tsx
8495
- var import_jsx_runtime139 = require("react/jsx-runtime");
8558
+ var import_jsx_runtime140 = require("react/jsx-runtime");
8496
8559
  var OnboardingModal = ({
8497
8560
  open,
8498
8561
  onOpenChange,
@@ -8503,7 +8566,7 @@ var OnboardingModal = ({
8503
8566
  connectedOnchain = false
8504
8567
  }) => {
8505
8568
  var _a;
8506
- const labels = (0, import_hooks38.useLabels)();
8569
+ const labels = (0, import_hooks39.useLabels)();
8507
8570
  const [step, setStep] = (0, import_react15.useState)(ONBOARDING_STEPS.HOW_IT_WORKS);
8508
8571
  const stepLabels = {
8509
8572
  [ONBOARDING_STEPS.HOW_IT_WORKS]: labels.onboarding.modal.stepHowItWorks,
@@ -8539,19 +8602,19 @@ var OnboardingModal = ({
8539
8602
  yield onConnectOnchain == null ? void 0 : onConnectOnchain();
8540
8603
  setOnchainConnected(true);
8541
8604
  }), [onConnectOnchain]);
8542
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_jsx_runtime139.Fragment, { children: [
8543
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
8605
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
8606
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
8544
8607
  Modal.Container,
8545
8608
  {
8546
8609
  maxWidth: "600px",
8547
8610
  "aria-label": resolvedTitle,
8548
8611
  classNames: { container: "!rounded-agg-lg" },
8549
8612
  children: [
8550
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Dialog5.Title, { className: "sr-only", children: resolvedTitle }),
8551
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(Modal.Body, { classNames: { root: "px-5 py-6 sm:px-10 sm:py-8" }, children: [
8552
- step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(HowItWorksStep, { onContinue: handleHowItWorksContinue, icons: howItWorksIcons }),
8553
- step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ProfileSetupStep, { onContinue: handleProfileContinue }),
8554
- step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8613
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Dialog5.Title, { className: "sr-only", children: resolvedTitle }),
8614
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Modal.Body, { classNames: { root: "px-5 py-6 sm:px-10 sm:py-8" }, children: [
8615
+ step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(HowItWorksStep, { onContinue: handleHowItWorksContinue, icons: howItWorksIcons }),
8616
+ step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ProfileSetupStep, { onContinue: handleProfileContinue }),
8617
+ step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
8555
8618
  ConnectAccountsStep,
8556
8619
  {
8557
8620
  onConnectOnchain: handleOpenOnchainModal,
@@ -8563,7 +8626,7 @@ var OnboardingModal = ({
8563
8626
  ]
8564
8627
  }
8565
8628
  ) }),
8566
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
8629
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
8567
8630
  ConnectOnchainModal,
8568
8631
  {
8569
8632
  open: onchainModalOpen,
@@ -8583,41 +8646,41 @@ var requestAggDepositModalOpen = () => {
8583
8646
  };
8584
8647
 
8585
8648
  // src/trading/fund-kalshi-modal.tsx
8586
- var import_hooks39 = require("@agg-build/hooks");
8649
+ var import_hooks40 = require("@agg-build/hooks");
8587
8650
  var import_sdk18 = require("@agg-build/sdk");
8588
8651
  var Dialog6 = __toESM(require("@radix-ui/react-dialog"));
8589
- var import_jsx_runtime140 = require("react/jsx-runtime");
8652
+ var import_jsx_runtime141 = require("react/jsx-runtime");
8590
8653
  var FundKalshiModal = ({ open, onOpenChange }) => {
8591
- const labels = (0, import_hooks39.useLabels)();
8654
+ const labels = (0, import_hooks40.useLabels)();
8592
8655
  const modalLabels = labels.trading.fundKalshiModal;
8593
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
8656
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
8594
8657
  Modal.Container,
8595
8658
  {
8596
8659
  maxWidth: "600px",
8597
8660
  "aria-label": modalLabels.ariaLabel,
8598
8661
  classNames: { container: "relative !rounded-agg-2xl" },
8599
8662
  children: [
8600
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
8663
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
8601
8664
  Dialog6.Close,
8602
8665
  {
8603
8666
  "aria-label": labels.common.close,
8604
8667
  className: "absolute right-6 top-6 z-10 flex size-11 cursor-pointer items-center justify-center rounded-agg-full text-agg-secondary transition-colors hover:bg-agg-quaternary hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-accent sm:right-7 sm:top-7",
8605
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Icon, { name: "close", size: "medium" })
8668
+ children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Icon, { name: "close", size: "medium" })
8606
8669
  }
8607
8670
  ),
8608
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Modal.Body, { classNames: { root: "!px-5 !py-12 sm:!px-10" }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex flex-col items-center gap-8 text-center", children: [
8609
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(VenueLogo, { venue: import_sdk18.Venue.kalshi, variant: "logo", size: "large", className: "size-[60px]" }),
8610
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
8611
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Dialog6.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: modalLabels.title }),
8612
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Dialog6.Description, { className: "max-w-[520px] text-agg-base leading-agg-6 text-agg-foreground", children: modalLabels.description })
8671
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Modal.Body, { classNames: { root: "!px-5 !py-12 sm:!px-10" }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex flex-col items-center gap-8 text-center", children: [
8672
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(VenueLogo, { venue: import_sdk18.Venue.kalshi, variant: "logo", size: "large", className: "size-[60px]" }),
8673
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
8674
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Dialog6.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: modalLabels.title }),
8675
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Dialog6.Description, { className: "max-w-[520px] text-agg-base leading-agg-6 text-agg-foreground", children: modalLabels.description })
8613
8676
  ] }),
8614
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex w-full flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4 text-left", children: [
8615
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: modalLabels.howItWorks }),
8616
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("ol", { className: "list-decimal space-y-0 pl-5 text-agg-sm leading-agg-5 text-agg-foreground", children: [
8617
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("li", { children: [
8677
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex w-full flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4 text-left", children: [
8678
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: modalLabels.howItWorks }),
8679
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("ol", { className: "list-decimal space-y-0 pl-5 text-agg-sm leading-agg-5 text-agg-foreground", children: [
8680
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("li", { children: [
8618
8681
  modalLabels.firstStepPrefix,
8619
8682
  " ",
8620
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
8683
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
8621
8684
  "a",
8622
8685
  {
8623
8686
  href: modalLabels.kalshiUrl,
@@ -8630,12 +8693,12 @@ var FundKalshiModal = ({ open, onOpenChange }) => {
8630
8693
  " ",
8631
8694
  modalLabels.firstStepSuffix
8632
8695
  ] }),
8633
- modalLabels.remainingSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("li", { children: step }, step))
8696
+ modalLabels.remainingSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("li", { children: step }, step))
8634
8697
  ] })
8635
8698
  ] }),
8636
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex flex-wrap items-center justify-center gap-3", children: [
8637
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Button, { variant: "secondary", size: "large", onClick: () => onOpenChange(false), children: modalLabels.doItLater }),
8638
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
8699
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex flex-wrap items-center justify-center gap-3", children: [
8700
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Button, { variant: "secondary", size: "large", onClick: () => onOpenChange(false), children: modalLabels.doItLater }),
8701
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
8639
8702
  Button,
8640
8703
  {
8641
8704
  variant: "primary",
@@ -8979,6 +9042,9 @@ var isPredictionMarketPrice = (value) => {
8979
9042
  var getPlaceOrderAverageExecutionPrice = (quoteData) => {
8980
9043
  var _a;
8981
9044
  if (!quoteData || quoteData.totalFilled <= 0) return null;
9045
+ const chFill = quoteData.fills.length === 1 ? quoteData.fills[0] : void 0;
9046
+ if ((chFill == null ? void 0 : chFill.venue) === "prophetx" && chFill.limitPriceMicroUsdc != null)
9047
+ return Number(chFill.limitPriceMicroUsdc) / 1e6;
8982
9048
  if (isFiniteNonNegativePrice((_a = quoteData.slippage) == null ? void 0 : _a.vwap)) return quoteData.slippage.vwap;
8983
9049
  const averageExecutionPrice = quoteData.rawExecCost / quoteData.totalFilled;
8984
9050
  return isFiniteNonNegativePrice(averageExecutionPrice) ? averageExecutionPrice : null;
@@ -9202,14 +9268,16 @@ var mapQuoteDataToRoutingRows = (quoteData, tradeSide = "buy") => {
9202
9268
  if (!(quoteData == null ? void 0 : quoteData.fills.length)) return [];
9203
9269
  return quoteData.fills.map((fill) => {
9204
9270
  const allocationValueLabel = getTradingValueLabel(__spreadValues({
9205
- amount: fill.venueQty * fill.avgPrice
9271
+ amount: tradeSide === "sell" && fill.outAmount != null ? Number(fill.outAmount) / 1e6 : tradeSide === "buy" && fill.inAmount != null ? Number(fill.inAmount) / 1e6 : fill.venueQty * fill.avgPrice
9206
9272
  }, tradeSide === "sell" ? { minimumFractionDigits: 2, maximumFractionDigits: 2 } : {}));
9207
9273
  const allocationSharesLabel = `${formatFlooredShareAmount(fill.venueQty, 2)} shares`;
9208
9274
  const requiresSharedKyc = venueRequiresSharedKyc({ venue: fill.venue });
9209
9275
  return __spreadProps(__spreadValues({
9210
9276
  venue: fill.venue,
9211
9277
  label: tradeSide === "sell" ? allocationSharesLabel : allocationValueLabel,
9212
- priceLabel: getTradingRoutePriceLabel(fill.avgPrice)
9278
+ priceLabel: getTradingRoutePriceLabel(
9279
+ fill.limitPriceMicroUsdc != null ? Number(fill.limitPriceMicroUsdc) / 1e6 : fill.avgPrice
9280
+ )
9213
9281
  }, requiresSharedKyc ? { requiresSharedKyc: true } : {}), {
9214
9282
  resultLabel: tradeSide === "sell" ? allocationValueLabel : getTradingValueLabel({
9215
9283
  amount: fill.venueQty,
@@ -9273,9 +9341,10 @@ var resolvePlaceOrderQuoteStatus = ({
9273
9341
  amount,
9274
9342
  labels,
9275
9343
  quoteData,
9276
- selectedMarket
9344
+ selectedMarket,
9345
+ tradeSide = "buy"
9277
9346
  }) => {
9278
- var _a, _b, _c;
9347
+ var _a, _b, _c, _d, _e;
9279
9348
  if (!selectedMarket) {
9280
9349
  return {
9281
9350
  tone: "warning",
@@ -9295,9 +9364,10 @@ var resolvePlaceOrderQuoteStatus = ({
9295
9364
  };
9296
9365
  }
9297
9366
  if (quoteData.status === "no_orderbooks") {
9367
+ const serverError = (_a = quoteData.error) == null ? void 0 : _a.trim();
9298
9368
  return {
9299
9369
  tone: "error",
9300
- message: labels.noOrderbooks,
9370
+ message: serverError || labels.noOrderbooks,
9301
9371
  placement: "above-action"
9302
9372
  };
9303
9373
  }
@@ -9311,26 +9381,27 @@ var resolvePlaceOrderQuoteStatus = ({
9311
9381
  if (quoteData.status === "insufficient_input_amount") {
9312
9382
  return {
9313
9383
  tone: "error",
9314
- message: (_a = quoteData.message) != null ? _a : labels.insufficientInputAmount,
9384
+ message: (_b = quoteData.message) != null ? _b : labels.insufficientInputAmount,
9315
9385
  placement: "above-action"
9316
9386
  };
9317
9387
  }
9318
9388
  if (quoteData.status === "invalid_input") {
9319
9389
  return {
9320
9390
  tone: "error",
9321
- message: (_b = quoteData.message) != null ? _b : labels.quoteUnavailable,
9391
+ message: (_c = quoteData.message) != null ? _c : labels.quoteUnavailable,
9322
9392
  placement: "above-action"
9323
9393
  };
9324
9394
  }
9325
9395
  if (quoteData.status === "insufficient_position") {
9326
- const total = (_c = quoteData.positionAvailability) == null ? void 0 : _c.totalSellableShares;
9396
+ const total = (_d = quoteData.positionAvailability) == null ? void 0 : _d.totalSellableShares;
9327
9397
  const message = total != null ? labels.insufficientPosition(total) : labels.insufficientPositionGeneric;
9328
9398
  return { tone: "error", message, placement: "above-action" };
9329
9399
  }
9330
9400
  if (quoteData.status === "insufficient_depth") {
9401
+ const serverError = (_e = quoteData.error) == null ? void 0 : _e.trim();
9331
9402
  return {
9332
9403
  tone: "error",
9333
- message: labels.insufficientSellDepth,
9404
+ message: tradeSide === "sell" ? serverError || labels.insufficientSellDepth : serverError || labels.insufficientLiquidity,
9334
9405
  placement: "above-action"
9335
9406
  };
9336
9407
  }
@@ -9410,6 +9481,7 @@ var buildLiveRouteCards = ({
9410
9481
  executionPrice: averageExecutionPrice,
9411
9482
  requiresSharedKyc: primaryRequiresSharedKyc
9412
9483
  } : null;
9484
+ const soloCardId = (prefix, sq) => `${prefix}-${sq.venue}${sq.venueMarketOutcomeId ? `-${sq.venueMarketOutcomeId}` : ""}`;
9413
9485
  const soloCards = ((_c = quoteData.venueSoloQuotes) != null ? _c : []).filter(
9414
9486
  (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
9415
9487
  // funding lane is short (API nulls the quoteId), which is NOT always the
@@ -9425,7 +9497,8 @@ var buildLiveRouteCards = ({
9425
9497
  const venue = parsedVenue.success ? parsedVenue.data : void 0;
9426
9498
  if (geoBlockedVenues.has(sq.venue)) {
9427
9499
  return {
9428
- id: `live-unavailable-${sq.venue}`,
9500
+ id: soloCardId("live-unavailable", sq),
9501
+ venueMarketOutcomeId: sq.venueMarketOutcomeId,
9429
9502
  hint: labels.venueUnavailableInRegion,
9430
9503
  kind: "venue",
9431
9504
  label: getTradingVenueLabel(venue),
@@ -9462,7 +9535,8 @@ var buildLiveRouteCards = ({
9462
9535
  feeBreakdown: (_b2 = sq.feeBreakdown) != null ? _b2 : quoteData.feeBreakdown
9463
9536
  }), sq.quoteId ? { status: "ok", error: void 0 } : null);
9464
9537
  return {
9465
- id: `live-solo-${sq.venue}`,
9538
+ id: soloCardId("live-solo", sq),
9539
+ venueMarketOutcomeId: sq.venueMarketOutcomeId,
9466
9540
  hint: labels.averagePrice(avgPrice),
9467
9541
  kind: "venue",
9468
9542
  label: getTradingVenueLabel(venue),
@@ -9484,7 +9558,8 @@ var buildLiveRouteCards = ({
9484
9558
  const temporarilyUnavailable = sq.unavailableReason === "venue_unavailable";
9485
9559
  const hasPreview = temporarilyUnavailable && sq.filledQty > 0;
9486
9560
  return __spreadProps(__spreadValues({
9487
- id: `live-unavailable-${sq.venue}`,
9561
+ id: soloCardId("live-unavailable", sq),
9562
+ venueMarketOutcomeId: sq.venueMarketOutcomeId,
9488
9563
  hint: temporarilyUnavailable ? labels.venueTemporarilyUnavailable : labels.venueUnavailableInRegion,
9489
9564
  kind: "venue",
9490
9565
  label: getTradingVenueLabel(venue),
@@ -10634,8 +10709,8 @@ var resolveOrderPresentation = ({
10634
10709
  const quotedShares = parseRawUsd(order.quotedSharesRaw);
10635
10710
  const actualShares = parseRawUsd(order.actualSharesRaw);
10636
10711
  const filledAmount = parseRawUsd(order.filledAmountRaw);
10637
- const fallbackAmount = fallbackFill ? tradeSide === "buy" ? fallbackFill.venueQty * fallbackFill.avgPrice : fallbackFill.venueQty : 0;
10638
- const amount = tradeSide === "buy" ? filledAmount != null ? filledAmount : quotedShares != null && quotedPrice > 0 ? quotedShares * quotedPrice : fallbackAmount : (_b = actualShares != null ? actualShares : quotedShares) != null ? _b : fallbackAmount;
10712
+ const fallbackAmount = fallbackFill ? tradeSide === "buy" ? fallbackFill.inAmount != null ? Number(fallbackFill.inAmount) / 1e6 : fallbackFill.venueQty * fallbackFill.avgPrice : fallbackFill.venueQty : 0;
10713
+ const amount = tradeSide === "buy" ? filledAmount != null ? filledAmount : (fallbackFill == null ? void 0 : fallbackFill.inAmount) != null ? fallbackAmount : quotedShares != null && quotedPrice > 0 ? quotedShares * quotedPrice : fallbackAmount : (_b = actualShares != null ? actualShares : quotedShares) != null ? _b : fallbackAmount;
10639
10714
  return {
10640
10715
  venue,
10641
10716
  venueLabel,
@@ -10820,7 +10895,7 @@ var deriveExecutionOrderGroups = ({
10820
10895
  (event) => event.event === "partial_fill"
10821
10896
  );
10822
10897
  const hasVenueExecutionProgress = venueRawSteps.some(isRawStepStarted);
10823
- const quotedAmount = fill.venueQty * fill.avgPrice;
10898
+ const quotedAmount = tradeSide === "buy" && fill.inAmount != null ? Number(fill.inAmount) / 1e6 : fill.venueQty * fill.avgPrice;
10824
10899
  const actualFill = resolveActualFillPresentation({
10825
10900
  fallbackAmount: quotedAmount,
10826
10901
  fallbackPrice: fill.avgPrice,
@@ -10983,16 +11058,16 @@ var calculateExecutionProgress = ({
10983
11058
  };
10984
11059
 
10985
11060
  // src/trading/place-order/index.place-order.execution-view.tsx
10986
- var import_jsx_runtime141 = require("react/jsx-runtime");
11061
+ var import_jsx_runtime142 = require("react/jsx-runtime");
10987
11062
  var PlaceOrderExecutionHeader = ({
10988
11063
  className,
10989
11064
  eventDateLabel,
10990
11065
  eventImage,
10991
11066
  eventTitle
10992
11067
  }) => {
10993
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: cn("agg-order-execution-header flex flex-col gap-2", className), children: [
10994
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex items-center gap-3", children: [
10995
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11068
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("agg-order-execution-header flex flex-col gap-2", className), children: [
11069
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center gap-3", children: [
11070
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
10996
11071
  RemoteImage,
10997
11072
  {
10998
11073
  src: eventImage != null ? eventImage : null,
@@ -11000,9 +11075,9 @@ var PlaceOrderExecutionHeader = ({
11000
11075
  className: "h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
11001
11076
  }
11002
11077
  ),
11003
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: eventTitle })
11078
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: eventTitle })
11004
11079
  ] }),
11005
- eventDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: eventDateLabel }) : null
11080
+ eventDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: eventDateLabel }) : null
11006
11081
  ] });
11007
11082
  };
11008
11083
  var ExecutionStepIndicator = ({
@@ -11010,7 +11085,7 @@ var ExecutionStepIndicator = ({
11010
11085
  step
11011
11086
  }) => {
11012
11087
  if (step.status === "done") {
11013
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11088
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11014
11089
  Icon,
11015
11090
  {
11016
11091
  name: "check-circle",
@@ -11021,7 +11096,7 @@ var ExecutionStepIndicator = ({
11021
11096
  );
11022
11097
  }
11023
11098
  if (step.status === "loading") {
11024
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("span", { className: "inline-flex h-3 w-3 shrink-0 items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11099
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "inline-flex h-3 w-3 shrink-0 items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11025
11100
  "span",
11026
11101
  {
11027
11102
  className: cn(
@@ -11032,7 +11107,7 @@ var ExecutionStepIndicator = ({
11032
11107
  ) });
11033
11108
  }
11034
11109
  if (step.status === "failed") {
11035
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11110
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11036
11111
  Icon,
11037
11112
  {
11038
11113
  name: "error-filled",
@@ -11043,7 +11118,7 @@ var ExecutionStepIndicator = ({
11043
11118
  );
11044
11119
  }
11045
11120
  if (step.status === "warning") {
11046
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11121
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11047
11122
  Icon,
11048
11123
  {
11049
11124
  name: "warning-filled",
@@ -11053,7 +11128,7 @@ var ExecutionStepIndicator = ({
11053
11128
  }
11054
11129
  );
11055
11130
  }
11056
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11131
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11057
11132
  "span",
11058
11133
  {
11059
11134
  className: "h-3 w-3 shrink-0 rounded-full border border-dashed border-agg-separator",
@@ -11066,15 +11141,15 @@ var PlaceOrderExecutionGroups = ({
11066
11141
  groups,
11067
11142
  labels
11068
11143
  }) => {
11069
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "agg-order-execution-groups flex flex-col gap-5", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
11144
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "agg-order-execution-groups flex flex-col gap-5", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
11070
11145
  "section",
11071
11146
  {
11072
11147
  className: "agg-order-execution-group flex flex-col gap-3",
11073
11148
  "aria-label": labels.venueOrder(group.venueLabel),
11074
11149
  children: [
11075
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex min-h-5 items-center justify-between gap-3 text-agg-sm leading-agg-5", children: [
11076
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex min-w-0 items-center gap-2 text-agg-foreground", children: [
11077
- group.venue ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11150
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex min-h-5 items-center justify-between gap-3 text-agg-sm leading-agg-5", children: [
11151
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex min-w-0 items-center gap-2 text-agg-foreground", children: [
11152
+ group.venue ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11078
11153
  VenueLogo,
11079
11154
  {
11080
11155
  venue: group.venue,
@@ -11083,22 +11158,22 @@ var PlaceOrderExecutionGroups = ({
11083
11158
  className: "h-3.5 w-3.5 shrink-0"
11084
11159
  }
11085
11160
  ) : null,
11086
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("h3", { className: "truncate font-agg-normal", children: labels.venueOrder(group.venueLabel) })
11161
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("h3", { className: "truncate font-agg-normal", children: labels.venueOrder(group.venueLabel) })
11087
11162
  ] }),
11088
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
11089
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("span", { className: "text-agg-muted-foreground", children: group.priceLabel }),
11090
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("span", { className: "text-agg-foreground", children: group.amountLabel })
11163
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
11164
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "text-agg-muted-foreground", children: group.priceLabel }),
11165
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "text-agg-foreground", children: group.amountLabel })
11091
11166
  ] })
11092
11167
  ] }),
11093
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "flex flex-col gap-3 pl-[22px]", children: group.steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
11168
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "flex flex-col gap-3 pl-[22px]", children: group.steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
11094
11169
  "div",
11095
11170
  {
11096
11171
  className: "flex items-start gap-2 text-agg-xs leading-agg-4 text-agg-foreground",
11097
11172
  "data-kind": step.kind,
11098
11173
  "data-status": step.status,
11099
11174
  children: [
11100
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ExecutionStepIndicator, { enableAnimations, step }),
11101
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "min-w-0 flex-1", children: step.status === "done" ? step.completedLabel : step.pendingLabel })
11175
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ExecutionStepIndicator, { enableAnimations, step }),
11176
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "min-w-0 flex-1", children: step.status === "done" ? step.completedLabel : step.pendingLabel })
11102
11177
  ]
11103
11178
  },
11104
11179
  step.id
@@ -11117,9 +11192,10 @@ var PlaceOrderExecutionView = ({
11117
11192
  eventTitle,
11118
11193
  groups,
11119
11194
  labels,
11120
- progress
11195
+ progress,
11196
+ settlementHint
11121
11197
  }) => {
11122
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11198
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11123
11199
  Card,
11124
11200
  {
11125
11201
  className: cn(
@@ -11128,8 +11204,8 @@ var PlaceOrderExecutionView = ({
11128
11204
  classNames == null ? void 0 : classNames.root,
11129
11205
  className
11130
11206
  ),
11131
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: cn("flex flex-col gap-6 p-5", classNames == null ? void 0 : classNames.body), children: [
11132
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11207
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("flex flex-col gap-6 p-5", classNames == null ? void 0 : classNames.body), children: [
11208
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11133
11209
  PlaceOrderExecutionHeader,
11134
11210
  {
11135
11211
  className: classNames == null ? void 0 : classNames.header,
@@ -11138,13 +11214,13 @@ var PlaceOrderExecutionView = ({
11138
11214
  eventTitle
11139
11215
  }
11140
11216
  ),
11141
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.content), children: [
11142
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex items-center gap-3", children: [
11143
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("p", { className: "shrink-0 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
11217
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.content), children: [
11218
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center gap-3", children: [
11219
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("p", { className: "shrink-0 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
11144
11220
  progress,
11145
11221
  "%"
11146
11222
  ] }),
11147
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11223
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11148
11224
  "progress",
11149
11225
  {
11150
11226
  "aria-label": labels.executingOrder,
@@ -11154,14 +11230,15 @@ var PlaceOrderExecutionView = ({
11154
11230
  }
11155
11231
  )
11156
11232
  ] }),
11157
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11233
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11158
11234
  PlaceOrderExecutionGroups,
11159
11235
  {
11160
11236
  enableAnimations,
11161
11237
  groups,
11162
11238
  labels
11163
11239
  }
11164
- )
11240
+ ),
11241
+ settlementHint ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: settlementHint }) : null
11165
11242
  ] })
11166
11243
  ] })
11167
11244
  }
@@ -11170,7 +11247,7 @@ var PlaceOrderExecutionView = ({
11170
11247
  PlaceOrderExecutionView.displayName = "PlaceOrderExecutionView";
11171
11248
 
11172
11249
  // src/trading/place-order/index.place-order.failure.tsx
11173
- var import_jsx_runtime142 = require("react/jsx-runtime");
11250
+ var import_jsx_runtime143 = require("react/jsx-runtime");
11174
11251
  var resolveFailureActionHandler = ({
11175
11252
  action,
11176
11253
  onDone,
@@ -11183,12 +11260,12 @@ var resolveFailureActionHandler = ({
11183
11260
  };
11184
11261
  var renderPartialFailureStep = (step) => {
11185
11262
  const isWarningStep = step.tone === "warning" || step.tone === "error";
11186
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
11263
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
11187
11264
  "div",
11188
11265
  {
11189
11266
  className: "flex items-center gap-2 text-agg-sm leading-agg-5 text-agg-foreground",
11190
11267
  children: [
11191
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11268
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11192
11269
  Icon,
11193
11270
  {
11194
11271
  name: isWarningStep ? "warning-filled" : "check-circle",
@@ -11197,8 +11274,8 @@ var renderPartialFailureStep = (step) => {
11197
11274
  "aria-hidden": "true"
11198
11275
  }
11199
11276
  ),
11200
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "min-w-0 flex-1", children: step.label }),
11201
- step.venue ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(VenueLogo, { venue: step.venue, size: "small", className: "h-4 w-4 shrink-0" }) : null
11277
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "min-w-0 flex-1", children: step.label }),
11278
+ step.venue ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(VenueLogo, { venue: step.venue, size: "small", className: "h-4 w-4 shrink-0" }) : null
11202
11279
  ]
11203
11280
  },
11204
11281
  step.id
@@ -11217,10 +11294,10 @@ var PlaceOrderFailureView = ({
11217
11294
  const shouldShowPartialFailureLayout = summary.kind === "partial_fill";
11218
11295
  const failureStepGroups = shouldShowPartialFailureLayout ? groupPlaceOrderFailureSteps(summary.steps) : [];
11219
11296
  if (shouldShowPartialFailureLayout) {
11220
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Card, { className: cn("group/agg-order-panel", getPlaceOrderContainerClassName(), className), children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "agg-order-failure-body flex flex-col gap-6 p-5", children: [
11221
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "agg-order-failure-header flex flex-col gap-2", children: [
11222
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "agg-order-failure-market flex items-center gap-3", children: [
11223
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11297
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Card, { className: cn("group/agg-order-panel", getPlaceOrderContainerClassName(), className), children: /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-body flex flex-col gap-6 p-5", children: [
11298
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-header flex flex-col gap-2", children: [
11299
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-market flex items-center gap-3", children: [
11300
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11224
11301
  RemoteImage,
11225
11302
  {
11226
11303
  src: (_a = summary.eventImage) != null ? _a : null,
@@ -11228,19 +11305,19 @@ var PlaceOrderFailureView = ({
11228
11305
  className: "h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
11229
11306
  }
11230
11307
  ),
11231
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: summary.eventTitle })
11308
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: summary.eventTitle })
11232
11309
  ] }),
11233
- summary.eventSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: summary.eventSubtitle }) : null
11310
+ summary.eventSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: summary.eventSubtitle }) : null
11234
11311
  ] }),
11235
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "flex flex-col gap-4", children: ((_b = summary.executionGroups) == null ? void 0 : _b.length) ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11312
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex flex-col gap-4", children: ((_b = summary.executionGroups) == null ? void 0 : _b.length) ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11236
11313
  PlaceOrderExecutionGroups,
11237
11314
  {
11238
11315
  enableAnimations: false,
11239
11316
  groups: summary.executionGroups,
11240
11317
  labels: tradingLabels
11241
11318
  }
11242
- ) : failureStepGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "flex flex-col gap-2", children: group.map((step) => renderPartialFailureStep(step)) }, `failure-group-${groupIndex}`)) }),
11243
- summary.errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11319
+ ) : failureStepGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex flex-col gap-2", children: group.map((step) => renderPartialFailureStep(step)) }, `failure-group-${groupIndex}`)) }),
11320
+ summary.errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11244
11321
  InlineAlert,
11245
11322
  {
11246
11323
  tone: "error",
@@ -11248,20 +11325,20 @@ var PlaceOrderFailureView = ({
11248
11325
  message: tradingLabels.orderFailureDescription(summary.errorMessage)
11249
11326
  }
11250
11327
  ) : null,
11251
- summary.result ? /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex flex-col gap-4", children: [
11252
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11253
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
11254
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPartiallyFilled }),
11255
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: tradingLabels.orderAveragePrice(summary.result.averagePriceLabel) })
11328
+ summary.result ? /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex flex-col gap-4", children: [
11329
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11330
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
11331
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPartiallyFilled }),
11332
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: tradingLabels.orderAveragePrice(summary.result.averagePriceLabel) })
11256
11333
  ] }),
11257
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-foreground", children: summary.result.filledAmountLabel })
11334
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-foreground", children: summary.result.filledAmountLabel })
11258
11335
  ] }),
11259
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11260
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPayout }),
11261
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-success", children: summary.result.payoutLabel })
11336
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11337
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPayout }),
11338
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-success", children: summary.result.payoutLabel })
11262
11339
  ] })
11263
11340
  ] }) : null,
11264
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "flex flex-col gap-4", children: summary.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11341
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex flex-col gap-4", children: summary.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11265
11342
  Button,
11266
11343
  {
11267
11344
  variant: action.variant === "retry" ? "primary" : "secondary",
@@ -11275,10 +11352,10 @@ var PlaceOrderFailureView = ({
11275
11352
  )) })
11276
11353
  ] }) });
11277
11354
  }
11278
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Card, { className: cn("group/agg-order-panel", getPlaceOrderContainerClassName(), className), children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "agg-order-failure-body flex flex-col gap-6 p-5", children: [
11279
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "agg-order-failure-header flex flex-col gap-2", children: [
11280
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "agg-order-failure-market flex items-center gap-3", children: [
11281
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11355
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Card, { className: cn("group/agg-order-panel", getPlaceOrderContainerClassName(), className), children: /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-body flex flex-col gap-6 p-5", children: [
11356
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-header flex flex-col gap-2", children: [
11357
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-market flex items-center gap-3", children: [
11358
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11282
11359
  RemoteImage,
11283
11360
  {
11284
11361
  src: (_c = summary.eventImage) != null ? _c : null,
@@ -11286,11 +11363,11 @@ var PlaceOrderFailureView = ({
11286
11363
  className: "h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
11287
11364
  }
11288
11365
  ),
11289
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: summary.eventTitle })
11366
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: summary.eventTitle })
11290
11367
  ] }),
11291
- summary.eventSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: summary.eventSubtitle }) : null
11368
+ summary.eventSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: summary.eventSubtitle }) : null
11292
11369
  ] }),
11293
- ((_d = summary.executionGroups) == null ? void 0 : _d.length) ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11370
+ ((_d = summary.executionGroups) == null ? void 0 : _d.length) ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11294
11371
  PlaceOrderExecutionGroups,
11295
11372
  {
11296
11373
  enableAnimations: false,
@@ -11298,7 +11375,7 @@ var PlaceOrderFailureView = ({
11298
11375
  labels: tradingLabels
11299
11376
  }
11300
11377
  ) : null,
11301
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11378
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11302
11379
  InlineAlert,
11303
11380
  {
11304
11381
  tone: "error",
@@ -11307,7 +11384,7 @@ var PlaceOrderFailureView = ({
11307
11384
  message: tradingLabels.orderFailureDescription((_e = summary.errorMessage) != null ? _e : "")
11308
11385
  }
11309
11386
  ),
11310
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "agg-order-failure-actions flex flex-col gap-4", children: summary.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11387
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "agg-order-failure-actions flex flex-col gap-4", children: summary.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11311
11388
  Button,
11312
11389
  {
11313
11390
  variant: action.variant === "retry" ? "primary" : "secondary",
@@ -11324,7 +11401,7 @@ var PlaceOrderFailureView = ({
11324
11401
  PlaceOrderFailureView.displayName = "PlaceOrderFailureView";
11325
11402
 
11326
11403
  // src/trading/place-order/index.place-order.success.tsx
11327
- var import_jsx_runtime143 = require("react/jsx-runtime");
11404
+ var import_jsx_runtime144 = require("react/jsx-runtime");
11328
11405
  var resolveBuyPayoutLabel = (shares) => {
11329
11406
  if (!shares) return "$0";
11330
11407
  return shares.startsWith("$") ? shares : `$${shares}`;
@@ -11342,7 +11419,7 @@ var PlaceOrderSuccessView = ({
11342
11419
  const resolvedPayoutLabel = (_c = summary.toWinLabel) != null ? _c : resolvedTradeSide === "sell" ? summary.estimatedCost : resolveBuyPayoutLabel(summary.shares);
11343
11420
  const potentialReturnLabel = summary.potentialReturnLabel ? tradingLabels.potentialReturnBetter(summary.potentialReturnLabel) : null;
11344
11421
  const legacyExecutionSteps = ((_d = summary.executionStepGroups) != null ? _d : []).flat();
11345
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11422
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11346
11423
  Card,
11347
11424
  {
11348
11425
  className: cn(
@@ -11351,8 +11428,8 @@ var PlaceOrderSuccessView = ({
11351
11428
  "border-0 ring-1 ring-inset ring-agg-separator",
11352
11429
  className
11353
11430
  ),
11354
- children: /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-success-body flex flex-col gap-6 p-5", children: [
11355
- summary.eventTitle ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11431
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-success-body flex flex-col gap-6 p-5", children: [
11432
+ summary.eventTitle ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11356
11433
  PlaceOrderExecutionHeader,
11357
11434
  {
11358
11435
  eventDateLabel: summary.eventDateLabel,
@@ -11360,19 +11437,19 @@ var PlaceOrderSuccessView = ({
11360
11437
  eventTitle: summary.eventTitle
11361
11438
  }
11362
11439
  ) : null,
11363
- ((_e = summary.executionGroups) == null ? void 0 : _e.length) ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11440
+ ((_e = summary.executionGroups) == null ? void 0 : _e.length) ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11364
11441
  PlaceOrderExecutionGroups,
11365
11442
  {
11366
11443
  enableAnimations: false,
11367
11444
  groups: summary.executionGroups,
11368
11445
  labels: tradingLabels
11369
11446
  }
11370
- ) : legacyExecutionSteps.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex flex-col gap-3 pl-[22px]", children: legacyExecutionSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
11447
+ ) : legacyExecutionSteps.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "flex flex-col gap-3 pl-[22px]", children: legacyExecutionSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
11371
11448
  "div",
11372
11449
  {
11373
11450
  className: "flex items-start gap-2 text-agg-xs leading-agg-4 text-agg-foreground",
11374
11451
  children: [
11375
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11452
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11376
11453
  Icon,
11377
11454
  {
11378
11455
  name: step.tone === "warning" || step.tone === "error" ? "warning-filled" : "check-circle",
@@ -11384,28 +11461,28 @@ var PlaceOrderSuccessView = ({
11384
11461
  "aria-hidden": "true"
11385
11462
  }
11386
11463
  ),
11387
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "min-w-0 flex-1", children: step.label })
11464
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "min-w-0 flex-1", children: step.label })
11388
11465
  ]
11389
11466
  },
11390
11467
  step.id
11391
11468
  )) }) : null,
11392
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-success-summary flex flex-col gap-4", children: [
11393
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11394
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
11395
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: summary.resultState === "partial" ? tradingLabels.orderPartiallyFilled : tradingLabels.orderFullyFilled }),
11396
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: tradingLabels.orderAveragePrice(summary.avgPrice) })
11469
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-success-summary flex flex-col gap-4", children: [
11470
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11471
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
11472
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: summary.resultState === "partial" ? tradingLabels.orderPartiallyFilled : tradingLabels.orderFullyFilled }),
11473
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: tradingLabels.orderAveragePrice(summary.avgPrice) })
11397
11474
  ] }),
11398
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-foreground", children: resolvedAmountLabel })
11475
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-foreground", children: resolvedAmountLabel })
11399
11476
  ] }),
11400
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11401
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
11402
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPayout }),
11403
- potentialReturnLabel ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "inline-flex h-5 items-center rounded-agg-sm border border-agg-primary/50 bg-gradient-to-b from-agg-primary/8 to-agg-primary/15 px-2 text-[10px] font-agg-bold uppercase leading-[14px] text-agg-primary", children: potentialReturnLabel }) : null
11477
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11478
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
11479
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPayout }),
11480
+ potentialReturnLabel ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "inline-flex h-5 items-center rounded-agg-sm border border-agg-primary/50 bg-gradient-to-b from-agg-primary/8 to-agg-primary/15 px-2 text-[10px] font-agg-bold uppercase leading-[14px] text-agg-primary", children: potentialReturnLabel }) : null
11404
11481
  ] }),
11405
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-success", children: resolvedPayoutLabel })
11482
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-success", children: resolvedPayoutLabel })
11406
11483
  ] })
11407
11484
  ] }),
11408
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11485
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11409
11486
  Button,
11410
11487
  {
11411
11488
  variant: "secondary",
@@ -11423,7 +11500,7 @@ var PlaceOrderSuccessView = ({
11423
11500
  PlaceOrderSuccessView.displayName = "PlaceOrderSuccessView";
11424
11501
 
11425
11502
  // src/trading/place-order/index.tsx
11426
- var import_jsx_runtime144 = require("react/jsx-runtime");
11503
+ var import_jsx_runtime145 = require("react/jsx-runtime");
11427
11504
  var SELL_SHARE_INPUT_DECIMALS = 6;
11428
11505
  var SELL_SHARE_DISPLAY_DECIMALS = 2;
11429
11506
  var resolvePlaceOrderPortalContainer = (triggerElement) => {
@@ -11541,7 +11618,7 @@ var PlaceOrderSlippageControl = ({
11541
11618
  minimumValue: slippageMinimumValue
11542
11619
  }) => {
11543
11620
  var _a, _b;
11544
- const labels = (0, import_hooks40.useLabels)();
11621
+ const labels = (0, import_hooks41.useLabels)();
11545
11622
  const containerRef = (0, import_react17.useRef)(null);
11546
11623
  const triggerRef = (0, import_react17.useRef)(null);
11547
11624
  const inputRef = (0, import_react17.useRef)(null);
@@ -11639,8 +11716,8 @@ var PlaceOrderSlippageControl = ({
11639
11716
  if (!isEditing) return;
11640
11717
  handleCommitDraft(false);
11641
11718
  };
11642
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { ref: containerRef, className: "agg-slippage-control w-full", onBlur: handleContainerBlur, children: [
11643
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
11719
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { ref: containerRef, className: "agg-slippage-control w-full", onBlur: handleContainerBlur, children: [
11720
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
11644
11721
  "button",
11645
11722
  {
11646
11723
  ref: triggerRef,
@@ -11658,8 +11735,8 @@ var PlaceOrderSlippageControl = ({
11658
11735
  ),
11659
11736
  onClick: handleToggleEditing,
11660
11737
  children: [
11661
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "agg-slippage-label", children: collapsedLabel }),
11662
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11738
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "agg-slippage-label", children: collapsedLabel }),
11739
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11663
11740
  Icon,
11664
11741
  {
11665
11742
  name: isEditing ? "chevron-up" : "pencil",
@@ -11671,7 +11748,7 @@ var PlaceOrderSlippageControl = ({
11671
11748
  ]
11672
11749
  }
11673
11750
  ),
11674
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11751
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11675
11752
  "div",
11676
11753
  {
11677
11754
  "aria-hidden": !isEditing,
@@ -11685,10 +11762,10 @@ var PlaceOrderSlippageControl = ({
11685
11762
  "transition-[grid-template-rows,opacity,margin-top] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)]"
11686
11763
  )
11687
11764
  ),
11688
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-slippage-editor-body flex flex-col gap-2", children: [
11689
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-slippage-input-row flex h-9 overflow-hidden rounded-agg-sm border border-agg-separator", children: [
11690
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-slippage-input-group flex min-w-0 flex-1 items-center gap-2 bg-agg-secondary px-3", children: [
11691
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11765
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-slippage-editor-body flex flex-col gap-2", children: [
11766
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-slippage-input-row flex h-9 overflow-hidden rounded-agg-sm border border-agg-separator", children: [
11767
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-slippage-input-group flex min-w-0 flex-1 items-center gap-2 bg-agg-secondary px-3", children: [
11768
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11692
11769
  "input",
11693
11770
  {
11694
11771
  ref: inputRef,
@@ -11703,7 +11780,7 @@ var PlaceOrderSlippageControl = ({
11703
11780
  onKeyDown: handleInputKeyDown
11704
11781
  }
11705
11782
  ),
11706
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11783
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11707
11784
  "button",
11708
11785
  {
11709
11786
  type: "button",
@@ -11721,8 +11798,8 @@ var PlaceOrderSlippageControl = ({
11721
11798
  }
11722
11799
  )
11723
11800
  ] }),
11724
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "h-full w-px bg-agg-separator", "aria-hidden": "true" }),
11725
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11801
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "h-full w-px bg-agg-separator", "aria-hidden": "true" }),
11802
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11726
11803
  "div",
11727
11804
  {
11728
11805
  className: "agg-slippage-suffix flex w-9 items-center justify-center bg-agg-secondary-hover text-agg-sm leading-agg-5 text-agg-muted-foreground",
@@ -11731,7 +11808,7 @@ var PlaceOrderSlippageControl = ({
11731
11808
  }
11732
11809
  )
11733
11810
  ] }),
11734
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11811
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11735
11812
  "div",
11736
11813
  {
11737
11814
  "aria-hidden": !resolvedWarningMessage,
@@ -11745,13 +11822,13 @@ var PlaceOrderSlippageControl = ({
11745
11822
  "transition-[grid-template-rows,opacity] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]"
11746
11823
  )
11747
11824
  ),
11748
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
11825
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
11749
11826
  "div",
11750
11827
  {
11751
11828
  id: warningId,
11752
11829
  className: "agg-slippage-warning-message flex items-start gap-2 text-agg-sm leading-agg-5 text-agg-foreground",
11753
11830
  children: [
11754
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11831
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11755
11832
  Icon,
11756
11833
  {
11757
11834
  name: "warning-filled",
@@ -11760,7 +11837,7 @@ var PlaceOrderSlippageControl = ({
11760
11837
  color: "currentColor"
11761
11838
  }
11762
11839
  ),
11763
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { children: resolvedWarningMessage != null ? resolvedWarningMessage : "" })
11840
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { children: resolvedWarningMessage != null ? resolvedWarningMessage : "" })
11764
11841
  ]
11765
11842
  }
11766
11843
  ) })
@@ -11780,9 +11857,9 @@ var renderCardHeader = ({
11780
11857
  onClose
11781
11858
  }) => {
11782
11859
  if (!headerTitle) return null;
11783
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: cn("agg-order-panel-header flex flex-col gap-2", className), children: [
11784
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-market-summary flex items-center gap-3", children: [
11785
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11860
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("agg-order-panel-header flex flex-col gap-2", className), children: [
11861
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-market-summary flex items-center gap-3", children: [
11862
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11786
11863
  RemoteImage,
11787
11864
  {
11788
11865
  src: headerImage,
@@ -11790,19 +11867,19 @@ var renderCardHeader = ({
11790
11867
  className: "agg-order-market-image h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
11791
11868
  }
11792
11869
  ),
11793
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-order-market-title min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: headerTitle }),
11794
- onClose ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11870
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-market-title min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: headerTitle }),
11871
+ onClose ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11795
11872
  "button",
11796
11873
  {
11797
11874
  type: "button",
11798
11875
  className: "agg-order-close -mr-1 -mt-1 hidden shrink-0 cursor-pointer items-center justify-center p-1 text-agg-muted-foreground hover:text-agg-foreground sm:flex",
11799
11876
  "aria-label": "Close",
11800
11877
  onClick: onClose,
11801
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(CloseIcon, { className: "h-5 w-5" })
11878
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(CloseIcon, { className: "h-5 w-5" })
11802
11879
  }
11803
11880
  ) : null
11804
11881
  ] }),
11805
- headerSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-order-market-subtitle text-agg-base leading-agg-6 text-agg-foreground", children: headerSubtitle }) : null
11882
+ headerSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-market-subtitle text-agg-base leading-agg-6 text-agg-foreground", children: headerSubtitle }) : null
11806
11883
  ] });
11807
11884
  };
11808
11885
  var PlaceOrderResolvedView = ({
@@ -11815,7 +11892,7 @@ var PlaceOrderResolvedView = ({
11815
11892
  showResolvingState = false
11816
11893
  }) => {
11817
11894
  var _a, _b;
11818
- const labels = (0, import_hooks40.useLabels)();
11895
+ const labels = (0, import_hooks41.useLabels)();
11819
11896
  const tradingLabels = labels.trading;
11820
11897
  const resolvingTimestamp = (_a = resolutionTimestamp != null ? resolutionTimestamp : tradingState.resolvesAt) != null ? _a : tradingState.endsAt;
11821
11898
  const isResolvingMarket = showResolvingState && !tradingState.winningOutcome;
@@ -11824,7 +11901,7 @@ var PlaceOrderResolvedView = ({
11824
11901
  return endDateLabel ? `${tradingState.market.question} \xB7 ${endDateLabel}` : tradingState.market.question;
11825
11902
  })() : "";
11826
11903
  if (isResolvingMarket) {
11827
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11904
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11828
11905
  Card,
11829
11906
  {
11830
11907
  className: cn(
@@ -11835,7 +11912,7 @@ var PlaceOrderResolvedView = ({
11835
11912
  ),
11836
11913
  role: "status",
11837
11914
  "aria-label": labels.marketDetails.resolvingTitle,
11838
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
11915
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
11839
11916
  "div",
11840
11917
  {
11841
11918
  className: cn(
@@ -11843,12 +11920,12 @@ var PlaceOrderResolvedView = ({
11843
11920
  classNames == null ? void 0 : classNames.body
11844
11921
  ),
11845
11922
  children: [
11846
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center rounded-full bg-agg-primary/10", children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(LoadingIcon, { variant: "prominent" }) }),
11847
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: cn("flex w-full flex-col items-center gap-1", classNames == null ? void 0 : classNames.content), children: [
11848
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Typography, { variant: "body-large-strong", children: labels.marketDetails.resolvingTitle }),
11849
- resolvingSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Typography, { variant: "body", className: "text-center", children: resolvingSubtitle }) : null
11923
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center rounded-full bg-agg-primary/10", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(LoadingIcon, { variant: "prominent" }) }),
11924
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("flex w-full flex-col items-center gap-1", classNames == null ? void 0 : classNames.content), children: [
11925
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body-large-strong", children: labels.marketDetails.resolvingTitle }),
11926
+ resolvingSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body", className: "text-center", children: resolvingSubtitle }) : null
11850
11927
  ] }),
11851
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11928
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11852
11929
  Typography,
11853
11930
  {
11854
11931
  variant: "label",
@@ -11862,7 +11939,7 @@ var PlaceOrderResolvedView = ({
11862
11939
  }
11863
11940
  );
11864
11941
  }
11865
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11942
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11866
11943
  Card,
11867
11944
  {
11868
11945
  className: cn(
@@ -11871,19 +11948,19 @@ var PlaceOrderResolvedView = ({
11871
11948
  classNames == null ? void 0 : classNames.root,
11872
11949
  className
11873
11950
  ),
11874
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: cn("agg-order-panel-body flex flex-col", classNames == null ? void 0 : classNames.body), children: [
11875
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex flex-col items-center gap-6 p-8", children: [
11876
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11951
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("agg-order-panel-body flex flex-col", classNames == null ? void 0 : classNames.body), children: [
11952
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col items-center gap-6 p-8", children: [
11953
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11877
11954
  "div",
11878
11955
  {
11879
11956
  className: cn(
11880
11957
  "flex h-15 w-15 items-center justify-center rounded-full",
11881
11958
  "bg-agg-primary/15"
11882
11959
  ),
11883
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Icon, { name: "success-check", className: cn("h-6 w-6", "text-agg-primary") })
11960
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon, { name: "success-check", className: cn("h-6 w-6", "text-agg-primary") })
11884
11961
  }
11885
11962
  ),
11886
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
11963
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
11887
11964
  "div",
11888
11965
  {
11889
11966
  className: cn(
@@ -11891,8 +11968,8 @@ var PlaceOrderResolvedView = ({
11891
11968
  classNames == null ? void 0 : classNames.content
11892
11969
  ),
11893
11970
  children: [
11894
- tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Typography, { variant: "body", className: "text-center", children: tradingState.market.question }) : null,
11895
- tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(
11971
+ tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body", className: "text-center", children: tradingState.market.question }) : null,
11972
+ tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(
11896
11973
  shouldUseRawResolvedPlaceOrderOutcomeLabel(
11897
11974
  tradingState.market,
11898
11975
  tradingState.winningOutcome
@@ -11906,25 +11983,25 @@ var PlaceOrderResolvedView = ({
11906
11983
  }
11907
11984
  )
11908
11985
  ] }),
11909
- resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
11910
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
11911
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex w-full flex-col gap-5 p-6", children: [
11912
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Typography, { variant: "body-strong", className: "text-center", children: tradingLabels.resolvedEarningsTitle }),
11913
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
11914
- resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11915
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { children: tradingLabels.resolvedResolutionDateLabel }),
11916
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
11986
+ resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
11987
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
11988
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex w-full flex-col gap-5 p-6", children: [
11989
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body-strong", className: "text-center", children: tradingLabels.resolvedEarningsTitle }),
11990
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
11991
+ resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11992
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.resolvedResolutionDateLabel }),
11993
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
11917
11994
  ] }) : null,
11918
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11919
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { children: tradingLabels.resolvedSharesLabel }),
11920
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
11995
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11996
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.resolvedSharesLabel }),
11997
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
11921
11998
  ] }),
11922
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11923
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { children: tradingLabels.resolvedTotalPayoutLabel }),
11924
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
11999
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
12000
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.resolvedTotalPayoutLabel }),
12001
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
11925
12002
  ] })
11926
12003
  ] }),
11927
- resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12004
+ resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11928
12005
  Button,
11929
12006
  {
11930
12007
  size: "large",
@@ -11946,21 +12023,21 @@ var renderRouteBreakdownRow = (row, sharedKycStatus, tradingLabels) => {
11946
12023
  const venueLabel = getTradingVenueLabel(row.venue);
11947
12024
  const rowKey = `${row.venue}-${row.label}-${row.priceLabel}-${(_a = row.resultLabel) != null ? _a : ""}`;
11948
12025
  const showSharedKycRequirement = row.requiresSharedKyc === true && sharedKycStatus !== void 0 && sharedKycStatus !== "verified";
11949
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
12026
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
11950
12027
  "div",
11951
12028
  {
11952
12029
  className: "agg-route-breakdown-row flex items-center justify-between gap-4 text-left",
11953
12030
  children: [
11954
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-route-breakdown-market flex min-w-0 items-center gap-2", children: [
11955
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(VenueLogo, { venue: row.venue, className: "size-3!", ariaLabel: venueLabel }),
11956
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
11957
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-route-breakdown-label truncate text-agg-sm leading-agg-5 text-agg-foreground", children: row.label }),
11958
- showSharedKycRequirement ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-xs leading-agg-4 text-agg-muted-foreground", children: tradingLabels.sharedKyc.required }) : null
12031
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-breakdown-market flex min-w-0 items-center gap-2", children: [
12032
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(VenueLogo, { venue: row.venue, className: "size-3!", ariaLabel: venueLabel }),
12033
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
12034
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-breakdown-label truncate text-agg-sm leading-agg-5 text-agg-foreground", children: row.label }),
12035
+ showSharedKycRequirement ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-xs leading-agg-4 text-agg-muted-foreground", children: tradingLabels.sharedKyc.required }) : null
11959
12036
  ] })
11960
12037
  ] }),
11961
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-route-breakdown-value flex shrink-0 items-center gap-2 text-agg-sm leading-agg-5", children: [
11962
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-muted-foreground", children: row.priceLabel }),
11963
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-foreground", children: (_b = row.resultLabel) != null ? _b : "" })
12038
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-breakdown-value flex shrink-0 items-center gap-2 text-agg-sm leading-agg-5", children: [
12039
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-muted-foreground", children: row.priceLabel }),
12040
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-foreground", children: (_b = row.resultLabel) != null ? _b : "" })
11964
12041
  ] })
11965
12042
  ]
11966
12043
  },
@@ -11991,7 +12068,7 @@ var renderRouteCard = ({
11991
12068
  const showSplitDetails = isSelected && isExpanded && card.kind === "split" && !!((_a = card.rows) == null ? void 0 : _a.length);
11992
12069
  const displayedHint = showSharedKycRequirement ? tradingLabels.sharedKyc.required : card.hint;
11993
12070
  const ariaLabel = [card.label, displayedHint, card.value].filter(Boolean).join(" ");
11994
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12071
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11995
12072
  "button",
11996
12073
  {
11997
12074
  type: "button",
@@ -12010,10 +12087,10 @@ var renderRouteCard = ({
12010
12087
  isSelected && !card.isUnavailable ? "border border-agg-trade-highlight-border bg-linear-to-b from-agg-trade-highlight-surface-from to-agg-trade-highlight-surface-to" : "border-transparent bg-agg-secondary-hover"
12011
12088
  ),
12012
12089
  onClick: () => onSelect(card.id),
12013
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-route-card-content relative z-10 flex flex-col gap-3", children: [
12014
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-route-card-header flex items-center justify-between gap-4", children: [
12015
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-route-card-meta flex min-w-0 gap-3 items-center", children: [
12016
- card.kind === "split" ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12090
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-card-content relative z-10 flex flex-col gap-3", children: [
12091
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-card-header flex items-center justify-between gap-4", children: [
12092
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-card-meta flex min-w-0 gap-3 items-center", children: [
12093
+ card.kind === "split" ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
12017
12094
  Icon,
12018
12095
  {
12019
12096
  name: "sparkles-filled",
@@ -12024,7 +12101,7 @@ var renderRouteCard = ({
12024
12101
  ),
12025
12102
  "aria-hidden": "true"
12026
12103
  }
12027
- ) : card.venue ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12104
+ ) : card.venue ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
12028
12105
  VenueLogo,
12029
12106
  {
12030
12107
  venue: card.venue,
@@ -12032,10 +12109,10 @@ var renderRouteCard = ({
12032
12109
  ariaLabel: getTradingVenueLabel(card.venue)
12033
12110
  }
12034
12111
  ) : null,
12035
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex flex-col gap-1 min-w-0", children: [
12036
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center gap-1.5", children: [
12037
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-route-card-title truncate text-agg-sm leading-agg-5 text-agg-foreground", children: card.label }),
12038
- card.isUnavailable ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12112
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col gap-1 min-w-0", children: [
12113
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-1.5", children: [
12114
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-card-title truncate text-agg-sm leading-agg-5 text-agg-foreground", children: card.label }),
12115
+ card.isUnavailable ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
12039
12116
  Icon,
12040
12117
  {
12041
12118
  name: "lock",
@@ -12043,7 +12120,7 @@ var renderRouteCard = ({
12043
12120
  className: "shrink-0 text-agg-muted-foreground",
12044
12121
  "aria-hidden": "true"
12045
12122
  }
12046
- ) : showSharedKycRequirement || card.insufficientInventory ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12123
+ ) : showSharedKycRequirement || card.insufficientInventory ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
12047
12124
  Icon,
12048
12125
  {
12049
12126
  name: "warning",
@@ -12051,7 +12128,7 @@ var renderRouteCard = ({
12051
12128
  className: "shrink-0 text-agg-muted-foreground",
12052
12129
  "aria-hidden": "true"
12053
12130
  }
12054
- ) : card.kind === "split" && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12131
+ ) : card.kind === "split" && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
12055
12132
  Icon,
12056
12133
  {
12057
12134
  name: showSplitDetails ? "chevron-up" : "chevron-down",
@@ -12061,10 +12138,10 @@ var renderRouteCard = ({
12061
12138
  }
12062
12139
  ) : null
12063
12140
  ] }),
12064
- card.hint ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-route-card-hint text-agg-xs leading-agg-4 text-agg-muted-foreground", children: displayedHint }) : null
12141
+ card.hint ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-card-hint text-agg-xs leading-agg-4 text-agg-muted-foreground", children: displayedHint }) : null
12065
12142
  ] })
12066
12143
  ] }),
12067
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12144
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
12068
12145
  "p",
12069
12146
  {
12070
12147
  className: cn(
@@ -12076,9 +12153,9 @@ var renderRouteCard = ({
12076
12153
  }
12077
12154
  )
12078
12155
  ] }),
12079
- showSplitDetails ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
12080
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-route-card-description text-agg-xs leading-agg-4 text-agg-foreground", children: (_b = card.description) != null ? _b : tradingLabels.splitOrderDescription }),
12081
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "agg-route-breakdown flex flex-col gap-3", children: (_c = card.rows) == null ? void 0 : _c.map(
12156
+ showSplitDetails ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
12157
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-card-description text-agg-xs leading-agg-4 text-agg-foreground", children: (_b = card.description) != null ? _b : tradingLabels.splitOrderDescription }),
12158
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "agg-route-breakdown flex flex-col gap-3", children: (_c = card.rows) == null ? void 0 : _c.map(
12082
12159
  (row) => renderRouteBreakdownRow(row, sharedKycStatus, tradingLabels)
12083
12160
  ) })
12084
12161
  ] }) : null
@@ -12117,17 +12194,17 @@ var PlaceOrder = ({
12117
12194
  features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
12118
12195
  formatting: { formatPrice },
12119
12196
  general: { locale }
12120
- } = (0, import_hooks40.useSdkUiConfig)();
12121
- const labels = (0, import_hooks40.useLabels)();
12197
+ } = (0, import_hooks41.useSdkUiConfig)();
12198
+ const labels = (0, import_hooks41.useLabels)();
12122
12199
  const tradingLabels = labels.trading;
12123
12200
  const toastCtx = useOptionalToast();
12124
- const { isTradingBlocked } = (0, import_hooks40.useGeoBlock)();
12125
- const tradingContext = (0, import_hooks40.useEventTradingContext)();
12201
+ const { isTradingBlocked } = (0, import_hooks41.useGeoBlock)();
12202
+ const tradingContext = (0, import_hooks41.useEventTradingContext)();
12126
12203
  const selectedEvent = (_a = tradingContext == null ? void 0 : tradingContext.selectedEvent) != null ? _a : null;
12127
12204
  const selectedMarket = (_b = tradingContext == null ? void 0 : tradingContext.selectedMarket) != null ? _b : null;
12128
12205
  const selectedOutcomeId = (_c = tradingContext == null ? void 0 : tradingContext.selectedOutcomeId) != null ? _c : null;
12129
12206
  const resolvedEventTradingState = (0, import_react17.useMemo)(() => {
12130
- return eventTradingState != null ? eventTradingState : (0, import_hooks40.resolveEventTradingState)(selectedEvent);
12207
+ return eventTradingState != null ? eventTradingState : (0, import_hooks41.resolveEventTradingState)(selectedEvent);
12131
12208
  }, [eventTradingState, selectedEvent]);
12132
12209
  const scopedSelectedEvent = (0, import_react17.useMemo)(() => {
12133
12210
  var _a2;
@@ -12155,7 +12232,7 @@ var PlaceOrder = ({
12155
12232
  )) != null ? _f : scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.venueMarketOutcomes[0]) != null ? _g : null;
12156
12233
  const scopedSelectedOutcomeId = (_h = scopedSelectedOutcome == null ? void 0 : scopedSelectedOutcome.id) != null ? _h : null;
12157
12234
  const resolvedTradingState = (0, import_react17.useMemo)(() => {
12158
- return (0, import_hooks40.resolveMarketTradingState)(scopedSelectedMarket);
12235
+ return (0, import_hooks41.resolveMarketTradingState)(scopedSelectedMarket);
12159
12236
  }, [scopedSelectedMarket]);
12160
12237
  const resolvedReadOnlyMarket = (0, import_react17.useMemo)(() => {
12161
12238
  var _a2;
@@ -12169,11 +12246,11 @@ var PlaceOrder = ({
12169
12246
  scopedSelectedMarket
12170
12247
  ]);
12171
12248
  const resolvedReadOnlyTradingState = (0, import_react17.useMemo)(() => {
12172
- return (0, import_hooks40.resolveMarketTradingState)(resolvedReadOnlyMarket);
12249
+ return (0, import_hooks41.resolveMarketTradingState)(resolvedReadOnlyMarket);
12173
12250
  }, [resolvedReadOnlyMarket]);
12174
12251
  const isEndedWithoutKnownWinner = showResolvingState && !resolvedEventTradingState.winningOutcome && !resolvedReadOnlyTradingState.winningOutcome;
12175
12252
  const orderEligibility = (0, import_react17.useMemo)(
12176
- () => (0, import_hooks40.resolveOrderEligibility)({
12253
+ () => (0, import_hooks41.resolveOrderEligibility)({
12177
12254
  event: scopedSelectedEvent,
12178
12255
  market: scopedSelectedMarket,
12179
12256
  outcome: scopedSelectedOutcome,
@@ -12182,16 +12259,16 @@ var PlaceOrder = ({
12182
12259
  [scopedSelectedEvent, scopedSelectedMarket, scopedSelectedOutcome, resolvedEventTradingState]
12183
12260
  );
12184
12261
  const isResolvedOutcomeCtaLocked = resolvedEventTradingState.kind === "resolved" || resolvedTradingState.kind === "resolved";
12185
- const { isAuthenticated, user } = (0, import_hooks40.useAggAuthContext)();
12262
+ const { isAuthenticated, user } = (0, import_hooks41.useAggAuthContext)();
12186
12263
  const sharedKycFlow = useSharedKycFlow({
12187
12264
  integration: sharedKyc,
12188
12265
  userId: isAuthenticated ? user == null ? void 0 : user.id : null,
12189
12266
  fallbackErrorMessage: tradingLabels.sharedKyc.modal.error
12190
12267
  });
12191
- const { executionMode: resolvedExecutionMode, isPaperMode } = (0, import_hooks40.useResolvedExecutionMode)(executionMode);
12268
+ const { executionMode: resolvedExecutionMode, isPaperMode } = (0, import_hooks41.useResolvedExecutionMode)(executionMode);
12192
12269
  const showLimitOrders = limitOrdersFeature && !isPaperMode;
12193
- const liveBalanceState = (0, import_hooks40.useAggBalanceState)();
12194
- const paperBalancesQuery = (0, import_hooks40.useManagedBalances)({
12270
+ const liveBalanceState = (0, import_hooks41.useAggBalanceState)();
12271
+ const paperBalancesQuery = (0, import_hooks41.useManagedBalances)({
12195
12272
  enabled: Boolean(isAuthenticated && isPaperMode),
12196
12273
  mode: "paper"
12197
12274
  });
@@ -12211,22 +12288,22 @@ var PlaceOrder = ({
12211
12288
  const liveAvailableBalance = (_i = liveBalanceState.availableBalance) != null ? _i : liveBalanceState.totalBalance;
12212
12289
  const totalBalance = isPaperMode ? paperTotalBalance : liveAvailableBalance;
12213
12290
  const isBalanceLoading = isPaperMode ? paperBalancesQuery.isLoading : liveBalanceState.isLoading;
12214
- const executeManaged = (0, import_hooks40.useExecuteManaged)();
12215
- const placeLimitOrder = (0, import_hooks40.usePlaceLimitOrder)();
12216
- const aggClient = (0, import_hooks40.useAggClient)();
12217
- const queryClient = (0, import_hooks40.useQueryClient)();
12218
- const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks40.useAppConfig)();
12219
- const { data: kalshiKeyStatus, refetch: refetchKalshiKeyStatus } = (0, import_hooks40.useVenueKeyStatus)(
12291
+ const executeManaged = (0, import_hooks41.useExecuteManaged)();
12292
+ const placeLimitOrder = (0, import_hooks41.usePlaceLimitOrder)();
12293
+ const aggClient = (0, import_hooks41.useAggClient)();
12294
+ const queryClient = (0, import_hooks41.useQueryClient)();
12295
+ const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks41.useAppConfig)();
12296
+ const { data: kalshiKeyStatus, refetch: refetchKalshiKeyStatus } = (0, import_hooks41.useVenueKeyStatus)(
12220
12297
  import_sdk19.Venue.kalshi,
12221
12298
  isAuthenticated
12222
12299
  );
12223
12300
  const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = (0, import_react17.useState)(false);
12224
12301
  const [isFundKalshiModalOpen, setIsFundKalshiModalOpen] = (0, import_react17.useState)(false);
12225
- const livePrices = (0, import_hooks40.useLiveOutcomePrices)(
12302
+ const livePrices = (0, import_hooks41.useLiveOutcomePrices)(
12226
12303
  scopedSelectedMarket ? [scopedSelectedMarket] : void 0
12227
12304
  );
12228
- const wsBestPrices = (0, import_hooks40.useLiveBestPrices)(scopedSelectedMarket ? [scopedSelectedMarket] : void 0);
12229
- const fetchedClusterMidpointResult = (0, import_hooks40.useMidpoints)(
12305
+ const wsBestPrices = (0, import_hooks41.useLiveBestPrices)(scopedSelectedMarket ? [scopedSelectedMarket] : void 0);
12306
+ const fetchedClusterMidpointResult = (0, import_hooks41.useMidpoints)(
12230
12307
  midpointsResult ? [] : scopedSelectedMarket ? [scopedSelectedMarket] : []
12231
12308
  );
12232
12309
  const clusterMidpointResult = midpointsResult != null ? midpointsResult : fetchedClusterMidpointResult;
@@ -12234,7 +12311,7 @@ var PlaceOrder = ({
12234
12311
  const clusterBestMidpoint = clusterMidpointResult.bestMidpoint;
12235
12312
  const clusterBestPricesRest = clusterMidpointResult.bestPrices;
12236
12313
  const clusterBestPrices = (0, import_react17.useMemo)(
12237
- () => (0, import_hooks40.mergeBestPricesPreferringLive)(clusterBestPricesRest, wsBestPrices),
12314
+ () => (0, import_hooks41.mergeBestPricesPreferringLive)(clusterBestPricesRest, wsBestPrices),
12238
12315
  [clusterBestPricesRest, wsBestPrices]
12239
12316
  );
12240
12317
  const [internalTab, setInternalTab] = (0, import_react17.useState)("buy");
@@ -12328,7 +12405,7 @@ var PlaceOrder = ({
12328
12405
  scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id,
12329
12406
  scopedSelectedOutcomeId
12330
12407
  ]);
12331
- const debouncedAmount = (0, import_hooks40.useDebouncedValue)(internalAmount, 300);
12408
+ const debouncedAmount = (0, import_hooks41.useDebouncedValue)(internalAmount, 300);
12332
12409
  const isQuoteInputEditing = internalAmount !== debouncedAmount;
12333
12410
  const isLimitOrder = showLimitOrders && executionType === "limit";
12334
12411
  const isSell = (0, import_react17.useMemo)(() => internalTab === "sell", [internalTab]);
@@ -12346,7 +12423,7 @@ var PlaceOrder = ({
12346
12423
  );
12347
12424
  const visibleLimitVenueOptions = (0, import_react17.useMemo)(() => {
12348
12425
  return limitVenueOptions.filter((option) => {
12349
- return (0, import_hooks40.getVenueAvailabilityState)({
12426
+ return (0, import_hooks41.getVenueAvailabilityState)({
12350
12427
  venueId: option.venue,
12351
12428
  disabledVenues,
12352
12429
  isConfigLoading: isAppConfigLoading
@@ -12358,7 +12435,7 @@ var PlaceOrder = ({
12358
12435
  dataUpdatedAt: executionPositionsUpdatedAt,
12359
12436
  isLoading: isExecutionPositionsLoading,
12360
12437
  isFetching: isExecutionPositionsFetching
12361
- } = (0, import_hooks40.useExecutionPositions)({
12438
+ } = (0, import_hooks41.useExecutionPositions)({
12362
12439
  enabled: Boolean(isAuthenticated && isSell),
12363
12440
  mode: isPaperMode ? "paper" : void 0
12364
12441
  });
@@ -12392,7 +12469,7 @@ var PlaceOrder = ({
12392
12469
  );
12393
12470
  const hasValidLimitVenueQuoteAmount = debouncedAmount > 0;
12394
12471
  const isLimitVenueQuoteEnabled = isLimitOrder && isQuotePanelActive && !isEndedWithoutKnownWinner && !submissionProgressState && !isBeforeActionPending && !placeLimitOrder.isPending && hasValidLimitVenueQuoteAmount && orderEligibility.canPlaceOrder && (!isSell || sellFilledForOutcomeId === scopedSelectedOutcomeId && !isQuoteInputEditing);
12395
- const limitVenueQuotes = (0, import_hooks40.useLimitOrderVenueQuotes)({
12472
+ const limitVenueQuotes = (0, import_hooks41.useLimitOrderVenueQuotes)({
12396
12473
  requests: limitVenueQuoteRequests,
12397
12474
  tradeSide: internalTab,
12398
12475
  amount: debouncedAmount,
@@ -12426,7 +12503,7 @@ var PlaceOrder = ({
12426
12503
  // server's reservation check — and the automatic pick, which sorts on
12427
12504
  // price alone, would happily choose one. Only narrow once we know
12428
12505
  // where the shares are; an empty map means positions haven't resolved.
12429
- (!isSell || sellableSharesByVenue.size === 0 || ((_a2 = sellableSharesByVenue.get(option.venue)) != null ? _a2 : 0) > 0) && (0, import_hooks40.getVenueAvailabilityState)({
12506
+ (!isSell || sellableSharesByVenue.size === 0 || ((_a2 = sellableSharesByVenue.get(option.venue)) != null ? _a2 : 0) > 0) && (0, import_hooks41.getVenueAvailabilityState)({
12430
12507
  venueId: option.venue,
12431
12508
  disabledVenues,
12432
12509
  isConfigLoading: isAppConfigLoading
@@ -12457,7 +12534,7 @@ var PlaceOrder = ({
12457
12534
  if (!selectedLimitVenue || !geoBlockedLimitVenues.has(selectedLimitVenue)) return;
12458
12535
  setSelectedLimitVenue(null);
12459
12536
  }, [geoBlockedLimitVenues, selectedLimitVenue]);
12460
- const smartRoute = (0, import_hooks40.useSmartRoute)(__spreadProps(__spreadValues({
12537
+ const smartRoute = (0, import_hooks41.useSmartRoute)(__spreadProps(__spreadValues({
12461
12538
  venueMarketOutcomeId: scopedSelectedOutcomeId,
12462
12539
  maxSpend: isSell ? void 0 : debouncedAmount,
12463
12540
  sellShares: isSell ? debouncedAmount : void 0,
@@ -12530,7 +12607,7 @@ var PlaceOrder = ({
12530
12607
  },
12531
12608
  [debouncedAmount, isSell, scopedSelectedOutcomeId, smartRoute.data, smartRoute.isLoading]
12532
12609
  );
12533
- const venueSellQuotes = (0, import_hooks40.useVenueSellQuotes)({
12610
+ const venueSellQuotes = (0, import_hooks41.useVenueSellQuotes)({
12534
12611
  venueMarketOutcomeId: scopedSelectedOutcomeId,
12535
12612
  accountId: (_n = user == null ? void 0 : user.id) != null ? _n : null,
12536
12613
  positionVersion: executionPositionsUpdatedAt,
@@ -12755,7 +12832,7 @@ var PlaceOrder = ({
12755
12832
  );
12756
12833
  const isKalshiAccountActive = (_F = kalshiKeyStatus == null ? void 0 : kalshiKeyStatus.connected) != null ? _F : (legacyKalshiAccount == null ? void 0 : legacyKalshiAccount.status) === "active";
12757
12834
  const hasKalshiConnectionState = kalshiKeyStatus !== void 0 || (user == null ? void 0 : user.venueAccounts) != null;
12758
- const isKalshiAvailable = (0, import_hooks40.getVenueAvailabilityState)({
12835
+ const isKalshiAvailable = (0, import_hooks41.getVenueAvailabilityState)({
12759
12836
  venueId: "kalshi",
12760
12837
  disabledVenues,
12761
12838
  isConfigLoading: isAppConfigLoading
@@ -12810,7 +12887,7 @@ var PlaceOrder = ({
12810
12887
  scopedSelectedOutcomeId
12811
12888
  ]
12812
12889
  );
12813
- const executionProgress = (0, import_hooks40.useExecutionProgress)({
12890
+ const executionProgress = (0, import_hooks41.useExecutionProgress)({
12814
12891
  orderIds: (_G = submissionProgressState == null ? void 0 : submissionProgressState.orderIds) != null ? _G : null,
12815
12892
  quoteId: (_H = submissionProgressState == null ? void 0 : submissionProgressState.quoteId) != null ? _H : null,
12816
12893
  mode: isPaperMode ? "paper" : void 0,
@@ -13102,13 +13179,13 @@ var PlaceOrder = ({
13102
13179
  setSubmissionProgressState((prev) => {
13103
13180
  if (!prev || prev.phase === "success" || prev.phase === "failed") return prev;
13104
13181
  return __spreadProps(__spreadValues({}, prev), {
13105
- phase: "failed",
13106
- errorMessage: "Couldn't confirm the order in time. Your trade may still complete in the background \u2014 check your activity feed."
13182
+ phase: "executing",
13183
+ errorMessage: tradingLabels.orderStillSettling
13107
13184
  });
13108
13185
  });
13109
13186
  }, timeoutMs);
13110
13187
  return () => clearTimeout(id);
13111
- }, [submissionProgressState == null ? void 0 : submissionProgressState.phase, estDurationMs]);
13188
+ }, [submissionProgressState == null ? void 0 : submissionProgressState.phase, estDurationMs, tradingLabels.orderStillSettling]);
13112
13189
  const emitTerminalOrderNotifications = (0, import_react17.useCallback)(() => {
13113
13190
  const toast = toastCtx == null ? void 0 : toastCtx.toast;
13114
13191
  if (!toast) return;
@@ -13158,8 +13235,8 @@ var PlaceOrder = ({
13158
13235
  }
13159
13236
  if (submissionProgressState.phase === "success" && submissionProgressState.summary) {
13160
13237
  emitTerminalOrderNotifications();
13161
- (0, import_hooks40.invalidateBalanceQueries)(queryClient);
13162
- (0, import_hooks40.invalidatePositionQueries)(queryClient);
13238
+ (0, import_hooks41.invalidateBalanceQueries)(queryClient);
13239
+ (0, import_hooks41.invalidatePositionQueries)(queryClient);
13163
13240
  if (debugStore && debugAttemptId) {
13164
13241
  debugStore.updateAttempt(debugAttemptId, {
13165
13242
  status: "succeeded",
@@ -13219,11 +13296,13 @@ var PlaceOrder = ({
13219
13296
  amount: internalAmount,
13220
13297
  labels: tradingLabels,
13221
13298
  quoteData: activeQuoteData,
13222
- selectedMarket: scopedSelectedMarket
13299
+ selectedMarket: scopedSelectedMarket,
13300
+ tradeSide: isSell ? "sell" : "buy"
13223
13301
  });
13224
13302
  }, [
13225
13303
  activeQuoteData,
13226
13304
  internalAmount,
13305
+ isSell,
13227
13306
  orderEligibility.canPlaceOrder,
13228
13307
  scopedSelectedMarket,
13229
13308
  tradingLabels
@@ -13461,7 +13540,7 @@ var PlaceOrder = ({
13461
13540
  limitPriceRaw: effectiveLimitPriceRaw,
13462
13541
  side: internalTab
13463
13542
  });
13464
- const availabilityState = (0, import_hooks40.getVenueAvailabilityState)({
13543
+ const availabilityState = (0, import_hooks41.getVenueAvailabilityState)({
13465
13544
  venueId: option.venue,
13466
13545
  disabledVenues,
13467
13546
  isConfigLoading: isAppConfigLoading
@@ -13582,7 +13661,7 @@ var PlaceOrder = ({
13582
13661
  return fills.length > 0 && fills.every((f) => geoBlockedVenuesFromWarnings.has(f.venue));
13583
13662
  }, [selectedRouteCard, geoBlockedVenuesFromWarnings]);
13584
13663
  const shouldShowGeoBlockBanner = isTradingBlocked || selectedRouteGeoBlocked || isPrimaryVenueGeoBlocked || isLimitOrder && limitRouteCards.length > 0 && limitRouteCards.every((card) => card.isUnavailable);
13585
- const shouldShowLowLiquidityWarning = !isQuoteInputEditing && !isQuoteLoading && (activeQuoteData == null ? void 0 : activeQuoteData.venueMarketOutcomeId) === scopedSelectedOutcomeId && isPlaceOrderAveragePriceWorse({
13664
+ const shouldShowLowLiquidityWarning = !isQuoteInputEditing && !isQuoteLoading && (activeQuoteData == null ? void 0 : activeQuoteData.venueMarketOutcomeId) === scopedSelectedOutcomeId && !(activeQuoteData == null ? void 0 : activeQuoteData.fills.some((fill) => fill.venue === "prophetx")) && isPlaceOrderAveragePriceWorse({
13586
13665
  averageExecutionPrice: selectedRouteCard == null ? void 0 : selectedRouteCard.executionPrice,
13587
13666
  displayedMarketPrice: selectedOutcomeDisplayPrice,
13588
13667
  tradeSide: internalTab
@@ -13999,7 +14078,7 @@ var PlaceOrder = ({
13999
14078
  ]);
14000
14079
  const resolvedStatusClassName = cn(classNames == null ? void 0 : classNames.root, className);
14001
14080
  if (isLoading) {
14002
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14081
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14003
14082
  Skeleton,
14004
14083
  {
14005
14084
  ariaLabel: labels.common.loading,
@@ -14010,7 +14089,7 @@ var PlaceOrder = ({
14010
14089
  }
14011
14090
  if (submissionProgressState) {
14012
14091
  if (submissionProgressState.phase === "success" && submissionProgressState.summary) {
14013
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14092
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14014
14093
  PlaceOrderSuccessView,
14015
14094
  {
14016
14095
  className: resolvedStatusClassName,
@@ -14022,7 +14101,7 @@ var PlaceOrder = ({
14022
14101
  );
14023
14102
  }
14024
14103
  if (submissionProgressState.phase === "failed") {
14025
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14104
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14026
14105
  PlaceOrderFailureView,
14027
14106
  {
14028
14107
  className: resolvedStatusClassName,
@@ -14035,7 +14114,7 @@ var PlaceOrder = ({
14035
14114
  }
14036
14115
  );
14037
14116
  }
14038
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14117
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14039
14118
  PlaceOrderExecutionView,
14040
14119
  {
14041
14120
  className,
@@ -14046,7 +14125,8 @@ var PlaceOrder = ({
14046
14125
  eventTitle: headerTitle,
14047
14126
  groups: executionOrderGroups,
14048
14127
  labels: tradingLabels,
14049
- progress: executionProgressPercent
14128
+ progress: executionProgressPercent,
14129
+ settlementHint: submissionProgressState.phase === "executing" ? submissionProgressState.errorMessage : void 0
14050
14130
  }
14051
14131
  );
14052
14132
  }
@@ -14253,7 +14333,7 @@ var PlaceOrder = ({
14253
14333
  }
14254
14334
  });
14255
14335
  if (isEndedWithoutKnownWinner || !orderEligibility.canPlaceOrder && resolvedReadOnlyTradingState.kind !== "open") {
14256
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14336
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14257
14337
  PlaceOrderResolvedView,
14258
14338
  {
14259
14339
  tradingState: resolvedReadOnlyTradingState,
@@ -14266,8 +14346,8 @@ var PlaceOrder = ({
14266
14346
  }
14267
14347
  );
14268
14348
  }
14269
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_react17.Fragment, { children: [
14270
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14349
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_react17.Fragment, { children: [
14350
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14271
14351
  Card,
14272
14352
  {
14273
14353
  className: cn(
@@ -14284,20 +14364,20 @@ var PlaceOrder = ({
14284
14364
  headerTitle,
14285
14365
  onClose
14286
14366
  }),
14287
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: cn("agg-order-panel-content flex flex-col gap-6", classNames == null ? void 0 : classNames.content), children: [
14288
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14367
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("agg-order-panel-content flex flex-col gap-6", classNames == null ? void 0 : classNames.content), children: [
14368
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14289
14369
  "div",
14290
14370
  {
14291
14371
  className: "agg-order-tabs flex items-end border-b border-agg-separator",
14292
14372
  role: "tablist",
14293
14373
  "aria-label": labels.common.tabsAria,
14294
14374
  children: [
14295
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "flex min-w-0 flex-1 items-end", children: [
14375
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "flex min-w-0 flex-1 items-end", children: [
14296
14376
  { value: "buy", label: tradingLabels.buy, ref: buyTabRef },
14297
14377
  { value: "sell", label: tradingLabels.sell, ref: sellTabRef }
14298
14378
  ].map((tabItem) => {
14299
14379
  const isActive = internalTab === tabItem.value;
14300
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14380
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14301
14381
  "button",
14302
14382
  {
14303
14383
  ref: tabItem.ref,
@@ -14321,7 +14401,7 @@ var PlaceOrder = ({
14321
14401
  onKeyDown: (event) => handleTabKeyDown(event, tabItem.value),
14322
14402
  children: [
14323
14403
  tabItem.label,
14324
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14404
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14325
14405
  "span",
14326
14406
  {
14327
14407
  "aria-hidden": "true",
@@ -14341,7 +14421,7 @@ var PlaceOrder = ({
14341
14421
  tabItem.value
14342
14422
  );
14343
14423
  }) }),
14344
- showLimitOrders ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14424
+ showLimitOrders ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14345
14425
  Select,
14346
14426
  {
14347
14427
  ariaLabel: tradingLabels.orderTypeAria,
@@ -14362,8 +14442,8 @@ var PlaceOrder = ({
14362
14442
  ]
14363
14443
  }
14364
14444
  ),
14365
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-entry-section flex flex-col gap-4", children: [
14366
- outcomes.length >= 2 ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "agg-outcomes flex w-full max-w-full gap-2", children: outcomes.map((outcome, index) => {
14445
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-entry-section flex flex-col gap-4", children: [
14446
+ outcomes.length >= 2 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "agg-outcomes flex w-full max-w-full gap-2", children: outcomes.map((outcome, index) => {
14367
14447
  var _a2, _b2, _c2;
14368
14448
  const price = getDisplayOutcomePrice({
14369
14449
  outcomeId: outcome.id,
@@ -14377,7 +14457,7 @@ var PlaceOrder = ({
14377
14457
  const isActive = outcome.id === scopedSelectedOutcomeId;
14378
14458
  const isPositive = resolveIsPositiveOutcome(outcome, index);
14379
14459
  const isPriceLoading = clusterMidpointResult.isLoading && price == null;
14380
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14460
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14381
14461
  "button",
14382
14462
  {
14383
14463
  "data-id": outcome.id,
@@ -14397,7 +14477,7 @@ var PlaceOrder = ({
14397
14477
  disabled: !orderEligibility.canPlaceOrder || isResolvedOutcomeCtaLocked,
14398
14478
  onClick: () => handleOutcomeChange(outcome.id),
14399
14479
  children: [
14400
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14480
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14401
14481
  Typography,
14402
14482
  {
14403
14483
  as: "span",
@@ -14406,7 +14486,7 @@ var PlaceOrder = ({
14406
14486
  children: (_c2 = outcome.title) != null ? _c2 : outcome.label
14407
14487
  }
14408
14488
  ),
14409
- isPriceLoading ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14489
+ isPriceLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14410
14490
  "span",
14411
14491
  {
14412
14492
  "aria-hidden": "true",
@@ -14415,18 +14495,18 @@ var PlaceOrder = ({
14415
14495
  "h-4 w-10 shrink-0 rounded-agg-sm bg-agg-separator animate-pulse"
14416
14496
  )
14417
14497
  }
14418
- ) : /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Typography, { as: "span", variant: isActive ? "body-strong" : "body", children: formatProbabilityCents(price, formatPrice) })
14498
+ ) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { as: "span", variant: isActive ? "body-strong" : "body", children: formatProbabilityCents(price, formatPrice) })
14419
14499
  ]
14420
14500
  },
14421
14501
  outcome.id
14422
14502
  );
14423
14503
  }) }) : null,
14424
- isLimitOrder ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-limit-price-section flex items-center justify-between gap-4", children: [
14425
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.limitPrice }),
14426
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex min-w-0 flex-col items-end gap-1", children: [
14427
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center gap-2", children: [
14428
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("label", { className: "relative flex items-center", children: [
14429
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14504
+ isLimitOrder ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-limit-price-section flex items-center justify-between gap-4", children: [
14505
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.limitPrice }),
14506
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex min-w-0 flex-col items-end gap-1", children: [
14507
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-2", children: [
14508
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("label", { className: "relative flex items-center", children: [
14509
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14430
14510
  "input",
14431
14511
  {
14432
14512
  type: "text",
@@ -14443,40 +14523,40 @@ var PlaceOrder = ({
14443
14523
  )
14444
14524
  }
14445
14525
  ),
14446
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "pointer-events-none absolute right-1 text-agg-3xl font-agg-bold leading-agg-9 text-agg-foreground", children: "\xA2" })
14526
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "pointer-events-none absolute right-1 text-agg-3xl font-agg-bold leading-agg-9 text-agg-foreground", children: "\xA2" })
14447
14527
  ] }),
14448
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14528
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14449
14529
  "button",
14450
14530
  {
14451
14531
  type: "button",
14452
14532
  className: "flex size-8 cursor-pointer items-center justify-center rounded-agg-lg bg-agg-secondary-hover text-agg-foreground hover:bg-agg-tertiary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
14453
14533
  "aria-label": tradingLabels.limitPriceDecreaseAria,
14454
14534
  onClick: () => handleLimitPriceStep("decrease"),
14455
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Icon, { name: "minus", size: "small", className: "h-4 w-4", "aria-hidden": true })
14535
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon, { name: "minus", size: "small", className: "h-4 w-4", "aria-hidden": true })
14456
14536
  }
14457
14537
  ),
14458
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14538
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14459
14539
  "button",
14460
14540
  {
14461
14541
  type: "button",
14462
14542
  className: "flex size-8 cursor-pointer items-center justify-center rounded-agg-lg bg-agg-secondary-hover text-agg-foreground hover:bg-agg-tertiary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
14463
14543
  "aria-label": tradingLabels.limitPriceIncreaseAria,
14464
14544
  onClick: () => handleLimitPriceStep("increase"),
14465
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Icon, { name: "plus", size: "small", className: "h-4 w-4", "aria-hidden": true })
14545
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon, { name: "plus", size: "small", className: "h-4 w-4", "aria-hidden": true })
14466
14546
  }
14467
14547
  )
14468
14548
  ] }),
14469
- limitPriceInputError ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "max-w-[220px] text-right text-agg-xs leading-agg-4 text-agg-error", children: limitPriceInputError }) : null
14549
+ limitPriceInputError ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "max-w-[220px] text-right text-agg-xs leading-agg-4 text-agg-error", children: limitPriceInputError }) : null
14470
14550
  ] })
14471
14551
  ] }) : null,
14472
- isLimitOrder && limitPriceAdjustmentMessage ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14552
+ isLimitOrder && limitPriceAdjustmentMessage ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14473
14553
  "div",
14474
14554
  {
14475
14555
  className: "agg-limit-price-adjustment flex w-full items-center gap-2 rounded-agg-lg bg-agg-warning/10 px-3 py-2",
14476
14556
  role: "status",
14477
14557
  "aria-live": "polite",
14478
14558
  children: [
14479
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14559
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14480
14560
  Icon,
14481
14561
  {
14482
14562
  name: "warning-filled",
@@ -14485,16 +14565,16 @@ var PlaceOrder = ({
14485
14565
  "aria-hidden": "true"
14486
14566
  }
14487
14567
  ),
14488
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "min-w-0 flex-1 wrap-break-word text-agg-sm leading-agg-5 text-agg-foreground", children: limitPriceAdjustmentMessage })
14568
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "min-w-0 flex-1 wrap-break-word text-agg-sm leading-agg-5 text-agg-foreground", children: limitPriceAdjustmentMessage })
14489
14569
  ]
14490
14570
  }
14491
14571
  ) : null,
14492
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-amount-section flex items-start justify-between gap-4", children: [
14493
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-amount-meta flex flex-col", children: [
14494
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-order-amount-label text-agg-base font-agg-bold leading-agg-6 text-agg-foreground whitespace-nowrap", children: tradingLabels.amount(internalTab) }),
14495
- isAuthenticated ? isSell ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "agg-balance-value flex items-baseline gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: isCurrentSellableSharesLoading ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(LoadingIcon, { size: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
14496
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "whitespace-pre", children: displayedCurrentSellableSharesLabel }),
14497
- displayedCurrentSellableShares > 0 ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14572
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-amount-section flex items-start justify-between gap-4", children: [
14573
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-amount-meta flex flex-col", children: [
14574
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-amount-label text-agg-base font-agg-bold leading-agg-6 text-agg-foreground whitespace-nowrap", children: tradingLabels.amount(internalTab) }),
14575
+ isAuthenticated ? isSell ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "agg-balance-value flex items-baseline gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: isCurrentSellableSharesLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(LoadingIcon, { size: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
14576
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "whitespace-pre", children: displayedCurrentSellableSharesLabel }),
14577
+ displayedCurrentSellableShares > 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14498
14578
  "button",
14499
14579
  {
14500
14580
  type: "button",
@@ -14510,9 +14590,9 @@ var PlaceOrder = ({
14510
14590
  children: tradingLabels.maxShares
14511
14591
  }
14512
14592
  ) : null
14513
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-balance-value flex items-center gap-2 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: isBalanceLoading ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(LoadingIcon, { size: "small" }) : tradingLabels.balance(formatUsd(displayedBalance)) }) : null
14593
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-balance-value flex items-center gap-2 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: isBalanceLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(LoadingIcon, { size: "small" }) : tradingLabels.balance(formatUsd(displayedBalance)) }) : null
14514
14594
  ] }),
14515
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14595
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14516
14596
  CurrencyInput,
14517
14597
  {
14518
14598
  value: internalAmount,
@@ -14534,9 +14614,9 @@ var PlaceOrder = ({
14534
14614
  }
14535
14615
  )
14536
14616
  ] }),
14537
- showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && estimatedFeesValue ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-fees-section flex items-center justify-between gap-4", children: [
14538
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center gap-1.5", children: [
14539
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14617
+ showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && estimatedFeesValue ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-fees-section flex items-center justify-between gap-4", children: [
14618
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-1.5", children: [
14619
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14540
14620
  Typography,
14541
14621
  {
14542
14622
  variant: "text-sm",
@@ -14544,7 +14624,7 @@ var PlaceOrder = ({
14544
14624
  children: tradingLabels.estimatedFees
14545
14625
  }
14546
14626
  ),
14547
- feeBreakdownRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14627
+ feeBreakdownRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14548
14628
  Tooltip,
14549
14629
  {
14550
14630
  "aria-label": tradingLabels.estimatedFeesTooltipAria,
@@ -14556,13 +14636,13 @@ var PlaceOrder = ({
14556
14636
  icon: "h-3 w-3 text-agg-muted-foreground",
14557
14637
  trigger: "h-3 w-3 text-agg-muted-foreground"
14558
14638
  },
14559
- content: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "flex w-full flex-col gap-2", children: feeBreakdownRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14639
+ content: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "flex w-full flex-col gap-2", children: feeBreakdownRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14560
14640
  "div",
14561
14641
  {
14562
14642
  className: "flex items-center justify-between gap-3 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground",
14563
14643
  children: [
14564
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { children: row.label }),
14565
- row.kind === "badge" ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14644
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: row.label }),
14645
+ row.kind === "badge" ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14566
14646
  "span",
14567
14647
  {
14568
14648
  className: cn(
@@ -14572,7 +14652,7 @@ var PlaceOrder = ({
14572
14652
  ),
14573
14653
  children: row.badgeLabel
14574
14654
  }
14575
- ) : /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "text-right", children: row.value })
14655
+ ) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "text-right", children: row.value })
14576
14656
  ]
14577
14657
  },
14578
14658
  row.label
@@ -14580,11 +14660,11 @@ var PlaceOrder = ({
14580
14660
  }
14581
14661
  ) : null
14582
14662
  ] }),
14583
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: estimatedFeesValue })
14663
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: estimatedFeesValue })
14584
14664
  ] }) : null,
14585
- showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && executionReserveValue ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-reserve-section flex items-center justify-between gap-4", children: [
14586
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center gap-1.5", children: [
14587
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14665
+ showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && executionReserveValue ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-reserve-section flex items-center justify-between gap-4", children: [
14666
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-1.5", children: [
14667
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14588
14668
  Typography,
14589
14669
  {
14590
14670
  variant: "text-sm",
@@ -14592,7 +14672,7 @@ var PlaceOrder = ({
14592
14672
  children: tradingLabels.executionReserve
14593
14673
  }
14594
14674
  ),
14595
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14675
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14596
14676
  Tooltip,
14597
14677
  {
14598
14678
  "aria-label": tradingLabels.executionReserveTooltipAria,
@@ -14605,18 +14685,18 @@ var PlaceOrder = ({
14605
14685
  }
14606
14686
  )
14607
14687
  ] }),
14608
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: executionReserveValue })
14688
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: executionReserveValue })
14609
14689
  ] }) : null
14610
14690
  ] }),
14611
- shouldShowSmartRouting ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14691
+ shouldShowSmartRouting ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14612
14692
  "div",
14613
14693
  {
14614
14694
  className: "agg-route-panel flex flex-col gap-3",
14615
14695
  "aria-busy": !isLimitOrder && isQuoteLoading,
14616
14696
  children: [
14617
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-route-panel-header flex items-center justify-between gap-4", children: [
14618
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-route-panel-title text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.smartRouting }),
14619
- shouldShowRouteToggle && !isRoutesExpanded ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14697
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-panel-header flex items-center justify-between gap-4", children: [
14698
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-panel-title text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.smartRouting }),
14699
+ shouldShowRouteToggle && !isRoutesExpanded ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14620
14700
  "button",
14621
14701
  {
14622
14702
  type: "button",
@@ -14624,8 +14704,8 @@ var PlaceOrder = ({
14624
14704
  "aria-label": tradingLabels.viewAllRoutes(activeRouteCardCount),
14625
14705
  onClick: () => setIsRoutesExpanded((currentValue) => !currentValue),
14626
14706
  children: [
14627
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { children: tradingLabels.viewAllRoutes(activeRouteCardCount) }),
14628
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14707
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.viewAllRoutes(activeRouteCardCount) }),
14708
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14629
14709
  Icon,
14630
14710
  {
14631
14711
  name: "chevron-down",
@@ -14638,11 +14718,11 @@ var PlaceOrder = ({
14638
14718
  }
14639
14719
  ) : null
14640
14720
  ] }),
14641
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "agg-route-list flex flex-col gap-2", children: !isLimitOrder && isQuoteLoading && activeRouteCards.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-route-loading flex flex-col gap-2", "aria-hidden": "true", children: [
14642
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(PlaceOrderRouteCardSkeleton, {}),
14643
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(PlaceOrderRouteCardSkeleton, {})
14721
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "agg-route-list flex flex-col gap-2", children: !isLimitOrder && isQuoteLoading && activeRouteCards.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-loading flex flex-col gap-2", "aria-hidden": "true", children: [
14722
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PlaceOrderRouteCardSkeleton, {}),
14723
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PlaceOrderRouteCardSkeleton, {})
14644
14724
  ] }) : activeRouteCards.length > 0 ? activeRouteCards.map((card) => {
14645
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react17.Fragment, { children: renderRouteCard({
14725
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react17.Fragment, { children: renderRouteCard({
14646
14726
  card,
14647
14727
  enableAnimations,
14648
14728
  isExpanded: card.kind === "split" ? isSplitDetailOpen : isRoutesExpanded,
@@ -14655,15 +14735,15 @@ var PlaceOrder = ({
14655
14735
  ]
14656
14736
  }
14657
14737
  ) : null,
14658
- isLimitOrder ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-limit-expiration-section flex items-center justify-between gap-4", children: [
14659
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.expiration }),
14660
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14738
+ isLimitOrder ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-limit-expiration-section flex items-center justify-between gap-4", children: [
14739
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.expiration }),
14740
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14661
14741
  Popover.Root,
14662
14742
  {
14663
14743
  open: isLimitExpirationPickerOpen,
14664
14744
  onOpenChange: handleLimitExpirationPickerOpenChange,
14665
14745
  children: [
14666
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14746
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14667
14747
  "button",
14668
14748
  {
14669
14749
  ref: expirationTriggerRef,
@@ -14671,10 +14751,10 @@ var PlaceOrder = ({
14671
14751
  className: "flex min-w-0 cursor-pointer items-center justify-end gap-2 text-right text-agg-base leading-agg-6 text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
14672
14752
  "aria-label": tradingLabels.expirationMenuAria,
14673
14753
  children: [
14674
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "min-w-0 truncate", children: limitExpirationType === "GTC" ? tradingLabels.expirationGoodTilCanceled : limitExpirationType === "FIVE_MINUTES" ? tradingLabels.expirationFiveMinutes : limitExpirationType === "ONE_HOUR" ? tradingLabels.expirationOneHour : limitExpirationType === "END_OF_DAY" ? tradingLabels.expirationEndOfDay : resolvedCustomExpirationDate ? (0, import_dayjs5.default)(resolvedCustomExpirationDate).format(
14754
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "min-w-0 truncate", children: limitExpirationType === "GTC" ? tradingLabels.expirationGoodTilCanceled : limitExpirationType === "FIVE_MINUTES" ? tradingLabels.expirationFiveMinutes : limitExpirationType === "ONE_HOUR" ? tradingLabels.expirationOneHour : limitExpirationType === "END_OF_DAY" ? tradingLabels.expirationEndOfDay : resolvedCustomExpirationDate ? (0, import_dayjs5.default)(resolvedCustomExpirationDate).format(
14675
14755
  "MMM D, YYYY [at] HH:mm"
14676
14756
  ) : tradingLabels.expirationCustom }),
14677
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14757
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14678
14758
  Icon,
14679
14759
  {
14680
14760
  name: isLimitExpirationPickerOpen ? "chevron-up" : "chevron-down",
@@ -14686,11 +14766,11 @@ var PlaceOrder = ({
14686
14766
  ]
14687
14767
  }
14688
14768
  ) }),
14689
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14769
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14690
14770
  Popover.Portal,
14691
14771
  {
14692
14772
  container: resolvePlaceOrderPortalContainer(expirationTriggerRef.current),
14693
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14773
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14694
14774
  Popover.Content,
14695
14775
  {
14696
14776
  align: "end",
@@ -14699,14 +14779,14 @@ var PlaceOrder = ({
14699
14779
  role: "dialog",
14700
14780
  "aria-label": tradingLabels.expirationMenuAria,
14701
14781
  className: "z-50 max-h-[calc(100dvh-2rem)] w-[min(312px,calc(100vw-2rem))] overflow-y-auto rounded-agg-xl border border-agg-separator bg-agg-secondary p-0 shadow-[0_8px_16px_rgba(0,0,0,0.20)]",
14702
- children: limitExpirationPickerView === "calendar" ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
14703
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14782
+ children: limitExpirationPickerView === "calendar" ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
14783
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14704
14784
  Button,
14705
14785
  {
14706
14786
  variant: "tertiary",
14707
14787
  size: "small",
14708
14788
  className: "w-fit px-0",
14709
- prefix: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14789
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14710
14790
  Icon,
14711
14791
  {
14712
14792
  name: "chevron-left",
@@ -14719,7 +14799,7 @@ var PlaceOrder = ({
14719
14799
  children: tradingLabels.expirationOptions
14720
14800
  }
14721
14801
  ),
14722
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14802
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14723
14803
  Calendar,
14724
14804
  {
14725
14805
  mode: "single",
@@ -14734,9 +14814,9 @@ var PlaceOrder = ({
14734
14814
  }
14735
14815
  }
14736
14816
  ),
14737
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center gap-4", children: [
14738
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex shrink-0 flex-col gap-0.5", children: [
14739
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14817
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-4", children: [
14818
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex shrink-0 flex-col gap-0.5", children: [
14819
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14740
14820
  "label",
14741
14821
  {
14742
14822
  htmlFor: expirationTimeInputId,
@@ -14744,9 +14824,9 @@ var PlaceOrder = ({
14744
14824
  children: tradingLabels.expirationStartTime
14745
14825
  }
14746
14826
  ),
14747
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "text-agg-xs leading-agg-4 text-agg-foreground", children: tradingLabels.expirationStartTimeHint })
14827
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "text-agg-xs leading-agg-4 text-agg-foreground", children: tradingLabels.expirationStartTimeHint })
14748
14828
  ] }),
14749
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14829
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14750
14830
  "input",
14751
14831
  {
14752
14832
  id: expirationTimeInputId,
@@ -14757,8 +14837,8 @@ var PlaceOrder = ({
14757
14837
  }
14758
14838
  )
14759
14839
  ] }),
14760
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex gap-2", children: [
14761
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14840
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex gap-2", children: [
14841
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14762
14842
  Button,
14763
14843
  {
14764
14844
  variant: "secondary",
@@ -14768,13 +14848,13 @@ var PlaceOrder = ({
14768
14848
  children: tradingLabels.expirationCancel
14769
14849
  }
14770
14850
  ),
14771
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14851
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14772
14852
  Button,
14773
14853
  {
14774
14854
  size: "small",
14775
14855
  className: "min-w-0 flex-1",
14776
14856
  disabled: !isLimitExpirationDraftValid,
14777
- prefix: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14857
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14778
14858
  Icon,
14779
14859
  {
14780
14860
  name: "success-check",
@@ -14788,7 +14868,7 @@ var PlaceOrder = ({
14788
14868
  }
14789
14869
  )
14790
14870
  ] })
14791
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14871
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14792
14872
  "div",
14793
14873
  {
14794
14874
  role: "radiogroup",
@@ -14806,7 +14886,7 @@ var PlaceOrder = ({
14806
14886
  { value: "ONE_HOUR", label: tradingLabels.expirationOneHour },
14807
14887
  { value: "END_OF_DAY", label: tradingLabels.expirationEndOfDay },
14808
14888
  { value: "CUSTOM", label: tradingLabels.expirationCustom }
14809
- ].map((item, optionIndex) => /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14889
+ ].map((item, optionIndex) => /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14810
14890
  "button",
14811
14891
  {
14812
14892
  ref: (element) => {
@@ -14823,14 +14903,14 @@ var PlaceOrder = ({
14823
14903
  onClick: () => handleLimitExpirationTypeChange(item.value),
14824
14904
  onKeyDown: (event) => handleLimitExpirationOptionKeyDown(event, optionIndex),
14825
14905
  children: [
14826
- limitExpirationType === item.value ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14906
+ limitExpirationType === item.value ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14827
14907
  "span",
14828
14908
  {
14829
14909
  className: "absolute bottom-2 left-0 top-2 w-1 bg-agg-primary",
14830
14910
  "aria-hidden": true
14831
14911
  }
14832
14912
  ) : null,
14833
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "truncate", children: item.label })
14913
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "truncate", children: item.label })
14834
14914
  ]
14835
14915
  },
14836
14916
  item.value
@@ -14845,12 +14925,12 @@ var PlaceOrder = ({
14845
14925
  }
14846
14926
  )
14847
14927
  ] }) : null,
14848
- hasEnteredAmount && (isLimitOrder ? limitOrderPayload : selectedRouteCard) && !isQuoteLoading && !isBelowMinimum && orderEligibility.canPlaceOrder ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-summary flex items-start justify-between gap-4", children: [
14849
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-summary-meta flex flex-col", children: [
14850
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-order-summary-label text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.toWin(internalTab) }),
14851
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-order-summary-hint text-agg-sm leading-agg-5 text-agg-muted-foreground", children: isLimitOrder ? displayedLimitToWinHint : displayedToWinHint })
14928
+ hasEnteredAmount && (isLimitOrder ? limitOrderPayload : selectedRouteCard) && !isQuoteLoading && !isBelowMinimum && orderEligibility.canPlaceOrder ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-summary flex items-start justify-between gap-4", children: [
14929
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-summary-meta flex flex-col", children: [
14930
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-summary-label text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.toWin(internalTab) }),
14931
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-summary-hint text-agg-sm leading-agg-5 text-agg-muted-foreground", children: isLimitOrder ? displayedLimitToWinHint : displayedToWinHint })
14852
14932
  ] }),
14853
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14933
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14854
14934
  import_react16.default,
14855
14935
  {
14856
14936
  value: isLimitOrder ? displayedLimitToWinValue : displayedToWinValue,
@@ -14865,7 +14945,7 @@ var PlaceOrder = ({
14865
14945
  }
14866
14946
  )
14867
14947
  ] }) : null,
14868
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14948
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14869
14949
  "div",
14870
14950
  {
14871
14951
  className: cn(
@@ -14873,17 +14953,17 @@ var PlaceOrder = ({
14873
14953
  classNames == null ? void 0 : classNames.footer
14874
14954
  ),
14875
14955
  children: [
14876
- !shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-alerts flex flex-col gap-3 empty:hidden mb-3", children: [
14877
- submissionFeedback ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14956
+ !shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-alerts flex flex-col gap-3 empty:hidden mb-3", children: [
14957
+ submissionFeedback ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14878
14958
  InlineAlert,
14879
14959
  {
14880
14960
  tone: submissionFeedback.tone,
14881
14961
  message: submissionFeedback.message
14882
14962
  }
14883
14963
  ) : null,
14884
- !submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && isBelowMinimum ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(InlineAlert, { tone: "error", message: belowMinimumMessage }) : null,
14885
- !submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && quoteStatus ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(InlineAlert, { tone: quoteStatus.tone, message: quoteStatus.message }) : null,
14886
- !submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && !quoteStatus && hasEnteredAmount && smartRouteErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14964
+ !submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && isBelowMinimum ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(InlineAlert, { tone: "error", message: belowMinimumMessage }) : null,
14965
+ !submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && quoteStatus ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(InlineAlert, { tone: quoteStatus.tone, message: quoteStatus.message }) : null,
14966
+ !submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && !quoteStatus && hasEnteredAmount && smartRouteErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14887
14967
  InlineAlert,
14888
14968
  {
14889
14969
  tone: "error",
@@ -14895,14 +14975,14 @@ var PlaceOrder = ({
14895
14975
  }
14896
14976
  ) : null
14897
14977
  ] }) : null,
14898
- !submissionFeedback && !shouldShowGeoBlockBanner && orderEligibility.canPlaceOrder && !needsSharedKycVerification && !needsKalshiConnection && shouldShowInsufficientBalanceAlert ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
14978
+ !submissionFeedback && !shouldShowGeoBlockBanner && orderEligibility.canPlaceOrder && !needsSharedKycVerification && !needsKalshiConnection && shouldShowInsufficientBalanceAlert ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
14899
14979
  "div",
14900
14980
  {
14901
14981
  className: "agg-order-insufficient-balance-alert flex items-center justify-center gap-2",
14902
14982
  role: "status",
14903
14983
  "aria-live": "polite",
14904
14984
  children: [
14905
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14985
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14906
14986
  Icon,
14907
14987
  {
14908
14988
  name: "warning-filled",
@@ -14911,8 +14991,8 @@ var PlaceOrder = ({
14911
14991
  "aria-hidden": "true"
14912
14992
  }
14913
14993
  ),
14914
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "text-agg-sm text-agg-foreground", children: tradingLabels.insufficientBalance }),
14915
- insufficientBalanceDetails ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
14994
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "text-agg-sm text-agg-foreground", children: tradingLabels.insufficientBalance }),
14995
+ insufficientBalanceDetails ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14916
14996
  Tooltip,
14917
14997
  {
14918
14998
  "aria-label": tradingLabels.insufficientBalanceDetails,
@@ -14928,7 +15008,7 @@ var PlaceOrder = ({
14928
15008
  ]
14929
15009
  }
14930
15010
  ) : null,
14931
- !submissionFeedback && !shouldShowGeoBlockBanner && needsSharedKycVerification ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15011
+ !submissionFeedback && !shouldShowGeoBlockBanner && needsSharedKycVerification ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14932
15012
  Button,
14933
15013
  {
14934
15014
  size: "large",
@@ -14942,7 +15022,7 @@ var PlaceOrder = ({
14942
15022
  },
14943
15023
  children: sharedKyc.status === "loading" ? tradingLabels.sharedKyc.checkingStatus : tradingLabels.sharedKyc.completeToTrade
14944
15024
  }
14945
- ) : !submissionFeedback && !shouldShowGeoBlockBanner && needsKalshiConnection ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15025
+ ) : !submissionFeedback && !shouldShowGeoBlockBanner && needsKalshiConnection ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14946
15026
  Button,
14947
15027
  {
14948
15028
  size: "large",
@@ -14952,7 +15032,7 @@ var PlaceOrder = ({
14952
15032
  onClick: () => setIsConnectKalshiModalOpen(true),
14953
15033
  children: tradingLabels.connectKalshi
14954
15034
  }
14955
- ) : !submissionFeedback && !shouldShowGeoBlockBanner && isInsufficientBalance ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15035
+ ) : !submissionFeedback && !shouldShowGeoBlockBanner && isInsufficientBalance ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14956
15036
  Button,
14957
15037
  {
14958
15038
  size: "large",
@@ -14962,7 +15042,7 @@ var PlaceOrder = ({
14962
15042
  onClick: handleDepositRequiredClick,
14963
15043
  children: isKalshiBalanceInsufficient ? tradingLabels.addFundsToKalshi : tradingLabels.deposit
14964
15044
  }
14965
- ) : isQuoteLoading && !isActionLoading ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15045
+ ) : isQuoteLoading && !isActionLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14966
15046
  Button,
14967
15047
  {
14968
15048
  size: "large",
@@ -14971,7 +15051,7 @@ var PlaceOrder = ({
14971
15051
  disabled: true,
14972
15052
  "aria-live": "polite",
14973
15053
  "aria-label": routeLoadingMessage != null ? routeLoadingMessage : labels.common.loading,
14974
- prefix: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15054
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14975
15055
  "span",
14976
15056
  {
14977
15057
  className: cn(
@@ -14983,7 +15063,7 @@ var PlaceOrder = ({
14983
15063
  ),
14984
15064
  children: routeLoadingMessage
14985
15065
  }
14986
- ) : !isAuthenticated ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15066
+ ) : !isAuthenticated ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14987
15067
  Button,
14988
15068
  {
14989
15069
  size: "large",
@@ -14991,10 +15071,10 @@ var PlaceOrder = ({
14991
15071
  className: "agg-order-submit h-12 w-full px-8 text-agg-base leading-agg-6 shadow-none",
14992
15072
  disabled: !orderEligibility.canPlaceOrder || shouldShowGeoBlockBanner,
14993
15073
  "aria-label": tradingLabels.signInToTrade,
14994
- onClick: import_hooks40.requestAggAuthChooserOpen,
15074
+ onClick: import_hooks41.requestAggAuthChooserOpen,
14995
15075
  children: tradingLabels.signInToTrade
14996
15076
  }
14997
- ) : /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15077
+ ) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
14998
15078
  Button,
14999
15079
  {
15000
15080
  size: "large",
@@ -15009,7 +15089,7 @@ var PlaceOrder = ({
15009
15089
  children: actionLabel
15010
15090
  }
15011
15091
  ),
15012
- shouldShowLowLiquidityWarning ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15092
+ shouldShowLowLiquidityWarning ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
15013
15093
  InlineAlert,
15014
15094
  {
15015
15095
  tone: "warning",
@@ -15018,8 +15098,8 @@ var PlaceOrder = ({
15018
15098
  message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
15019
15099
  }
15020
15100
  ) : null,
15021
- !shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
15022
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15101
+ !shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
15102
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
15023
15103
  Icon,
15024
15104
  {
15025
15105
  name: "shield-trust",
@@ -15028,10 +15108,10 @@ var PlaceOrder = ({
15028
15108
  "aria-hidden": "true"
15029
15109
  }
15030
15110
  ),
15031
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Typography, { variant: "text-xs-caps", className: "text-agg-primary", children: tradingLabels.platformFee })
15111
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "text-xs-caps", className: "text-agg-primary", children: tradingLabels.platformFee })
15032
15112
  ] }) : null,
15033
- shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(GeoBlockBanner, { termsUrl: AGG_TERMS_OF_SERVICE_URL }) : null,
15034
- !shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "agg-order-disclaimer text-center text-agg-xs leading-agg-4 text-agg-muted-foreground", children: tradingLabels.disclaimer }) : null
15113
+ shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(GeoBlockBanner, { termsUrl: AGG_TERMS_OF_SERVICE_URL }) : null,
15114
+ !shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-disclaimer text-center text-agg-xs leading-agg-4 text-agg-muted-foreground", children: tradingLabels.disclaimer }) : null
15035
15115
  ]
15036
15116
  }
15037
15117
  )
@@ -15039,7 +15119,7 @@ var PlaceOrder = ({
15039
15119
  ]
15040
15120
  }
15041
15121
  ),
15042
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15122
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
15043
15123
  SharedKycModal,
15044
15124
  {
15045
15125
  open: sharedKycFlow.isModalOpen,
@@ -15053,7 +15133,7 @@ var PlaceOrder = ({
15053
15133
  }
15054
15134
  }
15055
15135
  ),
15056
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
15136
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
15057
15137
  ConnectKalshiModal,
15058
15138
  {
15059
15139
  open: isConnectKalshiModalOpen,
@@ -15061,16 +15141,16 @@ var PlaceOrder = ({
15061
15141
  onVerify: handleVerifyKalshi
15062
15142
  }
15063
15143
  ),
15064
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(FundKalshiModal, { open: isFundKalshiModalOpen, onOpenChange: setIsFundKalshiModalOpen })
15144
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(FundKalshiModal, { open: isFundKalshiModalOpen, onOpenChange: setIsFundKalshiModalOpen })
15065
15145
  ] });
15066
15146
  };
15067
15147
  PlaceOrder.displayName = "PlaceOrder";
15068
15148
 
15069
15149
  // src/trading/trading-context/index.tsx
15070
- var import_hooks41 = require("@agg-build/hooks");
15150
+ var import_hooks42 = require("@agg-build/hooks");
15071
15151
 
15072
15152
  // src/trading/use-claim-winnings.ts
15073
- var import_hooks42 = require("@agg-build/hooks");
15153
+ var import_hooks43 = require("@agg-build/hooks");
15074
15154
  var import_react18 = require("react");
15075
15155
  var toClaimError = (err) => {
15076
15156
  if (err instanceof Error) return err;
@@ -15078,11 +15158,11 @@ var toClaimError = (err) => {
15078
15158
  };
15079
15159
  function useClaimWinnings(options = {}) {
15080
15160
  const { onClaim, onClaimResult, onClaimSubmitError, externalClaimingKeys } = options;
15081
- const labels = (0, import_hooks42.useLabels)();
15161
+ const labels = (0, import_hooks43.useLabels)();
15082
15162
  const claimNotificationLabels = labels.notifications.claim;
15083
15163
  const toastCtx = useOptionalToast();
15084
- const queryClient = (0, import_hooks42.useQueryClient)();
15085
- const redeemMutation = (0, import_hooks42.useRedeem)();
15164
+ const queryClient = (0, import_hooks43.useQueryClient)();
15165
+ const redeemMutation = (0, import_hooks43.useRedeem)();
15086
15166
  const [activeRedeems, setActiveRedeems] = (0, import_react18.useState)({});
15087
15167
  const activeClaimKeysRef = (0, import_react18.useRef)(/* @__PURE__ */ new Set());
15088
15168
  const pendingClaimToastIdsRef = (0, import_react18.useRef)({});
@@ -15092,7 +15172,7 @@ function useClaimWinnings(options = {}) {
15092
15172
  () => Object.values(activeRedeems),
15093
15173
  [activeRedeems]
15094
15174
  );
15095
- const lifecycleStates = (0, import_hooks42.useRedeemLifecycles)(lifecycleInputs);
15175
+ const lifecycleStates = (0, import_hooks43.useRedeemLifecycles)(lifecycleInputs);
15096
15176
  const internalClaimingIds = (0, import_react18.useMemo)(() => {
15097
15177
  const out = __spreadValues({}, submittingClaimKeys);
15098
15178
  for (const [claimKey, active] of Object.entries(activeRedeems)) {
@@ -15107,13 +15187,13 @@ function useClaimWinnings(options = {}) {
15107
15187
  [externalClaimingKeys, internalClaimingIds]
15108
15188
  );
15109
15189
  const invalidateClaimUiState = (0, import_react18.useCallback)(() => {
15110
- (0, import_hooks42.invalidateBalanceQueries)(queryClient);
15111
- (0, import_hooks42.invalidatePositionQueries)(queryClient);
15190
+ (0, import_hooks43.invalidateBalanceQueries)(queryClient);
15191
+ (0, import_hooks43.invalidatePositionQueries)(queryClient);
15112
15192
  queryClient.invalidateQueries({
15113
- queryKey: import_hooks42.executionKeys.claimablePositionsCount(),
15193
+ queryKey: import_hooks43.executionKeys.claimablePositionsCount(),
15114
15194
  refetchType: "active"
15115
15195
  });
15116
- (0, import_hooks42.invalidateUserActivityQueries)(queryClient);
15196
+ (0, import_hooks43.invalidateUserActivityQueries)(queryClient);
15117
15197
  }, [queryClient]);
15118
15198
  const claim = (0, import_react18.useCallback)(
15119
15199
  (_0) => __async(null, [_0], function* ({ claimKey, winningOutcomeIds, payload }) {
@@ -15310,7 +15390,7 @@ function useClaimWinnings(options = {}) {
15310
15390
  }
15311
15391
 
15312
15392
  // src/trading/use-resolved-market-claim.ts
15313
- var import_hooks43 = require("@agg-build/hooks");
15393
+ var import_hooks44 = require("@agg-build/hooks");
15314
15394
  var import_react19 = require("react");
15315
15395
  var sharesFormatter = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 });
15316
15396
  var dateFormatter = new Intl.DateTimeFormat("en-US", {
@@ -15327,12 +15407,12 @@ var formatResolutionDate = (value) => {
15327
15407
  function useResolvedMarketClaim(options = {}) {
15328
15408
  var _a;
15329
15409
  const { market, enabled = true, executionMode } = options;
15330
- const { isAuthenticated } = (0, import_hooks43.useAggAuthState)();
15331
- const tradingState = (0, import_react19.useMemo)(() => (0, import_hooks43.resolveMarketTradingState)(market), [market]);
15410
+ const { isAuthenticated } = (0, import_hooks44.useAggAuthState)();
15411
+ const tradingState = (0, import_react19.useMemo)(() => (0, import_hooks44.resolveMarketTradingState)(market), [market]);
15332
15412
  const isResolved = tradingState.kind === "resolved";
15333
15413
  const marketId = (_a = market == null ? void 0 : market.id) != null ? _a : null;
15334
15414
  const shouldFetch = Boolean(enabled && isAuthenticated && isResolved && marketId);
15335
- const { positions } = (0, import_hooks43.useExecutionPositions)(__spreadValues({
15415
+ const { positions } = (0, import_hooks44.useExecutionPositions)(__spreadValues({
15336
15416
  enabled: shouldFetch,
15337
15417
  status: "active",
15338
15418
  limit: 50
@@ -15349,7 +15429,7 @@ function useResolvedMarketClaim(options = {}) {
15349
15429
  (outcome) => outcome.winner === true && outcome.totalSize > 0
15350
15430
  );
15351
15431
  if (winningOutcomes.length === 0) return void 0;
15352
- const totals = (0, import_hooks43.computeClosedPositionTotals)(group);
15432
+ const totals = (0, import_hooks44.computeClosedPositionTotals)(group);
15353
15433
  const winningShares = winningOutcomes.reduce((sum, outcome) => sum + outcome.totalSize, 0);
15354
15434
  const winningOutcomeLabel = (_a2 = resolveResolvedOutcomeLabel({
15355
15435
  market: market != null ? market : group.venueMarket,