@agg-build/ui 4.7.4 → 4.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/{chunk-2347CDTT.mjs → chunk-GG57TRNE.mjs} +393 -155
  2. package/dist/{chunk-CB3DDQBP.mjs → chunk-GKYBQEBC.mjs} +462 -171
  3. package/dist/{chunk-3X5ICUUC.mjs → chunk-GVIS3YXU.mjs} +2 -2
  4. package/dist/{chunk-XR6C3MZX.mjs → chunk-H7L4HDXS.mjs} +266 -162
  5. package/dist/{chunk-UQ7XJIAZ.mjs → chunk-NYL6A6AD.mjs} +953 -785
  6. package/dist/{chunk-MAQ52KM5.mjs → chunk-TNNLRRHC.mjs} +1 -1
  7. package/dist/{chunk-VQTOMYOA.mjs → chunk-XQLLZTEW.mjs} +296 -166
  8. package/dist/events.js +1195 -1041
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +4726 -3772
  11. package/dist/index.mjs +58 -19
  12. package/dist/modals.js +1886 -1181
  13. package/dist/modals.mjs +12 -4
  14. package/dist/pages.js +3551 -2872
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +953 -785
  17. package/dist/primitives.mjs +1 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +2255 -1710
  21. package/dist/trading.mjs +10 -6
  22. package/dist/types/index.d.mts +1 -0
  23. package/dist/types/index.d.ts +1 -0
  24. package/dist/types/kyc/index.d.mts +3 -0
  25. package/dist/types/kyc/index.d.ts +3 -0
  26. package/dist/types/kyc/shared-kyc-modal.d.mts +12 -0
  27. package/dist/types/kyc/shared-kyc-modal.d.ts +12 -0
  28. package/dist/types/kyc/shared-kyc.d.mts +31 -0
  29. package/dist/types/kyc/shared-kyc.d.ts +31 -0
  30. package/dist/types/kyc/use-shared-kyc-flow.d.mts +19 -0
  31. package/dist/types/kyc/use-shared-kyc-flow.d.ts +19 -0
  32. package/dist/types/modals/index.d.mts +2 -0
  33. package/dist/types/modals/index.d.ts +2 -0
  34. package/dist/types/pages/event-market/event-market.shared.d.mts +2 -1
  35. package/dist/types/pages/event-market/event-market.shared.d.ts +2 -1
  36. package/dist/types/pages/event-market/event-market.types.d.mts +2 -0
  37. package/dist/types/pages/event-market/event-market.types.d.ts +2 -0
  38. package/dist/types/pages/event-market/sports-event-market-page.d.mts +1 -1
  39. package/dist/types/pages/event-market/sports-event-market-page.d.ts +1 -1
  40. package/dist/types/pages/user-profile/components/positions-value-card.d.mts +17 -1
  41. package/dist/types/pages/user-profile/components/positions-value-card.d.ts +17 -1
  42. package/dist/types/pages/user-profile/components/user-info-card.d.mts +11 -1
  43. package/dist/types/pages/user-profile/components/user-info-card.d.ts +11 -1
  44. package/dist/types/paper-trading/index.d.mts +6 -0
  45. package/dist/types/paper-trading/index.d.ts +6 -0
  46. package/dist/types/paper-trading/paper-onboarding-modal.d.mts +15 -0
  47. package/dist/types/paper-trading/paper-onboarding-modal.d.ts +15 -0
  48. package/dist/types/paper-trading/paper-onboarding-modal.types.d.mts +33 -0
  49. package/dist/types/paper-trading/paper-onboarding-modal.types.d.ts +33 -0
  50. package/dist/types/paper-trading/paper-trading-badge.d.mts +50 -0
  51. package/dist/types/paper-trading/paper-trading-badge.d.ts +50 -0
  52. package/dist/types/paper-trading/paper-trading-onboarding.d.mts +16 -0
  53. package/dist/types/paper-trading/paper-trading-onboarding.d.ts +16 -0
  54. package/dist/types/primitives/header/header.types.d.mts +16 -0
  55. package/dist/types/primitives/header/header.types.d.ts +16 -0
  56. package/dist/types/primitives/header/index.d.mts +1 -1
  57. package/dist/types/primitives/header/index.d.ts +1 -1
  58. package/dist/types/primitives/icon/registry.d.mts +20 -0
  59. package/dist/types/primitives/icon/registry.d.ts +20 -0
  60. package/dist/types/primitives/icon/svg/paper-buying-power.d.mts +11 -0
  61. package/dist/types/primitives/icon/svg/paper-buying-power.d.ts +11 -0
  62. package/dist/types/primitives/icon/svg/paper-earnings.d.mts +11 -0
  63. package/dist/types/primitives/icon/svg/paper-earnings.d.ts +11 -0
  64. package/dist/types/primitives/icon/svg/paper-onboarding-funds.d.mts +12 -0
  65. package/dist/types/primitives/icon/svg/paper-onboarding-funds.d.ts +12 -0
  66. package/dist/types/primitives/icon/svg/paper-onboarding-markets.d.mts +12 -0
  67. package/dist/types/primitives/icon/svg/paper-onboarding-markets.d.ts +12 -0
  68. package/dist/types/primitives/icon/svg/paper-onboarding-performance.d.mts +12 -0
  69. package/dist/types/primitives/icon/svg/paper-onboarding-performance.d.ts +12 -0
  70. package/dist/types/primitives/modal/modal.types.d.mts +6 -0
  71. package/dist/types/primitives/modal/modal.types.d.ts +6 -0
  72. package/dist/types/trading/index.d.mts +1 -0
  73. package/dist/types/trading/index.d.ts +1 -0
  74. package/dist/types/trading/place-order/index.d.mts +1 -1
  75. package/dist/types/trading/place-order/index.d.ts +1 -1
  76. package/dist/types/trading/place-order/index.place-order.types.d.mts +8 -0
  77. package/dist/types/trading/place-order/index.place-order.types.d.ts +8 -0
  78. package/dist/types/trading/types.d.mts +2 -0
  79. package/dist/types/trading/types.d.ts +2 -0
  80. package/package.json +3 -3
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ConnectKalshiModal,
4
4
  dispatchAggDepositNotification
5
- } from "./chunk-XR6C3MZX.mjs";
5
+ } from "./chunk-H7L4HDXS.mjs";
6
6
  import {
7
7
  BoltIcon,
8
8
  Button,
@@ -31,11 +31,12 @@ import {
31
31
  cn,
32
32
  formatCompactUsd,
33
33
  formatTokenAmount,
34
+ formatUsd,
34
35
  getMotionClassName,
35
36
  shortenAddress,
36
37
  useOptionalToast,
37
38
  venueLogoLabels
38
- } from "./chunk-UQ7XJIAZ.mjs";
39
+ } from "./chunk-NYL6A6AD.mjs";
39
40
 
40
41
  // src/deposit/index.tsx
41
42
  import { useAggAuthState, useAggUiConfig, useDepositAddresses, useLabels as useLabels11 } from "@agg-build/hooks";
@@ -2481,8 +2482,258 @@ var WithdrawModal = (props) => {
2481
2482
  };
2482
2483
  WithdrawModal.displayName = "WithdrawModal";
2483
2484
 
