@unifold/connect-react 0.1.8 → 0.1.10

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.mjs CHANGED
@@ -1221,7 +1221,7 @@ function useUnifold() {
1221
1221
  }
1222
1222
 
1223
1223
  // ../ui-react/dist/index.mjs
1224
- import { useState as useState52, useEffect as useEffect52 } from "react";
1224
+ import { useState as useState72, useEffect as useEffect62 } from "react";
1225
1225
 
1226
1226
  // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
1227
1227
  import { forwardRef, createElement } from "react";
@@ -1265,25 +1265,12 @@ var createLucideIcon = (iconName, iconNode) => {
1265
1265
  return Component;
1266
1266
  };
1267
1267
 
1268
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-down-circle.js
1269
- var ArrowDownCircle = createLucideIcon("ArrowDownCircle", [
1270
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1271
- ["path", { d: "M12 8v8", key: "napkw2" }],
1272
- ["path", { d: "m8 12 4 4 4-4", key: "k98ssh" }]
1273
- ]);
1274
-
1275
1268
  // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.js
1276
1269
  var ArrowLeft = createLucideIcon("ArrowLeft", [
1277
1270
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
1278
1271
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
1279
1272
  ]);
1280
1273
 
1281
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check-circle.js
1282
- var CheckCircle = createLucideIcon("CheckCircle", [
1283
- ["path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14", key: "g774vq" }],
1284
- ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
1285
- ]);
1286
-
1287
1274
  // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js
1288
1275
  var Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
1289
1276
 
@@ -1306,12 +1293,6 @@ var Clock = createLucideIcon("Clock", [
1306
1293
  ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
1307
1294
  ]);
1308
1295
 
1309
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/copy.js
1310
- var Copy = createLucideIcon("Copy", [
1311
- ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1312
- ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
1313
- ]);
1314
-
1315
1296
  // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/credit-card.js
1316
1297
  var CreditCard = createLucideIcon("CreditCard", [
1317
1298
  ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
@@ -5957,16 +5938,234 @@ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
5957
5938
  import * as React37 from "react";
5958
5939
  import { jsx as jsx17 } from "react/jsx-runtime";
5959
5940
  import { jsx as jsx23, jsxs as jsxs4 } from "react/jsx-runtime";
5960
- import { useState as useState22, useEffect as useEffect32 } from "react";
5941
+ import { useState as useState42, useEffect as useEffect42 } from "react";
5961
5942
  var import_qr_code_styling = __toESM(require_qr_code_styling(), 1);
5962
5943
  import { useEffect as useEffect18, useRef as useRef16 } from "react";
5963
5944
  import { jsx as jsx32 } from "react/jsx-runtime";
5964
- import { useEffect as useEffect22, useState as useState16 } from "react";
5945
+ import { useEffect as useEffect32, useState as useState22 } from "react";
5965
5946
  import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
5947
+
5948
+ // ../core/dist/index.mjs
5949
+ import { useQuery } from "@tanstack/react-query";
5950
+ var API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.unifold.io";
5951
+ var DEFAULT_PUBLISHABLE_KEY = "pk_test_123";
5952
+ var DEFAULT_CONFIG = {};
5953
+ function validatePublishableKey(key) {
5954
+ if (!key || key.trim() === "") {
5955
+ throw new Error(
5956
+ "Unifold SDK: No publishable key configured. Please provide a valid publishable key via setApiConfig() or pass it directly to the API function."
5957
+ );
5958
+ }
5959
+ if (key === "pk_test_123") {
5960
+ console.warn(
5961
+ 'Unifold SDK: Using default test key "pk_test_123". This should only be used for local development. Please use a real publishable key in production.'
5962
+ );
5963
+ }
5964
+ }
5965
+ function getIconUrl(iconPath) {
5966
+ const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
5967
+ return `${API_BASE_URL}/api/public${normalizedPath}`;
5968
+ }
5969
+ function getIconUrlWithCdn(iconPath, assetCdnUrl) {
5970
+ if (!assetCdnUrl) {
5971
+ return getIconUrl(iconPath);
5972
+ }
5973
+ const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
5974
+ const baseUrl = assetCdnUrl.endsWith("/") ? assetCdnUrl.slice(0, -1) : assetCdnUrl;
5975
+ return `${baseUrl}/api/public${normalizedPath}`;
5976
+ }
5977
+ async function createDepositAddress(overrides, publishableKey) {
5978
+ if (!overrides?.external_user_id) {
5979
+ throw new Error("external_user_id is required");
5980
+ }
5981
+ const payload = {
5982
+ external_user_id: overrides.external_user_id,
5983
+ destination_chain_type: overrides?.destination_chain_type || "ethereum",
5984
+ destination_chain_id: overrides?.destination_chain_id || DEFAULT_CONFIG.destinationChainId || "8453",
5985
+ destination_token_address: overrides?.destination_token_address || DEFAULT_CONFIG.destinationTokenAddress || "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
5986
+ recipient_address: overrides?.recipient_address || DEFAULT_CONFIG.recipientAddress || "0x309a4154a2CD4153Da886E780890C9cb5161553C",
5987
+ client_metadata: overrides?.client_metadata || {}
5988
+ };
5989
+ const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
5990
+ validatePublishableKey(pk);
5991
+ const response = await fetch(`${API_BASE_URL}/v1/public/deposit_addresses`, {
5992
+ method: "POST",
5993
+ headers: {
5994
+ accept: "application/json",
5995
+ "x-publishable-key": pk,
5996
+ "Content-Type": "application/json"
5997
+ },
5998
+ body: JSON.stringify(payload)
5999
+ });
6000
+ if (!response.ok) {
6001
+ throw new Error(`Failed to create EOA: ${response.statusText}`);
6002
+ }
6003
+ return response.json();
6004
+ }
6005
+ function getWalletByChainType(wallets, chainType) {
6006
+ return wallets.find((wallet) => wallet.chain_type === chainType);
6007
+ }
6008
+ var ExecutionStatus = /* @__PURE__ */ ((ExecutionStatus2) => {
6009
+ ExecutionStatus2["DELAYED"] = "delayed";
6010
+ ExecutionStatus2["FAILED"] = "failed";
6011
+ ExecutionStatus2["PENDING"] = "pending";
6012
+ ExecutionStatus2["REFUNDED"] = "refunded";
6013
+ ExecutionStatus2["SUCCEEDED"] = "succeeded";
6014
+ ExecutionStatus2["WAITING"] = "waiting";
6015
+ return ExecutionStatus2;
6016
+ })(ExecutionStatus || {});
6017
+ async function queryExecutions(externalUserId, publishableKey) {
6018
+ const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6019
+ validatePublishableKey(pk);
6020
+ const response = await fetch(
6021
+ `${API_BASE_URL}/v1/public/direct_executions/query`,
6022
+ {
6023
+ method: "POST",
6024
+ headers: {
6025
+ accept: "application/json",
6026
+ "x-publishable-key": pk,
6027
+ "Content-Type": "application/json"
6028
+ },
6029
+ body: JSON.stringify({
6030
+ external_user_id: externalUserId
6031
+ })
6032
+ }
6033
+ );
6034
+ if (!response.ok) {
6035
+ throw new Error(`Failed to query executions: ${response.statusText}`);
6036
+ }
6037
+ return response.json();
6038
+ }
6039
+ async function getSupportedDepositTokens(publishableKey) {
6040
+ const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6041
+ validatePublishableKey(pk);
6042
+ const response = await fetch(
6043
+ `${API_BASE_URL}/v1/public/tokens/supported_deposit_tokens`,
6044
+ {
6045
+ method: "GET",
6046
+ headers: {
6047
+ accept: "application/json",
6048
+ "x-publishable-key": pk
6049
+ }
6050
+ }
6051
+ );
6052
+ if (!response.ok) {
6053
+ throw new Error(
6054
+ `Failed to fetch supported deposit tokens: ${response.statusText}`
6055
+ );
6056
+ }
6057
+ return response.json();
6058
+ }
6059
+ async function getMeldQuotes(request, publishableKey) {
6060
+ const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6061
+ validatePublishableKey(pk);
6062
+ const response = await fetch(
6063
+ `${API_BASE_URL}/v1/public/onramps/meld/quotes`,
6064
+ {
6065
+ method: "POST",
6066
+ headers: {
6067
+ accept: "application/json",
6068
+ "x-publishable-key": pk,
6069
+ "Content-Type": "application/json"
6070
+ },
6071
+ body: JSON.stringify(request)
6072
+ }
6073
+ );
6074
+ if (!response.ok) {
6075
+ throw new Error(`Failed to fetch Meld quotes: ${response.statusText}`);
6076
+ }
6077
+ return response.json();
6078
+ }
6079
+ async function createMeldSession(request, publishableKey) {
6080
+ const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6081
+ validatePublishableKey(pk);
6082
+ const response = await fetch(
6083
+ `${API_BASE_URL}/v1/public/onramps/meld/sessions`,
6084
+ {
6085
+ method: "POST",
6086
+ headers: {
6087
+ accept: "application/json",
6088
+ "x-publishable-key": pk,
6089
+ "Content-Type": "application/json"
6090
+ },
6091
+ body: JSON.stringify(request)
6092
+ }
6093
+ );
6094
+ if (!response.ok) {
6095
+ throw new Error(`Failed to create Meld session: ${response.statusText}`);
6096
+ }
6097
+ return response.json();
6098
+ }
6099
+ function getPreferredIconUrl(iconUrls, preferredFormat = "svg") {
6100
+ if (!iconUrls || iconUrls.length === 0) {
6101
+ return void 0;
6102
+ }
6103
+ const preferred = iconUrls.find((icon) => icon.format === preferredFormat);
6104
+ if (preferred) {
6105
+ return preferred.url;
6106
+ }
6107
+ return iconUrls[0]?.url;
6108
+ }
6109
+ async function getFiatCurrencies(publishableKey) {
6110
+ const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6111
+ validatePublishableKey(pk);
6112
+ const response = await fetch(
6113
+ `${API_BASE_URL}/v1/public/onramps/fiat_currencies`,
6114
+ {
6115
+ method: "GET",
6116
+ headers: {
6117
+ accept: "application/json",
6118
+ "x-publishable-key": pk
6119
+ }
6120
+ }
6121
+ );
6122
+ if (!response.ok) {
6123
+ throw new Error(`Failed to fetch fiat currencies: ${response.statusText}`);
6124
+ }
6125
+ return response.json();
6126
+ }
6127
+ async function getTokenChains() {
6128
+ const response = await fetch(`${API_BASE_URL}/v1/public/tokens/chains`, {
6129
+ method: "GET",
6130
+ headers: {
6131
+ accept: "application/json"
6132
+ }
6133
+ });
6134
+ if (!response.ok) {
6135
+ throw new Error(`Failed to fetch token chains: ${response.statusText}`);
6136
+ }
6137
+ return response.json();
6138
+ }
6139
+ function getChainName(chains, chainType, chainId) {
6140
+ const byId = chains.find((c) => c.chain_id === chainId);
6141
+ if (byId) return byId.chain_name;
6142
+ const byType = chains.find((c) => c.chain_type === chainType);
6143
+ if (byType) return byType.chain_name;
6144
+ return chainType.charAt(0).toUpperCase() + chainType.slice(1);
6145
+ }
6146
+ async function getProjectConfig(publishableKey) {
6147
+ const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6148
+ validatePublishableKey(pk);
6149
+ const response = await fetch(`${API_BASE_URL}/v1/public/projects/config`, {
6150
+ method: "GET",
6151
+ headers: {
6152
+ accept: "application/json",
6153
+ "x-publishable-key": pk
6154
+ }
6155
+ });
6156
+ if (!response.ok) {
6157
+ throw new Error(`Failed to fetch project config: ${response.statusText}`);
6158
+ }
6159
+ return response.json();
6160
+ }
6161
+
6162
+ // ../ui-react/dist/index.mjs
5966
6163
  import { jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
6164
+ import { useEffect as useEffect22, useState as useState16 } from "react";
5967
6165
  import { jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
5968
6166
  import { Fragment as Fragment8, jsx as jsx72, jsxs as jsxs5 } from "react/jsx-runtime";
5969
- import { jsx as jsx82, jsxs as jsxs6 } from "react/jsx-runtime";
6167
+ import { useState as useState32 } from "react";
6168
+ import { Fragment as Fragment23, jsx as jsx82, jsxs as jsxs6 } from "react/jsx-runtime";
5970
6169
  import * as React38 from "react";
5971
6170
 
5972
6171
  // ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react@18.3._paqmzknjxz7bmndehagaq3tw4m/node_modules/@radix-ui/react-select/dist/index.mjs
@@ -9461,202 +9660,55 @@ var Separator = SelectSeparator;
9461
9660
  import { jsx as jsx92, jsxs as jsxs7 } from "react/jsx-runtime";
9462
9661
  import * as React42 from "react";
9463
9662
 
9464
- // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
9663
+ // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react@18.3_hd4qp76o7ebwsrfrhqb6isuuvy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
9465
9664
  import * as React35 from "react";
9466
- import { Fragment as Fragment22, jsx as jsx15 } from "react/jsx-runtime";
9467
- var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
9468
- var use = React35[" use ".trim().toString()];
9469
- function isPromiseLike(value) {
9470
- return typeof value === "object" && value !== null && "then" in value;
9471
- }
9472
- function isLazyComponent(element) {
9473
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
9474
- }
9475
- // @__NO_SIDE_EFFECTS__
9476
- function createSlot2(ownerName) {
9477
- const SlotClone = /* @__PURE__ */ createSlotClone2(ownerName);
9478
- const Slot22 = React35.forwardRef((props, forwardedRef) => {
9479
- let { children, ...slotProps } = props;
9480
- if (isLazyComponent(children) && typeof use === "function") {
9481
- children = use(children._payload);
9482
- }
9483
- const childrenArray = React35.Children.toArray(children);
9484
- const slottable = childrenArray.find(isSlottable2);
9485
- if (slottable) {
9486
- const newElement = slottable.props.children;
9487
- const newChildren = childrenArray.map((child) => {
9488
- if (child === slottable) {
9489
- if (React35.Children.count(newElement) > 1) return React35.Children.only(null);
9490
- return React35.isValidElement(newElement) ? newElement.props.children : null;
9491
- } else {
9492
- return child;
9493
- }
9494
- });
9495
- return /* @__PURE__ */ jsx15(SlotClone, { ...slotProps, ref: forwardedRef, children: React35.isValidElement(newElement) ? React35.cloneElement(newElement, void 0, newChildren) : null });
9496
- }
9497
- return /* @__PURE__ */ jsx15(SlotClone, { ...slotProps, ref: forwardedRef, children });
9498
- });
9499
- Slot22.displayName = `${ownerName}.Slot`;
9500
- return Slot22;
9501
- }
9502
- var Slot3 = /* @__PURE__ */ createSlot2("Slot");
9503
- // @__NO_SIDE_EFFECTS__
9504
- function createSlotClone2(ownerName) {
9505
- const SlotClone = React35.forwardRef((props, forwardedRef) => {
9506
- let { children, ...slotProps } = props;
9507
- if (isLazyComponent(children) && typeof use === "function") {
9508
- children = use(children._payload);
9509
- }
9510
- if (React35.isValidElement(children)) {
9511
- const childrenRef = getElementRef3(children);
9512
- const props2 = mergeProps2(slotProps, children.props);
9513
- if (children.type !== React35.Fragment) {
9514
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
9515
- }
9516
- return React35.cloneElement(children, props2);
9517
- }
9518
- return React35.Children.count(children) > 1 ? React35.Children.only(null) : null;
9519
- });
9520
- SlotClone.displayName = `${ownerName}.SlotClone`;
9521
- return SlotClone;
9522
- }
9523
- var SLOTTABLE_IDENTIFIER2 = /* @__PURE__ */ Symbol("radix.slottable");
9524
- function isSlottable2(child) {
9525
- return React35.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
9526
- }
9527
- function mergeProps2(slotProps, childProps) {
9528
- const overrideProps = { ...childProps };
9529
- for (const propName in childProps) {
9530
- const slotPropValue = slotProps[propName];
9531
- const childPropValue = childProps[propName];
9532
- const isHandler = /^on[A-Z]/.test(propName);
9533
- if (isHandler) {
9534
- if (slotPropValue && childPropValue) {
9535
- overrideProps[propName] = (...args) => {
9536
- const result = childPropValue(...args);
9537
- slotPropValue(...args);
9538
- return result;
9539
- };
9540
- } else if (slotPropValue) {
9541
- overrideProps[propName] = slotPropValue;
9542
- }
9543
- } else if (propName === "style") {
9544
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
9545
- } else if (propName === "className") {
9546
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
9547
- }
9548
- }
9549
- return { ...slotProps, ...overrideProps };
9550
- }
9551
- function getElementRef3(element) {
9552
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
9553
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
9554
- if (mayWarn) {
9555
- return element.ref;
9556
- }
9557
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
9558
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
9559
- if (mayWarn) {
9560
- return element.props.ref;
9561
- }
9562
- return element.props.ref || element.ref;
9563
- }
9564
-
9565
- // ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
9566
- var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
9567
- var cx = clsx;
9568
- var cva = (base, config) => (props) => {
9569
- var _config_compoundVariants;
9570
- if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
9571
- const { variants, defaultVariants } = config;
9572
- const getVariantClassNames = Object.keys(variants).map((variant) => {
9573
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
9574
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
9575
- if (variantProp === null) return null;
9576
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
9577
- return variants[variant][variantKey];
9578
- });
9579
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
9580
- let [key, value] = param;
9581
- if (value === void 0) {
9582
- return acc;
9583
- }
9584
- acc[key] = value;
9585
- return acc;
9586
- }, {});
9587
- const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
9588
- let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
9589
- return Object.entries(compoundVariantOptions).every((param2) => {
9590
- let [key, value] = param2;
9591
- return Array.isArray(value) ? value.includes({
9592
- ...defaultVariants,
9593
- ...propsWithoutUndefined
9594
- }[key]) : {
9595
- ...defaultVariants,
9596
- ...propsWithoutUndefined
9597
- }[key] === value;
9598
- }) ? [
9599
- ...acc,
9600
- cvClass,
9601
- cvClassName
9602
- ] : acc;
9603
- }, []);
9604
- return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
9605
- };
9606
-
9607
- // ../ui-react/dist/index.mjs
9608
- import { jsx as jsx102 } from "react/jsx-runtime";
9609
- import * as React52 from "react";
9610
-
9611
- // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react@18.3_hd4qp76o7ebwsrfrhqb6isuuvy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
9612
- import * as React36 from "react";
9613
- import { jsx as jsx16, jsxs as jsxs3 } from "react/jsx-runtime";
9614
- var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
9615
- createPopperScope
9616
- ]);
9617
- var usePopperScope2 = createPopperScope();
9618
- var PROVIDER_NAME = "TooltipProvider";
9619
- var DEFAULT_DELAY_DURATION = 700;
9620
- var TOOLTIP_OPEN = "tooltip.open";
9621
- var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME);
9622
- var TooltipProvider = (props) => {
9623
- const {
9624
- __scopeTooltip,
9625
- delayDuration = DEFAULT_DELAY_DURATION,
9626
- skipDelayDuration = 300,
9627
- disableHoverableContent = false,
9628
- children
9629
- } = props;
9630
- const isOpenDelayedRef = React36.useRef(true);
9631
- const isPointerInTransitRef = React36.useRef(false);
9632
- const skipDelayTimerRef = React36.useRef(0);
9633
- React36.useEffect(() => {
9634
- const skipDelayTimer = skipDelayTimerRef.current;
9635
- return () => window.clearTimeout(skipDelayTimer);
9636
- }, []);
9637
- return /* @__PURE__ */ jsx16(
9638
- TooltipProviderContextProvider,
9639
- {
9640
- scope: __scopeTooltip,
9641
- isOpenDelayedRef,
9642
- delayDuration,
9643
- onOpen: React36.useCallback(() => {
9644
- window.clearTimeout(skipDelayTimerRef.current);
9645
- isOpenDelayedRef.current = false;
9646
- }, []),
9647
- onClose: React36.useCallback(() => {
9648
- window.clearTimeout(skipDelayTimerRef.current);
9649
- skipDelayTimerRef.current = window.setTimeout(
9650
- () => isOpenDelayedRef.current = true,
9651
- skipDelayDuration
9652
- );
9653
- }, [skipDelayDuration]),
9654
- isPointerInTransitRef,
9655
- onPointerInTransitChange: React36.useCallback((inTransit) => {
9656
- isPointerInTransitRef.current = inTransit;
9657
- }, []),
9658
- disableHoverableContent,
9659
- children
9665
+ import { jsx as jsx15, jsxs as jsxs3 } from "react/jsx-runtime";
9666
+ var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
9667
+ createPopperScope
9668
+ ]);
9669
+ var usePopperScope2 = createPopperScope();
9670
+ var PROVIDER_NAME = "TooltipProvider";
9671
+ var DEFAULT_DELAY_DURATION = 700;
9672
+ var TOOLTIP_OPEN = "tooltip.open";
9673
+ var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME);
9674
+ var TooltipProvider = (props) => {
9675
+ const {
9676
+ __scopeTooltip,
9677
+ delayDuration = DEFAULT_DELAY_DURATION,
9678
+ skipDelayDuration = 300,
9679
+ disableHoverableContent = false,
9680
+ children
9681
+ } = props;
9682
+ const isOpenDelayedRef = React35.useRef(true);
9683
+ const isPointerInTransitRef = React35.useRef(false);
9684
+ const skipDelayTimerRef = React35.useRef(0);
9685
+ React35.useEffect(() => {
9686
+ const skipDelayTimer = skipDelayTimerRef.current;
9687
+ return () => window.clearTimeout(skipDelayTimer);
9688
+ }, []);
9689
+ return /* @__PURE__ */ jsx15(
9690
+ TooltipProviderContextProvider,
9691
+ {
9692
+ scope: __scopeTooltip,
9693
+ isOpenDelayedRef,
9694
+ delayDuration,
9695
+ onOpen: React35.useCallback(() => {
9696
+ window.clearTimeout(skipDelayTimerRef.current);
9697
+ isOpenDelayedRef.current = false;
9698
+ }, []),
9699
+ onClose: React35.useCallback(() => {
9700
+ window.clearTimeout(skipDelayTimerRef.current);
9701
+ skipDelayTimerRef.current = window.setTimeout(
9702
+ () => isOpenDelayedRef.current = true,
9703
+ skipDelayDuration
9704
+ );
9705
+ }, [skipDelayDuration]),
9706
+ isPointerInTransitRef,
9707
+ onPointerInTransitChange: React35.useCallback((inTransit) => {
9708
+ isPointerInTransitRef.current = inTransit;
9709
+ }, []),
9710
+ disableHoverableContent,
9711
+ children
9660
9712
  }
9661
9713
  );
9662
9714
  };
