@rpg-engine/long-bow 0.8.136 → 0.8.137

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.
@@ -5,7 +5,7 @@ import { v4 } from 'uuid';
5
5
  import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, TaskType, TaskStatus, isMobileOrTablet, RewardType, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, CharacterClass, QuestStatus, getLevelFromXP, getSkillConstants, getLevelFromSPTiered, getXPForLevel, getSPForLevelTiered, MetadataType, PurchaseType, UserAccountTypes, PaymentCurrency, PeriodOfDay } from '@rpg-engine/shared';
6
6
  import dayjs from 'dayjs';
7
7
  import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
8
- import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaPaperPlane, FaChevronUp, FaChevronDown, FaReddit, FaTrash, FaShoppingBag, FaInfoCircle, FaCartPlus, FaArrowLeft, FaHistory, FaWallet, FaShoppingCart } from 'react-icons/fa';
8
+ import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaPaperPlane, FaShoppingCart, FaChevronUp, FaChevronDown, FaReddit, FaTrash, FaShoppingBag, FaInfoCircle, FaCartPlus, FaArrowLeft, FaHistory, FaWallet } from 'react-icons/fa';
9
9
  import { RxMagnifyingGlass, RxCross2 } from 'react-icons/rx';
10
10
  import { IoMdContract, IoMdExpand } from 'react-icons/io';
11
11
  import Draggable from 'react-draggable';
