Doublexp doubleskill.png Double Exp & Skill: Matar monstros rende o dobro de pontos de experiência. O progresso de skills é duas vezes mais rápido! Doublexp doubleskill.png
Bone Overlord.gif The Roost of the Graveborn Quest Spoiler!
Domine Graveborn: todos os bosses e mecânicas ilustradas!
Saiba mais ➔
Winter Tree.png Winter Update 2025
Acompanhe tudo sobre o Winter Update 2025!
Saiba mais ➔
Stag.gif The Order of the Stag Quest Spoiler!
Conheça Isle of Ada: sua quest, missões secundárias e todos os bosses!
Saiba mais ➔

Tibia Wiki:Imbuing/Codigo: mudanças entre as edições

De Tibia Wiki - A Enciclopédia do Tibia
Ir para navegação Ir para pesquisar
 
(42 revisões intermediárias por 5 usuários não estão sendo mostradas)
Linha 1: Linha 1:
<pre id="imbuing_html">
<pre id="imbuing_html">
<table class="imbuing_main_table">
<div class="imbuement-tool-panel">
  <tr>
     <label class="imbument-tool-version-label">v3.0.0</label>
     <td style="height: 30px;" colspan="2">
     <div class="imbument-tool-loading">
      <div class="titulo">Imbuing System</div>
        <img src="https://www.tibiawiki.com.br/images/c/ce/The_Epic_Wisdom.gif" /><br />
     </td>
         <label>Loading...</label>
  </tr>
        <span>@TibiaWiki</span>
  <tr>
     </div>
    <td>
     <div class="imbument-tool-menu-side">
      <table style="width:100%;height:40px;">
         <h2>Imbuement Tool</h2>
        <tr>
        <div class="imbument-tool-radio-box">
          <td style="width:35%;">Categoria:
            <input type="radio" id="imbument-tool-items" value="Items" name="imbuement-options">
            <select id="categoria">
            <label for="imbument-tool-items">Items</label>
              <option value="nenhum"></option>
        </div>
              <option value="1">Armaduras</option>
        <div class="imbument-tool-radio-box">
              <option value="11">Backpacks</option>
            <input type="radio" id="imbument-tool-scrolls" value="Scrolls" name="imbuement-options">
              <option value="3">Botas</option>
             <label for="imbument-tool-scrolls">Scrolls</label>
              <option value="7">Capacetes</option>
         </div>
              <option value="6">Clavas</option>
         <span class="imbument-tool-divisor-line"></span>
              <option value="9">Distância</option>
         <div id="imbument-tool-items-container">
              <option value="2">Escudos</option>
             <div class="imbument-tool-category-box">
              <option value="4">Espadas</option>
                <label for="">Categoria:</label>
              <option value="5">Machados</option>
                <select id="imbuement-tool-items-category">
              <option value="10">Spellbooks</option>
                </select>
              <option value="8">Wands e Rods</option>
            </select>
          </td>
          <td class="no" id="armaduras" style="width:40%;">Item:
            <select id="itemcat1">
              <option value="none"></option>
                <option value="2">Albino Plate</option>
                <option value="2">Amazon Armor</option>
                <option value="1">Bear Skin</option>
                <option value="2">Blue Robe</option>
                <option value="2">Chain Armor</option>
                <option value="1">Crown Armor</option>
                <option value="2">Demon Armor</option>
                <option value="2">Depth Lorica</option>
                <option value="1">Dragon Scale Mail</option>
                <option value="1">Dream Shroud</option>
                <option value="2">Dwarven Armor</option>
                <option value="2">Elite Draken Mail</option>
                <option value="3">Elven Mail</option>
                <option value="1">Embrace of Nature</option>
                <option value="2">Falcon Plate</option>
<option value="2">Ghost Chestplate</option>
                <option value="2">Gnome Armor</option>
                <option value="2">Golden Armor</option>
                <option value="2">Heat Core</option>
                <option value="2">Heavy Metal T-Shirt</option>
                <option value="2">Knight Armor</option>
                <option value="2">Leopard Armor</option>
                <option value="2">Lion Plate</option>
                <option value="2">Magic Plate Armor</option>
                <option value="2">Mammoth Fur Cape</option>
                <option value="1">Master Archer's Armor</option>
                <option value="2">Mooh'tah Plate</option>
                <option value="2">Noble Armor</option>
                <option value="2">Ornate Chestplate</option>
                <option value="1">Paladin Armor</option>
                <option value="1">Prismatic Armor</option>
                <option value="2">Soulmantle</option>
                <option value="2">Soulshell</option>
                <option value="2">Soulshroud</option>
                <option value="1">Toga Mortis</option>
              </select>
            </td>
            <td class="no" id="escudos" style="width:44%;">Item:
              <select id="itemcat2">
                <option value="none"></option>
                <option value="1">Amazon Shield</option>
                <option value="1">Bonelord Shield</option>
                <option value="1">Carapace Shield</option>
                <option value="1">Castle Shield</option>
                <option value="1">Crown Shield</option>
                <option value="1">Death Gaze</option>
                <option value="1">Demon Shield</option>
                <option value="1">Dragon Shield</option>
                <option value="1">Falcon Escutcheon</option>
                <option value="1">Ectoplasmic Shield</option>
                <option value="1">Falcon Shield</option>
                <option value="1">Gnome Shield</option>
                <option value="1">Great Shield</option>
                <option value="1">Griffin Shield</option>
                <option value="1">Haunted Mirror Piece</option>
                <option value="1">Lion Shield</option>
                <option value="1">Mastermind Shield</option>
                <option value="1">Meat Shield</option>
                <option value="1">Medusa Shield</option>
                <option value="1">Necromancer Shield</option>
                <option value="1">Nightmare Shield</option>
                <option value="1">Norse Shield</option>
                <option value="1">Ornamented Shield</option>
                <option value="1">Ornate Shield</option>
                <option value="1">Phoenix Shield</option>
                <option value="1">Rift Shield</option>
                <option value="1">Runic Ice Shield</option>
                <option value="1">Sentinel Shield</option>
                <option value="1">Shield of Care</option>
                <option value="1">Shield of Corruption</option>
                <option value="1">Shield of the White Knight</option>
                <option value="1">Soulbastion</option>
                <option value="1">Steel Shield</option>
                <option value="1">Tempest Shield</option>
                <option value="1">Tower Shield</option>
                <option value="1">Vampire Shield</option>
                <option value="1">Viking Shield</option>
                <option value="1">Warrior's Shield</option>
              </select>
            </td>
            <td class="no" id="botas" style="width:45%;">Item:
              <select id="itemcat3">
                <option value="none"></option>
                <option value="1">Badger Boots</option>
                <option value="1">Boots of Haste</option>
                <option value="1">Bunnyslippers</option>
                <option value="1">Cobra Boots</option>
                <option value="1">Coconut Shoes</option>
                <option value="1">Crocodile Boots</option>
                <option value="1">Crystal Boots</option>
                <option value="1">Depth Calcei</option>
                <option value="1">Dragon Scale Boots</option>
                <option value="1">Draken Boots</option>
                <option value="1">Fur Boots</option>
                <option value="1">Glacier Shoes</option>
                <option value="1">Golden Boots</option>
                <option value="1">Guardian Boots</option>
                <option value="1">Leather Boots</option>
                <option value="1">Lightning Boots</option>
                <option value="1">Make-do Boots</option>
                <option value="1">Makeshift Boots</option>
                <option value="1">Magma Boots</option>
                <option value="1">Metal Spats</option>
                <option value="1">Oriental Shoes</option>
                <option value="1">Pair of Dreamwalkers</option>
                <option value="1">Pair of Nightmare Boots</option>
                <option value="1">Pair of Soulstalkers</option>
                <option value="1">Pair of Soulwalkers</option>
                <option value="1">Patched Boots</option>
                <option value="1">Pirate Boots</option>
                <option value="1">Prismatic Boots</option>
                <option value="1">Sandals</option>
                <option value="1">Steel Boots</option>
                <option value="1">Terra Boots</option>
                <option value="1">Treader of Torment</option>
                <option value="1">Vampire Silk Slippers</option>
                <option value="1">Winged Boots</option>
                <option value="1">Zaoan Shoes</option>
              </select>
            </td>
            <td class="no" id="espadas" style="width:38%;">Item:
              <select id="itemcat4">
                <option value="none"></option>
                <option value="2">Assassin Dagger</option>
                <option value="3">Berserker</option>
                <option value="3">Blacksteel Sword</option>
                <option value="2">Blade of Corruption</option>
                <option value="3">Blade of Destruction</option>
                <option value="2">Bloody Edge</option>
                <option value="2">Bright Sword</option>
                <option value="3">Broadsword</option>
                <option value="2">Cobra Sword</option>
                <option value="2">Crimson Sword</option>
                <option value="3">Demonrage Sword</option>
                <option value="3">Dragon Slayer</option>
                <option value="2">Djinn Blade</option>
                <option value="2">Emerald Sword</option>
                <option value="2">Epee</option>
                <option value="2">Falcon Longsword</option>
                <option value="3">Giant Sword</option>
                <option value="2">Gnome Sword</option>
                <option value="3">Haunted Blade</option>
                <option value="3">Havoc Blade</option>
                <option value="2">Lion Longsword</option>
                <option value="2">Magic Sword</option>
                <option value="2">Mystic Blade</option>
                <option value="2">Nightmare Blade</option>
                <option value="2">Relic Sword</option>
                <option value="2">Runed Sword</option>
                <option value="3">Slayer of Destruction</option>
                <option value="1">Shiny Blade</option>
                <option value="2">Soulcutter</option>
                <option value="3">Soulshredder</option>
                <option value="2">Spike Sword</option>
                <option value="2">Sword</option>
                <option value="2">Summerblade</option>
                <option value="2">Tagralt Blade</option>
                <option value="3">Thaian Sword</option>
                <option value="2">The Avenger</option>
                <option value="1">The Epiphany</option>
                <option value="3">Twiceslicer</option>
                <option value="3">Twin Hooks</option>
                <option value="1">Umbral Blade</option>
                <option value="1">Umbral Masterblade</option>
                <option value="2">Umbral Master Slayer</option>
                <option value="1">Umbral Slayer</option>
                <option value="2">Winterblade</option>
                <option value="2">Wyvern Fang</option>
                <option value="2">Zaoan Sword</option>
              </select>
            </td>
            <td class="no" id="machados" style="width:41%;">Item:
              <select id="itemcat5">
                <option value="none"></option>
                <option value="3">Axe of Destruction</option>
                <option value="2">Barbarian Axe</option>
                <option value="2">Beastslayer Axe</option>
                <option value="2">Butcher's Axe</option>
                <option value="3">Chopper of Destruction</option>
                <option value="2">Cobra Axe</option>
                <option value="1">Crystalline Axe</option>
                <option value="2">Demonwing Axe</option>
                <option value="3">Dragon Lance</option>
                <option value="3">Drakinata</option>
                <option value="2">Dreaded Cleaver</option>
                <option value="2">Dwarven Axe</option>
                <option value="2">Executioner</option>
                <option value="2">Falcon Battleaxe</option>
                <option value="2">Great Axe</option>
                <option value="3">Guardian Halberd</option>
                <option value="3">Headchopper</option>
                <option value="1">Hellforged Axe</option>
                <option value="2">Heroic Axe</option>
                <option value="2">Hive Scythe</option>
                <option value="2">Impaler</option>
                <option value="2">Knight Axe</option>
                <option value="2">Lion Axe</option>
                <option value="2">Mythril Axe</option>
                <option value="2">Noble Axe</option>
                <option value="2">Phantasmal Axe</option>
                <option value="3">Ravager's Axe</option>
                <option value="3">Rift Lance</option>
                <option value="2">Royal Axe</option>
                <option value="2">Ruthless Axe</option>
                <option value="1">Solar Axe</option>
                <option value="2">Soulbiter Axe</option>
                <option value="2">Souleater (Axe)</option>
                <option value="1">Stonecutter Axe</option>
                <option value="1">Throwing Axe</option>
                <option value="3">Twin Axe</option>
                <option value="1">Umbral Axe</option>
                <option value="1">Umbral Chopper</option>
                <option value="1">Umbral Master Axe</option>
                <option value="2">Umbral Master Chopper</option>
                <option value="2">Warrior's Axe</option>
                <option value="3">Zaoan Halberd</option>
              </select>
            </td>
            <td class="no" id="clavas" style="width:41%;">Item:
              <select id="itemcat6">
                <option value="none"></option>
                <option value="3">Abyss Hammer</option>
                <option value="3">Amber Staff</option>
                <option value="2">Arcane Staff</option>
                <option value="2">Blessed Sceptre</option>
                <option value="2">Clerical Mace</option>
                <option value="2">Cobra Club</option>
                <option value="2">Cranial Basher</option>
                <option value="2">Crystal Mace</option>
                <option value="2">Deepling Squelcher</option>
                <option value="2">Demonbone</option>
                <option value="2">Dragonbone Staff</option>
                <option value="2">Falcon Mace</option>
                <option value="2">Glooth Whip</option>
                <option value="3">Hammer of Destruction</option>
                <option value="3">Hammer of Wrath</option>
                <option value="3">Heavy Mace</option>
                <option value="2">Jungle Flail</option>
                <option value="2">Life Preserver</option>
                <option value="2">Lion Hammer</option>
                <option value="3">Lunar Staff</option>
                <option value="3">Mace of Destruction</option>
                <option value="1">Maimer</option>
                <option value="1">Mortal Mace</option>
                <option value="1">Mycological Mace</option>
                <option value="1">Obsidian Truncheon</option>
                <option value="2">Onyx Flail</option>
                <option value="2">Orcish Maul</option>
                <option value="2">Ornate Mace</option>
                <option value="2">Resizer</option>
                <option value="2">Soulcrusher</option>
                <option value="3">Soulmaimer</option>
                <option value="2">Queen's Sceptre</option>
                <option value="2">Sapphire Hammer</option>
                <option value="2">Shadow Sceptre</option>
                <option value="2">Silver Mace</option>
                <option value="2">Skull Staff</option>
                <option value="2">Skullcrusher</option>
                <option value="2">Snake God's Sceptre</option>
                <option value="3">Spiked Squelcher</option>
                <option value="2">The Stomper</option>
                <option value="2">Thunder Hammer</option>
                <option value="1">Umbral Hammer</option>
                <option value="1">Umbral Mace</option>
                <option value="2">Umbral Master Hammer</option>
                <option value="1">Umbral Master Mace</option>
                <option value="3">War Hammer</option>
              </select>
            </td>
            <td class="no" id="capacetes" style="width:44%;">Item:
              <select id="itemcat7">
                <option value="none"></option>
                <option value="2">Amazon Helmet</option>
                <option value="2">Ancient Tiara</option>
                <option id="mage" value="1">Batwing Hat</option>
                <option value="2">Bonelord Helmet</option>
                <option value="1">Chain Helmet</option>
                <option value="2">Cobra Hood</option>
                <option value="2">Crown Helmet</option>
                <option value="2">Crusader Helmet</option>
                <option value="2">Dark Whispers</option>
                <option value="2">Demon Helmet</option>
                <option value="2">Dwarven Helmet</option>
