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,sBAAsB,CAAC,CAAC;AAC5B,CAAC,CAAC,C","sources":["webpack://schaffrath-sfcc/./src/app_schaffrath/cartridges/app_base/cartridge/client/default/js/components/leadanizer.js"],"sourcesContent":["'use strict';\n\n/**\n* Injects the Leadanizer script into the current webpage.\n* This function creates a new script element with the source set to the Leadanizer\n* configuration URL and appends it to the document's head. The script is loaded\n* asynchronously to avoid blocking the page rendering.\n*\n* The script is identified by the ID \"leadanizer\" and is associated with the\n* Leadanizer ID \"schaffrath\". This setup is used for integrating the Leadanizer\n* funnel configuration into the webpage.\n*/\nfunction injectLeadanizerScript() {\n window.__be = window.__be || {};\n const leadanizerID = \"schaffrath\";\n\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.src = 'https://www.ldnzr.de/schaffrath/funnelconfig.js';\n script.setAttribute('id', 'leadanizer');\n\n const scriptElement = document.querySelector('script[src$=\"leadanizer.js\"]');\n const isPageWhiteListed = scriptElement.getAttribute('data-is-page-whitelisted');\n\n if (isPageWhiteListed && isPageWhiteListed !== 'false') {\n const htmlElement = document.documentElement;\n htmlElement.classList.add('leadanizer-on');\n }\n\n const head = document.getElementsByTagName('head')[0];\n head.appendChild(script);\n\n const div = document.createElement('div');\n div.id = 'appointmentData';\n div.style.display = 'none';\n div.textContent = 'appointmentData:vk=alle&doi=no';\n document.body.appendChild(div);\n}\n\ndocument.addEventListener('DOMContentLoaded', function () {\n injectLeadanizerScript();\n});\n"],"names":["injectLeadanizerScript","window","__be","leadanizerID","script","document","createElement","type","async","src","setAttribute","scriptElement","querySelector","isPageWhiteListed","getAttribute","htmlElement","documentElement","classList","add","head","getElementsByTagName","appendChild","div","id","style","display","textContent","body","addEventListener"],"sourceRoot":""}