@schibsted/advertory 2.60.1 → 2.60.2

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 (101) hide show
  1. package/core/aftenposten/es/index.css +1 -1
  2. package/core/aftenposten/es/index.d.ts +1 -0
  3. package/core/aftenposten/es/index.js +1 -1
  4. package/core/aftenposten/index.d.ts +1 -0
  5. package/core/aftenposten/index.js +1 -1
  6. package/core/aftonbladet/es/index.css +1 -1
  7. package/core/aftonbladet/es/index.d.ts +1 -0
  8. package/core/aftonbladet/es/index.js +1 -1
  9. package/core/aftonbladet/index.d.ts +1 -0
  10. package/core/aftonbladet/index.js +1 -1
  11. package/core/aftonbladetv2/es/index.d.ts +1 -0
  12. package/core/aftonbladetv2/es/index.js +1 -1
  13. package/core/bt/es/index.css +1 -1
  14. package/core/bt/es/index.d.ts +1 -0
  15. package/core/bt/es/index.js +1 -1
  16. package/core/bt/index.d.ts +1 -0
  17. package/core/bt/index.js +1 -1
  18. package/core/e24/es/index.css +1 -1
  19. package/core/e24/es/index.d.ts +1 -0
  20. package/core/e24/es/index.js +1 -1
  21. package/core/e24/index.d.ts +1 -0
  22. package/core/e24/index.js +1 -1
  23. package/core/e24v2/es/index.css +1 -1
  24. package/core/e24v2/es/index.d.ts +1 -0
  25. package/core/e24v2/es/index.js +1 -1
  26. package/core/fotbollskanalen/es/index.css +1 -1
  27. package/core/fotbollskanalen/es/index.d.ts +1 -0
  28. package/core/fotbollskanalen/es/index.js +1 -1
  29. package/core/fotbollskanalen/index.d.ts +1 -0
  30. package/core/fotbollskanalen/index.js +1 -1
  31. package/core/godare/index.d.ts +1 -0
  32. package/core/godare/index.js +1 -1
  33. package/core/godt/index.d.ts +1 -0
  34. package/core/godt/index.js +1 -1
  35. package/core/klart/index.d.ts +1 -0
  36. package/core/klart/index.js +1 -1
  37. package/core/koket/es/index.d.ts +1 -0
  38. package/core/koket/es/index.js +1 -1
  39. package/core/koket/index.d.ts +1 -0
  40. package/core/koket/index.js +1 -1
  41. package/core/kompakt/index.d.ts +1 -0
  42. package/core/kompakt/index.js +1 -1
  43. package/core/minmote/index.d.ts +1 -0
  44. package/core/minmote/index.js +1 -1
  45. package/core/pent/index.d.ts +1 -0
  46. package/core/pent/index.js +1 -1
  47. package/core/sa/es/index.css +1 -1
  48. package/core/sa/es/index.d.ts +1 -0
  49. package/core/sa/es/index.js +1 -1
  50. package/core/sa/index.d.ts +1 -0
  51. package/core/sa/index.js +1 -1
  52. package/core/svd/es/index.css +1 -1
  53. package/core/svd/es/index.d.ts +1 -0
  54. package/core/svd/es/index.js +1 -1
  55. package/core/svd/index.d.ts +1 -0
  56. package/core/svd/index.js +1 -1
  57. package/core/svdv2/es/index.css +1 -1
  58. package/core/svdv2/es/index.d.ts +1 -0
  59. package/core/svdv2/es/index.js +1 -1
  60. package/core/tek/index.d.ts +1 -0
  61. package/core/tek/index.js +1 -1
  62. package/core/tv4/es/index.d.ts +1 -0
  63. package/core/tv4/es/index.js +1 -1
  64. package/core/tv4/index.d.ts +1 -0
  65. package/core/tv4/index.js +1 -1
  66. package/core/tvnu/index.d.ts +1 -0
  67. package/core/tvnu/index.js +1 -1
  68. package/core/vg/es/index.css +1 -1
  69. package/core/vg/es/index.d.ts +1 -0
  70. package/core/vg/es/index.js +1 -1
  71. package/core/vg/index.d.ts +1 -0
  72. package/core/vg/index.js +1 -1
  73. package/core/vgv2/es/index.css +1 -1
  74. package/core/vgv2/es/index.d.ts +1 -0
  75. package/core/vgv2/es/index.js +1 -1
  76. package/features/ad-native/index.d.ts +1 -0
  77. package/features/dr-edition/es/index.d.ts +7 -4
  78. package/features/dr-edition/es/index.js +1 -1
  79. package/features/dr-edition/index.d.ts +7 -4
  80. package/features/dr-edition/index.js +1 -1
  81. package/features/tracker/index.d.ts +1 -0
  82. package/package.json +1 -1
  83. package/sites/aftenposten/es/index.css +1 -1
  84. package/sites/aftonbladet/es/index.css +1 -1
  85. package/sites/aftonbladetv2/es/index.css +1 -1
  86. package/sites/bt/es/index.css +1 -1
  87. package/sites/e24/es/index.css +1 -1
  88. package/sites/e24v2/es/index.css +1 -1
  89. package/sites/fotbollskanalen/es/index.css +1 -1
  90. package/sites/koket/es/index.css +1 -1
  91. package/sites/sa/es/index.css +1 -1
  92. package/sites/svd/es/index.css +1 -1
  93. package/sites/svdv2/es/index.css +1 -1
  94. package/sites/vg/es/index.css +1 -1
  95. package/sites/vgv2/es/index.css +1 -1
  96. package/types/core/handlers/ad-server/placement.d.ts +2 -1
  97. package/types/core/interface/config.d.ts +1 -0
  98. package/types/features/dr-edition/DrEdition.d.ts +1 -1
  99. package/types/features/dr-edition/types.d.ts +5 -3
  100. package/types/features/kilkaya/Kilkaya.d.ts +1 -1
  101. package/types/features/kilkaya/types.d.ts +5 -3
