@retinalabsllc/zairusjs 15.0.90 → 15.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1036,14 +1036,14 @@ import {
1036
1036
  var UniversalProfileSettings = ({
1037
1037
  initialFirstName,
1038
1038
  initialLastName,
1039
- email,
1039
+ phoneNumber,
1040
1040
  accountStatus = "GOOD",
1041
1041
  memberSince,
1042
1042
  isReadOnly = false,
1043
1043
  bannerProps,
1044
- hasPin = false,
1045
- isPinLoading = false,
1046
- onSavePin,
1044
+ hasPasscode = false,
1045
+ isPasscodeLoading = false,
1046
+ onSavePasscode,
1047
1047
  onSaveProfile,
1048
1048
  onBack
1049
1049
  }) => {
@@ -1053,11 +1053,11 @@ var UniversalProfileSettings = ({
1053
1053
  const [firstName, setFirstName] = useState8(initialFirstName);
1054
1054
  const [lastName, setLastName] = useState8(initialLastName);
1055
1055
  const [isSubmitting, setIsSubmitting] = useState8(false);
1056
- const [isPinModalOpen, setIsPinModalOpen] = useState8(false);
1057
- const [oldPin, setOldPin] = useState8("");
1058
- const [newPin, setNewPin] = useState8("");
1059
- const [confirmPin, setConfirmPin] = useState8("");
1060
- const [isPinSubmitting, setIsPinSubmitting] = useState8(false);
1056
+ const [isPasscodeModalOpen, setIsPasscodeModalOpen] = useState8(false);
1057
+ const [oldPasscode, setOldPasscode] = useState8("");
1058
+ const [newPasscode, setNewPasscode] = useState8("");
1059
+ const [confirmPasscode, setConfirmPasscode] = useState8("");
1060
+ const [isPasscodeSubmitting, setIsPasscodeSubmitting] = useState8(false);
1061
1061
  useEffect5(() => {
1062
1062
  setFirstName(initialFirstName || "");
1063
1063
  setLastName(initialLastName || "");
@@ -1086,40 +1086,40 @@ var UniversalProfileSettings = ({
1086
1086
  setIsSubmitting(false);
1087
1087
  }
1088
1088
  };
1089
- const closePinModal = () => {
1090
- if (isPinSubmitting) return;
1091
- setIsPinModalOpen(false);
1092
- setOldPin("");
1093
- setNewPin("");
1094
- setConfirmPin("");
1089
+ const closePasscodeModal = () => {
1090
+ if (isPasscodeSubmitting) return;
1091
+ setIsPasscodeModalOpen(false);
1092
+ setOldPasscode("");
1093
+ setNewPasscode("");
1094
+ setConfirmPasscode("");
1095
1095
  };
1096
- const handlePinInput = (val, setter) => {
1097
- setter(val.replace(/\D/g, "").substring(0, 4));
1096
+ const handlePasscodeInput = (val, setter) => {
1097
+ setter(val.replace(/\D/g, "").substring(0, 6));
1098
1098
  };
1099
- const handlePinSubmit = async (e) => {
1099
+ const handlePasscodeSubmit = async (e) => {
1100
1100
  e.preventDefault();
1101
- if (!onSavePin) return;
1102
- if (hasPin && oldPin.length !== 4) return toast3.error("Old PIN must be exactly 4-digits.");
1103
- if (newPin.length !== 4) return toast3.error("New PIN must be exactly 4-digits.");
1104
- if (newPin !== confirmPin) return toast3.error("New PINs do not match.");
1105
- setIsPinSubmitting(true);
1101
+ if (!onSavePasscode) return;
1102
+ if (hasPasscode && oldPasscode.length !== 6) return toast3.error("Old Passcode must be exactly 6-digits.");
1103
+ if (newPasscode.length !== 6) return toast3.error("New Passcode must be exactly 6-digits.");
1104
+ if (newPasscode !== confirmPasscode) return toast3.error("New Passcodes do not match.");
1105
+ setIsPasscodeSubmitting(true);
1106
1106
  try {
1107
- const action = hasPin ? "change_pin" : "create_pin";
1108
- const res = await onSavePin({
1107
+ const action = hasPasscode ? "change_passcode" : "create_passcode";
1108
+ const res = await onSavePasscode({
1109
1109
  action,
1110
- oldPin: hasPin ? oldPin : void 0,
1111
- newPin
1110
+ oldPasscode: hasPasscode ? oldPasscode : void 0,
1111
+ newPasscode
1112
1112
  });
1113
1113
  if (res.success) {
1114
- toast3.success(res.message || "PIN updated successfully.");
1115
- closePinModal();
1114
+ toast3.success(res.message || "Passcode updated successfully.");
1115
+ closePasscodeModal();
1116
1116
  } else {
1117
- toast3.error(res.error || "Failed to update PIN.");
1117
+ toast3.error(res.error || "Failed to update Passcode.");
1118
1118
  }
1119
1119
  } catch (error) {
1120
1120
  toast3.error("Uh oh! Something went wrong.");
1121
1121
  } finally {
1122
- setIsPinSubmitting(false);
1122
+ setIsPasscodeSubmitting(false);
1123
1123
  }
1124
1124
  };
1125
1125
  const hasChanges = firstName !== initialFirstName || lastName !== initialLastName;
@@ -1132,7 +1132,7 @@ var UniversalProfileSettings = ({
1132
1132
  },
1133
1133
  /* @__PURE__ */ React12.createElement(HugeiconsIcon6, { icon: ArrowLeft01Icon2, size: 16 }),
1134
1134
  " Back"
1135
- )), /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col max-w-3xl w-full mx-auto rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React12.createElement(ManagedToaster, null), /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ React12.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React12.createElement("h1", { className: "text-black text-xl mb-1 truncate tracking-tight" }, "Personal Settings"), /* @__PURE__ */ React12.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your personal account profile.")), isReadOnly && /* @__PURE__ */ React12.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-100 text-neutral-400 rounded-full shrink-0" }, /* @__PURE__ */ React12.createElement(HugeiconsIcon6, { icon: CircleLock02Icon2, size: 18, className: "text-current" }))), bannerProps && /* @__PURE__ */ React12.createElement(Banner, { ...bannerProps }), /* @__PURE__ */ React12.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ React12.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSave, autoComplete: "off" }, /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col sm:flex-row gap-6" }, /* @__PURE__ */ React12.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React12.createElement(
1135
+ )), /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col max-w-3xl w-full mx-auto rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React12.createElement(ManagedToaster, null), /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ React12.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React12.createElement("h1", { className: "text-black text-xl mb-1 truncate tracking-tight" }, "Personal Settings"), /* @__PURE__ */ React12.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your personal account profile.")), isReadOnly && /* @__PURE__ */ React12.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-100 text-neutral-400 rounded-full shrink-0" }, /* @__PURE__ */ React12.createElement(HugeiconsIcon6, { icon: CircleLock02Icon2, size: 18, className: "text-current" }))), bannerProps && /* @__PURE__ */ React12.createElement(Banner, { ...bannerProps }), /* @__PURE__ */ React12.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ React12.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSave, autoComplete: "off" }, /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col sm:flex-row gap-6" }, /* @__PURE__ */ React12.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React12.createElement(
1136
1136
  TextInput,
1137
1137
  {
1138
1138
  label: "First Name",
@@ -1153,17 +1153,17 @@ var UniversalProfileSettings = ({
1153
1153
  ))), /* @__PURE__ */ React12.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ React12.createElement(
1154
1154
  TextInput,
1155
1155
  {
1156
- label: "Email ID",
1157
- value: email,
1156
+ label: "Registered Phone Number",
1157
+ value: phoneNumber,
1158
1158
  onChange: () => {
1159
1159
  },
1160
1160
  disabled: true
1161
1161
  }
1162
- ), /* @__PURE__ */ React12.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 truncate" }, "To change your email address, please contact support.")), /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between pt-8 mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ React12.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ React12.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React12.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate" }, "Account Status"), /* @__PURE__ */ React12.createElement("span", { className: "text-xs text-black block truncate" }, accountStatus)), /* @__PURE__ */ React12.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React12.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate" }, "Member Since"), /* @__PURE__ */ React12.createElement("span", { className: "text-xs text-black block truncate" }, memberSince ? new Date(memberSince).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" }) : "N/A")), /* @__PURE__ */ React12.createElement("div", { className: "min-w-0 pl-4" }, /* @__PURE__ */ React12.createElement(
1162
+ ), /* @__PURE__ */ React12.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 truncate" }, "To change your primary number, please contact support.")), /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between pt-8 mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ React12.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ React12.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React12.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate" }, "Account Status"), /* @__PURE__ */ React12.createElement("span", { className: "text-xs text-black block truncate" }, accountStatus)), /* @__PURE__ */ React12.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React12.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate" }, "Member Since"), /* @__PURE__ */ React12.createElement("span", { className: "text-xs text-black block truncate" }, memberSince ? new Date(memberSince).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" }) : "N/A")), /* @__PURE__ */ React12.createElement("div", { className: "min-w-0 pl-4" }, /* @__PURE__ */ React12.createElement(
1163
1163
  "button",
1164
1164
  {
1165
1165
  type: "button",
1166
- onClick: () => setIsPinModalOpen(true),
1166
+ onClick: () => setIsPasscodeModalOpen(true),
1167
1167
  className: "w-9 h-9 flex items-center justify-center border border-neutral-200 rounded-full text-black hover:bg-neutral-50 transition-colors outline-none"
1168
1168
  },
1169
1169
  /* @__PURE__ */ React12.createElement(HugeiconsIcon6, { icon: LockKeyIcon, size: 17, className: "text-black" })
@@ -1187,48 +1187,48 @@ var UniversalProfileSettings = ({
1187
1187
  className: "min-w-32 w-full sm:w-auto"
1188
1188
  },
1189
1189
  "Save Changes"
1190
- ))))), isPinModalOpen && /* @__PURE__ */ React12.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React12.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: closePinModal }), /* @__PURE__ */ React12.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React12.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React12.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, hasPin ? "Change PIN" : "Create PIN"), /* @__PURE__ */ React12.createElement("button", { onClick: closePinModal, disabled: isPinSubmitting, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React12.createElement(HugeiconsIcon6, { icon: CancelCircleIcon, size: 18 }))), /* @__PURE__ */ React12.createElement("div", { className: "p-6" }, isPinLoading ? /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col items-center justify-center py-10" }, /* @__PURE__ */ React12.createElement(HugeiconsIcon6, { icon: Loading03Icon2, size: 28, className: "animate-spin text-neutral-400 mb-4" })) : /* @__PURE__ */ React12.createElement("form", { onSubmit: handlePinSubmit, className: "flex flex-col gap-6" }, hasPin && /* @__PURE__ */ React12.createElement(
1190
+ ))))), isPasscodeModalOpen && /* @__PURE__ */ React12.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React12.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: closePasscodeModal }), /* @__PURE__ */ React12.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React12.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React12.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, hasPasscode ? "Change Passcode" : "Create Security Passcode"), /* @__PURE__ */ React12.createElement("button", { onClick: closePasscodeModal, disabled: isPasscodeSubmitting, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React12.createElement(HugeiconsIcon6, { icon: CancelCircleIcon, size: 18 }))), /* @__PURE__ */ React12.createElement("div", { className: "p-6" }, isPasscodeLoading ? /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col items-center justify-center py-10" }, /* @__PURE__ */ React12.createElement(HugeiconsIcon6, { icon: Loading03Icon2, size: 28, className: "animate-spin text-neutral-400 mb-4" })) : /* @__PURE__ */ React12.createElement("form", { onSubmit: handlePasscodeSubmit, className: "flex flex-col gap-6" }, hasPasscode && /* @__PURE__ */ React12.createElement(
1191
1191
  TextInput,
1192
1192
  {
1193
1193
  type: "password",
1194
- label: "Old PIN",
1195
- maxLength: 4,
1196
- disabled: isPinSubmitting,
1197
- value: oldPin,
1198
- onChange: (val) => handlePinInput(val, setOldPin),
1199
- placeholder: "\u2022\u2022\u2022\u2022"
1194
+ label: "Old 6-Digit Passcode",
1195
+ maxLength: 6,
1196
+ disabled: isPasscodeSubmitting,
1197
+ value: oldPasscode,
1198
+ onChange: (val) => handlePasscodeInput(val, setOldPasscode),
1199
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
1200
1200
  }
1201
1201
  ), /* @__PURE__ */ React12.createElement(
1202
1202
  TextInput,
1203
1203
  {
1204
1204
  type: "password",
1205
- label: hasPin ? "New PIN" : "Enter 4-Digit PIN",
1206
- maxLength: 4,
1207
- disabled: isPinSubmitting,
1208
- value: newPin,
1209
- onChange: (val) => handlePinInput(val, setNewPin),
1210
- placeholder: "\u2022\u2022\u2022\u2022"
1205
+ label: hasPasscode ? "New 6-Digit Passcode" : "Enter 6-Digit Passcode",
1206
+ maxLength: 6,
1207
+ disabled: isPasscodeSubmitting,
1208
+ value: newPasscode,
1209
+ onChange: (val) => handlePasscodeInput(val, setNewPasscode),
1210
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
1211
1211
  }
1212
1212
  ), /* @__PURE__ */ React12.createElement(
1213
1213
  TextInput,
1214
1214
  {
1215
1215
  type: "password",
1216
- label: "Retype New PIN",
1217
- maxLength: 4,
1218
- disabled: isPinSubmitting,
1219
- value: confirmPin,
1220
- onChange: (val) => handlePinInput(val, setConfirmPin),
1221
- placeholder: "\u2022\u2022\u2022\u2022"
1216
+ label: "Retype New Passcode",
1217
+ maxLength: 6,
1218
+ disabled: isPasscodeSubmitting,
1219
+ value: confirmPasscode,
1220
+ onChange: (val) => handlePasscodeInput(val, setConfirmPasscode),
1221
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
1222
1222
  }
1223
1223
  ), /* @__PURE__ */ React12.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React12.createElement(
1224
1224
  ThreeDActionButton,
1225
1225
  {
1226
1226
  type: "submit",
1227
- disabled: isPinSubmitting || newPin.length !== 4 || confirmPin.length !== 4 || hasPin && oldPin.length !== 4,
1228
- isLoading: isPinSubmitting,
1227
+ disabled: isPasscodeSubmitting || newPasscode.length !== 6 || confirmPasscode.length !== 6 || hasPasscode && oldPasscode.length !== 6,
1228
+ isLoading: isPasscodeSubmitting,
1229
1229
  className: "w-full"
1230
1230
  },
1231
- hasPin ? "Update PIN" : "Set PIN"
1231
+ hasPasscode ? "Update Passcode" : "Set Passcode"
1232
1232
  ))))))));