<option value="1">Elite Draken Helmet</option>
                <option value="2">Falcon Circlet</option>
                <option id="mage" value="2">Falcon Coif</option>
                <option value="2">Fur Cap</option>
                <option id="mage" value="2">Galea Mortis</option>
                <option id="mage" value="2">Gnome Helmet</option>
                <option value="2">Golden Helmet</option>
                <option value="2">Golden Helmet</option>
                <option id="mage" value="1">Hat of the Mad</option>
                <option value="2">Helmet of Nature</option>
                <option value="2">Helmet of The Lost</option>
                <option value="2">Helmet of Ultimate Terror</option>
                <option id="mage" value="1">Jade Hat</option>
                <option value="2">Lion Spangenhelm</option>
                <option id="mage" value="2">Mage Hat</option>
                <option value="2">Magician Hat</option>
                <option value="2">Odd Hat</option>
                <option value="2">Royal Helmet</option>
                <option value="2">Shamanic Mask</option>
                <option value="2">Skull Helmet</option>
                <option value="2">Terra Helmet</option>
                <option value="2">Visage of the End Days</option>
                <option value="2">Warrior Helmet</option>
                <option id="mage" value="1">Witch Hat</option>
                <option id="mage" value="1">Yalahari Mask</option>
                <option value="1">Zaoan Helmet</option>
              </select>
            </td>
            <td class="no" id="wandserods" style="width:48%;">Item:
              <select id="itemcat8">
                <option value="none"></option>
                <option id="strike" value="2">Cobra Rod</option>
                <option value="2">Cobra Wand</option>
                <option value="2">Deepling Ceremonial Dagger</option>
                <option value="2">Deepling Fork</option>
                <option value="2">Dream Blossom Staff</option>
                <option value="2">Energized Limb</option>
                <option id="strike" value="2">Falcon Rod</option>
                <option id="strike" value="2">Falcon Wand</option>
                <option value="2">Jungle Rod</option>
                <option value="2">Jungle Wand</option>
                <option value="2">Lion Rod</option>
                <option id="strike" value="2">Lion Wand</option>
                <option value="2">Northwind Rod</option>
                <option value="2">Ogre Scepta</option>
                <option id="strike" value="2">Rod of Destruction</option>
                <option id="strike" value="2">Soulhexer</option>
                <option id="strike" value="2">Soultainter</option>
                <option value="2">Underworld Rod</option>
                <option id="strike" value="2">Wand of Destruction</option>
                <option value="2">Wand of Draconia</option>
                <option value="2">Wand of Dragonbreath</option>
                <option value="2">Wand of Starstorm</option>
                <option value="2">Wand of Voodoo</option>
              </select>
            </td>
            <td class="no" id="distancias" style="width:42%;">Item:
              <select id="itemcat9">
                <option value="none"></option>
                <option value="3">Bow&nbsp;of&nbsp;Cataclysm</option>
                <option value="3">Bow of Destruction</option>
                <option value="3">Chain Bolter</option>
                <option value="2">Cobra&nbsp;Crossbow</option>
                <option value="3">Composite Hornbow</option>
                <option value="3">Crossbow</option>
                <option value="3">Crossbow of Destruction</option>
                <option value="3">Elvish Bow</option>
                <option value="3">Falcon Bow</option>
                <option value="3">Hive Bow</option>
                <option value="3">Icicle Bow</option>
                <option value="2">Jungle Bow</option>
                <option value="3">Lion&nbsp;Longbow</option>
                <option value="3">Living&nbsp;Vine&nbsp;Bow</option>
                <option value="3">Modified Crossbow</option>
                <option value="3">Musician's Bow</option>
                <option value="3">Mycological Bow</option>
                <option value="3">Rift Bow</option>
                <option value="3">Rift Crossbow</option>
                <option value="3">Royal Crossbow</option>
                <option value="3">Silkweaver Bow</option>
                <option value="3">Soulbleeder</option>
                <option value="2">Soulpiercer</option>
                <option value="3">The Devileye</option>
                <option value="3">The Ironworker</option>
                <option value="3">Thorn Spitter</option>
                <option value="3">Triple Bolt Crossbow</option>
                <option value="1">Umbral Bow</option>
                <option value="1">Umbral Crossbow</option>
                <option value="2">Umbral Master Bow</option>
                <option value="2">Umbral Master Crossbow</option>
                <option value="3">Warsinger Bow</option>
              </select>
            </td>
            <td class="no" id="spellbooks" style="width:46%;">Item:
              <select id="itemcat10">
                <option value="none"></option>
                <option value="1">Book of Lies</option>
                <option value="1">Brain in a Jar</option>
                <option value="1">Depth Scutum</option>
                <option value="1">Lion Spellbook</option>
                <option value="1">Shoulder Plate</option>
                <option value="1">Spellbook</option>
                <option value="1">Spellbook of Enlightenment</option>
                <option value="1">Spellbook of Warding</option>
                <option value="1">Spirit Guide</option>
                <option value="1">Umbral Master Spellbook</option>
                <option value="1">Umbral Spellbook</option>
                <option value="1">Wooden Spellbook</option>
              </select>
            </td>
            <td class="no" id="backpacks" style="width:46%;">Item:
              <select id="itemcat11">
                <option value="none"></option>
                <option value="1">Anniversary Backpack</option>
                <option value="1">Backpack</option>
                <option value="1">Backpack of Holding</option>
                <option value="1">Beach Backpack</option>
                <option value="1">Birthday Backpack</option>
                <option value="1">Blue Backpack</option>
                <option value="1">Book Backpack</option>
                <option value="1">Brocade Backpack</option>
                <option value="1">Buggy Backpack</option>
                <option value="1">Cake Backpack</option>
                <option value="1">Camouflage Backpack</option>
                <option value="1">Crown Backpack</option>
                <option value="1">Crystal Backpack</option>
                <option value="1">Deepling Backpack</option>
                <option value="1">Demon Backpack</option>
                <option value="1">Dragon Backpack</option>
                <option value="1">Energetic Backpack</option>
                <option value="1">Expedition Backpack</option>
                <option value="1">Feedbag</option>
                <option value="1">Festive&nbsp;Backpack</option>
                <option value="1">Fur Backpack</option>
                <option value="1">Glooth Backpack</option>
                <option value="1">Golden Backpack</option>
                <option value="1">Ghost&nbsp;Backpack</option>
                <option value="1">Green Backpack</option>
                <option value="1">Grey Backpack</option>
                <option value="1">Heart Backpack</option>
                <option value="1">Jewelled Backpack</option>
                <option value="1">Minotaur Backpack</option>
                <option value="1">Moon Backpack</option>
                <option value="1">Mushroom Backpack</option>
                <option value="1">Old and Used Backpack</option>
                <option value="1">Orange Backpack</option>
                <option value="1">Pannier Backpack</option>
                <option value="1">Pillow Backpack</option>
                <option value="1">Pirate Backpack</option>
                <option value="1">Purple Backpack</option>
                <option value="1">Raccoon Backpack</option>
                <option value="1">Red Backpack</option>
                <option value="1">Santa Backpack</option>
                <option value="1">Winged&nbsp;Backpack</option>
                <option value="1">Wolf Backpack</option>
                <option value="1">Yellow Backpack</option>
            </select>
          </td>
          <td style="width:10%;"><span class="no" id="slots"></span> </td>
          <td> <span class="itemimg"><img src="https://www.tibiawiki.com.br/images/3/35/Trans.gif" id="imagem" align="right" /></span> </td>
         </tr>
      </table>
    </td>
  </tr>
  <tr>
     <td style="height: 30px;" colspan="2">
      <div class="titulo">Opções para Imbuir</div>
     </td>
  </tr>
  <tr>
    <td style="vertical-align: top; height: 127px;">
      <table>
         <tr style="height:104px">
          <td>
            <table class="tabela_opcoes">
              <tr>
                <td>
                  <select id="elemento" multiple style="overflow:hidden;">
                    <option id="msg">Selecione uma categoria...</option>
                    <option class="no" id="msg3">Selecione um item...</option>
                    <option class="no" id="deathd">Aumento do dano de Death</option>
                    <option class="no" id="earthd">Aumento do dano de Earth</option>
                    <option class="no" id="fired">Aumento do dano de Fire</option>
                    <option class="no" id="iced">Aumento do dano de Ice</option>
                    <option class="no" id="energyd">Aumento do dano de Energy</option>
                    <option class="no" id="holyd">Aumento do dano de Holy</option>
                    <option class="no" id="life">Life Leech</option>
                    <option class="no" id="mana">Mana Leech</option>
                    <option class="no" id="critical">Hit Crítico</option>
                    <option class="no" id="deathp">Redução no dano de Death</option>
                    <option class="no" id="earthp">Redução no dano de Earth</option>
                    <option class="no" id="firep">Redução no dano de Fire</option>
                    <option class="no" id="icep">Redução no dano de Ice</option>
                    <option class="no" id="energyp">Redução no dano de Energy</option>
                    <option class="no" id="holyp">Redução no dano de Holy</option>
                    <option class="no" id="axe">Aumento de Axe Fighting</option>
                    <option class="no" id="sword">Aumento de Sword Fighting</option>
                    <option class="no" id="club">Aumento de Club Fighting</option>
                    <option class="no" id="distance">Aumento de Distance Fighting</option>
                    <option class="no" id="shield">Aumento de Shielding</option>
                    <option class="no" id="magic">Aumento de Magic Level</option>
                    <option class="no" id="speed">Aumento de Speed</option>
                    <option class="no" id="vibrancy">Remoção de Paralisia</option>
                    <option class="no" id="capacity">Aumento de Capacidade</option>
                  </select>
                </td>
              </tr>
            </table>
          </td>
          <td>
             <table class="tabela_opcoes">
              <tr>
                <td>
                  <select id="tipo" multiple="multiple" style="overflow:hidden;">
                    <option id="msg1">Selecione uma categoria...</option>
                    <option class="no" id="msg2">Selecione um item...</option>
                    <option class="no" id="basic">Basic Lich Shroud</option>
                    <option class="no" id="intricate">Intricate Lich Shroud (premium)</option>
                    <option class="no" id="powerful">Powerful Lich Shroud (premium)</option>
                  </select>
                </td>
              </tr>
            </table>
          </td>
         </tr>
         <tr>
            <td colspan="2">
              <span class="no" id="boost">Aumenta sua habilidade em <span id="skill"></span> by <span id="skillval">1</span>.</span>
              <span class="no" id="damage">Converte <span id="damageval">10%</span> de dano físico para <span id="damages"></span> dan..</span>
              <span class="no" id="boost">Aumenta sua habilidade <span id="skill"></span> by <span id="skillval">1</span>.</span>
              <span class="no" id="damage">Converte <span id="damageval">10%</span> de dano físico para <span id="damages"></span> dan..</span>
              <span class="no" id="lleech">Converte <span id="lifeval">35%</span> do dano para hit points com chance de 50%.</span>
              <span class="no" id="protect">Reduz <span id="damages2"></span> dano <span id="protectval">3%</span>.</span>
              <span class="no" id="protectdeath">Reduz dano de death em <span id="protectdeathval">2%</span>.</span>
              <span class="no" id="mleech">Converte <span id="manaval">10%</span> do dano para mana com chance de 30%.</span>
              <span class="no" id="chit">Dano extra de crítico: <span id="criticalval">15%</span>.Chance de acerto crítico: 10%.</span>
              <span class="no" id="paralisia">Chance de remover paralisia em <span id="vibrval">15%</span>.</span>
              <span class="no" id="velocidade">Aumenta sua velocidade em <span id="speedval">10%</span>.</span>
              <span class="no" id="capacidade">Aumenta sua capacidade em <span id="capval">3%</span>.</span>
              <br> Dura por 20h 0min enquanto equipado </td>
          </tr>
        <tr>
          <td> Requer as seguintes fontes astrais: </td>
          <td valign="bottom" style="text-align:right;"> Taxa de sucesso: <span id="chance">0%</span><span class="no" id="chancecharm" style="color:green;">100%</span>
            <br /> </td>
         </tr>
      </table>
  </tr>
  <tr>
    <td colspan="2">
      <table style="width:100%;">
        <tr>
          <td style="width:18%;">
            <div class="source1"><span class="tooltip"><img src="https://www.tibiawiki.com.br/images/3/35/Trans.gif" /></span><span class="tip2" id="fonte1" style="display:none"></span></div>
          </td>
          <td style="width:18%;">
             <div class="source2"><span class="tooltip"><img src="https://www.tibiawiki.com.br/images/3/35/Trans.gif" /></span><span class="tip2" id="fonte2" style="display:none"></span></div>
          </td>
          <td style="width:17%;">
            <div class="source3"><span class="tooltip"><img src="https://www.tibiawiki.com.br/images/3/35/Trans.gif" /></span><span class="tip2" id="fonte3" style="display:none"></span></div>
          </td>
          <td style="width:25%;">
            <div style="margin:0 auto;width:137px;">
              <div id="charmoff" style="height:22px">Protection Charm</div>
              <div class="no" id="charm" style="height:22px;">Protection Charm</div>
             </div>
             </div>
          </td>
            <div class="imbument-tool-category-box">
          <td style="text-align:center;"> Custo total: </td>
                <label for="">Items:</label>
         </tr>
                <div class="imbument-tool-search-box">
         <tr>
                    <input id="imbument-tool-input-search" type="text" placeholder="buscar por item...">
          <td class="titulo"> <span id="source1">0</span> </td>
                    <div><i>&#x1F50D;</i></div>
          <td class="titulo"> <span id="source2">0</span> </td>
                </div>
          <td class="titulo"> <span id="source3">0</span> </td>
                <select id="imbuement-tool-items-list" size="10">
          <td class="titulo"> <span id="preco">0</span> gps </td>
                </select>
          <td class="titulo"> <span id="total">0</span><span class="no" id="totalcharm">15,000</span> gps </td>
            </div>
        </tr>
         </div>
      </table>
         <div class="imbument-tool-items">
    </td>
            <div class="imbument-tool-items-data-box">
    <td>
                <div class="imbument-tool-items-data-image-box">
  </tr>
                    <img id="imbument-tool-items-image" src="" alt="item-image">
</table>
                </div>
                <div class="imbument-tool-items-data-box-data">
                    <label id="imbument-tool-items-name"><span class="label">Item:</span> Dauntless Dragon Scale Armor</label>
                    <label id="imbument-tool-items-slots"><span class="label">Slots:</span> 2</label>
                </div>
            </div>
        </div>
    </div>
    <div class="imbument-tool-imbuements-panel">
        <div class="imbument-tool-imbuements-level-box">
            <h2>Nível do Imbuement</h2>
            <div class="imbuement-tool-level-list">
            </div>
        </div>
        <span class="imbument-tool-divisor-line"></span>
        <div class="imbument-tool-imbuements-data-box">
            <h2>Imbuements</h2>
            <div class="imbuement-tool-data-table">
            </div>
        </div>
        <span class="imbument-tool-divisor-line"></span>
        <div class="imbument-tool-imbuements-data-box">
            <h2>Imbuements Items</h2>
            <h3 id="imbuement-tool-selected-imbuement-description"></h3>
            <div class="imbuement-tool-list-items">
            </div>
        </div>
        <span class="imbument-tool-divisor-line"></span>
        <div class="imbument-tool-imbuements-data-box">
            <h2>Informações</h2>
            <div class="imbuement-tool-prices">
                <div class="imbuement-tool-prices-items">
                </div>
                <div class="imbuement-tool-prices-taxas-info">
                    <h3>Valores</h3>
                    <!-- <span class="imbument-tool-divisor-line"></span> -->
                    <div class="imbuement-tool-prices-taxas-info-items"
                    </div>
                    <span class="imbument-tool-divisor-line"></span>
                    <label id="lbl-total-gold-token">Total com Gold Token: 500000 GPs</label>
                    <label id="lbl-total-items">Total com os Items: 0 GPs</label>
                </div>
            </div>
        </div>
    </div>
</div>  
</pre>
</pre>