@@ -30302,49 +30302,40 @@ var PageInfo$1 = /*#__PURE__*/styled.div.withConfig({
30302
30302
  var TRANSACTION_TYPE_LABELS = {
30303
30303
  Purchase: 'Purchase',
30304
30304
  Transfer: 'Transfer',
30305
- MarketplaceSale: 'Marketplace Sale',
30306
- MarketplacePurchase: 'Marketplace Buy',
30307
- StorePurchase: 'Store Purchase',
30305
+ MarketplaceSale: 'Mkt Sale',
30306
+ MarketplacePurchase: 'Mkt Buy',
30307
+ StorePurchase: 'Store',
30308
30308
  Fee: 'Fee',
30309
30309
  Refund: 'Refund',
30310
- AdminAdjustment: 'Admin Adjustment'
30310
+ AdminAdjustment: 'Admin'
30311
30311
  };
30312
30312
  var TRANSACTION_TYPE_OPTIONS = [{
30313
- id: 0,
30314
30313
  value: '',
30315
- option: 'All Types'
30314
+ label: 'All Types'
30316
30315
  }, {
30317
- id: 1,
30318
30316
  value: 'Purchase',
30319
- option: 'Purchase'
30317
+ label: 'Purchase'
30320
30318
  }, {
30321
- id: 2,
30322
30319
  value: 'Transfer',
30323
- option: 'Transfer'
30320
+ label: 'Transfer'
30324
30321
  }, {
30325
- id: 3,
30326
30322
  value: 'MarketplaceSale',
30327
- option: 'Marketplace Sale'
30323
+ label: 'Marketplace Sale'
30328
30324
  }, {
30329
- id: 4,
30330
30325
  value: 'MarketplacePurchase',
30331
- option: 'Marketplace Buy'
30326
+ label: 'Marketplace Buy'
30332
30327
  }, {
30333
- id: 5,
30334
30328
  value: 'StorePurchase',
30335
- option: 'Store Purchase'
30329
+ label: 'Store Purchase'
30336
30330
  }, {
30337
- id: 6,
30338
30331
  value: 'Fee',
30339
- option: 'Fee'
30332
+ label: 'Fee'
30340
30333
  }, {
30341
- id: 7,
30342
30334
  value: 'Refund',
30343
- option: 'Refund'
30335
+ label: 'Refund'
30344
30336
  }, {
30345
- id: 8,
30346
30337
  value: 'AdminAdjustment',
30347
- option: 'Admin Adjustment'
30338
+ label: 'Admin Adjustment'
30348
30339
  }];
30349
30340
  var DCHistoryPanel = function DCHistoryPanel(_ref) {
30350
30341
  var transactions = _ref.transactions,
@@ -30355,7 +30346,13 @@ var DCHistoryPanel = function DCHistoryPanel(_ref) {
30355
30346
  var _React$useState = React.useState(''),
30356
30347
  selectedType = _React$useState[0],
30357
30348
  setSelectedType = _React$useState[1];
30358
- var handleTypeChange = function handleTypeChange(value) {
30349
+ // Auto-load on first mount (when History tab is opened)
30350
+ React.useEffect(function () {
30351
+ onRequestHistory(1);
30352
+ // eslint-disable-next-line react-hooks/exhaustive-deps
30353
+ }, []);
30354
+ var handleTypeChange = function handleTypeChange(e) {
30355
+ var value = e.target.value;
30359
30356
  setSelectedType(value);
30360
30357
  onRequestHistory(1, value || undefined);
30361
30358
  };
@@ -30364,22 +30361,26 @@ var DCHistoryPanel = function DCHistoryPanel(_ref) {
30364
30361
  };
30365
30362
  var formatDate = function formatDate(dateStr) {
30366
30363
  var d = new Date(dateStr);
30367
- var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
30368
- return months[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
30364
+ return d.getMonth() + 1 + "/" + d.getDate() + "/" + String(d.getFullYear()).slice(-2);
30369
30365
  };
30370
- return React.createElement(PanelContainer, null, React.createElement(FilterRow, null, React.createElement(FilterLabel, null, "Filter:"), React.createElement(Dropdown, {
30371
- options: TRANSACTION_TYPE_OPTIONS,
30372
- onChange: handleTypeChange,
30373
- width: "200px"
30374
- })), loading && React.createElement(LoadingRow, null, React.createElement(Spinner, null), React.createElement("span", null, "Loading...")), !loading && transactions.length === 0 && React.createElement(EmptyMessage, null, "No transactions found."), !loading && transactions.length > 0 && React.createElement(TransactionList, null, transactions.map(function (tx) {
30366
+ return React.createElement(PanelContainer, null, React.createElement(FilterRow, null, React.createElement(FilterLabel, null, "Filter:"), React.createElement(TypeSelect, {
30367
+ value: selectedType,
30368
+ onChange: handleTypeChange
30369
+ }, TRANSACTION_TYPE_OPTIONS.map(function (opt) {
30370
+ return React.createElement("option", {
30371
+ key: opt.value,
30372
+ value: opt.value
30373
+ }, opt.label);
30374
+ }))), loading && React.createElement(LoadingRow, null, React.createElement(Spinner, null), React.createElement("span", null, "Loading...")), !loading && transactions.length === 0 && React.createElement(EmptyMessage, null, "No transactions found."), !loading && transactions.length > 0 && React.createElement(TransactionList, null, transactions.map(function (tx) {
30375
30375
  var _TRANSACTION_TYPE_LAB, _tx$note;
30376
30376
  var isCredit = tx.amount > 0;
30377
30377
  var label = (_TRANSACTION_TYPE_LAB = TRANSACTION_TYPE_LABELS[tx.type]) != null ? _TRANSACTION_TYPE_LAB : tx.type;
30378
+ var subtitle = (_tx$note = tx.note) != null ? _tx$note : tx.relatedCharacterName ? tx.relatedCharacterName : '';
30378
30379
  return React.createElement(TransactionRow, {
30379
30380
  key: tx._id
30380
- }, React.createElement(TxType, null, label), React.createElement(TxAmount, {
30381
+ }, React.createElement(TxLeft, null, React.createElement(TxType, null, label), subtitle ? React.createElement(TxNote, null, subtitle) : null), React.createElement(TxRight, null, React.createElement(TxAmount, {
30381
30382
  "$credit": isCredit
30382
- }, isCredit ? '+' : '', tx.amount, " DC"), React.createElement(TxNote, null, (_tx$note = tx.note) != null ? _tx$note : tx.relatedCharacterName ? "With: " + tx.relatedCharacterName : ''), React.createElement(TxDate, null, formatDate(tx.createdAt)), React.createElement(TxBalance, null, "Balance: ", tx.balanceAfter, " DC"));
30383
+ }, isCredit ? '+' : '', tx.amount, " DC"), React.createElement(TxDate, null, formatDate(tx.createdAt))));
30383
30384
  })), totalPages > 1 && React.createElement(Pagination, {
30384
30385
  currentPage: currentPage,
30385
30386
  totalPages: totalPages,
@@ -30393,54 +30394,62 @@ var PanelContainer = /*#__PURE__*/styled.div.withConfig({
30393
30394
  var FilterRow = /*#__PURE__*/styled.div.withConfig({
30394
30395
  displayName: "DCHistoryPanel__FilterRow",
30395
30396
  componentId: "sc-debjdj-1"
30396
- })(["display:flex;align-items:center;gap:8px;margin-bottom:4px;"]);
30397
+ })(["display:flex;align-items:center;gap:8px;margin-bottom:2px;"]);
30397
30398
  var FilterLabel = /*#__PURE__*/styled.span.withConfig({
30398
30399
  displayName: "DCHistoryPanel__FilterLabel",
30399
30400
  componentId: "sc-debjdj-2"
30400
- })(["font-size:8px;color:#f59e0b;font-family:'Press Start 2P',cursive;white-space:nowrap;"]);
30401
+ })(["font-size:7px;color:#f59e0b;font-family:'Press Start 2P',cursive;white-space:nowrap;"]);
30402
+ var TypeSelect = /*#__PURE__*/styled.select.withConfig({
30403
+ displayName: "DCHistoryPanel__TypeSelect",
30404
+ componentId: "sc-debjdj-3"
30405
+ })(["background:rgba(0,0,0,0.7);border:1px solid rgba(245,158,11,0.4);border-radius:3px;color:#f59e0b;font-size:7px;font-family:'Press Start 2P',cursive;padding:3px 5px;cursor:pointer;outline:none;flex:1;option{background:#1a1a2e;color:#f59e0b;}&:hover{border-color:#f59e0b;}&:focus{border-color:#f59e0b;box-shadow:0 0 0 1px rgba(245,158,11,0.3);}"]);
30401
30406
  var TransactionList = /*#__PURE__*/styled.div.withConfig({
30402
30407
  displayName: "DCHistoryPanel__TransactionList",
30403
- componentId: "sc-debjdj-3"
30404
- })(["display:flex;flex-direction:column;gap:4px;max-height:280px;overflow-y:auto;"]);
30408
+ componentId: "sc-debjdj-4"
30409
+ })(["display:flex;flex-direction:column;gap:3px;max-height:260px;overflow-y:auto;&::-webkit-scrollbar{width:4px;}&::-webkit-scrollbar-track{background:rgba(0,0,0,0.3);}&::-webkit-scrollbar-thumb{background:rgba(245,158,11,0.4);border-radius:2px;}"]);
30405
30410
  var TransactionRow = /*#__PURE__*/styled.div.withConfig({
30406
30411
  displayName: "DCHistoryPanel__TransactionRow",
30407
- componentId: "sc-debjdj-4"
30408
- })(["background:rgba(0,0,0,0.4);border:1px solid rgba(255,215,0,0.2);padding:8px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto auto;gap:2px;"]);
30412
+ componentId: "sc-debjdj-5"
30413
+ })(["background:rgba(0,0,0,0.35);border:1px solid rgba(245,158,11,0.15);border-radius:2px;padding:5px 7px;display:flex;align-items:center;gap:8px;"]);
30414
+ var TxLeft = /*#__PURE__*/styled.div.withConfig({
30415
+ displayName: "DCHistoryPanel__TxLeft",
30416
+ componentId: "sc-debjdj-6"
30417
+ })(["flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;"]);
30418
+ var TxRight = /*#__PURE__*/styled.div.withConfig({
30419
+ displayName: "DCHistoryPanel__TxRight",
30420
+ componentId: "sc-debjdj-7"
30421
+ })(["display:flex;flex-direction:column;align-items:flex-end;gap:2px;flex-shrink:0;"]);
30409
30422
  var TxType = /*#__PURE__*/styled.span.withConfig({
30410
30423
  displayName: "DCHistoryPanel__TxType",
30411
- componentId: "sc-debjdj-5"
30412
- })(["font-size:8px;color:#f59e0b;font-family:'Press Start 2P',cursive;grid-column:1;grid-row:1;"]);
30424
+ componentId: "sc-debjdj-8"
30425
+ })(["font-size:7px;color:#f59e0b;font-family:'Press Start 2P',cursive;"]);
30413
30426
  var TxAmount = /*#__PURE__*/styled.span.withConfig({
30414
30427
  displayName: "DCHistoryPanel__TxAmount",
30415
- componentId: "sc-debjdj-6"
30416
- })(["font-size:10px;font-family:'Press Start 2P',cursive;color:", ";font-weight:bold;grid-column:2;grid-row:1;text-align:right;"], function (_ref2) {
30428
+ componentId: "sc-debjdj-9"
30429
+ })(["font-size:8px;font-family:'Press Start 2P',cursive;color:", ";white-space:nowrap;"], function (_ref2) {
30417
30430
  var $credit = _ref2.$credit;
30418
30431
  return $credit ? uiColors.green : uiColors.red;
30419
30432
  });
30420
30433
  var TxNote = /*#__PURE__*/styled.span.withConfig({
30421
30434
  displayName: "DCHistoryPanel__TxNote",
30422
- componentId: "sc-debjdj-7"
30423
- })(["font-size:7px;color:", ";font-family:'Press Start 2P',cursive;grid-column:1;grid-row:2;"], uiColors.lightGray);
30435
+ componentId: "sc-debjdj-10"
30436
+ })(["font-size:6px;color:", ";font-family:'Press Start 2P',cursive;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"], uiColors.lightGray);
30424
30437
  var TxDate = /*#__PURE__*/styled.span.withConfig({
30425
30438
  displayName: "DCHistoryPanel__TxDate",
30426
- componentId: "sc-debjdj-8"
30427
- })(["font-size:7px;color:", ";font-family:'Press Start 2P',cursive;grid-column:2;grid-row:2;text-align:right;"], uiColors.lightGray);
30428
- var TxBalance = /*#__PURE__*/styled.span.withConfig({
30429
- displayName: "DCHistoryPanel__TxBalance",
30430
- componentId: "sc-debjdj-9"
30431
- })(["font-size:7px;color:", ";font-family:'Press Start 2P',cursive;grid-column:1 / 3;grid-row:3;opacity:0.7;"], uiColors.white);
30439
+ componentId: "sc-debjdj-11"
30440
+ })(["font-size:6px;color:rgba(255,255,255,0.4);font-family:'Press Start 2P',cursive;white-space:nowrap;"]);
30432
30441
  var LoadingRow = /*#__PURE__*/styled.div.withConfig({
30433
30442
  displayName: "DCHistoryPanel__LoadingRow",
30434
- componentId: "sc-debjdj-10"
30443
+ componentId: "sc-debjdj-12"
30435
30444
  })(["display:flex;align-items:center;gap:8px;justify-content:center;padding:16px;color:", ";font-size:9px;font-family:'Press Start 2P',cursive;"], uiColors.white);