1233
1233
  };
1234
1234
 
@@ -1564,50 +1564,18 @@ import {
1564
1564
  Notification01Icon,
1565
1565
  ArrowLeft01Icon as ArrowLeft01Icon4,
1566
1566
  ArrowRight01Icon as ArrowRight01Icon2,
1567
- CancelCircleIcon as CancelCircleIcon3
1567
+ CancelCircleIcon as CancelCircleIcon3,
1568
+ ArrowUpRight01Icon as ArrowUpRight01Icon2
1568
1569
  } from "@hugeicons/core-free-icons";
1569
- var renderKMT = (val, currencySymbol) => {
1570
- let formatted = val;
1571
- let suffix = "";
1572
- if (val >= 1e12) {
1573
- formatted = val / 1e12;
1574
- suffix = "T";
1575
- } else if (val >= 1e6) {
1576
- formatted = val / 1e6;
1577
- suffix = "M";
1578
- } else if (val >= 1e3) {
1579
- formatted = val / 1e3;
1580
- suffix = "k";
1581
- }
1582
- const displayStr = parseFloat(formatted.toFixed(2)).toString();
1583
- return /* @__PURE__ */ React16.createElement("span", { className: "flex items-baseline mt-1" }, /* @__PURE__ */ React16.createElement("span", { className: "text-[13px] text-neutral-800 mr-0.5 " }, currencySymbol), /* @__PURE__ */ React16.createElement("span", { className: "text-xl text-neutral-800 tracking-tight " }, displayStr), /* @__PURE__ */ React16.createElement("span", { className: "text-[14px] text-neutral-600 ml-0.5 " }, suffix));
1584
- };
1585
- var renderKMT2 = (val, currencySymbol) => {
1586
- let formatted = val;
1587
- let suffix = "";
1588
- if (val >= 1e12) {
1589
- formatted = val / 1e12;
1590
- suffix = "T";
1591
- } else if (val >= 1e6) {
1592
- formatted = val / 1e6;
1593
- suffix = "M";
1594
- } else if (val >= 1e3) {
1595
- formatted = val / 1e3;
1596
- suffix = "k";
1597
- }
1598
- const displayStr = parseFloat(formatted.toFixed(2)).toString();
1599
- return /* @__PURE__ */ React16.createElement("span", { className: "flex items-baseline mt-1" }, /* @__PURE__ */ React16.createElement("span", { className: "text-[13px] text-white mr-0.5 " }, currencySymbol), /* @__PURE__ */ React16.createElement("span", { className: "text-xl text-white tracking-tight " }, displayStr), /* @__PURE__ */ React16.createElement("span", { className: "text-[14px] text-white/50 ml-0.5 " }, suffix));
1600
- };
1601
1570
  var UniversalHomeView = ({
1602
1571
  fullName = "",
1603
1572
  avatarSrc,
1604
- balanceLabel = "Available Balance",
1573
+ balanceLabel = "Pending Balance",
1605
1574
  balanceAmount,
1606
1575
  balanceCurrency = "$",
1607
- cashbackValue,
1608
- rewardsValue,
1609
- primaryAction,
1610
- secondaryAction,
1576
+ calculatorAction,
1577
+ buyCryptoAction,
1578
+ referralAction,
1611
1579
  notifications = [],
1612
1580
  notificationPage = 1,
1613
1581
  notificationTotalPages = 1,
@@ -1671,7 +1639,7 @@ var UniversalHomeView = ({
1671
1639
  setShowNotifDialog(true);
1672
1640
  setSelectedNotif(null);
1673
1641
  },
1674
- className: "relative w-10 h-10 flex items-center justify-center rounded-full bg-white outline-none hover:bg-neutral-50 transition-colors"
1642
+ className: "relative w-10 h-10 flex items-center justify-center rounded-full bg-white outline-none hover:bg-neutral-50 transition-colors"
1675
1643
  },
1676
1644
  /* @__PURE__ */ React16.createElement(HugeiconsIcon10, { icon: Notification01Icon, size: 20, className: "text-black" }),
1677
1645
  hasUnreadNotifs && /* @__PURE__ */ React16.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-red-500 rounded-full border border-white" })
@@ -1682,35 +1650,44 @@ var UniversalHomeView = ({
1682
1650
  className: "text-neutral-400 hover:text-white transition-colors outline-none"
1683
1651
  },
1684
1652
  /* @__PURE__ */ React16.createElement(HugeiconsIcon10, { icon: isBalanceHidden ? ViewIcon : ViewOffSlashIcon, size: 16 })
1685
- )), /* @__PURE__ */ React16.createElement("p", { className: `text-2xl text-white tracking-tight mb-6 tabular-nums flex items-baseline transition-all duration-300 ${isBalanceHidden ? "blur-sm opacity-40 select-none" : ""}` }, /* @__PURE__ */ React16.createElement("span", { className: "text-lg text-neutral-400 mr-1" }, balanceCurrency), intPart, decPart && /* @__PURE__ */ React16.createElement("span", { className: "text-lg text-neutral-400" }, ".", decPart)), /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-3 w-full" }, primaryAction && /* @__PURE__ */ React16.createElement(
1653
+ )), /* @__PURE__ */ React16.createElement("p", { className: `text-2xl text-white tracking-tight mb-6 tabular-nums flex items-baseline transition-all duration-300 ${isBalanceHidden ? "blur-sm opacity-40 select-none" : ""}` }, /* @__PURE__ */ React16.createElement("span", { className: "text-lg text-neutral-400 mr-1" }, balanceCurrency), intPart, decPart && /* @__PURE__ */ React16.createElement("span", { className: "text-lg text-neutral-400" }, ".", decPart)), /* @__PURE__ */ React16.createElement("div", { className: "flex items-center w-full" }, calculatorAction && /* @__PURE__ */ React16.createElement(
1686
1654
  "button",
1687
1655
  {
1688
- onClick: primaryAction.onClick,
1689
- className: "px-6 py-2 bg-white text-black text-[12px] truncate rounded-full transition-opacity hover:opacity-90 outline-none text-center"
1656
+ onClick: calculatorAction.onClick,
1657
+ className: "px-6 py-2 bg-transparent border border-white/20 text-white truncate text-[12px] rounded-full transition-colors hover:bg-white/10 outline-none text-center"
1690
1658
  },
1691
- "Deposit"
1692
- ), secondaryAction && /* @__PURE__ */ React16.createElement(
1693
- "button",
1659
+ calculatorAction.label || "Rate Calculator"
1660
+ )))), /* @__PURE__ */ React16.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React16.createElement(
1661
+ "div",
1694
1662
  {
1695
- onClick: secondaryAction.onClick,
1696
- className: "px-6 py-2 bg-transparent border border-white/20 text-white truncate text-[12px] rounded-full transition-colors hover:bg-white/10 outline-none text-center"
1663
+ onClick: buyCryptoAction?.onClick,
1664
+ className: "bg-[#143731] rounded-2xl p-5 relative overflow-hidden flex flex-col h-32 sm:h-36 cursor-pointer hover:opacity-90 transition-opacity"
1697
1665
  },
1698
- "Earn Rewards"
1699
- )))), /* @__PURE__ */ React16.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React16.createElement("div", { className: "bg-[#143731] rounded-2xl p-5 relative overflow-hidden flex flex-col h-45 sm:h-50" }, /* @__PURE__ */ React16.createElement("div", { className: "relative z-10" }, /* @__PURE__ */ React16.createElement("p", { className: "text-[15px] sm:text-[15px] text-white mb-1" }, "Cashback"), renderKMT2(cashbackValue, balanceCurrency)), /* @__PURE__ */ React16.createElement(
1700
- "img",
1701
- {
1702
- src: "https://retinalabs.company/assets/images/save_box.avif",
1703
- alt: "Cashback",
1704
- className: "absolute bottom-6 right-4 translate-x-1/4 translate-y-1/2 w-40 h-auto object-contain z-0 pointer-events-none drop-shadow-md"
1705
- }
1706
- )), /* @__PURE__ */ React16.createElement("div", { className: "bg-[#ceff8a] rounded-2xl p-5 relative overflow-hidden flex flex-col h-45 sm:h-50" }, /* @__PURE__ */ React16.createElement("div", { className: "relative z-10" }, /* @__PURE__ */ React16.createElement("p", { className: "text-[15px] sm:text-[15px] text-black mb-1" }, "Rewards"), renderKMT(rewardsValue, balanceCurrency)), /* @__PURE__ */ React16.createElement(
1707
- "img",
1666
+ /* @__PURE__ */ React16.createElement("div", { className: "relative z-10 flex flex-col h-full justify-between" }, /* @__PURE__ */ React16.createElement("p", { className: "text-[15px] sm:text-[15px] text-white font-medium" }, "Buy Crypto"), /* @__PURE__ */ React16.createElement("div", { className: "w-8 h-8 rounded-full bg-white/10 border border-white/10 flex items-center justify-center" }, /* @__PURE__ */ React16.createElement(HugeiconsIcon10, { icon: ArrowUpRight01Icon2, size: 16, className: "text-white" }))),
1667
+ /* @__PURE__ */ React16.createElement(
1668
+ "img",
1669
+ {
1670
+ src: "https://retinalabs.company/assets/images/save_box.avif",
1671
+ alt: "Buy Crypto",
1672
+ className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none drop-shadow-md"
1673
+ }
1674
+ )
1675
+ ), /* @__PURE__ */ React16.createElement(
1676
+ "div",
1708
1677
  {
1709
- src: "https://retinalabs.company/assets/images/gift_box.avif",
1710
- alt: "Rewards",
1711
- className: "absolute bottom-6 right-4 translate-x-1/4 translate-y-1/2 w-40 h-auto object-contain z-0 pointer-events-none drop-shadow-md"
1712
- }
1713
- )))), customContent && /* @__PURE__ */ React16.createElement("div", { className: "w-full" }, customContent), /* @__PURE__ */ React16.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ React16.createElement(
1678
+ onClick: referralAction?.onClick,
1679
+ className: "bg-[#ceff8a] rounded-2xl p-5 relative overflow-hidden flex flex-col h-32 sm:h-36 cursor-pointer hover:opacity-90 transition-opacity"
1680
+ },
1681
+ /* @__PURE__ */ React16.createElement("div", { className: "relative z-10 flex flex-col h-full justify-between" }, /* @__PURE__ */ React16.createElement("p", { className: "text-[15px] sm:text-[15px] text-black font-medium" }, "Referral"), /* @__PURE__ */ React16.createElement("div", { className: "w-8 h-8 rounded-full bg-black/5 border border-black/5 flex items-center justify-center" }, /* @__PURE__ */ React16.createElement(HugeiconsIcon10, { icon: ArrowRight01Icon2, size: 16, className: "text-black" }))),
1682
+ /* @__PURE__ */ React16.createElement(
1683
+ "img",
1684
+ {
1685
+ src: "https://retinalabs.company/assets/images/gift_box.avif",
1686
+ alt: "Referral",
1687
+ className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none drop-shadow-md"
1688
+ }
1689
+ )
1690
+ ))), customContent && /* @__PURE__ */ React16.createElement("div", { className: "w-full" }, customContent), /* @__PURE__ */ React16.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ React16.createElement(
1714
1691
  UniversalTransactionPage,
1715
1692
  {
1716
1693
  ...transactionsProps,
@@ -2038,14 +2015,16 @@ var UniversalWalletPage = ({
2038
2015
  // src/components/UniversalCardPage.tsx
2039
2016
  import React19, { useState as useState12, useEffect as useEffect8 } from "react";
2040
2017
  import { useRouter } from "next/navigation";
2018
+ import toast6 from "react-hot-toast";
2041
2019
  import { HugeiconsIcon as HugeiconsIcon13 } from "@hugeicons/react";
2042
2020
  import {
2043
2021
  SnowIcon,
2044
2022
  Delete02Icon,
2045
2023
  ArrowRight01Icon as ArrowRight01Icon3,
2046
- SlidersHorizontalIcon,
2047
2024
  ViewOffSlashIcon as ViewOffSlashIcon2,
2048
2025
  Loading03Icon as Loading03Icon8,
2026
+ CancelCircleIcon as CancelCircleIcon5,
2027
+ Copy01Icon as Copy01Icon3,
2049
2028
  PlusSignIcon as PlusSignIcon2
2050
2029
  } from "@hugeicons/core-free-icons";
2051
2030
  var UniversalCardPage = ({
@@ -2053,10 +2032,8 @@ var UniversalCardPage = ({
2053
2032
  actionPath = "/app/cards/action/",
2054
2033
  onReveal,
2055
2034
  onFreeze,
2056
- onSetLimits,
2057
2035
  onDelete,
2058
- onFundCard,
2059
- onCreateCard
2036
+ onFundCard
2060
2037
  }) => {
2061
2038
  const router = useRouter();
2062
2039
  const sortedCards = React19.useMemo(() => {
@@ -2070,7 +2047,6 @@ var UniversalCardPage = ({
2070
2047
  const activeCard = sortedCards[activeTabIndex];
2071
2048
  const [isBgLoaded, setIsBgLoaded] = useState12(false);
2072
2049
  const [isFreezing, setIsFreezing] = useState12(false);
2073
- const [isOverlayActionLoading, setIsOverlayActionLoading] = useState12(false);
2074
2050
  const [showDeleteDialog, setShowDeleteDialog] = useState12(false);
2075
2051
  const [isDeleting, setIsDeleting] = useState12(false);
2076
2052
  useEffect8(() => {
@@ -2078,134 +2054,67 @@ var UniversalCardPage = ({
2078
2054
  if (!activeCard?.cardBgSrc) return;
2079
2055
  const img = new Image();
2080
2056
  img.src = activeCard.cardBgSrc;
2081
- img.onload = () => {
2082
- setTimeout(() => setIsBgLoaded(true), 300);
2083
- };
2057
+ img.onload = () => setIsBgLoaded(true);
2084
2058
  }, [activeCard?.cardBgSrc]);
2085
2059
  if (!activeCard || sortedCards.length === 0) {
2086
- return /* @__PURE__ */ React19.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative min-h-100 justify-center" }, onCreateCard && /* @__PURE__ */ React19.createElement(
2087
- "button",
2088
- {
2089
- onClick: onCreateCard,
2090
- className: "fixed bottom-24 right-6 sm:right-50 z-50 w-11 h-11 rounded-full bg-white shadow-xl flex items-center justify-center text-black transition-all outline-none"
2091
- },
2092
- /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: PlusSignIcon2, size: 18 })
2093
- ), /* @__PURE__ */ React19.createElement("div", { className: "p-6 w-full max-w-md mx-auto text-center" }, /* @__PURE__ */ React19.createElement("div", { className: "mb-8 flex justify-center" }, /* @__PURE__ */ React19.createElement(
2094
- "svg",
2095
- {
2096
- xmlns: "http://www.w3.org/2000/svg",
2097
- viewBox: "0 0 24 24",
2098
- className: "w-12 h-12 fill-neutral-100"
2099
- },
2100
- /* @__PURE__ */ React19.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })
2101
- )), /* @__PURE__ */ React19.createElement("h1", { className: "text-xl text-black tracking-tight mb-4" }, "No cards available"), /* @__PURE__ */ React19.createElement("p", { className: "text-[13px] leading-[1.8] text-neutral-600 mb-12" }, "You do not have any virtual or physical cards generated yet.")));
2060
+ return /* @__PURE__ */ React19.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative min-h-100 justify-center" }, /* @__PURE__ */ React19.createElement("div", { className: "p-6 w-full max-w-md mx-auto text-center" }, /* @__PURE__ */ React19.createElement("div", { className: "mb-8 flex justify-center" }, /* @__PURE__ */ React19.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", className: "w-12 h-12 fill-neutral-100" }, /* @__PURE__ */ React19.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" }))), /* @__PURE__ */ React19.createElement("h1", { className: "text-xl text-black tracking-tight mb-4" }, "No cards available"), /* @__PURE__ */ React19.createElement("p", { className: "text-[13px] leading-[1.8] text-neutral-600 mb-12" }, "You do not have any active cards on your account.")));
2102
2061
  }
2103
2062
  const isActivated = activeCard.status === "ACTIVATED";
2104
2063
  const isFrozen = activeCard.status === "FROZEN";
2105
2064
  const isUnactivated = activeCard.status === "UNACTIVATED";
2106
2065
  const isDead = ["BLOCKED", "EXPIRED", "DELETED"].includes(activeCard.status);
2107
- const isPreordered = activeCard.preOrder === true;
2108
- const actionsDisabled = !isActivated && !isFrozen;
2109
- const revealDisabled = !isActivated;
2110
- const freezeDisabled = isUnactivated || isDead;
2111
- const showActionOverlay = !isActivated && isBgLoaded && !isPreordered || isFrozen;
2112
- const overlayClasses = activeCard.contentDark ? "bg-white/20 backdrop-blur-[3px]" : "bg-black/10 backdrop-blur-[2px]";
2113
- const buttonClasses = activeCard.contentDark ? "bg-black/10 text-black hover:bg-black/20 font-medium" : "bg-white/25 text-white hover:bg-white/35";
2114
- const handleToggleFreeze = () => {
2115
- if (freezeDisabled || isFreezing) return;
2066
+ const actionsDisabled = !isActivated && !isFrozen || isDead;
2067
+ const showActionOverlay = !isActivated && isBgLoaded || isFrozen;
2068
+ const overlayClasses = activeCard.contentDark ? "bg-white/30 backdrop-blur-[3px]" : "bg-black/30 backdrop-blur-[3px]";
2069
+ const buttonClasses = activeCard.contentDark ? "bg-black text-white hover:bg-black/80 font-medium" : "bg-white text-black hover:bg-neutral-100 font-medium";
2070
+ const handleToggleFreeze = async () => {
2071
+ if (actionsDisabled || isFreezing || !onFreeze) return;
2116
2072
  setIsFreezing(true);
2117
- setTimeout(() => {
2118
- if (onFreeze) onFreeze(activeCard.id);
2073
+ try {
2074
+ await onFreeze(activeCard.id);
2075
+ } finally {
2119
2076
  setIsFreezing(false);
2120
- }, 800);
2077
+ }
2121
2078
  };
2122
2079
  const confirmDelete = async () => {
2123
2080
  setIsDeleting(true);
2124
- setTimeout(() => {
2125
- if (onDelete) onDelete(activeCard.id);
2126
- setIsDeleting(false);
2127
- setShowDeleteDialog(false);
2128
- }, 1200);
2081
+ if (onDelete) onDelete(activeCard.id);
2082
+ setIsDeleting(false);
2083
+ setShowDeleteDialog(false);
2129
2084
  };
2130
- const formatTabLabel = (card) => {
2131
- if (card.prepaid) {
2132
- const capitalizedTier = card.tier.charAt(0).toUpperCase() + card.tier.slice(1).toLowerCase();
2133
- return `${capitalizedTier}`;
2134
- }
2135
- const capitalizedType = card.type.charAt(0).toUpperCase() + card.type.slice(1).toLowerCase();
2136
- return `${capitalizedType}`;
2085
+ const formatTabLabel = (type) => {
2086
+ return type.charAt(0).toUpperCase() + type.slice(1).toLowerCase();
2137
2087
  };
2138
- return /* @__PURE__ */ React19.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React19.createElement("h1", { className: "text-2xl mt-2 text-black tracking-tight mb-2 text-center" }, "My Cards"), onCreateCard && /* @__PURE__ */ React19.createElement(
2088
+ return /* @__PURE__ */ React19.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React19.createElement("h1", { className: "text-2xl mt-2 text-black tracking-tight mb-2 text-center" }, "My Cards"), sortedCards.length > 1 && /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-center mb-6 w-full px-2 gap-3" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center bg-white rounded-full p-1 max-w-full overflow-x-auto custom-scrollbar" }, sortedCards.map((tab, idx) => /* @__PURE__ */ React19.createElement(
2139
2089
  "button",
2140
2090
  {
2141
- onClick: onCreateCard,
2142
- className: "fixed bottom-24 right-6 sm:right-50 z-50 w-11 h-11 rounded-full bg-white shadow-xl flex items-center justify-center text-black transition-all outline-none"
2091
+ key: tab.id,
2092
+ onClick: () => setActiveTabIndex(idx),
2093
+ className: `px-4 py-1.5 rounded-full text-[11px] transition-all duration-200 outline-none whitespace-nowrap shrink-0 ${activeTabIndex === idx ? "bg-neutral-100 text-black" : "text-neutral-500 hover:text-black hover:bg-neutral-50/50"}`
2143
2094
  },
2144
- /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: PlusSignIcon2, size: 18 })
2145
- ), sortedCards.length > 1 && /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-center mb-6 w-full px-2 gap-3" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, sortedCards.map((tab, idx) => {
2146
- const isActive = activeTabIndex === idx;
2147
- return /* @__PURE__ */ React19.createElement(
2148
- "button",
2149
- {
2150
- key: tab.id,
2151
- onClick: () => setActiveTabIndex(idx),
2152
- className: `px-4 py-1.5 rounded-full text-[11px] transition-all duration-200 outline-none whitespace-nowrap shrink-0 ${isActive ? "bg-neutral-100 text-black" : "text-neutral-500 hover:text-black hover:bg-neutral-50/50"}`
2153
- },
2154
- formatTabLabel(tab)
2155
- );
2156
- }))), /* @__PURE__ */ React19.createElement("div", { className: "w-full pt-2 pb-2 flex justify-center" }, /* @__PURE__ */ React19.createElement(
2157
- "div",
2095
+ formatTabLabel(tab.type)
2096
+ )))), /* @__PURE__ */ React19.createElement("div", { className: "w-full pt-2 pb-6 flex justify-center" }, /* @__PURE__ */ React19.createElement("div", { className: "relative w-full max-w-85", style: { height: 179 } }, !isBgLoaded && /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 w-full h-full bg-white rounded-2xl flex items-center justify-center z-50" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: Loading03Icon8, size: 28, className: "animate-spin text-black" })), showActionOverlay && /* @__PURE__ */ React19.createElement("div", { className: `absolute inset-0 z-40 w-full h-full rounded-2xl flex flex-col items-center justify-center transition-all ${overlayClasses}` }, isUnactivated && /* @__PURE__ */ React19.createElement(
2097
+ "button",
2158
2098
  {
2159
- className: "relative w-full max-w-85",
2160
- style: { height: 179 }
2161
- },
2162
- !isBgLoaded && /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 w-full h-full bg-white rounded-2xl flex items-center justify-center z-50" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: Loading03Icon8, size: 28, className: "animate-spin text-black" })),
2163
- showActionOverlay && /* @__PURE__ */ React19.createElement("div", { className: `absolute inset-0 z-40 w-full h-full rounded-2xl flex flex-col items-center justify-center transition-all ${overlayClasses}` }, isUnactivated && /* @__PURE__ */ React19.createElement(
2164
- "button",
2165
- {
2166
- onClick: (e) => {
2167
- e.stopPropagation();
2168
- router.push(`${actionPath}${activeCard.id}`);
2169
- },
2170
- className: `px-6 py-2 text-[11px] rounded-full transition-all outline-none active:scale-95 ${buttonClasses}`
2099
+ onClick: (e) => {
2100
+ e.stopPropagation();
2101
+ router.push(`${actionPath}${activeCard.id}`);
2171
2102
  },
2172
- "Activate Card"
2173
- ), isFrozen && /* @__PURE__ */ React19.createElement(
2174
- "button",
2175
- {
2176
- disabled: isOverlayActionLoading,
2177
- className: `px-6 py-2.5 text-[12px] rounded-full transition-all outline-none active:scale-95 flex items-center gap-2 disabled:opacity-80 ${buttonClasses}`
2178
- },
2179
- isOverlayActionLoading ? /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: Loading03Icon8, size: 16, className: `animate-spin ${activeCard.contentDark ? "text-black" : "text-white"}` }) : "Card Frozen"
2180
- )),
2181
- /* @__PURE__ */ React19.createElement("div", { className: `absolute inset-0 w-full h-full rounded-2xl overflow-hidden transition-all duration-700 ${isBgLoaded ? "opacity-100 scale-100" : "opacity-0 scale-105"}` }, /* @__PURE__ */ React19.createElement(
2182
- "div",
2183
- {
2184
- className: "absolute inset-0 bg-cover bg-center",
2185
- style: { backgroundImage: `url(${activeCard.cardBgSrc})` }
2186
- }
2187
- ), /* @__PURE__ */ React19.createElement("div", { className: "relative z-10 w-full h-full p-5 flex flex-col justify-between" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-start justify-end w-full gap-4" }, activeCard.prepaid && /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col items-end gap-1 text-right" }, /* @__PURE__ */ React19.createElement("span", { className: `text-[9px] tracking-widest ${activeCard.contentDark ? "text-black/60" : "text-white/60"}` }, "Card Tier"), /* @__PURE__ */ React19.createElement("span", { className: `text-[11px] tracking-widest font-medium ${activeCard.contentDark ? "text-black" : "text-white"}` }, activeCard.tier))), /* @__PURE__ */ React19.createElement("div", { className: "flex justify-between items-end w-full" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React19.createElement("span", { className: `text-[9px] tracking-widest ${activeCard.contentDark ? "text-black/60" : "text-white/60"}` }, activeCard.prepaid ? "Card Balance" : "Card Tier"), /* @__PURE__ */ React19.createElement("span", { className: `text-[12px] tracking-widest font-medium ${activeCard.contentDark ? "text-black" : "text-white"}` }, activeCard.prepaid ? activeCard.balance || "$0.00" : activeCard.tier)), activeCard.networkLogoSrc && /* @__PURE__ */ React19.createElement(
2188
- "img",
2189
- {
2190
- src: activeCard.networkLogoSrc,
2191
- alt: "Network Logo",
2192
- className: "h-7 w-auto max-w-20 object-contain opacity-90"
2193
- }
2194
- ))))
2195
- )), activeCard.bannerProps ? /* @__PURE__ */ React19.createElement("div", { className: "mb-6 w-full mt-2" }, /* @__PURE__ */ React19.createElement(Banner, { ...activeCard.bannerProps })) : isPreordered ? /* @__PURE__ */ React19.createElement("div", { className: "mb-6 w-full mt-2" }, /* @__PURE__ */ React19.createElement(
2196
- Banner,
2103
+ className: `px-6 py-2 text-[11px] rounded-full transition-all outline-none ${buttonClasses}`
2104
+ },
2105
+ "Activate Card"
2106
+ ), isFrozen && /* @__PURE__ */ React19.createElement("div", { className: `px-6 py-2.5 text-[12px] rounded-full flex items-center gap-2 ${buttonClasses}` }, "Card Frozen")), /* @__PURE__ */ React19.createElement("div", { className: `absolute inset-0 w-full h-full rounded-2xl overflow-hidden transition-all duration-700 ${isBgLoaded ? "opacity-100 scale-100" : "opacity-0 scale-105"}` }, /* @__PURE__ */ React19.createElement(
2107
+ "div",
2197
2108
  {
2198
- type: "success",
2199
- title: "Order Secured",
2200
- message: `Your ${activeCard.tier} ${activeCard.type.toLowerCase()} card has been pre-ordered successfully and is pending batch processing.`,
2201
- isDismissible: false
2109
+ className: "absolute inset-0 bg-cover bg-center",
2110
+ style: { backgroundImage: `url(${activeCard.cardBgSrc})` }
2202
2111
  }
2203
- )) : null, /* @__PURE__ */ React19.createElement("div", { className: "w-full flex flex-col gap-4 mt-1" }, /* @__PURE__ */ React19.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, activeCard.prepaid && /* @__PURE__ */ React19.createElement(
2112
+ ), /* @__PURE__ */ React19.createElement("div", { className: "relative z-10 w-full h-full p-5 flex flex-col justify-between" }, /* @__PURE__ */ React19.createElement("div", { className: "flex items-start justify-end w-full gap-4" }, activeCard.networkLogoSrc && /* @__PURE__ */ React19.createElement("img", { src: activeCard.networkLogoSrc, alt: "Network Logo", className: "h-7 w-auto max-w-20 object-contain opacity-90" })), /* @__PURE__ */ React19.createElement("div", { className: "flex justify-between items-end w-full" }, /* @__PURE__ */ React19.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React19.createElement("span", { className: `text-[10px] tracking-widest ${activeCard.contentDark ? "text-black/60" : "text-white/70"} drop-shadow-sm` }, "Balance"), /* @__PURE__ */ React19.createElement("span", { className: `text-[16px] tracking-widest font-medium ${activeCard.contentDark ? "text-black" : "text-white"} drop-shadow-sm` }, activeCard.balance))))))), /* @__PURE__ */ React19.createElement("div", { className: "w-full flex flex-col gap-4 mt-1" }, /* @__PURE__ */ React19.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ React19.createElement(
2204
2113
  MenuRow,
2205
2114
  {
2206
2115
  icon: PlusSignIcon2,
2207
2116
  title: "Fund Card",
2208
- subtitle: "Add money to card",
2117
+ subtitle: "Add money to card balance",
2209
2118
  onClick: () => {
2210
2119
  if (!actionsDisabled && onFundCard) onFundCard(activeCard.id);
2211
2120
  },
@@ -2218,9 +2127,9 @@ var UniversalCardPage = ({
2218
2127
  title: "Reveal Information",
2219
2128
  subtitle: "Show secure card details",
2220
2129
  onClick: () => {
2221
- if (!revealDisabled && onReveal) onReveal(activeCard.id);
2130
+ if (!actionsDisabled && onReveal) onReveal(activeCard.id);
2222
2131
  },
2223
- disabled: revealDisabled
2132
+ disabled: actionsDisabled
2224
2133
  }
2225
2134
  ), /* @__PURE__ */ React19.createElement(
2226
2135
  MenuRow,
@@ -2232,19 +2141,7 @@ var UniversalCardPage = ({
2232
2141
  isToggle: true,
2233
2142
  toggleState: isFrozen,
2234
2143
  toggleLoading: isFreezing,
2235
- disabled: freezeDisabled,
2236
- isLast: activeCard.prepaid
2237
- }
2238
- ), !activeCard.prepaid && /* @__PURE__ */ React19.createElement(
2239
- MenuRow,
2240
- {
2241
- icon: SlidersHorizontalIcon,
2242
- title: "Set Limits",
2243
- subtitle: "Set card limits",
2244
- onClick: () => {
2245
- if (!actionsDisabled && onSetLimits) onSetLimits(activeCard.id);
2246
- },
2247
- disabled: actionsDisabled,
2144
+ disabled: isUnactivated || isDead,
2248
2145
  isLast: true
2249
2146
  }
2250
2147
  )), /* @__PURE__ */ React19.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ React19.createElement(
@@ -2264,7 +2161,7 @@ var UniversalCardPage = ({
2264
2161
  {
2265
2162
  isOpen: showDeleteDialog,
2266
2163
  title: "Delete Card",
2267
- message: "Please ensure you spend all funds on this card before deleting. Once deleted, any remaining funds will be permanently lost and cannot be recovered.",
2164
+ message: "Are you sure you want to delete this card? This action is permanent and cannot be undone.",
2268
2165
  confirmText: "Delete",
2269
2166
  isDestructive: true,
2270
2167
  isProcessing: isDeleting,
@@ -2273,28 +2170,7 @@ var UniversalCardPage = ({
2273
2170
  }
2274
2171
  ));
2275
2172
  };
2276
- var MenuRow = ({
2277
- icon,
2278
- title,
2279
- subtitle,
2280
- onClick,
2281
- iconColor = "text-black",
2282
- titleColor = "text-black",
2283
- isLast = false,
2284
- isToggle = false,
2285
- toggleState = false,
2286
- toggleLoading = false,
2287
- disabled = false
2288
- }) => /* @__PURE__ */ React19.createElement(
2289
- "div",
2290
- {
2291
- onClick: disabled ? void 0 : onClick,
2292
- className: `flex items-center p-3 transition-colors ${!isLast ? "" : ""} ${disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer hover:bg-neutral-50"}`
2293
- },
2294
- /* @__PURE__ */ React19.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon, size: 16, className: iconColor })),
2295
- /* @__PURE__ */ React19.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React19.createElement("p", { className: `text-[13px] truncate ${titleColor}` }, title), /* @__PURE__ */ React19.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)),
2296
- isToggle ? /* @__PURE__ */ React19.createElement("div", { className: `relative w-11 h-6 rounded-full transition-colors duration-300 ml-2 shrink-0 ${toggleState ? "bg-black" : "bg-neutral-100"} ${disabled ? "opacity-50" : ""}` }, /* @__PURE__ */ React19.createElement("div", { className: `absolute top-1 left-1 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300 flex items-center justify-center ${toggleState ? "translate-x-5" : "translate-x-0"}` }, toggleLoading && /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: Loading03Icon8, size: 10, className: "animate-spin text-black" }))) : /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: ArrowRight01Icon3, size: 18, className: "text-neutral-400 shrink-0 ml-2" })
2297
- );
2173
+ var MenuRow = ({ icon, title, subtitle, onClick, isLast = false, isToggle = false, toggleState = false, toggleLoading = false, disabled = false }) => /* @__PURE__ */ React19.createElement("div", { onClick: disabled ? void 0 : onClick, className: `flex items-center p-3 transition-colors ${disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer hover:bg-neutral-50"}` }, /* @__PURE__ */ React19.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon, size: 16, className: "text-black" })), /* @__PURE__ */ React19.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React19.createElement("p", { className: "text-[13px] truncate text-black" }, title), /* @__PURE__ */ React19.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)), isToggle ? /* @__PURE__ */ React19.createElement("div", { className: `relative w-11 h-6 rounded-full transition-colors duration-300 ml-2 shrink-0 ${toggleState ? "bg-black" : "bg-neutral-100"} ${disabled ? "opacity-50" : ""}` }, /* @__PURE__ */ React19.createElement("div", { className: `absolute top-1 left-1 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300 flex items-center justify-center ${toggleState ? "translate-x-5" : "translate-x-0"}` }, toggleLoading && /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: Loading03Icon8, size: 10, className: "animate-spin text-black" }))) : /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: ArrowRight01Icon3, size: 18, className: "text-neutral-400 shrink-0 ml-2" }));
2298
2174
 
