@agg-build/ui 4.10.0 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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 import_hooks59 = require("@agg-build/hooks");
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 import_hooks58 = require("@agg-build/hooks");
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
- return [
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, import_hooks58.useLabels)();
19115
- const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks58.useAppConfig)();
19116
- const { isLocationBlocked } = (0, import_hooks58.useGeoBlock)();
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, import_hooks58.getVenueAvailabilityState)({
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, import_hooks59.useLabels)();
19317
- const { disabledVenues } = (0, import_hooks59.useAppConfig)();
19328
+ const labels = (0, import_hooks60.useLabels)();
19329
+ const { disabledVenues } = (0, import_hooks60.useAppConfig)();
19318
19330
  const {
19319
19331
  features: { enableVenueEventDiscoveryFilters, showSportsMarkets }
19320
- } = (0, import_hooks59.useSdkUiConfig)();
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, import_hooks59.getVisibleVenueIdsByConfig)(import_sdk19.VENUES, disabledVenues),
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, import_hooks59.useCategories)({
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, import_hooks59.useCategoryChildren)({
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, import_hooks59.useCategoryChildren)({
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, import_hooks59.useCategoryChildren)({
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, import_hooks59.useVenueEvents)({
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: [import_hooks59.MarketStatus.open],
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, import_hooks59.useVenueMarketMidpoints)({
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: import_hooks59.MarketStatus.open
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 import_hooks78 = require("@agg-build/hooks");
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 import_hooks77 = require("@agg-build/hooks");
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 import_hooks60 = require("@agg-build/hooks");
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, import_hooks60.useEventTradingContext)();
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, import_hooks60.resolveDefaultTradingMarket)(selectedEvent);
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 import_hooks70 = require("@agg-build/hooks");
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 import_hooks61 = require("@agg-build/hooks");
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, import_hooks61.useLabels)();
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 import_hooks62 = require("@agg-build/hooks");
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, import_hooks62.useLabels)();
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 import_hooks68 = require("@agg-build/hooks");
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 import_hooks63 = require("@agg-build/hooks");
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, import_hooks63.useLabels)();
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 import_hooks64 = require("@agg-build/hooks");
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, import_hooks64.useLabels)();
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 import_hooks65 = require("@agg-build/hooks");
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, import_hooks65.useLabels)();
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, import_hooks65.useLabels)();
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 import_hooks66 = require("@agg-build/hooks");
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, import_hooks66.useLabels)();
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 import_hooks67 = require("@agg-build/hooks");
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, import_hooks67.useLabels)();
20745
- const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks67.useAppConfig)();
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, import_hooks67.getVenueAvailabilityState)({
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, import_hooks68.useLabels)();
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 import_hooks69 = require("@agg-build/hooks");
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, import_hooks69.useLabels)();
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;
21708
21721
  if (!feeBreakdown) return null;
21709
- const feeParts = [feeBreakdown.venueFees, feeBreakdown.bridgeFees, feeBreakdown.executionGas];
21722
+ const feeParts = [
21723
+ feeBreakdown.venueFees,
21724
+ (_a = feeBreakdown.builderFee) != null ? _a : 0,
21725
+ feeBreakdown.bridgeFees,
21726
+ feeBreakdown.executionGas
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, import_hooks70.useLabels)();
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, import_hooks70.useLabels)();
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;
@@ -24685,17 +24703,17 @@ var PlaceOrder = ({
24685
24703
  features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
24686
24704
  formatting: { formatPrice },
24687
24705
  general: { locale }
24688
- } = (0, import_hooks70.useSdkUiConfig)();
24689
- const labels = (0, import_hooks70.useLabels)();
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, import_hooks70.useGeoBlock)();
24693
- const tradingContext = (0, import_hooks70.useEventTradingContext)();
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, import_hooks70.resolveEventTradingState)(selectedEvent);
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, import_hooks70.resolveMarketTradingState)(scopedSelectedMarket);
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, import_hooks70.resolveMarketTradingState)(resolvedReadOnlyMarket);
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, import_hooks70.resolveOrderEligibility)({
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, import_hooks70.useAggAuthContext)();
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, import_hooks70.useResolvedExecutionMode)(executionMode);
24777
+ const { executionMode: resolvedExecutionMode, isPaperMode } = (0, import_hooks71.useResolvedExecutionMode)(executionMode);
24760
24778
  const showLimitOrders = limitOrdersFeature && !isPaperMode;
