
### Table of Contents

*   [DEFAULT\_CURRENCY\_DENOMINATIONS][1]
*   [DEFAULT\_CURRENCY\_DENOMINATIONS][2]
    *   [Properties][3]
*   [DEFAULT\_CURRENCY\_DENOMINATIONS][4]
*   [makeChange][5]
*   [makeChange][6]
    *   [Parameters][7]
*   [createCompleteGURPSCoinItem][8]
    *   [Parameters][9]
*   [CARRIED\_PATH][10]
*   [readGGAList][11]
    *   [Parameters][12]
*   [upsertCoinGGA][13]
    *   [Parameters][14]
*   [CharacterCurrencyService][15]
    *   [Parameters][16]
    *   [getCharacterSheetCurrency][17]
        *   [Parameters][18]
    *   [getCharacterSheetCoinBreakdown][19]
        *   [Parameters][20]
    *   [setCharacterSheetCurrency][21]
        *   [Parameters][22]
    *   [addMoneyToCharacterCoins][23]
        *   [Parameters][24]
    *   [initializeMissingActorCoins][25]
    *   [refreshWalletApplications][26]
*   [VendorWalletSystem][27]
    *   [vendorDataManager][28]
    *   [transactionManager][29]
    *   [ID][30]
    *   [SOCKET][31]
    *   [currencyManager][32]
    *   [vendorDataManager][33]
    *   [transactionManager][34]
    *   [getUseModuleCurrencySystem][35]
    *   [initialize][36]
    *   [exposePublicAPI][37]
    *   [registerSocketListeners][38]
    *   [formatCurrency][39]
        *   [Parameters][40]
    *   [handleSocketEvent][41]
        *   [Parameters][42]
    *   [openAllAvailableVendors][43]
    *   [initializeMissingActorCoins][44]
    *   [refreshCurrencySettings][45]
*   [VendorWalletSystem][46]
    *   [vendorDataManager][47]
    *   [transactionManager][48]
    *   [ID][49]
    *   [SOCKET][50]
    *   [currencyManager][51]
    *   [vendorDataManager][52]
    *   [transactionManager][53]
    *   [getUseModuleCurrencySystem][54]
    *   [initialize][55]
    *   [exposePublicAPI][56]
    *   [registerSocketListeners][57]
    *   [formatCurrency][58]
        *   [Parameters][59]
    *   [handleSocketEvent][60]
        *   [Parameters][61]
    *   [openAllAvailableVendors][62]
    *   [initializeMissingActorCoins][63]
    *   [refreshCurrencySettings][64]
*   [VendorWalletSystem][65]
    *   [vendorDataManager][66]
    *   [transactionManager][67]
    *   [ID][68]
    *   [SOCKET][69]
    *   [currencyManager][70]
    *   [vendorDataManager][71]
    *   [transactionManager][72]
    *   [getUseModuleCurrencySystem][73]
    *   [initialize][74]
    *   [exposePublicAPI][75]
    *   [registerSocketListeners][76]
    *   [formatCurrency][77]
        *   [Parameters][78]
    *   [handleSocketEvent][79]
        *   [Parameters][80]
    *   [openAllAvailableVendors][81]
    *   [initializeMissingActorCoins][82]
    *   [refreshCurrencySettings][83]
*   [VendorWalletSystem][84]
    *   [vendorDataManager][85]
    *   [transactionManager][86]
    *   [ID][87]
    *   [SOCKET][88]
    *   [currencyManager][89]
    *   [vendorDataManager][90]
    *   [transactionManager][91]
    *   [getUseModuleCurrencySystem][92]
    *   [initialize][93]
    *   [exposePublicAPI][94]
    *   [registerSocketListeners][95]
    *   [formatCurrency][96]
        *   [Parameters][97]
    *   [handleSocketEvent][98]
        *   [Parameters][99]
    *   [openAllAvailableVendors][100]
    *   [initializeMissingActorCoins][101]
    *   [refreshCurrencySettings][102]
*   [VendorWalletSystem][103]
    *   [vendorDataManager][104]
    *   [transactionManager][105]
    *   [ID][106]
    *   [SOCKET][107]
    *   [currencyManager][108]
    *   [vendorDataManager][109]
    *   [transactionManager][110]
    *   [getUseModuleCurrencySystem][111]
    *   [initialize][112]
    *   [exposePublicAPI][113]
    *   [registerSocketListeners][114]
    *   [formatCurrency][115]
        *   [Parameters][116]
    *   [handleSocketEvent][117]
        *   [Parameters][118]
    *   [openAllAvailableVendors][119]
    *   [initializeMissingActorCoins][120]
    *   [refreshCurrencySettings][121]
*   [VendorWalletSystem][122]
    *   [vendorDataManager][123]
    *   [transactionManager][124]
    *   [ID][125]
    *   [SOCKET][126]
    *   [currencyManager][127]
    *   [vendorDataManager][128]
    *   [transactionManager][129]
    *   [getUseModuleCurrencySystem][130]
    *   [initialize][131]
    *   [exposePublicAPI][132]
    *   [registerSocketListeners][133]
    *   [formatCurrency][134]
        *   [Parameters][135]
    *   [handleSocketEvent][136]
        *   [Parameters][137]
    *   [openAllAvailableVendors][138]
    *   [initializeMissingActorCoins][139]
    *   [refreshCurrencySettings][140]
*   [VendorWalletSystem][141]
    *   [vendorDataManager][142]
    *   [transactionManager][143]
    *   [ID][144]
    *   [SOCKET][145]
    *   [currencyManager][146]
    *   [vendorDataManager][147]
    *   [transactionManager][148]
    *   [getUseModuleCurrencySystem][149]
    *   [initialize][150]
    *   [exposePublicAPI][151]
    *   [registerSocketListeners][152]
    *   [formatCurrency][153]
        *   [Parameters][154]
    *   [handleSocketEvent][155]
        *   [Parameters][156]
    *   [openAllAvailableVendors][157]
    *   [initializeMissingActorCoins][158]
    *   [refreshCurrencySettings][159]
*   [VendorWalletSystem][160]
    *   [vendorDataManager][161]
    *   [transactionManager][162]
    *   [ID][163]
    *   [SOCKET][164]
    *   [currencyManager][165]
    *   [vendorDataManager][166]
    *   [transactionManager][167]
    *   [getUseModuleCurrencySystem][168]
    *   [initialize][169]
    *   [exposePublicAPI][170]
    *   [registerSocketListeners][171]
    *   [formatCurrency][172]
        *   [Parameters][173]
    *   [handleSocketEvent][174]
        *   [Parameters][175]
    *   [openAllAvailableVendors][176]
    *   [initializeMissingActorCoins][177]
    *   [refreshCurrencySettings][178]
*   [VendorWalletSystem][179]
    *   [vendorDataManager][180]
    *   [transactionManager][181]
    *   [ID][182]
    *   [SOCKET][183]
    *   [currencyManager][184]
    *   [vendorDataManager][185]
    *   [transactionManager][186]
    *   [getUseModuleCurrencySystem][187]
    *   [initialize][188]
    *   [exposePublicAPI][189]
    *   [registerSocketListeners][190]
    *   [formatCurrency][191]
        *   [Parameters][192]
    *   [handleSocketEvent][193]
        *   [Parameters][194]
    *   [openAllAvailableVendors][195]
    *   [initializeMissingActorCoins][196]
    *   [refreshCurrencySettings][197]
*   [VendorWalletSystem][198]
    *   [vendorDataManager][199]
    *   [transactionManager][200]
    *   [ID][201]
    *   [SOCKET][202]
    *   [currencyManager][203]
    *   [vendorDataManager][204]
    *   [transactionManager][205]
    *   [getUseModuleCurrencySystem][206]
    *   [initialize][207]
    *   [exposePublicAPI][208]
    *   [registerSocketListeners][209]
    *   [formatCurrency][210]
        *   [Parameters][211]
    *   [handleSocketEvent][212]
        *   [Parameters][213]
    *   [openAllAvailableVendors][214]
    *   [initializeMissingActorCoins][215]
    *   [refreshCurrencySettings][216]
*   [VendorWalletSystem][217]
    *   [vendorDataManager][218]
    *   [transactionManager][219]
    *   [ID][220]
    *   [SOCKET][221]
    *   [currencyManager][222]
    *   [vendorDataManager][223]
    *   [transactionManager][224]
    *   [getUseModuleCurrencySystem][225]
    *   [initialize][226]
    *   [exposePublicAPI][227]
    *   [registerSocketListeners][228]
    *   [formatCurrency][229]
        *   [Parameters][230]
    *   [handleSocketEvent][231]
        *   [Parameters][232]
    *   [openAllAvailableVendors][233]
    *   [initializeMissingActorCoins][234]
    *   [refreshCurrencySettings][235]
*   [VendorWalletSystem][236]
    *   [vendorDataManager][237]
    *   [transactionManager][238]
    *   [ID][239]
    *   [SOCKET][240]
    *   [currencyManager][241]
    *   [vendorDataManager][242]
    *   [transactionManager][243]
    *   [getUseModuleCurrencySystem][244]
    *   [initialize][245]
    *   [exposePublicAPI][246]
    *   [registerSocketListeners][247]
    *   [formatCurrency][248]
        *   [Parameters][249]
    *   [handleSocketEvent][250]
        *   [Parameters][251]
    *   [openAllAvailableVendors][252]
    *   [initializeMissingActorCoins][253]
    *   [refreshCurrencySettings][254]
*   [VendorWalletSystem][255]
    *   [vendorDataManager][256]
    *   [transactionManager][257]
    *   [ID][258]
    *   [SOCKET][259]
    *   [currencyManager][260]
    *   [vendorDataManager][261]
    *   [transactionManager][262]
    *   [getUseModuleCurrencySystem][263]
    *   [initialize][264]
    *   [exposePublicAPI][265]
    *   [registerSocketListeners][266]
    *   [formatCurrency][267]
        *   [Parameters][268]
    *   [handleSocketEvent][269]
        *   [Parameters][270]
    *   [openAllAvailableVendors][271]
    *   [initializeMissingActorCoins][272]
    *   [refreshCurrencySettings][273]
*   [VendorWalletSystem][274]
    *   [vendorDataManager][275]
    *   [transactionManager][276]
    *   [ID][277]
    *   [SOCKET][278]
    *   [currencyManager][279]
    *   [vendorDataManager][280]
    *   [transactionManager][281]
    *   [getUseModuleCurrencySystem][282]
    *   [initialize][283]
    *   [exposePublicAPI][284]
    *   [registerSocketListeners][285]
    *   [formatCurrency][286]
        *   [Parameters][287]
    *   [handleSocketEvent][288]
        *   [Parameters][289]
    *   [openAllAvailableVendors][290]
    *   [initializeMissingActorCoins][291]
    *   [refreshCurrencySettings][292]
*   [CurrencySettingsApplication][293]
    *   [\_prepareContext][294]
    *   [\_onRender][295]
    *   [\_boundOnClickButton][296]
    *   [\_onClickContainer][297]
        *   [Parameters][298]
    *   [\_populateDenominationFields][299]
    *   [\_onClickButton][300]
        *   [Parameters][301]
    *   [\_onSubmitForm][302]
        *   [Parameters][303]
    *   [\_addCoinDenominationField][304]
        *   [Parameters][305]
    *   [\_updateWarningVisibility][306]
    *   [\_saveCurrencySettings][307]
    *   [close][308]
        *   [Parameters][309]
*   [container][310]
*   [\_populateDenominationFields][311]
*   [\_updateWarningVisibility][312]
*   [\_updateWarningVisibility][313]
*   [\_updateWarningVisibility][314]
*   [existingFields][315]
*   [denominations][316]
*   [processedDenominations][317]
*   [forEach][318]
*   [appendChild][319]
*   [addButton][320]
*   [addButton][321]
*   [field][322]
*   [name][323]
*   [name][324]
*   [isNaN][325]
*   [isNaN][326]
*   [sortedDenominations][327]
*   [values][328]
*   [set][329]
*   [refreshCurrencySettings][330]
*   [wasReordered][331]
*   [element][332]
*   [element][333]
*   [element][334]
*   [flattenItemsFromObject][335]
*   [flattenItemsFromObject][336]
    *   [Parameters][337]