2299
2175
  // src/components/UniversalProfilePage.tsx
2300
2176
  import React20, { useState as useState13 } from "react";
@@ -2559,7 +2435,7 @@ import Image3 from "next/image";
2559
2435
 
2560
2436
  // src/components/WaitlistDialog.tsx
2561
2437
  import React22, { useState as useState15 } from "react";
2562
- import { toast as toast6 } from "react-hot-toast";
2438
+ import { toast as toast7 } from "react-hot-toast";
2563
2439
  var WaitlistDialog = ({ isOpen, onClose }) => {
2564
2440
  const [email, setEmail] = useState15("");
2565
2441
  const [isLoading, setIsLoading] = useState15(false);
@@ -2567,7 +2443,7 @@ var WaitlistDialog = ({ isOpen, onClose }) => {
2567
2443
  const handleSubmit = async (e) => {
2568
2444
  e.preventDefault();
2569
2445
  if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
2570
- toast6.error("Please enter a valid email address.");
2446
+ toast7.error("Please enter a valid email address.");
2571
2447
  return;
2572
2448
  }
2573
2449
  setIsLoading(true);
@@ -2581,14 +2457,14 @@ var WaitlistDialog = ({ isOpen, onClose }) => {
2581
2457
  });
2582
2458
  const data = await response.json();
2583
2459
  if (response.ok && data.success) {
2584
- toast6.success(data.message || "You've been added to the waitlist!");
2460
+ toast7.success(data.message || "You've been added to the waitlist!");
2585
2461
  setEmail("");
2586
2462
  onClose();
2587
2463
  } else {
2588
- toast6.error(data.error || "Something went wrong. Please try again.");
2464
+ toast7.error(data.error || "Something went wrong. Please try again.");
2589
2465
  }
2590
2466
  } catch (error) {
2591
- toast6.error("Network error. Please check your connection.");
2467
+ toast7.error("Network error. Please check your connection.");
2592
2468
  } finally {
2593
2469
  setIsLoading(false);
2594
2470
  }