@@ -1 +1 @@
1
- "use strict";function e(e,t,n,i){return new(n||(n=Promise))(function(o,a){function r(e){try{s(i.next(e))}catch(e){a(e)}}function d(e){try{s(i.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(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())})}require("react/jsx-runtime"),"function"==typeof SuppressedError&&SuppressedError;const t=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},n=e=>new Promise(n=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void n(!1);const i=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const n=Number(e);return t("Advertising permission value obtained synchronously: ",e),Boolean(n)})();if(null!==i)return void n(i);let o=!1;const a=e=>{o||(t("Resolving advertising permission value obtained"),o=!0,n(e))},r=setTimeout(()=>{t("Advertising permission timed out, resolving with false"),a(!1)},3e3);window._tcf_.onTcfReady(()=>{t("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const n=Number(e);t("Advertising permission value obtained asynchronously: ",e),a(Boolean(n))})}),i={NO:"no",SE:"se"},o="cmp:loaded";let a,r=!1;const d=(d,s,l)=>{const c=!!(null==d?void 0:d.enabled),p=(null==d?void 0:d.timeout)||3e3,u=(v="bypass_tcf",new URLSearchParams(window.location.search).get(v));var v;const g=()=>{if(!(null==d?void 0:d.enabled))return!0;if(((e,n)=>e?!!n&&(t("TCF bypass param detected, returning consent: true"),!0):(t("TCF is not enabled, returning consent: true"),!0))(c,u))return!0;if(r)return null;if(!a)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const e=a.getConsentedToAllSync();return t(`TCF consented to all is: ${e}`),a.getConsentedToAllSync()};return{initConsentManager:()=>(null==d?void 0:d.enabled)?new Promise((e,n)=>{if(t("Getting TCF consent manager..."),window._tcf_)return t("TCF consent manager is already available"),a=window._tcf_,void e(a);t("TCF consent manager is not available");const i=()=>{t("CMP loaded, resolving consent manager..."),d&&clearTimeout(d),window._tcf_?(a=window._tcf_,e(a)):n(new Error("CMP loaded but window._tcf_ is not defined"))},d=setTimeout(()=>{document.removeEventListener(o,i),r=!0,n(new Error("Timeout waiting for CMP to load"))},p);t("Listening for CMP loaded event..."),document.addEventListener(o,i,{once:!0})}):Promise.resolve(null),getConsentSync:g,getConsentAsync:()=>e(void 0,void 0,void 0,function*(){if(null==d?void 0:d.schibstedAdChoicesOverrideValue)return t(`Schibsted Ad Choices override value is set, returning override value: ${d.schibstedAdChoicesOverrideValue}`),Boolean(Number(d.schibstedAdChoicesOverrideValue));const e=(null==d?void 0:d.schibstedAdChoicesEnabled)&&l===i.SE,o=(null==d?void 0:d.schibstedAdChoicesEnabled)&&!s&&l===i.NO;if(e||o)return t("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield n(d);if(!(null==d?void 0:d.enabled))return!0;const r=g();return null!==r?r:yield new Promise((e,n)=>{try{if(!a)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let n=!1;const i=t=>{n||(n=!0,e(t))},o=setTimeout(()=>{t("TCF isConsentedToAll timed out, resolving with false"),i(!1)},p);a.onTcfReady(()=>{t("On Tcf Ready called, waiting for consent"),clearTimeout(o)}),a.isConsentedToAll(t=>{clearTimeout(o),e(t)})}catch(e){n(e)}})})}};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l,c;var p=s(function(){if(c)return l;c=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 o(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 a(e,t){try{return t in e}catch(e){return!1}}function r(e,t,i){var r={};return i.isMergeableObject(e)&&o(e).forEach(function(t){r[t]=n(e[t],i)}),o(t).forEach(function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&i.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return d;var n=t.customMerge(e);return"function"==typeof n?n:d}(o,i)(e[o],t[o],i):r[o]=n(t[o],i))}),r}function d(t,o,a){(a=a||{}).arrayMerge=a.arrayMerge||i,a.isMergeableObject=a.isMergeableObject||e,a.cloneUnlessOtherwiseSpecified=n;var d=Array.isArray(o);return d===Array.isArray(t)?d?a.arrayMerge(t,o,a):r(t,o,a):n(o,a)}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)},{})},l=d}());const u=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],v={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},g=6;class h{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 u){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=p(h.DEFAULT_SITE_HANDLERS,e)}}h.DEFAULT_SITE_HANDLERS={siteEvents:v,initNativeAd:function(){}};const m=new h,f=m.modifyConfigProperties.bind(m),y=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},b={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},w=9826;class x{constructor(){this.getSupplyTypeKeywords=()=>{const{deviceType:e=b.DESKTOP,isMobileApp:t}=m.get();if(t){return{"aa-sch-supply_type":`app_${e===b.MOBILE?"phone":b.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(t){return e(this,void 0,void 0,function*(){return Object.assign(Object.assign({},t),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},t.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(t.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return e(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(()=>{const e=y("_pulse2data");return e?e.split(",")[2]:void 0})()}getExternalUid(){return e(this,void 0,void 0,function*(){return yield e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get(),{getConsentAsync:i}=d(e,t,n);if(!(yield i()))return;const o=y("_pulse2data");return o?o.split(",")[9]:void 0})})}isTrackingForbidden(){return e(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=w}=m.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}=m.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return e(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get(),{getConsentAsync:i}=d(e,t,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageType:e}=m.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}=m.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 E=new x;E.prepare.bind(E);function k(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(),o=(()=>{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:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}class T extends x{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{deviceType:e=b.DESKTOP}=m.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(a=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==a?a:0};var n,i,o,a;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return e(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{isMobileApp:e}=m.get(),{appMode:t,mobileOS:n}=k(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageType:i}=m.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const I=864e5,A=(()=>{const e=e=>{const n=window.localStorage.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch(e){return t("Error with parsing localStorage data"),null}},n=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:n,setWithTimestamp:(e,t,i=I)=>{const o={data:t,expirationTime:(new Date).getTime()+i};n(e,JSON.stringify(o))},getByTimestamp:(n,i=I)=>{const o=e(n);if(!o)return null;if(!i)return o;try{const{expirationTime:e,data:t}=JSON.parse(o);return(new Date).getTime()<=e?t:null}catch(e){return t("Error with parsing localStorage data"),null}}}})(),S="glimrTags",C=["glwe_","glwet_"],P={geofenceTags:[],geoTags:[],weatherTags:[]},O=(n,i,o,...a)=>e(void 0,[n,i,o,...a],void 0,function*(e,n,i,o="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return t(`Schibsted Consent to Pay is not enabled, returning true for ${o}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return t(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${o}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:a}=d(e,n,i);return(yield a())?(t(`Schibsted Ad Choices consent given according to TCF consent manager for ${o}`),!0):(t(`Schibsted Ad Choices consent not given according to TCF consent manager for ${o}`),!1)}),L=()=>e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get();if(null==e?void 0:e.schibstedConsentToPayEnabled){return yield O(e,t,n,"glimr")}const{getConsentAsync:i}=d(e,t,n);return yield i()}),$=()=>e(void 0,void 0,void 0,function*(){const{glimr:n}=m.get();if(!(yield L())||!(null==n?void 0:n.enabled))return void t("No consent for glimr data fetching.");const i=yield(o=500,e(void 0,void 0,void 0,function*(){return yield Promise.race([e(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),o))])}));var o;if(i)try{i.setTagCacheTimeInSeconds(300),yield new Promise(e=>{i.getTags(n.clientId,(t,n)=>{A.setWithTimestamp(S,{tags:t,tagMappings:n}),e(!0)})})}catch(e){t(`Error during getting glimr data: ${e}`)}else t("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:i})}),j=()=>{const{country:e}=m.get();return e===i.NO?"no-sno":"se-generic"},N=()=>{const{country:e,publisher:t}=m.get();return`${e}-${t}`},z={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"},_=e=>C.some(t=>e.startsWith(t)),D=e=>e.startsWith("glgc_"),M=e=>!_(e)&&!D(e),q=e=>{const t=B();if(!t)return P;const n=((e=[])=>e.filter(_))(t),i=((e=[])=>e.filter(D))(t),o=((e=[],t)=>{const n=e.filter(M);if(t){const{publisher:e}=m.get(),t=z[e]||e;n.push(t)}return n})(t,e);return{geoTags:o,geofenceTags:i,weatherTags:n}},B=()=>{const e=A.getByTimestamp(S);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},R={get:(t,n)=>e(void 0,void 0,void 0,function*(){const e=yield fetch(t,n);if(!e.ok)throw new Error(e.statusText);return yield e.json()}),post:(t,n,i)=>e(void 0,void 0,void 0,function*(){const e=JSON.stringify(i),o=yield fetch(t,{method:"POST",headers:n,body:e});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},F="advertory:ppids-cache",V={[i.SE]:`SCH${i.SE.toUpperCase()}-EnvHash`,[i.NO]:`SCH${i.NO.toUpperCase()}-EnvHash`},U={[i.SE]:`SCH${i.SE.toUpperCase()}-UserHash`,[i.NO]:`SCH${i.NO.toUpperCase()}-UserHash`},H={[i.SE]:`sch${i.SE}-envhash-v3`,[i.NO]:`sch${i.NO}-envhash-v3`},W={[i.SE]:`sch${i.SE}-userhash-v3`,[i.NO]:`sch${i.NO}-userhash-v3`},K={[i.SE]:`'sch${i.SE}-iosid-v3'`,[i.NO]:`'sch${i.NO}-iosid-v3'`},G={[i.SE]:`sch${i.SE}-androidid-v3`,[i.NO]:`sch${i.NO}-androidid-v3`},J={[i.SE]:"sdrn:schibsted.com:user",[i.NO]:"sdrn:spid.no:user"};class Y{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 Q=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(t){return e(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||t("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},X=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(t,n){return e(this,void 0,void 0,function*(){var e,i,o,a,r,d,s,l,c,p,u;const v=A.get(F),g=yield this.getNewPPIDs(t,n);if(this.shouldHash(v,g)){const n=null!==(e=t.hasherUrl)&&void 0!==e?e:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,n);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(a=c.userId)&&void 0!==a?a:"",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,n;return null!==this.ppid1&&null!==this.ppid2||t("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:"",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 o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=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}}:{});A.set(F,o)}hashPPIDs(n,i){return e(this,void 0,void 0,function*(){try{const e=new Headers({"Content-Type":"application/json"});return yield R.post(i,e,n)}catch(e){return t("Error with hashing PPIDs",e),null}})}getNewPPIDs(t,n){return e(this,arguments,void 0,function*({clientId:t,instance:n},i){const o=yield((t,n)=>e(void 0,void 0,void 0,function*(){const e=yield t.getUserId();return e?`${J[n]}:${e}`:null}))(n,i),a=yield(t=>e(void 0,void 0,void 0,function*(){const e=yield t.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}))(n),r=window.advertory_idfv,d=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:t},userId:{plain:o},environmentId:{plain:a},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),d?{anId:{plain:d}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Z=n=>e(void 0,void 0,void 0,function*(){const{tracker:e,tcf:i,country:o,isMobileApp:a}=n;if(!(yield O(i,a,o,"setXandrPPIDs")))return;if(!e)return;(yield Promise.allSettled([Q.processPPIDs(e,null==i?void 0:i.timeout),X.processPPIDs(e,o)])).forEach((e,n)=>{if("rejected"===e.status){t(`Cannot fetch PPIDs v${n+2}`,e.reason)}})}),ee=e=>{const{ppid1:t,ppid2:n}=Q.getPPIDs(),{ppid1:i,ppid2:o,idfv:a,anId:r}=X.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Y).add(n,V[e]).add(t,U[e]).add(o,H[e]).add(i,W[e]).add(a,K[e]).add(r,G[e]).buildEids()}]}},te=e=>{const{ppid1:t,ppid2:n}=Q.getPPIDs(),{ppid1:i,ppid2:o,idfv:a,anId:r}=X.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Y).add(n,V[e]).add(t,U[e]).add(o,H[e]).add(i,W[e]).add(a,K[e]).add(r,G[e]).buildRyEids()}}]}}};const ne=new class extends T{prepare(n){return e(this,void 0,void 0,function*(){const o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getCountryCodeKeywords(i.SE)),this.getPublisherKeywords()),this.getPublisherGroup()),this.getPageTypeKeywords()),this.getSupplyTypeKeywords()),this.getAppTypeKeywords()),this.getDeviceKeywords()),this.getScreenKeywords()),yield this.getAdvertisingConsentKeywords()),this.getHasContextKeywords(n.keywords)),(()=>{const{ppid1:e,ppid2:t}=Q.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}})()),yield e(void 0,void 0,void 0,function*(){const{glimr:e}=m.get(),{addPublisherToGeo:n}={},i=yield L();if(!(null==e?void 0:e.enabled)||!i)return t("No consent for getting glimr tags."),{};const o=j(),a=q(n);return{[`${o}-geo`]:a.geoTags,[`${o}-weather`]:a.weatherTags,[`${o}-geofence`]:a.geofenceTags}})),n.keywords);return Object.assign(Object.assign({},n),{keywords:o,user:Object.assign(Object.assign({},ee(i.SE)),{externalUid:yield this.getExternalUid()}),member:this.getMember()})})}};var ie=ne.prepare.bind(ne);const oe="ABSOLUTE_FULLSCREEN",ae="ANY_FULLSCREEN",re="VERTICAL_FULLWIDTH",de="FULLWIDTH",se="TAKEOVER",le="VELVET_TAKEOVER",ce="WALLPAPER",pe="COLLAPSE",ue={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}]},ve={wallpaper:1600,"l-format":1600},ge=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Pe(e,ae)},he=e=>{const{native:t}=e;return!!t},me=e=>Pe(e,de),fe=e=>Pe(e,re),ye=e=>{const{targetId:t}=e;return t.includes("takeover")||Pe(e,se)},be=e=>Pe(e,se),we=e=>Pe(e,ce),xe=e=>Pe(e,pe),Ee=e=>e.targetId.includes("sponsorstripe"),ke=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Te=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),Ie=e=>e.targetId.startsWith("midboard"),Ae=e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,Se=e=>e.width>=1260&&e.width<=1280,Ce=e=>e.width>=1600&&e.width<=1620,Pe=(e,t)=>{const n=ue[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,a=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,r=t.width===o,d=!t.height||t.height===a;return r&&d})},Oe=e=>{const t=document.querySelector(`div[id="${e.targetId}"]`),n=document.querySelector(`div[id="div_utif_${e.targetId}"]`);t&&n&&me(e)&&(t.style.width="100%",t.style.height=`${e.height}px`,n.style.width="100%",n.style.height=`${e.height}px`),n&&(n.style.width="auto !important",n.style.height="auto !important",n.style.display="block")},Le="splash",$e="welcomePage",je="topscroller",Ne="velvet",ze=(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()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),a=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...a,o).toString()},_e="takeover-displayed",De="takeover-visit-count",Me=14400,qe=()=>{const e=y(De);return e?parseInt(e):0},Be=()=>{const{takeover:{enabled:e=!1,secondVisitEnabled:t=!1}={}}=m.get();return!window.location.href.includes("takeover=0")&&(!!window.location.href.includes("takeover=1")||!(!e||(()=>{var e;const t=(null===(e=m.get().takeover)||void 0===e?void 0:e.cookieCapName)||_e;return"true"===y(t)})())&&(!t||Re()))},Re=()=>{const e=qe();return 0===e?((()=>{const e=qe(),{takeover:{cookieCapTime:t=Me}={}}=m.get(),n=document.location.hostname;window.document.cookie=`${De}=${e+1}; max-age=${t}; domain=${n}; path=/`})(),!1):1===e},Fe=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ve=()=>{const{takeover:e}=m.get();return Boolean(null==e?void 0:e.topscroller)},Ue=()=>e(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{cookieCapName:t=_e,cookieCapTime:n=Me}={},isMobileApp:i,tcf:o,country:a}=m.get(),r=yield O(o,i,a,"ad-takeover-cookiecap");n&&r&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),He=e=>{var t;const n=!!(null===(t=m.get().takeover)||void 0===t?void 0:t.setCookieCapForNotShownAd);return ye(e)&&n},We=(e,t)=>{var n;if(t===je){const{topscroller:t}=e;return null!=t?t:{}}if(t===Le){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ke=(e,t)=>{t!==Le?(e=>{var t,n,i;const o=null===(n=null===(t=m.get().takeover)||void 0===t?void 0:t.welcomePage)||void 0===n?void 0:n.headerElementSelector,a=null===(i=m.get().takeover)||void 0===i?void 0:i.topscroller;if(!o||a)return;const r=document.querySelector(o),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=be(e)?"60svh":`calc(100svh - ${c}px)`,u=be(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=m.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 o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},Ge=ze([],()=>{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})}),Je={nativeAd:e=>he(e)&&!Ee(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:me,fullscreenScroll:ge,topscroller:e=>ye(e)&&Ve(),splash:e=>ye(e)&&Fe(e.width,e.height),welcomePage:ye,wallpaper:we,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Se,hFormat:Ce,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ce(e)&&!Se(e),topboard:e=>e.targetId.startsWith("topboard")&&!ye(e),widescreen:e=>e.targetId.startsWith("widescreen"),insider:e=>e.targetId.startsWith("insider"),sponsorstripe:Ee,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Te(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!Ie(e),outstream:Ae,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:Te,midboard:Ie},Ye=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const a=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!a)return;if(((e,t)=>{var n,i,o,a;const r=null===(a=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===a?void 0:a.invCode;r&&(t.dataset.invCode=r)})(o,a),null==t?void 0:t.testId)return void(a.dataset.testid=t.testId);const r="DIV"===(null==a?void 0:a.tagName);e&&r&&((e,t)=>{var n,i;for(const[o,a]of Object.entries(Je))if(a(e)){if("nativeAd"===o){const a="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:a}`;break}t.dataset.testid=o;break}})(e,a)},Qe=e=>{var t;return(null===(t=Object.entries(Je).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},Xe=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},Ze=(e,t=window.screen.width,n,i)=>{const o=Xe(e,t);n&&n(e,o);const a=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);a&&(a.style.transform=`scale(${o})`,a.style.transformOrigin="left top")},et=new Map;et.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),et.set("panorama",{scale:.79,transformOrigin:"center center"}),et.set("outstream",{scale:.79,transformOrigin:"center center"}),et.set("integration",{scale:.79,transformOrigin:"center center"}),et.set("toppanorama",{scale:.8,transformOrigin:"left center"});const tt=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=Qe(e),o=et.get(i),a=document.querySelector(`#${e.targetId}`);if(!a||!o)return;if(a.style.transformOrigin=o.transformOrigin,a.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const r=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==a?void 0:a.offsetWidth;r&&"number"==typeof d&&!isNaN(d)&&r.style.setProperty("right",String(-1*d*.2)+"px")},nt={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{if(ge(e)||fe(e)||Ze(e,void 0,Oe),Ae(e)){const t=document.querySelector(`#${e.targetId}`);null==t||t.classList.add("outstream")}},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}};class it{initialize(){this.DATA=Object.assign({},it.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)}}it.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const ot=new it,at=()=>(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),rt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),dt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={}}=m.get(),o=[`${j()}-geo`],a=["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?o:[]],r=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:r}}},d)}},st=(t,...n)=>e(void 0,[t,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const a=()=>{d(),n()},r=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{o.removeEventListener("load",a),o.removeEventListener("error",r),clearTimeout(s)};o.addEventListener("load",a),o.addEventListener("error",r);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),lt=e=>e.includes("snoap.no"),ct=e=>{var t,n,i,o,a;return!!(null===(a=null===(o=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===o?void 0:o.ads[1])||void 0===a?void 0:a.rtb)},pt=ze([],()=>{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:o,clientHeight:a}=i,r=e/o,d=t/a;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}),ut=e=>{const t=ze([],()=>{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},vt=[],gt={},ht=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=ft(e);n?(mt(i,n),yt(e,i,t)):(mt(i,n),bt(e,i,t))})},mt=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const a=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${a}-${e}`,"*")},ft=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},yt=(e,t,n)=>{e.classList.add("in-screen"),document.body.classList.add("fullscreen-scroll-in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),vt.includes(t)||vt.push(t),n&&window.addEventListener("scroll",gt[t],{passive:!0})},bt=(e,t,n)=>{vt.includes(t)&&(n&&window.removeEventListener("scroll",gt[t]),document.body.classList.remove("fullscreen-scroll-in-screen"),e.classList.remove("in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},wt=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,a=[],r=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&a.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&r.push(t)}),()=>{a.length&&xt(e,a,o,0),r.length&&xt(e,r,o,40)}},xt=(e,t,n,i)=>{const o=e.offsetHeight,a=window.scrollY,r=e.getBoundingClientRect().top+a;t.forEach(e=>{const t=e.offsetHeight;let d;d=r>a?(r-a)/t-i:(a+t-(r+o))/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 Et(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}Et('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 kt={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 Tt=null;const It=(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=`(${pt})()`,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(lt(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=ut(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>lt(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)),lt(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)),ct(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},At=()=>{Tt=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},St=()=>{Tt||(Tt=window.requestAnimationFrame(At))},Ct=(e,t)=>{var n,i,o,a;const{country:r}=m.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:o="16px 0",beforeContentValue:a=""}=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: ${o};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${a&&"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: '${a}' !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 s=document.getElementById(d),l=null==s?void 0:s.parentElement;if(!s||!l)return;((e,t)=>{const n=(null==t?void 0:t.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>ht(e,n),{}),o=ft(e);i.observe(e),n&&(gt[o]=wt(e,t))})(l,t),s.className="advertory-fullscreen-scroll";const c=Pe(e,oe)?"absolute":"fixed";s.style.position=c,l.className="advertory-fullscreen-scroll-wrapper",l.dataset.showTagSubscribeId=d,s.setAttribute("data-ad-label",kt[r].adText),(null==t?void 0:t.moveCogwheelToTheLeft)&&(s.dataset.moveCogwheelToTheLeft="true"),St(),window.addEventListener("resize",St),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",St),null===(a=window.visualViewport)||void 0===a||a.addEventListener("scroll",St)},Pt=({targetId:e})=>{const t=(e=>{const{requests:t}=window.apntag,n=ct(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=ct(e)?1:0;n&&(n.tags[e].adResponse.ads[i].rtb.banner.content=t)})(e,It(t,e))},Ot=()=>e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:n,country:i,isMobileApp:o,fullscreenScroll:a}=m.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=m.getHandlers(),{getConsentAsync:s}=d(n,o,i),l=yield s(),c=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=at(),{prebid:{relevantCbTimeout:a}={}}=m.get(),r="relevantCb"===i&&a?a:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},r);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),p=at(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=at();return{user:e,keywords:t}})();c.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=rt();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(c.getCancel()||!p.loadTags)return t("core loadTags() call was cancelled",{cancel:c.getCancel(),apnTagLoadTags:!p.loadTags,condition:"or"}),void c.cleanup();const n=rt();c.events.relevantCb.done=!0,c.failsafeOnTimeout("auctionCb");const o=l?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};t("prebid consentManagement",o),n.addPrebidConfig(Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},te(i)),dt(g,v))),t("core add prebid config",Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},te(i)),dt(g,v))),n.loadPrebid({configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{c.getCancel()||(c.events.auctionCb.done=!0,p.loadTags(e)),c.cleanup()}},customNativeRender:e=>{Lt(e,r)},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});ge(d)&&(Ct(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))}}),t("core load prebid",{configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{c.getCancel()||(c.events.auctionCb.done=!0,p.loadTags(e))}},customNativeRender:e=>{Lt(e,r)},directRenderFn:()=>{}})})}),Lt=(e,t)=>{var n;const{divId:i,native:o,bid:a}=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:o,targetId:d},m.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:a.adId}),"*")},$t="0123456789abcdefghijklmnopqrstuvwxyz",jt=()=>Promise.resolve(),Nt=()=>{},zt=e=>{window.apntag.anq.push(e)},_t=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),Dt=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})}),Mt=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};let qt="";const Bt=new Map,Rt="advertory-wallpaper-background",Ft=()=>{const e=document.querySelector(`.${Rt}`);e&&e.remove()},Vt=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,Ut=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")&&Ft())},Ht=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"))},Wt=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`)},Kt=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=ot.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},Gt=()=>{Ft();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{Ut(e.id),Kt(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=Mt(e.id)}),zt(()=>window.apntag.clearRequest())},Jt="noGroupedPlacements",Yt=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Qt=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Xt=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:o}=m.get(),a=n[o].filter(Qt)||[],r=e?document.querySelector(e):document;if(!r)return[];const d=a.reduce((e,t)=>{const n=Yt(t.id);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=a.filter(({id:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDevice)?`div[id^="${e}"][data-device=${o}], 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=Zt(e,t,n),o=`${e.id}-${((e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++)t+=$t[Math.floor(36*Math.random())];return t})(6)}`;return e.id=o,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&&ot.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:o})});return(e=>{const{keywordsConfig:t}=m.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(qt!==window.location.pathname&&(Bt.clear(),qt=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[`${N()}-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)},Zt=(e,t,n)=>{const i=n[t],o=n[n.length-1],a=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==o?void 0:o.id)?o:a||o},en=e=>{const{queryConfig:{placementBatches:t}={},deviceType:n}=m.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),a=(e=>{const t={};return e.forEach(e=>{const n=Mt(e.id);e.isBackfill&&(t[n]=[e])}),t})(e),r=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(Mt(e.id)));return n})(e,i),d=Object.keys(a),s=((e,t)=>e.filter(e=>!t.has(Mt(e.id))))(e,new Set([...d,...o]));return Object.assign(Object.assign(Object.assign({},r),a),{[Jt]:s})},tn=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[a,r]=t;if(!i.dataset.lockedsize&&r&&a)i.style.width=`${a}px`,i.style.height=`${r}px`,n&&(o.resizeAd(i.id,[a,r]),i.dataset.lockedsize="true",i.dataset.lockedwidth=a.toString(),i.dataset.lockedheight=r.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},nn=["netboard","board"];class on{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,a=(()=>{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",o),a&&d.searchParams.append("urlData",a),r&&d.searchParams.append("excludedItems",r),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(n){return e(this,void 0,void 0,function*(){var e,i;const o=yield this.identityFacade.getIdentityUser(),a=null!==(i=yield null===(e=this.tracker)||void 0===e?void 0:e.getEnvironmentId())&&void 0!==i?i:"",r=(null==o?void 0:o.userId)?String(o.userId):"",d=this.buildUrl(n,{envId:a,spid:r});try{t("Starting fetching DrEdition ad from URL:",d);const e={method:"GET"},n=yield R.get(d,e);return t("Fetch operation completed successfully."),n}catch(e){t("Error during fetch operation:",e)}return null})}}let an=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:a}=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:o,utm_medium:d},a&&{utm_id:`df-${a}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),a=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||a.set(e,null!=t?t:"")}),a.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 o=this.getDrEditionUTMParams(e,t),a=new URL(i);return Object.entries(o).forEach(([e,t])=>{a.searchParams.has(e)||a.searchParams.set(e,null!=t?t:"")}),a.toString()}handleVideo(t,n){return e(this,void 0,void 0,function*(){const{id:e,autoplay:i,mute:o,videoLoop:a,vendor:r}=n.videoConfiguration;t.classList.add("vgtv-video-container"),Object.assign(t.dataset,{vgtvVideoId:e,vgtvVendor:r,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!a,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:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const a=o.split("/");return a.length?[...a.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const rn=e=>{const n=e.parentElement;n?n.classList.remove("dr-edition-lock-height"):t("Dr. Edition container does not have a parent element, cannot remove height lock.")};class dn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(n,i){return e(this,void 0,void 0,function*(){var e,o;const{drEditionConfig:{containerSelector:a},renderAsBackfill:r=!1}=i,d=n.querySelector(a);if(!d)return void t(`Container with selector "${a}" not found.`);const s=yield this.drEditionService.fetchData(i);return(null==s?void 0:s.itemId)||r?!(null==s?void 0:s.itemId)&&r?(t("No Dr. Edition ads available to render. Collapsing whole placement."),Ut(n.id),void rn(d)):((null==s?void 0:s.itemId)&&r&&(t("Dr. Edition ad available to render as a Xandr backfill."),Ht(n.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(d,s,i),yield null===(e=this.videoManager)||void 0===e?void 0:e.handle(s,i),rn(d),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(n,s,i),null===(o=n.querySelector("a"))||void 0===o||o.addEventListener("pointerup",()=>null)):rn(d))):(t("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(d),this.showBackfill(n),void rn(d))})}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:"";Ht(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const a=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{a.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{a.observe(e)}),!0}}class sn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(t,n,i){return e(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:e}=d(i.tcf,i.isMobileApp,i.country),o=yield e(),a=i.device===b.MOBILE?n.mobileHTML:n.desktopHTML;const r=o?a:a.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");t.innerHTML=r,t.querySelectorAll("a").forEach(e=>{var t,o,a;e.search=null!==(a=null===(o=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(t,e,n,i))&&void 0!==a?a:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,i)})})}}class ln{constructor(e){this.strategy=e}handle(t,n){return e(this,void 0,void 0,function*(){const{videoConfiguration:{id:e,preview:i}={}}=t;(e||i)&&(yield this.importScript(n),yield this.createVideoElement(t,n))})}importScript(n){return e(this,void 0,void 0,function*(){const e=n.drEditionConfig.videoScriptUrl,i=document.querySelector(`script[src="${e}"]`);if(e&&!window.autoplayQueue&&!i)try{yield st(e)}catch(e){t("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(t,n){return e(this,void 0,void 0,function*(){const e=document.createElement("div"),{node:i}=t.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(t,n))return;this.strategy.handleVideo(e,t),null==o||o.appendChild(e),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const a=null==o?void 0:o.parentNode;if(!a)return;const r=a.closest("a");a.addEventListener("click",e=>{const t=e.target.closest("a");r!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:a,thumbnail:r}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!a)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",a),d.setAttribute("playsinline",""),!(!d||!r)&&(null===(o=(i=t.drEditionConfig).addPreviewVideo)||void 0===o||o.call(i,d),!0))}}let cn=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,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(t,n,i){return e(this,void 0,void 0,function*(){var e,o,a,r,d,s,l,c;if(!this.pulse)return;const p=this.getEventInput(t,n,i,"view");(null===(e=this.pulse)||void 0===e?void 0:e.trackLegacyViewUIElement)?null===(a=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===a||a.call(o,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(t,n,i){return e(this,void 0,void 0,function*(){var e,o,a,r,d,s;if(!this.pulse)return;const l=this.getEventInput(t,n,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(e=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(e,l):this.pulse.trackClickUIElement?null===(r=(a=this.pulse).trackClickUIElement)||void 0===r||r.call(a,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class pn extends cn{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:o="",creativeId:a}={}}=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:o,"spt:creativeId":a},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let un=class extends cn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,a,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===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===a?void 0:a.call(o))&&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 o,a,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===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===a?void 0:a.call(o,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 vn={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"},gn={FRONT:"front"},hn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},mn=t=>e(void 0,void 0,void 0,function*(){var e,n;return(null===(e=null===window||void 0===window?void 0:window.SVP)||void 0===e?void 0:e.Player)?new window.SVP.Player(t):((()=>{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(t):yield new Promise(e=>{window.addEventListener("onSvpPlayerReady",()=>e(new window.SVP.Player(t)))}))}),fn={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 e(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Ho})})}})}},yn=(e,t)=>{null==e||e.forEach(e=>{fn[e](t)})};class bn{handleVideo(t,n){return e(this,arguments,void 0,function*(t,{videoConfiguration:{id:n,node:i,autoplay:o,mute:a,vendor:r}}){yield e(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 d=["ContentMutePlugin"],s=this.createPlayerOverlay(t);yn(d,s);const l={id:n,node:i,autoplay:o,mute:a,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},c=yield mn(l);c.once("assetReady",()=>{hn(c,d)}),c.once("ready",()=>{const e=t;new MutationObserver(t=>{t.forEach(({type:t,attributeName:n})=>{"attributes"===t&&"class"===n&&(e.classList.contains("jw-state-playing")?s.classList.add("is-playing"):s.classList.remove("is-playing"),e.classList.contains("jw-flag-user-inactive")?s.classList.add("is-inactive"):s.classList.remove("is-inactive"))})}).observe(e,{attributes:!0,attributeFilter:["class"]})}),c.once("PulseStats:ready",()=>e(this,void 0,void 0,function*(){const e=yield c.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===gn.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),o=i.split("/").filter(Boolean);return o.length?[...o.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 wn="https://www.aftonbladet.se/video-player-extras/latest/";class xn{handleVideo(t,n){return e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:a}}){const r={id:t,node:n,autoplay:i,mute:o,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${wn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${wn}external-link.js`]:{name:"ExternalLink"}}};yield mn(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 En=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class kn{handleVideo(t,n){return e(this,arguments,void 0,function*(t,{videoConfiguration:{id:n,node:i,autoplay:o,mute:a,vendor:r}}){const d={id:n,node:i,autoplay:o,mute:a,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},En(e)?e:{}),{provider:Object.assign(Object.assign({},En(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-${n}`]},requestSettings:{}}}},s=yield mn(d);s.once("PulseStats:ready",()=>e(this,void 0,void 0,function*(){const e=yield s.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===gn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let Tn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const In=(e,t,n)=>{var o;const{publisher:a,pageType:r,country:d}=e,s={[vn.VG]:new an,[vn.E24]:new bn,[vn.AFTONBLADET]:new xn,[vn.SVD]:new kn}[a]||new Tn,l=new(d===i.SE?pn:un)(n,s,r),c=new on(t,null!==(o=null==n?void 0:n.pulseTracker)&&void 0!==o?o:n),p=new sn(s,l),u=new ln(s);return new dn(c,p,u,l)},An=()=>e(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 Sn{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 e(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 t("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return e(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 Cn=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig,o=document.querySelectorAll(i),a=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const a=In(n,i,o);e.forEach(e=>{var i,o,r;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=d.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(r=d.dataset.pulsePrimaryposition)&&void 0!==r?r:"";a.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>a.observe(e))},Pn=[],On=(n,i)=>e(void 0,void 0,void 0,function*(){var e;const{pulse:o,tcf:a,deviceType:r,drEdition:d,publisher:s,pageType:l,country:c,isMobileApp:p}=n;if(!(yield O(a,p,c,"handleDrEditionBackfill")))return;const u=((e,t)=>{var n;const{deviceType:i,placements:o,drEdition:{fallbackGlobalEditionName:a}={}}=e,r=o[i]||o.desktop,d=Mt(t.targetId),s=r.find(e=>e.id===d),l=nn.some(e=>d.startsWith(e)),c=Pn.includes(d),p=(null===(n=null==s?void 0:s.drEdition)||void 0===n?void 0:n.editionName)||a;return s&&l&&!c&&p?(Pn.push(d),Object.assign(Object.assign({},s),{drEdition:Object.assign(Object.assign({},s.drEdition),{editionName:p})})):null})(n,i);if(!u)return;if(!(null==o?void 0:o.instance))return void t("Pulse has not been passed as a prop, aborting");const v=yield An(),g=new Sn(v),h=In({publisher:s,pageType:l,country:c},g,null==o?void 0:o.instance),m=document.getElementById(i.targetId);if(!m||!d)return;m.classList.value="";const f=document.createElement("div");f.className=d.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=f.outerHTML;const y={editionName:(null===(e=null==u?void 0:u.drEdition)||void 0===e?void 0:e.editionName)||"",drEditionConfig:d,device:r,tcf:a,isMobileApp:p,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,y)}),Ln="collapseAd",$n="hideAd",jn="resizeAd",Nn="renderDrEditionFallback",zn="wallpaperImageUrl",_n="wallpaperColor",Dn="velvet",Mn=[jn,zn,_n,Ln,$n,Nn,Dn];let qn;const Bn=e=>{if("object"==typeof e)return e;if(t=e,Vt.test(t)){const t=e.replace(/^wallpaper:url:/,"");return{name:zn,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(Nn)){const t=e.split(":")[1];return{name:Nn,targetId:t}}if(e.startsWith(Ln)||e.startsWith($n)){const t=e.split(":")[1];return{name:Ln,targetId:t}}if(e.includes("name")&&Mn.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}},Rn=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=Bn(t);if(!n)return;if(!n.name||!Mn.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:a,wallpaperColor:r,cmd:d,size:s}=n;i===Dn&&d&&(d.includes("noScroll")&&(qn=(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==qn||qn(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==Ln&&i!==$n||!o||Ut(o),i===jn&&o&&d&&tn(o,d),i===Nn&&o&&(Ut(o),On(m.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&tn(o,s,!0),i===zn&&a&&(e=>{const t=document.querySelector(`.${Rt}`);t&&(t.style.backgroundImage=`url(${e})`)})(a),i===_n&&r&&(e=>{const t=document.querySelector(`.${Rt}`);t&&(t.style.backgroundColor=e)})(r)},Fn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Vn=(n,i)=>{if(ke(i))return t(`loading finn blink ad with full ads chain for ${i}`),void(()=>{const{publisher:t,country:n,finnBlink:i}=m.get(),{loadFinnBlinkAd:o,wallpaperHandlers:{adjustAdToHorseshoe:a}}=m.getHandlers(),r=window.apntag,d={publisher:t,country:n,finnBlink:i},s=e=>{Ht(e),zt(()=>r.showTag(e))};return{withXandrAd:s,withFinnBlinkAd:t=>e(void 0,void 0,void 0,function*(){yield o(t,d,null)}),withFullAdsChain:t=>e(void 0,void 0,void 0,function*(){yield o(t,d,s,()=>{ot.getData("horseshoe").isAvailable&&a(t)})})}})().withFullAdsChain(i);zt(()=>(t("core showTag",{id:i}),n.showTag(i)))},Un=(n,i)=>e(void 0,void 0,void 0,function*(){yield _t,yield Dt;const e=new IntersectionObserver((e,n)=>((e,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,a=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),r=document.getElementById(a);t("core log from intersection observer handler",{targetId:a,element:r}),i(window.apntag,a),r&&(n.unobserve(r),n.disconnect())})})(e,n,Vn),Fn(i));e.observe(n)}),Hn=new Map,Wn=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Kn=".brandstudio-premium-content-widget",Gn=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Jn=({adWrapper:e,placementContainer:t})=>{const n=Gn({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),Kt(i=t),i.innerHTML=""},Yn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Qn=({adWrapper:e,placementContainer:t})=>{const{publisher:n}=m.get(),i=Wn.includes(n)&&Boolean(t.closest(Kn));const o=i?t.closest(Kn):null,a=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&&!o)return;if(r)return Yn(e),void a.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?Yn(d):s.hasAttribute("style")&&Yn(s),a.disconnect()})})});try{a.observe(t,{childList:!0,subtree:!0})}catch(e){a.disconnect()}},Xn=(e,t,n,i,o,a)=>{var r;const d=performance.now(),s=null!==(r=Hn.get(t))&&void 0!==r?r:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(Hn.set(t,d),((e,t,n)=>{const i=null==n?void 0:n.parentElement;i&&n&&Jn({adWrapper:i,placementContainer:n}),zt(()=>{e.setKeywords([t],{[`${j()}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,a))},Zn=(e,t,n,i)=>{const o=new IntersectionObserver((e,t)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:a}=e;t(window.apntag,o.id,a.y,n,i,o)})})(e,Xn,n,i),Fn(t));o.observe(e)},ei=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},ti=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),ni=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},ii=(e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;Qn({adWrapper:o,placementContainer:i});const{delayTime:a=1e3}=t,r=(new Date).getTime();if(i&&"true"!==i.dataset.subscribedForRefresh){const e=(e=>{var t;const{deviceType:n,preloadMarginsConfig:i}=m.get(),o=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,o,a,r,d,s;return{high:{refreshMargin:null!==(i=null==e?void 0:e.refreshMargin)&&void 0!==i?i:600,renderMargin:null!==(o=null==e?void 0:e.renderMargin)&&void 0!==o?o:300},normal:{refreshMargin:null!==(a=null==t?void 0:t.refreshMargin)&&void 0!==a?a: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}}})(o)).refreshMargin})(i);i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Zn(i,e,r,a)}},oi=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=m.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),li(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},ai=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t;return e.id===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&e.bfCacheRefresh}),a=null==i?void 0:i.threshold;ni(o,a)&&i&&(Wt(i.id),n.length&&o.classList.remove(...n),li([i],t))}},ri=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},isMobileApp:i}=m.get();t&&(e.forEach(({id:e})=>{const t=di(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{ai(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),ai(e,!1,t))};n.persisted&&(ti()?window.addEventListener("scroll",i,{passive:!0}):ai(e,!1,t))})})(e,n))},di=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},si=e=>{const{id:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(di(t)),o=(e=>1===e[0]&&1===e[1])(i),a={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(a.native=void 0),a},li=(e,t=!1)=>{const{requestSize:n=g}=m.get(),i=e.map(({id:e})=>e),o=ei(i,n);if(t)for(const t of e){const e=si(t);window.apntag.modifyTag(t.id,e)}for(const e of o)zt(()=>window.apntag.refresh(e))};const ci="#fff",pi="#0098da",ui=(e,t=!0)=>{(e===$e||e===je)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},vi=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},gi=e=>{document.body.style.overflow=e?"initial":"hidden"},hi=e=>{const t=fi(e),n=mi(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),gi(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},mi=e=>{const t=()=>hi(e);return window.addEventListener("advertory:closeTakeover",t),vi(),t},fi=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&hi(e)};return vi(),window.addEventListener("keydown",t),t},yi=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(fi(e),mi(e),vi(),t.addEventListener("click",()=>{hi(e)}),gi(!1))},bi=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),mi(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},wi=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>hi(e))})(e)},xi=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=m.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=kt.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Ei=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=kt.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},ki=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=kt.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Ti=e=>{e.classList.toggle("advertory-impact-wrapper",!0)},Ii=()=>{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)},Ai=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${Ge})()`,e+t.outerHTML})(e)),n},Si=e=>{const t=(e=>{const{requests:t}=window.apntag,n=ct(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=ct(e)?1:0;n&&(n.tags[e].adResponse.ads[i].rtb.banner.content=t)})(e,Ai(t))},Ci=t=>e(void 0,void 0,void 0,function*(){const{takeover:e}=m.get(),{targetId:n}=t,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!e)return;const a=(e=>{const{width:t,height:n}=e;return Fe(t,n)?Le:Pe(e,le)?Ne:Ve()?je:$e})(t),r=o.offsetHeight,d=window.scrollY>r;o.style.display="block",!d&&ui(a,!1),((e,t)=>{({[$e]:ki,[Le]:xi,[je]:Ei,[Ne]:Ti})[t](e)})(o,a),Ii(),((e,t)=>{({[$e]:bi,[je]:bi,[Le]:yi,[Ne]:wi})[t](e)})(o,a),((e,t,n)=>{if(!n)return;({[$e]:()=>{const{buttonLabel:i}=We(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:"")})},[Le]:()=>{const{themeColors:i,logotype:o,buttonLabel:a,showArrowIcon:r}=We(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!=a?a:""),".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&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:ci,"important"),n.style.color=null!=t?t:pi}}})},[je]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:a=!0}=We(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||a||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[Ne]:()=>{}})[t]()})(o,a,e),yield Ue(),!d&&ui(a,!0),Ke(t,a)});Et(".advertory-brandmetrics-survey{width:100%}");const Pi="advertory-brandmetrics-survey",Oi=()=>e(void 0,void 0,void 0,function*(){const{norstat:{enabled:t}={},country:n,isMobileApp:o,tcf:a}=m.get(),r=yield O(a,o,n,"norstat");if(!t||o||!r)return;const d=(e=>{const{ppid1:t,ppid2:n}=Q.getPPIDs(),{ppid1:i,ppid2:o}=X.getPPIDs(),a=(new Y).add(n,V[e]).add(t,U[e]).add(o,H[e]).add(i,W[e]);return`${a.buildNorstatPath()}?${a.buildNorstatQuery("alias").toString()}`})(n);((t,n,...i)=>{e(void 0,[t,n,...i],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/${n===i.NO?"schibsted":"schibstedse"}/map/${d}`,"norstat")}),Li=(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,$i=e=>`externalImpId:'${e}'`,ji=e=>{var n;const{forwardExternalImpId:i=!1,tracker:o}=m.get(),a=(e=>{var t;if(!e.positionConfig)return e;const n=e.keywords[`${N()}-count`],i=e.positionConfig.find(e=>e.adPositionIndex===n);if(!i)return e;const o=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:o})})(e),{id:r,sizes:d,keywords:s,allowedFormats:l,invCode:c,ssa:p=!1,nativeCustomProperties:u,safeframeConfig:v,resizeAdParentDiv:g=!1,dynamicSizeWidthCheck:h=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||Be())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!==je),o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),a=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:a,keywords:o})})(a),f=Object.assign({invCode:c,sizes:d,targetId:r,keywords:Li(s,p),allowedFormats:l,resizeAdParentDiv:g,dynamicSizeWidthCheck:h},v&&{safeframeConfig:v}),y=(e=>{var n,i,o,a,r,d,s;return e?(null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)?(null===(o=null===(i=null==e?void 0:e.instance)||void 0===i?void 0:i.state)||void 0===o?void 0:o.pageViewId)?(t("Tracker state pageViewId is:",null===(r=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===r?void 0:r.pageViewId),null===(s=null===(d=null==e?void 0:e.instance)||void 0===d?void 0:d.state)||void 0===s?void 0:s.pageViewId):(t("Tracker state does not contain field pageViewId or it is empty"),""):(t("Tracker state is empty"),""):(t("Tracker is not configured in initAdvertory function"),"")})(o);i&&y&&(t("External Impression ID assigned to defineTag:",$i(y)),f.externalImpId=$i(y));const b=(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===(n=e.allowedFormats)||void 0===n?void 0:n.includes("native"))&&(f.native=b),f},Ni=e=>!e.includes("takeover")||Be(),zi=e=>{const{source:t}=e;return"csm"===t},_i="native-ad",Di=e=>{if(!e)return e;const t=e[`${j()}-targetid`],n=t?Mt(t[0]):"";return Object.assign(Object.assign({},e),t&&{[`${j()}-targetid`]:[n]})},Mi=e=>Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${j()}-geo`]&&{[`${j()}-geo`]:["geo-test-value"]}),e[`${j()}-geofence`]&&{[`${j()}-geofence`]:["geofence-test-value"]}),e[`${j()}-weather`]&&{[`${j()}-weather`]:["weather-test-value"]}),qi=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],o=e.find(e=>e.invCode===i),a=document.querySelector(`[id^=${null==o?void 0:o.id}]`);a&&a.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"})})()},Bi=(t,n)=>e(void 0,void 0,void 0,function*(){return yield new Promise(e=>{t().then(t=>{e(null!=t?t:null)}).catch(t=>{e(null)})})}),Ri=()=>e(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)}}),Fi={arrayMerge:(e,t)=>t},Vi=n=>e(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))})(n))return n;try{const i=yield(n=>e(void 0,void 0,void 0,function*(){const e=(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})(n);if(!e)return null;const i=new AbortController,o=setTimeout(()=>i.abort(),5e3);try{return yield R.get(e,{method:"GET",signal:i.signal})}catch(n){throw t("Failed to fetch S3 config",{error:n,url:e}),n}finally{clearTimeout(o)}}))(n);return i?(({siteConfig:e,configOverrides:t})=>{var n;const{keywords:i,refresh:o,placements:a,threshold:r,batchSize:d}=t,s=p.all([e.placements,a],Fi),l=p(e.pageOptions,{keywords:i},Fi),c=p(e.appearanceConfig,{defaultThreshold:r},Fi),u=p(null!==(n=e.refreshConfig)&&void 0!==n?n:{},{scrollRefreshEnabled:o},Fi);return Object.assign(Object.assign({},e),{placements:s,requestSize:null!=d?d:e.requestSize,pageOptions:l,appearanceConfig:c,refreshConfig:u})})({siteConfig:n,configOverrides:i}):n}catch(e){return t("Error fetching S3 config, using site config",{error:e}),n}}),Ui=".advertory-right-column-track",Hi="--advertory-right-column-track-height",Wi=e=>e.getBoundingClientRect().top+window.scrollY,Ki=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Gi=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},Ji=(e,t)=>`${e}-${t}`,Yi=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),a=(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===a.length)return;const r=Wi(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ki(e);Gi("--advertory-newsroom-header-height",t)})(),a.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=Wi(e),o=Ji(Hi,t),a=i-n,r=Ji("--advertory-right-column-split-point-height",t),d=Ki(e);Gi(o,a),Gi(r,d)})(e,t+1,r),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Ji("--advertory-right-column-ad-height",t),i=Ki(e);Gi(n,i)})(o[t])});((e,t)=>{const n=Wi(e);Gi(Hi,n-t)})(a[Math.min(o.length,a.length-1)].point,r)};let Qi=!1;class Xi{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:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const a=o.split("/");return a.length?[...a.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class Zi{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class eo{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(t){return e(this,void 0,void 0,function*(){var e,n,i,o,a,r,d,s;if(!this.pulse)return;const l=this.getEventInput(t,"view");(null===(e=this.pulse)||void 0===e?void 0:e.trackLegacyViewUIElement)?null===(i=null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)||void 0===i||i.call(n,l):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(r=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===r||r.call(a,l):null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackElementView)||void 0===s||s.call(d,l)})}trackContentClick(t){return e(this,void 0,void 0,function*(){var e,n,i,o,a,r;if(!this.pulse)return;const d=this.getEventInput(t,"click");this.pulse.trackLegacyClickUIElement?null===(n=(e=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(e,d):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,d):null===(r=(a=this.pulse).trackElementClick)||void 0===r||r.call(a,d)})}}class to extends eo{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,a,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!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o: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===(a=this.newsroomStrategy)||void 0===a?void 0:a.getTags)||void 0===r?void 0:r.call(a,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 no="[data-k5a-teaser-analytics]",io=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new to(e,t,n),a=new WeakMap,r=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(no);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),r(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(no);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),r(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class oo{handleKilkayaStreamTracking({pulse:e,pageType:t,publisher:n}){if(!(null==e?void 0:e.instance))return;const i={[vn.VG]:new Xi}[n]||new Zi;io(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 n;const i=null===(n=null==e?void 0:e.detail)||void 0===n?void 0:n.streamSlot;if(!i)return;const o=i.parentElement;o&&(t(`Kilkaya placement ${i.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(o))})}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:"";Ht(i)}loadKilkayaScript(t){return e(this,void 0,void 0,function*(){yield st(t)})}run(t){return e(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:n,country:i,kilkaya:o}=t;if(!(null==o?void 0:o.enabled))return;const a=yield O(e,n,i,"kilkaya");a&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(a),yield this.loadKilkayaScript(o.url),this.handleKilkayaStreamTracking(t))})}}let ao,ro=[];const so=["takeover","wallpaper"],lo=e=>{const t=(e=>{const t=ot.getData("alertoryConfigKeywords"),{queryConfig:n,placements:i,tcf:o,glimr:a,appearanceConfig:r,requestSize:d=g,publisher:s,country:l,pageType:c,deviceType:p,isMobileApp:u=!1,pageOptions:{member:v},takeover:h,fullscreenScroll:m,useAppTabletInvCode:f}=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:o,requestSize:d,isMobileApp:u,useAppTabletInvCode:f},a&&{glimr:a}),n&&{queryConfig:n}),r&&{appearanceConfig:r}),h&&{takeover:h}),m&&{fullscreenScroll:m})}})(e);window.advertory={initialized:!0,siteConfig:e,alertoryConfig:t}},co=()=>e(void 0,void 0,void 0,function*(){const{pageOptions:t}=m.get(),{preparePageOptions:n}=m.getHandlers(),i=(()=>{const{sandboxAdIframeEnabled:e=!0}=m.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"]}})(),o=yield e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get();return(yield O(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),a=yield n(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},t),{renderingManagement:Object.assign({},i)}),o));(e=>{const t=ot.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Mi(e);ot.setData("alertoryConfigKeywords",n)})(a.keywords),zt(()=>ao.setPageOpts(a))}),po=n=>e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:i,isMobileApp:o,country:a}=m.get();uo(n);const r=yield O(i,o,a,"prebid");(null==e?void 0:e.enabled)&&r?(t("core loadPlacements prebid enabled"),yield Ot()):(t("core load tags invoked without prebid enabled"),vo(n))}),uo=e=>{const{prepareTag:n}=m.getHandlers(),i=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.id.includes(t)),o=t.findIndex(e=>n.id.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{t("core defineTags",{placement:e});const o=ji(e);if(Ni(e.id)){const a=n(o),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Di(i),sizes:o}})(a);i.push(r),zt(()=>(t("core defineTag - add to the queue",{placement:e,preparedTag:a}),ao.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)})(i)},vo=e=>{const n=e.filter(({id:e})=>Ni(e)).map(({id:e})=>e);n.length&&zt(()=>(t("core loadTags",{placementsIdsToLoad:n}),ao.loadTags([...n])))},go=(n,i)=>e(void 0,void 0,void 0,function*(){const{appearanceConfig:e,deviceType:o}=m.get(),{threshold:a,refresh:r,priority:d="normal"}=n,s=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(i),l=null==e?void 0:e.defaultThreshold[o];s&&(t("core showAd - subscribe for show tag with thresholds",{placement:n,adObj:i,threshold:a,deviceDefaultThreshold:l}),yield Un(s,null!=a?a:l)),s&&r&&(t("core showAd - setup refreshing",{placement:n,adObj:i}),s.dataset.refresh=r.toString(),s.dataset.priority=d)}),ho=e=>e.some(({id:e})=>so.some(t=>e.includes(t))),mo=n=>e(void 0,void 0,void 0,function*(){var e;if(!(null===(e=null===window||void 0===window?void 0:window.advertory)||void 0===e?void 0:e.initialized))return;const{requestSize:i=g}=m.get(),o=en(n);for(const e of Object.keys(o)){const n=o[e],a=ei(n,i);for(const e of a)ho(e)?(t("core loadAds without lazy loading",{placementsToLoad:e}),yield po(e)):e.length&&(t("core loadAds with lazy loading",{placementsToLoad:e}),yield fo(e))}}),fo=n=>e(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:e=!1,rootMargin:i="200% 0px"}={}}={}}=m.get(),o=[];if(!e)return t("lazy load is not enabled",{placements:n}),void(yield po(n));const a=new IntersectionObserver((e,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{t("lazy load is enabled - handler start",{loadedPlacementIds:o,placements:n});const a=n.every(e=>o.includes(e.id)),r=n.map(e=>e.id);!a&&o.push(...r),!a&&po(n),t("lazy load is enabled - handler stop",{loadedPlacementIds:o,placements:n,arePlacementsLoaded:a,placementIds:r}),i.disconnect()})},{rootMargin:i});n.forEach(e=>{const n=document.getElementById(e.id);n&&(t("lazy loading - observe element",{placementId:e.id,element:n}),a.observe(n))})}),yo=()=>e(void 0,void 0,void 0,function*(){const{siteEvents:n,initNativeAd:i,wallpaperHandlers:{initWallpaperAd:o,adjustAdToHorseshoe:a}}=m.getHandlers(),{wallpaper:r,fullscreenScroll:d}=m.get(),s=[];zt(()=>{ao.onEvent("adRequested",()=>{n.adRequested()}),ao.onEvent("adAvailable",a=>e(void 0,void 0,void 0,function*(){var e,s,l,c,p,u;t("core adAvailable start",{placementsAvailable:ro,adObj:a,isFullscreenScrollAd:ge(a),isFinnBlink:ke(a.targetId),isNativeAd:he(a),isMediation:zi(a),isTakeoverAd:ye(a),isCollapseAd:xe(a),isWallpaperAd:we(a)});const v=null===(l=null===(s=null===(e=null===window||void 0===window?void 0:window.apntag)||void 0===e?void 0:e.requests)||void 0===s?void 0:s.tags[a.targetId])||void 0===l?void 0:l.adResponse.ads;zi(a)&&v&&(null===(c=v[1])||void 0===c?void 0:c.rtb)&&(a.banner=null===(u=null===(p=v[1])||void 0===p?void 0:p.rtb)||void 0===u?void 0:u.banner),ge(a)&&Pt(a),ge(a)&&!ke(a.targetId)&&Ct(a,d),!he(a)||zi(a)||ke(a.targetId)||i(a,m.get()),ye(a)&&!xe(a)&&(Si(a.targetId),yield Ci(a)),we(a)&&(o(()=>zt(()=>window.apntag.showTag(a.targetId)),r),ot.setData("wallpaper",{isAvailable:!0})),(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(a)&&ot.setData("horseshoe",{isAvailable:!0}),Ye({adObj:a}),(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:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(a),n.adAvailable(a);const g=ro.find(({id:e})=>e===a.targetId);g&&(yield go(g,a),ro=ro.filter(e=>e.id!==g.id)),t("core adAvailable stop",{placementsAvailable:ro,adObj:a,isFullscreenScrollAd:ge(a),isFinnBlink:ke(a.targetId),isNativeAd:he(a),isMediation:zi(a),isTakeoverAd:ye(a),isCollapseAd:xe(a),isWallpaperAd:we(a)})})),ao.onEvent("adLoaded",e=>{const{refreshConfig:t,appearanceConfig:o}=m.get(),r=document.getElementById(e.targetId);ke(e.targetId)&&(e=>{const{fullscreenScroll:t}=m.get(),{initNativeAd:n}=m.getHandlers();ge(e)&&Ct(e,t),he(e)&&n(e,m.get())})(e);s.includes(e.targetId)&&he(e)&&(i(e,m.get()),Ye({adObj:e})),!s.includes(e.targetId)&&zi(e)&&s.push(e.targetId),xe(e)&&Ut(e.targetId),ye(e)&&((e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);const a=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!a)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(a),t=e.width,n=e.height;t===i&&n===o||(a.style.width=i,a.style.height=o)}}).observe(a,{attributes:!0,attributeFilter:["style"]})})(ao,e.targetId),me(e)&&(e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=m.get();if(!t||!n||!i)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),o.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))})(e),fe(e)&&(e=>{const t=document.querySelector(`#${e.targetId}`),n=null==t?void 0:t.querySelector("iframe"),i=null==n?void 0:n.parentElement,{siteSpecificConfig:{publisherClassName:o,fullWidthFormatClassName:a}={}}=m.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-${o}-${a}__vertical-full-width-ad`);const s=Xe(e,t.offsetWidth);i.style.transform=`scale(${s})`,i.style.transformOrigin="left top"})(e),ii(e,t),(null==o?void 0:o.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(e.targetId);var d,l;ot.getData("horseshoe").isAvailable&&a(e.targetId),(e=>{var t,n,i,o,a,r;const{adScaleConfig:d,deviceType:s}=m.get();if(!(null==d?void 0:d.enabled))return;if(Pe(e,ae))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=Yt(e.targetId.split("-")[0]);if(!l.includes(c))return;const p=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,u=document.getElementById(e.targetId),v=null!==(o=null==u?void 0:u.offsetWidth)&&void 0!==o?o:window.screen.width,g=null!==(r=null===(a=null==u?void 0:u.parentElement)||void 0===a?void 0:a.offsetWidth)&&void 0!==r?r:window.screen.width;Ze(e,(v<g?v:g)-p)})(e),n.adLoaded(e),d=e.targetId,!document.querySelector(`#gdprAdTransparencyCogWheelButton-${d}`)&&(null===(l=window.gdpr)||void 0===l?void 0:l.setupButton)&&window.gdpr.setupButton(d),r&&r.classList.add("ad-loaded"),tt(e),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:e.targetId,adFormat:Qe(e)}}))}),ao.onEvent("adNoBid",t=>e(void 0,void 0,void 0,function*(){Ut(t.targetId),yield On(m.get(),t),He(t)&&(yield Ue()),n.adNoBid(t)})),ao.onEvent("adError",(t,i)=>e(void 0,void 0,void 0,function*(){He(i)&&(yield Ue()),n.adError(t,i)})),ao.onEvent("adCollapse",()=>{n.adCollapse()}),ao.onEvent("adRequestFailure",e=>{Ut(e.targetId),n.adRequestFailure(e)}),ao.onEvent("adBadRequest",e=>{Ut(e.targetId),n.adBadRequest(e)}),ao.onEvent("adLoadedMediated",e=>n.adLoadedMediated(e)),ao.onEvent("adNoBidMediated",e=>n.adNoBidMediated(e))})}),bo=(n,i)=>e(void 0,void 0,void 0,function*(){var o;m.set(n),m.setHandlers(i),ot.initialize(),window.addEventListener("message",Rn,!1),ao=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=ao,t("Apn tag is set up on window"),yield Promise.allSettled([e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get();(yield O(e,t,n,"xandr-endpoint"))||ao.setEndpoint("ib.adnxs-simple.com",!0)}),e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,isMobileApp:n,country:i}=m.get(),o=yield O(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield st(null==e?void 0:e.url))}),Z(n),e(void 0,void 0,void 0,function*(){const{astUrl:e}=m.get();yield st(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),e(void 0,void 0,void 0,function*(){const{gptUrl:e}=m.get();yield st(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js")}),e(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,url:t}={},tcf:n,isMobileApp:i,country:o}=m.get(),{getConsentAsync:a}=d(n,i,o),r=yield a();if(e&&t&&r){if(yield st(t),document.querySelector(`.${Pi}`))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(Pi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),$(),e(void 0,void 0,void 0,function*(){const{gdpr:{url:e,allowHidingAds:t=!0}={}}=m.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield st(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),yield Oi(),t("Libraries have been loaded and trackers have been set"),yield(o=i.librariesToLoad,e(void 0,void 0,void 0,function*(){const e=o.map(e=>st(e));yield Promise.all(e)})),yield yo(),yield co(),t("Page options have been set"),lo(n),t("Advertory is setup on window"),ro=Xt(),oi(ro),ri(ro),yield mo(ro),t("Ads has been loaded",ro),qi(ro),yield i.replaceAdsWithFinnBlink(n.finnBlink),yield(t=>e(void 0,void 0,void 0,function*(){var e;if(!t.drEdition)return;if(!(yield O(t.tcf,t.isMobileApp,t.country,"handleDrEdition")))return;const n=yield An(),i=new Sn(n);Cn({publisher:t.publisher,drEditionConfig:t.drEdition,device:t.deviceType,pageType:t.pageType,country:t.country},i,null===(e=t.pulse)||void 0===e?void 0:e.instance)}))(n),(e=>{if(!(null==e?void 0:e.enabled)||Qi)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=Ui}=e,o=document.querySelector(i);if(!o)return;Qi=!0;const a=()=>{Yi(o,n,t)};a(),window.addEventListener("resize",a),window.addEventListener("orientationchange",a),window.addEventListener("load",a),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(a)}),new ResizeObserver(a).observe(o)})(n.rightColumnSplit),yield(t=>e(void 0,void 0,void 0,function*(){const e=new oo;yield e.run(t)}))(n)}),wo=(n,i)=>e(void 0,void 0,void 0,function*(){yield((n,i)=>e(void 0,void 0,void 0,function*(){const{initConsentManager:e,getConsentAsync:o}=d(n.tcf,n.isMobileApp,n.country),a=yield Vi(n);yield Ri(),yield Bi(e),yield Bi(o),t("TCF resolved successfully"),yield bo(a,i),t("Run function resolved successfully")}))(n,i)}),xo="native_override_desc2",Eo=(e,t,n)=>{var i;const{image:o,icon:a,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(o),imgWidth:null==o?void 0:o.width,imgHeight:null==o?void 0:o.height,imgAltText:null!=d?d:"",logo:b(a),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)},ko=(e,t)=>{const n=(i=xo,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(xo),a=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?a?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},To=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,a=i&&Object.values(vn).includes(i);n&&a&&((e,t,n,i)=>{const o=t.parentElement;if(!o)return;const a=e?`-${e}`:"",r=i?`__${i}`:"",d=`advertory${a}-${n}${r}`,s=`advertory${a}-${n}-wrapper${r}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(d),o.classList.add(s),t.dataset.adType=n})(i,e,_i,o)})(o,n),i())},Io=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:[])Po(i)}),t.dataset.tracked="true")})},Ao=e=>{const{native:{impressionTrackers:t}={}}=e;(null==t?void 0:t.some(e=>e.includes("googleads")))?null==t||t.forEach(Co):window.apntag.fireImpressionTrackers(e);const n=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(n)},So=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:a,appearanceConfig:r,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==r?void 0:r.defaultThreshold[null!=a?a:b.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,Ao(e),c.disconnect();break}},s);c.observe(o)},Co=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Po(e):window.navigator.sendBeacon(e)},Po=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Oo=(e,t,n)=>{const o=((e,t,n)=>{var o;const{displayTemplates:a,videoTemplates:r}=n,d="default";if(!e.native)return null;const{native:s,targetId:l}=e,{desc2:c=d}=e.native,p=c.toLowerCase(),u=null!==(o=ko(e.targetId,c))&&void 0!==o?o:p,v=kt[t.language||i.NO],g=Eo(s,v,l);return(s.video?r[u]:a[u]||a.default)(g,t)})(e,t,n);To(e.targetId,o,t,()=>{const{nativeTrackingConfig:{nativeTrackingEnabled:n=!0}={}}=t;n&&((e,t)=>{Io(e),So(e,t)})(e,t)})};Et('.advertory-godare-ad-native-single-integration-alcohol{font-family:"Proxima Nova",Arial,sans-serif;display:flex;flex-direction:column;width:auto;height:370px;position:relative;isolation:isolate}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol{height:380px}}.advertory-godare-ad-native-single-integration-alcohol .ad-info{position:absolute;top:0;right:3px;z-index:1}.advertory-godare-ad-native-single-integration-alcohol .ad-info>div{position:initial !important}.advertory-godare-ad-native-single-integration-alcohol .ad-link{text-decoration:none;color:inherit}.advertory-godare-ad-native-single-integration-alcohol .ad-link:hover{text-decoration:none}.advertory-godare-ad-native-single-integration-alcohol .ad-header{position:relative;width:100%;padding-bottom:8px}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-header{padding-bottom:10px}}.advertory-godare-ad-native-single-integration-alcohol .ad-logo{position:absolute;top:-8px;left:-16px;width:46px;height:46px;z-index:1;border:1px solid rgba(0,0,0,.3);border-radius:28px;background:#fff}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-logo{top:-10px;left:-18px;width:48px;height:48px}}.advertory-godare-ad-native-single-integration-alcohol .ad-sponsoredBy{font-family:"Roboto",sans-serif;font-size:11px;font-weight:700;line-height:13px;color:rgba(0,0,0,.6);margin-left:40px;display:inline-block;width:80%}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-sponsoredBy{margin-left:38px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container{display:grid;grid-template-columns:1fr 116px;grid-template-rows:1fr 64px;grid-column-gap:8px;position:relative;background-color:#f5f5f5;padding:16px 16px 40px;border-radius:12px}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container{grid-template-columns:1fr 208px;padding:24px 24px 40px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-contentWrapper{grid-area:1/1/2/2;display:flex;flex-direction:column;width:100%;height:100%}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-title{font-size:15px;font-weight:700;line-height:30px;margin-bottom:8px}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-title{font-size:24px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-description{font-size:14px;font-weight:400;line-height:22px;color:#454545;margin-bottom:4px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-description{font-size:18px;-webkit-line-clamp:2}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle{font-size:13px;font-weight:700;line-height:20px;color:#454545}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle1{margin-bottom:20px}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle1{font-size:16px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle2{margin:auto 0 4px}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle2{font-size:16px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle3{font-size:15px;line-height:18px}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle3{font-size:22px;line-height:26px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-buttonWrapper{grid-area:2/1/3/3;box-sizing:border-box;max-height:40px;width:100%;background-color:#1168ea;padding:11px 16px;text-align:center;border-radius:8px;margin-top:16px}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-buttonWrapper{grid-area:2/1/3/2;width:max-content}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-buttonWrapper .ad-button{font-size:15px;font-weight:700;color:#fff}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-imageWrapper{grid-area:1/2/2/3;display:flex;justify-content:center;align-items:center;width:100%}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-imageWrapper{grid-area:1/2/3/3}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-imageWrapper .ad-image{max-width:100%;max-height:170px;margin-top:0}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-imageWrapper .ad-image{max-height:290px;margin-top:-40px}}.advertory-godare-ad-native-single-integration-alcohol .ad-warning{font-size:19px;font-weight:700;border:2px solid #000;padding:25px 0;text-align:center;margin-top:-35px;background:#fff;position:relative}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-warning{margin-top:-30px}}');const Lo={SINGLE_INTEGRATION:({containerId:e,url:t,cta:n,sponsoredBy:i,title:o,description:a,img:r,logo:d,customTitle1:s,customTitle2:l,customTitle3:c,customTitle4:p})=>{return`<article class="advertory-godare-ad-native-single-integration-alcohol">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-header">\n <img class="ad-logo" src="${d}" alt="${i}" />\n <span class="ad-sponsoredBy">${i||"ANNONS"}</span>\n </div>\n <div class="ad-container">\n <div class="ad-contentWrapper">\n <p class="ad-title">${o}</p>\n <p class="ad-description">${a}</p>\n ${s?`<p class="ad-customTitle ad-customTitle1">\n ${s}\n </p>`:""}\n ${l?`<p class="ad-customTitle ad-customTitle2">\n ${u=l,u.replace(/_/g," • ")}\n </p>`:""}\n ${c?`<p class="ad-customTitle ad-customTitle3">\n ${c}\n </p>`:""}\n </div>\n <div class="ad-buttonWrapper">\n <span class="ad-button">${n}</span>\n </div>\n <div class="ad-imageWrapper">\n <img class="ad-image" src="${r}" alt="${o}" />\n </div>\n </div>\n ${p?`<div class="ad-warning">${p}</div>`:""}\n </a>\n </article>\n `;var u}};Et('@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 $o="viewable",jo="adClick";const No=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.querySelector("ClickThrough"),o=n.querySelector("VideoClicks");if(i){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n.createCDATASection(t))}else if(o){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),o.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},zo=({id:e,nodeId:t,poster:n,tagURL:i,publisher:o="",productTag:a="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:o.toLowerCase(),decorator:e=>Object.assign(Object.assign({},En(e)?e:{}),{provider:Object.assign(Object.assign({},En(null==e?void 0:e.provider)?e.provider:{}),{productTag:a})})}}),_o=t=>e(void 0,void 0,void 0,function*(){const{playerConfig:e,pluginsNames:n,clickUrl:i}=t,{repeat:o}=e,a=yield mn(e);yn(n),a.once("assetReady",()=>{hn(a,n)}),a.on($o,e=>{const{viewable:t}=e;t?a.play():a.pause()}),a.on(jo,()=>{window.open(i,"_blank")}),o&&a.on("pause",()=>{a.play()})});Et(".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}}");const Do=({containerId:e,adText:t,url:n,adFrom:i,sponsoredBy:o,title:a},r,d)=>`<article class="advertory-shared-ad-native-video">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-content">\n <div class="ad-header">\n <span>${t}</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-player-wrapper">\n <div id="${d}"></div>\n </div>\n </div>\n <a class="ad-link" href="${n}" target="_blank">\n <div class="ad-text-container">\n <span class="sponsored-by">\n ${i} ${o}\n </span>\n <span class="title">${a}</span>\n </div>\n </a>\n </div>\n </article>`;Et(".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}}"),Et('@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}'),Et('.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}'),Et('.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}}'),Et(".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}"),Et('.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}}'),Et('.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)}}'),Et('.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 Mo={VIDEO:(e,t)=>{return(n=Do,(e,t,i)=>{const{video:o,img:a,url:r}=e,{publisher:d,productTag:s}=t,{pluginsNames:l,videoLoop:c}=i||{};if(!(null==o?void 0:o.content))return null;const p=Math.ceil(1e5*Math.random()),u=a||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${p}`,g=No(o.content,r),h=zo({id:p,nodeId:v,poster:u,tagURL:g,publisher:d,productTag:s,videoLoop:c});return _o({playerConfig:h,clickUrl:r,pluginsNames:l}),`${n(e,t,v)}`})(e,t);var n}},qo={displayTemplates:{godare_singleintegration_alcohol:Lo.SINGLE_INTEGRATION,godare_singleintegration:Lo.SINGLE_INTEGRATION,default:Lo.CONTENT_DISPLAY},videoTemplates:{default:Mo.VIDEO}};Et(".advertory-godare-native-ad-wrapper__article{align-items:center;display:flex;height:auto;justify-content:center;margin-bottom:8px;margin-top:26px;min-height:160px;padding:28px 0 48px;width:100%}.advertory-godare-native-ad-wrapper__article .advertory-godare-native-ad__article{font-size:0;min-height:160px;position:relative;transform-origin:0 0}");const Bo=()=>{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},Ro={[vn.VG]:["board","netboard","backfill","outstream"],[vn.AFTONBLADET]:["panorama","outstream"],[vn.GODARE]:["panorama","outstream"],[vn.SVD]:["wph-article-panorama","wph-front-panorama"]},Fo=e=>{var t;const{publisher:n}=m.get();return!!Ro[n]&&!!(null===(t=Ro[n])||void 0===t?void 0:t.some(t=>e.includes(t)))},Vo=((e,t)=>n=>wo(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e))({initNativeAd:(e,t)=>{const{targetId:n}=e;if(!document.querySelector(`#${n}`))return;const{pageType:o=gn.FRONT,nativeTrackingConfig:a,appearanceConfig:r,deviceType:d}=null!=t?t:{},s={language:i.SE,publisher:vn.GODARE,deviceType:d,pageType:o,nativeTrackingConfig:a,appearanceConfig:r};Oo(e,s,qo)},wallpaperHandlers:{initWallpaperAd:Nt,adjustAdToHorseshoe:Nt},loadFinnBlinkAd:jt,replaceAdsWithFinnBlink:jt,preparePageOptions:ie,prepareTag:e=>{const{keywords:t,targetId:n,invCode:i}=e,{useAppTabletInvCode:o=!0}=m.get(),a=((e,t)=>{const{isMobileApp:n}=m.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(i,o),r=(e=>{const{keywords:t,dynamicSizeWidthCheck:n}=e,i=`${j()}-adformat`,o=t?t[i]:[];if(!o)return{};const a=(Array.isArray(o)?o:[o]).filter(e=>!(e in ve)||window.innerWidth>=ve[e]);return{[i]:n?a:o}})(e),d=(e=>{const t=`${j()}-targetid`;return e?{[t]:[e]}:{}})(n),s=Bo(),l=(e=>Fo(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(i),c=((e,t)=>Fo(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(i);return Object.assign(Object.assign({},e),{invCode:a,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),r),d),l),s),rendererOptions:c})},siteEvents:nt,librariesToLoad:[]},{publisherClassName:vn.GODARE,fullWidthFormatClassName:"panorama"}),Uo=Et("[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 Ho=Object.freeze({__proto__:null,default:Uo});exports.initAdvertoryPackage=Vo,exports.updateAdvertory=(t,n)=>e(void 0,void 0,void 0,function*(){var e;if(!(null===(e=null===window||void 0===window?void 0:window.advertory)||void 0===e?void 0:e.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:a,contextSelector:r}=null!=n?n:{};if(i)return Gt(),[];o&&(Gt(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{Ht(e.id)})),f(null!=t?t:{}),yield co();let d=Xt(r);return a&&(d=d.filter(e=>ke(e.id))),d.length>0&&(ro=[...ro,...d.map(e=>Object.assign({},e))],oi(d),ri(d),yield mo(d)),ro});
1
+ "use strict";function e(e,t,n,i){return new(n||(n=Promise))(function(o,a){function r(e){try{s(i.next(e))}catch(e){a(e)}}function d(e){try{s(i.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(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())})}require("react/jsx-runtime"),"function"==typeof SuppressedError&&SuppressedError;const t=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},n=e=>new Promise(n=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void n(!1);const i=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const n=Number(e);return t("Advertising permission value obtained synchronously: ",e),Boolean(n)})();if(null!==i)return void n(i);let o=!1;const a=e=>{o||(t("Resolving advertising permission value obtained"),o=!0,n(e))},r=setTimeout(()=>{t("Advertising permission timed out, resolving with false"),a(!1)},3e3);window._tcf_.onTcfReady(()=>{t("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const n=Number(e);t("Advertising permission value obtained asynchronously: ",e),a(Boolean(n))})}),i={NO:"no",SE:"se"},o="cmp:loaded";let a,r=!1;const d=(d,s,l)=>{const c=!!(null==d?void 0:d.enabled),p=(null==d?void 0:d.timeout)||3e3,u=(v="bypass_tcf",new URLSearchParams(window.location.search).get(v));var v;const g=()=>{if(!(null==d?void 0:d.enabled))return!0;if(((e,n)=>e?!!n&&(t("TCF bypass param detected, returning consent: true"),!0):(t("TCF is not enabled, returning consent: true"),!0))(c,u))return!0;if(r)return null;if(!a)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const e=a.getConsentedToAllSync();return t(`TCF consented to all is: ${e}`),a.getConsentedToAllSync()};return{initConsentManager:()=>(null==d?void 0:d.enabled)?new Promise((e,n)=>{if(t("Getting TCF consent manager..."),window._tcf_)return t("TCF consent manager is already available"),a=window._tcf_,void e(a);t("TCF consent manager is not available");const i=()=>{t("CMP loaded, resolving consent manager..."),d&&clearTimeout(d),window._tcf_?(a=window._tcf_,e(a)):n(new Error("CMP loaded but window._tcf_ is not defined"))},d=setTimeout(()=>{document.removeEventListener(o,i),r=!0,n(new Error("Timeout waiting for CMP to load"))},p);t("Listening for CMP loaded event..."),document.addEventListener(o,i,{once:!0})}):Promise.resolve(null),getConsentSync:g,getConsentAsync:()=>e(void 0,void 0,void 0,function*(){if(null==d?void 0:d.schibstedAdChoicesOverrideValue)return t(`Schibsted Ad Choices override value is set, returning override value: ${d.schibstedAdChoicesOverrideValue}`),Boolean(Number(d.schibstedAdChoicesOverrideValue));const e=(null==d?void 0:d.schibstedAdChoicesEnabled)&&l===i.SE,o=(null==d?void 0:d.schibstedAdChoicesEnabled)&&!s&&l===i.NO;if(e||o)return t("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield n(d);if(!(null==d?void 0:d.enabled))return!0;const r=g();return null!==r?r:yield new Promise((e,n)=>{try{if(!a)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let n=!1;const i=t=>{n||(n=!0,e(t))},o=setTimeout(()=>{t("TCF isConsentedToAll timed out, resolving with false"),i(!1)},p);a.onTcfReady(()=>{t("On Tcf Ready called, waiting for consent"),clearTimeout(o)}),a.isConsentedToAll(t=>{clearTimeout(o),e(t)})}catch(e){n(e)}})})}};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l,c;var p=s(function(){if(c)return l;c=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 o(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 a(e,t){try{return t in e}catch(e){return!1}}function r(e,t,i){var r={};return i.isMergeableObject(e)&&o(e).forEach(function(t){r[t]=n(e[t],i)}),o(t).forEach(function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&i.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return d;var n=t.customMerge(e);return"function"==typeof n?n:d}(o,i)(e[o],t[o],i):r[o]=n(t[o],i))}),r}function d(t,o,a){(a=a||{}).arrayMerge=a.arrayMerge||i,a.isMergeableObject=a.isMergeableObject||e,a.cloneUnlessOtherwiseSpecified=n;var d=Array.isArray(o);return d===Array.isArray(t)?d?a.arrayMerge(t,o,a):r(t,o,a):n(o,a)}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)},{})},l=d}());const u=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],v={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},g=6;class h{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 u){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=p(h.DEFAULT_SITE_HANDLERS,e)}}h.DEFAULT_SITE_HANDLERS={siteEvents:v,initNativeAd:function(){}};const m=new h,f=m.modifyConfigProperties.bind(m),y=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},b={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},w=9826;class x{constructor(){this.getSupplyTypeKeywords=()=>{const{deviceType:e=b.DESKTOP,isMobileApp:t}=m.get();if(t){return{"aa-sch-supply_type":`app_${e===b.MOBILE?"phone":b.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(t){return e(this,void 0,void 0,function*(){return Object.assign(Object.assign({},t),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},t.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(t.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return e(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(()=>{const e=y("_pulse2data");return e?e.split(",")[2]:void 0})()}getExternalUid(){return e(this,void 0,void 0,function*(){return yield e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get(),{getConsentAsync:i}=d(e,t,n);if(!(yield i()))return;const o=y("_pulse2data");return o?o.split(",")[9]:void 0})})}isTrackingForbidden(){return e(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=w}=m.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}=m.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return e(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get(),{getConsentAsync:i}=d(e,t,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageType:e}=m.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}=m.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 E=new x;E.prepare.bind(E);function k(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(),o=(()=>{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:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}class T extends x{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{deviceType:e=b.DESKTOP}=m.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(a=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==a?a:0};var n,i,o,a;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return e(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{isMobileApp:e}=m.get(),{appMode:t,mobileOS:n}=k(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageType:i}=m.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const I=864e5,A=(()=>{const e=e=>{const n=window.localStorage.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch(e){return t("Error with parsing localStorage data"),null}},n=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:n,setWithTimestamp:(e,t,i=I)=>{const o={data:t,expirationTime:(new Date).getTime()+i};n(e,JSON.stringify(o))},getByTimestamp:(n,i=I)=>{const o=e(n);if(!o)return null;if(!i)return o;try{const{expirationTime:e,data:t}=JSON.parse(o);return(new Date).getTime()<=e?t:null}catch(e){return t("Error with parsing localStorage data"),null}}}})(),S="glimrTags",C=["glwe_","glwet_"],P={geofenceTags:[],geoTags:[],weatherTags:[]},O=(n,i,o,...a)=>e(void 0,[n,i,o,...a],void 0,function*(e,n,i,o="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return t(`Schibsted Consent to Pay is not enabled, returning true for ${o}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return t(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${o}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:a}=d(e,n,i);return(yield a())?(t(`Schibsted Ad Choices consent given according to TCF consent manager for ${o}`),!0):(t(`Schibsted Ad Choices consent not given according to TCF consent manager for ${o}`),!1)}),L=()=>e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get();if(null==e?void 0:e.schibstedConsentToPayEnabled){return yield O(e,t,n,"glimr")}const{getConsentAsync:i}=d(e,t,n);return yield i()}),$=()=>e(void 0,void 0,void 0,function*(){const{glimr:n}=m.get();if(!(yield L())||!(null==n?void 0:n.enabled))return void t("No consent for glimr data fetching.");const i=yield(o=500,e(void 0,void 0,void 0,function*(){return yield Promise.race([e(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),o))])}));var o;if(i)try{i.setTagCacheTimeInSeconds(300),yield new Promise(e=>{i.getTags(n.clientId,(t,n)=>{A.setWithTimestamp(S,{tags:t,tagMappings:n}),e(!0)})})}catch(e){t(`Error during getting glimr data: ${e}`)}else t("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:i})}),j=()=>{const{country:e}=m.get();return e===i.NO?"no-sno":"se-generic"},N=()=>{const{country:e,publisher:t}=m.get();return`${e}-${t}`},z={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"},_=e=>C.some(t=>e.startsWith(t)),D=e=>e.startsWith("glgc_"),M=e=>!_(e)&&!D(e),q=e=>{const t=B();if(!t)return P;const n=((e=[])=>e.filter(_))(t),i=((e=[])=>e.filter(D))(t),o=((e=[],t)=>{const n=e.filter(M);if(t){const{publisher:e}=m.get(),t=z[e]||e;n.push(t)}return n})(t,e);return{geoTags:o,geofenceTags:i,weatherTags:n}},B=()=>{const e=A.getByTimestamp(S);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},R={get:(t,n)=>e(void 0,void 0,void 0,function*(){const e=yield fetch(t,n);if(!e.ok)throw new Error(e.statusText);return yield e.json()}),post:(t,n,i)=>e(void 0,void 0,void 0,function*(){const e=JSON.stringify(i),o=yield fetch(t,{method:"POST",headers:n,body:e});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},F="advertory:ppids-cache",V={[i.SE]:`SCH${i.SE.toUpperCase()}-EnvHash`,[i.NO]:`SCH${i.NO.toUpperCase()}-EnvHash`},U={[i.SE]:`SCH${i.SE.toUpperCase()}-UserHash`,[i.NO]:`SCH${i.NO.toUpperCase()}-UserHash`},H={[i.SE]:`sch${i.SE}-envhash-v3`,[i.NO]:`sch${i.NO}-envhash-v3`},W={[i.SE]:`sch${i.SE}-userhash-v3`,[i.NO]:`sch${i.NO}-userhash-v3`},K={[i.SE]:`'sch${i.SE}-iosid-v3'`,[i.NO]:`'sch${i.NO}-iosid-v3'`},G={[i.SE]:`sch${i.SE}-androidid-v3`,[i.NO]:`sch${i.NO}-androidid-v3`},J={[i.SE]:"sdrn:schibsted.com:user",[i.NO]:"sdrn:spid.no:user"};class Y{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 Q=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(t){return e(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||t("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},X=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(t,n){return e(this,void 0,void 0,function*(){var e,i,o,a,r,d,s,l,c,p,u;const v=A.get(F),g=yield this.getNewPPIDs(t,n);if(this.shouldHash(v,g)){const n=null!==(e=t.hasherUrl)&&void 0!==e?e:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,n);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(a=c.userId)&&void 0!==a?a:"",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,n;return null!==this.ppid1&&null!==this.ppid2||t("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:"",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 o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=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}}:{});A.set(F,o)}hashPPIDs(n,i){return e(this,void 0,void 0,function*(){try{const e=new Headers({"Content-Type":"application/json"});return yield R.post(i,e,n)}catch(e){return t("Error with hashing PPIDs",e),null}})}getNewPPIDs(t,n){return e(this,arguments,void 0,function*({clientId:t,instance:n},i){const o=yield((t,n)=>e(void 0,void 0,void 0,function*(){const e=yield t.getUserId();return e?`${J[n]}:${e}`:null}))(n,i),a=yield(t=>e(void 0,void 0,void 0,function*(){const e=yield t.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}))(n),r=window.advertory_idfv,d=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:t},userId:{plain:o},environmentId:{plain:a},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),d?{anId:{plain:d}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Z=n=>e(void 0,void 0,void 0,function*(){const{tracker:e,tcf:i,country:o,isMobileApp:a}=n;if(!(yield O(i,a,o,"setXandrPPIDs")))return;if(!e)return;(yield Promise.allSettled([Q.processPPIDs(e,null==i?void 0:i.timeout),X.processPPIDs(e,o)])).forEach((e,n)=>{if("rejected"===e.status){t(`Cannot fetch PPIDs v${n+2}`,e.reason)}})}),ee=e=>{const{ppid1:t,ppid2:n}=Q.getPPIDs(),{ppid1:i,ppid2:o,idfv:a,anId:r}=X.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Y).add(n,V[e]).add(t,U[e]).add(o,H[e]).add(i,W[e]).add(a,K[e]).add(r,G[e]).buildEids()}]}},te=e=>{const{ppid1:t,ppid2:n}=Q.getPPIDs(),{ppid1:i,ppid2:o,idfv:a,anId:r}=X.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Y).add(n,V[e]).add(t,U[e]).add(o,H[e]).add(i,W[e]).add(a,K[e]).add(r,G[e]).buildRyEids()}}]}}};const ne=new class extends T{prepare(n){return e(this,void 0,void 0,function*(){const o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getCountryCodeKeywords(i.SE)),this.getPublisherKeywords()),this.getPublisherGroup()),this.getPageTypeKeywords()),this.getSupplyTypeKeywords()),this.getAppTypeKeywords()),this.getDeviceKeywords()),this.getScreenKeywords()),yield this.getAdvertisingConsentKeywords()),this.getHasContextKeywords(n.keywords)),(()=>{const{ppid1:e,ppid2:t}=Q.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}})()),yield e(void 0,void 0,void 0,function*(){const{glimr:e}=m.get(),{addPublisherToGeo:n}={},i=yield L();if(!(null==e?void 0:e.enabled)||!i)return t("No consent for getting glimr tags."),{};const o=j(),a=q(n);return{[`${o}-geo`]:a.geoTags,[`${o}-weather`]:a.weatherTags,[`${o}-geofence`]:a.geofenceTags}})),n.keywords);return Object.assign(Object.assign({},n),{keywords:o,user:Object.assign(Object.assign({},ee(i.SE)),{externalUid:yield this.getExternalUid()}),member:this.getMember()})})}};var ie=ne.prepare.bind(ne);const oe="ABSOLUTE_FULLSCREEN",ae="ANY_FULLSCREEN",re="VERTICAL_FULLWIDTH",de="FULLWIDTH",se="TAKEOVER",le="VELVET_TAKEOVER",ce="WALLPAPER",pe="COLLAPSE",ue={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}]},ve={wallpaper:1600,"l-format":1600},ge=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Pe(e,ae)},he=e=>{const{native:t}=e;return!!t},me=e=>Pe(e,de),fe=e=>Pe(e,re),ye=e=>{const{targetId:t}=e;return t.includes("takeover")||Pe(e,se)},be=e=>Pe(e,se),we=e=>Pe(e,ce),xe=e=>Pe(e,pe),Ee=e=>e.targetId.includes("sponsorstripe"),ke=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Te=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),Ie=e=>e.targetId.startsWith("midboard"),Ae=e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,Se=e=>e.width>=1260&&e.width<=1280,Ce=e=>e.width>=1600&&e.width<=1620,Pe=(e,t)=>{const n=ue[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,a=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,r=t.width===o,d=!t.height||t.height===a;return r&&d})},Oe=e=>{const t=document.querySelector(`div[id="${e.targetId}"]`),n=document.querySelector(`div[id="div_utif_${e.targetId}"]`);t&&n&&me(e)&&(t.style.width="100%",t.style.height=`${e.height}px`,n.style.width="100%",n.style.height=`${e.height}px`),n&&(n.style.width="auto !important",n.style.height="auto !important",n.style.display="block")},Le="splash",$e="welcomePage",je="topscroller",Ne="velvet",ze=(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()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),a=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...a,o).toString()},_e="takeover-displayed",De="takeover-visit-count",Me=14400,qe=()=>{const e=y(De);return e?parseInt(e):0},Be=()=>{const{takeover:{enabled:e=!1,secondVisitEnabled:t=!1}={}}=m.get();return!window.location.href.includes("takeover=0")&&(!!window.location.href.includes("takeover=1")||!(!e||(()=>{var e;const t=(null===(e=m.get().takeover)||void 0===e?void 0:e.cookieCapName)||_e;return"true"===y(t)})())&&(!t||Re()))},Re=()=>{const e=qe();return 0===e?((()=>{const e=qe(),{takeover:{cookieCapTime:t=Me}={}}=m.get(),n=document.location.hostname;window.document.cookie=`${De}=${e+1}; max-age=${t}; domain=${n}; path=/`})(),!1):1===e},Fe=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ve=()=>{const{takeover:e}=m.get();return Boolean(null==e?void 0:e.topscroller)},Ue=()=>e(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{cookieCapName:t=_e,cookieCapTime:n=Me}={},isMobileApp:i,tcf:o,country:a}=m.get(),r=yield O(o,i,a,"ad-takeover-cookiecap");n&&r&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),He=e=>{var t;const n=!!(null===(t=m.get().takeover)||void 0===t?void 0:t.setCookieCapForNotShownAd);return ye(e)&&n},We=(e,t)=>{var n;if(t===je){const{topscroller:t}=e;return null!=t?t:{}}if(t===Le){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ke=(e,t)=>{t!==Le?(e=>{var t,n,i;const o=null===(n=null===(t=m.get().takeover)||void 0===t?void 0:t.welcomePage)||void 0===n?void 0:n.headerElementSelector,a=null===(i=m.get().takeover)||void 0===i?void 0:i.topscroller;if(!o||a)return;const r=document.querySelector(o),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=be(e)?"60svh":`calc(100svh - ${c}px)`,u=be(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=m.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 o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},Ge=ze([],()=>{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})}),Je={nativeAd:e=>he(e)&&!Ee(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:me,fullscreenScroll:ge,topscroller:e=>ye(e)&&Ve(),splash:e=>ye(e)&&Fe(e.width,e.height),welcomePage:ye,wallpaper:we,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Se,hFormat:Ce,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ce(e)&&!Se(e),topboard:e=>e.targetId.startsWith("topboard")&&!ye(e),widescreen:e=>e.targetId.startsWith("widescreen"),insider:e=>e.targetId.startsWith("insider"),sponsorstripe:Ee,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Te(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!Ie(e),outstream:Ae,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:Te,midboard:Ie},Ye=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const a=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!a)return;if(((e,t)=>{var n,i,o,a;const r=null===(a=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===a?void 0:a.invCode;r&&(t.dataset.invCode=r)})(o,a),null==t?void 0:t.testId)return void(a.dataset.testid=t.testId);const r="DIV"===(null==a?void 0:a.tagName);e&&r&&((e,t)=>{var n,i;for(const[o,a]of Object.entries(Je))if(a(e)){if("nativeAd"===o){const a="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:a}`;break}t.dataset.testid=o;break}})(e,a)},Qe=e=>{var t;return(null===(t=Object.entries(Je).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},Xe=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},Ze=(e,t=window.screen.width,n,i)=>{const o=Xe(e,t);n&&n(e,o);const a=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);a&&(a.style.transform=`scale(${o})`,a.style.transformOrigin="left top")},et=new Map;et.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),et.set("panorama",{scale:.79,transformOrigin:"center center"}),et.set("outstream",{scale:.79,transformOrigin:"center center"}),et.set("integration",{scale:.79,transformOrigin:"center center"}),et.set("toppanorama",{scale:.8,transformOrigin:"left center"});const tt=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=Qe(e),o=et.get(i),a=document.querySelector(`#${e.targetId}`);if(!a||!o)return;if(a.style.transformOrigin=o.transformOrigin,a.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const r=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==a?void 0:a.offsetWidth;r&&"number"==typeof d&&!isNaN(d)&&r.style.setProperty("right",String(-1*d*.2)+"px")},nt={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{if(ge(e)||fe(e)||Ze(e,void 0,Oe),Ae(e)){const t=document.querySelector(`#${e.targetId}`);null==t||t.classList.add("outstream")}},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}};class it{initialize(){this.DATA=Object.assign({},it.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)}}it.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const ot=new it,at=()=>(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),rt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),dt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={}}=m.get(),o=[`${j()}-geo`],a=["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?o:[]],r=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:r}}},d)}},st=(t,...n)=>e(void 0,[t,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const a=()=>{d(),n()},r=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{o.removeEventListener("load",a),o.removeEventListener("error",r),clearTimeout(s)};o.addEventListener("load",a),o.addEventListener("error",r);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),lt=e=>e.includes("snoap.no"),ct=e=>{var t,n,i,o,a;return!!(null===(a=null===(o=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===o?void 0:o.ads[1])||void 0===a?void 0:a.rtb)},pt=ze([],()=>{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:o,clientHeight:a}=i,r=e/o,d=t/a;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}),ut=e=>{const t=ze([],()=>{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},vt=[],gt={},ht=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=ft(e);n?(mt(i,n),yt(e,i,t)):(mt(i,n),bt(e,i,t))})},mt=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const a=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${a}-${e}`,"*")},ft=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},yt=(e,t,n)=>{e.classList.add("in-screen"),document.body.classList.add("fullscreen-scroll-in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),vt.includes(t)||vt.push(t),n&&window.addEventListener("scroll",gt[t],{passive:!0})},bt=(e,t,n)=>{vt.includes(t)&&(n&&window.removeEventListener("scroll",gt[t]),document.body.classList.remove("fullscreen-scroll-in-screen"),e.classList.remove("in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},wt=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,a=[],r=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&a.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&r.push(t)}),()=>{a.length&&xt(e,a,o,0),r.length&&xt(e,r,o,40)}},xt=(e,t,n,i)=>{const o=e.offsetHeight,a=window.scrollY,r=e.getBoundingClientRect().top+a;t.forEach(e=>{const t=e.offsetHeight;let d;d=r>a?(r-a)/t-i:(a+t-(r+o))/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 Et(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}Et('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 kt={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 Tt=null;const It=(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=`(${pt})()`,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(lt(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=ut(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>lt(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)),lt(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)),ct(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},At=()=>{Tt=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},St=()=>{Tt||(Tt=window.requestAnimationFrame(At))},Ct=(e,t)=>{var n,i,o,a;const{country:r}=m.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:o="16px 0",beforeContentValue:a=""}=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: ${o};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${a&&"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: '${a}' !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 s=document.getElementById(d),l=null==s?void 0:s.parentElement;if(!s||!l)return;((e,t)=>{const n=(null==t?void 0:t.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>ht(e,n),{}),o=ft(e);i.observe(e),n&&(gt[o]=wt(e,t))})(l,t),s.className="advertory-fullscreen-scroll";const c=Pe(e,oe)?"absolute":"fixed";s.style.position=c,l.className="advertory-fullscreen-scroll-wrapper",l.dataset.showTagSubscribeId=d,s.setAttribute("data-ad-label",kt[r].adText),(null==t?void 0:t.moveCogwheelToTheLeft)&&(s.dataset.moveCogwheelToTheLeft="true"),St(),window.addEventListener("resize",St),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",St),null===(a=window.visualViewport)||void 0===a||a.addEventListener("scroll",St)},Pt=({targetId:e})=>{const t=(e=>{const{requests:t}=window.apntag,n=ct(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=ct(e)?1:0;n&&(n.tags[e].adResponse.ads[i].rtb.banner.content=t)})(e,It(t,e))},Ot=()=>e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:n,country:i,isMobileApp:o,fullscreenScroll:a}=m.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=m.getHandlers(),{getConsentAsync:s}=d(n,o,i),l=yield s(),c=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=at(),{prebid:{relevantCbTimeout:a}={}}=m.get(),r="relevantCb"===i&&a?a:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},r);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),p=at(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=at();return{user:e,keywords:t}})();c.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=rt();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(c.getCancel()||!p.loadTags)return t("core loadTags() call was cancelled",{cancel:c.getCancel(),apnTagLoadTags:!p.loadTags,condition:"or"}),void c.cleanup();const n=rt();c.events.relevantCb.done=!0,c.failsafeOnTimeout("auctionCb");const o=l?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};t("prebid consentManagement",o),n.addPrebidConfig(Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},te(i)),dt(g,v))),t("core add prebid config",Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},te(i)),dt(g,v))),n.loadPrebid({configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{c.getCancel()||(c.events.auctionCb.done=!0,p.loadTags(e)),c.cleanup()}},customNativeRender:e=>{Lt(e,r)},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});ge(d)&&(Ct(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))}}),t("core load prebid",{configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{c.getCancel()||(c.events.auctionCb.done=!0,p.loadTags(e))}},customNativeRender:e=>{Lt(e,r)},directRenderFn:()=>{}})})}),Lt=(e,t)=>{var n;const{divId:i,native:o,bid:a}=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:o,targetId:d},m.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:a.adId}),"*")},$t="0123456789abcdefghijklmnopqrstuvwxyz",jt=()=>Promise.resolve(),Nt=()=>{},zt=e=>{window.apntag.anq.push(e)},_t=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),Dt=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})}),Mt=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};let qt="";const Bt=new Map,Rt="advertory-wallpaper-background",Ft=()=>{const e=document.querySelector(`.${Rt}`);e&&e.remove()},Vt=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,Ut=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")&&Ft())},Ht=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"))},Wt=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`)},Kt=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=ot.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},Gt=()=>{Ft();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{Ut(e.id),Kt(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=Mt(e.id)}),zt(()=>window.apntag.clearRequest())},Jt="noGroupedPlacements",Yt=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Qt=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Xt=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:o}=m.get(),a=n[o].filter(Qt)||[],r=e?document.querySelector(e):document;if(!r)return[];const d=a.reduce((e,t)=>{const n=Yt(t.id);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=a.filter(({id:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDevice)?`div[id^="${e}"][data-device=${o}], 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=Zt(e,t,n),o=`${e.id}-${((e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++)t+=$t[Math.floor(36*Math.random())];return t})(6)}`;return e.id=o,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&&ot.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:o})});return(e=>{const{keywordsConfig:t}=m.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(qt!==window.location.pathname&&(Bt.clear(),qt=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[`${N()}-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)},Zt=(e,t,n)=>{const i=n[t],o=n[n.length-1],a=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==o?void 0:o.id)?o:a||o},en=e=>{const{queryConfig:{placementBatches:t}={},deviceType:n}=m.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),a=(e=>{const t={};return e.forEach(e=>{const n=Mt(e.id);e.isBackfill&&(t[n]=[e])}),t})(e),r=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(Mt(e.id)));return n})(e,i),d=Object.keys(a),s=((e,t)=>e.filter(e=>!t.has(Mt(e.id))))(e,new Set([...d,...o]));return Object.assign(Object.assign(Object.assign({},r),a),{[Jt]:s})},tn=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[a,r]=t;if(!i.dataset.lockedsize&&r&&a)i.style.width=`${a}px`,i.style.height=`${r}px`,n&&(o.resizeAd(i.id,[a,r]),i.dataset.lockedsize="true",i.dataset.lockedwidth=a.toString(),i.dataset.lockedheight=r.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},nn=["netboard","board"];class on{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,a=(()=>{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",o),a&&d.searchParams.append("urlData",a),r&&d.searchParams.append("excludedItems",r),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(n){return e(this,void 0,void 0,function*(){var e,i;const o=yield this.identityFacade.getIdentityUser(),a=null!==(i=yield null===(e=this.tracker)||void 0===e?void 0:e.getEnvironmentId())&&void 0!==i?i:"",r=(null==o?void 0:o.userId)?String(o.userId):"",d=this.buildUrl(n,{envId:a,spid:r});try{t("Starting fetching DrEdition ad from URL:",d);const e={method:"GET"},n=yield R.get(d,e);return t("Fetch operation completed successfully."),n}catch(e){t("Error during fetch operation:",e)}return null})}}let an=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:a}=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:o,utm_medium:d},a&&{utm_id:`df-${a}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),a=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||a.set(e,null!=t?t:"")}),a.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 o=this.getDrEditionUTMParams(e,t),a=new URL(i);return Object.entries(o).forEach(([e,t])=>{a.searchParams.has(e)||a.searchParams.set(e,null!=t?t:"")}),a.toString()}handleVideo(t,n){return e(this,void 0,void 0,function*(){const{id:e,autoplay:i,mute:o,videoLoop:a,vendor:r}=n.videoConfiguration;t.classList.add("vgtv-video-container"),Object.assign(t.dataset,{vgtvVideoId:e,vgtvVendor:r,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!a,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:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const a=o.split("/");return a.length?[...a.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const rn=e=>{const n=e.parentElement;n?n.classList.remove("dr-edition-lock-height"):t("Dr. Edition container does not have a parent element, cannot remove height lock.")};class dn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(n,i){return e(this,void 0,void 0,function*(){var e,o;const{drEditionConfig:{containerSelector:a},renderAsBackfill:r=!1}=i,d=n.querySelector(a);if(!d)return void t(`Container with selector "${a}" not found.`);const s=yield this.drEditionService.fetchData(i);return(null==s?void 0:s.itemId)||r?!(null==s?void 0:s.itemId)&&r?(t("No Dr. Edition ads available to render. Collapsing whole placement."),Ut(n.id),void rn(d)):((null==s?void 0:s.itemId)&&r&&(t("Dr. Edition ad available to render as a Xandr backfill."),Ht(n.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(d,s,i),yield null===(e=this.videoManager)||void 0===e?void 0:e.handle(s,i),rn(d),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(n,s,i),null===(o=n.querySelector("a"))||void 0===o||o.addEventListener("pointerup",()=>null)):rn(d))):(t("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(d),this.showBackfill(n),void rn(d))})}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:"";Ht(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const a=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{a.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{a.observe(e)}),!0}}class sn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(t,n,i){return e(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:e}=d(i.tcf,i.isMobileApp,i.country),o=yield e(),a=i.device===b.MOBILE?n.mobileHTML:n.desktopHTML;const r=o?a:a.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");t.innerHTML=r,t.querySelectorAll("a").forEach(e=>{var t,o,a;e.search=null!==(a=null===(o=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(t,e,n,i))&&void 0!==a?a:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,i)})})}}class ln{constructor(e){this.strategy=e}handle(t,n){return e(this,void 0,void 0,function*(){const{videoConfiguration:{id:e,preview:i}={}}=t;(e||i)&&(yield this.importScript(n),yield this.createVideoElement(t,n))})}importScript(n){return e(this,void 0,void 0,function*(){const e=n.drEditionConfig.videoScriptUrl,i=document.querySelector(`script[src="${e}"]`);if(e&&!window.autoplayQueue&&!i)try{yield st(e)}catch(e){t("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(t,n){return e(this,void 0,void 0,function*(){const e=document.createElement("div"),{node:i}=t.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(t,n))return;this.strategy.handleVideo(e,t),null==o||o.appendChild(e),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const a=null==o?void 0:o.parentNode;if(!a)return;const r=a.closest("a");a.addEventListener("click",e=>{const t=e.target.closest("a");r!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:a,thumbnail:r}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!a)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",a),d.setAttribute("playsinline",""),!(!d||!r)&&(null===(o=(i=t.drEditionConfig).addPreviewVideo)||void 0===o||o.call(i,d),!0))}}let cn=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,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(t,n,i){return e(this,void 0,void 0,function*(){var e,o,a,r,d,s,l,c;if(!this.pulse)return;const p=this.getEventInput(t,n,i,"view");(null===(e=this.pulse)||void 0===e?void 0:e.trackLegacyViewUIElement)?null===(a=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===a||a.call(o,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(t,n,i){return e(this,void 0,void 0,function*(){var e,o,a,r,d,s;if(!this.pulse)return;const l=this.getEventInput(t,n,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(e=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(e,l):this.pulse.trackClickUIElement?null===(r=(a=this.pulse).trackClickUIElement)||void 0===r||r.call(a,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class pn extends cn{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:o="",creativeId:a}={}}=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:o,"spt:creativeId":a},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let un=class extends cn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,a,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===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===a?void 0:a.call(o))&&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 o,a,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===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===a?void 0:a.call(o,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 vn={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"},gn={FRONT:"front"},hn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},mn=t=>e(void 0,void 0,void 0,function*(){var e,n;return(null===(e=null===window||void 0===window?void 0:window.SVP)||void 0===e?void 0:e.Player)?new window.SVP.Player(t):((()=>{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(t):yield new Promise(e=>{window.addEventListener("onSvpPlayerReady",()=>e(new window.SVP.Player(t)))}))}),fn={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 e(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Ho})})}})}},yn=(e,t)=>{null==e||e.forEach(e=>{fn[e](t)})};class bn{handleVideo(t,n){return e(this,arguments,void 0,function*(t,{videoConfiguration:{id:n,node:i,autoplay:o,mute:a,vendor:r}}){yield e(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 d=["ContentMutePlugin"],s=this.createPlayerOverlay(t);yn(d,s);const l={id:n,node:i,autoplay:o,mute:a,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},c=yield mn(l);c.once("assetReady",()=>{hn(c,d)}),c.once("ready",()=>{const e=t;new MutationObserver(t=>{t.forEach(({type:t,attributeName:n})=>{"attributes"===t&&"class"===n&&(e.classList.contains("jw-state-playing")?s.classList.add("is-playing"):s.classList.remove("is-playing"),e.classList.contains("jw-flag-user-inactive")?s.classList.add("is-inactive"):s.classList.remove("is-inactive"))})}).observe(e,{attributes:!0,attributeFilter:["class"]})}),c.once("PulseStats:ready",()=>e(this,void 0,void 0,function*(){const e=yield c.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===gn.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),o=i.split("/").filter(Boolean);return o.length?[...o.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 wn="https://www.aftonbladet.se/video-player-extras/latest/";class xn{handleVideo(t,n){return e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:a}}){const r={id:t,node:n,autoplay:i,mute:o,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${wn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${wn}external-link.js`]:{name:"ExternalLink"}}};yield mn(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 En=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class kn{handleVideo(t,n){return e(this,arguments,void 0,function*(t,{videoConfiguration:{id:n,node:i,autoplay:o,mute:a,vendor:r}}){const d={id:n,node:i,autoplay:o,mute:a,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},En(e)?e:{}),{provider:Object.assign(Object.assign({},En(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-${n}`]},requestSettings:{}}}},s=yield mn(d);s.once("PulseStats:ready",()=>e(this,void 0,void 0,function*(){const e=yield s.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===gn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let Tn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const In=(e,t,n)=>{var o;const{publisher:a,pageType:r,country:d}=e,s={[vn.VG]:new an,[vn.E24]:new bn,[vn.AFTONBLADET]:new xn,[vn.SVD]:new kn}[a]||new Tn,l=new(d===i.SE?pn:un)(n,s,r),c=new on(t,null!==(o=null==n?void 0:n.pulseTracker)&&void 0!==o?o:n),p=new sn(s,l),u=new ln(s);return new dn(c,p,u,l)},An=()=>e(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 Sn{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 e(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 t("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return e(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 Cn=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig,o=document.querySelectorAll(i),a=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const a=In(n,i,o);e.forEach(e=>{var i,o,r;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=d.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(r=d.dataset.pulsePrimaryposition)&&void 0!==r?r:"";a.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>a.observe(e))},Pn=[],On=(n,i)=>e(void 0,void 0,void 0,function*(){var e;const{pulse:o,tcf:a,deviceType:r,drEdition:d,publisher:s,pageType:l,country:c,isMobileApp:p}=n;if(!(yield O(a,p,c,"handleDrEditionBackfill")))return;const u=((e,t)=>{var n;const{deviceType:i,placements:o,drEdition:{fallbackGlobalEditionName:a}={}}=e,r=o[i]||o.desktop,d=Mt(t.targetId),s=r.find(e=>e.id===d),l=nn.some(e=>d.startsWith(e)),c=Pn.includes(d),p=(null===(n=null==s?void 0:s.drEdition)||void 0===n?void 0:n.editionName)||a;return s&&l&&!c&&p?(Pn.push(d),Object.assign(Object.assign({},s),{drEdition:Object.assign(Object.assign({},s.drEdition),{editionName:p})})):null})(n,i);if(!u)return;if(!(null==o?void 0:o.instance))return void t("Pulse has not been passed as a prop, aborting");const v=yield An(),g=new Sn(v),h=In({publisher:s,pageType:l,country:c},g,null==o?void 0:o.instance),m=document.getElementById(i.targetId);if(!m||!d)return;m.classList.value="";const f=document.createElement("div");f.className=d.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=f.outerHTML;const y={editionName:(null===(e=null==u?void 0:u.drEdition)||void 0===e?void 0:e.editionName)||"",drEditionConfig:d,device:r,tcf:a,isMobileApp:p,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,y)}),Ln="collapseAd",$n="hideAd",jn="resizeAd",Nn="renderDrEditionFallback",zn="wallpaperImageUrl",_n="wallpaperColor",Dn="velvet",Mn=[jn,zn,_n,Ln,$n,Nn,Dn];let qn;const Bn=e=>{if("object"==typeof e)return e;if(t=e,Vt.test(t)){const t=e.replace(/^wallpaper:url:/,"");return{name:zn,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(Nn)){const t=e.split(":")[1];return{name:Nn,targetId:t}}if(e.startsWith(Ln)||e.startsWith($n)){const t=e.split(":")[1];return{name:Ln,targetId:t}}if(e.includes("name")&&Mn.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}},Rn=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=Bn(t);if(!n)return;if(!n.name||!Mn.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:a,wallpaperColor:r,cmd:d,size:s}=n;i===Dn&&d&&(d.includes("noScroll")&&(qn=(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==qn||qn(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==Ln&&i!==$n||!o||Ut(o),i===jn&&o&&d&&tn(o,d),i===Nn&&o&&(Ut(o),On(m.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&tn(o,s,!0),i===zn&&a&&(e=>{const t=document.querySelector(`.${Rt}`);t&&(t.style.backgroundImage=`url(${e})`)})(a),i===_n&&r&&(e=>{const t=document.querySelector(`.${Rt}`);t&&(t.style.backgroundColor=e)})(r)},Fn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Vn=(n,i)=>{if(ke(i))return t(`loading finn blink ad with full ads chain for ${i}`),void(()=>{const{publisher:t,country:n,finnBlink:i}=m.get(),{loadFinnBlinkAd:o,wallpaperHandlers:{adjustAdToHorseshoe:a}}=m.getHandlers(),r=window.apntag,d={publisher:t,country:n,finnBlink:i},s=e=>{Ht(e),zt(()=>r.showTag(e))};return{withXandrAd:s,withFinnBlinkAd:t=>e(void 0,void 0,void 0,function*(){yield o(t,d,null)}),withFullAdsChain:t=>e(void 0,void 0,void 0,function*(){yield o(t,d,s,()=>{ot.getData("horseshoe").isAvailable&&a(t)})})}})().withFullAdsChain(i);zt(()=>(t("core showTag",{id:i}),n.showTag(i)))},Un=(n,i)=>e(void 0,void 0,void 0,function*(){yield _t,yield Dt;const e=new IntersectionObserver((e,n)=>((e,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,a=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),r=document.getElementById(a);t("core log from intersection observer handler",{targetId:a,element:r}),i(window.apntag,a),r&&(n.unobserve(r),n.disconnect())})})(e,n,Vn),Fn(i));e.observe(n)}),Hn=new Map,Wn=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Kn=".brandstudio-premium-content-widget",Gn=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Jn=({adWrapper:e,placementContainer:t})=>{const n=Gn({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),Kt(i=t),i.innerHTML=""},Yn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Qn=({adWrapper:e,placementContainer:t})=>{const{publisher:n}=m.get(),i=Wn.includes(n)&&Boolean(t.closest(Kn));const o=i?t.closest(Kn):null,a=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&&!o)return;if(r)return Yn(e),void a.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?Yn(d):s.hasAttribute("style")&&Yn(s),a.disconnect()})})});try{a.observe(t,{childList:!0,subtree:!0})}catch(e){a.disconnect()}},Xn=(e,t,n,i,o,a)=>{var r;const d=performance.now(),s=null!==(r=Hn.get(t))&&void 0!==r?r:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(Hn.set(t,d),((e,t,n)=>{const i=null==n?void 0:n.parentElement;i&&n&&Jn({adWrapper:i,placementContainer:n}),zt(()=>{e.setKeywords([t],{[`${j()}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,a))},Zn=(e,t,n,i)=>{const o=new IntersectionObserver((e,t)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:a}=e;t(window.apntag,o.id,a.y,n,i,o)})})(e,Xn,n,i),Fn(t));o.observe(e)},ei=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},ti=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),ni=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},ii=(e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;Qn({adWrapper:o,placementContainer:i});const{delayTime:a=1e3}=t,r=(new Date).getTime();if(i&&"true"!==i.dataset.subscribedForRefresh){const e=(e=>{var t;const{deviceType:n,preloadMarginsConfig:i}=m.get(),o=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,o,a,r,d,s;return{high:{refreshMargin:null!==(i=null==e?void 0:e.refreshMargin)&&void 0!==i?i:600,renderMargin:null!==(o=null==e?void 0:e.renderMargin)&&void 0!==o?o:300},normal:{refreshMargin:null!==(a=null==t?void 0:t.refreshMargin)&&void 0!==a?a: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}}})(o)).refreshMargin})(i);i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Zn(i,e,r,a)}},oi=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=m.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),li(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},ai=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t;return e.id===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&e.bfCacheRefresh}),a=null==i?void 0:i.threshold;ni(o,a)&&i&&(Wt(i.id),n.length&&o.classList.remove(...n),li([i],t))}},ri=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},isMobileApp:i}=m.get();t&&(e.forEach(({id:e})=>{const t=di(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{ai(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),ai(e,!1,t))};n.persisted&&(ti()?window.addEventListener("scroll",i,{passive:!0}):ai(e,!1,t))})})(e,n))},di=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},si=e=>{const{id:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(di(t)),o=(e=>1===e[0]&&1===e[1])(i),a={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(a.native=void 0),a},li=(e,t=!1)=>{const{requestSize:n=g}=m.get(),i=e.map(({id:e})=>e),o=ei(i,n);if(t)for(const t of e){const e=si(t);window.apntag.modifyTag(t.id,e)}for(const e of o)zt(()=>window.apntag.refresh(e))};const ci="#fff",pi="#0098da",ui=(e,t=!0)=>{(e===$e||e===je)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},vi=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},gi=e=>{document.body.style.overflow=e?"initial":"hidden"},hi=e=>{const t=fi(e),n=mi(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),gi(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},mi=e=>{const t=()=>hi(e);return window.addEventListener("advertory:closeTakeover",t),vi(),t},fi=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&hi(e)};return vi(),window.addEventListener("keydown",t),t},yi=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(fi(e),mi(e),vi(),t.addEventListener("click",()=>{hi(e)}),gi(!1))},bi=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),mi(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},wi=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>hi(e))})(e)},xi=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=m.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=kt.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Ei=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=kt.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},ki=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=kt.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Ti=e=>{e.classList.toggle("advertory-impact-wrapper",!0)},Ii=()=>{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)},Ai=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${Ge})()`,e+t.outerHTML})(e)),n},Si=e=>{const t=(e=>{const{requests:t}=window.apntag,n=ct(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=ct(e)?1:0;n&&(n.tags[e].adResponse.ads[i].rtb.banner.content=t)})(e,Ai(t))},Ci=t=>e(void 0,void 0,void 0,function*(){const{takeover:e}=m.get(),{targetId:n}=t,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!e)return;const a=(e=>{const{width:t,height:n}=e;return Fe(t,n)?Le:Pe(e,le)?Ne:Ve()?je:$e})(t),r=o.offsetHeight,d=window.scrollY>r;o.style.display="block",!d&&ui(a,!1),((e,t)=>{({[$e]:ki,[Le]:xi,[je]:Ei,[Ne]:Ti})[t](e)})(o,a),Ii(),((e,t)=>{({[$e]:bi,[je]:bi,[Le]:yi,[Ne]:wi})[t](e)})(o,a),((e,t,n)=>{if(!n)return;({[$e]:()=>{const{buttonLabel:i}=We(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:"")})},[Le]:()=>{const{themeColors:i,logotype:o,buttonLabel:a,showArrowIcon:r}=We(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!=a?a:""),".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&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:ci,"important"),n.style.color=null!=t?t:pi}}})},[je]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:a=!0}=We(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||a||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[Ne]:()=>{}})[t]()})(o,a,e),yield Ue(),!d&&ui(a,!0),Ke(t,a)});Et(".advertory-brandmetrics-survey{width:100%}");const Pi="advertory-brandmetrics-survey",Oi=()=>e(void 0,void 0,void 0,function*(){const{norstat:{enabled:t}={},country:n,isMobileApp:o,tcf:a}=m.get(),r=yield O(a,o,n,"norstat");if(!t||o||!r)return;const d=(e=>{const{ppid1:t,ppid2:n}=Q.getPPIDs(),{ppid1:i,ppid2:o}=X.getPPIDs(),a=(new Y).add(n,V[e]).add(t,U[e]).add(o,H[e]).add(i,W[e]);return`${a.buildNorstatPath()}?${a.buildNorstatQuery("alias").toString()}`})(n);((t,n,...i)=>{e(void 0,[t,n,...i],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/${n===i.NO?"schibsted":"schibstedse"}/map/${d}`,"norstat")}),Li=(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,$i=e=>`externalImpId:'${e}'`,ji=e=>{var n;const{forwardExternalImpId:i=!1,tracker:o}=m.get(),a=(e=>{var t;if(!e.positionConfig)return e;const n=e.keywords[`${N()}-count`],i=e.positionConfig.find(e=>e.adPositionIndex===n);if(!i)return e;const o=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:o})})(e),{id:r,sizes:d,keywords:s,allowedFormats:l,invCode:c,ssa:p=!1,nativeCustomProperties:u,safeframeConfig:v,resizeAdParentDiv:g=!1,dynamicSizeWidthCheck:h=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||Be())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!==je),o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),a=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:a,keywords:o})})(a),f=Object.assign({invCode:c,sizes:d,targetId:r,keywords:Li(s,p),allowedFormats:l,resizeAdParentDiv:g,dynamicSizeWidthCheck:h},v&&{safeframeConfig:v}),y=(e=>{var n,i,o,a,r,d,s;return e?(null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)?(null===(o=null===(i=null==e?void 0:e.instance)||void 0===i?void 0:i.state)||void 0===o?void 0:o.pageViewId)?(t("Tracker state pageViewId is:",null===(r=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===r?void 0:r.pageViewId),null===(s=null===(d=null==e?void 0:e.instance)||void 0===d?void 0:d.state)||void 0===s?void 0:s.pageViewId):(t("Tracker state does not contain field pageViewId or it is empty"),""):(t("Tracker state is empty"),""):(t("Tracker is not configured in initAdvertory function"),"")})(o);i&&y&&(t("External Impression ID assigned to defineTag:",$i(y)),f.externalImpId=$i(y));const b=(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===(n=e.allowedFormats)||void 0===n?void 0:n.includes("native"))&&(f.native=b),f},Ni=e=>!e.includes("takeover")||Be(),zi=e=>{const{source:t}=e;return"csm"===t},_i="native-ad",Di=e=>{if(!e)return e;const t=e[`${j()}-targetid`],n=t?Mt(t[0]):"";return Object.assign(Object.assign({},e),t&&{[`${j()}-targetid`]:[n]})},Mi=e=>Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${j()}-geo`]&&{[`${j()}-geo`]:["geo-test-value"]}),e[`${j()}-geofence`]&&{[`${j()}-geofence`]:["geofence-test-value"]}),e[`${j()}-weather`]&&{[`${j()}-weather`]:["weather-test-value"]}),qi=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],o=e.find(e=>e.invCode===i),a=document.querySelector(`[id^=${null==o?void 0:o.id}]`);a&&a.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"})})()},Bi=(t,n)=>e(void 0,void 0,void 0,function*(){return yield new Promise(e=>{t().then(t=>{e(null!=t?t:null)}).catch(t=>{e(null)})})}),Ri=()=>e(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)}}),Fi={arrayMerge:(e,t)=>t},Vi=n=>e(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))})(n))return n;try{const i=yield(n=>e(void 0,void 0,void 0,function*(){const e=(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})(n);if(!e)return null;const i=new AbortController,o=setTimeout(()=>i.abort(),5e3);try{return yield R.get(e,{method:"GET",signal:i.signal})}catch(n){throw t("Failed to fetch S3 config",{error:n,url:e}),n}finally{clearTimeout(o)}}))(n);return i?(({siteConfig:e,configOverrides:t})=>{var n;const{keywords:i,refresh:o,placements:a,threshold:r,batchSize:d}=t,s=p.all([e.placements,a],Fi),l=p(e.pageOptions,{keywords:i},Fi),c=p(e.appearanceConfig,{defaultThreshold:r},Fi),u=p(null!==(n=e.refreshConfig)&&void 0!==n?n:{},{scrollRefreshEnabled:o},Fi);return Object.assign(Object.assign({},e),{placements:s,requestSize:null!=d?d:e.requestSize,pageOptions:l,appearanceConfig:c,refreshConfig:u})})({siteConfig:n,configOverrides:i}):n}catch(e){return t("Error fetching S3 config, using site config",{error:e}),n}}),Ui=".advertory-right-column-track",Hi="--advertory-right-column-track-height",Wi=e=>e.getBoundingClientRect().top+window.scrollY,Ki=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Gi=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},Ji=(e,t)=>`${e}-${t}`,Yi=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),a=(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===a.length)return;const r=Wi(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ki(e);Gi("--advertory-newsroom-header-height",t)})(),a.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=Wi(e),o=Ji(Hi,t),a=i-n,r=Ji("--advertory-right-column-split-point-height",t),d=Ki(e);Gi(o,a),Gi(r,d)})(e,t+1,r),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Ji("--advertory-right-column-ad-height",t),i=Ki(e);Gi(n,i)})(o[t])});((e,t)=>{const n=Wi(e);Gi(Hi,n-t)})(a[Math.min(o.length,a.length-1)].point,r)};let Qi=!1;class Xi{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:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const a=o.split("/");return a.length?[...a.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class Zi{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class eo{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(t){return e(this,void 0,void 0,function*(){var e,n,i,o,a,r,d,s;if(!this.pulse)return;const l=this.getEventInput(t,"view");(null===(e=this.pulse)||void 0===e?void 0:e.trackLegacyViewUIElement)?null===(i=null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)||void 0===i||i.call(n,l):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(r=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===r||r.call(a,l):null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackElementView)||void 0===s||s.call(d,l)})}trackContentClick(t){return e(this,void 0,void 0,function*(){var e,n,i,o,a,r;if(!this.pulse)return;const d=this.getEventInput(t,"click");this.pulse.trackLegacyClickUIElement?null===(n=(e=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(e,d):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,d):null===(r=(a=this.pulse).trackElementClick)||void 0===r||r.call(a,d)})}}class to extends eo{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,a,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!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o: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===(a=this.newsroomStrategy)||void 0===a?void 0:a.getTags)||void 0===r?void 0:r.call(a,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 no="[data-k5a-teaser-analytics]",io=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new to(e,t,n),a=new WeakMap,r=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(no);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),r(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(no);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),r(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class oo{handleKilkayaStreamTracking({pulse:e,pageType:t,publisher:n}){if(!(null==e?void 0:e.instance))return;const i={[vn.VG]:new Xi}[n]||new Zi;io(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 n;const i=null===(n=null==e?void 0:e.detail)||void 0===n?void 0:n.streamSlot;if(!i)return;const o=i.parentElement;o&&(t(`Kilkaya placement ${i.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(o))})}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:"";Ht(i)}loadKilkayaScript(t){return e(this,void 0,void 0,function*(){yield st(t)})}run(t){return e(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:n,country:i,kilkaya:o}=t;if(!(null==o?void 0:o.enabled))return;const a=yield O(e,n,i,"kilkaya");a&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(a),yield this.loadKilkayaScript(o.url),this.handleKilkayaStreamTracking(t))})}}let ao,ro=[];const so=["takeover","wallpaper"],lo=e=>{const t=(e=>{const t=ot.getData("alertoryConfigKeywords"),{queryConfig:n,placements:i,tcf:o,glimr:a,appearanceConfig:r,requestSize:d=g,publisher:s,country:l,pageType:c,deviceType:p,isMobileApp:u=!1,pageOptions:{member:v},takeover:h,fullscreenScroll:m,useAppTabletInvCode:f}=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:o,requestSize:d,isMobileApp:u,useAppTabletInvCode:f},a&&{glimr:a}),n&&{queryConfig:n}),r&&{appearanceConfig:r}),h&&{takeover:h}),m&&{fullscreenScroll:m})}})(e);window.advertory={initialized:!0,siteConfig:e,alertoryConfig:t}},co=()=>e(void 0,void 0,void 0,function*(){const{pageOptions:t}=m.get(),{preparePageOptions:n}=m.getHandlers(),i=(()=>{const{sandboxAdIframeEnabled:e=!0}=m.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"]}})(),o=yield e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get();return(yield O(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),a=yield n(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},t),{renderingManagement:Object.assign({},i)}),o));(e=>{const t=ot.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Mi(e);ot.setData("alertoryConfigKeywords",n)})(a.keywords),zt(()=>ao.setPageOpts(a))}),po=n=>e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:i,isMobileApp:o,country:a}=m.get();uo(n);const r=yield O(i,o,a,"prebid");(null==e?void 0:e.enabled)&&r?(t("core loadPlacements prebid enabled"),yield Ot()):(t("core load tags invoked without prebid enabled"),vo(n))}),uo=e=>{const{prepareTag:n}=m.getHandlers(),i=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.id.includes(t)),o=t.findIndex(e=>n.id.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{t("core defineTags",{placement:e});const o=ji(e);if(Ni(e.id)){const a=n(o),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Di(i),sizes:o}})(a);i.push(r),zt(()=>(t("core defineTag - add to the queue",{placement:e,preparedTag:a}),ao.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)})(i)},vo=e=>{const n=e.filter(({id:e})=>Ni(e)).map(({id:e})=>e);n.length&&zt(()=>(t("core loadTags",{placementsIdsToLoad:n}),ao.loadTags([...n])))},go=(n,i)=>e(void 0,void 0,void 0,function*(){const{appearanceConfig:e,deviceType:o}=m.get(),{threshold:a,refresh:r,priority:d="normal"}=n,s=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(i),l=null==e?void 0:e.defaultThreshold[o];s&&(t("core showAd - subscribe for show tag with thresholds",{placement:n,adObj:i,threshold:a,deviceDefaultThreshold:l}),yield Un(s,null!=a?a:l)),s&&r&&(t("core showAd - setup refreshing",{placement:n,adObj:i}),s.dataset.refresh=r.toString(),s.dataset.priority=d)}),ho=e=>e.some(({id:e})=>so.some(t=>e.includes(t))),mo=n=>e(void 0,void 0,void 0,function*(){var e;if(!(null===(e=null===window||void 0===window?void 0:window.advertory)||void 0===e?void 0:e.initialized))return;const{requestSize:i=g}=m.get(),o=en(n);for(const e of Object.keys(o)){const n=o[e],a=ei(n,i);for(const e of a)ho(e)?(t("core loadAds without lazy loading",{placementsToLoad:e}),yield po(e)):e.length&&(t("core loadAds with lazy loading",{placementsToLoad:e}),yield fo(e))}}),fo=n=>e(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:e=!1,rootMargin:i="200% 0px"}={}}={}}=m.get(),o=[];if(!e)return t("lazy load is not enabled",{placements:n}),void(yield po(n));const a=new IntersectionObserver((e,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{t("lazy load is enabled - handler start",{loadedPlacementIds:o,placements:n});const a=n.every(e=>o.includes(e.id)),r=n.map(e=>e.id);!a&&o.push(...r),!a&&po(n),t("lazy load is enabled - handler stop",{loadedPlacementIds:o,placements:n,arePlacementsLoaded:a,placementIds:r}),i.disconnect()})},{rootMargin:i});n.forEach(e=>{const n=document.getElementById(e.id);n&&(t("lazy loading - observe element",{placementId:e.id,element:n}),a.observe(n))})}),yo=()=>e(void 0,void 0,void 0,function*(){const{siteEvents:n,initNativeAd:i,wallpaperHandlers:{initWallpaperAd:o,adjustAdToHorseshoe:a}}=m.getHandlers(),{wallpaper:r,fullscreenScroll:d}=m.get(),s=[];zt(()=>{ao.onEvent("adRequested",()=>{n.adRequested()}),ao.onEvent("adAvailable",a=>e(void 0,void 0,void 0,function*(){var e,s,l,c,p,u;t("core adAvailable start",{placementsAvailable:ro,adObj:a,isFullscreenScrollAd:ge(a),isFinnBlink:ke(a.targetId),isNativeAd:he(a),isMediation:zi(a),isTakeoverAd:ye(a),isCollapseAd:xe(a),isWallpaperAd:we(a)});const v=null===(l=null===(s=null===(e=null===window||void 0===window?void 0:window.apntag)||void 0===e?void 0:e.requests)||void 0===s?void 0:s.tags[a.targetId])||void 0===l?void 0:l.adResponse.ads;zi(a)&&v&&(null===(c=v[1])||void 0===c?void 0:c.rtb)&&(a.banner=null===(u=null===(p=v[1])||void 0===p?void 0:p.rtb)||void 0===u?void 0:u.banner),ge(a)&&Pt(a),ge(a)&&!ke(a.targetId)&&Ct(a,d),!he(a)||zi(a)||ke(a.targetId)||i(a,m.get()),ye(a)&&!xe(a)&&(Si(a.targetId),yield Ci(a)),we(a)&&(o(()=>zt(()=>window.apntag.showTag(a.targetId)),r),ot.setData("wallpaper",{isAvailable:!0})),(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(a)&&ot.setData("horseshoe",{isAvailable:!0}),Ye({adObj:a}),(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:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(a),n.adAvailable(a);const g=ro.find(({id:e})=>e===a.targetId);g&&(yield go(g,a),ro=ro.filter(e=>e.id!==g.id)),t("core adAvailable stop",{placementsAvailable:ro,adObj:a,isFullscreenScrollAd:ge(a),isFinnBlink:ke(a.targetId),isNativeAd:he(a),isMediation:zi(a),isTakeoverAd:ye(a),isCollapseAd:xe(a),isWallpaperAd:we(a)})})),ao.onEvent("adLoaded",e=>{const{refreshConfig:t,appearanceConfig:o}=m.get(),r=document.getElementById(e.targetId);ke(e.targetId)&&(e=>{const{fullscreenScroll:t}=m.get(),{initNativeAd:n}=m.getHandlers();ge(e)&&Ct(e,t),he(e)&&n(e,m.get())})(e);s.includes(e.targetId)&&he(e)&&(i(e,m.get()),Ye({adObj:e})),!s.includes(e.targetId)&&zi(e)&&s.push(e.targetId),xe(e)&&Ut(e.targetId),ye(e)&&((e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);const a=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!a)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(a),t=e.width,n=e.height;t===i&&n===o||(a.style.width=i,a.style.height=o)}}).observe(a,{attributes:!0,attributeFilter:["style"]})})(ao,e.targetId),me(e)&&(e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=m.get();if(!t||!n||!i)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),o.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))})(e),fe(e)&&(e=>{const t=document.querySelector(`#${e.targetId}`),n=null==t?void 0:t.querySelector("iframe"),i=null==n?void 0:n.parentElement,{siteSpecificConfig:{publisherClassName:o,fullWidthFormatClassName:a}={}}=m.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-${o}-${a}__vertical-full-width-ad`);const s=Xe(e,t.offsetWidth);i.style.transform=`scale(${s})`,i.style.transformOrigin="left top"})(e),ii(e,t),(null==o?void 0:o.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(e.targetId);var d,l;ot.getData("horseshoe").isAvailable&&a(e.targetId),(e=>{var t,n,i,o,a,r;const{adScaleConfig:d,deviceType:s}=m.get();if(!(null==d?void 0:d.enabled))return;if(Pe(e,ae))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=Yt(e.targetId.split("-")[0]);if(!l.includes(c))return;const p=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,u=document.getElementById(e.targetId),v=null!==(o=null==u?void 0:u.offsetWidth)&&void 0!==o?o:window.screen.width,g=null!==(r=null===(a=null==u?void 0:u.parentElement)||void 0===a?void 0:a.offsetWidth)&&void 0!==r?r:window.screen.width;Ze(e,(v<g?v:g)-p)})(e),n.adLoaded(e),d=e.targetId,!document.querySelector(`#gdprAdTransparencyCogWheelButton-${d}`)&&(null===(l=window.gdpr)||void 0===l?void 0:l.setupButton)&&window.gdpr.setupButton(d),r&&(r.classList.add("ad-loaded"),(e=>{var t;const{siteSpecificConfig:n}=m.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")})(r)),tt(e),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:e.targetId,adFormat:Qe(e)}}))}),ao.onEvent("adNoBid",t=>e(void 0,void 0,void 0,function*(){Ut(t.targetId),yield On(m.get(),t),He(t)&&(yield Ue()),n.adNoBid(t)})),ao.onEvent("adError",(t,i)=>e(void 0,void 0,void 0,function*(){He(i)&&(yield Ue()),n.adError(t,i)})),ao.onEvent("adCollapse",()=>{n.adCollapse()}),ao.onEvent("adRequestFailure",e=>{Ut(e.targetId),n.adRequestFailure(e)}),ao.onEvent("adBadRequest",e=>{Ut(e.targetId),n.adBadRequest(e)}),ao.onEvent("adLoadedMediated",e=>n.adLoadedMediated(e)),ao.onEvent("adNoBidMediated",e=>n.adNoBidMediated(e))})}),bo=(n,i)=>e(void 0,void 0,void 0,function*(){var o;m.set(n),m.setHandlers(i),ot.initialize(),window.addEventListener("message",Rn,!1),ao=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=ao,t("Apn tag is set up on window"),yield Promise.allSettled([e(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=m.get();(yield O(e,t,n,"xandr-endpoint"))||ao.setEndpoint("ib.adnxs-simple.com",!0)}),e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,isMobileApp:n,country:i}=m.get(),o=yield O(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield st(null==e?void 0:e.url))}),Z(n),e(void 0,void 0,void 0,function*(){const{astUrl:e}=m.get();yield st(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),e(void 0,void 0,void 0,function*(){const{gptUrl:e}=m.get();yield st(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js")}),e(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,url:t}={},tcf:n,isMobileApp:i,country:o}=m.get(),{getConsentAsync:a}=d(n,i,o),r=yield a();if(e&&t&&r){if(yield st(t),document.querySelector(`.${Pi}`))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(Pi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),$(),e(void 0,void 0,void 0,function*(){const{gdpr:{url:e,allowHidingAds:t=!0}={}}=m.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield st(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),yield Oi(),t("Libraries have been loaded and trackers have been set"),yield(o=i.librariesToLoad,e(void 0,void 0,void 0,function*(){const e=o.map(e=>st(e));yield Promise.all(e)})),yield yo(),yield co(),t("Page options have been set"),lo(n),t("Advertory is setup on window"),ro=Xt(),oi(ro),ri(ro),yield mo(ro),t("Ads has been loaded",ro),qi(ro),yield i.replaceAdsWithFinnBlink(n.finnBlink),yield(t=>e(void 0,void 0,void 0,function*(){var e;if(!t.drEdition)return;if(!(yield O(t.tcf,t.isMobileApp,t.country,"handleDrEdition")))return;const n=yield An(),i=new Sn(n);Cn({publisher:t.publisher,drEditionConfig:t.drEdition,device:t.deviceType,pageType:t.pageType,country:t.country},i,null===(e=t.pulse)||void 0===e?void 0:e.instance)}))(n),(e=>{if(!(null==e?void 0:e.enabled)||Qi)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=Ui}=e,o=document.querySelector(i);if(!o)return;Qi=!0;const a=()=>{Yi(o,n,t)};a(),window.addEventListener("resize",a),window.addEventListener("orientationchange",a),window.addEventListener("load",a),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(a)}),new ResizeObserver(a).observe(o)})(n.rightColumnSplit),yield(t=>e(void 0,void 0,void 0,function*(){const e=new oo;yield e.run(t)}))(n)}),wo=(n,i)=>e(void 0,void 0,void 0,function*(){yield((n,i)=>e(void 0,void 0,void 0,function*(){const{initConsentManager:e,getConsentAsync:o}=d(n.tcf,n.isMobileApp,n.country),a=yield Vi(n);yield Ri(),yield Bi(e),yield Bi(o),t("TCF resolved successfully"),yield bo(a,i),t("Run function resolved successfully")}))(n,i)}),xo="native_override_desc2",Eo=(e,t,n)=>{var i;const{image:o,icon:a,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(o),imgWidth:null==o?void 0:o.width,imgHeight:null==o?void 0:o.height,imgAltText:null!=d?d:"",logo:b(a),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)},ko=(e,t)=>{const n=(i=xo,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(xo),a=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?a?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},To=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,a=i&&Object.values(vn).includes(i);n&&a&&((e,t,n,i)=>{const o=t.parentElement;if(!o)return;const a=e?`-${e}`:"",r=i?`__${i}`:"",d=`advertory${a}-${n}${r}`,s=`advertory${a}-${n}-wrapper${r}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(d),o.classList.add(s),t.dataset.adType=n})(i,e,_i,o)})(o,n),i())},Io=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:[])Po(i)}),t.dataset.tracked="true")})},Ao=e=>{const{native:{impressionTrackers:t}={}}=e;(null==t?void 0:t.some(e=>e.includes("googleads")))?null==t||t.forEach(Co):window.apntag.fireImpressionTrackers(e);const n=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(n)},So=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:a,appearanceConfig:r,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==r?void 0:r.defaultThreshold[null!=a?a:b.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,Ao(e),c.disconnect();break}},s);c.observe(o)},Co=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Po(e):window.navigator.sendBeacon(e)},Po=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Oo=(e,t,n)=>{const o=((e,t,n)=>{var o;const{displayTemplates:a,videoTemplates:r}=n,d="default";if(!e.native)return null;const{native:s,targetId:l}=e,{desc2:c=d}=e.native,p=c.toLowerCase(),u=null!==(o=ko(e.targetId,c))&&void 0!==o?o:p,v=kt[t.language||i.NO],g=Eo(s,v,l);return(s.video?r[u]:a[u]||a.default)(g,t)})(e,t,n);To(e.targetId,o,t,()=>{const{nativeTrackingConfig:{nativeTrackingEnabled:n=!0}={}}=t;n&&((e,t)=>{Io(e),So(e,t)})(e,t)})};Et('.advertory-godare-ad-native-single-integration-alcohol{font-family:"Proxima Nova",Arial,sans-serif;display:flex;flex-direction:column;width:auto;height:370px;position:relative;isolation:isolate}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol{height:380px}}.advertory-godare-ad-native-single-integration-alcohol .ad-info{position:absolute;top:0;right:3px;z-index:1}.advertory-godare-ad-native-single-integration-alcohol .ad-info>div{position:initial !important}.advertory-godare-ad-native-single-integration-alcohol .ad-link{text-decoration:none;color:inherit}.advertory-godare-ad-native-single-integration-alcohol .ad-link:hover{text-decoration:none}.advertory-godare-ad-native-single-integration-alcohol .ad-header{position:relative;width:100%;padding-bottom:8px}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-header{padding-bottom:10px}}.advertory-godare-ad-native-single-integration-alcohol .ad-logo{position:absolute;top:-8px;left:-16px;width:46px;height:46px;z-index:1;border:1px solid rgba(0,0,0,.3);border-radius:28px;background:#fff}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-logo{top:-10px;left:-18px;width:48px;height:48px}}.advertory-godare-ad-native-single-integration-alcohol .ad-sponsoredBy{font-family:"Roboto",sans-serif;font-size:11px;font-weight:700;line-height:13px;color:rgba(0,0,0,.6);margin-left:40px;display:inline-block;width:80%}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-sponsoredBy{margin-left:38px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container{display:grid;grid-template-columns:1fr 116px;grid-template-rows:1fr 64px;grid-column-gap:8px;position:relative;background-color:#f5f5f5;padding:16px 16px 40px;border-radius:12px}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container{grid-template-columns:1fr 208px;padding:24px 24px 40px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-contentWrapper{grid-area:1/1/2/2;display:flex;flex-direction:column;width:100%;height:100%}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-title{font-size:15px;font-weight:700;line-height:30px;margin-bottom:8px}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-title{font-size:24px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-description{font-size:14px;font-weight:400;line-height:22px;color:#454545;margin-bottom:4px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-description{font-size:18px;-webkit-line-clamp:2}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle{font-size:13px;font-weight:700;line-height:20px;color:#454545}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle1{margin-bottom:20px}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle1{font-size:16px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle2{margin:auto 0 4px}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle2{font-size:16px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle3{font-size:15px;line-height:18px}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-customTitle.ad-customTitle3{font-size:22px;line-height:26px}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-buttonWrapper{grid-area:2/1/3/3;box-sizing:border-box;max-height:40px;width:100%;background-color:#1168ea;padding:11px 16px;text-align:center;border-radius:8px;margin-top:16px}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-buttonWrapper{grid-area:2/1/3/2;width:max-content}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-buttonWrapper .ad-button{font-size:15px;font-weight:700;color:#fff}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-imageWrapper{grid-area:1/2/2/3;display:flex;justify-content:center;align-items:center;width:100%}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-imageWrapper{grid-area:1/2/3/3}}.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-imageWrapper .ad-image{max-width:100%;max-height:170px;margin-top:0}@media screen and (min-width: 1001px){.advertory-godare-ad-native-single-integration-alcohol .ad-container .ad-imageWrapper .ad-image{max-height:290px;margin-top:-40px}}.advertory-godare-ad-native-single-integration-alcohol .ad-warning{font-size:19px;font-weight:700;border:2px solid #000;padding:25px 0;text-align:center;margin-top:-35px;background:#fff;position:relative}@media screen and (min-width: 704px){.advertory-godare-ad-native-single-integration-alcohol .ad-warning{margin-top:-30px}}');const Lo={SINGLE_INTEGRATION:({containerId:e,url:t,cta:n,sponsoredBy:i,title:o,description:a,img:r,logo:d,customTitle1:s,customTitle2:l,customTitle3:c,customTitle4:p})=>{return`<article class="advertory-godare-ad-native-single-integration-alcohol">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-header">\n <img class="ad-logo" src="${d}" alt="${i}" />\n <span class="ad-sponsoredBy">${i||"ANNONS"}</span>\n </div>\n <div class="ad-container">\n <div class="ad-contentWrapper">\n <p class="ad-title">${o}</p>\n <p class="ad-description">${a}</p>\n ${s?`<p class="ad-customTitle ad-customTitle1">\n ${s}\n </p>`:""}\n ${l?`<p class="ad-customTitle ad-customTitle2">\n ${u=l,u.replace(/_/g," • ")}\n </p>`:""}\n ${c?`<p class="ad-customTitle ad-customTitle3">\n ${c}\n </p>`:""}\n </div>\n <div class="ad-buttonWrapper">\n <span class="ad-button">${n}</span>\n </div>\n <div class="ad-imageWrapper">\n <img class="ad-image" src="${r}" alt="${o}" />\n </div>\n </div>\n ${p?`<div class="ad-warning">${p}</div>`:""}\n </a>\n </article>\n `;var u}};Et('@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 $o="viewable",jo="adClick";const No=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.querySelector("ClickThrough"),o=n.querySelector("VideoClicks");if(i){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n.createCDATASection(t))}else if(o){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),o.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},zo=({id:e,nodeId:t,poster:n,tagURL:i,publisher:o="",productTag:a="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:o.toLowerCase(),decorator:e=>Object.assign(Object.assign({},En(e)?e:{}),{provider:Object.assign(Object.assign({},En(null==e?void 0:e.provider)?e.provider:{}),{productTag:a})})}}),_o=t=>e(void 0,void 0,void 0,function*(){const{playerConfig:e,pluginsNames:n,clickUrl:i}=t,{repeat:o}=e,a=yield mn(e);yn(n),a.once("assetReady",()=>{hn(a,n)}),a.on($o,e=>{const{viewable:t}=e;t?a.play():a.pause()}),a.on(jo,()=>{window.open(i,"_blank")}),o&&a.on("pause",()=>{a.play()})});Et(".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}}");const Do=({containerId:e,adText:t,url:n,adFrom:i,sponsoredBy:o,title:a},r,d)=>`<article class="advertory-shared-ad-native-video">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-content">\n <div class="ad-header">\n <span>${t}</span>\n </div>\n <div class="ad-image-container">\n <div class="ad-player-wrapper">\n <div id="${d}"></div>\n </div>\n </div>\n <a class="ad-link" href="${n}" target="_blank">\n <div class="ad-text-container">\n <span class="sponsored-by">\n ${i} ${o}\n </span>\n <span class="title">${a}</span>\n </div>\n </a>\n </div>\n </article>`;Et(".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}}"),Et('@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}'),Et('.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}'),Et('.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}}'),Et(".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}"),Et('.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}}'),Et('.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)}}'),Et('.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 Mo={VIDEO:(e,t)=>{return(n=Do,(e,t,i)=>{const{video:o,img:a,url:r}=e,{publisher:d,productTag:s}=t,{pluginsNames:l,videoLoop:c}=i||{};if(!(null==o?void 0:o.content))return null;const p=Math.ceil(1e5*Math.random()),u=a||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${p}`,g=No(o.content,r),h=zo({id:p,nodeId:v,poster:u,tagURL:g,publisher:d,productTag:s,videoLoop:c});return _o({playerConfig:h,clickUrl:r,pluginsNames:l}),`${n(e,t,v)}`})(e,t);var n}},qo={displayTemplates:{godare_singleintegration_alcohol:Lo.SINGLE_INTEGRATION,godare_singleintegration:Lo.SINGLE_INTEGRATION,default:Lo.CONTENT_DISPLAY},videoTemplates:{default:Mo.VIDEO}};Et(".advertory-godare-native-ad-wrapper__article{align-items:center;display:flex;height:auto;justify-content:center;margin-bottom:8px;margin-top:26px;min-height:160px;padding:28px 0 48px;width:100%}.advertory-godare-native-ad-wrapper__article .advertory-godare-native-ad__article{font-size:0;min-height:160px;position:relative;transform-origin:0 0}");const Bo=()=>{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},Ro={[vn.VG]:["board","netboard","backfill","outstream"],[vn.AFTONBLADET]:["panorama","outstream"],[vn.GODARE]:["panorama","outstream"],[vn.SVD]:["wph-article-panorama","wph-front-panorama"]},Fo=e=>{var t;const{publisher:n}=m.get();return!!Ro[n]&&!!(null===(t=Ro[n])||void 0===t?void 0:t.some(t=>e.includes(t)))},Vo=((e,t)=>n=>wo(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e))({initNativeAd:(e,t)=>{const{targetId:n}=e;if(!document.querySelector(`#${n}`))return;const{pageType:o=gn.FRONT,nativeTrackingConfig:a,appearanceConfig:r,deviceType:d}=null!=t?t:{},s={language:i.SE,publisher:vn.GODARE,deviceType:d,pageType:o,nativeTrackingConfig:a,appearanceConfig:r};Oo(e,s,qo)},wallpaperHandlers:{initWallpaperAd:Nt,adjustAdToHorseshoe:Nt},loadFinnBlinkAd:jt,replaceAdsWithFinnBlink:jt,preparePageOptions:ie,prepareTag:e=>{const{keywords:t,targetId:n,invCode:i}=e,{useAppTabletInvCode:o=!0}=m.get(),a=((e,t)=>{const{isMobileApp:n}=m.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(i,o),r=(e=>{const{keywords:t,dynamicSizeWidthCheck:n}=e,i=`${j()}-adformat`,o=t?t[i]:[];if(!o)return{};const a=(Array.isArray(o)?o:[o]).filter(e=>!(e in ve)||window.innerWidth>=ve[e]);return{[i]:n?a:o}})(e),d=(e=>{const t=`${j()}-targetid`;return e?{[t]:[e]}:{}})(n),s=Bo(),l=(e=>Fo(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(i),c=((e,t)=>Fo(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(i);return Object.assign(Object.assign({},e),{invCode:a,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),r),d),l),s),rendererOptions:c})},siteEvents:nt,librariesToLoad:[]},{publisherClassName:vn.GODARE,fullWidthFormatClassName:"panorama"}),Uo=Et("[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 Ho=Object.freeze({__proto__:null,default:Uo});exports.initAdvertoryPackage=Vo,exports.updateAdvertory=(t,n)=>e(void 0,void 0,void 0,function*(){var e;if(!(null===(e=null===window||void 0===window?void 0:window.advertory)||void 0===e?void 0:e.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:a,contextSelector:r}=null!=n?n:{};if(i)return Gt(),[];o&&(Gt(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{Ht(e.id)})),f(null!=t?t:{}),yield co();let d=Xt(r);return a&&(d=d.filter(e=>ke(e.id))),d.length>0&&(ro=[...ro,...d.map(e=>Object.assign({},e))],oi(d),ri(d),yield mo(d)),ro});