*   [isNonNegInt][338]
    *   [Parameters][339]
*   [\_calculateBaseUnitMultiplier][340]
    *   [Parameters][341]
*   [valueFromCoins][342]
    *   [Parameters][343]
*   [normalizeCoins][344]
    *   [Parameters][345]
*   [CurrencyManager][346]
    *   [Parameters][347]
    *   [formatCurrency][348]
        *   [Parameters][349]
    *   [parseCurrency][350]
        *   [Parameters][351]
    *   [getUserWallet][352]
        *   [Parameters][353]
    *   [setUserWallet][354]
        *   [Parameters][355]
    *   [getModuleCurrencyBreakdown][356]
        *   [Parameters][357]
    *   [refreshSettings][358]
        *   [Parameters][359]
    *   [getActorWallet][360]
        *   [Parameters][361]
    *   [setActorWallet][362]
        *   [Parameters][363]
    *   [initializeMissingActorCoins][364]
*   [CurrencyManager][365]
    *   [formatCurrency][366]
        *   [Parameters][367]
    *   [parseCurrency][368]
        *   [Parameters][369]
    *   [getUserWallet][370]
        *   [Parameters][371]
    *   [setUserWallet][372]
        *   [Parameters][373]
    *   [getModuleCurrencyBreakdown][374]
        *   [Parameters][375]
    *   [refreshSettings][376]
        *   [Parameters][377]
    *   [getActorWallet][378]
        *   [Parameters][379]
    *   [setActorWallet][380]
        *   [Parameters][381]
    *   [initializeMissingActorCoins][382]
*   [CurrencyManager][383]
    *   [formatCurrency][384]
        *   [Parameters][385]
    *   [parseCurrency][386]
        *   [Parameters][387]
    *   [getUserWallet][388]
        *   [Parameters][389]
    *   [setUserWallet][390]
        *   [Parameters][391]
    *   [getModuleCurrencyBreakdown][392]
        *   [Parameters][393]
    *   [refreshSettings][394]
        *   [Parameters][395]
    *   [getActorWallet][396]
        *   [Parameters][397]
    *   [setActorWallet][398]
        *   [Parameters][399]
    *   [initializeMissingActorCoins][400]
*   [FormUtilities][401]
    *   [handleFilePicker][402]
        *   [Parameters][403]
    *   [validateStockRange][404]
        *   [Parameters][405]
    *   [validatePriceRange][406]
        *   [Parameters][407]
    *   [parseTLFilter][408]
        *   [Parameters][409]
    *   [parseLCFilter][410]
        *   [Parameters][411]
    *   [generateRandomItems][412]
        *   [Parameters][413]
*   [tlFilter][414]
*   [lcFilter][415]
*   [shuffled][416]
*   [MoneyManagementApplication][417]
    *   [\_boundOnClickButton][418]
    *   [\_prepareContext][419]
    *   [\_onRender][420]
    *   [\_cleanupListeners][421]
    *   [\_onClickButton][422]
        *   [Parameters][423]
    *   [\_applyToAllPlayers][424]
        *   [Parameters][425]
    *   [\_updateIndividualWallets][426]
        *   [Parameters][427]
    *   [close][428]
        *   [Parameters][429]
*   [MoneyManagementApplication][430]
    *   [\_boundOnClickButton][431]
    *   [\_prepareContext][432]
    *   [\_onRender][433]
    *   [\_cleanupListeners][434]
    *   [\_onClickButton][435]
        *   [Parameters][436]
    *   [\_applyToAllPlayers][437]
        *   [Parameters][438]
    *   [\_updateIndividualWallets][439]
        *   [Parameters][440]
    *   [close][441]
        *   [Parameters][442]
*   [GMToolsApplication][443]
    *   [\_onRender][444]
    *   [\_onClickTool][445]
        *   [Parameters][446]
*   [handleCanvasItemDrop][447]
    *   [Parameters][448]
*   [data][449]
*   [][450]
*   [targetToken][451]
*   [isOwner][452]
*   [vendorId][453]
*   [vendorId][454]
*   [vendorId][455]
*   [vendorId][456]
*   [api][457]
*   [mockElement][458]
*   [][459]
*   [][460]
*   [initializeItemDropHandling][461]
*   [initializeItemDropHandling][462]
*   [on][463]
*   [on][464]
*   [currencySettings][465]
*   [registerHelper][466]
*   [exposePublicAPI][467]
*   [applications][468]
*   [utils][469]
*   [formatCurrency][470]
    *   [Parameters][471]
*   [api][472]
*   [VendorWalletSystem][473]
*   [isGM][474]
*   [isGM][475]
*   [isGM][476]
*   [isGM][477]
*   [isGM][478]
*   [isGM][479]
*   [isGM][480]
*   [useModuleCurrency][481]
*   [useModuleCurrency][482]
*   [useModuleCurrency][483]
*   [once][484]
*   [initializeUIIntegrations][485]
*   [initializeUIIntegrations][486]
*   [][487]
*   [render][488]
*   [render][489]
*   [render][490]
*   [render][491]
*   [render][492]
*   [][493]
*   [actorList][494]
*   [\_cleanupListeners][495]
*   [\_cleanupListeners][496]
*   [\_cleanupListeners][497]
*   [\_cleanupListeners][498]
*   [addEventListener][499]
*   [addEventListener][500]
*   [addEventListener][501]
*   [allMoneyInput][502]
*   [title][503]
*   [PlayerWalletApplication][504]
    *   [\_boundOnSocketEvent][505]
    *   [setPosition][506]
        *   [Parameters][507]
    *   [\_prepareContext][508]
    *   [selectedActorId][509]
    *   [\_prepareSingleVendorContext][510]
        *   [Parameters][511]
    *   [\_prepareAllVendorsContext][512]
        *   [Parameters][513]
    *   [\_onDocumentClick][514]
        *   [Parameters][515]
    *   [\_onActorSelection][516]
        *   [Parameters][517]
    *   [\_onRender][518]
    *   [\_setupDropdown][519]
        *   [Parameters][520]
    *   [\_updateWindowTitle][521]
    *   [\_onBackToVendors][522]
        *   [Parameters][523]
    *   [\_cleanupListeners][524]
    *   [\_onClickVendor][525]
        *   [Parameters][526]
    *   [\_onSearchInput][527]
        *   [Parameters][528]
    *   [\_searchTimeout][529]
    *   [\_updateClearButtonVisibility][530]
    *   [\_onSocketEvent][531]
        *   [Parameters][532]
    *   [\_onItemSelection][533]
        *   [Parameters][534]
    *   [\_onPurchaseAction][535]
        *   [Parameters][536]
    *   [\_updatePurchaseDisplay][537]
    *   [\_clearSelection][538]
    *   [\_purchaseSelectedItems][539]
        *   [Parameters][540]
    *   [close][541]
        *   [Parameters][542]
    *   [\_onClickEditItem][543]
        *   [Parameters][544]
    *   [selectUserActor][545]
        *   [Parameters][546]
    *   [processClientPurchase][547]
        *   [Parameters][548]
*   [PlayerWalletApplication][549]
    *   [\_boundOnSocketEvent][550]
    *   [setPosition][551]
        *   [Parameters][552]
    *   [\_prepareContext][553]
    *   [selectedActorId][554]
    *   [\_prepareSingleVendorContext][555]
        *   [Parameters][556]
    *   [\_prepareAllVendorsContext][557]
        *   [Parameters][558]
    *   [\_onDocumentClick][559]
        *   [Parameters][560]
    *   [\_onActorSelection][561]
        *   [Parameters][562]
    *   [\_onRender][563]
    *   [\_setupDropdown][564]
        *   [Parameters][565]
    *   [\_updateWindowTitle][566]
    *   [\_onBackToVendors][567]
        *   [Parameters][568]
    *   [\_cleanupListeners][569]
    *   [\_onClickVendor][570]
        *   [Parameters][571]
    *   [\_onSearchInput][572]
        *   [Parameters][573]
    *   [\_searchTimeout][574]
    *   [\_updateClearButtonVisibility][575]
    *   [\_onSocketEvent][576]
        *   [Parameters][577]
    *   [\_onItemSelection][578]
        *   [Parameters][579]
    *   [\_onPurchaseAction][580]
        *   [Parameters][581]
    *   [\_updatePurchaseDisplay][582]
    *   [\_clearSelection][583]
    *   [\_purchaseSelectedItems][584]
        *   [Parameters][585]
    *   [close][586]
        *   [Parameters][587]
    *   [\_onClickEditItem][588]
        *   [Parameters][589]
    *   [selectUserActor][590]
        *   [Parameters][591]
    *   [processClientPurchase][592]
        *   [Parameters][593]
*   [actorsData][594]
*   [vendor][595]
*   [vendor][596]
*   [filteredVendor][597]
    *   [items][598]
*   [searchTerm][599]
*   [searchTerm][600]
*   [\_updateWindowTitle][601]
*   [\_socketRegistered][602]
*   [actorRadios][603]
*   [searchInput][604]
*   [backButton][605]
*   [\_updateClearButtonVisibility][606]
*   [allDropdowns][607]
*   [\_documentClickListenerAdded][608]
*   [\_documentClickListenerAdded][609]
*   [titleElement][610]
*   [titleElement][611]
*   [clearTimeout][612]
*   [clearTimeout][613]
*   [toggle][614]
*   [userId][615]
*   [setTimeout][616]
*   [selectedCountElement][617]
*   [selectedCountElement][618]
*   [totalPrice][619]
*   [checkboxes][620]
*   [][621]
*   [userActors][622]
*   [preselectedActorId][623]
*   [actorChoices][624]
*   [][625]
*   [checkbox][626]
*   [targetActor][627]
*   [actorWallet][628]
*   [totalCost][629]
*   [item][630]
*   [PurchaseApprovalDialog][631]
    *   [\_prepareContext][632]
    *   [\_onRender][633]
    *   [\_onClickButton][634]
        *   [Parameters][635]
    *   [close][636]
        *   [Parameters][637]
*   [approveBtn][638]
*   [approveBtn][639]
*   [approveBtn][640]
*   [approveBtn][641]
*   [dialogContent][642]
*   [dialogContent][643]
*   [\_resolve][644]
*   [\_resolve][645]
*   [][646]
*   [SellApprovalDialog][647]
    *   [\_prepareContext][648]
    *   [\_onRender][649]
    *   [\_onClickButton][650]
        *   [Parameters][651]
    *   [close][652]
        *   [Parameters][653]
*   [slider][654]
*   [updatePayment][655]
*   [updatePayment][656]
*   [][657]
*   [SellItemsApplication][658]
    *   [setPosition][659]
        *   [Parameters][660]
    *   [\_prepareContext][661]
    *   [\_getPlayerItems][662]
    *   [\_onRender][663]
    *   [\_onDocumentClick][664]
        *   [Parameters][665]
    *   [\_onActorSelection][666]
        *   [Parameters][667]
    *   [\_onSearchInput][668]
        *   [Parameters][669]
    *   [\_updateClearButtonVisibility][670]
    *   [\_onSocketEvent][671]
        *   [Parameters][672]
    *   [\_onItemSelection][673]
        *   [Parameters][674]
    *   [\_onSellAction][675]
        *   [Parameters][676]
    *   [\_updateSellDisplay][677]
    *   [\_clearSelection][678]
    *   [\_sellSelectedItems][679]
    *   [\_cleanupListeners][680]
    *   [close][681]
        *   [Parameters][682]
*   [registerModuleSettings][683]
    *   [Parameters][684]
*   [SOCKET\_EVENTS][685]
*   [SOCKET\_EVENTS][686]
*   [SOCKET\_EVENTS][687]
*   [findItemInCarried][688]
*   [findItemInCarried][689]
    *   [Parameters][690]