@@ -2836,114 +2712,36 @@ var AppBento2 = ({ tagline, headline, features }) => {
2836
2712
  };
2837
2713
 
2838
2714
  // src/components/UniversalSecurityPage.tsx
2839
- import React25, { useState as useState18, useRef as useRef6 } from "react";
2840
- import toast7 from "react-hot-toast";
2715
+ import React25, { useState as useState18 } from "react";
2716
+ import toast8 from "react-hot-toast";
2841
2717
  import { HugeiconsIcon as HugeiconsIcon17 } from "@hugeicons/react";
2842
2718
  import {
2843
- CancelCircleIcon as CancelCircleIcon5,
2719
+ CancelCircleIcon as CancelCircleIcon6,
2844
2720
  Loading03Icon as Loading03Icon10,
2845
- Copy01Icon as Copy01Icon3,
2846
2721
  ArrowLeft01Icon as ArrowLeft01Icon6,
2847
- CircleLockCheck02Icon,
2848
2722
  Key01Icon,
2723
+ LockKeyIcon as LockKeyIcon3,
2849
2724
  ArrowRight01Icon as ArrowRight01Icon5
2850
2725
  } from "@hugeicons/core-free-icons";
2851
2726
  import { startRegistration } from "@simplewebauthn/browser";
2852
2727
  var UniversalSecurityPage = ({
2853
- has2FA,
2728
+ hasPasscode,
2854
2729
  hasPasskey,
2855
- userEmail = "your account",
2856
- is2FALoading = false,
2730
+ isPasscodeLoading = false,
2857
2731
  isPasskeyLoading = false,
2858
2732
  onBack,
2859
- onRequest2FASetup,
2860
- onVerifyAndEnable2FA,
2861
- onVerifyAndDisable2FA,
2733
+ onSavePasscode,
2862
2734
  onRequestPasskeySetup,
2863
2735
  onVerifyAndEnablePasskey,
2864
2736
  onDisablePasskey
2865
2737
  }) => {
2866
- const [show2FASetupModal, setShow2FASetupModal] = useState18(false);
2867
- const [show2FADisableModal, setShow2FADisableModal] = useState18(false);
2868
2738
  const [showPasskeyModal, setShowPasskeyModal] = useState18(false);
2869
- const [twoFaSecret, setTwoFaSecret] = useState18("");
2870
- const [twoFaQr, setTwoFaQr] = useState18("");
2871
- const [isFetchingSetup, setIsFetchingSetup] = useState18(false);
2872
- const [otp, setOtp] = useState18(Array(6).fill(""));
2873
2739
  const [isSubmitting, setIsSubmitting] = useState18(false);
2874
- const inputRefs = useRef6([]);
2875
- const resetOtp = () => {
2876
- setOtp(Array(6).fill(""));
2877
- setIsSubmitting(false);
2878
- };
2879
- const handleOtpChange = (index, value) => {
2880
- const sanitizedValue = value.replace(/\D/g, "").slice(-1);
2881
- const newOtp = [...otp];
2882
- newOtp[index] = sanitizedValue;
2883
- setOtp(newOtp);
2884
- if (sanitizedValue && index < 5) {
2885
- inputRefs.current[index + 1]?.focus();
2886
- }
2887
- };
2888
- const handlePaste = (e) => {
2889
- e.preventDefault();
2890
- const pastedData = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, 6);
2891
- if (!pastedData) return;
2892
- const newOtp = [...otp];
2893
- for (let i = 0; i < pastedData.length; i++) {
2894
- newOtp[i] = pastedData[i];
2895
- }
2896
- setOtp(newOtp);
2897
- const focusIndex = Math.min(pastedData.length, 5);
2898
- inputRefs.current[focusIndex]?.focus();
2899
- };
2900
- const handleCopySecret = async (secret) => {
2901
- try {
2902
- if (navigator?.clipboard?.writeText && window.isSecureContext) {
2903
- await navigator.clipboard.writeText(secret);
2904
- toast7.success("Secret copied to clipboard");
2905
- } else {
2906
- throw new Error("Clipboard API not available");
2907
- }
2908
- } catch (e) {
2909
- try {
2910
- const textArea = document.createElement("textarea");
2911
- textArea.value = secret;
2912
- textArea.style.position = "fixed";
2913
- textArea.style.left = "-999999px";
2914
- textArea.style.top = "-999999px";
2915
- document.body.appendChild(textArea);
2916
- textArea.focus();
2917
- textArea.select();
2918
- document.execCommand("copy");
2919
- textArea.remove();
2920
- toast7.success("Secret copied to clipboard");
2921
- } catch (err) {
2922
- toast7.error("Unable to copy. Please manually copy the key.");
2923
- }
2924
- }
2925
- };
2926
- const handleToggle2FA = async () => {
2927
- if (is2FALoading) return;
2928
- if (has2FA) {
2929
- resetOtp();
2930
- setShow2FADisableModal(true);
2931
- } else {
2932
- if (!onRequest2FASetup) return;
2933
- setIsFetchingSetup(true);
2934
- try {
2935
- const data = await onRequest2FASetup();
2936
- setTwoFaSecret(data.secret);
2937
- setTwoFaQr(data.qrCodeUrl);
2938
- resetOtp();
2939
- setShow2FASetupModal(true);
2940
- } catch (error) {
2941
- toast7.error("Failed to initialize 2FA setup");
2942
- } finally {
2943
- setIsFetchingSetup(false);
2944
- }
2945
- }
2946
- };
2740
+ const [isPasscodeModalOpen, setIsPasscodeModalOpen] = useState18(false);
2741
+ const [oldPasscode, setOldPasscode] = useState18("");
2742
+ const [newPasscode, setNewPasscode] = useState18("");
2743
+ const [confirmPasscode, setConfirmPasscode] = useState18("");
2744
+ const [isPasscodeSubmitting, setIsPasscodeSubmitting] = useState18(false);
2947
2745
  const handleTogglePasskey = () => {
2948
2746
  if (isPasskeyLoading) return;
2949
2747
  if (hasPasskey) {
@@ -2952,38 +2750,40 @@ var UniversalSecurityPage = ({
2952
2750
  setShowPasskeyModal(true);
2953
2751
  }
2954
2752
  };
2955
- const submitEnable2FA = async (code) => {
2956
- if (!onVerifyAndEnable2FA) return;
2957
- setIsSubmitting(true);
2958
- try {
2959
- const res = await onVerifyAndEnable2FA(code);
2960
- if (res.success) {
2961
- toast7.success("2FA Enabled Successfully");
2962
- setShow2FASetupModal(false);
2963
- } else {
2964
- toast7.error("Invalid verification code");
2965
- }
2966
- } catch (error) {
2967
- toast7.error("Verification failed");
2968
- } finally {
2969
- setIsSubmitting(false);
2970
- }
2753
+ const closePasscodeModal = () => {
2754
+ if (isPasscodeSubmitting) return;
2755
+ setIsPasscodeModalOpen(false);
2756
+ setOldPasscode("");
2757
+ setNewPasscode("");
2758
+ setConfirmPasscode("");
2971
2759
  };
2972
- const submitDisable2FA = async (code) => {
2973
- if (!onVerifyAndDisable2FA) return;
2974
- setIsSubmitting(true);
2760
+ const handlePasscodeInput = (val, setter) => {
2761
+ setter(val.replace(/\D/g, "").substring(0, 6));
2762
+ };
2763
+ const handlePasscodeSubmit = async (e) => {
2764
+ e.preventDefault();
2765
+ if (!onSavePasscode) return;
2766
+ if (hasPasscode && oldPasscode.length !== 6) return toast8.error("Old Passcode must be exactly 6-digits.");
2767
+ if (newPasscode.length !== 6) return toast8.error("New Passcode must be exactly 6-digits.");
2768
+ if (newPasscode !== confirmPasscode) return toast8.error("New Passcodes do not match.");
2769
+ setIsPasscodeSubmitting(true);
2975
2770
  try {
2976
- const res = await onVerifyAndDisable2FA(code);
2771
+ const action = hasPasscode ? "change_passcode" : "create_passcode";
2772
+ const res = await onSavePasscode({
2773
+ action,
2774
+ oldPasscode: hasPasscode ? oldPasscode : void 0,
2775
+ newPasscode
2776
+ });
2977
2777
  if (res.success) {
2978
- toast7.success("2FA Disabled");
2979
- setShow2FADisableModal(false);
2778
+ toast8.success(res.message || "Passcode updated successfully.");
2779
+ closePasscodeModal();
2980
2780
  } else {
2981
- toast7.error("Invalid verification code");
2781
+ toast8.error(res.error || "Failed to update Passcode.");
2982
2782
  }
2983
2783
  } catch (error) {
2984
- toast7.error("Verification failed");
2784
+ toast8.error("Uh oh! Something went wrong.");
2985
2785
  } finally {
2986
- setIsSubmitting(false);
2786
+ setIsPasscodeSubmitting(false);
2987
2787
  }
2988
2788
  };
2989
2789
  const submitEnablePasskey = async () => {
@@ -3002,13 +2802,13 @@ var UniversalSecurityPage = ({
3002
2802
  }
3003
2803
  const res = await onVerifyAndEnablePasskey(credentialResponse);
3004
2804
  if (res.success) {
3005
- toast7.success("Passkey Created Successfully");
2805
+ toast8.success("Passkey Created Successfully");
3006
2806
  setShowPasskeyModal(false);
3007
2807
  } else {
3008
- toast7.error("Failed to verify device passkey.");
2808
+ toast8.error("Failed to verify device passkey.");
3009
2809
  }
3010
2810
  } catch (error) {
3011
- toast7.error(error.message || "Passkey setup interrupted.");
2811
+ toast8.error(error.message || "Passkey setup interrupted.");
3012
2812
  } finally {
3013
2813
  setIsSubmitting(false);
3014
2814
  }
@@ -3017,20 +2817,18 @@ var UniversalSecurityPage = ({
3017
2817
  "button",
3018
2818
  {
3019
2819
  onClick: onBack,
3020
- className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none"
2820
+ className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none"
3021
2821
  },
3022
2822
  /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: ArrowLeft01Icon6, size: 16 }),
3023
2823
  " Back"
3024
2824
  )), /* @__PURE__ */ React25.createElement("div", { className: "w-full flex flex-col gap-4" }, /* @__PURE__ */ React25.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ React25.createElement(
3025
2825
  MenuRow3,
3026
2826
  {
3027
- icon: CircleLockCheck02Icon,
3028
- title: "Authenticator App",
3029
- subtitle: "Secure your account with 2FA",
3030
- onClick: handleToggle2FA,
3031
- isToggle: true,
3032
- toggleState: has2FA,
3033
- toggleLoading: is2FALoading || isFetchingSetup
2827
+ icon: LockKeyIcon3,
2828
+ title: "Security Passcode",
2829
+ subtitle: hasPasscode ? "Change your 6-digit passcode" : "Create a 6-digit passcode",
2830
+ onClick: () => setIsPasscodeModalOpen(true),
2831
+ isToggle: false
3034
2832
  }
3035
2833
  ), /* @__PURE__ */ React25.createElement(
3036
2834
  MenuRow3,
@@ -3044,86 +2842,49 @@ var UniversalSecurityPage = ({
3044
2842
  toggleLoading: isPasskeyLoading,
3045
2843
  isLast: true
3046
2844
  }
3047
- ))), show2FASetupModal && /* @__PURE__ */ React25.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React25.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShow2FASetupModal(false) }), /* @__PURE__ */ React25.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 max-h-[90vh]" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React25.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable 2FA"), /* @__PURE__ */ React25.createElement("button", { onClick: () => !isSubmitting && setShow2FASetupModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: CancelCircleIcon5, size: 18 }))), /* @__PURE__ */ React25.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6 pt-2" }, /* @__PURE__ */ React25.createElement("div", { className: "w-full flex justify-center mb-6 mix-blend-multiply" }, twoFaQr ? /* @__PURE__ */ React25.createElement("img", { src: twoFaQr, alt: "2FA QR Code", className: "w-40 h-40 object-contain rounded-xl border border-neutral-200 p-2" }) : /* @__PURE__ */ React25.createElement("div", { className: "w-40 h-40 bg-neutral-100 rounded-xl flex items-center justify-center animate-pulse" })), /* @__PURE__ */ React25.createElement("div", { className: "grid grid-cols-1 gap-y-6 gap-x-4 mb-8" }, /* @__PURE__ */ React25.createElement("div", null, /* @__PURE__ */ React25.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 " }, "Setup Key"), /* @__PURE__ */ React25.createElement("div", { className: "flex items-center gap-2 min-w-0 bg-neutral-50 px-3 py-2.5 rounded-xl " }, /* @__PURE__ */ React25.createElement("span", { className: "text-[13px] font-mono tracking-widest text-black truncate min-w-0 block flex-1" }, twoFaSecret), /* @__PURE__ */ React25.createElement(
3048
- "button",
3049
- {
3050
- type: "button",
3051
- onClick: () => handleCopySecret(twoFaSecret),
3052
- className: "text-neutral-400 hover:text-black transition-colors outline-none shrink-0 ml-2"
3053
- },
3054
- /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: Copy01Icon3, size: 16 })
3055
- )))), /* @__PURE__ */ React25.createElement("div", { className: "text-center mb-8 mt-2" }, /* @__PURE__ */ React25.createElement("h2", { className: "text-xl text-black mb-2 tracking-tight" }, "Security Check"), /* @__PURE__ */ React25.createElement("p", { className: "text-[13px] text-neutral-500" }, "Enter the 6-digit code from your app")), /* @__PURE__ */ React25.createElement("form", { className: "space-y-4", autoComplete: "off", onSubmit: (e) => {
3056
- e.preventDefault();
3057
- submitEnable2FA(otp.join(""));
3058
- } }, /* @__PURE__ */ React25.createElement("div", { className: "flex justify-between gap-2 pb-6", onPaste: handlePaste }, otp.map((digit, index) => /* @__PURE__ */ React25.createElement(
3059
- "input",
2845
+ ))), isPasscodeModalOpen && /* @__PURE__ */ React25.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React25.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: closePasscodeModal }), /* @__PURE__ */ React25.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React25.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, hasPasscode ? "Change Passcode" : "Create Security Passcode"), /* @__PURE__ */ React25.createElement("button", { onClick: closePasscodeModal, disabled: isPasscodeSubmitting, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: CancelCircleIcon6, size: 18 }))), /* @__PURE__ */ React25.createElement("div", { className: "p-6" }, isPasscodeLoading ? /* @__PURE__ */ React25.createElement("div", { className: "flex flex-col items-center justify-center py-10" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: Loading03Icon10, size: 28, className: "animate-spin text-neutral-400 mb-4" })) : /* @__PURE__ */ React25.createElement("form", { onSubmit: handlePasscodeSubmit, className: "flex flex-col gap-6" }, hasPasscode && /* @__PURE__ */ React25.createElement(
2846
+ TextInput,
3060
2847
  {
3061
- key: index,
3062
- ref: (el) => {
3063
- inputRefs.current[index] = el;
3064
- },
3065
- type: "text",
3066
- inputMode: "numeric",
3067
- maxLength: 1,
3068
- value: digit,
3069
- onChange: (e) => handleOtpChange(index, e.target.value),
3070
- onKeyDown: (e) => {
3071
- if (e.key === "Backspace" && !otp[index] && index > 0) {
3072
- inputRefs.current[index - 1]?.focus();
3073
- }
3074
- },
3075
- className: "w-8 h-12 text-center text-lg bg-transparent border-b-2 border-neutral-200 text-black outline-none focus:border-black transition-all duration-300"
2848
+ type: "password",
2849
+ label: "Old 6-Digit Passcode",
2850
+ maxLength: 6,
2851
+ disabled: isPasscodeSubmitting,
2852
+ value: oldPasscode,
2853
+ onChange: (val) => handlePasscodeInput(val, setOldPasscode),
2854
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
3076
2855
  }
3077
- ))), /* @__PURE__ */ React25.createElement(
3078
- ThreeDActionButton,
3079
- {
3080
- type: "submit",
3081
- disabled: otp.join("").length < 6,
3082
- isLoading: isSubmitting,
3083
- className: "w-full py-3.5"
3084
- },
3085
- "Verify & Enable"
3086
2856
  ), /* @__PURE__ */ React25.createElement(
3087
- "button",
3088
- {
3089
- type: "button",
3090
- onClick: () => handleCopySecret(twoFaSecret),
3091
- className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 outline-none text-xs tracking-wide transition-colors mt-2"
3092
- },
3093
- /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: Copy01Icon3, size: 16, className: "mr-2" }),
3094
- "Copy Secret Key"
3095
- ))))), show2FADisableModal && /* @__PURE__ */ React25.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React25.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShow2FADisableModal(false) }), /* @__PURE__ */ React25.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React25.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Disable 2FA"), /* @__PURE__ */ React25.createElement("button", { onClick: () => !isSubmitting && setShow2FADisableModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: CancelCircleIcon5, size: 18 }))), /* @__PURE__ */ React25.createElement("div", { className: "p-6" }, /* @__PURE__ */ React25.createElement("div", { className: "text-center mb-8 mt-2" }, /* @__PURE__ */ React25.createElement("h2", { className: "text-xl text-black mb-2 tracking-tight" }, "Security Check"), /* @__PURE__ */ React25.createElement("p", { className: "text-[13px] text-neutral-500" }, "Enter the code from your authenticator app to disable 2FA.")), /* @__PURE__ */ React25.createElement("form", { className: "space-y-8", autoComplete: "off", onSubmit: (e) => {
3096
- e.preventDefault();
3097
- submitDisable2FA(otp.join(""));
3098
- } }, /* @__PURE__ */ React25.createElement("div", { className: "flex justify-between gap-2", onPaste: handlePaste }, otp.map((digit, index) => /* @__PURE__ */ React25.createElement(
3099
- "input",
2857
+ TextInput,
3100
2858
  {
3101
- key: index,
3102
- ref: (el) => {
3103
- inputRefs.current[index] = el;
3104
- },
3105
- type: "text",
3106
- inputMode: "numeric",
3107
- maxLength: 1,
3108
- value: digit,
3109
- onChange: (e) => handleOtpChange(index, e.target.value),
3110
- onKeyDown: (e) => {
3111
- if (e.key === "Backspace" && !otp[index] && index > 0) {
3112
- inputRefs.current[index - 1]?.focus();
3113
- }
3114
- },
3115
- className: "w-10 h-12 text-center text-lg bg-transparent border-b-2 border-neutral-200 text-black outline-none focus:border-black transition-all duration-300"
2859
+ type: "password",
2860
+ label: hasPasscode ? "New 6-Digit Passcode" : "Enter 6-Digit Passcode",
2861
+ maxLength: 6,
2862
+ disabled: isPasscodeSubmitting,
2863
+ value: newPasscode,
2864
+ onChange: (val) => handlePasscodeInput(val, setNewPasscode),
2865
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
3116
2866
  }
3117
- ))), /* @__PURE__ */ React25.createElement(
2867
+ ), /* @__PURE__ */ React25.createElement(
2868
+ TextInput,
2869
+ {
2870
+ type: "password",
2871
+ label: "Retype New Passcode",
2872
+ maxLength: 6,
2873
+ disabled: isPasscodeSubmitting,
2874
+ value: confirmPasscode,
2875
+ onChange: (val) => handlePasscodeInput(val, setConfirmPasscode),
2876
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
2877
+ }
2878
+ ), /* @__PURE__ */ React25.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React25.createElement(
3118
2879
  ThreeDActionButton,
3119
2880
  {
3120
2881
  type: "submit",
3121
- disabled: otp.join("").length < 6,
3122
- isLoading: isSubmitting,
3123
- className: "w-full py-3.5"
2882
+ disabled: isPasscodeSubmitting || newPasscode.length !== 6 || confirmPasscode.length !== 6 || hasPasscode && oldPasscode.length !== 6,
2883
+ isLoading: isPasscodeSubmitting,
2884
+ className: "w-full"
3124
2885
  },
3125
- "Verify & Disable"
3126
- ))))), showPasskeyModal && /* @__PURE__ */ React25.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React25.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShowPasskeyModal(false) }), /* @__PURE__ */ React25.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React25.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable Passkey"), /* @__PURE__ */ React25.createElement("button", { onClick: () => !isSubmitting && setShowPasskeyModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: CancelCircleIcon5, size: 18 }))), /* @__PURE__ */ React25.createElement("div", { className: "p-6 text-center" }, /* @__PURE__ */ React25.createElement("h2", { className: "text-lg text-black mb-2 tracking-tight" }, "Simplify your Sign In"), /* @__PURE__ */ React25.createElement("p", { className: "text-[13px] text-neutral-500 mb-8 leading-relaxed" }, "Use your device's biometrics (Face ID, Touch ID, or PIN) to securely sign into your account without needing a password."), /* @__PURE__ */ React25.createElement(
2886
+ hasPasscode ? "Update Passcode" : "Set Passcode"
2887
+ )))))), showPasskeyModal && /* @__PURE__ */ React25.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React25.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShowPasskeyModal(false) }), /* @__PURE__ */ React25.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React25.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React25.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable Passkey"), /* @__PURE__ */ React25.createElement("button", { onClick: () => !isSubmitting && setShowPasskeyModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: CancelCircleIcon6, size: 18 }))), /* @__PURE__ */ React25.createElement("div", { className: "p-6 text-center" }, /* @__PURE__ */ React25.createElement("h2", { className: "text-lg text-black mb-2 tracking-tight" }, "Simplify your Sign In"), /* @__PURE__ */ React25.createElement("p", { className: "text-[13px] text-neutral-500 mb-8 leading-relaxed" }, "Use your device's biometrics (Face ID, Touch ID, or PIN) to securely sign into your account without needing a password."), /* @__PURE__ */ React25.createElement(
3127
2888
  ThreeDActionButton,
