function attrUnescape(e){return e?e.replace(/"/g,'"').replace(/&/g,"&"):""}function parseAttributes(e){for(var t=[],n=attrUnescape(e).split(/\s/g),i=n.length,o=0;o=0;o--)if(n.isElementVisible(e[o]))return e[o];return null},isElementVisible:function(e){return!(0===e.offsetWidth&&0===e.offsetHeight)},setActive:function(e){n.addClass(e,"is-active"),n.activeElement=e,n.activeElement.setAttribute("aria-hidden","false"),n.setFocus(e.id),n.trigger("cssmodal:show",n.activeElement)},unsetActive:function(e,t){n.removeClass(document.documentElement,"has-overlay"),n.activeElement&&(n.removeClass(n.activeElement,"is-active"),n.trigger("cssmodal:hide",n.activeElement),n.activeElement.setAttribute("aria-hidden","true"),n.removeFocus(),e&&!t&&n.stackModal(n.activeElement),!e&&n.stackedElements.length>0&&n.unstackModal(),n.activeElement=null)},stackModal:function(e){n.addClass(e,"is-stacked"),n.stackedElements.push(n.activeElement)},unstackModal:function(){var t=n.stackedElements.length,i=n.stackedElements[t-1];n.removeClass(i,"is-stacked"),e.location.hash=i.id,n.stackedElements.splice(t-1,1)},mainHandler:function(t,i){var o,a,r=e.location.hash.replace("#",""),s=0,l=[];if(i&&(r=t.currentTarget.getAttribute("href").replace("#","")),o=document.getElementById(r),-1!==r.indexOf("/")){if(s=(l=r.split("/")).pop(),r=l.join("/"),!(o=document.getElementById(r)))throw new Error('ReferenceError: element "'+r+'" does not exist!');o.index=1*s}if(o){try{t.preventDefault()}catch(e){t.returnValue=!1}(a=o.children[0])&&a.className.match(/modal--inner/)&&(n.unsetActive(!n.hasClass(o,"is-active"),"false"===o.getAttribute("data-stackable")),n.addClass(document.documentElement,"has-overlay"),n._currentScrollPositionY=e.scrollY,n._currentScrollPositionX=e.scrollX,n.setActive(o),n.activeElement._noHash=i)}else n.unsetActive();return!0},injectIframes:function(){for(var e,t=document.querySelectorAll("[data-iframe-src]"),n=0;n980?980:t[0]-60;for(var n=t[1]-90,i=document.getElementsByClassName("modal--inner"),o=document.getElementsByClassName("modal--content"),a=document.getElementsByClassName("modal--quiz-container"),r=0;rmobileBreakpoint?s.style.marginLeft=(e/-2).toString()+"px":s.style.marginLeft="0px";var d=parseInt(c.style.height),u=d+40;l.style.minHeight=d&&u{let n=document.cookie;if(n!==i)try{t({oldValue:i,newValue:n})}finally{i=n}10==++o&&e.clearInterval(a)},n)}(function(e){["_ga","_fbp","_fbc","_gac","_gcl","_ttp","_uetsid"].forEach(function(e){i(e)&&LH.setField(e,i(e))})},1e3);if(!document.getElementById("survey_css")){var o=document.getElementsByTagName("head")[0],a=document.createElement("link");a.id="survey_css",a.rel="stylesheet",a.type="text/css",a.href="https://digital-roo.leadshook.io/s/css_embed",a.media="all",o.appendChild(a)}var r,s=function(e,t,n){var i;if(this.videoUrl=n.videoUrl,this.stopAt=n.stopAt,this.el=e,this.quizId=e.getAttribute("data-quiz"),this.offset=e.getAttribute("data-offset"),this.isPreview=!!e.getAttribute("data-preview"),this.version=e.getAttribute("data-version"),this.isAutoscroll=e.getAttribute("data-autoscroll"),this.appendAttributes=e.getAttribute("data-append-attributes"),!this.quizId)return null;this.index=t,this.quizUrl=this.buildQuizUrl(),i=this.frame=this.createFrame(),this.videoUrl||this.render(i)};function l(t){LH&&(LH.isReady=!0);var i=[];if(t.data&&"function"==typeof t.data.split&&(i=t.data.split(":")),i[0]&&40===i[0].length&&-1!==t.origin.indexOf("leadshook")){var o=n+i[0],a=document.getElementById(o);a&&a.contentWindow.postMessage("parentUrl:"+e.location.href,"*")}if(i[0]&&"scrollTop"===i[0])!function(t){var n;if(t){var i=document.body.getBoundingClientRect(),o=document.getElementById(t).getAttribute("data-offset")||0,a=document.getElementById(t).getAttribute("data-autoscroll");n=document.getElementById(t).parentElement.getBoundingClientRect().top-i.top-o}else n=0;"yes"===a&&("function"==typeof e.scrollTo?e.scrollTo({top:n,left:0,behavior:"smooth"}):document.documentElement&&"function"==typeof document.documentElement.scrollTo?document.documentElement.scrollTo({top:n,behavior:"smooth"}):document.body.scrollTop=n)}(n+i[1]);else if(i&&i[0]&&i[1]&&i[2]){var r=i[0],s=i[1],l=i[2],c=i[3];m[l]&&m[l].quizId==r&&(m[l].resize(s,c),void 0!==resize&&resize())}}s.prototype.createFrame=function(){var e=document.createElement("iframe");e.setAttribute("height","100%"),t=n+this.quizId,e.setAttribute("id",t),e.setAttribute("width","100%"),e.setAttribute("allowFullScreen","true"),e.setAttribute("frameborder","0"),e.setAttribute("border","none"),e.setAttribute("scrolling","no"),e.setAttribute("style","width:100px; min-width:100%;*width: 100%;"),e.setAttribute("data-offset",this.offset||0),e.setAttribute("data-autoscroll",this.isAutoscroll),e.src=this.quizUrl;var i=this.appendAttributes?parseAttributes(this.appendAttributes):[];if(i.length>0)for(var o=i.length,a=0;a=0&&c.right>=0&&c.top<=(e.innerHeight||document.documentElement.clientHeight)&&c.left<=(e.innerWidth||document.documentElement.clientWidth))){var i,o=Math.max(document.documentElement.clientHeight,e.innerHeight||0),a=function(e){var t=0;do{isNaN(e.offsetTop)||(t+=e.offsetTop)}while(e=e.offsetParent);return t}(this.el),r=this.el.getAttribute("data-offset"),s=this.el.getAttribute("data-autoscroll");i=t ?',v.appendChild(i);var o,a="player_"+n,r=document.createElement("div");r.id=a,document.getElementsByClassName("quiz-container")[n].append(r);var s=(l=t.videoUrl,(c=l.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/))&&11==c[2].length?c[2]:null);e.onYouTubeIframeAPIReady=function(){o=new YT.Player(a,{height:"390",width:"640",videoId:s,events:{onReady:function(e){!function(e,t,n){var i=e.target;i.playVideo();var o=function(){i.getCurrentTime()>=n?(i.pauseVideo(),b(t)):setTimeout(o,1e3)};setTimeout(o,1e3)}(e,n,t.stopAt)}}}),p[n]=o}}var l,c});var g=document.createElement("script");g.src="https://www.youtube.com/iframe_api";var E=document.getElementsByTagName("script")[0];E.parentNode.insertBefore(g,E);var b=function(t){e.location.hash="modal_"+t;var n=m[t];if(n){var i="modal_quiz_container_"+t;n.el=document.getElementById(i),n.render(n.frame,i),resize()}}}(window);