*   [TransactionManager][691]
    *   [sendPurchaseRequestToGM][692]
        *   [Parameters][693]
    *   [processDirectPurchase][694]
        *   [Parameters][695]
    *   [processPlayerPurchaseRequest][696]
        *   [Parameters][697]
    *   [emitPurchaseResult][698]
        *   [Parameters][699]
    *   [processPlayerSellRequest][700]
        *   [Parameters][701]
    *   [emitSellResult][702]
        *   [Parameters][703]
    *   [addItemToActor][704]
        *   [Parameters][705]
*   [Promise][706]
*   [addPlayerWalletButton][707]
    *   [Parameters][708]
*   [recurselist][709]
    *   [Parameters][710]
*   [getOwnedPlayerActors][711]
    *   [Parameters][712]
*   [getPrimaryUserActor][713]
    *   [Parameters][714]
*   [getProcessedPlayerActorsData][715]
    *   [Parameters][716]
*   [validateItemData][717]
    *   [Parameters][718]
*   [getItemFromPath][719]
    *   [Parameters][720]
*   [deleteFoundryItem][721]
    *   [Parameters][722]
*   [VendorCreationApplication][723]
    *   [\_prepareContext][724]
    *   [\_onRender][725]
    *   [\_setupCurrencyListeners][726]
    *   [\_onClickFilePicker][727]
        *   [Parameters][728]
    *   [\_onSubmitForm][729]
        *   [Parameters][730]
    *   [\_onClickButton][731]
        *   [Parameters][732]
    *   [\_createVendor][733]
    *   [close][734]
        *   [Parameters][735]
*   [VendorDataManager][736]
    *   [getVendors][737]
    *   [getVendor][738]
        *   [Parameters][739]
    *   [updateVendor][740]
        *   [Parameters][741]
    *   [deleteVendor][742]
        *   [Parameters][743]
    *   [updateItemQuantityInVendor][744]
        *   [Parameters][745]
    *   [findVendorByItemUuid][746]
        *   [Parameters][747]
*   [VendorDisplayApplication][748]
    *   [\_updatePosition][749]
        *   [Parameters][750]
    *   [\_prepareContext][751]
    *   [\_onRender][752]
    *   [\_onClickEditItem][753]
        *   [Parameters][754]
    *   [\_onPurchaseItem][755]
        *   [Parameters][756]
    *   [close][757]
        *   [Parameters][758]
    *   [refreshDisplays][759]
        *   [Parameters][760]
*   [VendorEditApplication][761]
    *   [setPosition][762]
        *   [Parameters][763]
    *   [\_updatePosition][764]
        *   [Parameters][765]
    *   [\_prepareContext][766]
    *   [\_onRender][767]
    *   [\_setupCurrencyListeners][768]
    *   [close][769]
        *   [Parameters][770]
    *   [\_onClickFilePicker][771]
        *   [Parameters][772]
    *   [\_onSubmitForm][773]
        *   [Parameters][774]
    *   [\_onClickButton][775]
        *   [Parameters][776]
    *   [\_updateVendor][777]
*   [VendorItemEditApplication][778]
    *   [\_prepareContext][779]
    *   [\_onRender][780]
    *   [\_onSubmitForm][781]
        *   [Parameters][782]
    *   [\_onClickButton][783]
        *   [Parameters][784]
    *   [\_updateItem][785]
    *   [\_removeItem][786]
        *   [Parameters][787]
*   [VendorManagerApplication][788]
    *   [\_prepareContext][789]
    *   [\_onRender][790]
    *   [close][791]
        *   [Parameters][792]
    *   [\_onClickAction][793]
        *   [Parameters][794]
    *   [\_deleteVendor][795]
        *   [Parameters][796]
    *   [\_toggleVendorActive][797]
        *   [Parameters][798]
    *   [refreshVendors][799]

## DEFAULT\_CURRENCY\_DENOMINATIONS

Centralized constants to ensure consistency across the module

## DEFAULT\_CURRENCY\_DENOMINATIONS

Default currency denominations with exact weights
This is the single source of truth for default values

Type: [Array][800]<[Object][801]>

### Properties

*   `name` **[string][802]** The name of the currency denomination
*   `value` **[number][803]** The value of the denomination in base currency units
*   `weight` **[number][803]** The weight of a single coin in pounds

## DEFAULT\_CURRENCY\_DENOMINATIONS

Handles all module settings registration for FoundryVTT

## makeChange

Centralized service for managing currency items directly on character sheets (GURPS/GGA)

## makeChange

Makes change for a given total using optimal coin distribution

### Parameters

*   `total` **[number][803]** The total amount to make change for
*   `denominations` **[Array][800]** Array of denomination objects sorted by value (descending) (optional, default `null`)

<!---->

*   Throws **[Error][804]** If total is invalid or denominations array is missing

Returns **[Object][801]** Object mapping coin names to quantities

## createCompleteGURPSCoinItem

(Optional) Builds complete currency data. Useful for direct initializations.
In the GGA flow below, we use Equipment/toItemData and internalUpdate.

### Parameters

*   `denomination` **[Object][801]** The currency denomination object
*   `count` **[number][803]** The initial count for the coin (optional, default `0`)

Returns **[Object][801]** Complete GURPS coin item data

## CARRIED\_PATH

Path to the carried items list in the GURPS character sheet.

Type: [string][802]

## readGGAList

Reads the GGA list from the specified path.

### Parameters

*   `actor` **Actor**&#x20;
*   `path` **[string][802]**  (optional, default `CARRIED_PATH`)

Returns **[Object][801]<[string][802], any>** The GGA list object

## upsertCoinGGA

Upserts a coin via GGA. Maintains a single item per denomination, removes duplicates and preserves placeholder with count=0.
Creates Foundry Item when `gurps.use-foundry-items` is active.

### Parameters

*   `actor` **Actor**&#x20;
*   `denomination` **[Object][801]** Currency denomination object { name, value, weight, ... }
*   `count` **[number][803]**&#x20;
*   `path` **[string][802]?** Path to the equipment list (optional, default `CARRIED_PATH`)

Returns **[Promise][706]\<void>**&#x20;

## CharacterCurrencyService

Service for managing character currency operations

### Parameters

*   `moduleId` **[string][802]**&#x20;
*   `baseUnitMultiplier` **[number][803]**&#x20;

### getCharacterSheetCurrency

Calculates total currency in nominal value.

#### Parameters

*   `actorId` **[string][802]**&#x20;

Returns **[number][803]** Total currency value

### getCharacterSheetCoinBreakdown

Breaks down currency by denomination. Always returns all denominations.

#### Parameters

*   `actorId` **[string][802]**&#x20;

Returns **[Array][800]<{name: [string][802], count: [number][803], value: [number][803], itemIds: [Array][800]<[string][802]>}>** Array of denomination breakdowns

### setCharacterSheetCurrency

Sets the total currency amount. Distributes via makeChange. Preserves placeholder.

#### Parameters

*   `actorId` **[string][802]**&#x20;
*   `newAmount` **[number][803]**&#x20;

Returns **[Promise][706]<[boolean][805]>** True if successful

### addMoneyToCharacterCoins

Increments or decrements money and rewrites distribution.

#### Parameters

*   `actor` **Actor**&#x20;
*   `amount` **[number][803]**&#x20;

Returns **[Promise][706]\<void>**&#x20;

### initializeMissingActorCoins

Ensures placeholder (count=0) for every missing denomination in all player actors.

Returns **[Promise][706]\<void>**&#x20;

### refreshWalletApplications

Refreshes related application windows.

Returns **void**&#x20;

## VendorWalletSystem

Allows GMs to define currency names and denominations for the module's wallet system

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Provides common form functionality for vendor creation and editing

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Handles drag and drop operations for vendor item purchases

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Core class that manages the vendor and wallet system functionality

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Allows Game Masters to add or remove money from player wallets

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Custom dialog for GMs to approve or decline player purchase requests

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Custom dialog for GMs to approve or decline player sell requests, with percentage adjustment

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Allows players to select and sell items from their inventory

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Common utility functions used across multiple files

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Allows GMs to create new vendors with randomly selected items from compendiums

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Displays vendor inventory with purchase functionality

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Allows GMs to edit vendor properties and optionally regenerate items

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Allows GMs to edit individual items within a vendor's inventory

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## VendorWalletSystem

Allows GMs to view, edit, and delete existing vendors

### vendorDataManager

Initialize vendor data manager

### transactionManager

Initialize transaction manager

### ID

Type: [string][802]

### SOCKET

Type: [string][802]

### currencyManager

Type: [CurrencyManager][32]

### vendorDataManager

Type: [VendorDataManager][28]

### transactionManager

Type: [TransactionManager][29]

### getUseModuleCurrencySystem

Static getters for centralized settings access

### initialize

Initializes the module by registering settings, socket listeners, and handlebars helpers

Returns **void**&#x20;

### exposePublicAPI

Exposes the public API for external access

Returns **void**&#x20;

### registerSocketListeners

Registers socket event listeners for real-time communication

Returns **void**&#x20;

### formatCurrency

Convenience methods for accessing manager functionality

#### Parameters

*   `amount` &#x20;

### handleSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### openAllAvailableVendors

Opens the player wallet application showing all available vendors

Returns **void**&#x20;

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

### refreshCurrencySettings

Refreshes currency manager settings when they change

Returns **void**&#x20;

## CurrencySettingsApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Application for managing currency settings

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_boundOnClickButton

Bind event handlers for later removal

### \_onClickContainer

Handles clicks within the coin denominations container (event delegation)

#### Parameters

*   `event` **[Event][806]** The click event

### \_populateDenominationFields

Populates the denomination fields with saved data

### \_onClickButton

Handles button clicks for various actions

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_onSubmitForm

Handles form submission

#### Parameters

*   `event` **[Event][806]** The submit event

Returns **[Promise][706]\<void>**&#x20;

### \_addCoinDenominationField

Adds a new set of input fields for a coin denomination

#### Parameters

*   `name` **[string][802]** Pre-fill name value (optional, default `''`)
*   `value` **[number][803]** Pre-fill value (optional, default `0.01`)
*   `weight` **[number][803]** Pre-fill weight value (optional, default `0`)

### \_updateWarningVisibility

Updates the visibility of the warning message based on denomination count

### \_saveCurrencySettings

Saves the currency settings after validation

Returns **[Promise][706]\<void>**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

## container

Use event delegation for dynamically added remove buttons

## \_populateDenominationFields

Populate denomination fields with saved data

## \_updateWarningVisibility

Update warning visibility after initial render

## \_updateWarningVisibility

Update warning visibility

## \_updateWarningVisibility

Update warning visibility after adding field

## existingFields

Clear existing dynamic fields (keep the notes and warning)

## denominations

Load saved currency denominations or use defaults

## processedDenominations

Ensure all denominations have a weight property with proper default

## forEach

Add fields for each saved denomination

## appendChild

Insert the new field at the end of the container

## addButton

Try multiple selectors to find the add button

## addButton

Always show add button - no limit on denominations

## field

Collect and validate denominations

## name

Validate name

## name

Handle radio button changes

## isNaN

Validate value

## isNaN

Validate weight

## sortedDenominations

Sort by value (descending) and validate order

## values

Validate that values are different

## set

Save the denominations (sorted by value descending)

## refreshCurrencySettings

Refresh CurrencyManager settings after saving

## wasReordered

Notify user if we had to reorder denominations

## element

Clean up event listeners to prevent memory leaks

## element

Check if element still exists before clearing selection

## element

Clear selection and refresh if successful

## flattenItemsFromObject

Core currency management system with wallet operations and denomination handling

## flattenItemsFromObject

Recursively flattens items from GURPS equipment structure with validation

### Parameters

*   `obj` **[Object][801]** The equipment object to flatten

Returns **[Array][800]** Array of flattened items

## isNonNegInt

Validates if a number is a non-negative integer

### Parameters

*   `n` **[number][803]** The number to validate

Returns **[boolean][805]** True if the number is a non-negative integer

## \_calculateBaseUnitMultiplier

Calculates the base unit multiplier for currency denominations

### Parameters

*   `denominations` **[Array][800]** Array of denomination objects with value properties

Returns **[number][803]** The multiplier needed to convert all values to integers

## valueFromCoins

Calculates the total value of coins based on denominations