<pre id="imbuing_css">
<pre id="imbuing_css">
.imbuing_main_table {
    .imbuement-tool-panel {
  border: #7B6E4C 1px solid;
        display: flex;
  background: #181E23;
        max-width: 870px;
  margin: 2px;
        position: relative;
  -webkit-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
        border: 2px solid #a2a9b1;
  -moz-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
        background: #ffffff;
  box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
        border-radius: 5px;
  font-family: Verdana, Arial, Times New Roman, sans-serif;
        -webkit-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
  font-size: 13px;
        -moz-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
  color: #B2A898;
        box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
}
        font-family: Verdana, Arial, Times New Roman, sans-serif;
        font-size: 13px;
        color: black;
    }
    .imbument-tool-loading {
        z-index: 9999;
        background-color: rgba(255, 255, 255, 0.98);
        display: inline-block;
        border-radius: 3px;
        position: absolute;
        height: 100%;
        width: 100%;
        top: 0;
        left: 0;
        align-content: center;
        text-align: center;
    }
 
    .imbument-tool-loading>label {
        position: relative;
        bottom: 0px;
        text-align: center;   
        font-size: math;
        background: transparent;
    }
    .imbument-tool-loading > span {
        text-align: center;
        align-content: center;
        background-color: #c7451d;
        height: 32px;
        width: 100%;
        position: absolute;
        bottom: 0px;
        left: 0px;
        text-align: center;   
        font-size: math;
        border-bottom-left-radius: 3px;
        border-bottom-right-radius: 3px;
    }
    .imbument-tool-menu-side {
        width: 320px;
        background-color: #c7451d;
        padding: 5px;
        color: white;
        border-top-left-radius: 3px;
        border-bottom-left-radius: 3px;
    }
    .imbument-tool-menu-side > h2 {
        width: 100%;
        text-align: center;
        padding-bottom: 15px;
        border-bottom: 1px solid black;
        font-family: Verdana, Arial, Times New Roman, sans-serif;
        font-weight: bold;
        color: white;
    }
    .imbument-tool-radio-box {
        margin-top: 15px;
        display: flex;
        margin-top: 2px;
    }
    .imbument-tool-radio-box > label {
        font-size: 15px;
        font-weight: bold;
    }
    .imbument-tool-category-box {
        margin-top: 15px;
        width: 100%;
        display: block;
    }
    .imbument-tool-category-box > label {
        width: 100%;
        margin-left: 2px;
        font-weight: bold;
    }
    .imbument-tool-category-box > select {
        margin-top: 5px;
        width: 100%;
        min-height: 32px;
        font-weight: bold;
        border-radius: 5px;
        border: 1px solid black;
    }
    .imbument-tool-search-box {
        margin-top: 5px;
        width: 100%;
        display: flex;
    }
    .imbument-tool-search-box > input {
        width: calc(100% - 25px);
        height: 28px;
        border: 1px solid black;
        border-bottom-left-radius: 5px;
        border-top-left-radius: 5px;
    }
    .imbument-tool-search-box > div {
        width: 25px;
        height: 30px;
        background-color: white;
        border-left: none;
        border-right: 1px solid black;
        border-top: 1px solid black;
        border-bottom: 1px solid black;
        border-bottom-right-radius: 5px;
        border-top-right-radius: 5px;
        align-content: center;
        text-align: center;
    }
    .imbument-tool-imbuements-panel {
        display: block;
        width: calc(100% - 330px);
        padding: 5px;
    }
    .imbument-tool-items {
        width: 100%;
        margin-top: 15px;
    }
    .imbument-tool-items-data-box {
        display: flex;
    }
    .imbument-tool-items-data-box > .imbument-tool-items-data-image-box {
        width: 50px;
        height: 50px;
        background-color: white;
        border: 1px solid black;
        border-radius: 5px;
        align-content: center;
        text-align: center;
    }
    .imbument-tool-items-data-box-data {
        margin-left: 5px;
    }
    .imbument-tool-items-data-box-data > label {
        width: 100%;
        display: block;
        margin-bottom: 7px;
        font-weight: bold;
        font-size: 15px;
        text-align: left;
    }
    .imbument-tool-divisor-line {
        display: flex;
        flex-flow: row wrap;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        border-bottom: 1px solid black;
        padding: 0.25rem;
        width: calc(100% - 15px);
    }
 
    .imbument-tool-version-label {
        font-size: 14px;
        font-weight: bold;
        text-align: center;
        display: block;
        position: absolute;
        top: 5px;
        left: 5px;
        color: white;
    }
    #imbument-tool-items-container {
        display: block;
    }
 
    .imbument-tool-imbuements-level-box {
        width: 100%;
    }
    .imbument-tool-imbuements-level-box > h2 {
        width: 100%;
        text-align: center;
        font-family: Verdana, Arial, Times New Roman, sans-serif;
        font-weight: bold;
        border: none;
    }
    .imbuement-tool-level-list {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
    }
 
    .imbuement-tool-level-list-item {
        display: flex;
        width: 100px;
        height: 50px;
        margin: 5px;
        flex-shrink: 0;
        align-content: center;
        text-align: center;
        border-radius: 5px;
        border: 1px solid black;
        justify-content: center;
        align-items: center;
    }
    .imbuement-tool-level-list-item:hover {
        background-color: #c04e2b;
    }
    .imbuement-tool-level-list-item.selected {
        background-color: #c7451d;
    }
    .imbuement-tool-level-list-item > label {
        font-weight: bold;
        flex-shrink: 0;
        margin-right: 5px;
    }
    .imbuement-tool-level-list-item > div {
        font-weight: bold;
        flex-shrink: 0;
    }
    .imbuement-tool-level-list-item-level {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .imbuement-tool-level-list-item-level > img {
        flex-shrink: 0;
        width: 10px;
        scale: 150%;
    }
 
    .imbument-tool-imbuements-data-box {
        width: 100%;
        min-height: 140px;
        display: block;
    }
    .imbument-tool-imbuements-data-box > h2, .imbument-tool-imbuements-data-box > h3 {
        width: 100%;
        text-align: center;
        align-content: center;
        font-family: Verdana, Arial, Times New Roman, sans-serif;
        font-weight: bold;
        border: none;
    }
    .imbuement-tool-data-table {
        display: block;
        width: 100%;
        max-height: 200px;
        overflow-y: auto;
    }
    .imbuement-tool-data-table-line {
        display: block;
        width: 100%;
    }
    .imbuement-tool-data-list {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .imbuement-tool-data-list-item {
        width: 64px;
        height: 64px;
        margin: 5px;
        border-radius: 5px;
        /* border: 2px solid black; */
    }
    .imbuement-tool-data-list-item.selected {
        width: 66px;
        height: 66px;
        filter: brightness(1.75);
        border: 0.15rem solid chocolate;
    }
    .imbuement-tool-data-list-item.selected > img {
        border-radius: 2px;
    }
    .imbuement-tool-data-list-item > img {
        width: 100%;
        scale: 100%;
        border-radius: 5px;
    }
    .imbuement-tool-data-list-item:hover {
        width: 66px;
        height: 66px;
        filter: brightness(1.25);
    }
    .imbuement-tool-list-items {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .imbuement-tool-list-items-box {
        background-color: #f3f3f3;
        margin: 5px;
        width: 64px;
        height: 64px;
        border: 1px solid black;
        border-radius: 5px;
        display: block;
        flex-shrink: 0;
        text-align: center;
        align-content: center;
    }
    .imbuement-tool-list-items-box > div {
        width: 100%;
        height: 44px;
        text-align: center;
        align-content: center;
    }
    .imbuement-tool-list-items-box > div > img {
        width: 32px;
    }
    .imbuement-tool-list-items-box > label {
        display: block;
        font-weight: bold;
        color: white;
        width: 100%;
        height: 20px;
        text-align: center;
        align-content: center;
        border-top: 1px solid black;
        background-color: #c7451d;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
    }
 
    .imbuement-tool-prices {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }


.titulo {
    .imbuement-tool-prices-items {
  position: relative;
        width: 50%;
  margin: 1px 2px 0 2px;
        margin-left: 10px;
  border: #7B6E4C 1px solid;
        display: block;
  background: #11161A;
        flex-shrink: 0;
  padding: 0 auto;
    }
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  cursor: default;
}


table.tabela_opcoes select {
    .imbuement-tool-prices-items-box {
  background: #11161A;
        width: 100%;
  width: 272px;
        height: 55px;
  height: 90px;
        display: flex;
  margin-top: -2px;
        justify-content: center;
  padding: 1px 1px 1px 1px;
        align-items: center;
  border: #CBB47A 1px solid;
    }
  border-collapse: separate;
  font-family: Verdana, Arial, Times New Roman, sans-serif;
  font-size: 13px;
  color: #B2A898;
}


table.tabela_opcoes td {
    .imbuement-tool-prices-items-box > a {
  width: 10px;
        height: 100%;
  height: 10px;
        text-align: center;
}
        align-content: end;
    }
    .imbuement-tool-prices-items-box > a > img {
        width: 32px;
        border: 1px solid black;
        border-radius: 5px;
    }
    .imbuement-tool-prices-items-box > div {
        height: 40px;
      margin: 0px 5px 0px 5px;   
    }
    .imbuement-tool-prices-items-box > div > label {
        font-weight: bold;
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .imbuement-tool-prices-items-box > div > input {
        width: 90%;
        text-align: center;
        border: 1px solid black;
        border-radius: 3px;
        height: 23px;
    }
 
    .imbuement-tool-prices-taxas-info {
        width: 50%;
        min-height: 200px;
        padding: 5px;
        border-left: 1px solid black;
        display: block;
        flex-shrink: 0;
    }
 
    .imbuement-tool-prices-taxas-info > h3 {
        width: 100%;
        margin: 0px 0px 15px 0px;
        text-align: center;
        align-content: center;
    }
    .imbuement-tool-prices-taxas-info > div {
        width: 100%;
        display: block;
        margin-top: 5px;
    }
    .imbuement-tool-prices-taxas-info > label {
        display: block;
        width: 100%;
        height: 20px;
        margin-top: 5px;
        font-weight: bold;
        text-align: left;
    }
    .imbuement-tool-prices-taxas-info > div > label {
        display: block;
        width: 100%;
        height: 20px;
        font-weight: bold;
        text-align: left;
    }
 
    .mg-top-35px {
        margin-top: 35px;
    }
    .label {
        font-weight: bold;
        font-size: 15px;
    }
    /* Extra small devices (phones, less than 576px) */
    @media (max-width: 575.98px) {
        .imbuement-tool-panel {
            width: calc(100% - 5px);
            display: block;
        }
 
        .imbument-tool-menu-side {
            width: calc(100% - 10px);
            border-top-left-radius: 3px;
            border-top-right-radius: 3px;
        }
 
        .imbument-tool-imbuements-panel {
            width: 100%;
        }
 
        .imbuement-tool-prices {
            display: block;
        }
        .imbuement-tool-prices-items, .imbuement-tool-prices-taxas-info {
            width: calc(100% - 20px);
            border-left: none;
        }
        .imbuement-tool-data-list-item, .imbuement-tool-data-list-item.selected {
            height: 100%;
        }
    }
</pre>


.tabela_opcoes option:hover {
<pre id="imbuing_js">
  -webkit-box-shadow: inset 0 0 0 1px rgba(200, 188, 170, 1), inset 0 0 0 2px rgba(34, 34, 34, 0.65);
const version = "3.0.1";
  -moz-box-shadow: inset 0 0 0 1px rgba(200, 188, 170, 1), inset 0 0 0 2px rgba(34, 34, 34, 0.65);
    var categories = new Object();
  box-shadow: inset 0 0 0 1px rgba(200, 188, 170, 1), inset 0 0 0 2px rgba(34, 34, 34, 0.65);
    var selectedImbuementLevel = "";
}
    var imbuementScrolls = {
        "Blank Imbuement Scroll": {
            "slots": 1,
            "imbuements": {
                "Vampirism": ["Intricate", "Powerful"],
                "Void": ["Intricate", "Powerful"],
                "Strike": ["Intricate", "Powerful"],
                "Featherweight": ["Intricate", "Powerful"],
                "Swiftness": ["Intricate", "Powerful"],
                "Vibrancy": ["Intricate", "Powerful"],
                "Reap": ["Intricate", "Powerful"],
                "Venom": ["Intricate", "Powerful"],
                "Scorch": ["Intricate", "Powerful"],
                "Frost": ["Intricate", "Powerful"],
                "Electrify": ["Intricate", "Powerful"],
                "Cloud Fabric": ["Intricate", "Powerful"],
                "Demon Presence": ["Intricate", "Powerful"],
                "Dragon Hide": ["Intricate", "Powerful"],
                "Lich Shroud": ["Intricate", "Powerful"],
                "Quara Scale": ["Intricate", "Powerful"],
                "Snake Skin": ["Intricate", "Powerful"],
                "Bash": ["Intricate", "Powerful"],
                "Blockade": ["Intricate", "Powerful"],
                "Chop": ["Intricate", "Powerful"],
                "Epiphany": ["Intricate", "Powerful"],
                "Precision": ["Intricate", "Powerful"],
                "Slash": ["Intricate", "Powerful"],
                "Punch": ["Intricate", "Powerful"]
            }
        }
    }
    var goldToken = {
        "name": "Gold Token",
        "quantity": 6,
        "link": "https://www.tibiawiki.com.br/wiki/Gold_Token",
        "image": "https://www.tibiawiki.com.br/images/0/0b/Gold_Token.gif"
    }


.source1,
    var loadAllItens = async () => {
.source2,
        let baseURL = '';
.source3,
        $('.imbument-tool-loading label').text('Loading Imbuements and Itens for You, Adventurer!...');
.itemimg img {
        await Promise.all([
  position: relative;
            loadData(baseURL, 'imbuements', 'Imbuements'),
  margin: 1px 2px 0 2px;
            loadData(baseURL, 'armors', 'Armors'),
  border: #7B6E4C 1px solid;
            loadData(baseURL, 'backpacks', 'Backpacks'),
  background: #11161A;
            loadData(baseURL, 'boots', 'Boots'),
  padding: 0 auto;
            loadData(baseURL, 'fists', 'Fists'),
  height: 32px;
            loadData(baseURL, 'helmets', 'Helmets'),
  width: 32px;
            loadData(baseURL, 'clubs', 'Clubs'),
  text-align: center;
            loadData(baseURL, 'distance', 'Distance'),
  cursor: default;
            loadData(baseURL, 'shields', 'Shields'),
}
            loadData(baseURL, 'swords', 'Swords'),
            loadData(baseURL, 'axes', 'Axes'),
            loadData(baseURL, 'spellbooks', 'Spellbooks'),
            loadData(baseURL, 'wandsRods', 'WandsRods')
        ]).then((results) => {
            categories = {
                "Armaduras": armors,
                "Backpacks": backpacks,
                "Botas": boots,
                "Capacetes": helmets,
                "Clavas": clubs,
                "Distância": distance,
                "Escudos": shields,
                "Espadas": swords,
                "Machados": axes,
                "Punhos": fists,
                "Spellbooks": spellbooks,
                "Wands e Rods": wandsRods
            }
            loadCategories();
            $('.imbument-tool-loading')[0].style.display = 'none';
            console.log("Load Done!");
        }).catch((error) => {
            showAlert();
            console.error('Error:', error);
        });
    }


.no,
    var loadData = async (baseURL, varName, path) => {
#no {
        return new Promise((resolve, reject) => {
  display: none;
            $.ajax({
}
                contentType: 'text/plain; charset=utf-8',
                url: baseURL + '/index.php?title=Tibia_Wiki:' + path + '/json&action=raw',
                type: 'GET',
                success: function(data) {
                    callbacks(data.replace(/<pre id="[^"]*">/gi, '').replace(/<\/pre>/gi, ''), varName);
                    resolve('Loaded: ' + varName);
                },
                error: function(error) {
                    console.error(error);
                    callbacks(null, varName);
                }
            });
        });
    }


.scrolloff {
    var callbacks = (codigo, varName) => {
  overflow: hidden;
        if (codigo == null) {
}
            codigo = "";
        } else {
            console.log('Loaded:', varName);
            window[varName] = JSON.parse(codigo);
        }
    }


.source1,
    var loadCategories = () => {
.source2,
        const categoriesSelect = document.getElementById('imbuement-tool-items-category');
.source3 {
        if (Object.keys(categories).length === 0 || categoriesSelect == null) {
  margin: 0 auto;
            showAlert();
  width: 34px;
            return;
}
        }
        Object.keys(categories).forEach(category => {
            let option = document.createElement('option');
            option.value = category;
            option.innerHTML = category;
            categoriesSelect.appendChild(option);
        });
        if (categoriesSelect.children.length > 0) {
            categoriesSelect.children[0].setAttribute('selected', true);
            loadItemList();
        }
    }


#categoria,
    var loadItemList = (listItems) => {
#itemcat1,
        const category = getSelectedCategory();
#itemcat2,
        const itemsList = document.getElementById('imbuement-tool-items-list');
#itemcat3,
        if (Object.keys(categories[category]).length === 0 || itemsList == null) {
#itemcat4,
            showAlert();
#itemcat5,
            return;
#itemcat6,
        }       
#itemcat7,
        itemsList.innerHTML = '';
#itemcat8,
        const listOfItems = (listItems == null) ? categories[category] : listItems;
#itemcat9,
        Object.keys(listOfItems).forEach(item => {
#itemcat10,
            let option = document.createElement('option');
#itemcat11 {
            option.value = item;
  border: #7B6E4C 1px solid;
            option.innerHTML = item;
  background: #1F2A31;
            itemsList.appendChild(option);
  height: 18px;
        });
  line-height: 18px;
  text-align: center;
  display: inline-block;
  vertical-align: top;
  white-space: nowrap;
  font-family: Verdana, Arial, Times New Roman, sans-serif;
  font-size: 13px;
  color: #B2A898;
}


#charmoff,
        if (itemsList.children.length > 0) {
#charm {
            itemsList.children[0].setAttribute('selected', true);
  background-image: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Imbuing_Botao.png');
            selectItem();
  cursor: pointer;
        }
  text-align: center;
    }
}


#charmoff:hover,
    var selectItem = () => {
#charm:hover {
        const selectedCategory = document.getElementById('imbuement-tool-items-category').value;
  background-image: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Imbuing_Botao_Hover.png');
        const selectedItem = document.getElementById('imbuement-tool-items-list').value;
}


.tabela_opcoes select::-webkit-scrollbar {
        const itemNameLabel = document.getElementById('imbument-tool-items-name');
  width: 18px;
        const itemSlotsLabel = document.getElementById('imbument-tool-items-slots');
}
        const itemImage = document.getElementById('imbument-tool-items-image');


.tabela_opcoes select::-webkit-scrollbar-button:start {
        itemNameLabel.innerHTML = `<span class="label">Item:</span> ${getSelectedItemName()}`;
  background: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Outfiter_Scrollbar_Seta_Cima.png');
        itemSlotsLabel.innerHTML = `<span class="label">Slots:</span> ${getSelectedItemObject().slots}`;
  border: black 1px solid;
        itemImage.setAttribute('src', "https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/" + getSelectedItemName() + ".gif");
  border-radius: 2px;
  height: 18px;
}


.tabela_opcoes select::-webkit-scrollbar-button:start:hover {
        loadImbuementsLevel();
  background: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Outfiter_Scrollbar_Seta_Cima_Hover.png');
        createImbuementsLine();
}
    }


.tabela_opcoes select::-webkit-scrollbar-button:start:active {
    var selectImbuementLevel = (component) => {
  background: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Outfiter_Scrollbar_Seta_Cima_Active.png');
        cleanSelectedImbuementLevel();
}
        component.classList.add("selected");
        selectedImbuementLevel = component.getAttribute('level');
        createImbuementsLine();
    }


.tabela_opcoes select::-webkit-scrollbar-button:end {
    var loadImbuementsLevel = () => {
  background: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Outfiter_Scrollbar_Seta_Baixo.png');
       
  border: black 1px solid;
        const imbuementLevelLists = document.getElementsByClassName("imbuement-tool-level-list");
  border-radius: 2px;
        if (imbuementLevelLists == null || imbuementLevelLists.length === 0) {
  height: 18px;
            showAlert();
}
            return;
        }
        const componentList = imbuementLevelLists[0];
        componentList.innerHTML = "";


.tabela_opcoes select::-webkit-scrollbar-button:end:hover {
        const selectedItem = getSelectedItemObject();
  background: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Outfiter_Scrollbar_Seta_Baixo_Hover.png');
        const selectedItemImbuements = selectedItem.imbuements;
}


.tabela_opcoes select::-webkit-scrollbar-button:end:active {
        selectedItemImbuements[Object.keys(selectedItemImbuements)[0]].forEach(level => {
  background: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Outfiter_Scrollbar_Seta_Baixo_Active.png');
            const componentLevel = createImbuementLevelButton(level);
}
            componentList.appendChild(componentLevel);
        });
        const mostLevelImbuement = document.getElementsByClassName("imbuement-tool-level-list-item");
        if (mostLevelImbuement == null || mostLevelImbuement.length === 0) {
            showAlert();
            return;
        }
        if (selectedImbuementLevel.length === 0) {
            mostLevelImbuement[mostLevelImbuement.length - 1].classList.add("selected");
            selectedImbuementLevel = mostLevelImbuement[mostLevelImbuement.length - 1].getAttribute('level');
        } else {
            const indexes = Object.keys(mostLevelImbuement).filter(index => mostLevelImbuement[index].getAttribute('level') === selectedImbuementLevel);
            mostLevelImbuement[indexes[0]].classList.add('selected');
        }
    }


.tabela_opcoes select::-webkit-scrollbar-track {
    var createImbuementLevelButton = (level) => {
  background: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Outfiter_Scrollbar_Caminho.png');
}


.tabela_opcoes select::-webkit-scrollbar-thumb {
        const btn = document.createElement("div");
  background: url('https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/Outfiter_Scrollbar_Barra.png');
        btn.classList.add("imbuement-tool-level-list-item");
  border: black 1px solid;
        btn.setAttribute("level", level);
  border-radius: 2px;
        btn.addEventListener('click', function() {
  -webkit-box-shadow: inset 0px 1px 0px 0px rgba(100, 106, 108, 1), inset 0px -1px 0px 0px rgba(23, 28, 29, 1);
            selectImbuementLevel(this);
}
        }, false);


        const imgBox = document.createElement("div");
        imgBox.classList.add("imbuement-tool-level-list-item-level");


/* Tooltip */
        const label = document.createElement("label");
        label.innerText = level;


.tip2 {
        let indexLevel = 1;
  background-color: #F2F2F2;
        switch (level) {
  border-radius: 2px;
            case("Intricate"): {
  box-shadow: 0 0 6px #B2B2B2;
                indexLevel = 2;
  display: none;
                break;
  position: absolute;
            }
  padding: 10px;
            case("Powerful"): {
  z-index: 1;
                indexLevel = 3;
}
                break;
            }
            default: {
                indexLevel = 1;
                break;
            }
        }
        for(let i = 0; i < indexLevel; i++) {
            const img = document.createElement('img');
            img.setAttribute('src', 'https://www.tibiawiki.com.br/images/2/2f/The_Heart_of_the_Sea.gif');
            img.setAttribute('alt', 'level');
            imgBox.appendChild(img);
        }
        btn.appendChild(imgBox);
        btn.appendChild(label);
        return btn;
    }


.tooltip {
    var createImbuementsLine = () => {
  position: relative;
        const selectedItem = getSelectedItemObject();
}
        const selectedItemImbuements = selectedItem.imbuements;


.tooltip,
        const tables = document.getElementsByClassName('imbuement-tool-data-table');
.tooltip:hover + .tip2,
        if (tables == null || tables.length === 0) {
.tip2:hover {
            showAlert();
  display: block;
            return;
}
        }
</pre>
        const table = tables[0];
        table.innerHTML = "";
        let indexLine = 0;
        let tableLine = null;
        let tableDataLineList = null;
        Object.keys(selectedItemImbuements).forEach(imbuement => {
            if (indexLine === 0) {
                tableLine = document.createElement("div");
                tableLine.classList.add("imbuement-tool-data-table-line");
 
                tableDataLineList = document.createElement("div");
                tableDataLineList.classList.add("imbuement-tool-data-list");
 
                tableLine.appendChild(tableDataLineList);
            }
 
            const itemList = createImbuementsItem(imbuement);
            if (itemList) {
                tableDataLineList.appendChild(itemList);
            }
 
            indexLine++;
            if (indexLine === 6 || indexLine === Object.keys(selectedItemImbuements).length) {
                table.append(tableLine);
                indexLine = 0;
            }
        });
 
        const imbuementComponent = document.getElementsByClassName("imbuement-tool-data-list-item")[0];
        selectImbuementCell(imbuementComponent);
    }
 
    var createImbuementsItem = (imbuementName) => {
        const imbuement = imbuements[imbuementName];
        const imbuementLevel = getSelectedImbuementLevel();
        const selectedItem = getSelectedItemObject();
        if (!selectedItem.imbuements[imbuementName].includes(imbuementLevel)) {
            return;
        }
 
        const divItem = document.createElement('div');
        divItem.classList.add("imbuement-tool-data-list-item");
        divItem.setAttribute("imbuement-name", imbuementName);
        divItem.setAttribute("imbuement-level", imbuementLevel);
        divItem.setAttribute("title", imbuementName.concat(" | ").concat(imbuement.name));
 
        const img = document.createElement('img');
        img.setAttribute('src', imbuement.level[imbuementLevel].image);
 
        divItem.appendChild(img);
 
        divItem.addEventListener('click', function() {
            selectImbuementCell(this);
        }, false);


<pre id="imbuing_js">
         return divItem;
$(document).ready(function() {
  $("#categoria").change(function() {
    var cat = $("#categoria").children("option").filter(":selected").val();
    var itemcat = '#itemcat' + $(this).val();
    if (cat == '1') {
      $('#armaduras, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#escudos, #backpacks, #botas, #espadas, #machados, #clavas, #capacetes, #wandserods, #distancias, #spellbooks, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '2') {
      $('#escudos, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #backpacks, #botas, #espadas, #machados, #clavas, #capacetes, #wandserods, #distancias, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '3') {
      $('#botas, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #escudos, #backpacks, #espadas, #machados, #clavas, #capacetes, #wandserods, #distancias, #spellbooks, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '4') {
      $('#espadas, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #escudos, #backpacks, #botas, #machados, #clavas, #capacetes, #wandserods, #distancias, #spellbooks, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '5') {
      $('#machados, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #escudos, #backpacks, #botas, #espadas, #clavas, #capacetes, #wandserods, #distancias, #spellbooks, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '6') {
      $('#clavas, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #escudos, #backpacks, #botas, #espadas, #machados, #capacetes, #wandserods, #distancias, #spellbooks, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '7') {
      $('#capacetes, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #escudos, #backpacks, #botas, #espadas, #machados, #clavas, #wandserods, #distancias, #spellbooks, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '8') {
      $('#wandserods, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #escudos, #backpacks, #botas, #espadas, #machados, #clavas, #capacetes, #distancias, #spellbooks, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '9') {
      $('#distancias, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #escudos, #backpacks, #botas, #espadas, #machados, #clavas, #capacetes, #wandserods, #spellbooks, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '10') {
      $('#spellbooks, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #backpacks, #botas, #espadas, #machados, #clavas, #capacetes, #wandserods, #distancias, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == '11') {
      $('#backpacks, #msg2, #msg3, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #botas, #escudos, #espadas, #machados, #clavas, #capacetes, #wandserods, #spellbooks, #distancias, #msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
    } else if (cat == 'nenhum') {
      $('#msg, #msg1, #charmoff, #chance, #total').removeClass("no");
      $('#armaduras, #escudos, #backpacks, #botas, #espadas, #machados, #clavas, #capacetes, #wandserods, #distancias, #spellbooks, #msg2, #msg3, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm').addClass("no");
      $('#elemento').css({
         "overflow": "hidden"
      });
     }
     }
     $(itemcat).change(function() {
 
      var setimg = $(itemcat).children("option").filter(":selected").text();
     var loadImbuementsItems = () => {
      var slot = $(itemcat).children("option").filter(":selected").val();
        const listItems = document.getElementsByClassName("imbuement-tool-list-items");
      $(".itemimg img").attr("src", "https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/" + setimg + ".gif");
        if (listItems == null || Object.keys(listItems).length === 0) {
      $('#slots').removeClass("no").text('Slots: ' + slot);
            showAlert();
      $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
            return;
      $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        }
      $('#source2, #source3').text('0');
        const itemList = listItems[0];
      $("#tipo").children("option[id='basic']").prop('selected', true);
        itemList.innerHTML = "";
      $("#tipo").children("option[id='intricate']").prop('selected', false);
 
      $("#tipo").children("option[id='powerful']").prop('selected', false);
         const imbuement = getSelectedImbuementObject();
      $('#chance').text('90%').css({
        imbuement.itens.forEach(item => {
         "color": "#B2A898"
            const itemSlot = createImbuementItemSlot(item);
      });
            itemList.appendChild(itemSlot);
      $('#skillval').text('1');
      $('#damageval').text('10%');
      $('#lifeval').text('35%');
      $('#protectval').text('3%');
      $('#manaval').text('10%');
      $('#criticalval').text('15%');
      $('#speedval').text('10%');
      $('#vibrval').text('15%');
      $('#capval').text('3%');
      $('#preco').text('10,000');
      $('#total').text('5,000');
      $('#totalcharm').text('15,000');
      $('#fonte2').css({
        "display": "none"
      });
      $('#fonte3').css({
        "display": "none"
      });
      if (slot == "none") {
        $(".itemimg img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#msg2, #msg3, #charmoff').removeClass("no");
        $('#msg, #msg1, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #holyd, #axe, #sword, #club, #distance, #shield, #magic, #speed, #vibrancy, #life, #mana, #critical, #basic, #intricate, #powerful, #charm, #totalcharm, #chancecharm, #slots, #boost, #damage, #lleech, #protect, #mleech, #chit, #velocidade, #capacidade, #capval').addClass("no");
        $('#elemento').css({
          "overflow": "hidden"
         });
         });
         $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
    }
         $('#source1').text('0');
 
         $('#preco').text('0');
    var createImbuementItemSlot = (imbuementItem) => {
         $('#total').text('0');
 
         $('#chance').text('0%').css({
         const divBox = document.createElement("div");
          "color": "#B2A898"
        divBox.classList.add("imbuement-tool-list-items-box");
        divBox.setAttribute("title", new String(imbuementItem.quantity).concat("x ").concat(imbuementItem.name));
 
        const divImg = document.createElement("div");
        const a = document.createElement("a");
         a.setAttribute('href', imbuementItem.link);
        a.setAttribute('target', "_blank");
        const img = document.createElement("img");
         img.setAttribute('src', imbuementItem.image);
        const label = document.createElement("label");
        label.innerText = imbuementItem.quantity;
 
        a.appendChild(img);
        divImg.appendChild(a);
        divBox.appendChild(divImg);
        divBox.appendChild(label);
 
        return divBox;
    }
 
    var selectImbuementCell = (component) => {
        cleanSelectedImbuementCell();
        component.classList.add('selected');
        const imbuementDescription = document.getElementById('imbuement-tool-selected-imbuement-description');
         imbuementDescription.innerText = imbuements[component.getAttribute('imbuement-name')].level[component.getAttribute('imbuement-level')].description;
 
        loadImbuementsItems();
        loadImbuementItemsInfos();
        loadItemsInfosLine();
         updateTotal();
    }
 
    var loadImbuementItemsInfos = () => {
 
 
        const itemsInfosList = document.getElementsByClassName('imbuement-tool-prices-items');
        if (itemsInfosList == null || Object.keys(itemsInfosList).length === 0) {
            showAlert();
            return;
        }
        const itemsInfosListComponent = itemsInfosList[0];
        itemsInfosListComponent.innerHTML = "";
 
        const imbuement = getSelectedImbuementObject();
        if (imbuement.gold_token) {
            goldToken.quantity = getGoldTokenQuantity();
            const goldTokenBox = createImbuementItemInfoBox(goldToken, 0);
            itemsInfosListComponent.appendChild(goldTokenBox);
        }
        let index = 1;
        imbuement.itens.forEach(item => {
            const itemInfoBox = createImbuementItemInfoBox(item, index);
            itemsInfosListComponent.appendChild(itemInfoBox);
            index++;
         });
         });
      } else if (cat == '2') {
    }
         $('#shield, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #basic, #intricate, #powerful, #charm').removeClass("no");
 
         $('#life, #deathd, #earthd, #fired, #iced, #energyd, #axe, #sword, #club, #distance, #magic, #capacity, #speed, #vibrancy, #mana, #critical, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
    var createImbuementItemInfoBox = (item, indexId) => {
         $('#elemento').removeAttr("style");
 
      } else if (cat == '1') {
        const img = document.createElement('img');
         $('#life, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #basic, #intricate, #powerful, #charm').removeClass("no");
         img.setAttribute('src', item.image);
         $('#deathd, #earthd, #fired, #iced, #energyd, #axe, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #mana, #critical, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
         img.setAttribute('alt', 'imbuement item');
         $('#elemento').removeAttr("style");
 
      } else if (cat == '3') {
        const a = document.createElement('a');
         $('#speed, #vibrancy, #basic, #intricate, #powerful, #charm').removeClass("no");
         a.setAttribute('href', item.link);
         $('#deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #axe, #sword, #club, #distance, #shield, #magic, #life, #mana, #capacity, #critical, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
        a.setAttribute('target', '_blank');
         $('#elemento').css({
         a.setAttribute('title', item.name);
          "overflow": "hidden"
        a.appendChild(img);
 
         const labelQuantity = document.createElement('label');
        labelQuantity.innerText = "Quantidade:";
 
         const inputQuantity = document.createElement('input');
        inputQuantity.setAttribute('value', item.quantity);
        inputQuantity.setAttribute('min', '0');
         inputQuantity.setAttribute('type', 'number');
         inputQuantity.setAttribute('id', 'input-quantity-'.concat(indexId));
         inputQuantity.addEventListener('input', function () {
            updateValues(this, 'quantity', indexId);
         });
         });
      } else if (cat == '7') {
 
         $('#mana, #axe, #sword, #club, #distance, #shield, #basic, #intricate, #powerful, #charm').removeClass("no");
        const divQuantity = document.createElement('div');
         $('#deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #magic, #speed, #vibrancy, #life, #capacity, #critical, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
         divQuantity.appendChild(labelQuantity);
         $('#elemento').removeAttr("style");
         divQuantity.appendChild(inputQuantity);
      } else if (cat == '6') {
 
         $('#deathd, #earthd, #fired, #iced, #energyd, #life, #mana, #critical, #club, #basic, #intricate, #powerful, #charm').removeClass("no");
         const labelPrice = document.createElement('label');
         $('#deathp, #earthp, #firep, #icep, #energyp, #holyp, #axe, #sword, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
        labelPrice.innerText = "Valor Unitário (GPs):";
         $('#elemento').removeAttr("style");
 
      } else if (cat == '9') {
        const inputPrice = document.createElement('input');
         $('#life, #mana, #critical, #distance, #basic, #intricate, #powerful, #charm').removeClass("no");
         inputPrice.setAttribute('value', 0);
         $('#deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #axe, #sword, #club, #shield, #magic, #capacity, #speed, #vibrancy, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
         inputPrice.setAttribute('min', '0');
        $('#elemento').css({
         inputPrice.setAttribute('type', 'number');
          "overflow": "hidden"
         inputPrice.setAttribute('id', 'input-price-'.concat(indexId));
         inputPrice.addEventListener('input', function () {
            updateValues(this, 'price', indexId);
         });
         });
      } else if (cat == '4') {
 
         $('#deathd, #earthd, #fired, #iced, #energyd, #sword, #life, #mana, #critical, #basic, #intricate, #powerful, #charm').removeClass("no");
        const divPrice = document.createElement('div');
         $('#deathp, #earthp, #firep, #icep, #energyp, #holyp, #axe, #club, #distance, #shield, #magic, #capacity, #speed, #vibrancy, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
         divPrice.appendChild(labelPrice);
         $('#elemento').removeAttr("style");
         divPrice.appendChild(inputPrice);
      } else if (cat == '5') {
 
         $('#deathd, #earthd, #fired, #iced, #energyd, #axe, #life, #mana, #critical, #basic, #intricate, #powerful, #charm').removeClass("no");
         const divBox = document.createElement('div');
         $('#deathp, #earthp, #firep, #icep, #energyp, #holyp, #sword, #club, #distance, #shield, #magic, #capacity, #speed, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
        divBox.classList.add('imbuement-tool-prices-items-box');
         $('#elemento').removeAttr("style");
         divBox.appendChild(a);
      } else if (cat == '10') {
         divBox.appendChild(divQuantity);
         $('#shield, #deathp, #earthp, #firep, #icep, #energyp, #holyp, #basic, #intricate, #powerful, #charm').removeClass("no");
         divBox.appendChild(divPrice);
         $('#deathd, #earthd, #fired, #life, #iced, #energyd, #axe, #sword, #club, #distance, #magic, #speed, #vibrancy, #mana, #capacity, #critical, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
       
         $('#elemento').removeAttr("style");
        return divBox;
      } else if (cat == '8') {
    }
        $('#life, #mana, #magic, #basic, #intricate, #powerful, #charm').removeClass("no");
 
         $('#deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #axe, #sword, #club, #distance, #shield, #speed, #vibrancy, #capacity, #critical, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
    var loadItemsInfosLine = () => {
         $('#elemento').css({
 
          "overflow": "hidden"
        const itemsInfoDivs = document.getElementsByClassName('imbuement-tool-prices-taxas-info-items');
         if (itemsInfoDivs == null || Object.keys(itemsInfoDivs).length === 0) {
            showAlert();
            return;
        }
         const itemsInfo = itemsInfoDivs[0];
        itemsInfo.innerHTML = "";
 
         const imbuement = getSelectedImbuementObject();
        if (imbuement.gold_token) {
            const goldTokenBox = createItemInfoLabel(goldToken, 0);
            itemsInfo.appendChild(goldTokenBox);
         }
        document.getElementById("lbl-total-gold-token").style.display = imbuement.gold_token ? 'block' : 'none';
         let index = 1;
        imbuement.itens.forEach(item => {
            const itemLabel = createItemInfoLabel(item, index);
            itemsInfo.appendChild(itemLabel);
            index++;
         });
         });
      } else if (cat == '11') {
    }
         $('#capacity, #basic, #intricate, #powerful, #charm').removeClass("no");
 
         $('#deathp, #earthp, #firep, #icep, #energyp, #holyp, #deathd, #earthd, #fired, #iced, #energyd, #axe, #sword, #club, #distance, #shield, #speed, #vibrancy, #mana, #magic, #critical, #msg2, #msg3, #charmoff, #totalcharm, #chancecharm').addClass("no");
    var createItemInfoLabel = (item, indexId) => {
         $('#elemento').css({
        const label = document.createElement('label');
          "overflow": "hidden"
        label.setAttribute('id', "lbl-item-".concat(indexId));
        label.innerText = "Total ".concat(item.name).concat(": 0 GPs");
        return label;
    }
 
    var getGoldTokenQuantity = () => {
        switch(getSelectedImbuementLevel()) {
            case ("Powerful"): {
                return 6;
            }
            case ("Intricate"): {
                return 4;
            }
            default: {
                return 2;
            }
        }
    }
    var getSelectedImbuementLevel = () => {
        return selectedImbuementLevel;
    }
 
    var getSelectedCategory = () => {
        return document.getElementById('imbuement-tool-items-category').value;
    }
    var getSelectedItemName = () => {
        return (getSelectedImbuementOption() === "Items") ? document.getElementById('imbuement-tool-items-list').value : Object.keys(imbuementScrolls)[0];
    }
    var getSelectedItemObject = () => {
        return (getSelectedImbuementOption() === "Items") ? categories[getSelectedCategory()][getSelectedItemName()] : imbuementScrolls[getSelectedItemName()];
    }
    var getItemList = () => {
        return categories[getSelectedCategory()];
    }
    var getSelectedImbuementObject = () => {
        const selectedComponent = document.querySelector('.imbuement-tool-data-list-item.selected');
        const imbuementName = selectedComponent.getAttribute('imbuement-name');
        const imbuementLevel = selectedComponent.getAttribute('imbuement-level');
        imbuements[imbuementName].level[imbuementLevel]["gold_token"] = imbuements[imbuementName].gold_token;
        return imbuements[imbuementName].level[imbuementLevel];
    }
 
    // Limpa Campos.
    var cleanSearchField = () => {
         let searchInput = document.getElementById('imbument-tool-input-search');
        searchInput.value = '';
    }
    var cleanSelectedImbuementLevel = () => {
        const selectedComponent = document.querySelector('.imbuement-tool-level-list-item.selected');
        if (selectedComponent == null) {
            return;
        }
        selectedComponent.classList.remove("selected");
         selectedImbuementLevel = "";
 
        cleanSelectedImbuementCell();
    }
    var cleanSelectedImbuementCell = () => {
        const selectedComponent = document.querySelector('.imbuement-tool-data-list-item.selected');
        if (selectedComponent == null) {
            return;
        }
        selectedComponent.classList.remove("selected");
 
         const imbuementDescription = document.getElementById('imbuement-tool-selected-imbuement-description');
        imbuementDescription.innerText = "";
 
        const listItems = document.getElementsByClassName("imbuement-tool-list-items");
        if (listItems == null || Object.keys(listItems).length === 0) {
            showAlert();
            return;
        }
        const itemList = listItems[0];
        itemList.innerHTML = "";
    }
 
    var showSelectedOption = () => {
        const selectedImbuementOption = getSelectedImbuementOption();
        const itemsContainer = document.getElementById('imbument-tool-items-container');
        if (itemsContainer == null) {
            showAlert();
            return;
        }
        itemsContainer.style.display = (selectedImbuementOption === "Items") ? 'block' : 'none';
        cleanSelectedImbuementLevel();
    }
 
    // Busca Item na lista de Items.
    var searchItems = (input) => {
        let items = getItemList();
        let filteredKeys = Object.keys(items).filter(name => name.toLowerCase().includes(input.value.toLowerCase()));
        if (filteredKeys.length === 0) {
            return
        }
        let filteredItems = new Object();
        filteredKeys.forEach(itemName => {
            filteredItems[itemName] = items[itemName];
         });
         });
      } else if (cat == 'nenhum') {
        loadItemList(filteredItems);
         $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
    }
         $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
 
         $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
    var updateValues = (component, type, indexId) => {
        $(".itemimg img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
         const value = component.value;
         $('#source1, #source2, #source3').text('0');
 
         $('#slots').addClass("no");
        const multiplier = document.getElementById(`input-${(type === 'quantity') ? 'price' : 'quantity'}-${indexId}`).value;
      }
 
    });
        const total = value * multiplier;
    $("#itemcat7").change(function() {
        const imbuement = getSelectedImbuementObject();
      var item = $("#itemcat7").children("option").filter(":selected").attr("id");
         const imbuementItemName = (indexId === 0) ? goldToken.name : imbuement.itens[indexId - 1].name;
      if (item == 'mage') {
         document.getElementById(`lbl-item-${indexId}`).innerText = `Total ${imbuementItemName}: ${total.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")} GPs`;
        $('#magic').removeClass("no");
 
      } else {
         updateTotal();
         $('#magic').addClass("no");
    }
      }
 
    });
    var updateTotal = () => {
    $("#itemcat8").change(function() {
         const imbuement = getSelectedImbuementObject();
      var item = $("#itemcat8").children("option").filter(":selected").attr("id");
 
      if (item == 'strike') {
        let totalGoldTotken = 0;
        $('#critical').removeClass("no");
        if (imbuement.gold_token) {
      } else {
            const quantityGoldToken = document.getElementById('input-quantity-0').value;
        $('#critical').addClass("no");
            const priceGoldToken = document.getElementById('input-price-0').value;
      }
            totalGoldTotken = quantityGoldToken * priceGoldToken;
    });
         }
    $("#itemcat1, #itemcat2, #itemcat3, #itemcat4, #itemcat5, #itemcat6, #itemcat7, #itemcat8, #itemcat9, #itemcat10, #itemcat11").children("option[value='none']").prop('selected', true);
 
    $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        let totalItens = 0;
    $('#source1').text('0');
        for (let i = 1; i <= imbuement.itens.length; i++) {
    $('#fonte1').text('');
            const quantityItem = document.getElementById(`input-quantity-${i}`).value;
    $(".itemimg img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
            const priceItem = document.getElementById(`input-price-${i}`).value;
    $('#slots, #boost, #damage, #lleech, #protect, #mleech, #chit, #velocidade, #capacidade').addClass("no");
            totalItens += quantityItem * priceItem;
    $('#preco').text('0');
        }
    $('#total').text('0');
        const taxa = getTaxPrice();
    $('#chance').text('0%').css({
        if (imbuement.gold_token) {
      "color": "#B2A898"
            document.getElementById('lbl-total-gold-token').innerText = `Total com Gold Token: ${(totalGoldTotken + taxa).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")} GPs`;
    });
    $("#itemcat1, #itemcat2, #itemcat3, #itemcat4, #itemcat5, #itemcat6, #itemcat7, #itemcat8, #itemcat9, #itemcat10, #itemcat11").children("option[value='none']").prop('selected', true);
    $('#fonte1').css({
      "display": "none"
    });
  });
  $("#elemento, #tipo").change(function() {
    var tipo = $("#tipo").children("option").filter(":selected").attr("id");
    var ele = $("#elemento").children("option").filter(":selected").attr("id");
    if (ele == 'deathd') {
      $('#damage').removeClass("no");
      $('#boost, #lleech, #protect, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages').text('death');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/6/65/Pile_of_Grave_Earth.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Pile_of_Grave_Earth" target="_blank">Pile of Grave Earth</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/8/8f/Demonic_Skeletal_Hand.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Demonic_Skeletal_Hand" target="_blank">Demonic Skeletal Hand</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/8/8f/Demonic_Skeletal_Hand.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Demonic_Skeletal_Hand" target="_blank">Demonic Skeletal Hand</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/0/0f/Petrified_Scream.gif");
        $('#source3').text('5');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Petrified_Scream" target="_blank">Petrified Scream</a>');
      }
    } else if (ele == 'earthd') {
      $('#damage').removeClass("no");
      $('#boost, #lleech, #protect, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages').text('earth');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/6/6f/Swamp_Grass.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Swamp_Grass" target="_blank">Swamp Grass</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/b/b9/Poisonous_Slime.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Poisonous_Slime" target="_blank">Poisonous Slime</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/b/b9/Poisonous_Slime.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Poisonous_Slime" target="_blank">Poisonous Slime</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/6/65/Slime_Heart.gif");
        $('#source3').text('2');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Slime_Heart" target="_blank">Slime Heart</a>');
      }
    } else if (ele == 'fired') {
      $('#damage').removeClass("no");
      $('#boost, #lleech, #protect, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages').text('fire');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/7/7d/Fiery_Heart.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Fiery_Heart" target="_blank">Fiery Heart</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/a/ac/Green_Dragon_Scale.gif");
        $('#source2').text('5');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Green_Dragon_Scale" target="_blank">Green Dragon Scale</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/a/ac/Green_Dragon_Scale.gif");
        $('#source2').text('5');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Green_Dragon_Scale" target="_blank">Green Dragon Scale</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/b/b8/Demon_Horn.gif");
        $('#source3').text('5');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Demon_Horn" target="_blank">Demon Horn</a>');
      }
    } else if (ele == 'iced') {
      $('#damage').removeClass("no");
      $('#boost, #lleech, #protect, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages').text('ice');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/3/3e/Frosty Heart.gif");
      $('#source1').text('5');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Frosty Heart" target="_blank">Polar Bear Paw</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/8/83/Frosty_Heart.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Frosty_Heart" target="_blank">Frosty Heart</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/8/83/Frosty_Heart.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Frosty_Heart" target="_blank">Frosty Heart</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/6/6e/Seacrest_Hair.gif");
        $('#source3').text('10');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Seacrest_Hair" target="_blank">Seacrest Hair</a>');
      }
    } else if (ele == 'energyd') {
      $('#damage').removeClass("no");
      $('#boost, #lleech, #protect, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages').text('energy');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/b/b8/Rorc_Feather.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Rorc_Feather" target="_blank">Rorc Feather</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/f/fc/Peacock_Feather_Fan.gif");
        $('#source2').text('5');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Peacock_Feather_Fan" target="_blank">Peacock Feather Fan</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/f/fc/Peacock_Feather_Fan.gif");
        $('#source2').text('5');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Peacock_Feather_Fan" target="_blank">Peacock Feather Fan</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/d/dc/Energy_Vein.gif");
        $('#source3').text('1');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Energy_Vein" target="_blank">Energy Vein</a>');
      }
    } else if (ele == 'deathp') {
      $('#protectdeath').removeClass("no");
      $('#boost, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protect').addClass("no");
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/c/c2/Flask_of_Embalming_Fluid.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Flask_of_Embalming_Fluid" target="_blank">Flask of Embalming Fluid</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/f/ff/Gloom_Wolf_Fur.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Gloom_Wolf_Fur" target="_blank">Gloom Wolf Fur</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/f/ff/Gloom_Wolf_Fur.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Gloom_Wolf_Fur" target="_blank">Gloom Wolf Fur</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/0/08/Mystical_Hourglass.gif");
        $('#source3').text('5');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Mystical_Hourglass" target="_blank">Mystical Hourglass</a>');
      }
    } else if (ele == 'earthp') {
      $('#protect').removeClass("no");
      $('#boost, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages2').text('earth');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/f/f6/Piece_of_Swampling_Wood.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Piece_of_Swampling_Wood" target="_blank">Piece of Swampling Wood</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/3e/Snake_Skin.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Snake_Skin" target="_blank">Snake Skin</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/3e/Snake_Skin.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Snake_Skin" target="_blank">Snake Skin</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/7/7a/Brimstone_Fangs.gif");
        $('#source3').text('10');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Brimstone_Fangs" target="_blank">Brimstone Fangs</a>');
      }
    } else if (ele == 'firep') {
      $('#protect').removeClass("no");
      $('#boost, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages2').text('fire');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/d/d9/Green_Dragon_Leather.gif");
      $('#source1').text('20');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Green_Dragon_Leather" target="_blank">Green Dragon Leather</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/0/01/Blazing_Bone.gif");
        $('#source2').text('10');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Blazing_Bone" target="_blank">Blazing Bone</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/0/01/Blazing_Bone.gif");
        $('#source2').text('10');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Blazing_Bone" target="_blank">Blazing Bone</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/5/51/Draken_Sulphur.gif");
        $('#source3').text('5');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Draken_Sulphur" target="_blank">Draken Sulphur</a>');
      }
    } else if (ele == 'icep') {
      $('#protect').removeClass("no");
      $('#boost, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages2').text('ice');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/f/fa/Winter_Wolf_Fur.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Winter_Wolf_Fur" target="_blank">Winter Wolf Fur</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/f/fc/Thick_Fur.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Thick_Fur" target="_blank">Thick Fur</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/f/fc/Thick_Fur.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Thick_Fur" target="_blank">Thick Fur</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/5/54/Deepling_Warts.gif");
        $('#source3').text('10');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Deepling_Warts" target="_blank">Deepling Warts</a>');
      }
    } else if (ele == 'energyp') {
      $('#protect').removeClass("no");
      $('#boost, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages2').text('energy');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/a/a3/Wyvern_Talisman.gif");
      $('#source1').text('20');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Wyvern_Talisman" target="_blank">Wyvern Talisman</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/b/be/Crawler_Head_Plating.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Crawler_Head_Plating" target="_blank">Crawler Head Plating</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/b/be/Crawler_Head_Plating.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Crawler_Head_Plating" target="_blank">Crawler Head Plating</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/d/de/Wyrm_Scale.gif");
        $('#source3').text('10');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Wyrm_Scale" target="_blank">Wyrm Scale</a>');
      }
    } else if (ele == 'holyp') {
      $('#protect').removeClass("no");
      $('#boost, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#damages2').text('holy');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/3/38/Cultish_Robe.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Cultish_Robe" target="_blank">Cultish Robe</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/4/4c/Cultish_Mask.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Cultish_Mask" target="_blank">Cultish Mask</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/4/4c/Cultish_Mask.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Cultish_Mask" target="_blank">Cultish Mask</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/a/a3/Hellspawn_Tail.gif");
        $('#source3').text('20');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Hellspawn_Tail" target="_blank">Hellspawn Tail</a>');
      }
    } else if (ele == 'axe') {
      $('#boost').removeClass("no");
      $('#protect, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#skill').text('axe fighting');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/7/70/Orc_Tooth.gif");
      $('#source1').text('20');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Orc_Tooth" target="_blank">Orc Tooth</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/1/10/Battle_Stone.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Battle_Stone" target="_blank">Battle Stone</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/1/10/Battle_Stone.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Battle_Stone" target="_blank">Battle Stone</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/0/0f/Moohtant_Horn.gif");
        $('#source3').text('20');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Moohtant_Horn" target="_blank">Moohtant Horn</a>');
      }
    } else if (ele == 'sword') {
      $('#boost').removeClass("no");
      $('#protect, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#skill').text('sword fighting');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/0/04/Lion%27s_Mane.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Lion%27s_Mane" target="_blank">Lion%27s Mane</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/b/b2/Mooh%27tah_Shell.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Mooh%27tah_Shell" target="_blank">Mooh%27tah Shell</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/b/b2/Mooh%27tah_Shell.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Mooh%27tah_Shell" target="_blank">Mooh%27tah Shell</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/4/41/War_Crystal.gif");
        $('#source3').text('5');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/War_Crystal" target="_blank">War Crystal</a>');
      }
    } else if (ele == 'club') {
      $('#boost').removeClass("no");
      $('#protect, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#skill').text('club fighting');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/b/bd/Cyclops_Toe.gif");
      $('#source1').text('20');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Cyclops_Toe" target="_blank">Cyclops Toe</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/9/9b/Ogre_Nose_Ring.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Ogre_Nose_Ring" target="_blank">Ogre Nose Ring</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/9/9b/Ogre_Nose_Ring.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Ogre_Nose_Ring" target="_blank">Ogre Nose Ring</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/4/48/Warmaster%27s_Wristguards.gif");
        $('#source3').text('10');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Warmaster%27s_Wristguards" target="_blank">Warmaster%27s Wristguards</a>');
      }
    } else if (ele == 'distance') {
      $('#boost').removeClass("no");
      $('#protect, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#skill').text('distance fighting');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/c/cf/Elven_Scouting_Glass.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Elven_Scouting_Glass" target="_blank">Elven Scouting Glass</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/c/ca/Elven_Hoof.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Elven_Hoof" target="_blank">Elven Hoof</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/c/ca/Elven_Hoof.gif");
        $('#source2').text('20');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Elven_Hoof" target="_blank">Elven Hoof</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/c/cf/Metal_Spike.gif");
        $('#source3').text('10');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Metal_Spike" target="_blank">Metal Spike</a>');
      }
    } else if (ele == 'shield') {
      $('#boost').removeClass("no");
      $('#protect, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#skill').text('shielding');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/4/45/Piece_of_Scarab_Shell.gif");
      $('#source1').text('20');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Piece_of_Scarab_Shell" target="_blank">Piece of Scarab Shell</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/d/d9/Brimstone_Shell.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Brimstone_Shell" target="_blank">Brimstone Shell</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/d/d9/Brimstone_Shell.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Brimstone_Shell" target="_blank">Brimstone Shell</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/d/d6/Frazzle_Skin.gif");
        $('#source3').text('25');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Frazzle_Skin" target="_blank">Frazzle Skin</a>');
      }
    } else if (ele == 'magic') {
      $('#boost').removeClass("no");
      $('#protect, #lleech, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $('#skill').text('magic level');
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/a/a4/Elvish_Talisman.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Elvish_Talisman" target="_blank">Elvish Talisman</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/2/29/Broken_Shamanic_Staff.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Broken_Shamanic_Staff" target="_blank">Broken Shamanic Staff</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/2/29/Broken_Shamanic_Staff.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Broken_Shamanic_Staff" target="_blank">Broken Shamanic Staff</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/5/57/Strand_of_Medusa_Hair.gif");
        $('#source3').text('15');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Strand_of_Medusa_Hair" target="_blank">Strand of Medusa Hair</a>');
      }
    } else if (ele == 'speed') {
      $('#velocidade').removeClass("no");
      $('#protect, #lleech, #damage, #mleech, #chit, #capacidade, #boost, #protectdeath').addClass("no");
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/8/84/Damselfly_Wing.gif");
      $('#source1').text('15');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Damselfly_Wing" target="_blank">Damselfly Wing</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/1/1c/Compass.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Compass" target="_blank">Compass</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('25');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/1/1c/Compass.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Compass" target="_blank">Compass</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/6/69/Waspoid_Wing.gif");
        $('#source3').text('20');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Waspoid_Wing" target="_blank">Waspoid Wing</a>');
      }
      } else if (ele == 'vibrancy') {
        $('#paralisia').removeClass("no");
        $('#protect, #lleech, #damage, #mleech, #chit, #capacidade, #boost, #protectdeath ,#velocidade').addClass("no");
        $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/0/0d/Wereboar_Hooves.gif");
        $('#source1').text('15');
        $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Wereboar_Hooves" target="_blank">Wereboar Hooves</a>');
        if (tipo == 'basic') {
          $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
          $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
          $('#source2, #source3').text('0');
         }
         }
         if (tipo == 'intricate') {
         document.getElementById('lbl-total-items').innerText = `Total com os Items: ${(totalItens + taxa).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")} GPs`;
          $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/f/f8/Crystallized_Anger.gif");
    }
          $('#source2').text('25');
 
          $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Crystallized_Anger" target="_blank">Crystallized Anger</a>');
    var getTaxPrice = () => {
          $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
         switch(getSelectedImbuementLevel()) {
          $('#source3').text('25');
            case('Powerful'): {
         } else if (tipo == 'powerful') {
                return 250000;
          $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/f/f8/Crystallized_Anger.gif");
            }
          $('#source2').text('25');
            case('Intricate'): {
          $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Crystallized_Anger" target="_blank">Crystallized Anger</a>');
                return 60000;
          $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/f/fd/Quill.gif");
            }
          $('#source3').text('20');
            default: {
          $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Quill" target="_blank">Quill</a>');
                return 7500;
            }
         }
         }
    } else if (ele == 'life') {
      $('#lleech').removeClass("no");
      $('#protect, #boost, #damage, #mleech, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/f/f1/Vampire_Teeth.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Vampire_Teeth" target="_blank">Vampire Teeth</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/1/1d/Bloody_Pincers.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Bloody_Pincers" target="_blank">Bloody Pincers</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/1/1d/Bloody_Pincers.gif");
        $('#source2').text('15');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Bloody_Pincers" target="_blank">Bloody Pincers</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/8/85/Piece_of_Dead_Brain.gif");
        $('#source3').text('5');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Piece_of_Dead_Brain" target="_blank">Piece of Dead Brain</a>');
      }
    } else if (ele == 'mana') {
      $('#mleech').removeClass("no");
      $('#protect, #lleech, #damage, #boost, #chit, #capacidade, #velocidade, #protectdeath').addClass("no");
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/6/69/Rope_Belt.gif");
      $('#source1').text('25');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Rope_Belt" target="_blank">Rope Belt</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/d/d6/Silencer_Claws.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Silencer_Claws" target="_blank">Silencer Claws</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/d/d6/Silencer_Claws.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Silencer_Claws" target="_blank">Silencer Claws</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/8/8c/Some_Grimeleech_Wings.gif");
        $('#source3').text('5');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Some_Grimeleech_Wings" target="_blank">Some Grimeleech Wings</a>');
      }
    } else if (ele == 'critical') {
      $('#chit').removeClass("no");
      $('#protect, #lleech, #damage, #mleech, #boost, #capacidade, #velocidade, #protectdeath').addClass("no");
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/f/fb/Protective_Charm.gif");
      $('#source1').text('20');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Protective_Charm" target="_blank">Protective Charm</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/d/dd/Sabretooth.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Sabretooth" target="_blank">Sabretooth</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/d/dd/Sabretooth.gif");
        $('#source2').text('25');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Sabretooth" target="_blank">Sabretooth</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/f/f7/Vexclaw_Talon.gif");
        $('#source3').text('5');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Vexclaw_Talon" target="_blank">Vexclaw Talon</a>');
      }
    } else if (ele == 'capacity') {
      $('#capacidade').removeClass("no");
      $('#protect, #lleech, #damage, #mleech, #boost, #velocidade, #protectdeath').addClass("no");
      $(".source1 img").attr("src", "https://www.tibiawiki.com.br/images/1/1d/Fairy_Wings.gif");
      $('#source1').text('20');
      $('#fonte1').html('<a href="https://www.tibiawiki.com.br/wiki/Fairy_Wings" target="_blank">Fairy Wings</a>');
      if (tipo == 'basic') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source2, #source3').text('0');
      }
      if (tipo == 'intricate') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/38/Little_Bowl_of_Myrrh.gif");
        $('#source2').text('10');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Little_Bowl_of_Myrrh" target="_blank">Little Bowl of Myrrh</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        $('#source3').text('0');
      } else if (tipo == 'powerful') {
        $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/38/Little_Bowl_of_Myrrh.gif");
        $('#source2').text('10');
        $('#fonte2').html('<a href="https://www.tibiawiki.com.br/wiki/Little_Bowl_of_Myrrh" target="_blank">Little Bowl of Myrrh</a>');
        $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/0/06/Goosebump_Leather.gif");
        $('#source3').text('5');
        $('#fonte3').html('<a href="https://www.tibiawiki.com.br/wiki/Goosebump_Leather" target="_blank">Goosebump Leather</a>');
      }
     }
     }
  });
 
  $("#elemento, #categoria").change(function() {
    /**
    $("#tipo").children("option[id='basic']").prop('selected', true);
    * Adiciona Evento para quando houver interação nos selects, disparar uma ação/função.
     $("#tipo").children("option[id='intricate']").prop('selected', false);
    */
    $("#tipo").children("option[id='powerful']").prop('selected', false);
     var addEventListeners = () => {
    $(".source2 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        // Category Select
    $(".source3 img").attr("src", "https://www.tibiawiki.com.br/images/3/35/Trans.gif");
        document.getElementById('imbuement-tool-items-category').addEventListener('change', function() {
    $('#source2, #source3').text('0');
            cleanSearchField();
    $('#fonte2, #fonte3').text('');
            loadItemList();
  });
            createImbuementsLine();
  $("#tipo, #elemento, #itemcat1, #itemcat2, #itemcat3, #itemcat4, #itemcat5, #itemcat6, #itemcat7, #itemcat8, #itemcat9, #itemcat10, #itemcat11").change(function() {
         }, false);
    var tipo = $("#tipo").children("option").filter(":selected").attr("id");
 
    var ele = $("#elemento").children("option").filter(":selected").attr("id");
        // Item Select
    if (ele == "msg") {
        document.getElementById('imbuement-tool-items-list').addEventListener('change', function() {
      $('#chance').text('0%').css({
            selectItem();
         "color": "#B2A898"
         }, false);
      });
 
      $('#preco').text('0');
        // Imbuement Option Select
      $('#total').text('0');
        document.getElementById('imbument-tool-items').addEventListener('click', function() {
    } else if (tipo == 'basic') {
            showSelectedOption();
      $('#chance').text('90%').css({
            selectItem();
         "color": "#B2A898"
        }, false);
      });
        document.getElementById('imbument-tool-scrolls').addEventListener('click', function() {
      $('#skillval').text('1');
            showSelectedOption();
      $('#damageval').text('10%');
            selectItem();
      $('#lifeval').text('5%');
         }, false);
      $('#protectval').text('3%');
 
      $('#protectdeathval').text('2%');
         let searchInput = document.getElementById('imbument-tool-input-search');
      $('#manaval').text('3%');
         searchInput.addEventListener('input', () => {
      $('#criticalval').text('15%');
            searchItems(searchInput);
      $('#speedval').text('10');
        });
      $('#vibrval').text('15%');
 
      $('#capval').text('3%');
        // // ImbuementSelect
      $('#preco').text('10,000');
        // document.getElementById('imbuementSelect').addEventListener('change', function() {
      $('#total').text('5,000');
        //    let option = getSelectedValueFromSelect('imbuementSelect');
      $('#totalcharm').text('15,000');
        //    selectImbuement(option);
      $('#fonte1').removeAttr("style");
        //    loadSelectImbuementLevel(option);
      $('#fonte2').css({
        // }, false);
         "display": "none"
 
      });
        // // Imbuement Level Select
      $('#fonte3').css({
         // document.getElementById('imbuementLevelSelect').addEventListener('change', function() {
         "display": "none"
         //    let option = getSelectedValueFromSelect('imbuementLevelSelect');
      });
        //    selectImbuementLevel(option);
    } else if (tipo == 'intricate') {
        // }, false);
      $('#chance').text('70%').css({
    }
         "color": "#B2A898"
 
      });
    var showAlert = (message) => {
      $('#skillval').text('2');
        alert(message || "Desculpe pela inconveniência!\n\nAlgo deu errado. Por favor, recarregue a página.");
      $('#damageval').text('25%');
    }
      $('#lifeval').text('10%');
 
      $('#protectval').text('8%');
    var getSelectedImbuementOption = () => {
      $('#protectdeathval').text('5%');
        return document.querySelector('input[name="imbuement-options"]:checked').value;
      $('#manaval').text('5%');
      $('#criticalval').text('25%');
      $('#speedval').text('15');
      $('#vibrval').text('25%');
      $('#capval').text('8%');
      $('#preco').text('30,000');
      $('#total').text('25,000');
      $('#totalcharm').text('55,000');
      $('#fonte2').removeAttr("style");
      $('#fonte3').css({
         "display": "none"
      });
    } else if (tipo == 'powerful') {
      $('#chance').text('50%').css({
         "color": "red"
      });
      $('#skillval').text('4');
      $('#damageval').text('50%');
      $('#lifeval').text('25%');
      $('#protectval').text('15%');
      $('#protectdeathval').text('10%');
      $('#manaval').text('8%');
      $('#criticalval').text('50%');
      $('#speedval').text('30');
      $('#vibrval').text('50%');
      $('#capval').text('15%');
      $('#preco').text('50,000');
      $('#total').text('100,000');
      $('#totalcharm').text('150,000');
      $('#fonte2').removeAttr("style");
      $('#fonte3').removeAttr("style");
     }
     }
  });
 
  $("#charm").click(function() {
    $(document).ready(function () {
    $('#chance, #chancecharm, #total, #totalcharm').toggleClass("no");
 
  });
        $(".imbument-tool-version-label").text("v" + version);
});
        const radioItems = document.getElementById('imbument-tool-items');
        if (radioItems == null) {
            showAlert();
            return;
        }
        radioItems.setAttribute('checked', true);
        // Adiona os eventos aos componentes.
        addEventListeners();
 
        loadAllItens();
 
        showSelectedOption();
    });