2485
+ // src/paper-trading/paper-trading-badge.tsx
2486
+ import { useLabels as useLabels15, useResolvedExecutionMode } from "@agg-build/hooks";
2487
+ import { jsx as jsx17 } from "react/jsx-runtime";
2488
+ var PaperTradingBadge = ({
2489
+ placement = "chip",
2490
+ isAuthenticated = false,
2491
+ forceVisible = false,
2492
+ classNames
2493
+ }) => {
2494
+ const labels = useLabels15();
2495
+ const { isPaperMode, isResolving } = useResolvedExecutionMode();
2496
+ if (!forceVisible && (isResolving || !isPaperMode)) return null;
2497
+ if (placement === "brand" && isAuthenticated && !forceVisible) return null;
2498
+ const placementClassName = {
2499
+ brand: "inline-flex md:hidden",
2500
+ chip: "inline-flex",
2501
+ signedOut: "hidden md:inline-flex"
2502
+ }[placement];
2503
+ return /* @__PURE__ */ jsx17(
2504
+ Tooltip,
2505
+ {
2506
+ content: labels.paperTrading.badgeTooltip,
2507
+ side: "bottom",
2508
+ sideOffset: 3,
2509
+ size: "small",
2510
+ classNames: {
2511
+ content: cn(
2512
+ // Figma node 4772:31068: 253px wide, 12/8 padding, 12px/16px text,
2513
+ // centred — which lands the copy on exactly two lines. The `!`
2514
+ // suffixes are required because `cn` is a plain join, not
2515
+ // tailwind-merge, so conflicting utilities from tooltipSizeClasses
2516
+ // would otherwise win on stylesheet order rather than call order.
2517
+ "max-w-[253px]! px-3! py-2! text-agg-xs! leading-agg-4! text-center",
2518
+ classNames == null ? void 0 : classNames.tooltip
2519
+ )
2520
+ },
2521
+ children: /* @__PURE__ */ jsx17(
2522
+ "span",
2523
+ {
2524
+ className: cn("agg-paper-trading-badge items-center", placementClassName, classNames == null ? void 0 : classNames.root),
2525
+ "data-testid": "agg-paper-trading-badge",
2526
+ "data-placement": placement,
2527
+ children: /* @__PURE__ */ jsx17(
2528
+ "span",
2529
+ {
2530
+ className: cn(
2531
+ "inline-flex items-center justify-center rounded-full",
2532
+ "px-3 py-1",
2533
+ // Mobile pins an explicit 24px (Figma 4772:34209); from md the
2534
+ // height falls out of padding + line-height at 22px, matching the
2535
+ // in-chip pill (4772:31077).
2536
+ "h-6 md:h-auto",
2537
+ "bg-agg-primary/10 text-agg-primary",
2538
+ "text-[10px] leading-[14px] font-agg-bold uppercase whitespace-nowrap",
2539
+ classNames == null ? void 0 : classNames.pill
2540
+ ),
2541
+ children: labels.paperTrading.badge
2542
+ }
2543
+ )
2544
+ }
2545
+ )
2546
+ }
2547
+ );
2548
+ };
2549
+ PaperTradingBadge.displayName = "PaperTradingBadge";
2550
+
2551
+ // src/paper-trading/paper-trading-onboarding.tsx
2552
+ import { useAppConfig, usePaperOnboarding } from "@agg-build/hooks";
2553
+
2554
+ // src/paper-trading/paper-onboarding-modal.tsx
2555
+ import { useCallback as useCallback2, useMemo as useMemo2, useState as useState4 } from "react";
2556
+ import { useLabels as useLabels16 } from "@agg-build/hooks";
2557
+ import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2558
+ var PaperOnboardingModal = ({
2559
+ open,
2560
+ onDismiss,
2561
+ startingBalanceLabel,
2562
+ classNames
2563
+ }) => {
2564
+ const labels = useLabels16();
2565
+ const copy = labels.paperTrading.onboarding;
2566
+ const [stepIndex, setStepIndex] = useState4(0);
2567
+ const steps = useMemo2(
2568
+ () => [
2569
+ {
2570
+ key: "realMarkets",
2571
+ icon: "paper-onboarding-markets",
2572
+ title: copy.realMarkets.title,
2573
+ body: copy.realMarkets.body
2574
+ },
2575
+ {
2576
+ key: "zeroRisk",
2577
+ icon: "paper-onboarding-funds",
2578
+ title: copy.zeroRisk.title,
2579
+ body: copy.zeroRisk.body({ amount: startingBalanceLabel })
2580
+ },
2581
+ {
2582
+ key: "readyToTrade",
2583
+ icon: "paper-onboarding-performance",
2584
+ title: copy.readyToTrade.title,
2585
+ body: copy.readyToTrade.body
2586
+ }
2587
+ ],
2588
+ [copy, startingBalanceLabel]
2589
+ );
2590
+ const total = steps.length;
2591
+ const isFirst = stepIndex === 0;
2592
+ const isLast = stepIndex === total - 1;
2593
+ const step = steps[stepIndex];
2594
+ const handleBack = useCallback2(() => {
2595
+ setStepIndex((current) => Math.max(0, current - 1));
2596
+ }, []);
2597
+ const handleNext = useCallback2(() => {
2598
+ if (isLast) {
2599
+ onDismiss();
2600
+ return;
2601
+ }
2602
+ setStepIndex((current) => Math.min(total - 1, current + 1));
2603
+ }, [isLast, onDismiss, total]);
2604
+ const handleOpenChange = useCallback2(
2605
+ (next) => {
2606
+ if (next) return;
2607
+ setStepIndex(0);
2608
+ onDismiss();
2609
+ },
2610
+ [onDismiss]
2611
+ );
2612
+ return /* @__PURE__ */ jsx18(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsx18(
2613
+ Modal.Container,
2614
+ {
2615
+ maxWidth: "480px",
2616
+ "aria-label": step.title,
2617
+ classNames: {
2618
+ overlay: classNames == null ? void 0 : classNames.overlay,
2619
+ // Figma 4772:33889 keeps this as a centred, inset card on mobile
2620
+ // (352px inside a 400px frame) rather than the modal default of a
2621
+ // full-bleed bottom sheet. 24px inset matches the frame's margins.
2622
+ center: "items-center! p-6!",
2623
+ // Figma 4772:31183 is ONE 480px surface with a 12px radius. The
2624
+ // container already supplies the border, background and width, so
2625
+ // the inner element must not draw a second bordered card inside it
2626
+ // — that rendered as a double outline and shrank the card to 478px.
2627
+ // Only the radius needs overriding, from the container's default 16.
2628
+ container: cn("rounded-agg-xl! md:rounded-agg-xl!", classNames == null ? void 0 : classNames.card)
2629
+ },
2630
+ children: /* @__PURE__ */ jsxs17("div", { className: cn("agg-paper-onboarding", "flex w-full flex-col gap-5 p-6"), children: [
2631
+ /* @__PURE__ */ jsxs17("div", { className: "flex w-full items-start justify-center gap-5", children: [
2632
+ /* @__PURE__ */ jsx18(
2633
+ "div",
2634
+ {
2635
+ className: cn(
2636
+ "flex size-11 shrink-0 items-center justify-center overflow-hidden",
2637
+ "rounded-agg-lg bg-agg-primary/10 text-agg-primary",
2638
+ classNames == null ? void 0 : classNames.icon
2639
+ ),
2640
+ children: /* @__PURE__ */ jsx18(Icon, { name: step.icon, className: "!h-6 !w-6", "aria-hidden": "true" })
2641
+ }
2642
+ ),
2643
+ /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-1 flex-col gap-2 break-words", children: [
2644
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-1", children: [
2645
+ /* @__PURE__ */ jsx18(
2646
+ "p",
2647
+ {
2648
+ className: cn(
2649
+ // Figma node 4772:31190: 10px / 14px bold uppercase.
2650
+ // NOT `agg-type-label-caps`, which is 14px / 20px.
2651
+ "text-agg-2xs leading-agg-14 font-agg-bold uppercase",
2652
+ "text-agg-muted-foreground",
2653
+ classNames == null ? void 0 : classNames.eyebrow
2654
+ ),
2655
+ children: copy.stepEyebrow({ current: stepIndex + 1, total })
2656
+ }
2657
+ ),
2658
+ /* @__PURE__ */ jsx18(
2659
+ "p",
2660
+ {
2661
+ className: cn(
2662
+ "text-agg-base leading-agg-6 font-agg-bold text-agg-foreground",
2663
+ classNames == null ? void 0 : classNames.title
2664
+ ),
2665
+ children: step.title
2666
+ }
2667
+ )
2668
+ ] }),
2669
+ /* @__PURE__ */ jsx18("p", { className: cn("text-agg-sm leading-agg-5 text-agg-foreground", classNames == null ? void 0 : classNames.body), children: step.body })
2670
+ ] })
2671
+ ] }),
2672
+ /* @__PURE__ */ jsxs17("div", { className: cn("flex w-full items-center justify-between", classNames == null ? void 0 : classNames.footer), children: [
2673
+ /* @__PURE__ */ jsx18("div", { className: cn("flex items-center gap-1", classNames == null ? void 0 : classNames.dots), "aria-hidden": "true", children: steps.map((dotStep, index) => /* @__PURE__ */ jsx18(
2674
+ "span",
2675
+ {
2676
+ className: cn(
2677
+ "rounded-full transition-all",
2678
+ index === stepIndex ? "h-1 w-4 bg-agg-primary" : "size-1 bg-agg-separator"
2679
+ )
2680
+ },
2681
+ dotStep.key
2682
+ )) }),
2683
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-start gap-3", children: [
2684
+ /* @__PURE__ */ jsx18(
2685
+ Button,
2686
+ {
2687
+ variant: "secondary",
2688
+ size: "small",
2689
+ onClick: isFirst ? onDismiss : handleBack,
2690
+ className: "w-20 rounded-full",
2691
+ children: isFirst ? copy.skip : copy.back
2692
+ }
2693
+ ),
2694
+ /* @__PURE__ */ jsx18(
2695
+ Button,
2696
+ {
2697
+ variant: "primary",
2698
+ size: "small",
2699
+ onClick: handleNext,
2700
+ className: "w-[120px] rounded-full",
2701
+ children: isLast ? copy.done : copy.next
2702
+ }
2703
+ )
2704
+ ] })
2705
+ ] })
2706
+ ] })
2707
+ }
2708
+ ) });
2709
+ };
2710
+ PaperOnboardingModal.displayName = "PaperOnboardingModal";
2711
+
2712
+ // src/paper-trading/paper-trading-onboarding.tsx
2713
+ import { jsx as jsx19 } from "react/jsx-runtime";
2714
+ var FALLBACK_STARTING_BALANCE = 1e4;
2715
+ var PaperTradingOnboarding = ({
2716
+ classNames
2717
+ }) => {
2718
+ const { isOpen, dismiss } = usePaperOnboarding();
2719
+ const { paperStartingBalance } = useAppConfig();
2720
+ if (!isOpen) return null;
2721
+ return /* @__PURE__ */ jsx19(
2722
+ PaperOnboardingModal,
2723
+ {
2724
+ open: true,
2725
+ onDismiss: dismiss,
2726
+ startingBalanceLabel: formatUsd(paperStartingBalance != null ? paperStartingBalance : FALLBACK_STARTING_BALANCE, {
2727
+ maximumFractionDigits: 0
2728
+ }),
2729
+ classNames
2730
+ }
2731
+ );
2732
+ };
2733
+ PaperTradingOnboarding.displayName = "PaperTradingOnboarding";
2734
+
2484
2735
  // src/profile/index.tsx