3128
2889
  {
3129
2890
  onClick: submitEnablePasskey,
@@ -3151,13 +2912,13 @@ var MenuRow3 = ({
3151
2912
  onClick: disabled ? void 0 : onClick,
3152
2913
  className: `flex items-center p-4 transition-colors ${!isLast ? "" : ""} ${disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer hover:bg-neutral-50"}`
3153
2914
  },
3154
- /* @__PURE__ */ React25.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon, size: 16, className: iconColor })),
3155
- /* @__PURE__ */ React25.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React25.createElement("p", { className: `text-[14px] truncate ${titleColor}` }, title), /* @__PURE__ */ React25.createElement("p", { className: "text-[12px] text-neutral-500 truncate" }, subtitle)),
2915
+ /* @__PURE__ */ React25.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon, size: 16, className: iconColor })),
2916
+ /* @__PURE__ */ React25.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React25.createElement("p", { className: `text-[14px] truncate ${titleColor}` }, title), /* @__PURE__ */ React25.createElement("p", { className: "text-[12px] text-neutral-500 truncate" }, subtitle)),
3156
2917
  isToggle ? /* @__PURE__ */ React25.createElement("div", { className: `relative w-11 h-6 rounded-full transition-colors duration-300 ml-2 shrink-0 ${toggleState ? "bg-black" : "bg-neutral-100"} ${disabled ? "opacity-50" : ""}` }, /* @__PURE__ */ React25.createElement("div", { className: `absolute top-1 left-1 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300 flex items-center justify-center ${toggleState ? "translate-x-5" : "translate-x-0"}` }, toggleLoading && /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: Loading03Icon10, size: 10, className: "animate-spin text-black" }))) : /* @__PURE__ */ React25.createElement(HugeiconsIcon17, { icon: ArrowRight01Icon5, size: 18, className: "text-neutral-400 shrink-0 ml-2" })
