@schibsted/advertory 2.60.2 → 2.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/core/aftenposten/es/index.css +1 -1
  2. package/core/aftenposten/es/index.d.ts +6 -1
  3. package/core/aftenposten/es/index.js +1 -1
  4. package/core/aftenposten/index.d.ts +6 -1
  5. package/core/aftenposten/index.js +1 -1
  6. package/core/{e24v2/es → aftenpostenv2}/index.d.ts +6 -1
  7. package/core/aftenpostenv2/index.js +1 -0
  8. package/{sites/e24v2/es → core/aftenpostenv2}/package.json +1 -1
  9. package/core/aftonbladet/es/index.css +1 -1
  10. package/core/aftonbladet/es/index.d.ts +6 -1
  11. package/core/aftonbladet/es/index.js +1 -1
  12. package/core/aftonbladet/index.d.ts +6 -1
  13. package/core/aftonbladet/index.js +1 -1
  14. package/core/aftonbladetv2/es/index.d.ts +6 -1
  15. package/core/aftonbladetv2/es/index.js +1 -1
  16. package/core/bt/es/index.css +1 -1
  17. package/core/bt/es/index.d.ts +6 -1
  18. package/core/bt/es/index.js +1 -1
  19. package/core/bt/index.d.ts +6 -1
  20. package/core/bt/index.js +1 -1
  21. package/core/e24/es/index.css +1 -1
  22. package/core/e24/es/index.d.ts +6 -1
  23. package/core/e24/es/index.js +1 -1
  24. package/core/e24/index.d.ts +6 -1
  25. package/core/e24/index.js +1 -1
  26. package/core/fotbollskanalen/es/index.css +1 -1
  27. package/core/fotbollskanalen/es/index.d.ts +6 -1
  28. package/core/fotbollskanalen/es/index.js +1 -1
  29. package/core/fotbollskanalen/index.d.ts +6 -1
  30. package/core/fotbollskanalen/index.js +1 -1
  31. package/core/godare/index.d.ts +6 -1
  32. package/core/godare/index.js +1 -1
  33. package/core/godt/index.d.ts +6 -1
  34. package/core/godt/index.js +1 -1
  35. package/core/klart/index.d.ts +6 -1
  36. package/core/klart/index.js +1 -1
  37. package/core/koket/es/index.css +1 -1
  38. package/core/koket/es/index.d.ts +6 -1
  39. package/core/koket/es/index.js +1 -1
  40. package/core/koket/index.d.ts +6 -1
  41. package/core/koket/index.js +1 -1
  42. package/core/kompakt/index.d.ts +6 -1
  43. package/core/kompakt/index.js +1 -1
  44. package/core/minmote/index.d.ts +6 -1
  45. package/core/minmote/index.js +1 -1
  46. package/core/pent/index.d.ts +6 -1
  47. package/core/pent/index.js +1 -1
  48. package/core/sa/es/index.css +1 -1
  49. package/core/sa/es/index.d.ts +6 -1
  50. package/core/sa/es/index.js +1 -1
  51. package/core/sa/index.d.ts +6 -1
  52. package/core/sa/index.js +1 -1
  53. package/core/svd/es/index.css +1 -1
  54. package/core/svd/es/index.d.ts +6 -1
  55. package/core/svd/es/index.js +1 -1
  56. package/core/svd/index.d.ts +6 -1
  57. package/core/svd/index.js +1 -1
  58. package/core/svdv2/es/index.css +1 -1
  59. package/core/svdv2/es/index.d.ts +6 -1
  60. package/core/svdv2/es/index.js +1 -1
  61. package/core/tek/index.d.ts +6 -1
  62. package/core/tek/index.js +1 -1
  63. package/core/tv4/es/index.d.ts +6 -1
  64. package/core/tv4/es/index.js +1 -1
  65. package/core/tv4/index.d.ts +6 -1
  66. package/core/tv4/index.js +1 -1
  67. package/core/tvnu/index.d.ts +6 -1
  68. package/core/tvnu/index.js +1 -1
  69. package/core/vg/es/index.css +1 -1
  70. package/core/vg/es/index.d.ts +6 -1
  71. package/core/vg/es/index.js +1 -1
  72. package/core/vg/index.d.ts +6 -1
  73. package/core/vg/index.js +1 -1
  74. package/core/vgv2/es/index.css +1 -1
  75. package/core/vgv2/es/index.d.ts +6 -1
  76. package/core/vgv2/es/index.js +1 -1
  77. package/features/ad-native/index.d.ts +6 -0
  78. package/features/dr-edition/es/index.d.ts +6 -0
  79. package/features/dr-edition/index.d.ts +6 -0
  80. package/features/tracker/index.d.ts +6 -0
  81. package/package.json +1 -1
  82. package/sites/aftenposten/es/index.css +1 -1
  83. package/sites/{e24v2/es → aftenpostenv2}/index.d.ts +6 -10
  84. package/sites/aftenpostenv2/index.js +1 -0
  85. package/{core/e24v2/es → sites/aftenpostenv2}/package.json +1 -1
  86. package/sites/aftonbladet/es/index.css +1 -1
  87. package/sites/aftonbladetv2/es/index.css +1 -1
  88. package/sites/bt/es/index.css +1 -1
  89. package/sites/e24/es/index.css +1 -1
  90. package/sites/e24/es/index.d.ts +5 -1
  91. package/sites/e24/es/index.js +1 -1
  92. package/sites/e24/index.d.ts +5 -1
  93. package/sites/e24/index.js +1 -1
  94. package/sites/sa/es/index.css +1 -1
  95. package/sites/svd/es/index.css +1 -1
  96. package/sites/svdv2/es/index.css +1 -1
  97. package/sites/vg/es/index.css +1 -1
  98. package/sites/vgv2/es/index.css +1 -1
  99. package/styles/aftenpostenv2/styles.css +1 -0
  100. package/styles/e24/styles.css +1 -1
  101. package/types/core/interface/config.d.ts +6 -0
  102. package/types/features/ad-native/sites/aftenpostenv2/aftenposten-init.d.ts +4 -0
  103. package/types/features/ad-native/sites/aftenpostenv2/index.d.ts +6 -0
  104. package/types/features/ad-native/sites/aftenpostenv2/templates/content/index.d.ts +4 -0
  105. package/types/features/ad-native/sites/aftenpostenv2/templates/index.d.ts +3 -0
  106. package/types/features/ad-native/sites/aftenpostenv2/templates/recirc/index.d.ts +4 -0
  107. package/types/features/widescreen-switching/constants.d.ts +3 -0
  108. package/types/features/widescreen-switching/query-widescreen.d.ts +3 -0
  109. package/types/features/widescreen-switching/query-widescreen.test.d.ts +1 -0
  110. package/types/interface/global.d.ts +0 -1
  111. package/types/sites/aftenpostenv2/formats/Netboard/index.d.ts +3 -0
  112. package/types/sites/{e24v2/formats/Brandboard → aftenpostenv2/formats/Skyscraper}/index.d.ts +1 -1
  113. package/types/sites/aftenpostenv2/formats/Wallpaper/index.d.ts +2 -0
  114. package/types/sites/aftenpostenv2/formats/helpers.d.ts +4 -0
  115. package/types/sites/{e24v2 → aftenpostenv2}/formats/index.d.ts +2 -5
  116. package/types/sites/aftenpostenv2/index.d.ts +4 -0
  117. package/types/sites/aftenpostenv2/prepare-page-options.test.d.ts +1 -0
  118. package/types/sites/aftenpostenv2/prepare-tag.d.ts +3 -0
  119. package/types/sites/aftenpostenv2/prepare-tag.test.d.ts +1 -0
  120. package/types/sites/e24/formats/Skyscraper/index.d.ts +3 -1
  121. package/types/sites/e24/formats/Wallpaper/index.d.ts +2 -1
  122. package/types/sites/e24/formats/index.d.ts +1 -0
  123. package/types/sites/e24/index.d.ts +2 -2
  124. package/core/e24v2/es/index.css +0 -1
  125. package/core/e24v2/es/index.js +0 -1
  126. package/sites/e24v2/es/index.css +0 -1
  127. package/sites/e24v2/es/index.js +0 -1
  128. package/styles/e24v2/styles.css +0 -1
  129. package/types/sites/e24/formats/helpers.d.ts +0 -4
  130. package/types/sites/e24v2/formats/Netboard/index.d.ts +0 -3
  131. package/types/sites/e24v2/formats/Skyscraper/index.d.ts +0 -5
  132. package/types/sites/e24v2/formats/Wallpaper/index.d.ts +0 -4
  133. package/types/sites/e24v2/index.d.ts +0 -2
  134. package/types/sites/tvnu/formats/Widescreen/helpers.d.ts +0 -1
  135. /package/styles/{e24v2 → aftenpostenv2}/index.js +0 -0
  136. /package/types/config/{e24v2.d.ts → aftenpostenv2.d.ts} +0 -0
  137. /package/types/{sites/aftonbladetv2/formats/Widescreen/helpers.d.ts → features/widescreen-switching/index.d.ts} +0 -0
  138. /package/types/{sites/e24v2/prepare-page-options.test.d.ts → features/widescreen-switching/index.test.d.ts} +0 -0
  139. /package/types/sites/{e24v2 → aftenpostenv2}/config.d.ts +0 -0
  140. /package/types/sites/{e24v2 → aftenpostenv2}/events.d.ts +0 -0
  141. /package/types/sites/{e24v2 → aftenpostenv2}/formats/Topboard/index.d.ts +0 -0
  142. /package/types/sites/{e24v2 → aftenpostenv2}/prepare-page-options.d.ts +0 -0
  143. /package/types/sites/{e24v2 → e24}/formats/Aksjelive/index.d.ts +0 -0
  144. /package/types/sites/{e24v2 → e24}/formats/Netboard/helpers.d.ts +0 -0
  145. /package/types/sites/{e24v2 → e24}/formats/Topboard/helpers.d.ts +0 -0
  146. /package/types/sites/{e24v2 → e24}/formats/Wallpaper/helpers.d.ts +0 -0
