(({window:e,document:t,googletag:n})=>{const o={},r=(e,t)=>{t&&(n.pubads().setTargeting(e,t),o[e]=t)},c=e=>Object.entries(e).forEach(([e,t])=>r(e,t));n?.cmd&&n.cmd.push(async()=>{const n=(()=>{let e=t.currentScript;return e?.dataset?.pub?e.dataset.pub:(e=t.querySelector("script[data-pub]"),e?.dataset?.pub?e.dataset.pub:void 0)})();r("WY_PUB",n);const i=encodeURIComponent(e.location.href);await fetch(`https://api.elevate14r.com/int?pub=${n}&ref=${i}`,{credentials:"include"}).then(e=>e.json()).then(t=>{if(c({WY_SYMBOL:t.symbol,WY_SYMBOL_FOUND:t.symbol?"Y":"N",WY_GROUPS:t.in?.join("/")||null,WY_V:t.vTrigger,WY_VC:t.vChg}),t.recent?.length){const e=Array.isArray(t.inRecent)?t.inRecent:Object.keys(t.inRecent||{});c({WY_RECENT:t.recent[0],WY_RGROUPS:e.join("/"),WY_RQ:t.recent.join("/")})}c(Object.fromEntries(t.in?.map(e=>[`WY_SYMBOL_${e.toUpperCase()}`,"Y"])||[])),Array.isArray(t.inRecent)?c(Object.fromEntries(t.inRecent.map(e=>[`WY_R${e.toUpperCase()}`,"Y"]))):c(Object.fromEntries(Object.entries(t.inRecent).map(([e,t])=>[`WY_R${e.toUpperCase()}`,t]))),r("WY_ARRAY",Object.entries(o).map(([e,t])=>`${e}:${t}`).join("|")),e.$show_wy=()=>console.log(o)})})})({window:window,document:document,googletag:googletag});