30436
30445
  var Spinner = /*#__PURE__*/styled.div.withConfig({
30437
30446
  displayName: "DCHistoryPanel__Spinner",
30438
- componentId: "sc-debjdj-11"
30439
- })(["border:3px solid rgba(255,255,255,0.2);border-radius:50%;border-top:3px solid #f59e0b;width:20px;height:20px;animation:spin 0.8s linear infinite;@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}"]);
30447
+ componentId: "sc-debjdj-13"
30448
+ })(["border:3px solid rgba(255,255,255,0.2);border-radius:50%;border-top:3px solid #f59e0b;width:16px;height:16px;animation:spin 0.8s linear infinite;@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}"]);
30440
30449
  var EmptyMessage = /*#__PURE__*/styled.div.withConfig({
30441
30450
  displayName: "DCHistoryPanel__EmptyMessage",
30442
- componentId: "sc-debjdj-12"
30443
- })(["font-size:9px;color:", ";font-family:'Press Start 2P',cursive;text-align:center;padding:20px;"], uiColors.lightGray);
30451
+ componentId: "sc-debjdj-14"
30452
+ })(["font-size:8px;color:", ";font-family:'Press Start 2P',cursive;text-align:center;padding:20px;"], uiColors.lightGray);
30444
30453
 
30445
30454
  // Global style to prevent body scrolling when modal is open
