@schibsted/advertory 2.67.0 → 2.67.1
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.
- package/core/aftenposten/es/index.css +1 -1
- package/core/aftenposten/es/index.js +1 -1
- package/core/aftenposten/index.js +1 -1
- package/core/aftenpostenv2/es/index.css +1 -1
- package/core/aftenpostenv2/es/index.js +1 -1
- package/core/aftonbladet/es/index.css +1 -1
- package/core/aftonbladet/es/index.js +1 -1
- package/core/aftonbladet/index.js +1 -1
- package/core/aftonbladetv2/es/index.css +1 -1
- package/core/aftonbladetv2/es/index.js +1 -1
- package/core/bt/es/index.css +1 -1
- package/core/bt/es/index.js +1 -1
- package/core/bt/index.js +1 -1
- package/core/e24/es/index.css +1 -1
- package/core/e24/es/index.js +1 -1
- package/core/e24/index.js +1 -1
- package/core/fotbollskanalen/es/index.css +1 -1
- package/core/fotbollskanalen/es/index.js +1 -1
- package/core/fotbollskanalen/index.js +1 -1
- package/core/godare/index.js +1 -1
- package/core/godt/index.js +1 -1
- package/core/klart/index.js +1 -1
- package/core/koket/es/index.css +1 -1
- package/core/koket/es/index.js +1 -1
- package/core/koket/index.js +1 -1
- package/core/kompakt/index.js +1 -1
- package/core/minmote/index.js +1 -1
- package/core/pent/index.js +1 -1
- package/core/sa/es/index.css +1 -1
- package/core/sa/es/index.js +1 -1
- package/core/sa/index.js +1 -1
- package/core/sav2/es/index.css +1 -1
- package/core/sav2/es/index.js +1 -1
- package/core/svd/es/index.css +1 -1
- package/core/svd/es/index.js +1 -1
- package/core/svd/index.js +1 -1
- package/core/svdv2/es/index.css +1 -1
- package/core/svdv2/es/index.js +1 -1
- package/core/tek/index.js +1 -1
- package/core/tv4/es/index.css +1 -1
- package/core/tv4/es/index.js +1 -1
- package/core/tv4/index.js +1 -1
- package/core/tvnu/index.js +1 -1
- package/core/vg/es/index.css +1 -1
- package/core/vg/es/index.js +1 -1
- package/core/vg/index.js +1 -1
- package/core/vgv2/es/index.css +1 -1
- package/core/vgv2/es/index.js +1 -1
- package/features/brandmetrics/index.js +1 -1
- package/features/dr-edition/es/index.js +1 -1
- package/features/dr-edition/index.js +1 -1
- package/features/glimr/index.js +1 -1
- package/features/kilkaya/es/index.js +1 -1
- package/features/kilkaya/index.js +1 -1
- package/features/tracker/index.js +1 -1
- package/package.json +1 -1
- package/sites/aftenposten/es/index.css +1 -1
- package/sites/aftenpostenv2/es/index.css +1 -1
- package/sites/aftonbladet/es/index.css +1 -1
- package/sites/aftonbladetv2/es/index.css +1 -1
- package/sites/bt/es/index.css +1 -1
- package/sites/e24/es/index.css +1 -1
- package/sites/fotbollskanalen/es/index.css +1 -1
- package/sites/sa/es/index.css +1 -1
- package/sites/sav2/es/index.css +1 -1
- package/sites/svd/es/index.css +1 -1
- package/sites/svdv2/es/index.css +1 -1
- package/sites/vg/es/index.css +1 -1
- package/sites/vgv2/es/index.css +1 -1
- package/types/features/tcf/index.d.ts +3 -0
- /package/types/{core/handlers/tcf/consent.d.ts → features/tcf/has-consent.d.ts} +0 -0
- /package/types/{core/handlers/tcf/consent.test.d.ts → features/tcf/has-consent.test.d.ts} +0 -0
- /package/types/{core/handlers → features}/tcf/schibsted-ad-choices.d.ts +0 -0
- /package/types/{core/handlers/tcf/index.d.ts → features/tcf/tcf-consent.d.ts} +0 -0
- /package/types/{core/handlers/tcf/index.test.d.ts → features/tcf/tcf-consent.test.d.ts} +0 -0
package/core/tek/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}function t(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{s(o.next(e))}catch(e){r(e)}}function d(e){try{s(o.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((o=o.apply(e,t||[])).next())})}function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o,i;require("react/jsx-runtime"),"function"==typeof SuppressedError&&SuppressedError;var r=n(function(){if(i)return o;i=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)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,o){return e.concat(t).map(function(e){return n(e,o)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function d(e,t){try{return t in e}catch(e){return!1}}function s(e,t,o){var i={};return o.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=n(e[t],o)}),a(t).forEach(function(r){(function(e,t){return d(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(d(e,r)&&o.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,o)(e[r],t[r],o):i[r]=n(t[r],o))}),i}function l(t,o,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||e,i.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(o);return a===Array.isArray(t)?a?i.arrayMerge(t,o,i):s(t,o,i):n(o,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},o=l}());const a=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],d={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},s=6;class l{set(e){this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of a){const o=e[n];void 0!==o&&(t[n]=o)}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)),Object.prototype.hasOwnProperty.call(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}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=r(l.DEFAULT_SITE_HANDLERS,e)}}l.DEFAULT_SITE_HANDLERS={siteEvents:d,initNativeAd:function(){}};const c=new l,p=c.modifyConfigProperties.bind(c),u=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},v=864e5,g=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return u("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,o=v)=>{const i={data:n,expirationTime:(new Date).getTime()+o};t(e,JSON.stringify(i))},getByTimestamp:(t,n=v)=>{const o=e(t);if(!o)return null;if(!n)return o;try{const{expirationTime:e,data:t}=JSON.parse(o);return(new Date).getTime()<=e?t:null}catch(e){return u("Error with parsing localStorage data"),null}}}})(),h="glimrTags",m=["glwe_","glwet_"],f={geofenceTags:[],geoTags:[],weatherTags:[]},y=e=>new URLSearchParams(window.location.search).get(e),b=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return u("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let o=!1;const i=e=>{o||(u("Resolving advertising permission value obtained"),o=!0,t(e))},r=setTimeout(()=>{u("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{u("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);u("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),w={NO:"no",SE:"se"},x="cmp:loaded";let k,E=!1;const T=(e,n,o)=>{const i=!!(null==e?void 0:e.enabled),r=(null==e?void 0:e.timeout)||3e3,a=y("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(u("TCF bypass param detected, returning consent: true"),!0):(u("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(E)return null;if(!k)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=k.getConsentedToAllSync();return u(`TCF consented to all is: ${t}`),k.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(u("Getting TCF consent manager..."),window._tcf_)return u("TCF consent manager is already available"),k=window._tcf_,void e(k);u("TCF consent manager is not available");const n=()=>{u("CMP loaded, resolving consent manager..."),o&&clearTimeout(o),window._tcf_?(k=window._tcf_,e(k)):t(new Error("CMP loaded but window._tcf_ is not defined"))},o=setTimeout(()=>{document.removeEventListener(x,n),E=!0,t(new Error("Timeout waiting for CMP to load"))},r);u("Listening for CMP loaded event..."),document.addEventListener(x,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return u(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.schibstedAdChoicesEnabled)&&o===w.SE,n=(null==e?void 0:e.schibstedAdChoicesEnabled)&&o===w.NO;if(t||n)return u("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield b(e);if(!(null==e?void 0:e.enabled))return!0;const i=d();return null!==i?i:yield new Promise((e,t)=>{try{if(!k)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},o=setTimeout(()=>{u("TCF isConsentedToAll timed out, resolving with false"),n(!1)},r);k.onTcfReady(()=>{u("On Tcf Ready called, waiting for consent"),clearTimeout(o)}),k.isConsentedToAll(t=>{clearTimeout(o),e(t)})}catch(e){t(e)}})})}},I=(e,n,o,...i)=>t(void 0,[e,n,o,...i],void 0,function*(e,t,n,o="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return u(`Schibsted Consent to Pay is not enabled, returning true for ${o}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return u(`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:i}=T(e,0,n);return(yield i())?(u(`Schibsted Ad Choices consent given according to TCF consent manager for ${o}`),!0):(u(`Schibsted Ad Choices consent not given according to TCF consent manager for ${o}`),!1)}),A=()=>t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get();if(null==e?void 0:e.schibstedConsentToPayEnabled){return yield I(e,t,n,"glimr")}const{getConsentAsync:o}=T(e,0,n);return yield o()}),S=()=>t(void 0,void 0,void 0,function*(){const{glimr:e}=c.get();if(!(yield A())||!(null==e?void 0:e.enabled))return void u("No consent for glimr data fetching.");const n=yield(o=500,t(void 0,void 0,void 0,function*(){return yield Promise.race([t(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(n)try{n.setTagCacheTimeInSeconds(300),yield new Promise(t=>{n.getTags(e.clientId,(e,n)=>{g.setWithTimestamp(h,{tags:e,tagMappings:n}),t(!0)})})}catch(e){u(`Error during getting glimr data: ${e}`)}else u("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:n})}),C=()=>{const{country:e}=c.get();return e===w.NO?"no-sno":"se-generic"},P=()=>{const{country:e,publisher:t}=c.get();return`${e}-${t}`},O={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"},L=e=>m.some(t=>e.startsWith(t)),$=e=>e.startsWith("glgc_"),j=e=>!L(e)&&!$(e),N=e=>{const t=_();if(!t)return f;const n=((e=[])=>e.filter(L))(t),o=((e=[])=>e.filter($))(t),i=((e=[],t)=>{const n=e.filter(j);if(t){const{publisher:e}=c.get(),t=O[e]||e;n.push(t)}return n})(t,e);return{geoTags:i,geofenceTags:o,weatherTags:n}},_=()=>{const e=g.getByTimestamp(h);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},q={get:(e,n)=>t(void 0,void 0,void 0,function*(){const t=yield fetch(e,n);if(!t.ok)throw new Error(t.statusText);return yield t.json()}),post:(e,n,o)=>t(void 0,void 0,void 0,function*(){const t=JSON.stringify(o),i=yield fetch(e,{method:"POST",headers:n,body:t});if(!i.ok)throw new Error(i.statusText);return yield i.json()})},z="advertory:ppids-cache",D={[w.SE]:`SCH${w.SE.toUpperCase()}-EnvHash`,[w.NO]:`SCH${w.NO.toUpperCase()}-EnvHash`},M={[w.SE]:`SCH${w.SE.toUpperCase()}-UserHash`,[w.NO]:`SCH${w.NO.toUpperCase()}-UserHash`},B={[w.SE]:`sch${w.SE}-envhash-v3`,[w.NO]:`sch${w.NO}-envhash-v3`},F={[w.SE]:`sch${w.SE}-userhash-v3`,[w.NO]:`sch${w.NO}-userhash-v3`},R={[w.SE]:`'sch${w.SE}-iosid-v3'`,[w.NO]:`'sch${w.NO}-iosid-v3'`},V={[w.SE]:`sch${w.SE}-androidid-v3`,[w.NO]:`sch${w.NO}-androidid-v3`},U={[w.SE]:"sdrn:schibsted.com:user",[w.NO]:"sdrn:spid.no:user"};class H{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:o})=>{t.append(e,`${o}-${n}`)}),t}}const W=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return t(this,arguments,void 0,function*(e,t=1e4){var n,o;const i=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=i.xandr)||void 0===n?void 0:n.ppId1,null===(o=i.xandr)||void 0===o?void 0:o.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||u("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},K=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,n){return t(this,void 0,void 0,function*(){var t,o,i,r,a,d,s,l,c,p,u;const v=g.get(z),h=yield this.getNewPPIDs(e,n);if(this.shouldHash(v,h)){const n=null!==(t=e.hasherUrl)&&void 0!==t?t:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(h),c=yield this.hashPPIDs(l,n);return c?(this.cachePPIDs(l,c,null===(o=h.idfv)||void 0===o?void 0:o.plain,null===(i=h.anId)||void 0===i?void 0:i.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=h.idfv)||void 0===d?void 0:d.plain,null===(s=h.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==h?void 0:h.idfv)||void 0===p?void 0:p.plain,null===(u=null==h?void 0:h.anId)||void 0===u?void 0:u.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||u("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,o){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=o?o:null}shouldHash(e,t){var n,o;if(!e)return!0;for(const i in e){if((null===(n=e[i])||void 0===n?void 0:n.plain)!==(null===(o=t[i])||void 0===o?void 0:o.plain))return!0}return!1}cachePPIDs(e,t,n,o){const i=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}}:{}),o?{anId:{plain:o}}:{});g.set(z,i)}hashPPIDs(e,n){return t(this,void 0,void 0,function*(){try{const t=new Headers({"Content-Type":"application/json"});return yield q.post(n,t,e)}catch(e){return u("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,n){return t(this,arguments,void 0,function*({clientId:e,instance:n},o){const i=yield((e,n)=>t(void 0,void 0,void 0,function*(){const t=yield e.getUserId();return t?`${U[n]}:${t}`:null}))(n,o),r=yield(e=>t(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(n),a=window.advertory_idfv,d=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:r},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),d?{anId:{plain:d}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:o,environmentId:i}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:o.plain,environmentId:i.plain}}},G=e=>t(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,country:o,isMobileApp:i}=e;if(!(yield I(n,i,o,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([W.processPPIDs(t,null==n?void 0:n.timeout),K.processPPIDs(t,o)])).forEach((e,t)=>{if("rejected"===e.status){u(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),J=e=>{const{ppid1:t,ppid2:n}=W.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=K.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new H).add(n,D[e]).add(t,M[e]).add(i,B[e]).add(o,F[e]).add(r,R[e]).add(a,V[e]).buildEids()}]}},Y=e=>{const{ppid1:t,ppid2:n}=W.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=K.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new H).add(n,D[e]).add(t,M[e]).add(i,B[e]).add(o,F[e]).add(r,R[e]).add(a,V[e]).buildRyEids()}}]}}},X=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Q=()=>{const e=X("_pulse2data");return e?e.split(",")[2]:void 0},Z={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},ee=9826;class te{constructor(){this.getSupplyTypeKeywords=()=>{const{deviceType:e=Z.DESKTOP,isMobileApp:t}=c.get();if(t){return{"aa-sch-supply_type":`app_${e===Z.MOBILE?"phone":Z.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return t(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return t(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 Q()}getExternalUid(){return t(this,void 0,void 0,function*(){return yield t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get(),{getConsentAsync:o}=T(e,0,n);if(!(yield o()))return;const i=X("_pulse2data");return i?i.split(",")[9]:void 0})})}isTrackingForbidden(){return t(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=ee}=c.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}=c.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return t(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get(),{getConsentAsync:o}=T(e,0,n);return{"aa-sch-cmp_advertising":(yield o())?"1":"0"}})}getPageTypeKeywords(){const{pageType:e}=c.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}=c.get(),o=null===(e=null==n?void 0:n.sponsors)||void 0===e?void 0:e.split(":").map(e=>`${t}_${e}`);return o?{"no-sno-news-sponsors":o}:{}}}const ne=new te;ne.prepare.bind(ne);const oe=new class extends te{prepare(e){return t(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getCountryCodeKeywords(w.NO)),this.getPublisherKeywords()),this.getPageTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getSupplyTypeKeywords()),yield this.getAdvertisingConsentKeywords()),yield t(void 0,void 0,void 0,function*(){const{glimr:e}=c.get(),{addPublisherToGeo:t}={},n=yield A();if(!(null==e?void 0:e.enabled)||!n)return u("No consent for getting glimr tags."),{};const o=C(),i=N(t);return{[`${o}-geo`]:i.geoTags,[`${o}-weather`]:i.weatherTags,[`${o}-geofence`]:i.geofenceTags}})),(()=>{const{ppid1:e,ppid2:t}=W.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}})()),e.keywords);return Object.assign(Object.assign({},e),{keywords:n,user:Object.assign(Object.assign({},J(w.NO)),{externalUid:yield this.getExternalUid()}),member:this.getMember()})})}};var ie=oe.prepare.bind(oe);const re="0123456789abcdefghijklmnopqrstuvwxyz",ae=e=>{window.apntag.anq.push(e)},de=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),se=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})}),le=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 ce="";const pe=new Map,ue="advertory-wallpaper-background",ve="advertory-with-horseshoe",ge=()=>{const e=document.querySelector(`.${ue}`);e&&e.remove()},he=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${ue}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},me=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,fe=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")&&ge())},ye=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"))};class be{initialize(){this.DATA=Object.assign({},be.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)}}be.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const we=new be,xe=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,o=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${o}px`)},ke=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:o}=(e=>{const t=we.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=o},Ee=()=>{ge();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{fe(e.id),ke(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),o=null==t?void 0:t.getAttribute("data-probable-width");n&&o&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",o+"px"))})(e.id),e.innerHTML="",e.id=le(e.id)}),ae(()=>window.apntag.clearRequest())},Te="noGroupedPlacements",Ie=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Ae=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Se=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:o,deviceType:i}=c.get(),r=n[i].filter(Ae)||[],a=e?document.querySelector(e):document;if(!a)return[];const d=r.reduce((e,t)=>{const n=Ie(t.id);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({id:e})=>e.match(t)),d=(null==o?void 0:o.queryByDataDevice)?`div[id^="${e}"][data-device=${i}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=a.querySelectorAll(d),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var o;const i=Ce(e,t,n),r=i.finnBlink&&!i.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(o=i.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink),d=`${e.id}-${((e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++)t+=re[Math.floor(36*Math.random())];return t})(6)}`;return e.id=d,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&we.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:d})});return(e=>{const{keywordsConfig:t}=c.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(ce!==window.location.pathname&&(pe.clear(),ce=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),o=null!==(t=pe.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${P()}-count`]=o,pe.set(n,o+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)},Ce=(e,t,n)=>{const o=n[t],i=n[n.length-1],r=n.filter(({id:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==o?void 0:o.id)?o:(null==e?void 0:e.id)===(null==i?void 0:i.id)?i:r||i},Pe=e=>{const{queryConfig:{placementBatches:t}={},deviceType:n}=c.get(),o=(null==t?void 0:t[n])||{},i=Object.values(o).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=le(e.id);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[o,i]of Object.entries(t))n[o]=e.filter(e=>i.includes(le(e.id)));return n})(e,o),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(le(e.id))))(e,new Set([...d,...i]));return Object.assign(Object.assign(Object.assign({},a),r),{[Te]:s})},Oe="ABSOLUTE_FULLSCREEN",Le="ANY_FULLSCREEN",$e="VERTICAL_FULLWIDTH",je="FULLWIDTH",Ne="TAKEOVER",_e="VELVET_TAKEOVER",qe="WALLPAPER",ze="COLLAPSE",De={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}]},Me={wallpaper:1600,"l-format":1600},Be=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&et(e,Le)},Fe=e=>{const{native:t}=e;return!!t},Re=e=>et(e,je),Ve=e=>{const{targetId:t}=e;return t.includes("takeover")||et(e,Ne)},Ue=e=>et(e,Ne),He=e=>et(e,qe),We=e=>et(e,ze),Ke=e=>e.targetId.includes("sponsorstripe"),Ge=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Je=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),Ye=e=>e.targetId.startsWith("midboard"),Xe=e=>e.targetId.includes("widescreen"),Qe=e=>e.width>=1260&&e.width<=1280,Ze=e=>e.width>=1600&&e.width<=1620,et=(e,t)=>{const n=De[t];if(!n)return!1;return!!n.find(t=>{var n,o;const i=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(o=e.banner)||void 0===o?void 0:o.height)||e.height,a=t.width===i,d=!t.height||t.height===r;return a&&d})},tt="splash",nt="welcomePage",ot="topscroller",it="velvet",rt=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const o=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),i=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=o.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,i).toString()},at="takeover-displayed",dt="takeover-visit-count",st=14400,lt=()=>{const e=X(dt);return e?parseInt(e):0},ct=()=>{const{takeover:{enabled:e=!1,secondVisitEnabled:t=!1}={}}=c.get();return!window.location.href.includes("takeover=0")&&(!!window.location.href.includes("takeover=1")||!(!e||(()=>{var e;const t=(null===(e=c.get().takeover)||void 0===e?void 0:e.cookieCapName)||at;return"true"===X(t)})())&&(!t||pt()))},pt=()=>{const e=lt();return 0===e?((()=>{const e=lt(),{takeover:{cookieCapTime:t=st}={}}=c.get(),n=document.location.hostname;window.document.cookie=`${dt}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`})(),!1):1===e},ut=(e,t)=>[[1,1],[1920,1080]].some(([n,o])=>n===e&&o===t),vt=()=>{const{takeover:e}=c.get();return Boolean(null==e?void 0:e.topscroller)},gt=()=>t(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{cookieCapName:t=at,cookieCapTime:n=st}={},isMobileApp:o,tcf:i,country:r}=c.get(),a=yield I(i,o,r,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),ht=e=>{var t;const n=!!(null===(t=c.get().takeover)||void 0===t?void 0:t.setCookieCapForNotShownAd);return Ve(e)&&n},mt=(e,t)=>{var n;if(t===ot){const{topscroller:t}=e;return null!=t?t:{}}if(t===tt){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},ft=(e,t)=>{t!==tt?(e=>{var t,n,o;const i=null===(n=null===(t=c.get().takeover)||void 0===t?void 0:t.welcomePage)||void 0===n?void 0:n.headerElementSelector,r=null===(o=c.get().takeover)||void 0===o?void 0:o.topscroller;if(!i||r)return;const a=document.querySelector(i),d=document.querySelector(".welcome-page-wrapper"),s=document.querySelector(`#${e.targetId}`),l=document.querySelector(".advertory-welcome-page-scroll");if(!(a&&d&&l&&s))return;const p=null==a?void 0:a.offsetHeight,u=Ue(e)?"60svh":`calc(100svh - ${p}px)`,v=Ue(e)?"calc(40svh + 30px)":`calc(${p}px + 30px)`;d.style.setProperty("height",u,"important"),s.style.setProperty("height",u,"important"),l.style.setProperty("bottom",v,"important")})(e):(e=>{var t;if(!(null===(t=c.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),o=document.querySelector(`#${e.targetId}`);if(!n||!o)return;const i=`calc(100svh - ${n.offsetHeight}px)`;o.style.setProperty("height",i,"important")})(e)},yt=rt([],()=>{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})}),bt={nativeAd:e=>Fe(e)&&!Ke(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:Re,fullscreenScroll:Be,topscroller:e=>Ve(e)&&vt(),splash:e=>Ve(e)&&ut(e.width,e.height),welcomePage:Ve,wallpaper:He,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Qe,hFormat:Ze,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ze(e)&&!Qe(e),topboard:e=>e.targetId.startsWith("topboard")&&!Ve(e),widescreen:Xe,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:Ke,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Je(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!Ye(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:Je,midboard:Ye},wt=({adObj:e,preferredTestIdData:t})=>{var n,o;const i=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!i)return;const r=null===(o=document.querySelector(`#${i}`))||void 0===o?void 0:o.parentElement;if(!r)return;if(((e,t)=>{var n,o,i,r;const a=null===(r=null===(i=null===(o=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===o?void 0:o.tags)||void 0===i?void 0:i[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(i,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,o;for(const[i,r]of Object.entries(bt))if(r(e)){if("nativeAd"===i){const r="default";t.dataset.testid=`${i}-${null!==(o=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==o?o:r}`;break}t.dataset.testid=i;break}})(e,r)},xt=e=>{var t;return(null===(t=Object.entries(bt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},kt=(e,t)=>{const n=e.width,o=(null!=t?t:window.screen.width)/n;return o<1?o:1},Et=(e,t=window.screen.width,n,o)=>{const i=kt(e,t),r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${i})`,r.style.transformOrigin="left top")},Tt=new Map;Tt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Tt.set("panorama",{scale:.79,transformOrigin:"center center"}),Tt.set("outstream",{scale:.79,transformOrigin:"center center"}),Tt.set("integration",{scale:.79,transformOrigin:"center center"}),Tt.set("toppanorama",{scale:.8,transformOrigin:"left center"});const It=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 o=xt(e),i=Tt.get(o),r=document.querySelector(`#${e.targetId}`);if(!r||!i)return;if(r.style.transformOrigin=i.transformOrigin,r.style.transform=`scale(${i.scale})`,!(null==i?void 0:i.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},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),St=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Ct=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:o=!1}={}}=c.get(),i=[`${C()}-geo`],r=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection",...o?i:[]],a=Object.fromEntries(Object.entries(e).filter(([e])=>r.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:a}}},d)}},Pt=(e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,o)=>{const i=document.createElement("script");i.async=!0,i.src=e;const r=()=>{d(),n()},a=()=>{d(),o(new Error(`Failed to load ${e}`))},d=()=>{i.removeEventListener("load",r),i.removeEventListener("error",a),clearTimeout(s)};i.addEventListener("load",r),i.addEventListener("error",a);const s=setTimeout(()=>{d(),o(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}),Ot=e=>e.includes("snoap.no"),Lt=e=>{var t,n,o,i,r;return!!(null===(r=null===(i=null===(o=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===o?void 0:o.adResponse)||void 0===i?void 0:i.ads[1])||void 0===r?void 0:r.rtb)},$t=rt([],()=>{const e=({width:e,height:t})=>{var n;const o=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!o)return;const{clientWidth:i,clientHeight:r}=o,a=e/i,d=t/r;o.style.transform=`scale(${a},${d})`,o.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}),jt=e=>{const t=rt([],()=>{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 o=n.contentDocument.createElement("style");o.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(o),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},Nt=[],_t={},qt=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const o=Dt(e);n?(zt(o,n),Mt(e,o,t)):(zt(o,n),Bt(e,o,t))})},zt=(e,t)=>{var n,o;const i=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!i)return;const r=t?"showFullscreen":"hideFullscreen";null===(o=i.contentWindow)||void 0===o||o.postMessage(`advertory:${r}-${e}`,"*")},Dt=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},Mt=(e,t,n)=>{e.classList.add("in-screen"),document.body.classList.add("fullscreen-scroll-in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Nt.includes(t)||Nt.push(t),n&&window.addEventListener("scroll",_t[t],{passive:!0})},Bt=(e,t,n)=>{Nt.includes(t)&&(n&&window.removeEventListener("scroll",_t[t]),document.body.classList.remove("fullscreen-scroll-in-screen"),e.classList.remove("in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},Ft=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:o=[".skyscraper_r"],headerZIndex:i=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),o.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&Rt(e,r,i,0),a.length&&Rt(e,a,i,40)}},Rt=(e,t,n,o)=>{const i=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-o:(r+t-(a+i))/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 Vt(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}Vt('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 Ut={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 Ht=null;const Wt=(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=`(${$t})()`,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(Ot(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=jt(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>Ot(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)),Ot(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)),Lt(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},Kt=()=>{Ht=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,o=e?e.offsetLeft:0,i=document.documentElement;i.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),i.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),i.style.setProperty("--advertory-fullscreen-scroll-left",`${o}px`)},Gt=()=>{Ht||(Ht=window.requestAnimationFrame(Kt))},Jt=(e,t)=>{var n,o,i,r;const{country:a}=c.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:o="#fff",margin:i="16px 0",beforeContentValue:r=""}=e,a=t/2,d=document.createElement("style");d.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${a}px),\n ${o} calc(50% - ${a}px),\n ${o} calc(50% + ${a}px),\n ${n} calc(50% + ${a}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${i};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${r&&"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: '${r}' !important;\n }`,d.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(d)})(null!==(o=null==t?void 0:t.overlayStyles)&&void 0!==o?o:{});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,o=new IntersectionObserver(e=>qt(e,n),{}),i=Dt(e);o.observe(e),n&&(_t[i]=Ft(e,t))})(l,t),s.className="advertory-fullscreen-scroll";const p=et(e,Oe)?"absolute":"fixed";s.style.position=p,l.className="advertory-fullscreen-scroll-wrapper",l.dataset.showTagSubscribeId=d,s.setAttribute("data-ad-label",Ut[a].adText),(null==t?void 0:t.moveCogwheelToTheLeft)&&(s.dataset.moveCogwheelToTheLeft="true"),Gt(),window.addEventListener("resize",Gt),null===(i=window.visualViewport)||void 0===i||i.addEventListener("resize",Gt),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",Gt)},Yt=({targetId:e})=>{const t=(e=>{const{requests:t}=window.apntag,n=Lt(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,o=Lt(e)?1:0;n&&(n.tags[e].adResponse.ads[o].rtb.banner.content=t)})(e,Wt(t,e))},Xt=()=>t(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,country:n,isMobileApp:o,fullscreenScroll:i}=c.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=c.getHandlers(),{getConsentAsync:a}=T(t,0,n),d=yield a(),s=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:o=>{const i=At(),{prebid:{relevantCbTimeout:r}={}}=c.get(),a="relevantCb"===o&&r?r:n[o].timeout,d=setTimeout(()=>{!n[o].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${o}'`),e=!0,i.loadTags&&i.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),l=At(),p=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=At();return{user:e,keywords:t}})();s.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=p;(()=>{const e=St();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(s.getCancel()||!l.loadTags)return u("core loadTags() call was cancelled",{cancel:s.getCancel(),apnTagLoadTags:!l.loadTags,condition:"or"}),void s.cleanup();const t=St();s.events.relevantCb.done=!0,s.failsafeOnTimeout("auctionCb");const o=d?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};u("prebid consentManagement",o),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},Y(n)),Ct(g,v))),u("core add prebid config",Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},Y(n)),Ct(g,v))),t.loadPrebid({configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s.getCancel()||(s.events.auctionCb.done=!0,l.loadTags(e)),s.cleanup()}},customNativeRender:e=>{Qt(e,r)},directRenderFn:e=>{const{settings:t,renderFn:n}=e,{bid:o,adDiv:r}=t||{};if(!r)return;const a=n(t),d=Object.assign(Object.assign({},o),{targetId:r.id,banner:!0});Be(d)&&(Jt(d,i),(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 o=new MutationObserver(()=>{n()&&o.disconnect()});o.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(a))}}),u("core load prebid",{configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s.getCancel()||(s.events.auctionCb.done=!0,l.loadTags(e))}},customNativeRender:e=>{Qt(e,r)},directRenderFn:()=>{}})})}),Qt=(e,t)=>{var n;const{divId:o,native:i,bid:r}=e,a=document.querySelectorAll(`[id^=${o}]`)[0],d=`RY-${a.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)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;t({native:i,targetId:d},c.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},Zt=(e,t,n)=>{const o=document.getElementById(`div_utif_${e}`);if(!o)return;const{apntag:i}=window,[r,a]=t;if(!o.dataset.lockedsize&&a&&r)o.style.width=`${r}px`,o.style.height=`${a}px`,n&&(i.resizeAd(o.id,[r,a]),o.dataset.lockedsize="true",o.dataset.lockedwidth=r.toString(),o.dataset.lockedheight=a.toString());else if(null==o?void 0:o.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=o.dataset;e&&t&&i.resizeAd(o.id,[e,t])}},en=["netboard","board"];class tn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,o;const{editionName:i}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(o=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==o?o:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",i),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return t(this,void 0,void 0,function*(){var t,n,o;const i=yield this.identityFacade.getIdentityUser(),r=null!==(o=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==o?o:"",a=(null==i?void 0:i.userId)?String(i.userId):"",d=this.buildUrl(e,{envId:r,spid:a});try{u("Starting fetching DrEdition ad from URL:",d);const e={method:"GET"},t=yield q.get(d,e);return u("Fetch operation completed successfully."),t}catch(e){u("Error during fetch operation:",e)}return null})}}let nn=class{getDrEditionUTMParams(e,t){var n;const{title:o="",clientName:i,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=o.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:i,utm_medium:d},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const o=this.getDrEditionUTMParams(t,n),i=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(o).forEach(([e,t])=>{i.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const o=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!o)return"";const i=this.getDrEditionUTMParams(e,t),r=new URL(o);return Object.entries(i).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,n){return t(this,void 0,void 0,function*(){const{id:t,autoplay:o,mute:i,videoLoop:r,vendor:a}=n.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:t,vgtvVendor:a,vgtvAutoplay:o,vgtvMuted:i,vgtvLoop:!!r,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:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const on=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):u("Dr. Edition container does not have a parent element, cannot remove height lock.")};class rn{constructor(e,t,n,o){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=o,this.drEditionAds=[]}fetchAndRenderAd(e,n){return t(this,void 0,void 0,function*(){var t,o;const{drEditionConfig:{containerSelector:i},renderAsBackfill:r=!1}=n,a=e.querySelector(i);if(!a)return void u(`Container with selector "${i}" not found.`);const d=yield this.drEditionService.fetchData(n);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(u("No Dr. Edition ads available to render. Collapsing whole placement."),fe(e.id),void on(a)):((null==d?void 0:d.itemId)&&r&&(u("Dr. Edition ad available to render as a Xandr backfill."),ye(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(a,d,n),yield null===(t=this.videoManager)||void 0===t?void 0:t.handle(d,n),on(a),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,n),null===(o=e.querySelector("a"))||void 0===o||o.addEventListener("pointerup",()=>null)):on(a))):(u("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void on(a))})}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 o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";ye(o)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const o=e.querySelector(".dr-edition-slider");if(!o)return!1;let i=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(i&&clearTimeout(i),i=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...o.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...o.children].forEach(e=>{r.observe(e)}),!0}}class an{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,n,o){return t(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:t}=T(o.tcf,o.isMobileApp,o.country),i=yield t(),r=o.device===Z.MOBILE?n.mobileHTML:n.desktopHTML;const a=i?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var t,i,r;e.search=null!==(r=null===(i=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===i?void 0:i.call(t,e,n,o))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,o)})})}}class dn{constructor(e){this.strategy=e}handle(e,n){return t(this,void 0,void 0,function*(){const{videoConfiguration:{id:t,preview:o}={}}=e;(t||o)&&(yield this.importScript(n),yield this.createVideoElement(e,n))})}importScript(e){return t(this,void 0,void 0,function*(){const t=e.drEditionConfig.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield Pt(t)}catch(e){u("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,n){return t(this,void 0,void 0,function*(){const t=document.createElement("div"),{node:o}=e.videoConfiguration,i=[...document.querySelectorAll(`#${o}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,n))return;this.strategy.handleVideo(t,e),null==i||i.appendChild(t),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==i?void 0:i.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,o,i;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(i=(o=t.drEditionConfig).addPreviewVideo)||void 0===i||i.call(o,d),!0))}}let sn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,o){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 o=null==n?void 0:n.textContent;return o?o.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:o}={}}=t,i=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:o}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,n,o){return t(this,void 0,void 0,function*(){var t,i,r,a,d,s,l,c;const p=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:o.editionName}});if(window.dispatchEvent(p),!this.pulse)return;const u=this.getEventInput(e,n,o,"view");(null===(t=this.pulse)||void 0===t?void 0:t.trackLegacyViewUIElement)?null===(r=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===r||r.call(i,u):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,u):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,u)})}trackContentClick(e,n,o){return t(this,void 0,void 0,function*(){var t,i,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,n,o,"click");this.pulse.trackLegacyClickUIElement?null===(i=(t=this.pulse).trackLegacyClickUIElement)||void 0===i||i.call(t,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class ln extends sn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){const{pulseData:{title:o,clientName:i="",creativeId:r}={}}=t,{columnName:a,primaryPosition:d}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:o,placement:{columnName:a,primaryPosition:d},"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":r},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let cn=class extends sn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var o,i,r,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:p}={}}=t,u=n.editionName,v=this.mapPageType(this.pageType),g=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulseObjectId)||void 0===r?void 0:r.call(i))&&void 0!==a?a: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,o){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,o),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,o){var i,r,a,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!==(a=null===(r=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getUrlWithParams)||void 0===r?void 0:r.call(i,t,n))&&void 0!==a?a: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:o,imageUrl:y,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const pn={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"},un={FRONT:"front"},vn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},gn=e=>t(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const o=document.createElement("script");o.id=e,o.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",o.async=!0;try{o.src=o.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(o,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),hn={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 t(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return pr})})}})}},mn=(e,t)=>{null==e||e.forEach(e=>{hn[e](t)})};class fn{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:o,autoplay:i,mute:r,vendor:a}}){yield t(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(e);mn(d,s);const l={id:n,node:o,autoplay:i,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},c=yield gn(l);c.once("assetReady",()=>{vn(c,d)}),c.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?s.classList.add("is-playing"):s.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?s.classList.add("is-inactive"):s.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),c.once("PulseStats:ready",()=>t(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===un.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:o}=new URL(n),i=o.split("/").filter(Boolean);return i.length?[...i.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 yn="https://www.aftonbladet.se/video-player-extras/latest/";class bn{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){const a={id:t,node:n,autoplay:o,mute:i,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${yn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${yn}external-link.js`]:{name:"ExternalLink"}}};yield gn(a),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 wn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class xn{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:o,autoplay:i,mute:r,vendor:a}}){const d={id:n,node:o,autoplay:i,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},wn(e)?e:{}),{provider:Object.assign(Object.assign({},wn(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 gn(d);s.once("PulseStats:ready",()=>t(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===un.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let kn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const En=(e,t,n)=>{var o;const{publisher:i,pageType:r,country:a}=e,d={[pn.VG]:new nn,[pn.E24]:new fn,[pn.AFTONBLADET]:new bn,[pn.SVD]:new xn}[i]||new kn,s=new(a===w.SE?ln:cn)(n,d,r),l=new tn(t,null!==(o=null==n?void 0:n.pulseTracker)&&void 0!==o?o:n),c=new an(d,s),p=new dn(d);return new rn(l,c,p,s)},Tn=()=>t(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 In{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 t(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 u("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const An=(e,t,n)=>{const{wrapperSelector:o}=null==e?void 0:e.drEditionConfig,i=document.querySelectorAll(o),r=new IntersectionObserver((o,i)=>((e,t,n,o,i)=>{const r=En(n,o,i);e.forEach(e=>{var o,i,a;if(!e.isIntersecting)return;const d=e.target,s=null!==(o=d.dataset.editionName)&&void 0!==o?o:"",l=null!==(i=d.dataset.pulseColumnname)&&void 0!==i?i:"",c=null!==(a=d.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(o,i,e,t,n),{rootMargin:"400% 0px"});i.forEach(e=>r.observe(e))},Sn=()=>t(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)}}),Cn=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},Pn=[],On=(e,n)=>t(void 0,void 0,void 0,function*(){var t;const{pulse:o,tcf:i,deviceType:r,drEdition:a,publisher:d,pageType:s,country:l,isMobileApp:c}=e;if(!(yield I(i,c,l,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n;const{deviceType:o,placements:i,drEdition:{fallbackGlobalEditionName:r}={}}=e,a=i[o]||i.desktop,d=le(t.targetId),s=a.find(e=>e.id===d),l=en.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)||r;return s&&l&&!c&&p?(Pn.push(d),Object.assign(Object.assign({},s),{drEdition:Object.assign(Object.assign({},s.drEdition),{editionName:p})})):null})(e,n);if(!p)return;if(!(null==o?void 0:o.instance))return void u("Pulse has not been passed as a prop, aborting");const v=yield Tn(),g=new In(v),h=En({publisher:d,pageType:s,country:l},g,null==o?void 0:o.instance),m=document.getElementById(n.targetId);if(!m||!a)return;m.classList.value="";const f=document.createElement("div");f.className=a.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=f.outerHTML;const y={editionName:(null===(t=null==p?void 0:p.drEdition)||void 0===t?void 0:t.editionName)||"",drEditionConfig:a,device:r,tcf:i,isMobileApp:c,country:l,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,y)}),Ln="collapseAd",$n="hideAd",jn="resizeAd",Nn="renderDrEditionFallback",_n="wallpaperImageUrl",qn="wallpaperColor",zn="velvet",Dn=[jn,_n,qn,Ln,$n,Nn,zn];let Mn;const Bn=e=>{if("object"==typeof e)return e;if(t=e,me.test(t)){const t=e.replace(/^wallpaper:url:/,"");return{name:_n,wallpaperImageUrl:t}}var t;if((e=>e.startsWith("wallpaper:color:"))(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:qn,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")&&Dn.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}},Fn=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||!Dn.some(e=>n.name===e))return;const{name:o,targetId:i,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;o===zn&&d&&(d.includes("noScroll")&&(Mn=(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==Mn||Mn(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),o!==Ln&&o!==$n||!i||fe(i),o===jn&&i&&d&&Zt(i,d),o===Nn&&i&&(fe(i),On(c.get(),{targetId:i})),"resizeMediationAd"===o&&i&&s&&Zt(i,s,!0),o===_n&&r&&(e=>{const t=document.querySelector(`.${ue}`);t&&(t.style.backgroundImage=`url(${e})`)})(r),o===qn&&a&&(e=>{const t=document.querySelector(`.${ue}`);t&&(t.style.backgroundColor=e)})(a)},Rn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Vn=()=>{const{publisher:e,country:n,finnBlink:o}=c.get(),{loadFinnBlinkAd:i,wallpaperHandlers:{adjustAdToHorseshoe:r}}=c.getHandlers(),a=window.apntag,d={publisher:e,country:n,finnBlink:o},s=e=>{ye(e),ae(()=>a.showTag(e))};return{withXandrAd:s,withFinnBlinkAd:e=>t(void 0,void 0,void 0,function*(){yield i(e,d,null)}),withFullAdsChain:e=>t(void 0,void 0,void 0,function*(){yield i(e,d,s,()=>{we.getData("horseshoe").isAvailable&&r(e)})})}},Un=(e,t,n)=>{const o="true"===n.dataset.isFinnBlinkOnlyPlacement;return Ge(t)&&o?(u(`loading finn blink ad for blink only placement for ${t}`),void Vn().withFinnBlinkAd(t)):Ge(t)?(u(`loading finn blink ad with full ads chain for ${t}`),void Vn().withFullAdsChain(t)):void ae(()=>(u("core showTag",{id:t}),e.showTag(t)))},Hn=(e,n)=>t(void 0,void 0,void 0,function*(){yield de,yield se;const t=new IntersectionObserver((t,n)=>((e,t,n,o)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:i}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(i),a=document.getElementById(r);u("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,o),a&&(t.unobserve(a),t.disconnect())})})(t,n,Un,e),Rn(n));t.observe(e)}),Wn=new Map,Kn=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Gn=".brandstudio-premium-content-widget",Jn=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Yn=({adWrapper:e,placementContainer:t})=>{const n=Jn({adWrapper:e,placementContainer:t});var o;null==e||e.style.setProperty("height",`${n}px`),ke(o=t),o.innerHTML=""},Xn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Qn=({adWrapper:e,placementContainer:t})=>{const{publisher:n}=c.get(),o=Kn.includes(n)&&Boolean(t.closest(Gn));const i=o?t.closest(Gn):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!o&&!a||o&&!i)return;if(a)return Xn(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=i;d&&s.contains(d)?Xn(d):s.hasAttribute("style")&&Xn(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},Zn=(e,t,n,o,i,r)=>{var a;const d=performance.now(),s=null!==(a=Wn.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(o,i)&&n<0;d-s>=i&&l&&(Wn.set(t,d),((e,t,n)=>{const o=null==n?void 0:n.parentElement;o&&n&&Yn({adWrapper:o,placementContainer:n}),ae(()=>{e.setKeywords([t],{[`${C()}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},eo=(e,t,n)=>{const o=new IntersectionObserver((e,o)=>((e,t,n,o)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:i,boundingClientRect:r}=e;t(window.apntag,i.id,r.y,n,o,i)})})(e,Zn,t,n),Rn(300));o.observe(e)},to=(e,t=6)=>{const n=[];for(let o=0;o<e.length;o+=t){const i=e.slice(o,o+t);n.push(i)}return n},no=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),oo=(e,t=0)=>{const n=e.getBoundingClientRect(),o=window.innerHeight;return n.bottom>-t&&n.top<o+t},io=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=c.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),co(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},ro=(e,t,n)=>{const o=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const i of o){const o=e.find(e=>{var t;return e.id===(null===(t=i.firstElementChild)||void 0===t?void 0:t.id)&&e.bfCacheRefresh}),r=null==o?void 0:o.threshold;oo(i,r)&&o&&(xe(o.id),n.length&&i.classList.remove(...n),co([o],t))}},ao=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},isMobileApp:o}=c.get();t&&(e.forEach(({id:e})=>{const t=so(e);t&&(t.dataset.bfCacheRefresh="true")}),o?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&ro(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const o=()=>{window.scrollY>0&&(window.removeEventListener("scroll",o),ro(e,!1,t))};n.persisted&&(no()?window.addEventListener("scroll",o,{passive:!0}):ro(e,!1,t))})})(e,n))},so=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},lo=e=>{const{id:t,allowedFormats:n}=e,o=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(so(t)),i=(e=>1===e[0]&&1===e[1])(o),r={sizes:[o],allowedFormats:i?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return i||(r.native=void 0),r},co=(e,t=!1)=>{const{requestSize:n=s}=c.get(),o=e.map(({id:e})=>e),i=to(o,n);if(t)for(const t of e){const e=lo(t);window.apntag.modifyTag(t.id,e)}for(const e of i)ae(()=>window.apntag.refresh(e))};const po="#fff",uo="#0098da",vo=(e,t=!0)=>{(e===nt||e===ot)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},go=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},ho=e=>{document.body.style.overflow=e?"initial":"hidden"},mo=e=>{const t=yo(e),n=fo(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),ho(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},fo=e=>{const t=()=>mo(e);return window.addEventListener("advertory:closeTakeover",t),go(),t},yo=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&mo(e)};return go(),window.addEventListener("keydown",t),t},bo=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(yo(e),fo(e),go(),t.addEventListener("click",()=>{mo(e)}),ho(!1))},wo=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),fo(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},xo=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>mo(e))})(e)},ko=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=c.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),o=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&o&&(o.style.display="flex",o.innerText=Ut.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Eo=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=Ut.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},To=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=Ut.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Io=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=Ut.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Ao=()=>{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)},So=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${yt})()`,e+t.outerHTML})(e)),n},Co=e=>{const t=(e=>{const{requests:t}=window.apntag,n=Lt(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,o=Lt(e)?1:0;n&&(n.tags[e].adResponse.ads[o].rtb.banner.content=t)})(e,So(t))},Po=e=>t(void 0,void 0,void 0,function*(){const{takeover:t}=c.get(),{targetId:n}=e,o=document.querySelector(`#${n}`),i=document.querySelector(".advertory-takeover-wrapper");if(!o||!i||!t)return;const r=(e=>{const{width:t,height:n}=e;return ut(t,n)?tt:et(e,_e)?it:vt()?ot:nt})(e),a=i.offsetHeight,d=window.scrollY>a;i.style.display="block",!d&&vo(r,!1),((e,t)=>{({[nt]:To,[tt]:ko,[ot]:Eo,[it]:Io})[t](e)})(i,r),Ao(),((e,t)=>{({[nt]:wo,[ot]:wo,[tt]:bo,[it]:xo})[t](e)})(i,r),((e,t,n)=>{if(!n)return;({[nt]:()=>{const{buttonLabel:o}=mt(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=o?o:"")})},[tt]:()=>{const{themeColors:o,logotype:i,buttonLabel:r,showArrowIcon:a}=mt(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!=r?r:""),".advertory-splash-close"===t&&a){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&&i&&(n.setAttribute("src",i.url),n.setAttribute("alt",i.alt)),".advertory-splash-navbar-wrapper"===t&&o){const{backgroundColor:e,color:t}=o;n.style.setProperty("background-color",null!=e?e:po,"important"),n.style.color=null!=t?t:uo}}})},[ot]:()=>{const{buttonLabel:o,showArrowIcon:i,showCloseButton:r=!0}=mt(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||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||i||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=o?o:""))})},[it]:()=>{}})[t]()})(i,r,t),yield gt(),!d&&vo(r,!0),ft(e,r)});Vt(".advertory-brandmetrics-survey{width:100%}");const Oo="advertory-brandmetrics-survey",Lo=()=>t(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},country:n,isMobileApp:o,tcf:i}=c.get(),r=yield I(i,o,n,"norstat");if(!e||o||!r)return;const a=(e=>{const{ppid1:t,ppid2:n}=W.getPPIDs(),{ppid1:o,ppid2:i}=K.getPPIDs(),r=(new H).add(n,D[e]).add(t,M[e]).add(i,B[e]).add(o,F[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(n);((e,n,...o)=>{t(void 0,[e,n,...o],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const o=document.createElement("img");o.src=e,o.id=null!=t?t:"",n&&(o.style.display="none"),document.body.appendChild(o)})})(`https://sch-map.norstatsurveys.com/api/nids/${n===w.NO?"schibsted":"schibstedse"}/map/${a}`,"norstat")}),$o=(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,jo=e=>`externalImpId:'${e}'`,No=e=>{var t;const{forwardExternalImpId:n=!1,tracker:o}=c.get(),i=(e=>{var t;if(!e.positionConfig)return e;const n=e.keywords[`${P()}-count`],o=e.positionConfig.find(e=>e.adPositionIndex===n);if(!o)return e;const i=o.keywords?Object.assign(Object.assign({},e.keywords),o.keywords):e.keywords;return Object.assign(Object.assign({},e),{sizes:null!==(t=null==o?void 0:o.sizes)&&void 0!==t?t:e.sizes,keywords:i})})(e),{id:r,sizes:a,keywords:d,allowedFormats:s,invCode:l,ssa:p=!1,nativeCustomProperties:v,safeframeConfig:g,dynamicSizeWidthCheck:h=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||ct())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],o=null==n?void 0:n.filter(e=>e!==ot),i=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":o}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:i})})(i),m=Object.assign({invCode:l,sizes:a,targetId:r,keywords:$o(d,p),allowedFormats:s,dynamicSizeWidthCheck:h},g&&{safeframeConfig:g}),f=(e=>{var t,n,o,i,r,a,d;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(o=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===o?void 0:o.pageViewId)?(u("Tracker state pageViewId is:",null===(r=null===(i=null==e?void 0:e.instance)||void 0===i?void 0:i.state)||void 0===r?void 0:r.pageViewId),null===(d=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===d?void 0:d.pageViewId):(u("Tracker state does not contain field pageViewId or it is empty"),""):(u("Tracker state is empty"),""):(u("Tracker is not configured in initAdvertory function"),"")})(o);n&&f&&(u("External Impression ID assigned to defineTag:",jo(f)),m.externalImpId=jo(f));const y=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon2:{required:!1}}).reduce((t,[n,o])=>((null==e?void 0:e.includes(n))&&(t[n]=o),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}}))(v);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(m.native=y),m},_o=e=>!e.includes("takeover")||ct(),qo=e=>{const{source:t}=e;return"csm"===t},zo=(e,t,n,o)=>{const i=t.parentElement;if(!i)return;const r=e?`-${e}`:"",a=o?`__${o}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),i.classList.remove(...i.classList),t.classList.add(d),i.classList.add(s),t.dataset.adType=n},Do="finn-blink",Mo="native-ad",Bo=e=>{const{publisher:t=""}=c.get(),n=document.querySelector(`#${e}`);if(!n)return;const o=`-${t}`;n.classList.remove(`advertory${o}-finn-blink`),n.classList.remove(`advertory${o}-finn-blink-wrapper`)},Fo=e=>{if(!e)return e;const t=e[`${C()}-targetid`],n=t?le(t[0]):"";return Object.assign(Object.assign({},e),t&&{[`${C()}-targetid`]:[n]})},Ro=e=>Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${C()}-geo`]&&{[`${C()}-geo`]:["geo-test-value"]}),e[`${C()}-geofence`]&&{[`${C()}-geofence`]:["geofence-test-value"]}),e[`${C()}-weather`]&&{[`${C()}-weather`]:["weather-test-value"]}),Vo=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 o=n.split(",")[0].split(":")[0],i=e.find(e=>e.invCode===o),r=document.querySelector(`[id^=${null==i?void 0:i.id}]`);r&&r.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"})})()},Uo=(e,n)=>t(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})}),Ho={arrayMerge:(e,t)=>t},Wo=e=>t(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:o}=e;return Boolean(t&&n&&(null==o?void 0:o.publisherClassName))})(e))return e;try{const n=yield(e=>t(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,o=setTimeout(()=>n.abort(),5e3);try{return yield q.get(t,{method:"GET",signal:n.signal})}catch(e){throw u("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(o)}}))(e);return n?(({siteConfig:e,configOverrides:t})=>{var n;const{keywords:o,refresh:i,placements:a,threshold:d,batchSize:s}=t,l=r.all([e.placements,a],Ho),c=r(e.pageOptions,{keywords:o},Ho),p=r(e.appearanceConfig,{defaultThreshold:d},Ho),u=r(null!==(n=e.refreshConfig)&&void 0!==n?n:{},{scrollRefreshEnabled:i},Ho);return Object.assign(Object.assign({},e),{placements:l,requestSize:null!=s?s:e.requestSize,pageOptions:c,appearanceConfig:p,refreshConfig:u})})({siteConfig:e,configOverrides:n}):e}catch(t){return u("Error fetching S3 config, using site config",{error:t}),e}}),Ko=".advertory-right-column-track",Go="--advertory-right-column-track-height",Jo=e=>e.getBoundingClientRect().top+window.scrollY,Yo=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Xo=(e,t)=>{const n=(o=t,`${Math.max(0,Math.round(o))}px`);var o;document.body.style.setProperty(e,n)},Qo=(e,t)=>`${e}-${t}`,Zo=(e,t,n)=>{var o;const i=Array.from(null!==(o=e.querySelectorAll(t))&&void 0!==o?o:[]),r=(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===r.length)return;const a=Jo(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Yo(e);Xo("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const o=Jo(e),i=Qo(Go,t),r=o-n,a=Qo("--advertory-right-column-split-point-height",t),d=Yo(e);Xo(i,r),Xo(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Qo("--advertory-right-column-ad-height",t),o=Yo(e);Xo(n,o)})(i[t])});((e,t)=>{const n=Jo(e);Xo(Go,n-t)})(r[Math.min(i.length,r.length-1)].point,a)};let ei=!1;class ti{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:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class ni{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class oi{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:o}=this.parseKilkayaData(e);return{id:o,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return t(this,void 0,void 0,function*(){var t,n,o,i,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const p=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===i||i.call(o,p):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,p):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,p)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,o,i,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(i=(o=this.pulse).trackClickUIElement)||void 0===i||i.call(o,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class ii extends oi{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,o,i,r,a;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!==(i=null===(o=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===o?void 0:o.call(n))&&void 0!==i?i: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===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:o}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),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 ri="[data-k5a-teaser-analytics]",ai=(e,t,n)=>{const o=document.querySelectorAll("k5a-stream");if(!o.length)return;const i=new ii(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,o=n.querySelector(ri);Boolean(null==o?void 0:o.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(ri);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});o.forEach(e=>{d.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})};class di{handleKilkayaStreamTracking({pulse:e,pageType:t,publisher:n}){if(!(null==e?void 0:e.instance))return;const o={[pn.VG]:new ti}[n]||new ni;ai(e.instance,o,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const o=n.parentElement;o&&(u(`Kilkaya placement ${n.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 o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";ye(o)}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield Pt(e)})}run(e){return t(this,void 0,void 0,function*(){const{tcf:t,isMobileApp:n,country:o,kilkaya:i}=e;if(!(null==i?void 0:i.enabled))return;const r=yield I(t,n,o,"kilkaya");r&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(r),yield this.loadKilkayaScript(i.url),this.handleKilkayaStreamTracking(e))})}}const si=1e4,li=e=>e.some(e=>e.some(e=>!!e&&oo(e,0)));let ci;const pi=()=>{const{widescreenSwitching:e}=c.get(),{enabled:t,rotationInterval:n=si,widescreenIdPrefix:o}=null!=e?e:{};if(!t)return;const i=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=c.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(o);let r=0,a=Date.now(),d=li(i);if(!i.length)return;ci&&window.removeEventListener("scroll",ci);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(i);const p=((e,t)=>{let n=null;return(...o)=>{null===n&&(e(...o),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=li(i)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=i.map(e=>e[r]),n=i.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);ci=p,window.addEventListener("scroll",p)};Vt('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const ui={Blink:"Blink"},vi=new Map,gi=e=>{var t;if(!vi.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(ui)){const o=e[t];null!=o&&(window[n]=o)}})(e)).catch(t=>{throw vi.delete(e),t});vi.set(e,t)}return null!==(t=vi.get(e))&&void 0!==t?t:Promise.resolve()},hi="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",mi={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return u(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){u(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){u(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},fi="finn_blink_id",yi=e=>{var t,n;const o=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==o?void 0:o.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},bi=(e,t)=>{const{finnBlink:{enabled:n}={}}=c.get(),o=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!o||!n)return null;const{limit:i,height:r,requireImage:a,theme:d,rec:s,distributionTypes:l,position:p,offset:u,advertoryTheme:v}=t||{};return{selector:`#${yi(e)}`,enabled:o,position:null!=p?p:e,distributionTypes:null!=l?l:[],limit:null!=i?i:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:s,theme:"dark"===d?"dark":"light",advertoryTheme:v}},wi=(n,o,i)=>t(void 0,void 0,void 0,function*(){const{placements:r,deviceType:a}=c.get();u(`rendering finn blink ad for ${n}`);const d=le(n),s=r[a].find(e=>e.id===d),l=bi(n,null==s?void 0:s.finnBlink),{publisher:p,country:v,finnBlink:g}=o,{userId:h,uuid:m,channel:f,theme:b}=null!=g?g:{},w=null!=f?f:`${p}.${v}`,x=(e=>{if(!e){const e=Q();return null!=e?e:""}return e})(h),k="dark"===b?"dark":"light";if(!(null==l?void 0:l.enabled))return u(`Finn blink is not enabled on placement: ${n}`),i&&i(n),void Bo(n);var E;if((e=>{var t;const n=yi(e),o=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==o?void 0:o.classList)||void 0===t?void 0:t.contains("finn"))})(n))u(`Finn blink already loaded ${n}`);else try{const n=yield t(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=c.get(),t=mi.get(fi),n=y("finncode");if(!e||n)return"";if(!t){const t=yield q.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return mi.set(fi,n),n}return t});yield(E=Object.assign(Object.assign({},l),{hashed_email:n,channel:w,id:x,theme:k,uuid:m}),t(void 0,void 0,void 0,function*(){const{id:t,hashed_email:n,theme:o}=E,i=e(E,["id","hashed_email","theme"]),r=window[ui.Blink];if(!r)return;const a=new r({remote:"https://www.finn.no/distribution-front/external/carousel",id:t,hashed_email:n,theme:o});yield a.inject(i)})).then(()=>{((e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageType:o}=c.get(),i=document.querySelector(`#${e}`);if(!i)return;if(i.classList.add("disable-cogwheel"),!n)return;zo(n,i,Do,null!=t?t:o),wt({preferredTestIdData:{targetId:e,testId:"finn"}})})(l.selector.replace("#",""),l.advertoryTheme)})}catch(e){u(`Finn blink error ${e}`),i&&i(n),!i&&fe(n),Bo(n)}}),xi=(e,t)=>{var n;(u(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):u(`Cannot perform afterend on: ${e.id}`)},ki=e=>document.querySelector(`#${e}`);let Ei,Ti=[];const Ii=["takeover","wallpaper"],Ai=e=>{const t=(e=>{const t=we.getData("alertoryConfigKeywords"),{queryConfig:n,placements:o,tcf:i,glimr:r,appearanceConfig:a,requestSize:d=s,publisher:l,country:c,pageType:p,deviceType:u,isMobileApp:v=!1,pageOptions:{member:g},takeover:h,fullscreenScroll:m,useAppTabletInvCode:f}=e;return{xandr:{member:g,keywords:t,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({publisher:l,country:c,pageType:p,deviceType:u,placements:o,tcf:i,requestSize:d,isMobileApp:v,useAppTabletInvCode:f},r&&{glimr:r}),n&&{queryConfig:n}),a&&{appearanceConfig:a}),h&&{takeover:h}),m&&{fullscreenScroll:m})}})(e);window.advertory={initialized:!0,siteConfig:e,alertoryConfig:t}},Si=()=>t(void 0,void 0,void 0,function*(){const{pageOptions:e}=c.get(),{preparePageOptions:n}=c.getHandlers(),o=(()=>{const{sandboxAdIframeEnabled:e=!0}=c.get();return{sandboxAdIframe:e,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get();return(yield I(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),r=yield n(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},o)}),i));(e=>{const t=we.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Ro(e);we.setData("alertoryConfigKeywords",n)})(r.keywords),ae(()=>Ei.setPageOpts(r))}),Ci=e=>t(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,isMobileApp:o,country:i}=c.get();Pi(e);const r=yield I(n,o,i,"prebid");(null==t?void 0:t.enabled)&&r?(u("core loadPlacements prebid enabled"),yield Xt()):(u("core load tags invoked without prebid enabled"),Oi(e))}),Pi=e=>{const{prepareTag:t}=c.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const o=t.findIndex(t=>e.id.includes(t)),i=t.findIndex(e=>n.id.includes(e));return-1!==o&&-1===i?-1:-1===o&&-1!==i?1:o-i})})(e).forEach(e=>{u("core defineTags",{placement:e});const o=No(e);if(_o(e.id)){const i=t(o),r=(e=>{const{allowedFormats:t,invCode:n,keywords:o,sizes:i}=e;return{adTypes:t,invCode:n,keywords:Fo(o),sizes:i}})(i);n.push(r),ae(()=>(u("core defineTag - add to the queue",{placement:e,preparedTag:i}),Ei.defineTag(i)))}}),(e=>{var t,n,o;(null===(o=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===o?void 0:o.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},Oi=e=>{const t=e.filter(({id:e})=>_o(e)).map(({id:e})=>e);t.length&&ae(()=>(u("core loadTags",{placementsIdsToLoad:t}),Ei.loadTags([...t])))},Li=(e,n)=>t(void 0,void 0,void 0,function*(){const{appearanceConfig:t,deviceType:o}=c.get(),{threshold:i,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(n),d=null==t?void 0:t.defaultThreshold[o];a&&(u("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:n,threshold:i,deviceDefaultThreshold:d}),yield Hn(a,null!=i?i:d)),a&&r&&(u("core showAd - setup refreshing",{placement:e,adObj:n}),a.dataset.refresh=r.toString())}),$i=e=>e.some(({id:e})=>Ii.some(t=>e.includes(t))),ji=e=>t(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return;const[o,i]=(e=>e.reduce(([e,t],n)=>{var o;return(null===(o=null==n?void 0:n.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),r=(e=>{const{requestSize:t=s,queryConfig:{placementBatches:n}={},deviceType:o}=c.get(),i=Pe(e),r=Object.keys((null==n?void 0:n[o])||{}).map(e=>i[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({id:e})=>e)),d=e.filter(({id:e})=>!a.has(e));return[...r,...to(d,t)]})(i);for(const e of r)$i(e)?(u("core loadAds without lazy loading",{placementsToLoad:e}),yield Ci(e)):e.length&&(u("core loadAds with lazy loading",{placementsToLoad:e}),yield Ni(e));yield(e=>t(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,deviceType:n}=c.get(),o=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{threshold:e,id:n}=t,i=ki(n);i&&(yield Hn(i,null!=e?e:o))}}))(o)}),Ni=e=>t(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=c.get(),o=[];if(!t)return u("lazy load is not enabled",{placements:e}),void(yield Ci(e));const i=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{u("lazy load is enabled - handler start",{loadedPlacementIds:o,placements:e});const i=e.every(e=>o.includes(e.id)),r=e.map(e=>e.id);!i&&o.push(...r),!i&&Ci(e),u("lazy load is enabled - handler stop",{loadedPlacementIds:o,placements:e,arePlacementsLoaded:i,placementIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.id);t&&(u("lazy loading - observe element",{placementId:e.id,element:t}),i.observe(t))})}),_i=()=>t(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:n,wallpaperHandlers:{initWallpaperAd:o,adjustAdToHorseshoe:i}}=c.getHandlers(),{wallpaper:r,fullscreenScroll:a}=c.get(),d=[];ae(()=>{Ei.onEvent("adRequested",()=>{e.adRequested()}),Ei.onEvent("adAvailable",i=>t(void 0,void 0,void 0,function*(){var t,d,s,l,p,v;u("core adAvailable start",{placementsAvailable:Ti,adObj:i,isFullscreenScrollAd:Be(i),isFinnBlink:Ge(i.targetId),isNativeAd:Fe(i),isMediation:qo(i),isTakeoverAd:Ve(i),isCollapseAd:We(i),isWallpaperAd:He(i)});const g=null===(s=null===(d=null===(t=null===window||void 0===window?void 0:window.apntag)||void 0===t?void 0:t.requests)||void 0===d?void 0:d.tags[i.targetId])||void 0===s?void 0:s.adResponse.ads;qo(i)&&g&&(null===(l=g[1])||void 0===l?void 0:l.rtb)&&(i.banner=null===(v=null===(p=g[1])||void 0===p?void 0:p.rtb)||void 0===v?void 0:v.banner),Be(i)&&Yt(i),Xe(i)&&pi(),Be(i)&&!Ge(i.targetId)&&Jt(i,a),!Fe(i)||qo(i)||Ge(i.targetId)||n(i,c.get()),Ve(i)&&!We(i)&&(Co(i.targetId),yield Po(i)),He(i)&&(o(()=>ae(()=>window.apntag.showTag(i.targetId)),r),we.setData("wallpaper",{isAvailable:!0})),(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(i)&&we.setData("horseshoe",{isAvailable:!0}),wt({adObj:i}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const o=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;o&&((e,t)=>{const{height:n,width:o,native:i}=e;i?t.dataset.adSizes="[1,1]":n&&o&&(t.dataset.adSizes=`[${o},${n}]`)})(e,o)})(i),e.adAvailable(i);const h=Ti.find(({id:e})=>e===i.targetId);h&&(yield Li(h,i),Ti=Ti.filter(e=>e.id!==h.id)),u("core adAvailable stop",{placementsAvailable:Ti,adObj:i,isFullscreenScrollAd:Be(i),isFinnBlink:Ge(i.targetId),isNativeAd:Fe(i),isMediation:qo(i),isTakeoverAd:Ve(i),isCollapseAd:We(i),isWallpaperAd:He(i)})})),Ei.onEvent("adLoaded",t=>{const{refreshConfig:o,appearanceConfig:r}=c.get(),a=document.getElementById(t.targetId);Ge(t.targetId)&&(e=>{const{fullscreenScroll:t}=c.get(),{initNativeAd:n}=c.getHandlers();Be(e)&&Jt(e,t),Fe(e)&&n(e,c.get())})(t);d.includes(t.targetId)&&Fe(t)&&(n(t,c.get()),wt({adObj:t})),!d.includes(t.targetId)&&qo(t)&&d.push(t.targetId),We(t)&&fe(t.targetId),Ve(t)&&((e,t)=>{var n;const o="100%",i="100%";e.resizeAd(t,[o,i]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===o&&n===i||(r.style.width=o,r.style.height=i)}}).observe(r,{attributes:!0,attributeFilter:["style"]})})(Ei,t.targetId),Re(t)&&(e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:o}={}}=c.get();if(!t||!n||!o)return;const i=t.parentElement;i&&(t.classList.add(`advertory-${n}-${o}__full-width-ad`),i.classList.add(`advertory-${n}-${o}-wrapper__full-width-ad`))})(t),(e=>et(e,$e))(t)&&(e=>{var t;const n=document.querySelector(`#${e.targetId}`),o=null===(t=document.querySelector(`#${e.targetId}`))||void 0===t?void 0:t.parentElement,i=null==n?void 0:n.querySelector("iframe"),r=null==i?void 0:i.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:d}={}}=c.get();if(!(n&&i&&r&&o))return;o.classList.add(`advertory-${a}-${d}__vertical-full-width-ad-wrapper`);const s=window.innerWidth,l=Math.round(s/1080*1920);n.style.width="100%",n.style.height=`${l}px`,n.classList.add(`advertory-${a}-${d}__vertical-full-width-ad`);const p=kt(e,n.offsetWidth);r.style.transform=`scale(${p})`,r.style.transformOrigin="left top"})(t),((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,o=document.querySelector(`#${n}`),i=null==o?void 0:o.parentElement;if(!i||!o)return;Qn({adWrapper:i,placementContainer:o});const{delayTime:r=1e3}=t,a=(new Date).getTime();o&&"true"!==o.dataset.subscribedForRefresh&&(o.dataset.subscribedForRefresh="true",o.dataset.refresh&&eo(o,a,r))})(t,o),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(t.targetId);var s,l;we.getData("horseshoe").isAvailable&&i(t.targetId),(e=>{var t,n,o,i,r,a;const{adScaleConfig:d,deviceType:s}=c.get();if(!(null==d?void 0:d.enabled))return;if(et(e,Le))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],p=Ie(e.targetId.split("-")[0]);if(!l.includes(p))return;const u=null!==(o=null===(n=d.offset)||void 0===n?void 0:n[p])&&void 0!==o?o:0,v=document.getElementById(e.targetId),g=null!==(i=null==v?void 0:v.offsetWidth)&&void 0!==i?i:window.screen.width,h=null!==(a=null===(r=null==v?void 0:v.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;Et(e,(g<h?g:h)-u)})(t),e.adLoaded(t),s=t.targetId,!document.querySelector(`#gdprAdTransparencyCogWheelButton-${s}`)&&(null===(l=window.gdpr)||void 0===l?void 0:l.setupButton)&&window.gdpr.setupButton(s),a&&(a.classList.add("ad-loaded"),(e=>{var t;const{siteSpecificConfig:n}=c.get(),o=null!==(t=null==n?void 0:n.mainColumnWidth)&&void 0!==t?t:1/0;e.clientWidth>o&&e.setAttribute("data-two-column-ad-layout","true")})(a)),It(t),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:t.targetId,adFormat:xt(t)}}))}),Ei.onEvent("adNoBid",n=>t(void 0,void 0,void 0,function*(){fe(n.targetId),yield On(c.get(),n),ht(n)&&(yield gt()),e.adNoBid(n)})),Ei.onEvent("adError",(n,o)=>t(void 0,void 0,void 0,function*(){ht(o)&&(yield gt()),e.adError(n,o)})),Ei.onEvent("adCollapse",()=>{e.adCollapse()}),Ei.onEvent("adRequestFailure",t=>{fe(t.targetId),e.adRequestFailure(t)}),Ei.onEvent("adBadRequest",t=>{fe(t.targetId),e.adBadRequest(t)}),Ei.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),Ei.onEvent("adNoBidMediated",t=>e.adNoBidMediated(t))})}),qi=(e,n)=>t(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{clearAds:o,reloadExistingAds:i,renderFinnBlinkPlacements:r,contextSelector:a}=null!=n?n:{};if(o)return Ee(),[];i&&(Ee(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{ye(e.id)})),p(null!=e?e:{}),yield Si();let d=Se(a);return r&&(d=d.filter(e=>Ge(e.id))),d.length>0&&(Ti=[...Ti,...d.map(e=>Object.assign({},e))],io(d),ao(d),yield ji(d)),Ti}),zi=(e,n)=>t(void 0,void 0,void 0,function*(){var o;c.set(e),c.setHandlers(n),we.initialize(),window.addEventListener("message",Fn,!1),Ei=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=Ei,u("Apn tag is set up on window"),yield Promise.allSettled([t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get();(yield I(e,t,n,"xandr-endpoint"))||Ei.setEndpoint("ib.adnxs-simple.com",!0)}),t(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,isMobileApp:n,country:o}=c.get(),i=yield I(t,n,o,"prebid");(null==e?void 0:e.enabled)&&i&&(yield Pt(null==e?void 0:e.url))}),G(e),t(void 0,void 0,void 0,function*(){const{astUrl:e}=c.get();yield Pt(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),t(void 0,void 0,void 0,function*(){const{gptUrl:e,tcf:t,isMobileApp:n,country:o}=c.get();(yield I(t,n,o,"gpt-endpoint"))&&(yield Pt(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),t(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,url:t}={},tcf:n,isMobileApp:o,country:i}=c.get(),{getConsentAsync:r}=T(n,0,i),a=yield r();if(e&&t&&a){if(yield Pt(t),document.querySelector(`.${Oo}`))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(Oo)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),S(),t(void 0,void 0,void 0,function*(){const{gdpr:{url:e,allowHidingAds:t=!0}={}}=c.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield Pt(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),yield Lo(),u("Libraries have been loaded and trackers have been set"),yield(o=n.librariesToLoad,t(void 0,void 0,void 0,function*(){const e=o.map(e=>Pt(e));yield Promise.all(e)})),yield _i(),yield Si(),u("Page options have been set"),Ai(e),u("Advertory is setup on window"),Ti=Se(),io(Ti),ao(Ti),yield ji(Ti),u("Ads has been loaded",Ti),((e,n)=>{var o,i,r,a;if(!Cn())return void u("Ad block not enabled, Dr. Edition backfills will not be rendered");u("Ad block is enabled, Dr. Edition backfills will be rendered");const d=null!==(a=null===(r=null===(i=null===(o=e.finnBlink)||void 0===o?void 0:o.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===r?void 0:r.map(([e])=>e))&&void 0!==a?a:[],s=new IntersectionObserver((n,o)=>t(void 0,void 0,void 0,function*(){for(const t of n){if(!t.isIntersecting)continue;const n=t.target;o.unobserve(n),yield On(e,{targetId:n.id})}}),{rootMargin:"400% 0px"});n.filter(e=>!d.some(t=>e.id.startsWith(t))).forEach(e=>{const t=document.getElementById(e.id);t&&s.observe(t)})})(e,Ti),Vo(Ti),yield n.replaceAdsWithFinnBlink(e.finnBlink),yield(e=>t(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield I(e.tcf,e.isMobileApp,e.country,"handleDrEdition")))return;const n=yield Tn(),o=new In(n);An({publisher:e.publisher,drEditionConfig:e.drEdition,device:e.deviceType,pageType:e.pageType,country:e.country},o,null===(t=e.pulse)||void 0===t?void 0:t.instance)}))(e),(e=>{if(!(null==e?void 0:e.enabled)||ei)return;const{splitPointIDs:t,adSelector:n,trackSelector:o=Ko}=e,i=document.querySelector(o);if(!i)return;ei=!0;const r=()=>{Zo(i,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)}),new ResizeObserver(r).observe(i)})(e.rightColumnSplit),yield(e=>t(void 0,void 0,void 0,function*(){const t=new di;yield t.run(e)}))(e)}),Di=(e,n)=>t(void 0,void 0,void 0,function*(){yield((e,n)=>t(void 0,void 0,void 0,function*(){const{initConsentManager:t,getConsentAsync:o}=T(e.tcf,e.isMobileApp,e.country),i=yield Wo(e);yield Sn(),yield Uo(t),yield Uo(o),u("TCF resolved successfully"),yield zi(i,n),u("Run function resolved successfully")}))(e,n)}),Mi={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&"native"!==e.adType&&((e,t)=>{Et(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{(e=>{const{targetId:t}=e,n=`${le(t)}_backfill`,o=c.get();if(!o.placements[o.deviceType].some(e=>e.id===n))return;const i=document.querySelector(`#${t}`),r=null==i?void 0:i.parentElement;if(!i||!r)return;ye(t);const a=`backfill_wrapper_for_${t}`;r.setAttribute("id",a),i.setAttribute("id",n),qi({},{contextSelector:`#${a}`})})(e)},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},Bi=()=>{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},Fi={[pn.VG]:["board","netboard","backfill","outstream"],[pn.AFTONBLADET]:["panorama","outstream"],[pn.GODARE]:["panorama","outstream"],[pn.SVD]:["wph-article-panorama","wph-front-panorama"]},Ri=e=>{var t;const{publisher:n}=c.get();return!!Fi[n]&&!!(null===(t=Fi[n])||void 0===t?void 0:t.some(t=>e.includes(t)))},Vi="native_override_desc2",Ui=(e,t,n)=>{var o;const{image:i,icon:r,sponsoredBy:a,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(i),imgWidth:null==i?void 0:i.width,imgHeight:null==i?void 0:i.height,imgAltText:null!=d?d:"",logo:b(r),sponsoredBy:null!=a?a:"",title:null!=d?d:"",url:null!=s?s:"",cta:null!=l?l:"",description:null!==(o=null!=c?c:v)&&void 0!==o?o:"",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)},Hi=(e,t)=>{const n=(o=Vi,window.location.href.includes(o));var o;const i=new URLSearchParams(window.location.search).get(Vi),r=t.includes("native_recirc");return n&&i?i:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Wi=(e,t,n,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:o,pageType:i}=t,r=o&&Object.values(pn).includes(o);n&&r&&zo(o,e,Mo,i)})(i,n),o())},Ki=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 o of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Xi(o)}),t.dataset.tracked="true")})},Gi=e=>{const{native:{impressionTrackers:t}={}}=e;(null==t?void 0:t.some(e=>e.includes("googleads")))?null==t||t.forEach(Yi):window.apntag.fireImpressionTrackers(e);const n=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(n)},Ji=(e,t)=>{var n;let o=!1;const i=document.querySelector(`#${e.targetId}`);if(!i||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:Z.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!o)for(const n of t)if(n.isIntersecting){o=!0,Gi(e),c.disconnect();break}},s);c.observe(i)},Yi=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Xi(e):window.navigator.sendBeacon(e)},Xi=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Qi=(e,t,n)=>{const o=((e,t,n)=>{var o;const{displayTemplates:i,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),p=null!==(o=Hi(e.targetId,l))&&void 0!==o?o:c,u=Ut[t.language||w.NO],v=Ui(d,u,s);return(d.video?r[p]:i[p]||i.default)(v,t)})(e,t,n);Wi(e.targetId,o,t,()=>{const{nativeTrackingConfig:{nativeTrackingEnabled:n=!0}={}}=t;n&&((e,t)=>{Ki(e),Ji(e,t)})(e,t)})},Zi="viewable",er="adClick";var tr=e=>(t,n,o)=>{const{video:i,img:r,url:a}=t,{publisher:d,productTag:s}=n,{pluginsNames:l,videoLoop:c}=o||{};if(!(null==i?void 0:i.content))return null;const p=Math.ceil(1e5*Math.random()),u=r||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${p}`,g=nr(i.content,a),h=or({id:p,nodeId:v,poster:u,tagURL:g,publisher:d,productTag:s,videoLoop:c});return ir({playerConfig:h,clickUrl:a,pluginsNames:l}),`${e(t,n,v)}`};const nr=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),o=n.querySelector("ClickThrough"),i=n.querySelector("VideoClicks");if(o){for(;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(n.createCDATASection(t))}else if(i){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),i.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},or=({id:e,nodeId:t,poster:n,tagURL:o,publisher:i="",productTag:r="xandr",videoLoop:a=!1})=>({id:e,poster:n,vendor:"appnexus",node:t,mute:!0,autoplay:a,repeat:a,skin:{name:"inventory-player",url:"https://ads.inventory.schibsted.io/styles/player.css"},settings:{jw:{stretching:"fill",advertising:{client:"vast",tag:o}}},pulse:{provider:i.toLowerCase(),decorator:e=>Object.assign(Object.assign({},wn(e)?e:{}),{provider:Object.assign(Object.assign({},wn(null==e?void 0:e.provider)?e.provider:{}),{productTag:r})})}}),ir=e=>t(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:o}=e,{repeat:i}=t,r=yield gn(t);mn(n),r.once("assetReady",()=>{vn(r,n)}),r.on(Zi,e=>{const{viewable:t}=e;t?r.play():r.pause()}),r.on(er,()=>{window.open(o,"_blank")}),i&&r.on("pause",()=>{r.play()})}),rr=({containerId:e,url:t,body:n,title:o,logo:i,description:r,isContentVideoAd:a=!1})=>{const d=`\n <div class="ad-header">\n <span>${Ut.no.adContent}</span>\n ${i?`<img alt="" aria-hidden="true" class="ad-logo" src="${i}" />`:""}\n </div>\n `,s=`\n <div class="ad-text">\n <h3>${o}</h3>\n ${r?`<div>${r}</div>`:""}\n </div>\n `;return`\n <div id="${e}" class="advertory-tekno-ad-content">\n <div class="ad-info" id="${e}-button"></div>\n ${a?`\n ${d}\n ${n}\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${s}\n </a>\n `:`\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${d}\n ${n}\n ${s}\n </a>\n `}\n </div>\n `};Vt('@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}}'),Vt(".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}}"),Vt(".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}}"),Vt('@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}'),Vt('.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}'),Vt('.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}}'),Vt(".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}"),Vt('.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}}'),Vt('.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)}}');Vt('.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}}'),Vt('.advertory-no-ad-native-seamless .ad-info div[role=button]{left:100%;transform:translateX(-100%);background-color:hsla(0,0%,100%,.45);border-bottom-left-radius:13px}.advertory-no-ad-native-seamless .ad-link{text-decoration:none;color:inherit}.advertory-no-ad-native-seamless .ad-link .ad-content{min-width:320px;height:100%;margin:0 auto;padding:8px 8px 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;border-radius:10px;background-color:var(--color-background-secondary, #ffffff);color:var(--color-text-primary, #333)}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header{padding:8px 10px 10px 10px}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand{display:flex;align-items:center;gap:12px;margin-bottom:11px}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-logo{max-height:44px;border-radius:50%}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-brand-text{display:flex;flex-direction:column;gap:3px;align-items:start}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-brand-text .sponsored-by{font-size:16px;font-weight:500;line-height:1}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-brand-text .ad-annons{font-size:14px;font-weight:400;line-height:1.1;color:var(--color-text-primary, #333);text-transform:lowercase}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-brand-text .ad-annons::first-letter{text-transform:uppercase}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-headline{margin:0;font-size:16px;font-weight:400;line-height:1.2;word-spacing:-1px;text-align:left}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-image-container{width:100%;aspect-ratio:1/1;overflow:hidden;display:flex;justify-content:center;align-items:center}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-image-container .ad-image{height:100%;width:auto;object-fit:cover}@media screen and (min-width: 768px){.advertory-no-ad-native-seamless .ad-link .ad-content .ad-image-container{aspect-ratio:1.91/1}}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer{display:flex;flex-direction:column;justify-content:center;padding:13px 10px}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row{display:flex;align-items:center;justify-content:space-between}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper{display:flex;flex-direction:column;gap:5px;flex-grow:1;padding-right:8px;align-items:start}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper .ad-domain{font-size:11px;line-height:1;color:#666;text-transform:uppercase;text-align:left;font-weight:500}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper .ad-description{font-size:15.5px;font-weight:500;text-align:left;word-spacing:-1px;color:var(--color-text-primary, #111111)}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-action{flex-shrink:0;padding:10px 14px;font-size:12px;line-height:1;color:var(--color-text-primary, #111111);white-space:nowrap;background-color:var(--color-background-tertiary, #d9d9d9);border-radius:12px;font-weight:500}.advertory-aftenposten-native-ad-wrapper__front:has(.advertory-no-ad-native-seamless),.advertory-aftenposten-native-ad__front:has(.advertory-no-ad-native-seamless),.advertory-bt-native-ad-wrapper__front:has(.advertory-no-ad-native-seamless),.advertory-bt-native-ad__front:has(.advertory-no-ad-native-seamless),.advertory-sa-native-ad-wrapper__front:has(.advertory-no-ad-native-seamless){max-width:100%}');const ar={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:o,img:i,adText:r})=>`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${o}" class="ad-image" src="${i}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${o}</div>\n </div>\n </div>\n </a>\n </article>`},dr={default:ar.NATIVE_TEMPLATE,content:({containerId:e,url:t,title:n,img:o,imgWidth:i,imgHeight:r,description:a,logo:d,imgAltText:s},l)=>{const c=((e,t)=>{if(e&&t)return t/e})(i,r);return rr({containerId:e,url:t,title:n,logo:d,description:a,body:`\n<div class="ad-image-wrapper" ${c?`style="padding-bottom: ${100*c}%"`:""}>\n <img alt="${s}" class="ad-image" src="${o}" />\n</div>`})},contentVideo:(e,t)=>tr(({containerId:e,url:t,title:n,logo:o,description:i},r,a)=>rr({containerId:e,url:t,title:n,description:i,logo:o,isContentVideoAd:!0,body:`\n<div class="ad-video-wrapper">\n <div id="${a}"></div>\n</div>`}))(e,t),nativeVideo:(e,t)=>tr(({containerId:e,url:t,sponsoredBy:n,title:o,description:i},r,a)=>(({containerId:e,url:t,sponsoredBy:n,body:o,title:i,description:r})=>`\n<div id="${e}" class="advertory-tekno-ad-native">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}"rel="noopener nofollow sponsored">\n <div class="ad-header">${Ut.no.adFrom} ${n}</div>\n ${o}\n <div class="ad-text">\n <h3>${i}</h3>\n ${r?`<div>${r}</div>`:""}\n </div>\n </a>\n</div>`)({containerId:e,url:t,description:i,sponsoredBy:n,title:o,body:`\n<div class="ad-video-wrapper">\n <div id="${a}"></div>\n</div>`}))(e,t),sponsorstripe:t=>{var{title:n,logo:o}=t;return e(t,["title","logo"]),`<div class="advertory-tekno-sponsorstripe">\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n var disclaimer = e.target.closest('button').parentElement.querySelector('.disclaimer');\n disclaimer.style.display = 'flex';\n } catch (error) {}\n })(arguments[0]);return false;"\n >\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none"><path fill="currentColor" d="M9 9.327a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0zM10 4.399a1 1 0 1 0 0 2 1 1 0 0 0 0-2"/><path fill="currentColor" fill-rule="evenodd" d="M10 .348c-5.523 0-10 4.477-10 10s4.477 10 10 10 10-4.477 10-10-4.477-10-10-10m-8 10a8 8 0 1 0 16 0 8 8 0 0 0-16 0" clip-rule="evenodd"/></svg>\n </button>\n <span class="ad-text">${n}</span>\n <img alt="" aria-hidden="true" class="ad-logo" src="${o}" />\n <div class="disclaimer" style="display: none">\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n var disclaimer = e.target.closest('button').parentElement;\n disclaimer.style.display = 'none';\n } catch (error) {}\n })(arguments[0]);return false;"\n >\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M11 20.07a9.375 9.375 0 1 0 0-18.75 9.375 9.375 0 1 0 0 18.75" clip-rule="evenodd"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m7.25 14.444 7.5-7.5M14.75 14.444l-7.5-7.5"/></svg>\n </button>\n <div>\n Annonsøren som presenterer denne saken har betalt for profilering av fremhevet annonsemateriell i artikler som omhandler denne tematikken.\n <a href="https://www.vg.no/informasjon/redaksjonelle-avgjorelser/232" target="_blank">\n Les mer\n </a>\n </div>\n </div>\n </div>`}},sr={displayTemplates:{default:dr.default,content:dr.content,sponsorstripe:dr.sponsorstripe},videoTemplates:{default:dr.nativeVideo,content:dr.contentVideo}},lr=((e,t)=>n=>Di(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e))({initNativeAd:(e,t)=>{const{targetId:n}=e;if(!document.querySelector(`#${n}`))return;const{pageType:o=un.FRONT,nativeTrackingConfig:i,appearanceConfig:r,deviceType:a}=null!=t?t:{},d={language:w.NO,publisher:pn.TEK,deviceType:a,pageType:o,nativeTrackingConfig:i,appearanceConfig:r};Qi(e,d,sr)},wallpaperHandlers:{initWallpaperAd:(e,t)=>{if(!t)return;const{options:{appMainContainerSelector:n,wallpaperAnchorSelector:o}={}}=t;(e=>{const t=document.querySelector(e||"#application");if(!t)return;ge();const n=document.createElement("div");n.classList.add(ue),document.body.insertBefore(n,t.nextSibling),n.style.setProperty("position","fixed"),n.style.setProperty("width","100%"),n.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),n.style.setProperty("background-position","center top"),n.style.setProperty("background-repeat","no-repeat")})(n),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(he(n),window.addEventListener("scroll",()=>he(n)))})(o),e()},adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(ve),n.classList.add(ve))}},loadFinnBlinkAd:(e,n,o,i)=>t(void 0,void 0,void 0,function*(){const{isMobileApp:r}=c.get();if(u(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get(),{getConsentAsync:o}=T(e,0,n),i=yield o();return!(!(null==e?void 0:e.enabled)||!i)||(u("Skip loading finn blink ad due to missing TCF consent."),!1)}))||r)return o&&o(e),Bo(e),void(!o&&fe(e));try{yield gi(hi)}catch(e){console.error(e)}yield wi(e,n,o),i&&i()}),replaceAdsWithFinnBlink:e=>t(void 0,void 0,void 0,function*(){if(!e)return;yield gi(hi);const{replacementConfig:t}=e;if(!(Cn()&&(null==t?void 0:t.adsToReplace)&&(null==t?void 0:t.sizes)&&e.enabled))return void u(`Finn blink configuration is incorrect: ${JSON.stringify(t)}`);const{adsToReplace:n,sizes:o}=t;n.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const o=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=c.get(),n=document.createElement("div"),o=document.createElement("div");return o.id=e,n.appendChild(o),zo(t,o,Do),u(`Creating blink container for: ${e}`),n})(t);(e=>{u(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),xi(n,o),n.dataset.finnBlinkId=t,Vn().withFullAdsChain(e)})}),preparePageOptions:ie,prepareTag:e=>{const{keywords:t,targetId:n,invCode:o}=e,{useAppTabletInvCode:i=!0}=c.get(),r=((e,t)=>{const{isMobileApp:n}=c.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(o,i),a=(e=>{const{keywords:t,dynamicSizeWidthCheck:n}=e,o=`${C()}-adformat`,i=t?t[o]:[];if(!i)return{};const r=(Array.isArray(i)?i:[i]).filter(e=>!(e in Me)||window.innerWidth>=Me[e]);return{[o]:n?r:i}})(e),d=(e=>{const t=`${C()}-targetid`;return e?{[t]:[e]}:{}})(n),s=Bi(),l=(e=>Ri(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(o),p=((e,t)=>Ri(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(o);return Object.assign(Object.assign({},e),{invCode:r,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),d),l),s),rendererOptions:p})},siteEvents:Mi,librariesToLoad:[]},{publisherClassName:pn.TEK,fullWidthFormatClassName:"netboard"}),cr=Vt("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .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-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .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,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var pr=Object.freeze({__proto__:null,default:cr});exports.getVideoPPIDs=e=>t(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=W.getPPIDs(),{ppid1:o,ppid2:i}=K.getPPIDs(),r=(new H).add(n,D[e]).add(t,M[e]).add(i,B[e]).add(o,F[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),exports.initAdvertoryPackage=lr,exports.updateAdvertory=qi;
|
|
1
|
+
"use strict";function e(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}function t(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{s(o.next(e))}catch(e){r(e)}}function d(e){try{s(o.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((o=o.apply(e,t||[])).next())})}function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o,i;require("react/jsx-runtime"),"function"==typeof SuppressedError&&SuppressedError;var r=n(function(){if(i)return o;i=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)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,o){return e.concat(t).map(function(e){return n(e,o)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function d(e,t){try{return t in e}catch(e){return!1}}function s(e,t,o){var i={};return o.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=n(e[t],o)}),a(t).forEach(function(r){(function(e,t){return d(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(d(e,r)&&o.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,o)(e[r],t[r],o):i[r]=n(t[r],o))}),i}function l(t,o,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||e,i.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(o);return a===Array.isArray(t)?a?i.arrayMerge(t,o,i):s(t,o,i):n(o,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},o=l}());const a=["deviceType","pageType","placements","takeover","refreshConfig","editableConfiguration"],d={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},s=6;class l{set(e){this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of a){const o=e[n];void 0!==o&&(t[n]=o)}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)),Object.prototype.hasOwnProperty.call(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}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=r(l.DEFAULT_SITE_HANDLERS,e)}}l.DEFAULT_SITE_HANDLERS={siteEvents:d,initNativeAd:function(){}};const c=new l,p=c.modifyConfigProperties.bind(c),u=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},v=864e5,g=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return u("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,o=v)=>{const i={data:n,expirationTime:(new Date).getTime()+o};t(e,JSON.stringify(i))},getByTimestamp:(t,n=v)=>{const o=e(t);if(!o)return null;if(!n)return o;try{const{expirationTime:e,data:t}=JSON.parse(o);return(new Date).getTime()<=e?t:null}catch(e){return u("Error with parsing localStorage data"),null}}}})(),h="glimrTags",m=["glwe_","glwet_"],f={geofenceTags:[],geoTags:[],weatherTags:[]},y=e=>new URLSearchParams(window.location.search).get(e),b=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return u("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let o=!1;const i=e=>{o||(u("Resolving advertising permission value obtained"),o=!0,t(e))},r=setTimeout(()=>{u("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{u("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);u("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),w={NO:"no",SE:"se"},x="cmp:loaded";let k=window._tcf_,E=!1;const T=(e,n,o)=>{const i=!!(null==e?void 0:e.enabled),r=(null==e?void 0:e.timeout)||3e3,a=y("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(u("TCF bypass param detected, returning consent: true"),!0):(u("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(E)return null;if(!k)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=k.getConsentedToAllSync();return u(`TCF consented to all is: ${t}`),k.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(u("Getting TCF consent manager..."),window._tcf_)return u("TCF consent manager is already available"),k=window._tcf_,void e(k);u("TCF consent manager is not available");const n=()=>{u("CMP loaded, resolving consent manager..."),o&&clearTimeout(o),window._tcf_?(k=window._tcf_,e(k)):t(new Error("CMP loaded but window._tcf_ is not defined"))},o=setTimeout(()=>{document.removeEventListener(x,n),E=!0,t(new Error("Timeout waiting for CMP to load"))},r);u("Listening for CMP loaded event..."),document.addEventListener(x,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return u(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.schibstedAdChoicesEnabled)&&o===w.SE,n=(null==e?void 0:e.schibstedAdChoicesEnabled)&&o===w.NO;if(t||n)return u("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield b(e);if(!(null==e?void 0:e.enabled))return!0;const i=d();return null!==i?i:yield new Promise((e,t)=>{try{if(!k)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},o=setTimeout(()=>{u("TCF isConsentedToAll timed out, resolving with false"),n(!1)},r);k.onTcfReady(()=>{u("On Tcf Ready called, waiting for consent"),clearTimeout(o)}),k.isConsentedToAll(t=>{clearTimeout(o),e(t)})}catch(e){t(e)}})})}},I=(e,n,o,...i)=>t(void 0,[e,n,o,...i],void 0,function*(e,t,n,o="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return u(`Schibsted Consent to Pay is not enabled, returning true for ${o}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return u(`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:i}=T(e,0,n);return(yield i())?(u(`Schibsted Ad Choices consent given according to TCF consent manager for ${o}`),!0):(u(`Schibsted Ad Choices consent not given according to TCF consent manager for ${o}`),!1)}),A=()=>t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get();if(null==e?void 0:e.schibstedConsentToPayEnabled){return yield I(e,t,n,"glimr")}const{getConsentAsync:o}=T(e,0,n);return yield o()}),S=()=>t(void 0,void 0,void 0,function*(){const{glimr:e}=c.get();if(!(yield A())||!(null==e?void 0:e.enabled))return void u("No consent for glimr data fetching.");const n=yield(o=500,t(void 0,void 0,void 0,function*(){return yield Promise.race([t(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(n)try{n.setTagCacheTimeInSeconds(300),yield new Promise(t=>{n.getTags(e.clientId,(e,n)=>{g.setWithTimestamp(h,{tags:e,tagMappings:n}),t(!0)})})}catch(e){u(`Error during getting glimr data: ${e}`)}else u("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:n})}),C=()=>{const{country:e}=c.get();return e===w.NO?"no-sno":"se-generic"},P=()=>{const{country:e,publisher:t}=c.get();return`${e}-${t}`},O={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"},L=e=>m.some(t=>e.startsWith(t)),$=e=>e.startsWith("glgc_"),j=e=>!L(e)&&!$(e),N=e=>{const t=_();if(!t)return f;const n=((e=[])=>e.filter(L))(t),o=((e=[])=>e.filter($))(t),i=((e=[],t)=>{const n=e.filter(j);if(t){const{publisher:e}=c.get(),t=O[e]||e;n.push(t)}return n})(t,e);return{geoTags:i,geofenceTags:o,weatherTags:n}},_=()=>{const e=g.getByTimestamp(h);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},q={get:(e,n)=>t(void 0,void 0,void 0,function*(){const t=yield fetch(e,n);if(!t.ok)throw new Error(t.statusText);return yield t.json()}),post:(e,n,o)=>t(void 0,void 0,void 0,function*(){const t=JSON.stringify(o),i=yield fetch(e,{method:"POST",headers:n,body:t});if(!i.ok)throw new Error(i.statusText);return yield i.json()})},z="advertory:ppids-cache",D={[w.SE]:`SCH${w.SE.toUpperCase()}-EnvHash`,[w.NO]:`SCH${w.NO.toUpperCase()}-EnvHash`},M={[w.SE]:`SCH${w.SE.toUpperCase()}-UserHash`,[w.NO]:`SCH${w.NO.toUpperCase()}-UserHash`},B={[w.SE]:`sch${w.SE}-envhash-v3`,[w.NO]:`sch${w.NO}-envhash-v3`},F={[w.SE]:`sch${w.SE}-userhash-v3`,[w.NO]:`sch${w.NO}-userhash-v3`},R={[w.SE]:`'sch${w.SE}-iosid-v3'`,[w.NO]:`'sch${w.NO}-iosid-v3'`},V={[w.SE]:`sch${w.SE}-androidid-v3`,[w.NO]:`sch${w.NO}-androidid-v3`},U={[w.SE]:"sdrn:schibsted.com:user",[w.NO]:"sdrn:spid.no:user"};class H{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:o})=>{t.append(e,`${o}-${n}`)}),t}}const W=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return t(this,arguments,void 0,function*(e,t=1e4){var n,o;const i=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=i.xandr)||void 0===n?void 0:n.ppId1,null===(o=i.xandr)||void 0===o?void 0:o.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||u("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},K=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,n){return t(this,void 0,void 0,function*(){var t,o,i,r,a,d,s,l,c,p,u;const v=g.get(z),h=yield this.getNewPPIDs(e,n);if(this.shouldHash(v,h)){const n=null!==(t=e.hasherUrl)&&void 0!==t?t:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(h),c=yield this.hashPPIDs(l,n);return c?(this.cachePPIDs(l,c,null===(o=h.idfv)||void 0===o?void 0:o.plain,null===(i=h.anId)||void 0===i?void 0:i.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=h.idfv)||void 0===d?void 0:d.plain,null===(s=h.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==h?void 0:h.idfv)||void 0===p?void 0:p.plain,null===(u=null==h?void 0:h.anId)||void 0===u?void 0:u.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||u("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,o){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=o?o:null}shouldHash(e,t){var n,o;if(!e)return!0;for(const i in e){if((null===(n=e[i])||void 0===n?void 0:n.plain)!==(null===(o=t[i])||void 0===o?void 0:o.plain))return!0}return!1}cachePPIDs(e,t,n,o){const i=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}}:{}),o?{anId:{plain:o}}:{});g.set(z,i)}hashPPIDs(e,n){return t(this,void 0,void 0,function*(){try{const t=new Headers({"Content-Type":"application/json"});return yield q.post(n,t,e)}catch(e){return u("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,n){return t(this,arguments,void 0,function*({clientId:e,instance:n},o){const i=yield((e,n)=>t(void 0,void 0,void 0,function*(){const t=yield e.getUserId();return t?`${U[n]}:${t}`:null}))(n,o),r=yield(e=>t(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(n),a=window.advertory_idfv,d=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:r},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),d?{anId:{plain:d}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:o,environmentId:i}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:o.plain,environmentId:i.plain}}},G=e=>t(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,country:o,isMobileApp:i}=e;if(!(yield I(n,i,o,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([W.processPPIDs(t,null==n?void 0:n.timeout),K.processPPIDs(t,o)])).forEach((e,t)=>{if("rejected"===e.status){u(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),J=e=>{const{ppid1:t,ppid2:n}=W.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=K.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new H).add(n,D[e]).add(t,M[e]).add(i,B[e]).add(o,F[e]).add(r,R[e]).add(a,V[e]).buildEids()}]}},Y=e=>{const{ppid1:t,ppid2:n}=W.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=K.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new H).add(n,D[e]).add(t,M[e]).add(i,B[e]).add(o,F[e]).add(r,R[e]).add(a,V[e]).buildRyEids()}}]}}},X=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Q=()=>{const e=X("_pulse2data");return e?e.split(",")[2]:void 0},Z={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},ee=9826;class te{constructor(){this.getSupplyTypeKeywords=()=>{const{deviceType:e=Z.DESKTOP,isMobileApp:t}=c.get();if(t){return{"aa-sch-supply_type":`app_${e===Z.MOBILE?"phone":Z.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return t(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return t(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 Q()}getExternalUid(){return t(this,void 0,void 0,function*(){return yield t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get(),{getConsentAsync:o}=T(e,0,n);if(!(yield o()))return;const i=X("_pulse2data");return i?i.split(",")[9]:void 0})})}isTrackingForbidden(){return t(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=ee}=c.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}=c.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return t(this,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get(),{getConsentAsync:o}=T(e,0,n);return{"aa-sch-cmp_advertising":(yield o())?"1":"0"}})}getPageTypeKeywords(){const{pageType:e}=c.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}=c.get(),o=null===(e=null==n?void 0:n.sponsors)||void 0===e?void 0:e.split(":").map(e=>`${t}_${e}`);return o?{"no-sno-news-sponsors":o}:{}}}const ne=new te;ne.prepare.bind(ne);const oe=new class extends te{prepare(e){return t(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getCountryCodeKeywords(w.NO)),this.getPublisherKeywords()),this.getPageTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getSupplyTypeKeywords()),yield this.getAdvertisingConsentKeywords()),yield t(void 0,void 0,void 0,function*(){const{glimr:e}=c.get(),{addPublisherToGeo:t}={},n=yield A();if(!(null==e?void 0:e.enabled)||!n)return u("No consent for getting glimr tags."),{};const o=C(),i=N(t);return{[`${o}-geo`]:i.geoTags,[`${o}-weather`]:i.weatherTags,[`${o}-geofence`]:i.geofenceTags}})),(()=>{const{ppid1:e,ppid2:t}=W.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}})()),e.keywords);return Object.assign(Object.assign({},e),{keywords:n,user:Object.assign(Object.assign({},J(w.NO)),{externalUid:yield this.getExternalUid()}),member:this.getMember()})})}};var ie=oe.prepare.bind(oe);const re="0123456789abcdefghijklmnopqrstuvwxyz",ae=e=>{window.apntag.anq.push(e)},de=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),se=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})}),le=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 ce="";const pe=new Map,ue="advertory-wallpaper-background",ve="advertory-with-horseshoe",ge=()=>{const e=document.querySelector(`.${ue}`);e&&e.remove()},he=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${ue}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},me=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,fe=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")&&ge())},ye=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"))};class be{initialize(){this.DATA=Object.assign({},be.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)}}be.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const we=new be,xe=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,o=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${o}px`)},ke=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:o}=(e=>{const t=we.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=o},Ee=()=>{ge();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{fe(e.id),ke(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),o=null==t?void 0:t.getAttribute("data-probable-width");n&&o&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",o+"px"))})(e.id),e.innerHTML="",e.id=le(e.id)}),ae(()=>window.apntag.clearRequest())},Te="noGroupedPlacements",Ie=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Ae=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Se=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:o,deviceType:i}=c.get(),r=n[i].filter(Ae)||[],a=e?document.querySelector(e):document;if(!a)return[];const d=r.reduce((e,t)=>{const n=Ie(t.id);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({id:e})=>e.match(t)),d=(null==o?void 0:o.queryByDataDevice)?`div[id^="${e}"][data-device=${i}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=a.querySelectorAll(d),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var o;const i=Ce(e,t,n),r=i.finnBlink&&!i.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(o=i.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink),d=`${e.id}-${((e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++)t+=re[Math.floor(36*Math.random())];return t})(6)}`;return e.id=d,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&we.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:d})});return(e=>{const{keywordsConfig:t}=c.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(ce!==window.location.pathname&&(pe.clear(),ce=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),o=null!==(t=pe.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${P()}-count`]=o,pe.set(n,o+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)},Ce=(e,t,n)=>{const o=n[t],i=n[n.length-1],r=n.filter(({id:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==o?void 0:o.id)?o:(null==e?void 0:e.id)===(null==i?void 0:i.id)?i:r||i},Pe=e=>{const{queryConfig:{placementBatches:t}={},deviceType:n}=c.get(),o=(null==t?void 0:t[n])||{},i=Object.values(o).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=le(e.id);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[o,i]of Object.entries(t))n[o]=e.filter(e=>i.includes(le(e.id)));return n})(e,o),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(le(e.id))))(e,new Set([...d,...i]));return Object.assign(Object.assign(Object.assign({},a),r),{[Te]:s})},Oe="ABSOLUTE_FULLSCREEN",Le="ANY_FULLSCREEN",$e="VERTICAL_FULLWIDTH",je="FULLWIDTH",Ne="TAKEOVER",_e="VELVET_TAKEOVER",qe="WALLPAPER",ze="COLLAPSE",De={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}]},Me={wallpaper:1600,"l-format":1600},Be=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&et(e,Le)},Fe=e=>{const{native:t}=e;return!!t},Re=e=>et(e,je),Ve=e=>{const{targetId:t}=e;return t.includes("takeover")||et(e,Ne)},Ue=e=>et(e,Ne),He=e=>et(e,qe),We=e=>et(e,ze),Ke=e=>e.targetId.includes("sponsorstripe"),Ge=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Je=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),Ye=e=>e.targetId.startsWith("midboard"),Xe=e=>e.targetId.includes("widescreen"),Qe=e=>e.width>=1260&&e.width<=1280,Ze=e=>e.width>=1600&&e.width<=1620,et=(e,t)=>{const n=De[t];if(!n)return!1;return!!n.find(t=>{var n,o;const i=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(o=e.banner)||void 0===o?void 0:o.height)||e.height,a=t.width===i,d=!t.height||t.height===r;return a&&d})},tt="splash",nt="welcomePage",ot="topscroller",it="velvet",rt=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const o=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),i=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=o.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,i).toString()},at="takeover-displayed",dt="takeover-visit-count",st=14400,lt=()=>{const e=X(dt);return e?parseInt(e):0},ct=()=>{const{takeover:{enabled:e=!1,secondVisitEnabled:t=!1}={}}=c.get();return!window.location.href.includes("takeover=0")&&(!!window.location.href.includes("takeover=1")||!(!e||(()=>{var e;const t=(null===(e=c.get().takeover)||void 0===e?void 0:e.cookieCapName)||at;return"true"===X(t)})())&&(!t||pt()))},pt=()=>{const e=lt();return 0===e?((()=>{const e=lt(),{takeover:{cookieCapTime:t=st}={}}=c.get(),n=document.location.hostname;window.document.cookie=`${dt}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`})(),!1):1===e},ut=(e,t)=>[[1,1],[1920,1080]].some(([n,o])=>n===e&&o===t),vt=()=>{const{takeover:e}=c.get();return Boolean(null==e?void 0:e.topscroller)},gt=()=>t(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{cookieCapName:t=at,cookieCapTime:n=st}={},isMobileApp:o,tcf:i,country:r}=c.get(),a=yield I(i,o,r,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),ht=e=>{var t;const n=!!(null===(t=c.get().takeover)||void 0===t?void 0:t.setCookieCapForNotShownAd);return Ve(e)&&n},mt=(e,t)=>{var n;if(t===ot){const{topscroller:t}=e;return null!=t?t:{}}if(t===tt){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},ft=(e,t)=>{t!==tt?(e=>{var t,n,o;const i=null===(n=null===(t=c.get().takeover)||void 0===t?void 0:t.welcomePage)||void 0===n?void 0:n.headerElementSelector,r=null===(o=c.get().takeover)||void 0===o?void 0:o.topscroller;if(!i||r)return;const a=document.querySelector(i),d=document.querySelector(".welcome-page-wrapper"),s=document.querySelector(`#${e.targetId}`),l=document.querySelector(".advertory-welcome-page-scroll");if(!(a&&d&&l&&s))return;const p=null==a?void 0:a.offsetHeight,u=Ue(e)?"60svh":`calc(100svh - ${p}px)`,v=Ue(e)?"calc(40svh + 30px)":`calc(${p}px + 30px)`;d.style.setProperty("height",u,"important"),s.style.setProperty("height",u,"important"),l.style.setProperty("bottom",v,"important")})(e):(e=>{var t;if(!(null===(t=c.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),o=document.querySelector(`#${e.targetId}`);if(!n||!o)return;const i=`calc(100svh - ${n.offsetHeight}px)`;o.style.setProperty("height",i,"important")})(e)},yt=rt([],()=>{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})}),bt={nativeAd:e=>Fe(e)&&!Ke(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:Re,fullscreenScroll:Be,topscroller:e=>Ve(e)&&vt(),splash:e=>Ve(e)&&ut(e.width,e.height),welcomePage:Ve,wallpaper:He,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Qe,hFormat:Ze,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ze(e)&&!Qe(e),topboard:e=>e.targetId.startsWith("topboard")&&!Ve(e),widescreen:Xe,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:Ke,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Je(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!Ye(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:Je,midboard:Ye},wt=({adObj:e,preferredTestIdData:t})=>{var n,o;const i=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!i)return;const r=null===(o=document.querySelector(`#${i}`))||void 0===o?void 0:o.parentElement;if(!r)return;if(((e,t)=>{var n,o,i,r;const a=null===(r=null===(i=null===(o=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===o?void 0:o.tags)||void 0===i?void 0:i[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(i,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,o;for(const[i,r]of Object.entries(bt))if(r(e)){if("nativeAd"===i){const r="default";t.dataset.testid=`${i}-${null!==(o=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==o?o:r}`;break}t.dataset.testid=i;break}})(e,r)},xt=e=>{var t;return(null===(t=Object.entries(bt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},kt=(e,t)=>{const n=e.width,o=(null!=t?t:window.screen.width)/n;return o<1?o:1},Et=(e,t=window.screen.width,n,o)=>{const i=kt(e,t),r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${i})`,r.style.transformOrigin="left top")},Tt=new Map;Tt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Tt.set("panorama",{scale:.79,transformOrigin:"center center"}),Tt.set("outstream",{scale:.79,transformOrigin:"center center"}),Tt.set("integration",{scale:.79,transformOrigin:"center center"}),Tt.set("toppanorama",{scale:.8,transformOrigin:"left center"});const It=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 o=xt(e),i=Tt.get(o),r=document.querySelector(`#${e.targetId}`);if(!r||!i)return;if(r.style.transformOrigin=i.transformOrigin,r.style.transform=`scale(${i.scale})`,!(null==i?void 0:i.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},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),St=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Ct=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:o=!1}={}}=c.get(),i=[`${C()}-geo`],r=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection",...o?i:[]],a=Object.fromEntries(Object.entries(e).filter(([e])=>r.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:a}}},d)}},Pt=(e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,o)=>{const i=document.createElement("script");i.async=!0,i.src=e;const r=()=>{d(),n()},a=()=>{d(),o(new Error(`Failed to load ${e}`))},d=()=>{i.removeEventListener("load",r),i.removeEventListener("error",a),clearTimeout(s)};i.addEventListener("load",r),i.addEventListener("error",a);const s=setTimeout(()=>{d(),o(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}),Ot=e=>e.includes("snoap.no"),Lt=e=>{var t,n,o,i,r;return!!(null===(r=null===(i=null===(o=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===o?void 0:o.adResponse)||void 0===i?void 0:i.ads[1])||void 0===r?void 0:r.rtb)},$t=rt([],()=>{const e=({width:e,height:t})=>{var n;const o=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!o)return;const{clientWidth:i,clientHeight:r}=o,a=e/i,d=t/r;o.style.transform=`scale(${a},${d})`,o.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}),jt=e=>{const t=rt([],()=>{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 o=n.contentDocument.createElement("style");o.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(o),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},Nt=[],_t={},qt=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const o=Dt(e);n?(zt(o,n),Mt(e,o,t)):(zt(o,n),Bt(e,o,t))})},zt=(e,t)=>{var n,o;const i=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!i)return;const r=t?"showFullscreen":"hideFullscreen";null===(o=i.contentWindow)||void 0===o||o.postMessage(`advertory:${r}-${e}`,"*")},Dt=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},Mt=(e,t,n)=>{e.classList.add("in-screen"),document.body.classList.add("fullscreen-scroll-in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Nt.includes(t)||Nt.push(t),n&&window.addEventListener("scroll",_t[t],{passive:!0})},Bt=(e,t,n)=>{Nt.includes(t)&&(n&&window.removeEventListener("scroll",_t[t]),document.body.classList.remove("fullscreen-scroll-in-screen"),e.classList.remove("in-screen"),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},Ft=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:o=[".skyscraper_r"],headerZIndex:i=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),o.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&Rt(e,r,i,0),a.length&&Rt(e,a,i,40)}},Rt=(e,t,n,o)=>{const i=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-o:(r+t-(a+i))/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 Vt(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}Vt('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 Ut={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 Ht=null;const Wt=(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=`(${$t})()`,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(Ot(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=jt(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>Ot(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)),Ot(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)),Lt(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},Kt=()=>{Ht=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,o=e?e.offsetLeft:0,i=document.documentElement;i.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),i.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),i.style.setProperty("--advertory-fullscreen-scroll-left",`${o}px`)},Gt=()=>{Ht||(Ht=window.requestAnimationFrame(Kt))},Jt=(e,t)=>{var n,o,i,r;const{country:a}=c.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:o="#fff",margin:i="16px 0",beforeContentValue:r=""}=e,a=t/2,d=document.createElement("style");d.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${a}px),\n ${o} calc(50% - ${a}px),\n ${o} calc(50% + ${a}px),\n ${n} calc(50% + ${a}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${i};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${r&&"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: '${r}' !important;\n }`,d.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(d)})(null!==(o=null==t?void 0:t.overlayStyles)&&void 0!==o?o:{});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,o=new IntersectionObserver(e=>qt(e,n),{}),i=Dt(e);o.observe(e),n&&(_t[i]=Ft(e,t))})(l,t),s.className="advertory-fullscreen-scroll";const p=et(e,Oe)?"absolute":"fixed";s.style.position=p,l.className="advertory-fullscreen-scroll-wrapper",l.dataset.showTagSubscribeId=d,s.setAttribute("data-ad-label",Ut[a].adText),(null==t?void 0:t.moveCogwheelToTheLeft)&&(s.dataset.moveCogwheelToTheLeft="true"),Gt(),window.addEventListener("resize",Gt),null===(i=window.visualViewport)||void 0===i||i.addEventListener("resize",Gt),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",Gt)},Yt=({targetId:e})=>{const t=(e=>{const{requests:t}=window.apntag,n=Lt(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,o=Lt(e)?1:0;n&&(n.tags[e].adResponse.ads[o].rtb.banner.content=t)})(e,Wt(t,e))},Xt=()=>t(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,country:n,isMobileApp:o,fullscreenScroll:i}=c.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=c.getHandlers(),{getConsentAsync:a}=T(t,0,n),d=yield a(),s=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:o=>{const i=At(),{prebid:{relevantCbTimeout:r}={}}=c.get(),a="relevantCb"===o&&r?r:n[o].timeout,d=setTimeout(()=>{!n[o].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${o}'`),e=!0,i.loadTags&&i.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),l=At(),p=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=At();return{user:e,keywords:t}})();s.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=p;(()=>{const e=St();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(s.getCancel()||!l.loadTags)return u("core loadTags() call was cancelled",{cancel:s.getCancel(),apnTagLoadTags:!l.loadTags,condition:"or"}),void s.cleanup();const t=St();s.events.relevantCb.done=!0,s.failsafeOnTimeout("auctionCb");const o=d?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};u("prebid consentManagement",o),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},Y(n)),Ct(g,v))),u("core add prebid config",Object.assign(Object.assign({consentManagement:o,enableSendAllBids:!1},Y(n)),Ct(g,v))),t.loadPrebid({configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s.getCancel()||(s.events.auctionCb.done=!0,l.loadTags(e)),s.cleanup()}},customNativeRender:e=>{Qt(e,r)},directRenderFn:e=>{const{settings:t,renderFn:n}=e,{bid:o,adDiv:r}=t||{};if(!r)return;const a=n(t),d=Object.assign(Object.assign({},o),{targetId:r.id,banner:!0});Be(d)&&(Jt(d,i),(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 o=new MutationObserver(()=>{n()&&o.disconnect()});o.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(a))}}),u("core load prebid",{configId:e.id,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s.getCancel()||(s.events.auctionCb.done=!0,l.loadTags(e))}},customNativeRender:e=>{Qt(e,r)},directRenderFn:()=>{}})})}),Qt=(e,t)=>{var n;const{divId:o,native:i,bid:r}=e,a=document.querySelectorAll(`[id^=${o}]`)[0],d=`RY-${a.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)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;t({native:i,targetId:d},c.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},Zt=(e,t,n)=>{const o=document.getElementById(`div_utif_${e}`);if(!o)return;const{apntag:i}=window,[r,a]=t;if(!o.dataset.lockedsize&&a&&r)o.style.width=`${r}px`,o.style.height=`${a}px`,n&&(i.resizeAd(o.id,[r,a]),o.dataset.lockedsize="true",o.dataset.lockedwidth=r.toString(),o.dataset.lockedheight=a.toString());else if(null==o?void 0:o.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=o.dataset;e&&t&&i.resizeAd(o.id,[e,t])}},en=["netboard","board"];class tn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,o;const{editionName:i}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(o=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==o?o:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",i),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return t(this,void 0,void 0,function*(){var t,n,o;const i=yield this.identityFacade.getIdentityUser(),r=null!==(o=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==o?o:"",a=(null==i?void 0:i.userId)?String(i.userId):"",d=this.buildUrl(e,{envId:r,spid:a});try{u("Starting fetching DrEdition ad from URL:",d);const e={method:"GET"},t=yield q.get(d,e);return u("Fetch operation completed successfully."),t}catch(e){u("Error during fetch operation:",e)}return null})}}let nn=class{getDrEditionUTMParams(e,t){var n;const{title:o="",clientName:i,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=o.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:i,utm_medium:d},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const o=this.getDrEditionUTMParams(t,n),i=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(o).forEach(([e,t])=>{i.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const o=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!o)return"";const i=this.getDrEditionUTMParams(e,t),r=new URL(o);return Object.entries(i).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,n){return t(this,void 0,void 0,function*(){const{id:t,autoplay:o,mute:i,videoLoop:r,vendor:a}=n.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:t,vgtvVendor:a,vgtvAutoplay:o,vgtvMuted:i,vgtvLoop:!!r,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:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const on=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):u("Dr. Edition container does not have a parent element, cannot remove height lock.")};class rn{constructor(e,t,n,o){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=o,this.drEditionAds=[]}fetchAndRenderAd(e,n){return t(this,void 0,void 0,function*(){var t,o;const{drEditionConfig:{containerSelector:i},renderAsBackfill:r=!1}=n,a=e.querySelector(i);if(!a)return void u(`Container with selector "${i}" not found.`);const d=yield this.drEditionService.fetchData(n);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(u("No Dr. Edition ads available to render. Collapsing whole placement."),fe(e.id),void on(a)):((null==d?void 0:d.itemId)&&r&&(u("Dr. Edition ad available to render as a Xandr backfill."),ye(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(a,d,n),yield null===(t=this.videoManager)||void 0===t?void 0:t.handle(d,n),on(a),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,n),null===(o=e.querySelector("a"))||void 0===o||o.addEventListener("pointerup",()=>null)):on(a))):(u("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void on(a))})}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 o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";ye(o)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const o=e.querySelector(".dr-edition-slider");if(!o)return!1;let i=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(i&&clearTimeout(i),i=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...o.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...o.children].forEach(e=>{r.observe(e)}),!0}}class an{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,n,o){return t(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:t}=T(o.tcf,o.isMobileApp,o.country),i=yield t(),r=o.device===Z.MOBILE?n.mobileHTML:n.desktopHTML;const a=i?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var t,i,r;e.search=null!==(r=null===(i=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===i?void 0:i.call(t,e,n,o))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,o)})})}}class dn{constructor(e){this.strategy=e}handle(e,n){return t(this,void 0,void 0,function*(){const{videoConfiguration:{id:t,preview:o}={}}=e;(t||o)&&(yield this.importScript(n),yield this.createVideoElement(e,n))})}importScript(e){return t(this,void 0,void 0,function*(){const t=e.drEditionConfig.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield Pt(t)}catch(e){u("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,n){return t(this,void 0,void 0,function*(){const t=document.createElement("div"),{node:o}=e.videoConfiguration,i=[...document.querySelectorAll(`#${o}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,n))return;this.strategy.handleVideo(t,e),null==i||i.appendChild(t),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==i?void 0:i.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,o,i;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(i=(o=t.drEditionConfig).addPreviewVideo)||void 0===i||i.call(o,d),!0))}}let sn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,o){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 o=null==n?void 0:n.textContent;return o?o.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:o}={}}=t,i=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:o}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,n,o){return t(this,void 0,void 0,function*(){var t,i,r,a,d,s,l,c;const p=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:o.editionName}});if(window.dispatchEvent(p),!this.pulse)return;const u=this.getEventInput(e,n,o,"view");(null===(t=this.pulse)||void 0===t?void 0:t.trackLegacyViewUIElement)?null===(r=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===r||r.call(i,u):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,u):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,u)})}trackContentClick(e,n,o){return t(this,void 0,void 0,function*(){var t,i,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,n,o,"click");this.pulse.trackLegacyClickUIElement?null===(i=(t=this.pulse).trackLegacyClickUIElement)||void 0===i||i.call(t,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class ln extends sn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){const{pulseData:{title:o,clientName:i="",creativeId:r}={}}=t,{columnName:a,primaryPosition:d}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:o,placement:{columnName:a,primaryPosition:d},"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":r},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let cn=class extends sn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var o,i,r,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:p}={}}=t,u=n.editionName,v=this.mapPageType(this.pageType),g=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulseObjectId)||void 0===r?void 0:r.call(i))&&void 0!==a?a: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,o){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,o),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,o){var i,r,a,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!==(a=null===(r=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getUrlWithParams)||void 0===r?void 0:r.call(i,t,n))&&void 0!==a?a: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:o,imageUrl:y,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const pn={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"},un={FRONT:"front"},vn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},gn=e=>t(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const o=document.createElement("script");o.id=e,o.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",o.async=!0;try{o.src=o.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(o,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),hn={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 t(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return pr})})}})}},mn=(e,t)=>{null==e||e.forEach(e=>{hn[e](t)})};class fn{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:o,autoplay:i,mute:r,vendor:a}}){yield t(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(e);mn(d,s);const l={id:n,node:o,autoplay:i,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},c=yield gn(l);c.once("assetReady",()=>{vn(c,d)}),c.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?s.classList.add("is-playing"):s.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?s.classList.add("is-inactive"):s.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),c.once("PulseStats:ready",()=>t(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===un.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:o}=new URL(n),i=o.split("/").filter(Boolean);return i.length?[...i.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 yn="https://www.aftonbladet.se/video-player-extras/latest/";class bn{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){const a={id:t,node:n,autoplay:o,mute:i,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${yn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${yn}external-link.js`]:{name:"ExternalLink"}}};yield gn(a),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 wn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class xn{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:o,autoplay:i,mute:r,vendor:a}}){const d={id:n,node:o,autoplay:i,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},wn(e)?e:{}),{provider:Object.assign(Object.assign({},wn(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 gn(d);s.once("PulseStats:ready",()=>t(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===un.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let kn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const En=(e,t,n)=>{var o;const{publisher:i,pageType:r,country:a}=e,d={[pn.VG]:new nn,[pn.E24]:new fn,[pn.AFTONBLADET]:new bn,[pn.SVD]:new xn}[i]||new kn,s=new(a===w.SE?ln:cn)(n,d,r),l=new tn(t,null!==(o=null==n?void 0:n.pulseTracker)&&void 0!==o?o:n),c=new an(d,s),p=new dn(d);return new rn(l,c,p,s)},Tn=()=>t(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 In{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 t(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 u("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const An=(e,t,n)=>{const{wrapperSelector:o}=null==e?void 0:e.drEditionConfig,i=document.querySelectorAll(o),r=new IntersectionObserver((o,i)=>((e,t,n,o,i)=>{const r=En(n,o,i);e.forEach(e=>{var o,i,a;if(!e.isIntersecting)return;const d=e.target,s=null!==(o=d.dataset.editionName)&&void 0!==o?o:"",l=null!==(i=d.dataset.pulseColumnname)&&void 0!==i?i:"",c=null!==(a=d.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(o,i,e,t,n),{rootMargin:"400% 0px"});i.forEach(e=>r.observe(e))},Sn=()=>t(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)}}),Cn=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},Pn=[],On=(e,n)=>t(void 0,void 0,void 0,function*(){var t;const{pulse:o,tcf:i,deviceType:r,drEdition:a,publisher:d,pageType:s,country:l,isMobileApp:c}=e;if(!(yield I(i,c,l,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n;const{deviceType:o,placements:i,drEdition:{fallbackGlobalEditionName:r}={}}=e,a=i[o]||i.desktop,d=le(t.targetId),s=a.find(e=>e.id===d),l=en.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)||r;return s&&l&&!c&&p?(Pn.push(d),Object.assign(Object.assign({},s),{drEdition:Object.assign(Object.assign({},s.drEdition),{editionName:p})})):null})(e,n);if(!p)return;if(!(null==o?void 0:o.instance))return void u("Pulse has not been passed as a prop, aborting");const v=yield Tn(),g=new In(v),h=En({publisher:d,pageType:s,country:l},g,null==o?void 0:o.instance),m=document.getElementById(n.targetId);if(!m||!a)return;m.classList.value="";const f=document.createElement("div");f.className=a.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=f.outerHTML;const y={editionName:(null===(t=null==p?void 0:p.drEdition)||void 0===t?void 0:t.editionName)||"",drEditionConfig:a,device:r,tcf:i,isMobileApp:c,country:l,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,y)}),Ln="collapseAd",$n="hideAd",jn="resizeAd",Nn="renderDrEditionFallback",_n="wallpaperImageUrl",qn="wallpaperColor",zn="velvet",Dn=[jn,_n,qn,Ln,$n,Nn,zn];let Mn;const Bn=e=>{if("object"==typeof e)return e;if(t=e,me.test(t)){const t=e.replace(/^wallpaper:url:/,"");return{name:_n,wallpaperImageUrl:t}}var t;if((e=>e.startsWith("wallpaper:color:"))(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:qn,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")&&Dn.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}},Fn=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||!Dn.some(e=>n.name===e))return;const{name:o,targetId:i,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;o===zn&&d&&(d.includes("noScroll")&&(Mn=(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==Mn||Mn(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),o!==Ln&&o!==$n||!i||fe(i),o===jn&&i&&d&&Zt(i,d),o===Nn&&i&&(fe(i),On(c.get(),{targetId:i})),"resizeMediationAd"===o&&i&&s&&Zt(i,s,!0),o===_n&&r&&(e=>{const t=document.querySelector(`.${ue}`);t&&(t.style.backgroundImage=`url(${e})`)})(r),o===qn&&a&&(e=>{const t=document.querySelector(`.${ue}`);t&&(t.style.backgroundColor=e)})(a)},Rn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Vn=()=>{const{publisher:e,country:n,finnBlink:o}=c.get(),{loadFinnBlinkAd:i,wallpaperHandlers:{adjustAdToHorseshoe:r}}=c.getHandlers(),a=window.apntag,d={publisher:e,country:n,finnBlink:o},s=e=>{ye(e),ae(()=>a.showTag(e))};return{withXandrAd:s,withFinnBlinkAd:e=>t(void 0,void 0,void 0,function*(){yield i(e,d,null)}),withFullAdsChain:e=>t(void 0,void 0,void 0,function*(){yield i(e,d,s,()=>{we.getData("horseshoe").isAvailable&&r(e)})})}},Un=(e,t,n)=>{const o="true"===n.dataset.isFinnBlinkOnlyPlacement;return Ge(t)&&o?(u(`loading finn blink ad for blink only placement for ${t}`),void Vn().withFinnBlinkAd(t)):Ge(t)?(u(`loading finn blink ad with full ads chain for ${t}`),void Vn().withFullAdsChain(t)):void ae(()=>(u("core showTag",{id:t}),e.showTag(t)))},Hn=(e,n)=>t(void 0,void 0,void 0,function*(){yield de,yield se;const t=new IntersectionObserver((t,n)=>((e,t,n,o)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:i}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(i),a=document.getElementById(r);u("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,o),a&&(t.unobserve(a),t.disconnect())})})(t,n,Un,e),Rn(n));t.observe(e)}),Wn=new Map,Kn=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Gn=".brandstudio-premium-content-widget",Jn=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Yn=({adWrapper:e,placementContainer:t})=>{const n=Jn({adWrapper:e,placementContainer:t});var o;null==e||e.style.setProperty("height",`${n}px`),ke(o=t),o.innerHTML=""},Xn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Qn=({adWrapper:e,placementContainer:t})=>{const{publisher:n}=c.get(),o=Kn.includes(n)&&Boolean(t.closest(Gn));const i=o?t.closest(Gn):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!o&&!a||o&&!i)return;if(a)return Xn(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=i;d&&s.contains(d)?Xn(d):s.hasAttribute("style")&&Xn(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},Zn=(e,t,n,o,i,r)=>{var a;const d=performance.now(),s=null!==(a=Wn.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(o,i)&&n<0;d-s>=i&&l&&(Wn.set(t,d),((e,t,n)=>{const o=null==n?void 0:n.parentElement;o&&n&&Yn({adWrapper:o,placementContainer:n}),ae(()=>{e.setKeywords([t],{[`${C()}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},eo=(e,t,n)=>{const o=new IntersectionObserver((e,o)=>((e,t,n,o)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:i,boundingClientRect:r}=e;t(window.apntag,i.id,r.y,n,o,i)})})(e,Zn,t,n),Rn(300));o.observe(e)},to=(e,t=6)=>{const n=[];for(let o=0;o<e.length;o+=t){const i=e.slice(o,o+t);n.push(i)}return n},no=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),oo=(e,t=0)=>{const n=e.getBoundingClientRect(),o=window.innerHeight;return n.bottom>-t&&n.top<o+t},io=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=c.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),co(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},ro=(e,t,n)=>{const o=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const i of o){const o=e.find(e=>{var t;return e.id===(null===(t=i.firstElementChild)||void 0===t?void 0:t.id)&&e.bfCacheRefresh}),r=null==o?void 0:o.threshold;oo(i,r)&&o&&(xe(o.id),n.length&&i.classList.remove(...n),co([o],t))}},ao=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},isMobileApp:o}=c.get();t&&(e.forEach(({id:e})=>{const t=so(e);t&&(t.dataset.bfCacheRefresh="true")}),o?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&ro(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const o=()=>{window.scrollY>0&&(window.removeEventListener("scroll",o),ro(e,!1,t))};n.persisted&&(no()?window.addEventListener("scroll",o,{passive:!0}):ro(e,!1,t))})})(e,n))},so=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},lo=e=>{const{id:t,allowedFormats:n}=e,o=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(so(t)),i=(e=>1===e[0]&&1===e[1])(o),r={sizes:[o],allowedFormats:i?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return i||(r.native=void 0),r},co=(e,t=!1)=>{const{requestSize:n=s}=c.get(),o=e.map(({id:e})=>e),i=to(o,n);if(t)for(const t of e){const e=lo(t);window.apntag.modifyTag(t.id,e)}for(const e of i)ae(()=>window.apntag.refresh(e))};const po="#fff",uo="#0098da",vo=(e,t=!0)=>{(e===nt||e===ot)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},go=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},ho=e=>{document.body.style.overflow=e?"initial":"hidden"},mo=e=>{const t=yo(e),n=fo(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),ho(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},fo=e=>{const t=()=>mo(e);return window.addEventListener("advertory:closeTakeover",t),go(),t},yo=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&mo(e)};return go(),window.addEventListener("keydown",t),t},bo=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(yo(e),fo(e),go(),t.addEventListener("click",()=>{mo(e)}),ho(!1))},wo=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),fo(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},xo=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>mo(e))})(e)},ko=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=c.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),o=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&o&&(o.style.display="flex",o.innerText=Ut.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Eo=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=Ut.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},To=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=Ut.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Io=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=Ut.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Ao=()=>{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)},So=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${yt})()`,e+t.outerHTML})(e)),n},Co=e=>{const t=(e=>{const{requests:t}=window.apntag,n=Lt(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,o=Lt(e)?1:0;n&&(n.tags[e].adResponse.ads[o].rtb.banner.content=t)})(e,So(t))},Po=e=>t(void 0,void 0,void 0,function*(){const{takeover:t}=c.get(),{targetId:n}=e,o=document.querySelector(`#${n}`),i=document.querySelector(".advertory-takeover-wrapper");if(!o||!i||!t)return;const r=(e=>{const{width:t,height:n}=e;return ut(t,n)?tt:et(e,_e)?it:vt()?ot:nt})(e),a=i.offsetHeight,d=window.scrollY>a;i.style.display="block",!d&&vo(r,!1),((e,t)=>{({[nt]:To,[tt]:ko,[ot]:Eo,[it]:Io})[t](e)})(i,r),Ao(),((e,t)=>{({[nt]:wo,[ot]:wo,[tt]:bo,[it]:xo})[t](e)})(i,r),((e,t,n)=>{if(!n)return;({[nt]:()=>{const{buttonLabel:o}=mt(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=o?o:"")})},[tt]:()=>{const{themeColors:o,logotype:i,buttonLabel:r,showArrowIcon:a}=mt(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!=r?r:""),".advertory-splash-close"===t&&a){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&&i&&(n.setAttribute("src",i.url),n.setAttribute("alt",i.alt)),".advertory-splash-navbar-wrapper"===t&&o){const{backgroundColor:e,color:t}=o;n.style.setProperty("background-color",null!=e?e:po,"important"),n.style.color=null!=t?t:uo}}})},[ot]:()=>{const{buttonLabel:o,showArrowIcon:i,showCloseButton:r=!0}=mt(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||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||i||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=o?o:""))})},[it]:()=>{}})[t]()})(i,r,t),yield gt(),!d&&vo(r,!0),ft(e,r)});Vt(".advertory-brandmetrics-survey{width:100%}");const Oo="advertory-brandmetrics-survey",Lo=()=>t(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},country:n,isMobileApp:o,tcf:i}=c.get(),r=yield I(i,o,n,"norstat");if(!e||o||!r)return;const a=(e=>{const{ppid1:t,ppid2:n}=W.getPPIDs(),{ppid1:o,ppid2:i}=K.getPPIDs(),r=(new H).add(n,D[e]).add(t,M[e]).add(i,B[e]).add(o,F[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(n);((e,n,...o)=>{t(void 0,[e,n,...o],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const o=document.createElement("img");o.src=e,o.id=null!=t?t:"",n&&(o.style.display="none"),document.body.appendChild(o)})})(`https://sch-map.norstatsurveys.com/api/nids/${n===w.NO?"schibsted":"schibstedse"}/map/${a}`,"norstat")}),$o=(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,jo=e=>`externalImpId:'${e}'`,No=e=>{var t;const{forwardExternalImpId:n=!1,tracker:o}=c.get(),i=(e=>{var t;if(!e.positionConfig)return e;const n=e.keywords[`${P()}-count`],o=e.positionConfig.find(e=>e.adPositionIndex===n);if(!o)return e;const i=o.keywords?Object.assign(Object.assign({},e.keywords),o.keywords):e.keywords;return Object.assign(Object.assign({},e),{sizes:null!==(t=null==o?void 0:o.sizes)&&void 0!==t?t:e.sizes,keywords:i})})(e),{id:r,sizes:a,keywords:d,allowedFormats:s,invCode:l,ssa:p=!1,nativeCustomProperties:v,safeframeConfig:g,dynamicSizeWidthCheck:h=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||ct())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],o=null==n?void 0:n.filter(e=>e!==ot),i=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":o}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:i})})(i),m=Object.assign({invCode:l,sizes:a,targetId:r,keywords:$o(d,p),allowedFormats:s,dynamicSizeWidthCheck:h},g&&{safeframeConfig:g}),f=(e=>{var t,n,o,i,r,a,d;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(o=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===o?void 0:o.pageViewId)?(u("Tracker state pageViewId is:",null===(r=null===(i=null==e?void 0:e.instance)||void 0===i?void 0:i.state)||void 0===r?void 0:r.pageViewId),null===(d=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===d?void 0:d.pageViewId):(u("Tracker state does not contain field pageViewId or it is empty"),""):(u("Tracker state is empty"),""):(u("Tracker is not configured in initAdvertory function"),"")})(o);n&&f&&(u("External Impression ID assigned to defineTag:",jo(f)),m.externalImpId=jo(f));const y=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon2:{required:!1}}).reduce((t,[n,o])=>((null==e?void 0:e.includes(n))&&(t[n]=o),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}}))(v);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(m.native=y),m},_o=e=>!e.includes("takeover")||ct(),qo=e=>{const{source:t}=e;return"csm"===t},zo=(e,t,n,o)=>{const i=t.parentElement;if(!i)return;const r=e?`-${e}`:"",a=o?`__${o}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),i.classList.remove(...i.classList),t.classList.add(d),i.classList.add(s),t.dataset.adType=n},Do="finn-blink",Mo="native-ad",Bo=e=>{const{publisher:t=""}=c.get(),n=document.querySelector(`#${e}`);if(!n)return;const o=`-${t}`;n.classList.remove(`advertory${o}-finn-blink`),n.classList.remove(`advertory${o}-finn-blink-wrapper`)},Fo=e=>{if(!e)return e;const t=e[`${C()}-targetid`],n=t?le(t[0]):"";return Object.assign(Object.assign({},e),t&&{[`${C()}-targetid`]:[n]})},Ro=e=>Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${C()}-geo`]&&{[`${C()}-geo`]:["geo-test-value"]}),e[`${C()}-geofence`]&&{[`${C()}-geofence`]:["geofence-test-value"]}),e[`${C()}-weather`]&&{[`${C()}-weather`]:["weather-test-value"]}),Vo=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 o=n.split(",")[0].split(":")[0],i=e.find(e=>e.invCode===o),r=document.querySelector(`[id^=${null==i?void 0:i.id}]`);r&&r.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"})})()},Uo=(e,n)=>t(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})}),Ho={arrayMerge:(e,t)=>t},Wo=e=>t(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:o}=e;return Boolean(t&&n&&(null==o?void 0:o.publisherClassName))})(e))return e;try{const n=yield(e=>t(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,o=setTimeout(()=>n.abort(),5e3);try{return yield q.get(t,{method:"GET",signal:n.signal})}catch(e){throw u("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(o)}}))(e);return n?(({siteConfig:e,configOverrides:t})=>{var n;const{keywords:o,refresh:i,placements:a,threshold:d,batchSize:s}=t,l=r.all([e.placements,a],Ho),c=r(e.pageOptions,{keywords:o},Ho),p=r(e.appearanceConfig,{defaultThreshold:d},Ho),u=r(null!==(n=e.refreshConfig)&&void 0!==n?n:{},{scrollRefreshEnabled:i},Ho);return Object.assign(Object.assign({},e),{placements:l,requestSize:null!=s?s:e.requestSize,pageOptions:c,appearanceConfig:p,refreshConfig:u})})({siteConfig:e,configOverrides:n}):e}catch(t){return u("Error fetching S3 config, using site config",{error:t}),e}}),Ko=".advertory-right-column-track",Go="--advertory-right-column-track-height",Jo=e=>e.getBoundingClientRect().top+window.scrollY,Yo=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Xo=(e,t)=>{const n=(o=t,`${Math.max(0,Math.round(o))}px`);var o;document.body.style.setProperty(e,n)},Qo=(e,t)=>`${e}-${t}`,Zo=(e,t,n)=>{var o;const i=Array.from(null!==(o=e.querySelectorAll(t))&&void 0!==o?o:[]),r=(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===r.length)return;const a=Jo(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Yo(e);Xo("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const o=Jo(e),i=Qo(Go,t),r=o-n,a=Qo("--advertory-right-column-split-point-height",t),d=Yo(e);Xo(i,r),Xo(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Qo("--advertory-right-column-ad-height",t),o=Yo(e);Xo(n,o)})(i[t])});((e,t)=>{const n=Jo(e);Xo(Go,n-t)})(r[Math.min(i.length,r.length-1)].point,a)};let ei=!1;class ti{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:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class ni{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class oi{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:o}=this.parseKilkayaData(e);return{id:o,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return t(this,void 0,void 0,function*(){var t,n,o,i,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const p=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===i||i.call(o,p):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,p):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,p)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,o,i,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(i=(o=this.pulse).trackClickUIElement)||void 0===i||i.call(o,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class ii extends oi{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,o,i,r,a;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!==(i=null===(o=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===o?void 0:o.call(n))&&void 0!==i?i: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===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:o}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),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 ri="[data-k5a-teaser-analytics]",ai=(e,t,n)=>{const o=document.querySelectorAll("k5a-stream");if(!o.length)return;const i=new ii(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,o=n.querySelector(ri);Boolean(null==o?void 0:o.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(ri);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});o.forEach(e=>{d.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})};class di{handleKilkayaStreamTracking({pulse:e,pageType:t,publisher:n}){if(!(null==e?void 0:e.instance))return;const o={[pn.VG]:new ti}[n]||new ni;ai(e.instance,o,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const o=n.parentElement;o&&(u(`Kilkaya placement ${n.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 o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";ye(o)}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield Pt(e)})}run(e){return t(this,void 0,void 0,function*(){const{tcf:t,isMobileApp:n,country:o,kilkaya:i}=e;if(!(null==i?void 0:i.enabled))return;const r=yield I(t,n,o,"kilkaya");r&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(r),yield this.loadKilkayaScript(i.url),this.handleKilkayaStreamTracking(e))})}}const si=1e4,li=e=>e.some(e=>e.some(e=>!!e&&oo(e,0)));let ci;const pi=()=>{const{widescreenSwitching:e}=c.get(),{enabled:t,rotationInterval:n=si,widescreenIdPrefix:o}=null!=e?e:{};if(!t)return;const i=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=c.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(o);let r=0,a=Date.now(),d=li(i);if(!i.length)return;ci&&window.removeEventListener("scroll",ci);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(i);const p=((e,t)=>{let n=null;return(...o)=>{null===n&&(e(...o),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=li(i)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=i.map(e=>e[r]),n=i.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);ci=p,window.addEventListener("scroll",p)};Vt('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const ui={Blink:"Blink"},vi=new Map,gi=e=>{var t;if(!vi.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(ui)){const o=e[t];null!=o&&(window[n]=o)}})(e)).catch(t=>{throw vi.delete(e),t});vi.set(e,t)}return null!==(t=vi.get(e))&&void 0!==t?t:Promise.resolve()},hi="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",mi={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return u(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){u(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){u(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},fi="finn_blink_id",yi=e=>{var t,n;const o=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==o?void 0:o.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},bi=(e,t)=>{const{finnBlink:{enabled:n}={}}=c.get(),o=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!o||!n)return null;const{limit:i,height:r,requireImage:a,theme:d,rec:s,distributionTypes:l,position:p,offset:u,advertoryTheme:v}=t||{};return{selector:`#${yi(e)}`,enabled:o,position:null!=p?p:e,distributionTypes:null!=l?l:[],limit:null!=i?i:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:s,theme:"dark"===d?"dark":"light",advertoryTheme:v}},wi=(n,o,i)=>t(void 0,void 0,void 0,function*(){const{placements:r,deviceType:a}=c.get();u(`rendering finn blink ad for ${n}`);const d=le(n),s=r[a].find(e=>e.id===d),l=bi(n,null==s?void 0:s.finnBlink),{publisher:p,country:v,finnBlink:g}=o,{userId:h,uuid:m,channel:f,theme:b}=null!=g?g:{},w=null!=f?f:`${p}.${v}`,x=(e=>{if(!e){const e=Q();return null!=e?e:""}return e})(h),k="dark"===b?"dark":"light";if(!(null==l?void 0:l.enabled))return u(`Finn blink is not enabled on placement: ${n}`),i&&i(n),void Bo(n);var E;if((e=>{var t;const n=yi(e),o=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==o?void 0:o.classList)||void 0===t?void 0:t.contains("finn"))})(n))u(`Finn blink already loaded ${n}`);else try{const n=yield t(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=c.get(),t=mi.get(fi),n=y("finncode");if(!e||n)return"";if(!t){const t=yield q.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return mi.set(fi,n),n}return t});yield(E=Object.assign(Object.assign({},l),{hashed_email:n,channel:w,id:x,theme:k,uuid:m}),t(void 0,void 0,void 0,function*(){const{id:t,hashed_email:n,theme:o}=E,i=e(E,["id","hashed_email","theme"]),r=window[ui.Blink];if(!r)return;const a=new r({remote:"https://www.finn.no/distribution-front/external/carousel",id:t,hashed_email:n,theme:o});yield a.inject(i)})).then(()=>{((e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageType:o}=c.get(),i=document.querySelector(`#${e}`);if(!i)return;if(i.classList.add("disable-cogwheel"),!n)return;zo(n,i,Do,null!=t?t:o),wt({preferredTestIdData:{targetId:e,testId:"finn"}})})(l.selector.replace("#",""),l.advertoryTheme)})}catch(e){u(`Finn blink error ${e}`),i&&i(n),!i&&fe(n),Bo(n)}}),xi=(e,t)=>{var n;(u(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):u(`Cannot perform afterend on: ${e.id}`)},ki=e=>document.querySelector(`#${e}`);let Ei,Ti=[];const Ii=["takeover","wallpaper"],Ai=e=>{const t=(e=>{const t=we.getData("alertoryConfigKeywords"),{queryConfig:n,placements:o,tcf:i,glimr:r,appearanceConfig:a,requestSize:d=s,publisher:l,country:c,pageType:p,deviceType:u,isMobileApp:v=!1,pageOptions:{member:g},takeover:h,fullscreenScroll:m,useAppTabletInvCode:f}=e;return{xandr:{member:g,keywords:t,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({publisher:l,country:c,pageType:p,deviceType:u,placements:o,tcf:i,requestSize:d,isMobileApp:v,useAppTabletInvCode:f},r&&{glimr:r}),n&&{queryConfig:n}),a&&{appearanceConfig:a}),h&&{takeover:h}),m&&{fullscreenScroll:m})}})(e);window.advertory={initialized:!0,siteConfig:e,alertoryConfig:t}},Si=()=>t(void 0,void 0,void 0,function*(){const{pageOptions:e}=c.get(),{preparePageOptions:n}=c.getHandlers(),o=(()=>{const{sandboxAdIframeEnabled:e=!0}=c.get();return{sandboxAdIframe:e,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get();return(yield I(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),r=yield n(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},o)}),i));(e=>{const t=we.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Ro(e);we.setData("alertoryConfigKeywords",n)})(r.keywords),ae(()=>Ei.setPageOpts(r))}),Ci=e=>t(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,isMobileApp:o,country:i}=c.get();Pi(e);const r=yield I(n,o,i,"prebid");(null==t?void 0:t.enabled)&&r?(u("core loadPlacements prebid enabled"),yield Xt()):(u("core load tags invoked without prebid enabled"),Oi(e))}),Pi=e=>{const{prepareTag:t}=c.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const o=t.findIndex(t=>e.id.includes(t)),i=t.findIndex(e=>n.id.includes(e));return-1!==o&&-1===i?-1:-1===o&&-1!==i?1:o-i})})(e).forEach(e=>{u("core defineTags",{placement:e});const o=No(e);if(_o(e.id)){const i=t(o),r=(e=>{const{allowedFormats:t,invCode:n,keywords:o,sizes:i}=e;return{adTypes:t,invCode:n,keywords:Fo(o),sizes:i}})(i);n.push(r),ae(()=>(u("core defineTag - add to the queue",{placement:e,preparedTag:i}),Ei.defineTag(i)))}}),(e=>{var t,n,o;(null===(o=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===o?void 0:o.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},Oi=e=>{const t=e.filter(({id:e})=>_o(e)).map(({id:e})=>e);t.length&&ae(()=>(u("core loadTags",{placementsIdsToLoad:t}),Ei.loadTags([...t])))},Li=(e,n)=>t(void 0,void 0,void 0,function*(){const{appearanceConfig:t,deviceType:o}=c.get(),{threshold:i,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(n),d=null==t?void 0:t.defaultThreshold[o];a&&(u("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:n,threshold:i,deviceDefaultThreshold:d}),yield Hn(a,null!=i?i:d)),a&&r&&(u("core showAd - setup refreshing",{placement:e,adObj:n}),a.dataset.refresh=r.toString())}),$i=e=>e.some(({id:e})=>Ii.some(t=>e.includes(t))),ji=e=>t(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return;const[o,i]=(e=>e.reduce(([e,t],n)=>{var o;return(null===(o=null==n?void 0:n.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),r=(e=>{const{requestSize:t=s,queryConfig:{placementBatches:n}={},deviceType:o}=c.get(),i=Pe(e),r=Object.keys((null==n?void 0:n[o])||{}).map(e=>i[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({id:e})=>e)),d=e.filter(({id:e})=>!a.has(e));return[...r,...to(d,t)]})(i);for(const e of r)$i(e)?(u("core loadAds without lazy loading",{placementsToLoad:e}),yield Ci(e)):e.length&&(u("core loadAds with lazy loading",{placementsToLoad:e}),yield Ni(e));yield(e=>t(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,deviceType:n}=c.get(),o=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{threshold:e,id:n}=t,i=ki(n);i&&(yield Hn(i,null!=e?e:o))}}))(o)}),Ni=e=>t(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=c.get(),o=[];if(!t)return u("lazy load is not enabled",{placements:e}),void(yield Ci(e));const i=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{u("lazy load is enabled - handler start",{loadedPlacementIds:o,placements:e});const i=e.every(e=>o.includes(e.id)),r=e.map(e=>e.id);!i&&o.push(...r),!i&&Ci(e),u("lazy load is enabled - handler stop",{loadedPlacementIds:o,placements:e,arePlacementsLoaded:i,placementIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.id);t&&(u("lazy loading - observe element",{placementId:e.id,element:t}),i.observe(t))})}),_i=()=>t(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:n,wallpaperHandlers:{initWallpaperAd:o,adjustAdToHorseshoe:i}}=c.getHandlers(),{wallpaper:r,fullscreenScroll:a}=c.get(),d=[];ae(()=>{Ei.onEvent("adRequested",()=>{e.adRequested()}),Ei.onEvent("adAvailable",i=>t(void 0,void 0,void 0,function*(){var t,d,s,l,p,v;u("core adAvailable start",{placementsAvailable:Ti,adObj:i,isFullscreenScrollAd:Be(i),isFinnBlink:Ge(i.targetId),isNativeAd:Fe(i),isMediation:qo(i),isTakeoverAd:Ve(i),isCollapseAd:We(i),isWallpaperAd:He(i)});const g=null===(s=null===(d=null===(t=null===window||void 0===window?void 0:window.apntag)||void 0===t?void 0:t.requests)||void 0===d?void 0:d.tags[i.targetId])||void 0===s?void 0:s.adResponse.ads;qo(i)&&g&&(null===(l=g[1])||void 0===l?void 0:l.rtb)&&(i.banner=null===(v=null===(p=g[1])||void 0===p?void 0:p.rtb)||void 0===v?void 0:v.banner),Be(i)&&Yt(i),Xe(i)&&pi(),Be(i)&&!Ge(i.targetId)&&Jt(i,a),!Fe(i)||qo(i)||Ge(i.targetId)||n(i,c.get()),Ve(i)&&!We(i)&&(Co(i.targetId),yield Po(i)),He(i)&&(o(()=>ae(()=>window.apntag.showTag(i.targetId)),r),we.setData("wallpaper",{isAvailable:!0})),(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(i)&&we.setData("horseshoe",{isAvailable:!0}),wt({adObj:i}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const o=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;o&&((e,t)=>{const{height:n,width:o,native:i}=e;i?t.dataset.adSizes="[1,1]":n&&o&&(t.dataset.adSizes=`[${o},${n}]`)})(e,o)})(i),e.adAvailable(i);const h=Ti.find(({id:e})=>e===i.targetId);h&&(yield Li(h,i),Ti=Ti.filter(e=>e.id!==h.id)),u("core adAvailable stop",{placementsAvailable:Ti,adObj:i,isFullscreenScrollAd:Be(i),isFinnBlink:Ge(i.targetId),isNativeAd:Fe(i),isMediation:qo(i),isTakeoverAd:Ve(i),isCollapseAd:We(i),isWallpaperAd:He(i)})})),Ei.onEvent("adLoaded",t=>{const{refreshConfig:o,appearanceConfig:r}=c.get(),a=document.getElementById(t.targetId);Ge(t.targetId)&&(e=>{const{fullscreenScroll:t}=c.get(),{initNativeAd:n}=c.getHandlers();Be(e)&&Jt(e,t),Fe(e)&&n(e,c.get())})(t);d.includes(t.targetId)&&Fe(t)&&(n(t,c.get()),wt({adObj:t})),!d.includes(t.targetId)&&qo(t)&&d.push(t.targetId),We(t)&&fe(t.targetId),Ve(t)&&((e,t)=>{var n;const o="100%",i="100%";e.resizeAd(t,[o,i]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===o&&n===i||(r.style.width=o,r.style.height=i)}}).observe(r,{attributes:!0,attributeFilter:["style"]})})(Ei,t.targetId),Re(t)&&(e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:o}={}}=c.get();if(!t||!n||!o)return;const i=t.parentElement;i&&(t.classList.add(`advertory-${n}-${o}__full-width-ad`),i.classList.add(`advertory-${n}-${o}-wrapper__full-width-ad`))})(t),(e=>et(e,$e))(t)&&(e=>{var t;const n=document.querySelector(`#${e.targetId}`),o=null===(t=document.querySelector(`#${e.targetId}`))||void 0===t?void 0:t.parentElement,i=null==n?void 0:n.querySelector("iframe"),r=null==i?void 0:i.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:d}={}}=c.get();if(!(n&&i&&r&&o))return;o.classList.add(`advertory-${a}-${d}__vertical-full-width-ad-wrapper`);const s=window.innerWidth,l=Math.round(s/1080*1920);n.style.width="100%",n.style.height=`${l}px`,n.classList.add(`advertory-${a}-${d}__vertical-full-width-ad`);const p=kt(e,n.offsetWidth);r.style.transform=`scale(${p})`,r.style.transformOrigin="left top"})(t),((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,o=document.querySelector(`#${n}`),i=null==o?void 0:o.parentElement;if(!i||!o)return;Qn({adWrapper:i,placementContainer:o});const{delayTime:r=1e3}=t,a=(new Date).getTime();o&&"true"!==o.dataset.subscribedForRefresh&&(o.dataset.subscribedForRefresh="true",o.dataset.refresh&&eo(o,a,r))})(t,o),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(t.targetId);var s,l;we.getData("horseshoe").isAvailable&&i(t.targetId),(e=>{var t,n,o,i,r,a;const{adScaleConfig:d,deviceType:s}=c.get();if(!(null==d?void 0:d.enabled))return;if(et(e,Le))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],p=Ie(e.targetId.split("-")[0]);if(!l.includes(p))return;const u=null!==(o=null===(n=d.offset)||void 0===n?void 0:n[p])&&void 0!==o?o:0,v=document.getElementById(e.targetId),g=null!==(i=null==v?void 0:v.offsetWidth)&&void 0!==i?i:window.screen.width,h=null!==(a=null===(r=null==v?void 0:v.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;Et(e,(g<h?g:h)-u)})(t),e.adLoaded(t),s=t.targetId,!document.querySelector(`#gdprAdTransparencyCogWheelButton-${s}`)&&(null===(l=window.gdpr)||void 0===l?void 0:l.setupButton)&&window.gdpr.setupButton(s),a&&(a.classList.add("ad-loaded"),(e=>{var t;const{siteSpecificConfig:n}=c.get(),o=null!==(t=null==n?void 0:n.mainColumnWidth)&&void 0!==t?t:1/0;e.clientWidth>o&&e.setAttribute("data-two-column-ad-layout","true")})(a)),It(t),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:t.targetId,adFormat:xt(t)}}))}),Ei.onEvent("adNoBid",n=>t(void 0,void 0,void 0,function*(){fe(n.targetId),yield On(c.get(),n),ht(n)&&(yield gt()),e.adNoBid(n)})),Ei.onEvent("adError",(n,o)=>t(void 0,void 0,void 0,function*(){ht(o)&&(yield gt()),e.adError(n,o)})),Ei.onEvent("adCollapse",()=>{e.adCollapse()}),Ei.onEvent("adRequestFailure",t=>{fe(t.targetId),e.adRequestFailure(t)}),Ei.onEvent("adBadRequest",t=>{fe(t.targetId),e.adBadRequest(t)}),Ei.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),Ei.onEvent("adNoBidMediated",t=>e.adNoBidMediated(t))})}),qi=(e,n)=>t(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{clearAds:o,reloadExistingAds:i,renderFinnBlinkPlacements:r,contextSelector:a}=null!=n?n:{};if(o)return Ee(),[];i&&(Ee(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{ye(e.id)})),p(null!=e?e:{}),yield Si();let d=Se(a);return r&&(d=d.filter(e=>Ge(e.id))),d.length>0&&(Ti=[...Ti,...d.map(e=>Object.assign({},e))],io(d),ao(d),yield ji(d)),Ti}),zi=(e,n)=>t(void 0,void 0,void 0,function*(){var o;c.set(e),c.setHandlers(n),we.initialize(),window.addEventListener("message",Fn,!1),Ei=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=Ei,u("Apn tag is set up on window"),yield Promise.allSettled([t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get();(yield I(e,t,n,"xandr-endpoint"))||Ei.setEndpoint("ib.adnxs-simple.com",!0)}),t(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,isMobileApp:n,country:o}=c.get(),i=yield I(t,n,o,"prebid");(null==e?void 0:e.enabled)&&i&&(yield Pt(null==e?void 0:e.url))}),G(e),t(void 0,void 0,void 0,function*(){const{astUrl:e}=c.get();yield Pt(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),t(void 0,void 0,void 0,function*(){const{gptUrl:e,tcf:t,isMobileApp:n,country:o}=c.get();(yield I(t,n,o,"gpt-endpoint"))&&(yield Pt(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),t(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,url:t}={},tcf:n,isMobileApp:o,country:i}=c.get(),{getConsentAsync:r}=T(n,0,i),a=yield r();if(e&&t&&a){if(yield Pt(t),document.querySelector(`.${Oo}`))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(Oo)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),S(),t(void 0,void 0,void 0,function*(){const{gdpr:{url:e,allowHidingAds:t=!0}={}}=c.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield Pt(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),yield Lo(),u("Libraries have been loaded and trackers have been set"),yield(o=n.librariesToLoad,t(void 0,void 0,void 0,function*(){const e=o.map(e=>Pt(e));yield Promise.all(e)})),yield _i(),yield Si(),u("Page options have been set"),Ai(e),u("Advertory is setup on window"),Ti=Se(),io(Ti),ao(Ti),yield ji(Ti),u("Ads has been loaded",Ti),((e,n)=>{var o,i,r,a;if(!Cn())return void u("Ad block not enabled, Dr. Edition backfills will not be rendered");u("Ad block is enabled, Dr. Edition backfills will be rendered");const d=null!==(a=null===(r=null===(i=null===(o=e.finnBlink)||void 0===o?void 0:o.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===r?void 0:r.map(([e])=>e))&&void 0!==a?a:[],s=new IntersectionObserver((n,o)=>t(void 0,void 0,void 0,function*(){for(const t of n){if(!t.isIntersecting)continue;const n=t.target;o.unobserve(n),yield On(e,{targetId:n.id})}}),{rootMargin:"400% 0px"});n.filter(e=>!d.some(t=>e.id.startsWith(t))).forEach(e=>{const t=document.getElementById(e.id);t&&s.observe(t)})})(e,Ti),Vo(Ti),yield n.replaceAdsWithFinnBlink(e.finnBlink),yield(e=>t(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield I(e.tcf,e.isMobileApp,e.country,"handleDrEdition")))return;const n=yield Tn(),o=new In(n);An({publisher:e.publisher,drEditionConfig:e.drEdition,device:e.deviceType,pageType:e.pageType,country:e.country},o,null===(t=e.pulse)||void 0===t?void 0:t.instance)}))(e),(e=>{if(!(null==e?void 0:e.enabled)||ei)return;const{splitPointIDs:t,adSelector:n,trackSelector:o=Ko}=e,i=document.querySelector(o);if(!i)return;ei=!0;const r=()=>{Zo(i,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)}),new ResizeObserver(r).observe(i)})(e.rightColumnSplit),yield(e=>t(void 0,void 0,void 0,function*(){const t=new di;yield t.run(e)}))(e)}),Di=(e,n)=>t(void 0,void 0,void 0,function*(){yield((e,n)=>t(void 0,void 0,void 0,function*(){const{initConsentManager:t,getConsentAsync:o}=T(e.tcf,e.isMobileApp,e.country),i=yield Wo(e);yield Sn(),yield Uo(t),yield Uo(o),u("TCF resolved successfully"),yield zi(i,n),u("Run function resolved successfully")}))(e,n)}),Mi={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&"native"!==e.adType&&((e,t)=>{Et(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{(e=>{const{targetId:t}=e,n=`${le(t)}_backfill`,o=c.get();if(!o.placements[o.deviceType].some(e=>e.id===n))return;const i=document.querySelector(`#${t}`),r=null==i?void 0:i.parentElement;if(!i||!r)return;ye(t);const a=`backfill_wrapper_for_${t}`;r.setAttribute("id",a),i.setAttribute("id",n),qi({},{contextSelector:`#${a}`})})(e)},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},Bi=()=>{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},Fi={[pn.VG]:["board","netboard","backfill","outstream"],[pn.AFTONBLADET]:["panorama","outstream"],[pn.GODARE]:["panorama","outstream"],[pn.SVD]:["wph-article-panorama","wph-front-panorama"]},Ri=e=>{var t;const{publisher:n}=c.get();return!!Fi[n]&&!!(null===(t=Fi[n])||void 0===t?void 0:t.some(t=>e.includes(t)))},Vi="native_override_desc2",Ui=(e,t,n)=>{var o;const{image:i,icon:r,sponsoredBy:a,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(i),imgWidth:null==i?void 0:i.width,imgHeight:null==i?void 0:i.height,imgAltText:null!=d?d:"",logo:b(r),sponsoredBy:null!=a?a:"",title:null!=d?d:"",url:null!=s?s:"",cta:null!=l?l:"",description:null!==(o=null!=c?c:v)&&void 0!==o?o:"",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)},Hi=(e,t)=>{const n=(o=Vi,window.location.href.includes(o));var o;const i=new URLSearchParams(window.location.search).get(Vi),r=t.includes("native_recirc");return n&&i?i:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Wi=(e,t,n,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:o,pageType:i}=t,r=o&&Object.values(pn).includes(o);n&&r&&zo(o,e,Mo,i)})(i,n),o())},Ki=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 o of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Xi(o)}),t.dataset.tracked="true")})},Gi=e=>{const{native:{impressionTrackers:t}={}}=e;(null==t?void 0:t.some(e=>e.includes("googleads")))?null==t||t.forEach(Yi):window.apntag.fireImpressionTrackers(e);const n=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(n)},Ji=(e,t)=>{var n;let o=!1;const i=document.querySelector(`#${e.targetId}`);if(!i||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:Z.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!o)for(const n of t)if(n.isIntersecting){o=!0,Gi(e),c.disconnect();break}},s);c.observe(i)},Yi=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Xi(e):window.navigator.sendBeacon(e)},Xi=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Qi=(e,t,n)=>{const o=((e,t,n)=>{var o;const{displayTemplates:i,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),p=null!==(o=Hi(e.targetId,l))&&void 0!==o?o:c,u=Ut[t.language||w.NO],v=Ui(d,u,s);return(d.video?r[p]:i[p]||i.default)(v,t)})(e,t,n);Wi(e.targetId,o,t,()=>{const{nativeTrackingConfig:{nativeTrackingEnabled:n=!0}={}}=t;n&&((e,t)=>{Ki(e),Ji(e,t)})(e,t)})},Zi="viewable",er="adClick";var tr=e=>(t,n,o)=>{const{video:i,img:r,url:a}=t,{publisher:d,productTag:s}=n,{pluginsNames:l,videoLoop:c}=o||{};if(!(null==i?void 0:i.content))return null;const p=Math.ceil(1e5*Math.random()),u=r||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${p}`,g=nr(i.content,a),h=or({id:p,nodeId:v,poster:u,tagURL:g,publisher:d,productTag:s,videoLoop:c});return ir({playerConfig:h,clickUrl:a,pluginsNames:l}),`${e(t,n,v)}`};const nr=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),o=n.querySelector("ClickThrough"),i=n.querySelector("VideoClicks");if(o){for(;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(n.createCDATASection(t))}else if(i){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),i.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},or=({id:e,nodeId:t,poster:n,tagURL:o,publisher:i="",productTag:r="xandr",videoLoop:a=!1})=>({id:e,poster:n,vendor:"appnexus",node:t,mute:!0,autoplay:a,repeat:a,skin:{name:"inventory-player",url:"https://ads.inventory.schibsted.io/styles/player.css"},settings:{jw:{stretching:"fill",advertising:{client:"vast",tag:o}}},pulse:{provider:i.toLowerCase(),decorator:e=>Object.assign(Object.assign({},wn(e)?e:{}),{provider:Object.assign(Object.assign({},wn(null==e?void 0:e.provider)?e.provider:{}),{productTag:r})})}}),ir=e=>t(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:o}=e,{repeat:i}=t,r=yield gn(t);mn(n),r.once("assetReady",()=>{vn(r,n)}),r.on(Zi,e=>{const{viewable:t}=e;t?r.play():r.pause()}),r.on(er,()=>{window.open(o,"_blank")}),i&&r.on("pause",()=>{r.play()})}),rr=({containerId:e,url:t,body:n,title:o,logo:i,description:r,isContentVideoAd:a=!1})=>{const d=`\n <div class="ad-header">\n <span>${Ut.no.adContent}</span>\n ${i?`<img alt="" aria-hidden="true" class="ad-logo" src="${i}" />`:""}\n </div>\n `,s=`\n <div class="ad-text">\n <h3>${o}</h3>\n ${r?`<div>${r}</div>`:""}\n </div>\n `;return`\n <div id="${e}" class="advertory-tekno-ad-content">\n <div class="ad-info" id="${e}-button"></div>\n ${a?`\n ${d}\n ${n}\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${s}\n </a>\n `:`\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${d}\n ${n}\n ${s}\n </a>\n `}\n </div>\n `};Vt('@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}}'),Vt(".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}}"),Vt(".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}}"),Vt('@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}'),Vt('.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}'),Vt('.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}}'),Vt(".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}"),Vt('.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}}'),Vt('.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)}}');Vt('.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}}'),Vt('.advertory-no-ad-native-seamless .ad-info div[role=button]{left:100%;transform:translateX(-100%);background-color:hsla(0,0%,100%,.45);border-bottom-left-radius:13px}.advertory-no-ad-native-seamless .ad-link{text-decoration:none;color:inherit}.advertory-no-ad-native-seamless .ad-link .ad-content{min-width:320px;height:100%;margin:0 auto;padding:8px 8px 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;border-radius:10px;background-color:var(--color-background-secondary, #ffffff);color:var(--color-text-primary, #333)}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header{padding:8px 10px 10px 10px}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand{display:flex;align-items:center;gap:12px;margin-bottom:11px}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-logo{max-height:44px;border-radius:50%}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-brand-text{display:flex;flex-direction:column;gap:3px;align-items:start}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-brand-text .sponsored-by{font-size:16px;font-weight:500;line-height:1}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-brand-text .ad-annons{font-size:14px;font-weight:400;line-height:1.1;color:var(--color-text-primary, #333);text-transform:lowercase}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-brand .ad-brand-text .ad-annons::first-letter{text-transform:uppercase}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-header .ad-headline{margin:0;font-size:16px;font-weight:400;line-height:1.2;word-spacing:-1px;text-align:left}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-image-container{width:100%;aspect-ratio:1/1;overflow:hidden;display:flex;justify-content:center;align-items:center}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-image-container .ad-image{height:100%;width:auto;object-fit:cover}@media screen and (min-width: 768px){.advertory-no-ad-native-seamless .ad-link .ad-content .ad-image-container{aspect-ratio:1.91/1}}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer{display:flex;flex-direction:column;justify-content:center;padding:13px 10px}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row{display:flex;align-items:center;justify-content:space-between}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper{display:flex;flex-direction:column;gap:5px;flex-grow:1;padding-right:8px;align-items:start}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper .ad-domain{font-size:11px;line-height:1;color:#666;text-transform:uppercase;text-align:left;font-weight:500}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper .ad-description{font-size:15.5px;font-weight:500;text-align:left;word-spacing:-1px;color:var(--color-text-primary, #111111)}.advertory-no-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-action{flex-shrink:0;padding:10px 14px;font-size:12px;line-height:1;color:var(--color-text-primary, #111111);white-space:nowrap;background-color:var(--color-background-tertiary, #d9d9d9);border-radius:12px;font-weight:500}.advertory-aftenposten-native-ad-wrapper__front:has(.advertory-no-ad-native-seamless),.advertory-aftenposten-native-ad__front:has(.advertory-no-ad-native-seamless),.advertory-bt-native-ad-wrapper__front:has(.advertory-no-ad-native-seamless),.advertory-bt-native-ad__front:has(.advertory-no-ad-native-seamless),.advertory-sa-native-ad-wrapper__front:has(.advertory-no-ad-native-seamless){max-width:100%}');const ar={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:o,img:i,adText:r})=>`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${o}" class="ad-image" src="${i}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${o}</div>\n </div>\n </div>\n </a>\n </article>`},dr={default:ar.NATIVE_TEMPLATE,content:({containerId:e,url:t,title:n,img:o,imgWidth:i,imgHeight:r,description:a,logo:d,imgAltText:s},l)=>{const c=((e,t)=>{if(e&&t)return t/e})(i,r);return rr({containerId:e,url:t,title:n,logo:d,description:a,body:`\n<div class="ad-image-wrapper" ${c?`style="padding-bottom: ${100*c}%"`:""}>\n <img alt="${s}" class="ad-image" src="${o}" />\n</div>`})},contentVideo:(e,t)=>tr(({containerId:e,url:t,title:n,logo:o,description:i},r,a)=>rr({containerId:e,url:t,title:n,description:i,logo:o,isContentVideoAd:!0,body:`\n<div class="ad-video-wrapper">\n <div id="${a}"></div>\n</div>`}))(e,t),nativeVideo:(e,t)=>tr(({containerId:e,url:t,sponsoredBy:n,title:o,description:i},r,a)=>(({containerId:e,url:t,sponsoredBy:n,body:o,title:i,description:r})=>`\n<div id="${e}" class="advertory-tekno-ad-native">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}"rel="noopener nofollow sponsored">\n <div class="ad-header">${Ut.no.adFrom} ${n}</div>\n ${o}\n <div class="ad-text">\n <h3>${i}</h3>\n ${r?`<div>${r}</div>`:""}\n </div>\n </a>\n</div>`)({containerId:e,url:t,description:i,sponsoredBy:n,title:o,body:`\n<div class="ad-video-wrapper">\n <div id="${a}"></div>\n</div>`}))(e,t),sponsorstripe:t=>{var{title:n,logo:o}=t;return e(t,["title","logo"]),`<div class="advertory-tekno-sponsorstripe">\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n var disclaimer = e.target.closest('button').parentElement.querySelector('.disclaimer');\n disclaimer.style.display = 'flex';\n } catch (error) {}\n })(arguments[0]);return false;"\n >\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none"><path fill="currentColor" d="M9 9.327a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0zM10 4.399a1 1 0 1 0 0 2 1 1 0 0 0 0-2"/><path fill="currentColor" fill-rule="evenodd" d="M10 .348c-5.523 0-10 4.477-10 10s4.477 10 10 10 10-4.477 10-10-4.477-10-10-10m-8 10a8 8 0 1 0 16 0 8 8 0 0 0-16 0" clip-rule="evenodd"/></svg>\n </button>\n <span class="ad-text">${n}</span>\n <img alt="" aria-hidden="true" class="ad-logo" src="${o}" />\n <div class="disclaimer" style="display: none">\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n var disclaimer = e.target.closest('button').parentElement;\n disclaimer.style.display = 'none';\n } catch (error) {}\n })(arguments[0]);return false;"\n >\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M11 20.07a9.375 9.375 0 1 0 0-18.75 9.375 9.375 0 1 0 0 18.75" clip-rule="evenodd"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m7.25 14.444 7.5-7.5M14.75 14.444l-7.5-7.5"/></svg>\n </button>\n <div>\n Annonsøren som presenterer denne saken har betalt for profilering av fremhevet annonsemateriell i artikler som omhandler denne tematikken.\n <a href="https://www.vg.no/informasjon/redaksjonelle-avgjorelser/232" target="_blank">\n Les mer\n </a>\n </div>\n </div>\n </div>`}},sr={displayTemplates:{default:dr.default,content:dr.content,sponsorstripe:dr.sponsorstripe},videoTemplates:{default:dr.nativeVideo,content:dr.contentVideo}},lr=((e,t)=>n=>Di(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e))({initNativeAd:(e,t)=>{const{targetId:n}=e;if(!document.querySelector(`#${n}`))return;const{pageType:o=un.FRONT,nativeTrackingConfig:i,appearanceConfig:r,deviceType:a}=null!=t?t:{},d={language:w.NO,publisher:pn.TEK,deviceType:a,pageType:o,nativeTrackingConfig:i,appearanceConfig:r};Qi(e,d,sr)},wallpaperHandlers:{initWallpaperAd:(e,t)=>{if(!t)return;const{options:{appMainContainerSelector:n,wallpaperAnchorSelector:o}={}}=t;(e=>{const t=document.querySelector(e||"#application");if(!t)return;ge();const n=document.createElement("div");n.classList.add(ue),document.body.insertBefore(n,t.nextSibling),n.style.setProperty("position","fixed"),n.style.setProperty("width","100%"),n.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),n.style.setProperty("background-position","center top"),n.style.setProperty("background-repeat","no-repeat")})(n),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(he(n),window.addEventListener("scroll",()=>he(n)))})(o),e()},adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(ve),n.classList.add(ve))}},loadFinnBlinkAd:(e,n,o,i)=>t(void 0,void 0,void 0,function*(){const{isMobileApp:r}=c.get();if(u(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield t(void 0,void 0,void 0,function*(){const{tcf:e,isMobileApp:t,country:n}=c.get(),{getConsentAsync:o}=T(e,0,n),i=yield o();return!(!(null==e?void 0:e.enabled)||!i)||(u("Skip loading finn blink ad due to missing TCF consent."),!1)}))||r)return o&&o(e),Bo(e),void(!o&&fe(e));try{yield gi(hi)}catch(e){console.error(e)}yield wi(e,n,o),i&&i()}),replaceAdsWithFinnBlink:e=>t(void 0,void 0,void 0,function*(){if(!e)return;yield gi(hi);const{replacementConfig:t}=e;if(!(Cn()&&(null==t?void 0:t.adsToReplace)&&(null==t?void 0:t.sizes)&&e.enabled))return void u(`Finn blink configuration is incorrect: ${JSON.stringify(t)}`);const{adsToReplace:n,sizes:o}=t;n.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const o=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=c.get(),n=document.createElement("div"),o=document.createElement("div");return o.id=e,n.appendChild(o),zo(t,o,Do),u(`Creating blink container for: ${e}`),n})(t);(e=>{u(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),xi(n,o),n.dataset.finnBlinkId=t,Vn().withFullAdsChain(e)})}),preparePageOptions:ie,prepareTag:e=>{const{keywords:t,targetId:n,invCode:o}=e,{useAppTabletInvCode:i=!0}=c.get(),r=((e,t)=>{const{isMobileApp:n}=c.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(o,i),a=(e=>{const{keywords:t,dynamicSizeWidthCheck:n}=e,o=`${C()}-adformat`,i=t?t[o]:[];if(!i)return{};const r=(Array.isArray(i)?i:[i]).filter(e=>!(e in Me)||window.innerWidth>=Me[e]);return{[o]:n?r:i}})(e),d=(e=>{const t=`${C()}-targetid`;return e?{[t]:[e]}:{}})(n),s=Bi(),l=(e=>Ri(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(o),p=((e,t)=>Ri(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(o);return Object.assign(Object.assign({},e),{invCode:r,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),d),l),s),rendererOptions:p})},siteEvents:Mi,librariesToLoad:[]},{publisherClassName:pn.TEK,fullWidthFormatClassName:"netboard"}),cr=Vt("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .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-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .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,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var pr=Object.freeze({__proto__:null,default:cr});exports.getVideoPPIDs=e=>t(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=W.getPPIDs(),{ppid1:o,ppid2:i}=K.getPPIDs(),r=(new H).add(n,D[e]).add(t,M[e]).add(i,B[e]).add(o,F[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),exports.initAdvertoryPackage=lr,exports.updateAdvertory=qi;
|