### Parameters

*   `coins` **[Object][801]** Object mapping coin names to quantities (optional, default `{}`)
*   `denominations` **[Array][800]** Array of denomination objects (optional, default `null`)

<!---->

*   Throws **[Error][804]** If denominations array is missing or coin quantities are invalid

Returns **[number][803]** Total value of all coins

## normalizeCoins

Normalizes coins to optimal distribution

### Parameters

*   `coins` **[Object][801]** Object mapping coin names to quantities
*   `denominations` **[Array][800]** Array of denomination objects (optional, default `null`)

Returns **[Object][801]** Normalized coin distribution

## CurrencyManager

Currency manager for integrating wallets with Foundry actors and settings

### Parameters

*   `moduleId` **[string][802]** Module identifier used for settings keys
*   `settings` **[Object][801]** Configuration settings object (optional, default `{}`)

### formatCurrency

Formats a currency amount for display

#### Parameters

*   `amount` **[number][803]** The amount to format

Returns **[string][802]** Formatted currency string

### parseCurrency

Parses a currency string into a numeric value

#### Parameters

*   `value` **([string][802] | [number][803])** The value to parse

Returns **[number][803]** Parsed numeric value

### getUserWallet

Gets a user's wallet balance

#### Parameters

*   `userId` **[string][802]** The user ID

Returns **[number][803]** The user's wallet balance

### setUserWallet

Sets a user's wallet balance

#### Parameters

*   `userId` **[string][802]** The user ID
*   `amount` **[number][803]** The new wallet amount

Returns **[Promise][706]<[boolean][805]>** True if successful

### getModuleCurrencyBreakdown

Gets a breakdown of module currency by denomination

#### Parameters

*   `userId` **[string][802]** The user ID

Returns **[Array][800]** Array of denomination breakdown objects

### refreshSettings

Refreshes the currency manager settings

#### Parameters

*   `newSettings` **[Object][801]** New settings to apply (optional, default `{}`)

### getActorWallet

Gets an actor's wallet balance

#### Parameters

*   `actorId` **[string][802]** The actor ID

Returns **[number][803]** The actor's wallet balance

### setActorWallet

Sets an actor's wallet balance

#### Parameters

*   `actorId` **[string][802]** The actor ID
*   `amount` **[number][803]** The new wallet amount

Returns **[Promise][706]<[boolean][805]>** True if successful

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

## CurrencyManager

Provides core functionality for managing vendors, player wallets, and item transactions in FoundryVTT

### formatCurrency

Formats a currency amount for display

#### Parameters

*   `amount` **[number][803]** The amount to format

Returns **[string][802]** Formatted currency string

### parseCurrency

Parses a currency string into a numeric value

#### Parameters

*   `value` **([string][802] | [number][803])** The value to parse

Returns **[number][803]** Parsed numeric value

### getUserWallet

Gets a user's wallet balance

#### Parameters

*   `userId` **[string][802]** The user ID

Returns **[number][803]** The user's wallet balance

### setUserWallet

Sets a user's wallet balance

#### Parameters

*   `userId` **[string][802]** The user ID
*   `amount` **[number][803]** The new wallet amount

Returns **[Promise][706]<[boolean][805]>** True if successful

### getModuleCurrencyBreakdown

Gets a breakdown of module currency by denomination

#### Parameters

*   `userId` **[string][802]** The user ID

Returns **[Array][800]** Array of denomination breakdown objects

### refreshSettings

Refreshes the currency manager settings

#### Parameters

*   `newSettings` **[Object][801]** New settings to apply (optional, default `{}`)

### getActorWallet

Gets an actor's wallet balance

#### Parameters

*   `actorId` **[string][802]** The actor ID

Returns **[number][803]** The actor's wallet balance

### setActorWallet

Sets an actor's wallet balance

#### Parameters

*   `actorId` **[string][802]** The actor ID
*   `amount` **[number][803]** The new wallet amount

Returns **[Promise][706]<[boolean][805]>** True if successful

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

## CurrencyManager

Import dependencies

### formatCurrency

Formats a currency amount for display

#### Parameters

*   `amount` **[number][803]** The amount to format

Returns **[string][802]** Formatted currency string

### parseCurrency

Parses a currency string into a numeric value

#### Parameters

*   `value` **([string][802] | [number][803])** The value to parse

Returns **[number][803]** Parsed numeric value

### getUserWallet

Gets a user's wallet balance

#### Parameters

*   `userId` **[string][802]** The user ID

Returns **[number][803]** The user's wallet balance

### setUserWallet

Sets a user's wallet balance

#### Parameters

*   `userId` **[string][802]** The user ID
*   `amount` **[number][803]** The new wallet amount

Returns **[Promise][706]<[boolean][805]>** True if successful

### getModuleCurrencyBreakdown

Gets a breakdown of module currency by denomination

#### Parameters

*   `userId` **[string][802]** The user ID

Returns **[Array][800]** Array of denomination breakdown objects

### refreshSettings

Refreshes the currency manager settings

#### Parameters

*   `newSettings` **[Object][801]** New settings to apply (optional, default `{}`)

### getActorWallet

Gets an actor's wallet balance

#### Parameters

*   `actorId` **[string][802]** The actor ID

Returns **[number][803]** The actor's wallet balance

### setActorWallet

Sets an actor's wallet balance

#### Parameters

*   `actorId` **[string][802]** The actor ID
*   `amount` **[number][803]** The new wallet amount

Returns **[Promise][706]<[boolean][805]>** True if successful

### initializeMissingActorCoins

Initializes missing currency denominations for all actors without affecting existing coins

Returns **[Promise][706]\<void>**&#x20;

## FormUtilities

Utility class containing common form functions for vendor applications

### handleFilePicker

Handles file picker button clicks

#### Parameters

*   `event` **[Event][806]** The click event
*   `element` **[HTMLElement][807]** The form element containing the file picker

Returns **[Promise][706]\<void>**&#x20;

### validateStockRange

Validates stock range values

#### Parameters

*   `stockMin` **[number][803]** Minimum stock value
*   `stockMax` **[number][803]** Maximum stock value

Returns **[boolean][805]** True if valid, false otherwise

### validatePriceRange

Validates price range values

#### Parameters

*   `minValue` **[number][803]** Minimum price value
*   `maxValue` **[number][803]** Maximum price value

Returns **[boolean][805]** True if valid, false otherwise

### parseTLFilter

Parses TL filter string into array

#### Parameters

*   `tlFilterRaw` **[string][802]** Raw TL filter string

Returns **([Array][800] | null)** Parsed TL filter array or null

### parseLCFilter

Parses LC filter value

#### Parameters

*   `lcFilterValue` **[string][802]** Raw LC filter value

Returns **([number][803] | null)** Parsed LC filter value or null

### generateRandomItems

Generates random items for a vendor based on the provided criteria

#### Parameters

*   `vendorData` **[Object][801]** The vendor configuration data

Returns **[Promise][706]<[Array][800]>** Array of generated vendor items

## tlFilter

Apply TL filter if specified

## lcFilter

Apply LC filter if specified

## shuffled

Randomly select items

## MoneyManagementApplication

Main application that provides access to money management, vendor creation, and vendor management

### \_boundOnClickButton

Bind event handler for later removal

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing actor wallet data

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_cleanupListeners

Cleans up event listeners to prevent duplicates

Returns **void**&#x20;

### \_onClickButton

Handles button clicks for updating player wallets

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_applyToAllPlayers

Applies the same amount to all actor wallets

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_updateIndividualWallets

Updates individual actor wallets based on their input fields

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

## MoneyManagementApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Application for managing player money (GM only)

### \_boundOnClickButton

Bind event handler for later removal

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing actor wallet data

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_cleanupListeners

Cleans up event listeners to prevent duplicates

Returns **void**&#x20;

### \_onClickButton

Handles button clicks for updating player wallets

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_applyToAllPlayers

Applies the same amount to all actor wallets

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_updateIndividualWallets

Updates individual actor wallets based on their input fields

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

## GMToolsApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Main GM tools application that provides access to all GM functionality

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_onClickTool

Handles tool button clicks to open specific applications

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

## handleCanvasItemDrop

Handles item drop events for vendor purchases on canvas

### Parameters

*   `canvas` **Canvas** The canvas where the drop occurred
*   `data` **([Object][801] | [string][802])** The drop data

Returns **[Promise][706]<[boolean][805]>** True to allow default behavior, false to prevent it

## data

Handle case where data might be a string (from dataTransfer)

##

Let Foundry handle it normally

## targetToken

Get the target actor (if any)

## isOwner

Check if user has permission to modify this actor

## vendorId

Check if this item comes from a vendor using drag data

## vendorId

Check if we're displaying a specific vendor or all vendors

## vendorId

Check if we're displaying a specific vendor or all vendors

## vendorId

Only re-render if we're still displaying the same vendor

## api

Get the API from the module to access PlayerWalletApplication

## mockElement

Create a mock element with quantity input for the purchase system

##

Prevent default item drop behavior

##

Regular item drop, let Foundry handle it normally

## initializeItemDropHandling

Initializes item drop handling by registering hooks

Returns **void**&#x20;

## initializeItemDropHandling

Initialize item drop handling

## on

Hook for handling item drops on canvas

## on

/shop command without dependencies (Foundry v13 core)

## currencySettings

Initialize currency manager with settings

## registerHelper

Register the formatCurrency helper to ensure it's always available

## exposePublicAPI

Expose public API immediately after initialization

## applications

Application classes for external use

## utils

Utility functions

## formatCurrency

Convenience methods for common operations

### Parameters

*   `amount` &#x20;

## api

Expose API following Foundry VTT best practices

## VendorWalletSystem

Also make it globally accessible for convenience

## isGM

Only GMs can reset actor coins

## isGM

Not /shop → let it pass

## isGM

Command action

## isGM

Only GMs can manage actor money

## isGM

Only GMs can manage actor money

## isGM

Single vendor display - add item-specific listeners

## isGM

If user is GM, process directly; otherwise send request to GM

## useModuleCurrency

Check if module currency system is enabled

## useModuleCurrency

Check if denominations are configured when not using module currency

## useModuleCurrency

Check if denominations are configured when not using module currency

## once

Initialize the system when FoundryVTT is ready

## initializeUIIntegrations

Initialize UI integrations

## initializeUIIntegrations

Initializes UI integrations by registering hooks

Returns **void**&#x20;

##

Block default processing and the message in chat

## render

Not /sell → let it pass

## render

Command action

## render

Re-render the application to show updated values

## render

Re-render the application to show updated values and reset input fields

## render

Reset search when switching vendors

##

Block default processing and the message in chat

## actorList

Get actors with their wallet balances (now async)

## \_cleanupListeners

Clean up any existing listeners first

## \_cleanupListeners

Clean up event listeners to prevent memory leaks

## \_cleanupListeners

Clean up any existing listeners first

## \_cleanupListeners

Clean up listeners

## addEventListener

Add the event listener using the bound function

## addEventListener

Add purchase system for players

## addEventListener

All vendors display - add vendor selection listeners

## allMoneyInput

Reset the all money input field to 0

## title

Also update the options for future renders

## PlayerWalletApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Application for displaying player wallet and available vendors

### \_boundOnSocketEvent

Bind event handlers for later removal

### setPosition

Ensure the application does not attempt to reposition if its element has
already been removed from the DOM. This avoids errors when the window is
closed before Foundry finishes rendering or measuring dimensions.

#### Parameters

*   `args` **...any** Position arguments

Returns **any** Result of setPosition or undefined if element is not in DOM

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing vendor(s), wallet, and user data

### selectedActorId

Update the internal selectedActorId

### \_prepareSingleVendorContext

Prepares context for displaying a single vendor's items

#### Parameters

*   `vendor` **[Object][801]** The vendor data
*   `selectedActor` **[Object][801]** The selected actor data
*   `useModuleCurrency` **[boolean][805]** Whether module currency is enabled
*   `userActors` **[Array][800]** Array of user's actors

Returns **[Object][801]** Context object for single vendor display

### \_prepareAllVendorsContext

Prepares context for displaying all available vendors

