{"version":3,"names":["ITEMS","href","text","newTab","STORAGE_KEY","getNextItem","idx","Number","sessionStorage","getItem","isFinite","item","length","setItem","String","renderItemHtml","targetAttr","renderCallouts","makeBox","key","extraClass","div","document","createElement","className","trim","setAttribute","innerHTML","listContainer","querySelector","prepend","postStream","before","suggested","querySelectorAll","forEach","article","num","getAttribute","next","nextElementSibling","matches","insertAdjacentElement","rows","row","pos","tr","td","colSpan","appendChild","start","observer","MutationObserver","observe","body","childList","subtree","readyState","addEventListener"],"sources":["theme-8-inline-common-head_tag.js"],"sourcesContent":["\n  (function () {\n    const ITEMS = [\n      {\n        href: \"https://backtesting.club/\",\n        text: \"▶️ Not seeing the trading results you hoped for? Join the Backtesting Club and let's turn things around together! 💪\",\n        newTab: true\n      },\n      {\n        href: \"https://backtesting.club/why-sierra-chart-is-the-best-choice-for-manually-backtesting-traders/\",\n        text: \"▶️️ Why Sierra Chart is the Best Choice for Manually Backtesting Traders\",\n        newTab: true\n      },\n      {\n        href: \"https://backtesting.club/how-to-backtest-a-trading-strategy/\",\n        text: \"▶️ How to Backtest a Trading Strategy in 2027 - The Ultimate Guide to Automated and Manual Backtesting\",\n        newTab: true\n      },\n      {\n        href: \"https://discord.gg/CtnEnuYzHa\",\n        text: \"▶️ Don't trade alone—join our free Discord!\",\n        newTab: true\n      },\n      {\n        href: \"https://backtesting.club/how-to-backtest-a-trading-strategy-on-ninjatrader/\",\n        text: \"▶️ How to Backtest a Trading Strategy on NinjaTrader\",\n        newTab: true\n      },\n      {\n        href: \"https://backtesting.club/backtesting-software-comparison/\",\n        text: \"⚖️ Best Backtesting Software Compared: Which One Should You Choose?\",\n        newTab: true\n      },\n      {\n        href: \"https://backtesting.club/google-sheets-trading-journal/\",\n        text: \"📕 Need to log your trades manually? Try the most advanced trading journal on the market.\",\n        newTab: true\n      },\n      {\n        href: \"https://backtesting.club/sierra-chart-mastery-course/\",\n        text: \"🖥️ Master the professional trading platform Sierra Chart—and trade or backtest any market, any way you want.\",\n        newTab: true\n      }\n    ];\n\n    const STORAGE_KEY = \"community_callout_rotate_idx\";\n\n    function getNextItem() {\n      let idx = Number(sessionStorage.getItem(STORAGE_KEY) || \"0\");\n      if (!Number.isFinite(idx) || idx < 0) {\n        idx = 0;\n      }\n      const item = ITEMS[idx % ITEMS.length];\n      sessionStorage.setItem(STORAGE_KEY, String((idx + 1) % ITEMS.length));\n      return item;\n    }\n\n    function renderItemHtml(item) {\n      const targetAttr = item.newTab ? ` target=\"_blank\" rel=\"noopener\"` : \"\";\n      return `<a href=\"${item.href}\"${targetAttr}>${item.text}</a>`;\n    }\n\n    function renderCallouts() {\n      const makeBox = (key, extraClass = \"\") => {\n        const item = getNextItem();\n        const div = document.createElement(\"div\");\n        div.className = `community-callout ${extraClass}`.trim();\n        div.setAttribute(\"data-callout-key\", key);\n        div.innerHTML = renderItemHtml(item);\n        return div;\n      };\n\n      // 1. Topic list top (nad seznamem témat)\n      const listContainer = document.querySelector(\".list-container\");\n      if (listContainer && !document.querySelector('[data-callout-key=\"list-top\"]')) {\n        listContainer.prepend(makeBox(\"list-top\"));\n      }\n\n      // 2. Topic above post stream (nad proudem příspěvků)\n      const postStream = document.querySelector(\".post-stream\");\n      if (postStream && !document.querySelector('[data-callout-key=\"above-stream\"]')) {\n        postStream.before(makeBox(\"above-stream\"));\n      }\n\n      // 3. Topic above suggested (nad doporučenými tématy)\n      const suggested = document.querySelector(\"#suggested-topics\");\n      if (suggested && !document.querySelector('[data-callout-key=\"above-suggested\"]')) {\n        suggested.before(makeBox(\"above-suggested\"));\n      }\n\n      // 4. Between posts (za každým 5. příspěvkem)\n      document.querySelectorAll(\"article[data-post-number]\").forEach((article) => {\n        const num = Number(article.getAttribute(\"data-post-number\"));\n        const next = article.nextElementSibling;\n        if (num > 0 && num % 5 === 0 && (!next || !next.matches('[data-callout-key=\"between-posts\"]'))) {\n          article.insertAdjacentElement(\"afterend\", makeBox(\"between-posts\"));\n        }\n      });\n\n      // 5. Between topics (za každým 6. řádkem tématu v tabulce)\n      const rows = document.querySelectorAll(\"tbody.topic-list-body tr.topic-list-item\");\n      rows.forEach((row, idx) => {\n        const pos = idx + 1;\n        const next = row.nextElementSibling;\n        if (pos % 6 === 0 && (!next || !next.matches('[data-callout-key=\"between-topics\"]'))) {\n          const item = getNextItem();\n          const tr = document.createElement(\"tr\");\n          tr.className = \"community-callout-row\";\n          tr.setAttribute(\"data-callout-key\", \"between-topics\");\n          const td = document.createElement(\"td\");\n          td.colSpan = 10;\n          td.innerHTML = `<div class=\"community-callout\">${renderItemHtml(item)}</div>`;\n          tr.appendChild(td);\n          row.insertAdjacentElement(\"afterend\", tr);\n        }\n      });\n    }\n\n    const start = () => {\n      renderCallouts();\n      const observer = new MutationObserver(() => {\n        renderCallouts();\n      });\n      observer.observe(document.body, { childList: true, subtree: true });\n    };\n\n    if (document.readyState === \"loading\") {\n      document.addEventListener(\"DOMContentLoaded\", start);\n    } else {\n      start();\n    }\n  })();\n"],"mappings":"AACE,CAAC,YAAY;EACX,MAAMA,KAAK,GAAG,CACZ;IACEC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,sHAAsH;IAC5HC,MAAM,EAAE;EACV,CAAC,EACD;IACEF,IAAI,EAAE,gGAAgG;IACtGC,IAAI,EAAE,0EAA0E;IAChFC,MAAM,EAAE;EACV,CAAC,EACD;IACEF,IAAI,EAAE,8DAA8D;IACpEC,IAAI,EAAE,wGAAwG;IAC9GC,MAAM,EAAE;EACV,CAAC,EACD;IACEF,IAAI,EAAE,+BAA+B;IACrCC,IAAI,EAAE,6CAA6C;IACnDC,MAAM,EAAE;EACV,CAAC,EACD;IACEF,IAAI,EAAE,6EAA6E;IACnFC,IAAI,EAAE,sDAAsD;IAC5DC,MAAM,EAAE;EACV,CAAC,EACD;IACEF,IAAI,EAAE,2DAA2D;IACjEC,IAAI,EAAE,qEAAqE;IAC3EC,MAAM,EAAE;EACV,CAAC,EACD;IACEF,IAAI,EAAE,yDAAyD;IAC/DC,IAAI,EAAE,2FAA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