</pre>
</pre>

Edição atual tal como às 03h11min de 28 de julho de 2025

<div class="imbuement-tool-panel">
    <label class="imbument-tool-version-label">v3.0.0</label>
    <div class="imbument-tool-loading">
        <img src="https://www.tibiawiki.com.br/images/c/ce/The_Epic_Wisdom.gif" /><br />
        <label>Loading...</label>
        <span>@TibiaWiki</span>
    </div>
    <div class="imbument-tool-menu-side">
        <h2>Imbuement Tool</h2>
        <div class="imbument-tool-radio-box">
            <input type="radio" id="imbument-tool-items" value="Items" name="imbuement-options">
            <label for="imbument-tool-items">Items</label>
        </div>
        <div class="imbument-tool-radio-box">
            <input type="radio" id="imbument-tool-scrolls" value="Scrolls" name="imbuement-options">
            <label for="imbument-tool-scrolls">Scrolls</label>
        </div>
        <span class="imbument-tool-divisor-line"></span>
        <div id="imbument-tool-items-container">
            <div class="imbument-tool-category-box">
                <label for="">Categoria:</label>
                <select id="imbuement-tool-items-category">
                </select>
            </div>
            <div class="imbument-tool-category-box">
                <label for="">Items:</label>
                <div class="imbument-tool-search-box">
                    <input id="imbument-tool-input-search" type="text" placeholder="buscar por item...">
                    <div><i>🔍</i></div>
                </div>
                <select id="imbuement-tool-items-list" size="10">
                </select>
            </div>
        </div>
        <div class="imbument-tool-items">
            <div class="imbument-tool-items-data-box">
                <div class="imbument-tool-items-data-image-box">
                    <img id="imbument-tool-items-image" src="" alt="item-image">
                </div>
                <div class="imbument-tool-items-data-box-data">
                    <label id="imbument-tool-items-name"><span class="label">Item:</span> Dauntless Dragon Scale Armor</label>
                    <label id="imbument-tool-items-slots"><span class="label">Slots:</span> 2</label>
                </div>
            </div>
        </div>
    </div>
    <div class="imbument-tool-imbuements-panel">
        <div class="imbument-tool-imbuements-level-box">
            <h2>Nível do Imbuement</h2>
            <div class="imbuement-tool-level-list">
            </div>
        </div>
        <span class="imbument-tool-divisor-line"></span>
        <div class="imbument-tool-imbuements-data-box">
            <h2>Imbuements</h2>
            <div class="imbuement-tool-data-table">
            </div>
        </div>
        <span class="imbument-tool-divisor-line"></span>
        <div class="imbument-tool-imbuements-data-box">
            <h2>Imbuements Items</h2>
            <h3 id="imbuement-tool-selected-imbuement-description"></h3>
            <div class="imbuement-tool-list-items">
            </div>
        </div>
        <span class="imbument-tool-divisor-line"></span>
        <div class="imbument-tool-imbuements-data-box">
            <h2>Informações</h2>
            <div class="imbuement-tool-prices">
                <div class="imbuement-tool-prices-items">
                </div>
                <div class="imbuement-tool-prices-taxas-info">
                    <h3>Valores</h3>
                    <!-- <span class="imbument-tool-divisor-line"></span> -->
                    <div class="imbuement-tool-prices-taxas-info-items">   
                    </div>
                    <span class="imbument-tool-divisor-line"></span>
                    <label id="lbl-total-gold-token">Total com Gold Token: 500000 GPs</label>
                    <label id="lbl-total-items">Total com os Items: 0 GPs</label>
                </div>
            </div>
        </div>
    </div>