#### Parameters

*   `selectedActor` **[Object][801]** The selected actor data
*   `useModuleCurrency` **[boolean][805]** Whether module currency is enabled
*   `userActors` **[Array][800]** Array of user's actors

Returns **[Object][801]** Context object for all vendors display

### \_onDocumentClick

Handles document clicks to close dropdowns

#### Parameters

*   `e` **[Event][806]** The click event

Returns **void**&#x20;

### \_onActorSelection

Handles actor selection changes

#### Parameters

*   `event` **[Event][806]** The change event

Returns **void**&#x20;

### \_onRender

Handles rendering events by setting up event listeners

Returns **[Promise][706]\<void>**&#x20;

### \_setupDropdown

Sets up dropdown functionality

#### Parameters

*   `dropdownSelector` **[string][802]?** Optional selector for specific dropdown

Returns **void**&#x20;

### \_updateWindowTitle

Updates the window title based on current view

Returns **void**&#x20;

### \_onBackToVendors

Handles back to vendors button click

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### \_cleanupListeners

Cleans up event listeners to prevent duplicates

Returns **void**&#x20;

### \_onClickVendor

Handles vendor selection clicks when displaying all vendors

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### \_onSearchInput

Handles search input with debouncing

#### Parameters

*   `event` **[Event][806]** The input event

Returns **void**&#x20;

### \_searchTimeout

Set a new timeout to debounce the search

### \_updateClearButtonVisibility

Updates the visibility of the clear search button

Returns **void**&#x20;

### \_onSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### \_onItemSelection

Handles item selection changes for purchase calculation

#### Parameters

*   `event` **[Event][806]** The change event

Returns **void**&#x20;

### \_onPurchaseAction

Handles purchase action button clicks

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### \_updatePurchaseDisplay

Updates the purchase display with selected items count and total price

Returns **void**&#x20;

### \_clearSelection

Clears all item selections

Returns **void**&#x20;

### \_purchaseSelectedItems

Processes the purchase of selected items using centralized logic

#### Parameters

*   `checkboxes` **[Array][800]<[HTMLElement][807]>** The selected checkboxes

Returns **[Promise][706]\<void>**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

### \_onClickEditItem

Handles edit item button clicks (GM only)

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### selectUserActor

Selects a user actor for transactions, handling multiple actor scenarios

#### Parameters

*   `userId` **[string][802]?** The user ID to get actors for (defaults to current user) (optional, default `game.user.id`)
*   `preselectedActorId` **[string][802]?** Pre-selected actor ID to use (optional, default `null`)

Returns **[Promise][706]<(Actor | null)>** The selected actor or null if none found/selected

### processClientPurchase

Centralized client-side purchase processing

#### Parameters

*   `options` **[Object][801]** Purchase options

    *   `options.vendorId` **[string][802]** The vendor ID
    *   `options.checkboxes` **[Array][800]<[HTMLElement][807]>** Selected item checkboxes
    *   `options.element` **[HTMLElement][807]** The DOM element containing the items
    *   `options.userId` **[string][802]?** The user ID (defaults to current user) (optional, default `game.user.id`)
    *   `options.actorId` **[string][802]?** The actor ID to use for the purchase (optional, default `null`)

Returns **[Promise][706]\<void>**&#x20;

## PlayerWalletApplication

Handles UI modifications and integrations with FoundryVTT interface

### \_boundOnSocketEvent

Bind event handlers for later removal

### setPosition

Ensure the application does not attempt to reposition if its element has
already been removed from the DOM. This avoids errors when the window is
closed before Foundry finishes rendering or measuring dimensions.

#### Parameters

*   `args` **...any** Position arguments

Returns **any** Result of setPosition or undefined if element is not in DOM

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing vendor(s), wallet, and user data

### selectedActorId

Update the internal selectedActorId

### \_prepareSingleVendorContext

Prepares context for displaying a single vendor's items

#### Parameters

*   `vendor` **[Object][801]** The vendor data
*   `selectedActor` **[Object][801]** The selected actor data
*   `useModuleCurrency` **[boolean][805]** Whether module currency is enabled
*   `userActors` **[Array][800]** Array of user's actors

Returns **[Object][801]** Context object for single vendor display

### \_prepareAllVendorsContext

Prepares context for displaying all available vendors

#### Parameters

*   `selectedActor` **[Object][801]** The selected actor data
*   `useModuleCurrency` **[boolean][805]** Whether module currency is enabled
*   `userActors` **[Array][800]** Array of user's actors

Returns **[Object][801]** Context object for all vendors display

### \_onDocumentClick

Handles document clicks to close dropdowns

#### Parameters

*   `e` **[Event][806]** The click event

Returns **void**&#x20;

### \_onActorSelection

Handles actor selection changes

#### Parameters

*   `event` **[Event][806]** The change event

Returns **void**&#x20;

### \_onRender

Handles rendering events by setting up event listeners

Returns **[Promise][706]\<void>**&#x20;

### \_setupDropdown

Sets up dropdown functionality

#### Parameters

*   `dropdownSelector` **[string][802]?** Optional selector for specific dropdown

Returns **void**&#x20;

### \_updateWindowTitle

Updates the window title based on current view

Returns **void**&#x20;

### \_onBackToVendors

Handles back to vendors button click

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### \_cleanupListeners

Cleans up event listeners to prevent duplicates

Returns **void**&#x20;

### \_onClickVendor

Handles vendor selection clicks when displaying all vendors

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### \_onSearchInput

Handles search input with debouncing

#### Parameters

*   `event` **[Event][806]** The input event

Returns **void**&#x20;

### \_searchTimeout

Set a new timeout to debounce the search

### \_updateClearButtonVisibility

Updates the visibility of the clear search button

Returns **void**&#x20;

### \_onSocketEvent

Handles socket events from other clients

#### Parameters

*   `data` **[Object][801]** The socket event data

Returns **void**&#x20;

### \_onItemSelection

Handles item selection changes for purchase calculation

#### Parameters

*   `event` **[Event][806]** The change event

Returns **void**&#x20;

### \_onPurchaseAction

Handles purchase action button clicks

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### \_updatePurchaseDisplay

Updates the purchase display with selected items count and total price

Returns **void**&#x20;

### \_clearSelection

Clears all item selections

Returns **void**&#x20;

### \_purchaseSelectedItems

Processes the purchase of selected items using centralized logic

#### Parameters

*   `checkboxes` **[Array][800]<[HTMLElement][807]>** The selected checkboxes

Returns **[Promise][706]\<void>**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

### \_onClickEditItem

Handles edit item button clicks (GM only)

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### selectUserActor

Selects a user actor for transactions, handling multiple actor scenarios

#### Parameters

*   `userId` **[string][802]?** The user ID to get actors for (defaults to current user) (optional, default `game.user.id`)
*   `preselectedActorId` **[string][802]?** Pre-selected actor ID to use (optional, default `null`)

Returns **[Promise][706]<(Actor | null)>** The selected actor or null if none found/selected

### processClientPurchase

Centralized client-side purchase processing

#### Parameters

*   `options` **[Object][801]** Purchase options

    *   `options.vendorId` **[string][802]** The vendor ID
    *   `options.checkboxes` **[Array][800]<[HTMLElement][807]>** Selected item checkboxes
    *   `options.element` **[HTMLElement][807]** The DOM element containing the items
    *   `options.userId` **[string][802]?** The user ID (defaults to current user) (optional, default `game.user.id`)
    *   `options.actorId` **[string][802]?** The actor ID to use for the purchase (optional, default `null`)

Returns **[Promise][706]\<void>**&#x20;

## actorsData

Get processed actors data using the utility function

## vendor

If vendor doesn't exist, fall back to showing all vendors

## vendor

Collect selected items data

## filteredVendor

Start with a shallow copy to avoid mutating the original vendor

### items

Clone items without altering their prices

## searchTerm

Filter items based on search term

## searchTerm

Maintain focus and cursor position after render

## \_updateWindowTitle

Update window title based on current view

## \_socketRegistered

Register socket listener for purchase results once

## actorRadios

Add actor selection listeners for radio buttons

## searchInput

Add search functionality for single vendor view

## backButton

Add back to vendors button listener

## \_updateClearButtonVisibility

Update clear button visibility

## allDropdowns

Close other dropdowns

## \_documentClickListenerAdded

Add document click listener only once

## \_documentClickListenerAdded

Clean up document click listener

## titleElement

Update the window title to show vendor name

## titleElement

Reset to default title

## clearTimeout

Clear any pending search timeout

## clearTimeout

Clear any existing timeout

## toggle

Toggle the 'hidden' class based on whether searchTerm is empty

## userId

Only handle events for this user

## setTimeout

Force a complete re-render to update wallet display

## selectedCountElement

Check if we're in vendor view and elements exist

## selectedCountElement

If elements don't exist (e.g., not in vendor view), return early

## totalPrice

Round up the total price

## checkboxes

Safety check

##

Pass the selected actor ID

## userActors

Get user's actors with Owner permission

## preselectedActorId

If we have a preselected actor ID, use it

## actorChoices

Multiple actors - show selection dialog

##

User cancelled the dialog

## checkbox

Validate quantities first

## targetActor

Select target actor using centralized logic with preselected actor

## actorWallet

Check actor's wallet (not user's wallet)

## totalCost

Check if actor has enough money BEFORE sending to GM

## item

Log the full names of selected items for debugging

## PurchaseApprovalDialog

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Dialog for GM to approve or decline a player's purchase request

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_onClickButton

Handles button clicks for approval/decline

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

## approveBtn

Only add click listeners to the buttons, not the entire element

## approveBtn

Clean up specific button listeners

## approveBtn

Only add click listeners to the buttons, not the entire element

## approveBtn

Clean up specific button listeners

## dialogContent

Prevent dialog closing when clicking on content areas

## dialogContent

Prevent dialog closing when clicking on content areas

## \_resolve

If the dialog is closed without a button click (e.g., by pressing ESC or clicking outside) we should resolve with false to indicate no approval.

## \_resolve

If the dialog is closed without a button click (e.g., by pressing ESC or clicking outside) we should resolve with false to indicate no approval.

##

Prevent multiple calls

## SellApprovalDialog

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Dialog for GM to approve or decline a player's sell request

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_onClickButton

Handles button clicks for approval/decline

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

## slider

Setup slider and input synchronization

## updatePayment

Prevent dialog closing when clicking on controls

## updatePayment

Initial update

##

Prevent multiple calls

## SellItemsApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Application for selling player items

### setPosition

Ensure the application does not attempt to reposition if its element has
already been removed from the DOM. This avoids errors when the window is
closed before Foundry finishes rendering or measuring dimensions.

#### Parameters

*   `args` **...any** Position arguments

Returns **any** Result of setPosition or undefined if element is not in DOM

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing items, wallet, and settings data

### \_getPlayerItems

Gets sellable items from the player's character

Returns **[Promise][706]<[Array][800]>** Array of sellable items

### \_onRender

Handles rendering events by setting up event listeners

### \_onDocumentClick

Handles document clicks to close dropdowns

#### Parameters

*   `e` **[Event][806]** The click event

### \_onActorSelection

Handles actor selection changes

#### Parameters

*   `event` **[Event][806]** The change event

### \_onSearchInput

Handles search input with debouncing

#### Parameters

*   `event` **[Event][806]** The input event

### \_updateClearButtonVisibility

Updates the visibility of the clear search button

### \_onSocketEvent

Handles socket events from GM

#### Parameters

*   `data` **[Object][801]** The socket event data

### \_onItemSelection

Handles item selection changes for sell calculation

#### Parameters

*   `event` **[Event][806]** The change event

### \_onSellAction

Handles sell action button clicks

#### Parameters

*   `event` **[Event][806]** The click event

### \_updateSellDisplay

Updates the sell display with selected items count and total value

### \_clearSelection

Clears all item selections

### \_sellSelectedItems

Processes the sale of selected items

### \_cleanupListeners

Cleans up event listeners to prevent duplicates

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

## registerModuleSettings

Registers all module settings with FoundryVTT

### Parameters

*   `moduleId` **[string][802]** The module identifier

