@agg-build/ui 4.9.2 → 4.11.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.
- package/dist/{chunk-TNNLRRHC.mjs → chunk-6EHT5OFU.mjs} +1 -1
- package/dist/{chunk-MVAOWNG3.mjs → chunk-CHM6SCOY.mjs} +19 -10
- package/dist/{chunk-GVIS3YXU.mjs → chunk-EYJS45RP.mjs} +35 -12
- package/dist/{chunk-GG57TRNE.mjs → chunk-I72YHWOI.mjs} +2 -2
- package/dist/{chunk-K6F2ZYNM.mjs → chunk-NCWBKC5C.mjs} +52 -21
- package/dist/{chunk-H7L4HDXS.mjs → chunk-TXQJUVRW.mjs} +3 -2
- package/dist/{chunk-NYL6A6AD.mjs → chunk-W7HQVQ22.mjs} +257 -195
- package/dist/events.js +766 -681
- package/dist/events.mjs +3 -3
- package/dist/index.js +2725 -2599
- package/dist/index.mjs +7 -7
- package/dist/modals.js +1352 -1289
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +2085 -1959
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +288 -226
- package/dist/primitives.mjs +1 -1
- package/dist/trading.js +854 -760
- package/dist/trading.mjs +4 -4
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +2 -0
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +2 -0
- package/dist/types/events/list/event-list.constants.d.mts +1 -1
- package/dist/types/events/list/event-list.constants.d.ts +1 -1
- package/dist/types/pages/event-market/event-market.types.d.mts +2 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +2 -0
- package/dist/types/pages/event-market/sports-event-market-page.d.mts +1 -1
- package/dist/types/pages/event-market/sports-event-market-page.d.ts +1 -1
- package/dist/types/pages/user-profile/user-profile.types.d.mts +2 -0
- package/dist/types/pages/user-profile/user-profile.types.d.ts +2 -0
- package/dist/types/primitives/venue-logo/svg/logo-pred.d.mts +10 -0
- package/dist/types/primitives/venue-logo/svg/logo-pred.d.ts +10 -0
- package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +2 -1
- package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +2 -1
- package/dist/types/trading/place-order/index.place-order.types.d.mts +8 -0
- package/dist/types/trading/place-order/index.place-order.types.d.ts +8 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +1 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +1 -1
- 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: () =>
|
|
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
|
|
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
|
|
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-
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
4621
|
+
var import_hooks20 = require("@agg-build/hooks");
|
|
4568
4622
|
var import_sdk10 = require("@agg-build/sdk");
|
|
4569
|
-
var
|
|
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,
|
|
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,
|
|
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,
|
|
4601
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
4609
|
-
/* @__PURE__ */ (0,
|
|
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
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
4663
|
-
isMonochrome ? null : /* @__PURE__ */ (0,
|
|
4664
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
4676
|
-
/* @__PURE__ */ (0,
|
|
4677
|
-
/* @__PURE__ */ (0,
|
|
4678
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
4694
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
4710
|
-
/* @__PURE__ */ (0,
|
|
4711
|
-
/* @__PURE__ */ (0,
|
|
4712
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
5076
|
-
lineIndex > 0 ? /* @__PURE__ */ (0,
|
|
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,
|
|
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
|
|
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,
|
|
5262
|
-
/* @__PURE__ */ (0,
|
|
5263
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
5266
|
-
/* @__PURE__ */ (0,
|
|
5267
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
5277
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
5376
|
-
/* @__PURE__ */ (0,
|
|
5377
|
-
question ? /* @__PURE__ */ (0,
|
|
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,
|
|
5380
|
-
hasStandaloneSettlementText ? /* @__PURE__ */ (0,
|
|
5381
|
-
standaloneEventBlock || standaloneMarketBlock ? /* @__PURE__ */ (0,
|
|
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,
|
|
5388
|
-
standaloneEventBlock && standaloneMarketBlock ? /* @__PURE__ */ (0,
|
|
5389
|
-
standaloneMarketBlock ? /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
5400
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
5406
|
-
/* @__PURE__ */ (0,
|
|
5407
|
-
/* @__PURE__ */ (0,
|
|
5408
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
5439
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
5459
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
5469
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
5479
|
-
hasSettlementDifferences || hasStandaloneSettlementText ? /* @__PURE__ */ (0,
|
|
5480
|
-
/* @__PURE__ */ (0,
|
|
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
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
5814
|
-
var
|
|
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,
|
|
5882
|
+
const labels = (0, import_hooks25.useLabels)();
|
|
5821
5883
|
const message = venue ? labels.trading.geoBlockVenueMessage(venue) : labels.trading.geoBlockGenericMessage;
|
|
5822
|
-
return /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
6022
|
+
} = (0, import_hooks26.useSdkUiConfig)();
|
|
5961
6023
|
const isDisabled = resolveButtonIsDisabled({ disabled, isLoading });
|
|
5962
|
-
return /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
6049
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
5988
6050
|
prefix != null ? prefix : null,
|
|
5989
|
-
/* @__PURE__ */ (0,
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
6103
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
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,
|
|
6235
|
+
} = (0, import_hooks27.useSdkUiConfig)();
|
|
6174
6236
|
const overlayAnimationClassName = resolveModalOverlayAnimationClassName(enableAnimations);
|
|
6175
6237
|
const panelAnimationClassName = resolveModalPanelAnimationClassName(enableAnimations);
|
|
6176
|
-
return /* @__PURE__ */ (0,
|
|
6177
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
6264
|
-
const labels = (0,
|
|
6265
|
-
const defaultCloseIcon = /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
6297
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
6335
|
-
rightElement ? /* @__PURE__ */ (0,
|
|
6336
|
-
!hideClose && /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
6567
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { name: "close", size: "small", "aria-hidden": "true" })
|
|
6506
6568
|
}
|
|
6507
6569
|
) }),
|
|
6508
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
6516
|
-
/* @__PURE__ */ (0,
|
|
6517
|
-
/* @__PURE__ */ (0,
|
|
6518
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
6524
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
6533
|
-
/* @__PURE__ */ (0,
|
|
6534
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
6545
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
6891
|
-
var
|
|
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,
|
|
6894
|
-
linkAccounts: /* @__PURE__ */ (0,
|
|
6895
|
-
bestPrices: /* @__PURE__ */ (0,
|
|
6896
|
-
stayInControl: /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
6910
|
-
/* @__PURE__ */ (0,
|
|
6911
|
-
/* @__PURE__ */ (0,
|
|
6912
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
6932
|
-
/* @__PURE__ */ (0,
|
|
6933
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
7357
|
+
const labels = (0, import_hooks32.useLabels)();
|
|
7295
7358
|
const {
|
|
7296
7359
|
features: { enableAnimations }
|
|
7297
|
-
} = (0,
|
|
7298
|
-
return /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
7320
|
-
enableAnimations ? /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
7347
|
-
enableAnimations ? /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
7372
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
7510
|
+
const labels = (0, import_hooks33.useLabels)();
|
|
7448
7511
|
const {
|
|
7449
7512
|
general: { rootClassName },
|
|
7450
7513
|
features: { enableAnimations }
|
|
7451
|
-
} = (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
7810
|
+
} = (0, import_hooks34.useSdkUiConfig)();
|
|
7748
7811
|
const trigger = (0, import_react11.useMemo)(() => {
|
|
7749
7812
|
if (children) return children;
|
|
7750
|
-
return /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
7764
|
-
/* @__PURE__ */ (0,
|
|
7765
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
7799
|
-
/* @__PURE__ */ (0,
|
|
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
|
|
7884
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
7822
7885
|
var ProfileSetupStep = ({ onContinue }) => {
|
|
7823
|
-
const labels = (0,
|
|
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,
|
|
7852
|
-
/* @__PURE__ */ (0,
|
|
7853
|
-
/* @__PURE__ */ (0,
|
|
7854
|
-
/* @__PURE__ */ (0,
|
|
7855
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
7915
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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
|
|
7954
|
-
var
|
|
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,
|
|
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,
|
|
7968
|
-
const action = connected ? /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
7998
|
-
/* @__PURE__ */ (0,
|
|
7999
|
-
/* @__PURE__ */ (0,
|
|
8000
|
-
/* @__PURE__ */ (0,
|
|
8001
|
-
/* @__PURE__ */ (0,
|
|
8002
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8068
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "shrink-0", children: action })
|
|
8006
8069
|
] }),
|
|
8007
|
-
/* @__PURE__ */ (0,
|
|
8008
|
-
/* @__PURE__ */ (0,
|
|
8009
|
-
/* @__PURE__ */ (0,
|
|
8010
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8013
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8089
|
+
const labels = (0, import_hooks36.useLabels)();
|
|
8027
8090
|
const canContinue = connectedOnchain;
|
|
8028
|
-
return /* @__PURE__ */ (0,
|
|
8029
|
-
/* @__PURE__ */ (0,
|
|
8030
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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
|
|
8124
|
+
var import_hooks37 = require("@agg-build/hooks");
|
|
8062
8125
|
var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
|
|
8063
|
-
var
|
|
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,
|
|
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,
|
|
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,
|
|
8108
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8120
|
-
/* @__PURE__ */ (0,
|
|
8121
|
-
/* @__PURE__ */ (0,
|
|
8122
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8125
|
-
/* @__PURE__ */ (0,
|
|
8126
|
-
/* @__PURE__ */ (0,
|
|
8127
|
-
index > 0 && /* @__PURE__ */ (0,
|
|
8128
|
-
/* @__PURE__ */ (0,
|
|
8129
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8133
|
-
/* @__PURE__ */ (0,
|
|
8134
|
-
error ? /* @__PURE__ */ (0,
|
|
8135
|
-
/* @__PURE__ */ (0,
|
|
8136
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
8196
|
-
const { disabledVenues, isLoading: isAppConfigLoading } = (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
8344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { name: "close", size: "medium" })
|
|
8282
8345
|
}
|
|
8283
8346
|
) }),
|
|
8284
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
8300
|
-
/* @__PURE__ */ (0,
|
|
8301
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
8316
|
-
/* @__PURE__ */ (0,
|
|
8317
|
-
/* @__PURE__ */ (0,
|
|
8318
|
-
/* @__PURE__ */ (0,
|
|
8319
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8322
|
-
/* @__PURE__ */ (0,
|
|
8323
|
-
/* @__PURE__ */ (0,
|
|
8324
|
-
/* @__PURE__ */ (0,
|
|
8325
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8328
|
-
/* @__PURE__ */ (0,
|
|
8329
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
8409
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { children: [
|
|
8347
8410
|
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
|
|
8348
8411
|
" ",
|
|
8349
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8415
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { children: [
|
|
8353
8416
|
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
|
|
8354
8417
|
" ",
|
|
8355
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8421
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
|
|
8359
8422
|
] }),
|
|
8360
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8425
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("br", {}),
|
|
8363
8426
|
labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
|
|
8364
8427
|
] })
|
|
8365
8428
|
] }),
|
|
8366
|
-
/* @__PURE__ */ (0,
|
|
8367
|
-
/* @__PURE__ */ (0,
|
|
8368
|
-
/* @__PURE__ */ (0,
|
|
8369
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8372
|
-
/* @__PURE__ */ (0,
|
|
8373
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
8404
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
8436
|
-
/* @__PURE__ */ (0,
|
|
8437
|
-
/* @__PURE__ */ (0,
|
|
8438
|
-
/* @__PURE__ */ (0,
|
|
8439
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8443
|
-
/* @__PURE__ */ (0,
|
|
8444
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8450
|
-
error ? /* @__PURE__ */ (0,
|
|
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,
|
|
8459
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8464
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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
|
|
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,
|
|
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,
|
|
8543
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8551
|
-
/* @__PURE__ */ (0,
|
|
8552
|
-
step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ (0,
|
|
8553
|
-
step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ (0,
|
|
8554
|
-
step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ (0,
|
|
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,
|
|
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
|
|
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
|
|
8652
|
+
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
8590
8653
|
var FundKalshiModal = ({ open, onOpenChange }) => {
|
|
8591
|
-
const labels = (0,
|
|
8654
|
+
const labels = (0, import_hooks40.useLabels)();
|
|
8592
8655
|
const modalLabels = labels.trading.fundKalshiModal;
|
|
8593
|
-
return /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
8668
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Icon, { name: "close", size: "medium" })
|
|
8606
8669
|
}
|
|
8607
8670
|
),
|
|
8608
|
-
/* @__PURE__ */ (0,
|
|
8609
|
-
/* @__PURE__ */ (0,
|
|
8610
|
-
/* @__PURE__ */ (0,
|
|
8611
|
-
/* @__PURE__ */ (0,
|
|
8612
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8615
|
-
/* @__PURE__ */ (0,
|
|
8616
|
-
/* @__PURE__ */ (0,
|
|
8617
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
8696
|
+
modalLabels.remainingSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("li", { children: step }, step))
|
|
8634
8697
|
] })
|
|
8635
8698
|
] }),
|
|
8636
|
-
/* @__PURE__ */ (0,
|
|
8637
|
-
/* @__PURE__ */ (0,
|
|
8638
|
-
/* @__PURE__ */ (0,
|
|
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",
|
|
@@ -9151,8 +9214,14 @@ var extractGeoBlockedVenues = (warnings) => {
|
|
|
9151
9214
|
);
|
|
9152
9215
|
};
|
|
9153
9216
|
var getSmartRouteTotalFees = (feeBreakdown) => {
|
|
9217
|
+
var _a;
|
|
9154
9218
|
if (!feeBreakdown) return null;
|
|
9155
|
-
const feeParts = [
|
|
9219
|
+
const feeParts = [
|
|
9220
|
+
feeBreakdown.venueFees,
|
|
9221
|
+
(_a = feeBreakdown.builderFee) != null ? _a : 0,
|
|
9222
|
+
feeBreakdown.bridgeFees,
|
|
9223
|
+
feeBreakdown.executionGas
|
|
9224
|
+
];
|
|
9156
9225
|
if (!feeParts.every(Number.isFinite)) return null;
|
|
9157
9226
|
return feeParts.reduce((total, fee) => total + Math.round(fee * 100) / 100, 0);
|
|
9158
9227
|
};
|
|
@@ -9278,9 +9347,10 @@ var resolvePlaceOrderQuoteStatus = ({
|
|
|
9278
9347
|
amount,
|
|
9279
9348
|
labels,
|
|
9280
9349
|
quoteData,
|
|
9281
|
-
selectedMarket
|
|
9350
|
+
selectedMarket,
|
|
9351
|
+
tradeSide = "buy"
|
|
9282
9352
|
}) => {
|
|
9283
|
-
var _a, _b, _c;
|
|
9353
|
+
var _a, _b, _c, _d, _e;
|
|
9284
9354
|
if (!selectedMarket) {
|
|
9285
9355
|
return {
|
|
9286
9356
|
tone: "warning",
|
|
@@ -9300,9 +9370,10 @@ var resolvePlaceOrderQuoteStatus = ({
|
|
|
9300
9370
|
};
|
|
9301
9371
|
}
|
|
9302
9372
|
if (quoteData.status === "no_orderbooks") {
|
|
9373
|
+
const serverError = (_a = quoteData.error) == null ? void 0 : _a.trim();
|
|
9303
9374
|
return {
|
|
9304
9375
|
tone: "error",
|
|
9305
|
-
message: labels.noOrderbooks,
|
|
9376
|
+
message: serverError || labels.noOrderbooks,
|
|
9306
9377
|
placement: "above-action"
|
|
9307
9378
|
};
|
|
9308
9379
|
}
|
|
@@ -9316,26 +9387,27 @@ var resolvePlaceOrderQuoteStatus = ({
|
|
|
9316
9387
|
if (quoteData.status === "insufficient_input_amount") {
|
|
9317
9388
|
return {
|
|
9318
9389
|
tone: "error",
|
|
9319
|
-
message: (
|
|
9390
|
+
message: (_b = quoteData.message) != null ? _b : labels.insufficientInputAmount,
|
|
9320
9391
|
placement: "above-action"
|
|
9321
9392
|
};
|
|
9322
9393
|
}
|
|
9323
9394
|
if (quoteData.status === "invalid_input") {
|
|
9324
9395
|
return {
|
|
9325
9396
|
tone: "error",
|
|
9326
|
-
message: (
|
|
9397
|
+
message: (_c = quoteData.message) != null ? _c : labels.quoteUnavailable,
|
|
9327
9398
|
placement: "above-action"
|
|
9328
9399
|
};
|
|
9329
9400
|
}
|
|
9330
9401
|
if (quoteData.status === "insufficient_position") {
|
|
9331
|
-
const total = (
|
|
9402
|
+
const total = (_d = quoteData.positionAvailability) == null ? void 0 : _d.totalSellableShares;
|
|
9332
9403
|
const message = total != null ? labels.insufficientPosition(total) : labels.insufficientPositionGeneric;
|
|
9333
9404
|
return { tone: "error", message, placement: "above-action" };
|
|
9334
9405
|
}
|
|
9335
9406
|
if (quoteData.status === "insufficient_depth") {
|
|
9407
|
+
const serverError = (_e = quoteData.error) == null ? void 0 : _e.trim();
|
|
9336
9408
|
return {
|
|
9337
9409
|
tone: "error",
|
|
9338
|
-
message: labels.insufficientSellDepth,
|
|
9410
|
+
message: tradeSide === "sell" ? serverError || labels.insufficientSellDepth : serverError || labels.insufficientLiquidity,
|
|
9339
9411
|
placement: "above-action"
|
|
9340
9412
|
};
|
|
9341
9413
|
}
|
|
@@ -9415,6 +9487,7 @@ var buildLiveRouteCards = ({
|
|
|
9415
9487
|
executionPrice: averageExecutionPrice,
|
|
9416
9488
|
requiresSharedKyc: primaryRequiresSharedKyc
|
|
9417
9489
|
} : null;
|
|
9490
|
+
const soloCardId = (prefix, sq) => `${prefix}-${sq.venue}${sq.venueMarketOutcomeId ? `-${sq.venueMarketOutcomeId}` : ""}`;
|
|
9418
9491
|
const soloCards = ((_c = quoteData.venueSoloQuotes) != null ? _c : []).filter(
|
|
9419
9492
|
(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
|
|
9420
9493
|
// funding lane is short (API nulls the quoteId), which is NOT always the
|
|
@@ -9430,7 +9503,8 @@ var buildLiveRouteCards = ({
|
|
|
9430
9503
|
const venue = parsedVenue.success ? parsedVenue.data : void 0;
|
|
9431
9504
|
if (geoBlockedVenues.has(sq.venue)) {
|
|
9432
9505
|
return {
|
|
9433
|
-
id:
|
|
9506
|
+
id: soloCardId("live-unavailable", sq),
|
|
9507
|
+
venueMarketOutcomeId: sq.venueMarketOutcomeId,
|
|
9434
9508
|
hint: labels.venueUnavailableInRegion,
|
|
9435
9509
|
kind: "venue",
|
|
9436
9510
|
label: getTradingVenueLabel(venue),
|
|
@@ -9467,7 +9541,8 @@ var buildLiveRouteCards = ({
|
|
|
9467
9541
|
feeBreakdown: (_b2 = sq.feeBreakdown) != null ? _b2 : quoteData.feeBreakdown
|
|
9468
9542
|
}), sq.quoteId ? { status: "ok", error: void 0 } : null);
|
|
9469
9543
|
return {
|
|
9470
|
-
id:
|
|
9544
|
+
id: soloCardId("live-solo", sq),
|
|
9545
|
+
venueMarketOutcomeId: sq.venueMarketOutcomeId,
|
|
9471
9546
|
hint: labels.averagePrice(avgPrice),
|
|
9472
9547
|
kind: "venue",
|
|
9473
9548
|
label: getTradingVenueLabel(venue),
|
|
@@ -9489,7 +9564,8 @@ var buildLiveRouteCards = ({
|
|
|
9489
9564
|
const temporarilyUnavailable = sq.unavailableReason === "venue_unavailable";
|
|
9490
9565
|
const hasPreview = temporarilyUnavailable && sq.filledQty > 0;
|
|
9491
9566
|
return __spreadProps(__spreadValues({
|
|
9492
|
-
id:
|
|
9567
|
+
id: soloCardId("live-unavailable", sq),
|
|
9568
|
+
venueMarketOutcomeId: sq.venueMarketOutcomeId,
|
|
9493
9569
|
hint: temporarilyUnavailable ? labels.venueTemporarilyUnavailable : labels.venueUnavailableInRegion,
|
|
9494
9570
|
kind: "venue",
|
|
9495
9571
|
label: getTradingVenueLabel(venue),
|
|
@@ -10988,16 +11064,16 @@ var calculateExecutionProgress = ({
|
|
|
10988
11064
|
};
|
|
10989
11065
|
|
|
10990
11066
|
// src/trading/place-order/index.place-order.execution-view.tsx
|
|
10991
|
-
var
|
|
11067
|
+
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
10992
11068
|
var PlaceOrderExecutionHeader = ({
|
|
10993
11069
|
className,
|
|
10994
11070
|
eventDateLabel,
|
|
10995
11071
|
eventImage,
|
|
10996
11072
|
eventTitle
|
|
10997
11073
|
}) => {
|
|
10998
|
-
return /* @__PURE__ */ (0,
|
|
10999
|
-
/* @__PURE__ */ (0,
|
|
11000
|
-
/* @__PURE__ */ (0,
|
|
11074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("agg-order-execution-header flex flex-col gap-2", className), children: [
|
|
11075
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
11076
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11001
11077
|
RemoteImage,
|
|
11002
11078
|
{
|
|
11003
11079
|
src: eventImage != null ? eventImage : null,
|
|
@@ -11005,9 +11081,9 @@ var PlaceOrderExecutionHeader = ({
|
|
|
11005
11081
|
className: "h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
|
|
11006
11082
|
}
|
|
11007
11083
|
),
|
|
11008
|
-
/* @__PURE__ */ (0,
|
|
11084
|
+
/* @__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 })
|
|
11009
11085
|
] }),
|
|
11010
|
-
eventDateLabel ? /* @__PURE__ */ (0,
|
|
11086
|
+
eventDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: eventDateLabel }) : null
|
|
11011
11087
|
] });
|
|
11012
11088
|
};
|
|
11013
11089
|
var ExecutionStepIndicator = ({
|
|
@@ -11015,7 +11091,7 @@ var ExecutionStepIndicator = ({
|
|
|
11015
11091
|
step
|
|
11016
11092
|
}) => {
|
|
11017
11093
|
if (step.status === "done") {
|
|
11018
|
-
return /* @__PURE__ */ (0,
|
|
11094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11019
11095
|
Icon,
|
|
11020
11096
|
{
|
|
11021
11097
|
name: "check-circle",
|
|
@@ -11026,7 +11102,7 @@ var ExecutionStepIndicator = ({
|
|
|
11026
11102
|
);
|
|
11027
11103
|
}
|
|
11028
11104
|
if (step.status === "loading") {
|
|
11029
|
-
return /* @__PURE__ */ (0,
|
|
11105
|
+
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)(
|
|
11030
11106
|
"span",
|
|
11031
11107
|
{
|
|
11032
11108
|
className: cn(
|
|
@@ -11037,7 +11113,7 @@ var ExecutionStepIndicator = ({
|
|
|
11037
11113
|
) });
|
|
11038
11114
|
}
|
|
11039
11115
|
if (step.status === "failed") {
|
|
11040
|
-
return /* @__PURE__ */ (0,
|
|
11116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11041
11117
|
Icon,
|
|
11042
11118
|
{
|
|
11043
11119
|
name: "error-filled",
|
|
@@ -11048,7 +11124,7 @@ var ExecutionStepIndicator = ({
|
|
|
11048
11124
|
);
|
|
11049
11125
|
}
|
|
11050
11126
|
if (step.status === "warning") {
|
|
11051
|
-
return /* @__PURE__ */ (0,
|
|
11127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11052
11128
|
Icon,
|
|
11053
11129
|
{
|
|
11054
11130
|
name: "warning-filled",
|
|
@@ -11058,7 +11134,7 @@ var ExecutionStepIndicator = ({
|
|
|
11058
11134
|
}
|
|
11059
11135
|
);
|
|
11060
11136
|
}
|
|
11061
|
-
return /* @__PURE__ */ (0,
|
|
11137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11062
11138
|
"span",
|
|
11063
11139
|
{
|
|
11064
11140
|
className: "h-3 w-3 shrink-0 rounded-full border border-dashed border-agg-separator",
|
|
@@ -11071,15 +11147,15 @@ var PlaceOrderExecutionGroups = ({
|
|
|
11071
11147
|
groups,
|
|
11072
11148
|
labels
|
|
11073
11149
|
}) => {
|
|
11074
|
-
return /* @__PURE__ */ (0,
|
|
11150
|
+
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)(
|
|
11075
11151
|
"section",
|
|
11076
11152
|
{
|
|
11077
11153
|
className: "agg-order-execution-group flex flex-col gap-3",
|
|
11078
11154
|
"aria-label": labels.venueOrder(group.venueLabel),
|
|
11079
11155
|
children: [
|
|
11080
|
-
/* @__PURE__ */ (0,
|
|
11081
|
-
/* @__PURE__ */ (0,
|
|
11082
|
-
group.venue ? /* @__PURE__ */ (0,
|
|
11156
|
+
/* @__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: [
|
|
11157
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex min-w-0 items-center gap-2 text-agg-foreground", children: [
|
|
11158
|
+
group.venue ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11083
11159
|
VenueLogo,
|
|
11084
11160
|
{
|
|
11085
11161
|
venue: group.venue,
|
|
@@ -11088,22 +11164,22 @@ var PlaceOrderExecutionGroups = ({
|
|
|
11088
11164
|
className: "h-3.5 w-3.5 shrink-0"
|
|
11089
11165
|
}
|
|
11090
11166
|
) : null,
|
|
11091
|
-
/* @__PURE__ */ (0,
|
|
11167
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("h3", { className: "truncate font-agg-normal", children: labels.venueOrder(group.venueLabel) })
|
|
11092
11168
|
] }),
|
|
11093
|
-
/* @__PURE__ */ (0,
|
|
11094
|
-
/* @__PURE__ */ (0,
|
|
11095
|
-
/* @__PURE__ */ (0,
|
|
11169
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
11170
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "text-agg-muted-foreground", children: group.priceLabel }),
|
|
11171
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "text-agg-foreground", children: group.amountLabel })
|
|
11096
11172
|
] })
|
|
11097
11173
|
] }),
|
|
11098
|
-
/* @__PURE__ */ (0,
|
|
11174
|
+
/* @__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)(
|
|
11099
11175
|
"div",
|
|
11100
11176
|
{
|
|
11101
11177
|
className: "flex items-start gap-2 text-agg-xs leading-agg-4 text-agg-foreground",
|
|
11102
11178
|
"data-kind": step.kind,
|
|
11103
11179
|
"data-status": step.status,
|
|
11104
11180
|
children: [
|
|
11105
|
-
/* @__PURE__ */ (0,
|
|
11106
|
-
/* @__PURE__ */ (0,
|
|
11181
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ExecutionStepIndicator, { enableAnimations, step }),
|
|
11182
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "min-w-0 flex-1", children: step.status === "done" ? step.completedLabel : step.pendingLabel })
|
|
11107
11183
|
]
|
|
11108
11184
|
},
|
|
11109
11185
|
step.id
|
|
@@ -11122,9 +11198,10 @@ var PlaceOrderExecutionView = ({
|
|
|
11122
11198
|
eventTitle,
|
|
11123
11199
|
groups,
|
|
11124
11200
|
labels,
|
|
11125
|
-
progress
|
|
11201
|
+
progress,
|
|
11202
|
+
settlementHint
|
|
11126
11203
|
}) => {
|
|
11127
|
-
return /* @__PURE__ */ (0,
|
|
11204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11128
11205
|
Card,
|
|
11129
11206
|
{
|
|
11130
11207
|
className: cn(
|
|
@@ -11133,8 +11210,8 @@ var PlaceOrderExecutionView = ({
|
|
|
11133
11210
|
classNames == null ? void 0 : classNames.root,
|
|
11134
11211
|
className
|
|
11135
11212
|
),
|
|
11136
|
-
children: /* @__PURE__ */ (0,
|
|
11137
|
-
/* @__PURE__ */ (0,
|
|
11213
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("flex flex-col gap-6 p-5", classNames == null ? void 0 : classNames.body), children: [
|
|
11214
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11138
11215
|
PlaceOrderExecutionHeader,
|
|
11139
11216
|
{
|
|
11140
11217
|
className: classNames == null ? void 0 : classNames.header,
|
|
@@ -11143,13 +11220,13 @@ var PlaceOrderExecutionView = ({
|
|
|
11143
11220
|
eventTitle
|
|
11144
11221
|
}
|
|
11145
11222
|
),
|
|
11146
|
-
/* @__PURE__ */ (0,
|
|
11147
|
-
/* @__PURE__ */ (0,
|
|
11148
|
-
/* @__PURE__ */ (0,
|
|
11223
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.content), children: [
|
|
11224
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
11225
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("p", { className: "shrink-0 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
11149
11226
|
progress,
|
|
11150
11227
|
"%"
|
|
11151
11228
|
] }),
|
|
11152
|
-
/* @__PURE__ */ (0,
|
|
11229
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11153
11230
|
"progress",
|
|
11154
11231
|
{
|
|
11155
11232
|
"aria-label": labels.executingOrder,
|
|
@@ -11159,14 +11236,15 @@ var PlaceOrderExecutionView = ({
|
|
|
11159
11236
|
}
|
|
11160
11237
|
)
|
|
11161
11238
|
] }),
|
|
11162
|
-
/* @__PURE__ */ (0,
|
|
11239
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11163
11240
|
PlaceOrderExecutionGroups,
|
|
11164
11241
|
{
|
|
11165
11242
|
enableAnimations,
|
|
11166
11243
|
groups,
|
|
11167
11244
|
labels
|
|
11168
11245
|
}
|
|
11169
|
-
)
|
|
11246
|
+
),
|
|
11247
|
+
settlementHint ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: settlementHint }) : null
|
|
11170
11248
|
] })
|
|
11171
11249
|
] })
|
|
11172
11250
|
}
|
|
@@ -11175,7 +11253,7 @@ var PlaceOrderExecutionView = ({
|
|
|
11175
11253
|
PlaceOrderExecutionView.displayName = "PlaceOrderExecutionView";
|
|
11176
11254
|
|
|
11177
11255
|
// src/trading/place-order/index.place-order.failure.tsx
|
|
11178
|
-
var
|
|
11256
|
+
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
11179
11257
|
var resolveFailureActionHandler = ({
|
|
11180
11258
|
action,
|
|
11181
11259
|
onDone,
|
|
@@ -11188,12 +11266,12 @@ var resolveFailureActionHandler = ({
|
|
|
11188
11266
|
};
|
|
11189
11267
|
var renderPartialFailureStep = (step) => {
|
|
11190
11268
|
const isWarningStep = step.tone === "warning" || step.tone === "error";
|
|
11191
|
-
return /* @__PURE__ */ (0,
|
|
11269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
|
|
11192
11270
|
"div",
|
|
11193
11271
|
{
|
|
11194
11272
|
className: "flex items-center gap-2 text-agg-sm leading-agg-5 text-agg-foreground",
|
|
11195
11273
|
children: [
|
|
11196
|
-
/* @__PURE__ */ (0,
|
|
11274
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11197
11275
|
Icon,
|
|
11198
11276
|
{
|
|
11199
11277
|
name: isWarningStep ? "warning-filled" : "check-circle",
|
|
@@ -11202,8 +11280,8 @@ var renderPartialFailureStep = (step) => {
|
|
|
11202
11280
|
"aria-hidden": "true"
|
|
11203
11281
|
}
|
|
11204
11282
|
),
|
|
11205
|
-
/* @__PURE__ */ (0,
|
|
11206
|
-
step.venue ? /* @__PURE__ */ (0,
|
|
11283
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "min-w-0 flex-1", children: step.label }),
|
|
11284
|
+
step.venue ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(VenueLogo, { venue: step.venue, size: "small", className: "h-4 w-4 shrink-0" }) : null
|
|
11207
11285
|
]
|
|
11208
11286
|
},
|
|
11209
11287
|
step.id
|
|
@@ -11222,10 +11300,10 @@ var PlaceOrderFailureView = ({
|
|
|
11222
11300
|
const shouldShowPartialFailureLayout = summary.kind === "partial_fill";
|
|
11223
11301
|
const failureStepGroups = shouldShowPartialFailureLayout ? groupPlaceOrderFailureSteps(summary.steps) : [];
|
|
11224
11302
|
if (shouldShowPartialFailureLayout) {
|
|
11225
|
-
return /* @__PURE__ */ (0,
|
|
11226
|
-
/* @__PURE__ */ (0,
|
|
11227
|
-
/* @__PURE__ */ (0,
|
|
11228
|
-
/* @__PURE__ */ (0,
|
|
11303
|
+
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: [
|
|
11304
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-header flex flex-col gap-2", children: [
|
|
11305
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-market flex items-center gap-3", children: [
|
|
11306
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11229
11307
|
RemoteImage,
|
|
11230
11308
|
{
|
|
11231
11309
|
src: (_a = summary.eventImage) != null ? _a : null,
|
|
@@ -11233,19 +11311,19 @@ var PlaceOrderFailureView = ({
|
|
|
11233
11311
|
className: "h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
|
|
11234
11312
|
}
|
|
11235
11313
|
),
|
|
11236
|
-
/* @__PURE__ */ (0,
|
|
11314
|
+
/* @__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 })
|
|
11237
11315
|
] }),
|
|
11238
|
-
summary.eventSubtitle ? /* @__PURE__ */ (0,
|
|
11316
|
+
summary.eventSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: summary.eventSubtitle }) : null
|
|
11239
11317
|
] }),
|
|
11240
|
-
/* @__PURE__ */ (0,
|
|
11318
|
+
/* @__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)(
|
|
11241
11319
|
PlaceOrderExecutionGroups,
|
|
11242
11320
|
{
|
|
11243
11321
|
enableAnimations: false,
|
|
11244
11322
|
groups: summary.executionGroups,
|
|
11245
11323
|
labels: tradingLabels
|
|
11246
11324
|
}
|
|
11247
|
-
) : failureStepGroups.map((group, groupIndex) => /* @__PURE__ */ (0,
|
|
11248
|
-
summary.errorMessage ? /* @__PURE__ */ (0,
|
|
11325
|
+
) : 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}`)) }),
|
|
11326
|
+
summary.errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11249
11327
|
InlineAlert,
|
|
11250
11328
|
{
|
|
11251
11329
|
tone: "error",
|
|
@@ -11253,20 +11331,20 @@ var PlaceOrderFailureView = ({
|
|
|
11253
11331
|
message: tradingLabels.orderFailureDescription(summary.errorMessage)
|
|
11254
11332
|
}
|
|
11255
11333
|
) : null,
|
|
11256
|
-
summary.result ? /* @__PURE__ */ (0,
|
|
11257
|
-
/* @__PURE__ */ (0,
|
|
11258
|
-
/* @__PURE__ */ (0,
|
|
11259
|
-
/* @__PURE__ */ (0,
|
|
11260
|
-
/* @__PURE__ */ (0,
|
|
11334
|
+
summary.result ? /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
11335
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11336
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
11337
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPartiallyFilled }),
|
|
11338
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: tradingLabels.orderAveragePrice(summary.result.averagePriceLabel) })
|
|
11261
11339
|
] }),
|
|
11262
|
-
/* @__PURE__ */ (0,
|
|
11340
|
+
/* @__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 })
|
|
11263
11341
|
] }),
|
|
11264
|
-
/* @__PURE__ */ (0,
|
|
11265
|
-
/* @__PURE__ */ (0,
|
|
11266
|
-
/* @__PURE__ */ (0,
|
|
11342
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11343
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPayout }),
|
|
11344
|
+
/* @__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 })
|
|
11267
11345
|
] })
|
|
11268
11346
|
] }) : null,
|
|
11269
|
-
/* @__PURE__ */ (0,
|
|
11347
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex flex-col gap-4", children: summary.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11270
11348
|
Button,
|
|
11271
11349
|
{
|
|
11272
11350
|
variant: action.variant === "retry" ? "primary" : "secondary",
|
|
@@ -11280,10 +11358,10 @@ var PlaceOrderFailureView = ({
|
|
|
11280
11358
|
)) })
|
|
11281
11359
|
] }) });
|
|
11282
11360
|
}
|
|
11283
|
-
return /* @__PURE__ */ (0,
|
|
11284
|
-
/* @__PURE__ */ (0,
|
|
11285
|
-
/* @__PURE__ */ (0,
|
|
11286
|
-
/* @__PURE__ */ (0,
|
|
11361
|
+
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: [
|
|
11362
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-header flex flex-col gap-2", children: [
|
|
11363
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-market flex items-center gap-3", children: [
|
|
11364
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11287
11365
|
RemoteImage,
|
|
11288
11366
|
{
|
|
11289
11367
|
src: (_c = summary.eventImage) != null ? _c : null,
|
|
@@ -11291,11 +11369,11 @@ var PlaceOrderFailureView = ({
|
|
|
11291
11369
|
className: "h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
|
|
11292
11370
|
}
|
|
11293
11371
|
),
|
|
11294
|
-
/* @__PURE__ */ (0,
|
|
11372
|
+
/* @__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 })
|
|
11295
11373
|
] }),
|
|
11296
|
-
summary.eventSubtitle ? /* @__PURE__ */ (0,
|
|
11374
|
+
summary.eventSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: summary.eventSubtitle }) : null
|
|
11297
11375
|
] }),
|
|
11298
|
-
((_d = summary.executionGroups) == null ? void 0 : _d.length) ? /* @__PURE__ */ (0,
|
|
11376
|
+
((_d = summary.executionGroups) == null ? void 0 : _d.length) ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11299
11377
|
PlaceOrderExecutionGroups,
|
|
11300
11378
|
{
|
|
11301
11379
|
enableAnimations: false,
|
|
@@ -11303,7 +11381,7 @@ var PlaceOrderFailureView = ({
|
|
|
11303
11381
|
labels: tradingLabels
|
|
11304
11382
|
}
|
|
11305
11383
|
) : null,
|
|
11306
|
-
/* @__PURE__ */ (0,
|
|
11384
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11307
11385
|
InlineAlert,
|
|
11308
11386
|
{
|
|
11309
11387
|
tone: "error",
|
|
@@ -11312,7 +11390,7 @@ var PlaceOrderFailureView = ({
|
|
|
11312
11390
|
message: tradingLabels.orderFailureDescription((_e = summary.errorMessage) != null ? _e : "")
|
|
11313
11391
|
}
|
|
11314
11392
|
),
|
|
11315
|
-
/* @__PURE__ */ (0,
|
|
11393
|
+
/* @__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)(
|
|
11316
11394
|
Button,
|
|
11317
11395
|
{
|
|
11318
11396
|
variant: action.variant === "retry" ? "primary" : "secondary",
|
|
@@ -11329,7 +11407,7 @@ var PlaceOrderFailureView = ({
|
|
|
11329
11407
|
PlaceOrderFailureView.displayName = "PlaceOrderFailureView";
|
|
11330
11408
|
|
|
11331
11409
|
// src/trading/place-order/index.place-order.success.tsx
|
|
11332
|
-
var
|
|
11410
|
+
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
11333
11411
|
var resolveBuyPayoutLabel = (shares) => {
|
|
11334
11412
|
if (!shares) return "$0";
|
|
11335
11413
|
return shares.startsWith("$") ? shares : `$${shares}`;
|
|
@@ -11347,7 +11425,7 @@ var PlaceOrderSuccessView = ({
|
|
|
11347
11425
|
const resolvedPayoutLabel = (_c = summary.toWinLabel) != null ? _c : resolvedTradeSide === "sell" ? summary.estimatedCost : resolveBuyPayoutLabel(summary.shares);
|
|
11348
11426
|
const potentialReturnLabel = summary.potentialReturnLabel ? tradingLabels.potentialReturnBetter(summary.potentialReturnLabel) : null;
|
|
11349
11427
|
const legacyExecutionSteps = ((_d = summary.executionStepGroups) != null ? _d : []).flat();
|
|
11350
|
-
return /* @__PURE__ */ (0,
|
|
11428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11351
11429
|
Card,
|
|
11352
11430
|
{
|
|
11353
11431
|
className: cn(
|
|
@@ -11356,8 +11434,8 @@ var PlaceOrderSuccessView = ({
|
|
|
11356
11434
|
"border-0 ring-1 ring-inset ring-agg-separator",
|
|
11357
11435
|
className
|
|
11358
11436
|
),
|
|
11359
|
-
children: /* @__PURE__ */ (0,
|
|
11360
|
-
summary.eventTitle ? /* @__PURE__ */ (0,
|
|
11437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-success-body flex flex-col gap-6 p-5", children: [
|
|
11438
|
+
summary.eventTitle ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11361
11439
|
PlaceOrderExecutionHeader,
|
|
11362
11440
|
{
|
|
11363
11441
|
eventDateLabel: summary.eventDateLabel,
|
|
@@ -11365,19 +11443,19 @@ var PlaceOrderSuccessView = ({
|
|
|
11365
11443
|
eventTitle: summary.eventTitle
|
|
11366
11444
|
}
|
|
11367
11445
|
) : null,
|
|
11368
|
-
((_e = summary.executionGroups) == null ? void 0 : _e.length) ? /* @__PURE__ */ (0,
|
|
11446
|
+
((_e = summary.executionGroups) == null ? void 0 : _e.length) ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11369
11447
|
PlaceOrderExecutionGroups,
|
|
11370
11448
|
{
|
|
11371
11449
|
enableAnimations: false,
|
|
11372
11450
|
groups: summary.executionGroups,
|
|
11373
11451
|
labels: tradingLabels
|
|
11374
11452
|
}
|
|
11375
|
-
) : legacyExecutionSteps.length > 0 ? /* @__PURE__ */ (0,
|
|
11453
|
+
) : 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)(
|
|
11376
11454
|
"div",
|
|
11377
11455
|
{
|
|
11378
11456
|
className: "flex items-start gap-2 text-agg-xs leading-agg-4 text-agg-foreground",
|
|
11379
11457
|
children: [
|
|
11380
|
-
/* @__PURE__ */ (0,
|
|
11458
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11381
11459
|
Icon,
|
|
11382
11460
|
{
|
|
11383
11461
|
name: step.tone === "warning" || step.tone === "error" ? "warning-filled" : "check-circle",
|
|
@@ -11389,28 +11467,28 @@ var PlaceOrderSuccessView = ({
|
|
|
11389
11467
|
"aria-hidden": "true"
|
|
11390
11468
|
}
|
|
11391
11469
|
),
|
|
11392
|
-
/* @__PURE__ */ (0,
|
|
11470
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "min-w-0 flex-1", children: step.label })
|
|
11393
11471
|
]
|
|
11394
11472
|
},
|
|
11395
11473
|
step.id
|
|
11396
11474
|
)) }) : null,
|
|
11397
|
-
/* @__PURE__ */ (0,
|
|
11398
|
-
/* @__PURE__ */ (0,
|
|
11399
|
-
/* @__PURE__ */ (0,
|
|
11400
|
-
/* @__PURE__ */ (0,
|
|
11401
|
-
/* @__PURE__ */ (0,
|
|
11475
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-success-summary flex flex-col gap-4", children: [
|
|
11476
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11477
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
11478
|
+
/* @__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 }),
|
|
11479
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: tradingLabels.orderAveragePrice(summary.avgPrice) })
|
|
11402
11480
|
] }),
|
|
11403
|
-
/* @__PURE__ */ (0,
|
|
11481
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-foreground", children: resolvedAmountLabel })
|
|
11404
11482
|
] }),
|
|
11405
|
-
/* @__PURE__ */ (0,
|
|
11406
|
-
/* @__PURE__ */ (0,
|
|
11407
|
-
/* @__PURE__ */ (0,
|
|
11408
|
-
potentialReturnLabel ? /* @__PURE__ */ (0,
|
|
11483
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11484
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
11485
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPayout }),
|
|
11486
|
+
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
|
|
11409
11487
|
] }),
|
|
11410
|
-
/* @__PURE__ */ (0,
|
|
11488
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-success", children: resolvedPayoutLabel })
|
|
11411
11489
|
] })
|
|
11412
11490
|
] }),
|
|
11413
|
-
/* @__PURE__ */ (0,
|
|
11491
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11414
11492
|
Button,
|
|
11415
11493
|
{
|
|
11416
11494
|
variant: "secondary",
|
|
@@ -11428,7 +11506,7 @@ var PlaceOrderSuccessView = ({
|
|
|
11428
11506
|
PlaceOrderSuccessView.displayName = "PlaceOrderSuccessView";
|
|
11429
11507
|
|
|
11430
11508
|
// src/trading/place-order/index.tsx
|
|
11431
|
-
var
|
|
11509
|
+
var import_jsx_runtime145 = require("react/jsx-runtime");
|
|
11432
11510
|
var SELL_SHARE_INPUT_DECIMALS = 6;
|
|
11433
11511
|
var SELL_SHARE_DISPLAY_DECIMALS = 2;
|
|
11434
11512
|
var resolvePlaceOrderPortalContainer = (triggerElement) => {
|
|
@@ -11546,7 +11624,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11546
11624
|
minimumValue: slippageMinimumValue
|
|
11547
11625
|
}) => {
|
|
11548
11626
|
var _a, _b;
|
|
11549
|
-
const labels = (0,
|
|
11627
|
+
const labels = (0, import_hooks41.useLabels)();
|
|
11550
11628
|
const containerRef = (0, import_react17.useRef)(null);
|
|
11551
11629
|
const triggerRef = (0, import_react17.useRef)(null);
|
|
11552
11630
|
const inputRef = (0, import_react17.useRef)(null);
|
|
@@ -11644,8 +11722,8 @@ var PlaceOrderSlippageControl = ({
|
|
|
11644
11722
|
if (!isEditing) return;
|
|
11645
11723
|
handleCommitDraft(false);
|
|
11646
11724
|
};
|
|
11647
|
-
return /* @__PURE__ */ (0,
|
|
11648
|
-
/* @__PURE__ */ (0,
|
|
11725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { ref: containerRef, className: "agg-slippage-control w-full", onBlur: handleContainerBlur, children: [
|
|
11726
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11649
11727
|
"button",
|
|
11650
11728
|
{
|
|
11651
11729
|
ref: triggerRef,
|
|
@@ -11663,8 +11741,8 @@ var PlaceOrderSlippageControl = ({
|
|
|
11663
11741
|
),
|
|
11664
11742
|
onClick: handleToggleEditing,
|
|
11665
11743
|
children: [
|
|
11666
|
-
/* @__PURE__ */ (0,
|
|
11667
|
-
/* @__PURE__ */ (0,
|
|
11744
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "agg-slippage-label", children: collapsedLabel }),
|
|
11745
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11668
11746
|
Icon,
|
|
11669
11747
|
{
|
|
11670
11748
|
name: isEditing ? "chevron-up" : "pencil",
|
|
@@ -11676,7 +11754,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11676
11754
|
]
|
|
11677
11755
|
}
|
|
11678
11756
|
),
|
|
11679
|
-
/* @__PURE__ */ (0,
|
|
11757
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11680
11758
|
"div",
|
|
11681
11759
|
{
|
|
11682
11760
|
"aria-hidden": !isEditing,
|
|
@@ -11690,10 +11768,10 @@ var PlaceOrderSlippageControl = ({
|
|
|
11690
11768
|
"transition-[grid-template-rows,opacity,margin-top] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)]"
|
|
11691
11769
|
)
|
|
11692
11770
|
),
|
|
11693
|
-
children: /* @__PURE__ */ (0,
|
|
11694
|
-
/* @__PURE__ */ (0,
|
|
11695
|
-
/* @__PURE__ */ (0,
|
|
11696
|
-
/* @__PURE__ */ (0,
|
|
11771
|
+
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: [
|
|
11772
|
+
/* @__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: [
|
|
11773
|
+
/* @__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: [
|
|
11774
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11697
11775
|
"input",
|
|
11698
11776
|
{
|
|
11699
11777
|
ref: inputRef,
|
|
@@ -11708,7 +11786,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11708
11786
|
onKeyDown: handleInputKeyDown
|
|
11709
11787
|
}
|
|
11710
11788
|
),
|
|
11711
|
-
/* @__PURE__ */ (0,
|
|
11789
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11712
11790
|
"button",
|
|
11713
11791
|
{
|
|
11714
11792
|
type: "button",
|
|
@@ -11726,8 +11804,8 @@ var PlaceOrderSlippageControl = ({
|
|
|
11726
11804
|
}
|
|
11727
11805
|
)
|
|
11728
11806
|
] }),
|
|
11729
|
-
/* @__PURE__ */ (0,
|
|
11730
|
-
/* @__PURE__ */ (0,
|
|
11807
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "h-full w-px bg-agg-separator", "aria-hidden": "true" }),
|
|
11808
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11731
11809
|
"div",
|
|
11732
11810
|
{
|
|
11733
11811
|
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",
|
|
@@ -11736,7 +11814,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11736
11814
|
}
|
|
11737
11815
|
)
|
|
11738
11816
|
] }),
|
|
11739
|
-
/* @__PURE__ */ (0,
|
|
11817
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11740
11818
|
"div",
|
|
11741
11819
|
{
|
|
11742
11820
|
"aria-hidden": !resolvedWarningMessage,
|
|
@@ -11750,13 +11828,13 @@ var PlaceOrderSlippageControl = ({
|
|
|
11750
11828
|
"transition-[grid-template-rows,opacity] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]"
|
|
11751
11829
|
)
|
|
11752
11830
|
),
|
|
11753
|
-
children: /* @__PURE__ */ (0,
|
|
11831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11754
11832
|
"div",
|
|
11755
11833
|
{
|
|
11756
11834
|
id: warningId,
|
|
11757
11835
|
className: "agg-slippage-warning-message flex items-start gap-2 text-agg-sm leading-agg-5 text-agg-foreground",
|
|
11758
11836
|
children: [
|
|
11759
|
-
/* @__PURE__ */ (0,
|
|
11837
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11760
11838
|
Icon,
|
|
11761
11839
|
{
|
|
11762
11840
|
name: "warning-filled",
|
|
@@ -11765,7 +11843,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11765
11843
|
color: "currentColor"
|
|
11766
11844
|
}
|
|
11767
11845
|
),
|
|
11768
|
-
/* @__PURE__ */ (0,
|
|
11846
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { children: resolvedWarningMessage != null ? resolvedWarningMessage : "" })
|
|
11769
11847
|
]
|
|
11770
11848
|
}
|
|
11771
11849
|
) })
|
|
@@ -11785,9 +11863,9 @@ var renderCardHeader = ({
|
|
|
11785
11863
|
onClose
|
|
11786
11864
|
}) => {
|
|
11787
11865
|
if (!headerTitle) return null;
|
|
11788
|
-
return /* @__PURE__ */ (0,
|
|
11789
|
-
/* @__PURE__ */ (0,
|
|
11790
|
-
/* @__PURE__ */ (0,
|
|
11866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("agg-order-panel-header flex flex-col gap-2", className), children: [
|
|
11867
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-market-summary flex items-center gap-3", children: [
|
|
11868
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11791
11869
|
RemoteImage,
|
|
11792
11870
|
{
|
|
11793
11871
|
src: headerImage,
|
|
@@ -11795,19 +11873,19 @@ var renderCardHeader = ({
|
|
|
11795
11873
|
className: "agg-order-market-image h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
|
|
11796
11874
|
}
|
|
11797
11875
|
),
|
|
11798
|
-
/* @__PURE__ */ (0,
|
|
11799
|
-
onClose ? /* @__PURE__ */ (0,
|
|
11876
|
+
/* @__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 }),
|
|
11877
|
+
onClose ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11800
11878
|
"button",
|
|
11801
11879
|
{
|
|
11802
11880
|
type: "button",
|
|
11803
11881
|
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",
|
|
11804
11882
|
"aria-label": "Close",
|
|
11805
11883
|
onClick: onClose,
|
|
11806
|
-
children: /* @__PURE__ */ (0,
|
|
11884
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(CloseIcon, { className: "h-5 w-5" })
|
|
11807
11885
|
}
|
|
11808
11886
|
) : null
|
|
11809
11887
|
] }),
|
|
11810
|
-
headerSubtitle ? /* @__PURE__ */ (0,
|
|
11888
|
+
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
|
|
11811
11889
|
] });
|
|
11812
11890
|
};
|
|
11813
11891
|
var PlaceOrderResolvedView = ({
|
|
@@ -11820,7 +11898,7 @@ var PlaceOrderResolvedView = ({
|
|
|
11820
11898
|
showResolvingState = false
|
|
11821
11899
|
}) => {
|
|
11822
11900
|
var _a, _b;
|
|
11823
|
-
const labels = (0,
|
|
11901
|
+
const labels = (0, import_hooks41.useLabels)();
|
|
11824
11902
|
const tradingLabels = labels.trading;
|
|
11825
11903
|
const resolvingTimestamp = (_a = resolutionTimestamp != null ? resolutionTimestamp : tradingState.resolvesAt) != null ? _a : tradingState.endsAt;
|
|
11826
11904
|
const isResolvingMarket = showResolvingState && !tradingState.winningOutcome;
|
|
@@ -11829,7 +11907,7 @@ var PlaceOrderResolvedView = ({
|
|
|
11829
11907
|
return endDateLabel ? `${tradingState.market.question} \xB7 ${endDateLabel}` : tradingState.market.question;
|
|
11830
11908
|
})() : "";
|
|
11831
11909
|
if (isResolvingMarket) {
|
|
11832
|
-
return /* @__PURE__ */ (0,
|
|
11910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11833
11911
|
Card,
|
|
11834
11912
|
{
|
|
11835
11913
|
className: cn(
|
|
@@ -11840,7 +11918,7 @@ var PlaceOrderResolvedView = ({
|
|
|
11840
11918
|
),
|
|
11841
11919
|
role: "status",
|
|
11842
11920
|
"aria-label": labels.marketDetails.resolvingTitle,
|
|
11843
|
-
children: /* @__PURE__ */ (0,
|
|
11921
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11844
11922
|
"div",
|
|
11845
11923
|
{
|
|
11846
11924
|
className: cn(
|
|
@@ -11848,12 +11926,12 @@ var PlaceOrderResolvedView = ({
|
|
|
11848
11926
|
classNames == null ? void 0 : classNames.body
|
|
11849
11927
|
),
|
|
11850
11928
|
children: [
|
|
11851
|
-
/* @__PURE__ */ (0,
|
|
11852
|
-
/* @__PURE__ */ (0,
|
|
11853
|
-
/* @__PURE__ */ (0,
|
|
11854
|
-
resolvingSubtitle ? /* @__PURE__ */ (0,
|
|
11929
|
+
/* @__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" }) }),
|
|
11930
|
+
/* @__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: [
|
|
11931
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body-large-strong", children: labels.marketDetails.resolvingTitle }),
|
|
11932
|
+
resolvingSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body", className: "text-center", children: resolvingSubtitle }) : null
|
|
11855
11933
|
] }),
|
|
11856
|
-
/* @__PURE__ */ (0,
|
|
11934
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11857
11935
|
Typography,
|
|
11858
11936
|
{
|
|
11859
11937
|
variant: "label",
|
|
@@ -11867,7 +11945,7 @@ var PlaceOrderResolvedView = ({
|
|
|
11867
11945
|
}
|
|
11868
11946
|
);
|
|
11869
11947
|
}
|
|
11870
|
-
return /* @__PURE__ */ (0,
|
|
11948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11871
11949
|
Card,
|
|
11872
11950
|
{
|
|
11873
11951
|
className: cn(
|
|
@@ -11876,19 +11954,19 @@ var PlaceOrderResolvedView = ({
|
|
|
11876
11954
|
classNames == null ? void 0 : classNames.root,
|
|
11877
11955
|
className
|
|
11878
11956
|
),
|
|
11879
|
-
children: /* @__PURE__ */ (0,
|
|
11880
|
-
/* @__PURE__ */ (0,
|
|
11881
|
-
/* @__PURE__ */ (0,
|
|
11957
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("agg-order-panel-body flex flex-col", classNames == null ? void 0 : classNames.body), children: [
|
|
11958
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col items-center gap-6 p-8", children: [
|
|
11959
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11882
11960
|
"div",
|
|
11883
11961
|
{
|
|
11884
11962
|
className: cn(
|
|
11885
11963
|
"flex h-15 w-15 items-center justify-center rounded-full",
|
|
11886
11964
|
"bg-agg-primary/15"
|
|
11887
11965
|
),
|
|
11888
|
-
children: /* @__PURE__ */ (0,
|
|
11966
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon, { name: "success-check", className: cn("h-6 w-6", "text-agg-primary") })
|
|
11889
11967
|
}
|
|
11890
11968
|
),
|
|
11891
|
-
/* @__PURE__ */ (0,
|
|
11969
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11892
11970
|
"div",
|
|
11893
11971
|
{
|
|
11894
11972
|
className: cn(
|
|
@@ -11896,8 +11974,8 @@ var PlaceOrderResolvedView = ({
|
|
|
11896
11974
|
classNames == null ? void 0 : classNames.content
|
|
11897
11975
|
),
|
|
11898
11976
|
children: [
|
|
11899
|
-
tradingState.market ? /* @__PURE__ */ (0,
|
|
11900
|
-
tradingState.winningOutcome ? /* @__PURE__ */ (0,
|
|
11977
|
+
tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body", className: "text-center", children: tradingState.market.question }) : null,
|
|
11978
|
+
tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(
|
|
11901
11979
|
shouldUseRawResolvedPlaceOrderOutcomeLabel(
|
|
11902
11980
|
tradingState.market,
|
|
11903
11981
|
tradingState.winningOutcome
|
|
@@ -11911,25 +11989,25 @@ var PlaceOrderResolvedView = ({
|
|
|
11911
11989
|
}
|
|
11912
11990
|
)
|
|
11913
11991
|
] }),
|
|
11914
|
-
resolvedClaim ? /* @__PURE__ */ (0,
|
|
11915
|
-
/* @__PURE__ */ (0,
|
|
11916
|
-
/* @__PURE__ */ (0,
|
|
11917
|
-
/* @__PURE__ */ (0,
|
|
11918
|
-
/* @__PURE__ */ (0,
|
|
11919
|
-
resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ (0,
|
|
11920
|
-
/* @__PURE__ */ (0,
|
|
11921
|
-
/* @__PURE__ */ (0,
|
|
11992
|
+
resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
|
|
11993
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
11994
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex w-full flex-col gap-5 p-6", children: [
|
|
11995
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body-strong", className: "text-center", children: tradingLabels.resolvedEarningsTitle }),
|
|
11996
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
11997
|
+
resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11998
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.resolvedResolutionDateLabel }),
|
|
11999
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
|
|
11922
12000
|
] }) : null,
|
|
11923
|
-
/* @__PURE__ */ (0,
|
|
11924
|
-
/* @__PURE__ */ (0,
|
|
11925
|
-
/* @__PURE__ */ (0,
|
|
12001
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
12002
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.resolvedSharesLabel }),
|
|
12003
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
|
|
11926
12004
|
] }),
|
|
11927
|
-
/* @__PURE__ */ (0,
|
|
11928
|
-
/* @__PURE__ */ (0,
|
|
11929
|
-
/* @__PURE__ */ (0,
|
|
12005
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
12006
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.resolvedTotalPayoutLabel }),
|
|
12007
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
|
|
11930
12008
|
] })
|
|
11931
12009
|
] }),
|
|
11932
|
-
resolvedClaim.onClaim ? /* @__PURE__ */ (0,
|
|
12010
|
+
resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11933
12011
|
Button,
|
|
11934
12012
|
{
|
|
11935
12013
|
size: "large",
|
|
@@ -11951,21 +12029,21 @@ var renderRouteBreakdownRow = (row, sharedKycStatus, tradingLabels) => {
|
|
|
11951
12029
|
const venueLabel = getTradingVenueLabel(row.venue);
|
|
11952
12030
|
const rowKey = `${row.venue}-${row.label}-${row.priceLabel}-${(_a = row.resultLabel) != null ? _a : ""}`;
|
|
11953
12031
|
const showSharedKycRequirement = row.requiresSharedKyc === true && sharedKycStatus !== void 0 && sharedKycStatus !== "verified";
|
|
11954
|
-
return /* @__PURE__ */ (0,
|
|
12032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11955
12033
|
"div",
|
|
11956
12034
|
{
|
|
11957
12035
|
className: "agg-route-breakdown-row flex items-center justify-between gap-4 text-left",
|
|
11958
12036
|
children: [
|
|
11959
|
-
/* @__PURE__ */ (0,
|
|
11960
|
-
/* @__PURE__ */ (0,
|
|
11961
|
-
/* @__PURE__ */ (0,
|
|
11962
|
-
/* @__PURE__ */ (0,
|
|
11963
|
-
showSharedKycRequirement ? /* @__PURE__ */ (0,
|
|
12037
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-breakdown-market flex min-w-0 items-center gap-2", children: [
|
|
12038
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(VenueLogo, { venue: row.venue, className: "size-3!", ariaLabel: venueLabel }),
|
|
12039
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
12040
|
+
/* @__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 }),
|
|
12041
|
+
showSharedKycRequirement ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-xs leading-agg-4 text-agg-muted-foreground", children: tradingLabels.sharedKyc.required }) : null
|
|
11964
12042
|
] })
|
|
11965
12043
|
] }),
|
|
11966
|
-
/* @__PURE__ */ (0,
|
|
11967
|
-
/* @__PURE__ */ (0,
|
|
11968
|
-
/* @__PURE__ */ (0,
|
|
12044
|
+
/* @__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: [
|
|
12045
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-muted-foreground", children: row.priceLabel }),
|
|
12046
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-foreground", children: (_b = row.resultLabel) != null ? _b : "" })
|
|
11969
12047
|
] })
|
|
11970
12048
|
]
|
|
11971
12049
|
},
|
|
@@ -11996,7 +12074,7 @@ var renderRouteCard = ({
|
|
|
11996
12074
|
const showSplitDetails = isSelected && isExpanded && card.kind === "split" && !!((_a = card.rows) == null ? void 0 : _a.length);
|
|
11997
12075
|
const displayedHint = showSharedKycRequirement ? tradingLabels.sharedKyc.required : card.hint;
|
|
11998
12076
|
const ariaLabel = [card.label, displayedHint, card.value].filter(Boolean).join(" ");
|
|
11999
|
-
return /* @__PURE__ */ (0,
|
|
12077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12000
12078
|
"button",
|
|
12001
12079
|
{
|
|
12002
12080
|
type: "button",
|
|
@@ -12015,10 +12093,10 @@ var renderRouteCard = ({
|
|
|
12015
12093
|
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"
|
|
12016
12094
|
),
|
|
12017
12095
|
onClick: () => onSelect(card.id),
|
|
12018
|
-
children: /* @__PURE__ */ (0,
|
|
12019
|
-
/* @__PURE__ */ (0,
|
|
12020
|
-
/* @__PURE__ */ (0,
|
|
12021
|
-
card.kind === "split" ? /* @__PURE__ */ (0,
|
|
12096
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-card-content relative z-10 flex flex-col gap-3", children: [
|
|
12097
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-card-header flex items-center justify-between gap-4", children: [
|
|
12098
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-card-meta flex min-w-0 gap-3 items-center", children: [
|
|
12099
|
+
card.kind === "split" ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12022
12100
|
Icon,
|
|
12023
12101
|
{
|
|
12024
12102
|
name: "sparkles-filled",
|
|
@@ -12029,7 +12107,7 @@ var renderRouteCard = ({
|
|
|
12029
12107
|
),
|
|
12030
12108
|
"aria-hidden": "true"
|
|
12031
12109
|
}
|
|
12032
|
-
) : card.venue ? /* @__PURE__ */ (0,
|
|
12110
|
+
) : card.venue ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12033
12111
|
VenueLogo,
|
|
12034
12112
|
{
|
|
12035
12113
|
venue: card.venue,
|
|
@@ -12037,10 +12115,10 @@ var renderRouteCard = ({
|
|
|
12037
12115
|
ariaLabel: getTradingVenueLabel(card.venue)
|
|
12038
12116
|
}
|
|
12039
12117
|
) : null,
|
|
12040
|
-
/* @__PURE__ */ (0,
|
|
12041
|
-
/* @__PURE__ */ (0,
|
|
12042
|
-
/* @__PURE__ */ (0,
|
|
12043
|
-
card.isUnavailable ? /* @__PURE__ */ (0,
|
|
12118
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
12119
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
12120
|
+
/* @__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 }),
|
|
12121
|
+
card.isUnavailable ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12044
12122
|
Icon,
|
|
12045
12123
|
{
|
|
12046
12124
|
name: "lock",
|
|
@@ -12048,7 +12126,7 @@ var renderRouteCard = ({
|
|
|
12048
12126
|
className: "shrink-0 text-agg-muted-foreground",
|
|
12049
12127
|
"aria-hidden": "true"
|
|
12050
12128
|
}
|
|
12051
|
-
) : showSharedKycRequirement || card.insufficientInventory ? /* @__PURE__ */ (0,
|
|
12129
|
+
) : showSharedKycRequirement || card.insufficientInventory ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12052
12130
|
Icon,
|
|
12053
12131
|
{
|
|
12054
12132
|
name: "warning",
|
|
@@ -12056,7 +12134,7 @@ var renderRouteCard = ({
|
|
|
12056
12134
|
className: "shrink-0 text-agg-muted-foreground",
|
|
12057
12135
|
"aria-hidden": "true"
|
|
12058
12136
|
}
|
|
12059
|
-
) : card.kind === "split" && isSelected ? /* @__PURE__ */ (0,
|
|
12137
|
+
) : card.kind === "split" && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12060
12138
|
Icon,
|
|
12061
12139
|
{
|
|
12062
12140
|
name: showSplitDetails ? "chevron-up" : "chevron-down",
|
|
@@ -12066,10 +12144,10 @@ var renderRouteCard = ({
|
|
|
12066
12144
|
}
|
|
12067
12145
|
) : null
|
|
12068
12146
|
] }),
|
|
12069
|
-
card.hint ? /* @__PURE__ */ (0,
|
|
12147
|
+
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
|
|
12070
12148
|
] })
|
|
12071
12149
|
] }),
|
|
12072
|
-
/* @__PURE__ */ (0,
|
|
12150
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12073
12151
|
"p",
|
|
12074
12152
|
{
|
|
12075
12153
|
className: cn(
|
|
@@ -12081,9 +12159,9 @@ var renderRouteCard = ({
|
|
|
12081
12159
|
}
|
|
12082
12160
|
)
|
|
12083
12161
|
] }),
|
|
12084
|
-
showSplitDetails ? /* @__PURE__ */ (0,
|
|
12085
|
-
/* @__PURE__ */ (0,
|
|
12086
|
-
/* @__PURE__ */ (0,
|
|
12162
|
+
showSplitDetails ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
|
|
12163
|
+
/* @__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 }),
|
|
12164
|
+
/* @__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(
|
|
12087
12165
|
(row) => renderRouteBreakdownRow(row, sharedKycStatus, tradingLabels)
|
|
12088
12166
|
) })
|
|
12089
12167
|
] }) : null
|
|
@@ -12122,17 +12200,17 @@ var PlaceOrder = ({
|
|
|
12122
12200
|
features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
|
|
12123
12201
|
formatting: { formatPrice },
|
|
12124
12202
|
general: { locale }
|
|
12125
|
-
} = (0,
|
|
12126
|
-
const labels = (0,
|
|
12203
|
+
} = (0, import_hooks41.useSdkUiConfig)();
|
|
12204
|
+
const labels = (0, import_hooks41.useLabels)();
|
|
12127
12205
|
const tradingLabels = labels.trading;
|
|
12128
12206
|
const toastCtx = useOptionalToast();
|
|
12129
|
-
const { isTradingBlocked } = (0,
|
|
12130
|
-
const tradingContext = (0,
|
|
12207
|
+
const { isTradingBlocked } = (0, import_hooks41.useGeoBlock)();
|
|
12208
|
+
const tradingContext = (0, import_hooks41.useEventTradingContext)();
|
|
12131
12209
|
const selectedEvent = (_a = tradingContext == null ? void 0 : tradingContext.selectedEvent) != null ? _a : null;
|
|
12132
12210
|
const selectedMarket = (_b = tradingContext == null ? void 0 : tradingContext.selectedMarket) != null ? _b : null;
|
|
12133
12211
|
const selectedOutcomeId = (_c = tradingContext == null ? void 0 : tradingContext.selectedOutcomeId) != null ? _c : null;
|
|
12134
12212
|
const resolvedEventTradingState = (0, import_react17.useMemo)(() => {
|
|
12135
|
-
return eventTradingState != null ? eventTradingState : (0,
|
|
12213
|
+
return eventTradingState != null ? eventTradingState : (0, import_hooks41.resolveEventTradingState)(selectedEvent);
|
|
12136
12214
|
}, [eventTradingState, selectedEvent]);
|
|
12137
12215
|
const scopedSelectedEvent = (0, import_react17.useMemo)(() => {
|
|
12138
12216
|
var _a2;
|
|
@@ -12160,7 +12238,7 @@ var PlaceOrder = ({
|
|
|
12160
12238
|
)) != null ? _f : scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.venueMarketOutcomes[0]) != null ? _g : null;
|
|
12161
12239
|
const scopedSelectedOutcomeId = (_h = scopedSelectedOutcome == null ? void 0 : scopedSelectedOutcome.id) != null ? _h : null;
|
|
12162
12240
|
const resolvedTradingState = (0, import_react17.useMemo)(() => {
|
|
12163
|
-
return (0,
|
|
12241
|
+
return (0, import_hooks41.resolveMarketTradingState)(scopedSelectedMarket);
|
|
12164
12242
|
}, [scopedSelectedMarket]);
|
|
12165
12243
|
const resolvedReadOnlyMarket = (0, import_react17.useMemo)(() => {
|
|
12166
12244
|
var _a2;
|
|
@@ -12174,11 +12252,11 @@ var PlaceOrder = ({
|
|
|
12174
12252
|
scopedSelectedMarket
|
|
12175
12253
|
]);
|
|
12176
12254
|
const resolvedReadOnlyTradingState = (0, import_react17.useMemo)(() => {
|
|
12177
|
-
return (0,
|
|
12255
|
+
return (0, import_hooks41.resolveMarketTradingState)(resolvedReadOnlyMarket);
|
|
12178
12256
|
}, [resolvedReadOnlyMarket]);
|
|
12179
12257
|
const isEndedWithoutKnownWinner = showResolvingState && !resolvedEventTradingState.winningOutcome && !resolvedReadOnlyTradingState.winningOutcome;
|
|
12180
12258
|
const orderEligibility = (0, import_react17.useMemo)(
|
|
12181
|
-
() => (0,
|
|
12259
|
+
() => (0, import_hooks41.resolveOrderEligibility)({
|
|
12182
12260
|
event: scopedSelectedEvent,
|
|
12183
12261
|
market: scopedSelectedMarket,
|
|
12184
12262
|
outcome: scopedSelectedOutcome,
|
|
@@ -12187,16 +12265,16 @@ var PlaceOrder = ({
|
|
|
12187
12265
|
[scopedSelectedEvent, scopedSelectedMarket, scopedSelectedOutcome, resolvedEventTradingState]
|
|
12188
12266
|
);
|
|
12189
12267
|
const isResolvedOutcomeCtaLocked = resolvedEventTradingState.kind === "resolved" || resolvedTradingState.kind === "resolved";
|
|
12190
|
-
const { isAuthenticated, user } = (0,
|
|
12268
|
+
const { isAuthenticated, user } = (0, import_hooks41.useAggAuthContext)();
|
|
12191
12269
|
const sharedKycFlow = useSharedKycFlow({
|
|
12192
12270
|
integration: sharedKyc,
|
|
12193
12271
|
userId: isAuthenticated ? user == null ? void 0 : user.id : null,
|
|
12194
12272
|
fallbackErrorMessage: tradingLabels.sharedKyc.modal.error
|
|
12195
12273
|
});
|
|
12196
|
-
const { executionMode: resolvedExecutionMode, isPaperMode } = (0,
|
|
12274
|
+
const { executionMode: resolvedExecutionMode, isPaperMode } = (0, import_hooks41.useResolvedExecutionMode)(executionMode);
|
|
12197
12275
|
const showLimitOrders = limitOrdersFeature && !isPaperMode;
|
|
12198
|
-
const liveBalanceState = (0,
|
|
12199
|
-
const paperBalancesQuery = (0,
|
|
12276
|
+
const liveBalanceState = (0, import_hooks41.useAggBalanceState)();
|
|
12277
|
+
const paperBalancesQuery = (0, import_hooks41.useManagedBalances)({
|
|
12200
12278
|
enabled: Boolean(isAuthenticated && isPaperMode),
|
|
12201
12279
|
mode: "paper"
|
|
12202
12280
|
});
|
|
@@ -12216,22 +12294,22 @@ var PlaceOrder = ({
|
|
|
12216
12294
|
const liveAvailableBalance = (_i = liveBalanceState.availableBalance) != null ? _i : liveBalanceState.totalBalance;
|
|
12217
12295
|
const totalBalance = isPaperMode ? paperTotalBalance : liveAvailableBalance;
|
|
12218
12296
|
const isBalanceLoading = isPaperMode ? paperBalancesQuery.isLoading : liveBalanceState.isLoading;
|
|
12219
|
-
const executeManaged = (0,
|
|
12220
|
-
const placeLimitOrder = (0,
|
|
12221
|
-
const aggClient = (0,
|
|
12222
|
-
const queryClient = (0,
|
|
12223
|
-
const { disabledVenues, isLoading: isAppConfigLoading } = (0,
|
|
12224
|
-
const { data: kalshiKeyStatus, refetch: refetchKalshiKeyStatus } = (0,
|
|
12297
|
+
const executeManaged = (0, import_hooks41.useExecuteManaged)();
|
|
12298
|
+
const placeLimitOrder = (0, import_hooks41.usePlaceLimitOrder)();
|
|
12299
|
+
const aggClient = (0, import_hooks41.useAggClient)();
|
|
12300
|
+
const queryClient = (0, import_hooks41.useQueryClient)();
|
|
12301
|
+
const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks41.useAppConfig)();
|
|
12302
|
+
const { data: kalshiKeyStatus, refetch: refetchKalshiKeyStatus } = (0, import_hooks41.useVenueKeyStatus)(
|
|
12225
12303
|
import_sdk19.Venue.kalshi,
|
|
12226
12304
|
isAuthenticated
|
|
12227
12305
|
);
|
|
12228
12306
|
const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = (0, import_react17.useState)(false);
|
|
12229
12307
|
const [isFundKalshiModalOpen, setIsFundKalshiModalOpen] = (0, import_react17.useState)(false);
|
|
12230
|
-
const livePrices = (0,
|
|
12308
|
+
const livePrices = (0, import_hooks41.useLiveOutcomePrices)(
|
|
12231
12309
|
scopedSelectedMarket ? [scopedSelectedMarket] : void 0
|
|
12232
12310
|
);
|
|
12233
|
-
const wsBestPrices = (0,
|
|
12234
|
-
const fetchedClusterMidpointResult = (0,
|
|
12311
|
+
const wsBestPrices = (0, import_hooks41.useLiveBestPrices)(scopedSelectedMarket ? [scopedSelectedMarket] : void 0);
|
|
12312
|
+
const fetchedClusterMidpointResult = (0, import_hooks41.useMidpoints)(
|
|
12235
12313
|
midpointsResult ? [] : scopedSelectedMarket ? [scopedSelectedMarket] : []
|
|
12236
12314
|
);
|
|
12237
12315
|
const clusterMidpointResult = midpointsResult != null ? midpointsResult : fetchedClusterMidpointResult;
|
|
@@ -12239,7 +12317,7 @@ var PlaceOrder = ({
|
|
|
12239
12317
|
const clusterBestMidpoint = clusterMidpointResult.bestMidpoint;
|
|
12240
12318
|
const clusterBestPricesRest = clusterMidpointResult.bestPrices;
|
|
12241
12319
|
const clusterBestPrices = (0, import_react17.useMemo)(
|
|
12242
|
-
() => (0,
|
|
12320
|
+
() => (0, import_hooks41.mergeBestPricesPreferringLive)(clusterBestPricesRest, wsBestPrices),
|
|
12243
12321
|
[clusterBestPricesRest, wsBestPrices]
|
|
12244
12322
|
);
|
|
12245
12323
|
const [internalTab, setInternalTab] = (0, import_react17.useState)("buy");
|
|
@@ -12333,7 +12411,7 @@ var PlaceOrder = ({
|
|
|
12333
12411
|
scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id,
|
|
12334
12412
|
scopedSelectedOutcomeId
|
|
12335
12413
|
]);
|
|
12336
|
-
const debouncedAmount = (0,
|
|
12414
|
+
const debouncedAmount = (0, import_hooks41.useDebouncedValue)(internalAmount, 300);
|
|
12337
12415
|
const isQuoteInputEditing = internalAmount !== debouncedAmount;
|
|
12338
12416
|
const isLimitOrder = showLimitOrders && executionType === "limit";
|
|
12339
12417
|
const isSell = (0, import_react17.useMemo)(() => internalTab === "sell", [internalTab]);
|
|
@@ -12351,7 +12429,7 @@ var PlaceOrder = ({
|
|
|
12351
12429
|
);
|
|
12352
12430
|
const visibleLimitVenueOptions = (0, import_react17.useMemo)(() => {
|
|
12353
12431
|
return limitVenueOptions.filter((option) => {
|
|
12354
|
-
return (0,
|
|
12432
|
+
return (0, import_hooks41.getVenueAvailabilityState)({
|
|
12355
12433
|
venueId: option.venue,
|
|
12356
12434
|
disabledVenues,
|
|
12357
12435
|
isConfigLoading: isAppConfigLoading
|
|
@@ -12363,7 +12441,7 @@ var PlaceOrder = ({
|
|
|
12363
12441
|
dataUpdatedAt: executionPositionsUpdatedAt,
|
|
12364
12442
|
isLoading: isExecutionPositionsLoading,
|
|
12365
12443
|
isFetching: isExecutionPositionsFetching
|
|
12366
|
-
} = (0,
|
|
12444
|
+
} = (0, import_hooks41.useExecutionPositions)({
|
|
12367
12445
|
enabled: Boolean(isAuthenticated && isSell),
|
|
12368
12446
|
mode: isPaperMode ? "paper" : void 0
|
|
12369
12447
|
});
|
|
@@ -12397,7 +12475,7 @@ var PlaceOrder = ({
|
|
|
12397
12475
|
);
|
|
12398
12476
|
const hasValidLimitVenueQuoteAmount = debouncedAmount > 0;
|
|
12399
12477
|
const isLimitVenueQuoteEnabled = isLimitOrder && isQuotePanelActive && !isEndedWithoutKnownWinner && !submissionProgressState && !isBeforeActionPending && !placeLimitOrder.isPending && hasValidLimitVenueQuoteAmount && orderEligibility.canPlaceOrder && (!isSell || sellFilledForOutcomeId === scopedSelectedOutcomeId && !isQuoteInputEditing);
|
|
12400
|
-
const limitVenueQuotes = (0,
|
|
12478
|
+
const limitVenueQuotes = (0, import_hooks41.useLimitOrderVenueQuotes)({
|
|
12401
12479
|
requests: limitVenueQuoteRequests,
|
|
12402
12480
|
tradeSide: internalTab,
|
|
12403
12481
|
amount: debouncedAmount,
|
|
@@ -12431,7 +12509,7 @@ var PlaceOrder = ({
|
|
|
12431
12509
|
// server's reservation check — and the automatic pick, which sorts on
|
|
12432
12510
|
// price alone, would happily choose one. Only narrow once we know
|
|
12433
12511
|
// where the shares are; an empty map means positions haven't resolved.
|
|
12434
|
-
(!isSell || sellableSharesByVenue.size === 0 || ((_a2 = sellableSharesByVenue.get(option.venue)) != null ? _a2 : 0) > 0) && (0,
|
|
12512
|
+
(!isSell || sellableSharesByVenue.size === 0 || ((_a2 = sellableSharesByVenue.get(option.venue)) != null ? _a2 : 0) > 0) && (0, import_hooks41.getVenueAvailabilityState)({
|
|
12435
12513
|
venueId: option.venue,
|
|
12436
12514
|
disabledVenues,
|
|
12437
12515
|
isConfigLoading: isAppConfigLoading
|
|
@@ -12462,7 +12540,7 @@ var PlaceOrder = ({
|
|
|
12462
12540
|
if (!selectedLimitVenue || !geoBlockedLimitVenues.has(selectedLimitVenue)) return;
|
|
12463
12541
|
setSelectedLimitVenue(null);
|
|
12464
12542
|
}, [geoBlockedLimitVenues, selectedLimitVenue]);
|
|
12465
|
-
const smartRoute = (0,
|
|
12543
|
+
const smartRoute = (0, import_hooks41.useSmartRoute)(__spreadProps(__spreadValues({
|
|
12466
12544
|
venueMarketOutcomeId: scopedSelectedOutcomeId,
|
|
12467
12545
|
maxSpend: isSell ? void 0 : debouncedAmount,
|
|
12468
12546
|
sellShares: isSell ? debouncedAmount : void 0,
|
|
@@ -12535,7 +12613,7 @@ var PlaceOrder = ({
|
|
|
12535
12613
|
},
|
|
12536
12614
|
[debouncedAmount, isSell, scopedSelectedOutcomeId, smartRoute.data, smartRoute.isLoading]
|
|
12537
12615
|
);
|
|
12538
|
-
const venueSellQuotes = (0,
|
|
12616
|
+
const venueSellQuotes = (0, import_hooks41.useVenueSellQuotes)({
|
|
12539
12617
|
venueMarketOutcomeId: scopedSelectedOutcomeId,
|
|
12540
12618
|
accountId: (_n = user == null ? void 0 : user.id) != null ? _n : null,
|
|
12541
12619
|
positionVersion: executionPositionsUpdatedAt,
|
|
@@ -12760,7 +12838,7 @@ var PlaceOrder = ({
|
|
|
12760
12838
|
);
|
|
12761
12839
|
const isKalshiAccountActive = (_F = kalshiKeyStatus == null ? void 0 : kalshiKeyStatus.connected) != null ? _F : (legacyKalshiAccount == null ? void 0 : legacyKalshiAccount.status) === "active";
|
|
12762
12840
|
const hasKalshiConnectionState = kalshiKeyStatus !== void 0 || (user == null ? void 0 : user.venueAccounts) != null;
|
|
12763
|
-
const isKalshiAvailable = (0,
|
|
12841
|
+
const isKalshiAvailable = (0, import_hooks41.getVenueAvailabilityState)({
|
|
12764
12842
|
venueId: "kalshi",
|
|
12765
12843
|
disabledVenues,
|
|
12766
12844
|
isConfigLoading: isAppConfigLoading
|
|
@@ -12815,7 +12893,7 @@ var PlaceOrder = ({
|
|
|
12815
12893
|
scopedSelectedOutcomeId
|
|
12816
12894
|
]
|
|
12817
12895
|
);
|
|
12818
|
-
const executionProgress = (0,
|
|
12896
|
+
const executionProgress = (0, import_hooks41.useExecutionProgress)({
|
|
12819
12897
|
orderIds: (_G = submissionProgressState == null ? void 0 : submissionProgressState.orderIds) != null ? _G : null,
|
|
12820
12898
|
quoteId: (_H = submissionProgressState == null ? void 0 : submissionProgressState.quoteId) != null ? _H : null,
|
|
12821
12899
|
mode: isPaperMode ? "paper" : void 0,
|
|
@@ -13107,13 +13185,13 @@ var PlaceOrder = ({
|
|
|
13107
13185
|
setSubmissionProgressState((prev) => {
|
|
13108
13186
|
if (!prev || prev.phase === "success" || prev.phase === "failed") return prev;
|
|
13109
13187
|
return __spreadProps(__spreadValues({}, prev), {
|
|
13110
|
-
phase: "
|
|
13111
|
-
errorMessage:
|
|
13188
|
+
phase: "executing",
|
|
13189
|
+
errorMessage: tradingLabels.orderStillSettling
|
|
13112
13190
|
});
|
|
13113
13191
|
});
|
|
13114
13192
|
}, timeoutMs);
|
|
13115
13193
|
return () => clearTimeout(id);
|
|
13116
|
-
}, [submissionProgressState == null ? void 0 : submissionProgressState.phase, estDurationMs]);
|
|
13194
|
+
}, [submissionProgressState == null ? void 0 : submissionProgressState.phase, estDurationMs, tradingLabels.orderStillSettling]);
|
|
13117
13195
|
const emitTerminalOrderNotifications = (0, import_react17.useCallback)(() => {
|
|
13118
13196
|
const toast = toastCtx == null ? void 0 : toastCtx.toast;
|
|
13119
13197
|
if (!toast) return;
|
|
@@ -13163,8 +13241,8 @@ var PlaceOrder = ({
|
|
|
13163
13241
|
}
|
|
13164
13242
|
if (submissionProgressState.phase === "success" && submissionProgressState.summary) {
|
|
13165
13243
|
emitTerminalOrderNotifications();
|
|
13166
|
-
(0,
|
|
13167
|
-
(0,
|
|
13244
|
+
(0, import_hooks41.invalidateBalanceQueries)(queryClient);
|
|
13245
|
+
(0, import_hooks41.invalidatePositionQueries)(queryClient);
|
|
13168
13246
|
if (debugStore && debugAttemptId) {
|
|
13169
13247
|
debugStore.updateAttempt(debugAttemptId, {
|
|
13170
13248
|
status: "succeeded",
|
|
@@ -13224,11 +13302,13 @@ var PlaceOrder = ({
|
|
|
13224
13302
|
amount: internalAmount,
|
|
13225
13303
|
labels: tradingLabels,
|
|
13226
13304
|
quoteData: activeQuoteData,
|
|
13227
|
-
selectedMarket: scopedSelectedMarket
|
|
13305
|
+
selectedMarket: scopedSelectedMarket,
|
|
13306
|
+
tradeSide: isSell ? "sell" : "buy"
|
|
13228
13307
|
});
|
|
13229
13308
|
}, [
|
|
13230
13309
|
activeQuoteData,
|
|
13231
13310
|
internalAmount,
|
|
13311
|
+
isSell,
|
|
13232
13312
|
orderEligibility.canPlaceOrder,
|
|
13233
13313
|
scopedSelectedMarket,
|
|
13234
13314
|
tradingLabels
|
|
@@ -13466,7 +13546,7 @@ var PlaceOrder = ({
|
|
|
13466
13546
|
limitPriceRaw: effectiveLimitPriceRaw,
|
|
13467
13547
|
side: internalTab
|
|
13468
13548
|
});
|
|
13469
|
-
const availabilityState = (0,
|
|
13549
|
+
const availabilityState = (0, import_hooks41.getVenueAvailabilityState)({
|
|
13470
13550
|
venueId: option.venue,
|
|
13471
13551
|
disabledVenues,
|
|
13472
13552
|
isConfigLoading: isAppConfigLoading
|
|
@@ -13536,6 +13616,7 @@ var PlaceOrder = ({
|
|
|
13536
13616
|
return formatUsd(totalFees, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
13537
13617
|
}, [activeFeeBreakdown]);
|
|
13538
13618
|
const feeBreakdownRows = (0, import_react17.useMemo)(() => {
|
|
13619
|
+
var _a2, _b2;
|
|
13539
13620
|
if (!activeFeeBreakdown) return [];
|
|
13540
13621
|
return [
|
|
13541
13622
|
{
|
|
@@ -13546,6 +13627,18 @@ var PlaceOrder = ({
|
|
|
13546
13627
|
maximumFractionDigits: 2
|
|
13547
13628
|
})
|
|
13548
13629
|
},
|
|
13630
|
+
// Only Hyperliquid charges a builder slice today; every other route
|
|
13631
|
+
// would show a bare "$0.00" line.
|
|
13632
|
+
...((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0) > 0 ? [
|
|
13633
|
+
{
|
|
13634
|
+
kind: "amount",
|
|
13635
|
+
label: tradingLabels.feeBreakdownBuilderFee,
|
|
13636
|
+
value: formatUsd((_b2 = activeFeeBreakdown.builderFee) != null ? _b2 : 0, {
|
|
13637
|
+
minimumFractionDigits: 2,
|
|
13638
|
+
maximumFractionDigits: 2
|
|
13639
|
+
})
|
|
13640
|
+
}
|
|
13641
|
+
] : [],
|
|
13549
13642
|
{
|
|
13550
13643
|
kind: "amount",
|
|
13551
13644
|
label: tradingLabels.feeBreakdownExecutionGas,
|
|
@@ -14004,7 +14097,7 @@ var PlaceOrder = ({
|
|
|
14004
14097
|
]);
|
|
14005
14098
|
const resolvedStatusClassName = cn(classNames == null ? void 0 : classNames.root, className);
|
|
14006
14099
|
if (isLoading) {
|
|
14007
|
-
return /* @__PURE__ */ (0,
|
|
14100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14008
14101
|
Skeleton,
|
|
14009
14102
|
{
|
|
14010
14103
|
ariaLabel: labels.common.loading,
|
|
@@ -14015,7 +14108,7 @@ var PlaceOrder = ({
|
|
|
14015
14108
|
}
|
|
14016
14109
|
if (submissionProgressState) {
|
|
14017
14110
|
if (submissionProgressState.phase === "success" && submissionProgressState.summary) {
|
|
14018
|
-
return /* @__PURE__ */ (0,
|
|
14111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14019
14112
|
PlaceOrderSuccessView,
|
|
14020
14113
|
{
|
|
14021
14114
|
className: resolvedStatusClassName,
|
|
@@ -14027,7 +14120,7 @@ var PlaceOrder = ({
|
|
|
14027
14120
|
);
|
|
14028
14121
|
}
|
|
14029
14122
|
if (submissionProgressState.phase === "failed") {
|
|
14030
|
-
return /* @__PURE__ */ (0,
|
|
14123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14031
14124
|
PlaceOrderFailureView,
|
|
14032
14125
|
{
|
|
14033
14126
|
className: resolvedStatusClassName,
|
|
@@ -14040,7 +14133,7 @@ var PlaceOrder = ({
|
|
|
14040
14133
|
}
|
|
14041
14134
|
);
|
|
14042
14135
|
}
|
|
14043
|
-
return /* @__PURE__ */ (0,
|
|
14136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14044
14137
|
PlaceOrderExecutionView,
|
|
14045
14138
|
{
|
|
14046
14139
|
className,
|
|
@@ -14051,7 +14144,8 @@ var PlaceOrder = ({
|
|
|
14051
14144
|
eventTitle: headerTitle,
|
|
14052
14145
|
groups: executionOrderGroups,
|
|
14053
14146
|
labels: tradingLabels,
|
|
14054
|
-
progress: executionProgressPercent
|
|
14147
|
+
progress: executionProgressPercent,
|
|
14148
|
+
settlementHint: submissionProgressState.phase === "executing" ? submissionProgressState.errorMessage : void 0
|
|
14055
14149
|
}
|
|
14056
14150
|
);
|
|
14057
14151
|
}
|
|
@@ -14258,7 +14352,7 @@ var PlaceOrder = ({
|
|
|
14258
14352
|
}
|
|
14259
14353
|
});
|
|
14260
14354
|
if (isEndedWithoutKnownWinner || !orderEligibility.canPlaceOrder && resolvedReadOnlyTradingState.kind !== "open") {
|
|
14261
|
-
return /* @__PURE__ */ (0,
|
|
14355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14262
14356
|
PlaceOrderResolvedView,
|
|
14263
14357
|
{
|
|
14264
14358
|
tradingState: resolvedReadOnlyTradingState,
|
|
@@ -14271,8 +14365,8 @@ var PlaceOrder = ({
|
|
|
14271
14365
|
}
|
|
14272
14366
|
);
|
|
14273
14367
|
}
|
|
14274
|
-
return /* @__PURE__ */ (0,
|
|
14275
|
-
/* @__PURE__ */ (0,
|
|
14368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_react17.Fragment, { children: [
|
|
14369
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14276
14370
|
Card,
|
|
14277
14371
|
{
|
|
14278
14372
|
className: cn(
|
|
@@ -14289,20 +14383,20 @@ var PlaceOrder = ({
|
|
|
14289
14383
|
headerTitle,
|
|
14290
14384
|
onClose
|
|
14291
14385
|
}),
|
|
14292
|
-
/* @__PURE__ */ (0,
|
|
14293
|
-
/* @__PURE__ */ (0,
|
|
14386
|
+
/* @__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: [
|
|
14387
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14294
14388
|
"div",
|
|
14295
14389
|
{
|
|
14296
14390
|
className: "agg-order-tabs flex items-end border-b border-agg-separator",
|
|
14297
14391
|
role: "tablist",
|
|
14298
14392
|
"aria-label": labels.common.tabsAria,
|
|
14299
14393
|
children: [
|
|
14300
|
-
/* @__PURE__ */ (0,
|
|
14394
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "flex min-w-0 flex-1 items-end", children: [
|
|
14301
14395
|
{ value: "buy", label: tradingLabels.buy, ref: buyTabRef },
|
|
14302
14396
|
{ value: "sell", label: tradingLabels.sell, ref: sellTabRef }
|
|
14303
14397
|
].map((tabItem) => {
|
|
14304
14398
|
const isActive = internalTab === tabItem.value;
|
|
14305
|
-
return /* @__PURE__ */ (0,
|
|
14399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14306
14400
|
"button",
|
|
14307
14401
|
{
|
|
14308
14402
|
ref: tabItem.ref,
|
|
@@ -14326,7 +14420,7 @@ var PlaceOrder = ({
|
|
|
14326
14420
|
onKeyDown: (event) => handleTabKeyDown(event, tabItem.value),
|
|
14327
14421
|
children: [
|
|
14328
14422
|
tabItem.label,
|
|
14329
|
-
/* @__PURE__ */ (0,
|
|
14423
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14330
14424
|
"span",
|
|
14331
14425
|
{
|
|
14332
14426
|
"aria-hidden": "true",
|
|
@@ -14346,7 +14440,7 @@ var PlaceOrder = ({
|
|
|
14346
14440
|
tabItem.value
|
|
14347
14441
|
);
|
|
14348
14442
|
}) }),
|
|
14349
|
-
showLimitOrders ? /* @__PURE__ */ (0,
|
|
14443
|
+
showLimitOrders ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14350
14444
|
Select,
|
|
14351
14445
|
{
|
|
14352
14446
|
ariaLabel: tradingLabels.orderTypeAria,
|
|
@@ -14367,8 +14461,8 @@ var PlaceOrder = ({
|
|
|
14367
14461
|
]
|
|
14368
14462
|
}
|
|
14369
14463
|
),
|
|
14370
|
-
/* @__PURE__ */ (0,
|
|
14371
|
-
outcomes.length >= 2 ? /* @__PURE__ */ (0,
|
|
14464
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-entry-section flex flex-col gap-4", children: [
|
|
14465
|
+
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) => {
|
|
14372
14466
|
var _a2, _b2, _c2;
|
|
14373
14467
|
const price = getDisplayOutcomePrice({
|
|
14374
14468
|
outcomeId: outcome.id,
|
|
@@ -14382,7 +14476,7 @@ var PlaceOrder = ({
|
|
|
14382
14476
|
const isActive = outcome.id === scopedSelectedOutcomeId;
|
|
14383
14477
|
const isPositive = resolveIsPositiveOutcome(outcome, index);
|
|
14384
14478
|
const isPriceLoading = clusterMidpointResult.isLoading && price == null;
|
|
14385
|
-
return /* @__PURE__ */ (0,
|
|
14479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14386
14480
|
"button",
|
|
14387
14481
|
{
|
|
14388
14482
|
"data-id": outcome.id,
|
|
@@ -14402,7 +14496,7 @@ var PlaceOrder = ({
|
|
|
14402
14496
|
disabled: !orderEligibility.canPlaceOrder || isResolvedOutcomeCtaLocked,
|
|
14403
14497
|
onClick: () => handleOutcomeChange(outcome.id),
|
|
14404
14498
|
children: [
|
|
14405
|
-
/* @__PURE__ */ (0,
|
|
14499
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14406
14500
|
Typography,
|
|
14407
14501
|
{
|
|
14408
14502
|
as: "span",
|
|
@@ -14411,7 +14505,7 @@ var PlaceOrder = ({
|
|
|
14411
14505
|
children: (_c2 = outcome.title) != null ? _c2 : outcome.label
|
|
14412
14506
|
}
|
|
14413
14507
|
),
|
|
14414
|
-
isPriceLoading ? /* @__PURE__ */ (0,
|
|
14508
|
+
isPriceLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14415
14509
|
"span",
|
|
14416
14510
|
{
|
|
14417
14511
|
"aria-hidden": "true",
|
|
@@ -14420,18 +14514,18 @@ var PlaceOrder = ({
|
|
|
14420
14514
|
"h-4 w-10 shrink-0 rounded-agg-sm bg-agg-separator animate-pulse"
|
|
14421
14515
|
)
|
|
14422
14516
|
}
|
|
14423
|
-
) : /* @__PURE__ */ (0,
|
|
14517
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { as: "span", variant: isActive ? "body-strong" : "body", children: formatProbabilityCents(price, formatPrice) })
|
|
14424
14518
|
]
|
|
14425
14519
|
},
|
|
14426
14520
|
outcome.id
|
|
14427
14521
|
);
|
|
14428
14522
|
}) }) : null,
|
|
14429
|
-
isLimitOrder ? /* @__PURE__ */ (0,
|
|
14430
|
-
/* @__PURE__ */ (0,
|
|
14431
|
-
/* @__PURE__ */ (0,
|
|
14432
|
-
/* @__PURE__ */ (0,
|
|
14433
|
-
/* @__PURE__ */ (0,
|
|
14434
|
-
/* @__PURE__ */ (0,
|
|
14523
|
+
isLimitOrder ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-limit-price-section flex items-center justify-between gap-4", children: [
|
|
14524
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.limitPrice }),
|
|
14525
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex min-w-0 flex-col items-end gap-1", children: [
|
|
14526
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
14527
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("label", { className: "relative flex items-center", children: [
|
|
14528
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14435
14529
|
"input",
|
|
14436
14530
|
{
|
|
14437
14531
|
type: "text",
|
|
@@ -14448,40 +14542,40 @@ var PlaceOrder = ({
|
|
|
14448
14542
|
)
|
|
14449
14543
|
}
|
|
14450
14544
|
),
|
|
14451
|
-
/* @__PURE__ */ (0,
|
|
14545
|
+
/* @__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" })
|
|
14452
14546
|
] }),
|
|
14453
|
-
/* @__PURE__ */ (0,
|
|
14547
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14454
14548
|
"button",
|
|
14455
14549
|
{
|
|
14456
14550
|
type: "button",
|
|
14457
14551
|
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",
|
|
14458
14552
|
"aria-label": tradingLabels.limitPriceDecreaseAria,
|
|
14459
14553
|
onClick: () => handleLimitPriceStep("decrease"),
|
|
14460
|
-
children: /* @__PURE__ */ (0,
|
|
14554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon, { name: "minus", size: "small", className: "h-4 w-4", "aria-hidden": true })
|
|
14461
14555
|
}
|
|
14462
14556
|
),
|
|
14463
|
-
/* @__PURE__ */ (0,
|
|
14557
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14464
14558
|
"button",
|
|
14465
14559
|
{
|
|
14466
14560
|
type: "button",
|
|
14467
14561
|
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",
|
|
14468
14562
|
"aria-label": tradingLabels.limitPriceIncreaseAria,
|
|
14469
14563
|
onClick: () => handleLimitPriceStep("increase"),
|
|
14470
|
-
children: /* @__PURE__ */ (0,
|
|
14564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon, { name: "plus", size: "small", className: "h-4 w-4", "aria-hidden": true })
|
|
14471
14565
|
}
|
|
14472
14566
|
)
|
|
14473
14567
|
] }),
|
|
14474
|
-
limitPriceInputError ? /* @__PURE__ */ (0,
|
|
14568
|
+
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
|
|
14475
14569
|
] })
|
|
14476
14570
|
] }) : null,
|
|
14477
|
-
isLimitOrder && limitPriceAdjustmentMessage ? /* @__PURE__ */ (0,
|
|
14571
|
+
isLimitOrder && limitPriceAdjustmentMessage ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14478
14572
|
"div",
|
|
14479
14573
|
{
|
|
14480
14574
|
className: "agg-limit-price-adjustment flex w-full items-center gap-2 rounded-agg-lg bg-agg-warning/10 px-3 py-2",
|
|
14481
14575
|
role: "status",
|
|
14482
14576
|
"aria-live": "polite",
|
|
14483
14577
|
children: [
|
|
14484
|
-
/* @__PURE__ */ (0,
|
|
14578
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14485
14579
|
Icon,
|
|
14486
14580
|
{
|
|
14487
14581
|
name: "warning-filled",
|
|
@@ -14490,16 +14584,16 @@ var PlaceOrder = ({
|
|
|
14490
14584
|
"aria-hidden": "true"
|
|
14491
14585
|
}
|
|
14492
14586
|
),
|
|
14493
|
-
/* @__PURE__ */ (0,
|
|
14587
|
+
/* @__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 })
|
|
14494
14588
|
]
|
|
14495
14589
|
}
|
|
14496
14590
|
) : null,
|
|
14497
|
-
/* @__PURE__ */ (0,
|
|
14498
|
-
/* @__PURE__ */ (0,
|
|
14499
|
-
/* @__PURE__ */ (0,
|
|
14500
|
-
isAuthenticated ? isSell ? /* @__PURE__ */ (0,
|
|
14501
|
-
/* @__PURE__ */ (0,
|
|
14502
|
-
displayedCurrentSellableShares > 0 ? /* @__PURE__ */ (0,
|
|
14591
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-amount-section flex items-start justify-between gap-4", children: [
|
|
14592
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-amount-meta flex flex-col", children: [
|
|
14593
|
+
/* @__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) }),
|
|
14594
|
+
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: [
|
|
14595
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "whitespace-pre", children: displayedCurrentSellableSharesLabel }),
|
|
14596
|
+
displayedCurrentSellableShares > 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14503
14597
|
"button",
|
|
14504
14598
|
{
|
|
14505
14599
|
type: "button",
|
|
@@ -14515,9 +14609,9 @@ var PlaceOrder = ({
|
|
|
14515
14609
|
children: tradingLabels.maxShares
|
|
14516
14610
|
}
|
|
14517
14611
|
) : null
|
|
14518
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
14612
|
+
] }) }) : /* @__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
|
|
14519
14613
|
] }),
|
|
14520
|
-
/* @__PURE__ */ (0,
|
|
14614
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14521
14615
|
CurrencyInput,
|
|
14522
14616
|
{
|
|
14523
14617
|
value: internalAmount,
|
|
@@ -14539,9 +14633,9 @@ var PlaceOrder = ({
|
|
|
14539
14633
|
}
|
|
14540
14634
|
)
|
|
14541
14635
|
] }),
|
|
14542
|
-
showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && estimatedFeesValue ? /* @__PURE__ */ (0,
|
|
14543
|
-
/* @__PURE__ */ (0,
|
|
14544
|
-
/* @__PURE__ */ (0,
|
|
14636
|
+
showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && estimatedFeesValue ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-fees-section flex items-center justify-between gap-4", children: [
|
|
14637
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
14638
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14545
14639
|
Typography,
|
|
14546
14640
|
{
|
|
14547
14641
|
variant: "text-sm",
|
|
@@ -14549,7 +14643,7 @@ var PlaceOrder = ({
|
|
|
14549
14643
|
children: tradingLabels.estimatedFees
|
|
14550
14644
|
}
|
|
14551
14645
|
),
|
|
14552
|
-
feeBreakdownRows.length > 0 ? /* @__PURE__ */ (0,
|
|
14646
|
+
feeBreakdownRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14553
14647
|
Tooltip,
|
|
14554
14648
|
{
|
|
14555
14649
|
"aria-label": tradingLabels.estimatedFeesTooltipAria,
|
|
@@ -14561,13 +14655,13 @@ var PlaceOrder = ({
|
|
|
14561
14655
|
icon: "h-3 w-3 text-agg-muted-foreground",
|
|
14562
14656
|
trigger: "h-3 w-3 text-agg-muted-foreground"
|
|
14563
14657
|
},
|
|
14564
|
-
content: /* @__PURE__ */ (0,
|
|
14658
|
+
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)(
|
|
14565
14659
|
"div",
|
|
14566
14660
|
{
|
|
14567
14661
|
className: "flex items-center justify-between gap-3 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground",
|
|
14568
14662
|
children: [
|
|
14569
|
-
/* @__PURE__ */ (0,
|
|
14570
|
-
row.kind === "badge" ? /* @__PURE__ */ (0,
|
|
14663
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: row.label }),
|
|
14664
|
+
row.kind === "badge" ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14571
14665
|
"span",
|
|
14572
14666
|
{
|
|
14573
14667
|
className: cn(
|
|
@@ -14577,7 +14671,7 @@ var PlaceOrder = ({
|
|
|
14577
14671
|
),
|
|
14578
14672
|
children: row.badgeLabel
|
|
14579
14673
|
}
|
|
14580
|
-
) : /* @__PURE__ */ (0,
|
|
14674
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "text-right", children: row.value })
|
|
14581
14675
|
]
|
|
14582
14676
|
},
|
|
14583
14677
|
row.label
|
|
@@ -14585,11 +14679,11 @@ var PlaceOrder = ({
|
|
|
14585
14679
|
}
|
|
14586
14680
|
) : null
|
|
14587
14681
|
] }),
|
|
14588
|
-
/* @__PURE__ */ (0,
|
|
14682
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: estimatedFeesValue })
|
|
14589
14683
|
] }) : null,
|
|
14590
|
-
showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && executionReserveValue ? /* @__PURE__ */ (0,
|
|
14591
|
-
/* @__PURE__ */ (0,
|
|
14592
|
-
/* @__PURE__ */ (0,
|
|
14684
|
+
showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && executionReserveValue ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-reserve-section flex items-center justify-between gap-4", children: [
|
|
14685
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
14686
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14593
14687
|
Typography,
|
|
14594
14688
|
{
|
|
14595
14689
|
variant: "text-sm",
|
|
@@ -14597,7 +14691,7 @@ var PlaceOrder = ({
|
|
|
14597
14691
|
children: tradingLabels.executionReserve
|
|
14598
14692
|
}
|
|
14599
14693
|
),
|
|
14600
|
-
/* @__PURE__ */ (0,
|
|
14694
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14601
14695
|
Tooltip,
|
|
14602
14696
|
{
|
|
14603
14697
|
"aria-label": tradingLabels.executionReserveTooltipAria,
|
|
@@ -14610,18 +14704,18 @@ var PlaceOrder = ({
|
|
|
14610
14704
|
}
|
|
14611
14705
|
)
|
|
14612
14706
|
] }),
|
|
14613
|
-
/* @__PURE__ */ (0,
|
|
14707
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: executionReserveValue })
|
|
14614
14708
|
] }) : null
|
|
14615
14709
|
] }),
|
|
14616
|
-
shouldShowSmartRouting ? /* @__PURE__ */ (0,
|
|
14710
|
+
shouldShowSmartRouting ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14617
14711
|
"div",
|
|
14618
14712
|
{
|
|
14619
14713
|
className: "agg-route-panel flex flex-col gap-3",
|
|
14620
14714
|
"aria-busy": !isLimitOrder && isQuoteLoading,
|
|
14621
14715
|
children: [
|
|
14622
|
-
/* @__PURE__ */ (0,
|
|
14623
|
-
/* @__PURE__ */ (0,
|
|
14624
|
-
shouldShowRouteToggle && !isRoutesExpanded ? /* @__PURE__ */ (0,
|
|
14716
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-panel-header flex items-center justify-between gap-4", children: [
|
|
14717
|
+
/* @__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 }),
|
|
14718
|
+
shouldShowRouteToggle && !isRoutesExpanded ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14625
14719
|
"button",
|
|
14626
14720
|
{
|
|
14627
14721
|
type: "button",
|
|
@@ -14629,8 +14723,8 @@ var PlaceOrder = ({
|
|
|
14629
14723
|
"aria-label": tradingLabels.viewAllRoutes(activeRouteCardCount),
|
|
14630
14724
|
onClick: () => setIsRoutesExpanded((currentValue) => !currentValue),
|
|
14631
14725
|
children: [
|
|
14632
|
-
/* @__PURE__ */ (0,
|
|
14633
|
-
/* @__PURE__ */ (0,
|
|
14726
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.viewAllRoutes(activeRouteCardCount) }),
|
|
14727
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14634
14728
|
Icon,
|
|
14635
14729
|
{
|
|
14636
14730
|
name: "chevron-down",
|
|
@@ -14643,11 +14737,11 @@ var PlaceOrder = ({
|
|
|
14643
14737
|
}
|
|
14644
14738
|
) : null
|
|
14645
14739
|
] }),
|
|
14646
|
-
/* @__PURE__ */ (0,
|
|
14647
|
-
/* @__PURE__ */ (0,
|
|
14648
|
-
/* @__PURE__ */ (0,
|
|
14740
|
+
/* @__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: [
|
|
14741
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PlaceOrderRouteCardSkeleton, {}),
|
|
14742
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PlaceOrderRouteCardSkeleton, {})
|
|
14649
14743
|
] }) : activeRouteCards.length > 0 ? activeRouteCards.map((card) => {
|
|
14650
|
-
return /* @__PURE__ */ (0,
|
|
14744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react17.Fragment, { children: renderRouteCard({
|
|
14651
14745
|
card,
|
|
14652
14746
|
enableAnimations,
|
|
14653
14747
|
isExpanded: card.kind === "split" ? isSplitDetailOpen : isRoutesExpanded,
|
|
@@ -14660,15 +14754,15 @@ var PlaceOrder = ({
|
|
|
14660
14754
|
]
|
|
14661
14755
|
}
|
|
14662
14756
|
) : null,
|
|
14663
|
-
isLimitOrder ? /* @__PURE__ */ (0,
|
|
14664
|
-
/* @__PURE__ */ (0,
|
|
14665
|
-
/* @__PURE__ */ (0,
|
|
14757
|
+
isLimitOrder ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-limit-expiration-section flex items-center justify-between gap-4", children: [
|
|
14758
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.expiration }),
|
|
14759
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14666
14760
|
Popover.Root,
|
|
14667
14761
|
{
|
|
14668
14762
|
open: isLimitExpirationPickerOpen,
|
|
14669
14763
|
onOpenChange: handleLimitExpirationPickerOpenChange,
|
|
14670
14764
|
children: [
|
|
14671
|
-
/* @__PURE__ */ (0,
|
|
14765
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14672
14766
|
"button",
|
|
14673
14767
|
{
|
|
14674
14768
|
ref: expirationTriggerRef,
|
|
@@ -14676,10 +14770,10 @@ var PlaceOrder = ({
|
|
|
14676
14770
|
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",
|
|
14677
14771
|
"aria-label": tradingLabels.expirationMenuAria,
|
|
14678
14772
|
children: [
|
|
14679
|
-
/* @__PURE__ */ (0,
|
|
14773
|
+
/* @__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(
|
|
14680
14774
|
"MMM D, YYYY [at] HH:mm"
|
|
14681
14775
|
) : tradingLabels.expirationCustom }),
|
|
14682
|
-
/* @__PURE__ */ (0,
|
|
14776
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14683
14777
|
Icon,
|
|
14684
14778
|
{
|
|
14685
14779
|
name: isLimitExpirationPickerOpen ? "chevron-up" : "chevron-down",
|
|
@@ -14691,11 +14785,11 @@ var PlaceOrder = ({
|
|
|
14691
14785
|
]
|
|
14692
14786
|
}
|
|
14693
14787
|
) }),
|
|
14694
|
-
/* @__PURE__ */ (0,
|
|
14788
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14695
14789
|
Popover.Portal,
|
|
14696
14790
|
{
|
|
14697
14791
|
container: resolvePlaceOrderPortalContainer(expirationTriggerRef.current),
|
|
14698
|
-
children: /* @__PURE__ */ (0,
|
|
14792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14699
14793
|
Popover.Content,
|
|
14700
14794
|
{
|
|
14701
14795
|
align: "end",
|
|
@@ -14704,14 +14798,14 @@ var PlaceOrder = ({
|
|
|
14704
14798
|
role: "dialog",
|
|
14705
14799
|
"aria-label": tradingLabels.expirationMenuAria,
|
|
14706
14800
|
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)]",
|
|
14707
|
-
children: limitExpirationPickerView === "calendar" ? /* @__PURE__ */ (0,
|
|
14708
|
-
/* @__PURE__ */ (0,
|
|
14801
|
+
children: limitExpirationPickerView === "calendar" ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
|
|
14802
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14709
14803
|
Button,
|
|
14710
14804
|
{
|
|
14711
14805
|
variant: "tertiary",
|
|
14712
14806
|
size: "small",
|
|
14713
14807
|
className: "w-fit px-0",
|
|
14714
|
-
prefix: /* @__PURE__ */ (0,
|
|
14808
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14715
14809
|
Icon,
|
|
14716
14810
|
{
|
|
14717
14811
|
name: "chevron-left",
|
|
@@ -14724,7 +14818,7 @@ var PlaceOrder = ({
|
|
|
14724
14818
|
children: tradingLabels.expirationOptions
|
|
14725
14819
|
}
|
|
14726
14820
|
),
|
|
14727
|
-
/* @__PURE__ */ (0,
|
|
14821
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14728
14822
|
Calendar,
|
|
14729
14823
|
{
|
|
14730
14824
|
mode: "single",
|
|
@@ -14739,9 +14833,9 @@ var PlaceOrder = ({
|
|
|
14739
14833
|
}
|
|
14740
14834
|
}
|
|
14741
14835
|
),
|
|
14742
|
-
/* @__PURE__ */ (0,
|
|
14743
|
-
/* @__PURE__ */ (0,
|
|
14744
|
-
/* @__PURE__ */ (0,
|
|
14836
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
14837
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex shrink-0 flex-col gap-0.5", children: [
|
|
14838
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14745
14839
|
"label",
|
|
14746
14840
|
{
|
|
14747
14841
|
htmlFor: expirationTimeInputId,
|
|
@@ -14749,9 +14843,9 @@ var PlaceOrder = ({
|
|
|
14749
14843
|
children: tradingLabels.expirationStartTime
|
|
14750
14844
|
}
|
|
14751
14845
|
),
|
|
14752
|
-
/* @__PURE__ */ (0,
|
|
14846
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "text-agg-xs leading-agg-4 text-agg-foreground", children: tradingLabels.expirationStartTimeHint })
|
|
14753
14847
|
] }),
|
|
14754
|
-
/* @__PURE__ */ (0,
|
|
14848
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14755
14849
|
"input",
|
|
14756
14850
|
{
|
|
14757
14851
|
id: expirationTimeInputId,
|
|
@@ -14762,8 +14856,8 @@ var PlaceOrder = ({
|
|
|
14762
14856
|
}
|
|
14763
14857
|
)
|
|
14764
14858
|
] }),
|
|
14765
|
-
/* @__PURE__ */ (0,
|
|
14766
|
-
/* @__PURE__ */ (0,
|
|
14859
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex gap-2", children: [
|
|
14860
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14767
14861
|
Button,
|
|
14768
14862
|
{
|
|
14769
14863
|
variant: "secondary",
|
|
@@ -14773,13 +14867,13 @@ var PlaceOrder = ({
|
|
|
14773
14867
|
children: tradingLabels.expirationCancel
|
|
14774
14868
|
}
|
|
14775
14869
|
),
|
|
14776
|
-
/* @__PURE__ */ (0,
|
|
14870
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14777
14871
|
Button,
|
|
14778
14872
|
{
|
|
14779
14873
|
size: "small",
|
|
14780
14874
|
className: "min-w-0 flex-1",
|
|
14781
14875
|
disabled: !isLimitExpirationDraftValid,
|
|
14782
|
-
prefix: /* @__PURE__ */ (0,
|
|
14876
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14783
14877
|
Icon,
|
|
14784
14878
|
{
|
|
14785
14879
|
name: "success-check",
|
|
@@ -14793,7 +14887,7 @@ var PlaceOrder = ({
|
|
|
14793
14887
|
}
|
|
14794
14888
|
)
|
|
14795
14889
|
] })
|
|
14796
|
-
] }) : /* @__PURE__ */ (0,
|
|
14890
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14797
14891
|
"div",
|
|
14798
14892
|
{
|
|
14799
14893
|
role: "radiogroup",
|
|
@@ -14811,7 +14905,7 @@ var PlaceOrder = ({
|
|
|
14811
14905
|
{ value: "ONE_HOUR", label: tradingLabels.expirationOneHour },
|
|
14812
14906
|
{ value: "END_OF_DAY", label: tradingLabels.expirationEndOfDay },
|
|
14813
14907
|
{ value: "CUSTOM", label: tradingLabels.expirationCustom }
|
|
14814
|
-
].map((item, optionIndex) => /* @__PURE__ */ (0,
|
|
14908
|
+
].map((item, optionIndex) => /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14815
14909
|
"button",
|
|
14816
14910
|
{
|
|
14817
14911
|
ref: (element) => {
|
|
@@ -14828,14 +14922,14 @@ var PlaceOrder = ({
|
|
|
14828
14922
|
onClick: () => handleLimitExpirationTypeChange(item.value),
|
|
14829
14923
|
onKeyDown: (event) => handleLimitExpirationOptionKeyDown(event, optionIndex),
|
|
14830
14924
|
children: [
|
|
14831
|
-
limitExpirationType === item.value ? /* @__PURE__ */ (0,
|
|
14925
|
+
limitExpirationType === item.value ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14832
14926
|
"span",
|
|
14833
14927
|
{
|
|
14834
14928
|
className: "absolute bottom-2 left-0 top-2 w-1 bg-agg-primary",
|
|
14835
14929
|
"aria-hidden": true
|
|
14836
14930
|
}
|
|
14837
14931
|
) : null,
|
|
14838
|
-
/* @__PURE__ */ (0,
|
|
14932
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "truncate", children: item.label })
|
|
14839
14933
|
]
|
|
14840
14934
|
},
|
|
14841
14935
|
item.value
|
|
@@ -14850,12 +14944,12 @@ var PlaceOrder = ({
|
|
|
14850
14944
|
}
|
|
14851
14945
|
)
|
|
14852
14946
|
] }) : null,
|
|
14853
|
-
hasEnteredAmount && (isLimitOrder ? limitOrderPayload : selectedRouteCard) && !isQuoteLoading && !isBelowMinimum && orderEligibility.canPlaceOrder ? /* @__PURE__ */ (0,
|
|
14854
|
-
/* @__PURE__ */ (0,
|
|
14855
|
-
/* @__PURE__ */ (0,
|
|
14856
|
-
/* @__PURE__ */ (0,
|
|
14947
|
+
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: [
|
|
14948
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-summary-meta flex flex-col", children: [
|
|
14949
|
+
/* @__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) }),
|
|
14950
|
+
/* @__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 })
|
|
14857
14951
|
] }),
|
|
14858
|
-
/* @__PURE__ */ (0,
|
|
14952
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14859
14953
|
import_react16.default,
|
|
14860
14954
|
{
|
|
14861
14955
|
value: isLimitOrder ? displayedLimitToWinValue : displayedToWinValue,
|
|
@@ -14870,7 +14964,7 @@ var PlaceOrder = ({
|
|
|
14870
14964
|
}
|
|
14871
14965
|
)
|
|
14872
14966
|
] }) : null,
|
|
14873
|
-
/* @__PURE__ */ (0,
|
|
14967
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14874
14968
|
"div",
|
|
14875
14969
|
{
|
|
14876
14970
|
className: cn(
|
|
@@ -14878,17 +14972,17 @@ var PlaceOrder = ({
|
|
|
14878
14972
|
classNames == null ? void 0 : classNames.footer
|
|
14879
14973
|
),
|
|
14880
14974
|
children: [
|
|
14881
|
-
!shouldShowGeoBlockBanner ? /* @__PURE__ */ (0,
|
|
14882
|
-
submissionFeedback ? /* @__PURE__ */ (0,
|
|
14975
|
+
!shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-alerts flex flex-col gap-3 empty:hidden mb-3", children: [
|
|
14976
|
+
submissionFeedback ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14883
14977
|
InlineAlert,
|
|
14884
14978
|
{
|
|
14885
14979
|
tone: submissionFeedback.tone,
|
|
14886
14980
|
message: submissionFeedback.message
|
|
14887
14981
|
}
|
|
14888
14982
|
) : null,
|
|
14889
|
-
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && isBelowMinimum ? /* @__PURE__ */ (0,
|
|
14890
|
-
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && quoteStatus ? /* @__PURE__ */ (0,
|
|
14891
|
-
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && !quoteStatus && hasEnteredAmount && smartRouteErrorMessage ? /* @__PURE__ */ (0,
|
|
14983
|
+
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && isBelowMinimum ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(InlineAlert, { tone: "error", message: belowMinimumMessage }) : null,
|
|
14984
|
+
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && quoteStatus ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(InlineAlert, { tone: quoteStatus.tone, message: quoteStatus.message }) : null,
|
|
14985
|
+
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && !quoteStatus && hasEnteredAmount && smartRouteErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14892
14986
|
InlineAlert,
|
|
14893
14987
|
{
|
|
14894
14988
|
tone: "error",
|
|
@@ -14900,14 +14994,14 @@ var PlaceOrder = ({
|
|
|
14900
14994
|
}
|
|
14901
14995
|
) : null
|
|
14902
14996
|
] }) : null,
|
|
14903
|
-
!submissionFeedback && !shouldShowGeoBlockBanner && orderEligibility.canPlaceOrder && !needsSharedKycVerification && !needsKalshiConnection && shouldShowInsufficientBalanceAlert ? /* @__PURE__ */ (0,
|
|
14997
|
+
!submissionFeedback && !shouldShowGeoBlockBanner && orderEligibility.canPlaceOrder && !needsSharedKycVerification && !needsKalshiConnection && shouldShowInsufficientBalanceAlert ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14904
14998
|
"div",
|
|
14905
14999
|
{
|
|
14906
15000
|
className: "agg-order-insufficient-balance-alert flex items-center justify-center gap-2",
|
|
14907
15001
|
role: "status",
|
|
14908
15002
|
"aria-live": "polite",
|
|
14909
15003
|
children: [
|
|
14910
|
-
/* @__PURE__ */ (0,
|
|
15004
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14911
15005
|
Icon,
|
|
14912
15006
|
{
|
|
14913
15007
|
name: "warning-filled",
|
|
@@ -14916,8 +15010,8 @@ var PlaceOrder = ({
|
|
|
14916
15010
|
"aria-hidden": "true"
|
|
14917
15011
|
}
|
|
14918
15012
|
),
|
|
14919
|
-
/* @__PURE__ */ (0,
|
|
14920
|
-
insufficientBalanceDetails ? /* @__PURE__ */ (0,
|
|
15013
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "text-agg-sm text-agg-foreground", children: tradingLabels.insufficientBalance }),
|
|
15014
|
+
insufficientBalanceDetails ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14921
15015
|
Tooltip,
|
|
14922
15016
|
{
|
|
14923
15017
|
"aria-label": tradingLabels.insufficientBalanceDetails,
|
|
@@ -14933,7 +15027,7 @@ var PlaceOrder = ({
|
|
|
14933
15027
|
]
|
|
14934
15028
|
}
|
|
14935
15029
|
) : null,
|
|
14936
|
-
!submissionFeedback && !shouldShowGeoBlockBanner && needsSharedKycVerification ? /* @__PURE__ */ (0,
|
|
15030
|
+
!submissionFeedback && !shouldShowGeoBlockBanner && needsSharedKycVerification ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14937
15031
|
Button,
|
|
14938
15032
|
{
|
|
14939
15033
|
size: "large",
|
|
@@ -14947,7 +15041,7 @@ var PlaceOrder = ({
|
|
|
14947
15041
|
},
|
|
14948
15042
|
children: sharedKyc.status === "loading" ? tradingLabels.sharedKyc.checkingStatus : tradingLabels.sharedKyc.completeToTrade
|
|
14949
15043
|
}
|
|
14950
|
-
) : !submissionFeedback && !shouldShowGeoBlockBanner && needsKalshiConnection ? /* @__PURE__ */ (0,
|
|
15044
|
+
) : !submissionFeedback && !shouldShowGeoBlockBanner && needsKalshiConnection ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14951
15045
|
Button,
|
|
14952
15046
|
{
|
|
14953
15047
|
size: "large",
|
|
@@ -14957,7 +15051,7 @@ var PlaceOrder = ({
|
|
|
14957
15051
|
onClick: () => setIsConnectKalshiModalOpen(true),
|
|
14958
15052
|
children: tradingLabels.connectKalshi
|
|
14959
15053
|
}
|
|
14960
|
-
) : !submissionFeedback && !shouldShowGeoBlockBanner && isInsufficientBalance ? /* @__PURE__ */ (0,
|
|
15054
|
+
) : !submissionFeedback && !shouldShowGeoBlockBanner && isInsufficientBalance ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14961
15055
|
Button,
|
|
14962
15056
|
{
|
|
14963
15057
|
size: "large",
|
|
@@ -14967,7 +15061,7 @@ var PlaceOrder = ({
|
|
|
14967
15061
|
onClick: handleDepositRequiredClick,
|
|
14968
15062
|
children: isKalshiBalanceInsufficient ? tradingLabels.addFundsToKalshi : tradingLabels.deposit
|
|
14969
15063
|
}
|
|
14970
|
-
) : isQuoteLoading && !isActionLoading ? /* @__PURE__ */ (0,
|
|
15064
|
+
) : isQuoteLoading && !isActionLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14971
15065
|
Button,
|
|
14972
15066
|
{
|
|
14973
15067
|
size: "large",
|
|
@@ -14976,7 +15070,7 @@ var PlaceOrder = ({
|
|
|
14976
15070
|
disabled: true,
|
|
14977
15071
|
"aria-live": "polite",
|
|
14978
15072
|
"aria-label": routeLoadingMessage != null ? routeLoadingMessage : labels.common.loading,
|
|
14979
|
-
prefix: /* @__PURE__ */ (0,
|
|
15073
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14980
15074
|
"span",
|
|
14981
15075
|
{
|
|
14982
15076
|
className: cn(
|
|
@@ -14988,7 +15082,7 @@ var PlaceOrder = ({
|
|
|
14988
15082
|
),
|
|
14989
15083
|
children: routeLoadingMessage
|
|
14990
15084
|
}
|
|
14991
|
-
) : !isAuthenticated ? /* @__PURE__ */ (0,
|
|
15085
|
+
) : !isAuthenticated ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14992
15086
|
Button,
|
|
14993
15087
|
{
|
|
14994
15088
|
size: "large",
|
|
@@ -14996,10 +15090,10 @@ var PlaceOrder = ({
|
|
|
14996
15090
|
className: "agg-order-submit h-12 w-full px-8 text-agg-base leading-agg-6 shadow-none",
|
|
14997
15091
|
disabled: !orderEligibility.canPlaceOrder || shouldShowGeoBlockBanner,
|
|
14998
15092
|
"aria-label": tradingLabels.signInToTrade,
|
|
14999
|
-
onClick:
|
|
15093
|
+
onClick: import_hooks41.requestAggAuthChooserOpen,
|
|
15000
15094
|
children: tradingLabels.signInToTrade
|
|
15001
15095
|
}
|
|
15002
|
-
) : /* @__PURE__ */ (0,
|
|
15096
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15003
15097
|
Button,
|
|
15004
15098
|
{
|
|
15005
15099
|
size: "large",
|
|
@@ -15014,7 +15108,7 @@ var PlaceOrder = ({
|
|
|
15014
15108
|
children: actionLabel
|
|
15015
15109
|
}
|
|
15016
15110
|
),
|
|
15017
|
-
shouldShowLowLiquidityWarning ? /* @__PURE__ */ (0,
|
|
15111
|
+
shouldShowLowLiquidityWarning ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15018
15112
|
InlineAlert,
|
|
15019
15113
|
{
|
|
15020
15114
|
tone: "warning",
|
|
@@ -15023,8 +15117,8 @@ var PlaceOrder = ({
|
|
|
15023
15117
|
message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
|
|
15024
15118
|
}
|
|
15025
15119
|
) : null,
|
|
15026
|
-
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0,
|
|
15027
|
-
/* @__PURE__ */ (0,
|
|
15120
|
+
!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: [
|
|
15121
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15028
15122
|
Icon,
|
|
15029
15123
|
{
|
|
15030
15124
|
name: "shield-trust",
|
|
@@ -15033,10 +15127,10 @@ var PlaceOrder = ({
|
|
|
15033
15127
|
"aria-hidden": "true"
|
|
15034
15128
|
}
|
|
15035
15129
|
),
|
|
15036
|
-
/* @__PURE__ */ (0,
|
|
15130
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "text-xs-caps", className: "text-agg-primary", children: tradingLabels.platformFee })
|
|
15037
15131
|
] }) : null,
|
|
15038
|
-
shouldShowGeoBlockBanner ? /* @__PURE__ */ (0,
|
|
15039
|
-
!shouldShowGeoBlockBanner ? /* @__PURE__ */ (0,
|
|
15132
|
+
shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(GeoBlockBanner, { termsUrl: AGG_TERMS_OF_SERVICE_URL }) : null,
|
|
15133
|
+
!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
|
|
15040
15134
|
]
|
|
15041
15135
|
}
|
|
15042
15136
|
)
|
|
@@ -15044,7 +15138,7 @@ var PlaceOrder = ({
|
|
|
15044
15138
|
]
|
|
15045
15139
|
}
|
|
15046
15140
|
),
|
|
15047
|
-
/* @__PURE__ */ (0,
|
|
15141
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15048
15142
|
SharedKycModal,
|
|
15049
15143
|
{
|
|
15050
15144
|
open: sharedKycFlow.isModalOpen,
|
|
@@ -15058,7 +15152,7 @@ var PlaceOrder = ({
|
|
|
15058
15152
|
}
|
|
15059
15153
|
}
|
|
15060
15154
|
),
|
|
15061
|
-
/* @__PURE__ */ (0,
|
|
15155
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15062
15156
|
ConnectKalshiModal,
|
|
15063
15157
|
{
|
|
15064
15158
|
open: isConnectKalshiModalOpen,
|
|
@@ -15066,16 +15160,16 @@ var PlaceOrder = ({
|
|
|
15066
15160
|
onVerify: handleVerifyKalshi
|
|
15067
15161
|
}
|
|
15068
15162
|
),
|
|
15069
|
-
/* @__PURE__ */ (0,
|
|
15163
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(FundKalshiModal, { open: isFundKalshiModalOpen, onOpenChange: setIsFundKalshiModalOpen })
|
|
15070
15164
|
] });
|
|
15071
15165
|
};
|
|
15072
15166
|
PlaceOrder.displayName = "PlaceOrder";
|
|
15073
15167
|
|
|
15074
15168
|
// src/trading/trading-context/index.tsx
|
|
15075
|
-
var
|
|
15169
|
+
var import_hooks42 = require("@agg-build/hooks");
|
|
15076
15170
|
|
|
15077
15171
|
// src/trading/use-claim-winnings.ts
|
|
15078
|
-
var
|
|
15172
|
+
var import_hooks43 = require("@agg-build/hooks");
|
|
15079
15173
|
var import_react18 = require("react");
|
|
15080
15174
|
var toClaimError = (err) => {
|
|
15081
15175
|
if (err instanceof Error) return err;
|
|
@@ -15083,11 +15177,11 @@ var toClaimError = (err) => {
|
|
|
15083
15177
|
};
|
|
15084
15178
|
function useClaimWinnings(options = {}) {
|
|
15085
15179
|
const { onClaim, onClaimResult, onClaimSubmitError, externalClaimingKeys } = options;
|
|
15086
|
-
const labels = (0,
|
|
15180
|
+
const labels = (0, import_hooks43.useLabels)();
|
|
15087
15181
|
const claimNotificationLabels = labels.notifications.claim;
|
|
15088
15182
|
const toastCtx = useOptionalToast();
|
|
15089
|
-
const queryClient = (0,
|
|
15090
|
-
const redeemMutation = (0,
|
|
15183
|
+
const queryClient = (0, import_hooks43.useQueryClient)();
|
|
15184
|
+
const redeemMutation = (0, import_hooks43.useRedeem)();
|
|
15091
15185
|
const [activeRedeems, setActiveRedeems] = (0, import_react18.useState)({});
|
|
15092
15186
|
const activeClaimKeysRef = (0, import_react18.useRef)(/* @__PURE__ */ new Set());
|
|
15093
15187
|
const pendingClaimToastIdsRef = (0, import_react18.useRef)({});
|
|
@@ -15097,7 +15191,7 @@ function useClaimWinnings(options = {}) {
|
|
|
15097
15191
|
() => Object.values(activeRedeems),
|
|
15098
15192
|
[activeRedeems]
|
|
15099
15193
|
);
|
|
15100
|
-
const lifecycleStates = (0,
|
|
15194
|
+
const lifecycleStates = (0, import_hooks43.useRedeemLifecycles)(lifecycleInputs);
|
|
15101
15195
|
const internalClaimingIds = (0, import_react18.useMemo)(() => {
|
|
15102
15196
|
const out = __spreadValues({}, submittingClaimKeys);
|
|
15103
15197
|
for (const [claimKey, active] of Object.entries(activeRedeems)) {
|
|
@@ -15112,13 +15206,13 @@ function useClaimWinnings(options = {}) {
|
|
|
15112
15206
|
[externalClaimingKeys, internalClaimingIds]
|
|
15113
15207
|
);
|
|
15114
15208
|
const invalidateClaimUiState = (0, import_react18.useCallback)(() => {
|
|
15115
|
-
(0,
|
|
15116
|
-
(0,
|
|
15209
|
+
(0, import_hooks43.invalidateBalanceQueries)(queryClient);
|
|
15210
|
+
(0, import_hooks43.invalidatePositionQueries)(queryClient);
|
|
15117
15211
|
queryClient.invalidateQueries({
|
|
15118
|
-
queryKey:
|
|
15212
|
+
queryKey: import_hooks43.executionKeys.claimablePositionsCount(),
|
|
15119
15213
|
refetchType: "active"
|
|
15120
15214
|
});
|
|
15121
|
-
(0,
|
|
15215
|
+
(0, import_hooks43.invalidateUserActivityQueries)(queryClient);
|
|
15122
15216
|
}, [queryClient]);
|
|
15123
15217
|
const claim = (0, import_react18.useCallback)(
|
|
15124
15218
|
(_0) => __async(null, [_0], function* ({ claimKey, winningOutcomeIds, payload }) {
|
|
@@ -15315,7 +15409,7 @@ function useClaimWinnings(options = {}) {
|
|
|
15315
15409
|
}
|
|
15316
15410
|
|
|
15317
15411
|
// src/trading/use-resolved-market-claim.ts
|
|
15318
|
-
var
|
|
15412
|
+
var import_hooks44 = require("@agg-build/hooks");
|
|
15319
15413
|
var import_react19 = require("react");
|
|
15320
15414
|
var sharesFormatter = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 });
|
|
15321
15415
|
var dateFormatter = new Intl.DateTimeFormat("en-US", {
|
|
@@ -15332,12 +15426,12 @@ var formatResolutionDate = (value) => {
|
|
|
15332
15426
|
function useResolvedMarketClaim(options = {}) {
|
|
15333
15427
|
var _a;
|
|
15334
15428
|
const { market, enabled = true, executionMode } = options;
|
|
15335
|
-
const { isAuthenticated } = (0,
|
|
15336
|
-
const tradingState = (0, import_react19.useMemo)(() => (0,
|
|
15429
|
+
const { isAuthenticated } = (0, import_hooks44.useAggAuthState)();
|
|
15430
|
+
const tradingState = (0, import_react19.useMemo)(() => (0, import_hooks44.resolveMarketTradingState)(market), [market]);
|
|
15337
15431
|
const isResolved = tradingState.kind === "resolved";
|
|
15338
15432
|
const marketId = (_a = market == null ? void 0 : market.id) != null ? _a : null;
|
|
15339
15433
|
const shouldFetch = Boolean(enabled && isAuthenticated && isResolved && marketId);
|
|
15340
|
-
const { positions } = (0,
|
|
15434
|
+
const { positions } = (0, import_hooks44.useExecutionPositions)(__spreadValues({
|
|
15341
15435
|
enabled: shouldFetch,
|
|
15342
15436
|
status: "active",
|
|
15343
15437
|
limit: 50
|
|
@@ -15354,7 +15448,7 @@ function useResolvedMarketClaim(options = {}) {
|
|
|
15354
15448
|
(outcome) => outcome.winner === true && outcome.totalSize > 0
|
|
15355
15449
|
);
|
|
15356
15450
|
if (winningOutcomes.length === 0) return void 0;
|
|
15357
|
-
const totals = (0,
|
|
15451
|
+
const totals = (0, import_hooks44.computeClosedPositionTotals)(group);
|
|
15358
15452
|
const winningShares = winningOutcomes.reduce((sum, outcome) => sum + outcome.totalSize, 0);
|
|
15359
15453
|
const winningOutcomeLabel = (_a2 = resolveResolvedOutcomeLabel({
|
|
15360
15454
|
market: market != null ? market : group.venueMarket,
|