const dataText = `
tier1
{treasure_1_4}
{magic_items_1_4}
tier2
{treasure_5_10}
{magic_items_5_10}
tier3
{treasure_11_16}
{magic_items_11_16}
tier4
{treasure_17_20}
{magic_items_17_20}
treasure_1_4
[[400-600]] CP, [[175-225]] SP, [[100-150]] GP
[[1-4]] x {gem_25}
{common_art}
magic_items_1_4
{common_magic_item}
{uncommon_consumable}
{uncommon_consumable}
{uncommon_magic_item}
treasure_5_10
[[300-700]] SP, [[800-1000]] GP, [[25-75]] PP
[[4-6]] x {gems_100}
{common_art}
{uncommon_art}
magic_items_5_10
{common_magic_item}
{{uncommon_consumable}|{rare_consumable}}
{{uncommon_consumable}|{rare_consumable}}
{{uncommon_magic_item}|{rare_magic_item}}
treasure_11_16
[[4000-5000]] GP, [[175-225]] PP
[[1-5]] x {gems_500}
{uncommon_art}
{rare_art}
magic_items_11_16
{{uncommon_consumable}|{rare_consumable}|{very_rare_consumable}}
{{uncommon_consumable}|{rare_consumable}|{very_rare_consumable}}
{{uncommon_magic_item}|{rare_magic_item}|{very_rare_magic_item}}
treasure_17_20
[[8000-12000]] GP, [[800-1200]] PP
[[3-7]] x {gems_1000}
1 x {gems_5000}
{rare_art}
{very_rare_art}
{legendary_art}
magic_items_17_20
{{rare_consumable}|{very_rare_consumable}|{legendary_consumable}}
{{rare_consumable}|{very_rare_consumable}|{legendary_consumable}}
{{rare_magic_item}|{very_rare_magic_item}|{legendary_magic_item}}
gem_25
agate (25 gp each)
clear quartz (25 gp each)
hematite (25 gp each)
jasper (25 gp each)
malachite (25 gp each)
obsidian glass (25 gp each)
rhodochrosite (25 gp each)
tiger’s eye (25 gp each)
tinted quartz (25 gp each)
turquoise (25 gp each)
gems_100
amethyst (100 gp each)
bloodstone (100 gp each)
carnelian (100 gp each)
chalcedony (100 gp each)
citrine (100 gp each)
lapis lazuli (100 gp each)
moonstone (100 gp each)
onyx (100 gp each)
spinel (100 gp each)
zircon (100 gp each)
gems_500
amber (500 gp each)
azurite (500 gp each)
coral (500 gp each)
garnet (500 gp each)
jade (500 gp each)
jet (500 gp each)
larimar pectolite (500 gp each)
pearl (500 gp each)
rubellite (500 gp each)
tourmaline (500 gp each)
gems_1000
alexandrite (1,000 gp each)
ammolite (1,000 gp each)
aquamarine (1,000 gp each)
black pearl (1,000 gp each)
blue spinel (1,000 gp each)
opal (1,000 gp each)
peridot (1,000 gp each)
topaz (1,000 gp each)
tsavorite (1,000 gp each)
zoisite (1,000 gp each)
gems_5000
black opal (5,000 gp each)
canary diamond (5,000 gp each)
emerald (5,000 gp each)
fire opal (5,000 gp each)
jacinth (5,000 gp each)
ruby (5,000 gp each)
diamond (5,000 gp each)
sapphire (5,000 gp each)
star ruby (5,000 gp each)
star sapphire (5,000 gp each)
common_art
{condition} {origin} amethyst-studded hand mirror (50 gp)
{condition} {origin} copper incense bowl (50 gp)
{condition} {origin} embroidered silk head scarf (50 gp)
{condition} {origin} gilded memento mori locket (50 gp)
{condition} {origin} glass eyeball (50 gp)
{condition} {origin} jar of pickled monstrosity parts (50 gp)
{condition} {origin} ornamental hair comb (50 gp)
{condition} {origin} pair of carnelian earrings (50 gp)
{condition} {origin} pewter statuette (50 gp)
{condition} {origin} silver serving tray (50 gp)
uncommon_art
{condition} {origin} brass medal inlaid with citrine (500 gp)
{condition} {origin} fine set of silver serving utensils (500 gp)
{condition} {origin} gilded pet cage with polished amber handle (500 gp)
{condition} {origin} gold bracelet and earring set (500 gp)
{condition} {origin} handmade embroidered wedding gown (500 gp)
{condition} {origin} ivory tusk with scrimshaw and gold end caps (500 gp)
{condition} {origin} silver chalice with chrysoprase inlay (500 gp)
{condition} {origin} silver reliquary with lapis lazuli and red onyx (500 gp)
{condition} {origin} taxidermized beast statue (500 gp)
{condition} {origin} turquoise-adorned belt with silver clasp (500 gp)
rare_art
{condition} {origin} amber and coral ship in bottle (2,500 gp)
{condition} {origin} ceremonial copper mask with monstrosity-leather lining (2,500 gp)
{condition} {origin} exotic and fragile flower germinated in chiseled quartz pot (2,500 gp)
{condition} {origin} exquisite portrait of high military officer with gilded frame (2,500 gp)
{condition} {origin} full-sized silver mirror with obsidian corner guards (2,500 gp)
{condition} {origin} jade statuette with moonstone eyes (2,500 gp)
{condition} {origin} jar of pickled aberration parts (2,500 gp)
{condition} {origin} lute of exotic wood with mother-of-pearl fretboard (signed by a prestigious bard or craftsman) (2,500 gp)
{condition} {origin} ornamental saber with golden handle and blade (2,500 gp)
{condition} {origin} sanded coral idol with pearl eyes (2,500 gp)
very_rare_art
{condition} {origin} amber statuette with peridot accents (5,000 gp)
{condition} {origin} aquamarine beast statuette (5,000 gp)
{condition} {origin} gaming set with ebony and amber pieces (5,000 gp)
{condition} {origin} gold and black pearl lion-head pommel cap (5,000 gp)
{condition} {origin} gold diadem set with star ruby (5,000 gp)
{condition} {origin} ivory crown with silver ornamentation (5,000 gp)
{condition} {origin} jewel-encrusted opera shoes (5,000 gp)
{condition} {origin} marble masterpiece bust sculpture (5,000 gp)
{condition} {origin} platinum and diamond ring (5,000 gp)
{condition} {origin} tapestry woven with gold and silver thread (5,000 gp)
legendary_art
{condition} {origin} black sapphire idol (10,000 gp)
{condition} {origin} gold and emerald ceremonial chalices (10,000 gp)
{condition} {origin} golden crown crusted with rubies and sapphires (10,000 gp)
{condition} {origin} golden dagger with jacinth pommel (10,000 gp)
{condition} {origin} golden harp with platinum strings (10,000 gp)
{condition} {origin} jar of pickled dragon parts (10,000 gp)
{condition} {origin} sapphire (translucent, deep blue) (10,000 gp)
{condition} {origin} pair of jeweled golden vambraces (10,000 gp)
{condition} {origin} quartet of ebony and gold canopic jars (10,000 gp)
{condition} {origin} solid gold, diamond-crusted breastplate (10,000 gp)
ammunition
bolts ^2
arrows ^4
bullets
darts
armor
{condition} {origin} padded
{condition} {origin} leather
{condition} {origin} studded leather
{condition} {origin} brigandine
{condition} {origin} hide
{condition} {origin} chain shirt
{condition} {origin} scale mail
{condition} {origin} breastplate
{condition} {origin} half plate
{condition} {origin} ring mail
{condition} {origin} chain mail
{condition} {origin} splint
{condition} {origin} plate
weapon
{condition} {origin} club
{condition} {origin} dagger
{condition} {origin} greatclub
{condition} {origin} handaxe
{condition} {origin} javelin
{condition} {origin} light hammer
{condition} {origin} mace
{condition} {origin} quarterstaff
{condition} {origin} sickle
{condition} {origin} spear
{condition} {origin} crossbow, light
{condition} {origin} dart
{condition} {origin} shortbow
{condition} {origin} sling
{condition} {origin} battleaxe
{condition} {origin} flail
{condition} {origin} glaive
{condition} {origin} greataxe
{condition} {origin} greatsword
{condition} {origin} halberd
{condition} {origin} lance
{condition} {origin} longsword
{condition} {origin} maul
{condition} {origin} morningstar
{condition} {origin} pike
{condition} {origin} rapier
{condition} {origin} scimitar
{condition} {origin} scythe
{condition} {origin} shortsword
{condition} {origin} trident
{condition} {origin} war pick
{condition} {origin} warhammer
{condition} {origin} whip
{condition} {origin} blowgun
{condition} {origin} crossbow, hand
{condition} {origin} crossbow, heavy
{condition} {origin} longbow
uncommon_consumable
ammunition, hampering (uncommon) ({ammunition})
ammunition, magic +1 (uncommon) ({ammunition})
dust of disappearance (uncommon)
dust of dryness (uncommon)
dust of sneezing and choking (uncommon)
elemental gem (uncommon)
oil of slipperiness (uncommon)
potion of animal friendship (uncommon)
potion of climbing (uncommon)
potion of giant strength (hill) (uncommon)
potion of healing (uncommon) ^5
potion of resistance (uncommon)
potion of water breathing (uncommon)
restorative ointment (uncommon)
spell scroll (cantrip) ({cantrip}) (uncommon)
spell scroll (1st circle) ({circle_1_spell}) (uncommon) ^5
spell scroll (2nd circle) ({circle_2_spell} (uncommon)) ^2
rare_consumable
dust of disappearance (uncommon)
ammunition, hampering (common)
dust of dryness (uncommon)
dust of sneezing and choking (uncommon)
elemental gem (uncommon)
feather token (rare)
oil of sharpness (very rare)
oil of slipperiness (uncommon)
potion of animal friendship (uncommon)
potion of clairvoyance (rare)
potion of climbing (uncommon)
potion of diminution (rare)
potion of gaseous form (rare)
ammunition, magic +1 ({ammunition})
potion of giant strength (frost)
potion of giant strength (stone)
potion of healing (greater) ^5
potion of heroism (rare)
potion of mind reading (rare)
potion of resistance (uncommon)
potion of water breathing (uncommon)
restorative ointment (uncommon)
spell scroll (2nd circle) ({circle_2_spell}) (uncommon) ^5
spell scroll (3rd circle) ({circle_3_spell}) (uncommon) ^2
spell scroll (4th circle) ({circle_4_spell}) (rare)
very_rare_consumable
ammunition, hampering (common)
arrow of slaying (very rare)
dust of disappearance (uncommon)
dust of dryness (uncommon)
dust of sneezing and choking (uncommon)
elemental gem (uncommon)
feather token (rare)
oil of etherealness (rare)
oil of sharpness (very rare)
oil of slipperiness (uncommon)
ammunition, magic +2 ({ammunition})
potion of animal friendship (uncommon)
potion of clairvoyance (rare)
potion of climbing (uncommon)
potion of diminution (rare)
potion of flying (very rare)
potion of gaseous form (rare)
potion of giant strength (fire)
potion of giant strength (cloud)
potion of healing (superior) ^5
potion of heroism (rare)
potion of invisibility (very rare)
bead of force (rare)
potion of mind reading (rare)
potion of resistance (uncommon)
potion of speed (very rare)
potion of water breathing (uncommon)
restorative ointment (uncommon)
spell scroll (5th circle) ({circle_5_spell}) (rare) ^5
spell scroll (6th circle) ({circle_6_spell}) (very rare) ^2
spell scroll (7th circle) ({circle_7_spell}) (very rare)
legendary_consumable
potion of speed (very rare)
sovereign glue (legendary)
ammunition, hampering (common)
arrow of slaying (very rare)
dust of disappearance (uncommon)
dust of dryness (uncommon)
dust of sneezing and choking (uncommon)
elemental gem (uncommon)
feather token (rare)
oil of etherealness (rare)
oil of sharpness (very rare)
ammunition, magic +3 ({ammunition})
oil of slipperiness (uncommon)
potion of animal friendship (uncommon)
potion of clairvoyance (rare)
potion of climbing (uncommon)
potion of diminution (rare)
potion of flying (very rare)
potion of gaseous form (rare)
potion of giant strength (cloud) (very rare)
potion of giant strength (storm) (legendary)
potion of healing (supreme) ^5
bead of force (rare)
potion of heroism (rare)
potion of invisibility (very rare)
potion of mind reading (rare)
potion of resistance (uncommon)
potion of water breathing (uncommon)
restorative ointment (uncommon)
spell scroll (7th circle) ({circle_7_spell}) (very rare) ^5
spell scroll (8th circle) ({circle_8_spell}) (very rare) ^2
spell scroll (9th circle) ({circle_9_spell}) (legendary)
common_magic_item
anklets of alacrity (common)
beast buckle (common)
boots of galloping (common)
bracers of baleful reprisal (common)
dancing lockpicks (common)
eyes of minute seeing (common)
featherlight {armor} armor (common)
gem of brightness (common)
slipforged {armor} armor (common)
lucky roller dice (common)
mailbreaker (common)
pendulous periapt (common)
periapt of the small but mighty (common)
quick quaff bandolier (common)
quickbuckle {armor} armor (common)
quillback {armor} armor (common)
reciprocating polearm (common)
returning charm (common)
ring of deceiver’s warning (common)
ring of jumping (common)
ring of swimming (common)
rope of climbing (common)
shield of clamor (common)
staff of false hues (common)
surefire stock pot (common)
wand of magic detection (common)
uncommon_magic_item
headband of intellect (uncommon)
amulet of proof against detection and location (uncommon)
bag of holding (uncommon)
bag of tricks (uncommon)
lantern of revealing (uncommon)
boots of striding and springing (uncommon)
immovable rod (uncommon)
bracers of archery (uncommon)
brooch of shielding (uncommon)
broom of flying (uncommon)
circlet of blasting (uncommon)
periapt of wound closure (uncommon)
cloak of protection (uncommon)
cloak of the manta ray (uncommon)
decanter of endless water (uncommon)
boots of elvenkind (uncommon)
effcient quiver (uncommon)
hat of disguise (uncommon)
eyes of charming (uncommon)
slippers of spider climbing (uncommon)
eyes of the eagle (uncommon)
figurine of wondrous power (silver raven) (uncommon)
necklace of adaptation (uncommon)
bagpipes of battle (uncommon)
ring of feather falling (uncommon)
periapt of health (uncommon)
helm of telepathy (uncommon)
ring of water walking (uncommon)
javelin of lightning (uncommon)
staff of the python (uncommon)
medallion of thoughts (uncommon)
wand of magic missiles (uncommon)
pearl of power (uncommon)
trident of fish command (uncommon)
ring of mind shielding (uncommon)
pipes of haunting (uncommon)
stone of good luck (luckstone) (uncommon)
goggles of night (uncommon)
winged boots (uncommon)
gloves of missile snaring (uncommon)
wand of secrets (uncommon)
gauntlets of ogre power (uncommon)
robe of useful items (uncommon)
gloves of swimming and climbing (uncommon)
cloak of elvenkind (uncommon)
wand of web (uncommon)
+1 {weapon} (uncommon) ^10
boots of the winterlands (uncommon)
wand of the war mage +1 (uncommon)
+1 shield (uncommon)
rare_magic_item
arrow-catching shield (rare)
wings of flying (rare)
belt of giant strength (hill) (rare)
boots of levitation (rare)
ring of animal influence (rare)
boots of speed (rare)
handy haversack (rare)
rope of entanglement (rare)
chime of opening (rare)
horn of blasting (rare)
cape of the mountebank (rare)
iron bands of binding (rare)
mace of terror (rare)
bowl of commanding water elementals (rare)
loun stone (reserve) (rare)
gem of seeing (rare)
ring of the ram (rare)
periapt of proof against poison (rare)
rod of rulership (rare)
loun stone (sustenance) (rare)
ring of resistance (rare)
dagger of venom (rare)
ring of x-ray vision (rare)
feather token (any) (rare)
ring of protection (rare)
bracers of defense (rare)
staff of healing (rare)
cloak of the bat (rare)
staff of swarming insects (rare)
stone of controlling earth elements (rare)
mace of disruption (rare)
staff of the woodlands (rare)
wand of enemy detection (rare)
wand of paralysis (rare)
wand of the war mage +2 (rare)
+2 {weapon} (rare) ^10
cube of force (rare)
censer of controlling air elementals (rare)
giant slayer {weapon} (rare)
necklace of prayer beads (rare)
ring of evasion (rare)
figuring of wonderous power (any but obsidian steed) (rare)
brazier of commanding fire elementals (rare)
necklace of fireballs (rare)
armor of resistance (rare)
flame tongue {weapon} (rare)
helm of teleportation (rare)
+2 shield (rare)
dimensional shackles (rare)
loun stone (awareness) (rare)
mantle of spell resistance (rare)
amulet of health (rare)
loun stone (protection) (rare)
dragon slayer {weapon} (rare)
instant fortress (rare)
portable hole (rare)
ring of spell storing (rare)
mace of smiting (rare)
ring of free action (rare)
robe of eyes (rare)
bag of beans (rare)
rod of rulership (rare)
sword of wounding (rare)
belt of dwarvenkind (rare)
staff of withering (rare)
wand of fireballs (rare)
sun blade (rare)
sword of life stealing (rare)
+1 {armor} armor (rare)
wand of wonder (rare)
very_rare_magic_item
cloak of displacement (very rare)
helm of brilliance (very rare)
figurine of wonderous power (obsidian steed) (very rare)
belt of giant strength (frost/stone) (very rare)
marvelous pigments (very rare)
frost brand (very rare)
dancing sword (very rare)
rod of absorption (very rare)
efreeti bottle (very rare)
loun stone (fortitude) (very rare)
animated shield (very rare)
robe of scintillating colors (very rare)
dwarven plate (very rare)
dragon scale mail (very rare)
carpet of flying (very rare)
loun stone (absorption) (very rare)
dwarven thrower (very rare)
crystal ball (very rare)
nine lives stealer {weapon} (very rare)
staff of power (very rare)
manual of advantageous exertion (very rare)
ring of regeneration (very rare)
horseshoes of the zephyr (very rare)
loun stone (agility) (very rare)
belt of giant strength (fire) (very rare)
robe of stars (very rare)
wand of polymorph (very rare)
staff of thunder and lighting (very rare)
scimitar of speed (very rare)
rod of security (very rare)
loun stone (strength) (very rare)
staff of striking (very rare)
sword of sharpness (very rare)
ring of shooting stars (very rare)
cloak of arachnida (very rare)
loun stone (leadership) (very rare)
rod of alertness (very rare)
ring of telekinesis (very rare)
staff of frost (very rare)
vicious {weapon} (very rare)
staff of fire (very rare)
manual of golems (very rare)
loun stone (insight) (very rare)
spellguard shield (very rare)
loun stone (intellect) (very rare)
oathbow (very rare)
wand of the war mage +3 (very rare)
+3 {weapon} (very rare) ^10
+2 {armor} armor (very rare)
+3 shield (very rare)
legendary_magic_item
apparatus of the crab (legendary)
+3 {armor} armor (legendary)
crystal ball of mind reading (legendary)
iron flask (legendary)
crystal ball of telepathy (legendary)
luck blade (legendary)
belt of giant strength (cloud) (legendary)
ring of djinni summoning (legendary)
ring of spell turning (legendary)
crystal ball of true seeing (legendary)
ring of invisibility (legendary)
defender (legendary)
loun stone (mastery) (legendary)
belt of giant strength (storm) (legendary)
ring of three wishes (legendary)
robes of the archmagi (legendary)
staff of the magi (legendary)
universal solvent (legendary)
holy avenger (legendary)
vorpal sword (legendary)
cantrip
acid splash
dancing lights
druidcraft
fire bolt
grave touch
guidance
light
mage hand
mending
message
minor illusion
poison spray
produce flame
ray of frost
resistance
sacred flame
shillelagh
shocking grasp
spare the dying
thaumaturgy
vicious mockery
circle_1_spell
alarm
animal friendship
bane
bless
burning hands
charm
command
comprehend languages
create familiar
create or destroy water
cure wounds
detect evil and good
detect magic
detect poison and disease
disguise self
entangle
expeditious retreat
faerie fire
false life
feather fall
fire under the tongue
floating disk
fog cloud
goodberry
grease
guiding bolt
hellish rebuke
heroism
hideous laughter
identify
illusory script
inflict wounds
longstrider
mage armor
magic missile
magic mouth
pendulum
protection from evil and good
purify food and drink
sanctuary
shield
shield of faith
silent image
sleep
speak with animals
thunderwave
unseen servant
circle_2_spell
acid arrow
aid
alter self
animal messenger
arcane lock
arcanist’s magic aura
augury
barkskin
blindness/deafness
blur
branding smite
calm emotions
circle of stones
clairvoyance
continual flame
darkness
darkvision
detect thoughts
elemental blade
enhance ability
enlarge/reduce
enthrall
find steed
flaming sphere
gentle repose
gust of wind
heat metal
hold
invisibility
knock
levitate
locate
magic circle
magic weapon
mirror image
misty step
moonbeam
pass without trace
prayer of healing
protection from poison
ray of enfeeblement
restoration
rope trick
scorching ray
see invisibility
silence
spider climb
spiritual weapon
spike growth
suggestion
warding bond
web
wildsense
zone of truth
circle_3_spell
animate dead
beacon of hope
bestow curse
blink
call lightning
clairvoyance
conjure animals
counterspell
create food and water
daylight
dispel magic
elemental blade
fear
fireball
fly
gaseous form
glyph of warding
haste
hypnotic pattern
lightning bolt
magic circle
major image
mass healing word
meld into stone
nondetection
phantom steed
plant growth
protection from energy
remove curse
revivify
sending
sleet storm
slow
speak with dead
speak with plants
spirit guardians
stinking cloud
tiny hut
tongues
vampiric touch
water breathing
water walk
wind wall
circle_4_spell
arcane eye
banishment
black tentacles
blight
compulsion
confusion
conjure minor elementals
conjure woodland beings
control water
death ward
dimension door
divination
elemental shield
faithful hound
fabricate
freedom of movement
giant insect
greater invisibility
guardian of faith
hallucinatory terrain
ice storm
mass faerie fire
phantasmal killer
polymorph
private sanctum
resilient sphere
secret chest
stone shape
stoneskin
telekinesis
telepathic bond
wall of fire
circle_5_spell
animate objects
antilife shell
arcane hand
awaken
cloudkill
commune with nature
cone of cold
conjure elemental
contact other plane
contagion
creation
dispel evil and good
dominate
dream
geas
greater hold
greater restoration
hallow
heroes’ feast
insect plague
legend lore
mass cure wounds
mislead
modify memory
passwall
planar binding
raise dead
reincarnate
scrying
seeming
telekinesis
teleportation circle
tree stride
wall of force
wall of stone
circle_6_spell
antipathy/sympathy
blade barrier
chain lightning
circle of death
clone
contingency
create undead
disintegrate
eyebite
find the path
flesh to stone
freezing sphere
globe of invulnerability
guards and wards
harm
heal
heroes’ feast
instant summons
irresistible dance
magic jar
mass suggestion
move earth
oculus blossoms
planar ally
programmed illusion
regenerate
resurrection
sunbeam
true seeing
wall of ice
wall of thorns
wind walk
circle_7_spell
arcane sword
delayed blast fireball
divine word
etherealness
finger of death
fire storm
forcecage
four winds
magnificent mansion
mass heal
mirage arcane
plane shift
power word recover
power word stun
project image
regenerate
reverse gravity
sequester
simulacrum
storm of vengeance
symbol
teleport
transmogrification
circle_8_spell
animal shapes
antimagic field
antipathy/sympathy
clone
control weather
demiplane
earthquake
feeblemind
glibness
greater dominate
holy aura
incendiary cloud
maze
mind blank
power word stun
sunburst
tidal wave
circle_9_spell
astral projection
foresight
gate
imprisonment
mass heal
meteor swarm
power word kill
prismatic wall
shapechange
storm of vengeance
time stop
true polymorph
true resurrection
weird
wish
condition
aberrant
abyssal
acidic
ancient
astral
bladed
bloody
buried
celestial
cracked
crumbling
crystalline
cursed
cyclopean
defiled
dreamscape
earthen
eldritch
emerald
entombed
ethereal
faerie
flaming
floating
flooded
foggy
frozen
glass
glowing
glyphed
hallowed
haunted
holy
infernal
infested
lightning-touched
moontouched
musical
necrotic
obsidian
oozing
opal
poisonous
psionic
radiant
ruby
ruined
sapphire
shadowy
shadowy
spiked
startouched
stormy
temporal
titanic
twilight
unearthed
unhallowed
origin
draconic
dwarven
elven
prehistoric
divine
unholy
abyssal
orcish
undead
goblinoid
ghoulish
dark elven
elemental
giant
infernal
cyclopean
aberrant
nightmarish
astral
ethereal
shadowy
feyish
gnomish
natural
clockwork
`;