@@ -9675,12 +9727,12 @@ var Tooltip = (props) => {
9675
9727
  } = props;
9676
9728
  const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);
9677
9729
  const popperScope = usePopperScope2(__scopeTooltip);
9678
- const [trigger, setTrigger] = React36.useState(null);
9730
+ const [trigger, setTrigger] = React35.useState(null);
9679
9731
  const contentId = useId();
9680
- const openTimerRef = React36.useRef(0);
9732
+ const openTimerRef = React35.useRef(0);
9681
9733
  const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
9682
9734
  const delayDuration = delayDurationProp ?? providerContext.delayDuration;
9683
- const wasOpenDelayedRef = React36.useRef(false);
9735
+ const wasOpenDelayedRef = React35.useRef(false);
9684
9736
  const [open, setOpen] = useControllableState({
9685
9737
  prop: openProp,
9686
9738
  defaultProp: defaultOpen ?? false,
@@ -9695,21 +9747,21 @@ var Tooltip = (props) => {
9695
9747
  },
9696
9748
  caller: TOOLTIP_NAME
9697
9749
  });
9698
- const stateAttribute = React36.useMemo(() => {
9750
+ const stateAttribute = React35.useMemo(() => {
9699
9751
  return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed";
9700
9752
  }, [open]);
9701
- const handleOpen = React36.useCallback(() => {
9753
+ const handleOpen = React35.useCallback(() => {
9702
9754
  window.clearTimeout(openTimerRef.current);
9703
9755
  openTimerRef.current = 0;
9704
9756
  wasOpenDelayedRef.current = false;
9705
9757
  setOpen(true);
9706
9758
  }, [setOpen]);
9707
- const handleClose = React36.useCallback(() => {
9759
+ const handleClose = React35.useCallback(() => {
9708
9760
  window.clearTimeout(openTimerRef.current);
9709
9761
  openTimerRef.current = 0;
9710
9762
  setOpen(false);
9711
9763
  }, [setOpen]);
9712
- const handleDelayedOpen = React36.useCallback(() => {
9764
+ const handleDelayedOpen = React35.useCallback(() => {
9713
9765
  window.clearTimeout(openTimerRef.current);
9714
9766
  openTimerRef.current = window.setTimeout(() => {
9715
9767
  wasOpenDelayedRef.current = true;
@@ -9717,7 +9769,7 @@ var Tooltip = (props) => {
9717
9769
  openTimerRef.current = 0;
9718
9770
  }, delayDuration);
9719
9771
  }, [delayDuration, setOpen]);
9720
- React36.useEffect(() => {
9772
+ React35.useEffect(() => {
9721
9773
  return () => {
9722
9774
  if (openTimerRef.current) {
9723
9775
  window.clearTimeout(openTimerRef.current);
@@ -9725,7 +9777,7 @@ var Tooltip = (props) => {
9725
9777
  }
9726
9778
  };
9727
9779
  }, []);
9728
- return /* @__PURE__ */ jsx16(Root22, { ...popperScope, children: /* @__PURE__ */ jsx16(
9780
+ return /* @__PURE__ */ jsx15(Root22, { ...popperScope, children: /* @__PURE__ */ jsx15(
9729
9781
  TooltipContextProvider,
9730
9782
  {
9731
9783
  scope: __scopeTooltip,
@@ -9734,11 +9786,11 @@ var Tooltip = (props) => {
9734
9786
  stateAttribute,
9735
9787
  trigger,
9736
9788
  onTriggerChange: setTrigger,
9737
- onTriggerEnter: React36.useCallback(() => {
9789
+ onTriggerEnter: React35.useCallback(() => {
9738
9790
  if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();
9739
9791
  else handleOpen();
9740
9792
  }, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]),
9741
- onTriggerLeave: React36.useCallback(() => {
9793
+ onTriggerLeave: React35.useCallback(() => {
9742
9794
  if (disableHoverableContent) {
9743
9795
  handleClose();
9744
9796
  } else {
@@ -9755,21 +9807,21 @@ var Tooltip = (props) => {
9755
9807
  };
9756
9808
  Tooltip.displayName = TOOLTIP_NAME;
9757
9809
  var TRIGGER_NAME3 = "TooltipTrigger";
9758
- var TooltipTrigger = React36.forwardRef(
9810
+ var TooltipTrigger = React35.forwardRef(
9759
9811
  (props, forwardedRef) => {
9760
9812
  const { __scopeTooltip, ...triggerProps } = props;
9761
9813
  const context = useTooltipContext(TRIGGER_NAME3, __scopeTooltip);
9762
9814
  const providerContext = useTooltipProviderContext(TRIGGER_NAME3, __scopeTooltip);
9763
9815
  const popperScope = usePopperScope2(__scopeTooltip);
9764
- const ref = React36.useRef(null);
9816
+ const ref = React35.useRef(null);
9765
9817
  const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);
9766
- const isPointerDownRef = React36.useRef(false);
9767
- const hasPointerMoveOpenedRef = React36.useRef(false);
9768
- const handlePointerUp = React36.useCallback(() => isPointerDownRef.current = false, []);
9769
- React36.useEffect(() => {
9818
+ const isPointerDownRef = React35.useRef(false);
9819
+ const hasPointerMoveOpenedRef = React35.useRef(false);
9820
+ const handlePointerUp = React35.useCallback(() => isPointerDownRef.current = false, []);
9821
+ React35.useEffect(() => {
9770
9822
  return () => document.removeEventListener("pointerup", handlePointerUp);
9771
9823
  }, [handlePointerUp]);
9772
- return /* @__PURE__ */ jsx16(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx16(
9824
+ return /* @__PURE__ */ jsx15(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx15(
9773
9825
  Primitive.button,
9774
9826
  {
9775
9827
  "aria-describedby": context.open ? context.contentId : void 0,
@@ -9811,32 +9863,32 @@ var [PortalProvider2, usePortalContext2] = createTooltipContext(PORTAL_NAME4, {
9811
9863
  var TooltipPortal = (props) => {
9812
9864
  const { __scopeTooltip, forceMount, children, container } = props;
9813
9865
  const context = useTooltipContext(PORTAL_NAME4, __scopeTooltip);
9814
- return /* @__PURE__ */ jsx16(PortalProvider2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx16(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx16(Portal, { asChild: true, container, children }) }) });
9866
+ return /* @__PURE__ */ jsx15(PortalProvider2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx15(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx15(Portal, { asChild: true, container, children }) }) });
9815
9867
  };
9816
9868
  TooltipPortal.displayName = PORTAL_NAME4;
9817
9869
  var CONTENT_NAME4 = "TooltipContent";
9818
- var TooltipContent = React36.forwardRef(
9870
+ var TooltipContent = React35.forwardRef(
9819
9871
  (props, forwardedRef) => {
9820
9872
  const portalContext = usePortalContext2(CONTENT_NAME4, props.__scopeTooltip);
9821
9873
  const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
9822
9874
  const context = useTooltipContext(CONTENT_NAME4, props.__scopeTooltip);
9823
- return /* @__PURE__ */ jsx16(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx16(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx16(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
9875
+ return /* @__PURE__ */ jsx15(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx15(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx15(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
9824
9876
  }
9825
9877
  );
9826
- var TooltipContentHoverable = React36.forwardRef((props, forwardedRef) => {
9878
+ var TooltipContentHoverable = React35.forwardRef((props, forwardedRef) => {
9827
9879
  const context = useTooltipContext(CONTENT_NAME4, props.__scopeTooltip);
9828
9880
  const providerContext = useTooltipProviderContext(CONTENT_NAME4, props.__scopeTooltip);
9829
- const ref = React36.useRef(null);
9881
+ const ref = React35.useRef(null);
9830
9882
  const composedRefs = useComposedRefs(forwardedRef, ref);
9831
- const [pointerGraceArea, setPointerGraceArea] = React36.useState(null);
9883
+ const [pointerGraceArea, setPointerGraceArea] = React35.useState(null);
9832
9884
  const { trigger, onClose } = context;
9833
9885
  const content = ref.current;
9834
9886
  const { onPointerInTransitChange } = providerContext;
9835
- const handleRemoveGraceArea = React36.useCallback(() => {
9887
+ const handleRemoveGraceArea = React35.useCallback(() => {
9836
9888
  setPointerGraceArea(null);
9837
9889
  onPointerInTransitChange(false);
9838
9890
  }, [onPointerInTransitChange]);
9839
- const handleCreateGraceArea = React36.useCallback(
9891
+ const handleCreateGraceArea = React35.useCallback(
9840
9892
  (event, hoverTarget) => {
9841
9893
  const currentTarget = event.currentTarget;
9842
9894
  const exitPoint = { x: event.clientX, y: event.clientY };
@@ -9849,10 +9901,10 @@ var TooltipContentHoverable = React36.forwardRef((props, forwardedRef) => {
9849
9901
  },
9850
9902
  [onPointerInTransitChange]
9851
9903
  );
9852
- React36.useEffect(() => {
9904
+ React35.useEffect(() => {
9853
9905
  return () => handleRemoveGraceArea();
9854
9906
  }, [handleRemoveGraceArea]);
9855
- React36.useEffect(() => {
9907
+ React35.useEffect(() => {
9856
9908
  if (trigger && content) {
9857
9909
  const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
9858
9910
  const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
@@ -9864,7 +9916,7 @@ var TooltipContentHoverable = React36.forwardRef((props, forwardedRef) => {
9864
9916
  };
9865
9917
  }
9866
9918
  }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
9867
- React36.useEffect(() => {
9919
+ React35.useEffect(() => {
9868
9920
  if (pointerGraceArea) {
9869
9921
  const handleTrackPointerGrace = (event) => {
9870
9922
  const target = event.target;
@@ -9882,11 +9934,11 @@ var TooltipContentHoverable = React36.forwardRef((props, forwardedRef) => {
9882
9934
  return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
9883
9935
  }
9884
9936
  }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
9885
- return /* @__PURE__ */ jsx16(TooltipContentImpl, { ...props, ref: composedRefs });
9937
+ return /* @__PURE__ */ jsx15(TooltipContentImpl, { ...props, ref: composedRefs });
9886
9938
  });
9887
9939
  var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
9888
9940
  var Slottable = createSlottable("TooltipContent");
9889
- var TooltipContentImpl = React36.forwardRef(
9941
+ var TooltipContentImpl = React35.forwardRef(
9890
9942
  (props, forwardedRef) => {
9891
9943
  const {
9892
9944
  __scopeTooltip,
@@ -9899,11 +9951,11 @@ var TooltipContentImpl = React36.forwardRef(
9899
9951
  const context = useTooltipContext(CONTENT_NAME4, __scopeTooltip);
9900
9952
  const popperScope = usePopperScope2(__scopeTooltip);
9901
9953
  const { onClose } = context;
9902
- React36.useEffect(() => {
9954
+ React35.useEffect(() => {
9903
9955
  document.addEventListener(TOOLTIP_OPEN, onClose);
9904
9956
  return () => document.removeEventListener(TOOLTIP_OPEN, onClose);
9905
9957
  }, [onClose]);
9906
- React36.useEffect(() => {
9958
+ React35.useEffect(() => {
9907
9959
  if (context.trigger) {
9908
9960
  const handleScroll2 = (event) => {
9909
9961
  const target = event.target;
@@ -9913,7 +9965,7 @@ var TooltipContentImpl = React36.forwardRef(
9913
9965
  return () => window.removeEventListener("scroll", handleScroll2, { capture: true });
9914
9966
  }
9915
9967
  }, [context.trigger, onClose]);
9916
- return /* @__PURE__ */ jsx16(
9968
+ return /* @__PURE__ */ jsx15(
9917
9969
  DismissableLayer,
9918
9970
  {
9919
9971
  asChild: true,
@@ -9941,8 +9993,8 @@ var TooltipContentImpl = React36.forwardRef(
9941
9993
  }
9942
9994
  },
9943
9995
  children: [
9944
- /* @__PURE__ */ jsx16(Slottable, { children }),
9945
- /* @__PURE__ */ jsx16(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx16(Root3, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
9996
+ /* @__PURE__ */ jsx15(Slottable, { children }),
9997
+ /* @__PURE__ */ jsx15(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx15(Root3, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
9946
9998
  ]
9947
9999
  }
9948
10000
  )
@@ -9952,7 +10004,7 @@ var TooltipContentImpl = React36.forwardRef(
9952
10004
  );
9953
10005
  TooltipContent.displayName = CONTENT_NAME4;
9954
10006
  var ARROW_NAME3 = "TooltipArrow";
9955
- var TooltipArrow = React36.forwardRef(
10007
+ var TooltipArrow = React35.forwardRef(
9956
10008
  (props, forwardedRef) => {
9957
10009
  const { __scopeTooltip, ...arrowProps } = props;
9958
10010
  const popperScope = usePopperScope2(__scopeTooltip);
@@ -9960,7 +10012,7 @@ var TooltipArrow = React36.forwardRef(
9960
10012
  ARROW_NAME3,
9961
10013
  __scopeTooltip
9962
10014
  );
9963
- return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx16(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
10015
+ return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx15(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
9964
10016
  }
9965
10017
  );
9966
10018
  TooltipArrow.displayName = ARROW_NAME3;
@@ -10086,93 +10138,240 @@ var Portal4 = TooltipPortal;
10086
10138
  var Content23 = TooltipContent;
10087
10139
 
10088
10140
  // ../ui-react/dist/index.mjs
10089
- import { jsx as jsx112 } from "react/jsx-runtime";
10090
- import { Fragment as Fragment23, jsx as jsx122, jsxs as jsxs8 } from "react/jsx-runtime";
10091
- import { jsx as jsx132 } from "react/jsx-runtime";
10092
- import { useState as useState42, useEffect as useEffect42 } from "react";
10093
- import { useState as useState32 } from "react";
10094
- import { jsx as jsx142, jsxs as jsxs9 } from "react/jsx-runtime";
10095
- import { Fragment as Fragment32, jsx as jsx152, jsxs as jsxs10 } from "react/jsx-runtime";
10096
- import { jsx as jsx162, jsxs as jsxs11 } from "react/jsx-runtime";
10097
- import { useQuery } from "@tanstack/react-query";
10098
- import { jsx as jsx172, jsxs as jsxs12 } from "react/jsx-runtime";
10099
- import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
10100
- import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
10101
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
10102
- import { Fragment as Fragment42, jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
10103
- import { jsx as jsx222 } from "react/jsx-runtime";
10104
- function cn(...inputs) {
10105
- return twMerge(clsx(inputs));
10141
+ import { jsx as jsx102 } from "react/jsx-runtime";
10142
+ import { jsx as jsx112, jsxs as jsxs8 } from "react/jsx-runtime";
10143
+ import { jsx as jsx122 } from "react/jsx-runtime";
10144
+ import { useState as useState62, useEffect as useEffect52 } from "react";
10145
+ import { useState as useState52 } from "react";
10146
+ import { jsx as jsx132, jsxs as jsxs9 } from "react/jsx-runtime";
10147
+ import { Fragment as Fragment32, jsx as jsx142, jsxs as jsxs10 } from "react/jsx-runtime";
10148
+ import { jsx as jsx152, jsxs as jsxs11 } from "react/jsx-runtime";
10149
+ import { useQuery as useQuery2 } from "@tanstack/react-query";
10150
+ import { jsx as jsx162, jsxs as jsxs12 } from "react/jsx-runtime";
10151
+ import { jsx as jsx172, jsxs as jsxs13 } from "react/jsx-runtime";
10152
+ import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
10153
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
10154
+ import { Fragment as Fragment42, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
10155
+ import { jsx as jsx21 } from "react/jsx-runtime";
10156
+ import * as React52 from "react";
10157
+
10158
+ // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
10159
+ import * as React36 from "react";
10160
+ import { Fragment as Fragment22, jsx as jsx16 } from "react/jsx-runtime";
10161
+ var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
10162
+ var use = React36[" use ".trim().toString()];
10163
+ function isPromiseLike(value) {
10164
+ return typeof value === "object" && value !== null && "then" in value;
10106
10165
  }
10107
- var ThemeContext = React37.createContext({ themeClass: "" });
10108
- function ThemeProvider({
10109
- children,
10110
- themeClass
10111
- }) {
10112
- return /* @__PURE__ */ jsx17(ThemeContext.Provider, { value: { themeClass }, children });
10166
+ function isLazyComponent(element) {
10167
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
10113
10168
  }
10114
- function useTheme() {
10115
- return React37.useContext(ThemeContext);
10169
+ // @__NO_SIDE_EFFECTS__
10170
+ function createSlot2(ownerName) {
10171
+ const SlotClone = /* @__PURE__ */ createSlotClone2(ownerName);
10172
+ const Slot22 = React36.forwardRef((props, forwardedRef) => {
10173
+ let { children, ...slotProps } = props;
10174
+ if (isLazyComponent(children) && typeof use === "function") {
10175
+ children = use(children._payload);
10176
+ }
10177
+ const childrenArray = React36.Children.toArray(children);
10178
+ const slottable = childrenArray.find(isSlottable2);
10179
+ if (slottable) {
10180
+ const newElement = slottable.props.children;
10181
+ const newChildren = childrenArray.map((child) => {
10182
+ if (child === slottable) {
10183
+ if (React36.Children.count(newElement) > 1) return React36.Children.only(null);
10184
+ return React36.isValidElement(newElement) ? newElement.props.children : null;
10185
+ } else {
10186
+ return child;
10187
+ }
10188
+ });
10189
+ return /* @__PURE__ */ jsx16(SlotClone, { ...slotProps, ref: forwardedRef, children: React36.isValidElement(newElement) ? React36.cloneElement(newElement, void 0, newChildren) : null });
10190
+ }
10191
+ return /* @__PURE__ */ jsx16(SlotClone, { ...slotProps, ref: forwardedRef, children });
10192
+ });
10193
+ Slot22.displayName = `${ownerName}.Slot`;
10194
+ return Slot22;
10116
10195
  }
10117
- var Dialog2 = Root;
10118
- var DialogPortal2 = Portal2;
10119
- var DialogOverlay2 = React210.forwardRef(({ className, ...props }, ref) => {
10120
- const { themeClass } = useTheme();
10121
- return /* @__PURE__ */ jsx23(
10122
- Overlay,
10123
- {
10124
- ref,
10125
- className: cn(
10126
- themeClass,
10127
- "uf-fixed uf-inset-0 uf-z-50 uf-bg-black/40 data-[state=open]:uf-animate-in data-[state=closed]:uf-animate-out data-[state=closed]:uf-fade-out-0 data-[state=open]:uf-fade-in-0",
10128
- className
10129
- ),
10130
- ...props
10196
+ var Slot3 = /* @__PURE__ */ createSlot2("Slot");
10197
+ // @__NO_SIDE_EFFECTS__
10198
+ function createSlotClone2(ownerName) {
10199
+ const SlotClone = React36.forwardRef((props, forwardedRef) => {
10200
+ let { children, ...slotProps } = props;
10201
+ if (isLazyComponent(children) && typeof use === "function") {
10202
+ children = use(children._payload);
10131
10203
  }
10132
- );
10133
- });
10134
- DialogOverlay2.displayName = Overlay.displayName;
10135
- var DialogContent2 = React210.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(DialogPortal2, { children: [
10136
- /* @__PURE__ */ jsx23(DialogOverlay2, {}),
10137
- /* @__PURE__ */ jsxs4(
10138
- Content,
10139
- {
10140
- ref,
10141
- className: cn(
10142
- // Mobile: bottom-aligned, full-width
10143
- "uf-fixed uf-bottom-0 uf-left-0 uf-right-0 uf-z-50 uf-grid uf-w-full uf-max-w-full",
10144
- // Mobile: rounded top corners only
10145
- "uf-rounded-t-3xl",
10146
- // Desktop: centered modal (no default max-width, let parent specify)
10147
- "sm:uf-left-[50%] sm:uf-top-[50%] sm:uf-bottom-auto sm:uf-right-auto sm:uf-translate-x-[-50%] sm:uf-translate-y-[-50%]",
10148
- // Desktop: rounded all corners
10149
- "sm:uf-rounded-3xl",
10150
- // Common styles
10151
- "uf-gap-4 uf-border uf-bg-background uf-p-6 uf-shadow-lg uf-duration-200",
10152
- // Animations - mobile slides from bottom
10153
- "data-[state=open]:uf-animate-in data-[state=closed]:uf-animate-out",
10154
- "data-[state=closed]:uf-fade-out-0 data-[state=open]:uf-fade-in-0",
10155
- "data-[state=closed]:uf-slide-out-to-bottom data-[state=open]:uf-slide-in-from-bottom",
10156
- // Desktop animations - center zoom
10157
- "sm:data-[state=closed]:uf-zoom-out-95 sm:data-[state=open]:uf-zoom-in-95",
10158
- "sm:data-[state=closed]:uf-slide-out-to-left-1/2 sm:data-[state=closed]:uf-slide-out-to-top-[48%]",
10159
- "sm:data-[state=open]:uf-slide-in-from-left-1/2 sm:data-[state=open]:uf-slide-in-from-top-[48%]",
10160
- className
10161
- ),
10162
- ...props,
10163
- children: [
10164
- children,
10165
- /* @__PURE__ */ jsxs4(Close, { className: "uf-absolute uf-right-6 uf-top-6 uf-rounded-sm uf-opacity-70 uf-ring-offset-background uf-transition-opacity hover:uf-opacity-100 focus:uf-outline-none focus:uf-ring-2 focus:uf-ring-ring focus:uf-ring-offset-2 disabled:uf-pointer-events-none data-[state=open]:uf-bg-accent data-[state=open]:uf-text-muted-foreground", children: [
10166
- /* @__PURE__ */ jsx23(X, { className: "uf-h-6 uf-w-6" }),
10167
- /* @__PURE__ */ jsx23("span", { className: "uf-sr-only", children: "Close" })
10168
- ] })
10169
- ]
10204
+ if (React36.isValidElement(children)) {
10205
+ const childrenRef = getElementRef3(children);
10206
+ const props2 = mergeProps2(slotProps, children.props);
10207
+ if (children.type !== React36.Fragment) {
10208
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
10209
+ }
10210
+ return React36.cloneElement(children, props2);
10170
10211
  }
10171
- )
10172
- ] }));
10173
- DialogContent2.displayName = Content.displayName;
10174
- var DialogHeader = ({
10175
- className,
10212
+ return React36.Children.count(children) > 1 ? React36.Children.only(null) : null;
10213
+ });
10214
+ SlotClone.displayName = `${ownerName}.SlotClone`;
10215
+ return SlotClone;
10216
+ }
10217
+ var SLOTTABLE_IDENTIFIER2 = /* @__PURE__ */ Symbol("radix.slottable");
10218
+ function isSlottable2(child) {
10219
+ return React36.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
10220
+ }
10221
+ function mergeProps2(slotProps, childProps) {
10222
+ const overrideProps = { ...childProps };
10223
+ for (const propName in childProps) {
10224
+ const slotPropValue = slotProps[propName];
10225
+ const childPropValue = childProps[propName];
10226
+ const isHandler = /^on[A-Z]/.test(propName);
10227
+ if (isHandler) {
10228
+ if (slotPropValue && childPropValue) {
10229
+ overrideProps[propName] = (...args) => {
10230
+ const result = childPropValue(...args);
10231
+ slotPropValue(...args);
10232
+ return result;
10233
+ };
10234
+ } else if (slotPropValue) {
10235
+ overrideProps[propName] = slotPropValue;
10236
+ }
10237
+ } else if (propName === "style") {
10238
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
10239
+ } else if (propName === "className") {
10240
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
10241
+ }
10242
+ }
10243
+ return { ...slotProps, ...overrideProps };
10244
+ }
10245
+ function getElementRef3(element) {
10246
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
10247
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10248
+ if (mayWarn) {
10249
+ return element.ref;
10250
+ }
10251
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
10252
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10253
+ if (mayWarn) {
10254
+ return element.props.ref;
10255
+ }
10256
+ return element.props.ref || element.ref;
10257
+ }
10258
+
10259
+ // ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
10260
+ var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
10261
+ var cx = clsx;
10262
+ var cva = (base, config) => (props) => {
10263
+ var _config_compoundVariants;
10264
+ if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
10265
+ const { variants, defaultVariants } = config;
10266
+ const getVariantClassNames = Object.keys(variants).map((variant) => {
10267
+ const variantProp = props === null || props === void 0 ? void 0 : props[variant];
10268
+ const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
10269
+ if (variantProp === null) return null;
10270
+ const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
10271
+ return variants[variant][variantKey];
10272
+ });
10273
+ const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
10274
+ let [key, value] = param;
10275
+ if (value === void 0) {
10276
+ return acc;
10277
+ }
10278
+ acc[key] = value;
10279
+ return acc;
10280
+ }, {});
10281
+ const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
10282
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
10283
+ return Object.entries(compoundVariantOptions).every((param2) => {
10284
+ let [key, value] = param2;
10285
+ return Array.isArray(value) ? value.includes({
10286
+ ...defaultVariants,
10287
+ ...propsWithoutUndefined
10288
+ }[key]) : {
10289
+ ...defaultVariants,
10290
+ ...propsWithoutUndefined
10291
+ }[key] === value;
10292
+ }) ? [
10293
+ ...acc,
10294
+ cvClass,
10295
+ cvClassName
10296
+ ] : acc;
10297
+ }, []);
10298
+ return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
10299
+ };
10300
+
10301
+ // ../ui-react/dist/index.mjs
10302
+ import { jsx as jsx222 } from "react/jsx-runtime";
10303
+ function cn(...inputs) {
10304
+ return twMerge(clsx(inputs));
10305
+ }
10306
+ var ThemeContext = React37.createContext({ themeClass: "" });
10307
+ function ThemeProvider({
10308
+ children,
10309
+ themeClass
10310
+ }) {
10311
+ return /* @__PURE__ */ jsx17(ThemeContext.Provider, { value: { themeClass }, children });
10312
+ }
10313
+ function useTheme() {
10314
+ return React37.useContext(ThemeContext);
10315
+ }
10316
+ var Dialog2 = Root;
10317
+ var DialogPortal2 = Portal2;
10318
+ var DialogOverlay2 = React210.forwardRef(({ className, ...props }, ref) => {
10319
+ const { themeClass } = useTheme();
10320
+ return /* @__PURE__ */ jsx23(
10321
+ Overlay,
10322
+ {
10323
+ ref,
10324
+ className: cn(
10325
+ themeClass,
10326
+ "uf-fixed uf-inset-0 uf-z-50 uf-bg-black/40 data-[state=open]:uf-animate-in data-[state=closed]:uf-animate-out data-[state=closed]:uf-fade-out-0 data-[state=open]:uf-fade-in-0",
10327
+ className
10328
+ ),
10329
+ ...props
10330
+ }
10331
+ );
10332
+ });
10333
+ DialogOverlay2.displayName = Overlay.displayName;
10334
+ var DialogContent2 = React210.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(DialogPortal2, { children: [
10335
+ /* @__PURE__ */ jsx23(DialogOverlay2, {}),
10336
+ /* @__PURE__ */ jsxs4(
10337
+ Content,
10338
+ {
10339
+ ref,
10340
+ className: cn(
10341
+ // Mobile: bottom-aligned, full-width
10342
+ "uf-fixed uf-bottom-0 uf-left-0 uf-right-0 uf-z-50 uf-grid uf-w-full uf-max-w-full",
10343
+ // Mobile: rounded top corners only
10344
+ "uf-rounded-t-3xl",
10345
+ // Desktop: centered modal (no default max-width, let parent specify)
10346
+ "sm:uf-left-[50%] sm:uf-top-[50%] sm:uf-bottom-auto sm:uf-right-auto sm:uf-translate-x-[-50%] sm:uf-translate-y-[-50%]",
10347
+ // Desktop: rounded all corners
10348
+ "sm:uf-rounded-3xl",
10349
+ // Common styles
10350
+ "uf-gap-4 uf-border uf-bg-background uf-p-6 uf-shadow-lg uf-duration-200",
10351
+ // Animations - mobile slides from bottom
10352
+ "data-[state=open]:uf-animate-in data-[state=closed]:uf-animate-out",
10353
+ "data-[state=closed]:uf-fade-out-0 data-[state=open]:uf-fade-in-0",
10354
+ "data-[state=closed]:uf-slide-out-to-bottom data-[state=open]:uf-slide-in-from-bottom",
10355
+ // Desktop animations - center zoom
10356
+ "sm:data-[state=closed]:uf-zoom-out-95 sm:data-[state=open]:uf-zoom-in-95",
10357
+ "sm:data-[state=closed]:uf-slide-out-to-left-1/2 sm:data-[state=closed]:uf-slide-out-to-top-[48%]",
10358
+ "sm:data-[state=open]:uf-slide-in-from-left-1/2 sm:data-[state=open]:uf-slide-in-from-top-[48%]",
10359
+ className
10360
+ ),
10361
+ ...props,
10362
+ children: [
10363
+ children,
10364
+ /* @__PURE__ */ jsxs4(Close, { className: "uf-absolute uf-right-6 uf-top-6 uf-rounded-sm uf-opacity-70 uf-ring-offset-background uf-transition-opacity hover:uf-opacity-100 focus:uf-outline-none focus:uf-ring-2 focus:uf-ring-ring focus:uf-ring-offset-2 disabled:uf-pointer-events-none data-[state=open]:uf-bg-accent data-[state=open]:uf-text-muted-foreground", children: [
10365
+ /* @__PURE__ */ jsx23(X, { className: "uf-h-6 uf-w-6" }),
10366
+ /* @__PURE__ */ jsx23("span", { className: "uf-sr-only", children: "Close" })
10367
+ ] })
10368
+ ]
10369
+ }
10370
+ )
10371
+ ] }));
10372
+ DialogContent2.displayName = Content.displayName;
10373
+ var DialogHeader = ({
10374
+ className,
10176
10375
  ...props
10177
10376
  }) => /* @__PURE__ */ jsx23(
10178
10377
  "div",
@@ -10339,175 +10538,11 @@ function DepositHeader({
10339
10538
  ) : /* @__PURE__ */ jsx42("div", { className: "uf-w-5 uf-h-5 uf-invisible" })
10340
10539
  ] });
10341
10540
  }
10342
- var API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.unifold.io";
10343
- var DEFAULT_PUBLISHABLE_KEY = "pk_test_123";
10344
- var DEFAULT_CONFIG = {};
10345
- function getIconUrl(iconPath) {
10346
- const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
10347
- return `${API_BASE_URL}/api/public${normalizedPath}`;
10348
- }
10349
- function getIconUrlWithCdn(iconPath, assetCdnUrl) {
10350
- if (!assetCdnUrl) {
10351
- return getIconUrl(iconPath);
10352
- }
10353
- const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
10354
- const baseUrl = assetCdnUrl.endsWith("/") ? assetCdnUrl.slice(0, -1) : assetCdnUrl;
10355
- return `${baseUrl}/api/public${normalizedPath}`;
10356
- }
10357
- async function createEOA(overrides, publishableKey) {
10358
- if (!overrides?.user_id) {
10359
- throw new Error("user_id is required");
10360
- }
10361
- const payload = {
10362
- user_id: overrides.user_id,
10363
- destination_chain_type: overrides?.destination_chain_type || "ethereum",
10364
- destination_chain_id: overrides?.destination_chain_id || DEFAULT_CONFIG.destinationChainId || "8453",
10365
- destination_token_address: overrides?.destination_token_address || DEFAULT_CONFIG.destinationTokenAddress || "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
10366
- recipient_address: overrides?.recipient_address || DEFAULT_CONFIG.recipientAddress || "0x309a4154a2CD4153Da886E780890C9cb5161553C",
10367
- client_metadata: overrides?.client_metadata || {}
10368
- };
10369
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
10370
- const response = await fetch(`${API_BASE_URL}/v1/public/deposit_addresses`, {
10371
- method: "POST",
10372
- headers: {
10373
- accept: "application/json",
10374
- "x-publishable-key": pk,
10375
- "Content-Type": "application/json"
10376
- },
10377
- body: JSON.stringify(payload)
10378
- });
10379
- if (!response.ok) {
10380
- throw new Error(`Failed to create EOA: ${response.statusText}`);
10381
- }
10382
- return response.json();
10383
- }
10384
- function getWalletByChainType(wallets, chainType) {
10385
- return wallets.find((wallet) => wallet.chain_type === chainType);
10386
- }
10387
- async function queryExecutions(externalUserId, publishableKey) {
10388
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
10389
- const response = await fetch(
10390
- `${API_BASE_URL}/v1/public/direct_executions/query`,
10391
- {
10392
- method: "POST",
10393
- headers: {
10394
- accept: "application/json",
10395
- "x-publishable-key": pk,
10396
- "Content-Type": "application/json"
10397
- },
10398
- body: JSON.stringify({
10399
- external_user_id: externalUserId
10400
- })
10401
- }
10402
- );
10403
- if (!response.ok) {
10404
- throw new Error(`Failed to query executions: ${response.statusText}`);
10405
- }
10406
- return response.json();
10407
- }
10408
- async function getSupportedDepositTokens(publishableKey) {
10409
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
10410
- const response = await fetch(
10411
- `${API_BASE_URL}/v1/public/tokens/supported_deposit_tokens`,
10412
- {
10413
- method: "GET",
10414
- headers: {
10415
- accept: "application/json",
10416
- "x-publishable-key": pk
10417
- }
10418
- }
10419
- );
10420
- if (!response.ok) {
10421
- throw new Error(
10422
- `Failed to fetch supported deposit tokens: ${response.statusText}`
10423
- );
10424
- }
10425
- return response.json();
10426
- }
10427
- async function getMeldQuotes(request, publishableKey) {
10428
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
10429
- const response = await fetch(
10430
- `${API_BASE_URL}/v1/public/onramps/meld/quotes`,
10431
- {
10432
- method: "POST",
10433
- headers: {
10434
- accept: "application/json",
10435
- "x-publishable-key": pk,
10436
- "Content-Type": "application/json"
10437
- },
10438
- body: JSON.stringify(request)
10439
- }
10440
- );
10441
- if (!response.ok) {
10442
- throw new Error(`Failed to fetch Meld quotes: ${response.statusText}`);
10443
- }
10444
- return response.json();
10445
- }
10446
- async function createMeldSession(request, publishableKey) {
10447
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
10448
- const response = await fetch(
10449
- `${API_BASE_URL}/v1/public/onramps/meld/sessions`,
10450
- {
10451
- method: "POST",
10452
- headers: {
10453
- accept: "application/json",
10454
- "x-publishable-key": pk,
10455
- "Content-Type": "application/json"
10456
- },
10457
- body: JSON.stringify(request)
10458
- }
10459
- );
10460
- if (!response.ok) {
10461
- throw new Error(`Failed to create Meld session: ${response.statusText}`);
10462
- }
10463
- return response.json();
10464
- }
10465
- function getPreferredIconUrl(iconUrls, preferredFormat = "svg") {
10466
- if (!iconUrls || iconUrls.length === 0) {
10467
- return void 0;
10468
- }
10469
- const preferred = iconUrls.find((icon) => icon.format === preferredFormat);
10470
- if (preferred) {
10471
- return preferred.url;
10472
- }
10473
- return iconUrls[0]?.url;
10474
- }
10475
- async function getFiatCurrencies(publishableKey) {
10476
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
10477
- const response = await fetch(
10478
- `${API_BASE_URL}/v1/public/onramps/fiat_currencies`,
10479
- {
10480
- method: "GET",
10481
- headers: {
10482
- accept: "application/json",
10483
- "x-publishable-key": pk
10484
- }
10485
- }
10486
- );
10487
- if (!response.ok) {
10488
- throw new Error(`Failed to fetch fiat currencies: ${response.statusText}`);
10489
- }
10490
- return response.json();
10491
- }
10492
- async function getProjectConfig(publishableKey) {
10493
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
10494
- const response = await fetch(`${API_BASE_URL}/v1/public/projects/config`, {
10495
- method: "GET",
10496
- headers: {
10497
- accept: "application/json",
10498
- "x-publishable-key": pk
10499
- }
10500
- });
10501
- if (!response.ok) {
10502
- throw new Error(`Failed to fetch project config: ${response.statusText}`);
10503
- }
10504
- return response.json();
10505
- }
10506
10541
  function DepositExecutionItem({
10507
10542
  execution,
10508
10543
  onClick
10509
10544
  }) {
10510
- const isPending = execution.status === "pending" || execution.status === "waiting" || execution.status === "delayed";
10545
+ const isPending = execution.status === ExecutionStatus.PENDING || execution.status === ExecutionStatus.WAITING || execution.status === ExecutionStatus.DELAYED;
10511
10546
  const formatDateTime = (timestamp) => {
10512
10547
  try {
10513
10548
  const date = new Date(timestamp);
@@ -10549,7 +10584,7 @@ function DepositExecutionItem({
10549
10584
  /* @__PURE__ */ jsx52(
10550
10585
  "img",
10551
10586
  {
10552
- src: execution.source_token_metadata?.icon_url || getIconUrl("/icons/tokens/usdc.svg"),
10587
+ src: execution.destination_token_metadata?.icon_url || getIconUrl("/icons/tokens/svg/usdc.svg"),
10553
10588
  alt: "Token",
10554
10589
  width: 36,
10555
10590
  height: 36,
@@ -10574,7 +10609,7 @@ function DepositExecutionItem({
10574
10609
  }
10575
10610
  )
10576
10611
  }
10577
- ) }) : /* @__PURE__ */ jsx52("div", { className: "uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-bg-blue-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx52("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", className: "uf-block", children: /* @__PURE__ */ jsx52(
10612
+ ) }) : /* @__PURE__ */ jsx52("div", { className: "uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx52("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", className: "uf-block", children: /* @__PURE__ */ jsx52(
10578
10613
  "path",
10579
10614
  {
10580
10615
  d: "M10 3L4.5 8.5L2 6",
@@ -10586,7 +10621,7 @@ function DepositExecutionItem({
10586
10621
  ) }) })
10587
10622
  ] }),
10588
10623
  /* @__PURE__ */ jsxs32("div", { className: "uf-flex-1 uf-min-w-0", children: [
10589
- /* @__PURE__ */ jsx52("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-leading-tight", children: isPending ? "Deposit received" : "Deposit completed" }),
10624
+ /* @__PURE__ */ jsx52("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-leading-tight", children: isPending ? "Deposit processing" : "Deposit completed" }),
10590
10625
  /* @__PURE__ */ jsx52("p", { className: "uf-text-muted-foreground uf-text-xs uf-leading-tight", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
10591
10626
  ] }),
10592
10627
  /* @__PURE__ */ jsx52("span", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(execution.source_amount_base_unit) }),
@@ -10595,27 +10630,16 @@ function DepositExecutionItem({
10595
10630
  }
10596
10631
  );
10597
10632
  }
10598
- var CHAIN_NAMES = {
10599
- solana: "Solana",
10600
- ethereum: "Ethereum",
10601
- "1": "Ethereum",
10602
- "137": "Polygon",
10603
- "42161": "Arbitrum",
10604
- "10": "Optimism",
10605
- "8453": "Base",
10606
- "43114": "Avalanche",
10607
- "56": "BSC",
10608
- bitcoin: "Bitcoin",
10609
- mainnet: "Mainnet"
10610
- };
10611
- function DepositDetailModal({
10612
- open,
10613
- onOpenChange,
10614
- execution,
10615
- themeClass = ""
10616
- }) {
10617
- if (!execution) return null;
10618
- const isPending = execution.status === "pending" || execution.status === "waiting" || execution.status === "delayed";
10633
+ function DepositDetailContent({ execution }) {
10634
+ const [chains, setChains] = useState16([]);
10635
+ const [showNetworkDetails, setShowNetworkDetails] = useState16(false);
10636
+ useEffect22(() => {
10637
+ getTokenChains().then((response) => setChains(response.data)).catch((err) => console.error("Failed to fetch chains:", err));
10638
+ }, []);
10639
+ useEffect22(() => {
10640
+ setShowNetworkDetails(false);
10641
+ }, [execution?.id]);
10642
+ const isPending = execution.status === ExecutionStatus.PENDING || execution.status === ExecutionStatus.WAITING || execution.status === ExecutionStatus.DELAYED;
10619
10643
  const formatDateTime = (timestamp) => {
10620
10644
  try {
10621
10645
  const date = new Date(timestamp);
@@ -10670,170 +10694,161 @@ function DepositDetailModal({
10670
10694
  return "$0.00";
10671
10695
  };
10672
10696
  const getNetworkName = (chainType, chainId) => {
10673
- return CHAIN_NAMES[chainId] || CHAIN_NAMES[chainType] || chainType;
10674
- };
10675
- const getSourceTokenSymbol = () => {
10676
- return "USDC";
10697
+ return getChainName(chains, chainType, chainId);
10677
10698
  };
10678
- const getDestinationTokenSymbol = () => {
10679
- return "USDC";
10680
- };
10681
- const handleClose = () => {
10682
- onOpenChange(false);
10699
+ const formatTransactionHash = (hash) => {
10700
+ if (!hash || hash.length < 12) return hash;
10701
+ return `${hash.slice(0, 12)}...${hash.slice(-4)}`;
10683
10702
  };
10684
- return /* @__PURE__ */ jsx62(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs42(
10685
- DialogContent2,
10686
- {
10687
- className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`,
10688
- children: [
10689
- /* @__PURE__ */ jsx62(DepositHeader, { title: "Deposit Details", onClose: handleClose }),
10690
- /* @__PURE__ */ jsxs42("div", { className: "uf-px-4 uf-pb-4", children: [
10691
- /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-flex-col uf-items-center uf-py-6", children: [
10692
- /* @__PURE__ */ jsxs42("div", { className: "uf-relative uf-mb-3", children: [
10693
- /* @__PURE__ */ jsx62(
10694
- "img",
10695
- {
10696
- src: execution.source_token_metadata?.icon_url || getIconUrl("/icons/tokens/usdc.svg"),
10697
- alt: "Token",
10698
- width: 64,
10699
- height: 64,
10700
- className: "uf-rounded-full"
10701
- }
10702
- ),
10703
- isPending ? /* @__PURE__ */ jsx62("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-yellow-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx62(
10704
- "svg",
10705
- {
10706
- width: "16",
10707
- height: "16",
10708
- viewBox: "0 0 12 12",
10709
- fill: "none",
10710
- className: "uf-animate-spin uf-block",
10711
- children: /* @__PURE__ */ jsx62(
10712
- "path",
10713
- {
10714
- d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
10715
- stroke: "white",
10716
- strokeWidth: "2",
10717
- strokeLinecap: "round"
10718
- }
10719
- )
10720
- }
10721
- ) }) : /* @__PURE__ */ jsx62("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-blue-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx62(
10722
- "svg",
10723
- {
10724
- width: "16",
10725
- height: "16",
10726
- viewBox: "0 0 12 12",
10727
- fill: "none",
10728
- className: "uf-block",
10729
- children: /* @__PURE__ */ jsx62(
10730
- "path",
10731
- {
10732
- d: "M10 3L4.5 8.5L2 6",
10733
- stroke: "white",
10734
- strokeWidth: "2",
10735
- strokeLinecap: "round",
10736
- strokeLinejoin: "round"
10737
- }
10738
- )
10739
- }
10740
- ) })
10741
- ] }),
10742
- /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mb-1", children: [
10743
- /* @__PURE__ */ jsx62(
10744
- "div",
10745
- {
10746
- className: `uf-w-2 uf-h-2 uf-rounded-full ${isPending ? "uf-bg-yellow-500" : "uf-bg-green-500"}`
10747
- }
10748
- ),
10749
- /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: isPending ? "Pending" : "Completed" })
10750
- ] }),
10751
- /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
10752
- ] }),
10753
- /* @__PURE__ */ jsxs42("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-3", children: [
10754
- /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10755
- /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Sent" }),
10756
- /* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
10757
- formatAmount(execution.source_amount_base_unit),
10758
- " ",
10759
- getSourceTokenSymbol()
10760
- ] })
10761
- ] }),
10762
- /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10763
- /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Received" }),
10764
- /* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
10765
- formatAmount(execution.destination_amount_base_unit),
10766
- " ",
10767
- getDestinationTokenSymbol()
10768
- ] })
10769
- ] }),
10770
- /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
10771
- /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "USD Value" }),
10772
- /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: formatUsdAmount(execution.source_amount_usd, execution.source_amount_base_unit) })
10773
- ] })
10774
- ] }),
10775
- /* @__PURE__ */ jsxs42("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-4", children: [
10776
- /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10777
- /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Source Network" }),
10778
- /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.source_chain_type, execution.source_chain_id) })
10779
- ] }),
10780
- /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
10781
- /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Destination Network" }),
10782
- /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.destination_chain_type, execution.destination_chain_id) })
10783
- ] })
10784
- ] }),
10785
- /* @__PURE__ */ jsxs42("div", { className: "uf-space-y-2", children: [
10786
- execution.explorer_url && /* @__PURE__ */ jsxs42(
10787
- "a",
10703
+ return /* @__PURE__ */ jsxs42("div", { className: "uf-px-2", children: [
10704
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-flex-col uf-items-center uf-py-6", children: [
10705
+ /* @__PURE__ */ jsxs42("div", { className: "uf-relative uf-mb-3", children: [
10706
+ /* @__PURE__ */ jsx62(
10707
+ "img",
10708
+ {
10709
+ src: execution.destination_token_metadata?.icon_url || getIconUrl("/icons/tokens/svg/usdc.svg"),
10710
+ alt: "Token",
10711
+ width: 64,
10712
+ height: 64,
10713
+ className: "uf-rounded-full"
10714
+ }
10715
+ ),
10716
+ isPending ? /* @__PURE__ */ jsx62("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-yellow-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx62(
10717
+ "svg",
10718
+ {
10719
+ width: "16",
10720
+ height: "16",
10721
+ viewBox: "0 0 24 24",
10722
+ fill: "none",
10723
+ className: "uf-animate-spin uf-block",
10724
+ children: /* @__PURE__ */ jsx62(
10725
+ "path",
10788
10726
  {
10789
- href: execution.explorer_url,
10790
- target: "_blank",
10791
- rel: "noopener noreferrer",
10792
- className: "uf-flex uf-items-center uf-justify-between uf-w-full uf-bg-blue-400 hover:uf-bg-blue-500 uf-text-white uf-rounded-xl uf-px-4 uf-py-3 uf-transition-colors",
10793
- children: [
10794
- /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
10795
- /* @__PURE__ */ jsx62(ArrowDownCircle, { className: "uf-w-5 uf-h-5" }),
10796
- /* @__PURE__ */ jsx62("span", { className: "uf-font-medium", children: "View Deposit Transaction" })
10797
- ] }),
10798
- /* @__PURE__ */ jsx62(ExternalLink, { className: "uf-w-4 uf-h-4" })
10799
- ]
10727
+ d: "M21 12a9 9 0 1 1-6.22-8.56",
10728
+ stroke: "white",
10729
+ strokeWidth: "3",
10730
+ strokeLinecap: "round"
10800
10731
  }
10801
- ),
10802
- !isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ jsxs42(
10803
- "a",
10732
+ )
10733
+ }
10734
+ ) }) : /* @__PURE__ */ jsx62("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-green-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx62(
10735
+ "svg",
10736
+ {
10737
+ width: "16",
10738
+ height: "16",
10739
+ viewBox: "0 0 12 12",
10740
+ fill: "none",
10741
+ className: "uf-block",
10742
+ children: /* @__PURE__ */ jsx62(
10743
+ "path",
10804
10744
  {
10805
- href: execution.destination_explorer_url,
10806
- target: "_blank",
10807
- rel: "noopener noreferrer",
10808
- className: "uf-flex uf-items-center uf-justify-between uf-w-full uf-bg-blue-600 hover:uf-bg-blue-700 uf-text-white uf-rounded-xl uf-px-4 uf-py-3 uf-transition-colors",
10809
- children: [
10810
- /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
10811
- /* @__PURE__ */ jsx62(CheckCircle, { className: "uf-w-5 uf-h-5" }),
10812
- /* @__PURE__ */ jsx62("span", { className: "uf-font-medium", children: "View Completion Transaction" })
10813
- ] }),
10814
- /* @__PURE__ */ jsx62(ExternalLink, { className: "uf-w-4 uf-h-4" })
10815
- ]
10745
+ d: "M10 3L4.5 8.5L2 6",
10746
+ stroke: "white",
10747
+ strokeWidth: "2",
10748
+ strokeLinecap: "round",
10749
+ strokeLinejoin: "round"
10816
10750
  }
10817
10751
  )
10818
- ] }),
10819
- /* @__PURE__ */ jsx62("p", { className: "uf-text-center uf-text-muted-foreground uf-text-xs uf-mt-4", children: "Links open in external browser" })
10752
+ }
10753
+ ) })
10754
+ ] }),
10755
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mb-1", children: [
10756
+ /* @__PURE__ */ jsx62(
10757
+ "div",
10758
+ {
10759
+ className: `uf-w-2 uf-h-2 uf-rounded-full ${isPending ? "uf-bg-yellow-500" : "uf-bg-green-500"}`
10760
+ }
10761
+ ),
10762
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: isPending ? "Processing" : "Completed" })
10763
+ ] }),
10764
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
10765
+ ] }),
10766
+ /* @__PURE__ */ jsxs42("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-3", children: [
10767
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10768
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Sent" }),
10769
+ /* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
10770
+ formatAmount(execution.source_amount_base_unit),
10771
+ " ",
10772
+ execution.source_currency?.toUpperCase()
10820
10773
  ] })
10821
- ]
10822
- }
10823
- ) });
10774
+ ] }),
10775
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10776
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Received" }),
10777
+ /* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
10778
+ formatAmount(execution.destination_amount_base_unit),
10779
+ " ",
10780
+ execution.destination_currency?.toUpperCase()
10781
+ ] })
10782
+ ] }),
10783
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10784
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "USD Value" }),
10785
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: formatUsdAmount(execution.source_amount_usd, execution.source_amount_base_unit) })
10786
+ ] }),
10787
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10788
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Source Network" }),
10789
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.source_chain_type, execution.source_chain_id) })
10790
+ ] }),
10791
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
10792
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Destination Network" }),
10793
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.destination_chain_type, execution.destination_chain_id) })
10794
+ ] })
10795
+ ] }),
10796
+ /* @__PURE__ */ jsxs42(
10797
+ "button",
10798
+ {
10799
+ type: "button",
10800
+ onClick: () => setShowNetworkDetails(!showNetworkDetails),
10801
+ className: "uf-flex uf-justify-between uf-items-center uf-w-full uf-px-3 uf-pb-3 uf-text-muted-foreground uf-text-sm hover:uf-text-foreground uf-transition-colors",
10802
+ children: [
10803
+ /* @__PURE__ */ jsx62("span", { children: showNetworkDetails ? "See less" : "See more details" }),
10804
+ showNetworkDetails ? /* @__PURE__ */ jsx62(ChevronUp, { className: "uf-w-4 uf-h-4" }) : /* @__PURE__ */ jsx62(ChevronDown, { className: "uf-w-4 uf-h-4" })
10805
+ ]
10806
+ }
10807
+ ),
10808
+ showNetworkDetails && /* @__PURE__ */ jsxs42("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-4", children: [
10809
+ execution.transaction_hash && execution.explorer_url && /* @__PURE__ */ jsxs42(
10810
+ "a",
10811
+ {
10812
+ href: execution.explorer_url,
10813
+ target: "_blank",
10814
+ rel: "noopener noreferrer",
10815
+ className: "uf-grid uf-grid-cols-[auto_1fr_auto] uf-items-center uf-gap-2 uf-px-4 uf-py-3 uf-border-b uf-border-border/50 hover:uf-bg-card/50 uf-transition-colors",
10816
+ children: [
10817
+ /* @__PURE__ */ jsx62("div", { className: "uf-text-muted-foreground uf-text-sm", children: "Deposit Tx" }),
10818
+ /* @__PURE__ */ jsx62("div", { className: "uf-text-sm uf-text-foreground uf-text-right", children: formatTransactionHash(execution.transaction_hash) }),
10819
+ /* @__PURE__ */ jsx62(ExternalLink, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground uf-block" })
10820
+ ]
10821
+ }
10822
+ ),
10823
+ !isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ jsxs42(
10824
+ "a",
10825
+ {
10826
+ href: execution.destination_explorer_url,
10827
+ target: "_blank",
10828
+ rel: "noopener noreferrer",
10829
+ className: "uf-grid uf-grid-cols-[auto_1fr_auto] uf-items-center uf-gap-2 uf-px-4 uf-py-3 hover:uf-bg-card/50 uf-transition-colors",
10830
+ children: [
10831
+ /* @__PURE__ */ jsx62("div", { className: "uf-text-muted-foreground uf-text-sm", children: "Completion Tx" }),
10832
+ /* @__PURE__ */ jsx62("div", { className: "uf-text-sm uf-text-foreground uf-text-right", children: formatTransactionHash(execution.destination_transaction_hashes[0]) }),
10833
+ /* @__PURE__ */ jsx62(ExternalLink, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground uf-block" })
10834
+ ]
10835
+ }
10836
+ )
10837
+ ] })
10838
+ ] });
10824
10839
  }
10825
10840
  function DepositsModal({
10826
10841
  open,
10827
10842
  onOpenChange,
10843
+ onCloseAll,
10828
10844
  executions: sessionExecutions,
10829
10845
  userId,
10830
10846
  publishableKey,
10831
10847
  themeClass = ""
10832
10848
  }) {
10833
- const [allExecutions, setAllExecutions] = useState16(sessionExecutions);
10834
- const [selectedExecution, setSelectedExecution] = useState16(null);
10835
- const [detailModalOpen, setDetailModalOpen] = useState16(false);
10836
- useEffect22(() => {
10849
+ const [allExecutions, setAllExecutions] = useState22(sessionExecutions);
10850
+ const [selectedExecution, setSelectedExecution] = useState22(null);
10851
+ useEffect32(() => {
10837
10852
  if (!open || !userId) return;
10838
10853
  const fetchExecutions = async () => {
10839
10854
  try {
@@ -10855,35 +10870,55 @@ function DepositsModal({
10855
10870
  clearInterval(pollInterval);
10856
10871
  };
10857
10872
  }, [open, userId, publishableKey, sessionExecutions]);
10873
+ useEffect32(() => {
10874
+ if (!open) {
10875
+ setSelectedExecution(null);
10876
+ }
10877
+ }, [open]);
10878
+ const handleBack = () => {
10879
+ if (selectedExecution) {
10880
+ setSelectedExecution(null);
10881
+ } else {
10882
+ onOpenChange(false);
10883
+ }
10884
+ };
10858
10885
  const handleClose = () => {
10859
10886
  onOpenChange(false);
10887
+ onCloseAll?.();
10860
10888
  };
10861
10889
  const handleExecutionClick = (execution) => {
10862
10890
  setSelectedExecution(execution);
10863
- setDetailModalOpen(true);
10864
10891
  };
10865
- return /* @__PURE__ */ jsxs5(Fragment8, { children: [
10866
- /* @__PURE__ */ jsx72(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs5(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
10867
- /* @__PURE__ */ jsx72(DepositHeader, { title: "Deposit Tracker", onClose: handleClose }),
10868
- /* @__PURE__ */ jsx72("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden uf-pb-4", children: /* @__PURE__ */ jsx72("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx72("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx72("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ jsx72(Fragment8, { children: allExecutions.map((execution) => /* @__PURE__ */ jsx72(
10869
- DepositExecutionItem,
10870
- {
10871
- execution,
10872
- onClick: () => handleExecutionClick(execution)
10873
- },
10874
- execution.id
10875
- )) }) }) })
10876
- ] }) }),
10892
+ return /* @__PURE__ */ jsx72(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsx72(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: selectedExecution ? /* @__PURE__ */ jsxs5(Fragment8, { children: [
10877
10893
  /* @__PURE__ */ jsx72(
10878
- DepositDetailModal,
10894
+ DepositHeader,
10879
10895
  {
10880
- open: detailModalOpen,
10881
- onOpenChange: setDetailModalOpen,
10882
- execution: selectedExecution,
10883
- themeClass
10896
+ title: "Deposit Details",
10897
+ showBack: true,
10898
+ onBack: () => setSelectedExecution(null),
10899
+ onClose: handleClose
10884
10900
  }
10885
- )
10886
- ] });
10901
+ ),
10902
+ /* @__PURE__ */ jsx72(DepositDetailContent, { execution: selectedExecution })
10903
+ ] }) : /* @__PURE__ */ jsxs5(Fragment8, { children: [
10904
+ /* @__PURE__ */ jsx72(
10905
+ DepositHeader,
10906
+ {
10907
+ title: "Deposit Tracker",
10908
+ showBack: true,
10909
+ onBack: handleBack,
10910
+ onClose: handleClose
10911
+ }
10912
+ ),
10913
+ /* @__PURE__ */ jsx72("div", { className: "uf-max-h-[400px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsx72("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx72("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx72("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ jsx72(Fragment8, { children: allExecutions.map((execution) => /* @__PURE__ */ jsx72(
10914
+ DepositExecutionItem,
10915
+ {
10916
+ execution,
10917
+ onClick: () => handleExecutionClick(execution)
10918
+ },
10919
+ execution.id
10920
+ )) }) }) })
10921
+ ] }) }) });
10887
10922
  }
10888
10923
  function DepositSuccessToast({
10889
10924
  depositTx,
@@ -10891,9 +10926,12 @@ function DepositSuccessToast({
10891
10926
  status,
10892
10927
  tokenIconUrl,
10893
10928
  sourceAmountBaseUnit = "0",
10894
- onClose
10929
+ onClose,
10930
+ execution
10895
10931
  }) {
10896
- const isPending = status === "pending" || status === "waiting" || status === "delayed";
10932
+ const [detailModalOpen, setDetailModalOpen] = useState32(false);
10933
+ const { themeClass } = useTheme();
10934
+ const isPending = status === ExecutionStatus.PENDING || status === ExecutionStatus.WAITING || status === ExecutionStatus.DELAYED;
10897
10935
  const formatDateTime = (timestamp) => {
10898
10936
  try {
10899
10937
  const date = new Date(timestamp);
@@ -10925,61 +10963,124 @@ function DepositSuccessToast({
10925
10963
  return "$0.00";
10926
10964
  }
10927
10965
  };
10928
- return /* @__PURE__ */ jsx82("div", { className: "uf-w-full uf-animate-in uf-slide-in-from-bottom-2 uf-duration-300", children: /* @__PURE__ */ jsxs6("div", { className: "uf-bg-card uf-border uf-border-border uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-gap-3", children: [
10929
- /* @__PURE__ */ jsxs6("div", { className: "uf-relative uf-flex-shrink-0", children: [
10930
- /* @__PURE__ */ jsx82(
10931
- "img",
10932
- {
10933
- src: tokenIconUrl || getIconUrl("/icons/tokens/usdc.svg"),
10934
- alt: "Token",
10935
- width: 36,
10936
- height: 36,
10937
- className: "uf-rounded-full"
10938
- }
10939
- ),
10940
- isPending ? /* @__PURE__ */ jsx82("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-yellow-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx82(
10966
+ return /* @__PURE__ */ jsxs6(Fragment23, { children: [
10967
+ isPending && /* @__PURE__ */ jsx82("style", { children: `
10968
+ @keyframes border-travel {
10969
+ from { stroke-dashoffset: 0; }
10970
+ to { stroke-dashoffset: -1000; }
10971
+ }
10972
+ ` }),
10973
+ /* @__PURE__ */ jsx82("div", { className: "uf-w-full uf-animate-in uf-slide-in-from-bottom-2 uf-duration-300", children: /* @__PURE__ */ jsxs6("div", { className: "uf-relative uf-rounded-xl", children: [
10974
+ isPending && /* @__PURE__ */ jsx82(
10941
10975
  "svg",
10942
10976
  {
10943
- width: "10",
10944
- height: "10",
10945
- viewBox: "0 0 12 12",
10946
- fill: "none",
10947
- className: "uf-animate-spin",
10977
+ className: "uf-absolute uf-inset-0 uf-w-full uf-h-full uf-pointer-events-none uf-z-[1]",
10978
+ style: { overflow: "visible" },
10948
10979
  children: /* @__PURE__ */ jsx82(
10949
- "path",
10980
+ "rect",
10950
10981
  {
10951
- d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
10952
- stroke: "white",
10953
- strokeWidth: "2",
10954
- strokeLinecap: "round"
10982
+ x: "5",
10983
+ y: "2",
10984
+ rx: "10",
10985
+ ry: "10",
10986
+ fill: "none",
10987
+ stroke: "#ecc94b",
10988
+ strokeWidth: "3",
10989
+ strokeDasharray: "120 880",
10990
+ strokeLinecap: "round",
10991
+ pathLength: "1000",
10992
+ style: {
10993
+ width: "calc(100% - 10px)",
10994
+ height: "calc(100% - 4px)",
10995
+ animation: "border-travel 2.5s linear infinite"
10996
+ }
10955
10997
  }
10956
10998
  )
10957
10999
  }
10958
- ) }) : /* @__PURE__ */ jsx82("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx82("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx82(
10959
- "path",
11000
+ ),
11001
+ /* @__PURE__ */ jsxs6(
11002
+ "div",
10960
11003
  {
10961
- d: "M10 3L4.5 8.5L2 6",
10962
- stroke: "white",
10963
- strokeWidth: "2",
10964
- strokeLinecap: "round",
10965
- strokeLinejoin: "round"
11004
+ onClick: () => execution && setDetailModalOpen(true),
11005
+ className: `uf-relative uf-bg-white dark:uf-bg-black hover:uf-opacity-90 uf-rounded-xl uf-p-3 uf-mx-1 uf-flex uf-items-center uf-gap-3 uf-transition-all uf-cursor-pointer ${isPending ? "" : "uf-border uf-border-zinc-300 dark:uf-border-zinc-700"}`,
11006
+ children: [
11007
+ /* @__PURE__ */ jsxs6("div", { className: "uf-relative uf-flex-shrink-0", children: [
11008
+ /* @__PURE__ */ jsx82(
11009
+ "img",
11010
+ {
11011
+ src: tokenIconUrl || getIconUrl("/icons/tokens/svg/usdc.svg"),
11012
+ alt: "Token",
11013
+ width: 36,
11014
+ height: 36,
11015
+ className: "uf-rounded-full"
11016
+ }
11017
+ ),
11018
+ isPending ? /* @__PURE__ */ jsx82("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-yellow-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx82(
11019
+ "svg",
11020
+ {
11021
+ width: "10",
11022
+ height: "10",
11023
+ viewBox: "0 0 24 24",
11024
+ fill: "none",
11025
+ className: "uf-animate-spin",
11026
+ children: /* @__PURE__ */ jsx82(
11027
+ "path",
11028
+ {
11029
+ d: "M21 12a9 9 0 1 1-6.22-8.56",
11030
+ stroke: "white",
11031
+ strokeWidth: "3",
11032
+ strokeLinecap: "round"
11033
+ }
11034
+ )
11035
+ }
11036
+ ) }) : /* @__PURE__ */ jsx82("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx82("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx82(
11037
+ "path",
11038
+ {
11039
+ d: "M10 3L4.5 8.5L2 6",
11040
+ stroke: "white",
11041
+ strokeWidth: "2",
11042
+ strokeLinecap: "round",
11043
+ strokeLinejoin: "round"
11044
+ }
11045
+ ) }) })
11046
+ ] }),
11047
+ /* @__PURE__ */ jsxs6("div", { className: "uf-flex-1 uf-min-w-0", children: [
11048
+ /* @__PURE__ */ jsx82("h3", { className: "uf-text-black dark:uf-text-white uf-font-medium uf-text-sm", children: isPending ? "Deposit processing" : "Deposit completed" }),
11049
+ /* @__PURE__ */ jsx82("p", { className: "uf-text-zinc-600 dark:uf-text-zinc-400 uf-text-xs", children: formatDateTime(orderSubmittedAt) })
11050
+ ] }),
11051
+ /* @__PURE__ */ jsx82("div", { className: "uf-text-black dark:uf-text-white uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(sourceAmountBaseUnit) }),
11052
+ /* @__PURE__ */ jsx82(
11053
+ "button",
11054
+ {
11055
+ onClick: (e) => {
11056
+ e.stopPropagation();
11057
+ onClose();
11058
+ },
11059
+ className: "uf-text-zinc-600 dark:uf-text-zinc-400 hover:uf-text-black dark:hover:uf-text-white uf-transition-colors uf-p-0.5 uf-flex-shrink-0",
11060
+ children: /* @__PURE__ */ jsx82(X, { className: "uf-w-4 uf-h-4" })
11061
+ }
11062
+ )
11063
+ ]
10966
11064
  }
10967
- ) }) })
10968
- ] }),
10969
- /* @__PURE__ */ jsxs6("div", { className: "uf-flex-1 uf-min-w-0", children: [
10970
- /* @__PURE__ */ jsx82("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm", children: isPending ? "Deposit received" : "Deposit completed" }),
10971
- /* @__PURE__ */ jsx82("p", { className: "uf-text-muted-foreground uf-text-xs", children: formatDateTime(orderSubmittedAt) })
10972
- ] }),
10973
- /* @__PURE__ */ jsx82("div", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(sourceAmountBaseUnit) }),
10974
- /* @__PURE__ */ jsx82(
10975
- "button",
10976
- {
10977
- onClick: onClose,
10978
- className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-p-0.5 uf-flex-shrink-0",
10979
- children: /* @__PURE__ */ jsx82(X, { className: "uf-w-4 uf-h-4" })
10980
- }
10981
- )
10982
- ] }) });
11065
+ )
11066
+ ] }) }),
11067
+ execution && /* @__PURE__ */ jsx82(Dialog2, { open: detailModalOpen, onOpenChange: setDetailModalOpen, children: /* @__PURE__ */ jsxs6(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-mt-8 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
11068
+ /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-justify-between uf-px-4", children: [
11069
+ /* @__PURE__ */ jsx82("div", { className: "uf-w-8" }),
11070
+ " ",
11071
+ /* @__PURE__ */ jsx82("h2", { className: "uf-text-lg uf-font-semibold uf-text-foreground", children: "Deposit Details" }),
11072
+ /* @__PURE__ */ jsx82(
11073
+ "button",
11074
+ {
11075
+ onClick: () => setDetailModalOpen(false),
11076
+ className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-w-8 uf-flex uf-justify-end",
11077
+ children: /* @__PURE__ */ jsx82(X, { className: "uf-w-5 uf-h-5" })
11078
+ }
11079
+ )
11080
+ ] }),
11081
+ /* @__PURE__ */ jsx82(DepositDetailContent, { execution })
11082
+ ] }) })
11083
+ ] });
10983
11084
  }
10984
11085
  var Select2 = Root23;
10985
11086
  var SelectValue2 = Value;
@@ -11091,51 +11192,12 @@ var SelectSeparator2 = React38.forwardRef(({ className, ...props }, ref) => /* @
11091
11192
  }
11092
11193
  ));
11093
11194
  SelectSeparator2.displayName = Separator.displayName;
11094
- var buttonVariants = cva(
11095
- "uf-inline-flex uf-items-center uf-justify-center uf-whitespace-nowrap uf-rounded-md uf-text-sm uf-font-medium uf-ring-offset-background uf-transition-colors focus-visible:uf-outline-none focus-visible:uf-ring-2 focus-visible:uf-ring-ring focus-visible:uf-ring-offset-2 disabled:uf-pointer-events-none disabled:uf-opacity-50",
11096
- {
11097
- variants: {
11098
- variant: {
11099
- default: "uf-bg-primary uf-text-primary-foreground hover:uf-bg-primary/90",
11100
- destructive: "uf-bg-destructive uf-text-destructive-foreground hover:uf-bg-destructive/90",
11101
- outline: "uf-border uf-border-input uf-bg-background hover:uf-bg-accent hover:uf-text-accent-foreground",
11102
- secondary: "uf-bg-secondary uf-text-secondary-foreground hover:uf-bg-secondary/80",
11103
- ghost: "hover:uf-bg-accent hover:uf-text-accent-foreground",
11104
- link: "uf-text-primary uf-underline-offset-4 hover:uf-underline"
11105
- },
11106
- size: {
11107
- default: "uf-h-10 uf-px-4 uf-py-2",
11108
- sm: "uf-h-9 uf-rounded-md uf-px-3",
11109
- lg: "uf-h-11 uf-rounded-md uf-px-8",
11110
- icon: "uf-h-10 uf-w-10"
11111
- }
11112
- },
11113
- defaultVariants: {
11114
- variant: "default",
11115
- size: "default"
11116
- }
11117
- }
11118
- );
11119
- var Button = React42.forwardRef(
11120
- ({ className, variant, size: size4, asChild = false, ...props }, ref) => {
11121
- const Comp = asChild ? Slot3 : "button";
11122
- return /* @__PURE__ */ jsx102(
11123
- Comp,
11124
- {
11125
- className: cn(buttonVariants({ variant, size: size4, className })),
11126
- ref,
11127
- ...props
11128
- }
11129
- );
11130
- }
11131
- );
11132
- Button.displayName = "Button";
11133
11195
  var TooltipProvider2 = Provider;
11134
11196
  var Tooltip2 = Root32;
11135
11197
  var TooltipTrigger2 = Trigger2;
11136
- var TooltipContent2 = React52.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
11198
+ var TooltipContent2 = React42.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
11137
11199
  const { themeClass } = useTheme();
11138
- return /* @__PURE__ */ jsx112(Portal4, { children: /* @__PURE__ */ jsx112(
11200
+ return /* @__PURE__ */ jsx102(Portal4, { children: /* @__PURE__ */ jsx102(
11139
11201
  Content23,
11140
11202
  {
11141
11203
  ref,
@@ -11214,8 +11276,8 @@ var en_default = {
11214
11276
  }
11215
11277
  }
11216
11278
  };
11217
- var i18n = en_default;
11218
- var t = i18n.transferCrypto;
11279
+ var i18n2 = en_default;
11280
+ var t = i18n2.transferCrypto;
11219
11281
  var getChainKey = (chainId, chainType) => {
11220
11282
  return `${chainType}:${chainId}`;
11221
11283
  };
@@ -11230,7 +11292,6 @@ function TransferCryptoBase({
11230
11292
  destinationChainType,
11231
11293
  destinationChainId,
11232
11294
  destinationTokenAddress,
11233
- copyButtonMode = "compact",
11234
11295
  layoutVariant = "horizontal",
11235
11296
  showDetailedDropdowns = false,
11236
11297
  onExecutionsChange,
@@ -11240,20 +11301,20 @@ function TransferCryptoBase({
11240
11301
  }) {
11241
11302
  const { themeClass } = useTheme();
11242
11303
  const isDarkMode = themeClass.includes("uf-dark");
11243
- const [token, setToken] = useState22("USDC");
11244
- const [chain, setChain] = useState22("solana:mainnet");
11245
- const [copied, setCopied] = useState22(false);
11246
- const [internalWallets, setInternalWallets] = useState22([]);
11247
- const [loading, setLoading] = useState22(!externalWallets?.length);
11304
+ const [token, setToken] = useState42("USDC");
11305
+ const [chain, setChain] = useState42("solana:mainnet");
11306
+ const [copied, setCopied] = useState42(false);
11307
+ const [internalWallets, setInternalWallets] = useState42([]);
11308
+ const [loading, setLoading] = useState42(!externalWallets?.length);
11248
11309
  const wallets = externalWallets?.length ? externalWallets : internalWallets;
11249
- const [error, setError] = useState22(null);
11250
- const [depositExecutions, setDepositExecutions] = useState22([]);
11251
- const [trackedExecutions, setTrackedExecutions] = useState22(/* @__PURE__ */ new Map());
11252
- const [modalOpenedAt, setModalOpenedAt] = useState22(null);
11253
- const [supportedTokens, setSupportedTokens] = useState22([]);
11254
- const [tokensLoading, setTokensLoading] = useState22(true);
11255
- const [detailsExpanded, setDetailsExpanded] = useState22(false);
11256
- const [depositsModalOpen, setDepositsModalOpen] = useState22(false);
11310
+ const [error, setError] = useState42(null);
11311
+ const [depositExecutions, setDepositExecutions] = useState42([]);
11312
+ const [trackedExecutions, setTrackedExecutions] = useState42(/* @__PURE__ */ new Map());
11313
+ const [modalOpenedAt, setModalOpenedAt] = useState42(null);
11314
+ const [supportedTokens, setSupportedTokens] = useState42([]);
11315
+ const [tokensLoading, setTokensLoading] = useState42(true);
11316
+ const [detailsExpanded, setDetailsExpanded] = useState42(false);
11317
+ const [depositsModalOpen, setDepositsModalOpen] = useState42(false);
11257
11318
  const allChainsMap = /* @__PURE__ */ new Map();
11258
11319
  supportedTokens.forEach((t4) => {
11259
11320
  t4.chains.forEach((c) => {
@@ -11271,10 +11332,10 @@ function TransferCryptoBase({
11271
11332
  const currentChainType = currentChainData?.chain_type || "ethereum";
11272
11333
  const currentWallet = getWalletByChainType(wallets, currentChainType);
11273
11334
  const depositAddress = currentWallet?.address || "";
11274
- useEffect32(() => {
11335
+ useEffect42(() => {
11275
11336
  setModalOpenedAt(/* @__PURE__ */ new Date());
11276
11337
  }, []);
11277
- useEffect32(() => {
11338
+ useEffect42(() => {
11278
11339
  async function fetchSupportedTokens() {
11279
11340
  try {
11280
11341
  setTokensLoading(true);
@@ -11303,12 +11364,12 @@ function TransferCryptoBase({
11303
11364
  }
11304
11365
  fetchSupportedTokens();
11305
11366
  }, [publishableKey, chain]);
11306
- useEffect32(() => {
11367
+ useEffect42(() => {
11307
11368
  if (onExecutionsChange) {
11308
11369
  onExecutionsChange(depositExecutions);
11309
11370
  }
11310
11371
  }, [depositExecutions, onExecutionsChange]);
11311
- useEffect32(() => {
11372
+ useEffect42(() => {
11312
11373
  if (externalWallets?.length) {
11313
11374
  setLoading(false);
11314
11375
  return;
@@ -11319,9 +11380,9 @@ function TransferCryptoBase({
11319
11380
  if (isCancelled) return;
11320
11381
  setLoading(true);
11321
11382
  try {
11322
- const response = await createEOA(
11383
+ const response = await createDepositAddress(
11323
11384
  {
11324
- user_id: userId,
11385
+ external_user_id: userId,
11325
11386
  recipient_address: recipientAddress,
11326
11387
  destination_chain_type: destinationChainType,
11327
11388
  destination_chain_id: destinationChainId,
@@ -11359,7 +11420,7 @@ function TransferCryptoBase({
11359
11420
  publishableKey,
11360
11421
  externalWallets
11361
11422
  ]);
11362
- useEffect32(() => {
11423
+ useEffect42(() => {
11363
11424
  if (!supportedTokens.length) return;
11364
11425
  const currentToken = supportedTokens.find((t4) => t4.symbol === token);
11365
11426
  if (!currentToken || currentToken.chains.length === 0) return;
@@ -11373,7 +11434,7 @@ function TransferCryptoBase({
11373
11434
  setChain(newChain);
11374
11435
  }
11375
11436
  }, [token, supportedTokens, chain]);
11376
- useEffect32(() => {
11437
+ useEffect42(() => {
11377
11438
  if (!userId || !modalOpenedAt) return;
11378
11439
  const pollInterval = setInterval(async () => {
11379
11440
  try {
@@ -11390,12 +11451,11 @@ function TransferCryptoBase({
11390
11451
  break;
11391
11452
  }
11392
11453
  const inProgressStatuses = [
11393
- "pending",
11394
- "waiting",
11395
- "delayed"
11396
- /* DELAYED */
11454
+ ExecutionStatus.PENDING,
11455
+ ExecutionStatus.WAITING,
11456
+ ExecutionStatus.DELAYED
11397
11457
  ];
11398
- if (inProgressStatuses.includes(trackedStatus) && execution.status === "succeeded") {
11458
+ if (inProgressStatuses.includes(trackedStatus) && execution.status === ExecutionStatus.SUCCEEDED) {
11399
11459
  executionToShow = execution;
11400
11460
  break;
11401
11461
  }
@@ -11418,7 +11478,7 @@ function TransferCryptoBase({
11418
11478
  return updated;
11419
11479
  });
11420
11480
  if (onDepositSuccess) {
11421
- const isCompleted = execution.status === "succeeded";
11481
+ const isCompleted = execution.status === ExecutionStatus.SUCCEEDED;
11422
11482
  if (isCompleted) {
11423
11483
  onDepositSuccess({
11424
11484
  message: "Deposit completed successfully",
@@ -11482,7 +11542,7 @@ function TransferCryptoBase({
11482
11542
  const minDepositUsd = currentChainFromBackend?.minimum_deposit_amount_usd ?? 3;
11483
11543
  const renderTokenItem = (tokenData) => {
11484
11544
  return /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11485
- /* @__PURE__ */ jsx122(
11545
+ /* @__PURE__ */ jsx112(
11486
11546
  "img",
11487
11547
  {
11488
11548
  src: tokenData.icon_url,
@@ -11492,13 +11552,13 @@ function TransferCryptoBase({
11492
11552
  className: "uf-rounded-full uf-flex-shrink-0"
11493
11553
  }
11494
11554
  ),
11495
- /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol }),
11496
- showDetailedDropdowns && /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-text-muted-foreground", children: tokenData.name })
11555
+ /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol }),
11556
+ showDetailedDropdowns && /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-text-muted-foreground", children: tokenData.name })
11497
11557
  ] });
11498
11558
  };
11499
11559
  const renderChainItem = (chainData) => {
11500
11560
  return /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11501
- /* @__PURE__ */ jsx122(
11561
+ /* @__PURE__ */ jsx112(
11502
11562
  "img",
11503
11563
  {
11504
11564
  src: chainData.icon_url,
@@ -11508,15 +11568,15 @@ function TransferCryptoBase({
11508
11568
  className: "uf-rounded-full uf-flex-shrink-0"
11509
11569
  }
11510
11570
  ),
11511
- /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name }),
11512
- showDetailedDropdowns && /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-text-muted-foreground uf-capitalize", children: chainData.chain_type })
11571
+ /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name }),
11572
+ showDetailedDropdowns && /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-text-muted-foreground uf-capitalize", children: chainData.chain_type })
11513
11573
  ] });
11514
11574
  };
11515
11575
  const selectContainerClass = layoutVariant === "horizontal" ? "uf-grid uf-grid-cols-2 uf-gap-2.5" : "uf-space-y-3";
11516
- return /* @__PURE__ */ jsx122(TooltipProvider2, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs8("div", { className: "uf-space-y-3", children: [
11576
+ return /* @__PURE__ */ jsx112(TooltipProvider2, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs8("div", { className: "uf-space-y-3", children: [
11517
11577
  /* @__PURE__ */ jsxs8("div", { className: selectContainerClass, children: [
11518
11578
  /* @__PURE__ */ jsxs8("div", { children: [
11519
- /* @__PURE__ */ jsx122("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t.supportedToken }),
11579
+ /* @__PURE__ */ jsx112("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t.supportedToken }),
11520
11580
  /* @__PURE__ */ jsxs8(
11521
11581
  Select2,
11522
11582
  {
@@ -11524,8 +11584,8 @@ function TransferCryptoBase({
11524
11584
  onValueChange: setToken,
11525
11585
  disabled: tokensLoading || supportedTokens.length === 0,
11526
11586
  children: [
11527
- /* @__PURE__ */ jsx122(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx122(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
11528
- /* @__PURE__ */ jsx122(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ jsx122(
11587
+ /* @__PURE__ */ jsx112(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx112(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
11588
+ /* @__PURE__ */ jsx112(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ jsx112(
11529
11589
  SelectItem2,
11530
11590
  {
11531
11591
  value: tokenData.symbol,
@@ -11548,23 +11608,23 @@ function TransferCryptoBase({
11548
11608
  t.minDeposit.label
11549
11609
  ] }),
11550
11610
  /* @__PURE__ */ jsxs8(Tooltip2, { children: [
11551
- /* @__PURE__ */ jsx122(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx122(
11611
+ /* @__PURE__ */ jsx112(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx112(
11552
11612
  "span",
11553
11613
  {
11554
11614
  className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
11555
11615
  tabIndex: 0,
11556
11616
  role: "button",
11557
11617
  "aria-label": "Minimum deposit information",
11558
- children: /* @__PURE__ */ jsx122(Info, { className: "uf-w-3 uf-h-3" })
11618
+ children: /* @__PURE__ */ jsx112(Info, { className: "uf-w-3 uf-h-3" })
11559
11619
  }
11560
11620
  ) }),
11561
- /* @__PURE__ */ jsx122(
11621
+ /* @__PURE__ */ jsx112(
11562
11622
  TooltipContent2,
11563
11623
  {
11564
11624
  side: "left",
11565
11625
  align: "center",
11566
11626
  className: "uf-max-w-[200px]",
11567
- children: /* @__PURE__ */ jsx122("p", { children: t.minDeposit.tooltip })
11627
+ children: /* @__PURE__ */ jsx112("p", { children: t.minDeposit.tooltip })
11568
11628
  }
11569
11629
  )
11570
11630
  ] })
@@ -11576,13 +11636,13 @@ function TransferCryptoBase({
11576
11636
  onValueChange: setChain,
11577
11637
  disabled: tokensLoading || availableChainsForToken.length === 0,
11578
11638
  children: [
11579
- /* @__PURE__ */ jsx122(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx122(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
11580
- /* @__PURE__ */ jsx122(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx122("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
11639
+ /* @__PURE__ */ jsx112(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx112(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
11640
+ /* @__PURE__ */ jsx112(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx112("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
11581
11641
  const chainKey = getChainKey(
11582
11642
  chainData.chain_id,
11583
11643
  chainData.chain_type
11584
11644
  );
11585
- return /* @__PURE__ */ jsx122(
11645
+ return /* @__PURE__ */ jsx112(
11586
11646
  SelectItem2,
11587
11647
  {
11588
11648
  value: chainKey,
@@ -11597,14 +11657,14 @@ function TransferCryptoBase({
11597
11657
  )
11598
11658
  ] })
11599
11659
  ] }),
11600
- /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ jsx122("div", { className: "uf-bg-card uf-p-4 uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx122(
11660
+ /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ jsx112("div", { className: "uf-bg-card uf-p-4 uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx112(
11601
11661
  "div",
11602
11662
  {
11603
11663
  className: "uf-flex uf-items-center uf-justify-center",
11604
11664
  style: { width: 180, height: 180 },
11605
- children: /* @__PURE__ */ jsx122("div", { className: "uf-text-foreground uf-text-sm", children: t.loadingQRCode })
11665
+ children: /* @__PURE__ */ jsx112("div", { className: "uf-text-foreground uf-text-sm", children: t.loadingQRCode })
11606
11666
  }
11607
- ) : depositAddress ? /* @__PURE__ */ jsx122(
11667
+ ) : depositAddress ? /* @__PURE__ */ jsx112(
11608
11668
  StyledQRCode,
11609
11669
  {
11610
11670
  value: depositAddress,
@@ -11614,12 +11674,12 @@ function TransferCryptoBase({
11614
11674
  darkMode: isDarkMode
11615
11675
  },
11616
11676
  `qr-${depositAddress}-${chain}`
11617
- ) : /* @__PURE__ */ jsx122(
11677
+ ) : /* @__PURE__ */ jsx112(
11618
11678
  "div",
11619
11679
  {
11620
11680
  className: "uf-flex uf-items-center uf-justify-center",
11621
11681
  style: { width: 180, height: 180 },
11622
- children: /* @__PURE__ */ jsx122("div", { className: "uf-text-red-400 uf-text-sm", children: t.noAddressAvailable })
11682
+ children: /* @__PURE__ */ jsx112("div", { className: "uf-text-red-400 uf-text-sm", children: t.noAddressAvailable })
11623
11683
  }
11624
11684
  ) }) }),
11625
11685
  /* @__PURE__ */ jsxs8("div", { children: [
@@ -11627,61 +11687,43 @@ function TransferCryptoBase({
11627
11687
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-1", children: [
11628
11688
  t.depositAddress.label,
11629
11689
  /* @__PURE__ */ jsxs8(Tooltip2, { children: [
11630
- /* @__PURE__ */ jsx122(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx122(
11690
+ /* @__PURE__ */ jsx112(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx112(
11631
11691
  "span",
11632
11692
  {
11633
11693
  className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
11634
11694
  tabIndex: 0,
11635
11695
  role: "button",
11636
11696
  "aria-label": "Deposit address information",
11637
- children: /* @__PURE__ */ jsx122(Info, { className: "uf-w-3 uf-h-3" })
11697
+ children: /* @__PURE__ */ jsx112(Info, { className: "uf-w-3 uf-h-3" })
11638
11698
  }
11639
11699
  ) }),
11640
- /* @__PURE__ */ jsx122(
11700
+ /* @__PURE__ */ jsx112(
11641
11701
  TooltipContent2,
11642
11702
  {
11643
11703
  side: "top",
11644
11704
  align: "center",
11645
11705
  className: "uf-max-w-[240px]",
11646
- children: /* @__PURE__ */ jsx122("p", { children: t.depositAddress.tooltip.replace("{{token}}", token) })
11706
+ children: /* @__PURE__ */ jsx112("p", { children: t.depositAddress.tooltip.replace("{{token}}", token) })
11647
11707
  }
11648
11708
  )
11649
11709
  ] })
11650
11710
  ] }),
11651
- copyButtonMode === "compact" && /* @__PURE__ */ jsx122(
11652
- "button",
11653
- {
11654
- onClick: handleCopyAddress,
11655
- disabled: loading || !depositAddress,
11656
- className: "uf-flex uf-items-center uf-gap-1 uf-text-xs uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
11657
- children: copied ? /* @__PURE__ */ jsxs8(Fragment23, { children: [
11658
- /* @__PURE__ */ jsx122(Check, { className: "uf-w-3 uf-h-3" }),
11659
- /* @__PURE__ */ jsx122("span", { children: t.copied })
11660
- ] }) : /* @__PURE__ */ jsxs8(Fragment23, { children: [
11661
- /* @__PURE__ */ jsx122(Copy, { className: "uf-w-3 uf-h-3" }),
11662
- /* @__PURE__ */ jsx122("span", { children: t.copyAddress })
11663
- ] })
11664
- }
11665
- )
11666
- ] }),
11667
- loading ? /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t.loading }) : error ? /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-font-mono uf-break-all", children: depositAddress || t.noAddressAvailable })
11668
- ] }),
11669
- copyButtonMode === "fullWidth" && /* @__PURE__ */ jsx122(
11670
- Button,
11671
- {
11672
- onClick: handleCopyAddress,
11673
- disabled: loading || !depositAddress,
11674
- className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-text-foreground uf-rounded-lg uf-h-9 uf-text-sm uf-font-medium disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
11675
- children: copied ? /* @__PURE__ */ jsxs8(Fragment23, { children: [
11676
- /* @__PURE__ */ jsx122(Check, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
11711
+ /* @__PURE__ */ jsxs8("span", { className: `uf-flex uf-items-center uf-gap-1 uf-text-green-500 uf-transition-opacity uf-duration-200 ${copied ? "uf-opacity-100" : "uf-opacity-0"}`, children: [
11712
+ /* @__PURE__ */ jsx112(Check, { className: "uf-w-3 uf-h-3" }),
11677
11713
  t.copied
11678
- ] }) : /* @__PURE__ */ jsxs8(Fragment23, { children: [
11679
- /* @__PURE__ */ jsx122(Copy, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
11680
- t.copyAddress
11681
11714
  ] })
11682
- }
11683
- ),
11684
- /* @__PURE__ */ jsxs8("div", { className: "uf-border-t uf-border-border", children: [
11715
+ ] }),
11716
+ loading ? /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t.loading }) : error ? /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsx112(
11717
+ "button",
11718
+ {
11719
+ onClick: handleCopyAddress,
11720
+ disabled: !depositAddress,
11721
+ className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-font-mono uf-break-all uf-text-left uf-transition-colors uf-cursor-pointer disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
11722
+ children: depositAddress || t.noAddressAvailable
11723
+ }
11724
+ )
11725
+ ] }),
11726
+ /* @__PURE__ */ jsxs8("div", { className: "uf-bg-secondary uf-rounded-xl uf-px-3", children: [
11685
11727
  /* @__PURE__ */ jsxs8(
11686
11728
  "button",
11687
11729
  {
@@ -11689,7 +11731,7 @@ function TransferCryptoBase({
11689
11731
  className: "uf-w-full uf-flex uf-items-center uf-justify-between uf-py-2.5",
11690
11732
  children: [
11691
11733
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11692
- /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx122(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
11734
+ /* @__PURE__ */ jsx112("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx112(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
11693
11735
  /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
11694
11736
  t.priceImpact.label,
11695
11737
  ":",
@@ -11700,7 +11742,7 @@ function TransferCryptoBase({
11700
11742
  ] })
11701
11743
  ] }),
11702
11744
  /* @__PURE__ */ jsxs8(Tooltip2, { children: [
11703
- /* @__PURE__ */ jsx122(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx122(
11745
+ /* @__PURE__ */ jsx112(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx112(
11704
11746
  "span",
11705
11747
  {
11706
11748
  className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
@@ -11713,27 +11755,27 @@ function TransferCryptoBase({
11713
11755
  tabIndex: 0,
11714
11756
  role: "button",
11715
11757
  "aria-label": "Price impact information",
11716
- children: /* @__PURE__ */ jsx122(Info, { className: "uf-w-3 uf-h-3" })
11758
+ children: /* @__PURE__ */ jsx112(Info, { className: "uf-w-3 uf-h-3" })
11717
11759
  }
11718
11760
  ) }),
11719
- /* @__PURE__ */ jsx122(
11761
+ /* @__PURE__ */ jsx112(
11720
11762
  TooltipContent2,
11721
11763
  {
11722
11764
  side: "top",
11723
11765
  align: "center",
11724
11766
  className: "uf-max-w-[240px]",
11725
- children: /* @__PURE__ */ jsx122("p", { children: t.priceImpact.tooltip })
11767
+ children: /* @__PURE__ */ jsx112("p", { children: t.priceImpact.tooltip })
11726
11768
  }
11727
11769
  )
11728
11770
  ] })
11729
11771
  ] }),
11730
- detailsExpanded ? /* @__PURE__ */ jsx122(ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx122(ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
11772
+ detailsExpanded ? /* @__PURE__ */ jsx112(ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx112(ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
11731
11773
  ]
11732
11774
  }
11733
11775
  ),
11734
11776
  detailsExpanded && /* @__PURE__ */ jsxs8("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
11735
11777
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11736
- /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx122(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
11778
+ /* @__PURE__ */ jsx112("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx112(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
11737
11779
  /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
11738
11780
  t.slippage.label,
11739
11781
  ":",
@@ -11746,42 +11788,42 @@ function TransferCryptoBase({
11746
11788
  ] })
11747
11789
  ] }),
11748
11790
  /* @__PURE__ */ jsxs8(Tooltip2, { children: [
11749
- /* @__PURE__ */ jsx122(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx122(
11791
+ /* @__PURE__ */ jsx112(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx112(
11750
11792
  "span",
11751
11793
  {
11752
11794
  className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
11753
11795
  tabIndex: 0,
11754
11796
  role: "button",
11755
11797
  "aria-label": "Slippage information",
11756
- children: /* @__PURE__ */ jsx122(Info, { className: "uf-w-3 uf-h-3" })
11798
+ children: /* @__PURE__ */ jsx112(Info, { className: "uf-w-3 uf-h-3" })
11757
11799
  }
11758
11800
  ) }),
11759
- /* @__PURE__ */ jsx122(
11801
+ /* @__PURE__ */ jsx112(
11760
11802
  TooltipContent2,
11761
11803
  {
11762
11804
  side: "top",
11763
11805
  align: "center",
11764
11806
  className: "uf-max-w-[240px]",
11765
- children: /* @__PURE__ */ jsx122("p", { children: t.slippage.tooltip })
11807
+ children: /* @__PURE__ */ jsx112("p", { children: t.slippage.tooltip })
11766
11808
  }
11767
11809
  )
11768
11810
  ] })
11769
11811
  ] }),
11770
11812
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11771
- /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx122(Clock, { className: "uf-w-3 uf-h-3" }) }),
11813
+ /* @__PURE__ */ jsx112("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx112(Clock, { className: "uf-w-3 uf-h-3" }) }),
11772
11814
  /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
11773
11815
  t.processingTime.label,
11774
11816
  ":",
11775
11817
  " ",
11776
- /* @__PURE__ */ jsx122("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
11818
+ /* @__PURE__ */ jsx112("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
11777
11819
  ] })
11778
11820
  ] }),
11779
11821
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11780
- /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx122(FileText, { className: "uf-w-3 uf-h-3" }) }),
11822
+ /* @__PURE__ */ jsx112("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx112(FileText, { className: "uf-w-3 uf-h-3" }) }),
11781
11823
  /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
11782
11824
  t.help.needHelp,
11783
11825
  " ",
11784
- /* @__PURE__ */ jsx122(
11826
+ /* @__PURE__ */ jsx112(
11785
11827
  "a",
11786
11828
  {
11787
11829
  href: "#",
@@ -11791,34 +11833,34 @@ function TransferCryptoBase({
11791
11833
  )
11792
11834
  ] })
11793
11835
  ] })
11794
- ] }),
11795
- /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-pt-2", children: [
11796
- /* @__PURE__ */ jsx122(
11797
- "a",
11798
- {
11799
- href: "https://unifold.io/terms",
11800
- className: "uf-text-muted-foreground uf-underline hover:uf-text-foreground uf-transition-colors",
11801
- target: "_blank",
11802
- children: t.terms.termsApply
11803
- }
11804
- ),
11805
- depositExecutions.length > 1 && /* @__PURE__ */ jsxs8(
11806
- "button",
11807
- {
11808
- onClick: () => setDepositsModalOpen(true),
11809
- className: "uf-flex uf-items-center uf-gap-1 uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-animate-in uf-fade-in uf-slide-in-from-right-8 uf-duration-1000",
11810
- children: [
11811
- /* @__PURE__ */ jsx122(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
11812
- "Track deposits (",
11813
- depositExecutions.length,
11814
- ")",
11815
- /* @__PURE__ */ jsx122(ChevronRight, { className: "uf-w-3 uf-h-3" })
11816
- ]
11817
- }
11818
- )
11819
11836
  ] })
11820
11837
  ] }),
11821
- depositExecutions.length === 1 && /* @__PURE__ */ jsx122("div", { className: "uf-fixed uf-bottom-4 uf-left-1/2 uf--translate-x-1/2 uf-w-[360px] uf-max-w-[calc(100vw-2rem)] uf-z-[100]", children: /* @__PURE__ */ jsx122(
11838
+ /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-pt-2", children: [
11839
+ /* @__PURE__ */ jsx112(
11840
+ "a",
11841
+ {
11842
+ href: "https://unifold.io/terms",
11843
+ className: "uf-text-muted-foreground uf-underline hover:uf-text-foreground uf-transition-colors",
11844
+ target: "_blank",
11845
+ children: t.terms.termsApply
11846
+ }
11847
+ ),
11848
+ depositExecutions.length > 1 && /* @__PURE__ */ jsxs8(
11849
+ "button",
11850
+ {
11851
+ onClick: () => setDepositsModalOpen(true),
11852
+ className: "uf-flex uf-items-center uf-gap-1 uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-animate-in uf-fade-in uf-slide-in-from-right-8 uf-duration-1000",
11853
+ children: [
11854
+ /* @__PURE__ */ jsx112(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
11855
+ "Track deposits (",
11856
+ depositExecutions.length,
11857
+ ")",
11858
+ /* @__PURE__ */ jsx112(ChevronRight, { className: "uf-w-3 uf-h-3" })
11859
+ ]
11860
+ }
11861
+ )
11862
+ ] }),
11863
+ depositExecutions.length === 1 && /* @__PURE__ */ jsx112("div", { className: "uf-fixed uf-bottom-4 uf-left-1/2 uf--translate-x-1/2 uf-w-[360px] uf-max-w-[calc(100vw-2rem)] uf-z-[100]", children: /* @__PURE__ */ jsx112(
11822
11864
  DepositSuccessToast,
11823
11865
  {
11824
11866
  depositTx: depositExecutions[0].transaction_hash,
@@ -11826,13 +11868,14 @@ function TransferCryptoBase({
11826
11868
  orderFilledAt: depositExecutions[0].updated_at || (/* @__PURE__ */ new Date()).toISOString(),
11827
11869
  explorerUrl: depositExecutions[0].explorer_url,
11828
11870
  status: depositExecutions[0].status,
11829
- tokenIconUrl: depositExecutions[0].source_token_metadata?.icon_url,
11871
+ tokenIconUrl: depositExecutions[0].destination_token_metadata?.icon_url,
11830
11872
  sourceAmountBaseUnit: depositExecutions[0].source_amount_base_unit,
11831
- onClose: () => setDepositExecutions([])
11873
+ onClose: () => setDepositExecutions([]),
11874
+ execution: depositExecutions[0]
11832
11875
  },
11833
11876
  depositExecutions[0].id
11834
11877
  ) }),
11835
- /* @__PURE__ */ jsx122(
11878
+ /* @__PURE__ */ jsx112(
11836
11879
  DepositsModal,
11837
11880
  {
11838
11881
  open: depositsModalOpen,
@@ -11846,7 +11889,7 @@ function TransferCryptoBase({
11846
11889
  ] }) });
11847
11890
  }
11848
11891
  function TransferCrypto(props) {
11849
- return /* @__PURE__ */ jsx132(
11892
+ return /* @__PURE__ */ jsx122(
11850
11893
  TransferCryptoBase,
11851
11894
  {
11852
11895
  ...props,
@@ -11868,7 +11911,7 @@ function CurrencyListItem({
11868
11911
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
11869
11912
  children: [
11870
11913
  /* @__PURE__ */ jsxs9("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
11871
- /* @__PURE__ */ jsx142(
11914
+ /* @__PURE__ */ jsx132(
11872
11915
  "img",
11873
11916
  {
11874
11917
  src: iconUrl,
@@ -11877,11 +11920,11 @@ function CurrencyListItem({
11877
11920
  }
11878
11921
  ),
11879
11922
  /* @__PURE__ */ jsxs9("div", { className: "uf-text-left", children: [
11880
- /* @__PURE__ */ jsx142("div", { className: "uf-text-sm uf-font-normal uf-text-foreground", children: currency.name }),
11881
- /* @__PURE__ */ jsx142("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-light", children: currency.currency_code.toUpperCase() })
11923
+ /* @__PURE__ */ jsx132("div", { className: "uf-text-sm uf-font-normal uf-text-foreground", children: currency.name }),
11924
+ /* @__PURE__ */ jsx132("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-light", children: currency.currency_code.toUpperCase() })
11882
11925
  ] })
11883
11926
  ] }),
11884
- isSelected && /* @__PURE__ */ jsx142(Check, { className: "uf-w-4 uf-h-4 uf-text-foreground" })
11927
+ isSelected && /* @__PURE__ */ jsx132(Check, { className: "uf-w-4 uf-h-4 uf-text-foreground" })
11885
11928
  ]
11886
11929
  }
11887
11930
  );
@@ -11894,8 +11937,8 @@ function CurrencyListSection({
11894
11937
  }) {
11895
11938
  if (currencies.length === 0) return null;
11896
11939
  return /* @__PURE__ */ jsxs10(Fragment32, { children: [
11897
- /* @__PURE__ */ jsx152("div", { className: "uf-px-1 uf-pb-2", children: /* @__PURE__ */ jsx152("h3", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: title }) }),
11898
- currencies.map((currency) => /* @__PURE__ */ jsx152(
11940
+ /* @__PURE__ */ jsx142("div", { className: "uf-px-1 uf-pb-2", children: /* @__PURE__ */ jsx142("h3", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: title }) }),
11941
+ currencies.map((currency) => /* @__PURE__ */ jsx142(
11899
11942
  CurrencyListItem,
11900
11943
  {
11901
11944
  currency,
@@ -11915,7 +11958,7 @@ function CurrencyModal({
11915
11958
  onSelectCurrency,
11916
11959
  themeClass = ""
11917
11960
  }) {
11918
- const [searchQuery, setSearchQuery] = useState32("");
11961
+ const [searchQuery, setSearchQuery] = useState52("");
11919
11962
  const preferredCurrencies = preferredCurrencyCodes.map(
11920
11963
  (code) => currencies.find(
11921
11964
  (currency) => currency.currency_code.toLowerCase() === code.toLowerCase()
@@ -11942,8 +11985,8 @@ function CurrencyModal({
11942
11985
  onOpenChange(false);
11943
11986
  setSearchQuery("");
11944
11987
  };
11945
- return /* @__PURE__ */ jsx162(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs11(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
11946
- /* @__PURE__ */ jsx162(
11988
+ return /* @__PURE__ */ jsx152(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs11(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
11989
+ /* @__PURE__ */ jsx152(
11947
11990
  DepositHeader,
11948
11991
  {
11949
11992
  title: "Currency",
@@ -11952,9 +11995,9 @@ function CurrencyModal({
11952
11995
  onClose: handleClose
11953
11996
  }
11954
11997
  ),
11955
- /* @__PURE__ */ jsx162("div", { children: /* @__PURE__ */ jsxs11("div", { className: "uf-relative", children: [
11956
- /* @__PURE__ */ jsx162(Search, { className: "uf-absolute uf-left-4 uf-top-1/2 uf--translate-y-1/2 uf-w-4 uf-h-4 uf-text-muted-foreground" }),
11957
- /* @__PURE__ */ jsx162(
11998
+ /* @__PURE__ */ jsx152("div", { children: /* @__PURE__ */ jsxs11("div", { className: "uf-relative", children: [
11999
+ /* @__PURE__ */ jsx152(Search, { className: "uf-absolute uf-left-4 uf-top-1/2 uf--translate-y-1/2 uf-w-4 uf-h-4 uf-text-muted-foreground" }),
12000
+ /* @__PURE__ */ jsx152(
11958
12001
  "input",
11959
12002
  {
11960
12003
  type: "text",
@@ -11965,8 +12008,8 @@ function CurrencyModal({
11965
12008
  }
11966
12009
  )
11967
12010
  ] }) }),
11968
- /* @__PURE__ */ jsx162("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs11("div", { className: "uf-space-y-2", children: [
11969
- /* @__PURE__ */ jsx162(
12011
+ /* @__PURE__ */ jsx152("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs11("div", { className: "uf-space-y-2", children: [
12012
+ /* @__PURE__ */ jsx152(
11970
12013
  CurrencyListSection,
11971
12014
  {
11972
12015
  title: "Popular currencies",
@@ -11975,8 +12018,8 @@ function CurrencyModal({
11975
12018
  onSelect: handleSelect
11976
12019
  }
11977
12020
  ),
11978
- filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ jsx162("div", { className: "uf-h-2" }),
11979
- /* @__PURE__ */ jsx162(
12021
+ filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ jsx152("div", { className: "uf-h-2" }),
12022
+ /* @__PURE__ */ jsx152(
11980
12023
  CurrencyListSection,
11981
12024
  {
11982
12025
  title: "All currencies",
@@ -11985,7 +12028,7 @@ function CurrencyModal({
11985
12028
  onSelect: handleSelect
11986
12029
  }
11987
12030
  ),
11988
- filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ jsx162("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
12031
+ filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ jsx152("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
11989
12032
  ] }) })
11990
12033
  ] }) });
11991
12034
  }
@@ -12001,12 +12044,12 @@ async function getIpViaIpApi() {
12001
12044
  state: data.region_code?.toLowerCase()
12002
12045
  };
12003
12046
  }
12004
- function useUserIp() {
12047
+ function useUserIp2() {
12005
12048
  const {
12006
12049
  data: userIpInfo,
12007
12050
  isLoading,
12008
12051
  error
12009
- } = useQuery({
12052
+ } = useQuery2({
12010
12053
  queryKey: ["getUserIpInfo"],
12011
12054
  queryFn: async () => {
12012
12055
  try {
@@ -12034,7 +12077,7 @@ function useUserIp() {
12034
12077
  error
12035
12078
  };
12036
12079
  }
12037
- var t2 = i18n.buyWithCard;
12080
+ var t2 = i18n2.buyWithCard;
12038
12081
  var QUICK_AMOUNTS = [100, 500, 1e3];
12039
12082
  function getCurrencySymbol(currencyCode) {
12040
12083
  try {
@@ -12064,21 +12107,21 @@ function BuyWithCard({
12064
12107
  wallets: externalWallets,
12065
12108
  assetCdnUrl
12066
12109
  }) {
12067
- const [amount, setAmount] = useState42("500.00");
12068
- const [currency, setCurrency] = useState42("usd");
12069
- const [showCurrencyModal, setShowCurrencyModal] = useState42(false);
12070
- const [quotes, setQuotes] = useState42([]);
12071
- const [quotesLoading, setQuotesLoading] = useState42(false);
12072
- const [quotesError, setQuotesError] = useState42(null);
12073
- const [internalView, setInternalView] = useState42("amount");
12074
- const { userIpInfo, isLoading: isLoadingIp } = useUserIp();
12075
- const [onrampSession, setOnrampSession] = useState42(
12110
+ const [amount, setAmount] = useState62("500.00");
12111
+ const [currency, setCurrency] = useState62("usd");
12112
+ const [showCurrencyModal, setShowCurrencyModal] = useState62(false);
12113
+ const [quotes, setQuotes] = useState62([]);
12114
+ const [quotesLoading, setQuotesLoading] = useState62(false);
12115
+ const [quotesError, setQuotesError] = useState62(null);
12116
+ const [internalView, setInternalView] = useState62("amount");
12117
+ const { userIpInfo, isLoading: isLoadingIp } = useUserIp2();
12118
+ const [onrampSession, setOnrampSession] = useState62(
12076
12119
  null
12077
12120
  );
12078
12121
  const currentView = externalView ?? internalView;
12079
12122
  const showQuotesView = currentView === "quotes";
12080
12123
  const showOnrampView = currentView === "onramp";
12081
- useEffect42(() => {
12124
+ useEffect52(() => {
12082
12125
  if (externalView) {
12083
12126
  setInternalView(externalView);
12084
12127
  }
@@ -12091,20 +12134,20 @@ function BuyWithCard({
12091
12134
  onViewChange?.(newView);
12092
12135
  }
12093
12136
  };
12094
- const [selectedProvider, setSelectedProvider] = useState42(
12137
+ const [selectedProvider, setSelectedProvider] = useState62(
12095
12138
  null
12096
12139
  );
12097
- const [isAutoSelected, setIsAutoSelected] = useState42(true);
12098
- const [autoSelectedProvider, setAutoSelectedProvider] = useState42(null);
12099
- const [hasManualSelection, setHasManualSelection] = useState42(false);
12100
- const [internalWallets, setInternalWallets] = useState42([]);
12101
- const [walletsLoading, setWalletsLoading] = useState42(!externalWallets?.length);
12140
+ const [isAutoSelected, setIsAutoSelected] = useState62(true);
12141
+ const [autoSelectedProvider, setAutoSelectedProvider] = useState62(null);
12142
+ const [hasManualSelection, setHasManualSelection] = useState62(false);
12143
+ const [internalWallets, setInternalWallets] = useState62([]);
12144
+ const [walletsLoading, setWalletsLoading] = useState62(!externalWallets?.length);
12102
12145
  const wallets = externalWallets?.length ? externalWallets : internalWallets;
12103
- const [countdown, setCountdown] = useState42(60);
12104
- const [fiatCurrencies, setFiatCurrencies] = useState42([]);
12105
- const [preferredCurrencyCodes, setPreferredCurrencyCodes] = useState42([]);
12106
- const [currenciesLoading, setCurrenciesLoading] = useState42(true);
12107
- const [supportedTokens, setSupportedTokens] = useState42([]);
12146
+ const [countdown, setCountdown] = useState62(60);
12147
+ const [fiatCurrencies, setFiatCurrencies] = useState62([]);
12148
+ const [preferredCurrencyCodes, setPreferredCurrencyCodes] = useState62([]);
12149
+ const [currenciesLoading, setCurrenciesLoading] = useState62(true);
12150
+ const [supportedTokens, setSupportedTokens] = useState62([]);
12108
12151
  const destinationWallet = getWalletByChainType(wallets, "ethereum");
12109
12152
  const walletDestinationChainId = destinationWallet?.destination_chain_id;
12110
12153
  const resolvedDestinationChainId = destinationChainId || walletDestinationChainId;
@@ -12113,7 +12156,7 @@ function BuyWithCard({
12113
12156
  const destinationChain = destinationToken?.chains.find(
12114
12157
  (c) => c.chain_id === resolvedDestinationChainId
12115
12158
  );
12116
- useEffect42(() => {
12159
+ useEffect52(() => {
12117
12160
  async function fetchFiatCurrencies() {
12118
12161
  try {
12119
12162
  const response = await getFiatCurrencies(publishableKey);
@@ -12127,7 +12170,7 @@ function BuyWithCard({
12127
12170
  }
12128
12171
  fetchFiatCurrencies();
12129
12172
  }, [publishableKey]);
12130
- useEffect42(() => {
12173
+ useEffect52(() => {
12131
12174
  if (externalWallets?.length) {
12132
12175
  setWalletsLoading(false);
12133
12176
  return;
@@ -12138,9 +12181,9 @@ function BuyWithCard({
12138
12181
  if (isCancelled) return;
12139
12182
  setWalletsLoading(true);
12140
12183
  try {
12141
- const response = await createEOA(
12184
+ const response = await createDepositAddress(
12142
12185
  {
12143
- user_id: userId,
12186
+ external_user_id: userId,
12144
12187
  recipient_address: recipientAddress,
12145
12188
  destination_chain_type: destinationChainType,
12146
12189
  destination_chain_id: destinationChainId,
@@ -12168,7 +12211,7 @@ function BuyWithCard({
12168
12211
  }
12169
12212
  };
12170
12213
  }, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey, externalWallets]);
12171
- useEffect42(() => {
12214
+ useEffect52(() => {
12172
12215
  async function fetchSupportedTokens() {
12173
12216
  try {
12174
12217
  const response = await getSupportedDepositTokens(publishableKey);
@@ -12179,7 +12222,7 @@ function BuyWithCard({
12179
12222
  }
12180
12223
  fetchSupportedTokens();
12181
12224
  }, [publishableKey]);
12182
- useEffect42(() => {
12225
+ useEffect52(() => {
12183
12226
  const amountNum = parseFloat(amount);
12184
12227
  if (isNaN(amountNum) || amountNum <= 0) {
12185
12228
  setQuotes([]);
@@ -12259,7 +12302,7 @@ function BuyWithCard({
12259
12302
  setQuotesLoading(false);
12260
12303
  }
12261
12304
  };
12262
- useEffect42(() => {
12305
+ useEffect52(() => {
12263
12306
  if (quotes.length === 0) return;
12264
12307
  const timer = setInterval(() => {
12265
12308
  setCountdown((prev) => {
@@ -12338,17 +12381,17 @@ function BuyWithCard({
12338
12381
  /* @__PURE__ */ jsxs12(
12339
12382
  "div",
12340
12383
  {
12341
- className: `uf-transition-all uf-duration-300 ${showQuotesView || showOnrampView ? "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0" : "uf-opacity-100"}`,
12384
+ className: `uf-transition-all uf-duration-300 uf-min-h-[420px] ${showQuotesView || showOnrampView ? "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0" : "uf-opacity-100"}`,
12342
12385
  children: [
12343
12386
  /* @__PURE__ */ jsxs12("div", { className: "uf-mb-6 uf-pt-4", children: [
12344
- /* @__PURE__ */ jsx172("div", { className: "uf-flex uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsxs12(
12387
+ /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsxs12(
12345
12388
  "button",
12346
12389
  {
12347
12390
  onClick: () => setShowCurrencyModal(true),
12348
12391
  disabled: currenciesLoading,
12349
12392
  className: "uf-flex uf-items-center uf-gap-1.5 uf-px-3 uf-py-1.5 uf-rounded-lg uf-bg-secondary hover:uf-bg-accent uf-transition-colors disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
12350
12393
  children: [
12351
- selectedCurrencyData && /* @__PURE__ */ jsx172(
12394
+ selectedCurrencyData && /* @__PURE__ */ jsx162(
12352
12395
  "img",
12353
12396
  {
12354
12397
  src: getPreferredIconUrl(selectedCurrencyData.icon_urls, "png") || selectedCurrencyData.icon_url,
@@ -12356,14 +12399,14 @@ function BuyWithCard({
12356
12399
  className: "uf-w-4 uf-h-4"
12357
12400
  }
12358
12401
  ),
12359
- /* @__PURE__ */ jsx172("span", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: currency.toUpperCase() }),
12360
- /* @__PURE__ */ jsx172(ChevronDown, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground" })
12402
+ /* @__PURE__ */ jsx162("span", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: currency.toUpperCase() }),
12403
+ /* @__PURE__ */ jsx162(ChevronDown, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground" })
12361
12404
  ]
12362
12405
  }
12363
12406
  ) }),
12364
12407
  /* @__PURE__ */ jsxs12("div", { className: "uf-text-center uf-mb-4", children: [
12365
- /* @__PURE__ */ jsx172("div", { className: "uf-flex uf-items-center uf-justify-center uf-mb-2 uf-px-8", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-max-w-full", children: [
12366
- /* @__PURE__ */ jsx172(
12408
+ /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-items-center uf-justify-center uf-mb-2 uf-px-8", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-max-w-full", children: [
12409
+ /* @__PURE__ */ jsx162(
12367
12410
  "span",
12368
12411
  {
12369
12412
  className: "uf-font-normal uf-text-foreground uf-flex-shrink-0 uf-mr-1",
@@ -12373,7 +12416,7 @@ function BuyWithCard({
12373
12416
  children: currencySymbol
12374
12417
  }
12375
12418
  ),
12376
- /* @__PURE__ */ jsx172(
12419
+ /* @__PURE__ */ jsx162(
12377
12420
  "input",
12378
12421
  {
12379
12422
  type: "text",
@@ -12389,12 +12432,12 @@ function BuyWithCard({
12389
12432
  }
12390
12433
  )
12391
12434
  ] }) }),
12392
- quotesLoading ? /* @__PURE__ */ jsx172("div", { className: "uf-flex uf-justify-center", children: /* @__PURE__ */ jsx172("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-40 uf-animate-pulse" }) }) : /* @__PURE__ */ jsxs12("div", { className: "uf-text-sm uf-text-muted-foreground uf-font-normal", children: [
12435
+ quotesLoading ? /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-justify-center", children: /* @__PURE__ */ jsx162("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-40 uf-animate-pulse" }) }) : /* @__PURE__ */ jsxs12("div", { className: "uf-text-sm uf-text-muted-foreground uf-font-normal", children: [
12393
12436
  calculateUSDC(),
12394
12437
  " USDC (Perps)"
12395
12438
  ] })
12396
12439
  ] }),
12397
- /* @__PURE__ */ jsx172("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: QUICK_AMOUNTS.map((quickAmount) => /* @__PURE__ */ jsxs12(
12440
+ /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: QUICK_AMOUNTS.map((quickAmount) => /* @__PURE__ */ jsxs12(
12398
12441
  "button",
12399
12442
  {
12400
12443
  onClick: () => handleQuickAmount(quickAmount),
@@ -12409,29 +12452,29 @@ function BuyWithCard({
12409
12452
  ] }),
12410
12453
  /* @__PURE__ */ jsxs12("div", { className: "uf-mb-6", children: [
12411
12454
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-font-medium uf-mb-2 uf-px-1", children: [
12412
- /* @__PURE__ */ jsx172("span", { className: "uf-text-foreground", children: "Provider" }),
12455
+ /* @__PURE__ */ jsx162("span", { className: "uf-text-foreground", children: "Provider" }),
12413
12456
  quotes.length > 0 && !quotesLoading && /* @__PURE__ */ jsxs12("span", { className: "uf-text-[10px] uf-text-foreground uf-font-normal", children: [
12414
12457
  "Refreshing in ",
12415
12458
  countdown,
12416
12459
  "s"
12417
12460
  ] })
12418
12461
  ] }),
12419
- /* @__PURE__ */ jsx172(
12462
+ /* @__PURE__ */ jsx162(
12420
12463
  "button",
12421
12464
  {
12422
12465
  onClick: () => handleViewChange("quotes"),
12423
12466
  disabled: quotesLoading || quotes.length === 0,
12424
12467
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-4 uf-group disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
12425
12468
  children: quotesLoading ? /* @__PURE__ */ jsxs12("div", { className: "uf-text-left uf-w-full uf-animate-pulse", children: [
12426
- /* @__PURE__ */ jsx172("div", { className: "uf-h-3 uf-bg-muted uf-rounded uf-w-28 uf-mb-3" }),
12469
+ /* @__PURE__ */ jsx162("div", { className: "uf-h-3 uf-bg-muted uf-rounded uf-w-28 uf-mb-3" }),
12427
12470
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12428
- /* @__PURE__ */ jsx172("div", { className: "uf-w-8 uf-h-8 uf-bg-muted uf-rounded-full" }),
12429
- /* @__PURE__ */ jsx172("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-32" })
12471
+ /* @__PURE__ */ jsx162("div", { className: "uf-w-8 uf-h-8 uf-bg-muted uf-rounded-full" }),
12472
+ /* @__PURE__ */ jsx162("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-32" })
12430
12473
  ] })
12431
12474
  ] }) : /* @__PURE__ */ jsxs12("div", { className: "uf-w-full uf-text-left", children: [
12432
- isAutoSelected && /* @__PURE__ */ jsx172("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal uf-mb-2", children: "Auto-picked for you" }),
12475
+ isAutoSelected && /* @__PURE__ */ jsx162("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal uf-mb-2", children: "Auto-picked for you" }),
12433
12476
  selectedProvider && /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12434
- /* @__PURE__ */ jsx172(
12477
+ /* @__PURE__ */ jsx162(
12435
12478
  "img",
12436
12479
  {
12437
12480
  src: selectedProvider.icon_url,
@@ -12442,21 +12485,21 @@ function BuyWithCard({
12442
12485
  }
12443
12486
  ),
12444
12487
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex-1 uf-min-w-0", children: [
12445
- /* @__PURE__ */ jsx172("div", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: selectedProvider.service_provider_display_name }),
12488
+ /* @__PURE__ */ jsx162("div", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: selectedProvider.service_provider_display_name }),
12446
12489
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
12447
- isAutoSelected && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-green-400 uf-font-normal", children: "Best price" }),
12448
- isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
12449
- selectedProvider.low_kyc === false && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
12490
+ isAutoSelected && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-green-400 uf-font-normal", children: "Best price" }),
12491
+ isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
12492
+ selectedProvider.low_kyc === false && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
12450
12493
  ] })
12451
12494
  ] }),
12452
- quotes.length > 0 && /* @__PURE__ */ jsx172(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors uf-flex-shrink-0" })
12495
+ quotes.length > 0 && /* @__PURE__ */ jsx162(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors uf-flex-shrink-0" })
12453
12496
  ] })
12454
12497
  ] })
12455
12498
  }
12456
12499
  ),
12457
- quotesError && /* @__PURE__ */ jsx172("div", { className: "uf-text-xs uf-text-red-400 uf-mt-2 uf-px-1", children: quotesError })
12500
+ quotesError && /* @__PURE__ */ jsx162("div", { className: "uf-text-xs uf-text-red-400 uf-mt-2 uf-px-1", children: quotesError })
12458
12501
  ] }),
12459
- /* @__PURE__ */ jsx172(
12502
+ /* @__PURE__ */ jsx162(
12460
12503
  "button",
12461
12504
  {
12462
12505
  onClick: handleContinue,
@@ -12471,11 +12514,11 @@ function BuyWithCard({
12471
12514
  ]
12472
12515
  }
12473
12516
  ),
12474
- /* @__PURE__ */ jsx172(
12517
+ /* @__PURE__ */ jsx162(
12475
12518
  "div",
12476
12519
  {
12477
- className: `uf-transition-all uf-duration-300 ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
12478
- children: /* @__PURE__ */ jsx172("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index2) => {
12520
+ className: `uf-transition-all uf-duration-300 uf-min-h-[420px] ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
12521
+ children: /* @__PURE__ */ jsx162("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index2) => {
12479
12522
  const badges = getProviderBadges(quote, sortedQuotes);
12480
12523
  const displayName = quote.service_provider_display_name;
12481
12524
  const isSelected = selectedProvider?.service_provider === quote.service_provider;
@@ -12493,7 +12536,7 @@ function BuyWithCard({
12493
12536
  className: `uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group ${isSelected ? "uf-ring-2 uf-ring-inset uf-ring-primary" : ""}`,
12494
12537
  children: [
12495
12538
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12496
- /* @__PURE__ */ jsx172("div", { className: "uf-w-10 uf-h-10 uf-flex uf-items-center uf-justify-center uf-flex-shrink-0", children: /* @__PURE__ */ jsx172(
12539
+ /* @__PURE__ */ jsx162("div", { className: "uf-w-10 uf-h-10 uf-flex uf-items-center uf-justify-center uf-flex-shrink-0", children: /* @__PURE__ */ jsx162(
12497
12540
  "img",
12498
12541
  {
12499
12542
  src: quote.icon_url,
@@ -12504,7 +12547,7 @@ function BuyWithCard({
12504
12547
  }
12505
12548
  ) }),
12506
12549
  /* @__PURE__ */ jsxs12("div", { className: "uf-text-left", children: [
12507
- /* @__PURE__ */ jsx172("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: displayName }),
12550
+ /* @__PURE__ */ jsx162("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: displayName }),
12508
12551
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
12509
12552
  badges.map((badge, i) => /* @__PURE__ */ jsxs12(
12510
12553
  "span",
@@ -12517,8 +12560,8 @@ function BuyWithCard({
12517
12560
  },
12518
12561
  i
12519
12562
  )),
12520
- quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
12521
- quote.low_kyc === false && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
12563
+ quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
12564
+ quote.low_kyc === false && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
12522
12565
  ] })
12523
12566
  ] })
12524
12567
  ] }),
@@ -12540,12 +12583,12 @@ function BuyWithCard({
12540
12583
  }) })
12541
12584
  }
12542
12585
  ),
12543
- /* @__PURE__ */ jsx172(
12586
+ /* @__PURE__ */ jsx162(
12544
12587
  "div",
12545
12588
  {
12546
12589
  className: `uf-transition-all uf-duration-300 ${showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
12547
12590
  children: onrampSession && /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-6 uf-pb-4 uf-px-2", children: [
12548
- /* @__PURE__ */ jsx172("div", { className: "uf-mb-6", children: /* @__PURE__ */ jsx172(
12591
+ /* @__PURE__ */ jsx162("div", { className: "uf-mb-6", children: /* @__PURE__ */ jsx162(
12549
12592
  "img",
12550
12593
  {
12551
12594
  src: onrampSession.provider.icon_url,
@@ -12555,62 +12598,62 @@ function BuyWithCard({
12555
12598
  className: "uf-rounded-2xl"
12556
12599
  }
12557
12600
  ) }),
12558
- /* @__PURE__ */ jsx172("h2", { className: "uf-text-xl uf-font-medium uf-text-foreground uf-mb-2", children: t2.onramp.completeTransaction.replace(
12601
+ /* @__PURE__ */ jsx162("h2", { className: "uf-text-xl uf-font-medium uf-text-foreground uf-mb-2", children: t2.onramp.completeTransaction.replace(
12559
12602
  "{{provider}}",
12560
12603
  onrampSession.provider.service_provider_display_name
12561
12604
  ) }),
12562
- /* @__PURE__ */ jsx172("p", { className: "uf-text-sm uf-text-muted-foreground uf-mb-8", children: t2.onramp.canCloseModal }),
12563
- /* @__PURE__ */ jsx172("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4 uf-mb-4", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-justify-center", children: [
12605
+ /* @__PURE__ */ jsx162("p", { className: "uf-text-sm uf-text-muted-foreground uf-mb-8", children: t2.onramp.canCloseModal }),
12606
+ /* @__PURE__ */ jsx162("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4 uf-mb-4", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-justify-center", children: [
12564
12607
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
12565
- /* @__PURE__ */ jsx172("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsx172(
12608
+ /* @__PURE__ */ jsx162("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsx162(
12566
12609
  "img",
12567
12610
  {
12568
12611
  src: getIconUrlWithCdn(
12569
- `/icons/currencies/svg/${onrampSession.sourceCurrency.toLowerCase()}.svg`,
12612
+ `/icons/currencies/png/${onrampSession.sourceCurrency.toLowerCase()}.png`,
12570
12613
  assetCdnUrl
12571
12614
  ),
12572
12615
  alt: onrampSession.sourceCurrency.toUpperCase(),
12573
12616
  className: "uf-w-7 uf-h-7 uf-rounded-full"
12574
12617
  }
12575
12618
  ) }),
12576
- /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youUse }),
12577
- /* @__PURE__ */ jsx172("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: onrampSession.sourceCurrency.toUpperCase() })
12619
+ /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youUse }),
12620
+ /* @__PURE__ */ jsx162("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: onrampSession.sourceCurrency.toUpperCase() })
12578
12621
  ] }),
12579
- /* @__PURE__ */ jsx172("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx172(ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
12622
+ /* @__PURE__ */ jsx162("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx162(ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
12580
12623
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
12581
- /* @__PURE__ */ jsx172("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
12582
- /* @__PURE__ */ jsx172(
12624
+ /* @__PURE__ */ jsx162("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
12625
+ /* @__PURE__ */ jsx162(
12583
12626
  "img",
12584
12627
  {
12585
- src: getIconUrlWithCdn("/icons/tokens/svg/usdc.svg", assetCdnUrl),
12628
+ src: getIconUrlWithCdn("/icons/tokens/png/usdc.png", assetCdnUrl),
12586
12629
  alt: "USDC",
12587
12630
  className: "uf-w-7 uf-h-7 uf-rounded-full"
12588
12631
  }
12589
12632
  ),
12590
- /* @__PURE__ */ jsx172(
12633
+ /* @__PURE__ */ jsx162(
12591
12634
  "img",
12592
12635
  {
12593
- src: getIconUrlWithCdn("/icons/networks/svg/polygon.svg", assetCdnUrl),
12636
+ src: getIconUrlWithCdn("/icons/networks/png/polygon.png", assetCdnUrl),
12594
12637
  alt: "Polygon",
12595
12638
  className: "uf-w-3.5 uf-h-3.5 uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-rounded-full"
12596
12639
  }
12597
12640
  )
12598
12641
  ] }) }),
12599
- /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youBuy }),
12600
- /* @__PURE__ */ jsx172("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: "USDC" })
12642
+ /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youBuy }),
12643
+ /* @__PURE__ */ jsx162("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: "USDC" })
12601
12644
  ] }),
12602
- /* @__PURE__ */ jsx172("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx172(ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
12645
+ /* @__PURE__ */ jsx162("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx162(ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
12603
12646
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
12604
- /* @__PURE__ */ jsx172("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
12605
- /* @__PURE__ */ jsx172(
12647
+ /* @__PURE__ */ jsx162("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
12648
+ /* @__PURE__ */ jsx162(
12606
12649
  "img",
12607
12650
  {
12608
- src: destinationToken?.icon_url || getIconUrlWithCdn("/icons/tokens/svg/usdc.svg", assetCdnUrl),
12651
+ src: destinationToken?.icon_url || getIconUrlWithCdn("/icons/tokens/png/usdc.png", assetCdnUrl),
12609
12652
  alt: displayTokenSymbol,
12610
12653
  className: "uf-w-7 uf-h-7 uf-rounded-full"
12611
12654
  }
12612
12655
  ),
12613
- destinationChain?.icon_url && /* @__PURE__ */ jsx172(
12656
+ destinationChain?.icon_url && /* @__PURE__ */ jsx162(
12614
12657
  "img",
12615
12658
  {
12616
12659
  src: destinationChain.icon_url,
@@ -12619,15 +12662,15 @@ function BuyWithCard({
12619
12662
  }
12620
12663
  )
12621
12664
  ] }) }),
12622
- /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youReceive }),
12623
- /* @__PURE__ */ jsx172("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: displayTokenSymbol })
12665
+ /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youReceive }),
12666
+ /* @__PURE__ */ jsx162("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: displayTokenSymbol })
12624
12667
  ] })
12625
12668
  ] }) }),
12626
- /* @__PURE__ */ jsx172("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4", children: /* @__PURE__ */ jsx172("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.onramp.intentAddressNote }) })
12669
+ /* @__PURE__ */ jsx162("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4", children: /* @__PURE__ */ jsx162("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.onramp.intentAddressNote }) })
12627
12670
  ] })
12628
12671
  }
12629
12672
  ),
12630
- /* @__PURE__ */ jsx172(
12673
+ /* @__PURE__ */ jsx162(
12631
12674
  CurrencyModal,
12632
12675
  {
12633
12676
  open: showCurrencyModal,
@@ -12657,16 +12700,16 @@ function TransferCryptoButton({
12657
12700
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
12658
12701
  children: [
12659
12702
  /* @__PURE__ */ jsxs13("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12660
- /* @__PURE__ */ jsx18("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx18(Zap, { className: "uf-w-5 uf-h-5" }) }),
12703
+ /* @__PURE__ */ jsx172("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx172(Zap, { className: "uf-w-5 uf-h-5" }) }),
12661
12704
  /* @__PURE__ */ jsxs13("div", { className: "uf-text-left", children: [
12662
- /* @__PURE__ */ jsx18("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12663
- /* @__PURE__ */ jsx18("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12705
+ /* @__PURE__ */ jsx172("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12706
+ /* @__PURE__ */ jsx172("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12664
12707
  ] })
12665
12708
  ] }),
12666
12709
  /* @__PURE__ */ jsxs13("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12667
- /* @__PURE__ */ jsx18("div", { className: "uf-flex uf--space-x-2", children: sortedTokens.map((token) => {
12710
+ /* @__PURE__ */ jsx172("div", { className: "uf-flex uf--space-x-2", children: sortedTokens.map((token) => {
12668
12711
  const iconUrl = token.icon_urls.find((u) => u.format === "svg")?.url || token.icon_urls.find((u) => u.format === "png")?.url;
12669
- return /* @__PURE__ */ jsx18(
12712
+ return /* @__PURE__ */ jsx172(
12670
12713
  "img",
12671
12714
  {
12672
12715
  src: iconUrl,
@@ -12678,7 +12721,7 @@ function TransferCryptoButton({
12678
12721
  token.name
12679
12722
  );
12680
12723
  }) }),
12681
- /* @__PURE__ */ jsx18(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12724
+ /* @__PURE__ */ jsx172(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12682
12725
  ] })
12683
12726
  ]
12684
12727
  }
@@ -12697,16 +12740,16 @@ function DepositWithCardButton({
12697
12740
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
12698
12741
  children: [
12699
12742
  /* @__PURE__ */ jsxs14("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12700
- /* @__PURE__ */ jsx19("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx19(CreditCard, { className: "uf-w-5 uf-h-5" }) }),
12743
+ /* @__PURE__ */ jsx18("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx18(CreditCard, { className: "uf-w-5 uf-h-5" }) }),
12701
12744
  /* @__PURE__ */ jsxs14("div", { className: "uf-text-left", children: [
12702
- /* @__PURE__ */ jsx19("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12703
- /* @__PURE__ */ jsx19("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12745
+ /* @__PURE__ */ jsx18("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12746
+ /* @__PURE__ */ jsx18("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12704
12747
  ] })
12705
12748
  ] }),
12706
12749
  /* @__PURE__ */ jsxs14("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12707
- /* @__PURE__ */ jsx19("div", { className: "uf-flex uf-items-center uf-gap-1.5", children: paymentNetworks?.map((network) => {
12750
+ /* @__PURE__ */ jsx18("div", { className: "uf-flex uf-items-center uf-gap-1.5", children: paymentNetworks?.map((network) => {
12708
12751
  const iconUrl = network.icon_urls.find((u) => u.format === "svg")?.url || network.icon_urls.find((u) => u.format === "png")?.url;
12709
- return /* @__PURE__ */ jsx19(
12752
+ return /* @__PURE__ */ jsx18(
12710
12753
  "img",
12711
12754
  {
12712
12755
  src: iconUrl,
@@ -12718,7 +12761,7 @@ function DepositWithCardButton({
12718
12761
  network.name
12719
12762
  );
12720
12763
  }) }),
12721
- /* @__PURE__ */ jsx19(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12764
+ /* @__PURE__ */ jsx18(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12722
12765
  ] })
12723
12766
  ]
12724
12767
  }
@@ -12738,15 +12781,15 @@ function DepositTrackerButton({
12738
12781
  children: [
12739
12782
  /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12740
12783
  /* @__PURE__ */ jsxs15("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2 uf-relative", children: [
12741
- /* @__PURE__ */ jsx20(Clock, { className: "uf-w-5 uf-h-5" }),
12742
- badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx20("div", { className: "uf-absolute -uf-top-1 -uf-right-1 uf-bg-blue-500 uf-text-primary-foreground uf-text-[10px] uf-font-semibold uf-rounded-full uf-min-w-[18px] uf-h-[18px] uf-flex uf-items-center uf-justify-center uf-px-1", children: badge > 99 ? "99+" : badge })
12784
+ /* @__PURE__ */ jsx19(Clock, { className: "uf-w-5 uf-h-5" }),
12785
+ badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx19("div", { className: "uf-absolute -uf-top-1 -uf-right-1 uf-bg-blue-500 uf-text-primary-foreground uf-text-[10px] uf-font-semibold uf-rounded-full uf-min-w-[18px] uf-h-[18px] uf-flex uf-items-center uf-justify-center uf-px-1", children: badge > 99 ? "99+" : badge })
12743
12786
  ] }),
12744
12787
  /* @__PURE__ */ jsxs15("div", { className: "uf-text-left", children: [
12745
- /* @__PURE__ */ jsx20("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12746
- /* @__PURE__ */ jsx20("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12788
+ /* @__PURE__ */ jsx19("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12789
+ /* @__PURE__ */ jsx19("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12747
12790
  ] })
12748
12791
  ] }),
12749
- /* @__PURE__ */ jsx20(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12792
+ /* @__PURE__ */ jsx19(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12750
12793
  ]
12751
12794
  }
12752
12795
  );
@@ -12754,19 +12797,19 @@ function DepositTrackerButton({
12754
12797
  function SkeletonButton({ variant = "default" }) {
12755
12798
  return /* @__PURE__ */ jsxs16("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-animate-pulse", children: [
12756
12799
  /* @__PURE__ */ jsxs16("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12757
- /* @__PURE__ */ jsx21("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
12800
+ /* @__PURE__ */ jsx20("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
12758
12801
  /* @__PURE__ */ jsxs16("div", { className: "uf-space-y-1.5", children: [
12759
- /* @__PURE__ */ jsx21("div", { className: "uf-h-3.5 uf-w-24 uf-bg-muted uf-rounded" }),
12760
- /* @__PURE__ */ jsx21("div", { className: "uf-h-3 uf-w-32 uf-bg-muted uf-rounded" })
12802
+ /* @__PURE__ */ jsx20("div", { className: "uf-h-3.5 uf-w-24 uf-bg-muted uf-rounded" }),
12803
+ /* @__PURE__ */ jsx20("div", { className: "uf-h-3 uf-w-32 uf-bg-muted uf-rounded" })
12761
12804
  ] })
12762
12805
  ] }),
12763
12806
  /* @__PURE__ */ jsxs16("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12764
- variant === "with-icons" && /* @__PURE__ */ jsx21("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx21("div", { className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary" }, i)) }),
12765
- /* @__PURE__ */ jsx21(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted" })
12807
+ variant === "with-icons" && /* @__PURE__ */ jsx20("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx20("div", { className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary" }, i)) }),
12808
+ /* @__PURE__ */ jsx20(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted" })
12766
12809
  ] })
12767
12810
  ] });
12768
12811
  }
12769
- var t3 = i18n.depositModal;
12812
+ var t3 = i18n2.depositModal;
12770
12813
  function DepositModal({
12771
12814
  open,
12772
12815
  onOpenChange,
@@ -12783,24 +12826,24 @@ function DepositModal({
12783
12826
  onDepositError,
12784
12827
  theme = "dark"
12785
12828
  }) {
12786
- const [view, setView] = useState52("main");
12787
- const [cardView, setCardView] = useState52(
12829
+ const [view, setView] = useState72("main");
12830
+ const [cardView, setCardView] = useState72(
12788
12831
  "amount"
12789
12832
  );
12790
- const [quotesCount, setQuotesCount] = useState52(0);
12791
- const [depositsModalOpen, setDepositsModalOpen] = useState52(false);
12792
- const [depositExecutions, setDepositExecutions] = useState52([]);
12793
- const [projectConfig, setProjectConfig] = useState52(null);
12794
- const [wallets, setWallets] = useState52([]);
12795
- const [walletsLoading, setWalletsLoading] = useState52(false);
12796
- useEffect52(() => {
12833
+ const [quotesCount, setQuotesCount] = useState72(0);
12834
+ const [depositsModalOpen, setDepositsModalOpen] = useState72(false);
12835
+ const [depositExecutions, setDepositExecutions] = useState72([]);
12836
+ const [projectConfig, setProjectConfig] = useState72(null);
12837
+ const [wallets, setWallets] = useState72([]);
12838
+ const [walletsLoading, setWalletsLoading] = useState72(false);
12839
+ useEffect62(() => {
12797
12840
  setProjectConfig(null);
12798
12841
  }, [publishableKey]);
12799
- useEffect52(() => {
12842
+ useEffect62(() => {
12800
12843
  setWallets([]);
12801
12844
  }, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey]);
12802
- const [resolvedTheme, setResolvedTheme] = useState52(theme === "auto" ? "dark" : theme);
12803
- useEffect52(() => {
12845
+ const [resolvedTheme, setResolvedTheme] = useState72(theme === "auto" ? "dark" : theme);
12846
+ useEffect62(() => {
12804
12847
  if (theme === "auto") {
12805
12848
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
12806
12849
  setResolvedTheme(mediaQuery.matches ? "dark" : "light");
@@ -12813,12 +12856,12 @@ function DepositModal({
12813
12856
  setResolvedTheme(theme);
12814
12857
  }
12815
12858
  }, [theme]);
12816
- useEffect52(() => {
12859
+ useEffect62(() => {
12817
12860
  if (open && !projectConfig) {
12818
12861
  getProjectConfig(publishableKey).then(setProjectConfig).catch(console.error);
12819
12862
  }
12820
12863
  }, [open, publishableKey, projectConfig]);
12821
- useEffect52(() => {
12864
+ useEffect62(() => {
12822
12865
  if (!open || wallets.length > 0) return;
12823
12866
  let retryTimeout = null;
12824
12867
  let isCancelled = false;
@@ -12826,9 +12869,9 @@ function DepositModal({
12826
12869
  if (isCancelled) return;
12827
12870
  setWalletsLoading(true);
12828
12871
  try {
12829
- const response = await createEOA(
12872
+ const response = await createDepositAddress(
12830
12873
  {
12831
- user_id: userId,
12874
+ external_user_id: userId,
12832
12875
  recipient_address: recipientAddress,
12833
12876
  destination_chain_type: destinationChainType,
12834
12877
  destination_chain_id: destinationChainId,
@@ -12880,27 +12923,27 @@ function DepositModal({
12880
12923
  setQuotesCount(count3);
12881
12924
  }
12882
12925
  };
12883
- return /* @__PURE__ */ jsx21(ThemeProvider, { themeClass, children: /* @__PURE__ */ jsxs16(Dialog2, { open, onOpenChange: handleClose, children: [
12884
- /* @__PURE__ */ jsx21(
12926
+ return /* @__PURE__ */ jsx20(ThemeProvider, { themeClass, children: /* @__PURE__ */ jsxs16(Dialog2, { open, onOpenChange: handleClose, children: [
12927
+ /* @__PURE__ */ jsx20(
12885
12928
  DialogContent2,
12886
12929
  {
12887
12930
  className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 uf-overflow-visible [&>button]:uf-hidden ${themeClass}`,
12888
12931
  onPointerDownOutside: (e) => e.preventDefault(),
12889
12932
  onInteractOutside: (e) => e.preventDefault(),
12890
12933
  children: view === "main" ? /* @__PURE__ */ jsxs16(Fragment42, { children: [
12891
- /* @__PURE__ */ jsx21(
12934
+ /* @__PURE__ */ jsx20(
12892
12935
  DepositHeader,
12893
12936
  {
12894
12937
  title: modalTitle || "Deposit",
12895
12938
  onClose: handleClose
12896
12939
  }
12897
12940
  ),
12898
- /* @__PURE__ */ jsx21("div", { className: "uf-pb-4 uf-space-y-3", children: !projectConfig ? /* @__PURE__ */ jsxs16(Fragment42, { children: [
12899
- /* @__PURE__ */ jsx21(SkeletonButton, { variant: "with-icons" }),
12900
- /* @__PURE__ */ jsx21(SkeletonButton, { variant: "with-icons" }),
12901
- !hideDepositTracker && /* @__PURE__ */ jsx21(SkeletonButton, {})
12941
+ /* @__PURE__ */ jsx20("div", { className: "uf-pb-4 uf-space-y-3", children: !projectConfig ? /* @__PURE__ */ jsxs16(Fragment42, { children: [
12942
+ /* @__PURE__ */ jsx20(SkeletonButton, { variant: "with-icons" }),
12943
+ /* @__PURE__ */ jsx20(SkeletonButton, { variant: "with-icons" }),
12944
+ !hideDepositTracker && /* @__PURE__ */ jsx20(SkeletonButton, {})
12902
12945
  ] }) : /* @__PURE__ */ jsxs16(Fragment42, { children: [
12903
- /* @__PURE__ */ jsx21(
12946
+ /* @__PURE__ */ jsx20(
12904
12947
  TransferCryptoButton,
12905
12948
  {
12906
12949
  onClick: () => setView("transfer"),
@@ -12909,7 +12952,7 @@ function DepositModal({
12909
12952
  featuredTokens: projectConfig.transfer_crypto.networks
12910
12953
  }
12911
12954
  ),
12912
- /* @__PURE__ */ jsx21(
12955
+ /* @__PURE__ */ jsx20(
12913
12956
  DepositWithCardButton,
12914
12957
  {
12915
12958
  onClick: () => setView("card"),
@@ -12918,7 +12961,7 @@ function DepositModal({
12918
12961
  paymentNetworks: projectConfig.payment_networks.networks
12919
12962
  }
12920
12963
  ),
12921
- !hideDepositTracker && /* @__PURE__ */ jsx21(
12964
+ !hideDepositTracker && /* @__PURE__ */ jsx20(
12922
12965
  DepositTrackerButton,
12923
12966
  {
12924
12967
  onClick: () => setDepositsModalOpen(true),
@@ -12929,7 +12972,7 @@ function DepositModal({
12929
12972
  )
12930
12973
  ] }) })
12931
12974
  ] }) : view === "transfer" ? /* @__PURE__ */ jsxs16(Fragment42, { children: [
12932
- /* @__PURE__ */ jsx21(
12975
+ /* @__PURE__ */ jsx20(
12933
12976
  DepositHeader,
12934
12977
  {
12935
12978
  title: t3.transferCrypto.title,
@@ -12938,7 +12981,7 @@ function DepositModal({
12938
12981
  onClose: handleClose
12939
12982
  }
12940
12983
  ),
12941
- /* @__PURE__ */ jsx21(
12984
+ /* @__PURE__ */ jsx20(
12942
12985
  TransferCrypto,
12943
12986
  {
12944
12987
  userId,
@@ -12954,17 +12997,17 @@ function DepositModal({
12954
12997
  }
12955
12998
  )
12956
12999
  ] }) : /* @__PURE__ */ jsxs16(Fragment42, { children: [
12957
- /* @__PURE__ */ jsx21(
13000
+ /* @__PURE__ */ jsx20(
12958
13001
  DepositHeader,
12959
13002
  {
12960
- title: cardView === "quotes" ? t3.quotes : modalTitle || "Deposit",
13003
+ title: cardView === "quotes" ? t3.quotes : t3.depositWithCard.title,
12961
13004
  showBack: true,
12962
13005
  onBack: handleBack,
12963
13006
  onClose: handleClose,
12964
13007
  badge: cardView === "quotes" ? { count: quotesCount } : void 0
12965
13008
  }
12966
13009
  ),
12967
- /* @__PURE__ */ jsx21(
13010
+ /* @__PURE__ */ jsx20(
12968
13011
  BuyWithCard,
12969
13012
  {
12970
13013
  userId,
@@ -12986,11 +13029,12 @@ function DepositModal({
12986
13029
  ] })
12987
13030
  }
12988
13031
  ),
12989
- /* @__PURE__ */ jsx21(
13032
+ /* @__PURE__ */ jsx20(
12990
13033
  DepositsModal,
12991
13034
  {
12992
13035
  open: depositsModalOpen,
12993
13036
  onOpenChange: setDepositsModalOpen,
13037
+ onCloseAll: handleClose,
12994
13038
  executions: depositExecutions,
12995
13039
  userId,
12996
13040
  publishableKey,
@@ -12999,6 +13043,45 @@ function DepositModal({
12999
13043
  )
13000
13044
  ] }) });
13001
13045
  }
13046
+ var buttonVariants = cva(
13047
+ "uf-inline-flex uf-items-center uf-justify-center uf-whitespace-nowrap uf-rounded-md uf-text-sm uf-font-medium uf-ring-offset-background uf-transition-colors focus-visible:uf-outline-none focus-visible:uf-ring-2 focus-visible:uf-ring-ring focus-visible:uf-ring-offset-2 disabled:uf-pointer-events-none disabled:uf-opacity-50",
13048
+ {
13049
+ variants: {
13050
+ variant: {
13051
+ default: "uf-bg-primary uf-text-primary-foreground hover:uf-bg-primary/90",
13052
+ destructive: "uf-bg-destructive uf-text-destructive-foreground hover:uf-bg-destructive/90",
13053
+ outline: "uf-border uf-border-input uf-bg-background hover:uf-bg-accent hover:uf-text-accent-foreground",
13054
+ secondary: "uf-bg-secondary uf-text-secondary-foreground hover:uf-bg-secondary/80",
13055
+ ghost: "hover:uf-bg-accent hover:uf-text-accent-foreground",
13056
+ link: "uf-text-primary uf-underline-offset-4 hover:uf-underline"
13057
+ },
13058
+ size: {
13059
+ default: "uf-h-10 uf-px-4 uf-py-2",
13060
+ sm: "uf-h-9 uf-rounded-md uf-px-3",
13061
+ lg: "uf-h-11 uf-rounded-md uf-px-8",
13062
+ icon: "uf-h-10 uf-w-10"
13063
+ }
13064
+ },
13065
+ defaultVariants: {
13066
+ variant: "default",
13067
+ size: "default"
13068
+ }
13069
+ }
13070
+ );
13071
+ var Button = React52.forwardRef(
13072
+ ({ className, variant, size: size4, asChild = false, ...props }, ref) => {
13073
+ const Comp = asChild ? Slot3 : "button";
13074
+ return /* @__PURE__ */ jsx222(
13075
+ Comp,
13076
+ {
13077
+ className: cn(buttonVariants({ variant, size: size4, className })),
13078
+ ref,
13079
+ ...props
13080
+ }
13081
+ );
13082
+ }
13083
+ );
13084
+ Button.displayName = "Button";
13002
13085
 
13003
13086
  // src/provider.tsx
13004
13087
  import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
@@ -13100,7 +13183,7 @@ function UnifoldProvider2({
13100
13183
  {
13101
13184
  open: isOpen,
13102
13185
  onOpenChange: closeDeposit,
13103
- userId: depositConfig.userId,
13186
+ userId: depositConfig.externalUserId,
13104
13187
  publishableKey,
13105
13188
  modalTitle: config?.modalTitle,
13106
13189
  destinationTokenSymbol: depositConfig.destinationTokenSymbol,
@@ -13146,15 +13229,12 @@ export {
13146
13229
 
13147
13230
  lucide-react/dist/esm/defaultAttributes.js:
13148
13231
  lucide-react/dist/esm/createLucideIcon.js:
13149
- lucide-react/dist/esm/icons/arrow-down-circle.js:
13150
13232
  lucide-react/dist/esm/icons/arrow-left.js:
13151
- lucide-react/dist/esm/icons/check-circle.js:
13152
13233
  lucide-react/dist/esm/icons/check.js:
13153
13234
  lucide-react/dist/esm/icons/chevron-down.js:
13154
13235
  lucide-react/dist/esm/icons/chevron-right.js:
13155
13236
  lucide-react/dist/esm/icons/chevron-up.js:
13156
13237
  lucide-react/dist/esm/icons/clock.js:
13157
- lucide-react/dist/esm/icons/copy.js:
13158
13238
  lucide-react/dist/esm/icons/credit-card.js:
13159
13239
  lucide-react/dist/esm/icons/dollar-sign.js:
13160
13240
  lucide-react/dist/esm/icons/external-link.js: