var __riqLogs = { info: [], debug: [], timings: [] }; var ts = [];ts.push({"timeStamp": "1748317450", "line": 6});ts.push({"timeStamp": "1748317450", "line": 24});function storageAvailable(type) { var storage; try { storage = window[type]; var x = "__storage_test__"; storage.setItem(x, x); storage.removeItem(x); return true; } catch (e) { return ( e instanceof DOMException && // everything except Firefox (e.code === 22 || // Firefox e.code === 1014 || // test name field too, because code might not be present // everything except Firefox e.name === "QuotaExceededError" || // Firefox e.name === "NS_ERROR_DOM_QUOTA_REACHED") && storage && storage.length !== 0 ); } }ts.push({"timeStamp": "1748317450", "line": 417});ts.push({"timeStamp": "1748317450", "line": 419});window.Responseiq = { CallbackWidget: {}, CallTracking: {} };function failsafeJsonParse(value, failsafeReturnValue) { var tmp = failsafeReturnValue ? failsafeReturnValue : {}; try { tmp = JSON.parse(value); } catch (err) {} return tmp; } function fetchRiqData() { return typeof localStorage !== "undefined" && localStorage && localStorage.getItem ? failsafeJsonParse(localStorage.getItem("__riq"), "{}") : null; }function createInstallationCode(visitorSession) { var args = Object.keys(visitorSession).map(function(key) { return encodeURIComponent(key) + "=" + encodeURIComponent(visitorSession[key]); }); var queryString = args.join("&"); if (queryString === "") { return "https://app.responseiq.com/widgetsrc.php?noiframecontainerContainer=true&cwInjectScript=1&widget=9OC54XGOV9DO&widgetrnd=Math.random();"; } else { return "https://app.responseiq.com/widgetsrc.php?noiframecontainerContainer=true&cwInjectScript=1&widget=9OC54XGOV9DO&widgetrnd=Math.random();&" + queryString; } } // NOTE: See https://stackoverflow.com/a/21712356 on how to detect all IE browsers separately // (including Edge). We only support IE11, so the stripped code below will work fine: function checkForIE11() { return window.navigator.userAgent.indexOf("Trident/") > 0 ? true : false; } function injectGlobalCss() { const css = ".riq-fade-in { opacity: 0.5; transition: opacity 500ms; } .riq-fade-out { opacity: 0; transition: opacity 500ms; }"; var head = document.getElementsByTagName("head")[0]; var s = document.createElement("style"); s.id = "responseiq-app-container-style"; s.setAttribute("type", "text/css"); if (s.styleSheet) { // IE s.styleSheet.cssText = css; } else { // the world s.appendChild(document.createTextNode(css)); } head.appendChild(s); } function iframe_setup(widget_url, custom_iframe_css) { try { injectGlobalCss(); } catch(err) { console.log("RIQ> Unable to inject overlay CSS, the
element seems to be missing. This is fine, we happily continue but wanted to let you know..."); } var responseiq_app_container = document.createElement("div"); responseiq_app_container.id = "responseiq-app-container"; var containerStyle = "position: absolute;z-index: 999999999;"; responseiq_app_container.setAttribute("style", containerStyle); document.body.appendChild(responseiq_app_container); var riq_css = custom_iframe_css; var riq_head = document.head || document.getElementsByTagName("head")[0]; var riq_style = document.createElement("style"); riq_head.appendChild(riq_style); riq_style.type = "text/css"; if (riq_style.styleSheet) { // This is required for IE8 and below. riq_style.styleSheet.cssText = riq_css; } else { riq_style.appendChild(document.createTextNode(riq_css)); } var responseiq_app_frame_container = document.createElement("div"); var responseiq_overlay = document.createElement("div"); responseiq_overlay.className = "riq-vbox-overlay"; responseiq_overlay.id = "ovt"; var overlayStyle = "display:none; height:100%; width: 100%; z-index: 9999;left: 0;right: 0;background: rgba(0,0,0,.9);overflow-x: hidden;overflow-y: auto;position: fixed;top: 0;"; responseiq_overlay.setAttribute("style", overlayStyle); document .getElementById("responseiq-app-container") .appendChild(responseiq_overlay); responseiq_app_frame_container.className = "responseiq-app-frame-container"; responseiq_app_frame_container.id = "responseiq_app_frame_container"; document .getElementById("responseiq-app-container") .appendChild(responseiq_app_frame_container); var iframe = document.createElement("iframe"); var html = ""; // NOTE: We use "srcdoc" to set the HTML into the iframe directy. All browsers except for IE support // the "srcdoc" attribute. As we only support IE11 we add code to handle this browser at the end of // this function. var isIE11 = checkForIE11(); if (isIE11 === false) { // TODO: Write a knowledgebase article on that: // NOTE: "Cookie Consent" library is blocking an iframe if their auto-blocking feature is on. To allow // loading the iframe widget the `data-cookieconsent="ignore"` attribute needs to be set AND the installation // code needs to be loaded after cookie consent. Best to load it at the end of body (just before the tag). // See this documentation for more information: // https://support.cookiebot.com/hc/en-us/articles/11438730619804-How-does-auto-blocking-work iframe.setAttribute("data-cookieconsent", "ignore"); iframe.setAttribute("srcdoc", html); } iframe.setAttribute("frameborder", "0"); var iframeStyle = "display:none;position: fixed;top: auto;bottom: 20px;visibility: visible;width: 100px;height: 100px;opacity: 1;z-index:97685;"; iframe.setAttribute("style", iframeStyle); iframe.name = "ResponseIq-Iframe"; iframe.className = "responseiq-app-frame"; document.getElementById("responseiq_app_frame_container").appendChild(iframe); if (isIE11 === true) { // NOTE: "write" should not be used because of performance reasons. Therefore we only use it in // case of IE11, as the "srcdoc" attribute is not supported on IE in general. // We also add a DOCTYPE specifier as expected by IE11. iframe.contentWindow.document.open(); iframe.contentWindow.document.write("" + html); iframe.contentWindow.document.close(); } } var riqData = fetchRiqData(); var visitorSessionData = riqData && riqData.visitorSession ? riqData.visitorSession : {}; var visitorSession = false ? visitorSessionData : {}; var widgetUrl = createInstallationCode(visitorSession || {}); if (typeof document.body !== "undefined" && document.body){ iframe_setup(widgetUrl, "" ); }else { window.onload = function() { iframe_setup(widgetUrl, "" ); } }window.Responseiq.__riqLog = function(module, message, data) { if (data) { console.log('RIQ DEBUG: (' + module + ') ' + message, data); } else { console.log('RIQ DEBUG: (' + module + ') ' + message); } } window.Responseiq.__riqListenToIframeCommands = function() { if (window.Responseiq.__riqIsListeningToIframeCommands === true) { return; } function receiveMessage(event) { if (!event.data || !event.data.command) { return; } var command = event.data.command; var options = event.data.options || {}; var enableDebugging = options.enableDebugging ? true : false; if (command === 'notifyEventHandler') { var service = options.service; var category = options.category; var event = options.event; var data = options.data; if (!service) { window.Responseiq.__riqLog('notifyEventHandler', 'No "service" specified, skipping...'); return; } if (enableDebugging) { window.Responseiq.__riqLog('notifyEventHandler', 'Received event | service: ' + service + ' | event ' + event + ' | data: ' + JSON.strinify(data)); } if (service === 'CallbackWidget' && window.Responseiq.CallbackWidget.__riqOnEventHandler) { window.Responseiq.CallbackWidget.__riqOnEventHandler({ event: event, data: data, category: category }); } } } var iframe = document.querySelector('.responseiq-app-frame'); if (!iframe) { window.Responseiq.__riqLog('__riqListenToIframeCommands', 'iframe is not ready yet, try connecting later...'); return; } window.Responseiq.__riqIsListeningToIframeCommands = true; iframe.contentWindow.addEventListener('message', receiveMessage, false); } window.Responseiq.__riqSendMessage = function(props) { var iframe = document.querySelector('.responseiq-app-frame'); var enableDebugging = props.options && props.options.enableDebugging ? props.options.enableDebugging : false; if (!iframe) { window.Responseiq.__riqLog('__riqSendMessage', 'iframe is not ready yet, try sending the command later...'); return; } if (enableDebugging) { window.Responseiq.__riqLog('__riqSendMessage', 'sending "' + props.command + '" event to iframe:', iframe); } iframe.contentWindow.postMessage({ command: props.command, options: props.options }, '*'); } window.Responseiq.CallbackWidget.toggleWidgetOpenState = function(enableDebugging) { if (typeof enableDebugging === 'undefined') { enableDebugging = false; } window.Responseiq.__riqSendMessage({ command: 'toggleWidgetOpen', options: { enableDebugging: enableDebugging } }); } window.Responseiq.CallbackWidget.registerWidgetOpenHandler = function(selector, enableDebugging) { if (enableDebugging) { window.Responseiq.__riqLog('CallbackWidget.registerWidgetOpenHandler', 'selector', selector); } var foundElements = document.querySelectorAll(selector); foundElements.forEach(function(el) { if (enableDebugging) { window.Responseiq.__riqLog('CallbackWidget.registerWidgetOpenHandler', 'adding click handler to:', el); } el.addEventListener('click', function() { if (enableDebugging) { window.Responseiq.__riqLog('CallbackWidget.registerWidgetOpenHandler', 'triggering click handler on:', el); } window.Responseiq.CallbackWidget.toggleWidgetOpenState(enableDebugging); }) }); } window.Responseiq.CallbackWidget.load = function(props) { window.Responseiq.__riqSendMessage({ command: 'loadWidget', options: { token: props.token, hiddenMode: props.hiddenMode, enableDebugging: props.enableDebugging } }); }; window.Responseiq.CallbackWidget.remove = function(props) { if (typeof props === 'undefined') { props = {}; } window.Responseiq.__riqSendMessage({ command: 'removeWidget', options: { enableDebugging: props.enableDebugging } }); }; window.Responseiq.CallbackWidget.registerEventHandler = function(props) { var handler = props.handler; window.Responseiq.CallbackWidget.__riqOnEventHandler = handler; window.Responseiq.__riqListenToIframeCommands(); }; window.Responseiq.CallTracking.setContext = function(props) { if (typeof props === 'undefined') { props = {}; } window.Responseiq.__riqSendMessage({ command: 'setDniContext', options: props }); }; window.Responseiq.showInfo = function() { window.Responseiq.__riqSendMessage({ command: 'showInfo', options: {} }); }; window.Responseiq.injectCssFile = function(props) { window.Responseiq.__riqSendMessage({ command: 'injectCssFile', options: props }); }; window.Responseiq.setContext = function(props) { window.Responseiq.__riqSendMessage({ command: 'setContext', options: props }); };setTimeout(function() { window.Responseiq.CallbackWidget.registerWidgetOpenHandler('.new-modal_responseiq', false); }, 4000); var __riq_debug = {"noiframecontainerContainer":null,"$injectWidgetScript_pre":true,"$injectWidgetScript_post":true,"$queryString":"noiframecontainerContainer=true&cwInjectScript=1&widget=9OC54XGOV9DO&widgetrnd=Math.random();"};