@agg-build/ui 4.10.0 → 4.11.1
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-H5LCCV2J.mjs → chunk-EYJS45RP.mjs} +13 -1
- package/dist/{chunk-SMQRUNMZ.mjs → chunk-VMG6BUHI.mjs} +2 -2
- package/dist/{chunk-4HTE5IEZ.mjs → chunk-WWIVSROM.mjs} +30 -10
- package/dist/events.js +31 -19
- package/dist/events.mjs +1 -1
- package/dist/index.js +293 -261
- package/dist/index.mjs +3 -3
- package/dist/pages.js +315 -283
- package/dist/pages.mjs +3 -3
- package/dist/trading.js +30 -10
- package/dist/trading.mjs +1 -1
- 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/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -18874,7 +18874,7 @@ var MarketDetailsList = ({
|
|
|
18874
18874
|
MarketDetailsList.displayName = "MarketDetailsList";
|
|
18875
18875
|
|
|
18876
18876
|
// src/events/list/index.tsx
|
|
18877
|
-
var
|
|
18877
|
+
var import_hooks60 = require("@agg-build/hooks");
|
|
18878
18878
|
var import_sdk19 = require("@agg-build/sdk");
|
|
18879
18879
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
|
|
18880
18880
|
var import_react33 = require("react");
|
|
@@ -18997,11 +18997,12 @@ var CategorySidebar = ({
|
|
|
18997
18997
|
CategorySidebar.displayName = "CategorySidebar";
|
|
18998
18998
|
|
|
18999
18999
|
// src/events/list/event-list-tabs.tsx
|
|
19000
|
-
var
|
|
19000
|
+
var import_hooks59 = require("@agg-build/hooks");
|
|
19001
19001
|
var import_sdk18 = require("@agg-build/sdk");
|
|
19002
19002
|
var import_react32 = require("react");
|
|
19003
19003
|
|
|
19004
19004
|
// src/events/list/event-list.constants.ts
|
|
19005
|
+
var import_hooks58 = require("@agg-build/hooks");
|
|
19005
19006
|
var import_sdk17 = require("@agg-build/sdk");
|
|
19006
19007
|
var DEFAULT_EVENTS_LIMIT = 50;
|
|
19007
19008
|
var DEFAULT_EVENT_LIST_SORT = "volume24hr";
|
|
@@ -19012,7 +19013,7 @@ var EVENT_LIST_SORT_VALUES = [
|
|
|
19012
19013
|
"endDate"
|
|
19013
19014
|
];
|
|
19014
19015
|
var getDefaultEventListTabs = (labels) => {
|
|
19015
|
-
|
|
19016
|
+
const tabs = [
|
|
19016
19017
|
{
|
|
19017
19018
|
value: "matched",
|
|
19018
19019
|
label: labels.eventList.matchedTab,
|
|
@@ -19088,6 +19089,17 @@ var getDefaultEventListTabs = (labels) => {
|
|
|
19088
19089
|
isComingSoon: true
|
|
19089
19090
|
}
|
|
19090
19091
|
];
|
|
19092
|
+
const venueRank = new Map(
|
|
19093
|
+
(0, import_hooks58.sortVenues)(tabs.flatMap((tab) => tab.venueLogo ? [tab.venueLogo] : [])).map((venue, i) => [
|
|
19094
|
+
venue,
|
|
19095
|
+
i
|
|
19096
|
+
])
|
|
19097
|
+
);
|
|
19098
|
+
const rank = (tab) => {
|
|
19099
|
+
var _a;
|
|
19100
|
+
return tab.venueLogo ? 1 + ((_a = venueRank.get(tab.venueLogo)) != null ? _a : venueRank.size) : 0;
|
|
19101
|
+
};
|
|
19102
|
+
return [...tabs].sort((a, b) => rank(a) - rank(b));
|
|
19091
19103
|
};
|
|
19092
19104
|
|
|
19093
19105
|
// src/events/list/event-list-tabs.tsx
|
|
@@ -19111,14 +19123,14 @@ var renderTabIcon = (tab, isActive) => {
|
|
|
19111
19123
|
);
|
|
19112
19124
|
};
|
|
19113
19125
|
var useEventListTabs = (tabs) => {
|
|
19114
|
-
const labels = (0,
|
|
19115
|
-
const { disabledVenues, isLoading: isAppConfigLoading } = (0,
|
|
19116
|
-
const { isLocationBlocked } = (0,
|
|
19126
|
+
const labels = (0, import_hooks59.useLabels)();
|
|
19127
|
+
const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks59.useAppConfig)();
|
|
19128
|
+
const { isLocationBlocked } = (0, import_hooks59.useGeoBlock)();
|
|
19117
19129
|
return (0, import_react32.useMemo)(() => {
|
|
19118
19130
|
const baseTabs = tabs != null ? tabs : getDefaultEventListTabs(labels);
|
|
19119
19131
|
return baseTabs.flatMap((tab) => {
|
|
19120
19132
|
if (!tab.venueLogo) return [tab];
|
|
19121
|
-
const availabilityState = (0,
|
|
19133
|
+
const availabilityState = (0, import_hooks59.getVenueAvailabilityState)({
|
|
19122
19134
|
venueId: tab.venueLogo,
|
|
19123
19135
|
disabledVenues,
|
|
19124
19136
|
// A globally inactive or default-disabled venue is hidden until
|
|
@@ -19313,15 +19325,15 @@ var EventList = ({
|
|
|
19313
19325
|
stateRef
|
|
19314
19326
|
}) => {
|
|
19315
19327
|
var _a, _b, _c, _d, _e, _f;
|
|
19316
|
-
const labels = (0,
|
|
19317
|
-
const { disabledVenues } = (0,
|
|
19328
|
+
const labels = (0, import_hooks60.useLabels)();
|
|
19329
|
+
const { disabledVenues } = (0, import_hooks60.useAppConfig)();
|
|
19318
19330
|
const {
|
|
19319
19331
|
features: { enableVenueEventDiscoveryFilters, showSportsMarkets }
|
|
19320
|
-
} = (0,
|
|
19332
|
+
} = (0, import_hooks60.useSdkUiConfig)();
|
|
19321
19333
|
const isDiscoveryFiltersEnabled = enableVenueEventDiscoveryFilters && !search;
|
|
19322
19334
|
const resolvedTabs = useEventListTabs();
|
|
19323
19335
|
const visibleVenues = (0, import_react33.useMemo)(
|
|
19324
|
-
() => disabledVenues.length === 0 ? void 0 : (0,
|
|
19336
|
+
() => disabledVenues.length === 0 ? void 0 : (0, import_hooks60.getVisibleVenueIdsByConfig)(import_sdk19.VENUES, disabledVenues),
|
|
19325
19337
|
[disabledVenues]
|
|
19326
19338
|
);
|
|
19327
19339
|
const [internalActiveTabValue, setInternalActiveTabValue] = (0, import_react33.useState)(
|
|
@@ -19390,7 +19402,7 @@ var EventList = ({
|
|
|
19390
19402
|
if (controlledCategoryPath == null) setInternalCategoryPath([]);
|
|
19391
19403
|
setCollapsedCategoryIds(/* @__PURE__ */ new Set());
|
|
19392
19404
|
}, [baseCategoryId, controlledCategoryPath, isDiscoveryFiltersEnabled]);
|
|
19393
|
-
const { categories: topLevelCategories } = (0,
|
|
19405
|
+
const { categories: topLevelCategories } = (0, import_hooks60.useCategories)({
|
|
19394
19406
|
queryKeyScope: "event-list-top-categories",
|
|
19395
19407
|
enabled: isDiscoveryFiltersEnabled,
|
|
19396
19408
|
limit: 100
|
|
@@ -19407,7 +19419,7 @@ var EventList = ({
|
|
|
19407
19419
|
])
|
|
19408
19420
|
);
|
|
19409
19421
|
}, [baseCategoryId, categoryPath, sortedTopLevelCategories]);
|
|
19410
|
-
const { childrenByParentId: baseChildrenByParentId, isLoading: isBaseCategoryChildrenLoading } = (0,
|
|
19422
|
+
const { childrenByParentId: baseChildrenByParentId, isLoading: isBaseCategoryChildrenLoading } = (0, import_hooks60.useCategoryChildren)({
|
|
19411
19423
|
queryKeyScope: "event-list-category-children",
|
|
19412
19424
|
enabled: isDiscoveryFiltersEnabled,
|
|
19413
19425
|
parentIds: baseCategoryChildPrefetchIds,
|
|
@@ -19428,7 +19440,7 @@ var EventList = ({
|
|
|
19428
19440
|
}
|
|
19429
19441
|
return Array.from(ids);
|
|
19430
19442
|
}, [baseCategoryId, baseChildrenByParentId, categoryPath]);
|
|
19431
|
-
const { childrenByParentId: visibleChildrenByParentId } = (0,
|
|
19443
|
+
const { childrenByParentId: visibleChildrenByParentId } = (0, import_hooks60.useCategoryChildren)({
|
|
19432
19444
|
queryKeyScope: "event-list-category-children",
|
|
19433
19445
|
enabled: isDiscoveryFiltersEnabled,
|
|
19434
19446
|
parentIds: visibleChildPrefetchIds,
|
|
@@ -19444,7 +19456,7 @@ var EventList = ({
|
|
|
19444
19456
|
}
|
|
19445
19457
|
return Array.from(ids);
|
|
19446
19458
|
}, [categoryPath, visibleChildrenByParentId]);
|
|
19447
|
-
const { childrenByParentId: visibleGrandchildrenByParentId } = (0,
|
|
19459
|
+
const { childrenByParentId: visibleGrandchildrenByParentId } = (0, import_hooks60.useCategoryChildren)({
|
|
19448
19460
|
queryKeyScope: "event-list-category-children",
|
|
19449
19461
|
enabled: isDiscoveryFiltersEnabled,
|
|
19450
19462
|
parentIds: visibleGrandchildPrefetchIds,
|
|
@@ -19529,14 +19541,14 @@ var EventList = ({
|
|
|
19529
19541
|
isFetchingNextPage,
|
|
19530
19542
|
isPlaceholderData,
|
|
19531
19543
|
loadedPageCount
|
|
19532
|
-
} = (0,
|
|
19544
|
+
} = (0, import_hooks60.useVenueEvents)({
|
|
19533
19545
|
queryKeyScope: "event-list",
|
|
19534
19546
|
venues,
|
|
19535
19547
|
search,
|
|
19536
19548
|
categoryIds: resolvedCategoryIds,
|
|
19537
19549
|
matchStatus,
|
|
19538
19550
|
limit: requestLimit,
|
|
19539
|
-
status: [
|
|
19551
|
+
status: [import_hooks60.MarketStatus.open],
|
|
19540
19552
|
sortBy: sortQueryParams.sortBy,
|
|
19541
19553
|
sortDir: sortQueryParams.sortDir,
|
|
19542
19554
|
endDateFrom,
|
|
@@ -19572,7 +19584,7 @@ var EventList = ({
|
|
|
19572
19584
|
const visibleMidpointVenueMarketIds = (0, import_react33.useMemo)(() => {
|
|
19573
19585
|
return collectMidpointVenueMarketIds(visibleVenueMarkets);
|
|
19574
19586
|
}, [visibleVenueMarkets]);
|
|
19575
|
-
const { midpointRows: sharedMidpointRows, isLoading: isSharedMidpointsLoading } = (0,
|
|
19587
|
+
const { midpointRows: sharedMidpointRows, isLoading: isSharedMidpointsLoading } = (0, import_hooks60.useVenueMarketMidpoints)({
|
|
19576
19588
|
venueMarketIds: visibleMidpointVenueMarketIds,
|
|
19577
19589
|
enabled: visibleMidpointVenueMarketIds.length > 0
|
|
19578
19590
|
});
|
|
@@ -19753,7 +19765,7 @@ var EventList = ({
|
|
|
19753
19765
|
onMarketClick,
|
|
19754
19766
|
getMarketHref,
|
|
19755
19767
|
href: getEventHref == null ? void 0 : getEventHref(event),
|
|
19756
|
-
marketStatus:
|
|
19768
|
+
marketStatus: import_hooks60.MarketStatus.open
|
|
19757
19769
|
},
|
|
19758
19770
|
event.id
|
|
19759
19771
|
)),
|
|
@@ -19833,12 +19845,12 @@ var EventList = ({
|
|
|
19833
19845
|
EventList.displayName = "EventList";
|
|
19834
19846
|
|
|
19835
19847
|
// src/pages/home/index.tsx
|
|
19836
|
-
var
|
|
19848
|
+
var import_hooks79 = require("@agg-build/hooks");
|
|
19837
19849
|
var import_sdk26 = require("@agg-build/sdk");
|
|
19838
19850
|
var import_react51 = require("react");
|
|
19839
19851
|
|
|
19840
19852
|
// src/pages/event-market/index.tsx
|
|
19841
|
-
var
|
|
19853
|
+
var import_hooks78 = require("@agg-build/hooks");
|
|
19842
19854
|
var import_react48 = require("react");
|
|
19843
19855
|
|
|
19844
19856
|
// src/trading/types.ts
|
|
@@ -19848,7 +19860,7 @@ var parseVenue = (v) => (0, import_sdk20.safeParse)(v, isVenue);
|
|
|
19848
19860
|
var parseAmount = (v) => (0, import_sdk20.safeParse)(v, import_sdk20.isFiniteNonNeg);
|
|
19849
19861
|
|
|
19850
19862
|
// src/trading/settlement/settlement-details.tsx
|
|
19851
|
-
var
|
|
19863
|
+
var import_hooks61 = require("@agg-build/hooks");
|
|
19852
19864
|
var import_jsx_runtime165 = require("react/jsx-runtime");
|
|
19853
19865
|
var hasContent = (value) => {
|
|
19854
19866
|
return typeof value === "string" && value.trim().length > 0;
|
|
@@ -19872,11 +19884,11 @@ var buildVenueSettlementRules = (venueMarkets) => {
|
|
|
19872
19884
|
};
|
|
19873
19885
|
var SettlementDetails = ({ className }) => {
|
|
19874
19886
|
var _a, _b, _c, _d, _e, _f;
|
|
19875
|
-
const tradingContext = (0,
|
|
19887
|
+
const tradingContext = (0, import_hooks61.useEventTradingContext)();
|
|
19876
19888
|
const selectedEvent = (_a = tradingContext == null ? void 0 : tradingContext.selectedEvent) != null ? _a : null;
|
|
19877
19889
|
const selectedMarket = (_b = tradingContext == null ? void 0 : tradingContext.selectedMarket) != null ? _b : null;
|
|
19878
19890
|
if (!selectedEvent) return null;
|
|
19879
|
-
const activeMarket = selectedMarket != null ? selectedMarket : (0,
|
|
19891
|
+
const activeMarket = selectedMarket != null ? selectedMarket : (0, import_hooks61.resolveDefaultTradingMarket)(selectedEvent);
|
|
19880
19892
|
if (!activeMarket) return null;
|
|
19881
19893
|
const allVenueMarkets = normalizeVenueMarketCluster(selectedEvent.venueMarkets);
|
|
19882
19894
|
const activeMarketCluster = normalizeVenueMarketCluster(
|
|
@@ -19917,7 +19929,7 @@ var SettlementDetails = ({ className }) => {
|
|
|
19917
19929
|
SettlementDetails.displayName = "SettlementDetails";
|
|
19918
19930
|
|
|
19919
19931
|
// src/trading/place-order/index.tsx
|
|
19920
|
-
var
|
|
19932
|
+
var import_hooks71 = require("@agg-build/hooks");
|
|
19921
19933
|
var import_sdk25 = require("@agg-build/sdk");
|
|
19922
19934
|
var import_react40 = __toESM(require("@number-flow/react"));
|
|
19923
19935
|
var Popover = __toESM(require("@radix-ui/react-popover"));
|
|
@@ -19927,14 +19939,14 @@ var import_utc2 = __toESM(require("dayjs/plugin/utc"));
|
|
|
19927
19939
|
var import_react41 = require("react");
|
|
19928
19940
|
|
|
19929
19941
|
// src/geo-block-banner/index.tsx
|
|
19930
|
-
var
|
|
19942
|
+
var import_hooks62 = require("@agg-build/hooks");
|
|
19931
19943
|
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
19932
19944
|
var GeoBlockBanner = ({
|
|
19933
19945
|
venue,
|
|
19934
19946
|
termsUrl = AGG_TERMS_OF_SERVICE_URL,
|
|
19935
19947
|
className
|
|
19936
19948
|
}) => {
|
|
19937
|
-
const labels = (0,
|
|
19949
|
+
const labels = (0, import_hooks62.useLabels)();
|
|
19938
19950
|
const message = venue ? labels.trading.geoBlockVenueMessage(venue) : labels.trading.geoBlockGenericMessage;
|
|
19939
19951
|
return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
|
|
19940
19952
|
"div",
|
|
@@ -19970,7 +19982,7 @@ var createAggClientSharedKycInitiator = (client) => {
|
|
|
19970
19982
|
};
|
|
19971
19983
|
|
|
19972
19984
|
// src/kyc/shared-kyc-modal.tsx
|
|
19973
|
-
var
|
|
19985
|
+
var import_hooks63 = require("@agg-build/hooks");
|
|
19974
19986
|
var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
|
|
19975
19987
|
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
19976
19988
|
var SharedKycModal = ({
|
|
@@ -19980,7 +19992,7 @@ var SharedKycModal = ({
|
|
|
19980
19992
|
onOpenChange,
|
|
19981
19993
|
onStartVerification
|
|
19982
19994
|
}) => {
|
|
19983
|
-
const labels = (0,
|
|
19995
|
+
const labels = (0, import_hooks63.useLabels)();
|
|
19984
19996
|
const modalLabels = labels.trading.sharedKyc.modal;
|
|
19985
19997
|
const isInitiating = state === "initiating";
|
|
19986
19998
|
const handleOpenChange = (nextOpen) => {
|
|
@@ -20258,7 +20270,7 @@ var useSharedKycFlow = ({
|
|
|
20258
20270
|
|
|
20259
20271
|
// src/onboarding/index.tsx
|
|
20260
20272
|
var import_react39 = require("react");
|
|
20261
|
-
var
|
|
20273
|
+
var import_hooks69 = require("@agg-build/hooks");
|
|
20262
20274
|
var Dialog6 = __toESM(require("@radix-ui/react-dialog"));
|
|
20263
20275
|
|
|
20264
20276
|
// src/onboarding/onboarding-modal.constants.ts
|
|
@@ -20283,7 +20295,7 @@ var ONCHAIN_VENUES = [
|
|
|
20283
20295
|
|
|
20284
20296
|
// src/onboarding/steps/how-it-works.tsx
|
|
20285
20297
|
var import_react35 = require("react");
|
|
20286
|
-
var
|
|
20298
|
+
var import_hooks64 = require("@agg-build/hooks");
|
|
20287
20299
|
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
20288
20300
|
var defaultIcons = {
|
|
20289
20301
|
createAccount: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
@@ -20292,7 +20304,7 @@ var defaultIcons = {
|
|
|
20292
20304
|
stayInControl: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
|
|
20293
20305
|
};
|
|
20294
20306
|
var HowItWorksStep = ({ onContinue, icons }) => {
|
|
20295
|
-
const labels = (0,
|
|
20307
|
+
const labels = (0, import_hooks64.useLabels)();
|
|
20296
20308
|
const scrollRef = (0, import_react35.useRef)(null);
|
|
20297
20309
|
const [showTopGradient, setShowTopGradient] = (0, import_react35.useState)(false);
|
|
20298
20310
|
const [showBottomGradient, setShowBottomGradient] = (0, import_react35.useState)(true);
|
|
@@ -20366,10 +20378,10 @@ HowItWorksStep.displayName = "HowItWorksStep";
|
|
|
20366
20378
|
|
|
20367
20379
|
// src/onboarding/steps/profile-setup.tsx
|
|
20368
20380
|
var import_react36 = require("react");
|
|
20369
|
-
var
|
|
20381
|
+
var import_hooks65 = require("@agg-build/hooks");
|
|
20370
20382
|
var import_jsx_runtime169 = require("react/jsx-runtime");
|
|
20371
20383
|
var ProfileSetupStep = ({ onContinue }) => {
|
|
20372
|
-
const labels = (0,
|
|
20384
|
+
const labels = (0, import_hooks65.useLabels)();
|
|
20373
20385
|
const [username, setUsername] = (0, import_react36.useState)("");
|
|
20374
20386
|
const [avatarFile, setAvatarFile] = (0, import_react36.useState)();
|
|
20375
20387
|
const [avatarPreview, setAvatarPreview] = (0, import_react36.useState)();
|
|
@@ -20499,7 +20511,7 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
20499
20511
|
ProfileSetupStep.displayName = "ProfileSetupStep";
|
|
20500
20512
|
|
|
20501
20513
|
// src/onboarding/steps/connect-accounts.tsx
|
|
20502
|
-
var
|
|
20514
|
+
var import_hooks66 = require("@agg-build/hooks");
|
|
20503
20515
|
var import_jsx_runtime170 = require("react/jsx-runtime");
|
|
20504
20516
|
var OnchainVenueLogos = () => {
|
|
20505
20517
|
return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime170.jsx)("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
|
|
@@ -20513,7 +20525,7 @@ var VenueCard = ({
|
|
|
20513
20525
|
onConnect,
|
|
20514
20526
|
connected = false
|
|
20515
20527
|
}) => {
|
|
20516
|
-
const labels = (0,
|
|
20528
|
+
const labels = (0, import_hooks66.useLabels)();
|
|
20517
20529
|
const action = connected ? /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
|
|
20518
20530
|
Button,
|
|
20519
20531
|
{
|
|
@@ -20572,7 +20584,7 @@ var ConnectAccountsStep = ({
|
|
|
20572
20584
|
onContinue,
|
|
20573
20585
|
connectedOnchain = false
|
|
20574
20586
|
}) => {
|
|
20575
|
-
const labels = (0,
|
|
20587
|
+
const labels = (0, import_hooks66.useLabels)();
|
|
20576
20588
|
const canContinue = connectedOnchain;
|
|
20577
20589
|
return /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
20578
20590
|
/* @__PURE__ */ (0, import_jsx_runtime170.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
|
|
@@ -20607,7 +20619,7 @@ ConnectAccountsStep.displayName = "ConnectAccountsStep";
|
|
|
20607
20619
|
|
|
20608
20620
|
// src/onboarding/steps/connect-onchain-modal.tsx
|
|
20609
20621
|
var import_react37 = require("react");
|
|
20610
|
-
var
|
|
20622
|
+
var import_hooks67 = require("@agg-build/hooks");
|
|
20611
20623
|
var Dialog4 = __toESM(require("@radix-ui/react-dialog"));
|
|
20612
20624
|
var import_jsx_runtime171 = require("react/jsx-runtime");
|
|
20613
20625
|
var ConnectOnchainModal = ({
|
|
@@ -20615,7 +20627,7 @@ var ConnectOnchainModal = ({
|
|
|
20615
20627
|
onOpenChange,
|
|
20616
20628
|
onConnect
|
|
20617
20629
|
}) => {
|
|
20618
|
-
const labels = (0,
|
|
20630
|
+
const labels = (0, import_hooks67.useLabels)();
|
|
20619
20631
|
const [connecting, setConnecting] = (0, import_react37.useState)(false);
|
|
20620
20632
|
const [error, setError] = (0, import_react37.useState)();
|
|
20621
20633
|
const handleCancel = (0, import_react37.useCallback)(() => {
|
|
@@ -20714,7 +20726,7 @@ var ConnectOnchainModal = ({
|
|
|
20714
20726
|
ConnectOnchainModal.displayName = "ConnectOnchainModal";
|
|
20715
20727
|
|
|
20716
20728
|
// src/onboarding/steps/connect-kalshi-modal.tsx
|
|
20717
|
-
var
|
|
20729
|
+
var import_hooks68 = require("@agg-build/hooks");
|
|
20718
20730
|
var import_sdk23 = require("@agg-build/sdk");
|
|
20719
20731
|
var Dialog5 = __toESM(require("@radix-ui/react-dialog"));
|
|
20720
20732
|
var import_react38 = require("react");
|
|
@@ -20741,8 +20753,8 @@ var ConnectKalshiModal = ({
|
|
|
20741
20753
|
onOpenChange,
|
|
20742
20754
|
onVerify
|
|
20743
20755
|
}) => {
|
|
20744
|
-
const labels = (0,
|
|
20745
|
-
const { disabledVenues, isLoading: isAppConfigLoading } = (0,
|
|
20756
|
+
const labels = (0, import_hooks68.useLabels)();
|
|
20757
|
+
const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks68.useAppConfig)();
|
|
20746
20758
|
const apiKeyInputRef = (0, import_react38.useRef)(null);
|
|
20747
20759
|
const errorId = (0, import_react38.useId)();
|
|
20748
20760
|
const [apiKeyId, setApiKeyId] = (0, import_react38.useState)("");
|
|
@@ -20750,7 +20762,7 @@ var ConnectKalshiModal = ({
|
|
|
20750
20762
|
const [isVerifying, setIsVerifying] = (0, import_react38.useState)(false);
|
|
20751
20763
|
const [isConnected, setIsConnected] = (0, import_react38.useState)(false);
|
|
20752
20764
|
const [error, setError] = (0, import_react38.useState)();
|
|
20753
|
-
const availabilityState = (0,
|
|
20765
|
+
const availabilityState = (0, import_hooks68.getVenueAvailabilityState)({
|
|
20754
20766
|
venueId: import_sdk23.Venue.kalshi,
|
|
20755
20767
|
disabledVenues,
|
|
20756
20768
|
isConfigLoading: isAppConfigLoading
|
|
@@ -21052,7 +21064,7 @@ var OnboardingModal = ({
|
|
|
21052
21064
|
connectedOnchain = false
|
|
21053
21065
|
}) => {
|
|
21054
21066
|
var _a;
|
|
21055
|
-
const labels = (0,
|
|
21067
|
+
const labels = (0, import_hooks69.useLabels)();
|
|
21056
21068
|
const [step, setStep] = (0, import_react39.useState)(ONBOARDING_STEPS.HOW_IT_WORKS);
|
|
21057
21069
|
const stepLabels = {
|
|
21058
21070
|
[ONBOARDING_STEPS.HOW_IT_WORKS]: labels.onboarding.modal.stepHowItWorks,
|
|
@@ -21137,12 +21149,12 @@ var requestAggWithdrawModalOpen = () => {
|
|
|
21137
21149
|
};
|
|
21138
21150
|
|
|
21139
21151
|
// src/trading/fund-kalshi-modal.tsx
|
|
21140
|
-
var
|
|
21152
|
+
var import_hooks70 = require("@agg-build/hooks");
|
|
21141
21153
|
var import_sdk24 = require("@agg-build/sdk");
|
|
21142
21154
|
var Dialog7 = __toESM(require("@radix-ui/react-dialog"));
|
|
21143
21155
|
var import_jsx_runtime174 = require("react/jsx-runtime");
|
|
21144
21156
|
var FundKalshiModal = ({ open, onOpenChange }) => {
|
|
21145
|
-
const labels = (0,
|
|
21157
|
+
const labels = (0, import_hooks70.useLabels)();
|
|
21146
21158
|
const modalLabels = labels.trading.fundKalshiModal;
|
|
21147
21159
|
return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
|
|
21148
21160
|
Modal.Container,
|
|
@@ -21705,8 +21717,14 @@ var extractGeoBlockedVenues = (warnings) => {
|
|
|
21705
21717
|
);
|
|
21706
21718
|
};
|
|
21707
21719
|
var getSmartRouteTotalFees = (feeBreakdown) => {
|
|
21720
|
+
var _a, _b;
|
|
21708
21721
|
if (!feeBreakdown) return null;
|
|
21709
|
-
const feeParts = [
|
|
21722
|
+
const feeParts = [
|
|
21723
|
+
feeBreakdown.venueFees + ((_a = feeBreakdown.builderFee) != null ? _a : 0),
|
|
21724
|
+
feeBreakdown.bridgeFees,
|
|
21725
|
+
feeBreakdown.executionGas,
|
|
21726
|
+
(_b = feeBreakdown.appFee) != null ? _b : 0
|
|
21727
|
+
];
|
|
21710
21728
|
if (!feeParts.every(Number.isFinite)) return null;
|
|
21711
21729
|
return feeParts.reduce((total, fee) => total + Math.round(fee * 100) / 100, 0);
|
|
21712
21730
|
};
|
|
@@ -24109,7 +24127,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
24109
24127
|
minimumValue: slippageMinimumValue
|
|
24110
24128
|
}) => {
|
|
24111
24129
|
var _a, _b;
|
|
24112
|
-
const labels = (0,
|
|
24130
|
+
const labels = (0, import_hooks71.useLabels)();
|
|
24113
24131
|
const containerRef = (0, import_react41.useRef)(null);
|
|
24114
24132
|
const triggerRef = (0, import_react41.useRef)(null);
|
|
24115
24133
|
const inputRef = (0, import_react41.useRef)(null);
|
|
@@ -24383,7 +24401,7 @@ var PlaceOrderResolvedView = ({
|
|
|
24383
24401
|
showResolvingState = false
|
|
24384
24402
|
}) => {
|
|
24385
24403
|
var _a, _b;
|
|
24386
|
-
const labels = (0,
|
|
24404
|
+
const labels = (0, import_hooks71.useLabels)();
|
|
24387
24405
|
const tradingLabels = labels.trading;
|
|
24388
24406
|
const resolvingTimestamp = (_a = resolutionTimestamp != null ? resolutionTimestamp : tradingState.resolvesAt) != null ? _a : tradingState.endsAt;
|
|
24389
24407
|
const isResolvingMarket = showResolvingState && !tradingState.winningOutcome;
|
|
@@ -24679,23 +24697,23 @@ var PlaceOrder = ({
|
|
|
24679
24697
|
showResolvingState = false,
|
|
24680
24698
|
midpointsResult
|
|
24681
24699
|
}) => {
|
|
24682
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca;
|
|
24700
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da;
|
|
24683
24701
|
const {
|
|
24684
24702
|
enableDebug: isExecutionDebugEnabled,
|
|
24685
24703
|
features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
|
|
24686
24704
|
formatting: { formatPrice },
|
|
24687
24705
|
general: { locale }
|
|
24688
|
-
} = (0,
|
|
24689
|
-
const labels = (0,
|
|
24706
|
+
} = (0, import_hooks71.useSdkUiConfig)();
|
|
24707
|
+
const labels = (0, import_hooks71.useLabels)();
|
|
24690
24708
|
const tradingLabels = labels.trading;
|
|
24691
24709
|
const toastCtx = useOptionalToast();
|
|
24692
|
-
const { isTradingBlocked } = (0,
|
|
24693
|
-
const tradingContext = (0,
|
|
24710
|
+
const { isTradingBlocked } = (0, import_hooks71.useGeoBlock)();
|
|
24711
|
+
const tradingContext = (0, import_hooks71.useEventTradingContext)();
|
|
24694
24712
|
const selectedEvent = (_a = tradingContext == null ? void 0 : tradingContext.selectedEvent) != null ? _a : null;
|
|
24695
24713
|
const selectedMarket = (_b = tradingContext == null ? void 0 : tradingContext.selectedMarket) != null ? _b : null;
|
|
24696
24714
|
const selectedOutcomeId = (_c = tradingContext == null ? void 0 : tradingContext.selectedOutcomeId) != null ? _c : null;
|
|
24697
24715
|
const resolvedEventTradingState = (0, import_react41.useMemo)(() => {
|
|
24698
|
-
return eventTradingState != null ? eventTradingState : (0,
|
|
24716
|
+
return eventTradingState != null ? eventTradingState : (0, import_hooks71.resolveEventTradingState)(selectedEvent);
|
|
24699
24717
|
}, [eventTradingState, selectedEvent]);
|
|
24700
24718
|
const scopedSelectedEvent = (0, import_react41.useMemo)(() => {
|
|
24701
24719
|
var _a2;
|
|
@@ -24723,7 +24741,7 @@ var PlaceOrder = ({
|
|
|
24723
24741
|
)) != null ? _f : scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.venueMarketOutcomes[0]) != null ? _g : null;
|
|
24724
24742
|
const scopedSelectedOutcomeId = (_h = scopedSelectedOutcome == null ? void 0 : scopedSelectedOutcome.id) != null ? _h : null;
|
|
24725
24743
|
const resolvedTradingState = (0, import_react41.useMemo)(() => {
|
|
24726
|
-
return (0,
|
|
24744
|
+
return (0, import_hooks71.resolveMarketTradingState)(scopedSelectedMarket);
|
|
24727
24745
|
}, [scopedSelectedMarket]);
|
|
24728
24746
|
const resolvedReadOnlyMarket = (0, import_react41.useMemo)(() => {
|
|
24729
24747
|
var _a2;
|
|
@@ -24737,11 +24755,11 @@ var PlaceOrder = ({
|
|
|
24737
24755
|
scopedSelectedMarket
|
|
24738
24756
|
]);
|
|
24739
24757
|
const resolvedReadOnlyTradingState = (0, import_react41.useMemo)(() => {
|
|
24740
|
-
return (0,
|
|
24758
|
+
return (0, import_hooks71.resolveMarketTradingState)(resolvedReadOnlyMarket);
|
|
24741
24759
|
}, [resolvedReadOnlyMarket]);
|
|
24742
24760
|
const isEndedWithoutKnownWinner = showResolvingState && !resolvedEventTradingState.winningOutcome && !resolvedReadOnlyTradingState.winningOutcome;
|
|
24743
24761
|
const orderEligibility = (0, import_react41.useMemo)(
|
|
24744
|
-
() => (0,
|
|
24762
|
+
() => (0, import_hooks71.resolveOrderEligibility)({
|
|
24745
24763
|
event: scopedSelectedEvent,
|
|
24746
24764
|
market: scopedSelectedMarket,
|
|
24747
24765
|
outcome: scopedSelectedOutcome,
|
|
@@ -24750,16 +24768,16 @@ var PlaceOrder = ({
|
|
|
24750
24768
|
[scopedSelectedEvent, scopedSelectedMarket, scopedSelectedOutcome, resolvedEventTradingState]
|
|
24751
24769
|
);
|
|
24752
24770
|
const isResolvedOutcomeCtaLocked = resolvedEventTradingState.kind === "resolved" || resolvedTradingState.kind === "resolved";
|
|
24753
|
-
const { isAuthenticated, user } = (0,
|
|
24771
|
+
const { isAuthenticated, user } = (0, import_hooks71.useAggAuthContext)();
|
|
24754
24772
|
const sharedKycFlow = useSharedKycFlow({
|
|
24755
24773
|
integration: sharedKyc,
|
|
24756
24774
|
userId: isAuthenticated ? user == null ? void 0 : user.id : null,
|
|
24757
24775
|
fallbackErrorMessage: tradingLabels.sharedKyc.modal.error
|
|
24758
24776
|
});
|
|
24759
|
-
const { executionMode: resolvedExecutionMode, isPaperMode } = (0,
|
|
24777
|
+
const { executionMode: resolvedExecutionMode, isPaperMode } = (0, import_hooks71.useResolvedExecutionMode)(executionMode);
|
|
24760
24778
|
const showLimitOrders = limitOrdersFeature && !isPaperMode;
|
|
24761
|
-
const liveBalanceState = (0,
|
|
24762
|
-
const paperBalancesQuery = (0,
|
|
24779
|
+
const liveBalanceState = (0, import_hooks71.useAggBalanceState)();
|
|
24780
|
+
const paperBalancesQuery = (0, import_hooks71.useManagedBalances)({
|
|
24763
24781
|
enabled: Boolean(isAuthenticated && isPaperMode),
|
|
24764
24782
|
mode: "paper"
|
|
24765
24783
|
});
|
|
@@ -24779,22 +24797,22 @@ var PlaceOrder = ({
|
|
|
24779
24797
|
const liveAvailableBalance = (_i = liveBalanceState.availableBalance) != null ? _i : liveBalanceState.totalBalance;
|
|
24780
24798
|
const totalBalance = isPaperMode ? paperTotalBalance : liveAvailableBalance;
|
|
24781
24799
|
const isBalanceLoading = isPaperMode ? paperBalancesQuery.isLoading : liveBalanceState.isLoading;
|
|
24782
|
-
const executeManaged = (0,
|
|
24783
|
-
const placeLimitOrder = (0,
|
|
24784
|
-
const aggClient = (0,
|
|
24785
|
-
const queryClient = (0,
|
|
24786
|
-
const { disabledVenues, isLoading: isAppConfigLoading } = (0,
|
|
24787
|
-
const { data: kalshiKeyStatus, refetch: refetchKalshiKeyStatus } = (0,
|
|
24800
|
+
const executeManaged = (0, import_hooks71.useExecuteManaged)();
|
|
24801
|
+
const placeLimitOrder = (0, import_hooks71.usePlaceLimitOrder)();
|
|
24802
|
+
const aggClient = (0, import_hooks71.useAggClient)();
|
|
24803
|
+
const queryClient = (0, import_hooks71.useQueryClient)();
|
|
24804
|
+
const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks71.useAppConfig)();
|
|
24805
|
+
const { data: kalshiKeyStatus, refetch: refetchKalshiKeyStatus } = (0, import_hooks71.useVenueKeyStatus)(
|
|
24788
24806
|
import_sdk25.Venue.kalshi,
|
|
24789
24807
|
isAuthenticated
|
|
24790
24808
|
);
|
|
24791
24809
|
const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = (0, import_react41.useState)(false);
|
|
24792
24810
|
const [isFundKalshiModalOpen, setIsFundKalshiModalOpen] = (0, import_react41.useState)(false);
|
|
24793
|
-
const livePrices = (0,
|
|
24811
|
+
const livePrices = (0, import_hooks71.useLiveOutcomePrices)(
|
|
24794
24812
|
scopedSelectedMarket ? [scopedSelectedMarket] : void 0
|
|
24795
24813
|
);
|
|
24796
|
-
const wsBestPrices = (0,
|
|
24797
|
-
const fetchedClusterMidpointResult = (0,
|
|
24814
|
+
const wsBestPrices = (0, import_hooks71.useLiveBestPrices)(scopedSelectedMarket ? [scopedSelectedMarket] : void 0);
|
|
24815
|
+
const fetchedClusterMidpointResult = (0, import_hooks71.useMidpoints)(
|
|
24798
24816
|
midpointsResult ? [] : scopedSelectedMarket ? [scopedSelectedMarket] : []
|
|
24799
24817
|
);
|
|
24800
24818
|
const clusterMidpointResult = midpointsResult != null ? midpointsResult : fetchedClusterMidpointResult;
|
|
@@ -24802,7 +24820,7 @@ var PlaceOrder = ({
|
|
|
24802
24820
|
const clusterBestMidpoint = clusterMidpointResult.bestMidpoint;
|
|
24803
24821
|
const clusterBestPricesRest = clusterMidpointResult.bestPrices;
|
|
24804
24822
|
const clusterBestPrices = (0, import_react41.useMemo)(
|
|
24805
|
-
() => (0,
|
|
24823
|
+
() => (0, import_hooks71.mergeBestPricesPreferringLive)(clusterBestPricesRest, wsBestPrices),
|
|
24806
24824
|
[clusterBestPricesRest, wsBestPrices]
|
|
24807
24825
|
);
|
|
24808
24826
|
const [internalTab, setInternalTab] = (0, import_react41.useState)("buy");
|
|
@@ -24896,7 +24914,7 @@ var PlaceOrder = ({
|
|
|
24896
24914
|
scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id,
|
|
24897
24915
|
scopedSelectedOutcomeId
|
|
24898
24916
|
]);
|
|
24899
|
-
const debouncedAmount = (0,
|
|
24917
|
+
const debouncedAmount = (0, import_hooks71.useDebouncedValue)(internalAmount, 300);
|
|
24900
24918
|
const isQuoteInputEditing = internalAmount !== debouncedAmount;
|
|
24901
24919
|
const isLimitOrder = showLimitOrders && executionType === "limit";
|
|
24902
24920
|
const isSell = (0, import_react41.useMemo)(() => internalTab === "sell", [internalTab]);
|
|
@@ -24914,7 +24932,7 @@ var PlaceOrder = ({
|
|
|
24914
24932
|
);
|
|
24915
24933
|
const visibleLimitVenueOptions = (0, import_react41.useMemo)(() => {
|
|
24916
24934
|
return limitVenueOptions.filter((option) => {
|
|
24917
|
-
return (0,
|
|
24935
|
+
return (0, import_hooks71.getVenueAvailabilityState)({
|
|
24918
24936
|
venueId: option.venue,
|
|
24919
24937
|
disabledVenues,
|
|
24920
24938
|
isConfigLoading: isAppConfigLoading
|
|
@@ -24926,7 +24944,7 @@ var PlaceOrder = ({
|
|
|
24926
24944
|
dataUpdatedAt: executionPositionsUpdatedAt,
|
|
24927
24945
|
isLoading: isExecutionPositionsLoading,
|
|
24928
24946
|
isFetching: isExecutionPositionsFetching
|
|
24929
|
-
} = (0,
|
|
24947
|
+
} = (0, import_hooks71.useExecutionPositions)({
|
|
24930
24948
|
enabled: Boolean(isAuthenticated && isSell),
|
|
24931
24949
|
mode: isPaperMode ? "paper" : void 0
|
|
24932
24950
|
});
|
|
@@ -24960,7 +24978,7 @@ var PlaceOrder = ({
|
|
|
24960
24978
|
);
|
|
24961
24979
|
const hasValidLimitVenueQuoteAmount = debouncedAmount > 0;
|
|
24962
24980
|
const isLimitVenueQuoteEnabled = isLimitOrder && isQuotePanelActive && !isEndedWithoutKnownWinner && !submissionProgressState && !isBeforeActionPending && !placeLimitOrder.isPending && hasValidLimitVenueQuoteAmount && orderEligibility.canPlaceOrder && (!isSell || sellFilledForOutcomeId === scopedSelectedOutcomeId && !isQuoteInputEditing);
|
|
24963
|
-
const limitVenueQuotes = (0,
|
|
24981
|
+
const limitVenueQuotes = (0, import_hooks71.useLimitOrderVenueQuotes)({
|
|
24964
24982
|
requests: limitVenueQuoteRequests,
|
|
24965
24983
|
tradeSide: internalTab,
|
|
24966
24984
|
amount: debouncedAmount,
|
|
@@ -24994,7 +25012,7 @@ var PlaceOrder = ({
|
|
|
24994
25012
|
// server's reservation check — and the automatic pick, which sorts on
|
|
24995
25013
|
// price alone, would happily choose one. Only narrow once we know
|
|
24996
25014
|
// where the shares are; an empty map means positions haven't resolved.
|
|
24997
|
-
(!isSell || sellableSharesByVenue.size === 0 || ((_a2 = sellableSharesByVenue.get(option.venue)) != null ? _a2 : 0) > 0) && (0,
|
|
25015
|
+
(!isSell || sellableSharesByVenue.size === 0 || ((_a2 = sellableSharesByVenue.get(option.venue)) != null ? _a2 : 0) > 0) && (0, import_hooks71.getVenueAvailabilityState)({
|
|
24998
25016
|
venueId: option.venue,
|
|
24999
25017
|
disabledVenues,
|
|
25000
25018
|
isConfigLoading: isAppConfigLoading
|
|
@@ -25025,7 +25043,7 @@ var PlaceOrder = ({
|
|
|
25025
25043
|
if (!selectedLimitVenue || !geoBlockedLimitVenues.has(selectedLimitVenue)) return;
|
|
25026
25044
|
setSelectedLimitVenue(null);
|
|
25027
25045
|
}, [geoBlockedLimitVenues, selectedLimitVenue]);
|
|
25028
|
-
const smartRoute = (0,
|
|
25046
|
+
const smartRoute = (0, import_hooks71.useSmartRoute)(__spreadProps(__spreadValues({
|
|
25029
25047
|
venueMarketOutcomeId: scopedSelectedOutcomeId,
|
|
25030
25048
|
maxSpend: isSell ? void 0 : debouncedAmount,
|
|
25031
25049
|
sellShares: isSell ? debouncedAmount : void 0,
|
|
@@ -25098,7 +25116,7 @@ var PlaceOrder = ({
|
|
|
25098
25116
|
},
|
|
25099
25117
|
[debouncedAmount, isSell, scopedSelectedOutcomeId, smartRoute.data, smartRoute.isLoading]
|
|
25100
25118
|
);
|
|
25101
|
-
const venueSellQuotes = (0,
|
|
25119
|
+
const venueSellQuotes = (0, import_hooks71.useVenueSellQuotes)({
|
|
25102
25120
|
venueMarketOutcomeId: scopedSelectedOutcomeId,
|
|
25103
25121
|
accountId: (_n = user == null ? void 0 : user.id) != null ? _n : null,
|
|
25104
25122
|
positionVersion: executionPositionsUpdatedAt,
|
|
@@ -25323,7 +25341,7 @@ var PlaceOrder = ({
|
|
|
25323
25341
|
);
|
|
25324
25342
|
const isKalshiAccountActive = (_F = kalshiKeyStatus == null ? void 0 : kalshiKeyStatus.connected) != null ? _F : (legacyKalshiAccount == null ? void 0 : legacyKalshiAccount.status) === "active";
|
|
25325
25343
|
const hasKalshiConnectionState = kalshiKeyStatus !== void 0 || (user == null ? void 0 : user.venueAccounts) != null;
|
|
25326
|
-
const isKalshiAvailable = (0,
|
|
25344
|
+
const isKalshiAvailable = (0, import_hooks71.getVenueAvailabilityState)({
|
|
25327
25345
|
venueId: "kalshi",
|
|
25328
25346
|
disabledVenues,
|
|
25329
25347
|
isConfigLoading: isAppConfigLoading
|
|
@@ -25378,7 +25396,7 @@ var PlaceOrder = ({
|
|
|
25378
25396
|
scopedSelectedOutcomeId
|
|
25379
25397
|
]
|
|
25380
25398
|
);
|
|
25381
|
-
const executionProgress = (0,
|
|
25399
|
+
const executionProgress = (0, import_hooks71.useExecutionProgress)({
|
|
25382
25400
|
orderIds: (_G = submissionProgressState == null ? void 0 : submissionProgressState.orderIds) != null ? _G : null,
|
|
25383
25401
|
quoteId: (_H = submissionProgressState == null ? void 0 : submissionProgressState.quoteId) != null ? _H : null,
|
|
25384
25402
|
mode: isPaperMode ? "paper" : void 0,
|
|
@@ -25726,8 +25744,8 @@ var PlaceOrder = ({
|
|
|
25726
25744
|
}
|
|
25727
25745
|
if (submissionProgressState.phase === "success" && submissionProgressState.summary) {
|
|
25728
25746
|
emitTerminalOrderNotifications();
|
|
25729
|
-
(0,
|
|
25730
|
-
(0,
|
|
25747
|
+
(0, import_hooks71.invalidateBalanceQueries)(queryClient);
|
|
25748
|
+
(0, import_hooks71.invalidatePositionQueries)(queryClient);
|
|
25731
25749
|
if (debugStore && debugAttemptId) {
|
|
25732
25750
|
debugStore.updateAttempt(debugAttemptId, {
|
|
25733
25751
|
status: "succeeded",
|
|
@@ -26031,7 +26049,7 @@ var PlaceOrder = ({
|
|
|
26031
26049
|
limitPriceRaw: effectiveLimitPriceRaw,
|
|
26032
26050
|
side: internalTab
|
|
26033
26051
|
});
|
|
26034
|
-
const availabilityState = (0,
|
|
26052
|
+
const availabilityState = (0, import_hooks71.getVenueAvailabilityState)({
|
|
26035
26053
|
venueId: option.venue,
|
|
26036
26054
|
disabledVenues,
|
|
26037
26055
|
isConfigLoading: isAppConfigLoading
|
|
@@ -26100,13 +26118,17 @@ var PlaceOrder = ({
|
|
|
26100
26118
|
if (totalFees == null) return null;
|
|
26101
26119
|
return formatUsd(totalFees, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
26102
26120
|
}, [activeFeeBreakdown]);
|
|
26121
|
+
const appFeeValue = (__ = activeFeeBreakdown == null ? void 0 : activeFeeBreakdown.appFee) != null ? __ : 0;
|
|
26103
26122
|
const feeBreakdownRows = (0, import_react41.useMemo)(() => {
|
|
26123
|
+
var _a2;
|
|
26104
26124
|
if (!activeFeeBreakdown) return [];
|
|
26105
26125
|
return [
|
|
26106
26126
|
{
|
|
26127
|
+
// The builder slice (Hyperliquid only today) is a separate field on the
|
|
26128
|
+
// wire but reads as one cost to the user, so it renders inside "Venue".
|
|
26107
26129
|
kind: "amount",
|
|
26108
26130
|
label: tradingLabels.feeBreakdownVenueFees,
|
|
26109
|
-
value: formatUsd(activeFeeBreakdown.venueFees, {
|
|
26131
|
+
value: formatUsd(activeFeeBreakdown.venueFees + ((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0), {
|
|
26110
26132
|
minimumFractionDigits: 2,
|
|
26111
26133
|
maximumFractionDigits: 2
|
|
26112
26134
|
})
|
|
@@ -26127,23 +26149,33 @@ var PlaceOrder = ({
|
|
|
26127
26149
|
maximumFractionDigits: 2
|
|
26128
26150
|
})
|
|
26129
26151
|
},
|
|
26130
|
-
|
|
26152
|
+
// A partner charging a non-zero app fee gets a plain dollar row like every
|
|
26153
|
+
// other cost above it — the "0% fee" badge is only true, and only worth
|
|
26154
|
+
// highlighting, when the fee really is zero.
|
|
26155
|
+
appFeeValue > 0 ? {
|
|
26156
|
+
kind: "amount",
|
|
26157
|
+
label: tradingLabels.feeBreakdownAggMarket,
|
|
26158
|
+
value: formatUsd(appFeeValue, {
|
|
26159
|
+
minimumFractionDigits: 2,
|
|
26160
|
+
maximumFractionDigits: 2
|
|
26161
|
+
})
|
|
26162
|
+
} : {
|
|
26131
26163
|
kind: "badge",
|
|
26132
26164
|
label: tradingLabels.feeBreakdownAggMarket,
|
|
26133
26165
|
badgeLabel: tradingLabels.feeBreakdownPlatformFeeBadge
|
|
26134
26166
|
}
|
|
26135
26167
|
];
|
|
26136
|
-
}, [activeFeeBreakdown, tradingLabels]);
|
|
26168
|
+
}, [activeFeeBreakdown, appFeeValue, tradingLabels]);
|
|
26137
26169
|
const isActionLoading = isPrimaryActionLoading || executeManaged.isPending || placeLimitOrder.isPending || isBeforeActionPending;
|
|
26138
26170
|
const selectedLimitRouteCardId = selectedLimitVenueOption ? `limit-venue-${selectedLimitVenueOption.venue}-${selectedLimitVenueOption.venueMarketOutcomeId}` : null;
|
|
26139
|
-
const selectedLimitRouteCard = selectedLimitRouteCardId ? (
|
|
26140
|
-
const selectedRouteGeoBlocked = isLimitOrder ? (
|
|
26171
|
+
const selectedLimitRouteCard = selectedLimitRouteCardId ? (_$ = limitRouteCards.find((card) => card.id === selectedLimitRouteCardId)) != null ? _$ : null : null;
|
|
26172
|
+
const selectedRouteGeoBlocked = isLimitOrder ? (_aa = selectedLimitRouteCard == null ? void 0 : selectedLimitRouteCard.isUnavailable) != null ? _aa : false : (_ba = selectedRouteCard == null ? void 0 : selectedRouteCard.isUnavailable) != null ? _ba : false;
|
|
26141
26173
|
const geoBlockedVenuesFromWarnings = (0, import_react41.useMemo)(
|
|
26142
26174
|
() => {
|
|
26143
26175
|
var _a2;
|
|
26144
26176
|
return extractGeoBlockedVenues((_a2 = smartRoute.data) == null ? void 0 : _a2.warnings);
|
|
26145
26177
|
},
|
|
26146
|
-
[(
|
|
26178
|
+
[(_ca = smartRoute.data) == null ? void 0 : _ca.warnings]
|
|
26147
26179
|
);
|
|
26148
26180
|
const isPrimaryVenueGeoBlocked = (0, import_react41.useMemo)(() => {
|
|
26149
26181
|
var _a2, _b2;
|
|
@@ -26828,7 +26860,7 @@ var PlaceOrder = ({
|
|
|
26828
26860
|
PlaceOrderResolvedView,
|
|
26829
26861
|
{
|
|
26830
26862
|
tradingState: resolvedReadOnlyTradingState,
|
|
26831
|
-
resolutionTimestamp: (
|
|
26863
|
+
resolutionTimestamp: (_da = resolvedEventTradingState.resolvesAt) != null ? _da : resolvedReadOnlyTradingState.resolvesAt,
|
|
26832
26864
|
resolvedClaim,
|
|
26833
26865
|
classNames,
|
|
26834
26866
|
className,
|
|
@@ -27562,7 +27594,7 @@ var PlaceOrder = ({
|
|
|
27562
27594
|
className: "agg-order-submit h-12 w-full px-8 text-agg-base leading-agg-6 shadow-none",
|
|
27563
27595
|
disabled: !orderEligibility.canPlaceOrder || shouldShowGeoBlockBanner,
|
|
27564
27596
|
"aria-label": tradingLabels.signInToTrade,
|
|
27565
|
-
onClick:
|
|
27597
|
+
onClick: import_hooks71.requestAggAuthChooserOpen,
|
|
27566
27598
|
children: tradingLabels.signInToTrade
|
|
27567
27599
|
}
|
|
27568
27600
|
) : /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
@@ -27589,7 +27621,7 @@ var PlaceOrder = ({
|
|
|
27589
27621
|
message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
|
|
27590
27622
|
}
|
|
27591
27623
|
) : null,
|
|
27592
|
-
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0, import_jsx_runtime178.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: [
|
|
27624
|
+
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown && appFeeValue === 0 ? /* @__PURE__ */ (0, import_jsx_runtime178.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: [
|
|
27593
27625
|
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
27594
27626
|
Icon,
|
|
27595
27627
|
{
|
|
@@ -27638,7 +27670,7 @@ var PlaceOrder = ({
|
|
|
27638
27670
|
PlaceOrder.displayName = "PlaceOrder";
|
|
27639
27671
|
|
|
27640
27672
|
// src/trading/use-claim-winnings.ts
|
|
27641
|
-
var
|
|
27673
|
+
var import_hooks72 = require("@agg-build/hooks");
|
|
27642
27674
|
var import_react42 = require("react");
|
|
27643
27675
|
var toClaimError = (err) => {
|
|
27644
27676
|
if (err instanceof Error) return err;
|
|
@@ -27646,11 +27678,11 @@ var toClaimError = (err) => {
|
|
|
27646
27678
|
};
|
|
27647
27679
|
function useClaimWinnings(options = {}) {
|
|
27648
27680
|
const { onClaim, onClaimResult, onClaimSubmitError, externalClaimingKeys } = options;
|
|
27649
|
-
const labels = (0,
|
|
27681
|
+
const labels = (0, import_hooks72.useLabels)();
|
|
27650
27682
|
const claimNotificationLabels = labels.notifications.claim;
|
|
27651
27683
|
const toastCtx = useOptionalToast();
|
|
27652
|
-
const queryClient = (0,
|
|
27653
|
-
const redeemMutation = (0,
|
|
27684
|
+
const queryClient = (0, import_hooks72.useQueryClient)();
|
|
27685
|
+
const redeemMutation = (0, import_hooks72.useRedeem)();
|
|
27654
27686
|
const [activeRedeems, setActiveRedeems] = (0, import_react42.useState)({});
|
|
27655
27687
|
const activeClaimKeysRef = (0, import_react42.useRef)(/* @__PURE__ */ new Set());
|
|
27656
27688
|
const pendingClaimToastIdsRef = (0, import_react42.useRef)({});
|
|
@@ -27660,7 +27692,7 @@ function useClaimWinnings(options = {}) {
|
|
|
27660
27692
|
() => Object.values(activeRedeems),
|
|
27661
27693
|
[activeRedeems]
|
|
27662
27694
|
);
|
|
27663
|
-
const lifecycleStates = (0,
|
|
27695
|
+
const lifecycleStates = (0, import_hooks72.useRedeemLifecycles)(lifecycleInputs);
|
|
27664
27696
|
const internalClaimingIds = (0, import_react42.useMemo)(() => {
|
|
27665
27697
|
const out = __spreadValues({}, submittingClaimKeys);
|
|
27666
27698
|
for (const [claimKey, active] of Object.entries(activeRedeems)) {
|
|
@@ -27675,13 +27707,13 @@ function useClaimWinnings(options = {}) {
|
|
|
27675
27707
|
[externalClaimingKeys, internalClaimingIds]
|
|
27676
27708
|
);
|
|
27677
27709
|
const invalidateClaimUiState = (0, import_react42.useCallback)(() => {
|
|
27678
|
-
(0,
|
|
27679
|
-
(0,
|
|
27710
|
+
(0, import_hooks72.invalidateBalanceQueries)(queryClient);
|
|
27711
|
+
(0, import_hooks72.invalidatePositionQueries)(queryClient);
|
|
27680
27712
|
queryClient.invalidateQueries({
|
|
27681
|
-
queryKey:
|
|
27713
|
+
queryKey: import_hooks72.executionKeys.claimablePositionsCount(),
|
|
27682
27714
|
refetchType: "active"
|
|
27683
27715
|
});
|
|
27684
|
-
(0,
|
|
27716
|
+
(0, import_hooks72.invalidateUserActivityQueries)(queryClient);
|
|
27685
27717
|
}, [queryClient]);
|
|
27686
27718
|
const claim = (0, import_react42.useCallback)(
|
|
27687
27719
|
(_0) => __async(null, [_0], function* ({ claimKey, winningOutcomeIds, payload }) {
|
|
@@ -27878,7 +27910,7 @@ function useClaimWinnings(options = {}) {
|
|
|
27878
27910
|
}
|
|
27879
27911
|
|
|
27880
27912
|
// src/trading/use-resolved-market-claim.ts
|
|
27881
|
-
var
|
|
27913
|
+
var import_hooks73 = require("@agg-build/hooks");
|
|
27882
27914
|
var import_react43 = require("react");
|
|
27883
27915
|
var sharesFormatter = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 });
|
|
27884
27916
|
var dateFormatter = new Intl.DateTimeFormat("en-US", {
|
|
@@ -27895,12 +27927,12 @@ var formatResolutionDate = (value) => {
|
|
|
27895
27927
|
function useResolvedMarketClaim(options = {}) {
|
|
27896
27928
|
var _a;
|
|
27897
27929
|
const { market, enabled = true, executionMode } = options;
|
|
27898
|
-
const { isAuthenticated } = (0,
|
|
27899
|
-
const tradingState = (0, import_react43.useMemo)(() => (0,
|
|
27930
|
+
const { isAuthenticated } = (0, import_hooks73.useAggAuthState)();
|
|
27931
|
+
const tradingState = (0, import_react43.useMemo)(() => (0, import_hooks73.resolveMarketTradingState)(market), [market]);
|
|
27900
27932
|
const isResolved = tradingState.kind === "resolved";
|
|
27901
27933
|
const marketId = (_a = market == null ? void 0 : market.id) != null ? _a : null;
|
|
27902
27934
|
const shouldFetch = Boolean(enabled && isAuthenticated && isResolved && marketId);
|
|
27903
|
-
const { positions } = (0,
|
|
27935
|
+
const { positions } = (0, import_hooks73.useExecutionPositions)(__spreadValues({
|
|
27904
27936
|
enabled: shouldFetch,
|
|
27905
27937
|
status: "active",
|
|
27906
27938
|
limit: 50
|
|
@@ -27917,7 +27949,7 @@ function useResolvedMarketClaim(options = {}) {
|
|
|
27917
27949
|
(outcome) => outcome.winner === true && outcome.totalSize > 0
|
|
27918
27950
|
);
|
|
27919
27951
|
if (winningOutcomes.length === 0) return void 0;
|
|
27920
|
-
const totals = (0,
|
|
27952
|
+
const totals = (0, import_hooks73.computeClosedPositionTotals)(group);
|
|
27921
27953
|
const winningShares = winningOutcomes.reduce((sum, outcome) => sum + outcome.totalSize, 0);
|
|
27922
27954
|
const winningOutcomeLabel = (_a2 = resolveResolvedOutcomeLabel({
|
|
27923
27955
|
market: market != null ? market : group.venueMarket,
|
|
@@ -28001,7 +28033,7 @@ var resolveEventMarketPageStickyState = ({
|
|
|
28001
28033
|
};
|
|
28002
28034
|
|
|
28003
28035
|
// src/pages/event-market/event-market.shared.tsx
|
|
28004
|
-
var
|
|
28036
|
+
var import_hooks74 = require("@agg-build/hooks");
|
|
28005
28037
|
var Dialog8 = __toESM(require("@radix-ui/react-dialog"));
|
|
28006
28038
|
var import_react44 = require("react");
|
|
28007
28039
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
@@ -28071,7 +28103,7 @@ var EventMarketPageMobileTrade = ({
|
|
|
28071
28103
|
onBeforePrimaryAction,
|
|
28072
28104
|
sharedKyc
|
|
28073
28105
|
}) => {
|
|
28074
|
-
const labels = (0,
|
|
28106
|
+
const labels = (0, import_hooks74.useLabels)();
|
|
28075
28107
|
if (!showPlaceOrder) return null;
|
|
28076
28108
|
const handleOpenChange = (nextOpen) => {
|
|
28077
28109
|
onOpenChange(nextOpen);
|
|
@@ -28127,7 +28159,7 @@ var EventMarketPageMobileTrade = ({
|
|
|
28127
28159
|
var EventMarketPageUnavailableState = ({
|
|
28128
28160
|
ariaLabel: _ariaLabel
|
|
28129
28161
|
}) => {
|
|
28130
|
-
const labels = (0,
|
|
28162
|
+
const labels = (0, import_hooks74.useLabels)();
|
|
28131
28163
|
return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
|
|
28132
28164
|
StateMessage,
|
|
28133
28165
|
{
|
|
@@ -28143,7 +28175,7 @@ var EventMarketPageUnavailableState = ({
|
|
|
28143
28175
|
var EventMarketPageNotFoundState = ({
|
|
28144
28176
|
ariaLabel: _ariaLabel
|
|
28145
28177
|
}) => {
|
|
28146
|
-
const labels = (0,
|
|
28178
|
+
const labels = (0, import_hooks74.useLabels)();
|
|
28147
28179
|
return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
|
|
28148
28180
|
StateMessage,
|
|
28149
28181
|
{
|
|
@@ -28240,11 +28272,11 @@ var EventMarketPageLoadingState = ({
|
|
|
28240
28272
|
};
|
|
28241
28273
|
|
|
28242
28274
|
// src/pages/event-market/sports-event-market-page.tsx
|
|
28243
|
-
var
|
|
28275
|
+
var import_hooks77 = require("@agg-build/hooks");
|
|
28244
28276
|
var import_react47 = require("react");
|
|
28245
28277
|
|
|
28246
28278
|
// src/pages/event-market/sports-markets.tsx
|
|
28247
|
-
var
|
|
28279
|
+
var import_hooks76 = require("@agg-build/hooks");
|
|
28248
28280
|
var import_react46 = require("react");
|
|
28249
28281
|
|
|
28250
28282
|
// src/pages/event-market/sports-event-market.utils.ts
|
|
@@ -29249,7 +29281,7 @@ var mergeSportsSectionMarketsIntoEvent = ({
|
|
|
29249
29281
|
};
|
|
29250
29282
|
|
|
29251
29283
|
// src/pages/event-market/sports-market-card.tsx
|
|
29252
|
-
var
|
|
29284
|
+
var import_hooks75 = require("@agg-build/hooks");
|
|
29253
29285
|
var import_react45 = require("react");
|
|
29254
29286
|
|
|
29255
29287
|
// src/pages/event-market/sports-line-rail.tsx
|
|
@@ -29598,11 +29630,11 @@ var SportsMarketCard = ({
|
|
|
29598
29630
|
midpointsResult
|
|
29599
29631
|
}) => {
|
|
29600
29632
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
29601
|
-
const labels = (0,
|
|
29633
|
+
const labels = (0, import_hooks75.useLabels)();
|
|
29602
29634
|
const {
|
|
29603
29635
|
formatting: { formatCompactCurrency }
|
|
29604
|
-
} = (0,
|
|
29605
|
-
const tradingContext = (0,
|
|
29636
|
+
} = (0, import_hooks75.useSdkUiConfig)();
|
|
29637
|
+
const tradingContext = (0, import_hooks75.useEventTradingContext)();
|
|
29606
29638
|
const slide = (0, import_react45.useMemo)(() => buildSportsSlideFromGroup(group), [group]);
|
|
29607
29639
|
const [selectedLineIndex, setSelectedLineIndex] = (0, import_react45.useState)(slide.defaultStopIndex);
|
|
29608
29640
|
const combinedLegs = (0, import_react45.useMemo)(() => resolveSportsCombinedLegs(group), [group]);
|
|
@@ -29643,7 +29675,7 @@ var SportsMarketCard = ({
|
|
|
29643
29675
|
const justOpened = isExpanded && !wasExpandedRef.current;
|
|
29644
29676
|
wasExpandedRef.current = isExpanded;
|
|
29645
29677
|
if (!justOpened || !activeMarket) return;
|
|
29646
|
-
if ((0,
|
|
29678
|
+
if ((0, import_hooks75.resolveMarketTradingState)(activeMarket).isTradingDisabled) return;
|
|
29647
29679
|
const selectedOutcomeId = tradingContext == null ? void 0 : tradingContext.selectedOutcomeId;
|
|
29648
29680
|
const hasInScopeOutcome = selectedOutcomeId != null && activeMarket.venueMarketOutcomes.some((outcome) => outcome.id === selectedOutcomeId);
|
|
29649
29681
|
if (hasInScopeOutcome) return;
|
|
@@ -29763,7 +29795,7 @@ var SportsMarketCard = ({
|
|
|
29763
29795
|
stops: slide.stops.map((stop) => ({
|
|
29764
29796
|
value: stop.value,
|
|
29765
29797
|
venues: stop.venues,
|
|
29766
|
-
disabled: stop.market.status !==
|
|
29798
|
+
disabled: stop.market.status !== import_hooks75.MarketStatus.open
|
|
29767
29799
|
})),
|
|
29768
29800
|
selectedIndex: selectedLineIndex,
|
|
29769
29801
|
onSelect: handleLineSelect,
|
|
@@ -29867,7 +29899,7 @@ var SportsTabButton = ({
|
|
|
29867
29899
|
);
|
|
29868
29900
|
};
|
|
29869
29901
|
var SportsMarketsLoadingState = () => {
|
|
29870
|
-
const labels = (0,
|
|
29902
|
+
const labels = (0, import_hooks76.useLabels)();
|
|
29871
29903
|
return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
|
|
29872
29904
|
"div",
|
|
29873
29905
|
{
|
|
@@ -29905,13 +29937,13 @@ var SportsMarkets = ({
|
|
|
29905
29937
|
midpointsResult
|
|
29906
29938
|
}) => {
|
|
29907
29939
|
var _a, _b;
|
|
29908
|
-
const labels = (0,
|
|
29909
|
-
const tradingContext = (0,
|
|
29940
|
+
const labels = (0, import_hooks76.useLabels)();
|
|
29941
|
+
const tradingContext = (0, import_hooks76.useEventTradingContext)();
|
|
29910
29942
|
const hasAggKey = Boolean(event.aggKey);
|
|
29911
|
-
const gameMarketsQuery = (0,
|
|
29943
|
+
const gameMarketsQuery = (0, import_hooks76.useVenueMarkets)({
|
|
29912
29944
|
aggKey: event.aggKey ? [event.aggKey] : void 0,
|
|
29913
29945
|
limit: 100,
|
|
29914
|
-
status:
|
|
29946
|
+
status: import_hooks76.MarketStatus.open,
|
|
29915
29947
|
enabled: hasAggKey
|
|
29916
29948
|
});
|
|
29917
29949
|
const {
|
|
@@ -29947,7 +29979,7 @@ var SportsMarkets = ({
|
|
|
29947
29979
|
const [stableMarketsByTab, setStableMarketsByTab] = (0, import_react46.useState)({});
|
|
29948
29980
|
const activeTabLabel = resolveSportsSectionLabel(labels, activeTab);
|
|
29949
29981
|
const sectionFilters = resolveSportsSectionFilters(activeTab);
|
|
29950
|
-
const sectionMarketsQuery = (0,
|
|
29982
|
+
const sectionMarketsQuery = (0, import_hooks76.useVenueMarkets)({
|
|
29951
29983
|
aggKey: event.aggKey ? [event.aggKey] : void 0,
|
|
29952
29984
|
sportsMarketType: sectionFilters.sportsMarketType,
|
|
29953
29985
|
period: sectionFilters.period,
|
|
@@ -29957,7 +29989,7 @@ var SportsMarkets = ({
|
|
|
29957
29989
|
// heavy tab (e.g. "Other" spans other/team_props/player_props/specials/
|
|
29958
29990
|
// completion — hundreds of markets on prop-rich events) from ~15 calls to 1-3.
|
|
29959
29991
|
limit: 100,
|
|
29960
|
-
status:
|
|
29992
|
+
status: import_hooks76.MarketStatus.open,
|
|
29961
29993
|
enabled: hasAggKey
|
|
29962
29994
|
});
|
|
29963
29995
|
const {
|
|
@@ -30043,7 +30075,7 @@ var SportsMarkets = ({
|
|
|
30043
30075
|
return;
|
|
30044
30076
|
}
|
|
30045
30077
|
setExpandedGroupId(groupId);
|
|
30046
|
-
if ((0,
|
|
30078
|
+
if ((0, import_hooks76.resolveMarketTradingState)(market).isTradingDisabled) return;
|
|
30047
30079
|
if (market.id !== (tradingContext == null ? void 0 : tradingContext.selectedMarketId)) {
|
|
30048
30080
|
tradingContext == null ? void 0 : tradingContext.selectMarket(market.id, market);
|
|
30049
30081
|
}
|
|
@@ -30159,7 +30191,7 @@ var SportsEventMarketPage = ({
|
|
|
30159
30191
|
sectionMarketsByKey
|
|
30160
30192
|
});
|
|
30161
30193
|
}, [event, sectionMarketsByKey]);
|
|
30162
|
-
const eventTradingState = (0, import_react47.useMemo)(() => (0,
|
|
30194
|
+
const eventTradingState = (0, import_react47.useMemo)(() => (0, import_hooks77.resolveEventTradingState)(composedEvent), [composedEvent]);
|
|
30163
30195
|
const hasSportsSections = (0, import_react47.useMemo)(
|
|
30164
30196
|
() => resolveVisibleSportsSectionTabs(event).length > 0,
|
|
30165
30197
|
[event]
|
|
@@ -30167,12 +30199,12 @@ var SportsEventMarketPage = ({
|
|
|
30167
30199
|
const stickyOrderPanelState = resolveEventMarketPageStickyState({
|
|
30168
30200
|
stickyOrderPanel
|
|
30169
30201
|
});
|
|
30170
|
-
const { executionMode: resolvedExecutionMode } = (0,
|
|
30202
|
+
const { executionMode: resolvedExecutionMode } = (0, import_hooks77.useResolvedExecutionMode)(executionMode);
|
|
30171
30203
|
const [isMobileTradeOpen, setIsMobileTradeOpen] = (0, import_react47.useState)(false);
|
|
30172
30204
|
const isMobileViewport = useIsMobileEventMarketViewport(SPORTS_EVENT_MARKET_MEDIA_QUERY);
|
|
30173
|
-
const tradingContext = (0,
|
|
30174
|
-
const { stateByEventId: sportsLiveStateByEventId } = (0,
|
|
30175
|
-
const midpointsResult = (0,
|
|
30205
|
+
const tradingContext = (0, import_hooks77.useEventTradingContext)();
|
|
30206
|
+
const { stateByEventId: sportsLiveStateByEventId } = (0, import_hooks77.useSportsLive)([event.id]);
|
|
30207
|
+
const midpointsResult = (0, import_hooks77.useMidpoints)(composedEvent.venueMarkets);
|
|
30176
30208
|
const internalResolvedClaim = useResolvedMarketClaim({
|
|
30177
30209
|
market: eventTradingState.primaryMarket,
|
|
30178
30210
|
enabled: eventTradingState.kind === "resolved",
|
|
@@ -30184,7 +30216,7 @@ var SportsEventMarketPage = ({
|
|
|
30184
30216
|
(0, import_react47.useEffect)(() => {
|
|
30185
30217
|
return () => {
|
|
30186
30218
|
var _a;
|
|
30187
|
-
(_a = setTradeSideRef.current) == null ? void 0 : _a.call(setTradeSideRef,
|
|
30219
|
+
(_a = setTradeSideRef.current) == null ? void 0 : _a.call(setTradeSideRef, import_hooks77.TradeSide.Buy);
|
|
30188
30220
|
};
|
|
30189
30221
|
}, []);
|
|
30190
30222
|
const handleSectionMarketsChange = (0, import_react47.useCallback)(
|
|
@@ -30395,19 +30427,19 @@ var EventMarketPageContent = ({
|
|
|
30395
30427
|
onRecurringMarketNavigate
|
|
30396
30428
|
}) => {
|
|
30397
30429
|
var _a;
|
|
30398
|
-
const eventTradingState = (0, import_react48.useMemo)(() => (0,
|
|
30430
|
+
const eventTradingState = (0, import_react48.useMemo)(() => (0, import_hooks78.resolveEventTradingState)(event), [event]);
|
|
30399
30431
|
const stickyOrderPanelState = resolveEventMarketPageStickyState({
|
|
30400
30432
|
stickyOrderPanel
|
|
30401
30433
|
});
|
|
30402
|
-
const { executionMode: resolvedExecutionMode } = (0,
|
|
30434
|
+
const { executionMode: resolvedExecutionMode } = (0, import_hooks78.useResolvedExecutionMode)(executionMode);
|
|
30403
30435
|
const [isMobileTradeOpen, setIsMobileTradeOpen] = (0, import_react48.useState)(false);
|
|
30404
30436
|
const isMobileViewport = useIsMobileEventMarketViewport();
|
|
30405
|
-
const tradingContext = (0,
|
|
30406
|
-
const labels = (0,
|
|
30407
|
-
const recurringQuery = (0,
|
|
30437
|
+
const tradingContext = (0, import_hooks78.useEventTradingContext)();
|
|
30438
|
+
const labels = (0, import_hooks78.useLabels)();
|
|
30439
|
+
const recurringQuery = (0, import_hooks78.useRecurringCryptoMarkets)({ event });
|
|
30408
30440
|
const currentTimestamp = useCurrentTimestamp(recurringQuery.isRecurringCryptoMarket);
|
|
30409
30441
|
const recurringTimeline = (0, import_react48.useMemo)(
|
|
30410
|
-
() => currentTimestamp == null ? null : (0,
|
|
30442
|
+
() => currentTimestamp == null ? null : (0, import_hooks78.resolveRecurringCryptoTimeline)(recurringQuery.windows, event, currentTimestamp),
|
|
30411
30443
|
[currentTimestamp, event, recurringQuery.windows]
|
|
30412
30444
|
);
|
|
30413
30445
|
const isRecurringCryptoMarket = (recurringTimeline == null ? void 0 : recurringTimeline.viewed) != null;
|
|
@@ -30487,7 +30519,7 @@ var EventMarketPageContent = ({
|
|
|
30487
30519
|
() => normalizeVenueMarketCluster(event.venueMarkets),
|
|
30488
30520
|
[event.venueMarkets]
|
|
30489
30521
|
);
|
|
30490
|
-
const midpointsResult = (0,
|
|
30522
|
+
const midpointsResult = (0, import_hooks78.useMidpoints)(
|
|
30491
30523
|
recurringQuery.isRecurringCryptoMarket && eventTradingState.kind !== "open" ? [] : eventDetailVenueMarkets
|
|
30492
30524
|
);
|
|
30493
30525
|
const internalResolvedClaim = useResolvedMarketClaim({
|
|
@@ -30501,7 +30533,7 @@ var EventMarketPageContent = ({
|
|
|
30501
30533
|
(0, import_react48.useEffect)(() => {
|
|
30502
30534
|
return () => {
|
|
30503
30535
|
var _a2;
|
|
30504
|
-
(_a2 = setTradeSideRef.current) == null ? void 0 : _a2.call(setTradeSideRef,
|
|
30536
|
+
(_a2 = setTradeSideRef.current) == null ? void 0 : _a2.call(setTradeSideRef, import_hooks78.TradeSide.Buy);
|
|
30505
30537
|
};
|
|
30506
30538
|
}, []);
|
|
30507
30539
|
if (!event.venueMarkets.length) {
|
|
@@ -30643,14 +30675,14 @@ var EventMarketPage = (props) => {
|
|
|
30643
30675
|
var _a;
|
|
30644
30676
|
const {
|
|
30645
30677
|
features: { showSportsMarkets }
|
|
30646
|
-
} = (0,
|
|
30678
|
+
} = (0, import_hooks78.useSdkUiConfig)();
|
|
30647
30679
|
const hasEventProp = "event" in props && !!props.event;
|
|
30648
30680
|
const {
|
|
30649
30681
|
event: fetchedEvent,
|
|
30650
30682
|
error: eventError,
|
|
30651
30683
|
isLoading: isFetchingEvent,
|
|
30652
30684
|
isEnriching
|
|
30653
|
-
} = (0,
|
|
30685
|
+
} = (0, import_hooks78.useEnrichedVenueEvent)({
|
|
30654
30686
|
eventId: hasEventProp ? "" : (_a = props.eventId) != null ? _a : "",
|
|
30655
30687
|
enabled: !props.isLoading && !hasEventProp && !!props.eventId
|
|
30656
30688
|
});
|
|
@@ -30916,14 +30948,14 @@ var HomeSearchResults = ({
|
|
|
30916
30948
|
onEventClick,
|
|
30917
30949
|
onMarketClick
|
|
30918
30950
|
}) => {
|
|
30919
|
-
const labels = (0,
|
|
30920
|
-
const { search: searchConfig } = (0,
|
|
30921
|
-
const { disabledVenues } = (0,
|
|
30951
|
+
const labels = (0, import_hooks79.useLabels)();
|
|
30952
|
+
const { search: searchConfig } = (0, import_hooks79.useSdkUiConfig)();
|
|
30953
|
+
const { disabledVenues } = (0, import_hooks79.useAppConfig)();
|
|
30922
30954
|
const [activeVenueTabValue, setActiveVenueTabValue] = (0, import_react51.useState)("all");
|
|
30923
30955
|
const eventListTabs = useEventListTabs();
|
|
30924
30956
|
const { headerRef, titleRef, shouldUseSelectOverflow } = useEventListTabsHeaderOverflow(eventListTabs);
|
|
30925
30957
|
const visibleVenues = (0, import_react51.useMemo)(
|
|
30926
|
-
() => disabledVenues.length === 0 ? void 0 : (0,
|
|
30958
|
+
() => disabledVenues.length === 0 ? void 0 : (0, import_hooks79.getVisibleVenueIdsByConfig)(import_sdk26.VENUES, disabledVenues),
|
|
30927
30959
|
[disabledVenues]
|
|
30928
30960
|
);
|
|
30929
30961
|
const activeVenueTab = (0, import_react51.useMemo)(() => {
|
|
@@ -30941,7 +30973,7 @@ var HomeSearchResults = ({
|
|
|
30941
30973
|
hasNextPage,
|
|
30942
30974
|
isFetchingNextPage,
|
|
30943
30975
|
isPlaceholderData
|
|
30944
|
-
} = (0,
|
|
30976
|
+
} = (0, import_hooks79.useSearch)({
|
|
30945
30977
|
q: query,
|
|
30946
30978
|
type: "events",
|
|
30947
30979
|
categoryIds: activeTabValue === ALL_CATEGORIES_TAB_VALUE ? void 0 : activeCategoryTab == null ? void 0 : activeCategoryTab.categoryIds,
|
|
@@ -30969,7 +31001,7 @@ var HomeSearchResults = ({
|
|
|
30969
31001
|
const visibleMidpointVenueMarketIds = (0, import_react51.useMemo)(() => {
|
|
30970
31002
|
return collectVisibleVenueMarketIds(visibleVenueMarkets);
|
|
30971
31003
|
}, [visibleVenueMarkets]);
|
|
30972
|
-
const { midpointRows: sharedMidpointRows, isLoading: isSharedMidpointsLoading } = (0,
|
|
31004
|
+
const { midpointRows: sharedMidpointRows, isLoading: isSharedMidpointsLoading } = (0, import_hooks79.useVenueMarketMidpoints)({
|
|
30973
31005
|
venueMarketIds: visibleMidpointVenueMarketIds,
|
|
30974
31006
|
enabled: visibleMidpointVenueMarketIds.length > 0
|
|
30975
31007
|
});
|
|
@@ -31118,7 +31150,7 @@ var HomePage = ({
|
|
|
31118
31150
|
stickyOrderPanel
|
|
31119
31151
|
}) => {
|
|
31120
31152
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
31121
|
-
const labels = (0,
|
|
31153
|
+
const labels = (0, import_hooks79.useLabels)();
|
|
31122
31154
|
const {
|
|
31123
31155
|
search: {
|
|
31124
31156
|
value: searchValue,
|
|
@@ -31128,11 +31160,11 @@ var HomePage = ({
|
|
|
31128
31160
|
onSelect: onSelectEventInternal
|
|
31129
31161
|
},
|
|
31130
31162
|
features: { enableEventDiscoveryUrlPersistence }
|
|
31131
|
-
} = (0,
|
|
31132
|
-
const { executionMode } = (0,
|
|
31133
|
-
const { isLoading: isAppConfigLoading } = (0,
|
|
31163
|
+
} = (0, import_hooks79.useSdkUiConfig)();
|
|
31164
|
+
const { executionMode } = (0, import_hooks79.useResolvedExecutionMode)();
|
|
31165
|
+
const { isLoading: isAppConfigLoading } = (0, import_hooks79.useAppConfig)();
|
|
31134
31166
|
const primaryEventListTabs = useEventListTabs();
|
|
31135
|
-
const { capture, consume } = (0,
|
|
31167
|
+
const { capture, consume } = (0, import_hooks79.useEventListState)();
|
|
31136
31168
|
const [snapshot] = (0, import_react51.useState)(() => consume());
|
|
31137
31169
|
const eventListStateRef = (0, import_react51.useRef)(null);
|
|
31138
31170
|
const handleSelectEvent = (0, import_react51.useCallback)(
|
|
@@ -31202,7 +31234,7 @@ var HomePage = ({
|
|
|
31202
31234
|
}, [isShowingAllResults, normalizedSearchValue, selectedEvent]);
|
|
31203
31235
|
const resolvedSelectedEvent = selectedEvent != null ? selectedEvent : stickySelectedEvent;
|
|
31204
31236
|
const resolvedAllCategoryTabLabel = allCategoryTabLabel === DEFAULT_ALL_CATEGORY_TAB_LABEL ? labels.home.trending : allCategoryTabLabel;
|
|
31205
|
-
const { categories, isLoading: isCategoriesLoading } = (0,
|
|
31237
|
+
const { categories, isLoading: isCategoriesLoading } = (0, import_hooks79.useCategories)({
|
|
31206
31238
|
limit: categoriesLimit,
|
|
31207
31239
|
enabled: !hasCustomTabs
|
|
31208
31240
|
});
|
|
@@ -31604,13 +31636,13 @@ var HomePage = ({
|
|
|
31604
31636
|
HomePage.displayName = "HomePage";
|
|
31605
31637
|
|
|
31606
31638
|
// src/pages/user-profile/index.tsx
|
|
31607
|
-
var
|
|
31639
|
+
var import_hooks87 = require("@agg-build/hooks");
|
|
31608
31640
|
var import_sdk30 = require("@agg-build/sdk");
|
|
31609
31641
|
var import_dayjs9 = __toESM(require("dayjs"));
|
|
31610
31642
|
var import_react54 = require("react");
|
|
31611
31643
|
|
|
31612
31644
|
// src/pages/user-profile/components/available-balance-card.tsx
|
|
31613
|
-
var
|
|
31645
|
+
var import_hooks80 = require("@agg-build/hooks");
|
|
31614
31646
|
var import_sdk27 = require("@agg-build/sdk");
|
|
31615
31647
|
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
31616
31648
|
var BASE_URL = "https://assets.snagsolutions.io";
|
|
@@ -31661,7 +31693,7 @@ var AvailableBalanceCard = ({
|
|
|
31661
31693
|
onManage,
|
|
31662
31694
|
manageButtonRef
|
|
31663
31695
|
}) => {
|
|
31664
|
-
const labels = (0,
|
|
31696
|
+
const labels = (0, import_hooks80.useLabels)();
|
|
31665
31697
|
const balanceLabels = labels.userProfile.balance;
|
|
31666
31698
|
const resolvedLabel = label2 != null ? label2 : balanceLabels.availableBalance;
|
|
31667
31699
|
const hasPaperBalance = chains.some(isPaperChain);
|
|
@@ -31815,7 +31847,7 @@ var AvailableBalanceCard = ({
|
|
|
31815
31847
|
AvailableBalanceCard.displayName = "AvailableBalanceCard";
|
|
31816
31848
|
|
|
31817
31849
|
// src/pages/user-profile/components/claim-activity-breakdown-modal.tsx
|
|
31818
|
-
var
|
|
31850
|
+
var import_hooks81 = require("@agg-build/hooks");
|
|
31819
31851
|
var import_sdk28 = require("@agg-build/sdk");
|
|
31820
31852
|
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
31821
31853
|
var CLAIM_VENUE_LABELS = {
|
|
@@ -31837,7 +31869,7 @@ var ClaimActivityBreakdownModal = ({
|
|
|
31837
31869
|
onTransactionSelect
|
|
31838
31870
|
}) => {
|
|
31839
31871
|
var _a;
|
|
31840
|
-
const labels = (0,
|
|
31872
|
+
const labels = (0, import_hooks81.useLabels)();
|
|
31841
31873
|
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
31842
31874
|
Modal,
|
|
31843
31875
|
{
|
|
@@ -31946,7 +31978,7 @@ var ClaimActivityBreakdownModal = ({
|
|
|
31946
31978
|
};
|
|
31947
31979
|
|
|
31948
31980
|
// src/pages/user-profile/components/manage-balances-modal.tsx
|
|
31949
|
-
var
|
|
31981
|
+
var import_hooks82 = require("@agg-build/hooks");
|
|
31950
31982
|
var import_sdk29 = require("@agg-build/sdk");
|
|
31951
31983
|
var Dialog9 = __toESM(require("@radix-ui/react-dialog"));
|
|
31952
31984
|
var import_react52 = require("react");
|
|
@@ -32027,11 +32059,11 @@ var ManageBalancesModal = ({
|
|
|
32027
32059
|
open,
|
|
32028
32060
|
onOpenChange
|
|
32029
32061
|
}) => {
|
|
32030
|
-
const labels = (0,
|
|
32062
|
+
const labels = (0, import_hooks82.useLabels)();
|
|
32031
32063
|
const refillLabels = labels.balanceRefill;
|
|
32032
|
-
const balanceState = (0,
|
|
32033
|
-
const depositAddressesQuery = (0,
|
|
32034
|
-
const policiesQuery = (0,
|
|
32064
|
+
const balanceState = (0, import_hooks82.useAggBalance)();
|
|
32065
|
+
const depositAddressesQuery = (0, import_hooks82.useDepositAddresses)({ enabled: open });
|
|
32066
|
+
const policiesQuery = (0, import_hooks82.useBalanceRefillPolicies)({ enabled: open });
|
|
32035
32067
|
const toastContext = useOptionalToast();
|
|
32036
32068
|
const descriptionId = (0, import_react52.useId)();
|
|
32037
32069
|
const savingRef = (0, import_react52.useRef)(false);
|
|
@@ -32652,7 +32684,7 @@ var ManageBalancesModal = ({
|
|
|
32652
32684
|
ManageBalancesModal.displayName = "ManageBalancesModal";
|
|
32653
32685
|
|
|
32654
32686
|
// src/pages/user-profile/components/positions-activity.tsx
|
|
32655
|
-
var
|
|
32687
|
+
var import_hooks85 = require("@agg-build/hooks");
|
|
32656
32688
|
var import_react53 = require("react");
|
|
32657
32689
|
|
|
32658
32690
|
// src/pages/user-profile/user-profile.constants.ts
|
|
@@ -33443,7 +33475,7 @@ var EmptyState = ({ title: title2, description, className }) => {
|
|
|
33443
33475
|
EmptyState.displayName = "EmptyState";
|
|
33444
33476
|
|
|
33445
33477
|
// src/pages/user-profile/components/open-order-row.tsx
|
|
33446
|
-
var
|
|
33478
|
+
var import_hooks83 = require("@agg-build/hooks");
|
|
33447
33479
|
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
33448
33480
|
var shouldUseNativeLinkNavigation2 = (event) => {
|
|
33449
33481
|
return event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button === 1;
|
|
@@ -33485,7 +33517,7 @@ var OpenOrderRow = ({
|
|
|
33485
33517
|
expirationHeader
|
|
33486
33518
|
}) => {
|
|
33487
33519
|
var _a, _b, _c, _d;
|
|
33488
|
-
const labels = (0,
|
|
33520
|
+
const labels = (0, import_hooks83.useLabels)().userProfile.openOrders;
|
|
33489
33521
|
const resolvedCancelLabel = cancelLabel != null ? cancelLabel : labels.cancel;
|
|
33490
33522
|
const resolvedCancelAriaLabel = cancelAriaLabel != null ? cancelAriaLabel : labels.cancelOrderAria(order.id);
|
|
33491
33523
|
const resolvedLimitPriceHeader = limitPriceHeader != null ? limitPriceHeader : labels.limitPriceHeader;
|
|
@@ -33539,7 +33571,7 @@ var OpenOrderRow = ({
|
|
|
33539
33571
|
/* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { className: "agg-open-order-image flex h-10 w-10 shrink-0 items-center justify-center lg:h-15 lg:w-15", children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
33540
33572
|
RemoteImage,
|
|
33541
33573
|
{
|
|
33542
|
-
src: (0,
|
|
33574
|
+
src: (0, import_hooks83.optimizedImageUrl)(order.thumbnailSrc, 60),
|
|
33543
33575
|
alt: "",
|
|
33544
33576
|
className: "h-full w-full rounded-agg-sm object-cover"
|
|
33545
33577
|
}
|
|
@@ -33597,7 +33629,7 @@ var OpenOrderRow = ({
|
|
|
33597
33629
|
OpenOrderRow.displayName = "OpenOrderRow";
|
|
33598
33630
|
|
|
33599
33631
|
// src/pages/user-profile/components/position-row.tsx
|
|
33600
|
-
var
|
|
33632
|
+
var import_hooks84 = require("@agg-build/hooks");
|
|
33601
33633
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
33602
33634
|
var shouldUseNativeLinkNavigation3 = (event) => {
|
|
33603
33635
|
return event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button === 1;
|
|
@@ -33735,8 +33767,8 @@ var PositionRow = ({
|
|
|
33735
33767
|
onClaim,
|
|
33736
33768
|
isClaiming = false
|
|
33737
33769
|
}) => {
|
|
33738
|
-
const labels = (0,
|
|
33739
|
-
const { formatCurrency: formatCurrency2, formatPrice } = (0,
|
|
33770
|
+
const labels = (0, import_hooks84.useLabels)().userProfile.positions;
|
|
33771
|
+
const { formatCurrency: formatCurrency2, formatPrice } = (0, import_hooks84.useAggUiConfig)().formatting;
|
|
33740
33772
|
const model = toPositionRowViewModel(
|
|
33741
33773
|
position,
|
|
33742
33774
|
{
|
|
@@ -33794,7 +33826,7 @@ var PositionRow = ({
|
|
|
33794
33826
|
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)("div", { className: "agg-position-image flex h-10 w-10 shrink-0 items-center justify-center md:h-15 md:w-15", children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
33795
33827
|
RemoteImage,
|
|
33796
33828
|
{
|
|
33797
|
-
src: (0,
|
|
33829
|
+
src: (0, import_hooks84.optimizedImageUrl)(model.thumbnailSrc, 60),
|
|
33798
33830
|
alt: "",
|
|
33799
33831
|
className: "h-full w-full rounded-agg-sm object-cover"
|
|
33800
33832
|
}
|
|
@@ -33963,10 +33995,10 @@ var PositionsActivity = ({
|
|
|
33963
33995
|
initialPositionFilter = "active",
|
|
33964
33996
|
className
|
|
33965
33997
|
}) => {
|
|
33966
|
-
const userProfileLabels = (0,
|
|
33998
|
+
const userProfileLabels = (0, import_hooks85.useLabels)().userProfile;
|
|
33967
33999
|
const positionsLabels = userProfileLabels.positions;
|
|
33968
34000
|
const openOrdersLabels = userProfileLabels.openOrders;
|
|
33969
|
-
const { formatCurrency: formatCurrency2, formatPrice } = (0,
|
|
34001
|
+
const { formatCurrency: formatCurrency2, formatPrice } = (0, import_hooks85.useAggUiConfig)().formatting;
|
|
33970
34002
|
const tabItems = (0, import_react53.useMemo)(
|
|
33971
34003
|
() => getTabItems(userProfileLabels.tabs, showOpenOrders),
|
|
33972
34004
|
[showOpenOrders, userProfileLabels.tabs]
|
|
@@ -34234,7 +34266,7 @@ var PositionsActivity = ({
|
|
|
34234
34266
|
/* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
|
|
34235
34267
|
"img",
|
|
34236
34268
|
{
|
|
34237
|
-
src: (0,
|
|
34269
|
+
src: (0, import_hooks85.optimizedImageUrl)(item.thumbnailSrc, 48),
|
|
34238
34270
|
alt: "",
|
|
34239
34271
|
className: "size-12 shrink-0 rounded-agg-lg object-cover"
|
|
34240
34272
|
}
|
|
@@ -34597,7 +34629,7 @@ var buildAggTxExplorerHref = (chainId, txHash) => {
|
|
|
34597
34629
|
};
|
|
34598
34630
|
|
|
34599
34631
|
// src/pages/user-profile/components/user-info-card.tsx
|
|
34600
|
-
var
|
|
34632
|
+
var import_hooks86 = require("@agg-build/hooks");
|
|
34601
34633
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
34602
34634
|
var UserInfoCard = ({
|
|
34603
34635
|
user,
|
|
@@ -34609,7 +34641,7 @@ var UserInfoCard = ({
|
|
|
34609
34641
|
className
|
|
34610
34642
|
}) => {
|
|
34611
34643
|
var _a;
|
|
34612
|
-
const labels = (0,
|
|
34644
|
+
const labels = (0, import_hooks86.useLabels)();
|
|
34613
34645
|
const wallets = (_a = user.connectedWallets) != null ? _a : [];
|
|
34614
34646
|
const hasWallets = wallets.length > 0;
|
|
34615
34647
|
return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
|
|
@@ -34625,7 +34657,7 @@ var UserInfoCard = ({
|
|
|
34625
34657
|
/* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "agg-profile-avatar shrink-0", children: user.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
34626
34658
|
RemoteImage,
|
|
34627
34659
|
{
|
|
34628
|
-
src: (0,
|
|
34660
|
+
src: (0, import_hooks86.optimizedImageUrl)(user.avatarUrl, 120),
|
|
34629
34661
|
alt: user.username,
|
|
34630
34662
|
className: "h-20 w-20 rounded-full object-cover sm:h-[120px] sm:w-[120px]"
|
|
34631
34663
|
}
|
|
@@ -35258,15 +35290,15 @@ var UserProfilePage = ({
|
|
|
35258
35290
|
(0, import_react54.useEffect)(() => {
|
|
35259
35291
|
setIsHydrated(true);
|
|
35260
35292
|
}, []);
|
|
35261
|
-
const { user: currentUser, isAuthenticated } = (0,
|
|
35262
|
-
const { isDepositBlocked } = (0,
|
|
35263
|
-
const balanceState = (0,
|
|
35264
|
-
const labels = (0,
|
|
35293
|
+
const { user: currentUser, isAuthenticated } = (0, import_hooks87.useAggAuthState)();
|
|
35294
|
+
const { isDepositBlocked } = (0, import_hooks87.useGeoBlock)();
|
|
35295
|
+
const balanceState = (0, import_hooks87.useAggBalance)();
|
|
35296
|
+
const labels = (0, import_hooks87.useLabels)();
|
|
35265
35297
|
const {
|
|
35266
35298
|
features: { showLimitOrders }
|
|
35267
|
-
} = (0,
|
|
35268
|
-
const client = (0,
|
|
35269
|
-
const cancelOrderMutation = (0,
|
|
35299
|
+
} = (0, import_hooks87.useSdkUiConfig)();
|
|
35300
|
+
const client = (0, import_hooks87.useAggClient)();
|
|
35301
|
+
const cancelOrderMutation = (0, import_hooks87.useCancelManagedOrder)();
|
|
35270
35302
|
const toastContext = useOptionalToast();
|
|
35271
35303
|
const [internalCancellingIds, setInternalCancellingIds] = (0, import_react54.useState)({});
|
|
35272
35304
|
const { claim: startClaim, claimingKeys } = useClaimWinnings({
|
|
@@ -35287,7 +35319,7 @@ var UserProfilePage = ({
|
|
|
35287
35319
|
const [selectedClaimActivity, setSelectedClaimActivity] = (0, import_react54.useState)(null);
|
|
35288
35320
|
const [isManageBalancesOpen, setIsManageBalancesOpen] = (0, import_react54.useState)(false);
|
|
35289
35321
|
const manageBalancesButtonRef = (0, import_react54.useRef)(null);
|
|
35290
|
-
const { executionMode: resolvedExecutionMode, isPaperMode } = (0,
|
|
35322
|
+
const { executionMode: resolvedExecutionMode, isPaperMode } = (0, import_hooks87.useResolvedExecutionMode)(executionMode);
|
|
35291
35323
|
const queryExecutionMode = resolvedExecutionMode === "paper" ? "paper" : void 0;
|
|
35292
35324
|
const handleManageBalancesOpenChange = (0, import_react54.useCallback)((open) => {
|
|
35293
35325
|
setIsManageBalancesOpen(open);
|
|
@@ -35297,13 +35329,13 @@ var UserProfilePage = ({
|
|
|
35297
35329
|
return (_a2 = manageBalancesButtonRef.current) == null ? void 0 : _a2.focus();
|
|
35298
35330
|
});
|
|
35299
35331
|
}, []);
|
|
35300
|
-
const activePositionsQuery = (0,
|
|
35332
|
+
const activePositionsQuery = (0, import_hooks87.useExecutionPositions)({
|
|
35301
35333
|
enabled: shouldUseHookData && isAuthenticated,
|
|
35302
35334
|
status: "active",
|
|
35303
35335
|
limit: 25,
|
|
35304
35336
|
mode: queryExecutionMode
|
|
35305
35337
|
});
|
|
35306
|
-
const closedPositionsQuery = (0,
|
|
35338
|
+
const closedPositionsQuery = (0, import_hooks87.useExecutionPositions)({
|
|
35307
35339
|
enabled: shouldUseHookData && isAuthenticated,
|
|
35308
35340
|
status: "closed",
|
|
35309
35341
|
limit: 25,
|
|
@@ -35319,62 +35351,62 @@ var UserProfilePage = ({
|
|
|
35319
35351
|
(0, import_react54.useEffect)(() => {
|
|
35320
35352
|
setPositionFilter(initialPositionFilter);
|
|
35321
35353
|
}, [initialPositionFilter]);
|
|
35322
|
-
const ordersQuery = (0,
|
|
35354
|
+
const ordersQuery = (0, import_hooks87.useExecutionOrders)({
|
|
35323
35355
|
enabled: shouldUseHookData && isAuthenticated,
|
|
35324
35356
|
limit: 25,
|
|
35325
35357
|
mode: queryExecutionMode,
|
|
35326
35358
|
refetchIntervalMs: 5e3
|
|
35327
35359
|
});
|
|
35328
|
-
const pendingOpenOrdersQuery = (0,
|
|
35360
|
+
const pendingOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
|
|
35329
35361
|
enabled: shouldUseHookData && isAuthenticated && !openOrders,
|
|
35330
35362
|
status: OPEN_ORDER_QUERY_STATUSES[0],
|
|
35331
35363
|
orderType: "limit",
|
|
35332
35364
|
limit: 25,
|
|
35333
35365
|
mode: queryExecutionMode
|
|
35334
35366
|
});
|
|
35335
|
-
const signingOpenOrdersQuery = (0,
|
|
35367
|
+
const signingOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
|
|
35336
35368
|
enabled: shouldUseHookData && isAuthenticated && !openOrders,
|
|
35337
35369
|
status: OPEN_ORDER_QUERY_STATUSES[1],
|
|
35338
35370
|
orderType: "limit",
|
|
35339
35371
|
limit: 25,
|
|
35340
35372
|
mode: queryExecutionMode
|
|
35341
35373
|
});
|
|
35342
|
-
const pendingBridgeOpenOrdersQuery = (0,
|
|
35374
|
+
const pendingBridgeOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
|
|
35343
35375
|
enabled: shouldUseHookData && isAuthenticated && !openOrders,
|
|
35344
35376
|
status: OPEN_ORDER_QUERY_STATUSES[2],
|
|
35345
35377
|
orderType: "limit",
|
|
35346
35378
|
limit: 25,
|
|
35347
35379
|
mode: queryExecutionMode
|
|
35348
35380
|
});
|
|
35349
|
-
const submittingOpenOrdersQuery = (0,
|
|
35381
|
+
const submittingOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
|
|
35350
35382
|
enabled: shouldUseHookData && isAuthenticated && !openOrders,
|
|
35351
35383
|
status: OPEN_ORDER_QUERY_STATUSES[3],
|
|
35352
35384
|
orderType: "limit",
|
|
35353
35385
|
limit: 25,
|
|
35354
35386
|
mode: queryExecutionMode
|
|
35355
35387
|
});
|
|
35356
|
-
const submittedOpenOrdersQuery = (0,
|
|
35388
|
+
const submittedOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
|
|
35357
35389
|
enabled: shouldUseHookData && isAuthenticated && !openOrders,
|
|
35358
35390
|
status: OPEN_ORDER_QUERY_STATUSES[4],
|
|
35359
35391
|
orderType: "limit",
|
|
35360
35392
|
limit: 25,
|
|
35361
35393
|
mode: queryExecutionMode
|
|
35362
35394
|
});
|
|
35363
|
-
const openOpenOrdersQuery = (0,
|
|
35395
|
+
const openOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
|
|
35364
35396
|
enabled: shouldUseHookData && isAuthenticated && !openOrders,
|
|
35365
35397
|
status: OPEN_ORDER_QUERY_STATUSES[5],
|
|
35366
35398
|
orderType: "limit",
|
|
35367
35399
|
limit: 25,
|
|
35368
35400
|
mode: queryExecutionMode
|
|
35369
35401
|
});
|
|
35370
|
-
const partiallyFilledOpenOrdersQuery = (0,
|
|
35402
|
+
const partiallyFilledOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
|
|
35371
35403
|
enabled: shouldUseHookData && isAuthenticated && !openOrders,
|
|
35372
35404
|
status: OPEN_ORDER_QUERY_STATUSES[6],
|
|
35373
35405
|
orderType: "limit",
|
|
35374
35406
|
limit: 25,
|
|
35375
35407
|
mode: queryExecutionMode
|
|
35376
35408
|
});
|
|
35377
|
-
const cancelPendingOpenOrdersQuery = (0,
|
|
35409
|
+
const cancelPendingOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
|
|
35378
35410
|
enabled: shouldUseHookData && isAuthenticated && !openOrders,
|
|
35379
35411
|
status: OPEN_ORDER_QUERY_STATUSES[7],
|
|
35380
35412
|
orderType: "limit",
|
|
@@ -35403,7 +35435,7 @@ var UserProfilePage = ({
|
|
|
35403
35435
|
submittingOpenOrdersQuery
|
|
35404
35436
|
]
|
|
35405
35437
|
);
|
|
35406
|
-
const activityQuery = (0,
|
|
35438
|
+
const activityQuery = (0, import_hooks87.useUserActivity)({
|
|
35407
35439
|
enabled: shouldUseHookData && isAuthenticated,
|
|
35408
35440
|
limit: 25
|
|
35409
35441
|
});
|
|
@@ -35490,7 +35522,7 @@ var UserProfilePage = ({
|
|
|
35490
35522
|
var _a2, _b2, _c2, _d, _e, _f;
|
|
35491
35523
|
if (user) return user;
|
|
35492
35524
|
const fullUser = profileUser != null ? profileUser : currentUser;
|
|
35493
|
-
const walletAddress = (0,
|
|
35525
|
+
const walletAddress = (0, import_hooks87.getWalletAddressFromUserProfile)(fullUser);
|
|
35494
35526
|
const fallbackUsername = walletAddress && shortenAddress(walletAddress) || "username";
|
|
35495
35527
|
const twitterAccount = (_a2 = fullUser == null ? void 0 : fullUser.accounts) == null ? void 0 : _a2.find(
|
|
35496
35528
|
(account) => String(account.provider).toLowerCase() === "twitter"
|
|
@@ -35552,8 +35584,8 @@ var UserProfilePage = ({
|
|
|
35552
35584
|
},
|
|
35553
35585
|
[paperSummary == null ? void 0 : paperSummary.earnings]
|
|
35554
35586
|
);
|
|
35555
|
-
const { disabledVenues, isLoading: isAppConfigLoading } = (0,
|
|
35556
|
-
const isKalshiAvailable = (0,
|
|
35587
|
+
const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks87.useAppConfig)();
|
|
35588
|
+
const isKalshiAvailable = (0, import_hooks87.getVenueAvailabilityState)({
|
|
35557
35589
|
venueId: import_sdk30.Venue.kalshi,
|
|
35558
35590
|
disabledVenues,
|
|
35559
35591
|
isConfigLoading: isAppConfigLoading
|
|
@@ -35781,7 +35813,7 @@ var UserProfilePage = ({
|
|
|
35781
35813
|
(groups) => {
|
|
35782
35814
|
return groups.flatMap((group) => {
|
|
35783
35815
|
var _a2, _b2, _c2, _d;
|
|
35784
|
-
const closedTotals = (0,
|
|
35816
|
+
const closedTotals = (0, import_hooks87.computeClosedPositionTotals)(group);
|
|
35785
35817
|
const winningOutcome = group.venueMarket.venueMarketOutcomes.find(
|
|
35786
35818
|
(outcome) => outcome.winner === true
|
|
35787
35819
|
);
|
|
@@ -36088,7 +36120,7 @@ var UserProfilePage = ({
|
|
|
36088
36120
|
UserProfilePage.displayName = "UserProfilePage";
|
|
36089
36121
|
|
|
36090
36122
|
// src/deposit/index.tsx
|
|
36091
|
-
var
|
|
36123
|
+
var import_hooks98 = require("@agg-build/hooks");
|
|
36092
36124
|
var import_deposit = require("@agg-build/hooks/deposit");
|
|
36093
36125
|
var import_react57 = require("react");
|
|
36094
36126
|
|
|
@@ -36321,7 +36353,7 @@ var NETWORK_TO_CURRENCY_CODE = {
|
|
|
36321
36353
|
};
|
|
36322
36354
|
|
|
36323
36355
|
// src/deposit/steps/card-deposit.tsx
|
|
36324
|
-
var
|
|
36356
|
+
var import_hooks88 = require("@agg-build/hooks");
|
|
36325
36357
|
var import_react55 = require("react");
|
|
36326
36358
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
36327
36359
|
var CardDepositStep = ({
|
|
@@ -36339,7 +36371,7 @@ var CardDepositStep = ({
|
|
|
36339
36371
|
onNetworkChange,
|
|
36340
36372
|
onContinue
|
|
36341
36373
|
}) => {
|
|
36342
|
-
const labels = (0,
|
|
36374
|
+
const labels = (0, import_hooks88.useLabels)();
|
|
36343
36375
|
const [localAmount, setLocalAmount] = (0, import_react55.useState)(amount);
|
|
36344
36376
|
(0, import_react55.useEffect)(() => {
|
|
36345
36377
|
setLocalAmount(amount);
|
|
@@ -36456,7 +36488,7 @@ var CardDepositStep = ({
|
|
|
36456
36488
|
};
|
|
36457
36489
|
|
|
36458
36490
|
// src/deposit/steps/card-payment-pending.tsx
|
|
36459
|
-
var
|
|
36491
|
+
var import_hooks89 = require("@agg-build/hooks");
|
|
36460
36492
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
36461
36493
|
var CardPaymentPendingStep = ({
|
|
36462
36494
|
providerName,
|
|
@@ -36465,7 +36497,7 @@ var CardPaymentPendingStep = ({
|
|
|
36465
36497
|
onViewActivity,
|
|
36466
36498
|
onChooseAnotherProvider
|
|
36467
36499
|
}) => {
|
|
36468
|
-
const labels = (0,
|
|
36500
|
+
const labels = (0, import_hooks89.useLabels)();
|
|
36469
36501
|
return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
|
|
36470
36502
|
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
36471
36503
|
"button",
|
|
@@ -36515,10 +36547,10 @@ var CardPaymentPendingStep = ({
|
|
|
36515
36547
|
};
|
|
36516
36548
|
|
|
36517
36549
|
// src/deposit/steps/card-provider.tsx
|
|
36518
|
-
var
|
|
36550
|
+
var import_hooks90 = require("@agg-build/hooks");
|
|
36519
36551
|
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
36520
36552
|
var CardProviderItem = ({ provider, onSelect }) => {
|
|
36521
|
-
const labels = (0,
|
|
36553
|
+
const labels = (0, import_hooks90.useLabels)();
|
|
36522
36554
|
const badgeText = provider.badge === "best" ? labels.deposit.cardFlow.providerBadges.best : provider.badge === "low-kyc" ? labels.deposit.cardFlow.providerBadges.lowKyc : void 0;
|
|
36523
36555
|
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
36524
36556
|
"button",
|
|
@@ -36564,7 +36596,7 @@ var CardProviderStep = ({
|
|
|
36564
36596
|
onSelectProvider,
|
|
36565
36597
|
onRetry
|
|
36566
36598
|
}) => {
|
|
36567
|
-
const labels = (0,
|
|
36599
|
+
const labels = (0, import_hooks90.useLabels)();
|
|
36568
36600
|
return /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(import_jsx_runtime199.Fragment, { children: [
|
|
36569
36601
|
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
36570
36602
|
Modal.Header,
|
|
@@ -36628,7 +36660,7 @@ var CardProviderStep = ({
|
|
|
36628
36660
|
};
|
|
36629
36661
|
|
|
36630
36662
|
// src/deposit/steps/card-purchase-success.tsx
|
|
36631
|
-
var
|
|
36663
|
+
var import_hooks91 = require("@agg-build/hooks");
|
|
36632
36664
|
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
36633
36665
|
var SummaryRow = ({ label: label2, value }) => /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)("div", { className: "flex items-center justify-between border-b border-agg-separator py-2 last:border-b-0", children: [
|
|
36634
36666
|
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label2 }),
|
|
@@ -36639,7 +36671,7 @@ var CardPurchaseSuccessStep = ({
|
|
|
36639
36671
|
onDone,
|
|
36640
36672
|
onClose
|
|
36641
36673
|
}) => {
|
|
36642
|
-
const labels = (0,
|
|
36674
|
+
const labels = (0, import_hooks91.useLabels)();
|
|
36643
36675
|
return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
|
|
36644
36676
|
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
36645
36677
|
"button",
|
|
@@ -36674,10 +36706,10 @@ var CardPurchaseSuccessStep = ({
|
|
|
36674
36706
|
};
|
|
36675
36707
|
|
|
36676
36708
|
// src/deposit/steps/crypto-transfer.tsx
|
|
36677
|
-
var
|
|
36709
|
+
var import_hooks93 = require("@agg-build/hooks");
|
|
36678
36710
|
|
|
36679
36711
|
// src/shared/transfer-fee-summary.tsx
|
|
36680
|
-
var
|
|
36712
|
+
var import_hooks92 = require("@agg-build/hooks");
|
|
36681
36713
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
36682
36714
|
var separator = /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("span", { className: "text-agg-muted-foreground", "aria-hidden": "true", children: "\xB7" });
|
|
36683
36715
|
var normalizeFeeLabel = (label2) => label2.replace(/\s*~\s*$/, "");
|
|
@@ -36687,7 +36719,7 @@ var TransferFeeSummary = ({
|
|
|
36687
36719
|
minDeposit,
|
|
36688
36720
|
eta
|
|
36689
36721
|
}) => {
|
|
36690
|
-
const labels = (0,
|
|
36722
|
+
const labels = (0, import_hooks92.useLabels)();
|
|
36691
36723
|
if (!estimate) return null;
|
|
36692
36724
|
if (view === "deposit") {
|
|
36693
36725
|
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)("p", { className: "agg-type-label flex flex-wrap items-center gap-x-2 gap-y-1 text-agg-foreground", children: [
|
|
@@ -36793,7 +36825,7 @@ DepositQRCode.displayName = "DepositQRCode";
|
|
|
36793
36825
|
// src/deposit/steps/crypto-transfer.tsx
|
|
36794
36826
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
36795
36827
|
var CryptoAddressLoadingState = () => {
|
|
36796
|
-
const labels = (0,
|
|
36828
|
+
const labels = (0, import_hooks93.useLabels)();
|
|
36797
36829
|
const sendCryptoLabels = labels.deposit.sendCrypto;
|
|
36798
36830
|
return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(
|
|
36799
36831
|
"div",
|
|
@@ -36838,11 +36870,11 @@ var CryptoTransferStep = ({
|
|
|
36838
36870
|
onDone
|
|
36839
36871
|
}) => {
|
|
36840
36872
|
var _a;
|
|
36841
|
-
const labels = (0,
|
|
36873
|
+
const labels = (0, import_hooks93.useLabels)();
|
|
36842
36874
|
const selectedNetworkOption = networkOptions.find((n) => n.value === selectedNetwork);
|
|
36843
36875
|
const networkLogoUrl = (_a = selectedNetworkOption == null ? void 0 : selectedNetworkOption.iconUrl) != null ? _a : "";
|
|
36844
36876
|
const networkLogo = selectedNetworkOption == null ? void 0 : selectedNetworkOption.icon;
|
|
36845
|
-
const transferFeeEstimate = (0,
|
|
36877
|
+
const transferFeeEstimate = (0, import_hooks93.useWithdrawEstimate)({
|
|
36846
36878
|
amount: getEstimateAmountFromMinDeposit(minDeposit),
|
|
36847
36879
|
selectedToken,
|
|
36848
36880
|
selectedNetwork
|
|
@@ -36945,7 +36977,7 @@ var CryptoTransferStep = ({
|
|
|
36945
36977
|
};
|
|
36946
36978
|
|
|
36947
36979
|
// src/deposit/steps/deposit-method.tsx
|
|
36948
|
-
var
|
|
36980
|
+
var import_hooks94 = require("@agg-build/hooks");
|
|
36949
36981
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
36950
36982
|
var DepositMethodCard = ({
|
|
36951
36983
|
icon,
|
|
@@ -36998,7 +37030,7 @@ var DepositMethodStep = ({
|
|
|
36998
37030
|
depositAddressesReady = true,
|
|
36999
37031
|
onSelectMethod
|
|
37000
37032
|
}) => {
|
|
37001
|
-
const labels = (0,
|
|
37033
|
+
const labels = (0, import_hooks94.useLabels)();
|
|
37002
37034
|
return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(import_jsx_runtime204.Fragment, { children: [
|
|
37003
37035
|
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(Modal.Header, { title: labels.deposit.title, hideBorder: true }),
|
|
37004
37036
|
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)("div", { className: "flex flex-col gap-5", children: [
|
|
@@ -37047,7 +37079,7 @@ var DepositMethodStep = ({
|
|
|
37047
37079
|
};
|
|
37048
37080
|
|
|
37049
37081
|
// src/deposit/steps/wallet-form.tsx
|
|
37050
|
-
var
|
|
37082
|
+
var import_hooks95 = require("@agg-build/hooks");
|
|
37051
37083
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
37052
37084
|
var WalletFormStep = ({
|
|
37053
37085
|
walletLabel,
|
|
@@ -37071,7 +37103,7 @@ var WalletFormStep = ({
|
|
|
37071
37103
|
onMax,
|
|
37072
37104
|
onConfirm
|
|
37073
37105
|
}) => {
|
|
37074
|
-
const labels = (0,
|
|
37106
|
+
const labels = (0, import_hooks95.useLabels)();
|
|
37075
37107
|
const isConfirmEnabled = !isSubmitting && !isBalanceLoading && Number(amount) > 0 && Number(amount) <= walletBalance;
|
|
37076
37108
|
return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(import_jsx_runtime205.Fragment, { children: [
|
|
37077
37109
|
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
@@ -37197,7 +37229,7 @@ var WalletFormStep = ({
|
|
|
37197
37229
|
};
|
|
37198
37230
|
|
|
37199
37231
|
// src/deposit/steps/wallet-processing.tsx
|
|
37200
|
-
var
|
|
37232
|
+
var import_hooks96 = require("@agg-build/hooks");
|
|
37201
37233
|
var import_react56 = require("react");
|
|
37202
37234
|
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
37203
37235
|
var WalletProcessingStep = ({
|
|
@@ -37205,7 +37237,7 @@ var WalletProcessingStep = ({
|
|
|
37205
37237
|
errorMessage,
|
|
37206
37238
|
onComplete
|
|
37207
37239
|
}) => {
|
|
37208
|
-
const labels = (0,
|
|
37240
|
+
const labels = (0, import_hooks96.useLabels)();
|
|
37209
37241
|
(0, import_react56.useEffect)(() => {
|
|
37210
37242
|
const allDone = steps.length > 0 && steps.every((s) => s.status === "complete");
|
|
37211
37243
|
if (allDone) {
|
|
@@ -37244,7 +37276,7 @@ var WalletProcessingStep = ({
|
|
|
37244
37276
|
};
|
|
37245
37277
|
|
|
37246
37278
|
// src/deposit/steps/wallet-success.tsx
|
|
37247
|
-
var
|
|
37279
|
+
var import_hooks97 = require("@agg-build/hooks");
|
|
37248
37280
|
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
37249
37281
|
var SummaryRow2 = ({ label: label2, value }) => /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)("div", { className: "flex items-center justify-between border-b border-agg-separator py-2 last:border-b-0", children: [
|
|
37250
37282
|
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label2 }),
|
|
@@ -37255,7 +37287,7 @@ var WalletSuccessStep = ({
|
|
|
37255
37287
|
onDone,
|
|
37256
37288
|
onClose
|
|
37257
37289
|
}) => {
|
|
37258
|
-
const labels = (0,
|
|
37290
|
+
const labels = (0, import_hooks97.useLabels)();
|
|
37259
37291
|
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
|
|
37260
37292
|
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
37261
37293
|
"button",
|
|
@@ -37375,9 +37407,9 @@ function DepositModalControlled({
|
|
|
37375
37407
|
pendingCardPurchaseSummary
|
|
37376
37408
|
}) {
|
|
37377
37409
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
37378
|
-
const { isWeb3User } = (0,
|
|
37379
|
-
const { walletActions } = (0,
|
|
37380
|
-
const labels = (0,
|
|
37410
|
+
const { isWeb3User } = (0, import_hooks98.useAggAuthState)();
|
|
37411
|
+
const { walletActions } = (0, import_hooks98.useAggUiConfig)();
|
|
37412
|
+
const labels = (0, import_hooks98.useLabels)();
|
|
37381
37413
|
const defaultMethod = isWeb3User ? "wallet" : "crypto";
|
|
37382
37414
|
const [step, setStep] = (0, import_react57.useState)(
|
|
37383
37415
|
() => pendingCardPurchaseSummary ? "card-success" : "method"
|
|
@@ -37409,7 +37441,7 @@ function DepositModalControlled({
|
|
|
37409
37441
|
error: addrError,
|
|
37410
37442
|
supportedChains,
|
|
37411
37443
|
getAddress
|
|
37412
|
-
} = (0,
|
|
37444
|
+
} = (0, import_hooks98.useDepositAddresses)({ enabled: open });
|
|
37413
37445
|
const fallbackNetworkOptions = (0, import_react57.useMemo)(() => mapNetworksToOptions(), []);
|
|
37414
37446
|
const networkOptions = (0, import_react57.useMemo)(() => {
|
|
37415
37447
|
if (!(supportedChains == null ? void 0 : supportedChains.length)) return fallbackNetworkOptions;
|
|
@@ -37855,13 +37887,13 @@ var import_react58 = require("react");
|
|
|
37855
37887
|
var import_withdraw = require("@agg-build/hooks/withdraw");
|
|
37856
37888
|
|
|
37857
37889
|
// src/withdraw/steps/withdraw-method.tsx
|
|
37858
|
-
var
|
|
37890
|
+
var import_hooks99 = require("@agg-build/hooks");
|
|
37859
37891
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
37860
37892
|
var WithdrawMethodStep = ({
|
|
37861
37893
|
balance,
|
|
37862
37894
|
onSelectMethod
|
|
37863
37895
|
}) => {
|
|
37864
|
-
const labels = (0,
|
|
37896
|
+
const labels = (0, import_hooks99.useLabels)();
|
|
37865
37897
|
return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(import_jsx_runtime209.Fragment, { children: [
|
|
37866
37898
|
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(Modal.Header, { title: labels.withdraw.title, hideBorder: true }),
|
|
37867
37899
|
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)("div", { className: "flex flex-col gap-5", children: [
|
|
@@ -37901,7 +37933,7 @@ var WithdrawMethodStep = ({
|
|
|
37901
37933
|
};
|
|
37902
37934
|
|
|
37903
37935
|
// src/withdraw/steps/withdraw-amount.tsx
|
|
37904
|
-
var
|
|
37936
|
+
var import_hooks100 = require("@agg-build/hooks");
|
|
37905
37937
|
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
37906
37938
|
var formatRawTokenAmount = (rawAmount, decimals) => {
|
|
37907
37939
|
if (!rawAmount) return "0";
|
|
@@ -37946,7 +37978,7 @@ var WithdrawAmountStep = ({
|
|
|
37946
37978
|
onContinue
|
|
37947
37979
|
}) => {
|
|
37948
37980
|
var _a, _b, _c, _d;
|
|
37949
|
-
const labels = (0,
|
|
37981
|
+
const labels = (0, import_hooks100.useLabels)();
|
|
37950
37982
|
const SOLANA_CHAIN_ID = "792703809";
|
|
37951
37983
|
const isSolanaDest = selectedNetwork === SOLANA_CHAIN_ID;
|
|
37952
37984
|
const trimmedDestination = destinationWallet.trim();
|
|
@@ -37954,7 +37986,7 @@ var WithdrawAmountStep = ({
|
|
|
37954
37986
|
const isValid = Number(amount) > 0 && isValidAddress;
|
|
37955
37987
|
const amountRaw = amount && Number(amount) > 0 ? parseTokenAmountToRaw(amount, destDecimals) : null;
|
|
37956
37988
|
const destinationChainId = Number(selectedNetwork) || null;
|
|
37957
|
-
const preview = (0,
|
|
37989
|
+
const preview = (0, import_hooks100.useWithdrawPreview)({
|
|
37958
37990
|
amountRaw,
|
|
37959
37991
|
tokenSymbol: selectedToken || null,
|
|
37960
37992
|
destinationChainId,
|
|
@@ -38093,7 +38125,7 @@ var WithdrawAmountStep = ({
|
|
|
38093
38125
|
};
|
|
38094
38126
|
|
|
38095
38127
|
// src/withdraw/steps/withdraw-success.tsx
|
|
38096
|
-
var
|
|
38128
|
+
var import_hooks101 = require("@agg-build/hooks");
|
|
38097
38129
|
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
38098
38130
|
var SummaryRow3 = ({ label: label2, value }) => /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)("div", { className: "flex items-center justify-between gap-4 border-b border-agg-separator py-2 last:border-b-0", children: [
|
|
38099
38131
|
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)("p", { className: "min-w-0 text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label2 }),
|
|
@@ -38138,10 +38170,10 @@ var WithdrawLoadingStep = ({
|
|
|
38138
38170
|
lifecycleState,
|
|
38139
38171
|
onClose
|
|
38140
38172
|
}) => {
|
|
38141
|
-
const labels = (0,
|
|
38173
|
+
const labels = (0, import_hooks101.useLabels)();
|
|
38142
38174
|
const {
|
|
38143
38175
|
features: { enableAnimations }
|
|
38144
|
-
} = (0,
|
|
38176
|
+
} = (0, import_hooks101.useSdkUiConfig)();
|
|
38145
38177
|
const walletFlowLabels = labels.withdraw.walletFlow;
|
|
38146
38178
|
const activeIndex = loadingActiveIndexFor(lifecycleState);
|
|
38147
38179
|
const loadingSteps = getLoadingSteps(walletFlowLabels);
|
|
@@ -38225,7 +38257,7 @@ var WithdrawSuccessStep = ({
|
|
|
38225
38257
|
onRetry,
|
|
38226
38258
|
onClose
|
|
38227
38259
|
}) => {
|
|
38228
|
-
const labels = (0,
|
|
38260
|
+
const labels = (0, import_hooks101.useLabels)();
|
|
38229
38261
|
const walletFlowLabels = labels.withdraw.walletFlow;
|
|
38230
38262
|
const { title: title2, description } = resultCopyFor({
|
|
38231
38263
|
status: resultStatus,
|
|
@@ -38532,11 +38564,11 @@ var WithdrawModal = (props) => {
|
|
|
38532
38564
|
WithdrawModal.displayName = "WithdrawModal";
|
|
38533
38565
|
|
|
38534
38566
|
// src/paper-trading/paper-trading-onboarding.tsx
|
|
38535
|
-
var
|
|
38567
|
+
var import_hooks103 = require("@agg-build/hooks");
|
|
38536
38568
|
|
|
38537
38569
|
// src/paper-trading/paper-onboarding-modal.tsx
|
|
38538
38570
|
var import_react59 = require("react");
|
|
38539
|
-
var
|
|
38571
|
+
var import_hooks102 = require("@agg-build/hooks");
|
|
38540
38572
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
38541
38573
|
var PaperOnboardingModal = ({
|
|
38542
38574
|
open,
|
|
@@ -38544,7 +38576,7 @@ var PaperOnboardingModal = ({
|
|
|
38544
38576
|
startingBalanceLabel,
|
|
38545
38577
|
classNames
|
|
38546
38578
|
}) => {
|
|
38547
|
-
const labels = (0,
|
|
38579
|
+
const labels = (0, import_hooks102.useLabels)();
|
|
38548
38580
|
const copy = labels.paperTrading.onboarding;
|
|
38549
38581
|
const [stepIndex, setStepIndex] = (0, import_react59.useState)(0);
|
|
38550
38582
|
const steps = (0, import_react59.useMemo)(
|
|
@@ -38698,8 +38730,8 @@ var FALLBACK_STARTING_BALANCE = 1e4;
|
|
|
38698
38730
|
var PaperTradingOnboarding = ({
|
|
38699
38731
|
classNames
|
|
38700
38732
|
}) => {
|
|
38701
|
-
const { isOpen, dismiss } = (0,
|
|
38702
|
-
const { paperStartingBalance } = (0,
|
|
38733
|
+
const { isOpen, dismiss } = (0, import_hooks103.usePaperOnboarding)();
|
|
38734
|
+
const { paperStartingBalance } = (0, import_hooks103.useAppConfig)();
|
|
38703
38735
|
if (!isOpen) return null;
|
|
38704
38736
|
return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
38705
38737
|
PaperOnboardingModal,
|
|
@@ -38717,7 +38749,7 @@ PaperTradingOnboarding.displayName = "PaperTradingOnboarding";
|
|
|
38717
38749
|
|
|
38718
38750
|
// src/profile/index.tsx
|
|
38719
38751
|
var import_react62 = require("react");
|
|
38720
|
-
var
|
|
38752
|
+
var import_hooks106 = require("@agg-build/hooks");
|
|
38721
38753
|
var import_sdk31 = require("@agg-build/sdk");
|
|
38722
38754
|
|
|
38723
38755
|
// src/profile/profile-modal.constants.ts
|
|
@@ -38736,7 +38768,7 @@ var getProfileTabItems = () => [
|
|
|
38736
38768
|
|
|
38737
38769
|
// src/profile/tabs/about-tab.tsx
|
|
38738
38770
|
var import_react60 = require("react");
|
|
38739
|
-
var
|
|
38771
|
+
var import_hooks104 = require("@agg-build/hooks");
|
|
38740
38772
|
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
38741
38773
|
var AboutTab = ({
|
|
38742
38774
|
avatarPreview,
|
|
@@ -38747,7 +38779,7 @@ var AboutTab = ({
|
|
|
38747
38779
|
draftAvatarPreview,
|
|
38748
38780
|
avatarError: _avatarError
|
|
38749
38781
|
}) => {
|
|
38750
|
-
const labels = (0,
|
|
38782
|
+
const labels = (0, import_hooks104.useLabels)();
|
|
38751
38783
|
const fileInputRef = (0, import_react60.useRef)(null);
|
|
38752
38784
|
const handleAvatarClick = (0, import_react60.useCallback)(() => {
|
|
38753
38785
|
var _a;
|
|
@@ -39022,7 +39054,7 @@ var AccountsWalletsTab = ({
|
|
|
39022
39054
|
AccountsWalletsTab.displayName = "AccountsWalletsTab";
|
|
39023
39055
|
|
|
39024
39056
|
// src/profile/tabs/trading-access-tab.tsx
|
|
39025
|
-
var
|
|
39057
|
+
var import_hooks105 = require("@agg-build/hooks");
|
|
39026
39058
|
var import_react61 = require("react");
|
|
39027
39059
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
39028
39060
|
var TRADING_ACCESS_VENUES = [
|
|
@@ -39049,14 +39081,14 @@ var AccessRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)
|
|
|
39049
39081
|
}
|
|
39050
39082
|
);
|
|
39051
39083
|
var AvailableStatus = () => {
|
|
39052
|
-
const labels = (0,
|
|
39084
|
+
const labels = (0, import_hooks105.useLabels)();
|
|
39053
39085
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
39054
39086
|
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)(Icon, { name: "check-badge", size: "small", className: "text-agg-primary" }),
|
|
39055
39087
|
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground whitespace-nowrap", children: labels.trading.tradingAccessAvailable })
|
|
39056
39088
|
] });
|
|
39057
39089
|
};
|
|
39058
39090
|
var GeoblockedStatus = () => {
|
|
39059
|
-
const labels = (0,
|
|
39091
|
+
const labels = (0, import_hooks105.useLabels)();
|
|
39060
39092
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("div", { className: "flex items-center gap-2 text-agg-muted-foreground", children: [
|
|
39061
39093
|
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)(Icon, { name: "warning-filled", size: "small", color: "currentColor" }),
|
|
39062
39094
|
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 whitespace-nowrap", children: labels.trading.venueUnavailableInRegion })
|
|
@@ -39067,11 +39099,11 @@ var TradingAccessTab = ({
|
|
|
39067
39099
|
onConnectKalshi,
|
|
39068
39100
|
onDisconnectKalshi
|
|
39069
39101
|
}) => {
|
|
39070
|
-
const labels = (0,
|
|
39071
|
-
const { disabledVenues, isLoading: isAppConfigLoading } = (0,
|
|
39072
|
-
const { isLocationBlocked } = (0,
|
|
39102
|
+
const labels = (0, import_hooks105.useLabels)();
|
|
39103
|
+
const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks105.useAppConfig)();
|
|
39104
|
+
const { isLocationBlocked } = (0, import_hooks105.useGeoBlock)();
|
|
39073
39105
|
const visibleVenues = (0, import_react61.useMemo)(
|
|
39074
|
-
() => (0,
|
|
39106
|
+
() => (0, import_hooks105.getVisibleVenuesByConfig)(TRADING_ACCESS_VENUE_ITEMS, disabledVenues),
|
|
39075
39107
|
[disabledVenues]
|
|
39076
39108
|
);
|
|
39077
39109
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("div", { className: "agg-trading-access-section flex flex-col gap-4", children: [
|
|
@@ -39081,7 +39113,7 @@ var TradingAccessTab = ({
|
|
|
39081
39113
|
const venueAccount = venueAccounts == null ? void 0 : venueAccounts.find((account) => account.venue === venue);
|
|
39082
39114
|
const isKalshi = venue === "kalshi";
|
|
39083
39115
|
const isConnected = (venueAccount == null ? void 0 : venueAccount.status) === "active";
|
|
39084
|
-
const availabilityState = (0,
|
|
39116
|
+
const availabilityState = (0, import_hooks105.getVenueAvailabilityState)({
|
|
39085
39117
|
venueId: venue,
|
|
39086
39118
|
disabledVenues,
|
|
39087
39119
|
isConfigLoading: isKalshi && isAppConfigLoading,
|
|
@@ -39146,8 +39178,8 @@ var ProfileModal = ({
|
|
|
39146
39178
|
onDisconnectExchange
|
|
39147
39179
|
}) => {
|
|
39148
39180
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
39149
|
-
const client = (0,
|
|
39150
|
-
const { user } = (0,
|
|
39181
|
+
const client = (0, import_hooks106.useAggClient)();
|
|
39182
|
+
const { user } = (0, import_hooks106.useAggAuthState)();
|
|
39151
39183
|
const toastCtx = useOptionalToast();
|
|
39152
39184
|
const [activeTab, setActiveTab] = (0, import_react62.useState)(PROFILE_TAB_KEYS.PROFILE_ACCOUNTS);
|
|
39153
39185
|
const profileTabItems = (0, import_react62.useMemo)(() => getProfileTabItems(), []);
|
|
@@ -39158,7 +39190,7 @@ var ProfileModal = ({
|
|
|
39158
39190
|
const [isSaving, setIsSaving] = (0, import_react62.useState)(false);
|
|
39159
39191
|
const [avatarTypeError, setAvatarTypeError] = (0, import_react62.useState)(null);
|
|
39160
39192
|
const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = (0, import_react62.useState)(false);
|
|
39161
|
-
const { data: kalshiStatus, refetch: refetchKalshiStatus } = (0,
|
|
39193
|
+
const { data: kalshiStatus, refetch: refetchKalshiStatus } = (0, import_hooks106.useVenueKeyStatus)(
|
|
39162
39194
|
import_sdk31.Venue.kalshi,
|
|
39163
39195
|
open
|
|
39164
39196
|
);
|
|
@@ -39665,7 +39697,7 @@ var ProfileModal = ({
|
|
|
39665
39697
|
ProfileModal.displayName = "ProfileModal";
|
|
39666
39698
|
|
|
39667
39699
|
// src/geo-block-modal/index.tsx
|
|
39668
|
-
var
|
|
39700
|
+
var import_hooks107 = require("@agg-build/hooks");
|
|
39669
39701
|
var import_react63 = require("react");
|
|
39670
39702
|
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
39671
39703
|
var GeoBlockModal = ({
|
|
@@ -39674,7 +39706,7 @@ var GeoBlockModal = ({
|
|
|
39674
39706
|
onConfirm,
|
|
39675
39707
|
classNames
|
|
39676
39708
|
}) => {
|
|
39677
|
-
const labels = (0,
|
|
39709
|
+
const labels = (0, import_hooks107.useLabels)();
|
|
39678
39710
|
const handleConfirm = (0, import_react63.useCallback)(() => {
|
|
39679
39711
|
onConfirm == null ? void 0 : onConfirm();
|
|
39680
39712
|
onOpenChange(false);
|