window.WH=new function(){this.REMOTE=!("."+location.hostname).endsWith(".wowhead.com")&&location.hostname!=="wh-site"||location.pathname==="/widgets/power/demo.html";this.STATIC_URL="https://wow.zamimg.com";this.staticUrl=this.STATIC_URL;this.PageMeta={};const e={resizeEventObserver:undefined};this.defineEnum=function(e,t){let a={};let i=[];Object.keys(e).forEach((n=>{a[n]=t?new t(a):{};a[n].name=n;a[n].value=e[n];Object.freeze(a[n]);i.push(a[n])}));a.cases=()=>i.slice();a.tryFrom=e=>i.find((t=>t.value===e));a.from=e=>{let t=a.tryFrom(e);if(!t){throw new Error(`Value ${e} is not a valid backing value for this enum.`)}return t};a.values=()=>i.map((e=>e.value));return Object.freeze(a)};this.extendStatic=function(e,t){return new(WH.setPrototype(e,t))};this.findKey=function(e,t,a){let i=Object.keys(e).find((a=>e[a]===t));if(a&&i!=null){i=parseInt(i)}return i};this.onLoad=function(e){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",e)}else{requestAnimationFrame(e)}};this.setPrototype=function(e,t){t.prototype=e;return t};this.triggerResizeEvents=function(t){if(!(t instanceof Element)){return}if(!window.ResizeObserver){return}e.resizeEventObserver=e.resizeEventObserver||new ResizeObserver((e=>e.forEach((e=>requestAnimationFrame((()=>e.target.dispatchEvent(new CustomEvent("resize",{detail:e}))))))));e.resizeEventObserver.observe(t)}};WH.dataEnv={MAIN:1,PTR:2,BETA:3,CLASSIC:4,TBC:5,D2:6,DI:7,WRATH:8,D4:9,PTR2:10,CATA:11,D4PTR:12};WH.dataEnvKey={1:"live",2:"ptr",3:"beta",4:"classic",5:"tbc",6:"d2",7:"di",8:"wrath",9:"d4",10:"ptr2",11:"cata",12:"d4ptr"};WH.dataEnvTerm={1:"live",2:"ptr",3:"beta",4:"classic",5:"burningCrusade",6:"diablo2",7:"diabloImmortal",8:"wrathofthelichking",9:"diablo4",10:"ptr2",11:"cataclysm",12:"diablo4ptr"};WH.dataTree={RETAIL:1,CLASSIC:4,TBC:5,D2:6,DI:7,WRATH:8,D4:9,CATA:11};WH.dataTreeShortTerm={[WH.dataTree.RETAIL]:"retail",[WH.dataTree.CLASSIC]:"classic",[WH.dataTree.TBC]:"theburningcrusade_short",[WH.dataTree.D2]:"diablo2",[WH.dataTree.DI]:"diabloImmortal_short",[WH.dataTree.WRATH]:"wrathofthelichking_short",[WH.dataTree.D4]:"diablo4",[WH.dataTree.CATA]:"cataclysm_short"};WH.dataTreeTerm={1:"retail",4:"classic",5:"burningCrusade",6:"diablo2",7:"diabloImmortal",8:"wrathofthelichking",9:"diablo4",11:"cataclysm"};WH.dataEnvToTree={};WH.dataEnvToTree[WH.dataEnv.MAIN]=WH.dataTree.RETAIL;WH.dataEnvToTree[WH.dataEnv.PTR]=WH.dataTree.RETAIL;WH.dataEnvToTree[WH.dataEnv.PTR2]=WH.dataTree.RETAIL;WH.dataEnvToTree[WH.dataEnv.BETA]=WH.dataTree.RETAIL;WH.dataEnvToTree[WH.dataEnv.CLASSIC]=WH.dataTree.CLASSIC;WH.dataEnvToTree[WH.dataEnv.TBC]=WH.dataTree.TBC;WH.dataEnvToTree[WH.dataEnv.D2]=WH.dataTree.D2;WH.dataEnvToTree[WH.dataEnv.DI]=WH.dataTree.DI;WH.dataEnvToTree[WH.dataEnv.WRATH]=WH.dataTree.WRATH;WH.dataEnvToTree[WH.dataEnv.D4]=WH.dataTree.D4;WH.dataEnvToTree[WH.dataEnv.CATA]=WH.dataTree.CATA;WH.dataEnvToTree[WH.dataEnv.D4PTR]=WH.dataTree.D4;WH.dataTreeToRoot={};WH.dataTreeToRoot[WH.dataTree.RETAIL]=WH.dataEnv.MAIN;WH.dataTreeToRoot[WH.dataTree.CLASSIC]=WH.dataEnv.CLASSIC;WH.dataTreeToRoot[WH.dataTree.TBC]=WH.dataEnv.TBC;WH.dataTreeToRoot[WH.dataTree.D2]=WH.dataEnv.D2;WH.dataTreeToRoot[WH.dataTree.DI]=WH.dataEnv.DI;WH.dataTreeToRoot[WH.dataTree.WRATH]=WH.dataEnv.WRATH;WH.dataTreeToRoot[WH.dataTree.D4]=WH.dataEnv.D4;WH.dataTreeToRoot[WH.dataTree.CATA]=WH.dataEnv.CATA;WH.EFFECT_SCALING_CLASS_1=-1;WH.EFFECT_SCALING_CLASS_2=-2;WH.EFFECT_SCALING_CLASS_3=-3;WH.EFFECT_SCALING_CLASS_4=-4;WH.EFFECT_SCALING_CLASS_5=-5;WH.EFFECT_SCALING_CLASS_6=-6;WH.EFFECT_SCALING_CLASS_7=-7;WH.EFFECT_SCALING_CLASS_8=-8;WH.EFFECT_SCALING_CLASS_9=-9;WH.EFFECT_SCALING_CLASS_ITEM=15;WH.EFFECT_SCALING_CLASS_DAMAGEREPLACESTAT=21;WH.EFFECT_AURA_DUMMY=4;WH.EFFECT_AURA_PROC_TRIGGER_SPELL=42;WH.Timewalking=new function(){const e=this;this.MODE_TBC=1;this.MODE_WOTLK=2;this.MODE_CATA=3;this.MODE_MISTS=4;this.MODE_WOD=5;this.MODE_LEGION=6;const t=[{id:e.MODE_TBC,charLevel:30,gearIlvl:75,stringId:"twtbc"},{id:e.MODE_WOTLK,charLevel:30,gearIlvl:75,stringId:"twwotlk"},{id:e.MODE_CATA,charLevel:35,gearIlvl:90,stringId:"twcata"},{id:e.MODE_MISTS,charLevel:35,gearIlvl:90,stringId:"twmists"},{id:e.MODE_WOD,charLevel:40,gearIlvl:105,stringId:"twwod"},{id:e.MODE_LEGION,charLevel:45,gearIlvl:120,stringId:"twlegion"}];this.getConfigs=function(){return t};this.getCharLevelFromIlvl=function(t){for(let a of e.getConfigs()){if(a.gearIlvl===t){return a.charLevel}}return null};this.getGearIlvlByStringId=function(t){for(let a of e.getConfigs()){if(a.stringId===t){return a.gearIlvl}}return null}};WH.Types=new function(){const e=this;this.NPC=1;this.OBJECT=2;this.ITEM=3;this.ITEM_SET=4;this.QUEST=5;this.SPELL=6;this.ZONE=7;this.FACTION=8;this.HUNTER_PET=9;this.ACHIEVEMENT=10;this.TITLE=11;this.EVENT=12;this.PLAYER_CLASS=13;this.RACE=14;this.SKILL=15;this.CURRENCY=17;this.PROJECT=18;this.SOUND=19;this.BUILDING=20;this.FOLLOWER=21;this.MISSION_ABILITY=22;this.MISSION=23;this.SHIP=25;this.THREAT=26;this.RESOURCE=27;this.CHAMPION=28;this.ICON=29;this.ORDER_ADVANCEMENT=30;this.FOLLOWER_ALLIANCE=31;this.FOLLOWER_HORDE=32;this.SHIP_ALLIANCE=33;this.SHIP_HORDE=34;this.CHAMPION_ALLIANCE=35;this.CHAMPION_HORDE=36;this.TRANSMOG_ITEM=37;this.BFA_CHAMPION=38;this.BFA_CHAMPION_ALLIANCE=39;this.AFFIX=40;this.BFA_CHAMPION_HORDE=41;this.AZERITE_ESSENCE_POWER=42;this.AZERITE_ESSENCE=43;this.STORYLINE=44;this.ADVENTURE_COMBATANT_ABILITY=46;this.ENCOUNTER=47;this.COVENANT=48;this.SOULBIND=49;this.DI_EQUIP_ITEM=50;this.DI_SKILL=54;this.DI_PARAGON_SKILL=55;this.DI_SET=56;this.DI_NPC=57;this.DI_MISC_ITEM=58;this.DI_ZONE=59;this.DI_QUEST=60;this.DI_OBJECT=61;this.PROFESSION_TRAIT=65;this.TRADING_POST_ACTIVITY=67;this.D4_PLAYER_CLASS=63;this.D4_SKILL=64;this.D4_ITEM=66;this.D4_AFFIX=68;this.D4_PARAGON_NODE=69;this.D4_ASPECT=70;this.D4_PARAGON_GLYPH=71;this.D4_VAMPIRIC_POWER=74;this.D4_SENESCHAL_STONE=78;this.GATHERER_SCREENSHOT=91;this.GATHERER_GUIDE_IMAGE=98;this.GUIDE=100;this.TRANSMOG_SET=101;this.OUTFIT=110;this.GEAR_SET=111;this.D4_BUILD=112;this.GATHERER_LISTVIEW=158;this.GATHERER_SURVEY_COVENANTS=161;this.NEWS_POST=162;this.GATHERER_HERO_TALENTS=165;this.COUNTDOWN_TIMER=166;this.BATTLE_PET_ABILITY=200;const t={[this.BATTLE_PET_ABILITY]:["pet-ability","petability"],[this.BFA_CHAMPION_ALLIANCE]:["bfa-champion"],[this.BFA_CHAMPION_HORDE]:["bfa-champion"],[this.CHAMPION_ALLIANCE]:["champion"],[this.CHAMPION_HORDE]:["champion"],[this.D4_AFFIX]:["affix"],[this.D4_ASPECT]:["aspect"],[this.D4_BUILD]:["build"],[this.D4_ITEM]:["item"],[this.D4_PARAGON_GLYPH]:["paragon-glyph"],[this.D4_PARAGON_NODE]:["paragon-node"],[this.D4_SENESCHAL_STONE]:["seneschal-stone"],[this.D4_SKILL]:["skill"],[this.D4_VAMPIRIC_POWER]:["vampiric-power"],[this.DI_EQUIP_ITEM]:["equip-item"],[this.DI_MISC_ITEM]:["misc-item"],[this.DI_NPC]:["npc"],[this.DI_OBJECT]:["object"],[this.DI_PARAGON_SKILL]:["paragon-skill"],[this.DI_QUEST]:["quest"],[this.DI_SET]:["set"],[this.DI_SKILL]:["skill"],[this.DI_ZONE]:["zone"],[this.FOLLOWER_ALLIANCE]:["follower"],[this.FOLLOWER_HORDE]:["follower"],[this.ITEM_SET]:["item-set","itemset"],[this.MISSION_ABILITY]:["mission-ability","missionability","garrisonability"],[this.SHIP_ALLIANCE]:["ship"],[this.SHIP_HORDE]:["ship"]};const a=[this.NPC,this.OBJECT,this.ITEM,this.ITEM_SET,this.QUEST,this.SPELL,this.ZONE,this.FACTION,this.HUNTER_PET,this.ACHIEVEMENT,this.TITLE,this.EVENT,this.PLAYER_CLASS,this.RACE,this.SKILL,this.CURRENCY,this.SOUND,this.BUILDING,this.FOLLOWER,this.MISSION_ABILITY,this.MISSION,this.SHIP,this.THREAT,this.RESOURCE,this.CHAMPION,this.ICON,this.ORDER_ADVANCEMENT,this.BFA_CHAMPION,this.AFFIX,this.AZERITE_ESSENCE_POWER,this.AZERITE_ESSENCE,this.STORYLINE,this.ADVENTURE_COMBATANT_ABILITY,this.PROFESSION_TRAIT,this.BATTLE_PET_ABILITY,this.TRADING_POST_ACTIVITY];const i={[this.ACHIEVEMENT]:"achievement",[this.ADVENTURE_COMBATANT_ABILITY]:"adventure-combatant-ability",[this.AFFIX]:"affix",[this.AZERITE_ESSENCE]:"azerite-essence",[this.AZERITE_ESSENCE_POWER]:"azerite-essence-power",[this.BATTLE_PET_ABILITY]:"pet-ability",[this.BFA_CHAMPION]:"bfa-champion",[this.BFA_CHAMPION_ALLIANCE]:"bfa-champion_a",[this.BFA_CHAMPION_HORDE]:"bfa-champion_h",[this.BUILDING]:"building",[this.CHAMPION]:"champion",[this.CHAMPION_ALLIANCE]:"champion_a",[this.CHAMPION_HORDE]:"champion_h",[this.COUNTDOWN_TIMER]:"countdown-timer",[this.COVENANT]:"covenant",[this.CURRENCY]:"currency",[this.D4_AFFIX]:"d4-affix",[this.D4_ASPECT]:"d4-aspect",[this.D4_BUILD]:"d4-build",[this.D4_ITEM]:"d4-item",[this.D4_PARAGON_GLYPH]:"d4-paragon-glyph",[this.D4_PARAGON_NODE]:"d4-paragon-node",[this.D4_SENESCHAL_STONE]:"d4-seneschal-stone",[this.D4_SKILL]:"d4-skill",[this.D4_VAMPIRIC_POWER]:"d4-vampiric-power",[this.DI_EQUIP_ITEM]:"di-equip-item",[this.DI_MISC_ITEM]:"di-misc-item",[this.DI_NPC]:"di-npc",[this.DI_OBJECT]:"di-object",[this.DI_PARAGON_SKILL]:"di-paragon-skill",[this.DI_QUEST]:"di-quest",[this.DI_SET]:"di-set",[this.DI_SKILL]:"di-skill",[this.DI_ZONE]:"di-zone",[this.ENCOUNTER]:"encounter",[this.EVENT]:"event",[this.FACTION]:"faction",[this.FOLLOWER]:"follower",[this.FOLLOWER_ALLIANCE]:"follower_a",[this.FOLLOWER_HORDE]:"follower_h",[this.GEAR_SET]:"gear-set",[this.GUIDE]:"guide",[this.HUNTER_PET]:"pet",[this.ICON]:"icon",[this.ITEM]:"item",[this.ITEM_SET]:"item-set",[this.MISSION]:"mission",[this.MISSION_ABILITY]:"mission-ability",[this.NEWS_POST]:"news",[this.NPC]:"npc",[this.OBJECT]:"object",[this.ORDER_ADVANCEMENT]:"order-advancement",[this.OUTFIT]:"outfit",[this.PLAYER_CLASS]:"class",[this.PROFESSION_TRAIT]:"profession-trait",[this.QUEST]:"quest",[this.RACE]:"race",[this.RESOURCE]:"resource",[this.SHIP]:"ship",[this.SHIP_ALLIANCE]:"ship_a",[this.SHIP_HORDE]:"ship_h",[this.SKILL]:"skill",[this.SOULBIND]:"soulbind",[this.SOUND]:"sound",[this.SPELL]:"spell",[this.STORYLINE]:"storyline",[this.THREAT]:"threat",[this.TITLE]:"title",[this.TRANSMOG_SET]:"transmog-set",[this.TRADING_POST_ACTIVITY]:"trading-post-activity",[this.ZONE]:"zone"};const n={[WH.dataTree.RETAIL]:[this.ACHIEVEMENT,this.ADVENTURE_COMBATANT_ABILITY,this.AFFIX,this.AZERITE_ESSENCE,this.AZERITE_ESSENCE_POWER,this.BATTLE_PET_ABILITY,this.BFA_CHAMPION,this.BUILDING,this.CHAMPION,this.CURRENCY,this.EVENT,this.FACTION,this.FOLLOWER,this.GATHERER_GUIDE_IMAGE,this.GATHERER_LISTVIEW,this.GATHERER_SCREENSHOT,this.GUIDE,this.HUNTER_PET,this.ICON,this.ITEM,this.ITEM_SET,this.MISSION,this.MISSION_ABILITY,this.NPC,this.OBJECT,this.ORDER_ADVANCEMENT,this.OUTFIT,this.PLAYER_CLASS,this.PROFESSION_TRAIT,this.QUEST,this.RACE,this.RESOURCE,this.SHIP,this.SKILL,this.SOUND,this.SPELL,this.STORYLINE,this.THREAT,this.TITLE,this.TRADING_POST_ACTIVITY,this.TRANSMOG_SET,this.ZONE],[WH.dataTree.CLASSIC]:[this.FACTION,this.GATHERER_GUIDE_IMAGE,this.GATHERER_LISTVIEW,this.GATHERER_SCREENSHOT,this.GEAR_SET,this.GUIDE,this.HUNTER_PET,this.ICON,this.ITEM,this.ITEM_SET,this.NPC,this.OBJECT,this.OUTFIT,this.PLAYER_CLASS,this.QUEST,this.RACE,this.RESOURCE,this.SKILL,this.SOUND,this.SPELL,this.ZONE],[WH.dataTree.TBC]:[this.FACTION,this.GATHERER_GUIDE_IMAGE,this.GATHERER_LISTVIEW,this.GATHERER_SCREENSHOT,this.GEAR_SET,this.GUIDE,this.HUNTER_PET,this.ICON,this.ITEM,this.ITEM_SET,this.NPC,this.OBJECT,this.OUTFIT,this.PLAYER_CLASS,this.QUEST,this.RACE,this.RESOURCE,this.SKILL,this.SOUND,this.SPELL,this.ZONE],[WH.dataTree.WRATH]:[this.ACHIEVEMENT,this.CURRENCY,this.EVENT,this.FACTION,this.GATHERER_GUIDE_IMAGE,this.GATHERER_LISTVIEW,this.GATHERER_SCREENSHOT,this.GUIDE,this.HUNTER_PET,this.ICON,this.ITEM,this.ITEM_SET,this.NPC,this.OBJECT,this.OUTFIT,this.PLAYER_CLASS,this.QUEST,this.RACE,this.RESOURCE,this.SKILL,this.SOUND,this.SPELL,this.ZONE],[WH.dataTree.CATA]:[this.ACHIEVEMENT,this.CURRENCY,this.EVENT,this.FACTION,this.GATHERER_GUIDE_IMAGE,this.GATHERER_LISTVIEW,this.GATHERER_SCREENSHOT,this.GUIDE,this.HUNTER_PET,this.ICON,this.ITEM,this.ITEM_SET,this.NPC,this.OBJECT,this.OUTFIT,this.PLAYER_CLASS,this.QUEST,this.RACE,this.RESOURCE,this.SKILL,this.SOUND,this.SPELL,this.ZONE],[WH.dataTree.D2]:[],[WH.dataTree.D4]:[this.D4_AFFIX,this.D4_ASPECT,this.D4_BUILD,this.D4_ITEM,this.D4_PARAGON_GLYPH,this.D4_PARAGON_NODE,this.D4_PLAYER_CLASS,this.D4_SENESCHAL_STONE,this.D4_SKILL,this.D4_VAMPIRIC_POWER],[WH.dataTree.DI]:[this.DI_EQUIP_ITEM,this.DI_MISC_ITEM,this.DI_NPC,this.DI_OBJECT,this.DI_PARAGON_SKILL,this.DI_QUEST,this.DI_SET,this.DI_SKILL,this.DI_ZONE]};const s=0;const r=1;const o=2;const l=3;const c={typeNames:undefined};this.existsInDataEnv=function(e,t){return n[WH.getDataTree(t)].includes(e)};this.getIdByString=function(e){return WH.findKey(i,e,true)};this.getDetailPageName=e=>(t[e]||[])[0]||i[e];this.getHistoricalDetailPageNames=e=>{let a=t[e]||i[e]&&[i[e]];if(!a){throw new Error(`The given type has no detail pages or string IDs. [${e}]`)}return a};this.getGame=t=>{let a=(e.getRequiredTrees(t)||[])[0];return a?WH.Game.getByTree(a):undefined};this.getGameWowTypes=function(){return a.slice()};this.getPreferredDataEnv=function(e){let t=WH.Types.getRequiredTrees(e);if(t){return t.includes(WH.getDataTree())?WH.getDataEnv():WH.getRootByTree(t[0])}};this.getReferenceName=function(e){return i[e]};this.getRequiredTrees=function(e){let t=[];let a=false;for(let i in n){if(!n.hasOwnProperty(i)){continue}if(n[i].includes(e)){t.push(parseInt(i))}else{a=true}}return a?t:null};this.getStringId=function(e){return i[e]};this.hasName=function(e){return c.typeNames.hasOwnProperty(e)};this.getLowerPlural=function(e){return d(e)[l]};this.getLowerSingular=function(e){return d(e)[r]};this.getUpperPlural=function(e){return d(e)[o]};this.getUpperSingular=function(e){return d(e)[s]};function d(e){if(c.typeNames===undefined){c.typeNames=WH.getPageData("types.names")||{}}return c.typeNames[e]||Array(4).fill(WH.term("unknownType_format",e),0,4)}};WH.error=function(e){console.error.apply(console.error,Array.prototype.slice.call(arguments));if(!e){console.error("The error message was empty, and thus will not be logged.");return}if(WH.Track){WH.Track.nonInteractiveEvent.apply(WH.Track,["Error"].concat(Array.prototype.slice.call(arguments)))}};WH.info=function(e){console.info.apply(console.info,Array.prototype.slice.call(arguments))};WH.log=function(e){console.log.apply(console.log,Array.prototype.slice.call(arguments))};WH.warn=function(e){console.warn.apply(console.warn,Array.prototype.slice.call(arguments))};(function(){const e={};WH.getPageData=function(t){if(e.hasOwnProperty(t)){return e[t]}if(WH.REMOTE){return undefined}let a=document.querySelector(("script#data."+t).replace(/\./g,"\\."));if(a){return JSON.parse(a.innerHTML)}return undefined};WH.setPageData=function(t,a){if(e.hasOwnProperty(t)){WH.warn("Duplicate data key",t)}e[t]=a}})();Object.assign(WH.PageMeta,WH.getPageData("pageMeta")||{});WH.PageMeta.serverTime=WH.PageMeta.serverTime?new Date(WH.PageMeta.serverTime):new Date;if(WH.PageMeta.staticUrl!==undefined){WH.STATIC_URL=WH.PageMeta.staticUrl;WH.staticUrl=WH.PageMeta.staticUrl}WH.stringCompare=function(e,t){if(e==t)return 0;if(e==null)return-1;if(t==null)return 1;var a=parseFloat(e);var i=parseFloat(t);if(!isNaN(a)&&!isNaN(i)&&a!=i){return a0&&e.charAt(a)===t){}e=e.substring(0,a+1);if(e===t){e=""}return e};WH.sprintf=function(e){if(typeof e!=="string"){WH.error("No format passed to WH.sprintf.",e);return""}for(var t=1,a=arguments.length;t\&]/gim,(function(e){return"&#"+e.charCodeAt(0)+";"}))};WH.stub=function(e){let t=e.split(".");let a=WH;for(let e=0,i;i=t[e];e++){if(!a[i]){a[i]={}}a=a[i]}};WH.urlEncode=function(e){e=encodeURIComponent(e);e=WH.stringReplace(e,"+","%2B");return e};WH.urlEncodeHref=function(e){e=encodeURIComponent(e);e=WH.stringReplace(e,"%20","+");e=WH.stringReplace(e,"%3D","=");return e};WH.numberFormat=function(e){var t=(""+parseFloat(e)).split(".");e=t[0];var a=t.length>1?"."+t[1]:"";if(e.length<=3){return e+a}return WH.numberFormat(e.substr(0,e.length-3))+","+e.substr(e.length-3)+a};WH.numberLocaleFormat=function(e,t){var a="";if(typeof t=="number"){a=Locale.locales[t].name}else{if(typeof t=="string"){a=t}else{a=Locale.getName()}}if(a.length==4){a=a.substr(0,2).toLowerCase()+"-"+a.substr(2).toUpperCase()}var i=""+e;try{i=e.toLocaleString(a)}catch(t){i=e.toLocaleString()}return i};WH.inArray=function(e,t,a,i){if(e==null){return-1}if(!Array.isArray(e)){WH.error("Tried looking for a value in a haystack which is not an array.",arguments);return-1}var n;if(a){n=e.length;for(var s=i||0;s=0){return n}n=e.length;for(var r=i||0;r=0;--a){t[e[a]]=1}var i=[];for(var n in t){i.push(n)}return i};WH.closest=function(e,t){while(e&&e.nodeType===Node.ELEMENT_NODE){if(e.matches(t)){return e}e=e.parentNode}return undefined};WH.ge=function(e){if(typeof e!="string"){return e}return document.getElementById(e)};WH.gE=function(e,t){return e.getElementsByTagName(t)};WH.qs=function(e,t){return(t||document).querySelector(e)};WH.qsa=function(e,t){return(t||document).querySelectorAll(e)};WH.ce=function(e,t,a){};WH.ce=function(e){return function(t,a,i){var n=e(t);if(a){WH.cOr(n,a)}if(i){WH.ae(n,i)}if(n.tagName==="INPUT"&&n.type==="range"&&!WH.isRemote()&&WH.DOM){WH.DOM.styleRangeElement(n)}return n}}(document.createElement.bind(document));WH.de=function(e,t){if(typeof e==="string"){e=(t||document).querySelector(e)}if(e&&e.parentNode){e.parentNode.removeChild(e)}};WH.ae=function(e,t){if(Array.isArray(t)){WH.arrayApply(t,e.appendChild.bind(e));return t}else{return e.appendChild(t)}};WH.aea=(e,t)=>e.parentNode.insertBefore(t,e.nextSibling);WH.aeb=function(e,t){return e.parentNode.insertBefore(t,e)};WH.aef=function(e,t){return e.insertBefore(t,e.firstChild)};WH.ee=function(e,t){if(!t){t=0}while(e.childNodes[t]){e.removeChild(e.childNodes[t])}};WH.ct=function(e){return document.createTextNode(e)};WH.st=function(e,t){if(e.firstChild&&e.firstChild.nodeType==3){e.firstChild.nodeValue=t}else{WH.aef(e,WH.ct(t))}};WH.noWrap=function(e){e.style.whiteSpace="nowrap"};WH.rf=function(){return false};WH.rfWithoutControlKey=function(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey){return}return false};WH.aE=function(e,t,a,i){if(!e){return}if(typeof e==="string"){e=document.querySelectorAll(e)}else if(e instanceof EventTarget){e=[e]}else if(Array.isArray(e)||e instanceof NodeList){}else{e=[e]}t=typeof t==="string"?[t]:t;for(let n=0;n=WH.Layout.getHeaderBottom()+i&&(t.allowScrollingDown??true?a.top+a.height+i=i&&a.left+a.width+i{let t=["fixed","sticky"];while(e&&e.nodeType===Node.ELEMENT_NODE){if(t.includes(getComputedStyle(e).position)){return true}e=e.parentNode}return false};WH.createReverseLookupJson=function(e){var t={};for(var a in e){t[e[a]]=a}return t};WH.getLocaleFromDomain=function(e){var t=WH.getLocaleFromDomain.L;if(e&&typeof e=="string"){var a=e.split(".");return t[a[0]]||0}return 0};WH.getLocaleFromDomain.L={ko:1,fr:2,de:3,cn:4,es:6,ru:7,pt:8,it:9};WH.getDomainFromLocale=function(e){var t;if(WH.getDomainFromLocale.L){t=WH.getDomainFromLocale.L}else{t=WH.getDomainFromLocale.L=WH.createReverseLookupJson(WH.getLocaleFromDomain.L)}return t[e]?t[e]:""};WH.fetch=function(){let e=function(e){let t=[];for(let a in e){if(e.hasOwnProperty(a)){t.push(encodeURIComponent(a)+"="+encodeURIComponent(e[a]))}}return t.join("&")};let t=function(e){if(e.contentType){return e.contentType}if(typeof e.form==="object"){return"application/x-www-form-urlencoded"}if(e.hasOwnProperty("json")){return"application/json"}if(typeof e.body==="string"){return"application/octet-stream"}return undefined};if(typeof window.fetch!=="function"){let a=function(e,t,a){let i=this;let n=i.responseText;let s=(i.getResponseHeader("content-type")||"").indexOf("application/json")===0;let r=null;if(i.status<200||i.status>399){r="Legacy WH.fetch call got a bad response code."}else if(s){try{n=JSON.parse(n)}catch(e){n=undefined;r="Could not process Legacy WH.fetch JSON response. "+e.message}}if(r){WH.error(r,e,i.status,i.responseText,i);if(t.error){t.error(n,i.status)}}else{if(t.success){t.success(n,i.status)}}if(t.complete){t.complete(n,i.status)}};let i=function(e,t,a){let i=this;let n="Legacy WH.fetch call could not complete.";let s=i.responseText||undefined;if(!t.errorExpected){WH.error(n,e,i.status,i.responseText,i)}if(t.error){t.error(s,i.status)}if(t.complete){t.complete(s,i.status)}};return function(n,s){s=s||{};if(s.query){n+=(n.indexOf("?")>-1?"&":"?")+WH.Url.buildQuery(s.query)}let r=s.method||"GET";if(s.hasOwnProperty("data")||typeof s.body==="string"){r=s.method||"POST"}let o=new XMLHttpRequest;WH.aE(o,"load",a.bind(o,n,s));WH.aE(o,"error",i.bind(o,n,s));o.overrideMimeType("text/plain");o.open(r,n,true);let l=t(s);if(l){o.setRequestHeader("Content-Type",l)}if(typeof s.form==="object"){o.send(e(s.form))}else if(s.hasOwnProperty("json")){o.send(JSON.stringify(s.json))}else if(typeof s.body==="string"){o.send(s.body)}else{o.send()}}}let a=function(e,t,a,i){if(!a.ok){if(!t.errorExpected){WH.error("WH.fetch call got a bad response code.",e,a.status,i,a)}if(t.error){t.error(i,a.status)}}else{if(t.success){t.success(i,a.status)}}if(t.complete){t.complete(i,a.status)}};let i=function(e,t,a,i){let n="Could not process WH.fetch response, callback errored. "+i.message;WH.error(n,e,a.status,"",a);if(t.error){t.error(undefined,a.status)}if(t.complete){t.complete(undefined,a.status)}};let n=function(e,t,n){let s=(n.headers.get("content-type")||"").indexOf("application/json")===0;(s?n.json():n.text()).then(a.bind(null,e,t,n))["catch"](i.bind(null,e,t,n))};let s=function(e,t,a){let i="WH.fetch call could not complete. "+a.message;WH.error(i,e,0,"",a);if(t.error){t.error(undefined,0,a.message)}if(t.complete){t.complete(undefined,0,a.message)}};return function(a,i){i=i||{};if(i.query){a+=(a.indexOf("?")>-1?"&":"?")+WH.Url.buildQuery(i.query)}let r=typeof i.cookies==="boolean"?i.cookies:true;let o={credentials:r?"same-origin":"omit",headers:new Headers,method:i.method||"GET",mode:i.mode||"same-origin"};let l=t(i);if(l){o.headers.set("Content-Type",l)}if(typeof i.form==="object"){o.method=i.method||"POST";o.body=e(i.form)}else if(i.hasOwnProperty("json")){o.method=i.method||"POST";o.body=JSON.stringify(i.json)}else if(typeof i.body==="string"){o.method=i.method||"POST";o.body=i.body}fetch(a,o).then(n.bind(null,a,i))["catch"](s.bind(null,a,i))}}();WH.ajaxIshRequest=function(e,t){var a=document.getElementsByTagName("head")[0];if(e.substr(0,5)==="http:"&&location.protocol==="https:"){WH.error("Refused to AJAX-ish load URL.",e);return undefined}if(t){var i=WH.ce("script",{type:"text/javascript",src:e});WH.ae(a,i);return i}var n=WH.getGets();if(n.refresh!=null){if(n.refresh.length){e+="&refresh="+n.refresh}else{e+="&refresh"}}if(n.locale!=null){e+="&locale="+n.locale}if(n.ptr!=null){e+="&ptr"}var i=WH.ce("script",{type:"text/javascript",src:e,charset:"utf8"});WH.ae(a,i);return i};WH.xhrJsonRequest=function(e,t){var a=new XMLHttpRequest;a.onload=function(e){var a=e.target.response;switch(e.target.responseType){case"json":break;case"":case"text":try{a=JSON.parse(a)}catch(a){WH.error("Could not parse expected JSON response",e.target);return t()}break;default:WH.error("Unexpected response type from JSON request",e.target);return t()}return t(a)};a.onerror=function(){return t()};a.open("GET",e,true);a.responseType="json";a.send()};WH.getGets=function(){if(WH.getGets.C!=null){return WH.getGets.C}var e=WH.getQueryString();var t=WH.parseQueryString(e);WH.getGets.C=t;return t};WH.visitUrlWithPostData=function(e,t){var a=WH.ce("form");a.action=e;a.method="post";for(var i in t){if(t.hasOwnProperty(i)){var n=WH.ce("input");n.type="hidden";n.name=i;n.value=t[i];WH.ae(a,n)}}WH.ae(document.body,a);a.submit()};WH.getQueryString=function(){var e="";if(location.pathname){e+=location.pathname.substr(1)}if(location.search){if(location.pathname){e+="&"}e+=location.search.substr(1)}return e};WH.parseQueryString=function(e){e=decodeURIComponent(e).replace(/^\?+/,"");var t=e.split("&");var a={};for(var i=0,n=t.length;i=t.r||t.l>=e.r||e.t>=t.b||t.t>=e.b)};WH.getViewport=function(){var e=$(window);return new Rectangle(e.scrollLeft(),e.scrollTop(),e.width(),e.height())};WH.keyPressIsAlphaNumeric=function(e){var t=document.all?e.keycode:e.which;return t>47&&t<58||t>64&&t<91||t>95&&t<112||t==222||t==0};WH.isRemote=function(){return!WH.PageMeta.wowhead};WH.isDev=function(){return!!WH.PageMeta.dev};WH.getDataEnv=function(){return WH.PageMeta.hasOwnProperty("dataEnv")?WH.PageMeta.dataEnv.env:WH.dataEnv.MAIN};WH.getDataEnvFromKey=function(e){for(let t in WH.dataEnvKey){if(WH.dataEnvKey[t]===e){return parseInt(t)}}return undefined};WH.getDataEnvKey=function(e){return WH.dataEnvKey[e||WH.getDataEnv()]};WH.getDataEnvSeoName=function(e){e=e||WH.getDataEnv();return WH.TERMS[e===WH.dataEnv.TBC?"tbcClassic":WH.getDataEnvTerm(e)]};WH.getDataEnvTerm=function(e){return WH.dataEnvTerm[e||WH.getDataEnv()]};WH.getDataTree=function(e){if(e!==undefined){return WH.dataEnvToTree[e]}return WH.PageMeta.hasOwnProperty("dataEnv")?WH.PageMeta.dataEnv.tree:WH.dataTree.RETAIL};WH.getDataTreeFromKey=function(e){const t=WH.getDataEnvFromKey(e);if(t==null){return undefined}return WH.getDataTree(t)};WH.getDataTreeKey=function(e){return WH.getDataEnvKey(WH.dataTreeToRoot[e||WH.getDataTree()])};WH.getDataTreeShortTerm=function(e){return WH.dataTreeShortTerm[e||WH.getDataTree()]};WH.getDataTreeTerm=function(e){return WH.dataTreeTerm[e||WH.getDataTree()]};WH.getRootByTree=function(e){return WH.dataTreeToRoot[e]};WH.getRootEnv=function(e){return WH.dataTreeToRoot[WH.getDataTree(e||WH.getDataEnv())]};WH.getServerTime=function(){return WH.PageMeta.serverTime};WH.getDataCacheVersion=function(e){return(WH.PageMeta.activeDbChanged&&WH.PageMeta.activeDbChanged[e||WH.getDataEnv()]||"0").toString()};WH.isBeta=function(){return WH.getDataEnv()===WH.dataEnv.BETA};WH.isBetaActive=function(){if(WH.PageMeta.hasOwnProperty("dataEnv")){return WH.PageMeta.dataEnv.active.beta}return!!WH.REMOTE};WH.isCataTree=function(e){return WH.getDataTree(e)===WH.dataTree.CATA};WH.isClassicTree=function(e){return WH.getDataTree(e)===WH.dataTree.CLASSIC};WH.isDataEnvActive=function(e){switch(e){case WH.dataEnv.BETA:return WH.isBetaActive();case WH.dataEnv.PTR:return WH.isPtrActive();case WH.dataEnv.PTR2:return WH.isPtr2Active();case WH.dataEnv.D4PTR:return WH.isRemote()||!!WH.PageMeta?.dataEnv?.active.d4ptr;default:return true}};WH.isDataEnvRestricted=function(e){return!WH.isRemote()&&WH.PageMeta.restrictedDataEnvs.includes(e)};WH.isEntityRestricted=function(e){return!WH.isRemote()&&WH.PageMeta.restrictedEntities.includes(e)};WH.isPtr=function(){return WH.getDataEnv()===WH.dataEnv.PTR};WH.isPtr2=function(){return WH.getDataEnv()===WH.dataEnv.PTR2};WH.isPtrActive=function(){if(WH.PageMeta.hasOwnProperty("dataEnv")){return WH.PageMeta.dataEnv.active.ptr}return!!WH.REMOTE};WH.isPtr2Active=function(){if(WH.PageMeta.hasOwnProperty("dataEnv")){return WH.PageMeta.dataEnv.active.ptr2}return!!WH.REMOTE};WH.isRetailTree=function(e){return WH.getDataTree(e)===WH.dataTree.RETAIL};WH.isTbcTree=function(e){return WH.getDataTree(e)===WH.dataTree.TBC};WH.isWrathTree=function(e){return WH.getDataTree(e)===WH.dataTree.WRATH};WH.suppressExternalDebug=function(){return!!WH.PageMeta.suppressExternalDebug};WH.setupFooterMenus=function(){Menu.onLoad((()=>["help","tools","about"].forEach((e=>{const t=`footer-${e}-menu`;const a=`footer_${e}`;const i=WH.ge(t);if(i){i.classList.add("hassubmenu");Menu.add(i,Menu.getMenu(a))}}))))};WH.getScreenshotUrl=function(e,t,a){if(!t){t="normal"}a=a||{};var i=t=="normal"&&typeof a.description=="string"&&a.description?"-"+WH.Strings.slug(a.description,true):"";var n={2:".jpg",3:".png",18:".webp"};var s=n[a.imageType||2]||n[2];return a.staffOnly?"/admin/screenshots/view/"+e+"?ext="+s.replace(/\./,""):WH.staticUrl+"/uploads/screenshots/"+t+"/"+e+i+s};WH.getWowMaxLevel=()=>WH.Wow?.getMaxPlayerLevel?.()??70;WH.convertRatingToPercent=function(e,t,a,i){let n=(WH.convertRatingToPercent.LT||{})[t]||{};let s=WH.findSparseKey(n,e);let r=n[s]||0;if(i!=null&&(WH.isWrathTree()||WH.isCataTree())&&!WH.isRemote()){const e=WH.Wow.Item.Stat;const a=WH.Wow.PlayerClass;if([e.ID_HASTE_RATING,e.ID_HASTE_MELEE_RATING].includes(t)){if([a.PALADIN,a.DEATH_KNIGHT,a.SHAMAN,a.DRUID].includes(i)){r/=1.3}}}return r?a/r:0};WH.statToRating={11:0,12:1,13:2,14:3,15:4,16:5,17:6,18:7,19:8,20:9,21:10,25:15,26:15,27:15,28:17,29:18,30:19,31:5,32:8,34:15,35:15,36:17,37:23,44:24,49:25,57:26,59:11,60:12,61:13,62:16,63:20,64:21,40:29};WH.statToJson={0:"mana",1:"health",3:"agi",4:"str",5:"int",6:"spi",7:"sta",8:"energy",9:"rage",10:"focus",13:"dodgertng",14:"parryrtng",15:"blockrtng",16:"mlehitrtng",17:"rgdhitrtng",18:"splhitrtng",19:"mlecritstrkrtng",20:"rgdcritstrkrtng",21:"splcritstrkrtng",22:"corruption",23:"corruptionres",24:"_splhitrtng",25:"_mlecritstrkrtng",26:"_rgdcritstrkrtng",27:"_splcritstrkrtng",28:"mlehastertng",29:"rgdhastertng",30:"splhastertng",31:"hitrtng",32:"critstrkrtng",33:"_hitrtng",34:"_critstrkrtng",35:"resirtng",36:"hastertng",37:"exprtng",38:"atkpwr",39:"rgdatkpwr",40:"versatility",41:"splheal",42:"spldmg",43:"manargn",44:"armorpenrtng",45:"splpwr",46:"healthrgn",47:"splpen",49:"mastrtng",50:"armorbonus",51:"firres",52:"frores",53:"holres",54:"shares",55:"natres",56:"arcres",57:"pvppower",58:"amplify",59:"multistrike",60:"readiness",61:"speedbonus",62:"lifesteal",63:"avoidance",64:"sturdiness",66:"cleave",71:"agistrint",72:"agistr",73:"agiint",74:"strint",75:"",76:"",77:"",78:"",79:"",80:"",81:""};WH.jsonToStat={};for(var i in WH.statToJson){WH.jsonToStat[WH.statToJson[i]]=i}WH.individualToGlobalStat={16:31,17:31,18:31,19:32,20:32,21:32,24:33,25:34,26:34,27:34,28:36,29:36,30:36};WH.convertScalingFactor=function(e,t,a,i,n){var s=WH.convertScalingFactor.SV;var r=WH.convertScalingFactor.SD.stats;if(!s||!s[e]){if(g_user.roles&U_GROUP_ADMIN){alert("There are no item scaling values for level "+e)}return n?{}:0}const o=10;var l={},c=s[e],d=r[a];if(!d||!(i>=0&&i0){var i=a.maxlvlscaling?Math.min(t,a.maxlvlscaling):t;var n=WH.getSpellScalingValue(a.scalingcategory,i);for(var s=1;s<3;++s){var r=a["itemenchspell"+s];var o=a["itemenchtype"+s];var l=WH.statToJson[r];if(o==5&&e[l]){var c=a["damage"+s];if(c){e[l]=Math.round(n*c)}}}if(a.allstats){for(var d in e){e[d]=Math.round(n*a["damage1"])}}}if(!e.scadist||!e.scaflags){return}e.bonuses=e.bonuses||{};var f=e.scaflags&255,u=e.scaflags>>8&255,p=(e.scaflags&1<<16)!=0,h=(e.scaflags&1<<17)!=0,g=(e.scaflags&1<<18)!=0,m;switch(f){case 5:case 1:case 7:case 17:m=7;break;case 3:case 12:m=8;break;case 16:case 11:case 14:m=9;break;case 15:m=10;break;case 23:case 21:case 22:case 13:m=11;break;default:m=-1}if(m>=0){for(var s=0;s<10;++s){var W=WH.convertScalingFactor(t,m,e.scadist,s,1);if(W.n){e[W.n]=W.v}e.bonuses[W.s]=W.v}}if(g){e.splpwr=e.bonuses[45]=WH.convertScalingFactor(t,6)}if(p){switch(f){case 3:e.armor=WH.convertScalingFactor(t,11+u);break;case 5:e.armor=WH.convertScalingFactor(t,15+u);break;case 1:e.armor=WH.convertScalingFactor(t,19+u);break;case 7:e.armor=WH.convertScalingFactor(t,23+u);break;case 16:e.armor=WH.convertScalingFactor(t,28);break;case 14:e.armor=WH.convertScalingFactor(t,29);break;default:e.armor=0}}if(h){var H=e.mledps?"mle":"rgd",E;switch(f){case 23:case 21:case 22:case 13:e.dps=e[H+"dps"]=WH.convertScalingFactor(t,g?2:0);E=.3;break;case 17:e.dps=e[H+"dps"]=WH.convertScalingFactor(t,g?3:1);E=.2;break;case 15:e.dps=e[H+"dps"]=WH.convertScalingFactor(t,u==19?5:4);E=.3;break;default:e.dps=e[H+"dps"]=0;E=0}e.dmgmin=e[H+"dmgmin"]=Math.floor(e.dps*e.speed*(1-E));e.dmgmax=e[H+"dmgmax"]=Math.floor(e.dps*e.speed*(1+E))}};WH.getContentTuningLevels=function(e){let t=(WH.contentTuningLevels||{}).keys||{};let a=Object.keys(t).find((function(a){return t[a].includes(e)}));if(a!==undefined){return{minLevel:WH.contentTuningLevels.values[a][0],maxLevel:WH.contentTuningLevels.values[a][1]}}};WH.scaleItemEnchantment=function(e,t){var a=e.enchantment;if(e.scalinginfo&&e.scalinginfo.scalingcategory-11>0){var i=a.match(/\d+/g);if(i){var n=parseInt(e.scalinginfo.maxlvlscaling)?Math.min(t,parseInt(e.scalinginfo.maxlvlscaling)):t;var s=WH.getSpellScalingValue(e.scalinginfo.scalingcategory,n);for(var r=0;rr){e=r}let o=i[n];if(o&&o.length>0){let t=-1;for(let a in o){let i=o[a];if(i[1]>=e){t=a;break}}let i=o[t!=-1?t:o.length-1];let n=null;let s=0;if(t>0){n=o[t-1];let a=i[1]-n[1];if(a>0){let t=e-n[1];let r=t/a;let o=i[2]-n[2];let l=r*o;s=n[2]+l}}else{s=i[2]}if(s>0){a=Math.round(s)}}}return a};WH.findSparseKey=function(e,t){if(e.hasOwnProperty(t)){return t.toString()}return Object.keys(e).reduce((function(e,a){let i=parseInt(a);return i>t||parseInt(e)>i?e:a}),"0")};WH.applyStatModifications=function(e,t,a,i,n,s,r,o){const l=WH.Wow.Item;var c={};if(e.hasOwnProperty("level")){c=WH.dO(e)}else{WH.cOr(c,e,"__")}if(n&&n.length){var d=false;for(var f=0;f0&&WH.isSet("g_itembonuses")&&g_itembonuses[u]){var p=g_itembonuses[u];for(var h=0;h0&&WH.isSet("g_itembonuses")&&g_itembonuses[u]){var p=g_itembonuses[u];for(var h=0;hg[2]){s=g[1];r=g[2];H=false}break;case 43:if(o==null||l>g[2]){o=g[1];l=g[2];H=false}break;case 27:if(WH.curvePoints){let e=WH.curvePoints[g[1]];if(e&&e[0]&&e[0][2]){c.reqlevel=e[0][2]}}else{WH.error("Could not apply item stat modifications without scaling curve points.",e.id,e.name)}break;case 44:if(!c.itemNameDescStats){c.itemNameDescStats=[]}c.itemNameDescStats.push({qty:g[1],nameDescId:g[2]});break;default:break}}}}if(!c.scadistbonus){c.level=o||(s||c.level)+i}if(H){c.level=H;c.previewLevel=H}c.namedesc=c.namedesc?c.namedesc:"";for(var h=0;h<4;++h){let e=WH.Wow.Item.getNameDescription(W[h]);if(e){let t=WH.Wow.Item.getNameDescriptionColor(W[h]);if(t>0){let e=parseInt(t).toString(16);while(e.length<6){e="0"+e}c.namedesc+=WH.sprintf('',e)}c.namedesc+=(!c.namedesc?"":" ")+e;if(t>0){c.namedesc+=""}}}}(function(){if(!o||!o.length||!c.statsInfo){return}for(let t,a=0;t=WH.Wow.Item.Stat.CRAFTING_STAT_FROM[a];a++){let i=o[a];if(!i){continue}if(!c.statsInfo[t]){continue}if(c.statsInfo[i]){c.statsInfo[i].alloc+=e.statsInfo[t].alloc}else{c.statsInfo[i]=c.statsInfo[t];c.extraStats.push(i)}delete c.statsInfo[t]}})();let _=WH.Wow.Expansion.available(WH.Wow.Expansion.WRATH)&&c.scadist>0;if(_){let e=WH.convertScalingFactor.SD.stats[c.scadist];if(e){let t=l.SCALING_STATS_DISTRIBUTION_STAT_MAX;for(f=0;f0&&e[f+t]>0){c.statsInfo[e[f]]={qty:0,alloc:parseInt(e[f+t]),socketMult:0}}}}}if(e.statsInfo&&e.level&&WH.applyStatModifications.ScalingData&&(WH.applyStatModifications.ScalingData.AL.length>1||_)){let t=WH.applyStatModifications.ScalingData.armor.total;let n=WH.applyStatModifications.ScalingData.armor.shield;let o=WH.applyStatModifications.ScalingData.armor.quality;let d=WH.applyStatModifications.ScalingData.SV;let u=WH.applyStatModifications.ScalingData.AL;let p=WH.applyStatModifications.ScalingData.socketCost;let h=WH.applyStatModifications.ScalingData.PPP;let g=WH.convertScalingFactor.SV;c.level=i?i:a&&e.upgrades&&e.upgrades[a-1]?c.level+e.upgrades[a-1]:c.level;var A=c.level-e.level;var L=Math.pow(1.15,A/15);let m=c.slot===WH.Wow.Item.INVENTORY_TYPE_PROFESSION_TOOL||c.slot===WH.Wow.Item.INVENTORY_TYPE_PROFESSION_ACCESSORY;let W=m?WH.getItemProfessionPropPointsType(c):WH.getItemRandPropPointsType(c);let H;var R=[];for(H=c.level;H>=0;H--){if(d.hasOwnProperty(H)){R=d[H];break}}let E=0;if(W!=-1){let e=0;if(m){switch(c.quality){case WH.Wow.Item.QUALITY_EPIC:e=0;break;case WH.Wow.Item.QUALITY_RARE:e=2;break;case WH.Wow.Item.QUALITY_UNCOMMON:e=4;break;default:e=-1;break}if(e!==-1){e+=W;let t=WH.findSparseKey(h,H);let a=WH.findSparseKey(h[t]||{},e);E=(h[t]||{})[a]||0}}else if(_){let e=null;switch(c.slot){case WH.Wow.Item.INVENTORY_TYPE_SHOULDERS:e=30;break;case WH.Wow.Item.INVENTORY_TYPE_TRINKET:e=31;break;case WH.Wow.Item.INVENTORY_TYPE_FINGER:e=9;break;case WH.Wow.Item.INVENTORY_TYPE_ONE_HAND:e=11;break;case WH.Wow.Item.INVENTORY_TYPE_RANGED:e=10;break;default:e=7;break}if(g[s]&&g[s][e]){E=g[s][e]}}else{switch(c.quality){case WH.Wow.Item.QUALITY_LEGENDARY:case WH.Wow.Item.QUALITY_EPIC:e=0;break;case WH.Wow.Item.QUALITY_HEIRLOOM:case WH.Wow.Item.QUALITY_RARE:e=1;break;case WH.Wow.Item.QUALITY_UNCOMMON:e=2;break;default:break}let t=WH.findSparseKey(R,e);let a=WH.findSparseKey(R[t]||{},W);E=(R[t]||{})[a]||0}}let T=WH.findSparseKey(p,H);let v=p[T]||0;for(var f in WH.statToJson){var C=WH.statToJson[f];if(c[C]||c.statsInfo&&c.statsInfo[f]){var M=0;var N=0;if(c.statsInfo.hasOwnProperty(f)){M=parseFloat(c.statsInfo[f].socketMult);N=parseInt(c.statsInfo[f].alloc)}var O=Math.round(M*v);if(N&&(E>0||c.contenttuning>0)){c[C]=N*1e-4*E-O}else{c[C]=(c[C]+O)*L-O}if(C=="sta"){c[C]=c[C]*WH.getStaminaRatingMult(c.level,c.slot||g_items[c.id].slot)}else if(r&&WH.inArray(WH.applyStatModifications.BASE_STATS,f)<0){c[C]=c[C]*WH.getCombatRatingMult(c.level,c.slot||g_items[c.id].slot)}else if(C==="corruption"||C==="corruptionres"){c[C]=N}switch(C){case"agistrint":c["agi"]=c["str"]=c["int"]=c[C];break;case"agistr":c["agi"]=c["str"]=c[C];break;case"agiint":c["agi"]=c["int"]=c[C];break;case"strint":c["str"]=c["int"]=c[C];break;default:break}}}if(c.scadist>0&&(c.dbcFlags??0)&l.DBCITEM_FLAGS_SCALING_SPELL_POWER){let e=g[s]?.[l.ITEM_SCALING_VALUE_SPELL_POWER_INDEX]??0;c.statsInfo[WH.Wow.Item.Stat.ID_SPELL_POWER]=e;c.splpwr=e}if(c["armor"]){let e=c.quality===l.QUALITY_HEIRLOOM?l.QUALITY_RARE:c.quality;let a=c.subclass===l.ARMOR_SUBCLASS_CLOAKS?l.ARMOR_SUBCLASS_CLOTH:c.subclass;if(_){let e=null;if(l.WRATH_ARMOR_SCALING_INDEXES[c.subclass]&&l.WRATH_ARMOR_SCALING_INDEXES[c.subclass][c.slot]){e=l.WRATH_ARMOR_SCALING_INDEXES[c.subclass][c.slot]}if(g[s]&&g[s][e]){c["armor"]=g[s][e]}}else if(l.isBodyArmor(l.CLASS_ARMOR,a)){let i=WH.findSparseKey(o,c.level);let n=WH.findSparseKey(o[i]||{},e);let s=(o[i]||{})[n]||0;let r=WH.findSparseKey(t,c.level);let l=WH.findSparseKey(t[r]||{},a-1);let d=(t[r]||{})[l]||0;let f=u[c.slot][a-1];c["armor"]=Math.floor(d*s*f+.5)}if(c.subclass===l.ARMOR_SUBCLASS_SHIELDS){let t=WH.findSparseKey(n,c.level);let a=WH.findSparseKey(n[t]||{},e);c["armor"]=Math.round((n[t]||{})[a]||0)}}if(c["dps"]){var D=["dps","mledps","rgddps"];var P=["dmgmin1","mledmgmin","rgddmgmin","dmgmax1","mledmgmax","rgddmgmax"];var k=WH.getEffectiveWeaponDamage(c,false);var x=WH.getEffectiveWeaponDamage(c,true);k=Math.floor(Math.max(1,k));x=Math.max(1,x);if(!WH.isRetailTree()){k=c.damagemin||c.dmgmin1||k;x=c.damagemax||c.dmgmax1||x}let e=0;if(_){let t=null;switch(c.subclass){case l.WEAPON_SUBCLASS_DAGGER:case l.WEAPON_SUBCLASS_FIST_WEAPON:case l.WEAPON_SUBCLASS_ONE_HANDED_AXE:case l.WEAPON_SUBCLASS_ONE_HANDED_SWORD:t=0;break;case l.WEAPON_SUBCLASS_FISHING_POLE:case l.WEAPON_SUBCLASS_POLEARM:case l.WEAPON_SUBCLASS_TWO_HANDED_AXE:case l.WEAPON_SUBCLASS_TWO_HANDED_MACE:case l.WEAPON_SUBCLASS_TWO_HANDED_SWORD:t=1;break;case l.WEAPON_SUBCLASS_ONE_HANDED_MACE:t=2;break;case l.WEAPON_SUBCLASS_STAFF:t=3;break;case l.WEAPON_SUBCLASS_BOW:case l.WEAPON_SUBCLASS_CROSSBOW:case l.WEAPON_SUBCLASS_GUN:case l.WEAPON_SUBCLASS_THROWN:t=4;break;case l.WEAPON_SUBCLASS_WAND:t=5;break;default:t=-1;break}if(g[s]&&g[s][t]){e=g[s][t];k=Math.floor(e*c.speed*(1-c.dmgrange/2));x=Math.floor(e*c.speed*(1+c.dmgrange/2)+.5);c["dmgmin1"]=k;c["dmgmax1"]=x}}else{e=(k+x)/2/c.speed}var B=e>=1e3?0:WH.isRetailTree()?1:2;e=parseFloat(e.toFixed(B));for(var f in D){if(c[D[f]]){c[D[f]]=e}}for(var f in P){if(c[P[f]]){if(P[f].indexOf("max")!=-1){c[P[f]]=x}else{c[P[f]]=k}}}}}return c};WH.applyStatModifications.BASE_STATS=[4,3,5,71,72,73,74,7,1,0,8,9,2,10];WH.getItemDamageValue=function(e,t,a){let i=WH.applyStatModifications.ScalingData.DV;if(i&&i[e]){let n=7*a+t;return i[e][WH.findSparseKey(i[e],n)]}return 0};WH.getEffectiveWeaponDamage=function(e,t){var a=e.level;var i=e.subclass;var n=e.quality;var s=e.slotbak?e.slotbak:e.slot;var r=0;var o=false;var l=e.flags2&512;if(e.classs!=2){return 0}if(n>7){return 0}if(n==7){n=3}if(s>22){if(s==24){r=0;o=true}if(!o&&(s<=24||s>26)){o=true}}else{if(s==21||s==22||s==13){if(!l){r=WH.getItemDamageValue(a,n,0)}else{r=WH.getItemDamageValue(a,n,1)}o=true}if(!o&&s!=15){if(s!=17){o=true}else{if(!l){r=WH.getItemDamageValue(a,n,2)}else{r=WH.getItemDamageValue(a,n,3)}o=true}}}if(!o&&i>=2){if(i==2||i==3||i==18){if(!l){r=WH.getItemDamageValue(a,n,2)}else{r=WH.getItemDamageValue(a,n,3)}o=true}if(!o&&i==19){r=WH.getItemDamageValue(a,n,1)}}if(r>0){var c=e.dmgrange||0;if(!t){return r*e.speed*(1-c/2)}else{return Math.floor(r*e.speed*(1+c/2)+.5)}}return 0};WH.getJsonReforge=function(e,t){if(!t){if(!WH.reforgeStats){return[]}e.__reforge={};e.__reforge.all=[];for(var t in WH.reforgeStats){var a=WH.getJsonReforge(e,t);if(a.amount){e.__reforge.all.push(a)}}return e.__reforge.all}if(!WH.reforgeStats||!WH.reforgeStats[t]){return{}}e.__statidx={};for(var i in e){if(WH.individualToGlobalStat[WH.jsonToStat[i]]){e.__statidx[WH.individualToGlobalStat[WH.jsonToStat[i]]]=e[i]}else{e.__statidx[WH.jsonToStat[i]]=e[i]}}if(!e.__reforge){e.__reforge={}}var a=e.__reforge[t]=WH.dO(WH.reforgeStats[t]);e.__reforge[t].amount=Math.floor(a.v*(e.__statidx[a.i1]&&!e.__statidx[a.i2]?e.__statidx[a.i1]:0));return e.__reforge[t]};WH.getJsonItemEnchantMask=function(e){if(e.classs==2&&e.subclass==19){return 1<<21-1}return 1<t){return n}for(var s=0,r;r=a[s];s++){if(t==r[1]){return r[2]}if(t)\d+\+?/,(function(e,t){return t+l.level+(l.previewLevel?"+":"")}));let c=false;let d=1;let f=WH.Wow.getMaxPlayerLevel();if(l.scadist){let e=WH.getScalingDistributionCurve(l.scadist);if(e&&e.maxLevel){c=true;d=e.minLevel||1;f=e.maxLevel}}else if(l.contenttuning){let e=WH.getContentTuningLevels(l.contenttuning);if(e){c=true;d=e.minLevel;f=e.maxLevel}}else if(l.scadistbonus&&l.scadistbonustype===13&&l.playercurve){let e=WH.curvePoints[l.playercurve];d=e[0][1];f=Math.min(e[e.length-1][1],WH.Wow.getMaxPlayerLevel());c=true}if(c){n=n&&n<=f?n:f;e=e.replace(/()\d+/g,(function(e,t){return t+(n&&n<=f?n:f)}));e=e.replace(/()\d+/,(function(e,t){return t+d}));e=e.replace(/()\d+/,(function(e,t){return t+f}));let a=false;e=e.replace(/)\d+/,(function(e,t){let a=0;if(l.scadistbonus&&l.heirloombonuses){for(let e=0,t;t=l.heirloombonuses[e];e++){if(parseInt(l.scadistbonus)===t){a=e+1;break}}}return t+a}))}else{e=e.replace(/)\d+/,(function(e,t){return t+(l.level+(i!="pvp"?l.pvpUpgrade:0))}));e=e.replace(/()\d+/,(function(e,t){var a=1718;var i=Math.floor(WH.getCurveValue(a,l.level)||2);return t+i}));e=e.replace(/()\d+/,(function(e,t){return t+l.reqlevel}));e=e.replace(/()\d+/,(function(e,t){return i&&i!="pvp"?t+i:e}));var p=typeof l.dmgrange!="undefined"&&l.dmgrange;var h=new RegExp("(\x3c!--dmg--\x3e)[\\d,]+"+(p?"(\\D*?)[\\d,]+":"")+"");e=e.replace(h,(function(e,t,a){return t+WH.numberFormat(l.dmgmin1)+(p?a+WH.numberFormat(l.dmgmax1):"")}));e=e.replace(/(\D*?)([\d,]+(?:\.\d+)?)/,(function(e,t){var a=l.dps>=1e3?0:WH.isRetailTree()?1:2;return t+(l.dps?WH.numberFormat(l.dps.toFixed(a)):"0")}));e=e.replace(/()\d+/,(function(e,t){return t+l.armor}));var g=WH.getCombatRatingMult(l.level,g_items[t].slot);e=function(e){let t=WH.ce("div",{innerHTML:e});WH.qsa("span",t).forEach((function(e){let t;let a;let i;let n;e.childNodes.forEach((function(e){if(e.nodeType===Node.COMMENT_NODE){let s;if(s=(e.nodeValue||"").match(/^stat(\d+)$/)){t=parseInt(s[1]);i=e}if(s=(e.nodeValue||"").match(/^rtg(\d+)$/)){a=parseInt(s[1]);n=e}}}));if(t===undefined&&a===undefined){return}let s=false;if(a){let e=l[WH.statToJson[a]]?l[WH.statToJson[a]]:0;let t=e<0?"-":"+";if(e){e=Math.round(e*g)}else{s=true;e=0}let i=n.previousSibling;if(i&&i.nodeType===Node.TEXT_NODE){i.nodeValue=i.nodeValue.replace(/[-+]$/,t)}let r=n.nextSibling;if(r&&r.nodeType===Node.TEXT_NODE){r.nodeValue=r.nodeValue.replace(/[-\d\.,]+/,e)}}else{let e=l[WH.statToJson[t]]?l[WH.statToJson[t]]:0;if(e){let t=Math.round(e);e=(t>0?"+":"-")+WH.numberLocaleFormat(t)}else{s=true;e="+0"}let a=i.nextSibling;if(a&&a.nodeType===Node.TEXT_NODE){a.nodeValue=a.nodeValue.replace(/[-+][-\d\.,]+/,e)}}if(s){WH.displayNone(e);let t=e.nextSibling;while(t){if(t.nodeType===Node.ELEMENT_NODE){if(t.nodeName.toLowerCase()==="br"){t.parentNode.replaceChild(document.createComment("br"),t)}break}t=t.nextSibling}}else{WH.displayDefault(e)}}));return t.innerHTML}(e);if(l.extraStats&&l.extraStats.length){e=e.replace(/(
)?/,"");var m=WH.applyStatModifications.BASE_STATS;e=e.replace(//,(function(e){var t="";for(var a=0;a\x3c!--stat"+i+"--\x3e"+WH.sprintf(n,r<0?"-":"+",o)+""}return t+e}));e=e.replace(//,(function(e){var t="";for(var a=0;a(\x3c!--rtg%$1--\x3e0 @ L$2"+WH.Wow.getMaxPlayerLevel()+")",i,"\x3c!--lvl--\x3e")}var p="";if(i==50){p="\x3c!--stat%d--\x3e"}if(i==64){r=r.substr(5);u=""}t+='
'+p+WH.sprintf(r,c>=0?"+":"-",f)+u+""}return t+e}))}if(l.itemNameDescStats?.length){e=e.replace(//,(e=>{let t="";l.itemNameDescStats.forEach((e=>{let a=WH.Wow.Item.getNameDescription(e.nameDescId);if(a){let i=WH.Wow.Item.getNameDescriptionColor(e.nameDescId);let n=parseInt(i).toString(16);while(n.length<6){n="0"+n}t+=WH.sprintf('
$2$3 $4',"#"+n,e.qty>=0?"+":"",e.qty,a)}}));return t+e}))}e=e.replace(/()(.*)()/,(function(e,t,a,i){var n=l.quality;var s=l.name;var r=l.nameSuffix?" "+l.nameSuffix:"";return t+WH.sprintf('$2',n,s+r)+i}));e=e.replace(/()(.*)()/,(function(e,t,a,i){if(!l.namedesc){return t+i}return t+"
"+l.namedesc+i}));var W=g_items[t].jsonequip.nsockets|0;if(!W&&l.nsockets||W&&l.nsockets>W){const t=81;const a=225;const i=1;const n=2;const s=3;const r=4;const c=5;const d=6;const f=7;const u=8;const p=9;const h=10;const g=11;const m=12;const H=13;const E=14;const T=15;const v=16;e=e.replace(/()?/,(function(e,f){var u="";for(var S=W;S',I);y+=o.getSocketName(e)||"Unknown Socket";y+="";u+="
"+y}return(W==0?"
":"")+u+"

"}))}if(a){let t=WH.Tooltips.getScalingData(WH.Types.ITEM,"bonusEffects");let i=t&&t.bonus;if(i){e=e.replace(//,(function(e,n){let s=l.extraStats&&l.extraStats.indexOf(parseInt(WH.jsonToStat.corruption))>=0;let r="";for(let e,n=0;e=a[n];n++){let a=i[e]||[];for(let e,i=0;e=a[i];i++){let a=t.effect[e];if(a){if(s){a=a.replace(/\b(class=")q2\b/g,"$1stat-corruption")}r+=(r?"
":"")+a}}}return r+(r&&n?"
":"")+e}))}}if(WH.applyStatModifications&&WH.convertScalingSpell.SpellInformation){var H;var E={effects:{}};var T=/((?:)?)(\d+(?:\.\d+)?)((%?))?/g;while((H=T.exec(e))!==null){var v=H[2];var S=H[3];var I=H[5];if(I<=0){continue}E[I]=E[I]||{};let e=l.scadistbonus&&l.scadistbonustype===13?g_items[t].level:l.level;WH.cO(E[I],WH.convertScalingSpell(E[I],I,v,S,n,e))}e=WH.adjustSpellPoints(e,E,l.level,g_items[t].jsonequip.slot)}let b=WH.Timewalking.getCharLevelFromIlvl(s)||0;if(b){e=e.replace(/([^<]*)<\/span>/gi,(function(e,t,a,i,n,s,r,o){var l={enchantment:o,scalinginfo:{scalingcategory:t,minlvlscaling:a,maxlvlscaling:i,damage1:n/1e3,damage2:s/1e3,damage3:r/1e3}};var c=WH.scaleItemEnchantment(l,b);return"\x3c!--ee--\x3e"+c+""}))}e=e.replace(/()([\.,0-9]+)%?/g,(function(t,a,i,s){_=e.match(new RegExp("\x3c!--rtg"+i+"--\x3e([\\d\\.,]+)(-[\\d\\.,]+)?"));if(!_){return t}if(_[2]){_[2]=_[2].replace(/\D/,"")}_[1]=_[1].replace(/\D/,"");var r=_[2]?(Math.abs(parseInt(_[2]))+parseInt(_[1]))/2:_[1];return a+(_[2]?"~":"")+Math.round(WH.convertRatingToPercent(n?n:WH.Wow.getMaxPlayerLevel(),i,r)*100)/100+(i!=49?"%":"")}));e=e.replace(/()?([^<]+)/,(function(e,t,a){if(l.bond){a=WH.Wow.Item.getBondTypeName(l.bond)}return"\x3c!--bo--\x3e"+t+a}));e=e.replace(//,(function(e){if(!a){return e}let t=WH.getPageData("wow.item.bonuses.upgrades")||{};let i="";a.some((function(e){if(t[e]){let a=WH.ce("div");WH.ae(a,WH.ce("br"));WH.ae(a,WH.ce("span",{className:"q"},WH.ct(t[e][2]?WH.Strings.sprintf(WH.GlobalStrings.ITEM_UPGRADE_TOOLTIP_FORMAT_STRING,t[e][2],t[e][0],t[e][1]):WH.Strings.sprintf(WH.GlobalStrings.ITEM_UPGRADE_TOOLTIP_FORMAT,t[e][0],t[e][1]))));i=a.innerHTML;return true}}));return i+e}));e=e.replace(//,(function(){if(!l.limitcategory){return""}let e="";let t=(WH.getPageData("wow.item.bonusLimitCategoryNames")||{})[l.limitcategory];if(t){let a=t.uniqueEquipped?WH.GlobalStrings.ITEM_UNIQUE_EQUIPPABLE:WH.GlobalStrings.ITEM_UNIQUE;e=WH.Strings.escapeHtml(a+WH.TERMS.colon_punct+WH.Strings.sprintf(WH.TERMS.parens_format,t.name,t.maxCount));e="
"+e}return e}));(function(){var a=WH.ce("div");a.innerHTML=e;a.querySelectorAll('a[href*="/spell="]').forEach((function(e){var t=e.dataset.wowhead||"";t=t.replace(/(^|&)i?lvl=\d+/g,"");if(n){t+=(t?"&":"")+"lvl="+n}if(l.level){t+=(t?"&":"")+"ilvl="+l.level}e.dataset.wowhead=t}));let i=WH.getPageData("item.sellprice."+t);let s=a.querySelector(".whtt-sellprice");if(i&&s){let e=s.firstChild;WH.ee(s);WH.ae(s,e);let t=i.itemLevel;let a=t[l.level]||t[Math.max.apply(null,Object.keys(t))];let n=i.quality[l.quality]||0;let r=Math.floor(i.base*a*n);WH.ae(s,WH.Wow.buildMoney({copper:r}))}e=a.innerHTML})();return e};WH.setTooltipLevel=function(e,t,a){var i=typeof e;if(i=="number"){var n=WH.getDataSource();if(n[e]&&n[e][(a?"buff_":"tooltip_")+Locale.getName()]){e=n[e][(a?"buff_":"tooltip_")+Locale.getName()]}else{return e}}else if(i!="string"){return e}e=e.replace(/([^<]*)<\/span>/gi,(function(e,a,i,n,s,r,o,l,c){var d={enchantment:c,scalinginfo:{scalingcategory:i,minlvlscaling:n,maxlvlscaling:s,damage1:r/1e3,damage2:o/1e3,damage3:l/1e3}};var f=WH.scaleItemEnchantment(d,t);return"\x3c!--"+a+"--\x3e"+f+""}));var s=e.match(//);var r;var o;if(s){r=s[1].split(":").map(Number);t=Math.min(r[2],Math.max(r[1],t));o=r[4]||0}if(o){if(!e.match(//g)&&!(o<0)&&!a){e=WH.setItemModifications(e,r[0],null,null,t);WH.updateItemStringLink.call(this)}else{if(o>0){if(!r[7]&&WH.isSet("g_pageInfo")&&g_pageInfo.type==3&&g_items[g_pageInfo.typeId]&&g_items[g_pageInfo.typeId].quality!=7){t=Math.min(g_items[g_pageInfo.typeId].reqlevel,t)}var l={scadist:o};e=e.replace(/\d+\.\d+/,"\x3c!--cast--\x3e"+l.cast);var c=//g;var d=c.exec(e);l.effects=true;while(d!=null){var f=d[1].split(":").map(Number);var u=f[0];var p=f[1];var h=f[3];if(h>0){if(l[h]==undefined){l[h]={};l[h].effects={}}WH.cO(l[h],WH.convertScalingSpell(l[h],h,u,p,t,t))}d=c.exec(e)}if(l.effects){var g=5;var m=g;if(window.g_pageInfo&&window.g_pageInfo.type==WH.Types.AZERITE_ESSENCE_POWER){m=WH.Wow.Item.INVENTORY_TYPE_NECK}e=WH.adjustSpellPoints(e,l,t,m);if(this.modified){for(var W in this.modified[1]){var H=this.modified[1][W];for(var E=0;E\s*\d+/gi,(function(e,a,i,n,s,r,o){var l=o?Math.ceil:Math.floor;return"\x3c!--ppl"+a+":"+i+":"+n+":"+s+":"+r+"--\x3e"+l(parseInt(s)+(Math.min(Math.max(t,i),n)-i)*r/100)}));e=e.replace(/()([\.0-9]+)%?/g,(function(a,i,n,s){_=e.match(new RegExp("\x3c!--rtg"+n+"--\x3e(\\d+)"));if(!_){return a}return i+Math.round(WH.convertRatingToPercent(t,n,_[1])*100)/100+(n!=49?"%":"")}));e=e.replace(/\s?(\d+)/gi,(function(e,a,i,n,s){t=Math.min(t,WH.Wow.getMaxPlayerLevel());return"\x3c!--pl"+a+":"+i+":"+n+"--\x3e"+t}));e=e.replace(/(\d+/g,"\x3c!--lvl--\x3e"+t);return e};WH.updateTooltipSingular=function(e){return e.replace(/(\d+)(\D*).*?/gi,(function(e,t,a,i,n){return t+a+"\x3c!--singular:"+i+":"+n+"--\x3e"+(parseInt(t)===1?i:n)+"\x3c!--singular--\x3e"}))};WH.getSpellScalingValue=function(e,t){var a=WH.convertScalingSpell?WH.convertScalingSpell.SV:null;if(!a){return 0}return a[t][e-1]};WH.adjustSpellPoints=function(e,t,a,i){var n=1;if(a&&i){n=WH.getCombatRatingMult(a,i)}for(var s=1;s<=20;++s){e=e.replace(new RegExp("\x3c!--pts"+s+":0:0:(\\d+)(:\\d+(?:\\.\\d+)?)?(:crm)?--\x3e(\x3c!--rtg\\d+--\x3e)?(.+?)<","g"),(function(e,a,i,r,o){var l=t[a]&&t[a].hasOwnProperty("effects")?t[a].effects[s]:t.effects[s];if(!l){return e}var c=Math.round(l.avg*(r?n:1));return"\x3c!--pts"+s+":0:0:"+a+(i||"")+(r||"")+"--\x3e"+(o?o:"")+c+"<"}));e=e.replace(new RegExp("\x3c!--pts"+s+":1:0:(\\d+)(:\\d+(?:\\.\\d+)?)?(:crm)?--\x3e(\x3c!--rtg\\d+--\x3e)?(.+?)<","g"),(function(e,a,i,r,o){var l=t[a]&&t[a].hasOwnProperty("effects")?t[a].effects[s]:t.effects[s];if(!l){return e}var c=Math.round(l.min*(r?n:1));return"\x3c!--pts"+s+":1:0:"+a+(i||"")+(r||"")+"--\x3e"+(o?o:"")+c+"<"}));e=e.replace(new RegExp("\x3c!--pts"+s+":2:0:(\\d+)(:\\d+(?:\\.\\d+)?)?(:crm)?--\x3e(\x3c!--rtg\\d+--\x3e)?(.+?)<","g"),(function(e,a,i,r,o){var l=t[a]&&t[a].hasOwnProperty("effects")?t[a].effects[s]:t.effects[s];if(!l){return e}var c=Math.round(l.max*(r?n:1));return"\x3c!--pts"+s+":2:0:"+a+(i||"")+(r||"")+"--\x3e"+(o?o:"")+c+"<"}));e=e.replace(new RegExp("\x3c!--pts"+s+":3:(\\d+(?:\\.\\d+)?):(\\d+)(:\\d+(?:\\.\\d+)?)?(:crm)?--\x3e(\x3c!--rtg\\d+--\x3e)?(.+?)<","g"),(function(e,a,i,r,o,l){var c=t[i]&&t[i].hasOwnProperty("effects")?t[i].effects[s]:t.effects[s];if(!c){return e}var d=Math.round(c.avg*a*(o?n:1));return"\x3c!--pts"+s+":3:"+a+":"+i+(r||"")+(o||"")+"--\x3e"+(l?l:"")+d+"<"}));e=e.replace(new RegExp("\x3c!--pts"+s+":4:0:(\\d+)(:\\d+(?:\\.\\d+)?)?(:crm)?--\x3e(\x3c!--rtg\\d+--\x3e)?(.+?)<","g"),(function(e,a,i,r,o){var l=t[a]&&t[a].hasOwnProperty("effects")?t[a].effects[s]:t.effects[s];if(!l){return e}var c=Math.round(l.pts*(r?n:1));return"\x3c!--pts"+s+":4:0:"+a+(i||"")+(r||"")+"--\x3e"+(o?o:"")+c+"<"}))}return e};WH.getStaminaRatingMult=function(e,t){if(!WH.staminaFactor){return 1}let a=0;switch(t){case 2:case 11:a=3;break;case 12:a=2;break;case 13:case 14:case 15:case 17:case 21:case 22:case 23:case 25:case 26:a=1;break}let i=WH.findSparseKey(WH.staminaFactor,e);let n=WH.findSparseKey(WH.staminaFactor[i]||{},a);return(WH.staminaFactor[i]||{})[n]||1};WH.getCombatRatingMult=function(e,t){if(!WH.convertRatingToPercent.RM){return 1}let a=0;switch(t){case 2:case 11:a=3;break;case 12:a=2;break;case 13:case 14:case 15:case 17:case 21:case 22:case 23:case 25:case 26:a=1;break}let i=WH.findSparseKey(WH.convertRatingToPercent.RM,e);let n=WH.findSparseKey(WH.convertRatingToPercent.RM[i]||{},a);return(WH.convertRatingToPercent.RM[i]||{})[n]||1};WH.roundArtifactPower=function(e){var t=1;if(e>50){t=5}if(e>1e3){t=25}if(e>5e3){t=50}return WH.roundHalfEven(e/t)*t};WH.roundHalfEven=function(e){if(Math.floor(e*1e5)%1e5==5e4){var t=Math.floor(e);return t+t%2}return Math.round(e)};WH.setTooltipSpells=function(e,t,a,i,n=0){t=t||[];a=a||{};if(!t.length){t=[0]}else{let e=window.g_pageInfo?g_pageInfo["typeId"]:null;if(e){let a=t.indexOf(parseInt(e));if(a!==-1){t[a]=0}}}if(i===undefined){var s=function(e){var t=[];if(e.hasOwnProperty("data")){t.push(e.data)}for(var a=0;a=0){o++}}var d=r-o;if(d<0){continue}while(o-- >0){var f=a[e].splice(d,1);r--;a[e][r].children.push(f[0])}}a[e]=s({children:a[e]})}}i=i||{};var u=function(e){i[e]=(i[e]||0)+1;if(i[e]>=(a[e]||[]).length){i[e]=0}};var p=[];var h=//g;var g;while(g=h.exec(e)){var m=g[0];var W=g.index+m.length;var H="\x3c!--sp"+g[1]+"--\x3e";var E=e.indexOf(H,W);if(E<0){WH.warn("Could not find closing end tag for tooltip spell.",H,e);return e}var T=new RegExp("\x3c!--sp"+g[1]+":[01]--\x3e","g");T.lastIndex=W;var v=T.exec(e);while(v&&v.index).*()$/;for(var b=0;b=0?1:0;if(a[y]==null){continue}if(i[y]==null){i[y]=0}var _=a[y][i[y]];if(_==null||_[w]==null){continue}u(y);if(w&&(g=_[2].match(/^(!?)(\d+)$/))){if(g[1]){if(WH.inArray(t,parseInt(g[2]))>=0){w=0}}else{t.push(parseInt(g[2]))}}var A=_[w];A=WH.setTooltipSpells(A,t,a,i,n+1);var L="\x3c!--sp"+y+":"+w+"--\x3e"+A+"\x3c!--sp"+y+"--\x3e";e=e.substr(0,S)+e.substr(S).replace(p[b],L);S=e.indexOf(L,S)+L.length;if(w){for(var R=b+1;R[^\(]*?)\)/gi,(function(e,t){return'('+t+")"}));if(e.indexOf("\x3c!--artpow:")>0){if(!this.hasOwnProperty("_knowledgeLevel")){var y=/(&|\?)artk=(\d+)/.exec(location.href);if(y&&parseInt(y[2])<=g_artifact_knowledge_max_level){this._knowledgeLevel=parseInt(y[2])}}var w=this._knowledgeLevel?parseInt(this._knowledgeLevel):0;e=e.replace(/()?/i,(function(e,t){return(t?t+"
":" ")+''+WH.sprintf(WH.TERMS.knowledge_format.replace("%d","$1"),w)+""}));e=e.replace(/()[\d\.\,]+/,(function(e,t,a){return t+WH.numberLocaleFormat(WH.roundArtifactPower(parseInt(a)*WH.getArtifactKnowledgeMultiplier(w)))}))}}if(i&&Slider){var _=WH.groupSizeScalingShouldShow(g);if(n){n.bufftip=this;if(_&&WH.isSet("g_difficulties")&&g_difficulties[_]){e=WH.groupSizeScalingOnChange.call(n,this,g_difficulties[_].maxplayers,1,true)}}else{var A=new RegExp("\x3c!--"+(W&&W==3?"i":"")+"\\?(\\d+):(\\d+):(\\d+):(\\d+)");var L=e.match(A);if(typeof L=="undefined"&&W==3){A=new RegExp("\x3c!--\\?(\\d+):(\\d+):(\\d+):(\\d+)");L=e.match(A)}if(!L&&!WH.isRetailTree()){A=new RegExp("\x3c!--ppl(\\d+):(\\d+):(\\d+):(\\d+):(\\d+)");let t=e.match(A);if(t){L=[null,null,t[2],WH.Wow.getMaxPlayerLevel(),T??WH.Wow.getMaxPlayerLevel()]}}if(!L){A=new RegExp("\x3c!--pl(\\d+):(\\d+):(\\d+)--\x3e\\s?(\\d+)");let t=e.match(A);if(t){L=[null,null,t[2],t[3],T??t[4]]}}if(_&&WH.isSet("g_difficulties")&&g_difficulties[_]){var R=WH.ce("label");R.innerHTML=WH.TERMS.difficulty+": ";this._difficultyBtn=WH.ce("a");this._difficultyBtn.ttId=g;WH.difficultyBtnBuildMenu.call(this,g);Menu.add(this._difficultyBtn,this._difficultyBtn.menu);let t=WH.ge("dd"+g);WH.ae(t,R);WH.ae(t,this._difficultyBtn);t.style.display="block";WH.difficultyBtnOnChange.call(this,m[g].initial_dd||_,m[g].initial_ddSize);e=WH.groupSizeScalingOnChange.call(this,this,g_difficulties[_].maxplayers,0,true)}else if(L){if(L[2]!=L[3]){this.slider=Slider.init(i,{maxValue:parseInt(L[3]),minValue:Math.max(parseInt(L[2]),1),onMove:WH.tooltipSliderMove.bind(this),title:WH.GlobalStrings.LEVEL});i.style.display="block";Slider.setValue(this.slider,parseInt(L[4]));this.slider.onmouseover=function(e){WH.Tooltips.showAtCursor(e,WH.TERMS.dragtochangelevel_stc,"q2")};this.slider.onmousemove=WH.Tooltips.cursorUpdate;this.slider.onmouseout=WH.Tooltips.hide;WH.Tooltips.attach(Slider.getInput(this.slider),WH.TERMS.clicktochangelevel_stc,"q2")}}}}if(r&&!r.dataset.initialized){if(n&&n.modified){n.bufftip=this}else{let e=WH.getPageData("WH.Wow.Covenant.data");for(let t in h){let a=Object.keys(e).find((a=>e[a].spellId===parseInt(t)));if((!WH.Gatherer.get(WH.Types.SPELL,t)||s.includes(t))&&!a){continue}let i=WH.Gatherer.get(WH.Types.SPELL,t);let n=i["name_"+Locale.getName()];let o=i["rank_"+Locale.getName()]||"";let l=o?WH.term("parens_format",n,o):n;let c=WH.ce("label");let d=WH.ce("input",{type:"checkbox",dataset:{spellId:t}});WH.ae(c,d);WH.aE(d,"click",WH.tooltipSpellsChange.bind(this));let f=WH.ce("a",undefined,WH.ct(l));if(a){f.classList.add("covenant-"+WH.Wow.Covenant.getSlug(a))}else{f.href=WH.Entity.getUrl(WH.Types.SPELL,t,n);WH.aE(f,"click",(function(e){e.preventDefault();d.click()}))}WH.ae(c,f);c.setAttribute("unselectable","");WH.ae(r,c);WH.ae(r,WH.ce("br"))}}WH.onLoad((()=>{let e=e=>{let t=WH.qs(`.tooltip-options #ks${g} input[type="checkbox"][data-spell-id="${e}"]`);if(t){t.checked=true}};let t=WH.Url.parseQueryString(location.search);if(t.covenant){let a=((WH.getPageData("WH.Wow.Covenant.data")||{})[t.covenant]||{}).spellId;if(a){e(a)}}if(t.spellModifier){t.spellModifier.split(":").forEach((t=>{e(t)}))}WH.tooltipSpellsChange.call(this)}));this.modified=[r,h,s];r.style.display=WH.DOM.isEmpty(r)?"none":"inline-block";r.dataset.initialized="true"}if(c){var C=e.match(/(\d+(?:\.\d+)?)/);if(C){var M=$("#rppm"+g);if(this._rppmModList.hasOwnProperty(4)){this._rppmModBase=parseFloat(C[1]);if(M.is(":empty")){this._rppmSpecModList=this._rppmModList[4];this._rppmSpecModList.splice(0,0,{spec:-1,modifiervalue:0,filename:""});M.append(WH.getMajorHeading(WH.TERMS.realppmmodifiers,2,3));for(var N in this._rppmSpecModList){var O=Icon.create(this._rppmSpecModList[N]["filename"],0,null);O.style.display="inline-block";O.style.verticalAlign="middle";var D=$('');D.get(0).checked=this._rppmSpecModList[N]["spec"]==-1;M.append(D).append(this._rppmSpecModList[N]["spec"]==-1?"":O).append('").append("
");var P=this;$("#rppm-"+N).change((function(){WH.tooltipRPPMChange.call(this,P)}))}}else{var k=this._rppmModBase;var x=this._rppmSpecModList;e=e.replace(/(\[?)(\d+(?:\.\d+)?)([^<]*)/,(function(e,t,a,i){return"\x3c!--rppm--\x3e"+t+(k*(1+parseFloat(x[$('input[name="rppmmod"]:checked',M).attr("id").match(/\d+$/)[0]].modifiervalue))).toFixed(2)+i+"\x3c!--rppm--\x3e"}))}}M.toggle(!M.is(":empty"));var B="";if(this._rppmModList.hasOwnProperty(1)){B+=" + "+WH.Wow.Item.Stat.jsonToAbbr("hastertng")}else if(this._rppmModList.hasOwnProperty(2)){B+=" + "+WH.Wow.Item.Stat.jsonToAbbr("critstrkrtng")}if(g_pageInfo.type==6&&this._rppmModList.hasOwnProperty(6)){B+=" + "+"Budget"}if(B.length>0){e=e.replace(/\[?(\d+(?:\.\d+)?)([^<]*)/,(function(e,t,a){return"\x3c!--rppm--\x3e["+t+B+"]"+a+"\x3c!--rppm--\x3e"}))}}}if(l){if(m[g]&&m[g].hasOwnProperty("tooltip_"+Locale.getName()+"_pvp")){$(l).append('').append('").append("
");$("#item-upgrade-pvp").change(WH.upgradeItemTooltip.bind(this,l,"pvp"))}let e=WH.Timewalking.getConfigs();if(e.length>0){let t=WH.ce("span",undefined,WH.ct(WH.TERMS.timewalkingScaling));WH.Tooltips.attach(t,WH.TERMS.timewalkingScaling_tip,"q");let a=WH.ce("label",undefined,[t,WH.ct(WH.TERMS.colon_punct)]);let i=WH.ce("a",undefined,WH.ct(WH.TERMS.none));WH.ae(l,a);WH.ae(l,i);let n=[];n.push(Menu.createItem({label:WH.TERMS.none,url:()=>{delete l.dataset.selected;WH.upgradeItemTooltip.bind(this,l,undefined,true)();WH.st(i,WH.TERMS.none)},options:{checkedFunc:()=>!l.dataset.selected}}));e.forEach((e=>{let t=`tooltip_${Locale.getName()}_${e.stringId}`;if(!m[g]||!m[g].hasOwnProperty(t)){return}let a=WH.Wow.Expansion.getName(e.id);n.push(Menu.createItem({label:a,crumb:e.stringId,url:()=>{if(l.dataset.selected!==e.stringId){delete l.dataset.selected;l.dataset.selected=e.stringId;WH.upgradeItemTooltip.bind(this,l,e.stringId,true)();WH.st(i,a)}},options:{checkedFunc:()=>e.stringId===l.dataset.selected,className:`item-upgrade-${e.stringId}`}}));$(l).toggle(!$(l).is(":empty"))}));Menu.add(i,n)}}let F;if(W==3){var U=$("#cs"+g);if(U&&WH.Wow.Item.tooltipHasSpecStats(e)){if(!this._classSpecBtn){var G=WH.ce("label");G.innerHTML=WH.TERMS.showingtooltipfor_stc+" ";this._classSpecBtn=WH.ce("a");this._classSpecBtn.ttId=g;WH.classSpecBtnBuildMenu.call(this,m[g].hasOwnProperty("validMenuSpecs")?m[g].validMenuSpecs:false);Menu.add(this._classSpecBtn,this._classSpecBtn.menu);U.append(G).append(this._classSpecBtn).show()}F=WH.LocalStorage.get(WH.LocalStorage.KEY_WOW_DATABASE_SPEC_FILTER);if(typeof F!=="object"){F=null}var q=/(&|\?)class=(\d+)/.exec(location.href);if(q){F={classId:parseInt(q[2]),specId:0}}var z=/(&|\?)spec=(\d+)/.exec(location.href);var j,Y;if(z){j=parseInt(z[2]);Y=WH.Wow.PlayerClass.getBySpec(j);if(Y){F={classId:Y,specId:j}}}if(F){e=WH.classSpecBtnOnChange.call(this,F.classId,F.specId,e,true)}else{$(this._classSpecBtn).text(WH.isRetailTree()?WH.TERMS.chooseaspec_stc:WH.TERMS.chooseAClass_stc)}}}if(W===WH.Types.ITEM&&m[g]){WH.Page.WowItem.initBonuses(this,u)}(function(){let e=WH.ge("craftedStatsSelector"+g);if(!m[g]||!e||e.dataset.initialized){return}const t=this;let a=0;let i;let n=function(e){let t=I();let i=t.indexOf(e);if(i>=0){t.splice(i,1)}else{t.push(e);t=t.slice(-1*a)}WH.Url.replacePageQuery((function(e){if(t.length){e["crafted-stats"]=t.join(":")}else{delete e["crafted-stats"]}}));s();if(m[g]["tooltip_"+Locale.getName()]){let e=this._bonusesBtn&&this._bonusesBtn.selectedBonus?this._bonusesBtn.selectedBonus:null;let t=WH.enhanceTooltip.call(this,g,true,true,false,null,this._spellModifiers,WH.ge("ks"+g),o,null,true,null,null,e);WH.updateTooltip.call(this,t)}};let s=function(){let e="";let t=I();if(!t.length){e=WH.TERMS.none}else{t.forEach((function(t){e+=(e?" + ":"")+WH.Wow.Item.Stat.jsonToDesc(WH.statToJson[t])}))}WH.st(i,e)};e.dataset.initialized=1;let r=m[g].jsonequip&&m[g].jsonequip.statsInfo||{};WH.Wow.Item.Stat.CRAFTING_STAT_FROM.forEach((function(e){if(r.hasOwnProperty(e)){a++}}));if(!a){return}WH.displayDefault(e);WH.ae(e,WH.ce("label",{},WH.ct(WH.TERMS.optionalReagentStats+WH.TERMS.colon_punct)));i=WH.ce("a",{},WH.ct(WH.TERMS.none));WH.ae(e,i);let l=[];WH.Wow.Item.Stat.CRAFTING_STAT_TO.forEach((function(e){l.push(Menu.createItem({crumb:e,label:WH.Wow.Item.Stat.jsonToDesc(WH.statToJson[e]),url:n.bind(t,e),options:{checkedFunc:function(e){return I().includes(parseInt(e[Menu.ITEM_CRUMB]))}}}))}));l.sort((function(e,t){return e[Menu.ITEM_LABEL].localeCompare(t[Menu.ITEM_LABEL])}));Menu.add(i,l);s()}).call(this);let K=this.slider?this.slider._max:WH.Wow.getMaxPlayerLevel();let V=this._selectedLevel||K;let Q=F?F.classId:WH.Wow.PlayerClass.WARRIOR;e=WH.addRatingPercent(e,V,K,Q);if(W===WH.Types.ITEM){WH.updateItemStringLink.call(this)}e=WH.updateTooltipSingular(e);if(S["spec"]){e=WH.Tooltips.parseItemEffectTooltipForSpec(e,parseInt(S["spec"]))}return e};WH.addRatingPercent=function(e,t,a,i){let n=WH.ce("div",{innerHTML:e});WH.qsa("span",n).forEach((function(e){let n;let s;e.childNodes.forEach((function(e){if(e.nodeType===Node.COMMENT_NODE){let t=(e.nodeValue||"").match(/^rtg(\d+)$/);if(t){n=parseInt(t[1]);s=e}}}));if(n===undefined){return}let r=s.nextSibling.nodeValue.match(/(\d+)(.*)$/);if(!r){return}let o=WH.qs("small.rating-percent");if(o){WH.de(o)}let l=parseInt(r[0]);let c=r[2];let d=WH.convertRatingToPercent(t,n,l,i);let f=WH.TERMS?WH.term("valueAtLevel_format",d.toFixed(2),t):" ("+d.toFixed(2)+"% @ L"+t+")";let u=s.nextSibling;let p=WH.ce("small",{className:"rating-percent"},WH.ct(f));if(c==="."){u.parentNode.insertBefore(WH.ct(l),u);u.parentNode.insertBefore(p,u);u.parentNode.insertBefore(WH.ct("."),u)}else{u.parentNode.insertBefore(WH.ce("span",null,WH.ct(l+c)),u);u.parentNode.insertBefore(p,u)}u.parentNode.removeChild(u);p.setAttribute("onclick","WH.tooltipLevelPrompt("+t+", "+a+");")}));return n.innerHTML};WH.tooltipLevelPrompt=function(e,t){let a=1;let i=prompt(WH.sprintf(WH.TERMS.ratinglevel_format,a,t),e.toString());if(i===null){return}i=parseInt(i);if(it){alert("Invalid value; must be between "+a+" and "+t+".");return}let n=WH.qs(".wowhead-tooltip");if(n.slider){Slider.setValue(n.slider,i)}WH.staticTooltipLevelClick(n,i,1)};WH.groupSizeScalingShouldShow=function(e){if(WH.isSet("g_difficulties")&&WH.isSet("g_spells")&&g_spells[e]&&g_spells[e].difficulties&&g_spells[e].difficulties.length>0){return g_spells[e].difficulties[0]}return false};WH.groupSizeScalingSliderMove=function(e,t,a){var i=WH.getDataSource();var n=WH.isSet("g_pageInfo")?g_pageInfo["typeId"]:null;if(!i[n]){return}let s=this._difficultyBtn.selectedDD;let r=a.value;WH.Url.replacePageQuery((function(e){if(s!=WH.groupSizeScalingShouldShow(n)||r!=g_difficulties[WH.groupSizeScalingShouldShow(n)].maxplayers){e.dd=s;e.ddsize=r}else{delete e.dd;delete e.ddsize}}));WH.groupSizeScalingOnChange.call(this,this,a.value,0);if(this.bufftip){WH.groupSizeScalingOnChange.call(this,this.bufftip,a.value,1)}WH.Tooltips.hide()};WH.groupSizeScalingOnChange=function(e,t,a,i){const n=this;while(e.className.indexOf("tooltip")==-1){e=e.parentNode}t=parseInt(t);if(isNaN(t)){return}var s=WH.getDataSource();var r=WH.isSet("g_pageInfo")?g_pageInfo["typeId"]:null;if(!s[r]){return}var o=this._difficultyBtn.selectedDD;var l=Locale.getName();var c="server_"+(a?"buff_":"tooltip_")+l;var d="dd"+o+"ddsize"+t;WH.groupSizeScalingOnChange.lastCall=d;if(!s[r][c]){s[r]["server_tooltip_"+l]={};s[r]["server_buff_"+l]={};var f="dd"+s[r].initial_dd+"ddsize"+s[r].initial_ddSize;s[r]["server_tooltip_"+l][f]=s[r]["tooltip_"+l];s[r]["server_buff_"+l][f]=s[r]["buff_"+l]}if(s[r][c][d]){var u=s[r][c][d];if(i){return u}WH.updateTooltip.call(e,u);return}if(i){return s[r][c.substr(7)]}if(a){return}if(s[r][c].hasOwnProperty(d)){return}s[r][c][d]="";var p=WH.Entity.getUrl(WH.Types.SPELL,r)+"?dd="+o+"&ddsize="+t;if(WH.isBeta()||WH.isPtr()||WH.isPtr2()){p+="&"+WH.getDataCacheVersion()}WH.xhrJsonRequest(p,(function(a){if(!a){return}s[r]["server_tooltip_"+l][d]=a["tooltip"];s[r]["server_buff_"+l][d]=a["buff"];if(WH.groupSizeScalingOnChange.lastCall===d){WH.groupSizeScalingOnChange.call(n,e,t);if(n.bufftip){WH.groupSizeScalingOnChange.call(n,n.bufftip,t,true)}}}))};WH.difficultyBtnBuildMenu=function(e){var t=[];var a=g_spells[e];for(var i=0;is){r=s}else if(i()?(.*?)<\/span>/i,(function(t,a,i,n,s,r){n=1;var o=a==2&&(!g_classes_allowed_weapon[e]||WH.inArray(g_classes_allowed_weapon[e],i)==-1);var l=a==4&&(!g_classes_allowed_armor[e]||WH.inArray(g_classes_allowed_armor[e],i)==-1);if(o||l){n=10}return"\x3c!--scstart"+a+":"+i+'--\x3e'+(s?s:"")+r+"\x3c!--scend--\x3e"}));if(WH.isRetailTree()){o=o.replace(/]*?>([-+][\d\.,]+(?:-[\d\.,]+)?)(\D*?)<\/span>/gi,(function(a,i,n,s){let r=WH.ce("div",{innerHTML:a});let o=WH.qs("span",r);o.classList.remove("q0","q2");i=parseInt(i);if(i===50){o.classList.add("q2")}if(g_grayedOutStats[i]&&g_grayedOutStats[i].indexOf(t)!=-1){o.classList.remove("q2");o.classList.add("q0")}let l=t?WH.getStatForSpec(i,t):WH.getStatForClass(i,e);if(l!==i&&WH.statToJson[l]){let e=WH.Wow.Item.Stat.jsonToName(WH.statToJson[l]);if(e){s=" "+e}}o.innerHTML="\x3c!--stat"+i+"--\x3e";WH.ae(o,WH.ct(n+s));return o.outerHTML}));o=o.replace(/()[\w\W]*?()/g,(function(e,a,i,n,s){var r="";if(WH.isSet("g_pageInfo")&&g_pageInfo.hasOwnProperty("typeId")&&g_pageInfo.type==3&&g_items.hasOwnProperty(g_pageInfo.typeId)&&g_items[g_pageInfo.typeId].hasOwnProperty("affectsArtifactPowerTypesData")&&g_items[g_pageInfo.typeId].affectsArtifactPowerTypesData.hasOwnProperty(i)&&g_items[g_pageInfo.typeId].affectsArtifactPowerTypesData[i].hasOwnProperty(t)){r=g_items[g_pageInfo.typeId].affectsArtifactPowerTypesData[i][t]}else if(n){r=''+WH.term("relicrank"+(n!=1?"s":"")+"increase_format",n)+": "+WH.TERMS.relic_minortrait}return a+r+s}))}if(t){o=WH.Tooltips.parseItemEffectTooltipForSpec(o,t)}WH.Url.replacePageQuery((function(a){if(e){a["class"]=e}else{delete a["class"]}if(WH.isRetailTree()&&t){a.spec=t}else{delete a.spec}}));if(!a){this.innerHTML=WH.Tooltips.evalFormulas(o)}return o};WH.classSpecBtnBuildMenu=function(e){const t=WH.Wow.PlayerClass;const a=WH.Wow.PlayerClass.Specialization;const i=WH.isRetailTree();let n=[Menu.createHeading({label:i?WH.TERMS.chooseaspec_stc:WH.TERMS.chooseAClass_stc})];if(e){e=e.map((e=>parseInt(`${e}`)))}t.getAll().forEach((s=>{const r=Menu.createItem({crumb:`${s}`,label:t.getName(s),options:{className:`c{$classId}`,tinyIcon:t.getIconName(s)}});if(!i){Menu.setItemUrl(r,WH.classSpecBtnOnChange.bind(this,s,0,false))}else{const t=[];a.getByClass(s).forEach((i=>{const n=!e||e.includes(i);const r=Menu.createItem({crumb:`${i}`,label:a.getName(i),url:n?WH.classSpecBtnOnChange.bind(this,s,i,false):"javascript:",options:n?{tinyIcon:a.getIconName(i)}:{className:"q0"}});t.push(r)}));Menu.setSubmenu(r,t)}n.push(r)}));this._classSpecBtn.menu=n};WH.getStatForClass=function(e,t){let a=undefined;let i=WH.Wow.PlayerClass.Specialization.getByClass(t)||[];for(let t=0,n;n=i[t];t++){let t=WH.getStatForSpec(e,n);if(a===undefined){a=t}else if(a!==t){a=null;break}}return a};WH.getStatForSpec=function(e,t){var a=3;var i=4;var n=5;var s=71;var r=72;var o=73;var l=74;var c;var d;var f=g_specPrimaryStatOrders[t];var u=g_specPrimaryStatOrders[t].length;if(e===s){d=0;if(!u){return n}while(1){c=f[d];if(c>=a&&c<=n){break}d++;if(d>=u){return n}}}else{if(e!==r){if(e!==o){if(e!==l){return e}d=0;if(u){while(1){c=f[d];if(c>=i&&c<=n){break}d++;if(d>=u){return n}}return c}return n}d=0;if(u){while(1){c=f[d];if(f[d]===a){break}if(f[d]===n){break}d++;if(d>=u){return n}}return c}return n}d=0;if(!u){return a}while(1){c=f[d];if(c>=a&&c<=i){break}d++;if(d>=u){return a}}}return c};WH.getItemBonusChanceType=function(e){var t=0;if(e>0&&WH.isSet("g_itembonuses")&&g_itembonuses&&g_itembonuses[e]){var a=g_itembonuses[e];for(var i=0;i0&&WH.isSet("g_itembonuses")&&g_itembonuses&&g_itembonuses[e]){var t=g_itembonuses[e];for(var a=0;a input");let o=null;if(typeof t!=="number"){r.each((function(e,a){if(a.id.indexOf(t)!=-1){o=a;return false}}))}else{o=r.get(t-1)}let l=o.checked;r.each((function(e,t){t.checked=false}));o.checked=l;if(!l){t=null}s(this);function s(e){this._selectedUpgrade=t;WH.updateItemStringLink.call(e);if(i[n]["tooltip_"+Locale.getName()]){let a=e._bonusesBtn&&e._bonusesBtn.selectedBonus?e._bonusesBtn.selectedBonus:null;let i=WH.enhanceTooltip.call(e,n,true,true,false,null,e._spellModifiers,WH.ge("ks"+n),t,null,true,null,null,a);WH.updateTooltip.call(e,i)}}}};WH.updateTooltip=function(e){e=WH.updateTooltipSingular(e);if(this.classList.contains("partial-sub-tooltip")){this.innerHTML=WH.Tooltips.evalFormulas(e);return}this.innerHTML="
"+WH.Tooltips.evalFormulas(e)+'
';WH.Tooltips.finalizeSizeAndReveal(this)};WH.staticTooltipLevelClick=function(e,t,a,i){while(e.className.indexOf("tooltip")==-1){e=e.parentNode}var n=e.innerHTML;var s=n.match(/\s?(\d+)/);if(s){s=[null,s[1],s[2],s[3],s[4]]}}if(!s){return}var r=parseInt(s[1]),o=parseInt(s[2]),l=parseInt(s[3]),c=parseInt(s[4]);if(o>=l){return}if(isNaN(t)){t=prompt(WH.sprintf(WH.TERMS.ratinglevel_format,o,l),c)}t=parseInt(t);if(isNaN(t)){return}if(t==c||tl){return}e._selectedLevel=t;var d=WH.getDataSource();s=WH.setTooltipLevel.bind(e,d[r][(i?"buff_":"tooltip_")+Locale.getName()],t,i)();var f=e._bonusesBtn&&e._bonusesBtn.selectedBonus?e._bonusesBtn.selectedBonus:null;var u=e._selectedUpgrade?e._selectedUpgrade:0;s=WH.enhanceTooltip.call(e,s,true,null,null,null,null,null,u,null,null,null,null,f);WH.updateTooltip.call(e,s);if(e.slider&&!a){Slider.setValue(e.slider,t)}if(!i){WH.tooltipSpellsChange.bind(e)()}};WH.staticTooltipKnowledgeLevelClick=function(e,t,a){while(e.className.indexOf("tooltip")==-1){e=e.parentNode}var i=e.innerHTML;if(isNaN(t)){WH.Tooltips.hide();t=prompt(WH.sprintf(WH.TERMS.ratinglevel_format,0,g_artifact_knowledge_max_level),e._knowledgeLevel?e._knowledgeLevel:0)}t=parseInt(t);if(isNaN(t)){return}if(t<0||t>g_artifact_knowledge_max_level){return}e._knowledgeLevel=t;WH.Url.replacePageQuery((function(e){if(t){e.artk=t}else{delete e.artk}}));var n=WH.getDataSource();i=WH.setTooltipLevel.bind(e,n[a]["tooltip_"+Locale.getName()],e._selectedLevel,null)();var s=e._bonusesBtn&&e._bonusesBtn.selectedBonus?e._bonusesBtn.selectedBonus:null;var r=e._selectedUpgrade?e._selectedUpgrade:0;i=WH.enhanceTooltip.call(e,i,true,null,null,null,null,null,r,null,null,null,null,s);WH.updateTooltip.call(e,i)};WH.tooltipSliderMove=function(e,t,a){WH.staticTooltipLevelClick(this,a.value,1);if(this.bufftip){WH.staticTooltipLevelClick(this.bufftip,a.value,1,1)}WH.Tooltips.hide()};WH.tooltipSpellsChange=function(){if(!this.modified){return}var e=this.modified[0],t=this.modified[1],a=[];$.each($("input:checked",e),(function(e,t){a.push(parseInt(t.dataset.spellId))}));this.modified[2]=a;WH.qsa(".lazy-load-background",this).forEach((e=>e.classList.remove("lazy-load-background")));this.innerHTML=WH.setTooltipSpells(this.innerHTML,a,t);if(this.bufftip){WH.tooltipSpellsChange.bind(this.bufftip)()}WH.Url.replacePageQuery((function(e){let t=WH.getPageData("WH.Wow.Covenant.data");delete e.spellModifier;delete e.covenant;let i=[];a.forEach((a=>{let n=Object.keys(t).find((e=>t[e].spellId===a));if(n){e.covenant=n}else{i.push(a)}}));if(i.length){e.spellModifier=i.join(":")}}))};WH.tooltipRPPMChange=function(e){var t=$(this).attr("id").match(/\d+$/)[0];WH.qsa(".lazy-load-background",e).forEach((e=>e.classList.remove("lazy-load-background")));e.innerHTML=WH.Tooltips.evalFormulas(e.innerHTML.replace(/(\[?)(\d+(?:\.\d+)?)([^<]*)/,(function(a,i,n,s){return"\x3c!--rppm--\x3e"+i+(e._rppmModBase*(1+parseFloat(e._rppmSpecModList[t].modifiervalue))).toFixed(2)+s+"\x3c!--rppm--\x3e"})))};WH.validateBpet=function(e,t){var a=1,i=25,n=25,s=0,r=4,o=3,l=(1<<10)-1,c=3,d=$.extend({},t);if(e.minlevel){a=e.minlevel}if(e.maxlevel){i=e.maxlevel}if(e.companion){i=a}if(!d.level){d.level=n}d.level=Math.min(Math.max(d.level,a),i);if(e.minquality){s=e.minquality;if(e.untameable){r=s}}if(e.maxquality){r=e.maxquality}if(d.quality==null){d.quality=o}d.quality=Math.min(Math.max(d.quality,s),r);if(e.companion){delete d.quality}if(e.breeds>0){l=e.breeds&l}if(!(l&1<=13){d.breed-=10}if(!d.breed||!(l&1<"+(e||"")+"";var f=WH.ce("div");f.innerHTML=d;var u=f.childNodes[0];if(typeof a["click"]=="function"&&!a["disabled"]){u.onclick=a["click"]}if(typeof a["tooltip"]!="undefined"){if(a["tooltip"]!==false){u.setAttribute("data-whattach","true")}if(a["tooltip"]===false){u.rel="np"}else if(typeof a["tooltip"]=="string"){WH.Tooltips.attach(u,a["tooltip"])}else if(typeof a["tooltip"]=="object"&&a["tooltip"]["text"]){WH.Tooltips.attach(u,a["tooltip"]["text"],a["tooltip"]["class"])}}return u};WH.D4=new function(){this.getImageUrlFromHash=e=>{if(typeof e==="string"){e=parseInt(e)}let t=WH.getDataEnv()===WH.dataEnv.D4PTR?"/d4/texture-ptr/":"/d4/texture/";let a=WH.WebP.getImageExtension();return e?`${WH.STATIC_URL}${t}hash/${e&255}/${e}${a}`:`${WH.STATIC_URL}${t}hash/74/582516298${a}`};this.getStringHash=(e,t=true)=>{let a=Array.from(t?e.toLowerCase():e).map((e=>e.charCodeAt(0))).reduce(((e,t)=>(e<<5)+e+t&4294967295),0);return a<0?a+4294967296:a}};WH.Device=new function(){const e={isMobile:undefined,isTablet:undefined,isTouch:undefined};this.isMobile=function(){return e.isMobile};this.isTablet=function(){return e.isTablet};this.isTouch=function(){return e.isTouch};function t(){let t=navigator.userAgent||navigator.vendor||window.opera;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))){e.isMobile=true}if(!e.isMobile){if(/(android|ipad|playbook|silk)/i.test(t)){e.isTablet=true}}e.isTouch=e.isMobile||e.isTablet}t()};WH.DI=new function(){};WH.Game=new function(){const e=this;this.WOW=1;this.D2=2;this.DI=3;this.D4=4;this.DEFAULT=this.WOW;const t=[WH.dataTree.RETAIL,WH.dataTree.CLASSIC,WH.dataTree.WRATH,WH.dataTree.D4];const a={[this.D2]:{dataTrees:[WH.dataTree.D2],defaultTree:WH.dataTree.D2,term:"diablo2Resurrected",termAbbrev:"diablo2_abbrev",termSeo:"diablo2Resurrected"},[this.DI]:{dataTrees:[WH.dataTree.DI],defaultTree:WH.dataTree.DI,term:"diabloImmortal",termAbbrev:"diabloImmortal_abbrev",termSeo:"diabloImmortal"},[this.D4]:{dataTrees:[WH.dataTree.D4],defaultTree:WH.dataTree.D4,term:"diablo4",termAbbrev:"diablo4_abbrev",termSeo:"diablo4_seo"},[this.WOW]:{dataTrees:[WH.dataTree.RETAIL,WH.dataTree.CLASSIC,WH.dataTree.TBC,WH.dataTree.WRATH,WH.dataTree.CATA],defaultTree:WH.dataTree.RETAIL,term:"worldofwarcraft",termAbbrev:"worldOfWarcraft_abbrev",termSeo:"worldofwarcraft"}};const i={[this.D2]:"d2",[this.DI]:"di",[this.WOW]:"wow",[this.D4]:"d4"};const n={[this.D2]:WH.dataEnv.D2,[this.DI]:WH.dataEnv.DI,[this.WOW]:WH.dataEnv.MAIN,[this.D4]:WH.dataEnv.D4};let s={[WH.dataEnv.BETA]:"beta",[WH.dataEnv.D2]:"diablo-2",[WH.dataEnv.DI]:"diablo-immortal",[WH.dataEnv.WRATH]:"wotlk",[WH.dataEnv.CLASSIC]:"classic",[WH.dataEnv.PTR]:"ptr",[WH.dataEnv.PTR2]:"ptr-2",[WH.dataEnv.TBC]:"tbc",[WH.dataEnv.D4]:"diablo-4",[WH.dataEnv.CATA]:"cata",[WH.dataEnv.D4PTR]:"diablo-4-ptr"};const r={[WH.dataTree.RETAIL]:this.WOW,[WH.dataTree.CLASSIC]:this.WOW,[WH.dataTree.TBC]:this.WOW,[WH.dataTree.D2]:this.D2,[WH.dataTree.DI]:this.DI,[WH.dataTree.WRATH]:this.WOW,[WH.dataTree.D4]:this.D4,[WH.dataTree.CATA]:this.WOW};const o={[this.WOW]:"wow_token01",[this.D2]:"inv_diablostone",[this.DI]:"inv_cape_special_treasuregoblin_d_01",[this.D4]:"diabloanniversary_achievement"};this.get=()=>e.getByTree(WH.getDataTree());this.getAll=()=>Object.keys(i).map(Number);this.getAllSelectors=()=>Object.values(s);this.getAllSorted=()=>{let t=e.getAll();t.sort(((t,a)=>{if(t===e.WOW){return-1}else if(a===e.WOW){return 1}return a-t}));return t};this.getByKey=e=>{for(let t of Object.keys(i)){if(i[t]===e){return parseInt(t)}}};this.getByEnv=t=>e.getByTree(WH.getDataTree(t));this.getByTree=e=>r[e];this.getDataEnvBySelector=e=>WH.findKey(s,e,true);this.getDataEnvs=e=>{let t=[];let i=a[e].dataTrees;Object.entries(WH.dataEnvToTree).forEach((([e,a])=>{if(i.includes(a)){t.push(parseInt(e))}}));return t};this.getDataTrees=e=>{let t=a[e]?.dataTrees||[];if(!WH.REMOTE){const e=WH.PageMeta.availableDataEnvs.map((e=>WH.getDataTree(e)));t=t.filter((t=>e.includes(t)))}return t.length?t:undefined};this.getDefaultEnv=e=>n[e];this.getEnv=t=>{t=t||e.DEFAULT;return t===WH.Game.get()?WH.getDataEnv():WH.Game.getDefaultEnv(t)};this.getFeaturedTrees=()=>t;this.getName=e=>a[e]?WH.TERMS[a[e].term]:undefined;this.getAbbrev=e=>a[e]?WH.TERMS[a[e].termAbbrev]:undefined;this.getKey=e=>i[e];this.getRoot=t=>WH.getRootEnv(e.getEnv(t));this.getSelectorByDataEnv=e=>s[e];this.getSeoName=e=>a[e]?WH.TERMS[a[e].termSeo]:undefined;this.getWowIconName=e=>o[e];this.hasAccess=t=>(e.getDataTrees(t)||[]).length>0;this.supportsRandomPages=t=>[e.WOW,e.DI].includes(t)};WH.Fonts=new function(){const e=WH.Game;const t="https://use.typekit.net/kxf7wgk.css";const a=`${WH.STATIC_URL}/css/fonts/d4.css`;const i="https://use.typekit.net/qwt0uqi.css";const n={[e.D2]:[i],[e.D4]:[t,a],[e.DI]:[i]};const s={requestedUrls:new Set};this.load=e=>{if(n[e]){n[e].forEach((e=>r(e)))}};function r(e){if(!e||s.requestedUrls.has(e)){return}s.requestedUrls.add(e);if(e===t){s.requestedUrls.add(i)}if(document.head.querySelector('link[rel="stylesheet"][href="'+e+'"]')){return}WH.ae(document.head,WH.ce("link",{href:e,rel:"stylesheet",type:"text/css"}))}};WH.Icon=new function(){const e=this;const t=WH.Game;const i=WH.Types;this.TINY="tiny";this.SMALL="small";this.MEDIUM="medium";this.LARGE="large";this.BLIZZARD="blizzard";this.LEGACY_IDS={0:this.SMALL,1:this.MEDIUM,2:this.LARGE,3:this.BLIZZARD};this.WOW_MEDIUM_SELECTED_CLASS="iconmedium-gold-selected";this.UNKNOWN="inv_misc_questionmark";this.UNKNOWN_ZONE="inv_misc_map08";const n=[this.TINY,this.SMALL,this.MEDIUM,this.LARGE,this.BLIZZARD];this.create=function(n,s,r,o){o=o||{};if(n){n=`${n}`}let l=o.dataEnv||o.type&&i.getPreferredDataEnv(o.type)||t.getEnv(o.game);let c=t.getByEnv(l);if(s===e.TINY){return WH.ce("img",{className:"icontiny",src:e.getIconUrl(n,s,c)})}let d=WH.ce(o.span?"span":"div",{className:"icon"+s,dataset:{env:WH.getDataEnvKey(l),tree:WH.getDataTreeKey(WH.getDataTree(l)),game:t.getKey(c)}});WH.ae(d,WH.ce("ins"));if(o.border!==false){WH.ae(d,WH.ce("del"))}let f=o.type&&i.getStringId(o.type);if(f){d.dataset.type=f}if(o.simple===true){d.dataset.kind="simple"}else if(o.kind){d.dataset.kind=o.kind}if(o.color){d.dataset.color=o.color}WH.cO(d.dataset,o.dataset);if(n){if(n.includes("/")){e.setImage(d,n,true,o.isMask)}else{e.setImage(d,e.getIconUrl(n,s,c),false,o.isMask)}if(!WH.isRemote()&&o.lazyLoad!==false){WH.DOM.lazyLoadBackground(d.firstChild)}}const u=o.ariaLabel||WH.TERMS.icon;if(r){let e=WH.ce("a",{ariaLabel:u,href:r});if(r.indexOf("wowhead.com")===-1&&/^https?:/.test(r)){e.target="_blank"}WH.ae(d,e)}else if(n){let e=d.firstChild.style.backgroundImage.indexOf("/avatars/")!==-1;if(!e){if(r!==null){WH.ae(d,WH.ce("a",{ariaLabel:u,href:"javascript:"}));d.onclick=Icon.onClick}}}if(o.rel&&typeof a!="undefined"){a.rel=o.rel}e.setText(d,o.number,o.quantity);return d};this.createByEntity=function(t,a,n,s){s=s||{};let r=s.size;delete s.size;s.dataEnv=s.dataEnv||t.dataEnv||(i.getRequiredTrees(a)||[])[0];s.type=a;s.ariaLabel??=t.name;const o=WH.DI.GeneralItem;switch(a){case i.DI_EQUIP_ITEM:s.dataset=s.dataset||{};s.dataset.gridType=s.gridType||t.gridType||([6,11,4,3,7,9,8].includes(t.inventoryPosition)?o.GRID_TYPE_1x1:o.GRID_TYPE_2x1);delete s.gridType;if(t.inventoryColor!=null){s.dataset.inventoryColor=t.inventoryColor}break;case i.DI_MISC_ITEM:s.dataset=s.dataset||{};s.dataset.gridType=s.gridType||t.gridType||o.GRID_TYPE_2x1;delete s.gridType;if(t.inventoryColor!=null){s.dataset.inventoryColor=t.inventoryColor}break;case i.DI_PARAGON_SKILL:s.dataset=s.dataset||{};s.dataset.specSkill=JSON.stringify(!!(s.isSpecSkill||t.isSpecSkill));break;case i.D4_PARAGON_NODE:s.dataset=s.dataset||{};s.isMask=!!t.iconImageHash;s.dataset.nodeType=`${t.type}`;s.dataset.isGate=`${!!t.isGate}`;s.dataset.hasSocket=`${!!t.hasSocket}`;case i.D4_ITEM:case i.D4_PARAGON_GLYPH:case i.D4_SENESCHAL_STONE:if(t.quality!=null){s.dataset=s.dataset||{};s.dataset.quality=t.quality}break;case i.D4_SKILL:if((s.active??t.active)===false){s={...s,dataset:{skillType:"passive"}};delete s.active}}return e.create(t.icon||t.iconImageHash,r||e.MEDIUM,n,s)};this.getIconUrl=function(a,i,s){if(n.indexOf(i)===-1){i=e.MEDIUM}if(s===t.DI){return new WH.DI.UiImage(a).getUrl()}else if(s===t.D4){return WH.D4.getImageUrlFromHash(a)}let r=t.getKey(s||t.DEFAULT);if(!r){WH.warn('Invalid game provided for "'+a+'" icon: '+s);r=t.getKey(t.WOW);a=e.UNKNOWN}return WH.STATIC_URL+"/images/"+r+"/icons"+"/"+i+"/"+a.toLowerCase()+(i===e.TINY?".gif":".jpg")};this.getLink=function(e){return e.querySelector("a")};this.isValidSize=function(e){return n.indexOf(e)!==-1};this.setImage=function(e,t,a,i){let n=e.firstChild;n.style.backgroundPosition="";if(i){n.style["-webkit-mask-image"]=t?'url("'+t+'")':""}else{n.style.backgroundImage=t?'url("'+t+'")':""}if(a===true){n.style.backgroundSize="contain"}};this.setLinkUrl=function(t,a){let i=e.getLink(t);if(i){i.href=a}};this.setName=function(t,a,i,n){if(!i){e.setImage(t,null);return}if(a===e.BLIZZARD){a=e.LARGE}e.setImage(t,e.getIconUrl(i,a,n))};this.setText=function(e,t,a){WH.qsa(".wh-icon-text",e).forEach((e=>WH.de(e)));if(t!=null&&(t>1&&t<2147483647||t.length&&t!=="0"&&t!=="1")){WH.ae(e,WH.ce("span",{className:"wh-icon-text",dataset:{type:"number"}},WH.ct(t)))}if(a!=null&&a>0){WH.ae(e,WH.ce("span",{className:"wh-icon-text",dataset:{type:"quantity"}},WH.ct("("+a+")")))}}};var Icon={questionMarkIcon:WH.Icon.UNKNOWN,sizes:["small","medium","large","blizzard"],sizes2:[18,36,56,64],sizeIds:{small:0,medium:1,large:2,blizzard:3},premiumOffsets:[[-56,-36],[-56,0],[0,0],[0,0]],premiumBorderClasses:["-premium","-gold","","-premiumred","-red",""],STANDARD_BORDER:2,privilegeBorderClasses:{uncommon:"-q2",rare:"-q3",epic:"-q4",legendary:"-q5"},idLookupCache:{},create:function(e,t,a,i,n,s,r,o,l,c,d){d=d||{};if(t==null){t=Icon.sizeIds.medium}return WH.Icon.create(e,WH.Icon.LEGACY_IDS[t],i===false?null:i,{border:!r,color:d.color,game:d.game,lazyLoad:d.lazyLoad,number:n,quantity:s,rel:o,simple:c,span:l,type:d.type})},createUser:function(e,t,a,i,n,s,r){if(e==2)t=WH.staticUrl+"/uploads/avatars/"+t+".jpg";var o=Icon.create(t,a,null,i,null,null,s);if(n!=Icon.STANDARD_BORDER){if(Icon.premiumBorderClasses[n]){o.className+=" "+o.className+Icon.premiumBorderClasses[n]}}else if(r&&Icon.privilegeBorderClasses.hasOwnProperty(r))o.className+=" "+o.className+Icon.privilegeBorderClasses[r];if(e==2)Icon.moveTexture(o,a,Icon.premiumOffsets[a][0],Icon.premiumOffsets[a][1],true);o.classList.add("icon"+Icon.sizes[a]+"-sprite");return o},getIdFromName:function(e,t){if(Icon.idLookupCache.hasOwnProperty(e)){window.requestAnimationFrame((function(){t(Icon.idLookupCache[e]||undefined)}));return}$.ajax({url:WH.Url.generatePath("/icon/get-id-from-name"),data:{name:e},dataType:"json",success:function(a){Icon.idLookupCache[e]=a;t(a||undefined)}})},getPrivilegeBorder:function(e){var t=false;if(e>=5e3)t="uncommon";if(e>=1e4)t="rare";if(e>=15e3)t="epic";if(e>=25e3)t="legendary";return t},setUrl:function(e,t){if(!t){t="javascript:"}Icon.getLink(e).href=t},setTexture:function(e,t,a,i){var n=e.firstChild.style;n.backgroundSize="";n.backgroundPosition="";if(!a){n.backgroundImage=null;return}if(a.indexOf("/")!==-1){n.backgroundImage="url("+a+")";n.backgroundSize="contain"}else{let e=Icon.sizes[t];if(e==="blizzard"){e="large"}n.backgroundImage="url("+WH.Icon.getIconUrl(a,e,i)+")"}},moveTexture:function(e,t,a,i,n){var s=e.firstChild.style;s.backgroundSize="";if(a||i){if(n)s.backgroundPosition=a+"px "+i+"px";else s.backgroundPosition=-a*Icon.sizes2[t]+"px "+-i*Icon.sizes2[t]+"px"}else if(s.backgroundPosition)s.backgroundPosition=""},getLink:function(e){return WH.gE(e,"a")[0]},showIconInfo:function(e){if(e.firstChild){let t=e.firstChild.style;if(t.backgroundImage&&(!WH.STATIC_URL||t.backgroundImage.indexOf(WH.STATIC_URL)>=4)){let e=t.backgroundImage.match(/images\/([^/]+)\/icons\/[^/]+\/([^/.]+).(?:jpg|gif)/);if(e){Icon.displayIcon(e[2],WH.Game.getByKey(e[1]))}}}},onClick:function(){Icon.showIconInfo(this)},displayIcon:function(e,t){if(!Dialog.templates.icondisplay){Dialog.templates.icondisplay={title:WH.TERMS.icon,width:500,buttons:[["arrow",WH.TERMS.original],["x",WH.TERMS.close]],fields:[{id:"icon",label:WH.TERMS.name_colon,required:1,type:"text",labelAlign:"left",compute:function(e,a,i,n){n.classList.add("icon-dialog-content");var s=this.iconDiv=WH.ce("div");s.update=function(){setTimeout((function(){WH.safeSelect(e)}),10);WH.ee(s);WH.ae(s,WH.Icon.create(e.value,WH.Icon.LARGE,undefined,{game:t}))};WH.ae(s,WH.Icon.create(a,WH.Icon.LARGE,undefined,{game:t}));WH.ae(n,s);WH.ae(n,e)}},{id:"iconId",label:WH.TERMS.id+WH.TERMS.colon_punct,type:"text",labelAlign:"left",compute:function(e,t,a,i){i.classList.add("icon-dialog-content");e.value="";this.iconIdField=e}},{id:"location",label:" ",required:1,type:"caption",compute:function(e,t,a,i,n){WH.ee(i);i.classList.add("icon-dialog-caption");let s=WH.Strings.escapeHtml(WH.Url.generatePath("/items?filter=142;0;"+this.data.icon));let r=WH.Strings.escapeHtml(WH.Url.generatePath("/spells?filter=15;0;"+this.data.icon));let o=WH.Strings.escapeHtml(WH.Url.generatePath("/achievements?filter=10;0;"+this.data.icon));var l=WH.TERMS.seeallusingicon_format;l=l.replace("$1",''+WH.Types.getLowerPlural(WH.Types.ITEM)+"");l=l.replace("$2",''+WH.Types.getLowerPlural(WH.Types.SPELL)+"");l=l.replace("$3",''+WH.Types.getLowerPlural(WH.Types.ACHIEVEMENT)+"");i.innerHTML=l}}],onInit:function(e){this.updateIcon=this.template.updateIcon.bind(this,e)},onShow:function(e){this.updateIcon();if(location.hash&&location.hash.indexOf("#icon")==-1)this.oldHash=location.hash;else this.oldHash="";var t="#icon";let a=window.g_pageInfo&&g_pageInfo.type&&[WH.Types.ITEM,WH.Types.SPELL,WH.Types.ACHIEVEMENT].includes(g_pageInfo.type);if(!a){t+=":"+this.data.icon;if(this.data.game&&this.data.game!==WH.Game.DEFAULT){t+=":"+WH.Game.getKey(this.data.game)}}location.hash=t},onHide:function(e){if(this.oldHash)WH.setHash(this.oldHash);else WH.clearHash()},updateIcon:function(e){this.iconDiv.update();var t=this.iconIdField;Icon.getIdFromName(e.icon.value,(function(e){t.value=e||""}))},onSubmit:function(e,t,a,i){if(a==="arrow"){let e=WH.Icon.getIconUrl(t.icon,WH.Icon.LARGE,t.game);let a=window.open(e,"_blank");a.focus();return false}return true}}}if(!Icon.icDialog)Icon.icDialog=new Dialog;Icon.icDialog.show("icondisplay",{data:{icon:e,game:t}})},checkPound:function(){if(location.hash&&location.hash.indexOf("#icon")===0){let e=location.hash.split(":");let t;let a;if(e.length===3){t=e[1];a=WH.Game.getByKey(e[2])}else if(e.length===2){t=e[1]}else if(e.length===1&&window.g_pageInfo){t=WH.Gatherer.getIconName(g_pageInfo.type,g_pageInfo.typeId)}if(t){Icon.displayIcon(t,a)}}}};if(!WH.REMOTE){WH.onLoad(Icon.checkPound)}WH.Tooltips=WH.Tooltips||new function(){const e=this;const t=WH.Game;const a=WH.Icon;const i=WH.Types;const n="nether";const s=550;const r={garrisonability:"mission-ability",itemset:"item-set",petability:"pet-ability"};const o={1:299204,2:299205,3:299206,4:299207};const l=15;const c=15;const d=[i.ACHIEVEMENT,i.AFFIX,i.AZERITE_ESSENCE,i.AZERITE_ESSENCE_POWER,i.ITEM,i.SPELL,i.DI_EQUIP_ITEM,i.DI_MISC_ITEM,i.DI_PARAGON_SKILL,i.DI_SKILL,i.D4_AFFIX,i.D4_ASPECT,i.D4_ITEM,i.D4_PARAGON_GLYPH,i.D4_PARAGON_NODE,i.D4_SKILL,i.D4_VAMPIRIC_POWER,i.D4_SENESCHAL_STONE];const f={["-1000"]:{name:"Mount",path:"mount",mobile:true,data:{},maxId:5e4},["-1001"]:{name:"Recipe",path:"recipe",mobile:true,data:{},maxId:5e5},["-1002"]:{name:"Battle Pet",path:"battle-pet",mobile:true,data:{},maxId:5e4},[i.NPC]:{name:"NPC",path:"npc",mobile:false,data:{},maxId:5e5},[i.OBJECT]:{name:"Object",path:"object",mobile:false,data:{},maxId:75e4},[i.ITEM]:{name:"Item",path:"item",mobile:true,data:{},maxId:5e5},[i.ITEM_SET]:{name:"Item Set",path:"item-set",mobile:true,data:{},maxId:1e4,minId:-5e3},[i.QUEST]:{name:"Quest",path:"quest",mobile:false,data:{},maxId:1e5},[i.SPELL]:{name:"Spell",path:"spell",mobile:true,data:{},maxId:5e5},[i.ZONE]:{name:"Zone",path:"zone",mobile:false,data:{},maxId:5e4},[i.ACHIEVEMENT]:{name:"Achievement",path:"achievement",mobile:true,data:{},maxId:5e4},[i.EVENT]:{name:"Event",path:"event",mobile:false,data:{},maxId:1e4},[i.CURRENCY]:{name:"Currency",path:"currency",mobile:false,data:{},maxId:1e4},[i.BUILDING]:{name:"Building",path:"building",mobile:false,data:{},maxId:1e3},[i.FOLLOWER]:{name:"Follower",path:"follower",mobile:true,data:{},maxId:1e4},[i.MISSION_ABILITY]:{name:"Mission Ability",path:"mission-ability",mobile:true,data:{},maxId:1e4},[i.MISSION]:{name:"Mission",path:"mission",mobile:true,data:{},maxId:1e4},[i.SHIP]:{name:"Ship",path:"ship",mobile:true,data:{},maxId:1e4},[i.THREAT]:{name:"Threat",path:"threat",mobile:false,data:{},maxId:1e3},[i.RESOURCE]:{name:"Resource",path:"resource",mobile:true,data:{},maxId:100,minId:0},[i.CHAMPION]:{name:"Champion",path:"champion",mobile:true,data:{},maxId:1e4},[i.ORDER_ADVANCEMENT]:{name:"Order Advancement",path:"order-advancement",mobile:true,data:{},maxId:5e3},[i.BFA_CHAMPION]:{name:"BFA Champion",path:"bfa-champion",mobile:true,data:{},maxId:1e4},[i.AFFIX]:{name:"Affix",path:"affix",mobile:true,data:{},maxId:1e3},[i.AZERITE_ESSENCE_POWER]:{name:"Azerite Essence Power",path:"azerite-essence-power",mobile:true,data:{},maxId:1e3},[i.AZERITE_ESSENCE]:{name:"Azerite Essence",path:"azerite-essence",mobile:false,data:{},maxId:100},[i.STORYLINE]:{name:"Storyline",path:"storyline",mobile:false,data:{},maxId:1e4},[i.ADVENTURE_COMBATANT_ABILITY]:{name:"Adventure Combatant Ability",path:"adventure-combatant-ability",mobile:true,data:{},maxId:1e4},[i.GUIDE]:{name:"Guide",path:"guide",mobile:false,data:{}},[i.TRANSMOG_SET]:{name:"Transmog Set",path:"transmog-set",mobile:true,data:{},maxId:5e4},[i.OUTFIT]:{name:"Outfit",path:"outfit",mobile:true,data:{}},[i.BATTLE_PET_ABILITY]:{name:"Battle Pet Ability",path:"pet-ability",mobile:true,data:{},maxId:1e4},[i.DI_EQUIP_ITEM]:{name:"Equipment Item",path:"equip-item",mobile:true,data:{},embeddedIcons:true},[i.DI_MISC_ITEM]:{name:"Miscellaneous Item",path:"misc-item",mobile:true,data:{},embeddedIcons:true},[i.DI_NPC]:{name:"NPC",path:"npc",mobile:true,data:{}},[i.DI_PARAGON_SKILL]:{name:"Paragon Skill",path:"paragon-skill",mobile:true,data:{}},[i.DI_QUEST]:{name:"Quest",path:"quest",mobile:true,data:{}},[i.DI_SET]:{name:"Set",path:"set",mobile:true,data:{}},[i.DI_SKILL]:{name:"Skill",path:"skill",mobile:true,data:{}},[i.DI_ZONE]:{name:"Zone",path:"zone",mobile:true,data:{}},[i.D4_AFFIX]:{name:"Affix",path:"affix",mobile:true,data:{},embeddedIcons:true},[i.D4_ASPECT]:{name:"Aspect",path:"aspect",mobile:true,data:{},embeddedIcons:true},[i.D4_PARAGON_GLYPH]:{name:"Paragon Glyph",path:"paragon-glyph",mobile:true,data:{},embeddedIcons:true},[i.D4_PARAGON_NODE]:{name:"Paragon Node",path:"paragon-node",mobile:true,data:{},embeddedIcons:true},[i.D4_SKILL]:{name:"Skill",path:"skill",mobile:true,data:{},embeddedIcons:true},[i.PROFESSION_TRAIT]:{name:"Profession Trait",path:"profession-trait",mobile:true,data:{},maxId:5e5},[i.D4_ITEM]:{name:"Item",path:"item",mobile:true,data:{},embeddedIcons:true},[i.TRADING_POST_ACTIVITY]:{name:"Trading Post Activity",path:"trading-post-activity",mobile:true,data:{},maxId:1e4},[i.D4_VAMPIRIC_POWER]:{name:"Vampiric Power",path:"vampiric-power",mobile:true,data:{},embeddedIcons:true},[i.D4_SENESCHAL_STONE]:{name:"Seneschal Stone",path:"seneschal-stone",mobile:true,data:{},embeddedIcons:true}};const u=(()=>{let e={[WH.dataTree.D2]:["guide"],[WH.dataTree.D4]:["affix","aspect","guide","item","paragon-glyph","paragon-node","seneschal-stone","skill","vampiric-power"],[WH.dataTree.DI]:["equip-item","guide","misc-item","npc","paragon-skill","set","skill"],[WH.dataTree.RETAIL]:["achievement","adventure-combatant-ability","affix","azerite-essence","azerite-essence-power","battle-pet","bfa-champion","building","champion","currency","event","follower","garrisonability","guide","item","item-set","itemset","mission","mission-ability","mount","npc","object","order-advancement","outfit","pet-ability","petability","profession-trait","quest","recipe","resource","ship","spell","statistic","storyline","threat","trading-post-activity","transmog-set","zone"],[WH.dataTree.CLASSIC]:["currency","event","guide","item","item-set","itemset","npc","object","outfit","pet-ability","petability","quest","resource","spell","statistic","transmog-set","zone"]};e[WH.dataTree.TBC]=e[WH.dataTree.CLASSIC];e[WH.dataTree.WRATH]=e[WH.dataTree.TBC].concat(["achievement"]);e[WH.dataTree.CATA]=e[WH.dataTree.WRATH];return e})();const p={traits:{agi:["Agility","Agi","Agi"],arcres:["Arcane resistance","Arcane Resist","ArcR"],arcsplpwr:["Arcane spell power","Arcane Power","ArcP"],armor:["Armor","Armor","Armor"],armorbonus:["Additional armor","Bonus Armor","AddAr"],armorpenrtng:["Armor penetration rating","Armor Pen","Pen"],atkpwr:["Attack power","AP","AP"],block:["Block value","Block Value","BkVal"],blockrtng:["Block rating","Block","Block"],critstrkrtng:["Critical strike rating","Crit","Crit"],defrtng:["Defense rating","Defense","Def"],dmg:["Weapon damage","Damage","Dmg"],dmgmax1:["Maximum damage","Max Damage","Max"],dmgmin1:["Minimum damage","Min Damage","Min"],dodgertng:["Dodge rating","Dodge","Dodge"],dps:["Damage per second","DPS","DPS"],exprtng:["Expertise rating","Expertise","Exp"],firres:["Fire resistance","Fire Resist","FirR"],firsplpwr:["Fire spell power","Fire Power","FireP"],frores:["Frost resistance","Frost Resist","FroR"],frosplpwr:["Frost spell power","Frost Power","FroP"],hastertng:["Haste rating","Haste","Haste"],health:["Health","Health","Hlth"],healthrgn:["Health regeneration","HP5","HP5"],hitrtng:["Hit rating","Hit","Hit"],holres:["Holy resistance","Holy Resist","HolR"],holsplpwr:["Holy spell power","Holy Power","HolP"],int:["Intellect","Int","Int"],level:["Level","Level","Lvl"],mana:["Mana","Mana","Mana"],manargn:["Mana regeneration","MP5","MP5"],mastrtng:["Mastery rating","Mastery","Mastery"],mleatkpwr:["Melee attack power","Melee AP","AP"],mlecritstrkrtng:["Melee critical strike rating","Melee Crit","Crit"],mledmgmax:["Melee maximum damage","Melee Max Damage","Max"],mledmgmin:["Melee minimum damage","Melee Min Damage","Min"],mledps:["Melee DPS","Melee DPS","DPS"],mlehastertng:["Melee haste rating","Melee Haste","Haste"],mlehitrtng:["Melee hit rating","Melee Hit","Hit"],mlespeed:["Melee speed","Melee Speed","Speed"],natres:["Nature resistance","Nature Resist","NatR"],natsplpwr:["Nature spell power","Nature Power","NatP"],nsockets:["Number of sockets","Sockets","Sockt"],parryrtng:["Parry rating","Parry","Parry"],reqarenartng:["Required personal and team arena rating","Req Rating","Rating"],reqlevel:["Required level","Req Level","Level"],resirtng:["PvP Resilience rating","PvP Resilience","Resil"],rgdatkpwr:["Ranged attack power","Ranged AP","RAP"],rgdcritstrkrtng:["Ranged critical strike rating","Ranged Crit","Crit"],rgddmgmax:["Ranged maximum damage","Ranged Max Damage","Max"],rgddmgmin:["Ranged minimum damage","Ranged Min Damage","Min"],rgddps:["Ranged DPS","Ranged DPS","DPS"],rgdhastertng:["Ranged haste rating","Ranged Haste","Haste"],rgdhitrtng:["Ranged hit rating","Ranged Hit","Hit"],rgdspeed:["Ranged speed","Ranged Speed","Speed"],sepbasestats:"Base stats",sepdefensivestats:"Defensive stats",sepindividualstats:"Individual stats",sepoffensivestats:"Offensive stats",sepresistances:"Resistances",sepweaponstats:"Weapon stats",shares:["Shadow resistance","Shadow Resist","ShaR"],shasplpwr:["Shadow spell power","Shadow Power","ShaP"],speed:["Speed","Speed","Speed"],spi:["Spirit","Spi","Spi"],splcritstrkrtng:["Spell critical strike rating","Spell Crit","Crit"],spldmg:["Damage done by spells","Spell Damage","Dmg"],splheal:["Healing done by spells","Healing","Heal"],splpwr:["Spell power","Spell Power","SP"],splhastertng:["Spell haste rating","Spell Haste","Haste"],splhitrtng:["Spell hit rating","Spell Hit","Hit"],splpen:["Spell penetration","Spell Pen","Pen"],sta:["Stamina","Sta","Sta"],str:["Strength","Str","Str"],pvppower:["PvP Power","PvPPower","PvPPower"]}};const h={colorLinks:"colorlinks",iconizeLinks:"iconizelinks",renameLinks:"renamelinks"};const g=WH.TERMS||{genericequip_tip:'Equip: Increases your $1 by \x3c!--rtg$2--\x3e$3 (\x3c!--rtg%$2--\x3e0 @ L\x3c!--lvl--\x3e0).
',reforged_format:"Reforged ($1 $2 → $1 $3)"};const m={0:"enus",1:"kokr",2:"frfr",3:"dede",4:"zhcn",6:"eses",7:"ruru",8:"ptbr",9:"itit"};const W=320;const H=0;const E=5;const T=3;const v=4;const S=1;const I=2;const b=[{},{top:false},{right:false},{right:false,top:false}];const y=/([a-zA-Z0-9-]+)=?([^&?#]*)/g;const w=(()=>{let e={};Object.entries(f).forEach((([a,n])=>{let s=parseInt(a);if(s<0){e[n.path]=s;return}let r=i.getGame(s);let o=r===t.WOW?"":`${t.getKey(r)}-`;i.getHistoricalDetailPageNames(s).forEach((t=>e[o+t]=s))}));return e})();const _="(?![^/?&#])";const A="^https?://(.+?)?\\.?(?:wowhead)\\.com(?:\\:\\d+)?/";const L=new RegExp(A+"\\??("+u[WH.dataTree.RETAIL].join("|")+")[=/](?:[^/?&#]+-)?(-?\\d+(?:\\.\\d+)?)"+_);const R=new RegExp(A+"(guide)s?/([^?&#]+)");const C=(()=>[WH.dataEnv.MAIN,WH.dataEnv.PTR,WH.dataEnv.PTR2,WH.dataEnv.BETA,WH.dataEnv.CATA,WH.dataEnv.D4,WH.dataEnv.D4PTR,WH.dataEnv.WRATH,WH.dataEnv.DI,WH.dataEnv.TBC,WH.dataEnv.CLASSIC,WH.dataEnv.D2].map((e=>{let a=WH.getDataTree(e);let i=t.getByTree(a);let n=u[a];let s=t.getSelectorByDataEnv(e);let r="^https?://(?:\\w+\\.)*wowhead\\.com(?:\\:\\d+)?"+(s?`/${s}`:"")+"/(?:(\\w\\w)/)?";let o="("+n.join("|")+")";return{detailPagePrefix:i===t.WOW?"":`${t.getKey(i)}-`,envId:e,prefixedDetailPageNames:i===t.WOW?[]:n.filter((e=>e!=="guide")),regexFrontPaths:new RegExp(r+o+"/(?:[^/?&#]+-)?(\\d+)"+_),regexGuidePaths:new RegExp(r+"(guide)s?/([^?&#]+)"),regexLegacyPaths:new RegExp(r+o+"=(-?\\d+(?:\\.\\d+)?)"),treeId:a}})))();const M=-1;const N=0;const O=1;const D=0;const P=1;const k=2;const x=3;const B=4;const F=5;const U={[P]:"loading",[F]:"loading",[k]:"error",[D]:"loading",[x]:"error",[B]:"ok"};const G=[i.GUIDE];const q={0:{achievementComplete:"Achievement earned by $1 on $2/$3/$4",loading:"Loading…",noResponse:"No response from server :(",notFound:"%s Not Found"},1:{achievementComplete:"$1이(가) $2/$3/$4에 업적을 달성함",loading:"로딩 중…",noResponse:"서버가 응답하지 않습니다 :(",notFound:"%s 을(를) 찾을 수 없음"},2:{achievementComplete:"Haut-fait reçu par $1 le $2/$3/$4",loading:"Chargement…",noResponse:"Pas de réponse du serveur :(",notFound:"%s non trouvé"},3:{achievementComplete:"Erfolg wurde von $1 am $3.$2.$4 errungen",loading:"Lädt…",noResponse:"Keine Antwort vom Server :(",notFound:"%s nicht gefunden"},4:{achievementComplete:"$1在$2/$3/$4上获得成就",loading:"正在载入…",noResponse:"服务器没有响应 :(",notFound:"%s未找到"},6:{achievementComplete:"Logro conseguido por $1 el $2/$3/$4",loading:"Cargando…",noResponse:"No hay respuesta del servidor :(",notFound:"%s no encontrado/a"},7:{achievementComplete:"$1 получил(а) это достижение $2/$3/$4",loading:"Загрузка…",noResponse:"Нет ответа от сервера :(",notFound:"%s не найдено"},8:{achievementComplete:"Conquista conseguida por $1 em $3/$2/$4",loading:"Carregando…",noResponse:"Sem resposta do servidor :(",notFound:"%s não encontrado(a)"},9:{achievementComplete:"Impresa compiuta da $1 su $2/$3/$4",loading:"Caricamento…",noResponse:"Nessuna risposta dal server :(",notFound:"%s Non Trovato"}};const z=WH.Device.isTouch();const $={cursorX:undefined,cursorY:undefined,enabled:true,element:undefined,elements:{icon:undefined,logo:undefined,screen:undefined,screenCaption:undefined,screenInnerBox:undefined,screenInnerWrapper:undefined,tooltip:undefined,tooltip2:undefined,tooltipTable:undefined,tooltipTable2:undefined,tooltipTd:undefined,tooltipTd2:undefined},showScreenshots:false,initiatedByUser:false,iScroll:null,mobileScrollInitialized:false,show:{dataEnv:undefined,fullId:undefined,hasLogo:true,locale:undefined,mode:H,params:{},type:undefined},showCharacterCompletion:!WH.REMOTE,showIcon:false,showSecondary:false,showingTooltip:false,touchElement:undefined,usingScreen:false};this.attachTouchTooltips=function(e){if(!z){return}if(e&&e.nodeType===1){X(e)}};this.clearTouchTooltip=function(e){if($.touchElement){if(e!==true){$.touchElement.removeAttribute("data-showing-touch-tooltip")}$.touchElement.hasWHTouchTooltip=false}$.touchElement=undefined;if(e!==true){WH.qsa("[data-showing-touch-tooltip]").forEach((function(e){delete e.dataset.showingTouchTooltip}))}if($.elements.screen){$.elements.screenInnerWrapper.scrollTop=0;$.elements.screenInnerWrapper.scrollLeft=0;$.elements.screen.style.display="none";$.usingScreen=false}let t=e===true?$.showingTooltip:false;Se();$.showingTooltip=t};this.evalFormulas=function(e,t=0){if(typeof e!=="string"){return e}let a=/"){n=""}}s+=`>${i}
\x3c!--itemeffectspec--\x3e${n}`;return s}));this.refreshLinks=function(e){if(e===true||me("renameLinks")||me("colorLinks")||me("iconizeLinks")){let e=re();for(let i,n=0;i=e[n];n++){var t=i.parentNode;var a=false;while(t!=null){let e=t.getAttribute&&t.getAttribute("class")||"";if((" "+e+" ").replace(/[\n\t]/g," ").indexOf(" wowhead-tooltip ")>-1){a=true;break}t=t.parentNode}if(!a){ze(i);if(z){J(i)}}}}Se()};this.register=function(t,a,n,s,r){let o=this.getEntity(t,a,n,s);{let a=r.additionalIds||[];delete r.additionalIds;a.forEach((a=>e.register(t,a,n,s,r)))}{if(!st.isLoaded(t,n)){o.status=F;st.registerCallback(t,n,e.register.bind(this,t,a,n,s,r));return}if(typeof a==="string"&&(a.indexOf("lvl")===0||a.match(/[^i]lvl/))&&!st.isLoaded(i.SPELL,n)){o.status=F;st.registerCallback(i.SPELL,n,e.register.bind(this,t,a,n,s,r));return}}if(o.timer){clearTimeout(o.timer);delete o.timer}if(!WH.REMOTE&&r.map){if(!o.data.map){o.data.map=new Mapper({parent:WH.ce("div"),zoom:3,zoomable:false,buttons:false})}o.data.map.update(r.map);delete r.map}for(var l in r){if(!r.hasOwnProperty(l)){continue}o.data[l]=r[l]}switch(o.status){case P:case F:case k:case D:if(o.data[Te()]){o.status=B}else{o.status=x}}if($.showingTooltip&&$.show.type===t&&$.show.fullId===a&&$.show.dataEnv===n&&$.show.locale===s){at()}while(o.callbacks.length){o.callbacks.shift()()}};this.replaceWithTooltip=function(a,i,n,s,r,o,l){o=o||{};if(r===undefined){r=Locale.getId()}if(!s){s=WH.getDataEnv()}if(typeof a==="string"){a=document.getElementById(a)}if(!a){return false}var c=fe(i,n,o);var d=this.getEntity(i,c,s,r);switch(d.status){case B:if(!a.parentNode){return true}while(a.hasChildNodes()){a.removeChild(a.firstChild)}var u=["wowhead-tooltip-inline"];if(!f[i].embeddedIcons&&ae(d.data)){u.push("wowhead-tooltip-inline-icon")}j(a,u);let h=t.getByEnv(s);if(h!==t.get()){WH.Fonts.load(h)}var p=d.data[Te()];let g=function(n){if(typeof l==="function"){n=l(n,d)}if(h===t.WOW){n=e.evalFormulas(n)}if(n){Y(a,d.data,n,s,i)}};Be(p,d.data[Ee()],g,{type:i,fullId:c,dataEnv:s,locale:r,params:o});return true;case P:case D:d.callbacks.push(this.replaceWithTooltip.bind(this,a,i,n,s,r,o,l));this.request(i,n,s,r,o);return true}return false};this.request=function(e,t,a,i,n){n=n||{};if(i===undefined){i=Locale.getId()}if(!a){a=WH.getDataEnv()}var s=fe(e,t,n);this.getEntity(e,s,a,i);qe(e,t,a,i,true,n)};this.setScales=function(e,t,a){st.setData(e,t,a)};this.triggerTooltip=function(e,t){ze(e,t||{target:e},true)};if(!WH.REMOTE){this.addText=function(e,t,a){if(!e){WH.error("Tooltip text addition element not found!",e,t,a);return}e._fixTooltip=function(e,t,a,i){let n=/<\/table>\s*$/;let s=typeof a==="function"?a():a;let r=a?' class="'+s+'"':"";let o=typeof t==="function"?t():t;if(n.test(i)){return i.replace(n,''+o+"")}else{return i+"'+o+""}}.bind(null,e,t,a)};this.attach=function(t,a,i,n){n=n||{};if(t instanceof jQuery){for(let s=0,r;r=t[s];s++){e.attach(r,a,i,n)}return}let s={dataEnv:n.dataEnv,type:n.type,iconName:n.iconName};let r=n.stopPropagation?e=>e.stopPropagation():()=>{};if(n.byCursor){t.onmouseover=e=>{let t=Ge(a,n.noWrap,n.maxWidth,e);Je(e,t,i,s);r(e)};t.onmousemove=e.cursorUpdate}else{t.onmouseover=e=>{let o=Ge(a,n.noWrap,n.maxWidth,e);Qe(t,o,i,s);r(e)}}t.onmouseout=Se};this.attachNonTouch=function(t,a,i,n){if(!WH.Device.isTouch()){e.attach(t,a,i,n)}};this.cursorUpdate=function(e,t,a){if(!$.enabled||!$.elements.tooltip){return}if(!t||t<10)t=10;if(!a||a<10)a=10;Le(e.pageX,e.pageY,0,0,t,a)};this.disableCompletion=function(){$.showCharacterCompletion=false};this.getScalingData=(e,t)=>st.getDataByKey(e,t);this.getScreenshotsEnabled=()=>$.showScreenshots;this.getTd=()=>$.elements.tooltipTd;this.isTypeSupported=e=>f.hasOwnProperty(e);this.isVisible=function(){return $.showingTooltip||$.elements.tooltip&&WH.DOM.isVisible($.elements.tooltip)};this.on=(e,t)=>{if(!$.elements.tooltip){Fe()}WH.aE($.elements.tooltip,e,t)};this.relToParams=e=>{let t={};e.forEach((e=>e.replace(y,((e,a,i)=>ke(t,a,i)||""))));return t};this.setEnabled=e=>$.enabled=e;this.setScreenshotsEnabled=e=>$.showScreenshots=e;this.showFadingTooltipAtCursor=function(e,t,a,i,n){e=Ge(e,i,n,t);Je(t,e,a);requestAnimationFrame((function(){$.elements.tooltip.classList.add("fade-out")}))};this.titlesToTooltips=function(t,a){if(typeof t==="string"){t=WH.qsa(t)}t.forEach((t=>{e.attach(t,t.title,"q",{noWrap:true});t.removeAttribute("title");if(!a){t.classList.add("tip")}}))};this.finalizeSizeAndReveal=ne;this.hide=Se;this.prepare=Fe;this.prepareContent=Ge;this.setIcon=je;this.show=Qe;this.showAtCursor=Je;this.showAtPoint=Xe;this.showInScreen=Ze}function j(e,t){if(e.classList){for(let a=0,i=t.length;a{}}function Q(e,t){WH.qsa(":scope > .image",$.elements.tooltipTable.parentNode).forEach((e=>WH.de(e)));let a=typeof e;if(a==="number"){let t=WH.getDataSource();let a=e;if(t[a]&&t[a]["image_"+Locale.getName()]){e=t[a]["image_"+Locale.getName()]}else{return}}else if(a!=="string"||!e){return}let i=WH.ce("div",{className:"image"+(t?" "+t:""),style:{backgroundImage:"url("+e+")"}});$.elements.tooltipTable.parentNode.insertBefore(i,$.elements.tooltipTable.nextSibling)}function J(e){if(!e.dataset||e.dataset.hasWhTouchEvent==="true"){return}if(e.onclick==null){e.onclick=Pe}else{WH.aE(e,"click",Pe)}e.dataset.hasWhTouchEvent="true"}function X(e){if(!z){return}Me((function(){e=e||document.body;var t=WH.gE(e,"a");for(var a=0,i=t.length;a=2&&s[0].nodeName==="TABLE"&&s[1].nodeName==="TABLE"){let r=s[0];let o=s[1];r.style.whiteSpace="nowrap";let l=parseInt(e.style.width);if(!e.slider||!l){l=Math.max(r.getBoundingClientRect().width,o.getBoundingClientRect().width)+a}if(l>W){r.style.whiteSpace=null}for(let e=2;e20){if(e.slider){Slider.setSize(e.slider,l-6);e.classList.add("tooltip-slider")}e.classList.add("wowhead-tooltip-width-restriction");e.classList.add("wowhead-tooltip-width-"+l);e.style.width=l+"px";WH.qsa(":scope > table",n).forEach((e=>e.style.width="100%"));if(t&&e.offsetHeight>He()){i.classList.add("shrink")}}}else if(s.length&&e.slider){let n=s[0];let r=n.nodeName==="TABLE";if(r){n.style.whiteSpace="nowrap"}let o=parseInt(e.style.width);if(!o&&r){o=n.getBoundingClientRect().width+a;if(o>W){n.style.whiteSpace=null}}else{o=i.getBoundingClientRect().width+a}o=Math.min(W,o);if(o>20){e.style.width=o+"px";if(r){n.style.width="100%"}if(e.slider){Slider.setSize(e.slider,o-6);e.classList.add("tooltip-slider")}if(t&&e.offsetHeight>He()){i.classList.add("shrink")}}}}function ne(e){ie(e,false);Ve(e,true)}function se(e){if(!$.elements.tooltip){return}try{$.elements.tooltip.dispatchEvent(new Event(e))}catch(t){try{let t=document.createEvent("Event");t.initEvent(e,true,true);$.elements.tooltip.dispatchEvent(t)}catch(e){void 0}}}function re(){let e=[];for(let t=0;t{}}function we(){if(!$.mobileScrollInitialized){let e=function(e){if($.usingScreen){if(!document.getElementById("wowhead-tooltip-screen-inner").contains(e.target)){e.preventDefault()}}};WH.aE(document.body,"touchmove",e);WH.aE(document.body,"mousewheel",e);$.mobileScrollInitialized=true}if(typeof IScroll!=="function"){return}setTimeout((function(){if($.iScroll){$.iScroll.destroy();$.iScroll=null}$.iScroll=new IScroll($.elements.screenInnerWrapper,{mouseWheel:true,tap:true})}),1)}function _e(e){if(typeof f[e]!=="object"){WH.error("Wowhead tooltips could not find config for entity type.",e);return false}return f[e].mobile}function Ae(t,a,i,n){let s=e.getEntity(t,a,i,n);s.status=k;if($.show.type===t&&$.show.fullId===a&&$.show.dataEnv===i&&$.show.locale===n){tt(s.status,n,ge(n,"noResponse"))}}function Le(e,t,a,i,n,s){if(!$.elements.tooltip){return}let r=$.elements.tooltip;r.style.left="-1000px";r.style.top="-1000px";r.style.width=null;r.style.maxWidth=W+"px";let o=r.getBoundingClientRect().width;let l=$.elements.tooltip2;l.style.left="-1000px";l.style.top="-1000px";l.style.width=null;l.style.maxWidth=W+"px";let c=$.showSecondary?l.getBoundingClientRect().width:0;r.style.maxWidth=null;l.style.maxWidth=null;r.style.width=o?o+"px":"auto";l.style.width=c+"px";if(e||t){let e=r.whttHeightCap;let t=(e||{}).maxHeight||window.innerHeight;let a=(e||{}).innerScroll;if(r.offsetHeight>=t){if(a=a||WH.qs(".whtt-scroll",r)){r.dataset.height="restricted";r.style.maxHeight=t+"px";if(!e){let e=r.scrollHeight-r.offsetHeight;a.style.maxHeight=a.scrollHeight-e+"px";r.whttHeightCap={innerScroll:a,maxHeight:r.offsetHeight}}}}else{if(a){Z(r,a)}}}let d,f;for(let r=0,o=b.length;r=T}if(r){e+=a+n}else{e=Math.max(e-(u+g),E)-n}if(o){t-=Math.max(p,m)+s}else{t+=i+s}if(ev){e=v-(u+g)}if(tS){t=Math.max(H.y,S-Math.max(p,m))}if($.showIcon){if(l>=e-48&&l<=e&&c>=t-4&&c<=t+48){t-=48-(c-t)}}return WH.createRect(e,t,u,p)}function Ce(t,a,n,s,o,l,c,d){if(!d.ctrlKey||d.button!==2){return}d.preventDefault();d.stopPropagation();let f=WH.DOM.getData(this,"menu");if(f){Menu.show(f,this);return}f=[];let u=e.getEntity(n,fe(n,o,l),t,a);if(u.data.name){f.push(Menu.createItem({label:WH.term("copy_format",WH.TERMS.name),url:WH.copyToClipboard.bind(undefined,u.data.name)}))}f.push(Menu.createItem({label:WH.term("copy_format",WH.TERMS.id),url:WH.copyToClipboard.bind(undefined,o)}));let p=c;if(!p&&i.existsInDataEnv(n)){p=WH.Entity.getUrl(n,o,undefined,undefined,t,a)}if(p){f.push(Menu.createItem({label:WH.term("copy_format",WH.TERMS.url),url:WH.copyToClipboard.bind(undefined,c)}))}let h=r[s]||s;if(WH.markup.tags[h]){let e="";if(n===WH.Types.SPELL){if(l.def&&l.rank){e+=` def=${l.def} rank=${l.rank}`}}f.push(Menu.createItem({label:WH.term("copy_format",WH.TERMS.wowheadMarkupTag),url:WH.copyToClipboard.bind(undefined,`[${h}=${o}${e}]`)}))}Menu.add(this,f,{noEvents:true,showAtElement:true,showImmediately:true},d)}function Me(e){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",e)}else{e()}}function Ne(e){nt(e);Le($.cursorX,$.cursorY,0,0,l,c)}function Oe(){$.show.type=undefined;$.element=undefined;Se()}function De(e){let t=e.target;let a=0;while(t&&a<5&&ze(t,e)===M){t=t.parentNode;a++}}function Pe(e){let t=this;if(t.hasWHTouchTooltip===true){return}let a=0;let i;while(t&&a<5&&(i=ze(t,e))===M){t=t.parentNode;a++}if(i===O){if($.touchElement){$.touchElement.removeAttribute("data-showing-touch-tooltip");$.touchElement.hasWHTouchTooltip=false}$.touchElement=t;$.touchElement.hasWHTouchTooltip=true;if(e.stopPropagation){e.stopPropagation()}if(e.preventDefault){e.preventDefault()}return false}}function ke(e,t,a){switch(t){case"awakened":case"buff":case"map":case"noimage":case"nomajor":case"notip":case"premium":case"pvp":case"sock":case"text":case"twcata":case"twmists":case"twtbc":case"twwod":case"twwotlk":e[t]=true;break;case"artk":case"board":case"c":case"class":case"covenant":case"crafting-quality":case"dd":case"ddsize":case"def":case"diff":case"diffnew":case"gem1lvl":case"gem2lvl":case"gem3lvl":case"glyph":case"ilvl":case"itemPower":case"itemType":case"level":case"lvl":case"mod":case"nlc":case"pwr":case"q":case"rand":case"rank":case"spec":case"spellModifier":case"stars":case"tink":case"upgrades":e[t]=parseInt(a);break;case"abil":case"affixes":case"alt":case"azerite-essence-powers":case"azerite-powers":case"bonus":case"crafted-stats":case"cri":case"ench":case"forg":case"gem1bonus":case"gem2bonus":case"gem3bonus":case"gems":case"know":case"mods":case"nodes":case"pcs":case"rewards":e[t]=a.split(":");break;case"build":case"domain":case"gender":case"who":e[t]=a;break;case"image":if(a==="premium"){e[a]=true}else{e[t]=a?"_"+a:""}break;case"transmog":if(a==="hidden"){e[t]=a}else{e[t]=parseInt(a)}break;case"when":e[t]=new Date(parseInt(a));break}}function xe(e,a){let i={dataEnv:WH.getDataEnv(),locale:Locale.getId()};let n;if(a){n=a.toLowerCase()}else if(e){n=e.toLowerCase().replace(/(?:^|\.)(staging|dev)$/,"")}if(n!==undefined){i.dataEnv=WH.dataEnv.MAIN;i.locale=0;let e=n.split(".");let a=WH.getLocaleFromDomain.L[e[0]];if(a){i.locale=a;e.shift()}if(e[0]){Object.values(WH.dataEnv).some((a=>{if([WH.dataEnvKey[a],t.getSelectorByDataEnv(a)].includes(e[0])){i.dataEnv=a;return true}}))}}if(!WH.isDataEnvActive(i.dataEnv)){i.dataEnv=WH.getRootEnv(i.dataEnv)}if([WH.dataEnv.BETA,WH.dataEnv.PTR,WH.dataEnv.PTR2].indexOf(i.dataEnv)>=0){i.locale=0}return i}function Be(t,a,n,s){switch(s.type){case i.AZERITE_ESSENCE_POWER:let r=e.getEntity(s.type,s.fullId,s.dataEnv,s.locale);if(s.params.spec&&!(s.params.know&&s.params.know.length)){st.getSpellsBySpec(s.params.spec,(function(e){t=t.replace(//g,(function(t,a){return WH.setTooltipSpells(r.data.embeds[a].tooltip,e,r.data.embeds[a].spells)}));n(t)}));break}else{t=t.replace(//g,(function(e,t){return WH.setTooltipSpells(r.data.embeds[t].tooltip,s.params.know,r.data.embeds[t].spells)}))}window.requestAnimationFrame(n.bind(null,t));break;case i.SPELL:if(s.params.spec&&!(s.params.know&&s.params.know.length)){st.getSpellsBySpec(s.params.spec,(function(e){t=WH.setTooltipSpells(t,e,a);n(t)}));break}window.requestAnimationFrame(n.bind(null,t));break;default:window.requestAnimationFrame(n.bind(null,t))}}function Fe(e,a,i,n,s){if(!$.elements.tooltip){let e=ee();$.elements.icon=e.icon;$.elements.logo=e.logo;let t=e.tooltip;t.style.left=t.style.top="-2323px";$.elements.tooltip=t;$.elements.tooltipTable=WH.gE(t,"table")[0];$.elements.tooltipTd=WH.gE(t,"td")[0];let a=ee(undefined,true).tooltip;a.style.left=a.style.top="-2323px";$.elements.tooltip2=a;$.elements.tooltipTable2=WH.gE(a,"table")[0];$.elements.tooltipTd2=WH.gE(a,"td")[0]}K($.elements.tooltip,e,a,s);K($.elements.tooltip2,e,a,s);let r=i===true?"fixed":"absolute";$.elements.tooltip.style.position=r;$.elements.tooltip2.style.position=r;let o=n||document.fullscreenElement||document.body;WH.ae(o,$.elements.tooltip);WH.ae(o,$.elements.tooltip2);let l=t.getByEnv(e);if(l!==t.get()){WH.Fonts.load(l)}}function Ue(){if($.elements.screen){$.elements.screen.style.display="block"}else{$.elements.screen=WH.ce("div",{id:"wowhead-tooltip-screen",className:"wowhead-tooltip-screen"});let e=WH.ce("a",{id:"wowhead-tooltip-screen-close",className:"wowhead-tooltip-screen-close",onclick:WH.Tooltips.clearTouchTooltip});$.elements.screenInnerWrapper=WH.ce("div",{id:"wowhead-tooltip-screen-inner-wrapper",className:"wowhead-tooltip-screen-inner-wrapper"});let t=WH.ce("div",{id:"wowhead-tooltip-screen-inner",className:"wowhead-tooltip-screen-inner"});$.elements.screenInnerBox=WH.ce("div",{id:"wowhead-tooltip-screen-inner-box",className:"wowhead-tooltip-screen-inner-box"});$.elements.screenCaption=WH.ce("div",{id:"wowhead-tooltip-screen-caption",className:"wowhead-tooltip-screen-caption"});WH.ae($.elements.screen,e);WH.ae(t,$.elements.screenInnerBox);WH.ae($.elements.screenInnerWrapper,t);WH.ae($.elements.screen,$.elements.screenInnerWrapper);WH.ae($.elements.screen,$.elements.screenCaption);WH.ae(document.body,$.elements.screen)}$.usingScreen=true;we()}function Ge(e,t,a,i){e=typeof e==="function"?e.call(i.target,i):e;if(typeof e==="string"){if(t===undefined&&e.length<30){t=true}let i=[];if(t){i.push(' class="no-wrap"')}if(a&&!isNaN(a)){i.push(' style="max-width:'+a+'px"')}if(i.length){e=`${e}`}}return e}function qe(t,a,s,r,o,l){var c=fe(t,a,l);let d=e.getEntity(t,c,s,r);if(d.status!==D&&d.status!==k){return}d.status=P;var f=le(t);if(f&&(parseInt(a,10)f.max)){e.register(t,a,s,r,{error:"ID is out of range"});return}if(!o){d.timer=setTimeout(et.bind(this,t,c,s,r),333)}var u=[];for(var p in l){switch(p){case"spec":if(t===i.SPELL||t===i.AZERITE_ESSENCE_POWER){break}case"abil":case"affixes":case"alt":case"artk":case"awakened":case"azerite-essence-powers":case"azerite-powers":case"board":case"bonus":case"build":case"class":case"covenant":case"crafted-stats":case"crafting-quality":case"dd":case"ddsize":case"def":case"diff":case"diffnew":case"ench":case"gem1bonus":case"gem1lvl":case"gem2bonus":case"gem2lvl":case"gem3bonus":case"gem3lvl":case"gems":case"gender":case"glyph":case"ilvl":case"itemPower":case"itemType":case"level":case"lvl":case"mod":case"mods":case"nlc":case"nodes":case"nomajor":case"pvp":case"q":case"rand":case"rank":case"rewards":case"sock":case"stars":case"tink":case"transmog":case"twcata":case"twmists":case"twtbc":case"twwod":case"twwotlk":case"upgrades":if(typeof l[p]==="object"){u.push(p+"="+l[p].join(":"))}else if(l[p]===true){u.push(p)}else{u.push(p+"="+l[p])}break}}u.push("dataEnv="+s);u.push("locale="+r);if(s===WH.dataEnv.PTR||s===WH.dataEnv.PTR2||s===WH.dataEnv.BETA){if(WH.getDataCacheVersion(s)!=="0"){u.push(WH.getDataCacheVersion(s))}}if(!st.isLoaded(t,s)){st.fetch(t,s)}if(t===i.ITEM&&l&&l.hasOwnProperty("lvl")&&!st.isLoaded(i.SPELL,s)){st.fetch(i.SPELL,s)}let h=u.length?"?"+u.join("&"):"";let g=WH.isDataEnvRestricted(WH.getDataEnv())||WH.isEntityRestricted(t)?ve():ve(n);let m=g+"/tooltip/"+de(t)+"/"+a+h;WH.xhrJsonRequest(m,function(t,a,i,n,s,r){if(!r){WH.error("Wowhead tooltips failed to load entity data.",ce(t)+" #"+a);return}else if(r.error){if(!G.includes(t)){WH.error("Wowhead tooltip request responded with an error.",r.error,ce(t)+" #"+a)}}e.register(t,i,n,s,r)}.bind(null,t,a,c,s,r))}function ze(a,n,r){if(n&&a.dataset&&a.dataset.simpleTooltip){if(!z&&!a.onmouseout){if(a.dataset.tooltipMode!=="attach"){a.onmousemove=Ne}a.onmouseout=Oe}Qe(a,a.dataset.simpleTooltip.length<30?'
'+a.dataset.simpleTooltip+"
":a.dataset.simpleTooltip);return O}if(a.nodeName!=="A"&&a.nodeName!=="AREA"){return M}var o=a.rel;try{if(a.dataset&&a.dataset.hasOwnProperty("wowhead")){o=a.dataset.wowhead}else if(a.getAttribute&&a.getAttribute("data-wowhead")){o=a.getAttribute("data-wowhead")}}catch(e){}let l=a.href;if(!l.length&&!o||o&&/^np\b/.test(o)||a.getAttribute("data-disable-wowhead-tooltip")==="true"||z&&a.getAttribute("data-disable-wowhead-touch-tooltip")==="true"){return N}if(/(?:^|\.)wow(?:classic)?db\.com$/.test(new URL(l).hostname)){return N}let c=/^https?:\/\/(?:[^/]+\.)?(classic|tbc)\.(?:[^/]+\.)?wowhead\.com\/talent-calc\/embed\/[^#]+/;let f=l.match(c);if(!f){f=l.match(/^https?:\/\/(?:[^/]+\.)?wowhead\.com\/(classic|tbc|wotlk)\/talent-calc\/embed\/[^#]+/)}if(WH.REMOTE&&f){let e=513;let t=750;if(f[1]==="tbc"){e+=120}else if(f[1]==="wotlk"){e+=517}let i=e/t*100+"%";a.parentNode.replaceChild(WH.ce("div",{style:{margin:"10px auto",maxHeight:e+"px",maxWidth:t+"px"},className:"wowhead-embed wowhead-embed-talent-calc"},WH.ce("div",{style:{height:0,paddingTop:i,position:"relative",width:"100%"}},WH.ce("iframe",{src:f[0],width:"100%",height:"100%",style:{border:0,left:0,position:"absolute",top:0,borderRadius:"6px"},sandbox:"allow-scripts allow-top-navigation"}))),a);return O}let p=/^https?:\/\/(?:[^/]+\.)?wowhead\.com\/soulbind-calc\/embed\/.+/;let h=l.match(p);if(WH.REMOTE&&h){a.parentNode.replaceChild(WH.ce("div",{style:{maxWidth:"734px",maxHeight:"1060px",margin:"10px auto"},className:"wowhead-embed wowhead-embed-soulbind-calc"},WH.ce("div",{style:{position:"relative",width:"100%",height:0,paddingTop:"144.5%"}},WH.ce("iframe",{src:h[0],width:"100%",height:"100%",style:{border:0,left:0,position:"absolute",top:0,borderRadius:"6px"},sandbox:"allow-scripts allow-top-navigation"}))),a);return O}if(WH.REMOTE){let e=/^https?:\/\/(?:[^/]+\.)?wowhead\.com\/(?:(?:ptr|ptr-2|beta)\/)?(?:\w\w\/)?talent-calc\/embed\/.+/;let t=l.match(e);if(t){a.parentNode.replaceChild(WH.ce("div",{style:{minHeight:"680px",position:"relative"},className:"wowhead-embed wowhead-embed-talent-calc"},WH.ce("div",{style:{width:"100%",height:0,paddingTop:"calc(55.555% + 200px)"}},WH.ce("iframe",{src:t[0],width:"100%",height:"100%",style:{border:0,left:0,position:"absolute",top:0,borderRadius:"6px"},sandbox:"allow-scripts allow-top-navigation"}))),a);return O}}let g=/^https?:\/\/(?:[^/]+\.)?wowhead\.com\/diablo-2\/skill-calc\/embed\/.+/;let m=l.match(g);if(WH.REMOTE&&m){a.parentNode.replaceChild(WH.ce("div",{style:{margin:"10px auto"},className:"wowhead-embed wowhead-embed-diablo-2-skill-calc"},WH.ce("div",{style:{position:"relative",width:"100%",height:0,paddingTop:"50%"}},WH.ce("iframe",{src:m[0],width:"100%",height:"100%",style:{border:0,left:0,position:"absolute",top:0,borderRadius:"6px"},sandbox:"allow-scripts allow-top-navigation"}))),a);return O}let W={};$.show.params=W;let b;let _;let A;let k;if(l.startsWith("https://")||l.startsWith("http://")){let e=l.match(L);if(!e){e=l.match(R)}if(e){b=e[1];_=e[2];A=e[3];k=l}else{C.some((e=>{let t=l.match(e.regexGuidePaths)||u[e.treeId].length&&(l.match(e.regexFrontPaths)||l.match(e.regexLegacyPaths));if(t){b=(t[1]?t[1]+".":"")+WH.getDataEnvKey(e.envId);_=(e.prefixedDetailPageNames.includes(t[2])?e.detailPagePrefix:"")+t[2];A=t[3];k=l}return!!t}))}$.show.hasLogo=false}if(o&&(!_||/\bignore-url\b/.test(o))){let e=[];C.forEach((t=>{if(t.prefixedDetailPageNames.length){e=e.concat(t.prefixedDetailPageNames.map((e=>t.detailPagePrefix+e)))}else{e=e.concat(u[t.treeId])}}));e=[...new Set(e)];let t=o.match(new RegExp("("+e.join("|")+").?(-?\\d+(?:\\.\\d+)?)"));if(t){_=t[1];A=t[2]}$.show.hasLogo=true}if(!_){return N}let x=w[_];if(z&&!r&&!_e(x)){return N}l.replace(y,((e,t,a)=>ke(W,t,a)||""));if(o){o.replace(y,((e,t,a)=>ke(W,t,a)||""))}if(W.gems&&W.gems.length>0){var U;for(U=Math.min(3,W.gems.length-1);U>=0;--U){if(parseInt(W.gems[U])){break}}++U;if(U===0){delete W.gems}else if(U0){for(U=Math.min(16,W[Y].length-1);U>=0;--U){if(parseInt(W[Y][U])){break}}++U;if(U===0){delete W[Y]}else if(U0){let e=[];for(let t=0;t0){var U,K=[],V;for(U=0;U0){W.alt=W.alt.map((e=>parseInt(e))).filter((e=>!isNaN(e)));if(W.alt.length===0){delete W.alt}}if(W.rewards&&W.rewards.length>0){var U;for(U=Math.min(3,W.rewards.length-1);U>=0;--U){if(/^\d+.\d+$/.test(W.rewards[U])){break}}++U;if(U===0){delete W.rewards}else if(Ua.parentNode?.classList.contains(e)))||a.dataset.whattach==="icon"||a.dataset.tooltipMode==="icon"){$.show.mode=S}else{if(z||a.dataset.whattach==="true"||a.dataset.tooltipMode==="attach"){$.show.mode=T}else if(!WH.REMOTE){var ee=a.parentNode;var ie=0;while(ee){if((ee.getAttribute&&ee.getAttribute("class")||"").indexOf("menu-inner")===0){$.show.mode=v;break}ie++;if(ie>9){break}ee=ee.parentNode}}}if(!z&&!a.onmouseout){if($.show.mode===H){a.onmousemove=Ne}a.onmouseout=Oe}if($.show.mode===H&&a.dataset.whtticon==="false"){$.show.mode=E}if(!WH.REMOTE&&!a.whContextMenuAttached){a.whContextMenuAttached=true;WH.aE(a,"contextmenu",Ce.bind(a,J,X,x,_,A,W,k))}if(n){$.initiatedByUser=true;nt(n);$.showingTooltip=true;te(x,A,J,X,W)}if(n||!We()){return O}let ne=e.getEntity(x,fe(x,A,W),J,X);var se=[];if(me("renameLinks")&&a.getAttribute("data-wh-rename-link")!=="false"||a.getAttribute("data-wh-rename-link")==="true"){se.push((function(){delete a.dataset.whIconAdded;a.innerHTML=""+ne.data.name+""}))}var re=a.getAttribute("data-wh-icon-size");if((re||me("iconizeLinks"))&&d.includes(x)){if(!re){re=me("iconSize")}se.push((function(){if(ae(ne.data)&&a.dataset.whIconAdded!=="true"){Ie(a,x,ne.data,re)}}))}if(me("colorLinks")){switch(t.getByEnv(J)){case t.D4:se.push((()=>{if(ne.data.quality!=null){j(a,["d4-q"+ne.data.quality])}}));break;case t.DI:switch(x){case i.DI_EQUIP_ITEM:case i.DI_MISC_ITEM:se.push((()=>{if(ne.data.inventoryColor!=null){j(a,["di-ic"+ne.data.inventoryColor])}if(ne.data.dropRank!=null){j(a,["q"+ne.data.dropRank])}}));break;case i.DI_SET:se.push((()=>{if(ne.data.inventoryColor!=null){j(a,["di-ic"+ne.data.inventoryColor])}}));break}break;case t.WOW:se.push((()=>{if(ne.data.quality!=null&&ne.data.quality>-1){j(a,["q"+ne.data.quality])}}));break}}if(se.length){if(ne.status===D||ne.status===P){ne.callbacks=ne.callbacks.concat(se);if(ne.status===D){qe(x,A,J,X,true,W)}}else if(ne.status===B||ne.status===F){while(se.length){se.shift()()}}}return O}function $e(t,a,i,n){$.elements.tooltip.style.width="550px";$.elements.tooltip.style.left="-2323px";$.elements.tooltip.style.top="-2323px";$.elements.tooltip.className="wowhead-tooltip";if(t.nodeName){WH.ee($.elements.tooltipTd);WH.ae($.elements.tooltipTd,t)}else{if($.elements.tooltip.dataset.game==="wow"){t=e.evalFormulas(t)}$.elements.tooltipTd.innerHTML=t}$.elements.tooltip.style.display="";Ve($.elements.tooltip,true);ie($.elements.tooltip,true);if(a){$.showSecondary=true;$.elements.tooltip2.style.width="550px";$.elements.tooltip2.style.left="-2323px";$.elements.tooltip2.style.top="-2323px";if(a.nodeName){WH.ee($.elements.tooltipTd2);WH.ae($.elements.tooltipTd2,a)}else{$.elements.tooltipTd2.innerHTML=e.evalFormulas(a)}$.elements.tooltip2.style.display="";ie($.elements.tooltip2,true)}else{$.showSecondary=false}if(WH.Device.isTouch()){let e=$.showSecondary?$.elements.tooltipTd2:$.elements.tooltipTd;let t=WH.ce("a");t.href="javascript:";t.className="wowhead-touch-tooltip-closer";t.onclick=WH.Tooltips.clearTouchTooltip;WH.ae(e,t)}$.elements.tooltipTable.style.display=t==""?"none":"";Q(i,n);se("show")}function je(e,t,a){Ke($.elements.icon,e?{icon:e}:undefined,t,a)}function Ye(e){let t;if(e.showIcon!==false){if(ae(e.entity)){t=e.entity}else if(e.iconName){t={icon:e.iconName}}}Ke($.elements.icon,t,e.type,e.dataEnv)}function Ke(e,t,a,i){WH.ee(e);if(f[a]?.embeddedIcons){t=undefined}if(ae(t)){WH.ae(e,WH.Icon.createByEntity(t,a,null,{dataEnv:i,size:WH.Icon.MEDIUM}));e.style.visibility="visible";$.showIcon=true}else{e.style.visibility="hidden";$.showIcon=false}}function Ve(e,t){if(t){e.setAttribute("data-visible","yes");e.style.visibility="visible"}else{e.setAttribute("data-visible","no");e.style.visibility="hidden"}}function Qe(e,t,a,i){if(t==null||!$.enabled){return}i=i||{};if(!i.padX||i.padX<1)i.padX=1;if(!i.padY||i.padY<1)i.padY=1;if(a){t=it(t,a)}let n=e.getBoundingClientRect();Fe(i.dataEnv,i.type,WH.isElementPositionFixedOrSticky(e),undefined,i.status);Ye(i);$e(t,i.finalContent2,i.image,i.imageClass);Le(n.left+window.scrollX,n.top+window.scrollY,n.width,n.height,i.padX,i.padY)}function Je(e,t,a,i){if(t==null||!$.enabled){return}i=i||{};if(!i.padX||i.padX<10)i.padX=10;if(!i.padY||i.padY<10)i.padY=10;if(a){t=it(t,a);if(i.finalContent2){i.finalContent2=it(i.finalContent2,a)}}Fe(i.dataEnv,i.type,e.target&&WH.isElementPositionFixedOrSticky(e.target),undefined,i.status);Ye(i);$e(t,i.finalContent2,i.image,i.imageClass);Le(e.pageX,e.pageY,0,0,i.padX||0,i.padY||0)}function Xe(e,t,a,i){if(e==null||!$.enabled){return}i=i||{};Fe(i.dataEnv,i.type,i.fixedPosition,undefined,i.status);Ye(i);$e(e,i.finalContent2,i.image,i.imageClass);Le(t,a,0,0,i.padX||0,i.padY||0)}function Ze(e,t,a){WH.Tooltips.clearTouchTooltip(true);if(t==null||!$.enabled){return}a=a||{};Ue();WH.ee($.elements.screenCaption);let i=WH.ce("a",{innerHTML:WH.isRemote()?"Tap Link":WH.TERMS.taplink,onclick:function(e,t){e.setAttribute("data-disable-wowhead-tooltip","true");if(e.fireEvent){e.fireEvent("on"+t)}else if(typeof MouseEvent=="function"){e.dispatchEvent(new MouseEvent(t,{bubbles:true,cancelable:true}))}else{let a=document.createEvent("Events");a.initEvent(t,true,true);e.dispatchEvent(a)}if(e){e.removeAttribute("data-disable-wowhead-tooltip")}WH.Tooltips.clearTouchTooltip()}.bind(null,e,"click")});let n=WH.ce("i",{className:"fa fa-hand-o-up"});WH.aef(i,n);WH.ae($.elements.screenCaption,i);Fe(a.dataEnv,a.type,false,$.elements.screenInnerBox,a.status);Ye(a);$e(t,a.finalContent2,a.image,a.imageClass);Le()}function et(t,a,i,n){if($.show.type===t&&$.show.fullId===a&&$.show.dataEnv===i&&$.show.locale===n){tt(P,n,ge(n,"loading"));let s=e.getEntity(t,a,i,n);s.timer=setTimeout(Ae.bind(this,t,a,i,n),3850)}}function tt(t,n,s,r,d,f,u,h,W,b){ye();if(!$.initiatedByUser){return}if($.element){if($.element._fixTooltip){s=$.element._fixTooltip(s,$.show.type,$.show.fullId,$.element)}if($.element._fixTooltip2){h=$.element._fixTooltip2(h,$.show.type,$.show.fullId,$.element)}}if(!s){s=ge(n,"notFound").replace("%s",ce($.show.type));t=x;d=a.UNKNOWN}else if($.show.params){let e=$.show.params;if(WH.reforgeStats&&e.forg&&WH.reforgeStats[e.forg]){var y=WH.reforgeStats[e.forg];var w=[y.i1];for(var _ in WH.individualToGlobalStat){if(WH.individualToGlobalStat[_]===w[0]){w.push(_)}}var A;if((A=s.match(new RegExp("(\x3c!--(stat|rtg)("+w.join("|")+")--\x3e)[+-]?([0-9]+)")))&&!s.match(new RegExp("\x3c!--(stat|rtg)"+y.i2+"--\x3e[+-]?[0-9]+"))){var L=Math.floor(A[4]*y.v),R=p.traits[y.s2][0];if(y.i2==6){s=s.replace("\x3c!--rs--\x3e","
+"+L+" "+R)}else{s=s.replace("\x3c!--rr--\x3e",WH.sprintfGlobal(g.genericequip_tip,R.toLowerCase(),y.i2,L))}s=s.replace(A[0],A[1]+(A[4]-L));s=s.replace("\x3c!--rf--\x3e",''+WH.sprintfGlobal(g.reforged_format,L,p.traits[y.s1][2],p.traits[y.s2][2])+"
")}}if(e.spec){s=WH.Tooltips.parseItemEffectTooltipForSpec(s,e.spec)}if(e.pcs&&e.pcs.length){var C=0;for(var _=0,M=e.pcs.length;_\x3c!--si([0-9]+:)*"+e.pcs[_]+"(:[0-9]+)*--\x3e"+'(.+?)');if(A=s.match(N)){let t=!isNaN(parseInt($.show.locale))?m[$.show.locale]:"enus";var O=WH.isSet("g_items")&&g_items[e.pcs[_]]?g_items[e.pcs[_]]["name_"+t]:A[4];let a=WH.REMOTE?"javascript:":WH.Entity.getUrl(WH.Types.ITEM,A[3]);var D=''+O+"";var P='\x3c!--si'+e.pcs[_]+"--\x3e"+D+"";s=s.replace(A[0],P);++C}}if(C>0){s=s.replace("(0/","("+C+"/");s=s.replace(new RegExp("\\(([0-"+C+"])\\)","g"),'($1)')}}if(e.know&&e.know.length){s=WH.setTooltipSpells(s,e.know,u)}if(e.lvl&&!e.ilvl){s=WH.setTooltipLevel(s,e.lvl?e.lvl:WH.getWowMaxLevel(),e.buff)}let t=[];if(e.spellModifier){t.push(e.spellModifier)}if(e.covenant){t.push(o[e.covenant])}if(t.length){s=WH.setTooltipSpells(s,t,u)}if(e.who&&e.when){s=s.replace("

",'

'+WH.sprintf(ge(n,"achievementComplete"),e.who,e.when.getMonth()+1,e.when.getDate(),e.when.getFullYear())+"

");s=s.replace(/class="q0"/g,'class="r3"')}if(e.notip&&W){s="";d=undefined}if($.show.type===i.BATTLE_PET_ABILITY&&e.pwr){s=s.replace(/(\d+)/g,(function(t,a){return Math.floor(parseInt(a)*(1+.05*e.pwr))}))}if($.show.type===i.ACHIEVEMENT&&e.cri){for(var _=0;_$&')}}}if($.showCharacterCompletion&&window.g_user&&(WH.isRetailTree($.show.dataEnv)&&g_user.lists||!WH.isRetailTree($.show.dataEnv)&&g_user.characterProfiles&&g_user.characterProfiles.length)){var k="";let a=WH.isRetailTree($.show.dataEnv)?WH.User.Completion.getByType($.show.type):false;let n=e.getEntity($.show.type,$.show.fullId,$.show.dataEnv,$.show.locale);if(a&&$.show.type===i.QUEST){if(t!==B||n.worldquesttype||n.daily||n.weekly){a=false}}let r=!(a&&$.show.type in g_completion_categories&&WH.inArray(g_completion_categories[$.show.type],n.completion_category)===-1);let o=/^-?\d+(?:\.\d+)?/.exec($.show.fullId);o=o&&o.length?o[0]:$.show.fullId;if(a){for(var F in g_user.lists){var U=g_user.lists[F];if(!(U.id in a)){continue}let e=WH.inArray(a[U.id],o)!==-1;if(!e&&!r){continue}k+='
';k+=U.character+" - "+U.realm+" "+U.region}}if(!WH.isRetailTree($.show.dataEnv)&&$.show.type===i.QUEST){for(var G,_=0;G=g_user.characterProfiles[_];_++){let e=WH.inArray(G.quests,o)!==-1;if(!e&&!r){continue}k+='
0){k+='
';k+=e.character+" - "+e.realm+" "+e.region}}))}if(k!==""){s+='
'+WH.TERMS.completion+":"+k}}if(!WH.REMOTE&&[i.TRANSMOG_SET,i.ITEM_SET].includes($.show.type)&&typeof WH.getPreferredTransmogRace!=="undefined"){let e=WH.getPreferredTransmogRace();let t=e.race;let a=e.gender-1;let n=WH.ce("div",{innerHTML:s});let r=WH.qs("picture",n);if(r){if(r.dataset.requiredRace&&!$.element.dataset.tooltipIgnoreRequiredRace){t=r.dataset.requiredRace}let e=$.show.type===i.ITEM_SET?WH.Wow.ItemSet:WH.Wow.TransmogSet;r.parentNode.replaceChild(WH.ce("img",{src:e.getThumbUrl($.show.fullId,t,a,$.show.dataEnv),width:260,height:440,style:{display:"block",margin:"0 auto"}}),r);s=n.innerHTML}}if(!WH.REMOTE&&s&&($.show.params.diff||$.show.params.diffnew||$.show.params.noimage)){W="";b=""}s=s.replace("http://","https://");if($.show.params.map&&f&&f.getMap){h=f.getMap()}let q=function(e,t,a){if($.show.type!==t.type||$.show.fullId!==t.fullId||$.show.dataEnv!==t.dataEnv||$.show.locale!==t.locale||$.show.params!==t.params){return}switch($.show.mode){case I:Ze($.element,a,{dataEnv:t.dataEnv,entity:r,iconName:d,image:W,imageClass:b,showIcon:true,status:e,finalContent2:h,type:t.type});break;case S:Qe($.element,a,undefined,{dataEnv:t.dataEnv,entity:r,image:W,imageClass:b,showIcon:false,status:e,finalContent2:h,type:t.type});break;case T:Qe($.element,a,undefined,{dataEnv:t.dataEnv,entity:r,iconName:d,image:W,imageClass:b,showIcon:true,status:e,finalContent2:h,type:t.type});break;case v:Qe($.element,a,undefined,{dataEnv:t.dataEnv,entity:r,iconName:d,showIcon:true,finalContent2:h,type:t.type});break;case E:Xe(a,$.cursorX,$.cursorY,{dataEnv:t.dataEnv,entity:r,fixedPosition:WH.isElementPositionFixedOrSticky($.element),image:W,imageClass:b,padX:l,padY:c,showIcon:false,status:e,finalContent2:h,type:t.type});break;case H:default:Xe(a,$.cursorX,$.cursorY,{dataEnv:t.dataEnv,entity:r,fixedPosition:WH.isElementPositionFixedOrSticky($.element),iconName:d,image:W,imageClass:b,padX:l,padY:c,showIcon:true,status:e,finalContent2:h,type:t.type})}if(WH.REMOTE&&$.elements.logo){$.elements.logo.style.display=$.show.hasLogo?"block":"none"}};let z={type:$.show.type,fullId:$.show.fullId,dataEnv:$.show.dataEnv,locale:$.show.locale,params:$.show.params};Be(s,u,q.bind(this,t,z),z)}function at(){let t=e.getEntity($.show.type,$.show.fullId,$.show.dataEnv,$.show.locale);if(G.includes($.show.type)&&!t.data[Te()]){Oe();return}let a=t.data[pe($.show.params["image"])];let i=t.data["image"+$.show.params["image"]+"_class"];let n=he($.show.type,$.show.fullId,$.show.dataEnv);if(n){a=n[0];i=n[1]}tt(t.status,$.show.locale,t.data[Te()],t.data,t.data[ue()],t.data.map,t.data[Ee()],t.data[Te(2)],a,i)}function it(e,t){let a=WH.ce("div",{className:t});if(typeof e==="string"){a.innerHTML=e}else{WH.ae(a,e)}return a}function nt(e){$.cursorX=e.pageX;$.cursorY=e.pageY}window.Locale=window.Locale||{getId:function(){return 0},getName:function(){return"enus"}};let st=new function(){const e=this;let t={loadedData:{}};var a={};var s={};var r={};var o={};this.fetch=function(e,t){if(!o.hasOwnProperty(e)||o[e].hasOwnProperty(t)){return}o[e][t]=P;a[e][t]=[];let i;if(WH.REMOTE){i=ve(n)+s[e]}else{i=WH.Url.getDataPageUrl(s[e].replace("/data/",""))}i+="&json";WH.xhrJsonRequest(i,function(e,t,a){if(!a){WH.error("Wowhead tooltips failed to load entity scaling data.",ce(e));return}st.setData(e,t,a)}.bind(null,e,t))};this.getDataByKey=(e,a)=>(t.loadedData[e]||{})[a];this.getSpellsBySpec=function(e,t){let a=$.show.dataEnv||WH.getDataEnv();this.registerCallback(i.PLAYER_CLASS,a,(function(){var n=r[i.PLAYER_CLASS][a];var s=[];if(n.specMap.hasOwnProperty(e)){s=n["class"][n.specMap[e]].concat(n.spec[e]||[])}t(s)}))};this.isLoaded=function(e,t){if(!o.hasOwnProperty(e)){return true}if(o[e][t]===B){c();return true}return false};this.registerCallback=function(t,i,n){if(e.isLoaded(t,i)){window.requestAnimationFrame(n);return}if(!a[t].hasOwnProperty(i)){e.fetch(t,i)}a[t][i].push(n)};this.setData=function(e,t,i){o[e][t]=B;a[e][t]=a[e][t]||[];r[e][t]=i;c();let n=a[e][t];while(n.length){n.shift()()}};function l(){s[i.ITEM]="/data/item-scaling";s[i.SPELL]="/data/spell-scaling";s[i.PLAYER_CLASS]="/data/spec-spells";for(var e in s){if(!s.hasOwnProperty(e)){continue}o[e]={};a[e]={};r[e]={}}}function c(){let e=$.show.dataEnv||WH.getDataEnv();let a=r[i.ITEM][e];if(a){t.loadedData[i.ITEM]=a;WH.staminaFactor=a.staminaByIlvl;WH.convertRatingToPercent.RM=a.ratingsToPercentRM;WH.convertRatingToPercent.LT=a.ratingsToPercentLT;WH.convertScalingFactor.SV=a.itemScalingValue;WH.convertScalingFactor.SD=a.scalingFactors;WH.curvePoints=a.curvePoints;WH.applyStatModifications.ScalingData=a.scalingData;WH.contentTuningLevels=a.contentTuningLevels}let n=r[i.SPELL][e];if(n){t.loadedData[i.SPELL]=n;WH.convertScalingSpell.SV=n.scalingValue;WH.convertScalingSpell.SpellInformation=n.spellInformation;WH.convertScalingSpell.RandPropPoints=n.randPropPoints}}l()};be()};window.$WowheadPower=new function(){if(!WH.REMOTE){this.attachTouchTooltips=WH.Tooltips.attachTouchTooltips;this.disableCompletion=WH.Tooltips.disableCompletion;this.onScalesAvailable=WH.Tooltips.onScalesAvailable;this.replaceWithTooltip=WH.Tooltips.replaceWithTooltip;this.request=WH.Tooltips.request;this.triggerTooltip=WH.Tooltips.triggerTooltip;this.getEntity=WH.Tooltips.getEntity;this.register=WH.Tooltips.register}this.refreshLinks=WH.Tooltips.refreshLinks;this.setScales=WH.Tooltips.setScales};WH.Tooltip=new function(){if(!WH.REMOTE){this.addTooltipText=WH.Tooltips.addText;this.cursorUpdate=WH.Tooltips.cursorUpdate;this.isVisible=WH.Tooltips.isVisible;this.showFadingTooltipAtCursor=WH.Tooltips.showFadingTooltipAtCursor;this.simple=WH.Tooltips.attach;this.simpleNonTouch=WH.Tooltips.attachNonTouch;this.finalizeSizeAndReveal=WH.Tooltips.finalizeSizeAndReveal;this.hide=WH.Tooltips.hide;this.prepare=WH.Tooltips.prepare;this.setIcon=WH.Tooltips.setIcon;this.show=WH.Tooltips.show;this.showAtCursor=WH.Tooltips.showAtCursor;this.showAtPoint=WH.Tooltips.showAtPoint;this.showInScreen=WH.Tooltips.showInScreen}};WH.WebP=new function(){const e=this;var t=10;var a={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};this.feature=Object.freeze({lossy:"lossy",lossless:"lossless",alpha:"alpha",animation:"animation"});const i={bodyFrameWaitCount:0,supports:{lossy:undefined,lossless:undefined,alpha:undefined,animation:undefined}};this.getImageExtension=function(){return i.supports.alpha?".webp":".png"};this.supportsFeature=function(e,t){if(typeof i.supports[e]==="boolean"){requestAnimationFrame((function(){t(e,i.supports[e])}));return}var n=new Image;n.onload=function(){var a=n.width>0&&n.height>0;i.supports[e]=a;t(e,a)};n.onerror=function(){i.supports[e]=false;t(e,false)};n.src="data:image/webp;base64,"+a[e]};function n(){e.supportsFeature(e.feature.alpha,(function(e,t){s(t)}))}function s(e){if(!document.body){if(i.bodyFrameWaitCount>t){window.addEventListener("DOMContentLoaded",s.bind(this,e));return}i.bodyFrameWaitCount++;requestAnimationFrame(s.bind(this,e));return}document.body.classList.add(e?"webp":"no-webp");document.body.dataset.whWebp=JSON.stringify(e)}n()};WH.DI.GeneralItem=new function(){this.GRID_TYPE_1x1=1;this.GRID_TYPE_2x1=2};WH.DI.UiImage=function(e){const t=this;const a=WH.WebP;const i="/di/ui/";const n={baseName:""};this.getBaseName=function(){return n.baseName};this.getSubDirectory=function(){let e="";let t=n.baseName.split("_");while(t.length>1){let a=t.shift();if(/\d/.test(a)){break}e+=a+"/"}return e};this.getUrl=function(){return[WH.STATIC_URL,i,t.getSubDirectory(),t.getBaseName(),a.getImageExtension()].join("")};function s(e){n.baseName=e}s.apply(this,arguments)};