</div>   
    .imbuement-tool-panel {
        display: flex;
        max-width: 870px;
        position: relative;
        border: 2px solid #a2a9b1;
        background: #ffffff;
        border-radius: 5px;
        -webkit-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
        -moz-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
        box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
        font-family: Verdana, Arial, Times New Roman, sans-serif;
        font-size: 13px;
        color: black;
    }
    .imbument-tool-loading {
        z-index: 9999;
        background-color: rgba(255, 255, 255, 0.98);
        display: inline-block;
        border-radius: 3px;
        position: absolute;
        height: 100%;
        width: 100%;
        top: 0;
        left: 0;
        align-content: center;
        text-align: center;
    }

    .imbument-tool-loading>label {
        position: relative;
        bottom: 0px;
        text-align: center;     
        font-size: math;
        background: transparent;
    }
    .imbument-tool-loading > span {
        text-align: center;
        align-content: center;
        background-color: #c7451d;
        height: 32px;
        width: 100%;
        position: absolute;
        bottom: 0px;
        left: 0px;
        text-align: center;     
        font-size: math;
        border-bottom-left-radius: 3px;
        border-bottom-right-radius: 3px;
    }
    .imbument-tool-menu-side {
        width: 320px;
        background-color: #c7451d;
        padding: 5px;
        color: white;
        border-top-left-radius: 3px;
        border-bottom-left-radius: 3px;
    }
    .imbument-tool-menu-side > h2 {
        width: 100%;
        text-align: center;
        padding-bottom: 15px;
        border-bottom: 1px solid black;
        font-family: Verdana, Arial, Times New Roman, sans-serif;
        font-weight: bold;
        color: white;
    }
    .imbument-tool-radio-box {
        margin-top: 15px;
        display: flex;
        margin-top: 2px;
    }
    .imbument-tool-radio-box > label {
        font-size: 15px;
        font-weight: bold;
    }
    .imbument-tool-category-box {
        margin-top: 15px;
        width: 100%;
        display: block;
    }
    .imbument-tool-category-box > label {
        width: 100%;
        margin-left: 2px;
        font-weight: bold;
    }
    .imbument-tool-category-box > select {
        margin-top: 5px;
        width: 100%;
        min-height: 32px;
        font-weight: bold;
        border-radius: 5px;
        border: 1px solid black;
    }
    .imbument-tool-search-box {
        margin-top: 5px;
        width: 100%;
        display: flex;
    }
    .imbument-tool-search-box > input {
        width: calc(100% - 25px);
        height: 28px;
        border: 1px solid black;
        border-bottom-left-radius: 5px;
        border-top-left-radius: 5px;
    }
    .imbument-tool-search-box > div {
        width: 25px;
        height: 30px;
        background-color: white;
        border-left: none;
        border-right: 1px solid black;
        border-top: 1px solid black;
        border-bottom: 1px solid black;
        border-bottom-right-radius: 5px;
        border-top-right-radius: 5px;
        align-content: center;
        text-align: center;
    }
    .imbument-tool-imbuements-panel {
        display: block;
        width: calc(100% - 330px);
        padding: 5px;
    }
    .imbument-tool-items {
        width: 100%;
        margin-top: 15px;
    }
    .imbument-tool-items-data-box {
        display: flex;
    }
    .imbument-tool-items-data-box > .imbument-tool-items-data-image-box {
        width: 50px;
        height: 50px;
        background-color: white;
        border: 1px solid black;
        border-radius: 5px;
        align-content: center;
        text-align: center;
    }
    .imbument-tool-items-data-box-data {
        margin-left: 5px;
    }
    .imbument-tool-items-data-box-data > label {
        width: 100%;
        display: block;
        margin-bottom: 7px;
        font-weight: bold;
        font-size: 15px;
        text-align: left;
    }
    .imbument-tool-divisor-line {
        display: flex;
        flex-flow: row wrap;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        border-bottom: 1px solid black;
        padding: 0.25rem;
        width: calc(100% - 15px);
    }

    .imbument-tool-version-label {
        font-size: 14px;
        font-weight: bold;
        text-align: center;
        display: block;
        position: absolute;
        top: 5px;
        left: 5px;
        color: white;
    }
    #imbument-tool-items-container {
        display: block;
    }

    .imbument-tool-imbuements-level-box {
        width: 100%;
    }
    .imbument-tool-imbuements-level-box > h2 {
        width: 100%;
        text-align: center;
        font-family: Verdana, Arial, Times New Roman, sans-serif;
        font-weight: bold;
        border: none;
    }
    .imbuement-tool-level-list {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    .imbuement-tool-level-list-item {
        display: flex;
        width: 100px;
        height: 50px;
        margin: 5px;
        flex-shrink: 0;
        align-content: center;
        text-align: center;
        border-radius: 5px;
        border: 1px solid black;
        justify-content: center;
        align-items: center;
    }
    .imbuement-tool-level-list-item:hover {
        background-color: #c04e2b;
    }
    .imbuement-tool-level-list-item.selected {
        background-color: #c7451d;
    }
    .imbuement-tool-level-list-item > label {
        font-weight: bold;
        flex-shrink: 0;
        margin-right: 5px;
    }
    .imbuement-tool-level-list-item > div {
        font-weight: bold;
        flex-shrink: 0;
    }
    .imbuement-tool-level-list-item-level {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .imbuement-tool-level-list-item-level > img {
        flex-shrink: 0;
        width: 10px;
        scale: 150%;
    }

    .imbument-tool-imbuements-data-box {
        width: 100%;
        min-height: 140px;
        display: block;
    }
    .imbument-tool-imbuements-data-box > h2, .imbument-tool-imbuements-data-box > h3 {
        width: 100%;
        text-align: center;
        align-content: center;
        font-family: Verdana, Arial, Times New Roman, sans-serif;
        font-weight: bold;
        border: none;
    }
    .imbuement-tool-data-table {
        display: block;
        width: 100%;
        max-height: 200px;
        overflow-y: auto;
    }
    .imbuement-tool-data-table-line {
        display: block;
        width: 100%;
    }
    .imbuement-tool-data-list {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .imbuement-tool-data-list-item {
        width: 64px;
        height: 64px;
        margin: 5px;
        border-radius: 5px;
        /* border: 2px solid black; */
    }
    .imbuement-tool-data-list-item.selected {
        width: 66px;
        height: 66px;
        filter: brightness(1.75);
        border: 0.15rem solid chocolate;
    }
    .imbuement-tool-data-list-item.selected > img {
        border-radius: 2px;
    }
    .imbuement-tool-data-list-item > img {
        width: 100%;
        scale: 100%;
        border-radius: 5px;
    }
    .imbuement-tool-data-list-item:hover {
        width: 66px;
        height: 66px;
        filter: brightness(1.25);
    }
    .imbuement-tool-list-items {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .imbuement-tool-list-items-box {
        background-color: #f3f3f3;
        margin: 5px;
        width: 64px;
        height: 64px;
        border: 1px solid black;
        border-radius: 5px;
        display: block;
        flex-shrink: 0;
        text-align: center;
        align-content: center;
    }
    .imbuement-tool-list-items-box > div {
        width: 100%;
        height: 44px;
        text-align: center;
        align-content: center;
    }
    .imbuement-tool-list-items-box > div > img {
        width: 32px;
    }
    .imbuement-tool-list-items-box > label {
        display: block;
        font-weight: bold;
        color: white;
        width: 100%;
        height: 20px;
        text-align: center;
        align-content: center;
        border-top: 1px solid black;
        background-color: #c7451d;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
    }

    .imbuement-tool-prices {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .imbuement-tool-prices-items {
        width: 50%;
        margin-left: 10px;
        display: block;
        flex-shrink: 0;
    }

    .imbuement-tool-prices-items-box {
        width: 100%;
        height: 55px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .imbuement-tool-prices-items-box > a {
        height: 100%;
        text-align: center;
        align-content: end;
    }
    .imbuement-tool-prices-items-box > a > img {
        width: 32px;
        border: 1px solid black;
        border-radius: 5px;
    }
    .imbuement-tool-prices-items-box > div {
        height: 40px;
       margin: 0px 5px 0px 5px;    
    }
    .imbuement-tool-prices-items-box > div > label {
        font-weight: bold;
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; 
    }
    .imbuement-tool-prices-items-box > div > input {
        width: 90%;
        text-align: center;
        border: 1px solid black;
        border-radius: 3px;
        height: 23px;
    }

    .imbuement-tool-prices-taxas-info {
        width: 50%;
        min-height: 200px;
        padding: 5px;
        border-left: 1px solid black;
        display: block;
        flex-shrink: 0;
    }

    .imbuement-tool-prices-taxas-info > h3 {
        width: 100%;
        margin: 0px 0px 15px 0px;
        text-align: center;
        align-content: center;
    }
    .imbuement-tool-prices-taxas-info > div {
        width: 100%;
        display: block;
        margin-top: 5px;
    }
    .imbuement-tool-prices-taxas-info > label {
        display: block;
        width: 100%;
        height: 20px;
        margin-top: 5px;
        font-weight: bold;
        text-align: left;
    }
    .imbuement-tool-prices-taxas-info > div > label {
        display: block;
        width: 100%;
        height: 20px;
        font-weight: bold;
        text-align: left;
    }

    .mg-top-35px {
        margin-top: 35px;
    }
    .label {
        font-weight: bold;
        font-size: 15px;
    }
    /* Extra small devices (phones, less than 576px) */
    @media (max-width: 575.98px) {
        .imbuement-tool-panel {
            width: calc(100% - 5px);
            display: block;
        }

        .imbument-tool-menu-side {
            width: calc(100% - 10px);
            border-top-left-radius: 3px;
            border-top-right-radius: 3px;
        }

        .imbument-tool-imbuements-panel {
            width: 100%;
        }

        .imbuement-tool-prices {
            display: block;
        }
        .imbuement-tool-prices-items, .imbuement-tool-prices-taxas-info {
            width: calc(100% - 20px);
            border-left: none;
        }
        .imbuement-tool-data-list-item, .imbuement-tool-data-list-item.selected {
            height: 100%;
        }
    }
const version = "3.0.1";
    var categories = new Object();
    var selectedImbuementLevel = "";
    var imbuementScrolls = {
        "Blank Imbuement Scroll": {
            "slots": 1,
            "imbuements": {
                "Vampirism": ["Intricate", "Powerful"],
                "Void": ["Intricate", "Powerful"],
                "Strike": ["Intricate", "Powerful"],
                "Featherweight": ["Intricate", "Powerful"],
                "Swiftness": ["Intricate", "Powerful"],
                "Vibrancy": ["Intricate", "Powerful"],
                "Reap": ["Intricate", "Powerful"],
                "Venom": ["Intricate", "Powerful"],
                "Scorch": ["Intricate", "Powerful"],
                "Frost": ["Intricate", "Powerful"],
                "Electrify": ["Intricate", "Powerful"],
                "Cloud Fabric": ["Intricate", "Powerful"],
                "Demon Presence": ["Intricate", "Powerful"],
                "Dragon Hide": ["Intricate", "Powerful"],
                "Lich Shroud": ["Intricate", "Powerful"],
                "Quara Scale": ["Intricate", "Powerful"],
                "Snake Skin": ["Intricate", "Powerful"],
                "Bash": ["Intricate", "Powerful"],
                "Blockade": ["Intricate", "Powerful"],
                "Chop": ["Intricate", "Powerful"],
                "Epiphany": ["Intricate", "Powerful"],
                "Precision": ["Intricate", "Powerful"],
                "Slash": ["Intricate", "Powerful"],
                "Punch": ["Intricate", "Powerful"]
            }
        }
    }
    var goldToken = {
        "name": "Gold Token",
        "quantity": 6,
        "link": "https://www.tibiawiki.com.br/wiki/Gold_Token",
        "image": "https://www.tibiawiki.com.br/images/0/0b/Gold_Token.gif"
    }

    var loadAllItens = async () => {
        let baseURL = '';
        $('.imbument-tool-loading label').text('Loading Imbuements and Itens for You, Adventurer!...');
        await Promise.all([
            loadData(baseURL, 'imbuements', 'Imbuements'),
            loadData(baseURL, 'armors', 'Armors'),
            loadData(baseURL, 'backpacks', 'Backpacks'),
            loadData(baseURL, 'boots', 'Boots'),
            loadData(baseURL, 'fists', 'Fists'),
            loadData(baseURL, 'helmets', 'Helmets'),
            loadData(baseURL, 'clubs', 'Clubs'),
            loadData(baseURL, 'distance', 'Distance'),
            loadData(baseURL, 'shields', 'Shields'),
            loadData(baseURL, 'swords', 'Swords'),
            loadData(baseURL, 'axes', 'Axes'),
            loadData(baseURL, 'spellbooks', 'Spellbooks'),
            loadData(baseURL, 'wandsRods', 'WandsRods')
        ]).then((results) => {
            categories = {
                "Armaduras": armors,
                "Backpacks": backpacks,
                "Botas": boots,
                "Capacetes": helmets,
                "Clavas": clubs,
                "Distância": distance,
                "Escudos": shields,
                "Espadas": swords,
                "Machados": axes,
                "Punhos": fists,
                "Spellbooks": spellbooks,
                "Wands e Rods": wandsRods
            }
            loadCategories();
            $('.imbument-tool-loading')[0].style.display = 'none';
            console.log("Load Done!");
        }).catch((error) => {
            showAlert();
            console.error('Error:', error);
        });
    }

    var loadData = async (baseURL, varName, path) => {
        return new Promise((resolve, reject) => {
            $.ajax({
                contentType: 'text/plain; charset=utf-8',
                url: baseURL + '/index.php?title=Tibia_Wiki:' + path + '/json&action=raw',
                type: 'GET',
                success: function(data) {
                    callbacks(data.replace(/<pre id="[^"]*">/gi, '').replace(/<\/pre>/gi, ''), varName);
                    resolve('Loaded: ' + varName);
                },
                error: function(error) {
                    console.error(error);
                    callbacks(null, varName);
                }
            });
        });
    }

    var callbacks = (codigo, varName) => {
        if (codigo == null) {
            codigo = "";
        } else {
            console.log('Loaded:', varName);
            window[varName] = JSON.parse(codigo);
        }
    }

    var loadCategories = () => {
        const categoriesSelect = document.getElementById('imbuement-tool-items-category');
        if (Object.keys(categories).length === 0 || categoriesSelect == null) {
            showAlert();
            return;
        }
        Object.keys(categories).forEach(category => {
            let option = document.createElement('option');
            option.value = category;
            option.innerHTML = category;
            categoriesSelect.appendChild(option);
        });
        if (categoriesSelect.children.length > 0) {
            categoriesSelect.children[0].setAttribute('selected', true);
            loadItemList();
        }
    }

    var loadItemList = (listItems) => {
        const category = getSelectedCategory();
        const itemsList = document.getElementById('imbuement-tool-items-list');
        if (Object.keys(categories[category]).length === 0 || itemsList == null) {
            showAlert();
            return;
        }        
        itemsList.innerHTML = '';
        const listOfItems = (listItems == null) ? categories[category] : listItems;
        Object.keys(listOfItems).forEach(item => {
            let option = document.createElement('option');
            option.value = item;
            option.innerHTML = item;
            itemsList.appendChild(option);
        });

        if (itemsList.children.length > 0) {
            itemsList.children[0].setAttribute('selected', true);
            selectItem();
        }
    }

    var selectItem = () => {
        const selectedCategory = document.getElementById('imbuement-tool-items-category').value;
        const selectedItem = document.getElementById('imbuement-tool-items-list').value;

        const itemNameLabel = document.getElementById('imbument-tool-items-name');
        const itemSlotsLabel = document.getElementById('imbument-tool-items-slots');
        const itemImage = document.getElementById('imbument-tool-items-image');

        itemNameLabel.innerHTML = `<span class="label">Item:</span> ${getSelectedItemName()}`;
        itemSlotsLabel.innerHTML = `<span class="label">Slots:</span> ${getSelectedItemObject().slots}`;
        itemImage.setAttribute('src', "https://www.tibiawiki.com.br/wiki/Especial:Redirecionar/file/" + getSelectedItemName() + ".gif");

        loadImbuementsLevel();
        createImbuementsLine();
    }

    var selectImbuementLevel = (component) => {
        cleanSelectedImbuementLevel();
        component.classList.add("selected");
        selectedImbuementLevel = component.getAttribute('level');
        createImbuementsLine();
    }

    var loadImbuementsLevel = () => {
        
        const imbuementLevelLists = document.getElementsByClassName("imbuement-tool-level-list");
        if (imbuementLevelLists == null || imbuementLevelLists.length === 0) {
            showAlert();
            return;
        }
        const componentList = imbuementLevelLists[0];
        componentList.innerHTML = "";

        const selectedItem = getSelectedItemObject();
        const selectedItemImbuements = selectedItem.imbuements;

        selectedItemImbuements[Object.keys(selectedItemImbuements)[0]].forEach(level => {
            const componentLevel = createImbuementLevelButton(level);
            componentList.appendChild(componentLevel);
        });
        const mostLevelImbuement = document.getElementsByClassName("imbuement-tool-level-list-item");
        if (mostLevelImbuement == null || mostLevelImbuement.length === 0) {
            showAlert();
            return;
        }
        if (selectedImbuementLevel.length === 0) {
            mostLevelImbuement[mostLevelImbuement.length - 1].classList.add("selected");
            selectedImbuementLevel = mostLevelImbuement[mostLevelImbuement.length - 1].getAttribute('level');
        } else {
            const indexes = Object.keys(mostLevelImbuement).filter(index => mostLevelImbuement[index].getAttribute('level') === selectedImbuementLevel);
            mostLevelImbuement[indexes[0]].classList.add('selected');
        }
    }

    var createImbuementLevelButton = (level) => {

        const btn = document.createElement("div");
        btn.classList.add("imbuement-tool-level-list-item");
        btn.setAttribute("level", level);
        btn.addEventListener('click', function() {
            selectImbuementLevel(this);
        }, false);

        const imgBox = document.createElement("div");
        imgBox.classList.add("imbuement-tool-level-list-item-level");

        const label = document.createElement("label");
        label.innerText = level;

        let indexLevel = 1;
        switch (level) {
            case("Intricate"): {
                indexLevel = 2;
                break;
            }
            case("Powerful"): {
                indexLevel = 3;
                break;
            }
            default: {
                indexLevel = 1;
                break;
            }
        }
        for(let i = 0; i < indexLevel; i++) {
            const img = document.createElement('img');
            img.setAttribute('src', 'https://www.tibiawiki.com.br/images/2/2f/The_Heart_of_the_Sea.gif');
            img.setAttribute('alt', 'level');
            imgBox.appendChild(img);
        }
        btn.appendChild(imgBox);
        btn.appendChild(label);
        return btn;
    }

    var createImbuementsLine = () => {
        const selectedItem = getSelectedItemObject();
        const selectedItemImbuements = selectedItem.imbuements;

        const tables = document.getElementsByClassName('imbuement-tool-data-table');
        if (tables == null || tables.length === 0) {
            showAlert();
            return;
        }
        const table = tables[0];
        table.innerHTML = "";
        let indexLine = 0;
        let tableLine = null;
        let tableDataLineList = null;
        Object.keys(selectedItemImbuements).forEach(imbuement => {
            if (indexLine === 0) {
                tableLine = document.createElement("div");
                tableLine.classList.add("imbuement-tool-data-table-line");

                tableDataLineList = document.createElement("div");
                tableDataLineList.classList.add("imbuement-tool-data-list");

                tableLine.appendChild(tableDataLineList);
            }

            const itemList = createImbuementsItem(imbuement);
            if (itemList) {
                tableDataLineList.appendChild(itemList);
            }

            indexLine++;
            if (indexLine === 6 || indexLine === Object.keys(selectedItemImbuements).length) {
                table.append(tableLine);
                indexLine = 0;
            }
        });

        const imbuementComponent = document.getElementsByClassName("imbuement-tool-data-list-item")[0];
        selectImbuementCell(imbuementComponent);
    }

    var createImbuementsItem = (imbuementName) => {
        const imbuement = imbuements[imbuementName];
        const imbuementLevel = getSelectedImbuementLevel();
        const selectedItem = getSelectedItemObject();
        if (!selectedItem.imbuements[imbuementName].includes(imbuementLevel)) {
            return;
        }

        const divItem = document.createElement('div');
        divItem.classList.add("imbuement-tool-data-list-item");
        divItem.setAttribute("imbuement-name", imbuementName);
        divItem.setAttribute("imbuement-level", imbuementLevel);
        divItem.setAttribute("title", imbuementName.concat(" | ").concat(imbuement.name));

        const img = document.createElement('img');
        img.setAttribute('src', imbuement.level[imbuementLevel].image);

        divItem.appendChild(img);

        divItem.addEventListener('click', function() {
            selectImbuementCell(this);
        }, false);

        return divItem;
    }

    var loadImbuementsItems = () => {
        const listItems = document.getElementsByClassName("imbuement-tool-list-items");
        if (listItems == null || Object.keys(listItems).length === 0) {
            showAlert();
            return;
        }
        const itemList = listItems[0];
        itemList.innerHTML = "";

        const imbuement = getSelectedImbuementObject();
        imbuement.itens.forEach(item => {
            const itemSlot = createImbuementItemSlot(item);
            itemList.appendChild(itemSlot);
        });
    }

    var createImbuementItemSlot = (imbuementItem) => {

        const divBox = document.createElement("div");
        divBox.classList.add("imbuement-tool-list-items-box");
        divBox.setAttribute("title", new String(imbuementItem.quantity).concat("x ").concat(imbuementItem.name));

        const divImg = document.createElement("div");
        const a = document.createElement("a");
        a.setAttribute('href', imbuementItem.link);
        a.setAttribute('target', "_blank");
        const img = document.createElement("img");
        img.setAttribute('src', imbuementItem.image);
        const label = document.createElement("label");
        label.innerText = imbuementItem.quantity;

        a.appendChild(img);
        divImg.appendChild(a);
        divBox.appendChild(divImg);
        divBox.appendChild(label);

        return divBox;
    }

    var selectImbuementCell = (component) => {
        cleanSelectedImbuementCell();
        component.classList.add('selected');
        const imbuementDescription = document.getElementById('imbuement-tool-selected-imbuement-description');
        imbuementDescription.innerText = imbuements[component.getAttribute('imbuement-name')].level[component.getAttribute('imbuement-level')].description;

        loadImbuementsItems();
        loadImbuementItemsInfos();
        loadItemsInfosLine();
        updateTotal();
    }

    var loadImbuementItemsInfos = () => {


        const itemsInfosList = document.getElementsByClassName('imbuement-tool-prices-items');
        if (itemsInfosList == null || Object.keys(itemsInfosList).length === 0) {
            showAlert();
            return;
        }
        const itemsInfosListComponent = itemsInfosList[0];
        itemsInfosListComponent.innerHTML = "";

        const imbuement = getSelectedImbuementObject();
        if (imbuement.gold_token) {
            goldToken.quantity = getGoldTokenQuantity();
            const goldTokenBox = createImbuementItemInfoBox(goldToken, 0);
            itemsInfosListComponent.appendChild(goldTokenBox);
        }
        let index = 1;
        imbuement.itens.forEach(item => {
            const itemInfoBox = createImbuementItemInfoBox(item, index);
            itemsInfosListComponent.appendChild(itemInfoBox);
            index++;
        });
    }

    var createImbuementItemInfoBox = (item, indexId) => {

        const img = document.createElement('img');
        img.setAttribute('src', item.image);
        img.setAttribute('alt', 'imbuement item');

        const a = document.createElement('a');
        a.setAttribute('href', item.link);
        a.setAttribute('target', '_blank');
        a.setAttribute('title', item.name);
        a.appendChild(img);

        const labelQuantity = document.createElement('label');
        labelQuantity.innerText = "Quantidade:";

        const inputQuantity = document.createElement('input');
        inputQuantity.setAttribute('value', item.quantity);
        inputQuantity.setAttribute('min', '0');
        inputQuantity.setAttribute('type', 'number');
        inputQuantity.setAttribute('id', 'input-quantity-'.concat(indexId));
        inputQuantity.addEventListener('input', function () {
            updateValues(this, 'quantity', indexId);
        });

        const divQuantity = document.createElement('div');
        divQuantity.appendChild(labelQuantity);
        divQuantity.appendChild(inputQuantity);

        const labelPrice = document.createElement('label');
        labelPrice.innerText = "Valor Unitário (GPs):";

        const inputPrice = document.createElement('input');
        inputPrice.setAttribute('value', 0);
        inputPrice.setAttribute('min', '0');
        inputPrice.setAttribute('type', 'number');
        inputPrice.setAttribute('id', 'input-price-'.concat(indexId));
        inputPrice.addEventListener('input', function () {
            updateValues(this, 'price', indexId);
        });

        const divPrice = document.createElement('div');
        divPrice.appendChild(labelPrice);
        divPrice.appendChild(inputPrice);

        const divBox = document.createElement('div');
        divBox.classList.add('imbuement-tool-prices-items-box');
        divBox.appendChild(a);
        divBox.appendChild(divQuantity);
        divBox.appendChild(divPrice);
        
        return divBox;
    }

    var loadItemsInfosLine = () => {

        const itemsInfoDivs = document.getElementsByClassName('imbuement-tool-prices-taxas-info-items');
        if (itemsInfoDivs == null || Object.keys(itemsInfoDivs).length === 0) {
            showAlert();
            return;
        }
        const itemsInfo = itemsInfoDivs[0];
        itemsInfo.innerHTML = "";

        const imbuement = getSelectedImbuementObject();
        if (imbuement.gold_token) {
            const goldTokenBox = createItemInfoLabel(goldToken, 0);
            itemsInfo.appendChild(goldTokenBox);
        }
        document.getElementById("lbl-total-gold-token").style.display = imbuement.gold_token ? 'block' : 'none';
        let index = 1;
        imbuement.itens.forEach(item => {
            const itemLabel = createItemInfoLabel(item, index);
            itemsInfo.appendChild(itemLabel);
            index++;
        });
    }

    var createItemInfoLabel = (item, indexId) => {
        const label = document.createElement('label');
        label.setAttribute('id', "lbl-item-".concat(indexId));
        label.innerText = "Total ".concat(item.name).concat(": 0 GPs");
        return label;
    }

    var getGoldTokenQuantity = () => {
        switch(getSelectedImbuementLevel()) {
            case ("Powerful"): {
                return 6;
            }
            case ("Intricate"): {
                return 4;
            }
            default: {
                return 2;
            }
        }
    }
    var getSelectedImbuementLevel = () => {
        return selectedImbuementLevel;
    }

    var getSelectedCategory = () => {
        return document.getElementById('imbuement-tool-items-category').value;
    }
    var getSelectedItemName = () => {
        return (getSelectedImbuementOption() === "Items") ? document.getElementById('imbuement-tool-items-list').value : Object.keys(imbuementScrolls)[0];
    }
    var getSelectedItemObject = () => {
        return (getSelectedImbuementOption() === "Items") ? categories[getSelectedCategory()][getSelectedItemName()] : imbuementScrolls[getSelectedItemName()];
    }
    var getItemList = () => {
        return categories[getSelectedCategory()];
    }
    var getSelectedImbuementObject = () => {
        const selectedComponent = document.querySelector('.imbuement-tool-data-list-item.selected');
        const imbuementName = selectedComponent.getAttribute('imbuement-name');
        const imbuementLevel = selectedComponent.getAttribute('imbuement-level');
        imbuements[imbuementName].level[imbuementLevel]["gold_token"] = imbuements[imbuementName].gold_token;
        return imbuements[imbuementName].level[imbuementLevel];
    }

    // Limpa Campos.
    var cleanSearchField = () => {
        let searchInput = document.getElementById('imbument-tool-input-search');
        searchInput.value = '';
    }
    var cleanSelectedImbuementLevel = () => {
        const selectedComponent = document.querySelector('.imbuement-tool-level-list-item.selected');
        if (selectedComponent == null) {
            return;
        }
        selectedComponent.classList.remove("selected");
        selectedImbuementLevel = "";

        cleanSelectedImbuementCell();
    }
    var cleanSelectedImbuementCell = () => {
        const selectedComponent = document.querySelector('.imbuement-tool-data-list-item.selected');
        if (selectedComponent == null) {
            return;
        }
        selectedComponent.classList.remove("selected");

        const imbuementDescription = document.getElementById('imbuement-tool-selected-imbuement-description');
        imbuementDescription.innerText = "";

        const listItems = document.getElementsByClassName("imbuement-tool-list-items");
        if (listItems == null || Object.keys(listItems).length === 0) {
            showAlert();
            return;
        }
        const itemList = listItems[0];
        itemList.innerHTML = "";
    }

    var showSelectedOption = () => {
        const selectedImbuementOption = getSelectedImbuementOption();
        const itemsContainer = document.getElementById('imbument-tool-items-container');
        if (itemsContainer == null) {
            showAlert();
            return;
        }
        itemsContainer.style.display = (selectedImbuementOption === "Items") ? 'block' : 'none';
        cleanSelectedImbuementLevel();
    }

    // Busca Item na lista de Items.
    var searchItems = (input) => {
        let items = getItemList();
        let filteredKeys = Object.keys(items).filter(name => name.toLowerCase().includes(input.value.toLowerCase()));
        if (filteredKeys.length === 0) {
            return
        }
        let filteredItems = new Object();
        filteredKeys.forEach(itemName => {
            filteredItems[itemName] = items[itemName];
        });
        loadItemList(filteredItems);
    }

    var updateValues = (component, type, indexId) => {
        const value = component.value;

        const multiplier = document.getElementById(`input-${(type === 'quantity') ? 'price' : 'quantity'}-${indexId}`).value;

        const total = value * multiplier;
        const imbuement = getSelectedImbuementObject();
        const imbuementItemName = (indexId === 0) ? goldToken.name : imbuement.itens[indexId - 1].name;
        document.getElementById(`lbl-item-${indexId}`).innerText = `Total ${imbuementItemName}: ${total.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")} GPs`;

        updateTotal();
    }

    var updateTotal = () => {
        const imbuement = getSelectedImbuementObject();

        let totalGoldTotken = 0;
        if (imbuement.gold_token) {
            const quantityGoldToken = document.getElementById('input-quantity-0').value;
            const priceGoldToken = document.getElementById('input-price-0').value;
            totalGoldTotken = quantityGoldToken * priceGoldToken;
        }

        let totalItens = 0;
        for (let i = 1; i <= imbuement.itens.length; i++) {
            const quantityItem = document.getElementById(`input-quantity-${i}`).value;
            const priceItem = document.getElementById(`input-price-${i}`).value;
            totalItens += quantityItem * priceItem;
        }
        const taxa = getTaxPrice();
        if (imbuement.gold_token) {
            document.getElementById('lbl-total-gold-token').innerText = `Total com Gold Token: ${(totalGoldTotken + taxa).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")} GPs`;
        }
        document.getElementById('lbl-total-items').innerText = `Total com os Items: ${(totalItens + taxa).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")} GPs`;
    }

    var getTaxPrice = () => {
        switch(getSelectedImbuementLevel()) {
            case('Powerful'): {
                return 250000;
            }
            case('Intricate'): {
                return 60000;
            }
            default: {
                return 7500;
            }
        }
    }

    /**
     * Adiciona Evento para quando houver interação nos selects, disparar uma ação/função.
     */
    var addEventListeners = () => {
        // Category Select
        document.getElementById('imbuement-tool-items-category').addEventListener('change', function() {
            cleanSearchField();
            loadItemList();
            createImbuementsLine();
        }, false);

        // Item Select
        document.getElementById('imbuement-tool-items-list').addEventListener('change', function() {
            selectItem();
        }, false);

        // Imbuement Option Select
        document.getElementById('imbument-tool-items').addEventListener('click', function() {
            showSelectedOption();
            selectItem();
        }, false);
        document.getElementById('imbument-tool-scrolls').addEventListener('click', function() {
            showSelectedOption();
            selectItem();
        }, false);

        let searchInput = document.getElementById('imbument-tool-input-search');
        searchInput.addEventListener('input', () => {
            searchItems(searchInput);
        });

        // // ImbuementSelect
        // document.getElementById('imbuementSelect').addEventListener('change', function() {
        //     let option = getSelectedValueFromSelect('imbuementSelect');
        //     selectImbuement(option);
        //     loadSelectImbuementLevel(option);
        // }, false);

        // // Imbuement Level Select
        // document.getElementById('imbuementLevelSelect').addEventListener('change', function() {
        //     let option = getSelectedValueFromSelect('imbuementLevelSelect');
        //     selectImbuementLevel(option);
        // }, false);
    }

    var showAlert = (message) => {
        alert(message || "Desculpe pela inconveniência!\n\nAlgo deu errado. Por favor, recarregue a página.");
    }

    var getSelectedImbuementOption = () => {
        return document.querySelector('input[name="imbuement-options"]:checked').value;
    }

    $(document).ready(function () {

        $(".imbument-tool-version-label").text("v" + version);
        const radioItems = document.getElementById('imbument-tool-items');
        if (radioItems == null) {
            showAlert();
            return;
        }
        radioItems.setAttribute('checked', true);
        // Adiona os eventos aos componentes.
        addEventListeners();

        loadAllItens();

        showSelectedOption();
    });