@unifold/connect-react 0.1.11 → 0.1.13
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +449 -228
- package/dist/index.mjs +324 -122
- package/dist/styles.css +1 -1
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -1153,13 +1153,32 @@ ${new this._window.XMLSerializer().serializeToString(e3)}`;
|
|
|
1153
1153
|
var index_exports = {};
|
|
1154
1154
|
__export(index_exports, {
|
|
1155
1155
|
Button: () => Button,
|
|
1156
|
+
ExecutionStatus: () => ExecutionStatus,
|
|
1157
|
+
SOLANA_USDC_ADDRESS: () => SOLANA_USDC_ADDRESS,
|
|
1156
1158
|
UnifoldProvider: () => UnifoldProvider2,
|
|
1157
|
-
|
|
1159
|
+
createDepositAddress: () => createDepositAddress,
|
|
1160
|
+
createMeldSession: () => createMeldSession,
|
|
1161
|
+
getApiBaseUrl: () => getApiBaseUrl,
|
|
1162
|
+
getChainName: () => getChainName,
|
|
1163
|
+
getFiatCurrencies: () => getFiatCurrencies,
|
|
1164
|
+
getIconUrl: () => getIconUrl,
|
|
1165
|
+
getIconUrlWithCdn: () => getIconUrlWithCdn,
|
|
1166
|
+
getMeldQuotes: () => getMeldQuotes,
|
|
1167
|
+
getPreferredIconUrl: () => getPreferredIconUrl,
|
|
1168
|
+
getProjectConfig: () => getProjectConfig,
|
|
1169
|
+
getSupportedDepositTokens: () => getSupportedDepositTokens,
|
|
1170
|
+
getTokenChains: () => getTokenChains,
|
|
1171
|
+
getWalletByChainType: () => getWalletByChainType,
|
|
1172
|
+
i18n: () => i18n,
|
|
1173
|
+
queryExecutions: () => queryExecutions,
|
|
1174
|
+
setApiConfig: () => setApiConfig,
|
|
1175
|
+
useUnifold: () => useUnifold2,
|
|
1176
|
+
useUserIp: () => useUserIp
|
|
1158
1177
|
});
|
|
1159
1178
|
module.exports = __toCommonJS(index_exports);
|
|
1160
1179
|
|
|
1161
1180
|
// src/provider.tsx
|
|
1162
|
-
var
|
|
1181
|
+
var import_react16 = __toESM(require("react"));
|
|
1163
1182
|
|
|
1164
1183
|
// ../react-provider/dist/index.mjs
|
|
1165
1184
|
var import_react = require("react");
|
|
@@ -1225,12 +1244,21 @@ function useUnifold() {
|
|
|
1225
1244
|
}
|
|
1226
1245
|
|
|
1227
1246
|
// ../ui-react/dist/index.mjs
|
|
1228
|
-
var
|
|
1247
|
+
var import_react8 = require("react");
|
|
1248
|
+
|
|
1249
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1250
|
+
var import_react3 = require("react");
|
|
1229
1251
|
|
|
1230
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1252
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
1253
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1254
|
+
var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
|
|
1255
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
|
|
1256
|
+
}).join(" ").trim();
|
|
1257
|
+
|
|
1258
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
1231
1259
|
var import_react2 = require("react");
|
|
1232
1260
|
|
|
1233
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1261
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
1234
1262
|
var defaultAttributes = {
|
|
1235
1263
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1236
1264
|
width: 24,
|
|
@@ -1243,11 +1271,19 @@ var defaultAttributes = {
|
|
|
1243
1271
|
strokeLinejoin: "round"
|
|
1244
1272
|
};
|
|
1245
1273
|
|
|
1246
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1247
|
-
var
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1274
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
1275
|
+
var Icon = (0, import_react2.forwardRef)(
|
|
1276
|
+
({
|
|
1277
|
+
color = "currentColor",
|
|
1278
|
+
size: size4 = 24,
|
|
1279
|
+
strokeWidth = 2,
|
|
1280
|
+
absoluteStrokeWidth,
|
|
1281
|
+
className = "",
|
|
1282
|
+
children,
|
|
1283
|
+
iconNode,
|
|
1284
|
+
...rest
|
|
1285
|
+
}, ref) => {
|
|
1286
|
+
return (0, import_react2.createElement)(
|
|
1251
1287
|
"svg",
|
|
1252
1288
|
{
|
|
1253
1289
|
ref,
|
|
@@ -1256,112 +1292,133 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
|
1256
1292
|
height: size4,
|
|
1257
1293
|
stroke: color,
|
|
1258
1294
|
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size4) : strokeWidth,
|
|
1259
|
-
className:
|
|
1295
|
+
className: mergeClasses("lucide", className),
|
|
1260
1296
|
...rest
|
|
1261
1297
|
},
|
|
1262
1298
|
[
|
|
1263
1299
|
...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
|
|
1264
1300
|
...Array.isArray(children) ? children : [children]
|
|
1265
1301
|
]
|
|
1266
|
-
)
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
);
|
|
1305
|
+
|
|
1306
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1307
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
1308
|
+
const Component = (0, import_react3.forwardRef)(
|
|
1309
|
+
({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
|
|
1310
|
+
ref,
|
|
1311
|
+
iconNode,
|
|
1312
|
+
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
|
1313
|
+
...props
|
|
1314
|
+
})
|
|
1267
1315
|
);
|
|
1268
1316
|
Component.displayName = `${iconName}`;
|
|
1269
1317
|
return Component;
|
|
1270
1318
|
};
|
|
1271
1319
|
|
|
1272
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1320
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.js
|
|
1273
1321
|
var ArrowLeft = createLucideIcon("ArrowLeft", [
|
|
1274
1322
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
1275
1323
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
1276
1324
|
]);
|
|
1277
1325
|
|
|
1278
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1326
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js
|
|
1279
1327
|
var Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
|
|
1280
1328
|
|
|
1281
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1329
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
1282
1330
|
var ChevronDown = createLucideIcon("ChevronDown", [
|
|
1283
1331
|
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
|
|
1284
1332
|
]);
|
|
1285
1333
|
|
|
1286
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1334
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
1287
1335
|
var ChevronRight = createLucideIcon("ChevronRight", [
|
|
1288
1336
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
1289
1337
|
]);
|
|
1290
1338
|
|
|
1291
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1339
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
1292
1340
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
1293
1341
|
|
|
1294
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1342
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clock.js
|
|
1295
1343
|
var Clock = createLucideIcon("Clock", [
|
|
1296
1344
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1297
1345
|
["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
|
|
1298
1346
|
]);
|
|
1299
1347
|
|
|
1300
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1348
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/credit-card.js
|
|
1301
1349
|
var CreditCard = createLucideIcon("CreditCard", [
|
|
1302
1350
|
["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
|
|
1303
1351
|
["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }]
|
|
1304
1352
|
]);
|
|
1305
1353
|
|
|
1306
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1354
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dollar-sign.js
|
|
1307
1355
|
var DollarSign = createLucideIcon("DollarSign", [
|
|
1308
1356
|
["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
|
|
1309
1357
|
["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
|
|
1310
1358
|
]);
|
|
1311
1359
|
|
|
1312
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1360
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/external-link.js
|
|
1313
1361
|
var ExternalLink = createLucideIcon("ExternalLink", [
|
|
1314
|
-
["path", { d: "
|
|
1315
|
-
["
|
|
1316
|
-
["
|
|
1362
|
+
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
1363
|
+
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
1364
|
+
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
1317
1365
|
]);
|
|
1318
1366
|
|
|
1319
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1367
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-text.js
|
|
1320
1368
|
var FileText = createLucideIcon("FileText", [
|
|
1321
|
-
[
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
],
|
|
1325
|
-
["
|
|
1326
|
-
["line", { x1: "16", x2: "8", y1: "13", y2: "13", key: "14keom" }],
|
|
1327
|
-
["line", { x1: "16", x2: "8", y1: "17", y2: "17", key: "17nazh" }],
|
|
1328
|
-
["line", { x1: "10", x2: "8", y1: "9", y2: "9", key: "1a5vjj" }]
|
|
1369
|
+
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
1370
|
+
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
1371
|
+
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
1372
|
+
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
1373
|
+
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
1329
1374
|
]);
|
|
1330
1375
|
|
|
1331
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1376
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/info.js
|
|
1332
1377
|
var Info = createLucideIcon("Info", [
|
|
1333
1378
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1334
1379
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
1335
1380
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
1336
1381
|
]);
|
|
1337
1382
|
|
|
1338
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1383
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search.js
|
|
1339
1384
|
var Search = createLucideIcon("Search", [
|
|
1340
1385
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
1341
1386
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
1342
1387
|
]);
|
|
1343
1388
|
|
|
1344
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1389
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield-check.js
|
|
1345
1390
|
var ShieldCheck = createLucideIcon("ShieldCheck", [
|
|
1346
|
-
[
|
|
1391
|
+
[
|
|
1392
|
+
"path",
|
|
1393
|
+
{
|
|
1394
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
1395
|
+
key: "oel41y"
|
|
1396
|
+
}
|
|
1397
|
+
],
|
|
1347
1398
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
1348
1399
|
]);
|
|
1349
1400
|
|
|
1350
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1401
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js
|
|
1351
1402
|
var X = createLucideIcon("X", [
|
|
1352
1403
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
1353
1404
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
1354
1405
|
]);
|
|
1355
1406
|
|
|
1356
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
1407
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/zap.js
|
|
1357
1408
|
var Zap = createLucideIcon("Zap", [
|
|
1358
|
-
[
|
|
1409
|
+
[
|
|
1410
|
+
"path",
|
|
1411
|
+
{
|
|
1412
|
+
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
1413
|
+
key: "1xq2db"
|
|
1414
|
+
}
|
|
1415
|
+
]
|
|
1359
1416
|
]);
|
|
1360
1417
|
|
|
1361
1418
|
// ../ui-react/dist/index.mjs
|
|
1362
1419
|
var React210 = __toESM(require("react"), 1);
|
|
1363
1420
|
|
|
1364
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@
|
|
1421
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._c543yfkcelkno3idkccogkevua/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
1365
1422
|
var React24 = __toESM(require("react"), 1);
|
|
1366
1423
|
|
|
1367
1424
|
// ../../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
@@ -1375,7 +1432,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
1375
1432
|
};
|
|
1376
1433
|
}
|
|
1377
1434
|
|
|
1378
|
-
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@
|
|
1435
|
+
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
1379
1436
|
var React = __toESM(require("react"), 1);
|
|
1380
1437
|
function setRef(ref, value) {
|
|
1381
1438
|
if (typeof ref === "function") {
|
|
@@ -1412,7 +1469,7 @@ function useComposedRefs(...refs) {
|
|
|
1412
1469
|
return React.useCallback(composeRefs(...refs), refs);
|
|
1413
1470
|
}
|
|
1414
1471
|
|
|
1415
|
-
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@
|
|
1472
|
+
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
1416
1473
|
var React2 = __toESM(require("react"), 1);
|
|
1417
1474
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1418
1475
|
function createContext22(rootComponentName, defaultContext) {
|
|
@@ -1489,15 +1546,15 @@ function composeContextScopes(...scopes) {
|
|
|
1489
1546
|
return createScope;
|
|
1490
1547
|
}
|
|
1491
1548
|
|
|
1492
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@
|
|
1549
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1493
1550
|
var React4 = __toESM(require("react"), 1);
|
|
1494
1551
|
|
|
1495
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@
|
|
1552
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
1496
1553
|
var React3 = __toESM(require("react"), 1);
|
|
1497
1554
|
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
|
1498
1555
|
};
|
|
1499
1556
|
|
|
1500
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@
|
|
1557
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1501
1558
|
var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
|
|
1502
1559
|
var count = 0;
|
|
1503
1560
|
function useId(deterministicId) {
|
|
@@ -1508,7 +1565,7 @@ function useId(deterministicId) {
|
|
|
1508
1565
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
1509
1566
|
}
|
|
1510
1567
|
|
|
1511
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@
|
|
1568
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
1512
1569
|
var React5 = __toESM(require("react"), 1);
|
|
1513
1570
|
var React22 = __toESM(require("react"), 1);
|
|
1514
1571
|
var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
@@ -1576,14 +1633,14 @@ function isFunction(value) {
|
|
|
1576
1633
|
return typeof value === "function";
|
|
1577
1634
|
}
|
|
1578
1635
|
|
|
1579
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@
|
|
1636
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ww6fouyx2m6cwmjzqm53vz7gdi/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
1580
1637
|
var React10 = __toESM(require("react"), 1);
|
|
1581
1638
|
|
|
1582
|
-
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@
|
|
1639
|
+
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._ttsd3lhl6vteekfa4w7yhzbari/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
1583
1640
|
var React7 = __toESM(require("react"), 1);
|
|
1584
1641
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
1585
1642
|
|
|
1586
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@
|
|
1643
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
1587
1644
|
var React6 = __toESM(require("react"), 1);
|
|
1588
1645
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1589
1646
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1678,7 +1735,7 @@ function getElementRef(element) {
|
|
|
1678
1735
|
return element.props.ref || element.ref;
|
|
1679
1736
|
}
|
|
1680
1737
|
|
|
1681
|
-
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@
|
|
1738
|
+
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._ttsd3lhl6vteekfa4w7yhzbari/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
1682
1739
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1683
1740
|
var NODES = [
|
|
1684
1741
|
"a",
|
|
@@ -1716,7 +1773,7 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
1716
1773
|
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
1717
1774
|
}
|
|
1718
1775
|
|
|
1719
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@
|
|
1776
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
1720
1777
|
var React8 = __toESM(require("react"), 1);
|
|
1721
1778
|
function useCallbackRef(callback) {
|
|
1722
1779
|
const callbackRef = React8.useRef(callback);
|
|
@@ -1726,7 +1783,7 @@ function useCallbackRef(callback) {
|
|
|
1726
1783
|
return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
1727
1784
|
}
|
|
1728
1785
|
|
|
1729
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@
|
|
1786
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
1730
1787
|
var React9 = __toESM(require("react"), 1);
|
|
1731
1788
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
1732
1789
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
@@ -1741,7 +1798,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
1741
1798
|
}, [onEscapeKeyDown, ownerDocument]);
|
|
1742
1799
|
}
|
|
1743
1800
|
|
|
1744
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@
|
|
1801
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ww6fouyx2m6cwmjzqm53vz7gdi/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
1745
1802
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1746
1803
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
1747
1804
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
@@ -1946,7 +2003,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
1946
2003
|
}
|
|
1947
2004
|
}
|
|
1948
2005
|
|
|
1949
|
-
// ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@
|
|
2006
|
+
// ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@1_tfxcpqbhv4yeom5omze5oqyk7a/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
1950
2007
|
var React11 = __toESM(require("react"), 1);
|
|
1951
2008
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1952
2009
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
@@ -2150,7 +2207,7 @@ function removeLinks(items) {
|
|
|
2150
2207
|
return items.filter((item) => item.tagName !== "A");
|
|
2151
2208
|
}
|
|
2152
2209
|
|
|
2153
|
-
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@
|
|
2210
|
+
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_nk6ushapd5m5qcefseikyaidiq/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
2154
2211
|
var React12 = __toESM(require("react"), 1);
|
|
2155
2212
|
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
2156
2213
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
@@ -2164,7 +2221,7 @@ var Portal = React12.forwardRef((props, forwardedRef) => {
|
|
|
2164
2221
|
});
|
|
2165
2222
|
Portal.displayName = PORTAL_NAME;
|
|
2166
2223
|
|
|
2167
|
-
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@
|
|
2224
|
+
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2_lhxxu3bl2a5egptwobjoj75owm/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
2168
2225
|
var React23 = __toESM(require("react"), 1);
|
|
2169
2226
|
var React13 = __toESM(require("react"), 1);
|
|
2170
2227
|
function useStateMachine(initialState, machine) {
|
|
@@ -2290,7 +2347,7 @@ function getElementRef2(element) {
|
|
|
2290
2347
|
return element.props.ref || element.ref;
|
|
2291
2348
|
}
|
|
2292
2349
|
|
|
2293
|
-
// ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@
|
|
2350
|
+
// ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
2294
2351
|
var React14 = __toESM(require("react"), 1);
|
|
2295
2352
|
var count2 = 0;
|
|
2296
2353
|
function useFocusGuards() {
|
|
@@ -2350,19 +2407,19 @@ function __spreadArray(to, from, pack) {
|
|
|
2350
2407
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
2351
2408
|
}
|
|
2352
2409
|
|
|
2353
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
2410
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
2354
2411
|
var React21 = __toESM(require("react"));
|
|
2355
2412
|
|
|
2356
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
2413
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
2357
2414
|
var React17 = __toESM(require("react"));
|
|
2358
2415
|
|
|
2359
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@
|
|
2416
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
2360
2417
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
2361
2418
|
var fullWidthClassName = "width-before-scroll-bar";
|
|
2362
2419
|
var noScrollbarsClassName = "with-scroll-bars-hidden";
|
|
2363
2420
|
var removedBarSizeVariable = "--removed-body-scroll-bar-size";
|
|
2364
2421
|
|
|
2365
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@
|
|
2422
|
+
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
2366
2423
|
function assignRef(ref, value) {
|
|
2367
2424
|
if (typeof ref === "function") {
|
|
2368
2425
|
ref(value);
|
|
@@ -2372,10 +2429,10 @@ function assignRef(ref, value) {
|
|
|
2372
2429
|
return ref;
|
|
2373
2430
|
}
|
|
2374
2431
|
|
|
2375
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@
|
|
2376
|
-
var
|
|
2432
|
+
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
2433
|
+
var import_react4 = require("react");
|
|
2377
2434
|
function useCallbackRef2(initialValue, callback) {
|
|
2378
|
-
var ref = (0,
|
|
2435
|
+
var ref = (0, import_react4.useState)(function() {
|
|
2379
2436
|
return {
|
|
2380
2437
|
// value
|
|
2381
2438
|
value: initialValue,
|
|
@@ -2400,7 +2457,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
2400
2457
|
return ref.facade;
|
|
2401
2458
|
}
|
|
2402
2459
|
|
|
2403
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@
|
|
2460
|
+
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
2404
2461
|
var React15 = __toESM(require("react"));
|
|
2405
2462
|
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect;
|
|
2406
2463
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
@@ -2432,7 +2489,7 @@ function useMergeRefs(refs, defaultValue) {
|
|
|
2432
2489
|
return callbackRef;
|
|
2433
2490
|
}
|
|
2434
2491
|
|
|
2435
|
-
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@
|
|
2492
|
+
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js
|
|
2436
2493
|
function ItoI(a) {
|
|
2437
2494
|
return a;
|
|
2438
2495
|
}
|
|
@@ -2518,7 +2575,7 @@ function createSidecarMedium(options) {
|
|
|
2518
2575
|
return medium;
|
|
2519
2576
|
}
|
|
2520
2577
|
|
|
2521
|
-
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@
|
|
2578
|
+
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js
|
|
2522
2579
|
var React16 = __toESM(require("react"));
|
|
2523
2580
|
var SideCar = function(_a) {
|
|
2524
2581
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
@@ -2537,10 +2594,10 @@ function exportSidecar(medium, exported) {
|
|
|
2537
2594
|
return SideCar;
|
|
2538
2595
|
}
|
|
2539
2596
|
|
|
2540
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
2597
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
2541
2598
|
var effectCar = createSidecarMedium();
|
|
2542
2599
|
|
|
2543
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
2600
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
2544
2601
|
var nothing = function() {
|
|
2545
2602
|
return;
|
|
2546
2603
|
};
|
|
@@ -2572,13 +2629,13 @@ RemoveScroll.classNames = {
|
|
|
2572
2629
|
zeroRight: zeroRightClassName
|
|
2573
2630
|
};
|
|
2574
2631
|
|
|
2575
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
2632
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
2576
2633
|
var React20 = __toESM(require("react"));
|
|
2577
2634
|
|
|
2578
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@
|
|
2635
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
2579
2636
|
var React19 = __toESM(require("react"));
|
|
2580
2637
|
|
|
2581
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@
|
|
2638
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
2582
2639
|
var React18 = __toESM(require("react"));
|
|
2583
2640
|
|
|
2584
2641
|
// ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
@@ -2593,7 +2650,7 @@ var getNonce = function() {
|
|
|
2593
2650
|
return void 0;
|
|
2594
2651
|
};
|
|
2595
2652
|
|
|
2596
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@
|
|
2653
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@18.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
2597
2654
|
function makeStyleTag() {
|
|
2598
2655
|
if (!document)
|
|
2599
2656
|
return null;
|
|
@@ -2639,7 +2696,7 @@ var stylesheetSingleton = function() {
|
|
|
2639
2696
|
};
|
|
2640
2697
|
};
|
|
2641
2698
|
|
|
2642
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@
|
|
2699
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
2643
2700
|
var styleHookSingleton = function() {
|
|
2644
2701
|
var sheet = stylesheetSingleton();
|
|
2645
2702
|
return function(styles, isDynamic) {
|
|
@@ -2652,7 +2709,7 @@ var styleHookSingleton = function() {
|
|
|
2652
2709
|
};
|
|
2653
2710
|
};
|
|
2654
2711
|
|
|
2655
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@
|
|
2712
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@18.3.1/node_modules/react-style-singleton/dist/es2015/component.js
|
|
2656
2713
|
var styleSingleton = function() {
|
|
2657
2714
|
var useStyle = styleHookSingleton();
|
|
2658
2715
|
var Sheet = function(_a) {
|
|
@@ -2663,7 +2720,7 @@ var styleSingleton = function() {
|
|
|
2663
2720
|
return Sheet;
|
|
2664
2721
|
};
|
|
2665
2722
|
|
|
2666
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@
|
|
2723
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
|
|
2667
2724
|
var zeroGap = {
|
|
2668
2725
|
left: 0,
|
|
2669
2726
|
top: 0,
|
|
@@ -2698,7 +2755,7 @@ var getGapWidth = function(gapMode) {
|
|
|
2698
2755
|
};
|
|
2699
2756
|
};
|
|
2700
2757
|
|
|
2701
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@
|
|
2758
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
2702
2759
|
var Style = styleSingleton();
|
|
2703
2760
|
var lockAttribute = "data-scroll-locked";
|
|
2704
2761
|
var getStyles = function(_a, allowRelative, gapMode, important) {
|
|
@@ -2738,7 +2795,7 @@ var RemoveScrollBar = function(_a) {
|
|
|
2738
2795
|
return React19.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
2739
2796
|
};
|
|
2740
2797
|
|
|
2741
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
2798
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
2742
2799
|
var passiveSupported = false;
|
|
2743
2800
|
if (typeof window !== "undefined") {
|
|
2744
2801
|
try {
|
|
@@ -2757,7 +2814,7 @@ if (typeof window !== "undefined") {
|
|
|
2757
2814
|
var options;
|
|
2758
2815
|
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
2759
2816
|
|
|
2760
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
2817
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
2761
2818
|
var alwaysContainsScroll = function(node) {
|
|
2762
2819
|
return node.tagName === "TEXTAREA";
|
|
2763
2820
|
};
|
|
@@ -2857,7 +2914,7 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
|
2857
2914
|
return shouldCancelScroll;
|
|
2858
2915
|
};
|
|
2859
2916
|
|
|
2860
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
2917
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
2861
2918
|
var getTouchXY = function(event) {
|
|
2862
2919
|
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
2863
2920
|
};
|
|
@@ -3028,10 +3085,10 @@ function getOutermostShadowParent(node) {
|
|
|
3028
3085
|
return shadowParent;
|
|
3029
3086
|
}
|
|
3030
3087
|
|
|
3031
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
3088
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
3032
3089
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
3033
3090
|
|
|
3034
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@
|
|
3091
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
3035
3092
|
var ReactRemoveScroll = React21.forwardRef(function(props, ref) {
|
|
3036
3093
|
return React21.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
3037
3094
|
});
|
|
@@ -3159,7 +3216,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
3159
3216
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
3160
3217
|
};
|
|
3161
3218
|
|
|
3162
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@
|
|
3219
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._c543yfkcelkno3idkccogkevua/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
3163
3220
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
3164
3221
|
var DIALOG_NAME = "Dialog";
|
|
3165
3222
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
@@ -5942,11 +5999,11 @@ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
|
5942
5999
|
var React37 = __toESM(require("react"), 1);
|
|
5943
6000
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
5944
6001
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
5945
|
-
var import_react8 = require("react");
|
|
5946
6002
|
var import_react9 = require("react");
|
|
6003
|
+
var import_react10 = require("react");
|
|
5947
6004
|
var import_qr_code_styling = __toESM(require_qr_code_styling(), 1);
|
|
5948
6005
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
5949
|
-
var
|
|
6006
|
+
var import_react11 = require("react");
|
|
5950
6007
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
5951
6008
|
|
|
5952
6009
|
// ../core/dist/index.mjs
|
|
@@ -5954,6 +6011,30 @@ var import_react_query2 = require("@tanstack/react-query");
|
|
|
5954
6011
|
var API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.unifold.io";
|
|
5955
6012
|
var DEFAULT_PUBLISHABLE_KEY = "pk_test_123";
|
|
5956
6013
|
var DEFAULT_CONFIG = {};
|
|
6014
|
+
function setApiConfig(config) {
|
|
6015
|
+
if (config.publishableKey !== void 0) {
|
|
6016
|
+
if (!config.publishableKey || config.publishableKey.trim() === "") {
|
|
6017
|
+
throw new Error(
|
|
6018
|
+
"Unifold SDK: publishableKey cannot be empty. Please provide a valid publishable key."
|
|
6019
|
+
);
|
|
6020
|
+
}
|
|
6021
|
+
if (!config.publishableKey.startsWith("pk_test_") && !config.publishableKey.startsWith("pk_live_")) {
|
|
6022
|
+
console.warn(
|
|
6023
|
+
'Unifold SDK: publishableKey should start with "pk_test_" or "pk_live_". Please ensure you are using a valid publishable key.'
|
|
6024
|
+
);
|
|
6025
|
+
}
|
|
6026
|
+
DEFAULT_PUBLISHABLE_KEY = config.publishableKey;
|
|
6027
|
+
}
|
|
6028
|
+
if (config.baseUrl) {
|
|
6029
|
+
API_BASE_URL = config.baseUrl;
|
|
6030
|
+
}
|
|
6031
|
+
if (config.defaultConfig) {
|
|
6032
|
+
DEFAULT_CONFIG = config.defaultConfig;
|
|
6033
|
+
}
|
|
6034
|
+
}
|
|
6035
|
+
function getApiBaseUrl() {
|
|
6036
|
+
return API_BASE_URL;
|
|
6037
|
+
}
|
|
5957
6038
|
function validatePublishableKey(key) {
|
|
5958
6039
|
if (!key || key.trim() === "") {
|
|
5959
6040
|
throw new Error(
|
|
@@ -6018,6 +6099,7 @@ var ExecutionStatus = /* @__PURE__ */ ((ExecutionStatus2) => {
|
|
|
6018
6099
|
ExecutionStatus2["WAITING"] = "waiting";
|
|
6019
6100
|
return ExecutionStatus2;
|
|
6020
6101
|
})(ExecutionStatus || {});
|
|
6102
|
+
var SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
6021
6103
|
async function queryExecutions(externalUserId, publishableKey) {
|
|
6022
6104
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
6023
6105
|
validatePublishableKey(pk);
|
|
@@ -6162,17 +6244,127 @@ async function getProjectConfig(publishableKey) {
|
|
|
6162
6244
|
}
|
|
6163
6245
|
return response.json();
|
|
6164
6246
|
}
|
|
6247
|
+
async function getIpViaIpApi() {
|
|
6248
|
+
const url = "https://ipapi.co/json";
|
|
6249
|
+
const response = await fetch(url);
|
|
6250
|
+
if (!response.ok) {
|
|
6251
|
+
throw new Error(`ipapi.co failed: ${response.statusText}`);
|
|
6252
|
+
}
|
|
6253
|
+
const data = await response.json();
|
|
6254
|
+
return {
|
|
6255
|
+
alpha2: data.country_code.toLowerCase(),
|
|
6256
|
+
state: data.region_code?.toLowerCase()
|
|
6257
|
+
};
|
|
6258
|
+
}
|
|
6259
|
+
function useUserIp() {
|
|
6260
|
+
const {
|
|
6261
|
+
data: userIpInfo,
|
|
6262
|
+
isLoading,
|
|
6263
|
+
error
|
|
6264
|
+
} = (0, import_react_query2.useQuery)({
|
|
6265
|
+
queryKey: ["getUserIpInfo"],
|
|
6266
|
+
queryFn: async () => {
|
|
6267
|
+
try {
|
|
6268
|
+
const ipApiData = await getIpViaIpApi();
|
|
6269
|
+
console.log("IP detected via ipapi.co:", ipApiData);
|
|
6270
|
+
return ipApiData;
|
|
6271
|
+
} catch (ipApiError) {
|
|
6272
|
+
console.error("IP detection failed:", ipApiError);
|
|
6273
|
+
throw ipApiError;
|
|
6274
|
+
}
|
|
6275
|
+
},
|
|
6276
|
+
// Cache configuration to reduce API calls
|
|
6277
|
+
refetchOnMount: false,
|
|
6278
|
+
refetchOnReconnect: true,
|
|
6279
|
+
refetchOnWindowFocus: false,
|
|
6280
|
+
// Optional: Increase cache duration to 1 hour for even better rate limit protection
|
|
6281
|
+
staleTime: 1e3 * 60 * 60,
|
|
6282
|
+
// 1 hour - data considered fresh for 1 hour
|
|
6283
|
+
gcTime: 1e3 * 60 * 60 * 24
|
|
6284
|
+
// 24 hours - keep in cache for 24 hours
|
|
6285
|
+
});
|
|
6286
|
+
return {
|
|
6287
|
+
userIpInfo,
|
|
6288
|
+
isLoading,
|
|
6289
|
+
error
|
|
6290
|
+
};
|
|
6291
|
+
}
|
|
6292
|
+
var en_default = {
|
|
6293
|
+
transferCrypto: {
|
|
6294
|
+
priceImpact: {
|
|
6295
|
+
label: "Price impact",
|
|
6296
|
+
tooltip: "Price impact reflects the difference between the expected price and the final execution price, influenced by trade size and available liquidity. Larger trades may move the market price during execution.",
|
|
6297
|
+
finalCost: "The final cost reflects price impact and may vary depending on market and network conditions. Larger trade sizes typically benefit from lower relative costs."
|
|
6298
|
+
},
|
|
6299
|
+
slippage: {
|
|
6300
|
+
label: "Max slippage",
|
|
6301
|
+
auto: "Auto",
|
|
6302
|
+
tooltip: "Slippage represents price changes that can occur while a transaction is being processed. Slippage is dynamically adjusted per trading pair to support reliable execution during market movements.",
|
|
6303
|
+
finalCost: "The final cost includes any slippage and may change based on real-time network conditions. Costs are generally reduced for larger transaction amounts."
|
|
6304
|
+
},
|
|
6305
|
+
processingTime: {
|
|
6306
|
+
label: "Processing time",
|
|
6307
|
+
lessThanMinutes: "< {{minutes}} min",
|
|
6308
|
+
lessThanHours: "< {{hours}} hr"
|
|
6309
|
+
},
|
|
6310
|
+
minDeposit: {
|
|
6311
|
+
label: "min",
|
|
6312
|
+
tooltip: "The minimum amount you can deposit on the selected network."
|
|
6313
|
+
},
|
|
6314
|
+
help: {
|
|
6315
|
+
needHelp: "Need help?",
|
|
6316
|
+
contactSupport: "Contact support"
|
|
6317
|
+
},
|
|
6318
|
+
terms: {
|
|
6319
|
+
termsApply: "Terms apply"
|
|
6320
|
+
},
|
|
6321
|
+
supportedToken: "Supported token",
|
|
6322
|
+
supportedChain: "Supported chain",
|
|
6323
|
+
depositAddress: {
|
|
6324
|
+
label: "Your deposit address",
|
|
6325
|
+
tooltip: "Send any supported token to this address, and it will be automatically converted to {{token}} in your account."
|
|
6326
|
+
},
|
|
6327
|
+
copyAddress: "Copy address",
|
|
6328
|
+
copied: "Copied!",
|
|
6329
|
+
loading: "Loading...",
|
|
6330
|
+
loadingQRCode: "Loading QR Code...",
|
|
6331
|
+
noAddressAvailable: "No address available",
|
|
6332
|
+
noChainsAvailable: "No chains available for this token"
|
|
6333
|
+
},
|
|
6334
|
+
depositModal: {
|
|
6335
|
+
transferCrypto: {
|
|
6336
|
+
title: "Transfer Crypto",
|
|
6337
|
+
subtitle: "No limit \u2022 Instant"
|
|
6338
|
+
},
|
|
6339
|
+
depositWithCard: {
|
|
6340
|
+
title: "Deposit with Card",
|
|
6341
|
+
subtitle: "$50,000 limit \u2022 2 min"
|
|
6342
|
+
},
|
|
6343
|
+
quotes: "Quotes"
|
|
6344
|
+
},
|
|
6345
|
+
buyWithCard: {
|
|
6346
|
+
onramp: {
|
|
6347
|
+
completeTransaction: "Complete transaction with {{provider}}",
|
|
6348
|
+
canCloseModal: "You can close this modal.",
|
|
6349
|
+
youUse: "You use",
|
|
6350
|
+
youBuy: "You buy",
|
|
6351
|
+
youReceive: "You receive",
|
|
6352
|
+
intentAddressNote: "The wallet address displayed in the payment provider is a temporary deposit address. Your funds will be automatically converted and deposited into your account."
|
|
6353
|
+
}
|
|
6354
|
+
}
|
|
6355
|
+
};
|
|
6356
|
+
var i18n = en_default;
|
|
6165
6357
|
|
|
6166
6358
|
// ../ui-react/dist/index.mjs
|
|
6167
6359
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
6168
|
-
var
|
|
6360
|
+
var import_react12 = require("react");
|
|
6169
6361
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
6170
6362
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
6171
|
-
var
|
|
6363
|
+
var import_react13 = require("react");
|
|
6172
6364
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
6173
6365
|
var React38 = __toESM(require("react"), 1);
|
|
6174
6366
|
|
|
6175
|
-
// ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@
|
|
6367
|
+
// ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_5n4syhs66qrtkkphe44qzgdimq/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
6176
6368
|
var React34 = __toESM(require("react"), 1);
|
|
6177
6369
|
var ReactDOM4 = __toESM(require("react-dom"), 1);
|
|
6178
6370
|
|
|
@@ -6181,10 +6373,10 @@ function clamp(value, [min2, max2]) {
|
|
|
6181
6373
|
return Math.min(max2, Math.max(min2, value));
|
|
6182
6374
|
}
|
|
6183
6375
|
|
|
6184
|
-
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@
|
|
6185
|
-
var import_react4 = __toESM(require("react"), 1);
|
|
6186
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
6376
|
+
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19_532r4g3s7qk4zcqxxtldqwghxu/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
6187
6377
|
var import_react5 = __toESM(require("react"), 1);
|
|
6378
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
6379
|
+
var import_react6 = __toESM(require("react"), 1);
|
|
6188
6380
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
6189
6381
|
function createCollection(name) {
|
|
6190
6382
|
const PROVIDER_NAME2 = name + "CollectionProvider";
|
|
@@ -6195,14 +6387,14 @@ function createCollection(name) {
|
|
|
6195
6387
|
);
|
|
6196
6388
|
const CollectionProvider = (props) => {
|
|
6197
6389
|
const { scope, children } = props;
|
|
6198
|
-
const ref =
|
|
6199
|
-
const itemMap =
|
|
6390
|
+
const ref = import_react5.default.useRef(null);
|
|
6391
|
+
const itemMap = import_react5.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
6200
6392
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
6201
6393
|
};
|
|
6202
6394
|
CollectionProvider.displayName = PROVIDER_NAME2;
|
|
6203
6395
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
6204
6396
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
6205
|
-
const CollectionSlot =
|
|
6397
|
+
const CollectionSlot = import_react5.default.forwardRef(
|
|
6206
6398
|
(props, forwardedRef) => {
|
|
6207
6399
|
const { scope, children } = props;
|
|
6208
6400
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
@@ -6214,13 +6406,13 @@ function createCollection(name) {
|
|
|
6214
6406
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
6215
6407
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
6216
6408
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
6217
|
-
const CollectionItemSlot =
|
|
6409
|
+
const CollectionItemSlot = import_react5.default.forwardRef(
|
|
6218
6410
|
(props, forwardedRef) => {
|
|
6219
6411
|
const { scope, children, ...itemData } = props;
|
|
6220
|
-
const ref =
|
|
6412
|
+
const ref = import_react5.default.useRef(null);
|
|
6221
6413
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
6222
6414
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
6223
|
-
|
|
6415
|
+
import_react5.default.useEffect(() => {
|
|
6224
6416
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
6225
6417
|
return () => void context.itemMap.delete(ref);
|
|
6226
6418
|
});
|
|
@@ -6230,7 +6422,7 @@ function createCollection(name) {
|
|
|
6230
6422
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
6231
6423
|
function useCollection2(scope) {
|
|
6232
6424
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
6233
|
-
const getItems =
|
|
6425
|
+
const getItems = import_react5.default.useCallback(() => {
|
|
6234
6426
|
const collectionNode = context.collectionRef.current;
|
|
6235
6427
|
if (!collectionNode) return [];
|
|
6236
6428
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -6249,7 +6441,7 @@ function createCollection(name) {
|
|
|
6249
6441
|
];
|
|
6250
6442
|
}
|
|
6251
6443
|
|
|
6252
|
-
// ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@
|
|
6444
|
+
// ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
6253
6445
|
var React27 = __toESM(require("react"), 1);
|
|
6254
6446
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
6255
6447
|
var DirectionContext = React27.createContext(void 0);
|
|
@@ -6258,7 +6450,7 @@ function useDirection(localDir) {
|
|
|
6258
6450
|
return localDir || globalDir || "ltr";
|
|
6259
6451
|
}
|
|
6260
6452
|
|
|
6261
|
-
// ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@
|
|
6453
|
+
// ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_64rpffaf3sso2bzgb3su5jbaxm/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
6262
6454
|
var React31 = __toESM(require("react"), 1);
|
|
6263
6455
|
|
|
6264
6456
|
// ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
@@ -7869,12 +8061,12 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
7869
8061
|
|
|
7870
8062
|
// ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
7871
8063
|
var React28 = __toESM(require("react"), 1);
|
|
7872
|
-
var
|
|
8064
|
+
var import_react7 = require("react");
|
|
7873
8065
|
var ReactDOM3 = __toESM(require("react-dom"), 1);
|
|
7874
8066
|
var isClient = typeof document !== "undefined";
|
|
7875
8067
|
var noop = function noop2() {
|
|
7876
8068
|
};
|
|
7877
|
-
var index = isClient ?
|
|
8069
|
+
var index = isClient ? import_react7.useLayoutEffect : noop;
|
|
7878
8070
|
function deepEqual(a, b) {
|
|
7879
8071
|
if (a === b) {
|
|
7880
8072
|
return true;
|
|
@@ -8151,7 +8343,7 @@ var arrow3 = (options, deps) => ({
|
|
|
8151
8343
|
options: [options, deps]
|
|
8152
8344
|
});
|
|
8153
8345
|
|
|
8154
|
-
// ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@
|
|
8346
|
+
// ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9__3k7jfnq3g5zq63z6pm7q63bd4u/node_modules/@radix-ui/react-arrow/dist/index.mjs
|
|
8155
8347
|
var React29 = __toESM(require("react"), 1);
|
|
8156
8348
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
8157
8349
|
var NAME = "Arrow";
|
|
@@ -8173,7 +8365,7 @@ var Arrow = React29.forwardRef((props, forwardedRef) => {
|
|
|
8173
8365
|
Arrow.displayName = NAME;
|
|
8174
8366
|
var Root2 = Arrow;
|
|
8175
8367
|
|
|
8176
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@
|
|
8368
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
8177
8369
|
var React30 = __toESM(require("react"), 1);
|
|
8178
8370
|
function useSize(element) {
|
|
8179
8371
|
const [size4, setSize] = React30.useState(void 0);
|
|
@@ -8210,7 +8402,7 @@ function useSize(element) {
|
|
|
8210
8402
|
return size4;
|
|
8211
8403
|
}
|
|
8212
8404
|
|
|
8213
|
-
// ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@
|
|
8405
|
+
// ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_64rpffaf3sso2bzgb3su5jbaxm/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
8214
8406
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
8215
8407
|
var POPPER_NAME = "Popper";
|
|
8216
8408
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
@@ -8482,7 +8674,7 @@ var Anchor = PopperAnchor;
|
|
|
8482
8674
|
var Content2 = PopperContent;
|
|
8483
8675
|
var Arrow2 = PopperArrow;
|
|
8484
8676
|
|
|
8485
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@
|
|
8677
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
8486
8678
|
var React32 = __toESM(require("react"), 1);
|
|
8487
8679
|
function usePrevious(value) {
|
|
8488
8680
|
const ref = React32.useRef({ value, previous: value });
|
|
@@ -8495,7 +8687,7 @@ function usePrevious(value) {
|
|
|
8495
8687
|
}, [value]);
|
|
8496
8688
|
}
|
|
8497
8689
|
|
|
8498
|
-
// ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@
|
|
8690
|
+
// ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+rea_wt7sdqfyqu7fggokpnlq4zaz2e/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
8499
8691
|
var React33 = __toESM(require("react"), 1);
|
|
8500
8692
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
8501
8693
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
@@ -8527,7 +8719,7 @@ var VisuallyHidden = React33.forwardRef(
|
|
|
8527
8719
|
VisuallyHidden.displayName = NAME2;
|
|
8528
8720
|
var Root3 = VisuallyHidden;
|
|
8529
8721
|
|
|
8530
|
-
// ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@
|
|
8722
|
+
// ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_5n4syhs66qrtkkphe44qzgdimq/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
8531
8723
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
8532
8724
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
8533
8725
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
@@ -9648,7 +9840,7 @@ function wrapArray(array, startIndex) {
|
|
|
9648
9840
|
var Root23 = Select;
|
|
9649
9841
|
var Trigger = SelectTrigger;
|
|
9650
9842
|
var Value = SelectValue;
|
|
9651
|
-
var
|
|
9843
|
+
var Icon2 = SelectIcon;
|
|
9652
9844
|
var Portal3 = SelectPortal;
|
|
9653
9845
|
var Content22 = SelectContent;
|
|
9654
9846
|
var Viewport = SelectViewport;
|
|
@@ -9664,7 +9856,7 @@ var Separator = SelectSeparator;
|
|
|
9664
9856
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
9665
9857
|
var React42 = __toESM(require("react"), 1);
|
|
9666
9858
|
|
|
9667
|
-
// ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@
|
|
9859
|
+
// ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._aqltx4jspgwttwvtzmq3z5uagy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
9668
9860
|
var React35 = __toESM(require("react"), 1);
|
|
9669
9861
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
9670
9862
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
@@ -10145,8 +10337,8 @@ var Content23 = TooltipContent;
|
|
|
10145
10337
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
10146
10338
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
10147
10339
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
10148
|
-
var import_react13 = require("react");
|
|
10149
10340
|
var import_react14 = require("react");
|
|
10341
|
+
var import_react15 = require("react");
|
|
10150
10342
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
10151
10343
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
10152
10344
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
@@ -10159,7 +10351,7 @@ var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
|
10159
10351
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
10160
10352
|
var React52 = __toESM(require("react"), 1);
|
|
10161
10353
|
|
|
10162
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@
|
|
10354
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
10163
10355
|
var React36 = __toESM(require("react"), 1);
|
|
10164
10356
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
10165
10357
|
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
@@ -10430,9 +10622,9 @@ function StyledQRCode({
|
|
|
10430
10622
|
imageSize = 50,
|
|
10431
10623
|
darkMode = false
|
|
10432
10624
|
}) {
|
|
10433
|
-
const ref = (0,
|
|
10434
|
-
const qrCodeRef = (0,
|
|
10435
|
-
(0,
|
|
10625
|
+
const ref = (0, import_react10.useRef)(null);
|
|
10626
|
+
const qrCodeRef = (0, import_react10.useRef)(null);
|
|
10627
|
+
(0, import_react10.useEffect)(() => {
|
|
10436
10628
|
if (!ref.current) return;
|
|
10437
10629
|
if (!qrCodeRef.current) {
|
|
10438
10630
|
qrCodeRef.current = new import_qr_code_styling.default({
|
|
@@ -10472,7 +10664,7 @@ function StyledQRCode({
|
|
|
10472
10664
|
qrCodeRef.current.append(ref.current);
|
|
10473
10665
|
}
|
|
10474
10666
|
}, []);
|
|
10475
|
-
(0,
|
|
10667
|
+
(0, import_react10.useEffect)(() => {
|
|
10476
10668
|
if (qrCodeRef.current) {
|
|
10477
10669
|
qrCodeRef.current.update({
|
|
10478
10670
|
data: value,
|
|
@@ -10643,12 +10835,12 @@ function formatCurrency(currency) {
|
|
|
10643
10835
|
return currency.slice(0, dotIndex).toUpperCase() + currency.slice(dotIndex);
|
|
10644
10836
|
}
|
|
10645
10837
|
function DepositDetailContent({ execution }) {
|
|
10646
|
-
const [chains, setChains] = (0,
|
|
10647
|
-
const [showNetworkDetails, setShowNetworkDetails] = (0,
|
|
10648
|
-
(0,
|
|
10838
|
+
const [chains, setChains] = (0, import_react12.useState)([]);
|
|
10839
|
+
const [showNetworkDetails, setShowNetworkDetails] = (0, import_react12.useState)(false);
|
|
10840
|
+
(0, import_react12.useEffect)(() => {
|
|
10649
10841
|
getTokenChains().then((response) => setChains(response.data)).catch((err) => console.error("Failed to fetch chains:", err));
|
|
10650
10842
|
}, []);
|
|
10651
|
-
(0,
|
|
10843
|
+
(0, import_react12.useEffect)(() => {
|
|
10652
10844
|
setShowNetworkDetails(false);
|
|
10653
10845
|
}, [execution?.id]);
|
|
10654
10846
|
const isPending = execution.status === ExecutionStatus.PENDING || execution.status === ExecutionStatus.WAITING || execution.status === ExecutionStatus.DELAYED;
|
|
@@ -10858,9 +11050,9 @@ function DepositsModal({
|
|
|
10858
11050
|
publishableKey,
|
|
10859
11051
|
themeClass = ""
|
|
10860
11052
|
}) {
|
|
10861
|
-
const [allExecutions, setAllExecutions] = (0,
|
|
10862
|
-
const [selectedExecution, setSelectedExecution] = (0,
|
|
10863
|
-
(0,
|
|
11053
|
+
const [allExecutions, setAllExecutions] = (0, import_react11.useState)(sessionExecutions);
|
|
11054
|
+
const [selectedExecution, setSelectedExecution] = (0, import_react11.useState)(null);
|
|
11055
|
+
(0, import_react11.useEffect)(() => {
|
|
10864
11056
|
if (!open || !userId) return;
|
|
10865
11057
|
const fetchExecutions = async () => {
|
|
10866
11058
|
try {
|
|
@@ -10877,12 +11069,12 @@ function DepositsModal({
|
|
|
10877
11069
|
}
|
|
10878
11070
|
};
|
|
10879
11071
|
fetchExecutions();
|
|
10880
|
-
const pollInterval = setInterval(fetchExecutions,
|
|
11072
|
+
const pollInterval = setInterval(fetchExecutions, 3e3);
|
|
10881
11073
|
return () => {
|
|
10882
11074
|
clearInterval(pollInterval);
|
|
10883
11075
|
};
|
|
10884
11076
|
}, [open, userId, publishableKey, sessionExecutions]);
|
|
10885
|
-
(0,
|
|
11077
|
+
(0, import_react11.useEffect)(() => {
|
|
10886
11078
|
if (!open) {
|
|
10887
11079
|
setSelectedExecution(null);
|
|
10888
11080
|
}
|
|
@@ -10941,7 +11133,7 @@ function DepositSuccessToast({
|
|
|
10941
11133
|
onClose,
|
|
10942
11134
|
execution
|
|
10943
11135
|
}) {
|
|
10944
|
-
const [detailModalOpen, setDetailModalOpen] = (0,
|
|
11136
|
+
const [detailModalOpen, setDetailModalOpen] = (0, import_react13.useState)(false);
|
|
10945
11137
|
const { themeClass } = useTheme();
|
|
10946
11138
|
const isPending = status === ExecutionStatus.PENDING || status === ExecutionStatus.WAITING || status === ExecutionStatus.DELAYED;
|
|
10947
11139
|
const formatDateTime = (timestamp) => {
|
|
@@ -11107,7 +11299,7 @@ var SelectTrigger2 = React38.forwardRef(({ className, children, ...props }, ref)
|
|
|
11107
11299
|
...props,
|
|
11108
11300
|
children: [
|
|
11109
11301
|
children,
|
|
11110
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
11302
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronDown, { className: "uf-h-4 uf-w-4 uf-opacity-50" }) })
|
|
11111
11303
|
]
|
|
11112
11304
|
}
|
|
11113
11305
|
));
|
|
@@ -11184,7 +11376,7 @@ var SelectItem2 = React38.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
11184
11376
|
{
|
|
11185
11377
|
ref,
|
|
11186
11378
|
className: cn(
|
|
11187
|
-
"uf-relative uf-flex uf-w-full uf-cursor-default uf-select-none uf-items-center uf-rounded-sm uf-py-1.5 uf-pl-8 uf-pr-2 uf-text-sm uf-text-foreground uf-outline-none focus:uf-bg-accent focus:uf-text-accent-foreground data-[disabled]:uf-pointer-events-none data-[disabled]:uf-opacity-50 hover:uf-bg-accent",
|
|
11379
|
+
"uf-relative uf-flex uf-w-full uf-cursor-default uf-select-none uf-items-center uf-rounded-sm uf-py-1.5 uf-pl-8 uf-pr-2 uf-text-sm uf-text-foreground uf-outline-none focus:uf-bg-accent focus:uf-text-accent-foreground data-[disabled]:uf-pointer-events-none data-[disabled]:uf-opacity-50 hover:uf-bg-accent [&>span]:uf-flex-1",
|
|
11188
11380
|
className
|
|
11189
11381
|
),
|
|
11190
11382
|
...props,
|
|
@@ -11224,7 +11416,7 @@ var TooltipContent2 = React42.forwardRef(({ className, sideOffset = 4, ...props
|
|
|
11224
11416
|
) });
|
|
11225
11417
|
});
|
|
11226
11418
|
TooltipContent2.displayName = Content23.displayName;
|
|
11227
|
-
var
|
|
11419
|
+
var en_default2 = {
|
|
11228
11420
|
transferCrypto: {
|
|
11229
11421
|
priceImpact: {
|
|
11230
11422
|
label: "Price impact",
|
|
@@ -11288,7 +11480,7 @@ var en_default = {
|
|
|
11288
11480
|
}
|
|
11289
11481
|
}
|
|
11290
11482
|
};
|
|
11291
|
-
var i18n2 =
|
|
11483
|
+
var i18n2 = en_default2;
|
|
11292
11484
|
var t = i18n2.transferCrypto;
|
|
11293
11485
|
var getChainKey = (chainId, chainType) => {
|
|
11294
11486
|
return `${chainType}:${chainId}`;
|
|
@@ -11313,20 +11505,20 @@ function TransferCryptoBase({
|
|
|
11313
11505
|
}) {
|
|
11314
11506
|
const { themeClass } = useTheme();
|
|
11315
11507
|
const isDarkMode = themeClass.includes("uf-dark");
|
|
11316
|
-
const [token, setToken] = (0,
|
|
11317
|
-
const [chain, setChain] = (0,
|
|
11318
|
-
const [copied, setCopied] = (0,
|
|
11319
|
-
const [internalWallets, setInternalWallets] = (0,
|
|
11320
|
-
const [loading, setLoading] = (0,
|
|
11508
|
+
const [token, setToken] = (0, import_react9.useState)("USDC");
|
|
11509
|
+
const [chain, setChain] = (0, import_react9.useState)("solana:mainnet");
|
|
11510
|
+
const [copied, setCopied] = (0, import_react9.useState)(false);
|
|
11511
|
+
const [internalWallets, setInternalWallets] = (0, import_react9.useState)([]);
|
|
11512
|
+
const [loading, setLoading] = (0, import_react9.useState)(!externalWallets?.length);
|
|
11321
11513
|
const wallets = externalWallets?.length ? externalWallets : internalWallets;
|
|
11322
|
-
const [error, setError] = (0,
|
|
11323
|
-
const [depositExecutions, setDepositExecutions] = (0,
|
|
11324
|
-
const [trackedExecutions, setTrackedExecutions] = (0,
|
|
11325
|
-
const [modalOpenedAt, setModalOpenedAt] = (0,
|
|
11326
|
-
const [supportedTokens, setSupportedTokens] = (0,
|
|
11327
|
-
const [tokensLoading, setTokensLoading] = (0,
|
|
11328
|
-
const [detailsExpanded, setDetailsExpanded] = (0,
|
|
11329
|
-
const [depositsModalOpen, setDepositsModalOpen] = (0,
|
|
11514
|
+
const [error, setError] = (0, import_react9.useState)(null);
|
|
11515
|
+
const [depositExecutions, setDepositExecutions] = (0, import_react9.useState)([]);
|
|
11516
|
+
const [trackedExecutions, setTrackedExecutions] = (0, import_react9.useState)(/* @__PURE__ */ new Map());
|
|
11517
|
+
const [modalOpenedAt, setModalOpenedAt] = (0, import_react9.useState)(null);
|
|
11518
|
+
const [supportedTokens, setSupportedTokens] = (0, import_react9.useState)([]);
|
|
11519
|
+
const [tokensLoading, setTokensLoading] = (0, import_react9.useState)(true);
|
|
11520
|
+
const [detailsExpanded, setDetailsExpanded] = (0, import_react9.useState)(false);
|
|
11521
|
+
const [depositsModalOpen, setDepositsModalOpen] = (0, import_react9.useState)(false);
|
|
11330
11522
|
const allChainsMap = /* @__PURE__ */ new Map();
|
|
11331
11523
|
supportedTokens.forEach((t4) => {
|
|
11332
11524
|
t4.chains.forEach((c) => {
|
|
@@ -11344,10 +11536,10 @@ function TransferCryptoBase({
|
|
|
11344
11536
|
const currentChainType = currentChainData?.chain_type || "ethereum";
|
|
11345
11537
|
const currentWallet = getWalletByChainType(wallets, currentChainType);
|
|
11346
11538
|
const depositAddress = currentWallet?.address || "";
|
|
11347
|
-
(0,
|
|
11539
|
+
(0, import_react9.useEffect)(() => {
|
|
11348
11540
|
setModalOpenedAt(/* @__PURE__ */ new Date());
|
|
11349
11541
|
}, []);
|
|
11350
|
-
(0,
|
|
11542
|
+
(0, import_react9.useEffect)(() => {
|
|
11351
11543
|
async function fetchSupportedTokens() {
|
|
11352
11544
|
try {
|
|
11353
11545
|
setTokensLoading(true);
|
|
@@ -11376,12 +11568,12 @@ function TransferCryptoBase({
|
|
|
11376
11568
|
}
|
|
11377
11569
|
fetchSupportedTokens();
|
|
11378
11570
|
}, [publishableKey, chain]);
|
|
11379
|
-
(0,
|
|
11571
|
+
(0, import_react9.useEffect)(() => {
|
|
11380
11572
|
if (onExecutionsChange) {
|
|
11381
11573
|
onExecutionsChange(depositExecutions);
|
|
11382
11574
|
}
|
|
11383
11575
|
}, [depositExecutions, onExecutionsChange]);
|
|
11384
|
-
(0,
|
|
11576
|
+
(0, import_react9.useEffect)(() => {
|
|
11385
11577
|
if (externalWallets?.length) {
|
|
11386
11578
|
setLoading(false);
|
|
11387
11579
|
return;
|
|
@@ -11436,7 +11628,7 @@ function TransferCryptoBase({
|
|
|
11436
11628
|
publishableKey,
|
|
11437
11629
|
externalWallets
|
|
11438
11630
|
]);
|
|
11439
|
-
(0,
|
|
11631
|
+
(0, import_react9.useEffect)(() => {
|
|
11440
11632
|
if (!supportedTokens.length) return;
|
|
11441
11633
|
const currentToken = supportedTokens.find((t4) => t4.symbol === token);
|
|
11442
11634
|
if (!currentToken || currentToken.chains.length === 0) return;
|
|
@@ -11450,7 +11642,7 @@ function TransferCryptoBase({
|
|
|
11450
11642
|
setChain(newChain);
|
|
11451
11643
|
}
|
|
11452
11644
|
}, [token, supportedTokens, chain]);
|
|
11453
|
-
(0,
|
|
11645
|
+
(0, import_react9.useEffect)(() => {
|
|
11454
11646
|
if (!userId || !modalOpenedAt) return;
|
|
11455
11647
|
const pollInterval = setInterval(async () => {
|
|
11456
11648
|
try {
|
|
@@ -11514,7 +11706,7 @@ function TransferCryptoBase({
|
|
|
11514
11706
|
});
|
|
11515
11707
|
}
|
|
11516
11708
|
}
|
|
11517
|
-
},
|
|
11709
|
+
}, 3e3);
|
|
11518
11710
|
return () => clearInterval(pollInterval);
|
|
11519
11711
|
}, [
|
|
11520
11712
|
userId,
|
|
@@ -11572,20 +11764,26 @@ function TransferCryptoBase({
|
|
|
11572
11764
|
showDetailedDropdowns && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "uf-text-xs uf-text-muted-foreground", children: tokenData.name })
|
|
11573
11765
|
] });
|
|
11574
11766
|
};
|
|
11575
|
-
const renderChainItem = (chainData) => {
|
|
11576
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "uf-flex uf-items-center uf-
|
|
11577
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11767
|
+
const renderChainItem = (chainData, showMinDeposit = false) => {
|
|
11768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "uf-flex uf-items-center uf-justify-between uf-w-full", children: [
|
|
11769
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
11770
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11771
|
+
"img",
|
|
11772
|
+
{
|
|
11773
|
+
src: chainData.icon_url,
|
|
11774
|
+
alt: chainData.chain_name,
|
|
11775
|
+
width: 20,
|
|
11776
|
+
height: 20,
|
|
11777
|
+
className: "uf-rounded-full uf-flex-shrink-0"
|
|
11778
|
+
}
|
|
11779
|
+
),
|
|
11780
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name }),
|
|
11781
|
+
showDetailedDropdowns && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "uf-text-xs uf-text-muted-foreground uf-capitalize", children: chainData.chain_type })
|
|
11782
|
+
] }),
|
|
11783
|
+
showMinDeposit && chainData.minimum_deposit_amount_usd && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "uf-text-xs uf-text-amber-400 uf-font-medium", children: [
|
|
11784
|
+
"$",
|
|
11785
|
+
chainData.minimum_deposit_amount_usd
|
|
11786
|
+
] })
|
|
11589
11787
|
] });
|
|
11590
11788
|
};
|
|
11591
11789
|
const selectContainerClass = layoutVariant === "horizontal" ? "uf-grid uf-grid-cols-2 uf-gap-2.5" : "uf-space-y-3";
|
|
@@ -11617,7 +11815,7 @@ function TransferCryptoBase({
|
|
|
11617
11815
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
11618
11816
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
|
|
11619
11817
|
t.supportedChain,
|
|
11620
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "uf-text-
|
|
11818
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "uf-text-amber-400 uf-font-medium", children: [
|
|
11621
11819
|
"$",
|
|
11622
11820
|
minDepositUsd,
|
|
11623
11821
|
" ",
|
|
@@ -11631,7 +11829,7 @@ function TransferCryptoBase({
|
|
|
11631
11829
|
tabIndex: 0,
|
|
11632
11830
|
role: "button",
|
|
11633
11831
|
"aria-label": "Minimum deposit information",
|
|
11634
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Info, { className: "uf-w-
|
|
11832
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Info, { className: "uf-w-4 uf-h-4" })
|
|
11635
11833
|
}
|
|
11636
11834
|
) }),
|
|
11637
11835
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
@@ -11653,7 +11851,7 @@ function TransferCryptoBase({
|
|
|
11653
11851
|
disabled: tokensLoading || availableChainsForToken.length === 0,
|
|
11654
11852
|
children: [
|
|
11655
11853
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(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__ */ (0, import_jsx_runtime28.jsx)(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
|
|
11656
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
|
|
11854
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectContent2, { align: "end", className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px] uf-min-w-[200px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
|
|
11657
11855
|
const chainKey = getChainKey(
|
|
11658
11856
|
chainData.chain_id,
|
|
11659
11857
|
chainData.chain_type
|
|
@@ -11663,7 +11861,7 @@ function TransferCryptoBase({
|
|
|
11663
11861
|
{
|
|
11664
11862
|
value: chainKey,
|
|
11665
11863
|
className: "focus:uf-bg-accent focus:uf-text-foreground",
|
|
11666
|
-
children: renderChainItem(chainData)
|
|
11864
|
+
children: renderChainItem(chainData, true)
|
|
11667
11865
|
},
|
|
11668
11866
|
`${chainData.chain_id}-${chainData.chain_type}`
|
|
11669
11867
|
);
|
|
@@ -11974,7 +12172,7 @@ function CurrencyModal({
|
|
|
11974
12172
|
onSelectCurrency,
|
|
11975
12173
|
themeClass = ""
|
|
11976
12174
|
}) {
|
|
11977
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
12175
|
+
const [searchQuery, setSearchQuery] = (0, import_react15.useState)("");
|
|
11978
12176
|
const preferredCurrencies = preferredCurrencyCodes.map(
|
|
11979
12177
|
(code) => currencies.find(
|
|
11980
12178
|
(currency) => currency.currency_code.toLowerCase() === code.toLowerCase()
|
|
@@ -12048,7 +12246,7 @@ function CurrencyModal({
|
|
|
12048
12246
|
] }) })
|
|
12049
12247
|
] }) });
|
|
12050
12248
|
}
|
|
12051
|
-
async function
|
|
12249
|
+
async function getIpViaIpApi2() {
|
|
12052
12250
|
const url = "https://ipapi.co/json";
|
|
12053
12251
|
const response = await fetch(url);
|
|
12054
12252
|
if (!response.ok) {
|
|
@@ -12069,7 +12267,7 @@ function useUserIp2() {
|
|
|
12069
12267
|
queryKey: ["getUserIpInfo"],
|
|
12070
12268
|
queryFn: async () => {
|
|
12071
12269
|
try {
|
|
12072
|
-
const ipApiData = await
|
|
12270
|
+
const ipApiData = await getIpViaIpApi2();
|
|
12073
12271
|
console.log("IP detected via ipapi.co:", ipApiData);
|
|
12074
12272
|
return ipApiData;
|
|
12075
12273
|
} catch (ipApiError) {
|
|
@@ -12123,21 +12321,21 @@ function BuyWithCard({
|
|
|
12123
12321
|
wallets: externalWallets,
|
|
12124
12322
|
assetCdnUrl
|
|
12125
12323
|
}) {
|
|
12126
|
-
const [amount, setAmount] = (0,
|
|
12127
|
-
const [currency, setCurrency] = (0,
|
|
12128
|
-
const [showCurrencyModal, setShowCurrencyModal] = (0,
|
|
12129
|
-
const [quotes, setQuotes] = (0,
|
|
12130
|
-
const [quotesLoading, setQuotesLoading] = (0,
|
|
12131
|
-
const [quotesError, setQuotesError] = (0,
|
|
12132
|
-
const [internalView, setInternalView] = (0,
|
|
12324
|
+
const [amount, setAmount] = (0, import_react14.useState)("500.00");
|
|
12325
|
+
const [currency, setCurrency] = (0, import_react14.useState)("usd");
|
|
12326
|
+
const [showCurrencyModal, setShowCurrencyModal] = (0, import_react14.useState)(false);
|
|
12327
|
+
const [quotes, setQuotes] = (0, import_react14.useState)([]);
|
|
12328
|
+
const [quotesLoading, setQuotesLoading] = (0, import_react14.useState)(false);
|
|
12329
|
+
const [quotesError, setQuotesError] = (0, import_react14.useState)(null);
|
|
12330
|
+
const [internalView, setInternalView] = (0, import_react14.useState)("amount");
|
|
12133
12331
|
const { userIpInfo, isLoading: isLoadingIp } = useUserIp2();
|
|
12134
|
-
const [onrampSession, setOnrampSession] = (0,
|
|
12332
|
+
const [onrampSession, setOnrampSession] = (0, import_react14.useState)(
|
|
12135
12333
|
null
|
|
12136
12334
|
);
|
|
12137
12335
|
const currentView = externalView ?? internalView;
|
|
12138
12336
|
const showQuotesView = currentView === "quotes";
|
|
12139
12337
|
const showOnrampView = currentView === "onramp";
|
|
12140
|
-
(0,
|
|
12338
|
+
(0, import_react14.useEffect)(() => {
|
|
12141
12339
|
if (externalView) {
|
|
12142
12340
|
setInternalView(externalView);
|
|
12143
12341
|
}
|
|
@@ -12150,20 +12348,20 @@ function BuyWithCard({
|
|
|
12150
12348
|
onViewChange?.(newView);
|
|
12151
12349
|
}
|
|
12152
12350
|
};
|
|
12153
|
-
const [selectedProvider, setSelectedProvider] = (0,
|
|
12351
|
+
const [selectedProvider, setSelectedProvider] = (0, import_react14.useState)(
|
|
12154
12352
|
null
|
|
12155
12353
|
);
|
|
12156
|
-
const [isAutoSelected, setIsAutoSelected] = (0,
|
|
12157
|
-
const [autoSelectedProvider, setAutoSelectedProvider] = (0,
|
|
12158
|
-
const [hasManualSelection, setHasManualSelection] = (0,
|
|
12159
|
-
const [internalWallets, setInternalWallets] = (0,
|
|
12160
|
-
const [walletsLoading, setWalletsLoading] = (0,
|
|
12354
|
+
const [isAutoSelected, setIsAutoSelected] = (0, import_react14.useState)(true);
|
|
12355
|
+
const [autoSelectedProvider, setAutoSelectedProvider] = (0, import_react14.useState)(null);
|
|
12356
|
+
const [hasManualSelection, setHasManualSelection] = (0, import_react14.useState)(false);
|
|
12357
|
+
const [internalWallets, setInternalWallets] = (0, import_react14.useState)([]);
|
|
12358
|
+
const [walletsLoading, setWalletsLoading] = (0, import_react14.useState)(!externalWallets?.length);
|
|
12161
12359
|
const wallets = externalWallets?.length ? externalWallets : internalWallets;
|
|
12162
|
-
const [countdown, setCountdown] = (0,
|
|
12163
|
-
const [fiatCurrencies, setFiatCurrencies] = (0,
|
|
12164
|
-
const [preferredCurrencyCodes, setPreferredCurrencyCodes] = (0,
|
|
12165
|
-
const [currenciesLoading, setCurrenciesLoading] = (0,
|
|
12166
|
-
const [supportedTokens, setSupportedTokens] = (0,
|
|
12360
|
+
const [countdown, setCountdown] = (0, import_react14.useState)(60);
|
|
12361
|
+
const [fiatCurrencies, setFiatCurrencies] = (0, import_react14.useState)([]);
|
|
12362
|
+
const [preferredCurrencyCodes, setPreferredCurrencyCodes] = (0, import_react14.useState)([]);
|
|
12363
|
+
const [currenciesLoading, setCurrenciesLoading] = (0, import_react14.useState)(true);
|
|
12364
|
+
const [supportedTokens, setSupportedTokens] = (0, import_react14.useState)([]);
|
|
12167
12365
|
const destinationWallet = getWalletByChainType(wallets, "ethereum");
|
|
12168
12366
|
const walletDestinationChainId = destinationWallet?.destination_chain_id;
|
|
12169
12367
|
const resolvedDestinationChainId = destinationChainId || walletDestinationChainId;
|
|
@@ -12172,7 +12370,7 @@ function BuyWithCard({
|
|
|
12172
12370
|
const destinationChain = destinationToken?.chains.find(
|
|
12173
12371
|
(c) => c.chain_id === resolvedDestinationChainId
|
|
12174
12372
|
);
|
|
12175
|
-
(0,
|
|
12373
|
+
(0, import_react14.useEffect)(() => {
|
|
12176
12374
|
async function fetchFiatCurrencies() {
|
|
12177
12375
|
try {
|
|
12178
12376
|
const response = await getFiatCurrencies(publishableKey);
|
|
@@ -12186,7 +12384,7 @@ function BuyWithCard({
|
|
|
12186
12384
|
}
|
|
12187
12385
|
fetchFiatCurrencies();
|
|
12188
12386
|
}, [publishableKey]);
|
|
12189
|
-
(0,
|
|
12387
|
+
(0, import_react14.useEffect)(() => {
|
|
12190
12388
|
if (externalWallets?.length) {
|
|
12191
12389
|
setWalletsLoading(false);
|
|
12192
12390
|
return;
|
|
@@ -12231,7 +12429,7 @@ function BuyWithCard({
|
|
|
12231
12429
|
}
|
|
12232
12430
|
};
|
|
12233
12431
|
}, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey, externalWallets]);
|
|
12234
|
-
(0,
|
|
12432
|
+
(0, import_react14.useEffect)(() => {
|
|
12235
12433
|
async function fetchSupportedTokens() {
|
|
12236
12434
|
try {
|
|
12237
12435
|
const response = await getSupportedDepositTokens(publishableKey);
|
|
@@ -12242,7 +12440,7 @@ function BuyWithCard({
|
|
|
12242
12440
|
}
|
|
12243
12441
|
fetchSupportedTokens();
|
|
12244
12442
|
}, [publishableKey]);
|
|
12245
|
-
(0,
|
|
12443
|
+
(0, import_react14.useEffect)(() => {
|
|
12246
12444
|
const amountNum = parseFloat(amount);
|
|
12247
12445
|
if (isNaN(amountNum) || amountNum <= 0) {
|
|
12248
12446
|
setQuotes([]);
|
|
@@ -12322,7 +12520,7 @@ function BuyWithCard({
|
|
|
12322
12520
|
setQuotesLoading(false);
|
|
12323
12521
|
}
|
|
12324
12522
|
};
|
|
12325
|
-
(0,
|
|
12523
|
+
(0, import_react14.useEffect)(() => {
|
|
12326
12524
|
if (quotes.length === 0) return;
|
|
12327
12525
|
const timer = setInterval(() => {
|
|
12328
12526
|
setCountdown((prev) => {
|
|
@@ -12454,7 +12652,8 @@ function BuyWithCard({
|
|
|
12454
12652
|
] }) }),
|
|
12455
12653
|
quotesLoading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-flex uf-justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-40 uf-animate-pulse" }) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "uf-text-sm uf-text-muted-foreground uf-font-normal", children: [
|
|
12456
12654
|
calculateUSDC(),
|
|
12457
|
-
"
|
|
12655
|
+
" ",
|
|
12656
|
+
displayTokenSymbol
|
|
12458
12657
|
] })
|
|
12459
12658
|
] }),
|
|
12460
12659
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: QUICK_AMOUNTS.map((quickAmount) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
@@ -12588,7 +12787,8 @@ function BuyWithCard({
|
|
|
12588
12787
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "uf-text-right", children: [
|
|
12589
12788
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: [
|
|
12590
12789
|
quote.destination_amount.toFixed(2),
|
|
12591
|
-
"
|
|
12790
|
+
" ",
|
|
12791
|
+
displayTokenSymbol
|
|
12592
12792
|
] }),
|
|
12593
12793
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal", children: [
|
|
12594
12794
|
currencySymbol,
|
|
@@ -12846,24 +13046,24 @@ function DepositModal({
|
|
|
12846
13046
|
onDepositError,
|
|
12847
13047
|
theme = "dark"
|
|
12848
13048
|
}) {
|
|
12849
|
-
const [view, setView] = (0,
|
|
12850
|
-
const [cardView, setCardView] = (0,
|
|
13049
|
+
const [view, setView] = (0, import_react8.useState)("main");
|
|
13050
|
+
const [cardView, setCardView] = (0, import_react8.useState)(
|
|
12851
13051
|
"amount"
|
|
12852
13052
|
);
|
|
12853
|
-
const [quotesCount, setQuotesCount] = (0,
|
|
12854
|
-
const [depositsModalOpen, setDepositsModalOpen] = (0,
|
|
12855
|
-
const [depositExecutions, setDepositExecutions] = (0,
|
|
12856
|
-
const [projectConfig, setProjectConfig] = (0,
|
|
12857
|
-
const [wallets, setWallets] = (0,
|
|
12858
|
-
const [walletsLoading, setWalletsLoading] = (0,
|
|
12859
|
-
(0,
|
|
13053
|
+
const [quotesCount, setQuotesCount] = (0, import_react8.useState)(0);
|
|
13054
|
+
const [depositsModalOpen, setDepositsModalOpen] = (0, import_react8.useState)(false);
|
|
13055
|
+
const [depositExecutions, setDepositExecutions] = (0, import_react8.useState)([]);
|
|
13056
|
+
const [projectConfig, setProjectConfig] = (0, import_react8.useState)(null);
|
|
13057
|
+
const [wallets, setWallets] = (0, import_react8.useState)([]);
|
|
13058
|
+
const [walletsLoading, setWalletsLoading] = (0, import_react8.useState)(false);
|
|
13059
|
+
(0, import_react8.useEffect)(() => {
|
|
12860
13060
|
setProjectConfig(null);
|
|
12861
13061
|
}, [publishableKey]);
|
|
12862
|
-
(0,
|
|
13062
|
+
(0, import_react8.useEffect)(() => {
|
|
12863
13063
|
setWallets([]);
|
|
12864
13064
|
}, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey]);
|
|
12865
|
-
const [resolvedTheme, setResolvedTheme] = (0,
|
|
12866
|
-
(0,
|
|
13065
|
+
const [resolvedTheme, setResolvedTheme] = (0, import_react8.useState)(theme === "auto" ? "dark" : theme);
|
|
13066
|
+
(0, import_react8.useEffect)(() => {
|
|
12867
13067
|
if (theme === "auto") {
|
|
12868
13068
|
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
12869
13069
|
setResolvedTheme(mediaQuery.matches ? "dark" : "light");
|
|
@@ -12876,12 +13076,12 @@ function DepositModal({
|
|
|
12876
13076
|
setResolvedTheme(theme);
|
|
12877
13077
|
}
|
|
12878
13078
|
}, [theme]);
|
|
12879
|
-
(0,
|
|
13079
|
+
(0, import_react8.useEffect)(() => {
|
|
12880
13080
|
if (open && !projectConfig) {
|
|
12881
13081
|
getProjectConfig(publishableKey).then(setProjectConfig).catch(console.error);
|
|
12882
13082
|
}
|
|
12883
13083
|
}, [open, publishableKey, projectConfig]);
|
|
12884
|
-
(0,
|
|
13084
|
+
(0, import_react8.useEffect)(() => {
|
|
12885
13085
|
if (!open || wallets.length > 0) return;
|
|
12886
13086
|
let retryTimeout = null;
|
|
12887
13087
|
let isCancelled = false;
|
|
@@ -13110,12 +13310,12 @@ function UnifoldProvider2({
|
|
|
13110
13310
|
publishableKey,
|
|
13111
13311
|
config
|
|
13112
13312
|
}) {
|
|
13113
|
-
const [isOpen, setIsOpen] = (0,
|
|
13114
|
-
const [depositConfig, setDepositConfig] = (0,
|
|
13313
|
+
const [isOpen, setIsOpen] = (0, import_react16.useState)(false);
|
|
13314
|
+
const [depositConfig, setDepositConfig] = (0, import_react16.useState)(
|
|
13115
13315
|
null
|
|
13116
13316
|
);
|
|
13117
|
-
const [resolvedTheme, setResolvedTheme] =
|
|
13118
|
-
|
|
13317
|
+
const [resolvedTheme, setResolvedTheme] = import_react16.default.useState("dark");
|
|
13318
|
+
import_react16.default.useEffect(() => {
|
|
13119
13319
|
const appearance = config?.appearance || "dark";
|
|
13120
13320
|
if (appearance === "auto") {
|
|
13121
13321
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
@@ -13130,9 +13330,9 @@ function UnifoldProvider2({
|
|
|
13130
13330
|
setResolvedTheme(appearance);
|
|
13131
13331
|
}
|
|
13132
13332
|
}, [config?.appearance]);
|
|
13133
|
-
const depositPromiseRef =
|
|
13134
|
-
const closeTimeoutRef =
|
|
13135
|
-
const beginDeposit = (0,
|
|
13333
|
+
const depositPromiseRef = import_react16.default.useRef(null);
|
|
13334
|
+
const closeTimeoutRef = import_react16.default.useRef(null);
|
|
13335
|
+
const beginDeposit = (0, import_react16.useCallback)((config2) => {
|
|
13136
13336
|
console.log("[UnifoldProvider] beginDeposit called with:", config2);
|
|
13137
13337
|
if (closeTimeoutRef.current) {
|
|
13138
13338
|
clearTimeout(closeTimeoutRef.current);
|
|
@@ -13153,7 +13353,7 @@ function UnifoldProvider2({
|
|
|
13153
13353
|
setIsOpen(true);
|
|
13154
13354
|
return promise;
|
|
13155
13355
|
}, []);
|
|
13156
|
-
const closeDeposit = (0,
|
|
13356
|
+
const closeDeposit = (0, import_react16.useCallback)(() => {
|
|
13157
13357
|
if (depositPromiseRef.current) {
|
|
13158
13358
|
depositPromiseRef.current.reject({
|
|
13159
13359
|
message: "Deposit cancelled by user",
|
|
@@ -13167,7 +13367,7 @@ function UnifoldProvider2({
|
|
|
13167
13367
|
closeTimeoutRef.current = null;
|
|
13168
13368
|
}, 200);
|
|
13169
13369
|
}, []);
|
|
13170
|
-
const handleDepositSuccess = (0,
|
|
13370
|
+
const handleDepositSuccess = (0, import_react16.useCallback)((data) => {
|
|
13171
13371
|
console.log("[UnifoldProvider] Deposit success:", data);
|
|
13172
13372
|
if (depositConfig?.onSuccess) {
|
|
13173
13373
|
depositConfig.onSuccess(data);
|
|
@@ -13177,7 +13377,7 @@ function UnifoldProvider2({
|
|
|
13177
13377
|
depositPromiseRef.current = null;
|
|
13178
13378
|
}
|
|
13179
13379
|
}, [depositConfig]);
|
|
13180
|
-
const handleDepositError = (0,
|
|
13380
|
+
const handleDepositError = (0, import_react16.useCallback)((error) => {
|
|
13181
13381
|
console.error("[UnifoldProvider] Deposit error:", error);
|
|
13182
13382
|
if (depositConfig?.onError) {
|
|
13183
13383
|
depositConfig.onError(error);
|
|
@@ -13187,7 +13387,7 @@ function UnifoldProvider2({
|
|
|
13187
13387
|
depositPromiseRef.current = null;
|
|
13188
13388
|
}
|
|
13189
13389
|
}, [depositConfig]);
|
|
13190
|
-
const contextValue = (0,
|
|
13390
|
+
const contextValue = (0, import_react16.useMemo)(
|
|
13191
13391
|
() => ({
|
|
13192
13392
|
beginDeposit,
|
|
13193
13393
|
closeDeposit,
|
|
@@ -13219,10 +13419,10 @@ function UnifoldProvider2({
|
|
|
13219
13419
|
)
|
|
13220
13420
|
] }) });
|
|
13221
13421
|
}
|
|
13222
|
-
var ConnectContext =
|
|
13422
|
+
var ConnectContext = import_react16.default.createContext(null);
|
|
13223
13423
|
function useUnifold2() {
|
|
13224
13424
|
const baseContext = useUnifold();
|
|
13225
|
-
const connectContext =
|
|
13425
|
+
const connectContext = import_react16.default.useContext(ConnectContext);
|
|
13226
13426
|
if (typeof window === "undefined") {
|
|
13227
13427
|
return {
|
|
13228
13428
|
publishableKey: "",
|
|
@@ -13243,12 +13443,33 @@ function useUnifold2() {
|
|
|
13243
13443
|
// Annotate the CommonJS export names for ESM import in node:
|
|
13244
13444
|
0 && (module.exports = {
|
|
13245
13445
|
Button,
|
|
13446
|
+
ExecutionStatus,
|
|
13447
|
+
SOLANA_USDC_ADDRESS,
|
|
13246
13448
|
UnifoldProvider,
|
|
13247
|
-
|
|
13449
|
+
createDepositAddress,
|
|
13450
|
+
createMeldSession,
|
|
13451
|
+
getApiBaseUrl,
|
|
13452
|
+
getChainName,
|
|
13453
|
+
getFiatCurrencies,
|
|
13454
|
+
getIconUrl,
|
|
13455
|
+
getIconUrlWithCdn,
|
|
13456
|
+
getMeldQuotes,
|
|
13457
|
+
getPreferredIconUrl,
|
|
13458
|
+
getProjectConfig,
|
|
13459
|
+
getSupportedDepositTokens,
|
|
13460
|
+
getTokenChains,
|
|
13461
|
+
getWalletByChainType,
|
|
13462
|
+
i18n,
|
|
13463
|
+
queryExecutions,
|
|
13464
|
+
setApiConfig,
|
|
13465
|
+
useUnifold,
|
|
13466
|
+
useUserIp
|
|
13248
13467
|
});
|
|
13249
13468
|
/*! Bundled license information:
|
|
13250
13469
|
|
|
13470
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
13251
13471
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
13472
|
+
lucide-react/dist/esm/Icon.js:
|
|
13252
13473
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
13253
13474
|
lucide-react/dist/esm/icons/arrow-left.js:
|
|
13254
13475
|
lucide-react/dist/esm/icons/check.js:
|
|
@@ -13267,7 +13488,7 @@ lucide-react/dist/esm/icons/x.js:
|
|
|
13267
13488
|
lucide-react/dist/esm/icons/zap.js:
|
|
13268
13489
|
lucide-react/dist/esm/lucide-react.js:
|
|
13269
13490
|
(**
|
|
13270
|
-
* @license lucide-react v0.
|
|
13491
|
+
* @license lucide-react v0.454.0 - ISC
|
|
13271
13492
|
*
|
|
13272
13493
|
* This source code is licensed under the ISC license.
|
|
13273
13494
|
* See the LICENSE file in the root directory of this source tree.
|