3157
2918
  );
3158
2919
 
3159
2920
  // src/components/FeatureScroll.tsx
3160
- import React26, { useRef as useRef7, useState as useState19, useEffect as useEffect11 } from "react";
2921
+ import React26, { useRef as useRef6, useState as useState19, useEffect as useEffect11 } from "react";
3161
2922
  import Image4 from "next/image";
3162
2923
  import { HugeiconsIcon as HugeiconsIcon18 } from "@hugeicons/react";
3163
2924
  import { ArrowLeft01Icon as ArrowLeft01Icon7, ArrowRight01Icon as ArrowRight01Icon6, Loading03Icon as Loading03Icon11 } from "@hugeicons/core-free-icons";
@@ -3201,7 +2962,7 @@ var FeatureCard = ({ feature, bgImage }) => {
3201
2962
  ))), /* @__PURE__ */ React26.createElement("div", { className: "flex flex-col text-left pr-4" }, /* @__PURE__ */ React26.createElement("h3", { className: " text-xl tracking-tight text-black mb-2" }, feature.title), /* @__PURE__ */ React26.createElement("p", { className: "text-[13px] leading-relaxed text-neutral-600 max-w-[90%]" }, feature.desc)));
3202
2963
  };
3203
2964
  var FeatureScroll = ({ tagline, headline, features }) => {
3204
- const scrollRef = useRef7(null);
2965
+ const scrollRef = useRef6(null);
3205
2966
  const [canScrollLeft, setCanScrollLeft] = useState19(false);
3206
2967
  const [canScrollRight, setCanScrollRight] = useState19(true);
3207
2968
  const checkScroll = () => {
@@ -3292,7 +3053,7 @@ var PlatformFeatures = ({
3292
3053
  };
3293
3054
 
3294
3055
  // src/components/ManagedDocument.tsx
3295
- import React28, { useState as useState20, useEffect as useEffect12, useRef as useRef8 } from "react";
3056
+ import React28, { useState as useState20, useEffect as useEffect12, useRef as useRef7 } from "react";
3296
3057
  var ManagedDocument = ({
3297
3058
  tagline,
3298
3059
  title,
@@ -3301,7 +3062,7 @@ var ManagedDocument = ({
3301
3062
  contactEmail
3302
3063
  }) => {
3303
3064
  const [isAnimating, setIsAnimating] = useState20(false);
3304
- const titleRef = useRef8(null);
3065
+ const titleRef = useRef7(null);
3305
3066
  useEffect12(() => {
3306
3067
  const observer = new IntersectionObserver(
3307
3068
  ([entry]) => {
@@ -3407,7 +3168,7 @@ var ManagedContactBlock = ({
3407
3168
  };
3408
3169
 
3409
3170
  // src/components/ManagedPricingBlock.tsx
3410
- import React30, { useState as useState22, useEffect as useEffect14, useRef as useRef9 } from "react";
3171
+ import React30, { useState as useState22, useEffect as useEffect14, useRef as useRef8 } from "react";
3411
3172
  import Link7 from "next/link";
3412
3173
  import Image5 from "next/image";
3413
3174
  var CheckIcon = ({ className = "" }) => /* @__PURE__ */ React30.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: `w-4 h-4 shrink-0 ${className}`, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React30.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "black" }), /* @__PURE__ */ React30.createElement("path", { d: "M8 12L11 15L16 9", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
@@ -3420,7 +3181,7 @@ var ManagedPricingBlock = ({
3420
3181
  }) => {
3421
3182
  const [isAnimating, setIsAnimating] = useState22(false);
3422
3183
  const [activeTabIndex, setActiveTabIndex] = useState22(0);
3423
- const titleRef = useRef9(null);
3184
+ const titleRef = useRef8(null);
3424
3185
  useEffect14(() => {
3425
3186
  const observer = new IntersectionObserver(
3426
3187
  ([entry]) => {
@@ -3636,13 +3397,13 @@ var ManagedNewsletterSplitBlock = ({
3636
3397
  };
3637
3398
 
3638
3399
  // src/components/PortfolioHero.tsx
3639
- import React34, { useEffect as useEffect15, useRef as useRef10 } from "react";
3400
+ import React34, { useEffect as useEffect15, useRef as useRef9 } from "react";
3640
3401
  import Link8 from "next/link";
3641
3402
  import Image8 from "next/image";
3642
3403
  import { HugeiconsIcon as HugeiconsIcon22 } from "@hugeicons/react";
3643
3404
  import { ArrowRight01Icon as ArrowRight01Icon7 } from "@hugeicons/core-free-icons";
3644
3405
  var useScrollAnimation = () => {
3645
- const elementRef = useRef10(null);
3406
+ const elementRef = useRef9(null);
3646
3407
  useEffect15(() => {
3647
3408
  const el = elementRef.current;
3648
3409
  if (!el) return;
@@ -3771,7 +3532,7 @@ var GifFeatureCard = ({
3771
3532
  };
3772
3533
 
3773
3534
  // src/components/MedicalFeatureStatsBlock.tsx
3774
- import React36, { useState as useState24, useEffect as useEffect16, useRef as useRef11 } from "react";
3535
+ import React36, { useState as useState24, useEffect as useEffect16, useRef as useRef10 } from "react";
3775
3536
  import Image10 from "next/image";
3776
3537
  var MedicalFeatureStatsBlock = ({
3777
3538
  bottomHeadline,
@@ -3781,7 +3542,7 @@ var MedicalFeatureStatsBlock = ({
3781
3542
  stats
3782
3543
  }) => {
3783
3544
  const [isAnimating, setIsAnimating] = useState24(false);
3784
- const titleRef = useRef11(null);
3545
+ const titleRef = useRef10(null);
3785
3546
  useEffect16(() => {
3786
3547
  const observer = new IntersectionObserver(
3787
3548
  ([entry]) => {
@@ -4091,7 +3852,7 @@ var UniversalVerificationPage = ({
4091
3852
  // src/components/UniversalRewardPage.tsx
4092
3853
  import React41, { useState as useState27 } from "react";
4093
3854
  import axios from "axios";
4094
- import toast8 from "react-hot-toast";
3855
+ import toast9 from "react-hot-toast";
4095
3856
  import Confetti from "react-confetti";
4096
3857
  import { useWindowSize } from "react-use";
4097
3858
  import { HugeiconsIcon as HugeiconsIcon27 } from "@hugeicons/react";
@@ -4146,7 +3907,7 @@ var UniversalRewardPage = ({
4146
3907
  const res = await axios.post(selectedReward.endpoint, selectedReward.config);
4147
3908
  if (res.data.success) {
4148
3909
  setShowConfetti(true);
4149
- toast8.success(res.data.message || "Reward claimed successfully!");
3910
+ toast9.success(res.data.message || "Reward claimed successfully!");
4150
3911
  setSelectedReward(null);
4151
3912
  onRefresh();
4152
3913
  setTimeout(() => {
@@ -4154,7 +3915,7 @@ var UniversalRewardPage = ({
4154
3915
  }, 6e3);
4155
3916
  }
4156
3917
  } catch (error) {
4157
- toast8.error(error.response?.data?.error || "Failed to claim reward. Please try again.");
3918
+ toast9.error(error.response?.data?.error || "Failed to claim reward. Please try again.");
4158
3919
  } finally {
4159
3920
  setIsClaiming(false);
4160
3921
  }
@@ -4204,7 +3965,7 @@ var UniversalRewardPage = ({
4204
3965
 
4205
3966
  // src/components/UniversalReferralPage.tsx
4206
3967
  import React42, { useState as useState28 } from "react";
4207
- import toast9 from "react-hot-toast";
3968
+ import toast10 from "react-hot-toast";
4208
3969
  import { HugeiconsIcon as HugeiconsIcon28 } from "@hugeicons/react";
4209
3970
  import {
4210
3971
  ArrowLeft01Icon as ArrowLeft01Icon10,
@@ -4223,6 +3984,8 @@ var formatDate = (dateInput) => {
4223
3984
  var UniversalReferralPage = ({
4224
3985
  referralCode,
4225
3986
  totalCount,
3987
+ referralCoins = 0,
3988
+ // Default to 0
4226
3989
  referrals,
4227
3990
  isLoading,
4228
3991
  currentPage,
@@ -4237,9 +4000,9 @@ var UniversalReferralPage = ({
4237
4000
  if (!referralCode) return;
4238
4001
  try {
4239
4002
  await navigator.clipboard.writeText(referralCode);
4240
- toast9.success("Referral code copied!");
4003
+ toast10.success("Referral code copied!");
4241
4004
  } catch {
4242
- toast9.error("Failed to copy code.");
4005
+ toast10.error("Failed to copy code.");
4243
4006
  }
4244
4007
  };
4245
4008
  const AvatarLogo2 = ({ src, alt, name, sizeClass = "w-10 h-10" }) => {
@@ -4248,7 +4011,7 @@ var UniversalReferralPage = ({
4248
4011
  const finalSrc = src || fallbackUrl;
4249
4012
  return /* @__PURE__ */ React42.createElement("div", { className: `relative shrink-0 rounded-full bg-neutral-100 flex items-center justify-center overflow-hidden border-2 border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React42.createElement(HugeiconsIcon28, { icon: Loading03Icon17, size: 16, className: "animate-spin text-neutral-400 absolute" }), /* @__PURE__ */ React42.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
4250
4013
  };
4251
- return /* @__PURE__ */ React42.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React42.createElement(ManagedToaster, null), /* @__PURE__ */ React42.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React42.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon28, { icon: ArrowLeft01Icon10, size: 16 }), " Back")), /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-3xl bg-white w-full" }, /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-4 mb-2" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Your Referrals"), /* @__PURE__ */ React42.createElement("p", { className: "text-xs text-neutral-500" }, "Invite friends and earn rewards when they verify and activate cards.")), /* @__PURE__ */ React42.createElement("div", { className: "border border-neutral-200 rounded-xl p-4 flex items-center justify-between mt-2" }, /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React42.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400 " }, "Invitation Code"), isLoading && !referralCode ? /* @__PURE__ */ React42.createElement("div", { className: "h-6 w-24 bg-neutral-50 animate-pulse rounded mt-1" }) : /* @__PURE__ */ React42.createElement("span", { className: "text-lg text-black tracking-widest" }, referralCode)), /* @__PURE__ */ React42.createElement(
4014
+ return /* @__PURE__ */ React42.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React42.createElement(ManagedToaster, null), /* @__PURE__ */ React42.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React42.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon28, { icon: ArrowLeft01Icon10, size: 16 }), " Back")), /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-3xl bg-white w-full" }, /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-4 mb-2" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Your Referrals"), /* @__PURE__ */ React42.createElement("p", { className: "text-xs text-neutral-500" }, "Invite friends and earn rewards when they verify and activate cards.")), /* @__PURE__ */ React42.createElement("div", { className: "border border-neutral-200 rounded-xl p-4 flex items-center justify-between mt-2" }, /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React42.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400 " }, "Invitation Code"), isLoading && !referralCode ? /* @__PURE__ */ React42.createElement("div", { className: "h-6 w-24 bg-neutral-50 animate-pulse rounded mt-1" }) : /* @__PURE__ */ React42.createElement("span", { className: "text-lg text-black tracking-widest" }, referralCode)), /* @__PURE__ */ React42.createElement(
4252
4015
  "button",
4253
4016
  {
4254
4017
  onClick: handleCopyCode,
@@ -4256,7 +4019,7 @@ var UniversalReferralPage = ({
4256
4019
  className: "w-10 h-10 rounded-full bg-white flex items-center justify-center text-neutral-500 hover:text-black transition-colors outline-none disabled:opacity-50"
4257
4020
  },
4258
4021
  /* @__PURE__ */ React42.createElement(HugeiconsIcon28, { icon: Copy01Icon4, size: 18 })
4259
- )), /* @__PURE__ */ React42.createElement("div", { className: "text-[13px] text-black px-1 mt-2" }, "Total Invited: ", isLoading && !totalCount ? "-" : totalCount)), /* @__PURE__ */ React42.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ React42.createElement(PageSpinner5, null) : /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React42.createElement("div", null, referrals.length === 0 ? /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col items-center justify-center py-12 opacity-50" }, /* @__PURE__ */ React42.createElement("p", { className: "text-xs text-neutral-500 text-center" }, "You haven't referred anyone yet.")) : referrals.map((ref, idx) => /* @__PURE__ */ React42.createElement(
4022
+ )), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center justify-between text-[13px] text-black px-1 mt-2" }, /* @__PURE__ */ React42.createElement("span", null, "Total Invited: ", isLoading && !totalCount ? "-" : totalCount), /* @__PURE__ */ React42.createElement("span", null, "Points: ", isLoading && !referralCoins && referralCoins !== 0 ? "-" : referralCoins))), /* @__PURE__ */ React42.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ React42.createElement(PageSpinner5, null) : /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React42.createElement("div", null, referrals.length === 0 ? /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col items-center justify-center py-12 opacity-50" }, /* @__PURE__ */ React42.createElement("p", { className: "text-xs text-neutral-500 text-center" }, "You haven't referred anyone yet.")) : referrals.map((ref, idx) => /* @__PURE__ */ React42.createElement(
4260
4023
  "div",
4261
4024
  {
4262
4025
  key: `${ref.profile.username}-${idx}`,
@@ -4269,8 +4032,8 @@ var UniversalReferralPage = ({
4269
4032
  alt: ref.profile.username,
4270
4033
  name: formatWeb3Name2(ref.profile.web3Name)
4271
4034
  }
4272
- ), /* @__PURE__ */ React42.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5 pr-4" }, /* @__PURE__ */ React42.createElement("p", { className: "text-[14px] text-black truncate" }, formatWeb3Name2(ref.profile.web3Name)), /* @__PURE__ */ React42.createElement("p", { className: "text-[12px] text-neutral-500 truncate" }, "@", ref.profile.username))),
4273
- /* @__PURE__ */ React42.createElement("div", { className: "shrink-0 flex flex-col items-end gap-1 text-right" }, /* @__PURE__ */ React42.createElement("span", { className: "text-[11px] text-neutral-400" }, "Joined"), /* @__PURE__ */ React42.createElement("span", { className: "text-[12px] text-black" }, formatDate(ref.joinedAt)))
4035
+ ), /* @__PURE__ */ React42.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5 pr-4" }, /* @__PURE__ */ React42.createElement("p", { className: "text-[14px] text-black truncate" }, formatWeb3Name2(ref.profile.web3Name)), /* @__PURE__ */ React42.createElement("p", { className: "text-[12px] text-neutral-500 truncate" }, "@", ref.profile.username))),
4036
+ /* @__PURE__ */ React42.createElement("div", { className: "shrink-0 flex flex-col items-end gap-1 text-right" }, /* @__PURE__ */ React42.createElement("span", { className: "text-[11px] text-neutral-400" }, "Joined"), /* @__PURE__ */ React42.createElement("span", { className: "text-[12px] text-black" }, formatDate(ref.joinedAt)))
4274
4037
  ))), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React42.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React42.createElement(
4275
4038
  "button",
4276
4039
  {
@@ -4297,7 +4060,7 @@ import { useWindowSize as useWindowSize2 } from "react-use";
4297
4060
  import { HugeiconsIcon as HugeiconsIcon29 } from "@hugeicons/react";
4298
4061
  import {
4299
4062
  ArrowLeft01Icon as ArrowLeft01Icon11,
4300
- CancelCircleIcon as CancelCircleIcon6,
4063
+ CancelCircleIcon as CancelCircleIcon7,
4301
4064
  Loading03Icon as Loading03Icon18
4302
4065
  } from "@hugeicons/core-free-icons";
4303
4066
  var CheckIcon2 = ({ className = "" }) => /* @__PURE__ */ React43.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: `w-4 h-4 shrink-0 ${className}`, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React43.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "black" }), /* @__PURE__ */ React43.createElement("path", { d: "M8 12L11 15L16 9", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
@@ -4452,7 +4215,7 @@ var UniversalCardActionPage = ({
4452
4215
  onClick: () => setSelectedTier(null),
4453
4216
  className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50"
4454
4217
  },
4455
- /* @__PURE__ */ React43.createElement(HugeiconsIcon29, { icon: CancelCircleIcon6, size: 18 })
4218
+ /* @__PURE__ */ React43.createElement(HugeiconsIcon29, { icon: CancelCircleIcon7, size: 18 })
4456
4219
  )), /* @__PURE__ */ React43.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6 relative z-10" }, /* @__PURE__ */ React43.createElement("div", { className: "flex flex-col items-center justify-center mb-6" }, /* @__PURE__ */ React43.createElement("p", { className: "text-2xl text-black mb-1" }, selectedTier.priceUSD === 0 ? "Free" : `$${selectedTier.priceUSD.toFixed(2)}`), /* @__PURE__ */ React43.createElement("span", { className: `text-[10px] tracking-widest px-4 py-1.5 rounded-full bg-neutral-100 text-black mt-1` }, formatTierName(selectedTier.tierName), " ", formatTierName(cardType))), /* @__PURE__ */ React43.createElement("div", { className: "grid grid-cols-1 gap-y-6 mb-8 mt-4" }, /* @__PURE__ */ React43.createElement("div", null, /* @__PURE__ */ React43.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Action"), /* @__PURE__ */ React43.createElement("span", { className: "text-[13px] text-black " }, intendedAction === "upgrade" ? `Upgrade to ${formatTierName(selectedTier.tierName)}` : `Pre-order Card`)), intendedAction === "pre_order" && selectedTier.priceUSD > 0 && /* @__PURE__ */ React43.createElement("div", null, /* @__PURE__ */ React43.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Payment Notice"), /* @__PURE__ */ React43.createElement("span", { className: "text-[12px] text-neutral-600 leading-relaxed block" }, "By confirming, $", selectedTier.priceUSD.toFixed(2), " will be securely deducted from your USD asset balance to guarantee your order."))), /* @__PURE__ */ React43.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React43.createElement(
4457
4220
  ThreeDActionButton,
4458
4221
  {
@@ -4487,7 +4250,7 @@ var UniversalCardActionPage = ({
4487
4250
  // src/components/PinDialerBottomSheet.tsx
4488
4251
  import React44, { useState as useState30, useEffect as useEffect17 } from "react";
4489
4252
  import { HugeiconsIcon as HugeiconsIcon30 } from "@hugeicons/react";
4490
- import { CancelCircleIcon as CancelCircleIcon7 } from "@hugeicons/core-free-icons";
4253
+ import { CancelCircleIcon as CancelCircleIcon8 } from "@hugeicons/core-free-icons";
4491
4254
  var PinDialerBottomSheet = ({
4492
4255
  isOpen,
4493
4256
  title = "Action Required",
@@ -4522,7 +4285,7 @@ var PinDialerBottomSheet = ({
4522
4285
  disabled: isVerifying,
4523
4286
  className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50"
4524
4287
  },
4525
- /* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon: CancelCircleIcon7, size: 20 })
4288
+ /* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon: CancelCircleIcon8, size: 20 })
4526
4289
  )), /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col px-6 pb-6 pt-2 relative" }, /* @__PURE__ */ React44.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col gap-6" }, /* @__PURE__ */ React44.createElement(
4527
4290
  TextInput,
4528
4291
  {