PageSourceSearch

https://a.vantaansanomat.fi/styles/2efe7af9/js/blueconic/dialog.min.js

js vantaansanomat.fi collected 2026-10-02 03:26:31 UTC 14,615 bytes, 1 lines download raw bytes

1var BCinst="",BCshortcode="",BClinkParams={},BCHighImpactAdHidingEnabled=!1,BCHighImpactAdSizes=[],BCHighImpactPrerequisiteSlots=[],BCHighImpactPrerequisiteTimeout=5e3,BCGAMAdsEnabled=!1,BCAdDialogQueue=[],BCAdsPending=!1,BCHighImpactAdDetected=!1;function renderDialogue(e,E,h,t=!0){if((!0!==t||BCinst&&BCshortcode&&e&&E)&&(!1!==t||e)){var n=["toaster","slide-out","slide-out-open"];if(!BCHighImpactAdDetected||-1===n.indexOf(e))if(BCAdsPending&&-1!==n.indexOf(e))BCAdDialogQueue.push({dialogId:e,campaignfile:E,dialogName:h,useFetch:t});else{var l=window.dataLayer||[];if(!0===t)fetch("https://a.diks.fi/"+BCinst+"/"+BCshortcode+"/"+E).then(e=>e.json()).then(d=>{if("note"==e){var l=document.getElementById("diks-bc-note");if(l&&0<l.children.length)return;d.Headline1&&l&&(c=document.createElement("p"),d.CTA1URL?((r=document.createElement("a")).href=d.CTA1URL,r.textContent=d.Headline1,c.append(r),H(r,h)):c.textContent=d.Headline1,l.append(c),l.setAttribute("data-campaign",E),l.removeAttribute("style"),L("note","","",d.Headline1,d.CTA1URL))}if("toaster"==e){let n=document.getElementById("diks-bc-toaster");var r=document.getElementById("bc-marketing-dialog-close-button"),c=document.getElementById("bc-marketing-dialog-title"),l=document.getElementById("bc-marketing-dialog-description"),m=document.getElementById("bc-marketing-dialog-cta-wrapper");let e=!1;var s=document.getElementById("bc-marketing-dialog-cta1"),u=document.getElementById("bc-marketing-dialog-cta2"),g=document.getElementById("bc-marketing-dialog-cta3"),t=document.getElementById("bc-marketing-dialog-list");if(d.Headline1&&c&&(c.textContent=d.Headline1,c.removeAttribute("style")),d.Text1&&l&&(l.textContent=d.Text1,l.removeAttribute("style")),d.CTA1text&&d.CTA1URL&&s&&(s.textContent=d.CTA1text,s.setAttribute("href",d.CTA1URL),s.removeAttribute("style"),e=!0,H(s,h)),d.CTA2text&&d.CTA2URL&&u&&(u.textContent=d.CTA2text,u.setAttribute("href",d.CTA2URL),u.removeAttribute("style"),e=!0,H(u,h)),e&&m.removeAttribute("style"),d.CTA3text&&g&&(d.CTA3URL?((c=document.createElement("a")).href=d.CTA3URL,c.textContent=d.CTA3text,g.append(c)):g.textContent=d.CTA3text,g.removeAttribute("style")),d.Text3&&t){var i=d.Text3.split("|");for(let e=0;e<i.length;e++){var a=document.createElement("li");a.classList.add("diks-marketing-dialog__list-item"),a.textContent=i[e],t.append(a)}t.removeAttribute("style")}function o(e,t){e.style.display="none",t&&t.focus()}if(n&&r){let t=document.activeElement;r.addEventListener("click",function(e){o(n,t)}),document.addEventListener("keydown",function(e){"Escape"!==e.key&&"Esc"!==e.key||"none"===n.style.display||o(n,t)}),n.setAttribute("data-campaign",E),n.removeAttribute("style"),L("sticky.bottom","toaster",d.Headline1,d.CTA1text,d.CTA1URL,d.CTA2text,d.CTA2URL),r.focus()}}if("slide-out"==e){let t=document.querySelector(".bcSlideOutTrigger");l=document.getElementsByClassName("bcSlideOut")[0],s=document.getElementById("diks-bc-slide-out");let n=document.getElementById("bc-marketing-dialog-toggle-button"),i=document.getElementById("bc-marketing-dialog-toggle-button-text"),a=document.getElementById("bc-marketing-dialog-icon-closed"),o=document.getElementById("bc-marketing-dialog-icon-opened");u=document.getElementById("bc-marketing-dialog-title"),m=document.getElementById("bc-marketing-dialog-description"),c=document.getElementById("bc-marketing-dialog-cta-wrapper");let e=!1;var g=document.getElementById("bc-marketing-dialog-cta1"),r=document.getElementById("bc-marketing-dialog-cta2"),C=document.getElementById("bc-marketing-dialog-cta3"),b=document.getElementById("bc-marketing-dialog-list");if(d.Headline1&&i&&(i.textContent=d.Headline1),d.Headline1&&u&&(u.textContent=d.Headline1,u.removeAttribute("style")),d.Text1&&m&&(m.textContent=d.Text1,m.removeAttribute("style")),d.CTA1text&&d.CTA1URL&&g&&(g.textContent=d.CTA1text,g.setAttribute("href",d.CTA1URL),g.removeAttribute("style"),e=!0,H(g,h)),d.CTA2text&&d.CTA2URL&&r&&(r.textContent=d.CTA2text,r.setAttribute("href",d.CTA2URL),r.removeAttribute("style"),e=!0,H(r,h)),e&&c.removeAttribute("style"),d.CTA3text&&C&&(d.CTA3URL?((u=document.createElement("a")).href=d.CTA3URL,u.textContent=d.CTA3text,C.append(u)):C.textContent=d.CTA3text,C.removeAttribute("style")),d.Text3&&b){var A=d.Text3.split("|");for(let e=0;e<A.length;e++){var y=document.createElement("li");y.classList.add("diks-marketing-dialog__list-item"),y.textContent=A[e],b.append(y)}b.removeAttribute("style")}s&&l&&n&&t&&(new MutationObserver(function(e){e.forEach(function(e){"class"==e.attributeName&&(e.target.classList.contains("bcSlideOutOpen")?(n.setAttribute("aria-expanded","true"),o.removeAttribute("style"),a.style.display="none",i.style.display="none"):(n.setAttribute("aria-expanded","fal
1se"),a.removeAttribute("style"),o.style.display="none",i.removeAttribute("style")))})}).observe(l,{attributes:!0}),n.addEventListener("keydown",function(e){32===e.keyCode?e.preventDefault():13===e.keyCode&&(e.preventDefault(),t.click())}),n.addEventListener("keyup",function(e){32===e.keyCode&&(e.preventDefault(),t.click())}),s.setAttribute("data-campaign",E),s.removeAttribute("style"),L("sticky.bottom","slide-out",d.Headline1,d.CTA1text,d.CTA1URL,d.CTA2text,d.CTA2URL))}if("slide-out-open"==e){let t=document.querySelector(".bcSlideOutTrigger");m=document.getElementsByClassName("bcSlideOut")[0],g=document.getElementById("diks-bc-slide-out-open");let n=document.getElementById("bc-marketing-dialog-toggle-button"),i=document.getElementById("bc-marketing-dialog-toggle-button-text"),a=document.getElementById("bc-marketing-dialog-icon-closed"),o=document.getElementById("bc-marketing-dialog-icon-opened");r=document.getElementById("bc-marketing-dialog-title"),c=document.getElementById("bc-marketing-dialog-description"),u=document.getElementById("bc-marketing-dialog-cta-wrapper");let e=!1;var C=document.getElementById("bc-marketing-dialog-cta1"),l=document.getElementById("bc-marketing-dialog-cta2"),s=document.getElementById("bc-marketing-dialog-cta3"),p=document.getElementById("bc-marketing-dialog-list");if(d.Headline1&&i&&(i.textContent=d.Headline1),d.Headline1&&r&&(r.textContent=d.Headline1,r.removeAttribute("style")),d.Text1&&c&&(c.textContent=d.Text1,c.removeAttribute("style")),d.CTA1text&&d.CTA1URL&&C&&(C.textContent=d.CTA1text,C.setAttribute("href",d.CTA1URL),C.removeAttribute("style"),e=!0,H(C,h)),d.CTA2text&&d.CTA2URL&&l&&(l.textContent=d.CTA2text,l.setAttribute("href",d.CTA2URL),l.removeAttribute("style"),e=!0,H(l,h)),e&&u.removeAttribute("style"),d.CTA3text&&s&&(d.CTA3URL?((r=document.createElement("a")).href=d.CTA3URL,r.textContent=d.CTA3text,s.append(r)):s.textContent=d.CTA3text,s.removeAttribute("style")),d.Text3&&p){var k=d.Text3.split("|");for(let e=0;e<k.length;e++){var B=document.createElement("li");B.classList.add("diks-marketing-dialog__list-item"),B.textContent=k[e],p.append(B)}p.removeAttribute("style")}g&&m&&n&&t&&(new MutationObserver(function(e){e.forEach(function(e){"class"==e.attributeName&&(e.target.classList.contains("bcSlideOutOpen")?(n.setAttribute("aria-expanded","true"),o.removeAttribute("style"),a.style.display="none",i.style.display="none"):(n.setAttribute("aria-expanded","false"),a.removeAttribute("style"),o.style.display="none",i.removeAttribute("style")))})}).observe(m,{attributes:!0}),n.addEventListener("keydown",function(e){32===e.keyCode?e.preventDefault():13===e.keyCode&&(e.preventDefault(),t.click())}),n.addEventListener("keyup",function(e){32===e.keyCode&&(e.preventDefault(),t.click())}),t.click(),g.setAttribute("data-campaign",E),g.removeAttribute("style"),L("sticky.bottom","slide-out-open",d.Headline1,d.CTA1text,d.CTA1URL,d.CTA2text,d.CTA2URL))}if("paywall"==e){c=document.getElementById("diks-bc-paywall"),C=document.getElementById("diks-bc-paywall-wrapper"),l=document.getElementById("diks-paywall-wrapper"),u=document.getElementById("bc-marketing-dialog-title"),r=document.getElementById("bc-marketing-dialog-description"),s=document.getElementById("bc-marketing-dialog-description2"),m=document.getElementById("bc-marketing-dialog-cta-wrapper");let e=!1;var g=document.getElementById("bc-marketing-dialog-footer-text-wrapper"),n=document.getElementById("bc-marketing-dialog-cta1"),f=document.getElementById("bc-marketing-dialog-cta2"),x=document.getElementById("bc-marketing-dialog-cta3"),v=document.getElementById("bc-marketing-dialog-list");if(d.Headline1&&u&&!u.textContent&&(u.textContent=d.Headline1,u.removeAttribute("style")),d.Text1&&r&&!r.textContent&&(r.textContent=d.Text1,r.removeAttribute("style")),d.Text2&&s&&!s.textContent&&(s.textContent=d.Text2,s.removeAttribute("style")),d.CTA1text&&d.CTA1URL&&n&&!n.textContent&&(n.textContent=d.CTA1text,n.setAttribute("href",w(d.CTA1URL)),n.removeAttribute("style"),e=!0,H(n,h)),d.CTA2text&&d.CTA2URL&&f&&!f.textContent&&(f.textContent=d.CTA2text,f.setAttribute("href",w(d.CTA2URL)),f.removeAttribute("style"),e=!0,H(f,h)),m&&e&&m.removeAttribute("style"),x&&g&&0===x.children.length&&((u=
1document.createElement("a")).href="/kirjaudu/?returnUrl="+encodeURIComponent(window.location.href.split("?")[0]),u.textContent="Oletko jo tilaaja? Kirjaudu sisään",u.id="diks-bc-paywall-login-link",x.append(u),g.removeAttribute("style")),d.Text3&&v&&0===v.children.length){var T=d.Text3.split("|");for(let e=0;e<T.length;e++){var I=document.createElement("li");I.classList.add("diks-marketing-dialog__list-item"),I.textContent=T[e],v.append(I)}v.removeAttribute("style")}c&&l&&(c.setAttribute("data-campaign",E),"block"===l.style.display?(c.remove(),C&&C.remove()):(window.BCpaywallRendered=!0,l.remove(),c.removeAttribute("style"),L("paywall","paywall.paywall",d.Headline1,d.CTA1text,d.CTA1URL,d.CTA2text,d.CTA2URL)))}"order-button"==e&&(r=document.getElementsByClassName("diks-bc-order-button"))&&r.length&&d.CTA1URL&&Array.from(r).forEach(function(e){"a"!==e.tagName.toLowerCase()||e.classList.contains("diks-bc-container")||(e.setAttribute("href",(e=>{let t=e.trim();return BClinkParams.aO&&(t=U(t,"accountOrigin="+BClinkParams.aO)),t=BClinkParams.aI?U(t,"articleid="+BClinkParams.aI):t})(d.CTA1URL)),e.classList.add("diks-bc-container"),H(e,h))})}).catch(()=>{});else{if("image-dialog"==e){n=document.getElementById("diks-bc-image-dialog");if(n&&n.hasAttribute("data-bc-rendered"))return;if(n){n.style.display="none";var t=n.children;let e=!1;if(!(e=1===t.length&&("IMG"===(t=t[0]).tagName||"A"===t.tagName&&1===t.children.length&&"IMG"===t.children[0].tagName)?!0:e))return;n.setAttribute("data-bc-rendered","true"),n.removeAttribute("style")}}if("text-dialog"==e){t=document.getElementById("diks-bc-text-dialog");if((!t||!t.hasAttribute("data-bc-rendered"))&&t){t.style.display="none";var n=t.children;let e=!1;(e=1===n.length&&"DIV"===(n=n[0]).tagName&&n.classList.contains("diks-marketing-dialog")?!0:e)&&(t.setAttribute("data-bc-rendered","true"),t.removeAttribute("style"))}}}}}function L(e,t,n,i,a,o,d){l.push({event:"pageContent."+e,eventData:{elementSource:"blueconic",elementType:t||"",elementTitle:n||"",campaign:E,buttonText:i||"",buttonType:i&&a?"link.order":"",buttonLink:a||"","buttonText-2":o||"","buttonType-2":o&&d?"link.order":"","buttonLink-2":d||""}})}function U(e,t){return e+(e.split("?")[1]?"&":"?")+t}function w(e){let t=e.trim();return BClinkParams.aO&&(t=U(t,"accountOrigin="+BClinkParams.aO)),BClinkParams.rU&&(t=!0===BClinkParams.tA&&BClinkParams.sD?U(t,"returnUrl="+BClinkParams.rU):U(t,"returnUrl="+encodeURIComponent(BClinkParams.rU))),BClinkParams.aI&&(t=U(t,"articleid="+BClinkParams.aI)),BClinkParams.bU&&(t=!0===BClinkParams.tA&&BClinkParams.sD?U(t,"backUrl="+BClinkParams.bU):U(t,"backUrl="+encodeURIComponent(BClinkParams.bU))),t=U(t,"cd_source_button=article_paywall"),t=U(t,"source=maksumuuri_artikkeli"),t=!0===BClinkParams.tA&&BClinkParams.sD?BClinkParams.sD+"/ticket-out?redirectUrl="+encodeURIComponent(t):t}function H(e,n){function i(e){let t="";var n=window.blueConicClient.getInteractions();if(Array.isArray(n)&&0<n.length)for(var i=0;i<n.length;
1i++)if(n[i].name===e){t=n[i].id;break}t&&window.blueConicClient.createEvent("CLICK",t)}e&&n&&e.addEventListener("click",function(e){e.preventDefault();let t=this.href;t&&setTimeout(function(){window.location.href=t},200),void 0!==window.blueConicClient&&void 0!==window.blueConicClient.event&&void 0!==window.blueConicClient.event.subscribe?i(n):window.addEventListener("onBlueConicLoaded",function(){i(n)},!1)})}}function initHighImpactAdHiding(){var a,o,d,l,r,n,t;function i(e){e=document.getElementById(e);return null!==e&&"none"!==window.getComputedStyle(e).display}function c(){BCAdsPending=!(BCHighImpactAdDetected=!0),BCAdDialogQueue=[],["diks-bc-toaster","diks-bc-slide-out","diks-bc-slide-out-open"].forEach(function(e){e=document.getElementById(e);e&&(e.style.display="none")})}function m(e){if(!r)if(BCAdsPending=!(r=!0),clearTimeout(n),e)for(;0<BCAdDialogQueue.length;){var t=BCAdDialogQueue.shift();renderDialogue(t.dialogId,t.campaignfile,t.dialogName,t.useFetch)}else c()}function e(){r||BCHighImpactPrerequisiteSlots.some(i)||m(!0)}BCHighImpactAdHidingEnabled&&BCGAMAdsEnabled&&Array.isArray(BCHighImpactPrerequisiteSlots)&&0!==BCHighImpactPrerequisiteSlots.length&&(a={},o=[],l=BCAdsPending=!0,r=!(d={}),n=null,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e(),t=!1,window.googletag=window.googletag||{},googletag.cmd=googletag.cmd||[],googletag.cmd.push(function(){function e(){r||(0<o.length||BCHighImpactPrerequisiteSlots.some(i)?n=setTimeout(function(){r||m(!0)},BCHighImpactPrerequisiteTimeout):m(!0))}t=!0,googletag.pubads().addEventListener("slotRequested",function(e){e=e.slot.getSlotId().getDomId();-1!==BCHighImpactPrerequisiteSlots.indexOf(e)&&-1===o.indexOf(e)&&o.push(e)}),googletag.pubads().addEventListener("slotRenderEnded",function(e){var t,n,i=e.slot.getSlotId().getDomId();e.isEmpty||BCHighImpactAdDetected||-1===BCHighImpactPrerequisiteSlots.indexOf(i)||(r?c():m(!1)),t=i,n=e.isEmpty,0===o.length||r||-1===o.indexOf(t)||d[t]||(d[t]=!0,n?l&&Object.keys(d).length===o.length&&m(!0):(l=!1,m(!1))),(e=>{if(Array.isArray(e)&&Array.isArray(BCHighImpactAdSizes))for(var t=0;t<BCHighImpactAdSizes.length;t++)if(e[0]===BCHighImpactAdSizes[t][0]&&e[1]===BCHighImpactAdSizes[t][1])return 1})(e.size)&&(a[i]=!0)}),googletag.pubads().addEventListener("slotVisibilityChanged",function(e){var t;BCHighImpactAdDetected||(t=e.slot.getSlotId().getDomId(),a[t]&&0<e.inViewPercentage&&c())}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){setTimeout(e,0)}):setTimeout(e,0)}),setTimeout(function(){r||t||m(!0)},BCHighImpactPrerequisiteTimeout))}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.