@schibsted/advertory 3.1.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ad-native/cjs/index.d.ts +5 -2
- package/ad-native/cjs/index.js +1 -1
- package/ad-native/es/index.d.ts +5 -2
- package/ad-native/es/index.js +1 -1
- package/aftenposten/cjs/index.d.ts +5 -2
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-DW5FiNkn.js +1 -0
- package/aftenposten/es/{events-dWZPgd0b.js → events-fVBpRpKp.js} +1 -1
- package/aftenposten/es/{index-BldKIphD.js → index-ARv1-rtx.js} +1 -1
- package/aftenposten/es/{index-CEoq6TXT.js → index-BXrBgTr1.js} +1 -1
- package/aftenposten/es/{index-DfNHbucZ.js → index-BhGQ8Eyk.js} +1 -1
- package/aftenposten/es/{index-62n0QVWt.js → index-C1WCKnqQ.js} +1 -1
- package/aftenposten/es/{index-E-A-Iz7m.js → index-C5o-U2Uo.js} +1 -1
- package/aftenposten/es/{index-DahODl-d.js → index-CreFCPqz.js} +1 -1
- package/aftenposten/es/{index-_V9lUWta.js → index-dUOxkg1V.js} +1 -1
- package/aftenposten/es/{index-CW-4WSEQ.js → index-gtkeAVQA.js} +1 -1
- package/aftenposten/es/index.d.ts +5 -2
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-D6xSSpR9.js → styles-7A2DgzY_.js} +1 -1
- package/aftenposten/es/{styles-B5jNDhQQ.js → styles-B2-x60Zm.js} +1 -1
- package/aftenposten/es/{styles-68F-BsCk.js → styles-BTHy8T1_.js} +1 -1
- package/aftenposten/es/{styles-HRWUfJIj.js → styles-BcC2u-rj.js} +1 -1
- package/aftenposten/es/{styles-BcYmm0rG.js → styles-CTFge8Rd.js} +1 -1
- package/aftenposten/es/{styles-Co27MJAU.js → styles-CVEYbRiK.js} +1 -1
- package/aftenposten/es/{styles-B_LbPVLb.js → styles-DAt6A-jH.js} +1 -1
- package/aftenposten/es/{styles-1uaMnZQC.js → styles-JUtz3uDc.js} +1 -1
- package/aftenposten/es/{styles-BXKYJBAZ.js → styles-UNM3bDL_.js} +1 -1
- package/aftenposten/es/{styles-B-sr41F5.js → styles-ldyCER6l.js} +1 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-hyLeQfFd.js +1 -0
- package/aftenpostenv2/es/{events-B0rhd0vP.js → events-DBcyIW5o.js} +1 -1
- package/aftenpostenv2/es/{index-H1b80oaQ.js → index-BHAhFA1g.js} +1 -1
- package/aftenpostenv2/es/{index-ChKqYOl_.js → index-Bm-puEV7.js} +1 -1
- package/aftenpostenv2/es/{index-Bv9Lt554.js → index-BmyR2cZz.js} +1 -1
- package/aftenpostenv2/es/{index-BCL20NVu.js → index-CMshwIeO.js} +1 -1
- package/aftenpostenv2/es/{index-COYJAUaz.js → index-DMDg7NLz.js} +1 -1
- package/{aftonbladetv2/es/index-CaCiMiNe.js → aftenpostenv2/es/index-DMrkuCeC.js} +1 -1
- package/aftenpostenv2/es/{index-0_L4qGT_.js → index-DjTEblmv.js} +1 -1
- package/aftenpostenv2/es/{index-BMB76qCo.js → index-Dp5dKdq0.js} +1 -1
- package/aftenpostenv2/es/index.d.ts +5 -2
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-BdumMkv8.js → styles-BCNkSPy_.js} +1 -1
- package/aftenpostenv2/es/{styles-CjQgWnPU.js → styles-BTyOhgPK.js} +1 -1
- package/aftenpostenv2/es/{styles-QjRL2daO.js → styles-BgUd0fzw.js} +1 -1
- package/aftenpostenv2/es/{styles-FvXijZ7S.js → styles-CF9xNxEB.js} +1 -1
- package/aftenpostenv2/es/{styles-DpFkMYKR.js → styles-CLKIpD49.js} +1 -1
- package/aftenpostenv2/es/{styles-C_2nLV57.js → styles-CPXP0KtI.js} +1 -1
- package/aftenpostenv2/es/{styles-CQh1VPIH.js → styles-D6qGT_Ww.js} +1 -1
- package/aftenpostenv2/es/{styles-Ajwr6A4V.js → styles-DiSgKUYB.js} +1 -1
- package/aftenpostenv2/es/{styles-AGiPRJnZ.js → styles-TYM8SJ5E.js} +1 -1
- package/aftenpostenv2/es/{styles-CDatADMx.js → styles-citddene.js} +1 -1
- package/aftonbladet/cjs/index.d.ts +5 -2
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-aF3r2-IF.js +1 -0
- package/aftonbladet/es/{events-B4xZ3qbU.js → events-C-ojFJke.js} +1 -1
- package/aftonbladet/es/{index-DwnQFw8H.js → index-B4MXTwFf.js} +1 -1
- package/aftonbladet/es/{index-BMbHCcgE.js → index-BCuVg1CU.js} +1 -1
- package/aftonbladet/es/{index-Dw2Uljnp.js → index-BQefKLSG.js} +1 -1
- package/aftonbladet/es/{index-l5DMDhQQ.js → index-C_UCEKIZ.js} +1 -1
- package/aftonbladet/es/{index-CoYjG4_J.js → index-Cymiebzg.js} +1 -1
- package/aftonbladet/es/{index-DieDKWFP.js → index-D4NWG_wJ.js} +1 -1
- package/aftonbladet/es/{index-ChhnSqY-.js → index-D4bY4K5D.js} +1 -1
- package/aftonbladet/es/{index-CdZ01ev3.js → index-Ickiqfsh.js} +1 -1
- package/aftonbladet/es/index.d.ts +5 -2
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-Bw1-ffZQ.js → styles-B94Gha8S.js} +1 -1
- package/aftonbladet/es/{styles-C5YNJEJW.js → styles-DcXaCvkL.js} +1 -1
- package/aftonbladet/es/{styles-CJ_Z-NDK.js → styles-Dn-HNFHX.js} +1 -1
- package/aftonbladet/es/{styles-8kaE6xa3.js → styles-jy9TQ3Oh.js} +1 -1
- package/aftonbladet/es/{styles-CRlZPcUZ.js → styles-pjfyqT3B.js} +1 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-BE-eohdT.js +1 -0
- package/aftonbladetv2/es/{events-Y5SvWLVD.js → events-B2owop2t.js} +1 -1
- package/aftonbladetv2/es/index-5f2ZT_Ju.js +1 -0
- package/aftonbladetv2/es/{index-C61-npLc.js → index-B4PxxF90.js} +1 -1
- package/{aftenpostenv2/es/index-DXwgOeLV.js → aftonbladetv2/es/index-BAxkIAm0.js} +1 -1
- package/aftonbladetv2/es/{index-Bg-ndByY.js → index-Bv1zLlCA.js} +1 -1
- package/aftonbladetv2/es/{index-CNLzr6mB.js → index-CZwdfS0S.js} +1 -1
- package/aftonbladetv2/es/{index-BoLFe7HT.js → index-CvGS_z9U.js} +1 -1
- package/aftonbladetv2/es/{index-CBO08jix.js → index-GrP4rish.js} +1 -1
- package/aftonbladetv2/es/{index-DxGy682s.js → index-jdoEKV4R.js} +1 -1
- package/aftonbladetv2/es/index.d.ts +5 -2
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-Dvx8Jt_1.js → styles-C1XQILhX.js} +1 -1
- package/aftonbladetv2/es/{styles-B4Hd58MY.js → styles-C7b_lBln.js} +1 -1
- package/aftonbladetv2/es/{styles-CvY8c--M.js → styles-D6KzrjWN.js} +1 -1
- package/aftonbladetv2/es/{styles-UjGdOvES.js → styles-PhXU7exd.js} +1 -1
- package/aftonbladetv2/es/{styles-CETKBIUJ.js → styles-q8f8uuGU.js} +1 -1
- package/brandmetrics/cjs/index.js +1 -1
- package/brandmetrics/es/index.js +1 -1
- package/bt/cjs/index.d.ts +5 -2
- package/bt/cjs/index.js +1 -1
- package/bt/es/_auto-entry_bt-z9Kg1rXY.js +1 -0
- package/bt/es/{events-C0zIkqPR.js → events-C4YIlyQT.js} +1 -1
- package/bt/es/{index-DgOCJMAw.js → index-BocjnLWK.js} +1 -1
- package/bt/es/{index-U0uxkkNA.js → index-By90m-Nt.js} +1 -1
- package/{sa/es/index-C-nYdeLE.js → bt/es/index-CSaa9bDY.js} +1 -1
- package/{sa/es/index-i6GWjSae.js → bt/es/index-ClAE8apF.js} +1 -1
- package/bt/es/{index-DaYT8t2P.js → index-D8h9j3OL.js} +1 -1
- package/{sa/es/index-BtKnUaLF.js → bt/es/index-DU-GmW-W.js} +1 -1
- package/bt/es/{index-CJXfZy-5.js → index-DY9BE7oQ.js} +1 -1
- package/bt/es/{index-BVmtc6Gu.js → index-GSmkTDbb.js} +1 -1
- package/bt/es/index.d.ts +5 -2
- package/bt/es/index.js +1 -1
- package/bt/es/{styles-D5RKcbfL.js → styles-1oD0v0OI.js} +1 -1
- package/bt/es/{styles-BOOS-geR.js → styles-8BQ-HMKy.js} +1 -1
- package/{sa/es/styles-XRXt1iLs.js → bt/es/styles-BoN1lBN6.js} +1 -1
- package/{sa/es/styles-t9qRJwzc.js → bt/es/styles-CWamUn94.js} +1 -1
- package/{vg/es/styles-Cdsq4-50.js → bt/es/styles-CzA-WXl0.js} +1 -1
- package/bt/es/{styles-D9Dkxtna.js → styles-DBUanVZD.js} +1 -1
- package/bt/es/{styles-DS2uAkSa.js → styles-DenbLlNL.js} +1 -1
- package/bt/es/{styles-nNlP-BOJ.js → styles-f0I0kE9C.js} +1 -1
- package/{sa/es/styles-ohcnsUbX.js → bt/es/styles-vQXEOJfP.js} +1 -1
- package/btv2/es/_auto-entry_btv2-CO2vH-Za.js +1 -0
- package/btv2/es/{events-CL2rUw-v.js → events-Cfcjr6pn.js} +1 -1
- package/btv2/es/{index-8o5S7qeA.js → index-A-i4gtil.js} +1 -1
- package/btv2/es/{index-r0pADISD.js → index-BER4wRvz.js} +1 -1
- package/btv2/es/{index-DM4hO7Nz.js → index-BFX495WH.js} +1 -1
- package/btv2/es/{index-CFkJj2d_.js → index-BJMlGlGU.js} +1 -1
- package/btv2/es/{index-BfuYvg5A.js → index-Coz_46Aj.js} +1 -1
- package/btv2/es/{index-HSV6pWJ_.js → index-Cuf5ReML.js} +1 -1
- package/btv2/es/{index-DGoxOtFw.js → index-D8wy00WJ.js} +1 -1
- package/btv2/es/{index-BGY745vS.js → index-DQD_DZhI.js} +1 -1
- package/btv2/es/index.d.ts +5 -2
- package/btv2/es/index.js +1 -1
- package/{sav2/es/styles-CEpP1jOp.js → btv2/es/styles-BJ9HJy3v.js} +1 -1
- package/{sav2/es/styles-C4JmSAVh.js → btv2/es/styles-CL9NzBNe.js} +1 -1
- package/{vgv2/es/styles-DKH8aIyV.js → btv2/es/styles-CQZFlgyE.js} +1 -1
- package/{vgv2/es/styles-CcQNo7AA.js → btv2/es/styles-D8WA8aad.js} +1 -1
- package/{sav2/es/styles-6R41mhRd.js → btv2/es/styles-PvrlMo2p.js} +1 -1
- package/btv2/es/{styles-Dd4x9atN.js → styles-WNotEG6z.js} +1 -1
- package/btv2/es/{styles-DcWC_4Zs.js → styles-Y6apvbzI.js} +1 -1
- package/btv2/es/{styles-Dt6w4oq8.js → styles-tT473SAS.js} +1 -1
- package/btv2/styles.css +1 -1
- package/common/cjs/index.js +1 -1
- package/common/es/index.js +1 -1
- package/dr-edition/cjs/index.d.ts +5 -2
- package/dr-edition/es/index.d.ts +5 -2
- package/e24/es/_auto-entry_e24-BU2OrpYX.js +1 -0
- package/e24/es/{events-Dnp1rueG.js → events-C_QROQjB.js} +1 -1
- package/e24/es/{index-CIfOXFtH.js → index--tM80_Xl.js} +1 -1
- package/e24/es/{index-AtHV5BKn.js → index-BWDJPTDB.js} +1 -1
- package/e24/es/{index-IKz7ceWR.js → index-BWfP8QBT.js} +1 -1
- package/e24/es/{index-BN3nXzbI.js → index-BiEZKwx8.js} +1 -1
- package/{svd/es/index-DopLSkfV.js → e24/es/index-D79AVdu2.js} +1 -1
- package/e24/es/{index-DqSU4Moc.js → index-DWCdYl06.js} +1 -1
- package/e24/es/{index-CigWNqRE.js → index-Ds8Z94Ik.js} +1 -1
- package/e24/es/{index-BdzrQDnx.js → index-aKSYtCgh.js} +1 -1
- package/e24/es/index.d.ts +5 -2
- package/e24/es/index.js +1 -1
- package/e24/es/{styles-BO3gzgwU.js → styles-050t8UH_.js} +1 -1
- package/e24/es/{styles-KQzCsC2k.js → styles-Bn0I9HO2.js} +1 -1
- package/{tv4/es/styles-Ca9C8hYP.js → e24/es/styles-Bnrg6oWv.js} +1 -1
- package/e24/es/{styles-C5hUus2w.js → styles-CJCDInuA.js} +1 -1
- package/e24/es/{styles-DiZQFaE6.js → styles-CKWdW_ML.js} +1 -1
- package/e24/es/{styles-D3S3zWvW.js → styles-CTJnU9Eh.js} +1 -1
- package/e24/es/{styles-C4tqs-Ze.js → styles-ClCgb9T-.js} +1 -1
- package/e24/es/{styles-CPVXqSEZ.js → styles-CldoQzlZ.js} +1 -1
- package/e24/es/{styles-tonEHV2T.js → styles-DMLUkslt.js} +1 -1
- package/e24/es/{styles-C1NfRYZG.js → styles-Di6w4JZM.js} +1 -1
- package/e24/es/{styles-DZBgHffr.js → styles-wsXemYjg.js} +1 -1
- package/fotbollskanalen/cjs/index.d.ts +5 -2
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DlZt4ga-.js +1 -0
- package/fotbollskanalen/es/{events-AdGe3CzE.js → events-DCiBIHRx.js} +1 -1
- package/fotbollskanalen/es/{index-BSam8mDC.js → index-4VxJTVyO.js} +1 -1
- package/fotbollskanalen/es/{index-BTlw6CFr.js → index-B9ktfSq1.js} +1 -1
- package/fotbollskanalen/es/{index-CwzNZCLF.js → index-BXxoRFTH.js} +1 -1
- package/fotbollskanalen/es/{index-DG8qZmjE.js → index-BYqdvP3u.js} +1 -1
- package/fotbollskanalen/es/{index-BAE9RUBj.js → index-CHctAKMZ.js} +1 -1
- package/fotbollskanalen/es/{index-B54Ym1vZ.js → index-CMGzQzNY.js} +1 -1
- package/fotbollskanalen/es/{index-CiCvTEgv.js → index-Cgpaf7GJ.js} +1 -1
- package/fotbollskanalen/es/{index-CyFicAoP.js → index-DdG9rSVp.js} +1 -1
- package/fotbollskanalen/es/index.d.ts +5 -2
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-VzIvF-8s.js → styles-DH8KBCpz.js} +1 -1
- package/glimr/cjs/index.js +1 -1
- package/glimr/es/index.js +1 -1
- package/godare/cjs/index.d.ts +5 -2
- package/godare/cjs/index.js +1 -1
- package/godt/cjs/index.d.ts +5 -2
- package/godt/cjs/index.js +1 -1
- package/kilkaya/cjs/index.d.ts +5 -2
- package/kilkaya/es/index.d.ts +5 -2
- package/klart/cjs/index.d.ts +5 -2
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.d.ts +5 -2
- package/koket/cjs/index.js +1 -1
- package/koket/es/_auto-entry_koket-B1VvKHFS.js +1 -0
- package/koket/es/{events-CK-bjmYT.js → events-CqmCLZYf.js} +1 -1
- package/koket/es/{index-BgJG4A4C.js → index-B3HB2JAb.js} +1 -1
- package/koket/es/{index-Q5t2Gz-z.js → index-BuGuFSjO.js} +1 -1
- package/{svdv2/es/index-DadrJn75.js → koket/es/index-CPR8OqrE.js} +1 -1
- package/koket/es/{index-CpqkbX35.js → index-Cq9AfCdO.js} +1 -1
- package/koket/es/{index-DnX14KgD.js → index-D2xTCGIA.js} +1 -1
- package/koket/es/{index-CCn7T-nL.js → index-DI3AHGgv.js} +1 -1
- package/koket/es/{index-Bv1vZtXR.js → index-DT_GPwwm.js} +1 -1
- package/koket/es/{index-C4yJ0brP.js → index-DsRR33Ql.js} +1 -1
- package/koket/es/index.d.ts +5 -2
- package/koket/es/index.js +1 -1
- package/{svdv2/es/styles-DXFWGHbT.js → koket/es/styles-C8rvAFp5.js} +1 -1
- package/minmote/cjs/index.d.ts +5 -2
- package/minmote/cjs/index.js +1 -1
- package/package.json +97 -73
- package/pent/cjs/index.d.ts +5 -2
- package/pent/cjs/index.js +1 -1
- package/sa/cjs/index.d.ts +5 -2
- package/sa/cjs/index.js +1 -1
- package/sa/es/_auto-entry_sa-Ci2HwDAd.js +1 -0
- package/sa/es/{events-DyXWT1DT.js → events-CbRAeoLr.js} +1 -1
- package/sa/es/{index-DIKFJ0s9.js → index-0L2g2PsN.js} +1 -1
- package/{bt/es/index-DLQfmCnt.js → sa/es/index-27f28to-.js} +1 -1
- package/sa/es/{index-5k5Qbxmh.js → index-BKwXq-Lh.js} +1 -1
- package/sa/es/{index-Clf8MCDl.js → index-C_YVEbft.js} +1 -1
- package/sa/es/{index-DaiyhAks.js → index-DPOOmTvs.js} +1 -1
- package/{bt/es/index-B9KJC6hl.js → sa/es/index-DQLuNVj9.js} +1 -1
- package/{bt/es/index-D2-MaZi6.js → sa/es/index-Dgp7HdYo.js} +1 -1
- package/sa/es/{index-i3vmIq7V.js → index-rYTowG8e.js} +1 -1
- package/sa/es/index.d.ts +5 -2
- package/sa/es/index.js +1 -1
- package/sa/es/{styles-CLm-HNby.js → styles-BxuIMux6.js} +1 -1
- package/{vg/es/styles-DkwUXEO0.js → sa/es/styles-CCPB7DAa.js} +1 -1
- package/sa/es/{styles-Ddhg-ERA.js → styles-Cnifwgf4.js} +1 -1
- package/sa/es/{styles-D4OtogAd.js → styles-D6FcHOuY.js} +1 -1
- package/{bt/es/styles-NUVv3bQI.js → sa/es/styles-DJgebMIx.js} +1 -1
- package/{vg/es/styles-CBVGXT1R.js → sa/es/styles-DVfxrneE.js} +1 -1
- package/{vg/es/styles-B9jHfsw2.js → sa/es/styles-Dr92Rwhf.js} +1 -1
- package/sa/es/{styles-BnfjjjI4.js → styles-PUjYMhLK.js} +1 -1
- package/sa/es/{styles-EA1k6BKK.js → styles-aWCVUC-K.js} +1 -1
- package/sav2/es/_auto-entry_sav2-WxpOB1lG.js +1 -0
- package/sav2/es/{events-BW-FOz-K.js → events-Cgh2BErE.js} +1 -1
- package/sav2/es/{index-BfNRBBlX.js → index-B-FBdm8J.js} +1 -1
- package/sav2/es/{index-CnbrP7u7.js → index-B8iKj6s3.js} +1 -1
- package/sav2/es/{index-BIfmR1uM.js → index-Bf-B7mJM.js} +1 -1
- package/sav2/es/{index-D7PnbiFA.js → index-C0oOXck1.js} +1 -1
- package/sav2/es/{index-DMyoHa-c.js → index-CIHKogVB.js} +1 -1
- package/sav2/es/{index-a6jeShrz.js → index-ClDyI3TB.js} +1 -1
- package/sav2/es/{index-79xPlDaR.js → index-DtWnHPfg.js} +1 -1
- package/sav2/es/{index-BVZ8q0hh.js → index-Dy3-DOAm.js} +1 -1
- package/sav2/es/index.d.ts +5 -2
- package/sav2/es/index.js +1 -1
- package/{btv2/es/styles-CQaez2yJ.js → sav2/es/styles-5jpCyocI.js} +1 -1
- package/{vgv2/es/styles-02Sl9W58.js → sav2/es/styles-B0-qbUgf.js} +1 -1
- package/sav2/es/{styles-C2-ohfIm.js → styles-BMHPVzpc.js} +1 -1
- package/sav2/es/{styles-C4ZhwGPf.js → styles-B_352IFQ.js} +1 -1
- package/{vgv2/es/styles-BA2pnCUo.js → sav2/es/styles-CR7rb1m6.js} +1 -1
- package/sav2/es/{styles-CDKx-dJZ.js → styles-CSqNiKKs.js} +1 -1
- package/{btv2/es/styles-Jy8SmQb9.js → sav2/es/styles-CUhD2yOb.js} +1 -1
- package/sav2/es/{styles-D1mpFW63.js → styles-GPrywa-V.js} +1 -1
- package/svd/cjs/index.d.ts +5 -2
- package/svd/cjs/index.js +1 -1
- package/svd/es/_auto-entry_svd-CgYZh9cQ.js +1 -0
- package/svd/es/{events-Bw-58PJF.js → events-DliFMGvx.js} +1 -1
- package/svd/es/{index-B1kD9cnk.js → index-7LvlQIj_.js} +1 -1
- package/svd/es/{index-DJnNSYID.js → index-BqdLvpke.js} +1 -1
- package/svd/es/{index-C87hqWX-.js → index-Br9oB5Ij.js} +1 -1
- package/svd/es/{index-BE_m1bYB.js → index-C3MnSDVk.js} +1 -1
- package/svd/es/{index-B2xXj_Ux.js → index-CWEA4knb.js} +1 -1
- package/{tv4/es/index-BiZtrSL4.js → svd/es/index-CwcLrXL2.js} +1 -1
- package/svd/es/{index-DXQYGWQ8.js → index-D_wcmp4Z.js} +1 -1
- package/{tv4/es/index-Dw_i2pfI.js → svd/es/index-yvJXogvN.js} +1 -1
- package/svd/es/index.d.ts +5 -2
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-CM4o-iyT.js → styles-0pv_N2tO.js} +1 -1
- package/svd/es/{styles-2r3Xm4FX.js → styles-Af4IP1WF.js} +1 -1
- package/svd/es/{styles-DF6nUhv8.js → styles-CESomLE9.js} +1 -1
- package/svd/es/{styles-B8_U4Hzy.js → styles-CluLvl8D.js} +1 -1
- package/svd/es/{styles-BuzEBKHR.js → styles-Ctd5RF_4.js} +1 -1
- package/svd/es/{styles-uB5fH2lA.js → styles-J9wd-ppq.js} +1 -1
- package/svdv2/es/_auto-entry_svdv2-xZkoM4eO.js +1 -0
- package/svdv2/es/{events-TFTtiKR3.js → events-pYagBxFV.js} +1 -1
- package/{koket/es/index-CVis_ECR.js → svdv2/es/index-BI-oQMfT.js} +1 -1
- package/svdv2/es/{index-BAq_6HCF.js → index-DDNx9FnV.js} +1 -1
- package/svdv2/es/{index-k2N_bbJo.js → index-DW_OzOXa.js} +1 -1
- package/svdv2/es/{index-DkkPi8Xs.js → index-Du0VgO1Y.js} +1 -1
- package/svdv2/es/{index-CHzwKxhM.js → index-MRCnkXO4.js} +1 -1
- package/svdv2/es/{index-COv7bh_-.js → index-_dx9ZTt8.js} +1 -1
- package/svdv2/es/{index-B-Vdkr2R.js → index-fewi4Guw.js} +1 -1
- package/svdv2/es/{index-7tq17oGd.js → index-sAWEiLve.js} +1 -1
- package/svdv2/es/index.d.ts +5 -2
- package/svdv2/es/index.js +1 -1
- package/{koket/es/styles-DkMKzeaa.js → svdv2/es/styles-CIENRrhO.js} +1 -1
- package/svdv2/es/{styles-DzBec-kE.js → styles-DvG5GaKF.js} +1 -1
- package/svdv2/es/{styles-qSRFCqhc.js → styles-DwHOEo1T.js} +1 -1
- package/svdv2/es/{styles-D8S3QfC3.js → styles-fZrz5WHd.js} +1 -1
- package/svdv2/es/{styles-rxVXI2DT.js → styles-wYd2KvmX.js} +1 -1
- package/svdv2/es/{styles-DB4gOEFc.js → styles-yQntoPdr.js} +1 -1
- package/tek/cjs/index.d.ts +5 -2
- package/tek/cjs/index.js +1 -1
- package/tracker/cjs/index.d.ts +5 -2
- package/tracker/es/index.d.ts +5 -2
- package/tv4/cjs/index.d.ts +5 -2
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/_auto-entry_tv4-BD_PtBev.js +1 -0
- package/tv4/es/{events-BTagERFX.js → events-D7CQP5ST.js} +1 -1
- package/tv4/es/{index-C-ok5lcQ.js → index-9HDVqv93.js} +1 -1
- package/tv4/es/{index-DoZmUSXZ.js → index-BSLPAr3V.js} +1 -1
- package/{e24/es/index-BMxcTiuY.js → tv4/es/index-CfJ0kV8y.js} +1 -1
- package/tv4/es/{index-D1Tl0DJh.js → index-CuVyVYya.js} +1 -1
- package/{svd/es/index-6COG7pM5.js → tv4/es/index-D-SE3PAG.js} +1 -1
- package/tv4/es/{index-EYVujL2S.js → index-DM7-KofP.js} +1 -1
- package/tv4/es/{index-BCbm4WG1.js → index-DWvnYxbR.js} +1 -1
- package/tv4/es/{index-DYAEBWej.js → index-ZFHakMha.js} +1 -1
- package/tv4/es/index.d.ts +5 -2
- package/tv4/es/index.js +1 -1
- package/{e24/es/styles-DG06YuYj.js → tv4/es/styles-DNinGpvp.js} +1 -1
- package/tvnu/cjs/index.d.ts +5 -2
- package/tvnu/cjs/index.js +1 -1
- package/types/index.d.ts +5 -2
- package/vg/cjs/index.d.ts +5 -2
- package/vg/cjs/index.js +1 -1
- package/vg/es/_auto-entry_vg-bymjzVux.js +1 -0
- package/vg/es/{events-ByVURBX_.js → events-DOcSTFGM.js} +1 -1
- package/vg/es/{index-Dmaavlrw.js → index-BOjuAuWj.js} +1 -1
- package/vg/es/{index-CUq_0tde.js → index-BTS_PjF-.js} +1 -1
- package/vg/es/{index-__8DhaLA.js → index-BZpNeBvX.js} +1 -1
- package/vg/es/{index-Bt3_xf83.js → index-BcgyQ1qu.js} +1 -1
- package/vg/es/{index-DA_NEa2h.js → index-DNo70a1v.js} +1 -1
- package/vg/es/{index-BG-ATAHt.js → index-DW43m4oF.js} +1 -1
- package/vg/es/{index-CPLy-LBg.js → index-DZY2xc_E.js} +1 -1
- package/vg/es/{index-CxywCg_0.js → index-Dm_GpS6d.js} +1 -1
- package/vg/es/index.d.ts +5 -2
- package/vg/es/index.js +1 -1
- package/vg/es/{styles-DMJ1cfH1.js → styles-BGTRMrs8.js} +1 -1
- package/vg/es/{styles-MtneGpWj.js → styles-BbMHPi0j.js} +1 -1
- package/vg/es/{styles-DYWkyCiP.js → styles-Bq_tTBj5.js} +1 -1
- package/vg/es/{styles-vbZriun1.js → styles-C1NHnOLa.js} +1 -1
- package/vg/es/{styles-D7d52sNc.js → styles-C1bhidXn.js} +1 -1
- package/vg/es/{styles-CbAits4J.js → styles-C5vtcO2Y.js} +1 -1
- package/{bt/es/styles-C24UH2uG.js → vg/es/styles-CSEEYSz5.js} +1 -1
- package/{bt/es/styles-DTRY6Xzc.js → vg/es/styles-CimKOAxN.js} +1 -1
- package/vg/es/{styles-cC6-WkPy.js → styles-CsHHaKfo.js} +1 -1
- package/{bt/es/styles-DmuADdIG.js → vg/es/styles-CymhRz2U.js} +1 -1
- package/vg/es/{styles-CEBnVlzj.js → styles-DFw6ND_n.js} +1 -1
- package/vg/es/{styles-C_-nyA5J.js → styles-D_VdjFOF.js} +1 -1
- package/{sa/es/styles-DFvvOjAC.js → vg/es/styles-DanNmJeX.js} +1 -1
- package/vg/es/{styles-DqBGH09L.js → styles-Do_vdtxj.js} +1 -1
- package/vg/es/{styles-DhbEQwvN.js → styles-Dy9mUfqt.js} +1 -1
- package/vgv2/es/_auto-entry_vgv2-BNvzsWAP.js +1 -0
- package/vgv2/es/{events-DmgAriY3.js → events-DWESo44J.js} +1 -1
- package/vgv2/es/{index-DHBX5CGa.js → index-1ojdyH8e.js} +1 -1
- package/vgv2/es/{index-BYxIHY_O.js → index-B17W6-pg.js} +1 -1
- package/vgv2/es/{index-C_cVWj6F.js → index-B9MMKdZv.js} +1 -1
- package/vgv2/es/{index-C-U7pq9g.js → index-CDrWTXSv.js} +1 -1
- package/vgv2/es/{index-BwJwAkO6.js → index-CfxjXCEI.js} +1 -1
- package/vgv2/es/{index-DgOY-tyY.js → index-DPA6vezi.js} +1 -1
- package/vgv2/es/{index-XCsLv2Cx.js → index-De0RI3vq.js} +1 -1
- package/vgv2/es/{index-DHNb5tEP.js → index-DrC03b3o.js} +1 -1
- package/vgv2/es/index.d.ts +5 -2
- package/vgv2/es/index.js +1 -1
- package/vgv2/es/{styles-D2xCyElz.js → styles-3foDwyhj.js} +1 -1
- package/{btv2/es/styles-CgwpsP1r.js → vgv2/es/styles-BBQZwyUW.js} +1 -1
- package/vgv2/es/{styles-59_lxa8E.js → styles-BHWVtEqi.js} +1 -1
- package/vgv2/es/{styles-BErMdxsz.js → styles-BMmf636_.js} +1 -1
- package/{sav2/es/styles-Bfc90ujW.js → vgv2/es/styles-BYP9Z3nV.js} +1 -1
- package/{btv2/es/styles-DcfATbX0.js → vgv2/es/styles-BtugIxKG.js} +1 -1
- package/vgv2/es/{styles-DLvsbZSS.js → styles-CBYtKKuI.js} +1 -1
- package/vgv2/es/{styles-CkvDGfFC.js → styles-CI0QFGUK.js} +1 -1
- package/vgv2/es/{styles-v-tgkk-V.js → styles-CqjyI_wE.js} +1 -1
- package/{btv2/es/styles-B-mi5bVu.js → vgv2/es/styles-D-QWrKee.js} +1 -1
- package/vgv2/es/{styles-D4gQOSVN.js → styles-D3K55C_G.js} +1 -1
- package/vgv2/es/{styles-CQ7Kb46p.js → styles-Dt0Ik47Y.js} +1 -1
- package/vgv2/es/{styles-BzeJCTcw.js → styles-EadQwu_f.js} +1 -1
- package/vgv2/es/{styles-BfyqGcHz.js → styles-bYSMAqvn.js} +1 -1
- package/vgv2/es/{styles-BIoGBJM6.js → styles-rNAOVQ6c.js} +1 -1
- package/vgv2/styles.css +1 -1
- package/video/cjs/index.js +1 -1
- package/video/es/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-CZXlgUAy.js +0 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-B-CW4f2D.js +0 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-CT75MBjo.js +0 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-Dvwf0M66.js +0 -1
- package/aftonbladetv2/es/index-BHIshdhc.js +0 -1
- package/bt/es/_auto-entry_bt-Df8jlFTD.js +0 -1
- package/btv2/es/_auto-entry_btv2-D39s_r6l.js +0 -1
- package/e24/es/_auto-entry_e24-Be5NK1EE.js +0 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-sGroYfE1.js +0 -1
- package/koket/es/_auto-entry_koket-BlQVkYzN.js +0 -1
- package/sa/es/_auto-entry_sa-DNmkPM_o.js +0 -1
- package/sav2/es/_auto-entry_sav2-BNNKil2j.js +0 -1
- package/svd/es/_auto-entry_svd-Bad7Ix0I.js +0 -1
- package/svdv2/es/_auto-entry_svdv2-G4Q3KHeG.js +0 -1
- package/tv4/es/_auto-entry_tv4-k7YKYhCH.js +0 -1
- package/vg/es/_auto-entry_vg-DJfBhSk4.js +0 -1
- package/vgv2/es/_auto-entry_vgv2-HWYyzZwV.js +0 -1
package/tek/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n=require("react/jsx-runtime");function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=i(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}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 s(e,t){try{return t in e}catch(e){return!1}}function d(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=o(e[t],n)}),a(t).forEach(function(r){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(s(e,r)&&n.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,n)(e[r],t[r],n):i[r]=o(t[r],n))}),i}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):d(e,t,i):o(t,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)},{})},e=l}());const r=["placements","takeover","refreshConfig","editableConfiguration"],a={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},s=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},d=(e,t)=>{console.warn("[Advertory WARN]: ",e)},l=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:i,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||d("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||d("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||d("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||d("pageContext.deviceType is required."),n||d("pageOptions is required."),i||d("placements is required."),(null==o?void 0:o.defaultThreshold)||d("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,i,o;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(i=e.fullscreenScroll)||void 0===i?void 0:i.enabled),property:"main",featureName:"fullscreenScroll"},{flag:!!(null===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&d(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},c=6;class u{set(e){l(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 r){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),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=o(u.DEFAULT_SITE_HANDLERS,e)}}u.DEFAULT_SITE_HANDLERS={siteEvents:a,initNativeAd:function(){}};const p=new u,v=p.modifyConfigProperties.bind(p),g={NO:"no",SE:"se"},h=e=>e===g.NO?"no-sno":"se-generic";let m="";const y=new Map,f=e=>{const{pageSetup:{tag:t}={}}=p.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(m!==window.location.pathname&&(y.clear(),m=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=y.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=p.get();return`${e}-${t}`})()}-count`]=i,y.set(n,i+1),e})):e},w=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},b="0123456789abcdefghijklmnopqrstuvwxyz",k=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},E=e=>{window.apntag.anq.push(e)},x=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),C=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})}),I="advertory-wallpaper-background",T="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${I}`);e&&e.remove()},A=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${I}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},O=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,P=e=>O.test(e),j=e=>e.startsWith("wallpaper:color:"),$=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundImage=`url(${e})`)},L=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundColor=e)};var _=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(T),n.classList.add(T))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(I),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(A(n),window.addEventListener("scroll",()=>A(n)))})(n),e()},isShortWallpaperColorMessage:j,isShortWallpaperUrlMessage:P,removeWallpaperBackground:S,setWallpaperBackgroundColor:L,setWallpaperBackgroundImage:$});const N=e=>new URLSearchParams(window.location.search).get(e),q="takeover",D="native_override_desc2",M=()=>null!==N("disable_prebid"),F=e=>{if("0"===N("collapse_ad"))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")&&S())},B=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 R{initialize(){this.DATA=Object.assign({},R.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)}}R.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const U=new R,z=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},V=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=U.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},H=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{F(e.id),V(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=w(e.id)}),E(()=>window.apntag.clearRequest())},W="noGroupedPlacements",K=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},G=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},J=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,pageContext:{deviceType:o}}=p.get(),r=n[o].filter(G)||[],a=e?document.querySelector(e):document;if(!a)return[];const s=r.reduce((e,t)=>{const n=K(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({targetId:e})=>e.match(t)),s=(null==i?void 0:i.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${o}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,d=a.querySelectorAll(s),l=Array.from(d).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const o=X(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),s=`${e.id}-${k(6)}`;return e.id=s,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&&U.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({},o),{targetId:s})});return f(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(s)},X=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:r||o},Q=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=p.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=w(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(w(e.targetId)));return n})(e,i),s=Object.keys(r),d=((e,t)=>e.filter(e=>!t.has(w(e.targetId))))(e,new Set([...s,...o]));return Object.assign(Object.assign(Object.assign({},a),r),{[W]:d})},Y="ABSOLUTE_FULLSCREEN",Z="ANY_FULLSCREEN",ee="NINESIXTEEN",te="FULLWIDTH",ne="FULLSQUARE",ie="TAKEOVER",oe="VELVET_TAKEOVER",re="WALLPAPER",ae="COLLAPSE",se={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],NINESIXTEEN:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],FULLSQUARE:[{width:1080,height:1080}],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}]},de={wallpaper:1600,"l-format":1600},le=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&xe(e,Z)},ce=e=>{const{native:t}=e;return!!t},ue=e=>xe(e,te),pe=e=>{const{targetId:t}=e;return t.includes("takeover")||xe(e,ie)},ve=e=>xe(e,ie),ge=e=>xe(e,re),he=e=>xe(e,ae),me=e=>e.targetId.includes("sponsorstripe"),ye=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},fe=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),we=e=>e.targetId.startsWith("midboard"),be=e=>e.targetId.includes("widescreen"),ke=e=>e.width>=1260&&e.width<=1280,Ee=e=>e.width>=1600&&e.width<=1620,xe=(e,t)=>{const n=se[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===o,s=!t.height||t.height===r;return a&&s})};function Ce(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function Ie(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Te=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 s("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(s("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{s("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{s("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);s("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),Se="cmp:loaded";let Ae="undefined"!=typeof window?window._tcf_:void 0,Oe=!1;const Pe=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=N("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(s("TCF bypass param detected, returning consent: true"),!0):(s("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(Oe)return null;if(!Ae)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Ae.getConsentedToAllSync();return s(`TCF consented to all is: ${t}`),Ae.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(s("Getting TCF consent manager..."),window._tcf_)return s("TCF consent manager is already available"),Ae=window._tcf_,void e(Ae);s("TCF consent manager is not available");const n=()=>{s("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Ae=window._tcf_,e(Ae)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(Se,n),Oe=!0,t(new Error("Timeout waiting for CMP to load"))},o);s("Listening for CMP loaded event..."),document.addEventListener(Se,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>Ie(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.SE,i=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.NO;if(t||i)return s("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Te(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Ae)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{s("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);Ae.onTcfReady(()=>{s("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Ae.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},je=(e,t,n,...i)=>Ie(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return s(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=Pe(e,0,n);return(yield o())?(s(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(s(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),$e=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Le=e=>Ie(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e,{getConsentAsync:o}=Pe(t,0,i);if(!(yield o()))return;const r=$e("_pulse2data");return r?r.split(",")[9]:void 0}),_e=()=>{const e=$e("_pulse2data");return e?e.split(",")[2]:void 0},Ne="splash",qe="welcomePage",De="topscroller",Me="velvet",Fe=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},Be="takeover-displayed",Re="takeover-visit-count",Ue=14400,ze=()=>{const e=$e(Re);return e?parseInt(e):0},Ve=()=>{const e=ze(),{takeover:{options:{cookieCapTime:t=Ue}={}}={}}=p.get(),n=document.location.hostname;window.document.cookie=`${Re}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},He=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=p.get();return"0"!==N(q)&&("1"===N(q)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=p.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Be;return"true"===$e(n)})())&&(!t||We()))},We=()=>{const e=ze();return 0===e?(Ve(),!1):1===e},Ke=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ge=()=>{const{takeover:e}=p.get();return Boolean(null==e?void 0:e.topscroller)},Je=e=>{const{width:t,height:n}=e;return Ke(t,n)?Ne:xe(e,oe)?Me:Ge()?De:qe},Xe=()=>Ie(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Be,cookieCapTime:n=Ue}={}}={},pageContext:{isMobileApp:i,countryCode:o},tcf:r}=p.get(),a=yield je(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Qe=e=>{var t,n;const i=!!(null===(n=null===(t=p.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return pe(e)&&i},Ye=(e,t)=>{var n;if(t===De){const{topscroller:t}=e;return null!=t?t:{}}if(t===Ne){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ze=(e,t)=>{t!==Ne?(e=>{var t,n;const i=null===(t=p.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=p.get().takeover)||void 0===n?void 0:n.topscroller;if(!i||o)return;const r=document.querySelector(i),a=document.querySelector(".welcome-page-wrapper"),s=document.querySelector(`#${e.targetId}`),d=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&d&&s))return;const l=null==r?void 0:r.offsetHeight,c=ve(e)?"60svh":`calc(100svh - ${l}px)`,u=ve(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),s.style.setProperty("height",c,"important"),d.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=p.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},et=Fe([],()=>{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})});var tt=Object.freeze({__proto__:null,addTakeoverCookie:Xe,adjustTakeoverHeight:Ze,canDisplayTakeover:He,getProperWelcomePageConfig:Ye,getTakeoverVariant:Je,handleTakeoverCookieOnAdNotShown:e=>Ie(void 0,void 0,void 0,function*(){Qe(e)&&(yield Xe())}),incrementArticleVisitCount:Ve,isSplashVariant:Ke,isTopscroller:Ge,scaleAd:et,shouldAddTakeoverCookieForNotShownAd:Qe});const nt={nativeAd:e=>ce(e)&&!me(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:ue,fullscreenScroll:le,topscroller:e=>pe(e)&&Ge(),splash:e=>pe(e)&&Ke(e.width,e.height),welcomePage:pe,wallpaper:ge,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:ke,hFormat:Ee,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ee(e)&&!ke(e),topboard:e=>e.targetId.startsWith("topboard")&&!pe(e),widescreen:be,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:me,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!fe(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!we(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:fe,midboard:we},it=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const a=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(o,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,i;for(const[o,r]of Object.entries(nt))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},ot=e=>{var t;return(null===(t=Object.entries(nt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},rt={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},at="web_desktop",st="web_phone",dt="wde",lt="wph",ct=()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"},ut=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},pt=(e,t=window.screen.width,n,i)=>{const o=ut(e,t);if(n&&n(e,o),i)return void i(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${o})`,r.style.transformOrigin="left top")},vt=(e,t)=>{if(e&&t)return t/e},gt=new Map;gt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),gt.set("panorama",{scale:.79,transformOrigin:"center center"}),gt.set("outstream",{scale:.79,transformOrigin:"center center"}),gt.set("integration",{scale:.79,transformOrigin:"center center"}),gt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var ht=Object.freeze({__proto__:null,calculateScaleFactor:ut,getAspectRatio:vt,scaleAd:pt,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=ot(e),o=gt.get(i),r=document.querySelector(`#${e.targetId}`);if(!r||!o)return;if(r.style.transformOrigin=o.transformOrigin,r.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),s=null==r?void 0:r.offsetWidth;a&&"number"==typeof s&&!isNaN(s)&&a.style.setProperty("right",String(-1*s*.2)+"px")},scaleAds:e=>{var t,n,i,o,r,a;const{adScaleConfig:s,pageContext:{deviceType:d}}=p.get();if(!(null==s?void 0:s.enabled))return;if(xe(e,Z))return;const l=null!==(t=s.adsToBeScaled[d])&&void 0!==t?t:[],c=K(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=s.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),g=null!==(o=null==v?void 0:v.offsetWidth)&&void 0!==o?o: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;pt(e,(g<h?g:h)-u)}});const mt=864e5,yt=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return s("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=mt)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=mt)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return s("Error with parsing localStorage data"),null}}}})(),ft="glimrTags",wt=["glwe_","glwet_"],bt={geofenceTags:[],geoTags:[],weatherTags:[]},kt=(...e)=>Ie(void 0,[...e],void 0,function*(e=p.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield je(t,n,i,"glimr")}const{getConsentAsync:o}=Pe(t,0,i);return yield o()}),Et=()=>Ie(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield kt())||!(null==e?void 0:e.enabled))return void s("No consent for glimr data fetching.");const t=yield(n=500,Ie(void 0,void 0,void 0,function*(){return yield Promise.race([Ie(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{yt.setWithTimestamp(ft,{tags:e,tagMappings:t}),n(!0)})})}catch(e){s(`Error during getting glimr data: ${e}`)}else s("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),xt={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"},Ct=e=>wt.some(t=>e.startsWith(t)),It=e=>e.startsWith("glgc_"),Tt=e=>!Ct(e)&&!It(e),St=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield kt(e);if(!(null==i?void 0:i.enabled)||!r)return s("No consent for getting glimr tags."),{};const a=h(o),d=At(e,Boolean(n));return{[`${a}-geo`]:d.geoTags,[`${a}-weather`]:d.weatherTags,[`${a}-geofence`]:d.geofenceTags}}),At=(e,t)=>{const n=Ot();if(!n)return bt;const i=((e=[])=>e.filter(Ct))(n),o=((e=[])=>e.filter(It))(n),r=((e=[],t,n)=>{var i;const o=e.filter(Tt);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=xt[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},Ot=()=>{const e=yt.getByTimestamp(ft);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},Pt=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),jt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),$t=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},pageContext:{countryCode:o}}=p.get(),r=[`${h(o)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?r:[]],s=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:s}}},d)}},Lt={get:(e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>Ie(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},_t="advertory:ppids-cache",Nt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},qt={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Dt={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},Mt={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Ft={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Bt={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},Rt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Ut{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const zt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return Ie(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("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:""}},Vt=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return Ie(this,void 0,void 0,function*(){var n,i,o,r,a,s,d,l,c,u,p;const v=yt.get(_t),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(s=g.idfv)||void 0===s?void 0:s.plain,null===(d=g.anId)||void 0===d?void 0:d.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===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});yt.set(_t,o)}hashPPIDs(e,t){return Ie(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Lt.post(t,n,e)}catch(e){return s("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return Ie(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${Rt[t]}:${n}`:null}))(t,n),o=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),r=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Ht=e=>Ie(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:i,isMobileApp:o}}=e;if(!(yield je(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([zt.processPPIDs(t,null==n?void 0:n.timeout),Vt.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){s(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Wt=e=>{const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Vt.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]).add(r,Ft[e]).add(a,Bt[e]).buildEids()}]}},Kt=()=>{const{ppid1:e,ppid2:t}=zt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},Gt=e=>{const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Vt.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]).add(r,Ft[e]).add(a,Bt[e]).buildRyEids()}}]}}},Jt=e=>{const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o}=Vt.getPPIDs();return(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]).buildRyEids()},Xt=e=>Ie(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o}=Vt.getPPIDs(),r=(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),Qt=(e,...t)=>Ie(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),Yt="advertory-fullscreen-scroll",Zt="advertory-fullscreen-scroll-wrapper",en="fullscreen-scroll-in-screen",tn="in-screen",nn=e=>e.includes("snoap.no"),on=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},rn=Fe([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,a=e/o,s=t/r;i.style.transform=`scale(${a},${s})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),an=e=>{const t=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},sn=[],dn={},ln=(e,t)=>{var n;const i=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>cn(e,i),{}),r=pn(e);o.observe(e),i&&(dn[r]=hn(e,null==t?void 0:t.options))},cn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=pn(e);n?(un(i,n),vn(e,i,t)):(un(i,n),gn(e,i,t))})},un=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},pn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},vn=(e,t,n)=>{e.classList.add(tn),document.body.classList.add(en),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),sn.includes(t)||sn.push(t),n&&window.addEventListener("scroll",dn[t],{passive:!0})},gn=(e,t,n)=>{sn.includes(t)&&(n&&window.removeEventListener("scroll",dn[t]),document.body.classList.remove(en),e.classList.remove(tn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},hn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,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)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&mn(e,r,o,0),a.length&&mn(e,a,o,40)}},mn=(e,t,n,i)=>{const o=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let s;s=a>r?(a-r)/t-i:(r+t-(a+o))/t;const d=s<=0;e.style.visibility=d?"hidden":"",e.style.zIndex=d?"":n.toString(),e.style.pointerEvents=d?"none":"all",e.style.opacity=s.toString()})};function yn(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}yn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100vw !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:2;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 fn="left",wn={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 bn=null;const kn=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\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 ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${rn})()`,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(nn(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=an(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>nn(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)),nn(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)),on(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},En=()=>{bn=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},xn=()=>{bn||(bn=window.requestAnimationFrame(En))},Cn=(e,t)=>{var n,i,o,r;const{pageContext:{countryCode:a,deviceType:s}}=p.get(),{targetId:d}=e,l=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==l?void 0:l.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),((e,t)=>{var n;const{articlesContainerWidth:i=1302,backgroundColor:o="#fff",foregroundColor:r="#fff",margin:a,beforeContentValue:s=""}=e,d=null!==(n=null==a?void 0:a[t])&&void 0!==n?n:"16px 0",l=i/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${o} 0px,\n ${o} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${o} calc(50% + ${l}px),\n ${o} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${d};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${s&&"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: '${s}' !important;\n }`,c.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(c)})(null!==(i=null==l?void 0:l.overlayStyles)&&void 0!==i?i:{},s);const c=document.getElementById(d),u=null==c?void 0:c.parentElement;if(!c||!u)return;ln(u,t),c.className=Yt,ln(u,t),c.className="advertory-fullscreen-scroll";const v=xe(e,Y)?"absolute":"fixed";c.style.position=v,u.className=Zt,u.dataset.showTagSubscribeId=d,c.setAttribute("data-ad-label",wn[a].adText),(null==l?void 0:l.cogwheelPosition)===fn&&(c.dataset.moveCogwheelToTheLeft="true"),xn(),window.addEventListener("resize",xn),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",xn),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",xn)},In=e=>{if(!(null==e?void 0:e.classList.contains(Yt)))return;e.classList.remove(Yt),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(Zt))&&(t.classList.remove(Zt),t.classList.remove(tn))};var Tn=Object.freeze({__proto__:null,createFullscreenScrollAd:Cn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=on(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=on(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,kn(t,e))},undoFullscreenScrollContainer:In});const Sn=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},An=(e,t,n)=>{var i,o,r,a;const s=document.createElement("div");s.id=`${e}-button`,t.appendChild(s);(null===(o=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),Sn(e);const d=s.firstElementChild;d&&t.insertBefore(d,s),s.remove()},On="ad-loaded",Pn=()=>Ie(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:i},fullscreenScroll:o}=p.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=p.getHandlers(),{getConsentAsync:a}=Pe(t,0,n),d=yield a(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=Pt(),{prebid:{relevantCallbackTimeout:r}={}}=p.get(),a="relevantCb"===i&&r?r:n[i].timeout,s=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},a);t.push(s)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=Pt(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=Pt();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=jt();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return s("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=jt();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const i=d?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};s("prebid consentManagement",i),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},Gt(n)),$t(g,v))),s("core add prebid config",Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},Gt(n)),$t(g,v))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{jn(e,r)},directRenderFn:e=>{var t;const{settings:n,renderFn:i}=e,{bid:r,adDiv:a}=n||{};if(!a)return;const s=i(n),d=Object.assign(Object.assign({},r),{targetId:a.id,banner:!0}),l=a.id,c=document.getElementById(l);c&&(le(d)?(Cn(d,o),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(s)):(In(c),null===(t=null==c?void 0:c.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),c.classList.add(On),(null==r?void 0:r.creativeId)&&An(l,c,Number(null==r?void 0:r.creativeId)))}}),s("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{jn(e,r)},directRenderFn:()=>{}})})}),jn=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],s=`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,s);const d=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:o,targetId:s},p.get()),null==d||d.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},$n=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,a]=t;if(!i.dataset.lockedsize&&a&&r)i.style.width=`${r}px`,i.style.height=`${a}px`,n&&(o.resizeAd(i.id,[r,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},Ln=["netboard","board"];class _n{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return Ie(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",a=(null==o?void 0:o.userId)?String(o.userId):"",d=this.buildUrl(e,{envId:r,spid:a});try{s("Starting fetching DrEdition ad from URL:",d);const e={method:"GET"},t=yield Lt.get(d,e);return s("Fetch operation completed successfully."),t}catch(e){s("Error during fetch operation:",e)}return null})}}let Nn=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return Ie(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,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:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const qn=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):s("Dr. Edition container does not have a parent element, cannot remove height lock.")};class Dn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return Ie(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,a=e.querySelector(o);if(!a)return void s(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(s("No Dr. Edition ads available to render. Collapsing whole placement."),F(e.id),void qn(a)):((null==d?void 0:d.itemId)&&r&&(s("Dr. Edition ad available to render as a Xandr backfill."),B(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,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),qn(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,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):qn(a))):(s("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void qn(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 i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}class Mn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return Ie(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Pe(n.tcf,n.isMobileApp,n.country),o=yield i(),r=n.device===rt.MOBILE?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Fn{constructor(e){this.strategy=e}handle(e,t){return Ie(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return Ie(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield Qt(t)}catch(e){s("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return Ie(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.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,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}let Bn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,p):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}};class Rn extends Bn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,p,v].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:p,urlPath:v},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let Un=class extends Bn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:v)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const zn={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"},Vn={FRONT:"front"},Hn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},Wn=e=>Ie(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),Kn={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 Ie(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return la})})}})}},Gn=(e,t)=>{null==e||e.forEach(e=>{Kn[e](t)})};class Jn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield Ie(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 a=["ContentMutePlugin"],s=this.createPlayerOverlay(e);Gn(a,s);const d={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},l=yield Wn(d);l.once("assetReady",()=>{Hn(l,a)}),l.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?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"]})}),l.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield l.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Vn.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const Xn="https://www.aftonbladet.se/video-player-extras/latest/";class Qn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${Xn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${Xn}external-link.js`]:{name:"ExternalLink"}}};yield Wn(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")}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}const Yn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class Zn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},Yn(e)?e:{}),{provider:Object.assign(Object.assign({},Yn(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},s=yield Wn(a);s.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield s.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Vn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let ei=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const ti=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,s={[zn.VG]:new Nn,[zn.E24]:new Jn,[zn.AFTONBLADET]:new Qn,[zn.SVD]:new Zn}[o]||new ei,d=new(a===g.SE?Rn:Un)(n,s,r),l=new _n(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new Mn(s,d),u=new Fn(s);return new Dn(l,c,u,d)},ni=()=>Ie(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 ii{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 Ie(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 s("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return Ie(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 oi=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=ti(n,i,o);e.forEach(e=>{var i,o,a;if(!e.isIntersecting)return;const s=e.target,d=null!==(i=s.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=s.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=s.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(s,Object.assign(Object.assign({},n),{editionName:d,columnName:l,primaryPosition:c})),t.unobserve(s)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},ri=()=>Ie(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)}}),ai=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},si=[],di=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:a,publisher:d,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield je(o,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,s=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,d=r[o]||r.desktop,l=w(t.targetId),c=d.find(e=>e.targetId===l),u=Ln.some(e=>l.startsWith(e)),p=si.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||s;return c&&u&&!p&&v?(si.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void s("Pulse has not been passed as a prop, aborting");const v=yield ni(),g=new ii(v),h=ti({publisher:d,pageType:l,country:c},g,null==i?void 0:i.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const y=document.createElement("div");y.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:o,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),li=(e,t)=>{var n,i,o;if(!ai())return void s("Ad block not enabled, Dr. Edition backfills will not be rendered");s("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:r},finnBlink:a}=e,d=null===(i=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===i?void 0:i[r],l=null!==(o=null==d?void 0:d.map(([e])=>e))&&void 0!==o?o:[],c=new IntersectionObserver((t,n)=>Ie(void 0,void 0,void 0,function*(){for(const i of t){if(!i.isIntersecting)continue;const t=i.target;n.unobserve(t),yield di(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!l.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&c.observe(t)})};var ci=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:i,pulseData:o,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},s=a(o,"data-pulse"),d=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},s,d,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:i})]}))},getDrEditionManager:ti,handleDrEdition:e=>Ie(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield je(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield ni(),i=new ii(n);oi({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:di,handleDrEditionBackfillOnAdblock:li});const ui="collapseAd",pi="hideAd",vi="resizeAd",gi="renderDrEditionFallback",hi="wallpaperImageUrl",mi="wallpaperColor",yi="velvet",fi=[vi,hi,mi,ui,pi,gi,yi];let wi;const bi=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=(e=>{if("object"==typeof e)return e;if(P(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:hi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:mi,wallpaperColor:t}}if(e.startsWith(gi)){const t=e.split(":")[1];return{name:gi,targetId:t}}if(e.startsWith(ui)||e.startsWith(pi)){const t=e.split(":")[1];return{name:ui,targetId:t}}if(e.includes("name")&&fi.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!fi.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:s,size:d}=n;i===yi&&s&&(s.includes("noScroll")&&(wi=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(s.includes("close")||s.includes("ended"))&&(null==wi||wi(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==ui&&i!==pi||!o||F(o),i===vi&&o&&s&&$n(o,s),i===gi&&o&&(F(o),di(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&d&&$n(o,d,!0),i===hi&&r&&$(r),i===mi&&a&&L(a)},ki=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Ei=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),E(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return Aa});yield t(e,o,null)}),withFullAdsChain:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return Aa});yield t(e,o,r,()=>Ie(void 0,void 0,void 0,function*(){if(!U.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return _});t(e)}))})}},xi=(e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return ye(t)&&i?(s(`loading finn blink ad for blink only placement for ${t}`),void Ei().withFinnBlinkAd(t)):ye(t)?(s(`loading finn blink ad with full ads chain for ${t}`),void Ei().withFullAdsChain(t)):void E(()=>(s("core showTag",{id:t}),e.showTag(t)))},Ci=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield x,yield C;const n=new IntersectionObserver((t,n)=>((e,t,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(r);s("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,i),a&&(t.unobserve(a),t.disconnect())})})(t,n,xi,e),ki(t));n.observe(e)}),Ii=new Map,Ti=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Si=".brandstudio-premium-content-widget",Ai=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Oi=({adWrapper:e,placementContainer:t})=>{const n=Ai({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),V(i=t),i.innerHTML=""},Pi=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},ji=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=Ti.includes(n)&&Boolean(t.closest(Si));const o=i?t.closest(Si):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||!i&&!a||i&&!o)return;if(a)return Pi(e),void r.disconnect();const s=t.closest('[style*="height"]'),d=o;s&&d.contains(s)?Pi(s):d.hasAttribute("style")&&Pi(d),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},$i=(e,t,n,i,o,r)=>{var a;const s=performance.now(),d=null!==(a=Ii.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;s-d>=o&&l&&(Ii.set(t,s),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&Oi({adWrapper:o,placementContainer:n}),E(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},Li=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,$i,t,n),ki(300));i.observe(e)},_i=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},Ni=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),qi=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Di=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Ui(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Mi=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t,n;return e.targetId===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==i?void 0:i.requestThreshold;qi(o,r)&&i&&(z(i.targetId),n.length&&o.classList.remove(...n),Ui([i],t))}},Fi=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Bi(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Mi(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Mi(e,!1,t))};n.persisted&&(Ni()?window.addEventListener("scroll",i,{passive:!0}):Mi(e,!1,t))})})(e,n))},Bi=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Ri=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Bi(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},Ui=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=_i(i,n);if(t)for(const t of e){const e=Ri(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)E(()=>window.apntag.refresh(e))},zi=(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,Vi=e=>`externalImpId:'${e}'`,Hi=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:i}=p.get(),{targetId:o,sizes:r,keywords:a,allowedFormats:d,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:v,dynamicSizeWidthCheck:g=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||He())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=Array.isArray(n)?n.filter(e=>e!==De):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(e),h=Object.assign({invCode:l,sizes:r,targetId:o,keywords:zi(a,c),allowedFormats:d,dynamicSizeWidthCheck:g},v&&{safeframeConfig:v}),m=(e=>{var t,n,i,o,r,a,d;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(s("Tracker state pageViewId is:",null===(r=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.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):(s("Tracker state does not contain field pageViewId or it is empty"),""):(s("Tracker state is empty"),""):(s("Tracker is not configured in initAdvertory function"),"")})(i);n&&m&&(s("External Impression ID assigned to defineTag:",Vi(m)),h.externalImpId=Vi(m));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},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(h.native=y),h},Wi=e=>!e.includes("takeover")||He(),Ki=e=>{const{source:t}=e;return"csm"===t},Gi=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=p.get(),n=h(t),i=e[`${n}-targetid`],o=i?w(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[o]})},Ji=e=>{const{pageContext:{countryCode:t}}=p.get(),n=h(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},Xi=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);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"})})()},Qi=(e,t)=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});yn(".advertory-brandmetrics-survey{width:100%}");const Yi="advertory-brandmetrics-survey",Zi="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",eo=()=>Ie(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var o;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),to={pageContext:{publisher:"aftonbladet",countryCode:g.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},no={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},io=e=>(null==e?void 0:e.parent)?[...io(e.parent),e.shortPath||"unknown"]:[],oo=(e,t)=>t?"se-aftonbladet-{deviceType}-studio_{position}":`se-aftonbladet-tv-{deviceType}-${(e=>{var t;if(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.afp)return"afp";const[,n]=io(e);return no[n]||"ovrigaavdelningar"})(e)}_{position}`,ro={aftonbladet:to},ao={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:oo(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:io(e).join(":")}}},so=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},lo=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),co="se-generic",uo="aa-sch",po="kv_",vo="pause",go="{deviceType}",ho="{position}",mo="afp_",yo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),fo="1-1",wo="16-9",bo="3-4",ko="9-16",Eo="responsive",xo={[fo]:1,[wo]:1.78,[ko]:.56,[Eo]:1},Co={[fo]:1,[wo]:1.78,[bo]:1.33,[ko]:.56},Io=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=rt.DESKTOP===n?dt:lt,s=o.replace(go,a);return(e,n)=>{if(e===vo)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(ho,vo).replace(/-([a-z]+)_/,"-article-"))(s);if(n&&yo.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(go,a).replace(ho,e)}return s.replace(ho,e)}},To=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[i,o])=>{const r=Math.abs(e[n]-t);return Math.abs(o-t)<r?i:n},n[0][0])},So=()=>{var e,t;const n=jwplayer().getContainer(),i=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return i&&"number"==typeof i.offsetWidth&&"number"==typeof i.offsetHeight&&0!==i.offsetHeight?i.offsetWidth/i.offsetHeight:1},Ao=()=>{return(e=>{try{return decodeURIComponent(e)}catch(e){return""}})("undefined"!=typeof document&&null!==(t=null===(e=document.cookie.match("(^|;)\\s*_pulse2data\\s*=\\s*([^;]+)"))||void 0===e?void 0:e.pop())&&void 0!==t?t:"").split(",");var e,t},Oo=()=>{const e=null!==(t=Ao()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Ao()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Po=()=>Object.fromEntries(new URLSearchParams(window.location.search)),jo=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:i,countryCode:o}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},s={isMobileApp:e.isApp,countryCode:o,publisher:i,pageType:"front",deviceType:e.deviceType},d=(yield je(n,e.isApp,o,"video"))?"1":"0",l=yield eo(),c=yield Xt(o),u=yield Le({tcf:n,pageContext:s}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>To(Co,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?To(xo,Number(m.toFixed(2))):Eo;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${uo}-country_code`]:o,[`${uo}-publisher`]:i,[`${uo}-supply_type`]:(y=e.deviceType,y===rt.DESKTOP?at:st),[`kw_${uo}-page_type`]:"collection",[`${uo}-page_type`]:"collection",[`${co}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${co}-page`]:"index",[`${co}-page`]:"index",[`${co}-screenheight`]:String(window.screen.height),[`${co}-screenwidth`]:String(window.screen.width),[`${co}-viewportheight`]:String(a),[`${co}-viewportwidth`]:String(r),[`${co}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${co}-mobile-os`]:ct(),[`${co}-audience`]:void 0,[`${co}-externalid_src`]:Oo(),[`${co}-tags`]:e.tags,[`${co}-articleid`]:p,"article-id":p},yield St(Object.assign(Object.assign({},t),{pageContext:s}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${co}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Po()).some(e=>e.includes(po))&&(()=>{const e=Po(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(po)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":d,"kw_aa-sch-cmp_advertising":d,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),$o=["se-generic-audience","se-generic-appversion","se-generic-sitemode","se-generic-pagegen","se-generic-viewportheight","se-generic-viewportwidth","se-generic-screenheight","se-generic-screenwidth","aa-sch-inventory_type"],Lo=["aa-sch-publisher","se-generic-page","aa-sch-supply_type","se-generic-story","se-generic-section","se-generic-adformat","aa-sch-context_keyword","se-generic-tvtags","se-generic-test","aa-sch-cmp_advertising","aa-sch-instream_player_aspectratio","aa-sch-player_aspectratio"],_o=["external_uid","gdpr","gdpr_consent","eids","article-id"],No=(e,t)=>{const n=[...$o,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||_o.includes(e)?e:`kw_${e}`,t]))},qo=e=>Object.fromEntries(Object.entries(e).filter(([e])=>Lo.includes(e))),Do=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;ro[e]||d(`[video] No config found for publisher "${e}"`);return null!==(t=ro[e])&&void 0!==t?t:to})(e.publisher),s=(e=>{var t;return null!==(t=ao[e])&&void 0!==t?t:ao.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),l="/"===window.location.pathname,c=null===(i=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===i?void 0:i.toString(),u=e.assetId===c,p=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:s,isUserPresentOnFrontPage:l,adsKeywords:yield jo({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==s?void 0:s.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:l,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:So(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:so(e.startMode)}}),Mo=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:s}=e,{invCode:d}=i||{},l=Io(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(mo)?`${mo}${t}`:t)(d),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,o),"se-generic-playback-method":lo.get(s),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},No(r,n)),qo(r)),{vskippable:"0",referrer:u,vplaybackmethod:s})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},Fo=e=>t=>Ie(void 0,void 0,void 0,function*(){const n=yield Do(e,t);return Mo(n,e)}),Bo={plcmtcnt:1,context:1,contextsubtype:10,plcmttype:1,assets:[{id:1,title:{len:100},required:0},{id:2,img:{type:1,hmin:10,wmin:10},required:0},{id:3,img:{type:3,hmin:10,wmin:10},required:0},{id:4,data:{type:2},required:0},{id:5,data:{type:12},required:0}],ver:"1.2",eventtrackers:[{event:1,methods:[1,2]}]},Ro={no:"NOK",se:"SEK"},Uo={no:"no",se:"sv"};class zo{buildFetchObject(e,t,n,i){return Ie(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:r}=i,{invCode:a,xandrPlacementId:s}=e,d=yield eo(),l=(c=Object.assign(Object.assign({},t),n),Object.entries(c).flatMap(([e,t])=>void 0===t?[]:Array.isArray(t)?t.map(t=>`${e}=${t}`):[`${e}=${t}`]).join(","));var c;const u=new URL(window.location.href),p=(e=>{const{allowedFormats:t}=e;if(!t||t.includes("native"))return{request:JSON.stringify(Bo),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:k(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},s&&{placement_id:s}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||Uo[o]||"no").split("-")[0]},regs:{ext:{gdpr:d.gdpr||0}},user:{id:yield Le(i),ext:{consent:d.gdpr_consent||"",eids:Jt(o)}},at:1,cur:[Ro[o]],source:{tid:k(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,i){return Ie(this,void 0,void 0,function*(){try{s("Starting fetching Studio ad from Xandr:",Zi);const o=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),d=a.size>0?`${Zi}?${a.toString()}`:Zi,l=yield this.buildFetchObject(e,t,n,i),c=yield Lt.post(d,o,l);return s("Fetch operation completed successfully.",c),c}catch(e){s("Error during fetch operation:",e)}return null})}}const Vo=0,Ho=3,Wo=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",a=i?`__${i}`:"",s=`advertory${r}-${n}${a}`,d=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(s),o.classList.add(d),t.dataset.adType=n},Ko="finn-blink",Go="native-ad",Jo=(e,t)=>{Xo(e,t),Yo(e,t)},Xo=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])er(i)}),t.dataset.tracked="true")})},Qo=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(Zo):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},Yo=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:s=!1}={}}=t,d=s?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:rt.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,Qo(e),c.disconnect();break}},d);c.observe(o)},Zo=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?er(e):window.navigator.sendBeacon(e)},er=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},tr=e=>e.reduce((e,t)=>{if(!t.serverSidePlacement)return e.clientSidePlacements.push(t),e;const n=Math.random()<.5;return t.keywords=Object.assign(Object.assign({},t.keywords),{"aa-sch-prerenderer":n?"true":"false"}),n?e.serverSidePlacements.push(t):e.clientSidePlacements.push(t),e},{clientSidePlacements:[],serverSidePlacements:[]}),nr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{pageContext:{deviceType:o},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[o],d=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void s(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},ki(d)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=U.getData("alertoryConfigKeywords"),v=null!==(i=c(Hi(e)).keywords)&&void 0!==i?i:{},g=new zo,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===rt.MOBILE?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===Vo){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,h,o),h.adType===Ho&&(Wo(t.pageContext.publisher,l,Go,t.pageContext.pageType),Jo({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:o,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var o,r,a;let s;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(s=document.createElement("iframe"),n.appendChild(s)),An(e,n,Number(null==i?void 0:i.adid)),null==s||s.remove()})(e.targetId,e.invCode,l,h.bid))}),ir=(e,t)=>{e.forEach(e=>nr(e,t).catch(e=>{s("Failed to handle server-side ad:",e)}))},or={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},rr=e=>Ie(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield Lt.get(t,{method:"GET",signal:n.signal})}catch(e){throw s("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?((e,t)=>o(t,e,or))(e,t):e}catch(t){return s("Error fetching S3 config, using site config",{error:t}),e}}),ar=(e,t)=>{const{pageContext:{isMobileApp:n}}=p.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let sr,dr=[];const lr=["takeover","wallpaper"],cr=e=>{const t=(e=>{var t;const n=U.getData("alertoryConfigKeywords"),{queryConfig:i,placements:o,tcf:r,glimr:a,appearanceConfig:s,pageContext:{publisher:d,countryCode:l,pageType:u,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y,fullWidth:f}=e,w=null!==(t=null==i?void 0:i.batchSize)&&void 0!==t?t:c;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:d,countryCode:l,pageType:u,deviceType:p,isMobileApp:v},pageSetup:h,placements:o,tcf:r,queryConfig:Object.assign(Object.assign({},i),{batchSize:w})},a&&{glimr:a}),s&&{appearanceConfig:s}),m&&{takeover:m}),y&&{fullscreenScroll:y}),f&&{fullWidth:f})}})(e);window.advertory={initialized:!0,version:"3.1.1",siteConfig:e,alertoryConfig:t}},ur=()=>Ie(void 0,void 0,void 0,function*(){const{pageOptions:e}=p.get(),{preparePageOptions:t}=p.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=p.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return(yield je(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=U.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Ji(e);U.setData("alertoryConfigKeywords",n)})(o.keywords),E(()=>sr.setPageOpts(o))}),pr=e=>Ie(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),r=yield je(n,i,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>F(e.targetId)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(e,r);vr(a);(null==t?void 0:t.enabled)&&r&&!M()?(s("core loadPlacements prebid enabled"),yield Pn()):(s("core load tags invoked without prebid enabled"),gr(a))}),vr=e=>{const{prepareTag:t}=p.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{s("core defineTags",{placement:e});const i=Hi(e);if(Wi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Gi(i),sizes:o}})(o);n.push(r),E(()=>(s("core defineTag - add to the queue",{placement:e,preparedTag:o}),sr.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},gr=e=>{const t=e.filter(({targetId:e})=>Wi(e)).map(({targetId:e})=>e);t.length&&E(()=>(s("core loadTags",{placementsIdsToLoad:t}),sr.loadTags([...t])))},hr=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:i}}=p.get(),{requestThreshold:o,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),d=null==n?void 0:n.defaultThreshold[i];a&&(s("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:d}),yield Ci(a,null!=o?o:d)),a&&(null==r?void 0:r.scroll)&&(s("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),mr=e=>e.some(({targetId:e})=>lr.some(t=>e.includes(t))),yr=e=>Ie(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[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=c}={},pageContext:{deviceType:i}}=p.get(),o=Q(e),r=Object.keys((null==t?void 0:t[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),s=e.filter(({targetId:e})=>!a.has(e));return[...r,..._i(s,n)]})(i);for(const e of o)mr(e)?(s("core loadAds without lazy loading",{placementsToLoad:e}),yield pr(e)):e.length&&(s("core loadAds with lazy loading",{placementsToLoad:e}),yield fr(e));const{finnBlink:r}=p.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return Aa});yield e(n)}}),fr=e=>Ie(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=p.get(),i=[];if(!t)return s("lazy load is not enabled",{placements:e}),void(yield pr(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{s("lazy load is enabled - handler start",{loadedTargetIds:i,placements:e});const o=e.every(e=>i.includes(e.targetId)),r=e.map(e=>e.targetId);!o&&i.push(...r),!o&&pr(e),s("lazy load is enabled - handler stop",{loadedTargetIds:i,placements:e,arePlacementsLoaded:o,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(s("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),wr=()=>Ie(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];E(()=>{sr.onEvent("adRequested",()=>{e.adRequested()}),sr.onEvent("adAvailable",o=>Ie(void 0,void 0,void 0,function*(){var r,a,d,l,c,u;s("core adAvailable start",{placementsAvailable:dr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Ki(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)});const v=null===(d=null===(a=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===d?void 0:d.adResponse.ads;if(Ki(o)&&v&&(null===(l=v[1])||void 0===l?void 0:l.rtb)&&(o.banner=null===(u=null===(c=v[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),le(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Tn});e(o)}const{widescreenSwitching:g}=p.get();if(be(o)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return $a});e()}if(le(o)&&!ye(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Tn});e(o,i)}if(!ce(o)||Ki(o)||ye(o.targetId)||null==t||t(o,p.get()),pe(o)&&!he(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Xa});e(o.targetId),yield t(o)}if(ge(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return _});e(()=>E(()=>window.apntag.showTag(o.targetId)),n),U.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&U.setData("horseshoe",{isAvailable:!0}),it({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),e.adAvailable(o);const h=dr.find(({targetId:e})=>e===o.targetId);h&&(yield hr(h,o),dr=dr.filter(e=>e.targetId!==h.targetId)),s("core adAvailable stop",{placementsAvailable:dr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Ki(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)})})),sr.onEvent("adLoaded",n=>Ie(void 0,void 0,void 0,function*(){const{refreshConfig:i,appearanceConfig:r,wallpaper:a,adScaleConfig:s}=p.get(),d=document.getElementById(n.targetId);if(ye(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return ya});e(n)}if(o.includes(n.targetId)&&ce(n)&&(null==t||t(n,p.get()),it({adObj:n})),!o.includes(n.targetId)&&Ki(n)&&o.push(n.targetId),he(n)&&F(n.targetId),pe(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Xa});e(sr,n.targetId)}if(ue(n)){const{prepareContainerForFullWidthFormat:e}=yield Promise.resolve().then(function(){return Za});e(n)}if((e=>xe(e,ee))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return Za});e(n)}if((e=>xe(e,ne))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return Za});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;ji({adWrapper:o,placementContainer:i});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Li(i,a,r))})(n,i),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(U.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return _});e(n.targetId)}if(null==s?void 0:s.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return ht});e(n),t(n)}e.adLoaded(n),Sn(n.targetId),d&&(d.classList.add(On),(e=>{var t,n;const{pageSectionsSelectors:i}=p.get(),o=null==i?void 0:i.mainFirstColumn,r=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(d)),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:ot(n)}}))})),sr.onEvent("adNoBid",t=>Ie(void 0,void 0,void 0,function*(){var n;if(F(t.targetId),null===(n=p.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return ci});yield e(p.get(),t)}if(pe(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(t)}e.adNoBid(t)})),sr.onEvent("adError",(t,n)=>Ie(void 0,void 0,void 0,function*(){if(pe(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(n)}e.adError(t,n)})),sr.onEvent("adCollapse",()=>{e.adCollapse()}),sr.onEvent("adRequestFailure",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield di(p.get(),t),e.adRequestFailure(t)})),sr.onEvent("adBadRequest",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield di(p.get(),t),e.adBadRequest(t)})),sr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),sr.onEvent("adNoBidMediated",t=>Ie(void 0,void 0,void 0,function*(){yield di(p.get(),t),e.adNoBidMediated(t)}))})}),br=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(i)return H(),[];o&&(H(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{B(e.id)})),v(null!=e?e:{}),yield ur();const{clientSidePlacements:s,serverSidePlacements:d}=tr(J(a));let l=s;return r&&(l=l.filter(e=>ye(e.targetId))),ir(d,p.get()),l.length>0&&(dr=[...dr,...l.map(e=>Object.assign({},e))],Di(l),Fi(l),yield yr(l)),dr}),kr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;p.set(e),p.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:i,kilkaya:o,rightColumnSplit:r,drEdition:a,finnBlink:d}=e;if(U.initialize(),window.addEventListener("message",bi,!1),sr=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=sr,s("Apn tag is set up on window"),yield Promise.allSettled([Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();(yield je(e,t,n,"xandr-endpoint"))||sr.setEndpoint("ib.adnxs-simple.com",!0)}),Ie(void 0,void 0,void 0,function*(){if(M())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get(),o=yield je(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield Qt(null==e?void 0:e.prebidUrl))}),Ht(e),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield Qt(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get();(yield je(t,n,i,"gpt-endpoint"))&&(yield Qt(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),Ie(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),{getConsentAsync:r}=Pe(n,0,o),a=yield r();if(e&&t&&a){if(yield Qt(t),document.querySelector(`.${Yi}`))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(Yi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Et(),Ie(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=p.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield Qt(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==i?void 0:i.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return ts});yield e()}s("Libraries have been loaded and trackers have been set"),yield wr(),yield ur(),s("Page options have been set"),cr(e),s("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=tr(J());if(dr=l,ir(c,e),Di(dr),Fi(dr),yield yr(dr),s("Ads has been loaded",dr),li(e,dr),Xi(dr),null==d?void 0:d.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return Aa});yield t(null===(n=null==e?void 0:e.pageContext)||void 0===n?void 0:n.deviceType,e.finnBlink)}if(null==a?void 0:a.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return ci});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return cs});t(e.rightColumnSplit)}if(null==o?void 0:o.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return fs});yield t(e)}}),Er=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield((e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{initConsentManager:o,getConsentAsync:r}=Pe(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(i=e.pageContext)||void 0===i?void 0:i.countryCode),a=yield rr(e);yield ri(),yield Qi(o),yield Qi(r),s("TCF resolved successfully"),yield kr(a,t),s("Run function resolved successfully")}))(e,t)}),xr={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&"native"!==e.adType&&((e,t)=>{pt(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{(e=>{const{targetId:t}=e,n=`${w(t)}_backfill`,{placements:i,pageContext:{deviceType:o}}=p.get();if(!i[o].some(e=>e.targetId===n))return;const r=document.querySelector(`#${t}`),a=null==r?void 0:r.parentElement;if(!r||!a)return;B(t);const s=`backfill_wrapper_for_${t}`;a.setAttribute("id",s),r.setAttribute("id",n),br({},{contextSelector:`#${s}`})})(e)},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},Cr={publisherClassName:zn.TEK,fullWidthFormatClassName:"netboard"},Ir=(e,t,n,i)=>{var o;const{image:r,icon:a,sponsoredBy:s,title:d,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:k}=e,E=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:E(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=d?d:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return E(t?w:a)})(),sponsoredBy:null!=s?s:"",title:null!=d?d:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:E(b),previewVideoSrc:null!=k?k:""},t)},Tr=(e,t)=>{const n=(i=D,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(D),r=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Sr=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(zn).includes(i);n&&r&&Wo(i,e,Go,o)})(o,n),i())},Ar=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:s,targetId:d}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(i=Tr(e.targetId,l))&&void 0!==i?i:c,p=wn[t.language||g.NO],v=Ir(s,p,d,t);return(s.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);Sr(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&Jo(e,t)})},Or=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Ar(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Pr=e=>{const{pageContext:{countryCode:t}}=p.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,o=`${h(t)}-adformat`,r=n?n[o]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in de)||window.innerWidth>=de[e]);return{[o]:i?a:r}},jr=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},$r=()=>{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},Lr=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},_r=(e,t)=>Lr(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},Nr=e=>Lr(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class qr{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return Ie(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return Ie(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Dr=9826;class Mr{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===rt.MOBILE?"phone":rt.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return Ie(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 Ie(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 _e()}getExternalUid(){return Ie(this,void 0,void 0,function*(){return yield Le(p.get())})}isTrackingForbidden(){return Ie(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},developerOptions:{testMember:t=Dr}={}}=p.get();return"true"===N("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=p.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return Ie(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get(),{getConsentAsync:i}=Pe(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=p.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}}const Fr=new Mr,Br=Fr.prepare.bind(Fr);function Rr(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=ct();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Ur=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function zr(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Ur.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Vr extends Mr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=Rr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return zr(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Hr=new class extends Vr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,s;const d=p.get(),l=null!==(i=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},c=null!==(a=null===(r=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(s=d.siteSpecificConfig)||void 0===s?void 0:s.publisherClassName,v=new qr;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(St(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Kt()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{}).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords);const h=v.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:h,user:Object.assign(Object.assign({},Wt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Wr=Hr.prepare.bind(Hr);class Kr extends Mr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP}}=p.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(r=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==r?r:0};var n,i,o,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=p.get(),{appMode:t,mobileOS:n}=Rr(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const Gr=new class extends Kr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;const s=p.get(),d=null!==(i=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},l=null!==(a=null===(r=null===(o=s.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new qr;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(St(p.get(),d.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>Ie(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(Kt()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===$e("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),v=!1!==d.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},Wt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Jr=Gr.prepare.bind(Gr),Xr="viewable",Qr="adClick";var Yr=e=>(t,n,i)=>{const{video:o,img:r,url:a}=t,{publisher:s,productTag:d}=n,{pluginsNames:l,videoLoop:c}=i||{};if(!(null==o?void 0:o.content))return null;const u=Math.ceil(1e5*Math.random()),p=r||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${u}`,g=Zr(o.content,a),h=ea({id:u,nodeId:v,poster:p,tagURL:g,publisher:s,productTag:d,videoLoop:c});return ta({playerConfig:h,clickUrl:a,pluginsNames:l}),`${e(t,n,v)}`};const Zr=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.querySelector("ClickThrough"),o=n.querySelector("VideoClicks");if(i){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n.createCDATASection(t))}else if(o){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),o.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},ea=({id:e,nodeId:t,poster:n,tagURL:i,publisher:o="",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:i}}},pulse:{provider:o.toLowerCase(),decorator:e=>Object.assign(Object.assign({},Yn(e)?e:{}),{provider:Object.assign(Object.assign({},Yn(null==e?void 0:e.provider)?e.provider:{}),{productTag:r})})}}),ta=e=>Ie(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:i}=e,{repeat:o}=t,r=yield Wn(t);Gn(n),r.once("assetReady",()=>{Hn(r,n)}),r.on(Xr,e=>{const{viewable:t}=e;t?r.play():r.pause()}),r.on(Qr,()=>{window.open(i,"_blank")}),o&&r.on("pause",()=>{r.play()})}),na=({containerId:e,url:t,body:n,title:i,logo:o,description:r,isContentVideoAd:a=!1})=>{const s=`\n <div class="ad-header">\n <span>${wn.no.adContent}</span>\n ${o?`<img alt="" aria-hidden="true" class="ad-logo" src="${o}" />`:""}\n </div>\n `,d=`\n <div class="ad-text">\n <h3>${i}</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 ${s}\n ${n}\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${d}\n </a>\n `:`\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${s}\n ${n}\n ${d}\n </a>\n `}\n </div>\n `};yn('@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}}'),yn('.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}}');const ia={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return ws}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\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">${i}</div>\n </div>\n </div>\n </a>\n </article>`)},oa={default:ia.NATIVE_TEMPLATE,content:({containerId:e,url:t,title:n,img:i,imgWidth:o,imgHeight:r,description:a,logo:s,imgAltText:d},l)=>{const c=vt(o,r);return na({containerId:e,url:t,title:n,logo:s,description:a,body:`\n<div class="ad-image-wrapper" ${c?`style="padding-bottom: ${100*c}%"`:""}>\n <img alt="${d}" class="ad-image" src="${i}" />\n</div>`})},contentVideo:(e,t)=>Yr(({containerId:e,url:t,title:n,logo:i,description:o},r,a)=>na({containerId:e,url:t,title:n,description:o,logo:i,isContentVideoAd:!0,body:`\n<div class="ad-video-wrapper">\n <div id="${a}"></div>\n</div>`}))(e,t),nativeVideo:(e,t)=>Yr(({containerId:e,url:t,sponsoredBy:n,title:i,description:o},r,a)=>(({containerId:e,url:t,sponsoredBy:n,body:i,title:o,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">${wn.no.adFrom} ${n}</div>\n ${i}\n <div class="ad-text">\n <h3>${o}</h3>\n ${r?`<div>${r}</div>`:""}\n </div>\n </a>\n</div>`)({containerId:e,url:t,description:o,sponsoredBy:n,title:i,body:`\n<div class="ad-video-wrapper">\n <div id="${a}"></div>\n</div>`}))(e,t),sponsorstripe:e=>{var{title:t,logo:n}=e;return Ce(e,["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">${t}</span>\n <img alt="" aria-hidden="true" class="ad-logo" src="${n}" />\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>`}},ra={displayTemplates:{default:oa.default,content:oa.content,sponsorstripe:oa.sponsorstripe},videoTemplates:{default:oa.nativeVideo,content:oa.contentVideo}},aa={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r}=e,{pageSetup:a,pageContext:{countryCode:s}}=p.get();if(!a)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=ar(i,o),a=Pr(e),s=jr(n),d=$r(),l=Nr(i),c=_r(i);return Object.assign(Object.assign({},e),{invCode:r,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),s),l),d),rendererOptions:c})})(e);const{tag:{useAppTabletInvCode:d=!0}={}}=a,l=ar(o,d),c=Pr(e),u=jr(i),v=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(l),g=$r(),m=Nr(o),y=_r(o,{safeFrameAutoInitialSize:!0}),f=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,w=(new qr).add(null!=n?n:{}).add(c).add(u).add(null!=v?v:{}).add(m).add(g).addIf(null===(t=null==a?void 0:a.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(s)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:f,invCode:l,keywords:w,rendererOptions:y})},preparePageOptions:e=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Jr(e):Wr(e):yield Br(e)}),siteEvents:xr,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Vn.FRONT,deviceType:r}=null!==(n=null==t?void 0:t.pageContext)&&void 0!==n?n:{},{nativeTrackingConfig:a,appearanceConfig:s}=null!=t?t:{},d={language:g.NO,publisher:zn.TEK,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:s};Ar(e,d,ra)}},sa=((e,t)=>({init:n=>Er(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:br,getVideoPPIDs:Xt,createInitNativeAd:Or,getVideoAdsConfig:Fo}))(aa,Cr),da=yn("[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 la=Object.freeze({__proto__:null,default:da});yn('.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 ca={Blink:"Blink"},ua=new Map,pa=e=>{var t;if(!ua.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(ca)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw ua.delete(e),t});ua.set(e,t)}return null!==(t=ua.get(e))&&void 0!==t?t:Promise.resolve()},va="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",ga="https://www.finn.no/distribution-front/external/carousel",ha=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:i}}=p.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Wo(n,o,Ko,null!=t?t:i);it({preferredTestIdData:{targetId:e,testId:"finn"}})},ma=e=>{const{pageContext:{publisher:t=""}}=p.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)};var ya=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();le(e)&&Cn(e,t),ce(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:ha,xandrAdLoaded:ma});const fa={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return s(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){s(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){s(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},wa="finn_blink_id",ba=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:i,theme:o}=e,r=Ce(e,["userId","id","hashed_email","theme"]),a=window[ca.Blink];if(!a)return;const s=new a({remote:ga,id:n,hashed_email:i,theme:o});yield s.inject(Object.assign({},r))}),ka=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=Ce(e,["userId","theme"]),o=window[ca.Blink];if(!o)return;const r=new o({remote:ga,userId:t,theme:n});yield r.inject(Object.assign({},i))}),Ea=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},xa=(e,t)=>{const{finnBlink:{enabled:n}={}}=p.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:o,height:r,requireImage:a,theme:s,rec:d,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${Ea(e)}`,enabled:i,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:d,theme:"dark"===s?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},Ca=(e,t,n)=>Ie(void 0,void 0,void 0,function*(){var i;const{placements:o,pageContext:{deviceType:r}}=p.get();s(`rendering finn blink ad for ${e}`);const a=w(e),d=o[r].find(e=>e.targetId===a),l=xa(e,null==d?void 0:d.finnBlink);if(!(null==l?void 0:l.enabled))return s(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void ma(e);if((e=>{var t;const n=Ea(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void s(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:y}={}}=null!=v?v:{},f=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=_e();return null!=e?e:""}return e})(g),k="dark"===y?"dark":"light";try{const e=yield Ie(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=fa.get(wa),n=N("finncode");if(!e||n)return"";if(!t){const t=yield Lt.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return fa.set(wa,n),n}return t}),t=yield Ie(void 0,void 0,void 0,function*(){const{ppid1:e}=Vt.getPPIDs();return e}),n=(null===(i=null==d?void 0:d.finnBlink)||void 0===i?void 0:i.useNewConstructor)?ka:ba;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:k,uuid:h})).then(()=>{ha(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){s(`Finn blink error ${t}`),n&&n(e),!n&&F(e),ma(e)}}),Ia=()=>Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return!!(yield je(e,t,n,"finn-blink"))||(s("Skip loading finn blink ad due to missing TCF consent."),!1)}),Ta=(e,t)=>{var n;(s(`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)):s(`Cannot perform afterend on: ${e.id}`)},Sa=e=>document.querySelector(`#${e}`);var Aa=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>Ie(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=p.get(),i=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=Sa(n);o&&(yield Ci(o,null!=e?e:i))}}),loadFinnBlinkAd:(e,t,n,i)=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=p.get();if(s(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield Ia())||o)return n&&n(e),ma(e),void(!n&&F(e));try{yield pa(va)}catch(e){console.error(e)}yield Ca(e,t,n),i&&i()}),replaceAdsWithFinnBlink:(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;if(!t)return;const{replacementConfig:o}=t,r=null===(n=null==o?void 0:o.adsToReplace)||void 0===n?void 0:n[e],a=null===(i=null==o?void 0:o.sizes)||void 0===i?void 0:i[e];ai()&&r&&a&&t.enabled?(yield Ia())&&(yield pa(va),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=p.get(),n=document.createElement("div"),i=document.createElement("div");return i.id=e,n.appendChild(i),Wo(t,i,Ko),s(`Creating blink container for: ${e}`),n})(t);(e=>{s(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),Ta(n,i),n.dataset.finnBlinkId=t,Ei().withFullAdsChain(e)})):s(`Finn blink configuration is incorrect: ${JSON.stringify(o)}`)})});const Oa=1e4,Pa=e=>e.some(e=>e.some(e=>!!e&&qi(e,0)));let ja;var $a=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=Oa,widescreenIdPrefix:i}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=p.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let r=0,a=Date.now(),s=Pa(o);if(!o.length)return;ja&&window.removeEventListener("scroll",ja);const d=(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="")})})(o);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{s||(s=Pa(o)||s,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=o.map(e=>e[r]),n=o.map(t=>t[e]);d(t,"opacity","0"),setTimeout(()=>{d(t,"display","none"),d(n,"opacity","0"),d(n,"display","block"),setTimeout(()=>{d(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);ja=c,window.addEventListener("scroll",c)}});const La="#fff",_a="#0098da",Na=(e,t=!0)=>{(e===qe||e===De)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},qa=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Da=e=>{document.body.style.overflow=e?"initial":"hidden"},Ma=e=>{const t=Ba(e),n=Fa(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Da(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Fa=e=>{const t=()=>Ma(e);return window.addEventListener("advertory:closeTakeover",t),qa(),t},Ba=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Ma(e)};return qa(),window.addEventListener("keydown",t),t},Ra=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Ba(e),Fa(e),qa(),t.addEventListener("click",()=>{Ma(e)}),Da(!1))},Ua=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Fa(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},za=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Ma(e))})(e)},Va=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=p.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=wn.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Ha=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=wn.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Wa=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=wn.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Ka=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=wn.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Ga=()=>{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)},Ja=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${et})()`,e+t.outerHTML})(e)),n};var Xa=Object.freeze({__proto__:null,createTakeoverAd:e=>Ie(void 0,void 0,void 0,function*(){const{takeover:t}=p.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!t)return;const r=Je(e),a=o.offsetHeight,s=window.scrollY>a;o.style.display="block",!s&&Na(r,!1),((e,t)=>{({[qe]:Wa,[Ne]:Va,[De]:Ha,[Me]:Ka})[t](e)})(o,r),Ga(),((e,t)=>{({[qe]:Ua,[De]:Ua,[Ne]:Ra,[Me]:za})[t](e)})(o,r),((e,t,n)=>{if(!n)return;({[qe]:()=>{const{buttonLabel:i}=Ye(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[Ne]:()=>{const{themeColors:i,logotype:o,buttonLabel:r,showArrowIcon:a}=Ye(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&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:La,"important"),n.style.color=null!=t?t:_a}}})},[De]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:r=!0}=Ye(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||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[Me]:()=>{}})[t]()})(o,r,t),yield Xe(),!s&&Na(r,!0),Ze(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=on(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=on(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Ja(t))},modifyTakeoverIframe:(e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);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===i&&n===o||(r.style.width=i,r.style.height=o)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const Qa=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Ya=(e,t,n,i)=>{var o,r;const a=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:s,fullWidthFormatClassName:d}={},fullWidth:l,pageContext:{deviceType:c}}=p.get();if(!a)return;const u=a.parentElement,v=a.querySelector("iframe"),g=null==v?void 0:v.parentElement;if(!v||!g)return;if(a.style.width="100vw",a.style.position="relative",u&&(u.style.width="100vw",u.style.position="relative"),!s||!d)return;const h=`advertory-${s}-${d}`;a.classList.add(`${h}__${i}`),null==u||u.classList.add(`${h}-wrapper__${i}`);const m=null===(r=null===(o=null==l?void 0:l.options)||void 0===o?void 0:o.styles)||void 0===r?void 0:r[c],y=(null==l?void 0:l.enabled)&&m;!y&&u&&(u.style.left="50%",u.style.marginLeft="-50vw"),y&&m.adContainer&&Qa(a,m.adContainer),y&&m.adContainerWrapper&&u&&Qa(u,m.adContainerWrapper);const f=a.offsetWidth,w=f/e.width;g.style.transform=`scale(${w})`,g.style.transformOrigin="left top";const b=Math.round(f/t*n);a.style.height=`${b}px`,a.style.overflow="hidden"};var Za=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{Ya(e,1080,1080,"fullsquare-ad")},applyNinesixteenFormat:e=>{Ya(e,1080,1920,"ninesixteen-ad")},prepareContainerForFullWidthFormat:e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=p.get();if(!t||!n||!i)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),o.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))}});const es=e=>e===g.NO?"schibsted":"schibstedse";var ts=Object.freeze({__proto__:null,getCampaign:es,loadNorstat:()=>Ie(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:i}=p.get(),o=yield je(i,n,t,"norstat");if(!e||n||!o)return;const r=(e=>{const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o}=Vt.getPPIDs(),r=(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{Ie(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${es(t)}/map/${r}`,"norstat")})});const ns=".advertory-right-column-track",is="--advertory-right-column-track-height",os=e=>e.getBoundingClientRect().top+window.scrollY,rs=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},as=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},ss=(e,t)=>`${e}-${t}`,ds=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),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=os(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=rs(e);as("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=os(e),o=ss(is,t),r=i-n,a=ss("--advertory-right-column-split-point-height",t),s=rs(e);as(o,r),as(a,s)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=ss("--advertory-right-column-ad-height",t),i=rs(e);as(n,i)})(o[t])});((e,t)=>{const n=os(e);as(is,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let ls=!1;var cs=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||ls)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=ns}=e,o=document.querySelector(i);if(!o)return;ls=!0;const r=()=>{ds(o,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(o)}});class us{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class ps{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class vs{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,s,d,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 u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(o=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===o||o.call(i,u):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(l=null===(d=this.pulse)||void 0===d?void 0:d.trackElementView)||void 0===l||l.call(d,u)})}trackContentClick(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,s):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,s)})}}class gs extends vs{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,r,a;const{clientName:s,creativeId:d,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=d?d:l},page:{"@id":null!=p?p:c,"@type":u,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:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const hs="[data-k5a-teaser-analytics]",ms=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new gs(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(hs);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(hs);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.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});i.forEach(e=>{s.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class ys{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[zn.VG]:new us}[n]||new ps;ms(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(s(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}loadKilkayaScript(e){return Ie(this,void 0,void 0,function*(){yield Qt(e)})}run(e){return Ie(this,void 0,void 0,function*(){var t,n;const{tcf:i,pageContext:{isMobileApp:o,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const s=yield je(i,o,r,"kilkaya");s&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(s),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var fs=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=s(r,"data-pulse"),l=s(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},runKilkaya:e=>Ie(void 0,void 0,void 0,function*(){const t=new ys;yield t.run(e)})});yn('.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)}}');var ws=Object.freeze({__proto__:null});module.exports=sa;
|
|
1
|
+
"use strict";var e,t,n=require("react/jsx-runtime");function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=i(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}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,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=o(e[t],n)}),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)&&n.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,n)(e[r],t[r],n):i[r]=o(t[r],n))}),i}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):s(e,t,i):o(t,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)},{})},e=l}());const r=["placements","takeover","refreshConfig","editory"],a={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},d=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=(e,t)=>{console.warn("[Advertory WARN]: ",e)},l=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:i,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||s("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||s("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||s("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||s("pageContext.deviceType is required."),n||s("pageOptions is required."),i||s("placements is required."),(null==o?void 0:o.defaultThreshold)||s("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,i,o;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(i=e.fullscreenScroll)||void 0===i?void 0:i.enabled),property:"main",featureName:"fullscreenScroll"},{flag:!!(null===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&s(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},c=6;class u{set(e){l(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 r){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),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=o(u.DEFAULT_SITE_HANDLERS,e)}}u.DEFAULT_SITE_HANDLERS={siteEvents:a,initNativeAd:function(){}};const p=new u,v=p.modifyConfigProperties.bind(p),g={NO:"no",SE:"se"},h=e=>e===g.NO?"no-sno":"se-generic";let m="";const y=new Map,f=e=>{const{pageSetup:{tag:t}={}}=p.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(m!==window.location.pathname&&(y.clear(),m=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=y.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=p.get();return`${e}-${t}`})()}-count`]=i,y.set(n,i+1),e})):e},w=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},b="0123456789abcdefghijklmnopqrstuvwxyz",k=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},E=e=>{window.apntag.anq.push(e)},x=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),C=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})}),I="advertory-wallpaper-background",T="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${I}`);e&&e.remove()},A=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${I}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},O=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,P=e=>O.test(e),j=e=>e.startsWith("wallpaper:color:"),$=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundImage=`url(${e})`)},L=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundColor=e)};var _=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(T),n.classList.add(T))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(I),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(A(n),window.addEventListener("scroll",()=>A(n)))})(n),e()},isShortWallpaperColorMessage:j,isShortWallpaperUrlMessage:P,removeWallpaperBackground:S,setWallpaperBackgroundColor:L,setWallpaperBackgroundImage:$});const N=e=>new URLSearchParams(window.location.search).get(e),q="takeover",D="native_override_desc2",M=()=>null!==N("disable_prebid"),F=e=>{if("0"===N("collapse_ad"))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")&&S())},B=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 R{initialize(){this.DATA=Object.assign({},R.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)}}R.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const U=new R,z=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},V=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=U.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},H=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{F(e.id),V(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=w(e.id)}),E(()=>window.apntag.clearRequest())},W="noGroupedPlacements",K=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},G=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},J=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,pageContext:{deviceType:o}}=p.get(),r=n[o].filter(G)||[],a=e?document.querySelector(e):document;if(!a)return[];const d=r.reduce((e,t)=>{const n=K(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({targetId:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${o}], 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 i;const o=X(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),d=`${e.id}-${k(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&&U.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({},o),{targetId:d})});return f(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(d)},X=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:r||o},Q=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=p.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=w(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(w(e.targetId)));return n})(e,i),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(w(e.targetId))))(e,new Set([...d,...o]));return Object.assign(Object.assign(Object.assign({},a),r),{[W]:s})},Y="ABSOLUTE_FULLSCREEN",Z="ANY_FULLSCREEN",ee="NINESIXTEEN",te="FULLWIDTH",ne="FULLSQUARE",ie="TAKEOVER",oe="VELVET_TAKEOVER",re="WALLPAPER",ae="COLLAPSE",de={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],NINESIXTEEN:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],FULLSQUARE:[{width:1080,height:1080}],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}]},se={wallpaper:1600,"l-format":1600},le=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&xe(e,Z)},ce=e=>{const{native:t}=e;return!!t},ue=e=>xe(e,te),pe=e=>{const{targetId:t}=e;return t.includes("takeover")||xe(e,ie)},ve=e=>xe(e,ie),ge=e=>xe(e,re),he=e=>xe(e,ae),me=e=>e.targetId.includes("sponsorstripe"),ye=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},fe=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),we=e=>e.targetId.startsWith("midboard"),be=e=>e.targetId.includes("widescreen"),ke=e=>e.width>=1260&&e.width<=1280,Ee=e=>e.width>=1600&&e.width<=1620,xe=(e,t)=>{const n=de[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===o,d=!t.height||t.height===r;return a&&d})};function Ce(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function Ie(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{s(i.next(e))}catch(e){r(e)}}function d(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Te=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 d("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(d("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{d("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{d("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);d("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),Se="cmp:loaded";let Ae="undefined"!=typeof window?window._tcf_:void 0,Oe=!1;const Pe=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=N("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(d("TCF bypass param detected, returning consent: true"),!0):(d("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(Oe)return null;if(!Ae)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Ae.getConsentedToAllSync();return d(`TCF consented to all is: ${t}`),Ae.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(d("Getting TCF consent manager..."),window._tcf_)return d("TCF consent manager is already available"),Ae=window._tcf_,void e(Ae);d("TCF consent manager is not available");const n=()=>{d("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Ae=window._tcf_,e(Ae)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(Se,n),Oe=!0,t(new Error("Timeout waiting for CMP to load"))},o);d("Listening for CMP loaded event..."),document.addEventListener(Se,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>Ie(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.SE,i=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.NO;if(t||i)return d("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Te(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Ae)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{d("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);Ae.onTcfReady(()=>{d("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Ae.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},je=(e,t,n,...i)=>Ie(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return d(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=Pe(e,0,n);return(yield o())?(d(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(d(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),$e=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Le=e=>Ie(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e,{getConsentAsync:o}=Pe(t,0,i);if(!(yield o()))return;const r=$e("_pulse2data");return r?r.split(",")[9]:void 0}),_e=()=>{const e=$e("_pulse2data");return e?e.split(",")[2]:void 0},Ne="splash",qe="welcomePage",De="topscroller",Me="velvet",Fe=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},Be="takeover-displayed",Re="takeover-visit-count",Ue=14400,ze=()=>{const e=$e(Re);return e?parseInt(e):0},Ve=()=>{const e=ze(),{takeover:{options:{cookieCapTime:t=Ue}={}}={}}=p.get(),n=document.location.hostname;window.document.cookie=`${Re}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},He=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=p.get();return"0"!==N(q)&&("1"===N(q)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=p.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Be;return"true"===$e(n)})())&&(!t||We()))},We=()=>{const e=ze();return 0===e?(Ve(),!1):1===e},Ke=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ge=()=>{const{takeover:e}=p.get();return Boolean(null==e?void 0:e.topscroller)},Je=e=>{const{width:t,height:n}=e;return Ke(t,n)?Ne:xe(e,oe)?Me:Ge()?De:qe},Xe=()=>Ie(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Be,cookieCapTime:n=Ue}={}}={},pageContext:{isMobileApp:i,countryCode:o},tcf:r}=p.get(),a=yield je(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Qe=e=>{var t,n;const i=!!(null===(n=null===(t=p.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return pe(e)&&i},Ye=(e,t)=>{var n;if(t===De){const{topscroller:t}=e;return null!=t?t:{}}if(t===Ne){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ze=(e,t)=>{t!==Ne?(e=>{var t,n;const i=null===(t=p.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=p.get().takeover)||void 0===n?void 0:n.topscroller;if(!i||o)return;const r=document.querySelector(i),a=document.querySelector(".welcome-page-wrapper"),d=document.querySelector(`#${e.targetId}`),s=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&s&&d))return;const l=null==r?void 0:r.offsetHeight,c=ve(e)?"60svh":`calc(100svh - ${l}px)`,u=ve(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),d.style.setProperty("height",c,"important"),s.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=p.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},et=Fe([],()=>{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})});var tt=Object.freeze({__proto__:null,addTakeoverCookie:Xe,adjustTakeoverHeight:Ze,canDisplayTakeover:He,getProperWelcomePageConfig:Ye,getTakeoverVariant:Je,handleTakeoverCookieOnAdNotShown:e=>Ie(void 0,void 0,void 0,function*(){Qe(e)&&(yield Xe())}),incrementArticleVisitCount:Ve,isSplashVariant:Ke,isTopscroller:Ge,scaleAd:et,shouldAddTakeoverCookieForNotShownAd:Qe});const nt={nativeAd:e=>ce(e)&&!me(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:ue,fullscreenScroll:le,topscroller:e=>pe(e)&&Ge(),splash:e=>pe(e)&&Ke(e.width,e.height),welcomePage:pe,wallpaper:ge,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:ke,hFormat:Ee,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ee(e)&&!ke(e),topboard:e=>e.targetId.startsWith("topboard")&&!pe(e),widescreen:be,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:me,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!fe(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!we(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:fe,midboard:we},it=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const a=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(o,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,i;for(const[o,r]of Object.entries(nt))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},ot=e=>{var t;return(null===(t=Object.entries(nt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},rt={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},at="web_desktop",dt="web_phone",st="wde",lt="wph",ct=()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"},ut=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},pt=(e,t=window.screen.width,n,i)=>{const o=ut(e,t);if(n&&n(e,o),i)return void i(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${o})`,r.style.transformOrigin="left top")},vt=(e,t)=>{if(e&&t)return t/e},gt=new Map;gt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),gt.set("panorama",{scale:.79,transformOrigin:"center center"}),gt.set("outstream",{scale:.79,transformOrigin:"center center"}),gt.set("integration",{scale:.79,transformOrigin:"center center"}),gt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var ht=Object.freeze({__proto__:null,calculateScaleFactor:ut,getAspectRatio:vt,scaleAd:pt,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=ot(e),o=gt.get(i),r=document.querySelector(`#${e.targetId}`);if(!r||!o)return;if(r.style.transformOrigin=o.transformOrigin,r.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.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")},scaleAds:e=>{var t,n,i,o,r,a;const{adScaleConfig:d,pageContext:{deviceType:s}}=p.get();if(!(null==d?void 0:d.enabled))return;if(xe(e,Z))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=K(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),g=null!==(o=null==v?void 0:v.offsetWidth)&&void 0!==o?o: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;pt(e,(g<h?g:h)-u)}});const mt=864e5,yt=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return d("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=mt)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=mt)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return d("Error with parsing localStorage data"),null}}}})(),ft="glimrTags",wt=["glwe_","glwet_"],bt={geofenceTags:[],geoTags:[],weatherTags:[]},kt=(...e)=>Ie(void 0,[...e],void 0,function*(e=p.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield je(t,n,i,"glimr")}const{getConsentAsync:o}=Pe(t,0,i);return yield o()}),Et=()=>Ie(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield kt())||!(null==e?void 0:e.enabled))return void d("No consent for glimr data fetching.");const t=yield(n=500,Ie(void 0,void 0,void 0,function*(){return yield Promise.race([Ie(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{yt.setWithTimestamp(ft,{tags:e,tagMappings:t}),n(!0)})})}catch(e){d(`Error during getting glimr data: ${e}`)}else d("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),xt={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"},Ct=e=>wt.some(t=>e.startsWith(t)),It=e=>e.startsWith("glgc_"),Tt=e=>!Ct(e)&&!It(e),St=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield kt(e);if(!(null==i?void 0:i.enabled)||!r)return d("No consent for getting glimr tags."),{};const a=h(o),s=At(e,Boolean(n));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}),At=(e,t)=>{const n=Ot();if(!n)return bt;const i=((e=[])=>e.filter(Ct))(n),o=((e=[])=>e.filter(It))(n),r=((e=[],t,n)=>{var i;const o=e.filter(Tt);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=xt[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},Ot=()=>{const e=yt.getByTimestamp(ft);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},Pt=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),jt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),$t=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},pageContext:{countryCode:o}}=p.get(),r=[`${h(o)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?r:[]],d=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),s=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:d}}},s)}},Lt={get:(e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>Ie(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},_t="advertory:ppids-cache",Nt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},qt={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Dt={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},Mt={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Ft={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Bt={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},Rt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Ut{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const zt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return Ie(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("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:""}},Vt=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return Ie(this,void 0,void 0,function*(){var n,i,o,r,a,d,s,l,c,u,p;const v=yt.get(_t),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});yt.set(_t,o)}hashPPIDs(e,t){return Ie(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Lt.post(t,n,e)}catch(e){return d("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return Ie(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${Rt[t]}:${n}`:null}))(t,n),o=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),r=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Ht=e=>Ie(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:i,isMobileApp:o}}=e;if(!(yield je(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([zt.processPPIDs(t,null==n?void 0:n.timeout),Vt.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){d(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Wt=e=>{const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Vt.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]).add(r,Ft[e]).add(a,Bt[e]).buildEids()}]}},Kt=()=>{const{ppid1:e,ppid2:t}=zt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},Gt=e=>{const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Vt.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]).add(r,Ft[e]).add(a,Bt[e]).buildRyEids()}}]}}},Jt=e=>{const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o}=Vt.getPPIDs();return(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]).buildRyEids()},Xt=e=>Ie(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o}=Vt.getPPIDs(),r=(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),Qt=(e,...t)=>Ie(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{d(),n()},a=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(s)};o.addEventListener("load",r),o.addEventListener("error",a);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),Yt="advertory-fullscreen-scroll",Zt="advertory-fullscreen-scroll-wrapper",en="fullscreen-scroll-in-screen",tn="in-screen",nn=e=>e.includes("snoap.no"),on=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},rn=Fe([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,a=e/o,d=t/r;i.style.transform=`scale(${a},${d})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),an=e=>{const t=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},dn=[],sn={},ln=(e,t)=>{var n;const i=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>cn(e,i),{}),r=pn(e);o.observe(e),i&&(sn[r]=hn(e,null==t?void 0:t.options))},cn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=pn(e);n?(un(i,n),vn(e,i,t)):(un(i,n),gn(e,i,t))})},un=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},pn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},vn=(e,t,n)=>{e.classList.add(tn),document.body.classList.add(en),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),dn.includes(t)||dn.push(t),n&&window.addEventListener("scroll",sn[t],{passive:!0})},gn=(e,t,n)=>{dn.includes(t)&&(n&&window.removeEventListener("scroll",sn[t]),document.body.classList.remove(en),e.classList.remove(tn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},hn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,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)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&mn(e,r,o,0),a.length&&mn(e,a,o,40)}},mn=(e,t,n,i)=>{const o=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-i:(r+t-(a+o))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function yn(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}yn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100vw !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:2;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 fn="left",wn={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 bn=null;const kn=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\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 ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${rn})()`,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(nn(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=an(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>nn(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)),nn(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)),on(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},En=()=>{bn=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},xn=()=>{bn||(bn=window.requestAnimationFrame(En))},Cn=(e,t)=>{var n,i,o,r;const{pageContext:{countryCode:a,deviceType:d}}=p.get(),{targetId:s}=e,l=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==l?void 0:l.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),((e,t)=>{var n;const{articlesContainerWidth:i=1302,backgroundColor:o="#fff",foregroundColor:r="#fff",margin:a,beforeContentValue:d=""}=e,s=null!==(n=null==a?void 0:a[t])&&void 0!==n?n:"16px 0",l=i/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${o} 0px,\n ${o} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${o} calc(50% + ${l}px),\n ${o} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${s};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${d&&"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: '${d}' !important;\n }`,c.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(c)})(null!==(i=null==l?void 0:l.overlayStyles)&&void 0!==i?i:{},d);const c=document.getElementById(s),u=null==c?void 0:c.parentElement;if(!c||!u)return;ln(u,t),c.className=Yt,ln(u,t),c.className="advertory-fullscreen-scroll";const v=xe(e,Y)?"absolute":"fixed";c.style.position=v,u.className=Zt,u.dataset.showTagSubscribeId=s,c.setAttribute("data-ad-label",wn[a].adText),(null==l?void 0:l.cogwheelPosition)===fn&&(c.dataset.moveCogwheelToTheLeft="true"),xn(),window.addEventListener("resize",xn),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",xn),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",xn)},In=e=>{if(!(null==e?void 0:e.classList.contains(Yt)))return;e.classList.remove(Yt),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(Zt))&&(t.classList.remove(Zt),t.classList.remove(tn))};var Tn=Object.freeze({__proto__:null,createFullscreenScrollAd:Cn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=on(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=on(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,kn(t,e))},undoFullscreenScrollContainer:In});const Sn=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},An=(e,t,n)=>{var i,o,r,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(o=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),Sn(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},On="ad-loaded",Pn=()=>Ie(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:i},fullscreenScroll:o}=p.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=p.getHandlers(),{getConsentAsync:a}=Pe(t,0,n),s=yield a(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=Pt(),{prebid:{relevantCallbackTimeout:r}={}}=p.get(),a="relevantCb"===i&&r?r:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=Pt(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=Pt();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=jt();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return d("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=jt();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const i=s?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};d("prebid consentManagement",i),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},Gt(n)),$t(g,v))),d("core add prebid config",Object.assign(Object.assign({consentManagement:i,enableSendAllBids:!1},Gt(n)),$t(g,v))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{jn(e,r)},directRenderFn:e=>{var t;const{settings:n,renderFn:i}=e,{bid:r,adDiv:a}=n||{};if(!a)return;const d=i(n),s=Object.assign(Object.assign({},r),{targetId:a.id,banner:!0}),l=a.id,c=document.getElementById(l);c&&(le(s)?(Cn(s,o),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(d)):(In(c),null===(t=null==c?void 0:c.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),c.classList.add(On),(null==r?void 0:r.creativeId)&&An(l,c,Number(null==r?void 0:r.creativeId)))}}),d("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{jn(e,r)},directRenderFn:()=>{}})})}),jn=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,a=document.querySelectorAll(`[id^=${i}]`)[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;null==t||t({native:o,targetId:d},p.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},$n=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,a]=t;if(!i.dataset.lockedsize&&a&&r)i.style.width=`${r}px`,i.style.height=`${a}px`,n&&(o.resizeAd(i.id,[r,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},Ln=["netboard","board"];class _n{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",o),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 Ie(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",a=(null==o?void 0:o.userId)?String(o.userId):"",s=this.buildUrl(e,{envId:r,spid:a});try{d("Starting fetching DrEdition ad from URL:",s);const e={method:"GET"},t=yield Lt.get(s,e);return d("Fetch operation completed successfully."),t}catch(e){d("Error during fetch operation:",e)}return null})}}let Nn=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:d},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return Ie(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,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:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const qn=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):d("Dr. Edition container does not have a parent element, cannot remove height lock.")};class Dn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return Ie(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,a=e.querySelector(o);if(!a)return void d(`Container with selector "${o}" not found.`);const s=yield this.drEditionService.fetchData(t);return(null==s?void 0:s.itemId)||r?!(null==s?void 0:s.itemId)&&r?(d("No Dr. Edition ads available to render. Collapsing whole placement."),F(e.id),void qn(a)):((null==s?void 0:s.itemId)&&r&&(d("Dr. Edition ad available to render as a Xandr backfill."),B(e.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(a,s,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(s,t),qn(a),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(e,s,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):qn(a))):(d("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void qn(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 i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}class Mn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return Ie(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Pe(n.tcf,n.isMobileApp,n.country),o=yield i(),r=n.device===rt.MOBILE?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Fn{constructor(e){this.strategy=e}handle(e,t){return Ie(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return Ie(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield Qt(t)}catch(e){d("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return Ie(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.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,i,o;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===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,d),!0))}}let Bn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,d,s,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,p):(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,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,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 Rn extends Bn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:d="",creativeId:s,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[d,a,p,v].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:d,"spt:creativeId":s,pageTitle:a,publicUrl:p,urlPath:v},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let Un=class extends Bn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(d=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const zn={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"},Vn={FRONT:"front"},Hn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},Wn=e=>Ie(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),Kn={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 Ie(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return la})})}})}},Gn=(e,t)=>{null==e||e.forEach(e=>{Kn[e](t)})};class Jn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield Ie(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 a=["ContentMutePlugin"],d=this.createPlayerOverlay(e);Gn(a,d);const s={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},l=yield Wn(s);l.once("assetReady",()=>{Hn(l,a)}),l.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),l.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield l.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Vn.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const Xn="https://www.aftonbladet.se/video-player-extras/latest/";class Qn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${Xn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${Xn}external-link.js`]:{name:"ExternalLink"}}};yield Wn(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")}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}const Yn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class Zn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},Yn(e)?e:{}),{provider:Object.assign(Object.assign({},Yn(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield Wn(a);d.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Vn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let ei=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const ti=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,d={[zn.VG]:new Nn,[zn.E24]:new Jn,[zn.AFTONBLADET]:new Qn,[zn.SVD]:new Zn}[o]||new ei,s=new(a===g.SE?Rn:Un)(n,d,r),l=new _n(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new Mn(d,s),u=new Fn(d);return new Dn(l,c,u,s)},ni=()=>Ie(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 ii{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 Ie(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 d("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return Ie(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 oi=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=ti(n,i,o);e.forEach(e=>{var i,o,a;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=d.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(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)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},ri=()=>Ie(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)}}),ai=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},di=[],si=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:a,publisher:s,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield je(o,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,s=r[o]||r.desktop,l=w(t.targetId),c=s.find(e=>e.targetId===l),u=Ln.some(e=>l.startsWith(e)),p=di.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||d;return c&&u&&!p&&v?(di.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void d("Pulse has not been passed as a prop, aborting");const v=yield ni(),g=new ii(v),h=ti({publisher:s,pageType:l,country:c},g,null==i?void 0:i.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const y=document.createElement("div");y.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:o,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),li=(e,t)=>{var n,i,o;if(!ai())return void d("Ad block not enabled, Dr. Edition backfills will not be rendered");d("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:r},finnBlink:a}=e,s=null===(i=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===i?void 0:i[r],l=null!==(o=null==s?void 0:s.map(([e])=>e))&&void 0!==o?o:[],c=new IntersectionObserver((t,n)=>Ie(void 0,void 0,void 0,function*(){for(const i of t){if(!i.isIntersecting)continue;const t=i.target;n.unobserve(t),yield si(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!l.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&c.observe(t)})};var ci=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:i,pulseData:o,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=a(o,"data-pulse"),s=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},d,s,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:i})]}))},getDrEditionManager:ti,handleDrEdition:e=>Ie(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield je(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield ni(),i=new ii(n);oi({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:si,handleDrEditionBackfillOnAdblock:li});const ui="collapseAd",pi="hideAd",vi="resizeAd",gi="renderDrEditionFallback",hi="wallpaperImageUrl",mi="wallpaperColor",yi="velvet",fi=[vi,hi,mi,ui,pi,gi,yi];let wi;const bi=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=(e=>{if("object"==typeof e)return e;if(P(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:hi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:mi,wallpaperColor:t}}if(e.startsWith(gi)){const t=e.split(":")[1];return{name:gi,targetId:t}}if(e.startsWith(ui)||e.startsWith(pi)){const t=e.split(":")[1];return{name:ui,targetId:t}}if(e.includes("name")&&fi.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!fi.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;i===yi&&d&&(d.includes("noScroll")&&(wi=(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==wi||wi(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==ui&&i!==pi||!o||F(o),i===vi&&o&&d&&$n(o,d),i===gi&&o&&(F(o),si(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&$n(o,s,!0),i===hi&&r&&$(r),i===mi&&a&&L(a)},ki=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Ei=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),E(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return Aa});yield t(e,o,null)}),withFullAdsChain:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return Aa});yield t(e,o,r,()=>Ie(void 0,void 0,void 0,function*(){if(!U.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return _});t(e)}))})}},xi=(e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return ye(t)&&i?(d(`loading finn blink ad for blink only placement for ${t}`),void Ei().withFinnBlinkAd(t)):ye(t)?(d(`loading finn blink ad with full ads chain for ${t}`),void Ei().withFullAdsChain(t)):void E(()=>(d("core showTag",{id:t}),e.showTag(t)))},Ci=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield x,yield C;const n=new IntersectionObserver((t,n)=>((e,t,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(r);d("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,i),a&&(t.unobserve(a),t.disconnect())})})(t,n,xi,e),ki(t));n.observe(e)}),Ii=new Map,Ti=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Si=".brandstudio-premium-content-widget",Ai=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Oi=({adWrapper:e,placementContainer:t})=>{const n=Ai({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),V(i=t),i.innerHTML=""},Pi=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},ji=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=Ti.includes(n)&&Boolean(t.closest(Si));const o=i?t.closest(Si):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||!i&&!a||i&&!o)return;if(a)return Pi(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?Pi(d):s.hasAttribute("style")&&Pi(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},$i=(e,t,n,i,o,r)=>{var a;const d=performance.now(),s=null!==(a=Ii.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(Ii.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&Oi({adWrapper:o,placementContainer:n}),E(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},Li=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,$i,t,n),ki(300));i.observe(e)},_i=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},Ni=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),qi=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Di=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Ui(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Mi=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t,n;return e.targetId===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==i?void 0:i.requestThreshold;qi(o,r)&&i&&(z(i.targetId),n.length&&o.classList.remove(...n),Ui([i],t))}},Fi=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Bi(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Mi(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Mi(e,!1,t))};n.persisted&&(Ni()?window.addEventListener("scroll",i,{passive:!0}):Mi(e,!1,t))})})(e,n))},Bi=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Ri=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Bi(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},Ui=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=_i(i,n);if(t)for(const t of e){const e=Ri(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)E(()=>window.apntag.refresh(e))},zi=(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,Vi=e=>`externalImpId:'${e}'`,Hi=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:i}=p.get(),{targetId:o,sizes:r,keywords:a,allowedFormats:s,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:v,dynamicSizeWidthCheck:g=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||He())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=Array.isArray(n)?n.filter(e=>e!==De):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(e),h=Object.assign({invCode:l,sizes:r,targetId:o,keywords:zi(a,c),allowedFormats:s,dynamicSizeWidthCheck:g},v&&{safeframeConfig:v}),m=(e=>{var t,n,i,o,r,a,s;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(d("Tracker state pageViewId is:",null===(r=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===r?void 0:r.pageViewId),null===(s=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===s?void 0:s.pageViewId):(d("Tracker state does not contain field pageViewId or it is empty"),""):(d("Tracker state is empty"),""):(d("Tracker is not configured in initAdvertory function"),"")})(i);n&&m&&(d("External Impression ID assigned to defineTag:",Vi(m)),h.externalImpId=Vi(m));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},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(h.native=y),h},Wi=e=>!e.includes("takeover")||He(),Ki=e=>{const{source:t}=e;return"csm"===t},Gi=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=p.get(),n=h(t),i=e[`${n}-targetid`],o=i?w(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[o]})},Ji=e=>{const{pageContext:{countryCode:t}}=p.get(),n=h(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},Xi=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);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"})})()},Qi=(e,t)=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});yn(".advertory-brandmetrics-survey{width:100%}");const Yi="advertory-brandmetrics-survey",Zi="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",eo=()=>Ie(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var o;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),to={pageContext:{publisher:"aftonbladet",countryCode:g.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},no={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},io=e=>(null==e?void 0:e.parent)?[...io(e.parent),e.shortPath||"unknown"]:[],oo=(e,t)=>t?"se-aftonbladet-{deviceType}-studio_{position}":`se-aftonbladet-tv-{deviceType}-${(e=>{var t;if(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.afp)return"afp";const[,n]=io(e);return no[n]||"ovrigaavdelningar"})(e)}_{position}`,ro={aftonbladet:to},ao={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:oo(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:io(e).join(":")}}},so=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},lo=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),co="se-generic",uo="aa-sch",po="kv_",vo="pause",go="{deviceType}",ho="{position}",mo="afp_",yo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),fo="1-1",wo="16-9",bo="3-4",ko="9-16",Eo="responsive",xo={[fo]:1,[wo]:1.78,[ko]:.56,[Eo]:1},Co={[fo]:1,[wo]:1.78,[bo]:1.33,[ko]:.56},Io=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=rt.DESKTOP===n?st:lt,d=o.replace(go,a);return(e,n)=>{if(e===vo)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(ho,vo).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&yo.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(go,a).replace(ho,e)}return d.replace(ho,e)}},To=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[i,o])=>{const r=Math.abs(e[n]-t);return Math.abs(o-t)<r?i:n},n[0][0])},So=()=>{var e,t;const n=jwplayer().getContainer(),i=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return i&&"number"==typeof i.offsetWidth&&"number"==typeof i.offsetHeight&&0!==i.offsetHeight?i.offsetWidth/i.offsetHeight:1},Ao=()=>{return(e=>{try{return decodeURIComponent(e)}catch(e){return""}})("undefined"!=typeof document&&null!==(t=null===(e=document.cookie.match("(^|;)\\s*_pulse2data\\s*=\\s*([^;]+)"))||void 0===e?void 0:e.pop())&&void 0!==t?t:"").split(",");var e,t},Oo=()=>{const e=null!==(t=Ao()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Ao()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Po=()=>Object.fromEntries(new URLSearchParams(window.location.search)),jo=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:i,countryCode:o}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},d={isMobileApp:e.isApp,countryCode:o,publisher:i,pageType:"front",deviceType:e.deviceType},s=(yield je(n,e.isApp,o,"video"))?"1":"0",l=yield eo(),c=yield Xt(o),u=yield Le({tcf:n,pageContext:d}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>To(Co,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?To(xo,Number(m.toFixed(2))):Eo;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${uo}-country_code`]:o,[`${uo}-publisher`]:i,[`${uo}-supply_type`]:(y=e.deviceType,y===rt.DESKTOP?at:dt),[`kw_${uo}-page_type`]:"collection",[`${uo}-page_type`]:"collection",[`${co}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${co}-page`]:"index",[`${co}-page`]:"index",[`${co}-screenheight`]:String(window.screen.height),[`${co}-screenwidth`]:String(window.screen.width),[`${co}-viewportheight`]:String(a),[`${co}-viewportwidth`]:String(r),[`${co}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${co}-mobile-os`]:ct(),[`${co}-audience`]:void 0,[`${co}-externalid_src`]:Oo(),[`${co}-tags`]:e.tags,[`${co}-articleid`]:p,"article-id":p},yield St(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${co}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Po()).some(e=>e.includes(po))&&(()=>{const e=Po(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(po)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":s,"kw_aa-sch-cmp_advertising":s,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),$o=["se-generic-audience","se-generic-appversion","se-generic-sitemode","se-generic-pagegen","se-generic-viewportheight","se-generic-viewportwidth","se-generic-screenheight","se-generic-screenwidth","aa-sch-inventory_type"],Lo=["aa-sch-publisher","se-generic-page","aa-sch-supply_type","se-generic-story","se-generic-section","se-generic-adformat","aa-sch-context_keyword","se-generic-tvtags","se-generic-test","aa-sch-cmp_advertising","aa-sch-instream_player_aspectratio","aa-sch-player_aspectratio"],_o=["external_uid","gdpr","gdpr_consent","eids","article-id"],No=(e,t)=>{const n=[...$o,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||_o.includes(e)?e:`kw_${e}`,t]))},qo=e=>Object.fromEntries(Object.entries(e).filter(([e])=>Lo.includes(e))),Do=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;ro[e]||s(`[video] No config found for publisher "${e}"`);return null!==(t=ro[e])&&void 0!==t?t:to})(e.publisher),d=(e=>{var t;return null!==(t=ao[e])&&void 0!==t?t:ao.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),l="/"===window.location.pathname,c=null===(i=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===i?void 0:i.toString(),u=e.assetId===c,p=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:d,isUserPresentOnFrontPage:l,adsKeywords:yield jo({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==d?void 0:d.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:l,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:So(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:so(e.startMode)}}),Mo=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=i||{},l=Io(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(mo)?`${mo}${t}`:t)(s),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,o),"se-generic-playback-method":lo.get(d),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},No(r,n)),qo(r)),{vskippable:"0",referrer:u,vplaybackmethod:d})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},Fo=e=>t=>Ie(void 0,void 0,void 0,function*(){const n=yield Do(e,t);return Mo(n,e)}),Bo={plcmtcnt:1,context:1,contextsubtype:10,plcmttype:1,assets:[{id:1,title:{len:100},required:0},{id:2,img:{type:1,hmin:10,wmin:10},required:0},{id:3,img:{type:3,hmin:10,wmin:10},required:0},{id:4,data:{type:2},required:0},{id:5,data:{type:12},required:0}],ver:"1.2",eventtrackers:[{event:1,methods:[1,2]}]},Ro={no:"NOK",se:"SEK"},Uo={no:"no",se:"sv"};class zo{buildFetchObject(e,t,n,i){return Ie(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:r}=i,{invCode:a,xandrPlacementId:d}=e,s=yield eo(),l=(c=Object.assign(Object.assign({},t),n),Object.entries(c).flatMap(([e,t])=>void 0===t?[]:Array.isArray(t)?t.map(t=>`${e}=${t}`):[`${e}=${t}`]).join(","));var c;const u=new URL(window.location.href),p=(e=>{const{allowedFormats:t}=e;if(!t||t.includes("native"))return{request:JSON.stringify(Bo),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:k(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},d&&{placement_id:d}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||Uo[o]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield Le(i),ext:{consent:s.gdpr_consent||"",eids:Jt(o)}},at:1,cur:[Ro[o]],source:{tid:k(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,i){return Ie(this,void 0,void 0,function*(){try{d("Starting fetching Studio ad from Xandr:",Zi);const o=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),s=a.size>0?`${Zi}?${a.toString()}`:Zi,l=yield this.buildFetchObject(e,t,n,i),c=yield Lt.post(s,o,l);return d("Fetch operation completed successfully.",c),c}catch(e){d("Error during fetch operation:",e)}return null})}}const Vo=0,Ho=3,Wo=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",a=i?`__${i}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(d),o.classList.add(s),t.dataset.adType=n},Ko="finn-blink",Go="native-ad",Jo=(e,t)=>{Xo(e,t),Yo(e,t)},Xo=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])er(i)}),t.dataset.tracked="true")})},Qo=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(Zo):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},Yo=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!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:rt.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,Qo(e),c.disconnect();break}},s);c.observe(o)},Zo=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?er(e):window.navigator.sendBeacon(e)},er=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},tr=e=>e.reduce((e,t)=>{if(!t.serverSidePlacement)return e.clientSidePlacements.push(t),e;const n=Math.random()<.5;return t.keywords=Object.assign(Object.assign({},t.keywords),{"aa-sch-prerenderer":n?"true":"false"}),n?e.serverSidePlacements.push(t):e.clientSidePlacements.push(t),e},{clientSidePlacements:[],serverSidePlacements:[]}),nr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{pageContext:{deviceType:o},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[o],s=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void d(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},ki(s)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=U.getData("alertoryConfigKeywords"),v=null!==(i=c(Hi(e)).keywords)&&void 0!==i?i:{},g=new zo,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===rt.MOBILE?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===Vo){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,h,o),h.adType===Ho&&(Wo(t.pageContext.publisher,l,Go,t.pageContext.pageType),Jo({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:o,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var o,r,a;let d;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),An(e,n,Number(null==i?void 0:i.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,h.bid))}),ir=(e,t)=>{e.forEach(e=>nr(e,t).catch(e=>{d("Failed to handle server-side ad:",e)}))},or={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},rr=e=>Ie(void 0,void 0,void 0,function*(){if(!(e=>{const{editory:{editableConfiguration:{enabled:t=!1,pageTypeToFetch:n}={}}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editory:{editableConfiguration:{pageTypeToFetch:n}={}}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield Lt.get(t,{method:"GET",signal:n.signal})}catch(e){throw d("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?((e,t)=>o(t,e,or))(e,t):e}catch(t){return d("Error fetching S3 config, using site config",{error:t}),e}}),ar=(e,t)=>{const{pageContext:{isMobileApp:n}}=p.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let dr,sr=[];const lr=["takeover","wallpaper"],cr=e=>{const t=(e=>{var t;const n=U.getData("alertoryConfigKeywords"),{queryConfig:i,placements:o,tcf:r,glimr:a,appearanceConfig:d,pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y,fullWidth:f}=e,w=null!==(t=null==i?void 0:i.batchSize)&&void 0!==t?t:c;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v},pageSetup:h,placements:o,tcf:r,queryConfig:Object.assign(Object.assign({},i),{batchSize:w})},a&&{glimr:a}),d&&{appearanceConfig:d}),m&&{takeover:m}),y&&{fullscreenScroll:y}),f&&{fullWidth:f})}})(e);window.advertory={initialized:!0,version:"3.2.0",siteConfig:e,alertoryConfig:t}},ur=()=>Ie(void 0,void 0,void 0,function*(){const{pageOptions:e}=p.get(),{preparePageOptions:t}=p.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=p.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return(yield je(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=U.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Ji(e);U.setData("alertoryConfigKeywords",n)})(o.keywords),E(()=>dr.setPageOpts(o))}),pr=e=>Ie(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),r=yield je(n,i,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>F(e.targetId)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(e,r);vr(a);(null==t?void 0:t.enabled)&&r&&!M()?(d("core loadPlacements prebid enabled"),yield Pn()):(d("core load tags invoked without prebid enabled"),gr(a))}),vr=e=>{const{prepareTag:t}=p.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{d("core defineTags",{placement:e});const i=Hi(e);if(Wi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Gi(i),sizes:o}})(o);n.push(r),E(()=>(d("core defineTag - add to the queue",{placement:e,preparedTag:o}),dr.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},gr=e=>{const t=e.filter(({targetId:e})=>Wi(e)).map(({targetId:e})=>e);t.length&&E(()=>(d("core loadTags",{placementsIdsToLoad:t}),dr.loadTags([...t])))},hr=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:i}}=p.get(),{requestThreshold:o,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),s=null==n?void 0:n.defaultThreshold[i];a&&(d("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:s}),yield Ci(a,null!=o?o:s)),a&&(null==r?void 0:r.scroll)&&(d("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),mr=e=>e.some(({targetId:e})=>lr.some(t=>e.includes(t))),yr=e=>Ie(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[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=c}={},pageContext:{deviceType:i}}=p.get(),o=Q(e),r=Object.keys((null==t?void 0:t[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),d=e.filter(({targetId:e})=>!a.has(e));return[...r,..._i(d,n)]})(i);for(const e of o)mr(e)?(d("core loadAds without lazy loading",{placementsToLoad:e}),yield pr(e)):e.length&&(d("core loadAds with lazy loading",{placementsToLoad:e}),yield fr(e));const{finnBlink:r}=p.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return Aa});yield e(n)}}),fr=e=>Ie(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=p.get(),i=[];if(!t)return d("lazy load is not enabled",{placements:e}),void(yield pr(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{d("lazy load is enabled - handler start",{loadedTargetIds:i,placements:e});const o=e.every(e=>i.includes(e.targetId)),r=e.map(e=>e.targetId);!o&&i.push(...r),!o&&pr(e),d("lazy load is enabled - handler stop",{loadedTargetIds:i,placements:e,arePlacementsLoaded:o,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(d("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),wr=()=>Ie(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];E(()=>{dr.onEvent("adRequested",()=>{e.adRequested()}),dr.onEvent("adAvailable",o=>Ie(void 0,void 0,void 0,function*(){var r,a,s,l,c,u;d("core adAvailable start",{placementsAvailable:sr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Ki(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)});const v=null===(s=null===(a=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===s?void 0:s.adResponse.ads;if(Ki(o)&&v&&(null===(l=v[1])||void 0===l?void 0:l.rtb)&&(o.banner=null===(u=null===(c=v[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),le(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Tn});e(o)}const{widescreenSwitching:g}=p.get();if(be(o)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return $a});e()}if(le(o)&&!ye(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Tn});e(o,i)}if(!ce(o)||Ki(o)||ye(o.targetId)||null==t||t(o,p.get()),pe(o)&&!he(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Xa});e(o.targetId),yield t(o)}if(ge(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return _});e(()=>E(()=>window.apntag.showTag(o.targetId)),n),U.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&U.setData("horseshoe",{isAvailable:!0}),it({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),e.adAvailable(o);const h=sr.find(({targetId:e})=>e===o.targetId);h&&(yield hr(h,o),sr=sr.filter(e=>e.targetId!==h.targetId)),d("core adAvailable stop",{placementsAvailable:sr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Ki(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)})})),dr.onEvent("adLoaded",n=>Ie(void 0,void 0,void 0,function*(){const{refreshConfig:i,appearanceConfig:r,wallpaper:a,adScaleConfig:d}=p.get(),s=document.getElementById(n.targetId);if(ye(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return ya});e(n)}if(o.includes(n.targetId)&&ce(n)&&(null==t||t(n,p.get()),it({adObj:n})),!o.includes(n.targetId)&&Ki(n)&&o.push(n.targetId),he(n)&&F(n.targetId),pe(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Xa});e(dr,n.targetId)}if(ue(n)){const{prepareContainerForFullWidthFormat:e}=yield Promise.resolve().then(function(){return Za});e(n)}if((e=>xe(e,ee))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return Za});e(n)}if((e=>xe(e,ne))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return Za});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;ji({adWrapper:o,placementContainer:i});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Li(i,a,r))})(n,i),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(U.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return _});e(n.targetId)}if(null==d?void 0:d.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return ht});e(n),t(n)}e.adLoaded(n),Sn(n.targetId),s&&(s.classList.add(On),(e=>{var t,n;const{pageSectionsSelectors:i}=p.get(),o=null==i?void 0:i.mainFirstColumn,r=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(s)),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:ot(n)}}))})),dr.onEvent("adNoBid",t=>Ie(void 0,void 0,void 0,function*(){var n;if(F(t.targetId),null===(n=p.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return ci});yield e(p.get(),t)}if(pe(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(t)}e.adNoBid(t)})),dr.onEvent("adError",(t,n)=>Ie(void 0,void 0,void 0,function*(){if(pe(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(n)}e.adError(t,n)})),dr.onEvent("adCollapse",()=>{e.adCollapse()}),dr.onEvent("adRequestFailure",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield si(p.get(),t),e.adRequestFailure(t)})),dr.onEvent("adBadRequest",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield si(p.get(),t),e.adBadRequest(t)})),dr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),dr.onEvent("adNoBidMediated",t=>Ie(void 0,void 0,void 0,function*(){yield si(p.get(),t),e.adNoBidMediated(t)}))})}),br=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(i)return H(),[];o&&(H(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{B(e.id)})),v(null!=e?e:{}),yield ur();const{clientSidePlacements:d,serverSidePlacements:s}=tr(J(a));let l=d;return r&&(l=l.filter(e=>ye(e.targetId))),ir(s,p.get()),l.length>0&&(sr=[...sr,...l.map(e=>Object.assign({},e))],Di(l),Fi(l),yield yr(l)),sr}),kr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;p.set(e),p.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:i,kilkaya:o,rightColumnSplit:r,drEdition:a,finnBlink:s}=e;if(U.initialize(),window.addEventListener("message",bi,!1),dr=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=dr,d("Apn tag is set up on window"),yield Promise.allSettled([Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();(yield je(e,t,n,"xandr-endpoint"))||dr.setEndpoint("ib.adnxs-simple.com",!0)}),Ie(void 0,void 0,void 0,function*(){if(M())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get(),o=yield je(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield Qt(null==e?void 0:e.prebidUrl))}),Ht(e),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield Qt(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get();(yield je(t,n,i,"gpt-endpoint"))&&(yield Qt(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),Ie(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),{getConsentAsync:r}=Pe(n,0,o),a=yield r();if(e&&t&&a){if(yield Qt(t),document.querySelector(`.${Yi}`))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(Yi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Et(),Ie(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=p.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield Qt(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==i?void 0:i.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return td});yield e()}d("Libraries have been loaded and trackers have been set"),yield wr(),yield ur(),d("Page options have been set"),cr(e),d("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=tr(J());if(sr=l,ir(c,e),Di(sr),Fi(sr),yield yr(sr),d("Ads has been loaded",sr),li(e,sr),Xi(sr),null==s?void 0:s.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return Aa});yield t(null===(n=null==e?void 0:e.pageContext)||void 0===n?void 0:n.deviceType,e.finnBlink)}if(null==a?void 0:a.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return ci});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return cd});t(e.rightColumnSplit)}if(null==o?void 0:o.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return fd});yield t(e)}}),Er=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield((e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{initConsentManager:o,getConsentAsync:r}=Pe(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(i=e.pageContext)||void 0===i?void 0:i.countryCode),a=yield rr(e);yield ri(),yield Qi(o),yield Qi(r),d("TCF resolved successfully"),yield kr(a,t),d("Run function resolved successfully")}))(e,t)}),xr={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&"native"!==e.adType&&((e,t)=>{pt(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{(e=>{const{targetId:t}=e,n=`${w(t)}_backfill`,{placements:i,pageContext:{deviceType:o}}=p.get();if(!i[o].some(e=>e.targetId===n))return;const r=document.querySelector(`#${t}`),a=null==r?void 0:r.parentElement;if(!r||!a)return;B(t);const d=`backfill_wrapper_for_${t}`;a.setAttribute("id",d),r.setAttribute("id",n),br({},{contextSelector:`#${d}`})})(e)},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},Cr={publisherClassName:zn.TEK,fullWidthFormatClassName:"netboard"},Ir=(e,t,n,i)=>{var o;const{image:r,icon:a,sponsoredBy:d,title:s,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:k}=e,E=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:E(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=s?s:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return E(t?w:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:E(b),previewVideoSrc:null!=k?k:""},t)},Tr=(e,t)=>{const n=(i=D,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(D),r=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Sr=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(zn).includes(i);n&&r&&Wo(i,e,Go,o)})(o,n),i())},Ar=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(i=Tr(e.targetId,l))&&void 0!==i?i:c,p=wn[t.language||g.NO],v=Ir(d,p,s,t);return(d.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);Sr(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&Jo(e,t)})},Or=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Ar(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Pr=e=>{const{pageContext:{countryCode:t}}=p.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,o=`${h(t)}-adformat`,r=n?n[o]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in se)||window.innerWidth>=se[e]);return{[o]:i?a:r}},jr=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},$r=()=>{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},Lr=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},_r=(e,t)=>Lr(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},Nr=e=>Lr(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class qr{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return Ie(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return Ie(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Dr=9826;class Mr{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===rt.MOBILE?"phone":rt.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return Ie(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 Ie(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 _e()}getExternalUid(){return Ie(this,void 0,void 0,function*(){return yield Le(p.get())})}isTrackingForbidden(){return Ie(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},developerOptions:{testMember:t=Dr}={}}=p.get();return"true"===N("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=p.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return Ie(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get(),{getConsentAsync:i}=Pe(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=p.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}}const Fr=new Mr,Br=Fr.prepare.bind(Fr);function Rr(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=ct();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Ur=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function zr(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Ur.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Vr extends Mr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=Rr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return zr(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Hr=new class extends Vr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,d;const s=p.get(),l=null!==(i=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},c=null!==(a=null===(r=null===(o=s.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(d=s.siteSpecificConfig)||void 0===d?void 0:d.publisherClassName,v=new qr;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(St(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Kt()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{}).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords);const h=v.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:h,user:Object.assign(Object.assign({},Wt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Wr=Hr.prepare.bind(Hr);class Kr extends Mr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP}}=p.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(r=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==r?r:0};var n,i,o,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=p.get(),{appMode:t,mobileOS:n}=Rr(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const Gr=new class extends Kr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;const d=p.get(),s=null!==(i=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},l=null!==(a=null===(r=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new qr;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(St(p.get(),s.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>Ie(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(Kt()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===$e("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),v=!1!==s.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},Wt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Jr=Gr.prepare.bind(Gr),Xr="viewable",Qr="adClick";var Yr=e=>(t,n,i)=>{const{video:o,img:r,url:a}=t,{publisher:d,productTag:s}=n,{pluginsNames:l,videoLoop:c}=i||{};if(!(null==o?void 0:o.content))return null;const u=Math.ceil(1e5*Math.random()),p=r||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${u}`,g=Zr(o.content,a),h=ea({id:u,nodeId:v,poster:p,tagURL:g,publisher:d,productTag:s,videoLoop:c});return ta({playerConfig:h,clickUrl:a,pluginsNames:l}),`${e(t,n,v)}`};const Zr=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.querySelector("ClickThrough"),o=n.querySelector("VideoClicks");if(i){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n.createCDATASection(t))}else if(o){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),o.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},ea=({id:e,nodeId:t,poster:n,tagURL:i,publisher:o="",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:i}}},pulse:{provider:o.toLowerCase(),decorator:e=>Object.assign(Object.assign({},Yn(e)?e:{}),{provider:Object.assign(Object.assign({},Yn(null==e?void 0:e.provider)?e.provider:{}),{productTag:r})})}}),ta=e=>Ie(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:i}=e,{repeat:o}=t,r=yield Wn(t);Gn(n),r.once("assetReady",()=>{Hn(r,n)}),r.on(Xr,e=>{const{viewable:t}=e;t?r.play():r.pause()}),r.on(Qr,()=>{window.open(i,"_blank")}),o&&r.on("pause",()=>{r.play()})}),na=({containerId:e,url:t,body:n,title:i,logo:o,description:r,isContentVideoAd:a=!1})=>{const d=`\n <div class="ad-header">\n <span>${wn.no.adContent}</span>\n ${o?`<img alt="" aria-hidden="true" class="ad-logo" src="${o}" />`:""}\n </div>\n `,s=`\n <div class="ad-text">\n <h3>${i}</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 `};yn('@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}}'),yn('.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}}');const ia={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return wd}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\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">${i}</div>\n </div>\n </div>\n </a>\n </article>`)},oa={default:ia.NATIVE_TEMPLATE,content:({containerId:e,url:t,title:n,img:i,imgWidth:o,imgHeight:r,description:a,logo:d,imgAltText:s},l)=>{const c=vt(o,r);return na({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="${i}" />\n</div>`})},contentVideo:(e,t)=>Yr(({containerId:e,url:t,title:n,logo:i,description:o},r,a)=>na({containerId:e,url:t,title:n,description:o,logo:i,isContentVideoAd:!0,body:`\n<div class="ad-video-wrapper">\n <div id="${a}"></div>\n</div>`}))(e,t),nativeVideo:(e,t)=>Yr(({containerId:e,url:t,sponsoredBy:n,title:i,description:o},r,a)=>(({containerId:e,url:t,sponsoredBy:n,body:i,title:o,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">${wn.no.adFrom} ${n}</div>\n ${i}\n <div class="ad-text">\n <h3>${o}</h3>\n ${r?`<div>${r}</div>`:""}\n </div>\n </a>\n</div>`)({containerId:e,url:t,description:o,sponsoredBy:n,title:i,body:`\n<div class="ad-video-wrapper">\n <div id="${a}"></div>\n</div>`}))(e,t),sponsorstripe:e=>{var{title:t,logo:n}=e;return Ce(e,["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">${t}</span>\n <img alt="" aria-hidden="true" class="ad-logo" src="${n}" />\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>`}},ra={displayTemplates:{default:oa.default,content:oa.content,sponsorstripe:oa.sponsorstripe},videoTemplates:{default:oa.nativeVideo,content:oa.contentVideo}},aa={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r}=e,{pageSetup:a,pageContext:{countryCode:d}}=p.get();if(!a)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=ar(i,o),a=Pr(e),d=jr(n),s=$r(),l=Nr(i),c=_r(i);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:c})})(e);const{tag:{useAppTabletInvCode:s=!0}={}}=a,l=ar(o,s),c=Pr(e),u=jr(i),v=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(l),g=$r(),m=Nr(o),y=_r(o,{safeFrameAutoInitialSize:!0}),f=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,w=(new qr).add(null!=n?n:{}).add(c).add(u).add(null!=v?v:{}).add(m).add(g).addIf(null===(t=null==a?void 0:a.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(d)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:f,invCode:l,keywords:w,rendererOptions:y})},preparePageOptions:e=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Jr(e):Wr(e):yield Br(e)}),siteEvents:xr,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Vn.FRONT,deviceType:r}=null!==(n=null==t?void 0:t.pageContext)&&void 0!==n?n:{},{nativeTrackingConfig:a,appearanceConfig:d}=null!=t?t:{},s={language:g.NO,publisher:zn.TEK,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:d};Ar(e,s,ra)}},da=((e,t)=>({init:n=>Er(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:br,getVideoPPIDs:Xt,createInitNativeAd:Or,getVideoAdsConfig:Fo}))(aa,Cr),sa=yn("[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 la=Object.freeze({__proto__:null,default:sa});yn('.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 ca={Blink:"Blink"},ua=new Map,pa=e=>{var t;if(!ua.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(ca)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw ua.delete(e),t});ua.set(e,t)}return null!==(t=ua.get(e))&&void 0!==t?t:Promise.resolve()},va="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",ga="https://www.finn.no/distribution-front/external/carousel",ha=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:i}}=p.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Wo(n,o,Ko,null!=t?t:i);it({preferredTestIdData:{targetId:e,testId:"finn"}})},ma=e=>{const{pageContext:{publisher:t=""}}=p.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)};var ya=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();le(e)&&Cn(e,t),ce(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:ha,xandrAdLoaded:ma});const fa={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return d(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){d(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){d(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},wa="finn_blink_id",ba=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:i,theme:o}=e,r=Ce(e,["userId","id","hashed_email","theme"]),a=window[ca.Blink];if(!a)return;const d=new a({remote:ga,id:n,hashed_email:i,theme:o});yield d.inject(Object.assign({},r))}),ka=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=Ce(e,["userId","theme"]),o=window[ca.Blink];if(!o)return;const r=new o({remote:ga,userId:t,theme:n});yield r.inject(Object.assign({},i))}),Ea=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},xa=(e,t)=>{const{finnBlink:{enabled:n}={}}=p.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:o,height:r,requireImage:a,theme:d,rec:s,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${Ea(e)}`,enabled:i,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:s,theme:"dark"===d?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},Ca=(e,t,n)=>Ie(void 0,void 0,void 0,function*(){var i;const{placements:o,pageContext:{deviceType:r}}=p.get();d(`rendering finn blink ad for ${e}`);const a=w(e),s=o[r].find(e=>e.targetId===a),l=xa(e,null==s?void 0:s.finnBlink);if(!(null==l?void 0:l.enabled))return d(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void ma(e);if((e=>{var t;const n=Ea(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void d(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:y}={}}=null!=v?v:{},f=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=_e();return null!=e?e:""}return e})(g),k="dark"===y?"dark":"light";try{const e=yield Ie(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=fa.get(wa),n=N("finncode");if(!e||n)return"";if(!t){const t=yield Lt.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return fa.set(wa,n),n}return t}),t=yield Ie(void 0,void 0,void 0,function*(){const{ppid1:e}=Vt.getPPIDs();return e}),n=(null===(i=null==s?void 0:s.finnBlink)||void 0===i?void 0:i.useNewConstructor)?ka:ba;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:k,uuid:h})).then(()=>{ha(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){d(`Finn blink error ${t}`),n&&n(e),!n&&F(e),ma(e)}}),Ia=()=>Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return!!(yield je(e,t,n,"finn-blink"))||(d("Skip loading finn blink ad due to missing TCF consent."),!1)}),Ta=(e,t)=>{var n;(d(`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)):d(`Cannot perform afterend on: ${e.id}`)},Sa=e=>document.querySelector(`#${e}`);var Aa=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>Ie(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=p.get(),i=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=Sa(n);o&&(yield Ci(o,null!=e?e:i))}}),loadFinnBlinkAd:(e,t,n,i)=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=p.get();if(d(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield Ia())||o)return n&&n(e),ma(e),void(!n&&F(e));try{yield pa(va)}catch(e){console.error(e)}yield Ca(e,t,n),i&&i()}),replaceAdsWithFinnBlink:(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;if(!t)return;const{replacementConfig:o}=t,r=null===(n=null==o?void 0:o.adsToReplace)||void 0===n?void 0:n[e],a=null===(i=null==o?void 0:o.sizes)||void 0===i?void 0:i[e];ai()&&r&&a&&t.enabled?(yield Ia())&&(yield pa(va),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=p.get(),n=document.createElement("div"),i=document.createElement("div");return i.id=e,n.appendChild(i),Wo(t,i,Ko),d(`Creating blink container for: ${e}`),n})(t);(e=>{d(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),Ta(n,i),n.dataset.finnBlinkId=t,Ei().withFullAdsChain(e)})):d(`Finn blink configuration is incorrect: ${JSON.stringify(o)}`)})});const Oa=1e4,Pa=e=>e.some(e=>e.some(e=>!!e&&qi(e,0)));let ja;var $a=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=Oa,widescreenIdPrefix:i}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=p.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let r=0,a=Date.now(),d=Pa(o);if(!o.length)return;ja&&window.removeEventListener("scroll",ja);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="")})})(o);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=Pa(o)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=o.map(e=>e[r]),n=o.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);ja=c,window.addEventListener("scroll",c)}});const La="#fff",_a="#0098da",Na=(e,t=!0)=>{(e===qe||e===De)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},qa=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Da=e=>{document.body.style.overflow=e?"initial":"hidden"},Ma=e=>{const t=Ba(e),n=Fa(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Da(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Fa=e=>{const t=()=>Ma(e);return window.addEventListener("advertory:closeTakeover",t),qa(),t},Ba=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Ma(e)};return qa(),window.addEventListener("keydown",t),t},Ra=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Ba(e),Fa(e),qa(),t.addEventListener("click",()=>{Ma(e)}),Da(!1))},Ua=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Fa(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},za=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Ma(e))})(e)},Va=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=p.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=wn.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Ha=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=wn.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Wa=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=wn.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Ka=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=wn.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Ga=()=>{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)},Ja=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${et})()`,e+t.outerHTML})(e)),n};var Xa=Object.freeze({__proto__:null,createTakeoverAd:e=>Ie(void 0,void 0,void 0,function*(){const{takeover:t}=p.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!t)return;const r=Je(e),a=o.offsetHeight,d=window.scrollY>a;o.style.display="block",!d&&Na(r,!1),((e,t)=>{({[qe]:Wa,[Ne]:Va,[De]:Ha,[Me]:Ka})[t](e)})(o,r),Ga(),((e,t)=>{({[qe]:Ua,[De]:Ua,[Ne]:Ra,[Me]:za})[t](e)})(o,r),((e,t,n)=>{if(!n)return;({[qe]:()=>{const{buttonLabel:i}=Ye(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[Ne]:()=>{const{themeColors:i,logotype:o,buttonLabel:r,showArrowIcon:a}=Ye(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&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:La,"important"),n.style.color=null!=t?t:_a}}})},[De]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:r=!0}=Ye(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||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[Me]:()=>{}})[t]()})(o,r,t),yield Xe(),!d&&Na(r,!0),Ze(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=on(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=on(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Ja(t))},modifyTakeoverIframe:(e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);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===i&&n===o||(r.style.width=i,r.style.height=o)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const Qa=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Ya=(e,t,n,i)=>{var o,r;const a=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:d,fullWidthFormatClassName:s}={},fullWidth:l,pageContext:{deviceType:c}}=p.get();if(!a)return;const u=a.parentElement,v=a.querySelector("iframe"),g=null==v?void 0:v.parentElement;if(!v||!g)return;if(a.style.width="100vw",a.style.position="relative",u&&(u.style.width="100vw",u.style.position="relative"),!d||!s)return;const h=`advertory-${d}-${s}`;a.classList.add(`${h}__${i}`),null==u||u.classList.add(`${h}-wrapper__${i}`);const m=null===(r=null===(o=null==l?void 0:l.options)||void 0===o?void 0:o.styles)||void 0===r?void 0:r[c],y=(null==l?void 0:l.enabled)&&m;!y&&u&&(u.style.left="50%",u.style.marginLeft="-50vw"),y&&m.adContainer&&Qa(a,m.adContainer),y&&m.adContainerWrapper&&u&&Qa(u,m.adContainerWrapper);const f=a.offsetWidth,w=f/e.width;g.style.transform=`scale(${w})`,g.style.transformOrigin="left top";const b=Math.round(f/t*n);a.style.height=`${b}px`};var Za=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{Ya(e,1080,1080,"fullsquare-ad")},applyNinesixteenFormat:e=>{Ya(e,1080,1920,"ninesixteen-ad")},prepareContainerForFullWidthFormat:e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=p.get();if(!t||!n||!i)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),o.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))}});const ed=e=>e===g.NO?"schibsted":"schibstedse";var td=Object.freeze({__proto__:null,getCampaign:ed,loadNorstat:()=>Ie(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:i}=p.get(),o=yield je(i,n,t,"norstat");if(!e||n||!o)return;const r=(e=>{const{ppid1:t,ppid2:n}=zt.getPPIDs(),{ppid1:i,ppid2:o}=Vt.getPPIDs(),r=(new Ut).add(n,Nt[e]).add(t,qt[e]).add(o,Dt[e]).add(i,Mt[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{Ie(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${ed(t)}/map/${r}`,"norstat")})});const nd=".advertory-right-column-track",id="--advertory-right-column-track-height",od=e=>e.getBoundingClientRect().top+window.scrollY,rd=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},ad=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},dd=(e,t)=>`${e}-${t}`,sd=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),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=od(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=rd(e);ad("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=od(e),o=dd(id,t),r=i-n,a=dd("--advertory-right-column-split-point-height",t),d=rd(e);ad(o,r),ad(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=dd("--advertory-right-column-ad-height",t),i=rd(e);ad(n,i)})(o[t])});((e,t)=>{const n=od(e);ad(id,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let ld=!1;var cd=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||ld)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=nd}=e,o=document.querySelector(i);if(!o)return;ld=!0;const r=()=>{sd(o,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(o)}});class ud{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class pd{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class vd{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,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 u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(o=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===o||o.call(i,u):(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,u):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,u)})}trackContentClick(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,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===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class gd extends vd{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,r,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=p?p:c,"@type":u,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:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const hd="[data-k5a-teaser-analytics]",md=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new gd(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,i=n.querySelector(hd);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(hd);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.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});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class yd{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[zn.VG]:new ud}[n]||new pd;md(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(d(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}loadKilkayaScript(e){return Ie(this,void 0,void 0,function*(){yield Qt(e)})}run(e){return Ie(this,void 0,void 0,function*(){var t,n;const{tcf:i,pageContext:{isMobileApp:o,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const d=yield je(i,o,r,"kilkaya");d&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(d),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var fd=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const d=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},s=d(r,"data-pulse"),l=d(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},s,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},runKilkaya:e=>Ie(void 0,void 0,void 0,function*(){const t=new yd;yield t.run(e)})});yn('.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)}}');var wd=Object.freeze({__proto__:null});module.exports=da;
|