@unifold/connect-react 0.1.58 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1260,19 +1260,19 @@ function useUnifold() {
1260
1260
  // ../ui-react/dist/index.mjs
1261
1261
  var import_react8 = require("react");
1262
1262
 
1263
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
1263
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
1264
1264
  var import_react3 = require("react");
1265
1265
 
1266
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
1266
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js
1267
1267
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1268
1268
  var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
1269
1269
  return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
1270
1270
  }).join(" ").trim();
1271
1271
 
1272
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
1272
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
1273
1273
  var import_react2 = require("react");
1274
1274
 
1275
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
1275
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js
1276
1276
  var defaultAttributes = {
1277
1277
  xmlns: "http://www.w3.org/2000/svg",
1278
1278
  width: 24,
@@ -1285,7 +1285,7 @@ var defaultAttributes = {
1285
1285
  strokeLinejoin: "round"
1286
1286
  };
1287
1287
 
1288
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
1288
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
1289
1289
  var Icon = (0, import_react2.forwardRef)(
1290
1290
  ({
1291
1291
  color = "currentColor",
@@ -1317,7 +1317,7 @@ var Icon = (0, import_react2.forwardRef)(
1317
1317
  }
1318
1318
  );
1319
1319
 
1320
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
1320
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
1321
1321
  var createLucideIcon = (iconName, iconNode) => {
1322
1322
  const Component = (0, import_react3.forwardRef)(
1323
1323
  ({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
@@ -1331,7 +1331,7 @@ var createLucideIcon = (iconName, iconNode) => {
1331
1331
  return Component;
1332
1332
  };
1333
1333
 
1334
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left-right.js
1334
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/arrow-left-right.js
1335
1335
  var ArrowLeftRight = createLucideIcon("ArrowLeftRight", [
1336
1336
  ["path", { d: "M8 3 4 7l4 4", key: "9rb6wj" }],
1337
1337
  ["path", { d: "M4 7h16", key: "6tx8e3" }],
@@ -1339,13 +1339,13 @@ var ArrowLeftRight = createLucideIcon("ArrowLeftRight", [
1339
1339
  ["path", { d: "M20 17H4", key: "h6l3hr" }]
1340
1340
  ]);
1341
1341
 
1342
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.js
1342
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/arrow-left.js
1343
1343
  var ArrowLeft = createLucideIcon("ArrowLeft", [
1344
1344
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
1345
1345
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
1346
1346
  ]);
1347
1347
 
1348
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js
1348
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js
1349
1349
  var ArrowUpDown = createLucideIcon("ArrowUpDown", [
1350
1350
  ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
1351
1351
  ["path", { d: "M17 20V4", key: "1ejh1v" }],
@@ -1353,36 +1353,36 @@ var ArrowUpDown = createLucideIcon("ArrowUpDown", [
1353
1353
  ["path", { d: "M7 4v16", key: "1glfcx" }]
1354
1354
  ]);
1355
1355
 
1356
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js
1356
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/check.js
1357
1357
  var Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
1358
1358
 
1359
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
1359
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-down.js
1360
1360
  var ChevronDown = createLucideIcon("ChevronDown", [
1361
1361
  ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
1362
1362
  ]);
1363
1363
 
1364
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
1364
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-right.js
1365
1365
  var ChevronRight = createLucideIcon("ChevronRight", [
1366
1366
  ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
1367
1367
  ]);
1368
1368
 
1369
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js
1369
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-up.js
1370
1370
  var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
1371
1371
 
1372
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/circle-alert.js
1372
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle-alert.js
1373
1373
  var CircleAlert = createLucideIcon("CircleAlert", [
1374
1374
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1375
1375
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
1376
1376
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
1377
1377
  ]);
1378
1378
 
1379
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/circle-check.js
1379
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle-check.js
1380
1380
  var CircleCheck = createLucideIcon("CircleCheck", [
1381
1381
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1382
1382
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
1383
1383
  ]);
1384
1384
 
1385
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clipboard-paste.js
1385
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/clipboard-paste.js
1386
1386
  var ClipboardPaste = createLucideIcon("ClipboardPaste", [
1387
1387
  [
1388
1388
  "path",
@@ -1398,38 +1398,38 @@ var ClipboardPaste = createLucideIcon("ClipboardPaste", [
1398
1398
  ["path", { d: "m17 10 4 4-4 4", key: "vp2hj1" }]
1399
1399
  ]);
1400
1400
 
1401
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clock.js
1401
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/clock.js
1402
1402
  var Clock = createLucideIcon("Clock", [
1403
1403
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1404
1404
  ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
1405
1405
  ]);
1406
1406
 
1407
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/copy.js
1407
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/copy.js
1408
1408
  var Copy = createLucideIcon("Copy", [
1409
1409
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1410
1410
  ["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" }]
1411
1411
  ]);
1412
1412
 
1413
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/credit-card.js
1413
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/credit-card.js
1414
1414
  var CreditCard = createLucideIcon("CreditCard", [
1415
1415
  ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
1416
1416
  ["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }]
1417
1417
  ]);
1418
1418
 
1419
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dollar-sign.js
1419
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/dollar-sign.js
1420
1420
  var DollarSign = createLucideIcon("DollarSign", [
1421
1421
  ["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
1422
1422
  ["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
1423
1423
  ]);
1424
1424
 
1425
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/external-link.js
1425
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/external-link.js
1426
1426
  var ExternalLink = createLucideIcon("ExternalLink", [
1427
1427
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
1428
1428
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
1429
1429
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
1430
1430
  ]);
1431
1431
 
1432
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/hand.js
1432
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/hand.js
1433
1433
  var Hand = createLucideIcon("Hand", [
1434
1434
  ["path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2", key: "1fvzgz" }],
1435
1435
  ["path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2", key: "1kc0my" }],
@@ -1443,26 +1443,26 @@ var Hand = createLucideIcon("Hand", [
1443
1443
  ]
1444
1444
  ]);
1445
1445
 
1446
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/info.js
1446
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/info.js
1447
1447
  var Info = createLucideIcon("Info", [
1448
1448
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1449
1449
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
1450
1450
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
1451
1451
  ]);
1452
1452
 
1453
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/link-2.js
1453
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/link-2.js
1454
1454
  var Link2 = createLucideIcon("Link2", [
1455
1455
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
1456
1456
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
1457
1457
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
1458
1458
  ]);
1459
1459
 
1460
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js
1460
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/loader-circle.js
1461
1461
  var LoaderCircle = createLucideIcon("LoaderCircle", [
1462
1462
  ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
1463
1463
  ]);
1464
1464
 
1465
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/map-pin-off.js
1465
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/map-pin-off.js
1466
1466
  var MapPinOff = createLucideIcon("MapPinOff", [
1467
1467
  ["path", { d: "M12.75 7.09a3 3 0 0 1 2.16 2.16", key: "1d4wjd" }],
1468
1468
  [
@@ -1477,7 +1477,7 @@ var MapPinOff = createLucideIcon("MapPinOff", [
1477
1477
  ["path", { d: "M9.13 9.13a3 3 0 0 0 3.74 3.74", key: "13wojd" }]
1478
1478
  ]);
1479
1479
 
1480
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/refresh-cw.js
1480
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/refresh-cw.js
1481
1481
  var RefreshCw = createLucideIcon("RefreshCw", [
1482
1482
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
1483
1483
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
@@ -1485,7 +1485,7 @@ var RefreshCw = createLucideIcon("RefreshCw", [
1485
1485
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
1486
1486
  ]);
1487
1487
 
1488
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield-check.js
1488
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/shield-check.js
1489
1489
  var ShieldCheck = createLucideIcon("ShieldCheck", [
1490
1490
  [
1491
1491
  "path",
@@ -1497,7 +1497,7 @@ var ShieldCheck = createLucideIcon("ShieldCheck", [
1497
1497
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
1498
1498
  ]);
1499
1499
 
1500
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield.js
1500
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/shield.js
1501
1501
  var Shield = createLucideIcon("Shield", [
1502
1502
  [
1503
1503
  "path",
@@ -1508,7 +1508,7 @@ var Shield = createLucideIcon("Shield", [
1508
1508
  ]
1509
1509
  ]);
1510
1510
 
1511
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/triangle-alert.js
1511
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/triangle-alert.js
1512
1512
  var TriangleAlert = createLucideIcon("TriangleAlert", [
1513
1513
  [
1514
1514
  "path",
@@ -1521,7 +1521,7 @@ var TriangleAlert = createLucideIcon("TriangleAlert", [
1521
1521
  ["path", { d: "M12 17h.01", key: "p32p05" }]
1522
1522
  ]);
1523
1523
 
1524
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/wallet-minimal.js
1524
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/wallet-minimal.js
1525
1525
  var WalletMinimal = createLucideIcon("WalletMinimal", [
1526
1526
  ["path", { d: "M17 14h.01", key: "7oqj8z" }],
1527
1527
  [
@@ -1533,7 +1533,7 @@ var WalletMinimal = createLucideIcon("WalletMinimal", [
1533
1533
  ]
1534
1534
  ]);
1535
1535
 
1536
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/wallet.js
1536
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/wallet.js
1537
1537
  var Wallet = createLucideIcon("Wallet", [
1538
1538
  [
1539
1539
  "path",
@@ -1545,13 +1545,13 @@ var Wallet = createLucideIcon("Wallet", [
1545
1545
  ["path", { d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4", key: "xoc0q4" }]
1546
1546
  ]);
1547
1547
 
1548
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js
1548
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/x.js
1549
1549
  var X = createLucideIcon("X", [
1550
1550
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
1551
1551
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
1552
1552
  ]);
1553
1553
 
1554
- // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/zap.js
1554
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/zap.js
1555
1555
  var Zap = createLucideIcon("Zap", [
1556
1556
  [
1557
1557
  "path",
@@ -1565,7 +1565,7 @@ var Zap = createLucideIcon("Zap", [
1565
1565
  // ../ui-react/dist/index.mjs
1566
1566
  var React36 = __toESM(require("react"), 1);
1567
1567
 
1568
- // ../../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
1568
+ // ../../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._qsrlqvvmbbdzsfzle7bhabp7n4/node_modules/@radix-ui/react-dialog/dist/index.mjs
1569
1569
  var React24 = __toESM(require("react"), 1);
1570
1570
 
1571
1571
  // ../../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs
@@ -1579,7 +1579,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
1579
1579
  };
1580
1580
  }
1581
1581
 
1582
- // ../../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
1582
+ // ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
1583
1583
  var React = __toESM(require("react"), 1);
1584
1584
  function setRef(ref, value) {
1585
1585
  if (typeof ref === "function") {
@@ -1616,7 +1616,7 @@ function useComposedRefs(...refs) {
1616
1616
  return React.useCallback(composeRefs(...refs), refs);
1617
1617
  }
1618
1618
 
1619
- // ../../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
1619
+ // ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-context/dist/index.mjs
1620
1620
  var React2 = __toESM(require("react"), 1);
1621
1621
  var import_jsx_runtime2 = require("react/jsx-runtime");
1622
1622
  function createContext22(rootComponentName, defaultContext) {
@@ -1693,15 +1693,15 @@ function composeContextScopes(...scopes) {
1693
1693
  return createScope;
1694
1694
  }
1695
1695
 
1696
- // ../../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
1696
+ // ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-id/dist/index.mjs
1697
1697
  var React4 = __toESM(require("react"), 1);
1698
1698
 
1699
- // ../../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
1699
+ // ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
1700
1700
  var React3 = __toESM(require("react"), 1);
1701
1701
  var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
1702
1702
  };
1703
1703
 
1704
- // ../../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
1704
+ // ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-id/dist/index.mjs
1705
1705
  var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
1706
1706
  var count = 0;
1707
1707
  function useId(deterministicId) {
@@ -1712,7 +1712,7 @@ function useId(deterministicId) {
1712
1712
  return deterministicId || (id ? `radix-${id}` : "");
1713
1713
  }
1714
1714
 
1715
- // ../../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
1715
+ // ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
1716
1716
  var React5 = __toESM(require("react"), 1);
1717
1717
  var React22 = __toESM(require("react"), 1);
1718
1718
  var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
@@ -1780,14 +1780,14 @@ function isFunction(value) {
1780
1780
  return typeof value === "function";
1781
1781
  }
1782
1782
 
1783
- // ../../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
1783
+ // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ibhfsyo6t6zt76khfyzt7lbbq4/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
1784
1784
  var React10 = __toESM(require("react"), 1);
1785
1785
 
1786
- // ../../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
1786
+ // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._gsiol2hcpd6qizfnjc77drzehq/node_modules/@radix-ui/react-primitive/dist/index.mjs
1787
1787
  var React7 = __toESM(require("react"), 1);
1788
1788
  var ReactDOM = __toESM(require("react-dom"), 1);
1789
1789
 
1790
- // ../../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
1790
+ // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-slot/dist/index.mjs
1791
1791
  var React6 = __toESM(require("react"), 1);
1792
1792
  var import_jsx_runtime3 = require("react/jsx-runtime");
1793
1793
  // @__NO_SIDE_EFFECTS__
@@ -1882,7 +1882,7 @@ function getElementRef(element) {
1882
1882
  return element.props.ref || element.ref;
1883
1883
  }
1884
1884
 
1885
- // ../../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
1885
+ // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._gsiol2hcpd6qizfnjc77drzehq/node_modules/@radix-ui/react-primitive/dist/index.mjs
1886
1886
  var import_jsx_runtime4 = require("react/jsx-runtime");
1887
1887
  var NODES = [
1888
1888
  "a",
@@ -1920,7 +1920,7 @@ function dispatchDiscreteCustomEvent(target, event) {
1920
1920
  if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
1921
1921
  }
1922
1922
 
1923
- // ../../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
1923
+ // ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
1924
1924
  var React8 = __toESM(require("react"), 1);
1925
1925
  function useCallbackRef(callback) {
1926
1926
  const callbackRef = React8.useRef(callback);
@@ -1930,7 +1930,7 @@ function useCallbackRef(callback) {
1930
1930
  return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
1931
1931
  }
1932
1932
 
1933
- // ../../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
1933
+ // ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
1934
1934
  var React9 = __toESM(require("react"), 1);
1935
1935
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
1936
1936
  const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
@@ -1945,7 +1945,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
1945
1945
  }, [onEscapeKeyDown, ownerDocument]);
1946
1946
  }
1947
1947
 
1948
- // ../../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
1948
+ // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ibhfsyo6t6zt76khfyzt7lbbq4/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
1949
1949
  var import_jsx_runtime5 = require("react/jsx-runtime");
1950
1950
  var DISMISSABLE_LAYER_NAME = "DismissableLayer";
1951
1951
  var CONTEXT_UPDATE = "dismissableLayer.update";
@@ -2150,7 +2150,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
2150
2150
  }
2151
2151
  }
2152
2152
 
2153
- // ../../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
2153
+ // ../../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_md5yxmzngi2erdl2zbrekjyad4/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
2154
2154
  var React11 = __toESM(require("react"), 1);
2155
2155
  var import_jsx_runtime6 = require("react/jsx-runtime");
2156
2156
  var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
@@ -2354,7 +2354,7 @@ function removeLinks(items) {
2354
2354
  return items.filter((item) => item.tagName !== "A");
2355
2355
  }
2356
2356
 
2357
- // ../../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
2357
+ // ../../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_a2vhfobmg2rqexwxy4r74ynlqm/node_modules/@radix-ui/react-portal/dist/index.mjs
2358
2358
  var React12 = __toESM(require("react"), 1);
2359
2359
  var import_react_dom = __toESM(require("react-dom"), 1);
2360
2360
  var import_jsx_runtime7 = require("react/jsx-runtime");
@@ -2368,7 +2368,7 @@ var Portal = React12.forwardRef((props, forwardedRef) => {
2368
2368
  });
2369
2369
  Portal.displayName = PORTAL_NAME;
2370
2370
 
2371
- // ../../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
2371
+ // ../../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_vxszomp4jt7xd7ti6rlx4jypfq/node_modules/@radix-ui/react-presence/dist/index.mjs
2372
2372
  var React23 = __toESM(require("react"), 1);
2373
2373
  var React13 = __toESM(require("react"), 1);
2374
2374
  function useStateMachine(initialState, machine) {
@@ -2494,7 +2494,7 @@ function getElementRef2(element) {
2494
2494
  return element.props.ref || element.ref;
2495
2495
  }
2496
2496
 
2497
- // ../../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
2497
+ // ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
2498
2498
  var React14 = __toESM(require("react"), 1);
2499
2499
  var count2 = 0;
2500
2500
  function useFocusGuards() {
@@ -2554,19 +2554,19 @@ function __spreadArray(to, from, pack) {
2554
2554
  return to.concat(ar || Array.prototype.slice.call(from));
2555
2555
  }
2556
2556
 
2557
- // ../../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
2557
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/Combination.js
2558
2558
  var React21 = __toESM(require("react"));
2559
2559
 
2560
- // ../../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
2560
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/UI.js
2561
2561
  var React17 = __toESM(require("react"));
2562
2562
 
2563
- // ../../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
2563
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
2564
2564
  var zeroRightClassName = "right-scroll-bar-position";
2565
2565
  var fullWidthClassName = "width-before-scroll-bar";
2566
2566
  var noScrollbarsClassName = "with-scroll-bars-hidden";
2567
2567
  var removedBarSizeVariable = "--removed-body-scroll-bar-size";
2568
2568
 
2569
- // ../../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
2569
+ // ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@19.2.3/node_modules/use-callback-ref/dist/es2015/assignRef.js
2570
2570
  function assignRef(ref, value) {
2571
2571
  if (typeof ref === "function") {
2572
2572
  ref(value);
@@ -2576,7 +2576,7 @@ function assignRef(ref, value) {
2576
2576
  return ref;
2577
2577
  }
2578
2578
 
2579
- // ../../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
2579
+ // ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@19.2.3/node_modules/use-callback-ref/dist/es2015/useRef.js
2580
2580
  var import_react4 = require("react");
2581
2581
  function useCallbackRef2(initialValue, callback) {
2582
2582
  var ref = (0, import_react4.useState)(function() {
@@ -2604,7 +2604,7 @@ function useCallbackRef2(initialValue, callback) {
2604
2604
  return ref.facade;
2605
2605
  }
2606
2606
 
2607
- // ../../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
2607
+ // ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@19.2.3/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
2608
2608
  var React15 = __toESM(require("react"));
2609
2609
  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect;
2610
2610
  var currentValues = /* @__PURE__ */ new WeakMap();
@@ -2636,7 +2636,7 @@ function useMergeRefs(refs, defaultValue) {
2636
2636
  return callbackRef;
2637
2637
  }
2638
2638
 
2639
- // ../../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
2639
+ // ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/use-sidecar/dist/es2015/medium.js
2640
2640
  function ItoI(a) {
2641
2641
  return a;
2642
2642
  }
@@ -2722,7 +2722,7 @@ function createSidecarMedium(options) {
2722
2722
  return medium;
2723
2723
  }
2724
2724
 
2725
- // ../../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
2725
+ // ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/use-sidecar/dist/es2015/exports.js
2726
2726
  var React16 = __toESM(require("react"));
2727
2727
  var SideCar = function(_a) {
2728
2728
  var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
@@ -2741,10 +2741,10 @@ function exportSidecar(medium, exported) {
2741
2741
  return SideCar;
2742
2742
  }
2743
2743
 
2744
- // ../../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
2744
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/medium.js
2745
2745
  var effectCar = createSidecarMedium();
2746
2746
 
2747
- // ../../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
2747
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/UI.js
2748
2748
  var nothing = function() {
2749
2749
  return;
2750
2750
  };
@@ -2776,13 +2776,13 @@ RemoveScroll.classNames = {
2776
2776
  zeroRight: zeroRightClassName
2777
2777
  };
2778
2778
 
2779
- // ../../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
2779
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
2780
2780
  var React20 = __toESM(require("react"));
2781
2781
 
2782
- // ../../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
2782
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/component.js
2783
2783
  var React19 = __toESM(require("react"));
2784
2784
 
2785
- // ../../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
2785
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/hook.js
2786
2786
  var React18 = __toESM(require("react"));
2787
2787
 
2788
2788
  // ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
@@ -2797,7 +2797,7 @@ var getNonce = function() {
2797
2797
  return void 0;
2798
2798
  };
2799
2799
 
2800
- // ../../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
2800
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/singleton.js
2801
2801
  function makeStyleTag() {
2802
2802
  if (!document)
2803
2803
  return null;
@@ -2843,7 +2843,7 @@ var stylesheetSingleton = function() {
2843
2843
  };
2844
2844
  };
2845
2845
 
2846
- // ../../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
2846
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/hook.js
2847
2847
  var styleHookSingleton = function() {
2848
2848
  var sheet = stylesheetSingleton();
2849
2849
  return function(styles, isDynamic) {
@@ -2856,7 +2856,7 @@ var styleHookSingleton = function() {
2856
2856
  };
2857
2857
  };
2858
2858
 
2859
- // ../../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
2859
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/component.js
2860
2860
  var styleSingleton = function() {
2861
2861
  var useStyle = styleHookSingleton();
2862
2862
  var Sheet = function(_a) {
@@ -2867,7 +2867,7 @@ var styleSingleton = function() {
2867
2867
  return Sheet;
2868
2868
  };
2869
2869
 
2870
- // ../../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
2870
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
2871
2871
  var zeroGap = {
2872
2872
  left: 0,
2873
2873
  top: 0,
@@ -2902,7 +2902,7 @@ var getGapWidth = function(gapMode) {
2902
2902
  };
2903
2903
  };
2904
2904
 
2905
- // ../../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
2905
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/component.js
2906
2906
  var Style = styleSingleton();
2907
2907
  var lockAttribute = "data-scroll-locked";
2908
2908
  var getStyles = function(_a, allowRelative, gapMode, important) {
@@ -2942,7 +2942,7 @@ var RemoveScrollBar = function(_a) {
2942
2942
  return React19.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
2943
2943
  };
2944
2944
 
2945
- // ../../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
2945
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
2946
2946
  var passiveSupported = false;
2947
2947
  if (typeof window !== "undefined") {
2948
2948
  try {
@@ -2961,7 +2961,7 @@ if (typeof window !== "undefined") {
2961
2961
  var options;
2962
2962
  var nonPassive = passiveSupported ? { passive: false } : false;
2963
2963
 
2964
- // ../../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
2964
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
2965
2965
  var alwaysContainsScroll = function(node) {
2966
2966
  return node.tagName === "TEXTAREA";
2967
2967
  };
@@ -3061,7 +3061,7 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
3061
3061
  return shouldCancelScroll;
3062
3062
  };
3063
3063
 
3064
- // ../../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
3064
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
3065
3065
  var getTouchXY = function(event) {
3066
3066
  return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
3067
3067
  };
@@ -3232,10 +3232,10 @@ function getOutermostShadowParent(node) {
3232
3232
  return shadowParent;
3233
3233
  }
3234
3234
 
3235
- // ../../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
3235
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/sidecar.js
3236
3236
  var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
3237
3237
 
3238
- // ../../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
3238
+ // ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/Combination.js
3239
3239
  var ReactRemoveScroll = React21.forwardRef(function(props, ref) {
3240
3240
  return React21.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
3241
3241
  });
@@ -3363,7 +3363,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
3363
3363
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
3364
3364
  };
3365
3365
 
3366
- // ../../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
3366
+ // ../../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._qsrlqvvmbbdzsfzle7bhabp7n4/node_modules/@radix-ui/react-dialog/dist/index.mjs
3367
3367
  var import_jsx_runtime8 = require("react/jsx-runtime");
3368
3368
  var DIALOG_NAME = "Dialog";
3369
3369
  var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
@@ -6271,12 +6271,12 @@ var ExecutionStatus = /* @__PURE__ */ ((ExecutionStatus2) => {
6271
6271
  return ExecutionStatus2;
6272
6272
  })(ExecutionStatus || {});
6273
6273
  var SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
6274
- async function queryExecutions(externalUserId, publishableKey, actionType) {
6274
+ async function queryExecutions(externalUserId, publishableKey, actionType = "deposit") {
6275
6275
  const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
6276
6276
  validatePublishableKey(pk);
6277
6277
  const body = {
6278
6278
  external_user_id: externalUserId,
6279
- ...actionType ? { action_type: actionType } : {}
6279
+ action_type: actionType
6280
6280
  };
6281
6281
  const response = await fetch(
6282
6282
  `${API_BASE_URL}/v1/public/direct_executions/query`,
@@ -7231,7 +7231,7 @@ var import_jsx_runtime35 = require("react/jsx-runtime");
7231
7231
  var React92 = __toESM(require("react"), 1);
7232
7232
  var React82 = __toESM(require("react"), 1);
7233
7233
 
7234
- // ../../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
7234
+ // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-slot/dist/index.mjs
7235
7235
  var React25 = __toESM(require("react"), 1);
7236
7236
  var import_jsx_runtime9 = require("react/jsx-runtime");
7237
7237
  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
@@ -7382,6 +7382,62 @@ var import_jsx_runtime38 = require("react/jsx-runtime");
7382
7382
  var React112 = __toESM(require("react"), 1);
7383
7383
  var import_jsx_runtime39 = require("react/jsx-runtime");
7384
7384
  var React242 = __toESM(require("react"), 1);
7385
+
7386
+ // ../../node_modules/.pnpm/mipd@0.0.7_typescript@5.9.3/node_modules/mipd/dist/esm/utils.js
7387
+ function requestProviders(listener) {
7388
+ if (typeof window === "undefined")
7389
+ return;
7390
+ const handler = (event) => listener(event.detail);
7391
+ window.addEventListener("eip6963:announceProvider", handler);
7392
+ window.dispatchEvent(new CustomEvent("eip6963:requestProvider"));
7393
+ return () => window.removeEventListener("eip6963:announceProvider", handler);
7394
+ }
7395
+
7396
+ // ../../node_modules/.pnpm/mipd@0.0.7_typescript@5.9.3/node_modules/mipd/dist/esm/store.js
7397
+ function createStore() {
7398
+ const listeners = /* @__PURE__ */ new Set();
7399
+ let providerDetails = [];
7400
+ const request = () => requestProviders((providerDetail) => {
7401
+ if (providerDetails.some(({ info }) => info.uuid === providerDetail.info.uuid))
7402
+ return;
7403
+ providerDetails = [...providerDetails, providerDetail];
7404
+ listeners.forEach((listener) => listener(providerDetails, { added: [providerDetail] }));
7405
+ });
7406
+ let unwatch = request();
7407
+ return {
7408
+ _listeners() {
7409
+ return listeners;
7410
+ },
7411
+ clear() {
7412
+ listeners.forEach((listener) => listener([], { removed: [...providerDetails] }));
7413
+ providerDetails = [];
7414
+ },
7415
+ destroy() {
7416
+ this.clear();
7417
+ listeners.clear();
7418
+ unwatch?.();
7419
+ },
7420
+ findProvider({ rdns }) {
7421
+ return providerDetails.find((providerDetail) => providerDetail.info.rdns === rdns);
7422
+ },
7423
+ getProviders() {
7424
+ return providerDetails;
7425
+ },
7426
+ reset() {
7427
+ this.clear();
7428
+ unwatch?.();
7429
+ unwatch = request();
7430
+ },
7431
+ subscribe(listener, { emitImmediately } = {}) {
7432
+ listeners.add(listener);
7433
+ if (emitImmediately)
7434
+ listener(providerDetails, { added: providerDetails });
7435
+ return () => listeners.delete(listener);
7436
+ }
7437
+ };
7438
+ }
7439
+
7440
+ // ../ui-react/dist/index.mjs
7385
7441
  var React122 = __toESM(require("react"), 1);
7386
7442
  var import_jsx_runtime40 = require("react/jsx-runtime");
7387
7443
  var React132 = __toESM(require("react"), 1);
@@ -7424,6 +7480,2006 @@ var import_jsx_runtime55 = require("react/jsx-runtime");
7424
7480
  var import_jsx_runtime56 = require("react/jsx-runtime");
7425
7481
  var import_jsx_runtime57 = require("react/jsx-runtime");
7426
7482
  var import_react23 = require("react");
7483
+
7484
+ // ../../node_modules/.pnpm/fuse.js@7.4.0/node_modules/fuse.js/dist/fuse.mjs
7485
+ function isArray(value) {
7486
+ return !Array.isArray ? getTag(value) === "[object Array]" : Array.isArray(value);
7487
+ }
7488
+ function baseToString(value) {
7489
+ if (typeof value == "string") {
7490
+ return value;
7491
+ }
7492
+ if (typeof value === "bigint") {
7493
+ return value.toString();
7494
+ }
7495
+ const result = value + "";
7496
+ return result == "0" && 1 / value == -Infinity ? "-0" : result;
7497
+ }
7498
+ function toString(value) {
7499
+ return value == null ? "" : baseToString(value);
7500
+ }
7501
+ function isString(value) {
7502
+ return typeof value === "string";
7503
+ }
7504
+ function isNumber2(value) {
7505
+ return typeof value === "number";
7506
+ }
7507
+ function isBoolean(value) {
7508
+ return value === true || value === false || isObjectLike(value) && getTag(value) == "[object Boolean]";
7509
+ }
7510
+ function isObject(value) {
7511
+ return typeof value === "object";
7512
+ }
7513
+ function isObjectLike(value) {
7514
+ return isObject(value) && value !== null;
7515
+ }
7516
+ function isDefined(value) {
7517
+ return value !== void 0 && value !== null;
7518
+ }
7519
+ function isBlank(value) {
7520
+ return !value.trim().length;
7521
+ }
7522
+ function getTag(value) {
7523
+ return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value);
7524
+ }
7525
+ var INCORRECT_INDEX_TYPE = "Incorrect 'index' type";
7526
+ var INVALID_DOC_INDEX = "Invalid doc index: must be a non-negative integer within the bounds of the docs array";
7527
+ var LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) => `Invalid value for key ${key}`;
7528
+ var PATTERN_LENGTH_TOO_LARGE = (max2) => `Pattern length exceeds max of ${max2}.`;
7529
+ var MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;
7530
+ var INVALID_KEY_WEIGHT_VALUE = (key) => `Property 'weight' in key '${key}' must be a positive integer`;
7531
+ var FUSE_MATCH_TOKEN_SEARCH_UNSUPPORTED = `Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`;
7532
+ var hasOwn = Object.prototype.hasOwnProperty;
7533
+ var KeyStore = class {
7534
+ constructor(keys) {
7535
+ this._keys = [];
7536
+ this._keyMap = {};
7537
+ let totalWeight = 0;
7538
+ keys.forEach((key) => {
7539
+ const obj = createKey(key);
7540
+ this._keys.push(obj);
7541
+ this._keyMap[obj.id] = obj;
7542
+ totalWeight += obj.weight;
7543
+ });
7544
+ this._keys.forEach((key) => {
7545
+ key.weight /= totalWeight;
7546
+ });
7547
+ }
7548
+ get(keyId) {
7549
+ return this._keyMap[keyId];
7550
+ }
7551
+ keys() {
7552
+ return this._keys;
7553
+ }
7554
+ toJSON() {
7555
+ return JSON.stringify(this._keys);
7556
+ }
7557
+ };
7558
+ function createKey(key) {
7559
+ let path = null;
7560
+ let id = null;
7561
+ let src = null;
7562
+ let weight = 1;
7563
+ let getFn = null;
7564
+ if (isString(key) || isArray(key)) {
7565
+ src = key;
7566
+ path = createKeyPath(key);
7567
+ id = createKeyId(key);
7568
+ } else {
7569
+ if (!hasOwn.call(key, "name")) {
7570
+ throw new Error(MISSING_KEY_PROPERTY("name"));
7571
+ }
7572
+ const name = key.name;
7573
+ src = name;
7574
+ if (hasOwn.call(key, "weight") && key.weight !== void 0) {
7575
+ weight = key.weight;
7576
+ if (weight <= 0) {
7577
+ throw new Error(INVALID_KEY_WEIGHT_VALUE(createKeyId(name)));
7578
+ }
7579
+ }
7580
+ path = createKeyPath(name);
7581
+ id = createKeyId(name);
7582
+ getFn = key.getFn ?? null;
7583
+ }
7584
+ return {
7585
+ path,
7586
+ id,
7587
+ weight,
7588
+ src,
7589
+ getFn
7590
+ };
7591
+ }
7592
+ function createKeyPath(key) {
7593
+ return isArray(key) ? key : key.split(".");
7594
+ }
7595
+ function createKeyId(key) {
7596
+ return isArray(key) ? key.join(".") : key;
7597
+ }
7598
+ function get(obj, path) {
7599
+ const list = [];
7600
+ let arr = false;
7601
+ const deepGet = (obj2, path2, index2, arrayIndex) => {
7602
+ if (!isDefined(obj2)) {
7603
+ return;
7604
+ }
7605
+ if (!path2[index2]) {
7606
+ list.push(arrayIndex !== void 0 ? {
7607
+ v: obj2,
7608
+ i: arrayIndex
7609
+ } : obj2);
7610
+ } else {
7611
+ const key = path2[index2];
7612
+ const value = obj2[key];
7613
+ if (!isDefined(value)) {
7614
+ return;
7615
+ }
7616
+ if (index2 === path2.length - 1 && (isString(value) || isNumber2(value) || isBoolean(value) || typeof value === "bigint")) {
7617
+ list.push(arrayIndex !== void 0 ? {
7618
+ v: toString(value),
7619
+ i: arrayIndex
7620
+ } : toString(value));
7621
+ } else if (isArray(value)) {
7622
+ arr = true;
7623
+ for (let i = 0, len = value.length; i < len; i += 1) {
7624
+ deepGet(value[i], path2, index2 + 1, i);
7625
+ }
7626
+ } else if (path2.length) {
7627
+ deepGet(value, path2, index2 + 1, arrayIndex);
7628
+ }
7629
+ }
7630
+ };
7631
+ deepGet(obj, isString(path) ? path.split(".") : path, 0);
7632
+ return arr ? list : list[0];
7633
+ }
7634
+ var MatchOptions = {
7635
+ includeMatches: false,
7636
+ findAllMatches: false,
7637
+ minMatchCharLength: 1
7638
+ };
7639
+ var BasicOptions = {
7640
+ isCaseSensitive: false,
7641
+ ignoreDiacritics: false,
7642
+ includeScore: false,
7643
+ keys: [],
7644
+ shouldSort: true,
7645
+ sortFn: (a, b) => a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1
7646
+ };
7647
+ var FuzzyOptions = {
7648
+ location: 0,
7649
+ threshold: 0.6,
7650
+ distance: 100
7651
+ };
7652
+ var AdvancedOptions = {
7653
+ useExtendedSearch: false,
7654
+ useTokenSearch: false,
7655
+ tokenize: void 0,
7656
+ tokenMatch: "any",
7657
+ getFn: get,
7658
+ ignoreLocation: false,
7659
+ ignoreFieldNorm: false,
7660
+ fieldNormWeight: 1
7661
+ };
7662
+ var Config = Object.freeze({
7663
+ ...BasicOptions,
7664
+ ...MatchOptions,
7665
+ ...FuzzyOptions,
7666
+ ...AdvancedOptions
7667
+ });
7668
+ function norm(weight = 1, mantissa = 3) {
7669
+ const cache = /* @__PURE__ */ new Map();
7670
+ const m = Math.pow(10, mantissa);
7671
+ return {
7672
+ get(value) {
7673
+ let numTokens = 1;
7674
+ let inSpace = false;
7675
+ for (let i = 0; i < value.length; i++) {
7676
+ if (value.charCodeAt(i) === 32) {
7677
+ if (!inSpace) {
7678
+ numTokens++;
7679
+ inSpace = true;
7680
+ }
7681
+ } else {
7682
+ inSpace = false;
7683
+ }
7684
+ }
7685
+ if (cache.has(numTokens)) {
7686
+ return cache.get(numTokens);
7687
+ }
7688
+ const n = Math.round(m / Math.pow(numTokens, 0.5 * weight)) / m;
7689
+ cache.set(numTokens, n);
7690
+ return n;
7691
+ },
7692
+ clear() {
7693
+ cache.clear();
7694
+ }
7695
+ };
7696
+ }
7697
+ var FuseIndex = class {
7698
+ constructor({
7699
+ getFn = Config.getFn,
7700
+ fieldNormWeight = Config.fieldNormWeight
7701
+ } = {}) {
7702
+ this.norm = norm(fieldNormWeight, 3);
7703
+ this.getFn = getFn;
7704
+ this.isCreated = false;
7705
+ this.docs = [];
7706
+ this.keys = [];
7707
+ this._keysMap = {};
7708
+ this.setIndexRecords();
7709
+ }
7710
+ setSources(docs = []) {
7711
+ this.docs = docs;
7712
+ }
7713
+ setIndexRecords(records = []) {
7714
+ this.records = records;
7715
+ }
7716
+ setKeys(keys = []) {
7717
+ this.keys = keys;
7718
+ this._keysMap = {};
7719
+ keys.forEach((key, idx) => {
7720
+ this._keysMap[key.id] = idx;
7721
+ });
7722
+ }
7723
+ create() {
7724
+ if (this.isCreated || !this.docs.length) {
7725
+ return;
7726
+ }
7727
+ this.isCreated = true;
7728
+ const len = this.docs.length;
7729
+ this.records = new Array(len);
7730
+ let recordCount = 0;
7731
+ if (isString(this.docs[0])) {
7732
+ for (let i = 0; i < len; i++) {
7733
+ const record = this._createStringRecord(this.docs[i], i);
7734
+ if (record) {
7735
+ this.records[recordCount++] = record;
7736
+ }
7737
+ }
7738
+ } else {
7739
+ for (let i = 0; i < len; i++) {
7740
+ this.records[recordCount++] = this._createObjectRecord(this.docs[i], i);
7741
+ }
7742
+ }
7743
+ this.records.length = recordCount;
7744
+ this.norm.clear();
7745
+ }
7746
+ // Appends a record for `doc` at `docIndex` (the doc's position in the source
7747
+ // array). Returns the appended record, or null when `doc` is a blank string
7748
+ // (those are skipped at record creation; see `_createStringRecord`). Callers
7749
+ // use the return value to gate downstream bookkeeping like the inverted
7750
+ // index, which must not be touched when no record was produced.
7751
+ add(doc, docIndex) {
7752
+ if (!Number.isInteger(docIndex) || docIndex < 0) {
7753
+ throw new Error(INVALID_DOC_INDEX);
7754
+ }
7755
+ if (isString(doc)) {
7756
+ const record2 = this._createStringRecord(doc, docIndex);
7757
+ if (record2) {
7758
+ this.records.push(record2);
7759
+ }
7760
+ return record2;
7761
+ }
7762
+ const record = this._createObjectRecord(doc, docIndex);
7763
+ this.records.push(record);
7764
+ return record;
7765
+ }
7766
+ // Removes the record for the doc at the specified source-array (docs) index.
7767
+ // Blank string docs have no record; callers may pass such an index and the
7768
+ // splice is a no-op, but subsequent records still need their .i decremented
7769
+ // to track the docs array that the caller is splicing in parallel.
7770
+ removeAt(idx) {
7771
+ if (!Number.isInteger(idx) || idx < 0) {
7772
+ throw new Error(INVALID_DOC_INDEX);
7773
+ }
7774
+ for (let i = 0, len = this.records.length; i < len; i += 1) {
7775
+ if (this.records[i].i === idx) {
7776
+ this.records.splice(i, 1);
7777
+ break;
7778
+ }
7779
+ }
7780
+ for (let i = 0, len = this.records.length; i < len; i += 1) {
7781
+ if (this.records[i].i > idx) {
7782
+ this.records[i].i -= 1;
7783
+ }
7784
+ }
7785
+ }
7786
+ // Removes records for the docs at the specified source-array indices, then
7787
+ // shifts every surviving record's .i down by the count of removed indices
7788
+ // strictly less than it (mirrors removeAndShiftInvertedIndex's shift math).
7789
+ // Invalid entries (non-integer, negative) in `indices` are dropped silently
7790
+ // — removeAll's natural use case is "caller passed a list of matched doc
7791
+ // indices"; asymmetric throw-vs-no-op would be more surprising than a clean
7792
+ // filter.
7793
+ removeAll(indices) {
7794
+ const toRemove = /* @__PURE__ */ new Set();
7795
+ for (const v of indices) {
7796
+ if (Number.isInteger(v) && v >= 0) {
7797
+ toRemove.add(v);
7798
+ }
7799
+ }
7800
+ if (toRemove.size === 0) {
7801
+ return;
7802
+ }
7803
+ this.records = this.records.filter((r2) => !toRemove.has(r2.i));
7804
+ const sorted = Array.from(toRemove).sort((a, b) => a - b);
7805
+ for (const record of this.records) {
7806
+ let lo = 0;
7807
+ let hi = sorted.length;
7808
+ while (lo < hi) {
7809
+ const mid = lo + hi >>> 1;
7810
+ if (sorted[mid] < record.i) lo = mid + 1;
7811
+ else hi = mid;
7812
+ }
7813
+ record.i -= lo;
7814
+ }
7815
+ }
7816
+ getValueForItemAtKeyId(item, keyId) {
7817
+ return item[this._keysMap[keyId]];
7818
+ }
7819
+ size() {
7820
+ return this.records.length;
7821
+ }
7822
+ _createStringRecord(doc, docIndex) {
7823
+ if (!isDefined(doc) || isBlank(doc)) {
7824
+ return null;
7825
+ }
7826
+ return {
7827
+ v: doc,
7828
+ i: docIndex,
7829
+ n: this.norm.get(doc)
7830
+ };
7831
+ }
7832
+ _createObjectRecord(doc, docIndex) {
7833
+ const record = {
7834
+ i: docIndex,
7835
+ $: {}
7836
+ };
7837
+ for (let keyIndex = 0, keyLen = this.keys.length; keyIndex < keyLen; keyIndex++) {
7838
+ const key = this.keys[keyIndex];
7839
+ const value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);
7840
+ if (!isDefined(value)) {
7841
+ continue;
7842
+ }
7843
+ if (isArray(value)) {
7844
+ const subRecords = [];
7845
+ for (let i = 0, len = value.length; i < len; i += 1) {
7846
+ const item = value[i];
7847
+ if (!isDefined(item)) {
7848
+ continue;
7849
+ }
7850
+ if (isString(item)) {
7851
+ if (!isBlank(item)) {
7852
+ const subRecord = {
7853
+ v: item,
7854
+ i,
7855
+ n: this.norm.get(item)
7856
+ };
7857
+ subRecords.push(subRecord);
7858
+ }
7859
+ } else if (isDefined(item.v)) {
7860
+ const text = isString(item.v) ? item.v : toString(item.v);
7861
+ if (!isBlank(text)) {
7862
+ const subRecord = {
7863
+ v: text,
7864
+ i: item.i,
7865
+ n: this.norm.get(text)
7866
+ };
7867
+ subRecords.push(subRecord);
7868
+ }
7869
+ }
7870
+ }
7871
+ record.$[keyIndex] = subRecords;
7872
+ } else if (isString(value) && !isBlank(value)) {
7873
+ const subRecord = {
7874
+ v: value,
7875
+ n: this.norm.get(value)
7876
+ };
7877
+ record.$[keyIndex] = subRecord;
7878
+ }
7879
+ }
7880
+ return record;
7881
+ }
7882
+ toJSON() {
7883
+ return {
7884
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
7885
+ keys: this.keys.map(({
7886
+ getFn,
7887
+ ...key
7888
+ }) => key),
7889
+ records: this.records
7890
+ };
7891
+ }
7892
+ };
7893
+ function createIndex(keys, docs, {
7894
+ getFn = Config.getFn,
7895
+ fieldNormWeight = Config.fieldNormWeight
7896
+ } = {}) {
7897
+ const myIndex = new FuseIndex({
7898
+ getFn,
7899
+ fieldNormWeight
7900
+ });
7901
+ myIndex.setKeys(keys.map(createKey));
7902
+ myIndex.setSources(docs);
7903
+ myIndex.create();
7904
+ return myIndex;
7905
+ }
7906
+ function parseIndex(data, {
7907
+ getFn = Config.getFn,
7908
+ fieldNormWeight = Config.fieldNormWeight
7909
+ } = {}) {
7910
+ const {
7911
+ keys,
7912
+ records
7913
+ } = data;
7914
+ const myIndex = new FuseIndex({
7915
+ getFn,
7916
+ fieldNormWeight
7917
+ });
7918
+ myIndex.setKeys(keys);
7919
+ myIndex.setIndexRecords(records);
7920
+ return myIndex;
7921
+ }
7922
+ function convertMaskToIndices(matchmask = [], minMatchCharLength = Config.minMatchCharLength) {
7923
+ const indices = [];
7924
+ let start = -1;
7925
+ let end = -1;
7926
+ let i = 0;
7927
+ for (let len = matchmask.length; i < len; i += 1) {
7928
+ const match = matchmask[i];
7929
+ if (match && start === -1) {
7930
+ start = i;
7931
+ } else if (!match && start !== -1) {
7932
+ end = i - 1;
7933
+ if (end - start + 1 >= minMatchCharLength) {
7934
+ indices.push([start, end]);
7935
+ }
7936
+ start = -1;
7937
+ }
7938
+ }
7939
+ if (matchmask[i - 1] && i - start >= minMatchCharLength) {
7940
+ indices.push([start, i - 1]);
7941
+ }
7942
+ return indices;
7943
+ }
7944
+ var MAX_BITS = 32;
7945
+ function search(text, pattern, patternAlphabet, {
7946
+ location = Config.location,
7947
+ distance = Config.distance,
7948
+ threshold = Config.threshold,
7949
+ findAllMatches = Config.findAllMatches,
7950
+ minMatchCharLength = Config.minMatchCharLength,
7951
+ includeMatches = Config.includeMatches,
7952
+ ignoreLocation = Config.ignoreLocation
7953
+ } = {}) {
7954
+ if (pattern.length > MAX_BITS) {
7955
+ throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));
7956
+ }
7957
+ const patternLen = pattern.length;
7958
+ const textLen = text.length;
7959
+ const expectedLocation = Math.max(0, Math.min(location, textLen));
7960
+ let currentThreshold = threshold;
7961
+ let bestLocation = expectedLocation;
7962
+ const calcScore = (errors, currentLocation) => {
7963
+ const accuracy = errors / patternLen;
7964
+ if (ignoreLocation) return accuracy;
7965
+ const proximity = Math.abs(expectedLocation - currentLocation);
7966
+ if (!distance) return proximity ? 1 : accuracy;
7967
+ return accuracy + proximity / distance;
7968
+ };
7969
+ const computeMatches = minMatchCharLength > 1 || includeMatches;
7970
+ const matchMask = computeMatches ? Array(textLen) : [];
7971
+ let index2;
7972
+ while ((index2 = text.indexOf(pattern, bestLocation)) > -1) {
7973
+ const score = calcScore(0, index2);
7974
+ currentThreshold = Math.min(score, currentThreshold);
7975
+ bestLocation = index2 + patternLen;
7976
+ if (computeMatches) {
7977
+ let i = 0;
7978
+ while (i < patternLen) {
7979
+ matchMask[index2 + i] = 1;
7980
+ i += 1;
7981
+ }
7982
+ }
7983
+ }
7984
+ bestLocation = -1;
7985
+ let lastBitArr = [];
7986
+ let finalScore = 1;
7987
+ let bestErrors = 0;
7988
+ let binMax = patternLen + textLen;
7989
+ const mask = 1 << patternLen - 1;
7990
+ for (let i = 0; i < patternLen; i += 1) {
7991
+ let binMin = 0;
7992
+ let binMid = binMax;
7993
+ while (binMin < binMid) {
7994
+ const score2 = calcScore(i, expectedLocation + binMid);
7995
+ if (score2 <= currentThreshold) {
7996
+ binMin = binMid;
7997
+ } else {
7998
+ binMax = binMid;
7999
+ }
8000
+ binMid = Math.floor((binMax - binMin) / 2 + binMin);
8001
+ }
8002
+ binMax = binMid;
8003
+ let start = Math.max(1, expectedLocation - binMid + 1);
8004
+ const finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen;
8005
+ const bitArr = Array(finish + 2);
8006
+ bitArr[finish + 1] = (1 << i) - 1;
8007
+ for (let j = finish; j >= start; j -= 1) {
8008
+ const currentLocation = j - 1;
8009
+ const charMatch = patternAlphabet[text[currentLocation]];
8010
+ bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch;
8011
+ if (i) {
8012
+ bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1];
8013
+ }
8014
+ if (bitArr[j] & mask) {
8015
+ finalScore = calcScore(i, currentLocation);
8016
+ if (finalScore <= currentThreshold) {
8017
+ currentThreshold = finalScore;
8018
+ bestLocation = currentLocation;
8019
+ bestErrors = i;
8020
+ if (bestLocation <= expectedLocation) {
8021
+ break;
8022
+ }
8023
+ start = Math.max(1, 2 * expectedLocation - bestLocation);
8024
+ }
8025
+ }
8026
+ }
8027
+ const score = calcScore(i + 1, expectedLocation);
8028
+ if (score > currentThreshold) {
8029
+ break;
8030
+ }
8031
+ lastBitArr = bitArr;
8032
+ }
8033
+ if (computeMatches && bestLocation >= 0) {
8034
+ const matchEnd = Math.min(textLen - 1, bestLocation + patternLen - 1 + bestErrors);
8035
+ for (let k = bestLocation; k <= matchEnd; k += 1) {
8036
+ if (patternAlphabet[text[k]]) {
8037
+ matchMask[k] = 1;
8038
+ }
8039
+ }
8040
+ }
8041
+ const result = {
8042
+ isMatch: bestLocation >= 0,
8043
+ // Count exact matches (those with a score of 0) to be "almost" exact
8044
+ score: Math.max(1e-3, finalScore)
8045
+ };
8046
+ if (computeMatches) {
8047
+ const indices = convertMaskToIndices(matchMask, minMatchCharLength);
8048
+ if (!indices.length) {
8049
+ result.isMatch = false;
8050
+ } else if (includeMatches) {
8051
+ result.indices = indices;
8052
+ }
8053
+ }
8054
+ return result;
8055
+ }
8056
+ function createPatternAlphabet(pattern) {
8057
+ const mask = {};
8058
+ for (let i = 0, len = pattern.length; i < len; i += 1) {
8059
+ const char = pattern.charAt(i);
8060
+ mask[char] = (mask[char] || 0) | 1 << len - i - 1;
8061
+ }
8062
+ return mask;
8063
+ }
8064
+ function mergeIndices(indices) {
8065
+ if (indices.length <= 1) return indices;
8066
+ indices.sort((a, b) => a[0] - b[0] || a[1] - b[1]);
8067
+ const merged = [indices[0]];
8068
+ for (let i = 1, len = indices.length; i < len; i += 1) {
8069
+ const last = merged[merged.length - 1];
8070
+ const curr = indices[i];
8071
+ if (curr[0] <= last[1] + 1) {
8072
+ last[1] = Math.max(last[1], curr[1]);
8073
+ } else {
8074
+ merged.push(curr);
8075
+ }
8076
+ }
8077
+ return merged;
8078
+ }
8079
+ var NON_DECOMPOSABLE_MAP = {
8080
+ "\u0142": "l",
8081
+ // ł
8082
+ "\u0141": "L",
8083
+ // Ł
8084
+ "\u0111": "d",
8085
+ // đ
8086
+ "\u0110": "D",
8087
+ // Đ
8088
+ "\xF8": "o",
8089
+ // ø
8090
+ "\xD8": "O",
8091
+ // Ø
8092
+ "\u0127": "h",
8093
+ // ħ
8094
+ "\u0126": "H",
8095
+ // Ħ
8096
+ "\u0167": "t",
8097
+ // ŧ
8098
+ "\u0166": "T",
8099
+ // Ŧ
8100
+ "\u0131": "i",
8101
+ // ı
8102
+ "\xDF": "ss"
8103
+ // ß
8104
+ };
8105
+ var NON_DECOMPOSABLE_RE = new RegExp("[" + Object.keys(NON_DECOMPOSABLE_MAP).join("") + "]", "g");
8106
+ var stripDiacritics = typeof String.prototype.normalize === "function" ? (str) => str.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "").replace(NON_DECOMPOSABLE_RE, (ch) => NON_DECOMPOSABLE_MAP[ch]) : (str) => str;
8107
+ var BitapSearch = class {
8108
+ constructor(pattern, {
8109
+ location = Config.location,
8110
+ threshold = Config.threshold,
8111
+ distance = Config.distance,
8112
+ includeMatches = Config.includeMatches,
8113
+ findAllMatches = Config.findAllMatches,
8114
+ minMatchCharLength = Config.minMatchCharLength,
8115
+ isCaseSensitive = Config.isCaseSensitive,
8116
+ ignoreDiacritics = Config.ignoreDiacritics,
8117
+ ignoreLocation = Config.ignoreLocation
8118
+ } = {}) {
8119
+ this.options = {
8120
+ location,
8121
+ threshold,
8122
+ distance,
8123
+ includeMatches,
8124
+ findAllMatches,
8125
+ minMatchCharLength,
8126
+ isCaseSensitive,
8127
+ ignoreDiacritics,
8128
+ ignoreLocation
8129
+ };
8130
+ pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
8131
+ pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
8132
+ this.pattern = pattern;
8133
+ this.chunks = [];
8134
+ if (!this.pattern.length) {
8135
+ return;
8136
+ }
8137
+ const addChunk = (pattern2, startIndex) => {
8138
+ this.chunks.push({
8139
+ pattern: pattern2,
8140
+ alphabet: createPatternAlphabet(pattern2),
8141
+ startIndex
8142
+ });
8143
+ };
8144
+ const len = this.pattern.length;
8145
+ if (len > MAX_BITS) {
8146
+ let i = 0;
8147
+ const remainder = len % MAX_BITS;
8148
+ const end = len - remainder;
8149
+ while (i < end) {
8150
+ addChunk(this.pattern.substr(i, MAX_BITS), i);
8151
+ i += MAX_BITS;
8152
+ }
8153
+ if (remainder) {
8154
+ const startIndex = len - MAX_BITS;
8155
+ addChunk(this.pattern.substr(startIndex), startIndex);
8156
+ }
8157
+ } else {
8158
+ addChunk(this.pattern, 0);
8159
+ }
8160
+ }
8161
+ searchIn(text) {
8162
+ const {
8163
+ isCaseSensitive,
8164
+ ignoreDiacritics,
8165
+ includeMatches
8166
+ } = this.options;
8167
+ text = isCaseSensitive ? text : text.toLowerCase();
8168
+ text = ignoreDiacritics ? stripDiacritics(text) : text;
8169
+ if (this.pattern === text) {
8170
+ const result2 = {
8171
+ isMatch: true,
8172
+ score: 0
8173
+ };
8174
+ if (includeMatches) {
8175
+ result2.indices = [[0, text.length - 1]];
8176
+ }
8177
+ return result2;
8178
+ }
8179
+ const {
8180
+ location,
8181
+ distance,
8182
+ threshold,
8183
+ findAllMatches,
8184
+ minMatchCharLength,
8185
+ ignoreLocation
8186
+ } = this.options;
8187
+ const allIndices = [];
8188
+ let totalScore = 0;
8189
+ let hasMatches = false;
8190
+ this.chunks.forEach(({
8191
+ pattern,
8192
+ alphabet,
8193
+ startIndex
8194
+ }) => {
8195
+ const {
8196
+ isMatch,
8197
+ score,
8198
+ indices
8199
+ } = search(text, pattern, alphabet, {
8200
+ location: location + startIndex,
8201
+ distance,
8202
+ threshold,
8203
+ findAllMatches,
8204
+ minMatchCharLength,
8205
+ includeMatches,
8206
+ ignoreLocation
8207
+ });
8208
+ if (isMatch) {
8209
+ hasMatches = true;
8210
+ }
8211
+ totalScore += score;
8212
+ if (isMatch && indices) {
8213
+ allIndices.push(...indices);
8214
+ }
8215
+ });
8216
+ const result = {
8217
+ isMatch: hasMatches,
8218
+ score: hasMatches ? totalScore / this.chunks.length : 1
8219
+ };
8220
+ if (hasMatches && includeMatches) {
8221
+ result.indices = mergeIndices(allIndices);
8222
+ }
8223
+ return result;
8224
+ }
8225
+ };
8226
+ var MULTI_MATCH_TYPES = /* @__PURE__ */ new Set(["fuzzy", "include"]);
8227
+ function isInverse(type) {
8228
+ return type.startsWith("inverse");
8229
+ }
8230
+ var matchers = [
8231
+ // =term — exact match
8232
+ {
8233
+ type: "exact",
8234
+ multiRegex: /^="(.*)"$/,
8235
+ singleRegex: /^=(.*)$/,
8236
+ create: (pattern) => ({
8237
+ type: "exact",
8238
+ search(text) {
8239
+ const isMatch = text === pattern;
8240
+ return {
8241
+ isMatch,
8242
+ score: isMatch ? 0 : 1,
8243
+ indices: [0, pattern.length - 1]
8244
+ };
8245
+ }
8246
+ })
8247
+ },
8248
+ // 'term — include (substring) match
8249
+ {
8250
+ type: "include",
8251
+ multiRegex: /^'"(.*)"$/,
8252
+ singleRegex: /^'(.*)$/,
8253
+ create: (pattern) => ({
8254
+ type: "include",
8255
+ search(text) {
8256
+ let location = 0;
8257
+ let index2;
8258
+ const indices = [];
8259
+ const patternLen = pattern.length;
8260
+ while ((index2 = text.indexOf(pattern, location)) > -1) {
8261
+ location = index2 + patternLen;
8262
+ indices.push([index2, location - 1]);
8263
+ }
8264
+ const isMatch = !!indices.length;
8265
+ return {
8266
+ isMatch,
8267
+ score: isMatch ? 0 : 1,
8268
+ indices
8269
+ };
8270
+ }
8271
+ })
8272
+ },
8273
+ // ^term — prefix match
8274
+ {
8275
+ type: "prefix-exact",
8276
+ multiRegex: /^\^"(.*)"$/,
8277
+ singleRegex: /^\^(.*)$/,
8278
+ create: (pattern) => ({
8279
+ type: "prefix-exact",
8280
+ search(text) {
8281
+ const isMatch = text.startsWith(pattern);
8282
+ return {
8283
+ isMatch,
8284
+ score: isMatch ? 0 : 1,
8285
+ indices: [0, pattern.length - 1]
8286
+ };
8287
+ }
8288
+ })
8289
+ },
8290
+ // !^term — inverse prefix match
8291
+ {
8292
+ type: "inverse-prefix-exact",
8293
+ multiRegex: /^!\^"(.*)"$/,
8294
+ singleRegex: /^!\^(.*)$/,
8295
+ create: (pattern) => ({
8296
+ type: "inverse-prefix-exact",
8297
+ search(text) {
8298
+ const isMatch = !text.startsWith(pattern);
8299
+ return {
8300
+ isMatch,
8301
+ score: isMatch ? 0 : 1,
8302
+ indices: [0, text.length - 1]
8303
+ };
8304
+ }
8305
+ })
8306
+ },
8307
+ // !term$ — inverse suffix match
8308
+ {
8309
+ type: "inverse-suffix-exact",
8310
+ multiRegex: /^!"(.*)"\$$/,
8311
+ singleRegex: /^!(.*)\$$/,
8312
+ create: (pattern) => ({
8313
+ type: "inverse-suffix-exact",
8314
+ search(text) {
8315
+ const isMatch = !text.endsWith(pattern);
8316
+ return {
8317
+ isMatch,
8318
+ score: isMatch ? 0 : 1,
8319
+ indices: [0, text.length - 1]
8320
+ };
8321
+ }
8322
+ })
8323
+ },
8324
+ // term$ — suffix match
8325
+ {
8326
+ type: "suffix-exact",
8327
+ multiRegex: /^"(.*)"\$$/,
8328
+ singleRegex: /^(.*)\$$/,
8329
+ create: (pattern) => ({
8330
+ type: "suffix-exact",
8331
+ search(text) {
8332
+ const isMatch = text.endsWith(pattern);
8333
+ return {
8334
+ isMatch,
8335
+ score: isMatch ? 0 : 1,
8336
+ indices: [text.length - pattern.length, text.length - 1]
8337
+ };
8338
+ }
8339
+ })
8340
+ },
8341
+ // !term — inverse exact (does not contain)
8342
+ {
8343
+ type: "inverse-exact",
8344
+ multiRegex: /^!"(.*)"$/,
8345
+ singleRegex: /^!(.*)$/,
8346
+ create: (pattern) => ({
8347
+ type: "inverse-exact",
8348
+ search(text) {
8349
+ const isMatch = text.indexOf(pattern) === -1;
8350
+ return {
8351
+ isMatch,
8352
+ score: isMatch ? 0 : 1,
8353
+ indices: [0, text.length - 1]
8354
+ };
8355
+ }
8356
+ })
8357
+ },
8358
+ // term — fuzzy match (catch-all, must be last)
8359
+ {
8360
+ type: "fuzzy",
8361
+ multiRegex: /^"(.*)"$/,
8362
+ singleRegex: /^(.*)$/,
8363
+ create: (pattern, options = {}) => {
8364
+ const bitap = new BitapSearch(pattern, {
8365
+ location: options.location ?? Config.location,
8366
+ threshold: options.threshold ?? Config.threshold,
8367
+ distance: options.distance ?? Config.distance,
8368
+ includeMatches: options.includeMatches ?? Config.includeMatches,
8369
+ findAllMatches: options.findAllMatches ?? Config.findAllMatches,
8370
+ minMatchCharLength: options.minMatchCharLength ?? Config.minMatchCharLength,
8371
+ isCaseSensitive: options.isCaseSensitive ?? Config.isCaseSensitive,
8372
+ ignoreDiacritics: options.ignoreDiacritics ?? Config.ignoreDiacritics,
8373
+ ignoreLocation: options.ignoreLocation ?? Config.ignoreLocation
8374
+ });
8375
+ return {
8376
+ type: "fuzzy",
8377
+ search(text) {
8378
+ return bitap.searchIn(text);
8379
+ }
8380
+ };
8381
+ }
8382
+ }
8383
+ ];
8384
+ var matchersLen = matchers.length;
8385
+ var ESCAPED_PIPE = "\0";
8386
+ var OR_TOKEN = "|";
8387
+ function tokenize(pattern) {
8388
+ const tokens = [];
8389
+ const len = pattern.length;
8390
+ let i = 0;
8391
+ while (i < len) {
8392
+ while (i < len && pattern[i] === " ") i++;
8393
+ if (i >= len) break;
8394
+ let j = i;
8395
+ while (j < len && pattern[j] !== " " && pattern[j] !== '"') j++;
8396
+ if (j < len && pattern[j] === '"') {
8397
+ j++;
8398
+ while (j < len) {
8399
+ if (pattern[j] === '"') {
8400
+ const next = j + 1;
8401
+ if (next >= len || pattern[next] === " ") {
8402
+ j++;
8403
+ break;
8404
+ }
8405
+ if (pattern[next] === "$" && (next + 1 >= len || pattern[next + 1] === " ")) {
8406
+ j += 2;
8407
+ break;
8408
+ }
8409
+ }
8410
+ j++;
8411
+ }
8412
+ tokens.push(pattern.substring(i, j));
8413
+ i = j;
8414
+ } else {
8415
+ while (j < len && pattern[j] !== " ") j++;
8416
+ tokens.push(pattern.substring(i, j));
8417
+ i = j;
8418
+ }
8419
+ }
8420
+ return tokens;
8421
+ }
8422
+ function getMatch(pattern, exp) {
8423
+ const matches = pattern.match(exp);
8424
+ return matches ? matches[1] : null;
8425
+ }
8426
+ function parseQuery(pattern, options = {}) {
8427
+ const escaped = pattern.replace(/\\\|/g, ESCAPED_PIPE);
8428
+ return escaped.split(OR_TOKEN).map((item) => {
8429
+ const restored = item.replace(/\u0000/g, "|");
8430
+ const query = tokenize(restored.trim()).filter((item2) => item2 && !!item2.trim());
8431
+ const results = [];
8432
+ for (let i = 0, len = query.length; i < len; i += 1) {
8433
+ const queryItem = query[i];
8434
+ let found = false;
8435
+ let idx = -1;
8436
+ while (!found && ++idx < matchersLen) {
8437
+ const def = matchers[idx];
8438
+ const token = getMatch(queryItem, def.multiRegex);
8439
+ if (token) {
8440
+ results.push(def.create(token, options));
8441
+ found = true;
8442
+ }
8443
+ }
8444
+ if (found) {
8445
+ continue;
8446
+ }
8447
+ idx = -1;
8448
+ while (++idx < matchersLen) {
8449
+ const def = matchers[idx];
8450
+ const token = getMatch(queryItem, def.singleRegex);
8451
+ if (token) {
8452
+ results.push(def.create(token, options));
8453
+ break;
8454
+ }
8455
+ }
8456
+ }
8457
+ return results;
8458
+ });
8459
+ }
8460
+ var ExtendedSearch = class {
8461
+ constructor(pattern, {
8462
+ isCaseSensitive = Config.isCaseSensitive,
8463
+ ignoreDiacritics = Config.ignoreDiacritics,
8464
+ includeMatches = Config.includeMatches,
8465
+ minMatchCharLength = Config.minMatchCharLength,
8466
+ ignoreLocation = Config.ignoreLocation,
8467
+ findAllMatches = Config.findAllMatches,
8468
+ location = Config.location,
8469
+ threshold = Config.threshold,
8470
+ distance = Config.distance
8471
+ } = {}) {
8472
+ this.query = null;
8473
+ this.options = {
8474
+ isCaseSensitive,
8475
+ ignoreDiacritics,
8476
+ includeMatches,
8477
+ minMatchCharLength,
8478
+ findAllMatches,
8479
+ ignoreLocation,
8480
+ location,
8481
+ threshold,
8482
+ distance
8483
+ };
8484
+ pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
8485
+ pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
8486
+ this.pattern = pattern;
8487
+ this.query = parseQuery(this.pattern, this.options);
8488
+ }
8489
+ static condition(_, options) {
8490
+ return options.useExtendedSearch;
8491
+ }
8492
+ // Note: searchIn operates on a single text value and sets hasInverse on the
8493
+ // result when inverse patterns are involved. _searchObjectList uses this to
8494
+ // switch from "ANY key" to "ALL keys" aggregation. See #712.
8495
+ searchIn(text) {
8496
+ const query = this.query;
8497
+ if (!query) {
8498
+ return {
8499
+ isMatch: false,
8500
+ score: 1
8501
+ };
8502
+ }
8503
+ const {
8504
+ includeMatches,
8505
+ isCaseSensitive,
8506
+ ignoreDiacritics
8507
+ } = this.options;
8508
+ text = isCaseSensitive ? text : text.toLowerCase();
8509
+ text = ignoreDiacritics ? stripDiacritics(text) : text;
8510
+ let numMatches = 0;
8511
+ const allIndices = [];
8512
+ let totalScore = 0;
8513
+ let hasInverse = false;
8514
+ for (let i = 0, qLen = query.length; i < qLen; i += 1) {
8515
+ const searchers = query[i];
8516
+ allIndices.length = 0;
8517
+ numMatches = 0;
8518
+ hasInverse = false;
8519
+ for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {
8520
+ const matcher = searchers[j];
8521
+ const {
8522
+ isMatch,
8523
+ indices,
8524
+ score
8525
+ } = matcher.search(text);
8526
+ if (isMatch) {
8527
+ numMatches += 1;
8528
+ totalScore += score;
8529
+ if (isInverse(matcher.type)) {
8530
+ hasInverse = true;
8531
+ }
8532
+ if (includeMatches) {
8533
+ if (MULTI_MATCH_TYPES.has(matcher.type)) {
8534
+ allIndices.push(...indices);
8535
+ } else {
8536
+ allIndices.push(indices);
8537
+ }
8538
+ }
8539
+ } else {
8540
+ totalScore = 0;
8541
+ numMatches = 0;
8542
+ allIndices.length = 0;
8543
+ hasInverse = false;
8544
+ break;
8545
+ }
8546
+ }
8547
+ if (numMatches) {
8548
+ const result = {
8549
+ isMatch: true,
8550
+ score: totalScore / numMatches
8551
+ };
8552
+ if (hasInverse) {
8553
+ result.hasInverse = true;
8554
+ }
8555
+ if (includeMatches) {
8556
+ result.indices = mergeIndices(allIndices);
8557
+ }
8558
+ return result;
8559
+ }
8560
+ }
8561
+ return {
8562
+ isMatch: false,
8563
+ score: 1
8564
+ };
8565
+ }
8566
+ };
8567
+ var registeredSearchers = [];
8568
+ function register(...args) {
8569
+ registeredSearchers.push(...args);
8570
+ }
8571
+ function createSearcher(pattern, options) {
8572
+ for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {
8573
+ const searcherClass = registeredSearchers[i];
8574
+ if (searcherClass.condition(pattern, options)) {
8575
+ return new searcherClass(pattern, options);
8576
+ }
8577
+ }
8578
+ return new BitapSearch(pattern, options);
8579
+ }
8580
+ var LogicalOperator = {
8581
+ AND: "$and",
8582
+ OR: "$or"
8583
+ };
8584
+ var KeyType = {
8585
+ PATH: "$path",
8586
+ PATTERN: "$val"
8587
+ };
8588
+ var isExpression = (query) => !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);
8589
+ var isPath = (query) => !!query[KeyType.PATH];
8590
+ var isLeaf = (query) => !isArray(query) && isObject(query) && !isExpression(query);
8591
+ var convertToExplicit = (query) => ({
8592
+ [LogicalOperator.AND]: Object.keys(query).map((key) => ({
8593
+ [key]: query[key]
8594
+ }))
8595
+ });
8596
+ function parse2(query, options, {
8597
+ auto = true
8598
+ } = {}) {
8599
+ const next = (query2) => {
8600
+ if (isString(query2)) {
8601
+ const obj = {
8602
+ keyId: null,
8603
+ pattern: query2
8604
+ };
8605
+ if (auto) {
8606
+ obj.searcher = createSearcher(query2, options);
8607
+ }
8608
+ return obj;
8609
+ }
8610
+ const keys = Object.keys(query2);
8611
+ const isQueryPath = isPath(query2);
8612
+ if (!isQueryPath && keys.length > 1 && !isExpression(query2)) {
8613
+ return next(convertToExplicit(query2));
8614
+ }
8615
+ if (isLeaf(query2)) {
8616
+ const key = isQueryPath ? query2[KeyType.PATH] : keys[0];
8617
+ const pattern = isQueryPath ? query2[KeyType.PATTERN] : query2[key];
8618
+ if (!isString(pattern)) {
8619
+ throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));
8620
+ }
8621
+ const obj = {
8622
+ keyId: createKeyId(key),
8623
+ pattern
8624
+ };
8625
+ if (auto) {
8626
+ obj.searcher = createSearcher(pattern, options);
8627
+ }
8628
+ return obj;
8629
+ }
8630
+ const node = {
8631
+ children: [],
8632
+ operator: keys[0]
8633
+ };
8634
+ keys.forEach((key) => {
8635
+ const value = query2[key];
8636
+ if (isArray(value)) {
8637
+ value.forEach((item) => {
8638
+ node.children.push(next(item));
8639
+ });
8640
+ }
8641
+ });
8642
+ return node;
8643
+ };
8644
+ if (!isExpression(query)) {
8645
+ query = convertToExplicit(query);
8646
+ }
8647
+ return next(query);
8648
+ }
8649
+ function computeScoreSingle(matches, {
8650
+ ignoreFieldNorm = Config.ignoreFieldNorm
8651
+ }) {
8652
+ let totalScore = 1;
8653
+ matches.forEach(({
8654
+ key,
8655
+ norm: norm2,
8656
+ score
8657
+ }) => {
8658
+ const weight = key ? key.weight : null;
8659
+ totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm2));
8660
+ });
8661
+ return totalScore;
8662
+ }
8663
+ function computeScore(results, {
8664
+ ignoreFieldNorm = Config.ignoreFieldNorm
8665
+ }) {
8666
+ results.forEach((result) => {
8667
+ result.score = computeScoreSingle(result.matches, {
8668
+ ignoreFieldNorm
8669
+ });
8670
+ });
8671
+ }
8672
+ var MaxHeap = class {
8673
+ constructor(limit) {
8674
+ this.limit = limit;
8675
+ this.heap = [];
8676
+ }
8677
+ get size() {
8678
+ return this.heap.length;
8679
+ }
8680
+ shouldInsert(score) {
8681
+ return this.size < this.limit || score < this.heap[0].score;
8682
+ }
8683
+ insert(item) {
8684
+ if (this.size < this.limit) {
8685
+ this.heap.push(item);
8686
+ this._bubbleUp(this.size - 1);
8687
+ } else if (item.score < this.heap[0].score) {
8688
+ this.heap[0] = item;
8689
+ this._sinkDown(0);
8690
+ }
8691
+ }
8692
+ extractSorted(sortFn) {
8693
+ return this.heap.sort(sortFn);
8694
+ }
8695
+ _bubbleUp(i) {
8696
+ const heap = this.heap;
8697
+ while (i > 0) {
8698
+ const parent = i - 1 >> 1;
8699
+ if (heap[i].score <= heap[parent].score) break;
8700
+ const tmp = heap[i];
8701
+ heap[i] = heap[parent];
8702
+ heap[parent] = tmp;
8703
+ i = parent;
8704
+ }
8705
+ }
8706
+ _sinkDown(i) {
8707
+ const heap = this.heap;
8708
+ const len = heap.length;
8709
+ let largest = i;
8710
+ do {
8711
+ i = largest;
8712
+ const left = 2 * i + 1;
8713
+ const right = 2 * i + 2;
8714
+ if (left < len && heap[left].score > heap[largest].score) {
8715
+ largest = left;
8716
+ }
8717
+ if (right < len && heap[right].score > heap[largest].score) {
8718
+ largest = right;
8719
+ }
8720
+ if (largest !== i) {
8721
+ const tmp = heap[i];
8722
+ heap[i] = heap[largest];
8723
+ heap[largest] = tmp;
8724
+ }
8725
+ } while (largest !== i);
8726
+ }
8727
+ };
8728
+ function formatMatches(result) {
8729
+ const matches = [];
8730
+ result.matches.forEach((match) => {
8731
+ if (!isDefined(match.indices) || !match.indices.length) {
8732
+ return;
8733
+ }
8734
+ const obj = {
8735
+ indices: match.indices,
8736
+ value: match.value
8737
+ };
8738
+ if (match.key) {
8739
+ obj.key = match.key.id;
8740
+ }
8741
+ if (match.idx > -1) {
8742
+ obj.refIndex = match.idx;
8743
+ }
8744
+ matches.push(obj);
8745
+ });
8746
+ return matches;
8747
+ }
8748
+ function format(results, docs, {
8749
+ includeMatches = Config.includeMatches,
8750
+ includeScore = Config.includeScore
8751
+ } = {}) {
8752
+ return results.map((result) => {
8753
+ const {
8754
+ idx
8755
+ } = result;
8756
+ const data = {
8757
+ item: docs[idx],
8758
+ refIndex: idx
8759
+ };
8760
+ if (includeMatches) data.matches = formatMatches(result);
8761
+ if (includeScore) data.score = result.score;
8762
+ return data;
8763
+ });
8764
+ }
8765
+ var DEFAULT_TOKEN = /[\p{L}\p{M}\p{N}_]+/gu;
8766
+ var warned = /* @__PURE__ */ new WeakSet();
8767
+ function warnNonGlobal(regex) {
8768
+ if (!warned.has(regex)) {
8769
+ warned.add(regex);
8770
+ console.warn(`[Fuse] tokenize regex ${regex} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`);
8771
+ }
8772
+ }
8773
+ function resolveTokenize(tokenize2) {
8774
+ if (typeof tokenize2 === "function") {
8775
+ let validated = false;
8776
+ return (text) => {
8777
+ const result = tokenize2(text);
8778
+ if (!validated) {
8779
+ validated = true;
8780
+ if (!Array.isArray(result) || result.some((t12) => typeof t12 !== "string")) {
8781
+ throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(result) ? "array containing non-strings" : typeof result}.`);
8782
+ }
8783
+ }
8784
+ return result;
8785
+ };
8786
+ }
8787
+ if (tokenize2 instanceof RegExp) {
8788
+ if (!tokenize2.global) warnNonGlobal(tokenize2);
8789
+ return (text) => text.match(tokenize2) || [];
8790
+ }
8791
+ return (text) => text.match(DEFAULT_TOKEN) || [];
8792
+ }
8793
+ function createAnalyzer({
8794
+ isCaseSensitive = false,
8795
+ ignoreDiacritics = false,
8796
+ tokenize: tokenize2
8797
+ } = {}) {
8798
+ const tokenizeFn = resolveTokenize(tokenize2);
8799
+ return {
8800
+ tokenize(text) {
8801
+ if (!isCaseSensitive) {
8802
+ text = text.toLowerCase();
8803
+ }
8804
+ if (ignoreDiacritics) {
8805
+ text = stripDiacritics(text);
8806
+ }
8807
+ return tokenizeFn(text);
8808
+ }
8809
+ };
8810
+ }
8811
+ var MAX_MASK_TERMS = 31;
8812
+ var TokenSearch = class {
8813
+ // `tokenMatch: 'all'` (AND) coverage. When true, searchIn reports which
8814
+ // query terms matched each text so the core loop can require record-level
8815
+ // coverage of every term. Bitmask is the ≤31-term fast path; Set is the
8816
+ // ≥32-term fallback (JS bitwise ops are 32-bit signed).
8817
+ static condition(_, options) {
8818
+ return options.useTokenSearch;
8819
+ }
8820
+ constructor(pattern, options) {
8821
+ this.options = options;
8822
+ this.analyzer = createAnalyzer({
8823
+ isCaseSensitive: options.isCaseSensitive,
8824
+ ignoreDiacritics: options.ignoreDiacritics,
8825
+ tokenize: options.tokenize
8826
+ });
8827
+ const queryTerms = this.analyzer.tokenize(pattern);
8828
+ const invertedIndex = options._invertedIndex;
8829
+ const {
8830
+ df,
8831
+ fieldCount
8832
+ } = invertedIndex;
8833
+ this.termSearchers = [];
8834
+ this.idfWeights = [];
8835
+ for (const term of queryTerms) {
8836
+ this.termSearchers.push(new BitapSearch(term, {
8837
+ location: options.location,
8838
+ threshold: options.threshold,
8839
+ distance: options.distance,
8840
+ includeMatches: options.includeMatches,
8841
+ findAllMatches: options.findAllMatches,
8842
+ minMatchCharLength: options.minMatchCharLength,
8843
+ isCaseSensitive: options.isCaseSensitive,
8844
+ ignoreDiacritics: options.ignoreDiacritics,
8845
+ ignoreLocation: true
8846
+ }));
8847
+ const docFreq = df.get(term) || 0;
8848
+ const idf = Math.log(1 + (fieldCount - docFreq + 0.5) / (docFreq + 0.5));
8849
+ this.idfWeights.push(idf);
8850
+ }
8851
+ this.combineAll = options.tokenMatch === "all";
8852
+ this.numTerms = this.termSearchers.length;
8853
+ this.useMask = this.numTerms <= MAX_MASK_TERMS;
8854
+ }
8855
+ searchIn(text) {
8856
+ if (!this.termSearchers.length) {
8857
+ return {
8858
+ isMatch: false,
8859
+ score: 1
8860
+ };
8861
+ }
8862
+ const allIndices = [];
8863
+ let weightedScore = 0;
8864
+ let maxPossibleScore = 0;
8865
+ let matchedCount = 0;
8866
+ let matchedMask = 0;
8867
+ const matchedTerms = this.combineAll && !this.useMask ? /* @__PURE__ */ new Set() : null;
8868
+ for (let i = 0; i < this.termSearchers.length; i++) {
8869
+ const result = this.termSearchers[i].searchIn(text);
8870
+ const idf = this.idfWeights[i];
8871
+ maxPossibleScore += idf;
8872
+ if (result.isMatch) {
8873
+ matchedCount++;
8874
+ weightedScore += idf * (1 - result.score);
8875
+ if (result.indices) {
8876
+ allIndices.push(...result.indices);
8877
+ }
8878
+ if (this.combineAll) {
8879
+ if (this.useMask) {
8880
+ matchedMask |= 1 << i;
8881
+ } else {
8882
+ matchedTerms.add(i);
8883
+ }
8884
+ }
8885
+ }
8886
+ }
8887
+ if (matchedCount === 0) {
8888
+ return {
8889
+ isMatch: false,
8890
+ score: 1
8891
+ };
8892
+ }
8893
+ const normalized = maxPossibleScore > 0 ? 1 - weightedScore / maxPossibleScore : 0;
8894
+ const searchResult = {
8895
+ isMatch: true,
8896
+ score: Math.max(1e-3, normalized)
8897
+ };
8898
+ if (this.options.includeMatches && allIndices.length) {
8899
+ searchResult.indices = mergeIndices(allIndices);
8900
+ }
8901
+ if (this.combineAll) {
8902
+ if (this.useMask) {
8903
+ searchResult.matchedMask = matchedMask;
8904
+ } else {
8905
+ searchResult.matchedTerms = matchedTerms;
8906
+ }
8907
+ searchResult.termCount = this.numTerms;
8908
+ }
8909
+ return searchResult;
8910
+ }
8911
+ };
8912
+ function addField(index2, text, docIdx, analyzer) {
8913
+ const tokens = analyzer.tokenize(text);
8914
+ if (!tokens.length) return;
8915
+ index2.fieldCount++;
8916
+ index2.docFieldCount.set(docIdx, (index2.docFieldCount.get(docIdx) || 0) + 1);
8917
+ const distinctTerms = new Set(tokens);
8918
+ let perDocTerms = index2.docTermFieldHits.get(docIdx);
8919
+ if (!perDocTerms) {
8920
+ perDocTerms = /* @__PURE__ */ new Map();
8921
+ index2.docTermFieldHits.set(docIdx, perDocTerms);
8922
+ }
8923
+ for (const term of distinctTerms) {
8924
+ perDocTerms.set(term, (perDocTerms.get(term) || 0) + 1);
8925
+ index2.df.set(term, (index2.df.get(term) || 0) + 1);
8926
+ }
8927
+ }
8928
+ function ingestRecord(index2, record, keyCount, analyzer) {
8929
+ const {
8930
+ i: docIdx,
8931
+ v,
8932
+ $: fields
8933
+ } = record;
8934
+ if (v !== void 0) {
8935
+ addField(index2, v, docIdx, analyzer);
8936
+ return;
8937
+ }
8938
+ if (!fields) return;
8939
+ for (let keyIdx = 0; keyIdx < keyCount; keyIdx++) {
8940
+ const value = fields[keyIdx];
8941
+ if (!value) continue;
8942
+ if (Array.isArray(value)) {
8943
+ for (const sub of value) addField(index2, sub.v, docIdx, analyzer);
8944
+ } else {
8945
+ addField(index2, value.v, docIdx, analyzer);
8946
+ }
8947
+ }
8948
+ }
8949
+ function buildInvertedIndex(records, keyCount, analyzer) {
8950
+ const index2 = {
8951
+ fieldCount: 0,
8952
+ df: /* @__PURE__ */ new Map(),
8953
+ docFieldCount: /* @__PURE__ */ new Map(),
8954
+ docTermFieldHits: /* @__PURE__ */ new Map()
8955
+ };
8956
+ for (const record of records) {
8957
+ ingestRecord(index2, record, keyCount, analyzer);
8958
+ }
8959
+ return index2;
8960
+ }
8961
+ function addToInvertedIndex(index2, record, keyCount, analyzer) {
8962
+ ingestRecord(index2, record, keyCount, analyzer);
8963
+ }
8964
+ function removeFromInvertedIndex(index2, docIdx) {
8965
+ const fieldCount = index2.docFieldCount.get(docIdx);
8966
+ if (fieldCount === void 0) return;
8967
+ index2.fieldCount -= fieldCount;
8968
+ index2.docFieldCount.delete(docIdx);
8969
+ const perDocTerms = index2.docTermFieldHits.get(docIdx);
8970
+ if (!perDocTerms) return;
8971
+ for (const [term, hits] of perDocTerms) {
8972
+ const next = (index2.df.get(term) || 0) - hits;
8973
+ if (next <= 0) {
8974
+ index2.df.delete(term);
8975
+ } else {
8976
+ index2.df.set(term, next);
8977
+ }
8978
+ }
8979
+ index2.docTermFieldHits.delete(docIdx);
8980
+ }
8981
+ function removeAndShiftInvertedIndex(index2, removedIndices) {
8982
+ if (removedIndices.length === 0) return;
8983
+ const sorted = Array.from(new Set(removedIndices)).sort((a, b) => a - b);
8984
+ for (const idx of sorted) {
8985
+ removeFromInvertedIndex(index2, idx);
8986
+ }
8987
+ const shift4 = (oldIdx) => {
8988
+ let lo = 0;
8989
+ let hi = sorted.length;
8990
+ while (lo < hi) {
8991
+ const mid = lo + hi >>> 1;
8992
+ if (sorted[mid] < oldIdx) lo = mid + 1;
8993
+ else hi = mid;
8994
+ }
8995
+ return oldIdx - lo;
8996
+ };
8997
+ const firstRemoved = sorted[0];
8998
+ const shiftedDocFieldCount = /* @__PURE__ */ new Map();
8999
+ for (const [oldKey, count3] of index2.docFieldCount) {
9000
+ shiftedDocFieldCount.set(oldKey > firstRemoved ? shift4(oldKey) : oldKey, count3);
9001
+ }
9002
+ index2.docFieldCount = shiftedDocFieldCount;
9003
+ const shiftedDocTermFieldHits = /* @__PURE__ */ new Map();
9004
+ for (const [oldKey, terms] of index2.docTermFieldHits) {
9005
+ shiftedDocTermFieldHits.set(oldKey > firstRemoved ? shift4(oldKey) : oldKey, terms);
9006
+ }
9007
+ index2.docTermFieldHits = shiftedDocTermFieldHits;
9008
+ }
9009
+ var Fuse = class {
9010
+ // Statics are assigned in entry.ts
9011
+ constructor(docs, options, index2) {
9012
+ this.options = {
9013
+ ...Config,
9014
+ ...options
9015
+ };
9016
+ if (this.options.useExtendedSearch && false) ;
9017
+ if (this.options.useTokenSearch && false) ;
9018
+ this._keyStore = new KeyStore(this.options.keys);
9019
+ this._docs = docs;
9020
+ this._myIndex = null;
9021
+ this._invertedIndex = null;
9022
+ this.setCollection(docs, index2);
9023
+ this._lastQuery = null;
9024
+ this._lastSearcher = null;
9025
+ }
9026
+ _getSearcher(query) {
9027
+ if (this._lastQuery === query) {
9028
+ return this._lastSearcher;
9029
+ }
9030
+ const opts = this._invertedIndex ? {
9031
+ ...this.options,
9032
+ _invertedIndex: this._invertedIndex
9033
+ } : this.options;
9034
+ const searcher = createSearcher(query, opts);
9035
+ this._lastQuery = query;
9036
+ this._lastSearcher = searcher;
9037
+ return searcher;
9038
+ }
9039
+ setCollection(docs, index2) {
9040
+ this._docs = docs;
9041
+ if (index2 && !(index2 instanceof FuseIndex)) {
9042
+ throw new Error(INCORRECT_INDEX_TYPE);
9043
+ }
9044
+ this._myIndex = index2 || createIndex(this.options.keys, this._docs, {
9045
+ getFn: this.options.getFn,
9046
+ fieldNormWeight: this.options.fieldNormWeight
9047
+ });
9048
+ if (this.options.useTokenSearch) {
9049
+ const analyzer = createAnalyzer({
9050
+ isCaseSensitive: this.options.isCaseSensitive,
9051
+ ignoreDiacritics: this.options.ignoreDiacritics,
9052
+ tokenize: this.options.tokenize
9053
+ });
9054
+ this._invertedIndex = buildInvertedIndex(this._myIndex.records, this._myIndex.keys.length, analyzer);
9055
+ }
9056
+ this._invalidateSearcherCache();
9057
+ }
9058
+ add(doc) {
9059
+ if (!isDefined(doc)) {
9060
+ return;
9061
+ }
9062
+ this._docs.push(doc);
9063
+ const record = this._myIndex.add(doc, this._docs.length - 1);
9064
+ if (this._invertedIndex && record) {
9065
+ const analyzer = createAnalyzer({
9066
+ isCaseSensitive: this.options.isCaseSensitive,
9067
+ ignoreDiacritics: this.options.ignoreDiacritics,
9068
+ tokenize: this.options.tokenize
9069
+ });
9070
+ addToInvertedIndex(this._invertedIndex, record, this._myIndex.keys.length, analyzer);
9071
+ }
9072
+ this._invalidateSearcherCache();
9073
+ }
9074
+ remove(predicate = () => false) {
9075
+ const results = [];
9076
+ const indicesToRemove = [];
9077
+ for (let i = 0, len = this._docs.length; i < len; i += 1) {
9078
+ if (predicate(this._docs[i], i)) {
9079
+ results.push(this._docs[i]);
9080
+ indicesToRemove.push(i);
9081
+ }
9082
+ }
9083
+ if (indicesToRemove.length) {
9084
+ if (this._invertedIndex) {
9085
+ removeAndShiftInvertedIndex(this._invertedIndex, indicesToRemove);
9086
+ }
9087
+ const toRemove = new Set(indicesToRemove);
9088
+ this._docs = this._docs.filter((_, i) => !toRemove.has(i));
9089
+ this._myIndex.removeAll(indicesToRemove);
9090
+ this._invalidateSearcherCache();
9091
+ }
9092
+ return results;
9093
+ }
9094
+ removeAt(idx) {
9095
+ if (!Number.isInteger(idx) || idx < 0 || idx >= this._docs.length) {
9096
+ throw new Error(INVALID_DOC_INDEX);
9097
+ }
9098
+ if (this._invertedIndex) {
9099
+ removeAndShiftInvertedIndex(this._invertedIndex, [idx]);
9100
+ }
9101
+ const doc = this._docs.splice(idx, 1)[0];
9102
+ this._myIndex.removeAt(idx);
9103
+ this._invalidateSearcherCache();
9104
+ return doc;
9105
+ }
9106
+ _invalidateSearcherCache() {
9107
+ this._lastQuery = null;
9108
+ this._lastSearcher = null;
9109
+ }
9110
+ getIndex() {
9111
+ return this._myIndex;
9112
+ }
9113
+ search(query, options) {
9114
+ const {
9115
+ limit = -1
9116
+ } = options || {};
9117
+ const {
9118
+ includeMatches,
9119
+ includeScore,
9120
+ shouldSort,
9121
+ sortFn,
9122
+ ignoreFieldNorm
9123
+ } = this.options;
9124
+ if (isString(query) && !query.trim()) {
9125
+ let docs = this._docs.map((item, idx) => ({
9126
+ item,
9127
+ refIndex: idx
9128
+ }));
9129
+ if (isNumber2(limit) && limit > -1) {
9130
+ docs = docs.slice(0, limit);
9131
+ }
9132
+ return docs;
9133
+ }
9134
+ const useHeap = isNumber2(limit) && limit > 0 && isString(query);
9135
+ let results;
9136
+ if (useHeap) {
9137
+ const heap = new MaxHeap(limit);
9138
+ if (isString(this._docs[0])) {
9139
+ this._searchStringList(query, {
9140
+ heap,
9141
+ ignoreFieldNorm
9142
+ });
9143
+ } else {
9144
+ this._searchObjectList(query, {
9145
+ heap,
9146
+ ignoreFieldNorm
9147
+ });
9148
+ }
9149
+ results = heap.extractSorted(sortFn);
9150
+ } else {
9151
+ results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
9152
+ computeScore(results, {
9153
+ ignoreFieldNorm
9154
+ });
9155
+ if (shouldSort) {
9156
+ results.sort(sortFn);
9157
+ }
9158
+ if (isNumber2(limit) && limit > -1) {
9159
+ results = results.slice(0, limit);
9160
+ }
9161
+ }
9162
+ return format(results, this._docs, {
9163
+ includeMatches,
9164
+ includeScore
9165
+ });
9166
+ }
9167
+ _searchStringList(query, {
9168
+ heap,
9169
+ ignoreFieldNorm
9170
+ } = {}) {
9171
+ const searcher = this._getSearcher(query);
9172
+ const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
9173
+ const {
9174
+ records
9175
+ } = this._myIndex;
9176
+ const results = heap ? null : [];
9177
+ records.forEach(({
9178
+ v: text,
9179
+ i: idx,
9180
+ n: norm2
9181
+ }) => {
9182
+ if (!isDefined(text)) {
9183
+ return;
9184
+ }
9185
+ const searchResult = searcher.searchIn(text);
9186
+ if (searchResult.isMatch) {
9187
+ const match = {
9188
+ score: searchResult.score,
9189
+ value: text,
9190
+ norm: norm2,
9191
+ indices: searchResult.indices
9192
+ };
9193
+ if (requireAllTokens) {
9194
+ match.matchedMask = searchResult.matchedMask;
9195
+ match.matchedTerms = searchResult.matchedTerms;
9196
+ match.termCount = searchResult.termCount;
9197
+ }
9198
+ const matches = [match];
9199
+ if (!requireAllTokens || this._coversAllTokens(matches)) {
9200
+ const result = {
9201
+ item: text,
9202
+ idx,
9203
+ matches
9204
+ };
9205
+ if (heap) {
9206
+ result.score = computeScoreSingle(result.matches, {
9207
+ ignoreFieldNorm
9208
+ });
9209
+ if (heap.shouldInsert(result.score)) {
9210
+ heap.insert(result);
9211
+ }
9212
+ } else {
9213
+ results.push(result);
9214
+ }
9215
+ }
9216
+ }
9217
+ });
9218
+ return results;
9219
+ }
9220
+ _searchLogical(query) {
9221
+ const expression = parse2(query, this.options);
9222
+ const evaluate2 = (node, item, idx) => {
9223
+ if (!("children" in node)) {
9224
+ const {
9225
+ keyId,
9226
+ searcher
9227
+ } = node;
9228
+ let matches;
9229
+ if (keyId === null) {
9230
+ matches = [];
9231
+ this._myIndex.keys.forEach((key, keyIndex) => {
9232
+ matches.push(...this._findMatches({
9233
+ key,
9234
+ value: item[keyIndex],
9235
+ searcher
9236
+ }));
9237
+ });
9238
+ } else {
9239
+ matches = this._findMatches({
9240
+ key: this._keyStore.get(keyId),
9241
+ value: this._myIndex.getValueForItemAtKeyId(item, keyId),
9242
+ searcher
9243
+ });
9244
+ }
9245
+ if (matches && matches.length) {
9246
+ return [{
9247
+ idx,
9248
+ item,
9249
+ matches
9250
+ }];
9251
+ }
9252
+ return [];
9253
+ }
9254
+ const {
9255
+ children,
9256
+ operator
9257
+ } = node;
9258
+ const res = [];
9259
+ for (let i = 0, len = children.length; i < len; i += 1) {
9260
+ const child = children[i];
9261
+ const result = evaluate2(child, item, idx);
9262
+ if (result.length) {
9263
+ res.push(...result);
9264
+ } else if (operator === LogicalOperator.AND) {
9265
+ return [];
9266
+ }
9267
+ }
9268
+ return res;
9269
+ };
9270
+ const records = this._myIndex.records;
9271
+ const resultMap = /* @__PURE__ */ new Map();
9272
+ const results = [];
9273
+ records.forEach(({
9274
+ $: item,
9275
+ i: idx
9276
+ }) => {
9277
+ if (isDefined(item)) {
9278
+ const expResults = evaluate2(expression, item, idx);
9279
+ if (expResults.length) {
9280
+ if (!resultMap.has(idx)) {
9281
+ resultMap.set(idx, {
9282
+ idx,
9283
+ item,
9284
+ matches: []
9285
+ });
9286
+ results.push(resultMap.get(idx));
9287
+ }
9288
+ expResults.forEach(({
9289
+ matches
9290
+ }) => {
9291
+ resultMap.get(idx).matches.push(...matches);
9292
+ });
9293
+ }
9294
+ }
9295
+ });
9296
+ return results;
9297
+ }
9298
+ // When a search involves inverse patterns (e.g. !Syrup), the aggregation
9299
+ // across keys switches from "ANY key matches" to "ALL keys must match."
9300
+ // This is signaled by hasInverse on the SearchResult from ExtendedSearch.
9301
+ //
9302
+ // For mixed patterns like "^hello !Syrup", a key failure is ambiguous —
9303
+ // it could be the positive or inverse term that failed. In that case we
9304
+ // conservatively exclude the item, which is strictly better than the old
9305
+ // behavior of including it. See: https://github.com/krisk/Fuse/issues/712
9306
+ _searchObjectList(query, {
9307
+ heap,
9308
+ ignoreFieldNorm
9309
+ } = {}) {
9310
+ const searcher = this._getSearcher(query);
9311
+ const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
9312
+ const {
9313
+ keys,
9314
+ records
9315
+ } = this._myIndex;
9316
+ const results = heap ? null : [];
9317
+ records.forEach(({
9318
+ $: item,
9319
+ i: idx
9320
+ }) => {
9321
+ if (!isDefined(item)) {
9322
+ return;
9323
+ }
9324
+ const matches = [];
9325
+ let anyKeyFailed = false;
9326
+ let hasInverse = false;
9327
+ keys.forEach((key, keyIndex) => {
9328
+ const keyMatches = this._findMatches({
9329
+ key,
9330
+ value: item[keyIndex],
9331
+ searcher
9332
+ });
9333
+ if (keyMatches.length) {
9334
+ matches.push(...keyMatches);
9335
+ if (keyMatches[0].hasInverse) {
9336
+ hasInverse = true;
9337
+ }
9338
+ } else {
9339
+ anyKeyFailed = true;
9340
+ }
9341
+ });
9342
+ if (hasInverse && anyKeyFailed) {
9343
+ return;
9344
+ }
9345
+ if (matches.length && (!requireAllTokens || this._coversAllTokens(matches))) {
9346
+ const result = {
9347
+ idx,
9348
+ item,
9349
+ matches
9350
+ };
9351
+ if (heap) {
9352
+ result.score = computeScoreSingle(result.matches, {
9353
+ ignoreFieldNorm
9354
+ });
9355
+ if (heap.shouldInsert(result.score)) {
9356
+ heap.insert(result);
9357
+ }
9358
+ } else {
9359
+ results.push(result);
9360
+ }
9361
+ }
9362
+ });
9363
+ return results;
9364
+ }
9365
+ _findMatches({
9366
+ key,
9367
+ value,
9368
+ searcher
9369
+ }) {
9370
+ if (!isDefined(value)) {
9371
+ return [];
9372
+ }
9373
+ const matches = [];
9374
+ if (isArray(value)) {
9375
+ value.forEach(({
9376
+ v: text,
9377
+ i: idx,
9378
+ n: norm2
9379
+ }) => {
9380
+ if (!isDefined(text)) {
9381
+ return;
9382
+ }
9383
+ const searchResult = searcher.searchIn(text);
9384
+ if (searchResult.isMatch) {
9385
+ const match = {
9386
+ score: searchResult.score,
9387
+ key,
9388
+ value: text,
9389
+ idx,
9390
+ norm: norm2,
9391
+ indices: searchResult.indices,
9392
+ hasInverse: searchResult.hasInverse
9393
+ };
9394
+ if (searchResult.termCount !== void 0) {
9395
+ match.matchedMask = searchResult.matchedMask;
9396
+ match.matchedTerms = searchResult.matchedTerms;
9397
+ match.termCount = searchResult.termCount;
9398
+ }
9399
+ matches.push(match);
9400
+ }
9401
+ });
9402
+ } else {
9403
+ const {
9404
+ v: text,
9405
+ n: norm2
9406
+ } = value;
9407
+ const searchResult = searcher.searchIn(text);
9408
+ if (searchResult.isMatch) {
9409
+ const match = {
9410
+ score: searchResult.score,
9411
+ key,
9412
+ value: text,
9413
+ norm: norm2,
9414
+ indices: searchResult.indices,
9415
+ hasInverse: searchResult.hasInverse
9416
+ };
9417
+ if (searchResult.termCount !== void 0) {
9418
+ match.matchedMask = searchResult.matchedMask;
9419
+ match.matchedTerms = searchResult.matchedTerms;
9420
+ match.termCount = searchResult.termCount;
9421
+ }
9422
+ matches.push(match);
9423
+ }
9424
+ }
9425
+ return matches;
9426
+ }
9427
+ // Record-level AND gate for token search (`tokenMatch: 'all'`). Returns true
9428
+ // unless the matched terms across ALL of a record's field/array-element
9429
+ // matches fail to cover every query term. `termCount` is only set by
9430
+ // TokenSearch in 'all' mode, so non-token / 'any' searches always pass.
9431
+ _coversAllTokens(matches) {
9432
+ const termCount = matches.length ? matches[0].termCount : void 0;
9433
+ if (termCount === void 0) {
9434
+ return true;
9435
+ }
9436
+ if (termCount <= MAX_MASK_TERMS) {
9437
+ let coverage2 = 0;
9438
+ for (let i = 0; i < matches.length; i++) {
9439
+ coverage2 |= matches[i].matchedMask || 0;
9440
+ }
9441
+ return coverage2 === 2 ** termCount - 1;
9442
+ }
9443
+ const coverage = /* @__PURE__ */ new Set();
9444
+ for (let i = 0; i < matches.length; i++) {
9445
+ const terms = matches[i].matchedTerms;
9446
+ if (terms) {
9447
+ for (const t12 of terms) {
9448
+ coverage.add(t12);
9449
+ }
9450
+ }
9451
+ }
9452
+ return coverage.size === termCount;
9453
+ }
9454
+ };
9455
+ Fuse.version = "7.4.0";
9456
+ Fuse.createIndex = createIndex;
9457
+ Fuse.parseIndex = parseIndex;
9458
+ Fuse.config = Config;
9459
+ Fuse.match = function(pattern, text, options) {
9460
+ if (options && options.useTokenSearch) {
9461
+ throw new Error(FUSE_MATCH_TOKEN_SEARCH_UNSUPPORTED);
9462
+ }
9463
+ const searcher = createSearcher(pattern, {
9464
+ ...Config,
9465
+ ...options
9466
+ });
9467
+ return searcher.searchIn(text);
9468
+ };
9469
+ {
9470
+ Fuse.parseQuery = parse2;
9471
+ }
9472
+ {
9473
+ register(ExtendedSearch);
9474
+ }
9475
+ {
9476
+ register(TokenSearch);
9477
+ }
9478
+ Fuse.use = function(...plugins) {
9479
+ plugins.forEach((plugin) => register(plugin));
9480
+ };
9481
+
9482
+ // ../ui-react/dist/index.mjs
7427
9483
  var import_jsx_runtime58 = require("react/jsx-runtime");
7428
9484
  var import_react24 = require("react");
7429
9485
  var import_jsx_runtime59 = require("react/jsx-runtime");
@@ -7431,10 +9487,10 @@ var import_jsx_runtime60 = require("react/jsx-runtime");
7431
9487
  var import_react25 = require("react");
7432
9488
  var React272 = __toESM(require("react"), 1);
7433
9489
 
7434
- // ../../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
9490
+ // ../../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._udyjcec5g7ve3mpsxbgla63vgi/node_modules/@radix-ui/react-tooltip/dist/index.mjs
7435
9491
  var React31 = __toESM(require("react"), 1);
7436
9492
 
7437
- // ../../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
9493
+ // ../../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_plbhs5hqqc2ne4pfqm2mjggvti/node_modules/@radix-ui/react-popper/dist/index.mjs
7438
9494
  var React29 = __toESM(require("react"), 1);
7439
9495
 
7440
9496
  // ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
@@ -9043,7 +11099,7 @@ var computePosition2 = (reference, floating, options) => {
9043
11099
  });
9044
11100
  };
9045
11101
 
9046
- // ../../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
11102
+ // ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
9047
11103
  var React26 = __toESM(require("react"), 1);
9048
11104
  var import_react5 = require("react");
9049
11105
  var ReactDOM3 = __toESM(require("react-dom"), 1);
@@ -9327,7 +11383,7 @@ var arrow3 = (options, deps) => ({
9327
11383
  options: [options, deps]
9328
11384
  });
9329
11385
 
9330
- // ../../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
11386
+ // ../../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__trfewiwgkjpdk2hzi5vnfkkag4/node_modules/@radix-ui/react-arrow/dist/index.mjs
9331
11387
  var React27 = __toESM(require("react"), 1);
9332
11388
  var import_jsx_runtime10 = require("react/jsx-runtime");
9333
11389
  var NAME = "Arrow";
@@ -9349,7 +11405,7 @@ var Arrow = React27.forwardRef((props, forwardedRef) => {
9349
11405
  Arrow.displayName = NAME;
9350
11406
  var Root2 = Arrow;
9351
11407
 
9352
- // ../../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
11408
+ // ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-size/dist/index.mjs
9353
11409
  var React28 = __toESM(require("react"), 1);
9354
11410
  function useSize(element) {
9355
11411
  const [size4, setSize] = React28.useState(void 0);
@@ -9386,7 +11442,7 @@ function useSize(element) {
9386
11442
  return size4;
9387
11443
  }
9388
11444
 
9389
- // ../../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
11445
+ // ../../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_plbhs5hqqc2ne4pfqm2mjggvti/node_modules/@radix-ui/react-popper/dist/index.mjs
9390
11446
  var import_jsx_runtime11 = require("react/jsx-runtime");
9391
11447
  var POPPER_NAME = "Popper";
9392
11448
  var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
@@ -9658,7 +11714,7 @@ var Anchor = PopperAnchor;
9658
11714
  var Content2 = PopperContent;
9659
11715
  var Arrow2 = PopperArrow;
9660
11716
 
9661
- // ../../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
11717
+ // ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+rea_xe64s7cc2fbkwxawx7ejudwycu/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
9662
11718
  var React30 = __toESM(require("react"), 1);
9663
11719
  var import_jsx_runtime12 = require("react/jsx-runtime");
9664
11720
  var VISUALLY_HIDDEN_STYLES = Object.freeze({
@@ -9690,7 +11746,7 @@ var VisuallyHidden = React30.forwardRef(
9690
11746
  VisuallyHidden.displayName = NAME2;
9691
11747
  var Root3 = VisuallyHidden;
9692
11748
 
9693
- // ../../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
11749
+ // ../../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._udyjcec5g7ve3mpsxbgla63vgi/node_modules/@radix-ui/react-tooltip/dist/index.mjs
9694
11750
  var import_jsx_runtime13 = require("react/jsx-runtime");
9695
11751
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
9696
11752
  createPopperScope
@@ -10173,7 +12229,7 @@ var import_jsx_runtime63 = require("react/jsx-runtime");
10173
12229
  var import_react26 = require("react");
10174
12230
  var React282 = __toESM(require("react"), 1);
10175
12231
 
10176
- // ../../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
12232
+ // ../../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_cot3leusltbsophitaz3dgdqdm/node_modules/@radix-ui/react-select/dist/index.mjs
10177
12233
  var React35 = __toESM(require("react"), 1);
10178
12234
  var ReactDOM4 = __toESM(require("react-dom"), 1);
10179
12235
 
@@ -10182,7 +12238,7 @@ function clamp2(value, [min2, max2]) {
10182
12238
  return Math.min(max2, Math.max(min2, value));
10183
12239
  }
10184
12240
 
10185
- // ../../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
12241
+ // ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19_aqbloo75wukq4oiqf2nfnf7fqm/node_modules/@radix-ui/react-collection/dist/index.mjs
10186
12242
  var import_react6 = __toESM(require("react"), 1);
10187
12243
  var import_jsx_runtime14 = require("react/jsx-runtime");
10188
12244
  var import_react7 = __toESM(require("react"), 1);
@@ -10250,7 +12306,7 @@ function createCollection(name) {
10250
12306
  ];
10251
12307
  }
10252
12308
 
10253
- // ../../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
12309
+ // ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-direction/dist/index.mjs
10254
12310
  var React33 = __toESM(require("react"), 1);
10255
12311
  var import_jsx_runtime16 = require("react/jsx-runtime");
10256
12312
  var DirectionContext = React33.createContext(void 0);
@@ -10259,7 +12315,7 @@ function useDirection(localDir) {
10259
12315
  return localDir || globalDir || "ltr";
10260
12316
  }
10261
12317
 
10262
- // ../../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
12318
+ // ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-previous/dist/index.mjs
10263
12319
  var React34 = __toESM(require("react"), 1);
10264
12320
  function usePrevious(value) {
10265
12321
  const ref = React34.useRef({ value, previous: value });
@@ -10272,7 +12328,7 @@ function usePrevious(value) {
10272
12328
  }, [value]);
10273
12329
  }
10274
12330
 
10275
- // ../../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
12331
+ // ../../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_cot3leusltbsophitaz3dgdqdm/node_modules/@radix-ui/react-select/dist/index.mjs
10276
12332
  var import_jsx_runtime17 = require("react/jsx-runtime");
10277
12333
  var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
10278
12334
  var SELECTION_KEYS = [" ", "Enter"];
@@ -10394,10 +12450,10 @@ var SelectTrigger = React35.forwardRef(
10394
12450
  const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
10395
12451
  const getItems = useCollection(__scopeSelect);
10396
12452
  const pointerTypeRef = React35.useRef("touch");
10397
- const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
12453
+ const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search2) => {
10398
12454
  const enabledItems = getItems().filter((item) => !item.disabled);
10399
12455
  const currentItem = enabledItems.find((item) => item.value === context.value);
10400
- const nextItem = findNextItem(enabledItems, search, currentItem);
12456
+ const nextItem = findNextItem(enabledItems, search2, currentItem);
10401
12457
  if (nextItem !== void 0) {
10402
12458
  context.onValueChange(nextItem.value);
10403
12459
  }
@@ -10624,10 +12680,10 @@ var SelectContentImpl = React35.forwardRef(
10624
12680
  window.removeEventListener("resize", close);
10625
12681
  };
10626
12682
  }, [onOpenChange]);
10627
- const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => {
12683
+ const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search2) => {
10628
12684
  const enabledItems = getItems().filter((item) => !item.disabled);
10629
12685
  const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);
10630
- const nextItem = findNextItem(enabledItems, search, currentItem);
12686
+ const nextItem = findNextItem(enabledItems, search2, currentItem);
10631
12687
  if (nextItem) {
10632
12688
  setTimeout(() => nextItem.ref.current.focus());
10633
12689
  }
@@ -11356,13 +13412,13 @@ function useTypeaheadSearch(onSearchChange) {
11356
13412
  const timerRef = React35.useRef(0);
11357
13413
  const handleTypeaheadSearch = React35.useCallback(
11358
13414
  (key) => {
11359
- const search = searchRef.current + key;
11360
- handleSearchChange(search);
13415
+ const search2 = searchRef.current + key;
13416
+ handleSearchChange(search2);
11361
13417
  (function updateSearch(value) {
11362
13418
  searchRef.current = value;
11363
13419
  window.clearTimeout(timerRef.current);
11364
13420
  if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
11365
- })(search);
13421
+ })(search2);
11366
13422
  },
11367
13423
  [handleSearchChange]
11368
13424
  );
@@ -11375,9 +13431,9 @@ function useTypeaheadSearch(onSearchChange) {
11375
13431
  }, []);
11376
13432
  return [searchRef, handleTypeaheadSearch, resetTypeahead];
11377
13433
  }
11378
- function findNextItem(items, search, currentItem) {
11379
- const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
11380
- const normalizedSearch = isRepeated ? search[0] : search;
13434
+ function findNextItem(items, search2, currentItem) {
13435
+ const isRepeated = search2.length > 1 && Array.from(search2).every((char) => char === search2[0]);
13436
+ const normalizedSearch = isRepeated ? search2[0] : search2;
11381
13437
  const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;
11382
13438
  let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));
11383
13439
  const excludeCurrentItem = normalizedSearch.length === 1;
@@ -12828,7 +14884,7 @@ function interpolate(template, params) {
12828
14884
  }
12829
14885
  var DEPOSIT_CONFIRM_DELAY_MS = 5e3;
12830
14886
  var POLL_INTERVAL_MS = 2500;
12831
- var POLL_ENDPOINT_INTERVAL_MS = 3e3;
14887
+ var POLL_ENDPOINT_INTERVAL_MS = 5e3;
12832
14888
  var CUTOFF_BUFFER_MS = 6e4;
12833
14889
  function useDepositPolling({
12834
14890
  userId,
@@ -16470,6 +18526,53 @@ function CashAppButton({
16470
18526
  }
16471
18527
  );
16472
18528
  }
18529
+ var _store = null;
18530
+ function getEip6963Store() {
18531
+ if (typeof window === "undefined") return null;
18532
+ if (!_store) {
18533
+ _store = createStore();
18534
+ }
18535
+ return _store;
18536
+ }
18537
+ var RDNS_TO_WALLET_ID = {
18538
+ "io.metamask": "metamask",
18539
+ "io.metamask.flask": "metamask",
18540
+ "io.metamask.mmi": "metamask",
18541
+ "app.phantom": "phantom",
18542
+ "com.coinbase.wallet": "coinbase",
18543
+ "com.okex.wallet": "okx",
18544
+ "io.rabby": "rabby",
18545
+ "com.trustwallet.app": "trust",
18546
+ "me.rainbow": "rainbow"
18547
+ };
18548
+ function rdnsToWalletId(rdns) {
18549
+ if (RDNS_TO_WALLET_ID[rdns]) return RDNS_TO_WALLET_ID[rdns];
18550
+ if (rdns.includes("metamask")) return "metamask";
18551
+ if (rdns.includes("phantom")) return "phantom";
18552
+ if (rdns.includes("coinbase")) return "coinbase";
18553
+ if (rdns.includes("okx") || rdns.includes("okex")) return "okx";
18554
+ if (rdns.includes("rabby")) return "rabby";
18555
+ if (rdns.includes("trust")) return "trust";
18556
+ if (rdns.includes("rainbow")) return "rainbow";
18557
+ return "unknown";
18558
+ }
18559
+ function getEip6963Providers() {
18560
+ const store = getEip6963Store();
18561
+ if (!store) return [];
18562
+ return store.getProviders().map((detail) => ({
18563
+ walletId: rdnsToWalletId(detail.info.rdns),
18564
+ provider: detail.provider,
18565
+ info: detail.info
18566
+ }));
18567
+ }
18568
+ function findProviderByWalletId(walletId) {
18569
+ return getEip6963Providers().find((p) => p.walletId === walletId);
18570
+ }
18571
+ function collectAllEip6963EthProviders() {
18572
+ const store = getEip6963Store();
18573
+ if (!store) return [];
18574
+ return store.getProviders().map((d) => d.provider);
18575
+ }
16473
18576
  var SOLANA_DISCONNECT_TYPES = [
16474
18577
  "phantom-solana",
16475
18578
  "solflare",
@@ -16509,8 +18612,9 @@ function collectEthereumProvidersForDisconnect(win) {
16509
18612
  out.push(p);
16510
18613
  }
16511
18614
  };
16512
- const list = anyWin.__eip6963Providers || [];
16513
- for (const d of list) add(d.provider);
18615
+ for (const p of collectAllEip6963EthProviders()) {
18616
+ add(p);
18617
+ }
16514
18618
  add(win.ethereum);
16515
18619
  add(
16516
18620
  win.phantom?.ethereum
@@ -18516,30 +20620,13 @@ function BrowserWalletButton({
18516
20620
  }, []);
18517
20621
  const [eip6963ProviderCount, setEip6963ProviderCount] = React242.useState(0);
18518
20622
  React242.useEffect(() => {
18519
- if (typeof window === "undefined") return;
18520
- const anyWin = window;
18521
- if (!anyWin.__eip6963Providers) {
18522
- anyWin.__eip6963Providers = [];
18523
- }
18524
- const handleAnnouncement = (event) => {
18525
- const { detail } = event;
18526
- if (!detail?.info || !detail?.provider) return;
18527
- const exists = anyWin.__eip6963Providers.some(
18528
- (p) => p.info.uuid === detail.info.uuid
18529
- );
18530
- if (!exists) {
18531
- anyWin.__eip6963Providers.push(detail);
18532
- setEip6963ProviderCount(anyWin.__eip6963Providers.length);
18533
- }
18534
- };
18535
- window.addEventListener("eip6963:announceProvider", handleAnnouncement);
18536
- window.dispatchEvent(new Event("eip6963:requestProvider"));
18537
- return () => {
18538
- window.removeEventListener(
18539
- "eip6963:announceProvider",
18540
- handleAnnouncement
18541
- );
18542
- };
20623
+ const store = getEip6963Store();
20624
+ if (!store) return;
20625
+ setEip6963ProviderCount(store.getProviders().length);
20626
+ const unsubscribe = store.subscribe((providers) => {
20627
+ setEip6963ProviderCount(providers.length);
20628
+ });
20629
+ return unsubscribe;
18543
20630
  }, []);
18544
20631
  React242.useEffect(() => {
18545
20632
  if (!wallet || !publishableKey) {
@@ -18598,7 +20685,7 @@ function BrowserWalletButton({
18598
20685
  return;
18599
20686
  }
18600
20687
  if (!chainType || chainType === "solana") {
18601
- const anyWin2 = win;
20688
+ const anyWin = win;
18602
20689
  const trySilentSolana = async (provider, type, name, icon) => {
18603
20690
  if (!provider) return false;
18604
20691
  if (provider.isConnected && provider.publicKey) {
@@ -18637,21 +20724,21 @@ function BrowserWalletButton({
18637
20724
  ))
18638
20725
  return;
18639
20726
  if (await trySilentSolana(
18640
- anyWin2.solflare,
20727
+ anyWin.solflare,
18641
20728
  "solflare",
18642
20729
  "Solflare",
18643
20730
  "solflare"
18644
20731
  ))
18645
20732
  return;
18646
20733
  if (await trySilentSolana(
18647
- anyWin2.backpack,
20734
+ anyWin.backpack,
18648
20735
  "backpack",
18649
20736
  "Backpack",
18650
20737
  "backpack"
18651
20738
  ))
18652
20739
  return;
18653
20740
  if (await trySilentSolana(
18654
- anyWin2.glow,
20741
+ anyWin.glow,
18655
20742
  "glow",
18656
20743
  "Glow",
18657
20744
  "glow"
@@ -18659,19 +20746,14 @@ function BrowserWalletButton({
18659
20746
  return;
18660
20747
  }
18661
20748
  if (!chainType || chainType === "ethereum") {
18662
- const anyWin2 = win;
20749
+ const anyWin = win;
18663
20750
  const allProviders = [];
18664
- const eip6963Providers = anyWin2.__eip6963Providers || [];
18665
- for (const { info, provider } of eip6963Providers) {
18666
- let walletId = "default";
18667
- if (info.rdns.includes("metamask")) walletId = "metamask";
18668
- else if (info.rdns.includes("phantom")) walletId = "phantom";
18669
- else if (info.rdns.includes("coinbase")) walletId = "coinbase";
18670
- else if (info.rdns.includes("okx")) walletId = "okx";
18671
- else if (info.rdns.includes("rabby")) walletId = "rabby";
18672
- else if (info.rdns.includes("trust")) walletId = "trust";
18673
- else if (info.rdns.includes("rainbow")) walletId = "rainbow";
18674
- allProviders.push({ provider, walletId });
20751
+ const eip6963 = getEip6963Providers();
20752
+ for (const { provider, walletId } of eip6963) {
20753
+ allProviders.push({
20754
+ provider,
20755
+ walletId: walletId === "unknown" ? "default" : walletId
20756
+ });
18675
20757
  }
18676
20758
  if (allProviders.length === 0) {
18677
20759
  if (win.phantom?.ethereum) {
@@ -18680,15 +20762,15 @@ function BrowserWalletButton({
18680
20762
  walletId: "phantom"
18681
20763
  });
18682
20764
  }
18683
- if (anyWin2.okxwallet) {
20765
+ if (anyWin.okxwallet) {
18684
20766
  allProviders.push({
18685
- provider: anyWin2.okxwallet,
20767
+ provider: anyWin.okxwallet,
18686
20768
  walletId: "okx"
18687
20769
  });
18688
20770
  }
18689
- if (anyWin2.coinbaseWalletExtension) {
20771
+ if (anyWin.coinbaseWalletExtension) {
18690
20772
  allProviders.push({
18691
- provider: anyWin2.coinbaseWalletExtension,
20773
+ provider: anyWin.coinbaseWalletExtension,
18692
20774
  walletId: "coinbase"
18693
20775
  });
18694
20776
  }
@@ -18712,7 +20794,7 @@ function BrowserWalletButton({
18712
20794
  });
18713
20795
  if (!accounts || accounts.length === 0) continue;
18714
20796
  const address = accounts[0];
18715
- const resolved = identifyEthWallet(provider, anyWin2, walletId);
20797
+ const resolved = identifyEthWallet(provider, anyWin, walletId);
18716
20798
  if (mounted) {
18717
20799
  setWallet({ ...resolved, address });
18718
20800
  setIsLoading(false);
@@ -18754,15 +20836,11 @@ function BrowserWalletButton({
18754
20836
  solanaProvider.on("disconnect", handleDisconnect);
18755
20837
  solanaProvider.on("accountChanged", handleAccountsChanged);
18756
20838
  }
18757
- const anyWin = window;
18758
20839
  const ethProviders = [];
18759
- if (anyWin.__eip6963Providers) {
18760
- for (const {
18761
- provider
18762
- } of anyWin.__eip6963Providers) {
18763
- if (provider && !ethProviders.includes(provider)) {
18764
- ethProviders.push(provider);
18765
- }
20840
+ for (const { provider } of getEip6963Providers()) {
20841
+ const p = provider;
20842
+ if (p && !ethProviders.includes(p)) {
20843
+ ethProviders.push(p);
18766
20844
  }
18767
20845
  }
18768
20846
  if (window.ethereum && !ethProviders.includes(window.ethereum)) {
@@ -18864,7 +20942,7 @@ function BrowserWalletButton({
18864
20942
  if (isLoading) {
18865
20943
  return null;
18866
20944
  }
18867
- const hasWalletExtension = (!chainType || chainType === "solana") && (window.phantom?.solana?.isPhantom || window.solana?.isPhantom) ? true : (!chainType || chainType === "ethereum") && (window.phantom?.ethereum || window.ethereum) ? true : false;
20945
+ const hasWalletExtension = (!chainType || chainType === "ethereum") && getEip6963Providers().length > 0 || (!chainType || chainType === "solana") && (window.phantom?.solana?.isPhantom || window.solana?.isPhantom) || (!chainType || chainType === "ethereum") && (window.phantom?.ethereum || window.ethereum);
18868
20946
  if (!onConnectClick && !wallet && !hasWalletExtension) {
18869
20947
  return null;
18870
20948
  }
@@ -21439,13 +23517,25 @@ function TokenSelectorSheet({
21439
23517
  });
21440
23518
  setRecentTokens(updated);
21441
23519
  };
23520
+ const fuse = (0, import_react23.useMemo)(
23521
+ () => new Fuse(allOptions, {
23522
+ keys: [
23523
+ { name: "token.symbol", weight: 2 },
23524
+ { name: "token.name", weight: 1 },
23525
+ { name: "chain.chain_name", weight: 0.5 }
23526
+ ],
23527
+ threshold: 0.2,
23528
+ ignoreLocation: true,
23529
+ minMatchCharLength: 2
23530
+ }),
23531
+ [allOptions]
23532
+ );
21442
23533
  const filteredOptions = (0, import_react23.useMemo)(() => {
21443
23534
  if (!searchQuery.trim()) return allOptions;
21444
- const query = searchQuery.toLowerCase();
21445
- return allOptions.filter(
21446
- ({ token, chain }) => token.symbol.toLowerCase().includes(query) || token.name.toLowerCase().includes(query) || chain.chain_name.toLowerCase().includes(query)
21447
- );
21448
- }, [allOptions, searchQuery]);
23535
+ const query = searchQuery.trim();
23536
+ const results = fuse.search(query);
23537
+ return results.map((r2) => r2.item);
23538
+ }, [fuse, allOptions, searchQuery]);
21449
23539
  const isCommonToken = (symbol, chainType, chainId) => {
21450
23540
  return COMMON_TOKENS.some(
21451
23541
  (ct) => ct.symbol === symbol && ct.chainType === chainType && ct.chainId === chainId
@@ -24360,15 +26450,10 @@ var WALLET_DEFINITIONS = [
24360
26450
  { id: "backpack", name: "Backpack", networks: ["solana"], installUrl: "https://backpack.app/" },
24361
26451
  { id: "glow", name: "Glow", networks: ["solana"], installUrl: "https://glow.app/" }
24362
26452
  ];
24363
- function getWalletProviders() {
26453
+ function getSolanaProviders() {
24364
26454
  if (typeof window === "undefined") return {};
24365
26455
  const win = window;
24366
26456
  return {
24367
- ethereum: win.ethereum,
24368
- phantomEthereum: win.phantom?.ethereum,
24369
- coinbaseEthereum: win.coinbaseWalletExtension,
24370
- trustEthereum: win.trustwallet?.ethereum,
24371
- okxEthereum: win.okxwallet,
24372
26457
  phantomSolana: win.phantom?.solana,
24373
26458
  solflare: win.solflare,
24374
26459
  backpack: win.backpack,
@@ -24376,37 +26461,71 @@ function getWalletProviders() {
24376
26461
  coinbaseSolana: win.coinbaseSolana || win.coinbaseWalletExtension?.solana
24377
26462
  };
24378
26463
  }
26464
+ function getLegacyEvmProviders() {
26465
+ if (typeof window === "undefined") return {};
26466
+ const win = window;
26467
+ return {
26468
+ ethereum: win.ethereum,
26469
+ phantomEthereum: win.phantom?.ethereum,
26470
+ coinbaseEthereum: win.coinbaseWalletExtension,
26471
+ trustEthereum: win.trustwallet?.ethereum,
26472
+ okxEthereum: win.okxwallet
26473
+ };
26474
+ }
24379
26475
  function detectAvailableWallets(filterChainType) {
24380
- const providers = getWalletProviders();
26476
+ const solProviders = getSolanaProviders();
26477
+ const legacyEvm = getLegacyEvmProviders();
26478
+ const eip6963List = getEip6963Providers();
24381
26479
  const win = typeof window !== "undefined" ? window : null;
26480
+ const hasEip6963 = (walletId) => eip6963List.some((d) => {
26481
+ const rdns = d.info?.rdns || "";
26482
+ switch (walletId) {
26483
+ case "metamask":
26484
+ return rdns.includes("metamask");
26485
+ case "phantom":
26486
+ return rdns.includes("phantom");
26487
+ case "coinbase":
26488
+ return rdns.includes("coinbase");
26489
+ case "trust":
26490
+ return rdns.includes("trust");
26491
+ case "rainbow":
26492
+ return rdns.includes("rainbow");
26493
+ case "rabby":
26494
+ return rdns.includes("rabby");
26495
+ case "okx":
26496
+ return rdns.includes("okx") || rdns.includes("okex");
26497
+ default:
26498
+ return false;
26499
+ }
26500
+ });
24382
26501
  return WALLET_DEFINITIONS.filter((w) => !filterChainType || w.networks.includes(filterChainType)).map((wallet) => {
24383
26502
  let isInstalled = false;
24384
26503
  const detectedNetworks = [];
24385
26504
  switch (wallet.id) {
24386
26505
  case "metamask":
24387
- isInstalled = !!(providers.ethereum?.isMetaMask && !providers.ethereum?.isPhantom && !providers.ethereum?.isRabby && !providers.ethereum?.isOkxWallet);
26506
+ isInstalled = hasEip6963("metamask") || !!(legacyEvm.ethereum?.isMetaMask && !legacyEvm.ethereum?.isPhantom && !legacyEvm.ethereum?.isRabby && !legacyEvm.ethereum?.isOkxWallet);
24388
26507
  if (isInstalled) detectedNetworks.push("ethereum");
24389
26508
  break;
24390
26509
  case "phantom":
24391
- if (providers.phantomSolana?.isPhantom) {
26510
+ if (solProviders.phantomSolana?.isPhantom) {
24392
26511
  isInstalled = true;
24393
26512
  detectedNetworks.push("solana");
24394
26513
  }
24395
- if (providers.phantomEthereum?.isPhantom) {
26514
+ if (hasEip6963("phantom") || legacyEvm.phantomEthereum?.isPhantom) {
24396
26515
  isInstalled = true;
24397
26516
  detectedNetworks.push("ethereum");
24398
26517
  }
24399
26518
  break;
24400
26519
  case "coinbase":
24401
- if (providers.coinbaseEthereum || providers.ethereum?.isCoinbaseWallet) {
26520
+ if (hasEip6963("coinbase") || legacyEvm.coinbaseEthereum || legacyEvm.ethereum?.isCoinbaseWallet) {
24402
26521
  isInstalled = true;
24403
26522
  detectedNetworks.push("ethereum");
24404
26523
  }
24405
- if (providers.coinbaseSolana || win?.coinbaseWalletExtension?.solana) detectedNetworks.push("solana");
26524
+ if (solProviders.coinbaseSolana || win?.coinbaseWalletExtension?.solana) detectedNetworks.push("solana");
24406
26525
  if (isInstalled && wallet.networks.includes("solana") && !detectedNetworks.includes("solana")) detectedNetworks.push("solana");
24407
26526
  break;
24408
26527
  case "trust":
24409
- if (providers.trustEthereum || providers.ethereum?.isTrust || win?.trustwallet) {
26528
+ if (hasEip6963("trust") || legacyEvm.trustEthereum || legacyEvm.ethereum?.isTrust || win?.trustwallet) {
24410
26529
  isInstalled = true;
24411
26530
  detectedNetworks.push("ethereum");
24412
26531
  }
@@ -24414,27 +26533,27 @@ function detectAvailableWallets(filterChainType) {
24414
26533
  if (isInstalled && wallet.networks.includes("solana") && !detectedNetworks.includes("solana")) detectedNetworks.push("solana");
24415
26534
  break;
24416
26535
  case "rainbow":
24417
- isInstalled = !!providers.ethereum?.isRainbow;
26536
+ isInstalled = hasEip6963("rainbow") || !!legacyEvm.ethereum?.isRainbow;
24418
26537
  if (isInstalled) detectedNetworks.push("ethereum");
24419
26538
  break;
24420
26539
  case "rabby":
24421
- isInstalled = !!providers.ethereum?.isRabby;
26540
+ isInstalled = hasEip6963("rabby") || !!legacyEvm.ethereum?.isRabby;
24422
26541
  if (isInstalled) detectedNetworks.push("ethereum");
24423
26542
  break;
24424
26543
  case "okx":
24425
- isInstalled = !!(providers.okxEthereum || providers.ethereum?.isOkxWallet);
26544
+ isInstalled = hasEip6963("okx") || !!(legacyEvm.okxEthereum || legacyEvm.ethereum?.isOkxWallet);
24426
26545
  if (isInstalled) detectedNetworks.push("ethereum");
24427
26546
  break;
24428
26547
  case "solflare":
24429
- isInstalled = !!providers.solflare?.isSolflare;
26548
+ isInstalled = !!solProviders.solflare?.isSolflare;
24430
26549
  if (isInstalled) detectedNetworks.push("solana");
24431
26550
  break;
24432
26551
  case "backpack":
24433
- isInstalled = !!(providers.backpack?.isBackpack || win?.backpack);
26552
+ isInstalled = !!(solProviders.backpack?.isBackpack || win?.backpack);
24434
26553
  if (isInstalled) detectedNetworks.push("solana");
24435
26554
  break;
24436
26555
  case "glow":
24437
- isInstalled = !!(providers.glow?.isGlow || win?.glow);
26556
+ isInstalled = !!(solProviders.glow?.isGlow || win?.glow);
24438
26557
  if (isInstalled) detectedNetworks.push("solana");
24439
26558
  break;
24440
26559
  }
@@ -24489,7 +26608,16 @@ function WalletConnect({
24489
26608
  const [connectingNetwork, setConnectingNetwork] = React292.useState(null);
24490
26609
  const [walletError, setWalletError] = React292.useState(null);
24491
26610
  const [isWalletConnecting, setIsWalletConnecting] = React292.useState(false);
24492
- const availableWallets = React292.useMemo(() => detectAvailableWallets(), []);
26611
+ const [eip6963ProviderCount, setEip6963ProviderCount] = React292.useState(0);
26612
+ React292.useEffect(() => {
26613
+ const store = getEip6963Store();
26614
+ if (!store) return;
26615
+ setEip6963ProviderCount(store.getProviders().length);
26616
+ return store.subscribe((providers) => {
26617
+ setEip6963ProviderCount(providers.length);
26618
+ });
26619
+ }, []);
26620
+ const availableWallets = React292.useMemo(() => detectAvailableWallets(), [eip6963ProviderCount]);
24493
26621
  const [balances, setBalances] = React292.useState([]);
24494
26622
  const [isLoading, setIsLoading] = React292.useState(false);
24495
26623
  const [selectedBalance, setSelectedBalance] = React292.useState(null);
@@ -24548,59 +26676,72 @@ function WalletConnect({
24548
26676
  setWalletError(null);
24549
26677
  setIsWalletConnecting(true);
24550
26678
  try {
24551
- const providers = getWalletProviders();
24552
26679
  const win = typeof window !== "undefined" ? window : null;
24553
26680
  let connectedInfo;
24554
26681
  if (network === "ethereum") {
24555
- let provider;
24556
- switch (wallet.id) {
24557
- case "metamask":
24558
- if (providers.ethereum?.isMetaMask && !providers.ethereum?.isPhantom) provider = providers.ethereum;
24559
- break;
24560
- case "phantom":
24561
- provider = providers.phantomEthereum;
24562
- break;
24563
- case "coinbase":
24564
- provider = providers.coinbaseEthereum || (providers.ethereum?.isCoinbaseWallet ? providers.ethereum : void 0);
24565
- break;
24566
- case "trust":
24567
- provider = providers.trustEthereum || (providers.ethereum?.isTrust ? providers.ethereum : void 0);
24568
- break;
24569
- case "rainbow":
24570
- if (providers.ethereum?.isRainbow) provider = providers.ethereum;
24571
- break;
24572
- case "rabby":
24573
- if (providers.ethereum?.isRabby) provider = providers.ethereum;
24574
- break;
24575
- case "okx":
24576
- provider = providers.okxEthereum || (providers.ethereum?.isOkxWallet ? providers.ethereum : void 0);
24577
- break;
24578
- default:
24579
- provider = providers.ethereum;
26682
+ const eip6963Match = findProviderByWalletId(wallet.id);
26683
+ let provider = eip6963Match?.provider;
26684
+ if (!provider) {
26685
+ const legacyEvm = getLegacyEvmProviders();
26686
+ switch (wallet.id) {
26687
+ case "metamask":
26688
+ if (legacyEvm.ethereum?.isMetaMask && !legacyEvm.ethereum?.isPhantom) provider = legacyEvm.ethereum;
26689
+ break;
26690
+ case "phantom":
26691
+ provider = legacyEvm.phantomEthereum;
26692
+ break;
26693
+ case "coinbase":
26694
+ provider = legacyEvm.coinbaseEthereum || (legacyEvm.ethereum?.isCoinbaseWallet ? legacyEvm.ethereum : void 0);
26695
+ break;
26696
+ case "trust":
26697
+ provider = legacyEvm.trustEthereum || (legacyEvm.ethereum?.isTrust ? legacyEvm.ethereum : void 0);
26698
+ break;
26699
+ case "rainbow":
26700
+ if (legacyEvm.ethereum?.isRainbow) provider = legacyEvm.ethereum;
26701
+ break;
26702
+ case "rabby":
26703
+ if (legacyEvm.ethereum?.isRabby) provider = legacyEvm.ethereum;
26704
+ break;
26705
+ case "okx":
26706
+ provider = legacyEvm.okxEthereum || (legacyEvm.ethereum?.isOkxWallet ? legacyEvm.ethereum : void 0);
26707
+ break;
26708
+ default:
26709
+ provider = legacyEvm.ethereum;
26710
+ }
24580
26711
  }
24581
26712
  if (!provider) throw new Error(`${wallet.name} wallet not found. Please install it.`);
24582
26713
  const accounts = await provider.request({ method: "eth_requestAccounts" });
24583
26714
  if (!accounts?.length) throw new Error("No accounts returned from wallet");
24584
26715
  setUserDisconnectedWallet(false);
24585
- const walletType = wallet.id === "phantom" ? "phantom-ethereum" : wallet.id === "coinbase" ? "coinbase" : "metamask";
26716
+ const walletIdToType = {
26717
+ phantom: "phantom-ethereum",
26718
+ coinbase: "coinbase",
26719
+ trust: "trust",
26720
+ rainbow: "rainbow",
26721
+ rabby: "rabby",
26722
+ okx: "okx",
26723
+ metamask: "metamask"
26724
+ };
26725
+ const walletType = walletIdToType[wallet.id] || "metamask";
24586
26726
  connectedInfo = { type: walletType, name: wallet.name, address: accounts[0], icon: wallet.id };
24587
26727
  } else {
26728
+ const solProviders = getSolanaProviders();
24588
26729
  let provider;
24589
26730
  switch (wallet.id) {
24590
26731
  case "phantom":
24591
- provider = providers.phantomSolana;
26732
+ provider = solProviders.phantomSolana;
24592
26733
  break;
24593
26734
  case "solflare":
24594
- provider = providers.solflare;
26735
+ provider = solProviders.solflare;
24595
26736
  break;
24596
26737
  case "backpack":
24597
- provider = providers.backpack || win?.backpack;
26738
+ provider = solProviders.backpack || win?.backpack;
24598
26739
  break;
24599
26740
  case "glow":
24600
- provider = providers.glow || win?.glow;
26741
+ provider = solProviders.glow || win?.glow;
24601
26742
  break;
24602
26743
  case "coinbase":
24603
- provider = providers.coinbaseSolana || win?.coinbaseWalletExtension?.solana;
26744
+ provider = solProviders.coinbaseSolana || win?.coinbaseWalletExtension?.solana;
24604
26745
  break;
24605
26746
  case "trust":
24606
26747
  provider = win?.trustwallet?.solana;
@@ -24846,10 +26987,15 @@ function WalletConnect({
24846
26987
  };
24847
26988
  const sendEthereumTransaction = async (token, amountStr) => {
24848
26989
  if (!recipientAddress || !/^0x[a-fA-F0-9]{40}$/.test(recipientAddress)) throw new Error(`Invalid recipient address.`);
24849
- let provider;
24850
- if (walletInfo.type === "phantom-ethereum") provider = window.phantom?.ethereum;
24851
- else if (walletInfo.type === "coinbase") provider = window.coinbaseWalletExtension || window.ethereum;
24852
- else provider = window.ethereum;
26990
+ const walletIdMap = { "phantom-ethereum": "phantom", coinbase: "coinbase", trust: "trust", okx: "okx", rainbow: "rainbow", rabby: "rabby", metamask: "metamask" };
26991
+ const lookupId = walletIdMap[walletInfo.type] || walletInfo.type;
26992
+ const eip6963Match = findProviderByWalletId(lookupId);
26993
+ let provider = eip6963Match?.provider;
26994
+ if (!provider) {
26995
+ if (walletInfo.type === "phantom-ethereum") provider = window.phantom?.ethereum;
26996
+ else if (walletInfo.type === "coinbase") provider = window.coinbaseWalletExtension || window.ethereum;
26997
+ else provider = window.ethereum;
26998
+ }
24853
26999
  if (!provider) throw new Error("Ethereum wallet not found");
24854
27000
  const currentChainIdHex = await provider.request({ method: "eth_chainId", params: [] });
24855
27001
  if (parseInt(currentChainIdHex, 16).toString() !== token.chain_id) {
@@ -25088,6 +27234,7 @@ function DepositModal({
25088
27234
  enableConnectWallet = false,
25089
27235
  browserWalletAmountQuickSelect = "percentage",
25090
27236
  enablePayWithExchange,
27237
+ enableFiatOnramp,
25091
27238
  enableConnectExchange = false,
25092
27239
  enableCashApp = false,
25093
27240
  hideDepositFlowInfo = false,
@@ -25109,8 +27256,9 @@ function DepositModal({
25109
27256
  const s = initialScreen ?? "main";
25110
27257
  if (s === "tracker" && hideDepositTracker) return "main";
25111
27258
  if (s === "cashapp" && !enableCashApp) return "main";
27259
+ if (s === "card" && enableFiatOnramp === false) return "main";
25112
27260
  return s;
25113
- }, [initialScreen, hideDepositTracker, enableCashApp]);
27261
+ }, [initialScreen, hideDepositTracker, enableCashApp, enableFiatOnramp]);
25114
27262
  const [containerEl, setContainerEl] = (0, import_react8.useState)(null);
25115
27263
  const containerCallbackRef = (0, import_react8.useCallback)((el) => {
25116
27264
  setContainerEl(el);
@@ -25226,6 +27374,13 @@ function DepositModal({
25226
27374
  enabled: open
25227
27375
  });
25228
27376
  const showPayWithExchange = enablePayWithExchange ?? projectConfig?.pay_with_exchange?.enabled ?? true;
27377
+ const showFiatOnramp = enableFiatOnramp ?? projectConfig?.fiat_onramp?.enabled ?? true;
27378
+ (0, import_react8.useEffect)(() => {
27379
+ if (view === "card" && !showFiatOnramp) {
27380
+ setView("main");
27381
+ setCardView("amount");
27382
+ }
27383
+ }, [view, showFiatOnramp]);
25229
27384
  const { exchanges, isLoading: exchangesLoading } = useExchanges({
25230
27385
  publishableKey,
25231
27386
  enabled: open && showPayWithExchange
@@ -25535,7 +27690,7 @@ function DepositModal({
25535
27690
  featuredWallets: projectConfig?.connect_wallet?.wallets
25536
27691
  }
25537
27692
  ),
25538
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
27693
+ showFiatOnramp && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
25539
27694
  DepositWithCardButton,
25540
27695
  {
25541
27696
  onClick: () => setView("card"),
@@ -26674,7 +28829,7 @@ function useExecutions(userId, publishableKey, options) {
26674
28829
  });
26675
28830
  }
26676
28831
  var POLL_INTERVAL_MS3 = 2500;
26677
- var POLL_ENDPOINT_INTERVAL_MS2 = 3e3;
28832
+ var POLL_ENDPOINT_INTERVAL_MS2 = 5e3;
26678
28833
  var CUTOFF_BUFFER_MS2 = 6e4;
26679
28834
  function useWithdrawPolling({
26680
28835
  userId,
@@ -28537,6 +30692,7 @@ function UnifoldProvider2({
28537
30692
  transferInputVariant: config?.transferInputVariant,
28538
30693
  enableConnectWallet: config?.enableConnectWallet,
28539
30694
  enablePayWithExchange: config?.enablePayWithExchange,
30695
+ enableFiatOnramp: config?.enableFiatOnramp,
28540
30696
  enableConnectExchange: config?.enableConnectExchange,
28541
30697
  enableCashApp: config?.enableCashApp,
28542
30698
  onDepositSuccess: handleDepositSuccess,