@schibsted/advertory 3.6.1 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ad-native/cjs/index.js +1 -1
- package/ad-native/es/index.js +1 -1
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/{_auto-entry_aftenposten-VJl6kH1P.js → _auto-entry_aftenposten-B_BPbr0O.js} +1 -1
- package/aftenposten/es/{events-B5RM8jW6.js → events-DEPElncd.js} +1 -1
- package/aftenposten/es/{index-CDM1IaIS.js → index-7T8duSZh.js} +1 -1
- package/aftenposten/es/{index-D2dbWms6.js → index-B3-BKjDO.js} +1 -1
- package/aftenposten/es/{index-DNFh5FAD.js → index-BZAwWcd6.js} +1 -1
- package/aftenposten/es/{index-su7IPipB.js → index-BdKvQ0V0.js} +1 -1
- package/aftenposten/es/{index-B__Dpqvh.js → index-Bw5RcYmz.js} +1 -1
- package/aftenposten/es/{index-CONMPckJ.js → index-Cf9FnhT1.js} +1 -1
- package/aftenposten/es/index-Cz3Vwq1j.js +1 -0
- package/aftenposten/es/{index-B6QAjBvR.js → index-NjSp4_J7.js} +1 -1
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-CWiioa34.js → styles-B8UY0MRg.js} +1 -1
- package/aftenposten/es/{styles-BRn2zJHE.js → styles-BBhzyr5X.js} +1 -1
- package/aftenposten/es/{styles-CTBKdUIL.js → styles-Bt_FFBC5.js} +1 -1
- package/aftenposten/es/{styles-CIxWERzs.js → styles-C2s1sQqh.js} +1 -1
- package/aftenposten/es/{styles-CqxXjfHa.js → styles-CEo2pUlL.js} +1 -1
- package/aftenposten/es/styles-CegKTB5g.js +1 -0
- package/aftenposten/es/{styles-Be5PYtkZ.js → styles-CzhDxdLn.js} +1 -1
- package/aftenposten/es/{styles-BBt4KD02.js → styles-DL3wy5Px.js} +1 -1
- package/aftenposten/es/{styles-DWdDrY-O.js → styles-mYRA-2Fy.js} +1 -1
- package/aftenposten/es/{styles-DFHNacfS.js → styles-tdsjiqGw.js} +1 -1
- package/aftenpostenv2/es/{_auto-entry_aftenpostenv2-B_DtTS1M.js → _auto-entry_aftenpostenv2-DOpOcaIn.js} +1 -1
- package/aftenpostenv2/es/{events-DrxvzNXg.js → events-CfjD6qUf.js} +1 -1
- package/aftenpostenv2/es/{index-9Kid7k_C.js → index-B1P18LiS.js} +1 -1
- package/aftenpostenv2/es/{index-rudxuClT.js → index-BHue36WX.js} +1 -1
- package/aftenpostenv2/es/{index-DnXz680Z.js → index-BIUHS3rh.js} +1 -1
- package/aftenpostenv2/es/{index-B7A1C2D9.js → index-C4xk-r_q.js} +1 -1
- package/aftenpostenv2/es/{index-CbDB57zz.js → index-CFuBNzsS.js} +1 -1
- package/aftenpostenv2/es/{index-D3tt0RrI.js → index-Cw6cYxkT.js} +1 -1
- package/aftenpostenv2/es/{index-CyrhgCEc.js → index-DqdOJeiM.js} +1 -1
- package/aftenpostenv2/es/index-tFuZyfhJ.js +1 -0
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-GMxRxdSJ.js → styles-A9lTECJS.js} +1 -1
- package/aftenpostenv2/es/{styles-Du9AzJeF.js → styles-Bb-4tRfG.js} +1 -1
- package/aftenpostenv2/es/{styles-BDFvm4sB.js → styles-Bx9I_Cmf.js} +1 -1
- package/aftenpostenv2/es/{styles-SF9ysHMS.js → styles-CKNcxq8O.js} +1 -1
- package/aftenpostenv2/es/{styles-CaeTVoS5.js → styles-C_9E2YSe.js} +1 -1
- package/aftenpostenv2/es/{styles-CXDQgQ1S.js → styles-D39u2sMy.js} +1 -1
- package/aftenpostenv2/es/styles-DCJ_pKVA.js +1 -0
- package/aftenpostenv2/es/{styles-DTdGNcFI.js → styles-DEPP_LzG.js} +1 -1
- package/aftenpostenv2/es/{styles-CYju_Lts.js → styles-DXS74GTb.js} +1 -1
- package/aftenpostenv2/es/{styles-BLrjwcDJ.js → styles-MzFZ5img.js} +1 -1
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/{_auto-entry_aftonbladet-CLHZL584.js → _auto-entry_aftonbladet-CgYFuEX7.js} +1 -1
- package/aftonbladet/es/{events-CVUuNemE.js → events-RrjLAkCW.js} +1 -1
- package/aftonbladet/es/{index-DstHMnaq.js → index-2_YAy_Qz.js} +1 -1
- package/aftonbladet/es/{index-ChMaHyiH.js → index-7rdJuYRn.js} +1 -1
- package/aftonbladet/es/{index-Ci4nl23a.js → index-BharLKc9.js} +1 -1
- package/aftonbladet/es/{index-C_NY28Q6.js → index-CCHE-PN3.js} +1 -1
- package/aftonbladet/es/index-CKEXIu2l.js +1 -0
- package/aftonbladet/es/{index-DPLlIuC6.js → index-DAoZZ5wD.js} +1 -1
- package/aftonbladet/es/{index-yKb9bKCi.js → index-DV8VTqxL.js} +1 -1
- package/aftonbladet/es/{index-kz99RnA7.js → index-WLHb5GJa.js} +1 -1
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-CKwOI1T0.js → styles-B8Qyekd_.js} +1 -1
- package/aftonbladet/es/{styles-CKOWafZ_.js → styles-BpAuUGiF.js} +1 -1
- package/aftonbladet/es/{styles-SCh_SgKx.js → styles-CEbYZvDS.js} +1 -1
- package/aftonbladet/es/{styles-CN0Ytpao.js → styles-CUDH03bl.js} +1 -1
- package/aftonbladet/es/{styles-htFIC3u2.js → styles-Dc04X8ru.js} +1 -1
- package/aftonbladet/es/{styles-B6hZnXPr.js → styles-DrbMt2M3.js} +1 -1
- package/aftonbladetv2/es/{_auto-entry_aftonbladetv2-DwS2J_BG.js → _auto-entry_aftonbladetv2-DZco0Woh.js} +1 -1
- package/aftonbladetv2/es/{events-G7YungJd.js → events-CPL3rM9v.js} +1 -1
- package/aftonbladetv2/es/index-B1qogrV_.js +1 -0
- package/aftonbladetv2/es/{index-BZS2JtGY.js → index-BAXBBxp-.js} +1 -1
- package/aftonbladetv2/es/{index-oPGQah_E.js → index-CVOg4MtZ.js} +1 -1
- package/aftonbladetv2/es/{index-Cd9yhV10.js → index-DF1RhNUX.js} +1 -1
- package/aftonbladetv2/es/{index-B7FEb20l.js → index-Da0I71bo.js} +1 -1
- package/aftonbladetv2/es/{index-hsmW7gH2.js → index-DdWbIaIV.js} +1 -1
- package/aftonbladetv2/es/{index-o7a3A_Ff.js → index-HlMrzQEW.js} +1 -1
- package/aftonbladetv2/es/{index-D_QwfM4N.js → index-Lvx32Flj.js} +1 -1
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-Bk6ksSKw.js → styles-BOjgx6uS.js} +1 -1
- package/aftonbladetv2/es/{styles-ckdyU8zt.js → styles-By4PZHDv.js} +1 -1
- package/aftonbladetv2/es/{styles-CKiyGuIt.js → styles-C74KoY--.js} +1 -1
- package/aftonbladetv2/es/{styles-19zEQhCM.js → styles-DPzMqZTR.js} +1 -1
- package/aftonbladetv2/es/{styles-S9NnBrhl.js → styles-DgcvHi4h.js} +1 -1
- package/aftonbladetv2/es/{styles-Cxn3chIi.js → styles-WtRh4e1n.js} +1 -1
- package/bt/cjs/index.js +1 -1
- package/bt/es/{_auto-entry_bt-CjTCioLv.js → _auto-entry_bt-Bfl5VGAm.js} +1 -1
- package/bt/es/{events-BeO-GFyo.js → events-Ia5zwXTd.js} +1 -1
- package/bt/es/index-BOrjnphM.js +1 -0
- package/{sa/es/index-CnNjtNr4.js → bt/es/index-BY9sjUqa.js} +1 -1
- package/bt/es/{index-DYNTq6po.js → index-Cau5SxaW.js} +1 -1
- package/bt/es/{index-B-8lGqpN.js → index-CftlOrIh.js} +1 -1
- package/bt/es/{index-CYSfht_S.js → index-DhBf7Abu.js} +1 -1
- package/bt/es/{index-C56PYI3T.js → index-DqEkBDo7.js} +1 -1
- package/bt/es/{index-DwWVay7g.js → index-Mhm6cg2J.js} +1 -1
- package/bt/es/{index-BmWq8TVz.js → index-rc9fnSTs.js} +1 -1
- package/bt/es/index.js +1 -1
- package/bt/es/{styles-7-Oe9F3H.js → styles-62NXUs_6.js} +1 -1
- package/bt/es/{styles-BGgYsM9V.js → styles-CXznAUNR.js} +1 -1
- package/bt/es/{styles-0rswQvzL.js → styles-CadK3pg1.js} +1 -1
- package/bt/es/{styles-D6hOeYB3.js → styles-DA93a-QG.js} +1 -1
- package/bt/es/{styles-_ij08LKw.js → styles-DSDx5xao.js} +1 -1
- package/{sa/es/styles-D9S162It.js → bt/es/styles-DaFVngO7.js} +1 -1
- package/bt/es/styles-Lyx2HwiJ.js +1 -0
- package/bt/es/{styles-Dwr_giWW.js → styles-QwOdMH_7.js} +1 -1
- package/{sa/es/styles-BiIfV7Uj.js → bt/es/styles-vnBfbs8q.js} +1 -1
- package/btv2/es/{_auto-entry_btv2-Bt-1RKGu.js → _auto-entry_btv2-Bv3tgqvD.js} +1 -1
- package/btv2/es/{events-C3q6_6fs.js → events-BDeYnOwd.js} +1 -1
- package/btv2/es/{index-CEOCKxia.js → index-BNrF_FNO.js} +1 -1
- package/btv2/es/index-C8XccOQ6.js +1 -0
- package/btv2/es/{index-C31hm8Ok.js → index-CMnZbhwL.js} +1 -1
- package/btv2/es/{index-B6SJsHIw.js → index-D1rfxBSt.js} +1 -1
- package/btv2/es/{index-D-BWFyxo.js → index-Du70vfz0.js} +1 -1
- package/btv2/es/{index-B1jIs2JK.js → index-DwIFpfE4.js} +1 -1
- package/btv2/es/{index-DHnPG72-.js → index-_7LpYvsT.js} +1 -1
- package/btv2/es/{index-CsoVZO0O.js → index-ykqV1N0u.js} +1 -1
- package/btv2/es/index.js +1 -1
- package/btv2/es/{styles-BEdCBiAk.js → styles-B1yJvxkd.js} +1 -1
- package/{sav2/es/styles-JZ4uEkKr.js → btv2/es/styles-BDsr3hvh.js} +1 -1
- package/{vgv2/es/styles-BgnWZHu-.js → btv2/es/styles-BQv56SB9.js} +1 -1
- package/{sav2/es/styles-cfa7CUNF.js → btv2/es/styles-BYi5jM4f.js} +1 -1
- package/btv2/es/{styles-yUz_zqBH.js → styles-C1GGyRho.js} +1 -1
- package/{sav2/es/styles-BlDIJcLO.js → btv2/es/styles-DWItgO5j.js} +1 -1
- package/{sav2/es/styles-CNtzh0RT.js → btv2/es/styles-DuUfGkR5.js} +1 -1
- package/{sav2/es/styles-B2ItfqWM.js → btv2/es/styles-_fmUcLzC.js} +1 -1
- package/e24/es/_auto-entry_e24-DwDAEyKl.js +1 -0
- package/e24/es/{events-CV7Nyi5R.js → events-Bcpm7uOB.js} +1 -1
- package/{svd/es/index-DIJkVm2E.js → e24/es/index-B67yEYTY.js} +1 -1
- package/e24/es/{index-B48cgne3.js → index-BVRfqTfp.js} +1 -1
- package/e24/es/{index-m-TCQOyI.js → index-D0d5obz9.js} +1 -1
- package/e24/es/{index-B2lLyLWh.js → index-DMud806Q.js} +1 -1
- package/e24/es/{index-DLg2g3do.js → index-DedGW-1U.js} +1 -1
- package/e24/es/{index-Cu48Zu80.js → index-DpYA-FDE.js} +1 -1
- package/e24/es/{index-BaN2Q1lj.js → index-PunRD0FW.js} +1 -1
- package/e24/es/{index-DERAxCZc.js → index-VNJfzE9l.js} +1 -1
- package/e24/es/index.js +1 -1
- package/{tv4/es/styles-DWvl-TOk.js → e24/es/styles-BhsWfh2D.js} +1 -1
- package/e24/es/styles-BwOBWsQC.js +1 -0
- package/e24/es/{styles-Cb2xCUmz.js → styles-CYizcnvl.js} +1 -1
- package/e24/es/{styles-CBYf9N2C.js → styles-Cdonyaqo.js} +1 -1
- package/e24/es/{styles-TO5Sq19h.js → styles-Cez0eh19.js} +1 -1
- package/e24/es/{styles-CTqe4Pmm.js → styles-ChKCp_TQ.js} +1 -1
- package/e24/es/{styles-C_dc7D9a.js → styles-Cw6kf6Sw.js} +1 -1
- package/e24/es/{styles-D7b9W06q.js → styles-D8Kpyb6u.js} +1 -1
- package/e24/es/{styles-CnK-eRai.js → styles-DKYE97aX.js} +1 -1
- package/e24/es/{styles-BAcLV-tu.js → styles-ObndgjDP.js} +1 -1
- package/e24/es/{styles-Ca2mVCxL.js → styles-zG8trG-A.js} +1 -1
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/{_auto-entry_fotbollskanalen-Co_cuPlx.js → _auto-entry_fotbollskanalen-DwO2nnh5.js} +1 -1
- package/fotbollskanalen/es/{events-DBg_zIYG.js → events-BtEcG9Ft.js} +1 -1
- package/fotbollskanalen/es/{index-DZdC9wBQ.js → index-B0tDCwlS.js} +1 -1
- package/fotbollskanalen/es/{index-BTUlj770.js → index-B5Y8bEE5.js} +1 -1
- package/fotbollskanalen/es/{index-DADqrroq.js → index-BHROA4NL.js} +1 -1
- package/fotbollskanalen/es/{index-ChFOejcR.js → index-BVqrnA4N.js} +1 -1
- package/fotbollskanalen/es/{index-Bq0AfPil.js → index-BcyDyM7W.js} +1 -1
- package/fotbollskanalen/es/{index-fLcE0Msq.js → index-CUuDiVdL.js} +1 -1
- package/fotbollskanalen/es/{index-CKpoLuec.js → index-DKlR0uba.js} +1 -1
- package/fotbollskanalen/es/{index-CuPrhNxY.js → index-YFM5Uc87.js} +1 -1
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-Cp8g7ozZ.js → styles-CONqbIOt.js} +1 -1
- package/godt/cjs/index.js +1 -1
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.js +1 -1
- package/koket/es/{_auto-entry_koket-D2fXW6yT.js → _auto-entry_koket-DKjh2I7a.js} +1 -1
- package/koket/es/{events-D-TkTKPw.js → events-D1bwVPuT.js} +1 -1
- package/koket/es/index-0gZOJL8S.js +1 -0
- package/koket/es/{index-CPapd7ZW.js → index-B9SY_iTY.js} +1 -1
- package/{svdv2/es/index-B_7xpp4t.js → koket/es/index-BTWfthnM.js} +1 -1
- package/koket/es/{index-h85v3BiN.js → index-CrvVz9qf.js} +1 -1
- package/koket/es/{index-BD7MxZie.js → index-DWv2jU19.js} +1 -1
- package/koket/es/{index-DI4G1ek-.js → index-D__2JwcN.js} +1 -1
- package/koket/es/{index-DTQGHXgs.js → index-DocuE7Fp.js} +1 -1
- package/koket/es/{index-CThUTJHh.js → index-ZC4qEo5b.js} +1 -1
- package/koket/es/index.js +1 -1
- package/{svdv2/es/styles-80-o0G8W.js → koket/es/styles-us9Z07sa.js} +1 -1
- package/minmote/cjs/index.js +1 -1
- package/package.json +1 -1
- package/pent/cjs/index.js +1 -1
- package/sa/cjs/index.js +1 -1
- package/sa/es/{_auto-entry_sa-B_3a7YQB.js → _auto-entry_sa-DQmzibez.js} +1 -1
- package/sa/es/{events-1bZZbRup.js → events-bh5YdSrm.js} +1 -1
- package/sa/es/{index-fThKfDxZ.js → index-3_UtN6Xv.js} +1 -1
- package/{vg/es/index-Dm3-sr_M.js → sa/es/index-B-VH0hsy.js} +1 -1
- package/sa/es/{index-BNU_vPCS.js → index-CSN2_g0X.js} +1 -1
- package/sa/es/{index-DFMIt6cf.js → index-DBg0hXcV.js} +1 -1
- package/sa/es/{index-BwU86nMF.js → index-DI6kO9XJ.js} +1 -1
- package/sa/es/index-DphfxfjA.js +1 -0
- package/sa/es/{index-BQ8uCmuK.js → index-Ty9hdF-F.js} +1 -1
- package/{bt/es/index-BzAC6FNs.js → sa/es/index-sWkTjMbA.js} +1 -1
- package/sa/es/index.js +1 -1
- package/{bt/es/styles-_T3JoASN.js → sa/es/styles-0LvAnkqM.js} +1 -1
- package/sa/es/{styles-DReP-GDL.js → styles-2fKWn5no.js} +1 -1
- package/sa/es/{styles-BpG_OZha.js → styles-4EGHfZhs.js} +1 -1
- package/sa/es/styles-8Qvx-NJB.js +1 -0
- package/sa/es/{styles-B9vjNfTT.js → styles-B4LbaOsh.js} +1 -1
- package/{vg/es/styles-CorC2Xup.js → sa/es/styles-C2qJqAGf.js} +1 -1
- package/{vg/es/styles-CoYb_9LY.js → sa/es/styles-CMoEIIXN.js} +1 -1
- package/sa/es/{styles-CMyA169H.js → styles-CQE9QWU1.js} +1 -1
- package/sa/es/{styles-CBW4KoK-.js → styles-Cs7syE21.js} +1 -1
- package/sav2/es/{_auto-entry_sav2-CjfDiHwx.js → _auto-entry_sav2-DFDAeFry.js} +1 -1
- package/sav2/es/{events-DzcmehaK.js → events-DcXJ7HLh.js} +1 -1
- package/sav2/es/{index-mFvrsT_4.js → index-BRqpesdv.js} +1 -1
- package/sav2/es/{index-CkvtE6W0.js → index-Bk8p0mN0.js} +1 -1
- package/sav2/es/index-BkzDUn2e.js +1 -0
- package/sav2/es/{index-CgcI3I9G.js → index-BtKd0L9t.js} +1 -1
- package/sav2/es/{index-D7LinXaK.js → index-DKWdgoNo.js} +1 -1
- package/sav2/es/{index-B69vU2-7.js → index-DTaRUTsB.js} +1 -1
- package/sav2/es/{index-DrtxK0K-.js → index-DzH8KZfg.js} +1 -1
- package/sav2/es/{index-CX7GFX1l.js → index-L2LqrJfQ.js} +1 -1
- package/sav2/es/index.js +1 -1
- package/{vgv2/es/styles-DwfzY8Za.js → sav2/es/styles--4yIwH8E.js} +1 -1
- package/{btv2/es/styles-Cf1qLn3t.js → sav2/es/styles-BPTfepWW.js} +1 -1
- package/{btv2/es/styles-lB1yzUC1.js → sav2/es/styles-BPg8JO5T.js} +1 -1
- package/{btv2/es/styles-0Qus5qSm.js → sav2/es/styles-Ctgl6vU-.js} +1 -1
- package/sav2/es/{styles-DICJLzOO.js → styles-D8ibCySe.js} +1 -1
- package/{btv2/es/styles-DSKxNMh0.js → sav2/es/styles-DPU18A5x.js} +1 -1
- package/sav2/es/{styles-bv7MF9fS.js → styles-DVa9k_i5.js} +1 -1
- package/sav2/es/{styles-LTzZWH01.js → styles-DbTNvCN-.js} +1 -1
- package/svd/cjs/index.js +1 -1
- package/svd/es/{_auto-entry_svd-DU31Fb4h.js → _auto-entry_svd-NI-qSGGY.js} +1 -1
- package/svd/es/{events-BO0g9F9A.js → events-COQgRVv3.js} +1 -1
- package/{tv4/es/index-CZ6WDBCb.js → svd/es/index-BQsnq5Ee.js} +1 -1
- package/svd/es/{index-BqdriXBS.js → index-BiXZUWBn.js} +1 -1
- package/svd/es/{index-CTwoj55M.js → index-Bnrx8HWO.js} +1 -1
- package/svd/es/{index-5BPXxOOC.js → index-CNRdaxjK.js} +1 -1
- package/svd/es/{index-DlyvMW44.js → index-DPBUBkoD.js} +1 -1
- package/svd/es/{index-CHJmnN0e.js → index-De57Uv5I.js} +1 -1
- package/svd/es/{index-C5FTuT0m.js → index-DmBQDCkO.js} +1 -1
- package/svd/es/{index-Dvu5WrFJ.js → index-l-OA3hIj.js} +1 -1
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-oJSd7SDH.js → styles-Bh7zevCw.js} +1 -1
- package/svd/es/{styles-BPNOniHo.js → styles-C7vktpE6.js} +1 -1
- package/svd/es/{styles-D6DZfUQd.js → styles-CauhafZA.js} +1 -1
- package/svd/es/{styles-BTbphRWx.js → styles-DWL27JWY.js} +1 -1
- package/svd/es/{styles-DwMpZXCn.js → styles-Es4_OUgo.js} +1 -1
- package/svd/es/{styles-CNyb6YLd.js → styles-TsYQ-9NX.js} +1 -1
- package/svdv2/es/{_auto-entry_svdv2-BTl8kiwb.js → _auto-entry_svdv2-DPKVS3JP.js} +1 -1
- package/svdv2/es/{events-BWbzdmqd.js → events-COyRa6Ks.js} +1 -1
- package/svdv2/es/{index-Cb11Pgtu.js → index-B5QH3Xfl.js} +1 -1
- package/svdv2/es/{index-CWpZR2yJ.js → index-Cb4XUnoa.js} +1 -1
- package/svdv2/es/{index-BofBgtya.js → index-IsfkxTAp.js} +1 -1
- package/svdv2/es/{index-CQO28JNR.js → index-LZBwA0Gx.js} +1 -1
- package/svdv2/es/{index-B2tcd-Le.js → index-U6vPQocj.js} +1 -1
- package/svdv2/es/{index-C3d3jjlm.js → index-UqEiyv7y.js} +1 -1
- package/{koket/es/index-BP2NVW26.js → svdv2/es/index-oM6ndZE6.js} +1 -1
- package/svdv2/es/{index-vVw4-biG.js → index-siGGjZGd.js} +1 -1
- package/svdv2/es/index.js +1 -1
- package/{koket/es/styles--KYUiCRL.js → svdv2/es/styles-CjlPJ3nZ.js} +1 -1
- package/svdv2/es/{styles-Bj4XR0sZ.js → styles-D2vfWCTi.js} +1 -1
- package/svdv2/es/{styles-BLFupVGY.js → styles-DBx2toB9.js} +1 -1
- package/svdv2/es/{styles-CEFjvei7.js → styles-DeGuC1Q-.js} +1 -1
- package/svdv2/es/{styles-DMxmRnrb.js → styles-Dipexffb.js} +1 -1
- package/svdv2/es/{styles-D3gCFHZ1.js → styles-rWWE-r8u.js} +1 -1
- package/tek/cjs/index.js +1 -1
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/{_auto-entry_tv4-DsTAgZ2X.js → _auto-entry_tv4-CpBkVDZq.js} +1 -1
- package/tv4/es/{events-CgT1MLld.js → events-Cr68QZkT.js} +1 -1
- package/tv4/es/{index-31-m08q_.js → index-7sixGKzI.js} +1 -1
- package/tv4/es/{index-CV84DBVJ.js → index-Cb30H6No.js} +1 -1
- package/tv4/es/index-CitRFOF-.js +1 -0
- package/tv4/es/{index-CmqJC6Lb.js → index-Ckfq1edP.js} +1 -1
- package/tv4/es/{index-B-znafA_.js → index-D58hSF5V.js} +1 -1
- package/tv4/es/{index-Dq7S1gRn.js → index-DRLKjYME.js} +1 -1
- package/tv4/es/{index-CMyEWSO_.js → index-_wsBYP9p.js} +1 -1
- package/{e24/es/index-DPyRXJJr.js → tv4/es/index-bkiytqYr.js} +1 -1
- package/tv4/es/index.js +1 -1
- package/{e24/es/styles-BD7bGec1.js → tv4/es/styles-BvCP_UZj.js} +1 -1
- package/tvnu/cjs/index.js +1 -1
- package/vg/cjs/index.js +1 -1
- package/vg/es/_auto-entry_vg-C9zobrTw.js +1 -0
- package/vg/es/{events-0vR3xIs1.js → events-CQtp1ox1.js} +1 -1
- package/vg/es/{index-BfNe-Ao1.js → index-7yueVsN5.js} +1 -1
- package/vg/es/{index-BalUhoz6.js → index-Beg4dKDr.js} +1 -1
- package/{sa/es/index-CLH8Qjtm.js → vg/es/index-CAEhGE5S.js} +1 -1
- package/vg/es/{index-DZPudLY0.js → index-DXv4Ogy1.js} +1 -1
- package/vg/es/{index-BWERmB2u.js → index-Dkr0F9Sj.js} +1 -1
- package/vg/es/{index-CjVeVcpc.js → index-Dq4CLAF1.js} +1 -1
- package/vg/es/{index-Bd6yRWIc.js → index-pQrYLbC4.js} +1 -1
- package/vg/es/{index-DC868ePU.js → index-r2enATIQ.js} +1 -1
- package/vg/es/index.js +1 -1
- package/vg/es/{styles-De9d4Cp6.js → styles-7q_Z9LE4.js} +1 -1
- package/{bt/es/styles-geaFNfJE.js → vg/es/styles-Aeg1GvqE.js} +1 -1
- package/vg/es/{styles-A4zJS7eG.js → styles-B9GISZmI.js} +1 -1
- package/vg/es/{styles-CrV34WLU.js → styles-BM80RQFS.js} +1 -1
- package/vg/es/{styles-C3gmkM_s.js → styles-BTajZ2XW.js} +1 -1
- package/vg/es/{styles-Da8ynrNG.js → styles-C9GWUf8D.js} +1 -1
- package/vg/es/{styles-COlABQjp.js → styles-CI3RZ50F.js} +1 -1
- package/vg/es/{styles-Cmnf-qNi.js → styles-CRuGmkFL.js} +1 -1
- package/vg/es/{styles-Kcwxqr0K.js → styles-CU6clz2b.js} +1 -1
- package/vg/es/{styles-BJH7_P0J.js → styles-Ca_HNswJ.js} +1 -1
- package/vg/es/{styles-C-lUXxFq.js → styles-Co4OrjMv.js} +1 -1
- package/vg/es/{styles-C_W192tN.js → styles-D42GA45q.js} +1 -1
- package/vg/es/{styles-Ub1hN6yM.js → styles-KAXRBqd7.js} +1 -1
- package/{sa/es/styles-Bhm5-X9p.js → vg/es/styles-T06YQ5gK.js} +1 -1
- package/vg/es/{styles-DEChtU6L.js → styles-eoaCG6u_.js} +1 -1
- package/vgv2/es/_auto-entry_vgv2-DYB61ujn.js +1 -0
- package/vgv2/es/{events-BjskCMFc.js → events-B2OTdfpX.js} +1 -1
- package/vgv2/es/{index-CAUOKSgB.js → index-BgBK8Epz.js} +1 -1
- package/vgv2/es/{index-DCp57s49.js → index-Bk3L7kKe.js} +1 -1
- package/vgv2/es/{index-CJeH7k4o.js → index-BtqA47df.js} +1 -1
- package/vgv2/es/{index-BEo0M4sT.js → index-CsXabYqg.js} +1 -1
- package/vgv2/es/{index-D-QcNA1l.js → index-DFd1e8Q5.js} +1 -1
- package/vgv2/es/{index-BWBs-BUL.js → index-DNz12be8.js} +1 -1
- package/vgv2/es/{index-CXrWM2Lu.js → index-DUT-6rZ-.js} +1 -1
- package/vgv2/es/{index-BWg5yQGR.js → index-DtEvjc7T.js} +1 -1
- package/vgv2/es/index.js +1 -1
- package/vgv2/es/{styles-tavpLzfS.js → styles-7mI98jvS.js} +1 -1
- package/vgv2/es/{styles-Dk-FWe9k.js → styles-BcccslRC.js} +1 -1
- package/vgv2/es/{styles-_iUR0I-k.js → styles-Bx0JvuTT.js} +1 -1
- package/vgv2/es/{styles-CA7LJEeK.js → styles-C4L-ktth.js} +1 -1
- package/vgv2/es/{styles-CSgl3Vk6.js → styles-CQS-mKoj.js} +1 -1
- package/vgv2/es/{styles-D_AzE-yk.js → styles-CcUkS66O.js} +1 -1
- package/{btv2/es/styles-BdmiegzV.js → vgv2/es/styles-CwXxEuHa.js} +1 -1
- package/vgv2/es/{styles-DmltAsfb.js → styles-D70YdS3s.js} +1 -1
- package/vgv2/es/{styles-N4rzQriS.js → styles-DFtq7Nv-.js} +1 -1
- package/vgv2/es/{styles-BFpSjY-J.js → styles-DKKTxAjC.js} +1 -1
- package/vgv2/es/{styles-puIJrOvH.js → styles-DjRV2AM1.js} +1 -1
- package/{btv2/es/styles-DnC_upKw.js → vgv2/es/styles-cvPBDcoH.js} +1 -1
- package/vgv2/es/{styles-DfmrbNAd.js → styles-yZFBHTA3.js} +1 -1
- package/vgv2/es/{styles-DSiB1oxa.js → styles-yjVOodB8.js} +1 -1
- package/vgv2/es/{styles-3dxGypnv.js → styles-z-UBZF2N.js} +1 -1
- package/aftenposten/es/index-BYOofh4E.js +0 -1
- package/aftenposten/es/styles-BMdispDx.js +0 -1
- package/aftenpostenv2/es/index-DG7q8MSq.js +0 -1
- package/aftenpostenv2/es/styles-Ceuvssoq.js +0 -1
- package/aftonbladet/es/index-U7B1ByTi.js +0 -1
- package/aftonbladetv2/es/index-rAjYNY57.js +0 -1
- package/bt/es/index-CCR1kirJ.js +0 -1
- package/bt/es/styles-BJzIPPro.js +0 -1
- package/btv2/es/index-BHWLTRWF.js +0 -1
- package/e24/es/_auto-entry_e24-DN9jCNie.js +0 -1
- package/e24/es/styles-gYg7p6Jk.js +0 -1
- package/koket/es/index-BfHVWlyI.js +0 -1
- package/sa/es/index-Bdt9nK7I.js +0 -1
- package/sa/es/styles-DSIXbYbL.js +0 -1
- package/sav2/es/index-DtsmJuT5.js +0 -1
- package/tv4/es/index-D_lloPru.js +0 -1
- package/vg/es/_auto-entry_vg-CcnJRfNC.js +0 -1
- package/vgv2/es/_auto-entry_vgv2-DPZxVVXK.js +0 -1
package/godt/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n=require("react/jsx-runtime");function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var 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===o}(e)}(e)},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(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 i(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 o={};return n.isMergeableObject(e)&&a(e).forEach(function(t){o[t]=i(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])?o[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):o[r]=i(t[r],n))}),o}function l(e,t,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||n,o.cloneUnlessOtherwiseSpecified=i;var a=Array.isArray(t);return a===Array.isArray(e)?a?o.arrayMerge(e,t,o):s(e,t,o):i(t,o)}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}(),r=o(i);const a=["placements","takeover","refreshConfig","editory"],d={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))},l=(e,t)=>{console.warn("[Advertory WARN]: ",e)},c=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:o,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||l("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||l("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||l("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||l("pageContext.deviceType is required."),n||l("pageOptions is required."),o||l("placements is required."),(null==i?void 0:i.defaultThreshold)||l("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,o;const i=e.pageSectionsSelectors,r=[{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===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of r)e&&!(null==i?void 0:i[t])&&l(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},u=6;class p{set(e){c(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of a){const o=e[n];void 0!==o&&(t[n]=o)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=r(p.DEFAULT_SITE_HANDLERS,e)}}p.DEFAULT_SITE_HANDLERS={siteEvents:d,initNativeAd:()=>{}};const v=new p,g=v.modifyConfigProperties.bind(v),h={NO:"no",SE:"se"},m=e=>e===h.NO?"no-sno":"se-generic";let y="";const f=new Map,w=e=>{const{pageSetup:{tag:t}={}}=v.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(y!==window.location.pathname&&(f.clear(),y=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),o=null!==(t=f.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=v.get();return`${e}-${t}`})()}-count`]=o,f.set(n,o+1),e})):e},b=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},k="0123456789abcdefghijklmnopqrstuvwxyz",x=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=k[Math.floor(36*Math.random())]}return t},I=e=>{window.apntag.anq.push(e)},C=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),E=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})}),T="advertory-wallpaper-background",A="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${T}`);e&&e.remove()},P=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${T}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},O=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,j=e=>O.test(e),$=e=>e.startsWith("wallpaper:color:"),L=e=>{const t=document.querySelector(`.${T}`);t&&(t.style.backgroundImage=`url(${e})`)},_=e=>{const t=document.querySelector(`.${T}`);t&&(t.style.backgroundColor=e)};var N=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(A),n.classList.add(A))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(T),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&&(P(n),window.addEventListener("scroll",()=>P(n)))})(n),e()},isShortWallpaperColorMessage:$,isShortWallpaperUrlMessage:j,removeWallpaperBackground:S,setWallpaperBackgroundColor:_,setWallpaperBackgroundImage:L});const q=e=>new URLSearchParams(window.location.search).get(e),M="takeover",D="native_override_desc2",B=e=>window.location.href.includes(e),F=()=>null!==q("disable_prebid"),R=e=>{if("0"===q("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())},U=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 V{initialize(){this.DATA=Object.assign({},V.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)}}V.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const z=new V,H=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,o=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${o}px`)},W=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:o}=(e=>{const t=z.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=o},K=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{R(e.id),W(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),o=null==t?void 0:t.getAttribute("data-probable-width");n&&o&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",o+"px"))})(e.id),e.innerHTML="",e.id=b(e.id)}),I(()=>window.apntag.clearRequest())},G="mobile",J="tablet",X="desktop",Q="web_desktop",Y="web_phone",Z="wde",ee="wph",te="noGroupedPlacements",ne=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},oe=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},ie=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:o,pageContext:{deviceType:i}}=v.get(),r=((e,t)=>{var n;const o=null!==(n=e[t])&&void 0!==n?n:[];return t===J&&0===o.length?e[X]:o})(n,i),a=r.filter(oe),d=e?document.querySelector(e):document;if(!d)return[];const s=a.reduce((e,t)=>{const n=ne(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=a.filter(({targetId:e})=>e.match(t)),r=(null==o?void 0:o.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${i}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=d.querySelectorAll(r),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var o;const i=re(e,t,n),r=i.finnBlink&&!i.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(o=i.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink),d=`${e.id}-${x(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&&z.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},i),{targetId:d})});return w(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)},re=(e,t,n)=>{const o=n[t],i=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:r||i},ae=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=v.get(),o=(null==t?void 0:t[n])||{},i=Object.values(o).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=b(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[o,i]of Object.entries(t))n[o]=e.filter(e=>i.includes(b(e.targetId)));return n})(e,o),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(b(e.targetId))))(e,new Set([...d,...i]));return Object.assign(Object.assign(Object.assign({},a),r),{[te]:s})},de="ABSOLUTE_FULLSCREEN",se="ANY_FULLSCREEN",le="NINESIXTEEN",ce="FULLWIDTH",ue="FULLSQUARE",pe="TAKEOVER",ve="VELVET_TAKEOVER",ge="WALLPAPER",he="COLLAPSE",me={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}]},ye={wallpaper:1600,"l-format":1600},fe=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&$e(e,se)},we=e=>{const{native:t}=e;return!!t},be=e=>$e(e,ce),ke=e=>{const{targetId:t}=e;return t.includes("takeover")||$e(e,pe)},xe=e=>$e(e,pe),Ie=e=>$e(e,ge),Ce=e=>$e(e,he),Ee=e=>e.targetId.includes("sponsorstripe"),Te=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Ae=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),Se=e=>e.targetId.startsWith("midboard"),Pe=e=>e.targetId.includes("widescreen"),Oe=e=>e.width>=1260&&e.width<=1280,je=e=>e.width>=1600&&e.width<=1620,$e=(e,t)=>{const n=me[t];if(!n)return!1;return!!n.find(t=>{var n,o;const i=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(o=e.banner)||void 0===o?void 0:o.height)||e.height,a=t.width===i,d=!t.height||t.height===r;return a&&d})};function Le(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}function _e(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{s(o.next(e))}catch(e){r(e)}}function d(e){try{s(o.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((o=o.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Ne=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 o=!1;const i=e=>{o||(s("Resolving advertising permission value obtained"),o=!0,t(e))},r=setTimeout(()=>{s("Advertising permission timed out, resolving with false"),i(!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),i(Boolean(t))})}),qe="cmp:loaded";let Me="undefined"!=typeof window?window._tcf_:void 0,De=!1;const Be=(e,t,n)=>{const o=!!(null==e?void 0:e.enabled),i=(null==e?void 0:e.timeout)||3e3,r=q("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))(o,r))return!0;if(De)return null;if(!Me)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Me.getConsentedToAllSync();return s(`TCF consented to all is: ${t}`),Me.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"),Me=window._tcf_,void e(Me);s("TCF consent manager is not available");const n=()=>{s("CMP loaded, resolving consent manager..."),o&&clearTimeout(o),window._tcf_?(Me=window._tcf_,e(Me)):t(new Error("CMP loaded but window._tcf_ is not defined"))},o=setTimeout(()=>{document.removeEventListener(qe,n),De=!0,t(new Error("Timeout waiting for CMP to load"))},i);s("Listening for CMP loaded event..."),document.addEventListener(qe,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>_e(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===h.SE,o=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===h.NO;if(t||o)return s("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Ne(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Me)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},o=setTimeout(()=>{s("TCF isConsentedToAll timed out, resolving with false"),n(!1)},i);Me.onTcfReady(()=>{s("On Tcf Ready called, waiting for consent"),clearTimeout(o)}),Me.isConsentedToAll(t=>{clearTimeout(o),e(t)})}catch(e){t(e)}})})}},Fe=(e,t,n,...o)=>_e(void 0,[e,t,n,...o],void 0,function*(e,t,n,o="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return s(`Schibsted Consent to Pay is not enabled, returning true for ${o}`),!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 ${o}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=Be(e,0,n);return(yield i())?(s(`Schibsted Ad Choices consent given according to TCF consent manager for ${o}`),!0):(s(`Schibsted Ad Choices consent not given according to TCF consent manager for ${o}`),!1)}),Re=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Ue=e=>_e(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:o}={}}=e,{getConsentAsync:i}=Be(t,0,o);if(!(yield i()))return;const r=Re("_pulse2data");return r?r.split(",")[9]:void 0}),Ve="splash",ze="welcomePage",He="topscroller",We="velvet",Ke=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const o=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),i=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=o.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,i).toString()},Ge="takeover-displayed",Je="takeover-visit-count",Xe=14400,Qe=()=>{const e=Re(Je);return e?parseInt(e):0},Ye=()=>{const e=Qe(),{takeover:{options:{cookieCapTime:t=Xe}={}}={}}=v.get(),n=document.location.hostname;window.document.cookie=`${Je}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},Ze=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=v.get();return"0"!==q(M)&&("1"===q(M)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=v.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Ge;return"true"===Re(n)})())&&(!t||et()))},et=()=>{const e=Qe();return 0===e?(Ye(),!1):1===e},tt=(e,t)=>[[1,1],[1920,1080]].some(([n,o])=>n===e&&o===t),nt=()=>{const{takeover:e}=v.get();return Boolean(null==e?void 0:e.topscroller)},ot=e=>{const{width:t,height:n}=e;return tt(t,n)?Ve:$e(e,ve)?We:nt()?He:ze},it=()=>_e(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Ge,cookieCapTime:n=Xe}={}}={},pageContext:{isMobileApp:o,countryCode:i},tcf:r}=v.get(),a=yield Fe(r,o,i,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),rt=e=>{var t,n;const o=!!(null===(n=null===(t=v.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return ke(e)&&o},at=(e,t)=>{var n;if(t===He){const{topscroller:t}=e;return null!=t?t:{}}if(t===Ve){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},dt=(e,t)=>{t!==Ve?(e=>{var t,n;const o=null===(t=v.get().pageSectionsSelectors)||void 0===t?void 0:t.header,i=null===(n=v.get().takeover)||void 0===n?void 0:n.topscroller;if(!o||i)return;const r=document.querySelector(o),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=xe(e)?"60svh":`calc(100svh - ${l}px)`,u=xe(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=v.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),o=document.querySelector(`#${e.targetId}`);if(!n||!o)return;const i=`calc(100svh - ${n.offsetHeight}px)`;o.style.setProperty("height",i,"important")})(e)},st=Ke([],()=>{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 lt=Object.freeze({__proto__:null,addTakeoverCookie:it,adjustTakeoverHeight:dt,canDisplayTakeover:Ze,getProperWelcomePageConfig:at,getTakeoverVariant:ot,handleTakeoverCookieOnAdNotShown:e=>_e(void 0,void 0,void 0,function*(){rt(e)&&(yield it())}),incrementArticleVisitCount:Ye,isSplashVariant:tt,isTopscroller:nt,scaleAd:st,shouldAddTakeoverCookieForNotShownAd:rt});const ct={nativeAd:e=>we(e)&&!Ee(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:be,fullscreenScroll:fe,topscroller:e=>ke(e)&&nt(),splash:e=>ke(e)&&tt(e.width,e.height),welcomePage:ke,wallpaper:Ie,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Oe,hFormat:je,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!je(e)&&!Oe(e),topboard:e=>e.targetId.startsWith("topboard")&&!ke(e),widescreen:Pe,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:Ee,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Ae(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!Se(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:Ae,midboard:Se},ut=({adObj:e,preferredTestIdData:t})=>{var n,o;const i=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!i)return;const r=null===(o=document.querySelector(`#${i}`))||void 0===o?void 0:o.parentElement;if(!r)return;if(((e,t)=>{var n,o,i,r;const a=null===(r=null===(i=null===(o=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===o?void 0:o.tags)||void 0===i?void 0:i[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(i,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,o;for(const[i,r]of Object.entries(ct))if(r(e)){if("nativeAd"===i){const r="default";t.dataset.testid=`${i}-${null!==(o=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==o?o:r}`;break}t.dataset.testid=i;break}})(e,r)},pt=e=>{var t;return(null===(t=Object.entries(ct).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},vt=()=>{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"},gt=e=>e===G,ht=(e,t)=>{const n=e.width,o=(null!=t?t:window.screen.width)/n;return o<1?o:1},mt=(e,t=window.screen.width,n,o)=>{const i=ht(e,t);if(n&&n(e,i),o)return void o(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${i})`,r.style.transformOrigin="left top")},yt=(e,t)=>{if(e&&t)return t/e},ft=new Map;ft.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),ft.set("panorama",{scale:.79,transformOrigin:"center center"}),ft.set("outstream",{scale:.79,transformOrigin:"center center"}),ft.set("integration",{scale:.79,transformOrigin:"center center"}),ft.set("toppanorama",{scale:.8,transformOrigin:"left center"});var wt=Object.freeze({__proto__:null,calculateScaleFactor:ht,getAspectRatio:yt,scaleAd:mt,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 o=pt(e),i=ft.get(o),r=document.querySelector(`#${e.targetId}`);if(!r||!i)return;if(r.style.transformOrigin=i.transformOrigin,r.style.transform=`scale(${i.scale})`,!(null==i?void 0:i.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},scaleAds:e=>{var t,n,o,i,r,a;const{adScaleConfig:d,pageContext:{deviceType:s}}=v.get();if(!(null==d?void 0:d.enabled))return;if($e(e,se))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=ne(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(o=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==o?o:0,p=document.getElementById(e.targetId),g=null!==(i=null==p?void 0:p.offsetWidth)&&void 0!==i?i:window.screen.width,h=null!==(a=null===(r=null==p?void 0:p.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;mt(e,(g<h?g:h)-u)}});const bt={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&"native"!==e.adType&&((e,t)=>{mt(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},kt={SVD:"svd",VG:"vg",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"},xt={publisherClassName:kt.GODT,fullWidthFormatClassName:"netboard"},It=864e5,Ct=(()=>{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,o=It)=>{const i={data:n,expirationTime:(new Date).getTime()+o};t(e,JSON.stringify(i))},getByTimestamp:(t,n=It)=>{const o=e(t);if(!o)return null;if(!n)return o;try{const{expirationTime:e,data:t}=JSON.parse(o);return(new Date).getTime()<=e?t:null}catch(e){return s("Error with parsing localStorage data"),null}}}})(),Et="glimrTags",Tt=["glwe_","glwet_"],At={geofenceTags:[],geoTags:[],weatherTags:[]},St=(...e)=>_e(void 0,[...e],void 0,function*(e=v.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:o}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield Fe(t,n,o,"glimr")}const{getConsentAsync:i}=Be(t,0,o);return yield i()}),Pt=()=>_e(void 0,void 0,void 0,function*(){const{glimr:e}=v.get();if(!(yield St())||!(null==e?void 0:e.enabled))return void s("No consent for glimr data fetching.");const t=yield(n=500,_e(void 0,void 0,void 0,function*(){return yield Promise.race([_e(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{Ct.setWithTimestamp(Et,{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})}),Ot={svd:"svd",vg:"vg",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},jt=e=>Tt.some(t=>e.startsWith(t)),$t=e=>e.startsWith("glgc_"),Lt=e=>e.startsWith("glci_"),_t=e=>!jt(e)&&!$t(e),Nt=(e,t)=>_e(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:o,pageContext:{countryCode:i}={}}=e,r=yield St(e);if(!(null==o?void 0:o.enabled)||!r)return s("No consent for getting glimr tags."),{};const a=m(i),d=qt(e,Boolean(n));return{[`${a}-geo`]:d.geoTags,[`${a}-weather`]:d.weatherTags,[`${a}-geofence`]:d.geofenceTags}}),qt=(e,t)=>{const n=Mt();if(!n)return At;const o=((e=[])=>e.filter(jt))(n),i=((e=[])=>e.filter($t))(n),r=((e=[],t,n)=>{var o;const i=e.filter(_t);if(n&&t){const{publisher:e}=null!==(o=t.pageContext)&&void 0!==o?o:{},n=Ot[e]||e;i.push(n)}return i})(n,e,t);return{geoTags:r,geofenceTags:i,weatherTags:o}},Mt=()=>{const e=Ct.getByTimestamp(Et);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},Dt=()=>{var e;return((e=[])=>e.filter(Lt))(null!==(e=Mt())&&void 0!==e?e:[])},Bt=()=>(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),Ft=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Rt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:o=!1}={},pageContext:{countryCode:i}}=v.get(),r=[`${m(i)}-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",...o?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)}},Ut="opaque",Vt=e=>_e(void 0,void 0,void 0,function*(){if(e.type!==Ut){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),zt={get:(e,...t)=>_e(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:n}=t,o=Le(t,["timeout"]);if(n)return((e,t,n)=>_e(void 0,void 0,void 0,function*(){const o=new AbortController,i=setTimeout(()=>o.abort(),n);try{const n=yield fetch(e,Object.assign(Object.assign({},t),{signal:o.signal}));return Vt(n)}finally{clearTimeout(i)}}))(e,o,n);const i=yield fetch(e,o);return Vt(i)}),post:(e,t,n)=>_e(void 0,void 0,void 0,function*(){const o=JSON.stringify(n),i=yield fetch(e,{method:"POST",headers:t,body:o});if(!i.ok)throw new Error(i.statusText);return yield i.json()})},Ht="advertory:ppids-cache",Wt={[h.SE]:`SCH${h.SE.toUpperCase()}-EnvHash`,[h.NO]:`SCH${h.NO.toUpperCase()}-EnvHash`},Kt={[h.SE]:`SCH${h.SE.toUpperCase()}-UserHash`,[h.NO]:`SCH${h.NO.toUpperCase()}-UserHash`},Gt={[h.SE]:`sch${h.SE}-envhash-v3`,[h.NO]:`sch${h.NO}-envhash-v3`},Jt={[h.SE]:`sch${h.SE}-userhash-v3`,[h.NO]:`sch${h.NO}-userhash-v3`},Xt={[h.SE]:`'sch${h.SE}-iosid-v3'`,[h.NO]:`'sch${h.NO}-iosid-v3'`},Qt={[h.SE]:`sch${h.SE}-androidid-v3`,[h.NO]:`sch${h.NO}-androidid-v3`},Yt={[h.SE]:"sdrn:schibsted.com:user",[h.NO]:"sdrn:spid.no:user"};class Zt{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:o})=>{t.append(e,`${o}-${n}`)}),t}}const en=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return _e(this,arguments,void 0,function*(e,t=1e4){var n,o;const i=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=i.xandr)||void 0===n?void 0:n.ppId1,null===(o=i.xandr)||void 0===o?void 0:o.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||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:""}},tn=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return _e(this,void 0,void 0,function*(){var n,o,i,r,a,d,s,l,c,u,p;const v=Ct.get(Ht),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===(o=g.idfv)||void 0===o?void 0:o.plain,null===(i=g.anId)||void 0===i?void 0:i.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=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||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,o){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=o?o:null}shouldHash(e,t){var n,o;if(!e)return!0;for(const i in e){if((null===(n=e[i])||void 0===n?void 0:n.plain)!==(null===(o=t[i])||void 0===o?void 0:o.plain))return!0}return!1}cachePPIDs(e,t,n,o){const i=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),o?{anId:{plain:o}}:{});Ct.set(Ht,i)}hashPPIDs(e,t){return _e(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield zt.post(t,n,e)}catch(e){return s("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return _e(this,arguments,void 0,function*({clientId:e,instance:t},n){const o=yield((e,t)=>_e(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${Yt[t]}:${n}`:null}))(t,n),i=yield(r=t,_e(void 0,void 0,void 0,function*(){const e=yield r.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}));var r;const a=window.advertory_idfv,d=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:o},environmentId:{plain:i},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),d?{anId:{plain:d}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:o,environmentId:i}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:o.plain,environmentId:i.plain}}},nn=e=>_e(void 0,void 0,void 0,function*(){const{pulse:t,tcf:n,pageContext:{countryCode:o,isMobileApp:i}}=e;if(!(yield Fe(n,i,o,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([en.processPPIDs(t,null==n?void 0:n.timeout),tn.processPPIDs(t,o)])).forEach((e,t)=>{if("rejected"===e.status){s(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),on=e=>{const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=tn.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]).add(r,Xt[e]).add(a,Qt[e]).buildEids()}]}},rn=()=>{const{ppid1:e,ppid2:t}=en.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},an=e=>{const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=tn.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]).add(r,Xt[e]).add(a,Qt[e]).buildRyEids()}}]}}},dn=e=>{const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i}=tn.getPPIDs();return(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]).buildRyEids()},sn=e=>_e(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i}=tn.getPPIDs(),r=(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),ln=(e,...t)=>_e(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,o)=>{const i=document.createElement("script");i.async=!0,i.src=e;const r=()=>{d(),n()},a=()=>{d(),o(new Error(`Failed to load ${e}`))},d=()=>{i.removeEventListener("load",r),i.removeEventListener("error",a),clearTimeout(s)};i.addEventListener("load",r),i.addEventListener("error",a);const s=setTimeout(()=>{d(),o(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}),cn="advertory-fullscreen-scroll",un="advertory-fullscreen-scroll-wrapper",pn="fullscreen-scroll-in-screen",vn="in-screen",gn=e=>e.includes("snoap.no"),hn=e=>{var t,n,o,i,r;return!!(null===(r=null===(i=null===(o=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===o?void 0:o.adResponse)||void 0===i?void 0:i.ads[1])||void 0===r?void 0:r.rtb)},mn=Ke([],()=>{const e=({width:e,height:t})=>{var n;const o=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!o)return;const{clientWidth:i,clientHeight:r}=o,a=e/i,d=t/r;o.style.transform=`scale(${a},${d})`,o.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),yn=e=>{const t=Ke([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const o=n.contentDocument.createElement("style");o.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(o),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},fn=[],wn={},bn=(e,t)=>{var n;const o=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>kn(e,o),{}),r=In(e);i.observe(e),o&&(wn[r]=Tn(e,null==t?void 0:t.options))},kn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const o=In(e);n?(xn(o,n),Cn(e,o,t)):(xn(o,n),En(e,o,t))})},xn=(e,t)=>{var n,o;const i=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!i)return;const r=t?"showFullscreen":"hideFullscreen";null===(o=i.contentWindow)||void 0===o||o.postMessage(`advertory:${r}-${e}`,"*")},In=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},Cn=(e,t,n)=>{e.classList.add(vn),document.body.classList.add(pn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),fn.includes(t)||fn.push(t),n&&window.addEventListener("scroll",wn[t],{passive:!0})},En=(e,t,n)=>{fn.includes(t)&&(n&&window.removeEventListener("scroll",wn[t]),document.body.classList.remove(pn),e.classList.remove(vn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},Tn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:o=[".skyscraper_r"],headerZIndex:i=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),o.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&An(e,r,i,0),a.length&&An(e,a,i,40)}},An=(e,t,n,o)=>{const i=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-o:(r+t-(a+i))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function Sn(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}Sn('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);flex-shrink:0}.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:var(--advertory-political-box-offset, 0px)}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px) + var(--advertory-political-box-offset, 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:calc(19px + var(--advertory-political-box-offset, 0px)) !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 + var(--advertory-political-box-offset, 0px)) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const Pn="left",On={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 jn=null;const $n=(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=`(${mn})()`,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(gn(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=yn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>gn(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)),gn(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)),hn(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},Ln=()=>{jn=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,o=e?e.offsetLeft:0,i=document.documentElement;i.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),i.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),i.style.setProperty("--advertory-fullscreen-scroll-left",`${o}px`)},_n=()=>{jn||(jn=window.requestAnimationFrame(Ln))},Nn=(e,t)=>{var n,o,i,r;const{pageContext:{countryCode:a,deviceType:d}}=v.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:o=1302,backgroundColor:i="#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=o/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${i} 0px,\n ${i} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${i} calc(50% + ${l}px),\n ${i} 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!==(o=null==l?void 0:l.overlayStyles)&&void 0!==o?o:{},d);const c=document.getElementById(s),u=null==c?void 0:c.parentElement;if(!c||!u)return;bn(u,t),c.className=cn,bn(u,t),c.className="advertory-fullscreen-scroll";const p=$e(e,de)?"absolute":"fixed";c.style.position=p,u.className=un,u.dataset.showTagSubscribeId=s,c.setAttribute("data-ad-label",On[a].adText),(null==l?void 0:l.cogwheelPosition)===Pn&&(c.dataset.moveCogwheelToTheLeft="true"),_n(),window.addEventListener("resize",_n),null===(i=window.visualViewport)||void 0===i||i.addEventListener("resize",_n),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",_n)},qn=e=>{if(!(null==e?void 0:e.classList.contains(cn)))return;e.classList.remove(cn),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(un))&&(t.classList.remove(un),t.classList.remove(vn))};var Mn=Object.freeze({__proto__:null,createFullscreenScrollAd:Nn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,o=hn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[o].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,o=hn(e)?1:0,i=null==n?void 0:n.tags[e].adResponse.ads[o].rtb;i&&(i.banner.content=t)})(e,$n(t,e))},undoFullscreenScrollContainer:qn});const Dn=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},Bn=(e,t,n)=>{var o,i,r,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(i=null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||void 0===i?void 0:i.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}]}})),Dn(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},Fn="ad-loaded",Rn=(e,t,n)=>_e(void 0,void 0,void 0,function*(){yield C,yield E;new IntersectionObserver((t,o)=>{t.filter(({isIntersecting:e})=>e).forEach(()=>{n(),o.unobserve(e),o.disconnect()})},{rootMargin:`${t}px 0px ${t}px 0px`}).observe(e)}),Un=()=>_e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:o,deviceType:i},fullscreenScroll:r,appearanceConfig:a,placements:d}=v.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:l}=v.getHandlers(),{getConsentAsync:c}=Be(t,0,n),u=yield c(),p=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:o=>{const i=Bt(),{prebid:{relevantCallbackTimeout:r}={}}=v.get(),a="relevantCb"===o&&r?r:n[o].timeout,d=setTimeout(()=>{!n[o].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${o}'`),e=!0,i.loadTags&&i.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),g=Bt(),h=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=Bt();return{user:e,keywords:t}})();p.failsafeOnTimeout("relevantCb");const{user:{externalUid:m=""}={},keywords:y}=h;(()=>{const e=Ft();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{s("prebid relevantYieldQueue callback fired - RY took over");if(p.getCancel()||!g.loadTags)return s("core loadTags() call was cancelled",{cancel:p.getCancel(),apnTagLoadTags:!g.loadTags,condition:"or"}),void p.cleanup();const t=Ft();p.events.relevantCb.done=!0,p.failsafeOnTimeout("auctionCb");const c=u?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};s("prebid consentManagement",c),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:c,enableSendAllBids:!1},an(n)),Rt(y,m))),s("core add prebid config",Object.assign(Object.assign({consentManagement:c,enableSendAllBids:!1},an(n)),Rt(y,m))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s("prebid auctionCb loadTags called by RY - prebid hands off to Xandr",{targetIds:e,cancelled:p.getCancel()}),p.getCancel()||(p.events.auctionCb.done=!0,g.loadTags(e)),p.cleanup()}},customNativeRender:e=>{Vn(e,l)},directRenderFn:e=>{var t,n,l;const{settings:c,renderFn:u}=e,{bid:p,adDiv:v}=c||{};if(!v)return;const g=v.id,h=document.getElementById(g);if(!h)return;const m=null===(t=null==d?void 0:d[i])||void 0===t?void 0:t.find(e=>e.targetId===g),y=null!==(l=null!==(n=null==m?void 0:m.requestThreshold)&&void 0!==n?n:null==a?void 0:a.defaultThreshold[i])&&void 0!==l?l:0,f=Object.assign(Object.assign({},p),{targetId:g,banner:!0});s("prebid directRenderFn ad info",{targetId:g,width:null==p?void 0:p.width,height:null==p?void 0:p.height,adId:null==p?void 0:p.adId,creativeId:null==p?void 0:p.creativeId}),Rn(h,y,()=>{var e;const t=u(c),n=fe(f);if(s("prebid directRenderFn isFullscreenScrollAd",{targetId:g,isFullscreen:n,width:null==p?void 0:p.width,height:null==p?void 0:p.height}),n)s("prebid directRenderFn: creating fullscreen scroll container",{targetId:g}),Nn(f,r),o?h.style.setProperty("--advertory-political-box-offset","30px"):(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const o=new MutationObserver(()=>{n()&&o.disconnect()});o.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(t);else{s("prebid directRenderFn: NOT fullscreen scroll - undoing container",{targetId:g}),qn(h),null===(e=null==h?void 0:h.parentElement)||void 0===e||e.classList.add("advertory-direct-render");const n=t.getAttribute("width");n&&(h.style.width=`${n}px`)}h.classList.add(Fn),(null==p?void 0:p.creativeId)&&Bn(g,h,Number(null==p?void 0:p.creativeId))})}}),s("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{p.getCancel()||(p.events.auctionCb.done=!0,g.loadTags(e))}},customNativeRender:e=>{Vn(e,l)},directRenderFn:()=>{}})})}),Vn=(e,t)=>{var n;const{divId:o,native:i,bid:r}=e,a=document.querySelectorAll(`[id^=${o}]`)[0],d=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:i,targetId:d},v.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},zn=(e,t,n)=>{const o=document.getElementById(`div_utif_${e}`);if(!o)return;const{apntag:i}=window,[r,a]=t;if(!o.dataset.lockedsize&&a&&r)o.style.width=`${r}px`,o.style.height=`${a}px`,n&&(i.resizeAd(o.id,[r,a]),o.dataset.lockedsize="true",o.dataset.lockedwidth=r.toString(),o.dataset.lockedheight=a.toString());else if(null==o?void 0:o.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=o.dataset;e&&t&&i.resizeAd(o.id,[e,t])}},Hn=["netboard","board"];class Wn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,o;const{editionName:i}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(o=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==o?o:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",i),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return _e(this,void 0,void 0,function*(){var t,n,o;const i=yield this.identityFacade.getIdentityUser(),r=null!==(o=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==o?o:"",a=(null==i?void 0:i.userId)?String(i.userId):"",d=this.buildUrl(e,{envId:r,spid:a});try{s("Starting fetching DrEdition ad from URL:",d);const e=yield zt.get(d);return s("Fetch operation completed successfully."),e}catch(e){s("Error during fetch operation:",e)}return null})}}let Kn=class{getDrEditionUTMParams(e,t){var n;const{title:o="",clientName:i,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=o.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:i,utm_medium:d},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const o=this.getDrEditionUTMParams(t,n),i=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(o).forEach(([e,t])=>{i.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const o=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!o)return"";const i=this.getDrEditionUTMParams(e,t),r=new URL(o);return Object.entries(i).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return _e(this,void 0,void 0,function*(){const{id:n,autoplay:o,mute:i,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:o,vgtvMuted:i,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const Gn=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 Jn{constructor(e,t,n,o){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=o,this.drEditionAds=[]}fetchAndRenderAd(e,t){return _e(this,void 0,void 0,function*(){var n,o;const{drEditionConfig:{options:{containerSelector:i}},renderAsBackfill:r=!1}=t,a=e.querySelector(i);if(!a)return void s(`Container with selector "${i}" 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."),R(e.id),void Gn(a)):((null==d?void 0:d.itemId)&&r&&(s("Dr. Edition ad available to render as a Xandr backfill."),U(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),Gn(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===(o=e.querySelector("a"))||void 0===o||o.addEventListener("pointerup",()=>null)):Gn(a))):(s("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Gn(a))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";U(o)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const o=e.querySelector(".dr-edition-slider");if(!o)return!1;let i=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(i&&clearTimeout(i),i=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...o.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...o.children].forEach(e=>{r.observe(e)}),!0}}class Xn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return _e(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:o}=Be(n.tcf,n.isMobileApp,n.country),i=yield o(),r=gt(n.device)?t.mobileHTML:t.desktopHTML,a=i?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var o,i,r;e.search=null!==(r=null===(i=(o=this.newsroomStrategy).getUrlSearchParams)||void 0===i?void 0:i.call(o,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Qn{constructor(e){this.strategy=e}handle(e,t){return _e(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:o}={}}=e;(n||o)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return _e(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 ln(t)}catch(e){s("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return _e(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:o}=e.videoConfiguration,i=[...document.querySelectorAll(`#${o}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==i||i.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==i?void 0:i.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,o,i;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(i=(o=t.drEditionConfig.options).addPreviewVideo)||void 0===i||i.call(o,d),!0))}}let Yn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,o){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const o=null==n?void 0:n.textContent;return o?o.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:o}={}}=t,i=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:o}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return _e(this,void 0,void 0,function*(){var o,i,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===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)?null===(r=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===r||r.call(i,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 _e(this,void 0,void 0,function*(){var o,i,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(i=(o=this.pulse).trackLegacyClickUIElement)||void 0===i||i.call(o,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 Zn extends Yn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var o,i,r;const{pulseData:{title:a,clientName:d="",creativeId:s,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(i=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.transformUrl)||void 0===i?void 0:i.call(o,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 eo=class extends Yn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var o,i,r,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulseObjectId)||void 0===r?void 0:r.call(i))&&void 0!==a?a: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,o){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,o),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,o){var i,r,a,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId: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===(i=this.newsroomStrategy)||void 0===i?void 0:i.getUrlWithParams)||void 0===r?void 0:r.call(i,t,n))&&void 0!==a?a:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:o,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const to={FRONT:"front"},no=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},oo=e=>_e(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const o=document.createElement("script");o.id=e,o.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",o.async=!0;try{o.src=o.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(o,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),io={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return _e(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Wa})})}})}},ro=(e,t)=>{null==e||e.forEach(e=>{io[e](t)})};let ao=class{handleVideo(e,t){return _e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){yield _e(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const a=["ContentMutePlugin"],d=this.createPlayerOverlay(e);ro(a,d);const s={id:t,node:n,autoplay:o,mute:i,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},l=yield oo(s);l.once("assetReady",()=>{no(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",()=>_e(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===to.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:o}=new URL(n),i=o.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}};const so="https://www.aftonbladet.se/video-player-extras/latest/";class lo{handleVideo(e,t){return _e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){const a={id:t,node:n,autoplay:o,mute:i,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${so}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${so}external-link.js`]:{name:"ExternalLink"}}};yield oo(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 co=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class uo{handleVideo(e,t){return _e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){const a={id:t,node:n,autoplay:o,mute:i,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},co(e)?e:{}),{provider:Object.assign(Object.assign({},co(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 oo(a);d.once("PulseStats:ready",()=>_e(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===to.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let po=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const vo=(e,t,n)=>{const{publisher:o,pageType:i,country:r}=e,a={[kt.VG]:new Kn,[kt.E24]:new ao,[kt.AFTONBLADET]:new lo,[kt.SVD]:new uo}[o]||new po,d=new(r===h.SE?Zn:eo)(n,a,i),s=new Wn(t,n),l=new Xn(a,d),c=new Qn(a);return new Jn(s,l,c,d)},go=()=>_e(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class ho{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return _e(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return s("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return _e(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const mo=(e,t,n)=>{const{wrapperSelector:o}=e.drEditionConfig.options,i=document.querySelectorAll(o),r=new IntersectionObserver((o,i)=>((e,t,n,o,i)=>{const r=vo(n,o,i);e.forEach(e=>{var o,i;if(!e.isIntersecting)return;const a=e.target,d=null!==(o=a.dataset.editionName)&&void 0!==o?o:"",s=null!==(i=a.dataset.pulseColumnname)&&void 0!==i?i:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:d,columnName:s,primaryPosition:l})),t.unobserve(a)})})(o,i,e,t,n),{rootMargin:"400% 0px"});i.forEach(e=>r.observe(e))},yo=()=>_e(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),fo=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},wo=[],bo=(e,t)=>_e(void 0,void 0,void 0,function*(){var n;const{pulse:o,tcf:i,drEdition:r,pageContext:{deviceType:a,publisher:d,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield Fe(i,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,o;const{pageContext:{deviceType:i},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,s=r[i]||r.desktop,l=b(t.targetId),c=s.find(e=>e.targetId===l),u=Hn.some(e=>l.startsWith(e)),p=wo.includes(l),v=(null===(o=null==c?void 0:c.drEdition)||void 0===o?void 0:o.editionName)||d;return c&&u&&!p&&v?(wo.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==o?void 0:o.instance))return void s("Pulse has not been passed as a prop, aborting");const v=yield go(),g=new ho(v),h=vo({publisher:d,pageType:l,country:c},g,null==o?void 0:o.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:i,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),ko=(e,t)=>{var n,o,i;if(!fo())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===(o=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===o?void 0:o[r],l=null!==(i=null==d?void 0:d.map(([e])=>e))&&void 0!==i?i:[],c=new IntersectionObserver((t,n)=>_e(void 0,void 0,void 0,function*(){for(const o of t){if(!o.isIntersecting)continue;const t=o.target;n.unobserve(t),yield bo(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 xo=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:o,pulseData:i,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[o,i]of Object.entries(e)){n[t?`${t}-${o}`:o]=String(i)}return n},d=a(i,"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:o})]}))},getDrEditionManager:vo,handleDrEdition:e=>_e(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield Fe(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield go(),o=new ho(n);mo({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},o,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:bo,handleDrEditionBackfillOnAdblock:ko});const Io="collapseAd",Co="hideAd",Eo="resizeAd",To="renderDrEditionFallback",Ao="wallpaperImageUrl",So="wallpaperColor",Po="velvet",Oo=[Eo,Ao,So,Io,Co,To,Po];let jo;const $o=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(j(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:Ao,wallpaperImageUrl:t}}if($(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:So,wallpaperColor:t}}if(e.startsWith(To)){const t=e.split(":")[1];return{name:To,targetId:t}}if(e.startsWith(Io)||e.startsWith(Co)){const t=e.split(":")[1];return{name:Io,targetId:t}}if(e.includes("name")&&Oo.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!Oo.some(e=>n.name===e))return;const{name:o,targetId:i,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;o===Po&&d&&(d.includes("noScroll")&&(jo=(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==jo||jo(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),o!==Io&&o!==Co||!i||R(i),o===Eo&&i&&d&&zn(i,d),o===To&&i&&(R(i),bo(v.get(),{targetId:i})),"resizeMediationAd"===o&&i&&s&&zn(i,s,!0),o===Ao&&r&&L(r),o===So&&a&&_(a)},Lo=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=v.get(),o=window.apntag,i={publisher:e,countryCode:t,finnBlink:n},r=e=>{U(e),I(()=>o.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>_e(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ad});yield t(e,i,null)}),withFullAdsChain:e=>_e(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 ad});yield t(e,i,r,()=>_e(void 0,void 0,void 0,function*(){if(!z.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return N});t(e)}))})}},_o=(e,t)=>_e(void 0,void 0,void 0,function*(){e.id.includes("wallpaper")||(yield Rn(e,t,()=>((e,t,n)=>{const o="true"===n.dataset.isFinnBlinkOnlyPlacement;return Te(t)&&o?(s(`loading finn blink ad for blink only placement for ${t}`),void Lo().withFinnBlinkAd(t)):Te(t)?(s(`loading finn blink ad with full ads chain for ${t}`),void Lo().withFullAdsChain(t)):void I(()=>(s("core showTag",{id:t}),e.showTag(t)))})(window.apntag,(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(e),e)))}),No=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),qo=new Map,Mo=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Do=".brandstudio-premium-content-widget",Bo=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Fo=({adWrapper:e,placementContainer:t})=>{const n=Bo({adWrapper:e,placementContainer:t});var o;null==e||e.style.setProperty("height",`${n}px`),W(o=t),o.innerHTML=""},Ro=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Uo=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=v.get(),o=Mo.includes(n)&&Boolean(t.closest(Do));const i=o?t.closest(Do):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!o&&!a||o&&!i)return;if(a)return Ro(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=i;d&&s.contains(d)?Ro(d):s.hasAttribute("style")&&Ro(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},Vo=(e,t,n,o,i,r)=>{var a;const d=performance.now(),s=null!==(a=qo.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(o,i)&&n<0;d-s>=i&&l&&(qo.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:o}}=v.get(),i=null==n?void 0:n.parentElement;i&&n&&Fo({adWrapper:i,placementContainer:n}),I(()=>{e.setKeywords([t],{[`${m(o)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},zo=(e,t,n)=>{const o=new IntersectionObserver((e,o)=>((e,t,n,o)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:i,boundingClientRect:r}=e;t(window.apntag,i.id,r.y,n,o,i)})})(e,Vo,t,n),No(300));o.observe(e)},Ho=(e,t=6)=>{const n=[];for(let o=0;o<e.length;o+=t){const i=e.slice(o,o+t);n.push(i)}return n},Wo=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Ko=(e,t=0)=>{const n=e.getBoundingClientRect(),o=window.innerHeight;return n.bottom>-t&&n.top<o+t},Go=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=v.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Zo(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Jo=(e,t,n)=>{const o=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const i of o){const o=e.find(e=>{var t,n;return e.targetId===(null===(t=i.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==o?void 0:o.requestThreshold;Ko(i,r)&&o&&(H(o.targetId),n.length&&i.classList.remove(...n),Zo([o],t))}},Xo=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:o}}=v.get();t&&(e.forEach(({targetId:e})=>{const t=Qo(e);t&&(t.dataset.bfCacheRefresh="true")}),o?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Jo(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const o=()=>{window.scrollY>0&&(window.removeEventListener("scroll",o),Jo(e,!1,t))};n.persisted&&(Wo()?window.addEventListener("scroll",o,{passive:!0}):Jo(e,!1,t))})})(e,n))},Qo=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Yo=e=>{const{targetId:t,allowedFormats:n}=e,o=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Qo(t)),i=(e=>1===e[0]&&1===e[1])(o),r={sizes:[o],allowedFormats:i?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return i||(r.native=void 0),r},Zo=(e,t=!1)=>{const{queryConfig:{batchSize:n=u}={}}=v.get(),o=e.map(({targetId:e})=>e),i=Ho(o,n);if(t)for(const t of e){const e=Yo(t);window.apntag.modifyTag(t.targetId,e)}for(const e of i)I(()=>window.apntag.refresh(e))},ei=e=>`externalImpId:'${e}'`,ti=(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,ni=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},pulse:o}=v.get(),{targetId:i,sizes:r,keywords:a,allowedFormats:d,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:p,dynamicSizeWidthCheck:g=!1,globalPlacementId:h}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||Ze())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],o=Array.isArray(n)?n.filter(e=>e!==He):n,i=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":o}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:i})})(e),m=Object.assign({invCode:l,sizes:r,targetId:i,keywords:ti(a,c),allowedFormats:d,dynamicSizeWidthCheck:g,globalPlacementId:h},p&&{safeframeConfig:p}),y=(e=>{var t,n,o,i,r,a;return(null===(n=null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)||void 0===n?void 0:n.pageViewId)?(s("Pulse state pageViewId is:",null===(i=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===i?void 0:i.pageViewId),null===(a=null===(r=null==e?void 0:e.instance)||void 0===r?void 0:r.state)||void 0===a?void 0:a.pageViewId):(s("Pulse state does not contain field pageViewId or it is empty"),"")})(o);n&&y&&(s("External Impression ID assigned to defineTag:",ei(y)),m.externalImpId=ei(y));const f=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1},customBody1:{required:!1},customBody2:{required:!1},customBody3:{required:!1},customBody4:{required:!1},customBody5:{required:!1}}).reduce((t,[n,o])=>((null==e?void 0:e.includes(n))&&(t[n]=o),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(m.native=f),m},oi=e=>!e.includes("takeover")||Ze(),ii=e=>{const{source:t}=e;return"csm"===t},ri=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=v.get(),n=m(t),o=e[`${n}-targetid`],i=o?b(o[0]):"";return Object.assign(Object.assign({},e),o&&{[`${n}-targetid`]:[i]})},ai=e=>{const{pageContext:{countryCode:t}}=v.get(),n=m(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"]})},di=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const o=n.split(",")[0].split(":")[0],i=e.find(e=>e.invCode===o),r=document.querySelector(`[id^=${null==i?void 0:i.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"})})()},si=(e,t)=>_e(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});Sn(".advertory-brandmetrics-survey{width:100%}");const li="advertory-brandmetrics-survey",ci="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",ui=()=>_e(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,o)=>{var i;o||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(i=n.tcString)&&void 0!==i?i:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),pi={pageContext:{publisher:"aftonbladet",countryCode:h.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"}},vi={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},gi=e=>(null==e?void 0:e.parent)?[...gi(e.parent),e.shortPath||"unknown"]:[],hi=(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]=gi(e);return vi[n]||"ovrigaavdelningar"})(e)}_{position}`,mi={aftonbladet:pi},yi={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:hi(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:gi(e).join(":")}}},fi=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},wi=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),bi="se-generic",ki="aa-sch",xi="kv_",Ii="pause",Ci="{deviceType}",Ei="{position}",Ti="afp_",Ai=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),Si="1-1",Pi="16-9",Oi="3-4",ji="9-16",$i="responsive",Li={[Si]:1,[Pi]:1.78,[ji]:.56,[$i]:1},_i={[Si]:1,[Pi]:1.78,[Oi]:1.33,[ji]:.56},Ni=(e,t,n,o)=>{const{invCode:i="",videoOverlayInvCode:r}=null!=e?e:{},a=X===n?Z:ee,d=i.replace(Ci,a);return(e,n)=>{if(e===Ii)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(Ei,Ii).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&Ai.has(e)){return(o&&r?r:t.frontpageInvCodeTemplate).replace(Ci,a).replace(Ei,e)}return d.replace(Ei,e)}},qi=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[o,i])=>{const r=Math.abs(e[n]-t);return Math.abs(i-t)<r?o:n},n[0][0])},Mi=()=>{var e,t;const n=jwplayer().getContainer(),o=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return o&&"number"==typeof o.offsetWidth&&"number"==typeof o.offsetHeight&&0!==o.offsetHeight?o.offsetWidth/o.offsetHeight:1},Di=()=>{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},Bi=()=>{const e=null!==(t=Di()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Di()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Fi=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Ri=(e,t)=>_e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:o,countryCode:i}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},d={isMobileApp:e.isApp,countryCode:i,publisher:o,pageType:"front",deviceType:e.deviceType},s=(yield Fe(n,e.isApp,i,"video"))?"1":"0",l=yield ui(),c=yield sn(i),u=yield Ue({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)=>qi(_i,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?qi(Li,Number(m.toFixed(2))):$i;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${ki}-country_code`]:i,[`${ki}-publisher`]:o,[`${ki}-supply_type`]:(y=e.deviceType,y===X?Q:Y),[`kw_${ki}-page_type`]:"collection",[`${ki}-page_type`]:"collection",[`${bi}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${bi}-page`]:"index",[`${bi}-page`]:"index",[`${bi}-screenheight`]:String(window.screen.height),[`${bi}-screenwidth`]:String(window.screen.width),[`${bi}-viewportheight`]:String(a),[`${bi}-viewportwidth`]:String(r),[`${bi}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${bi}-mobile-os`]:vt(),[`${bi}-audience`]:void 0,[`${bi}-externalid_src`]:Bi(),[`${bi}-tags`]:e.tags,[`${bi}-articleid`]:p,"article-id":p},yield Nt(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${bi}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Fi()).some(e=>e.includes(xi))&&(()=>{const e=Fi(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(xi)).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})}),Ui=["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"],Vi=["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"],zi=["external_uid","gdpr","gdpr_consent","eids","article-id"],Hi=(e,t)=>{const n=[...Ui,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||zi.includes(e)?e:`kw_${e}`,t]))},Wi=e=>Object.fromEntries(Object.entries(e).filter(([e])=>Vi.includes(e))),Ki=(e,t)=>_e(void 0,void 0,void 0,function*(){var n,o,i,r;const a=(e=>{var t;mi[e]||l(`[video] No config found for publisher "${e}"`);return null!==(t=mi[e])&&void 0!==t?t:pi})(e.publisher),d=(e=>{var t;return null!==(t=yi[e])&&void 0!==t?t:yi.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),s="/"===window.location.pathname,c=null===(o=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===o?void 0:o.toString(),u=e.assetId===c,p=null!==(i=Number(e.aspectRatio))&&void 0!==i?i:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:d,isUserPresentOnFrontPage:s,adsKeywords:yield Ri({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:s,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:Mi(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:fi(e.startMode)}}),Gi=(e,t)=>{const{siteConfig:n,siteVideoParams:o,isUserPresentOnFrontPage:i,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=o||{},l=Ni(o,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(Ti)?`${Ti}${t}`:t)(s),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,i),"se-generic-playback-method":wi.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({},Hi(r,n)),Wi(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")})}}}},Ji=e=>t=>_e(void 0,void 0,void 0,function*(){const n=yield Ki(e,t);return Gi(n,e)}),Xi={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]}]},Qi={no:"NOK",se:"SEK"},Yi={no:"no",se:"sv"};class Zi{buildFetchObject(e,t,n,o){return _e(this,void 0,void 0,function*(){const{pageContext:{countryCode:i},pageOptions:r}=o,{invCode:a,xandrPlacementId:d}=e,s=yield ui(),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(Xi),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:x(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||Yi[i]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield Ue(o),ext:{consent:s.gdpr_consent||"",eids:dn(i)}},at:1,cur:[Qi[i]],source:{tid:x(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,o){return _e(this,void 0,void 0,function*(){try{s("Starting fetching Studio ad from Xandr:",ci);const i=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?`${ci}?${a.toString()}`:ci,l=yield this.buildFetchObject(e,t,n,o),c=yield zt.post(d,i,l);return s("Fetch operation completed successfully.",c),c}catch(e){s("Error during fetch operation:",e)}return null})}}const er=0,tr=3,nr=(e,t,n,o)=>{const i=t.parentElement;if(!i)return;const r=e?`-${e}`:"",a=o?`__${o}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),i.classList.remove(...i.classList),t.classList.add(d),i.classList.add(s),t.dataset.adType=n},or="finn-blink",ir="native-ad",rr=(e,t)=>{ar(e,t),sr(e,t)},ar=(e,t)=>{var n,o;const i=document.querySelector(`#${e.targetId}`);if(!i||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(o=null==t?void 0:t.clickLinkSelector)&&void 0!==o?o:"a.ad-link";(null==i?void 0:i.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const o of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])cr(o)}),t.dataset.tracked="true")})},dr=e=>{var t;const{native:{impressionTrackers:n}={}}=e,o=null==n?void 0:n.some(e=>e.includes("googleads")),i="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;o||!i?null==n||n.forEach(lr):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},sr=(e,t)=>{var n;let o=!1;const i=document.querySelector(`#${e.targetId}`);if(!i||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:X])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!o)for(const n of t)if(n.isIntersecting){o=!0,dr(e),c.disconnect();break}},s);c.observe(i)},lr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?cr(e):window.navigator.sendBeacon(e)},cr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},ur=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:[]}),pr=(e,t)=>_e(void 0,void 0,void 0,function*(){var n,o;const{pageContext:{deviceType:i},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[i],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())},No(d)).observe(l)});const{prepareTag:c}=v.getHandlers(),u=z.getData("alertoryConfigKeywords"),p=null!==(o=c(ni(e)).keywords)&&void 0!==o?o:{},g=new Zi,h=yield g.fetchData(e,u,p,t);h&&(((e,t,n)=>{const o=n===G?t.mobileHTML:t.desktopHTML;if(o){if(t.adType===er){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>${o}`,e.appendChild(n)}else e.innerHTML=o;e.classList.add("ad-loaded")}})(l,h,i),h.adType===tr&&(nr(t.pageContext.publisher,l,ir,t.pageContext.pageType),rr({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:i,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,o)=>{var i,r,a;let d;(null===(i=window.apntag.requests)||void 0===i?void 0:i.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==o?void 0:o.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),Bn(e,n,Number(null==o?void 0:o.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,h.bid))}),vr=(e,t)=>{e.forEach(e=>pr(e,t).catch(e=>{s("Failed to handle server-side ad:",e)}))},gr={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},hr="https://alertory-cdn.inventory.schibsted.io",mr=5e3,yr="editory/native-creator/native-templates",fr=e=>_e(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editory:{editoryUrl:n,editableConfiguration:{pageTypeToFetch:o}={}}={}}=e;return(null==t?void 0:t.publisherClassName)&&o?`${n||hr}/editable-configurations/${t.publisherClassName}/${o.toLowerCase()}.json`:null})(e);if(!t)return null;try{return yield zt.get(t,{timeout:mr})}catch(e){throw s("Failed to fetch S3 config",{error:e,url:t}),e}}),wr=(e,t,n,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:o,pageType:i}=t,r=o&&Object.values(kt).includes(o);n&&r&&nr(o,e,ir,i)})(i,n),o())},br=(e,t)=>{var n,o;const i=document.querySelector(`#${e.targetId}`);if(!i||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(o=null==t?void 0:t.clickLinkSelector)&&void 0!==o?o:"a.ad-link";(null==i?void 0:i.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const o of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Cr(o)}),t.dataset.tracked="true")})},kr=e=>{var t;const{native:{impressionTrackers:n}={}}=e,o=null==n?void 0:n.some(e=>e.includes("googleads")),i="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;o||!i?null==n||n.forEach(Ir):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},xr=(e,t)=>{var n;let o=!1;const i=document.querySelector(`#${e.targetId}`);if(!i||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:X])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!o)for(const n of t)if(n.isIntersecting){o=!0,kr(e),c.disconnect();break}},s);c.observe(i)},Ir=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Cr(e):window.navigator.sendBeacon(e)},Cr=e=>{zt.get(e,{mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Er=(()=>{const e=new Map,t=new Map;return{getTemplate:t=>e.get(t),setTemplate:(t,n)=>{e.set(t,n)},deleteTemplate:t=>{e.delete(t)},getAdjustment:e=>t.get(e),setAdjustment:(e,n)=>{t.set(e,n)},clear:()=>{e.clear(),t.clear()}}})(),Tr=(e,t,n)=>{if(!n)return Promise.resolve(null);const o=((e,t,n)=>`${null!=n?n:hr}/${yr}/${e}/adjustments/${t}.json`)(e,n,t),i=Er.getAdjustment(o);if(i)return i;const r=zt.get(o,{timeout:mr}).catch(e=>(s("Failed to fetch native template adjustment",{error:e,url:o}),null));return Er.setAdjustment(o,r),r},Ar=(e,t,n)=>_e(void 0,void 0,void 0,function*(){const o=((e,t)=>`${null!=t?t:hr}/${yr}/${e}/default.json`)(e,n);let i=Er.getTemplate(o);i||(i=zt.get(o,{timeout:mr}).catch(e=>{throw s("Failed to fetch native template",{error:e,url:o}),Er.deleteTemplate(o),e}),Er.setTemplate(o,i));const r=Tr(e,n,t),[a,d]=yield Promise.all([i,r]);return{schema:a,adjustment:d}}),Sr={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},Pr=(e,t)=>{var n,o,i;const a=Object.assign({},e);a.overrides=e.overrides?r({},e.overrides,Sr):e.overrides;for(const d of Object.keys(t)){const s=t[d];if(!s)continue;const l=s[e.id];if(!l)continue;const c=null!==(o=null===(n=a.overrides)||void 0===n?void 0:n[d])&&void 0!==o?o:{},u=r(c,l,Sr);a.overrides=Object.assign(Object.assign({},null!==(i=a.overrides)&&void 0!==i?i:{}),{[d]:u})}return e.children&&(a.children=e.children.map(e=>Pr(e,t))),a},Or="desktop",jr="mobile",$r="container",Lr="text",_r="image",Nr="cogwheel",qr=(e,t)=>{var n,o,i,r,a,d;const s=null===(n=e.overrides)||void 0===n?void 0:n[t];if(null!==(o=null==s?void 0:s.hidden)&&void 0!==o?o:e.hidden)return null;const l=Object.assign(Object.assign({},e.styles),null!==(i=null==s?void 0:s.styles)&&void 0!==i?i:{}),c=null!==(r=null==s?void 0:s.tag)&&void 0!==r?r:e.tag,u=null!==(a=null==s?void 0:s.text)&&void 0!==a?a:e.text,p=null===(d=e.children)||void 0===d?void 0:d.map(e=>qr(e,t)).filter(e=>null!==e),v={id:e.id,tag:c,type:e.type,name:e.name,styles:l,connections:e.connections};return void 0!==u&&(v.text=u),void 0!==p&&(v.children=p),v},Mr=e=>Object.entries(e).map(([e,t])=>`${(e=>e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()))(e)}:${(e=>String(e).replace(/"/g,"""))(t)}`).join(";"),Dr={microsoftMonetize:{title:"title","body-text":"body",description:"body","sponsored-by":"sponsoredBy","call-to-action":"cta","display-url":"clickUrl","desc-2":"desc2",image:"image",icon:"icon","title-1":"customTitle1","title-2":"customTitle2","title-3":"customTitle3","title-4":"customTitle4","icon-1":"customIcon1","icon-2":"customIcon2","custom-display-url-1":"customDisplayUrl1","custom-body-1":"customBody1","custom-body-2":"customBody2","custom-body-3":"customBody3","custom-body-4":"customBody4","custom-body-5":"customBody5"}},Br=(e,t)=>{const n=e[t];return null==n?"":"object"==typeof n&&"content"in n?n.content:"object"==typeof n&&"url"in n?n.url:String(n)};class Fr{constructor(e,t=!1){this.tag=e,this.voidElement=t,this.attributes=new Map,this.content=""}attr(e,t){return t&&this.attributes.set(e,t),this}children(e){return this.content=e,this}build(){const e=[...this.attributes].map(([e,t])=>` ${e}="${t}"`).join("");return this.voidElement?`<${this.tag}${e}>`:`<${this.tag}${e}>${this.content}</${this.tag}>`}}const Rr=(e,t,n="")=>{var o;return(null===(o=e.connections)||void 0===o?void 0:o.length)?((e,t)=>{const n=[];for(const o of e){const e=Dr[o.server];if(e)for(const i of o.properties){const o=e[i];if(!o)continue;const r=Br(t,o);r&&n.push(r)}}return n.join(" ")})(e.connections,t):n},Ur=(e,t,n,o)=>{var i;const{tag:r,styles:a}=e,d=(null!==(i=e.children)&&void 0!==i?i:[]).map(e=>zr(e,t,n,!1)).join(""),s=new Fr(r);return o(s),s.attr("href","a"===r?Rr(e,t):"").attr("style",Mr(a)).children(d).build()},Vr={[$r]:(e,t,n,o)=>{var i;const r=null!==(i=n.publisher)&&void 0!==i?i:"shared";return Ur(e,t,n,t=>{o&&t.attr("class",`advertory-${r}-ad-native-${e.name.toLowerCase()}`)})},[Nr]:(e,t,n)=>Ur(e,t,n,e=>{n.containerId&&e.attr("id",`${n.containerId}-button`)}),[Lr]:(e,t)=>{var n;return new Fr(e.tag).attr("style",Mr(e.styles)).children(Rr(e,t,null!==(n=e.text)&&void 0!==n?n:"")).build()},[_r]:(e,t)=>new Fr("img",!0).attr("style",Mr(e.styles)).attr("src",Rr(e,t)).build()},zr=(e,t,n,o=!0)=>{const i=Vr[e.type];return i?i(e,t,n,o):""},Hr=e=>(t,{publisher:n,containerId:o,deviceType:i})=>((e,t,n,o,i)=>{const r=qr(e.root,n);return r?zr(r,t,{breakpoint:n,publisher:o,containerId:i}):null})(e,t,(e=>e===G?jr:Or)(i),n,o),Wr="default",Kr=(e,t)=>_e(void 0,void 0,void 0,function*(){var n,o,i,a,d;const l=document.querySelector(`#${e.targetId}`);if(!e.native||!l)return;const{desc2:c}=e.native,u=null==c?void 0:c.toLowerCase(),p=((e,t)=>{const n=B(D),o=new URLSearchParams(window.location.search).get(D),i=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?i?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null})(e.targetId,null!=c?c:Wr),v=(null!=p?p:u)||Wr,g=null===(n=t.pageContext)||void 0===n?void 0:n.publisher;try{const{schema:n,adjustment:s}=yield Ar(v,g,null===(o=t.editory)||void 0===o?void 0:o.editoryUrl),l=s?((e,t)=>t.overrides?Object.assign(Object.assign({},e),{root:Pr(e.root,t.overrides)}):r({},e,Sr))(n,s):n,c=Hr(l),u={publisher:g,pageType:null===(i=t.pageContext)||void 0===i?void 0:i.pageType,deviceType:null===(a=t.pageContext)||void 0===a?void 0:a.deviceType,appearanceConfig:t.appearanceConfig,nativeTrackingConfig:t.nativeTrackingConfig,containerId:e.targetId,clickLinkSelector:"a"},p=c(e.native,u),{enabled:h=!0}=null!==(d=t.nativeTrackingConfig)&&void 0!==d?d:{};wr(e.targetId,p,u,()=>{Dn(e.targetId),h&&((e,t)=>{br(e,t),xr(e,t)})(e,u)})}catch(e){s("Failed to render native ad from config",{error:e})}}),Gr=e=>_e(void 0,void 0,void 0,function*(){if(!(e=>{const{editory:{editableConfiguration:{enabled:t=!1,pageTypeToFetch:n}={}}={},siteSpecificConfig:o}=e;return Boolean(t&&n&&(null==o?void 0:o.publisherClassName))})(e))return e;try{const t=yield fr(e);return t?((e,t)=>r(t,e,gr))(e,t):e}catch(t){return s("Error fetching S3 config, using site config",{error:t}),e}});let Jr,Xr=[];const Qr=["takeover","wallpaper"],Yr=e=>{const t=(e=>{var t;const n=z.getData("alertoryConfigKeywords"),{queryConfig:o,placements:i,tcf:r,glimr:a,appearanceConfig:d,pageContext:{publisher:s,countryCode:l,pageType:c,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y,fullWidth:f}=e,w=null!==(t=null==o?void 0:o.batchSize)&&void 0!==t?t:u;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:s,countryCode:l,pageType:c,deviceType:p,isMobileApp:v},pageSetup:h,placements:i,tcf:r,queryConfig:Object.assign(Object.assign({},o),{batchSize:w})},a&&{glimr:a}),d&&{appearanceConfig:d}),m&&{takeover:m}),y&&{fullscreenScroll:y}),f&&{fullWidth:f})}})(e);window.advertory={initialized:!0,version:"3.6.1",siteConfig:e,alertoryConfig:t}},Zr=()=>_e(void 0,void 0,void 0,function*(){const{pageOptions:e}=v.get(),{preparePageOptions:t}=v.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=v.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"]}})(),o=yield _e(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=v.get();return(yield Fe(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),i=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),o));(e=>{const t=z.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=ai(e);z.setData("alertoryConfigKeywords",n)})(i.keywords),I(()=>Jr.setPageOpts(i))}),ea=e=>_e(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:o,countryCode:i}}=v.get(),r=yield Fe(n,o,i,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>R(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);ta(a);(null==t?void 0:t.enabled)&&r&&!F()?(s("core loadPlacements prebid enabled"),yield Un()):(s("core load tags invoked without prebid enabled"),na(a))}),ta=e=>{const{prepareTag:t}=v.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const o=t.findIndex(t=>e.targetId.includes(t)),i=t.findIndex(e=>n.targetId.includes(e));return-1!==o&&-1===i?-1:-1===o&&-1!==i?1:o-i})})(e).forEach(e=>{s("core defineTags",{placement:e});const o=ni(e);if(oi(e.targetId)){const i=t(o),r=(e=>{const{allowedFormats:t,invCode:n,keywords:o,sizes:i}=e;return{adTypes:t,invCode:n,keywords:ri(o),sizes:i}})(i);n.push(r),I(()=>(s("core defineTag - add to the queue",{placement:e,preparedTag:i}),Jr.defineTag(i)))}}),(e=>{var t,n,o;(null===(o=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===o?void 0:o.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},na=e=>{const t=e.filter(({targetId:e})=>oi(e)).map(({targetId:e})=>e);t.length&&I(()=>(s("core loadTags",{placementsIdsToLoad:t}),Jr.loadTags([...t])))},oa=(e,t)=>_e(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:o}}=v.get(),{requestThreshold:i,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),d=null==n?void 0:n.defaultThreshold[o];a&&(s("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:i,deviceDefaultThreshold:d}),yield _o(a,null!=i?i:d)),a&&(null==r?void 0:r.scroll)&&(s("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),ia=e=>e.some(({targetId:e})=>Qr.some(t=>e.includes(t))),ra=e=>_e(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,o]=(e=>e.reduce(([e,t],n)=>{var o;return(null===(o=null==n?void 0:n.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),i=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=u}={},pageContext:{deviceType:o}}=v.get(),i=ae(e),r=Object.keys((null==t?void 0:t[o])||{}).map(e=>i[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,...Ho(d,n)]})(o);for(const e of i)ia(e)?(s("core loadAds without lazy loading",{placementsToLoad:e}),yield ea(e)):e.length&&(s("core loadAds with lazy loading",{placementsToLoad:e}),yield aa(e));const{finnBlink:r}=v.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ad});yield e(n)}}),aa=e=>_e(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=v.get(),o=[];if(!t)return s("lazy load is not enabled",{placements:e}),void(yield ea(e));const i=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:o,placements:e});const i=e.every(e=>o.includes(e.targetId)),r=e.map(e=>e.targetId);!i&&o.push(...r),!i&&ea(e),s("lazy load is enabled - handler stop",{loadedTargetIds:o,placements:e,arePlacementsLoaded:i,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}),i.observe(t))})}),da=()=>_e(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=v.getHandlers(),{wallpaper:n,fullscreenScroll:o}=v.get(),i=[];I(()=>{Jr.onEvent("adRequested",()=>{e.adRequested()}),Jr.onEvent("adAvailable",i=>_e(void 0,void 0,void 0,function*(){var r,a,d,l,c,u;s("core adAvailable start",{placementsAvailable:Xr,adObj:i,isFullscreenScrollAd:fe(i),isFinnBlink:Te(i.targetId),isNativeAd:we(i),isMediation:ii(i),isTakeoverAd:ke(i),isCollapseAd:Ce(i),isWallpaperAd:Ie(i)});const p=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[i.targetId])||void 0===d?void 0:d.adResponse.ads;if(ii(i)&&p&&(null===(l=p[1])||void 0===l?void 0:l.rtb)&&(i.banner=null===(u=null===(c=p[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),fe(i)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Mn});e(i)}const{widescreenSwitching:g}=v.get();if(Pe(i)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return cd});e()}if(fe(i)&&!Te(i.targetId)){s("core adAvailable: creating fullscreen scroll container",{targetId:i.targetId,width:i.width,height:i.height,bannerWidth:i.banner&&"object"==typeof i.banner?i.banner.width:i.banner,bannerHeight:i.banner&&"object"==typeof i.banner?i.banner.height:void 0});const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Mn});e(i,o)}if(!we(i)||ii(i)||Te(i.targetId)||null==t||t(i,v.get()),ke(i)&&!Ce(i)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Sd});e(i.targetId),yield t(i)}if(Ie(i)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return N});e(()=>I(()=>window.apntag.showTag(i.targetId)),n),z.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(i)&&z.setData("horseshoe",{isAvailable:!0}),e.adAvailable(i);const h=Xr.find(({targetId:e})=>e===i.targetId);h&&(yield oa(h,i),Xr=Xr.filter(e=>e.targetId!==h.targetId)),s("core adAvailable stop",{placementsAvailable:Xr,adObj:i,isFullscreenScrollAd:fe(i),isFinnBlink:Te(i.targetId),isNativeAd:we(i),isMediation:ii(i),isTakeoverAd:ke(i),isCollapseAd:Ce(i),isWallpaperAd:Ie(i)})})),Jr.onEvent("adLoaded",n=>_e(void 0,void 0,void 0,function*(){const{refreshConfig:o,appearanceConfig:r,wallpaper:a,adScaleConfig:d}=v.get(),s=document.getElementById(n.targetId);if(Te(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return Za});e(n)}if(i.includes(n.targetId)&&we(n)&&(null==t||t(n,v.get()),ut({adObj:n})),!i.includes(n.targetId)&&ii(n)&&i.push(n.targetId),Ce(n)&&R(n.targetId),ke(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Sd});e(Jr,n.targetId)}if((e=>$e(e,le))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return $d});e(n)}if((e=>$e(e,ue))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return $d});e(n)}if(be(n)){const{applyFullwidthFormat:e}=yield Promise.resolve().then(function(){return $d});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,o=document.querySelector(`#${n}`),i=null==o?void 0:o.parentElement;if(!i||!o)return;Uo({adWrapper:i,placementContainer:o});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();o&&"true"!==o.dataset.subscribedForRefresh&&(o.dataset.subscribedForRefresh="true",o.dataset.refresh&&zo(o,a,r))})(n,o),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(z.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return N});e(n.targetId)}if(null==d?void 0:d.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return wt});e(n),t(n)}e.adLoaded(n),Dn(n.targetId),s&&(s.classList.add(Fn),(e=>{var t,n;const{pageSectionsSelectors:o}=v.get(),i=null==o?void 0:o.mainFirstColumn,r=i?null===(t=document.querySelector(i))||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)),ut({adObj:n}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const o=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;o&&((e,t)=>{const{height:n,width:o,native:i}=e;i?t.dataset.adSizes="[1,1]":n&&o&&(t.dataset.adSizes=`[${o},${n}]`)})(e,o)})(n),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:pt(n)}}))})),Jr.onEvent("adNoBid",t=>_e(void 0,void 0,void 0,function*(){var n;if(R(t.targetId),null===(n=v.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return xo});yield e(v.get(),t)}if(ke(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return lt});yield e(t)}e.adNoBid(t)})),Jr.onEvent("adError",(t,n)=>_e(void 0,void 0,void 0,function*(){if(ke(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return lt});yield e(n)}e.adError(t,n)})),Jr.onEvent("adCollapse",()=>{e.adCollapse()}),Jr.onEvent("adRequestFailure",t=>_e(void 0,void 0,void 0,function*(){R(t.targetId),yield bo(v.get(),t),e.adRequestFailure(t)})),Jr.onEvent("adBadRequest",t=>_e(void 0,void 0,void 0,function*(){R(t.targetId),yield bo(v.get(),t),e.adBadRequest(t)})),Jr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),Jr.onEvent("adNoBidMediated",t=>_e(void 0,void 0,void 0,function*(){yield bo(v.get(),t),e.adNoBidMediated(t)}))})}),sa=(e,t)=>_e(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:o,reloadExistingAds:i,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(o)return K(),[];i&&(K(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{U(e.id)})),g(null!=e?e:{}),yield Zr();const{clientSidePlacements:d,serverSidePlacements:s}=ur(ie(a));let l=d;return r&&(l=l.filter(e=>Te(e.targetId))),vr(s,v.get()),l.length>0&&(Xr=[...Xr,...l.map(e=>Object.assign({},e))],Go(l),Xo(l),yield ra(l)),Xr}),la=(e,t)=>_e(void 0,void 0,void 0,function*(){var n;v.set(e),v.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:o,kilkaya:i,rightColumnSplit:r,drEdition:a,finnBlink:d}=e;if(z.initialize(),window.addEventListener("message",$o,!1),Jr=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=Jr,s("Apn tag is set up on window"),yield Promise.allSettled([_e(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=v.get();(yield Fe(e,t,n,"xandr-endpoint"))||Jr.setEndpoint("ib.adnxs-simple.com",!0)}),_e(void 0,void 0,void 0,function*(){if(F())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:o}}=v.get(),i=yield Fe(t,n,o,"prebid");(null==e?void 0:e.enabled)&&i&&(yield ln(null==e?void 0:e.prebidUrl))}),nn(e),_e(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=v.get();yield ln(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),_e(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:o}}=v.get();(yield Fe(t,n,o,"gpt-endpoint"))&&(yield ln(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),_e(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:o,countryCode:i}}=v.get(),{getConsentAsync:r}=Be(n,0,i),a=yield r();if(e&&t&&a){if(yield ln(t),document.querySelector(`.${li}`))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(li)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Pt(),_e(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=v.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield ln(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==o?void 0:o.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return _d});yield e()}s("Libraries have been loaded and trackers have been set"),yield da(),yield Zr(),s("Page options have been set"),Yr(e),s("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=ur(ie());if(Xr=l,vr(c,e),Go(Xr),Xo(Xr),yield ra(Xr),s("Ads has been loaded",Xr),ko(e,Xr),di(Xr),null==d?void 0:d.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ad});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 xo});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Vd});t(e.rightColumnSplit)}if(null==i?void 0:i.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return ss});yield t(e)}}),ca=(e,t)=>_e(void 0,void 0,void 0,function*(){yield((e,t)=>_e(void 0,void 0,void 0,function*(){var n,o;const{initConsentManager:i,getConsentAsync:r}=Be(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(o=e.pageContext)||void 0===o?void 0:o.countryCode),a=yield Gr(e);yield yo(),yield si(i),yield si(r),s("TCF resolved successfully"),yield la(a,t),s("Run function resolved successfully")}))(e,t)}),ua=(e,t,n,o)=>{var i;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,customBody1:w,customBody2:b,customBody3:k,customBody4:x,customBody5:I,customIcon1:C,customIcon2:E,customDisplayUrl1:T}=e,A=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:A(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=o.appearanceConfig)||void 0===e?void 0:e.theme)&&C;return A(t?C:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(i=null!=u?u:g)&&void 0!==i?i:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",customBody1:null!=w?w:"",customBody2:null!=b?b:"",customBody3:null!=k?k:"",customBody4:null!=x?x:"",customBody5:null!=I?I:"",logo2:A(E),previewVideoSrc:null!=T?T:""},t)},pa=(e,t)=>{const n=B(D),o=new URLSearchParams(window.location.search).get(D),i=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?i?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},va=(e,t,n,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:o,pageType:i}=t,r=o&&Object.values(kt).includes(o);n&&r&&nr(o,e,ir,i)})(i,n),o())},ga=(e,t,n)=>{const o=((e,t,n)=>{var o;const{displayTemplates:i,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(o=pa(e.targetId,l))&&void 0!==o?o:c,p=On[t.language||h.NO],v=ua(d,p,s,t);return(d.video?r[u]:i[u]||i.default)(v,t)})(e,t,n);va(e.targetId,o,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&rr(e,t)})},ha=e=>(t,n)=>{var o;const{targetId:i}=t,r=document.querySelector(`#${i}`);if(!r)return;const a=e.getOptions(null!=n?n:{});ga(t,a,e.templates),null===(o=e.postProcess)||void 0===o||o.call(e,t,r)},ma=()=>{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},ya=e=>{const{siteSpecificConfig:t}=v.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))};class fa{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return _e(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 _e(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const wa=9826;class ba{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e,isMobileApp:t}}=v.get();if(t){return{"aa-sch-supply_type":`app_${e===G?"phone":J}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return _e(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 _e(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return(()=>{const e=Re("_pulse2data");return e?e.split(",")[2]:void 0})()}getExternalUid(){return _e(this,void 0,void 0,function*(){return yield Ue(v.get())})}isTrackingForbidden(){return _e(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=wa}={}}=v.get();return"true"===q("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=v.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return _e(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=v.get(),{getConsentAsync:o}=Be(e,0,n);return{"aa-sch-cmp_advertising":(yield o())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=v.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 ka=new ba;function xa(e=!1){var t,n;const o=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),i=vt();return{OS:i,mobileOS:["ios","android"].includes(i)?i:"unknown",isHybridApp:o.includes("hermes"),appMode:e?"hybrid":"notinapp"}}ka.prepare.bind(ka);const Ia=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Ca(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Ia.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Ea extends ba{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=v.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=v.get(),{OS:n,isHybridApp:o}=xa(t);return{"no-sno-apptype":n&&e&&o?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Ca(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:o}}=v.get(),i=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":`${i.split("_").pop()||i}_${"article"===o?"article":"front"}`}}}const Ta=new class extends Ea{prepare(e){return _e(this,void 0,void 0,function*(){var t,n,o,i,r,a,d;const s=v.get(),l=null!==(o=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==o?o:{},c=null!==(a=null===(r=null===(i=s.pageSetup)||void 0===i?void 0:i.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(d=s.siteSpecificConfig)||void 0===d?void 0:d.publisherClassName,p=new fa;yield p.addAsync(this.getAdvertisingConsentKeywords()),yield p.addAsync(Nt(s,l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield p.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),p.add(this.getSupplyTypeKeywords()).add(rn()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{});const g=p.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:g,user:Object.assign(Object.assign({},on(h.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Aa=Ta.prepare.bind(Ta);class Sa extends ba{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=v.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,o=document.documentElement.clientHeight;return{width:e||n||0,height:t||o||0}}(),t={width:null!==(o=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==o?o:0,height:null!==(r=null===(i=window.screen)||void 0===i?void 0:i.height)&&void 0!==r?r:0};var n,o,i,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return _e(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=v.get(),{appMode:t,mobileOS:n}=xa(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:o}}=v.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"===o?"article":"front"}`}}}const Pa=new class extends Sa{prepare(e){return _e(this,void 0,void 0,function*(){var t,n,o,i,r,a;const d=v.get(),s=null!==(o=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==o?o:{},l=null!==(a=null===(r=null===(i=d.pageSetup)||void 0===i?void 0:i.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new fa;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(Nt(d,s.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>_e(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(rn()).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"===Re("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),p=!1!==s.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},on(h.SE)),p?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Oa=Pa.prepare.bind(Pa),ja="viewable",$a="adClick";var La=e=>(t,n,o)=>{const{video:i,img:r,url:a}=t,{publisher:d,productTag:s}=n,{pluginsNames:l,videoLoop:c}=o||{};if(!(null==i?void 0:i.content))return null;const u=Math.ceil(1e5*Math.random()),p=r||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${u}`,g=_a(i.content,a),h=Na({id:u,nodeId:v,poster:p,tagURL:g,publisher:d,productTag:s,videoLoop:c});return qa({playerConfig:h,clickUrl:a,pluginsNames:l}),`${e(t,n,v)}`};const _a=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),o=n.querySelector("ClickThrough"),i=n.querySelector("VideoClicks");if(o){for(;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(n.createCDATASection(t))}else if(i){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),i.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},Na=({id:e,nodeId:t,poster:n,tagURL:o,publisher:i="",productTag:r="xandr",videoLoop:a=!1})=>({id:e,poster:n,vendor:"appnexus",node:t,mute:!0,autoplay:a,repeat:a,skin:{name:"inventory-player",url:"https://ads.inventory.schibsted.io/styles/player.css"},settings:{jw:{stretching:"fill",advertising:{client:"vast",tag:o}}},pulse:{provider:i.toLowerCase(),decorator:e=>Object.assign(Object.assign({},co(e)?e:{}),{provider:Object.assign(Object.assign({},co(null==e?void 0:e.provider)?e.provider:{}),{productTag:r})})}}),qa=e=>_e(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:o}=e,{repeat:i}=t,r=yield oo(t);ro(n),r.once("assetReady",()=>{no(r,n)}),r.on(ja,e=>{const{viewable:t}=e;t?r.play():r.pause()}),r.on($a,()=>{window.open(o,"_blank")}),i&&r.on("pause",()=>{r.play()})}),Ma=({containerId:e,url:t,body:n,title:o,logo:i,isContentVideoAd:r=!1,imgWidth:a})=>{const d=`\n <div class="ad-header">\n <span>ANNONSØRINNHOLD</span>\n ${i?`<img alt="" aria-hidden="true" class="ad-logo" src="${i}" />`:""}\n </div>\n `,s=`<div class="ad-text">${o}</div>`;return`\n <div id="${e}" class="advertory-godt-ad-content" ${a?`style="max-width: ${a}px"`:""}>\n <div class="ad-info" id="${e}-button"></div>\n ${r?`\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 `},Da=["IntegrationMenu"],Ba=({containerId:e},t,n)=>` <div id="${e}" class="advertory-godt-ad-weekly-menu">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-video-wrapper">\n <div id="${n}"></div>\n </div>\n <span class="ad-label">${On.no.adText}</span>\n </div>`;Sn('@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}}'),Sn('.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 Fa={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:o,img:i,adText:r})=>(Promise.resolve().then(function(){return ls}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${o}" class="ad-image" src="${i}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${o}</div>\n </div>\n </div>\n </a>\n </article>`)},Ra={default:Fa.NATIVE_TEMPLATE,content:({containerId:e,url:t,title:n,img:o,imgWidth:i,imgHeight:r,logo:a,imgAltText:d})=>{const s=yt(i,r);return Ma({containerId:e,url:t,title:n,logo:a,imgWidth:i,body:`\n<div class="ad-image-wrapper" ${s?`style="padding-bottom: ${100*s}%"`:""}>\n <img alt="${d}" class="ad-image" src="${o}" />\n</div>`})},contentVideo:(e,t)=>La(({containerId:e,url:t,title:n,logo:o},i,r)=>Ma({containerId:e,url:t,title:n,isContentVideoAd:!0,logo:o,body:`\n<div class="ad-video-wrapper">\n <div id="${r}"></div>\n</div>`}))(e,t),nativeVideo:(e,t)=>La(({containerId:e,url:t,sponsoredBy:n,title:o},i,r)=>(({containerId:e,url:t,sponsoredBy:n,body:o,title:i})=>`\n<div id="${e}" class="advertory-godt-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">${On.no.adFrom} ${n}</div>\n ${o}\n <div class="ad-text">${i}</div>\n </a>\n</div>`)({containerId:e,url:t,sponsoredBy:n,title:o,body:`\n<div class="ad-video-wrapper">\n <div id="${r}"></div>\n</div>`}))(e,t),weeklyMenuVideo:(e,t)=>La(Ba)(e,t,{videoLoop:true,pluginsNames:Da}),weeklyMenuStripe:({title:e,logo:t})=>`<div class="advertory-godt-ad-weekly-menu-stripe">\n <span class="ad-text">${e}</span>\n <img alt="" aria-hidden="true" class="ad-logo" src="${t}" />\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n var disclaimer = e.target.closest('button').nextElementSibling;\n\n if (disclaimer.style.display === 'none') {\n disclaimer.style.display = 'block';\n } else {\n disclaimer.style.display = 'none';\n }\n } catch (error) {}\n })(arguments[0]);return false;"\n >\n <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="M14.25 16.5h-.75A1.5 1.5 0 0 1 12 15v-3.75a.75.75 0 0 0-.75-.75h-.75M11.625 6.75a.375.375 0 1 0 0 .75.375.375 0 0 0 0-.75v0"/><path clip-rule="evenodd" d="M12 23.25c6.213 0 11.25-5.037 11.25-11.25S18.213.75 12 .75.75 5.787.75 12 5.787 23.25 12 23.25Z" fill-rule="evenodd"/></g></svg>\n </button>\n <div class="disclaimer" style="display: none">\n Annonsøren som presenterer ukemenyen har betalt for profilering av logoen på VG-forsiden og Godt.no, og annonsen mellom oppskriftene.\n <a href="https://www.vg.no/informasjon/redaksjonelle-avgjorelser/232" target="_blank">\n Les mer\n </a>\n </div>\n </div>`,weeklyMenu:({containerId:e,url:t,img:n,imgAltText:o})=>`<div id="${e}" class="advertory-godt-ad-weekly-menu">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}"rel="noopener nofollow sponsored">\n <img alt="${o}" class="ad-image" src="${n}" />\n <span class="ad-label">${On.no.adText}</span>\n </a>\n</div>`,sponsorstripe:({title:e,logo:t})=>`\n <div class="advertory-godt-sponsorstripe">\n <div class="ad-container">\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n const root = e.target.closest('.advertory-godt-sponsorstripe');\n root.classList.add('disclaimer-visible');\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">${e}</span>\n <img alt="" aria-hidden="true" class="ad-logo" src="${t}" />\n </div>\n <div class="disclaimer">\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n const root = e.target.closest('.advertory-godt-sponsorstripe');\n root.classList.remove('disclaimer-visible');\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 og innhold på Godt.no\n <a href="https://www.vg.no/informasjon/redaksjonelle-avgjorelser/232" target="_blank">\n Les mer\n </a>\n </div>\n </div>\n </div>`},Ua={displayTemplates:{default:Ra.default,content:Ra.content,"ukesmeny-stripe":Ra.weeklyMenuStripe,ukesmeny:Ra.weeklyMenu,sponsorstripe:Ra.sponsorstripe},videoTemplates:{default:Ra.nativeVideo,content:Ra.contentVideo,menu:Ra.weeklyMenuVideo}},Va={prepareTag:e=>{var t;const{keywords:n,targetId:o,invCode:i,dynamicSizeWidthCheck:r,globalPlacementId:a}=e,{pageSetup:d,pageContext:{countryCode:s}}=v.get(),{tag:{useAppTabletInvCode:l=!0}={}}=null!=d?d:{},c=((e,t)=>{const{pageContext:{isMobileApp:n}}=v.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(i,l),u=(e=>{const{pageContext:{countryCode:t}}=v.get(),{keywords:n,dynamicSizeWidthCheck:o}=e,i=`${m(t)}-adformat`,r=n?n[i]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in ye)||window.innerWidth>=ye[e]);return{[i]:o?a:r}})(e),p=(e=>{const{pageContext:{countryCode:t}}=v.get(),n=`${m(t)}-targetid`;return e?{[n]:[e]}:{}})(o),g=(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}})(c),h=ma(),y=(e=>ya(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(i),f=((e,t)=>ya(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(i,{safeFrameAutoInitialSize:!0}),w=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,b=(new fa).add(null!=n?n:{}).add(u).add(p).add(null!=g?g:{}).add(y).add(h).addIf(null===(t=null==d?void 0:d.tag)||void 0===t?void 0:t.reloadKeywords,{[`${m(s)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:w,invCode:c,keywords:b,rendererOptions:f,globalPlacementId:a||c})},preparePageOptions:e=>_e(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t}}=v.get();return yield t===h.SE?Oa(e):Aa(e)}),siteEvents:bt,initNativeAd:(e,t)=>{var n,o,i;if(null===(o=null===(n=null==t?void 0:t.editory)||void 0===n?void 0:n.adNativeBuilder)||void 0===o?void 0:o.enabled)return void Kr(e,t);const{targetId:r}=e;if(!document.querySelector(`#${r}`))return;const{pageType:a=to.FRONT,deviceType:d}=null!==(i=null==t?void 0:t.pageContext)&&void 0!==i?i:{},{nativeTrackingConfig:s,appearanceConfig:l}=null!=t?t:{},c={language:h.NO,publisher:kt.GODT,deviceType:d,pageType:a,nativeTrackingConfig:s,appearanceConfig:l};ga(e,c,Ua)}},za=((e,t)=>({init:n=>ca(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:sa,getVideoPPIDs:sn,createInitNativeAd:ha,getVideoAdsConfig:Ji}))(Va,xt),Ha=Sn("[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 Wa=Object.freeze({__proto__:null,default:Ha});Sn('.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 Ka={Blink:"Blink"},Ga=new Map,Ja=e=>{var t;if(!Ga.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Ka)){const o=e[t];null!=o&&(window[n]=o)}})(e)).catch(t=>{throw Ga.delete(e),t});Ga.set(e,t)}return null!==(t=Ga.get(e))&&void 0!==t?t:Promise.resolve()},Xa="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",Qa=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:o}}=v.get(),i=document.querySelector(`#${e}`);if(!i)return;if(i.classList.add("disable-cogwheel"),!n)return;nr(n,i,or,null!=t?t:o);ut({preferredTestIdData:{targetId:e,testId:"finn"}})},Ya=e=>{const{pageContext:{publisher:t=""}}=v.get(),n=document.querySelector(`#${e}`);if(!n)return;const o=`-${t}`;n.classList.remove(`advertory${o}-finn-blink`),n.classList.remove(`advertory${o}-finn-blink-wrapper`)};var Za=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=v.get(),{initNativeAd:n}=v.getHandlers();fe(e)&&Nn(e,t),we(e)&&(null==n||n(e,v.get()))},finnBlinkLoaded:Qa,xandrAdLoaded:Ya});const ed=e=>{var t,n;const o=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==o?void 0:o.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},td=(e,t)=>{const{finnBlink:{enabled:n}={}}=v.get(),o=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!o||!n)return null;const{height:i,requireImage:r,position:a,offset:d}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${ed(e)}`,enabled:o,position:null!=a?a:e,height:null!=i?i:100,offset:null!=d?d:200,requireImage:r,advertoryTheme:null==t?void 0:t.advertoryTheme}},nd=(e,t,n)=>_e(void 0,void 0,void 0,function*(){const{placements:o,pageContext:{deviceType:i},appearanceConfig:r}=v.get();s(`rendering finn blink ad for ${e}`);const a=b(e),d=o[i].find(e=>e.targetId===a),l=td(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 Ya(e);if((e=>{var t;const n=ed(e),o=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==o?void 0:o.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void s(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:p}=t,{sdkPayload:{channel:g}={}}=null!=p?p:{},h=null!=g?g:`${c}.${u}`,m="dark"===(null==r?void 0:r.theme)?"dark":"light";try{const e=yield _e(void 0,void 0,void 0,function*(){const{ppid1:e}=tn.getPPIDs();return e});yield(y=Object.assign(Object.assign({},l),{channel:h,userId:e,theme:m}),_e(void 0,void 0,void 0,function*(){const{userId:e,theme:t}=y,n=Le(y,["userId","theme"]),o=window[Ka.Blink];if(!o)return;const i=new o({remote:"https://www.finn.no/distribution-front/external/carousel",userId:e,theme:t});yield i.inject(Object.assign({},n))})),Qa(l.selector.replace("#",""),l.advertoryTheme)}catch(t){s(`Finn blink error ${t}`),n&&n(e),!n&&R(e),Ya(e)}var y}),od=()=>_e(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=v.get();return!!(yield Fe(e,t,n,"finn-blink"))||(s("Skip loading finn blink ad due to missing TCF consent."),!1)}),id=(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}`)},rd=e=>document.querySelector(`#${e}`);var ad=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>_e(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=v.get(),o=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,i=rd(n);i&&(yield _o(i,null!=e?e:o))}}),loadFinnBlinkAd:(e,t,n,o)=>_e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:i}}=v.get();if(s(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield od())||i)return n&&n(e),Ya(e),void(!n&&R(e));try{yield Ja(Xa)}catch(e){console.error(e)}yield nd(e,t,n),o&&o()}),replaceAdsWithFinnBlink:(e,t)=>_e(void 0,void 0,void 0,function*(){var n,o;if(!t)return;const{replacementConfig:i}=t,r=null===(n=null==i?void 0:i.adsToReplace)||void 0===n?void 0:n[e],a=null===(o=null==i?void 0:i.sizes)||void 0===o?void 0:o[e];fo()&&r&&a&&t.enabled?(yield od())&&(yield Ja(Xa),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const o=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=v.get(),n=document.createElement("div"),o=document.createElement("div");return o.id=e,n.appendChild(o),nr(t,o,or),s(`Creating blink container for: ${e}`),n})(t);(e=>{s(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),id(n,o),n.dataset.finnBlinkId=t,Lo().withFullAdsChain(e)})):s(`Finn blink configuration is incorrect: ${JSON.stringify(i)}`)})});const dd=1e4,sd=e=>e.some(e=>e.some(e=>!!e&&Ko(e,0)));let ld;var cd=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=v.get(),{enabled:t,options:{rotationInterval:n=dd,widescreenIdPrefix:o}={}}=null!=e?e:{};if(!t)return;const i=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=v.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(o);let r=0,a=Date.now(),d=sd(i);if(!i.length)return;ld&&window.removeEventListener("scroll",ld);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(i);const c=((e,t)=>{let n=null;return(...o)=>{null===n&&(e(...o),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=sd(i)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=i.map(e=>e[r]),n=i.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);ld=c,window.addEventListener("scroll",c)}});const ud="#fff",pd="#0098da",vd=(e,t=!0)=>{(e===ze||e===He)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},gd=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},hd=e=>{document.body.style.overflow=e?"initial":"hidden"},md=e=>{const t=fd(e),n=yd(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),hd(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},yd=e=>{const t=()=>md(e);return window.addEventListener("advertory:closeTakeover",t),gd(),t},fd=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&md(e)};return gd(),window.addEventListener("keydown",t),t},wd=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(fd(e),yd(e),gd(),t.addEventListener("click",()=>{md(e)}),hd(!1))},bd=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),yd(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},kd=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>md(e))})(e)},xd=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=v.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),o=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&o&&(o.style.display="flex",o.innerText=On.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Id=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=On.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Cd=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=On.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Ed=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=On.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Td=()=>{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)},Ad=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${st})()`,e+t.outerHTML})(e)),n};var Sd=Object.freeze({__proto__:null,createTakeoverAd:e=>_e(void 0,void 0,void 0,function*(){const{takeover:t}=v.get(),{targetId:n}=e,o=document.querySelector(`#${n}`),i=document.querySelector(".advertory-takeover-wrapper");if(!o||!i||!t)return;const r=ot(e),a=i.offsetHeight,d=window.scrollY>a;i.style.display="block",!d&&vd(r,!1),((e,t)=>{({[ze]:Cd,[Ve]:xd,[He]:Id,[We]:Ed})[t](e)})(i,r),Td(),((e,t)=>{({[ze]:bd,[He]:bd,[Ve]:wd,[We]:kd})[t](e)})(i,r),((e,t,n)=>{if(!n)return;({[ze]:()=>{const{buttonLabel:o}=at(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=o?o:"")})},[Ve]:()=>{const{themeColors:o,logotype:i,buttonLabel:r,showArrowIcon:a}=at(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=r?r:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&i&&(n.setAttribute("src",i.url),n.setAttribute("alt",i.alt)),".advertory-splash-navbar-wrapper"===t&&o){const{backgroundColor:e,color:t}=o;n.style.setProperty("background-color",null!=e?e:ud,"important"),n.style.color=null!=t?t:pd}}})},[He]:()=>{const{buttonLabel:o,showArrowIcon:i,showCloseButton:r=!0}=at(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||i||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=o?o:""))})},[We]:()=>{}})[t]()})(i,r,t),yield it(),!d&&vd(r,!0),dt(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,o=hn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[o].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,o=hn(e)?1:0,i=null==n?void 0:n.tags[e].adResponse.ads[o].rtb;i&&(i.banner.content=t)})(e,Ad(t))},modifyTakeoverIframe:(e,t)=>{var n;const o="100%",i="100%";e.resizeAd(t,[o,i]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===o&&n===i||(r.style.width=o,r.style.height=i)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const Pd=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Od=(e,t)=>{var n,o;const i=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:r,fullWidthFormatClassName:a}={},fullWidth:d,pageContext:{deviceType:s}}=v.get();if(!i)return null;const l=i.parentElement;if(i.style.width=gt(s)?"100vw":"100%",i.style.position="relative",l&&(l.style.width=gt(s)?"100vw":"100%",l.style.position="relative"),r&&a){const e=`advertory-${r}-${a}`;i.classList.add(`${e}__${t}`),null==l||l.classList.add(`${e}-wrapper__${t}`)}const c=null===(o=null===(n=null==d?void 0:d.options)||void 0===n?void 0:n.styles)||void 0===o?void 0:o[s],u=(null==d?void 0:d.enabled)&&c;return!u&&l&>(s)&&(l.style.left="50%",l.style.marginLeft="-50vw"),u&&c.adContainer&&Pd(i,c.adContainer),u&&c.adContainerWrapper&&l&&Pd(l,c.adContainerWrapper),i},jd=(e,t,n,o)=>{const i=Od(e,o);if(!i)return;const r=i.querySelector("iframe"),a=null==r?void 0:r.parentElement;if(!r||!a)return;const d=i.offsetWidth,s=d/e.width;a.style.transform=`scale(${s})`,a.style.transformOrigin="left top";const l=Math.round(d/t*n);i.style.height=`${l}px`};var $d=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{jd(e,1080,1080,"fullsquare-ad")},applyFullwidthFormat:e=>{const t=Od(e,"fullwidth-ad");if(!t)return;const n=t.querySelector("iframe");if(!n)return;const{deviceType:o}=v.get().pageContext;n.style.width=gt(o)?"100vw":"100%",(null==n?void 0:n.parentElement)&&(n.parentElement.style.width=gt(o)?"100vw":"100%")},applyNinesixteenFormat:e=>{jd(e,1080,1920,"ninesixteen-ad")}});const Ld=e=>e===h.NO?"schibsted":"schibstedse";var _d=Object.freeze({__proto__:null,getCampaign:Ld,loadNorstat:()=>_e(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:o}=v.get(),i=yield Fe(o,n,t,"norstat");if(!e||n||!i)return;const r=(e=>{const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i}=tn.getPPIDs(),r=(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{_e(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const o=document.createElement("img");o.src=e,o.id=null!=t?t:"",n&&(o.style.display="none"),document.body.appendChild(o)})})(`https://sch-map.norstatsurveys.com/api/nids/${Ld(t)}/map/${r}`,"norstat")})});const Nd=".advertory-right-column-track",qd="--advertory-right-column-track-height",Md=e=>e.getBoundingClientRect().top+window.scrollY,Dd=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Bd=(e,t)=>{const n=(o=t,`${Math.max(0,Math.round(o))}px`);var o;document.body.style.setProperty(e,n)},Fd=(e,t)=>`${e}-${t}`,Rd=(e,t,n)=>{var o;const i=Array.from(null!==(o=e.querySelectorAll(t))&&void 0!==o?o:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=Md(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Dd(e);Bd("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const o=Md(e),i=Fd(qd,t),r=o-n,a=Fd("--advertory-right-column-split-point-height",t),d=Dd(e);Bd(i,r),Bd(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Fd("--advertory-right-column-ad-height",t),o=Dd(e);Bd(n,o)})(i[t])});((e,t)=>{const n=Md(e);Bd(qd,n-t)})(r[Math.min(i.length,r.length-1)].point,a)};let Ud=!1;var Vd=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Ud)return;const{splitPointIDs:t,adSelector:n,trackSelector:o=Nd}=e,i=document.querySelector(o);if(!i)return;Ud=!0;const r=()=>{Rd(i,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(i)}});class zd{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class Hd{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class Wd{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:o}=this.parseKilkayaData(e);return{id:o,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return _e(this,void 0,void 0,function*(){var t,n,o,i,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===i||i.call(o,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 _e(this,void 0,void 0,function*(){var t,n,o,i,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(i=(o=this.pulse).trackClickUIElement)||void 0===i||i.call(o,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class Kd extends Wd{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,o,i,r,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),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!==(i=null===(o=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===o?void 0:o.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=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:o}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const Gd="[data-k5a-teaser-analytics]",Jd=(e,t,n)=>{const o=document.querySelectorAll("k5a-stream");if(!o.length)return;const i=new Kd(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,o=n.querySelector(Gd);Boolean(null==o?void 0:o.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(Gd);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});o.forEach(e=>{d.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},Xd=/^glci_/,Qd="gender_",Yd="geo_",Zd="male",es="female",ts=()=>_e(void 0,void 0,void 0,function*(){try{const t=yield(e=500,_e(void 0,void 0,void 0,function*(){return Promise.race([go(),new Promise(t=>setTimeout(()=>t(void 0),e))])})),n=new ho(t),o=yield n.getIdentityUser(),{gender:i}=null!=o?o:{};return i===Zd||i===es?`${Qd}${i}`:void 0}catch(e){return}var e}),ns=()=>_e(void 0,void 0,void 0,function*(){const e=[],t=yield ts(),n=(()=>{const e=Dt().map(e=>`${Yd}${e.replace(Xd,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e});class os{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===to.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:o}=new URL(n),i=o.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class is{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class rs{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class as{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class ds{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const o={[kt.VG]:new zd,[kt.E24]:new os,"no-aftenposten":new is,[kt.BT]:new rs,"no-bergenstidende":new rs,[kt.SA]:new as,"no-stavangeraftenblad":new as}[n]||new Hd;Jd(e.instance,o,t)}injectKilkayaMeta(e){return _e(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield ns();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,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(s(`Kilkaya event for slot: ${n}`),!n)return void s("Kilkaya slot empty, Xandr backfill won't be loaded");const o=n.parentElement;o?(s(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(o)):s("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";U(o)}loadKilkayaScript(e){return _e(this,void 0,void 0,function*(){yield ln(e)})}run(e){return _e(this,void 0,void 0,function*(){var t,n;const{tcf:o,pageContext:{isMobileApp:i,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const d=yield Fe(o,i,r,"kilkaya");d&&(this.observeForKilkayaBackfills(),yield 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 ss=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:o,children:i,pulseData:r,htmlAttributes:a})=>{const d=(e,t)=>{const n={};if(!e)return n;for(const[o,i]of Object.entries(e)){n[t?`${t}-${o}`:o]=String(i)}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":o,style:{display:"none"},children:i})]}))},runKilkaya:e=>_e(void 0,void 0,void 0,function*(){const t=new ds;yield t.run(e)})});Sn('.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 ls=Object.freeze({__proto__:null});module.exports=za;
|
|
1
|
+
"use strict";var e,t,n=require("react/jsx-runtime");function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var 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===o}(e)}(e)},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(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 i(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 o={};return n.isMergeableObject(e)&&a(e).forEach(function(t){o[t]=i(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])?o[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):o[r]=i(t[r],n))}),o}function l(e,t,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||n,o.cloneUnlessOtherwiseSpecified=i;var a=Array.isArray(t);return a===Array.isArray(e)?a?o.arrayMerge(e,t,o):s(e,t,o):i(t,o)}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}(),r=o(i);const a=["placements","takeover","refreshConfig","editory"],d={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))},l=(e,t)=>{console.warn("[Advertory WARN]: ",e)},c=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:o,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||l("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||l("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||l("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||l("pageContext.deviceType is required."),n||l("pageOptions is required."),o||l("placements is required."),(null==i?void 0:i.defaultThreshold)||l("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,o;const i=e.pageSectionsSelectors,r=[{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===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of r)e&&!(null==i?void 0:i[t])&&l(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},u=6;class p{set(e){c(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of a){const o=e[n];void 0!==o&&(t[n]=o)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=r(p.DEFAULT_SITE_HANDLERS,e)}}p.DEFAULT_SITE_HANDLERS={siteEvents:d,initNativeAd:()=>{}};const v=new p,g=v.modifyConfigProperties.bind(v),h={NO:"no",SE:"se"},m=e=>e===h.NO?"no-sno":"se-generic";let y="";const f=new Map,w=e=>{const{pageSetup:{tag:t}={}}=v.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(y!==window.location.pathname&&(f.clear(),y=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),o=null!==(t=f.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=v.get();return`${e}-${t}`})()}-count`]=o,f.set(n,o+1),e})):e},b=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},k="0123456789abcdefghijklmnopqrstuvwxyz",x=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=k[Math.floor(36*Math.random())]}return t},I=e=>{window.apntag.anq.push(e)},C=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),E=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})}),T="advertory-wallpaper-background",A="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${T}`);e&&e.remove()},P=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${T}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},O=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,j=e=>O.test(e),$=e=>e.startsWith("wallpaper:color:"),L=e=>{const t=document.querySelector(`.${T}`);t&&(t.style.backgroundImage=`url(${e})`)},_=e=>{const t=document.querySelector(`.${T}`);t&&(t.style.backgroundColor=e)};var N=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(A),n.classList.add(A))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(T),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&&(P(n),window.addEventListener("scroll",()=>P(n)))})(n),e()},isShortWallpaperColorMessage:$,isShortWallpaperUrlMessage:j,removeWallpaperBackground:S,setWallpaperBackgroundColor:_,setWallpaperBackgroundImage:L});const q=e=>new URLSearchParams(window.location.search).get(e),M="takeover",D="native_override_desc2",B=e=>window.location.href.includes(e),F=()=>null!==q("disable_prebid"),R=e=>{if("0"===q("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())},U=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 V{initialize(){this.DATA=Object.assign({},V.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)}}V.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const z=new V,H=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,o=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${o}px`)},W=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:o}=(e=>{const t=z.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=o},K=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{R(e.id),W(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),o=null==t?void 0:t.getAttribute("data-probable-width");n&&o&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",o+"px"))})(e.id),e.innerHTML="",e.id=b(e.id)}),I(()=>window.apntag.clearRequest())},G="mobile",J="tablet",X="desktop",Q="web_desktop",Y="web_phone",Z="wde",ee="wph",te="noGroupedPlacements",ne=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},oe=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},ie=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:o,pageContext:{deviceType:i}}=v.get(),r=((e,t)=>{var n;const o=null!==(n=e[t])&&void 0!==n?n:[];return t===J&&0===o.length?e[X]:o})(n,i),a=r.filter(oe),d=e?document.querySelector(e):document;if(!d)return[];const s=a.reduce((e,t)=>{const n=ne(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=a.filter(({targetId:e})=>e.match(t)),r=(null==o?void 0:o.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${i}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=d.querySelectorAll(r),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var o;const i=re(e,t,n),r=i.finnBlink&&!i.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(o=i.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink),d=`${e.id}-${x(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&&z.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},i),{targetId:d})});return w(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)},re=(e,t,n)=>{const o=n[t],i=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:r||i},ae=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=v.get(),o=(null==t?void 0:t[n])||{},i=Object.values(o).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=b(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[o,i]of Object.entries(t))n[o]=e.filter(e=>i.includes(b(e.targetId)));return n})(e,o),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(b(e.targetId))))(e,new Set([...d,...i]));return Object.assign(Object.assign(Object.assign({},a),r),{[te]:s})},de="ABSOLUTE_FULLSCREEN",se="ANY_FULLSCREEN",le="NINESIXTEEN",ce="FULLWIDTH",ue="FULLSQUARE",pe="TAKEOVER",ve="VELVET_TAKEOVER",ge="WALLPAPER",he="COLLAPSE",me={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}]},ye={wallpaper:1600,"l-format":1600},fe=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&$e(e,se)},we=e=>{const{native:t}=e;return!!t},be=e=>$e(e,ce),ke=e=>{const{targetId:t}=e;return t.includes("takeover")||$e(e,pe)},xe=e=>$e(e,pe),Ie=e=>$e(e,ge),Ce=e=>$e(e,he),Ee=e=>e.targetId.includes("sponsorstripe"),Te=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Ae=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),Se=e=>e.targetId.startsWith("midboard"),Pe=e=>e.targetId.includes("widescreen"),Oe=e=>e.width>=1260&&e.width<=1280,je=e=>e.width>=1600&&e.width<=1620,$e=(e,t)=>{const n=me[t];if(!n)return!1;return!!n.find(t=>{var n,o;const i=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(o=e.banner)||void 0===o?void 0:o.height)||e.height,a=t.width===i,d=!t.height||t.height===r;return a&&d})};function Le(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}function _e(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{s(o.next(e))}catch(e){r(e)}}function d(e){try{s(o.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((o=o.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Ne=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 o=!1;const i=e=>{o||(s("Resolving advertising permission value obtained"),o=!0,t(e))},r=setTimeout(()=>{s("Advertising permission timed out, resolving with false"),i(!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),i(Boolean(t))})}),qe="cmp:loaded";let Me="undefined"!=typeof window?window._tcf_:void 0,De=!1;const Be=(e,t,n)=>{const o=!!(null==e?void 0:e.enabled),i=(null==e?void 0:e.timeout)||3e3,r=q("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))(o,r))return!0;if(De)return null;if(!Me)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Me.getConsentedToAllSync();return s(`TCF consented to all is: ${t}`),Me.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"),Me=window._tcf_,void e(Me);s("TCF consent manager is not available");const n=()=>{s("CMP loaded, resolving consent manager..."),o&&clearTimeout(o),window._tcf_?(Me=window._tcf_,e(Me)):t(new Error("CMP loaded but window._tcf_ is not defined"))},o=setTimeout(()=>{document.removeEventListener(qe,n),De=!0,t(new Error("Timeout waiting for CMP to load"))},i);s("Listening for CMP loaded event..."),document.addEventListener(qe,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>_e(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===h.SE,o=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===h.NO;if(t||o)return s("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Ne(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Me)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},o=setTimeout(()=>{s("TCF isConsentedToAll timed out, resolving with false"),n(!1)},i);Me.onTcfReady(()=>{s("On Tcf Ready called, waiting for consent"),clearTimeout(o)}),Me.isConsentedToAll(t=>{clearTimeout(o),e(t)})}catch(e){t(e)}})})}},Fe=(e,t,n,...o)=>_e(void 0,[e,t,n,...o],void 0,function*(e,t,n,o="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return s(`Schibsted Consent to Pay is not enabled, returning true for ${o}`),!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 ${o}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=Be(e,0,n);return(yield i())?(s(`Schibsted Ad Choices consent given according to TCF consent manager for ${o}`),!0):(s(`Schibsted Ad Choices consent not given according to TCF consent manager for ${o}`),!1)}),Re=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Ue=e=>_e(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:o}={}}=e,{getConsentAsync:i}=Be(t,0,o);if(!(yield i()))return;const r=Re("_pulse2data");return r?r.split(",")[9]:void 0}),Ve="splash",ze="welcomePage",He="topscroller",We="velvet",Ke=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const o=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),i=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=o.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,i).toString()},Ge="takeover-displayed",Je="takeover-visit-count",Xe=14400,Qe=()=>{const e=Re(Je);return e?parseInt(e):0},Ye=()=>{const e=Qe(),{takeover:{options:{cookieCapTime:t=Xe}={}}={}}=v.get(),n=document.location.hostname;window.document.cookie=`${Je}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},Ze=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=v.get();return"0"!==q(M)&&("1"===q(M)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=v.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Ge;return"true"===Re(n)})())&&(!t||et()))},et=()=>{const e=Qe();return 0===e?(Ye(),!1):1===e},tt=(e,t)=>[[1,1],[1920,1080]].some(([n,o])=>n===e&&o===t),nt=()=>{const{takeover:e}=v.get();return Boolean(null==e?void 0:e.topscroller)},ot=e=>{const{width:t,height:n}=e;return tt(t,n)?Ve:$e(e,ve)?We:nt()?He:ze},it=()=>_e(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Ge,cookieCapTime:n=Xe}={}}={},pageContext:{isMobileApp:o,countryCode:i},tcf:r}=v.get(),a=yield Fe(r,o,i,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),rt=e=>{var t,n;const o=!!(null===(n=null===(t=v.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return ke(e)&&o},at=(e,t)=>{var n;if(t===He){const{topscroller:t}=e;return null!=t?t:{}}if(t===Ve){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},dt=(e,t)=>{t!==Ve?(e=>{var t,n;const o=null===(t=v.get().pageSectionsSelectors)||void 0===t?void 0:t.header,i=null===(n=v.get().takeover)||void 0===n?void 0:n.topscroller;if(!o||i)return;const r=document.querySelector(o),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=xe(e)?"60svh":`calc(100svh - ${l}px)`,u=xe(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=v.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),o=document.querySelector(`#${e.targetId}`);if(!n||!o)return;const i=`calc(100svh - ${n.offsetHeight}px)`;o.style.setProperty("height",i,"important")})(e)},st=Ke([],()=>{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 lt=Object.freeze({__proto__:null,addTakeoverCookie:it,adjustTakeoverHeight:dt,canDisplayTakeover:Ze,getProperWelcomePageConfig:at,getTakeoverVariant:ot,handleTakeoverCookieOnAdNotShown:e=>_e(void 0,void 0,void 0,function*(){rt(e)&&(yield it())}),incrementArticleVisitCount:Ye,isSplashVariant:tt,isTopscroller:nt,scaleAd:st,shouldAddTakeoverCookieForNotShownAd:rt});const ct={nativeAd:e=>we(e)&&!Ee(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:be,fullscreenScroll:fe,topscroller:e=>ke(e)&&nt(),splash:e=>ke(e)&&tt(e.width,e.height),welcomePage:ke,wallpaper:Ie,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Oe,hFormat:je,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!je(e)&&!Oe(e),topboard:e=>e.targetId.startsWith("topboard")&&!ke(e),widescreen:Pe,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:Ee,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Ae(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!Se(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:Ae,midboard:Se},ut=({adObj:e,preferredTestIdData:t})=>{var n,o;const i=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!i)return;const r=null===(o=document.querySelector(`#${i}`))||void 0===o?void 0:o.parentElement;if(!r)return;if(((e,t)=>{var n,o,i,r;const a=null===(r=null===(i=null===(o=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===o?void 0:o.tags)||void 0===i?void 0:i[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(i,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,o;for(const[i,r]of Object.entries(ct))if(r(e)){if("nativeAd"===i){const r="default";t.dataset.testid=`${i}-${null!==(o=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==o?o:r}`;break}t.dataset.testid=i;break}})(e,r)},pt=e=>{var t;return(null===(t=Object.entries(ct).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},vt=()=>{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"},gt=e=>e===G,ht=(e,t)=>{const n=e.width,o=(null!=t?t:window.screen.width)/n;return o<1?o:1},mt=(e,t=window.screen.width,n,o)=>{const i=ht(e,t);if(n&&n(e,i),o)return void o(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${i})`,r.style.transformOrigin="left top")},yt=(e,t)=>{if(e&&t)return t/e},ft=new Map;ft.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),ft.set("panorama",{scale:.79,transformOrigin:"center center"}),ft.set("outstream",{scale:.79,transformOrigin:"center center"}),ft.set("integration",{scale:.79,transformOrigin:"center center"}),ft.set("toppanorama",{scale:.8,transformOrigin:"left center"});var wt=Object.freeze({__proto__:null,calculateScaleFactor:ht,getAspectRatio:yt,scaleAd:mt,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 o=pt(e),i=ft.get(o),r=document.querySelector(`#${e.targetId}`);if(!r||!i)return;if(r.style.transformOrigin=i.transformOrigin,r.style.transform=`scale(${i.scale})`,!(null==i?void 0:i.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},scaleAds:e=>{var t,n,o,i,r,a;const{adScaleConfig:d,pageContext:{deviceType:s}}=v.get();if(!(null==d?void 0:d.enabled))return;if($e(e,se))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=ne(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(o=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==o?o:0,p=document.getElementById(e.targetId),g=null!==(i=null==p?void 0:p.offsetWidth)&&void 0!==i?i:window.screen.width,h=null!==(a=null===(r=null==p?void 0:p.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;mt(e,(g<h?g:h)-u)}});const bt={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&"native"!==e.adType&&((e,t)=>{mt(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},kt={SVD:"svd",VG:"vg",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"},xt={publisherClassName:kt.GODT,fullWidthFormatClassName:"netboard"},It=864e5,Ct=(()=>{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,o=It)=>{const i={data:n,expirationTime:(new Date).getTime()+o};t(e,JSON.stringify(i))},getByTimestamp:(t,n=It)=>{const o=e(t);if(!o)return null;if(!n)return o;try{const{expirationTime:e,data:t}=JSON.parse(o);return(new Date).getTime()<=e?t:null}catch(e){return s("Error with parsing localStorage data"),null}}}})(),Et="glimrTags",Tt=["glwe_","glwet_"],At={geofenceTags:[],geoTags:[],weatherTags:[]},St=(...e)=>_e(void 0,[...e],void 0,function*(e=v.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:o}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield Fe(t,n,o,"glimr")}const{getConsentAsync:i}=Be(t,0,o);return yield i()}),Pt=()=>_e(void 0,void 0,void 0,function*(){const{glimr:e}=v.get();if(!(yield St())||!(null==e?void 0:e.enabled))return void s("No consent for glimr data fetching.");const t=yield(n=500,_e(void 0,void 0,void 0,function*(){return yield Promise.race([_e(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{Ct.setWithTimestamp(Et,{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})}),Ot={svd:"svd",vg:"vg",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},jt=e=>Tt.some(t=>e.startsWith(t)),$t=e=>e.startsWith("glgc_"),Lt=e=>e.startsWith("glci_"),_t=e=>!jt(e)&&!$t(e),Nt=(e,t)=>_e(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:o,pageContext:{countryCode:i}={}}=e,r=yield St(e);if(!(null==o?void 0:o.enabled)||!r)return s("No consent for getting glimr tags."),{};const a=m(i),d=qt(e,Boolean(n));return{[`${a}-geo`]:d.geoTags,[`${a}-weather`]:d.weatherTags,[`${a}-geofence`]:d.geofenceTags}}),qt=(e,t)=>{const n=Mt();if(!n)return At;const o=((e=[])=>e.filter(jt))(n),i=((e=[])=>e.filter($t))(n),r=((e=[],t,n)=>{var o;const i=e.filter(_t);if(n&&t){const{publisher:e}=null!==(o=t.pageContext)&&void 0!==o?o:{},n=Ot[e]||e;i.push(n)}return i})(n,e,t);return{geoTags:r,geofenceTags:i,weatherTags:o}},Mt=()=>{const e=Ct.getByTimestamp(Et);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},Dt=()=>{var e;return((e=[])=>e.filter(Lt))(null!==(e=Mt())&&void 0!==e?e:[])},Bt=()=>(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),Ft=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Rt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:o=!1}={},pageContext:{countryCode:i}}=v.get(),r=[`${m(i)}-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",...o?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)}},Ut="opaque",Vt=e=>_e(void 0,void 0,void 0,function*(){if(e.type!==Ut){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),zt={get:(e,...t)=>_e(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:n}=t,o=Le(t,["timeout"]);if(n)return((e,t,n)=>_e(void 0,void 0,void 0,function*(){const o=new AbortController,i=setTimeout(()=>o.abort(),n);try{const n=yield fetch(e,Object.assign(Object.assign({},t),{signal:o.signal}));return Vt(n)}finally{clearTimeout(i)}}))(e,o,n);const i=yield fetch(e,o);return Vt(i)}),post:(e,t,n)=>_e(void 0,void 0,void 0,function*(){const o=JSON.stringify(n),i=yield fetch(e,{method:"POST",headers:t,body:o});if(!i.ok)throw new Error(i.statusText);return yield i.json()})},Ht="advertory:ppids-cache",Wt={[h.SE]:`SCH${h.SE.toUpperCase()}-EnvHash`,[h.NO]:`SCH${h.NO.toUpperCase()}-EnvHash`},Kt={[h.SE]:`SCH${h.SE.toUpperCase()}-UserHash`,[h.NO]:`SCH${h.NO.toUpperCase()}-UserHash`},Gt={[h.SE]:`sch${h.SE}-envhash-v3`,[h.NO]:`sch${h.NO}-envhash-v3`},Jt={[h.SE]:`sch${h.SE}-userhash-v3`,[h.NO]:`sch${h.NO}-userhash-v3`},Xt={[h.SE]:`'sch${h.SE}-iosid-v3'`,[h.NO]:`'sch${h.NO}-iosid-v3'`},Qt={[h.SE]:`sch${h.SE}-androidid-v3`,[h.NO]:`sch${h.NO}-androidid-v3`},Yt={[h.SE]:"sdrn:schibsted.com:user",[h.NO]:"sdrn:spid.no:user"};class Zt{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:o})=>{t.append(e,`${o}-${n}`)}),t}}const en=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return _e(this,arguments,void 0,function*(e,t=1e4){var n,o;const i=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=i.xandr)||void 0===n?void 0:n.ppId1,null===(o=i.xandr)||void 0===o?void 0:o.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||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:""}},tn=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return _e(this,void 0,void 0,function*(){var n,o,i,r,a,d,s,l,c,u,p;const v=Ct.get(Ht),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===(o=g.idfv)||void 0===o?void 0:o.plain,null===(i=g.anId)||void 0===i?void 0:i.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=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||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,o){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=o?o:null}shouldHash(e,t){var n,o;if(!e)return!0;for(const i in e){if((null===(n=e[i])||void 0===n?void 0:n.plain)!==(null===(o=t[i])||void 0===o?void 0:o.plain))return!0}return!1}cachePPIDs(e,t,n,o){const i=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),o?{anId:{plain:o}}:{});Ct.set(Ht,i)}hashPPIDs(e,t){return _e(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield zt.post(t,n,e)}catch(e){return s("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return _e(this,arguments,void 0,function*({clientId:e,instance:t},n){const o=yield((e,t)=>_e(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${Yt[t]}:${n}`:null}))(t,n),i=yield(r=t,_e(void 0,void 0,void 0,function*(){const e=yield r.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}));var r;const a=window.advertory_idfv,d=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:o},environmentId:{plain:i},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),d?{anId:{plain:d}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:o,environmentId:i}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:o.plain,environmentId:i.plain}}},nn=e=>_e(void 0,void 0,void 0,function*(){const{pulse:t,tcf:n,pageContext:{countryCode:o,isMobileApp:i}}=e;if(!(yield Fe(n,i,o,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([en.processPPIDs(t,null==n?void 0:n.timeout),tn.processPPIDs(t,o)])).forEach((e,t)=>{if("rejected"===e.status){s(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),on=e=>{const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=tn.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]).add(r,Xt[e]).add(a,Qt[e]).buildEids()}]}},rn=()=>{const{ppid1:e,ppid2:t}=en.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},an=e=>{const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=tn.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]).add(r,Xt[e]).add(a,Qt[e]).buildRyEids()}}]}}},dn=e=>{const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i}=tn.getPPIDs();return(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]).buildRyEids()},sn=e=>_e(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i}=tn.getPPIDs(),r=(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),ln=(e,...t)=>_e(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,o)=>{const i=document.createElement("script");i.async=!0,i.src=e;const r=()=>{d(),n()},a=()=>{d(),o(new Error(`Failed to load ${e}`))},d=()=>{i.removeEventListener("load",r),i.removeEventListener("error",a),clearTimeout(s)};i.addEventListener("load",r),i.addEventListener("error",a);const s=setTimeout(()=>{d(),o(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}),cn="advertory-fullscreen-scroll",un="advertory-fullscreen-scroll-wrapper",pn="fullscreen-scroll-in-screen",vn="in-screen",gn=e=>e.includes("snoap.no"),hn=e=>{var t,n,o,i,r;return!!(null===(r=null===(i=null===(o=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===o?void 0:o.adResponse)||void 0===i?void 0:i.ads[1])||void 0===r?void 0:r.rtb)},mn=Ke([],()=>{const e=({width:e,height:t})=>{var n;const o=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!o)return;const{clientWidth:i,clientHeight:r}=o,a=e/i,d=t/r;o.style.transform=`scale(${a},${d})`,o.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),yn=e=>{const t=Ke([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const o=n.contentDocument.createElement("style");o.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(o),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},fn=[],wn={},bn=(e,t)=>{var n;const o=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>kn(e,o),{}),r=In(e);i.observe(e),o&&(wn[r]=Tn(e,null==t?void 0:t.options))},kn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const o=In(e);n?(xn(o,n),Cn(e,o,t)):(xn(o,n),En(e,o,t))})},xn=(e,t)=>{var n,o;const i=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!i)return;const r=t?"showFullscreen":"hideFullscreen";null===(o=i.contentWindow)||void 0===o||o.postMessage(`advertory:${r}-${e}`,"*")},In=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},Cn=(e,t,n)=>{e.classList.add(vn),document.body.classList.add(pn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),fn.includes(t)||fn.push(t),n&&window.addEventListener("scroll",wn[t],{passive:!0})},En=(e,t,n)=>{fn.includes(t)&&(n&&window.removeEventListener("scroll",wn[t]),document.body.classList.remove(pn),e.classList.remove(vn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},Tn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:o=[".skyscraper_r"],headerZIndex:i=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),o.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&An(e,r,i,0),a.length&&An(e,a,i,40)}},An=(e,t,n,o)=>{const i=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-o:(r+t-(a+i))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function Sn(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}Sn('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);flex-shrink:0}.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:var(--advertory-political-box-offset, 0px)}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px) + var(--advertory-political-box-offset, 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:calc(19px + var(--advertory-political-box-offset, 0px)) !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 + var(--advertory-political-box-offset, 0px)) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const Pn="left",On={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 jn=null;const $n=(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=`(${mn})()`,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(gn(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=yn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>gn(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)),gn(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)),hn(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},Ln=()=>{jn=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,o=e?e.offsetLeft:0,i=document.documentElement;i.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),i.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),i.style.setProperty("--advertory-fullscreen-scroll-left",`${o}px`)},_n=()=>{jn||(jn=window.requestAnimationFrame(Ln))},Nn=(e,t)=>{var n,o,i,r;const{pageContext:{countryCode:a,deviceType:d}}=v.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:o=1302,backgroundColor:i="#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=o/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${i} 0px,\n ${i} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${i} calc(50% + ${l}px),\n ${i} 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!==(o=null==l?void 0:l.overlayStyles)&&void 0!==o?o:{},d);const c=document.getElementById(s),u=null==c?void 0:c.parentElement;if(!c||!u)return;bn(u,t),c.className=cn,bn(u,t),c.className="advertory-fullscreen-scroll";const p=$e(e,de)?"absolute":"fixed";c.style.position=p,u.className=un,u.dataset.showTagSubscribeId=s,c.setAttribute("data-ad-label",On[a].adText),(null==l?void 0:l.cogwheelPosition)===Pn&&(c.dataset.moveCogwheelToTheLeft="true"),_n(),window.addEventListener("resize",_n),null===(i=window.visualViewport)||void 0===i||i.addEventListener("resize",_n),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",_n)},qn=e=>{if(!(null==e?void 0:e.classList.contains(cn)))return;e.classList.remove(cn),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(un))&&(t.classList.remove(un),t.classList.remove(vn))};var Mn=Object.freeze({__proto__:null,createFullscreenScrollAd:Nn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,o=hn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[o].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,o=hn(e)?1:0,i=null==n?void 0:n.tags[e].adResponse.ads[o].rtb;i&&(i.banner.content=t)})(e,$n(t,e))},undoFullscreenScrollContainer:qn});const Dn=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},Bn=(e,t,n)=>{var o,i,r,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(i=null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||void 0===i?void 0:i.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}]}})),Dn(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},Fn="ad-loaded",Rn=(e,t,n)=>_e(void 0,void 0,void 0,function*(){yield C,yield E;new IntersectionObserver((t,o)=>{t.filter(({isIntersecting:e})=>e).forEach(()=>{n(),o.unobserve(e),o.disconnect()})},{rootMargin:`${t}px 0px ${t}px 0px`}).observe(e)}),Un=()=>_e(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:o,deviceType:i},fullscreenScroll:r,appearanceConfig:a,placements:d}=v.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:l}=v.getHandlers(),{getConsentAsync:c}=Be(t,0,n),u=yield c(),p=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:o=>{const i=Bt(),{prebid:{relevantCallbackTimeout:r}={}}=v.get(),a="relevantCb"===o&&r?r:n[o].timeout,d=setTimeout(()=>{!n[o].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${o}'`),e=!0,i.loadTags&&i.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),g=Bt(),h=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=Bt();return{user:e,keywords:t}})();p.failsafeOnTimeout("relevantCb");const{user:{externalUid:m=""}={},keywords:y}=h;(()=>{const e=Ft();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{s("prebid relevantYieldQueue callback fired - RY took over");if(p.getCancel()||!g.loadTags)return s("core loadTags() call was cancelled",{cancel:p.getCancel(),apnTagLoadTags:!g.loadTags,condition:"or"}),void p.cleanup();const t=Ft();p.events.relevantCb.done=!0,p.failsafeOnTimeout("auctionCb");const c=u?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};s("prebid consentManagement",c),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:c,enableSendAllBids:!1},an(n)),Rt(y,m))),s("core add prebid config",Object.assign(Object.assign({consentManagement:c,enableSendAllBids:!1},an(n)),Rt(y,m))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s("prebid auctionCb loadTags called by RY - prebid hands off to Xandr",{targetIds:e,cancelled:p.getCancel()}),p.getCancel()||(p.events.auctionCb.done=!0,g.loadTags(e)),p.cleanup()}},customNativeRender:e=>{Vn(e,l)},directRenderFn:e=>{var t,n,l;const{settings:c,renderFn:u}=e,{bid:p,adDiv:v}=c||{};if(!v)return;const g=v.id,h=document.getElementById(g);if(!h)return;const m=null===(t=null==d?void 0:d[i])||void 0===t?void 0:t.find(e=>e.targetId===g),y=null!==(l=null!==(n=null==m?void 0:m.requestThreshold)&&void 0!==n?n:null==a?void 0:a.defaultThreshold[i])&&void 0!==l?l:0,f=Object.assign(Object.assign({},p),{targetId:g,banner:!0});s("prebid directRenderFn ad info",{targetId:g,width:null==p?void 0:p.width,height:null==p?void 0:p.height,adId:null==p?void 0:p.adId,creativeId:null==p?void 0:p.creativeId}),Rn(h,y,()=>{var e;const t=u(c),n=fe(f);if(s("prebid directRenderFn isFullscreenScrollAd",{targetId:g,isFullscreen:n,width:null==p?void 0:p.width,height:null==p?void 0:p.height}),n)s("prebid directRenderFn: creating fullscreen scroll container",{targetId:g}),Nn(f,r),o?h.style.setProperty("--advertory-political-box-offset","30px"):(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const o=new MutationObserver(()=>{n()&&o.disconnect()});o.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(t);else{s("prebid directRenderFn: NOT fullscreen scroll - undoing container",{targetId:g}),qn(h),null===(e=null==h?void 0:h.parentElement)||void 0===e||e.classList.add("advertory-direct-render");const n=t.getAttribute("width");n&&(h.style.width=`${n}px`)}h.classList.add(Fn),(null==p?void 0:p.creativeId)&&Bn(g,h,Number(null==p?void 0:p.creativeId))})}}),s("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{p.getCancel()||(p.events.auctionCb.done=!0,g.loadTags(e))}},customNativeRender:e=>{Vn(e,l)},directRenderFn:()=>{}})})}),Vn=(e,t)=>{var n;const{divId:o,native:i,bid:r}=e,a=document.querySelectorAll(`[id^=${o}]`)[0],d=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:i,targetId:d},v.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},zn=(e,t,n)=>{const o=document.getElementById(`div_utif_${e}`);if(!o)return;const{apntag:i}=window,[r,a]=t;if(!o.dataset.lockedsize&&a&&r)o.style.width=`${r}px`,o.style.height=`${a}px`,n&&(i.resizeAd(o.id,[r,a]),o.dataset.lockedsize="true",o.dataset.lockedwidth=r.toString(),o.dataset.lockedheight=a.toString());else if(null==o?void 0:o.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=o.dataset;e&&t&&i.resizeAd(o.id,[e,t])}},Hn=["netboard","board"];class Wn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,o;const{editionName:i}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(o=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==o?o:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",i),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return _e(this,void 0,void 0,function*(){var t,n,o;const i=yield this.identityFacade.getIdentityUser(),r=null!==(o=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==o?o:"",a=(null==i?void 0:i.userId)?String(i.userId):"",d=this.buildUrl(e,{envId:r,spid:a});try{s("Starting fetching DrEdition ad from URL:",d);const e=yield zt.get(d);return s("Fetch operation completed successfully."),e}catch(e){s("Error during fetch operation:",e)}return null})}}let Kn=class{getDrEditionUTMParams(e,t){var n;const{title:o="",clientName:i,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=o.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:i,utm_medium:d},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const o=this.getDrEditionUTMParams(t,n),i=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(o).forEach(([e,t])=>{i.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const o=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!o)return"";const i=this.getDrEditionUTMParams(e,t),r=new URL(o);return Object.entries(i).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return _e(this,void 0,void 0,function*(){const{id:n,autoplay:o,mute:i,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:o,vgtvMuted:i,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const Gn=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 Jn{constructor(e,t,n,o){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=o,this.drEditionAds=[]}fetchAndRenderAd(e,t){return _e(this,void 0,void 0,function*(){var n,o;const{drEditionConfig:{options:{containerSelector:i}},renderAsBackfill:r=!1}=t,a=e.querySelector(i);if(!a)return void s(`Container with selector "${i}" 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."),R(e.id),void Gn(a)):((null==d?void 0:d.itemId)&&r&&(s("Dr. Edition ad available to render as a Xandr backfill."),U(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),Gn(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===(o=e.querySelector("a"))||void 0===o||o.addEventListener("pointerup",()=>null)):Gn(a))):(s("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Gn(a))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";U(o)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const o=e.querySelector(".dr-edition-slider");if(!o)return!1;let i=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(i&&clearTimeout(i),i=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...o.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...o.children].forEach(e=>{r.observe(e)}),!0}}class Xn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return _e(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:o}=Be(n.tcf,n.isMobileApp,n.country),i=yield o(),r=gt(n.device)?t.mobileHTML:t.desktopHTML,a=i?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var o,i,r;e.search=null!==(r=null===(i=(o=this.newsroomStrategy).getUrlSearchParams)||void 0===i?void 0:i.call(o,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Qn{constructor(e){this.strategy=e}handle(e,t){return _e(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:o}={}}=e;(n||o)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return _e(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 ln(t)}catch(e){s("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return _e(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:o}=e.videoConfiguration,i=[...document.querySelectorAll(`#${o}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==i||i.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==i?void 0:i.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,o,i;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(i=(o=t.drEditionConfig.options).addPreviewVideo)||void 0===i||i.call(o,d),!0))}}let Yn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,o){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const o=null==n?void 0:n.textContent;return o?o.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:o}={}}=t,i=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:o}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return _e(this,void 0,void 0,function*(){var o,i,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===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)?null===(r=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===r||r.call(i,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 _e(this,void 0,void 0,function*(){var o,i,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(i=(o=this.pulse).trackLegacyClickUIElement)||void 0===i||i.call(o,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 Zn extends Yn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var o,i,r;const{pulseData:{title:a,clientName:d="",creativeId:s,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(i=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.transformUrl)||void 0===i?void 0:i.call(o,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 eo=class extends Yn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var o,i,r,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulseObjectId)||void 0===r?void 0:r.call(i))&&void 0!==a?a: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,o){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,o),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,o){var i,r,a,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId: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===(i=this.newsroomStrategy)||void 0===i?void 0:i.getUrlWithParams)||void 0===r?void 0:r.call(i,t,n))&&void 0!==a?a:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:o,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const to={FRONT:"front"},no=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},oo=e=>_e(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const o=document.createElement("script");o.id=e,o.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",o.async=!0;try{o.src=o.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(o,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),io={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return _e(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Wa})})}})}},ro=(e,t)=>{null==e||e.forEach(e=>{io[e](t)})};let ao=class{handleVideo(e,t){return _e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){yield _e(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const a=["ContentMutePlugin"],d=this.createPlayerOverlay(e);ro(a,d);const s={id:t,node:n,autoplay:o,mute:i,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},l=yield oo(s);l.once("assetReady",()=>{no(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",()=>_e(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===to.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:o}=new URL(n),i=o.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}};const so="https://www.aftonbladet.se/video-player-extras/latest/";class lo{handleVideo(e,t){return _e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){const a={id:t,node:n,autoplay:o,mute:i,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${so}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${so}external-link.js`]:{name:"ExternalLink"}}};yield oo(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 co=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class uo{handleVideo(e,t){return _e(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){const a={id:t,node:n,autoplay:o,mute:i,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},co(e)?e:{}),{provider:Object.assign(Object.assign({},co(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 oo(a);d.once("PulseStats:ready",()=>_e(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===to.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let po=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const vo=(e,t,n)=>{const{publisher:o,pageType:i,country:r}=e,a={[kt.VG]:new Kn,[kt.E24]:new ao,[kt.AFTONBLADET]:new lo,[kt.SVD]:new uo}[o]||new po,d=new(r===h.SE?Zn:eo)(n,a,i),s=new Wn(t,n),l=new Xn(a,d),c=new Qn(a);return new Jn(s,l,c,d)},go=()=>_e(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class ho{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return _e(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return s("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return _e(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const mo=(e,t,n)=>{const{wrapperSelector:o}=e.drEditionConfig.options,i=document.querySelectorAll(o),r=new IntersectionObserver((o,i)=>((e,t,n,o,i)=>{const r=vo(n,o,i);e.forEach(e=>{var o,i;if(!e.isIntersecting)return;const a=e.target,d=null!==(o=a.dataset.editionName)&&void 0!==o?o:"",s=null!==(i=a.dataset.pulseColumnname)&&void 0!==i?i:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:d,columnName:s,primaryPosition:l})),t.unobserve(a)})})(o,i,e,t,n),{rootMargin:"400% 0px"});i.forEach(e=>r.observe(e))},yo=()=>_e(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),fo=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},wo=[],bo=(e,t)=>_e(void 0,void 0,void 0,function*(){var n;const{pulse:o,tcf:i,drEdition:r,pageContext:{deviceType:a,publisher:d,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield Fe(i,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,o;const{pageContext:{deviceType:i},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,s=r[i]||r.desktop,l=b(t.targetId),c=s.find(e=>e.targetId===l),u=Hn.some(e=>l.startsWith(e)),p=wo.includes(l),v=(null===(o=null==c?void 0:c.drEdition)||void 0===o?void 0:o.editionName)||d;return c&&u&&!p&&v?(wo.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==o?void 0:o.instance))return void s("Pulse has not been passed as a prop, aborting");const v=yield go(),g=new ho(v),h=vo({publisher:d,pageType:l,country:c},g,null==o?void 0:o.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:i,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),ko=(e,t)=>{var n,o,i;if(!fo())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===(o=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===o?void 0:o[r],l=null!==(i=null==d?void 0:d.map(([e])=>e))&&void 0!==i?i:[],c=new IntersectionObserver((t,n)=>_e(void 0,void 0,void 0,function*(){for(const o of t){if(!o.isIntersecting)continue;const t=o.target;n.unobserve(t),yield bo(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 xo=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:o,pulseData:i,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[o,i]of Object.entries(e)){n[t?`${t}-${o}`:o]=String(i)}return n},d=a(i,"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:o})]}))},getDrEditionManager:vo,handleDrEdition:e=>_e(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield Fe(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield go(),o=new ho(n);mo({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},o,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:bo,handleDrEditionBackfillOnAdblock:ko});const Io="collapseAd",Co="hideAd",Eo="resizeAd",To="renderDrEditionFallback",Ao="wallpaperImageUrl",So="wallpaperColor",Po="velvet",Oo=[Eo,Ao,So,Io,Co,To,Po];let jo;const $o=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(j(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:Ao,wallpaperImageUrl:t}}if($(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:So,wallpaperColor:t}}if(e.startsWith(To)){const t=e.split(":")[1];return{name:To,targetId:t}}if(e.startsWith(Io)||e.startsWith(Co)){const t=e.split(":")[1];return{name:Io,targetId:t}}if(e.includes("name")&&Oo.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!Oo.some(e=>n.name===e))return;const{name:o,targetId:i,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;o===Po&&d&&(d.includes("noScroll")&&(jo=(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==jo||jo(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),o!==Io&&o!==Co||!i||R(i),o===Eo&&i&&d&&zn(i,d),o===To&&i&&(R(i),bo(v.get(),{targetId:i})),"resizeMediationAd"===o&&i&&s&&zn(i,s,!0),o===Ao&&r&&L(r),o===So&&a&&_(a)},Lo=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=v.get(),o=window.apntag,i={publisher:e,countryCode:t,finnBlink:n},r=e=>{U(e),I(()=>o.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>_e(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ad});yield t(e,i,null)}),withFullAdsChain:e=>_e(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 ad});yield t(e,i,r,()=>_e(void 0,void 0,void 0,function*(){if(!z.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return N});t(e)}))})}},_o=(e,t)=>_e(void 0,void 0,void 0,function*(){e.id.includes("wallpaper")||(yield Rn(e,t,()=>((e,t,n)=>{const o="true"===n.dataset.isFinnBlinkOnlyPlacement;return Te(t)&&o?(s(`loading finn blink ad for blink only placement for ${t}`),void Lo().withFinnBlinkAd(t)):Te(t)?(s(`loading finn blink ad with full ads chain for ${t}`),void Lo().withFullAdsChain(t)):void I(()=>(s("core showTag",{id:t}),e.showTag(t)))})(window.apntag,(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(e),e)))}),No=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),qo=new Map,Mo=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Do=".brandstudio-premium-content-widget",Bo=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Fo=({adWrapper:e,placementContainer:t})=>{const n=Bo({adWrapper:e,placementContainer:t});var o;null==e||e.style.setProperty("height",`${n}px`),W(o=t),o.innerHTML=""},Ro=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Uo=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=v.get(),o=Mo.includes(n)&&Boolean(t.closest(Do));const i=o?t.closest(Do):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!o&&!a||o&&!i)return;if(a)return Ro(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=i;d&&s.contains(d)?Ro(d):s.hasAttribute("style")&&Ro(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},Vo=(e,t,n,o,i,r)=>{var a;const d=performance.now(),s=null!==(a=qo.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(o,i)&&n<0;d-s>=i&&l&&(qo.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:o}}=v.get(),i=null==n?void 0:n.parentElement;i&&n&&Fo({adWrapper:i,placementContainer:n}),I(()=>{e.setKeywords([t],{[`${m(o)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},zo=(e,t,n)=>{const o=new IntersectionObserver((e,o)=>((e,t,n,o)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:i,boundingClientRect:r}=e;t(window.apntag,i.id,r.y,n,o,i)})})(e,Vo,t,n),No(300));o.observe(e)},Ho=(e,t=6)=>{const n=[];for(let o=0;o<e.length;o+=t){const i=e.slice(o,o+t);n.push(i)}return n},Wo=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Ko=(e,t=0)=>{const n=e.getBoundingClientRect(),o=window.innerHeight;return n.bottom>-t&&n.top<o+t},Go=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=v.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Zo(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Jo=(e,t,n)=>{const o=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const i of o){const o=e.find(e=>{var t,n;return e.targetId===(null===(t=i.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==o?void 0:o.requestThreshold;Ko(i,r)&&o&&(H(o.targetId),n.length&&i.classList.remove(...n),Zo([o],t))}},Xo=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:o}}=v.get();t&&(e.forEach(({targetId:e})=>{const t=Qo(e);t&&(t.dataset.bfCacheRefresh="true")}),o?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Jo(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const o=()=>{window.scrollY>0&&(window.removeEventListener("scroll",o),Jo(e,!1,t))};n.persisted&&(Wo()?window.addEventListener("scroll",o,{passive:!0}):Jo(e,!1,t))})})(e,n))},Qo=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Yo=e=>{const{targetId:t,allowedFormats:n}=e,o=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Qo(t)),i=(e=>1===e[0]&&1===e[1])(o),r={sizes:[o],allowedFormats:i?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return i||(r.native=void 0),r},Zo=(e,t=!1)=>{const{queryConfig:{batchSize:n=u}={}}=v.get(),o=e.map(({targetId:e})=>e),i=Ho(o,n);if(t)for(const t of e){const e=Yo(t);window.apntag.modifyTag(t.targetId,e)}for(const e of i)I(()=>window.apntag.refresh(e))},ei=e=>`externalImpId:'${e}'`,ti=(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,ni=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},pulse:o}=v.get(),{targetId:i,sizes:r,keywords:a,allowedFormats:d,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:p,dynamicSizeWidthCheck:g=!1,globalPlacementId:h}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||Ze())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],o=Array.isArray(n)?n.filter(e=>e!==He):n,i=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":o}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:i})})(e),m=Object.assign({invCode:l,sizes:r,targetId:i,keywords:ti(a,c),allowedFormats:d,dynamicSizeWidthCheck:g,globalPlacementId:h},p&&{safeframeConfig:p}),y=(e=>{var t,n,o,i,r,a;return(null===(n=null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)||void 0===n?void 0:n.pageViewId)?(s("Pulse state pageViewId is:",null===(i=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===i?void 0:i.pageViewId),null===(a=null===(r=null==e?void 0:e.instance)||void 0===r?void 0:r.state)||void 0===a?void 0:a.pageViewId):(s("Pulse state does not contain field pageViewId or it is empty"),"")})(o);n&&y&&(s("External Impression ID assigned to defineTag:",ei(y)),m.externalImpId=ei(y));const f=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1},customBody1:{required:!1},customBody2:{required:!1},customBody3:{required:!1},customBody4:{required:!1},customBody5:{required:!1}}).reduce((t,[n,o])=>((null==e?void 0:e.includes(n))&&(t[n]=o),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(m.native=f),m},oi=e=>!e.includes("takeover")||Ze(),ii=e=>{const{source:t}=e;return"csm"===t},ri=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=v.get(),n=m(t),o=e[`${n}-targetid`],i=o?b(o[0]):"";return Object.assign(Object.assign({},e),o&&{[`${n}-targetid`]:[i]})},ai=e=>{const{pageContext:{countryCode:t}}=v.get(),n=m(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"]})},di=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const o=n.split(",")[0].split(":")[0],i=e.find(e=>e.invCode===o),r=document.querySelector(`[id^=${null==i?void 0:i.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"})})()},si=(e,t)=>_e(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});Sn(".advertory-brandmetrics-survey{width:100%}");const li="advertory-brandmetrics-survey",ci="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",ui=()=>_e(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,o)=>{var i;o||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(i=n.tcString)&&void 0!==i?i:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),pi={pageContext:{publisher:"aftonbladet",countryCode:h.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"}},vi={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},gi=e=>(null==e?void 0:e.parent)?[...gi(e.parent),e.shortPath||"unknown"]:[],hi=(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]=gi(e);return vi[n]||"ovrigaavdelningar"})(e)}_{position}`,mi={aftonbladet:pi},yi={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:hi(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:gi(e).join(":")}}},fi=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},wi=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),bi="se-generic",ki="aa-sch",xi="kv_",Ii="pause",Ci="{deviceType}",Ei="{position}",Ti="afp_",Ai=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),Si="1-1",Pi="16-9",Oi="3-4",ji="9-16",$i="responsive",Li={[Si]:1,[Pi]:1.78,[ji]:.56,[$i]:1},_i={[Si]:1,[Pi]:1.78,[Oi]:1.33,[ji]:.56},Ni=(e,t,n,o)=>{const{invCode:i="",videoOverlayInvCode:r}=null!=e?e:{},a=X===n?Z:ee,d=i.replace(Ci,a);return(e,n)=>{if(e===Ii)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(Ei,Ii).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&Ai.has(e)){return(o&&r?r:t.frontpageInvCodeTemplate).replace(Ci,a).replace(Ei,e)}return d.replace(Ei,e)}},qi=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[o,i])=>{const r=Math.abs(e[n]-t);return Math.abs(i-t)<r?o:n},n[0][0])},Mi=()=>{var e,t;const n=jwplayer().getContainer(),o=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return o&&"number"==typeof o.offsetWidth&&"number"==typeof o.offsetHeight&&0!==o.offsetHeight?o.offsetWidth/o.offsetHeight:1},Di=()=>{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},Bi=()=>{const e=null!==(t=Di()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Di()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Fi=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Ri=(e,t)=>_e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:o,countryCode:i}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},d={isMobileApp:e.isApp,countryCode:i,publisher:o,pageType:"front",deviceType:e.deviceType},s=(yield Fe(n,e.isApp,i,"video"))?"1":"0",l=yield ui(),c=yield sn(i),u=yield Ue({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)=>qi(_i,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?qi(Li,Number(m.toFixed(2))):$i;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${ki}-country_code`]:i,[`${ki}-publisher`]:o,[`${ki}-supply_type`]:(y=e.deviceType,y===X?Q:Y),[`kw_${ki}-page_type`]:"collection",[`${ki}-page_type`]:"collection",[`${bi}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${bi}-page`]:"index",[`${bi}-page`]:"index",[`${bi}-screenheight`]:String(window.screen.height),[`${bi}-screenwidth`]:String(window.screen.width),[`${bi}-viewportheight`]:String(a),[`${bi}-viewportwidth`]:String(r),[`${bi}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${bi}-mobile-os`]:vt(),[`${bi}-audience`]:void 0,[`${bi}-externalid_src`]:Bi(),[`${bi}-tags`]:e.tags,[`${bi}-articleid`]:p,"article-id":p},yield Nt(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${bi}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Fi()).some(e=>e.includes(xi))&&(()=>{const e=Fi(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(xi)).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})}),Ui=["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"],Vi=["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"],zi=["external_uid","gdpr","gdpr_consent","eids","article-id"],Hi=(e,t)=>{const n=[...Ui,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||zi.includes(e)?e:`kw_${e}`,t]))},Wi=e=>Object.fromEntries(Object.entries(e).filter(([e])=>Vi.includes(e))),Ki=(e,t)=>_e(void 0,void 0,void 0,function*(){var n,o,i,r;const a=(e=>{var t;mi[e]||l(`[video] No config found for publisher "${e}"`);return null!==(t=mi[e])&&void 0!==t?t:pi})(e.publisher),d=(e=>{var t;return null!==(t=yi[e])&&void 0!==t?t:yi.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),s="/"===window.location.pathname,c=null===(o=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===o?void 0:o.toString(),u=e.assetId===c,p=null!==(i=Number(e.aspectRatio))&&void 0!==i?i:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:d,isUserPresentOnFrontPage:s,adsKeywords:yield Ri({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:s,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:Mi(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:fi(e.startMode)}}),Gi=(e,t)=>{const{siteConfig:n,siteVideoParams:o,isUserPresentOnFrontPage:i,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=o||{},l=Ni(o,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(Ti)?`${Ti}${t}`:t)(s),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,i),"se-generic-playback-method":wi.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({},Hi(r,n)),Wi(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")})}}}},Ji=e=>t=>_e(void 0,void 0,void 0,function*(){const n=yield Ki(e,t);return Gi(n,e)}),Xi={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]}]},Qi={no:"NOK",se:"SEK"},Yi={no:"no",se:"sv"};class Zi{buildFetchObject(e,t,n,o){return _e(this,void 0,void 0,function*(){const{pageContext:{countryCode:i},pageOptions:r}=o,{invCode:a,xandrPlacementId:d}=e,s=yield ui(),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(Xi),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:x(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||Yi[i]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield Ue(o),ext:{consent:s.gdpr_consent||"",eids:dn(i)}},at:1,cur:[Qi[i]],source:{tid:x(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,o){return _e(this,void 0,void 0,function*(){try{s("Starting fetching Studio ad from Xandr:",ci);const i=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?`${ci}?${a.toString()}`:ci,l=yield this.buildFetchObject(e,t,n,o),c=yield zt.post(d,i,l);return s("Fetch operation completed successfully.",c),c}catch(e){s("Error during fetch operation:",e)}return null})}}const er=0,tr=3,nr=(e,t,n,o)=>{const i=t.parentElement;if(!i)return;const r=e?`-${e}`:"",a=o?`__${o}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),i.classList.remove(...i.classList),t.classList.add(d),i.classList.add(s),t.dataset.adType=n},or="finn-blink",ir="native-ad",rr=(e,t)=>{ar(e,t),sr(e,t)},ar=(e,t)=>{var n,o;const i=document.querySelector(`#${e.targetId}`);if(!i||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(o=null==t?void 0:t.clickLinkSelector)&&void 0!==o?o:"a.ad-link";(null==i?void 0:i.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const o of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])cr(o)}),t.dataset.tracked="true")})},dr=e=>{var t;const{native:{impressionTrackers:n}={}}=e,o=null==n?void 0:n.some(e=>e.includes("googleads")),i="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;o||!i?null==n||n.forEach(lr):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},sr=(e,t)=>{var n;let o=!1;const i=document.querySelector(`#${e.targetId}`);if(!i||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:X])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!o)for(const n of t)if(n.isIntersecting){o=!0,dr(e),c.disconnect();break}},s);c.observe(i)},lr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?cr(e):window.navigator.sendBeacon(e)},cr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},ur=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:[]}),pr=(e,t)=>_e(void 0,void 0,void 0,function*(){var n,o;const{pageContext:{deviceType:i},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[i],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())},No(d)).observe(l)});const{prepareTag:c}=v.getHandlers(),u=z.getData("alertoryConfigKeywords"),p=null!==(o=c(ni(e)).keywords)&&void 0!==o?o:{},g=new Zi,h=yield g.fetchData(e,u,p,t);h&&(((e,t,n)=>{const o=n===G?t.mobileHTML:t.desktopHTML;if(o){if(t.adType===er){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>${o}`,e.appendChild(n)}else e.innerHTML=o;e.classList.add("ad-loaded")}})(l,h,i),h.adType===tr&&(nr(t.pageContext.publisher,l,ir,t.pageContext.pageType),rr({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:i,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,o)=>{var i,r,a;let d;(null===(i=window.apntag.requests)||void 0===i?void 0:i.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==o?void 0:o.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),Bn(e,n,Number(null==o?void 0:o.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,h.bid))}),vr=(e,t)=>{e.forEach(e=>pr(e,t).catch(e=>{s("Failed to handle server-side ad:",e)}))},gr={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},hr="https://alertory-cdn.inventory.schibsted.io",mr=5e3,yr="editory/native-creator/native-templates",fr=e=>_e(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editory:{editoryUrl:n,editableConfiguration:{pageTypeToFetch:o}={}}={}}=e;return(null==t?void 0:t.publisherClassName)&&o?`${n||hr}/editable-configurations/${t.publisherClassName}/${o.toLowerCase()}.json`:null})(e);if(!t)return null;try{return yield zt.get(t,{timeout:mr})}catch(e){throw s("Failed to fetch S3 config",{error:e,url:t}),e}}),wr=(e,t,n,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:o,pageType:i}=t,r=o&&Object.values(kt).includes(o);n&&r&&nr(o,e,ir,i)})(i,n),o())},br=(e,t)=>{var n,o;const i=document.querySelector(`#${e.targetId}`);if(!i||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(o=null==t?void 0:t.clickLinkSelector)&&void 0!==o?o:"a.ad-link";(null==i?void 0:i.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const o of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Cr(o)}),t.dataset.tracked="true")})},kr=e=>{var t;const{native:{impressionTrackers:n}={}}=e,o=null==n?void 0:n.some(e=>e.includes("googleads")),i="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;o||!i?null==n||n.forEach(Ir):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},xr=(e,t)=>{var n;let o=!1;const i=document.querySelector(`#${e.targetId}`);if(!i||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:X])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!o)for(const n of t)if(n.isIntersecting){o=!0,kr(e),c.disconnect();break}},s);c.observe(i)},Ir=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Cr(e):window.navigator.sendBeacon(e)},Cr=e=>{zt.get(e,{mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Er=(()=>{const e=new Map,t=new Map;return{getTemplate:t=>e.get(t),setTemplate:(t,n)=>{e.set(t,n)},deleteTemplate:t=>{e.delete(t)},getAdjustment:e=>t.get(e),setAdjustment:(e,n)=>{t.set(e,n)},clear:()=>{e.clear(),t.clear()}}})(),Tr=(e,t,n)=>{if(!n)return Promise.resolve(null);const o=((e,t,n)=>`${null!=n?n:hr}/${yr}/${e}/adjustments/${t}.json`)(e,n,t),i=Er.getAdjustment(o);if(i)return i;const r=zt.get(o,{timeout:mr}).catch(e=>(s("Failed to fetch native template adjustment",{error:e,url:o}),null));return Er.setAdjustment(o,r),r},Ar=(e,t,n)=>_e(void 0,void 0,void 0,function*(){const o=((e,t)=>`${null!=t?t:hr}/${yr}/${e}/default.json`)(e,n);let i=Er.getTemplate(o);i||(i=zt.get(o,{timeout:mr}).catch(e=>{throw s("Failed to fetch native template",{error:e,url:o}),Er.deleteTemplate(o),e}),Er.setTemplate(o,i));const r=Tr(e,n,t),[a,d]=yield Promise.all([i,r]);return{schema:a,adjustment:d}}),Sr={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},Pr=(e,t)=>{var n,o,i;const a=Object.assign({},e);a.overrides=e.overrides?r({},e.overrides,Sr):e.overrides;for(const d of Object.keys(t)){const s=t[d];if(!s)continue;const l=s[e.id];if(!l)continue;const c=null!==(o=null===(n=a.overrides)||void 0===n?void 0:n[d])&&void 0!==o?o:{},u=r(c,l,Sr);a.overrides=Object.assign(Object.assign({},null!==(i=a.overrides)&&void 0!==i?i:{}),{[d]:u})}return e.children&&(a.children=e.children.map(e=>Pr(e,t))),a},Or="desktop",jr="mobile",$r="container",Lr="text",_r="image",Nr="cogwheel",qr=(e,t)=>{var n,o,i,r,a,d;const s=null===(n=e.overrides)||void 0===n?void 0:n[t];if(null!==(o=null==s?void 0:s.hidden)&&void 0!==o?o:e.hidden)return null;const l=Object.assign(Object.assign({},e.styles),null!==(i=null==s?void 0:s.styles)&&void 0!==i?i:{}),c=null!==(r=null==s?void 0:s.tag)&&void 0!==r?r:e.tag,u=null!==(a=null==s?void 0:s.text)&&void 0!==a?a:e.text,p=null===(d=e.children)||void 0===d?void 0:d.map(e=>qr(e,t)).filter(e=>null!==e),v={id:e.id,tag:c,type:e.type,name:e.name,styles:l,connections:e.connections};return void 0!==u&&(v.text=u),void 0!==p&&(v.children=p),v},Mr=e=>Object.entries(e).map(([e,t])=>`${(e=>e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()))(e)}:${(e=>String(e).replace(/"/g,"""))(t)}`).join(";"),Dr={microsoftMonetize:{title:"title","body-text":"body",description:"body","sponsored-by":"sponsoredBy","call-to-action":"cta","display-url":"clickUrl","desc-2":"desc2",image:"image",icon:"icon","title-1":"customTitle1","title-2":"customTitle2","title-3":"customTitle3","title-4":"customTitle4","icon-1":"customIcon1","icon-2":"customIcon2","custom-display-url-1":"customDisplayUrl1","custom-body-1":"customBody1","custom-body-2":"customBody2","custom-body-3":"customBody3","custom-body-4":"customBody4","custom-body-5":"customBody5"}},Br=(e,t)=>{const n=e[t];return null==n?"":"object"==typeof n&&"content"in n?n.content:"object"==typeof n&&"url"in n?n.url:String(n)};class Fr{constructor(e,t=!1){this.tag=e,this.voidElement=t,this.attributes=new Map,this.content=""}attr(e,t){return t&&this.attributes.set(e,t),this}children(e){return this.content=e,this}build(){const e=[...this.attributes].map(([e,t])=>` ${e}="${t}"`).join("");return this.voidElement?`<${this.tag}${e}>`:`<${this.tag}${e}>${this.content}</${this.tag}>`}}const Rr=(e,t,n="")=>{var o;return(null===(o=e.connections)||void 0===o?void 0:o.length)?((e,t)=>{const n=[];for(const o of e){const e=Dr[o.server];if(e)for(const i of o.properties){const o=e[i];if(!o)continue;const r=Br(t,o);r&&n.push(r)}}return n.join(" ")})(e.connections,t):n},Ur=(e,t,n,o)=>{var i;const{tag:r,styles:a}=e,d=(null!==(i=e.children)&&void 0!==i?i:[]).map(e=>zr(e,t,n,!1)).join(""),s=new Fr(r);return o(s),s.attr("href","a"===r?Rr(e,t):"").attr("style",Mr(a)).children(d).build()},Vr={[$r]:(e,t,n,o)=>{var i;const r=null!==(i=n.publisher)&&void 0!==i?i:"shared";return Ur(e,t,n,t=>{o&&t.attr("class",`advertory-${r}-ad-native-${e.name.toLowerCase()}`)})},[Nr]:(e,t,n)=>Ur(e,t,n,e=>{n.containerId&&e.attr("id",`${n.containerId}-button`)}),[Lr]:(e,t)=>{var n;return new Fr(e.tag).attr("style",Mr(e.styles)).children(Rr(e,t,null!==(n=e.text)&&void 0!==n?n:"")).build()},[_r]:(e,t)=>new Fr("img",!0).attr("style",Mr(e.styles)).attr("src",Rr(e,t)).build()},zr=(e,t,n,o=!0)=>{const i=Vr[e.type];return i?i(e,t,n,o):""},Hr=e=>(t,{publisher:n,containerId:o,deviceType:i})=>((e,t,n,o,i)=>{const r=qr(e.root,n);return r?zr(r,t,{breakpoint:n,publisher:o,containerId:i}):null})(e,t,(e=>e===G?jr:Or)(i),n,o),Wr="default",Kr=(e,t)=>_e(void 0,void 0,void 0,function*(){var n,o,i,a,d;const l=document.querySelector(`#${e.targetId}`);if(!e.native||!l)return;const{desc2:c}=e.native,u=null==c?void 0:c.toLowerCase(),p=((e,t)=>{const n=B(D),o=new URLSearchParams(window.location.search).get(D),i=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?i?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null})(e.targetId,null!=c?c:Wr),v=(null!=p?p:u)||Wr,g=null===(n=t.pageContext)||void 0===n?void 0:n.publisher;try{const{schema:n,adjustment:s}=yield Ar(v,g,null===(o=t.editory)||void 0===o?void 0:o.editoryUrl),l=s?((e,t)=>t.overrides?Object.assign(Object.assign({},e),{root:Pr(e.root,t.overrides)}):r({},e,Sr))(n,s):n,c=Hr(l),u={publisher:g,pageType:null===(i=t.pageContext)||void 0===i?void 0:i.pageType,deviceType:null===(a=t.pageContext)||void 0===a?void 0:a.deviceType,appearanceConfig:t.appearanceConfig,nativeTrackingConfig:t.nativeTrackingConfig,containerId:e.targetId,clickLinkSelector:"a"},p=c(e.native,u),{enabled:h=!0}=null!==(d=t.nativeTrackingConfig)&&void 0!==d?d:{};wr(e.targetId,p,u,()=>{Dn(e.targetId),h&&((e,t)=>{br(e,t),xr(e,t)})(e,u)})}catch(e){s("Failed to render native ad from config",{error:e})}}),Gr=e=>_e(void 0,void 0,void 0,function*(){if(!(e=>{const{editory:{editableConfiguration:{enabled:t=!1,pageTypeToFetch:n}={}}={},siteSpecificConfig:o}=e;return Boolean(t&&n&&(null==o?void 0:o.publisherClassName))})(e))return e;try{const t=yield fr(e);return t?((e,t)=>r(t,e,gr))(e,t):e}catch(t){return s("Error fetching S3 config, using site config",{error:t}),e}});let Jr,Xr=[];const Qr=["takeover","wallpaper"],Yr=e=>{const t=(e=>{var t;const n=z.getData("alertoryConfigKeywords"),{queryConfig:o,placements:i,tcf:r,glimr:a,appearanceConfig:d,pageContext:{publisher:s,countryCode:l,pageType:c,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y,fullWidth:f}=e,w=null!==(t=null==o?void 0:o.batchSize)&&void 0!==t?t:u;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:s,countryCode:l,pageType:c,deviceType:p,isMobileApp:v},pageSetup:h,placements:i,tcf:r,queryConfig:Object.assign(Object.assign({},o),{batchSize:w})},a&&{glimr:a}),d&&{appearanceConfig:d}),m&&{takeover:m}),y&&{fullscreenScroll:y}),f&&{fullWidth:f})}})(e);window.advertory={initialized:!0,version:"3.6.2",siteConfig:e,alertoryConfig:t}},Zr=()=>_e(void 0,void 0,void 0,function*(){const{pageOptions:e}=v.get(),{preparePageOptions:t}=v.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=v.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"]}})(),o=yield _e(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=v.get();return(yield Fe(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),i=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),o));(e=>{const t=z.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=ai(e);z.setData("alertoryConfigKeywords",n)})(i.keywords),I(()=>Jr.setPageOpts(i))}),ea=e=>_e(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:o,countryCode:i}}=v.get(),r=yield Fe(n,o,i,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>R(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);ta(a);(null==t?void 0:t.enabled)&&r&&!F()?(s("core loadPlacements prebid enabled"),yield Un()):(s("core load tags invoked without prebid enabled"),na(a))}),ta=e=>{const{prepareTag:t}=v.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const o=t.findIndex(t=>e.targetId.includes(t)),i=t.findIndex(e=>n.targetId.includes(e));return-1!==o&&-1===i?-1:-1===o&&-1!==i?1:o-i})})(e).forEach(e=>{s("core defineTags",{placement:e});const o=ni(e);if(oi(e.targetId)){const i=t(o),r=(e=>{const{allowedFormats:t,invCode:n,keywords:o,sizes:i}=e;return{adTypes:t,invCode:n,keywords:ri(o),sizes:i}})(i);n.push(r),I(()=>(s("core defineTag - add to the queue",{placement:e,preparedTag:i}),Jr.defineTag(i)))}}),(e=>{var t,n,o;(null===(o=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===o?void 0:o.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},na=e=>{const t=e.filter(({targetId:e})=>oi(e)).map(({targetId:e})=>e);t.length&&I(()=>(s("core loadTags",{placementsIdsToLoad:t}),Jr.loadTags([...t])))},oa=(e,t)=>_e(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:o}}=v.get(),{requestThreshold:i,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),d=null==n?void 0:n.defaultThreshold[o];a&&(s("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:i,deviceDefaultThreshold:d}),yield _o(a,null!=i?i:d)),a&&(null==r?void 0:r.scroll)&&(s("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),ia=e=>e.some(({targetId:e})=>Qr.some(t=>e.includes(t))),ra=e=>_e(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,o]=(e=>e.reduce(([e,t],n)=>{var o;return(null===(o=null==n?void 0:n.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),i=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=u}={},pageContext:{deviceType:o}}=v.get(),i=ae(e),r=Object.keys((null==t?void 0:t[o])||{}).map(e=>i[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,...Ho(d,n)]})(o);for(const e of i)ia(e)?(s("core loadAds without lazy loading",{placementsToLoad:e}),yield ea(e)):e.length&&(s("core loadAds with lazy loading",{placementsToLoad:e}),yield aa(e));const{finnBlink:r}=v.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ad});yield e(n)}}),aa=e=>_e(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=v.get(),o=[];if(!t)return s("lazy load is not enabled",{placements:e}),void(yield ea(e));const i=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:o,placements:e});const i=e.every(e=>o.includes(e.targetId)),r=e.map(e=>e.targetId);!i&&o.push(...r),!i&&ea(e),s("lazy load is enabled - handler stop",{loadedTargetIds:o,placements:e,arePlacementsLoaded:i,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}),i.observe(t))})}),da=()=>_e(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=v.getHandlers(),{wallpaper:n,fullscreenScroll:o}=v.get(),i=[];I(()=>{Jr.onEvent("adRequested",()=>{e.adRequested()}),Jr.onEvent("adAvailable",i=>_e(void 0,void 0,void 0,function*(){var r,a,d,l,c,u;s("core adAvailable start",{placementsAvailable:Xr,adObj:i,isFullscreenScrollAd:fe(i),isFinnBlink:Te(i.targetId),isNativeAd:we(i),isMediation:ii(i),isTakeoverAd:ke(i),isCollapseAd:Ce(i),isWallpaperAd:Ie(i)});const p=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[i.targetId])||void 0===d?void 0:d.adResponse.ads;if(ii(i)&&p&&(null===(l=p[1])||void 0===l?void 0:l.rtb)&&(i.banner=null===(u=null===(c=p[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),fe(i)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Mn});e(i)}const{widescreenSwitching:g}=v.get();if(Pe(i)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return cd});e()}if(fe(i)&&!Te(i.targetId)){s("core adAvailable: creating fullscreen scroll container",{targetId:i.targetId,width:i.width,height:i.height,bannerWidth:i.banner&&"object"==typeof i.banner?i.banner.width:i.banner,bannerHeight:i.banner&&"object"==typeof i.banner?i.banner.height:void 0});const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Mn});e(i,o)}if(!we(i)||ii(i)||Te(i.targetId)||null==t||t(i,v.get()),ke(i)&&!Ce(i)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Sd});e(i.targetId),yield t(i)}if(Ie(i)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return N});e(()=>I(()=>window.apntag.showTag(i.targetId)),n),z.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(i)&&z.setData("horseshoe",{isAvailable:!0}),e.adAvailable(i);const h=Xr.find(({targetId:e})=>e===i.targetId);h&&(yield oa(h,i),Xr=Xr.filter(e=>e.targetId!==h.targetId)),s("core adAvailable stop",{placementsAvailable:Xr,adObj:i,isFullscreenScrollAd:fe(i),isFinnBlink:Te(i.targetId),isNativeAd:we(i),isMediation:ii(i),isTakeoverAd:ke(i),isCollapseAd:Ce(i),isWallpaperAd:Ie(i)})})),Jr.onEvent("adLoaded",n=>_e(void 0,void 0,void 0,function*(){const{refreshConfig:o,appearanceConfig:r,wallpaper:a,adScaleConfig:d}=v.get(),s=document.getElementById(n.targetId);if(Te(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return Za});e(n)}if(i.includes(n.targetId)&&we(n)&&(null==t||t(n,v.get()),ut({adObj:n})),!i.includes(n.targetId)&&ii(n)&&i.push(n.targetId),Ce(n)&&R(n.targetId),ke(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Sd});e(Jr,n.targetId)}if((e=>$e(e,le))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return $d});e(n)}if((e=>$e(e,ue))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return $d});e(n)}if(be(n)){const{applyFullwidthFormat:e}=yield Promise.resolve().then(function(){return $d});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,o=document.querySelector(`#${n}`),i=null==o?void 0:o.parentElement;if(!i||!o)return;Uo({adWrapper:i,placementContainer:o});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();o&&"true"!==o.dataset.subscribedForRefresh&&(o.dataset.subscribedForRefresh="true",o.dataset.refresh&&zo(o,a,r))})(n,o),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(z.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return N});e(n.targetId)}if(null==d?void 0:d.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return wt});e(n),t(n)}e.adLoaded(n),Dn(n.targetId),s&&(s.classList.add(Fn),(e=>{var t,n;const{pageSectionsSelectors:o}=v.get(),i=null==o?void 0:o.mainFirstColumn,r=i?null===(t=document.querySelector(i))||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)),ut({adObj:n}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const o=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;o&&((e,t)=>{const{height:n,width:o,native:i}=e;i?t.dataset.adSizes="[1,1]":n&&o&&(t.dataset.adSizes=`[${o},${n}]`)})(e,o)})(n),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:pt(n)}}))})),Jr.onEvent("adNoBid",t=>_e(void 0,void 0,void 0,function*(){var n;if(R(t.targetId),null===(n=v.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return xo});yield e(v.get(),t)}if(ke(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return lt});yield e(t)}e.adNoBid(t)})),Jr.onEvent("adError",(t,n)=>_e(void 0,void 0,void 0,function*(){if(ke(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return lt});yield e(n)}e.adError(t,n)})),Jr.onEvent("adCollapse",()=>{e.adCollapse()}),Jr.onEvent("adRequestFailure",t=>_e(void 0,void 0,void 0,function*(){R(t.targetId),yield bo(v.get(),t),e.adRequestFailure(t)})),Jr.onEvent("adBadRequest",t=>_e(void 0,void 0,void 0,function*(){R(t.targetId),yield bo(v.get(),t),e.adBadRequest(t)})),Jr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),Jr.onEvent("adNoBidMediated",t=>_e(void 0,void 0,void 0,function*(){yield bo(v.get(),t),e.adNoBidMediated(t)}))})}),sa=(e,t)=>_e(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:o,reloadExistingAds:i,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(o)return K(),[];i&&(K(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{U(e.id)})),g(null!=e?e:{}),yield Zr();const{clientSidePlacements:d,serverSidePlacements:s}=ur(ie(a));let l=d;return r&&(l=l.filter(e=>Te(e.targetId))),vr(s,v.get()),l.length>0&&(Xr=[...Xr,...l.map(e=>Object.assign({},e))],Go(l),Xo(l),yield ra(l)),Xr}),la=(e,t)=>_e(void 0,void 0,void 0,function*(){var n;v.set(e),v.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:o,kilkaya:i,rightColumnSplit:r,drEdition:a,finnBlink:d}=e;if(z.initialize(),window.addEventListener("message",$o,!1),Jr=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=Jr,s("Apn tag is set up on window"),yield Promise.allSettled([_e(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=v.get();(yield Fe(e,t,n,"xandr-endpoint"))||Jr.setEndpoint("ib.adnxs-simple.com",!0)}),_e(void 0,void 0,void 0,function*(){if(F())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:o}}=v.get(),i=yield Fe(t,n,o,"prebid");(null==e?void 0:e.enabled)&&i&&(yield ln(null==e?void 0:e.prebidUrl))}),nn(e),_e(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=v.get();yield ln(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),_e(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:o}}=v.get();(yield Fe(t,n,o,"gpt-endpoint"))&&(yield ln(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),_e(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:o,countryCode:i}}=v.get(),{getConsentAsync:r}=Be(n,0,i),a=yield r();if(e&&t&&a){if(yield ln(t),document.querySelector(`.${li}`))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(li)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Pt(),_e(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=v.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield ln(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==o?void 0:o.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return _d});yield e()}s("Libraries have been loaded and trackers have been set"),yield da(),yield Zr(),s("Page options have been set"),Yr(e),s("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=ur(ie());if(Xr=l,vr(c,e),Go(Xr),Xo(Xr),yield ra(Xr),s("Ads has been loaded",Xr),ko(e,Xr),di(Xr),null==d?void 0:d.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ad});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 xo});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Vd});t(e.rightColumnSplit)}if(null==i?void 0:i.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return ss});yield t(e)}}),ca=(e,t)=>_e(void 0,void 0,void 0,function*(){yield((e,t)=>_e(void 0,void 0,void 0,function*(){var n,o;const{initConsentManager:i,getConsentAsync:r}=Be(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(o=e.pageContext)||void 0===o?void 0:o.countryCode),a=yield Gr(e);yield yo(),yield si(i),yield si(r),s("TCF resolved successfully"),yield la(a,t),s("Run function resolved successfully")}))(e,t)}),ua=(e,t,n,o)=>{var i;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,customBody1:w,customBody2:b,customBody3:k,customBody4:x,customBody5:I,customIcon1:C,customIcon2:E,customDisplayUrl1:T}=e,A=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:A(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=o.appearanceConfig)||void 0===e?void 0:e.theme)&&C;return A(t?C:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(i=null!=u?u:g)&&void 0!==i?i:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",customBody1:null!=w?w:"",customBody2:null!=b?b:"",customBody3:null!=k?k:"",customBody4:null!=x?x:"",customBody5:null!=I?I:"",logo2:A(E),previewVideoSrc:null!=T?T:""},t)},pa=(e,t)=>{const n=B(D),o=new URLSearchParams(window.location.search).get(D),i=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?i?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},va=(e,t,n,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:o,pageType:i}=t,r=o&&Object.values(kt).includes(o);n&&r&&nr(o,e,ir,i)})(i,n),o())},ga=(e,t,n)=>{const o=((e,t,n)=>{var o;const{displayTemplates:i,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(o=pa(e.targetId,l))&&void 0!==o?o:c,p=On[t.language||h.NO],v=ua(d,p,s,t);return(d.video?r[u]:i[u]||i.default)(v,t)})(e,t,n);va(e.targetId,o,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&rr(e,t)})},ha=e=>(t,n)=>{var o;const{targetId:i}=t,r=document.querySelector(`#${i}`);if(!r)return;const a=e.getOptions(null!=n?n:{});ga(t,a,e.templates),null===(o=e.postProcess)||void 0===o||o.call(e,t,r)},ma=()=>{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},ya=e=>{const{siteSpecificConfig:t}=v.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))};class fa{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return _e(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 _e(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const wa=9826;class ba{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e,isMobileApp:t}}=v.get();if(t){return{"aa-sch-supply_type":`app_${e===G?"phone":J}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return _e(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 _e(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return(()=>{const e=Re("_pulse2data");return e?e.split(",")[2]:void 0})()}getExternalUid(){return _e(this,void 0,void 0,function*(){return yield Ue(v.get())})}isTrackingForbidden(){return _e(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=wa}={}}=v.get();return"true"===q("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=v.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return _e(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=v.get(),{getConsentAsync:o}=Be(e,0,n);return{"aa-sch-cmp_advertising":(yield o())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=v.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 ka=new ba;function xa(e=!1){var t,n;const o=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),i=vt();return{OS:i,mobileOS:["ios","android"].includes(i)?i:"unknown",isHybridApp:o.includes("hermes"),appMode:e?"hybrid":"notinapp"}}ka.prepare.bind(ka);const Ia=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Ca(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Ia.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Ea extends ba{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=v.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=v.get(),{OS:n,isHybridApp:o}=xa(t);return{"no-sno-apptype":n&&e&&o?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Ca(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:o}}=v.get(),i=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":`${i.split("_").pop()||i}_${"article"===o?"article":"front"}`}}}const Ta=new class extends Ea{prepare(e){return _e(this,void 0,void 0,function*(){var t,n,o,i,r,a,d;const s=v.get(),l=null!==(o=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==o?o:{},c=null!==(a=null===(r=null===(i=s.pageSetup)||void 0===i?void 0:i.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(d=s.siteSpecificConfig)||void 0===d?void 0:d.publisherClassName,p=new fa;yield p.addAsync(this.getAdvertisingConsentKeywords()),yield p.addAsync(Nt(s,l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield p.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),p.add(this.getSupplyTypeKeywords()).add(rn()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{});const g=p.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:g,user:Object.assign(Object.assign({},on(h.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Aa=Ta.prepare.bind(Ta);class Sa extends ba{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=v.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,o=document.documentElement.clientHeight;return{width:e||n||0,height:t||o||0}}(),t={width:null!==(o=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==o?o:0,height:null!==(r=null===(i=window.screen)||void 0===i?void 0:i.height)&&void 0!==r?r:0};var n,o,i,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return _e(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=v.get(),{appMode:t,mobileOS:n}=xa(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:o}}=v.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"===o?"article":"front"}`}}}const Pa=new class extends Sa{prepare(e){return _e(this,void 0,void 0,function*(){var t,n,o,i,r,a;const d=v.get(),s=null!==(o=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==o?o:{},l=null!==(a=null===(r=null===(i=d.pageSetup)||void 0===i?void 0:i.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new fa;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(Nt(d,s.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>_e(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(rn()).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"===Re("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),p=!1!==s.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},on(h.SE)),p?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Oa=Pa.prepare.bind(Pa),ja="viewable",$a="adClick";var La=e=>(t,n,o)=>{const{video:i,img:r,url:a}=t,{publisher:d,productTag:s}=n,{pluginsNames:l,videoLoop:c}=o||{};if(!(null==i?void 0:i.content))return null;const u=Math.ceil(1e5*Math.random()),p=r||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${u}`,g=_a(i.content,a),h=Na({id:u,nodeId:v,poster:p,tagURL:g,publisher:d,productTag:s,videoLoop:c});return qa({playerConfig:h,clickUrl:a,pluginsNames:l}),`${e(t,n,v)}`};const _a=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),o=n.querySelector("ClickThrough"),i=n.querySelector("VideoClicks");if(o){for(;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(n.createCDATASection(t))}else if(i){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),i.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},Na=({id:e,nodeId:t,poster:n,tagURL:o,publisher:i="",productTag:r="xandr",videoLoop:a=!1})=>({id:e,poster:n,vendor:"appnexus",node:t,mute:!0,autoplay:a,repeat:a,skin:{name:"inventory-player",url:"https://ads.inventory.schibsted.io/styles/player.css"},settings:{jw:{stretching:"fill",advertising:{client:"vast",tag:o}}},pulse:{provider:i.toLowerCase(),decorator:e=>Object.assign(Object.assign({},co(e)?e:{}),{provider:Object.assign(Object.assign({},co(null==e?void 0:e.provider)?e.provider:{}),{productTag:r})})}}),qa=e=>_e(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:o}=e,{repeat:i}=t,r=yield oo(t);ro(n),r.once("assetReady",()=>{no(r,n)}),r.on(ja,e=>{const{viewable:t}=e;t?r.play():r.pause()}),r.on($a,()=>{window.open(o,"_blank")}),i&&r.on("pause",()=>{r.play()})}),Ma=({containerId:e,url:t,body:n,title:o,logo:i,isContentVideoAd:r=!1,imgWidth:a})=>{const d=`\n <div class="ad-header">\n <span>ANNONSØRINNHOLD</span>\n ${i?`<img alt="" aria-hidden="true" class="ad-logo" src="${i}" />`:""}\n </div>\n `,s=`<div class="ad-text">${o}</div>`;return`\n <div id="${e}" class="advertory-godt-ad-content" ${a?`style="max-width: ${a}px"`:""}>\n <div class="ad-info" id="${e}-button"></div>\n ${r?`\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 `},Da=["IntegrationMenu"],Ba=({containerId:e},t,n)=>` <div id="${e}" class="advertory-godt-ad-weekly-menu">\n <div class="ad-info" id="${e}-button"></div>\n <div class="ad-video-wrapper">\n <div id="${n}"></div>\n </div>\n <span class="ad-label">${On.no.adText}</span>\n </div>`;Sn('@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}}'),Sn('.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 Fa={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:o,img:i,adText:r})=>(Promise.resolve().then(function(){return ls}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${o}" class="ad-image" src="${i}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${o}</div>\n </div>\n </div>\n </a>\n </article>`)},Ra={default:Fa.NATIVE_TEMPLATE,content:({containerId:e,url:t,title:n,img:o,imgWidth:i,imgHeight:r,logo:a,imgAltText:d})=>{const s=yt(i,r);return Ma({containerId:e,url:t,title:n,logo:a,imgWidth:i,body:`\n<div class="ad-image-wrapper" ${s?`style="padding-bottom: ${100*s}%"`:""}>\n <img alt="${d}" class="ad-image" src="${o}" />\n</div>`})},contentVideo:(e,t)=>La(({containerId:e,url:t,title:n,logo:o},i,r)=>Ma({containerId:e,url:t,title:n,isContentVideoAd:!0,logo:o,body:`\n<div class="ad-video-wrapper">\n <div id="${r}"></div>\n</div>`}))(e,t),nativeVideo:(e,t)=>La(({containerId:e,url:t,sponsoredBy:n,title:o},i,r)=>(({containerId:e,url:t,sponsoredBy:n,body:o,title:i})=>`\n<div id="${e}" class="advertory-godt-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">${On.no.adFrom} ${n}</div>\n ${o}\n <div class="ad-text">${i}</div>\n </a>\n</div>`)({containerId:e,url:t,sponsoredBy:n,title:o,body:`\n<div class="ad-video-wrapper">\n <div id="${r}"></div>\n</div>`}))(e,t),weeklyMenuVideo:(e,t)=>La(Ba)(e,t,{videoLoop:true,pluginsNames:Da}),weeklyMenuStripe:({title:e,logo:t})=>`<div class="advertory-godt-ad-weekly-menu-stripe">\n <span class="ad-text">${e}</span>\n <img alt="" aria-hidden="true" class="ad-logo" src="${t}" />\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n var disclaimer = e.target.closest('button').nextElementSibling;\n\n if (disclaimer.style.display === 'none') {\n disclaimer.style.display = 'block';\n } else {\n disclaimer.style.display = 'none';\n }\n } catch (error) {}\n })(arguments[0]);return false;"\n >\n <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="M14.25 16.5h-.75A1.5 1.5 0 0 1 12 15v-3.75a.75.75 0 0 0-.75-.75h-.75M11.625 6.75a.375.375 0 1 0 0 .75.375.375 0 0 0 0-.75v0"/><path clip-rule="evenodd" d="M12 23.25c6.213 0 11.25-5.037 11.25-11.25S18.213.75 12 .75.75 5.787.75 12 5.787 23.25 12 23.25Z" fill-rule="evenodd"/></g></svg>\n </button>\n <div class="disclaimer" style="display: none">\n Annonsøren som presenterer ukemenyen har betalt for profilering av logoen på VG-forsiden og Godt.no, og annonsen mellom oppskriftene.\n <a href="https://www.vg.no/informasjon/redaksjonelle-avgjorelser/232" target="_blank">\n Les mer\n </a>\n </div>\n </div>`,weeklyMenu:({containerId:e,url:t,img:n,imgAltText:o})=>`<div id="${e}" class="advertory-godt-ad-weekly-menu">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}"rel="noopener nofollow sponsored">\n <img alt="${o}" class="ad-image" src="${n}" />\n <span class="ad-label">${On.no.adText}</span>\n </a>\n</div>`,sponsorstripe:({title:e,logo:t})=>`\n <div class="advertory-godt-sponsorstripe">\n <div class="ad-container">\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n const root = e.target.closest('.advertory-godt-sponsorstripe');\n root.classList.add('disclaimer-visible');\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">${e}</span>\n <img alt="" aria-hidden="true" class="ad-logo" src="${t}" />\n </div>\n <div class="disclaimer">\n <button\n class="button"\n type="button"\n onclick="(function(e){\n try {\n const root = e.target.closest('.advertory-godt-sponsorstripe');\n root.classList.remove('disclaimer-visible');\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 og innhold på Godt.no\n <a href="https://www.vg.no/informasjon/redaksjonelle-avgjorelser/232" target="_blank">\n Les mer\n </a>\n </div>\n </div>\n </div>`},Ua={displayTemplates:{default:Ra.default,content:Ra.content,"ukesmeny-stripe":Ra.weeklyMenuStripe,ukesmeny:Ra.weeklyMenu,sponsorstripe:Ra.sponsorstripe},videoTemplates:{default:Ra.nativeVideo,content:Ra.contentVideo,menu:Ra.weeklyMenuVideo}},Va={prepareTag:e=>{var t;const{keywords:n,targetId:o,invCode:i,dynamicSizeWidthCheck:r,globalPlacementId:a}=e,{pageSetup:d,pageContext:{countryCode:s}}=v.get(),{tag:{useAppTabletInvCode:l=!0}={}}=null!=d?d:{},c=((e,t)=>{const{pageContext:{isMobileApp:n}}=v.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(i,l),u=(e=>{const{pageContext:{countryCode:t}}=v.get(),{keywords:n,dynamicSizeWidthCheck:o}=e,i=`${m(t)}-adformat`,r=n?n[i]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in ye)||window.innerWidth>=ye[e]);return{[i]:o?a:r}})(e),p=(e=>{const{pageContext:{countryCode:t}}=v.get(),n=`${m(t)}-targetid`;return e?{[n]:[e]}:{}})(o),g=(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}})(c),h=ma(),y=(e=>ya(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(i),f=((e,t)=>ya(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(i,{safeFrameAutoInitialSize:!0}),w=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,b=(new fa).add(null!=n?n:{}).add(u).add(p).add(null!=g?g:{}).add(y).add(h).addIf(null===(t=null==d?void 0:d.tag)||void 0===t?void 0:t.reloadKeywords,{[`${m(s)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:w,invCode:c,keywords:b,rendererOptions:f,globalPlacementId:a||c})},preparePageOptions:e=>_e(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t}}=v.get();return yield t===h.SE?Oa(e):Aa(e)}),siteEvents:bt,initNativeAd:(e,t)=>{var n,o,i;if(null===(o=null===(n=null==t?void 0:t.editory)||void 0===n?void 0:n.adNativeBuilder)||void 0===o?void 0:o.enabled)return void Kr(e,t);const{targetId:r}=e;if(!document.querySelector(`#${r}`))return;const{pageType:a=to.FRONT,deviceType:d}=null!==(i=null==t?void 0:t.pageContext)&&void 0!==i?i:{},{nativeTrackingConfig:s,appearanceConfig:l}=null!=t?t:{},c={language:h.NO,publisher:kt.GODT,deviceType:d,pageType:a,nativeTrackingConfig:s,appearanceConfig:l};ga(e,c,Ua)}},za=((e,t)=>({init:n=>ca(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:sa,getVideoPPIDs:sn,createInitNativeAd:ha,getVideoAdsConfig:Ji}))(Va,xt),Ha=Sn("[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 Wa=Object.freeze({__proto__:null,default:Ha});Sn('.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 Ka={Blink:"Blink"},Ga=new Map,Ja=e=>{var t;if(!Ga.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Ka)){const o=e[t];null!=o&&(window[n]=o)}})(e)).catch(t=>{throw Ga.delete(e),t});Ga.set(e,t)}return null!==(t=Ga.get(e))&&void 0!==t?t:Promise.resolve()},Xa="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",Qa=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:o}}=v.get(),i=document.querySelector(`#${e}`);if(!i)return;if(i.classList.add("disable-cogwheel"),!n)return;nr(n,i,or,null!=t?t:o);ut({preferredTestIdData:{targetId:e,testId:"finn"}})},Ya=e=>{const{pageContext:{publisher:t=""}}=v.get(),n=document.querySelector(`#${e}`);if(!n)return;const o=`-${t}`;n.classList.remove(`advertory${o}-finn-blink`),n.classList.remove(`advertory${o}-finn-blink-wrapper`)};var Za=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=v.get(),{initNativeAd:n}=v.getHandlers();fe(e)&&Nn(e,t),we(e)&&(null==n||n(e,v.get()))},finnBlinkLoaded:Qa,xandrAdLoaded:Ya});const ed=e=>{var t,n;const o=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==o?void 0:o.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},td=(e,t)=>{const{finnBlink:{enabled:n}={}}=v.get(),o=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!o||!n)return null;const{height:i,requireImage:r,position:a,offset:d}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${ed(e)}`,enabled:o,position:null!=a?a:e,height:null!=i?i:100,offset:null!=d?d:200,requireImage:r,advertoryTheme:null==t?void 0:t.advertoryTheme}},nd=(e,t,n)=>_e(void 0,void 0,void 0,function*(){const{placements:o,pageContext:{deviceType:i},appearanceConfig:r}=v.get();s(`rendering finn blink ad for ${e}`);const a=b(e),d=o[i].find(e=>e.targetId===a),l=td(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 Ya(e);if((e=>{var t;const n=ed(e),o=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==o?void 0:o.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void s(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:p}=t,{sdkPayload:{channel:g}={}}=null!=p?p:{},h=null!=g?g:`${c}.${u}`,m="dark"===(null==r?void 0:r.theme)?"dark":"light";try{const e=yield _e(void 0,void 0,void 0,function*(){const{ppid1:e}=tn.getPPIDs();return e});yield(y=Object.assign(Object.assign({},l),{channel:h,userId:e,theme:m}),_e(void 0,void 0,void 0,function*(){const{userId:e,theme:t}=y,n=Le(y,["userId","theme"]),o=window[Ka.Blink];if(!o)return;const i=new o({remote:"https://www.finn.no/distribution-front/external/carousel",userId:e,theme:t});yield i.inject(Object.assign({},n))})),Qa(l.selector.replace("#",""),l.advertoryTheme)}catch(t){s(`Finn blink error ${t}`),n&&n(e),!n&&R(e),Ya(e)}var y}),od=()=>_e(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=v.get();return!!(yield Fe(e,t,n,"finn-blink"))||(s("Skip loading finn blink ad due to missing TCF consent."),!1)}),id=(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}`)},rd=e=>document.querySelector(`#${e}`);var ad=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>_e(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=v.get(),o=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,i=rd(n);i&&(yield _o(i,null!=e?e:o))}}),loadFinnBlinkAd:(e,t,n,o)=>_e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:i}}=v.get();if(s(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield od())||i)return n&&n(e),Ya(e),void(!n&&R(e));try{yield Ja(Xa)}catch(e){console.error(e)}yield nd(e,t,n),o&&o()}),replaceAdsWithFinnBlink:(e,t)=>_e(void 0,void 0,void 0,function*(){var n,o;if(!(null==t?void 0:t.enabled))return;const{replacementConfig:i}=t,r=null===(n=null==i?void 0:i.adsToReplace)||void 0===n?void 0:n[e],a=null===(o=null==i?void 0:i.sizes)||void 0===o?void 0:o[e];fo()&&r&&a?(yield od())&&(yield Ja(Xa),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const o=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=v.get(),n=document.createElement("div"),o=document.createElement("div");return o.id=e,n.appendChild(o),nr(t,o,or),s(`Creating blink container for: ${e}`),n})(t);(e=>{s(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),id(n,o),n.dataset.finnBlinkId=t,Lo().withFullAdsChain(e)})):s(`Finn blink configuration is incorrect: ${JSON.stringify(i)}`)})});const dd=1e4,sd=e=>e.some(e=>e.some(e=>!!e&&Ko(e,0)));let ld;var cd=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=v.get(),{enabled:t,options:{rotationInterval:n=dd,widescreenIdPrefix:o}={}}=null!=e?e:{};if(!t)return;const i=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=v.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(o);let r=0,a=Date.now(),d=sd(i);if(!i.length)return;ld&&window.removeEventListener("scroll",ld);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(i);const c=((e,t)=>{let n=null;return(...o)=>{null===n&&(e(...o),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=sd(i)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=i.map(e=>e[r]),n=i.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);ld=c,window.addEventListener("scroll",c)}});const ud="#fff",pd="#0098da",vd=(e,t=!0)=>{(e===ze||e===He)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},gd=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},hd=e=>{document.body.style.overflow=e?"initial":"hidden"},md=e=>{const t=fd(e),n=yd(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),hd(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},yd=e=>{const t=()=>md(e);return window.addEventListener("advertory:closeTakeover",t),gd(),t},fd=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&md(e)};return gd(),window.addEventListener("keydown",t),t},wd=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(fd(e),yd(e),gd(),t.addEventListener("click",()=>{md(e)}),hd(!1))},bd=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),yd(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},kd=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>md(e))})(e)},xd=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=v.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),o=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&o&&(o.style.display="flex",o.innerText=On.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Id=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=On.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Cd=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=On.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Ed=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=On.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Td=()=>{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)},Ad=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${st})()`,e+t.outerHTML})(e)),n};var Sd=Object.freeze({__proto__:null,createTakeoverAd:e=>_e(void 0,void 0,void 0,function*(){const{takeover:t}=v.get(),{targetId:n}=e,o=document.querySelector(`#${n}`),i=document.querySelector(".advertory-takeover-wrapper");if(!o||!i||!t)return;const r=ot(e),a=i.offsetHeight,d=window.scrollY>a;i.style.display="block",!d&&vd(r,!1),((e,t)=>{({[ze]:Cd,[Ve]:xd,[He]:Id,[We]:Ed})[t](e)})(i,r),Td(),((e,t)=>{({[ze]:bd,[He]:bd,[Ve]:wd,[We]:kd})[t](e)})(i,r),((e,t,n)=>{if(!n)return;({[ze]:()=>{const{buttonLabel:o}=at(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=o?o:"")})},[Ve]:()=>{const{themeColors:o,logotype:i,buttonLabel:r,showArrowIcon:a}=at(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=r?r:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&i&&(n.setAttribute("src",i.url),n.setAttribute("alt",i.alt)),".advertory-splash-navbar-wrapper"===t&&o){const{backgroundColor:e,color:t}=o;n.style.setProperty("background-color",null!=e?e:ud,"important"),n.style.color=null!=t?t:pd}}})},[He]:()=>{const{buttonLabel:o,showArrowIcon:i,showCloseButton:r=!0}=at(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||i||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=o?o:""))})},[We]:()=>{}})[t]()})(i,r,t),yield it(),!d&&vd(r,!0),dt(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,o=hn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[o].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,o=hn(e)?1:0,i=null==n?void 0:n.tags[e].adResponse.ads[o].rtb;i&&(i.banner.content=t)})(e,Ad(t))},modifyTakeoverIframe:(e,t)=>{var n;const o="100%",i="100%";e.resizeAd(t,[o,i]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===o&&n===i||(r.style.width=o,r.style.height=i)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const Pd=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Od=(e,t)=>{var n,o;const i=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:r,fullWidthFormatClassName:a}={},fullWidth:d,pageContext:{deviceType:s}}=v.get();if(!i)return null;const l=i.parentElement;if(i.style.width=gt(s)?"100vw":"100%",i.style.position="relative",l&&(l.style.width=gt(s)?"100vw":"100%",l.style.position="relative"),r&&a){const e=`advertory-${r}-${a}`;i.classList.add(`${e}__${t}`),null==l||l.classList.add(`${e}-wrapper__${t}`)}const c=null===(o=null===(n=null==d?void 0:d.options)||void 0===n?void 0:n.styles)||void 0===o?void 0:o[s],u=(null==d?void 0:d.enabled)&&c;return!u&&l&>(s)&&(l.style.left="50%",l.style.marginLeft="-50vw"),u&&c.adContainer&&Pd(i,c.adContainer),u&&c.adContainerWrapper&&l&&Pd(l,c.adContainerWrapper),i},jd=(e,t,n,o)=>{const i=Od(e,o);if(!i)return;const r=i.querySelector("iframe"),a=null==r?void 0:r.parentElement;if(!r||!a)return;const d=i.offsetWidth,s=d/e.width;a.style.transform=`scale(${s})`,a.style.transformOrigin="left top";const l=Math.round(d/t*n);i.style.height=`${l}px`};var $d=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{jd(e,1080,1080,"fullsquare-ad")},applyFullwidthFormat:e=>{const t=Od(e,"fullwidth-ad");if(!t)return;const n=t.querySelector("iframe");if(!n)return;const{deviceType:o}=v.get().pageContext;n.style.width=gt(o)?"100vw":"100%",(null==n?void 0:n.parentElement)&&(n.parentElement.style.width=gt(o)?"100vw":"100%")},applyNinesixteenFormat:e=>{jd(e,1080,1920,"ninesixteen-ad")}});const Ld=e=>e===h.NO?"schibsted":"schibstedse";var _d=Object.freeze({__proto__:null,getCampaign:Ld,loadNorstat:()=>_e(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:o}=v.get(),i=yield Fe(o,n,t,"norstat");if(!e||n||!i)return;const r=(e=>{const{ppid1:t,ppid2:n}=en.getPPIDs(),{ppid1:o,ppid2:i}=tn.getPPIDs(),r=(new Zt).add(n,Wt[e]).add(t,Kt[e]).add(i,Gt[e]).add(o,Jt[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{_e(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const o=document.createElement("img");o.src=e,o.id=null!=t?t:"",n&&(o.style.display="none"),document.body.appendChild(o)})})(`https://sch-map.norstatsurveys.com/api/nids/${Ld(t)}/map/${r}`,"norstat")})});const Nd=".advertory-right-column-track",qd="--advertory-right-column-track-height",Md=e=>e.getBoundingClientRect().top+window.scrollY,Dd=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Bd=(e,t)=>{const n=(o=t,`${Math.max(0,Math.round(o))}px`);var o;document.body.style.setProperty(e,n)},Fd=(e,t)=>`${e}-${t}`,Rd=(e,t,n)=>{var o;const i=Array.from(null!==(o=e.querySelectorAll(t))&&void 0!==o?o:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=Md(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Dd(e);Bd("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const o=Md(e),i=Fd(qd,t),r=o-n,a=Fd("--advertory-right-column-split-point-height",t),d=Dd(e);Bd(i,r),Bd(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Fd("--advertory-right-column-ad-height",t),o=Dd(e);Bd(n,o)})(i[t])});((e,t)=>{const n=Md(e);Bd(qd,n-t)})(r[Math.min(i.length,r.length-1)].point,a)};let Ud=!1;var Vd=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Ud)return;const{splitPointIDs:t,adSelector:n,trackSelector:o=Nd}=e,i=document.querySelector(o);if(!i)return;Ud=!0;const r=()=>{Rd(i,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(i)}});class zd{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class Hd{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class Wd{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:o}=this.parseKilkayaData(e);return{id:o,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return _e(this,void 0,void 0,function*(){var t,n,o,i,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===i||i.call(o,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 _e(this,void 0,void 0,function*(){var t,n,o,i,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(i=(o=this.pulse).trackClickUIElement)||void 0===i||i.call(o,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class Kd extends Wd{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,o,i,r,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),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!==(i=null===(o=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===o?void 0:o.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=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:o}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const Gd="[data-k5a-teaser-analytics]",Jd=(e,t,n)=>{const o=document.querySelectorAll("k5a-stream");if(!o.length)return;const i=new Kd(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,o=n.querySelector(Gd);Boolean(null==o?void 0:o.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(Gd);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});o.forEach(e=>{d.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},Xd=/^glci_/,Qd="gender_",Yd="geo_",Zd="male",es="female",ts=()=>_e(void 0,void 0,void 0,function*(){try{const t=yield(e=500,_e(void 0,void 0,void 0,function*(){return Promise.race([go(),new Promise(t=>setTimeout(()=>t(void 0),e))])})),n=new ho(t),o=yield n.getIdentityUser(),{gender:i}=null!=o?o:{};return i===Zd||i===es?`${Qd}${i}`:void 0}catch(e){return}var e}),ns=()=>_e(void 0,void 0,void 0,function*(){const e=[],t=yield ts(),n=(()=>{const e=Dt().map(e=>`${Yd}${e.replace(Xd,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e});class os{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===to.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:o}=new URL(n),i=o.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class is{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class rs{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class as{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class ds{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const o={[kt.VG]:new zd,[kt.E24]:new os,"no-aftenposten":new is,[kt.BT]:new rs,"no-bergenstidende":new rs,[kt.SA]:new as,"no-stavangeraftenblad":new as}[n]||new Hd;Jd(e.instance,o,t)}injectKilkayaMeta(e){return _e(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield ns();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,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(s(`Kilkaya event for slot: ${n}`),!n)return void s("Kilkaya slot empty, Xandr backfill won't be loaded");const o=n.parentElement;o?(s(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(o)):s("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";U(o)}loadKilkayaScript(e){return _e(this,void 0,void 0,function*(){yield ln(e)})}run(e){return _e(this,void 0,void 0,function*(){var t,n;const{tcf:o,pageContext:{isMobileApp:i,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const d=yield Fe(o,i,r,"kilkaya");d&&(this.observeForKilkayaBackfills(),yield 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 ss=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:o,children:i,pulseData:r,htmlAttributes:a})=>{const d=(e,t)=>{const n={};if(!e)return n;for(const[o,i]of Object.entries(e)){n[t?`${t}-${o}`:o]=String(i)}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":o,style:{display:"none"},children:i})]}))},runKilkaya:e=>_e(void 0,void 0,void 0,function*(){const t=new ds;yield t.run(e)})});Sn('.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 ls=Object.freeze({__proto__:null});module.exports=za;
|