30446
30455
  var GlobalStyle = /*#__PURE__*/createGlobalStyle(["body{overflow:hidden;width:100%;height:100%;}"]);
@@ -30592,7 +30601,9 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
30592
30601
  onClearTransferResult = _ref.onClearTransferResult,
30593
30602
  characterName = _ref.characterName,
30594
30603
  onInputFocus = _ref.onInputFocus,
30595
- onInputBlur = _ref.onInputBlur;
30604
+ onInputBlur = _ref.onInputBlur,
30605
+ onSearchCharacter = _ref.onSearchCharacter,
30606
+ searchResults = _ref.searchResults;
30596
30607
  var _useState = useState(''),
30597
30608
  recipientName = _useState[0],
30598
30609
  setRecipientName = _useState[1];
@@ -30605,7 +30616,23 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
30605
30616
  var _useState4 = useState(false),
30606
30617
  showConfirm = _useState4[0],
30607
30618
  setShowConfirm = _useState4[1];
30619
+ var _useState5 = useState(false),
30620
+ showDropdown = _useState5[0],
30621
+ setShowDropdown = _useState5[1];
30622
+ var dropdownRef = useRef(null);
30608
30623
  var clearResultTimerRef = useRef(null);
30624
+ var debouncedSearch = useMemo(function () {
30625
+ return debounce(function (name) {
30626
+ if (name.trim().length >= 2) {
30627
+ onSearchCharacter == null ? void 0 : onSearchCharacter(name.trim());
30628
+ }
30629
+ }, 300);
30630
+ }, [onSearchCharacter]);
30631
+ useEffect(function () {
30632
+ return function () {
30633
+ debouncedSearch.cancel();
30634
+ };
30635
+ }, [debouncedSearch]);
30609
30636
  useEffect(function () {
30610
30637
  if (transferResult) {
30611
30638
  if (clearResultTimerRef.current) {
@@ -30653,17 +30680,41 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
30653
30680
  setRecipientName('');
30654
30681
  setAmount('');
30655
30682
  }, [recipientName, amount, onSendTransfer]);
30656
- return React.createElement(PanelContainer$1, null, React.createElement(FieldLabel, null, "Recipient Character Name"), React.createElement(StyledInput, {
30683
+ return React.createElement(PanelContainer$1, null, React.createElement(FieldLabel, null, "Recipient Character Name"), React.createElement(AutocompleteWrapper, {
30684
+ ref: dropdownRef
30685
+ }, React.createElement(StyledInput, {
30657
30686
  type: "text",
30658
30687
  value: recipientName,
30659
30688
  onChange: function onChange(e) {
30660
- return setRecipientName(e.target.value);
30689
+ setRecipientName(e.target.value);
30690
+ debouncedSearch(e.target.value);
30691
+ setShowDropdown(true);
30692
+ },
30693
+ onFocus: function onFocus() {
30694
+ onInputFocus == null ? void 0 : onInputFocus();
30695
+ if (recipientName.trim().length >= 2 && searchResults && searchResults.length > 0) {
30696
+ setShowDropdown(true);
30697
+ }
30698
+ },
30699
+ onBlur: function onBlur() {
30700
+ // Delay to allow dropdown click to register
30701
+ setTimeout(function () {
30702
+ return setShowDropdown(false);
30703
+ }, 150);
30704
+ onInputBlur == null ? void 0 : onInputBlur();
30661
30705
  },
30662
- onFocus: onInputFocus,
30663
- onBlur: onInputBlur,
30664
30706
  placeholder: "Enter character name",
30665
- disabled: transferLoading
30666
- }), React.createElement(FieldLabel, null, "Amount (DC)"), React.createElement(StyledInput, {
30707
+ disabled: transferLoading,
30708
+ autoComplete: "off"
30709
+ }), showDropdown && searchResults && searchResults.length > 0 && React.createElement(DropdownList, null, searchResults.map(function (_char) {
30710
+ return React.createElement(DropdownItem, {
30711
+ key: _char._id,
30712
+ onPointerDown: function onPointerDown() {
30713
+ setRecipientName(_char.name);
30714
+ setShowDropdown(false);
30715
+ }
30716
+ }, _char.name);
30717
+ }))), React.createElement(FieldLabel, null, "Amount (DC)"), React.createElement(StyledInput, {
30667
30718
  type: "number",
30668
30719
  min: 1,
30669
30720
  value: amount,
@@ -30724,6 +30775,18 @@ var ErrorMessage = /*#__PURE__*/styled.div.withConfig({
30724
30775
  displayName: "DCTransferPanel__ErrorMessage",
30725
30776
  componentId: "sc-k1vvb1-6"
30726
30777
  })(["font-size:9px;color:", ";font-family:'Press Start 2P',cursive;"], uiColors.red);
30778
+ var AutocompleteWrapper = /*#__PURE__*/styled.div.withConfig({
30779
+ displayName: "DCTransferPanel__AutocompleteWrapper",
30780
+ componentId: "sc-k1vvb1-7"
30781
+ })(["position:relative;width:100%;"]);
30782
+ var DropdownList = /*#__PURE__*/styled.ul.withConfig({
30783
+ displayName: "DCTransferPanel__DropdownList",
30784
+ componentId: "sc-k1vvb1-8"
30785
+ })(["position:absolute;top:100%;left:0;right:0;background:rgba(10,10,30,0.95);border:1px solid #f59e0b;border-top:none;list-style:none;padding:0;margin:0;max-height:120px;overflow-y:auto;z-index:10;"]);
30786
+ var DropdownItem = /*#__PURE__*/styled.li.withConfig({
30787
+ displayName: "DCTransferPanel__DropdownItem",
30788
+ componentId: "sc-k1vvb1-9"
30789
+ })(["padding:6px 8px;font-size:11px;font-family:'Press Start 2P',cursive;color:", ";cursor:pointer;&:hover{background:rgba(245,158,11,0.3);}"], uiColors.white);
30727
30790
 
30728
30791
  var DCWalletModal = function DCWalletModal(_ref) {
30729
30792
  var _historyData$transact, _historyData$totalPag, _historyData$currentP;
@@ -30738,7 +30801,10 @@ var DCWalletModal = function DCWalletModal(_ref) {
30738
30801
  onClearTransferResult = _ref.onClearTransferResult,
30739
30802
  characterName = _ref.characterName,
30740
30803
  onInputFocus = _ref.onInputFocus,
30741
- onInputBlur = _ref.onInputBlur;
30804
+ onInputBlur = _ref.onInputBlur,
30805
+ onBuyDC = _ref.onBuyDC,
30806
+ onSearchCharacter = _ref.onSearchCharacter,
30807
+ searchResults = _ref.searchResults;
30742
30808
  var _useState = useState('balance'),
30743
30809
  activeTab = _useState[0],
30744
30810
  setActiveTab = _useState[1];
@@ -30748,7 +30814,10 @@ var DCWalletModal = function DCWalletModal(_ref) {
30748
30814
  var tabs = [{
30749
30815
  id: 'balance',
30750
30816
  title: 'Balance',
30751
- content: React.createElement(BalanceContent, null, React.createElement(BalanceLabel, null, "Your DC Balance"), React.createElement(BalanceAmount, null, dcBalance.toLocaleString(), " DC"), React.createElement(BalanceHint, null, "Buy DC packs from the Store > Packs tab."))
30817
+ content: React.createElement(BalanceContent, null, React.createElement(BalanceLabel, null, "Your DC Balance"), React.createElement(BalanceAmount, null, dcBalance.toLocaleString(), " DC"), onBuyDC && React.createElement(BuyButton, {
30818
+ onPointerDown: onBuyDC,
30819
+ title: "Buy Definya Coins"
30820
+ }, React.createElement(FaShoppingCart, null), React.createElement(BuyButtonLabel, null, "Buy DC")))
30752
30821
  }, {
30753
30822
  id: 'transfer',
30754
30823
  title: 'Transfer',
@@ -30760,7 +30829,9 @@ var DCWalletModal = function DCWalletModal(_ref) {
30760
30829
  onClearTransferResult: onClearTransferResult,
30761
30830
  characterName: characterName,
30762
30831
  onInputFocus: onInputFocus,
30763
- onInputBlur: onInputBlur
30832
+ onInputBlur: onInputBlur,
30833
+ onSearchCharacter: onSearchCharacter,
30834
+ searchResults: searchResults
30764
30835
  })
30765
30836
  }, {
30766
30837
  id: 'history',
@@ -30786,7 +30857,10 @@ var DCWalletModal = function DCWalletModal(_ref) {
30786
30857
  tabs: tabs,
30787
30858
  activeTab: activeTab,
30788
30859
  onTabChange: function onTabChange(tabId) {
30789
- return setActiveTab(tabId);
30860
+ setActiveTab(tabId);
30861
+ if (tabId === 'history') {
30862
+ onRequestHistory(1);
30863
+ }
30790
30864
  },
30791
30865
  activeTextColor: "#000000",
30792
30866
  activeColor: "#fef08a",
@@ -30835,10 +30909,14 @@ var BalanceAmount = /*#__PURE__*/styled.div.withConfig({
30835
30909
  displayName: "DCWalletModal__BalanceAmount",
30836
30910
  componentId: "sc-12xy88y-9"
30837
30911
  })(["font-family:'Press Start 2P',cursive;font-size:28px;color:#fef08a;text-shadow:2px 2px 0 #000;letter-spacing:2px;"]);
30838
- var BalanceHint = /*#__PURE__*/styled.span.withConfig({
30839
- displayName: "DCWalletModal__BalanceHint",
30912
+ var BuyButton = /*#__PURE__*/styled.button.withConfig({
30913
+ displayName: "DCWalletModal__BuyButton",
30840
30914
  componentId: "sc-12xy88y-10"
30841
- })(["font-family:'Press Start 2P',cursive;font-size:7px;color:", ";"], uiColors.lightGray);
30915
+ })(["display:flex;align-items:center;gap:8px;margin-top:8px;padding:10px 20px;background:#f59e0b;border:none;border-radius:6px;color:#000;cursor:pointer;font-size:1rem;&:hover{background:#fbbf24;}&:active{background:#d97706;}"]);
30916
+ var BuyButtonLabel = /*#__PURE__*/styled.span.withConfig({
30917
+ displayName: "DCWalletModal__BuyButtonLabel",
30918
+ componentId: "sc-12xy88y-11"
30919
+ })(["font-family:'Press Start 2P',cursive;font-size:8px;"]);
30842
30920
 
30843
30921
  var SimpleProgressBar = function SimpleProgressBar(_ref) {
30844
30922
  var value = _ref.value,