var socialProofConfig = {"_id":"ppX7wW6fJT6QbgQkj","name":"Zum Infopoint - Live-Meeting angemeldet","messages":[{"text":"Hans hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/my4juf7a33b8JFvqA.jpg"},{"text":"Sabine hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/WW5ZDE7csXAtbLP8T.jpg"},{"text":"Elke hat sich zum Live-Meeting angemeldet!","image":"https://static.convertlink.io/socialProof/image/F2ApWZ5tBc2T93fdK.jpg"},{"text":"Anton hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/3ZX5rqn9Kmp5SzgQd.jpg"},{"text":"Erich hat sich zum Live-Meeting angemeldet!","image":"https://static.convertlink.io/socialProof/image/iqSMnEPGd7AWk3kka.jpg"},{"text":"Johanna hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/cufj4MnP7ns6YK6rv.jpg"},{"text":"Thomas hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/tfsB6A7efqSo4iY2v.jpg"},{"text":"Martin hat sich zum Live-Meeting angemeldet!","image":"https://static.convertlink.io/socialProof/image/8vffgxNcX8uy9hp9q.jpg"},{"text":"Dominic hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/FmnYYLtLCfDMKj3ny.jpg"},{"text":"Sabrina hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/N2Q5MHm3xc5YExRfX.jpg"},{"text":"Martina hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/Cpf5jMfshhbR5QF3n.jpg"},{"text":"Andreas hat sich zum Live-Meeting angemeldet!","image":"https://static.convertlink.io/socialProof/image/ubd7WGWS7Yxxb8SGx.jpg"},{"text":"Peter hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/g2wwoB5BoaEAG9EyM.jpg"},{"text":"Ines hat sich zum Infopoint-Webinar angemeldet!","image":"https://static.convertlink.io/socialProof/image/rcAiuSgsMXKeehk9y.jpg"}],"style":{},"displayTime":6,"initialWaitTime":5,"waitTime":10,"createdAt":"2020-07-07T17:59:44.063Z","userId":"ojWoi7qPPPFN2Dgcr"};function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var MODE_TIMEOUT=0,MODE_INTERVAL=1,fnStacks=new Map,runArray=new Set,rafStarted=!1,startId=0;function getTimeStamp(){return(new Date).getTime()}function executeFn(t){var e=t.fn,n=t.args;e.apply(void 0,_toConsumableArray(n))}function runFunction(){0!==runArray.size&&(runArray.forEach(executeFn),runArray.clear())}var checkTick=function(a){return function(t,e){var n=t.nextTick,o=t.ms,i=t.mode;0<=a-n&&(runArray.add(t),i===MODE_TIMEOUT?fnStacks.delete(e):fnStacks.set(e,Object.assign({},t,{nextTick:n+o})))}};function loop(){var t=getTimeStamp();fnStacks.forEach(checkTick(t)),runFunction(),0!==fnStacks.size?window.requestAnimationFrame(loop):rafStarted=!1}function addId(t){var e=t.fn,n=t.ms,o=void 0===n?0:n,i=t.args,a=t.mode;if(!e)return null;var r=startId;return fnStacks.set(r,{fn:e,ms:o,nextTick:getTimeStamp()+o,args:i,mode:a}),rafStarted||(rafStarted=!0,window.requestAnimationFrame(loop)),startId+=1,r}function removeId(t){fnStacks.has(t)&&fnStacks.delete(t),0===fnStacks.size&&(rafStarted=!1)}var initialNotificationShown,shuffledNotifications,showNotificationContainer,rafSetTimeout=function(t,e){for(var n=arguments.length,o=Array(2<n?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return addId({fn:t,ms:1<arguments.length&&void 0!==e?e:0,args:o,mode:MODE_TIMEOUT})},rafClearTimeout=removeId,rafSetInterval=function(t,e){for(var n=arguments.length,o=Array(2<n?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return addId({fn:t,ms:1<arguments.length&&void 0!==e?e:0,args:o,mode:MODE_INTERVAL})},rafClearInterval=removeId;function shuffle(t){for(var e=t.length;0<e;){var n=Math.floor(Math.random()*e),o=t[--e];t[e]=t[n],t[n]=o}return t}function asyncLoop(t,e,n){var o=0,i=!1,a={next:function(){i||(o<t?(o++,e(a)):(i=!0,n()))},iteration:function(){return o-1},break:function(){i=!0,n()}};return a.next(),a}function fadeOut(e){e&&(e.style.opacity=1,function t(){(e.style.opacity-=.1)<0?e.style.display="none":requestAnimationFrame(t)}())}function fadeIn(n,t,o){n&&(n.style.opacity=0,n.style.display="block",function t(){var e=parseFloat(n.style.opacity);1<(e+=.1)?"function"==typeof o&&o():(n.style.opacity=e,requestAnimationFrame(t))}())}socialProofConfig&&socialProofConfig.messages&&socialProofConfig.messages.length&&(initialNotificationShown=!1,shuffledNotifications=shuffle(Array.from(socialProofConfig.messages)),(showNotificationContainer=function(t){asyncLoop(t.length,function(f){!function(e){e.closing=!1;var t,n=socialProofConfig.displayTime||5,o=socialProofConfig.initialWaitTime||socialProofConfig.waitTime||2;initialNotificationShown?t=socialProofConfig.waitTime||2:(t=o,initialNotificationShown=!0);var i,a=document.createElement("div");a.className="cl-social-proof-message",a.style.borderRadius="100px",a.style.backgroundColor="#fff",a.style.position="fixed",a.style.zIndex="999",a.style.left="15px",a.style.bottom="15px",a.style.border="1px solid #ddd",a.style.boxSizing="border-box",a.style.padding="10px 15px",a.style.width="265px",a.style.maxWidth="100%",a.style.color="#666",a.style.clear="both",a.style.fontFamily="sans-serif",a.style.fontSize="13px",a.style.display="none",e.image&&((i=document.createElement("div")).style.backgroundImage="url("+e.image+")",i.style.backgroundRepeat="no-repeat",i.style.backgroundPosition="center",i.style.backgroundSize="cover",i.style.borderRadius="100px",i.style.float="left",i.style.marginRight="15px",i.style.width="40px",i.style.height="40px",a.appendChild(i));var r,s=document.createElement("div");s.innerHTML=e.text||"",s.style.fontWeight="bold",a.appendChild(s),e.time&&((r=document.createElement("div")).innerHTML=e.time||"",r.style.color="#999",r.style.fontSize="12px",r.style.marginTop="4px",a.appendChild(r));var l=document.createElement("button");l.style.backgroundColor="transparent",l.style.border="none",l.style.position="absolute",l.style.top="10px",l.style.right="10px",l.style.cursor="pointer",l.innerHTML="&times;",l.style.color="#999",l.style.top="50%",l.style.marginTop="-8px",l.addEventListener("click",function(t){t.preventDefault(),a&&!e.closing&&(e.closing=!0,fadeOut(a,100),f.next())}),a.appendChild(l),rafSetTimeout(function(){document.body.appendChild(a),a&&!e.closing&&"hidden"!==document.visibilityState&&fadeIn(a,300,function(){rafSetTimeout(function(){a&&!e.closing&&(fadeOut(a,100),rafSetTimeout(function(){a.parentNode.removeChild(a)},100),f.next())},1e3*n)})},1e3*t)}(t[f.iteration()])},function(){showNotificationContainer(shuffledNotifications)})})(shuffledNotifications));