package/core/e24/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";require("react/jsx-runtime");const e="ABSOLUTE_FULLSCREEN",t="ANY_FULLSCREEN",n="VERTICAL_FULLWIDTH",i="FULLWIDTH",a="TAKEOVER",o="VELVET_TAKEOVER",r="WALLPAPER",d="COLLAPSE",s={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],VERTICAL_FULLWIDTH:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},l={wallpaper:1600,"l-format":1600},c=e=>{const{banner:n,targetId:i}=e;return!(!n||(null==i?void 0:i.includes("takeover")))&&E(e,t)},p=e=>{const{native:t}=e;return!!t},u=e=>E(e,i),v=e=>{const{targetId:t}=e;return t.includes("takeover")||E(e,a)},g=e=>E(e,a),h=e=>E(e,r),m=e=>E(e,d),f=e=>e.targetId.includes("sponsorstripe"),y=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},b=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),w=e=>e.targetId.startsWith("midboard"),x=e=>e.width>=1260&&e.width<=1280,k=e=>e.width>=1600&&e.width<=1620,E=(e,t)=>{const n=s[t];if(!n)return!1;return!!n.find(t=>{var n,i;const a=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,o=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,r=t.width===a,d=!t.height||t.height===o;return r&&d})},T=e=>{(()=>{const e=document.querySelector(".advertory-e24-wallpaper-hero"),t=document.querySelector(".advertory-e24-fullscreen-wrapper__front");if(!t)return;const n=t.offsetTop-200;e&&e.parentElement&&t&&n>0&&(e.parentElement.style.height=`calc(${t.offsetTop-200}px - 100vh)`)})(),(e=>{if((e=>e.targetId.includes("skyscraperright_2")&&!!e.banner)(e)){const e=700,t=document.querySelector(".advertory-e24-skyscraperright_2-track"),n=document.querySelector("footer");if(!t||!n)return;t.style.height=n.offsetTop-t.offsetTop-e+"px"}})(e)};function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I,S;var C=A(function(){if(S)return I;S=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?d((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function r(e,t,i){var r={};return i.isMergeableObject(e)&&a(e).forEach(function(t){r[t]=n(e[t],i)}),a(t).forEach(function(a){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(o(e,a)&&i.isMergeableObject(t[a])?r[a]=function(e,t){if(!t.customMerge)return d;var n=t.customMerge(e);return"function"==typeof n?n:d}(a,i)(e[a],t[a],i):r[a]=n(t[a],i))}),r}function d(t,a,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var d=Array.isArray(a);return d===Array.isArray(t)?d?o.arrayMerge(t,a,o):r(t,a,o):n(a,o)}return d.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return d(e,n,t)},{})},I=d}());const O=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],P={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},$=6;class _{set(e){this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of O){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=C(_.DEFAULT_SITE_HANDLERS,e)}}_.DEFAULT_SITE_HANDLERS={siteEvents:P,initNativeAd:function(){}};const L=new _,j=L.modifyConfigProperties.bind(L);function z(e,t,n,i){return new(n||(n=Promise))(function(a,o){function r(e){try{s(i.next(e))}catch(e){o(e)}}function d(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,d)}s((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const N="0123456789abcdefghijklmnopqrstuvwxyz",q=e=>{window.apntag.anq.push(e)},D=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),M=new Promise(e=>{if("undefined"==typeof document||!document.hidden)return void e();const t=()=>{document.hidden||(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t,{once:!0})});class B{initialize(){this.DATA=Object.assign({},B.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}B.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const R=new B,F="advertory-wallpaper-background",V="advertory-with-horseshoe",U=()=>{const e=document.querySelector(`.${F}`);e&&e.remove()},H=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${F}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},W=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,K=e=>{if(window.location.href.includes("collapse_ad=0"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&U())},J=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))},G=()=>{const{publisher:e,country:t,finnBlink:n}=L.get(),{loadFinnBlinkAd:i,wallpaperHandlers:{adjustAdToHorseshoe:a}}=L.getHandlers(),o=window.apntag,r={publisher:e,country:t,finnBlink:n},d=e=>{J(e),q(()=>o.showTag(e))};return{withXandrAd:d,withFinnBlinkAd:e=>z(void 0,void 0,void 0,function*(){yield i(e,r,null)}),withFullAdsChain:e=>z(void 0,void 0,void 0,function*(){yield i(e,r,d,()=>{R.getData("horseshoe").isAvailable&&a(e)})})}},Y={Blink:"Blink"},Q=(e,...t)=>z(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){Array.from(document.querySelectorAll('script[type="module"]')).some(t=>{var n;return null===(n=t.textContent)||void 0===n?void 0:n.includes(`import(${JSON.stringify(e)})`)})||(yield new Promise((n,i)=>{const a=document.createElement("script");a.async=!0,a.type="module",a.textContent=`(async () => {\n try {\n const moduleNamespace = await import(${JSON.stringify(e)});\n const allowedExports = ${JSON.stringify(Y)};\n\n for (const key of Object.keys(allowedExports)) {\n const exportedValue = moduleNamespace[key];\n \n if (exportedValue !== undefined) {\n window[allowedExports[key]] = exportedValue;\n }\n }\n } catch (error) {\n console.error('ESM load failed: ', error);\n }\n })();`;const o=()=>{d(),n()},r=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{a.removeEventListener("load",o),a.removeEventListener("error",r),clearTimeout(s)};a.addEventListener("load",o),a.addEventListener("error",r);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(a)}).catch(e=>{console.error(e)}))}),X="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",Z=(e,t,n,i)=>{const a=t.parentElement;if(!a)return;const o=e?`-${e}`:"",r=i?`__${i}`:"",d=`advertory${o}-${n}${r}`,s=`advertory${o}-${n}-wrapper${r}`;t.classList.remove(...t.classList),a.classList.remove(...a.classList),t.classList.add(d),a.classList.add(s),t.dataset.adType=n},ee={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},te=e=>e===ee.MOBILE,ne="finn-blink",ie="native-ad",ae=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},oe=()=>z(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),re=e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e},de=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={}}=L.get(),i=document.createElement("div"),a=document.createElement("div");return a.id=e,i.appendChild(a),Z(n,a,ne),ae(`Creating blink container for: ${e}`),i},se=(e,t)=>{var n;(ae(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):ae(`Cannot perform afterend on: ${e.id}`)},le={adRequested:()=>{},adAvailable:e=>{v(e)&&(()=>{const e=document.querySelector("div[id*='mobile-topboard']"),t=document.querySelector("#takeover");e&&t&&t.appendChild(e)})()},adLoaded:e=>{T(e)},adNoBid:e=>{if(y(e.targetId)){const{finnBlink:t}=L.get();((e,t)=>{z(void 0,void 0,void 0,function*(){const{deviceType:n}=L.get();if(!t||!te(n))return;yield Q(X);const{replacementConfig:i}=t,a=document.querySelector(`[id^="${e}"]`);if(!a||!(null==i?void 0:i.sizes))return;const{sizes:o}=i,r=re(e),d=de(r);a.dataset.finnBlinkId=r,a.dataset.noBidAd="true",se(a,d),G().withFinnBlinkAd(r)})})(e.targetId,t)}},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},ce={NO:"no",SE:"se"},pe=()=>{const{country:e}=L.get();return e===ce.NO?"no-sno":"se-generic"},ue=()=>{const{country:e,publisher:t}=L.get();return`${e}-${t}`},ve=e=>new URLSearchParams(window.location.search).get(e),ge=()=>{if(!window.location.search.includes("kv_"))return{};const e={},t=(()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e)})();return Object.keys(t).forEach(n=>{n.startsWith("kv_")&&(e[n.slice(3)]=t[n])}),e},he={SVD:"svd",VG:"vg",GODARE:"godare",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen"},me=e=>{const{source:t}=e;return"csm"===t},fe={[he.VG]:["board","netboard","backfill","outstream"],[he.AFTONBLADET]:["panorama","outstream"],[he.GODARE]:["panorama","outstream"],[he.SVD]:["wph-article-panorama","wph-front-panorama"]},ye=e=>{var t;const{publisher:n}=L.get();return!!fe[n]&&!!(null===(t=fe[n])||void 0===t?void 0:t.some(t=>e.includes(t)))},be=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return ae("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const a=e=>{i||(ae("Resolving advertising permission value obtained"),i=!0,t(e))},o=setTimeout(()=>{ae("Advertising permission timed out, resolving with false"),a(!1)},3e3);window._tcf_.onTcfReady(()=>{ae("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);ae("Advertising permission value obtained asynchronously: ",e),a(Boolean(t))})}),we="cmp:loaded";let xe,ke=!1;const Ee=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),a=(null==e?void 0:e.timeout)||3e3,o=ve("bypass_tcf"),r=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(ae("TCF bypass param detected, returning consent: true"),!0):(ae("TCF is not enabled, returning consent: true"),!0))(i,o))return!0;if(ke)return null;if(!xe)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=xe.getConsentedToAllSync();return ae(`TCF consented to all is: ${t}`),xe.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(ae("Getting TCF consent manager..."),window._tcf_)return ae("TCF consent manager is already available"),xe=window._tcf_,void e(xe);ae("TCF consent manager is not available");const n=()=>{ae("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(xe=window._tcf_,e(xe)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(we,n),ke=!0,t(new Error("Timeout waiting for CMP to load"))},a);ae("Listening for CMP loaded event..."),document.addEventListener(we,n,{once:!0})}):Promise.resolve(null),getConsentSync:r,getConsentAsync:()=>z(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return ae(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const i=(null==e?void 0:e.schibstedAdChoicesEnabled)&&n===ce.SE,o=(null==e?void 0:e.schibstedAdChoicesEnabled)&&!t&&n===ce.NO;if(i||o)return ae("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield be(e);if(!(null==e?void 0:e.enabled))return!0;const d=r();return null!==d?d:yield new Promise((e,t)=>{try{if(!xe)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{ae("TCF isConsentedToAll timed out, resolving with false"),n(!1)},a);xe.onTcfReady(()=>{ae("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),xe.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},Te=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Ae=()=>{const e=Te("_pulse2data");return e?e.split(",")[2]:void 0},Ie=9826;class Se{constructor(){this.getSupplyTypeKeywords=()=>{const{deviceType:e=ee.DESKTOP,isMobileApp:t}=L.get();if(t){return{"aa-sch-supply_type":`app_${e===ee.MOBILE?"phone":ee.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return z(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return z(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return Ae()}getExternalUid(){return z(this,void 0,void 0,function*(){return yield z(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=L.get(),{getConsentAsync:i}=Ee(e,t,n);if(!(yield i()))return;const a=Te("_pulse2data");return a?a.split(",")[9]:void 0})})}isTrackingForbidden(){return z(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},testMember:t=Ie}=L.get();return window.location.search.includes("inventory_test=true")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{publisher:e}=L.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return z(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=L.get(),{getConsentAsync:i}=Ee(e,t,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageType:e}=L.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}getSponsorsKeywords(){var e;const{publisher:t,keywordsConfig:n}=L.get(),i=null===(e=null==n?void 0:n.sponsors)||void 0===e?void 0:e.split(":").map(e=>`${t}_${e}`);return i?{"no-sno-news-sponsors":i}:{}}}const Ce=new Se;function Oe(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),a=(()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"})();return{OS:a,mobileOS:["ios","android"].includes(a)?a:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}Ce.prepare.bind(Ce);const Pe=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function $e(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Pe.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class _e extends Se{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{deviceType:e=ee.DESKTOP}=L.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{deviceType:e,isMobileApp:t}=L.get(),{OS:n,isHybridApp:i}=Oe(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return $e(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageType:i}=L.get(),a=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${a.split("_").pop()||a}_${"article"===i?"article":"front"}`}}}const Le=864e5,je=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return ae("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=Le)=>{const a={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(a))},getByTimestamp:(t,n=Le)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return ae("Error with parsing localStorage data"),null}}}})(),ze="glimrTags",Ne=["glwe_","glwet_"],qe={geofenceTags:[],geoTags:[],weatherTags:[]},De=(e,t,n,...i)=>z(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return ae(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return ae(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:a}=Ee(e,t,n);return(yield a())?(ae(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(ae(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),Me=()=>z(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=L.get();if(null==e?void 0:e.schibstedConsentToPayEnabled){return yield De(e,t,n,"glimr")}const{getConsentAsync:i}=Ee(e,t,n);return yield i()}),Be=()=>z(void 0,void 0,void 0,function*(){const{glimr:e}=L.get();if(!(yield Me())||!(null==e?void 0:e.enabled))return void ae("No consent for glimr data fetching.");const t=yield(n=500,z(void 0,void 0,void 0,function*(){return yield Promise.race([z(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{je.setWithTimestamp(ze,{tags:e,tagMappings:t}),n(!0)})})}catch(e){ae(`Error during getting glimr data: ${e}`)}else ae("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),Re={svd:"svd",vg:"vg",godare:"godare",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},Fe=e=>Ne.some(t=>e.startsWith(t)),Ve=e=>e.startsWith("glgc_"),Ue=e=>!Fe(e)&&!Ve(e),He=e=>{const t=We();if(!t)return qe;const n=((e=[])=>e.filter(Fe))(t),i=((e=[])=>e.filter(Ve))(t),a=((e=[],t)=>{const n=e.filter(Ue);if(t){const{publisher:e}=L.get(),t=Re[e]||e;n.push(t)}return n})(t,e);return{geoTags:a,geofenceTags:i,weatherTags:n}},We=()=>{const e=je.getByTimestamp(ze);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},Ke={get:(e,t)=>z(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>z(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),a=yield fetch(e,{method:"POST",headers:t,body:i});if(!a.ok)throw new Error(a.statusText);return yield a.json()})},Je="advertory:ppids-cache",Ge={[ce.SE]:`SCH${ce.SE.toUpperCase()}-EnvHash`,[ce.NO]:`SCH${ce.NO.toUpperCase()}-EnvHash`},Ye={[ce.SE]:`SCH${ce.SE.toUpperCase()}-UserHash`,[ce.NO]:`SCH${ce.NO.toUpperCase()}-UserHash`},Qe={[ce.SE]:`sch${ce.SE}-envhash-v3`,[ce.NO]:`sch${ce.NO}-envhash-v3`},Xe={[ce.SE]:`sch${ce.SE}-userhash-v3`,[ce.NO]:`sch${ce.NO}-userhash-v3`},Ze={[ce.SE]:`'sch${ce.SE}-iosid-v3'`,[ce.NO]:`'sch${ce.NO}-iosid-v3'`},et={[ce.SE]:`sch${ce.SE}-androidid-v3`,[ce.NO]:`sch${ce.NO}-androidid-v3`},tt={[ce.SE]:"sdrn:schibsted.com:user",[ce.NO]:"sdrn:spid.no:user"};class nt{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const it=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return z(this,arguments,void 0,function*(e,t=1e4){var n,i;const a=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=a.xandr)||void 0===n?void 0:n.ppId1,null===(i=a.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||ae("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},at=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return z(this,void 0,void 0,function*(){var n,i,a,o,r,d,s,l,c,p,u;const v=je.get(Je),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(a=g.anId)||void 0===a?void 0:a.plain),void this.setPPIDs(null!==(o=c.userId)&&void 0!==o?o:"",null!==(r=c.environmentId)&&void 0!==r?r:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(p=null==g?void 0:g.idfv)||void 0===p?void 0:p.plain,null===(u=null==g?void 0:g.anId)||void 0===u?void 0:u.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||ae("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const a in e){if((null===(n=e[a])||void 0===n?void 0:n.plain)!==(null===(i=t[a])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const a=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});je.set(Je,a)}hashPPIDs(e,t){return z(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Ke.post(t,n,e)}catch(e){return ae("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return z(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>z(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${tt[t]}:${n}`:null}))(t,n),a=yield(e=>z(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),o=window.advertory_idfv,r=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:a},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},o?{idfv:{plain:o}}:{}),r?{anId:{plain:r}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:a}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:a.plain}}},ot=e=>z(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,country:i,isMobileApp:a}=e;if(!(yield De(n,a,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([it.processPPIDs(t,null==n?void 0:n.timeout),at.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){ae(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),rt=e=>{const{ppid1:t,ppid2:n}=it.getPPIDs(),{ppid1:i,ppid2:a,idfv:o,anId:r}=at.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new nt).add(n,Ge[e]).add(t,Ye[e]).add(a,Qe[e]).add(i,Xe[e]).add(o,Ze[e]).add(r,et[e]).buildEids()}]}},dt=e=>{const{ppid1:t,ppid2:n}=it.getPPIDs(),{ppid1:i,ppid2:a,idfv:o,anId:r}=at.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new nt).add(n,Ge[e]).add(t,Ye[e]).add(a,Qe[e]).add(i,Xe[e]).add(o,Ze[e]).add(r,et[e]).buildRyEids()}}]}}},st={FRONT:"front"};const lt=new class extends _e{prepare(e){return z(this,void 0,void 0,function*(){const t=this.getPageTypeKeywords()["aa-sch-page_type"],n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"aa-sch-country_code":ce.NO},this.getPublisherKeywords()),this.getPageTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getSupplyTypeKeywords()),this.getAppTypeKeywords()),this.getDeviceKeywords()),yield this.getAdvertisingConsentKeywords()),this.getHasContextKeywords(e.keywords)),yield z(void 0,void 0,void 0,function*(){const{glimr:e}=L.get(),{addPublisherToGeo:t}={},n=yield Me();if(!(null==e?void 0:e.enabled)||!n)return ae("No consent for getting glimr tags."),{};const i=pe(),a=He(t);return{[`${i}-geo`]:a.geoTags,[`${i}-weather`]:a.weatherTags,[`${i}-geofence`]:a.geofenceTags}})),(()=>{const{ppid1:e,ppid2:t}=it.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}})()),e.keywords),i=Object.assign(Object.assign({},n),this.getSponsorsKeywords()),a=Object.assign(Object.assign({},n),this.getPageTypeKeywords());return Object.assign(Object.assign({},e),{keywords:t===st.FRONT?a:i,user:Object.assign(Object.assign({},rt(ce.NO)),{externalUid:yield this.getExternalUid()}),member:this.getMember()})})}};var ct=lt.prepare.bind(lt);const pt=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),ut=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),vt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={}}=L.get(),a=[`${pe()}-geo`],o=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection",...i?a:[]],r=Object.fromEntries(Object.entries(e).filter(([e])=>o.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:r}}},d)}},gt=(e,...t)=>z(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const a=document.createElement("script");a.async=!0,a.src=e;const o=()=>{d(),n()},r=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{a.removeEventListener("load",o),a.removeEventListener("error",r),clearTimeout(s)};a.addEventListener("load",o),a.addEventListener("error",r);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(a)}).catch(e=>{console.error(e)}))}),ht=e=>e.includes("snoap.no"),mt=e=>{var t,n,i,a,o;return!!(null===(o=null===(a=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===a?void 0:a.ads[1])||void 0===o?void 0:o.rtb)},ft=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),a=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),o=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...o,a).toString()},yt=ft([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:a,clientHeight:o}=i,r=e/a,d=t/o;i.style.transform=`scale(${r},${d})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),bt=e=>{const t=ft([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},wt=[],xt={},kt=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=Tt(e);n?(Et(i,n),At(e,i,t)):(Et(i,n),It(e,i,t))})},Et=(e,t)=>{var n,i;const a=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!a)return;const o=t?"showFullscreen":"hideFullscreen";null===(i=a.contentWindow)||void 0===i||i.postMessage(`advertory:${o}-${e}`,"*")},Tt=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},At=(e,t,n)=>{e.classList.add("in-screen"),document.body.classList.add("fullscreen-scroll-in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),wt.includes(t)||wt.push(t),n&&window.addEventListener("scroll",xt[t],{passive:!0})},It=(e,t,n)=>{wt.includes(t)&&(n&&window.removeEventListener("scroll",xt[t]),document.body.classList.remove("fullscreen-scroll-in-screen"),e.classList.remove("in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},St=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:a=3}=t,o=[],r=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&o.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&r.push(t)}),()=>{o.length&&Ct(e,o,a,0),r.length&&Ct(e,r,a,40)}},Ct=(e,t,n,i)=>{const a=e.offsetHeight,o=window.scrollY,r=e.getBoundingClientRect().top+o;t.forEach(e=>{const t=e.offsetHeight;let d;d=r>o?(r-o)/t-i:(o+t-(r+a))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function Ot(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}Ot('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100% !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:0}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:1;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:19px !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const Pt={no:{adText:"ANNONSE",adFrom:"ANNONSE FRA",adContent:"ANNONSØRINNHOLD",adContentFrom:"ANNONSØRINNHOLD FRA"},se:{adText:"ANNONS",adFrom:"ANNONS FRÅN",adContent:"EXTERN LÄNK",adContentFrom:"EXTERN LÄNK FRÅN"}};let $t=null;const _t=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\n {\n const frame = window.frameElement;\n \n if (frame) {\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n window.addEventListener('message', function(event) {\n if (event.data === 'advertory:showFullscreen-'+document.body.id) {\n document.body.style.display= \"block\";\n } else if (event.data === 'advertory:hideFullscreen-'+document.body.id) {\n document.body.style.display= \"none\";\n }\n });\n }\n }\n ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${yt})()`,e+t.outerHTML})(n),n=(e=>{if((e=>e.includes("google"))(e))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("img");return n?(n.style.width="100%",n.style.height="100%",n.style.objectFit="cover",n.style.position="fixed",t.innerHTML):e})(n),n=(e=>{if(ht(e))return e;const t=document.createElement("style");return t.textContent="\n .GoogleActiveViewClass, .GoogleActiveViewElement {\n transform: translate(calc(-50% + 50vw), 0);\n width: 100vw !important;\n height: 100vh !important;\n }\n .GoogleActiveViewClass img, .GoogleActiveViewElement img {\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n }\n .GoogleActiveViewClass iframe {\n width: 100vw !important;\n height: 100vh !important;\n }\n ",e+t.outerHTML})(n),(e=>e.includes("adform"))(n)&&(n=(e=>{const t=document.createElement("script");t.textContent='\n var frame = window.frameElement;\n if (frame) {\n frame.style.removeProperty("width");\n frame.style.removeProperty("height");\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n var iframe = document.querySelector("adfm-ad iframe");\n if (iframe) {\n var image = iframe.contentWindow.document.getElementById("image");\n if (!image) return;\n image.style.backgroundSize = "cover";\n } else {\n var iframe = document.querySelector(".adform-adbox iframe");\n if (iframe) {\n var style = document.createElement("style");\n style.textContent = "#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}";\n iframe.contentDocument.body.append(style);\n iframe.style = "width: 100vw; height: 100vh;";\n } else {\n var observer = new MutationObserver(function(mutations, obs) {\n for (var mutation of mutations) {\n var iframe = mutation.addedNodes[0];\n if (iframe && iframe.nodeName === "IFRAME") {\n iframe.style = "width: 100vw; height: 100vh;";\n iframe.dataset.contents += "<style>#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}</style>";\n obs.disconnect();\n }\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n }\n ';const n=document.createElement("style");return n.textContent="\n html, body, adfm-ad, #sf_align, .adform-adbox, .adform-adbox img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover;\n max-width: 100vw;\n }\n ",e+n.outerHTML+t.outerHTML})(n)),(e=>e.includes("529299503"))(n)&&(n=bt(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>ht(e)?e:e.replace("<iframe ","<iframe onload=\"\n var f = document.querySelector('iframe');\n if (!f) return;\n var s = f.style;\n s.transform = 'scale(' + (window.innerHeight / Number(f.height)).toFixed(2) + ')';\n s.right = parseInt((Number(f.width) - window.innerWidth) / 2) + 'px';\n s.bottom = parseInt((Number(f.height) - window.innerHeight) / 2) + 'px';\n s.position = 'relative';\n \" "))(n)),ht(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</iframe>","</iframe><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),(e=>e.includes("kreateam.io"))(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</div>","</div><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),mt(t)&&(n=(e=>{const t=document.createElement("script");t.textContent='var frame = window.frameElement;\n if (frame) {\n frame.style.width = "100vw";\n frame.style.height = "100vh";\n }';const n=document.createElement("div");return n.innerHTML=e,n.appendChild(t),n.innerHTML})(n)),n},Lt=()=>{$t=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,a=document.documentElement;a.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),a.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),a.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},jt=()=>{$t||($t=window.requestAnimationFrame(Lt))},zt=(t,n)=>{var i,a,o,r;const{country:d}=L.get(),{targetId:s}=t;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(i=null==n?void 0:n.iosSafeAreaTopFix)&&void 0!==i?i:"0px"),(e=>{const{articlesContainerWidth:t=1302,backgroundColor:n="#fff",foregroundColor:i="#fff",margin:a="16px 0",beforeContentValue:o=""}=e,r=t/2,d=document.createElement("style");d.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${r}px),\n ${i} calc(50% - ${r}px),\n ${i} calc(50% + ${r}px),\n ${n} calc(50% + ${r}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${a};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${o&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${o}' !important;\n }`,d.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(d)})(null!==(a=null==n?void 0:n.overlayStyles)&&void 0!==a?a:{});const l=document.getElementById(s),c=null==l?void 0:l.parentElement;if(!l||!c)return;((e,t)=>{const n=(null==t?void 0:t.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>kt(e,n),{}),a=Tt(e);i.observe(e),n&&(xt[a]=St(e,t))})(c,n),l.className="advertory-fullscreen-scroll";const p=E(t,e)?"absolute":"fixed";l.style.position=p,c.className="advertory-fullscreen-scroll-wrapper",c.dataset.showTagSubscribeId=s,l.setAttribute("data-ad-label",Pt[d].adText),(null==n?void 0:n.moveCogwheelToTheLeft)&&(l.dataset.moveCogwheelToTheLeft="true"),jt(),window.addEventListener("resize",jt),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",jt),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",jt)},Nt=({targetId:e})=>{const t=(e=>{const{requests:t}=window.apntag,n=mt(e)?1:0;return null==t?void 0:t.tags[e].adResponse.ads[n].rtb.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=mt(e)?1:0;n&&(n.tags[e].adResponse.ads[i].rtb.banner.content=t)})(e,_t(t,e))},qt=()=>z(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,country:n,isMobileApp:i,fullscreenScroll:a}=L.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:o}=L.getHandlers(),{getConsentAsync:r}=Ee(t,i,n),d=yield r(),s=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const a=pt(),{prebid:{relevantCbTimeout:o}={}}=L.get(),r="relevantCb"===i&&o?o:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,a.loadTags&&a.loadTags())},r);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),l=pt(),p=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=pt();return{user:e,keywords:t}})();s.failsafeOnTimeout("relevantCb");const{user:{externalUid:u=""}={},keywords:v}=p;(()=>{const e=ut();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(s.getCancel()||!l.loadTags)return ae("core loadTags() call was cancelled",{cancel:s.getCancel(),apnTagLoadTags:!l.loadTags,condition:"or"}),void s.cleanup();const t=ut();s.events.relevantCb.done=!0,s.failsafeOnTimeout("auctionCb");const i=d?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};ae("prebid consentManagement",i),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},dt(n)),vt(v,u))),ae("core add prebid config",Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},dt(n)),vt(v,u))),t.loadPrebid({configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s.getCancel()||(s.events.auctionCb.done=!0,l.loadTags(e)),s.cleanup()}},customNativeRender:e=>{Dt(e,o)},directRenderFn:e=>{const{settings:t,renderFn:n}=e,{bid:i,adDiv:o}=t||{};if(!o)return;const r=n(t),d=Object.assign(Object.assign({},i),{targetId:o.id,banner:!0});c(d)&&(zt(d,a),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(r))}}),ae("core load prebid",{configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s.getCancel()||(s.events.auctionCb.done=!0,l.loadTags(e))}},customNativeRender:e=>{Dt(e,o)},directRenderFn:()=>{}})})}),Dt=(e,t)=>{var n;const{divId:i,native:a,bid:o}=e,r=document.querySelectorAll(`[id^=${i}]`)[0],d=`RY-${r.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(r,d);const s=null===(n=r.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;t({native:a,targetId:d},L.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:o.adId}),"*")};let Mt="";const Bt=new Map,Rt=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},Ft=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=R.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},Vt=()=>{U();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{K(e.id),Ft(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=re(e.id)}),q(()=>window.apntag.clearRequest())},Ut="noGroupedPlacements",Ht=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Wt=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Kt=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,deviceType:a}=L.get(),o=n[a].filter(Wt)||[],r=e?document.querySelector(e):document;if(!r)return[];const d=o.reduce((e,t)=>{const n=Ht(t.id);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=o.filter(({id:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDevice)?`div[id^="${e}"][data-device=${a}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=r.querySelectorAll(d),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{const i=Jt(e,t,n),a=`${e.id}-${((e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++)t+=N[Math.floor(36*Math.random())];return t})(6)}`;return e.id=a,e.setAttribute("data-advertory-ad-rendered","true"),i.finnBlink&&!i.finnBlink.renderOnlyWithAdBlock&&e.setAttribute("data-is-finn-blink-placement","true"),(e=>{var t;const n=e.id;n&&R.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},i),{id:a})});return(e=>{const{keywordsConfig:t}=L.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(Mt!==window.location.pathname&&(Bt.clear(),Mt=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=Bt.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${ue()}-count`]=i,Bt.set(n,i+1),e})):e})(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.id)-t.findIndex(e=>e.id===n.id))})(d)},Jt=(e,t,n)=>{const i=n[t],a=n[n.length-1],o=n.filter(({id:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.id)?i:(null==e?void 0:e.id)===(null==a?void 0:a.id)?a:o||a},Gt=e=>{const{queryConfig:{placementBatches:t}={},deviceType:n}=L.get(),i=(null==t?void 0:t[n])||{},a=Object.values(i).flat(),o=(e=>{const t={};return e.forEach(e=>{const n=re(e.id);e.isBackfill&&(t[n]=[e])}),t})(e),r=((e,t)=>{const n={};for(const[i,a]of Object.entries(t))n[i]=e.filter(e=>a.includes(re(e.id)));return n})(e,i),d=Object.keys(o),s=((e,t)=>e.filter(e=>!t.has(re(e.id))))(e,new Set([...d,...a]));return Object.assign(Object.assign(Object.assign({},r),o),{[Ut]:s})},Yt=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:a}=window,[o,r]=t;if(!i.dataset.lockedsize&&r&&o)i.style.width=`${o}px`,i.style.height=`${r}px`,n&&(a.resizeAd(i.id,[o,r]),i.dataset.lockedsize="true",i.dataset.lockedwidth=o.toString(),i.dataset.lockedheight=r.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&a.resizeAd(i.id,[e,t])}},Qt=["netboard","board"];class Xt{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:a}=e,o=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),r=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",a),o&&d.searchParams.append("urlData",o),r&&d.searchParams.append("excludedItems",r),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return z(this,void 0,void 0,function*(){var t,n;const i=yield this.identityFacade.getIdentityUser(),a=null!==(n=yield null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId())&&void 0!==n?n:"",o=(null==i?void 0:i.userId)?String(i.userId):"",r=this.buildUrl(e,{envId:a,spid:o});try{ae("Starting fetching DrEdition ad from URL:",r);const e={method:"GET"},t=yield Ke.get(r,e);return ae("Fetch operation completed successfully."),t}catch(e){ae("Error during fetch operation:",e)}return null})}}let Zt=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:a,creativeId:o}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:r}=t,d=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:r,utm_campaign:a,utm_medium:d},o&&{utm_id:`df-${o}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),a=new URLSearchParams(decodeURIComponent(e.search)),o=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{a.has(e)||o.set(e,null!=t?t:"")}),o.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const a=this.getDrEditionUTMParams(e,t),o=new URL(i);return Object.entries(a).forEach(([e,t])=>{o.searchParams.has(e)||o.searchParams.set(e,null!=t?t:"")}),o.toString()}handleVideo(e,t){return z(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:a,videoLoop:o,vendor:r}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:r,vgtvAutoplay:i,vgtvMuted:a,vgtvLoop:!!o,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:a}=new URL(n);if(!i.includes("www.vg.no")&&!a.includes("annonsorinnhold"))return[n];const o=a.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const en=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):ae("Dr. Edition container does not have a parent element, cannot remove height lock.")};class tn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return z(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{containerSelector:a},renderAsBackfill:o=!1}=t,r=e.querySelector(a);if(!r)return void ae(`Container with selector "${a}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||o?!(null==d?void 0:d.itemId)&&o?(ae("No Dr. Edition ads available to render. Collapsing whole placement."),K(e.id),void en(r)):((null==d?void 0:d.itemId)&&o&&(ae("Dr. Edition ad available to render as a Xandr backfill."),J(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(r,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),en(r),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):en(r))):(ae("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(r),this.showBackfill(e),void en(r))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";J(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let a=null;const o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(a&&clearTimeout(a),a=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{o.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{o.observe(e)}),!0}}class nn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return z(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Ee(n.tcf,n.isMobileApp,n.country),a=yield i(),o=te(n.device)?t.mobileHTML:t.desktopHTML,r=a?o:o.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=r,e.querySelectorAll("a").forEach(e=>{var i,a,o;e.search=null!==(o=null===(a=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===a?void 0:a.call(i,e,t,n))&&void 0!==o?o:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class an{constructor(e){this.strategy=e}handle(e,t){return z(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return z(this,void 0,void 0,function*(){const t=e.drEditionConfig.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield gt(t)}catch(e){ae("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return z(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,a=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==a||a.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const o=null==a?void 0:a.parentNode;if(!o)return;const r=o.closest("a");o.addEventListener("click",e=>{const t=e.target.closest("a");r!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,a;const{preview:{url:o,thumbnail:r}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!o)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",o),d.setAttribute("playsinline",""),!(!d||!r)&&(null===(a=(i=t.drEditionConfig).addPreviewVideo)||void 0===a||a.call(i,d),!0))}}let on=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,a=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=a?a:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return z(this,void 0,void 0,function*(){var i,a,o,r,d,s,l,c;if(!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(o=null===(a=this.pulse)||void 0===a?void 0:a.trackLegacyViewUIElement)||void 0===o||o.call(a,p):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return z(this,void 0,void 0,function*(){var i,a,o,r,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(a=(i=this.pulse).trackLegacyClickUIElement)||void 0===a||a.call(i,l):this.pulse.trackClickUIElement?null===(r=(o=this.pulse).trackClickUIElement)||void 0===r||r.call(o,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class rn extends on{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){const{pulseData:{title:i,clientName:a="",creativeId:o}={}}=t,{columnName:r,primaryPosition:d}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:i,placement:{columnName:r,primaryPosition:d},"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":o},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let dn=class extends on{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,a,o,r,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:p}={}}=t,u=n.editionName,v=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(r=null===(o=null===(a=this.newsroomStrategy)||void 0===a?void 0:a.getPulseObjectId)||void 0===o?void 0:o.call(a))&&void 0!==r?r:u,"@type":"UIElement",position:u,elementType:"Article",custom:{customer:c,creativeId:null!=p?p:l},page:{"@id":null!=g?g:u,"@type":v,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var a,o,r,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId:p,itemId:u,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),f=this.getTeaserElementText(e,"subtitle"),y=this.getTeaserElementText(e,"image"),b=null!==(d=null!==(r=null===(o=null===(a=this.newsroomStrategy)||void 0===a?void 0:a.getUrlWithParams)||void 0===o?void 0:o.call(a,t,n))&&void 0!==r?r:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:p,itemId:u,link:b,placement:n.editionName,subtitle:f,time:h,title:m,type:i,imageUrl:y,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const sn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},ln=e=>z(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),cn={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return z(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return vo})})}})}},pn=(e,t)=>{null==e||e.forEach(e=>{cn[e](t)})};class un{handleVideo(e,t){return z(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:a,vendor:o}}){yield z(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const r=["ContentMutePlugin"],d=this.createPlayerOverlay(e);pn(r,d);const s={id:t,node:n,autoplay:i,mute:a,vendor:o,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},l=yield ln(s);l.once("assetReady",()=>{sn(l,r)}),l.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),l.once("PulseStats:ready",()=>z(this,void 0,void 0,function*(){const e=yield l.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===st.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),a=i.split("/").filter(Boolean);return a.length?[...a.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const vn="https://www.aftonbladet.se/video-player-extras/latest/";class gn{handleVideo(e,t){return z(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:a,vendor:o}}){const r={id:t,node:n,autoplay:i,mute:a,vendor:o,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${vn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${vn}external-link.js`]:{name:"ExternalLink"}}};yield ln(r),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}getPulseObjectId(){return""}getPulsePageId(){return""}}const hn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class mn{handleVideo(e,t){return z(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:a,vendor:o}}){const r={id:t,node:n,autoplay:i,mute:a,vendor:o,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},hn(e)?e:{}),{provider:Object.assign(Object.assign({},hn(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield ln(r);d.once("PulseStats:ready",()=>z(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===st.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let fn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const yn=(e,t,n)=>{var i;const{publisher:a,pageType:o,country:r}=e,d={[he.VG]:new Zt,[he.E24]:new un,[he.AFTONBLADET]:new gn,[he.SVD]:new mn}[a]||new fn,s=new(r===ce.SE?rn:dn)(n,d,o),l=new Xt(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new nn(d,s),p=new an(d);return new tn(l,c,p,s)},bn=()=>z(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class wn{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return z(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return ae("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return z(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const xn=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig,a=document.querySelectorAll(i),o=new IntersectionObserver((i,a)=>((e,t,n,i,a)=>{const o=yn(n,i,a);e.forEach(e=>{var i,a,r;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(a=d.dataset.pulseColumnname)&&void 0!==a?a:"",c=null!==(r=d.dataset.pulsePrimaryposition)&&void 0!==r?r:"";o.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(i,a,e,t,n),{rootMargin:"400% 0px"});a.forEach(e=>o.observe(e))},kn=[],En=(e,t)=>z(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:a,deviceType:o,drEdition:r,publisher:d,pageType:s,country:l,isMobileApp:c}=e;if(!(yield De(a,c,l,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n;const{deviceType:i,placements:a,drEdition:{fallbackGlobalEditionName:o}={}}=e,r=a[i]||a.desktop,d=re(t.targetId),s=r.find(e=>e.id===d),l=Qt.some(e=>d.startsWith(e)),c=kn.includes(d),p=(null===(n=null==s?void 0:s.drEdition)||void 0===n?void 0:n.editionName)||o;return s&&l&&!c&&p?(kn.push(d),Object.assign(Object.assign({},s),{drEdition:Object.assign(Object.assign({},s.drEdition),{editionName:p})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void ae("Pulse has not been passed as a prop, aborting");const u=yield bn(),v=new wn(u),g=yn({publisher:d,pageType:s,country:l},v,null==i?void 0:i.instance),h=document.getElementById(t.targetId);if(!h||!r)return;h.classList.value="";const m=document.createElement("div");m.className=r.containerSelector.replace(/^[.#:[\]]+/,""),h.innerHTML=m.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:o,tcf:a,isMobileApp:c,country:l,renderAsBackfill:!0};yield g.fetchAndRenderAd(h,f)}),Tn="collapseAd",An="hideAd",In="resizeAd",Sn="renderDrEditionFallback",Cn="wallpaperImageUrl",On="wallpaperColor",Pn="velvet",$n=[In,Cn,On,Tn,An,Sn,Pn];let _n;const Ln=e=>{if("object"==typeof e)return e;if(t=e,W.test(t)){const t=e.replace(/^wallpaper:url:/,"");return{name:Cn,wallpaperImageUrl:t}}var t;if((e=>e.startsWith("wallpaper:color:"))(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:On,wallpaperColor:t}}if(e.startsWith(Sn)){const t=e.split(":")[1];return{name:Sn,targetId:t}}if(e.startsWith(Tn)||e.startsWith(An)){const t=e.split(":")[1];return{name:Tn,targetId:t}}if(e.includes("name")&&$n.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}},jn=e=>{if(!["http://acdn.adnxs-simple.com","https://acdn.adnxs-simple.com","https://crcdn01.adnxs-simple.com","http://crcdn01.adnxs-simple.com","https://acdn.adnxs.com","http://acdn.adnxs.com","https://adsdk.microsoft.com","https://adsdk.bing.net","https://adsdkprod.azureedge.net"].includes(e.origin.trim()))return;const{data:t}=e;if(!t)return;const n=Ln(t);if(!n)return;if(!n.name||!$n.some(e=>n.name===e))return;const{name:i,targetId:a,wallpaperImageUrl:o,wallpaperColor:r,cmd:d,size:s}=n;i===Pn&&d&&(d.includes("noScroll")&&(_n=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(d.includes("close")||d.includes("ended"))&&(null==_n||_n(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==Tn&&i!==An||!a||K(a),i===In&&a&&d&&Yt(a,d),i===Sn&&a&&(K(a),En(L.get(),{targetId:a})),"resizeMediationAd"===i&&a&&s&&Yt(a,s,!0),i===Cn&&o&&(e=>{const t=document.querySelector(`.${F}`);t&&(t.style.backgroundImage=`url(${e})`)})(o),i===On&&r&&(e=>{const t=document.querySelector(`.${F}`);t&&(t.style.backgroundColor=e)})(r)},zn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Nn=(e,t)=>{if(y(t))return ae(`loading finn blink ad with full ads chain for ${t}`),void G().withFullAdsChain(t);q(()=>(ae("core showTag",{id:t}),e.showTag(t)))},qn=(e,t)=>z(void 0,void 0,void 0,function*(){yield D,yield M;const n=new IntersectionObserver((e,t)=>((e,t,n)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:i}=e,a=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(i),o=document.getElementById(a);ae("core log from intersection observer handler",{targetId:a,element:o}),n(window.apntag,a),o&&(t.unobserve(o),t.disconnect())})})(e,t,Nn),zn(t));n.observe(e)}),Dn=new Map,Mn=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Bn=".brandstudio-premium-content-widget",Rn=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Fn=({adWrapper:e,placementContainer:t})=>{const n=Rn({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),Ft(i=t),i.innerHTML=""},Vn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Un=({adWrapper:e,placementContainer:t})=>{const{publisher:n}=L.get(),i=Mn.includes(n)&&Boolean(t.closest(Bn));const a=i?t.closest(Bn):null,o=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,r=n&&t.matches("iframe, article")&&e;if(!n||!i&&!r||i&&!a)return;if(r)return Vn(e),void o.disconnect();const d=t.closest('[style*="height"]'),s=a;d&&s.contains(d)?Vn(d):s.hasAttribute("style")&&Vn(s),o.disconnect()})})});try{o.observe(t,{childList:!0,subtree:!0})}catch(e){o.disconnect()}},Hn=(e,t,n,i,a,o)=>{var r;const d=performance.now(),s=null!==(r=Dn.get(t))&&void 0!==r?r:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,a)&&n<0;d-s>=a&&l&&(Dn.set(t,d),((e,t,n)=>{const i=null==n?void 0:n.parentElement;i&&n&&Fn({adWrapper:i,placementContainer:n}),q(()=>{e.setKeywords([t],{[`${pe()}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,o))},Wn=(e,t,n,i)=>{const a=new IntersectionObserver((e,t)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:a,boundingClientRect:o}=e;t(window.apntag,a.id,o.y,n,i,a)})})(e,Hn,n,i),zn(t));a.observe(e)},Kn=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const a=e.slice(i,i+t);n.push(a)}return n},Jn=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Gn=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Yn=(e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),a=null==i?void 0:i.parentElement;if(!a||!i)return;Un({adWrapper:a,placementContainer:i});const{delayTime:o=1e3}=t,r=(new Date).getTime();if(i&&"true"!==i.dataset.subscribedForRefresh){const e=(e=>{var t;const{deviceType:n,preloadMarginsConfig:i}=L.get(),a=null==i?void 0:i[n];return((e,t)=>t[e])(null!==(t=e.dataset.priority)&&void 0!==t?t:"normal",(({high:e,normal:t,low:n}={})=>{var i,a,o,r,d,s;return{high:{refreshMargin:null!==(i=null==e?void 0:e.refreshMargin)&&void 0!==i?i:600,renderMargin:null!==(a=null==e?void 0:e.renderMargin)&&void 0!==a?a:300},normal:{refreshMargin:null!==(o=null==t?void 0:t.refreshMargin)&&void 0!==o?o:300,renderMargin:null!==(r=null==t?void 0:t.renderMargin)&&void 0!==r?r:150},low:{refreshMargin:null!==(d=null==n?void 0:n.refreshMargin)&&void 0!==d?d:100,renderMargin:null!==(s=null==n?void 0:n.renderMargin)&&void 0!==s?s:50}}})(a)).refreshMargin})(i);i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Wn(i,e,r,o)}},Qn=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=L.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),ni(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Xn=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const a of i){const i=e.find(e=>{var t;return e.id===(null===(t=a.firstElementChild)||void 0===t?void 0:t.id)&&e.bfCacheRefresh}),o=null==i?void 0:i.threshold;Gn(a,o)&&i&&(Rt(i.id),n.length&&a.classList.remove(...n),ni([i],t))}},Zn=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},isMobileApp:i}=L.get();t&&(e.forEach(({id:e})=>{const t=ei(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{Xn(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Xn(e,!1,t))};n.persisted&&(Jn()?window.addEventListener("scroll",i,{passive:!0}):Xn(e,!1,t))})})(e,n))},ei=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},ti=e=>{const{id:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(ei(t)),a=(e=>1===e[0]&&1===e[1])(i),o={sizes:[i],allowedFormats:a?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return a||(o.native=void 0),o},ni=(e,t=!1)=>{const{requestSize:n=$}=L.get(),i=e.map(({id:e})=>e),a=Kn(i,n);if(t)for(const t of e){const e=ti(t);window.apntag.modifyTag(t.id,e)}for(const e of a)q(()=>window.apntag.refresh(e))};const ii="#fff",ai="#0098da",oi="splash",ri="welcomePage",di="topscroller",si="velvet",li="takeover-displayed",ci="takeover-visit-count",pi=14400,ui=()=>{const e=Te(ci);return e?parseInt(e):0},vi=()=>{const{takeover:{enabled:e=!1,secondVisitEnabled:t=!1}={}}=L.get();return!window.location.href.includes("takeover=0")&&(!!window.location.href.includes("takeover=1")||!(!e||(()=>{var e;const t=(null===(e=L.get().takeover)||void 0===e?void 0:e.cookieCapName)||li;return"true"===Te(t)})())&&(!t||gi()))},gi=()=>{const e=ui();return 0===e?((()=>{const e=ui(),{takeover:{cookieCapTime:t=pi}={}}=L.get(),n=document.location.hostname;window.document.cookie=`${ci}=${e+1}; max-age=${t}; domain=${n}; path=/`})(),!1):1===e},hi=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),mi=()=>{const{takeover:e}=L.get();return Boolean(null==e?void 0:e.topscroller)},fi=()=>z(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{cookieCapName:t=li,cookieCapTime:n=pi}={},isMobileApp:i,tcf:a,country:o}=L.get(),r=yield De(a,i,o,"ad-takeover-cookiecap");n&&r&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),yi=e=>{var t;const n=!!(null===(t=L.get().takeover)||void 0===t?void 0:t.setCookieCapForNotShownAd);return v(e)&&n},bi=(e,t)=>{var n;if(t===di){const{topscroller:t}=e;return null!=t?t:{}}if(t===oi){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},wi=(e,t)=>{t!==oi?(e=>{var t,n,i;const a=null===(n=null===(t=L.get().takeover)||void 0===t?void 0:t.welcomePage)||void 0===n?void 0:n.headerElementSelector,o=null===(i=L.get().takeover)||void 0===i?void 0:i.topscroller;if(!a||o)return;const r=document.querySelector(a),d=document.querySelector(".welcome-page-wrapper"),s=document.querySelector(`#${e.targetId}`),l=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&d&&l&&s))return;const c=null==r?void 0:r.offsetHeight,p=g(e)?"60svh":`calc(100svh - ${c}px)`,u=g(e)?"calc(40svh + 30px)":`calc(${c}px + 30px)`;d.style.setProperty("height",p,"important"),s.style.setProperty("height",p,"important"),l.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=L.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const a=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",a,"important")})(e)},xi=ft([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),ki=(e,t=!0)=>{(e===ri||e===di)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Ei=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Ti=e=>{document.body.style.overflow=e?"initial":"hidden"},Ai=e=>{const t=Si(e),n=Ii(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Ti(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Ii=e=>{const t=()=>Ai(e);return window.addEventListener("advertory:closeTakeover",t),Ei(),t},Si=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Ai(e)};return Ei(),window.addEventListener("keydown",t),t},Ci=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Si(e),Ii(e),Ei(),t.addEventListener("click",()=>{Ai(e)}),Ti(!1))},Oi=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Ii(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Pi=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Ai(e))})(e)},$i=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=L.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=Pt.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},_i=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Pt.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Li=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Pt.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},ji=e=>{e.classList.toggle("advertory-impact-wrapper",!0)},zi=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},Ni=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${xi})()`,e+t.outerHTML})(e)),n},qi=e=>{const t=(e=>{const{requests:t}=window.apntag,n=mt(e)?1:0;return null==t?void 0:t.tags[e].adResponse.ads[n].rtb.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=mt(e)?1:0;n&&(n.tags[e].adResponse.ads[i].rtb.banner.content=t)})(e,Ni(t))},Di=e=>z(void 0,void 0,void 0,function*(){const{takeover:t}=L.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),a=document.querySelector(".advertory-takeover-wrapper");if(!i||!a||!t)return;const r=(e=>{const{width:t,height:n}=e;return hi(t,n)?oi:E(e,o)?si:mi()?di:ri})(e),d=a.offsetHeight,s=window.scrollY>d;a.style.display="block",!s&&ki(r,!1),((e,t)=>{({[ri]:Li,[oi]:$i,[di]:_i,[si]:ji})[t](e)})(a,r),zi(),((e,t)=>{({[ri]:Oi,[di]:Oi,[oi]:Ci,[si]:Pi})[t](e)})(a,r),((e,t,n)=>{if(!n)return;({[ri]:()=>{const{buttonLabel:i}=bi(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[oi]:()=>{const{themeColors:i,logotype:a,buttonLabel:o,showArrowIcon:r}=bi(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=o?o:""),".advertory-splash-close"===t&&r){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&a&&(n.setAttribute("src",a.url),n.setAttribute("alt",a.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:ii,"important"),n.style.color=null!=t?t:ai}}})},[di]:()=>{const{buttonLabel:i,showArrowIcon:a,showCloseButton:o=!0}=bi(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||a||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[si]:()=>{}})[t]()})(a,r,t),yield fi(),!s&&ki(r,!0),wi(e,r)});Ot(".advertory-brandmetrics-survey{width:100%}");const Mi="advertory-brandmetrics-survey",Bi=()=>z(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},country:t,isMobileApp:n,tcf:i}=L.get(),a=yield De(i,n,t,"norstat");if(!e||n||!a)return;const o=(e=>{const{ppid1:t,ppid2:n}=it.getPPIDs(),{ppid1:i,ppid2:a}=at.getPPIDs(),o=(new nt).add(n,Ge[e]).add(t,Ye[e]).add(a,Qe[e]).add(i,Xe[e]);return`${o.buildNorstatPath()}?${o.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{z(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${t===ce.NO?"schibsted":"schibstedse"}/map/${o}`,"norstat")}),Ri={nativeAd:e=>p(e)&&!f(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:u,fullscreenScroll:c,topscroller:e=>v(e)&&mi(),splash:e=>v(e)&&hi(e.width,e.height),welcomePage:v,wallpaper:h,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:x,hFormat:k,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!k(e)&&!x(e),topboard:e=>e.targetId.startsWith("topboard")&&!v(e),widescreen:e=>e.targetId.startsWith("widescreen"),insider:e=>e.targetId.startsWith("insider"),sponsorstripe:f,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!b(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!w(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:b,midboard:w},Fi=({adObj:e,preferredTestIdData:t})=>{var n,i;const a=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!a)return;const o=null===(i=document.querySelector(`#${a}`))||void 0===i?void 0:i.parentElement;if(!o)return;if(((e,t)=>{var n,i,a,o;const r=null===(o=null===(a=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===a?void 0:a[e])||void 0===o?void 0:o.invCode;r&&(t.dataset.invCode=r)})(a,o),null==t?void 0:t.testId)return void(o.dataset.testid=t.testId);const r="DIV"===(null==o?void 0:o.tagName);e&&r&&((e,t)=>{var n,i;for(const[a,o]of Object.entries(Ri))if(o(e)){if("nativeAd"===a){const o="default";t.dataset.testid=`${a}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:o}`;break}t.dataset.testid=a;break}})(e,o)},Vi=e=>{var t;return(null===(t=Object.entries(Ri).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},Ui=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},Hi=new Map;Hi.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Hi.set("panorama",{scale:.79,transformOrigin:"center center"}),Hi.set("outstream",{scale:.79,transformOrigin:"center center"}),Hi.set("integration",{scale:.79,transformOrigin:"center center"}),Hi.set("toppanorama",{scale:.8,transformOrigin:"left center"});const Wi=e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=Vi(e),a=Hi.get(i),o=document.querySelector(`#${e.targetId}`);if(!o||!a)return;if(o.style.transformOrigin=a.transformOrigin,o.style.transform=`scale(${a.scale})`,!(null==a?void 0:a.cogwheelAdjust))return;const r=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==o?void 0:o.offsetWidth;r&&"number"==typeof d&&!isNaN(d)&&r.style.setProperty("right",String(-1*d*.2)+"px")},Ki=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,Ji=e=>`externalImpId:'${e}'`,Gi=e=>{var t;const{forwardExternalImpId:n=!1,tracker:i}=L.get(),a=(e=>{var t;if(!e.positionConfig)return e;const n=e.keywords[`${ue()}-count`],i=e.positionConfig.find(e=>e.adPositionIndex===n);if(!i)return e;const a=i.keywords?Object.assign(Object.assign({},e.keywords),i.keywords):e.keywords;return Object.assign(Object.assign({},e),{sizes:null!==(t=null==i?void 0:i.sizes)&&void 0!==t?t:e.sizes,keywords:a})})(e),{id:o,sizes:r,keywords:d,allowedFormats:s,invCode:l,ssa:c=!1,nativeCustomProperties:p,safeframeConfig:u,resizeAdParentDiv:v=!1,dynamicSizeWidthCheck:g=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||vi())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=null==n?void 0:n.filter(e=>e!==di),a=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),o=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:o,keywords:a})})(a),h=Object.assign({invCode:l,sizes:r,targetId:o,keywords:Ki(d,c),allowedFormats:s,resizeAdParentDiv:v,dynamicSizeWidthCheck:g},u&&{safeframeConfig:u}),m=(e=>{var t,n,i,a,o,r,d;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(ae("Tracker state pageViewId is:",null===(o=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===o?void 0:o.pageViewId),null===(d=null===(r=null==e?void 0:e.instance)||void 0===r?void 0:r.state)||void 0===d?void 0:d.pageViewId):(ae("Tracker state does not contain field pageViewId or it is empty"),""):(ae("Tracker state is empty"),""):(ae("Tracker is not configured in initAdvertory function"),"")})(i);n&&m&&(ae("External Impression ID assigned to defineTag:",Ji(m)),h.externalImpId=Ji(m));const f=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon2:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(p);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(h.native=f),h},Yi=e=>!e.includes("takeover")||vi(),Qi=e=>{const{publisher:t=""}=L.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)},Xi=e=>{if(!e)return e;const t=e[`${pe()}-targetid`],n=t?re(t[0]):"";return Object.assign(Object.assign({},e),t&&{[`${pe()}-targetid`]:[n]})},Zi=e=>Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${pe()}-geo`]&&{[`${pe()}-geo`]:["geo-test-value"]}),e[`${pe()}-geofence`]&&{[`${pe()}-geofence`]:["geofence-test-value"]}),e[`${pe()}-weather`]&&{[`${pe()}-weather`]:["weather-test-value"]}),ea=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],a=e.find(e=>e.invCode===i),o=document.querySelector(`[id^=${null==a?void 0:a.id}]`);o&&o.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},ta=(e,t)=>z(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})}),na={arrayMerge:(e,t)=>t},ia=e=>z(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>z(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield Ke.get(t,{method:"GET",signal:n.signal})}catch(e){throw ae("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?(({siteConfig:e,configOverrides:t})=>{var n;const{keywords:i,refresh:a,placements:o,threshold:r,batchSize:d}=t,s=C.all([e.placements,o],na),l=C(e.pageOptions,{keywords:i},na),c=C(e.appearanceConfig,{defaultThreshold:r},na),p=C(null!==(n=e.refreshConfig)&&void 0!==n?n:{},{scrollRefreshEnabled:a},na);return Object.assign(Object.assign({},e),{placements:s,requestSize:null!=d?d:e.requestSize,pageOptions:l,appearanceConfig:c,refreshConfig:p})})({siteConfig:e,configOverrides:t}):e}catch(t){return ae("Error fetching S3 config, using site config",{error:t}),e}}),aa=".advertory-right-column-track",oa="--advertory-right-column-track-height",ra=e=>e.getBoundingClientRect().top+window.scrollY,da=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},sa=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},la=(e,t)=>`${e}-${t}`,ca=(e,t,n)=>{var i;const a=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),o=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===o.length)return;const r=ra(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=da(e);sa("--advertory-newsroom-header-height",t)})(),o.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=ra(e),a=la(oa,t),o=i-n,r=la("--advertory-right-column-split-point-height",t),d=da(e);sa(a,o),sa(r,d)})(e,t+1,r),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=la("--advertory-right-column-ad-height",t),i=da(e);sa(n,i)})(a[t])});((e,t)=>{const n=ra(e);sa(oa,n-t)})(o[Math.min(a.length,o.length-1)].point,r)};let pa=!1;class ua{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:a}=new URL(n);if(!i.includes("www.vg.no")&&!a.includes("annonsorinnhold"))return[n];const o=a.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class va{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class ga{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return z(this,void 0,void 0,function*(){var t,n,i,a,o,r,d,s;if(!this.pulse)return;const l=this.getEventInput(e,"view");(null===(t=this.pulse)||void 0===t?void 0:t.trackLegacyViewUIElement)?null===(i=null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)||void 0===i||i.call(n,l):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)||void 0===r||r.call(o,l):null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackElementView)||void 0===s||s.call(d,l)})}trackContentClick(e){return z(this,void 0,void 0,function*(){var t,n,i,a,o,r;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(a=(i=this.pulse).trackClickUIElement)||void 0===a||a.call(i,d):null===(r=(o=this.pulse).trackElementClick)||void 0===r||r.call(o,d)})}}class ha extends ga{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,a,o,r;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),p=this.mapPageType(this.pageType),u=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==a?a:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=u?u:c,"@type":p,url:location.origin},tags:null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===r?void 0:r.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const ma="[data-k5a-teaser-analytics]",fa=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const a=new ha(e,t,n),o=new WeakMap,r=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(ma);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(a.trackContentView(n),t.unobserve(e.target),r(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(ma);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(a.trackContentView(e),t.unobserve(e),r(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>a.trackContentClick(e))})};class ya{handleKilkayaStreamTracking({pulse:e,pageType:t,publisher:n}){if(!(null==e?void 0:e.instance))return;const i={[he.VG]:new ua}[n]||new va;fa(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(ae(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";J(i)}loadKilkayaScript(e){return z(this,void 0,void 0,function*(){yield gt(e)})}run(e){return z(this,void 0,void 0,function*(){const{tcf:t,isMobileApp:n,country:i,kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const o=yield De(t,n,i,"kilkaya");o&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(o),yield this.loadKilkayaScript(a.url),this.handleKilkayaStreamTracking(e))})}}const ba=e=>{var n,i,a,o,r,d;const{adScaleConfig:s,deviceType:l}=L.get();if(!(null==s?void 0:s.enabled))return;if(E(e,t))return;const c=null!==(n=s.adsToBeScaled[l])&&void 0!==n?n:[],p=Ht(e.targetId.split("-")[0]);if(!c.includes(p))return;const u=null!==(a=null===(i=s.offset)||void 0===i?void 0:i[p])&&void 0!==a?a:0,v=document.getElementById(e.targetId),g=null!==(o=null==v?void 0:v.offsetWidth)&&void 0!==o?o:window.screen.width,h=null!==(d=null===(r=null==v?void 0:v.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==d?d:window.screen.width;((e,t=window.screen.width)=>{const n=Ui(e,t),i=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);i&&(i.style.transform=`scale(${n})`,i.style.transformOrigin="left top")})(e,(g<h?g:h)-u)};let wa,xa=[];const ka=["takeover","wallpaper"],Ea=e=>{const t=(e=>{const t=R.getData("alertoryConfigKeywords"),{queryConfig:n,placements:i,tcf:a,glimr:o,appearanceConfig:r,requestSize:d=$,publisher:s,country:l,pageType:c,deviceType:p,isMobileApp:u=!1,pageOptions:{member:v},takeover:g,fullscreenScroll:h,useAppTabletInvCode:m}=e;return{xandr:{member:v,keywords:t,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({publisher:s,country:l,pageType:c,deviceType:p,placements:i,tcf:a,requestSize:d,isMobileApp:u,useAppTabletInvCode:m},o&&{glimr:o}),n&&{queryConfig:n}),r&&{appearanceConfig:r}),g&&{takeover:g}),h&&{fullscreenScroll:h})}})(e);window.advertory={initialized:!0,siteConfig:e,alertoryConfig:t}},Ta=()=>z(void 0,void 0,void 0,function*(){const{pageOptions:e}=L.get(),{preparePageOptions:t}=L.getHandlers(),n=(()=>{const{sandboxAdIframeEnabled:e=!0}=L.get();return{sandboxAdIframe:e,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield z(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=L.get();return(yield De(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),a=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=R.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Zi(e);R.setData("alertoryConfigKeywords",n)})(a.keywords),q(()=>wa.setPageOpts(a))}),Aa=e=>z(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,isMobileApp:i,country:a}=L.get();Ia(e);const o=yield De(n,i,a,"prebid");(null==t?void 0:t.enabled)&&o?(ae("core loadPlacements prebid enabled"),yield qt()):(ae("core load tags invoked without prebid enabled"),Sa(e))}),Ia=e=>{const{prepareTag:t}=L.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.id.includes(t)),a=t.findIndex(e=>n.id.includes(e));return-1!==i&&-1===a?-1:-1===i&&-1!==a?1:i-a})})(e).forEach(e=>{ae("core defineTags",{placement:e});const i=Gi(e);if(Yi(e.id)){const a=t(i),o=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:a}=e;return{adTypes:t,invCode:n,keywords:Xi(i),sizes:a}})(a);n.push(o),q(()=>(ae("core defineTag - add to the queue",{placement:e,preparedTag:a}),wa.defineTag(a)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},Sa=e=>{const t=e.filter(({id:e})=>Yi(e)).map(({id:e})=>e);t.length&&q(()=>(ae("core loadTags",{placementsIdsToLoad:t}),wa.loadTags([...t])))},Ca=(e,t)=>z(void 0,void 0,void 0,function*(){const{appearanceConfig:n,deviceType:i}=L.get(),{threshold:a,refresh:o,priority:r="normal"}=e,d=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),s=null==n?void 0:n.defaultThreshold[i];d&&(ae("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,threshold:a,deviceDefaultThreshold:s}),yield qn(d,null!=a?a:s)),d&&o&&(ae("core showAd - setup refreshing",{placement:e,adObj:t}),d.dataset.refresh=o.toString(),d.dataset.priority=r)}),Oa=e=>e.some(({id:e})=>ka.some(t=>e.includes(t))),Pa=e=>z(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const{requestSize:n=$}=L.get(),i=Gt(e);for(const e of Object.keys(i)){const t=i[e],a=Kn(t,n);for(const e of a)Oa(e)?(ae("core loadAds without lazy loading",{placementsToLoad:e}),yield Aa(e)):e.length&&(ae("core loadAds with lazy loading",{placementsToLoad:e}),yield $a(e))}}),$a=e=>z(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=L.get(),i=[];if(!t)return ae("lazy load is not enabled",{placements:e}),void(yield Aa(e));const a=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{ae("lazy load is enabled - handler start",{loadedPlacementIds:i,placements:e});const a=e.every(e=>i.includes(e.id)),o=e.map(e=>e.id);!a&&i.push(...o),!a&&Aa(e),ae("lazy load is enabled - handler stop",{loadedPlacementIds:i,placements:e,arePlacementsLoaded:a,placementIds:o}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.id);t&&(ae("lazy loading - observe element",{placementId:e.id,element:t}),a.observe(t))})}),_a=()=>z(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t,wallpaperHandlers:{initWallpaperAd:i,adjustAdToHorseshoe:a}}=L.getHandlers(),{wallpaper:o,fullscreenScroll:r}=L.get(),d=[];q(()=>{wa.onEvent("adRequested",()=>{e.adRequested()}),wa.onEvent("adAvailable",n=>z(void 0,void 0,void 0,function*(){var a,d,s,l,u,g;ae("core adAvailable start",{placementsAvailable:xa,adObj:n,isFullscreenScrollAd:c(n),isFinnBlink:y(n.targetId),isNativeAd:p(n),isMediation:me(n),isTakeoverAd:v(n),isCollapseAd:m(n),isWallpaperAd:h(n)});const f=null===(s=null===(d=null===(a=null===window||void 0===window?void 0:window.apntag)||void 0===a?void 0:a.requests)||void 0===d?void 0:d.tags[n.targetId])||void 0===s?void 0:s.adResponse.ads;me(n)&&f&&(null===(l=f[1])||void 0===l?void 0:l.rtb)&&(n.banner=null===(g=null===(u=f[1])||void 0===u?void 0:u.rtb)||void 0===g?void 0:g.banner),c(n)&&Nt(n),c(n)&&!y(n.targetId)&&zt(n,r),!p(n)||me(n)||y(n.targetId)||t(n,L.get()),v(n)&&!m(n)&&(qi(n.targetId),yield Di(n)),h(n)&&(i(()=>q(()=>window.apntag.showTag(n.targetId)),o),R.setData("wallpaper",{isAvailable:!0})),(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(n)&&R.setData("horseshoe",{isAvailable:!0}),Fi({adObj:n}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:a}=e;a?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(n),e.adAvailable(n);const b=xa.find(({id:e})=>e===n.targetId);b&&(yield Ca(b,n),xa=xa.filter(e=>e.id!==b.id)),ae("core adAvailable stop",{placementsAvailable:xa,adObj:n,isFullscreenScrollAd:c(n),isFinnBlink:y(n.targetId),isNativeAd:p(n),isMediation:me(n),isTakeoverAd:v(n),isCollapseAd:m(n),isWallpaperAd:h(n)})})),wa.onEvent("adLoaded",i=>{const{refreshConfig:o,appearanceConfig:r}=L.get(),s=document.getElementById(i.targetId);y(i.targetId)&&(e=>{const{fullscreenScroll:t}=L.get(),{initNativeAd:n}=L.getHandlers();c(e)&&zt(e,t),p(e)&&n(e,L.get())})(i);d.includes(i.targetId)&&p(i)&&(t(i,L.get()),Fi({adObj:i})),!d.includes(i.targetId)&&me(i)&&d.push(i.targetId),m(i)&&K(i.targetId),v(i)&&((e,t)=>{var n;const i="100%",a="100%";e.resizeAd(t,[i,a]);const o=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(o),t=e.width,n=e.height;t===i&&n===a||(o.style.width=i,o.style.height=a)}}).observe(o,{attributes:!0,attributeFilter:["style"]})})(wa,i.targetId),u(i)&&(e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=L.get();if(!t||!n||!i)return;const a=t.parentElement;a&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),a.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))})(i),(e=>E(e,n))(i)&&(e=>{const t=document.querySelector(`#${e.targetId}`),n=null==t?void 0:t.querySelector("iframe"),i=null==n?void 0:n.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:o}={}}=L.get();if(!t||!n||!i)return;const r=window.innerWidth,d=Math.round(r/1080*1920);t.style.width="100%",t.style.height=`${d}px`,t.classList.add(`advertory-${a}-${o}__vertical-full-width-ad`);const s=Ui(e,t.offsetWidth);i.style.transform=`scale(${s})`,i.style.transformOrigin="left top"})(i),Yn(i,o),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(i.targetId);var l,g;R.getData("horseshoe").isAvailable&&a(i.targetId),ba(i),e.adLoaded(i),l=i.targetId,!document.querySelector(`#gdprAdTransparencyCogWheelButton-${l}`)&&(null===(g=window.gdpr)||void 0===g?void 0:g.setupButton)&&window.gdpr.setupButton(l),s&&(s.classList.add("ad-loaded"),(e=>{var t;const{siteSpecificConfig:n}=L.get(),i=null!==(t=null==n?void 0:n.mainColumnWidth)&&void 0!==t?t:1/0;e.clientWidth>i&&e.setAttribute("data-two-column-ad-layout","true")})(s)),Wi(i),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:i.targetId,adFormat:Vi(i)}}))}),wa.onEvent("adNoBid",t=>z(void 0,void 0,void 0,function*(){K(t.targetId),yield En(L.get(),t),yi(t)&&(yield fi()),e.adNoBid(t)})),wa.onEvent("adError",(t,n)=>z(void 0,void 0,void 0,function*(){yi(n)&&(yield fi()),e.adError(t,n)})),wa.onEvent("adCollapse",()=>{e.adCollapse()}),wa.onEvent("adRequestFailure",t=>{K(t.targetId),e.adRequestFailure(t)}),wa.onEvent("adBadRequest",t=>{K(t.targetId),e.adBadRequest(t)}),wa.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),wa.onEvent("adNoBidMediated",t=>e.adNoBidMediated(t))})}),La=(e,t)=>z(void 0,void 0,void 0,function*(){var n;L.set(e),L.setHandlers(t),R.initialize(),window.addEventListener("message",jn,!1),wa=window.apntag||{anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}},window.apntag=wa,ae("Apn tag is set up on window"),yield Promise.allSettled([z(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=L.get();(yield De(e,t,n,"xandr-endpoint"))||wa.setEndpoint("ib.adnxs-simple.com",!0)}),z(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,isMobileApp:n,country:i}=L.get(),a=yield De(t,n,i,"prebid");(null==e?void 0:e.enabled)&&a&&(yield gt(null==e?void 0:e.url))}),ot(e),z(void 0,void 0,void 0,function*(){const{astUrl:e}=L.get();yield gt(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),z(void 0,void 0,void 0,function*(){const{gptUrl:e}=L.get();yield gt(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js")}),z(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,url:t}={},tcf:n,isMobileApp:i,country:a}=L.get(),{getConsentAsync:o}=Ee(n,i,a),r=yield o();if(e&&t&&r){if(yield gt(t),document.querySelector(`.${Mi}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(Mi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Be(),z(void 0,void 0,void 0,function*(){const{gdpr:{url:e,allowHidingAds:t=!0}={}}=L.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield gt(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),yield Bi(),ae("Libraries have been loaded and trackers have been set"),yield(n=t.librariesToLoad,z(void 0,void 0,void 0,function*(){const e=n.map(e=>gt(e));yield Promise.all(e)})),yield _a(),yield Ta(),ae("Page options have been set"),Ea(e),ae("Advertory is setup on window"),xa=Kt(),Qn(xa),Zn(xa),yield Pa(xa),ae("Ads has been loaded",xa),ea(xa),yield t.replaceAdsWithFinnBlink(e.finnBlink),yield(e=>z(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield De(e.tcf,e.isMobileApp,e.country,"handleDrEdition")))return;const n=yield bn(),i=new wn(n);xn({publisher:e.publisher,drEditionConfig:e.drEdition,device:e.deviceType,pageType:e.pageType,country:e.country},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}))(e),(e=>{if(!(null==e?void 0:e.enabled)||pa)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=aa}=e,a=document.querySelector(i);if(!a)return;pa=!0;const o=()=>{ca(a,n,t)};o(),window.addEventListener("resize",o),window.addEventListener("orientationchange",o),window.addEventListener("load",o),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(o)}),new ResizeObserver(o).observe(a)})(e.rightColumnSplit),yield(e=>z(void 0,void 0,void 0,function*(){const t=new ya;yield t.run(e)}))(e)}),ja=(e,t)=>z(void 0,void 0,void 0,function*(){yield((e,t)=>z(void 0,void 0,void 0,function*(){const{initConsentManager:n,getConsentAsync:i}=Ee(e.tcf,e.isMobileApp,e.country),a=yield ia(e);yield oe(),yield ta(n),yield ta(i),ae("TCF resolved successfully"),yield La(a,t),ae("Run function resolved successfully")}))(e,t)}),za="native_override_desc2",Na=(e,t,n)=>{var i;const{image:a,icon:o,sponsoredBy:r,title:d,clickUrl:s,cta:l,body:c,desc2:p,video:u,description:v,customTitle1:g,customTitle2:h,customTitle3:m,customTitle4:f,customIcon2:y}=e,b=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:b(a),imgWidth:null==a?void 0:a.width,imgHeight:null==a?void 0:a.height,imgAltText:null!=d?d:"",logo:b(o),sponsoredBy:null!=r?r:"",title:null!=d?d:"",url:null!=s?s:"",cta:null!=l?l:"",description:null!==(i=null!=c?c:v)&&void 0!==i?i:"",desc2:null!=p?p:"",video:u,customTitle1:null!=g?g:"",customTitle2:null!=h?h:"",customTitle3:null!=m?m:"",customTitle4:null!=f?f:"",logo2:b(y)},t)},qa=(e,t)=>{const n=(i=za,window.location.href.includes(i));var i;const a=new URLSearchParams(window.location.search).get(za),o=t.includes("native_recirc");return n&&a?a:(null==e?void 0:e.includes("recirc"))?o?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Da=(e,t,n,i)=>{const a=document.querySelector(`#${e}`);a&&t&&(a.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:a}=t,o=i&&Object.values(he).includes(i);n&&o&&Z(i,e,ie,a)})(a,n),i())},Ma=e=>{var t;const n=document.querySelector(`#${e.targetId}`);if(!n||!(null===(t=e.native)||void 0===t?void 0:t.clickTrackers))return;(null==n?void 0:n.querySelectorAll("a.ad-link")).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Va(i)}),t.dataset.tracked="true")})},Ba=e=>{const{native:{impressionTrackers:t}={}}=e;(null==t?void 0:t.some(e=>e.includes("googleads")))?null==t||t.forEach(Fa):window.apntag.fireImpressionTrackers(e);const n=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(n)},Ra=(e,t)=>{var n;let i=!1;const a=document.querySelector(`#${e.targetId}`);if(!a||!e.native)return;const{deviceType:o,appearanceConfig:r,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==r?void 0:r.defaultThreshold[null!=o?o:ee.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,Ba(e),c.disconnect();break}},s);c.observe(a)},Fa=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Va(e):window.navigator.sendBeacon(e)},Va=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Ua=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:a,videoTemplates:o}=n,r="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=r}=e.native,c=l.toLowerCase(),p=null!==(i=qa(e.targetId,l))&&void 0!==i?i:c,u=Pt[t.language||ce.NO],v=Na(d,u,s);return(d.video?o[p]:a[p]||a.default)(v,t)})(e,t,n);Da(e.targetId,i,t,()=>{const{nativeTrackingConfig:{nativeTrackingEnabled:n=!0}={}}=t;n&&((e,t)=>{Ma(e),Ra(e,t)})(e,t)})};Ot('@import"https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap";.advertory-shared-ad-native-content-display-basic{width:100%;font-family:Roboto,sans-serif;color:#6d747e;text-align:left;background:#fff;position:relative;margin:0 auto;display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic *{line-height:normal}.advertory-shared-ad-native-content-display-basic .ad-info{top:0;right:8px;position:absolute}.advertory-shared-ad-native-content-display-basic .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic .ad-link{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-link:hover{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-header{padding:5px 16px;background-color:#ffcd00;font-size:12px;text-transform:uppercase;color:#495057;font-weight:600}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper{display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{position:relative;padding-bottom:40%}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{display:none}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper{position:absolute;height:100%;width:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper .ad-large-image{object-fit:cover;min-width:100%;height:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content{box-sizing:border-box;display:flex;background-color:#fffae6}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container{flex-grow:1;padding:16px}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:20px;color:#212529;font-weight:600;margin-bottom:16px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:22px}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-sponsor{font-size:11px;color:gray;font-weight:600;text-transform:uppercase}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:none;max-width:175px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:block}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover;max-width:100%}.advertory-shared-ad-native-content-display-basic.article .ad-info{top:0;right:0;position:absolute;border-bottom-left-radius:50%;background:hsla(0,0%,100%,.6)}.advertory-shared-ad-native-content-display-basic.article .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{display:block}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container{padding:8px 16px;border-left:4px solid #ffcd00}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{display:flex;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper .ad-header{padding:2px 4px;font-size:11px}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:15px;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:18px;margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:16px 8px 16px 0}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:0}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:contain}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover}}');const Ha="viewable",Wa="adClick";const Ka=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.querySelector("ClickThrough"),a=n.querySelector("VideoClicks");if(i){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n.createCDATASection(t))}else if(a){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),a.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},Ja=({id:e,nodeId:t,poster:n,tagURL:i,publisher:a="",productTag:o="xandr",videoLoop:r=!1})=>({id:e,poster:n,vendor:"appnexus",node:t,mute:!0,autoplay:r,repeat:r,skin:{name:"inventory-player",url:"https://ads.inventory.schibsted.io/styles/player.css"},settings:{jw:{stretching:"fill",advertising:{client:"vast",tag:i}}},pulse:{provider:a.toLowerCase(),decorator:e=>Object.assign(Object.assign({},hn(e)?e:{}),{provider:Object.assign(Object.assign({},hn(null==e?void 0:e.provider)?e.provider:{}),{productTag:o})})}}),Ga=e=>z(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:i}=e,{repeat:a}=t,o=yield ln(t);pn(n),o.once("assetReady",()=>{sn(o,n)}),o.on(Ha,e=>{const{viewable:t}=e;t?o.play():o.pause()}),o.on(Wa,()=>{window.open(i,"_blank")}),a&&o.on("pause",()=>{o.play()})});Ot(".advertory-shared-ad-native-video{width:100%;min-height:250px;height:auto;margin:auto;text-align:left;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed}@media screen and (min-width: 768px){.advertory-shared-ad-native-video{width:580px}}.advertory-shared-ad-native-video .ad-info{position:absolute;top:2px;right:24px}.advertory-shared-ad-native-video .ad-info .gdprAdTransparencyCogWheelButton{background-color:rgba(0,0,0,0);border-bottom-right-radius:13px;z-index:10}.advertory-shared-ad-native-video a.ad-link{display:block;text-decoration:none;color:#2b2b2b}.advertory-shared-ad-native-video a.ad-link:hover{text-decoration:none}.advertory-shared-ad-native-video .ad-content .ad-header{font-size:12px;padding:5px 8px;color:#4c3d00;background:rgba(255,205,0,.8);font-weight:bold}.advertory-shared-ad-native-video .ad-content .ad-image-container{position:relative;line-height:0}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-image-container{min-height:300px}}.advertory-shared-ad-native-video .ad-content .ad-image-container .ad-player-wrapper{height:56.4971751412vw;width:100%}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-image-container .ad-player-wrapper{height:326px}}.advertory-shared-ad-native-video .ad-content .ad-text-container{background:#fff6d1;overflow:auto;padding-bottom:15px;padding-left:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-text-container{background:#fff6d1;padding-left:16px;overflow:auto}}.advertory-shared-ad-native-video .ad-content .ad-text-container .sponsored-by{margin:8px 16px 8px 0;color:#64625a;font-size:10px;text-transform:uppercase;display:block;font-weight:600}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-text-container .sponsored-by{font-size:12px}}.advertory-shared-ad-native-video .ad-content .ad-text-container .title{line-height:1;margin:8px 0;font-weight:bold;font-size:20px;font-family:Arial,sans-serif}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-text-container .title{font-size:22px}}"),Ot(".advertory-abo-ad-native-video{width:100%;min-height:250px;margin:auto;color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed}.advertory-abo-ad-native-video *{box-sizing:border-box;line-height:normal;text-transform:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-video{width:580px;height:400px}}.advertory-abo-ad-native-video .ad-info{position:absolute;height:26px;width:26px;top:20px;left:0;z-index:1000;background-color:hsla(0,0%,100%,.4509803922);border-bottom-right-radius:13px;transform:none;transform-origin:center}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-info{top:30px}}.advertory-abo-ad-native-video .ad-info .gdprAdTransparencyCogWheelButton{background-color:rgba(0,0,0,0);border-bottom-right-radius:13px;z-index:10}.advertory-abo-ad-native-video .ad-content .ad-image-container{position:relative;line-height:0}.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-header{position:absolute;height:20px;width:100%;font-size:13px;line-height:20px;color:#4c3d00;background:rgba(255,205,0,.8);z-index:100}.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-header span{margin-left:8px}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-header{height:30px;line-height:30px;padding-left:16px}.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-header span{margin:0}}.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-player-wrapper{height:56.4971751412vw;width:100%}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-player-wrapper{height:326px}}.advertory-abo-ad-native-video .ad-content .ad-text-container{background:#fff6d1;overflow:auto}.advertory-abo-ad-native-video .ad-content .ad-text-container .sponsored-by{color:#64625a;font-size:10px;margin:8px 8px 3px 8px;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-text-container .sponsored-by{font-size:13px;margin:8px 16px}}.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link{text-decoration:none;display:flex;flex-direction:column}.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link,.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link:focus,.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link:hover,.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link:visited{color:#000}.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link .ad-title{margin:0 8px 7px 8px;min-height:52px;line-height:24px;color:#000;font-size:20px;font-weight:700;display:flex;flex-direction:column}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link .ad-title{font-size:22px;margin:0 16px 9px 16px;height:35px;min-height:auto;line-height:35px;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;display:block}}.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link .ad-description{display:none;border-top:1px solid rgba(128,128,128,.5019607843);margin:0 8px 12px 8px;padding-top:8px;color:#6a6a6a;font-style:normal;font-weight:normal;font-size:12px;line-height:14px}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link .ad-description{font-size:13px;margin:8px 16px;line-height:16px}}");const Ya=({containerId:e,adText:t,url:n,adFrom:i,sponsoredBy:a,title:o},r,d)=>`<article class="advertory-abo-ad-native-video">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-content">\n <div class="ad-image-container">\n <div class="ad-header">\n <span>${t}</span>\n </div>\n <div class="ad-player-wrapper">\n <div id="${d}"></div>\n </div>\n </div>\n <div class="ad-text-container">\n <span class="sponsored-by">\n ${i} ${a}\n </span>\n <a class="ad-link" href="${n}" target="_blank">\n <span class="ad-title">${o}</span>\n <div class="ad-description">${o}</div>\n </a>\n </div>\n </div>\n </article>`;Ot('@import"https://fonts.googleapis.com/css?family=Inter:400,600&display=swap";.advertory-abo-ad-native-podme-section{height:130px;background:linear-gradient(90deg, #23375e 0%, #041426 104.93%);border-radius:11px}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section{height:202px}}.advertory-abo-ad-native-podme-section .ad-link{text-decoration:none;color:initial;background-color:rgba(0,0,0,0);cursor:pointer}.advertory-abo-ad-native-podme-section .ad-content-wrapper{display:flex;height:100%;font-family:"Inter",sans-serif;font-style:normal;font-weight:normal}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container{display:flex;flex-direction:column;width:428px;margin:18px 3px 8px 18px;font-family:"Inter",sans-serif;font-style:normal;font-weight:normal}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container{margin:41px 28px 41px 41px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container .ad-title{font-weight:600;color:#fff;font-size:calc(12px + 11*(100vw - 300px)/468);line-height:16px;margin-bottom:7px}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container .ad-title{font-size:23px;line-height:28px;margin-bottom:15px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container .ad-description{color:#17e1e3;font-size:calc(10px + 8*(100vw - 300px)/468);font-weight:normal;line-height:14px}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container .ad-description{font-size:18px;font-weight:500;line-height:22px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-small-image-container{display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;max-width:253px;min-width:100px;height:100%;margin:0 auto}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-small-image-container{min-width:250px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-small-image-container .ad-small-image{max-width:100%;max-height:100%;object-fit:fill}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-logo{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-logo{display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;max-width:162px;height:100%;margin:0 16px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-logo .logo{max-width:100%;max-height:100%;object-fit:fill}'),Ot('.advertory-abo-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif;font-weight:600;text-align:left;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed}.advertory-abo-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-default{width:580px;height:400px}}.advertory-abo-ad-native-default .ad-info{position:absolute;top:20px;height:26px;width:26px;left:0;z-index:1000;background-color:hsla(0,0%,100%,.4509803922);border-bottom-right-radius:13px;transform:none;transform-origin:center}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-info{top:30px}}.advertory-abo-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0)}.advertory-abo-ad-native-default .ad-content{display:block}.advertory-abo-ad-native-default .ad-image-container{position:relative;line-height:0}.advertory-abo-ad-native-default .ad-image-container .ad-header{position:absolute;height:20px;width:100%;font-size:13px;line-height:20px;color:#4c3d00;background:rgba(255,205,0,.8)}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-image-container .ad-header{height:30px;line-height:30px;padding-left:16px}}.advertory-abo-ad-native-default .ad-image-container .ad-header span{margin-left:8px}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-image-container .ad-header span{margin:0}}.advertory-abo-ad-native-default .ad-image-container .ad-image{position:static;width:100%;height:52.3560209424vw}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-image-container .ad-image{height:301px}}.advertory-abo-ad-native-default .ad-image-container .ad-logo{position:absolute;height:30px;width:auto;top:auto;bottom:8px;left:8px;right:auto}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-image-container .ad-logo{left:16px;bottom:16px}}.advertory-abo-ad-native-default .ad-text-container{background:#fff6d1;overflow:auto}.advertory-abo-ad-native-default .ad-text-container .ad-sponsored-by{color:#64625a;font-size:10px;margin:8px 8px 3px 8px;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-text-container .ad-sponsored-by{font-size:13px;margin:8px 16px}}.advertory-abo-ad-native-default .ad-text-container .ad-title{margin:0 8px 7px 8px;min-height:52px;line-height:24px;color:#000;font-size:20px;font-weight:700;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-text-container .ad-title{font-size:24px;margin:0 16px 8px 16px;height:59px;min-height:auto;line-height:normal;overflow:hidden}}.advertory-abo-ad-native-default.bt .ad-text-container .ad-title{font-family:"TabacG2",serif;font-weight:500}'),Ot('.advertory-abo-ad-native-sponsorstripe{position:absolute;top:0;left:0;width:100%;height:1px;background:inherit;padding:0;margin:0;border:none;text-align:left}.advertory-abo-ad-native-sponsorstripe .ad-wrapper{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:980px;height:30px;padding:5px 15px;margin:auto;font-family:"Helvetica Neue",Arial,Roboto,sans-serif}.advertory-abo-ad-native-sponsorstripe .ad-logo{flex:0;height:20px;max-width:35%;max-height:inherit}.advertory-abo-ad-native-sponsorstripe .ad-title{margin-right:10px;padding-left:34px;font-size:13px;color:#fff}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper{display:grid;position:absolute;place-content:center;height:30px;min-width:30px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{display:inline-block;height:20px;width:20px;position:relative;border:solid 1px #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{content:"i";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:13px}.advertory-abo-ad-native-sponsorstripe .ad-description{font-size:13px;color:#fff;position:absolute;top:0;max-width:980px;min-height:30px;padding:15px 35px 15px 15px;margin-left:-15px;background-color:rgba(0,0,0,.9)}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper{position:absolute;top:15px;right:15px;place-content:center;height:16px;min-width:16px}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button{display:inline-block;height:16px;width:16px;position:relative;border:1px solid #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button:before{content:"✕";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:10px;font-weight:bold}.advertory-abo-ad-native-sponsorstripe .ad-description .ad-description-readmore{color:#c7ecff}.advertory-abo-ad-native-sponsorstripe .ad-description.hide{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-sponsorstripe .ad-wrapper{height:50px}.advertory-abo-ad-native-sponsorstripe .ad-wrapper .ad-description{min-height:50px}.advertory-abo-ad-native-sponsorstripe .ad-logo{height:40px}.advertory-abo-ad-native-sponsorstripe .ad-title{font-size:20px;padding-left:40px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{height:30px;width:30px;border-width:2px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{font-size:20px}}');Ot(".advertory-abo-ad-native-recirc{width:100%;min-height:250px;margin:auto;color:#000;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed}@media screen and (min-width: 768px){.advertory-abo-ad-native-recirc{max-width:283px;height:400px}}.advertory-abo-ad-native-recirc .ad-info{position:absolute;top:0;height:26px;width:26px;left:0;z-index:1000;background-color:hsla(0,0%,100%,.4509803922);border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-abo-ad-native-recirc .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0)}.advertory-abo-ad-native-recirc .ad-content{display:block}.advertory-abo-ad-native-recirc .ad-image-container{position:relative;line-height:0}.advertory-abo-ad-native-recirc .ad-image-container .ad-header{height:30px;font-size:13px;line-height:30px;font-weight:600;color:#4c3d00;background:rgba(255,205,0,.8);padding-left:32px;font-family:-apple-system,BlinkMacSystemFont,sans-serif;border-top-right-radius:10px;border-top-left-radius:10px}.advertory-abo-ad-native-recirc .ad-image-container .ad-image{width:100%}.advertory-abo-ad-native-recirc .ad-image-container .ad-logo{position:absolute;height:30px;width:auto;top:auto;bottom:8px;left:8px;right:auto}@media screen and (min-width: 768px){.advertory-abo-ad-native-recirc .ad-image-container .ad-logo{left:16px;bottom:16px}}.advertory-abo-ad-native-recirc .ad-text-container{background:#fff6d1;overflow:auto;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.advertory-abo-ad-native-recirc .ad-text-container .ad-sponsored-by{display:block;color:#64625a;font-size:13px;padding:5px 8px;text-transform:uppercase;font-family:Roboto,sans-serif}.advertory-abo-ad-native-recirc .ad-text-container .ad-title{padding:6px 8px;margin-bottom:12px;color:#000;font-size:17px;font-weight:700;font-family:Arial,sans-serif}"),Ot('.advertory-abo-ad-native-content-video{position:relative;display:table;table-layout:fixed;width:100%;margin:0 auto;background:#fff;font-family:"Inter",sans-serif;font-weight:700;text-align:left;color:#000}.advertory-abo-ad-native-content-video *{line-height:1}.advertory-abo-ad-native-content-video a.ad-link{display:block;text-decoration:none;color:inherit}.advertory-abo-ad-native-content-video a.ad-link:hover{text-decoration:none}.advertory-abo-ad-native-content-video .ad-info{z-index:10;top:44px}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-info{top:50px}}.advertory-abo-ad-native-content-video .ad-info div[role=button]{top:44px !important;border-bottom-right-radius:13px;background-color:hsla(0,0%,100%,.45);z-index:10}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-info div[role=button]{top:51px !important}}.advertory-abo-ad-native-content-video .ad-content{display:flex;flex-direction:column}.advertory-abo-ad-native-content-video .ad-content .ad-header{position:relative;height:44px;display:flex;align-items:center;text-transform:uppercase;padding:0 8px}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-header{height:51px;min-height:0}}.advertory-abo-ad-native-content-video .ad-content .ad-header span{font-weight:700;font-size:13px;position:absolute;top:50%;transform:translateY(-50%)}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-header span{font-size:20px;padding-left:12px}}.advertory-abo-ad-native-content-video .ad-content .ad-header .ad-logo{position:absolute;right:0;width:auto;height:40px;margin-right:8px}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-header .ad-logo{width:auto;height:35px}}.advertory-abo-ad-native-content-video .ad-content .ad-image-container{display:flex;position:relative}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-image-container{min-height:0}}.advertory-abo-ad-native-content-video .ad-content .ad-image-container .ad-image{width:100%;height:auto;object-fit:cover;object-position:center 0}.advertory-abo-ad-native-content-video .ad-content .ad-image-container .ad-player-wrapper{height:56.4971751412vw;width:100%}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-image-container .ad-player-wrapper{height:407px}}.advertory-abo-ad-native-content-video .ad-content .ad-text-container{display:flex;flex-direction:column;color:#2b2b2b;padding-bottom:10px}.advertory-abo-ad-native-content-video .ad-content .ad-text-container .sponsored-by{display:block;padding:8px;font-size:12px;font-weight:normal;text-transform:uppercase}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-text-container .sponsored-by{padding:8px 10px}}.advertory-abo-ad-native-content-video .ad-content .ad-text-container .ad-title{display:block;padding:0 8px;margin-left:0;margin-bottom:0;font-size:var(--mobileTitleSize);font-weight:bold;line-height:1}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-text-container .ad-title{padding:4px 12px 8px 12px;font-size:var(--desktopTitleSize)}}.advertory-abo-ad-native-content-video .ad-content .ad-text-container .ad-description{margin:4px 0;padding:0 8px;font-size:16px;line-height:calc(15px);color:#000}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-text-container .ad-description{padding:0 12px}}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video.bt .ad-content .ad-image-container .ad-player-wrapper,.advertory-abo-ad-native-content-video.sa .ad-content .ad-image-container .ad-player-wrapper{height:302px}}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video.bt .ad-content .ad-text-container .ad-title,.advertory-abo-ad-native-content-video.sa .ad-content .ad-text-container .ad-title{font-size:23px}}');const Qa={VIDEO:(e,t)=>{return(n=Ya,(e,t,i)=>{const{video:a,img:o,url:r}=e,{publisher:d,productTag:s}=t,{pluginsNames:l,videoLoop:c}=i||{};if(!(null==a?void 0:a.content))return null;const p=Math.ceil(1e5*Math.random()),u=o||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${p}`,g=Ka(a.content,r),h=Ja({id:p,nodeId:v,poster:u,tagURL:g,publisher:d,productTag:s,videoLoop:c});return Ga({playerConfig:h,clickUrl:r,pluginsNames:l}),`${n(e,t,v)}`})(e,t);var n},SPONSORSTRIPE:({title:e,sponsoredBy:t,logo:n})=>`<article class="advertory-abo-ad-native-sponsorstripe">\n <div class="ad-wrapper">\n <div class="info-button-wrapper" onClick="\n const adDescription = document.getElementById('ad-sponsorstripe-description');\n adDescription.classList.toggle('hide');\n ">\n <div class="info-button"></div>\n </div>\n\n <span class="ad-title">${e}</span>\n <img alt="${t}" class="ad-logo" src="${n}" />\n\n <div id="ad-sponsorstripe-description" class="ad-description hide">\n <span>${(e=>`Annonsøren har betalt for profilering av logo og merkenavn i artikler tilknyttet ${e}. Annonsøren har ingen innflytelse på Aftenpostens journalistiske virksomhet.`)(t)}</span>\n <a class="ad-description-readmore" href="https://www.aftenposten.no/slik-jobber-vi-i-aftenposten/i/xgKR18/ekstern-finansiering-av-innhold-i-aftenposten" target="_blank">Les mer</a>\n <div class="close-button-wrapper" onClick="\n const adDescription = document.getElementById('ad-sponsorstripe-description');\n adDescription.classList.toggle('hide');\n ">\n <div class="close-button"></div>\n </div>\n </div>\n </div>\n \n </article>`};Ot('.advertory-no-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#dfdfdf;font-family:"Inter",sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;font-size:14px}@media screen and (min-width: 768px){.advertory-no-ad-native-default{width:580px;height:400px}}.advertory-no-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-default .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-default .ad-content{display:block}.advertory-no-ad-native-default .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}.advertory-no-ad-native-default .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-default .ad-text-container{background:#f5faff;overflow:auto;padding:8px}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-default .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}.advertory-vg-native-ad__front .advertory-no-ad-native-default{width:100%;height:auto}.advertory-aftenposten-native-ad-wrapper__front{justify-content:center}.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(-40px + 4rem)}@media screen and (min-width: 768px){.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(12px + .75rem)}}');Ot('.advertory-no-ad-native-recirc{width:100%;min-height:250px;margin:0 auto;color:#000;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;background-color:#fff;font-family:"Inter",sans-serif;font-weight:600;text-align:left;font-size:14px;container-type:inline-size}.advertory-no-ad-native-recirc *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-recirc .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-recirc .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-recirc .ad-content{display:flex;flex-direction:column}.advertory-no-ad-native-recirc .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}@container (min-width: dna.$md){.advertory-no-ad-native-recirc .ad-image-container{min-height:0}}.advertory-no-ad-native-recirc .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-recirc .ad-text-container{background:#f5faff;overflow:auto;padding:8px;container-type:inline-size}@container (min-width: dna.$md){.advertory-no-ad-native-recirc .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-recirc .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@container (min-width: dna.$md){.advertory-no-ad-native-recirc .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-recirc .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-recirc .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@container (min-width: 420px){.advertory-no-ad-native-recirc .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}');const Xa={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:a,adText:o})=>`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${a}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${o}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`,NATIVE_RECIRC:({containerId:e,url:t,sponsoredBy:n,title:i,img:a,adText:o})=>`<article class="advertory-no-ad-native-recirc">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${a}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${o}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`};Ot(".advertory-e24-ad-native-content{position:relative;max-width:580px;width:auto;padding:0;border-bottom:1px solid #d4d4d4;border-top:1px solid #d4d4d4;font-family:E24 Text,Arial,sans-serif;color:#000c26;text-align:left;box-sizing:border-box;background-color:var(--background-color)}.advertory-e24-ad-native-content .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.45)}.advertory-e24-ad-native-content *{line-height:normal}@media screen and (min-width: 740px){.advertory-e24-ad-native-content{width:100%;padding-top:23px;border-bottom:1px solid #d6dce4;border-top:1px solid #d6dce4;margin:0 auto calc(-40px + 4rem)}}.advertory-e24-ad-native-content .ad-info{position:absolute;z-index:1000;top:35px;left:8px;height:26px;width:26px;border-bottom-right-radius:13px;background-color:hsla(0,0%,100%,.4509803922);transform:none;transform-origin:center}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-info{top:50px;left:0}}.advertory-e24-ad-native-content .ad-link{color:inherit;text-decoration:none;display:block}.advertory-e24-ad-native-content .ad-link .ad-content{display:flex;flex-direction:column}.advertory-e24-ad-native-content .ad-link .ad-content .ad-header{box-sizing:border-box;display:flex;justify-content:space-between;width:100%;height:44px;padding:calc(.5*var(--gap-unit)) var(--gap-unit) calc(.5*var(--gap-unit)) calc(1.5*var(--gap-unit));font-family:E24 Text,Arial,sans-serif;line-height:44px;background-color:#fffbf8}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-header{font-size:25px;max-height:50px;height:50px}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-header .ad-annonse{color:#1d1d1d;display:inline-block;font-size:16px;line-height:19px;font-weight:600;vertical-align:top;text-transform:uppercase;padding:8px 0}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-header .ad-annonse{padding:10px 0 16px 0}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-header .ad-logo{width:auto;max-width:50%;max-height:36px;vertical-align:middle}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-header .ad-logo{max-height:42px}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-image-container{display:flex;align-items:flex-start;min-height:0;max-height:200px}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-image-container{max-height:262px}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-image-container .ad-image{width:100%;object-position:center 0;height:fit-content;object-fit:cover;max-height:inherit}.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container{display:flex;flex-direction:column;padding:calc(var(--gap-unit)*2) calc(var(--gap-unit)*1.5) 0;color:#1d1d1d;background-color:#fffbf8}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container{padding-bottom:14px}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container .ad-subtitle{font-family:E24 Text,Arial,sans-serif;padding:16px 0 0 0;font-size:12px;font-style:normal;font-weight:normal}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container .ad-subtitle{font-size:14px;padding:16px 0 4px 0}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Text,Arial,sans-serif;font-size:25px;font-style:normal;font-weight:500;padding:0}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container .ad-title{font-size:32px}}");Ot(".advertory-e24-ad-native-content-basic{position:relative;display:block;height:100%;width:auto;max-width:580px !important;margin:0 auto calc(-40px + 4rem);color:var(--text-color);font-family:E24 Text,Arial,sans-serif;font-size:0;text-align:left;text-size-adjust:100%;clear:both}.advertory-e24-ad-native-content-basic .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.45)}.advertory-e24-ad-native-content-basic a{display:block;text-decoration:none;padding-bottom:calc(3*var(--gap-unit));background-color:#fffbf8;border-bottom:1px solid #ffd157}.in-feed .advertory-e24-ad-native-content-basic a{padding-bottom:0;border-bottom:none}.advertory-e24-ad-native-content-basic a .ad-content .ad-header{display:block;background-color:#ffd157;border-radius:2px 2px 0 0;color:#1d1d1d;font-size:12px;line-height:18px;padding:3px 30px;font-weight:500}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-header{padding:7px 0 5px 32px}}.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container{position:relative}.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container .ad-ratio-container{box-sizing:border-box;height:100%;position:relative;padding-bottom:52.25%}.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container .ad-ratio-container img{width:100%;height:100%;position:absolute;top:0;left:0;object-fit:cover}.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container .ad-sponsored-by{position:absolute;bottom:calc(1.5*var(--gap-unit));left:calc(1.5*var(--gap-unit));max-width:50%;max-height:20%}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container .ad-sponsored-by{bottom:calc(2*var(--gap-unit));left:calc(2*var(--gap-unit))}}.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container{display:block;padding:calc(1.5*var(--gap-unit)) calc(.5*var(--gap-unit)) 0 calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container{padding:calc(2*var(--gap-unit)) calc(1.5*var(--gap-unit)) 0 calc(1.5*var(--gap-unit))}}.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-annonse-label{color:#777;display:block;font-family:E24 Text,Arial,sans-serif;font-size:14px;line-height:17px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-annonse-label{font-size:16px;line-height:19px;margin-bottom:var(--gap-unit)}}.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Text,Arial,sans-serif;font-size:20px;line-height:24px;font-weight:500;margin-top:0;margin-bottom:calc(.5*var(--gap-unit))}.in-feed .advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-title{font-size:20px;line-height:24px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-title{font-size:30px;line-height:36px;margin-bottom:var(--gap-unit)}}");Ot(".advertory-e24-ad-native-recirc{position:relative;display:block;height:100%;width:auto;max-width:580px !important;margin:0 auto calc(-40px + 4rem);color:var(--text-color);font-family:E24 Text,Arial,sans-serif;font-size:0;text-align:left;text-size-adjust:100%;clear:both}.advertory-e24-ad-native-recirc .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.45)}.advertory-e24-ad-native-recirc a{display:block;text-decoration:none;padding-bottom:0;background-color:#fffbf8}.advertory-e24-ad-native-recirc a .ad-content .ad-header{display:block;background-color:#ffd157;border-radius:2px 2px 0 0;color:#1d1d1d;font-size:12px;line-height:18px;padding:3px 30px;font-weight:500}@media screen and (min-width: 740px){.advertory-e24-ad-native-recirc a .ad-content .ad-header{padding:7px 0 5px 32px}}.advertory-e24-ad-native-recirc a .ad-content .ad-image-container{position:relative}.advertory-e24-ad-native-recirc a .ad-content .ad-image-container .ad-ratio-container{box-sizing:border-box;height:100%;position:relative;padding-bottom:52.25%}.advertory-e24-ad-native-recirc a .ad-content .ad-image-container .ad-ratio-container img{width:100%;height:100%;position:absolute;top:0;left:0;object-fit:cover}.advertory-e24-ad-native-recirc a .ad-content .ad-image-container .ad-sponsored-by{position:absolute;bottom:calc(1.5*var(--gap-unit));left:calc(1.5*var(--gap-unit));max-width:50%;max-height:20%}@media screen and (min-width: 740px){.advertory-e24-ad-native-recirc a .ad-content .ad-image-container .ad-sponsored-by{bottom:calc(2*var(--gap-unit));left:calc(2*var(--gap-unit))}}.advertory-e24-ad-native-recirc a .ad-content .ad-text-container{display:block;padding:calc(1.5*var(--gap-unit)) calc(.5*var(--gap-unit)) 0 calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-recirc a .ad-content .ad-text-container{padding:calc(2*var(--gap-unit)) calc(1.5*var(--gap-unit)) 0 calc(1.5*var(--gap-unit))}}.advertory-e24-ad-native-recirc a .ad-content .ad-text-container .ad-annonse-label{color:#777;display:block;font-family:E24 Text,Arial,sans-serif;font-size:14px;line-height:17px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-recirc a .ad-content .ad-text-container .ad-annonse-label{font-size:16px;line-height:19px;margin-bottom:var(--gap-unit)}}.advertory-e24-ad-native-recirc a .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Text,Arial,sans-serif;font-size:20px;line-height:24px;font-weight:500;margin-top:0;margin-bottom:calc(.5*var(--gap-unit))}");const Za={CONTENT:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o,description:r})=>`<article class="advertory-e24-ad-native-content">\n <div class="ad-info" id="${e}"></div>\n <a class="ad-link" href="${t}" target="_blank" rel="noreferrer noopener nofollow sponsored">\n <div class="ad-content">\n <div class="ad-header">\n <span class="ad-annonse">Annonsørinnhold|</span>\n <img alt="${a}" class="ad-logo" src="${i}" />\n </div>\n <div class="ad-image-container">\n <img alt="${n}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n ${r?`<span class="ad-subtitle">${r}</span>`:""}\n <span class="ad-title">${n}</span>\n </div>\n </div>\n </a>\n </article>`,BASIC:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o})=>`<article class="advertory-e24-ad-native-content-basic">\n <div class="ad-info" id="${e}"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header">\n <div id="${e}-button"></div>\n <span>Annonse</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-ratio-container">\n <img src="${o}" alt="${n}" />\n </div>\n <img class="ad-sponsored-by" src="${i}" alt="${a}" />\n </div>\n <div class="ad-text-container">\n <span class="ad-annonse-label">Annonse fra ${a}</span>\n <h6 class="ad-title">${n}</h6>\n </div>\n </div>\n </a> \n </article>`,RECIRC:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o})=>`<article class="advertory-e24-ad-native-recirc">\n <div class="ad-info" id="${e}"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header">\n <div id="${e}-button"></div>\n <span>Annonse</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-ratio-container">\n <img src="${o}" alt="${n}" />\n </div>\n <img class="ad-sponsored-by" src="${i}" alt="${a}" />\n </div>\n <div class="ad-text-container">\n <span class="ad-annonse-label">Annonse fra ${a}</span>\n <h6 class="ad-title">${n}</h6>\n </div>\n </div>\n </a> \n </article>`};Ot(".advertory-e24-ad-native-content__front{position:relative;max-width:580px;width:100%;padding:0;font-family:E24 Text,Arial,sans-serif;color:#000c26;text-align:left;box-sizing:border-box;background-color:var(--background-color)}.advertory-e24-ad-native-content__front .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.75);border-bottom-right-radius:13px}.advertory-e24-ad-native-content__front *{line-height:normal}.advertory-e24-ad-native-content__front .ad-info{position:absolute;z-index:1000;top:0;left:0;height:26px;width:26px;border-bottom-right-radius:13px;background-color:hsla(0,0%,100%,.4509803922);transform:none;transform-origin:center}.advertory-e24-ad-native-content__front .ad-link{color:inherit;text-decoration:none;display:block}.advertory-e24-ad-native-content__front .ad-link .ad-content{display:flex;flex-direction:column}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header{box-sizing:border-box;display:flex;justify-content:space-around;width:100%;height:44px;padding:calc(.5*var(--gap-unit)) var(--gap-unit) calc(.5*var(--gap-unit)) calc(1.5*var(--gap-unit));font-family:E24 Text,Arial,sans-serif;line-height:44px;background-color:#fffbf8}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header{justify-content:space-between;font-size:25px;max-height:50px;height:50px}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header .ad-annonse{color:#1d1d1d;display:inline-block;font-size:12px;line-height:19px;font-weight:600;vertical-align:top;text-transform:uppercase;padding:8px 0}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header .ad-annonse{font-size:16px;margin-left:16px;padding:10px 0 16px 0}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header .ad-logo{width:auto;max-width:50%;max-height:36px;vertical-align:middle}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header .ad-logo{max-height:42px}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-image-container{display:flex;align-items:flex-start;min-height:0}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-image-container .ad-image{width:100%;object-position:center 0;object-fit:cover;max-height:inherit}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-image-container,.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-image-container img{min-height:180px}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container{display:flex;flex-direction:column;padding:8px;color:#1d1d1d;background-color:#fffbf8}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container{padding-bottom:14px}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container .ad-subtitle{font-family:E24 Text,Arial,sans-serif;padding:16px 0 0 0;font-size:12px;font-style:normal;font-weight:normal}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container .ad-subtitle{font-size:14px;padding:16px 0 4px 0}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Display,Arial,sans-serif;line-height:1.15;font-weight:600;font-size:32px;font-style:normal;padding:0}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container .ad-title{font-size:32px}}");Ot(".advertory-e24-ad-native-content-basic__front{position:relative;display:block;height:100%;width:auto;max-width:580px !important;color:var(--text-color);font-family:E24 Text,Arial,sans-serif;font-size:0;text-align:left;text-size-adjust:100%;clear:both}.advertory-e24-ad-native-content-basic__front .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.75);border-bottom-right-radius:13px}.advertory-e24-ad-native-content-basic__front a{display:block;text-decoration:none;background-color:#fffbf8}.in-feed .advertory-e24-ad-native-content-basic__front a{padding-bottom:0;border-bottom:none}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-header{display:block;background-color:#ffd157;border-radius:2px 2px 0 0;color:#1d1d1d;font-size:12px;line-height:18px;padding:3px 30px;font-weight:500}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-header{padding:7px 0 5px 32px}}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container{position:relative}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container .ad-ratio-container{box-sizing:border-box;height:100%;position:relative;padding-bottom:52.25%}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container .ad-ratio-container img{width:100%;height:100%;position:absolute;top:0;left:0;object-fit:cover}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container .ad-sponsored-by{position:absolute;bottom:calc(1.5*var(--gap-unit));left:calc(1.5*var(--gap-unit));max-width:50%;max-height:20%}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container .ad-sponsored-by{bottom:calc(2*var(--gap-unit));left:calc(2*var(--gap-unit))}}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container{display:block;padding:calc(1.5*var(--gap-unit)) calc(.5*var(--gap-unit)) 0 calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container{padding:calc(2*var(--gap-unit)) calc(1.5*var(--gap-unit)) 0 calc(1.5*var(--gap-unit))}}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-annonse-label{color:#777;display:block;font-family:E24 Text,Arial,sans-serif;font-size:14px;line-height:17px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-annonse-label{font-size:16px;line-height:19px;margin-bottom:var(--gap-unit)}}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Text,Arial,sans-serif;font-size:20px;line-height:24px;font-weight:500;margin-top:0;margin-bottom:calc(.5*var(--gap-unit))}.in-feed .advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-title{font-size:20px;line-height:24px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-title{font-size:30px;line-height:36px;margin-bottom:var(--gap-unit)}}");const eo={CONTENT:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o,description:r})=>`<article class="advertory-e24-ad-native-content__front">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank" rel="noreferrer noopener nofollow sponsored">\n <div class="ad-content">\n <div class="ad-header">\n <span class="ad-annonse">Annonsørinnhold|</span>\n <img alt="${a}" class="ad-logo" src="${i}" />\n </div>\n <div class="ad-image-container">\n <img alt="${n}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n ${r?`<span class="ad-subtitle">${r}</span>`:""}\n <span class="ad-title">${n}</span>\n </div>\n </div>\n </a>\n </article>`,BASIC:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o})=>`<article class="advertory-e24-ad-native-content-basic__front">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header">\n <div id="${e}-button"></div>\n <span>Annonse</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-ratio-container">\n <img src="${o}" alt="${n}" />\n </div>\n <img class="ad-sponsored-by" src="${i}" alt="${a}" />\n </div>\n <div class="ad-text-container">\n <span class="ad-annonse-label">Annonse fra ${a}</span>\n <h6 class="ad-title">${n}</h6>\n </div>\n </div>\n </a> \n </article>`},to={default:Qa.VIDEO},no={displayTemplates:{content:Za.CONTENT,basic:Za.BASIC,recirc:Za.RECIRC,sponsorstripe:Qa.SPONSORSTRIPE,native:Xa.NATIVE_TEMPLATE,native_recirc:Xa.NATIVE_RECIRC,default:Za.BASIC},videoTemplates:to},io={displayTemplates:{content:eo.CONTENT,basic:eo.BASIC,native:Xa.NATIVE_TEMPLATE,native_recirc:Xa.NATIVE_RECIRC,default:eo.BASIC},videoTemplates:to};Ot(".advertory-e24-native-ad-wrapper__front{max-width:580px;padding:0 0 16px 0;display:flex;justify-content:center}.advertory-e24-native-ad-wrapper__front .advertory-e24-native-ad__front{position:relative}.advertory-e24-native-ad-wrapper__article{display:flex;justify-content:center}.advertory-e24-native-ad-wrapper__article .advertory-e24-native-ad__article{position:relative}");Ot('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const ao={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return ae(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){ae(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){ae(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},oo="finn_blink_id",ro=e=>z(void 0,void 0,void 0,function*(){const{id:t,hashed_email:n,theme:i}=e,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n}(e,["id","hashed_email","theme"]),o=window[Y.Blink];if(!o)return;const r=new o({remote:"https://www.finn.no/distribution-front/external/carousel",id:t,hashed_email:n,theme:i});yield r.inject(a)}),so=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},lo=(e,t)=>{const{finnBlink:{enabled:n}={}}=L.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:a,height:o,requireImage:r,theme:d,rec:s,distributionTypes:l,position:c,offset:p,advertoryTheme:u}=t||{};return{selector:`#${so(e)}`,enabled:i,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=a?a:100,height:null!=o?o:100,offset:null!=p?p:200,requireImage:r,rec:s,theme:"dark"===d?"dark":"light",advertoryTheme:u}},co=(e,t,n)=>z(void 0,void 0,void 0,function*(){const{placements:i,deviceType:a}=L.get();ae(`rendering finn blink ad for ${e}`);const o=re(e),r=i[a].find(e=>e.id===o),d=lo(e,null==r?void 0:r.finnBlink),{publisher:s,country:l,finnBlink:c}=t,{userId:p,uuid:u,channel:v,theme:g}=null!=c?c:{},h=null!=v?v:`${s}.${l}`,m=(e=>{if(!e){const e=Ae();return null!=e?e:""}return e})(p),f="dark"===g?"dark":"light";if(!(null==d?void 0:d.enabled))return ae(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void Qi(e);if((e=>{var t;const n=so(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))ae(`Finn blink already loaded ${e}`);else try{const e=yield z(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=L.get(),t=ao.get(oo),n=ve("finncode");if(!e||n)return"";if(!t){const t=yield Ke.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return ao.set(oo,n),n}return t});yield ro(Object.assign(Object.assign({},d),{hashed_email:e,channel:h,id:m,theme:f,uuid:u})).then(()=>{((e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageType:i}=L.get(),a=document.querySelector(`#${e}`);if(!a)return;if(a.classList.add("disable-cogwheel"),!n)return;Z(n,a,ne,null!=t?t:i),Fi({preferredTestIdData:{targetId:e,testId:"finn"}})})(d.selector.replace("#",""),d.advertoryTheme)})}catch(t){ae(`Finn blink error ${t}`),n&&n(e),!n&&K(e),Qi(e)}}),po=((e,t)=>n=>ja(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e))({initNativeAd:(e,t)=>{const{targetId:n}=e,i=document.querySelector(`#${n}`),a=(null==t?void 0:t.pageType)===st.FRONT?io:no;if(!i)return;const{pageType:o=st.FRONT,nativeTrackingConfig:r,appearanceConfig:d,deviceType:s}=null!=t?t:{},l={language:ce.NO,publisher:he.E24,deviceType:s,pageType:o,nativeTrackingConfig:r,appearanceConfig:d};Ua(e,l,a)},wallpaperHandlers:{initWallpaperAd:(e,t)=>{if(!t)return;const{options:{appMainContainerSelector:n,wallpaperAnchorSelector:i}={}}=t;(e=>{const t=document.querySelector(e||"#application");if(!t)return;U();const n=document.createElement("div");n.classList.add(F),document.body.insertBefore(n,t.nextSibling),n.style.setProperty("position","fixed"),n.style.setProperty("width","100%"),n.style.setProperty("height","calc(100% - var(--header-height, 0) - 15px)"),n.style.setProperty("background-position","center top"),n.style.setProperty("background-repeat","no-repeat")})(n),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(H(n),window.addEventListener("scroll",()=>H(n)))})(i),e()},adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(V),n.classList.add(V))}},loadFinnBlinkAd:(e,t,n,i)=>z(void 0,void 0,void 0,function*(){const{isMobileApp:a}=L.get();if(ae(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield z(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=L.get(),{getConsentAsync:i}=Ee(e,t,n),a=yield i();return!(!(null==e?void 0:e.enabled)||!a)||(ae("Skip loading finn blink ad due to missing TCF consent."),!1)}))||a)return n&&n(e),void Qi(e);yield Q(X),yield co(e,t,n),i&&i()}),replaceAdsWithFinnBlink:e=>z(void 0,void 0,void 0,function*(){if(!e)return;yield Q(X);const{replacementConfig:t}=e;if(!((()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})()&&(null==t?void 0:t.adsToReplace)&&(null==t?void 0:t.sizes)&&e.enabled))return void ae(`Finn blink configuration is incorrect: ${JSON.stringify(t)}`);const{adsToReplace:n,sizes:i}=t;n.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=de(t);(e=>{ae(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),se(n,i),n.dataset.finnBlinkId=t,G().withFullAdsChain(e)})}),preparePageOptions:ct,prepareTag:e=>{const{keywords:t,targetId:n,invCode:i}=e,{useAppTabletInvCode:a=!0}=L.get(),o=((e,t)=>{const{isMobileApp:n}=L.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(i,a),r=(e=>{const{keywords:t,dynamicSizeWidthCheck:n}=e,i=`${pe()}-adformat`,a=t?t[i]:[];if(!a)return{};const o=(Array.isArray(a)?a:[a]).filter(e=>!(e in l)||window.innerWidth>=l[e]);return{[i]:n?o:a}})(e),d=(e=>{const t=`${pe()}-targetid`;return e?{[t]:[e]}:{}})(n),s=ge(),c=(e=>ye(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(i),p=((e,t)=>ye(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(i);return Object.assign(Object.assign({},e),{invCode:o,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),r),d),c),s),rendererOptions:p})},siteEvents:le,librariesToLoad:[]},{publisherClassName:he.E24,fullWidthFormatClassName:"netboard"}),uo=Ot("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var vo=Object.freeze({__proto__:null,default:uo});exports.initAdvertoryPackage=po,exports.updateAdvertory=(e,t)=>z(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:a,renderFinnBlinkPlacements:o,contextSelector:r}=null!=t?t:{};if(i)return Vt(),[];a&&(Vt(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{J(e.id)})),j(null!=e?e:{}),yield Ta();let d=Kt(r);return o&&(d=d.filter(e=>y(e.id))),d.length>0&&(xa=[...xa,...d.map(e=>Object.assign({},e))],Qn(d),Zn(d),yield Pa(d)),xa});
1
+ "use strict";require("react/jsx-runtime");function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,n;var i=e(function(){if(n)return t;n=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function a(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function o(e,t,n){return e.concat(t).map(function(e){return a(e,n)})}function r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function d(e,t){try{return t in e}catch(e){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&r(e).forEach(function(t){i[t]=a(e[t],n)}),r(t).forEach(function(o){(function(e,t){return d(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(d(e,o)&&n.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(o,n)(e[o],t[o],n):i[o]=a(t[o],n))}),i}function l(t,n,i){(i=i||{}).arrayMerge=i.arrayMerge||o,i.isMergeableObject=i.isMergeableObject||e,i.cloneUnlessOtherwiseSpecified=a;var r=Array.isArray(n);return r===Array.isArray(t)?r?i.arrayMerge(t,n,i):s(t,n,i):a(n,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},t=l}());const a=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],o={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},r=6;class d{set(e){this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of a){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=i(d.DEFAULT_SITE_HANDLERS,e)}}d.DEFAULT_SITE_HANDLERS={siteEvents:o,initNativeAd:function(){}};const s=new d,l=s.modifyConfigProperties.bind(s);function c(e,t,n,i){return new(n||(n=Promise))(function(a,o){function r(e){try{s(i.next(e))}catch(e){o(e)}}function d(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,d)}s((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const p="0123456789abcdefghijklmnopqrstuvwxyz",u=e=>{window.apntag.anq.push(e)},v=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),g=new Promise(e=>{if("undefined"==typeof document||!document.hidden)return void e();const t=()=>{document.hidden||(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t,{once:!0})});class h{initialize(){this.DATA=Object.assign({},h.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}h.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const m=new h,f="advertory-wallpaper-background",y="advertory-with-horseshoe",b=()=>{const e=document.querySelector(`.${f}`);e&&e.remove()},w=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${f}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},x=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,k=e=>{if(window.location.href.includes("collapse_ad=0"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&b())},E=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))},T=()=>{const{publisher:e,country:t,finnBlink:n}=s.get(),{loadFinnBlinkAd:i,wallpaperHandlers:{adjustAdToHorseshoe:a}}=s.getHandlers(),o=window.apntag,r={publisher:e,country:t,finnBlink:n},d=e=>{E(e),u(()=>o.showTag(e))};return{withXandrAd:d,withFinnBlinkAd:e=>c(void 0,void 0,void 0,function*(){yield i(e,r,null)}),withFullAdsChain:e=>c(void 0,void 0,void 0,function*(){yield i(e,r,d,()=>{m.getData("horseshoe").isAvailable&&a(e)})})}},A={Blink:"Blink"},I=(e,...t)=>c(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){Array.from(document.querySelectorAll('script[type="module"]')).some(t=>{var n;return null===(n=t.textContent)||void 0===n?void 0:n.includes(`import(${JSON.stringify(e)})`)})||(yield new Promise((n,i)=>{const a=document.createElement("script");a.async=!0,a.type="module",a.textContent=`(async () => {\n try {\n const moduleNamespace = await import(${JSON.stringify(e)});\n const allowedExports = ${JSON.stringify(A)};\n\n for (const key of Object.keys(allowedExports)) {\n const exportedValue = moduleNamespace[key];\n \n if (exportedValue !== undefined) {\n window[allowedExports[key]] = exportedValue;\n }\n }\n } catch (error) {\n console.error('ESM load failed: ', error);\n }\n })();`;const o=()=>{d(),n()},r=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{a.removeEventListener("load",o),a.removeEventListener("error",r),clearTimeout(s)};a.addEventListener("load",o),a.addEventListener("error",r);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(a)}).catch(e=>{console.error(e)}))}),S="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",C=(e,t,n,i)=>{const a=t.parentElement;if(!a)return;const o=e?`-${e}`:"",r=i?`__${i}`:"",d=`advertory${o}-${n}${r}`,s=`advertory${o}-${n}-wrapper${r}`;t.classList.remove(...t.classList),a.classList.remove(...a.classList),t.classList.add(d),a.classList.add(s),t.dataset.adType=n},O={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},P=e=>e===O.MOBILE,$="finn-blink",L="native-ad",_=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},j=()=>c(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),z=e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e},N=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={}}=s.get(),i=document.createElement("div"),a=document.createElement("div");return a.id=e,i.appendChild(a),C(n,a,$),_(`Creating blink container for: ${e}`),i},q=(e,t)=>{var n;(_(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):_(`Cannot perform afterend on: ${e.id}`)},D="ABSOLUTE_FULLSCREEN",M="ANY_FULLSCREEN",B="VERTICAL_FULLWIDTH",R="FULLWIDTH",F="TAKEOVER",V="VELVET_TAKEOVER",U="WALLPAPER",H="COLLAPSE",W={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],VERTICAL_FULLWIDTH:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},K={wallpaper:1600,"l-format":1600},J=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&le(e,M)},G=e=>{const{native:t}=e;return!!t},Y=e=>le(e,R),Q=e=>{const{targetId:t}=e;return t.includes("takeover")||le(e,F)},X=e=>le(e,F),Z=e=>le(e,U),ee=e=>le(e,H),te=e=>e.targetId.includes("sponsorstripe"),ne=e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!ae(e),ie=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},ae=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),oe=e=>e.targetId.startsWith("midboard"),re=e=>e.targetId.startsWith("widescreen"),de=e=>e.width>=1260&&e.width<=1280,se=e=>e.width>=1600&&e.width<=1620,le=(e,t)=>{const n=W[t];if(!n)return!1;return!!n.find(t=>{var n,i;const a=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,o=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,r=t.width===a,d=!t.height||t.height===o;return r&&d})},ce=e=>`${Math.max(0,Math.round(e))}px`,pe=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},ue=e=>{const t=document.getElementById(e.targetId),n=null==t?void 0:t.parentElement;t&&n&&[t,n].forEach(e=>{const t=Array.from(e.classList).find(e=>e.includes("netboard"));if(!t)return;const n=t.replace(/netboard/g,"brandboard");e.classList.remove(t),e.classList.add(n)})},ve={adRequested:()=>{},adAvailable:e=>{if(e.targetId.includes("skyscraperright_1")){(e=>{var t;const n=document.querySelector(e),i=document.querySelector(".advertory-skyscrapers-right-track"),[a,o]=Array.from(null!==(t=null==i?void 0:i.querySelectorAll('div[id*="skyscraper"]'))&&void 0!==t?t:[]);if(!(n&&i&&a&&o))return;const r=()=>{const e=i.getBoundingClientRect().top+window.scrollY,t=n.getBoundingClientRect().top+window.scrollY,o=document.querySelector(".advertory-wallpaper-background");if(document.body.style.setProperty("--skyscrapers-right-track-height",ce(t-e)),document.body.style.setProperty("--skyscraperright_1-height",ce(pe(a))),o){const e=pe(o)-pe(a)+15;document.body.style.setProperty("--skyscraper-second-margin",ce(e))}};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r);const d=new ResizeObserver(r);d.observe(n),d.observe(a),d.observe(i),window.addEventListener("load",r)})('div:has(div[id*="fullscreen"])')}Q(e)&&(()=>{const e=document.querySelector("#takeover"),t=document.querySelector("div[id*='mobile-topboard'], div[id*='topboard']"),n=null==t?void 0:t.parentElement;t&&n&&e&&(e.appendChild(t),n.style.display="none")})(),ne(e)&&e.targetId.includes("netboard")&&ue(e)},adLoaded:e=>{},adNoBid:e=>{if(ie(e.targetId)){const{finnBlink:t}=s.get();((e,t)=>{c(void 0,void 0,void 0,function*(){const{deviceType:n}=s.get();if(!t||!P(n))return;yield I(S);const{replacementConfig:i}=t,a=document.querySelector(`[id^="${e}"]`);if(!a||!(null==i?void 0:i.sizes))return;const{sizes:o}=i,r=z(e),d=N(r);a.dataset.finnBlinkId=r,a.dataset.noBidAd="true",q(a,d),T().withFinnBlinkAd(r)})})(e.targetId,t)}},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},ge={NO:"no",SE:"se"},he=()=>{const{country:e}=s.get();return e===ge.NO?"no-sno":"se-generic"},me=()=>{const{country:e,publisher:t}=s.get();return`${e}-${t}`},fe=e=>new URLSearchParams(window.location.search).get(e),ye=()=>{if(!window.location.search.includes("kv_"))return{};const e={},t=(()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e)})();return Object.keys(t).forEach(n=>{n.startsWith("kv_")&&(e[n.slice(3)]=t[n])}),e},be={SVD:"svd",VG:"vg",GODARE:"godare",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen"},we=e=>{const{source:t}=e;return"csm"===t},xe={[be.VG]:["board","netboard","backfill","outstream"],[be.AFTONBLADET]:["panorama","outstream"],[be.GODARE]:["panorama","outstream"],[be.SVD]:["wph-article-panorama","wph-front-panorama"]},ke=e=>{var t;const{publisher:n}=s.get();return!!xe[n]&&!!(null===(t=xe[n])||void 0===t?void 0:t.some(t=>e.includes(t)))},Ee=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return _("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const a=e=>{i||(_("Resolving advertising permission value obtained"),i=!0,t(e))},o=setTimeout(()=>{_("Advertising permission timed out, resolving with false"),a(!1)},3e3);window._tcf_.onTcfReady(()=>{_("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);_("Advertising permission value obtained asynchronously: ",e),a(Boolean(t))})}),Te="cmp:loaded";let Ae,Ie=!1;const Se=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),a=(null==e?void 0:e.timeout)||3e3,o=fe("bypass_tcf"),r=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(_("TCF bypass param detected, returning consent: true"),!0):(_("TCF is not enabled, returning consent: true"),!0))(i,o))return!0;if(Ie)return null;if(!Ae)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Ae.getConsentedToAllSync();return _(`TCF consented to all is: ${t}`),Ae.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(_("Getting TCF consent manager..."),window._tcf_)return _("TCF consent manager is already available"),Ae=window._tcf_,void e(Ae);_("TCF consent manager is not available");const n=()=>{_("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Ae=window._tcf_,e(Ae)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(Te,n),Ie=!0,t(new Error("Timeout waiting for CMP to load"))},a);_("Listening for CMP loaded event..."),document.addEventListener(Te,n,{once:!0})}):Promise.resolve(null),getConsentSync:r,getConsentAsync:()=>c(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return _(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const i=(null==e?void 0:e.schibstedAdChoicesEnabled)&&n===ge.SE,o=(null==e?void 0:e.schibstedAdChoicesEnabled)&&!t&&n===ge.NO;if(i||o)return _("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Ee(e);if(!(null==e?void 0:e.enabled))return!0;const d=r();return null!==d?d:yield new Promise((e,t)=>{try{if(!Ae)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{_("TCF isConsentedToAll timed out, resolving with false"),n(!1)},a);Ae.onTcfReady(()=>{_("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Ae.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},Ce=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Oe=()=>{const e=Ce("_pulse2data");return e?e.split(",")[2]:void 0},Pe=9826;class $e{constructor(){this.getSupplyTypeKeywords=()=>{const{deviceType:e=O.DESKTOP,isMobileApp:t}=s.get();if(t){return{"aa-sch-supply_type":`app_${e===O.MOBILE?"phone":O.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return c(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return c(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return Oe()}getExternalUid(){return c(this,void 0,void 0,function*(){return yield c(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=s.get(),{getConsentAsync:i}=Se(e,t,n);if(!(yield i()))return;const a=Ce("_pulse2data");return a?a.split(",")[9]:void 0})})}isTrackingForbidden(){return c(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},testMember:t=Pe}=s.get();return window.location.search.includes("inventory_test=true")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{publisher:e}=s.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return c(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=s.get(),{getConsentAsync:i}=Se(e,t,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageType:e}=s.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}getSponsorsKeywords(){var e;const{publisher:t,keywordsConfig:n}=s.get(),i=null===(e=null==n?void 0:n.sponsors)||void 0===e?void 0:e.split(":").map(e=>`${t}_${e}`);return i?{"no-sno-news-sponsors":i}:{}}}const Le=new $e;function _e(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),a=(()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"})();return{OS:a,mobileOS:["ios","android"].includes(a)?a:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}Le.prepare.bind(Le);const je=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function ze(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",je.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Ne extends $e{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{deviceType:e=O.DESKTOP}=s.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{deviceType:e,isMobileApp:t}=s.get(),{OS:n,isHybridApp:i}=_e(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return ze(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageType:i}=s.get(),a=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${a.split("_").pop()||a}_${"article"===i?"article":"front"}`}}}const qe=864e5,De=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return _("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=qe)=>{const a={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(a))},getByTimestamp:(t,n=qe)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return _("Error with parsing localStorage data"),null}}}})(),Me="glimrTags",Be=["glwe_","glwet_"],Re={geofenceTags:[],geoTags:[],weatherTags:[]},Fe=(e,t,n,...i)=>c(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return _(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return _(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:a}=Se(e,t,n);return(yield a())?(_(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(_(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),Ve=()=>c(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=s.get();if(null==e?void 0:e.schibstedConsentToPayEnabled){return yield Fe(e,t,n,"glimr")}const{getConsentAsync:i}=Se(e,t,n);return yield i()}),Ue=()=>c(void 0,void 0,void 0,function*(){const{glimr:e}=s.get();if(!(yield Ve())||!(null==e?void 0:e.enabled))return void _("No consent for glimr data fetching.");const t=yield(n=500,c(void 0,void 0,void 0,function*(){return yield Promise.race([c(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{De.setWithTimestamp(Me,{tags:e,tagMappings:t}),n(!0)})})}catch(e){_(`Error during getting glimr data: ${e}`)}else _("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),He={svd:"svd",vg:"vg",godare:"godare",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},We=e=>Be.some(t=>e.startsWith(t)),Ke=e=>e.startsWith("glgc_"),Je=e=>!We(e)&&!Ke(e),Ge=e=>{const t=Ye();if(!t)return Re;const n=((e=[])=>e.filter(We))(t),i=((e=[])=>e.filter(Ke))(t),a=((e=[],t)=>{const n=e.filter(Je);if(t){const{publisher:e}=s.get(),t=He[e]||e;n.push(t)}return n})(t,e);return{geoTags:a,geofenceTags:i,weatherTags:n}},Ye=()=>{const e=De.getByTimestamp(Me);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},Qe={get:(e,t)=>c(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>c(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),a=yield fetch(e,{method:"POST",headers:t,body:i});if(!a.ok)throw new Error(a.statusText);return yield a.json()})},Xe="advertory:ppids-cache",Ze={[ge.SE]:`SCH${ge.SE.toUpperCase()}-EnvHash`,[ge.NO]:`SCH${ge.NO.toUpperCase()}-EnvHash`},et={[ge.SE]:`SCH${ge.SE.toUpperCase()}-UserHash`,[ge.NO]:`SCH${ge.NO.toUpperCase()}-UserHash`},tt={[ge.SE]:`sch${ge.SE}-envhash-v3`,[ge.NO]:`sch${ge.NO}-envhash-v3`},nt={[ge.SE]:`sch${ge.SE}-userhash-v3`,[ge.NO]:`sch${ge.NO}-userhash-v3`},it={[ge.SE]:`'sch${ge.SE}-iosid-v3'`,[ge.NO]:`'sch${ge.NO}-iosid-v3'`},at={[ge.SE]:`sch${ge.SE}-androidid-v3`,[ge.NO]:`sch${ge.NO}-androidid-v3`},ot={[ge.SE]:"sdrn:schibsted.com:user",[ge.NO]:"sdrn:spid.no:user"};class rt{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const dt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return c(this,arguments,void 0,function*(e,t=1e4){var n,i;const a=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=a.xandr)||void 0===n?void 0:n.ppId1,null===(i=a.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||_("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},st=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return c(this,void 0,void 0,function*(){var n,i,a,o,r,d,s,l,c,p,u;const v=De.get(Xe),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(a=g.anId)||void 0===a?void 0:a.plain),void this.setPPIDs(null!==(o=c.userId)&&void 0!==o?o:"",null!==(r=c.environmentId)&&void 0!==r?r:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(p=null==g?void 0:g.idfv)||void 0===p?void 0:p.plain,null===(u=null==g?void 0:g.anId)||void 0===u?void 0:u.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||_("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const a in e){if((null===(n=e[a])||void 0===n?void 0:n.plain)!==(null===(i=t[a])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const a=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});De.set(Xe,a)}hashPPIDs(e,t){return c(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Qe.post(t,n,e)}catch(e){return _("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return c(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>c(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${ot[t]}:${n}`:null}))(t,n),a=yield(e=>c(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),o=window.advertory_idfv,r=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:a},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},o?{idfv:{plain:o}}:{}),r?{anId:{plain:r}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:a}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:a.plain}}},lt=e=>c(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,country:i,isMobileApp:a}=e;if(!(yield Fe(n,a,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([dt.processPPIDs(t,null==n?void 0:n.timeout),st.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){_(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),ct=e=>{const{ppid1:t,ppid2:n}=dt.getPPIDs(),{ppid1:i,ppid2:a,idfv:o,anId:r}=st.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new rt).add(n,Ze[e]).add(t,et[e]).add(a,tt[e]).add(i,nt[e]).add(o,it[e]).add(r,at[e]).buildEids()}]}},pt=e=>{const{ppid1:t,ppid2:n}=dt.getPPIDs(),{ppid1:i,ppid2:a,idfv:o,anId:r}=st.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new rt).add(n,Ze[e]).add(t,et[e]).add(a,tt[e]).add(i,nt[e]).add(o,it[e]).add(r,at[e]).buildRyEids()}}]}}},ut={FRONT:"front"};const vt=new class extends Ne{prepare(e){return c(this,void 0,void 0,function*(){const t=this.getPageTypeKeywords()["aa-sch-page_type"],n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"aa-sch-country_code":ge.NO},this.getPublisherKeywords()),this.getPageTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getSupplyTypeKeywords()),this.getAppTypeKeywords()),this.getDeviceKeywords()),yield this.getAdvertisingConsentKeywords()),this.getHasContextKeywords(e.keywords)),yield c(void 0,void 0,void 0,function*(){const{glimr:e}=s.get(),{addPublisherToGeo:t}={},n=yield Ve();if(!(null==e?void 0:e.enabled)||!n)return _("No consent for getting glimr tags."),{};const i=he(),a=Ge(t);return{[`${i}-geo`]:a.geoTags,[`${i}-weather`]:a.weatherTags,[`${i}-geofence`]:a.geofenceTags}})),(()=>{const{ppid1:e,ppid2:t}=dt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}})()),e.keywords),i=Object.assign(Object.assign({},n),this.getSponsorsKeywords()),a=Object.assign(Object.assign({},n),this.getPageTypeKeywords());return Object.assign(Object.assign({},e),{keywords:t===ut.FRONT?a:i,user:Object.assign(Object.assign({},ct(ge.NO)),{externalUid:yield this.getExternalUid()}),member:this.getMember()})})}};var gt=vt.prepare.bind(vt);const ht=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),mt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),ft=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={}}=s.get(),a=[`${he()}-geo`],o=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection",...i?a:[]],r=Object.fromEntries(Object.entries(e).filter(([e])=>o.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:r}}},d)}},yt=(e,...t)=>c(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const a=document.createElement("script");a.async=!0,a.src=e;const o=()=>{d(),n()},r=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{a.removeEventListener("load",o),a.removeEventListener("error",r),clearTimeout(s)};a.addEventListener("load",o),a.addEventListener("error",r);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(a)}).catch(e=>{console.error(e)}))}),bt=e=>e.includes("snoap.no"),wt=e=>{var t,n,i,a,o;return!!(null===(o=null===(a=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===a?void 0:a.ads[1])||void 0===o?void 0:o.rtb)},xt=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),a=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),o=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...o,a).toString()},kt=xt([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:a,clientHeight:o}=i,r=e/a,d=t/o;i.style.transform=`scale(${r},${d})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),Et=e=>{const t=xt([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},Tt=[],At={},It=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=Ct(e);n?(St(i,n),Ot(e,i,t)):(St(i,n),Pt(e,i,t))})},St=(e,t)=>{var n,i;const a=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!a)return;const o=t?"showFullscreen":"hideFullscreen";null===(i=a.contentWindow)||void 0===i||i.postMessage(`advertory:${o}-${e}`,"*")},Ct=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},Ot=(e,t,n)=>{e.classList.add("in-screen"),document.body.classList.add("fullscreen-scroll-in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Tt.includes(t)||Tt.push(t),n&&window.addEventListener("scroll",At[t],{passive:!0})},Pt=(e,t,n)=>{Tt.includes(t)&&(n&&window.removeEventListener("scroll",At[t]),document.body.classList.remove("fullscreen-scroll-in-screen"),e.classList.remove("in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},$t=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:a=3}=t,o=[],r=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&o.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&r.push(t)}),()=>{o.length&&Lt(e,o,a,0),r.length&&Lt(e,r,a,40)}},Lt=(e,t,n,i)=>{const a=e.offsetHeight,o=window.scrollY,r=e.getBoundingClientRect().top+o;t.forEach(e=>{const t=e.offsetHeight;let d;d=r>o?(r-o)/t-i:(o+t-(r+a))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function _t(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}_t('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100% !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:0}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:1;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:19px !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const jt={no:{adText:"ANNONSE",adFrom:"ANNONSE FRA",adContent:"ANNONSØRINNHOLD",adContentFrom:"ANNONSØRINNHOLD FRA"},se:{adText:"ANNONS",adFrom:"ANNONS FRÅN",adContent:"EXTERN LÄNK",adContentFrom:"EXTERN LÄNK FRÅN"}};let zt=null;const Nt=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\n {\n const frame = window.frameElement;\n \n if (frame) {\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n window.addEventListener('message', function(event) {\n if (event.data === 'advertory:showFullscreen-'+document.body.id) {\n document.body.style.display= \"block\";\n } else if (event.data === 'advertory:hideFullscreen-'+document.body.id) {\n document.body.style.display= \"none\";\n }\n });\n }\n }\n ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${kt})()`,e+t.outerHTML})(n),n=(e=>{if((e=>e.includes("google"))(e))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("img");return n?(n.style.width="100%",n.style.height="100%",n.style.objectFit="cover",n.style.position="fixed",t.innerHTML):e})(n),n=(e=>{if(bt(e))return e;const t=document.createElement("style");return t.textContent="\n .GoogleActiveViewClass, .GoogleActiveViewElement {\n transform: translate(calc(-50% + 50vw), 0);\n width: 100vw !important;\n height: 100vh !important;\n }\n .GoogleActiveViewClass img, .GoogleActiveViewElement img {\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n }\n .GoogleActiveViewClass iframe {\n width: 100vw !important;\n height: 100vh !important;\n }\n ",e+t.outerHTML})(n),(e=>e.includes("adform"))(n)&&(n=(e=>{const t=document.createElement("script");t.textContent='\n var frame = window.frameElement;\n if (frame) {\n frame.style.removeProperty("width");\n frame.style.removeProperty("height");\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n var iframe = document.querySelector("adfm-ad iframe");\n if (iframe) {\n var image = iframe.contentWindow.document.getElementById("image");\n if (!image) return;\n image.style.backgroundSize = "cover";\n } else {\n var iframe = document.querySelector(".adform-adbox iframe");\n if (iframe) {\n var style = document.createElement("style");\n style.textContent = "#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}";\n iframe.contentDocument.body.append(style);\n iframe.style = "width: 100vw; height: 100vh;";\n } else {\n var observer = new MutationObserver(function(mutations, obs) {\n for (var mutation of mutations) {\n var iframe = mutation.addedNodes[0];\n if (iframe && iframe.nodeName === "IFRAME") {\n iframe.style = "width: 100vw; height: 100vh;";\n iframe.dataset.contents += "<style>#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}</style>";\n obs.disconnect();\n }\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n }\n ';const n=document.createElement("style");return n.textContent="\n html, body, adfm-ad, #sf_align, .adform-adbox, .adform-adbox img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover;\n max-width: 100vw;\n }\n ",e+n.outerHTML+t.outerHTML})(n)),(e=>e.includes("529299503"))(n)&&(n=Et(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>bt(e)?e:e.replace("<iframe ","<iframe onload=\"\n var f = document.querySelector('iframe');\n if (!f) return;\n var s = f.style;\n s.transform = 'scale(' + (window.innerHeight / Number(f.height)).toFixed(2) + ')';\n s.right = parseInt((Number(f.width) - window.innerWidth) / 2) + 'px';\n s.bottom = parseInt((Number(f.height) - window.innerHeight) / 2) + 'px';\n s.position = 'relative';\n \" "))(n)),bt(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</iframe>","</iframe><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),(e=>e.includes("kreateam.io"))(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</div>","</div><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),wt(t)&&(n=(e=>{const t=document.createElement("script");t.textContent='var frame = window.frameElement;\n if (frame) {\n frame.style.width = "100vw";\n frame.style.height = "100vh";\n }';const n=document.createElement("div");return n.innerHTML=e,n.appendChild(t),n.innerHTML})(n)),n},qt=()=>{zt=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,a=document.documentElement;a.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),a.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),a.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},Dt=()=>{zt||(zt=window.requestAnimationFrame(qt))},Mt=(e,t)=>{var n,i,a,o;const{country:r}=s.get(),{targetId:d}=e;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==t?void 0:t.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),(e=>{const{articlesContainerWidth:t=1302,backgroundColor:n="#fff",foregroundColor:i="#fff",margin:a="16px 0",beforeContentValue:o=""}=e,r=t/2,d=document.createElement("style");d.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${r}px),\n ${i} calc(50% - ${r}px),\n ${i} calc(50% + ${r}px),\n ${n} calc(50% + ${r}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${a};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${o&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${o}' !important;\n }`,d.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(d)})(null!==(i=null==t?void 0:t.overlayStyles)&&void 0!==i?i:{});const l=document.getElementById(d),c=null==l?void 0:l.parentElement;if(!l||!c)return;((e,t)=>{const n=(null==t?void 0:t.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>It(e,n),{}),a=Ct(e);i.observe(e),n&&(At[a]=$t(e,t))})(c,t),l.className="advertory-fullscreen-scroll";const p=le(e,D)?"absolute":"fixed";l.style.position=p,c.className="advertory-fullscreen-scroll-wrapper",c.dataset.showTagSubscribeId=d,l.setAttribute("data-ad-label",jt[r].adText),(null==t?void 0:t.moveCogwheelToTheLeft)&&(l.dataset.moveCogwheelToTheLeft="true"),Dt(),window.addEventListener("resize",Dt),null===(a=window.visualViewport)||void 0===a||a.addEventListener("resize",Dt),null===(o=window.visualViewport)||void 0===o||o.addEventListener("scroll",Dt)},Bt=({targetId:e})=>{const t=(e=>{const{requests:t}=window.apntag,n=wt(e)?1:0;return null==t?void 0:t.tags[e].adResponse.ads[n].rtb.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=wt(e)?1:0;n&&(n.tags[e].adResponse.ads[i].rtb.banner.content=t)})(e,Nt(t,e))},Rt=()=>c(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,country:n,isMobileApp:i,fullscreenScroll:a}=s.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:o}=s.getHandlers(),{getConsentAsync:r}=Se(t,i,n),d=yield r(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const a=ht(),{prebid:{relevantCbTimeout:o}={}}=s.get(),r="relevantCb"===i&&o?o:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,a.loadTags&&a.loadTags())},r);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=ht(),p=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=ht();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:u=""}={},keywords:v}=p;(()=>{const e=mt();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return _("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=mt();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const i=d?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};_("prebid consentManagement",i),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},pt(n)),ft(v,u))),_("core add prebid config",Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},pt(n)),ft(v,u))),t.loadPrebid({configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{Ft(e,o)},directRenderFn:e=>{const{settings:t,renderFn:n}=e,{bid:i,adDiv:o}=t||{};if(!o)return;const r=n(t),d=Object.assign(Object.assign({},i),{targetId:o.id,banner:!0});J(d)&&(Mt(d,a),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(r))}}),_("core load prebid",{configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{Ft(e,o)},directRenderFn:()=>{}})})}),Ft=(e,t)=>{var n;const{divId:i,native:a,bid:o}=e,r=document.querySelectorAll(`[id^=${i}]`)[0],d=`RY-${r.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(r,d);const l=null===(n=r.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;t({native:a,targetId:d},s.get()),null==l||l.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:o.adId}),"*")};let Vt="";const Ut=new Map,Ht=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},Wt=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=m.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},Kt=()=>{b();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{k(e.id),Wt(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=z(e.id)}),u(()=>window.apntag.clearRequest())},Jt="noGroupedPlacements",Gt=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Yt=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Qt=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,deviceType:a}=s.get(),o=n[a].filter(Yt)||[],r=e?document.querySelector(e):document;if(!r)return[];const d=o.reduce((e,t)=>{const n=Gt(t.id);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=o.filter(({id:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDevice)?`div[id^="${e}"][data-device=${a}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,l=r.querySelectorAll(d),c=Array.from(l).filter(({id:e})=>e.match(t)).map((e,t)=>{const i=Xt(e,t,n),a=`${e.id}-${((e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++)t+=p[Math.floor(36*Math.random())];return t})(6)}`;return e.id=a,e.setAttribute("data-advertory-ad-rendered","true"),i.finnBlink&&!i.finnBlink.renderOnlyWithAdBlock&&e.setAttribute("data-is-finn-blink-placement","true"),(e=>{var t;const n=e.id;n&&m.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},i),{id:a})});return(e=>{const{keywordsConfig:t}=s.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(Vt!==window.location.pathname&&(Ut.clear(),Vt=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=Ut.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${me()}-count`]=i,Ut.set(n,i+1),e})):e})(c)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.id)-t.findIndex(e=>e.id===n.id))})(d)},Xt=(e,t,n)=>{const i=n[t],a=n[n.length-1],o=n.filter(({id:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.id)?i:(null==e?void 0:e.id)===(null==a?void 0:a.id)?a:o||a},Zt=e=>{const{queryConfig:{placementBatches:t}={},deviceType:n}=s.get(),i=(null==t?void 0:t[n])||{},a=Object.values(i).flat(),o=(e=>{const t={};return e.forEach(e=>{const n=z(e.id);e.isBackfill&&(t[n]=[e])}),t})(e),r=((e,t)=>{const n={};for(const[i,a]of Object.entries(t))n[i]=e.filter(e=>a.includes(z(e.id)));return n})(e,i),d=Object.keys(o),l=((e,t)=>e.filter(e=>!t.has(z(e.id))))(e,new Set([...d,...a]));return Object.assign(Object.assign(Object.assign({},r),o),{[Jt]:l})},en=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:a}=window,[o,r]=t;if(!i.dataset.lockedsize&&r&&o)i.style.width=`${o}px`,i.style.height=`${r}px`,n&&(a.resizeAd(i.id,[o,r]),i.dataset.lockedsize="true",i.dataset.lockedwidth=o.toString(),i.dataset.lockedheight=r.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&a.resizeAd(i.id,[e,t])}},tn=["netboard","board"];class nn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:a}=e,o=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),r=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",a),o&&d.searchParams.append("urlData",o),r&&d.searchParams.append("excludedItems",r),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return c(this,void 0,void 0,function*(){var t,n;const i=yield this.identityFacade.getIdentityUser(),a=null!==(n=yield null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId())&&void 0!==n?n:"",o=(null==i?void 0:i.userId)?String(i.userId):"",r=this.buildUrl(e,{envId:a,spid:o});try{_("Starting fetching DrEdition ad from URL:",r);const e={method:"GET"},t=yield Qe.get(r,e);return _("Fetch operation completed successfully."),t}catch(e){_("Error during fetch operation:",e)}return null})}}let an=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:a,creativeId:o}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:r}=t,d=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:r,utm_campaign:a,utm_medium:d},o&&{utm_id:`df-${o}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),a=new URLSearchParams(decodeURIComponent(e.search)),o=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{a.has(e)||o.set(e,null!=t?t:"")}),o.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const a=this.getDrEditionUTMParams(e,t),o=new URL(i);return Object.entries(a).forEach(([e,t])=>{o.searchParams.has(e)||o.searchParams.set(e,null!=t?t:"")}),o.toString()}handleVideo(e,t){return c(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:a,videoLoop:o,vendor:r}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:r,vgtvAutoplay:i,vgtvMuted:a,vgtvLoop:!!o,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:a}=new URL(n);if(!i.includes("www.vg.no")&&!a.includes("annonsorinnhold"))return[n];const o=a.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const on=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):_("Dr. Edition container does not have a parent element, cannot remove height lock.")};class rn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return c(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{containerSelector:a},renderAsBackfill:o=!1}=t,r=e.querySelector(a);if(!r)return void _(`Container with selector "${a}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||o?!(null==d?void 0:d.itemId)&&o?(_("No Dr. Edition ads available to render. Collapsing whole placement."),k(e.id),void on(r)):((null==d?void 0:d.itemId)&&o&&(_("Dr. Edition ad available to render as a Xandr backfill."),E(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(r,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),on(r),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):on(r))):(_("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(r),this.showBackfill(e),void on(r))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";E(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let a=null;const o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(a&&clearTimeout(a),a=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{o.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{o.observe(e)}),!0}}class dn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return c(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Se(n.tcf,n.isMobileApp,n.country),a=yield i(),o=P(n.device)?t.mobileHTML:t.desktopHTML,r=a?o:o.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=r,e.querySelectorAll("a").forEach(e=>{var i,a,o;e.search=null!==(o=null===(a=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===a?void 0:a.call(i,e,t,n))&&void 0!==o?o:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class sn{constructor(e){this.strategy=e}handle(e,t){return c(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return c(this,void 0,void 0,function*(){const t=e.drEditionConfig.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield yt(t)}catch(e){_("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return c(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,a=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==a||a.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const o=null==a?void 0:a.parentNode;if(!o)return;const r=o.closest("a");o.addEventListener("click",e=>{const t=e.target.closest("a");r!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,a;const{preview:{url:o,thumbnail:r}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!o)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",o),d.setAttribute("playsinline",""),!(!d||!r)&&(null===(a=(i=t.drEditionConfig).addPreviewVideo)||void 0===a||a.call(i,d),!0))}}let ln=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,a=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=a?a:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return c(this,void 0,void 0,function*(){var i,a,o,r,d,s,l,c;if(!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(o=null===(a=this.pulse)||void 0===a?void 0:a.trackLegacyViewUIElement)||void 0===o||o.call(a,p):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return c(this,void 0,void 0,function*(){var i,a,o,r,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(a=(i=this.pulse).trackLegacyClickUIElement)||void 0===a||a.call(i,l):this.pulse.trackClickUIElement?null===(r=(o=this.pulse).trackClickUIElement)||void 0===r||r.call(o,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class cn extends ln{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){const{pulseData:{title:i,clientName:a="",creativeId:o}={}}=t,{columnName:r,primaryPosition:d}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:i,placement:{columnName:r,primaryPosition:d},"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":o},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let pn=class extends ln{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,a,o,r,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:p}={}}=t,u=n.editionName,v=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(r=null===(o=null===(a=this.newsroomStrategy)||void 0===a?void 0:a.getPulseObjectId)||void 0===o?void 0:o.call(a))&&void 0!==r?r:u,"@type":"UIElement",position:u,elementType:"Article",custom:{customer:c,creativeId:null!=p?p:l},page:{"@id":null!=g?g:u,"@type":v,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var a,o,r,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId:p,itemId:u,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),f=this.getTeaserElementText(e,"subtitle"),y=this.getTeaserElementText(e,"image"),b=null!==(d=null!==(r=null===(o=null===(a=this.newsroomStrategy)||void 0===a?void 0:a.getUrlWithParams)||void 0===o?void 0:o.call(a,t,n))&&void 0!==r?r:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:p,itemId:u,link:b,placement:n.editionName,subtitle:f,time:h,title:m,type:i,imageUrl:y,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const un=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},vn=e=>c(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),gn={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return c(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return bo})})}})}},hn=(e,t)=>{null==e||e.forEach(e=>{gn[e](t)})};class mn{handleVideo(e,t){return c(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:a,vendor:o}}){yield c(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const r=["ContentMutePlugin"],d=this.createPlayerOverlay(e);hn(r,d);const s={id:t,node:n,autoplay:i,mute:a,vendor:o,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},l=yield vn(s);l.once("assetReady",()=>{un(l,r)}),l.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),l.once("PulseStats:ready",()=>c(this,void 0,void 0,function*(){const e=yield l.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===ut.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),a=i.split("/").filter(Boolean);return a.length?[...a.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const fn="https://www.aftonbladet.se/video-player-extras/latest/";class yn{handleVideo(e,t){return c(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:a,vendor:o}}){const r={id:t,node:n,autoplay:i,mute:a,vendor:o,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${fn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${fn}external-link.js`]:{name:"ExternalLink"}}};yield vn(r),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}getPulseObjectId(){return""}getPulsePageId(){return""}}const bn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class wn{handleVideo(e,t){return c(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:a,vendor:o}}){const r={id:t,node:n,autoplay:i,mute:a,vendor:o,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},bn(e)?e:{}),{provider:Object.assign(Object.assign({},bn(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield vn(r);d.once("PulseStats:ready",()=>c(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===ut.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let xn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const kn=(e,t,n)=>{var i;const{publisher:a,pageType:o,country:r}=e,d={[be.VG]:new an,[be.E24]:new mn,[be.AFTONBLADET]:new yn,[be.SVD]:new wn}[a]||new xn,s=new(r===ge.SE?cn:pn)(n,d,o),l=new nn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new dn(d,s),p=new sn(d);return new rn(l,c,p,s)},En=()=>c(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class Tn{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return c(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return _("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return c(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const An=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig,a=document.querySelectorAll(i),o=new IntersectionObserver((i,a)=>((e,t,n,i,a)=>{const o=kn(n,i,a);e.forEach(e=>{var i,a,r;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(a=d.dataset.pulseColumnname)&&void 0!==a?a:"",c=null!==(r=d.dataset.pulsePrimaryposition)&&void 0!==r?r:"";o.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(i,a,e,t,n),{rootMargin:"400% 0px"});a.forEach(e=>o.observe(e))},In=[],Sn=(e,t)=>c(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:a,deviceType:o,drEdition:r,publisher:d,pageType:s,country:l,isMobileApp:c}=e;if(!(yield Fe(a,c,l,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n;const{deviceType:i,placements:a,drEdition:{fallbackGlobalEditionName:o}={}}=e,r=a[i]||a.desktop,d=z(t.targetId),s=r.find(e=>e.id===d),l=tn.some(e=>d.startsWith(e)),c=In.includes(d),p=(null===(n=null==s?void 0:s.drEdition)||void 0===n?void 0:n.editionName)||o;return s&&l&&!c&&p?(In.push(d),Object.assign(Object.assign({},s),{drEdition:Object.assign(Object.assign({},s.drEdition),{editionName:p})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void _("Pulse has not been passed as a prop, aborting");const u=yield En(),v=new Tn(u),g=kn({publisher:d,pageType:s,country:l},v,null==i?void 0:i.instance),h=document.getElementById(t.targetId);if(!h||!r)return;h.classList.value="";const m=document.createElement("div");m.className=r.containerSelector.replace(/^[.#:[\]]+/,""),h.innerHTML=m.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:o,tcf:a,isMobileApp:c,country:l,renderAsBackfill:!0};yield g.fetchAndRenderAd(h,f)}),Cn="collapseAd",On="hideAd",Pn="resizeAd",$n="renderDrEditionFallback",Ln="wallpaperImageUrl",_n="wallpaperColor",jn="velvet",zn=[Pn,Ln,_n,Cn,On,$n,jn];let Nn;const qn=e=>{if("object"==typeof e)return e;if(t=e,x.test(t)){const t=e.replace(/^wallpaper:url:/,"");return{name:Ln,wallpaperImageUrl:t}}var t;if((e=>e.startsWith("wallpaper:color:"))(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:_n,wallpaperColor:t}}if(e.startsWith($n)){const t=e.split(":")[1];return{name:$n,targetId:t}}if(e.startsWith(Cn)||e.startsWith(On)){const t=e.split(":")[1];return{name:Cn,targetId:t}}if(e.includes("name")&&zn.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}},Dn=e=>{if(!["http://acdn.adnxs-simple.com","https://acdn.adnxs-simple.com","https://crcdn01.adnxs-simple.com","http://crcdn01.adnxs-simple.com","https://acdn.adnxs.com","http://acdn.adnxs.com","https://adsdk.microsoft.com","https://adsdk.bing.net","https://adsdkprod.azureedge.net"].includes(e.origin.trim()))return;const{data:t}=e;if(!t)return;const n=qn(t);if(!n)return;if(!n.name||!zn.some(e=>n.name===e))return;const{name:i,targetId:a,wallpaperImageUrl:o,wallpaperColor:r,cmd:d,size:l}=n;i===jn&&d&&(d.includes("noScroll")&&(Nn=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(d.includes("close")||d.includes("ended"))&&(null==Nn||Nn(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==Cn&&i!==On||!a||k(a),i===Pn&&a&&d&&en(a,d),i===$n&&a&&(k(a),Sn(s.get(),{targetId:a})),"resizeMediationAd"===i&&a&&l&&en(a,l,!0),i===Ln&&o&&(e=>{const t=document.querySelector(`.${f}`);t&&(t.style.backgroundImage=`url(${e})`)})(o),i===_n&&r&&(e=>{const t=document.querySelector(`.${f}`);t&&(t.style.backgroundColor=e)})(r)},Mn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Bn=(e,t)=>{if(ie(t))return _(`loading finn blink ad with full ads chain for ${t}`),void T().withFullAdsChain(t);u(()=>(_("core showTag",{id:t}),e.showTag(t)))},Rn=(e,t)=>c(void 0,void 0,void 0,function*(){yield v,yield g;const n=new IntersectionObserver((e,t)=>((e,t,n)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:i}=e,a=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(i),o=document.getElementById(a);_("core log from intersection observer handler",{targetId:a,element:o}),n(window.apntag,a),o&&(t.unobserve(o),t.disconnect())})})(e,t,Bn),Mn(t));n.observe(e)}),Fn=new Map,Vn=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Un=".brandstudio-premium-content-widget",Hn=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Wn=({adWrapper:e,placementContainer:t})=>{const n=Hn({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),Wt(i=t),i.innerHTML=""},Kn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Jn=({adWrapper:e,placementContainer:t})=>{const{publisher:n}=s.get(),i=Vn.includes(n)&&Boolean(t.closest(Un));const a=i?t.closest(Un):null,o=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,r=n&&t.matches("iframe, article")&&e;if(!n||!i&&!r||i&&!a)return;if(r)return Kn(e),void o.disconnect();const d=t.closest('[style*="height"]'),s=a;d&&s.contains(d)?Kn(d):s.hasAttribute("style")&&Kn(s),o.disconnect()})})});try{o.observe(t,{childList:!0,subtree:!0})}catch(e){o.disconnect()}},Gn=(e,t,n,i,a,o)=>{var r;const d=performance.now(),s=null!==(r=Fn.get(t))&&void 0!==r?r:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,a)&&n<0;d-s>=a&&l&&(Fn.set(t,d),((e,t,n)=>{const i=null==n?void 0:n.parentElement;i&&n&&Wn({adWrapper:i,placementContainer:n}),u(()=>{e.setKeywords([t],{[`${he()}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,o))},Yn=(e,t,n,i)=>{const a=new IntersectionObserver((e,t)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:a,boundingClientRect:o}=e;t(window.apntag,a.id,o.y,n,i,a)})})(e,Gn,n,i),Mn(t));a.observe(e)},Qn=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const a=e.slice(i,i+t);n.push(a)}return n},Xn=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Zn=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},ei=(e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),a=null==i?void 0:i.parentElement;if(!a||!i)return;Jn({adWrapper:a,placementContainer:i});const{delayTime:o=1e3}=t,r=(new Date).getTime();if(i&&"true"!==i.dataset.subscribedForRefresh){const e=(e=>{var t;const{deviceType:n,preloadMarginsConfig:i}=s.get(),a=null==i?void 0:i[n];return((e,t)=>t[e])(null!==(t=e.dataset.priority)&&void 0!==t?t:"normal",(({high:e,normal:t,low:n}={})=>{var i,a,o,r,d,s;return{high:{refreshMargin:null!==(i=null==e?void 0:e.refreshMargin)&&void 0!==i?i:600,renderMargin:null!==(a=null==e?void 0:e.renderMargin)&&void 0!==a?a:300},normal:{refreshMargin:null!==(o=null==t?void 0:t.refreshMargin)&&void 0!==o?o:300,renderMargin:null!==(r=null==t?void 0:t.renderMargin)&&void 0!==r?r:150},low:{refreshMargin:null!==(d=null==n?void 0:n.refreshMargin)&&void 0!==d?d:100,renderMargin:null!==(s=null==n?void 0:n.renderMargin)&&void 0!==s?s:50}}})(a)).refreshMargin})(i);i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Yn(i,e,r,o)}},ti=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=s.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),ri(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},ni=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const a of i){const i=e.find(e=>{var t;return e.id===(null===(t=a.firstElementChild)||void 0===t?void 0:t.id)&&e.bfCacheRefresh}),o=null==i?void 0:i.threshold;Zn(a,o)&&i&&(Ht(i.id),n.length&&a.classList.remove(...n),ri([i],t))}},ii=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},isMobileApp:i}=s.get();t&&(e.forEach(({id:e})=>{const t=ai(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{ni(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),ni(e,!1,t))};n.persisted&&(Xn()?window.addEventListener("scroll",i,{passive:!0}):ni(e,!1,t))})})(e,n))},ai=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},oi=e=>{const{id:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(ai(t)),a=(e=>1===e[0]&&1===e[1])(i),o={sizes:[i],allowedFormats:a?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return a||(o.native=void 0),o},ri=(e,t=!1)=>{const{requestSize:n=r}=s.get(),i=e.map(({id:e})=>e),a=Qn(i,n);if(t)for(const t of e){const e=oi(t);window.apntag.modifyTag(t.id,e)}for(const e of a)u(()=>window.apntag.refresh(e))};const di="#fff",si="#0098da",li="splash",ci="welcomePage",pi="topscroller",ui="velvet",vi="takeover-displayed",gi="takeover-visit-count",hi=14400,mi=()=>{const e=Ce(gi);return e?parseInt(e):0},fi=()=>{const{takeover:{enabled:e=!1,secondVisitEnabled:t=!1}={}}=s.get();return!window.location.href.includes("takeover=0")&&(!!window.location.href.includes("takeover=1")||!(!e||(()=>{var e;const t=(null===(e=s.get().takeover)||void 0===e?void 0:e.cookieCapName)||vi;return"true"===Ce(t)})())&&(!t||yi()))},yi=()=>{const e=mi();return 0===e?((()=>{const e=mi(),{takeover:{cookieCapTime:t=hi}={}}=s.get(),n=document.location.hostname;window.document.cookie=`${gi}=${e+1}; max-age=${t}; domain=${n}; path=/`})(),!1):1===e},bi=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),wi=()=>{const{takeover:e}=s.get();return Boolean(null==e?void 0:e.topscroller)},xi=()=>c(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{cookieCapName:t=vi,cookieCapTime:n=hi}={},isMobileApp:i,tcf:a,country:o}=s.get(),r=yield Fe(a,i,o,"ad-takeover-cookiecap");n&&r&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),ki=e=>{var t;const n=!!(null===(t=s.get().takeover)||void 0===t?void 0:t.setCookieCapForNotShownAd);return Q(e)&&n},Ei=(e,t)=>{var n;if(t===pi){const{topscroller:t}=e;return null!=t?t:{}}if(t===li){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ti=(e,t)=>{t!==li?(e=>{var t,n,i;const a=null===(n=null===(t=s.get().takeover)||void 0===t?void 0:t.welcomePage)||void 0===n?void 0:n.headerElementSelector,o=null===(i=s.get().takeover)||void 0===i?void 0:i.topscroller;if(!a||o)return;const r=document.querySelector(a),d=document.querySelector(".welcome-page-wrapper"),l=document.querySelector(`#${e.targetId}`),c=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&d&&c&&l))return;const p=null==r?void 0:r.offsetHeight,u=X(e)?"60svh":`calc(100svh - ${p}px)`,v=X(e)?"calc(40svh + 30px)":`calc(${p}px + 30px)`;d.style.setProperty("height",u,"important"),l.style.setProperty("height",u,"important"),c.style.setProperty("bottom",v,"important")})(e):(e=>{var t;if(!(null===(t=s.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const a=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",a,"important")})(e)},Ai=xt([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),Ii=(e,t=!0)=>{(e===ci||e===pi)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Si=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Ci=e=>{document.body.style.overflow=e?"initial":"hidden"},Oi=e=>{const t=$i(e),n=Pi(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Ci(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Pi=e=>{const t=()=>Oi(e);return window.addEventListener("advertory:closeTakeover",t),Si(),t},$i=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Oi(e)};return Si(),window.addEventListener("keydown",t),t},Li=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&($i(e),Pi(e),Si(),t.addEventListener("click",()=>{Oi(e)}),Ci(!1))},_i=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Pi(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},ji=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Oi(e))})(e)},zi=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=s.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=jt.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Ni=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=jt.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},qi=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=jt.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Di=e=>{e.classList.toggle("advertory-impact-wrapper",!0)},Mi=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},Bi=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${Ai})()`,e+t.outerHTML})(e)),n},Ri=e=>{const t=(e=>{const{requests:t}=window.apntag,n=wt(e)?1:0;return null==t?void 0:t.tags[e].adResponse.ads[n].rtb.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=wt(e)?1:0;n&&(n.tags[e].adResponse.ads[i].rtb.banner.content=t)})(e,Bi(t))},Fi=e=>c(void 0,void 0,void 0,function*(){const{takeover:t}=s.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),a=document.querySelector(".advertory-takeover-wrapper");if(!i||!a||!t)return;const o=(e=>{const{width:t,height:n}=e;return bi(t,n)?li:le(e,V)?ui:wi()?pi:ci})(e),r=a.offsetHeight,d=window.scrollY>r;a.style.display="block",!d&&Ii(o,!1),((e,t)=>{({[ci]:qi,[li]:zi,[pi]:Ni,[ui]:Di})[t](e)})(a,o),Mi(),((e,t)=>{({[ci]:_i,[pi]:_i,[li]:Li,[ui]:ji})[t](e)})(a,o),((e,t,n)=>{if(!n)return;({[ci]:()=>{const{buttonLabel:i}=Ei(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[li]:()=>{const{themeColors:i,logotype:a,buttonLabel:o,showArrowIcon:r}=Ei(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=o?o:""),".advertory-splash-close"===t&&r){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&a&&(n.setAttribute("src",a.url),n.setAttribute("alt",a.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:di,"important"),n.style.color=null!=t?t:si}}})},[pi]:()=>{const{buttonLabel:i,showArrowIcon:a,showCloseButton:o=!0}=Ei(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||a||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[ui]:()=>{}})[t]()})(a,o,t),yield xi(),!d&&Ii(o,!0),Ti(e,o)});_t(".advertory-brandmetrics-survey{width:100%}");const Vi="advertory-brandmetrics-survey",Ui=()=>c(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},country:t,isMobileApp:n,tcf:i}=s.get(),a=yield Fe(i,n,t,"norstat");if(!e||n||!a)return;const o=(e=>{const{ppid1:t,ppid2:n}=dt.getPPIDs(),{ppid1:i,ppid2:a}=st.getPPIDs(),o=(new rt).add(n,Ze[e]).add(t,et[e]).add(a,tt[e]).add(i,nt[e]);return`${o.buildNorstatPath()}?${o.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{c(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${t===ge.NO?"schibsted":"schibstedse"}/map/${o}`,"norstat")}),Hi={nativeAd:e=>G(e)&&!te(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:Y,fullscreenScroll:J,topscroller:e=>Q(e)&&wi(),splash:e=>Q(e)&&bi(e.width,e.height),welcomePage:Q,wallpaper:Z,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:de,hFormat:se,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!se(e)&&!de(e),topboard:e=>e.targetId.startsWith("topboard")&&!Q(e),widescreen:re,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:te,brandboard:e=>ne(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!oe(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:ae,midboard:oe},Wi=({adObj:e,preferredTestIdData:t})=>{var n,i;const a=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!a)return;const o=null===(i=document.querySelector(`#${a}`))||void 0===i?void 0:i.parentElement;if(!o)return;if(((e,t)=>{var n,i,a,o;const r=null===(o=null===(a=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===a?void 0:a[e])||void 0===o?void 0:o.invCode;r&&(t.dataset.invCode=r)})(a,o),null==t?void 0:t.testId)return void(o.dataset.testid=t.testId);const r="DIV"===(null==o?void 0:o.tagName);e&&r&&((e,t)=>{var n,i;for(const[a,o]of Object.entries(Hi))if(o(e)){if("nativeAd"===a){const o="default";t.dataset.testid=`${a}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:o}`;break}t.dataset.testid=a;break}})(e,o)},Ki=e=>{var t;return(null===(t=Object.entries(Hi).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},Ji=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},Gi=new Map;Gi.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Gi.set("panorama",{scale:.79,transformOrigin:"center center"}),Gi.set("outstream",{scale:.79,transformOrigin:"center center"}),Gi.set("integration",{scale:.79,transformOrigin:"center center"}),Gi.set("toppanorama",{scale:.8,transformOrigin:"left center"});const Yi=e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=Ki(e),a=Gi.get(i),o=document.querySelector(`#${e.targetId}`);if(!o||!a)return;if(o.style.transformOrigin=a.transformOrigin,o.style.transform=`scale(${a.scale})`,!(null==a?void 0:a.cogwheelAdjust))return;const r=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==o?void 0:o.offsetWidth;r&&"number"==typeof d&&!isNaN(d)&&r.style.setProperty("right",String(-1*d*.2)+"px")},Qi=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,Xi=e=>`externalImpId:'${e}'`,Zi=e=>{var t;const{forwardExternalImpId:n=!1,tracker:i}=s.get(),a=(e=>{var t;if(!e.positionConfig)return e;const n=e.keywords[`${me()}-count`],i=e.positionConfig.find(e=>e.adPositionIndex===n);if(!i)return e;const a=i.keywords?Object.assign(Object.assign({},e.keywords),i.keywords):e.keywords;return Object.assign(Object.assign({},e),{sizes:null!==(t=null==i?void 0:i.sizes)&&void 0!==t?t:e.sizes,keywords:a})})(e),{id:o,sizes:r,keywords:d,allowedFormats:l,invCode:c,ssa:p=!1,nativeCustomProperties:u,safeframeConfig:v,resizeAdParentDiv:g=!1,dynamicSizeWidthCheck:h=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||fi())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=null==n?void 0:n.filter(e=>e!==pi),a=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),o=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:o,keywords:a})})(a),m=Object.assign({invCode:c,sizes:r,targetId:o,keywords:Qi(d,p),allowedFormats:l,resizeAdParentDiv:g,dynamicSizeWidthCheck:h},v&&{safeframeConfig:v}),f=(e=>{var t,n,i,a,o,r,d;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(_("Tracker state pageViewId is:",null===(o=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===o?void 0:o.pageViewId),null===(d=null===(r=null==e?void 0:e.instance)||void 0===r?void 0:r.state)||void 0===d?void 0:d.pageViewId):(_("Tracker state does not contain field pageViewId or it is empty"),""):(_("Tracker state is empty"),""):(_("Tracker is not configured in initAdvertory function"),"")})(i);n&&f&&(_("External Impression ID assigned to defineTag:",Xi(f)),m.externalImpId=Xi(f));const y=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon2:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(m.native=y),m},ea=e=>!e.includes("takeover")||fi(),ta=e=>{const{publisher:t=""}=s.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)},na=e=>{if(!e)return e;const t=e[`${he()}-targetid`],n=t?z(t[0]):"";return Object.assign(Object.assign({},e),t&&{[`${he()}-targetid`]:[n]})},ia=e=>Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${he()}-geo`]&&{[`${he()}-geo`]:["geo-test-value"]}),e[`${he()}-geofence`]&&{[`${he()}-geofence`]:["geofence-test-value"]}),e[`${he()}-weather`]&&{[`${he()}-weather`]:["weather-test-value"]}),aa=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],a=e.find(e=>e.invCode===i),o=document.querySelector(`[id^=${null==a?void 0:a.id}]`);o&&o.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},oa=(e,t)=>c(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})}),ra={arrayMerge:(e,t)=>t},da=e=>c(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>c(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield Qe.get(t,{method:"GET",signal:n.signal})}catch(e){throw _("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?(({siteConfig:e,configOverrides:t})=>{var n;const{keywords:a,refresh:o,placements:r,threshold:d,batchSize:s}=t,l=i.all([e.placements,r],ra),c=i(e.pageOptions,{keywords:a},ra),p=i(e.appearanceConfig,{defaultThreshold:d},ra),u=i(null!==(n=e.refreshConfig)&&void 0!==n?n:{},{scrollRefreshEnabled:o},ra);return Object.assign(Object.assign({},e),{placements:l,requestSize:null!=s?s:e.requestSize,pageOptions:c,appearanceConfig:p,refreshConfig:u})})({siteConfig:e,configOverrides:t}):e}catch(t){return _("Error fetching S3 config, using site config",{error:t}),e}}),sa=".advertory-right-column-track",la="--advertory-right-column-track-height",ca=e=>e.getBoundingClientRect().top+window.scrollY,pa=(e,t)=>{const n=ce(t);document.body.style.setProperty(e,n)},ua=(e,t)=>`${e}-${t}`,va=(e,t,n)=>{var i;const a=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),o=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===o.length)return;const r=ca(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=pe(e);pa("--advertory-newsroom-header-height",t)})(),o.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=ca(e),a=ua(la,t),o=i-n,r=ua("--advertory-right-column-split-point-height",t),d=pe(e);pa(a,o),pa(r,d)})(e,t+1,r),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=ua("--advertory-right-column-ad-height",t),i=pe(e);pa(n,i)})(a[t])});((e,t)=>{const n=ca(e);pa(la,n-t)})(o[Math.min(a.length,o.length-1)].point,r)};let ga=!1;class ha{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:a}=new URL(n);if(!i.includes("www.vg.no")&&!a.includes("annonsorinnhold"))return[n];const o=a.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class ma{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class fa{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return c(this,void 0,void 0,function*(){var t,n,i,a,o,r,d,s;if(!this.pulse)return;const l=this.getEventInput(e,"view");(null===(t=this.pulse)||void 0===t?void 0:t.trackLegacyViewUIElement)?null===(i=null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)||void 0===i||i.call(n,l):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)||void 0===r||r.call(o,l):null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackElementView)||void 0===s||s.call(d,l)})}trackContentClick(e){return c(this,void 0,void 0,function*(){var t,n,i,a,o,r;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(a=(i=this.pulse).trackClickUIElement)||void 0===a||a.call(i,d):null===(r=(o=this.pulse).trackElementClick)||void 0===r||r.call(o,d)})}}class ya extends fa{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,a,o,r;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),p=this.mapPageType(this.pageType),u=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==a?a:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=u?u:c,"@type":p,url:location.origin},tags:null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===r?void 0:r.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const ba="[data-k5a-teaser-analytics]",wa=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const a=new ya(e,t,n),o=new WeakMap,r=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(ba);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(a.trackContentView(n),t.unobserve(e.target),r(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(ba);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(a.trackContentView(e),t.unobserve(e),r(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>a.trackContentClick(e))})};class xa{handleKilkayaStreamTracking({pulse:e,pageType:t,publisher:n}){if(!(null==e?void 0:e.instance))return;const i={[be.VG]:new ha}[n]||new ma;wa(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(_(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";E(i)}loadKilkayaScript(e){return c(this,void 0,void 0,function*(){yield yt(e)})}run(e){return c(this,void 0,void 0,function*(){const{tcf:t,isMobileApp:n,country:i,kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const o=yield Fe(t,n,i,"kilkaya");o&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(o),yield this.loadKilkayaScript(a.url),this.handleKilkayaStreamTracking(e))})}}const ka=e=>{var t,n,i,a,o,r;const{adScaleConfig:d,deviceType:l}=s.get();if(!(null==d?void 0:d.enabled))return;if(le(e,M))return;const c=null!==(t=d.adsToBeScaled[l])&&void 0!==t?t:[],p=Gt(e.targetId.split("-")[0]);if(!c.includes(p))return;const u=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[p])&&void 0!==i?i:0,v=document.getElementById(e.targetId),g=null!==(a=null==v?void 0:v.offsetWidth)&&void 0!==a?a:window.screen.width,h=null!==(r=null===(o=null==v?void 0:v.parentElement)||void 0===o?void 0:o.offsetWidth)&&void 0!==r?r:window.screen.width;((e,t=window.screen.width)=>{const n=Ji(e,t),i=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);i&&(i.style.transform=`scale(${n})`,i.style.transformOrigin="left top")})(e,(g<h?g:h)-u)},Ea=1e4,Ta=e=>e.some(e=>e.some(e=>!!e&&Zn(e,0))),Aa=()=>{const{widescreenSwitching:e}=s.get(),{enabled:t,rotationInterval:n=Ea,widescreenIdPrefix:i}=null!=e?e:{};if(!t)return;const a=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=s.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let o=0,r=Date.now(),d=Ta(a);if(!a.length)return;const l=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},c=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block"),e[1]&&(e[1].style.display="none")})})(a);const p=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=Ta(a)||d,r=Date.now());Date.now()-r>=n&&((()=>{const e=c(o),t=a.map(e=>e[o]),n=a.map(t=>t[e]);l(t,"opacity","0"),setTimeout(()=>{l(t,"display","none"),l(n,"opacity","0"),l(n,"display","block"),setTimeout(()=>{l(n,"opacity","1")},450)},450)})(),o=c(o),r=Date.now())},1e3);window.addEventListener("scroll",p)};let Ia,Sa=[];const Ca=["takeover","wallpaper"],Oa=e=>{const t=(e=>{const t=m.getData("alertoryConfigKeywords"),{queryConfig:n,placements:i,tcf:a,glimr:o,appearanceConfig:d,requestSize:s=r,publisher:l,country:c,pageType:p,deviceType:u,isMobileApp:v=!1,pageOptions:{member:g},takeover:h,fullscreenScroll:f,useAppTabletInvCode:y}=e;return{xandr:{member:g,keywords:t,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({publisher:l,country:c,pageType:p,deviceType:u,placements:i,tcf:a,requestSize:s,isMobileApp:v,useAppTabletInvCode:y},o&&{glimr:o}),n&&{queryConfig:n}),d&&{appearanceConfig:d}),h&&{takeover:h}),f&&{fullscreenScroll:f})}})(e);window.advertory={initialized:!0,siteConfig:e,alertoryConfig:t}},Pa=()=>c(void 0,void 0,void 0,function*(){const{pageOptions:e}=s.get(),{preparePageOptions:t}=s.getHandlers(),n=(()=>{const{sandboxAdIframeEnabled:e=!0}=s.get();return{sandboxAdIframe:e,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield c(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=s.get();return(yield Fe(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),a=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=m.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=ia(e);m.setData("alertoryConfigKeywords",n)})(a.keywords),u(()=>Ia.setPageOpts(a))}),$a=e=>c(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,isMobileApp:i,country:a}=s.get();La(e);const o=yield Fe(n,i,a,"prebid");(null==t?void 0:t.enabled)&&o?(_("core loadPlacements prebid enabled"),yield Rt()):(_("core load tags invoked without prebid enabled"),_a(e))}),La=e=>{const{prepareTag:t}=s.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.id.includes(t)),a=t.findIndex(e=>n.id.includes(e));return-1!==i&&-1===a?-1:-1===i&&-1!==a?1:i-a})})(e).forEach(e=>{_("core defineTags",{placement:e});const i=Zi(e);if(ea(e.id)){const a=t(i),o=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:a}=e;return{adTypes:t,invCode:n,keywords:na(i),sizes:a}})(a);n.push(o),u(()=>(_("core defineTag - add to the queue",{placement:e,preparedTag:a}),Ia.defineTag(a)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},_a=e=>{const t=e.filter(({id:e})=>ea(e)).map(({id:e})=>e);t.length&&u(()=>(_("core loadTags",{placementsIdsToLoad:t}),Ia.loadTags([...t])))},ja=(e,t)=>c(void 0,void 0,void 0,function*(){const{appearanceConfig:n,deviceType:i}=s.get(),{threshold:a,refresh:o,priority:r="normal"}=e,d=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),l=null==n?void 0:n.defaultThreshold[i];d&&(_("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,threshold:a,deviceDefaultThreshold:l}),yield Rn(d,null!=a?a:l)),d&&o&&(_("core showAd - setup refreshing",{placement:e,adObj:t}),d.dataset.refresh=o.toString(),d.dataset.priority=r)}),za=e=>e.some(({id:e})=>Ca.some(t=>e.includes(t))),Na=e=>c(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const{requestSize:n=r}=s.get(),i=Zt(e);for(const e of Object.keys(i)){const t=i[e],a=Qn(t,n);for(const e of a)za(e)?(_("core loadAds without lazy loading",{placementsToLoad:e}),yield $a(e)):e.length&&(_("core loadAds with lazy loading",{placementsToLoad:e}),yield qa(e))}}),qa=e=>c(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=s.get(),i=[];if(!t)return _("lazy load is not enabled",{placements:e}),void(yield $a(e));const a=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{_("lazy load is enabled - handler start",{loadedPlacementIds:i,placements:e});const a=e.every(e=>i.includes(e.id)),o=e.map(e=>e.id);!a&&i.push(...o),!a&&$a(e),_("lazy load is enabled - handler stop",{loadedPlacementIds:i,placements:e,arePlacementsLoaded:a,placementIds:o}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.id);t&&(_("lazy loading - observe element",{placementId:e.id,element:t}),a.observe(t))})}),Da=()=>c(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t,wallpaperHandlers:{initWallpaperAd:n,adjustAdToHorseshoe:i}}=s.getHandlers(),{wallpaper:a,fullscreenScroll:o}=s.get(),r=[];u(()=>{Ia.onEvent("adRequested",()=>{e.adRequested()}),Ia.onEvent("adAvailable",i=>c(void 0,void 0,void 0,function*(){var r,d,l,c,p,v;_("core adAvailable start",{placementsAvailable:Sa,adObj:i,isFullscreenScrollAd:J(i),isFinnBlink:ie(i.targetId),isNativeAd:G(i),isMediation:we(i),isTakeoverAd:Q(i),isCollapseAd:ee(i),isWallpaperAd:Z(i)});const g=null===(l=null===(d=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===d?void 0:d.tags[i.targetId])||void 0===l?void 0:l.adResponse.ads;we(i)&&g&&(null===(c=g[1])||void 0===c?void 0:c.rtb)&&(i.banner=null===(v=null===(p=g[1])||void 0===p?void 0:p.rtb)||void 0===v?void 0:v.banner),J(i)&&Bt(i),re(i)&&Aa(),J(i)&&!ie(i.targetId)&&Mt(i,o),!G(i)||we(i)||ie(i.targetId)||t(i,s.get()),Q(i)&&!ee(i)&&(Ri(i.targetId),yield Fi(i)),Z(i)&&(n(()=>u(()=>window.apntag.showTag(i.targetId)),a),m.setData("wallpaper",{isAvailable:!0})),(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(i)&&m.setData("horseshoe",{isAvailable:!0}),Wi({adObj:i}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:a}=e;a?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(i),e.adAvailable(i);const h=Sa.find(({id:e})=>e===i.targetId);h&&(yield ja(h,i),Sa=Sa.filter(e=>e.id!==h.id)),_("core adAvailable stop",{placementsAvailable:Sa,adObj:i,isFullscreenScrollAd:J(i),isFinnBlink:ie(i.targetId),isNativeAd:G(i),isMediation:we(i),isTakeoverAd:Q(i),isCollapseAd:ee(i),isWallpaperAd:Z(i)})})),Ia.onEvent("adLoaded",n=>{const{refreshConfig:a,appearanceConfig:o}=s.get(),d=document.getElementById(n.targetId);ie(n.targetId)&&(e=>{const{fullscreenScroll:t}=s.get(),{initNativeAd:n}=s.getHandlers();J(e)&&Mt(e,t),G(e)&&n(e,s.get())})(n);r.includes(n.targetId)&&G(n)&&(t(n,s.get()),Wi({adObj:n})),!r.includes(n.targetId)&&we(n)&&r.push(n.targetId),ee(n)&&k(n.targetId),Q(n)&&((e,t)=>{var n;const i="100%",a="100%";e.resizeAd(t,[i,a]);const o=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(o),t=e.width,n=e.height;t===i&&n===a||(o.style.width=i,o.style.height=a)}}).observe(o,{attributes:!0,attributeFilter:["style"]})})(Ia,n.targetId),Y(n)&&(e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=s.get();if(!t||!n||!i)return;const a=t.parentElement;a&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),a.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))})(n),(e=>le(e,B))(n)&&(e=>{const t=document.querySelector(`#${e.targetId}`),n=null==t?void 0:t.querySelector("iframe"),i=null==n?void 0:n.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:o}={}}=s.get();if(!t||!n||!i)return;const r=window.innerWidth,d=Math.round(r/1080*1920);t.style.width="100%",t.style.height=`${d}px`,t.classList.add(`advertory-${a}-${o}__vertical-full-width-ad`);const l=Ji(e,t.offsetWidth);i.style.transform=`scale(${l})`,i.style.transformOrigin="left top"})(n),ei(n,a),(null==o?void 0:o.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);var l,c;m.getData("horseshoe").isAvailable&&i(n.targetId),ka(n),e.adLoaded(n),l=n.targetId,!document.querySelector(`#gdprAdTransparencyCogWheelButton-${l}`)&&(null===(c=window.gdpr)||void 0===c?void 0:c.setupButton)&&window.gdpr.setupButton(l),d&&(d.classList.add("ad-loaded"),(e=>{var t;const{siteSpecificConfig:n}=s.get(),i=null!==(t=null==n?void 0:n.mainColumnWidth)&&void 0!==t?t:1/0;e.clientWidth>i&&e.setAttribute("data-two-column-ad-layout","true")})(d)),Yi(n),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:Ki(n)}}))}),Ia.onEvent("adNoBid",t=>c(void 0,void 0,void 0,function*(){k(t.targetId),yield Sn(s.get(),t),ki(t)&&(yield xi()),e.adNoBid(t)})),Ia.onEvent("adError",(t,n)=>c(void 0,void 0,void 0,function*(){ki(n)&&(yield xi()),e.adError(t,n)})),Ia.onEvent("adCollapse",()=>{e.adCollapse()}),Ia.onEvent("adRequestFailure",t=>{k(t.targetId),e.adRequestFailure(t)}),Ia.onEvent("adBadRequest",t=>{k(t.targetId),e.adBadRequest(t)}),Ia.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),Ia.onEvent("adNoBidMediated",t=>e.adNoBidMediated(t))})}),Ma=(e,t)=>c(void 0,void 0,void 0,function*(){var n;s.set(e),s.setHandlers(t),m.initialize(),window.addEventListener("message",Dn,!1),Ia=window.apntag||{anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}},window.apntag=Ia,_("Apn tag is set up on window"),yield Promise.allSettled([c(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=s.get();(yield Fe(e,t,n,"xandr-endpoint"))||Ia.setEndpoint("ib.adnxs-simple.com",!0)}),c(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,isMobileApp:n,country:i}=s.get(),a=yield Fe(t,n,i,"prebid");(null==e?void 0:e.enabled)&&a&&(yield yt(null==e?void 0:e.url))}),lt(e),c(void 0,void 0,void 0,function*(){const{astUrl:e}=s.get();yield yt(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),c(void 0,void 0,void 0,function*(){const{gptUrl:e}=s.get();yield yt(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js")}),c(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,url:t}={},tcf:n,isMobileApp:i,country:a}=s.get(),{getConsentAsync:o}=Se(n,i,a),r=yield o();if(e&&t&&r){if(yield yt(t),document.querySelector(`.${Vi}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(Vi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Ue(),c(void 0,void 0,void 0,function*(){const{gdpr:{url:e,allowHidingAds:t=!0}={}}=s.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield yt(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),yield Ui(),_("Libraries have been loaded and trackers have been set"),yield(n=t.librariesToLoad,c(void 0,void 0,void 0,function*(){const e=n.map(e=>yt(e));yield Promise.all(e)})),yield Da(),yield Pa(),_("Page options have been set"),Oa(e),_("Advertory is setup on window"),Sa=Qt(),ti(Sa),ii(Sa),yield Na(Sa),_("Ads has been loaded",Sa),aa(Sa),yield t.replaceAdsWithFinnBlink(e.finnBlink),yield(e=>c(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield Fe(e.tcf,e.isMobileApp,e.country,"handleDrEdition")))return;const n=yield En(),i=new Tn(n);An({publisher:e.publisher,drEditionConfig:e.drEdition,device:e.deviceType,pageType:e.pageType,country:e.country},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}))(e),(e=>{if(!(null==e?void 0:e.enabled)||ga)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=sa}=e,a=document.querySelector(i);if(!a)return;ga=!0;const o=()=>{va(a,n,t)};o(),window.addEventListener("resize",o),window.addEventListener("orientationchange",o),window.addEventListener("load",o),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(o)}),new ResizeObserver(o).observe(a)})(e.rightColumnSplit),yield(e=>c(void 0,void 0,void 0,function*(){const t=new xa;yield t.run(e)}))(e)}),Ba=(e,t)=>c(void 0,void 0,void 0,function*(){yield((e,t)=>c(void 0,void 0,void 0,function*(){const{initConsentManager:n,getConsentAsync:i}=Se(e.tcf,e.isMobileApp,e.country),a=yield da(e);yield j(),yield oa(n),yield oa(i),_("TCF resolved successfully"),yield Ma(a,t),_("Run function resolved successfully")}))(e,t)}),Ra="native_override_desc2",Fa=(e,t,n)=>{var i;const{image:a,icon:o,sponsoredBy:r,title:d,clickUrl:s,cta:l,body:c,desc2:p,video:u,description:v,customTitle1:g,customTitle2:h,customTitle3:m,customTitle4:f,customIcon2:y}=e,b=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:b(a),imgWidth:null==a?void 0:a.width,imgHeight:null==a?void 0:a.height,imgAltText:null!=d?d:"",logo:b(o),sponsoredBy:null!=r?r:"",title:null!=d?d:"",url:null!=s?s:"",cta:null!=l?l:"",description:null!==(i=null!=c?c:v)&&void 0!==i?i:"",desc2:null!=p?p:"",video:u,customTitle1:null!=g?g:"",customTitle2:null!=h?h:"",customTitle3:null!=m?m:"",customTitle4:null!=f?f:"",logo2:b(y)},t)},Va=(e,t)=>{const n=(i=Ra,window.location.href.includes(i));var i;const a=new URLSearchParams(window.location.search).get(Ra),o=t.includes("native_recirc");return n&&a?a:(null==e?void 0:e.includes("recirc"))?o?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Ua=(e,t,n,i)=>{const a=document.querySelector(`#${e}`);a&&t&&(a.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:a}=t,o=i&&Object.values(be).includes(i);n&&o&&C(i,e,L,a)})(a,n),i())},Ha=e=>{var t;const n=document.querySelector(`#${e.targetId}`);if(!n||!(null===(t=e.native)||void 0===t?void 0:t.clickTrackers))return;(null==n?void 0:n.querySelectorAll("a.ad-link")).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Ga(i)}),t.dataset.tracked="true")})},Wa=e=>{const{native:{impressionTrackers:t}={}}=e;(null==t?void 0:t.some(e=>e.includes("googleads")))?null==t||t.forEach(Ja):window.apntag.fireImpressionTrackers(e);const n=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(n)},Ka=(e,t)=>{var n;let i=!1;const a=document.querySelector(`#${e.targetId}`);if(!a||!e.native)return;const{deviceType:o,appearanceConfig:r,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==r?void 0:r.defaultThreshold[null!=o?o:O.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,Wa(e),c.disconnect();break}},s);c.observe(a)},Ja=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Ga(e):window.navigator.sendBeacon(e)},Ga=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Ya=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:a,videoTemplates:o}=n,r="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=r}=e.native,c=l.toLowerCase(),p=null!==(i=Va(e.targetId,l))&&void 0!==i?i:c,u=jt[t.language||ge.NO],v=Fa(d,u,s);return(d.video?o[p]:a[p]||a.default)(v,t)})(e,t,n);Ua(e.targetId,i,t,()=>{const{nativeTrackingConfig:{nativeTrackingEnabled:n=!0}={}}=t;n&&((e,t)=>{Ha(e),Ka(e,t)})(e,t)})};_t('@import"https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap";.advertory-shared-ad-native-content-display-basic{width:100%;font-family:Roboto,sans-serif;color:#6d747e;text-align:left;background:#fff;position:relative;margin:0 auto;display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic *{line-height:normal}.advertory-shared-ad-native-content-display-basic .ad-info{top:0;right:8px;position:absolute}.advertory-shared-ad-native-content-display-basic .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic .ad-link{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-link:hover{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-header{padding:5px 16px;background-color:#ffcd00;font-size:12px;text-transform:uppercase;color:#495057;font-weight:600}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper{display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{position:relative;padding-bottom:40%}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{display:none}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper{position:absolute;height:100%;width:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper .ad-large-image{object-fit:cover;min-width:100%;height:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content{box-sizing:border-box;display:flex;background-color:#fffae6}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container{flex-grow:1;padding:16px}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:20px;color:#212529;font-weight:600;margin-bottom:16px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:22px}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-sponsor{font-size:11px;color:gray;font-weight:600;text-transform:uppercase}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:none;max-width:175px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:block}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover;max-width:100%}.advertory-shared-ad-native-content-display-basic.article .ad-info{top:0;right:0;position:absolute;border-bottom-left-radius:50%;background:hsla(0,0%,100%,.6)}.advertory-shared-ad-native-content-display-basic.article .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{display:block}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container{padding:8px 16px;border-left:4px solid #ffcd00}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{display:flex;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper .ad-header{padding:2px 4px;font-size:11px}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:15px;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:18px;margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:16px 8px 16px 0}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:0}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:contain}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover}}');const Qa="viewable",Xa="adClick";const Za=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.querySelector("ClickThrough"),a=n.querySelector("VideoClicks");if(i){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n.createCDATASection(t))}else if(a){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),a.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},eo=({id:e,nodeId:t,poster:n,tagURL:i,publisher:a="",productTag:o="xandr",videoLoop:r=!1})=>({id:e,poster:n,vendor:"appnexus",node:t,mute:!0,autoplay:r,repeat:r,skin:{name:"inventory-player",url:"https://ads.inventory.schibsted.io/styles/player.css"},settings:{jw:{stretching:"fill",advertising:{client:"vast",tag:i}}},pulse:{provider:a.toLowerCase(),decorator:e=>Object.assign(Object.assign({},bn(e)?e:{}),{provider:Object.assign(Object.assign({},bn(null==e?void 0:e.provider)?e.provider:{}),{productTag:o})})}}),to=e=>c(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:i}=e,{repeat:a}=t,o=yield vn(t);hn(n),o.once("assetReady",()=>{un(o,n)}),o.on(Qa,e=>{const{viewable:t}=e;t?o.play():o.pause()}),o.on(Xa,()=>{window.open(i,"_blank")}),a&&o.on("pause",()=>{o.play()})});_t(".advertory-shared-ad-native-video{width:100%;min-height:250px;height:auto;margin:auto;text-align:left;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed}@media screen and (min-width: 768px){.advertory-shared-ad-native-video{width:580px}}.advertory-shared-ad-native-video .ad-info{position:absolute;top:2px;right:24px}.advertory-shared-ad-native-video .ad-info .gdprAdTransparencyCogWheelButton{background-color:rgba(0,0,0,0);border-bottom-right-radius:13px;z-index:10}.advertory-shared-ad-native-video a.ad-link{display:block;text-decoration:none;color:#2b2b2b}.advertory-shared-ad-native-video a.ad-link:hover{text-decoration:none}.advertory-shared-ad-native-video .ad-content .ad-header{font-size:12px;padding:5px 8px;color:#4c3d00;background:rgba(255,205,0,.8);font-weight:bold}.advertory-shared-ad-native-video .ad-content .ad-image-container{position:relative;line-height:0}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-image-container{min-height:300px}}.advertory-shared-ad-native-video .ad-content .ad-image-container .ad-player-wrapper{height:56.4971751412vw;width:100%}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-image-container .ad-player-wrapper{height:326px}}.advertory-shared-ad-native-video .ad-content .ad-text-container{background:#fff6d1;overflow:auto;padding-bottom:15px;padding-left:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-text-container{background:#fff6d1;padding-left:16px;overflow:auto}}.advertory-shared-ad-native-video .ad-content .ad-text-container .sponsored-by{margin:8px 16px 8px 0;color:#64625a;font-size:10px;text-transform:uppercase;display:block;font-weight:600}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-text-container .sponsored-by{font-size:12px}}.advertory-shared-ad-native-video .ad-content .ad-text-container .title{line-height:1;margin:8px 0;font-weight:bold;font-size:20px;font-family:Arial,sans-serif}@media screen and (min-width: 768px){.advertory-shared-ad-native-video .ad-content .ad-text-container .title{font-size:22px}}"),_t(".advertory-abo-ad-native-video{width:100%;min-height:250px;margin:auto;color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed}.advertory-abo-ad-native-video *{box-sizing:border-box;line-height:normal;text-transform:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-video{width:580px;height:400px}}.advertory-abo-ad-native-video .ad-info{position:absolute;height:26px;width:26px;top:20px;left:0;z-index:1000;background-color:hsla(0,0%,100%,.4509803922);border-bottom-right-radius:13px;transform:none;transform-origin:center}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-info{top:30px}}.advertory-abo-ad-native-video .ad-info .gdprAdTransparencyCogWheelButton{background-color:rgba(0,0,0,0);border-bottom-right-radius:13px;z-index:10}.advertory-abo-ad-native-video .ad-content .ad-image-container{position:relative;line-height:0}.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-header{position:absolute;height:20px;width:100%;font-size:13px;line-height:20px;color:#4c3d00;background:rgba(255,205,0,.8);z-index:100}.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-header span{margin-left:8px}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-header{height:30px;line-height:30px;padding-left:16px}.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-header span{margin:0}}.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-player-wrapper{height:56.4971751412vw;width:100%}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-image-container .ad-player-wrapper{height:326px}}.advertory-abo-ad-native-video .ad-content .ad-text-container{background:#fff6d1;overflow:auto}.advertory-abo-ad-native-video .ad-content .ad-text-container .sponsored-by{color:#64625a;font-size:10px;margin:8px 8px 3px 8px;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-text-container .sponsored-by{font-size:13px;margin:8px 16px}}.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link{text-decoration:none;display:flex;flex-direction:column}.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link,.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link:focus,.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link:hover,.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link:visited{color:#000}.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link .ad-title{margin:0 8px 7px 8px;min-height:52px;line-height:24px;color:#000;font-size:20px;font-weight:700;display:flex;flex-direction:column}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link .ad-title{font-size:22px;margin:0 16px 9px 16px;height:35px;min-height:auto;line-height:35px;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;display:block}}.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link .ad-description{display:none;border-top:1px solid rgba(128,128,128,.5019607843);margin:0 8px 12px 8px;padding-top:8px;color:#6a6a6a;font-style:normal;font-weight:normal;font-size:12px;line-height:14px}@media screen and (min-width: 768px){.advertory-abo-ad-native-video .ad-content .ad-text-container .ad-link .ad-description{font-size:13px;margin:8px 16px;line-height:16px}}");const no=({containerId:e,adText:t,url:n,adFrom:i,sponsoredBy:a,title:o},r,d)=>`<article class="advertory-abo-ad-native-video">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-content">\n <div class="ad-image-container">\n <div class="ad-header">\n <span>${t}</span>\n </div>\n <div class="ad-player-wrapper">\n <div id="${d}"></div>\n </div>\n </div>\n <div class="ad-text-container">\n <span class="sponsored-by">\n ${i} ${a}\n </span>\n <a class="ad-link" href="${n}" target="_blank">\n <span class="ad-title">${o}</span>\n <div class="ad-description">${o}</div>\n </a>\n </div>\n </div>\n </article>`;_t('@import"https://fonts.googleapis.com/css?family=Inter:400,600&display=swap";.advertory-abo-ad-native-podme-section{height:130px;background:linear-gradient(90deg, #23375e 0%, #041426 104.93%);border-radius:11px}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section{height:202px}}.advertory-abo-ad-native-podme-section .ad-link{text-decoration:none;color:initial;background-color:rgba(0,0,0,0);cursor:pointer}.advertory-abo-ad-native-podme-section .ad-content-wrapper{display:flex;height:100%;font-family:"Inter",sans-serif;font-style:normal;font-weight:normal}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container{display:flex;flex-direction:column;width:428px;margin:18px 3px 8px 18px;font-family:"Inter",sans-serif;font-style:normal;font-weight:normal}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container{margin:41px 28px 41px 41px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container .ad-title{font-weight:600;color:#fff;font-size:calc(12px + 11*(100vw - 300px)/468);line-height:16px;margin-bottom:7px}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container .ad-title{font-size:23px;line-height:28px;margin-bottom:15px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container .ad-description{color:#17e1e3;font-size:calc(10px + 8*(100vw - 300px)/468);font-weight:normal;line-height:14px}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-text-container .ad-description{font-size:18px;font-weight:500;line-height:22px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-small-image-container{display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;max-width:253px;min-width:100px;height:100%;margin:0 auto}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-small-image-container{min-width:250px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-small-image-container .ad-small-image{max-width:100%;max-height:100%;object-fit:fill}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-logo{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-logo{display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;max-width:162px;height:100%;margin:0 16px}}.advertory-abo-ad-native-podme-section .ad-content-wrapper .ad-logo .logo{max-width:100%;max-height:100%;object-fit:fill}'),_t('.advertory-abo-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif;font-weight:600;text-align:left;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed}.advertory-abo-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-default{width:580px;height:400px}}.advertory-abo-ad-native-default .ad-info{position:absolute;top:20px;height:26px;width:26px;left:0;z-index:1000;background-color:hsla(0,0%,100%,.4509803922);border-bottom-right-radius:13px;transform:none;transform-origin:center}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-info{top:30px}}.advertory-abo-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0)}.advertory-abo-ad-native-default .ad-content{display:block}.advertory-abo-ad-native-default .ad-image-container{position:relative;line-height:0}.advertory-abo-ad-native-default .ad-image-container .ad-header{position:absolute;height:20px;width:100%;font-size:13px;line-height:20px;color:#4c3d00;background:rgba(255,205,0,.8)}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-image-container .ad-header{height:30px;line-height:30px;padding-left:16px}}.advertory-abo-ad-native-default .ad-image-container .ad-header span{margin-left:8px}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-image-container .ad-header span{margin:0}}.advertory-abo-ad-native-default .ad-image-container .ad-image{position:static;width:100%;height:52.3560209424vw}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-image-container .ad-image{height:301px}}.advertory-abo-ad-native-default .ad-image-container .ad-logo{position:absolute;height:30px;width:auto;top:auto;bottom:8px;left:8px;right:auto}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-image-container .ad-logo{left:16px;bottom:16px}}.advertory-abo-ad-native-default .ad-text-container{background:#fff6d1;overflow:auto}.advertory-abo-ad-native-default .ad-text-container .ad-sponsored-by{color:#64625a;font-size:10px;margin:8px 8px 3px 8px;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-text-container .ad-sponsored-by{font-size:13px;margin:8px 16px}}.advertory-abo-ad-native-default .ad-text-container .ad-title{margin:0 8px 7px 8px;min-height:52px;line-height:24px;color:#000;font-size:20px;font-weight:700;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-abo-ad-native-default .ad-text-container .ad-title{font-size:24px;margin:0 16px 8px 16px;height:59px;min-height:auto;line-height:normal;overflow:hidden}}.advertory-abo-ad-native-default.bt .ad-text-container .ad-title{font-family:"TabacG2",serif;font-weight:500}'),_t('.advertory-abo-ad-native-sponsorstripe{position:absolute;top:0;left:0;width:100%;height:1px;background:inherit;padding:0;margin:0;border:none;text-align:left}.advertory-abo-ad-native-sponsorstripe .ad-wrapper{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:980px;height:30px;padding:5px 15px;margin:auto;font-family:"Helvetica Neue",Arial,Roboto,sans-serif}.advertory-abo-ad-native-sponsorstripe .ad-logo{flex:0;height:20px;max-width:35%;max-height:inherit}.advertory-abo-ad-native-sponsorstripe .ad-title{margin-right:10px;padding-left:34px;font-size:13px;color:#fff}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper{display:grid;position:absolute;place-content:center;height:30px;min-width:30px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{display:inline-block;height:20px;width:20px;position:relative;border:solid 1px #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{content:"i";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:13px}.advertory-abo-ad-native-sponsorstripe .ad-description{font-size:13px;color:#fff;position:absolute;top:0;max-width:980px;min-height:30px;padding:15px 35px 15px 15px;margin-left:-15px;background-color:rgba(0,0,0,.9)}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper{position:absolute;top:15px;right:15px;place-content:center;height:16px;min-width:16px}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button{display:inline-block;height:16px;width:16px;position:relative;border:1px solid #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button:before{content:"✕";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:10px;font-weight:bold}.advertory-abo-ad-native-sponsorstripe .ad-description .ad-description-readmore{color:#c7ecff}.advertory-abo-ad-native-sponsorstripe .ad-description.hide{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-sponsorstripe .ad-wrapper{height:50px}.advertory-abo-ad-native-sponsorstripe .ad-wrapper .ad-description{min-height:50px}.advertory-abo-ad-native-sponsorstripe .ad-logo{height:40px}.advertory-abo-ad-native-sponsorstripe .ad-title{font-size:20px;padding-left:40px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{height:30px;width:30px;border-width:2px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{font-size:20px}}');_t(".advertory-abo-ad-native-recirc{width:100%;min-height:250px;margin:auto;color:#000;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed}@media screen and (min-width: 768px){.advertory-abo-ad-native-recirc{max-width:283px;height:400px}}.advertory-abo-ad-native-recirc .ad-info{position:absolute;top:0;height:26px;width:26px;left:0;z-index:1000;background-color:hsla(0,0%,100%,.4509803922);border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-abo-ad-native-recirc .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0)}.advertory-abo-ad-native-recirc .ad-content{display:block}.advertory-abo-ad-native-recirc .ad-image-container{position:relative;line-height:0}.advertory-abo-ad-native-recirc .ad-image-container .ad-header{height:30px;font-size:13px;line-height:30px;font-weight:600;color:#4c3d00;background:rgba(255,205,0,.8);padding-left:32px;font-family:-apple-system,BlinkMacSystemFont,sans-serif;border-top-right-radius:10px;border-top-left-radius:10px}.advertory-abo-ad-native-recirc .ad-image-container .ad-image{width:100%}.advertory-abo-ad-native-recirc .ad-image-container .ad-logo{position:absolute;height:30px;width:auto;top:auto;bottom:8px;left:8px;right:auto}@media screen and (min-width: 768px){.advertory-abo-ad-native-recirc .ad-image-container .ad-logo{left:16px;bottom:16px}}.advertory-abo-ad-native-recirc .ad-text-container{background:#fff6d1;overflow:auto;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.advertory-abo-ad-native-recirc .ad-text-container .ad-sponsored-by{display:block;color:#64625a;font-size:13px;padding:5px 8px;text-transform:uppercase;font-family:Roboto,sans-serif}.advertory-abo-ad-native-recirc .ad-text-container .ad-title{padding:6px 8px;margin-bottom:12px;color:#000;font-size:17px;font-weight:700;font-family:Arial,sans-serif}"),_t('.advertory-abo-ad-native-content-video{position:relative;display:table;table-layout:fixed;width:100%;margin:0 auto;background:#fff;font-family:"Inter",sans-serif;font-weight:700;text-align:left;color:#000}.advertory-abo-ad-native-content-video *{line-height:1}.advertory-abo-ad-native-content-video a.ad-link{display:block;text-decoration:none;color:inherit}.advertory-abo-ad-native-content-video a.ad-link:hover{text-decoration:none}.advertory-abo-ad-native-content-video .ad-info{z-index:10;top:44px}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-info{top:50px}}.advertory-abo-ad-native-content-video .ad-info div[role=button]{top:44px !important;border-bottom-right-radius:13px;background-color:hsla(0,0%,100%,.45);z-index:10}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-info div[role=button]{top:51px !important}}.advertory-abo-ad-native-content-video .ad-content{display:flex;flex-direction:column}.advertory-abo-ad-native-content-video .ad-content .ad-header{position:relative;height:44px;display:flex;align-items:center;text-transform:uppercase;padding:0 8px}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-header{height:51px;min-height:0}}.advertory-abo-ad-native-content-video .ad-content .ad-header span{font-weight:700;font-size:13px;position:absolute;top:50%;transform:translateY(-50%)}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-header span{font-size:20px;padding-left:12px}}.advertory-abo-ad-native-content-video .ad-content .ad-header .ad-logo{position:absolute;right:0;width:auto;height:40px;margin-right:8px}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-header .ad-logo{width:auto;height:35px}}.advertory-abo-ad-native-content-video .ad-content .ad-image-container{display:flex;position:relative}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-image-container{min-height:0}}.advertory-abo-ad-native-content-video .ad-content .ad-image-container .ad-image{width:100%;height:auto;object-fit:cover;object-position:center 0}.advertory-abo-ad-native-content-video .ad-content .ad-image-container .ad-player-wrapper{height:56.4971751412vw;width:100%}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-image-container .ad-player-wrapper{height:407px}}.advertory-abo-ad-native-content-video .ad-content .ad-text-container{display:flex;flex-direction:column;color:#2b2b2b;padding-bottom:10px}.advertory-abo-ad-native-content-video .ad-content .ad-text-container .sponsored-by{display:block;padding:8px;font-size:12px;font-weight:normal;text-transform:uppercase}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-text-container .sponsored-by{padding:8px 10px}}.advertory-abo-ad-native-content-video .ad-content .ad-text-container .ad-title{display:block;padding:0 8px;margin-left:0;margin-bottom:0;font-size:var(--mobileTitleSize);font-weight:bold;line-height:1}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-text-container .ad-title{padding:4px 12px 8px 12px;font-size:var(--desktopTitleSize)}}.advertory-abo-ad-native-content-video .ad-content .ad-text-container .ad-description{margin:4px 0;padding:0 8px;font-size:16px;line-height:calc(15px);color:#000}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video .ad-content .ad-text-container .ad-description{padding:0 12px}}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video.bt .ad-content .ad-image-container .ad-player-wrapper,.advertory-abo-ad-native-content-video.sa .ad-content .ad-image-container .ad-player-wrapper{height:302px}}@media screen and (min-width: 768px){.advertory-abo-ad-native-content-video.bt .ad-content .ad-text-container .ad-title,.advertory-abo-ad-native-content-video.sa .ad-content .ad-text-container .ad-title{font-size:23px}}');const io={VIDEO:(e,t)=>{return(n=no,(e,t,i)=>{const{video:a,img:o,url:r}=e,{publisher:d,productTag:s}=t,{pluginsNames:l,videoLoop:c}=i||{};if(!(null==a?void 0:a.content))return null;const p=Math.ceil(1e5*Math.random()),u=o||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${p}`,g=Za(a.content,r),h=eo({id:p,nodeId:v,poster:u,tagURL:g,publisher:d,productTag:s,videoLoop:c});return to({playerConfig:h,clickUrl:r,pluginsNames:l}),`${n(e,t,v)}`})(e,t);var n},SPONSORSTRIPE:({title:e,sponsoredBy:t,logo:n})=>`<article class="advertory-abo-ad-native-sponsorstripe">\n <div class="ad-wrapper">\n <div class="info-button-wrapper" onClick="\n const adDescription = document.getElementById('ad-sponsorstripe-description');\n adDescription.classList.toggle('hide');\n ">\n <div class="info-button"></div>\n </div>\n\n <span class="ad-title">${e}</span>\n <img alt="${t}" class="ad-logo" src="${n}" />\n\n <div id="ad-sponsorstripe-description" class="ad-description hide">\n <span>${(e=>`Annonsøren har betalt for profilering av logo og merkenavn i artikler tilknyttet ${e}. Annonsøren har ingen innflytelse på Aftenpostens journalistiske virksomhet.`)(t)}</span>\n <a class="ad-description-readmore" href="https://www.aftenposten.no/slik-jobber-vi-i-aftenposten/i/xgKR18/ekstern-finansiering-av-innhold-i-aftenposten" target="_blank">Les mer</a>\n <div class="close-button-wrapper" onClick="\n const adDescription = document.getElementById('ad-sponsorstripe-description');\n adDescription.classList.toggle('hide');\n ">\n <div class="close-button"></div>\n </div>\n </div>\n </div>\n \n </article>`};_t('.advertory-no-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#dfdfdf;font-family:"Inter",sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;font-size:14px}@media screen and (min-width: 768px){.advertory-no-ad-native-default{width:580px;height:400px}}.advertory-no-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-default .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-default .ad-content{display:block}.advertory-no-ad-native-default .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}.advertory-no-ad-native-default .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-default .ad-text-container{background:#f5faff;overflow:auto;padding:8px}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-default .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}.advertory-vg-native-ad__front .advertory-no-ad-native-default{width:100%;height:auto}.advertory-aftenposten-native-ad-wrapper__front{justify-content:center}.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(-40px + 4rem)}@media screen and (min-width: 768px){.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(12px + .75rem)}}');_t('.advertory-no-ad-native-recirc{width:100%;min-height:250px;margin:0 auto;color:#000;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;background-color:#fff;font-family:"Inter",sans-serif;font-weight:600;text-align:left;font-size:14px;container-type:inline-size}.advertory-no-ad-native-recirc *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-recirc .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-recirc .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-recirc .ad-content{display:flex;flex-direction:column}.advertory-no-ad-native-recirc .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}@container (min-width: dna.$md){.advertory-no-ad-native-recirc .ad-image-container{min-height:0}}.advertory-no-ad-native-recirc .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-recirc .ad-text-container{background:#f5faff;overflow:auto;padding:8px;container-type:inline-size}@container (min-width: dna.$md){.advertory-no-ad-native-recirc .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-recirc .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@container (min-width: dna.$md){.advertory-no-ad-native-recirc .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-recirc .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-recirc .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@container (min-width: 420px){.advertory-no-ad-native-recirc .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}');const ao={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:a,adText:o})=>`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${a}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${o}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`,NATIVE_RECIRC:({containerId:e,url:t,sponsoredBy:n,title:i,img:a,adText:o})=>`<article class="advertory-no-ad-native-recirc">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${a}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${o}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`};_t(".advertory-e24-ad-native-content{position:relative;max-width:580px;width:auto;padding:0;border-bottom:1px solid #d4d4d4;border-top:1px solid #d4d4d4;font-family:E24 Text,Arial,sans-serif;color:#000c26;text-align:left;box-sizing:border-box;background-color:var(--background-color)}.advertory-e24-ad-native-content .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.45)}.advertory-e24-ad-native-content *{line-height:normal}@media screen and (min-width: 740px){.advertory-e24-ad-native-content{width:100%;padding-top:23px;border-bottom:1px solid #d6dce4;border-top:1px solid #d6dce4;margin:0 auto calc(-40px + 4rem)}}.advertory-e24-ad-native-content .ad-info{position:absolute;z-index:1000;top:35px;left:8px;height:26px;width:26px;border-bottom-right-radius:13px;background-color:hsla(0,0%,100%,.4509803922);transform:none;transform-origin:center}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-info{top:50px;left:0}}.advertory-e24-ad-native-content .ad-link{color:inherit;text-decoration:none;display:block}.advertory-e24-ad-native-content .ad-link .ad-content{display:flex;flex-direction:column}.advertory-e24-ad-native-content .ad-link .ad-content .ad-header{box-sizing:border-box;display:flex;justify-content:space-between;width:100%;height:44px;padding:calc(.5*var(--gap-unit)) var(--gap-unit) calc(.5*var(--gap-unit)) calc(1.5*var(--gap-unit));font-family:E24 Text,Arial,sans-serif;line-height:44px;background-color:#fffbf8}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-header{font-size:25px;max-height:50px;height:50px}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-header .ad-annonse{color:#1d1d1d;display:inline-block;font-size:16px;line-height:19px;font-weight:600;vertical-align:top;text-transform:uppercase;padding:8px 0}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-header .ad-annonse{padding:10px 0 16px 0}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-header .ad-logo{width:auto;max-width:50%;max-height:36px;vertical-align:middle}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-header .ad-logo{max-height:42px}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-image-container{display:flex;align-items:flex-start;min-height:0;max-height:200px}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-image-container{max-height:262px}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-image-container .ad-image{width:100%;object-position:center 0;height:fit-content;object-fit:cover;max-height:inherit}.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container{display:flex;flex-direction:column;padding:calc(var(--gap-unit)*2) calc(var(--gap-unit)*1.5) 0;color:#1d1d1d;background-color:#fffbf8}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container{padding-bottom:14px}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container .ad-subtitle{font-family:E24 Text,Arial,sans-serif;padding:16px 0 0 0;font-size:12px;font-style:normal;font-weight:normal}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container .ad-subtitle{font-size:14px;padding:16px 0 4px 0}}.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Text,Arial,sans-serif;font-size:25px;font-style:normal;font-weight:500;padding:0}@media screen and (min-width: 740px){.advertory-e24-ad-native-content .ad-link .ad-content .ad-text-container .ad-title{font-size:32px}}");_t(".advertory-e24-ad-native-content-basic{position:relative;display:block;height:100%;width:auto;max-width:580px !important;margin:0 auto calc(-40px + 4rem);color:var(--text-color);font-family:E24 Text,Arial,sans-serif;font-size:0;text-align:left;text-size-adjust:100%;clear:both}.advertory-e24-ad-native-content-basic .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.45)}.advertory-e24-ad-native-content-basic a{display:block;text-decoration:none;padding-bottom:calc(3*var(--gap-unit));background-color:#fffbf8;border-bottom:1px solid #ffd157}.in-feed .advertory-e24-ad-native-content-basic a{padding-bottom:0;border-bottom:none}.advertory-e24-ad-native-content-basic a .ad-content .ad-header{display:block;background-color:#ffd157;border-radius:2px 2px 0 0;color:#1d1d1d;font-size:12px;line-height:18px;padding:3px 30px;font-weight:500}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-header{padding:7px 0 5px 32px}}.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container{position:relative}.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container .ad-ratio-container{box-sizing:border-box;height:100%;position:relative;padding-bottom:52.25%}.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container .ad-ratio-container img{width:100%;height:100%;position:absolute;top:0;left:0;object-fit:cover}.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container .ad-sponsored-by{position:absolute;bottom:calc(1.5*var(--gap-unit));left:calc(1.5*var(--gap-unit));max-width:50%;max-height:20%}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-image-container .ad-sponsored-by{bottom:calc(2*var(--gap-unit));left:calc(2*var(--gap-unit))}}.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container{display:block;padding:calc(1.5*var(--gap-unit)) calc(.5*var(--gap-unit)) 0 calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container{padding:calc(2*var(--gap-unit)) calc(1.5*var(--gap-unit)) 0 calc(1.5*var(--gap-unit))}}.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-annonse-label{color:#777;display:block;font-family:E24 Text,Arial,sans-serif;font-size:14px;line-height:17px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-annonse-label{font-size:16px;line-height:19px;margin-bottom:var(--gap-unit)}}.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Text,Arial,sans-serif;font-size:20px;line-height:24px;font-weight:500;margin-top:0;margin-bottom:calc(.5*var(--gap-unit))}.in-feed .advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-title{font-size:20px;line-height:24px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic a .ad-content .ad-text-container .ad-title{font-size:30px;line-height:36px;margin-bottom:var(--gap-unit)}}");_t(".advertory-e24-ad-native-recirc{position:relative;display:block;height:100%;width:auto;max-width:580px !important;margin:0 auto calc(-40px + 4rem);color:var(--text-color);font-family:E24 Text,Arial,sans-serif;font-size:0;text-align:left;text-size-adjust:100%;clear:both}.advertory-e24-ad-native-recirc .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.45)}.advertory-e24-ad-native-recirc a{display:block;text-decoration:none;padding-bottom:0;background-color:#fffbf8}.advertory-e24-ad-native-recirc a .ad-content .ad-header{display:block;background-color:#ffd157;border-radius:2px 2px 0 0;color:#1d1d1d;font-size:12px;line-height:18px;padding:3px 30px;font-weight:500}@media screen and (min-width: 740px){.advertory-e24-ad-native-recirc a .ad-content .ad-header{padding:7px 0 5px 32px}}.advertory-e24-ad-native-recirc a .ad-content .ad-image-container{position:relative}.advertory-e24-ad-native-recirc a .ad-content .ad-image-container .ad-ratio-container{box-sizing:border-box;height:100%;position:relative;padding-bottom:52.25%}.advertory-e24-ad-native-recirc a .ad-content .ad-image-container .ad-ratio-container img{width:100%;height:100%;position:absolute;top:0;left:0;object-fit:cover}.advertory-e24-ad-native-recirc a .ad-content .ad-image-container .ad-sponsored-by{position:absolute;bottom:calc(1.5*var(--gap-unit));left:calc(1.5*var(--gap-unit));max-width:50%;max-height:20%}@media screen and (min-width: 740px){.advertory-e24-ad-native-recirc a .ad-content .ad-image-container .ad-sponsored-by{bottom:calc(2*var(--gap-unit));left:calc(2*var(--gap-unit))}}.advertory-e24-ad-native-recirc a .ad-content .ad-text-container{display:block;padding:calc(1.5*var(--gap-unit)) calc(.5*var(--gap-unit)) 0 calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-recirc a .ad-content .ad-text-container{padding:calc(2*var(--gap-unit)) calc(1.5*var(--gap-unit)) 0 calc(1.5*var(--gap-unit))}}.advertory-e24-ad-native-recirc a .ad-content .ad-text-container .ad-annonse-label{color:#777;display:block;font-family:E24 Text,Arial,sans-serif;font-size:14px;line-height:17px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-recirc a .ad-content .ad-text-container .ad-annonse-label{font-size:16px;line-height:19px;margin-bottom:var(--gap-unit)}}.advertory-e24-ad-native-recirc a .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Text,Arial,sans-serif;font-size:20px;line-height:24px;font-weight:500;margin-top:0;margin-bottom:calc(.5*var(--gap-unit))}");const oo={CONTENT:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o,description:r})=>`<article class="advertory-e24-ad-native-content">\n <div class="ad-info" id="${e}"></div>\n <a class="ad-link" href="${t}" target="_blank" rel="noreferrer noopener nofollow sponsored">\n <div class="ad-content">\n <div class="ad-header">\n <span class="ad-annonse">Annonsørinnhold|</span>\n <img alt="${a}" class="ad-logo" src="${i}" />\n </div>\n <div class="ad-image-container">\n <img alt="${n}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n ${r?`<span class="ad-subtitle">${r}</span>`:""}\n <span class="ad-title">${n}</span>\n </div>\n </div>\n </a>\n </article>`,BASIC:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o})=>`<article class="advertory-e24-ad-native-content-basic">\n <div class="ad-info" id="${e}"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header">\n <div id="${e}-button"></div>\n <span>Annonse</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-ratio-container">\n <img src="${o}" alt="${n}" />\n </div>\n <img class="ad-sponsored-by" src="${i}" alt="${a}" />\n </div>\n <div class="ad-text-container">\n <span class="ad-annonse-label">Annonse fra ${a}</span>\n <h6 class="ad-title">${n}</h6>\n </div>\n </div>\n </a> \n </article>`,RECIRC:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o})=>`<article class="advertory-e24-ad-native-recirc">\n <div class="ad-info" id="${e}"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header">\n <div id="${e}-button"></div>\n <span>Annonse</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-ratio-container">\n <img src="${o}" alt="${n}" />\n </div>\n <img class="ad-sponsored-by" src="${i}" alt="${a}" />\n </div>\n <div class="ad-text-container">\n <span class="ad-annonse-label">Annonse fra ${a}</span>\n <h6 class="ad-title">${n}</h6>\n </div>\n </div>\n </a> \n </article>`};_t(".advertory-e24-ad-native-content__front{position:relative;max-width:580px;width:100%;padding:0;font-family:E24 Text,Arial,sans-serif;color:#000c26;text-align:left;box-sizing:border-box;background-color:var(--background-color)}.advertory-e24-ad-native-content__front .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.75);border-bottom-right-radius:13px}.advertory-e24-ad-native-content__front *{line-height:normal}.advertory-e24-ad-native-content__front .ad-info{position:absolute;z-index:1000;top:0;left:0;height:26px;width:26px;border-bottom-right-radius:13px;background-color:hsla(0,0%,100%,.4509803922);transform:none;transform-origin:center}.advertory-e24-ad-native-content__front .ad-link{color:inherit;text-decoration:none;display:block}.advertory-e24-ad-native-content__front .ad-link .ad-content{display:flex;flex-direction:column}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header{box-sizing:border-box;display:flex;justify-content:space-around;width:100%;height:44px;padding:calc(.5*var(--gap-unit)) var(--gap-unit) calc(.5*var(--gap-unit)) calc(1.5*var(--gap-unit));font-family:E24 Text,Arial,sans-serif;line-height:44px;background-color:#fffbf8}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header{justify-content:space-between;font-size:25px;max-height:50px;height:50px}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header .ad-annonse{color:#1d1d1d;display:inline-block;font-size:12px;line-height:19px;font-weight:600;vertical-align:top;text-transform:uppercase;padding:8px 0}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header .ad-annonse{font-size:16px;margin-left:16px;padding:10px 0 16px 0}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header .ad-logo{width:auto;max-width:50%;max-height:36px;vertical-align:middle}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-header .ad-logo{max-height:42px}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-image-container{display:flex;align-items:flex-start;min-height:0}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-image-container .ad-image{width:100%;object-position:center 0;object-fit:cover;max-height:inherit}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-image-container,.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-image-container img{min-height:180px}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container{display:flex;flex-direction:column;padding:8px;color:#1d1d1d;background-color:#fffbf8}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container{padding-bottom:14px}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container .ad-subtitle{font-family:E24 Text,Arial,sans-serif;padding:16px 0 0 0;font-size:12px;font-style:normal;font-weight:normal}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container .ad-subtitle{font-size:14px;padding:16px 0 4px 0}}.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Display,Arial,sans-serif;line-height:1.15;font-weight:600;font-size:32px;font-style:normal;padding:0}@media screen and (min-width: 740px){.advertory-e24-ad-native-content__front .ad-link .ad-content .ad-text-container .ad-title{font-size:32px}}");_t(".advertory-e24-ad-native-content-basic__front{position:relative;display:block;height:100%;width:auto;max-width:580px !important;color:var(--text-color);font-family:E24 Text,Arial,sans-serif;font-size:0;text-align:left;text-size-adjust:100%;clear:both}.advertory-e24-ad-native-content-basic__front .ad-info{height:26px;width:26px;cursor:pointer;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.75);border-bottom-right-radius:13px}.advertory-e24-ad-native-content-basic__front a{display:block;text-decoration:none;background-color:#fffbf8}.in-feed .advertory-e24-ad-native-content-basic__front a{padding-bottom:0;border-bottom:none}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-header{display:block;background-color:#ffd157;border-radius:2px 2px 0 0;color:#1d1d1d;font-size:12px;line-height:18px;padding:3px 30px;font-weight:500}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-header{padding:7px 0 5px 32px}}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container{position:relative}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container .ad-ratio-container{box-sizing:border-box;height:100%;position:relative;padding-bottom:52.25%}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container .ad-ratio-container img{width:100%;height:100%;position:absolute;top:0;left:0;object-fit:cover}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container .ad-sponsored-by{position:absolute;bottom:calc(1.5*var(--gap-unit));left:calc(1.5*var(--gap-unit));max-width:50%;max-height:20%}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-image-container .ad-sponsored-by{bottom:calc(2*var(--gap-unit));left:calc(2*var(--gap-unit))}}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container{display:block;padding:calc(1.5*var(--gap-unit)) calc(.5*var(--gap-unit)) 0 calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container{padding:calc(2*var(--gap-unit)) calc(1.5*var(--gap-unit)) 0 calc(1.5*var(--gap-unit))}}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-annonse-label{color:#777;display:block;font-family:E24 Text,Arial,sans-serif;font-size:14px;line-height:17px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-annonse-label{font-size:16px;line-height:19px;margin-bottom:var(--gap-unit)}}.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-title{color:#1d1d1d;font-family:E24 Text,Arial,sans-serif;font-size:20px;line-height:24px;font-weight:500;margin-top:0;margin-bottom:calc(.5*var(--gap-unit))}.in-feed .advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-title{font-size:20px;line-height:24px;margin-bottom:calc(.5*var(--gap-unit))}@media screen and (min-width: 740px){.advertory-e24-ad-native-content-basic__front a .ad-content .ad-text-container .ad-title{font-size:30px;line-height:36px;margin-bottom:var(--gap-unit)}}");const ro={CONTENT:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o,description:r})=>`<article class="advertory-e24-ad-native-content__front">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank" rel="noreferrer noopener nofollow sponsored">\n <div class="ad-content">\n <div class="ad-header">\n <span class="ad-annonse">Annonsørinnhold|</span>\n <img alt="${a}" class="ad-logo" src="${i}" />\n </div>\n <div class="ad-image-container">\n <img alt="${n}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n ${r?`<span class="ad-subtitle">${r}</span>`:""}\n <span class="ad-title">${n}</span>\n </div>\n </div>\n </a>\n </article>`,BASIC:({containerId:e,url:t,title:n,logo:i,sponsoredBy:a,img:o})=>`<article class="advertory-e24-ad-native-content-basic__front">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header">\n <div id="${e}-button"></div>\n <span>Annonse</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-ratio-container">\n <img src="${o}" alt="${n}" />\n </div>\n <img class="ad-sponsored-by" src="${i}" alt="${a}" />\n </div>\n <div class="ad-text-container">\n <span class="ad-annonse-label">Annonse fra ${a}</span>\n <h6 class="ad-title">${n}</h6>\n </div>\n </div>\n </a> \n </article>`},so={default:io.VIDEO},lo={displayTemplates:{content:oo.CONTENT,basic:oo.BASIC,recirc:oo.RECIRC,sponsorstripe:io.SPONSORSTRIPE,native:ao.NATIVE_TEMPLATE,native_recirc:ao.NATIVE_RECIRC,default:oo.BASIC},videoTemplates:so},co={displayTemplates:{content:ro.CONTENT,basic:ro.BASIC,native:ao.NATIVE_TEMPLATE,native_recirc:ao.NATIVE_RECIRC,default:ro.BASIC},videoTemplates:so};_t(".advertory-e24-native-ad-wrapper__front{max-width:580px;padding:0 0 16px 0;display:flex;justify-content:center}.advertory-e24-native-ad-wrapper__front .advertory-e24-native-ad__front{position:relative}.advertory-e24-native-ad-wrapper__article{display:flex;justify-content:center}.advertory-e24-native-ad-wrapper__article .advertory-e24-native-ad__article{position:relative}");_t('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const po={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return _(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){_(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){_(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},uo="finn_blink_id",vo=e=>c(void 0,void 0,void 0,function*(){const{id:t,hashed_email:n,theme:i}=e,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n}(e,["id","hashed_email","theme"]),o=window[A.Blink];if(!o)return;const r=new o({remote:"https://www.finn.no/distribution-front/external/carousel",id:t,hashed_email:n,theme:i});yield r.inject(a)}),go=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},ho=(e,t)=>{const{finnBlink:{enabled:n}={}}=s.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:a,height:o,requireImage:r,theme:d,rec:l,distributionTypes:c,position:p,offset:u,advertoryTheme:v}=t||{};return{selector:`#${go(e)}`,enabled:i,position:null!=p?p:e,distributionTypes:null!=c?c:[],limit:null!=a?a:100,height:null!=o?o:100,offset:null!=u?u:200,requireImage:r,rec:l,theme:"dark"===d?"dark":"light",advertoryTheme:v}},mo=(e,t,n)=>c(void 0,void 0,void 0,function*(){const{placements:i,deviceType:a}=s.get();_(`rendering finn blink ad for ${e}`);const o=z(e),r=i[a].find(e=>e.id===o),d=ho(e,null==r?void 0:r.finnBlink),{publisher:l,country:p,finnBlink:u}=t,{userId:v,uuid:g,channel:h,theme:m}=null!=u?u:{},f=null!=h?h:`${l}.${p}`,y=(e=>{if(!e){const e=Oe();return null!=e?e:""}return e})(v),b="dark"===m?"dark":"light";if(!(null==d?void 0:d.enabled))return _(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void ta(e);if((e=>{var t;const n=go(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))_(`Finn blink already loaded ${e}`);else try{const e=yield c(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=s.get(),t=po.get(uo),n=fe("finncode");if(!e||n)return"";if(!t){const t=yield Qe.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return po.set(uo,n),n}return t});yield vo(Object.assign(Object.assign({},d),{hashed_email:e,channel:f,id:y,theme:b,uuid:g})).then(()=>{((e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageType:i}=s.get(),a=document.querySelector(`#${e}`);if(!a)return;if(a.classList.add("disable-cogwheel"),!n)return;C(n,a,$,null!=t?t:i),Wi({preferredTestIdData:{targetId:e,testId:"finn"}})})(d.selector.replace("#",""),d.advertoryTheme)})}catch(t){_(`Finn blink error ${t}`),n&&n(e),!n&&k(e),ta(e)}}),fo=((e,t)=>n=>Ba(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e))({initNativeAd:(e,t)=>{const{targetId:n}=e,i=document.querySelector(`#${n}`),a=(null==t?void 0:t.pageType)===ut.FRONT?co:lo;if(!i)return;const{pageType:o=ut.FRONT,nativeTrackingConfig:r,appearanceConfig:d,deviceType:s}=null!=t?t:{},l={language:ge.NO,publisher:be.E24,deviceType:s,pageType:o,nativeTrackingConfig:r,appearanceConfig:d};Ya(e,l,a)},wallpaperHandlers:{initWallpaperAd:(e,t)=>{if(!t)return;const{options:{appMainContainerSelector:n,wallpaperAnchorSelector:i}={}}=t;(e=>{const t=document.querySelector(e||"#application");if(!t)return;b();const n=document.createElement("div");n.classList.add(f),document.body.insertBefore(n,t.nextSibling),n.style.setProperty("position","fixed"),n.style.setProperty("width","100%"),n.style.setProperty("height","calc(100% - var(--header-height, 0) - 15px)"),n.style.setProperty("background-position","center top"),n.style.setProperty("background-repeat","no-repeat")})(n),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(w(n),window.addEventListener("scroll",()=>w(n)))})(i),e()},adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(y),n.classList.add(y))}},loadFinnBlinkAd:(e,t,n,i)=>c(void 0,void 0,void 0,function*(){const{isMobileApp:a}=s.get();if(_(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield c(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=s.get(),{getConsentAsync:i}=Se(e,t,n),a=yield i();return!(!(null==e?void 0:e.enabled)||!a)||(_("Skip loading finn blink ad due to missing TCF consent."),!1)}))||a)return n&&n(e),void ta(e);yield I(S),yield mo(e,t,n),i&&i()}),replaceAdsWithFinnBlink:e=>c(void 0,void 0,void 0,function*(){if(!e)return;yield I(S);const{replacementConfig:t}=e;if(!((()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})()&&(null==t?void 0:t.adsToReplace)&&(null==t?void 0:t.sizes)&&e.enabled))return void _(`Finn blink configuration is incorrect: ${JSON.stringify(t)}`);const{adsToReplace:n,sizes:i}=t;n.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=N(t);(e=>{_(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),q(n,i),n.dataset.finnBlinkId=t,T().withFullAdsChain(e)})}),preparePageOptions:gt,prepareTag:e=>{const{keywords:t,targetId:n,invCode:i}=e,{useAppTabletInvCode:a=!0}=s.get(),o=((e,t)=>{const{isMobileApp:n}=s.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(i,a),r=(e=>{const{keywords:t,dynamicSizeWidthCheck:n}=e,i=`${he()}-adformat`,a=t?t[i]:[];if(!a)return{};const o=(Array.isArray(a)?a:[a]).filter(e=>!(e in K)||window.innerWidth>=K[e]);return{[i]:n?o:a}})(e),d=(e=>{const t=`${he()}-targetid`;return e?{[t]:[e]}:{}})(n),l=ye(),c=(e=>ke(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(i),p=((e,t)=>ke(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(i);return Object.assign(Object.assign({},e),{invCode:o,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),r),d),c),l),rendererOptions:p})},siteEvents:ve,librariesToLoad:[]},{publisherClassName:be.E24,fullWidthFormatClassName:"netboard",mainColumnWidth:580}),yo=_t("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var bo=Object.freeze({__proto__:null,default:yo});exports.initAdvertoryPackage=fo,exports.updateAdvertory=(e,t)=>c(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:a,renderFinnBlinkPlacements:o,contextSelector:r}=null!=t?t:{};if(i)return Kt(),[];a&&(Kt(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{E(e.id)})),l(null!=e?e:{}),yield Pa();let d=Qt(r);return o&&(d=d.filter(e=>ie(e.id))),d.length>0&&(Sa=[...Sa,...d.map(e=>Object.assign({},e))],ti(d),ii(d),yield Na(d)),Sa});