2485
- import { useState as useState4, useEffect as useEffect5, useCallback as useCallback3, useMemo as useMemo3 } from "react";
2736
+ import { useState as useState5, useEffect as useEffect5, useCallback as useCallback4, useMemo as useMemo4 } from "react";
2486
2737
  import { useAggClient, useAggAuthState as useAggAuthState2, useVenueKeyStatus } from "@agg-build/hooks";
2487
2738
  import { Venue } from "@agg-build/sdk";
2488
2739
 
@@ -2501,9 +2752,9 @@ var getProfileTabItems = () => [
2501
2752
  ];
2502
2753
 
2503
2754
  // src/profile/tabs/about-tab.tsx
2504
- import { useCallback as useCallback2, useRef as useRef2 } from "react";
2505
- import { useLabels as useLabels15 } from "@agg-build/hooks";
2506
- import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
2755
+ import { useCallback as useCallback3, useRef as useRef2 } from "react";
2756
+ import { useLabels as useLabels17 } from "@agg-build/hooks";
2757
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
2507
2758
  var AboutTab = ({
2508
2759
  avatarPreview,
2509
2760
  onDeleteProfile: _onDeleteProfile,
@@ -2513,13 +2764,13 @@ var AboutTab = ({
2513
2764
  draftAvatarPreview,
2514
2765
  avatarError: _avatarError
2515
2766
  }) => {
2516
- const labels = useLabels15();
2767
+ const labels = useLabels17();
2517
2768
  const fileInputRef = useRef2(null);
2518
- const handleAvatarClick = useCallback2(() => {
2769
+ const handleAvatarClick = useCallback3(() => {
2519
2770
  var _a;
2520
2771
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
2521
2772
  }, []);
2522
- const handleFileChange = useCallback2(
2773
+ const handleFileChange = useCallback3(
2523
2774
  (e) => {
2524
2775
  var _a;
2525
2776
  const file = (_a = e.target.files) == null ? void 0 : _a[0];
@@ -2535,8 +2786,8 @@ var AboutTab = ({
2535
2786
  );
2536
2787
  const resolvedPreview = draftAvatarPreview != null ? draftAvatarPreview : avatarPreview;
2537
2788
  const hasAvatarPreview = Boolean(resolvedPreview);
2538
- return /* @__PURE__ */ jsx17("div", { className: "agg-profile-about flex flex-col gap-8", children: /* @__PURE__ */ jsxs17("div", { className: "agg-profile-avatar-section flex w-full items-center gap-6", children: [
2539
- /* @__PURE__ */ jsxs17(
2789
+ return /* @__PURE__ */ jsx20("div", { className: "agg-profile-about flex flex-col gap-8", children: /* @__PURE__ */ jsxs18("div", { className: "agg-profile-avatar-section flex w-full items-center gap-6", children: [
2790
+ /* @__PURE__ */ jsxs18(
2540
2791
  "button",
2541
2792
  {
2542
2793
  type: "button",
@@ -2553,13 +2804,13 @@ var AboutTab = ({
2553
2804
  ),
2554
2805
  "aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
2555
2806
  children: [
2556
- !hasAvatarPreview ? /* @__PURE__ */ jsx17(
2807
+ !hasAvatarPreview ? /* @__PURE__ */ jsx20(
2557
2808
  "svg",
2558
2809
  {
2559
2810
  "aria-hidden": true,
2560
2811
  viewBox: "0 0 80 80",
2561
2812
  className: "pointer-events-none absolute inset-0 h-full w-full text-agg-separator group-hover:text-agg-muted-foreground",
2562
- children: /* @__PURE__ */ jsx17(
2813
+ children: /* @__PURE__ */ jsx20(
2563
2814
  "circle",
2564
2815
  {
2565
2816
  cx: "40",
@@ -2573,18 +2824,18 @@ var AboutTab = ({
2573
2824
  )
2574
2825
  }
2575
2826
  ) : null,
2576
- resolvedPreview ? /* @__PURE__ */ jsx17(
2827
+ resolvedPreview ? /* @__PURE__ */ jsx20(
2577
2828
  RemoteImage,
2578
2829
  {
2579
2830
  src: resolvedPreview,
2580
2831
  alt: labels.onboarding.profileSetup.profilePreviewAlt,
2581
2832
  className: "h-full w-full object-cover"
2582
2833
  }
2583
- ) : /* @__PURE__ */ jsx17(Icon, { name: "profile", className: "h-7 w-7 text-agg-muted-foreground" })
2834
+ ) : /* @__PURE__ */ jsx20(Icon, { name: "profile", className: "h-7 w-7 text-agg-muted-foreground" })
2584
2835
  ]
2585
2836
  }
2586
2837
  ),
2587
- /* @__PURE__ */ jsx17(
2838
+ /* @__PURE__ */ jsx20(
2588
2839
  "input",
2589
2840
  {
2590
2841
  ref: fileInputRef,
@@ -2595,8 +2846,8 @@ var AboutTab = ({
2595
2846
  "aria-hidden": "true"
2596
2847
  }
2597
2848
  ),
2598
- /* @__PURE__ */ jsxs17("div", { className: "agg-form-section flex min-w-0 flex-1 flex-col gap-2", children: [
2599
- /* @__PURE__ */ jsx17(
2849
+ /* @__PURE__ */ jsxs18("div", { className: "agg-form-section flex min-w-0 flex-1 flex-col gap-2", children: [
2850
+ /* @__PURE__ */ jsx20(
2600
2851
  "label",
2601
2852
  {
2602
2853
  htmlFor: "profile-username",
@@ -2604,7 +2855,7 @@ var AboutTab = ({
2604
2855
  children: "Username"
2605
2856
  }
2606
2857
  ),
2607
- /* @__PURE__ */ jsx17(
2858
+ /* @__PURE__ */ jsx20(
2608
2859
  "input",
2609
2860
  {
2610
2861
  id: "profile-username",
@@ -2631,9 +2882,9 @@ var AboutTab = ({
2631
2882
  AboutTab.displayName = "AboutTab";
2632
2883
 
2633
2884
  // src/profile/tabs/accounts-wallets-tab.tsx
2634
- import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
2635
- var SectionTitle = ({ children }) => /* @__PURE__ */ jsx18("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
2636
- var AccountRow = ({ children, className }) => /* @__PURE__ */ jsx18(
2885
+ import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
2886
+ var SectionTitle = ({ children }) => /* @__PURE__ */ jsx21("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
2887
+ var AccountRow = ({ children, className }) => /* @__PURE__ */ jsx21(
2637
2888
  "div",
2638
2889
  {
2639
2890
  className: cn(
@@ -2649,11 +2900,11 @@ var AccountIdentity = ({
2649
2900
  icon,
2650
2901
  label,
2651
2902
  iconClassName
2652
- }) => /* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 items-center gap-3", children: [
2653
- /* @__PURE__ */ jsx18("span", { className: cn("flex h-5 w-5 shrink-0 items-center justify-center", iconClassName), children: /* @__PURE__ */ jsx18(Icon, { name: icon, size: "small", color: "currentColor" }) }),
2654
- /* @__PURE__ */ jsx18("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: label })
2903
+ }) => /* @__PURE__ */ jsxs19("div", { className: "flex min-w-0 items-center gap-3", children: [
2904
+ /* @__PURE__ */ jsx21("span", { className: cn("flex h-5 w-5 shrink-0 items-center justify-center", iconClassName), children: /* @__PURE__ */ jsx21(Icon, { name: icon, size: "small", color: "currentColor" }) }),
2905
+ /* @__PURE__ */ jsx21("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: label })
2655
2906
  ] });
2656
- var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx18(
2907
+ var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx21(
2657
2908
  "button",
2658
2909
  {
2659
2910
  type: "button",
@@ -2662,7 +2913,7 @@ var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx18(
2662
2913
  children: "Connect"
2663
2914
  }
2664
2915
  );
2665
- var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx18(
2916
+ var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx21(
2666
2917
  "button",
2667
2918
  {
2668
2919
  type: "button",
@@ -2671,7 +2922,7 @@ var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx18(
2671
2922
  children: "Disconnect"
2672
2923
  }
2673
2924
  );
2674
- var VerifiedBadge = () => /* @__PURE__ */ jsx18(Icon, { name: "check-badge", size: "small", color: "var(--agg-color-primary, #536dfe)" });
2925
+ var VerifiedBadge = () => /* @__PURE__ */ jsx21(Icon, { name: "check-badge", size: "small", color: "var(--agg-color-primary, #536dfe)" });
2675
2926
  var getWalletIconName = (wallet) => {
2676
2927
  const chain = wallet.chain.toLowerCase();
2677
2928
  if (chain === "solana" || chain === "svm") {
@@ -2689,12 +2940,12 @@ var ConnectedAccountRow = ({
2689
2940
  onDisconnect
2690
2941
  }) => {
2691
2942
  const displayLabel = connected ? connectedLabel != null ? connectedLabel : label : label;
2692
- return /* @__PURE__ */ jsxs18(AccountRow, { className: "agg-social-account-row gap-4", children: [
2693
- /* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 items-center gap-3", children: [
2694
- /* @__PURE__ */ jsx18(AccountIdentity, { icon, label: displayLabel, iconClassName }),
2695
- connected ? /* @__PURE__ */ jsx18(VerifiedBadge, {}) : null
2943
+ return /* @__PURE__ */ jsxs19(AccountRow, { className: "agg-social-account-row gap-4", children: [
2944
+ /* @__PURE__ */ jsxs19("div", { className: "flex min-w-0 items-center gap-3", children: [
2945
+ /* @__PURE__ */ jsx21(AccountIdentity, { icon, label: displayLabel, iconClassName }),
2946
+ connected ? /* @__PURE__ */ jsx21(VerifiedBadge, {}) : null
2696
2947
  ] }),
2697
- connected ? /* @__PURE__ */ jsx18(DisconnectTextButton, { onClick: onDisconnect }) : /* @__PURE__ */ jsx18(ConnectTextButton, { onClick: onConnect })
2948
+ connected ? /* @__PURE__ */ jsx21(DisconnectTextButton, { onClick: onDisconnect }) : /* @__PURE__ */ jsx21(ConnectTextButton, { onClick: onConnect })
2698
2949
  ] });
2699
2950
  };
2700
2951
  var AccountsWalletsTab = ({
@@ -2713,11 +2964,11 @@ var AccountsWalletsTab = ({
2713
2964
  const google = socialAccounts == null ? void 0 : socialAccounts.google;
2714
2965
  const apple = socialAccounts == null ? void 0 : socialAccounts.apple;
2715
2966
  const hasEmail = Boolean(email);
2716
- return /* @__PURE__ */ jsxs18("div", { className: "agg-accounts-wallets-tab flex flex-col gap-6", children: [
2717
- /* @__PURE__ */ jsxs18("div", { className: "agg-social-accounts-section flex flex-col gap-3", children: [
2718
- /* @__PURE__ */ jsx18(SectionTitle, { children: "Connected accounts" }),
2719
- /* @__PURE__ */ jsxs18("div", { className: "agg-social-accounts-list flex flex-col gap-4", children: [
2720
- /* @__PURE__ */ jsx18(
2967
+ return /* @__PURE__ */ jsxs19("div", { className: "agg-accounts-wallets-tab flex flex-col gap-6", children: [
2968
+ /* @__PURE__ */ jsxs19("div", { className: "agg-social-accounts-section flex flex-col gap-3", children: [
2969
+ /* @__PURE__ */ jsx21(SectionTitle, { children: "Connected accounts" }),
2970
+ /* @__PURE__ */ jsxs19("div", { className: "agg-social-accounts-list flex flex-col gap-4", children: [
2971
+ /* @__PURE__ */ jsx21(
2721
2972
  ConnectedAccountRow,
2722
2973
  {
2723
2974
  icon: "google",
@@ -2729,7 +2980,7 @@ var AccountsWalletsTab = ({
2729
2980
  onDisconnect: onDisconnectGoogle
2730
2981
  }
2731
2982
  ),
2732
- /* @__PURE__ */ jsx18(
2983
+ /* @__PURE__ */ jsx21(
2733
2984
  ConnectedAccountRow,
2734
2985
  {
2735
2986
  icon: "apple",
@@ -2741,7 +2992,7 @@ var AccountsWalletsTab = ({
2741
2992
  onDisconnect: onDisconnectApple
2742
2993
  }
2743
2994
  ),
2744
- /* @__PURE__ */ jsx18(
2995
+ /* @__PURE__ */ jsx21(
2745
2996
  ConnectedAccountRow,
2746
2997
  {
2747
2998
  icon: "twitter",
@@ -2753,7 +3004,7 @@ var AccountsWalletsTab = ({
2753
3004
  onDisconnect: onDisconnectTwitter
2754
3005
  }
2755
3006
  ),
2756
- /* @__PURE__ */ jsx18(
3007
+ /* @__PURE__ */ jsx21(
2757
3008
  ConnectedAccountRow,
2758
3009
  {
2759
3010
  icon: "email",
@@ -2766,12 +3017,12 @@ var AccountsWalletsTab = ({
2766
3017
  )
2767
3018
  ] })
2768
3019
  ] }),
2769
- wallets.length > 0 ? /* @__PURE__ */ jsxs18("div", { className: "agg-wallets-section flex flex-col gap-3", children: [
2770
- /* @__PURE__ */ jsx18(SectionTitle, { children: "Wallets" }),
2771
- /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-2", children: wallets.map((wallet) => {
3020
+ wallets.length > 0 ? /* @__PURE__ */ jsxs19("div", { className: "agg-wallets-section flex flex-col gap-3", children: [
3021
+ /* @__PURE__ */ jsx21(SectionTitle, { children: "Wallets" }),
3022
+ /* @__PURE__ */ jsx21("div", { className: "flex flex-col gap-2", children: wallets.map((wallet) => {
2772
3023
  var _a;
2773
- return /* @__PURE__ */ jsx18(AccountRow, { className: "gap-4", children: /* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 items-center gap-3", children: [
2774
- /* @__PURE__ */ jsx18(
3024
+ return /* @__PURE__ */ jsx21(AccountRow, { className: "gap-4", children: /* @__PURE__ */ jsxs19("div", { className: "flex min-w-0 items-center gap-3", children: [
3025
+ /* @__PURE__ */ jsx21(
2775
3026
  AccountIdentity,
2776
3027
  {
2777
3028
  icon: getWalletIconName(wallet),
@@ -2779,7 +3030,7 @@ var AccountsWalletsTab = ({
2779
3030
  label: (_a = wallet.displayAddress) != null ? _a : wallet.address
2780
3031
  }
2781
3032
  ),
2782
- /* @__PURE__ */ jsx18(VerifiedBadge, {})
3033
+ /* @__PURE__ */ jsx21(VerifiedBadge, {})
2783
3034
  ] }) }, `${wallet.chain}:${wallet.address}`);
2784
3035
  }) })
2785
3036
  ] }) : null
@@ -2791,12 +3042,12 @@ AccountsWalletsTab.displayName = "AccountsWalletsTab";
2791
3042
  import {
2792
3043
  getVenueAvailabilityState,
2793
3044
  getVisibleVenuesByConfig,
2794
- useAppConfig,
3045
+ useAppConfig as useAppConfig2,
2795
3046
  useGeoBlock,
2796
- useLabels as useLabels16
3047
+ useLabels as useLabels18
2797
3048
  } from "@agg-build/hooks";
2798
- import { useMemo as useMemo2 } from "react";
2799
- import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
3049
+ import { useMemo as useMemo3 } from "react";
3050
+ import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
2800
3051
  var TRADING_ACCESS_VENUES = [
2801
3052
  "kalshi",
2802
3053
  "polymarket",
@@ -2808,8 +3059,8 @@ var TRADING_ACCESS_VENUES = [
2808
3059
  "hyperliquid"
2809
3060
  ];
2810
3061
  var TRADING_ACCESS_VENUE_ITEMS = TRADING_ACCESS_VENUES.map((id) => ({ id }));
2811
- var SectionTitle2 = ({ children }) => /* @__PURE__ */ jsx19("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
2812
- var AccessRow = ({ children }) => /* @__PURE__ */ jsx19(
3062
+ var SectionTitle2 = ({ children }) => /* @__PURE__ */ jsx22("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
3063
+ var AccessRow = ({ children }) => /* @__PURE__ */ jsx22(
2813
3064
  "div",
2814
3065
  {
2815
3066
  className: cn(
@@ -2821,17 +3072,17 @@ var AccessRow = ({ children }) => /* @__PURE__ */ jsx19(
2821
3072
  }
2822
3073
  );
2823
3074
  var AvailableStatus = () => {
2824
- const labels = useLabels16();
2825
- return /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
2826
- /* @__PURE__ */ jsx19(Icon, { name: "check-badge", size: "small", className: "text-agg-primary" }),
2827
- /* @__PURE__ */ jsx19("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground whitespace-nowrap", children: labels.trading.tradingAccessAvailable })
3075
+ const labels = useLabels18();
3076
+ return /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
3077
+ /* @__PURE__ */ jsx22(Icon, { name: "check-badge", size: "small", className: "text-agg-primary" }),
3078
+ /* @__PURE__ */ jsx22("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground whitespace-nowrap", children: labels.trading.tradingAccessAvailable })
2828
3079
  ] });
2829
3080
  };
2830
3081
  var GeoblockedStatus = () => {
2831
- const labels = useLabels16();
2832
- return /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 text-agg-muted-foreground", children: [
2833
- /* @__PURE__ */ jsx19(Icon, { name: "warning-filled", size: "small", color: "currentColor" }),
2834
- /* @__PURE__ */ jsx19("span", { className: "text-agg-sm font-agg-normal leading-agg-5 whitespace-nowrap", children: labels.trading.venueUnavailableInRegion })
3082
+ const labels = useLabels18();
3083
+ return /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 text-agg-muted-foreground", children: [
3084
+ /* @__PURE__ */ jsx22(Icon, { name: "warning-filled", size: "small", color: "currentColor" }),
3085
+ /* @__PURE__ */ jsx22("span", { className: "text-agg-sm font-agg-normal leading-agg-5 whitespace-nowrap", children: labels.trading.venueUnavailableInRegion })
2835
3086
  ] });
2836
3087
  };
2837
3088
  var TradingAccessTab = ({
@@ -2839,37 +3090,34 @@ var TradingAccessTab = ({
2839
3090
  onConnectKalshi,
2840
3091
  onDisconnectKalshi
2841
3092
  }) => {
2842
- var _a, _b, _c, _d;
2843
- const labels = useLabels16();
2844
- const verifyConnectionLabel = (_d = (_c = (_b = (_a = labels.onboarding) == null ? void 0 : _a.connectKalshiModal) == null ? void 0 : _b.actions) == null ? void 0 : _c.verifyConnection) != null ? _d : labels.trading.kycVerify;
2845
- const { disabledVenues, isLoading: isAppConfigLoading } = useAppConfig();
3093
+ const labels = useLabels18();
3094
+ const { disabledVenues, isLoading: isAppConfigLoading } = useAppConfig2();
2846
3095
  const { isLocationBlocked } = useGeoBlock();
2847
- const visibleVenues = useMemo2(
3096
+ const visibleVenues = useMemo3(
2848
3097
  () => getVisibleVenuesByConfig(TRADING_ACCESS_VENUE_ITEMS, disabledVenues),
2849
3098
  [disabledVenues]
2850
3099
  );
2851
- return /* @__PURE__ */ jsxs19("div", { className: "agg-trading-access-section flex flex-col gap-4", children: [
2852
- /* @__PURE__ */ jsx19(SectionTitle2, { children: labels.trading.tradingAccessVenues }),
2853
- /* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-3", children: visibleVenues.map(({ id: venue }) => {
2854
- var _a2;
3100
+ return /* @__PURE__ */ jsxs20("div", { className: "agg-trading-access-section flex flex-col gap-4", children: [
3101
+ /* @__PURE__ */ jsx22(SectionTitle2, { children: labels.trading.tradingAccessVenues }),
3102
+ /* @__PURE__ */ jsx22("div", { className: "flex flex-col gap-3", children: visibleVenues.map(({ id: venue }) => {
3103
+ var _a;
2855
3104
  const venueAccount = venueAccounts == null ? void 0 : venueAccounts.find((account) => account.venue === venue);
2856
3105
  const isKalshi = venue === "kalshi";
2857
3106
  const isConnected = (venueAccount == null ? void 0 : venueAccount.status) === "active";
2858
- const isVerified = (venueAccount == null ? void 0 : venueAccount.kycStatus) === "verified";
2859
3107
  const availabilityState = getVenueAvailabilityState({
2860
3108
  venueId: venue,
2861
3109
  disabledVenues,
2862
3110
  isConfigLoading: isKalshi && isAppConfigLoading,
2863
3111
  isLocationBlocked
2864
3112
  });
2865
- const displayName = (_a2 = venueLogoLabels[venue]) != null ? _a2 : venue;
3113
+ const displayName = (_a = venueLogoLabels[venue]) != null ? _a : venue;
2866
3114
  if (availabilityState === "hidden") return null;
2867
- return /* @__PURE__ */ jsxs19(AccessRow, { children: [
2868
- /* @__PURE__ */ jsxs19("div", { className: "flex min-w-0 items-center gap-3", children: [
2869
- /* @__PURE__ */ jsx19(VenueLogo, { venue, size: "small" }),
2870
- /* @__PURE__ */ jsx19("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: displayName })
3115
+ return /* @__PURE__ */ jsxs20(AccessRow, { children: [
3116
+ /* @__PURE__ */ jsxs20("div", { className: "flex min-w-0 items-center gap-3", children: [
3117
+ /* @__PURE__ */ jsx22(VenueLogo, { venue, size: "small" }),
3118
+ /* @__PURE__ */ jsx22("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: displayName })
2871
3119
  ] }),
2872
- availabilityState === "geoblocked" ? /* @__PURE__ */ jsx19(GeoblockedStatus, {}) : isKalshi && !isConnected ? /* @__PURE__ */ jsx19(
3120
+ availabilityState === "geoblocked" ? /* @__PURE__ */ jsx22(GeoblockedStatus, {}) : isKalshi && !isConnected ? /* @__PURE__ */ jsx22(
2873
3121
  "button",
2874
3122
  {
2875
3123
  type: "button",
@@ -2878,22 +3126,9 @@ var TradingAccessTab = ({
2878
3126
  className: "shrink-0 cursor-pointer text-agg-sm font-agg-bold leading-agg-5 text-agg-primary whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-not-allowed disabled:opacity-60",
2879
3127
  children: labels.trading.tradingAccessAddKalshiAccount
2880
3128
  }
2881
- ) : isKalshi && !isVerified ? /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-4", children: [
2882
- /* @__PURE__ */ jsx19("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: labels.trading.kycRequired }),
2883
- /* @__PURE__ */ jsx19(
2884
- "button",
2885
- {
2886
- type: "button",
2887
- onClick: onConnectKalshi,
2888
- disabled: !onConnectKalshi,
2889
- className: "min-h-11 shrink-0 cursor-pointer text-agg-sm font-agg-bold leading-agg-5 text-agg-primary whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-not-allowed disabled:opacity-60",
2890
- children: verifyConnectionLabel
2891
- }
2892
- )
2893
- ] }) : isKalshi && isVerified ? /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-4", children: [
2894
- /* @__PURE__ */ jsx19("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: labels.trading.verified }),
2895
- /* @__PURE__ */ jsx19(AvailableStatus, {}),
2896
- onDisconnectKalshi ? /* @__PURE__ */ jsx19(
3129
+ ) : isKalshi ? /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-4", children: [
3130
+ /* @__PURE__ */ jsx22(AvailableStatus, {}),
3131
+ onDisconnectKalshi ? /* @__PURE__ */ jsx22(
2897
3132
  "button",
2898
3133
  {
2899
3134
  type: "button",
@@ -2902,7 +3137,7 @@ var TradingAccessTab = ({
2902
3137
  children: labels.auth.disconnect
2903
3138
  }
2904
3139
  ) : null
2905
- ] }) : /* @__PURE__ */ jsx19(AvailableStatus, {})
3140
+ ] }) : /* @__PURE__ */ jsx22(AvailableStatus, {})
2906
3141
  ] }, venue);
2907
3142
  }) })
2908
3143
  ] });
@@ -2910,7 +3145,7 @@ var TradingAccessTab = ({
2910
3145
  TradingAccessTab.displayName = "TradingAccessTab";
2911
3146
 
2912
3147
  // src/profile/index.tsx
2913
- import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
3148
+ import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
2914
3149
  var ProfileModal = ({
2915
3150
  open,
2916
3151
  onOpenChange,
@@ -2937,15 +3172,15 @@ var ProfileModal = ({
2937
3172
  const client = useAggClient();
2938
3173
  const { user } = useAggAuthState2();
2939
3174
  const toastCtx = useOptionalToast();
2940
- const [activeTab, setActiveTab] = useState4(PROFILE_TAB_KEYS.PROFILE_ACCOUNTS);
2941
- const profileTabItems = useMemo3(() => getProfileTabItems(), []);
3175
+ const [activeTab, setActiveTab] = useState5(PROFILE_TAB_KEYS.PROFILE_ACCOUNTS);
3176
+ const profileTabItems = useMemo4(() => getProfileTabItems(), []);
2942
3177
  const resolvedInitialUsername = (_a = username != null ? username : user == null ? void 0 : user.username) != null ? _a : "";
2943
- const [draftUsername, setDraftUsername] = useState4(resolvedInitialUsername);
2944
- const [draftAvatarFile, setDraftAvatarFile] = useState4();
2945
- const [draftAvatarPreview, setDraftAvatarPreview] = useState4();
2946
- const [isSaving, setIsSaving] = useState4(false);
2947
- const [avatarTypeError, setAvatarTypeError] = useState4(null);
2948
- const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = useState4(false);
3178
+ const [draftUsername, setDraftUsername] = useState5(resolvedInitialUsername);
3179
+ const [draftAvatarFile, setDraftAvatarFile] = useState5();
3180
+ const [draftAvatarPreview, setDraftAvatarPreview] = useState5();
3181
+ const [isSaving, setIsSaving] = useState5(false);
3182
+ const [avatarTypeError, setAvatarTypeError] = useState5(null);
3183
+ const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = useState5(false);
2949
3184
  const { data: kalshiStatus, refetch: refetchKalshiStatus } = useVenueKeyStatus(
2950
3185
  Venue.kalshi,
2951
3186
  open
@@ -2958,7 +3193,7 @@ var ProfileModal = ({
2958
3193
  if (open) return;
2959
3194
  setIsConnectKalshiModalOpen(false);
2960
3195
  }, [open]);
2961
- const handleOpenChange = useCallback3(
3196
+ const handleOpenChange = useCallback4(
2962
3197
  (isOpen) => {
2963
3198
  var _a2;
2964
3199
  if (!isOpen) {
@@ -2982,7 +3217,7 @@ var ProfileModal = ({
2982
3217
  setDraftAvatarPreview
2983
3218
  ]
2984
3219
  );
2985
- const handleDraftAvatarChange = useCallback3(
3220
+ const handleDraftAvatarChange = useCallback4(
2986
3221
  (file, preview) => {
2987
3222
  const ACCEPTED_AVATAR_TYPES = ["image/jpeg", "image/png", "image/gif", "image/webp"];
2988
3223
  if (file && !ACCEPTED_AVATAR_TYPES.includes(file.type)) {
@@ -2997,7 +3232,7 @@ var ProfileModal = ({
2997
3232
  );
2998
3233
  const originalUsername = (_b = username != null ? username : user == null ? void 0 : user.username) != null ? _b : "";
2999
3234
  const hasChanges = draftUsername !== originalUsername || draftAvatarFile !== void 0;
3000
- const handleSave = useCallback3(() => __async(null, null, function* () {
3235
+ const handleSave = useCallback4(() => __async(null, null, function* () {
3001
3236
  var _a2, _b2, _c2;
3002
3237
  setIsSaving(true);
3003
3238
  try {
@@ -3052,10 +3287,10 @@ var ProfileModal = ({
3052
3287
  originalUsername,
3053
3288
  toastCtx
3054
3289
  ]);
3055
- const handleCancel = useCallback3(() => {
3290
+ const handleCancel = useCallback4(() => {
3056
3291
  handleOpenChange(false);
3057
3292
  }, [handleOpenChange]);
3058
- const handleVerifyKalshi = useCallback3(
3293
+ const handleVerifyKalshi = useCallback4(
3059
3294
  (credentials) => __async(null, null, function* () {
3060
3295
  if (onConnectKalshi) {
3061
3296
  yield onConnectKalshi(credentials);
@@ -3073,12 +3308,12 @@ var ProfileModal = ({
3073
3308
  }),
3074
3309
  [client, onConnectKalshi, refetchKalshiStatus]
3075
3310
  );
3076
- const handleDisconnectKalshi = useCallback3(() => __async(null, null, function* () {
3311
+ const handleDisconnectKalshi = useCallback4(() => __async(null, null, function* () {
3077
3312
  yield client.deleteVenueKey(Venue.kalshi);
3078
3313
  yield refetchKalshiStatus();
3079
3314
  onDisconnectExchange == null ? void 0 : onDisconnectExchange(Venue.kalshi);
3080
3315
  }), [client, onDisconnectExchange, refetchKalshiStatus]);
3081
- const resolvedVenueAccounts = useMemo3(() => {
3316
+ const resolvedVenueAccounts = useMemo4(() => {
3082
3317
  var _a2;
3083
3318
  const nonKalshiAccounts = (_a2 = user == null ? void 0 : user.venueAccounts) == null ? void 0 : _a2.filter((account) => account.venue !== "kalshi");
3084
3319
  if (!kalshiStatus) return user == null ? void 0 : user.venueAccounts;
@@ -3134,7 +3369,7 @@ var ProfileModal = ({
3134
3369
  if (typeof window === "undefined") return;
3135
3370
  ((_a2 = window.top) != null ? _a2 : window).location.assign(url);
3136
3371
  };
3137
- const surfaceError = useCallback3(
3372
+ const surfaceError = useCallback4(
3138
3373
  (err, title) => {
3139
3374
  const message = (err == null ? void 0 : err.message) || "Something went wrong. Please try again.";
3140
3375
  if (toastCtx) {
@@ -3145,7 +3380,7 @@ var ProfileModal = ({
3145
3380
  },
3146
3381
  [toastCtx]
3147
3382
  );
3148
- const handleConnectTwitter = useCallback3(() => __async(null, null, function* () {
3383
+ const handleConnectTwitter = useCallback4(() => __async(null, null, function* () {
3149
3384
  try {
3150
3385
  const result = yield client.linkAccount({
3151
3386
  provider: "twitter",
@@ -3159,7 +3394,7 @@ var ProfileModal = ({
3159
3394
  surfaceError(err, "Could not connect X (Twitter)");
3160
3395
  }
3161
3396
  }), [client, onConnectTwitter, surfaceError]);
3162
- const handleConnectGoogle = useCallback3(() => __async(null, null, function* () {
3397
+ const handleConnectGoogle = useCallback4(() => __async(null, null, function* () {
3163
3398
  try {
3164
3399
  const result = yield client.linkAccount({
3165
3400
  provider: "google",
@@ -3173,7 +3408,7 @@ var ProfileModal = ({
3173
3408
  surfaceError(err, "Could not connect Google");
3174
3409
  }
3175
3410
  }), [client, onConnectGoogle, surfaceError]);
3176
- const handleConnectApple = useCallback3(() => __async(null, null, function* () {
3411
+ const handleConnectApple = useCallback4(() => __async(null, null, function* () {
3177
3412
  try {
3178
3413
  const result = yield client.linkAccount({
3179
3414
  provider: "apple",
@@ -3187,7 +3422,7 @@ var ProfileModal = ({
3187
3422
  surfaceError(err, "Could not connect Apple");
3188
3423
  }
3189
3424
  }), [client, onConnectApple, surfaceError]);
3190
- const handleDisconnectTwitter = useCallback3(() => __async(null, null, function* () {
3425
+ const handleDisconnectTwitter = useCallback4(() => __async(null, null, function* () {
3191
3426
  try {
3192
3427
  yield client.disconnectAccount("twitter");
3193
3428
  yield client.getCurrentUser();
@@ -3196,7 +3431,7 @@ var ProfileModal = ({
3196
3431
  surfaceError(err, "Could not disconnect X (Twitter)");
3197
3432
  }
3198
3433
  }), [client, onDisconnectTwitter, surfaceError]);
3199
- const handleDisconnectGoogle = useCallback3(() => __async(null, null, function* () {
3434
+ const handleDisconnectGoogle = useCallback4(() => __async(null, null, function* () {
3200
3435
  try {
3201
3436
  yield client.disconnectAccount("google");
3202
3437
  yield client.getCurrentUser();
@@ -3205,7 +3440,7 @@ var ProfileModal = ({
3205
3440
  surfaceError(err, "Could not disconnect Google");
3206
3441
  }
3207
3442
  }), [client, onDisconnectGoogle, surfaceError]);
3208
- const handleDisconnectApple = useCallback3(() => __async(null, null, function* () {
3443
+ const handleDisconnectApple = useCallback4(() => __async(null, null, function* () {
3209
3444
  try {
3210
3445
  yield client.disconnectAccount("apple");
3211
3446
  yield client.getCurrentUser();
@@ -3214,7 +3449,7 @@ var ProfileModal = ({
3214
3449
  surfaceError(err, "Could not disconnect Apple");
3215
3450
  }
3216
3451
  }), [client, onDisconnectApple, surfaceError]);
3217
- const handleConnectEmail = useCallback3(() => __async(null, null, function* () {
3452
+ const handleConnectEmail = useCallback4(() => __async(null, null, function* () {
3218
3453
  var _a2;
3219
3454
  const typedEmail = typeof window !== "undefined" ? (_a2 = window.prompt("Enter your email to receive a magic link")) == null ? void 0 : _a2.trim() : void 0;
3220
3455
  if (!typedEmail) return;
@@ -3233,7 +3468,7 @@ var ProfileModal = ({
3233
3468
  surfaceError(err, "Could not connect email");
3234
3469
  }
3235
3470
  }), [client, onConnectEmail, surfaceError, toastCtx]);
3236
- const handleDisconnectWallet = useCallback3(
3471
+ const handleDisconnectWallet = useCallback4(
3237
3472
  (wallet) => __async(null, null, function* () {
3238
3473
  const normalizedChain = wallet.chain.toLowerCase();
3239
3474
  const provider = normalizedChain === "solana" || normalizedChain === "svm" ? "solana_wallet" : "wallet";
@@ -3247,7 +3482,7 @@ var ProfileModal = ({
3247
3482
  }),
3248
3483
  [client, onDisconnectWallet, surfaceError]
3249
3484
  );
3250
- const providerActionMap = useMemo3(
3485
+ const providerActionMap = useMemo4(
3251
3486
  () => ({
3252
3487
  twitter: {
3253
3488
  connect: () => {
@@ -3289,7 +3524,7 @@ var ProfileModal = ({
3289
3524
  handleDisconnectTwitter
3290
3525
  ]
3291
3526
  );
3292
- const resolvedWallets = useMemo3(() => {
3527
+ const resolvedWallets = useMemo4(() => {
3293
3528
  var _a2, _b2;
3294
3529
  if (wallets) return wallets;
3295
3530
  const walletAccounts = (_b2 = (_a2 = user == null ? void 0 : user.accounts) == null ? void 0 : _a2.filter((account) => {
@@ -3308,8 +3543,8 @@ var ProfileModal = ({
3308
3543
  };
3309
3544
  });
3310
3545
  }, [user == null ? void 0 : user.accounts, wallets]);
3311
- return /* @__PURE__ */ jsxs20(Modal, { open: open && !isConnectKalshiModalOpen, onOpenChange: handleOpenChange, children: [
3312
- /* @__PURE__ */ jsxs20(
3546
+ return /* @__PURE__ */ jsxs21(Modal, { open: open && !isConnectKalshiModalOpen, onOpenChange: handleOpenChange, children: [
3547
+ /* @__PURE__ */ jsxs21(
3313
3548
  Modal.Container,
3314
3549
  {
3315
3550
  maxWidth: "800px",
@@ -3318,8 +3553,8 @@ var ProfileModal = ({
3318
3553
  container: cn("agg-profile-modal", "min-h-[37.5rem]")
3319
3554
  },
3320
3555
  children: [
3321
- /* @__PURE__ */ jsx20(Modal.Header, { title: "Edit Profile", classNames: { root: "agg-profile-modal-header" } }),
3322
- /* @__PURE__ */ jsx20("div", { className: "agg-profile-tabs sm:hidden w-full", children: /* @__PURE__ */ jsx20(
3556
+ /* @__PURE__ */ jsx23(Modal.Header, { title: "Edit Profile", classNames: { root: "agg-profile-modal-header" } }),
3557
+ /* @__PURE__ */ jsx23("div", { className: "agg-profile-tabs sm:hidden w-full", children: /* @__PURE__ */ jsx23(
3323
3558
  Tabs,
3324
3559
  {
3325
3560
  className: "w-full [&>div]:w-full",
@@ -3328,14 +3563,14 @@ var ProfileModal = ({
3328
3563
  items: profileTabItems.map((tab) => ({
3329
3564
  value: tab.value,
3330
3565
  label: tab.label,
3331
- icon: /* @__PURE__ */ jsx20(Icon, { name: tab.icon, size: "small" })
3566
+ icon: /* @__PURE__ */ jsx23(Icon, { name: tab.icon, size: "small" })
3332
3567
  })),
3333
3568
  value: activeTab,
3334
3569
  onChange: (val) => setActiveTab(val)
3335
3570
  }
3336
3571
  ) }),
3337
- /* @__PURE__ */ jsx20(Modal.Body, { classNames: { root: cn("agg-profile-modal-body", "overflow-x-visible") }, children: /* @__PURE__ */ jsxs20("div", { className: "agg-profile-layout flex flex-col sm:flex-row sm:gap-10", children: [
3338
- /* @__PURE__ */ jsx20("div", { className: "shrink-0", children: /* @__PURE__ */ jsx20(
3572
+ /* @__PURE__ */ jsx23(Modal.Body, { classNames: { root: cn("agg-profile-modal-body", "overflow-x-visible") }, children: /* @__PURE__ */ jsxs21("div", { className: "agg-profile-layout flex flex-col sm:flex-row sm:gap-10", children: [
3573
+ /* @__PURE__ */ jsx23("div", { className: "shrink-0", children: /* @__PURE__ */ jsx23(
3339
3574
  "nav",
3340
3575
  {
3341
3576
  className: cn(
@@ -3351,7 +3586,7 @@ var ProfileModal = ({
3351
3586
  "aria-label": "Profile sections",
3352
3587
  children: profileTabItems.map((tab) => {
3353
3588
  const isActive = activeTab === tab.value;
3354
- return /* @__PURE__ */ jsxs20(
3589
+ return /* @__PURE__ */ jsxs21(
3355
3590
  "button",
3356
3591
  {
3357
3592
  type: "button",
@@ -3367,9 +3602,9 @@ var ProfileModal = ({
3367
3602
  isActive ? "font-agg-normal text-agg-foreground bg-agg-secondary-hover" : "font-agg-normal text-agg-foreground"
3368
3603
  ),
3369
3604
  children: [
3370
- isActive ? /* @__PURE__ */ jsx20("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-agg-primary" }) : null,
3371
- /* @__PURE__ */ jsx20(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
3372
- /* @__PURE__ */ jsx20("span", { className: "shrink-0 whitespace-nowrap", children: tab.label })
3605
+ isActive ? /* @__PURE__ */ jsx23("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-agg-primary" }) : null,
3606
+ /* @__PURE__ */ jsx23(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
3607
+ /* @__PURE__ */ jsx23("span", { className: "shrink-0 whitespace-nowrap", children: tab.label })
3373
3608
  ]
3374
3609
  },
3375
3610
  tab.value
@@ -3377,9 +3612,9 @@ var ProfileModal = ({
3377
3612
  })
3378
3613
  }
3379
3614
  ) }),
3380
- /* @__PURE__ */ jsxs20("div", { className: "agg-profile-content min-w-0 flex-1", children: [
3381
- activeTab === PROFILE_TAB_KEYS.PROFILE_ACCOUNTS ? /* @__PURE__ */ jsxs20("div", { className: "agg-profile-accounts-tab flex flex-col gap-8", children: [
3382
- /* @__PURE__ */ jsx20(
3615
+ /* @__PURE__ */ jsxs21("div", { className: "agg-profile-content min-w-0 flex-1", children: [
3616
+ activeTab === PROFILE_TAB_KEYS.PROFILE_ACCOUNTS ? /* @__PURE__ */ jsxs21("div", { className: "agg-profile-accounts-tab flex flex-col gap-8", children: [
3617
+ /* @__PURE__ */ jsx23(
3383
3618
  AboutTab,
3384
3619
  {
3385
3620
  username: username != null ? username : user == null ? void 0 : user.username,
@@ -3393,7 +3628,7 @@ var ProfileModal = ({
3393
3628
  avatarError: avatarTypeError
3394
3629
  }
3395
3630
  ),
3396
- /* @__PURE__ */ jsx20(
3631
+ /* @__PURE__ */ jsx23(
3397
3632
  AccountsWalletsTab,
3398
3633
  {
3399
3634
  socialAccounts: resolvedSocialAccounts,
@@ -3412,7 +3647,7 @@ var ProfileModal = ({
3412
3647
  }
3413
3648
  )
3414
3649
  ] }) : null,
3415
- activeTab === PROFILE_TAB_KEYS.TRADING_ACCESS ? /* @__PURE__ */ jsx20(
3650
+ activeTab === PROFILE_TAB_KEYS.TRADING_ACCESS ? /* @__PURE__ */ jsx23(
3416
3651
  TradingAccessTab,
3417
3652
  {
3418
3653
  venueAccounts: resolvedVenueAccounts,
@@ -3423,9 +3658,9 @@ var ProfileModal = ({
3423
3658
  ) : null
3424
3659
  ] })
3425
3660
  ] }) }),
3426
- /* @__PURE__ */ jsxs20(Modal.Footer, { classNames: { root: "agg-profile-modal-footer" }, children: [
3427
- /* @__PURE__ */ jsx20(Button, { variant: "secondary", size: "large", onClick: handleCancel, className: "min-w-[120px]", children: "Cancel" }),
3428
- /* @__PURE__ */ jsx20(
3661
+ /* @__PURE__ */ jsxs21(Modal.Footer, { classNames: { root: "agg-profile-modal-footer" }, children: [
3662
+ /* @__PURE__ */ jsx23(Button, { variant: "secondary", size: "large", onClick: handleCancel, className: "min-w-[120px]", children: "Cancel" }),
3663
+ /* @__PURE__ */ jsx23(
3429
3664
  Button,
3430
3665
  {
3431
3666
  variant: "primary",
@@ -3440,7 +3675,7 @@ var ProfileModal = ({
3440
3675
  ]
3441
3676
  }
3442
3677
  ),
3443
- /* @__PURE__ */ jsx20(
3678
+ /* @__PURE__ */ jsx23(
3444
3679
  ConnectKalshiModal,
3445
3680
  {
3446
3681
  open: open && isConnectKalshiModalOpen,
@@ -3453,33 +3688,33 @@ var ProfileModal = ({
3453
3688
  ProfileModal.displayName = "ProfileModal";
3454
3689
 
3455
3690
  // src/geo-block-modal/index.tsx
3456
- import { useLabels as useLabels17 } from "@agg-build/hooks";
3457
- import { useCallback as useCallback4 } from "react";
3458
- import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
3691
+ import { useLabels as useLabels19 } from "@agg-build/hooks";
3692
+ import { useCallback as useCallback5 } from "react";
3693
+ import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
3459
3694
  var GeoBlockModal = ({
3460
3695
  open,
3461
3696
  onOpenChange,
3462
3697
  onConfirm,
3463
3698
  classNames
3464
3699
  }) => {
3465
- const labels = useLabels17();
3466
- const handleConfirm = useCallback4(() => {
3700
+ const labels = useLabels19();
3701
+ const handleConfirm = useCallback5(() => {
3467
3702
  onConfirm == null ? void 0 : onConfirm();
3468
3703
  onOpenChange(false);
3469
3704
  }, [onConfirm, onOpenChange]);
3470
- return /* @__PURE__ */ jsx21(
3705
+ return /* @__PURE__ */ jsx24(
3471
3706
  Modal,
3472
3707
  {
3473
3708
  open,
3474
3709
  onOpenChange,
3475
3710
  "aria-label": labels.trading.geoBlockModalAriaLabel,
3476
- children: /* @__PURE__ */ jsxs21(
3711
+ children: /* @__PURE__ */ jsxs22(
3477
3712
  Modal.Container,
3478
3713
  {
3479
3714
  maxWidth: "480px",
3480
3715
  classNames: { container: cn("!rounded-agg-2xl", classNames == null ? void 0 : classNames.container) },
3481
3716
  children: [
3482
- /* @__PURE__ */ jsx21(
3717
+ /* @__PURE__ */ jsx24(
3483
3718
  Modal.Header,
3484
3719
  {
3485
3720
  title: "",
@@ -3491,19 +3726,19 @@ var GeoBlockModal = ({
3491
3726
  }
3492
3727
  }
3493
3728
  ),
3494
- /* @__PURE__ */ jsx21(Modal.Body, { classNames: { root: cn("!px-10 !pt-0 !pb-12", classNames == null ? void 0 : classNames.body) }, children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-8", children: [
3495
- /* @__PURE__ */ jsx21(
3729
+ /* @__PURE__ */ jsx24(Modal.Body, { classNames: { root: cn("!px-10 !pt-0 !pb-12", classNames == null ? void 0 : classNames.body) }, children: /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center gap-8", children: [
3730
+ /* @__PURE__ */ jsx24(
3496
3731
  Icon,
3497
3732
  {
3498
3733
  name: "internet-security",
3499
3734
  className: "h-[60px] w-[60px] text-agg-muted-foreground"
3500
3735
  }
3501
3736
  ),
3502
- /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-3 text-center", children: [
3503
- /* @__PURE__ */ jsx21("h2", { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.trading.geoBlockModalTitle }),
3504
- /* @__PURE__ */ jsx21("p", { className: "text-agg-base font-agg-normal leading-agg-6 text-agg-foreground", children: labels.trading.geoBlockModalDescription })
3737
+ /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center gap-3 text-center", children: [
3738
+ /* @__PURE__ */ jsx24("h2", { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.trading.geoBlockModalTitle }),
3739
+ /* @__PURE__ */ jsx24("p", { className: "text-agg-base font-agg-normal leading-agg-6 text-agg-foreground", children: labels.trading.geoBlockModalDescription })
3505
3740
  ] }),
3506
- /* @__PURE__ */ jsx21(
3741
+ /* @__PURE__ */ jsx24(
3507
3742
  Button,
3508
3743
  {
3509
3744
  variant: "secondary",
@@ -3523,12 +3758,15 @@ var GeoBlockModal = ({
3523
3758
  GeoBlockModal.displayName = "GeoBlockModal";
3524
3759
 
3525
3760
  export {
3761
+ PaperTradingBadge,
3526
3762
  CARD_NETWORK_OPTIONS,
3527
3763
  clearPendingCardSession,
3528
3764
  getPendingCardSession,
3529
3765
  DepositModal,
3530
3766
  buildTerminalSummary,
3531
3767
  WithdrawModal,
3768
+ PaperOnboardingModal,
3769
+ PaperTradingOnboarding,
3532
3770
  ProfileModal,
3533
3771
  GeoBlockModal
3534
3772
  };