24761
- const liveBalanceState = (0, import_hooks70.useAggBalanceState)();
24762
- const paperBalancesQuery = (0, import_hooks70.useManagedBalances)({
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, import_hooks70.useExecuteManaged)();
24783
- const placeLimitOrder = (0, import_hooks70.usePlaceLimitOrder)();
24784
- const aggClient = (0, import_hooks70.useAggClient)();
24785
- const queryClient = (0, import_hooks70.useQueryClient)();
24786
- const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks70.useAppConfig)();
24787
- const { data: kalshiKeyStatus, refetch: refetchKalshiKeyStatus } = (0, import_hooks70.useVenueKeyStatus)(
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, import_hooks70.useLiveOutcomePrices)(
24811
+ const livePrices = (0, import_hooks71.useLiveOutcomePrices)(
24794
24812
  scopedSelectedMarket ? [scopedSelectedMarket] : void 0
24795
24813
  );
24796
- const wsBestPrices = (0, import_hooks70.useLiveBestPrices)(scopedSelectedMarket ? [scopedSelectedMarket] : void 0);
24797
- const fetchedClusterMidpointResult = (0, import_hooks70.useMidpoints)(
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, import_hooks70.mergeBestPricesPreferringLive)(clusterBestPricesRest, wsBestPrices),
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, import_hooks70.useDebouncedValue)(internalAmount, 300);
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, import_hooks70.getVenueAvailabilityState)({
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, import_hooks70.useExecutionPositions)({
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, import_hooks70.useLimitOrderVenueQuotes)({
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, import_hooks70.getVenueAvailabilityState)({
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, import_hooks70.useSmartRoute)(__spreadProps(__spreadValues({
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, import_hooks70.useVenueSellQuotes)({
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, import_hooks70.getVenueAvailabilityState)({
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, import_hooks70.useExecutionProgress)({
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, import_hooks70.invalidateBalanceQueries)(queryClient);
25730
- (0, import_hooks70.invalidatePositionQueries)(queryClient);
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, import_hooks70.getVenueAvailabilityState)({
26052
+ const availabilityState = (0, import_hooks71.getVenueAvailabilityState)({
26035
26053
  venueId: option.venue,
26036
26054
  disabledVenues,
26037
26055
  isConfigLoading: isAppConfigLoading
@@ -26101,6 +26119,7 @@ var PlaceOrder = ({
26101
26119
  return formatUsd(totalFees, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
26102
26120
  }, [activeFeeBreakdown]);
26103
26121
  const feeBreakdownRows = (0, import_react41.useMemo)(() => {
26122
+ var _a2, _b2;
26104
26123
  if (!activeFeeBreakdown) return [];
26105
26124
  return [
26106
26125
  {
@@ -26111,6 +26130,18 @@ var PlaceOrder = ({
26111
26130
  maximumFractionDigits: 2
26112
26131
  })
26113
26132
  },
26133
+ // Only Hyperliquid charges a builder slice today; every other route
26134
+ // would show a bare "$0.00" line.
26135
+ ...((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0) > 0 ? [
26136
+ {
26137
+ kind: "amount",
26138
+ label: tradingLabels.feeBreakdownBuilderFee,
26139
+ value: formatUsd((_b2 = activeFeeBreakdown.builderFee) != null ? _b2 : 0, {
26140
+ minimumFractionDigits: 2,
26141
+ maximumFractionDigits: 2
26142
+ })
26143
+ }
26144
+ ] : [],
26114
26145
  {
26115
26146
  kind: "amount",
26116
26147
  label: tradingLabels.feeBreakdownExecutionGas,
@@ -27562,7 +27593,7 @@ var PlaceOrder = ({
27562
27593
  className: "agg-order-submit h-12 w-full px-8 text-agg-base leading-agg-6 shadow-none",
27563
27594
  disabled: !orderEligibility.canPlaceOrder || shouldShowGeoBlockBanner,
27564
27595
  "aria-label": tradingLabels.signInToTrade,
27565
- onClick: import_hooks70.requestAggAuthChooserOpen,
27596
+ onClick: import_hooks71.requestAggAuthChooserOpen,
27566
27597
  children: tradingLabels.signInToTrade
27567
27598
  }
27568
27599
  ) : /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
@@ -27638,7 +27669,7 @@ var PlaceOrder = ({
27638
27669
  PlaceOrder.displayName = "PlaceOrder";
27639
27670
 
27640
27671
  // src/trading/use-claim-winnings.ts
27641
- var import_hooks71 = require("@agg-build/hooks");
27672
+ var import_hooks72 = require("@agg-build/hooks");
27642
27673
  var import_react42 = require("react");
27643
27674
  var toClaimError = (err) => {
27644
27675
  if (err instanceof Error) return err;
@@ -27646,11 +27677,11 @@ var toClaimError = (err) => {
27646
27677
  };
27647
27678
  function useClaimWinnings(options = {}) {
27648
27679
  const { onClaim, onClaimResult, onClaimSubmitError, externalClaimingKeys } = options;
27649
- const labels = (0, import_hooks71.useLabels)();
27680
+ const labels = (0, import_hooks72.useLabels)();
27650
27681
  const claimNotificationLabels = labels.notifications.claim;
27651
27682
  const toastCtx = useOptionalToast();
27652
- const queryClient = (0, import_hooks71.useQueryClient)();
27653
- const redeemMutation = (0, import_hooks71.useRedeem)();
27683
+ const queryClient = (0, import_hooks72.useQueryClient)();
27684
+ const redeemMutation = (0, import_hooks72.useRedeem)();
27654
27685
  const [activeRedeems, setActiveRedeems] = (0, import_react42.useState)({});
27655
27686
  const activeClaimKeysRef = (0, import_react42.useRef)(/* @__PURE__ */ new Set());
27656
27687
  const pendingClaimToastIdsRef = (0, import_react42.useRef)({});
@@ -27660,7 +27691,7 @@ function useClaimWinnings(options = {}) {
27660
27691
  () => Object.values(activeRedeems),
27661
27692
  [activeRedeems]
27662
27693
  );
27663
- const lifecycleStates = (0, import_hooks71.useRedeemLifecycles)(lifecycleInputs);
27694
+ const lifecycleStates = (0, import_hooks72.useRedeemLifecycles)(lifecycleInputs);
27664
27695
  const internalClaimingIds = (0, import_react42.useMemo)(() => {
27665
27696
  const out = __spreadValues({}, submittingClaimKeys);
27666
27697
  for (const [claimKey, active] of Object.entries(activeRedeems)) {
@@ -27675,13 +27706,13 @@ function useClaimWinnings(options = {}) {
27675
27706
  [externalClaimingKeys, internalClaimingIds]
27676
27707
  );
27677
27708
  const invalidateClaimUiState = (0, import_react42.useCallback)(() => {
27678
- (0, import_hooks71.invalidateBalanceQueries)(queryClient);
27679
- (0, import_hooks71.invalidatePositionQueries)(queryClient);
27709
+ (0, import_hooks72.invalidateBalanceQueries)(queryClient);
27710
+ (0, import_hooks72.invalidatePositionQueries)(queryClient);
27680
27711
  queryClient.invalidateQueries({
27681
- queryKey: import_hooks71.executionKeys.claimablePositionsCount(),
27712
+ queryKey: import_hooks72.executionKeys.claimablePositionsCount(),
27682
27713
  refetchType: "active"
27683
27714
  });
27684
- (0, import_hooks71.invalidateUserActivityQueries)(queryClient);
27715
+ (0, import_hooks72.invalidateUserActivityQueries)(queryClient);
27685
27716
  }, [queryClient]);
27686
27717
  const claim = (0, import_react42.useCallback)(
27687
27718
  (_0) => __async(null, [_0], function* ({ claimKey, winningOutcomeIds, payload }) {
@@ -27878,7 +27909,7 @@ function useClaimWinnings(options = {}) {
27878
27909
  }
27879
27910
 
27880
27911
  // src/trading/use-resolved-market-claim.ts
27881
- var import_hooks72 = require("@agg-build/hooks");
27912
+ var import_hooks73 = require("@agg-build/hooks");
27882
27913
  var import_react43 = require("react");
27883
27914
  var sharesFormatter = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 });
27884
27915
  var dateFormatter = new Intl.DateTimeFormat("en-US", {
@@ -27895,12 +27926,12 @@ var formatResolutionDate = (value) => {
27895
27926
  function useResolvedMarketClaim(options = {}) {
27896
27927
  var _a;
27897
27928
  const { market, enabled = true, executionMode } = options;
27898
- const { isAuthenticated } = (0, import_hooks72.useAggAuthState)();
27899
- const tradingState = (0, import_react43.useMemo)(() => (0, import_hooks72.resolveMarketTradingState)(market), [market]);
27929
+ const { isAuthenticated } = (0, import_hooks73.useAggAuthState)();
27930
+ const tradingState = (0, import_react43.useMemo)(() => (0, import_hooks73.resolveMarketTradingState)(market), [market]);
27900
27931
  const isResolved = tradingState.kind === "resolved";
27901
27932
  const marketId = (_a = market == null ? void 0 : market.id) != null ? _a : null;
27902
27933
  const shouldFetch = Boolean(enabled && isAuthenticated && isResolved && marketId);
27903
- const { positions } = (0, import_hooks72.useExecutionPositions)(__spreadValues({
27934
+ const { positions } = (0, import_hooks73.useExecutionPositions)(__spreadValues({
27904
27935
  enabled: shouldFetch,
27905
27936
  status: "active",
27906
27937
  limit: 50
@@ -27917,7 +27948,7 @@ function useResolvedMarketClaim(options = {}) {
27917
27948
  (outcome) => outcome.winner === true && outcome.totalSize > 0
27918
27949
  );
27919
27950
  if (winningOutcomes.length === 0) return void 0;
27920
- const totals = (0, import_hooks72.computeClosedPositionTotals)(group);
27951
+ const totals = (0, import_hooks73.computeClosedPositionTotals)(group);
27921
27952
  const winningShares = winningOutcomes.reduce((sum, outcome) => sum + outcome.totalSize, 0);
27922
27953
  const winningOutcomeLabel = (_a2 = resolveResolvedOutcomeLabel({
27923
27954
  market: market != null ? market : group.venueMarket,
@@ -28001,7 +28032,7 @@ var resolveEventMarketPageStickyState = ({
28001
28032
  };
28002
28033
 
28003
28034
  // src/pages/event-market/event-market.shared.tsx
28004
- var import_hooks73 = require("@agg-build/hooks");
28035
+ var import_hooks74 = require("@agg-build/hooks");
28005
28036
  var Dialog8 = __toESM(require("@radix-ui/react-dialog"));
28006
28037
  var import_react44 = require("react");
28007
28038
  var import_jsx_runtime179 = require("react/jsx-runtime");
@@ -28071,7 +28102,7 @@ var EventMarketPageMobileTrade = ({
28071
28102
  onBeforePrimaryAction,
28072
28103
  sharedKyc
28073
28104
  }) => {
28074
- const labels = (0, import_hooks73.useLabels)();
28105
+ const labels = (0, import_hooks74.useLabels)();
28075
28106
  if (!showPlaceOrder) return null;
28076
28107
  const handleOpenChange = (nextOpen) => {
28077
28108
  onOpenChange(nextOpen);
@@ -28127,7 +28158,7 @@ var EventMarketPageMobileTrade = ({
28127
28158
  var EventMarketPageUnavailableState = ({
28128
28159
  ariaLabel: _ariaLabel
28129
28160
  }) => {
28130
- const labels = (0, import_hooks73.useLabels)();
28161
+ const labels = (0, import_hooks74.useLabels)();
28131
28162
  return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
28132
28163
  StateMessage,
28133
28164
  {
@@ -28143,7 +28174,7 @@ var EventMarketPageUnavailableState = ({
28143
28174
  var EventMarketPageNotFoundState = ({
28144
28175
  ariaLabel: _ariaLabel
28145
28176
  }) => {
28146
- const labels = (0, import_hooks73.useLabels)();
28177
+ const labels = (0, import_hooks74.useLabels)();
28147
28178
  return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
28148
28179
  StateMessage,
28149
28180
  {
@@ -28240,11 +28271,11 @@ var EventMarketPageLoadingState = ({
28240
28271
  };
28241
28272
 
28242
28273
  // src/pages/event-market/sports-event-market-page.tsx
28243
- var import_hooks76 = require("@agg-build/hooks");
28274
+ var import_hooks77 = require("@agg-build/hooks");
28244
28275
  var import_react47 = require("react");
28245
28276
 
28246
28277
  // src/pages/event-market/sports-markets.tsx
28247
- var import_hooks75 = require("@agg-build/hooks");
28278
+ var import_hooks76 = require("@agg-build/hooks");
28248
28279
  var import_react46 = require("react");
28249
28280
 
28250
28281
  // src/pages/event-market/sports-event-market.utils.ts
@@ -29249,7 +29280,7 @@ var mergeSportsSectionMarketsIntoEvent = ({
29249
29280
  };
29250
29281
 
29251
29282
  // src/pages/event-market/sports-market-card.tsx
29252
- var import_hooks74 = require("@agg-build/hooks");
29283
+ var import_hooks75 = require("@agg-build/hooks");
29253
29284
  var import_react45 = require("react");
29254
29285
 
29255
29286
  // src/pages/event-market/sports-line-rail.tsx
@@ -29598,11 +29629,11 @@ var SportsMarketCard = ({
29598
29629
  midpointsResult
29599
29630
  }) => {
29600
29631
  var _a, _b, _c, _d, _e, _f, _g, _h;
29601
- const labels = (0, import_hooks74.useLabels)();
29632
+ const labels = (0, import_hooks75.useLabels)();
29602
29633
  const {
29603
29634
  formatting: { formatCompactCurrency }
29604
- } = (0, import_hooks74.useSdkUiConfig)();
29605
- const tradingContext = (0, import_hooks74.useEventTradingContext)();
29635
+ } = (0, import_hooks75.useSdkUiConfig)();
29636
+ const tradingContext = (0, import_hooks75.useEventTradingContext)();
29606
29637
  const slide = (0, import_react45.useMemo)(() => buildSportsSlideFromGroup(group), [group]);
29607
29638
  const [selectedLineIndex, setSelectedLineIndex] = (0, import_react45.useState)(slide.defaultStopIndex);
29608
29639
  const combinedLegs = (0, import_react45.useMemo)(() => resolveSportsCombinedLegs(group), [group]);
@@ -29643,7 +29674,7 @@ var SportsMarketCard = ({
29643
29674
  const justOpened = isExpanded && !wasExpandedRef.current;
29644
29675
  wasExpandedRef.current = isExpanded;
29645
29676
  if (!justOpened || !activeMarket) return;
29646
- if ((0, import_hooks74.resolveMarketTradingState)(activeMarket).isTradingDisabled) return;
29677
+ if ((0, import_hooks75.resolveMarketTradingState)(activeMarket).isTradingDisabled) return;
29647
29678
  const selectedOutcomeId = tradingContext == null ? void 0 : tradingContext.selectedOutcomeId;
29648
29679
  const hasInScopeOutcome = selectedOutcomeId != null && activeMarket.venueMarketOutcomes.some((outcome) => outcome.id === selectedOutcomeId);
29649
29680
  if (hasInScopeOutcome) return;
@@ -29763,7 +29794,7 @@ var SportsMarketCard = ({
29763
29794
  stops: slide.stops.map((stop) => ({
29764
29795
  value: stop.value,
29765
29796
  venues: stop.venues,
29766
- disabled: stop.market.status !== import_hooks74.MarketStatus.open
29797
+ disabled: stop.market.status !== import_hooks75.MarketStatus.open
29767
29798
  })),
29768
29799
  selectedIndex: selectedLineIndex,
29769
29800
  onSelect: handleLineSelect,
@@ -29867,7 +29898,7 @@ var SportsTabButton = ({
29867
29898
  );
29868
29899
  };
29869
29900
  var SportsMarketsLoadingState = () => {
29870
- const labels = (0, import_hooks75.useLabels)();
29901
+ const labels = (0, import_hooks76.useLabels)();
29871
29902
  return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
29872
29903
  "div",
29873
29904
  {
@@ -29905,13 +29936,13 @@ var SportsMarkets = ({
29905
29936
  midpointsResult
29906
29937
  }) => {
29907
29938
  var _a, _b;
29908
- const labels = (0, import_hooks75.useLabels)();
29909
- const tradingContext = (0, import_hooks75.useEventTradingContext)();
29939
+ const labels = (0, import_hooks76.useLabels)();
29940
+ const tradingContext = (0, import_hooks76.useEventTradingContext)();
29910
29941
  const hasAggKey = Boolean(event.aggKey);
29911
- const gameMarketsQuery = (0, import_hooks75.useVenueMarkets)({
29942
+ const gameMarketsQuery = (0, import_hooks76.useVenueMarkets)({
29912
29943
  aggKey: event.aggKey ? [event.aggKey] : void 0,
29913
29944
  limit: 100,
29914
- status: import_hooks75.MarketStatus.open,
29945
+ status: import_hooks76.MarketStatus.open,
29915
29946
  enabled: hasAggKey
29916
29947
  });
29917
29948
  const {
@@ -29947,7 +29978,7 @@ var SportsMarkets = ({
29947
29978
  const [stableMarketsByTab, setStableMarketsByTab] = (0, import_react46.useState)({});
29948
29979
  const activeTabLabel = resolveSportsSectionLabel(labels, activeTab);
29949
29980
  const sectionFilters = resolveSportsSectionFilters(activeTab);
29950
- const sectionMarketsQuery = (0, import_hooks75.useVenueMarkets)({
29981
+ const sectionMarketsQuery = (0, import_hooks76.useVenueMarkets)({
29951
29982
  aggKey: event.aggKey ? [event.aggKey] : void 0,
29952
29983
  sportsMarketType: sectionFilters.sportsMarketType,
29953
29984
  period: sectionFilters.period,
@@ -29957,7 +29988,7 @@ var SportsMarkets = ({
29957
29988
  // heavy tab (e.g. "Other" spans other/team_props/player_props/specials/
29958
29989
  // completion — hundreds of markets on prop-rich events) from ~15 calls to 1-3.
29959
29990
  limit: 100,
29960
- status: import_hooks75.MarketStatus.open,
29991
+ status: import_hooks76.MarketStatus.open,
29961
29992
  enabled: hasAggKey
29962
29993
  });
29963
29994
  const {
@@ -30043,7 +30074,7 @@ var SportsMarkets = ({
30043
30074
  return;
30044
30075
  }
30045
30076
  setExpandedGroupId(groupId);
30046
- if ((0, import_hooks75.resolveMarketTradingState)(market).isTradingDisabled) return;
30077
+ if ((0, import_hooks76.resolveMarketTradingState)(market).isTradingDisabled) return;
30047
30078
  if (market.id !== (tradingContext == null ? void 0 : tradingContext.selectedMarketId)) {
30048
30079
  tradingContext == null ? void 0 : tradingContext.selectMarket(market.id, market);
30049
30080
  }
@@ -30159,7 +30190,7 @@ var SportsEventMarketPage = ({
30159
30190
  sectionMarketsByKey
30160
30191
  });
30161
30192
  }, [event, sectionMarketsByKey]);
30162
- const eventTradingState = (0, import_react47.useMemo)(() => (0, import_hooks76.resolveEventTradingState)(composedEvent), [composedEvent]);
30193
+ const eventTradingState = (0, import_react47.useMemo)(() => (0, import_hooks77.resolveEventTradingState)(composedEvent), [composedEvent]);
30163
30194
  const hasSportsSections = (0, import_react47.useMemo)(
30164
30195
  () => resolveVisibleSportsSectionTabs(event).length > 0,
30165
30196
  [event]
@@ -30167,12 +30198,12 @@ var SportsEventMarketPage = ({
30167
30198
  const stickyOrderPanelState = resolveEventMarketPageStickyState({
30168
30199
  stickyOrderPanel
30169
30200
  });
30170
- const { executionMode: resolvedExecutionMode } = (0, import_hooks76.useResolvedExecutionMode)(executionMode);
30201
+ const { executionMode: resolvedExecutionMode } = (0, import_hooks77.useResolvedExecutionMode)(executionMode);
30171
30202
  const [isMobileTradeOpen, setIsMobileTradeOpen] = (0, import_react47.useState)(false);
30172
30203
  const isMobileViewport = useIsMobileEventMarketViewport(SPORTS_EVENT_MARKET_MEDIA_QUERY);
30173
- const tradingContext = (0, import_hooks76.useEventTradingContext)();
30174
- const { stateByEventId: sportsLiveStateByEventId } = (0, import_hooks76.useSportsLive)([event.id]);
30175
- const midpointsResult = (0, import_hooks76.useMidpoints)(composedEvent.venueMarkets);
30204
+ const tradingContext = (0, import_hooks77.useEventTradingContext)();
30205
+ const { stateByEventId: sportsLiveStateByEventId } = (0, import_hooks77.useSportsLive)([event.id]);
30206
+ const midpointsResult = (0, import_hooks77.useMidpoints)(composedEvent.venueMarkets);
30176
30207
  const internalResolvedClaim = useResolvedMarketClaim({
30177
30208
  market: eventTradingState.primaryMarket,
30178
30209
  enabled: eventTradingState.kind === "resolved",
@@ -30184,7 +30215,7 @@ var SportsEventMarketPage = ({
30184
30215
  (0, import_react47.useEffect)(() => {
30185
30216
  return () => {
30186
30217
  var _a;
30187
- (_a = setTradeSideRef.current) == null ? void 0 : _a.call(setTradeSideRef, import_hooks76.TradeSide.Buy);
30218
+ (_a = setTradeSideRef.current) == null ? void 0 : _a.call(setTradeSideRef, import_hooks77.TradeSide.Buy);
30188
30219
  };
30189
30220
  }, []);
30190
30221
  const handleSectionMarketsChange = (0, import_react47.useCallback)(
@@ -30395,19 +30426,19 @@ var EventMarketPageContent = ({
30395
30426
  onRecurringMarketNavigate
30396
30427
  }) => {
30397
30428
  var _a;
30398
- const eventTradingState = (0, import_react48.useMemo)(() => (0, import_hooks77.resolveEventTradingState)(event), [event]);
30429
+ const eventTradingState = (0, import_react48.useMemo)(() => (0, import_hooks78.resolveEventTradingState)(event), [event]);
30399
30430
  const stickyOrderPanelState = resolveEventMarketPageStickyState({
30400
30431
  stickyOrderPanel
30401
30432
  });
30402
- const { executionMode: resolvedExecutionMode } = (0, import_hooks77.useResolvedExecutionMode)(executionMode);
30433
+ const { executionMode: resolvedExecutionMode } = (0, import_hooks78.useResolvedExecutionMode)(executionMode);
30403
30434
  const [isMobileTradeOpen, setIsMobileTradeOpen] = (0, import_react48.useState)(false);
30404
30435
  const isMobileViewport = useIsMobileEventMarketViewport();
30405
- const tradingContext = (0, import_hooks77.useEventTradingContext)();
30406
- const labels = (0, import_hooks77.useLabels)();
30407
- const recurringQuery = (0, import_hooks77.useRecurringCryptoMarkets)({ event });
30436
+ const tradingContext = (0, import_hooks78.useEventTradingContext)();
30437
+ const labels = (0, import_hooks78.useLabels)();
30438
+ const recurringQuery = (0, import_hooks78.useRecurringCryptoMarkets)({ event });
30408
30439
  const currentTimestamp = useCurrentTimestamp(recurringQuery.isRecurringCryptoMarket);
30409
30440
  const recurringTimeline = (0, import_react48.useMemo)(
30410
- () => currentTimestamp == null ? null : (0, import_hooks77.resolveRecurringCryptoTimeline)(recurringQuery.windows, event, currentTimestamp),
30441
+ () => currentTimestamp == null ? null : (0, import_hooks78.resolveRecurringCryptoTimeline)(recurringQuery.windows, event, currentTimestamp),
30411
30442
  [currentTimestamp, event, recurringQuery.windows]
30412
30443
  );
30413
30444
  const isRecurringCryptoMarket = (recurringTimeline == null ? void 0 : recurringTimeline.viewed) != null;
@@ -30487,7 +30518,7 @@ var EventMarketPageContent = ({
30487
30518
  () => normalizeVenueMarketCluster(event.venueMarkets),
30488
30519
  [event.venueMarkets]
30489
30520
  );
30490
- const midpointsResult = (0, import_hooks77.useMidpoints)(
30521
+ const midpointsResult = (0, import_hooks78.useMidpoints)(
30491
30522
  recurringQuery.isRecurringCryptoMarket && eventTradingState.kind !== "open" ? [] : eventDetailVenueMarkets
30492
30523
  );
30493
30524
  const internalResolvedClaim = useResolvedMarketClaim({
@@ -30501,7 +30532,7 @@ var EventMarketPageContent = ({
30501
30532
  (0, import_react48.useEffect)(() => {
30502
30533
  return () => {
30503
30534
  var _a2;
30504
- (_a2 = setTradeSideRef.current) == null ? void 0 : _a2.call(setTradeSideRef, import_hooks77.TradeSide.Buy);
30535
+ (_a2 = setTradeSideRef.current) == null ? void 0 : _a2.call(setTradeSideRef, import_hooks78.TradeSide.Buy);
30505
30536
  };
30506
30537
  }, []);
30507
30538
  if (!event.venueMarkets.length) {
@@ -30643,14 +30674,14 @@ var EventMarketPage = (props) => {
30643
30674
  var _a;
30644
30675
  const {
30645
30676
  features: { showSportsMarkets }
30646
- } = (0, import_hooks77.useSdkUiConfig)();
30677
+ } = (0, import_hooks78.useSdkUiConfig)();
30647
30678
  const hasEventProp = "event" in props && !!props.event;
30648
30679
  const {
30649
30680
  event: fetchedEvent,
30650
30681
  error: eventError,
30651
30682
  isLoading: isFetchingEvent,
30652
30683
  isEnriching
30653
- } = (0, import_hooks77.useEnrichedVenueEvent)({
30684
+ } = (0, import_hooks78.useEnrichedVenueEvent)({
30654
30685
  eventId: hasEventProp ? "" : (_a = props.eventId) != null ? _a : "",
30655
30686
  enabled: !props.isLoading && !hasEventProp && !!props.eventId
30656
30687
  });
@@ -30916,14 +30947,14 @@ var HomeSearchResults = ({
30916
30947
  onEventClick,
30917
30948
  onMarketClick
30918
30949
  }) => {
30919
- const labels = (0, import_hooks78.useLabels)();
30920
- const { search: searchConfig } = (0, import_hooks78.useSdkUiConfig)();
30921
- const { disabledVenues } = (0, import_hooks78.useAppConfig)();
30950
+ const labels = (0, import_hooks79.useLabels)();
30951
+ const { search: searchConfig } = (0, import_hooks79.useSdkUiConfig)();
30952
+ const { disabledVenues } = (0, import_hooks79.useAppConfig)();
30922
30953
  const [activeVenueTabValue, setActiveVenueTabValue] = (0, import_react51.useState)("all");
30923
30954
  const eventListTabs = useEventListTabs();
30924
30955
  const { headerRef, titleRef, shouldUseSelectOverflow } = useEventListTabsHeaderOverflow(eventListTabs);
30925
30956
  const visibleVenues = (0, import_react51.useMemo)(
30926
- () => disabledVenues.length === 0 ? void 0 : (0, import_hooks78.getVisibleVenueIdsByConfig)(import_sdk26.VENUES, disabledVenues),
30957
+ () => disabledVenues.length === 0 ? void 0 : (0, import_hooks79.getVisibleVenueIdsByConfig)(import_sdk26.VENUES, disabledVenues),
30927
30958
  [disabledVenues]
30928
30959
  );
30929
30960
  const activeVenueTab = (0, import_react51.useMemo)(() => {
@@ -30941,7 +30972,7 @@ var HomeSearchResults = ({
30941
30972
  hasNextPage,
30942
30973
  isFetchingNextPage,
30943
30974
  isPlaceholderData
30944
- } = (0, import_hooks78.useSearch)({
30975
+ } = (0, import_hooks79.useSearch)({
30945
30976
  q: query,
30946
30977
  type: "events",
30947
30978
  categoryIds: activeTabValue === ALL_CATEGORIES_TAB_VALUE ? void 0 : activeCategoryTab == null ? void 0 : activeCategoryTab.categoryIds,
@@ -30969,7 +31000,7 @@ var HomeSearchResults = ({
30969
31000
  const visibleMidpointVenueMarketIds = (0, import_react51.useMemo)(() => {
30970
31001
  return collectVisibleVenueMarketIds(visibleVenueMarkets);
30971
31002
  }, [visibleVenueMarkets]);
30972
- const { midpointRows: sharedMidpointRows, isLoading: isSharedMidpointsLoading } = (0, import_hooks78.useVenueMarketMidpoints)({
31003
+ const { midpointRows: sharedMidpointRows, isLoading: isSharedMidpointsLoading } = (0, import_hooks79.useVenueMarketMidpoints)({
30973
31004
  venueMarketIds: visibleMidpointVenueMarketIds,
30974
31005
  enabled: visibleMidpointVenueMarketIds.length > 0
30975
31006
  });
@@ -31118,7 +31149,7 @@ var HomePage = ({
31118
31149
  stickyOrderPanel
31119
31150
  }) => {
31120
31151
  var _a, _b, _c, _d, _e, _f, _g;
31121
- const labels = (0, import_hooks78.useLabels)();
31152
+ const labels = (0, import_hooks79.useLabels)();
31122
31153
  const {
31123
31154
  search: {
31124
31155
  value: searchValue,
@@ -31128,11 +31159,11 @@ var HomePage = ({
31128
31159
  onSelect: onSelectEventInternal
31129
31160
  },
31130
31161
  features: { enableEventDiscoveryUrlPersistence }
31131
- } = (0, import_hooks78.useSdkUiConfig)();
31132
- const { executionMode } = (0, import_hooks78.useResolvedExecutionMode)();
31133
- const { isLoading: isAppConfigLoading } = (0, import_hooks78.useAppConfig)();
31162
+ } = (0, import_hooks79.useSdkUiConfig)();
31163
+ const { executionMode } = (0, import_hooks79.useResolvedExecutionMode)();
31164
+ const { isLoading: isAppConfigLoading } = (0, import_hooks79.useAppConfig)();
31134
31165
  const primaryEventListTabs = useEventListTabs();
31135
- const { capture, consume } = (0, import_hooks78.useEventListState)();
31166
+ const { capture, consume } = (0, import_hooks79.useEventListState)();
31136
31167
  const [snapshot] = (0, import_react51.useState)(() => consume());
31137
31168
  const eventListStateRef = (0, import_react51.useRef)(null);
31138
31169
  const handleSelectEvent = (0, import_react51.useCallback)(
@@ -31202,7 +31233,7 @@ var HomePage = ({
31202
31233
  }, [isShowingAllResults, normalizedSearchValue, selectedEvent]);
31203
31234
  const resolvedSelectedEvent = selectedEvent != null ? selectedEvent : stickySelectedEvent;
31204
31235
  const resolvedAllCategoryTabLabel = allCategoryTabLabel === DEFAULT_ALL_CATEGORY_TAB_LABEL ? labels.home.trending : allCategoryTabLabel;
31205
- const { categories, isLoading: isCategoriesLoading } = (0, import_hooks78.useCategories)({
31236
+ const { categories, isLoading: isCategoriesLoading } = (0, import_hooks79.useCategories)({
31206
31237
  limit: categoriesLimit,
31207
31238
  enabled: !hasCustomTabs
31208
31239
  });
@@ -31604,13 +31635,13 @@ var HomePage = ({
31604
31635
  HomePage.displayName = "HomePage";
31605
31636
 
31606
31637
  // src/pages/user-profile/index.tsx
31607
- var import_hooks86 = require("@agg-build/hooks");
31638
+ var import_hooks87 = require("@agg-build/hooks");
31608
31639
  var import_sdk30 = require("@agg-build/sdk");
31609
31640
  var import_dayjs9 = __toESM(require("dayjs"));
31610
31641
  var import_react54 = require("react");
31611
31642
 
31612
31643
  // src/pages/user-profile/components/available-balance-card.tsx
31613
- var import_hooks79 = require("@agg-build/hooks");
31644
+ var import_hooks80 = require("@agg-build/hooks");
31614
31645
  var import_sdk27 = require("@agg-build/sdk");
31615
31646
  var import_jsx_runtime186 = require("react/jsx-runtime");
31616
31647
  var BASE_URL = "https://assets.snagsolutions.io";
@@ -31661,7 +31692,7 @@ var AvailableBalanceCard = ({
31661
31692
  onManage,
31662
31693
  manageButtonRef
31663
31694
  }) => {
31664
- const labels = (0, import_hooks79.useLabels)();
31695
+ const labels = (0, import_hooks80.useLabels)();
31665
31696
  const balanceLabels = labels.userProfile.balance;
31666
31697
  const resolvedLabel = label2 != null ? label2 : balanceLabels.availableBalance;
31667
31698
  const hasPaperBalance = chains.some(isPaperChain);
@@ -31815,7 +31846,7 @@ var AvailableBalanceCard = ({
31815
31846
  AvailableBalanceCard.displayName = "AvailableBalanceCard";
31816
31847
 
31817
31848
  // src/pages/user-profile/components/claim-activity-breakdown-modal.tsx
31818
- var import_hooks80 = require("@agg-build/hooks");
31849
+ var import_hooks81 = require("@agg-build/hooks");
31819
31850
  var import_sdk28 = require("@agg-build/sdk");
31820
31851
  var import_jsx_runtime187 = require("react/jsx-runtime");
31821
31852
  var CLAIM_VENUE_LABELS = {
@@ -31837,7 +31868,7 @@ var ClaimActivityBreakdownModal = ({
31837
31868
  onTransactionSelect
31838
31869
  }) => {
31839
31870
  var _a;
31840
- const labels = (0, import_hooks80.useLabels)();
31871
+ const labels = (0, import_hooks81.useLabels)();
31841
31872
  return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
31842
31873
  Modal,
31843
31874
  {
@@ -31946,7 +31977,7 @@ var ClaimActivityBreakdownModal = ({
31946
31977
  };
31947
31978
 
31948
31979
  // src/pages/user-profile/components/manage-balances-modal.tsx
31949
- var import_hooks81 = require("@agg-build/hooks");
31980
+ var import_hooks82 = require("@agg-build/hooks");
31950
31981
  var import_sdk29 = require("@agg-build/sdk");
31951
31982
  var Dialog9 = __toESM(require("@radix-ui/react-dialog"));
31952
31983
  var import_react52 = require("react");
@@ -32027,11 +32058,11 @@ var ManageBalancesModal = ({
32027
32058
  open,
32028
32059
  onOpenChange
32029
32060
  }) => {
32030
- const labels = (0, import_hooks81.useLabels)();
32061
+ const labels = (0, import_hooks82.useLabels)();
32031
32062
  const refillLabels = labels.balanceRefill;
32032
- const balanceState = (0, import_hooks81.useAggBalance)();
32033
- const depositAddressesQuery = (0, import_hooks81.useDepositAddresses)({ enabled: open });
32034
- const policiesQuery = (0, import_hooks81.useBalanceRefillPolicies)({ enabled: open });
32063
+ const balanceState = (0, import_hooks82.useAggBalance)();
32064
+ const depositAddressesQuery = (0, import_hooks82.useDepositAddresses)({ enabled: open });
32065
+ const policiesQuery = (0, import_hooks82.useBalanceRefillPolicies)({ enabled: open });
32035
32066
  const toastContext = useOptionalToast();
32036
32067
  const descriptionId = (0, import_react52.useId)();
32037
32068
  const savingRef = (0, import_react52.useRef)(false);
@@ -32652,7 +32683,7 @@ var ManageBalancesModal = ({
32652
32683
  ManageBalancesModal.displayName = "ManageBalancesModal";
32653
32684
 
32654
32685
  // src/pages/user-profile/components/positions-activity.tsx
32655
- var import_hooks84 = require("@agg-build/hooks");
32686
+ var import_hooks85 = require("@agg-build/hooks");
32656
32687
  var import_react53 = require("react");
32657
32688
 
32658
32689
  // src/pages/user-profile/user-profile.constants.ts
@@ -33443,7 +33474,7 @@ var EmptyState = ({ title: title2, description, className }) => {
33443
33474
  EmptyState.displayName = "EmptyState";
33444
33475
 
33445
33476
  // src/pages/user-profile/components/open-order-row.tsx
33446
- var import_hooks82 = require("@agg-build/hooks");
33477
+ var import_hooks83 = require("@agg-build/hooks");
33447
33478
  var import_jsx_runtime191 = require("react/jsx-runtime");
33448
33479
  var shouldUseNativeLinkNavigation2 = (event) => {
33449
33480
  return event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button === 1;
@@ -33485,7 +33516,7 @@ var OpenOrderRow = ({
33485
33516
  expirationHeader
33486
33517
  }) => {
33487
33518
  var _a, _b, _c, _d;
33488
- const labels = (0, import_hooks82.useLabels)().userProfile.openOrders;
33519
+ const labels = (0, import_hooks83.useLabels)().userProfile.openOrders;
33489
33520
  const resolvedCancelLabel = cancelLabel != null ? cancelLabel : labels.cancel;
33490
33521
  const resolvedCancelAriaLabel = cancelAriaLabel != null ? cancelAriaLabel : labels.cancelOrderAria(order.id);
33491
33522
  const resolvedLimitPriceHeader = limitPriceHeader != null ? limitPriceHeader : labels.limitPriceHeader;
@@ -33539,7 +33570,7 @@ var OpenOrderRow = ({
33539
33570
  /* @__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
33571
  RemoteImage,
33541
33572
  {
33542
- src: (0, import_hooks82.optimizedImageUrl)(order.thumbnailSrc, 60),
33573
+ src: (0, import_hooks83.optimizedImageUrl)(order.thumbnailSrc, 60),
33543
33574
  alt: "",
33544
33575
  className: "h-full w-full rounded-agg-sm object-cover"
33545
33576
  }
@@ -33597,7 +33628,7 @@ var OpenOrderRow = ({
33597
33628
  OpenOrderRow.displayName = "OpenOrderRow";
33598
33629
 
33599
33630
  // src/pages/user-profile/components/position-row.tsx
33600
- var import_hooks83 = require("@agg-build/hooks");
33631
+ var import_hooks84 = require("@agg-build/hooks");
33601
33632
  var import_jsx_runtime192 = require("react/jsx-runtime");
33602
33633
  var shouldUseNativeLinkNavigation3 = (event) => {
33603
33634
  return event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button === 1;
@@ -33735,8 +33766,8 @@ var PositionRow = ({
33735
33766
  onClaim,
33736
33767
  isClaiming = false
33737
33768
  }) => {
33738
- const labels = (0, import_hooks83.useLabels)().userProfile.positions;
33739
- const { formatCurrency: formatCurrency2, formatPrice } = (0, import_hooks83.useAggUiConfig)().formatting;
33769
+ const labels = (0, import_hooks84.useLabels)().userProfile.positions;
33770
+ const { formatCurrency: formatCurrency2, formatPrice } = (0, import_hooks84.useAggUiConfig)().formatting;
33740
33771
  const model = toPositionRowViewModel(
33741
33772
  position,
33742
33773
  {
@@ -33794,7 +33825,7 @@ var PositionRow = ({
33794
33825
  /* @__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
33826
  RemoteImage,
33796
33827
  {
33797
- src: (0, import_hooks83.optimizedImageUrl)(model.thumbnailSrc, 60),
33828
+ src: (0, import_hooks84.optimizedImageUrl)(model.thumbnailSrc, 60),
33798
33829
  alt: "",
33799
33830
  className: "h-full w-full rounded-agg-sm object-cover"
33800
33831
  }
@@ -33963,10 +33994,10 @@ var PositionsActivity = ({
33963
33994
  initialPositionFilter = "active",
33964
33995
  className
33965
33996
  }) => {
33966
- const userProfileLabels = (0, import_hooks84.useLabels)().userProfile;
33997
+ const userProfileLabels = (0, import_hooks85.useLabels)().userProfile;
33967
33998
  const positionsLabels = userProfileLabels.positions;
33968
33999
  const openOrdersLabels = userProfileLabels.openOrders;
33969
- const { formatCurrency: formatCurrency2, formatPrice } = (0, import_hooks84.useAggUiConfig)().formatting;
34000
+ const { formatCurrency: formatCurrency2, formatPrice } = (0, import_hooks85.useAggUiConfig)().formatting;
33970
34001
  const tabItems = (0, import_react53.useMemo)(
33971
34002
  () => getTabItems(userProfileLabels.tabs, showOpenOrders),
33972
34003
  [showOpenOrders, userProfileLabels.tabs]
@@ -34234,7 +34265,7 @@ var PositionsActivity = ({
34234
34265
  /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
34235
34266
  "img",
34236
34267
  {
34237
- src: (0, import_hooks84.optimizedImageUrl)(item.thumbnailSrc, 48),
34268
+ src: (0, import_hooks85.optimizedImageUrl)(item.thumbnailSrc, 48),
34238
34269
  alt: "",
34239
34270
  className: "size-12 shrink-0 rounded-agg-lg object-cover"
34240
34271
  }
@@ -34597,7 +34628,7 @@ var buildAggTxExplorerHref = (chainId, txHash) => {
34597
34628
  };
34598
34629
 
34599
34630
  // src/pages/user-profile/components/user-info-card.tsx
34600
- var import_hooks85 = require("@agg-build/hooks");
34631
+ var import_hooks86 = require("@agg-build/hooks");
34601
34632
  var import_jsx_runtime195 = require("react/jsx-runtime");
34602
34633
  var UserInfoCard = ({
34603
34634
  user,
@@ -34609,7 +34640,7 @@ var UserInfoCard = ({
34609
34640
  className
34610
34641
  }) => {
34611
34642
  var _a;
34612
- const labels = (0, import_hooks85.useLabels)();
34643
+ const labels = (0, import_hooks86.useLabels)();
34613
34644
  const wallets = (_a = user.connectedWallets) != null ? _a : [];
34614
34645
  const hasWallets = wallets.length > 0;
34615
34646
  return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
@@ -34625,7 +34656,7 @@ var UserInfoCard = ({
34625
34656
  /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "agg-profile-avatar shrink-0", children: user.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
34626
34657
  RemoteImage,
34627
34658
  {
34628
- src: (0, import_hooks85.optimizedImageUrl)(user.avatarUrl, 120),
34659
+ src: (0, import_hooks86.optimizedImageUrl)(user.avatarUrl, 120),
34629
34660
  alt: user.username,
34630
34661
  className: "h-20 w-20 rounded-full object-cover sm:h-[120px] sm:w-[120px]"
34631
34662
  }
@@ -35258,15 +35289,15 @@ var UserProfilePage = ({
35258
35289
  (0, import_react54.useEffect)(() => {
35259
35290
  setIsHydrated(true);
35260
35291
  }, []);
35261
- const { user: currentUser, isAuthenticated } = (0, import_hooks86.useAggAuthState)();
35262
- const { isDepositBlocked } = (0, import_hooks86.useGeoBlock)();
35263
- const balanceState = (0, import_hooks86.useAggBalance)();
35264
- const labels = (0, import_hooks86.useLabels)();
35292
+ const { user: currentUser, isAuthenticated } = (0, import_hooks87.useAggAuthState)();
35293
+ const { isDepositBlocked } = (0, import_hooks87.useGeoBlock)();
35294
+ const balanceState = (0, import_hooks87.useAggBalance)();
35295
+ const labels = (0, import_hooks87.useLabels)();
35265
35296
  const {
35266
35297
  features: { showLimitOrders }
35267
- } = (0, import_hooks86.useSdkUiConfig)();
35268
- const client = (0, import_hooks86.useAggClient)();
35269
- const cancelOrderMutation = (0, import_hooks86.useCancelManagedOrder)();
35298
+ } = (0, import_hooks87.useSdkUiConfig)();
35299
+ const client = (0, import_hooks87.useAggClient)();
35300
+ const cancelOrderMutation = (0, import_hooks87.useCancelManagedOrder)();
35270
35301
  const toastContext = useOptionalToast();
35271
35302
  const [internalCancellingIds, setInternalCancellingIds] = (0, import_react54.useState)({});
35272
35303
  const { claim: startClaim, claimingKeys } = useClaimWinnings({
@@ -35287,7 +35318,7 @@ var UserProfilePage = ({
35287
35318
  const [selectedClaimActivity, setSelectedClaimActivity] = (0, import_react54.useState)(null);
35288
35319
  const [isManageBalancesOpen, setIsManageBalancesOpen] = (0, import_react54.useState)(false);
35289
35320
  const manageBalancesButtonRef = (0, import_react54.useRef)(null);
35290
- const { executionMode: resolvedExecutionMode, isPaperMode } = (0, import_hooks86.useResolvedExecutionMode)(executionMode);
35321
+ const { executionMode: resolvedExecutionMode, isPaperMode } = (0, import_hooks87.useResolvedExecutionMode)(executionMode);
35291
35322
  const queryExecutionMode = resolvedExecutionMode === "paper" ? "paper" : void 0;
35292
35323
  const handleManageBalancesOpenChange = (0, import_react54.useCallback)((open) => {
35293
35324
  setIsManageBalancesOpen(open);
@@ -35297,13 +35328,13 @@ var UserProfilePage = ({
35297
35328
  return (_a2 = manageBalancesButtonRef.current) == null ? void 0 : _a2.focus();
35298
35329
  });
35299
35330
  }, []);
35300
- const activePositionsQuery = (0, import_hooks86.useExecutionPositions)({
35331
+ const activePositionsQuery = (0, import_hooks87.useExecutionPositions)({
35301
35332
  enabled: shouldUseHookData && isAuthenticated,
35302
35333
  status: "active",
35303
35334
  limit: 25,
35304
35335
  mode: queryExecutionMode
35305
35336
  });
35306
- const closedPositionsQuery = (0, import_hooks86.useExecutionPositions)({
35337
+ const closedPositionsQuery = (0, import_hooks87.useExecutionPositions)({
35307
35338
  enabled: shouldUseHookData && isAuthenticated,
35308
35339
  status: "closed",
35309
35340
  limit: 25,
@@ -35319,62 +35350,62 @@ var UserProfilePage = ({
35319
35350
  (0, import_react54.useEffect)(() => {
35320
35351
  setPositionFilter(initialPositionFilter);
35321
35352
  }, [initialPositionFilter]);
35322
- const ordersQuery = (0, import_hooks86.useExecutionOrders)({
35353
+ const ordersQuery = (0, import_hooks87.useExecutionOrders)({
35323
35354
  enabled: shouldUseHookData && isAuthenticated,
35324
35355
  limit: 25,
35325
35356
  mode: queryExecutionMode,
35326
35357
  refetchIntervalMs: 5e3
35327
35358
  });
35328
- const pendingOpenOrdersQuery = (0, import_hooks86.useExecutionOrders)({
35359
+ const pendingOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
35329
35360
  enabled: shouldUseHookData && isAuthenticated && !openOrders,
35330
35361
  status: OPEN_ORDER_QUERY_STATUSES[0],
35331
35362
  orderType: "limit",
35332
35363
  limit: 25,
35333
35364
  mode: queryExecutionMode
35334
35365
  });
35335
- const signingOpenOrdersQuery = (0, import_hooks86.useExecutionOrders)({
35366
+ const signingOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
35336
35367
  enabled: shouldUseHookData && isAuthenticated && !openOrders,
35337
35368
  status: OPEN_ORDER_QUERY_STATUSES[1],
35338
35369
  orderType: "limit",
35339
35370
  limit: 25,
35340
35371
  mode: queryExecutionMode
35341
35372
  });
35342
- const pendingBridgeOpenOrdersQuery = (0, import_hooks86.useExecutionOrders)({
35373
+ const pendingBridgeOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
35343
35374
  enabled: shouldUseHookData && isAuthenticated && !openOrders,
35344
35375
  status: OPEN_ORDER_QUERY_STATUSES[2],
35345
35376
  orderType: "limit",
35346
35377
  limit: 25,
35347
35378
  mode: queryExecutionMode
35348
35379
  });
35349
- const submittingOpenOrdersQuery = (0, import_hooks86.useExecutionOrders)({
35380
+ const submittingOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
35350
35381
  enabled: shouldUseHookData && isAuthenticated && !openOrders,
35351
35382
  status: OPEN_ORDER_QUERY_STATUSES[3],
35352
35383
  orderType: "limit",
35353
35384
  limit: 25,
35354
35385
  mode: queryExecutionMode
35355
35386
  });
35356
- const submittedOpenOrdersQuery = (0, import_hooks86.useExecutionOrders)({
35387
+ const submittedOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
35357
35388
  enabled: shouldUseHookData && isAuthenticated && !openOrders,
35358
35389
  status: OPEN_ORDER_QUERY_STATUSES[4],
35359
35390
  orderType: "limit",
35360
35391
  limit: 25,
35361
35392
  mode: queryExecutionMode
35362
35393
  });
35363
- const openOpenOrdersQuery = (0, import_hooks86.useExecutionOrders)({
35394
+ const openOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
35364
35395
  enabled: shouldUseHookData && isAuthenticated && !openOrders,
35365
35396
  status: OPEN_ORDER_QUERY_STATUSES[5],
35366
35397
  orderType: "limit",
35367
35398
  limit: 25,
35368
35399
  mode: queryExecutionMode
35369
35400
  });
35370
- const partiallyFilledOpenOrdersQuery = (0, import_hooks86.useExecutionOrders)({
35401
+ const partiallyFilledOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
35371
35402
  enabled: shouldUseHookData && isAuthenticated && !openOrders,
35372
35403
  status: OPEN_ORDER_QUERY_STATUSES[6],
35373
35404
  orderType: "limit",
35374
35405
  limit: 25,
35375
35406
  mode: queryExecutionMode
35376
35407
  });
35377
- const cancelPendingOpenOrdersQuery = (0, import_hooks86.useExecutionOrders)({
35408
+ const cancelPendingOpenOrdersQuery = (0, import_hooks87.useExecutionOrders)({
35378
35409
  enabled: shouldUseHookData && isAuthenticated && !openOrders,
35379
35410
  status: OPEN_ORDER_QUERY_STATUSES[7],
35380
35411
  orderType: "limit",
@@ -35403,7 +35434,7 @@ var UserProfilePage = ({
35403
35434
  submittingOpenOrdersQuery
35404
35435
  ]
35405
35436
  );
35406
- const activityQuery = (0, import_hooks86.useUserActivity)({
35437
+ const activityQuery = (0, import_hooks87.useUserActivity)({
35407
35438
  enabled: shouldUseHookData && isAuthenticated,
35408
35439
  limit: 25
35409
35440
  });
@@ -35490,7 +35521,7 @@ var UserProfilePage = ({
35490
35521
  var _a2, _b2, _c2, _d, _e, _f;
35491
35522
  if (user) return user;
35492
35523
  const fullUser = profileUser != null ? profileUser : currentUser;
35493
- const walletAddress = (0, import_hooks86.getWalletAddressFromUserProfile)(fullUser);
35524
+ const walletAddress = (0, import_hooks87.getWalletAddressFromUserProfile)(fullUser);
35494
35525
  const fallbackUsername = walletAddress && shortenAddress(walletAddress) || "username";
35495
35526
  const twitterAccount = (_a2 = fullUser == null ? void 0 : fullUser.accounts) == null ? void 0 : _a2.find(
35496
35527
  (account) => String(account.provider).toLowerCase() === "twitter"
@@ -35552,8 +35583,8 @@ var UserProfilePage = ({
35552
35583
  },
35553
35584
  [paperSummary == null ? void 0 : paperSummary.earnings]
35554
35585
  );
35555
- const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks86.useAppConfig)();
35556
- const isKalshiAvailable = (0, import_hooks86.getVenueAvailabilityState)({
35586
+ const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks87.useAppConfig)();
35587
+ const isKalshiAvailable = (0, import_hooks87.getVenueAvailabilityState)({
35557
35588
  venueId: import_sdk30.Venue.kalshi,
35558
35589
  disabledVenues,
35559
35590
  isConfigLoading: isAppConfigLoading
@@ -35781,7 +35812,7 @@ var UserProfilePage = ({
35781
35812
  (groups) => {
35782
35813
  return groups.flatMap((group) => {
35783
35814
  var _a2, _b2, _c2, _d;
35784
- const closedTotals = (0, import_hooks86.computeClosedPositionTotals)(group);
35815
+ const closedTotals = (0, import_hooks87.computeClosedPositionTotals)(group);
35785
35816
  const winningOutcome = group.venueMarket.venueMarketOutcomes.find(
35786
35817
  (outcome) => outcome.winner === true
35787
35818
  );
@@ -36088,7 +36119,7 @@ var UserProfilePage = ({
36088
36119
  UserProfilePage.displayName = "UserProfilePage";
36089
36120
 
36090
36121
  // src/deposit/index.tsx
36091
- var import_hooks97 = require("@agg-build/hooks");
36122
+ var import_hooks98 = require("@agg-build/hooks");
36092
36123
  var import_deposit = require("@agg-build/hooks/deposit");
36093
36124
  var import_react57 = require("react");
36094
36125
 
@@ -36321,7 +36352,7 @@ var NETWORK_TO_CURRENCY_CODE = {
36321
36352
  };
36322
36353
 
36323
36354
  // src/deposit/steps/card-deposit.tsx
36324
- var import_hooks87 = require("@agg-build/hooks");
36355
+ var import_hooks88 = require("@agg-build/hooks");
36325
36356
  var import_react55 = require("react");
36326
36357
  var import_jsx_runtime197 = require("react/jsx-runtime");
36327
36358
  var CardDepositStep = ({
@@ -36339,7 +36370,7 @@ var CardDepositStep = ({
36339
36370
  onNetworkChange,
36340
36371
  onContinue
36341
36372
  }) => {
36342
- const labels = (0, import_hooks87.useLabels)();
36373
+ const labels = (0, import_hooks88.useLabels)();
36343
36374
  const [localAmount, setLocalAmount] = (0, import_react55.useState)(amount);
36344
36375
  (0, import_react55.useEffect)(() => {
36345
36376
  setLocalAmount(amount);
@@ -36456,7 +36487,7 @@ var CardDepositStep = ({
36456
36487
  };
36457
36488
 
36458
36489
  // src/deposit/steps/card-payment-pending.tsx
36459
- var import_hooks88 = require("@agg-build/hooks");
36490
+ var import_hooks89 = require("@agg-build/hooks");
36460
36491
  var import_jsx_runtime198 = require("react/jsx-runtime");
36461
36492
  var CardPaymentPendingStep = ({
36462
36493
  providerName,
@@ -36465,7 +36496,7 @@ var CardPaymentPendingStep = ({
36465
36496
  onViewActivity,
36466
36497
  onChooseAnotherProvider
36467
36498
  }) => {
36468
- const labels = (0, import_hooks88.useLabels)();
36499
+ const labels = (0, import_hooks89.useLabels)();
36469
36500
  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
36501
  /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
36471
36502
  "button",
@@ -36515,10 +36546,10 @@ var CardPaymentPendingStep = ({
36515
36546
  };
36516
36547
 
36517
36548
  // src/deposit/steps/card-provider.tsx
36518
- var import_hooks89 = require("@agg-build/hooks");
36549
+ var import_hooks90 = require("@agg-build/hooks");
36519
36550
  var import_jsx_runtime199 = require("react/jsx-runtime");
36520
36551
  var CardProviderItem = ({ provider, onSelect }) => {
36521
- const labels = (0, import_hooks89.useLabels)();
36552
+ const labels = (0, import_hooks90.useLabels)();
36522
36553
  const badgeText = provider.badge === "best" ? labels.deposit.cardFlow.providerBadges.best : provider.badge === "low-kyc" ? labels.deposit.cardFlow.providerBadges.lowKyc : void 0;
36523
36554
  return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
36524
36555
  "button",
@@ -36564,7 +36595,7 @@ var CardProviderStep = ({
36564
36595
  onSelectProvider,
36565
36596
  onRetry
36566
36597
  }) => {
36567
- const labels = (0, import_hooks89.useLabels)();
36598
+ const labels = (0, import_hooks90.useLabels)();
36568
36599
  return /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(import_jsx_runtime199.Fragment, { children: [
36569
36600
  /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
36570
36601
  Modal.Header,
@@ -36628,7 +36659,7 @@ var CardProviderStep = ({
36628
36659
  };
36629
36660
 
36630
36661
  // src/deposit/steps/card-purchase-success.tsx
36631
- var import_hooks90 = require("@agg-build/hooks");
36662
+ var import_hooks91 = require("@agg-build/hooks");
36632
36663
  var import_jsx_runtime200 = require("react/jsx-runtime");
36633
36664
  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
36665
  /* @__PURE__ */ (0, import_jsx_runtime200.jsx)("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label2 }),
@@ -36639,7 +36670,7 @@ var CardPurchaseSuccessStep = ({
36639
36670
  onDone,
36640
36671
  onClose
36641
36672
  }) => {
36642
- const labels = (0, import_hooks90.useLabels)();
36673
+ const labels = (0, import_hooks91.useLabels)();
36643
36674
  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
36675
  /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
36645
36676
  "button",
@@ -36674,10 +36705,10 @@ var CardPurchaseSuccessStep = ({
36674
36705
  };
36675
36706
 
36676
36707
  // src/deposit/steps/crypto-transfer.tsx
36677
- var import_hooks92 = require("@agg-build/hooks");
36708
+ var import_hooks93 = require("@agg-build/hooks");
36678
36709
 
36679
36710
  // src/shared/transfer-fee-summary.tsx
36680
- var import_hooks91 = require("@agg-build/hooks");
36711
+ var import_hooks92 = require("@agg-build/hooks");
36681
36712
  var import_jsx_runtime201 = require("react/jsx-runtime");
36682
36713
  var separator = /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("span", { className: "text-agg-muted-foreground", "aria-hidden": "true", children: "\xB7" });
36683
36714
  var normalizeFeeLabel = (label2) => label2.replace(/\s*~\s*$/, "");
@@ -36687,7 +36718,7 @@ var TransferFeeSummary = ({
36687
36718
  minDeposit,
36688
36719
  eta
36689
36720
  }) => {
36690
- const labels = (0, import_hooks91.useLabels)();
36721
+ const labels = (0, import_hooks92.useLabels)();
36691
36722
  if (!estimate) return null;
36692
36723
  if (view === "deposit") {
36693
36724
  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 +36824,7 @@ DepositQRCode.displayName = "DepositQRCode";
36793
36824
  // src/deposit/steps/crypto-transfer.tsx
36794
36825
  var import_jsx_runtime203 = require("react/jsx-runtime");
36795
36826
  var CryptoAddressLoadingState = () => {
36796
- const labels = (0, import_hooks92.useLabels)();
36827
+ const labels = (0, import_hooks93.useLabels)();
36797
36828
  const sendCryptoLabels = labels.deposit.sendCrypto;
36798
36829
  return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(
36799
36830
  "div",
@@ -36838,11 +36869,11 @@ var CryptoTransferStep = ({
36838
36869
  onDone
36839
36870
  }) => {
36840
36871
  var _a;
36841
- const labels = (0, import_hooks92.useLabels)();
36872
+ const labels = (0, import_hooks93.useLabels)();
36842
36873
  const selectedNetworkOption = networkOptions.find((n) => n.value === selectedNetwork);
36843
36874
  const networkLogoUrl = (_a = selectedNetworkOption == null ? void 0 : selectedNetworkOption.iconUrl) != null ? _a : "";
36844
36875
  const networkLogo = selectedNetworkOption == null ? void 0 : selectedNetworkOption.icon;
36845
- const transferFeeEstimate = (0, import_hooks92.useWithdrawEstimate)({
36876
+ const transferFeeEstimate = (0, import_hooks93.useWithdrawEstimate)({
36846
36877
  amount: getEstimateAmountFromMinDeposit(minDeposit),
36847
36878
  selectedToken,
36848
36879
  selectedNetwork
@@ -36945,7 +36976,7 @@ var CryptoTransferStep = ({
36945
36976
  };
36946
36977
 
36947
36978
  // src/deposit/steps/deposit-method.tsx
36948
- var import_hooks93 = require("@agg-build/hooks");
36979
+ var import_hooks94 = require("@agg-build/hooks");
36949
36980
  var import_jsx_runtime204 = require("react/jsx-runtime");
36950
36981
  var DepositMethodCard = ({
36951
36982
  icon,
@@ -36998,7 +37029,7 @@ var DepositMethodStep = ({
36998
37029
  depositAddressesReady = true,
36999
37030
  onSelectMethod
37000
37031
  }) => {
37001
- const labels = (0, import_hooks93.useLabels)();
37032
+ const labels = (0, import_hooks94.useLabels)();
37002
37033
  return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(import_jsx_runtime204.Fragment, { children: [
37003
37034
  /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(Modal.Header, { title: labels.deposit.title, hideBorder: true }),
37004
37035
  /* @__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 +37078,7 @@ var DepositMethodStep = ({
37047
37078
  };
37048
37079
 
37049
37080
  // src/deposit/steps/wallet-form.tsx
37050
- var import_hooks94 = require("@agg-build/hooks");
37081
+ var import_hooks95 = require("@agg-build/hooks");
37051
37082
  var import_jsx_runtime205 = require("react/jsx-runtime");
37052
37083
  var WalletFormStep = ({
37053
37084
  walletLabel,
@@ -37071,7 +37102,7 @@ var WalletFormStep = ({
37071
37102
  onMax,
37072
37103
  onConfirm
37073
37104
  }) => {
37074
- const labels = (0, import_hooks94.useLabels)();
37105
+ const labels = (0, import_hooks95.useLabels)();
37075
37106
  const isConfirmEnabled = !isSubmitting && !isBalanceLoading && Number(amount) > 0 && Number(amount) <= walletBalance;
37076
37107
  return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(import_jsx_runtime205.Fragment, { children: [
37077
37108
  /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
@@ -37197,7 +37228,7 @@ var WalletFormStep = ({
37197
37228
  };
37198
37229
 
37199
37230
  // src/deposit/steps/wallet-processing.tsx
37200
- var import_hooks95 = require("@agg-build/hooks");
37231
+ var import_hooks96 = require("@agg-build/hooks");
37201
37232
  var import_react56 = require("react");
37202
37233
  var import_jsx_runtime206 = require("react/jsx-runtime");
37203
37234
  var WalletProcessingStep = ({
@@ -37205,7 +37236,7 @@ var WalletProcessingStep = ({
37205
37236
  errorMessage,
37206
37237
  onComplete
37207
37238
  }) => {
37208
- const labels = (0, import_hooks95.useLabels)();
37239
+ const labels = (0, import_hooks96.useLabels)();
37209
37240
  (0, import_react56.useEffect)(() => {
37210
37241
  const allDone = steps.length > 0 && steps.every((s) => s.status === "complete");
37211
37242
  if (allDone) {
@@ -37244,7 +37275,7 @@ var WalletProcessingStep = ({
37244
37275
  };
37245
37276
 
37246
37277
  // src/deposit/steps/wallet-success.tsx
37247
- var import_hooks96 = require("@agg-build/hooks");
37278
+ var import_hooks97 = require("@agg-build/hooks");
37248
37279
  var import_jsx_runtime207 = require("react/jsx-runtime");
37249
37280
  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
37281
  /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label2 }),
@@ -37255,7 +37286,7 @@ var WalletSuccessStep = ({
37255
37286
  onDone,
37256
37287
  onClose
37257
37288
  }) => {
37258
- const labels = (0, import_hooks96.useLabels)();
37289
+ const labels = (0, import_hooks97.useLabels)();
37259
37290
  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
37291
  /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
37261
37292
  "button",
@@ -37375,9 +37406,9 @@ function DepositModalControlled({
37375
37406
  pendingCardPurchaseSummary
37376
37407
  }) {
37377
37408
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
37378
- const { isWeb3User } = (0, import_hooks97.useAggAuthState)();
37379
- const { walletActions } = (0, import_hooks97.useAggUiConfig)();
37380
- const labels = (0, import_hooks97.useLabels)();
37409
+ const { isWeb3User } = (0, import_hooks98.useAggAuthState)();
37410
+ const { walletActions } = (0, import_hooks98.useAggUiConfig)();
37411
+ const labels = (0, import_hooks98.useLabels)();
37381
37412
  const defaultMethod = isWeb3User ? "wallet" : "crypto";
37382
37413
  const [step, setStep] = (0, import_react57.useState)(
37383
37414
  () => pendingCardPurchaseSummary ? "card-success" : "method"
@@ -37409,7 +37440,7 @@ function DepositModalControlled({
37409
37440
  error: addrError,
37410
37441
  supportedChains,
37411
37442
  getAddress
37412
- } = (0, import_hooks97.useDepositAddresses)({ enabled: open });
37443
+ } = (0, import_hooks98.useDepositAddresses)({ enabled: open });
37413
37444
  const fallbackNetworkOptions = (0, import_react57.useMemo)(() => mapNetworksToOptions(), []);
37414
37445
  const networkOptions = (0, import_react57.useMemo)(() => {
37415
37446
  if (!(supportedChains == null ? void 0 : supportedChains.length)) return fallbackNetworkOptions;
@@ -37855,13 +37886,13 @@ var import_react58 = require("react");
37855
37886
  var import_withdraw = require("@agg-build/hooks/withdraw");
37856
37887
 
37857
37888
  // src/withdraw/steps/withdraw-method.tsx
37858
- var import_hooks98 = require("@agg-build/hooks");
37889
+ var import_hooks99 = require("@agg-build/hooks");
37859
37890
  var import_jsx_runtime209 = require("react/jsx-runtime");
37860
37891
  var WithdrawMethodStep = ({
37861
37892
  balance,
37862
37893
  onSelectMethod
37863
37894
  }) => {
37864
- const labels = (0, import_hooks98.useLabels)();
37895
+ const labels = (0, import_hooks99.useLabels)();
37865
37896
  return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(import_jsx_runtime209.Fragment, { children: [
37866
37897
  /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(Modal.Header, { title: labels.withdraw.title, hideBorder: true }),
37867
37898
  /* @__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 +37932,7 @@ var WithdrawMethodStep = ({
37901
37932
  };
37902
37933
 
37903
37934
  // src/withdraw/steps/withdraw-amount.tsx
37904
- var import_hooks99 = require("@agg-build/hooks");
37935
+ var import_hooks100 = require("@agg-build/hooks");
37905
37936
  var import_jsx_runtime210 = require("react/jsx-runtime");
37906
37937
  var formatRawTokenAmount = (rawAmount, decimals) => {
37907
37938
  if (!rawAmount) return "0";
@@ -37946,7 +37977,7 @@ var WithdrawAmountStep = ({
37946
37977
  onContinue
37947
37978
  }) => {
37948
37979
  var _a, _b, _c, _d;
37949
- const labels = (0, import_hooks99.useLabels)();
37980
+ const labels = (0, import_hooks100.useLabels)();
37950
37981
  const SOLANA_CHAIN_ID = "792703809";
37951
37982
  const isSolanaDest = selectedNetwork === SOLANA_CHAIN_ID;
37952
37983
  const trimmedDestination = destinationWallet.trim();
@@ -37954,7 +37985,7 @@ var WithdrawAmountStep = ({
37954
37985
  const isValid = Number(amount) > 0 && isValidAddress;
37955
37986
  const amountRaw = amount && Number(amount) > 0 ? parseTokenAmountToRaw(amount, destDecimals) : null;
37956
37987
  const destinationChainId = Number(selectedNetwork) || null;
37957
- const preview = (0, import_hooks99.useWithdrawPreview)({
37988
+ const preview = (0, import_hooks100.useWithdrawPreview)({
37958
37989
  amountRaw,
37959
37990
  tokenSymbol: selectedToken || null,
37960
37991
  destinationChainId,
@@ -38093,7 +38124,7 @@ var WithdrawAmountStep = ({
38093
38124
  };
38094
38125
 
38095
38126
  // src/withdraw/steps/withdraw-success.tsx
38096
- var import_hooks100 = require("@agg-build/hooks");
38127
+ var import_hooks101 = require("@agg-build/hooks");
38097
38128
  var import_jsx_runtime211 = require("react/jsx-runtime");
38098
38129
  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
38130
  /* @__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 +38169,10 @@ var WithdrawLoadingStep = ({
38138
38169
  lifecycleState,
38139
38170
  onClose
38140
38171
  }) => {
38141
- const labels = (0, import_hooks100.useLabels)();
38172
+ const labels = (0, import_hooks101.useLabels)();
38142
38173
  const {
38143
38174
  features: { enableAnimations }
38144
- } = (0, import_hooks100.useSdkUiConfig)();
38175
+ } = (0, import_hooks101.useSdkUiConfig)();
38145
38176
  const walletFlowLabels = labels.withdraw.walletFlow;
38146
38177
  const activeIndex = loadingActiveIndexFor(lifecycleState);
38147
38178
  const loadingSteps = getLoadingSteps(walletFlowLabels);
@@ -38225,7 +38256,7 @@ var WithdrawSuccessStep = ({
38225
38256
  onRetry,
38226
38257
  onClose
38227
38258
  }) => {
38228
- const labels = (0, import_hooks100.useLabels)();
38259
+ const labels = (0, import_hooks101.useLabels)();
38229
38260
  const walletFlowLabels = labels.withdraw.walletFlow;
38230
38261
  const { title: title2, description } = resultCopyFor({
38231
38262
  status: resultStatus,
@@ -38532,11 +38563,11 @@ var WithdrawModal = (props) => {
38532
38563
  WithdrawModal.displayName = "WithdrawModal";
38533
38564
 
38534
38565
  // src/paper-trading/paper-trading-onboarding.tsx
38535
- var import_hooks102 = require("@agg-build/hooks");
38566
+ var import_hooks103 = require("@agg-build/hooks");
38536
38567
 
38537
38568
  // src/paper-trading/paper-onboarding-modal.tsx
38538
38569
  var import_react59 = require("react");
38539
- var import_hooks101 = require("@agg-build/hooks");
38570
+ var import_hooks102 = require("@agg-build/hooks");
38540
38571
  var import_jsx_runtime213 = require("react/jsx-runtime");
38541
38572
  var PaperOnboardingModal = ({
38542
38573
  open,
@@ -38544,7 +38575,7 @@ var PaperOnboardingModal = ({
38544
38575
  startingBalanceLabel,
38545
38576
  classNames
38546
38577
  }) => {
38547
- const labels = (0, import_hooks101.useLabels)();
38578
+ const labels = (0, import_hooks102.useLabels)();
38548
38579
  const copy = labels.paperTrading.onboarding;
38549
38580
  const [stepIndex, setStepIndex] = (0, import_react59.useState)(0);
38550
38581
  const steps = (0, import_react59.useMemo)(
@@ -38698,8 +38729,8 @@ var FALLBACK_STARTING_BALANCE = 1e4;
38698
38729
  var PaperTradingOnboarding = ({
38699
38730
  classNames
38700
38731
  }) => {
38701
- const { isOpen, dismiss } = (0, import_hooks102.usePaperOnboarding)();
38702
- const { paperStartingBalance } = (0, import_hooks102.useAppConfig)();
38732
+ const { isOpen, dismiss } = (0, import_hooks103.usePaperOnboarding)();
38733
+ const { paperStartingBalance } = (0, import_hooks103.useAppConfig)();
38703
38734
  if (!isOpen) return null;
38704
38735
  return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
38705
38736
  PaperOnboardingModal,
@@ -38717,7 +38748,7 @@ PaperTradingOnboarding.displayName = "PaperTradingOnboarding";
38717
38748
 
38718
38749
  // src/profile/index.tsx
38719
38750
  var import_react62 = require("react");
38720
- var import_hooks105 = require("@agg-build/hooks");
38751
+ var import_hooks106 = require("@agg-build/hooks");
38721
38752
  var import_sdk31 = require("@agg-build/sdk");
38722
38753
 
38723
38754
  // src/profile/profile-modal.constants.ts
@@ -38736,7 +38767,7 @@ var getProfileTabItems = () => [
38736
38767
 
38737
38768
  // src/profile/tabs/about-tab.tsx
38738
38769
  var import_react60 = require("react");
38739
- var import_hooks103 = require("@agg-build/hooks");
38770
+ var import_hooks104 = require("@agg-build/hooks");
38740
38771
  var import_jsx_runtime215 = require("react/jsx-runtime");
38741
38772
  var AboutTab = ({
38742
38773
  avatarPreview,
@@ -38747,7 +38778,7 @@ var AboutTab = ({
38747
38778
  draftAvatarPreview,
38748
38779
  avatarError: _avatarError
38749
38780
  }) => {
38750
- const labels = (0, import_hooks103.useLabels)();
38781
+ const labels = (0, import_hooks104.useLabels)();
38751
38782
  const fileInputRef = (0, import_react60.useRef)(null);
38752
38783
  const handleAvatarClick = (0, import_react60.useCallback)(() => {
38753
38784
  var _a;
@@ -39022,7 +39053,7 @@ var AccountsWalletsTab = ({
39022
39053
  AccountsWalletsTab.displayName = "AccountsWalletsTab";
39023
39054
 
39024
39055
  // src/profile/tabs/trading-access-tab.tsx
39025
- var import_hooks104 = require("@agg-build/hooks");
39056
+ var import_hooks105 = require("@agg-build/hooks");
39026
39057
  var import_react61 = require("react");
39027
39058
  var import_jsx_runtime217 = require("react/jsx-runtime");
39028
39059
  var TRADING_ACCESS_VENUES = [
@@ -39049,14 +39080,14 @@ var AccessRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)
39049
39080
  }
39050
39081
  );
39051
39082
  var AvailableStatus = () => {
39052
- const labels = (0, import_hooks104.useLabels)();
39083
+ const labels = (0, import_hooks105.useLabels)();
39053
39084
  return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("div", { className: "flex items-center gap-2", children: [
39054
39085
  /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(Icon, { name: "check-badge", size: "small", className: "text-agg-primary" }),
39055
39086
  /* @__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
39087
  ] });
39057
39088
  };
39058
39089
  var GeoblockedStatus = () => {
39059
- const labels = (0, import_hooks104.useLabels)();
39090
+ const labels = (0, import_hooks105.useLabels)();
39060
39091
  return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("div", { className: "flex items-center gap-2 text-agg-muted-foreground", children: [
39061
39092
  /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(Icon, { name: "warning-filled", size: "small", color: "currentColor" }),
39062
39093
  /* @__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 +39098,11 @@ var TradingAccessTab = ({
39067
39098
  onConnectKalshi,
39068
39099
  onDisconnectKalshi
39069
39100
  }) => {
39070
- const labels = (0, import_hooks104.useLabels)();
39071
- const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks104.useAppConfig)();
39072
- const { isLocationBlocked } = (0, import_hooks104.useGeoBlock)();
39101
+ const labels = (0, import_hooks105.useLabels)();
39102
+ const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks105.useAppConfig)();
39103
+ const { isLocationBlocked } = (0, import_hooks105.useGeoBlock)();
39073
39104
  const visibleVenues = (0, import_react61.useMemo)(
39074
- () => (0, import_hooks104.getVisibleVenuesByConfig)(TRADING_ACCESS_VENUE_ITEMS, disabledVenues),
39105
+ () => (0, import_hooks105.getVisibleVenuesByConfig)(TRADING_ACCESS_VENUE_ITEMS, disabledVenues),
39075
39106
  [disabledVenues]
39076
39107
  );
39077
39108
  return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("div", { className: "agg-trading-access-section flex flex-col gap-4", children: [
@@ -39081,7 +39112,7 @@ var TradingAccessTab = ({
39081
39112
  const venueAccount = venueAccounts == null ? void 0 : venueAccounts.find((account) => account.venue === venue);
39082
39113
  const isKalshi = venue === "kalshi";
39083
39114
  const isConnected = (venueAccount == null ? void 0 : venueAccount.status) === "active";
39084
- const availabilityState = (0, import_hooks104.getVenueAvailabilityState)({
39115
+ const availabilityState = (0, import_hooks105.getVenueAvailabilityState)({
39085
39116
  venueId: venue,
39086
39117
  disabledVenues,
39087
39118
  isConfigLoading: isKalshi && isAppConfigLoading,
@@ -39146,8 +39177,8 @@ var ProfileModal = ({
39146
39177
  onDisconnectExchange
39147
39178
  }) => {
39148
39179
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
39149
- const client = (0, import_hooks105.useAggClient)();
39150
- const { user } = (0, import_hooks105.useAggAuthState)();
39180
+ const client = (0, import_hooks106.useAggClient)();
39181
+ const { user } = (0, import_hooks106.useAggAuthState)();
39151
39182
  const toastCtx = useOptionalToast();
39152
39183
  const [activeTab, setActiveTab] = (0, import_react62.useState)(PROFILE_TAB_KEYS.PROFILE_ACCOUNTS);
39153
39184
  const profileTabItems = (0, import_react62.useMemo)(() => getProfileTabItems(), []);
@@ -39158,7 +39189,7 @@ var ProfileModal = ({
39158
39189
  const [isSaving, setIsSaving] = (0, import_react62.useState)(false);
39159
39190
  const [avatarTypeError, setAvatarTypeError] = (0, import_react62.useState)(null);
39160
39191
  const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = (0, import_react62.useState)(false);
39161
- const { data: kalshiStatus, refetch: refetchKalshiStatus } = (0, import_hooks105.useVenueKeyStatus)(
39192
+ const { data: kalshiStatus, refetch: refetchKalshiStatus } = (0, import_hooks106.useVenueKeyStatus)(
39162
39193
  import_sdk31.Venue.kalshi,
39163
39194
  open
39164
39195
  );
@@ -39665,7 +39696,7 @@ var ProfileModal = ({
39665
39696
  ProfileModal.displayName = "ProfileModal";
39666
39697
 
39667
39698
  // src/geo-block-modal/index.tsx
39668
- var import_hooks106 = require("@agg-build/hooks");
39699
+ var import_hooks107 = require("@agg-build/hooks");
39669
39700
  var import_react63 = require("react");
39670
39701
  var import_jsx_runtime219 = require("react/jsx-runtime");
39671
39702
  var GeoBlockModal = ({
@@ -39674,7 +39705,7 @@ var GeoBlockModal = ({
39674
39705
  onConfirm,
39675
39706
  classNames
39676
39707
  }) => {
39677
- const labels = (0, import_hooks106.useLabels)();
39708
+ const labels = (0, import_hooks107.useLabels)();
39678
39709
  const handleConfirm = (0, import_react63.useCallback)(() => {
39679
39710
  onConfirm == null ? void 0 : onConfirm();
39680
39711
  onOpenChange(false);