Returns **void**&#x20;

## SOCKET\_EVENTS

Centralized constants for socket event types to ensure consistency and reduce typos

## SOCKET\_EVENTS

Socket event types used throughout the module

Type: [string][802]

## SOCKET\_EVENTS

Manages vendor data storage, retrieval, and updates

## findItemInCarried

Manages all transaction-related operations including purchases, sales, and item transfers

## findItemInCarried

Recursively finds an item in the carried equipment structure

### Parameters

*   `carried` **[Object][801]** The carried equipment object
*   `itemId` **[string][802]** The item ID to find
*   `currentPath` **[string][802]** Current path in the structure (optional, default `''`)

Returns **([string][802] | null)** The path to the item or null if not found

## TransactionManager

Handles all transaction operations for the vendor wallet system

### sendPurchaseRequestToGM

Sends a purchase request to the GM via socket (for players)

#### Parameters

*   `targetActor` **Actor** The target actor
*   `vendorId` **[string][802]** The vendor ID
*   `selectedItems` **[Array][800]** Selected items data
*   `userId` **[string][802]** The user ID

Returns **[Promise][706]\<void>**&#x20;

### processDirectPurchase

Processes purchase directly (for GM users)

#### Parameters

*   `targetActor` **Actor** The target actor
*   `vendorId` **[string][802]** The vendor ID
*   `selectedItems` **[Array][800]** Selected items data

Returns **[Promise][706]\<void>**&#x20;

### processPlayerPurchaseRequest

Processes a player's purchase request (GM only)

#### Parameters

*   `data` **[Object][801]** Purchase request data containing userId, actorId, vendorId, and selectedItems

Returns **[Promise][706]\<void>**&#x20;

### emitPurchaseResult

Emits a purchase result to the specified user

#### Parameters

*   `userId` **[string][802]** The user ID to send the result to
*   `success` **[boolean][805]** Whether the purchase was successful
*   `message` **[string][802]** The message to display
*   `data` **[Object][801]** Additional data to include (optional, default `{}`)

### processPlayerSellRequest

Processes a player's sell request (GM only)

#### Parameters

*   `data` **[Object][801]** Sell request data containing userId, actorId, and selectedItems

Returns **[Promise][706]\<void>**&#x20;

### emitSellResult

Emits a sell result to the specified user

#### Parameters

*   `userId` **[string][802]** The user ID to send the result to
*   `success` **[boolean][805]** Whether the sell was successful
*   `message` **[string][802]** The message to display
*   `data` **[Object][801]** Additional data to include (optional, default `{}`)

### addItemToActor

Adds an item to an actor's inventory with proper quantity handling

#### Parameters

*   `actor` **Actor** The target actor
*   `uuid` **[string][802]** The item UUID
*   `quantity` **[number][803]** The quantity to add

Returns **[Promise][706]<[boolean][805]>** True if successful, false otherwise

## Promise

WORKAROUND: Wait a tick to ensure the item was fully created and processed.
This is necessary due to the asynchronous nature of FoundryVTT's item creation APIs.
The item needs to be fully integrated into the actor's data structure before we can
reliably update its quantity. Without this delay, quantity updates may fail silently
or be overwritten by the item creation process.

## addPlayerWalletButton

Adds a wallet button to the player list interface

### Parameters

*   `app` **Application** The FoundryVTT application
*   `html` **jQuery** The HTML element

Returns **void**&#x20;

## recurselist

Recursively iterates through a list structure with error handling

### Parameters

*   `list` **[Object][801]** The list to iterate through
*   `callback` **[Function][808]** Callback function (element, key, depth)
*   `depth` **[number][803]** Current depth (internal use) (optional, default `0`)

## getOwnedPlayerActors

Gets all actors owned by a specific user with at least owner permission

### Parameters

*   `userId` **[string][802]** The user ID to get actors for (optional, default `game.user.id`)

Returns **[Array][800]\<Actor>** Array of actors owned by the user

## getPrimaryUserActor

Gets the primary actor for a user, handling single/multiple actor scenarios

### Parameters

*   `userId` **[string][802]** The user ID to get actor for (optional, default `game.user.id`)

Returns **(Actor | null)** The primary actor or null if none found

## getProcessedPlayerActorsData

Gets processed player actors data with wallet information and coin breakdown

### Parameters

*   `currentSelectedActorId` **[string][802]?** Currently selected actor ID (optional, default `null`)

Returns **[Promise][706]<[Object][801]>** Object containing processed actors data

## validateItemData

Safely validates equipment data to prevent undefined name errors

### Parameters

*   `item` **[Object][801]** The item object to validate

Returns **[boolean][805]** True if item has valid data, false otherwise

## getItemFromPath

Gets an item from a path in the carried equipment structure with validation

### Parameters

*   `carried` **[Object][801]** The carried equipment object
*   `path` **[string][802]** The path to the item

Returns **([Object][801] | null)** The item data or null if not found

## deleteFoundryItem

Deletes a Foundry item with proper cleanup and error handling

### Parameters

*   `actor` **Actor** The actor to delete from
*   `itemPath` **[string][802]** The item path in the carried equipment structure

Returns **[Promise][706]\<void>**&#x20;

## VendorCreationApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Application for creating new vendors with configurable parameters

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing available compendiums

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_setupCurrencyListeners

Sets up listeners for currency input fields to format values

Returns **void**&#x20;

### \_onClickFilePicker

Handles file picker button clicks

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_onSubmitForm

Handles form submission

#### Parameters

*   `event` **[Event][806]** The submit event

Returns **[Promise][706]\<void>**&#x20;

### \_onClickButton

Handles button clicks for various actions

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_createVendor

Creates a new vendor with the form data

Returns **[Promise][706]\<void>**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

## VendorDataManager

Handles all vendor data operations

### getVendors

Gets all vendors from settings

Returns **[Object][801]** Object containing all vendors

### getVendor

Gets a specific vendor by ID

#### Parameters

*   `vendorId` **[string][802]** The vendor ID

Returns **([Object][801] | [undefined][809])** The vendor object or undefined if not found

### updateVendor

Updates a vendor's data

#### Parameters

*   `vendorId` **[string][802]** The vendor ID
*   `vendorData` **[Object][801]** The updated vendor data

Returns **[Promise][706]<[boolean][805]>** True if successful, false otherwise

### deleteVendor

Deletes a vendor

#### Parameters

*   `vendorId` **[string][802]** The vendor ID

Returns **[Promise][706]<[boolean][805]>** True if successful, false otherwise

### updateItemQuantityInVendor

Updates item quantity in a vendor's inventory

#### Parameters

*   `vendorId` **[string][802]** The vendor ID
*   `vendorItemId` **[string][802]** The vendor item ID
*   `change` **[number][803]** The quantity change (positive or negative)

Returns **[Promise][706]<[boolean][805]>** True if successful, false otherwise

### findVendorByItemUuid

Finds a vendor that contains an item with the specified UUID

#### Parameters

*   `itemUuid` **[string][802]** The item UUID to search for

Returns **([Object][801] | null)** Object with vendor and item data, or null if not found

## VendorDisplayApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Application for displaying vendor items to players

### \_updatePosition

Prevents position update errors when element is removed from DOM

#### Parameters

*   `args` **...any** Position arguments

Returns **any** Result of \_updatePosition or undefined if element is not in DOM

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing vendor and user data

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_onClickEditItem

Handles edit item button clicks (GM only)

#### Parameters

*   `event` **[Event][806]** The click event

Returns **void**&#x20;

### \_onPurchaseItem

Handles item purchase clicks

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

### refreshDisplays

Static method to refresh all vendor displays for a specific vendor

#### Parameters

*   `vendorId` **[string][802]** The vendor ID to refresh displays for

Returns **void**&#x20;

## VendorEditApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Application for editing existing vendor data and settings

### setPosition

Prevents positioning errors when element is removed from DOM

#### Parameters

*   `args` **...any** Position arguments

Returns **any** Result of setPosition or undefined if element is not in DOM

### \_updatePosition

Prevents position update errors when element is removed from DOM

#### Parameters

*   `args` **...any** Position arguments

Returns **any** Result of \_updatePosition or undefined if element is not in DOM

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing vendor and compendium data

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_setupCurrencyListeners

Sets up listeners for currency input fields to format values

Returns **void**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

### \_onClickFilePicker

Handles file picker button clicks

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_onSubmitForm

Handles form submission

#### Parameters

*   `event` **[Event][806]** The submit event

Returns **[Promise][706]\<void>**&#x20;

### \_onClickButton

Handles update button clicks

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_updateVendor

Updates the vendor with form data

Returns **[Promise][706]\<void>**&#x20;

## VendorItemEditApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Application for editing individual vendor items

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing item and vendor data

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### \_onSubmitForm

Handles form submission

#### Parameters

*   `event` **[Event][806]** The submit event

Returns **[Promise][706]\<void>**&#x20;

### \_onClickButton

Handles button clicks for various actions

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_updateItem

Updates the item with form data

Returns **[Promise][706]\<void>**&#x20;

### \_removeItem

Remove the item from the vendor after user confirmation.

#### Parameters

*   `event` **[Event][806]** Click event that initiated the removal.

Returns **[Promise][706]\<void>** Resolves once the item has been removed.

## VendorManagerApplication

**Extends foundry.applications.api.HandlebarsApplicationMixin**

Application for managing existing vendors

### \_prepareContext

Prepares the context data for rendering the template

Returns **[Promise][706]<[Object][801]>** Context object containing vendors data

### \_onRender

Handles rendering events by setting up event listeners

Returns **void**&#x20;

### close

Closes the application and cleans up event listeners

#### Parameters

*   `options` **[Object][801]** Close options

Returns **[Promise][706]\<any>** Result of the parent close method

### \_onClickAction

Handles action button clicks

#### Parameters

*   `event` **[Event][806]** The click event

Returns **[Promise][706]\<void>**&#x20;

### \_deleteVendor

Deletes a vendor after confirmation

#### Parameters

*   `vendorId` **[string][802]** The vendor ID to delete

Returns **[Promise][706]\<void>**&#x20;

### \_toggleVendorActive

Toggles a vendor's active status

#### Parameters

*   `vendorId` **[string][802]** The vendor ID to toggle

Returns **[Promise][706]\<void>**&#x20;

### refreshVendors

Static method to refresh all open vendor manager applications

Returns **void**&#x20;

[1]: #default_currency_denominations

[2]: #default_currency_denominations-1

[3]: #properties

[4]: #default_currency_denominations-2

[5]: #makechange

[6]: #makechange-1

[7]: #parameters

[8]: #createcompletegurpscoinitem

[9]: #parameters-1

[10]: #carried_path

[11]: #readggalist

[12]: #parameters-2

[13]: #upsertcoingga

[14]: #parameters-3

[15]: #charactercurrencyservice

[16]: #parameters-4

[17]: #getcharactersheetcurrency

[18]: #parameters-5

[19]: #getcharactersheetcoinbreakdown

[20]: #parameters-6

[21]: #setcharactersheetcurrency

[22]: #parameters-7

[23]: #addmoneytocharactercoins

[24]: #parameters-8

[25]: #initializemissingactorcoins

[26]: #refreshwalletapplications

[27]: #vendorwalletsystem

[28]: #vendordatamanager

[29]: #transactionmanager

[30]: #id

[31]: #socket

[32]: #currencymanager

[33]: #vendordatamanager-1

[34]: #transactionmanager-1

[35]: #getusemodulecurrencysystem

[36]: #initialize

[37]: #exposepublicapi

[38]: #registersocketlisteners

[39]: #formatcurrency

[40]: #parameters-9

[41]: #handlesocketevent

[42]: #parameters-10

[43]: #openallavailablevendors

[44]: #initializemissingactorcoins-1

[45]: #refreshcurrencysettings

[46]: #vendorwalletsystem-1

[47]: #vendordatamanager-2

[48]: #transactionmanager-2

[49]: #id-1

[50]: #socket-1

[51]: #currencymanager-1

[52]: #vendordatamanager-3

[53]: #transactionmanager-3

[54]: #getusemodulecurrencysystem-1

[55]: #initialize-1

[56]: #exposepublicapi-1

[57]: #registersocketlisteners-1

[58]: #formatcurrency-1

[59]: #parameters-11

[60]: #handlesocketevent-1

[61]: #parameters-12

[62]: #openallavailablevendors-1

[63]: #initializemissingactorcoins-2

[64]: #refreshcurrencysettings-1

[65]: #vendorwalletsystem-2

[66]: #vendordatamanager-4

[67]: #transactionmanager-4

[68]: #id-2

[69]: #socket-2

[70]: #currencymanager-2

[71]: #vendordatamanager-5

[72]: #transactionmanager-5

[73]: #getusemodulecurrencysystem-2

[74]: #initialize-2

[75]: #exposepublicapi-2

[76]: #registersocketlisteners-2

[77]: #formatcurrency-2

[78]: #parameters-13

[79]: #handlesocketevent-2

[80]: #parameters-14

[81]: #openallavailablevendors-2

[82]: #initializemissingactorcoins-3

[83]: #refreshcurrencysettings-2

[84]: #vendorwalletsystem-3

[85]: #vendordatamanager-6

[86]: #transactionmanager-6

[87]: #id-3

[88]: #socket-3

[89]: #currencymanager-3

[90]: #vendordatamanager-7

[91]: #transactionmanager-7

[92]: #getusemodulecurrencysystem-3

[93]: #initialize-3

[94]: #exposepublicapi-3

[95]: #registersocketlisteners-3

[96]: #formatcurrency-3

[97]: #parameters-15

[98]: #handlesocketevent-3

[99]: #parameters-16

[100]: #openallavailablevendors-3

[101]: #initializemissingactorcoins-4

[102]: #refreshcurrencysettings-3

[103]: #vendorwalletsystem-4

[104]: #vendordatamanager-8

[105]: #transactionmanager-8

[106]: #id-4

[107]: #socket-4

[108]: #currencymanager-4

[109]: #vendordatamanager-9

[110]: #transactionmanager-9

[111]: #getusemodulecurrencysystem-4

[112]: #initialize-4

[113]: #exposepublicapi-4

[114]: #registersocketlisteners-4

[115]: #formatcurrency-4

[116]: #parameters-17

[117]: #handlesocketevent-4

[118]: #parameters-18

[119]: #openallavailablevendors-4

[120]: #initializemissingactorcoins-5

[121]: #refreshcurrencysettings-4

[122]: #vendorwalletsystem-5

[123]: #vendordatamanager-10

[124]: #transactionmanager-10

[125]: #id-5

[126]: #socket-5

[127]: #currencymanager-5

[128]: #vendordatamanager-11

[129]: #transactionmanager-11

[130]: #getusemodulecurrencysystem-5

[131]: #initialize-5

[132]: #exposepublicapi-5

[133]: #registersocketlisteners-5

[134]: #formatcurrency-5

[135]: #parameters-19

[136]: #handlesocketevent-5

[137]: #parameters-20

[138]: #openallavailablevendors-5

[139]: #initializemissingactorcoins-6

[140]: #refreshcurrencysettings-5

[141]: #vendorwalletsystem-6

[142]: #vendordatamanager-12

[143]: #transactionmanager-12

[144]: #id-6

[145]: #socket-6

[146]: #currencymanager-6

[147]: #vendordatamanager-13

[148]: #transactionmanager-13

[149]: #getusemodulecurrencysystem-6

[150]: #initialize-6

[151]: #exposepublicapi-6

[152]: #registersocketlisteners-6

[153]: #formatcurrency-6

[154]: #parameters-21

[155]: #handlesocketevent-6

[156]: #parameters-22

[157]: #openallavailablevendors-6

[158]: #initializemissingactorcoins-7

[159]: #refreshcurrencysettings-6

[160]: #vendorwalletsystem-7

[161]: #vendordatamanager-14

[162]: #transactionmanager-14

[163]: #id-7

[164]: #socket-7

[165]: #currencymanager-7

[166]: #vendordatamanager-15

[167]: #transactionmanager-15

[168]: #getusemodulecurrencysystem-7

[169]: #initialize-7

[170]: #exposepublicapi-7

[171]: #registersocketlisteners-7

[172]: #formatcurrency-7

[173]: #parameters-23

[174]: #handlesocketevent-7

[175]: #parameters-24

[176]: #openallavailablevendors-7

[177]: #initializemissingactorcoins-8

[178]: #refreshcurrencysettings-7

[179]: #vendorwalletsystem-8

[180]: #vendordatamanager-16

[181]: #transactionmanager-16

[182]: #id-8

[183]: #socket-8

[184]: #currencymanager-8

[185]: #vendordatamanager-17

[186]: #transactionmanager-17

[187]: #getusemodulecurrencysystem-8

[188]: #initialize-8

[189]: #exposepublicapi-8

[190]: #registersocketlisteners-8

[191]: #formatcurrency-8

[192]: #parameters-25

[193]: #handlesocketevent-8

[194]: #parameters-26

[195]: #openallavailablevendors-8

[196]: #initializemissingactorcoins-9

[197]: #refreshcurrencysettings-8

[198]: #vendorwalletsystem-9

[199]: #vendordatamanager-18

[200]: #transactionmanager-18

[201]: #id-9

[202]: #socket-9

[203]: #currencymanager-9

[204]: #vendordatamanager-19

[205]: #transactionmanager-19

[206]: #getusemodulecurrencysystem-9

[207]: #initialize-9

[208]: #exposepublicapi-9

[209]: #registersocketlisteners-9

[210]: #formatcurrency-9

[211]: #parameters-27

[212]: #handlesocketevent-9

[213]: #parameters-28

[214]: #openallavailablevendors-9

[215]: #initializemissingactorcoins-10

[216]: #refreshcurrencysettings-9

[217]: #vendorwalletsystem-10

[218]: #vendordatamanager-20

[219]: #transactionmanager-20

[220]: #id-10

[221]: #socket-10

[222]: #currencymanager-10

[223]: #vendordatamanager-21

[224]: #transactionmanager-21

[225]: #getusemodulecurrencysystem-10

[226]: #initialize-10

[227]: #exposepublicapi-10

[228]: #registersocketlisteners-10

[229]: #formatcurrency-10

[230]: #parameters-29

[231]: #handlesocketevent-10

[232]: #parameters-30

[233]: #openallavailablevendors-10

[234]: #initializemissingactorcoins-11

[235]: #refreshcurrencysettings-10

[236]: #vendorwalletsystem-11

[237]: #vendordatamanager-22

[238]: #transactionmanager-22

[239]: #id-11

[240]: #socket-11

[241]: #currencymanager-11

[242]: #vendordatamanager-23

[243]: #transactionmanager-23

[244]: #getusemodulecurrencysystem-11

[245]: #initialize-11

[246]: #exposepublicapi-11

[247]: #registersocketlisteners-11

[248]: #formatcurrency-11

[249]: #parameters-31

[250]: #handlesocketevent-11

[251]: #parameters-32

[252]: #openallavailablevendors-11

[253]: #initializemissingactorcoins-12

[254]: #refreshcurrencysettings-11

[255]: #vendorwalletsystem-12

[256]: #vendordatamanager-24

[257]: #transactionmanager-24

[258]: #id-12

[259]: #socket-12

[260]: #currencymanager-12

[261]: #vendordatamanager-25

[262]: #transactionmanager-25

[263]: #getusemodulecurrencysystem-12

[264]: #initialize-12

[265]: #exposepublicapi-12

[266]: #registersocketlisteners-12

[267]: #formatcurrency-12

[268]: #parameters-33

[269]: #handlesocketevent-12

[270]: #parameters-34

[271]: #openallavailablevendors-12

[272]: #initializemissingactorcoins-13

[273]: #refreshcurrencysettings-12

[274]: #vendorwalletsystem-13

[275]: #vendordatamanager-26

[276]: #transactionmanager-26

[277]: #id-13

[278]: #socket-13

[279]: #currencymanager-13

[280]: #vendordatamanager-27

[281]: #transactionmanager-27

[282]: #getusemodulecurrencysystem-13

[283]: #initialize-13

[284]: #exposepublicapi-13

[285]: #registersocketlisteners-13

[286]: #formatcurrency-13

[287]: #parameters-35

[288]: #handlesocketevent-13

[289]: #parameters-36

[290]: #openallavailablevendors-13

[291]: #initializemissingactorcoins-14

[292]: #refreshcurrencysettings-13

[293]: #currencysettingsapplication

[294]: #_preparecontext

[295]: #_onrender

[296]: #_boundonclickbutton

[297]: #_onclickcontainer

[298]: #parameters-37

[299]: #_populatedenominationfields

[300]: #_onclickbutton

[301]: #parameters-38

[302]: #_onsubmitform

[303]: #parameters-39

[304]: #_addcoindenominationfield

[305]: #parameters-40

[306]: #_updatewarningvisibility

[307]: #_savecurrencysettings

[308]: #close

[309]: #parameters-41

[310]: #container

[311]: #_populatedenominationfields-1

[312]: #_updatewarningvisibility-1

[313]: #_updatewarningvisibility-2

[314]: #_updatewarningvisibility-3

[315]: #existingfields

[316]: #denominations

[317]: #processeddenominations

[318]: #foreach

[319]: #appendchild

[320]: #addbutton

[321]: #addbutton-1

[322]: #field

[323]: #name

[324]: #name-1

[325]: #isnan

[326]: #isnan-1

[327]: #sorteddenominations

[328]: #values

[329]: #set

[330]: #refreshcurrencysettings-14

[331]: #wasreordered

[332]: #element

[333]: #element-1

[334]: #element-2

[335]: #flattenitemsfromobject

[336]: #flattenitemsfromobject-1

[337]: #parameters-42

[338]: #isnonnegint

[339]: #parameters-43

[340]: #_calculatebaseunitmultiplier

[341]: #parameters-44

[342]: #valuefromcoins

[343]: #parameters-45

[344]: #normalizecoins

[345]: #parameters-46

[346]: #currencymanager-14

[347]: #parameters-47

[348]: #formatcurrency-14

[349]: #parameters-48

[350]: #parsecurrency

[351]: #parameters-49

[352]: #getuserwallet

[353]: #parameters-50

[354]: #setuserwallet

[355]: #parameters-51

[356]: #getmodulecurrencybreakdown

[357]: #parameters-52

[358]: #refreshsettings

[359]: #parameters-53

[360]: #getactorwallet

[361]: #parameters-54

[362]: #setactorwallet

[363]: #parameters-55

[364]: #initializemissingactorcoins-15

[365]: #currencymanager-15

[366]: #formatcurrency-15

[367]: #parameters-56

[368]: #parsecurrency-1

[369]: #parameters-57

[370]: #getuserwallet-1

[371]: #parameters-58

[372]: #setuserwallet-1

[373]: #parameters-59

[374]: #getmodulecurrencybreakdown-1

[375]: #parameters-60

[376]: #refreshsettings-1

[377]: #parameters-61

[378]: #getactorwallet-1

[379]: #parameters-62

[380]: #setactorwallet-1

[381]: #parameters-63

[382]: #initializemissingactorcoins-16

[383]: #currencymanager-16

[384]: #formatcurrency-16

[385]: #parameters-64

[386]: #parsecurrency-2

[387]: #parameters-65

[388]: #getuserwallet-2

[389]: #parameters-66

[390]: #setuserwallet-2

[391]: #parameters-67

[392]: #getmodulecurrencybreakdown-2

[393]: #parameters-68

[394]: #refreshsettings-2

[395]: #parameters-69

[396]: #getactorwallet-2

[397]: #parameters-70

[398]: #setactorwallet-2

[399]: #parameters-71

[400]: #initializemissingactorcoins-17

[401]: #formutilities

[402]: #handlefilepicker

[403]: #parameters-72

[404]: #validatestockrange

[405]: #parameters-73

[406]: #validatepricerange

[407]: #parameters-74

[408]: #parsetlfilter

[409]: #parameters-75

[410]: #parselcfilter

[411]: #parameters-76

[412]: #generaterandomitems

[413]: #parameters-77

[414]: #tlfilter

[415]: #lcfilter

[416]: #shuffled

[417]: #moneymanagementapplication

[418]: #_boundonclickbutton-1

[419]: #_preparecontext-1

[420]: #_onrender-1

[421]: #_cleanuplisteners

[422]: #_onclickbutton-1

[423]: #parameters-78

[424]: #_applytoallplayers

[425]: #parameters-79

[426]: #_updateindividualwallets

[427]: #parameters-80

[428]: #close-1

[429]: #parameters-81

[430]: #moneymanagementapplication-1

[431]: #_boundonclickbutton-2

[432]: #_preparecontext-2

[433]: #_onrender-2

[434]: #_cleanuplisteners-1

[435]: #_onclickbutton-2

[436]: #parameters-82

[437]: #_applytoallplayers-1

[438]: #parameters-83

[439]: #_updateindividualwallets-1

[440]: #parameters-84

[441]: #close-2

[442]: #parameters-85

[443]: #gmtoolsapplication

[444]: #_onrender-3

[445]: #_onclicktool

[446]: #parameters-86

[447]: #handlecanvasitemdrop

[448]: #parameters-87

[449]: #data

[450]: #

[451]: #targettoken

[452]: #isowner

[453]: #vendorid

[454]: #vendorid-1

[455]: #vendorid-2

[456]: #vendorid-3

[457]: #api

[458]: #mockelement

[459]: #-1

[460]: #-2

[461]: #initializeitemdrophandling

[462]: #initializeitemdrophandling-1

[463]: #on

[464]: #on-1

[465]: #currencysettings

[466]: #registerhelper

[467]: #exposepublicapi-14

[468]: #applications

[469]: #utils

[470]: #formatcurrency-17

[471]: #parameters-88

[472]: #api-1

[473]: #vendorwalletsystem-14

[474]: #isgm

[475]: #isgm-1

[476]: #isgm-2

[477]: #isgm-3

[478]: #isgm-4

[479]: #isgm-5

[480]: #isgm-6

[481]: #usemodulecurrency

[482]: #usemodulecurrency-1

[483]: #usemodulecurrency-2

[484]: #once

[485]: #initializeuiintegrations

[486]: #initializeuiintegrations-1

[487]: #-3

[488]: #render

[489]: #render-1

[490]: #render-2

[491]: #render-3

[492]: #render-4

[493]: #-4

[494]: #actorlist

[495]: #_cleanuplisteners-2

[496]: #_cleanuplisteners-3

[497]: #_cleanuplisteners-4

[498]: #_cleanuplisteners-5

[499]: #addeventlistener

[500]: #addeventlistener-1

[501]: #addeventlistener-2

[502]: #allmoneyinput

[503]: #title

[504]: #playerwalletapplication

[505]: #_boundonsocketevent

[506]: #setposition

[507]: #parameters-89

[508]: #_preparecontext-3

[509]: #selectedactorid

[510]: #_preparesinglevendorcontext

[511]: #parameters-90

[512]: #_prepareallvendorscontext

[513]: #parameters-91

[514]: #_ondocumentclick

[515]: #parameters-92

[516]: #_onactorselection

[517]: #parameters-93

[518]: #_onrender-4

[519]: #_setupdropdown

[520]: #parameters-94

[521]: #_updatewindowtitle

[522]: #_onbacktovendors

[523]: #parameters-95

[524]: #_cleanuplisteners-6

[525]: #_onclickvendor

[526]: #parameters-96

[527]: #_onsearchinput

[528]: #parameters-97

[529]: #_searchtimeout

[530]: #_updateclearbuttonvisibility

[531]: #_onsocketevent

[532]: #parameters-98

[533]: #_onitemselection

[534]: #parameters-99

[535]: #_onpurchaseaction

[536]: #parameters-100

[537]: #_updatepurchasedisplay

[538]: #_clearselection

[539]: #_purchaseselecteditems

[540]: #parameters-101

[541]: #close-3

[542]: #parameters-102

[543]: #_onclickedititem

[544]: #parameters-103

[545]: #selectuseractor

[546]: #parameters-104

[547]: #processclientpurchase

[548]: #parameters-105

[549]: #playerwalletapplication-1

[550]: #_boundonsocketevent-1

[551]: #setposition-1

[552]: #parameters-106

[553]: #_preparecontext-4

[554]: #selectedactorid-1

[555]: #_preparesinglevendorcontext-1

[556]: #parameters-107

[557]: #_prepareallvendorscontext-1

[558]: #parameters-108

[559]: #_ondocumentclick-1

[560]: #parameters-109

[561]: #_onactorselection-1

[562]: #parameters-110

[563]: #_onrender-5

[564]: #_setupdropdown-1

[565]: #parameters-111

[566]: #_updatewindowtitle-1

[567]: #_onbacktovendors-1

[568]: #parameters-112

[569]: #_cleanuplisteners-7

[570]: #_onclickvendor-1

[571]: #parameters-113

[572]: #_onsearchinput-1

[573]: #parameters-114

[574]: #_searchtimeout-1

[575]: #_updateclearbuttonvisibility-1

[576]: #_onsocketevent-1

[577]: #parameters-115

[578]: #_onitemselection-1

[579]: #parameters-116

[580]: #_onpurchaseaction-1

[581]: #parameters-117

[582]: #_updatepurchasedisplay-1

[583]: #_clearselection-1

[584]: #_purchaseselecteditems-1

[585]: #parameters-118

[586]: #close-4

[587]: #parameters-119

[588]: #_onclickedititem-1

[589]: #parameters-120

[590]: #selectuseractor-1

[591]: #parameters-121

[592]: #processclientpurchase-1

[593]: #parameters-122

[594]: #actorsdata

[595]: #vendor

[596]: #vendor-1

[597]: #filteredvendor

[598]: #items

[599]: #searchterm

[600]: #searchterm-1

[601]: #_updatewindowtitle-2

[602]: #_socketregistered

[603]: #actorradios

[604]: #searchinput

[605]: #backbutton

[606]: #_updateclearbuttonvisibility-2

[607]: #alldropdowns

[608]: #_documentclicklisteneradded

[609]: #_documentclicklisteneradded-1

[610]: #titleelement

[611]: #titleelement-1

[612]: #cleartimeout

[613]: #cleartimeout-1

[614]: #toggle

[615]: #userid

[616]: #settimeout

[617]: #selectedcountelement

[618]: #selectedcountelement-1

[619]: #totalprice

[620]: #checkboxes

[621]: #-5

[622]: #useractors

[623]: #preselectedactorid

[624]: #actorchoices

[625]: #-6

[626]: #checkbox

[627]: #targetactor

[628]: #actorwallet

[629]: #totalcost

[630]: #item

[631]: #purchaseapprovaldialog

[632]: #_preparecontext-5

[633]: #_onrender-6

[634]: #_onclickbutton-3

[635]: #parameters-123

[636]: #close-5

[637]: #parameters-124

[638]: #approvebtn

[639]: #approvebtn-1

[640]: #approvebtn-2

[641]: #approvebtn-3

[642]: #dialogcontent

[643]: #dialogcontent-1

[644]: #_resolve

[645]: #_resolve-1

[646]: #-7

[647]: #sellapprovaldialog

[648]: #_preparecontext-6

[649]: #_onrender-7

[650]: #_onclickbutton-4

[651]: #parameters-125

[652]: #close-6

[653]: #parameters-126

[654]: #slider

[655]: #updatepayment

[656]: #updatepayment-1

[657]: #-8

[658]: #sellitemsapplication

[659]: #setposition-2

[660]: #parameters-127

[661]: #_preparecontext-7

[662]: #_getplayeritems

[663]: #_onrender-8

[664]: #_ondocumentclick-2

[665]: #parameters-128

[666]: #_onactorselection-2

[667]: #parameters-129

[668]: #_onsearchinput-2

[669]: #parameters-130

[670]: #_updateclearbuttonvisibility-3

[671]: #_onsocketevent-2

[672]: #parameters-131

[673]: #_onitemselection-2

[674]: #parameters-132

[675]: #_onsellaction

[676]: #parameters-133

[677]: #_updateselldisplay

[678]: #_clearselection-2

[679]: #_sellselecteditems

[680]: #_cleanuplisteners-8

[681]: #close-7

[682]: #parameters-134

[683]: #registermodulesettings

[684]: #parameters-135

[685]: #socket_events

[686]: #socket_events-1

[687]: #socket_events-2

[688]: #finditemincarried

[689]: #finditemincarried-1

[690]: #parameters-136

[691]: #transactionmanager-28

[692]: #sendpurchaserequesttogm

[693]: #parameters-137

[694]: #processdirectpurchase

[695]: #parameters-138

[696]: #processplayerpurchaserequest

[697]: #parameters-139

[698]: #emitpurchaseresult

[699]: #parameters-140

[700]: #processplayersellrequest

[701]: #parameters-141

[702]: #emitsellresult

[703]: #parameters-142

[704]: #additemtoactor

[705]: #parameters-143

[706]: #promise

[707]: #addplayerwalletbutton

[708]: #parameters-144

[709]: #recurselist

[710]: #parameters-145

[711]: #getownedplayeractors

[712]: #parameters-146

[713]: #getprimaryuseractor

[714]: #parameters-147

[715]: #getprocessedplayeractorsdata

[716]: #parameters-148

[717]: #validateitemdata

[718]: #parameters-149

[719]: #getitemfrompath

[720]: #parameters-150

[721]: #deletefoundryitem

[722]: #parameters-151

[723]: #vendorcreationapplication

[724]: #_preparecontext-8

[725]: #_onrender-9

[726]: #_setupcurrencylisteners

[727]: #_onclickfilepicker

[728]: #parameters-152

[729]: #_onsubmitform-1

[730]: #parameters-153

[731]: #_onclickbutton-5

[732]: #parameters-154

[733]: #_createvendor

[734]: #close-8

[735]: #parameters-155

[736]: #vendordatamanager-28

[737]: #getvendors

[738]: #getvendor

[739]: #parameters-156

[740]: #updatevendor

[741]: #parameters-157

[742]: #deletevendor

[743]: #parameters-158

[744]: #updateitemquantityinvendor

[745]: #parameters-159

[746]: #findvendorbyitemuuid

[747]: #parameters-160

[748]: #vendordisplayapplication

[749]: #_updateposition

[750]: #parameters-161

[751]: #_preparecontext-9

[752]: #_onrender-10

[753]: #_onclickedititem-2

[754]: #parameters-162

[755]: #_onpurchaseitem

[756]: #parameters-163

[757]: #close-9

[758]: #parameters-164

[759]: #refreshdisplays

[760]: #parameters-165

[761]: #vendoreditapplication

[762]: #setposition-3

[763]: #parameters-166

[764]: #_updateposition-1

[765]: #parameters-167

[766]: #_preparecontext-10

[767]: #_onrender-11

[768]: #_setupcurrencylisteners-1

[769]: #close-10

[770]: #parameters-168

[771]: #_onclickfilepicker-1

[772]: #parameters-169

[773]: #_onsubmitform-2

[774]: #parameters-170

[775]: #_onclickbutton-6

[776]: #parameters-171

[777]: #_updatevendor

[778]: #vendoritemeditapplication

[779]: #_preparecontext-11

[780]: #_onrender-12

[781]: #_onsubmitform-3

[782]: #parameters-172

[783]: #_onclickbutton-7

[784]: #parameters-173

[785]: #_updateitem

[786]: #_removeitem

[787]: #parameters-174

[788]: #vendormanagerapplication

[789]: #_preparecontext-12

[790]: #_onrender-13

[791]: #close-11

[792]: #parameters-175

[793]: #_onclickaction

[794]: #parameters-176

[795]: #_deletevendor

[796]: #parameters-177

[797]: #_togglevendoractive

[798]: #parameters-178

[799]: #refreshvendors

[800]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array

[801]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[802]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[803]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[804]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error

[805]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

[806]: https://developer.mozilla.org/docs/Web/API/Event

[807]: https://developer.mozilla.org/docs/Web/HTML/Element

[808]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function

[809]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined
